1/******************************************************************************* 2 * Copyright 2019 Adobe 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 ******************************************************************************/ 16 17/** 18 * Element.matches() 19 * https://developer.mozilla.org/enUS/docs/Web/API/Element/matches#Polyfill 20 */ 21if (!Element.prototype.matches) { 22 Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; 23} 24 25// eslint-disable-next-line valid-jsdoc 26/** 27 * Element.closest() 28 * https://developer.mozilla.org/enUS/docs/Web/API/Element/closest#Polyfill 29 */ 30if (!Element.prototype.closest) { 31 Element.prototype.closest = function(s) { 32 "use strict"; 33 var el = this; 34 if (!document.documentElement.contains(el)) { 35 return null; 36 } 37 do { 38 if (el.matches(s)) { 39 return el; 40 } 41 el = el.parentElement || el.parentNode; 42 } while (el !== null && el.nodeType === 1); 43 return null; 44 }; 45} 46 47/******************************************************************************* 48 * Copyright 2019 Adobe 49 * 50 * Licensed under the Apache License, Version 2.0 (the "License"); 51 * you may not use this file except in compliance with the License. 52 * You may obtain a copy of the License at 53 * 54 * http://www.apache.org/licenses/LICENSE-2.0 55 * 56 * Unless required by applicable law or agreed to in writing, software 57 * distributed under the License is distributed on an "AS IS" BASIS, 58 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 59 * See the License for the specific language governing permissions and 60 * limitations under the License. 61 ******************************************************************************/ 62(function() { 63 "use strict"; 64 65 var containerUtils = window.CQ && window.CQ.CoreComponents && window.CQ.CoreComponents.container && window.CQ.CoreComponents.container.utils ? window.CQ.CoreComponents.container.utils : undefined; 66 if (!containerUtils) { 67 // eslint-disable-next-line no-console 68 console.warn("Accordion: container utilities at window.CQ.CoreComponents.container.utils are not available. This can lead to missing features. Ensure the core.wcm.components.commons.site.container client library is included on the page."); 69 } 70 var dataLayerEnabled; 71 var dataLayer; 72 var dataLayerName; 73 var delay = 100; 74 75 var NS = "cmp"; 76 var IS = "accordion"; 77 78 var keyCodes = { 79 ENTER: 13, 80 SPACE: 32, 81 END: 35, 82 HOME: 36, 83 ARROW_LEFT: 37, 84 ARROW_UP: 38, 85 ARROW_RIGHT: 39, 86 ARROW_DOWN: 40 87 }; 88 89 var selectors = { 90 self: "[data-" + NS + '-is="' + IS + '"]' 91 }; 92
93 var cssClasses = { 94 button: { 95 disabled: "cmp-accordion__button--disabled", 96 expanded: "cmp-accordion__button--expanded" 97 }, 98 panel: { 99 hidden: "cmp-accordion__panel--hidden", 100 expanded: "cmp-accordion__panel--expanded" 101 } 102 }; 103 104 var dataAttributes = { 105 item: { 106 expanded: "data-cmp-expanded" 107 } 108 }; 109 110 var properties = { 111 /** 112 * Determines whether a single accordion item is forced to be expanded at a time. 113 * Expanding one item will collapse all others. 114 * 115 * @memberof Accordion 116 * @type {Boolean} 117 * @default false 118 */ 119 "singleExpansion": { 120 "default": false, 121 "transform": function(value) { 122 return !(value === null || typeof value === "undefined"); 123 } 124 } 125 }; 126 127 /** 128 * Accordion Configuration. 129 * 130 * @typedef {Object} AccordionConfig Represents an Accordion configuration 131 * @property {HTMLElement} element The HTMLElement representing the Accordion 132 * @property {Object} options The Accordion options 133 */ 134 135 /** 136 * Accordion. 137 * 138 * @class Accordion 139 * @classdesc An interactive Accordion component for toggling panels of related content 140 * @param {AccordionConfig} config The Accordion configuration 141 */ 142 function Accordion(config) { 143 var that = this; 144 145 if (config && config.element) { 146 init(config); 147 } 148 149 /** 150 * Initializes the Accordion. 151 * 152 * @private 153 * @param {AccordionConfig} config The Accordion configuration 154 */ 155 function init(config) { 156 that._config = config; 157 158 // prevents multiple initialization 159 config.element.removeAttribute("data-" + NS + "-is"); 160 161 setupProperties(config.options); 162 cacheElements(config.element); 163 164 if (that._elements["item"]) { 165 // ensures multiple element types are arrays. 166 that._elements["item"] = Array.isArray(that._elements["item"]) ? that._elements["item"] : [that._elements["item"]]; 167 that._elements["button"] = Array.isArray(that._elements["button"]) ? that._elements["button"] : [that._elements["button"]]; 168 that._elements["panel"] = Array.isArray(that._elements["panel"]) ? that._elements["panel"] : [that._elements["panel"]]; 169 170 if (that._properties.singleExpansion) { 171 var expandedItems = getExpandedItems(); 172 // multiple expanded items annotated, display the last item open. 173 if (expandedItems.length > 1) { 174 toggle(expandedItems.length - 1); 175 } 176 } 177 178 refreshItems(); 179 bindEvents(); 180 scrollToDeepLinkIdInAccordion(); 181 } 182 if (window.Granite && window.Granite.author && window.Granite.author.MessageChannel) { 183 /* 184 * Editor message handling: 185 * - subscribe to "cmp.panelcontainer" message requests sent by the editor frame 186 * - check that the message data panel container type is correct and that the id (path) matches this specific Accordion component 187 * - if so, route the "navigate" operation to enact a navigation of the Accordion based on index data 188 */ 189 window.CQ.CoreComponents.MESSAGE_CHANNEL = window.CQ.CoreComponents.MESSAGE_CHANNEL || new window.Granite.author.MessageChannel("cqauthor", window); 190 window.CQ.CoreComponents.MESSAGE_CHANNEL.subscribeRequestMessage("cmp.panelcontainer", function(message) { 191 if (message.data && message.data.type === "cmp-accordion" && message.data.id === that._elements.self.dataset["cmpPanelcontainerId"]) { 192 if (message.data.operation === "navigate") { 193 // switch to single expansion mode when navigating in edit mode. 194 var singleExpansion = that._properties.singleExpansion; 195 that._properties.singleExpansion = true; 196 toggle(message.data.index); 197 198 // revert to the configured state. 199 that._properties.singleExpansion = singleExpansion; 200 } 201 } 202 }); 203 } 204 } 205 206 /**
207 * Displays the panel containing the element that corresponds to the deep link in the URI fragment 208 * and scrolls the browser to this element. 209 */ 210 function scrollToDeepLinkIdInAccordion() { 211 if (containerUtils) { 212 var deepLinkItemIdx = containerUtils.getDeepLinkItemIdx(that, "item", "item"); 213 if (deepLinkItemIdx > -1) { 214 var deepLinkItem = that._elements["item"][deepLinkItemIdx]; 215 if (deepLinkItem && !deepLinkItem.hasAttribute(dataAttributes.item.expanded)) { 216 // if single expansion: close all accordion items 217 if (that._properties.singleExpansion) { 218 for (var j = 0; j < that._elements["item"].length; j++) { 219 if (that._elements["item"][j].hasAttribute(dataAttributes.item.expanded)) { 220 setItemExpanded(that._elements["item"][j], false, true); 221 } 222 } 223 } 224 // expand the accordion item containing the deep link 225 setItemExpanded(deepLinkItem, true, true); 226 } 227 var hashId = window.location.hash.substring(1); 228 if (hashId) { 229 var hashItem = document.querySelector("[id='" + hashId + "']"); 230 if (hashItem) { 231 hashItem.scrollIntoView(); 232 } 233 } 234 } 235 } 236 } 237 238 /** 239 * Caches the Accordion elements as defined via the {@code data-accordion-hook="ELEMENT_NAME"} markup API. 240 * 241 * @private 242 * @param {HTMLElement} wrapper The Accordion wrapper element 243 */ 244 function cacheElements(wrapper) { 245 that._elements = {}; 246 that._elements.self = wrapper; 247 var hooks = that._elements.self.querySelectorAll("[data-" + NS + "-hook-" + IS + "]"); 248 249 for (var i = 0; i < hooks.length; i++) { 250 var hook = hooks[i]; 251 if (hook.closest("." + NS + "-" + IS) === that._elements.self) { // only process own accordion elements 252 var capitalized = IS; 253 capitalized = capitalized.charAt(0).toUpperCase() + capitalized.slice(1); 254 var key = hook.dataset[NS + "Hook" + capitalized]; 255 if (that._elements[key]) { 256 if (!Array.isArray(that._elements[key])) { 257 var tmp = that._elements[key]; 258 that._elements[key] = [tmp]; 259 } 260 that._elements[key].push(hook); 261 } else { 262 that._elements[key] = hook; 263 } 264 } 265 } 266 } 267 268 /** 269 * Sets up properties for the Accordion based on the passed options. 270 * 271 * @private 272 * @param {Object} options The Accordion options 273 */ 274 function setupProperties(options) { 275 that._properties = {}; 276 277 for (var key in properties) { 278 if (Object.prototype.hasOwnProperty.call(properties, key)) { 279 var property = properties[key]; 280 var value = null; 281 282 if (options && options[key] != null) { 283 value = options[key]; 284 285 // transform the provided option 286 if (property && typeof property.transform === "function") { 287 value = property.transform(value); 288 } 289 } 290 291 if (value === null) { 292 // value still null, take the property default 293 value = properties[key]["default"]; 294 } 295 296 that._properties[key] = value; 297 } 298 } 299 } 300 301 /** 302 * Binds Accordion event handling. 303 * 304 * @private 305 */ 306 function bindEvents() { 307 window.addEventListener("hashchange", scrollToDeepLinkIdInAccordion, false); 308 var buttons = that._elements["button"]; 309 if (buttons) { 310 for (var i = 0; i < buttons.length; i++) { 311 (function(index) { 312 buttons[i].addEventListener("click", function(event) { 313 toggle(index); 314 focusButton(index); 315 }); 316 buttons[i].addEventListener("keydown", function(event) { 317 onButtonKeyDown(event, index); 318 }); 319 })(i); 320 } 321 } 322 } 323 324 /** 325 * Handles button keydown events. 326 * 327 * @private 328 * @param {Object} event The keydown event 329 * @param {Number} index The index of the button triggering the event 330 */ 331 function onButtonKeyDown(event, index) { 332 var lastIndex = that._elements["button"].length - 1; 333 334 switch (event.keyCode) { 335 case keyCodes.ARROW_LEFT: 336 case keyCodes.ARROW_UP: 337 event.preventDefault(); 338 if (index > 0) { 339 focusButton(index - 1); 340 } 341 break; 342 case keyCodes.ARROW_RIGHT: 343 case keyCodes.ARROW_DOWN: 344 event.preventDefault(); 345 if (index < lastIndex) { 346 focusButton(index + 1); 347 } 348 break; 349 case keyCodes.HOME: 350 event.preventDefault(); 351 focusButton(0); 352 break; 353 case keyCodes.END: 354 event.preventDefault(); 355 focusButton(lastIndex); 356 break;
357 case keyCodes.ENTER: 358 case keyCodes.SPACE: 359 event.preventDefault(); 360 toggle(index); 361 focusButton(index); 362 break; 363 default: 364 return; 365 } 366 } 367 368 /** 369 * General handler for toggle of an item. 370 * 371 * @private 372 * @param {Number} index The index of the item to toggle 373 */ 374 function toggle(index) { 375 var item = that._elements["item"][index]; 376 if (item) { 377 if (that._properties.singleExpansion) { 378 // ensure only a single item is expanded if single expansion is enabled. 379 for (var i = 0; i < that._elements["item"].length; i++) { 380 if (that._elements["item"][i] !== item) { 381 var expanded = getItemExpanded(that._elements["item"][i]); 382 if (expanded) { 383 setItemExpanded(that._elements["item"][i], false); 384 } 385 } 386 } 387 } 388 setItemExpanded(item, !getItemExpanded(item)); 389 390 if (dataLayerEnabled) { 391 var accordionId = that._elements.self.id; 392 var expandedItems = getExpandedItems() 393 .map(function(item) { 394 return getDataLayerId(item); 395 }); 396 397 var uploadPayload = { component: {} }; 398 uploadPayload.component[accordionId] = { shownItems: expandedItems }; 399 400 var removePayload = { component: {} }; 401 removePayload.component[accordionId] = { shownItems: undefined }; 402 403 dataLayer.push(removePayload); 404 dataLayer.push(uploadPayload); 405 } 406 } 407 } 408 409 /** 410 * Sets an item's expanded state based on the provided flag and refreshes its internals. 411 * 412 * @private 413 * @param {HTMLElement} item The item to mark as expanded, or not expanded 414 * @param {Boolean} expanded true to mark the item expanded, false otherwise 415 * @param {Boolean} keepHash true to keep the hash in the URL, false to update it 416 */ 417 function setItemExpanded(item, expanded, keepHash) { 418 if (expanded) { 419 item.setAttribute(dataAttributes.item.expanded, ""); 420 var index = that._elements["item"].indexOf(item); 421 if (!keepHash && containerUtils) { 422 containerUtils.updateUrlHash(that, "item", index); 423 } 424 if (dataLayerEnabled) { 425 dataLayer.push({ 426 event: "cmp:show", 427 eventInfo: { 428 path: "component." + getDataLayerId(item) 429 } 430 }); 431 } 432 433 } else { 434 item.removeAttribute(dataAttributes.item.expanded); 435 if (!keepHash && containerUtils) { 436 containerUtils.removeUrlHash(); 437 } 438 if (dataLayerEnabled) { 439 dataLayer.push({ 440 event: "cmp:hide", 441 eventInfo: { 442 path: "component." + getDataLayerId(item) 443 } 444 }); 445 } 446 } 447 refreshItem(item); 448 } 449 450 /** 451 * Gets an item's expanded state. 452 * 453 * @private 454 * @param {HTMLElement} item The item for checking its expanded state 455 * @returns {Boolean} true if the item is expanded, false otherwise 456 */ 457 function getItemExpanded(item) { 458 return item && item.dataset && item.dataset["cmpExpanded"] !== undefined; 459 } 460 461 /** 462 * Refreshes an item based on its expanded state. 463 * 464 * @private 465 * @param {HTMLElement} item The item to refresh 466 */ 467 function refreshItem(item) { 468 var expanded = getItemExpanded(item); 469 if (expanded) { 470 expandItem(item); 471 } else { 472 collapseItem(item); 473 } 474 } 475 476 /** 477 * Refreshes all items based on their expanded state. 478 * 479 * @private 480 */ 481 function refreshItems() { 482 for (var i = 0; i < that._elements["item"].length; i++) { 483 refreshItem(that._elements["item"][i]); 484 } 485 } 486 487 /** 488 * Returns all expanded items. 489 * 490 * @private 491 * @returns {HTMLElement[]} The expanded items 492 */ 493 function getExpandedItems() { 494 var expandedItems = []; 495 496 for (var i = 0; i < that._elements["item"].length; i++) { 497 var item = that._elements["item"][i]; 498 var expanded = getItemExpanded(item); 499 if (expanded) { 500 expandedItems.push(item); 501 } 502 } 503 504 return expandedItems; 505 } 506 507 /** 508 * Annotates the item and its internals with 509 * the necessary style and accessibility attributes to indicate it is expanded. 510 * 511 * @private 512 * @param {HTMLElement} item The item to annotate as expanded 513 */ 514 function expandItem(item) { 515 var index = that._elements["item"].indexOf(item); 516 if (index > -1) { 517 var button = that._elements["button"][index]; 518 var panel = that._elements["panel"][index];
519 button.classList.add(cssClasses.button.expanded); 520 // used to fix some known screen readers issues in reading the correct state of the 'aria-expanded' attribute 521 // e.g. https://bugs.webkit.org/show_bug.cgi?id=210934 522 setTimeout(function() { 523 button.setAttribute("aria-expanded", true); 524 }, delay); 525 panel.classList.add(cssClasses.panel.expanded); 526 panel.classList.remove(cssClasses.panel.hidden); 527 panel.setAttribute("aria-hidden", false); 528 } 529 } 530 531 /** 532 * Annotates the item and its internals with 533 * the necessary style and accessibility attributes to indicate it is not expanded. 534 * 535 * @private 536 * @param {HTMLElement} item The item to annotate as not expanded 537 */ 538 function collapseItem(item) { 539 var index = that._elements["item"].indexOf(item); 540 if (index > -1) { 541 var button = that._elements["button"][index]; 542 var panel = that._elements["panel"][index]; 543 button.classList.remove(cssClasses.button.expanded); 544 // used to fix some known screen readers issues in reading the correct state of the 'aria-expanded' attribute 545 // e.g. https://bugs.webkit.org/show_bug.cgi?id=210934 546 setTimeout(function() { 547 button.setAttribute("aria-expanded", false); 548 }, delay); 549 panel.classList.add(cssClasses.panel.hidden); 550 panel.classList.remove(cssClasses.panel.expanded); 551 panel.setAttribute("aria-hidden", true); 552 } 553 } 554 555 /** 556 * Focuses the button at the provided index. 557 * 558 * @private 559 * @param {Number} index The index of the button to focus 560 */ 561 function focusButton(index) { 562 var button = that._elements["button"][index]; 563 button.focus(); 564 } 565 } 566 567 /** 568 * Reads options data from the Accordion wrapper element, defined via {@code data-cmp-*} data attributes. 569 * 570 * @private 571 * @param {HTMLElement} element The Accordion element to read options data from 572 * @returns {Object} The options read from the component data attributes 573 */ 574 function readData(element) { 575 var data = element.dataset; 576 var options = []; 577 var capitalized = IS; 578 capitalized = capitalized.charAt(0).toUpperCase() + capitalized.slice(1); 579 var reserved = ["is", "hook" + capitalized]; 580 581 for (var key in data) { 582 if (Object.prototype.hasOwnProperty.call(data, key)) { 583 var value = data[key]; 584 585 if (key.indexOf(NS) === 0) { 586 key = key.slice(NS.length); 587 key = key.charAt(0).toLowerCase() + key.substring(1); 588 589 if (reserved.indexOf(key) === -1) { 590 options[key] = value; 591 } 592 } 593 } 594 } 595 596 return options; 597 } 598 599 /** 600 * Parses the dataLayer string and returns the ID 601 * 602 * @private 603 * @param {HTMLElement} item the accordion item 604 * @returns {String} dataLayerId or undefined 605 */ 606 function getDataLayerId(item) { 607 if (item) { 608 if (item.dataset.cmpDataLayer) { 609 return Object.keys(JSON.parse(item.dataset.cmpDataLayer))[0]; 610 } else { 611 return item.id; 612 } 613 } 614 return null; 615 } 616 617 /** 618 * Document ready handler and DOM mutation observers. Initializes Accordion components as necessary. 619 * 620 * @private 621 */ 622 function onDocumentReady() { 623 dataLayerEnabled = document.body.hasAttribute("data-cmp-data-layer-enabled"); 624 if (dataLayerEnabled) { 625 dataLayerName = document.body.getAttribute("data-cmp-data-layer-name") || "adobeDataLayer"; 626 dataLayer = window[dataLayerName] = window[dataLayerName] || []; 627 } 628 629 var elements = document.querySelectorAll(selectors.self); 630 for (var i = 0; i < elements.length; i++) { 631 new Accordion({ element: elements[i], options: readData(elements[i]) }); 632 } 633 634 var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; 635 var body = document.querySelector("body"); 636 var observer = new MutationObserver(function(mutations) { 637 mutations.forEach(function(mutation) { 638 // needed for IE 639 var nodesArray = [].slice.call(mutation.addedNodes); 640 if (nodesArray.length > 0) { 641 nodesArray.forEach(function(addedNode) { 642 if (addedNode.querySelectorAll) { 643 var elementsArray = [].slice.call(addedNode.querySelectorAll(selectors.self)); 644 elementsArray.forEach(function(element) { 645 new Accordion({ element: element, options: readData(element) }); 646 }); 647 } 648 }); 649 } 650 }); 651 }); 652 653 observer.observe(body, { 654 subtree: true, 655 childList: true, 656 characterData: true 657 }); 658 } 659 660 if (document.readyState !== "loading") { 661 onDocumentReady(); 662 } else { 663 document.addEventListener("DOMContentLoaded", onDocumentReady); 664 } 665 666 if (containerUtils) { 667 window.addEventListener("load", containerUtils.scrollToAnchor, false); 668 } 669 670}()); 671 672 673/******************************************************************************* 674 * Copyright 2018 Adobe 675 * 676 * Licensed under the Apache License, Version 2.0 (the "License");
677 * you may not use this file except in compliance with the License. 678 * You may obtain a copy of the License at 679 * 680 * http://www.apache.org/licenses/LICENSE2.0 681 * 682 * Unless required by applicable law or agreed to in writing, software 683 * distributed under the License is distributed on an "AS IS" BASIS, 684 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 685 * See the License for the specific language governing permissions and 686 * limitations under the License. 687 ******************************************************************************/ 688 689/** 690 * Element.matches() 691 * https://developer.mozilla.org/enUS/docs/Web/API/Element/matches#Polyfill 692 */ 693if (!Element.prototype.matches) { 694 Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; 695} 696 697// eslint-disable-next-line valid-jsdoc 698/** 699 * Element.closest() 700 * https://developer.mozilla.org/enUS/docs/Web/API/Element/closest#Polyfill 701 */ 702if (!Element.prototype.closest) { 703 Element.prototype.closest = function(s) { 704 "use strict"; 705 var el = this; 706 if (!document.documentElement.contains(el)) { 707 return null; 708 } 709 do { 710 if (el.matches(s)) { 711 return el; 712 } 713 el = el.parentElement || el.parentNode; 714 } while (el !== null && el.nodeType === 1); 715 return null; 716 }; 717} 718 719/******************************************************************************* 720 * Copyright 2018 Adobe 721 * 722 * Licensed under the Apache License, Version 2.0 (the "License"); 723 * you may not use this file except in compliance with the License. 724 * You may obtain a copy of the License at 725 * 726 * http://www.apache.org/licenses/LICENSE-2.0 727 * 728 * Unless required by applicable law or agreed to in writing, software 729 * distributed under the License is distributed on an "AS IS" BASIS, 730 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 731 * See the License for the specific language governing permissions and 732 * limitations under the License. 733 ******************************************************************************/ 734/* global 735 CQ 736 */ 737(function() { 738 "use strict"; 739 740 var containerUtils = window.CQ && window.CQ.CoreComponents && window.CQ.CoreComponents.container && window.CQ.CoreComponents.container.utils ? window.CQ.CoreComponents.container.utils : undefined; 741 if (!containerUtils) { 742 // eslint-disable-next-line no-console 743 console.warn("Tabs: container utilities at window.CQ.CoreComponents.container.utils are not available. This can lead to missing features. Ensure the core.wcm.components.commons.site.container client library is included on the page."); 744 } 745 var dataLayerEnabled; 746 var dataLayer; 747 var dataLayerName; 748 749 var NS = "cmp"; 750 var IS = "tabs"; 751 752 var keyCodes = { 753 END: 35, 754 HOME: 36, 755 ARROW_LEFT: 37, 756 ARROW_UP: 38, 757 ARROW_RIGHT: 39, 758 ARROW_DOWN: 40 759 }; 760 761 var selectors = { 762 self: "[data-" + NS + '-is="' + IS + '"]', 763 active: { 764 tab: "cmp-tabs__tab--active", 765 tabpanel: "cmp-tabs__tabpanel--active" 766 } 767 }; 768 769 /** 770 * Tabs Configuration 771 * 772 * @typedef {Object} TabsConfig Represents a Tabs configuration 773 * @property {HTMLElement} element The HTMLElement representing the Tabs 774 * @property {Object} options The Tabs options 775 */ 776 777 /** 778 * Tabs 779 * 780 * @class Tabs 781 * @classdesc An interactive Tabs component for navigating a list of tabs 782 * @param {TabsConfig} config The Tabs configuration 783 */ 784 function Tabs(config) { 785 var that = this; 786 787 if (config && config.element) { 788 init(config); 789 } 790 791 /** 792 * Initializes the Tabs 793 * 794 * @private 795 * @param {TabsConfig} config The Tabs configuration 796 */ 797 function init(config) { 798 that._config = config; 799 800 // prevents multiple initialization 801 config.element.removeAttribute("data-" + NS + "-is"); 802 803 cacheElements(config.element); 804 that._active = getActiveIndex(that._elements["tab"]); 805 806 if (that._elements.tabpanel) { 807 refreshActive(); 808 bindEvents(); 809 scrollToDeepLinkIdInTabs(); 810 } 811 812 if (window.Granite && window.Granite.author && window.Granite.author.MessageChannel) { 813 /* 814 * Editor message handling: 815 * - subscribe to "cmp.panelcontainer" message requests sent by the editor frame
816 * - check that the message data panel container type is correct and that the id (path) matches this specific Tabs component 817 * - if so, route the "navigate" operation to enact a navigation of the Tabs based on index data 818 */ 819 CQ.CoreComponents.MESSAGE_CHANNEL = CQ.CoreComponents.MESSAGE_CHANNEL || new window.Granite.author.MessageChannel("cqauthor", window); 820 CQ.CoreComponents.MESSAGE_CHANNEL.subscribeRequestMessage("cmp.panelcontainer", function(message) { 821 if (message.data && message.data.type === "cmp-tabs" && message.data.id === that._elements.self.dataset["cmpPanelcontainerId"]) { 822 if (message.data.operation === "navigate") { 823 navigate(message.data.index); 824 } 825 } 826 }); 827 } 828 } 829 830 /** 831 * Displays the panel containing the element that corresponds to the deep link in the URI fragment 832 * and scrolls the browser to this element. 833 */ 834 function scrollToDeepLinkIdInTabs() { 835 if (containerUtils) { 836 var deepLinkItemIdx = containerUtils.getDeepLinkItemIdx(that, "tab", "tabpanel"); 837 if (deepLinkItemIdx > -1) { 838 var deepLinkItem = that._elements["tab"][deepLinkItemIdx]; 839 if (deepLinkItem && that._elements["tab"][that._active].id !== deepLinkItem.id) { 840 navigateAndFocusTab(deepLinkItemIdx, true); 841 } 842 var hashId = window.location.hash.substring(1); 843 if (hashId) { 844 var hashItem = document.querySelector("[id='" + hashId + "']"); 845 if (hashItem) { 846 hashItem.scrollIntoView(); 847 } 848 } 849 } 850 } 851 } 852 853 /** 854 * Returns the index of the active tab, if no tab is active returns 0 855 * 856 * @param {Array} tabs Tab elements 857 * @returns {Number} Index of the active tab, 0 if none is active 858 */ 859 function getActiveIndex(tabs) { 860 if (tabs) { 861 for (var i = 0; i < tabs.length; i++) { 862 if (tabs[i].classList.contains(selectors.active.tab)) { 863 return i; 864 } 865 } 866 } 867 return 0; 868 } 869 870 /** 871 * Caches the Tabs elements as defined via the {@code data-tabs-hook="ELEMENT_NAME"} markup API 872 * 873 * @private 874 * @param {HTMLElement} wrapper The Tabs wrapper element 875 */ 876 function cacheElements(wrapper) { 877 that._elements = {}; 878 that._elements.self = wrapper; 879 var hooks = that._elements.self.querySelectorAll("[data-" + NS + "-hook-" + IS + "]"); 880 881 for (var i = 0; i < hooks.length; i++) { 882 var hook = hooks[i]; 883 if (hook.closest("." + NS + "-" + IS) === that._elements.self) { // only process own tab elements 884 var capitalized = IS; 885 capitalized = capitalized.charAt(0).toUpperCase() + capitalized.slice(1); 886 var key = hook.dataset[NS + "Hook" + capitalized]; 887 if (that._elements[key]) { 888 if (!Array.isArray(that._elements[key])) { 889 var tmp = that._elements[key]; 890 that._elements[key] = [tmp]; 891 } 892 that._elements[key].push(hook); 893 } else { 894 that._elements[key] = hook; 895 } 896 } 897 } 898 } 899 900 /** 901 * Binds Tabs event handling 902 * 903 * @private 904 */ 905 function bindEvents() { 906 window.addEventListener("hashchange", scrollToDeepLinkIdInTabs, false); 907 var tabs = that._elements["tab"]; 908 if (tabs) { 909 for (var i = 0; i < tabs.length; i++) { 910 (function(index) { 911 tabs[i].addEventListener("click", function(event) { 912 navigateAndFocusTab(index); 913 }); 914 tabs[i].addEventListener("keydown", function(event) { 915 onKeyDown(event); 916 }); 917 })(i); 918 } 919 } 920 } 921 922 /** 923 * Handles tab keydown events 924 * 925 * @private 926 * @param {Object} event The keydown event 927 */ 928 function onKeyDown(event) { 929 var index = that._active; 930 var lastIndex = that._elements["tab"].length - 1; 931 932 switch (event.keyCode) { 933 case keyCodes.ARROW_LEFT: 934 case keyCodes.ARROW_UP: 935 event.preventDefault(); 936 if (index > 0) { 937 navigateAndFocusTab(index - 1); 938 } 939 break; 940 case keyCodes.ARROW_RIGHT: 941 case keyCodes.ARROW_DOWN: 942 event.preventDefault(); 943 if (index < lastIndex) { 944 navigateAndFocusTab(index + 1); 945 } 946 break; 947 case keyCodes.HOME: 948 event.preventDefault(); 949 navigateAndFocusTab(0); 950 break; 951 case keyCodes.END: 952 event.preventDefault(); 953 navigateAndFocusTab(lastIndex); 954 break; 955 default: 956 return; 957 } 958 } 959 960 /** 961 * Refreshes the tab markup based on the current {@code Tabs#_active} index 962 * 963 * @private 964 */ 965 function refreshActive() { 966 var tabpanels = that._elements["tabpanel"]; 967 var tabs = that._elements["tab"]; 968 969 if (tabpanels) { 970 if (Array.isArray(tabpanels)) { 971 for (var i = 0; i < tabpanels.length; i++) { 972 if (i === parseInt(that._active)) { 973 tabpanels[i].classList.add(selectors.active.tabpanel); 974 tabpanels[i].removeAttribute("aria-hidden"); 975 tabs[i].classList.add(selectors.active.tab); 976 tabs[i].setAttribute("aria-selected", true); 977 tabs[i].setAttribute("tabindex", "0"); 978 } else { 979 tabpanels[i].classList.remove(selectors.active.tabpanel); 980 tabpanels[i].setAttribute("aria-hidden", true); 981 tabs[i].classList.remove(selectors.active.tab); 982 tabs[i].setAttribute("aria-selected", false); 983 tabs[i].setAttribute("tabindex", "-1"); 984 } 985 } 986 } else { 987 // only one tab 988 tabpanels.classList.add(selectors.active.tabpanel); 989 tabs.classList.add(selectors.active.tab); 990 } 991 } 992 } 993 994 /** 995 * Focuses the element and prevents scrolling the element into view 996 * 997 * @param {HTMLElement} element Element to focus 998 */ 999 function focusWithoutScroll(element) { 1000 var x = window.scrollX || window.pageXOffset; 1001 var y = window.scrollY || window.pageYOffset; 1002 element.focus(); 1003 window.scrollTo(x, y); 1004 } 1005 1006 /** 1007 * Navigates to the tab at the provided index 1008 * 1009 * @private 1010 * @param {Number} index The index of the tab to navigate to 1011 */ 1012 function navigate(index) { 1013 that._active = index; 1014 refreshActive(); 1015 } 1016 1017 /** 1018 * Navigates to the item at the provided index and ensures the active tab gains focus 1019 * 1020 * @private 1021 * @param {Number} index The index of the item to navigate to 1022 * @param {Boolean} keepHash true to keep the hash in the URL, false to update it 1023 */ 1024 function navigateAndFocusTab(index, keepHash) { 1025 var exActive = that._active; 1026 if (!keepHash && containerUtils) { 1027 containerUtils.updateUrlHash(that, "tab", index); 1028 } 1029 navigate(index); 1030 focusWithoutScroll(that._elements["tab"][index]); 1031 1032 if (dataLayerEnabled) { 1033 1034 var activeItem = getDataLayerId(that._elements.tabpanel[index]); 1035 var exActiveItem = getDataLayerId(that._elements.tabpanel[exActive]); 1036 1037 dataLayer.push({ 1038 event: "cmp:show", 1039 eventInfo: { 1040 path: "component." + activeItem 1041 } 1042 }); 1043 1044 dataLayer.push({ 1045 event: "cmp:hide", 1046 eventInfo: { 1047 path: "component." + exActiveItem 1048 } 1049 }); 1050 1051 var tabsId = that._elements.self.id; 1052 var uploadPayload = { component: {} }; 1053 uploadPayload.component[tabsId] = { shownItems: [activeItem] }; 1054 1055 var removePayload = { component: {} }; 1056 removePayload.component[tabsId] = { shownItems: undefined }; 1057 1058 dataLayer.push(removePayload); 1059 dataLayer.push(uploadPayload); 1060 } 1061 } 1062 } 1063 1064 /**
1065 * Reads options data from the Tabs wrapper element, defined via {@code data-cmp-*} data attributes 1066 * 1067 * @private 1068 * @param {HTMLElement} element The Tabs element to read options data from 1069 * @returns {Object} The options read from the component data attributes 1070 */ 1071 function readData(element) { 1072 var data = element.dataset; 1073 var options = []; 1074 var capitalized = IS; 1075 capitalized = capitalized.charAt(0).toUpperCase() + capitalized.slice(1); 1076 var reserved = ["is", "hook" + capitalized]; 1077 1078 for (var key in data) { 1079 if (Object.prototype.hasOwnProperty.call(data, key)) { 1080 var value = data[key]; 1081 1082 if (key.indexOf(NS) === 0) { 1083 key = key.slice(NS.length); 1084 key = key.charAt(0).toLowerCase() + key.substring(1); 1085 1086 if (reserved.indexOf(key) === -1) { 1087 options[key] = value; 1088 } 1089 } 1090 } 1091 } 1092 1093 return options; 1094 } 1095 1096 /** 1097 * Parses the dataLayer string and returns the ID 1098 * 1099 * @private 1100 * @param {HTMLElement} item the accordion item 1101 * @returns {String} dataLayerId or undefined 1102 */ 1103 function getDataLayerId(item) { 1104 if (item) { 1105 if (item.dataset.cmpDataLayer) { 1106 return Object.keys(JSON.parse(item.dataset.cmpDataLayer))[0]; 1107 } else { 1108 return item.id; 1109 } 1110 } 1111 return null; 1112 } 1113 1114 /** 1115 * Document ready handler and DOM mutation observers. Initializes Tabs components as necessary. 1116 * 1117 * @private 1118 */ 1119 function onDocumentReady() { 1120 dataLayerEnabled = document.body.hasAttribute("data-cmp-data-layer-enabled"); 1121 if (dataLayerEnabled) { 1122 dataLayerName = document.body.getAttribute("data-cmp-data-layer-name") || "adobeDataLayer"; 1123 dataLayer = window[dataLayerName] = window[dataLayerName] || []; 1124 } 1125 1126 var elements = document.querySelectorAll(selectors.self); 1127 for (var i = 0; i < elements.length; i++) { 1128 new Tabs({ element: elements[i], options: readData(elements[i]) }); 1129 } 1130 1131 var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; 1132 var body = document.querySelector("body"); 1133 var observer = new MutationObserver(function(mutations) { 1134 mutations.forEach(function(mutation) { 1135 // needed for IE 1136 var nodesArray = [].slice.call(mutation.addedNodes); 1137 if (nodesArray.length > 0) { 1138 nodesArray.forEach(function(addedNode) { 1139 if (addedNode.querySelectorAll) { 1140 var elementsArray = [].slice.call(addedNode.querySelectorAll(selectors.self)); 1141 elementsArray.forEach(function(element) { 1142 new Tabs({ element: element, options: readData(element) }); 1143 }); 1144 } 1145 }); 1146 } 1147 }); 1148 }); 1149 1150 observer.observe(body, { 1151 subtree: true, 1152 childList: true, 1153 characterData: true 1154 }); 1155 } 1156 1157 if (document.readyState !== "loading") { 1158 onDocumentReady(); 1159 } else { 1160 document.addEventListener("DOMContentLoaded", onDocumentReady); 1161 } 1162 1163 if (containerUtils) { 1164 window.addEventListener("load", containerUtils.scrollToAnchor, false); 1165 } 1166 1167}()); 1168 1169 1170/******************************************************************************* 1171 * Copyright 2022 Adobe 1172 * 1173 * Licensed under the Apache License, Version 2.0 (the "License"); 1174 * you may not use this file except in compliance with the License. 1175 * You may obtain a copy of the License at 1176 * 1177 * http://www.apache.org/licenses/LICENSE-2.0 1178 * 1179 * Unless required by applicable law or agreed to in writing, software 1180 * distributed under the License is distributed on an "AS IS" BASIS, 1181 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1182 * See the License for the specific language governing permissions and 1183 * limitations under the License. 1184 ******************************************************************************/ 1185(function(document) { 1186 "use strict"; 1187 1188 window.CMP = window.CMP || {}; 1189 window.CMP.utils = (function() { 1190 var NS = "cmp"; 1191 1192 /**
1193 * Reads options data from the Component wrapper element, defined via {@code data-cmp-*} data attributes 1194 * 1195 * @param {HTMLElement} element The component element to read options data from 1196 * @param {String} is The component identifier 1197 * @returns {String[]} The options read from the component data attributes 1198 */ 1199 var readData = function(element, is) { 1200 var data = element.dataset; 1201 var options = []; 1202 var capitalized = is; 1203 capitalized = capitalized.charAt(0).toUpperCase() + capitalized.slice(1); 1204 var reserved = ["is", "hook" + capitalized]; 1205 1206 for (var key in data) { 1207 if (Object.prototype.hasOwnProperty.call(data, key)) { 1208 var value = data[key]; 1209 1210 if (key.indexOf(NS) === 0) { 1211 key = key.slice(NS.length); 1212 key = key.charAt(0).toLowerCase() + key.substring(1); 1213 1214 if (reserved.indexOf(key) === -1) { 1215 options[key] = value; 1216 } 1217 } 1218 } 1219 } 1220 return options; 1221 }; 1222 1223 /** 1224 * Set up the final properties of a component by evaluating the transform function or fall back to the default value on demand 1225 * @param {String[]} options the options to transform 1226 * @param {Object} properties object of properties of property functions 1227 * @returns {Object} transformed properties 1228 */ 1229 var setupProperties = function(options, properties) { 1230 var transformedProperties = {}; 1231 1232 for (var key in properties) { 1233 if (Object.prototype.hasOwnProperty.call(properties, key)) { 1234 var property = properties[key]; 1235 if (options && options[key] != null) { 1236 if (property && typeof property.transform === "function") { 1237 transformedProperties[key] = property.transform(options[key]); 1238 } else { 1239 transformedProperties[key] = options[key]; 1240 } 1241 } else { 1242 transformedProperties[key] = properties[key]["default"]; 1243 } 1244 } 1245 } 1246 return transformedProperties; 1247 }; 1248 1249 1250 return { 1251 readData: readData, 1252 setupProperties: setupProperties 1253 }; 1254 }()); 1255}(window.document)); 1256 1257/******************************************************************************* 1258 * Copyright 2018 Adobe 1259 * 1260 * Licensed under the Apache License, Version 2.0 (the "License"); 1261 * you may not use this file except in compliance with the License. 1262 * You may obtain a copy of the License at 1263 * 1264 * http://www.apache.org/licenses/LICENSE-2.0 1265 * 1266 * Unless required by applicable law or agreed to in writing, software 1267 * distributed under the License is distributed on an "AS IS" BASIS, 1268 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1269 * See the License for the specific language governing permissions and 1270 * limitations under the License. 1271 ******************************************************************************/ 1272(function() { 1273 "use strict"; 1274 1275 var containerUtils = window.CQ && window.CQ.CoreComponents && window.CQ.CoreComponents.container && window.CQ.CoreComponents.container.utils ? window.CQ.CoreComponents.container.utils : undefined; 1276 if (!containerUtils) { 1277 // eslint-disable-next-line no-console 1278 console.warn("Tabs: container utilities at window.CQ.CoreComponents.container.utils are not available. This can lead to missing features. Ensure the core.wcm.components.commons.site.container client library is included on the page."); 1279 } 1280 var dataLayerEnabled; 1281 var dataLayer; 1282 var dataLayerName; 1283 1284 var NS = "cmp"; 1285 var IS = "carousel"; 1286 1287 var keyCodes = { 1288 SPACE: 32, 1289 END: 35, 1290 HOME: 36, 1291 ARROW_LEFT: 37, 1292 ARROW_UP: 38, 1293 ARROW_RIGHT: 39, 1294 ARROW_DOWN: 40 1295 }; 1296 1297 var selectors = { 1298 self: "[data-" + NS + '-is="' + IS + '"]' 1299 }; 1300 1301 var properties = { 1302 /** 1303 * Determines whether the Carousel will automatically transition between slides 1304 * 1305 * @memberof Carousel
1306 * @type {Boolean} 1307 * @default false 1308 */ 1309 "autoplay": { 1310 "default": false, 1311 "transform": function(value) { 1312 return !(value === null || typeof value === "undefined"); 1313 } 1314 }, 1315 /** 1316 * Duration (in milliseconds) before automatically transitioning to the next slide 1317 * 1318 * @memberof Carousel 1319 * @type {Number} 1320 * @default 5000 1321 */ 1322 "delay": { 1323 "default": 5000, 1324 "transform": function(value) { 1325 value = parseFloat(value); 1326 return !isNaN(value) ? value : null; 1327 } 1328 }, 1329 /** 1330 * Determines whether automatic pause on hovering the carousel is disabled 1331 * 1332 * @memberof Carousel 1333 * @type {Boolean} 1334 * @default false 1335 */ 1336 "autopauseDisabled": { 1337 "default": false, 1338 "transform": function(value) { 1339 return !(value === null || typeof value === "undefined"); 1340 } 1341 } 1342 }; 1343 1344 /** 1345 * Carousel Configuration 1346 * 1347 * @typedef {Object} CarouselConfig Represents a Carousel configuration 1348 * @property {HTMLElement} element The HTMLElement representing the Carousel 1349 * @property {*[]} options The Carousel options 1350 */ 1351 1352 /** 1353 * Carousel 1354 * 1355 * @class Carousel 1356 * @classdesc An interactive Carousel component for navigating a list of generic items 1357 * @param {CarouselConfig} config The Carousel configuration 1358 */ 1359 function Carousel(config) { 1360 var that = this; 1361 1362 if (config && config.element) { 1363 init(config); 1364 } 1365 1366 /** 1367 * Initializes the Carousel 1368 * 1369 * @private 1370 * @param {CarouselConfig} config The Carousel configuration 1371 */ 1372 function init(config) { 1373 that._config = config; 1374 1375 // prevents multiple initialization 1376 config.element.removeAttribute("data-" + NS + "-is"); 1377 1378 setupProperties(config.options); 1379 cacheElements(config.element); 1380 1381 that._active = 0; 1382 that._paused = false; 1383 1384 if (that._elements.item) { 1385 initializeActive(); 1386 bindEvents(); 1387 resetAutoplayInterval(); 1388 refreshPlayPauseActions(); 1389 scrollToDeepLinkIdInCarousel(); 1390 } 1391 1392 // TODO: This section is only relevant in edit mode and should move to the editor clientLib 1393 if (window.Granite && window.Granite.author && window.Granite.author.MessageChannel) { 1394 /* 1395 * Editor message handling: 1396 * - subscribe to "cmp.panelcontainer" message requests sent by the editor frame 1397 * - check that the message data panel container type is correct and that the id (path) matches this specific Carousel component 1398 * - if so, route the "navigate" operation to enact a navigation of the Carousel based on index data 1399 */ 1400 window.CQ = window.CQ || {}; 1401 window.CQ.CoreComponents = window.CQ.CoreComponents || {}; 1402 window.CQ.CoreComponents.MESSAGE_CHANNEL = window.CQ.CoreComponents.MESSAGE_CHANNEL || new window.Granite.author.MessageChannel("cqauthor", window); 1403 window.CQ.CoreComponents.MESSAGE_CHANNEL.subscribeRequestMessage("cmp.panelcontainer", function(message) { 1404 if (message.data && message.data.type === "cmp-carousel" && message.data.id === that._elements.self.dataset["cmpPanelcontainerId"]) { 1405 if (message.data.operation === "navigate") { 1406 navigate(message.data.index); 1407 } 1408 } 1409 }); 1410 } 1411 } 1412 1413 /** 1414 * Displays the slide containing the element that corresponds to the deep link in the URI fragment 1415 * and scrolls the browser to this element. 1416 */ 1417 function scrollToDeepLinkIdInCarousel() { 1418 if (containerUtils) { 1419 var deepLinkItemIdx = containerUtils.getDeepLinkItemIdx(that, "item", "item"); 1420 if (deepLinkItemIdx > -1) { 1421 var deepLinkItem = that._elements["item"][deepLinkItemIdx]; 1422 if (deepLinkItem && that._elements["item"][that._active].id !== deepLinkItem.id) { 1423 navigateAndFocusIndicator(deepLinkItemIdx, true); 1424 // pause the carousel auto-rotation 1425 pause(); 1426 } 1427 var hashId = window.location.hash.substring(1); 1428 if (hashId) { 1429 var hashItem = document.querySelector("[id='" + hashId + "']"); 1430 if (hashItem) { 1431 hashItem.scrollIntoView(); 1432 } 1433 } 1434 } 1435 } 1436 } 1437 1438 /** 1439 * Caches the Carousel elements as defined via the {@code data-carousel-hook="ELEMENT_NAME"} markup API 1440 * 1441 * @private 1442 * @param {HTMLElement} wrapper The Carousel wrapper element 1443 */ 1444 function cacheElements(wrapper) { 1445 that._elements = {}; 1446 that._elements.self = wrapper; 1447 var hooks = that._elements.self.querySelectorAll("[data-" + NS + "-hook-" + IS + "]"); 1448 1449 for (var i = 0; i < hooks.length; i++) { 1450 var hook = hooks[i]; 1451 var capitalized = IS; 1452 capitalized = capitalized.charAt(0).toUpperCase() + capitalized.slice(1); 1453 var key = hook.dataset[NS + "Hook" + capitalized]; 1454 if (that._elements[key]) { 1455 if (!Array.isArray(that._elements[key])) { 1456 var tmp = that._elements[key]; 1457 that._elements[key] = [tmp]; 1458 } 1459 that._elements[key].push(hook); 1460 } else { 1461 that._elements[key] = hook; 1462 } 1463 } 1464 } 1465 1466 /** 1467 * Sets up properties for the Carousel based on the passed options. 1468 * 1469 * @private 1470 * @param {Object} options The Carousel options 1471 */ 1472 function setupProperties(options) { 1473 that._properties = {}; 1474 1475 for (var key in properties) { 1476 if (Object.prototype.hasOwnProperty.call(properties, key)) { 1477 var property = properties[key]; 1478 var value = null; 1479 1480 if (options && options[key] != null) { 1481 value = options[key]; 1482 1483 // transform the provided option 1484 if (property && typeof property.transform === "function") { 1485 value = property.transform(value); 1486 } 1487 } 1488 1489 if (value === null) { 1490 // value still null, take the property default 1491 value = properties[key]["default"]; 1492 } 1493 1494 that._properties[key] = value; 1495 } 1496 } 1497 } 1498 1499 /** 1500 * Binds Carousel event handling 1501 * 1502 * @private 1503 */ 1504 function bindEvents() { 1505 window.addEventListener("hashchange", scrollToDeepLinkIdInCarousel, false); 1506 if (that._elements["previous"]) { 1507 that._elements["previous"].addEventListener("click", function() { 1508 var index = getPreviousIndex(); 1509 navigate(index); 1510 if (dataLayerEnabled) { 1511 dataLayer.push({ 1512 event: "cmp:show", 1513 eventInfo: { 1514 path: "component." + getDataLayerId(that._elements.item[index]) 1515 } 1516 }); 1517 } 1518 }); 1519 } 1520 1521 if (that._elements["next"]) { 1522 that._elements["next"].addEventListener("click", function() { 1523 var index = getNextIndex(); 1524 navigate(index); 1525 if (dataLayerEnabled) { 1526 dataLayer.push({ 1527 event: "cmp:show", 1528 eventInfo: { 1529 path: "component." + getDataLayerId(that._elements.item[index]) 1530 } 1531 }); 1532 } 1533 }); 1534 } 1535 1536 var indicators = that._elements["indicator"]; 1537 if (indicators) { 1538 for (var i = 0; i < indicators.length; i++) { 1539 (function(index) { 1540 indicators[i].addEventListener("click", function(event) { 1541 navigateAndFocusIndicator(index); 1542 // pause the carousel auto-rotation 1543 pause(); 1544 }); 1545 })(i); 1546 } 1547 } 1548 1549 if (that._elements["pause"]) { 1550 if (that._properties.autoplay) { 1551 that._elements["pause"].addEventListener("click", onPauseClick); 1552 } 1553 } 1554 1555 if (that._elements["play"]) { 1556 if (that._properties.autoplay) { 1557 that._elements["play"].addEventListener("click", onPlayClick); 1558 } 1559 } 1560 1561 that._elements.self.addEventListener("keydown", onKeyDown); 1562 1563 if (!that._properties.autopauseDisabled) { 1564 that._elements.self.addEventListener("mouseenter", onMouseEnter); 1565 that._elements.self.addEventListener("mouseleave", onMouseLeave); 1566 } 1567 1568 // for accessibility we pause animation when a element get focused 1569 var items = that._elements["item"]; 1570 if (items) { 1571 for (var j = 0; j < items.length; j++) { 1572 items[j].addEventListener("focusin", onMouseEnter); 1573 items[j].addEventListener("focusout", onMouseLeave); 1574 } 1575 } 1576 } 1577 1578 /**
1579 * Handles carousel keydown events 1580 * 1581 * @private 1582 * @param {Object} event The keydown event 1583 */ 1584 function onKeyDown(event) { 1585 var index = that._active; 1586 var lastIndex = that._elements["indicator"].length - 1; 1587 1588 switch (event.keyCode) { 1589 case keyCodes.ARROW_LEFT: 1590 case keyCodes.ARROW_UP: 1591 event.preventDefault(); 1592 if (index > 0) { 1593 navigateAndFocusIndicator(index - 1); 1594 } 1595 break; 1596 case keyCodes.ARROW_RIGHT: 1597 case keyCodes.ARROW_DOWN: 1598 event.preventDefault(); 1599 if (index < lastIndex) { 1600 navigateAndFocusIndicator(index + 1); 1601 } 1602 break; 1603 case keyCodes.HOME: 1604 event.preventDefault(); 1605 navigateAndFocusIndicator(0); 1606 break; 1607 case keyCodes.END: 1608 event.preventDefault(); 1609 navigateAndFocusIndicator(lastIndex); 1610 break; 1611 case keyCodes.SPACE: 1612 if (that._properties.autoplay && (event.target !== that._elements["previous"] && event.target !== that._elements["next"])) { 1613 event.preventDefault(); 1614 if (!that._paused) { 1615 pause(); 1616 } else { 1617 play(); 1618 } 1619 } 1620 if (event.target === that._elements["pause"]) { 1621 that._elements["play"].focus(); 1622 } 1623 if (event.target === that._elements["play"]) { 1624 that._elements["pause"].focus(); 1625 } 1626 break; 1627 default: 1628 return; 1629 } 1630 } 1631 1632 /** 1633 * Handles carousel mouseenter events 1634 * 1635 * @private 1636 * @param {Object} event The mouseenter event 1637 */ 1638 function onMouseEnter(event) { 1639 clearAutoplayInterval(); 1640 } 1641 1642 /** 1643 * Handles carousel mouseleave events 1644 * 1645 * @private 1646 * @param {Object} event The mouseleave event 1647 */ 1648 function onMouseLeave(event) { 1649 resetAutoplayInterval(); 1650 } 1651 1652 /** 1653 * Handles pause element click events 1654 * 1655 * @private 1656 * @param {Object} event The click event 1657 */ 1658 function onPauseClick(event) { 1659 pause(); 1660 that._elements["play"].focus(); 1661 } 1662 1663 /** 1664 * Handles play element click events 1665 * 1666 * @private 1667 * @param {Object} event The click event 1668 */ 1669 function onPlayClick() { 1670 play(); 1671 that._elements["pause"].focus(); 1672 } 1673 1674 /** 1675 * Pauses the playing of the Carousel. Sets {@code Carousel#_paused} marker. 1676 * Only relevant when autoplay is enabled 1677 * 1678 * @private 1679 */ 1680 function pause() { 1681 that._paused = true; 1682 clearAutoplayInterval(); 1683 refreshPlayPauseActions(); 1684 } 1685 1686 /** 1687 * Enables the playing of the Carousel. Sets {@code Carousel#_paused} marker. 1688 * Only relevant when autoplay is enabled 1689 * 1690 * @private 1691 */ 1692 function play() { 1693 that._paused = false; 1694 1695 // If the Carousel is hovered, don't begin auto transitioning until the next mouse leave event 1696 var hovered = false; 1697 if (that._elements.self.parentElement) { 1698 hovered = that._elements.self.parentElement.querySelector(":hover") === that._elements.self; 1699 } 1700 if (that._properties.autopauseDisabled || !hovered) { 1701 resetAutoplayInterval(); 1702 } 1703 1704 refreshPlayPauseActions(); 1705 } 1706 1707 /** 1708 * Refreshes the play/pause action markup based on the {@code Carousel#_paused} state 1709 * 1710 * @private 1711 */ 1712 function refreshPlayPauseActions() {
1713 setActionDisabled(that._elements["pause"], that._paused); 1714 setActionDisabled(that._elements["play"], !that._paused); 1715 } 1716 1717 /** 1718 * Initialize {@code Carousel#_active} based on the active item of the carousel. 1719 */ 1720 function initializeActive() { 1721 var items = that._elements["item"]; 1722 if (items && Array.isArray(items)) { 1723 for (var i = 0; i < items.length; i++) { 1724 if (items[i].classList.contains("cmp-carousel__item--active")) { 1725 that._active = i; 1726 break; 1727 } 1728 } 1729 } 1730 } 1731 1732 /** 1733 * Refreshes the item markup based on the current {@code Carousel#_active} index 1734 * 1735 * @private 1736 */ 1737 function refreshActive() { 1738 var items = that._elements["item"]; 1739 var indicators = that._elements["indicator"]; 1740 1741 if (items) { 1742 if (Array.isArray(items)) { 1743 for (var i = 0; i < items.length; i++) { 1744 if (i === parseInt(that._active)) { 1745 items[i].classList.add("cmp-carousel__item--active"); 1746 items[i].removeAttribute("aria-hidden"); 1747 indicators[i].classList.add("cmp-carousel__indicator--active"); 1748 indicators[i].setAttribute("aria-selected", true); 1749 indicators[i].setAttribute("tabindex", "0"); 1750 } else { 1751 items[i].classList.remove("cmp-carousel__item--active"); 1752 items[i].setAttribute("aria-hidden", true); 1753 indicators[i].classList.remove("cmp-carousel__indicator--active"); 1754 indicators[i].setAttribute("aria-selected", false); 1755 indicators[i].setAttribute("tabindex", "-1"); 1756 } 1757 } 1758 } else { 1759 // only one item 1760 items.classList.add("cmp-carousel__item--active"); 1761 indicators.classList.add("cmp-carousel__indicator--active"); 1762 } 1763 } 1764 } 1765 1766 /** 1767 * Focuses the element and prevents scrolling the element into view 1768 * 1769 * @param {HTMLElement} element Element to focus 1770 */ 1771 function focusWithoutScroll(element) { 1772 var x = window.scrollX || window.pageXOffset; 1773 var y = window.scrollY || window.pageYOffset; 1774 element.focus(); 1775 window.scrollTo(x, y); 1776 } 1777 1778 /** 1779 * Retrieves the next active index, with looping 1780 * 1781 * @private 1782 * @returns {Number} Index of the next carousel item 1783 */ 1784 function getNextIndex() { 1785 return that._active === (that._elements["item"].length - 1) ? 0 : that._active + 1; 1786 } 1787 1788 /** 1789 * Retrieves the previous active index, with looping 1790 * 1791 * @private 1792 * @returns {Number} Index of the previous carousel item 1793 */ 1794 function getPreviousIndex() { 1795 return that._active === 0 ? (that._elements["item"].length - 1) : that._active - 1; 1796 } 1797 1798 /** 1799 * Navigates to the item at the provided index 1800 * 1801 * @private 1802 * @param {Number} index The index of the item to navigate to 1803 * @param {Boolean} keepHash true to keep the hash in the URL, false to update it 1804 */ 1805 function navigate(index, keepHash) { 1806 if (index < 0 || index > (that._elements["item"].length - 1)) { 1807 return; 1808 } 1809 1810 that._active = index; 1811 refreshActive(); 1812 1813 if (!keepHash && containerUtils) { 1814 containerUtils.updateUrlHash(that, "item", index); 1815 } 1816 1817 if (dataLayerEnabled) { 1818 var carouselId = that._elements.self.id; 1819 var activeItem = getDataLayerId(that._elements.item[index]); 1820 var updatePayload = { component: {} }; 1821 updatePayload.component[carouselId] = { shownItems: [activeItem] }; 1822 1823 var removePayload = { component: {} }; 1824 removePayload.component[carouselId] = { shownItems: undefined }; 1825 1826 dataLayer.push(removePayload); 1827 dataLayer.push(updatePayload); 1828 } 1829 1830 // reset the autoplay transition interval following navigation, if not already hovering the carousel
1831 if (that._elements.self.parentElement) { 1832 if (that._elements.self.parentElement.querySelector(":hover") !== that._elements.self) { 1833 resetAutoplayInterval(); 1834 } 1835 } 1836 } 1837 1838 /** 1839 * Navigates to the item at the provided index and ensures the active indicator gains focus 1840 * 1841 * @private 1842 * @param {Number} index The index of the item to navigate to 1843 * @param {Boolean} keepHash true to keep the hash in the URL, false to update it 1844 */ 1845 function navigateAndFocusIndicator(index, keepHash) { 1846 navigate(index, keepHash); 1847 focusWithoutScroll(that._elements["indicator"][index]); 1848 1849 if (dataLayerEnabled) { 1850 dataLayer.push({ 1851 event: "cmp:show", 1852 eventInfo: { 1853 path: "component." + getDataLayerId(that._elements.item[index]) 1854 } 1855 }); 1856 } 1857 } 1858 1859 /** 1860 * Starts/resets automatic slide transition interval 1861 * 1862 * @private 1863 */ 1864 function resetAutoplayInterval() { 1865 if (that._paused || !that._properties.autoplay) { 1866 return; 1867 } 1868 clearAutoplayInterval(); 1869 that._autoplayIntervalId = window.setInterval(function() { 1870 if (document.visibilityState && document.hidden) { 1871 return; 1872 } 1873 var indicators = that._elements["indicators"]; 1874 if (indicators !== document.activeElement && indicators.contains(document.activeElement)) { 1875 // if an indicator has focus, ensure we switch focus following navigation 1876 navigateAndFocusIndicator(getNextIndex(), true); 1877 } else { 1878 navigate(getNextIndex(), true); 1879 } 1880 }, that._properties.delay); 1881 } 1882 1883 /** 1884 * Clears/pauses automatic slide transition interval 1885 * 1886 * @private 1887 */ 1888 function clearAutoplayInterval() { 1889 window.clearInterval(that._autoplayIntervalId); 1890 that._autoplayIntervalId = null; 1891 } 1892 1893 /** 1894 * Sets the disabled state for an action and toggles the appropriate CSS classes 1895 * 1896 * @private 1897 * @param {HTMLElement} action Action to disable 1898 * @param {Boolean} [disable] {@code true} to disable, {@code false} to enable 1899 */ 1900 function setActionDisabled(action, disable) { 1901 if (!action) { 1902 return; 1903 } 1904 if (disable !== false) { 1905 action.disabled = true; 1906 action.classList.add("cmp-carousel__action--disabled"); 1907 } else { 1908 action.disabled = false; 1909 action.classList.remove("cmp-carousel__action--disabled"); 1910 } 1911 } 1912 } 1913 1914 /** 1915 * Parses the dataLayer string and returns the ID 1916 * 1917 * @private 1918 * @param {HTMLElement} item the accordion item 1919 * @returns {String} dataLayerId or undefined 1920 */ 1921 function getDataLayerId(item) { 1922 if (item) { 1923 if (item.dataset.cmpDataLayer) { 1924 return Object.keys(JSON.parse(item.dataset.cmpDataLayer))[0]; 1925 } else { 1926 return item.id; 1927 } 1928 } 1929 return null; 1930 } 1931 1932 /** 1933 * Document ready handler and DOM mutation observers. Initializes Carousel components as necessary. 1934 * 1935 * @private 1936 */ 1937 function onDocumentReady() { 1938 dataLayerEnabled = document.body.hasAttribute("data-cmp-data-layer-enabled"); 1939 if (dataLayerEnabled) { 1940 dataLayerName = document.body.getAttribute("data-cmp-data-layer-name") || "adobeDataLayer"; 1941 dataLayer = window[dataLayerName] = window[dataLayerName] || []; 1942 } 1943 1944 var elements = document.querySelectorAll(selectors.self); 1945 for (var i = 0; i < elements.length; i++) { 1946 new Carousel({ element: elements[i], options: CMP.utils.readData(elements[i], IS) }); 1947 } 1948 1949 var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; 1950 var body = document.querySelector("body"); 1951 var observer = new MutationObserver(function(mutations) { 1952 mutations.forEach(function(mutation) { 1953 // needed for IE 1954 var nodesArray = [].slice.call(mutation.addedNodes); 1955 if (nodesArray.length > 0) { 1956 nodesArray.forEach(function(addedNode) { 1957 if (addedNode.querySelectorAll) { 1958 var elementsArray = [].slice.call(addedNode.querySelectorAll(selectors.self)); 1959 elementsArray.forEach(function(element) { 1960 new Carousel({ element: element, options: CMP.utils.readData(element, IS) }); 1961 }); 1962 } 1963 }); 1964 } 1965 }); 1966 }); 1967 1968 observer.observe(body, { 1969 subtree: true, 1970 childList: true, 1971 characterData: true 1972 }); 1973 } 1974 1975 var documentReady = document.readyState !== "loading" ? Promise.resolve() : new Promise(function(resolve) { 1976 document.addEventListener("DOMContentLoaded", resolve); 1977 }); 1978 Promise.all([documentReady]).then(onDocumentReady); 1979 1980 if (containerUtils) { 1981 window.addEventListener("load", containerUtils.scrollToAnchor, false); 1982 } 1983 1984}()); 1985 1986 1987/******************************************************************************* 1988 * Copyright 2022 Adobe 1989 * 1990 * Licensed under the Apache License, Version 2.0 (the "License");
1991 * you may not use this file except in compliance with the License. 1992 * You may obtain a copy of the License at 1993 * 1994 * http://www.apache.org/licenses/LICENSE-2.0 1995 * 1996 * Unless required by applicable law or agreed to in writing, software 1997 * distributed under the License is distributed on an "AS IS" BASIS, 1998 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1999 * See the License for the specific language governing permissions and 2000 * limitations under the License. 2001 ******************************************************************************/ 2002(function(document) { 2003 "use strict"; 2004 2005 window.CMP = window.CMP || {}; 2006 window.CMP.utils = (function() { 2007 var NS = "cmp"; 2008 2009 /** 2010 * Reads options data from the Component wrapper element, defined via {@code data-cmp-*} data attributes 2011 * 2012 * @param {HTMLElement} element The component element to read options data from 2013 * @param {String} is The component identifier 2014 * @returns {String[]} The options read from the component data attributes 2015 */ 2016 var readData = function(element, is) { 2017 var data = element.dataset; 2018 var options = []; 2019 var capitalized = is; 2020 capitalized = capitalized.charAt(0).toUpperCase() + capitalized.slice(1); 2021 var reserved = ["is", "hook" + capitalized]; 2022 2023 for (var key in data) { 2024 if (Object.prototype.hasOwnProperty.call(data, key)) { 2025 var value = data[key]; 2026 2027 if (key.indexOf(NS) === 0) { 2028 key = key.slice(NS.length); 2029 key = key.charAt(0).toLowerCase() + key.substring(1); 2030 2031 if (reserved.indexOf(key) === -1) { 2032 options[key] = value; 2033 } 2034 } 2035 } 2036 } 2037 return options; 2038 }; 2039 2040 /** 2041 * Set up the final properties of a component by evaluating the transform function or fall back to the default value on demand 2042 * @param {String[]} options the options to transform 2043 * @param {Object} properties object of properties of property functions 2044 * @returns {Object} transformed properties 2045 */ 2046 var setupProperties = function(options, properties) { 2047 var transformedProperties = {}; 2048 2049 for (var key in properties) { 2050 if (Object.prototype.hasOwnProperty.call(properties, key)) { 2051 var property = properties[key]; 2052 if (options && options[key] != null) { 2053 if (property && typeof property.transform === "function") { 2054 transformedProperties[key] = property.transform(options[key]); 2055 } else { 2056 transformedProperties[key] = options[key]; 2057 } 2058 } else { 2059 transformedProperties[key] = properties[key]["default"]; 2060 } 2061 } 2062 } 2063 return transformedProperties; 2064 }; 2065 2066 2067 return { 2068 readData: readData, 2069 setupProperties: setupProperties 2070 }; 2071 }()); 2072}(window.document)); 2073 2074/******************************************************************************* 2075 * Copyright 2022 Adobe 2076 * 2077 * Licensed under the Apache License, Version 2.0 (the "License"); 2078 * you may not use this file except in compliance with the License. 2079 * You may obtain a copy of the License at 2080 * 2081 * http://www.apache.org/licenses/LICENSE-2.0 2082 * 2083 * Unless required by applicable law or agreed to in writing, software 2084 * distributed under the License is distributed on an "AS IS" BASIS, 2085 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2086 * See the License for the specific language governing permissions and 2087 * limitations under the License. 2088 ******************************************************************************/ 2089(function(document) { 2090 "use strict"; 2091 2092 window.CMP = window.CMP || {}; 2093 window.CMP.image = window.CMP.image || {}; 2094 window.CMP.image.dynamicMedia = (function() { 2095 var autoSmartCrops = {}; 2096 var SRC_URI_TEMPLATE_WIDTH_VAR = "{.width}"; 2097 var SRC_URI_TEMPLATE_DPR_VAR = "{dpr}";
2098 var SRC_URI_DPR_OFF = "dpr=off"; 2099 var SRC_URI_DPR_ON = "dpr=on,{dpr}"; 2100 var dpr = window.devicePixelRatio || 1; 2101 var config = { 2102 minWidth: 20 2103 }; 2104 2105 /** 2106 * get auto smart crops from dm 2107 * @param {String} src the src uri 2108 * @returns {{}} the smart crop json object 2109 */ 2110 var getAutoSmartCrops = function(src) { 2111 var request = new XMLHttpRequest(); 2112 var url = src.split(SRC_URI_TEMPLATE_WIDTH_VAR)[0] + "?req=set,json"; 2113 request.open("GET", url, false); 2114 request.onload = function() { 2115 if (request.status >= 200 && request.status < 400) { 2116 // success status 2117 var responseText = request.responseText; 2118 var rePayload = new RegExp(/^(?:\/\*jsonp\*\/)?\s*([^()]+)\(([\s\S]+),\s*"[0-9]*"\);?$/gmi); 2119 var rePayloadJSON = new RegExp(/^{[\s\S]*}$/gmi); 2120 var resPayload = rePayload.exec(responseText); 2121 var payload; 2122 if (resPayload) { 2123 var payloadStr = resPayload[2]; 2124 if (rePayloadJSON.test(payloadStr)) { 2125 payload = JSON.parse(payloadStr); 2126 } 2127 2128 } 2129 // check "relation" - only in case of smartcrop preset 2130 if (payload && payload.set.relation && payload.set.relation.length > 0) { 2131 for (var i = 0; i < payload.set.relation.length; i++) { 2132 autoSmartCrops[parseInt(payload.set.relation[i].userdata.SmartCropWidth)] = 2133 ":" + payload.set.relation[i].userdata.SmartCropDef; 2134 } 2135 } 2136 } else { 2137 // error status 2138 } 2139 }; 2140 request.send(); 2141 return autoSmartCrops; 2142 }; 2143 2144 /** 2145 * Build and return the srcset value based on the available auto smart crops 2146 * @param {String} src the src uri 2147 * @param {Object} smartCrops the smart crops object 2148 * @returns {String} the srcset 2149 */ 2150 var getSrcSet = function(src, smartCrops) { 2151 var srcset; 2152 var keys = Object.keys(smartCrops); 2153 if (keys.length > 0) { 2154 srcset = []; 2155 for (var key in autoSmartCrops) { 2156 srcset.push(src.replace(SRC_URI_TEMPLATE_WIDTH_VAR, smartCrops[key]) + " " + key + "w"); 2157 } 2158 } 2159 return srcset.join(","); 2160 }; 2161 2162 /** 2163 * Get the optimal width based on the available sizes 2164 * @param {[Number]} sizes the available sizes 2165 * @param {Number} width the element width 2166 * @returns {String} the optimal width 2167 */ 2168 function getOptimalWidth(sizes, width) { 2169 var len = sizes.length; 2170 var key = 0; 2171 2172 while ((key < len - 1) && (sizes[key] < width)) { 2173 key++; 2174 } 2175 2176 return sizes[key] !== undefined ? sizes[key].toString() : width; 2177 } 2178 2179 /** 2180 * Get the width of an element or parent element if the width is smaller than the minimum width 2181 * @param {HTMLElement} component the image component 2182 * @param {HTMLElement | Node} parent the parent element 2183 * @returns {Number} the width of the element 2184 */ 2185 var getWidth = function(component, parent) { 2186 var width = component.offsetWidth; 2187 while (width < config.minWidth && parent && !component._autoWidth) { 2188 width = parent.offsetWidth; 2189 parent = parent.parentNode; 2190 } 2191 return width; 2192 }; 2193 2194 /** 2195 * Set the src and srcset attribute for a Dynamic Media Image which auto smart crops enabled. 2196 * @param {HTMLElement} component the image component 2197 * @param {{}} properties the component properties 2198 */ 2199 var setDMAttributes = function(component, properties) { 2200 // for v3 we first have to turn the dpr on
2201 var src = properties.src.replace(SRC_URI_DPR_OFF, SRC_URI_DPR_ON); 2202 src = src.replace(SRC_URI_TEMPLATE_DPR_VAR, dpr); 2203 var smartCrops = {}; 2204 var width; 2205 if (properties["smartcroprendition"] === "SmartCrop:Auto") { 2206 smartCrops = getAutoSmartCrops(src); 2207 } 2208 var hasWidths = (properties.widths && properties.widths.length > 0) || Object.keys(smartCrops).length > 0; 2209 if (hasWidths) { 2210 var image = component.querySelector("img"); 2211 var elemWidth = getWidth(component, component.parentNode); 2212 if (properties["smartcroprendition"] === "SmartCrop:Auto") { 2213 image.setAttribute("srcset", CMP.image.dynamicMedia.getSrcSet(src, smartCrops)); 2214 width = getOptimalWidth(Object.keys(smartCrops, elemWidth)); 2215 image.setAttribute("src", CMP.image.dynamicMedia.getSrc(src, smartCrops[width])); 2216 } else { 2217 width = getOptimalWidth(properties.widths, elemWidth); 2218 image.setAttribute("src", CMP.image.dynamicMedia.getSrc(src, width)); 2219 } 2220 } 2221 }; 2222 2223 /** 2224 * Get the src attribute based on the optimal width 2225 * @param {String} src the src uri 2226 * @param {String} width the element width 2227 * @returns {String} the final src attribute 2228 */ 2229 var getSrc = function(src, width) { 2230 if (src.indexOf(SRC_URI_TEMPLATE_WIDTH_VAR) > -1) { 2231 src = src.replace(SRC_URI_TEMPLATE_WIDTH_VAR, width); 2232 } 2233 return src; 2234 }; 2235 2236 2237 return { 2238 getAutoSmartCrops: getAutoSmartCrops, 2239 getSrcSet: getSrcSet, 2240 getSrc: getSrc, 2241 setDMAttributes: setDMAttributes, 2242 getWidth: getWidth 2243 }; 2244 }()); 2245 document.dispatchEvent(new CustomEvent("core.wcm.components.commons.site.image.dynamic-media.loaded")); 2246}(window.document)); 2247 2248/******************************************************************************* 2249 * Copyright 2022 Adobe 2250 * 2251 * Licensed under the Apache License, Version 2.0 (the "License"); 2252 * you may not use this file except in compliance with the License. 2253 * You may obtain a copy of the License at 2254 * 2255 * http://www.apache.org/licenses/LICENSE-2.0 2256 * 2257 * Unless required by applicable law or agreed to in writing, software 2258 * distributed under the License is distributed on an "AS IS" BASIS, 2259 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2260 * See the License for the specific language governing permissions and 2261 * limitations under the License. 2262 ******************************************************************************/ 2263(function(document) { 2264 2265 "use strict"; 2266 2267 window.CMP = window.CMP || {}; 2268 window.CMP.image = window.CMP.image || {}; 2269 window.CMP.image.v3 = (function() { 2270 var IS = "image"; 2271 2272 var selectors = { 2273 self: "[data-cmp-hook-image='imageV3']" 2274 }; 2275 2276 var properties = { 2277 "widths": { 2278 "default": [], 2279 "transform": function(value) { 2280 var widths = []; 2281 value.split(",").forEach(function(item) { 2282 item = parseFloat(item); 2283 if (!isNaN(item)) { 2284 widths.push(item); 2285 } 2286 }); 2287 return widths; 2288 } 2289 }, 2290 "dmimage": { 2291 "default": false, 2292 "transform": function(value) { 2293 return !(value === null || typeof value === "undefined"); 2294 } 2295 }, 2296 "src": { 2297 "transform": function(value) { 2298 return decodeURIComponent(value); 2299 } 2300 }, 2301 "smartcroprendition": "" 2302 }; 2303 2304 function Image(config) { 2305 var that = this; 2306 /** 2307 * Init the image if the image is from dynamic media 2308 * @param {HTMLElement} component the image component 2309 */ 2310 that.initImage = function(component) { 2311 var options = CMP.utils.readData(component, IS); 2312 that._properties = CMP.utils.setupProperties(options, properties); 2313 if (that._properties.dmimage) { 2314 // use encoded src for dynamic media 2315 that._properties.src = options["src"]; 2316 CMP.image.dynamicMedia.setDMAttributes(component, that._properties); 2317 } 2318 }; 2319 that.initImage(config.element); 2320 } 2321 2322 return { 2323 init: function() { 2324 var elements = document.querySelectorAll(selectors.self); 2325 for (var i = 0; i < elements.length; i++) { 2326 new Image({ element: elements[i], options: CMP.utils.readData(elements[i], IS) }); 2327 } 2328 2329 var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; 2330 var body = document.querySelector("body"); 2331 var observer = new MutationObserver(function(mutations) { 2332 mutations.forEach(function(mutation) { 2333 // needed for IE 2334 var nodesArray = [].slice.call(mutation.addedNodes); 2335 if (nodesArray.length > 0) { 2336 nodesArray.forEach(function(addedNode) { 2337 if (addedNode.querySelectorAll) { 2338 var elementsArray = [].slice.call(addedNode.querySelectorAll(selectors.self)); 2339 elementsArray.forEach(function(element) { 2340 new Image({ element: element, options: CMP.utils.readData(element, IS) }); 2341 }); 2342 } 2343 }); 2344 } 2345 }); 2346 }); 2347 2348 observer.observe(body, { 2349 subtree: true, 2350 childList: true, 2351 characterData: true 2352 }); 2353 } 2354 }; 2355 }()); 2356 2357 var documentReady = document.readyState !== "loading" ? Promise.resolve() : new Promise(function(resolve) { 2358 document.addEventListener("DOMContentLoaded", resolve); 2359 }); 2360 Promise.all([documentReady]).then(window.CMP.image.v3.init); 2361}(window.document)); 2362 2363 2364/******************************************************************************* 2365 * Copyright 2022 Adobe 2366 * 2367 * Licensed under the Apache License, Version 2.0 (the "License");
2368 * you may not use this file except in compliance with the License. 2369 * You may obtain a copy of the License at 2370 * 2371 * http://www.apache.org/licenses/LICENSE-2.0 2372 * 2373 * Unless required by applicable law or agreed to in writing, software 2374 * distributed under the License is distributed on an "AS IS" BASIS, 2375 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2376 * See the License for the specific language governing permissions and 2377 * limitations under the License. 2378 ******************************************************************************/ 2379(function() { 2380 "use strict"; 2381 2382 var NS = "cmp"; 2383 var IS = "search"; 2384 2385 var DELAY = 300; // time before fetching new results when the user is typing a search string 2386 var LOADING_DISPLAY_DELAY = 300; // minimum time during which the loading indicator is displayed 2387 var PARAM_RESULTS_OFFSET = "resultsOffset"; 2388 2389 var keyCodes = { 2390 TAB: 9, 2391 ENTER: 13, 2392 ESCAPE: 27, 2393 ARROW_UP: 38, 2394 ARROW_DOWN: 40 2395 }; 2396 2397 var selectors = { 2398 self: "[data-" + NS + '-is="' + IS + '"]', 2399 item: { 2400 self: "[data-" + NS + "-hook-" + IS + '="item"]', 2401 title: "[data-" + NS + "-hook-" + IS + '="itemTitle"]', 2402 focused: "." + NS + "-search__item--is-focused" 2403 } 2404 }; 2405 2406 var properties = { 2407 /** 2408 * The minimum required length of the search term before results are fetched. 2409 * 2410 * @memberof Search 2411 * @type {Number} 2412 * @default 3 2413 */ 2414 minLength: { 2415 "default": 3, 2416 transform: function(value) { 2417 value = parseFloat(value); 2418 return isNaN(value) ? null : value; 2419 } 2420 }, 2421 /** 2422 * The maximal number of results fetched by a search request. 2423 * 2424 * @memberof Search 2425 * @type {Number} 2426 * @default 10 2427 */ 2428 resultsSize: { 2429 "default": 10, 2430 transform: function(value) { 2431 value = parseFloat(value); 2432 return isNaN(value) ? null : value; 2433 } 2434 } 2435 }; 2436 2437 var idCount = 0; 2438 2439 function readData(element) { 2440 var data = element.dataset; 2441 var options = []; 2442 var capitalized = IS; 2443 capitalized = capitalized.charAt(0).toUpperCase() + capitalized.slice(1); 2444 var reserved = ["is", "hook" + capitalized]; 2445 2446 for (var key in data) { 2447 if (Object.prototype.hasOwnProperty.call(data, key)) { 2448 var value = data[key]; 2449 2450 if (key.indexOf(NS) === 0) { 2451 key = key.slice(NS.length); 2452 key = key.charAt(0).toLowerCase() + key.substring(1); 2453 2454 if (reserved.indexOf(key) === -1) { 2455 options[key] = value; 2456 } 2457 } 2458 } 2459 } 2460 2461 return options; 2462 } 2463 2464 function toggleShow(element, show) { 2465 if (element) { 2466 if (show !== false) { 2467 element.style.display = "block"; 2468 element.setAttribute("aria-hidden", false); 2469 } else { 2470 element.style.display = "none"; 2471 element.setAttribute("aria-hidden", true); 2472 } 2473 } 2474 } 2475 2476 function serialize(form) { 2477 var query = []; 2478 if (form && form.elements) { 2479 for (var i = 0; i < form.elements.length; i++) { 2480 var node = form.elements[i]; 2481 if (!node.disabled && node.name) { 2482 var param = [node.name, encodeURIComponent(node.value)]; 2483 query.push(param.join("=")); 2484 } 2485 } 2486 } 2487 return query.join("&"); 2488 } 2489 2490 function mark(node, regex) { 2491 if (!node || !regex) { 2492 return; 2493 } 2494 2495 // text nodes 2496 if (node.nodeType === 3) { 2497 var nodeValue = node.nodeValue; 2498 var match = regex.exec(nodeValue); 2499 2500 if (nodeValue && match) { 2501 var element = document.createElement("mark"); 2502 element.className = NS + "-search__item-mark"; 2503 element.appendChild(document.createTextNode(match[0])); 2504 2505 var after = node.splitText(match.index); 2506 after.nodeValue = after.nodeValue.substring(match[0].length); 2507 node.parentNode.insertBefore(element, after); 2508 } 2509 } else if (node.hasChildNodes()) { 2510 for (var i = 0; i < node.childNodes.length; i++) { 2511 // recurse 2512 mark(node.childNodes[i], regex); 2513 } 2514 } 2515 } 2516 2517 function localizeMessage(searchElementId, message, values = []) { 2518 const i18nMessages = JSON.parse(document.querySelector("#" + searchElementId).getAttribute("data-i18n-messages")); 2519 let translation = i18nMessages[message]; 2520 // Insert values 2521 if (values.length > 0) { 2522 translation = translation.replace(/{(\d+)}/g, function(match, index) { 2523 return typeof values[index] !== "undefined" ? values[index] : match; 2524 }); 2525 } 2526 return translation; 2527 } 2528 2529 // useful for Accessibility, helping users with low vision and users with cognitive disabilities to identify the change in results 2530 function updateSearchResultsStatusMessageElement(searchElementId, totalResults) { 2531 var searchResultsStatusMessage = document.querySelector("#" + searchElementId + "> .cmp_search__info"); 2532 searchResultsStatusMessage.style.visibility = "visible"; 2533 var searchResultsFoundMessage = localizeMessage(searchElementId, totalResults === 1 ? "{0} result" : "{0} results", [totalResults]); 2534 var searchResultsNotFoundMessage = localizeMessage(searchElementId, "No results"); 2535 searchResultsStatusMessage.innerText = totalResults > 0 ? searchResultsFoundMessage : searchResultsNotFoundMessage; 2536 } 2537 2538 function Search(config) { 2539 if (config.element) { 2540 // prevents multiple initialization 2541 config.element.removeAttribute("data-" + NS + "-is"); 2542 } 2543 2544 this._cacheElements(config.element); 2545 this._setupProperties(config.options); 2546 2547 this._action = this._elements.form.getAttribute("action"); 2548 this._resultsOffset = 0; 2549 this._hasMoreResults = true; 2550 2551 this._elements.input.addEventListener("input", this._onInput.bind(this)); 2552 this._elements.input.addEventListener("focus", this._onInput.bind(this)); 2553 this._elements.input.addEventListener("keydown", this._onKeydown.bind(this)); 2554 this._elements.clear.addEventListener("click", this._onClearClick.bind(this)); 2555 document.addEventListener("click", this._onDocumentClick.bind(this)); 2556 this._elements.results.addEventListener("scroll", this._onScroll.bind(this)); 2557 2558 this._makeAccessible(); 2559 } 2560 2561 Search.prototype._displayResults = function() { 2562 if (this._elements.input.value.length === 0) { 2563 toggleShow(this._elements.clear, false); 2564 this._cancelResults(); 2565 } else if (this._elements.input.value.length < this._properties.minLength) { 2566 toggleShow(this._elements.clear, true); 2567 } else { 2568 this._updateResults(); 2569 toggleShow(this._elements.clear, true); 2570 } 2571 }; 2572 2573 Search.prototype._onScroll = function(event) { 2574 // fetch new results when the results to be scrolled down are less than the visible results 2575 if (this._elements.results.scrollTop + 2 * this._elements.results.clientHeight >= this._elements.results.scrollHeight) { 2576 this._resultsOffset += this._properties.resultsSize; 2577 this._displayResults(); 2578 } 2579 }; 2580 2581 Search.prototype._onInput = function(event) { 2582 var self = this; 2583 self._cancelResults(); 2584 // start searching when the search term reaches the minimum length 2585 this._timeout = setTimeout(function() { 2586 self._displayResults(); 2587 }, DELAY); 2588 }; 2589 2590 Search.prototype._onKeydown = function(event) { 2591 var self = this; 2592 2593 switch (event.keyCode) { 2594 case keyCodes.TAB: 2595 if (self._resultsOpen()) { 2596 toggleShow(self._elements.results, false); 2597 self._elements.input.setAttribute("aria-expanded", "false"); 2598 this._hideSearchResultsStatusMessage(); 2599 } 2600 break;
2601 case keyCodes.ENTER: 2602 event.preventDefault(); 2603 if (self._resultsOpen()) { 2604 var focused = self._elements.results.querySelector(selectors.item.focused); 2605 if (focused) { 2606 focused.click(); 2607 } 2608 } 2609 break; 2610 case keyCodes.ESCAPE: 2611 self._cancelResults(); 2612 break; 2613 case keyCodes.ARROW_UP: 2614 if (self._resultsOpen()) { 2615 event.preventDefault(); 2616 self._stepResultFocus(true); 2617 } 2618 break; 2619 case keyCodes.ARROW_DOWN: 2620 if (self._resultsOpen()) { 2621 event.preventDefault(); 2622 self._stepResultFocus(); 2623 } else { 2624 // test the input and if necessary fetch and display the results 2625 self._onInput(); 2626 } 2627 break; 2628 default: 2629 return; 2630 } 2631 }; 2632 2633 Search.prototype._onClearClick = function(event) { 2634 event.preventDefault(); 2635 this._elements.input.value = ""; 2636 toggleShow(this._elements.clear, false); 2637 toggleShow(this._elements.results, false); 2638 this._elements.input.setAttribute("aria-expanded", "false"); 2639 this._hideSearchResultsStatusMessage(); 2640 }; 2641 2642 Search.prototype._onDocumentClick = function(event) { 2643 var inputContainsTarget = this._elements.input.contains(event.target); 2644 var resultsContainTarget = this._elements.results.contains(event.target); 2645 2646 if (!(inputContainsTarget || resultsContainTarget)) { 2647 toggleShow(this._elements.results, false); 2648 this._elements.input.setAttribute("aria-expanded", "false"); 2649 this._hideSearchResultsStatusMessage(); 2650 } 2651 }; 2652 2653 Search.prototype._resultsOpen = function() { 2654 return this._elements.results.style.display !== "none"; 2655 }; 2656 2657 Search.prototype._makeAccessible = function() { 2658 var id = NS + "-search-results-" + idCount; 2659 this._elements.input.setAttribute("aria-owns", id); 2660 this._elements.results.id = id; 2661 idCount++; 2662 }; 2663 2664 Search.prototype._generateItems = function(data, results) { 2665 var self = this; 2666 2667 data.forEach(function(item) { 2668 var el = document.createElement("span"); 2669 el.innerHTML = self._elements.itemTemplate.innerHTML; 2670 el.querySelectorAll(selectors.item.title)[0].appendChild(document.createTextNode(item.title)); 2671 el.querySelectorAll(selectors.item.self)[0].setAttribute("href", self._safeHref(item.url)); 2672 results.innerHTML += el.innerHTML; 2673 }); 2674 }; 2675 2676 Search.prototype._safeHref = function(href) { 2677 var a = document.createElement("a"); 2678 a.href = href; 2679 return a.pathname; 2680 }; 2681 2682 Search.prototype._markResults = function() { 2683 var nodeList = this._elements.results.querySelectorAll(selectors.item.self); 2684 var escapedTerm = this._elements.input.value.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); 2685 var regex = new RegExp("(" + escapedTerm + ")", "gi"); 2686 2687 for (var i = this._resultsOffset - 1; i < nodeList.length; ++i) { 2688 var result = nodeList[i]; 2689 mark(result, regex); 2690 } 2691 }; 2692 2693 Search.prototype._stepResultFocus = function(reverse) { 2694 var results = this._elements.results.querySelectorAll(selectors.item.self); 2695 var focused = this._elements.results.querySelector(selectors.item.focused); 2696 var newFocused; 2697 var index = Array.prototype.indexOf.call(results, focused); 2698 var focusedCssClass = NS + "-search__item--is-focused"; 2699 2700 if (results.length > 0) { 2701 2702 if (!reverse) { 2703 // highlight the next result 2704 if (index < 0) { 2705 results[0].classList.add(focusedCssClass); 2706 results[0].setAttribute("aria-selected", "true"); 2707 } else if (index + 1 < results.length) { 2708 results[index].classList.remove(focusedCssClass); 2709 results[index].setAttribute("aria-selected", "false"); 2710 results[index + 1].classList.add(focusedCssClass); 2711 results[index + 1].setAttribute("aria-selected", "true"); 2712 } 2713 2714 // if the last visible result is partially hidden, scroll up until it's completely visible 2715 newFocused = this._elements.results.querySelector(selectors.item.focused); 2716 if (newFocused) { 2717 var bottomHiddenHeight = newFocused.offsetTop + newFocused.offsetHeight - this._elements.results.scrollTop - this._elements.results.clientHeight; 2718 if (bottomHiddenHeight > 0) { 2719 this._elements.results.scrollTop += bottomHiddenHeight; 2720 } else { 2721 this._onScroll(); 2722 } 2723 } 2724 2725 } else { 2726 // highlight the previous result 2727 if (index >= 1) { 2728 results[index].classList.remove(focusedCssClass); 2729 results[index].setAttribute("aria-selected", "false"); 2730 results[index - 1].classList.add(focusedCssClass); 2731 results[index - 1].setAttribute("aria-selected", "true"); 2732 } 2733 2734 // if the first visible result is partially hidden, scroll down until it's completely visible 2735 newFocused = this._elements.results.querySelector(selectors.item.focused); 2736 if (newFocused) { 2737 var topHiddenHeight = this._elements.results.scrollTop - newFocused.offsetTop; 2738 if (topHiddenHeight > 0) { 2739 this._elements.results.scrollTop -= topHiddenHeight; 2740 } 2741 } 2742 } 2743 } 2744 }; 2745 2746 Search.prototype._updateResults = function() { 2747 var self = this; 2748 if (self._hasMoreResults) { 2749 var request = new XMLHttpRequest(); 2750 var url = self._action + "?" + serialize(self._elements.form) + "&" + PARAM_RESULTS_OFFSET + "=" + self._resultsOffset; 2751 2752 request.open("GET", url, true); 2753 request.onload = function() { 2754 // when the results are loaded: hide the loading indicator and display the search icon after a minimum period 2755 setTimeout(function() { 2756 toggleShow(self._elements.loadingIndicator, false); 2757 toggleShow(self._elements.icon, true); 2758 }, LOADING_DISPLAY_DELAY); 2759 if (request.status >= 200 && request.status < 400) { 2760 // success status 2761 var data = JSON.parse(request.responseText); 2762 updateSearchResultsStatusMessageElement(self._elements.self.id, data.length); 2763 if (data.length > 0) { 2764 self._generateItems(data, self._elements.results); 2765 self._markResults(); 2766 toggleShow(self._elements.results, true); 2767 self._elements.input.setAttribute("aria-expanded", "true"); 2768 } else { 2769 self._hasMoreResults = false;
2770 } 2771 // the total number of results is not a multiple of the fetched results: 2772 // -> we reached the end of the query 2773 if (self._elements.results.querySelectorAll(selectors.item.self).length % self._properties.resultsSize > 0) { 2774 self._hasMoreResults = false; 2775 } 2776 } else { 2777 // error status 2778 } 2779 }; 2780 // when the results are loading: display the loading indicator and hide the search icon 2781 toggleShow(self._elements.loadingIndicator, true); 2782 toggleShow(self._elements.icon, false); 2783 request.send(); 2784 } 2785 }; 2786 2787 Search.prototype._cancelResults = function() { 2788 clearTimeout(this._timeout); 2789 this._elements.results.scrollTop = 0; 2790 this._resultsOffset = 0; 2791 this._hasMoreResults = true; 2792 this._elements.results.innerHTML = ""; 2793 this._elements.input.setAttribute("aria-expanded", "false"); 2794 this._hideSearchResultsStatusMessage(); 2795 }; 2796 2797 Search.prototype._hideSearchResultsStatusMessage = function() { 2798 var searchResultsStatusMessage = document.querySelector("#" + this._elements.self.id + "> .cmp_search__info"); 2799 searchResultsStatusMessage.style.visibility = "hidden"; 2800 }; 2801 2802 Search.prototype._cacheElements = function(wrapper) { 2803 this._elements = {}; 2804 this._elements.self = wrapper; 2805 var hooks = this._elements.self.querySelectorAll("[data-" + NS + "-hook-" + IS + "]"); 2806 2807 for (var i = 0; i < hooks.length; i++) { 2808 var hook = hooks[i]; 2809 var capitalized = IS; 2810 capitalized = capitalized.charAt(0).toUpperCase() + capitalized.slice(1); 2811 var key = hook.dataset[NS + "Hook" + capitalized]; 2812 this._elements[key] = hook; 2813 } 2814 }; 2815 2816 Search.prototype._setupProperties = function(options) { 2817 this._properties = {}; 2818 2819 for (var key in properties) { 2820 if (Object.prototype.hasOwnProperty.call(properties, key)) { 2821 var property = properties[key]; 2822 if (options && options[key] != null) { 2823 if (property && typeof property.transform === "function") { 2824 this._properties[key] = property.transform(options[key]); 2825 } else { 2826 this._properties[key] = options[key]; 2827 } 2828 } else { 2829 this._properties[key] = properties[key]["default"]; 2830 } 2831 } 2832 } 2833 }; 2834 2835 function onDocumentReady() { 2836 var elements = document.querySelectorAll(selectors.self); 2837 for (var i = 0; i < elements.length; i++) { 2838 new Search({ element: elements[i], options: readData(elements[i]) }); 2839 } 2840 2841 var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; 2842 var body = document.querySelector("body"); 2843 var observer = new MutationObserver(function(mutations) { 2844 mutations.forEach(function(mutation) { 2845 // needed for IE 2846 var nodesArray = [].slice.call(mutation.addedNodes); 2847 if (nodesArray.length > 0) { 2848 nodesArray.forEach(function(addedNode) { 2849 if (addedNode.querySelectorAll) { 2850 var elementsArray = [].slice.call(addedNode.querySelectorAll(selectors.self)); 2851 elementsArray.forEach(function(element) { 2852 new Search({ element: element, options: readData(element) }); 2853 }); 2854 } 2855 }); 2856 } 2857 }); 2858 }); 2859 2860 observer.observe(body, { 2861 subtree: true, 2862 childList: true, 2863 characterData: true 2864 }); 2865 } 2866 2867 if (document.readyState !== "loading") { 2868 onDocumentReady(); 2869 } else { 2870 document.addEventListener("DOMContentLoaded", onDocumentReady); 2871 } 2872 2873})(); 2874 2875 2876/******************************************************************************* 2877 * Copyright 2016 Adobe 2878 * 2879 * Licensed under the Apache License, Version 2.0 (the "License");
2880 * you may not use this file except in compliance with the License. 2881 * You may obtain a copy of the License at 2882 * 2883 * http://www.apache.org/licenses/LICENSE-2.0 2884 * 2885 * Unless required by applicable law or agreed to in writing, software 2886 * distributed under the License is distributed on an "AS IS" BASIS, 2887 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2888 * See the License for the specific language governing permissions and 2889 * limitations under the License. 2890 ******************************************************************************/ 2891(function() { 2892 "use strict"; 2893 2894 var NS = "cmp"; 2895 var IS = "formText"; 2896 var IS_DASH = "form-text"; 2897 var SELF_SELECTOR = "[data-" + NS + '-is="' + IS + '"]'; 2898 2899 var selectors = { 2900 self: SELF_SELECTOR, 2901 validationMessage: SELF_SELECTOR + " .cmp-form-text__validation-message" 2902 }; 2903 2904 var displayValidationMessage = false; 2905 2906 var properties = { 2907 /** 2908 * A validation message to display if there is a type mismatch between the user input and expected input. 2909 * 2910 * @type {String} 2911 */ 2912 constraintMessage: "", 2913 /** 2914 * A validation message to display if no input is supplied, but input is expected for the field. 2915 * 2916 * @type {String} 2917 */ 2918 requiredMessage: "" 2919 }; 2920 2921 function readData(element) { 2922 var data = element.dataset; 2923 var options = []; 2924 var capitalized = IS; 2925 capitalized = capitalized.charAt(0).toUpperCase() + capitalized.slice(1); 2926 var reserved = ["is", "hook" + capitalized]; 2927 2928 for (var key in data) { 2929 if (Object.prototype.hasOwnProperty.call(data, key)) { 2930 var value = data[key]; 2931 2932 if (key.indexOf(NS) === 0) { 2933 key = key.slice(NS.length); 2934 key = key.charAt(0).toLowerCase() + key.substring(1); 2935 2936 if (reserved.indexOf(key) === -1) { 2937 options[key] = value; 2938 } 2939 } 2940 } 2941 } 2942 2943 return options; 2944 } 2945 2946 function FormText(config) { 2947 if (config.element) { 2948 // prevents multiple initialization 2949 config.element.removeAttribute("data-" + NS + "-is"); 2950 } 2951 2952 this._cacheElements(config.element); 2953 this._setupProperties(config.options); 2954 2955 this._elements.input.addEventListener("invalid", this._onInvalid.bind(this)); 2956 this._elements.input.addEventListener("input", this._onInput.bind(this)); 2957 if (displayValidationMessage) { 2958 this._elements.input.checkValidity(); 2959 } 2960 } 2961 2962 FormText.prototype._onInvalid = function(event) { 2963 event.target.setCustomValidity(""); 2964 if (event.target.validity.typeMismatch) { 2965 if (this._properties.constraintMessage) { 2966 event.target.setCustomValidity(this._properties.constraintMessage); 2967 } 2968 } else if (event.target.validity.valueMissing) { 2969 if (this._properties.requiredMessage) { 2970 event.target.setCustomValidity(this._properties.requiredMessage); 2971 } 2972 } 2973 if (displayValidationMessage) { 2974 var validationMessage = event.target.parentElement.querySelector(".cmp-form-text__validation-message"); 2975 if (validationMessage) { 2976 validationMessage.innerText = event.target.validationMessage; 2977 } 2978 } 2979 }; 2980 2981 FormText.prototype._onInput = function(event) { 2982 event.target.setCustomValidity(""); 2983 if (displayValidationMessage) { 2984 event.target.checkValidity(); 2985 } 2986 }; 2987 2988 FormText.prototype._cacheElements = function(wrapper) { 2989 this._elements = {}; 2990 this._elements.self = wrapper; 2991 var hooks = this._elements.self.querySelectorAll("[data-" + NS + "-hook-" + IS_DASH + "]"); 2992 for (var i = 0; i < hooks.length; i++) { 2993 var hook = hooks[i]; 2994 var capitalized = IS; 2995 capitalized = capitalized.charAt(0).toUpperCase() + capitalized.slice(1); 2996 var key = hook.dataset[NS + "Hook" + capitalized]; 2997 this._elements[key] = hook; 2998 } 2999 }; 3000 3001 FormText.prototype._setupProperties = function(options) { 3002 this._properties = {}; 3003 3004 for (var key in properties) { 3005 if (Object.prototype.hasOwnProperty.call(properties, key)) { 3006 var property = properties[key]; 3007 if (options && options[key] != null) { 3008 if (property && typeof property.transform === "function") { 3009 this._properties[key] = property.transform(options[key]); 3010 } else { 3011 this._properties[key] = options[key]; 3012 } 3013 } else { 3014 this._properties[key] = properties[key]["default"]; 3015 } 3016 } 3017 } 3018 }; 3019 3020 function onDocumentReady() {
3021 var validationMessages = document.querySelectorAll(selectors.validationMessage); 3022 if (validationMessages && validationMessages.length > 0) { 3023 displayValidationMessage = true; 3024 } 3025 3026 var elements = document.querySelectorAll(selectors.self); 3027 for (var i = 0; i < elements.length; i++) { 3028 new FormText({ element: elements[i], options: readData(elements[i]) }); 3029 } 3030 3031 var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; 3032 var body = document.querySelector("body"); 3033 var observer = new MutationObserver(function(mutations) { 3034 mutations.forEach(function(mutation) { 3035 // needed for IE 3036 var nodesArray = [].slice.call(mutation.addedNodes); 3037 if (nodesArray.length > 0) { 3038 nodesArray.forEach(function(addedNode) { 3039 if (addedNode.querySelectorAll) { 3040 var elementsArray = [].slice.call(addedNode.querySelectorAll(selectors.self)); 3041 elementsArray.forEach(function(element) { 3042 new FormText({ element: element, options: readData(element) }); 3043 }); 3044 } 3045 }); 3046 } 3047 }); 3048 }); 3049 3050 observer.observe(body, { 3051 subtree: true, 3052 childList: true, 3053 characterData: true 3054 }); 3055 } 3056 3057 if (document.readyState !== "loading") { 3058 onDocumentReady(); 3059 } else { 3060 document.addEventListener("DOMContentLoaded", onDocumentReady); 3061 } 3062 3063})(); 3064 3065 3066/******************************************************************************* 3067 * Copyright 2020 Adobe 3068 * 3069 * Licensed under the Apache License, Version 2.0 (the "License"); 3070 * you may not use this file except in compliance with the License. 3071 * You may obtain a copy of the License at 3072 * 3073 * http://www.apache.org/licenses/LICENSE-2.0 3074 * 3075 * Unless required by applicable law or agreed to in writing, software 3076 * distributed under the License is distributed on an "AS IS" BASIS, 3077 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3078 * See the License for the specific language governing permissions and 3079 * limitations under the License. 3080 ******************************************************************************/ 3081(function() { 3082 "use strict"; 3083 3084 var NS = "cmp"; 3085 var IS = "pdfviewer"; 3086 var SDK_URL = "https://acrobatservices.adobe.com/view-sdk/viewer.js"; 3087 var SDK_READY_EVENT = "adobe_dc_view_sdk.ready"; 3088 3089 var selectors = { 3090 self: "[data-" + NS + '-is="' + IS + '"]', 3091 sdkScript: 'script[src="' + SDK_URL + '"]' 3092 }; 3093 3094 function initSDK() { 3095 var sdkIncluded = document.querySelectorAll(selectors.sdkScript).length > 0; 3096 if (!window.adobe_dc_view_sdk && !sdkIncluded) { 3097 var dcv = document.createElement("script"); 3098 dcv.type = "text/javascript"; 3099 dcv.src = SDK_URL; 3100 document.body.appendChild(dcv); 3101 } 3102 } 3103 3104 function previewPdf(component) { 3105 // prevents multiple initialization 3106 component.removeAttribute("data-" + NS + "-is"); 3107 3108 // add the view sdk to the page 3109 initSDK(); 3110 3111 // manage the preview 3112 if (component.dataset && component.id) { 3113 if (window.AdobeDC && window.AdobeDC.View) { 3114 dcView(component); 3115 } else { 3116 document.addEventListener(SDK_READY_EVENT, function() { 3117 dcView(component); 3118 }); 3119 } 3120 } 3121 } 3122 3123 function dcView(component) { 3124 var adobeDCView = new window.AdobeDC.View({ 3125 clientId: component.dataset.cmpClientId, 3126 divId: component.id + "-content", 3127 reportSuiteId: component.dataset.cmpReportSuiteId, 3128 locale: typeof Granite !== "undefined" && Granite && Granite.I18n ? Granite.I18n.getLocale() : navigator.language || navigator.userLanguage 3129 }); 3130 adobeDCView.previewFile({ 3131 content: { location: { url: component.dataset.cmpDocumentPath } }, 3132 metaData: { fileName: component.dataset.cmpDocumentFileName } 3133 }, JSON.parse(component.dataset.cmpViewerConfigJson)); 3134 } 3135 3136 /** 3137 * Document ready handler and DOM mutation observers. Initializes Accordion components as necessary. 3138 * 3139 * @private 3140 */ 3141 function onDocumentReady() { 3142 var elements = document.querySelectorAll(selectors.self); 3143 for (var i = 0; i < elements.length; i++) { 3144 previewPdf(elements[i]); 3145 } 3146 3147 var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; 3148 var body = document.querySelector("body"); 3149 var observer = new MutationObserver(function(mutations) { 3150 mutations.forEach(function(mutation) { 3151 // needed for IE 3152 var nodesArray = [].slice.call(mutation.addedNodes); 3153 if (nodesArray.length > 0) { 3154 nodesArray.forEach(function(addedNode) { 3155 if (addedNode.querySelectorAll) { 3156 var elementsArray = [].slice.call(addedNode.querySelectorAll(selectors.self)); 3157 elementsArray.forEach(function(element) { 3158 previewPdf(element); 3159 }); 3160 } 3161 }); 3162 } 3163 }); 3164 }); 3165 3166 observer.observe(body, { 3167 subtree: true, 3168 childList: true, 3169 characterData: true 3170 }); 3171 3172 } 3173 3174 if (document.readyState !== "loading") { 3175 onDocumentReady(); 3176 } else { 3177 document.addEventListener("DOMContentLoaded", onDocumentReady); 3178 } 3179}()); 3180 3181 3182 3183/******************************************************************************* 3184 * Copyright 2022 Adobe 3185 * 3186 * Licensed under the Apache License, Version 2.0 (the "License");
3187 * you may not use this file except in compliance with the License. 3188 * You may obtain a copy of the License at 3189 * 3190 * http://www.apache.org/licenses/LICENSE-2.0 3191 * 3192 * Unless required by applicable law or agreed to in writing, software 3193 * distributed under the License is distributed on an "AS IS" BASIS, 3194 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3195 * See the License for the specific language governing permissions and 3196 * limitations under the License. 3197 ******************************************************************************/ 3198(function() { 3199 "use strict"; 3200 3201 var dataLayerEnabled; 3202 var dataLayer; 3203 var dataLayerName; 3204 3205 /** 3206 * Adds Click Event Listener to the main <div> of the Text Components 3207 */ 3208 function addClickEventListenerToTextComponents() { 3209 var componentMainDivs = document.getElementsByClassName("cmp-text"); 3210 3211 for (var i = 0; i < componentMainDivs.length; i++) { 3212 componentMainDivs[i].addEventListener("click", addClickedLinkToDataLayer); 3213 } 3214 } 3215 3216 /** 3217 * Adds clicked link contained by the Text Component to Data Layer 3218 * 3219 * @private 3220 * @param {Object} event The Click event 3221 */ 3222 function addClickedLinkToDataLayer(event) { 3223 var element = event.currentTarget; 3224 var componentId = getDataLayerId(element); 3225 3226 if (event.target.tagName === "A") { 3227 dataLayer.push({ 3228 event: "cmp:click", 3229 eventInfo: { 3230 path: "component." + componentId, 3231 link: event.target.getAttribute("href") 3232 } 3233 }); 3234 } 3235 } 3236 3237 /** 3238 * Parses the dataLayer string and returns the ID 3239 * 3240 * @private 3241 * @param {HTMLElement} item, the Text item 3242 * @returns {String} dataLayerId or undefined 3243 */ 3244 function getDataLayerId(item) { 3245 if (item) { 3246 if (item.dataset.cmpDataLayer) { 3247 return Object.keys(JSON.parse(item.dataset.cmpDataLayer))[0]; 3248 } else { 3249 return item.id; 3250 } 3251 } 3252 return null; 3253 } 3254 3255 function onDocumentReady() { 3256 dataLayerEnabled = document.body.hasAttribute("data-cmp-data-layer-enabled"); 3257 if (dataLayerEnabled) { 3258 dataLayerName = document.body.getAttribute("data-cmp-data-layer-name") || "adobeDataLayer"; 3259 dataLayer = window[dataLayerName] = window[dataLayerName] || []; 3260 3261 addClickEventListenerToTextComponents(); 3262 } 3263 } 3264 3265 if (document.readyState !== "loading") { 3266 onDocumentReady(); 3267 } else { 3268 document.addEventListener("DOMContentLoaded", onDocumentReady); 3269 } 3270})(); 3271 3272 3273/******************************************************************************* 3274 * Copyright 2022 Adobe 3275 * 3276 * Licensed under the Apache License, Version 2.0 (the "License"); 3277 * you may not use this file except in compliance with the License. 3278 * You may obtain a copy of the License at 3279 * 3280 * http://www.apache.org/licenses/LICENSE-2.0 3281 * 3282 * Unless required by applicable law or agreed to in writing, software 3283 * distributed under the License is distributed on an "AS IS" BASIS, 3284 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3285 * See the License for the specific language governing permissions and 3286 * limitations under the License. 3287 ******************************************************************************/ 3288(function() { 3289 "use strict"; 3290 3291 var linkAccessibilityClass = "cmp-link__screen-reader-only"; 3292 var selectors = { 3293 linkAccessibility: "." + linkAccessibilityClass, 3294 linkAccessibilityEnabled: "[data-cmp-link-accessibility-enabled]", 3295 linkAccessibilityText: "[data-cmp-link-accessibility-text]" 3296 }; 3297 3298 function getLinkAccessibilityText() { 3299 var linkAccessibilityEnabled = document.querySelectorAll(selectors.linkAccessibilityEnabled); 3300 if (!linkAccessibilityEnabled[0]) { 3301 return; 3302 } 3303 var linkAccessibilityTextElements = document.querySelectorAll(selectors.linkAccessibilityText); 3304 if (!linkAccessibilityTextElements[0]) { 3305 return; 3306 } 3307 return linkAccessibilityTextElements[0].dataset.cmpLinkAccessibilityText; 3308 } 3309 3310 function onDocumentReady() { 3311 var linkAccessibilityText = getLinkAccessibilityText(); 3312 if (linkAccessibilityText) { 3313 document.querySelectorAll("a[target='_blank']").forEach(function(link) { 3314 if (!link.querySelector(selectors.linkAccessibility)) { 3315 var linkAccessibilityElement = document.createElement("span"); 3316 linkAccessibilityElement.classList.add(linkAccessibilityClass); 3317 linkAccessibilityElement.innerText = linkAccessibilityText; 3318 link.insertAdjacentElement("beforeend", linkAccessibilityElement); 3319 } 3320 }); 3321 } 3322 } 3323 3324 if (document.readyState !== "loading") { 3325 onDocumentReady(); 3326 } else { 3327 document.addEventListener("DOMContentLoaded", onDocumentReady); 3328 } 3329 3330}()); 3331 3332 3333window.$CQ=_g.$; 3334/******************************************************************************* 3335 * Copyright 2020 Adobe 3336 * 3337 * Licensed under the Apache License, Version 2.0 (the "License");
3338 * you may not use this file except in compliance with the License. 3339 * You may obtain a copy of the License at 3340 * 3341 * http://www.apache.org/licenses/LICENSE2.0 3342 * 3343 * Unless required by applicable law or agreed to in writing, software 3344 * distributed under the License is distributed on an "AS IS" BASIS, 3345 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3346 * See the License for the specific language governing permissions and 3347 * limitations under the License. 3348 ******************************************************************************/ 3349 3350/** 3351 * Element.matches() 3352 * https://developer.mozilla.org/enUS/docs/Web/API/Element/matches#Polyfill 3353 */ 3354if (!Element.prototype.matches) { 3355 Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; 3356} 3357 3358// eslint-disable-next-line valid-jsdoc 3359/** 3360 * Element.closest() 3361 * https://developer.mozilla.org/enUS/docs/Web/API/Element/closest#Polyfill 3362 */ 3363if (!Element.prototype.closest) { 3364 Element.prototype.closest = function(s) { 3365 "use strict"; 3366 var el = this; 3367 if (!document.documentElement.contains(el)) { 3368 return null; 3369 } 3370 do { 3371 if (el.matches(s)) { 3372 return el; 3373 } 3374 el = el.parentElement || el.parentNode; 3375 } while (el !== null && el.nodeType === 1); 3376 return null; 3377 }; 3378} 3379 3380// https://tc39.github.io/ecma262/#sec-array.prototype.find 3381if (!Array.prototype.find) { 3382 Object.defineProperty(Array.prototype, "find", { 3383 value: function(predicate) { 3384 "use strict"; 3385 // 1. Let O be ? ToObject(this value). 3386 if (this == null) { 3387 throw TypeError('"this" is null or not defined'); 3388 } 3389 3390 var o = Object(this); 3391 3392 // 2. Let len be ? ToLength(? Get(O, "length")). 3393 var len = o.length >>> 0; 3394 3395 // 3. If IsCallable(predicate) is false, throw a TypeError exception. 3396 if (typeof predicate !== "function") { 3397 throw TypeError("predicate must be a function"); 3398 } 3399 3400 // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. 3401 var thisArg = arguments[1]; 3402 3403 // 5. Let k be 0. 3404 var k = 0; 3405 3406 // 6. Repeat, while k < len 3407 while (k < len) { 3408 // a. Let Pk be ! ToString(k). 3409 // b. Let kValue be ? Get(O, Pk). 3410 // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). 3411 // d. If testResult is true, return kValue. 3412 var kValue = o[k]; 3413 if (predicate.call(thisArg, kValue, k, o)) { 3414 return kValue; 3415 } 3416 // e. Increase k by 1. 3417 k++; 3418 } 3419 3420 // 7. Return undefined. 3421 return undefined; 3422 }, 3423 configurable: true, 3424 writable: true 3425 }); 3426} 3427 3428/******************************************************************************* 3429 * Copyright 2020 Adobe 3430 * 3431 * Licensed under the Apache License, Version 2.0 (the "License"); 3432 * you may not use this file except in compliance with the License. 3433 * You may obtain a copy of the License at 3434 * 3435 * http://www.apache.org/licenses/LICENSE-2.0 3436 * 3437 * Unless required by applicable law or agreed to in writing, software 3438 * distributed under the License is distributed on an "AS IS" BASIS, 3439 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3440 * See the License for the specific language governing permissions and 3441 * limitations under the License. 3442 ******************************************************************************/ 3443(function() { 3444 "use strict"; 3445 3446 var dataLayerEnabled; 3447 var dataLayerName; 3448 var dataLayer; 3449 3450 function addComponentToDataLayer(component) { 3451 dataLayer.push({ 3452 component: getComponentObject(component) 3453 }); 3454 } 3455 3456 function attachClickEventListener(element) { 3457 element.addEventListener("click", addClickToDataLayer); 3458 } 3459 3460 function getComponentObject(element) { 3461 var component = getComponentData(element); 3462 var componentID = Object.keys(component)[0]; 3463 // if the component does not have a parent ID property, use the ID of the parent element 3464 if (component && component[componentID] && !component[componentID].parentId) { 3465 var parentElement = element.parentNode.closest("[data-cmp-data-layer], body"); 3466 if (parentElement) { 3467 component[componentID].parentId = parentElement.id; 3468 } 3469 } 3470 3471 return component; 3472 } 3473 3474 function addClickToDataLayer(event) { 3475 var element = event.currentTarget; 3476 var componentId = getClickId(element); 3477 3478 dataLayer.push({ 3479 event: "cmp:click", 3480 eventInfo: { 3481 path: "component." + componentId 3482 } 3483 }); 3484 } 3485 3486 function getComponentData(element) { 3487 var dataLayerJson = element.dataset.cmpDataLayer; 3488 if (dataLayerJson) { 3489 return JSON.parse(dataLayerJson); 3490 } else { 3491 return undefined; 3492 } 3493 } 3494 3495 function getClickId(element) { 3496 if (element.dataset.cmpDataLayer) { 3497 return Object.keys(JSON.parse(element.dataset.cmpDataLayer))[0]; 3498 } 3499 3500 var componentElement = element.closest("[data-cmp-data-layer]"); 3501 3502 return Object.keys(JSON.parse(componentElement.dataset.cmpDataLayer))[0]; 3503 } 3504 3505 function onDocumentReady() { 3506 dataLayerEnabled = document.body.hasAttribute("data-cmp-data-layer-enabled"); 3507 if (dataLayerEnabled) { 3508 dataLayerName = document.body.getAttribute("data-cmp-data-layer-name") || "adobeDataLayer"; 3509 dataLayer = window[dataLayerName] = window[dataLayerName] || []; 3510 3511 var components = document.querySelectorAll("[data-cmp-data-layer]"); 3512 var clickableElements = document.querySelectorAll("[data-cmp-clickable]"); 3513
3514 components.forEach(function(component) { 3515 addComponentToDataLayer(component); 3516 }); 3517 3518 clickableElements.forEach(function(element) { 3519 attachClickEventListener(element); 3520 }); 3521 3522 dataLayer.push({ 3523 event: "cmp:loaded" 3524 }); 3525 } 3526 } 3527 3528 if (document.readyState !== "loading") { 3529 onDocumentReady(); 3530 } else { 3531 document.addEventListener("DOMContentLoaded", onDocumentReady); 3532 } 3533 3534}()); 3535 3536 3537"use strict";function _slicedToArray(t,e){return _arrayWithHoles(t)||_iterableToArrayLimit(t,e)||_unsupportedIterableToArray(t,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=t[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!e||n.length!==e);r=!0);}catch(t){o=!0,a=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw a}}return n}}function _arrayWithHoles(t){if(Array.isArray(t))return t}function _createForOfIteratorHelper(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=_unsupportedIterableToArray(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o,a=!0,i=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return a=t.done,t},e:function(t){i=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(i)throw o}}}}function _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(t,e):void 0}}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function a(i,u,c){function f(e,t){if(!u[e]){if(!i[e]){var n="function"==typeof require&&require;if(!t&&n)return n(e,!0);if(s)return s(e,!0);var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}var o=u[e]={exports:{}};i[e][0].call(o.exports,function(t){return f(i[e][1][t]||t)},o,o.exports,a,i,u,c)}return u[e].exports}for(var s="function"==typeof require&&require,t=0;t<c.length;t++)f(c[t]);return f}({1:[function(t,wn,En){(function(On){(function(){function n(t,e){for(var n=-1,r=null==t?0:t.length,o=0,a=[];++n<r;){var i=t[n];e(i,n,t)&&(a[o++]=i)}return a}function a(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}function f(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}function b(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function o(t,e,n){var r=t.length;for(n+=-1;++n<r;)if(e(t[n],n,t))return n;return-1}function i(t){return t!=t}function t(e){return function(t){return e(t)}}function h(t){var n=-1,r=Array(t.size);return t.forEach(function(t,e){r[++n]=[e,t]}),r}function e(e){var n=Object;return function(t){return e(n(t))}}function v(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function r(){}function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function s(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function d(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new s;++e<n;)this.add(t[e])}function g(t){this.size=(this.__data__=new c(t)).size}function l(t,e){var n=hn(t),r=!n&&bn(t),o=!n&&!r&&vn(t),a=!n&&!r&&!o&&_n(t);if(n=n||r||o||a){r=t.length;for(var i=String,u=-1,c=Array(r);++u<r;)c[u]=i(u);r=c}else r=[];var f;i=r.length;for(f in t)!e&&!be.call(t,f)||n&&("length"==f||o&&("offset"==f||"parent"==f)||a&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||Q(f,i))||r.push(f);return r}function _(t,e,n){(n===Mt||ft(t[e],n))&&(n!==Mt||e in t)||j(t,e,n)}function y(t,e,n){var r=t[e];be.call(t,e)&&ft(r,n)&&(n!==Mt||e in t)||j(t,e,n)}function p(t,e){for(var n=t.length;n--;)if(ft(t[n][0],e))return n;return-1}function j(t,e,n){"__proto__"==e&&xe?xe(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function m(n,r,o,t,e,a){var i,u=1&r,c=2&r,f=4&r;
3537if(o&&(i=e?o(n,t,e,a):o(n)),i!==Mt)return i;if(!bt(n))return n;if(t=hn(n)){if(i=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&be.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(n),!u)return U(n,i)}else{var s=nn(n),l="[object Function]"==s||"[object GeneratorFunction]"==s;if(vn(n))return M(n,u);if("[object Object]"==s||"[object Arguments]"==s||l&&!e){if(i=c||l?{}:Y(n),!u)return c?function(t,e){return P(t,en(t),e)}(n,function(t,e){return t&&P(e,St(e),t)}(i,n)):function(t,e){return P(t,tn(t),e)}(n,function(t,e){return t&&P(e,Lt(e),t)}(i,n))}else{if(!Kt[s])return e?n:{};i=function(t,e,n){var r=t.constructor;switch(e){case"[object ArrayBuffer]":return z(t);case"[object Boolean]":case"[object Date]":return new r(+t);case"[object DataView]":return e=n?z(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return C(t,n);case"[object Map]":return new r;case"[object Number]":case"[object String]":return new r(t);case"[object RegExp]":return(e=new t.constructor(t.source,Ht.exec(t))).lastIndex=t.lastIndex,e;case"[object Set]":return new r;case"[object Symbol]":return qe?Object(qe.call(t)):{}}}(n,s,u)}}if(e=(a=a||new g).get(n))return e;if(a.set(n,i),gn(n))return n.forEach(function(t){i.add(m(t,r,o,t,n,a))}),i;if(dn(n))return n.forEach(function(t,e){i.set(e,m(t,r,o,e,n,a))}),i;c=f?c?B:H:c?St:Lt;var p=t?Mt:c(n);return function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););}(p||n,function(t,e){p&&(t=n[e=t]),y(i,e,m(t,r,o,e,n,a))}),i}function A(t,e){for(var n=0,r=(e=F(e,t)).length;null!=t&&n<r;)t=t[nt(e[n++])];return n&&n==r?t:Mt}function O(t,e,n){return e=e(t),hn(t)?e:f(e,n(t))}function w(t){if(null==t)t=t===Mt?"[object Undefined]":"[object Null]";else if(Te&&Te in Object(t)){var e=be.call(t,Te),n=t[Te];try{t[Te]=Mt;var r=!0}catch(t){}var o=ve.call(t);r&&(e?t[Te]=n:delete t[Te]),t=o}else t=ve.call(t);return t}function E(t,e){return null!=t&&be.call(t,e)}function L(t,e){return null!=t&&e in Object(t)}function S(t){return ht(t)&&"[object Arguments]"==w(t)}function T(t,e,n,r,o){if(t===e)e=!0;else if(null==t||null==e||!ht(t)&&!ht(e))e=t!=t&&e!=e;else t:{var a,i,u=hn(t),c=hn(e),f="[object Object]"==(a="[object Arguments]"==(a=u?"[object Array]":nn(t))?"[object Object]":a);c="[object Object]"==(i="[object Arguments]"==(i=c?"[object Array]":nn(e))?"[object Object]":i);if((i=a==i)&&vn(t)){if(!vn(e)){e=!1;break t}f=!(u=!0)}if(i&&!f)o=o||new g,e=u||_n(t)?V(t,e,n,r,T,o):function(t,e,n,r,o,a,i){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)break;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":if(t.byteLength!=e.byteLength||!a(new me(t),new me(e)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return ft(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var u=h;case"[object Set]":if(u=u||v,t.size!=e.size&&!(1&r))break;return(n=i.get(t))?n==e:(r|=2,i.set(t,e),e=V(u(t),u(e),r,o,a,i),i.delete(t),e);case"[object Symbol]":if(qe)return qe.call(t)==qe.call(e)}return!1}(t,e,a,n,r,T,o);else{if(!(1&n)&&(u=f&&be.call(t,"__wrapped__"),a=c&&be.call(e,"__wrapped__"),u||a)){e=T(t=u?t.value():t,e=a?e.value():e,n,r,o=o||new g);break t}if(i)e:if(o=o||new g,u=1&n,a=H(t),c=a.length,i=H(e).length,c==i||u){for(f=c;f--;){var s=a[f];if(!(u?s in e:be.call(e,s))){e=!1;break e}}if((i=o.get(t))&&o.get(e))e=i==e;else{i=!0,o.set(t,e),o.set(e,t);for(var l=u;++f<c;){var p=t[s=a[f]],y=e[s];if(r)var b=u?r(y,p,s,e,t,o):r(p,y,s,t,e,o);if(b===Mt?p!==y&&!T(p,y,n,r,o):!b){i=!1;break}l=l||"constructor"==s}i&&!l&&((n=t.constructor)!=(r=e.constructor)&&"constructor"in t&&"constructor"in e&&!("function"==typeof n&&n instanceof n&&"function"==typeof r&&r instanceof r)&&(i=!1)),o.delete(t),o.delete(e),e=i}}else e=!1;else e=!1}}return e}function x(t){return"function"==typeof t?t:null==t?It:"object"==_typeof(t)?hn(t)?function(n,r){return X(n)&&r==r&&!bt(r)?tt(nt(n),r):function(t){var e=wt(t,n);return e===Mt&&e===r?Et(t,n):T(r,e,3)}}(t[0],t[1]):function(e){var n=function(t){for(var e=Lt(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,o==o&&!bt(o)]}return e}(e);return 1==n.length&&n[0][2]?tt(n[0][0],n[0][1]):function(t){return t===e||function(t,e){var n=e.length,r=n;if(null==t)return!r;for(t=Object(t);n--;){if((o=e[n])[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++n<r;
3537){var o,a=(o=e[n])[0],i=t[a],u=o[1];if(o[2]){if(i===Mt&&!(a in t))return!1}else if(o=new g,void 0!==Mt||!T(u,i,3,void 0,o))return!1}return!0}(t,n)}}(t):Nt(t)}function I(t){if(!Z(t))return Ne(t);var e,n=[];for(e in Object(t))be.call(t,e)&&"constructor"!=e&&n.push(e);return n}function k(s,l,p,y,b){s!==l&&Xe(l,function(t,e){if(bt(t)){var n=b=b||new g,r="__proto__"==e?Mt:s[e],o="__proto__"==e?Mt:l[e];if(f=n.get(o))_(s,e,f);else{var a=(f=y?y(r,o,e+"",s,l,n):Mt)===Mt;if(a){var i=hn(o),u=!i&&vn(o),c=!i&&!u&&_n(o),f=o;i||u||c?f=hn(r)?r:lt(r)?U(r):u?M(o,!(a=!1)):c?C(o,!(a=!1)):[]:vt(o)||bn(o)?bn(f=r)?f=At(r):(!bt(r)||p&&pt(r))&&(f=Y(o)):a=!1}a&&(n.set(o,f),k(f,o,p,y,n),n.delete(o)),_(s,e,f)}}else(n=y?y("__proto__"==e?Mt:s[e],t,e+"",s,l,b):Mt)===Mt&&(n=t),_(s,e,n)},St)}function N(t){if("string"==typeof t)return t;if(hn(t))return a(t,N)+"";if(gt(t))return Je?Je.call(t):"";var e=t+"";return"0"==e&&1/t==-zt?"-0":e}function D(t,e){var n;if((e=F(e,t)).length<2)n=t;else{var r=0,o=-1,a=-1,i=(n=e).length;for(r<0&&(r=i<-r?0:i+r),(o=i<o?i:o)<0&&(o+=i),i=o<r?0:o-r>>>0,r>>>=0,o=Array(i);++a<i;)o[a]=n[a+r];n=A(t,o)}null==(t=n)||delete t[nt(it(e))]}function F(t,e){return hn(t)?t:X(t,e)?[t]:ln(Ot(t))}function M(t,e){if(e)return t.slice();var n=t.length;n=Ae?Ae(n):new t.constructor(n);return t.copy(n),n}function z(t){var e=new t.constructor(t.byteLength);return new me(e).set(new me(t)),e}function C(t,e){return new t.constructor(e?z(t.buffer):t.buffer,t.byteOffset,t.length)}function U(t,e){var n=-1,r=t.length;for(e=e||Array(r);++n<r;)e[n]=t[n];return e}function P(t,e,n){var r=!n;n=n||{};for(var o=-1,a=e.length;++o<a;){var i=e[o],u=Mt;u===Mt&&(u=t[i]),r?j(n,i,u):y(n,i,u)}return n}function R(f){return function(t){return sn(et(t,void 0,It),t+"")}(function(t,e){var n,r=-1,o=e.length,a=1<o?e[o-1]:Mt,i=2<o?e[2]:Mt;a=3<f.length&&"function"==typeof a?(o--,a):Mt;if(n=i){n=e[0];var u=e[1];if(bt(i)){var c=_typeof(u);n=!!("number"==c?st(i)&&Q(u,i.length):"string"==c&&u in i)&&ft(i[u],n)}else n=!1}for(n&&(a=o<3?Mt:a,o=1),t=Object(t);++r<o;)(i=e[r])&&f(t,i,r,a);return t})}function $(t){return vt(t)?Mt:t}function V(t,e,n,r,o,a){var i=1&n,u=t.length;if(u!=(c=e.length)&&!(i&&u<c))return!1;if((c=a.get(t))&&a.get(e))return c==e;var c=-1,f=!0,s=2&n?new d:Mt;for(a.set(t,e),a.set(e,t);++c<u;){var l=t[c],p=e[c];if(r)var y=i?r(p,l,c,e,t,a):r(l,p,c,t,e,a);if(y!==Mt){if(y)continue;f=!1;break}if(s){if(!b(e,function(t,e){if(!s.has(e)&&(l===t||o(l,t,n,r,a)))return s.push(e)})){f=!1;break}}else if(l!==p&&!o(l,p,n,r,a)){f=!1;break}}return a.delete(t),a.delete(e),f}function H(t){return O(t,Lt,tn)}function B(t){return O(t,St,en)}function W(t,e){var n=(n=r.iteratee||kt)===kt?x:n;return arguments.length?n(t,e):n}function G(t,e){var n=t.__data__,r=_typeof(e);return("string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==e:null===e)?n["string"==typeof e?"string":"hash"]:n.map}function q(t,e){var n=null==t?Mt:t[e];return!bt(n)||he&&he in n||!(pt(n)?ge:Gt).test(rt(n))?Mt:n}function J(t,e,n){for(var r=-1,o=(e=F(e,t)).length,a=!1;++r<o;){var i=nt(e[r]);if(!(a=null!=t&&n(t,i)))break;t=t[i]}return a||++r!=o?a:!!(o=null==t?0:t.length)&&yt(o)&&Q(i,o)&&(hn(t)||bn(t))}function Y(t){return"function"!=typeof t.constructor||Z(t)?{}:Ye(Oe(t))}function K(t){return hn(t)||bn(t)||!!(Se&&t&&t[Se])}function Q(t,e){var n=_typeof(t);return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Jt.test(t))&&-1<t&&0==t%1&&t<e}function X(t,e){if(hn(t))return!1;var n=_typeof(t);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!gt(t))||Pt.test(t)||!Ut.test(t)||null!=e&&t in Object(e)}function Z(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||le)}function tt(e,n){return function(t){return null!=t&&t[e]===n&&(n!==Mt||e in Object(t))}}function et(o,a,i){return a=De(a===Mt?o.length-1:a,0),function(){for(var t=arguments,e=-1,n=De(t.length-a,0),r=Array(n);++e<n;)r[e]=t[a+e];for(e=-1,n=Array(a+1);++e<a;)n[e]=t[e];return n[a]=i(r),function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(o,this,n)}}function nt(t){if("string"==typeof t||gt(t))return t;var e=t+"";return"0"==e&&1/t==-zt?"-0":e}function rt(t){if(null==t)return"";try{return ye.call(t)}catch(t){}return t+""}function ot(t,e,n){var r=null==t?0:t.length;return r?((n=null==n?0:jt(n))<0&&(n=De(r+n,0)),o(t,W(e,3),n)):-1}function at(t){return null!=t&&t.length?function t(e,n,r,o,a){var i=-1,u=e.length;for(r=r||K,a=a||[];++i<u;){var c=e[i];0<n&&r(c)?1<n?t(c,n-1,r,o,a):f(a,c):o||(a[a.length]=c)}return a}(t,1):[]}function it(t){var e=null==t?0:t.length;return e?t[e-1]:Mt}function ut(r,o){function a(){var t=arguments,e=o?o.apply(this,t):t[0],n=a.cache;return n.has(e)?n.get(e):(t=r.apply(this,t),a.cache=n.set(e,t)||n,t)}if("function"!=typeof r||null!=o&&"function"!=typeof o)throw new TypeError("Expected a function");return a.cache=new(ut.Cache||s),a}function ct(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function ft(t,e){return t===e||t!=t&&e!=e}function st(t){return null!=t&&yt(t.length)&&!pt(t)}function lt(t){return ht(t)&&st(t)}function pt(t){return!!bt(t)&&("[object Function]"==(t=w(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)}function yt(t){return"number"==typeof t&&-1<t&&0==t%1&&t<=9007199254740991}function bt(t){var e=_typeof(t);return null!=t&&("object"==e||"function"==e)}function ht(t){return null!=t&&"object"==_typeof(t)}function vt(t){return!(!ht(t)||"[object Object]"!=w(t))&&(null===(t=Oe(t))||"function"==typeof(t=be.call(t,"constructor")&&t.constructor)&&t instanceof t&&ye.call(t)==de)}function dt(t){return"string"==typeof t||!hn(t)&&ht(t)&&"[object String]"==w(t)}function gt(t){return"symbol"==_typeof(t)||ht(t)&&"[object Symbol]"==w(t)}function _t(t){return t?(t=mt(t))===zt||t===-zt?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function jt(t){var e=(t=_t(t))%1;return t==t?e?t-e:t:0}function mt(t){if("number"==typeof t)return t;if(gt(t))return Ct;if(bt(t)&&(t=bt(t="function"==typeof t.valueOf?t.valueOf():t)?t+"":t),"string"!=typeof t)return 0===t?t:+t;t=t.replace($t,"");var e=Wt.test(t);return e||qt.test(t)?Xt(t.slice(2),e?2:8):Bt.test(t)?Ct:+t}function At(t){return P(t,St(t))}function Ot(t){return null==t?"":N(t)}function wt(t,e,n){return(t=null==t?Mt:A(t,e))===Mt?n:t}function Et(t,e){return null!=t&&J(t,e,L)}function Lt(t){return st(t)?l(t):I(t)}function St(t){if(st(t))t=l(t,!0);else if(bt(t)){var e,n=Z(t),r=[];for(e in t)("constructor"!=e||!n&&be.call(t,e))&&r.push(e);t=r}else{if(e=[],null!=t)for(n in Object(t))e.push(n);t=e}return t}function Tt(t){return null==t?[]:function(e,t){return a(t,function(t){return e[t]})}(t,Lt(t))}function xt(t){return function(){return t}}function It(t){return t}function kt(t){return x("function"==typeof t?t:m(t,1))}function Nt(t){return X(t)?function(e){return function(t){return null==t?Mt:t[e]}}(nt(t)):function(e){return function(t){return A(t,e)}}(t)}function Dt(){return[]}function Ft(){return!1}var Mt,zt=1/0,Ct=NaN,Ut=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pt=/^\w*$/,Rt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$t=/^\s+|\s+$/g,Vt=/\\(\\)?/g,Ht=/\w*$/,Bt=/^[-+]0x[0-9a-f]+$/i,Wt=/^0b[01]+$/i,Gt=/^\[object .+?Constructor\]$/,qt=/^0o[0-7]+$/i,Jt=/^(?:0|[1-9]\d*)$/,Yt={};
3537Yt["[object Float32Array]"]=Yt["[object Float64Array]"]=Yt["[object Int8Array]"]=Yt["[object Int16Array]"]=Yt["[object Int32Array]"]=Yt["[object Uint8Array]"]=Yt["[object Uint8ClampedArray]"]=Yt["[object Uint16Array]"]=Yt["[object Uint32Array]"]=!0,Yt["[object Arguments]"]=Yt["[object Array]"]=Yt["[object ArrayBuffer]"]=Yt["[object Boolean]"]=Yt["[object DataView]"]=Yt["[object Date]"]=Yt["[object Error]"]=Yt["[object Function]"]=Yt["[object Map]"]=Yt["[object Number]"]=Yt["[object Object]"]=Yt["[object RegExp]"]=Yt["[object Set]"]=Yt["[object String]"]=Yt["[object WeakMap]"]=!1;var Kt={};Kt["[object Arguments]"]=Kt["[object Array]"]=Kt["[object ArrayBuffer]"]=Kt["[object DataView]"]=Kt["[object Boolean]"]=Kt["[object Date]"]=Kt["[object Float32Array]"]=Kt["[object Float64Array]"]=Kt["[object Int8Array]"]=Kt["[object Int16Array]"]=Kt["[object Int32Array]"]=Kt["[object Map]"]=Kt["[object Number]"]=Kt["[object Object]"]=Kt["[object RegExp]"]=Kt["[object Set]"]=Kt["[object String]"]=Kt["[object Symbol]"]=Kt["[object Uint8Array]"]=Kt["[object Uint8ClampedArray]"]=Kt["[object Uint16Array]"]=Kt["[object Uint32Array]"]=!0,Kt["[object Error]"]=Kt["[object Function]"]=Kt["[object WeakMap]"]=!1;var Qt,Xt=parseInt,Zt="object"==_typeof(On)&&On&&On.Object===Object&&On,te="object"==("undefined"==typeof self?"undefined":_typeof(self))&&self&&self.Object===Object&&self,ee=Zt||te||Function("return this")(),ne="object"==_typeof(En)&&En&&!En.nodeType&&En,re=ne&&"object"==_typeof(wn)&&wn&&!wn.nodeType&&wn,oe=re&&re.exports===ne,ae=oe&&Zt.process;t:{try{Qt=ae&&ae.binding&&ae.binding("util");break t}catch(t){}Qt=void 0}var ie,ue=Qt&&Qt.isMap,ce=Qt&&Qt.isSet,fe=Qt&&Qt.isTypedArray,se=Array.prototype,le=Object.prototype,pe=ee["__core-js_shared__"],ye=Function.prototype.toString,be=le.hasOwnProperty,he=(ie=/[^.]+$/.exec(pe&&pe.keys&&pe.keys.IE_PROTO||""))?"Symbol(src)_1."+ie:"",ve=le.toString,de=ye.call(Object),ge=RegExp("^"+ye.call(be).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_e=oe?ee.Buffer:Mt,je=ee.Symbol,me=ee.Uint8Array,Ae=_e?_e.a:Mt,Oe=e(Object.getPrototypeOf),we=Object.create,Ee=le.propertyIsEnumerable,Le=se.splice,Se=je?je.isConcatSpreadable:Mt,Te=je?je.toStringTag:Mt,xe=function(){try{var t=q(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Ie=Object.getOwnPropertySymbols,ke=_e?_e.isBuffer:Mt,Ne=e(Object.keys),De=Math.max,Fe=Date.now,Me=q(ee,"DataView"),ze=q(ee,"Map"),Ce=q(ee,"Promise"),Ue=q(ee,"Set"),Pe=q(ee,"WeakMap"),Re=q(Object,"create"),$e=rt(Me),Ve=rt(ze),He=rt(Ce),Be=rt(Ue),We=rt(Pe),Ge=je?je.prototype:Mt,qe=Ge?Ge.valueOf:Mt,Je=Ge?Ge.toString:Mt,Ye=function(t){return bt(t)?we?we(t):(Ke.prototype=t,t=new Ke,Ke.prototype=Mt,t):{}};function Ke(){}u.prototype.clear=function(){this.__data__=Re?Re(null):{},this.size=0},u.prototype.delete=function(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t},u.prototype.get=function(t){var e=this.__data__;return Re?"__lodash_hash_undefined__"===(t=e[t])?Mt:t:be.call(e,t)?e[t]:Mt},u.prototype.has=function(t){var e=this.__data__;return Re?e[t]!==Mt:be.call(e,t)},u.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Re&&e===Mt?"__lodash_hash_undefined__":e,this},c.prototype.clear=function(){this.__data__=[],this.size=0},c.prototype.delete=function(t){var e=this.__data__;return!((t=p(e,t))<0||(t==e.length-1?e.pop():Le.call(e,t,1),--this.size,0))},c.prototype.get=function(t){var e=this.__data__;return(t=p(e,t))<0?Mt:e[t][1]},c.prototype.has=function(t){return-1<p(this.__data__,t)},c.prototype.set=function(t,e){var n=this.__data__,r=p(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},s.prototype.clear=function(){this.size=0,this.__data__={hash:new u,map:new(ze||c),string:new u}},s.prototype.delete=function(t){return t=G(this,t).delete(t),this.size-=t?1:0,t},s.prototype.get=function(t){return G(this,t).get(t)},s.prototype.has=function(t){return G(this,t).has(t)},s.prototype.set=function(t,e){var n=G(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},d.prototype.add=d.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},d.prototype.has=function(t){return this.__data__.has(t)},g.prototype.clear=function(){this.__data__=new c,this.size=0},g.prototype.delete=function(t){var e=this.__data__;return t=e.delete(t),this.size=e.size,t},g.prototype.get=function(t){return this.__data__.get(t)},g.prototype.has=function(t){return this.__data__.has(t)},g.prototype.set=function(t,e){var n=this.__data__;if(n instanceof c){var r=n.__data__;if(!ze||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new s(r)}return n.set(t,e),this.size=n.size,this};var Qe=function(t,e){if(null==t)return t;if(!st(t))return function(t,e){return t&&Xe(t,e,Lt)}(t,e);for(var n=t.length,r=-1,o=Object(t);++r<n&&!1!==e(o[r],r,o););return t},Xe=function(t,e,n){for(var r=-1,o=Object(t),a=(n=n(t)).length;a--;){var i=n[++r];if(!1===e(o[i],i,o))break}return t},Ze=xe?function(t,e){return xe(t,"toString",{configurable:!0,enumerable:!1,value:xt(e),writable:!0})}:It,tn=Ie?function(e){return null==e?[]:(e=Object(e),n(Ie(e),function(t){return Ee.call(e,t)}))}:Dt,en=Ie?function(t){for(var e=[];t;)f(e,tn(t)),t=Oe(t);return e}:Dt,nn=w;(Me&&"[object DataView]"!=nn(new Me(new ArrayBuffer(1)))||ze&&"[object Map]"!=nn(new ze)||Ce&&"[object Promise]"!=nn(Ce.resolve())||Ue&&"[object Set]"!=nn(new Ue)||Pe&&"[object WeakMap]"!=nn(new Pe))&&(nn=function(t){var e=w(t);if(t=(t="[object Object]"==e?t.constructor:Mt)?rt(t):"")switch(t){case $e:return"[object DataView]";case Ve:return"[object Map]";case He:return"[object Promise]";case Be:return"[object Set]";case We:return"[object WeakMap]"}return e});var rn,on,an,un,cn,fn,sn=(un=Ze,fn=cn=0,function(){var t=Fe(),e=16-(t-fn);if(fn=t,0<e){if(800<=++cn)return arguments[0]}else cn=0;return un.apply(Mt,arguments)}),ln=(an=(on=ut(on=function(t){var o=[];return 46===t.charCodeAt(0)&&o.push(""),t.replace(Rt,function(t,e,n,r){o.push(n?r.replace(Vt,"$1"):e||t)}),o},function(t){return 500===an.size&&an.clear(),t})).cache,on),pn=(rn=ot,function(t,e,n){var r=Object(t);if(!st(t)){var o=W(e,3);t=Lt(t),e=function(t){return o(r[t],t,r)}}return-1<(e=rn(t,e,n))?r[o?t[e]:e]:Mt});ut.Cache=s;var yn,bn=S(function(){return arguments}())?S:function(t){return ht(t)&&be.call(t,"callee")&&!Ee.call(t,"callee")},hn=Array.isArray,vn=ke||Ft,dn=ue?t(ue):function(t){return ht(t)&&"[object Map]"==nn(t)},gn=ce?t(ce):function(t){return ht(t)&&"[object Set]"==nn(t)}
3537,_n=fe?t(fe):function(t){return ht(t)&&yt(t.length)&&!!Yt[w(t)]},jn=R(function(t,e,n){k(t,e,n)}),mn=R(function(t,e,n,r){k(t,e,n,r)}),An=sn(et(yn=function(e,t){var n={};if(null==e)return n;var r=!1;t=a(t,function(t){return t=F(t,e),r=r||1<t.length,t}),P(e,B(e),n),r&&(n=m(n,7,$));for(var o=t.length;o--;)D(n,t[o]);return n},Mt,at),yn+"");r.constant=xt,r.flatten=at,r.iteratee=kt,r.keys=Lt,r.keysIn=St,r.memoize=ut,r.merge=jn,r.mergeWith=mn,r.negate=ct,r.omit=An,r.property=Nt,r.reject=function(t,e){return(hn(t)?n:function(t,r){var o=[];return Qe(t,function(t,e,n){r(t,e,n)&&o.push(t)}),o})(t,ct(W(e,3)))},r.toPlainObject=At,r.values=Tt,r.cloneDeep=function(t){return m(t,5)},r.cloneDeepWith=function(t,e){return m(t,5,e="function"==typeof e?e:Mt)},r.eq=ft,r.find=pn,r.findIndex=ot,r.get=wt,r.has=function(t,e){return null!=t&&J(t,e,E)},r.hasIn=Et,r.identity=It,r.includes=function(t,e,n,r){if(t=st(t)?t:Tt(t),n=n&&!r?jt(n):0,r=t.length,n<0&&(n=De(r+n,0)),dt(t))t=n<=r&&-1<t.indexOf(e,n);else{if(r=!!r){if(e==e)t:{for(n-=1,r=t.length;++n<r;)if(t[n]===e){t=n;break t}t=-1}else t=o(t,i,n);r=-1<t}t=r}return t},r.isArguments=bn,r.isArray=hn,r.isArrayLike=st,r.isArrayLikeObject=lt,r.isBuffer=vn,r.isEmpty=function(t){if(null==t)return!0;if(st(t)&&(hn(t)||"string"==typeof t||"function"==typeof t.splice||vn(t)||_n(t)||bn(t)))return!t.length;var e=nn(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(Z(t))return!I(t).length;for(var n in t)if(be.call(t,n))return!1;return!0},r.isEqual=function(t,e){return T(t,e)},r.isFunction=pt,r.isLength=yt,r.isMap=dn,r.isNull=function(t){return null===t},r.isObject=bt,r.isObjectLike=ht,r.isPlainObject=vt,r.isSet=gn,r.isString=dt,r.isSymbol=gt,r.isTypedArray=_n,r.last=it,r.stubArray=Dt,r.stubFalse=Ft,r.toFinite=_t,r.toInteger=jt,r.toNumber=mt,r.toString=Ot,r.VERSION="4.17.5",re&&((re.exports=r)._=r,ne._=r)}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(t,e,n){e.exports={itemType:{DATA:"data",FCTN:"fctn",EVENT:"event",LISTENER_ON:"listenerOn",LISTENER_OFF:"listenerOff"},dataLayerEvent:{CHANGE:"adobeDataLayer:change",EVENT:"adobeDataLayer:event"},listenerScope:{PAST:"past",FUTURE:"future",ALL:"all"}}},{}],3:[function(t,e,n){var r=t("../custom-lodash"),c=t("../version.json").version,l=r.cloneDeep,p=r.get,y=t("./item"),b=t("./listener"),h=t("./listenerManager"),v=t("./constants"),d=t("./utils/customMerge");e.exports=function(t){var f,e=t||{},n=[],r=[],o={},a={getState:function(){return o},getDataLayer:function(){return n}};function i(t){o=d(o,t.data)}function u(t){t.valid?{data:function(t){i(t),f.triggerListeners(t)},fctn:function(t){t.config.call(n,n)},event:function(t){t.data&&i(t),f.triggerListeners(t)},listenerOn:function(t){var e=b(t);switch(e.scope){case v.listenerScope.PAST:var n,r=_createForOfIteratorHelper(c(t));try{for(r.s();!(n=r.n()).done;){var o=n.value;f.triggerListener(e,o)}}catch(t){r.e(t)}finally{r.f()}break;case v.listenerScope.FUTURE:f.register(e);break;case v.listenerScope.ALL:if(f.register(e)){var a,i=_createForOfIteratorHelper(c(t));try{for(i.s();!(a=i.n()).done;){var u=a.value;f.triggerListener(e,u)}}catch(t){i.e(t)}finally{i.f()}}}},listenerOff:function(t){f.unregister(b(t))}}[t.type](t):s(t);function c(t){return 0===n.length||t.index>n.length-1?[]:n.slice(0,t.index).map(function(t){return y(t)})}}function s(t){var e="The following item cannot be handled by the data layer because it does not have a valid format: "+JSON.stringify(t.config);console.error(e)}return function(){Array.isArray(e.dataLayer)||(e.dataLayer=[]);r=e.dataLayer.splice(0,e.dataLayer.length),(n=e.dataLayer).version=c,o={},f=h(a)}(),n.push=function(t){var n=arguments,r=arguments;if(Object.keys(n).forEach(function(t){var e=y(n[t]);switch(e.valid||(s(e),delete r[t]),e.type){case v.itemType.DATA:case v.itemType.EVENT:u(e);break;case v.itemType.FCTN:delete r[t],u(e);break;case v.itemType.LISTENER_ON:case v.itemType.LISTENER_OFF:delete r[t]}}),r[0])return Array.prototype.push.apply(this,r)},n.getState=function(t){return t?p(l(o),t):l(o)},n.addEventListener=function(t,e,n){u(y({on:t,handler:e,scope:n&&n.scope,path:n&&n.path}))},n.removeEventListener=function(t,e){u(y({off:t,handler:e}))},function(){for(var t=0;t<r.length;t++)n.push(r[t])}(),a}},{"../custom-lodash":1,"../version.json":14,"./constants":2,"./item":5,"./listener":7,"./listenerManager":8,"./utils/customMerge":10}],4:[function(t,e,n){var r={Manager:t("./dataLayerManager")};window.adobeDataLayer=window.adobeDataLayer||[],window.adobeDataLayer.version?console.warn("Adobe Client Data Layer v".concat(window.adobeDataLayer.version," has already been imported/initialized on this page. You may be erroneously loading it a second time.")):r.Manager({dataLayer:window.adobeDataLayer}),e.exports=r},{"./dataLayerManager":3}],5:[function(t,e,n){var r=t("../custom-lodash"),i=r.isPlainObject,u=r.isEmpty,c=r.omit,f=r.find,s=t("./utils/dataMatchesContraints"),l=t("./itemConstraints"),p=t("./constants");e.exports=function(t,e){var n=t,r=e,o=f(Object.keys(l),function(t){return s(n,l[t])})||"function"==typeof n&&p.itemType.FCTN||i(n)&&p.itemType.DATA,a=function(){var t=c(n,Object.keys(l.event));if(!u(t))return t}();return{config:n,type:o,data:a,valid:!!o,index:r}}},{"../custom-lodash":1,"./constants":2,"./itemConstraints":6,"./utils/dataMatchesContraints":11}],6:[function(t,e,n){e.exports={event:{event:{type:"string"},eventInfo:{optional:!0}},listenerOn:{on:{type:"string"},handler:{type:"function"},scope:{type:"string",values:["past","future","all"],optional:!0},path:{type:"string",optional:!0}},listenerOff:{off:{type:"string"},handler:{type:"function",optional:!0},scope:{type:"string",values:["past","future","all"],optional:!0},path:{type:"string",optional:!0}}}},{}],7:[function(t,e,n){var r=t("./constants");e.exports=function(t){return{event:t.config.on||t.config.off,handler:t.config.handler||null,scope:t.config.scope||t.config.on&&r.listenerScope.ALL||null,path:t.config.path||null}}},{"./constants":2}],8:[function(t,e,n){var u=t("../custom-lodash").cloneDeep,c=t("./constants"),f=t("./utils/listenerMatch"),s=t("./utils/indexOfListener");e.exports=function(t){var o={},r=t,a=s.bind(null,o);function i(t,e){if(f(t,e)){var n=[u(e.config)];t.handler.apply(r.getDataLayer(),n)}}return{register:function(t){var e=t.event;return Object.prototype.hasOwnProperty.call(o,e)?-1===a(t)&&(o[t.event].push(t),!0):(o[t.event]=[t],!0)},unregister:function(t){var e=t.event;if(Object.prototype.hasOwnProperty.call(o,e))if(t.handler||t.scope||t.path){var n=a(t);-1<n&&o[e].splice(n,1)}else o[e]=[]},triggerListeners:function(r){(function(t){var e=[];switch(t.type){case c.itemType.DATA:e.push(c.dataLayerEvent.CHANGE);break;case c.itemType.EVENT:e.push(c.dataLayerEvent.EVENT),t.data&&e.push(c.dataLayerEvent.CHANGE),t.config.event!==c.dataLayerEvent.CHANGE&&e.push(t.config.event)}return e})(r).forEach(function(t){if(Object.prototype.hasOwnProperty.call(o,t)){var e,n=_createForOfIteratorHelper(o[t]);try{for(n.s();!(e=n.n()).done;){i(e.value,r)}}catch(t){n.e(t)}finally{n.f()}}})},triggerListener:function(t,e){i(t,e)}}}},{"../custom-lodash":1,"./constants":2,"./utils/indexOfListener":12,"./utils/listenerMatch":13}],9:[function(t,e,n){var r=t("../../custom-lodash"),o=r.has,a=r.get;e.exports=function(t,e){for(var n=e.substring(0,e.lastIndexOf("."));n;){if(o(t,n)){var r=a(t,n);if(null==r)return!0}n=n.substring(0,n.lastIndexOf("."))}return!1}},{"../../custom-lodash":1}],10:[function(t,e,n){var r=t("../../custom-lodash"),s=r.cloneDeepWith,l=r.isObject,p=r.isArray,y=r.reject,o=r.mergeWith,a=r.isNull;e.exports=function(t,e){return o(t,e,function(t,e,n,r){if(null==e)return null}),t=function(t,e){return s(t,function(f){return function e(t,n,r,o){if(l(t)){if(p(t))return y(t,f).map(function(t){return s(t,e)});for(var a={},i=0,u=Object.keys(t);i<u.length;i++){var c=u[i];f(t[c])||(a[c]=s(t[c],e))}return a}}}(1<arguments.length&&void 0!==e?e:function(t){return!t}))}(t,a)}},{"../../custom-lodash":1}],11:[function(t,e,n){var r=t("../../custom-lodash"),o=r.find,s=r.includes;e.exports=function(c,f){return void 0===o(Object.keys(f),function(t){var e=f[t].type,n=t&&f[t].values,r=!f[t].optional,o=c[t],a=_typeof(o),i=e&&a!==e,u=n&&!s(n,o);return r?!o||i||u:o&&(i||u)})}},{"../../custom-lodash":1}],12:[function(t,e,n){var c=t("../../custom-lodash").isEqual;e.exports=function(t,e){var n=e.event;if(Object.prototype.hasOwnProperty.call(t,n)){var r,o=_createForOfIteratorHelper(t[n].entries());try{for(o.s();!(r=o.n()).done;){var a=_slicedToArray(r.value,2),i=a[0],u=a[1];if(c(u.handler,e.handler))return i}}catch(t){o.e(t)}finally{o.f()}}return-1}},{"../../custom-lodash":1}],13:[function(t,e,n){var r=t("../../custom-lodash").has,a=t("../constants"),o=t("./ancestorRemoved");function i(t,e){return!e.data||!t.path||(r(e.data,t.path)||o(e.data,t.path))}
vendor: 4,485 bytes, lines 3537-3542
3537e.exports=function(t,e){var n=t.event,r=e.config,o=!1;return e.type===a.itemType.DATA?n===a.dataLayerEvent.CHANGE&&(o=i(t,e)):e.type===a.itemType.EVENT&&(n!==a.dataLayerEvent.EVENT&&n!==r.event||(o=i(t,e)),e.data&&n===a.dataLayerEvent.CHANGE&&(o=i(t,e))),o}},{"../../custom-lodash":1,"../constants":2,"./ancestorRemoved":9}],14:[function(t,e,n){e.exports={version:"2.0.2"}},{}]},{},[4]); 3538//# sourceMappingURL=adobe-client-data-layer.min.js.map 3539 3540 3541/*! jQuery v1.12.4 | (c) jQuery Foundation | jquery.org/license */ 3542!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="1.12.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(!l.ownFirst)for(b in a)return k.call(a,b);for(b in a);return void 0===b||k.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(h)return h.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=e.call(arguments,2),d=function(){return a.apply(b||this,c.concat(e.call(arguments)))},d.guid=a.guid=a.guid||n.guid++,d):void 0},now:function(){return+new Date}
vendor: 3,521 bytes, line 3542
3542,support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}
vendor: 9,959 bytes, line 3542
3542function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)}
vendor: 79,644 bytes, lines 3542-3545
3542,input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=la(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=ma(b);function pa(){}pa.prototype=d.filters=d.pseudos,d.setFilters=new pa,g=fa.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=R.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=S.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(Q," ")}),h=h.slice(c.length));for(g in d.filter)!(e=W[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fa.error(a):z(a,i).slice(0)};function qa(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}if(f=d.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return A.find(a);this.length=1,this[0]=f}return this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||(e=n.uniqueSort(e)),D.test(a)&&(e=e.reverse())),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){n.each(b,function(b,c){n.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==n.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return n.each(arguments,function(a,b){var c;while((c=n.inArray(b,f,c))>-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=!0,c||j.disable(),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.addEventListener?(d.removeEventListener("DOMContentLoaded",K),a.removeEventListener("load",K)):(d.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(d.addEventListener||"load"===a.event.type||"complete"===d.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll)a.setTimeout(n.ready);else if(d.addEventListener)d.addEventListener("DOMContentLoaded",K),a.addEventListener("load",K);else{d.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&d.documentElement}catch(e){}c&&c.doScroll&&!function f(){if(!n.isReady){try{c.doScroll("left")}catch(b){return a.setTimeout(f,50)}J(),n.ready()}}()}return I.promise(b)},n.ready.promise();var L;for(L in n(l))break;l.ownFirst="0"===L,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c,e;c=d.getElementsByTagName("body")[0],c&&c.style&&(b=d.createElement("div"),e=d.createElement("div"),e.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(e).appendChild(b),"undefined"!=typeof b.style.zoom&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",l.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(e))}),function(){var a=d.createElement("div");l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}a=null}();var M=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b},N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0; 3543}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(M(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),"object"!=typeof b&&"function"!=typeof b||(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f}}function S(a,b,c){if(M(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=void 0)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}}),function(){var a;l.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,e;return c=d.getElementsByTagName("body")[0],c&&c.style?(b=d.createElement("div"),e=d.createElement("div"),e.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(e).appendChild(b),"undefined"!=typeof b.style.zoom&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(d.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(e),a):void 0}}();var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),V=["Top","Right","Bottom","Left"],W=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)};function X(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return n.css(a,b,"")},i=h(),j=c&&c[3]||(n.cssNumber[b]?"":"px"),k=(n.cssNumber[b]||"px"!==j&&+i)&&U.exec(n.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,n.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var Y=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)Y(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},Z=/^(?:checkbox|radio)$/i,$=/<([\w:-]+)/,_=/^$|\/(?:java|ecma)script/i,aa=/^\s+/,ba="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";function ca(a){var b=ba.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}!function(){var a=d.createElement("div"),b=d.createDocumentFragment(),c=d.createElement("input");a.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",l.leadingWhitespace=3===a.firstChild.nodeType,l.tbody=!a.getElementsByTagName("tbody").length,l.htmlSerialize=!!a.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==d.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,b.appendChild(c),l.appendChecked=c.checked,a.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!a.cloneNode(!0).lastChild.defaultValue,b.appendChild(a),c=d.createElement("input"),c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),a.appendChild(c),l.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!!a.addEventListener,a[n.expando]=1,l.attributes=!a.getAttribute(n.expando)}();var da={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]};da.optgroup=da.option,da.tbody=da.tfoot=da.colgroup=da.caption=da.thead,da.th=da.td;function ea(a,b){var c,d,e=0,f="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,ea(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function fa(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}var ga=/<|&#?\w+;/,ha=/<tbody/i;function ia(a){Z.test(a.type)&&(a.defaultChecked=a.checked)}function ja(a,b,c,d,e){for(var f,g,h,i,j,k,m,o=a.length,p=ca(b),q=[],r=0;o>r;r++)if(g=a[r],g||0===g)if("object"===n.type(g))n.merge(q,g.nodeType?[g]:g);else if(ga.test(g)){i=i||p.appendChild(b.createElement("div")),j=($.exec(g)||["",""])[1].toLowerCase(),m=da[j]||da._default,i.innerHTML=m[1]+n.htmlPrefilter(g)+m[2],f=m[0];while(f--)i=i.lastChild;if(!l.leadingWhitespace&&aa.test(g)&&q.push(b.createTextNode(aa.exec(g)[0])),!l.tbody){g="table"!==j||ha.test(g)?"<table>"!==m[1]||ha.test(g)?0:i:i.firstChild,f=g&&g.childNodes.length;while(f--)n.nodeName(k=g.childNodes[f],"tbody")&&!k.childNodes.length&&g.removeChild(k)}n.merge(q,i.childNodes),i.textContent="";while(i.firstChild)i.removeChild(i.firstChild);i=p.lastChild}else q.push(b.createTextNode(g));i&&p.removeChild(i),l.appendChecked||n.grep(ea(q,"input"),ia),r=0;while(g=q[r++])if(d&&n.inArray(g,d)>-1)e&&e.push(g);else if(h=n.contains(g.ownerDocument,g),i=ea(p.appendChild(g),"script"),h&&fa(i),c){f=0;while(g=i[f++])_.test(g.type||"")&&c.push(g)}return i=null,p}!function(){var b,c,e=d.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b]=c in a)||(e.setAttribute(c,"t"),l[b]=e.attributes[c].expando===!1);e=null}();var ka=/^(?:input|select|textarea)$/i,la=/^key/,ma=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,na=/^(?:focusinfocus|focusoutblur)$/,oa=/^([^.]*)(?:\.(.+)|)/;function pa(){return!0}function qa(){return!1}function ra(){try{return d.activeElement}catch(a){}}function sa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)sa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=qa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return"undefined"==typeof n||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(G)||[""],h=b.length;while(h--)f=oa.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=oa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,e,f){var g,h,i,j,l,m,o,p=[e||d],q=k.call(b,"type")?b.type:b,r=k.call(b,"namespace")?b.namespace.split("."):[];if(i=m=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!na.test(q+n.event.triggered)&&(q.indexOf(".")>-1&&(r=q.split("."),q=r.shift(),r.sort()),h=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=r.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:n.makeArray(c,[b]),l=n.event.special[q]||{},f||!l.trigger||l.trigger.apply(e,c)!==!1)){if(!f&&!l.noBubble&&!n.isWindow(e)){for(j=l.delegateType||q,na.test(j+q)||(i=i.parentNode);i;i=i.parentNode)p.push(i),m=i;m===(e.ownerDocument||d)&&p.push(m.defaultView||m.parentWindow||a)}o=0;while((i=p[o++])&&!b.isPropagationStopped())b.type=o>1?j:l.bindType||q,g=(n._data(i,"events")||{})[b.type]&&n._data(i,"handle"),g&&g.apply(i,c),g=h&&i[h],g&&g.apply&&M(i)&&(b.result=g.apply(i,c),b.result===!1&&b.preventDefault());if(b.type=q,!f&&!b.isDefaultPrevented()&&(!l._default||l._default.apply(p.pop(),c)===!1)&&M(e)&&h&&e[q]&&!n.isWindow(e)){m=e[h],m&&(e[h]=null),n.event.triggered=q;try{e[q]()}catch(s){}n.event.triggered=void 0,m&&(e[h]=m)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())a.rnamespace&&!a.rnamespace.test(g.namespace)||(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,e,f=a.type,g=a,h=this.fixHooks[f];h||(this.fixHooks[f]=h=ma.test(f)?this.mouseHooks:la.test(f)?this.keyHooks:{}),e=h.props?this.props.concat(h.props):this.props,a=new n.Event(g),b=e.length;while(b--)c=e[b],a[c]=g[c];return a.target||(a.target=g.srcElement||d),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,h.filter?h.filter(a,g):a},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,e,f,g=b.button,h=b.fromElement;return null==a.pageX&&null!=b.clientX&&(e=a.target.ownerDocument||d,f=e.documentElement,c=e.body,a.pageX=b.clientX+(f&&f.scrollLeft||c&&c.scrollLeft||0)-(f&&f.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(f&&f.scrollTop||c&&c.scrollTop||0)-(f&&f.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&h&&(a.relatedTarget=h===a.target?b.toElement:h),a.which||void 0===g||(a.which=1&g?1:2&g?3:4&g?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ra()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===ra()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c){var d=n.extend(new n.Event,c,{type:a,isSimulated:!0});n.event.trigger(d,null,b),d.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=d.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)}:function(a,b,c){var d="on"+b;a.detachEvent&&("undefined"==typeof a[d]&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?pa:qa):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={constructor:n.Event,isDefaultPrevented:qa,isPropagationStopped:qa,isImmediatePropagationStopped:qa,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=pa,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=pa,a&&!this.isSimulated&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=pa,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||n.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submit||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?n.prop(b,"form"):void 0;c&&!n._data(c,"submit")&&(n.event.add(c,"submit._submit",function(a){a._submitBubble=!0}),n._data(c,"submit",!0))})},postDispatch:function(a){a._submitBubble&&(delete a._submitBubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.change||(n.event.special.change={setup:function(){return ka.test(this.nodeName)?("checkbox"!==this.type&&"radio"!==this.type||(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._justChanged=!0)}),n.event.add(this,"click._change",function(a){this._justChanged&&!a.isTrigger&&(this._justChanged=!1),n.event.simulate("change",this,a)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;ka.test(b.nodeName)&&!n._data(b,"change")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a)}),n._data(b,"change",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!ka.test(this.nodeName)}}),l.focusin||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a))};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d){return sa(this,a,b,c,d)},one:function(a,b,c,d){return sa(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=qa),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ta=/ jQuery\d+="(?:null|\d+)"/g,ua=new RegExp("<(?:"+ba+")[\\s/>]","i"),va=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,wa=/<script|<style|<link/i,xa=/checked\s*(?:[^=]|=\s*.checked.)/i,ya=/^true\/(.*)/,za=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Aa=ca(d),Ba=Aa.appendChild(d.createElement("div"));function Ca(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function Da(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function Ea(a){var b=ya.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Fa(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Ga(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(Da(b).text=a.text,Ea(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&Z.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}}function Ha(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);if(r||o>1&&"string"==typeof q&&!l.checkClone&&xa.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),Ha(f,b,c,d)});if(o&&(k=ja(b,a[0].ownerDocument,!1,a,d),e=k.firstChild,1===k.childNodes.length&&(k=e),e||d)){for(i=n.map(ea(k,"script"),Da),h=i.length;o>m;m++)g=k,m!==p&&(g=n.clone(g,!0,!0),h&&n.merge(i,ea(g,"script"))),c.call(a[m],g,m);if(h)for(j=i[i.length-1].ownerDocument,n.map(i,Ea),m=0;h>m;m++)g=i[m],_.test(g.type||"")&&!n._data(g,"globalEval")&&n.contains(j,g)&&(g.src?n._evalUrl&&n._evalUrl(g.src):n.globalEval((g.text||g.textContent||g.innerHTML||"").replace(za,"")));k=e=null}return a}function Ia(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(ea(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&fa(ea(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(va,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!ua.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(Ba.innerHTML=a.outerHTML,Ba.removeChild(f=Ba.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=ea(f),h=ea(a),g=0;null!=(e=h[g]);++g)d[g]&&Ga(e,d[g]);if(b)if(c)for(h=h||ea(a),d=d||ea(f),g=0;null!=(e=h[g]);g++)Fa(e,d[g]);else Fa(a,f);return d=ea(f,"script"),d.length>0&&fa(d,!i&&ea(a,"script")),d=h=e=null,f},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.attributes,m=n.event.special;null!=(d=a[h]);h++)if((b||M(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k||"undefined"==typeof d.removeAttribute?d[i]=void 0:d.removeAttribute(i),c.push(f))}}}),n.fn.extend({domManip:Ha,detach:function(a){return Ia(this,a,!0)},remove:function(a){return Ia(this,a)},text:function(a){return Y(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||d).createTextNode(a))},null,a,arguments.length)},append:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.appendChild(a)}})},prepend:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(ea(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return Y(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(ta,""):void 0;if("string"==typeof a&&!wa.test(a)&&(l.htmlSerialize||!ua.test(a))&&(l.leadingWhitespace||!aa.test(a))&&!da[($.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ea(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ha(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(ea(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],f=n(a),h=f.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(f[d])[b](c),g.apply(e,c.get());return this.pushStack(e)}});var Ja,Ka={HTML:"block",BODY:"block"};function La(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function Ma(a){var b=d,c=Ka[a];return c||(c=La(a,b),"none"!==c&&c||(Ja=(Ja||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Ja[0].contentWindow||Ja[0].contentDocument).document,b.write(),b.close(),c=La(a,b),Ja.detach()),Ka[a]=c),c}var Na=/^margin/,Oa=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Pa=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e},Qa=d.documentElement;!function(){var b,c,e,f,g,h,i=d.createElement("div"),j=d.createElement("div");if(j.style){j.style.cssText="float:left;opacity:.5",l.opacity="0.5"===j.style.opacity,l.cssFloat=!!j.style.cssFloat,j.style.backgroundClip="content-box",j.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===j.style.backgroundClip,i=d.createElement("div"),i.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",j.innerHTML="",i.appendChild(j),l.boxSizing=""===j.style.boxSizing||""===j.style.MozBoxSizing||""===j.style.WebkitBoxSizing,n.extend(l,{reliableHiddenOffsets:function(){return null==b&&k(),f},boxSizingReliable:function(){return null==b&&k(),e},pixelMarginRight:function(){return null==b&&k(),c},pixelPosition:function(){return null==b&&k(),b},reliableMarginRight:function(){return null==b&&k(),g},reliableMarginLeft:function(){return null==b&&k(),h}});function k(){var k,l,m=d.documentElement;m.appendChild(i),j.style.cssText="-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",b=e=h=!1,c=g=!0,a.getComputedStyle&&(l=a.getComputedStyle(j),b="1%"!==(l||{}).top,h="2px"===(l||{}).marginLeft,e="4px"===(l||{width:"4px"}).width,j.style.marginRight="50%",c="4px"===(l||{marginRight:"4px"}).marginRight,k=j.appendChild(d.createElement("div")),k.style.cssText=j.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",k.style.marginRight=k.style.width="0",j.style.width="1px",g=!parseFloat((a.getComputedStyle(k)||{}).marginRight),j.removeChild(k)),j.style.display="none",f=0===j.getClientRects().length,f&&(j.style.display="",j.innerHTML="<table><tr><td></td><td>t</td></tr></table>",j.childNodes[0].style.borderCollapse="separate",k=j.getElementsByTagName("td"),k[0].style.cssText="margin:0;border:0;padding:0;display:none",f=0===k[0].offsetHeight,f&&(k[0].style.display="",k[1].style.display="none",f=0===k[0].offsetHeight)),m.removeChild(i)}}}();var Ra,Sa,Ta=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ra=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)},Sa=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ra(a),g=c?c.getPropertyValue(b)||c[b]:void 0,""!==g&&void 0!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),c&&!l.pixelMarginRight()&&Oa.test(g)&&Na.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f),void 0===g?g:g+""}):Qa.currentStyle&&(Ra=function(a){return a.currentStyle},Sa=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ra(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Oa.test(g)&&!Ta.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Ua(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Va=/alpha\([^)]*\)/i,Wa=/opacity\s*=\s*([^)]*)/i,Xa=/^(none|table(?!-c[ea]).+)/,Ya=new RegExp("^("+T+")(.*)$","i"),Za={position:"absolute",visibility:"hidden",display:"block"},$a={letterSpacing:"0",fontWeight:"400"},_a=["Webkit","O","Moz","ms"],ab=d.createElement("div").style;function bb(a){if(a in ab)return a;var b=a.charAt(0).toUpperCase()+a.slice(1),c=_a.length;while(c--)if(a=_a[c]+b,a in ab)return a}function cb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&W(d)&&(f[g]=n._data(d,"olddisplay",Ma(d.nodeName)))):(e=W(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function db(a,b,c){var d=Ya.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function eb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+V[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+V[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+V[f]+"Width",!0,e))):(g+=n.css(a,"padding"+V[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+V[f]+"Width",!0,e)));return g}function fb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ra(a),g=l.boxSizing&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Sa(a,b,f),(0>e||null==e)&&(e=a.style[b]),Oa.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+eb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Sa(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=bb(h)||h),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=U.exec(c))&&e[1]&&(c=X(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(n.cssNumber[h]?"":"px")),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=bb(h)||h),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Sa(a,b,d)),"normal"===f&&b in $a&&(f=$a[b]),""===c||c?(e=parseFloat(f),c===!0||isFinite(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?Xa.test(n.css(a,"display"))&&0===a.offsetWidth?Pa(a,Za,function(){return fb(a,b,d)}):fb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ra(a);return db(a,c,d?eb(a,b,d,l.boxSizing&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Wa.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Va,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Va.test(f)?f.replace(Va,e):f+" "+e)}}),n.cssHooks.marginRight=Ua(l.reliableMarginRight,function(a,b){return b?Pa(a,{display:"inline-block"},Sa,[a,"marginRight"]):void 0}),n.cssHooks.marginLeft=Ua(l.reliableMarginLeft,function(a,b){return b?(parseFloat(Sa(a,"marginLeft"))||(n.contains(a.ownerDocument,a)?a.getBoundingClientRect().left-Pa(a,{ 3544marginLeft:0},function(){return a.getBoundingClientRect().left}):0))+"px":void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+V[d]+b]=f[d]||f[d-2]||f[0];return e}},Na.test(a)||(n.cssHooks[a+b].set=db)}),n.fn.extend({css:function(a,b){return Y(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Ra(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return cb(this,!0)},hide:function(){return cb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){W(this)?n(this).show():n(this).hide()})}});function gb(a,b,c,d,e){return new gb.prototype.init(a,b,c,d,e)}n.Tween=gb,gb.prototype={constructor:gb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||n.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=gb.propHooks[this.prop];return a&&a.get?a.get(this):gb.propHooks._default.get(this)},run:function(a){var b,c=gb.propHooks[this.prop];return this.options.duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):gb.propHooks._default.set(this),this}},gb.prototype.init.prototype=gb.prototype,gb.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[n.cssProps[a.prop]]&&!n.cssHooks[a.prop]?a.elem[a.prop]=a.now:n.style(a.elem,a.prop,a.now+a.unit)}}},gb.propHooks.scrollTop=gb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},n.fx=gb.prototype.init,n.fx.step={};var hb,ib,jb=/^(?:toggle|show|hide)$/,kb=/queueHooks$/;function lb(){return a.setTimeout(function(){hb=void 0}),hb=n.now()}function mb(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=V[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function nb(a,b,c){for(var d,e=(qb.tweeners[b]||[]).concat(qb.tweeners["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ob(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&W(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k="none"===j?n._data(a,"olddisplay")||Ma(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==Ma(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],jb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(o))"inline"===("none"===j?Ma(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=nb(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function pb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function qb(a,b,c){var d,e,f=0,g=qb.prefilters.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=hb||lb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{},easing:n.easing._default},c),originalProperties:b,originalOptions:c,startTime:hb||lb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for(pb(k,j.opts.specialEasing);g>f;f++)if(d=qb.prefilters[f].call(j,a,k,j.opts))return n.isFunction(d.stop)&&(n._queueHooks(j.elem,j.opts.queue).stop=n.proxy(d.stop,d)),d;return n.map(k,nb,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(qb,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return X(c.elem,a,U.exec(b),c),c}]},tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.match(G);for(var c,d=0,e=a.length;e>d;d++)c=a[d],qb.tweeners[c]=qb.tweeners[c]||[],qb.tweeners[c].unshift(b)},prefilters:[ob],prefilter:function(a,b){b?qb.prefilters.unshift(a):qb.prefilters.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,null!=d.queue&&d.queue!==!0||(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(W).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=qb(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&kb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(mb(b,!0),a,d,e)}}),n.each({slideDown:mb("show"),slideUp:mb("hide"),slideToggle:mb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(hb=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),hb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ib||(ib=a.setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){a.clearInterval(ib),ib=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(b,c){return b=n.fx?n.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a,b=d.createElement("input"),c=d.createElement("div"),e=d.createElement("select"),f=e.appendChild(d.createElement("option"));c=d.createElement("div"),c.setAttribute("className","t"),c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],b.setAttribute("type","checkbox"),c.appendChild(b),a=c.getElementsByTagName("a")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==c.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=f.selected,l.enctype=!!d.createElement("form").enctype,e.disabled=!0,l.optDisabled=!f.disabled,b=d.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value}();var rb=/\r/g,sb=/[\x20\t\r\n\f]+/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(rb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a)).replace(sb," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],(c.selected||i===e)&&(l.optDisabled?!c.disabled:null===c.getAttribute("disabled"))&&(!c.parentNode.disabled||!n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>-1)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>-1:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var tb,ub,vb=n.expr.attrHandle,wb=/^(?:checked|selected)$/i,xb=l.getSetAttribute,yb=l.input;n.fn.extend({attr:function(a,b){return Y(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),e=n.attrHooks[b]||(n.expr.match.bool.test(b)?ub:tb)),void 0!==c?null===c?void n.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=n.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(G);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?yb&&xb||!wb.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(xb?c:d)}}),ub={set:function(a,b,c){return b===!1?n.removeAttr(a,c):yb&&xb||!wb.test(c)?a.setAttribute(!xb&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=vb[b]||n.find.attr;yb&&xb||!wb.test(b)?vb[b]=function(a,b,d){var e,f;return d||(f=vb[b],vb[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,vb[b]=f),e}:vb[b]=function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),yb&&xb||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):tb&&tb.set(a,b,c)}}),xb||(tb={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},vb.id=vb.name=vb.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:tb.set},n.attrHooks.contenteditable={set:function(a,b,c){tb.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var zb=/^(?:input|select|textarea|button|object)$/i,Ab=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return Y(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&n.isXMLDoc(a)||(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):zb.test(a.nodeName)||Ab.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var Bb=/[\t\r\n\f]/g;function Cb(a){return n.attr(a,"class")||""}n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,Cb(this)))});if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=Cb(c),d=1===c.nodeType&&(" "+e+" ").replace(Bb," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=n.trim(d),e!==h&&n.attr(c,"class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,Cb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=Cb(c),d=1===c.nodeType&&(" "+e+" ").replace(Bb," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=n.trim(d),e!==h&&n.attr(c,"class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):n.isFunction(a)?this.each(function(c){n(this).toggleClass(a.call(this,c,Cb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=n(this),f=a.match(G)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=Cb(this),b&&n._data(this,"__className__",b),n.attr(this,"class",b||a===!1?"":n._data(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+Cb(c)+" ").replace(Bb," ").indexOf(b)>-1)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Db=a.location,Eb=n.now(),Fb=/\?/,Gb=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(Gb,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new a.DOMParser,c=d.parseFromString(b,"text/xml")):(c=new a.ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var Hb=/#.*$/,Ib=/([?&])_=[^&]*/,Jb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Kb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Lb=/^(?:GET|HEAD)$/,Mb=/^\/\//,Nb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ob={},Pb={},Qb="*/".concat("*"),Rb=Db.href,Sb=Nb.exec(Rb.toLowerCase())||[];function Tb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(G)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Ub(a,b,c,d){var e={},f=a===Pb;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Vb(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Wb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Xb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Rb,type:"GET",isLocal:Kb.test(Sb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Qb,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":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Vb(Vb(a,n.ajaxSettings),b):Vb(n.ajaxSettings,a)},ajaxPrefilter:Tb(Ob),ajaxTransport:Tb(Pb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var d,e,f,g,h,i,j,k,l=n.ajaxSetup({},c),m=l.context||l,o=l.context&&(m.nodeType||m.jquery)?n(m):n.event,p=n.Deferred(),q=n.Callbacks("once memory"),r=l.statusCode||{},s={},t={},u=0,v="canceled",w={readyState:0,getResponseHeader:function(a){var b;if(2===u){if(!k){k={};while(b=Jb.exec(g))k[b[1].toLowerCase()]=b[2]}b=k[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===u?g:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return u||(a=t[c]=t[c]||a,s[a]=b),this},overrideMimeType:function(a){return u||(l.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>u)for(b in a)r[b]=[r[b],a[b]];else w.always(a[w.status]);return this},abort:function(a){var b=a||v;return j&&j.abort(b),y(0,b),this}};if(p.promise(w).complete=q.add,w.success=w.done,w.error=w.fail,l.url=((b||l.url||Rb)+"").replace(Hb,"").replace(Mb,Sb[1]+"//"),l.type=c.method||c.type||l.method||l.type,l.dataTypes=n.trim(l.dataType||"*").toLowerCase().match(G)||[""],null==l.crossDomain&&(d=Nb.exec(l.url.toLowerCase()),l.crossDomain=!(!d||d[1]===Sb[1]&&d[2]===Sb[2]&&(d[3]||("http:"===d[1]?"80":"443"))===(Sb[3]||("http:"===Sb[1]?"80":"443")))),l.data&&l.processData&&"string"!=typeof l.data&&(l.data=n.param(l.data,l.traditional)),Ub(Ob,l,c,w),2===u)return w;i=n.event&&l.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),l.type=l.type.toUpperCase(),l.hasContent=!Lb.test(l.type),f=l.url,l.hasContent||(l.data&&(f=l.url+=(Fb.test(f)?"&":"?")+l.data,delete l.data),l.cache===!1&&(l.url=Ib.test(f)?f.replace(Ib,"$1_="+Eb++):f+(Fb.test(f)?"&":"?")+"_="+Eb++)),l.ifModified&&(n.lastModified[f]&&w.setRequestHeader("If-Modified-Since",n.lastModified[f]),n.etag[f]&&w.setRequestHeader("If-None-Match",n.etag[f])),(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&w.setRequestHeader("Content-Type",l.contentType),w.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+("*"!==l.dataTypes[0]?", "+Qb+"; q=0.01":""):l.accepts["*"]);for(e in l.headers)w.setRequestHeader(e,l.headers[e]);if(l.beforeSend&&(l.beforeSend.call(m,w,l)===!1||2===u))return w.abort();v="abort";for(e in{success:1,error:1,complete:1})w[e](l[e]);if(j=Ub(Pb,l,c,w)){if(w.readyState=1,i&&o.trigger("ajaxSend",[w,l]),2===u)return w;l.async&&l.timeout>0&&(h=a.setTimeout(function(){w.abort("timeout")},l.timeout));try{u=1,j.send(s,y)}catch(x){if(!(2>u))throw x;y(-1,x)}}else y(-1,"No Transport");function y(b,c,d,e){var k,s,t,v,x,y=c;2!==u&&(u=2,h&&a.clearTimeout(h),j=void 0,g=e||"",w.readyState=b>0?4:0,k=b>=200&&300>b||304===b,d&&(v=Wb(l,w,d)),v=Xb(l,v,w,k),k?(l.ifModified&&(x=w.getResponseHeader("Last-Modified"),x&&(n.lastModified[f]=x),x=w.getResponseHeader("etag"),x&&(n.etag[f]=x)),204===b||"HEAD"===l.type?y="nocontent":304===b?y="notmodified":(y=v.state,s=v.data,t=v.error,k=!t)):(t=y,!b&&y||(y="error",0>b&&(b=0))),w.status=b,w.statusText=(c||y)+"",k?p.resolveWith(m,[s,y,w]):p.rejectWith(m,[w,y,t]),w.statusCode(r),r=void 0,i&&o.trigger(k?"ajaxSuccess":"ajaxError",[w,l,k?s:t]),q.fireWith(m,[w,y]),i&&(o.trigger("ajaxComplete",[w,l]),--n.active||n.event.trigger("ajaxStop")))}return w},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax(n.extend({url:a,type:b,dataType:e,data:c,success:d},n.isPlainObject(a)&&a))}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return n.isFunction(a)?this.each(function(b){n(this).wrapInner(a.call(this,b))}):this.each(function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}});function Yb(a){return a.style&&a.style.display||n.css(a,"display")}function Zb(a){if(!n.contains(a.ownerDocument||d,a))return!0;while(a&&1===a.nodeType){if("none"===Yb(a)||"hidden"===a.type)return!0;a=a.parentNode}return!1}n.expr.filters.hidden=function(a){return l.reliableHiddenOffsets()?a.offsetWidth<=0&&a.offsetHeight<=0&&!a.getClientRects().length:Zb(a)},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var $b=/%20/g,_b=/\[\]$/,ac=/\r?\n/g,bc=/^(?:submit|button|image|reset|file)$/i,cc=/^(?:input|select|textarea|keygen)/i;function dc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||_b.test(a)?d(a,e):dc(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)dc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)dc(c,a[c],b,e);return d.join("&").replace($b,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&cc.test(this.nodeName)&&!bc.test(a)&&(this.checked||!Z.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(ac,"\r\n")}}):{name:b.name,value:c.replace(ac,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return this.isLocal?ic():d.documentMode>8?hc():/^(get|post|head|put|delete|options)$/i.test(this.type)&&hc()||ic()}:hc;var ec=0,fc={},gc=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in fc)fc[a](void 0,!0)}),l.cors=!!gc&&"withCredentials"in gc,gc=l.ajax=!!gc,gc&&n.ajaxTransport(function(b){if(!b.crossDomain||l.cors){var c;return{send:function(d,e){var f,g=b.xhr(),h=++ec;if(g.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(f in b.xhrFields)g[f]=b.xhrFields[f];b.mimeType&&g.overrideMimeType&&g.overrideMimeType(b.mimeType),b.crossDomain||d["X-Requested-With"]||(d["X-Requested-With"]="XMLHttpRequest");for(f in d)void 0!==d[f]&&g.setRequestHeader(f,d[f]+"");g.send(b.hasContent&&b.data||null),c=function(a,d){var f,i,j;if(c&&(d||4===g.readyState))if(delete fc[h],c=void 0,g.onreadystatechange=n.noop,d)4!==g.readyState&&g.abort();else{j={},f=g.status,"string"==typeof g.responseText&&(j.text=g.responseText);try{i=g.statusText}catch(k){i=""}f||!b.isLocal||b.crossDomain?1223===f&&(f=204):f=j.text?200:404}j&&e(f,i,j,g.getAllResponseHeaders())},b.async?4===g.readyState?a.setTimeout(c):g.onreadystatechange=fc[h]=c:c()},abort:function(){c&&c(void 0,!0)}}}});function hc(){try{return new a.XMLHttpRequest}catch(b){}}function ic(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=d.head||n("head")[0]||d.documentElement;return{send:function(e,f){b=d.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||f(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var jc=[],kc=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=jc.pop()||n.expando+"_"+Eb++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(kc.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&kc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(kc,"$1"+e):b.jsonp!==!1&&(b.url+=(Fb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?n(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,jc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||d;var e=x.exec(a),f=!c&&[];return e?[b.createElement(e[1])]:(e=ja([a],b,f),f&&f.length&&n(f).remove(),n.merge([],e.childNodes))};var lc=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&lc)return lc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=n.trim(a.slice(h,a.length)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};function mc(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,n.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?("undefined"!=typeof e.getBoundingClientRect&&(d=e.getBoundingClientRect()),c=mc(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Qa})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return Y(this,function(a,d,e){var f=mc(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Ua(l.pixelPosition,function(a,c){return c?(c=Sa(a,b),Oa.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({ 3545padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return Y(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var nc=a.jQuery,oc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=oc),b&&a.jQuery===n&&(a.jQuery=nc),n},b||(a.jQuery=a.$=n),n});
3546!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(){var e=0;return function(t,o){var s,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:i(t),appendDots:i(t),arrows:!0,asNavFor:null,prevArrow:'<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',nextArrow:'<button class="slick-next" aria-label="Next" type="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i('<button type="button" />').text(t+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,focusOnChange:!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,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,
vendor: 6,594 bytes, line 3546
3546sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$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(t),n.$slidesCache=null,n.transformType=null,n.transitionType=null,n.visibilityChange="visibilitychange",n.windowWidth=0,n.windowTimer=null,s=i(t).data("slick")||{},n.options=i.extend({},n.defaults,o,s),n.currentSlide=n.options.initialSlide,n.originalSettings=n.options,void 0!==document.mozHidden?(n.hidden="mozHidden",n.visibilityChange="mozvisibilitychange"):void 0!==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=e++,n.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,n.registerBreakpoints(),n.init(!0)}}()).prototype.activateADA=function(){this.$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(t<0||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)):!0===o?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&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){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(),!0===s.options.rtl&&!1===s.options.vertical&&(e=-e),!1===s.transformsEnabled?!1===s.options.vertical?s.$slideTrack.animate({left:e},s.options.speed,s.options.easing,t):s.$slideTrack.animate({top:e},s.options.speed,s.options.easing,t):!1===s.cssTransitions?(!0===s.options.rtl&&(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),!1===s.options.vertical?(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),!1===s.options.vertical?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.getNavTarget();null!==t&&"object"==typeof t&&t.each(function(){var t=i(this).slick("getSlick");t.unslicked||t.slideHandler(e,!0)})},e.prototype.applyTransition=function(i){var e=this,t={};!1===e.options.fade?t[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:t[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,!1===e.options.fade?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||(!1===i.options.infinite&&(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;!0===e.options.arrows&&(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),!0!==e.options.infinite&&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(!0===o.options.dots){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")}},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 class="slick-list"/>').parent(),e.$slideTrack.css("opacity",0),!0!==e.options.centerMode&&!0!==e.options.swipeToSlide||(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),!0===e.options.draggable&&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.o
vendor: 3,442 bytes, line 3546
3546ptions.rows>1){for(r=l.options.slidesPerRow*l.options.rows,s=Math.ceil(n.length/r),i=0;i<s;i++){var d=document.createElement("div");for(e=0;e<l.options.rows;e++){var a=document.createElement("div");for(t=0;t<l.options.slidesPerRow;t++){var c=i*r+(e*l.options.slidesPerRow+t);n.get(c)&&a.appendChild(n.get(c))}d.appendChild(a)}o.appendChild(d)}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,d=r.$slider.width(),a=window.innerWidth||i(window).width();if("window"===r.respondTo?n=a:"slider"===r.respondTo?n=d:"min"===r.respondTo&&(n=Math.min(a,d)),r.options.responsive&&r.options.responsive.length&&null!==r.options.responsive){s=null;for(o in r.breakpoints)r.breakpoints.hasOwnProperty(o)&&(!1===r.originalSettings.mobileFirst?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]),!0===e&&(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]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.options=r.originalSettings,!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e),l=s),e||!1===l||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 d=0===e.data.index?0:e.data.index||l.index()*r.options.slidesToScroll;r.slideHandler(r.checkNavigable(d),!1,t),l.children().trigger("focus");break;default:return}},e.prototype.checkNavigable=function(i){var e,t;if(e=this.getNavigableIndexes(),t=0,i>e[e.length-1])i=e[e.length-1];else for(var o in e){if(i<e[o]){i=t;break}t=e[o]}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)),!0===e.options.accessibility&&e.$dots.off("keydown.slick",e.keyHandler)),e.$slider.off("focus.slick blur.slick"),!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow&&e.$prevArrow.off("click.slick",e.changeSlide),e.$nextArrow&&e.$nextArrow.off("click.slick",e.changeSlide),!0===e.options.accessibility&&(e.$prevArrow&&e.$prevArrow.off("keydown.slick",e.keyHandler),e.$nextArrow&&e.$nextArrow.off("keydown.slick",e.keyHandler))),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.
3546slick",e.swipeHandler),e.$list.off("click.slick",e.clickHandler),i(document).off(e.visibilityChange,e.visibility),e.cleanUpSlideEvents(),!0===e.options.accessibility&&e.$list.off("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&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)},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()).removeAttr("style"),e.$slider.empty().append(i))},e.prototype.clickHandler=function(i){!1===this.shouldClick&&(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]="",!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.fadeSlide=function(i,e){var t=this;!1===t.cssTransitions?(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;!1===e.cssTransitions?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","*",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(){return this.currentSlide},e.prototype.getDotCount=function(){var i=this,e=0,t=0,o=0;if(!0===i.options.infinite)if(i.slideCount<=i.options.slidesToShow)++o;else 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(!0===i.options.centerMode)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,n=this,r=0;return n.slideOffset=0,t=n.$slides.first().outerHeight(!0),!0===n.options.infinite?(n.slideCount>n.options.slidesToShow&&(n.slideOffset=n.slideWidth*n.options.slidesToShow*-1,s=-1,!0===n.options.vertical&&!0===n.options.centerMode&&(2===n.options.slidesToShow?s=-1.5:1===n.options.slidesToShow&&(s=-2)),r=t*n.options.slidesToShow*s),n.slideCount%n.options.slidesToScroll!=0&&i+n.options.slidesToScroll>n.slideCount&&n.slideCount>n.options.slidesToShow&&(i>n.slideCount?(n.slideOffset=(n.options.slidesToShow-(i-n.slideCount))*n.slideWidth*-1,r=(n.options.slidesToShow-(i-n.slideCount))*t*-1):(n.slideOffset=n.slideCount%n.options.slidesToScroll*n.slideWidth*-1,r=n.slideCount%n.options.slidesToScroll*t*-1))):i+n.options.slidesToShow>n.slideCount&&(n.slideOffset=(i+n.options.slidesToShow-n.slideCount)*n.slideWidth,r=(i+n.options.slidesToShow-n.slideCount)*t),n.slideCount<=n.options.slidesToShow&&(n.slideOffset=0,r=0),!0===n.options.centerMode&&n.slideCount<=n.options.slidesToShow?n.slideOffset=n.slideWidth*Math.floor(n.options.slidesToShow)/2-n.slideWidth*n.slideCount/2:!0===n.options.centerMode&&!0===n.options.infinite?n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)-n.slideWidth:!0===n.options.centerMode&&(n.slideOffset=0,n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)),e=!1===n.options.vertical?i*n.slideWidth*-1+n.slideOffset:i*t*-1+r,!0===n.options.variableWidth&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,!0===n.options.centerMode&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow+1),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,e+=(n.$list.width()-o.outerWidth())/2)),e},e.prototype.getOption=e.prototype.slickGetOption=function(i){return this.options[i]},e.prototype.getNavigableIndexes=function(){var i,e=this,t=0,o=0,s=[];for(!1===e.options.infinite?i=e.slideCount:(t=-1*e.options.slidesToScroll,o=-1*e.options.slidesToScroll,i=2*e.slideCount);t<i;)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=this;return t=!0===o.options.centerMode?o.slideWidth*Math.floor(o.options.slidesToShow/2):0,!0===o.options.swipeToSlide?(o.$slideTrack.find(".slick-slide").each(function(s,n){if(n.offsetLeft-t+i(n).outerWidth()/2>-1*o.swipeLeft)return e=n,!1}),Math.abs(i(e).attr("data-slick-index")-o.currentSlide)||1):o.options.slidesToScroll},e.prototype.goTo=e.prototype.slickGoTo=function(i,e){this.changeSlide({data:{message:"index",index:
3546parseInt(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]),!0===t.options.accessibility&&t.initADA(),t.options.autoplay&&(t.paused=!1,t.autoPlay())},e.prototype.initADA=function(){var e=this,t=Math.ceil(e.slideCount/e.options.slidesToShow),o=e.getNavigableIndexes().filter(function(i){return i>=0&&i<e.slideCount});e.$slides.add(e.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),null!==e.$dots&&(e.$slides.not(e.$slideTrack.find(".slick-cloned")).each(function(t){var s=o.indexOf(t);i(this).attr({role:"tabpanel",id:"slick-slide"+e.instanceUid+t,tabindex:-1}),-1!==s&&i(this).attr({"aria-describedby":"slick-slide-control"+e.instanceUid+s})}),e.$dots.attr("role","tablist").find("li").each(function(s){var n=o[s];i(this).attr({role:"presentation"}),i(this).find("button").first().attr({role:"tab",id:"slick-slide-control"+e.instanceUid+s,"aria-controls":"slick-slide"+e.instanceUid+n,"aria-label":s+1+" of "+t,"aria-selected":null,tabindex:"-1"})}).eq(e.currentSlide).find("button").attr({"aria-selected":"true",tabindex:"0"}).end());for(var s=e.currentSlide,n=s+e.options.slidesToShow;s<n;s++)e.$slides.eq(s).attr("tabindex",0);e.activateADA()},e.prototype.initArrowEvents=function(){var i=this;!0===i.options.arrows&&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),!0===i.options.accessibility&&(i.$prevArrow.on("keydown.slick",i.keyHandler),i.$nextArrow.on("keydown.slick",i.keyHandler)))},e.prototype.initDotEvents=function(){var e=this;!0===e.options.dots&&(i("li",e.$dots).on("click.slick",{message:"index"},e.changeSlide),!0===e.options.accessibility&&e.$dots.on("keydown.slick",e.keyHandler)),!0===e.options.dots&&!0===e.options.pauseOnDotsHover&&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"}
3546,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)),!0===e.options.accessibility&&e.$list.on("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&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(e.setPosition)},e.prototype.initUI=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),!0===i.options.dots&&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&&!0===e.options.accessibility?e.changeSlide({data:{message:!0===e.options.rtl?"next":"previous"}}):39===i.keyCode&&!0===e.options.accessibility&&e.changeSlide({data:{message:!0===e.options.rtl?"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=i(this).attr("data-srcset"),s=i(this).attr("data-sizes")||n.$slider.attr("data-sizes"),r=document.createElement("img");r.onload=function(){e.animate({opacity:0}
vendor: 5,619 bytes, line 3546
3546,100,function(){o&&(e.attr("srcset",o),s&&e.attr("sizes",s)),e.attr("src",t).animate({opacity:1},200,function(){e.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")}),n.$slider.trigger("lazyLoaded",[n,e,t])})},r.onerror=function(){e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),n.$slider.trigger("lazyLoadError",[n,e,t])},r.src=t})}var t,o,s,n=this;if(!0===n.options.centerMode?!0===n.options.infinite?s=(o=n.currentSlide+(n.options.slidesToShow/2+1))+n.options.slidesToShow+2:(o=Math.max(0,n.currentSlide-(n.options.slidesToShow/2+1)),s=n.options.slidesToShow/2+1+2+n.currentSlide):(o=n.options.infinite?n.options.slidesToShow+n.currentSlide:n.currentSlide,s=Math.ceil(o+n.options.slidesToShow),!0===n.options.fade&&(o>0&&o--,s<=n.slideCount&&s++)),t=n.$slider.find(".slick-slide").slice(o,s),"anticipated"===n.options.lazyLoad)for(var r=o-1,l=s,d=n.$slider.find(".slick-slide"),a=0;a<n.options.slidesToScroll;a++)r<0&&(r=n.slideCount-1),t=(t=t.add(d.eq(r))).add(d.eq(l)),r--,l++;e(t),n.slideCount<=n.options.slidesToShow?e(n.$slider.find(".slick-slide")):n.currentSlide>=n.slideCount-n.options.slidesToShow?e(n.$slider.find(".slick-cloned").slice(0,n.options.slidesToShow)):0===n.currentSlide&&e(n.$slider.find(".slick-cloned").slice(-1*n.options.slidesToShow))},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(){this.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(e){var t=this;t.unslicked||(t.$slider.trigger("afterChange",[t,e]),t.animating=!1,t.slideCount>t.options.slidesToShow&&t.setPosition(),t.swipeLeft=null,t.options.autoplay&&t.autoPlay(),!0===t.options.accessibility&&(t.initADA(),t.options.focusOnChange&&i(t.$slides.get(t.currentSlide)).attr("tabindex",0).focus()))},e.prototype.prev=e.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},e.prototype.preventDefault=function(i){i.preventDefault()},e.prototype.progressiveLazyLoad=function(e){e=e||1;var t,o,s,n,r,l=this,d=i("img[data-lazy]",l.$slider);d.length?(t=d.first(),o=t.attr("data-lazy"),s=t.attr("data-srcset"),n=t.attr("data-sizes")||l.$slider.attr("data-sizes"),(r=document.createElement("img")).onload=function(){s&&(t.attr("srcset",s),n&&t.attr("sizes",n)),t.attr("src",o).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"),!0===l.options.adaptiveHeight&&l.setPosition(),l.$slider.trigger("lazyLoaded",[l,t,o]),l.progressiveLazyLoad()},r.onerror=function(){e<3?setTimeout(function(){l.progressiveLazyLoad(e+1)},500):(t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),l.$slider.trigger("lazyLoadError",[l,t,o]),l.progressiveLazyLoad())},r.src=o):l.$slider.trigger("allImagesLoaded",[l])},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,n.hasOwnProperty(e)){for(t=n[e].breakpoint;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),!0===e.options.focusOnSelect&&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;if(i="boolean"==typeof i?!0===(e=i)?0:o.slideCount-1:!0===e?--i:i,o.slideCount<1||i<0||i>o.slideCount-1)return!1;o.unload(),!0===t?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,o.reinit()},e.prototype.setCSS=function(i){var e,t,o=this,s={};
3546!0===o.options.rtl&&(i=-i),e="left"==o.positionProp?Math.ceil(i)+"px":"0px",t="top"==o.positionProp?Math.ceil(i)+"px":"0px",s[o.positionProp]=i,!1===o.transformsEnabled?o.$slideTrack.css(s):(s={},!1===o.cssTransitions?(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;!1===i.options.vertical?!0===i.options.centerMode&&i.$list.css({padding:"0px "+i.options.centerPadding}):(i.$list.height(i.$slides.first().outerHeight(!0)*i.options.slidesToShow),!0===i.options.centerMode&&i.$list.css({padding:i.options.centerPadding+" 0px"})),i.listWidth=i.$list.width(),i.listHeight=i.$list.height(),!1===i.options.vertical&&!1===i.options.variableWidth?(i.slideWidth=Math.ceil(i.listWidth/i.options.slidesToShow),i.$slideTrack.width(Math.ceil(i.slideWidth*i.$slideTrack.children(".slick-slide").length))):!0===i.options.variableWidth?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();!1===i.options.variableWidth&&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,!0===t.options.rtl?i(s).css({position:"relative",right:e,top:0,zIndex:t.options.zIndex-2,opacity:0}
3546):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&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){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":void 0!==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(),!1===i.options.fade?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=!0===i.options.vertical?"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||!0===i.options.useCSS&&(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&&!1!==i.animType&&(i.animType="transform",i.transformType="transform",i.transitionType="transition"),i.transformsEnabled=i.options.useTransform&&null!==i.animType&&!1!==i.animType},e.prototype.setSlideClasses=function(i){var e,t,o,s,n=this;if(t=n.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),n.$slides.eq(i).addClass("slick-current"),!0===n.options.centerMode){var r=n.options.slidesToShow%2==0?1:0;e=Math.floor(n.options.slidesToShow/2),!0===n.options.infinite&&(i>=e&&i<=n.slideCount-1-e?n.$slides.slice(i-e+r,i+e+1).addClass("slick-active").attr("aria-hidden","false"):(o=n.options.slidesToShow+i,t.slice(o-e+1+r,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")}else 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=!0===n.options.infinite?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&&"anticipated"!==n.options.lazyLoad||n.lazyLoad()},e.prototype.setupInfinite=function(){var e,t,o,s=this;if(!0===s.options.fade&&(s.options.centerMode=!1),!0===s.options.infinite&&!1===s.options.fade&&(t=null,s.slideCount>s.options.slidesToShow)){for(o=!0===s.options.centerMode?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;e<o+s.slideCount;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"));s||(s=0),t.slideCount<=t.options.slidesToShow?t.slideHandler(s,!1,!0):t.slideHandler(s)},e.prototype.slideHandler=function(i,e,t){var o,s,n,r,l,d=null,a=this;if(e=e||!1,!(!0===a.animating&&!0===a.options.waitForAnimate||!0===a.options.fade&&a.currentSlide===i))if(!1===e&&a.asNavFor(i),o=i,d=a.getLeft(o),r=a.getLeft(a.currentSlide),a.currentLeft=null===a.swipeLeft?r:a.swipeLeft,!1===a.options.infinite&&!1===a.options.centerMode&&(i<0||i>a.getDotCount()*a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else if(!1===a.options.infinite&&!0===a.options.centerMode&&(i<0||i>a.slideCount-a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else{if(a.options.autoplay&&clearInterval(a.autoPlayTimer),s=o<0?a.slideCount%a.options.slidesToScroll!=0?a.slideCount-a.slideCount%a.options.slidesToScroll:a.slideCount+
3546o:o>=a.slideCount?a.slideCount%a.options.slidesToScroll!=0?0:o-a.slideCount:o,a.animating=!0,a.$slider.trigger("beforeChange",[a,a.currentSlide,s]),n=a.currentSlide,a.currentSlide=s,a.setSlideClasses(a.currentSlide),a.options.asNavFor&&(l=(l=a.getNavTarget()).slick("getSlick")).slideCount<=l.options.slidesToShow&&l.setSlideClasses(a.currentSlide),a.updateDots(),a.updateArrows(),!0===a.options.fade)return!0!==t?(a.fadeSlideOut(n),a.fadeSlide(s,function(){a.postSlide(s)})):a.postSlide(s),void a.animateHeight();!0!==t?a.animateSlide(d,function(){a.postSlide(s)}):a.postSlide(s)}},e.prototype.startLoad=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),!0===i.options.dots&&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=360-Math.abs(o)),o<=45&&o>=0?!1===s.options.rtl?"left":"right":o<=360&&o>=315?!1===s.options.rtl?"left":"right":o>=135&&o<=225?!1===s.options.rtl?"right":"left":!0===s.options.verticalSwiping?o>=35&&o<=135?"down":"up":"vertical"},e.prototype.swipeEnd=function(i){var e,t,o=this;if(o.dragging=!1,o.swiping=!1,o.scrolling)return o.scrolling=!1,!1;if(o.interrupted=!1,o.shouldClick=!(o.touchObject.swipeLength>10),void 0===o.touchObject.curX)return!1;if(!0===o.touchObject.edgeHit&&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(!(!1===e.options.swipe||"ontouchend"in document&&!1===e.options.swipe||!1===e.options.draggable&&-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,!0===e.options.verticalSwiping&&(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,l=this;return n=void 0!==i.originalEvent?i.originalEvent.touches:null,!(!l.dragging||l.scrolling||n&&1!==n.length)&&(e=l.getLeft(l.currentSlide),l.touchObject.curX=void 0!==n?n[0].pageX:i.clientX,l.touchObject.curY=void 0!==n?n[0].pageY:i.clientY,l.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(l.touchObject.curX-l.touchObject.startX,2))),r=Math.round(Math.sqrt(Math.pow(l.touchObject.curY-l.touchObject.startY,2))),!l.options.verticalSwiping&&!l.swiping&&r>4?(l.scrolling=!0,!1):(!0===l.options.verticalSwiping&&(l.touchObject.swipeLength=r),t=l.swipeDirection(),void 0!==i.originalEvent&&l.touchObject.swipeLength>4&&(l.swiping=!0,i.preventDefault()),s=(!1===l.options.rtl?1:-1)*(l.touchObject.curX>l.touchObject.startX?1:-1),!0===l.options.verticalSwiping&&(s=l.touchObject.curY>l.touchObject.startY?1:-1),o=l.touchObject.swipeLength,l.touchObject.edgeHit=!1,!1===l.options.infinite&&(0===l.currentSlide&&"right"===t||l.currentSlide>=l.getDotCount()&&"left"===t)&&(o=l.touchObject.swipeLength*l.options.edgeFriction,l.touchObject.edgeHit=!0),!1===l.options.vertical?l.swipeLeft=e+o*s:l.swipeLeft=e+o*(l.$list.height()/l.listWidth)*s,!0===l.options.verticalSwiping&&(l.swipeLeft=e+o*s),!0!==l.options.fade&&!1!==l.options.touchMove&&(!0===l.animating?(l.swipeLeft=null,!1):void l.setCSS(l.swipeLeft))))},e.prototype.swipeStart=function(i){var e,t=this;if(t.interrupted=!0,1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow)return 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,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","")}
3546,e.prototype.unslick=function(i){var e=this;e.$slider.trigger("unslick",[e,i]),e.destroy()},e.prototype.updateArrows=function(){var i=this;Math.floor(i.options.slidesToShow/2),!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&!i.options.infinite&&(i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===i.currentSlide?(i.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-i.options.slidesToShow&&!1===i.options.centerMode?(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-1&&!0===i.options.centerMode&&(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$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").end(),i.$dots.find("li").eq(Math.floor(i.currentSlide/i.options.slidesToScroll)).addClass("slick-active"))},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;i<r;i++)if("object"==typeof s||void 0===s?o[i].slick=new e(o[i],s):t=o[i].slick[s].apply(o[i].slick,n),void 0!==t)return t;return o}}); 3547(function($) { 3548 "use strict"; 3549 3550 function extractYouTubeID(url) { 3551 let match = url.match(/(?:youtube\.com\/.*v=|youtu\.be\/|youtube\.com\/embed\/)([a-zA-Z0-9_-]{11})/); 3552 return match ? match[1] : null; 3553 } 3554 3555 function updateBenefitImage(selector, imagePath) { 3556 if (imagePath) { 3557 $(`${selector} .cmp-image>img`).each(function() { 3558 $(this).attr('srcset', ''); 3559 $(this).attr('src', imagePath); 3560 }); 3561 } else { 3562 $(selector).hide(); 3563 } 3564 } 3565 3566 function processProductOverviewVideo(productData){ 3567 if(productData.data.productDataModelByPath?.item?.overviewVideoId){ 3568 $('.overview-video-Id .cmp-embed > iframe').each(function () { 3569 let originalUrl = productData.data.productDataModelByPath.item.overviewVideoId; 3570 3571 let videoId = extractYouTubeID(originalUrl); 3572 if (videoId) { 3573 let embedUrl = 'https://www.youtube.com/embed/' + videoId + '?feature=oembed'; 3574 $(this).attr('src', embedUrl); 3575 } else { 3576 console.warn('Invalid YouTube URL:', originalUrl); 3577 } 3578 }); 3579 }else { 3580 $("iframe[src*='youtube.com/embed']").each(function () { 3581 $(this).hide(); 3582 $(this).closest('.cmp-embed').hide(); // if it's wrapped 3583 }); 3584 } 3585 } 3586 3587 function processProductChannelSight(productData){ 3588 $('.reference-button-buy-now-channel-sight').each(function() { 3589 let upcValue = productData.data.productDataModelByPath.item.upc; 3590 let buyNowBtn = $(this).find('#buy-now-btn'); 3591 if (buyNowBtn.length && upcValue) { 3592 buyNowBtn.attr('data-product-sku', upcValue); 3593 } else{ 3594 buyNowBtn.hide(); 3595 } 3596 }); 3597 } 3598 3599 function processProductMikMak(productData){ 3600 $('.mikmak-where-to-buy').each(function() { 3601 let upcValue = productData.data.productDataModelByPath.item.upc; 3602 let buyNowBtn = $(this).find('.swn-tag-wtb-btn'); 3603 if (buyNowBtn.length && upcValue) { 3604 buyNowBtn.attr('data-mm-ids', upcValue); 3605 } else{ 3606 buyNowBtn.hide(); 3607 } 3608 }); 3609 } 3610 3611 function processProductClick2Buy(productData){ 3612 $('.click-to-buy').each(function() { 3613 let upcValue = productData.data.productDataModelByPath.item.upc; 3614 let buyNowBtn = $(this).find('.ctb-btn'); 3615 if (buyNowBtn.length && upcValue) { 3616 buyNowBtn.attr('data-widget-ean', upcValue); 3617 } else{ 3618 buyNowBtn.hide(); 3619 } 3620 }); 3621 } 3622 3623 function processProductRatingsReviews(productData){ 3624 if(productData){ 3625 $('.ratings-reviews').each(function() { 3626 let ratingReviews = $(this).find('.ratings-reviews-content'); 3627 let ratingReviewsCFProperty; 3628 if (ratingReviews.is('[data-cf-product-field]')) { 3629 ratingReviewsCFProperty = ratingReviews.attr('data-cf-product-field'); 3630 } 3631 let skusValue = productData.item[ratingReviewsCFProperty]; 3632 if (ratingReviews.length && skusValue) { 3633 ratingReviews.attr('data-bv-product-id', skusValue); 3634 } else{ 3635 ratingReviews.hide() 3636 let accordionItemElement = ratingReviews.closest(".cmp-accordion__item"); 3637 if (accordionItemElement.length > 0) { 3638 accordionItemElement.hide(); 3639 } 3640 } 3641 }); 3642 } 3643 } 3644 3645 3646 function graphQlContentFetch(obj, key) { 3647 let value = obj[key]; 3648 if (Array.isArray(value)) { 3649 return value 3650 .map((item) => item.html || item.plaintext || JSON.stringify(item)) 3651 .join(" "); 3652 } else if (typeof value === "object" && value !== null) { 3653 return value.html || value.plaintext || JSON.stringify(value); 3654 } 3655 return value; 3656 } 3657 3658 $(document).ready(function() { 3659 // condition to work only on pdp page 3660 var body = document.querySelector('body'); 3661 const metaTag = document.querySelector('meta[name="template"]'); 3662 const templateValue = metaTag ? metaTag.getAttribute('content') : ''; 3663 const pdpTemplateName="pim-pdp"; 3664 const hillsPdpTemplateName = "pdp-hillsvetpim"; 3665 3666 // Read the data attribute 3667 var ProductPath = body.dataset.product; 3668
3669 if(ProductPath!='' && templateValue.match(pdpTemplateName)){ 3670 let dataUrl = window.location.origin +"/graphql/execute.json/astra/productpath;path="+ProductPath; 3671 fetch(dataUrl) 3672 .then(response => response.json()) // Parse the JSON from the response 3673 .then(data => { 3674 let jsonObjResponse = data.data.productDataModelByPath.item; 3675 let jsonString = JSON.stringify(data); 3676 //console.log(jsonString); 3677 body.setAttribute('data-fulljson', jsonString); 3678 3679 3680 3681 $(".cmp-text").each(function () { 3682 let cmpTextElement = $(this); 3683 3684 cmpTextElement.children().each(function () { 3685 3686 let childElement = $(this); 3687 let textContent = childElement.text(); 3688 3689 let childElementValue = textContent.match(/{(.*?)}/g); 3690 3691 if (childElementValue) { 3692 childElementValue.forEach(function (childElementValue) { 3693 3694 let key = childElementValue.replace(/[{}]/g, ""); 3695 3696 let value = graphQlContentFetch(jsonObjResponse, key); 3697 3698 if (value && !value.includes('{"html":null}')) { 3699 textContent = textContent.replace(childElementValue, value); 3700 } 3701 else if ((value === null || value === "" || value === undefined || value.includes('{"html":null}')) && key !== "") { 3702 cmpTextElement.hide(); 3703 let accordionItemElement = cmpTextElement.closest(".cmp-accordion__item"); 3704 if (accordionItemElement.length > 0) { 3705 accordionItemElement.hide(); 3706 } 3707 } 3708 }); 3709 3710 textContent = textContent.replace(/}/g, ""); 3711 childElement.html(textContent); 3712 } 3713 }); 3714 }); 3715 $(".cmp-accordion__title").each(function () { 3716 let cmpAcElement = $(this); 3717 let textContent = cmpAcElement.text(); 3718 let childElementValue = textContent.match(/{(.*?)}/g); 3719 if (childElementValue) { 3720 childElementValue.forEach(function (childElementValue) { 3721 3722 let key = childElementValue.replace(/[{}]/g, ""); 3723 3724 let value = graphQlContentFetch(jsonObjResponse, key); 3725 3726 if (value) { 3727 textContent = textContent.replace(childElementValue, value); 3728 } 3729 }); 3730 3731 textContent = textContent.replace(/}/g, ""); 3732 if (textContent.includes('{"html":null') || textContent.includes('NA')) { 3733 cmpAcElement.closest('.cmp-accordion__item').hide(); 3734 } else { 3735 cmpAcElement.html(textContent); 3736 } 3737 } 3738 }); 3739 processProductOverviewVideo(data); 3740 3741 $('li[role="tab"]').each(function () { 3742 if ($(this).text().trim() === "{{fragranceScent}}") { 3743 $(this).text(data.data.productDataModelByPath.item.fragranceScent); 3744 } 3745 }); 3746 $('.cmp-tabs__tabpanel').each(function() { 3747 let tabpanelContent = $(this).find('.cmp-text').text().trim(); 3748 if (tabpanelContent.includes('{"html":null') || tabpanelContent.includes('{{benefit') || tabpanelContent.includes('{{reasonToBuy')) { 3749 let tabPanelId = $(this).closest('[role="tabpanel"]').attr('id'); 3750 let tabId = tabPanelId.replace('tabpanel', 'tab'); 3751 $('#' + tabId).hide(); // Hide the tab 3752 } 3753 }); 3754 $('.pdp-image .cmp-image>img').each(function(){ // this has to be only on product image in page 3755 $(this).attr('srcset',''); 3756 $(this).attr('src',data.data.productDataModelByPath.item.productAsset1); 3757 3758 }); 3759 const recommendedModeData = data?.data?.productDataModelByPath?.item?.indicationsAndUsage; 3760 if(recommendedModeData == null){ 3761 const recommendedModeText = document.querySelector(".text.pdp-recommended-mode"); 3762 if (recommendedModeText) { 3763 recommendedModeText.style.display = "none"; 3764 } 3765 } 3766 if(data?.data?.productDataModelByPath?.item?.image?._path){ 3767 $('.pdp-tuhogar-image .cmp-image>img').each(function(){ // this has to be only on product image in page 3768 $(this).attr('srcset',''); 3769 $(this).attr('src',data.data.productDataModelByPath.item.image._path); 3770 }); 3771 } 3772 if(data?.data?.productDataModelByPath?.item?.benefitIcon1?._path){ 3773 $('.pdp-tab1-image .cmp-image>img').each(function(){ // this has to be only on product image in page 3774 $(this).attr('srcset',''); 3775 $(this).attr('src',data.data.productDataModelByPath.item.benefitIcon1._path); 3776 }); 3777 } 3778 if (data?.data?.productDataModelByPath?.item?.benefitIcon2?._path) { 3779 $('.pdp-tab2-image .cmp-image>img').each(function() { 3780 $(this).attr('srcset', ''); 3781 $(this).attr('src', data.data.productDataModelByPath.item.benefitIcon2._path); 3782 }); 3783 } 3784 const benefitIcon1Path = data?.data?.productDataModelByPath?.item?.benefitIcon1?._path; 3785 const benefitIcon2Path = data?.data?.productDataModelByPath?.item?.benefitIcon2?._path; 3786 const benefitIcon3Path = data?.data?.productDataModelByPath?.item?.benefitIcon3?._path; 3787 const benefitIcon4Path = data?.data?.productDataModelByPath?.item?.benefitIcon4?._path; 3788 const benefitIcon5Path = data?.data?.productDataModelByPath?.item?.benefitIcon5?._path; 3789 const benefitIcon6Path = data?.data?.productDataModelByPath?.item?.benefitIcon6?._path; 3790 const benefitIcon7Path = data?.data?.productDataModelByPath?.item?.benefitIcon7?._path; 3791 const benefitIcon8Path = data?.data?.productDataModelByPath?.item?.benefitIcon8?._path; 3792 3793 3794 updateBenefitImage('.pdp-benefit1Image', benefitIcon1Path); 3795 updateBenefitImage('.pdp-benefit2Image', benefitIcon2Path); 3796 updateBenefitImage('.pdp-benefit3Image', benefitIcon3Path); 3797 updateBenefitImage('.pdp-benefit4Image', benefitIcon4Path); 3798 updateBenefitImage('.pdp-benefit5Image', benefitIcon5Path); 3799 updateBenefitImage('.pdp-benefit6Image', benefitIcon6Path); 3800 updateBenefitImage('.pdp-benefit7Image', benefitIcon7Path); 3801 updateBenefitImage('.pdp-benefit8Image', benefitIcon8Path); 3802 const imageMappings = { 3803 reasonToBuy1Image: '.pdp-reasonToBuy1Image .cmp-image>img', 3804 reasonToBuy2Image: '.pdp-reasonToBuy2Image .cmp-image>img', 3805 reasonToBuy3Image: '.pdp-reasonToBuy3Image .cmp-image>img', 3806 reasonToBuy4Image: '.pdp-reasonToBuy4Image .cmp-image>img' 3807 }; 3808 const item = data?.data?.productDataModelByPath?.item; 3809 if (item) {
3810 Object.entries(imageMappings).forEach(([key, selector]) => { 3811 if (item[key]) { 3812 $(selector).each(function () { 3813 $(this).attr('srcset', '').attr('src', item[key]); 3814 }); 3815 } 3816 }); 3817 } 3818 const altTextMapping = [ 3819 { selector: '.pdp-reasonToBuy1Image .cmp-image img', altText: item?.reasonToBuy1ImageAltText }, 3820 { selector: '.pdp-reasonToBuy2Image .cmp-image img', altText: item?.reasonToBuy2ImageAltText }, 3821 { selector: '.pdp-reasonToBuy3Image .cmp-image img', altText: item?.reasonToBuy3ImageAltText }, 3822 { selector: '.pdp-reasonToBuy4Image .cmp-image img', altText: item?.reasonToBuy4ImageAltText }, 3823 { selector: '.pdp-image .cmp-image img', altText: item?.productAsset1AltText}, 3824 { selector: '.pdp-image1 .cmp-image img', altText: item?.productAsset1AltText}, 3825 { selector: '.pdp-image2 .cmp-image img', altText: item?.productAsset2AltText}, 3826 { selector: '.pdp-image3 .cmp-image img', altText: item?.productAsset3AltText}, 3827 { selector: '.pdp-image4 .cmp-image img', altText: item?.productAsset4AltText}, 3828 { selector: '.pdp-image5 .cmp-image img', altText: item?.productAsset5AltText}, 3829 { selector: '.pdp-image6 .cmp-image img', altText: item?.productAsset6AltText}, 3830 { selector: '.pdp-image7 .cmp-image img', altText: item?.productAsset7AltText}, 3831 { selector: '.pdp-image8 .cmp-image img', altText: item?.productAsset8AltText}, 3832 { selector: '.pdp-image9 .cmp-image img', altText: item?.productAsset9AltText}, 3833 { selector: '.pdp-image10 .cmp-image img', altText: item?.productAsset10AltText}, 3834 { selector: '.pdp-tab1-image .cmp-image img', altText: item?.benefit1AltText}, 3835 { selector: '.pdp-tab2-image .cmp-image img', altText: item?.benefit2AltText}, 3836 { selector: '.pdp-benefit1Image .cmp-image img', altText: item?.benefit1AltText}, 3837 { selector: '.pdp-benefit2Image .cmp-image img', altText: item?.benefit2AltText}, 3838 { selector: '.pdp-benefit3Image .cmp-image img', altText: item?.benefit3AltText}, 3839 { selector: '.pdp-benefit4Image .cmp-image img', altText: item?.benefit4AltText}, 3840 { selector: '.pdp-benefit5Image .cmp-image img', altText: item?.benefit5AltText}, 3841 { selector: '.pdp-benefit6Image .cmp-image img', altText: item?.benefit6AltText}, 3842 { selector: '.pdp-benefit7Image .cmp-image img', altText: item?.benefit7AltText}, 3843 { selector: '.pdp-benefit8Image .cmp-image img', altText: item?.benefit8AltText}, 3844 { selector: '.retailer-image1 .cmp-image img', altText: item?.retailerAlttext1}, 3845 { selector: '.retailer-image2 .cmp-image img', altText: item?.retailerAlttext2}, 3846 { selector: '.retailer-image3 .cmp-image img', altText: item?.retailerAlttext3}, 3847 { selector: '.retailer-image4 .cmp-image img', altText: item?.retailerAlttext4}, 3848 { selector: '.retailer-image5 .cmp-image img', altText: item?.retailerAlttext5}, 3849 { selector: '.retailer-image6 .cmp-image img', altText: item?.retailerAlttext6}, 3850 { selector: '.retailer-image7 .cmp-image img', altText: item?.retailerAlttext7}, 3851 { selector: '.retailer-image8 .cmp-image img', altText: item?.retailerAlttext8} 3852 ]; 3853 altTextMapping.forEach(({ selector, altText }) => { 3854 if (altText) { 3855 $(selector).attr('alt', altText); 3856 }else{ 3857 $(selector).attr('alt', ""); 3858 } 3859 }); 3860 processProductChannelSight(data); 3861 processProductMikMak(data); 3862 processProductClick2Buy(data); 3863 3864 for (let i = 1; i <= 8; i++) { 3865 let retailerLink = data?.data?.productDataModelByPath?.item?.[`retailerLink${i}`]; 3866 if (retailerLink) { 3867 let $image = $(`.retailer-image${i} .cmp-image__image`); 3868 if ($image.length && !$image.parent().is('a')) { 3869 $image.wrap(`<a href="${retailerLink}" target="_blank"></a>`); 3870 } else { 3871 $image.parent('a').attr('href', retailerLink).attr('target', '_blank'); 3872 } 3873 $image.attr('data-url', retailerLink); 3874 } 3875 } 3876 3877 const retailerAssets = [ 3878 { assetKey: 'retailerasset1', selector: '.retailer-image1' }, 3879 { assetKey: 'retailerasset2', selector: '.retailer-image2' }, 3880 { assetKey: 'retailerasset3', selector: '.retailer-image3' }, 3881 { assetKey: 'retailerasset4', selector: '.retailer-image4' }, 3882 { assetKey: 'retailerasset5', selector: '.retailer-image5' }, 3883 { assetKey: 'retailerasset6', selector: '.retailer-image6' }, 3884 { assetKey: 'retailerasset7', selector: '.retailer-image7' }, 3885 { assetKey: 'retailerasset8', selector: '.retailer-image8' } 3886 ];
3887 retailerAssets.forEach(function(assetObj, index) { 3888 if (data && data.data && data.data.productDataModelByPath && data.data.productDataModelByPath.item[assetObj.assetKey]) { 3889 $(assetObj.selector + ' .cmp-image .cmp-image__link >img').each(function() { 3890 $(this).attr('srcset', ''); 3891 $(this).attr('src', data.data.productDataModelByPath.item[assetObj.assetKey]); 3892 }); 3893 } else { 3894 $(assetObj.selector).hide(); 3895 } 3896 }); 3897 3898 processProductRatingsReviews(data.data.productDataModelByPath); 3899 // Array of product asset keys and corresponding image selectors 3900 const productAssets = [ 3901 { assetKey: 'productAsset1', selector: '.pdp-image1' }, 3902 { assetKey: 'productAsset2', selector: '.pdp-image2' }, 3903 { assetKey: 'productAsset3', selector: '.pdp-image3' }, 3904 { assetKey: 'productAsset4', selector: '.pdp-image4' }, 3905 { assetKey: 'productAsset5', selector: '.pdp-image5' }, 3906 { assetKey: 'productAsset6', selector: '.pdp-image6' }, 3907 { assetKey: 'productAsset7', selector: '.pdp-image7' }, 3908 { assetKey: 'productAsset8', selector: '.pdp-image8' }, 3909 { assetKey: 'productAsset9', selector: '.pdp-image9' }, 3910 { assetKey: 'productAsset10', selector: '.pdp-image10' } 3911 ]; 3912 productAssets.forEach(function(assetObj, index) { 3913 if (data && data.data && data.data.productDataModelByPath && data.data.productDataModelByPath.item[assetObj.assetKey]) { 3914 $(assetObj.selector + ' .cmp-image>img').each(function() { 3915 if(data.data.productDataModelByPath.item[assetObj.assetKey]) { 3916 $(this).attr('srcset', ''); 3917 $(this).attr('src', data.data.productDataModelByPath.item[assetObj.assetKey]); 3918 } else { 3919 const parent = $(this).closest('.image'); 3920 if (parent) parent.remove(); 3921 } 3922 }); 3923 } 3924 }); 3925 3926 const imageKeys = ['productAsset1', 'productAsset2', 'productAsset3', 'productAsset3', 'productAsset4', 'productAsset5', 'productAsset6','productAsset7','productAsset8','productAsset9','productAsset10']; 3927 const imageUrls = imageKeys.map(key => data.data.productDataModelByPath.item[key]).filter(Boolean); 3928 const carouselThumbImages = document.querySelectorAll('.thumbnail-carousel img'); 3929 carouselThumbImages.forEach((img, index) => { 3930 if (index < imageUrls.length) { 3931 if(imageUrls[index] || imageUrls[index]._path) { 3932 img.src = (imageUrls[index] && typeof imageUrls[index] === 'object' && imageUrls[index]._path) 3933 ? imageUrls[index]._path 3934 : imageUrls[index]; 3935 } else { 3936 const parent = img.closest('.image'); 3937 if (parent) parent.remove(); 3938 } 3939 } 3940 }); 3941 3942 removeLoader(); 3943 }) 3944 .catch(error => console.error('Error fetching data:', error)); 3945 // Handle any errors 3946 } else if (ProductPath != '' && templateValue.match(hillsPdpTemplateName)) { 3947 let graphQLDataUrl = window.location.origin + "/graphql/execute.json/astra/hillsproductpath;
3947path=" + ProductPath; 3948 fetch(graphQLDataUrl) 3949 .then(response => response.json()) // Parse the JSON from the response 3950 .then(data => { 3951 let jsonObjResponse = data.data.hillsvetProductModelByPath.item; 3952 let jsonString = JSON.stringify(data); 3953 //console.log(jsonString); 3954 body.setAttribute('data-fulljson', jsonString); 3955 3956 const form = data?.data?.hillsvetProductModelByPath?.item?.form || ''; 3957 const dryDiv = document.getElementById('nutrient-naloric-content-dry'); 3958 const nonDryDiv = document.getElementById('nutrient-naloric-content-not-dry'); 3959 3960 const show = el => el && (el.style.display = 'block'); 3961 const hide = el => el && (el.style.display = 'none'); 3962 3963 if (form.includes('dry')) { 3964 show(dryDiv); 3965 hide(nonDryDiv); 3966 } else { 3967 hide(dryDiv); 3968 show(nonDryDiv); 3969 } 3970 3971 $(".cmp-text").each(function () { 3972 let cmpTextElement = $(this); 3973 3974 cmpTextElement.children().each(function () { 3975 3976 let childElement = $(this); 3977 let textContent = childElement.text(); 3978 3979 let childElementValue = textContent.match(/{(.*?)}/g); 3980 3981 if (childElementValue) { 3982 childElementValue.forEach(function (childElementValue) { 3983 3984 let key = childElementValue.replace(/[{}]/g, ""); 3985 3986 let value = graphQlContentFetch(jsonObjResponse, key); 3987 3988 if (value && !value.includes('{"html":null}')) { 3989 textContent = textContent.replace(childElementValue, value); 3990 } else if ((value === null || value === "" || value === undefined || value.includes('{"html":null}')) && key !== "") { 3991 cmpTextElement.hide(); 3992 } 3993 }); 3994 3995 textContent = textContent.replace(/}/g, ""); 3996 childElement.html(textContent); 3997 } 3998 }); 3999 // Check if the parent .text div has the class .pdp-skeleton-text and remove it 4000 let parentTextDiv = cmpTextElement.closest(".text"); 4001 if (parentTextDiv.hasClass("pdp-skeleton-text")) { 4002 parentTextDiv.removeClass("pdp-skeleton-text"); 4003 } 4004 }); 4005 // for image carousel 4006 const carouselImagesParent = document.querySelectorAll('.pdp-carousel .cmp-image'); 4007 const carouselThumbImages = document.querySelectorAll('.pdp-carousel-thumb img'); 4008 const imageKeys = Array.from(carouselImagesParent).map(img => img.id); 4009 const imageUrls = imageKeys.map(k => { 4010 const alt = data.data.hillsvetProductModelByPath.item[k]; 4011 return alt || "-"; 4012 }) 4013 4014 const carouselImages = document.querySelectorAll('.carousel .cmp-image__image'); 4015 const imageAltKeys = Array.from(carouselImages).map(img => img.alt); 4016 const imageAlts = imageAltKeys.map(k => { 4017 const alt = data.data.hillsvetProductModelByPath.item[k]; 4018 return alt || "Alt text"; 4019 }); 4020 4021 carouselImages.forEach((img, index) => { 4022 const urlData = imageUrls[index]; 4023 let imagePath = null; 4024 4025 if (urlData === "-" || urlData == null) { 4026 // Skip if path is "-" 4027 const parent = img.closest('.image'); 4028 if (parent) parent.remove(); 4029 return; 4030 } 4031 4032 if (typeof urlData === 'object' && urlData._path) { 4033 imagePath = urlData._path; 4034 } else if (typeof urlData === 'string') { 4035 imagePath = urlData; 4036 } 4037 4038 if (imagePath) { 4039 img.src = imagePath; 4040 img.srcset = ""; 4041 img.alt = imageAlts[index] != null ? imageAlts[index] : "Alt text"; 4042 } else { 4043 const parent = img.closest('.image'); 4044 if (parent) parent.remove(); 4045 } 4046 }); 4047
4048 carouselThumbImages.forEach((img, index) => { 4049 const urlData = imageUrls[index]; 4050 let imagePath = null; 4051 4052 if (urlData === "-" || urlData == null) { 4053 const parent = img.closest('.thumb'); 4054 if (parent) parent.remove(); 4055 return; 4056 } 4057 4058 if (typeof urlData === 'object' && urlData._path) { 4059 imagePath = urlData._path; 4060 } else if (typeof urlData === 'string') { 4061 imagePath = urlData; 4062 } 4063 4064 if (imagePath) { 4065 img.src = imagePath; 4066 img.alt = imageAlts[index] != null ? imageAlts[index] : ""; 4067 } else { 4068 const parent = img.closest('.thumb'); 4069 if (parent) parent.remove(); 4070 } 4071 }); 4072 processProductRatingsReviews(data.data.hillsvetProductModelByPath); 4073 //for ingredient image 4074 const ingredientImage = data?.data?.hillsvetProductModelByPath?.item?.ingredient500Image; 4075 const ingredientImageAlt = data?.data?.hillsvetProductModelByPath?.item?.ingredients500AltText; 4076 4077 const accordionImg = document.querySelector('.pdp-accordion-image .image img'); 4078 if (accordionImg && ingredientImage) { 4079 accordionImg.src = ingredientImage; 4080 accordionImg.srcset = ""; 4081 if (ingredientImageAlt) { 4082 accordionImg.alt = ingredientImageAlt; 4083 } else { 4084 accordionImg.alt = "Alt text" 4085 } 4086 } else { 4087 accordionImg.src = ""; 4088 accordionImg.srcset = ""; 4089 accordionImg.remove(); 4090 } 4091 4092 const dataItem = data?.data?.hillsvetProductModelByPath?.item; 4093 4094 const insertImage = (containerId, imgPath, altText) => { 4095 const container = document.getElementById(containerId); 4096 if (!container) return; 4097 4098 if (!imgPath) { 4099 container.style.display = 'none'; 4100 return; 4101 } 4102 4103 const imgDiv = container.querySelector('.image'); 4104 const img = document.createElement('img'); 4105 img.src = imgPath; 4106 img.alt = altText || 'Alt text'; 4107 imgDiv.appendChild(img); 4108 }; 4109 4110 insertImage('hills-madein-image', dataItem?.madeInImage, dataItem?.madeInImageAltText); 4111 insertImage('hills-guarantee-image', dataItem?.guaranteeImage, dataItem?.guaranteeImageAltText); 4112 4113 const embeddableDivs = Array.from(document.querySelectorAll('div.cmp-embed-v1[data-cmp-type="EMBEDDABLE"]')); 4114 4115 embeddableDivs.forEach(div => { 4116 const iframe = div.querySelector('iframe'); 4117 if (!iframe) return; 4118 4119 const src = iframe.getAttribute('data-src-on-consent'); 4120 if (!src) return; 4121 4122 try { 4123 const url = new URL(src); 4124 4125 // Extract last segment after last slash in pathname 4126 let pathSegments = url.pathname.split('/').filter(Boolean); 4127 if (pathSegments.length === 0) return; 4128 4129 let placeholderKey = pathSegments[pathSegments.length - 1]; 4130 4131 const actualVideoId = dataItem[placeholderKey]; 4132 4133 if (!actualVideoId) { 4134 div.remove(); 4135 return; 4136 } 4137 4138 // Replace placeholder with actual video ID 4139 pathSegments[pathSegments.length - 1] = actualVideoId; 4140 url.pathname = '/' + pathSegments.join('/'); 4141 4142 iframe.setAttribute('data-src-on-consent', url.toString()); 4143 4144 } catch (error) { 4145 console.error('Error processing iframe src:', src, error); 4146 } 4147 }); 4148 4149 4150 }) 4151 .catch(error => console.error('Error fetching data:', error)); // Handle any errors 4152 } 4153 4154 function removeLoader() { 4155 const pdpLoader=document.querySelector('.pdp-loader'); 4156 if(pdpLoader){ 4157 pdpLoader.classList.remove('pdp-loader'); 4158 } 4159 } 4160 4161 }); 4162})(jQuery); 4163$(document).ready(function () { 4164 // Menu href and uniqueID
4165 let currentActiveMenu = null; 4166 $(document).on("click", ".box-main-nav-menu ul li a", function (event) { 4167 const liId = $(this).attr("href").substring(1); 4168 const hrefValue = $(this).attr('href'); 4169 4170 if (hrefValue === '#') { 4171 return; // Return if href is '#' 4172 } 4173 const matchingElement = $(".container").find(`#${liId}`); 4174 const parentContainer = matchingElement.closest(".cmp-container").parent(); 4175 const mainMenuItem = this; 4176 4177 if (matchingElement.length === 1) { 4178 event.preventDefault(); 4179 4180 // If another menu is currently active, close it 4181 if (currentActiveMenu && currentActiveMenu !== liId) { 4182 const previouslyActiveMenu = $(".container").find(`#${currentActiveMenu}`).closest(".cmp-container").parent(); 4183 previouslyActiveMenu.slideUp(600); 4184 $(`#${currentActiveMenu}`).attr("aria-expanded", "false"); 4185 } 4186 4187 if (currentActiveMenu === liId) { 4188 // If the same menu is clicked, close it 4189 if (parentContainer.hasClass('mega-menu__submenu')) { 4190 parentContainer.hide(); // Show it if it has the mega-menu__submenu class 4191 } else { 4192 parentContainer.slideToggle(600); // Otherwise, toggle it normally 4193 } 4194 currentActiveMenu = null; 4195 $(this).attr("aria-expanded", "false"); 4196 4197 const nextMenuItem = $(mainMenuItem).parent().next('li').find('a'); 4198 if (nextMenuItem.length > 0) { 4199 nextMenuItem.focus(); 4200 } 4201 } else { 4202 // Check if the parent container has the mega-menu__submenu class 4203 if (parentContainer.hasClass('mega-menu__submenu')) { 4204 parentContainer.show(); // Show it if it has the mega-menu__submenu class 4205 } else { 4206 parentContainer.slideToggle(600); // Otherwise, toggle it normally 4207 } 4208 4209 currentActiveMenu = liId; 4210 $(this).attr("aria-expanded", "true"); 4211 4212 const firstSubMenuLink = parentContainer.find('a').first(); 4213 firstSubMenuLink.focus(); 4214 const lastElement = parentContainer.find('a').last(); 4215 4216 lastElement.on("focusout", function (event) { 4217 const relatedTarget = event.relatedTarget; 4218 const isInsideMenu = parentContainer.has(relatedTarget).length > 0; 4219 4220 if (!isInsideMenu) { 4221 parentContainer.slideUp(600); 4222 $(mainMenuItem).attr("aria-expanded", "false"); 4223 currentActiveMenu = null; 4224 4225 const nextMenuItem = $(mainMenuItem).parent().next('li').find('a'); 4226 if (nextMenuItem.length > 0) { 4227 nextMenuItem.focus(); 4228 } 4229 } 4230 }); 4231 4232 } 4233 } 4234 }); 4235 4236 $(document).on("keydown", ".box-main-nav-menu ul li a", function (event) { 4237 if (event.keyCode === 13) { 4238 event.preventDefault(); 4239 const liId = $(this).attr("href").substring(1); 4240 const matchingElement = $(".container").find(`#${liId}`); 4241 const parentContainer = matchingElement.closest(".cmp-container").parent(); 4242 const mainMenuItem = this; 4243 if (matchingElement.length === 1) { 4244 if (currentActiveMenu === liId) { 4245 parentContainer.slideUp(600); 4246 currentActiveMenu = null; 4247 $(this).attr("aria-expanded", "false"); 4248 const nextMenuItem = $(mainMenuItem).parent().next('li').find('a'); 4249 if (nextMenuItem.length > 0) { 4250 nextMenuItem.focus(); 4251 } 4252 } else { 4253 // Check if the parent container has the mega-menu__submenu class 4254 if (parentContainer.hasClass('mega-menu__submenu')) { 4255 parentContainer.show();
4255 // Show it if it has the mega-menu__submenu class 4256 } else { 4257 parentContainer.slideToggle(600); // Otherwise, toggle it normally 4258 } 4259 currentActiveMenu = liId; 4260 $(this).attr("aria-expanded", "true"); 4261 const firstSubMenuLink = parentContainer.find('a').first(); 4262 firstSubMenuLink.focus(); 4263 const lastElement = parentContainer.find('a').last(); 4264 lastElement.on("focusout", function () { 4265 parentContainer.slideUp(600); 4266 $(mainMenuItem).attr("aria-expanded", "false"); 4267 currentActiveMenu = null; 4268 const nextMenuItem = $(mainMenuItem).parent().next('li').find('a'); 4269 if (nextMenuItem.length > 0) { 4270 nextMenuItem.focus(); 4271 } 4272 }); 4273 } 4274 } 4275 } 4276 }); 4277 4278 $(".close-menu .submenu-close").attr("aria-hidden", "true"); 4279 //Close menu slidetoggle 4280 $(".close-menu").on("click", function (event) { 4281 event.preventDefault(); 4282 $(this).closest(".container").slideToggle(400); 4283 $(".main-nav-menu ul").removeAttr("style"); // Remove style attribute 4284 }); 4285 $(".close-menu").on("keydown", function (event) { 4286 if (event.keyCode === 13) { 4287 event.preventDefault(); 4288 $(this).closest(".container").slideToggle(400); 4289 $('.hamburger-button').attr('aria-expanded', 'false'); 4290 $(".main-nav-menu ul").removeAttr("style"); // Remove style attribute 4291 } 4292 4293 }); 4294 //submenu back function 4295 $(".submenu-prev").on("click", function (event) { 4296 event.preventDefault(); 4297 $(this).closest(".container").slideToggle(400); 4298 }); 4299 4300 $(document).on('keydown', function (event) { 4301 if (event.key === 'Escape') { 4302 $(event.target).closest('[style*="display: block"]').slideUp(); 4303 event.preventDefault(); 4304 } 4305 }); 4306 $(document).on('click keydown','.hamburger-button', function() { 4307 if (!$(this).attr('aria-expanded')) { 4308 $(this).attr('aria-expanded', 'true'); 4309 } else { 4310 var expanded = $(this).attr('aria-expanded') === 'true'; 4311 $(this).attr('aria-expanded', expanded ? 'false' : 'true'); 4312 } 4313 }); 4314 4315 //ADA Aria-haspopup 4316 $('.richText-main-nav-links li a').each(function() { 4317 const href = $(this).attr('href'); 4318 if (href.startsWith('#') && href !== '#') { 4319 // Set aria-haspopup to true 4320 $(this).attr('aria-haspopup', 'true'); 4321 } 4322 }); 4323 4324}); 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335/** 4336 * Go to top button 4337 */ 4338 4339$(document).ready(function() { 4340 $("#go-to-top").on("click", function () { 4341 $("html, body").animate({ scrollTop: 0 }, 0); 4342 return false; 4343 }); 4344 4345 $("#go-to-top").on("keydown", function (e) { 4346 if (e.key === "Enter" || e.keyCode === 13) { 4347 e.preventDefault(); 4348 $("html, body").animate({ scrollTop: 0 }, 0); 4349 } 4350 }); 4351}); 4352 4353$(document).ready(function() { 4354 $("a.hyperlinkStyles-lang-selector").on("click", function() { 4355 const liFoId = $(this).attr("href").substring(1); 4356 const matchingElementFooter = $(".container").find(`#${liFoId}`); 4357 const parentContainerFooter = matchingElementFooter.closest(".cmp-container").parent(); 4358 4359 parentContainerFooter.slideToggle(400, function() { 4360 const isVisible = parentContainerFooter.is(":visible"); 4361 $("a.hyperlinkStyles-lang-selector").attr("aria-expanded", isVisible); 4362 }); 4363 4364 const countrySelectorBox = $("a.hyperlinkStyles-lang-selector"); 4365 setTimeout(function() { 4366 if (countrySelectorBox.is(":visible")) { 4367 countrySelectorBox.show({ 4368 duration: 600, 4369 complete: () => { 4370 countrySelectorBox.get(0).scrollIntoView({ behavior: "smooth" }); 4371 }, 4372 }); 4373 } else { 4374 countrySelectorBox.slideUp(); 4375 } 4376 }, 600); 4377 }); 4378 4379 4380 const countrySelectorBoxCloseBtn = $(".countrySelector .button-close").find(".cmp-button"); 4381 countrySelectorBoxCloseBtn.on("tap click", (e) => { 4382 e.preventDefault(); 4383 4384 4385 $(".countrySelector").slideUp({ 4386 duration: 300 4387 }); 4388 4389 4390 $("a.hyperlinkStyles-lang-selector").attr("aria-expanded", "false"); 4391 4392 4393 $("a.hyperlinkStyles-lang-selector").focus(); 4394 }); 4395 4396 countrySelectorBoxCloseBtn.on("keydown", (e) => { 4397 if (e.key === "Enter" || e.keyCode === 13) { 4398 e.preventDefault(); 4399 4400 $(".countrySelector").slideUp({ 4401 duration: 300 4402 }); 4403 4404 $("a.hyperlinkStyles-lang-selector").attr("aria-expanded", "false"); 4405 4406 4407 $("a.hyperlinkStyles-lang-selector").focus(); 4408 } 4409 }); 4410 4411 4412 $("a.hyperlinkStyles-lang-selector").on("keydown", function(e) {
4413 const key = e.which || e.keyCode; 4414 4415 if (key === 13 || key === 32) { 4416 e.preventDefault(); 4417 4418 const liFoId = $(this).attr("href").substring(1); 4419 const matchingElementFooter = $(".container").find(`#${liFoId}`); 4420 const parentContainerFooter = matchingElementFooter.closest(".cmp-container").parent(); 4421 4422 parentContainerFooter.slideToggle(400, function() { 4423 const isVisible = parentContainerFooter.is(":visible"); 4424 $("a.hyperlinkStyles-lang-selector").attr("aria-expanded", isVisible); 4425 4426 if (isVisible) { 4427 const firstLink = parentContainerFooter.find("a").first(); 4428 firstLink.focus(); 4429 } else { 4430 $("a.hyperlinkStyles-lang-selector").focus(); 4431 } 4432 }); 4433 4434 const countrySelectorBox = $("a.hyperlinkStyles-lang-selector"); 4435 setTimeout(function() { 4436 if (countrySelectorBox.is(":visible")) { 4437 countrySelectorBox.show({ 4438 duration: 600, 4439 complete: () => { 4440 countrySelectorBox.get(0).scrollIntoView({ behavior: "smooth" }); 4441 }, 4442 }); 4443 } else { 4444 countrySelectorBox.slideUp(); 4445 } 4446 }, 600); 4447 } 4448 }); 4449 4450 4451 4452 4453 countrySelectorBoxCloseBtn.on("tap click", (e) => { 4454 e.preventDefault(); 4455 $(".countrySelector").slideUp({ 4456 duration: 300 4457 }); 4458 4459 $("a.hyperlinkStyles-lang-selector").attr("aria-expanded", "false"); 4460 }); 4461 4462}); 4463 4464 4465 4466$(document).ready(function() { 4467 window.dataLayer = window.dataLayer || []; 4468 4469 const existingPageInfoEntry = window.dataLayer.find(d => d.pageInformation); 4470 4471 if (existingPageInfoEntry && typeof existingPageInfoEntry.pageInformation === 'object') { 4472 existingPageInfoEntry.pageInformation.pageUrl = window.location.href; 4473 existingPageInfoEntry.pageInformation.referringURL = document.referrer || ""; 4474 } 4475 4476 // Find the site information block (contains contentPath) 4477 const siteInfoEntry = window.dataLayer.find(d => { 4478 const key = Object.keys(d)[0]; 4479 const val = d[key]; 4480 return val && val.contentPath; 4481 }); 4482 4483 if (siteInfoEntry) { 4484 const key = Object.keys(siteInfoEntry)[0]; 4485 const siteInfo = siteInfoEntry[key]; 4486 const contentPath = siteInfo.contentPath || ""; 4487 const currentUrlPath = window.location.pathname; 4488 4489 // Default urlPath: use current URL 4490 siteInfo.urlPath = currentUrlPath; 4491 4492 //Handle 404 error handler paths 4493 if (contentPath.includes("/error-handler/404")) { 4494 // Extract the region (folder right before /content/error-handler) 4495 const regionMatch = contentPath.match(/\/([^/]+)\/content\/error-handler\/404$/); 4496 const regionSegment = regionMatch ? regionMatch[1].replace(/_/g, '-') : ""; 4497 4498 // Construct new urlPath: /region/error-handler/404 4499 siteInfo.urlPath = regionSegment 4500 ? `/${regionSegment}/error-handler/404` 4501 : "/error-handler/404"; 4502 } 4503 } 4504 function getBrowserName() { 4505 const ua = navigator.userAgent; 4506 if (ua.includes("Edg/")) return "chrome"; // Chromium-based Edge treated as Chrome 4507 if (ua.includes("Chrome/") && !ua.includes("Edg/")) return "chrome"; 4508 if (ua.includes("Firefox/")) return "firefox"; 4509 if (ua.includes("Safari/") && !ua.includes("Chrome/")) return "safari"; 4510 if (ua.includes("OPR/") || ua.includes("Opera")) return "opera"; 4511 return "other"; 4512 } 4513 4514 function getBrowserVersion() { 4515 const match = navigator.userAgent.match(/(Chrome|Firefox|Edg|OPR|Safari)\/([\d.]+)/); 4516 return match ? match[2] : "unknown"; 4517 } 4518 4519 function getOSName() { 4520 const platform = navigator.platform.toLowerCase(); 4521 const ua = navigator.userAgent.toLowerCase(); 4522 if (platform.includes("win")) return "windows"; 4523 if (platform.includes("mac")) return "macos"; 4524 if (platform.includes("linux")) return "linux"; 4525 if (/android/.test(ua)) return "android"; 4526 if (/iphone|ipad|ipod/.test(ua)) return "ios"; 4527 return "other"; 4528 } 4529 4530 function getDeviceType() { 4531 return /mobile|android|iphone|ipad|ipod/i.test(navigator.userAgent) 4532 ? "mobile" 4533 : "desktop"; 4534 } 4535 4536 function getGAClientId() { 4537 const match = document.cookie.match(/_ga=GA\d\.\d\.(\d+\.\d+)/); 4538 return match ? `GA1.1.${match[1]}` : "unknown"; 4539 } 4540 4541 window.dataLayer = window.dataLayer || []; 4542 4543 // Find existing userInformation object in dataLayer 4544 let userInfoObj = null; 4545 for (let i = dataLayer.length - 1; i >= 0; i--) { 4546 if (dataLayer[i].userInformation) { 4547 userInfoObj = dataLayer[i].userInformation; 4548 break; 4549 } 4550 } 4551 4552 const bodyTag = document.body; 4553 const userInfoFlag = bodyTag.getAttribute("data-user-info"); 4554 4555 if (!userInfoObj && userInfoFlag === "true") { 4556 // If no userInformation object exists, create one inside dataLayer 4557 userInfoObj = {}; 4558 dataLayer.push({ userInformation: userInfoObj }); 4559 4560 // Update existing userInformation properties 4561 userInfoObj.browserLanguage = navigator.language || navigator.userLanguage; 4562 userInfoObj.browserName = getBrowserName(); 4563 userInfoObj.browserVersion = getBrowserVersion(); 4564 userInfoObj.deviceType = getDeviceType(); 4565 userInfoObj.osName = getOSName(); 4566 userInfoObj.gaClientId = getGAClientId(); 4567 } 4568}); 4569 4570
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.