PageSourceSearch

https://www.biogen.ca/etc.clientlibs/dxp-2/clientlibs/basev2.min.efa45964d7c4511c3bd81705dec4430f.js

js biogen.ca collected 2026-09-30 17:15:24 UTC 899,933 bytes, 11,350 lines download raw bytes

1/*******************************************************************************
2 * Copyright 2020 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/LICENSE-2.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(function() {
17    "use strict";
18
19    window.CQ = window.CQ || {};
20    window.CQ.CoreComponents = window.CQ.CoreComponents || {};
21    window.CQ.CoreComponents.container = window.CQ.CoreComponents.container || {};
22    window.CQ.CoreComponents.container.utils = {};
23
24    /**
25     * Utilities for Container Components (accordion, tabs)
26     *
27     * @namespace
28     * @alias CQ.CoreComponents.container.utils
29     * @type {{}}
30     */
31    window.CQ.CoreComponents.container.utils = {
32
33        /**
34         * Removes the hash from the URL.
35         */
36        removeUrlHash: function() {
37            history.replaceState(undefined, undefined, " ");
38        },
39
40        /**
41         * Updates the URL hash with the panel ID without scrolling to it.
42         *
43         * @param {Object} component The container component (e.g. Accordion, Carousel, Tabs).
44         * @param {String} itemType The type of the item as defined in the component.
45         * @param {Number} index The index of the container item
46         */
47        updateUrlHash: function(component, itemType, index) {
48            if (component && component._elements && component._elements[itemType] &&
49                component._elements[itemType][index] && component._elements[itemType][index].id) {
50                var ID = component._elements[itemType][index].id;
51                history.replaceState(undefined, undefined, "#" + ID);
52            }
53        },
54
55        /**
56         * Returns the index of the component item (accordion, carousel, tabs) that:
57         * - either corresponds to the deep link in the URL fragment
58         * - or contains the element that corresponds to the deep link in the URL fragment
59         *
60         * @param {Object} component The container component (Accordion, Carousel or Tabs).
61         * @param {String} itemType The type of the item as defined in the component.
62         * @param {String} itemContentType The type of the item content as defined in the component.
63         * @returns {Number} the index within the items array if the item exists, -1 otherwise.
64         */
65        getDeepLinkItemIdx: function(component, itemType, itemContentType) {
66            if (window.location.hash) {
67                var deepLinkId = window.location.hash.substring(1);
68                if (deepLinkId && document.getElementById(deepLinkId) &&
69                    component && component._config && component._config.element &&
70                    component._elements[itemType] &&
71                    component._config.element.querySelector("[id='" + deepLinkId + "']")) {
72                    for (var i = 0; i < component._elements[itemType].length; i++) {
73                        var item = component._elements[itemType][i];
74                        var itemContentContainsId = false;
75                        if (component._elements[itemContentType]) {
76                            var itemContent = component._elements[itemContentType][i];
77                            itemContentContainsId = itemContent && itemContent.querySelector("[id='" + deepLinkId + "']");
78                        }
79                        if (item.id === deepLinkId || itemContentContainsId) {
80                            return i;
81                        }
82                    }
83                }
84                return -1;
85            }
86            return -1;
87        },
88
89        /**
90         * Returns the item of the container component (accordion, carousel, tabs) that:
91         * - either corresponds to the deep link in the URL fragment
92         * - or contains the element that corresponds to the deep link in the URL fragment
93         *
94         * @param {Object} component The Accordion or Tabs component.
95         * @param {String} itemType The type of the item as defined in the component.
96         * @param {String} itemContentType The type of the item content as defined in the component.
97         * @returns {Object} the item if it exists, undefined otherwise.
98         */
99        getDeepLinkItem: function(component, itemType, itemContentType) {
100            var idx = window.CQ.CoreComponents.container.utils.getDeepLinkItemIdx(component, itemType, itemContentType);
101            if (component && component._elements && component._elements[itemType]) {
102                return component._elements[itemType][idx];
103            }
104        },
105
106        /**
107         * Scrolls the browser on page reload (if URI contains URI fragment) to the item of the container component (accordion, tabs)
108           that corresponds to the deep link in the URI fragment.
109         * This method fixes the issue existent with Chrome and related browsers, which are not scrolling on page reload (if URI contains URI fragment)
110           to the element that corresponds to the deep link in the URI fragment.
111         * Small setTimeout is needed, otherwise the scrolling will not work on Chrome.
112         */
113        scrollToAnchor: function() {
114            setTimeout(function() {
115                if (window.location.hash) {
116                    var id = decodeURIComponent(window.location.hash.substring(1));
117                    var anchorElement = document.getElementById(id);
118                    if (anchorElement && anchorElement.offsetTop) {
119                        anchorElement.scrollIntoView();
120                    }
121                }
122            }, 100);
123        }
124    };
125}());
126
127/*! MIT */
128!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?a(require("jquery")):a(jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}});
129!function(e){var a={init:function(t){var s=e.extend({items:1,itemsOnPage:1,pages:0,displayedPages:5,edges:2,currentPage:1,hrefTextPrefix:"#page-",hrefTextSuffix:"",prevText:"Prev",nextText:"Next",ellipseText:"&hellip;",cssStyle:"light-theme",selectOnClick:!0,onPageClick:function(e,a){},onInit:function(){}},t||{}),i=this;return s.pages=s.pages?s.pages:Math.ceil(s.items/s.itemsOnPage)?Math.ceil(s.items/s.itemsOnPage):1,s.currentPage=s.currentPage-1,s.halfDisplayed=s.displayedPages/2,this.each(function(){i.addClass(s.cssStyle+" simple-pagination").data("pagination",s),a._draw.call(i)}),s.onInit(),this},selectPage:function(e){return a._selectPage.call(this,e-1),this},prevPage:function(){var e=this.data("pagination");return e.currentPage>0&&a._selectPage.call(this,e.currentPage-1),this},nextPage:function(){var e=this.data("pagination");return e.currentPage<e.pages-1&&a._selectPage.call(this,e.currentPage+1),this},getPagesCount:function(){return this.data("pagination").pages},getCurrentPage:function(){return this.data("pagination").currentPage+1},destroy:function(){return this.empty(),this},redraw:function(){return a._draw.call(this),this},disable:function(){var e=this.data("pagination");return e.disabled=!0,this.data("pagination",e),a._draw.call(this),this},enable:function(){var e=this.data("pagination");return e.disabled=!1,this.data("pagination",e),a._draw.call(this),this},updateItems:function(e){var t=this.data("pagination");t.items=e,t.pages=Math.ceil(t.items/t.itemsOnPage)?Math.ceil(t.items/t.itemsOnPage):1,this.data("pagination",t),a._draw.call(this)},_draw:function(){var t,s=this.data("pagination"),i=a._getInterval(s);a.destroy.call(this);var n="UL"===this.prop("tagName")?this:e("<ul></ul>").appendTo(this);if(s.prevText&&a._appendItem.call(this,s.currentPage-1,{text:s.prevText,classes:"prev"}),i.start>0&&s.edges>0){var l=Math.min(s.edges,i.start);for(t=0;t<l;t++)a._appendItem.call(this,t);s.edges<i.start&&i.start-s.edges!=1?n.append('<li class="disabled"><span class="ellipse">'+s.ellipseText+"</span></li>"):i.start-s.edges==1&&a._appendItem.call(this,s.edges)}for(t=i.start;t<i.end;t++)a._appendItem.call(this,t);if(i.end<s.pages&&s.edges>0)for(s.pages-s.edges>i.end&&s.pages-s.edges-i.end!=1?n.append('<li class="disabled"><span class="ellipse">'+s.ellipseText+"</span></li>"):s.pages-s.edges-i.end==1&&a._appendItem.call(this,i.end++),t=Math.max(s.pages-s.edges,i.end);t<s.pages;t++)a._appendItem.call(this,t);s.nextText&&a._appendItem.call(this,s.currentPage+1,{text:s.nextText,classes:"next"})},_getInterval:function(e){return{start:Math.ceil(e.currentPage>e.halfDisplayed?Math.max(Math.min(e.currentPage-e.halfDisplayed,e.pages-e.displayedPages),0):0),end:Math.ceil(e.currentPage>e.halfDisplayed?Math.min(e.currentPage+e.halfDisplayed,e.pages):Math.min(e.displayedPages,e.pages))}},_appendItem:function(t,s){var i,n,l=this,r=l.data("pagination"),p=e("<li></li>"),d=l.find("ul");t=t<0?0:t<r.pages?t:r.pages-1,i=e.extend({text:t+1,classes:""},s||{}),t==r.currentPage||r.disabled?(r.disabled?p.addClass("disabled"):p.addClass("active"),n=e('<span class="current">'+i.text+"</span>
129")):(n=e('<a href="'+r.hrefTextPrefix+(t+1)+r.hrefTextSuffix+'" class="page-link">'+i.text+"</a>")).click(function(e){return a._selectPage.call(l,t,e)}),i.classes&&n.addClass(i.classes),p.append(n),d.length?d.append(p):l.append(p)},_selectPage:function(e,t){var s=this.data("pagination");return s.currentPage=e,s.selectOnClick&&a._draw.call(this),s.onPageClick(e+1,t)}};e.fn.pagination=function(t){return a[t]&&"_"!=t.charAt(0)?a[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist on jQuery.pagination"):a.init.apply(this,arguments)}}(jQuery);
vendor: 60,539 bytes, lines 130-136
130/*!
131  * Bootstrap v5.3.8 (https://getbootstrap.com/)
132  * Copyright 2011-2025 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
133  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
134  */
135!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e(t.Popper)}(this,function(t){"use strict";function e(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const i in t)if("default"!==i){const s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const i=e(t),s=new Map,n={set(t,e,i){s.has(t)||s.set(t,new Map);const n=s.get(t);n.has(e)||0===n.size?n.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(t,e)=>s.has(t)&&s.get(t).get(e)||null,remove(t,e){if(!s.has(t))return;const i=s.get(t);i.delete(e),0===i.size&&s.delete(t)}},o="transitionend",r=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,(t,e)=>`#${CSS.escape(e)}`)),t),a=t=>null==t?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),l=t=>{t.dispatchEvent(new Event(o))},c=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),h=t=>c(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(r(t)):null,d=t=>{if(!c(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},u=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),_=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?_(t.parentNode):null},g=()=>{},f=t=>{t.offsetHeight},m=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,p=[],b=()=>"rtl"===document.documentElement.dir,v=t=>{var e;e=()=>{const e=m();if(e){const i=t.NAME,s=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=s,t.jQueryInterface)}},"loading"===document.readyState?(p.length||document.addEventListener("DOMContentLoaded",()=>{for(const t of p)t()}),p.push(e)):e()},y=(t,e=[],i=t)=>"function"==typeof t?t.call(...e):i,w=(t,e,i=!0)=>{if(!i)return void y(t);const s=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const s=Number.parseFloat(e),n=Number.parseFloat(i);return s||n?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let n=!1;const r=({target:i})=>{i===e&&(n=!0,e.removeEventListener(o,r),y(t))};e.addEventListener(o,r),setTimeout(()=>{n||l(e)},s)},A=(t,e,i,s)=>{const n=t.length;let o=t.indexOf(e);return-1===o?!i&&s?t[n-1]:t[0]:(o+=i?1:-1,s&&(o=(o+n)%n),t[Math.max(0,Math.min(o,n-1))])},E=/[^.]*(?=\..*)\.|.*/,C=/\..*/,T=/::\d+$/,k={};let $=1;const S={mouseenter:"mouseover",mouseleave:"mouseout"},L=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function O(t,e){return e&&`${e}::${$++}`||t.uidEvent||$++}function I(t){const e=O(t);return t.uidEvent=e,k[e]=k[e]||{},k[e]}function D(t,e,i=null){return Object.values(t).find(t=>t.callable===e&&t.delegationSelector===i)}function N(t,e,i){const s="string"==typeof e,n=s?i:e||i;let o=j(t);return L.has(o)||(o=t),[s,n,o]}function P(t,e,i,s,n){if("string"!=typeof e||!t)return;let[o,r,a]=N(e,i,s);if(e in S){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=I(t),c=l[a]||(l[a]={}),h=D(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&n);const d=O(r,e.replace(E,"")),u=o?function(t,e,i){return function s(n){const o=t.querySelectorAll(e);for(let{target:r}=n;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return z(n,{delegateTarget:r}),s.oneOff&&F.off(t,n.type,e,i),i.apply(r,[n])}}(t,i,r):function(t,e){return function i(s){return z(s,{delegateTarget:t}),i.oneOff&&F.off(t,s.type,e),e.apply(t,[s])}}(t,r);u.delegationSelector=o?i:null,u.callable=r,u.oneOff=n,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function x(t,e,i,s,n){const o=D(e[i],s,n);o&&(t.removeEventListener(i,o,Boolean(n)),delete e[i][o.uidEvent])}function M(t,e,i,s){const n=e[i]||{};for(const[o,r]of Object.entries(n))o.includes(s)&&x(t,e,i,r.callable,r.delegationSelector)}function j(t){return t=t.replace(C,""),S[t]||t}const F={on(t,e,i,s){P(t,e,i,s,!1)},one(t,e,i,s){P(t,e,i,s,!0)},off(t,e,i,s){if("string"!=typeof e||!t)return;const[n,o,r]=N(e,i,s),a=r!==e,l=I(t),c=l[r]||{},h=e.startsWith(".");if(void 0===o){if(h)for(const i of Object.keys(l))M(t,l,i,e.slice(1));for(const[i,s]of Object.entries(c)){const n=i.replace(T,"");a&&!e.includes(n)||x(t,l,r,s.callable,s.delegationSelector)}}else{if(!Object.keys(c).length)return;x(t,l,r,o,n?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;const s=m();let n=null,o=!0,r=!0,a=!1;e!==j(e)&&s&&(n=s.Event(e,i),s(t).trigger(n),o=!n.isPropagationStopped(),r=!n.isImmediatePropagationStopped(),a=n.isDefaultPrevented());const l=z(new Event(e,{bubbles:o,cancelable:!0}),i);return a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&n&&n.preventDefault(),l}};function z(t,e={}){for(const[i,s]of Object.entries(e))try{t[i]=s}catch(e){Object.defineProperty(t,i,{configurable:!0,get:()=>s})}return t}function H(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function B(t){return t.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}const q={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${B(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${B(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter(t=>t.startsWith("bs")&&!t.startsWith("bsConfig"));for(const s of i){let i=s.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1),e[i]=H(t.dataset[s])}return e},getDataAttribute:(t,e)=>H(t.getAttribute(`data-bs-${B(e)}`))};class W{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const i=c(e)?q.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...c(e)?q.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[i,s]of Object.entries(e)){const e=t[i],n=c(e)?"element":a(e);if(!new RegExp(s).test(n))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${n}" but expected type "${s}".`)}}}class R extends W{constructor(t,e){super(),(t=h(t))&&(this._element=t,this._config=this._getConfig(e),n.set(this._element,this.constructor.DATA_KEY,this))}dispose(){n.remove(this._element,this.constructor.DATA_KEY),F.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){w(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return n.get(h(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.3.8"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const K=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e?e.split(",").map(t=>r(t)).join(","):null},V={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter(t=>t.matches(e)),parents(t,e){const i=[];let s=t.parentNode.closest(e);for(;s;)i.push(s),s=s.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(t=>`${t}:not([tabindex^="-"])`).join(",");return this.find(e,t).filter(t=>!u(t)&&d(t))},getSelectorFromElement(t){const e=K(t);return e&&V.findOne(e)?e:null},getElementFromSelector(t){const e=K(t);return e?V.findOne(e):null},getMultipleElementsFromSelector(t){const e=K(t);return e?V.find(e):[]}},Q=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,s=t.NAME;F.on(document,i,`[data-bs-dismiss="${s}"]`,function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),u(this))return;const n=V.getElementFromSelector(this)||this.closest(`.${s}`);t.getOrCreateInstance(n)[e]()})},X=".bs.alert",Y=`close${X}`,U=`closed${X}`;class G extends R{static get NAME(){return"alert"}close(){if(F.trigger(this._element,Y).defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,t)}_destroyElement(){this._element.remove(),F.trigger(this._element,U),this.dispose()}static jQueryInterface(t){return this.each(function(){const e=G.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}})}}Q(G,"close"),v(G);const J='[data-bs-toggle="button"]';class Z extends R{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each(function(){const e=Z.getOrCreateInstance(this);"toggle"===t&&e[t]()})}}F.on(document,"click.bs.button.data-api",J,t=>{t.preventDefault();const e=t.target.closest(J);Z.getOrCreateInstance(e).toggle()}),v(Z);const tt=".bs.swipe",et=`touchstart${tt}`,it=`touchmove${tt}`,st=`touchend${tt}`,nt=`pointerdown${tt}`,ot=`pointerup${tt}`,rt={endCallback:null,leftCallback:null,rightCallback:null},at={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class lt extends W{constructor(t,e){super(),this._element=t,t&&lt.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return rt}static get DefaultType(){return at}static get NAME(){return"swipe"}dispose(){F.off(this._element,tt)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),y(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&y(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(F.on(this._element,nt,t=>this._start(t)),F.on(this._element,ot,t=>this._end(t)),this._element.classList.add("pointer-event")):(F.on(this._element,et,t=>this._start(t)),F.on(this._element,it,t=>this._move(t)),F.on(this._element,st,t=>this._end(t)))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const ct=".bs.carousel",ht=".data-api",dt="ArrowLeft",ut="ArrowRight",_t="next",gt="prev",ft="left",mt="right",pt=`slide${ct}`,bt=`slid${ct}`,vt=`keydown${ct}`,yt=`mouseenter${ct}`,wt=`mouseleave${ct}`,At=`dragstart${ct}`,Et=`load${ct}${ht}`,Ct=`click${ct}${ht}`,Tt="carousel",kt="active",$t=".active",St=".carousel-item",Lt=$t+St,Ot={[dt]:mt,[ut]:ft},It={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Dt={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Nt extends R{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=V.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===Tt&&this.cycle()}static get Default(){return It}static get DefaultType(){return Dt}static get NAME(){return"carousel"}next(){this._slide(_t)}nextWhenVisible(){!document.hidden&&d(this._element)&&this.next()}prev(){this._slide(gt)}pause(){this._isSliding&&l(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?F.one(this._element,bt,()=>this.cycle()):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void F.one(this._element,bt,()=>this.to(t));const i=this._getItemIndex(this._getActive());if(i===t)return;const s=t>i?_t:gt;this._slide(s,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&F.on(this._element,vt,t=>this._keydown(t)),"hover"===this._config.pause&&(F.on(this._element,yt,()=>this.pause()),F.on(this._element,wt,()=>this._maybeEnableCycle())),this._config.touch&&lt.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of V.find(".carousel-item img",this._element))F.on(t,At,t=>t.preventDefault());const t={leftCallback:()=>this._slide(this._directionToOrder(ft)),rightCallback:()=>this._slide(this._directionToOrder(mt)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}};this._swipeHelper=new lt(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=Ot[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=V.findOne($t,this._indicatorsElement);e.classList.remove(kt),e.removeAttribute("aria-current");const i=V.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(kt),i.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const i=this._getActive(),s=t===_t,n=e||A(this._getItems(),i,s,this._config.wrap);if(n===i)return;const o=this._getItemIndex(n),r=e=>F.trigger(this._element,e,{relatedTarget:n,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:o});if(r(pt).defaultPrevented)return;if(!i||!n)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=n;const l=s?"carousel-item-start":"carousel-item-end",c=s?"carousel-item-next":"carousel-item-prev";n.classList.add(c),f(n),i.classList.add(l),n.classList.add(l),this._queueCallback(()=>{n.classList.remove(l,c),n.classList.add(kt),i.classList.remove(kt,c,l),this._isSliding=!1,r(bt)},i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return V.findOne(Lt,this._element)}_getItems(){return V.find(St,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return b()?t===ft?gt:_t:t===ft?_t:gt}_orderToDirection(t){return b()?t===gt?ft:mt:t===gt?mt:ft}static jQueryInterface(t){return this.each(function(){const e=Nt.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)})}}F.on(document,Ct,"[data-bs-slide], [data-bs-slide-to]",function(t){const e=V.getElementFromSelector(this);if(!e||!e.classList.contains(Tt))return;t.preventDefault();const i=Nt.getOrCreateInstance(e),s=this.getAttribute("data-bs-slide-to");return s?(i.to(s),void i._maybeEnableCycle()):"next"===q.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())}),F.on(window,Et,()=>{const t=V.find('[data-bs-ride="carousel"]');for(const e of t)Nt.getOrCreateInstance(e)}),v(Nt);const Pt=".bs.collapse",xt=`show${Pt}`,Mt=`shown${Pt}`,jt=`hide${Pt}`,Ft=`hidden${Pt}`,zt=`click${Pt}.data-api`,Ht="show",Bt="collapse",qt="collapsing",Wt=`:scope .${Bt} .${Bt}`,Rt='[data-bs-toggle="collapse"]',Kt={parent:null,toggle:!0},Vt={parent:"(null|element)",toggle:"boolean"};class Qt extends R{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const i=V.find(Rt);for(const t of i){const e=V.getSelectorFromElement(t),i=V.find(e).filter(t=>t===this._element);null!==e&&i.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Kt}static get DefaultType(){return Vt}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(t=>t!==this._element).map(t=>Qt.getOrCreateInstance(t,{toggle:!1}))),t.length&&t[0]._isTransitioning)return;if(F.trigger(this._element,xt).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(Bt),this._element.classList.add(qt),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(qt),this._element.classList.add(Bt,Ht),this._element.style[e]="",F.trigger(this._element,Mt)},this._element,!0),this._element.style[e]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(F.trigger(this._element,jt).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,f(this._element),this._element.classList.add(qt),this._element.classList.remove(Bt,Ht);for(const t of this._triggerArray){const e=V.getElementFromSelector(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(qt),this._element.classList.add(Bt),F.trigger(this._element,Ft)},this._element,!0)}_isShown(t=this._element){return t.classList.contains(Ht)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=h(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Rt);for(const e of t){const t=V.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=V.find(Wt,this._config.parent);return V.find(t,this._config.parent).filter(t=>!e.includes(t))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const i of t)i.classList.toggle("collapsed",!e),i.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each(function(){const i=Qt.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}})}}F.on(document,zt,Rt,function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();for(const t of V.getMultipleElementsFromSelector(this))Qt.getOrCreateInstance(t,{toggle:!1}).toggle()}),v(Qt);const Xt="dropdown",Yt=".bs.dropdown",Ut=".data-api",Gt="ArrowUp",Jt="ArrowDown",Zt=`hide${Yt}`,te=`hidden${Yt}`,ee=`show${Yt}`,ie=`shown${Yt}`,se=`click${Yt}${Ut}`,ne=`keydown${Yt}${Ut}`,oe=`keyup${Yt}${Ut}`,re="show",ae='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',le=`${ae}.${re}`,ce=".dropdown-menu",he=b()?"top-end":"top-start",de=b()?"top-start":"top-end",ue=b()?"bottom-end":"bottom-start",_e=b()?"bottom-start":"bottom-end",ge=b()?"left-start":"right-start",fe=b()?"right-start":"left-start",me={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},pe={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class be extends R{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=V.next(this._element,ce)[0]||V.prev(this._element,ce)[0]||V.findOne(ce,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return me}static get DefaultType(){return pe}static get NAME(){return Xt}toggle(){return this._isShown()?this.hide():this.show()}show(){if(u(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!F.trigger(this._element,ee,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))F.on(t,"mouseover",g);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(re),this._element.classList.add(re),F.trigger(this._element,ie,t)}}hide(){if(u(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!F.trigger(this._element,Zt,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))F.off(t,"mouseover",g);this._popper&&this._popper.destroy(),this._menu.classList.remove(re),this._element.classList.remove(re),this._element.setAttribute("aria-expanded","false"),q.removeDataAttribute(this._menu,"popper"),F.trigger(this._element,te,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!c(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Xt.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===i)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org/docs/v2/)");let t=this._element;"parent"===this._config.reference?t=this._parent:c(this._config.reference)?t=h(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=i.createPopper(t,this._menu,e)}_isShown(){return this._menu.classList.contains(re)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return ge;if(t.classList.contains("dropstart"))return fe;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?de:he:e?_e:ue}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(t=>Number.parseInt(t,10)):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(q.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...y(this._config.popperConfig,[void 0,t])}}_selectMenuItem({key:t,target:e}){const i=V.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(t=>d(t));i.length&&A(i,e,t===Jt,!i.includes(e)).focus()}static jQueryInterface(t){return this.each(function(){const e=be.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=V.find(le);for(const i of e){const e=be.getInstance(i);if(!e||!1===e._config.autoClose)continue;const s=t.composedPath(),n=s.includes(e._menu);if(s.includes(e._element)||"inside"===e._config.autoClose&&!n||"outside"===e._config.autoClose&&n)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),i="Escape"===t.key,s=[Gt,Jt].includes(t.key);if(!s&&!i)return;if(e&&!i)return;t.preventDefault();const n=this.matches(ae)?this:V.prev(this,ae)[0]||V.next(this,ae)[0]||V.findOne(ae,t.delegateTarget.parentNode),o=be.getOrCreateInstance(n);if(s)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),n.focus())}}F.on(document,ne,ae,be.dataApiKeydownHandler),F.on(document,ne,ce,be.dataApiKeydownHandler),F.on(document,se,be.clearMenus),F.on(document,oe,be.clearMenus),F.on(document,se,ae,function(t){t.preventDefault(),be.getOrCreateInstance(this).toggle()}),v(be);const ve="backdrop",ye="show",we=`mousedown.bs.${ve}`,Ae={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Ee={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Ce extends W{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return Ae}static get DefaultType(){return Ee}static get NAME(){return ve}show(t){if(!this._config.isVisible)return void y(t);this._append();const e=this._getElement();this._config.isAnimated&&f(e),e.classList.add(ye),this._emulateAnimation(()=>{y(t)})}hide(t){this._config.isVisible?(this._getElement().classList.remove(ye),this._emulateAnimation(()=>{this.dispose(),y(t)})):y(t)}dispose(){this._isAppended&&(F.off(this._element,we),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=h(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),F.on(t,we,()=>{y(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(t){w(t,this._getElement(),this._config.isAnimated)}}const Te=".bs.focustrap",ke=`focusin${Te}`,$e=`keydown.tab${Te}`,Se="backward",Le={autofocus:!0,trapElement:null},Oe={autofocus:"boolean",trapElement:"element"};class Ie extends W{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Le}static get DefaultType(){return Oe}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),F.off(document,Te),F.on(document,ke,t=>this._handleFocusin(t)),F.on(document,$e,t=>this._handleKeydown(t)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,F.off(document,Te))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=V.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===Se?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?Se:"forward")}}const De=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Ne=".sticky-top",Pe="padding-right",xe="margin-right";class Me{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,Pe,e=>e+t),this._setElementAttributes(De,Pe,e=>e+t),this._setElementAttributes(Ne,xe,e=>e-t)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Pe),this._resetElementAttributes(De,Pe),this._resetElementAttributes(Ne,xe)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const s=this.getWidth();this._applyManipulationCallback(t,t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+s)return;this._saveInitialAttribute(t,e);const n=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(n))}px`)})}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&q.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,t=>{const i=q.getDataAttribute(t,e);null!==i?(q.removeDataAttribute(t,e),t.style.setProperty(e,i)):t.style.removeProperty(e)})}_applyManipulationCallback(t,e){if(c(t))e(t);else for(const i of V.find(t,this._element))e(i)}}const je=".bs.modal",Fe=`hide${je}`,ze=`hidePrevented${je}`,He=`hidden${je}`,Be=`show${je}`,qe=`shown${je}`,We=`resize${je}`,Re=`click.dismiss${je}`,Ke=`mousedown.dismiss${je}`,Ve=`keydown.dismiss${je}`,Qe=`click${je}.data-api`,Xe="modal-open",Ye="show",Ue="modal-static",Ge={backdrop:!0,focus:!0,keyboard:!0},Je={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Ze extends R{constructor(t,e){super(t,e),this._dialog=V.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Me,this._addEventListeners()}static get Default(){return Ge}static get DefaultType(){return Je}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||F.trigger(this._element,Be,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Xe),this._adjustDialog(),this._backdrop.show(()=>this._showElement(t)))}hide(){this._isShown&&!this._isTransitioning&&(F.trigger(this._element,Fe).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Ye),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated())))}dispose(){F.off(window,je),F.off(this._dialog,je),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Ce({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Ie({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=V.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),f(this._element),this._element.classList.add(Ye),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,F.trigger(this._element,qe,{relatedTarget:t})},this._dialog,this._isAnimated())}_addEventListeners(){F.on(this._element,Ve,t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),F.on(window,We,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),F.on(this._element,Ke,t=>{F.one(this._element,Re,e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(Xe),this._resetAdjustments(),this._scrollBar.reset(),F.trigger(this._element,He)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(F.trigger(this._element,ze).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(Ue)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(Ue),this._queueCallback(()=>{this._element.classList.remove(Ue),this._queueCallback(()=>{this._element.style.overflowY=e},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;if(i&&!t){const t=b()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=b()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each(function(){const i=Ze.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}})}}F.on(document,Qe,'[data-bs-toggle="modal"]',function(t){const e=V.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),F.one(e,Be,t=>{t.defaultPrevented||F.one(e,He,()=>{d(this)&&this.focus()})});const i=V.findOne(".modal.show");i&&Ze.getInstance(i).hide(),Ze.getOrCreateInstance(e).toggle(this)}),Q(Ze),v(Ze);const ti=".bs.offcanvas",ei=".data-api",ii=`load${ti}${ei}`,si="show",ni="showing",oi="hiding",ri=".offcanvas.show",ai=`show${ti}`,li=`shown${ti}`,ci=`hide${ti}`,hi=`hidePrevented${ti}`,di=`hidden${ti}`,ui=`resize${ti}`,_i=`click${ti}${ei}`,gi=`keydown.dismiss${ti}`,fi={backdrop:!0,keyboard:!0,scroll:!1},mi={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class pi extends R{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return fi}static get DefaultType(){return mi}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||F.trigger(this._element,ai,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new Me).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(ni),this._queueCallback(()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(si),this._element.classList.remove(ni),F.trigger(this._element,li,{relatedTarget:t})},this._element,!0))}hide(){this._isShown&&(F.trigger(this._element,ci).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(oi),this._backdrop.hide(),this._queueCallback(()=>{this._element.classList.remove(si,oi),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new Me).reset(),F.trigger(this._element,di)},this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new Ce({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():F.trigger(this._element,hi)}:null})}_initializeFocusTrap(){return new Ie({trapElement:this._element})}_addEventListeners(){F.on(this._element,gi,t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():F.trigger(this._element,hi))})}static jQueryInterface(t){return this.each(function(){const e=pi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}})}}F.on(document,_i,'[data-bs-toggle="offcanvas"]',function(t){const e=V.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),u(this))return;F.one(e,di,()=>{d(this)&&this.focus()});const i=V.findOne(ri);i&&i!==e&&pi.getInstance(i).hide(),pi.getOrCreateInstance(e).toggle(this)}),F.on(window,ii,()=>{for(const t of V.find(ri))pi.getOrCreateInstance(t).show()}),F.on(window,ui,()=>{for(const t of V.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&pi.getOrCreateInstance(t).hide()}),Q(pi),v(pi);const bi={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},vi=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),yi=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,wi=(t,e)=>{const i=t.nodeName.toLowerCase();return e.includes(i)?!vi.has(i)||Boolean(yi.test(t.nodeValue)):e.filter(t=>t instanceof RegExp).some(t=>t.test(i))},Ai={allowList:bi,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},Ei={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Ci={entry:"(string|element|function|null)",selector:"(string|element)"};class Ti extends W{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Ai}static get DefaultType(){return Ei}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map(t=>this._resolvePossibleFunction(t)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,i]of Object.entries(this._config.content))this._setContent(t,i,e);const e=t.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&e.classList.add(...i.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,i]of Object.entries(t))super._typeCheckConfig({selector:e,entry:i},Ci)}_setContent(t,e,i){const s=V.findOne(i,t);s&&((e=this._resolvePossibleFunction(e))?c(e)?this._putElementInTemplate(h(e),s):this._config.html?s.innerHTML=this._maybeSanitize(e):s.textContent=e:s.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const s=(new window.DOMParser).parseFromString(t,"text/html"),n=[].concat(...s.body.querySelectorAll("*"));for(const t of n){const i=t.nodeName.toLowerCase();if(!Object.keys(e).includes(i)){t.remove();continue}const s=[].concat(...t.attributes),n=[].concat(e["*"]||[],e[i]||[]);for(const e of s)wi(e,n)||t.removeAttribute(e.nodeName)}return s.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return y(t,[void 0,this])}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const ki=new Set(["sanitize","allowList","sanitizeFn"]),$i="fade",Si="show",Li=".tooltip-inner",Oi=".modal",Ii="hide.bs.modal",Di="hover",Ni="focus",Pi="click",xi={AUTO:"auto",TOP:"top",RIGHT:b()?"left":"right",BOTTOM:"bottom",LEFT:b()?"right":"left"},Mi={allowList:bi,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},ji={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class Fi extends R{constructor(t,e){if(void 0===i)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Mi}static get DefaultType(){return ji}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),F.off(this._element.closest(Oi),Ii,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=F.trigger(this._element,this.constructor.eventName("show")),e=(_(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:s}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(s.append(i),F.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(i),i.classList.add(Si),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))F.on(t,"mouseover",g);this._queueCallback(()=>{F.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}hide(){if(this._isShown()&&!F.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(Si),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))F.off(t,"mouseover",g);this._activeTrigger[Pi]=!1,this._activeTrigger[Ni]=!1,this._activeTrigger[Di]=!1,this._isHovered=null,this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),F.trigger(this._element,this.constructor.eventName("hidden")))},this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove($i,Si),e.classList.add(`bs-${this.constructor.NAME}-auto`);const i=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",i),this._isAnimated()&&e.classList.add($i),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new Ti({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[Li]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains($i)}_isShown(){return this.tip&&this.tip.classList.contains(Si)}_createPopper(t){const e=y(this._config.placement,[this,t,this._element]),s=xi[e.toUpperCase()];return i.createPopper(this._element,t,this._getPopperConfig(s))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(t=>Number.parseInt(t,10)):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return y(t,[this._element,this._element])}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,...y(this._config.popperConfig,[void 0,e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)F.on(this._element,this.constructor.eventName("click"),this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger[Pi]=!(e._isShown()&&e._activeTrigger[Pi]),e.toggle()});else if("manual"!==e){const t=e===Di?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),i=e===Di?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");F.on(this._element,t,this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?Ni:Di]=!0,e._enter()}),F.on(this._element,i,this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?Ni:Di]=e._element.contains(t.relatedTarget),e._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},F.on(this._element.closest(Oi),Ii,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=q.getDataAttributes(this._element);for(const t of Object.keys(e))ki.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:h(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[e,i]of Object.entries(this._config))this.constructor.Default[e]!==i&&(t[e]=i);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each(function(){const e=Fi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}v(Fi);const zi=".popover-header",Hi=".popover-body",Bi={...Fi.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},qi={...Fi.DefaultType,content:"(null|string|element|function)"};class Wi extends Fi{static get Default(){return Bi}static get DefaultType(){return qi}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[zi]:this._getTitle(),[Hi]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each(function(){const e=Wi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}v(Wi);const Ri=".bs.scrollspy",Ki=`activate${Ri}`,Vi=`click${Ri}`,Qi=`load${Ri}.data-api`,Xi="active",Yi="[href]",Ui=".nav-link",Gi=`${Ui}, .nav-item > ${Ui}, .list-group-item`,Ji={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Zi={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class ts extends R{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Ji}static get DefaultType(){return Zi}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=h(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map(t=>Number.parseFloat(t))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(F.off(this._config.target,Vi),F.on(this._config.target,Vi,Yi,t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const i=this._rootElement||window,s=e.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:s,behavior:"smooth"});i.scrollTop=s}}))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(t=>this._observerCallback(t),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),i=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},s=(this._rootElement||document.documentElement).scrollTop,n=s>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=s;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(n&&t){if(i(o),!s)return}else n||t||i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=V.find(Yi,this._config.target);for(const e of t){if(!e.hash||u(e))continue;const t=V.findOne(decodeURI(e.hash),this._element);d(t)&&(this._targetLinks.set(decodeURI(e.hash),e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(Xi),this._activateParents(t),F.trigger(this._element,Ki,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))V.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(Xi);else for(const e of V.parents(t,".nav, .list-group"))for(const t of V.prev(e,Gi))t.classList.add(Xi)}_clearActiveClass(t){t.classList.remove(Xi);const e=V.find(`${Yi}.${Xi}`,t);for(const t of e)t.classList.remove(Xi)}static jQueryInterface(t){return this.each(function(){const e=ts.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}})}}F.on(window,Qi,()=>{for(const t of V.find('[data-bs-spy="scroll"]'))ts.getOrCreateInstance(t)}),v(ts);const es=".bs.tab",is=`hide${es}`,ss=`hidden${es}`,ns=`show${es}`,os=`shown${es}`,rs=`click${es}`,as=`keydown${es}`,ls=`load${es}`,cs="ArrowLeft",hs="ArrowRight",ds="ArrowUp",us="ArrowDown",_s="Home",gs="End",fs="active",ms="fade",ps="show",bs=".dropdown-toggle",vs=`:not(${bs})`,ys='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',ws=`.nav-link${vs}, .list-group-item${vs}, [role="tab"]${vs}, ${ys}`,As=`.${fs}[data-bs-toggle="tab"], .${fs}[data-bs-toggle="pill"], .${fs}[data-bs-toggle="list"]`;class Es extends R{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),F.on(this._element,as,t=>this._keydown(t)))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),i=e?F.trigger(e,is,{relatedTarget:t}):null;F.trigger(t,ns,{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){t&&(t.classList.add(fs),this._activate(V.getElementFromSelector(t)),this._queueCallback(()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),F.trigger(t,os,{relatedTarget:e})):t.classList.add(ps)},t,t.classList.contains(ms)))}_deactivate(t,e){t&&(t.classList.remove(fs),t.blur(),this._deactivate(V.getElementFromSelector(t)),this._queueCallback(()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),F.trigger(t,ss,{relatedTarget:e})):t.classList.remove(ps)},t,t.classList.contains(ms)))}_keydown(t){if(![cs,hs,ds,us,_s,gs].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=this._getChildren().filter(t=>!u(t));let i;if([_s,gs].includes(t.key))i=e[t.key===_s?0:e.length-1];else{const s=[hs,us].includes(t.key);i=A(e,t.target,s,!0)}i&&(i.focus({preventScroll:!0}),Es.getOrCreateInstance(i).show())}_getChildren(){return V.find(ws,this._parent)}_getActiveElem(){return this._getChildren().find(t=>this._elemIsActive(t))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),i=this._getOuterElement(t);t.setAttribute("aria-selected",e),i!==t&&this._setAttributeIfNotExists(i,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=V.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,e){const i=this._getOuterElement(t);if(!i.classList.contains("dropdown"))return;const s=(t,s)=>{const n=V.findOne(t,i);n&&n.classList.toggle(s,e)};s(bs,fs),s(".dropdown-menu",ps),i.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(fs)}_getInnerElement(t){return t.matches(ws)?t:V.findOne(ws,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each(function(){const e=Es.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}})}}F.on(document,rs,ys,function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),u(this)||Es.getOrCreateInstance(this).show()}),F.on(window,ls,()=>{for(const t of V.find(As))Es.getOrCreateInstance(t)}),v(Es);const Cs=".bs.toast",Ts=`mouseover${Cs}`,ks=`mouseout${Cs}`,$s=`focusin${Cs}`,Ss=`focusout${Cs}`,Ls=`hide${Cs}`,Os=`hidden${Cs}`,Is=`show${Cs}`,Ds=`shown${Cs}`,Ns="hide",Ps="show",xs="showing",Ms={animation:"boolean",autohide:"boolean",delay:"number"},js={animation:!0,autohide:!0,delay:5e3};class Fs extends R{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return js}static get DefaultType(){return Ms}static get NAME(){return"toast"}show(){F.trigger(this._element,Is).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(Ns),f(this._element),this._element.classList.add(Ps,xs),this._queueCallback(()=>{this._element.classList.remove(xs),F.trigger(this._element,Ds),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this.isShown()&&(F.trigger(this._element,Ls).defaultPrevented||(this._element.classList.add(xs),this._queueCallback(()=>{this._element.classList.add(Ns),this._element.classList.remove(xs,Ps),F.trigger(this._element,Os)},this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(Ps),super.dispose()}isShown(){return this._element.classList.contains(Ps)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){F.on(this._element,Ts,t=>this._onInteraction(t,!0)),F.on(this._element,ks,t=>this._onInteraction(t,!1)),F.on(this._element,$s,t=>this._onInteraction(t,!0)),F.on(this._element,Ss,t=>this._onInteraction(t,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each(function(){const e=Fs.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}})}}return Q(Fs),v(Fs),{Alert:G,Button:Z,Carousel:Nt,Collapse:Qt,Dropdown:be,Modal:Ze,Offcanvas:pi,Popover:Wi,ScrollSpy:ts,Tab:Es,Toast:Fs,Tooltip:Fi}});
136//# sourceMappingURL=bootstrap.min.js.map
136
137document.addEventListener('show.bs.modal', function (event) {
138    const modal = event.target;
139    const scrollbarWidth =
140        window.innerWidth - document.documentElement.clientWidth;
141    const isBodyOverflowing =
142        document.body.clientWidth < window.innerWidth;
143    const isModalOverflowing =
144        modal.scrollHeight >
145        document.documentElement.clientHeight;
146
147    /*
148     * Bootstrap 4.6.2:
149     *
150     * Body overflowing + modal NOT overflowing
151     *     => padding-right
152     *
153     * Body NOT overflowing + modal overflowing
154     *     => padding-left
155     */
156    if (isBodyOverflowing && !isModalOverflowing) {
157        modal.style.paddingRight =
158            `${scrollbarWidth}px`;
159    }
160    if (!isBodyOverflowing && isModalOverflowing) {
161        modal.style.paddingLeft =
162            `${scrollbarWidth}px`;
163    }
164});
165
166document.addEventListener('hidden.bs.modal', function (event) {
167    const modal = event.target;
168    modal.style.paddingLeft = '';
169    modal.style.paddingRight = '';
170});
171// Fix for Bootstrap 5.3.8: restore tabindex="0" on all tab triggers so they
172// remain reachable via the TAB key. Bootstrap 5.3.3+ applies a roving
173// tabindex="-1" to inactive tabs, which breaks the keyboard access
174(function () {
175    'use strict';
176
177    var TAB_SELECTOR = '[data-bs-toggle="tab"], [data-bs-toggle="pill"], .cmp-tabs-v2 .tab-link, .nav-tabs .nav-link, .nav-pills .nav-link';
178
179    function forceTabIndexZero(root) {
180        var scope = root && root.querySelectorAll ? root : document;
181        var nodes = scope.querySelectorAll(TAB_SELECTOR);
182        for (var i = 0; i < nodes.length; i++) {
183            if (nodes[i].getAttribute('tabindex') !== '0') {
184                nodes[i].setAttribute('tabindex', '0');
185            }
186        }
187    }
188
189    function matchesTabSelector(el) {
190        return el && el.nodeType === 1 && typeof el.matches === 'function' && el.matches(TAB_SELECTOR);
191    }
192
193    function init() {
194        forceTabIndexZero(document);
195
196        // Native Bootstrap 5 tab events (dispatched via CustomEvent).
197        ['show.bs.tab', 'shown.bs.tab', 'hide.bs.tab', 'hidden.bs.tab'].forEach(function (evt) {
198            document.addEventListener(evt, function () {
199                // Run after Bootstrap's own handler finishes writing tabindex.
200                setTimeout(function () { forceTabIndexZero(document); }, 0);
201            }, true);
202        });
203
204        // Catch any programmatic tabindex="-1" writes on tab triggers.
205        if (typeof MutationObserver !== 'undefined') {
206            var observer = new MutationObserver(function (mutations) {
207                for (var i = 0; i < mutations.length; i++) {
208                    var m = mutations[i];
209                    if (m.type === 'attributes' && m.attributeName === 'tabindex' && matchesTabSelector(m.target)) {
210                        if (m.target.getAttribute('tabindex') === '-1') {
211                            m.target.setAttribute('tabindex', '0');
212                        }
213                    } else if (m.type === 'childList' && m.addedNodes && m.addedNodes.length) {
214                        for (var j = 0; j < m.addedNodes.length; j++) {
215                            forceTabIndexZero(m.addedNodes[j]);
216                        }
217                    }
218                }
219            });
220            observer.observe(document.body || document.documentElement, {
221                subtree: true,
222                childList: true,
223                attributes: true,
224                attributeFilter: ['tabindex']
225            });
226        }
227    }
228
229    if (document.readyState === 'loading') {
230        document.addEventListener('DOMContentLoaded', init);
231    } else {
232        init();
233    }
234})();
vendor: 13,074 bytes, lines 235-625
235/**
236 * @popperjs/core v2.11.8 - MIT License
237 */
238
239(function (global, factory) {
240  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
241  typeof define === 'function' && define.amd ? define(['exports'], factory) :
242  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Popper = {}));
243}(this, (function (exports) { 'use strict';
244
245  function getWindow(node) {
246    if (node == null) {
247      return window;
248    }
249
250    if (node.toString() !== '[object Window]') {
251      var ownerDocument = node.ownerDocument;
252      return ownerDocument ? ownerDocument.defaultView || window : window;
253    }
254
255    return node;
256  }
257
258  function isElement(node) {
259    var OwnElement = getWindow(node).Element;
260    return node instanceof OwnElement || node instanceof Element;
261  }
262
263  function isHTMLElement(node) {
264    var OwnElement = getWindow(node).HTMLElement;
265    return node instanceof OwnElement || node instanceof HTMLElement;
266  }
267
268  function isShadowRoot(node) {
269    // IE 11 has no ShadowRoot
270    if (typeof ShadowRoot === 'undefined') {
271      return false;
272    }
273
274    var OwnElement = getWindow(node).ShadowRoot;
275    return node instanceof OwnElement || node instanceof ShadowRoot;
276  }
277
278  var max = Math.max;
279  var min = Math.min;
280  var round = Math.round;
281
282  function getUAString() {
283    var uaData = navigator.userAgentData;
284
285    if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {
286      return uaData.brands.map(function (item) {
287        return item.brand + "/" + item.version;
288      }).join(' ');
289    }
290
291    return navigator.userAgent;
292  }
293
294  function isLayoutViewport() {
295    return !/^((?!chrome|android).)*safari/i.test(getUAString());
296  }
297
298  function getBoundingClientRect(element, includeScale, isFixedStrategy) {
299    if (includeScale === void 0) {
300      includeScale = false;
301    }
302
303    if (isFixedStrategy === void 0) {
304      isFixedStrategy = false;
305    }
306
307    var clientRect = element.getBoundingClientRect();
308    var scaleX = 1;
309    var scaleY = 1;
310
311    if (includeScale && isHTMLElement(element)) {
312      scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
313      scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
314    }
315
316    var _ref = isElement(element) ? getWindow(element) : window,
317        visualViewport = _ref.visualViewport;
318
319    var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
320    var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
321    var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;
322    var width = clientRect.width / scaleX;
323    var height = clientRect.height / scaleY;
324    return {
325      width: width,
326      height: height,
327      top: y,
328      right: x + width,
329      bottom: y + height,
330      left: x,
331      x: x,
332      y: y
333    };
334  }
335
336  function getWindowScroll(node) {
337    var win = getWindow(node);
338    var scrollLeft = win.pageXOffset;
339    var scrollTop = win.pageYOffset;
340    return {
341      scrollLeft: scrollLeft,
342      scrollTop: scrollTop
343    };
344  }
345
346  function getHTMLElementScroll(element) {
347    return {
348      scrollLeft: element.scrollLeft,
349      scrollTop: element.scrollTop
350    };
351  }
352
353  function getNodeScroll(node) {
354    if (node === getWindow(node) || !isHTMLElement(node)) {
355      return getWindowScroll(node);
356    } else {
357      return getHTMLElementScroll(node);
358    }
359  }
360
361  function getNodeName(element) {
362    return element ? (element.nodeName || '').toLowerCase() : null;
363  }
364
365  function getDocumentElement(element) {
366    // $FlowFixMe[incompatible-return]: assume body is always available
367    return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]
368    element.document) || window.document).documentElement;
369  }
370
371  function getWindowScrollBarX(element) {
372    // If <html> has a CSS width greater than the viewport, then this will be
373    // incorrect for RTL.
374    // Popper 1 is broken in this case and never had a bug report so let's assume
375    // it's not an issue. I don't think anyone ever specifies width on <html>
376    // anyway.
377    // Browsers where the left scrollbar doesn't cause an issue report `0` for
378    // this (e.g. Edge 2019, IE11, Safari)
379    return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
380  }
381
382  function getComputedStyle(element) {
383    return getWindow(element).getComputedStyle(element);
384  }
385
386  function isScrollParent(element) {
387    // Firefox wants us to check `-x` and `-y` variations as well
388    var _getComputedStyle = getComputedStyle(element),
389        overflow = _getComputedStyle.overflow,
390        overflowX = _getComputedStyle.overflowX,
391        overflowY = _getComputedStyle.overflowY;
392
393    return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
394  }
395
396  function isElementScaled(element) {
397    var rect = element.getBoundingClientRect();
398    var scaleX = round(rect.width) / element.offsetWidth || 1;
399    var scaleY = round(rect.height) / element.offsetHeight || 1;
400    return scaleX !== 1 || scaleY !== 1;
401  } // Returns the composite rect of an element relative to its offsetParent.
402  // Composite means it takes into account transforms as well as layout.
403
404
405  function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
406    if (isFixed === void 0) {
407      isFixed = false;
408    }
409
410    var isOffsetParentAnElement = isHTMLElement(offsetParent);
411    var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
412    var documentElement = getDocumentElement(offsetParent);
413    var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);
414    var scroll = {
415      scrollLeft: 0,
416      scrollTop: 0
417    };
418    var offsets = {
419      x: 0,
420      y: 0
421    };
422
423    if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
424      if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078
425      isScrollParent(documentElement)) {
426        scroll = getNodeScroll(offsetParent);
427      }
428
429      if (isHTMLElement(offsetParent)) {
430        offsets = getBoundingClientRect(offsetParent, true);
431        offsets.x += offsetParent.clientLeft;
432        offsets.y += offsetParent.clientTop;
433      } else if (documentElement) {
434        offsets.x = getWindowScrollBarX(documentElement);
435      }
436    }
437
438    return {
439      x: rect.left + scroll.scrollLeft - offsets.x,
440      y: rect.top + scroll.scrollTop - offsets.y,
441      width: rect.width,
442      height: rect.height
443    };
444  }
445
446  // means it doesn't take into account transforms.
447
448  function getLayoutRect(element) {
449    var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.
450    // Fixes https://github.com/popperjs/popper-core/issues/1223
451
452    var width = element.offsetWidth;
453    var height = element.offsetHeight;
454
455    if (Math.abs(clientRect.width - width) <= 1) {
456      width = clientRect.width;
457    }
458
459    if (Math.abs(clientRect.height - height) <= 1) {
460      height = clientRect.height;
461    }
462
463    return {
464      x: element.offsetLeft,
465      y: element.offsetTop,
466      width: width,
467      height: height
468    };
469  }
470
471  function getParentNode(element) {
472    if (getNodeName(element) === 'html') {
473      return element;
474    }
475
476    return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle
477      // $FlowFixMe[incompatible-return]
478      // $FlowFixMe[prop-missing]
479      element.assignedSlot || // step into the shadow DOM of the parent of a slotted node
480      element.parentNode || ( // DOM Element detected
481      isShadowRoot(element) ? element.host : null) || // ShadowRoot detected
482      // $FlowFixMe[incompatible-call]: HTMLElement is a Node
483      getDocumentElement(element) // fallback
484
485    );
486  }
487
488  function getScrollParent(node) {
489    if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {
490      // $FlowFixMe[incompatible-return]: assume body is always available
491      return node.ownerDocument.body;
492    }
493
494    if (isHTMLElement(node) && isScrollParent(node)) {
495      return node;
496    }
497
498    return getScrollParent(getParentNode(node));
499  }
500
501  /*
502  given a DOM element, return the list of all scroll parents, up the list of ancesors
503  until we get to the top window object. This list is what we attach scroll listeners
504  to, because if any of these parent elements scroll, we'll need to re-calculate the
505  reference element's position.
506  */
507
508  function listScrollParents(element, list) {
509    var _element$ownerDocumen;
510
511    if (list === void 0) {
512      list = [];
513    }
514
515    var scrollParent = getScrollParent(element);
516    var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);
517    var win = getWindow(scrollParent);
518    var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;
519    var updatedList = list.concat(target);
520    return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
521    updatedList.concat(listScrollParents(getParentNode(target)));
522  }
523
524  function isTableElement(element) {
525    return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;
526  }
527
528  function getTrueOffsetParent(element) {
529    if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837
530    getComputedStyle(element).position === 'fixed') {
531      return null;
532    }
533
534    return element.offsetParent;
535  } // `.offsetParent` reports `null` for fixed elements, while absolute elements
536  // return the containing block
537
538
539  function getContainingBlock(element) {
540    var isFirefox = /firefox/i.test(getUAString());
541    var isIE = /Trident/i.test(getUAString());
542
543    if (isIE && isHTMLElement(element)) {
544      // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
545      var elementCss = getComputedStyle(element);
546
547      if (elementCss.position === 'fixed') {
548        return null;
549      }
550    }
551
552    var currentNode = getParentNode(element);
553
554    if (isShadowRoot(currentNode)) {
555      currentNode = currentNode.host;
556    }
557
558    while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
559      var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that
560      // create a containing block.
561      // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
562
563      if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {
564        return currentNode;
565      } else {
566        currentNode = currentNode.parentNode;
567      }
568    }
569
570    return null;
571  } // Gets the closest ancestor positioned element. Handles some edge cases,
572  // such as table ancestors and cross browser bugs.
573
574
575  function getOffsetParent(element) {
576    var window = getWindow(element);
577    var offsetParent = getTrueOffsetParent(element);
578
579    while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {
580      offsetParent = getTrueOffsetParent(offsetParent);
581    }
582
583    if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {
584      return window;
585    }
586
587    return offsetParent || getContainingBlock(element) || window;
588  }
589
590  var top = 'top';
591  var bottom = 'bottom';
592  var right = 'right';
593  var left = 'left';
594  var auto = 'auto';
595  var basePlacements = [top, bottom, right, left];
596  var start = 'start';
597  var end = 'end';
598  var clippingParents = 'clippingParents';
599  var viewport = 'viewport';
600  var popper = 'popper';
601  var reference = 'reference';
602  var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {
603    return acc.concat([placement + "-" + start, placement + "-" + end]);
604  }, []);
605  var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {
606    return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
607  }, []); // modifiers that need to read the DOM
608
609  var beforeRead = 'beforeRead';
610  var read = 'read';
611  var afterRead = 'afterRead'; // pure-logic modifiers
612
613  var beforeMain = 'beforeMain';
614  var main = 'main';
615  var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)
616
617  var beforeWrite = 'beforeWrite';
618  var write = 'write';
619  var afterWrite = 'afterWrite';
620  var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
621
622  function order(modifiers) {
623    var map = new Map();
624    var visited = new Set();
625    var result = [];
vendor: 13,809 bytes, lines 626-1034
626    modifiers.forEach(function (modifier) {
627      map.set(modifier.name, modifier);
628    }); // On visiting object, check for its dependencies and visit them recursively
629
630    function sort(modifier) {
631      visited.add(modifier.name);
632      var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);
633      requires.forEach(function (dep) {
634        if (!visited.has(dep)) {
635          var depModifier = map.get(dep);
636
637          if (depModifier) {
638            sort(depModifier);
639          }
640        }
641      });
642      result.push(modifier);
643    }
644
645    modifiers.forEach(function (modifier) {
646      if (!visited.has(modifier.name)) {
647        // check for visited object
648        sort(modifier);
649      }
650    });
651    return result;
652  }
653
654  function orderModifiers(modifiers) {
655    // order based on dependencies
656    var orderedModifiers = order(modifiers); // order based on phase
657
658    return modifierPhases.reduce(function (acc, phase) {
659      return acc.concat(orderedModifiers.filter(function (modifier) {
660        return modifier.phase === phase;
661      }));
662    }, []);
663  }
664
665  function debounce(fn) {
666    var pending;
667    return function () {
668      if (!pending) {
669        pending = new Promise(function (resolve) {
670          Promise.resolve().then(function () {
671            pending = undefined;
672            resolve(fn());
673          });
674        });
675      }
676
677      return pending;
678    };
679  }
680
681  function mergeByName(modifiers) {
682    var merged = modifiers.reduce(function (merged, current) {
683      var existing = merged[current.name];
684      merged[current.name] = existing ? Object.assign({}, existing, current, {
685        options: Object.assign({}, existing.options, current.options),
686        data: Object.assign({}, existing.data, current.data)
687      }) : current;
688      return merged;
689    }, {}); // IE11 does not support Object.values
690
691    return Object.keys(merged).map(function (key) {
692      return merged[key];
693    });
694  }
695
696  function getViewportRect(element, strategy) {
697    var win = getWindow(element);
698    var html = getDocumentElement(element);
699    var visualViewport = win.visualViewport;
700    var width = html.clientWidth;
701    var height = html.clientHeight;
702    var x = 0;
703    var y = 0;
704
705    if (visualViewport) {
706      width = visualViewport.width;
707      height = visualViewport.height;
708      var layoutViewport = isLayoutViewport();
709
710      if (layoutViewport || !layoutViewport && strategy === 'fixed') {
711        x = visualViewport.offsetLeft;
712        y = visualViewport.offsetTop;
713      }
714    }
715
716    return {
717      width: width,
718      height: height,
719      x: x + getWindowScrollBarX(element),
720      y: y
721    };
722  }
723
724  // of the `<html>` and `<body>` rect bounds if horizontally scrollable
725
726  function getDocumentRect(element) {
727    var _element$ownerDocumen;
728
729    var html = getDocumentElement(element);
730    var winScroll = getWindowScroll(element);
731    var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
732    var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
733    var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
734    var x = -winScroll.scrollLeft + getWindowScrollBarX(element);
735    var y = -winScroll.scrollTop;
736
737    if (getComputedStyle(body || html).direction === 'rtl') {
738      x += max(html.clientWidth, body ? body.clientWidth : 0) - width;
739    }
740
741    return {
742      width: width,
743      height: height,
744      x: x,
745      y: y
746    };
747  }
748
749  function contains(parent, child) {
750    var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method
751
752    if (parent.contains(child)) {
753      return true;
754    } // then fallback to custom implementation with Shadow DOM support
755    else if (rootNode && isShadowRoot(rootNode)) {
756        var next = child;
757
758        do {
759          if (next && parent.isSameNode(next)) {
760            return true;
761          } // $FlowFixMe[prop-missing]: need a better way to handle this...
762
763
764          next = next.parentNode || next.host;
765        } while (next);
766      } // Give up, the result is false
767
768
769    return false;
770  }
771
772  function rectToClientRect(rect) {
773    return Object.assign({}, rect, {
774      left: rect.x,
775      top: rect.y,
776      right: rect.x + rect.width,
777      bottom: rect.y + rect.height
778    });
779  }
780
781  function getInnerBoundingClientRect(element, strategy) {
782    var rect = getBoundingClientRect(element, false, strategy === 'fixed');
783    rect.top = rect.top + element.clientTop;
784    rect.left = rect.left + element.clientLeft;
785    rect.bottom = rect.top + element.clientHeight;
786    rect.right = rect.left + element.clientWidth;
787    rect.width = element.clientWidth;
788    rect.height = element.clientHeight;
789    rect.x = rect.left;
790    rect.y = rect.top;
791    return rect;
792  }
793
794  function getClientRectFromMixedType(element, clippingParent, strategy) {
795    return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
796  } // A "clipping parent" is an overflowable container with the characteristic of
797  // clipping (or hiding) overflowing elements with a position different from
798  // `initial`
799
800
801  function getClippingParents(element) {
802    var clippingParents = listScrollParents(getParentNode(element));
803    var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;
804    var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
805
806    if (!isElement(clipperElement)) {
807      return [];
808    } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414
809
810
811    return clippingParents.filter(function (clippingParent) {
812      return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';
813    });
814  } // Gets the maximum area that the element is visible in due to any number of
815  // clipping parents
816
817
818  function getClippingRect(element, boundary, rootBoundary, strategy) {
819    var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);
820    var clippingParents = [].concat(mainClippingParents, [rootBoundary]);
821    var firstClippingParent = clippingParents[0];
822    var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {
823      var rect = getClientRectFromMixedType(element, clippingParent, strategy);
824      accRect.top = max(rect.top, accRect.top);
825      accRect.right = min(rect.right, accRect.right);
826      accRect.bottom = min(rect.bottom, accRect.bottom);
827      accRect.left = max(rect.left, accRect.left);
828      return accRect;
829    }, getClientRectFromMixedType(element, firstClippingParent, strategy));
830    clippingRect.width = clippingRect.right - clippingRect.left;
831    clippingRect.height = clippingRect.bottom - clippingRect.top;
832    clippingRect.x = clippingRect.left;
833    clippingRect.y = clippingRect.top;
834    return clippingRect;
835  }
836
837  function getBasePlacement(placement) {
838    return placement.split('-')[0];
839  }
840
841  function getVariation(placement) {
842    return placement.split('-')[1];
843  }
844
845  function getMainAxisFromPlacement(placement) {
846    return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
847  }
848
849  function computeOffsets(_ref) {
850    var reference = _ref.reference,
851        element = _ref.element,
852        placement = _ref.placement;
853    var basePlacement = placement ? getBasePlacement(placement) : null;
854    var variation = placement ? getVariation(placement) : null;
855    var commonX = reference.x + reference.width / 2 - element.width / 2;
856    var commonY = reference.y + reference.height / 2 - element.height / 2;
857    var offsets;
858
859    switch (basePlacement) {
860      case top:
861        offsets = {
862          x: commonX,
863          y: reference.y - element.height
864        };
865        break;
866
867      case bottom:
868        offsets = {
869          x: commonX,
870          y: reference.y + reference.height
871        };
872        break;
873
874      case right:
875        offsets = {
876          x: reference.x + reference.width,
877          y: commonY
878        };
879        break;
880
881      case left:
882        offsets = {
883          x: reference.x - element.width,
884          y: commonY
885        };
886        break;
887
888      default:
889        offsets = {
890          x: reference.x,
891          y: reference.y
892        };
893    }
894
895    var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;
896
897    if (mainAxis != null) {
898      var len = mainAxis === 'y' ? 'height' : 'width';
899
900      switch (variation) {
901        case start:
902          offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);
903          break;
904
905        case end:
906          offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);
907          break;
908      }
909    }
910
911    return offsets;
912  }
913
914  function getFreshSideObject() {
915    return {
916      top: 0,
917      right: 0,
918      bottom: 0,
919      left: 0
920    };
921  }
922
923  function mergePaddingObject(paddingObject) {
924    return Object.assign({}, getFreshSideObject(), paddingObject);
925  }
926
927  function expandToHashMap(value, keys) {
928    return keys.reduce(function (hashMap, key) {
929      hashMap[key] = value;
930      return hashMap;
931    }, {});
932  }
933
934  function detectOverflow(state, options) {
935    if (options === void 0) {
936      options = {};
937    }
938
939    var _options = options,
940        _options$placement = _options.placement,
941        placement = _options$placement === void 0 ? state.placement : _options$placement,
942        _options$strategy = _options.strategy,
943        strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,
944        _options$boundary = _options.boundary,
945        boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,
946        _options$rootBoundary = _options.rootBoundary,
947        rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,
948        _options$elementConte = _options.elementContext,
949        elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,
950        _options$altBoundary = _options.altBoundary,
951        altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,
952        _options$padding = _options.padding,
953        padding = _options$padding === void 0 ? 0 : _options$padding;
954    var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
955    var altContext = elementContext === popper ? reference : popper;
956    var popperRect = state.rects.popper;
957    var element = state.elements[altBoundary ? altContext : elementContext];
958    var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);
959    var referenceClientRect = getBoundingClientRect(state.elements.reference);
960    var popperOffsets = computeOffsets({
961      reference: referenceClientRect,
962      element: popperRect,
963      strategy: 'absolute',
964      placement: placement
965    });
966    var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));
967    var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect
968    // 0 or negative = within the clipping rect
969
970    var overflowOffsets = {
971      top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
972      bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
973      left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
974      right: elementClientRect.right - clippingClientRect.right + paddingObject.right
975    };
976    var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element
977
978    if (elementContext === popper && offsetData) {
979      var offset = offsetData[placement];
980      Object.keys(overflowOffsets).forEach(function (key) {
981        var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;
982        var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';
983        overflowOffsets[key] += offset[axis] * multiply;
984      });
985    }
986
987    return overflowOffsets;
988  }
989
990  var DEFAULT_OPTIONS = {
991    placement: 'bottom',
992    modifiers: [],
993    strategy: 'absolute'
994  };
995
996  function areValidElements() {
997    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
998      args[_key] = arguments[_key];
999    }
1000
1001    return !args.some(function (element) {
1002      return !(element && typeof element.getBoundingClientRect === 'function');
1003    });
1004  }
1005
1006  function popperGenerator(generatorOptions) {
1007    if (generatorOptions === void 0) {
1008      generatorOptions = {};
1009    }
1010
1011    var _generatorOptions = generatorOptions,
1012        _generatorOptions$def = _generatorOptions.defaultModifiers,
1013        defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,
1014        _generatorOptions$def2 = _generatorOptions.defaultOptions,
1015        defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;
1016    return function createPopper(reference, popper, options) {
1017      if (options === void 0) {
1018        options = defaultOptions;
1019      }
1020
1021      var state = {
1022        placement: 'bottom',
1023        orderedModifiers: [],
1024        options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),
1025        modifiersData: {},
1026        elements: {
1027          reference: reference,
1028          popper: popper
1029        },
1030        attributes: {},
1031        styles: {}
1032      };
1033      var effectCleanupFns = [];
1034      var isDestroyed = false;
vendor: 4,800 bytes, lines 1035-1145
1035      var instance = {
1036        state: state,
1037        setOptions: function setOptions(setOptionsAction) {
1038          var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;
1039          cleanupModifierEffects();
1040          state.options = Object.assign({}, defaultOptions, state.options, options);
1041          state.scrollParents = {
1042            reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
1043            popper: listScrollParents(popper)
1044          }; // Orders the modifiers based on their dependencies and `phase`
1045          // properties
1046
1047          var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers
1048
1049          state.orderedModifiers = orderedModifiers.filter(function (m) {
1050            return m.enabled;
1051          });
1052          runModifierEffects();
1053          return instance.update();
1054        },
1055        // Sync update – it will always be executed, even if not necessary. This
1056        // is useful for low frequency updates where sync behavior simplifies the
1057        // logic.
1058        // For high frequency updates (e.g. `resize` and `scroll` events), always
1059        // prefer the async Popper#update method
1060        forceUpdate: function forceUpdate() {
1061          if (isDestroyed) {
1062            return;
1063          }
1064
1065          var _state$elements = state.elements,
1066              reference = _state$elements.reference,
1067              popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements
1068          // anymore
1069
1070          if (!areValidElements(reference, popper)) {
1071            return;
1072          } // Store the reference and popper rects to be read by modifiers
1073
1074
1075          state.rects = {
1076            reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),
1077            popper: getLayoutRect(popper)
1078          }; // Modifiers have the ability to reset the current update cycle. The
1079          // most common use case for this is the `flip` modifier changing the
1080          // placement, which then needs to re-run all the modifiers, because the
1081          // logic was previously ran for the previous placement and is therefore
1082          // stale/incorrect
1083
1084          state.reset = false;
1085          state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier
1086          // is filled with the initial data specified by the modifier. This means
1087          // it doesn't persist and is fresh on each update.
1088          // To ensure persistent data, use `${name}#persistent`
1089
1090          state.orderedModifiers.forEach(function (modifier) {
1091            return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
1092          });
1093
1094          for (var index = 0; index < state.orderedModifiers.length; index++) {
1095            if (state.reset === true) {
1096              state.reset = false;
1097              index = -1;
1098              continue;
1099            }
1100
1101            var _state$orderedModifie = state.orderedModifiers[index],
1102                fn = _state$orderedModifie.fn,
1103                _state$orderedModifie2 = _state$orderedModifie.options,
1104                _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,
1105                name = _state$orderedModifie.name;
1106
1107            if (typeof fn === 'function') {
1108              state = fn({
1109                state: state,
1110                options: _options,
1111                name: name,
1112                instance: instance
1113              }) || state;
1114            }
1115          }
1116        },
1117        // Async and optimistically optimized update – it will not be executed if
1118        // not necessary (debounced to run at most once-per-tick)
1119        update: debounce(function () {
1120          return new Promise(function (resolve) {
1121            instance.forceUpdate();
1122            resolve(state);
1123          });
1124        }),
1125        destroy: function destroy() {
1126          cleanupModifierEffects();
1127          isDestroyed = true;
1128        }
1129      };
1130
1131      if (!areValidElements(reference, popper)) {
1132        return instance;
1133      }
1134
1135      instance.setOptions(options).then(function (state) {
1136        if (!isDestroyed && options.onFirstUpdate) {
1137          options.onFirstUpdate(state);
1138        }
1139      }); // Modifiers have the ability to execute arbitrary code before the first
1140      // update cycle runs. They will be executed in the same order as the update
1141      // cycle. This is useful when a modifier adds some persistent data that
1142      // other modifiers need to use, but the modifier is run after the dependent
1143      // one.
1144
1145      function runModifierEffects() {
vendor: 4,368 bytes, lines 1146-1305
1146        state.orderedModifiers.forEach(function (_ref) {
1147          var name = _ref.name,
1148              _ref$options = _ref.options,
1149              options = _ref$options === void 0 ? {} : _ref$options,
1150              effect = _ref.effect;
1151
1152          if (typeof effect === 'function') {
1153            var cleanupFn = effect({
1154              state: state,
1155              name: name,
1156              instance: instance,
1157              options: options
1158            });
1159
1160            var noopFn = function noopFn() {};
1161
1162            effectCleanupFns.push(cleanupFn || noopFn);
1163          }
1164        });
1165      }
1166
1167      function cleanupModifierEffects() {
1168        effectCleanupFns.forEach(function (fn) {
1169          return fn();
1170        });
1171        effectCleanupFns = [];
1172      }
1173
1174      return instance;
1175    };
1176  }
1177
1178  var passive = {
1179    passive: true
1180  };
1181
1182  function effect$2(_ref) {
1183    var state = _ref.state,
1184        instance = _ref.instance,
1185        options = _ref.options;
1186    var _options$scroll = options.scroll,
1187        scroll = _options$scroll === void 0 ? true : _options$scroll,
1188        _options$resize = options.resize,
1189        resize = _options$resize === void 0 ? true : _options$resize;
1190    var window = getWindow(state.elements.popper);
1191    var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);
1192
1193    if (scroll) {
1194      scrollParents.forEach(function (scrollParent) {
1195        scrollParent.addEventListener('scroll', instance.update, passive);
1196      });
1197    }
1198
1199    if (resize) {
1200      window.addEventListener('resize', instance.update, passive);
1201    }
1202
1203    return function () {
1204      if (scroll) {
1205        scrollParents.forEach(function (scrollParent) {
1206          scrollParent.removeEventListener('scroll', instance.update, passive);
1207        });
1208      }
1209
1210      if (resize) {
1211        window.removeEventListener('resize', instance.update, passive);
1212      }
1213    };
1214  } // eslint-disable-next-line import/no-unused-modules
1215
1216
1217  var eventListeners = {
1218    name: 'eventListeners',
1219    enabled: true,
1220    phase: 'write',
1221    fn: function fn() {},
1222    effect: effect$2,
1223    data: {}
1224  };
1225
1226  function popperOffsets(_ref) {
1227    var state = _ref.state,
1228        name = _ref.name;
1229    // Offsets are the actual position the popper needs to have to be
1230    // properly positioned near its reference element
1231    // This is the most basic placement, and will be adjusted by
1232    // the modifiers in the next step
1233    state.modifiersData[name] = computeOffsets({
1234      reference: state.rects.reference,
1235      element: state.rects.popper,
1236      strategy: 'absolute',
1237      placement: state.placement
1238    });
1239  } // eslint-disable-next-line import/no-unused-modules
1240
1241
1242  var popperOffsets$1 = {
1243    name: 'popperOffsets',
1244    enabled: true,
1245    phase: 'read',
1246    fn: popperOffsets,
1247    data: {}
1248  };
1249
1250  var unsetSides = {
1251    top: 'auto',
1252    right: 'auto',
1253    bottom: 'auto',
1254    left: 'auto'
1255  }; // Round the offsets to the nearest suitable subpixel based on the DPR.
1256  // Zooming can change the DPR, but it seems to report a value that will
1257  // cleanly divide the values into the appropriate subpixels.
1258
1259  function roundOffsetsByDPR(_ref, win) {
1260    var x = _ref.x,
1261        y = _ref.y;
1262    var dpr = win.devicePixelRatio || 1;
1263    return {
1264      x: round(x * dpr) / dpr || 0,
1265      y: round(y * dpr) / dpr || 0
1266    };
1267  }
1268
1269  function mapToStyles(_ref2) {
1270    var _Object$assign2;
1271
1272    var popper = _ref2.popper,
1273        popperRect = _ref2.popperRect,
1274        placement = _ref2.placement,
1275        variation = _ref2.variation,
1276        offsets = _ref2.offsets,
1277        position = _ref2.position,
1278        gpuAcceleration = _ref2.gpuAcceleration,
1279        adaptive = _ref2.adaptive,
1280        roundOffsets = _ref2.roundOffsets,
1281        isFixed = _ref2.isFixed;
1282    var _offsets$x = offsets.x,
1283        x = _offsets$x === void 0 ? 0 : _offsets$x,
1284        _offsets$y = offsets.y,
1285        y = _offsets$y === void 0 ? 0 : _offsets$y;
1286
1287    var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({
1288      x: x,
1289      y: y
1290    }) : {
1291      x: x,
1292      y: y
1293    };
1294
1295    x = _ref3.x;
1296    y = _ref3.y;
1297    var hasX = offsets.hasOwnProperty('x');
1298    var hasY = offsets.hasOwnProperty('y');
1299    var sideX = left;
1300    var sideY = top;
1301    var win = window;
1302
1303    if (adaptive) {
1304      var offsetParent = getOffsetParent(popper);
1305      var heightProp = 'clientHeight';
vendor: 4,563 bytes, lines 1306-1427
1306      var widthProp = 'clientWidth';
1307
1308      if (offsetParent === getWindow(popper)) {
1309        offsetParent = getDocumentElement(popper);
1310
1311        if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {
1312          heightProp = 'scrollHeight';
1313          widthProp = 'scrollWidth';
1314        }
1315      } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it
1316
1317
1318      offsetParent = offsetParent;
1319
1320      if (placement === top || (placement === left || placement === right) && variation === end) {
1321        sideY = bottom;
1322        var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
1323        offsetParent[heightProp];
1324        y -= offsetY - popperRect.height;
1325        y *= gpuAcceleration ? 1 : -1;
1326      }
1327
1328      if (placement === left || (placement === top || placement === bottom) && variation === end) {
1329        sideX = right;
1330        var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
1331        offsetParent[widthProp];
1332        x -= offsetX - popperRect.width;
1333        x *= gpuAcceleration ? 1 : -1;
1334      }
1335    }
1336
1337    var commonStyles = Object.assign({
1338      position: position
1339    }, adaptive && unsetSides);
1340
1341    var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
1342      x: x,
1343      y: y
1344    }, getWindow(popper)) : {
1345      x: x,
1346      y: y
1347    };
1348
1349    x = _ref4.x;
1350    y = _ref4.y;
1351
1352    if (gpuAcceleration) {
1353      var _Object$assign;
1354
1355      return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
1356    }
1357
1358    return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
1359  }
1360
1361  function computeStyles(_ref5) {
1362    var state = _ref5.state,
1363        options = _ref5.options;
1364    var _options$gpuAccelerat = options.gpuAcceleration,
1365        gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
1366        _options$adaptive = options.adaptive,
1367        adaptive = _options$adaptive === void 0 ? true : _options$adaptive,
1368        _options$roundOffsets = options.roundOffsets,
1369        roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
1370    var commonStyles = {
1371      placement: getBasePlacement(state.placement),
1372      variation: getVariation(state.placement),
1373      popper: state.elements.popper,
1374      popperRect: state.rects.popper,
1375      gpuAcceleration: gpuAcceleration,
1376      isFixed: state.options.strategy === 'fixed'
1377    };
1378
1379    if (state.modifiersData.popperOffsets != null) {
1380      state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {
1381        offsets: state.modifiersData.popperOffsets,
1382        position: state.options.strategy,
1383        adaptive: adaptive,
1384        roundOffsets: roundOffsets
1385      })));
1386    }
1387
1388    if (state.modifiersData.arrow != null) {
1389      state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {
1390        offsets: state.modifiersData.arrow,
1391        position: 'absolute',
1392        adaptive: false,
1393        roundOffsets: roundOffsets
1394      })));
1395    }
1396
1397    state.attributes.popper = Object.assign({}, state.attributes.popper, {
1398      'data-popper-placement': state.placement
1399    });
1400  } // eslint-disable-next-line import/no-unused-modules
1401
1402
1403  var computeStyles$1 = {
1404    name: 'computeStyles',
1405    enabled: true,
1406    phase: 'beforeWrite',
1407    fn: computeStyles,
1408    data: {}
1409  };
1410
1411  // and applies them to the HTMLElements such as popper and arrow
1412
1413  function applyStyles(_ref) {
1414    var state = _ref.state;
1415    Object.keys(state.elements).forEach(function (name) {
1416      var style = state.styles[name] || {};
1417      var attributes = state.attributes[name] || {};
1418      var element = state.elements[name]; // arrow is optional + virtual elements
1419
1420      if (!isHTMLElement(element) || !getNodeName(element)) {
1421        return;
1422      } // Flow doesn't support to extend this property, but it's the most
1423      // effective way to apply styles to an HTMLElement
1424      // $FlowFixMe[cannot-write]
1425
1426
1427      Object.assign(element.style, style);
vendor: 22,456 bytes, lines 1428-2059
1428      Object.keys(attributes).forEach(function (name) {
1429        var value = attributes[name];
1430
1431        if (value === false) {
1432          element.removeAttribute(name);
1433        } else {
1434          element.setAttribute(name, value === true ? '' : value);
1435        }
1436      });
1437    });
1438  }
1439
1440  function effect$1(_ref2) {
1441    var state = _ref2.state;
1442    var initialStyles = {
1443      popper: {
1444        position: state.options.strategy,
1445        left: '0',
1446        top: '0',
1447        margin: '0'
1448      },
1449      arrow: {
1450        position: 'absolute'
1451      },
1452      reference: {}
1453    };
1454    Object.assign(state.elements.popper.style, initialStyles.popper);
1455    state.styles = initialStyles;
1456
1457    if (state.elements.arrow) {
1458      Object.assign(state.elements.arrow.style, initialStyles.arrow);
1459    }
1460
1461    return function () {
1462      Object.keys(state.elements).forEach(function (name) {
1463        var element = state.elements[name];
1464        var attributes = state.attributes[name] || {};
1465        var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them
1466
1467        var style = styleProperties.reduce(function (style, property) {
1468          style[property] = '';
1469          return style;
1470        }, {}); // arrow is optional + virtual elements
1471
1472        if (!isHTMLElement(element) || !getNodeName(element)) {
1473          return;
1474        }
1475
1476        Object.assign(element.style, style);
1477        Object.keys(attributes).forEach(function (attribute) {
1478          element.removeAttribute(attribute);
1479        });
1480      });
1481    };
1482  } // eslint-disable-next-line import/no-unused-modules
1483
1484
1485  var applyStyles$1 = {
1486    name: 'applyStyles',
1487    enabled: true,
1488    phase: 'write',
1489    fn: applyStyles,
1490    effect: effect$1,
1491    requires: ['computeStyles']
1492  };
1493
1494  function distanceAndSkiddingToXY(placement, rects, offset) {
1495    var basePlacement = getBasePlacement(placement);
1496    var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;
1497
1498    var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {
1499      placement: placement
1500    })) : offset,
1501        skidding = _ref[0],
1502        distance = _ref[1];
1503
1504    skidding = skidding || 0;
1505    distance = (distance || 0) * invertDistance;
1506    return [left, right].indexOf(basePlacement) >= 0 ? {
1507      x: distance,
1508      y: skidding
1509    } : {
1510      x: skidding,
1511      y: distance
1512    };
1513  }
1514
1515  function offset(_ref2) {
1516    var state = _ref2.state,
1517        options = _ref2.options,
1518        name = _ref2.name;
1519    var _options$offset = options.offset,
1520        offset = _options$offset === void 0 ? [0, 0] : _options$offset;
1521    var data = placements.reduce(function (acc, placement) {
1522      acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);
1523      return acc;
1524    }, {});
1525    var _data$state$placement = data[state.placement],
1526        x = _data$state$placement.x,
1527        y = _data$state$placement.y;
1528
1529    if (state.modifiersData.popperOffsets != null) {
1530      state.modifiersData.popperOffsets.x += x;
1531      state.modifiersData.popperOffsets.y += y;
1532    }
1533
1534    state.modifiersData[name] = data;
1535  } // eslint-disable-next-line import/no-unused-modules
1536
1537
1538  var offset$1 = {
1539    name: 'offset',
1540    enabled: true,
1541    phase: 'main',
1542    requires: ['popperOffsets'],
1543    fn: offset
1544  };
1545
1546  var hash$1 = {
1547    left: 'right',
1548    right: 'left',
1549    bottom: 'top',
1550    top: 'bottom'
1551  };
1552  function getOppositePlacement(placement) {
1553    return placement.replace(/left|right|bottom|top/g, function (matched) {
1554      return hash$1[matched];
1555    });
1556  }
1557
1558  var hash = {
1559    start: 'end',
1560    end: 'start'
1561  };
1562  function getOppositeVariationPlacement(placement) {
1563    return placement.replace(/start|end/g, function (matched) {
1564      return hash[matched];
1565    });
1566  }
1567
1568  function computeAutoPlacement(state, options) {
1569    if (options === void 0) {
1570      options = {};
1571    }
1572
1573    var _options = options,
1574        placement = _options.placement,
1575        boundary = _options.boundary,
1576        rootBoundary = _options.rootBoundary,
1577        padding = _options.padding,
1578        flipVariations = _options.flipVariations,
1579        _options$allowedAutoP = _options.allowedAutoPlacements,
1580        allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP;
1581    var variation = getVariation(placement);
1582    var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {
1583      return getVariation(placement) === variation;
1584    }) : basePlacements;
1585    var allowedPlacements = placements$1.filter(function (placement) {
1586      return allowedAutoPlacements.indexOf(placement) >= 0;
1587    });
1588
1589    if (allowedPlacements.length === 0) {
1590      allowedPlacements = placements$1;
1591    } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...
1592
1593
1594    var overflows = allowedPlacements.reduce(function (acc, placement) {
1595      acc[placement] = detectOverflow(state, {
1596        placement: placement,
1597        boundary: boundary,
1598        rootBoundary: rootBoundary,
1599        padding: padding
1600      })[getBasePlacement(placement)];
1601      return acc;
1602    }, {});
1603    return Object.keys(overflows).sort(function (a, b) {
1604      return overflows[a] - overflows[b];
1605    });
1606  }
1607
1608  function getExpandedFallbackPlacements(placement) {
1609    if (getBasePlacement(placement) === auto) {
1610      return [];
1611    }
1612
1613    var oppositePlacement = getOppositePlacement(placement);
1614    return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];
1615  }
1616
1617  function flip(_ref) {
1618    var state = _ref.state,
1619        options = _ref.options,
1620        name = _ref.name;
1621
1622    if (state.modifiersData[name]._skip) {
1623      return;
1624    }
1625
1626    var _options$mainAxis = options.mainAxis,
1627        checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
1628        _options$altAxis = options.altAxis,
1629        checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,
1630        specifiedFallbackPlacements = options.fallbackPlacements,
1631        padding = options.padding,
1632        boundary = options.boundary,
1633        rootBoundary = options.rootBoundary,
1634        altBoundary = options.altBoundary,
1635        _options$flipVariatio = options.flipVariations,
1636        flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,
1637        allowedAutoPlacements = options.allowedAutoPlacements;
1638    var preferredPlacement = state.options.placement;
1639    var basePlacement = getBasePlacement(preferredPlacement);
1640    var isBasePlacement = basePlacement === preferredPlacement;
1641    var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));
1642    var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {
1643      return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {
1644        placement: placement,
1645        boundary: boundary,
1646        rootBoundary: rootBoundary,
1647        padding: padding,
1648        flipVariations: flipVariations,
1649        allowedAutoPlacements: allowedAutoPlacements
1650      }) : placement);
1651    }, []);
1652    var referenceRect = state.rects.reference;
1653    var popperRect = state.rects.popper;
1654    var checksMap = new Map();
1655    var makeFallbackChecks = true;
1656    var firstFittingPlacement = placements[0];
1657
1658    for (var i = 0; i < placements.length; i++) {
1659      var placement = placements[i];
1660
1661      var _basePlacement = getBasePlacement(placement);
1662
1663      var isStartVariation = getVariation(placement) === start;
1664      var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;
1665      var len = isVertical ? 'width' : 'height';
1666      var overflow = detectOverflow(state, {
1667        placement: placement,
1668        boundary: boundary,
1669        rootBoundary: rootBoundary,
1670        altBoundary: altBoundary,
1671        padding: padding
1672      });
1673      var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;
1674
1675      if (referenceRect[len] > popperRect[len]) {
1676        mainVariationSide = getOppositePlacement(mainVariationSide);
1677      }
1678
1679      var altVariationSide = getOppositePlacement(mainVariationSide);
1680      var checks = [];
1681
1682      if (checkMainAxis) {
1683        checks.push(overflow[_basePlacement] <= 0);
1684      }
1685
1686      if (checkAltAxis) {
1687        checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);
1688      }
1689
1690      if (checks.every(function (check) {
1691        return check;
1692      })) {
1693        firstFittingPlacement = placement;
1694        makeFallbackChecks = false;
1695        break;
1696      }
1697
1698      checksMap.set(placement, checks);
1699    }
1700
1701    if (makeFallbackChecks) {
1702      // `2` may be desired in some cases – research later
1703      var numberOfChecks = flipVariations ? 3 : 1;
1704
1705      var _loop = function _loop(_i) {
1706        var fittingPlacement = placements.find(function (placement) {
1707          var checks = checksMap.get(placement);
1708
1709          if (checks) {
1710            return checks.slice(0, _i).every(function (check) {
1711              return check;
1712            });
1713          }
1714        });
1715
1716        if (fittingPlacement) {
1717          firstFittingPlacement = fittingPlacement;
1718          return "break";
1719        }
1720      };
1721
1722      for (var _i = numberOfChecks; _i > 0; _i--) {
1723        var _ret = _loop(_i);
1724
1725        if (_ret === "break") break;
1726      }
1727    }
1728
1729    if (state.placement !== firstFittingPlacement) {
1730      state.modifiersData[name]._skip = true;
1731      state.placement = firstFittingPlacement;
1732      state.reset = true;
1733    }
1734  } // eslint-disable-next-line import/no-unused-modules
1735
1736
1737  var flip$1 = {
1738    name: 'flip',
1739    enabled: true,
1740    phase: 'main',
1741    fn: flip,
1742    requiresIfExists: ['offset'],
1743    data: {
1744      _skip: false
1745    }
1746  };
1747
1748  function getAltAxis(axis) {
1749    return axis === 'x' ? 'y' : 'x';
1750  }
1751
1752  function within(min$1, value, max$1) {
1753    return max(min$1, min(value, max$1));
1754  }
1755  function withinMaxClamp(min, value, max) {
1756    var v = within(min, value, max);
1757    return v > max ? max : v;
1758  }
1759
1760  function preventOverflow(_ref) {
1761    var state = _ref.state,
1762        options = _ref.options,
1763        name = _ref.name;
1764    var _options$mainAxis = options.mainAxis,
1765        checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
1766        _options$altAxis = options.altAxis,
1767        checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,
1768        boundary = options.boundary,
1769        rootBoundary = options.rootBoundary,
1770        altBoundary = options.altBoundary,
1771        padding = options.padding,
1772        _options$tether = options.tether,
1773        tether = _options$tether === void 0 ? true : _options$tether,
1774        _options$tetherOffset = options.tetherOffset,
1775        tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;
1776    var overflow = detectOverflow(state, {
1777      boundary: boundary,
1778      rootBoundary: rootBoundary,
1779      padding: padding,
1780      altBoundary: altBoundary
1781    });
1782    var basePlacement = getBasePlacement(state.placement);
1783    var variation = getVariation(state.placement);
1784    var isBasePlacement = !variation;
1785    var mainAxis = getMainAxisFromPlacement(basePlacement);
1786    var altAxis = getAltAxis(mainAxis);
1787    var popperOffsets = state.modifiersData.popperOffsets;
1788    var referenceRect = state.rects.reference;
1789    var popperRect = state.rects.popper;
1790    var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
1791      placement: state.placement
1792    })) : tetherOffset;
1793    var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {
1794      mainAxis: tetherOffsetValue,
1795      altAxis: tetherOffsetValue
1796    } : Object.assign({
1797      mainAxis: 0,
1798      altAxis: 0
1799    }, tetherOffsetValue);
1800    var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
1801    var data = {
1802      x: 0,
1803      y: 0
1804    };
1805
1806    if (!popperOffsets) {
1807      return;
1808    }
1809
1810    if (checkMainAxis) {
1811      var _offsetModifierState$;
1812
1813      var mainSide = mainAxis === 'y' ? top : left;
1814      var altSide = mainAxis === 'y' ? bottom : right;
1815      var len = mainAxis === 'y' ? 'height' : 'width';
1816      var offset = popperOffsets[mainAxis];
1817      var min$1 = offset + overflow[mainSide];
1818      var max$1 = offset - overflow[altSide];
1819      var additive = tether ? -popperRect[len] / 2 : 0;
1820      var minLen = variation === start ? referenceRect[len] : popperRect[len];
1821      var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
1822      // outside the reference bounds
1823
1824      var arrowElement = state.elements.arrow;
1825      var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {
1826        width: 0,
1827        height: 0
1828      };
1829      var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();
1830      var arrowPaddingMin = arrowPaddingObject[mainSide];
1831      var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want
1832      // to include its full size in the calculation. If the reference is small
1833      // and near the edge of a boundary, the popper can overflow even if the
1834      // reference is not overflowing as well (e.g. virtual elements with no
1835      // width or height)
1836
1837      var arrowLen = within(0, referenceRect[len], arrowRect[len]);
1838      var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
1839      var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
1840      var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
1841      var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
1842      var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
1843      var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;
1844      var tetherMax = offset + maxOffset - offsetModifierValue;
1845      var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
1846      popperOffsets[mainAxis] = preventedOffset;
1847      data[mainAxis] = preventedOffset - offset;
1848    }
1849
1850    if (checkAltAxis) {
1851      var _offsetModifierState$2;
1852
1853      var _mainSide = mainAxis === 'x' ? top : left;
1854
1855      var _altSide = mainAxis === 'x' ? bottom : right;
1856
1857      var _offset = popperOffsets[altAxis];
1858
1859      var _len = altAxis === 'y' ? 'height' : 'width';
1860
1861      var _min = _offset + overflow[_mainSide];
1862
1863      var _max = _offset - overflow[_altSide];
1864
1865      var isOriginSide = [top, left].indexOf(basePlacement) !== -1;
1866
1867      var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
1868
1869      var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
1870
1871      var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
1872
1873      var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
1874
1875      popperOffsets[altAxis] = _preventedOffset;
1876      data[altAxis] = _preventedOffset - _offset;
1877    }
1878
1879    state.modifiersData[name] = data;
1880  } // eslint-disable-next-line import/no-unused-modules
1881
1882
1883  var preventOverflow$1 = {
1884    name: 'preventOverflow',
1885    enabled: true,
1886    phase: 'main',
1887    fn: preventOverflow,
1888    requiresIfExists: ['offset']
1889  };
1890
1891  var toPaddingObject = function toPaddingObject(padding, state) {
1892    padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {
1893      placement: state.placement
1894    })) : padding;
1895    return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
1896  };
1897
1898  function arrow(_ref) {
1899    var _state$modifiersData$;
1900
1901    var state = _ref.state,
1902        name = _ref.name,
1903        options = _ref.options;
1904    var arrowElement = state.elements.arrow;
1905    var popperOffsets = state.modifiersData.popperOffsets;
1906    var basePlacement = getBasePlacement(state.placement);
1907    var axis = getMainAxisFromPlacement(basePlacement);
1908    var isVertical = [left, right].indexOf(basePlacement) >= 0;
1909    var len = isVertical ? 'height' : 'width';
1910
1911    if (!arrowElement || !popperOffsets) {
1912      return;
1913    }
1914
1915    var paddingObject = toPaddingObject(options.padding, state);
1916    var arrowRect = getLayoutRect(arrowElement);
1917    var minProp = axis === 'y' ? top : left;
1918    var maxProp = axis === 'y' ? bottom : right;
1919    var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];
1920    var startDiff = popperOffsets[axis] - state.rects.reference[axis];
1921    var arrowOffsetParent = getOffsetParent(arrowElement);
1922    var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
1923    var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is
1924    // outside of the popper bounds
1925
1926    var min = paddingObject[minProp];
1927    var max = clientSize - arrowRect[len] - paddingObject[maxProp];
1928    var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;
1929    var offset = within(min, center, max); // Prevents breaking syntax highlighting...
1930
1931    var axisProp = axis;
1932    state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);
1933  }
1934
1935  function effect(_ref2) {
1936    var state = _ref2.state,
1937        options = _ref2.options;
1938    var _options$element = options.element,
1939        arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;
1940
1941    if (arrowElement == null) {
1942      return;
1943    } // CSS selector
1944
1945
1946    if (typeof arrowElement === 'string') {
1947      arrowElement = state.elements.popper.querySelector(arrowElement);
1948
1949      if (!arrowElement) {
1950        return;
1951      }
1952    }
1953
1954    if (!contains(state.elements.popper, arrowElement)) {
1955      return;
1956    }
1957
1958    state.elements.arrow = arrowElement;
1959  } // eslint-disable-next-line import/no-unused-modules
1960
1961
1962  var arrow$1 = {
1963    name: 'arrow',
1964    enabled: true,
1965    phase: 'main',
1966    fn: arrow,
1967    effect: effect,
1968    requires: ['popperOffsets'],
1969    requiresIfExists: ['preventOverflow']
1970  };
1971
1972  function getSideOffsets(overflow, rect, preventedOffsets) {
1973    if (preventedOffsets === void 0) {
1974      preventedOffsets = {
1975        x: 0,
1976        y: 0
1977      };
1978    }
1979
1980    return {
1981      top: overflow.top - rect.height - preventedOffsets.y,
1982      right: overflow.right - rect.width + preventedOffsets.x,
1983      bottom: overflow.bottom - rect.height + preventedOffsets.y,
1984      left: overflow.left - rect.width - preventedOffsets.x
1985    };
1986  }
1987
1988  function isAnySideFullyClipped(overflow) {
1989    return [top, right, bottom, left].some(function (side) {
1990      return overflow[side] >= 0;
1991    });
1992  }
1993
1994  function hide(_ref) {
1995    var state = _ref.state,
1996        name = _ref.name;
1997    var referenceRect = state.rects.reference;
1998    var popperRect = state.rects.popper;
1999    var preventedOffsets = state.modifiersData.preventOverflow;
2000    var referenceOverflow = detectOverflow(state, {
2001      elementContext: 'reference'
2002    });
2003    var popperAltOverflow = detectOverflow(state, {
2004      altBoundary: true
2005    });
2006    var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);
2007    var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);
2008    var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);
2009    var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);
2010    state.modifiersData[name] = {
2011      referenceClippingOffsets: referenceClippingOffsets,
2012      popperEscapeOffsets: popperEscapeOffsets,
2013      isReferenceHidden: isReferenceHidden,
2014      hasPopperEscaped: hasPopperEscaped
2015    };
2016    state.attributes.popper = Object.assign({}, state.attributes.popper, {
2017      'data-popper-reference-hidden': isReferenceHidden,
2018      'data-popper-escaped': hasPopperEscaped
2019    });
2020  } // eslint-disable-next-line import/no-unused-modules
2021
2022
2023  var hide$1 = {
2024    name: 'hide',
2025    enabled: true,
2026    phase: 'main',
2027    requiresIfExists: ['preventOverflow'],
2028    fn: hide
2029  };
2030
2031  var defaultModifiers$1 = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1];
2032  var createPopper$1 = /*#__PURE__*/popperGenerator({
2033    defaultModifiers: defaultModifiers$1
2034  }); // eslint-disable-next-line import/no-unused-modules
2035
2036  var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1];
2037  var createPopper = /*#__PURE__*/popperGenerator({
2038    defaultModifiers: defaultModifiers
2039  }); // eslint-disable-next-line import/no-unused-modules
2040
2041  exports.applyStyles = applyStyles$1;
2042  exports.arrow = arrow$1;
2043  exports.computeStyles = computeStyles$1;
2044  exports.createPopper = createPopper;
2045  exports.createPopperLite = createPopper$1;
2046  exports.defaultModifiers = defaultModifiers;
2047  exports.detectOverflow = detectOverflow;
2048  exports.eventListeners = eventListeners;
2049  exports.flip = flip$1;
2050  exports.hide = hide$1;
2051  exports.offset = offset$1;
2052  exports.popperGenerator = popperGenerator;
2053  exports.popperOffsets = popperOffsets$1;
2054  exports.preventOverflow = preventOverflow$1;
2055
2056  Object.defineProperty(exports, '__esModule', { value: true });
2057
2058})));
2059//# sourceMappingURL=popper.js.map
2060/*! jQuery UI 
2061* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
2062* Copyright jQuery Foundation and other contributors; Licensed MIT */
2063
2064!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(V){"use strict";V.ui=V.ui||{};V.ui.version="1.13.2";var n,i=0,a=Array.prototype.hasOwnProperty,r=Array.prototype.slice;
vendor: 5,697 bytes, line 2064
2064V.cleanData=(n=V.cleanData,function(t){for(var e,i,s=0;null!=(i=t[s]);s++)(e=V._data(i,"events"))&&e.remove&&V(i).triggerHandler("remove");n(t)}),V.widget=function(t,i,e){var s,n,o,a={},r=t.split(".")[0],l=r+"-"+(t=t.split(".")[1]);return e||(e=i,i=V.Widget),Array.isArray(e)&&(e=V.extend.apply(null,[{}].concat(e))),V.expr.pseudos[l.toLowerCase()]=function(t){return!!V.data(t,l)},V[r]=V[r]||{},s=V[r][t],n=V[r][t]=function(t,e){if(!this||!this._createWidget)return new n(t,e);arguments.length&&this._createWidget(t,e)},V.extend(n,s,{version:e.version,_proto:V.extend({},e),_childConstructors:[]}),(o=new i).options=V.widget.extend({},o.options),V.each(e,function(e,s){function n(){return i.prototype[e].apply(this,arguments)}function o(t){return i.prototype[e].apply(this,t)}a[e]="function"==typeof s?function(){var t,e=this._super,i=this._superApply;return this._super=n,this._superApply=o,t=s.apply(this,arguments),this._super=e,this._superApply=i,t}:s}),n.prototype=V.widget.extend(o,{widgetEventPrefix:s&&o.widgetEventPrefix||t},a,{constructor:n,namespace:r,widgetName:t,widgetFullName:l}),s?(V.each(s._childConstructors,function(t,e){var i=e.prototype;V.widget(i.namespace+"."+i.widgetName,n,e._proto)}),delete s._childConstructors):i._childConstructors.push(n),V.widget.bridge(t,n),n},V.widget.extend=function(t){for(var e,i,s=r.call(arguments,1),n=0,o=s.length;n<o;n++)for(e in s[n])i=s[n][e],a.call(s[n],e)&&void 0!==i&&(V.isPlainObject(i)?t[e]=V.isPlainObject(t[e])?V.widget.extend({},t[e],i):V.widget.extend({},i):t[e]=i);return t},V.widget.bridge=function(o,e){var a=e.prototype.widgetFullName||o;V.fn[o]=function(i){var t="string"==typeof i,s=r.call(arguments,1),n=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=V.data(this,a);return"instance"===i?(n=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?V.error("no such method '"+i+"' for "+o+" widget instance"):(t=e[i].apply(e,s))!==e&&void 0!==t?(n=t&&t.jquery?n.pushStack(t.get()):t,!1):void 0:V.error("cannot call methods on "+o+" prior to initialization; attempted to call method '"+i+"'")}):n=void 0:(s.length&&(i=V.widget.extend.apply(null,[i].concat(s))),this.each(function(){var t=V.data(this,a);t?(t.option(i||{}),t._init&&t._init()):V.data(this,a,new e(i,this))})),n}},V.Widget=function(){},V.Widget._childConstructors=[],V.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=V(e||this.defaultElement||this)[0],this.element=V(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=V(),this.hoverable=V(),this.focusable=V(),this.classesElementLookup={},e!==this&&(V.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=V(e.style?e.ownerDocument:e.document||e),this.window=V(this.document[0].defaultView||this.document[0].parentWindow)),this.options=V.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:V.noop,_create:V.noop,_init:V.noop,destroy:function(){var i=this;this._destroy(),V.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:V.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return V.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=V.widget.extend({},this.options[t]),n=0;n<i.length-1;n++)s[i[n]]=s[i[n]]||{},s=s[i[n]];if(t=i.pop(),1===arguments.length)return void 0===s[t]?null:s[t];s[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=e}return this._setOptions(o),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,s;for(e in t)s=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&s&&s.length&&(i=V(s.get()),this._removeClass(s,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(n){var o=[],a=this;function t(t,e){for(var i,s=0;s<t.length;s++)i=a.classesElementLookup[t[s]]||V(),i=n.add?(function(){var i=[];n.element.each(function(t,e){V.map(a.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||i.push(e)}),a._on(V(i),{remove:"_untrackClassesElement"})}(),V(V.uniqueSort(i.get().concat(n.element.get())))):V(i.not(n.element).get()),a.classesElementLookup[t[s]]=i,o.push(t[s]),e&&n.classes[t[s]]&&o.push(n.classes[t[s]])}return(n=V.extend({element:this.element,classes:this.options.classes||{}},n)).keys&&t(n.keys.match(/\S+/g)||[],!0),n.extra&&t(n.extra.match(/\S+/g)||[]),o.join(" ")},_untrackClassesElement:function(i){var s=this;V.each(s.classesElementLookup,function(t,e){-1!==V.inArray(i.target,e)&&(s.classesElementLookup[t]=V(e.not(i.target).get()))}),this._off(V(i.target))}
vendor: 4,936 bytes, line 2064
2064,_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){var n="string"==typeof t||null===t,i={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s="boolean"==typeof s?s:i};return i.element.toggleClass(this._classes(i),s),this},_on:function(n,o,t){var a,r=this;"boolean"!=typeof n&&(t=o,o=n,n=!1),t?(o=a=V(o),this.bindings=this.bindings.add(o)):(t=o,o=this.element,a=this.widget()),V.each(t,function(t,e){function i(){if(n||!0!==r.options.disabled&&!V(this).hasClass("ui-state-disabled"))return("string"==typeof e?r[e]:e).apply(r,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||V.guid++);var s=t.match(/^([\w:-]*)\s*(.*)$/),t=s[1]+r.eventNamespace,s=s[2];s?a.on(t,s,i):o.on(t,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=V(this.bindings.not(t).get()),this.focusable=V(this.focusable.not(t).get()),this.hoverable=V(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(V(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(V(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(V(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(V(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var s,n,o=this.options[t];if(i=i||{},(e=V.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],n=e.originalEvent)for(s in n)s in e||(e[s]=n[s]);return this.element.trigger(e,i),!("function"==typeof o&&!1===o.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},V.each({show:"fadeIn",hide:"fadeOut"},function(o,a){V.Widget.prototype["_"+o]=function(e,t,i){var s,n=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||a:o;"number"==typeof(t=t||{})?t={duration:t}:!0===t&&(t={}),s=!V.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),s&&V.effects&&V.effects.effect[n]?e[o](t):n!==o&&e[n]?e[n](t.duration,t.easing,i):e.queue(function(t){V(this)[o](),i&&i.call(e[0]),t()})}});var s,x,k,o,l,h,c,u,C;V.widget;function D(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function I(t,e){return parseInt(V.css(t,e),10)||0}function T(t){return null!=t&&t===t.window}x=Math.max,k=Math.abs,o=/left|center|right/,l=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,C=V.fn.position,V.position={scrollbarWidth:function(){if(void 0!==s)return s;var t,e=V("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>"),i=e.children()[0];return V("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?V.position.scrollbarWidth():0,height:e?V.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=V(t||window),i=T(e[0]),s=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:s,offset:!i&&!s?V(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},V.fn.position=function(u){if(!u||!u.of)return C.apply(this,arguments);var d,p,f,g,m,t,_="string"==typeof(u=V.extend({},u)).of?V(document).find(u.of):V(u.of),v=V.position.getWithinInfo(u.within),b=V.position.getScrollInfo(v),y=(u.collision||"flip").split(" "),w={},e=9===(t=(e=_)[0]).nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:T(t)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:t.preventDefault?{width:0,height:0,offset:{top:t.pageY,left:t.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()};return _[0].preventDefault&&(u.at="left top"),p=e.width,f=e.height,m=V.extend({},g=e.offset),V.each(["my","at"],function(){var t,e,i=(u[this]||"").split(" ");(i=1===i.length?o.test(i[0])?i.concat(["center"]):l.test(i[0])?["center"].concat(i):["center","center"]:i)[0]=o.test(i[0])?i[0]:"center",i[1]=l.test(i[1])?i[1]:"center",t=h.exec(i[0]),e=h.exec(i[1]),w[this]=[t?t[0]:0,e?e[0]:0],u[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===y.length&&(y[1]=y[0]),"right"===u.at[0]?m.left+=p:"center"===u.at[0]&&(m.left+=p/2),"bottom"===u.at[1]?m.top+=f:"center"===u.at[1]&&(m.top+=f/2),d=D(w.at,p,f),m.left+=d[0],m.to
vendor: 4,447 bytes, line 2064
2064p+=d[1],this.each(function(){var i,t,a=V(this),r=a.outerWidth(),l=a.outerHeight(),e=I(this,"marginLeft"),s=I(this,"marginTop"),n=r+e+I(this,"marginRight")+b.width,o=l+s+I(this,"marginBottom")+b.height,h=V.extend({},m),c=D(w.my,a.outerWidth(),a.outerHeight());"right"===u.my[0]?h.left-=r:"center"===u.my[0]&&(h.left-=r/2),"bottom"===u.my[1]?h.top-=l:"center"===u.my[1]&&(h.top-=l/2),h.left+=c[0],h.top+=c[1],i={marginLeft:e,marginTop:s},V.each(["left","top"],function(t,e){V.ui.position[y[t]]&&V.ui.position[y[t]][e](h,{targetWidth:p,targetHeight:f,elemWidth:r,elemHeight:l,collisionPosition:i,collisionWidth:n,collisionHeight:o,offset:[d[0]+c[0],d[1]+c[1]],my:u.my,at:u.at,within:v,elem:a})}),u.using&&(t=function(t){var e=g.left-h.left,i=e+p-r,s=g.top-h.top,n=s+f-l,o={target:{element:_,left:g.left,top:g.top,width:p,height:f},element:{element:a,left:h.left,top:h.top,width:r,height:l},horizontal:i<0?"left":0<e?"right":"center",vertical:n<0?"top":0<s?"bottom":"middle"};p<r&&k(e+i)<p&&(o.horizontal="center"),f<l&&k(s+n)<f&&(o.vertical="middle"),x(k(e),k(i))>x(k(s),k(n))?o.important="horizontal":o.important="vertical",u.using.call(this,t,o)}),a.offset(V.extend(h,{using:t}))})},V.ui.position={fit:{left:function(t,e){var i=e.within,s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,a=s-o,r=o+e.collisionWidth-n-s;e.collisionWidth>n?0<a&&r<=0?(i=t.left+a+e.collisionWidth-n-s,t.left+=a-i):t.left=!(0<r&&a<=0)&&r<a?s+n-e.collisionWidth:s:0<a?t.left+=a:0<r?t.left-=r:t.left=x(t.left-o,t.left)},top:function(t,e){var i=e.within,s=i.isWindow?i.scrollTop:i.offset.top,n=e.within.height,o=t.top-e.collisionPosition.marginTop,a=s-o,r=o+e.collisionHeight-n-s;e.collisionHeight>n?0<a&&r<=0?(i=t.top+a+e.collisionHeight-n-s,t.top+=a-i):t.top=!(0<r&&a<=0)&&r<a?s+n-e.collisionHeight:s:0<a?t.top+=a:0<r?t.top-=r:t.top=x(t.top-o,t.top)}},flip:{left:function(t,e){var i=e.within,s=i.offset.left+i.scrollLeft,n=i.width,o=i.isWindow?i.scrollLeft:i.offset.left,a=t.left-e.collisionPosition.marginLeft,r=a-o,l=a+e.collisionWidth-n-o,h="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,i="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,a=-2*e.offset[0];r<0?((s=t.left+h+i+a+e.collisionWidth-n-s)<0||s<k(r))&&(t.left+=h+i+a):0<l&&(0<(o=t.left-e.collisionPosition.marginLeft+h+i+a-o)||k(o)<l)&&(t.left+=h+i+a)},top:function(t,e){var i=e.within,s=i.offset.top+i.scrollTop,n=i.height,o=i.isWindow?i.scrollTop:i.offset.top,a=t.top-e.collisionPosition.marginTop,r=a-o,l=a+e.collisionHeight-n-o,h="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,i="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,a=-2*e.offset[1];r<0?((s=t.top+h+i+a+e.collisionHeight-n-s)<0||s<k(r))&&(t.top+=h+i+a):0<l&&(0<(o=t.top-e.collisionPosition.marginTop+h+i+a-o)||k(o)<l)&&(t.top+=h+i+a)}},flipfit:{left:function(){V.ui.position.flip.left.apply(this,arguments),V.ui.position.fit.left.apply(this,arguments)},top:function(){V.ui.position.flip.top.apply(this,arguments),V.ui.position.fit.top.apply(this,arguments)}}};V.ui.position,V.extend(V.expr.pseudos,{data:V.expr.createPseudo?V.expr.createPseudo(function(e){return function(t){return!!V.data(t,e)}}):function(t,e,i){return!!V.data(t,i[3])}}),V.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}});var t,d=V,p={},e=p.toString,f=/^([\-+])=\s*(\d+\.?\d*)/,g=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16),t[4]?(parseInt(t[4],16)/255).toFixed(2):1]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16),t[4]?(parseInt(t[4]+t[4],16)/255).toFixed(2):1]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}
vendor: 5,162 bytes, line 2064
2064],m=d.Color=function(t,e,i,s){return new d.Color.fn.parse(t,e,i,s)},_={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},v={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},b=m.support={},y=d("<p>")[0],w=d.each;function P(t){return null==t?t+"":"object"==typeof t?p[e.call(t)]||"object":typeof t}function M(t,e,i){var s=v[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:Math.min(s.max,Math.max(0,t)))}function S(s){var n=m(),o=n._rgba=[];return s=s.toLowerCase(),w(g,function(t,e){var i=e.re.exec(s),i=i&&e.parse(i),e=e.space||"rgba";if(i)return i=n[e](i),n[_[e].cache]=i[_[e].cache],o=n._rgba=i._rgba,!1}),o.length?("0,0,0,0"===o.join()&&d.extend(o,B.transparent),n):B[s]}function H(t,e,i){return 6*(i=(i+1)%1)<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}y.style.cssText="background-color:rgba(1,1,1,.5)",b.rgba=-1<y.style.backgroundColor.indexOf("rgba"),w(_,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),d.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){p["[object "+e+"]"]=e.toLowerCase()}),(m.fn=d.extend(m.prototype,{parse:function(n,t,e,i){if(void 0===n)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=d(n).css(t),t=void 0);var o=this,s=P(n),a=this._rgba=[];return void 0!==t&&(n=[n,t,e,i],s="array"),"string"===s?this.parse(S(n)||B._default):"array"===s?(w(_.rgba.props,function(t,e){a[e.idx]=M(n[e.idx],e)}),this):"object"===s?(w(_,n instanceof m?function(t,e){n[e.cache]&&(o[e.cache]=n[e.cache].slice())}:function(t,i){var s=i.cache;w(i.props,function(t,e){if(!o[s]&&i.to){if("alpha"===t||null==n[t])return;o[s]=i.to(o._rgba)}o[s][e.idx]=M(n[t],e,!0)}),o[s]&&d.inArray(null,o[s].slice(0,3))<0&&(null==o[s][3]&&(o[s][3]=1),i.from&&(o._rgba=i.from(o[s])))}),this):void 0},is:function(t){var n=m(t),o=!0,a=this;return w(_,function(t,e){var i,s=n[e.cache];return s&&(i=a[e.cache]||e.to&&e.to(a._rgba)||[],w(e.props,function(t,e){if(null!=s[e.idx])return o=s[e.idx]===i[e.idx]})),o}),o},_space:function(){var i=[],s=this;return w(_,function(t,e){s[e.cache]&&i.push(t)}),i.pop()},transition:function(t,a){var e=(h=m(t))._space(),i=_[e],t=0===this.alpha()?m("transparent"):this,r=t[i.cache]||i.to(t._rgba),l=r.slice(),h=h[i.cache];return w(i.props,function(t,e){var i=e.idx,s=r[i],n=h[i],o=v[e.type]||{};null!==n&&(null===s?l[i]=n:(o.mod&&(n-s>o.mod/2?s+=o.mod:s-n>o.mod/2&&(s-=o.mod)),l[i]=M((n-s)*a+s,e)))}),this[e](l)},blend:function(t){if(1===this._rgba[3])return this;var e=this._rgba.slice(),i=e.pop(),s=m(t)._rgba;return m(d.map(e,function(t,e){return(1-i)*s[e]+i*t}))},toRgbaString:function(){var t="rgba(",e=d.map(this._rgba,function(t,e){return null!=t?t:2<e?1:0});return 1===e[3]&&(e.pop(),t="rgb("),t+e.join()+")"},toHslaString:function(){var t="hsla(",e=d.map(this.hsla(),function(t,e){return null==t&&(t=2<e?1:0),t=e&&e<3?Math.round(100*t)+"%":t});return 1===e[3]&&(e.pop(),t="hsl("),t+e.join()+")"},toHexString:function(t){var e=this._rgba.slice(),i=e.pop();return t&&e.push(~~(255*i)),"#"+d.map(e,function(t){return 1===(t=(t||0).toString(16)).length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}})).parse.prototype=m.fn,_.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/255,i=t[1]/255,s=t[2]/255,n=t[3],o=Math.max(e,i,s),a=Math.min(e,i,s),r=o-a,l=o+a,t=.5*l,i=a===o?0:e===o?60*(i-s)/r+360:i===o?60*(s-e)/r+120:60*(e-i)/r+240,l=0==r?0:t<=.5?r/l:r/(2-l);return[Math.round(i)%360,l,t,null==n?1:n]},_.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],t=t[3],i=s<=.5?s*(1+i):s+i-s*i,s=2*s-i;return[Math.round(255*H(s,i,e+1/3)),Math.round(255*H(s,i,e)),Math.round(255*H(s,i,e-1/3)),t]},w(_,function(l,t){var e=t.props,o=t.cache,a=t.to,r=t.from;m.fn[l]=function(t){if(a&&!this[o]&&(this[o]=a(this._rgba)),void 0===t)return this[o].slice();var i=P(t),s="array"===i||"object"===i?t:arguments,n=this[o].slice();return w(e,function(t,e){t=s["object"===i?t:e.idx];null==t&&(t=n[e.idx]),n[e.idx]=M(t,e)}),r?((t=m(r(n)))[o]=n,t):m(n)},w(e,function(a,r){m.fn[a]||(m.fn[a]=function(t){var e,i=P(t),s="alpha"===a?this._hsla?"hsla":"rgba":l,n=this[s](),o=n[r.idx];return"undefined"===i?o:("function"===i&&(i=P(t=t.call(this,o))),null==t&&r.empty?this:("string"===i&&(e=f.exec(t))&&(t=o+parseFloat(e[2])*("+"===e[1]?1:-1)),n[r.idx]=t,this[s](n)))})})}),(m.hook=function(t){t=t.split(" ");w(t,function(t,o){d.cssHooks[o]={set:function(t,e){var i,s,n="";if("transparent"!==e&&("string"!==P(e)||(i=S(e)))){if(e=m(i||e),!b.rgba&&1!==e._rgba[3]){for(s="backgroundColor"===o?t.parentNode:t;(""===n||"transparent"===n)&&s&&s.style;)try{n=d.css(s,"backgroundColor"),s=s.parentNode}catch(t){}e=e.blend(n&&"transparent"!==n?n:"_default")}e=e.toRgbaString()}try{t.style[o]=e}catch(t){}}},d.fx.step[o]=function(t){t.colorInit||(t.start=m(t.elem,o),t.end=m(t.end
vendor: 29,603 bytes, line 2064
2064),t.colorInit=!0),d.cssHooks[o].set(t.elem,t.start.transition(t.end,t.pos))}})})("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),d.cssHooks.borderColor={expand:function(i){var s={};return w(["Top","Right","Bottom","Left"],function(t,e){s["border"+e+"Color"]=i}),s}};var z,A,O,N,E,W,F,L,R,Y,B=d.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"},j="ui-effects-",q="ui-effects-style",K="ui-effects-animated";function U(t){var e,i,s=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,n={};if(s&&s.length&&s[0]&&s[s[0]])for(i=s.length;i--;)"string"==typeof s[e=s[i]]&&(n[e.replace(/-([\da-z])/gi,function(t,e){return e.toUpperCase()})]=s[e]);else for(e in s)"string"==typeof s[e]&&(n[e]=s[e]);return n}function X(t,e,i,s){return t={effect:t=V.isPlainObject(t)?(e=t).effect:t},"function"==typeof(e=null==e?{}:e)&&(s=e,i=null,e={}),"number"!=typeof e&&!V.fx.speeds[e]||(s=i,i=e,e={}),"function"==typeof i&&(s=i,i=null),e&&V.extend(t,e),i=i||e.duration,t.duration=V.fx.off?0:"number"==typeof i?i:i in V.fx.speeds?V.fx.speeds[i]:V.fx.speeds._default,t.complete=s||e.complete,t}function $(t){return!t||"number"==typeof t||V.fx.speeds[t]||("string"==typeof t&&!V.effects.effect[t]||("function"==typeof t||"object"==typeof t&&!t.effect))}function G(t,e){var i=e.outerWidth(),e=e.outerHeight(),t=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(t)||["",0,i,e,0];return{top:parseFloat(t[1])||0,right:"auto"===t[2]?i:parseFloat(t[2]),bottom:"auto"===t[3]?e:parseFloat(t[3]),left:parseFloat(t[4])||0}}V.effects={effect:{}},N=["add","remove","toggle"],E={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1},V.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,e){V.fx.step[e]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(d.style(t.elem,e,t.end),t.setAttr=!0)}}),V.fn.addBack||(V.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),V.effects.animateClass=function(n,t,e,i){var o=V.speed(t,e,i);return this.queue(function(){var i=V(this),t=i.attr("class")||"",e=(e=o.children?i.find("*").addBack():i).map(function(){return{el:V(this),start:U(this)}}),s=function(){V.each(N,function(t,e){n[e]&&i[e+"Class"](n[e])})};s(),e=e.map(function(){return this.end=U(this.el[0]),this.diff=function(t,e){var i,s,n={};for(i in e)s=e[i],t[i]!==s&&(E[i]||!V.fx.step[i]&&isNaN(parseFloat(s))||(n[i]=s));return n}(this.start,this.end),this}),i.attr("class",t),e=e.map(function(){var t=this,e=V.Deferred(),i=V.extend({},o,{queue:!1,complete:function(){e.resolve(t)}});return this.el.animate(this.diff,i),e.promise()}),V.when.apply(V,e.get()).done(function(){s(),V.each(arguments,function(){var e=this.el;V.each(this.diff,function(t){e.css(t,"")})}),o.complete.call(i[0])})})},V.fn.extend({addClass:(O=V.fn.addClass,function(t,e,i,s){return e?V.effects.animateClass.call(this,{add:t},e,i,s):O.apply(this,arguments)}),removeClass:(A=V.fn.removeClass,function(t,e,i,s){return 1<arguments.length?V.effects.animateClass.call(this,{remove:t},e,i,s):A.apply(this,arguments)}),toggleClass:(z=V.fn.toggleClass,function(t,e,i,s,n){return"boolean"==typeof e||void 0===e?i?V.effects.animateClass.call(this,e?{add:t}:{remove:t},i,s,n):z.apply(this,arguments):V.effects.animateClass.call(this,{toggle:t},e,i,s)}),switchClass:function(t,e,i,s,n){return V.effects.animateClass.call(this,{add:e,remove:t},i,s,n)}}),V.expr&&V.expr.pseudos&&V.expr.pseudos.animated&&(V.expr.pseudos.animated=(W=V.expr.pseudos.animated,function(t){return!!V(t).data(K)||W(t)})),!1!==V.uiBackCompat&&V.extend(V.effects,{save:function(t,e){for(var i=0,s=e.length;i<s;i++)null!==e[i]&&t.data(j+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,n=e.length;s<n;s++)null!==e[s]&&(i=t.data(j+e[s]),t.css(e[s],i))},setMode:function(t,e){return e="toggle"===e?t.is(":hidden")?"show":"hide":e},createWrapper:function(i){if(i.parent().is(".ui-effects-wrapper"))return i.parent();var s={width:i.outerWidth(!0),height:i.outerHeight(!0),float:i.css("float")},t=V("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:i.width(),height:i.height()},n=document.activeElement;try{n.id}catch(t){n=document.body}return i.wrap(t),i[0]!==n&&!V.contains(i[0],n)||V(n).trigger("focus"),t=i.parent(),"static"===i.css("position")?(t.css({position:"relative"}),i.css({position:"relative"})):(V.extend(s,{position:i.css("position"),zIndex:i.css("z-index")}),V.each(["top","left","bottom","right"],function(t,e){s[e]=i.css(e),isNaN(parseInt(s[e],10))&&(s[e]="auto")}),i.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),i.css(e),t.css(s).show()},removeWrapper:function(t){var e=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),t[0]!==e&&!V.contains(t[0],e)||V(e).trigger("focus")),t}}),V.extend(V.effects,{version:"1.13.2",define:function(t,e,i){return i||(i=e,e="effect"),V.effects.effect[t]=i,V.effects.effect[t].mode=e,i},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var s="horizontal"!==i?(e||100)/100:1,e="vertical"!==i?(e||100)/100:1;return{height:t.height()*e,width:t.width()*s,outerHeight:t.outerHeight()*e,outerWidth:t.outerWidth()*s}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();1<e&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(q,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(q)||"",t.removeData(q)},mode:function(t,e){t=t.is(":hidden");return"toggle"===e&&(e=t?"show":"hide"),e=(t?"hide"===e:"show"===e)?"none":e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(t){var e,i=t.css("position"),s=t.position();return t.css({marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()),/^(static|relative)/.test(i)&&(i="absolute",e=V("<"+t[0].nodeName+">").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data(j+"placeholder",e)),t.css({position:i,left:s.left,top:s.top}),e},removePlaceholder:function(t){var e=j+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(t){V.effects.restoreStyle(t),V.effects.removePlaceholder(t)},setTransition:function(s,t,n,o){return o=o||{},V.each(t,function(t,e){var i=s.cssUnit(e);0<i[0]&&(o[e]=i[0]*n+i[1])}),o}}),V.fn.extend({effect:function(){function t(t){var e=V(this),i=V.effects.mode(e,r)||o;e.data(K,!0),l.push(i),o&&("show"===i||i===o&&"hide"===i)&&e.show(),o&&"none"===i||V.effects.saveStyle(e),"function"==typeof t&&t()}var s=X.apply(this,arguments),n=V.effects.effect[s.effect],o=n.mode,e=s.queue,i=e||"fx",a=s.complete,r=s.mode,l=[];return V.fx.off||!n?r?this[r](s.duration,a):this.each(function(){a&&a.call(this)}):!1===e?this.each(t).each(h):this.queue(i,t).queue(i,h);function h(t){var e=V(this);function i(){"function"==typeof a&&a.call(e[0]),"function"==typeof t&&t()}s.mode=l.shift(),!1===V.uiBackCompat||o?"none"===s.mode?(e[r](),i()):n.call(e[0],s,function(){e.removeData(K),V.effects.cleanUp(e),"hide"===s.mode&&e.hide(),i()}):(e.is(":hidden")?"hide"===r:"show"===r)?(e[r](),i()):n.call(e[0],s,i)}},show:(R=V.fn.show,function(t){if($(t))return R.apply(this,arguments);t=X.apply(this,arguments);return t.mode="show",this.effect.call(this,t)}),hide:(L=V.fn.hide,function(t){if($(t))return L.apply(this,arguments);t=X.apply(this,arguments);return t.mode="hide",this.effect.call(this,t)}),toggle:(F=V.fn.toggle,function(t){if($(t)||"boolean"==typeof t)return F.apply(this,arguments);t=X.apply(this,arguments);return t.mode="toggle",this.effect.call(this,t)}),cssUnit:function(t){var i=this.css(t),s=[];return V.each(["em","px","%","pt"],function(t,e){0<i.indexOf(e)&&(s=[parseFloat(i),e])}),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):G(this.css("clip"),this)},transfer:function(t,e){var i=V(this),s=V(t.to),n="fixed"===s.css("position"),o=V("body"),a=n?o.scrollTop():0,r=n?o.scrollLeft():0,o=s.offset(),o={top:o.top-a,left:o.left-r,height:s.innerHeight(),width:s.innerWidth()},s=i.offset(),l=V("<div class='ui-effects-transfer'></div>");l.appendTo("body").addClass(t.className).css({top:s.top-a,left:s.left-r,height:i.innerHeight(),width:i.innerWidth(),position:n?"fixed":"absolute"}).animate(o,t.duration,t.easing,function(){l.remove(),"function"==typeof e&&e()})}}),V.fx.step.clip=function(t){t.clipInit||(t.start=V(t.elem).cssClip(),"string"==typeof t.end&&(t.end=G(t.end,t.elem)),t.clipInit=!0),V(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})},Y={},V.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,t){Y[t]=function(t){return Math.pow(t,e+2)}}),V.extend(Y,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),V.each(Y,function(t,e){V.easing["easeIn"+t]=e,V.easing["easeOut"+t]=function(t){return 1-e(1-t)},V.easing["easeInOut"+t]=function(t){return t<.5?e(2*t)/2:1-e(-2*t+2)/2}});y=V.effects,V.effects.define("blind","hide",function(t,e){var i={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},s=V(this),n=t.direction||"up",o=s.cssClip(),a={clip:V.extend({},o)},r=V.effects.createPlaceholder(s);a.clip[i[n][0]]=a.clip[i[n][1]],"show"===t.mode&&(s.cssClip(a.clip),r&&r.css(V.effects.clipToBox(a)),a.clip=o),r&&r.animate(V.effects.clipToBox(a),t.duration,t.easing),s.animate(a,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("bounce",function(t,e){var i,s,n=V(this),o=t.mode,a="hide"===o,r="show"===o,l=t.direction||"up",h=t.distance,c=t.times||5,o=2*c+(r||a?1:0),u=t.duration/o,d=t.easing,p="up"===l||"down"===l?"top":"left",f="up"===l||"left"===l,g=0,t=n.queue().length;for(V.effects.createPlaceholder(n),l=n.css(p),h=h||n["top"==p?"outerHeight":"outerWidth"]()/3,r&&((s={opacity:1})[p]=l,n.css("opacity",0).css(p,f?2*-h:2*h).animate(s,u,d)),a&&(h/=Math.pow(2,c-1)),(s={})[p]=l;g<c;g++)(i={})[p]=(f?"-=":"+=")+h,n.animate(i,u,d).animate(s,u,d),h=a?2*h:h/2;a&&((i={opacity:0})[p]=(f?"-=":"+=")+h,n.animate(i,u,d)),n.queue(e),V.effects.unshift(n,t,1+o)}),V.effects.define("clip","hide",function(t,e){var i={},s=V(this),n=t.direction||"vertical",o="both"===n,a=o||"horizontal"===n,o=o||"vertical"===n,n=s.cssClip();i.clip={top:o?(n.bottom-n.top)/2:n.top,right:a?(n.right-n.left)/2:n.right,bottom:o?(n.bottom-n.top)/2:n.bottom,left:a?(n.right-n.left)/2:n.left},V.effects.createPlaceholder(s),"show"===t.mode&&(s.cssClip(i.clip),i.clip=n),s.animate(i,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("drop","hide",function(t,e){var i=V(this),s="show"===t.mode,n=t.direction||"left",o="up"===n||"down"===n?"top":"left",a="up"===n||"left"===n?"-=":"+=",r="+="==a?"-=":"+=",l={opacity:0};V.effects.createPlaceholder(i),n=t.distance||i["top"==o?"outerHeight":"outerWidth"](!0)/2,l[o]=a+n,s&&(i.css(l),l[o]=r+n,l.opacity=1),i.animate(l,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("explode","hide",function(t,e){var i,s,n,o,a,r,l=t.pieces?Math.round(Math.sqrt(t.pieces)):3,h=l,c=V(this),u="show"===t.mode,d=c.show().css("visibility","hidden").offset(),p=Math.ceil(c.outerWidth()/h),f=Math.ceil(c.outerHeight()/l),g=[];function m(){g.push(this),g.length===l*h&&(c.css({visibility:"visible"}),V(g).remove(),e())}for(i=0;i<l;i++)for(o=d.top+i*f,r=i-(l-1)/2,s=0;s<h;s++)n=d.left+s*p,a=s-(h-1)/2,c.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-s*p,top:-i*f}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:p,height:f,left:n+(u?a*p:0),top:o+(u?r*f:0),opacity:u?0:1}).animate({left:n+(u?0:a*p),top:o+(u?0:r*f),opacity:u?1:0},t.duration||500,t.easing,m)}),V.effects.define("fade","toggle",function(t,e){var i="show"===t.mode;V(this).css("opacity",i?0:1).animate({opacity:i?1:0},{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("fold","hide",function(e,t){var i=V(this),s=e.mode,n="show"===s,o="hide"===s,a=e.size||15,r=/([0-9]+)%/.exec(a),l=!!e.horizFirst?["right","bottom"]:["bottom","right"],h=e.duration/2,c=V.effects.createPlaceholder(i),u=i.cssClip(),d={clip:V.extend({},u)},p={clip:V.extend({},u)},f=[u[l[0]],u[l[1]]],s=i.queue().length;r&&(a=parseInt(r[1],10)/100*f[o?0:1]),d.clip[l[0]]=a,p.clip[l[0]]=a,p.clip[l[1]]=0,n&&(i.cssClip(p.clip),c&&c.css(V.effects.clipToBox(p)),p.clip=u),i.queue(function(t){c&&c.animate(V.effects.clipToBox(d),h,e.easing).animate(V.effects.clipToBox(p),h,e.easing),t()}).animate(d,h,e.easing).animate(p,h,e.easing).queue(t),V.effects.unshift(i,s,4)}),V.effects.define("highlight","show",function(t,e){var i=V(this),s={backgroundColor:i.css("backgroundColor")};"hide"===t.mode&&(s.opacity=0),V.effects.saveStyle(i),i.css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(s,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("size",function(s,e){var n,i=V(this),t=["fontSize"],o=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],a=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],r=s.mode,l="effect"!==r,h=s.scale||"both",c=s.origin||["middle","center"],u=i.css("position"),d=i.position(),p=V.effects.scaledDimensions(i),f=s.from||p,g=s.to||V.effects.scaledDimensions(i,0);V.effects.createPlaceholder(i),"show"===r&&(r=f,f=g,g=r),n={from:{y:f.height/p.height,x:f.width/p.width},to:{y:g.height/p.height,x:g.width/p.width}},"box"!==h&&"both"!==h||(n.from.y!==n.to.y&&(f=V.effects.setTransition(i,o,n.from.y,f),g=V.effects.setTransition(i,o,n.to.y,g)),n.from.x!==n.to.x&&(f=V.effects.setTransition(i,a,n.from.x,f),g=V.effects.setTransition(i,a,n.to.x,g))),"content"!==h&&"both"!==h||n.from.y!==n.to.y&&(f=V.effects.setTransition(i,t,n.from.y,f),g=V.effects.setTransition(i,t,n.to.y,g)),c&&(c=V.effects.getBaseline(c,p),f.top=(p.outerHeight-f.outerHeight)*c.y+d.top,f.left=(p.outerWidth-f.outerWidth)*c.x+d.left,g.top=(p.outerHeight-g.outerHeight)*c.y+d.top,g.left=(p.outerWidth-g.outerWidth)*c.x+d.left),delete f.outerHeight,delete f.outerWidth,i.css(f),"content"!==h&&"both"!==h||(o=o.concat(["marginTop","marginBottom"]).concat(t),a=a.concat(["marginLeft","marginRight"]),i.find("*[width]").each(function(){var t=V(this),e=V.effects.scaledDimensions(t),i={height:e.height*n.from.y,width:e.width*n.from.x,outerHeight:e.outerHeight*n.from.y,outerWidth:e.outerWidth*n.from.x},e={height:e.height*n.to.y,width:e.width*n.to.x,outerHeight:e.height*n.to.y,outerWidth:e.width*n.to.x};n.from.y!==n.to.y&&(i=V.effects.setTransition(t,o,n.from.y,i),e=V.effects.setTransition(t,o,n.to.y,e)),n.from.x!==n.to.x&&(i=V.effects.setTransition(t,a,n.from.x,i),e=V.effects.setTransition(t,a,n.to.x,e)),l&&V.effects.saveStyle(t),t.css(i),t.animate(e,s.duration,s.easing,function(){l&&V.effects.restoreStyle(t)})})),i.animate(g,{queue:!1,duration:s.duration,easing:s.easing,complete:function(){var t=i.offset();0===g.opacity&&i.css("opacity",f.opacity),l||(i.css("position","static"===u?"relative":u).offset(t),V.effects.saveStyle(i)),e()}})}),V.effects.define("scale",function(t,e){var i=V(this),s=t.mode,s=parseInt(t.percent,10)||(0===parseInt(t.percent,10)||"effect"!==s?0:100),s=V.extend(!0,{from:V.effects.scaledDimensions(i),to:V.effects.scaledDimensions(i,s,t.direction||"both"),origin:t.origin||["middle","center"]},t);t.fade&&(s.from.opacity=1,s.to.opacity=0),V.effects.effect.size.call(this,s,e)}),V.effects.define("puff","hide",function(t,e){t=V.extend(!0,{},t,{fade:!0,percent:parseInt(t.percent,10)||150});V.effects.effect.scale.call(this,t,e)}),V.effects.define("pulsate","show",function(t,e){var i=V(this),s=t.mode,n="show"===s,o=2*(t.times||5)+(n||"hide"===s?1:0),a=t.duration/o,r=0,l=1,s=i.queue().length;for(!n&&i.is(":visible")||(i.css("opacity",0).show(),r=1);l<o;l++)i.animate({opacity:r},a,t.easing),r=1-r;i.animate({opacity:r},a,t.easing),i.queue(e),V.effects.unshift(i,s,1+o)}),V.effects.define("shake",function(t,e){var i=1,s=V(this),n=t.direction||"left",o=t.distance||20,a=t.times||3,r=2*a+1,l=Math.round(t.duration/r),h="up"===n||"down"===n?"top":"left",c="up"===n||"left"===n,u={},d={},p={},n=s.queue().length;for(V.effects.createPlaceholder(s),u[h]=(c?"-=":"+=")+o,d[h]=(c?"+=":"-=")+2*o,p[h]=(c?"-=":"+=")+2*o,s.animate(u,l,t.easing);i<a;i++)s.animate(d,l,t.easing).animate(p,l,t.easing);s.animate(d,l,t.easing).animate(u,l/2,t.easing).queue(e),V.effects.unshift(s,n,1+r)}),V.effects.define("slide","show",function(t,e){var i,s,n=V(this),o={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},a=t.mode,r=t.direction||"left",l="up"===r||"down"===r?"top":"left",h="up"===r||"left"===r,c=t.distance||n["top"==l?"outerHeight":"outerWidth"](!0),u={};V.effects.createPlaceholder(n),i=n.cssClip(),s=n.position()[l],u[l]=(h?-1:1)*c+s,u.clip=n.cssClip(),u.clip[o[r][1]]=u.clip[o[r][0]],"show"===a&&(n.cssClip(u.clip),n.css(l,u[l]),u.clip=i,u[l]=s),n.animate(u,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),y=!1!==V.uiBackCompat?V.effects.define("transfer",function(t,e){V(this).transfer(t,e)}):y;V.ui.focusable=function(t,e){var i,s,n,o,a=t.nodeName.toLowerCase();return"area"===a?(s=(i=t.parentNode).name,!(!t.href||!s||"map"!==i.nodeName.toLowerCase())&&(0<(s=V("img[usemap='#"+s+"']")).length&&s.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(a)?(n=!t.disabled)&&(o=V(t).closest("fieldset")[0])&&(n=!o.disabled):n="a"===a&&t.href||e,n&&V(t).is(":visible")&&function(t){var e=t.css("visibility");for(;"inherit"===e;)t=t.parent(),e=t.css("visibility");return"visible"===e}(V(t)))},V.extend(V.expr.pseudos,{focusable:function(t){return V.ui.focusable(t,null!=V.attr(t,"tabindex"))}});var Q,J;V.ui.focusable,V.fn._form=function(){return"string"==typeof this[0].form?this.closest("form"):V(this[0].form)},V.ui.formResetMixin={_formResetHandler:function(){var e=V(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");V.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){var t;this.form=this.element._form(),this.form.length&&((t=this.form.data("ui-form-reset-instances")||[]).length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t))},_unbindFormResetHandler:function(){var t;this.form.length&&((t=this.form.data("ui-form-reset-instances")).splice(V.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"))}};V.expr.pseudos||(V.expr.pseudos=V.expr[":"]),V.uniqueSort||(V.uniqueSort=V.unique),V.escapeSelector||(Q=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,J=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},V.escapeSelector=function(t){return(t+"").replace(Q,J)}),V.fn.even&&V.fn.odd||V.fn.extend({even:function(){return this.filter(function(t){return t%2==0})},odd:function(){return this.filter(function(t){return t%2==1})}});var Z;V.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},V.fn.labels=function(){var t,e,i;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(e=this.eq(0).parents("label"),(t=this.attr("id"))&&(i=(i=this.eq(0).parents().last()).add((i.length?i:this).siblings()),t="label[for='"+V.escapeSelector(t)+"']",e=e.add(i.find(t).addBack(t))),this.pushStack(e)):this.pushStack([])},V.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,s=t?/(auto|scroll|hidden)/:/(auto|scroll)/,t=this.parents().filter(function(){var t=V(this);return(!i||"static"!==t.css("position"))&&s.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&t.length?t:V(this[0].ownerDocument||document)},V.extend(V.expr.pseudos,{tabbable:function(t){var e=V.attr(t,"tabindex"),i=null!=e;return(!i||0<=e)&&V.ui.focusable(t,i)}}),V.fn.extend({uniqueId:(Z=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++Z)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&V(this).removeAttr("id")})}}),V.widget("ui.accordion",{version:"1.13.2",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:function(t){return t.find("> li > :first-child").add(t.find("> :not(li)").even())},heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=V(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),t.collapsible||!1!==t.active&&null!=t.active||(t.active=0),this._processPanels(),t.active<0&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():V()}},_createIcons:function(){var t,e=this.options.icons;e&&(t=V("<span>"),this._addClass(t,"ui-accordion-header-icon","ui-icon "+e.header),t.prependTo(this.headers),t=this.active.children(".ui-accordion-header-icon"),this._removeClass(t,e.header)._addClass(t,null,e.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){"active"!==t?("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||!1!==this.options.active||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons())):this._activate(e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var e=V.ui.keyCode,i=this.headers.length,s=this.headers.index(t.target),n=!1;switch(t.keyCode){case e.RIGHT:case e.DOWN:n=this.headers[(s+1)%i];break;case e.LEFT:case e.UP:n=this.headers[(s-1+i)%i];break;case e.SPACE:case e.ENTER:this._eventHandler(t);break;case e.HOME:n=this.headers[0];break;case e.END:n=this.headers[i-1]}n&&(V(t.target).attr("tabIndex",-1),V(n).attr("tabIndex",0),V(n).trigger("focus"),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===V.ui.keyCode.UP&&t.ctrlKey&&V(t.currentTarget).prev().trigger("focus")},refresh:function(){var t=this.options;this._processPanels(),!1===t.active&&!0===t.collapsible||!this.headers.length?(t.active=!1,this.active=V()):!1===t.active?this._activate(0):this.active.length&&!V.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=V()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;"function"==typeof this.options.header?this.headers=this.options.header(this.element):this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var i,t=this.options,e=t.heightStyle,s=this.element.parent();this.active=this._findActive(t.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var t=V(this),e=t.uniqueId().attr("id"),i=t.next(),s=i.uniqueId().attr("id");t.attr("aria-controls",s),i.attr("aria-labelledby",e)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(t.event),"fill"===e?(i=s.height(),this.element.siblings(":visible").each(function(){var t=V(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.headers.each(function(){i-=V(this).outerHeight(!0)}),this.headers.next().each(function(){V(this).height(Math.max(0,i-V(this).innerHeight()+V(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.headers.next().each(function(){var t=V(this).is(":visible");t||V(this).show(),i=Math.max(i,V(this).css("height","").height()),t||V(this).hide()}).height(i))},_activate:function(t){t=this._findActive(t)[0];t!==this.active[0]&&(t=t||this.active[0],this._eventHandler({target:t,currentTarget:t,preventDefault:V.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):V()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&V.each(t.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var e=this.options,i=this.active,s=V(t.currentTarget),n=s[0]===i[0],o=n&&e.collapsible,a=o?V():s.next(),r=i.next(),a={oldHeader:i,oldPanel:r,newHeader:o?V():s,newPanel:a};t.preventDefault(),n&&!e.collapsible||!1===this._trigger("beforeActivate",t,a)||(e.active=!o&&this.headers.index(s),this.active=n?V():s,this._toggle(a),this._removeClass(i,"ui-accordion-header-active","ui-state-active"),e.icons&&(i=i.children(".ui-accordion-header-icon"),this._removeClass(i,null,e.icons.activeHeader)._addClass(i,null,e.icons.header)),n||(this._removeClass(s,"ui-accordion-header-collapsed")._addClass(s,"ui-accordion-header-active","ui-state-active"),e.icons&&(n=s.children(".ui-accordion-header-icon"),this._removeClass(n,null,e.icons.header)._addClass(n,null,e.icons.activeHeader)),this._addClass(s.next(),"ui-accordion-content-active")))},_toggle:function(t){var e=t.newPanel,i=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=e,this.prevHide=i,this.options.animate?this._animate(e,i,t):(i.hide(),e.show(),this._toggleComplete(t)),i.attr({"aria-hidden":"true"}),i.prev().attr({"aria-selected":"false","aria-expanded":"false"}),e.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):e.length&&this.headers.filter(function(){return 0===parseInt(V(this).attr("tabIndex"),10)}).attr("tabIndex",-1),e.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,i,e){var s,n,o,a=this,r=0,l=t.css("box-sizing"),h=t.length&&(!i.length||t.index()<i.index()),c=this.options.animate||{},u=h&&c.down||c,h=function(){a._toggleComplete(e)};
vendor: 8,223 bytes, line 2064
2064return n=(n="string"==typeof u?u:n)||u.easing||c.easing,o=(o="number"==typeof u?u:o)||u.duration||c.duration,i.length?t.length?(s=t.show().outerHeight(),i.animate(this.hideProps,{duration:o,easing:n,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(this.showProps,{duration:o,easing:n,complete:h,step:function(t,e){e.now=Math.round(t),"height"!==e.prop?"content-box"===l&&(r+=e.now):"content"!==a.options.heightStyle&&(e.now=Math.round(s-i.outerHeight()-r),r=0)}})):i.animate(this.hideProps,o,n,h):t.animate(this.showProps,o,n,h)},_toggleComplete:function(t){var e=t.oldPanel,i=e.prev();this._removeClass(e,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),V.ui.safeActiveElement=function(e){var i;try{i=e.activeElement}catch(t){i=e.body}return i=!(i=i||e.body).nodeName?e.body:i},V.widget("ui.menu",{version:"1.13.2",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.lastMousePosition={x:null,y:null},this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault(),this._activateItem(t)},"click .ui-menu-item":function(t){var e=V(t.target),i=V(V.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&e.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),e.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":"_activateItem","mousemove .ui-menu-item":"_activateItem",mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this._menuItems().first();e||this.focus(t,i)},blur:function(t){this._delay(function(){V.contains(this.element[0],V.ui.safeActiveElement(this.document[0]))||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t,!0),this.mouseHandled=!1}})},_activateItem:function(t){var e,i;this.previousFilter||t.clientX===this.lastMousePosition.x&&t.clientY===this.lastMousePosition.y||(this.lastMousePosition={x:t.clientX,y:t.clientY},e=V(t.target).closest(".ui-menu-item"),i=V(t.currentTarget),e[0]===i[0]&&(i.is(".ui-state-active")||(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,i))))},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each(function(){var t=V(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var e,i,s,n=!0;switch(t.keyCode){case V.ui.keyCode.PAGE_UP:this.previousPage(t);break;case V.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case V.ui.keyCode.HOME:this._move("first","first",t);break;case V.ui.keyCode.END:this._move("last","last",t);break;case V.ui.keyCode.UP:this.previous(t);break;case V.ui.keyCode.DOWN:this.next(t);break;case V.ui.keyCode.LEFT:this.collapse(t);break;case V.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case V.ui.keyCode.ENTER:case V.ui.keyCode.SPACE:this._activate(t);break;case V.ui.keyCode.ESCAPE:this.collapse(t);break;default:e=this.previousFilter||"",s=n=!1,i=96<=t.keyCode&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),i===e?s=!0:i=e+i,e=this._filterMenuItems(i),(e=s&&-1!==e.index(this.active.next())?this.active.nextAll(".ui-menu-item"):e).length||(i=String.fromCharCode(t.keyCode),e=this._filterMenuItems(i)),e.length?(this.focus(t,e),this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}n&&t.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var t,e,s=this,n=this.options.icons.submenu,i=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),e=i.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=V(this),e=t.prev(),i=V("<span>").data("ui-menu-submenu-caret",!0);s._addClass(i,"ui-menu-icon","ui-icon "+n),e.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",e.attr("id"))}),this._addClass(e,"ui-menu","ui-widget ui-widget-content ui-front"),(t=i.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var t=V(this);s._isDivider(t)&&s._addClass(t,"ui-menu-divider","ui-widget-content")}),i=(e=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(e,"ui-menu-item")._addClass(i,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!V.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){var i;"icons"===t&&(i=this.element.find(".ui-menu-icon"),this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),i=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(t){var e,i,s;this._hasScroll()&&(i=parseFloat(V.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(V.css(this.activeMenu[0],"paddingTop"))||0,e=t.offset().top-this.activeMenu.offset().top-i-s,i=this.activeMenu.scrollTop(),s=this.activeMenu.height(),t=t.outerHeight(),e<0?this.activeMenu.scrollTop(i+e):s<e+t&&this.activeMenu.scrollTop(i+e-s+t))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(t){var e=V.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(e)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var t=i?this.element:V(e&&e.target).closest(this.element.find(".ui-menu"));t.length||(t=this.element),this._close(t),this.blur(e),this._removeClass(t.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=t},i?0:this.delay)},_close:function(t){(t=t||(this.active?this.active.parent():this.element)).find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","fal
2064se")},_closeOnDocumentClick:function(t){return!V(t.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this._menuItems(this.active.children(".ui-menu")).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_menuItems:function(t){return(t||this.element).find(this.options.items).filter(".ui-menu-item")},_move:function(t,e,i){var s;(s=this.active?"first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").last():this.active[t+"All"](".ui-menu-item").first():s)&&s.length&&this.active||(s=this._menuItems(this.activeMenu)[e]()),this.focus(i,s)},nextPage:function(t){var e,i,s;this.active?this.isLastItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.innerHeight(),0===V.fn.jquery.indexOf("3.2.")&&(s+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.nextAll(".ui-menu-item").each(function(){return(e=V(this)).offset().top-i-s<0}),this.focus(t,e)):this.focus(t,this._menuItems(this.activeMenu)[this.active?"last":"first"]())):this.next(t)},previousPage:function(t){var e,i,s;this.active?this.isFirstItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.innerHeight(),0===V.fn.jquery.indexOf("3.2.")&&(s+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.prevAll(".ui-menu-item").each(function(){return 0<(e=V(this)).offset().top-i+s}),this.focus(t,e)):this.focus(t,this._menuItems(this.activeMenu).first())):this.next(t)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||V(t.target).closest(".ui-menu-item");var e={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,e)},_filterMenuItems:function(t){var t=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),e=new RegExp("^"+t,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return e.test(String.prototype.trim.call(V(this).children(".ui-menu-item-wrapper").text()))})}});V.widget("ui.autocomplete",{version:"1.13.2",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,liveRegionTimer:null,_create:function(){var i,s,n,t=this.element[0].nodeName.toLowerCase(),e="textarea"===t,t="input"===t;this.isMultiLine=e||!t&&this._isContentEditable(this.element),this.valueMethod=this.element[e||t?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(t){if(this.element.prop("readOnly"))s=n=i=!0;else{s=n=i=!1;var e=V.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:i=!0,this._move("previousPage",t);break;case e.PAGE_DOWN:i=!0,this._move("nextPage",t);break;case e.UP:i=!0,this._keyEvent("previous",t);break;case e.DOWN:i=!0,this._keyEvent("next",t);break;case e.ENTER:this.menu.active&&(i=!0,t.preventDefault(),this.menu.select(t));break;case e.TAB:this.menu.active&&this.menu.select(t);break;case e.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(t),t.preventDefault());break;default:s=!0,this._searchTimeout(t)}}},keypress:function(t){if(i)return i=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||t.preventDefault());if(!s){var e=V.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:this._move("previousPage",t);break;case e.PAGE_DOWN:this._move("nextPage",t);break;case e.UP:this._keyEvent("previous",t);break;case e.DOWN:this._keyEvent("next",t)}}},input:function(t){if(n)return n=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value(
vendor: 13,513 bytes, line 2064
2064)},blur:function(t){clearTimeout(this.searching),this.close(t),this._change(t)}}),this._initSource(),this.menu=V("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().attr({unselectable:"on"}).menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault()},menufocus:function(t,e){var i,s;if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){V(t.target).trigger(t.originalEvent)});s=e.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:s})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(s.value),(i=e.item.attr("aria-label")||s.value)&&String.prototype.trim.call(i).length&&(clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(V("<div>").text(i))},100))},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==V.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=V("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(t){var e=this.menu.element[0];return t.target===this.element[0]||t.target===e||V.contains(e,t.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var t=this.options.appendTo;return t=!(t=!(t=t&&(t.jquery||t.nodeType?V(t):this.document.find(t).eq(0)))||!t[0]?this.element.closest(".ui-front, dialog"):t).length?this.document[0].body:t},_initSource:function(){var i,s,n=this;Array.isArray(this.options.source)?(i=this.options.source,this.source=function(t,e){e(V.ui.autocomplete.filter(i,t.term))}):"string"==typeof this.options.source?(s=this.options.source,this.source=function(t,e){n.xhr&&n.xhr.abort(),n.xhr=V.ajax({url:s,data:t,dataType:"json",success:function(t){e(t)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(s){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),e=this.menu.element.is(":visible"),i=s.altKey||s.ctrlKey||s.metaKey||s.shiftKey;t&&(e||i)||(this.selectedItem=null,this.search(null,s))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):!1!==this._trigger("search",e)?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")}.bind(this)},__response:function(t){t=t&&this._normalize(t),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:V.map(t,function(t){return"string"==typeof t?{label:t,value:t}:V.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var e=this.menu.element.empty();this._renderMenu(e,t),this.isNewMenu=!0,this.menu.refresh(),e.show(),this._resizeMenu(),e.position(V.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(i,t){var s=this;V.each(t,function(t,e){s._renderItemData(i,e)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(t,e){return V("<li>").append(V("<div>").text(e.label)).appendTo(t)},_move:function(t,e){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e);this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),V.extend(V.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,e){var i=new RegExp(V.ui.autocomplete.escapeRegex(e),"i");return V.grep(t,function(t){return i.test(t.label||t.value||t)})}}),V.widget("ui.autocomplete",V.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(1<t?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(V("<div>").text(e))},100))}});V.ui.autocomplete;var tt=/ui-corner-([a-z]){2,6}/g;V.widget("ui.controlgroup",{version:"1.13.2",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var o=this,a=[];V.each(this.options.items,function(s,t){var e,n={};if(t)return"controlgroupLabel"===s?((e=o.element.find(t)).each(function(){var t=V(this);t.children(".ui-controlgroup-label-contents").length||t.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),o._addClass(e,null,"ui-widget ui-widget-content ui-state-default"),void(a=a.concat(e.get()))):void(V.fn[s]&&(n=o["_"+s+"Options"]?o["_"+s+"Options"]("middle"):{classes:{}},o.element.find(t).each(function(){var t=V(this),e=t[s]("instance"),i=V.widget.extend({},n);"button"===s&&t.parent(".ui-spinner").length||((e=e||t[s]()[s]("instance"))&&(i.classes=o._resolveClassesValues(i.classes,e)),t[s](i),i=t[s]("widget"),V.data(i[0],"ui-controlgroup-data",e||t[s]("instance")),a.push(i[0]))})))}),this.childWidgets=V(V.uniqueSort(a)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var t=V(this).data("ui-controlgroup-data");t&&t[e]&&t[e]()})},_updateCornerClass:function(t,e){e=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),this._addClass(t,null,e)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,s={classes:{}};return s.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],s},_spinnerOptions:function(t){t=this._buildSimpleOptions(t,"ui-spinner");return t.classes["ui-spinner-up"]="",t.classes["ui-spinner-down"]="",t},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:e&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(i,s){var n={};return V.each(i,function(t){var e=s.options.classes[t]||"",e=String.prototype.trim.call(e.replace(tt,""));n[t]=(e+" "+i[t]).replace(/\s+/g," ")}),n},_setOption:function(t,e){"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"!==t?this.refresh():this._callChildMethod(e?"disable":"enable")},refresh:function(){var n,o=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),n=this.childWidgets,(n=this.options.onlyVisible?n.filter(":visible"):n).length&&(V.each(["first","last"],function(t,e){var i,s=n[e]().data("ui-controlgroup-data");s&&o["_"+s.widgetName+"Options"]?((i=o["_"+s.widgetName+"Options"](1===n.length?"only":e)).classes=o._resolveClassesValues(i.classes,s),s.element[s.widgetName](i)):o._updateCornerClass(n[e](),e)}),this._callChildMethod("refresh"))}});V.widget("ui.checkboxradio",[V.ui.formResetMixin,{version:"1.13.2",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var t,e=this._super()||{};return this._readType(),t=this.element.labels(),this.label=V(t[t.length-1]),this.label.length||V.error("No label found for checkboxradio widget"),this.originalLabel="",(t=this.label.contents().not(this.element[0])).length&&(this.originalLabel+=t.clone().wrapAll("<div></div>").parent().html()),this.originalLabel&&(e.label=this.originalLabel),null!=(t=this.element[0].disabled)&&(e.disabled=t),e},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var t=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===t&&/radio|checkbox/.test(this.type)||V.error("Can't create checkboxradio on element.nodeName="+t+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var t=this.element[0].name,e="input[name='"+V.escapeSelector(t)+"']";return t?(this.form.length?V(this.form[0].elements).filter(e):V(e).filter(function(){return 0===V(this)._form().length})).not(this.element):V([])},_toggleClasses:function(){var t=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",t)._toggleClass(this.icon,null,"ui-icon-blank",!t),"radio"===this.type&&this._getRadioGroup().each(function(){var t=V(this).checkboxradio("instance");t&&t._removeClass(t.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){if("label"!==t||e){if(this._super(t,e),"disabled"===t)return this._toggleClass(this.label,null,"ui-state-disabled",e),void(this.element[0].disabled=e);this.refresh()}},_updateIcon:function(t){var e="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=V("<span>"),this.iconSpace=V("<span> </span>
2064"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(e+=t?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,t?"ui-icon-blank":"ui-icon-check")):e+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",e),t||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),(t=this.iconSpace?t.not(this.iconSpace[0]):t).remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]);var et;V.ui.checkboxradio;V.widget("ui.button",{version:"1.13.2",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),null!=(t=this.element[0].disabled)&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(t){t.keyCode===V.ui.keyCode.SPACE&&(t.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(t,e){var i="iconPosition"!==t,s=i?this.options.iconPosition:e,t="top"===s||"bottom"===s;this.icon?i&&this._removeClass(this.icon,null,this.options.icon):(this.icon=V("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),i&&this._addClass(this.icon,null,e),this._attachIcon(s),t?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconS
vendor: 4,777 bytes, line 2064
2064pace||(this.iconSpace=V("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(s))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=(void 0===t.showLabel?this.options:t).showLabel,i=(void 0===t.icon?this.options:t).icon;e||i||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),(this.element[0].disabled=e)&&this.element.trigger("blur"))},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),!1!==V.uiBackCompat&&(V.widget("ui.button",V.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){"text"!==t?("showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),this._superApply(arguments)):this._super("showLabel",e)}}),V.fn.button=(et=V.fn.button,function(i){var t="string"==typeof i,s=Array.prototype.slice.call(arguments,1),n=this;return t?this.length||"instance"!==i?this.each(function(){var t=V(this).attr("type"),e=V.data(this,"ui-"+("checkbox"!==t&&"radio"!==t?"button":"checkboxradio"));return"instance"===i?(n=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?V.error("no such method '"+i+"' for button widget instance"):(t=e[i].apply(e,s))!==e&&void 0!==t?(n=t&&t.jquery?n.pushStack(t.get()):t,!1):void 0:V.error("cannot call methods on button prior to initialization; attempted to call method '"+i+"'")}):n=void 0:(s.length&&(i=V.widget.extend.apply(null,[i].concat(s))),this.each(function(){var t=V(this).attr("type"),e="checkbox"!==t&&"radio"!==t?"button":"checkboxradio",t=V.data(this,"ui-"+e);t?(t.option(i||{}),t._init&&t._init()):"button"!=e?V(this).checkboxradio(V.extend({icon:!1},i)):et.call(V(this),i)})),n}),V.fn.buttonset=function(){return V.ui.controlgroup||V.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))});var it;V.ui.button;function st(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
vendor: 4,737 bytes, line 2064
2064ay","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:"",selectMonthLabel:"Select month",selectYearLabel:"Select year"},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,onUpdateDatepicker:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},V.extend(this._defaults,this.regional[""]),this.regional.en=V.extend(!0,{},this.regional[""]),this.regional["en-US"]=V.extend(!0,{},this.regional.en),this.dpDiv=nt(V("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function nt(t){var e="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.on("mouseout",e,function(){V(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&V(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&V(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",e,ot)}function ot(){V.datepicker._isDisabledDatepicker((it.inline?it.dpDiv.parent():it.input)[0])||(V(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),V(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&V(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&V(this).addClass("ui-datepicker-next-hover"))}function at(t,e){for(var i in V.extend(t,e),e)null==e[i]&&(t[i]=e[i]);return t}V.extend(V.ui,{datepicker:{version:"1.13.2"}}),V.extend(st.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return at(this._defaults,t||{}),this},_attachDatepicker:function(t,e){var i,s=t.nodeName.toLowerCase(),n="div"===s||"span"===s;t.id||(this.uuid+=1,t.id="dp"+this.uuid),(i=this._newInst(V(t),n)).settings=V.extend({},e||{}),"input"===s?this._connectDatepicker(t,i):n&&this._inlineDatepicker(t,i)},_newInst:function(t,e){return{id:t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:e,dpDiv:e?nt(V("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,e){var i=V(t);e.append=V([]),e.trigger=V([]),i.hasClass(this.markerClassName)||(this._attachments(i,e),i.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(e),V.data(t,"datepicker",e),e.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,e){var i,s=this._get(e,"appendText"),n=this._get(e,"isRTL");e.append&&e.append.remove(),s&&(e.append=V("<span>").addClass(this._appendClass).text(s),t[n?"before":"after"](e.append)),t.off("focus",this._showDatepicker),e.trigger&&e.trigger.remove(),"focus"!==(i=this._get(e,"showOn"))&&"both"!==i||t.on("focus",this._showDatepicker),"button"!==i&&"both"!==i||(s=this._get(e,"buttonText"),i=this._get(e,"buttonImage"),this._get(e,"buttonImageOnly")?e.trigger=V("<img>").addClass(this._triggerClass).attr({src:i,alt:s,title:s}):(e.trigger=V("<button type='button'>").addClass(this._triggerClass),i?e.trigger.html(V("<img>").attr({src:i,alt:s,title:s})):e.trigger.text(s)),t[n?"before":"after"](e.trigger),e.trigger.on("click",function(){return V.datepicker._datepickerShowing&&V.datepicker._lastInput===t[0]?V.datepicker._hideDatepicker():(V.datepicker._datepickerShowing&&V.datepicker._lastInput!==t[0]&&V.datepicker._hideDatepicker(),V.datepicker._showDatepicker(t[0])),!1}))},_autoSize:function(t){var e,i,s,n,o,a;this._get(t,"autoSize")&&!t.inline&&(o=new Date(2009,11,20),(a=this._get(t,"dateFormat")).match(/[DM]/)&&(e=function(t){for(n=s=i=0;n<t.length;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length))},_inlineDatepicker:function(t,e){var i=V(t);
vendor: 11,779 bytes, line 2064
2064i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(e.dpDiv),V.data(t,"datepicker",e),this._setDate(e,this._getDefaultDate(e),!0),this._updateDatepicker(e),this._updateAlternate(e),e.settings.disabled&&this._disableDatepicker(t),e.dpDiv.css("display","block"))},_dialogDatepicker:function(t,e,i,s,n){var o,a=this._dialogInst;return a||(this.uuid+=1,o="dp"+this.uuid,this._dialogInput=V("<input type='text' id='"+o+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),V("body").append(this._dialogInput),(a=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},V.data(this._dialogInput[0],"datepicker",a)),at(a.settings,s||{}),e=e&&e.constructor===Date?this._formatDate(a,e):e,this._dialogInput.val(e),this._pos=n?n.length?n:[n.pageX,n.pageY]:null,this._pos||(o=document.documentElement.clientWidth,s=document.documentElement.clientHeight,e=document.documentElement.scrollLeft||document.body.scrollLeft,n=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[o/2-100+e,s/2-150+n]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),a.settings.onSelect=i,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),V.blockUI&&V.blockUI(this.dpDiv),V.data(this._dialogInput[0],"datepicker",a),this},_destroyDatepicker:function(t){var e,i=V(t),s=V.data(t,"datepicker");i.hasClass(this.markerClassName)&&(e=t.nodeName.toLowerCase(),V.removeData(t,"datepicker"),"input"===e?(s.append.remove(),s.trigger.remove(),i.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==e&&"span"!==e||i.removeClass(this.markerClassName).empty(),it===s&&(it=null,this._curInst=null))},_enableDatepicker:function(e){var t,i=V(e),s=V.data(e,"datepicker");i.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!1,s.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==t&&"span"!==t||((i=i.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=V.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var t,i=V(e),s=V.data(e,"datepicker");i.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!0,s.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==t&&"span"!==t||((i=i.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=V.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(t){try{return V.data(t,"datepicker")}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,e,i){var s,n,o=this._getInst(t);if(2===arguments.length&&"string"==typeof e)return"defaults"===e?V.extend({},V.datepicker._defaults):o?"all"===e?V.extend({},o.settings):this._get(o,e):null;s=e||{},"string"==typeof e&&((s={})[e]=i),o&&(this._curInst===o&&this._hideDatepicker(),n=this._getDateDatepicker(t,!0),e=this._getMinMaxDate(o,"min"),i=this._getMinMaxDate(o,"max"),at(o.settings,s),null!==e&&void 0!==s.dateFormat&&void 0===s.minDate&&(o.settings.minDate=this._formatDate(o,e)),null!==i&&void 0!==s.dateFormat&&void 0===s.maxDate&&(o.settings.maxDate=this._formatDate(o,i)),"disabled"in s&&(s.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(V(t),o),this._autoSize(o),this._setDate(o,n),this._updateAlternate(o),this._updateDatepicker(o))},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){t=this._getInst(t);t&&this._updateDatepicker(t)},_setDateDatepicker:function(t,e){t=this._getInst(t);t&&(this._setDate(t,e),this._updateDatepicker(t),this._updateAlternate(t))},_getDateDatepicker:function(t,e){t=this._getInst(t);return t&&!t.inline&&this._setDateFromField(t,e),t?this._getDate(t):null},_doKeyDown:function(t){var e,i,s=V.datepicker._getInst(t.target),n=!0,o=s.dpDiv.is(".ui-datepicker-rtl");if(s._keyEvent=!0,V.datepicker._datepickerShowing)switch(t.keyCode){case 9:V.datepicker._hideDatepicker(),n=!1;break;case 13:return(i=V("td."+V.datepicker._dayOverClass+":not(."+V.datepicker._currentClass+")",s.dpDiv))[0]&&V.datepicker._selectDay(t.target,s.selectedMonth,s.selectedYear,i[0]),(e=V.datepicker._get(s,"onSelect"))?(i=V.datepicker._formatDate(s),e.apply(s.input?s.input[0]:null,[i,s])):V.datepicker._hideDatepicker(),!1;case 27:V.datepicker._hideDatepicker();break;case 33:V.datepicker._adjustDate(t.target,t.ctrlKey?-V.datepicker._get(s,"stepBigMonths"):-V.datepicker._get(s,"stepMonths"),"M");break;case 34:V.datepicker._adjustDate(t.target,t.ctrlKey?+V.datepicker._get(s,"stepBigMonths"):+V.datepicker._get(s,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&V.datepicker._clearDate(t.target),n=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&V.datepicker._gotoToday(t.target),n=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&V.datepicker._adjustDate(t.target,o?1:-1,"D"),n=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&V.datepicker._adjustDate(t.target,t.ctrlKey?-V.datepicker._get(s,"stepBigMonths"):-V.datepicker._get(s,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&V.datepicker._adjustDate(t.target,-7,"D"),n=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&V.datepicker._adjustDate(t.target,o?-1:1,"D"),n=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&V.datepicker._adjustDate(t.target,t.ctrlKey?+V.datepicker._get(s,"stepBigMonths"):+V.datepicker._get(s,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&V.datepicker._adjustDate(t.target,7,"D"),n=t.ctrlKey||t.metaKey;break;default:n=!1}else 36===t.keyCode&&t.ctrlKey?V.datepicker._showDatepicker(this):n=!1;n&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var e,i=V.datepicker._getInst(t.target);if(V.datepicker._get(i,"constrainInput"))return e=V.datepicker._possibleChars(V.datepicker._get(i,"dateFormat")),i=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||i<" "||!e||-1<e.indexOf(i)},_doKeyUp:function(t){t=V.datepicker._getInst(t.target);if(t.input.val()!==t.lastVal)try{V.datepicker.parseDate(V.datepicker._get(t,"dateFormat"),t.input?t.input.val():null,V.datepicker._getFormatConfig(t))&&(V.datepicker._setDateFromField(t),V.datepicker._updateAlternate(t),V.datepicker._updateDatepicker(t))}catch(t){}return!0},_showDatepicker:function(t){var e,i,s,n;"input"!==(t=t.target||t).nodeName.toLowerCase()&&(t=V("input",t.parentNode)[0]),V.datepicker._isDisabledDatepicker(t)||V.datepicker._lastInput===t||(n=V.datepicker._getInst(t),V.datepicker._curInst&&V.datepicker._curInst!==n&&(V.datepicker._curInst.dpDiv.stop(!0,!0),n&&V.datepicker._datepickerShowing&&V.datepicker._hideDatepicker(V.datepicker._curInst.input[0])),!1!==(i=(s=V.datepicker._get(n,"beforeShow"))?s.apply(t,[t,n]):{})&&(at(n.settings,i),n.lastVal=null,V.datepicker._lastInput=t,V.datepicker._setDateFromField(n),V.datepicker._inDialog&&(t.value=""),V.datepicker._pos||(V.datepicker._pos=V.datepicker._findPos(t),V.datepicker._pos[1]+=t.offsetHeight),e=!1,V(t).parents().each(function(){return!(e|="fixed"===V(this).css("position"))}),s={left:V.datepicker._pos[0],top:V.datepicker._pos[1]},V.datepicker._pos=null,n.dpDiv.empty(),n.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),V.datepicker._updateDatepicker(n),s=V.datepicker._checkOffset(n,s,e),n.dpDiv.css({position:V.datepicker._inDialog&&V.blockUI?"static":e?"fixed":"absolute",display:"none",left:s.left+"px",top:s.top+"px"}),n.inline||(i=V.datepicker._get(n,"showAnim"),s=V.datepicker._get(n,"duration"),n.dpDiv.css("z-index",function(t){for(var e,i;t.length&&t[0]!==document;){if(("absolute"===(e=t.css("position"))||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}(V(t))+1),V.datepicker._datepickerShowing=!0,V.effects&&V.effects.effect[i]?n.dpDiv.show(i,V.datepicker._get(n,"showOptions"),s):n.dpDiv[i||"show"](i?s:null),V.datepicker._shouldFocusInput(n)&&n.input.trigger("focus"),V.datepicker._curInst=n)))},_updateDatepicker:function(t){this.maxRows=4,(it=t).dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var e,i=this._getNumberOfMonths(t),s=i[1],n=t.dpDiv.find("."+this._dayOverClass+" a"),o=V.datepicker._get(t,"onUpdateDatepicker");0<n.length&&ot.apply(n.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),1<s&&t.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",17*s+"em"),t.dpDiv[(1!==i[0]||1!==i[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===V.datepicker._curInst&&V.datepicker._datepickerShowing&&V.datepicker._shouldFocusInput(t)&&t.input.trigger("focus"),t.yearshtml&&(e=t.yearshtml,setTimeout(function(){e===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year").first().replaceWith(t.yearshtml),e=t.yearshtml=null},0)),o&&o.apply(t.input?t.input[0]:null,[t])},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(t,e,i){var s=t.dpDiv.outerWidth(),n=t.dpDiv.outerHeight(),o=t.input?t.input.outerWidth():0,a=t.input?t.input.outerHeight():0,r=document.documentElement.clientWidth+(i?0:V(document).scrollLeft()),l=document.documentElement.clientHeight+(i?0:V(document).scrollTop());return e.left-=this._get(t,"isRTL")?s-o:0,e.left-=i&&e.left===t.input.offset().left?V(document).scrollLeft():0,e.top-=i&&e.top===t.input.offset().top+a?V(document).scrollTop():0,e.left-=Math.min(e.left,e.left+s>r&&s<r?Math.abs(e.left+s-r):0),e.top-=Math.min(e.top,e.top+n>l&&n<l?Math.abs(n+a):0),e},_findPos:function(t){for(var e=this._getInst(t),i=this._get(e,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||V.expr.pseudos.hidden(t));)t=t[i?"previousSibling":"nextSibling"];return[(e=V(t).offset()).left,e.top]},_hideDatepicker:function(t){var e,i,s=this._curInst;!s||t&&s!==V.data(t,"datepicker")||this._datepickerShowing&&(e=this._get(s,"showAnim"),i=this._get(s,"duration"),t=function(){V.datepicker._tidyDialog(s)},V.effects&&(V.effects.effect[e]||V.effects[e])?s.dpDiv.hide(e,V.datepicker._get(s,"showOptions"),i,t):s.dpDiv["slideDown"===e?"slideUp":"fadeIn"===e?"fadeOut":"hide"](e?i:null,t),e||t(),this._datepickerShowing=!1,(t=this._get(s,"onClose"))&&t.apply(s.input?s.input[0]:null,[s.input?s.input.val():"",s]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),V.blockUI&&(V.unblockUI(),V("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(t){var e;V.datepicker._curInst&&(e=V(t.target),t=V.datepicker._getInst(e[0]),(e[0].id===V.datepicker._mainDivId||0!==e.parents("#"+V.datepicker._mainDivId).length||e.hasClass(V.datepicker.markerClassName)||e.closest("."+V.datepicker._triggerClass).length||!V.datepicker._datepickerShowing||V.datepicker._inDialog&&V.blockUI)&&(!e.hasClass(V.datepicker.markerClassName)||V.datepicker._curInst===t)||V.datepicker._hideDatepicker())}
vendor: 14,467 bytes, line 2064
2064,_adjustDate:function(t,e,i){var s=V(t),t=this._getInst(s[0]);this._isDisabledDatepicker(s[0])||(this._adjustInstDate(t,e,i),this._updateDatepicker(t))},_gotoToday:function(t){var e=V(t),i=this._getInst(e[0]);this._get(i,"gotoCurrent")&&i.currentDay?(i.selectedDay=i.currentDay,i.drawMonth=i.selectedMonth=i.currentMonth,i.drawYear=i.selectedYear=i.currentYear):(t=new Date,i.selectedDay=t.getDate(),i.drawMonth=i.selectedMonth=t.getMonth(),i.drawYear=i.selectedYear=t.getFullYear()),this._notifyChange(i),this._adjustDate(e)},_selectMonthYear:function(t,e,i){var s=V(t),t=this._getInst(s[0]);t["selected"+("M"===i?"Month":"Year")]=t["draw"+("M"===i?"Month":"Year")]=parseInt(e.options[e.selectedIndex].value,10),this._notifyChange(t),this._adjustDate(s)},_selectDay:function(t,e,i,s){var n=V(t);V(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(n[0])||((n=this._getInst(n[0])).selectedDay=n.currentDay=parseInt(V("a",s).attr("data-date")),n.selectedMonth=n.currentMonth=e,n.selectedYear=n.currentYear=i,this._selectDate(t,this._formatDate(n,n.currentDay,n.currentMonth,n.currentYear)))},_clearDate:function(t){t=V(t);this._selectDate(t,"")},_selectDate:function(t,e){var i=V(t),t=this._getInst(i[0]);e=null!=e?e:this._formatDate(t),t.input&&t.input.val(e),this._updateAlternate(t),(i=this._get(t,"onSelect"))?i.apply(t.input?t.input[0]:null,[e,t]):t.input&&t.input.trigger("change"),t.inline?this._updateDatepicker(t):(this._hideDatepicker(),this._lastInput=t.input[0],"object"!=typeof t.input[0]&&t.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(t){var e,i,s=this._get(t,"altField");s&&(e=this._get(t,"altFormat")||this._get(t,"dateFormat"),i=this._getDate(t),t=this.formatDate(e,i,this._getFormatConfig(t)),V(document).find(s).val(t))},noWeekends:function(t){t=t.getDay();return[0<t&&t<6,""]},iso8601Week:function(t){var e=new Date(t.getTime());return e.setDate(e.getDate()+4-(e.getDay()||7)),t=e.getTime(),e.setMonth(0),e.setDate(1),Math.floor(Math.round((t-e)/864e5)/7)+1},parseDate:function(e,n,t){if(null==e||null==n)throw"Invalid arguments";if(""===(n="object"==typeof n?n.toString():n+""))return null;for(var i,s,o,a=0,r=(t?t.shortYearCutoff:null)||this._defaults.shortYearCutoff,r="string"!=typeof r?r:(new Date).getFullYear()%100+parseInt(r,10),l=(t?t.dayNamesShort:null)||this._defaults.dayNamesShort,h=(t?t.dayNames:null)||this._defaults.dayNames,c=(t?t.monthNamesShort:null)||this._defaults.monthNamesShort,u=(t?t.monthNames:null)||this._defaults.monthNames,d=-1,p=-1,f=-1,g=-1,m=!1,_=function(t){t=w+1<e.length&&e.charAt(w+1)===t;return t&&w++,t},v=function(t){var e=_(t),e="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,e=new RegExp("^\\d{"+("y"===t?e:1)+","+e+"}"),e=n.substring(a).match(e);if(!e)throw"Missing number at position "+a;return a+=e[0].length,parseInt(e[0],10)},b=function(t,e,i){var s=-1,e=V.map(_(t)?i:e,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(V.each(e,function(t,e){var i=e[1];if(n.substr(a,i.length).toLowerCase()===i.toLowerCase())return s=e[0],a+=i.length,!1}),-1!==s)return s+1;throw"Unknown name at position "+a},y=function(){if(n.charAt(a)!==e.charAt(w))throw"Unexpected literal at position "+a;a++},w=0;w<e.length;w++)if(m)"'"!==e.charAt(w)||_("'")?y():m=!1;else switch(e.charAt(w)){case"d":f=v("d");break;case"D":b("D",l,h);break;case"o":g=v("o");break;case"m":p=v("m");break;case"M":p=b("M",c,u);break;case"y":d=v("y");break;case"@":d=(o=new Date(v("@"))).getFullYear(),p=o.getMonth()+1,f=o.getDate();break;case"!":d=(o=new Date((v("!")-this._ticksTo1970)/1e4)).getFullYear(),p=o.getMonth()+1,f=o.getDate();break;case"'":_("'")?y():m=!0;break;default:y()}if(a<n.length&&(s=n.substr(a),!/^\s+/.test(s)))throw"Extra/unparsed characters found in date: "+s;if(-1===d?d=(new Date).getFullYear():d<100&&(d+=(new Date).getFullYear()-(new Date).getFullYear()%100+(d<=r?0:-100)),-1<g)for(p=1,f=g;;){if(f<=(i=this._getDaysInMonth(d,p-1)))break;p++,f-=i}if((o=this._daylightSavingAdjust(new Date(d,p-1,f))).getFullYear()!==d||o.getMonth()+1!==p||o.getDate()!==f)throw"Invalid date";return o},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(e,t,i){if(!t)return"";function s(t,e,i){var s=""+e;if(c(t))for(;s.length<i;)s="0"+s;return s}function n(t,e,i,s){return(c(t)?s:i)[e]}var o,a=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,r=(i?i.dayNames:null)||this._defaults.dayNames,l=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,h=(i?i.monthNames:null)||this._defaults.monthNames,c=function(t){t=o+1<e.length&&e.charAt(o+1)===t;return t&&o++,t},u="",d=!1;if(t)for(o=0;o<e.length;o++)if(d)"'"!==e.charAt(o)||c("'")?u+=e.charAt(o):d=!1;else switch(e.charAt(o)){case"d":u+=s("d",t.getDate(),2);break;case"D":u+=n("D",t.getDay(),a,r);break;case"o":u+=s("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=s("m",t.getMonth()+1,2);break;case"M":u+=n("M",t.getMonth(),l,h);break;case"y":u+=c("y")?t.getFullYear():(t.getFullYear()%100<10?"0":"")+t.getFullYear()%100;break;case"@":u+=t.getTime();break;case"!":u+=1e4*t.getTime()+this._ticksTo1970;break;case"'":c("'")?u+="'":d=!0;break;default:u+=e.charAt(o)}return u},_possibleChars:function(e){for(var t="",i=!1,s=function(t){t=n+1<e.length&&e.charAt(n+1)===t;return t&&n++,t},n=0;n<e.length;n++)if(i)"'"!==e.charAt(n)||s("'")?t+=e.charAt(n):i=!1;else switch(e.charAt(n)){case"d":case"m":case"y":case"@":t+="0123456789";break;case"D":case"M":return null;case"'":s("'")?t+="'":i=!0;break;default:t+=e.charAt(n)}return t},_get:function(t,e){return(void 0!==t.settings[e]?t.settings:this._defaults)[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(t){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(r,t,e){var i,s,t=null==t||""===t?e:"string"==typeof t?function(t){try{return V.datepicker.parseDate(V.datepicker._get(r,"dateFormat"),t,V.datepicker._getFormatConfig(r))}catch(t){}for(var e=(t.toLowerCase().match(/^c/)?V.datepicker._getDate(r):null)||new Date,i=e.getFullYear(),s=e.getMonth(),n=e.getDate(),o=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,a=o.exec(t);a;){switch(a[2]||"d"){case"d":case"D":n+=parseInt(a[1],10);break;case"w":case"W":n+=7*parseInt(a[1],10);break;case"m":case"M":s+=parseInt(a[1],10),n=Math.min(n,V.datepicker._getDaysInMonth(i,s));break;case"y":case"Y":i+=parseInt(a[1],10),n=Math.min(n,V.datepicker._getDaysInMonth(i,s))}a=o.exec(t)}return new Date(i,s,n)}(t):"number"==typeof t?isNaN(t)?e:(i=t,(s=new Date).setDate(s.getDate()+i),s):new Date(t.getTime());return(t=t&&"Invalid Date"===t.toString()?e:t)&&(t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0)),this._daylightSavingAdjust(t)},_daylightSavingAdjust:function(t){return t?(t.setHours(12<t.getHours()?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,e=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=e.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=e.getMonth(),t.drawYear=t.selectedYear=t.currentYear=e.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){return!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay))},_attachHandlers:function(t){var e=this._get(t,"stepMonths"),i="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){V.datepicker._adjustDate(i,-e,"M")},next:function(){V.datepicker._adjustDate(i,+e,"M")},hide:function(){V.datepicker._hideDatepicker()},today:function(){V.datepicker._gotoToday(i)},selectDay:function(){return V.datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return V.datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return V.datepicker._selectMonthYear(i,this,"Y"),!1}};V(this).on(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,l,h,c,u,d,p,f,g,m,_,v,b,y,w,x,k,C,D,I,T,P,M,S,H,z,A=new Date,O=this._daylightSavingAdjust(new Date(A.getFullYear(),A.getMonth(),A.getDate())),N=this._get(t,"isRTL"),E=this._get(t,"showButtonPanel"),W=this._get(t,"hideIfNoPrevNext"),F=this._get(t,"navigationAsDateFormat"),L=this._getNumberOfMonths(t),R=this._get(t,"showCurrentAtPos"),A=this._get(t,"stepMonths"),Y=1!==L[0]||1!==L[1],B=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),j=this._getMinMaxDate(t,"min"),q=this._getMinMaxDate(t,"max"),K=t.drawMonth-R,U=t.drawYear;if(K<0&&(K+=12,U--),q)for(e=this._daylightSavingAdjust(new Date(q.getFullYear(),q.getMonth()-L[0]*L[1]+1,q.getDate())),e=j&&e<j?j:e;this._daylightSavingAdjust(new Date(U,K,1))>e;)--K<0&&(K=11,U--);for(t.drawMonth=K,t.drawYear=U,R=this._get(t,"prevText"),R=F?this.formatDate(R,this._daylightSavingAdjust(new Date(U,K-A,1)),this._getFormatConfig(t)):R,i=this._canAdjustMonth(t,-1,U,K)?V("<a>").attr({class:"ui-datepicker-prev ui-corner-all","data-handler":"prev","data-event":"click",title:R}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(N?"e":"w")).text(R))[0].outerHTML:W?"":V("<a>").attr({class:"ui-datepicker-prev ui-corner-all ui-state-disabled",title:R}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(N?"e":"w")).text(R))[0].outerHTML,R=this._get(t,"nextText"),R=F?this.formatDate(R,this._daylightSavingAdjust(new Date(U,K+A,1)),this._getFormatConfig(t)):R,s=this._canAdjustMonth(t,1,U,K)?V("<a>").attr({class:"ui-datepicker-next ui-corner-all","data-handler":"next","data-event":"click",title:R}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(N?"w":"e")).text(R))[0].outerHTML:W?"":V("<a>").attr({class:"ui-datepicker-next ui-corner-all ui-state-disabled",title:R}).append(V("<span>").attr("class","ui-icon ui-icon-circle-triangle-"+(N?"w":"e")).text(R))[0].outerHTML,A=this._get(t,"currentText"),W=this._get(t,"gotoCurrent")&&t.currentDay?B:O,A=F?this.formatDate(A,W,this._getFormatConfig(t)):A,R="",t.inline||(R=V("<button>").attr({type:"button",class:"ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all","data-handler":"hide","data-event":"click"}).text(this._get(t,"closeText"))[0].outerHTML),F="",E&&(F=V("<div class='ui-datepicker-buttonpane ui-widget-content'>").append(N?R:"").append(this._isInRange(t,W)?V("<button>").attr({type:"button",class:"ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all","data-handler":"today","data-event":"click"}).text(A):"").append(N?"":R)[0].outerHTML),n=parseInt(this._get(t,"firstDay"),10),n=isNaN(n)?0:n,o=this._get(t,"showWeek"),a=this._get(t,"dayNames"),r=this._get(t,"dayNamesMin"),l=this._get(t,"monthNames"),h=this._get(t,"monthNamesShort"),c=this._get(t,"beforeShowDay"),u=this._get(t,"showOtherMonths"),d=this._get(t,"selectOtherMonths"),p=this._getDefaultDate(t),f="",m=0;m<L[0];m++){for(_="",this.maxRows=4,v=0;v<L[1];v++){if(b=this._daylightSavingAdjust(new Date(U,K,t.selectedDay)),y=" ui-corner-all",w="",Y){if(w+="<div class='ui-datepicker-group",1<L[1])switch(v){case 0:w+=" ui-datepicker-group-first",y=" ui-corner-"+(N?"right":"left");break;case L[1]-1:w+=" ui-datepicker-group-last",y=" ui-corner-"+(N?"left":"right");break;default:w+=" ui-datepicker-group-middle",y=""}w+="'>"}for(w+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+y+"'>"+(/all|left/.test(y)&&0===m?N?s:i:"")+(/all|right/.test(y)&&0===m?N?i:s:"")+this._generateMonthYearHeader(t,K,U,j,q,0<m||0<v,l,h)+"</div><table class='ui-datepicker-calendar'><thead><tr>",x=o?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",g=0;g<7;g++)x+="<th scope='col'"+(5<=(g+n+6)%7?" class='ui-datepicker-week-end'":"")+"><span title='"+a[k=(g+n)%7]+"'>"+r[k]+"</span></th>";for(w+=x+"</tr></thead><tbody>",D=this._getDaysInMonth(U,K),U===t.selectedYear&&K===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,D)),C=(this._getFirstDayOfMonth(U,K)-n+7)%7,D=Math.ceil((C+D)/7),I=Y&&this.maxRows>D?this.maxRows:D,this.maxRows=I,T=this._daylightSavingAdjust(new Date(U,K,1-C)),P=0;P<I;P++){for(w+="<tr>",M=o?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(T)+"</td>":"",g=0;g<7;g++)S=c?c.apply(t.input?t.input[0]:null,[T]):[!0,""],z=(H=T.getMonth()!==K)&&!d||!S[0]||j&&T<j||q&&q<T,M+="<td class='"+(5<=(g+n+6)%7?" ui-datepicker-week-end":"")+(H?" ui-datepicker-other-month":"")+(T.getTime()===b.getTime()&&K===t.selectedMonth&&t._keyEvent||p.getTime()===T.getTime()&&p.getTime()===b.getTime()?" "+this._dayOverClass:"")+(z?" "+this._unselectableClass+" ui-state-disabled":"")+(H&&!u?"":" "+S[1]+(T.getTime()===B.getTime()?" "+this._currentClass:"")+(T.getTime()===O.getTime()?" ui-datepicker-today":""))+"'"+(H&&!u||!S[2]?"":" title='"+S[2].replace(/'/g,"&#39;")+"'")+(z?"":" data-handler='selectDay' data-event='click' data-month='"+T.getMonth()+"' data-year='"+T.getFullYear()+"'")+">"+(H&&!u?"&#xa0;":z?"<span class='ui-state-default'>"+T.getDate()+"</span>":"<a class='ui-state-default"+(T.getTime()===O.getTime()?" ui-state-highlight":"")+(T.getTime()===B.getTime()?" ui-state-active":"")+(H?" ui-priority-secondary":"")+"' href='#' aria-current='"+(T.getTime()===B.getTime()?"true":"false")+"' data-date='"+T.getDate()+"'>"+T.getDate()+"</a>")+"</td>",T.setDate(T.getDate()+1),T=this._daylightSavingAdjust(T);w+=M+"</tr>"}11<++K&&(K=0,U++),_+=w+="</tbody></table>"+(Y?"</div>"+(0<L[0]&&v===L[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}f+=_}return f+=F,t._keyEvent=!1,f}
vendor: 18,320 bytes, line 2064
2064,_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var l,h,c,u,d,p,f=this._get(t,"changeMonth"),g=this._get(t,"changeYear"),m=this._get(t,"showMonthAfterYear"),_=this._get(t,"selectMonthLabel"),v=this._get(t,"selectYearLabel"),b="<div class='ui-datepicker-title'>",y="";if(o||!f)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(l=s&&s.getFullYear()===i,h=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' aria-label='"+_+"' data-handler='selectMonth' data-event='change'>",c=0;c<12;c++)(!l||c>=s.getMonth())&&(!h||c<=n.getMonth())&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(m||(b+=y+(!o&&f&&g?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!g)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(a=this._get(t,"yearRange").split(":"),u=(new Date).getFullYear(),d=(_=function(t){t=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?u+parseInt(t,10):parseInt(t,10);return isNaN(t)?u:t})(a[0]),p=Math.max(d,_(a[1]||"")),d=s?Math.max(d,s.getFullYear()):d,p=n?Math.min(p,n.getFullYear()):p,t.yearshtml+="<select class='ui-datepicker-year' aria-label='"+v+"' data-handler='selectYear' data-event='change'>";d<=p;d++)t.yearshtml+="<option value='"+d+"'"+(d===i?" selected='selected'":"")+">"+d+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),m&&(b+=(!o&&f&&g?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),e=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),e=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,e)));t.selectedDay=e.getDate(),t.drawMonth=t.selectedMonth=e.getMonth(),t.drawYear=t.selectedYear=e.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),t=this._getMinMaxDate(t,"max"),e=i&&e<i?i:e;return t&&t<e?t:e},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){t=this._get(t,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),n=this._daylightSavingAdjust(new Date(i,s+(e<0?e:n[0]*n[1]),1));return e<0&&n.setDate(this._getDaysInMonth(n.getFullYear(),n.getMonth())),this._isInRange(t,n)},_isInRange:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=null,o=null,a=this._get(t,"yearRange");return a&&(t=a.split(":"),a=(new Date).getFullYear(),n=parseInt(t[0],10),o=parseInt(t[1],10),t[0].match(/[+\-].*/)&&(n+=a),t[1].match(/[+\-].*/)&&(o+=a)),(!i||e.getTime()>=i.getTime())&&(!s||e.getTime()<=s.getTime())&&(!n||e.getFullYear()>=n)&&(!o||e.getFullYear()<=o)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return{shortYearCutoff:e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);e=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),e,this._getFormatConfig(t))}}),V.fn.datepicker=function(t){if(!this.length)return this;V.datepicker.initialized||(V(document).on("mousedown",V.datepicker._checkExternalClick),V.datepicker.initialized=!0),0===V("#"+V.datepicker._mainDivId).length&&V("body").append(V.datepicker.dpDiv);var e=Array.prototype.slice.call(arguments,1);return"string"==typeof t&&("isDisabled"===t||"getDate"===t||"widget"===t)||"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?V.datepicker["_"+t+"Datepicker"].apply(V.datepicker,[this[0]].concat(e)):this.each(function(){"string"==typeof t?V.datepicker["_"+t+"Datepicker"].apply(V.datepicker,[this].concat(e)):V.datepicker._attachDatepicker(this,t)})},V.datepicker=new st,V.datepicker.initialized=!1,V.datepicker.uuid=(new Date).getTime(),V.datepicker.version="1.13.2";V.datepicker,V.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var rt=!1;V(document).on("mouseup",function(){rt=!1});V.widget("ui.mouse",{version:"1.13.2",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(t){if(!0===V.data(t.target,e.widgetName+".preventClickEvent"))return V.removeData(t.target,e.widgetName+".preventClickEvent"),t.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!rt){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var e=this,i=1===t.which,s=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&V(t.target).closest(this.options.cancel).length;return i&&!s&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?(t.preventDefault(),!0):(!0===V.data(t.target,this.widgetName+".preventClickEvent")&&V.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return e._mouseMove(t)},this._mouseUpDelegate=function(t){return e._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),rt=!0)):!0}},_mouseMove:function(t){if(this._mouseMoved){if(V.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&V.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,rt=!1,t.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),V.ui.plugin={add:function(t,e,i){var s,n=V.ui[t].prototype;for(s in i)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([e,i[s]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;n<o.length;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},V.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&V(t).trigger("blur")};V.widget("ui.draggable",V.ui.mouse,{version:"1.13.2",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(t){var e=this.options;return!(this.helper||e.disabled||0<V(t.target).closest(".ui-resizable-handle").length)&&(this.handle=this._getHandle(t),!!this.handle&&(this._blurActiveElement(t),this._blockFrames(!0===e.iframeFix?"iframe":e.iframeFix),!0))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=V(this);return V("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var e=V.ui.safeActiveElement(this.document[0]);V(t.target).closest(e).length||V.ui.safeBlur(e)},_mouseStart:function(t){var e=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),V.ui.ddmanager&&(V.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=0<this.helper.parents().filter(function(){return"fixed"===V(this).css("position")}).length,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this._setContainment(),!1===this._trigger("start",t)?(this._clear(),!1):(this._cacheHelperProportions(),V.ui.ddmanager&&!e.dropBehaviour&&V.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),V.ui.ddmanager&&V.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(t,e){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!e){e=this._uiHash();if(!1===this._trigger("drag",t,e))return this._mouseUp(new V.Event("mouseup",t)),!1;this.position=e.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",V.ui.ddmanager&&V.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var e=this,i=!1;return V.ui.ddmanager&&!this.options.dropBehaviour&&(i=V.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||!0===this.options.revert||"function"==typeof this.options.revert&&this.options.revert.call(this.element,i)?V(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==e._trigger("stop",t)&&e._clear()}):!1!==this._trigger("stop",t)&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),V.ui.ddmanager&&V.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),V.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new V.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!V(t.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var e=this.options,i="function"==typeof e.helper,t=i?V(e.helper.apply(this.element[0],[t])):"clone"===e.helper?this.element.clone().removeAttr("id"):this.element;return t.parents("body").length||t.appendTo("parent"===e.appendTo?this.element[0].parentNode:e.appendTo),i&&t[0]===this.element[0]&&this._setPositionRelative(),t[0]===this.element[0]||/(fixed|absolute)/.test(t.css("position"))||t.css("position","absolute"),t},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),"left"in(t=Array.isArray(t)?{left:+t[0],top:+t[1]||0}:t)&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),e=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==e&&V.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),{top:(t=this._isRootNode(this.offsetParent[0])?{top:0,left:0}:t).top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,i,s=this.options,n=this.document[0];this.relativeContainer=null,s.containment?"window"!==s.containment?"document"!==s.containment?s.containment.constructor!==Array?("parent"===s.containment&&(s.containment=this.helper[0].parentNode),(i=(e=V(s.containment))[0])&&(t=/(scroll|auto)/.test(e.css("overflow")),this.containment=[(parseInt(e.css("borderLeftWidth"),10)||0)+(parseInt(e.css("paddingLeft"),10)||0),(parseInt(e.css("borderTopWidth"),10)||0)+(parseInt(e.css("paddingTop"),10)||0),(t?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(e.css("borderRightWidth"),10)||0)-(parseInt(e.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(e.css("borderBottomWidth"),10)||0)-(parseInt(e.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=e)):this.containment=s.containment:this.containment=[0,0,V(n).width()-this.helperProportions.width-this.margins.left,(V(n).height()||n.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[V(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,V(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,V(window).scrollLeft()+V(window).width()-this.helperProportions.width-this.margins.left,V(window).scrollTop()+(V(window).height()||n.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(t,e){e=e||this.position;var i="absolute"===t?1:-1,t=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:t?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:t?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s=this.options,n=this._isRootNode(this.scrollParent[0]),o=t.pageX,a=t.pageY;return n&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(i=this.relativeContainer?(i=this.relativeContainer.offset(),[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]):this.containment,t.pageX-this.offset.click.left<i[0]&&(o=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(a=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(o=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(a=i[3]+this.offset.click.top)),s.grid&&(t=s.grid[1]?this.originalPageY+Math.round((a-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY,a=!i||t-this.offset.click.top>=i[1]||t-this.offset.click.top>i[3]?t:t-this.offset.click.top>=i[1]?t-s.grid[1]:t+s.grid[1],t=s.grid[0]?this.originalPageX+Math.round((o-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX,o=!i||t-this.offset.click.left>=i[0]||t-this.offset.click.left>i[2]?t:t-this.offset.click.left>=i[0]?t-s.grid[0]:t+s.grid[0]),"y"===s.axis&&(o=this.originalPageX),"x"===s.axis&&(a=this.originalPageY)),{top:a
vendor: 6,471 bytes, line 2064
2064-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:n?0:this.offset.scroll.top),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:n?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,e,i){return i=i||this._uiHash(),V.ui.plugin.call(this,t,[e,i,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),V.Widget.prototype._trigger.call(this,t,e,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),V.ui.plugin.add("draggable","connectToSortable",{start:function(e,t,i){var s=V.extend({},t,{item:i.element});i.sortables=[],V(i.options.connectToSortable).each(function(){var t=V(this).sortable("instance");t&&!t.options.disabled&&(i.sortables.push(t),t.refreshPositions(),t._trigger("activate",e,s))})},stop:function(e,t,i){var s=V.extend({},t,{item:i.element});i.cancelHelperRemoval=!1,V.each(i.sortables,function(){var t=this;t.isOver?(t.isOver=0,i.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,s))})},drag:function(i,s,n){V.each(n.sortables,function(){var t=!1,e=this;e.positionAbs=n.positionAbs,e.helperProportions=n.helperProportions,e.offset.click=n.offset.click,e._intersectsWith(e.containerCache)&&(t=!0,V.each(n.sortables,function(){return this.positionAbs=n.positionAbs,this.helperProportions=n.helperProportions,this.offset.click=n.offset.click,t=this!==e&&this._intersectsWith(this.containerCache)&&V.contains(e.element[0],this.element[0])?!1:t})),t?(e.isOver||(e.isOver=1,n._parent=s.helper.parent(),e.currentItem=s.helper.appendTo(e.element).data("ui-sortable-item",!0),e.options._helper=e.options.helper,e.options.helper=function(){return s.helper[0]},i.target=e.currentItem[0],e._mouseCapture(i,!0),e._mouseStart(i,!0,!0),e.offset.click.top=n.offset.click.top,e.offset.click.left=n.offset.click.left,e.offset.parent.left-=n.offset.parent.left-e.offset.parent.left,e.offset.parent.top-=n.offset.parent.top-e.offset.parent.top,n._trigger("toSortable",i),n.dropped=e.element,V.each(n.sortables,function(){this.refreshPositions()}),n.currentItem=n.element,e.fromOutside=n),e.currentItem&&(e._mouseDrag(i),s.position=e.position)):e.isOver&&(e.isOver=0,e.cancelHelperRemoval=!0,e.options._revert=e.options.revert,e.options.revert=!1,e._trigger("out",i,e._uiHash(e)),e._mouseStop(i,!0),e.options.revert=e.options._revert,e.options.helper=e.options._helper,e.placeholder&&e.placeholder.remove(),s.helper.appendTo(n._parent),n._refreshOffsets(i),s.position=n._generatePosition(i,!0),n._trigger("fromSortable",i),n.dropped=!1,V.each(n.sortables,function(){this.refreshPositions()}))})}}),V.ui.plugin.add("draggable","cursor",{start:function(t,e,i){var s=V("body"),i=i.options;s.css("cursor")&&(i._cursor=s.css("cursor")),s.css("cursor",i.cursor)},stop:function(t,e,i){i=i.options;i._cursor&&V("body").css("cursor",i._cursor)}}),V.ui.plugin.add("draggable","opacity",{start:function(t,e,i){e=V(e.helper),i=i.options;e.css("opacity")&&(i._opacity=e.css("opacity")),e.css("opacity",i.opacity)},stop:function(t,e,i){i=i.options;i._opacity&&V(e.helper).css("opacity",i._opacity)}}),V.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,e,i){var s=i.options,n=!1,o=i.scrollParentNotHidden[0],a=i.document[0];o!==a&&"HTML"!==o.tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+o.offsetHeight-t.pageY<s.scrollSensitivity?o.scrollTop=n=o.scrollTop+s.scrollSpeed:t.pageY-i.overflowOffset.top<s.scrollSensitivity&&(o.scrollTop=n=o.scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+o.offsetWidth-t.pageX<s.scrollSensitivity?o.scrollLeft=n=o.scrollLeft+s.scrollSpeed:t.pageX-i.overflowOffset.left<s.scrollSensitivity&&(o.scrollLeft=n=o.scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(t.pageY-V(a).scrollTop()<s.scrollSensitivity?n=V(a).scrollTop(V(a).scrollTop()-s.scrollSpeed):V(window).height()-(t.pageY-V(a).scrollTop())<s.scrollSensitivity&&(n=V(a).scrollTop(V(a).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(t.pageX-V(a).scrollLeft()<s.scrollSensitivity?n=V(a).scrollLeft(V(a).scrollLeft()-s.scrollSpeed):V(window).width()-(t.pageX-V(a).scrollLeft())<s.scrollSensitivity&&(n=V(a).scrollLeft(V(a).scrollLeft()+s.scrollSpeed)))),!1!==n&&V.ui.ddmanager&&!s.dropBehaviour&&V.ui.ddmanager.prepareOffsets(i,t)}}),V.ui.plugin.add("draggable","snap",{start:function(t,e,i){var s=i.options;i.snapElements=[],V(s.snap.constructor!==String?s.snap.items||":data(ui-draggable)":s.snap).each(function(){var t=V(this),e=t.offset();this!==i.element[0]&&i.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:e.top,left:e.left})})},drag:function(t,e,i){for(var s,n,o,a,r,l,h,c,u,d=i.options,p=d.snapTolerance,f=e.offset.left,g=f+i.helperProportions.width,m=e.offset.top,_=m+i.helperProportions.height,v=i.snapElements.length-1;0<=v;v--)l=(r=i.snapElements[v].left-i.margins.left)+i.snapElements[v].width,c=(h=i.snapElements[v].top-i.margins.top)+i.snapElements[v].height,g<r-p||l+p<f||_<h-p||c+p<m||!V.contains(i.snapElements[v].item.ownerDocument,i.snapElements[v].item)?(i.snapElements[v].snapping&&i.options.snap.release&&i.options.snap.release.call(i.element,t,V.extend(i._uiHash(),{snapItem:i.snapElements[v].item})),i.snapElements[v].snapping=!1):("inner"!==d.snapMode&&(s=Math.abs(h-_)<=p,n=Math.abs(c-m)<=p,o=Math.abs(r-g)<=p,a=Math.abs(l-f)<=p,s&&(e.position.top=i._convertPositionTo("relative",{top:h-i.helperProportions.height,left:0}).top),n&&(e.position.top=i._convertPositionTo("relative",{top:c,left:0}).top),o&&(e.position.left=i._convertPositionTo("relative",{top:0,left:r-i.helperProportions.width}).left),a
vendor: 9,875 bytes, line 2064
2064&&(e.position.left=i._convertPositionTo("relative",{top:0,left:l}).left)),u=s||n||o||a,"outer"!==d.snapMode&&(s=Math.abs(h-m)<=p,n=Math.abs(c-_)<=p,o=Math.abs(r-f)<=p,a=Math.abs(l-g)<=p,s&&(e.position.top=i._convertPositionTo("relative",{top:h,left:0}).top),n&&(e.position.top=i._convertPositionTo("relative",{top:c-i.helperProportions.height,left:0}).top),o&&(e.position.left=i._convertPositionTo("relative",{top:0,left:r}).left),a&&(e.position.left=i._convertPositionTo("relative",{top:0,left:l-i.helperProportions.width}).left)),!i.snapElements[v].snapping&&(s||n||o||a||u)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,t,V.extend(i._uiHash(),{snapItem:i.snapElements[v].item})),i.snapElements[v].snapping=s||n||o||a||u)}}),V.ui.plugin.add("draggable","stack",{start:function(t,e,i){var s,i=i.options,i=V.makeArray(V(i.stack)).sort(function(t,e){return(parseInt(V(t).css("zIndex"),10)||0)-(parseInt(V(e).css("zIndex"),10)||0)});i.length&&(s=parseInt(V(i[0]).css("zIndex"),10)||0,V(i).each(function(t){V(this).css("zIndex",s+t)}),this.css("zIndex",s+i.length))}}),V.ui.plugin.add("draggable","zIndex",{start:function(t,e,i){e=V(e.helper),i=i.options;e.css("zIndex")&&(i._zIndex=e.css("zIndex")),e.css("zIndex",i.zIndex)},stop:function(t,e,i){i=i.options;i._zIndex&&V(e.helper).css("zIndex",i._zIndex)}});V.ui.draggable;V.widget("ui.resizable",V.ui.mouse,{version:"1.13.2",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(t,e){if("hidden"===V(t).css("overflow"))return!1;var i=e&&"left"===e?"scrollLeft":"scrollTop",e=!1;if(0<t[i])return!0;try{t[i]=1,e=0<t[i],t[i]=0}catch(t){}return e},_create:function(){var t,e=this.options,i=this;this._addClass("ui-resizable"),V.extend(this,{_aspectRatio:!!e.aspectRatio,aspectRatio:e.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:e.helper||e.ghost||e.animate?e.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(V("<div class='ui-wrapper'></div>").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&V(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();function t(t){V(t).removeData("resizable").removeData("ui-resizable").off(".resizable")}var e;return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!e}},_setupHandles:function(){var t,e,i,s,n,o=this.options,a=this;if(this.handles=o.handles||(V(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=V(),this._addedHandles=V(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},e=0;e<i.length;e++)s="ui-resizable-"+(t=String.prototype.trim.call(i[e])),n=V("<div>"),this._addClass(n,"ui-resizable-handle "+s),n.css({zIndex:o.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(n),this._addedHandles=this._addedHandles.add(n));this._renderAxis=function(t){var e,i,s;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=V(this.handles[e]),this._on(this.handles[e],{mousedown:a._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=V(this.handles[e],this.element),s=/sw|ne|nw|se|n|s/.test(e)?i.outerHeight():i.outerWidth(),i=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(i,s),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){a.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=n&&n[1]?n[1]:"se")}),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)(i=V(this.handles[e])[0])!==t.target&&!V.contains(i,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s=this.options,n=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),s.containment&&(e+=V(s.containment).scrollLeft()||0,i+=V(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:n.width(),height:n.height()},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=V(".ui-resizable-"+this.axis).css("cursor"),V("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e=this.originalMousePosition,i=this.axis,s=t.pageX-e.left||0,e=t.pageY-e.top||0,i=this._change[i];return this._updatePrevProperties(),i&&(e=i.apply(this,[t,s,e]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),e=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),V.isEmptyObject(e)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,n=this.options,o=this;return this._helper&&(s=(e=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:o.sizeDiff.height,i=e?0:o.sizeDiff.width,e={width:o.helper.width()-i,height:o.helper.height()-s},i=parseFloat(o.element.css("left"))+(o.position.left-o.originalPosition.left)||null,s=parseFloat(o.element.css("top"))+(o.position.top-o.originalPosition.top)||null,n.animate||this.element.css(V.extend(e,{top:s,left:i})),o.helper.height(o.size.height),o.helper.width(o.size.width),this._helper&&!n.animate&&this._proportionallyResize()),V("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s=this.options,n={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0};(this._aspectRatio||t)&&(e=n.minHeight*this.aspectRatio,i=n.minWidth/this.aspectRatio,s=n.maxHeight*this.aspectRatio,t=n.maxWidth/this.aspectRatio,e>n.minWidth&&(n.minWidth=e),i>n.minHeight&&(n.minHeight=i),s<n.maxWidth&&(n.maxWidth=s),t<n.maxHeight&&(n.maxHeight=t)),this._vBoundaries=n},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left
vendor: 5,511 bytes, line 2064
2064=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,n=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,h=/sw|nw|w/.test(i),i=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&h&&(t.left=r-e.minWidth),s&&h&&(t.left=r-e.maxWidth),a&&i&&(t.top=l-e.minHeight),n&&i&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e<this._proportionallyResizeElements.length;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,e=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||V("<div></div>").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return V.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e,i){return V.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return V.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return V.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){V.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),V.ui.plugin.add("resizable","animate",{stop:function(e){var i=V(this).resizable("instance"),t=i.options,s=i._proportionallyResizeElements,n=s.length&&/textarea/i.test(s[0].nodeName),o=n&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,a=n?0:i.sizeDiff.width,n={width:i.size.width-a,height:i.size.height-o},a=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,o=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(V.extend(n,o&&a?{top:o,left:a}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&V(s[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),V.ui.plugin.add("resizable","containment",{start:function(){var i,s,n=V(this).resizable("instance"),t=n.options,e=n.element,o=t.containment,a=o instanceof V?o.get(0):/parent/.test(o)?e.parent().get(0):o;a&&(n.containerElement=V(a),/document/.test(o)||o===document?(n.containerOffset={left:0,top:0},n.containerPosition={left:0,top:0},n.parentData={element:V(document),left:0,top:0,width:V(document).width(),height:V(document).height()||document.body.parentNode.scrollHeight}):(i=V(a),s=[],V(["Top","Right","Left","Bottom"]).each(function(t,e){s[t]=n._num(i.css("padding"+e))}),n.containerOffset=i.offset(),n.containerPosition=i.position(),n.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},t=n.containerOffset,e=n.containerSize.height,o=n.containerSize.width,o=n._hasScroll(a,"left")?a.scrollWidth:o,e=n._hasScroll(a)?a.scrollHeight:e,n.parentData={element:a,left:t.left,top:t.top,width:o,height:e}))},resize:function(t){var e=V(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.position,o=e._aspectRatio||t.shiftKey,a={top:0,left:0}
vendor: 22,744 bytes, line 2064
2064,r=e.containerElement,t=!0;r[0]!==document&&/static/.test(r.css("position"))&&(a=s),n.left<(e._helper?s.left:0)&&(e.size.width=e.size.width+(e._helper?e.position.left-s.left:e.position.left-a.left),o&&(e.size.height=e.size.width/e.aspectRatio,t=!1),e.position.left=i.helper?s.left:0),n.top<(e._helper?s.top:0)&&(e.size.height=e.size.height+(e._helper?e.position.top-s.top:e.position.top),o&&(e.size.width=e.size.height*e.aspectRatio,t=!1),e.position.top=e._helper?s.top:0),i=e.containerElement.get(0)===e.element.parent().get(0),n=/relative|absolute/.test(e.containerElement.css("position")),i&&n?(e.offset.left=e.parentData.left+e.position.left,e.offset.top=e.parentData.top+e.position.top):(e.offset.left=e.element.offset().left,e.offset.top=e.element.offset().top),n=Math.abs(e.sizeDiff.width+(e._helper?e.offset.left-a.left:e.offset.left-s.left)),s=Math.abs(e.sizeDiff.height+(e._helper?e.offset.top-a.top:e.offset.top-s.top)),n+e.size.width>=e.parentData.width&&(e.size.width=e.parentData.width-n,o&&(e.size.height=e.size.width/e.aspectRatio,t=!1)),s+e.size.height>=e.parentData.height&&(e.size.height=e.parentData.height-s,o&&(e.size.width=e.size.height*e.aspectRatio,t=!1)),t||(e.position.left=e.prevPosition.left,e.position.top=e.prevPosition.top,e.size.width=e.prevSize.width,e.size.height=e.prevSize.height)},stop:function(){var t=V(this).resizable("instance"),e=t.options,i=t.containerOffset,s=t.containerPosition,n=t.containerElement,o=V(t.helper),a=o.offset(),r=o.outerWidth()-t.sizeDiff.width,o=o.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(n.css("position"))&&V(this).css({left:a.left-s.left-i.left,width:r,height:o}),t._helper&&!e.animate&&/static/.test(n.css("position"))&&V(this).css({left:a.left-s.left-i.left,width:r,height:o})}}),V.ui.plugin.add("resizable","alsoResize",{start:function(){var t=V(this).resizable("instance").options;V(t.alsoResize).each(function(){var t=V(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=V(this).resizable("instance"),s=e.options,n=e.originalSize,o=e.originalPosition,a={height:e.size.height-n.height||0,width:e.size.width-n.width||0,top:e.position.top-o.top||0,left:e.position.left-o.left||0};V(s.alsoResize).each(function(){var t=V(this),s=V(this).data("ui-resizable-alsoresize"),n={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];V.each(e,function(t,e){var i=(s[e]||0)+(a[e]||0);i&&0<=i&&(n[e]=i||null)}),t.css(n)})},stop:function(){V(this).removeData("ui-resizable-alsoresize")}}),V.ui.plugin.add("resizable","ghost",{start:function(){var t=V(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==V.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=V(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=V(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),V.ui.plugin.add("resizable","grid",{resize:function(){var t,e=V(this).resizable("instance"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,a=e.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,l=r[0]||1,h=r[1]||1,c=Math.round((s.width-n.width)/l)*l,u=Math.round((s.height-n.height)/h)*h,d=n.width+c,p=n.height+u,f=i.maxWidth&&i.maxWidth<d,g=i.maxHeight&&i.maxHeight<p,m=i.minWidth&&i.minWidth>d,s=i.minHeight&&i.minHeight>p;i.grid=r,m&&(d+=l),s&&(p+=h),f&&(d-=l),g&&(p-=h),/^(se|s|e)$/.test(a)?(e.size.width=d,e.size.height=p):/^(ne)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.top=o.top-u):/^(sw)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.left=o.left-c):((p-h<=0||d-l<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0<p-h?(e.size.height=p,e.position.top=o.top-u):(p=h-t.height,e.size.height=p,e.position.top=o.top+n.height-p),0<d-l?(e.size.width=d,e.position.left=o.left-c):(d=l-t.width,e.size.width=d,e.position.left=o.left+n.width-d))}});V.ui.resizable;V.widget("ui.dialog",{version:"1.13.2",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var e=V(this).css(t).offset().top;e<0&&V(this).css("top",t.top-e)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&V.fn.draggable&&this._makeDraggable(),this.options.resizable&&V.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?V(t):this.document.find(t||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),(t=e.parent.children().eq(e.index)).length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:V.noop,enable:V.noop,close:function(t){var e=this;this._isOpen&&!1!==this._trigger("beforeClose",t)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||V.ui.safeBlur(V.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){e._trigger("close",t)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!1,s=this.uiDialog.siblings(".ui-front:visible").map(function(){return+V(this).css("z-index")}).get(),s=Math.max.apply(null,s);return s>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",s+1),i=!0),i&&!e&&this._trigger("focus",t),i},open:function(){var t=this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=V(V.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"))},_focusTabbable:function(){var t=this._focusedElement;(t=!(t=!(t=!(t=!(t=t||this.element.find("[autofocus]")).length?this.element.find(":tabbable"):t).length?this.uiDialogButtonPane.find(":tabbable"):t).length?this.uiDialogTitlebarClose.filter(":tabbable"):t).length?this.uiDialog:t).eq(0).trigger("focus")},_restoreTabbableFocus:function(){var t=V.ui.safeActiveElement(this.document[0]);this.uiDialog[0]===t||V.contains(this.uiDialog[0],t)||this._focusTabbable()},_keepFocus:function(t){t.preventDefault(),this._restoreTabbableFocus(),this._delay(this._restoreTabbableFocus)},_createWrapper:function(){this.uiDialog=V("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===V.ui.keyCode.ESCAPE)return t.preventDefault(),void this.close(t);var e,i,s;t.keyCode!==V.ui.keyCode.TAB||t.isDefaultPrevented()||(e=this.uiDialog.find(":tabbable"),i=e.first(),s=e.last(),t.target!==s[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==i[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(this._delay(function(){s.trigger("focus")}),t.preventDefault()):(this._delay(function(){i.trigger("focus")}),t.preventDefault()))},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=V("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(t){V(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=V("<button type='button'></button>").button({label:V("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),t=V("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(t,"ui-dialog-title"),this._title(t),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=V("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=V("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var s=this,t=this.options.buttons;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),V.isEmptyObject(t)||Array.isArray(t)&&!t.length?this._removeClass(this.uiDialog,"ui-dialog-buttons"):(V.each(t,function(t,e){var i;e=V.extend({type:"button"},e="function"==typeof e?{click:e,text:t}:e),i=e.click,t={icon:e.icon,iconPosition:e.iconPosition,showLabel:e.showLabel,icons:e.icons,text:e.text},delete e.click,delete e.icon,delete e.iconPosition,delete e.showLabel,delete e.icons,"boolean"==typeof e.text&&delete e.text,V("<button></button>",e).button(t).appendTo(s.uiButtonSet).on("click",function(){i.apply(s.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){var n=this,o=this.options;function a(t){return{position:t.position,offset:t.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(t,e){n._addClass(V(this),"ui-dialog-dragging"),n._blockFrames(),n._trigger("dragStart",t,a(e))},drag:function(t,e){n._trigger("drag",t,a(e))},stop:function(t,e){var i=e.offset.left-n.document.scrollLeft(),s=e.offset.top-n.document.scrollTop();o.position={my:"left top",at:"left"+(0<=i?"+":"")+i+" top"+(0<=s?"+":"")+s,of:n.window},n._removeClass(V(this),"ui-dialog-dragging"),n._unblockFrames(),n._trigger("dragStop",t,a(e))}})},_makeResizable:function(){var n=this,o=this.options,t=o.resizable,e=this.uiDialog.css("position"),t="string"==typeof t?t:"n,e,s,w,se,sw,ne,nw";function a(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:o.maxWidth,maxHeight:o.maxHeight,minWidth:o.minWidth,minHeight:this._minHeight(),handles:t,start:function(t,e){n._addClass(V(this),"ui-dialog-resizing"),n._blockFrames(),n._trigger("resizeStart",t,a(e))},resize:function(t,e){n._trigger("resize",t,a(e))},stop:function(t,e){var i=n.uiDialog.offset(),s=i.left-n.document.scrollLeft(),i=i.top-n.document.scrollTop();o.height=n.uiDialog.height(),o.width=n.uiDialog.width(),o.position={my:"left top",at:"left"+(0<=s?"+":"")+s+" top"+(0<=i?"+":"")+i,of:n.window},n._removeClass(V(this),"ui-dialog-resizing"),n._unblockFrames(),n._trigger("resizeStop",t,a(e))}}).css("position",e)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=V(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),e=V.inArray(this,t);-1!==e&&t.splice(e,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||this.document.data("ui-dialog-instances",t=[]),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(t){var i=this,s=!1,n={};V.each(t,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(s=!0),t in i.resizableRelatedOptions&&(n[t]=e)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(t,e){var i,s=this.uiDialog;"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:V("<a>").text(""+this.options.closeText).html()}),"draggable"===t&&((i=s.is(":data(ui-draggable)"))&&!e&&s.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&((i=s.is(":data(ui-resizable)"))&&!e&&s.resizable("destroy"),i&&"string"==typeof e&&s.resizable("option","handles",e),i||!1===e||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=V(this);return V("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return!!V(t.target).closest(".ui-dialog").length||!!V(t.target).closest(".ui-datepicker").length},_createOverlay:function(){var i,s;this.options.modal&&(i=V.fn.jquery.substring(0,4),s=!0,this._delay(function(){s=!1}),this.document.data("ui-dialog-overlays")||this.document.on("focusin.ui-dialog",function(t){var e;s||((e=this._trackingInstances()[0])._allowInteraction(t)||(t.preventDefault(),e._focusTabbable(),"3.4."!==i&&"3.5."!==i||e._delay(e._restoreTabbableFocus)))}.bind(this)),this.overlay=V("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1))},_destroyOverlay:function(){var t;this.options.modal&&this.overlay&&((t=this.document.data("ui-dialog-overlays")-1)?this.document.data("ui-dialog-overlays",t):(this.document.off("focusin.ui-dialog"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null)}}),!1!==V.uiBackCompat&&V.widget("ui.dialog",V.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}});V.ui.dialog;function lt(t,e,i){return e<=t&&t<e+i}V.widget("ui.droppable",{version:"1.13.2",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,e=this.options,i=e.accept;this.isover=!1,this.isout=!0,this.accept="function"==typeof i?i:function(t){return t.is(i)},this.proportions=function(){if(!arguments.length)return t=t||{width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};t=arguments[0]},this._addToManager(e.scope),e.addClasses&&this._addClass("ui-droppable")},_addToManager:function(t){V.ui.ddmanager.droppables[t]=V.ui.ddmanager.droppables[t]||[],V.ui.ddmanager.droppables[t].push(this)},_splice:function(t){for(var e=0;e<t.length;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var t=V.ui.ddmanager.droppables[this.options.scope];this._splice(t)},_setOption:function(t,e){var i;"accept"===t?this.accept="function"==typeof e?e:function(t){return t.is(e)}:"scope"===t&&(i=V.ui.ddmanager.droppables[this.options.scope],this._splice(i),this._addToManager(e)),this._super(t,e)},_activate:function(t){var e=V.ui.ddmanager.current;this._addActiveClass(),e&&this._trigger("activate",t,this.ui(e))},_deactivate:function(t){var e=V.ui.ddmanager.current;this._removeActiveClass(),e&&this._trigger("deactivate",t,this.ui(e))},_over:function(t){var e=V.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._addHoverClass(),this._trigger("over",t,this.ui(e)))},_out:function(t){var e=V.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._removeHoverClass(),this._trigger("out",t,this.ui(e)))},_drop:function(e,t){var i=t||V.ui.ddmanager.current,s=!1;return!(!i||(i.currentItem||i.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var t=V(this).droppable("instance");if(t.options.greedy&&!t.options.disabled&&t.options.scope===i.options.scope&&t.accept.call(t.element[0],i.currentItem||i.element)&&V.ui.intersect(i,V.extend(t,{offset:t.element.offset()}),t.options.tolerance,e))return!(s=!0)}),!s&&(!!this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(i)),this.element)))},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}}),V.ui.intersect=function(t,e,i,s){if(!e.offset)return!1;var n=(t.positionAbs||t.position.absolute).left+t.margins.left,o=(t.positionAbs||t.position.absolute).top+t.margins.top,a=n+t.helperProportions.width,r=o+t.helperProportions.height,l=e.offset.left,h=e.offset.top,c=l+e.proportions().width,u=h+e.proportions().height;switch(i){case"fit":return l<=n&&a<=c&&h<=o&&r<=u;case"intersect":return l<n+t.helperProportions.width/2&&a-t.helperProportions.width/2<c&&h<o+t.helperProportions.height/2&&r-t.helperProportions.height/2<u;case"pointer":return lt(s.pageY,h,e.proportions().height)&&lt(s.pageX,l,e.proportions().width);case"touch":return(h<=o&&o<=u||h<=r&&r<=u||o<h&&u<r)&&(l<=n&&n<=c||l<=a&&a<=c||n<l&&c<a);default:return!1}},!(V.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(t,e){var i,s,n=V.ui.ddmanager.droppables[t.options.scope]||[],o=e?e.type:null,a=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();t:for(i=0;i<n.length;i++)if(!(n[i].options.disabled||t&&!n[i].accept.call(n[i].element[0],t.currentItem||t.element))){for(s=0;s<a.length;s++)if(a[s]===n[i].element[0]){n[i].proportions().height=0;continue t}n[i].visible="none"!==n[i].element.css("display"),n[i].visible&&("mousedown"===o&&n[i]._activate.call(n[i],e),n[i].offset=n[i].element.offset(),n[i].proportions({width:n[i].element[0].offsetWidth,height:n[i].element[0].offsetHeight}))}},drop:function(t,e){var i=!1;return V.each((V.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&V.ui.intersect(t,this,this.options.tolerance,e)&&(i=this._drop.call(this,e)||i),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,e)))}),i},dragStart:function(t,e){t.element.parentsUntil("body").on("scroll.droppable",function(){t.options.refreshPositions||V.ui.ddmanager.prepareOffsets(t,e)})},drag:function(n,o){n.options.refreshPositions&&V.ui.ddmanager.prepareOffsets(n,o),V.each(V.ui.ddmanager.droppables[n.options.scope]||[],function(){var t,e,i,s;this.options.disabled||this.greedyChild||!this.visible||(s=!(i=V.ui.intersect(n,this,this.options.tolerance,o))&&this.isover?"isout":i&&!this.isover?"isover":null)&&(this.options.greedy&&(e=this.options.scope,(i=this.element.parents(":data(ui-droppable)").filter(function(){return V(this).droppable("instance").options.scope===e})).length&&((t=V(i[0]).droppable("instance")).greedyChild="isover"===s)),t&&"isover"===s&&(t.isover=!1,t.isout=!0,t._out.call(t,o)),this[s]=!0,this["isout"===s?"isover":"isout"]=!1,this["isover"===s?"_over":"_out"].call(this,o),t&&"isout"===s&&(t.isout=!1,t.isover=!0,t._over.call(t,o)))})},dragStop:function(t,e){t.element.parentsUntil("body").off("scroll.droppable"),t.options.refreshPositions||V.ui.ddmanager.prepareOffsets(t,e)}})!==V.uiBackCompat&&V.widget("ui.droppable",V.ui.droppable,{options:{hoverClass:!1,activeClass:!1}
vendor: 4,941 bytes, line 2064
2064,_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}});V.ui.droppable,V.widget("ui.progressbar",{version:"1.13.2",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=V("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){if(void 0===t)return this.options.value;this.options.value=this._constrainedValue(t),this._refreshValue()},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=!1===t,"number"!=typeof t&&(t=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,e=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).width(e.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,t===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=V("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}}),V.widget("ui.selectable",V.ui.mouse,{version:"1.13.2",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var i=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){i.elementPos=V(i.element[0]).offset(),i.selectees=V(i.options.filter,i.element[0]),i._addClass(i.selectees,"ui-selectee"),i.selectees.each(function(){var t=V(this),e=t.offset(),e={left:e.left-i.elementPos.left,top:e.top-i.elementPos.top};V.data(this,"selectable-item",{element:this,$element:t,left:e.left,top:e.top,right:e.left+t.outerWidth(),bottom:e.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=V("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(i){var s=this,t=this.options;this.opos=[i.pageX,i.pageY],this.elementPos=V(this.element[0]).offset(),this.options.disabled||(this.selectees=V(t.filter,this.element[0]),this._trigger("start",i),V(t.appendTo).append(this.helper),this.helper.css({left:i.pageX,top:i.pageY,width:0,height:0}),t.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var t=V.data(this,"selectable-item");t.startselected=!0,i.metaKey||i.ctrlKey||(s._removeClass(t.$element,"ui-selected"),t.selected=!1,s._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,s._trigger("unselecting",i,{unselecting:t.element}))}),V(i.target).parents().addBack().each(function(){var t,e=V.data(this,"selectable-item");if(e)return t=!i.metaKey&&!i.ctrlKey||!e.$element.hasClass("ui-selected"),s._removeClass(e.$element,t?"ui-unselecting":"ui-selected")._addClass(e.$element,t?"ui-selecting":"ui-unselecting"),e.unselecting=!t,e.selecting=t,(e.selected=t)?s._trigger("selecting",i,{selecting:e.element}):s._trigger("unselecting",i,{unselecting:e.element}),!1}))},_mouseDrag:function(s){if(this.dragged=!0,!this.options.disabled){var t,n=this,o=this.options,a=this.opos[0],r=this.opos[1],l=s.pageX,h=s.pageY;
vendor: 6,948 bytes, line 2064
2064return l<a&&(t=l,l=a,a=t),h<r&&(t=h,h=r,r=t),this.helper.css({left:a,top:r,width:l-a,height:h-r}),this.selectees.each(function(){var t=V.data(this,"selectable-item"),e=!1,i={};t&&t.element!==n.element[0]&&(i.left=t.left+n.elementPos.left,i.right=t.right+n.elementPos.left,i.top=t.top+n.elementPos.top,i.bottom=t.bottom+n.elementPos.top,"touch"===o.tolerance?e=!(i.left>l||i.right<a||i.top>h||i.bottom<r):"fit"===o.tolerance&&(e=i.left>a&&i.right<l&&i.top>r&&i.bottom<h),e?(t.selected&&(n._removeClass(t.$element,"ui-selected"),t.selected=!1),t.unselecting&&(n._removeClass(t.$element,"ui-unselecting"),t.unselecting=!1),t.selecting||(n._addClass(t.$element,"ui-selecting"),t.selecting=!0,n._trigger("selecting",s,{selecting:t.element}))):(t.selecting&&((s.metaKey||s.ctrlKey)&&t.startselected?(n._removeClass(t.$element,"ui-selecting"),t.selecting=!1,n._addClass(t.$element,"ui-selected"),t.selected=!0):(n._removeClass(t.$element,"ui-selecting"),t.selecting=!1,t.startselected&&(n._addClass(t.$element,"ui-unselecting"),t.unselecting=!0),n._trigger("unselecting",s,{unselecting:t.element}))),t.selected&&(s.metaKey||s.ctrlKey||t.startselected||(n._removeClass(t.$element,"ui-selected"),t.selected=!1,n._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,n._trigger("unselecting",s,{unselecting:t.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,V(".ui-unselecting",this.element[0]).each(function(){var t=V.data(this,"selectable-item");i._removeClass(t.$element,"ui-unselecting"),t.unselecting=!1,t.startselected=!1,i._trigger("unselected",e,{unselected:t.element})}),V(".ui-selecting",this.element[0]).each(function(){var t=V.data(this,"selectable-item");i._removeClass(t.$element,"ui-selecting")._addClass(t.$element,"ui-selected"),t.selecting=!1,t.selected=!0,t.startselected=!0,i._trigger("selected",e,{selected:t.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),V.widget("ui.selectmenu",[V.ui.formResetMixin,{version:"1.13.2",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var t=this.element.uniqueId().attr("id");this.ids={element:t,button:t+"-button",menu:t+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=V()},_drawButton:function(){var t,e=this,i=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.trigger("focus"),t.preventDefault()}}),this.element.hide(),this.button=V("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),t=V("<span>").appendTo(this.button),this._addClass(t,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(i).appendTo(this.button),!1!==this.options.width&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){e._rendered||e._refreshMenu()})},_drawMenu:function(){var i=this;this.menu=V("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=V("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,e){t.preventDefault(),i._setSelection(),i._select(e.item.data("ui-selectmenu-item"),t)},focus:function(t,e){e=e.item.data("ui-selectmenu-item");null!=i.focusIndex&&e.index!==i.focusIndex&&(i._trigger("focus",t,{item:e}),i.isOpen||i._select(e,t)),i.focusIndex=e.index,i.button.attr("aria-activedescendant",i.menuItems.eq(e.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t=this.element.find("option");this.menu.empty(),this._parseOptions(t),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,t.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t)))},_position:function(){this.menuWrap.position(V.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(t){var e=V("<span>");return this._setText(e,t.label),this._addClass(e,"ui-selectmenu-text"),e},_renderMenu:function(s,t){var n=this,o="";V.each(t,function(t,e){var i;e.optgroup!==o&&(i=V("<li>",{text:e.optgroup}),n._addClass(i,"ui-selectmenu-optgroup","ui-menu-divider"+(e.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),i.appendTo(s),o=e.optgroup),n._renderItemData(s,e)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(t,e){var i=V("<li>"),s=V("<div>",{title:e.element.attr("title")});return e.disabled&&this._addClass(i,null,"ui-state-disabled"),this._setText(s,e.label),i.append(s).appendTo(t)},_setText:function(t,e){e?t.text(e):t.html("&#160;")},_move:function(t,e){var i,s=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),s+=":not(.ui-state-disabled)"),(s="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](s).eq(-1):i[t+"All"](s).eq(0)).length&&this.menuInstance.focus(e,s)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")}
vendor: 4,336 bytes, line 2064
2064,_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?((t=window.getSelection()).removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.trigger("focus"))},_documentClick:{mousedown:function(t){this.isOpen&&(V(t.target).closest(".ui-selectmenu-menu, #"+V.escapeSelector(this.ids.button)).length||this.close(t))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection()).rangeCount&&(this.range=t.getRangeAt(0)):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(t){var e=!0;switch(t.keyCode){case V.ui.keyCode.TAB:case V.ui.keyCode.ESCAPE:this.close(t),e=!1;break;case V.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(t);break;case V.ui.keyCode.UP:t.altKey?this._toggle(t):this._move("prev",t);break;case V.ui.keyCode.DOWN:t.altKey?this._toggle(t):this._move("next",t);break;case V.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(t):this._toggle(t);break;case V.ui.keyCode.LEFT:this._move("prev",t);break;case V.ui.keyCode.RIGHT:this._move("next",t);break;case V.ui.keyCode.HOME:case V.ui.keyCode.PAGE_UP:this._move("first",t);break;case V.ui.keyCode.END:case V.ui.keyCode.PAGE_DOWN:this._move("last",t);break;default:this.menu.trigger(t),e=!1}e&&t.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){t=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":t,"aria-activedescendant":t}),this.menu.attr("aria-activedescendant",t)},_setOption:function(t,e){var i;"icons"===t&&(i=this.button.find("span.ui-icon"),this._removeClass(i,null,this.options.icons.button)._addClass(i,null,e.button)),this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var t=this.options.appendTo;return t=!(t=!(t=t&&(t.jquery||t.nodeType?V(t):this.document.find(t).eq(0)))||!t[0]?this.element.closest(".ui-front, dialog"):t).length?this.document[0].body:t},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;!1!==t?(null===t&&(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t)):this.button.css("width","")},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(t){var i=this,s=[];t.each(function(t,e){e.hidden||s.push(i._parseOption(V(e),t))}),this.items=s},_parseOption:function(t,e){var i=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),V.widget("ui.slider",V.ui.mouse,{version:"1.13.2",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null}
vendor: 20,223 bytes, line 2064
2064,numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,e=this.options,i=this.element.find(".ui-slider-handle"),s=[],n=e.values&&e.values.length||1;for(i.length>n&&(i.slice(n).remove(),i=i.slice(0,n)),t=i.length;t<n;t++)s.push("<span tabindex='0'></span>");this.handles=i.add(V(s.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(t){V(this).data("ui-slider-handle-index",t).attr("tabIndex",0)})},_createRange:function(){var t=this.options;t.range?(!0===t.range&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:Array.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=V("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==t.range&&"max"!==t.range||this._addClass(this.range,"ui-slider-range-"+t.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(t){var i,s,n,o,e,a,r=this,l=this.options;return!l.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),a={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(a),s=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var e=Math.abs(i-r.values(t));(e<s||s===e&&(t===r._lastChangedValue||r.values(t)===l.min))&&(s=e,n=V(this),o=t)}),!1!==this._start(t,o)&&(this._mouseSliding=!0,this._handleIndex=o,this._addClass(n,null,"ui-state-active"),n.trigger("focus"),e=n.offset(),a=!V(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=a?{left:0,top:0}:{left:t.pageX-e.left-n.width()/2,top:t.pageY-e.top-n.height()/2-(parseInt(n.css("borderTopWidth"),10)||0)-(parseInt(n.css("borderBottomWidth"),10)||0)+(parseInt(n.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,o,i),this._animateOff=!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},e=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,e),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,t="horizontal"===this.orientation?(e=this.elementSize.width,t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),t=t/e;return(t=1<t?1:t)<0&&(t=0),"vertical"===this.orientation&&(t=1-t),e=this._valueMax()-this._valueMin(),e=this._valueMin()+t*e,this._trimAlignValue(e)},_uiHash:function(t,e,i){var s={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var s,n=this.value(),o=this.values();this._hasMultipleValues()&&(s=this.values(e?0:1),n=this.values(e),2===this.options.values.length&&!0===this.options.range&&(i=0===e?Math.min(s,i):Math.max(s,i)),o[e]=i),i!==n&&!1!==this._trigger("slide",t,this._uiHash(e,i,o))&&(this._hasMultipleValues()?this.values(e,i):this.value(i))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(t,e){var i,s,n;if(1<arguments.length)return this.options.values[t]=this._trimAlignValue(e),this._refreshValue(),void this._change(null,t);if(!arguments.length)return this._values();if(!Array.isArray(t))return this._hasMultipleValues()?this._values(t):this.value();for(i=this.options.values,s=t,n=0;n<i.length;n+=1)i[n]=this._trimAlignValue(s[n]),this._change(null,n);this._refreshValue()},_setOption:function(t,e){var i,s=0;switch("range"===t&&!0===this.options.range&&("min"===e?(this.options.value=this._values(0),this.options.values=null):"max"===e&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),Array.isArray(this.options.values)&&(s=this.options.values.length),this._super(t,e),t){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(e),this.handles.css("horizontal"===e?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),i=s-1;0<=i;i--)this._change(null,i);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i;if(arguments.length)return t=this.options.values[t],t=this._trimAlignValue(t);if(this._hasMultipleValues()){for(e=this.options.values.slice(),i=0;i<e.length;i+=1)e[i]=this._trimAlignValue(e[i]);return e}return[]},_trimAlignValue:function(t){if(t<=this._valueMin())return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=0<this.options.step?this.options.step:1,i=(t-this._valueMin())%e,t=t-i;return 2*Math.abs(i)>=e&&(t+=0<i?e:-e),parseFloat(t.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step;(t=Math.round((t-e)/i)*i+e)>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return t=null!==this.options.min?Math.max(t,this._precisionOf(this.options.min)):t},_precisionOf:function(t){var e=t.toString(),t=e.indexOf(".");return-1===t?0:e.length-t-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,t,s,n,o=this.options.range,a=this.options,r=this,l=!this._animateOff&&a.animate,h={};this._hasMultipleValues()?this.handles.each(function(t){i=(r.values(t)-r._valueMin())/(r._valueMax()-r._valueMin())*100,h["horizontal"===r.orientation?"left":"bottom"]=i+"%",V(this).stop(1,1)[l?"animate":"css"](h,a.animate),!0===r.options.range&&("horizontal"===r.orientation?(0===t&&r.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},a.animate),1===t&&r.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:a.animate})):(0===t&&r.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},a.animate),1===t&&r.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:a.animate}))),e=i}):(t=this.value(),s=this._valueMin(),n=this._valueMax(),i=n!==s?(t-s)/(n-s)*100:0,h["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](h,a.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},a.animate),"max"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:100-i+"%"},a.animate),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},a.animate),"max"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:100-i+"%"},a.animate))},_handleEvents:{keydown:function(t){var e,i,s,n=V(t.target).data("ui-slider-handle-index");switch(t.keyCode){case V.ui.keyCode.HOME:case V.ui.keyCode.END:case V.ui.keyCode.PAGE_UP:case V.ui.keyCode.PAGE_DOWN:case V.ui.keyCode.UP:case V.ui.keyCode.RIGHT:case V.ui.keyCode.DOWN:case V.ui.keyCode.LEFT:if(t.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(V(t.target),null,"ui-state-active"),!1===this._start(t,n)))return}switch(s=this.options.step,e=i=this._hasMultipleValues()?this.values(n):this.value(),t.keyCode){case V.ui.keyCode.HOME:i=this._valueMin();break;case V.ui.keyCode.END:i=this._valueMax();break;case V.ui.keyCode.PAGE_UP:i=this._trimAlignValue(e+(this._valueMax()-this._valueMin())/this.numPages);break;case V.ui.keyCode.PAGE_DOWN:i=this._trimAlignValue(e-(this._valueMax()-this._valueMin())/this.numPages);break;case V.ui.keyCode.UP:case V.ui.keyCode.RIGHT:if(e===this._valueMax())return;i=this._trimAlignValue(e+s);break;case V.ui.keyCode.DOWN:case V.ui.keyCode.LEFT:if(e===this._valueMin())return;i=this._trimAlignValue(e-s)}this._slide(t,n,i)},keyup:function(t){var e=V(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,e),this._change(t,e),this._removeClass(V(t.target),null,"ui-state-active"))}}}),V.widget("ui.sortable",V.ui.mouse,{version:"1.13.2",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return e<=t&&t<e+i},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var t=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),V.each(this.items,function(){t._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;0<=t;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,e){var i=null,s=!1,n=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(t),V(t.target).parents().each(function(){if(V.data(this,n.widgetName+"-item")===n)return i=V(this),!1}),!!(i=V.data(t.target,n.widgetName+"-item")===n?V(t.target):i)&&(!(this.options.handle&&!e&&(V(this.options.handle,i).find("*").addBack().each(function(){this===t.target&&(s=!0)}),!s))&&(this.currentItem=i,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(t,e,i){var s,n,o=this.options;if((this.currentContainer=this).refreshPositions(),this.appendTo=V("parent"!==o.appendTo?o.appendTo:this.currentItem.parent()),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},V.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),this.scrollParent=this.placeholder.scrollParent(),V.extend(this.offset,{parent:this._getParentOffset()}),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(n=this.document.find("body"),this.storedCursor=n.css("cursor"),n.css("cursor",o.cursor),this.storedStylesheet=V("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(n)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(s=this.containers.length-1;0<=s;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return V.ui.ddmanager&&(V.ui.ddmanager.current=this),V.ui.ddmanager&&!o.dropBehaviour&&V.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this.helper.parent().is(this.appendTo)||(this.helper.detach().appendTo(this.appendTo),this.offset.parent=this._getParentOffset()),this.position=this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,this.lastPositionAbs=this.positionAbs=this._convertPositionTo("absolute"),this._mouseDrag(t),!0},_scroll:function(t){var e=this.options,i=!1;return this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<e.scrollSensitivity?this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop+e.scrollSpeed:t.pageY-this.overflowOffset.top<e.scrollSensitivity&&(this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop-e.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<e.scrollSensitivity?this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft+e.scrollSpeed:t.pageX-this.overflowOffset.left<e.scrollSensitivity&&(this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft-e.scrollSpeed)):(t.pageY-this.document.scrollTop()<e.scrollSensitivity?i=this.document.scrollTop(this.document.scrollTop()-e.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<e.scrollSensitivity&&(i=this.document.scrollTop(this.document.scrollTop()+e.scrollSpeed)),t.pageX-this.document.scrollLeft()<e.scrollSensitivity?i=this.document.scrollLeft(this.document.scrollLeft()-e.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<e.scrollSensitivity&&(i=this.document.scrollLeft(this.document.scrollLeft()+e.scrollSpeed))),i},_mouseDrag:function(t){var e,i,s,n,o=this.options;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),o.scroll&&!1!==this._scroll(t)&&(this._refreshItemPositions(!0),V.ui.ddmanager&&!o.dropBehaviour&&V.ui.ddmanager.prepareOffsets(this,t)),this.dragDirection={vertical:this._getDragVerticalDirection(),horizontal:this._getDragHorizontalDirection()},e=this.items.length-1;0<=e;e--)if(s=(i=this.items[e]).item[0],(n=this._intersectsWithPointer(i))&&i.instance===this.currentContainer&&!(s===this.currentItem[0]||this.placeholder[1===n?"next":"prev"]()[0]===s||V.contains(this.placeholder[0],s)||"semi-dynamic"===this.options.type&&V.contains(this.element[0],s))){if(this.direction=1===n?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(t,i),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),V.ui.ddmanager&&V.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,e){var i,s,n,o;if(t)return V.ui.ddmanager&&!this.options.dropBehaviour&&V.ui.ddmanager.drop(this,t),this.options.revert?(s=(i=this).placeholder.offset(),o={},(n=this.options.axis)&&"x"!==n||(o.left=s.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),n&&"y"!==n||(o.top=s.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,V(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){i._clear(t)})):this._clear(t,e),!1},cancel:function(){if(this.dragging){this._mouseUp(new V.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var t=this.containers.length-1;0<=t;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),V.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?V(this.domPosition.prev).after(this.currentItem):V(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var t=this._getItemsAsjQuery(e&&e.connected),i=[];return e=e||{},V(t).each(function(){var t=(V(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);t&&i.push((e.key||t[1]+"[]")+"="+(e.key&&e.expression?t[1]:t[2]))}),!i.length&&e.key&&i.push(e.key+"="),i.join("&")},toArray:function(t){var e=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},e.each(function(){i.push(V(t.item||this).attr(t.attribute||"id")||"")}),i},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,l=r+t.height,h=this.offset.click.top,c=this.offset.click.left,h="x"===this.options.axis||r<s+h&&s+h<l,c="y"===this.options.axis||o<e+c&&e+c<a;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?h&&c:o<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<a&&r<s+this.helperProportions.height/2&&n-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var e="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),t="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!(!e||!t)&&(e=this.dragDirection.vertical,t=this.dragDirection.horizontal,this.floating?"right"===t||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this.dragDirection.vertical,t=this.dragDirection.horizontal;return this.floating&&t?"right"===t&&i||"left"===t&&!i:s&&("down"===s&&e||"up"===s
vendor: 4,080 bytes, line 2064
2064&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!=t&&(0<t?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!=t&&(0<t?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(t){var e,i,s,n,o=[],a=[],r=this._connectWith();if(r&&t)for(e=r.length-1;0<=e;e--)for(i=(s=V(r[e],this.document[0])).length-1;0<=i;i--)(n=V.data(s[i],this.widgetFullName))&&n!==this&&!n.options.disabled&&a.push(["function"==typeof n.options.items?n.options.items.call(n.element):V(n.options.items,n.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),n]);function l(){o.push(this)}for(a.push(["function"==typeof this.options.items?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):V(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),e=a.length-1;0<=e;e--)a[e][0].each(l);return V(o)},_removeCurrentsFromItems:function(){var i=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=V.grep(this.items,function(t){for(var e=0;e<i.length;e++)if(i[e]===t.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var e,i,s,n,o,a,r,l,h=this.items,c=[["function"==typeof this.options.items?this.options.items.call(this.element[0],t,{item:this.currentItem}):V(this.options.items,this.element),this]],u=this._connectWith();if(u&&this.ready)for(e=u.length-1;0<=e;e--)for(i=(s=V(u[e],this.document[0])).length-1;0<=i;i--)(n=V.data(s[i],this.widgetFullName))&&n!==this&&!n.options.disabled&&(c.push(["function"==typeof n.options.items?n.options.items.call(n.element[0],t,{item:this.currentItem}):V(n.options.items,n.element),n]),this.containers.push(n));for(e=c.length-1;0<=e;e--)for(o=c[e][1],l=(a=c[e][i=0]).length;i<l;i++)(r=V(a[i])).data(this.widgetName+"-item",o),h.push({item:r,instance:o,width:0,height:0,left:0,top:0})},_refreshItemPositions:function(t){for(var e,i,s=this.items.length-1;0<=s;s--)e=this.items[s],this.currentContainer&&e.instance!==this.currentContainer&&e.item[0]!==this.currentItem[0]||(i=this.options.toleranceElement?V(this.options.toleranceElement,e.item):e.item,t||(e.width=i.outerWidth(),e.height=i.outerHeight()),i=i.offset(),e.left=i.left,e.top=i.top)},refreshPositions:function(t){var e,i;if(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),this._refreshItemPositions(t),this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(e=this.containers.length-1;0<=e;e--)i=this.containers[e].element.offset(),this.containers[e].containerCache.left=i.left,this.containers[e].containerCache.top=i.top,this.containers[e].containerCache.width=this.containers[e].element.outerWidth(),this.containers[e].containerCache.height=this.containers[e].element.outerHeight();return this},_createPlaceholder:function(i){var s,n,o=(i=i||this).options;o.placeholder&&o.placeholder.constructor!==String||(s=o.placeholder,n=i.currentItem[0].nodeName.toLowerCase(),o.placeholder={element:function(){var t=V("<"+n+">",i.document[0]);return i._addClass(t,"ui-sortable-placeholder",s||i.currentItem[0].className)._removeClass(t,"ui-sortable-helper"),"tbody"===n?i._createTrPlaceholder(i.currentItem.find("tr").eq(0),V("<tr>",i.document[0]).appendTo(t)):"tr"===n?i._createTrPlaceholder(i.currentItem,t):"img"===n&&t.attr("src",i.currentItem.attr("src")),s||t.css("visibility","hidden"),t},update:function(t,e){s&&!o.forcePlaceholderSize||(e.height()&&(!o.forcePlaceholderSize||"tbody"!==n&&"tr"!==n)||e.height(i.currentItem.innerHeight()-parseInt(i.currentItem.css("paddingTop")||0,10)-parseInt(i.currentItem.css("paddingBottom")||0,10)),e.width()
vendor: 7,741 bytes, line 2064
2064||e.width(i.currentItem.innerWidth()-parseInt(i.currentItem.css("paddingLeft")||0,10)-parseInt(i.currentItem.css("paddingRight")||0,10)))}}),i.placeholder=V(o.placeholder.element.call(i.element,i.currentItem)),i.currentItem.after(i.placeholder),o.placeholder.update(i,i.placeholder)},_createTrPlaceholder:function(t,e){var i=this;t.children().each(function(){V("<td>&#160;</td>",i.document[0]).attr("colspan",V(this).attr("colspan")||1).appendTo(e)})},_contactContainers:function(t){for(var e,i,s,n,o,a,r,l,h,c=null,u=null,d=this.containers.length-1;0<=d;d--)V.contains(this.currentItem[0],this.containers[d].element[0])||(this._intersectsWith(this.containers[d].containerCache)?c&&V.contains(this.containers[d].element[0],c.element[0])||(c=this.containers[d],u=d):this.containers[d].containerCache.over&&(this.containers[d]._trigger("out",t,this._uiHash(this)),this.containers[d].containerCache.over=0));if(c)if(1===this.containers.length)this.containers[u].containerCache.over||(this.containers[u]._trigger("over",t,this._uiHash(this)),this.containers[u].containerCache.over=1);else{for(i=1e4,s=null,n=(l=c.floating||this._isFloating(this.currentItem))?"left":"top",o=l?"width":"height",h=l?"pageX":"pageY",e=this.items.length-1;0<=e;e--)V.contains(this.containers[u].element[0],this.items[e].item[0])&&this.items[e].item[0]!==this.currentItem[0]&&(a=this.items[e].item.offset()[n],r=!1,t[h]-a>this.items[e][o]/2&&(r=!0),Math.abs(t[h]-a)<i&&(i=Math.abs(t[h]-a),s=this.items[e],this.direction=r?"up":"down"));(s||this.options.dropOnEmpty)&&(this.currentContainer!==this.containers[u]?(s?this._rearrange(t,s,null,!0):this._rearrange(t,null,this.containers[u].element,!0),this._trigger("change",t,this._uiHash()),this.containers[u]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[u],this.options.placeholder.update(this.currentContainer,this.placeholder),this.scrollParent=this.placeholder.scrollParent(),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this.containers[u]._trigger("over",t,this._uiHash(this)),this.containers[u].containerCache.over=1):this.currentContainer.containerCache.over||(this.containers[u]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1))}},_createHelper:function(t){var e=this.options,t="function"==typeof e.helper?V(e.helper.apply(this.element[0],[t,this.currentItem])):"clone"===e.helper?this.currentItem.clone():this.currentItem;return t.parents("body").length||this.appendTo[0].appendChild(t[0]),t[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),t[0].style.width&&!e.forceHelperSize||t.width(this.currentItem.width()),t[0].style.height&&!e.forceHelperSize||t.height(this.currentItem.height()),t},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),"left"in(t=Array.isArray(t)?{left:+t[0],top:+t[1]||0}:t)&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&V.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),{top:(t=this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&V.ui.ie?{top:0,left:0}:t).top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,i=this.options;"parent"===i.containment&&(i.containment=this.helper[0].parentNode),"document"!==i.containment&&"window"!==i.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===i.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===i.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(i.containment)||(t=V(i.containment)[0],e=V(i.containment).offset(),i="hidden"!==V(t).css("overflow"),this.containment=[e.left+(parseInt(V(t).css("borderLeftWidth"),10)||0)+(parseInt(V(t).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(V(t).css("borderTopWidth"),10)||0)+(parseInt(V(t).css("paddingTop"),10)||0)-this.margins.top,e.left+(i?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(V(t).css("borderLeftWidth"),10)||0)-(parseInt(V(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(i?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(V(t).css("borderTopWidth"),10)||0)-(parseInt(V(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,e){e=e||this.position;var i="absolute"===t?1:-1,s="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&V.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,t=/(html|body)/i.test(s[0].tagName);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():t?0:s.scrollTop())*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():t?0:s.scrollLeft())*i}},_generatePosition:function(t){var e=this.options,i=t.pageX,s=t.pageY,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&V.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(i=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(s=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(i=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)),e.grid&&(t=this.originalPageY+Math.round((s-this.originalPageY)/e.grid[1])*e.grid[1],s=!this.containment||t-this.offset.click.top>=this.containment[1]&&t-this.offset.click.top<=this.containment[3]?t:t-this.offset.click.top>=this.containment[1]?t-e.grid[1]:t+e.grid[1],t=this.originalPageX+Math.round((i-this.originalPageX)/e.grid[
vendor: 4,194 bytes, line 2064
20640])*e.grid[0],i=!this.containment||t-this.offset.click.left>=this.containment[0]&&t-this.offset.click.left<=this.containment[2]?t:t-this.offset.click.left>=this.containment[0]?t-e.grid[0]:t+e.grid[0])),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop()),left:i-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function n(e,i,s){return function(t){s._trigger(e,t,i._uiHash(i))}}for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;0<=i;i--)e||s.push(n("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(n("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i<s.length;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===V.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(t){var e=t||this;return{helper:e.helper,placeholder:e.placeholder||V([]),position:e.position,originalPosition:e.originalPosition,offset:e.positionAbs,item:e.currentItem,sender:t?t.element:null}}});function ht(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}V.widget("ui.spinner",{version:"1.13.2",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var s=this._super(),n=this.element;return V.each(["min","max","step"],function(t,e){var i=n.attr(e);null!=i&&i.length&&(s[e]=i)}),s}
vendor: 5,973 bytes, line 2064
2064,_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t))},mousewheel:function(t,e){var i=V.ui.safeActiveElement(this.document[0]);if(this.element[0]===i&&e){if(!this.spinning&&!this._start(t))return!1;this._spin((0<e?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(t){var e;function i(){this.element[0]===V.ui.safeActiveElement(this.document[0])||(this.element.trigger("focus"),this.previous=e,this._delay(function(){this.previous=e}))}e=this.element[0]===V.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),t.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),!1!==this._start(t)&&this._repeat(null,V(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){if(V(t.currentTarget).hasClass("ui-state-active"))return!1!==this._start(t)&&void this._repeat(null,V(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&0<this.uiSpinner.height()&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(t){var e=this.options,i=V.ui.keyCode;switch(t.keyCode){case i.UP:return this._repeat(null,1,t),!0;case i.DOWN:return this._repeat(null,-1,t),!0;case i.PAGE_UP:return this._repeat(null,e.page,t),!0;case i.PAGE_DOWN:return this._repeat(null,-e.page,t),!0}return!1},_start:function(t){return!(!this.spinning&&!1===this._trigger("start",t))&&(this.counter||(this.counter=1),this.spinning=!0)},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&!1===this._trigger("spin",e,{value:i})||(this._value(i),this.counter++)},_increment:function(t){var e=this.options.incremental;return e?"function"==typeof e?e(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return t=null!==this.options.min?Math.max(t,this._precisionOf(this.options.min)):t},_precisionOf:function(t){var e=t.toString(),t=e.indexOf(".");return-1===t?0:e.length-t-1},_adjustValue:function(t){var e=this.options,i=null!==e.min?e.min:0,s=t-i;return t=i+Math.round(s/e.step)*e.step,t=parseFloat(t.toFixed(this._precision())),null!==e.max&&t>e.max?e.max:null!==e.min&&t<e.min?e.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){var i;if("culture"===t||"numberFormat"===t)return i=this._parse(this.element.val()),this.options[t]=e,void this.element.val(this._format(i));"max"!==t&&"min"!==t&&"step"!==t||"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(i=this.buttons.first().find(".ui-icon"),this._removeClass(i,null,this.options.icons.up),this._addClass(i,null,e.up),i=this.buttons.last().find(".ui-icon"),this._removeClass(i,null,this.options.icons.down),this._addClass(i,null,e.down)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:ht(function(t){this._super(t)}),_parse:function(t){return""===(t="string"==typeof t&&""!==t?window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t:t)||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null!==t&&t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&null!==(i=this._parse(t))&&(e||(i=this._adjustValue(i)),t=this._format(i)),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:ht(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:ht(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:ht(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:ht(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){if(!arguments.length)return this._parse(this.element.val());ht(this._value).call(this,t)},widget:function(){return this.uiSpinner}}
vendor: 11,349 bytes, line 2064
2064),!1!==V.uiBackCompat&&V.widget("ui.spinner",V.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}});var ct;V.ui.spinner;V.widget("ui.tabs",{version:"1.13.2",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:(ct=/#.*$/,function(t){var e=t.href.replace(ct,""),i=location.href.replace(ct,"");try{e=decodeURIComponent(e)}catch(t){}try{i=decodeURIComponent(i)}catch(t){}return 1<t.hash.length&&e===i}),_create:function(){var e=this,t=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,t.collapsible),this._processTabs(),t.active=this._initialActive(),Array.isArray(t.disabled)&&(t.disabled=V.uniqueSort(t.disabled.concat(V.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),!1!==this.options.active&&this.anchors.length?this.active=this._findActive(t.active):this.active=V(),this._refresh(),this.active.length&&this.load(t.active)},_initialActive:function(){var i=this.options.active,t=this.options.collapsible,s=location.hash.substring(1);return null===i&&(s&&this.tabs.each(function(t,e){if(V(e).attr("aria-controls")===s)return i=t,!1}),null!==(i=null===i?this.tabs.index(this.tabs.filter(".ui-tabs-active")):i)&&-1!==i||(i=!!this.tabs.length&&0)),!1!==i&&-1===(i=this.tabs.index(this.tabs.eq(i)))&&(i=!t&&0),i=!t&&!1===i&&this.anchors.length?0:i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):V()}},_tabKeydown:function(t){var e=V(V.ui.safeActiveElement(this.document[0])).closest("li"),i=this.tabs.index(e),s=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case V.ui.keyCode.RIGHT:case V.ui.keyCode.DOWN:i++;break;case V.ui.keyCode.UP:case V.ui.keyCode.LEFT:s=!1,i--;break;case V.ui.keyCode.END:i=this.anchors.length-1;break;case V.ui.keyCode.HOME:i=0;break;case V.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i);case V.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i!==this.options.active&&i);default:return}t.preventDefault(),clearTimeout(this.activating),i=this._focusNextTab(i,s),t.ctrlKey||t.metaKey||(e.attr("aria-selected","false"),this.tabs.eq(i).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",i)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===V.ui.keyCode.UP&&(t.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(t){return t.altKey&&t.keyCode===V.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===V.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,e){var i=this.tabs.length-1;for(;-1!==V.inArray(t=(t=i<t?0:t)<0?i:t,this.options.disabled);)t=e?t+1:t-1;return t},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){"active"!==t?(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||!1!==this.options.active||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e)):this._activate(e)},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,e=this.tablist.children(":has(a[href])");t.disabled=V.map(e.filter(".ui-state-disabled"),function(t){return e.index(t)}),this._processTabs(),!1!==t.active&&this.anchors.length?this.active.length&&!V.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=V()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=V()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var l=this,t=this.tabs,e=this.anchors,i=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(t){V(this).is(".ui-state-disabled")&&t.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){V(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return V("a",this)[0]}).attr({tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=V(),this.anchors.each(function(t,e){var i,s,n,o=V(e).uniqueId().attr("id"),a=V(e).closest("li"),r=a.attr("aria-controls");l._isLocal(e)?(n=(i=e.hash).substring(1),s=l.element.find(l._sanitizeSelector(i))):(n=a.attr("aria-controls")||V({}).uniqueId()[0].id,(s=l.element.find(i="#"+n)).length||(s=l._createPanel(n)).insertAfter(l.panels[t-1]||l.tablist),s.attr("aria-live","polite")),s.length&&(l.panels=l.panels.add(s)),r&&a.data("ui-tabs-aria-controls",r),a.attr({"aria-controls":n,"aria-labelledby":o}),s.attr("aria-labelledby",o)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),t&&(this._off(t.not(this.tabs)),this._off(e.not(this.anchors)),this._off(i.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(t){return V("<div>").attr("id",t).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(t){var e,i;for(Array.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1),i=0;e=this.tabs[i];i++)e=V(e),!0===t||-1!==V.inArray(i,t)?(e.attr("aria-disabled","true"),this._addClass(e,null,"ui-state-disabled")):(e.removeAttr("aria-disabled"),this._removeClass(e,null,"ui-state-disabled"));this.options.disabled=t,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===t)},_setupEvents:function(t){var i={};t&&V.each(t.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,e=this.element.parent();"fill"===t?(i=e.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=V(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=V(this).outerHeight(!0)}),this.panels.each(function(){V(this).height(Math.max(0,i-V(this).innerHeight()+V(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,V(this).height("").height())}).height(i))},_eventHandler:function(t){var e=this.options,i=this.active,s=V(t.currentTarget).closest("li"),n=s[0]===i[0],o=n&&e.collapsible,a=o?V():this._getPanelForTab(s),r=i.length?this._getPanelForTab(i):V(),i={oldTab:i,oldPanel:r,newTab:o?V():s,newPanel:a};t.preventDefault(),s.hasClass("ui-state-disabled")||s.hasClass("ui-tabs-loading")||this.running||n&&!e.collapsible||!1===this._trigger("beforeActivate",t,i)||(e.active=!o&&this.tabs.index(s),this.active=n?V():s,this.xhr&&this.xhr.abort(),r.length||a.length||V.error("jQuery UI Tabs: Mismatching fragment identifier."),a.length&&this.load(this.tabs.index(s),t),this._toggle(t,i))},_toggle:function(t,e){var i=this,s=e.newPanel,n=e.oldPanel;function o(){i.running=!1,i._trigger("activate",t,e)}function a(){i._addClass(e.newTab.closest("li"),"ui-tabs-active","ui-state-active"),s.length&&i.options.show?i._show(s,i.options.show,o):(s.show(),o())}this.running=!0,n.length&&this.options.hide?this._hide(n,this.options.hide,function(){i._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),a()}):(this._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),n.hide(),a()),n.attr("aria-hidden","true"),e.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),s.length&&n.length?e.oldTab.attr("tabIndex",-1):s.length&&this.tabs.filter(function(){return 0===V(this).attr("tabIndex")}).attr("tabIndex",-1),s.attr("aria-hidden","false"),e.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var t=this._findActive(t);t[0]!==this.active[0]&&(t=(t=!t.length?this.active:t).find(".ui-tabs-anchor")[0],this._eventHandler({target:t,currentTarget:t,preventDefault:V.noop}))},_findActive:function(t){return!1===t?V():this.tabs.eq(t)},_getIndex:function(t){return t="string"==typeof t?this.anchors.index(this.anchors.filter("[href$='"+V.escapeSelector(t)+"']")):t},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){V.data(this,"ui-tabs-destroy")?V(this).remove():V(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var t=V(this),e=t.data("ui-tabs-aria-controls");e?t.attr("aria-controls",e).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var t=this.options.disabled;!1!==t&&(t=void 0!==i&&(i=this._getIndex(i),Array.isArray(t)?V.map(t,function(t){return t!==i?t:null}):V.map(this.tabs,function(t,e){return e!==i?e:null})),this._setOptionDisabled(t))},disable:function(t){var e=this.options.disabled;if(!0!==e){if(void 0===t)e=!0;else{if(t=this._getIndex(t),-1!==V.inArray(t,e))return;e=Array.isArray(e)?V.merge([t],e).sort():[t]}this._setOptionDisabled(e)}},load:function(t,s){t=this._getIndex(t);function n(t,e){"abort"===e&&o.panels.stop(!1,!0),o._removeClass(i,"ui-tabs-loading"),a.removeAttr("aria-busy"),t===o.xhr&&delete o.xhr}var o=this,i=this.tabs.eq(t),t=i.find(".ui-tabs-anchor"),a=this._getPanelForTab(i),r={tab:i,panel:a};this._isLocal(t[0])||(this.xhr=V.ajax(this._ajaxSettings(t,s,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(i,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,
vendor: 8,264 bytes, lines 2064-2074
2064i){setTimeout(function(){a.html(t),o._trigger("load",s,r),n(i,e)},1)}).fail(function(t,e){setTimeout(function(){n(t,e)},1)})))},_ajaxSettings:function(t,i,s){var n=this;return{url:t.attr("href").replace(/#.*$/,""),beforeSend:function(t,e){return n._trigger("beforeLoad",i,V.extend({jqXHR:t,ajaxSettings:e},s))}}},_getPanelForTab:function(t){t=V(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+t))}}),!1!==V.uiBackCompat&&V.widget("ui.tabs",V.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}});V.ui.tabs;V.widget("ui.tooltip",{version:"1.13.2",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var t=V(this).attr("title");return V("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(t,e){var i=(t.attr("aria-describedby")||"").split(/\s+/);i.push(e),t.data("ui-tooltip-id",e).attr("aria-describedby",String.prototype.trim.call(i.join(" ")))},_removeDescribedBy:function(t){var e=t.data("ui-tooltip-id"),i=(t.attr("aria-describedby")||"").split(/\s+/),e=V.inArray(e,i);-1!==e&&i.splice(e,1),t.removeData("ui-tooltip-id"),(i=String.prototype.trim.call(i.join(" ")))?t.attr("aria-describedby",i):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=V("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=V([])},_setOption:function(t,e){var i=this;this._super(t,e),"content"===t&&V.each(this.tooltips,function(t,e){i._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var s=this;V.each(this.tooltips,function(t,e){var i=V.Event("blur");i.target=i.currentTarget=e.element[0],s.close(i,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var t=V(this);if(t.is("[title]"))return t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")}))},_enable:function(){this.disabledTitles.each(function(){var t=V(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))}),this.disabledTitles=V([])},open:function(t){var i=this,e=V(t?t.target:this.element).closest(this.options.items);e.length&&!e.data("ui-tooltip-id")&&(e.attr("title")&&e.data("ui-tooltip-title",e.attr("title")),e.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&e.parents().each(function(){var t,e=V(this);e.data("ui-tooltip-open")&&((t=V.Event("blur")).target=t.currentTarget=this,i.close(t,!0)),e.attr("title")&&(e.uniqueId(),i.parents[this.id]={element:this,title:e.attr("title")},e.attr("title",""))}),this._registerCloseHandlers(t,e),this._updateContent(e,t))},_updateContent:function(e,i){var t=this.options.content,s=this,n=i?i.type:null;if("string"==typeof t||t.nodeType||t.jquery)return this._open(i,e,t);(t=t.call(e[0],function(t){s._delay(function(){e.data("ui-tooltip-open")&&(i&&(i.type=n),this._open(i,e,t))})}))&&this._open(i,e,t)},_open:function(t,e,i){var s,n,o,a=V.extend({},this.options.position);function r(t){a.of=t,n.is(":hidden")||n.position(a)}i&&((s=this._find(e))?s.tooltip.find(".ui-tooltip-content").html(i):(e.is("[title]")&&(t&&"mouseover"===t.type?e.attr("title",""):e.removeAttr("title")),s=this._tooltip(e),n=s.tooltip,this._addDescribedBy(e,n.attr("id")),n.find(".ui-tooltip-content").html(i),this.liveRegion.children().hide(),(i=V("<div>").html(n.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"),i.removeAttr("id").find("[id]").removeAttr("id"),i.appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:r}),r(t)):n.position(V.extend({of:e},this.options.position)),n.hide(),this._show(n,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(o=this.delayedShow=setInterval(function(){n.is(":visible")&&(r(a.of),clearInterval(o))},13)),this._trigger("open",t,{tooltip:n})))},_registerCloseHandlers:function(t,e){var i={keyup:function(t){t.keyCode===V.ui.keyCode.ESCAPE&&((t=V.Event(t)).currentTarget=e[0],this.close(t,!0))}};e[0]!==this.element[0]&&(i.remove=function(){var t=this._find(e);t&&this._removeTooltip(t.tooltip)}),t&&"mouseover"!==t.type||(i.mouseleave="close"),t&&"focusin"!==t.type||(i.focusout="close"),this._on(!0,e,i)},close:function(t){var e,i=this,s=V(t?t.currentTarget:this.element),n=this._find(s);n?(e=n.tooltip,n.closing||(clearInterval(this.delayedShow),s.data("ui-tooltip-title")&&!s.attr("title")&&s.attr("title",s.data("ui-tooltip-title")),this._removeDescribedBy(s),n.hiding=!0,e.stop(!0),this._hide(e,this.options.hide,function(){i._removeTooltip(V(this))}),s.removeData("ui-tooltip-open"),this._off(s,"mouseleave focusout keyup"),s[0]!==this.element[0]&&this._off(s,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&V.each(this.parents,function(t,e){V(e.element).attr("title",e.title),delete i.parents[t]}),n.closing=!0,this._trigger("close",t,{tooltip:e}),n.hiding||(n.closing=!1))):s.removeData("ui-tooltip-open")},_tooltip:function(t){var e=V("<div>").attr("role","tooltip"),i=V("<div>").appendTo(e),s=e.uniqueId().attr("id");return this._addClass(i,"ui-tooltip-content"),this._addClass(e,"ui-tooltip","ui-widget ui-widget-content"),e.appendTo(this._appendTo(t)),this.tooltips[s]={element:t,tooltip:e}},_find:function(t){t=t.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(t){clearInterval(this.delayedShow),t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){t=t.closest(".ui-front, dialog");return t=!t.length?this.document[0].body:t},_destroy:function(){var s=this;V.each(this.tooltips,function(t,e){var i=V.Event("blur"),e=e.element;i.target=i.currentTarget=e[0],s.close(i,!0),V("#"+t).remove(),e.data("ui-tooltip-title")&&(e.attr("title")||e.attr("title",e.data("ui-tooltip-title")),e.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),!1!==V.uiBackCompat&&V.widget("ui.tooltip",V.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}});V.ui.tooltip});
2065/*!
2066 * @fileOverview TouchSwipe - jQuery Plugin
2067 *
2068 * @author Matt Bryson
2069 * @license
2070 * Copyright (c) 2010-2015 Matt Bryson
2071 * Dual licensed under the MIT or GPL Version 2 licenses.
2072 *
2073 */
2074!function(factory){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],factory):factory("undefined"!=typeof module&&module.exports?require("jquery"):jQuery)}(function($){"use strict";function init(options){return!options||void 0!==options.allowPageScroll||void 0===options.swipe&&void 0===options.swipeStatus||(options.allowPageScroll=NONE),void 0!==options.click&&void 0===options.tap&&(options.tap=options.click),options||(options={}),options=$.extend({},$.fn.swipe.defaults,options),this.each(function(){var $this=$(this),plugin=$this.data(PLUGIN_NS);plugin||(plugin=new TouchSwipe(this,options),$this.data(PLUGIN_NS,plugin))})}function TouchSwipe(element,options){function touchStart(jqEvent){if(!(getTouchInProgress()||$(jqEvent.target).closest(options.excludedElements,$element).length>0)){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;if(!event.pointerType||"mouse"!=event.pointerType||0!=options.fallbackToMouseEvents){var ret,touches=event.touches,evt=touches?touches[0]:event;return phase=PHASE_START,touches?fingerCount=touches.length:options.preventDefaultEvents!==!1&&jqEvent.preventDefault(),distance=0,direction=null,currentDirection=null,pinchDirection=null,duration=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,pinchDistance=0,maximumsMap=createMaximumsData(),cancelMultiFingerRelease(),createFingerData(0,evt),!touches||fingerCount===options.fingers||options.fingers===ALL_FINGERS||hasPinches()?(startTime=getTimeStamp(),2==fingerCount&&(createFingerData(1,touches[1]),startTouchesDistance=endTouchesDistance=calculateTouchesDistance(fingerData[0].start,f
vendor: 16,495 bytes, line 2074
2074ingerData[1].start)),(options.swipeStatus||options.pinchStatus)&&(ret=triggerHandler(event,phase))):ret=!1,ret===!1?(phase=PHASE_CANCEL,triggerHandler(event,phase),ret):(options.hold&&(holdTimeout=setTimeout($.proxy(function(){$element.trigger("hold",[event.target]),options.hold&&(ret=options.hold.call($element,event,event.target))},this),options.longTapThreshold)),setTouchInProgress(!0),null)}}}function touchMove(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;if(phase!==PHASE_END&&phase!==PHASE_CANCEL&&!inMultiFingerRelease()){var ret,touches=event.touches,evt=touches?touches[0]:event,currentFinger=updateFingerData(evt);if(endTime=getTimeStamp(),touches&&(fingerCount=touches.length),options.hold&&clearTimeout(holdTimeout),phase=PHASE_MOVE,2==fingerCount&&(0==startTouchesDistance?(createFingerData(1,touches[1]),startTouchesDistance=endTouchesDistance=calculateTouchesDistance(fingerData[0].start,fingerData[1].start)):(updateFingerData(touches[1]),endTouchesDistance=calculateTouchesDistance(fingerData[0].end,fingerData[1].end),pinchDirection=calculatePinchDirection(fingerData[0].end,fingerData[1].end)),pinchZoom=calculatePinchZoom(startTouchesDistance,endTouchesDistance),pinchDistance=Math.abs(startTouchesDistance-endTouchesDistance)),fingerCount===options.fingers||options.fingers===ALL_FINGERS||!touches||hasPinches()){if(direction=calculateDirection(currentFinger.start,currentFinger.end),currentDirection=calculateDirection(currentFinger.last,currentFinger.end),validateDefaultEvent(jqEvent,currentDirection),distance=calculateDistance(currentFinger.start,currentFinger.end),duration=calculateDuration(),setMaxDistance(direction,distance),ret=triggerHandler(event,phase),!options.triggerOnTouchEnd||options.triggerOnTouchLeave){var inBounds=!0;if(options.triggerOnTouchLeave){var bounds=getbounds(this);inBounds=isInBounds(currentFinger.end,bounds)}!options.triggerOnTouchEnd&&inBounds?phase=getNextPhase(PHASE_MOVE):options.triggerOnTouchLeave&&!inBounds&&(phase=getNextPhase(PHASE_END)),phase!=PHASE_CANCEL&&phase!=PHASE_END||triggerHandler(event,phase)}}else phase=PHASE_CANCEL,triggerHandler(event,phase);ret===!1&&(phase=PHASE_CANCEL,triggerHandler(event,phase))}}function touchEnd(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent,touches=event.touches;if(touches){if(touches.length&&!inMultiFingerRelease())return startMultiFingerRelease(event),!0;if(touches.length&&inMultiFingerRelease())return!0}return inMultiFingerRelease()&&(fingerCount=fingerCountAtRelease),endTime=getTimeStamp(),duration=calculateDuration(),didSwipeBackToCancel()||!validateSwipeDistance()?(phase=PHASE_CANCEL,triggerHandler(event,phase)):options.triggerOnTouchEnd||options.triggerOnTouchEnd===!1&&phase===PHASE_MOVE?(options.preventDefaultEvents!==!1&&jqEvent.preventDefault(),phase=PHASE_END,triggerHandler(event,phase)):!options.triggerOnTouchEnd&&hasTap()?(phase=PHASE_END,triggerHandlerForGesture(event,phase,TAP)):phase===PHASE_MOVE&&(phase=PHASE_CANCEL,triggerHandler(event,phase)),setTouchInProgress(!1),null}function touchCancel(){fingerCount=0,endTime=0,startTime=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,cancelMultiFingerRelease(),setTouchInProgress(!1)}function touchLeave(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;options.triggerOnTouchLeave&&(phase=getNextPhase(PHASE_END),triggerHandler(event,phase))}function removeListeners(){$element.unbind(START_EV,touchStart),$element.unbind(CANCEL_EV,touchCancel),$element.unbind(MOVE_EV,touchMove),$element.unbind(END_EV,touchEnd),LEAVE_EV&&$element.unbind(LEAVE_EV,touchLeave),setTouchInProgress(!1)}function getNextPhase(currentPhase){var nextPhase=currentPhase,validTime=validateSwipeTime(),validDistance=validateSwipeDistance(),didCancel=didSwipeBackToCancel();return!validTime||didCancel?nextPhase=PHASE_CANCEL:!validDistance||currentPhase!=PHASE_MOVE||options.triggerOnTouchEnd&&!options.triggerOnTouchLeave?!validDistance&&currentPhase==PHASE_END&&options.triggerOnTouchLeave&&(nextPhase=PHASE_CANCEL):nextPhase=PHASE_END,nextPhase}function triggerHandler(event,phase){var ret,touches=event.touches;return(didSwipe()||hasSwipes())&&(ret=triggerHandlerForGesture(event,phase,SWIPE)),(didPinch()||hasPinches())&&ret!==!1&&(ret=triggerHandlerForGesture(event,phase,PINCH)),didDoubleTap()&&ret!==!1?ret=triggerHandlerForGesture(event,phase,DOUBLE_TAP):didLongTap()&&ret!==!1?ret=triggerHandlerForGesture(event,phase,LONG_TAP):didTap()&&ret!==!1&&(ret=triggerHandlerForGesture(event,phase,TAP)),phase===PHASE_CANCEL&&touchCancel(event),phase===PHASE_END&&(touches?touches.length||touchCancel(event):touchCancel(event)),ret}function triggerHandlerForGesture(event,phase,gesture){var ret;if(gesture==SWIPE){if($element.trigger("swipeStatus",[phase,direction||null,distance||0,duration||0,fingerCount,fingerData,currentDirection]),options.swipeStatus&&(ret=options.swipeStatus.call($element,event,phase,direction||null,distance||0,duration||0,fingerCount,fingerData,currentDirection),ret===!1))return!1;if(phase==PHASE_END&&validateSwipe()){if(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),$element.trigger("swipe",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipe&&(ret=options.swipe.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection),ret===!1))return!1;switch(direction){case LEFT:$element.trigger("swipeLeft",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeLeft&&(ret=options.swipeLeft.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case RIGHT:$element.trigger("swipeRight",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeRight&&(ret=options.swipeRight.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case UP:$element.trigger("swipeUp",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeUp&&(ret=options.swipeUp.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case DOWN:$element.trigger("swipeDown",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeDown&&(ret=options.swipeDown.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection))}}}if(gesture==PINCH){if($element.trigger("pinchStatus",[phase,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchStatus&&(ret=options.pinchStatus.call($element,event,phase,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData),ret===!1))return!1;if(phase==PHASE_END&&validatePinch())switch(pinchDirection){case IN:$element.trigger("pinchIn",[pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchIn&&(ret=options.pinchIn.call($element,event,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData));break;case OUT:$element.trigger("pinchOut",[pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchOut&&(ret=options.pinchOut.call($element,event,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData))}}return gesture==TAP?phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),hasDoubleTap()&&!inDoubleTap()?(doubleTapStartTime=getTimeStamp(),singleTapTimeout=setTimeout($.proxy(function(){doubleTapStartTime=null,$element.trigger("tap",[event.target]),options.tap&&(ret=options.tap.call($element,event,event.target))},this),options.doubleTapThreshold)):(doubleTapStartTime=null,$element.trigger("tap",[event.target]),options.tap&&(ret=options.tap.call($element,event,event.target)))):gesture==DOUBLE_TAP?phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),doubleTapStartTime=null,$element.trigger("doubletap",[event.target]),options.doubleTap&&(ret=options.doubleTap.call($element,event,event.target))):gesture==LONG_TAP&&(phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),doubleTapStartTime=null,$element.trigger("longtap",[event.target]),options.longTap&&(ret=options.longTap.call($element,event,event.target)))),ret}function validateSwipeDistance(){var valid=!0;return null!==options.threshold&&(valid=distance>=options.threshold),valid}function didSwipeBackToCancel(){var cancelled=!1;return null!==options.cancelThreshold&&null!==direction&&(cancelled=getMaxDistance(direction)-distance>=options.cancelThreshold),cancelled}function validatePinchDistance(){return null!==options.pinchThreshold?pinchDistance>=options.pinchThreshold:!0}function validateSwipeTime(){var result;return result=options.maxTimeThreshold?!(duration>=options.maxTimeThreshold):!0}function validateDefaultEvent(jqEvent,direction){if(options.preventDefaultEvents!==!1)if(options.allowPageScroll===NONE)jqEvent.preventDefault();else{var auto=options.allowPageScroll===AUTO;switch(direction){case LEFT:(options.swipeLeft&&auto||!auto&&options.allowPageScroll!=HORIZONTAL)&&jqEvent.preventDefault();break;case RIGHT:(options.swipeRight&&auto||!auto&&options.allowPageScroll!=HORIZONTAL)&&jqEvent.preventDefault();break;case UP:(options.swipeUp&&auto||!auto&&options.allowPageScroll!=VERTICAL)&&jqEvent.preventDefault();break;case DOWN:(options.swipeDown&&auto||!auto&&options.allowPageScroll!=VERTICAL)&&jqEvent.preventDefault();break;case NONE:}}}function validatePinch(){var hasCorrectFingerCount=validateFingers(),hasEndPoint=validateEndPoint(),hasCorrectDistance=validatePinchDistance();return hasCorrectFingerCount&&hasEndPoint&&hasCorrectDistance}function hasPinches(){return!!(options.pinchStatus||options.pinchIn||options.pinchOut)}function didPinch(){return!(!validatePinch()||!hasPinches())}function validateSwipe(){var hasValidTime=validateSwipeTime(),hasValidDistance=validateSwipeDistance(),hasCorrectFingerCount=validateFingers(),hasEndPoint=validateEndPoint(),didCancel=didSwipeBackToCancel(),valid=!didCancel&&hasEndPoint&&hasCorrectFingerCount&&hasValidDistance&&hasValidTime;return valid}function hasSwipes(){return!!(options.swipe||options.swipeStatus||options.swipeLeft||options.swipeRight||options.swipeUp||options.swipeDown)}function didSwipe(){return!(!validateSwipe()||!hasSwipes())}function validateFingers(){return fingerCount===options.fingers||options.fingers===ALL_FINGERS||!SUPPORTS_TOUCH}function validateEndPoint(){return 0!==fingerData[0].end.x}function hasTap(){return!!options.tap}function hasDoubleTap(){return!!options.doubleTap}function hasLongTap(){return!!options.longTap}function validateDoubleTap(){if(null==doubleTapStartTime)return!1;var now=getTimeStamp();return hasDoubleTap()&&now-doubleTapStartTime<=options.doubleTapThreshold}function inDoubleTap(){return validateDoubleTap()}function validateTap(){return(1===fingerCount||!SUPPORTS_TOUCH)&&(isNaN(distance)||distance<options.threshold)}function validateLongTap(){return duration>options.longTapThreshold&&DOUBLE_TAP_THRESHOLD>distance}function didTap(){return!(!validateTap()||!hasTap())}function didDoubleTap(){return!(!validateDoubleTap()||!hasDoubleTap())}function didLongTap(){return!(!validateLongTap()||!hasLongTap())}function startMultiFingerRelease(event){previousTouchEndTime=getTimeStamp(),fingerCountAtRelease=event.touches.length+1}function cancelMultiFingerRelease(){previousTouchEndTime=0,fingerCountAtRelease=0}function inMultiFingerRelease(){var withinThreshold=!1;if(previousTouchEndTime){var diff=getTimeStamp()-previousTouchEndTime;diff<=options.fingerReleaseThreshold&&(withinThreshold=!0)}return withinThreshold}function getTouchInProgress(){return!($element.data(PLUGIN_NS+"_intouch")!==!0)}function setTouchInProgress(val){$element&&(val===!0?($element.bind(MOVE_EV,touchMove),$element.bind(END_EV,touchEnd),LEAVE_EV&&$element.bind(LEAVE_EV,touchLeave)):($element.unbind(MOVE_EV,touchMove,!1),$element.unbind(END_EV,touchEnd,!1),LEAVE_EV&&$element.unbind(LEAVE_EV,touchLeave,!1)),$element.data(PLUGIN_NS+"_intouch",val===!0))}function createFingerData(id,evt){var f={start:{x:0,y:0},last:{x:0,y:0},end:{x:0,y:0}};return f.start.x=f.last.x=f.end.x=evt.pageX||evt.clientX,f.start.y=f.last.y=f.end.y=evt.pageY||evt.clientY,fingerData[id]=f,f}function updateFingerData(evt){var id=void 0!==evt.identifier?evt.identifier:0,f=getFingerData(id);return null===f&&(f=createFingerData(id,evt)),f.last.x=f.end.x,f.last.y=f.end.y,f.end.x=evt.pageX||evt.clientX,f.end.y=evt.pageY||evt.clientY,f}function getFingerData(id){return fingerData[id]||null}function setMaxDistance(direction,distance){direction!=NONE&&(distance=Math.max(distance,getMaxDistance(direction)),maximumsMap[direction].distance=distance)}function getMaxDistance(direction){return maximumsMap[direction]?maximumsMap[direction].distance:void 0}function createMaximumsData(){var maxData={};return maxData[LEFT]=createMaximumVO(LEFT),maxData[RIGHT]=createMaximumVO(RIGHT),maxData[UP]=createMaximumVO(UP),maxData[DOWN]=createMaximumVO(DOWN),maxData}function createMaximumVO(dir){return{direction:dir,distance:0}}function calculateDuration(){return endTime-startTime}function calculateTouchesDistance(startPoint,endPoint){var diffX=Math.abs(startPoint.x-endPoint.x),diffY=Math.abs(startPoint.y-endPoint.y);return Math.round(Math.sqrt(diffX*diffX+diffY*diffY))}function calculatePinchZoom(startDistance,endDistance){var percent=endDistance/startDistance*1;return percent.toFixed(2)}function calculatePinchDirection(){return 1>pinchZoom?OUT:IN}function calculateDistance(startPoint,endPoint){return Math.round(Math.sqrt(Math.pow(endPoint.x-startPoint.x,2)+Math.pow(endPoint.y-startPoint.y,2)))}function calculateAngle(startPoint,endPoint){var x=startPoint.x-endPoint.x,y=endPoint.y-startPoint.y,r=Math.atan2(y,x),angle=Math.round(180*r/Math.PI);return 0>angle&&(angle=360-Math.abs(angle)),angle}function calculateDirection(startPoint,endPoint){if(comparePoints(startPoint,endPoint))return NONE;var angle=calculateAngle(startPoint,endPoint);return 45>=angle&&angle>=0?LEFT:360>=angle&&angle>=315?LEFT:angle>=135&&225>=angle?RIGHT:angle>45&&135>angle?DOWN:UP}function getTimeStamp(){var now=new Date;return now.getTime()}function getbounds(el){el=$(el);var offset=el.offset(),bounds={left:offset.left,right:offset.left+el.outerWidth(),top:offset.top,bottom:offset.top+el.outerHeight()};return bounds}function isInBounds(point,bounds){return point.x>bounds.left&&point.x<bounds.right&&point.y>bounds.top&&point.y<bounds.bottom}function comparePoints(pointA,pointB){return pointA.x==pointB.x&&pointA.y==pointB.y}var options=$.extend({},options),useTouchEvents=SUPPORTS_TOUCH||SUPPORTS_POINTER||!options.fallbackToMouseEvents,START_EV=useTouchEvents?SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerDown":"pointerdown":"touchstart":"mousedown",MOVE_EV=useTouchEvents?SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerMove":"pointermove":"touchmove":"mousemove",END_EV=useTouchEvents?SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerUp":"pointerup":"touchend":"mouseup",LEAVE_EV=useTouchEvents?SUPPORTS_POINTER?"mouseleave":null:"mouseleave",CANCEL_EV=SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerCancel":"pointercancel":"touchcancel",distance=0,direction=null,currentDirection=null,duration=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,pinchDistance=0,pinchDirection=0,maximumsMap=null,$element=$(element),phase="start",fingerCount=0,fingerData={},startTime=0,endTime=0,previousTouchEndTime=0,fingerCountAtRelease=0,doubleTapStartTime=0,singleTapTimeout=null,holdTimeout=null;try{$element.bind(START_EV,touchStart),$element.bind(CANCEL_EV,touchCancel)}catch(e){$.error("events not supported "+START_EV+","+CANCEL_EV+" on jQuery.swipe")}this.enable=function(){return this.disable(),$element.bind(START_EV,touchStart),$element.bind(CANCEL_EV,touchCancel),$element},this.disable=function(){return removeListeners(),$element},this.destroy=function(){removeListeners(),$element.data(PLUGIN_NS,null),$element=null},this.option=function(property,value){if("object"==typeof property)options=$.extend(options,property);else if(void 0!==options[property]){if(void 0===value)return options[property];options[property]=value}else{if(!property)return options;$.error("Option "+property+" does not exist on jQuery.swipe.options")}return null}}var VERSION="1.6.18",LEFT="left",RIGHT="right",UP="up",DOWN="down",IN="in",OUT="out",
2074NONE="none",AUTO="auto",SWIPE="swipe",PINCH="pinch",TAP="tap",DOUBLE_TAP="doubletap",LONG_TAP="longtap",HORIZONTAL="horizontal",VERTICAL="vertical",ALL_FINGERS="all",DOUBLE_TAP_THRESHOLD=10,PHASE_START="start",PHASE_MOVE="move",PHASE_END="end",PHASE_CANCEL="cancel",SUPPORTS_TOUCH="ontouchstart"in window,SUPPORTS_POINTER_IE10=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled&&!SUPPORTS_TOUCH,SUPPORTS_POINTER=(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&!SUPPORTS_TOUCH,PLUGIN_NS="TouchSwipe",defaults={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:".noSwipe",preventDefaultEvents:!0};$.fn.swipe=function(method){var $this=$(this),plugin=$this.data(PLUGIN_NS);if(plugin&&"string"==typeof method){if(plugin[method])return plugin[method].apply(plugin,Array.prototype.slice.call(arguments,1));$.error("Method "+method+" does not exist on jQuery.swipe")}else if(plugin&&"object"==typeof method)plugin.option.apply(plugin,arguments);else if(!(plugin||"object"!=typeof method&&method))return init.apply(this,arguments);return $this},$.fn.swipe.version=VERSION,$.fn.swipe.defaults=defaults,$.fn.swipe.phases={PHASE_START:PHASE_START,PHASE_MOVE:PHASE_MOVE,PHASE_END:PHASE_END,PHASE_CANCEL:PHASE_CANCEL},$.fn.swipe.directions={LEFT:LEFT,RIGHT:RIGHT,UP:UP,DOWN:DOWN,IN:IN,OUT:OUT},$.fn.swipe.pageScroll={NONE:NONE,HORIZONTAL:HORIZONTAL,VERTICAL:VERTICAL,AUTO:AUTO},$.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,FOUR:4,FIVE:5,ALL:ALL_FINGERS}});
2075$(document).ready(function() {
2076    var $cardTiles,
2077        $window = $(window),
2078		$cardTileWrapper = $('.cmp-tile-wrapper');
2079	
2080	BIOG.articleList = function(elem){
2081		var $elem = $(elem);
2082		var self = this;
2083		var $currentListOfArticles = $elem.closest('.cmp-tile-wrapper');
2084        var noOfTilesPerRow = $currentListOfArticles.data('tiles-per-row');
2085        var flexEnabled = $currentListOfArticles.data('flex-enabled');
2086		self.mobile = window.matchMedia('(max-width: 767px)').matches;
2087    	self.desktop = window.matchMedia('(min-width: 992px)').matches;
2088		self.tablet = window.matchMedia('(min-width: 768px) and (max-width: 991px)').matches;
2089		self.totalItemCount = $elem.find('.cmp-card-tile').length;
2090		self.loadOnScroll = $elem.find('.cmp-tile-list-wrap').data('loadOnScroll');
2091		this.calcMaxHeight = function(){
2092			if($elem.length) {
2093				$cardTiles = $elem.find('.cmp-card-tile');
2094				if(self.desktop) {
2095					BIOG.options.bindListMaxHeight($cardTiles, noOfTilesPerRow || 3);
2096				} else if(self.tablet) {
2097					BIOG.options.bindListMaxHeight($cardTiles, noOfTilesPerRow || 2);
2098				} else {
2099					$cardTiles.css('height','');
2100				}
2101            }
2102		};
2103		this.makeArticlesVisible = function(initCount, lastCount, timer){
2104			self.timer = timer || 200;
2105			self.initCount = initCount || 0;
2106			self.lastCount = lastCount || self.maxItems;
2107			
2108			if ( self.initCount < self.lastCount ) {
2109				// this setTimeout is for lazy load of each tile
2110				setTimeout(function() {
2111					$elem.find('.cmp-tile-list').eq(initCount).addClass('make-tile-visible');
2112					self.initCount += 1;
2113					self.shownItems = self.initCount;
2114					if(self.shownItems === self.totalItemCount) {
2115						$elem.find('.cmp-tile-btn-wrapper').hide();
2116					} else {
2117						self.makeArticlesVisible(self.initCount, self.lastCount);
2118						self.calcMaxHeight();
2119					}
2120				}, timer);
2121			}	
2122		};
2123		this.showArticleList = function() {
2124			// function for initial visible items of the article list
2125			var $self,
2126				$loadMoreLink = $elem.find('.article-list-loadmore');
2127			$elem.find('.cmp-tile-list-wrap').each(function() {
2128				$self = $(this);
2129				self.maxItems = $self.data('maxItems') || $self.find('.cmp-card-tile').length;
2130				self.loadMore = $self.data('loadMore') || $self.find('.cmp-card-tile').length;
2131				for(var i=0; i<self.maxItems; i++) {
2132					$self.find('.cmp-tile-list').eq(i).addClass('showTile');
2133				}
2134			});
2135			self.makeArticlesVisible(0, self.maxItems, 200);
2136			if(!self.loadOnScroll) {
2137				$loadMoreLink.on('click', self.onClickLoadMore);
2138			} else {
2139				self.onScrollLoadItems($self);
2140			}
2141		};
2142		this.onClickLoadMore = function(e) {
2143			// function for displaying load more items after button click
2144			e.preventDefault();
2145			var $self = $(this);
2146			self.lastIndexItem = self.shownItems + self.loadMore;
2147			for(var i=self.shownItems; i<self.lastIndexItem; i++) {
2148				if ( i <= self.totalItemCount ) {
2149					$self.closest('.cmp-tile-wrapper').find('.cmp-tile-list').eq(i).addClass('showTile');	
2150				}
2151			}
2152			self.makeArticlesVisible(self.shownItems, self.lastIndexItem, 200);
2153			self.calcMaxHeight();
2154		};
2155		this.canLoad = true;
2156		this.loadTile = function(i, countLen, $selfCmpTileListWrap) {
2157			// function for load items on scroll
2158			if ( i < countLen && self.canLoad ) {
2159				self.canLoad = false;
2160				$selfCmpTileListWrap.find('.cmp-tile-list').eq(i + 1).addClass('showTile').attr('data-loaded', true);
2161				self.loadTimeout = setTimeout(function(){
2162					$selfCmpTileListWrap.find('.cmp-tile-list').eq(i + 1).addClass('make-tile-visible');
2163					self.calcMaxHeight();
2164					i += 1;
2165					if ( i <= countLen ) {
2166						self.canLoad = true;
2167					}
2168					self.loadTile(i, countLen, $selfCmpTileListWrap);
2169				}, self.timer || 200);
2170			}
2171		};
2172		this.onScrollLoadItems = function($elem) {
2173			// function for displaying load more tiles on scroll
2174			var $selfCmpTileListWrap = $elem.closest('.cmp-tile-wrapper'),
2175				countLen;
2176			self.itemsOnScrollDesktop = parseInt($selfCmpTileListWrap.find('.load-items-on-scroll-desktop').val()) || 3;
2177			self.itemsOnScrollTablet = parseInt($selfCmpTileListWrap.find('.load-items-on-scroll-tablet').val()) || 2;
2178			self.itemsOnScrollMobile = parseInt($selfCmpTileListWrap.find('.load-items-on-scroll-mobile').val()) || 1;
2179			$window.on('resize scroll', function() {
2180				var $last = $selfCmpTileListWrap.find('.cmp-tile-list.showTile').last();
2181				self.scrollIndex = $last.index();
2182				if(BIOG.options.isInViewport($last) && self.scrollIndex+1 !== $selfCmpTileListWrap.find('.cmp-tile-list').length) {
2183					if(self.desktop) {
2184						countLen = self.scrollIndex + self.itemsOnScrollDesktop;
2185					} else if(self.tablet) {
2186						countLen = self.scrollIndex + self.itemsOnScrollTablet;
2187					}
2188					else {
2189						countLen = self.scrollIndex + self.itemsOnScrollMobile;
2190					}
2191					if(self.scrollIndex < $selfCmpTileListWrap.find('.cmp-tile-list').length) {
2192						self.loadTile(self.scrollIndex, countLen, $selfCmpTileListWrap);
2193					}
2194				}
2195			});
2196		};
2197		this.calcWidthPerRow = function($elem) {
2198            /* dynamic width calculation using flex Flex grid*/
2199            if (noOfTilesPerRow !== undefined && flexEnabled) {
2200                $currentListOfArticles.find('.cmp-tile-list-wrap').addClass('tiles-flex-box');
2201                $currentListOfArticles.find('.cmp-tile-list').addClass('tile-wt-' + noOfTilesPerRow);
2202            } else {
2203                if (!BIOG.devices.isMobile()) {
2204                    if (noOfTilesPerRow !== undefined) {
2205                        var dynamicTileWidth = $cardTileWrapper.width() / noOfTilesPerRow;
2206                        $currentListOfArticles.find('.cmp-tile-list').css('width', dynamicTileWidth + 'px');
2207                    }
2208                } else {
2209                    $currentListOfArticles.find('.cmp-tile-list').css('width', '100%');
2210                }
2211            }
2212        };
2213		$(window).on('resize', function(){
2214			self.calcMaxHeight();
2215			self.mobile = window.matchMedia('(max-width: 767px)').matches;
2216			self.desktop = window.matchMedia('(min-width: 992px)').matches;
2217			self.tablet = window.matchMedia('(min-width: 768px) and (max-width: 991px)').matches;
2218			self.calcWidthPerRow($(this));
2219		});
2220		this.calcMaxHeight();
2221		this.showArticleList();
2222	};
2223	
2224	if($cardTileWrapper.length) {
2225        var $this;
2226		$cardTileWrapper.each(function(){
2227            $this = $(this);
2228            new BIOG.articleList($this).calcWidthPerRow($this);
2229			if ( !$this.attr('data-processed') ) {
2230				$this.attr('data-processed', 'true');
2231				new BIOG.articleList($this);
2232			}
2233		});
2234	}
2235	BIOG.options._shuffleTiles($('[data-tiles-shuffle]'));
2236	if($('.cmp-card-tile.cursorclick').length>0){
2237		 BIOG.options._entireTileClickable($('.cmp-card-tile.cursorclick'),'.cmp-article-list-fullview-link');
2238	}
2239});
2240
2241function MouseWheelHandlerNew(e, element) {
2242    var delta = 0;
2243    if (typeof e === 'number') {
2244        delta = e;
2245    } else {
2246        if (e.deltaX !== 0) {
2247            delta = e.deltaX;
2248        } else {
2249            delta = e.deltaY;
2250        }
2251        if ($(element).data('loop-tiles')) {
2252            const atLeftEdge = element.scrollLeft === 0;
2253            const atRightEdge = element.scrollLeft + element.clientWidth >= element.scrollWidth;
2254 
2255            if ((!atLeftEdge && delta < 0) || (!atRightEdge && delta > 0)) {
2256                e.preventDefault();
2257            } else {
2258                return;
2259            }
2260        }
2261    }
2262 	// loop logic
2263    if ($(element).data('loop-tiles')) {
2264        if (delta > 0) {
2265            $(element).find('.cmp-card-tile:last-child').prependTo($(element));
2266        } else {
2267            $(element).find('.cmp-card-tile:first-child').appendTo($(element));
2268        }
2269    } 
2270
2271    /* Method to animate the carousel element */ 
2272    $(element).animate({
2273         scrollLeft: $(element).scrollLeft() - (delta)
2274    }); 
2275}
2276
2277$(document).ready(function(){
2278    $('.cmp-carousel-container').each(function() { 
2279	    if($('.article-tile-items div.cmp-card-tile').length < 5){
2280  		    $('.control-container').hide();
2281        }
2282
2283	    var articleTileWidth = $('.article-tile-items').find('[data-sli
2283deTiles]').outerWidth(true);
2284	    var carouselId= $(this).attr('id'),
2285	        carousel = {};
2286	        carousel.e =document.getElementById(carouselId);
2287	    var articleItem = $('#'+carouselId).find('.article-tile-items').attr('id');
2288	        carousel.items = document.getElementById(articleItem);
2289	    var articleItemLeft = $('#'+carouselId).find('.left-scroll').attr('id');
2290	        carousel.leftScroll = document.getElementById(articleItemLeft);
2291	    var articleItemRight = $('#'+carouselId).find('.right-scroll').attr('id');
2292	        carousel.rightScroll = document.getElementById(articleItemRight);
2293
2294		if(carousel.items){
2295            var autoSlide = $('#' + carouselId).find('.article-tile-items').data('auto-slide'),
2296                loopTiles = $('#' + carouselId).find('.article-tile-items').data('loop-tiles'),
2297                $currentCarousel = $('#' + carouselId),
2298                slideTime = $('#' + carouselId).find('.article-tile-items').data('slide-time') ? $('#' + 
2299                            carouselId).find('.article-tile-items').data('slide-time') : 2000;
2300		    carousel.items.addEventListener("mousewheel", handleMouse1, false);
2301		    carousel.items.addEventListener("scroll", scrollEvent1);
2302		    carousel.leftScroll.addEventListener("click", leftScrollClick1);
2303		    carousel.rightScroll.addEventListener("click", rightScrollClick1);
2304		    setMaxHeight();
2305            if(!loopTiles) {  
2306		  		setLeftScrollOpacity1();
2307		  		setRightScrollOpacity1();
2308            }
2309
2310		    //auto-slide logic for Carousel view
2311            if (autoSlide) {
2312                $currentCarousel.attr('data-auto-animate', autoSlideCarousel($currentCarousel, slideTime));
2313                if ($(window).width() > 992) {
2314                    carouselScroll($currentCarousel, slideTime);
2315                }
2316            }
2317
2318		    if ($(window).width() < 992) {
2319			mobileSwipe1();
2320			if($('.article-tile-items div.cmp-card-tile').length < 5){
2321		  		$('.control-container').show();
2322		    }
2323			}
2324		}
2325
2326        function handleMouse1(e) {
2327            MouseWheelHandlerNew(e, carousel.items);
2328        }
2329
2330        function leftScrollClick1() {
2331            MouseWheelHandlerNew(articleTileWidth, carousel.items); 
2332        }
2333
2334        function rightScrollClick1() {
2335            MouseWheelHandlerNew(-articleTileWidth, carousel.items); 
2336        }
2337
2338        function scrollEvent1(e) {
2339            setLeftScrollOpacity1();
2340            setRightScrollOpacity1();
2341        }
2342  
2343        function setLeftScrollOpacity1() {
2344            if (isScrolledAllLeft1()) {
2345                carousel.leftScroll.style.opacity = 0;
2346            } else {
2347                carousel.leftScroll.style.opacity = 1;
2348            }
2349        }
2350  
2351        function isScrolledAllLeft1() {
2352            if (carousel.items.scrollLeft === 0 && !$(carousel.items).data('loop-tiles')) {
2353                return true;
2354            } else {
2355                return false;
2356            }
2357        }
2358  
2359        function isScrolledAllRight1() {
2360            if (carousel.items.scrollWidth > carousel.items.offsetWidth && !$(carousel.items).data('loop-tiles')) {
2361                if (carousel.items.scrollLeft + carousel.items.offsetWidth >= carousel.items.scrollWidth-1) {
2362                    return true;
2363                } 
2364            }    
2365            return false;
2366        }
2367  
2368        function setRightScrollOpacity1() {
2369            if (isScrolledAllRight1()){
2370                carousel.rightScroll.style.opacity = 0;
2371            } else {
2372                carousel.rightScroll.style.opacity = 1;
2373            }
2374        }
2375        function setMaxHeight(){
2376	        var maxHeight = -1;
2377	        var articleContainer = $('.article-tile-item-container');
2378            articleContainer.each(function() {
2379                maxHeight = maxHeight > $(this).height() ? maxHeight : $(this).height();
2380                $(this).height(maxHeight);
2381            });
2382        }
2383        function mobileSwipe1(){
2384	        $('#'+carouselId).swipe({
2385		        swipe:function(event, direction) {
2386			        if (direction == "right") {
2387				        MouseWheelHandlerNew(articleTileWidth, carousel.items);
2388			        }
2389			        if (direction == "left") {
2390				        MouseWheelHandlerNew(-articleTileWidth, carousel.items);
2391			        }			
2392		        },
2393		        threshold:0
2394	       });
2395        }
2396        //stop the carousel animation when user interact with carousel tiles
2397        function autoSlideCarousel($currentCarousel, slideTime) {
2398 	        return setInterval(function () {
2399 		        MouseWheelHandlerNew(-articleTileWidth, carousel.items);
2400 	        }, slideTime);
2401        }
2402
2403        function carouselScroll($currentCarousel, slideTime) {
2404 	        $currentCarousel.on("mouseenter", function () {
2405 		        $currentCarousel.addClass('stop-carousel');
2406 		        if ($currentCarousel.hasClass('stop-carousel')) {
2407 			        clearInterval($currentCarousel.attr('data-auto-animate'));
2408 		        }
2409 	        }).on("mouseleave", function () {
2410 		        $currentCarousel.removeClass('stop-carousel');
2411 		        $currentCarousel.attr('data-auto-animate', autoSlideCarousel($currentCarousel, slideTime));
2412 	        });
2413        }
2414        //apply swipe logic in desktop if check-box enabled
2415        var desktopDragFlag = $('#' + carouselId).find('.article-tile-items').data('swipe-drag-desktop');
2416        if (($(window).width() > 991) && desktopDragFlag) {
2417            $('.cmp-carousel-container img').on('dragstart', function(e) {
2418                 e.preventDefault();
2419            });
2420            $('#' + carouselId).swipe({
2421                swipe: function(event, direction) {
2422                    if (direction == "left") {
2423                        $('#' + carouselId).find('.right-scroll').trigger("click");
2424                    }
2425                    if (direction == "right") {
2426                        $('#' + carouselId).find('.left-scroll').trigger("click");
2427                    }
2428
2429                },
2430                threshold: 0
2431            });
2432        }
2433    });
2434});
2435var BIOG = window.BIOG = BIOG || {};
2436var modalVideoPageUrl;
2437var mediagGalleryVideoFlag;
2438BIOG.MediaGalleryModal = {
2439     _handleplaceholders:function(){
2440        if($('.place-holder').length >0){
2441     	    var targetElem = $('.media-gallery-tile.hoveredtile');
2442             var titleText = targetElem.find('.card-title').html();
2443             var descText =  targetElem.find('.card-text').html();
2444             var videoOverlayText =  targetElem.find('.card-video-overlay').html();
2445             $('.placeholder').each(function(){
2446             	if($(this).hasClass("media-gallery-article-title")){
2447                     $('.media-gallery-article-title').append(titleText);
2448                   }
2449                   else if($(this).hasClass("media-gallery-article-description")){
2450                    $('.media-gallery-article-description').append(descText);
2451                   }
2452                   else if($(this).hasClass("media-gallery-article-video")){
2453                       if(targetElem.hasClass('media-gallery-videojs-tile')) {
2454                           BIOG.MediaGalleryModal._videoJsFetch($(this));
2455                       }
2456                       else {
2457                           BIOG.MediaGalleryModal._videoFetch($(this));
2458                       }
2459                   }
2460                   else if ($(this).hasClass("media-gallery-video-overlay")) {
2461                        $('.media-gallery-video-overlay').append(videoOverlayText).hide();
2462                    }
2463                   else if ($(this).hasClass("media-gallery-video-transcript")) {
2464                        BIOG.MediaGalleryModal._videoTranscriptFetch($(this));
2465                    }
2466             });
2467             if(personolizedElem === true){
2468            	 $('.place-holder').addClass('media-gallery-modal');
2469				 BIOG.dataPersonolization._init();
2470             }
2471         }
2472     },
2473     _videoFetch:function($this){
2474         var targetElem = $('.media-gallery-tile.hoveredtile');
2475         var ajaxUrlFetch = targetElem.find('.card-video-url').attr('href');
2476         if(ajaxUrlFetch){
2477        	 $this.addClass('modal-video-exists');
2478	 		  $.ajax({
2479	               url: ajaxUrlFetch,
2480	               type: 'GET',
2481	               contentType: 'text/plain',
2482	               dataType: 'html',
2483	               success: function(data) {
2484	            	   var getScriptjs = $(data).find('script[type="text/javascript"]').attr('src');
2485	            	   var alreadyLoaded = document.querySelector('script[src="' + getScriptjs + '"]') ? true : false;
2486	            	   if (getScriptjs !== undefined && !alreadyLoaded) {
2487	            	       function loadScript(url, callback) {
2488	            	           var head = document.getElementsByTagName('head')[0];
2489	            	           var script = document.createElement('script');
2490	            	           script.type = 'text/javascript';
2491	            	           script.src = url;
2492	            	           script.onload = callback;
2493	            	           head.appendChild(script);
2494	            	       }
2495	            	       var replaceCode = function() {
2496	            	           BIOG.MediaGalleryModal._appendVideoData(data);
2497	            	       };
2498	            	       loadScript(getScriptjs, replaceCode);
2499	            	   } else {
2500	            	       BIOG.MediaGalleryModal._appendVideoData(data);
2501	            	   }
2502	 			   }
2503	           });
2504	 		  $('#genericLightbox').on('hide.bs.modal', function () {
2505	 			 if($('.media-gallery-tile').hasClass('hoveredtile')){
2506						$('.media-gallery-tile').removeClass('hoveredtile');
2507               }
2508	 			 if($('.placeholder .cmp-video').length >0){
2509	 				 jwplayer().stop();
2510	 			 }	 	         
2511	 	      });
2512         }
2513     },
2514     _videoClose:function(){
2515    	 if($('.placeholder .cmp-video').length >0){
2516   		  jwplayer().stop();
2517  		  }
2518	   },
2519	   _appendVideoData:function(data){
2520	        $('.place-holder').find('.media-gallery-article-video').append(data);
2521	        if(personolizedElem === true){
2522	            BIOG.personolizationVideoHandler._initOnLoad();
2523	            BIOG.personolizationHandler._init(); 
2524	        }
2525			//show the CTA video overlay on media gallery model when video complete
2526           	if($(".media-gallery-video-overlay").length > 0) {
2527             $(document).ready(function() {
2528               jwplayer().onComplete(function() {
2529                   $('.media-gallery-video-overlay').show();
2530               });
2531               jwplayer().onPlay(function() {
2532                   $('.media-gallery-video-overlay').hide();
2533               }); 
2534              jwplayer().on('fullscreen', function(el) {
2535                if (el.fullscreen) {
2536                    var fullscreenOverlay = $(".media-gallery-video-overlay").clone();
2537                    $(".media-gallery-article-video").find('.jwplayer').append(fullscreenOverlay);
2538                } else {
2539                    $(".media-gallery-article-video").find('.media-gallery-video-overlay').remove();
2540                }
2541            }); 
2542            });
2543           	}
2544	    },
2545	    _videoTranscriptFetch: function($this) {
2546	        var targetElem = $('.media-gallery-tile.hoveredtile');
2547	        var ajaxUrlFetch = targetElem.data('transcript-path') ? targetElem.data('transcript-path') +  '/jcr:content/root.html?wcmmode=disabled' : '';
2548	        if (ajaxUrlFetch) {
2549	            $.ajax({
2550	                url: ajaxUrlFetch,
2551	                type: 'GET',
2552	                contentType: 'text/plain',
2553	                dataType: 'html',
2554	                success: function(data) {
2555	                    $('.place-holder').find('.media-gallery-video-transcript').append(data);
2556	                }
2557	            });
2558	        }
2559	    },
2560   	 _videoJsFetch:function($this){
2561         var targetElem = $('.media-gallery-videojs-tile.hoveredtile');
2562         var ajaxUrlFetch = targetElem.find('.card-video-url').attr('href');
2563         if(ajaxUrlFetch){
2564        	 $this.addClass('modal-video-exists');
2565	 		  $.ajax({
2566	               url: ajaxUrlFetch,
2567	               type: 'GET',
2568	               contentType: 'text/plain',
2569	               dataType: 'html',
2570	               success: function(data) {
2571                       var getScriptjs = 'https://vjs.zencdn.net/7.21.1/video.min.js';
2572	            	   var alreadyLoaded = document.querySelector('script[src="' + getScriptjs + '"]') ? true : false;
2573	            	   if (getScriptjs !== undefined && !alreadyLoaded) {
2574	            	       function loadScript(url, callback) {
2575	            	           var head = document.getElementsByTagName('head')[0];
2576	            	           var script = document.createElement('script');
2577	            	           script.type = 'text/javascript';
2578	            	           script.src = url;
2579	            	           script.onload = callback;
2580	            	           head.appendChild(script);
2581	            	       }
2582	            	       var replaceCode = function() {
2583	            	           BIOG.MediaGalleryModal._appendVideoData(data);
2584                               setTimeout(BIOG.videoJs._init($('.lightbox-modal .video-js-wrapper')), 5000);
2585	            	       };
2586	            	       loadScript(getScriptjs, replaceCode);
2587	            	   } else {
2588	            	       BIOG.MediaGalleryModal._appendVideoData(data);
2589                           setTimeout(BIOG.videoJs._init($('.lightbox-modal .video-js-wrapper')), 5000);
2590	            	   }
2591	 			   }
2592	           });
2593	 		  $('#genericLightbox').on('hide.bs.modal', function () {
2594	 			 if($('.media-gallery-videojs-tile').hasClass('hoveredtile')){
2595						$('.media-gallery-videojs-tile').removeClass('hoveredtile');
2596               }
2597	 			 if($('.placeholder .cmp-video').length >0){
2598	 				 jwplayer().stop();
2599	 			 }
2600                  if($('.placeholder .video-js-wrapper').length >0){
2601                     var VideoId = $('.placeholder .video-js-wrapper').find('.video-js').attr('id'); 
2602	 				 videojs(VideoId).pause();
2603                     videojs(VideoId).dispose();
2604                     $('.placeholder .video-js-wrapper').remove(); 
2605	 			 }
2606	 	      });
2607         }
2608     }
2609}
2610$(document).ready(function() {
2611	var deepLinkParameter = window.location.href.split('#')[1];
2612	var dataArticleIdentifier = $('.media-gallery-tile[data-article-identifier]');
2613	if($('.media-gallery-tile').length>0){
2614	    BIOG.options._entireTileClickable($('.media-gallery-tile'),'.media-gallery-modallink',dataArticleIdentifier);
2615	}
2616
2617	if (deepLinkParameter !== undefined) {
2618	    if (dataArticleIdentifier.length > 0) {
2619	    	dataArticleIdentifier.each(function() {
2620	            if ($(this).data('article-identifier') === deepLinkParameter) {
2621	                $(this).addClass('hoveredtile');
2622	            }
2623	        });
2624	    	if($('.media-gallery-tile.hoveredtile').length >0){
2625		    	setTimeout(function() {
2626	             $('.media-gallery-tile.hoveredtile').click();
2627	             },1000);
2628	    	}
2629	    }
2630	}
2631});
2632
2633BIOG.Logo = {
2634    _init: function($currentElement) {
2635        BIOG.Logo._renderAlternateLogo($currentElement);
2636    },
2637    _renderAlternateLogo: function($cmpLogoAlternate) {
2638        var $alternateLogoData = $cmpLogoAlternate,
2639            alternateLogoPathHeaderMobile = $alternateLogoData.data('alternatelogo-header-mobile'),
2640            alternateLogoHeaderDesktop = $alternateLogoData.data('alternatelogo-header-desktop'),
2641            alternateLogoFooterMobile = $alternateLogoData.data('alternatelogo-footer-mobile'),
2642            alternateLogoFooterDesktop = $alternateLogoData.data('alternatelogo-footer-desktop'),
2643            showAlternateLogo = $alternateLogoData.data('show-alternatelogo'),
2644            alternateLogoAltTextHeader = $alternateLogoData.data('alternatelogo-alt-header'),
2645            alternateLogoAltTextFooter = $alternateLogoData.data('alternatelogo-alt-footer'),
2646            $headerLogo = $alternateLogoData.closest('.header-utilitynav-wrapper').find('.cmp-logo'),
2647            $footerLogo = $alternateLogoData.closest('.footer-links-section').find('.cmp-logo');
2648        if (showAlternateLogo) {
2649            // Update header logo
2650            $headerLogo.find('source[media="(max-width: 991px)"]').attr('srcset', alternateLogoPathHeaderMobile);
2651            $headerLogo.find('source[media="(min-width: 992px)"]').attr('srcset', alternateLogoHeaderDesktop);
2652            $headerLogo.find('img.cmp-logo-img').attr('src', alternateLogoHeaderDesktop).attr('alt', alternateLogoAltTextHeader);
2653            // Update footer logo
2654            $footerLogo.find('source[media="(max-width: 991px)"]').attr('srcset', alternateLogoFooterMobile);
2655            $footerLogo.find('source[media="(min-width: 992px)"]').attr('srcset', alternateLogoFooterDesktop);
2656            $footerLogo.find('img.cmp-logo-img').attr('src', alternateLogoFooterDesktop).attr('alt', alternateLogoAltTextFooter);
2657        }
2658    }
2659};
2660$(document).ready(function() {
2661    $('.cmp-logo-alternate').each(function() {
2662        BIOG.Logo._init($(this));
2663    });
2664});
2665$(document).ready(function(){
2666    BIOG.utilityNav={
2667	    checkUtilityNavSticky:function(){
2668	    	var stickyUtilityVal = $('.cmp-utilitynav-wrapper').data('sticky-utilitynav');
2669		    if(stickyUtilityVal){
2670		    	BIOG.utilityNav.isUtilityNavSticky();
2671		    }
2672	    },
2673		 isUtilityNavSticky:function() {
2674			var $header = $('.header-mainnav-wrapper');
2675			var $mobileHeader = $('.header-utilitynav-wrapper');
2676			var $utilitynavDiv =  $('.cmp-utilitynav-wrapper');
2677			var $countryDropdown = $('.country-dropdown');
2678            var notificationScrollVal = 0;
2679            var $headerParentEl =  $('div.header');
2680			var $headerParentHeight = $headerParentEl.find('.cmp-utilitynav-wrapper').height();
2681            if ($('.cmp-notification').length > 0) {
2682                if (BIOG.notificationBanner && !BIOG.notificationBanner._checkNotificationContainerSticky()) {
2683                    notificationScrollVal = BIOG.notificationBanner._isnotificationContainerTop();
2684                }
2685                else if (BIOG.notificationBanner && BIOG.notificationBanner._checkNotificationContainerSticky() && BIOG.promoBanner._checkPromoContainerSticky()) {
2686                    notificationScrollVal = notificationScrollVal+2;
2687                }
2688            }
2689            if ($('.floating-logo').length > 0) { 
2690            	notificationScrollVal = notificationScrollVal+2;
2691            }
2692			if (window.pageYOffset > notificationScrollVal) {
2693	            var topPaddingVal;
2694                var topPaddingNotificationVal = 0;
2695	            $utilitynavDiv.addClass('sticky');
2696				$countryDropdown.addClass('country-sticky');
2697
2698                if (BIOG.notificationBanner && BIOG.notificationBanner._checkNotificationContainerSticky()) {
2699                    if(BIOG.promoBanner._checkPromoContainerSticky()) {
2700                        $utilitynavDiv.css({
2701                            'top': BIOG.notificationBanner._isnotificationContainerTop() + BIOG.promoBanner._ispromoContainerTop()
2702                        });
2703                    }
2704                    else {
2705                        $utilitynavDiv.css({
2706                            'top': BIOG.notificationBanner._isnotificationContainerTop()
2707                        });
2708                    }
2709                }
2710	            if (!BIOG.devices.isDesktop()) {
2711                    topPaddingVal = $utilitynavDiv.outerHeight();
2712	            	$mobileHeader.css({
2713						'padding-top': topPaddingVal + topPaddingNotificationVal
2714					});
2715	            }else{
2716                    topPaddingVal = 0;
2717                    if (window.pageYOffset > notificationScrollVal + $mobileHeader.outerHeight()) {
2718                        topPaddingVal = $utilitynavDiv.outerHeight();
2719                    }
2720                   // changes done for flickering issue fix AEMCOMP-2094
2721                    if($('.cmp-main-nav-container').hasClass('sticky-nav')) {
2722                        topPaddingVal = $utilitynavDiv.outerHeight();
2723                    }
2724					$header.css({
2725						'padding-top': topPaddingVal + topPaddingNotificationVal
2726					});
2727	            }
2728	            
2729			} else {
2730				$utilitynavDiv.removeClass('sticky');
2731				$countryDropdown.removeClass('country-sticky');
2732				$header.css({
2733					'padding-top': 0
2734				});
2735				$mobileHeader.css({
2736					'padding-top': 0
2737				});
2738			}
2739		}
2740	}
2741    $(window).on('load scroll resize', function () {
2742			BIOG.utilityNav.checkUtilityNavSticky();
2743	});
2744    if($('.cmp-utility-nav-mbl-list.secondary-nav').length>0){
2745    	var $secondoryNavWrapper = $('.cmp-utility-nav-mbl-list.secondary-nav');
2746    	var noOFSecondaryLinks = $secondoryNavWrapper.find('.secondary-nav-item').length;
2747    	var dynamicListWidth = $secondoryNavWrapper.width() / noOFSecondaryLinks;
2748    	$secondoryNavWrapper.find('.secondary-nav-item').css('width',dynamicListWidth);
2749    }
2750
2751    if ($('.show-my-account').length > 0 && $('.cmp-utilitynav-wrapper').data('show-myaccount')) {
2752        if (BIOG.devices.isDesktop()) {
2753            $('.cmp-utility-nav-mbl .show-my-account').remove();
2754        } else {
2755            $('.cmp-utility-nav .show-my-account').remove();
2756        }
2757    }
2758
2759});
2760
2761$(document).ready(function(){
2762    if($('.cmp-utility-nav-dropdown-enable').length > 0){
2763        $('.cmp-utility-nav-dropdown-enable > a, .cmp-utility-nav-mbl-list-dropdown > a').on('click', function(event){
2764           event.preventDefault();
2765           event.stopPropagation();
2766            $(this).closest('.cmp-utility-nav-dropdown-enable, .cmp-utility-nav-mbl-list-dropdown').find('.cmp-utility-nav-dropdown, .cmp-utility-nav-mbl-dropdown-list').toggle();
2767            $(this).closest('.cmp-utility-nav-dropdown-enable, .cmp-utility-nav-mbl-list-dropdown').toggleClass('active');
2768        });
2769        var dropDownMenu = $('.cmp-utility-nav-dropdown, .cmp-utility-nav-mbl-dropdown-list');
2770        var dropDownMenuMobileEl= $('.cmp-utility-nav-dropdown-enable, .cmp-utility-nav-mbl-list-dropdown');
2771        $(document).on("click", function(evt) {
2772            if (dropDownMenu.is(":visible") && evt.target !== dropDownMenu[0]) {
2773                dropDownMenu.hide();
2774                dropDownMenuMobileEl.removeClass('active');
2775            }
2776        });
2777    }
2778})
2779$(document).ready(function() {
2780	var $searchForm = $('.search-section').find('.searchInputForm'),
2781    minLengthMsg = $('.search-section').find('input[name="minLengthMsg"]').val(),
2782	validationMsg= $('.search-section').find('input[name="validationMsg"]').val(),
2783	minNumbersOfSearch;
2784    if(minLengthMsg == "" || minLengthMsg == undefined){
2785      minLengthMsg= "please enter at least 2 characters";
2786    }
2787    if(validationMsg == "" || validationMsg == undefined) {
2788      validationMsg= "Maximum limit is 200 characters";
2789    }
2790    var isIE = window.navigator.userAgent.indexOf("MSIE ") > -1 || window.navigator.userAgent.indexOf("Trident/") > -1;
2791    if(isIE){
2792		$('.dropdown-content').addClass('ie'); 
2793    }
2794	BIOG.search = {
2795		_autoload: [
2796			'bindEvents'
2797		],
2798		bindEvents: function() {
2799			$(document).on('click keypress', '.search-icon, .search-section-closebtn', BIOG.search._closeSearchBar);
2800			$(document).on('input', '.search-section-input' ,BIOG.search._autocomplete);
2801			$searchForm.on('submit', BIOG.search._searchInputField);
2802		},
2803		/*  function is for closing the search bar when it is opened on click  */
2804		_closeSearchBar: function(e) {
2805			e.preventDefault();
2806			if (e.type== 'keypress' && e.keyCode != 13) {
2807				return false;
2808            }
2809			var $self = $(this),
2810				$searchSection;
2811			if($self.hasClass('search-icon')){
2812			    $searchSection = $self.closest('.cmp-search').find('.search-section');
2813			    $searchSection.toggleClass('hide-search');
2814				$searchSection.find(".search-section-input").focus();
2815			}else{
2816				$self.closest('.search-section').toggleClass('hide-search');
2817				$('.search-section-input').val('');
2818			}
2819			
2820		},
2821		/*  function to redirect page for searching input field  */
2822		_searchInputField: function() {
2823			var	searchInput = $(this).find('.search-section-input').val().trim(),
2824                 searchErrorElem=$(this).find('.search-section-error');
2825
2826
2827
2828			minNumbersOfSearch = (parseInt($('#minNumbersOfSearch').val()) !== 0) ? parseInt($('#minNumbersOfSearch').val()) : 2;
2829			if(!searchInput.length) {
2830                searchErrorElem.html(minLengthMsg);
2831                 searchErrorElem.removeClass('hidden');
2832				return false;
2833            } else {
2834                if (searchInput && (searchInput.length >= minNumbersOfSearch && searchInput.length <= 200)) {
2835                    var pattern = /[!@#$%^&*(){}\/[\]"=|:;<>,?~\\]/;
2836                    if(pattern.test(searchInput)) {                 
2837                        //validationMsg= "Special characters not permitted."; 
2838                        var validationMsg= $('.search-section').find('input[name="validationMsg"]').val();
2839                        if(validationMsg == "" || validationMsg == undefined) {
2840                            validationMsg= "Maximum limit is 200 characters";
2841                        }
2842                        searchErrorElem.html(validationMsg);
2843                        searchErrorElem.removeClass('hidden');
2844                        return false;
2845                    }
2846                    searchErrorElem.addClass('hidden');
2847                    return true;
2848                } else if (searchInput.length < minNumbersOfSearch) {
2849                    searchErrorElem.html(minLengthMsg);
2850                    searchErrorElem.removeClass('hidden');
2851                    return false;
2852                } else if (searchInput.length > 200) {
2853                    searchErrorElem.html(validationMsg);
2854                    searchErrorElem.removeClass('hidden');
2855                    return false;
2856                } 
2857                else {
2858                    searchErrorElem.html(minLengthMsg);
2859                }
2860				searchErrorElem.removeClass('hidden');
2861				return false; 
2862            }
2863		},
2864       _autocomplete: function() {
2865            var dataObj , 
2866            selected = $(this).val(),
2867			currentPagePath = $('#currentPagePath').val();
2868		    minNumbersOfSearch = (parseInt($('#minNumbersOfSearch').val()) !== 0) ? parseInt($('#minNumbersOfSearch').val()) : 2;
2869            dataObj = {
2870				searchKey: selected,
2871				currentPagePath: currentPagePath
2872			};
2873			if(selected.length >= minNumbersOfSearch){
2874				$(".search .dropdown-content").empty();
2875                $.ajax({
2876            		type: "GET",
2877           			url: '/bin/dxp/suggestion/search.json',
2878                    data : dataObj,
2879            		success: function (data) {
2880                        $(".dropdown-content").empty();
2881						for (var i=0;i<data.length;i++){
2882   							$('<option/>').val(data[i]).html(data[i]).appendTo('.search .dropdown-content');
2883		}
2884						if(isIE){
2885                            if(data){
2886								$(".dropdown-content").css('display', 'block');
2887                            }
2888                            else {
2889								$(".dropdown-content").css('display', 'none');
2890                            }
2891                        }
2892                	}
2893          		});
2894            }
2895            else{
2896				 $('.search .dropdown-content').empty();
2897            }
2898        }
2899	};
2900	$(document).on('focus', '.search-icon', function() {
2901	    $(this).addClass('searchicon-focused');
2902	});
2903  	$(document).keyup(function(e) {
2904        if ($('.search-section-input .dropdown-content').length > 0) {
2905            var key = e.keyCode || e.charCode;
2906            if (key == 8 || key == 46 && e.target.value.length < 3 || e.target.value == '') {
2907                $('.dropdown-content').each(function() {
2908                    $(this).css('display', 'none');
2909                });
2910            }
2911
2912        }
2913    });
2914    if (BIOG.devices.isDesktop()) {
2915        $('li.cmp-search .search .search-section .search-section-wrapper .dropdown datalist').remove();
2916    } else {
2917    		$('.cmp-search-list-item .cmp-search .search .search-section .search-section-wrapper .dropdown datalist').remove();
2918	  }
2919});
2920$(document).ready(function () {
2921	var $navbar = $('#header-mainnav-wrapper'),
2922        $headerEl = $('header.header'),
2923        $mobileHeader = $('.header-utilitynav-wrapper'),
2924		$miniLogo = $navbar.find('.mini-logo'),
2925		$body = $('body'),
2926		onLoadTargetElem,
2927		checkScrollFlag = false,
2928		options = {
2929			height: 0
2930		},
2931        canMobileSticky,
2932        mobileSticky,
2933        mobileExpandMenu = $('.main-navigation-list').data('expand-menu'),
2934        $headerSticky = $('.header'),
2935        $headerTopNavWrapper = $('.header-topnav-wrapper'),
2936        $cmpMainNavContainer = $('.cmp-main-nav-container'),
2937        $utilityNavCmp = $('.utility-nav'),
2938        $cmpUtilityNavWrapper = $('.cmp-utilitynav-wrapper');
2939	if(window.location.href.split('#')[1]) {
2940		onLoadTargetElem = '#' + window.location.href.split('#')[1].split('?')[0];
2941	}
2942	BIOG.mainnav = {
2943        
2944		_autoload: ['init', 'checkMainNavSticky'],
2945		init: function () {
2946            canMobileSticky = $headerEl.hasClass('sticky-mobile-header');
2947            
2948			/*event handler for hamburger icon to show the hamburger menu in mobile/tablet*/
2949			$(document).on('click', '.cmp-main-nav-btn', function () {
2950				$('.cmp-main-nav-container').addClass('mobile-collapsible');
2951				setTimeout(function () {
2952					$('.navbar-close').show();
2953				}, 350);
2954                if ($('.cmp-notification').length > 0) {
2955                	$('.cmp-notification').addClass('mobileIndex');
2956                }
2957			});
2958
2959			/*event handler for close button to hide the hamburger menu in mobile/tablet*/
2960			$(document).on('click keypress', '.navbar-close', function (e) {
2961				if (e.type== 'keypress' && e.keyCode != 13) {
2962					return false;
2963	            }
2964				$(this).closest('.cmp-main-nav-container').removeClass('mobile-collapsible');
2965                if ($('.cmp-notification').length > 0) {
2966                	$('.cmp-notification').removeClass('mobileIndex');
2967                }
2968			});
2969			
2970			/*event handler for mobile dropdown to show inner dropdown on click of arrow icon*/
2971			if (mobileExpandMenu && (!BIOG.devices.isDesktop())) {
2972			    BIOG.mainnav.checkExpandMenu();
2973			} else {
2974			    $(document).on('click', '.dropdown-toggle-icon', function() {
2975			        var $arrow = $(this),
2976			            $parentDropdown = $arrow.closest('.dropdown'),
2977			            $childDropdown = $arrow.siblings('.dropdown-menu'),
2978			            $remainingDropdowns = $parentDropdown.siblings('.dropdown');
2979			        $remainingDropdowns.removeClass('show-inner-dropdown');
2980			        $remainingDropdowns.find('.dropdown-menu').removeClass('show');
2981			        if ($parentDropdown.hasClass('show-inner-dropdown')) {
2982			            $parentDropdown.removeClass('show-inner-dropdown');
2983			            $childDropdown.removeClass('show');
2984			        } else {
2985			            $parentDropdown.addClass('show-inner-dropdown');
2986			            $childDropdown.addClass('show');
2987			        }
2988			    });
2989			}
2990			$( window ).resize(function() {
2991                if (!BIOG.devices.isDesktop()) {
2992                  $( "li.nav-item.dropdown.active-link" ).addClass('show-inner-dropdown');
2993                  $( "ul.dropdown-menu.active-child-link " ).addClass('show');
2994                  $( "li.dropdown-item.active-child-innerlink " ).addClass('highlight-item');
2995              }else{
2996                  $( "li.nav-item.dropdown.active-link" ).removeClass('show-inner-dropdown');
2997                  $( "ul.dropdown-menu.active-child-link " ).removeClass('show');
2998                  $( "li.dropdown-item.active-child-innerlink " ).removeClass('highlight-item');
2999              }
3000          });
3001            
3002
3003		},
3004		checkExpandMenu: function() {
3005		    $('.main-navigation-list').find('.nav-item.dropdown').each(function() {
3006		        var parentList = $(this).find('a.nav-link')[0].outerHTML;
3007		        if ($(this).find('.dropdown-menu').length > 0 && $(this).find('a.nav-link').attr("href") !=="#") {
3008		        	$(this).find('a.nav-link').attr("href","#");
3009                    $(this).find('.dropdown-menu').prepend('<li class="dropdown-item">' + parentList + '</li>');
3010		        }
3011		    });
3012
3013		    $(document).on('click', '.nav-item.dropdown', function() {
3014		        var $arrow = $(this).find('.dropdown-toggle-icon'),
3015		            $parentDropdown = $arrow.closest('.dropdown'),
3016		            $childDropdown = $arrow.siblings('.dropdown-menu'),
3017		            $remainingDropdowns = $parentDropdown.siblings('.dropdown');
3018		        $remainingDropdowns.removeClass('show-inner-dropdown');
3019		        $remainingDropdowns.find('.dropdown-menu').removeClass('show');
3020		        if ($parentDropdown.hasClass('show-inner-dropdown')) {
3021		            $parentDropdown.removeClass('show-inner-dropdown');
3022		            $childDropdown.removeClass('show');
3023		        } else {
3024		            $parentDropdown.addClass('show-inner-dropdown');
3025		            $childDropdown.addClass('show');
3026		        }
3027		    });
3028		},
3029		checkMainNavSticky: function () {
3030            mobileSticky = canMobileSticky && window.matchMedia('(max-width: 991px)').matches;
3031
3032            if(mobileSticky) {
3033                if ($('.cmp-notification').length > 0) {
3034                    if($headerTopNavWrapper.length > 0) {
3035                        if($('.promo-banner').length > 0) {
3036                            BIOG.promoBanner.cmpPromoMainNavMobile($cmpUtilityNavWrapper, $headerSticky, $headerTopNavWrapper, $utilityNavCmp, options);
3037                        }
3038                        else {
3039                            BIOG.notificationBanner.cmpNotiMainNavMobile($cmpUtilityNavWrapper, $headerSticky, $headerTopNavWrapper, $utilityNavCmp, options);
3040                        }
3041                    }
3042                    else {
3043                        if($('.promo-banner').length > 0) {
3044                            BIOG.promoBanner.cmpPromoMainNavMobile($cmpUtilityNavWrapper, $headerSticky, $headerTopNavWrapper, $utilityNavCmp, options);
3045                        }
3046                        else {
3047                            BIOG.notificationBanner.cmpNotiMainNavMobile($cmpUtilityNavWrapper, $headerSticky, $headerTopNavWrapper, $utilityNavCmp, options);
3048                        }
3049                    }
3050                }
3051               else if ($('.promo-banner').length > 0 && $('.cmp-notification').length <= 0) {
3052                   if($headerTopNavWrapper.length > 0) {
3053                       BIOG.promoBanner.cmpPromoMainNavMobile($cmpUtilityNavWrapper, $headerSticky, $headerTopNavWrapper, $utilityNavCmp, options);
3054                   }
3055                   else {
3056                       BIOG.promoBanner.cmpPromoMainNavMobile($cmpUtilityNavWrapper, $headerSticky, $mobileHeader, $utilityNavCmp, options);
3057                   }
3058                }  
3059               else if($mobileHeader.hasClass('sticky')) {
3060                    options['height'] = $('header').outerHeight();
3061                    BIOG.mainnav._makeMainNavSticky(options);
3062                } else {
3063                    options['height'] = $mobileHeader.offset().top;
3064                    BIOG.mainnav._makeMainNavSticky(options);
3065                }
3066            } else {
3067                if ($('.cmp-notification').length > 0) {
3068                    if($('.promo-banner').length > 0) {
3069                        BIOG.promoBanner.cmpPromoMainNavDesktop($cmpUtilityNavWrapper, $cmpMainNavContainer, $headerTopNavWrapper, $mobileHeader, $utilityNavCmp, options);
3070                    }
3071                    else {
3072                        BIOG.notificationBanner.cmpNotiMainNavDesktop($cmpUtilityNavWrapper, $cmpMainNavContainer, $headerTopNavWrapper, $mobileHeader, $utilityNavCmp, options);
3073                    }
3074                }
3075                else if ($navbar.hasClass('sticky')) {
3076                    options['height'] = $('header').outerHeight();
3077                    BIOG.mainnav._makeMainNavSticky(options);
3078                } else if ($('.cmp-main-nav-container').hasClass('sticky-nav')) {
3079                    options['height'] = $navbar.offset().top;
3080                    BIOG.mainnav._makeMainNavSticky(options);
3081                }
3082            }
3083
3084			if(onLoadTargetElem && $(onLoadTargetElem).length && !checkScrollFlag) {
3085                BIOG.options._calcTargetPosition(onLoadTargetElem);
3086                checkScrollFlag = true;
3087            }
3088		},
3089		/*to make main nav sticky*/
3090		_makeMainNavSticky: function (opt) {
3091            mobileSticky = canMobileSticky && window.matchMedia('(max-width: 991px)').matches;
3092            if (window.pageYOffset > 0) {
3093            	if (window.pageYOffset>= opt.height) {
3094	                var topPaddingVal = 0;
3095	                if(mobileSticky) {
3096	                    $mobileHeader.addClass('sticky');
3097	                    $navbar.removeClass('sticky');
3098	                    $miniLogo.removeClass('show-mini-logo');
3099	                    topPaddingVal = $mobileHeader.outerHeight();
3100                        if ($('.cmp-utilitynav-wrapper.sticky').length > 0 && ($('div.header-utilitynav-wrapper').css('display') == 'none')) {
3101                            topPaddingVal = $('.cmp-utilitynav-wrapper.sticky').height();
3102                        }
3103	                    /*to make mobile nav sticky after notification banner exist*/
3104	                    if ($('.cmp-notification').length > 0) {
3105	                        if (BIOG.notificationBanner._checkNotificationContainerSticky()) {
3106	                        	topPaddingVal =  topPaddingVal + BIOG.notificationBanner._isnotificationContainerTop();
3107	                            $mobileHeader.css({
3108	                                'top': BIOG.notificationBanner._isnotificationContainerTop() 
3109	                            });
3110	                        }
3111                            if(BIOG.promoBanner._checkPromoContainerSticky() && BIOG.notificationBanner._checkNotificationContainerSticky()) {
3112                                topPaddingVal =  topPaddingVal + BIOG.notificationBanner._isnotificationContainerTop() + BIOG.promoBanner._ispromoContainerTop();
3113                                $mobileHeader.css({
3114                                    'top': BIOG.notificationBanner._isnotificationContainerTop() + BIOG.promoBanner._ispromoContainerTop()
3115                                });
3116                            }
3117	                    }
3118	                } else {
3119	                    if ($('.cmp-main-nav-container').hasClass('sticky-nav')) {
3120							$navbar.addClass('sticky');                     
3121	                    }
3122                        BIOG.mainnav._flaotingLogoSticky();
3123	                    $miniLogo.addClass('show-mini-logo');
3124	                    $mobileHeader.removeClass('sticky');
3125	                    topPaddingVal = $navbar.outerHeight();
3126	                    /*to make main nav sticky after notification banner if sticky and exist*/
3127	                    if ($('.cmp-notification').length > 0) {
3128	                        if (BIOG.notificationBanner._checkNotificationContainerSticky()) {
3129                                if(BIOG.promoBanner._checkPromoContainerSticky()) {
3130                                    topPaddingVal =  topPaddingVal + BIOG.notificationBanner._isnotificationContainerTop() + BIOG.promoBanner._ispromoContainerTop();
3131                                    $navbar.css({
3132                                        'top': BIOG.notificationBanner._isnotificationContainerTop() + BIOG.promoBanner._ispromoContainerTop()
3133                                    });
3134                                }
3135                                else {
3136									topPaddingVal =  topPaddingVal + BIOG.notificationBanner._isnotificationContainerTop();
3137                                    $navbar.css({
3138                                        'top': BIOG.notificationBanner._isnotificationContainerTop()
3139                                    });
3140                                }
3141	                        }
3142                            else if(BIOG.promoBanner._checkPromoContainerSticky()) {
3143                                topPaddingVal =  topPaddingVal + BIOG.promoBanner._ispromoContainerTop();
3144                                $navbar.css({
3145                                    'top': BIOG.promoBanner._ispromoContainerTop()
3146                                });
3147                            }
3148	                    }
3149                        /*to make main nav sticky after promo banner if sticky and exist*/
3150	                    if ($('.promo-banner').length > 0 && $('.cmp-notification').length <= 0) {
3151	                        if (BIOG.notificationBanner._checkNotificationContainerSticky()) {
3152                                if(BIOG.promoBanner._checkPromoContainerSticky()) {
3153                                    topPaddingVal =  topPaddingVal + BIOG.notificationBanner._isnotificationContainerTop() + BIOG.promoBanner._ispromoContainerTop();
3154                                    $navbar.css({
3155                                        'top': BIOG.notificationBanner._isnotificationContainerTop() + BIOG.promoBanner._ispromoContainerTop()
3156                                    });
3157                                }
3158                                else {
3159									topPaddingVal =  topPaddingVal + BIOG.notificationBanner._isnotificationContainerTop();
3160                                    $navbar.css({
3161                                        'top': BIOG.notificationBanner._isnotificationContainerTop()
3162                                    });
3163                                }
3164	                        }
3165                            else if(BIOG.promoBanner._checkPromoContainerSticky()) {
3166                                topPaddingVal =  topPaddingVal + BIOG.promoBanner._ispromoContainerTop();
3167                                $navbar.css({
3168                                    'top': BIOG.promoBanner._ispromoContainerTop()
3169                                });
3170                            }
3171	                    }
3172	                }
3173					$body.css({
3174						'padding-top': topPaddingVal
3175					});
3176                }
3177                else {
3178                	if (BIOG.devices.isDesktop() && (window.pageYOffset> 2) && $('.cmp-main-nav-container').hasClass('sticky-nav') && $cmpUtilityNavWrapper.data('sticky-utilitynav')) {
3179	            		if($('.promo-banner').length <= 0) {
3180	                		BIOG.mainnav._displayMiniLogo();
3181	                		BIOG.mainnav._flaotingLogoSticky();
3182	            		}
3183					}
3184                }
3185			} else {
3186                $mobileHeader.removeClass('sticky');
3187                $navbar.removeClass('sticky');
3188                if ($('.floating-logo').length > 0) {
3189                    $('.floating-logo .cmp-logo').show();
3190                    $('.floating-logo .cmp-mini-logo').hide();
3191                }
3192				$miniLogo.removeClass('show-mini-logo');
3193				if (BIOG.notificationBanner._checkNotificationContainerSticky()) {
3194					$body.css({
3195						'padding-top': BIOG.notificationBanner._isnotificationContainerTop() + BIOG.promoBanner._ispromoContainerTop()
3196					});
3197				} else {
3198					$body.css({
3199						'padding-top': 0
3200					});
3201				}
3202			}
3203		},
3204        /*Floating Logo sticky*/
3205        _flaotingLogoSticky:function() {						
3206            if ($('.floating-logo').length > 0) { 
3207            	var flaotingnavItemheight = $('.cmp-floating-main-nav li').outerHeight();
3208                $('.cmp-main-nav').height(flaotingnavItemheight);
3209                $('.cmp-mini-logo').find('.cmp-logo img').addClass('mini-logo');
3210                 if($navbar.hasClass('sticky')){
3211					 $('.floating-logo .cmp-logo').hide();
3212                     $('.floating-logo .cmp-mini-logo').show();
3213                }
3214            }
3215        },
3216        /*Display Mini Logo*/
3217        _displayMiniLogo:function() {
3218            $navbar.addClass('sticky');
3219            $miniLogo.addClass('show-mini-logo');
3220            $navbar.css({
3221                'padding-top': $cmpUtilityNavWrapper.height(),
3222                'top': BIOG.notificationBanner._isnotificationContainerTop()
3223            });
3224            // changes done for flickering issue fix AEMCOMP-2094
3225	        var miniLogoHeaderHeight;
3226	        if($('.cmp-utilitynav-wrapper.sticky').length > 0 && $('.header-mainnav-wrapper.sticky').length > 0) {
3227	        	miniLogoHeaderHeight = $('.header-mainnav-wrapper').outerHeight();
3228	        }
3229	        else {
3230	        	miniLogoHeaderHeight = $cmpUtilityNavWrapper.height();
3231	        }
3232            $body.css({
3233                'padding-top': miniLogoHeaderHeight
3234            }); 
3235        },
3236		/*function to expand menu on focus in*/
3237		dropDownFocus:function($elem){
3238			$elem.find('.dropdown-menu li').last().addClass('last-menu-item');
3239			$('.cmp-main-nav-container .cmp-utility-nav-list li').last().addClass('last-mobilemenu-item');
3240			$elem.each(function() {
3241				$(this).focusin(function() {
3242					$(this).find('.dropdown-menu').addClass('show-focused-menu');
3243					$(this).siblings().find('.dropdown-menu').removeClass('show-focused-menu');
3244					$('.myaccount-dropdown').hide()
3244;
3245		            $('.myaccount-link').removeClass('show-dropdown');
3246				});
3247				$('.last-menu-item').focusout(function() {
3248					$('.dropdown-menu').removeClass('show-focused-menu');
3249				});
3250				$('.last-mobilemenu-item').focusout(function() {
3251					$('.cmp-main-nav-container').removeClass('mobile-collapsible');
3252				});
3253				$(this).hover(function() {
3254					$('.dropdown-menu').removeClass('show-focused-menu');
3255				});
3256			});
3257			$('.cmp-mini-logo,.cmp-logo,.search-section-input').focusin(function() {
3258				$('.dropdown-menu').removeClass('show-focused-menu');
3259			});
3260		}
3261	}
3262	$(window).on('scroll resize', function () {
3263		BIOG.mainnav.checkMainNavSticky();
3264	});
3265    if (($('.floating-logo .sticky-nav').length > 0) && ($('.cmp-mini-logo .mini-logo')).length == 0){ 
3266        var cmplogo = $('.cmp-logo').html();
3267       $('.cmp-mini-logo').append(cmplogo).parents().find('.cmp-main-nav').addClass('cmp-floating-main-nav');   
3268    }
3269	BIOG.mainnav.dropDownFocus($('.cmp-main-nav').find('.nav-item.dropdown'));
3270
3271    // Prevent navigation for parent menu links that have dropdowns
3272    if($('.cmp-main-nav').data('disable-navigationurl')) {
3273        $('.cmp-main-nav .nav-item.dropdown > .nav-link').on('click', function(e) {
3274            // prevent default navigation for parent dropdown links
3275            var $dropdownMenu = $(this).siblings('.dropdown-menu');
3276            if ($dropdownMenu.length && $dropdownMenu.children('li').length > 0) {
3277                e.preventDefault();
3278                e.stopPropagation();
3279                return false;
3280            }
3281        });
3282    }
3283});
3284$(document).ready(function() {
3285	checkDevice();
3286});
3287
3288function checkDevice() {
3289	var dropdownElements = $('.dropdown-menu-depth-0');
3290
3291	if (dropdownElements.length > 0) {
3292		$(dropdownElements).each(function() {
3293			if (checkMobileSize() > 991) {
3294				if (
3295					checkIntNestingForFirstDropdownDepth($(this)) &&
3296          checkIntNestingForSecondDropdownDepth($(this)) > 5
3297				) {
3298					$(this).css(
3299						'width',
3300						160 * $(this).children('.dropdown-item-depth-1').length + 'px'
3301					);
3302				} else {
3303					$(this).addClass('column-view');
3304				}
3305			} else {
3306				if (!checkAttribute(this)) {
3307					$(this).removeAttr('style');
3308				}
3309			}
3310		});
3311	}
3312}
3313
3314function checkAttribute() {
3315	var attr = $(this).attr('style');
3316
3317	return typeof attr !== typeof undefined && attr !== false;
3318}
3319
3320$(window).resize(function() {
3321	checkDevice();
3322});
3323
3324function checkMobileSize() {
3325	return $(document).width() || $(window).width();
3326}
3327
3328function checkIntNestingForFirstDropdownDepth(el) {
3329	return $(el).find('.dropdown-menu-depth-1').length;
3330}
3331
3332function checkIntNestingForSecondDropdownDepth(el) {
3333	return $(el).find('.dropdown-item-depth-2').length;
3334}
3335
3336$(document).ready(function() {
3337    if ($('.skip-to-main-content-link').length > 0) {
3338        $('.skip-to-main-content-link').click(function(ev) {
3339            ev.preventDefault();
3340            $('html, body').stop().animate({
3341                scrollTop: $("[role='main']").offset().top - BIOG.options._calStickyHeaderHeight()
3342            }, 500);
3343        })
3344    }
3345});
3346/*******************************************************************************
3347 * Copyright 2016 Adobe Systems Incorporated
3348 *
3349 * Licensed under the Apache License, Version 2.0 (the "License");
3350 * you may not use this file except in compliance with the License.
3351 * You may obtain a copy of the License at
3352 *
3353 *     http://www.apache.org/licenses/LICENSE-2.0
3354 *
3355 * Unless required by applicable law or agreed to in writing, software
3356 * distributed under the License is distributed on an "AS IS" BASIS,
3357 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3358 * See the License for the specific language governing permissions and
3359 * limitations under the License.
3360 ******************************************************************************/
3361(function() {
3362    "use strict";
3363
3364    var NS = "cmp";
3365    var IS = "image";
3366
3367    var EMPTY_PIXEL = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
3368    var LAZY_THRESHOLD_DEFAULT = 0;
3369    var SRC_URI_TEMPLATE_WIDTH_VAR = "{.width}";
3370
3371    var selectors = {
3372        self: "[data-" + NS + '-is="' + IS + '"]',
3373        image: '[data-cmp-hook-image="image"]',
3374        map: '[data-cmp-hook-image="map"]',
3375        area: '[data-cmp-hook-image="area"]'
3376    };
3377
3378    var lazyLoader = {
3379        "cssClass": "cmp-image__image--is-loading",
3380        "style": {
3381            "height": 0,
3382            "padding-bottom": "" // will be replaced with % ratio
3383        }
3384    };
3385
3386    var properties = {
3387        /**
3388         * An array of alternative image widths (in pixels).
3389         * Used to replace a {.width} variable in the src property with an optimal width if a URI template is provided.
3390         *
3391         * @memberof Image
3392         * @type {Number[]}
3393         * @default []
3394         */
3395        "widths": {
3396            "default": [],
3397            "transform": function(value) {
3398                var widths = [];
3399                value.split(",").forEach(function(item) {
3400                    item = parseFloat(item);
3401                    if (!isNaN(item)) {
3402                        widths.push(item);
3403                    }
3404                });
3405                return widths;
3406            }
3407        },
3408        /**
3409         * Indicates whether the image should be rendered lazily.
3410         *
3411         * @memberof Image
3412         * @type {Boolean}
3413         * @default false
3414         */
3415        "lazy": {
3416            "default": false,
3417            "transform": function(value) {
3418                return !(value === null || typeof value === "undefined");
3419            }
3420        },
3421        /**
3422         * Indicates image is DynamicMedia image.
3423         *
3424         * @memberof Image
3425         * @type {Boolean}
3426         * @default false
3427         */
3428        "dmimage": {
3429            "default": false,
3430            "transform": function(value) {
3431                return !(value === null || typeof value === "undefined");
3432            }
3433        },
3434        /**
3435         * The lazy threshold.
3436         * This is the number of pixels, in advance of becoming visible, when an lazy-loading image should begin
3437         * to load.
3438         *
3439         * @memberof Image
3440         * @type {Number}
3441         * @default 0
3442         */
3443        "lazythreshold": {
3444            "default": 0,
3445            "transform": function(value) {
3446                var val =  parseInt(value);
3447                if (isNaN(val)) {
3448                    return LAZY_THRESHOLD_DEFAULT;
3449                }
3450                return val;
3451            }
3452        },
3453        /**
3454         * The image source.
3455         *
3456         * Can be a simple image source, or a URI template representation that
3457         * can be variable expanded - useful for building an image configuration with an alternative width.
3458         * e.g. '/path/image.coreimg{.width}.jpeg/1506620954214.jpeg'
3459         *
3460         * @memberof Image
3461         * @type {String}
3462         */
3463        "src": {
3464            "transform": function(value) {
3465                return decodeURIComponent(value);
3466            }
3467        },
3468
3469        "srcset": {
3470        }
3471
3472    };
3473
3474    var devicePixelRatio = window.devicePixelRatio || 1;
3475
3476    function readData(element) {
3477        var data = element.dataset;
3478        var options = [];
3479        var capitalized = IS;
3480        capitalized = capitalized.charAt(0).toUpperCase() + capitalized.slice(1);
3481        var reserved = ["is", "hook" + capitalized];
3482        for (var key in data) {
3483            if (data.hasOwnProperty(key)) {
3484                var value = data[key];
3485
3486                if (key.indexOf(NS) === 0) {
3487                    key = key.slice(NS.length);
3488                    key = key.charAt(0).toLowerCase() + key.substring(1);
3489
3490                    if (reserved.indexOf(key) === -1) {
3491                        options[key] = value;
3492                    }
3493                }
3494            }
3495        }
3496
3497        return options;
3498    }
3499
3500    function Image(config) {
3501        var that = this;
3502        var smartCrops = {};
3503        function init(config) {
3504            // prevents multiple initialization
3505            config.element.removeAttribute("data-" + NS + "-is");
3506
3507            setupProperties(config.options);
3508            cacheElements(config.element);
3509         // check image is DM asset; if true try to make req=set
3510            if (config.options.src && config.options.hasOwnProperty("dmimage") && (config.options["smartcroprendition"] === "SmartCrop:Auto")) {
3511                var request = new XMLHttpRequest();
3512                var url = decodeURIComponent(config.options.src).split(SRC_URI_TEMPLATE_WIDTH_VAR)[0] + "?req=set,json";
3513
3514
3515                request.open("GET", url, false);
3516                request.onload = function() {
3517                    if (request.status >= 200 && request.status < 400) {
3518                        // success status
3519                        var responseText = request.responseText;
3520                        var rePayload = new RegExp(/^(?:\/\*jsonp\*\/)?\s*([^()]+)\(([\s\S]+),\s*"[0-9]*"\);?$/gmi);
3521                        var rePayloadJSON = new RegExp(/^{[\s\S]*}$/gmi);
3522                        var resPayload = rePayload.exec(responseText);
3523                        var payload;
3524                        if (resPayload) {
3525                            var payloadStr = resPayload[2];
3526                            if (rePayloadJSON.test(payloadStr)) {
3527                                payload = JSON.parse(payloadStr);
3528                            }
3529
3530                        }
3531                        // check "relation" - only in case of smartcrop preset
3532                        if (payload && payload.set.relation && payload.set.relation.length > 0) {
3533                            for (var i = 0; i < payload.set.relation.length; i++) {
3534                                smartCrops[parseInt(payload.set.relation[i].userdata.SmartCropWidth)] =
3535                                    ":" + payload.set.relation[i].userdata.SmartCropDef;
3536                            }
3537                        }
3538                    } else {
3539                        // error status
3540                    }
3541                };
3542                request.send();
3543            }
3544            if (!that._elements.noscript) {
3545                return;
3546            }
3547
3548            that._elements.container = that._elements.link ? that._elements.link : that._elements.self;
3549
3550            unwrapNoScript();
3551
3552            if (that._properties.lazy) {
3553                addLazyLoader();
3554            }
3555
3556            if (that._elements.map) {
3557                that._elements.image.addEventListener("load", onLoad);
3558            }
3559         // fix for the images not loading onload
3560            $(document).ready(function(){
3561                 that.update();
3562            })
3563            window.addEventListener("resize", onWindowResize);
3564            ["focus", "click", "load", "transitionend", "animationend", "scroll"].forEach(function(name) {
3565                document.addEventListener(name, that.update);
3566            });
3567            that._elements.image.addEventListener("cmp-image-redraw", that.update);
3568            that.update();
3569        }
3570
3571        function loadImage() {
3572        	var hasWidths = (that._properties.widths && that._properties.widths.length > 0) || Object.keys(smartCrops).length > 0;
3573            var replacement;
3574            if (Object.keys(smartCrops).length > 0) {
3575                var optimalWidth = getOptimalWidth(Object.keys(smartCrops));
3576                replacement = smartCrops[optimalWidth];
3577            } else {
3578                replacement = hasWidths ? (that._properties.dmimage ? "" : ".") + getOptimalWidth(that._properties.widths) : "";
3579            }
3580            var url = that._properties.src.replace(SRC_URI_TEMPLATE_WIDTH_VAR, replacement);
3581            var srcsetUrl = that._properties.srcset;
3582
3583            if (that._elements.image.getAttribute("src") !== url) {
3584                if($(that._elements.image).find('source').length <= 0) {
3585                	that._elements.image.setAttribute("src", url);
3586                }
3587             // added condition to update empty pixel image with desktop and mobile image lazy loading
3588                 if($(that._elements.image).find('source').length > 0) {
3589                     if($(that._elements.image).find('img').attr('src') == EMPTY_PIXEL) {   
3590                         let desktopRenditionSrc =   $(that._elements.image).find('[data-srcset-desktop]').data('srcset-desktop');
3591                         let mobileRenditionSrc =   $(that._elements.image).find('[data-srcset-mobile]').data('srcset-mobile'); 
3592                         $(that._elements.image).find('[data-srcset-desktop]').attr('srcset', desktopRenditionSrc); // logic for set lazy loading of images
3593                         $(that._elements.image).find('[data-srcset-mobile]').attr('srcset', mobileRenditionSrc); // logic for set lazy loading of images
3594                         $(that._elements.image).find('img').attr('src', desktopRenditionSrc);
3595                     }
3596                 }
3597                if(srcsetUrl && ($(that._elements.image).find('source').length <= 0)){
3598                	that._elements.image.setAttribute("srcset", srcsetUrl);
3599                }
3600                if (!hasWidths) {
3601                    window.removeEventListener("scroll", that.update);
3602                }
3603            }
3604
3605            if (that._lazyLoaderShowing) {
3606                that._elements.image.addEventListener("load", removeLazyLoader);
3607            }
3608        }
3609
3610        function getOptimalWidth(widths) {
3611            var container = that._elements.self;
3612            var containerWidth = container.clientWidth;
3613            while (containerWidth === 0 && container.parentNode) {
3614                container = container.parentNode;
3615                containerWidth = container.clientWidth;
3616            }
3617            var optimalWidth = containerWidth * devicePixelRatio;
3618            var len = widths.length;
3619            var key = 0;
3620
3621            while ((key < len - 1) && (widths[key] < optimalWidth)) {
3622                key++;
3623            }
3624
3625            return widths[key].toString();
3626        }
3627
3628        function addLazyLoader() {
3629            var width = that._elements.image.getAttribute("width");
3630            var height = that._elements.image.getAttribute("height");
3631
3632            if (width && height) {
3633                var ratio = (height / width) * 100;
3634                var styles = lazyLoader.style;
3635
3636                styles["padding-bottom"] = ratio + "%";
3637
3638                for (var s in styles) {
3639                    if (styles.hasOwnProperty(s)) {
3640                        that._elements.image.style[s] = styles[s];
3641                    }
3642                }
3643            }
3644            if($(that._elements.image).find('source').length <= 0) {
3645            	that._elements.image.setAttribute("src", EMPTY_PIXEL);
3646            }
3647            // added condition to adding empty pixel image picture lazy loading
3648            else if($(that._elements.image).find('source').length > 0) {
3649                $(that._elements.image).find('source').attr('srcset', EMPTY_PIXEL); // logic for empty images
3650                $(that._elements.image).find('img').attr('src', EMPTY_PIXEL);
3651            }
3652            if(that._elements.image.getAttribute("srcset")){
3653            	that._elements.image.setAttribute("srcset", EMPTY_PIXEL);
3654            }
3655            // added condition to restrict adding class for picture lazy loading
3656	        if($(that._elements.image).find('source').length <= 0) {
3657				that._elements.image.classList.add(lazyLoader.cssClass);
3658	        }
3659            that._lazyLoaderShowing = true;
3660        }
3661
3662        function unwrapNoScript() {
3663            var markup = decodeNoscript(that._elements.noscript.textContent.trim());
3664            var parser = new DOMParser();
3665
3666            // temporary document avoids requesting the image before removing its src
3667            var temporaryDocument = parser.parseFromString(markup, "text/html");
3668            var imageElement = temporaryDocument.querySelector(selectors.image);
3669            imageElement.removeAttribute("src");
3670			imageElement.removeAttribute("srcset");
3671            that._elements.container.insertBefore(imageElement, that._elements.noscript);
3672
3673            var mapElement = temporaryDocument.querySelector(selectors.map);
3674            if (mapElement) {
3675                that._elements.container.insertBefore(mapElement, that._elements.noscript);
3676            }
3677
3678            that._elements.noscript.parentNode.removeChild(that._elements.noscript);
3679            if (that._elements.container.matches(selectors.image)) {
3680                that._elements.image = that._elements.container;
3681            } else {
3682                that._elements.image = that._elements.container.querySelector(selectors.image);
3683            }
3684
3685            that._elements.map = that._elements.container.querySelector(selectors.map);
3686            that._elements.areas = that._elements.container.querySelectorAll(selectors.area);
3687        }
3688
3689        function removeLazyLoader() {
3690            that._elements.image.classList.remove(lazyLoader.cssClass);
3691            for (var property in lazyLoader.style) {
3692                if (lazyLoader.style.hasOwnProperty(property)) {
3693                    that._elements.image.style[property] = "";
3694                }
3695            }
3696            that._elements.image.removeEventListener("load", removeLazyLoader);
3697            that._lazyLoaderShowing = false;
3698        }
3699
3700        function isLazyVisible() {
3701            if (that._elements.container.offsetParent === null) {
3702                return false;
3703            }
3704            var wt = window.pageYOffset;
3705            var wb = wt + document.documentElement.clientHeight;
3706            var et = that._elements.container.getBoundingClientRect().top + wt;
3707            var eb = et + that._elements.container.clientHeight;
3708
3709            return eb >= wt - that._properties.lazythreshold && et <= wb + that._properties.lazythreshold;
3710        }
3711
3712        function resizeAreas() {
3713            if (that._elements.areas && that._elements.areas.length > 0) {
3714                for (var i = 0; i < that._elements.areas.length; i++) {
3715                    var width = that._elements.image.width;
3716                    var height = that._elements.image.height;
3717
3718                    if (width && height) {
3719                        var relcoords = that._elements.areas[i].dataset.cmpRelcoords;
3720                        if (relcoords) {
3721                            var relativeCoordinates = relcoords.split(",");
3722                            var coordinates = new Array(relativeCoordinates.length);
3723
3724                            for (var j = 0; j < coordinates.length; j++) {
3725                                if (j % 2 === 0) {
3726                                    coordinates[j] = parseInt(relativeCoordinates[j] * width);
3727                                } else {
3728                                    coordinates[j] = parseInt(relativeCoordinates[j] * height);
3729                                }
3730                            }
3731
3732                            that._elements.areas[i].coords = coordinates;
3733                        }
3734                    }
3735                }
3736            }
3737        }
3738
3739        function cacheElements(wrapper) {
3740            that._elements = {};
3741            that._elements.self = wrapper;
3742            var hooks = that._elements.self.querySelectorAll("[data-" + NS + "-hook-" + IS + "]");
3743
3744            for (var i = 0; i < hooks.length; i++) {
3745                var hook = hooks[i];
3746                var capitalized = IS;
3747                capitalized = capitalized.charAt(0).toUpperCase() + capitalized.slice(1);
3748                var key = hook.dataset[NS + "Hook" + capitalized];
3749                that._elements[key] = hook;
3750            }
3751        }
3752
3753        function setupProperties(options) {
3754
3755            that._properties = {};
3756
3757            for (var key in properties) {
3758                if (properties.hasOwnProperty(key)) {
3759                    var property = properties[key];
3760                    if (options && options[key] != null) {
3761                        if (property && typeof property.transform === "function") {
3762                            that._properties[key] = property.transform(options[key]);
3763                        } else {
3764                            that._properties[key] = options[key];
3765                        }
3766                    } else {
3767                        that._properties[key] = properties[key]["default"];
3768                    }
3769                }
3770            }
3771
3772        }
3773
3774        function onWindowResize() {
3775            that.update();
3776            resizeAreas();
3777        }
3778
3779        function onLoad() {
3780            resizeAreas();
3781        }
3782
3783        that.update = function() {
3784            if (that._properties.lazy) {
3785                if (isLazyVisible()) {
3786                    loadImage();
3787                }
3788            } else {
3789                loadImage();
3790            }
3791        };
3792
3793        if (config && config.element) {
3794            init(config);
3795        }
3796    }
3797
3798    function onDocumentReady() {
3799        var elements = document.querySelectorAll(selectors.self);
3800
3801        for (var i = 0; i < elements.length; i++) {
3802            new Image({ element: elements[i], options: readData(elements[i]) });
3803        }
3804
3805        var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
3806        var body             = document.querySelector("body");
3807        var observer         = new MutationObserver(function(mutations) {
3808            mutations.forEach(function(mutation) {
3809                // needed for IE
3810                var nodesArray = [].slice.call(mutation.addedNodes);
3811                if (nodesArray.length > 0) {
3812                    nodesArray.forEach(function(addedNode) {
3813                        if (addedNode.querySelectorAll) {
3814                            var elementsArray = [].slice.call(addedNode.querySelectorAll(selectors.self));
3815                            elementsArray.forEach(function(element) {
3816                                new Image({ element: element, options: readData(element) });
3817                            });
3818                        }
3819                    });
3820                }
3821            });
3822        });
3823
3824        observer.observe(body, {
3825            subtree: true,
3826            childList: true,
3827            characterData: true
3828        });
3829    }
3830
3831    if (document.readyState !== "loading") {
3832        onDocumentReady();
3833    } else {
3834        document.addEventListener("DOMContentLoaded", onDocumentReady());
3835    }
3836
3837    /*
3838        on drag & drop of the component into a parsys, noscript's content will be escaped multiple times by the editor which creates
3839        the DOM for editing; the HTML parser cannot be used here due to the multiple escaping
3840     */
3841    function decodeNoscript(text) {
3842        text = text.replace(/&(amp;)*lt;/g, "<");
3843        text = text.replace(/&(amp;)*gt;/g, ">");
3844        return text;
3845    }
3846
3847})();
3848/*******************************************************************************
3849 * Copyright 2022 Adobe
3850 *
3851 * Licensed under the Apache License, Version 2.0 (the "License");
3852 * you may not use this file except in compliance with the License.
3853 * You may obtain a copy of the License at
3854 *
3855 *     http://www.apache.org/licenses/LICENSE-2.0
3856 *
3857 * Unless required by applicable law or agreed to in writing, software
3858 * distributed under the License is distributed on an "AS IS" BASIS,
3859 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3860 * See the License for the specific language governing permissions and
3861 * limitations under the License.
3862 ******************************************************************************/
3863(function(document) {
3864    "use strict";
3865
3866    window.CMP = window.CMP || {};
3867    window.CMP.utils = (function() {
3868        var NS = "cmp";
3869
3870        /**
3871         * Reads options data from the Component wrapper element, defined via {@code data-cmp-*} data attributes
3872         *
3873         * @param {HTMLElement} element The component element to read options data from
3874         * @param {String} is The component identifier
3875         * @returns {String[]} The options read from the component data attributes
3876         */
3877        var readData = function(element, is) {
3878            var data = element.dataset;
3879            var options = [];
3880            var capitalized = is;
3881            capitalized = capitalized.charAt(0).toUpperCase() + capitalized.slice(1);
3882            var reserved = ["is", "hook" + capitalized];
3883
3884            for (var key in data) {
3885                if (Object.prototype.hasOwnProperty.call(data, key)) {
3886                    var value = data[key];
3887
3888                    if (key.indexOf(NS) === 0) {
3889                        key = key.slice(NS.length);
3890                        key = key.charAt(0).toLowerCase() + key.substring(1);
3891
3892                        if (reserved.indexOf(key) === -1) {
3893                            options[key] = value;
3894                        }
3895                    }
3896                }
3897            }
3898            return options;
3899        };
3900
3901        /**
3902         * Set up the final properties of a component by evaluating the transform function or fall back to the default value on demand
3903         * @param {String[]} options the options to transform
3904         * @param {Object} properties object of properties of property functions
3905         * @returns {Object} transformed properties
3906         */
3907        var setupProperties = function(options, properties) {
3908            var transformedProperties = {};
3909
3910            for (var key in properties) {
3911                if (Object.prototype.hasOwnProperty.call(properties, key)) {
3912                    var property = properties[key];
3913                    if (options && options[key] != null) {
3914                        if (property && typeof property.transform === "function") {
3915                            transformedProperties[key] = property.transform(options[key]);
3916                        } else {
3917                            transformedProperties[key] = options[key];
3918                        }
3919                    } else {
3920                        transformedProperties[key] = properties[key]["default"];
3921                    }
3922                }
3923            }
3924            return transformedProperties;
3925        };
3926
3927
3928        return {
3929            readData: readData,
3930            setupProperties: setupProperties
3931        };
3932    }());
3933}(window.document));
3934
3935/*******************************************************************************
3936 * Copyright 2018 Adobe
3937 *
3938 * Licensed under the Apache License, Version 2.0 (the "License");
3939 * you may not use this file except in compliance with the License.
3940 * You may obtain a copy of the License at
3941 *
3942 *     http://www.apache.org/licenses/LICENSE-2.0
3943 *
3944 * Unless required by applicable law or agreed to in writing, software
3945 * distributed under the License is distributed on an "AS IS" BASIS,
3946 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3947 * See the License for the specific language governing permissions and
3948 * limitations under the License.
3949 ******************************************************************************/
3950(function() {
3951    "use strict";
3952
3953    var containerUtils = window.CQ && window.CQ.CoreComponents && window.CQ.CoreComponents.c
3953ontainer && window.CQ.CoreComponents.container.utils ? window.CQ.CoreComponents.container.utils : undefined;
3954    if (!containerUtils) {
3955        // eslint-disable-next-line no-console
3956        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.");
3957    }
3958    var dataLayerEnabled;
3959    var dataLayer;
3960    var dataLayerName;
3961
3962    var NS = "cmp";
3963    var IS = "carousel";
3964
3965    var keyCodes = {
3966        SPACE: 32,
3967        END: 35,
3968        HOME: 36,
3969        ARROW_LEFT: 37,
3970        ARROW_UP: 38,
3971        ARROW_RIGHT: 39,
3972        ARROW_DOWN: 40
3973    };
3974
3975    var selectors = {
3976        self: "[data-" + NS + '-is="' + IS + '"]'
3977    };
3978
3979    var properties = {
3980        /**
3981         * Determines whether the Carousel will automatically transition between slides
3982         *
3983         * @memberof Carousel
3984         * @type {Boolean}
3985         * @default false
3986         */
3987        "autoplay": {
3988            "default": false,
3989            "transform": function(value) {
3990                return !(value === null || typeof value === "undefined");
3991            }
3992        },
3993        /**
3994         * Duration (in milliseconds) before automatically transitioning to the next slide
3995         *
3996         * @memberof Carousel
3997         * @type {Number}
3998         * @default 5000
3999         */
4000        "delay": {
4001            "default": 5000,
4002            "transform": function(value) {
4003                value = parseFloat(value);
4004                return !isNaN(value) ? value : null;
4005            }
4006        },
4007        /**
4008         * Determines whether automatic pause on hovering the carousel is disabled
4009         *
4010         * @memberof Carousel
4011         * @type {Boolean}
4012         * @default false
4013         */
4014        "autopauseDisabled": {
4015            "default": false,
4016            "transform": function(value) {
4017                return !(value === null || typeof value === "undefined");
4018            }
4019        }
4020    };
4021
4022    /**
4023     * Carousel Configuration
4024     *
4025     * @typedef {Object} CarouselConfig Represents a Carousel configuration
4026     * @property {HTMLElement} element The HTMLElement representing the Carousel
4027     * @property {*[]} options The Carousel options
4028     */
4029
4030    /**
4031     * Carousel
4032     *
4033     * @class Carousel
4034     * @classdesc An interactive Carousel component for navigating a list of generic items
4035     * @param {CarouselConfig} config The Carousel configuration
4036     */
4037    function Carousel(config) {
4038        var that = this;
4039
4040        if (config && config.element) {
4041            init(config);
4042        }
4043
4044        /**
4045         * Initializes the Carousel
4046         *
4047         * @private
4048         * @param {CarouselConfig} config The Carousel configuration
4049         */
4050        function init(config) {
4051            that._config = config;
4052
4053            // prevents multiple initialization
4054            config.element.removeAttribute("data-" + NS + "-is");
4055
4056            setupProperties(config.options);
4057            cacheElements(config.element);
4058
4059            that._active = 0;
4060            that._paused = false;
4061
4062            if (that._elements.item) {
4063                initializeActive();
4064                bindEvents();
4065                resetAutoplayInterval();
4066                refreshPlayPauseActions();
4067                scrollToDeepLinkIdInCarousel();
4068            }
4069
4070            // TODO: This section is only relevant in edit mode and should move to the editor clientLib
4071            if (window.Granite && window.Granite.author && window.Granite.author.MessageChannel) {
4072                /*
4073                 * Editor message handling:
4074                 * - subscribe to "cmp.panelcontainer" message requests sent by the editor frame
4075                 * - check that the message data panel container type is correct and that the id (path) matches this specific Carousel component
4076                 * - if so, route the "navigate" operation to enact a navigation of the Carousel based on index data
4077                 */
4078                window.CQ = window.CQ || {};
4079                window.CQ.CoreComponents = window.CQ.CoreComponents || {};
4080                window.CQ.CoreComponents.MESSAGE_CHANNEL = window.CQ.CoreComponents.MESSAGE_CHANNEL || new window.Granite.author.MessageChannel("cqauthor", window);
4081                window.CQ.CoreComponents.MESSAGE_CHANNEL.subscribeRequestMessage("cmp.panelcontainer", function(message) {
4082                    if (message.data && message.data.type === "cmp-carousel" && message.data.id === that._elements.self.dataset["cmpPanelcontainerId"]) {
4083                        if (message.data.operation === "navigate") {
4084                            navigate(message.data.index);
4085                        }
4086                    }
4087                });
4088            }
4089        }
4090
4091        /**
4092         * Displays the slide containing the element that corresponds to the deep link in the URI fragment
4093         * and scrolls the browser to this element.
4094         */
4095        function scrollToDeepLinkIdInCarousel() {
4096            if (containerUtils) {
4097                var deepLinkItemIdx = containerUtils.getDeepLinkItemIdx(that, "item", "item");
4098                if (deepLinkItemIdx > -1) {
4099                    var deepLinkItem = that._elements["item"][deepLinkItemIdx];
4100                    if (deepLinkItem && that._elements["item"][that._active].id !== deepLinkItem.id) {
4101                        navigateAndFocusIndicator(deepLinkItemIdx, true);
4102                        // pause the carousel auto-rotation
4103                        pause();
4104                    }
4105                    var hashId = window.location.hash.substring(1);
4106                    if (hashId) {
4107                        var hashItem = document.querySelector("[id='" + hashId + "']");
4108                        if (hashItem) {
4109                            hashItem.scrollIntoView();
4110                        }
4111                    }
4112                }
4113            }
4114        }
4115
4116        /**
4117         * Caches the Carousel elements as defined via the {@code data-carousel-hook="ELEMENT_NAME"} markup API
4118         *
4119         * @private
4120         * @param {HTMLElement} wrapper The Carousel wrapper element
4121         */
4122        function cacheElements(wrapper) {
4123            that._elements = {};
4124            that._elements.self = wrapper;
4125            var hooks = that._elements.self.querySelectorAll("[data-" + NS + "-hook-" + IS + "]");
4126
4127            for (var i = 0; i < hooks.length; i++) {
4128                var hook = hooks[i];
4129                var capitalized = IS;
4130                capitalized = capitalized.charAt(0).toUpperCase() + capitalized.slice(1);
4131                var key = hook.dataset[NS + "Hook" + capitalized];
4132                if (that._elements[key]) {
4133                    if (!Array.isArray(that._elements[key])) {
4134                        var tmp = that._elements[key];
4135                        that._elements[key] = [tmp];
4136                    }
4137                    that._elements[key].push(hook);
4138                } else {
4139                    that._elements[key] = hook;
4140                }
4141            }
4142        }
4143
4144        /**
4145         * Sets up properties for the Carousel based on the passed options.
4146         *
4147         * @private
4148         * @param {Object} options The Carousel options
4149         */
4150        function setupProperties(options) {
4151            that._properties = {};
4152
4153            for (var key in properties) {
4154                if (Object.prototype.hasOwnProperty.call(properties, key)) {
4155                    var property = properties[key];
4156                    var value = null;
4157
4158                    if (options && options[key] != null) {
4159                        value = options[key];
4160
4161                        // transform the provided option
4162                        if (property && typeof property.transform === "function") {
4163                            value = property.transform(value);
4164                        }
4165                    }
4166
4167                    if (value === null) {
4168                        // value still null, take the property default
4169                        value = properties[key]["default"];
4170                    }
4171
4172                    that._properties[key] = value;
4173                }
4174            }
4175        }
4176
4177        /**
4178         * Binds Carousel event handling
4179         *
4180         * @private
4181         */
4182        function bindEvents() {
4183            window.addEventListener("hashchange", scrollToDeepLinkIdInCarousel, false);
4184            if (that._elements["previous"]) {
4185                that._elements["previous"].addEventListener("click", function() {
4186                    var index = getPreviousIndex();
4187                    navigate(index);
4188                    if (dataLayerEnabled) {
4189                        dataLayer.push({
4190                            event: "cmp:show",
4191                            eventInfo: {
4192                                path: "component." + getDataLayerId(that._elements.item[index])
4193                            }
4194                        });
4195                    }
4196                });
4197            }
4198
4199            if (that._elements["next"]) {
4200                that._elements["next"].addEventListener("click", function() {
4201                    var index = getNextIndex();
4202                    navigate(index);
4203                    if (dataLayerEnabled) {
4204                        dataLayer.push({
4205                            event: "cmp:show",
4206                            eventInfo: {
4207                                path: "component." + getDataLayerId(that._elements.item[index])
4208                            }
4209                        });
4210                    }
4211                });
4212            }
4213
4214            var indicators = that._elements["indicator"];
4215            if (indicators) {
4216                for (var i = 0; i < indicators.length; i++) {
4217                    (function(index) {
4218                        indicators[i].addEventListener("click", function(event) {
4219                            navigateAndFocusIndicator(index);
4220                            // pause the carousel auto-rotation
4221                            pause();
4222                        });
4223                    })(i);
4224                }
4225            }
4226
4227            if (that._elements["pause"]) {
4228                if (that._properties.autoplay) {
4229                    that._elements["pause"].addEventListener("click", onPauseClick);
4230                }
4231            }
4232
4233            if (that._elements["play"]) {
4234                if (that._properties.autoplay) {
4235                    that._elements["play"].addEventListener("click", onPlayClick);
4236                }
4237            }
4238
4239            that._elements.self.addEventListener("keydown", onKeyDown);
4240
4241            if (!that._properties.autopauseDisabled) {
4242                that._elements.self.addEventListener("mouseenter", onMouseEnter);
4243                that._elements.self.addEventListener("mouseleave", onMouseLeave);
4244            }
4245
4246            // for accessibility we pause animation when a element get focused
4247            var items = that._elements["item"];
4248            if (items) {
4249                for (var j = 0; j < items.length; j++) {
4250                    items[j].addEventListener("focusin", onMouseEnter);
4251                    items[j].addEventListener("focusout", onMouseLeave);
4252                }
4253            }
4254        }
4255
4256        /**
4257         * Handles carousel keydown events
4258         *
4259         * @private
4260         * @param {Object} event The keydown event
4261         */
4262        function onKeyDown(event) {
4263            var index = that._active;
4264            var lastIndex = that._elements["indicator"].length - 1;
4265
4266            switch (event.keyCode) {
4267                case keyCodes.ARROW_LEFT:
4268                case keyCodes.ARROW_UP:
4269                    event.preventDefault();
4270                    if (index > 0) {
4271                        navigateAndFocusIndicator(index - 1);
4272                    }
4273                    break;
4274                case keyCodes.ARROW_RIGHT:
4275                case keyCodes.ARROW_DOWN:
4276                    event.preventDefault();
4277                    if (index < lastIndex) {
4278                        navigateAndFocusIndicator(index + 1);
4279                    }
4280                    break;
4281                case keyCodes.HOME:
4282                    event.preventDefault();
4283                    navigateAndFocusIndicator(0);
4284                    break;
4285                case keyCodes.END:
4286                    event.preventDefault();
4287                    navigateAndFocusIndicator(lastIndex);
4288                    break;
4289                case keyCodes.SPACE:
4290                    if (that._properties.autoplay && (event.target !== that._elements["previous"] && event.target !== that._elements["next"])) {
4291                        event.preventDefault();
4292                        if (!that._paused) {
4293                            pause();
4294                        } else {
4295                            play();
4296                        }
4297                    }
4298                    if (event.target === that._elements["pause"]) {
4299                        that._elements["play"].focus();
4300                    }
4301                    if (event.target === that._elements["play"]) {
4302                        that._elements["pause"].focus();
4303                    }
4304                    break;
4305                default:
4306                    return;
4307            }
4308        }
4309
4310        /**
4311         * Handles carousel mouseenter events
4312         *
4313         * @private
4314         * @param {Object} event The mouseenter event
4315         */
4316        function onMouseEnter(event) {
4317            clearAutoplayInterval();
4318        }
4319
4320        /**
4321         * Handles carousel mouseleave events
4322         *
4323         * @private
4324         * @param {Object} event The mouseleave event
4325         */
4326        function onMouseLeave(event) {
4327            resetAutoplayInterval();
4328        }
4329
4330        /**
4331         * Handles pause element click events
4332         *
4333         * @private
4334         * @param {Object} event The click event
4335         */
4336        function onPauseClick(event) {
4337            pause();
4338            that._elements["play"].focus();
4339        }
4340
4341        /**
4342         * Handles play element click events
4343         *
4344         * @private
4345         * @param {Object} event The click event
4346         */
4347        function onPlayClick() {
4348            play();
4349            that._elements["pause"].focus();
4350        }
4351
4352        /**
4353         * Pauses the playing of the Carousel. Sets {@code Carousel#_paused} marker.
4354         * Only relevant when autoplay is enabled
4355         *
4356         * @private
4357         */
4358        function pause() {
4359            that._paused = true;
4360            clearAutoplayInterval();
4361            refreshPlayPauseActions();
4362        }
4363
4364        /**
4365         * Enables the playing of the Carousel. Sets {@code Carousel#_paused} marker.
4366         * Only relevant when autoplay is enabled
4367         *
4368         * @private
4369         */
4370        function play() {
4371            that._paused = false;
4372
4373            // If the Carousel is hovered, don't begin auto transitioning until the next mouse leave event
4374            var hovered = false;
4375            if (that._elements.self.parentElement) {
4376                hovered = that._elements.self.parentElement.querySelector(":hover") === that._elements.self;
4377            }
4378            if (that._properties.autopauseDisabled || !hovered) {
4379                resetAutoplayInterval();
4380            }
4381
4382            refreshPlayPauseActions();
4383        }
4384
4385        /**
4386         * Refreshes the play/pause action markup based on the {@code Carousel#_paused} state
4387         *
4388         * @private
4389         */
4390        function refreshPlayPauseActions() {
4391            setActionDisabled(that._elements["pause"], that._paused);
4392            setActionDisabled(that._elements["play"], !that._paused);
4393        }
4394
4395        /**
4396         * Initialize {@code Carousel#_active} based on the active item of the carousel.
4397         */
4398        function initializeActive() {
4399            var items = that._elements["item"];
4400            if (items && Array.isArray(items)) {
4401                for (var i = 0; i < items.length; i++) {
4402                    if (items[i].classList.contains("cmp-carousel__item--active")) {
4403                        that._active = i;
4404                        break;
4405                    }
4406                }
4407            }
4408        }
4409
4410        /**
4411         * Refreshes the item markup based on the current {@code Carousel#_active} index
4412         *
4413         * @private
4414         */
4415        function refreshActive() {
4416            var items = that._elements["item"];
4417            var indicators = that._elements["indicator"];
4418
4419            if (items) {
4420                if (Array.isArray(items)) {
4421                    for (var i = 0; i < items.length; i++) {
4422                        if (i === parseInt(that._active)) {
4423                            items[i].classList.add("cmp-carousel__item--active");
4424                            items[i].removeAttribute("aria-hidden");
4425                            indicators[i].classList.add("cmp-carousel__indicator--active");
4426                            indicators[i].setAttribute("aria-selected", true);
4427                            indicators[i].setAttribute("tabindex", "0");
4428                        } else {
4429                            items[i].classList.remove("cmp-carousel__item--active");
4430                            items[i].setAttribute("aria-hidden", true);
4431                            indicators[i].classList.remove("cmp-carousel__indicator--active");
4432                            indicators[i].setAttribute("aria-selected", false);
4433                            indicators[i].setAttribute("tabindex", "-1");
4434                        }
4435                    }
4436                } else {
4437                    // only one item
4438                    items.classList.add("cmp-carousel__item--active");
4439                    indicators.classList.add("cmp-carousel__indicator--active");
4440                }
4441            }
4442        }
4443
4444        /**
4445         * Focuses the element and prevents scrolling the element into view
4446         *
4447         * @param {HTMLElement} element Element to focus
4448         */
4449        function focusWithoutScroll(element) {
4450            var x = window.scrollX || window.pageXOffset;
4451            var y = window.scrollY || window.pageYOffset;
4452            element.focus();
4453            window.scrollTo(x, y);
4454        }
4455
4456        /**
4457         * Retrieves the next active index, with looping
4458         *
4459         * @private
4460         * @returns {Number} Index of the next carousel item
4461         */
4462        function getNextIndex() {
4463            return that._active === (that._elements["item"].length - 1) ? 0 : that._active + 1;
4464        }
4465
4466        /**
4467         * Retrieves the previous active index, with looping
4468         *
4469         * @private
4470         * @returns {Number} Index of the previous carousel item
4471         */
4472        function getPreviousIndex() {
4473            return that._active === 0 ? (that._elements["item"].length - 1) : that._active - 1;
4474        }
4475
4476        /**
4477         * Navigates to the item at the provided index
4478         *
4479         * @private
4480         * @param {Number} index The index of the item to navigate to
4481         * @param {Boolean} keepHash true to keep the hash in the URL, false to update it
4482         */
4483        function navigate(index, keepHash) {
4484            if (index < 0 || index > (that._elements["item"].length - 1)) {
4485                return;
4486            }
4487
4488            that._active = index;
4489            refreshActive();
4490
4491            if (!keepHash && containerUtils) {
4492                containerUtils.updateUrlHash(that, "item", index);
4493            }
4494
4495            if (dataLayerEnabled) {
4496                var carouselId = that._elements.self.id;
4497                var activeItem = getDataLayerId(that._elements.item[index]);
4498                var updatePayload = { component: {} };
4499                updatePayload.component[carouselId] = { shownItems: [activeItem] };
4500
4501                var removePayload = { component: {} };
4502                removePayload.component[carouselId] = { shownItems: undefined };
4503
4504                dataLayer.push(removePayload);
4505                dataLayer.push(updatePayload);
4506            }
4507
4508            // reset the autoplay transition interval following navigation, if not already hovering the carousel
4509            if (that._elements.self.parentElement) {
4510                if (that._elements.self.parentElement.querySelector(":hover") !== that._elements.self) {
4511                    resetAutoplayInterval();
4512                }
4513            }
4514        }
4515
4516        /**
4517         * Navigates to the item at the provided index and ensures the active indicator gains focus
4518         *
4519         * @private
4520         * @param {Number} index The index of the item to navigate to
4521         * @param {Boolean} keepHash true to keep the hash in the URL, false to update it
4522         */
4523        function navigateAndFocusIndicator(index, keepHash) {
4524            navigate(index, keepHash);
4525            focusWithoutScroll(that._elements["indicator"][index]);
4526
4527            if (dataLayerEnabled) {
4528                dataLayer.push({
4529                    event: "cmp:show",
4530                    eventInfo: {
4531                        path: "component." + getDataLayerId(that._elements.item[index])
4532                    }
4533                });
4534            }
4535        }
4536
4537        /**
4538         * Starts/resets automatic slide transition interval
4539         *
4540         * @private
4541         */
4542        function resetAutoplayInterval() {
4543            if (that._paused || !that._properties.autoplay) {
4544                return;
4545            }
4546            clearAutoplayInterval();
4547            that._autoplayIntervalId = window.setInterval(function() {
4548                if (document.visibilityState && document.hidden) {
4549                    return;
4550                }
4551                var indicators = that._elements["indicators"];
4552                if (indicators !== document.activeElement && indicators.contains(document.activeElement)) {
4553                    // if an indicator has focus, ensure we switch focus following navigation
4554                    navigateAndFocusIndicator(getNextIndex(), true);
4555                } else {
4556                    navigate(getNextIndex(), true);
4557                }
4558            }, that._properties.delay);
4559        }
4560
4561        /**
4562         * Clears/pauses automatic slide transition interval
4563         *
4564         * @private
4565         */
4566        function clearAutoplayInterval() {
4567            window.clearInterval(that._autoplayIntervalId);
4568            that._autoplayIntervalId = null;
4569        }
4570
4571        /**
4572         * Sets the disabled state for an action and toggles the appropriate CSS classes
4573         *
4574         * @private
4575         * @param {HTMLElement} action Action to disable
4576         * @param {Boolean} [disable] {@code true} to disable, {@code false} to enable
4577         */
4578        function setActionDisabled(action, disable) {
4579            if (!action) {
4580                return;
4581            }
4582            if (disable !== false) {
4583                action.disabled = true;
4584                action.classList.add("cmp-carousel__action--disabled");
4585            } else {
4586                action.disabled = false;
4587                action.classList.remove("cmp-carousel__action--disabled");
4588            }
4589        }
4590    }
4591
4592    /**
4593     * Parses the dataLayer string and returns the ID
4594     *
4595     * @private
4596     * @param {HTMLElement} item the accordion item
4597     * @returns {String} dataLayerId or undefined
4598     */
4599    function getDataLayerId(item) {
4600        if (item) {
4601            if (item.dataset.cmpDataLayer) {
4602                return Object.keys(JSON.parse(item.dataset.cmpDataLayer))[0];
4603            } else {
4604                return item.id;
4605            }
4606        }
4607        return null;
4608    }
4609
4610    /**
4611     * Document ready handler and DOM mutation observers. Initializes Carousel components as necessary.
4612     *
4613     * @private
4614     */
4615    function onDocumentReady() {
4616        dataLayerEnabled = document.body.hasAttribute("data-cmp-data-layer-enabled");
4617        if (dataLayerEnabled) {
4618            dataLayerName = document.body.getAttribute("data-cmp-data-layer-name") || "adobeDataLayer";
4619            dataLayer = window[dataLayerName] = window[dataLayerName] || [];
4620        }
4621
4622        var elements = document.querySelectorAll(selectors.self);
4623        for (var i = 0; i < elements.length; i++) {
4624            new Carousel({ element: elements[i], options: CMP.utils.readData(elements[i], IS) });
4625        }
4626
4627        var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
4628        var body = document.querySelector("body");
4629        var observer = new MutationObserver(function(mutations) {
4630            mutations.forEach(function(mutation) {
4631                // needed for IE
4632                var nodesArray = [].slice.call(mutation.addedNodes);
4633                if (nodesArray.length > 0) {
4634                    nodesArray.forEach(function(addedNode) {
4635                        if (addedNode.querySelectorAll) {
4636                            var elementsArray = [].slice.call(addedNode.querySelectorAll(selectors.self));
4637                            elementsArray.forEach(function(element) {
4638                                new Carousel({ element: element, options: CMP.utils.readData(element, IS) });
4639                            });
4640                        }
4641                    });
4642                }
4643            });
4644        });
4645
4646        observer.observe(body, {
4647            subtree: true,
4648            childList: true,
4649            characterData: true
4650        });
4651    }
4652
4653    var documentReady = document.readyState !== "loading" ? Promise.resolve() : new Promise(function(resolve) {
4654        document.addEventListener("DOMContentLoaded", resolve);
4655    });
4656    Promise.all([documentReady]).then(onDocumentReady);
4657
4658    if (containerUtils) {
4659        window.addEventListener("load", containerUtils.scrollToAnchor, false);
4660    }
4661
4662}());
4663
4664$(document).ready(function() {
4665    var $socialShareHolderEl = $('.social-share'),
4666        socialShareCtxObj;
4667            
4668    BIOG.socialShare = {
4669        _init: function() {
4670			socialShareCtxObj = this;
4671            socialShareCtxObj._bindEvents();
4672                        
4673        },
4674        
4675        /** 
4676		  * Function handler for event binding.
4677		  * 
4678		  */
4679        _bindEvents: function() {
4680
4681            $socialShareHolderEl.on('click', '.variationThree .addthis-wrapper-label', socialShareCtxObj._toggleSocialShareIcons);
4682        },
4683        
4684        
4685        /** 
4686		  * Function handler to toggle display of social share icons on click of icon, label.
4687		  * 
4688		  */
4689        _toggleSocialShareIcons: function(ev, el){
4690            ev.preventDefault();
4691            var $socialIconsEl = $(this).siblings('.addthis_inline_share_toolbox');
4692            $socialIconsEl.toggle('slow');
4693        }  
4694        
4695    }
4696    if($socialShareHolderEl.length) {
4697        BIOG.socialShare._init();
4698    }
4699});
4700BIOG.buttonPdf = {
4701    _init: function($buttonEl) {
4702        var mobileDeviceWidth = window.matchMedia('(max-width: 991px)').matches;
4703        if (mobileDeviceWidth) {
4704            if ($buttonEl.data('linkmobile') && ($buttonEl.data('linkmobile').indexOf(".pdf") != -1)) {
4705                var mobileAlternativePath = $buttonEl.data('linkmobile');
4706                $buttonEl.attr('href', mobileAlternativePath);
4707                $buttonEl.attr('target', '_blank');
4708            }
4709        } else {
4710            var desktopAlternativePath = $buttonEl.data('linkdesktop');
4711            if (desktopAlternativePath && ($buttonEl.data('linkdesktop').indexOf(".pdf") != -1)) {
4712                $buttonEl.attr('href', desktopAlternativePath);
4713                $buttonEl.attr('target', '_blank');
4714            } else {
4715                $buttonEl.attr('href', '#');
4716            }
4717        }
4718    }
4719}
4720/* Initialize button and anchor tag having extension as .pdf */
4721$(document).ready(function() {
4722    $(window).on('load resize', function() {
4723        if ($('.button .cmp-button-link[data-linkmobile], a[data-linkmobile]').length) {
4724            $('.button .cmp-button-link[data-linkmobile], a[data-linkmobile]').each(function() {
4725                BIOG.buttonPdf._init($(this));
4726            });
4727        }
4728    });
4729});
4730let heroFullPlaylist;
4731let playListCounter = 0;
4732let heroImagePath;
4733let playOption;
4734BIOG.backgroundVideoHandler = {
4735    _init: function($videoEl) {
4736        var currentItem = $videoEl.find('.cardcontainer-video').attr('id');
4737        BIOG.backgroundVideoHandler._getJsonPlayList($videoEl);
4738        if (heroFullPlaylist.length > 0) {
4739            BIOG.backgroundVideoHandler._setupBackgrounPlayer('0', currentItem, $videoEl, playOption, heroImagePath, heroFullPlaylist);
4740        }
4741    },
4742    _allVideoInstance: function(playListCounter, currentVideoItem, heroFullPlaylist) {
4743        jwplayer(currentVideoItem).setup({
4744            playlist: heroFullPlaylist.slice(playListCounter, playListCounter + 1),
4745            controls: false,
4746            mute: true,
4747            autostart: true,
4748            stretching: 'stretching',
4749        });
4750    },
4751    _onCompleteVideo: function(playListCounter, currentVideoItem, $videoEl, playOption, heroImagePath, heroFullPlaylist) {
4752        jwplayer(currentVideoItem).on('complete', function() {
4753            jwplayer(currentVideoItem).remove();
4754            playListCounter++;
4755            if (playOption == 'repeatall') {
4756                if (heroFullPlaylist.length == playListCounter) playListCounter = 0;
4757                if ((heroFullPlaylist.length >= playListCounter) || ($videoEl.data('repeat') == false && heroFullPlaylist.length > playListCounter)) {
4758                    BIOG.backgroundVideoHandler._setupBackgrounPlayer(playListCounter, currentVideoItem, $videoEl, playOption, heroImagePath, heroFullPlaylist);
4759                }
4760            } else if (playOption == 'repeatfianlvideo') {
4761                if (heroFullPlaylist.length == playListCounter) playListCounter = heroFullPlaylist.length - 1;
4762                BIOG.backgroundVideoHandler._setupBackgrounPlayer(playListCounter, currentVideoItem, $videoEl, playOption, heroImagePath, heroFullPlaylist);
4763            } else if (playOption == 'showvideothumbnail') {
4764                if (heroFullPlaylist.length == playListCounter) {
4765                    document.getElementById(currentVideoItem).innerHTML = "<img src='" + heroImagePath + "' style='width: 100%'/>";
4766                } else {
4767                    BIOG.backgroundVideoHandler._setupBackgrounPlayer(playListCounter, currentVideoItem, $videoEl, playOption, heroImagePath, heroFullPlaylist);
4768                }
4769            }
4770        });
4771    },
4772    _getJsonPlayList: function($videoEl) {
4773        var videosPlayList = $videoEl.data('video-playlist'),
4774            desktopVideoOptions = $videoEl.data('video-desktopoptions'),
4775            desktopVideoThumbnailPath = $videoEl.data('video-thumbnailpath'),
4776            mobileVideoOptions = $videoEl.data('video-mobileooptions'),
4777            mobileVideoThumbnailPath = $videoEl.data('video-mobilethumbnailpath');
4778        if (videosPlayList) {
4779            if (BIOG.devices.isMobile()) {
4780                heroFullPlaylist = videosPlayList.mobilevideolist;
4781                heroImagePath = mobileVideoThumbnailPath;
4782                playOption = mobileVideoOptions;
4783            } else {
4784                heroFullPlaylist = videosPlayList.desktopvideolist;
4785                heroImagePath = desktopVideoThumbnailPath;
4786                playOption = desktopVideoOptions;
4787            }
4788        }
4789    },
4790    _setupBackgrounPlayer: function(playListCounter, currentVideoItem, $videoEl, playOption, heroImagePath, videosPlayList ) {
4791        BIOG.backgroundVideoHandler._allVideoInstance(playListCounter, currentVideoItem, videosPlayList);
4792        BIOG.backgroundVideoHandler._onCompleteVideo(playListCounter, currentVideoItem, $videoEl, playOption, heroImagePath, videosPlayList );
4793    }
4794}
4795
4796$(document).ready(function() {
4797    if ($('.video-background').length) {
4798        $('.video-background').each(function() {
4799            BIOG.backgroundVideoHandler._init($(this));
4800            if ($(this).find('.hero-content').html().trim() === "") {
4801                $(this).find('.hero-content').remove();
4802            }
4803        });
4804    }
4805});
4806BIOG.html5VideoHandler = {
4807    _init: function($videoEl) {
4808        var currentHTML5VideoItem = $videoEl.find('.html5-videowrapper');
4809        BIOG.html5VideoHandler._loadHtml5Video(currentHTML5VideoItem);
4810    },
4811    _loadHtml5Video: function(currentVideoItem) {
4812        var screenWidth = $(window).width(),
4813         mediumResMinWidth = currentVideoItem.data('min-mediumreso'),
4814         mediumResMaxWidth = currentVideoItem.data('max-mediumreso'),
4815         lowResMaxWidth = currentVideoItem.data('lowres'),
4816         mobileVideoPath = currentVideoItem.data('mobilesource'),
4817         deskTopVideoPath = currentVideoItem.data('desktopsource'),
4818         mediumResolVideoPath = currentVideoItem.data('mediumres'),
4819         videoType = currentVideoItem.data('videotype'),
4820         mobilePosterImg = currentVideoItem.data('low-res-poster'),
4821         deskTopPosterImg = currentVideoItem.data('high-res-poster'),
4822         mediumPosterImg = currentVideoItem.data('mid-res-poster'),
4823         srcUrl,
4824         posterImage,
4825         disableAutoplay=currentVideoItem.data('autoplay');
4826        if (screenWidth <= lowResMaxWidth && mobileVideoPath) {
4827            posterImage = mobilePosterImg;
4828            srcUrl = mobileVideoPath;
4829        } else if (screenWidth >= mediumResMinWidth && screenWidth < mediumResMaxWidth && mediumResolVideoPath) {
4830            posterImage = mediumPosterImg;
4831            srcUrl = mediumResolVideoPath;
4832        } else {
4833            posterImage = deskTopPosterImg;
4834            srcUrl = deskTopVideoPath;
4835        }
4836        if (srcUrl) {
4837            if(!disableAutoplay) {
4838            	var videoHTML = '<video poster=' + posterImage + ' class="cardcontainer-video" loop autoplay muted playsinline>' +
4839                	'<source type=' + videoType + ' src=' + srcUrl + '>' + '</video>';
4840                currentVideoItem.empty().append(videoHTML);
4841            } else {
4842                var videoHTML = '<video poster=' + posterImage + ' class="cardcontainer-video" loop muted playsinline>' +
4843                '<source type=' + videoType + ' src=' + srcUrl + '>' + '</video>';
4844                currentVideoItem.empty().append(videoHTML);
4845
4846                var videoElement=currentVideoItem.find('video');
4847                var videoControlButton = $('.background-video-control');
4848                if (videoElement[0].paused) {
4849        			videoControlButton.addClass('paused');
4850   				} else {
4851        			videoControlButton.removeClass('paused');
4852    			}
4853            }
4854            var videoElement=currentVideoItem.find('video');
4855            var videoControlButton = $('.background-video-control');
4856
4857    		if (videoControlButton.length > 0) {
4858        		videoControlButton.on('click', function (e) {
4859            		e.stopPropagation(); // prevent double-trigger from video click
4860            		if (videoElement[0].paused) {
4861                		videoElement[0].play();
4862                		videoControlButton.removeClass('paused');
4863            		} else {
4864                		videoElement[0].pause();
4865                		videoControlButton.addClass('paused');
4866            		}
4867        		});
4868    		}
4869    		//Logic to play m3u8 video
4870    		if (srcUrl.endsWith('.m3u8')) {
4871        		if (Hls.isSupported()) {
4872            		var hls = new Hls();
4873            		hls.loadSource(srcUrl);
4874            		hls.attachMedia(videoElement[0]);
4875            		hls.on(Hls.Events.MANIFEST_PARSED, function() {
4876                		if (!disableAutoplay) {
4877                    		videoElement[0].play();
4878                		}
4879            		});
4880        		} else if (videoElement[0].canPlayType('application/vnd.apple.mpegurl')) {
4881            		videoElement[0].src = srcUrl;
4882            		videoElement[0].addEventListener('loadedmetadata', function() {
4883                		if (!disableAutoplay) {
4884                    		videoElement[0].play();
4885                		}
4886            		});
4887        		}
4888    		}
4889            if (srcUrl && posterImage === undefined) {
4890                currentVideoItem.find('video').removeAttr('poster');
4891            }
4892        }
4893    }
4894}
4895
4896$(document).ready(function() {
4897    if ($('.html5-video-background').length) {
4898        $('.html5-video-background').each(function() {
4899            BIOG.html5VideoHandler._init($(this));
4900        });
4901    }
4902});
4903var isiContainerV2 = $('.isi-container-v2'),
4904    isiContainerMain = $('.isi-container-main'),
4905    isiContainerTop,
4906    isiContainerHeight,
4907    isiContainerInnerHeight,
4908    isiScrollHeight,
4909    scrollTopHeight,
4910    scrollCollapseFlag = false;
4911BIOG.isiContainerV2 = {
4912    _init: function() {
4913        var trayStatus = $('.isi-container-wrapper').data('traystatus'),
4914            rememberStatus = $('.isi-container-wrapper').data('rememberstatus'),
4915            expandButton = $('.isi-container-wrapper').data('expandbutton'),
4916            collapseButton = $('.isi-container-wrapper').data('collapsebutton'),
4917            cookieName = 'isi-state-v2';
4918        BIOG.isiContainerV2._isiContainerOnload(trayStatus, rememberStatus, expandButton, collapseButton, cookieName);
4919        BIOG.isiContainerV2._isiContainerScrollView(trayStatus, rememberStatus, expandButton, collapseButton, cookieName);
4920        BIOG.isiContainerV2._expandCollapsePanel(trayStatus, rememberStatus, expandButton, collapseButton, cookieName);
4921    },
4922    _isiContainerOnload: function(trayStatus, rememberStatus, expandButton, collapseButton, cookieName) {
4923        $('.collapse-text-container').removeClass('active-button');
4924        if (rememberStatus) {
4925            $.removeCookie(cookieName, {
4926                path: '/'
4927            });
4928        }
4929        if ($.cookie(cookieName)) {
4930            BIOG.isiContainerV2._isiCollapsedView(trayStatus, rememberStatus, expandButton, collapseButton, cookieName);
4931        } else {
4932            if (trayStatus === 'collapsed') {
4933                BIOG.isiContainerV2._isiCollapsedView(trayStatus, rememberStatus, expandButton, collapseButton, cookieName);
4934            } else if (trayStatus === 'expanded') {
4935                if (scrollCollapseFlag) {
4936                    BIOG.isiContainerV2._isiCollapsedView(trayStatus, rememberStatus, expandButton, collapseButton, cookieName);
4937                } else {
4938                    BIOG.isiContainerV2._isiExpandedView(trayStatus, rememberStatus, expandButton, collapseButton, cookieName);
4939                }
4940            } else {
4941                if (scrollCollapseFlag) {
4942                    BIOG.isiContainerV2._isiCollapsedView(trayStatus, rememberStatus, expandButton, collapseButton, cookieName);
4943                } else {
4944                    BIOG.isiContainerV2._isiPreviewView(trayStatus, rememberStatus, expandButton, collapseButton, cookieName);
4945                }
4946            }
4947        }
4948        BIOG.isiContainerV2._isiButtonDisplay(trayStatus, rememberStatus, expandButton, collapseButton, cookieName);
4949    },
4950    _isiButtonDisplay: function(trayStatus, rememberStatus, expandButton, collapseButton, cookieName) {
4951        if (expandButton) {
4952            $('.expand-text-container').addClass('active-button');
4953        }
4954        if (collapseButton) {
4955            $('.collapse-text-container').addClass('active-button');
4956        }
4957    },
4958    _isiCollapsedView: function(trayStatus, rememberStatus, expandButton, collapseButton, cookieName) {
4959        $('.collapse-text-container').removeClass('active-button');
4960        $('.expand-text-container').removeClass('active-button');
4961        $('.isi-overlay-v2').hide();
4962        isiContainerMain.removeClass('expanded-mode preview-mode');
4963        isiContainerMain.addClass('collapsed-mode');
4964        $('body').removeClass('no-scroll');
4965        $('.isi-container-wrapper').data('traystatus', 'collapsed');
4966        scrollCollapseFlag = true;
4967    },
4968    _isiExpandedView: function(trayStatus, rememberStatus, expandButton, collapseButton, cookieName) {
4969        $('.collapse-text-container').removeClass('active-button');
4970        $('.isi-overlay-v2').show();
4971        isiContainerMain.removeClass('collapsed-mode preview-mode');
4972        isiContainerMain.addClass('expanded-mode');
4973        $('body').addClass('no-scroll');
4974        var expandedHeaderHeight =  $('.expanded-mode .isi-container-header').outerHeight();
4975        $('.expanded-mode .isi-container-body').css('padding-top',expandedHeaderHeight+10);
4976    },
4977    _isiPreviewView: function(trayStatus, rememberStatus, expandButton, collapseButton, cookieName) {
4978        BIOG.isiContainerV2._isiButtonDisplay(trayStatus, rememberStatus, expandButton, collapseButton, cookieName);
4979        $('.isi-overlay-v2').hide();
4980        isiContainerMain.addClass('preview-mode');
4981        $('body').removeClass('no-scroll');
4982        if (rememberStatus) {
4983            $.removeCookie(cookieName, {
4984                path: '/'
4985            });
4986        }
4987    },
4988    _isiContainerScrollView: function(trayStatus, rememberStatus, expandButton, collapseButton, cookieName) {
4989        $('body').on('isiScrollHeight', function() {
4990            if ($('.isi-container-main').length) {
4991                BIOG.isiContainerV2._isiContainerGetPosition(trayStatus, rememberStatus, expandButton, collapseButton, cookieName);
4992                if (isiContainerTop > scrollTopHeight) {
4993                    BIOG.isiContainerV2._isiContainerActive(trayStatus, rememberStatus, expandButton, collapseButton, cookieName);
4994                } else {
4995                    BIOG.isiContainerV2._isiContainerInactive(trayStatus, rememberStatus, expandButton, collapseButton, cookieName);
4996                }
4997            }
4998        });
4999    },
5000    _isiContainerActive: function(trayStatus, rememberStatus, expandButton, collapseButton, cookieName) {
5001        $(isiContainerMain).removeClass('inline-view');
5002        $(isiContainerMain).addClass('sticky-view');
5003        BIOG.isiContainerV2._isiContainerOnload(trayStatus, rememberStatus, expandButton, collapseButton, cookieName);
5004        isiContainerInnerHeight = isiContainerMain.innerHeight();
5005    },
5006    _isiContainerInactive: function(trayStatus, rememberStatus, expandButton, collapseButton, cookieName) {
5007        $(isiContainerMain).removeClass('sticky-view');
5008        $(isiContainerMain).addClass('inline-view');
5009        isiContainerMain.removeClass('preview-mode collapsed-mode');
5010        isiContainerInnerHeight = isiContainerMain.outerHeight(true);
5011    },
5012    _isiContainerGetPosition: function(trayStatus, rememberStatus, expandButton, collapseButton, cookieName) {
5013        var windowOffset = window.pageYOffset,
5014            windowHeight = window.innerHeight;
5015        BIOG.isiContainerV2._isiContainerInactive(trayStatus, rememberStatus, expandButton, collapseButton, cookieName);
5016        isiContainerTop = isiContainerV2.offset().top;
5017        isiContainerHeight = isiContainerInnerHeight;
5018        BIOG.isiContainerV2._isiContainerActive(trayStatus, rememberStatus, expandButton, collapseButton, cookieName);
5019        scrollTopHeight = windowOffset + windowHeight - isiContainerInnerHeight;
5020        isiContainerV2.height(isiContainerHeight);
5021    },
5022    _expandCollapsePanel: function(trayStatus, rememberStatus, expandButton, collapseButton, cookieName) {
5023        $(window).on('load scroll resize', function() {
5024            $('body').trigger('isiScrollHeight');
5025        });
5026
5027        $(document).on('click', '.isi-overlay-v2', function() {
5028            $(this).hide();
5029            BIOG.isiContainerV2._isiCollapsedView(trayStatus, rememberStatus, expandButton, collapseButton, cookieName);
5030            if (!($.cookie(cookieName)) && !(rememberStatus)) {
5031                $.cookie(cookieName, 'true', {
5032                    path: '/'
5033                });
5034            }
5035        });
5036
5037        $(document).on('click', '.expand-text-container, .collapse-text-container', function(e) {
5038            e.preventDefault()
5039            e.stopPropagation();
5040            var $this = $(this);
5041            if ($this.find('.arrow').hasClass('up-arrow')) {
5042                BIOG.isiContainerV2._isiExpandedView(trayStatus, rememberStatus, expandButton, collapseButton, cookieName);
5043                $('.expand-text-container').removeClass('active-button');
5044                $('.collapse-text-container').addClass('active-button');
5045                if(!BIOG.devices.isDesktop()){
5046        			addHeaderPadding();
5047        		}	
5048            } else {
5049                BIOG.isiContainerV2._isiCollapsedView(trayStatus, rememberStatus, expandButton, collapseButton, cookieName);
5050                $('.expand-text-container').addClass('active-button');
5051                $('.collapse-text-container').removeClass('active-button');
5052                if(!BIOG.devices.isDesktop()){
5053             	   $('.isi-container-main').removeAttr('style');
5054                }
5055                if (!($.cookie(cookieName)) && !(rememberStatus)) {
5056                    $.cookie(cookieName, 'true', {
5057                        path: '/'
5058                    });
5059                }
5060            }
5061        });
5062    }
5063}
5064
5065$(document).ready(function() {
5066    if ($('.isi-container-v2.publish-mode').length > 0) {
5067        BIOG.isiContainerV2._init();
5068    }
5069});
5070$(document).ready(function(){
5071	var $body = $("body"),
5072      $cmpISI = $('.cmp-isi'),
5073      $isiOverlay = $('.isi-overlay'),
5074	  cookieName = 'isi-state',
5075      suppressCookie= $('input[name=suppressRememberStatus]').val(),
5076      defaultView = $('input[name=defaultTrayStatus]').val(),
5077      enableExpandButton= $('input[name=enableExpandButton]').val(),
5078      enableCollapseButton = $('input[name=enableCollapseButton]').val()
5079      if(suppressCookie ==='true') {
5080        $.removeCookie(cookieName, { path: '/' });
5081      }
5082      if($.cookie(cookieName) === 'true' ) {
5083        collapsedView();
5084      } else {
5085        if(defaultView === 'collapsed'){
5086          collapsedView();
5087        } else if(defaultView === 'expanded') {
5088          expandedView();
5089        } else {
5090          previewView();
5091        }
5092      }
5093      var stickyPadding = false;
5094
5095    function collapsedView() {
5096      $cmpISI.find('.isi-container').hide();
5097      $cmpISI.find('.preview-container').show();
5098      $cmpISI.find('.expand-container').hide();
5099      $cmpISI.removeClass('is-collapsed is-expanded').addClass('is-preview');
5100      $isiOverlay.hide();
5101      $body.removeClass('no-scroll');
5102      if($.cookie(cookieName) !== 'true' && suppressCookie !=='true') {
5103      $.cookie(cookieName,'true',{ path: '/' });
5104      }
5105      $('.cmp-floating-cta').removeClass('isi-expand-view'); // add the additional css class when floating cta exist
5106      $('.cmp-floating-cta').addClass('isi-preview-view');  
5107    };  
5108
5109    function expandedView() {
5110     $cmpISI.find('.isi-container').hide();
5111     $cmpISI.find('.expand-container').show();
5112     $cmpISI.removeClass('is-collapsed is-preview').addClass('is-expanded');
5113     $isiOverlay.show();
5114     $body.addClass('no-scroll');
5115     $.removeCookie(cookieName, { path: '/' });
5116    };
5117
5118    function previewView() {
5119     if(enableExpandButton=='true'&& enableCollapseButton=='true'){
5120     previewCheckbox();
5121      }
5122     else if(enableExpandButton=='true'&& enableCollapseButton=='false'){
5123     previewCheckbox();
5124     }
5125     else{
5126     $cmpISI.find('.isi-container').show();
5127     $cmpISI.find('.preview-container').hide();      
5128     $cmpISI.find('.expand-container').hide();     
5129     $cmpISI.removeClass('is-preview is-expanded').addClass('is-collapsed');
5130     $isiOverlay.hide();
5131     $body.removeClass('no-scroll');
5132     $.removeCookie(cookieName, { path: '/' });
5133     }
5134    };
5135
5136    function previewCheckbox(){
5137      var $this = $('.isi-overlay'),
5138      $isiContainer = $this.siblings('.cmp-isi'),
5139      $isiChildren = $isiContainer.find('.collapse-container');
5140      $cmpISI.find('.isi-container').show();
5141      $cmpISI.find('.preview-container').hide();      
5142      $cmpISI.find('.expand-container').hide();
5143      $cmpISI.removeClass('is-preview is-expanded').addClass('is-collapsed');
5144      $isiOverlay.hide();
5145      if($isiChildren.find('.more-text-container').length>0 && $isiChildren.find('.hide-text-container').length>0){
5146      $isiChildren.find('.more-text-container').addClass('overridealignright');
5147      $isiChildren.find('.hide-text-container').addClass('overridealignright');
5148      }
5149     }
5150   $(document).on('click','.hide-text-container .up-arrow, .hide-text-container .down-arrow',function(e){
5151       e.stopPropagation();
5152       var $this = $(this),
5153       $parentContainer = $this.closest('.cmp-isi');
5154       $parentContainer.find('.isi-container').hide();
5155       if($this.hasClass('preview-container')){
5156       expandedView();
5157       }else{
5158       collapsedView();           
5159       }
5160       if(!BIOG.devices.isDesktop()){
5161    	   if(!BIOG.devices.isDesktop()){
5162        	   $('.cmp-isi').css('top','auto');
5163               $('.cmp-isi').css('bottom','0');
5164           }
5165       }
5166    }); 
5167      $(document).on('click','.more-text-container .up-arrow',function(e){
5168        var $this = $(this),
5169        $parentContainer = $this.closest('.cmp-isi');
5170        $parentContainer.find('.isi-container').hide();
5171        $parentContainer.find('.expand-container').show();
5172        $parentContainer.removeClass('is-collapsed is-preview').addClass('is-expanded');
5173        $isiOverlay.show();
5174		$body.addClass('no-scroll');
5175		$('.cmp-floating-cta').addClass('isi-expand-view'); // remove the additional css class when isi in expand view
5176        $('.cmp-floating-cta').removeClass('isi-preview-view');
5177		if(!stickyPadding && $parentContainer.find('.expand-container.sticky-header').length >0){
5178			var stickeyHeaderHeight = parseInt($parentContainer.find('.expand-container.sticky-header .isi-header').outerHeight());
5179	        var bodyContentPadding = parseInt($parentContainer.find('.expand-container.sticky-header .isi-content.expand-text').css('padding-top'));
5180			$parentContainer.find('.expand-container.sticky-header .isi-content.expand-text').css('padding-top',stickeyHeaderHeight+bodyContentPadding);
5181			stickyPadding = true;
5182		}	
5183		if(!BIOG.devices.isDesktop()){
5184			addHeaderPadding();
5185		}		
5186    var cookiebanner = document.getElementById("cookiebanner");
5187    if(cookiebanner) {
5188        var topHeader = document.querySelector(".header");
5189        cookiebanner.style.display = "none";
5190        topHeader.style.paddingTop = "0px";
5191    }
5192       });
5193     $(document).on('click','.isi-overlay',function(){
5194        var $this = $(this),
5195        $isiContainer = $this.siblings('.cmp-isi');
5196        $this.hide();
5197        $isiContainer.find('.isi-container').hide();
5198        $isiContainer.find('.preview-container').show();
5199        $isiContainer.removeClass('is-collapsed is-expanded').addClass('is-preview');
5200		$body.removeClass('no-scroll');
5201		$('.cmp-floating-cta').removeClass('isi-expand-view');
5202        $('.cmp-floating-cta').addClass('isi-preview-view');
5203        if($.cookie(cookieName) !== 'true') {
5204        $.cookie(cookieName,'true',{ path: '/' });
5205         }
5206     });
5207	$(window).on('resize', function() {
5208		if($('.cmp-isi.sticky-element .isi-container.collapse-container').css('display') !== 'none'){
5209		    resizeISI();
5210		}
5211	});
5212
5213  	function resizeISI() {
5214        if($(window).width() < 1263) {      
5215          $('.cmp-isi.sticky-element .isi-container.collapse-container').addClass('resize-isi');
5216        } else {
5217  		    $('.cmp-isi.sticky-element .isi-container.collapse-container').removeClass('resize-isi');
5218        }
5219    }
5220 
5221});
5222/*function to add dynamic padding to top of ISI in expanded view when isi-tray-below-header is checked */
5223function addHeaderPadding(){ 
5224	if((($('.is-expanded').length)) || ($('.expanded-mode').length)){
5225		var topPadding = 0;
5226		if( $('header').hasClass('sticky-mobile-header')){
5227			topPadding = $('.header-utilitynav-wrapper').outerHeight()+$('.header-topnav-wrapper').outerHeight();
5228		}
5229		if($('.cmp-notification').length >0 && $('.cmp-notification').hasClass('sticky') &&  (!($('.cmp-notification').hasClass('hidden')))){
5230			var notificationHeight =  $('.cmp-notification.sticky').outerHeight();
5231			topPadding = topPadding + notificationHeight;		
5232		}
5233		if($('.isi-tray-below-header').length >0){
5234			$('.isi-tray-below-header').parent().css('top',topPadding);
5235		}
5236	}
5237}
5238$(document).ready(function() {
5239	BIOG.ctaTile = {
5240		_autoload: [
5241			'makeTileClickable',
5242			'setCtaTileHref'
5243		],
5244		makeTileClickable: function() {
5245			var $ctatileWraper = $('.cmp-cta-tile');
5246			if($ctatileWraper.length) {
5247				BIOG.options._entireTileClickable($ctatileWraper,'.cmp-cta-tile-fullview-link');
5248			}
5249		},
5250		setCtaTileHref: function() {
5251			var MOBILE_BREAKPOINT = 991;
5252
5253			function updateHrefs() {
5254				var isMobile = $(window).width() <= MOBILE_BREAKPOINT;
5255
5256				$('.cmp-button-link').each(function() {
5257					var mobileUrl = $(this).data('mobile-url');
5258					var desktopUrl = $(this).data('desktop-url');
5259					var finalUrl = (isMobile && mobileUrl) ? mobileUrl : desktopUrl;
5260
5261					if (finalUrl) {
5262						$(this).attr('href', finalUrl);
5263					}
5264				});
5265			}
5266
5267			// Set href values on load
5268			updateHrefs();
5269
5270			// Update href values when viewport is resized across the breakpoint
5271			$(window).on('resize', updateHrefs);
5272		}
5273	};
5274	BIOG.ctaTile.setCtaTileHref();
5275});
5276$(document).ready(function() {
5277    $(document).on('click', '.section-title', showContent);
5278    showRelatedSection();
5279    showTooltip();
5280    showExpandCollapseLabel(); // expand and collapse text rendering
5281    // Method to scroll to focus accordion when reference key matches
5282    function scrollToActiveAccordion() {
5283        if ($('.active-accordion').length > 0) {
5284            $('html, body').stop().animate({
5285                scrollTop: $(".active-accordion").closest('.section-container').offset().top - BIOG.options._calStickyHeaderHeight()
5286            }, 500);
5287        }
5288    }
5289    if (document.readyState === 'complete') {
5290        setTimeout(scrollToActiveAccordion, 500);
5291    } else {
5292        $(window).on('load', function() {
5293            setTimeout(scrollToActiveAccordion, 500);
5294        });
5295    }
5296});
5297/* shows related accordion section based on user click*/
5298function showContent() {
5299    var $this = $(this),
5300        $parentContainer = $this.closest('.cmp-accordion'),
5301        $sectionContainer = $this.closest('.section-container');
5302    appendAccordionKey($this);
5303    // added method for custom show the current accordion as show and hide and collpase others accordion if expand state 
5304	if ((typeof customAccordionCurrentExpand === 'function')) {
5305        customAccordionCurrentExpand($this, $parentContainer, $sectionContainer);
5306    }
5307    else {
5308        if ($sectionContainer.hasClass('collapsed')) {
5309            $sectionContainer.removeClass('collapsed');
5310            if ($sectionContainer.find('.expand-collapse-text').length > 0) {
5311                $sectionContainer.find('.expand-collapse-text').html($sectionContainer.data('accordion-expand-text'));
5312            }
5313        } else {
5314            if (!$parentContainer.hasClass('collapse-all')) {
5315                $parentContainer.find('.section-container')
5316                    .removeClass('collapsed');
5317            }
5318            $sectionContainer.addClass('collapsed');
5319            if ($sectionContainer.find('.expand-collapse-text').length > 0) {
5320                if (!$parentContainer.hasClass('collapse-all')) {
5321                    $parentContainer.find('.expand-collapse-text').html($sectionContainer.data('accordion-expand-text'));
5322                    $sectionContainer.find('.expand-collapse-text').html($sectionContainer.data('accordion-collapse-text'));
5323                } else {
5324                    $sectionContainer.find('.expand-collapse-text').html($sectionContainer.data('accordion-collapse-text'));
5325                }
5326            }
5327        }
5328    }
5329}
5330/*adds the reference key based on user click on accordion section title*/
5331function appendAccordionKey($secTitle) {
5332    var $sectionTitle = $secTitle,
5333        referenceKey = $sectionTitle.data("referencekey"),
5334        newUrl = BIOG.options.getFormattedUrl('accKey', referenceKey);
5335    if (history.pushState) {
5336        window.history.pushState({
5337            path: newUrl
5338        }, '', newUrl);
5339    }
5340}
5341/*shows related accordion section in open state on URL hit based on reference Key
5342  present in URL paramenter
5343*/
5344function showRelatedSection() {
5345    var currentUrl = window.location.href,
5346        referenceKey = '',
5347        $sectionTitle = $(".section-title"),
5348        $sectionContainer = $sectionTitle.closest(".section-container");
5349    if (currentUrl.indexOf("accKey") >= 0) {
5350        referenceKey = currentUrl.split("accKey=")[1];
5351        referenceKey = referenceKey.indexOf('&') >= 0 ? referenceKey.split('&')[0] : referenceKey;
5352    }
5353    if (referenceKey !== '') {
5354        $sectionTitle.each(function() {
5355            var $this = $(this);
5356            if ($this.data('referencekey') == referenceKey) {
5357                $sectionContainer.removeClass("collapsed");
5358                $this.closest(".section-container")
5359                    .addClass("collapsed");
5360                $this.closest(".section-container").addClass('active-accordion');
5361                return false;
5362            }
5363        })
5364    }
5365}
5366function showTooltip(){
5367	$('.cmp-accordion').each(function(){
5368        if($(this).find(".tooltips").length){
5369            $(this).find(".tooltips").each(function(){
5370                if($(this).data("title")){
5371                    $(this).removeClass("tooltipstered");
5372                    $(this).attr("title", $(this).data("title"));
5373                }
5374            });
5375        }
5376    });
5377}
5378function showExpandCollapseLabel() {
5379    var $sectionTitle = $(".section-title");
5380    $sectionTitle.each(function() {
5381        if ($(this).closest('.section-container').hasClass('collapsed')) {
5382            $(this).closest('.section-container').find('.expand-collapse-text').html($(this).closest('.section-container').data('accordion-collapse-text'));
5383        } else {
5384            $(this).closest('.section-container').find('.expand-collapse-text').html($(this).closest('.section-container').data('accordion-expand-text'));
5385        }
5386    })
5387}
5388var modalCtxObj;
5389var lightBoxDataTarget;
5390var $changePasswordFormID;
5391var $changePasswordEl;
5392var $resetPasswordEl;
5393var $resetPasswordFormID ;
5394var temLightBoxPath;
5395var dataFlag;
5396var lightboxModalId = $('#genericLightbox');
5397var personolizationModalPageUrl;
5398var personolizedElem;
5399BIOG.LightBoxModal = {
5400    _init: function() {
5401    lightBoxDataTarget = $('a[data-target="#genericLightbox"]');
5402        modalCtxObj = this;
5403        if(window.lightboxLink){
5404      lightBoxDataTarget = window.lightboxLink;
5405        }
5406        modalCtxObj._bindEvents(lightBoxDataTarget);
5407  },
5408    _bindEvents: function(lightBoxDataTarget) {
5409          lightBoxDataTarget.on('click',modalCtxObj._modalAnchorClick);
5410     },
5411    _modalAnchorClick: function(ev, el) {
5412        ev.preventDefault();
5413        var lightBoxPath = $(this).data("lightbox-path"); 
5414        personolizedElem = $(this).parent().data('personalization');
5415        if(personolizedElem === true){
5416      $(this).parent().addClass('article-viewed');
5417          personolizationModalPageUrl = $(this).parent().find('.data-personalization-url').attr('href');
5418        }
5419        if (temLightBoxPath != undefined && temLightBoxPath == lightBoxPath && !($('.placeholder').length >0) && (!($('#genericLightbox').find('.videojs').length > 0))) {
5420          lightboxModalId.modal('show');
5421          $('html').animate({scrollTop: $(window).scrollTop() + 2});
5422        }
5423        else{
5424          if(lightBoxPath != undefined){
5425            temLightBoxPath = lightBoxPath;
5426              $.ajax({
5427                  url: lightBoxPath,
5428                  type: 'GET',
5429                  contentType: 'text/plain',
5430                  dataType: 'html',
5431                  success: function(data) {
5432                    modalCtxObj._videoLoadOnModal(data);
5433                    if(dataFlag){
5434                      modalCtxObj._lightboxDataReplace(data);
5435                    }
5436                    BIOG.UTILS._hideLoader();
5437                    lightboxModalId.modal('show');
5438                    $('html').animate({scrollTop: $(window).scrollTop() + 2});
5439                   }
5440              });
5441          }
5442        }
5443    },
5444    _plceholderReplacement:function(){
5445      BIOG.MediaGalleryModal._handleplaceholders();
5446        if($('.genericform-medication-reminder').length >0){
5447          BIOG.genericformMedicationReminder._optOutBtnPlaceholder($('.genericform-medication-reminder'));
5448        }
5449        if($('.mapresults-v2').length >0){
5450          BIOG.TreatmentResults_v2._shareModalPlaceholder($('.genericForm'));
5451        }
5452        if($('.locator-tool-container').length >0){
5453           BIOG.TreatmentLocatorResults.triggercopyUrlClick();
5454        }
5455    },
5456    _declaringVariables:function(){
5457      $changePasswordFormID = $('.changePasswordForm').attr('id');
5458    $changePasswordEl = $('#'+$changePasswordFormID);
5459      $resetPasswordFormID = $('.resetPasswordForm').attr('id');
5460      $resetPasswordEl = $('#'+$resetPasswordFormID);
5461    },
5462    _genericBindFnOnLoad:function(){
5463      modalCtxObj._declaringVariables();
5464     if ($('#signInForm').length) {
5465                BIOG.signInForm._init();
5466        }
5467     if($('#forgotPasswordForm').length) {
5468          BIOG.forgotPasswordForm._init();
5469      }
5470     if($changePasswordEl.length) {
5471          BIOG.changePasswordForm._init();
5472      }
5473     if($resetPasswordEl.length) {
5474          BIOG.resetPasswordForm._init();
5475      }
5476     if($('form.user-form').length){
5477        BIOG.onBlurValidate._init($('.lightbox-modal'));
5478        $('form.user-form').each(function() {
5479                BIOG.autopopulateCityState._init($(this).find('.form-group'));
5480            });
5481       }
5482     if ($('.genericForm').length) {
5483      $('.genericForm').each(function() {
5484        BIOG.genericForm._init($(this));
5485      });
5486     }
5487     if($('.ciam-signin-form').length) {
5488       $('.ciam-signin-form').each(function() {
5489         BIOG.ciamSignInForm._init($(this));
5490      });
5491     }
5492     if($('.ciam-register-wrapper').length) {
5493      $('.ciam-register-wrapper').each(function() {
5494        BIOG.ciamRegister.checkEmailValidation($(this).find('.emailValidationForm'));
5495        BIOG.options.conditionalFunction($(this).find('.registrationForm'));
5496      });
5497    }
5498     if ($('.ciam-edit-profile-container').length) {
5499          $('.ciam-edit-profile-container').each(function() {
5500              BIOG.ciamEditProfile._init($(this).find('.ciam-editProfile'));
5501              BIOG.options.conditionalFunction($(this).find('.ciam-editProfile'));
5502          });
5503      }
5504     if ($('.ciamForgotPasswordForm').length) {
5505          $('.ciamForgotPasswordForm').each(function() {
5506              BIOG.ciamForgotPasswordForm._init($(this));
5507          });
5508      }
5509     if($('.changeResetPasswordForm').length) {
5510       $('.changeResetPasswordForm').each(function() {
5511            BIOG.CIAMChangePasswordForm._init($(this));
5512       });
5513     }
5514	 if ($('.share-button-wrapper').length) {
5515		$('.share-button-wrapper').each(function () {
5516			BIOG.shareButton._init($(this));
5517		});
5518	 }
5519	 if ($('.cmp-download').length > 0) {
5520		$('.cmp-download').each(function () {
5521			BIOG.documentShare._init($(this));
5522		});
5523	 }
5524	 if ($('.file-upload-wrapper').length) {
5525         BIOG.fileUpload._fileUploadDragDrop($('.file-upload-wrapper'));
5526         $('.file-upload-wrapper').each(function() {
5527             BIOG.fileUpload._init($(this));
5528         });
5529     }
5530     if ($('.cmp-video .cta-video-overlay').length > 0) {
5531        BIOG.Video._videoOnLoad();
5532     }  
5533    },
5534    _handleFnOnLoad:function(){
5535    var pairs = location.search.substr(1).split('&');
5536      for (var i = 0; i < pairs.length; i++) {
5537          var search = pairs[i].split('='),
5538              key = search[0],
5539              val = search[1];
5540         if (key == 'lightbox') {
5541              $('[data-lightbox-path="' + val + '"]').click();
5542          }
5543      }
5544    },
5545    _videoLoadOnModal: function(data) {
5546        var getScriptjs = $(data).find('script[type="text/javascript"]').attr('src');
5547        var alreadyLoaded = document.querySelector('script[src="' + getScriptjs + '"]') ? true : false;
5548        if (getScriptjs !== undefined) {
5549            if (!alreadyLoaded) {
5550                dataFlag = false;
5551                function loadScript(url, callback) {
5552                    var head = document.getElementsByTagName('head')[0];
5553                    var script = document.createElement('script');
5554                    script.type = 'text/javascript';
5555                    script.src = url;
5556                    script.onload = callback;
5557                    head.appendChild(script);
5558                }
5559                var replaceCode = function() {
5560                    if (dataFlag == false) {
5561                     if(mediagGalleryVideoFlag){
5562                BIOG.MediaGalleryModal._appendVideoData(data);
5563                       }else{
5564                         modalCtxObj._lightboxDataReplace(data);
5565                       }
5566                    }
5567                };
5568                loadScript(getScriptjs, replaceCode);
5569            } else {
5570                dataFlag = true;
5571            }
5572        } else {
5573            dataFlag = true;
5574        }
5575        lightboxModalId.on('hide.bs.modal', function() {
5576            if ($(".lightbox-modal").find('.cmp-video').length > 0) {
5577               $('.cmp-video').each(function() {
5578					var divElem = $(this).find('div')[0];
5579                    var currentVideoItem = $(divElem).attr('id');
5580					if(($('.jwplayer').length >0) && jwplayer(currentVideoItem).getState() === 'buffering' || jwplayer(currentVideoItem).getState() === 'playing'){
5581                      jwplayer(currentVideoItem).stop();
5582                    }
5583               });
5584            }
5585            if ($(".lightbox-modal").find('.video-js-wrapper').length > 0) {
5586				var VideoId = $('.lightbox-modal .video-js-wrapper').find('.video-js').attr('id'); 
5587                videojs(VideoId).pause();
5588                videojs(VideoId).dispose();
5589               $('.lightbox-modal .video-js-wrapper').remove();
5590            }
5591        });
5592        //drun 1501 fix
5593        lightboxModalId.on("shown.bs.modal", function() {
5594            $(this).addClass("fade");
5595        });
5596    },
5597    _lightboxDataReplace:function(data){
5598      $(".lightbox-modal").replaceWith(data); 
5599        modalCtxObj._genericBindFnOnLoad();
5600        if($(".lightbox-modal").length > 0){
5601      var lightboxlink = $('.lightbox-modal a[data-bs-target="#genericLightbox"]');
5602             modalCtxObj._bindEvents(lightboxlink);
5603             modalCtxObj._plceholderReplacement();
5604        }
5605        if($('.lightbox-modal[data-preventclose]').length>0){
5606          lightboxModalId.attr('data-bs-backdrop', 'static');
5607        }
5608        // lightbox video fix for videoJS
5609        if($(".lightbox-modal").find('.video-js-wrapper').length > 0) {
5610            var getScriptjs = 'https://vjs.zencdn.net/7.21.1/video.min.js';
5611            var alreadyLoaded = document.querySelector('script[src="' + getScriptjs + '"]') ? true : false;
5612            if (getScriptjs !== undefined && !alreadyLoaded) {
5613                function loadScript(url, callback) {
5614                    var head = document.getElementsByTagName('head')[0];
5615                    var script = document.createElement('script');
5616                    script.type = 'text/javascript';
5617                    script.src = url;
5618                    script.onload = callback;
5619                    head.appendChild(script);
5620                }
5621                var replaceCode = function() {
5622                    setTimeout(function() { BIOG.videoJs._init($('.modal-content .video-js-wrapper')); }, 500);
5623                };
5624                loadScript(getScriptjs, replaceCode);
5625            } else {
5626                setTimeout(function() { BIOG.videoJs._init($('.modal-content .video-js-wrapper')); }, 500);
5627            } 
5628        }
5629    }
5630}
5631$(document).ready(function() {
5632    if ($('a[data-target="#genericLightbox"]').length > 0) {
5633    
5634    //drun 1501 fix
5635        $('#genericLightbox').removeClass("fade"); 
5636        
5637        BIOG.LightBoxModal._init();
5638        BIOG.LightBoxModal._handleFnOnLoad();
5639        $(document).keydown(function(e) {
5640          if($('.lightbox-modal[data-preventclose]').length <= 0){
5641            if (e.keyCode == 27) {
5642              lightboxModalId.modal('hide');
5643              BIOG.MediaGalleryModal._videoClose();
5644            }
5645          }
5646        });        
5647    }
5648});
5649$(document).on('click', '.transformer-modal-close', function(){
5650 $('#genericLightbox').hide();
5651    $('.modal-backdrop').remove();
5652     $('body').removeClass('modal-open');
5653});
5654!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define("underscore",r):(n=n||self,function(){var t=n._,e=n._=r();e.noConflict=function(){return n._=t,e}}())}(this,(function(){
vendor: 4,863 bytes, lines 5655-5657
5655//     (c) 2009-2020 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
5656//     Underscore may be freely distributed under the MIT license.
5657var n="1.12.0",r="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},t=Array.prototype,e=Object.prototype,u="undefined"!=typeof Symbol?Symbol.prototype:null,o=t.push,i=t.slice,a=e.toString,f=e.hasOwnProperty,c="undefined"!=typeof ArrayBuffer,l="undefined"!=typeof DataView,s=Array.isArray,p=Object.keys,v=Object.create,h=c&&ArrayBuffer.isView,y=isNaN,g=isFinite,d=!{toString:null}.propertyIsEnumerable("toString"),b=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],m=Math.pow(2,53)-1;function j(n,r){return r=null==r?n.length-1:+r,function(){for(var t=Math.max(arguments.length-r,0),e=Array(t),u=0;u<t;u++)e[u]=arguments[u+r];switch(r){case 0:return n.call(this,e);case 1:return n.call(this,arguments[0],e);case 2:return n.call(this,arguments[0],arguments[1],e)}var o=Array(r+1);for(u=0;u<r;u++)o[u]=arguments[u];return o[r]=e,n.apply(this,o)}}function _(n){var r=typeof n;return"function"===r||"object"===r&&!!n}function w(n){return void 0===n}function A(n){return!0===n||!1===n||"[object Boolean]"===a.call(n)}function x(n){var r="[object "+n+"]";return function(n){return a.call(n)===r}}var S=x("String"),O=x("Number"),M=x("Date"),E=x("RegExp"),B=x("Error"),N=x("Symbol"),I=x("ArrayBuffer"),k=x("Function"),T=r.document&&r.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof T&&(k=function(n){return"function"==typeof n||!1});var D=k,R=x("Object"),F=l&&R(new DataView(new ArrayBuffer(8))),V="undefined"!=typeof Map&&R(new Map),P=x("DataView");var q=F?function(n){return null!=n&&D(n.getInt8)&&I(n.buffer)}:P,U=s||x("Array");function W(n,r){return null!=n&&f.call(n,r)}var z=x("Arguments");!function(){z(arguments)||(z=function(n){return W(n,"callee")})}();var L=z;function C(n){return O(n)&&y(n)}function K(n){return function(){return n}}function J(n){return function(r){var t=n(r);return"number"==typeof t&&t>=0&&t<=m}}function $(n){return function(r){return null==r?void 0:r[n]}}var G=$("byteLength"),H=J(G),Q=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var X=c?function(n){return h?h(n)&&!q(n):H(n)&&Q.test(a.call(n))}:K(!1),Y=$("length");function Z(n,r){r=function(n){for(var r={},t=n.length,e=0;e<t;++e)r[n[e]]=!0;return{contains:function(n){return r[n]},push:function(t){return r[t]=!0,n.push(t)}}}(r);var t=b.length,u=n.constructor,o=D(u)&&u.prototype||e,i="constructor";for(W(n,i)&&!r.contains(i)&&r.push(i);t--;)(i=b[t])in n&&n[i]!==o[i]&&!r.contains(i)&&r.push(i)}function nn(n){if(!_(n))return[];if(p)return p(n);var r=[];for(var t in n)W(n,t)&&r.push(t);return d&&Z(n,r),r}function rn(n,r){var t=nn(r),e=t.length;if(null==n)return!e;for(var u=Object(n),o=0;o<e;o++){var i=t[o];if(r[i]!==u[i]||!(i in u))return!1}return!0}function tn(n){return n instanceof tn?n:this instanceof tn?void(this._wrapped=n):new tn(n)}function en(n){return new Uint8Array(n.buffer||n,n.byteOffset||0,G(n))}tn.VERSION=n,tn.prototype.value=function(){return this._wrapped},tn.prototype.valueOf=tn.prototype.toJSON=tn.prototype.value,tn.prototype.toString=function(){return String(this._wrapped)};var un="[object DataView]";function on(n,r,t,e){if(n===r)return 0!==n||1/n==1/r;if(null==n||null==r)return!1;if(n!=n)return r!=r;var o=typeof n;return("function"===o||"object"===o||"object"==typeof r)&&function n(r,t,e,o){r instanceof tn&&(r=r._wrapped);t instanceof tn&&(t=t._wrapped);var i=a.call(r);if(i!==a.call(t))return!1;if(F&&"[object Object]"==i&&q(r)){if(!q(t))return!1;i=un}switch(i){case"[object RegExp]":case"[object String]":return""+r==""+t;case"[object Number]":return+r!=+r?+t!=+t:0==+r?1/+r==1/t:+r==+t;case"[object Date]":case"[object Boolean]":return+r==+t;case"[object Symbol]":return u.valueOf.call(r)===u.valueOf.call(t);case"[object ArrayBuffer]":case un:return n(en(r),en(t),e,o)}var f="[object Array]"===i;if(!f&&X(r)){if(G(r)!==G(t))return!1;if(r.buffer===t.buffer&&r.byteOffset===t.byteOffset)return!0;f=!0}if(!f){if("object"!=typeof r||"object"!=typeof t)return!1;var c=r.constructor,l=t.constructor;if(c!==l&&!(D(c)&&c instanceof c&&D(l)&&l instanceof l)&&"constructor"in r&&"constructor"in t)return!1}o=o||[];var s=(e=e||[]).length;for(;s--;)if(e[s]===r)return o[s]===t;if(e.push(r),o.push(t),f){if((s=r.length)!==t.length)return!1;for(;s--;)if(!on(r[s],t[s],e,o))return!1}else{var p,v=nn(r);if(s=v.length,nn(t).length!==s)return!1;for(;s--;)if(p=v[s],!W(t,p)||!on(r[p],t[p],e,o))return!1}return e.pop(),o.pop(),!0}(n,r,t,e)}function an(n){if(!_(n))return[];var r=[];for(var t in n)r.push(t);return d&&Z(n,r),r}function fn(n){var r=Y(n);return function(t){if(null==t)return!1;var e=an(t);
vendor: 5,278 bytes, line 5657
5657if(Y(e))return!1;for(var u=0;u<r;u++)if(!D(t[n[u]]))return!1;return n!==hn||!D(t[cn])}}var cn="forEach",ln="has",sn=["clear","delete"],pn=["get",ln,"set"],vn=sn.concat(cn,pn),hn=sn.concat(pn),yn=["add"].concat(sn,cn,ln),gn=V?fn(vn):x("Map"),dn=V?fn(hn):x("WeakMap"),bn=V?fn(yn):x("Set"),mn=x("WeakSet");function jn(n){for(var r=nn(n),t=r.length,e=Array(t),u=0;u<t;u++)e[u]=n[r[u]];return e}function _n(n){for(var r={},t=nn(n),e=0,u=t.length;e<u;e++)r[n[t[e]]]=t[e];return r}function wn(n){var r=[];for(var t in n)D(n[t])&&r.push(t);return r.sort()}function An(n,r){return function(t){var e=arguments.length;if(r&&(t=Object(t)),e<2||null==t)return t;for(var u=1;u<e;u++)for(var o=arguments[u],i=n(o),a=i.length,f=0;f<a;f++){var c=i[f];r&&void 0!==t[c]||(t[c]=o[c])}return t}}var xn=An(an),Sn=An(nn),On=An(an,!0);function Mn(n){if(!_(n))return{};if(v)return v(n);var r=function(){};r.prototype=n;var t=new r;return r.prototype=null,t}function En(n){return _(n)?U(n)?n.slice():xn({},n):n}function Bn(n){return U(n)?n:[n]}function Nn(n){return tn.toPath(n)}function In(n,r){for(var t=r.length,e=0;e<t;e++){if(null==n)return;n=n[r[e]]}return t?n:void 0}function kn(n,r,t){var e=In(n,Nn(r));return w(e)?t:e}function Tn(n){return n}function Dn(n){return n=Sn({},n),function(r){return rn(r,n)}}function Rn(n){return n=Nn(n),function(r){return In(r,n)}}function Fn(n,r,t){if(void 0===r)return n;switch(null==t?3:t){case 1:return function(t){return n.call(r,t)};case 3:return function(t,e,u){return n.call(r,t,e,u)};case 4:return function(t,e,u,o){return n.call(r,t,e,u,o)}}return function(){return n.apply(r,arguments)}}function Vn(n,r,t){return null==n?Tn:D(n)?Fn(n,r,t):_(n)&&!U(n)?Dn(n):Rn(n)}function Pn(n,r){return Vn(n,r,1/0)}function qn(n,r,t){return tn.iteratee!==Pn?tn.iteratee(n,r):Vn(n,r,t)}function Un(){}function Wn(n,r){return null==r&&(r=n,n=0),n+Math.floor(Math.random()*(r-n+1))}tn.toPath=Bn,tn.iteratee=Pn;var zn=Date.now||function(){return(new Date).getTime()};function Ln(n){var r=function(r){return n[r]},t="(?:"+nn(n).join("|")+")",e=RegExp(t),u=RegExp(t,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,r):n}}var Cn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},Kn=Ln(Cn),Jn=Ln(_n(Cn)),$n=tn.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Gn=/(.)^/,Hn={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Qn=/\\|'|\r|\n|\u2028|\u2029/g;function Xn(n){return"\\"+Hn[n]}var Yn=0;function Zn(n,r,t,e,u){if(!(e instanceof r))return n.apply(t,u);var o=Mn(n.prototype),i=n.apply(o,u);return _(i)?i:o}var nr=j((function(n,r){var t=nr.placeholder,e=function(){for(var u=0,o=r.length,i=Array(o),a=0;a<o;a++)i[a]=r[a]===t?arguments[u++]:r[a];for(;u<arguments.length;)i.push(arguments[u++]);return Zn(n,e,this,this,i)};return e}));nr.placeholder=tn;var rr=j((function(n,r,t){if(!D(n))throw new TypeError("Bind must be called on a function");var e=j((function(u){return Zn(n,e,r,this,t.concat(u))}));return e})),tr=J(Y);function er(n,r,t,e){if(e=e||[],r||0===r){if(r<=0)return e.concat(n)}else r=1/0;for(var u=e.length,o=0,i=Y(n);o<i;o++){var a=n[o];if(tr(a)&&(U(a)||L(a)))if(r>1)er(a,r-1,t,e),u=e.length;else for(var f=0,c=a.length;f<c;)e[u++]=a[f++];else t||(e[u++]=a)}return e}var ur=j((function(n,r){var t=(r=er(r,!1,!1)).length;if(t<1)throw new Error("bindAll must be passed function names");for(;t--;){var e=r[t];n[e]=rr(n[e],n)}return n}));var or=j((function(n,r,t){return setTimeout((function(){return n.apply(null,t)}),r)})),ir=nr(or,tn,1);function ar(n){return function(){return!n.apply(this,arguments)}}function fr(n,r){var t;return function(){return--n>0&&(t=r.apply(this,arguments)),n<=1&&(r=null),t}}var cr=nr(fr,2);function lr(n,r,t){r=qn(r,t);for(var e,u=nn(n),o=0,i=u.length;o<i;o++)if(r(n[e=u[o]],e,n))return e}function sr(n){return function(r,t,e){t=qn(t,e);for(var u=Y(r),o=n>0?0:u-1;o>=0&&o<u;o+=n)if(t(r[o],o,r))return o;return-1}}var pr=sr(1),vr=sr(-1);function hr(n,r,t,e){for(var u=(t=qn(t,e,1))(r),o=0,i=Y(n);o<i;){var a=Math.floor((o+i)/2);t(n[a])<u?o=a+1:i=a}return o}function yr(n,r,t){return function(e,u,o){var a=0,f=Y(e);if("number"==typeof o)n>0?a=o>=0?o:Math.max(o+f,a):f=o>=0?Math.min(o+1,f):o+f+1;else if(t&&o&&f)return e[o=t(e,u)]===u?o:-1;if(u!=u)return(o=r(i.call(e,a,f),C))>=0?o+a:-1;for(o=n>0?a:f-1;o>=0&&o<f;o+=n)if(e[o]===u)return o;return-1}}var gr=yr(1,pr,hr),dr=yr(-1,vr);function br(n,r,t){var e=(tr(n)?pr:lr)(n,r,t);if(void 0!==e&&-1!==e)return n[e]}function mr(n,r,t){var e,u;if(r=Fn(r,t),tr(n))for(e=0,u=n.length;e<u;e++)r(n[e],e,n);else{var o=nn(n);for(e=0,u=o.length;e<u;e++)r(n[o[e]],o[e],n)}return n}function jr(n,r,t){r=qn(r,t);for(var e=!tr(n)&&nn(n),u=(e||n).length,o=Array(u),i=0;i<u;i++){var a=e?e[i]:i;o[i]=r(n[a],a,n)}return o}function _r(n){var r=function(r,t,e,u){var o=!tr(r)&&nn(r),i=(o||r).length,a=n>0?0:i-1;for(u||(e=r[o?o[a]:a],a+=n);a>=0&&a<i;a+=n){var f=o?o[a]:a;e=t(e,r[f],f,r)}return e};return function(n,t,e,u){var o=arguments.length>=3;return r(n,Fn(t,u,4),e,o)}}var wr=_r(1),Ar=_r(-1);function xr(n,r,t){var e=[];return r=qn(r,t),mr(n,(function(n,t,u){r(n,t,u)&&e.push(n)})),e}function Sr(n,r,t){r=qn(r,t);for(var e=!tr(n)&&nn(n),u=(e||n).length,o=0;o<u;o++){var i=e?e[o]:o;
vendor: 6,727 bytes, line 5657
5657if(!r(n[i],i,n))return!1}return!0}function Or(n,r,t){r=qn(r,t);for(var e=!tr(n)&&nn(n),u=(e||n).length,o=0;o<u;o++){var i=e?e[o]:o;if(r(n[i],i,n))return!0}return!1}function Mr(n,r,t,e){return tr(n)||(n=jn(n)),("number"!=typeof t||e)&&(t=0),gr(n,r,t)>=0}var Er=j((function(n,r,t){var e,u;return D(r)?u=r:(r=Nn(r),e=r.slice(0,-1),r=r[r.length-1]),jr(n,(function(n){var o=u;if(!o){if(e&&e.length&&(n=In(n,e)),null==n)return;o=n[r]}return null==o?o:o.apply(n,t)}))}));function Br(n,r){return jr(n,Rn(r))}function Nr(n,r,t){var e,u,o=-1/0,i=-1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=tr(n)?n:jn(n)).length;a<f;a++)null!=(e=n[a])&&e>o&&(o=e);else r=qn(r,t),mr(n,(function(n,t,e){((u=r(n,t,e))>i||u===-1/0&&o===-1/0)&&(o=n,i=u)}));return o}function Ir(n,r,t){if(null==r||t)return tr(n)||(n=jn(n)),n[Wn(n.length-1)];var e=tr(n)?En(n):jn(n),u=Y(e);r=Math.max(Math.min(r,u),0);for(var o=u-1,i=0;i<r;i++){var a=Wn(i,o),f=e[i];e[i]=e[a],e[a]=f}return e.slice(0,r)}function kr(n,r){return function(t,e,u){var o=r?[[],[]]:{};return e=qn(e,u),mr(t,(function(r,u){var i=e(r,u,t);n(o,r,i)})),o}}var Tr=kr((function(n,r,t){W(n,t)?n[t].push(r):n[t]=[r]})),Dr=kr((function(n,r,t){n[t]=r})),Rr=kr((function(n,r,t){W(n,t)?n[t]++:n[t]=1})),Fr=kr((function(n,r,t){n[t?0:1].push(r)}),!0),Vr=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function Pr(n,r,t){return r in t}var qr=j((function(n,r){var t={},e=r[0];if(null==n)return t;D(e)?(r.length>1&&(e=Fn(e,r[1])),r=an(n)):(e=Pr,r=er(r,!1,!1),n=Object(n));for(var u=0,o=r.length;u<o;u++){var i=r[u],a=n[i];e(a,i,n)&&(t[i]=a)}return t})),Ur=j((function(n,r){var t,e=r[0];return D(e)?(e=ar(e),r.length>1&&(t=r[1])):(r=jr(er(r,!1,!1),String),e=function(n,t){return!Mr(r,t)}),qr(n,e,t)}));function Wr(n,r,t){return i.call(n,0,Math.max(0,n.length-(null==r||t?1:r)))}function zr(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[0]:Wr(n,n.length-r)}function Lr(n,r,t){return i.call(n,null==r||t?1:r)}var Cr=j((function(n,r){return r=er(r,!0,!0),xr(n,(function(n){return!Mr(r,n)}))})),Kr=j((function(n,r){return Cr(n,r)}));function Jr(n,r,t,e){A(r)||(e=t,t=r,r=!1),null!=t&&(t=qn(t,e));for(var u=[],o=[],i=0,a=Y(n);i<a;i++){var f=n[i],c=t?t(f,i,n):f;r&&!t?(i&&o===c||u.push(f),o=c):t?Mr(o,c)||(o.push(c),u.push(f)):Mr(u,f)||u.push(f)}return u}var $r=j((function(n){return Jr(er(n,!0,!0))}));function Gr(n){for(var r=n&&Nr(n,Y).length||0,t=Array(r),e=0;e<r;e++)t[e]=Br(n,e);return t}var Hr=j(Gr);function Qr(n,r){return n._chain?tn(r).chain():r}function Xr(n){return mr(wn(n),(function(r){var t=tn[r]=n[r];tn.prototype[r]=function(){var n=[this._wrapped];return o.apply(n,arguments),Qr(this,t.apply(tn,n))}})),tn}mr(["pop","push","reverse","shift","sort","splice","unshift"],(function(n){var r=t[n];tn.prototype[n]=function(){var t=this._wrapped;return null!=t&&(r.apply(t,arguments),"shift"!==n&&"splice"!==n||0!==t.length||delete t[0]),Qr(this,t)}})),mr(["concat","join","slice"],(function(n){var r=t[n];tn.prototype[n]=function(){var n=this._wrapped;return null!=n&&(n=r.apply(n,arguments)),Qr(this,n)}}));var Yr=Xr({__proto__:null,VERSION:n,restArguments:j,isObject:_,isNull:function(n){return null===n},isUndefined:w,isBoolean:A,isElement:function(n){return!(!n||1!==n.nodeType)},isString:S,isNumber:O,isDate:M,isRegExp:E,isError:B,isSymbol:N,isArrayBuffer:I,isDataView:q,isArray:U,isFunction:D,isArguments:L,isFinite:function(n){return!N(n)&&g(n)&&!isNaN(parseFloat(n))},isNaN:C,isTypedArray:X,isEmpty:function(n){if(null==n)return!0;var r=Y(n);return"number"==typeof r&&(U(n)||S(n)||L(n))?0===r:0===Y(nn(n))},isMatch:rn,isEqual:function(n,r){return on(n,r)},isMap:gn,isWeakMap:dn,isSet:bn,isWeakSet:mn,keys:nn,allKeys:an,values:jn,pairs:function(n){for(var r=nn(n),t=r.length,e=Array(t),u=0;u<t;u++)e[u]=[r[u],n[r[u]]];return e},invert:_n,functions:wn,methods:wn,extend:xn,extendOwn:Sn,assign:Sn,defaults:On,create:function(n,r){var t=Mn(n);return r&&Sn(t,r),t},clone:En,tap:function(n,r){return r(n),n},get:kn,has:function(n,r){for(var t=(r=Nn(r)).length,e=0;e<t;e++){var u=r[e];if(!W(n,u))return!1;n=n[u]}return!!t},mapObject:function(n,r,t){r=qn(r,t);for(var e=nn(n),u=e.length,o={},i=0;i<u;i++){var a=e[i];o[a]=r(n[a],a,n)}return o},identity:Tn,constant:K,noop:Un,toPath:Bn,property:Rn,propertyOf:function(n){return null==n?Un:function(r){return kn(n,r)}},matcher:Dn,matches:Dn,times:function(n,r,t){var e=Array(Math.max(0,n));r=Fn(r,t,1);for(var u=0;u<n;u++)e[u]=r(u);return e},random:Wn,now:zn,escape:Kn,unescape:Jn,templateSettings:$n,template:function(n,r,t){!r&&t&&(r=t),r=On({},r,tn.templateSettings);var e,u=RegExp([(r.escape||Gn).source,(r.interpolate||Gn).source,(r.evaluate||Gn).source].join("|")+"|$","g"),o=0,i="__p+='";n.replace(u,(function(r,t,e,u,a){return i+=n.slice(o,a).replace(Qn,Xn),o=a+r.length,t?i+="'+\n((__t=("+t+"))==null?'':_.escape(__t))+\n'":e?i+="'+\n((__t=("+e+"))==null?'':__t)+\n'":u&&(i+="';\n"+u+"\n__p+='"),r})),i+="';\n",r.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{e=new Function(r.variable||"obj","_",i)}catch(n){throw n.source=i,n}var a=function(n){return e.call(this,n,tn)},f=r.variable||"obj";return a.source="function("+f+"){\n"+i+"}",a},result:function(n,r,t){var e=(r=Nn(r)).length;if(!e)return D(t)?t.call(n):t;for(var u=0;u<e;u++){var o=null==n?void 0:n[r[u]];void 0===o&&(o=t,u=e),n=D(o)?o.call(n):o}return n},uniqueId:function(n){var r=++Yn+"";return n?n+r:r},chain:function(n){var r=tn(n);return r._chain=!0,r},iteratee:Pn,partial:nr,bind:rr,bindAll:ur,memoize:function(n,r){var t=function(e){var u=t.cache,o=""+(r?r.apply(this,arguments):e);return W(u,o)||(u[o]=n.apply(this,arguments)),u[o]};return t.cache={},t},delay:or,defer:ir,throttle:function(n,r,t){var e,u,o,i,a=0;t||(t={});var f=function(){a=!1===t.leading?0:zn(),e=null,i=n.apply(u,o),e||(u=o=null)},c=function(){var c=zn();a||!1!==t.leading||(a=c);var l=r-(c-a);return u=this,o=arguments,l<=0||l>r?(e&&(clearTimeout(e),e=null),a=c,i=n.apply(u,o),e||(u=o=null)):e||!1===t.trailing||(e=setTimeout(f,l)),i};return c.cancel=function(){clearTimeout(e),a=0,e=u=o=null},c},debounce:function(n,r,t){var e,u,o=function(r,t){e=null,t&&(u=n.apply(r,t))},i=j((function(i){if(e&&clearTimeout(e),t){var a=!e;e=setTimeout(o,r),a&&(u=n.apply(this,i))}else e=or(o,r,this,i);return u}));return i.cancel=function(){clearTimeout(e),e=null},i},wrap:function(n,r){return nr(r,n)},negate:ar,compose:function(){var n=arguments,r=n.length-1;return function(){for(var t=r,e=n[r].apply(this,arguments);t--;)e=n[t].call(this,e);return e}},after:function(n,r){return function(){if(--n<1)return r.apply(this,arguments)}}
5657,before:fr,once:cr,findKey:lr,findIndex:pr,findLastIndex:vr,sortedIndex:hr,indexOf:gr,lastIndexOf:dr,find:br,detect:br,findWhere:function(n,r){return br(n,Dn(r))},each:mr,forEach:mr,map:jr,collect:jr,reduce:wr,foldl:wr,inject:wr,reduceRight:Ar,foldr:Ar,filter:xr,select:xr,reject:function(n,r,t){return xr(n,ar(qn(r)),t)},every:Sr,all:Sr,some:Or,any:Or,contains:Mr,includes:Mr,include:Mr,invoke:Er,pluck:Br,where:function(n,r){return xr(n,Dn(r))},max:Nr,min:function(n,r,t){var e,u,o=1/0,i=1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=tr(n)?n:jn(n)).length;a<f;a++)null!=(e=n[a])&&e<o&&(o=e);else r=qn(r,t),mr(n,(function(n,t,e){((u=r(n,t,e))<i||u===1/0&&o===1/0)&&(o=n,i=u)}));return o},shuffle:function(n){return Ir(n,1/0)},sample:Ir,sortBy:function(n,r,t){var e=0;return r=qn(r,t),Br(jr(n,(function(n,t,u){return{value:n,index:e++,criteria:r(n,t,u)}})).sort((function(n,r){var t=n.criteria,e=r.criteria;if(t!==e){if(t>e||void 0===t)return 1;if(t<e||void 0===e)return-1}return n.index-r.index})),"value")},groupBy:Tr,indexBy:Dr,countBy:Rr,partition:Fr,toArray:function(n){return n?U(n)?i.call(n):S(n)?n.match(Vr):tr(n)?jr(n,Tn):jn(n):[]},size:function(n){return null==n?0:tr(n)?n.length:nn(n).length},pick:qr,omit:Ur,first:zr,head:zr,take:zr,initial:Wr,last:function(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[n.length-1]:Lr(n,Math.max(0,n.length-r))},rest:Lr,tail:Lr,drop:Lr,compact:function(n){return xr(n,Boolean)},flatten:function(n,r){return er(n,r,!1)},without:Kr,uniq:Jr,unique:Jr,union:$r,intersection:function(n){for(var r=[],t=arguments.length,e=0,u=Y(n);e<u;e++){var o=n[e];if(!Mr(r,o)){var i;for(i=1;i<t&&Mr(arguments[i],o);i++);i===t&&r.push(o)}}return r},difference:Cr,unzip:Gr,transpose:Gr,zip:Hr,object:function(n,r){for(var t={},e=0,u=Y(n);e<u;e++)r?t[n[e]]=r[e]:t[n[e][0]]=n[e][1];return t},range:function(n,r,t){null==r&&(r=n||0,n=0),t||(t=r<n?-1:1);for(var e=Math.max(Math.ceil((r-n)/t),0),u=Array(e),o=0;o<e;o++,n+=t)u[o]=n;return u},chunk:function(n,r){if(null==r||r<1)return[];for(var t=[],e=0,u=n.length;e<u;)t.push(i.call(n,e,e+=r));return t},mixin:Xr,default:tn});return Yr._=Yr,Yr}));
5658var $medicationReminderEl;
5659var medicationReminderCtxObj;
5660var $formElements;
5661BIOG.genericformMedicationReminder = {
5662    _init: function($medicationReminderEl) {
5663    	medicationReminderCtxObj = this;
5664    	medicationReminderCtxObj._bindEvents($medicationReminderEl);
5665    	medicationReminderCtxObj._fetchMedicationData($medicationReminderEl);  
5666    	//DRUN-1728 code change
5667    	if ($('.edit-optout-reminder .edit-reminder-submit').length > 0) {
5668		    if (sessionStorage && sessionStorage.getItem("entityId")) {
5669		        let entityIdInputStr = '<input type="hidden" name="entityId" value="' + sessionStorage.getItem("entityId") + '">';
5670		        $medicationReminderEl.append(entityIdInputStr);
5671		    }
5672		}
5673    },
5674    _bindEvents: function($medicationReminderEl) {
5675    	$medicationReminderEl.find('.edit-reminder-submit').on('click',function(ev){
5676            medicationReminderCtxObj._medicationReminderSubmit(ev,false,$medicationReminderEl);
5677        });
5678    	$medicationReminderEl.find('.optout-reminder-submit').on('click',function(ev){
5679            medicationReminderCtxObj._optOutReminderSubmit(ev,$medicationReminderEl);
5680        });
5681    	
5682    },
5683    /** 
5684	  * Function handler for Sign In form submit button.
5685	  * 
5686	  */
5687    _medicationReminderSubmit: function(ev,OptFlag,$medicationReminderEl){
5688        ev.preventDefault();
5689        var formFlag = BIOG.options.validateFormFields($medicationReminderEl),
5690        $genericFormErrorElem =  $medicationReminderEl.prev('.generic-form-wrapper .alert-danger');       
5691        $genericFormErrorElem.addClass('hidden');
5692		if(formFlag) {	
5693		var formURL = $medicationReminderEl.attr('action'),
5694			formType = $medicationReminderEl.attr('method'),
5695			form_data = $medicationReminderEl.serialize();
5696			BIOG.UTILS._showLoader($medicationReminderEl);
5697			if(OptFlag === true){
5698				form_data = form_data +'&unSubscribe=+unsubscribe'; 
5699				BIOG.options.ajaxCallHandler($medicationReminderEl,formType,formURL,form_data,true, false, medicationReminderCtxObj.callbackOptOutSucess);
5700			}else{
5701				BIOG.options.ajaxCallHandler($medicationReminderEl,formType,formURL,form_data,true, false, medicationReminderCtxObj.callbackSucess);
5702			}
5703		}
5704	},
5705	callbackSucess:function(response,$medicationReminderEl){
5706		var redirectUrl =  $medicationReminderEl.parent().find('.edit-reminder-success-modal').attr('href');
5707        if(redirectUrl != undefined){
5708        	$medicationReminderEl.find('.edit-reminder-success-modal').click();
5709        }
5710	},
5711	_optOutReminderSubmit:function(ev,$medicationReminderEl){ 
5712		ev.preventDefault();
5713    	var confirmationUrl =  $medicationReminderEl.parent().find('.optout-reminder-confirmation-modal').attr('href');    	  	
5714	        if(confirmationUrl != undefined){
5715	        	$medicationReminderEl.parent().find('.optout-reminder-confirmation-modal').click();	        	 	
5716	        }	        
5717	   		
5718    },
5719    _optOutBtnPlaceholder:function($medicationReminderEl){
5720    	if($('.placeholder').length >0){
5721		   	 var confirmationBtn = $medicationReminderEl.parent().find('.placeholder-confirmation-button').html();
5722		   	 $('.placeholder').each(function(){
5723			    	 if($(this).hasClass("optOut-success-button")){
5724			    		 $('.optOut-success-button').append(confirmationBtn);
5725			    	 }
5726		   	 });
5727		   	var $medicatioOptOutSuccessElem = $(".lightbox-modal").find('.optout-success-redirect');
5728		   	$medicatioOptOutSuccessElem.click(function(ev){
5729		   		ev.preventDefault();
5730	   			$('#genericLightbox').modal('hide'); 
5731	   			medicationReminderCtxObj._medicationReminderSubmit(ev,true,$medicationReminderEl);
5732	   				
5733	   		}); 
5734    	}
5735    },
5736  	callbackOptOutSucess:function(response,$medicationReminderEl){
5737		var redirectUrl =  $medicationReminderEl.parent().find('.optout-reminder-success-modal').attr('href');
5738        if(redirectUrl != undefined){
5739        	$medicationReminderEl.find('.optout-reminder-success-modal').click();
5740        }
5741	},
5742	_fetchMedicationData:function($medicationReminderEl){
5743		BIOG.UTILS._showLoader($medicationReminderEl);
5744		var FETCH_REMINDER_URL = $medicationReminderEl.attr('action');
5745		var product = $medicationReminderEl.find('input[name=product]').val();
5746		var form_data ='serviceTags='+BIOG.serviceTags.viewReminderService+'&product='+product;
5747        BIOG.options.ajaxCallHandler($medicationReminderEl,'POST',FETCH_REMINDER_URL,form_data,false, false, medicationReminderCtxObj.profileCallbackSucess);
5748	},
5749	profileCallbackSucess: function(response,$medicationReminderEl) {
5750		$medicationReminderEl.parent().find('.alert-danger').addClass("hidden"); 
5751		if (response !== undefined && response !== '' && response.reminderExists) {
5752			$medicationReminderEl.show();
5753	    	$medicationReminderEl.parent().find('.no-reminder-opted').hide();
5754	    	BIOG.options.formElemresponseMatch($medicationReminderEl,response);
5755	    }
5756	    else{
5757	    	$medicationReminderEl.parent().find('.publish-mode').hide();
5758	    	$medicationReminderEl.parent().find('.no-reminder-opted').show();
5759	    }
5760	    BIOG.UTILS._hideLoader();
5761	}    
5762}
5763$(document).ready(function() {
5764	if ($('.genericform-medication-reminder').length) {
5765		$('.genericform-medication-reminder').each(function() {
5766			BIOG.genericformMedicationReminder._init($(this));
5767			BIOG.options.conditionalFunction($(this));
5768		});
5769	}
5770});
5771var dataPersonolizationCtxObj;
5772var pageURL;
5773var pageListJson = [];
5774var pageHistoryObj = {};
5775BIOG.dataPersonolization = {
5776    _init: function() {
5777        dataPersonolizationCtxObj = this;
5778        pageURL = dataPersonolizationCtxObj._getPageURL();
5779        if ((dataPersonolizationCtxObj._isTrackingEnabled()) && (dataPersonolizationCtxObj._isArticleDetailPage() || dataPersonolizationCtxObj._isPageContainsVideo() || $('.media-gallery-modal').length >0)) {
5780            dataPersonolizationCtxObj._createLocalStorage();
5781        }        
5782    },
5783    _getPageURL: function() {
5784        var domainName = window.location.origin;
5785        var pathName;
5786        if(personolizationModalPageUrl !== undefined){
5787        	pathName = personolizationModalPageUrl;
5788        }else{
5789			pathName = window.location.pathname;
5790        }
5791        return domainName + pathName;
5792    },
5793    _isTrackingEnabled: function() {
5794    	if(typeof isTrackingEnabled !== "undefined" && isTrackingEnabled === 'true'){
5795	        return true;
5796    	}
5797    	return false;
5798    },
5799    _isArticleDetailPage: function() {
5800        var articleDetailCheck = $(document).find('meta[name="template"]').attr("content") === "article-detail-template";
5801        return articleDetailCheck ? true : false;
5802    },
5803    _isPageContainsVideo: function() {
5804        if (personolizationModalPageUrl !== undefined) {
5805            if ($('.modal-video-exists').length > 0) {
5806                return true;
5807            }
5808            return false;
5809        } else {
5810            if ($('.cmp-video').length > 0) {
5811                return true;
5812            }
5813            return false;
5814        }
5815    },
5816    _createLocalStorage: function() {
5817    	dataPersonolizationCtxObj._initiateOrResetStorage();
5818        var processedPageList = dataPersonolizationCtxObj._process();
5819        dataPersonolizationCtxObj._updateLocalStorage(processedPageList);
5820    },
5821    _initiateOrResetStorage:function(){
5822    	if (localStorage.getItem('pageHistory') != undefined) {
5823            pageHistoryObj = $.parseJSON(localStorage.getItem('pageHistory'));
5824            pageListJson = pageHistoryObj.pageList;
5825        } else {
5826            pageHistoryObj = {};
5827        }
5828    },
5829    _updateLocalStorage: function(processedPageList) {
5830        if (processedPageList !== undefined && processedPageList.length > 0) {
5831            pageHistoryObj.pageList = processedPageList;
5832        }
5833        pageHistoryObj.expiryDate = dataPersonolizationCtxObj._expirydate();
5834        localStorage.setItem('pageHistory', JSON.stringify(pageHistoryObj));
5835    },
5836    _getSysDate: function() {
5837        var today = new Date();
5838        var dd = today.getDate();
5839        var mm = today.getMonth() + 1; //January is 0!
5840        var yyyy = today.getFullYear();
5841        if (dd < 10) {
5842            dd = '0' + dd;
5843        }
5844        if (mm < 10) {
5845            mm = '0' + mm;
5846        }
5847        today = mm + '/' + dd + '/' + yyyy;
5848        return today;
5849    },
5850    _createPageJSON: function() {
5851        var pageJSON = {};
5852        pageJSON.pageURL = dataPersonolizationCtxObj._getPageURL();
5853        pageJSON.lastVisited = dataPersonolizationCtxObj._getSysDate();
5854        pageJSON.containsVideo = dataPersonolizationCtxObj._isPageContainsVideo();
5855        if (pageJSON.containsVideo === true) {
5856            pageJSON.videoDetails = dataPersonolizationCtxObj._createVideoJSON();
5857        }
5858        return pageJSON;
5859    },
5860    _createVideoJSON: function() {
5861        var videoDetails = [];
5862        var videoElem;
5863        if (personolizationModalPageUrl !== undefined) {
5864            videoElem = $('.modal-video-exists').find('.cmp-video');
5865        } else {
5866            videoElem = $('.cmp-video');
5867        }
5868        videoElem.each(function() {
5869            var videoJSON = {};
5870            videoJSON.videoURL = $(this).data('video-url');
5871            videoJSON.videoPlayedPercentage = 0;
5872            videoJSON.videoPlayedTime = 0;
5873            videoDetails.push(videoJSON);
5874        });
5875        return videoDetails;
5876    },
5877    _createOrUpdatePage: function(optionalvideoURL, optionalvideoPercent, optionalVideoPlayedTime) {
5878    	dataPersonolizationCtxObj._initiateOrResetStorage();
5879        var isUpdate = false;
5880        var isExpired = false;
5881        var updatedElem, updatedElemIndex;
5882        var cookieExpiryInDate = new Date(pageHistoryObj.expiryDate);
5883        for (var i in pageListJson) {
5884            
5885            if (pageListJson[i].pageURL === dataPersonolizationCtxObj._getPageURL()) {
5886				var pageLastVisitedInDate = new Date(pageListJson[i].lastVisited);
5887                isUpdate = true;
5888                isExpired = dataPersonolizationCtxObj._ispageExpired(pageLastVisitedInDate, cookieExpiryInDate);
5889                updatedElem = pageListJson[i];
5890                updatedElem.lastVisited = dataPersonolizationCtxObj._getSysDate();
5891                updatedElemIndex = i;
5892                break;
5893            }
5894        }
5895        if (isUpdate && optionalvideoURL != null) {
5896            updatedElem = dataPersonolizationCtxObj._createOrUpdatevideo(updatedElem, optionalvideoURL, optionalvideoPercent, optionalVideoPlayedTime);
5897            if (isExpired === true) {
5898                updatedElem = dataPersonolizationCtxObj._createOrUpdatevideo(updatedElem, optionalvideoURL, 0, 0);
5899            }
5900        }
5901        if (isUpdate === true) {
5902            pageListJson[updatedElemIndex] = updatedElem;
5903        }
5904        if (isUpdate === false) {
5905            pageListJson.push(dataPersonolizationCtxObj._createPageJSON());
5906        }
5907        return pageListJson;
5908    },
5909    _createOrUpdatevideo: function(updatedElem, optionalvideoURL, optionalvideoPercent, optionalVideoPlayedTime) {
5910        var updateVideoFlag = false;
5911        var videoDetailArray = updatedElem.videoDetails;
5912        var updatedVideoElem, updatedVideoElemIndex;
5913        for (var i in videoDetailArray) {
5914            if (videoDetailArray[i].videoURL === optionalvideoURL) {
5915                updatedVideoElem = videoDetailArray[i];
5916                updatedVideoElem.videoPlayedPercentage = optionalvideoPercent;
5917                updatedVideoElem.videoPlayedTime = optionalVideoPlayedTime;
5918                updatedVideoElemIndex = i;
5919                updateVideoFlag = true;
5920                break;
5921            }
5922        }
5923        if (updateVideoFlag) {
5924            videoDetailArray[updatedVideoElemIndex] = updatedVideoElem;
5925        } else {
5926            var vidJSON = {};
5927            vidJSON.videoURL = optionalvideoURL;
5928            vidJSON.videoPlayedPercentage = optionalvideoPercent;
5929            vidJSON.videoPlayedTime = optionalVideoPlayedTime;
5930            videoDetailArray.push(vidJSON);
5931        }
5932        updatedElem.videoDetails = videoDetailArray;
5933        return updatedElem;
5934    },
5935    _process: function() {
5936        return dataPersonolizationCtxObj._createOrUpdatePage();
5937    },
5938    _expirydate: function() {
5939        if (cookieExpiryInDays !== undefined && cookieExpiryInDays !== '') {
5940            var newDate = new Date();
5941            newDate.setDate(newDate.getDate() + parseInt(cookieExpiryInDays));
5942            var month = "0" + (newDate.getMonth() + 1);
5943            var date = "0" + newDate.getDate();
5944            month = month.slice(-2);
5945            date = date.slice(-2);
5946            var expiryDate = month + "/" + date + "/" + newDate.getFullYear();
5947            return expiryDate;
5948        }
5949    },
5950    _ispageExpired: function(pageLastVisitedInDate, cookieExpiryInDate) {
5951        if (pageLastVisitedInDate >= cookieExpiryInDate) {
5952            return true;
5953        }
5954        return false;
5955    }
5956}
5957$(document).ready(function() {
5958    BIOG.dataPersonolization._init();
5959});
5960var currentVideoItem;
5961var localStoragePageHistoryValue;
5962var currentPageVideoList = [];
5963BIOG.personolizationVideoHandler = {
5964    _init: function() {
5965        if (BIOG.dataPersonolization._isTrackingEnabled()) {
5966            BIOG.personolizationVideoHandler._bindVideoPlayers();
5967        }
5968    },
5969    _bindVideoPlayers: function() {
5970        var isVideoExists = false;
5971        var videoPersonolizedElem = BIOG.personolizationVideoHandler._getpersonolizedElem();
5972        if(videoPersonolizedElem.length>0){
5973        	videoPersonolizedElem.each(function() {
5974	            var divElem = $(this).find('div')[0];
5975	            var currentVideoItem = $(divElem).attr('id');
5976	            var videoURL = $(this).data('video-url');
5977	            var videoPlayedObj;
5978	            if (!isVideoExists) {
5979	                currentPageVideoList = BIOG.personolizationVideoHandler._getCurrentPageVideoList();
5980	                isVideoExists = true;
5981	            }
5982	            jwplayer(currentVideoItem).on('play pause', function() {
5983	                BIOG.personolizationVideoHandler._getVideoDuration(jwplayer(currentVideoItem));
5984	                BIOG.personolizationVideoHandler._elemVideoPlayed(jwplayer(currentVideoItem));
5985	            });
5986	            videoPlayedObj = BIOG.personolizationVideoHandler._videoPlayedDetails(videoURL);
5987	            if (videoPlayedObj.videoPlayedTime !== undefined && videoPlayedObj.videoPlayedTime > 0 && videoPlayedObj.videoPlayedPercentage!== 100) {
5988	            	jwplayer(currentVideoItem).seek(videoPlayedObj.videoPlayedTime).pause();
5989	            }
5990        	});
5991        }
5992    },
5993    _getVideoDuration: function($player) {
5994        var getVideoCompletePercentage = 0;
5995        var getVideoDuration = parseInt($player.getDuration());
5996        var getVideoposition = parseInt($player.getPosition());
5997        if (getVideoDuration > getVideoposition) {
5998            getVideoCompletePercentage = parseInt(getVideoposition / getVideoDuration * 100);
5999        }
6000        return getVideoCompletePercentage;
6001    },
6002    _elemVideoPlayed: function($player) {
6003        if ($player.getState() == "playing") {
6004            BIOG.personolizationVideoHandler._updateVideoPlayedPercent($player);
6005        } else {
6006            if ($player.getState() == "pause") {
6007                BIOG.personolizationVideoHandler._updatePageVideo($player);
6008            }
6009        }
6010    },
6011    _updatePageVideo: function($player) {
6012        if ($player != undefined && $player.getPlaylist() != undefined && $player.getPlaylist().length > 0) {
6013            var playingFileURL = $player.getPlaylist()[0].file;
6014            var processedPageList = BIOG.dataPersonolization._createOrUpdatePage(playingFileURL, BIOG.personolizationVideoHandler._getVideoDuration($player), parseInt($player.getPosition()));
6015            BIOG.dataPersonolization._updateLocalStorage(processedPageList);
6016            $player.on('complete', function() {
6017                processedPageList = BIOG.dataPersonolization._createOrUpdatePage(playingFileURL, 100, parseInt($player.getDuration()));
6018                BIOG.dataPersonolization._updateLocalStorage(processedPageList);
6019            });
6020        } else {
6021            console.log('jwplayer is undefined');
6022        }
6023    },
6024    _updateVideoPlayedPercent: function($player) {
6025        if ($player.getState() == "playing") {
6026            BIOG.personolizationVideoHandler._updatePageVideo($player);
6027            setTimeout(function() {
6028                BIOG.personolizationVideoHandler._updateVideoPlayedPercent($player);
6029            }, 3000);
6030        }
6031    },
6032    _getCurrentPageVideoList: function() {
6033        var videoList = [];
6034        if (localStorage.getItem('pageHistory') !== undefined) {
6035            localStoragePageHistoryValue = $.parseJSON(localStorage.getItem('pageHistory'));
6036            if(localStoragePageHistoryValue !== null){
6037	            var pageList = localStoragePageHistoryValue.pageList;
6038	            for (var i in pageList) {
6039	                if ((pageList[i].pageURL == BIOG.dataPersonolization._getPageURL()) && (pageList[i].containsVideo === true)) {
6040	                    videoList = pageList[i].videoDetails;
6041	                    break;
6042	                }
6043	            }
6044            }
6045        }
6046        return videoList;
6047    },
6048    _videoPlayedDetails: function(videourl) {
6049        var getVideoDetails = {};
6050        for (var j in currentPageVideoList) {
6051            if (currentPageVideoList[j] !== undefined) {
6052                if (videourl == currentPageVideoList[j].videoURL) {
6053                    var videoPlayedTime = currentPageVideoList[j].videoPlayedTime;
6054                    var videoPlayedPercentage = currentPageVideoList[j].videoPlayedPercentage;
6055                    getVideoDetails['videoPlayedTime'] = videoPlayedTime;
6056                    getVideoDetails['videoPlayedPercentage'] = videoPlayedPercentage;
6057                    if (videoPlayedTime > 0) {
6058                    	getVideoDetails.videoPlayedTime = videoPlayedTime - 5;
6059                        if (getVideoDetails.videoPlayedPercentage == 100) {
6060                        	getVideoDetails.videoPlayedTime = videoPlayedTime;
6061                        }
6062                    }
6063                }
6064            }
6065        }
6066        return getVideoDetails;
6067    },
6068    _initOnLoad: function() {
6069        var videoPersonolizedElem = BIOG.personolizationVideoHandler._getpersonolizedElem();
6070        var currentVideoItem;
6071        videoPersonolizedElem.each(function() {
6072            var divElem = $(this).find('div')[0];
6073            currentVideoItem = $(divElem).attr('id');
6074        });
6075        if ((typeof jwplayer(currentVideoItem) === 'undefined') || (jwplayer(currentVideoItem).qoe().setupTime === null)) {
6076            setTimeout(BIOG.personolizationVideoHandler._initOnLoad, 100);
6077            return;
6078        }
6079        BIOG.personolizationVideoHandler._init();
6080    },
6081    _getpersonolizedElem:function(){
6082    	var videoElem ;
6083        if(personolizationModalPageUrl !== undefined){
6084        	videoElem = $('.modal-video-exists').find('.cmp-video');
6085        }else{
6086        	videoElem =  $('.cmp-video[data-personalization=true]');
6087        }
6088        return videoElem;
6089    }
6090}
6091$(document).ready(function() {
6092	if($('.cmp-video').length >0){
6093	    BIOG.personolizationVideoHandler._initOnLoad();
6094	 }
6095});
6096
6097var localStoragePageHistoryValue;
6098var pageList;
6099var videoPercent;
6100BIOG.personolizationHandler = {
6101    _init: function() {
6102        if (BIOG.dataPersonolization._isTrackingEnabled()) {
6103        	var $dataPersonolizationElem
6104            if($('.modal-video-exists').length >0){
6105            	$dataPersonolizationElem = $('.modal-video-exists').find('.cmp-video');
6106            }
6107            else{
6108                $dataPersonolizationElem  = $(document).find('[data-personalization]');
6109            }
6110            if (localStorage.getItem('pageHistory') != undefined) {
6111                localStoragePageHistoryValue = $.parseJSON(localStorage.getItem('pageHistory'));
6112                pageList = localStoragePageHistoryValue.pageList;
6113                if ($dataPersonolizationElem != undefined && $dataPersonolizationElem.length > 0) {
6114                    $dataPersonolizationElem.each(function($this) {
6115                        $this = $(this);
6116                        BIOG.personolizationHandler._addingPersonolizedClasses($this);
6117                        BIOG.personolizationHandler._addingProgressbar($this);
6118                    });
6119                    BIOG.personolizationHandler._unWatchedTilesShuffle($('.article-viewed'));
6120                }
6121            }
6122        }
6123    },
6124    _getVideoPercentMatchVideo: function($this, videoURL) {
6125        for (var i in pageList) {
6126            if (pageList[i] != undefined) {
6127                for (var j in pageList[i].videoDetails) {
6128                    if (pageList[i].pageURL == BIOG.dataPersonolization._getPageURL()) {
6129                        if (videoURL != undefined) {
6130                            var storedUrl = pageList[i].videoDetails[j].videoURL;
6131                            if (videoURL == storedUrl) {
6132                                var videoSeekPercent = pageList[i].videoDetails[j].videoPlayedPercentage;
6133                                if (videoSeekPercent > 0) {
6134                                    $this.addClass('article-viewed');
6135                                    return videoSeekPercent;
6136                                }
6137                                break;
6138                            }
6139                        }
6140                    }
6141                }
6142            }
6143        }
6144    },
6145    _getVideoPercentMatchURL: function($this) {
6146        var domainName = window.location.origin;
6147        var dataPageAttr = $this.find('.data-personalization-url').attr('href');
6148        var dataPageUrl = domainName + dataPageAttr;
6149        var cookieExpiryInDate = new Date(localStoragePageHistoryValue.expiryDate);
6150        for (var i in pageList) {
6151            if (pageList[i] != undefined) {
6152                var pageLastVisitedInDate = new Date(pageList[i].lastVisited);
6153                if (pageList[i].pageURL == dataPageUrl) {
6154                    var isExpired = BIOG.dataPersonolization._ispageExpired(pageLastVisitedInDate, cookieExpiryInDate);
6155                    if (!isExpired) {
6156                        $this.addClass('article-viewed');
6157                    }
6158                    for (var j in pageList[i].videoDetails) {
6159                        if (pageList[i].videoDetails[j] != undefined) {
6160                            var videoSeekPercent = pageList[i].videoDetails[j].videoPlayedPercentage;
6161                            return videoSeekPercent;                            
6162                        }
6163						break;
6164                    }
6165                }
6166            }
6167        }
6168    },
6169    _removeClassesOnPlay: function($player, $this) {
6170        $player.on('play', function() {
6171            if ($this.hasClass('article-viewed')) {
6172                $this.removeClass('article-video-played');
6173                $this.removeClass('article-video-completed');
6174                $this.removeClass('article-viewed');
6175                $this.find('.progress').hide();
6176            }
6177        });
6178    },
6179    _addingPersonolizedClasses: function($this) {
6180        if ($this.hasClass('cmp-video')) {
6181            var divElem = $this.find('div')[0];
6182            var currentVideoItem = $(divElem).attr('id');
6183			videoPercent = BIOG.personolizationHandler._getVideoPercentMatchVideo($this, $this.data('video-url'));
6184            BIOG.personolizationHandler._removeClassesOnPlay(jwplayer(currentVideoItem), $this);
6185        } else {
6186            videoPercent = BIOG.personolizationHandler._getVideoPercentMatchURL($this);
6187        }
6188        if (videoPercent > 0) {
6189            if (videoPercent == 100) {
6190                $this.addClass('article-video-completed');
6191            } else {
6192                $this.addClass('article-video-played');
6193            }
6194        }
6195    },
6196    _addingProgressbar: function($this) {
6197    	if (($this.hasClass('article-video-played') || $this.hasClass('article-video-completed'))){
6198    		if(!($this.find('.progress').length>0)){
6199	            var addProgressHTML = ('<div class="progress"><div class="progress-bar bg-success"><span>Complete %</span></div></div>');
6200	            if($this.hasClass('cmp-video')){
6201					$this.append(addProgressHTML);
6202	            }else{
6203					$this.prepend(addProgressHTML);
6204	            }
6205    		}
6206            BIOG.personolizationHandler._addingWidthAndTopToProgressDiv($this);
6207            $this.find('.progress-bar').css('width', videoPercent + '%');
6208        } else {
6209            $this.find('.progress').remove();
6210        }
6211    },
6212    _addingWidthAndTopToProgressDiv:function($this){
6213    	if($this.hasClass('cmp-card-tile')){
6214    		if($this.find('.card-tile-img-link img').length >0){
6215                var elemPaddingTop = parseInt($this.find('.card-tile-img-link').css('padding-top')) || 0;
6216	    		var progressTop  = $this.parent().show().find('.card-tile-img-link img').height() + elemPaddingTop;
6217	    		$this.find('.progress').css('top', progressTop + 'px');
6218    		}else{
6219    			$this.find('.progress').css('top', '0');
6220    		}
6221	    	if($this.closest('.cmp-right-rail-wrapper').hasClass('horizontal-tile')){
6222	    		var progressWidth  = $this.closest('.cmp-right-rail-wrapper.horizontal-tile').find('.card-tile-img-link img').width();
6223	    		$this.find('.progress').css('width', progressWidth + 'px');
6224	    	}
6225    	}
6226    },
6227    _unWatchedTilesShuffle: function($this) {
6228    	if ($this.hasClass('article-video-played') || $this.hasClass('article-video-completed')) {
6229    	    if ($this.closest('.unwatched-watched-tiles-shuffle').length > 0) {
6230    	    	BIOG.articleListV2Utility._watchedUnwatchedShuffle($this.closest('.unwatched-watched-tiles-shuffle'));
6231                BIOG.articleListV2Utility.calcTileMaxHeightPerRow($this.closest('.cmp-tile-list-wrap'), $this.closest('.cmp-tile-list-wrap').attr('tiles-per-row'));
6232    	    } else {
6233    	        var watchedTilesListWrapper = $this.closest('.cmp-right-rail-wrapper');
6234    	        if (watchedTilesListWrapper.length > 0 && watchedTilesListWrapper.find('[data-tiles-shuffle]').length > 0) {
6235    	            BIOG.options._shuffleTiles(watchedTilesListWrapper.find('[data-tiles-shuffle]'), $this.hasClass('article-video-played') || $this.hasClass('article-video-completed'));
6236    	        }
6237    	    }
6238    	    if ($('.cmp-card-tile.cursorclick').length > 0) {
6239	            BIOG.options._entireTileClickable($('.cmp-card-tile.cursorclick'), '.cmp-article-list-fullview-link');
6240	        }
6241    	}
6242    }
6243}
6244$(document).ready(function() {
6245    BIOG.personolizationHandler._init();
6246});
6247
6248/*******************************************************************************
6249 * Copyright 2018 Adobe
6250 *
6251 * Licensed under the Apache License, Version 2.0 (the "License");
6252 * you may not use this file except in compliance with the License.
6253 * You may obtain a copy of the License at
6254 *
6255 *     http://www.apache.org/licenses/LICENSE2.0
6256 *
6257 * Unless required by applicable law or agreed to in writing, software
6258 * distributed under the License is distributed on an "AS IS" BASIS,
6259 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6260 * See the License for the specific language governing permissions and
6261 * limitations under the License.
6262 ******************************************************************************/
6263
6264/**
6265 * Element.matches()
6266 * https://developer.mozilla.org/enUS/docs/Web/API/Element/matches#Polyfill
6267 */
6268if (!Element.prototype.matches) {
6269    Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
6270}
6271
6272// eslint-disable-next-line valid-jsdoc
6273/**
6274 * Element.closest()
6275 * https://developer.mozilla.org/enUS/docs/Web/API/Element/closest#Polyfill
6276 */
6277if (!Element.prototype.closest) {
6278    Element.prototype.closest = function(s) {
6279        "use strict";
6280        var el = this;
6281        if (!document.documentElement.contains(el)) {
6282            return null;
6283        }
6284        do {
6285            if (el.matches(s)) {
6286                return el;
6287            }
6288            el = el.parentElement || el.parentNode;
6289        } while (el !== null && el.nodeType === 1);
6290        return null;
6291    };
6292}
6293
6294/*******************************************************************************
6295 * Copyright 2018 Adobe
6296 *
6297 * Licensed under the Apache License, Version 2.0 (the "License");
6298 * you may not use this file except in compliance with the License.
6299 * You may obtain a copy of the License at
6300 *
6301 *     http://www.apache.org/licenses/LICENSE-2.0
6302 *
6303 * Unless required by applicable law or agreed to in writing, softw
6303are
6304 * distributed under the License is distributed on an "AS IS" BASIS,
6305 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6306 * See the License for the specific language governing permissions and
6307 * limitations under the License.
6308 ******************************************************************************/
6309/* global
6310    CQ
6311 */
6312(function() {
6313    "use strict";
6314
6315    var containerUtils = window.CQ && window.CQ.CoreComponents && window.CQ.CoreComponents.container && window.CQ.CoreComponents.container.utils ? window.CQ.CoreComponents.container.utils : undefined;
6316    if (!containerUtils) {
6317        // eslint-disable-next-line no-console
6318        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.");
6319    }
6320    var dataLayerEnabled;
6321    var dataLayer;
6322    var dataLayerName;
6323
6324    var NS = "cmp";
6325    var IS = "tabs";
6326
6327    var keyCodes = {
6328        END: 35,
6329        HOME: 36,
6330        ARROW_LEFT: 37,
6331        ARROW_UP: 38,
6332        ARROW_RIGHT: 39,
6333        ARROW_DOWN: 40
6334    };
6335
6336    var selectors = {
6337        self: "[data-" + NS + '-is="' + IS + '"]',
6338        active: {
6339            tab: "cmp-tabs__tab--active",
6340            tabpanel: "cmp-tabs__tabpanel--active"
6341        }
6342    };
6343
6344    /**
6345     * Tabs Configuration
6346     *
6347     * @typedef {Object} TabsConfig Represents a Tabs configuration
6348     * @property {HTMLElement} element The HTMLElement representing the Tabs
6349     * @property {Object} options The Tabs options
6350     */
6351
6352    /**
6353     * Tabs
6354     *
6355     * @class Tabs
6356     * @classdesc An interactive Tabs component for navigating a list of tabs
6357     * @param {TabsConfig} config The Tabs configuration
6358     */
6359    function Tabs(config) {
6360        var that = this;
6361
6362        if (config && config.element) {
6363            init(config);
6364        }
6365
6366        /**
6367         * Initializes the Tabs
6368         *
6369         * @private
6370         * @param {TabsConfig} config The Tabs configuration
6371         */
6372        function init(config) {
6373            that._config = config;
6374
6375            // prevents multiple initialization
6376            config.element.removeAttribute("data-" + NS + "-is");
6377
6378            cacheElements(config.element);
6379            that._active = getActiveIndex(that._elements["tab"]);
6380
6381            if (that._elements.tabpanel) {
6382                refreshActive();
6383                bindEvents();
6384                scrollToDeepLinkIdInTabs();
6385            }
6386
6387            if (window.Granite && window.Granite.author && window.Granite.author.MessageChannel) {
6388                /*
6389                 * Editor message handling:
6390                 * - subscribe to "cmp.panelcontainer" message requests sent by the editor frame
6391                 * - check that the message data panel container type is correct and that the id (path) matches this specific Tabs component
6392                 * - if so, route the "navigate" operation to enact a navigation of the Tabs based on index data
6393                 */
6394                CQ.CoreComponents.MESSAGE_CHANNEL = CQ.CoreComponents.MESSAGE_CHANNEL || new window.Granite.author.MessageChannel("cqauthor", window);
6395                CQ.CoreComponents.MESSAGE_CHANNEL.subscribeRequestMessage("cmp.panelcontainer", function(message) {
6396                    if (message.data && message.data.type === "cmp-tabs" && message.data.id === that._elements.self.dataset["cmpPanelcontainerId"]) {
6397                        if (message.data.operation === "navigate") {
6398                            navigate(message.data.index);
6399                        }
6400                    }
6401                });
6402            }
6403        }
6404
6405        /**
6406         * Displays the panel containing the element that corresponds to the deep link in the URI fragment
6407         * and scrolls the browser to this element.
6408         */
6409        function scrollToDeepLinkIdInTabs() {
6410            if (containerUtils) {
6411                var deepLinkItemIdx = containerUtils.getDeepLinkItemIdx(that, "tab", "tabpanel");
6412                if (deepLinkItemIdx > -1) {
6413                    var deepLinkItem = that._elements["tab"][deepLinkItemIdx];
6414                    if (deepLinkItem && that._elements["tab"][that._active].id !== deepLinkItem.id) {
6415                        navigateAndFocusTab(deepLinkItemIdx, true);
6416                    }
6417                    var hashId = window.location.hash.substring(1);
6418                    if (hashId) {
6419                        var hashItem = document.querySelector("[id='" + hashId + "']");
6420                        if (hashItem) {
6421                            hashItem.scrollIntoView();
6422                        }
6423                    }
6424                }
6425            }
6426        }
6427
6428        /**
6429         * Returns the index of the active tab, if no tab is active returns 0
6430         *
6431         * @param {Array} tabs Tab elements
6432         * @returns {Number} Index of the active tab, 0 if none is active
6433         */
6434        function getActiveIndex(tabs) {
6435            if (tabs) {
6436                for (var i = 0; i < tabs.length; i++) {
6437                    if (tabs[i].classList.contains(selectors.active.tab)) {
6438                        return i;
6439                    }
6440                }
6441            }
6442            return 0;
6443        }
6444
6445        /**
6446         * Caches the Tabs elements as defined via the {@code data-tabs-hook="ELEMENT_NAME"} markup API
6447         *
6448         * @private
6449         * @param {HTMLElement} wrapper The Tabs wrapper element
6450         */
6451        function cacheElements(wrapper) {
6452            that._elements = {};
6453            that._elements.self = wrapper;
6454            var hooks = that._elements.self.querySelectorAll("[data-" + NS + "-hook-" + IS + "]");
6455
6456            for (var i = 0; i < hooks.length; i++) {
6457                var hook = hooks[i];
6458                if (hook.closest("." + NS + "-" + IS) === that._elements.self) { // only process own tab elements
6459                    var capitalized = IS;
6460                    capitalized = capitalized.charAt(0).toUpperCase() + capitalized.slice(1);
6461                    var key = hook.dataset[NS + "Hook" + capitalized];
6462                    if (that._elements[key]) {
6463                        if (!Array.isArray(that._elements[key])) {
6464                            var tmp = that._elements[key];
6465                            that._elements[key] = [tmp];
6466                        }
6467                        that._elements[key].push(hook);
6468                    } else {
6469                        that._elements[key] = hook;
6470                    }
6471                }
6472            }
6473        }
6474
6475        /**
6476         * Binds Tabs event handling
6477         *
6478         * @private
6479         */
6480        function bindEvents() {
6481            window.addEventListener("hashchange", scrollToDeepLinkIdInTabs, false);
6482            var tabs = that._elements["tab"];
6483            if (tabs) {
6484                for (var i = 0; i < tabs.length; i++) {
6485                    (function(index) {
6486                        tabs[i].addEventListener("click", function(event) {
6487                            navigateAndFocusTab(index);
6488                        });
6489                        tabs[i].addEventListener("keydown", function(event) {
6490                            onKeyDown(event);
6491                        });
6492                    })(i);
6493                }
6494            }
6495        }
6496
6497        /**
6498         * Handles tab keydown events
6499         *
6500         * @private
6501         * @param {Object} event The keydown event
6502         */
6503        function onKeyDown(event) {
6504            var index = that._active;
6505            var lastIndex = that._elements["tab"].length - 1;
6506
6507            switch (event.keyCode) {
6508                case keyCodes.ARROW_LEFT:
6509                case keyCodes.ARROW_UP:
6510                    event.preventDefault();
6511                    if (index > 0) {
6512                        navigateAndFocusTab(index - 1);
6513                    }
6514                    break;
6515                case keyCodes.ARROW_RIGHT:
6516                case keyCodes.ARROW_DOWN:
6517                    event.preventDefault();
6518                    if (index < lastIndex) {
6519                        navigateAndFocusTab(index + 1);
6520                    }
6521                    break;
6522                case keyCodes.HOME:
6523                    event.preventDefault();
6524                    navigateAndFocusTab(0);
6525                    break;
6526                case keyCodes.END:
6527                    event.preventDefault();
6528                    navigateAndFocusTab(lastIndex);
6529                    break;
6530                default:
6531                    return;
6532            }
6533        }
6534
6535        /**
6536         * Refreshes the tab markup based on the current {@code Tabs#_active} index
6537         *
6538         * @private
6539         */
6540        function refreshActive() {
6541            var tabpanels = that._elements["tabpanel"];
6542            var tabs = that._elements["tab"];
6543
6544            if (tabpanels) {
6545                if (Array.isArray(tabpanels)) {
6546                    for (var i = 0; i < tabpanels.length; i++) {
6547                        if (i === parseInt(that._active)) {
6548                            tabpanels[i].classList.add(selectors.active.tabpanel);
6549                            tabpanels[i].removeAttribute("aria-hidden");
6550                            tabs[i].classList.add(selectors.active.tab);
6551                            tabs[i].setAttribute("aria-selected", true);
6552                            tabs[i].setAttribute("tabindex", "0");
6553                        } else {
6554                            tabpanels[i].classList.remove(selectors.active.tabpanel);
6555                            tabpanels[i].setAttribute("aria-hidden", true);
6556                            tabs[i].classList.remove(selectors.active.tab);
6557                            tabs[i].setAttribute("aria-selected", false);
6558                            tabs[i].setAttribute("tabindex", "-1");
6559                        }
6560                    }
6561                } else {
6562                    // only one tab
6563                    tabpanels.classList.add(selectors.active.tabpanel);
6564                    tabs.classList.add(selectors.active.tab);
6565                }
6566            }
6567        }
6568
6569        /**
6570         * Focuses the element and prevents scrolling the element into view
6571         *
6572         * @param {HTMLElement} element Element to focus
6573         */
6574        function focusWithoutScroll(element) {
6575            var x = window.scrollX || window.pageXOffset;
6576            var y = window.scrollY || window.pageYOffset;
6577            element.focus();
6578            window.scrollTo(x, y);
6579        }
6580
6581        /**
6582         * Navigates to the tab at the provided index
6583         *
6584         * @private
6585         * @param {Number} index The index of the tab to navigate to
6586         */
6587        function navigate(index) {
6588            that._active = index;
6589            refreshActive();
6590        }
6591
6592        /**
6593         * Navigates to the item at the provided index and ensures the active tab gains focus
6594         *
6595         * @private
6596         * @param {Number} index The index of the item to navigate to
6597         * @param {Boolean} keepHash true to keep the hash in the URL, false to update it
6598         */
6599        function navigateAndFocusTab(index, keepHash) {
6600            var exActive = that._active;
6601            if (!keepHash && containerUtils) {
6602                containerUtils.updateUrlHash(that, "tab", index);
6603            }
6604            navigate(index);
6605            focusWithoutScroll(that._elements["tab"][index]);
6606
6607            if (dataLayerEnabled) {
6608
6609                var activeItem = getDataLayerId(that._elements.tabpanel[index]);
6610                var exActiveItem = getDataLayerId(that._elements.tabpanel[exActive]);
6611
6612                dataLayer.push({
6613                    event: "cmp:show",
6614                    eventInfo: {
6615                        path: "component." + activeItem
6616                    }
6617                });
6618
6619                dataLayer.push({
6620                    event: "cmp:hide",
6621                    eventInfo: {
6622                        path: "component." + exActiveItem
6623                    }
6624                });
6625
6626                var tabsId = that._elements.self.id;
6627                var uploadPayload = { component: {} };
6628                uploadPayload.component[tabsId] = { shownItems: [activeItem] };
6629
6630                var removePayload = { component: {} };
6631                removePayload.component[tabsId] = { shownItems: undefined };
6632
6633                dataLayer.push(removePayload);
6634                dataLayer.push(uploadPayload);
6635            }
6636        }
6637    }
6638
6639    /**
6640     * Reads options data from the Tabs wrapper element, defined via {@code data-cmp-*} data attributes
6641     *
6642     * @private
6643     * @param {HTMLElement} element The Tabs element to read options data from
6644     * @returns {Object} The options read from the component data attributes
6645     */
6646    function readData(element) {
6647        var data = element.dataset;
6648        var options = [];
6649        var capitalized = IS;
6650        capitalized = capitalized.charAt(0).toUpperCase() + capitalized.slice(1);
6651        var reserved = ["is", "hook" + capitalized];
6652
6653        for (var key in data) {
6654            if (Object.prototype.hasOwnProperty.call(data, key)) {
6655                var value = data[key];
6656
6657                if (key.indexOf(NS) === 0) {
6658                    key = key.slice(NS.length);
6659                    key = key.charAt(0).toLowerCase() + key.substring(1);
6660
6661                    if (reserved.indexOf(key) === -1) {
6662                        options[key] = value;
6663                    }
6664                }
6665            }
6666        }
6667
6668        return options;
6669    }
6670
6671    /**
6672     * Parses the dataLayer string and returns the ID
6673     *
6674     * @private
6675     * @param {HTMLElement} item the accordion item
6676     * @returns {String} dataLayerId or undefined
6677     */
6678    function getDataLayerId(item) {
6679        if (item) {
6680            if (item.dataset.cmpDataLayer) {
6681                return Object.keys(JSON.parse(item.dataset.cmpDataLayer))[0];
6682            } else {
6683                return item.id;
6684            }
6685        }
6686        return null;
6687    }
6688
6689    /**
6690     * Document ready handler and DOM mutation observers. Initializes Tabs components as necessary.
6691     *
6692     * @private
6693     */
6694    function onDocumentReady() {
6695        dataLayerEnabled = document.body.hasAttribute("data-cmp-data-layer-enabled");
6696        if (dataLayerEnabled) {
6697            dataLayerName = document.body.getAttribute("data-cmp-data-layer-name") || "adobeDataLayer";
6698            dataLayer = window[dataLayerName] = window[dataLayerName] || [];
6699        }
6700
6701        var elements = document.querySelectorAll(selectors.self);
6702        for (var i = 0; i < elements.length; i++) {
6703            new Tabs({ element: elements[i], options: readData(elements[i]) });
6704        }
6705
6706        var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
6707        var body = document.querySelector("body");
6708        var observer = new MutationObserver(function(mutations) {
6709            mutations.forEach(function(mutation) {
6710                // needed for IE
6711                var nodesArray = [].slice.call(mutation.addedNodes);
6712                if (nodesArray.length > 0) {
6713                    nodesArray.forEach(function(addedNode) {
6714                        if (addedNode.querySelectorAll) {
6715                            var elementsArray = [].slice.call(addedNode.querySelectorAll(selectors.self));
6716                            elementsArray.forEach(function(element) {
6717                                new Tabs({ element: element, options: readData(element) });
6718                            });
6719                        }
6720                    });
6721                }
6722            });
6723        });
6724
6725        observer.observe(body, {
6726            subtree: true,
6727            childList: true,
6728            characterData: true
6729        });
6730    }
6731
6732    if (document.readyState !== "loading") {
6733        onDocumentReady();
6734    } else {
6735        document.addEventListener("DOMContentLoaded", onDocumentReady);
6736    }
6737
6738    if (containerUtils) {
6739        window.addEventListener("load", containerUtils.scrollToAnchor, false);
6740    }
6741
6742}());
6743
6744BIOG.articleListV2Utility={
6745	_getCtaTiles: function(shuffledArray, $listwrapperEl,articleTitle) {
6746        if (shuffledArray.ctaLinks) {
6747            let ctaListArray = [];
6748            for (var j = 0; j < shuffledArray.ctaLinks.length; j++) {
6749                var ctaLabel = shuffledArray.ctaLinks[j].label;
6750                var ctaPath = shuffledArray.ctaLinks[j].path;
6751                var ctaTarget = shuffledArray.ctaLinks[j].newWindow;
6752                var createCtaHTML;
6753                var ctaAriaLabel = articleTitle +'-'+ctaLabel;
6754                var ariaLabelValue = ctaAriaLabel.replace(/[^a-z0-9\s]/gi, '');
6755                ariaLabelValue = ariaLabelValue.split(" ").join('');
6756                if (ctaTarget) {
6757                    createCtaHTML = '<a aria-label='+ariaLabelValue+'  rel="noopener noreferrer" target="_blank" href="' + ctaPath + '.html" class="btn btn-primary card-cta-link"> ' + ctaLabel + '</a>';
6758                } else {
6759                    createCtaHTML = '<a aria-label='+ariaLabelValue+' href="' + ctaPath + '.html" class="btn btn-primary card-cta-link"> ' + ctaLabel + '</a>';
6760                }
6761                ctaListArray.push(createCtaHTML);
6762            }
6763             return ctaListArray.join(' ');
6764        }
6765    },
6766    _loadTilesOnScroll: function(shuffledArray, articleTileRes, $listwrapperEl, getMaxItems, loadBatchSize, cursorEntireClick, tilesPerRow) {
6767        // code for lazy load and creating markup on load on scroll
6768        $(window).on('resize scroll', function() {
6769        	if ($($listwrapperEl).find('.scrollMore').length > 0 && getMaxItems && BIOG.options.isInViewport($($listwrapperEl).find('.scrollMore'))) {
6770                var currentoffsetTop = $($listwrapperEl).find('.scrollMore').offset().top,
6771                    currentouterHeight = $($listwrapperEl).find('.scrollMore').outerHeight(),
6772                    windowHeight = $(window).height(),
6773                    windowScrollTop = $(this).scrollTop(),
6774                	loadScrollBatch = BIOG.articleListV2Utility._getBatchSize(loadBatchSize);
6775                if (windowScrollTop > (currentoffsetTop + currentouterHeight - windowHeight)) {
6776                    BIOG.articleListV2Utility._getLoadItems(shuffledArray, articleTileRes, $listwrapperEl, loadScrollBatch, loadBatchSize, cursorEntireClick, tilesPerRow);
6777                }
6778            }
6779        });
6780    },
6781    _loadTilesOnLoadMore: function(shuffledArray, articleTileRes, $listwrapperEl, getMaxItems, loadBatchSize, cursorEntireClick, tilesPerRow) {
6782        // load more event on click and if the element exists
6783        if ($($listwrapperEl).find('.scrollMore').length > 0 && getMaxItems) {
6784            $($listwrapperEl).find('.article-list-loadmore').on("click", function(e) {
6785                e.preventDefault();
6786                e.stopPropagation();
6787                var loadmoreBatch = BIOG.articleListV2Utility._getBatchSize(loadBatchSize);
6788                BIOG.articleListV2Utility._getLoadItems(shuffledArray, articleTileRes, $listwrapperEl, loadmoreBatch, loadBatchSize, cursorEntireClick, tilesPerRow);
6789
6790            });
6791        }
6792    },
6793    _getBatchSize: function(loadBatchSize) {
6794        // code for lazy load and creating markup on load on scroll
6795        var loadBatchDesktop = loadBatchSize.desktopSize ? loadBatchSize.desktopSize : 1,
6796            loadBatchTable = loadBatchSize.tabletSize ? loadBatchSize.tabletSize : 1,
6797            loadBatchMobile = loadBatchSize.mobileSize ? loadBatchSize.mobileSize : 1,
6798			getBatchSize;
6799        // check the batch size and set for scroll
6800        if (BIOG.devices.isDesktop()) {
6801            getBatchSize = loadBatchDesktop;
6802        } else if (BIOG.devices.isTablet()) {
6803            getBatchSize = loadBatchTable;
6804        } else {
6805            getBatchSize = loadBatchMobile;
6806        }
6807
6808        return getBatchSize;
6809    },
6810    _getLoadItems: function(shuffledArray, articleTileRes, $listwrapperEl, getMaxItems, loadBatchSize, cursorEntireClick, tilesPerRow) {
6811        // code for lazy load and creating markup on load on scroll
6812        var newShuffledArray = [];
6813        newShuffledArray = shuffledArray.splice(0, getMaxItems);
6814        if (newShuffledArray.length > 0) {
6815            BIOG.nextGenArtilceList._listView(newShuffledArray, articleTileRes, $listwrapperEl, getMaxItems, cursorEntireClick, tilesPerRow);
6816        }
6817
6818        if (!shuffledArray.length) {
6819            $($listwrapperEl).find('.cmp-tile-btn-wrapper').remove();
6820        }
6821    },
6822    shuffleTiles: function(articleTileRes) {
6823        var newListArray = [];
6824        var shuffleList = [];
6825        var responeList = articleTileRes["articleTiles"];
6826        for (var i in responeList) {
6827        	newListArray.push(responeList[i]);
6828        }
6829        if (articleTileRes.shuffle === "true") {
6830			newListArray = BIOG.articleListV2Utility._shuffleResponseArray(newListArray, articleTileRes['positions']);
6831        }
6832        for (var m = 0; m < newListArray.length; m++) {
6833            shuffleList.push(newListArray[m]);
6834        }
6835        return shuffleList;
6836    },
6837    calcTileMaxHeightPerRow: function($listwrapperEl, tilesPerRow) {
6838        if ($listwrapperEl.length) {
6839            var $cardTiles = $listwrapperEl.find('.cmp-card-tile');
6840            if (BIOG.devices.isDesktop()) {
6841                BIOG.articleListV2Utility.articleListMaxHeight($cardTiles, tilesPerRow);
6842            } else if (BIOG.devices.isTablet()) {
6843                BIOG.articleListV2Utility.articleListMaxHeight($cardTiles, tilesPerRow);
6844            } else {
6845                $cardTiles.css('height', '');
6846            }
6847        }
6848    },
6849    _shuffleResponseArray: function(shuffledArray, promoTilesPosArray) {
6850        var arrayLength = shuffledArray.length,
6851            indexArray, index,
6852            newShuffledArray = [],
6853            promoTilesArray = [];
6854        while (arrayLength > 0) {
6855            index = Math.floor(Math.random() * arrayLength);
6856            arrayLength--;
6857            indexArray = shuffledArray[arrayLength];
6858            shuffledArray[arrayLength] = shuffledArray[index];
6859            shuffledArray[index] = indexArray;
6860        }
6861        if (promoTilesPosArray && promoTilesPosArray.length > 0) {
6862            for (var i in shuffledArray) {
6863                if (!shuffledArray[i].staticTile) {
6864                    newShuffledArray.push(shuffledArray[i]);
6865                }
6866                if (shuffledArray[i].staticTile) {
6867                    promoTilesArray.push(shuffledArray[i]);
6868                }
6869            }
6870            for (var j = 0; j < promoTilesPosArray.length; j++) {
6871                newShuffledArray.splice(parseInt(promoTilesPosArray[j]), 0, promoTilesArray[j])
6872            }
6873            shuffledArray = newShuffledArray;
6874        }
6875        return shuffledArray;
6876    },
6877    articleListMaxHeight: function(element, listSize) {
6878		/* function definition for calculating heights with respect to each row */
6879		var $list = element;
6880        var tilesperrow= listSize;
6881        var height;
6882		if(tilesperrow !==undefined && tilesperrow >=3) {
6883			height = 0;
6884		}
6885		var maxProducts = function (maxLen, totLen) {
6886			var lastList = totLen % listSize;
6887			var lastIndex = totLen - lastList;
6888			var maxHeight;
6889			$list.each(function (index) {
6890				$(this).outerHeight() > height ? height = $(this).outerHeight() : null;
6891				index > lastIndex ? maxLen = lastList : null;
6892				/* assign max heights to each tile after calculating in last row */
6893				if ((index + 1) % maxLen === 0 || ((index + 1) % lastList === 1 && (index + 1) === totLen)) {
6894					assignHeightToTile(index);
6895				}				
6896			});
6897			/* max heights function to assign each tile after calculating in each row */
6898			function assignHeightToTile(index) {
6899				maxHeight = height;
6900				$list.each(function (ind) {
6901					if (ind === index) {
6902						for (var i = 0; i <= index; i++) {
6903							$list.eq(i).css('height', maxHeight);
6904						}
6905						return false;
6906					}
6907				});
6908			}
6909		};
6910		/* function initialization for calculating heights*/
6911		var calcMaxHeight = function () {
6912			element.css('height', 'auto');
6913			$list = element;
6914			var $window = $(window);
6915			if ($window.width() > 767) {
6916				$list.length < listSize ? maxProducts($list.length, $list.length) : maxProducts(listSize, $list.length);
6917			} else {
6918				$list.length < 1 ? maxProducts($list.length, $list.length) : maxProducts(1, $list.length);
6919			}
6920		};
6921		if(element.length > 1) {
6922            calcMaxHeight();
6923        }
6924    },
6925    calcWidthPerRow: function ($listwrapperEl, tilesPerRow) {
6926		/* dynamic width calculation for article list v2 using flex Flex grid*/
6927		var flexEnabled = $listwrapperEl.data('flex-enabled');
6928		if (tilesPerRow !== undefined && flexEnabled) {
6929			$listwrapperEl.find('.cmp-tile-list-wrap').addClass('tiles-flex-box');
6930			$listwrapperEl.find('.cmp-tile-list').addClass('tile-wt-' + tilesPerRow);
6931		} else if (!BIOG.devices.isMobile()) {
6932		if (tilesPerRow) {
6933			var dynamicTileWidth = $listwrapperEl.width() / tilesPerRow;
6934			$listwrapperEl.find('.cmp-tile-list').css('width', dynamicTileWidth + 'px');
6935		}
6936		} else {
6937			$listwrapperEl.find('.cmp-tile-list').css('width', '100%');
6938		}
6939	},
6940    addPersololizedAttr:function($elemWrapper){
6941    	 var personolizationFlag = $elemWrapper.data('personalization');
6942         if(personolizationFlag){
6943        	 $elemWrapper.find('.cmp-card-tile').attr('data-personalization','true');
6944        	 $elemWrapper.removeAttr('data-personalization');
6945         }
6946    },
6947    addAttrToMarkUp:function(shuffledRes,$listwrapperEl){
6948    	  var imageUrl;
6949          if (BIOG.devices.isMobile()) {
6950              imageUrl = shuffledRes.mobileThumbnail || '';
6951          } else if (BIOG.devices.isTablet()) {
6952              imageUrl = shuffledRes.tabletThumbnail || '';
6953          } else {
6954              imageUrl = shuffledRes.desktopThumbnail || '';
6955          }
6956		return imageUrl	;
6957    },
6958    _watchedUnwatchedShuffle: function($elem) {
6959        $elem.each(function() {
6960            var listTileWrapper = $(this);
6961            var allPromoTiles = listTileWrapper.find('.cmp-tile-list.flex-unit');
6962            var flexPos = [];
6963            allPromoTiles.each(function() {
6964                var flexPosVal = $(this).data('flex-position');
6965                flexPos.push(flexPosVal);
6966            });
6967            var allNonPromoTiles = listTileWrapper.children().not('.cmp-tile-list.flex-unit');
6968            var shuffleList = [];
6969            var allUnwatchedList = [];
6970            var allWatchedList = [];
6971            if (allNonPromoTiles.find('.cmp-card-tile').hasClass('article-video-played')) {
6972                allUnwatchedList = allNonPromoTiles.find('.cmp-card-tile').not('.article-video-played').parent();
6973                allWatchedList = allNonPromoTiles.find('.cmp-card-tile.article-video-played').parent();
6974            } else {
6975                allUnwatchedList = allNonPromoTiles.find('.cmp-card-tile').not('.article-video-completed').parent();
6976                allWatchedList = allNonPromoTiles.find('.cmp-card-tile.article-video-completed').parent();
6977            }
6978            var promoTilesArray = [];
6979            for (var m = 0; m < allUnwatchedList.length; m++) {
6980                shuffleList.push(allUnwatchedList[m]);
6981            }
6982            for (var k = 0; k < allWatchedList.length; k++) {
6983                shuffleList.push(allWatchedList[k]);
6984            }
6985            for (var n = 0; n < allPromoTiles.length; n++) {
6986            	promoTilesArray.push(allPromoTiles[n]);
6987            }
6988            if (flexPos && flexPos.length > 0) {
6989                for (var i = 0; i < flexPos.length; i++) {
6990                	shuffleList.splice(parseInt(flexPos[i]), 0, promoTilesArray[i]);
6991                }
6992            }
6993            listTileWrapper.children().remove();
6994            listTileWrapper.append(shuffleList);
6995            for (var j = 0; j < listTileWrapper.find('.media-gallery-tile').length; j++) {
6996                BIOG.mediaGalleryViewV2._mediaTileClikable($($('.media-gallery-tile')[j]));
6997            }
6998        });
6999    },
7000    _imageMarkUpLazyEnabled:function($listwrapperEl,imageUrl,articleTitle){
7001    	var imageMarkUp = '<div class="image section">'+
7002					    	'<div data-cmp-is="image" data-cmp-lazy data-cmp-src="' + imageUrl + '" data-cmp-widths="128,256,512,1024,1280,1440,1920,2048" data-asset="' + imageUrl + '" class="cmp-image">' +
7003							'<noscript data-cmp-hook-image="noscript">'+
7004									 '<img class="card-tile-img cmp-image__image" src="' + imageUrl + '" data-cmp-hook-image="image" alt="' + articleTitle + '">' +
7005								'</noscript>'+    
7006						'</div>' +
7007					  '</div>';
7008    	if($listwrapperEl.find('[data-lazy-disable]').data('lazy-disable')){
7009    		imageMarkUp = '<div class="image section">'+
7010					    	'<div data-cmp-is="image" data-cmp-src="' + imageUrl + '" data-cmp-widths="128,256,512,1024,1280,1440,1920,2048" data-asset="' + imageUrl + '" class="cmp-image">' +
7011					    		'<img class="card-tile-img cmp-image__image" src="' + imageUrl + '" data-cmp-hook-image="image" alt="' + articleTitle + '">' +
7012							'</div>' +
7013						  '</div>';
7014    	}
7015    	return imageMarkUp;
7016    }
7017}
7018BIOG.nextGenArticleCarousel = {
7019    _init: function($listwrapperEl) {
7020        BIOG.nextGenArticleCarousel._fetchTiles($listwrapperEl);
7021    },
7022    _fetchTiles: function($listwrapperEl) {
7023        var artileTilesJson = $listwrapperEl.find('[name="currentListJson"]').val() + '.articlelist.json';
7024        BIOG.options.ajaxCallHandler($listwrapperEl, 'GET', artileTilesJson, '', true, false, BIOG.nextGenArticleCarousel.callbackSucess, BIOG.nextGenArticleCarousel.callbackFailure);
7025    },
7026    callbackSucess: function(response, $listwrapperEl) {
7027        if (response) {
7028            // get the carousel response
7029            var articleCarouselRes = response;
7030            var shuffledCarouselRes = BIOG.articleListV2Utility.shuffleTiles(articleCarouselRes),
7031                getMaxItems = articleCarouselRes.maxItems,
7032                cursorEntireClick = articleCarouselRes.entireClickable ? 'cursorclick' : '',
7033                loadBatchDesktop = articleCarouselRes.desktopSize ? articleCarouselRes.desktopSize : 1,
7034                loadBatchTable = articleCarouselRes.tabletSize ? articleCarouselRes.tabletSize : 1,
7035                loadBatchMobile = articleCarouselRes.mobileSize ? articleCarouselRes.mobileSize : 1,
7036                getMaxBatchSize,
7037                loopTiles = articleCarouselRes.loopTiles ? articleCarouselRes.loopTiles : '';
7038            if(articleCarouselRes.showUnWatchedTiles){	
7039                $($listwrapperEl).find('.article-tile-items').addClass('unwatched-watched-tiles-shuffle');	
7040            }
7041            // check the batch size and set for scroll
7042            if (BIOG.devices.isDesktop()) {
7043                getMaxBatchSize = loadBatchDesktop;
7044            } else if (BIOG.devices.isTablet()) {
7045                getMaxBatchSize = loadBatchTable;
7046            } else {
7047                getMaxBatchSize = loadBatchMobile;
7048            }
7049            /*if (shuffledCarouselRes !== undefined) {
7050                BIOG.nextGenArticleCarousel._carouselView(shuffledCarouselRes, $listwrapperEl, getMaxItems, cursorEntireClick, getMaxBatchSize, loopTiles);	
7051                BIOG.personolizationHandler._init();
7052                BIOG.nextGenArticleCarousel._generateCarousel($listwrapperEl);
7053                BIOG.articleListV2Utility.calcTileMaxHeightPerRow($listwrapperEl, shuffledCarouselRes.length);
7054            }*/
7055
7056            if (shuffledCarouselRes !== undefined) {
7057                if (getMaxItems !== undefined && getMaxItems !== '') {
7058                    renderShuffledArray = getMaxItems ? shuffledCarouselRes.splice(0, getMaxItems) : shuffledCarouselRes;
7059                    BIOG.nextGenArticleCarousel._carouselView(renderShuffledArray, $listwrapperEl, getMaxItems, cursorEntireClick, getMaxBatchSize, loopTiles);
7060                    BIOG.personolizationHandler._init();
7061                    BIOG.nextGenArticleCarousel._generateCarousel($listwrapperEl);
7062                    BIOG.articleListV2Utility.calcTileMaxHeightPerRow($listwrapperEl, shuffledCarouselRes.length);
7063                } else {
7064                    BIOG.nextGenArticleCarousel._carouselView(shuffledCarouselRes, $listwrapperEl, getMaxItems, cursorEntireClick, getMaxBatchSize, loopTiles);
7065                    BIOG.personolizationHandler._init();
7066                    BIOG.nextGenArticleCarousel._generateCarousel($listwrapperEl);
7067                    BIOG.articleListV2Utility.calcTileMaxHeightPerRow($listwrapperEl, shuffledCarouselRes.length);
7068                }
7069            }
7070        }
7071    },
7072    callbackFailure: function() {
7073        return false;
7074    },
7075    _carouselView: function(shuffledCarouselRes, $listwrapperEl, getMaxItems, cursorEntireClick, getMaxBatchSize, loopTiles) {
7076        if (shuffledCarouselRes.length > 0) {
7077            for (var i = 0; i < shuffledCarouselRes.length; i++) {
7078                var imageUrl = BIOG.articleListV2Utility.addAttrToMarkUp(shuffledCarouselRes[i]);
7079                var articlePagePath = shuffledCarouselRes[i].path || '';
7080                var articleDesc = shuffledCarouselRes[i].paragraph ? shuffledCarouselRes[i].paragraph.split()[0]: '';
7081                var articleTitle = shuffledCarouselRes[i].heading || '';
7082                if(articleTitle){
7083                    var ariaLableVal = articleTitle.replace(/[^a-zA-Z ]/g, "");
7084                    ariaLableVal = ariaLableVal.split(" ").join('');
7085                }
7086                var ctaDetails = BIOG.articleListV2Utility._getCtaTiles(shuffledCarouselRes[i], $listwrapperEl,articleTitle);
7087                ctaDetails = ctaDetails ? ctaDetails : '';
7088                var createCarouselHtml = document.createElement('div');
7089                var artileTagNames = shuffledCarouselRes[i].tags|| '';
7090                var imageMarkup = BIOG.articleListV2Utility._imageMarkUpLazyEnabled($listwrapperEl,imageUrl,articleTitle);
7091                var tags = shuffledCarouselRes[i].tagIds || '';
7092                var rank = shuffledCarouselRes[i].rank || '';
7093                var publishdate = shuffledCarouselRes[i].publishDate || '';
7094                createCarouselHtml.setAttribute('data-slidetiles', getMaxBatchSize);
7095                createCarouselHtml.setAttribute('data-tags', tags);
7096                createCarouselHtml.setAttribute('data-rank', rank);
7097                createCarouselHtml.setAttribute('publishdate', publishdate);
7098                createCarouselHtml.setAttribute('data-loop-tiles', loopTiles);
7099                createCarouselHtml.className = 'cmp-tile-list';
7100                createCarouselHtml.innerHTML =
7101                    '<div class="cmp-card-tile article-tile-item-container '+artileTagNames+' '+cursorEntireClick +'" data-slidetiles="'+getMaxBatchSize+'">'+
7102                        '<div class="article-tile-item">'+
7103                            '<a aria-hidden="true" class="cmp-article-list-fullview-link" href="' + articlePagePath + '.html"></a>'+
7104                                '<a aria-label='+ariaLableVal+' class="card-tile-img-link" href="' + articlePagePath + '.html">'+
7105                                    imageMarkup+
7106                                        '</a>'+
7107                                            '</div>'+
7108                                                '<div class="category-desc-content">'+
7109                                                    '<div class="card-body">'+
7110                                                        '<a aria-label='+ariaLableVal+' href="' + articlePagePath + '.html" class="card-title">' + articleTitle + '</a>'+
7111                                                            '<div class="card-text">' + articleDesc + '</div>' + ctaDetails +
7112                                                                '</div>'+
7113                                                                    '</div>'+
7114                                                                        '<a class="data-personalization-url" aria-hidden="true" href="' + articlePagePath + '.html"></a>'+
7115                                                                            '</div>';
7116                $($listwrapperEl).find('.article-tile-items').append(createCarouselHtml);
7117                if ($listwrapperEl.find('.cmp-card-tile.cursorclick').length > 0) {
7118                    BIOG.options._entireTileClickable($('.cmp-card-tile.cursorclick'), '.cmp-article-list-fullview-link');
7119                } else {
7120                    $listwrapperEl.find('.cmp-card-tile .cmp-article-list-fullview-link').remove();
7121                }
7122                BIOG.articleListV2Utility.addPersololizedAttr($($listwrapperEl).find('.article-tile-items'));
7123                BIOG.nextGenArticleCarousel._tileSetMaxHeight($listwrapperEl);
7124            }
7125        }
7126    },
7127    _generateCarousel: function($listwrapperEl) {
7128        var articleTileItems = $($listwrapperEl).find('.article-tile-items'),
7129            articleItemLeft = $($listwrapperEl).find('.left-scroll'),
7130            articleItemRight = $($listwrapperEl).find('.right-scroll'),
7131            generateCarouselWidth = $($listwrapperEl).find('[data-sli
7131deTiles]').outerWidth(true),
7132            slidePerBatch = $($listwrapperEl).find('.article-tile-item-container').attr('data-slidetiles');
7133        var autoSlide = articleTileItems.data('auto-slide'),
7134            slideTime = articleTileItems.data('slide-time') ? articleTileItems.data('slide-time') : 2000;
7135        var leftClickFlag = false;
7136        var rightClickFlag = false;
7137        if(articleTileItems){
7138            $(articleItemLeft).on('click', function(){
7139                if(!leftClickFlag) {
7140					leftClickFlag = true;
7141					generateCarouselWidth = $($listwrapperEl).find('[data-slideTiles]').outerWidth(true);
7142                    BIOG.nextGenArticleCarousel._navigationHandler(generateCarouselWidth, articleTileItems, slidePerBatch);
7143
7144                    setTimeout(function () {
7145                        leftClickFlag = false;
7146                    }, 500);
7147                }
7148            });
7149            $(articleItemRight).on('click', function(){
7150                if(!rightClickFlag) {
7151                    rightClickFlag = true;
7152					generateCarouselWidth = $($listwrapperEl).find('[data-slideTiles]').outerWidth(true);
7153                    BIOG.nextGenArticleCarousel._navigationHandler(-generateCarouselWidth, articleTileItems, slidePerBatch);
7154                    $($listwrapperEl).find('.left-scroll').show();
7155
7156                    setTimeout(function () {
7157                        rightClickFlag = false;
7158                    }, 500);
7159                }
7160            });
7161            
7162            if (autoSlide) {
7163                articleTileItems.attr('data-auto-animate', BIOG.nextGenArticleCarousel._autoSlideCarouselV2(-generateCarouselWidth, articleTileItems, slidePerBatch, slideTime));
7164                if ($(window).width() > 992) {
7165                    BIOG.nextGenArticleCarousel._carouselScrollV2($listwrapperEl, -generateCarouselWidth, articleTileItems, slidePerBatch, slideTime);
7166                }
7167            }
7168            
7169            if ($(window).width() < 992) {
7170                $($listwrapperEl).swipe({
7171                    swipe:function(event, direction) {
7172                        if (direction == "left") {
7173                            $($listwrapperEl).find('.right-scroll').trigger("click");
7174                        }
7175                        if (direction == "right") {
7176                            $($listwrapperEl).find('.left-scroll').trigger("click");
7177                        }			
7178
7179                    },
7180                    threshold:0
7181                });
7182                
7183                if($($listwrapperEl).find('.cmp-card-tile').length < 5){
7184                    $('.control-container').show();
7185                }
7186                else {
7187                    $('.control-container').hide();
7188                }
7189            }
7190            //apply swipe logic in desktop if check-box enabled
7191            var desktopDragFlag =  $($listwrapperEl).find('.article-tile-items').data('swipe-drag-desktop');
7192            if (($(window).width() > 991) && desktopDragFlag) {
7193                 $('.cmp-carousel-container-v2 img').on('dragstart', function(e) {
7194                    e.preventDefault();
7195                 });
7196                 $($listwrapperEl).swipe({
7197                     swipe: function(event, direction) {
7198                         if (direction == "left") {
7199                             $($listwrapperEl).find('.right-scroll').trigger("click");
7200                         }
7201                         if (direction == "right") {
7202                             $($listwrapperEl).find('.left-scroll').trigger("click");
7203                         }
7204
7205                     },
7206                     threshold: 0
7207                 });
7208             }
7209        }
7210    },
7211    _navigationHandler: function(e, articleTileItems, slidePerBatch) {
7212        var delta = 0;
7213        if (typeof e === 'number') {
7214            delta = e * slidePerBatch;
7215        } else {
7216            if (e.deltaX !== 0) {
7217                delta = e.deltaX;
7218            } else {
7219                delta = e.deltaY;
7220            }
7221            e.preventDefault();
7222        }
7223        
7224        // loop logic
7225        if ($(articleTileItems).data('loop-tiles')) {
7226            if (delta > 0) {
7227                $(articleTileItems).find('.cmp-card-tile').last().prependTo($(articleTileItems));
7228            } else {
7229                $(articleTileItems).find('.cmp-card-tile').first().appendTo($(articleTileItems));
7230            }
7231        }
7232
7233        $(articleTileItems).animate({
7234            scrollLeft: $(articleTileItems).scrollLeft() - (delta)
7235        });
7236        
7237    },
7238    _tileSetMaxHeight: function($listwrapperEl) {
7239        var maxHeight = -1;
7240        var articleContainer = $listwrapperEl.find('.article-tile-item-container');
7241        articleContainer.each(function() {
7242            maxHeight = maxHeight > $(this).height() ? maxHeight : $(this).height();
7243            $(this).height(maxHeight);
7244        });
7245    },
7246    _autoSlideCarouselV2: function(generateCarouselWidth, articleTileItems, slidePerBatch, slideTime) {
7247        return setInterval(function() {
7248            BIOG.nextGenArticleCarousel._navigationHandler(generateCarouselWidth, articleTileItems, slidePerBatch, slideTime);
7249        }, slideTime);
7250    },
7251    _carouselScrollV2: function($currentCarousel, generateCarouselWidth, articleTileItems, slidePerBatch, slideTime) {
7252        $currentCarousel.on("mouseenter", function () {
7253            $currentCarousel.addClass('stop-carousel');
7254            if ($currentCarousel.hasClass('stop-carousel')) {
7255                clearInterval($currentCarousel.find('.article-tile-items').attr('data-auto-animate'));
7256            }
7257        }).on("mouseleave", function () {
7258            $currentCarousel.removeClass('stop-carousel');
7259            $currentCarousel.find('.article-tile-items').attr('data-auto-animate', BIOG.nextGenArticleCarousel._autoSlideCarouselV2(generateCarouselWidth, articleTileItems, slidePerBatch, slideTime));
7260        });
7261    }   
7262}
7263$(document).ready(function() {
7264    if ($('.cmp-carousel-container-v2').length > 0) {
7265        $('.cmp-carousel-container-v2').each(function() {
7266            BIOG.nextGenArticleCarousel._init($(this));
7267        });
7268    }
7269    
7270    //timeout method called from article-carousel js-file
7271    setTimeout(function(){ 
7272        $('.cmp-carousel-container-v2').each(function() { 
7273            var carouselId= $(this).attr('id'),
7274                carousel = {};
7275            carousel.e =document.getElementById(carouselId);
7276            var articleItem = $('#'+carouselId).find('.article-tile-items').attr('id');
7277            carousel.items = document.getElementById(articleItem);
7278            var articleItemLeft = $('#'+carouselId).find('.left-scroll').attr('id');
7279            carousel.leftScroll = document.getElementById(articleItemLeft);
7280            var articleItemRight = $('#'+carouselId).find('.right-scroll').attr('id');
7281            carousel.rightScroll = document.getElementById(articleItemRight);
7282            
7283            if(carousel.items){                
7284                carousel.items.addEventListener("scroll", scrollEvent);
7285                setLeftScrollOpacity();
7286                setRightScrollOpacity();
7287            }            
7288            
7289            function scrollEvent(e) {
7290                setLeftScrollOpacity();
7291                setRightScrollOpacity();
7292            }
7293            
7294            function setLeftScrollOpacity() {
7295                if (isScrolledAllLeft()) {
7296                    carousel.leftScroll.style.opacity = 0;
7297                } else {
7298                    carousel.leftScroll.style.opacity = 1;
7299                }
7300            }
7301            
7302            function isScrolledAllLeft() {
7303                if (carousel.items.scrollLeft === 0 && !$(carousel.items).data('loop-tiles')) {
7304                    return true;
7305                } else {
7306                    return false;
7307                }
7308            }
7309            
7310            function isScrolledAllRight() {
7311                if (carousel.items.scrollWidth > carousel.items.offsetWidth && !$(carousel.items).data('loop-tiles')) {
7312                    if (carousel.items.scrollLeft + carousel.items.offsetWidth >= carousel.items.scrollWidth-1) {
7313                        return true;
7314                    } 
7315                }    
7316                return false;
7317            }
7318
7319            function setRightScrollOpacity() {
7320                if (isScrolledAllRight()){
7321                    carousel.rightScroll.style.opacity = 0;
7322                } else {
7323                    carousel.rightScroll.style.opacity = 1;
7324                }
7325            }
7326        });
7327    }, 3000);  
7328});
7329
7330
7331//This file code merged with article-list-v2-carousel-js file
7332var lightboxLink;
7333BIOG.mediaGalleryViewV2 = {
7334    _appendDataAttributes: function(link) {
7335        var hrefValue = link.attr('href').split('=');
7336        link.attr('data-bs-target', "#genericLightbox");
7337        link.attr('data-lightbox-trigger', "");
7338        link.attr('data-lightbox-path', hrefValue[1]);
7339    },
7340    _mediaGalleryModalPath: function(articleTileRes) {
7341        var modalPath = articleTileRes.modalPath;
7342        if (modalPath && modalPath.indexOf('.html') < 0) {
7343            modalPath = modalPath + '.html';
7344        }
7345        return modalPath;
7346    },
7347    _entireTileClickbleMediaTile: function($listwrapperEl, articleTileRes, shuffledarray) {
7348        var deepLinkParameter = window.location.href.split('#')[1];
7349        if(deepLinkParameter !== undefined){
7350	        var dataArticleIdentifier = $('.media-gallery-tile[data-article-identifier]');
7351	        dataArticleIdentifier.each(function() {
7352	            if ($(this).data('article-identifier') === deepLinkParameter) {
7353	                $(this).addClass('hoveredtile');
7354	            }
7355	        });
7356	        if ($('.media-gallery-tile.hoveredtile').length > 0) {
7357	            setTimeout(function() {
7358	                $('.media-gallery-tile.hoveredtile').click();
7359	            }, 1000);
7360	        } else {
7361	            BIOG.mediaGalleryViewV2._mediaTileClickOnLoad(deepLinkParameter, $listwrapperEl, articleTileRes, shuffledarray)
7362	        }
7363        }
7364    },
7365    _mediaTileClikable: function($this) {
7366        if ($this.length > 0) {
7367            var dataArticleIdentifier = $('.media-gallery-tile[data-article-identifier]');
7368            BIOG.options._entireTileClickable($this, '.media-gallery-modallink',dataArticleIdentifier);
7369            lightboxLink = $this.find('.media-gallery-modallink');
7370            BIOG.LightBoxModal._init();
7371        }
7372    },
7373    _createHiddenMarkUp: function($listwrapperEl, modalPath, articlePagePath, articleTitle, articleDesc, videoPath, deepLinkAttr) {
7374        var createHtml = document.createElement('div');
7375        createHtml.className = 'cmp-tile-list  hidden';
7376        createHtml.innerHTML =
7377            '<div class="card cmp-card-tile media-gallery-tile" data-article-identifier = "' + deepLinkAttr + '">' +
7378            '<a class="media-gallery-modallink" aria-hidden="true" href= "' + modalPath + '"></a>' +
7379            '<div class="card-body">' +
7380            '<a aria-label="link" href="' + articlePagePath + '.html" class="card-title">' + articleTitle + '</a>' +
7381            '<div class="card-text">' + articleDesc + '</div>' +
7382            ' <a class="card-video-url" aria-hidden="true" href="' + videoPath + '.html"></a>' +
7383            '</div>' +
7384            '<a class="data-personalization-url" aria-hidden="true" href="' + articlePagePath + '.html"></a>' +
7385            '</div>';
7386        $($listwrapperEl).find('.cmp-tile-list-wrap').append(createHtml);
7387        BIOG.articleListV2Utility.addPersololizedAttr($($listwrapperEl).find('.cmp-tile-list-wrap'));
7388    },
7389    _mediaTileClickOnLoad: function(deepLinkParameter, $listwrapperEl, articleTileRes, shuffledarray) {
7390        for (var i = 0; i < shuffledarray.length; i++) {
7391            var deepLinkAttr = shuffledarray[i].articleDeeplinkId;
7392            if (deepLinkParameter === deepLinkAttr) {
7393                var articlePagePath = shuffledarray[i].path || '';
7394                var articleDesc = shuffledarray[i].paragraph ? shuffledarray[i].paragraph.trim() : '';
7395                var articleTitle = shuffledarray[i].heading || '';
7396                if (shuffledarray[i].videoResourcePath !== null) {
7397                    var videoPath = shuffledarray[i].videoResourcePath || '';
7398                }
7399                var modalPath = BIOG.mediaGalleryViewV2._mediaGalleryModalPath(articleTileRes);
7400                BIOG.mediaGalleryViewV2._createHiddenMarkUp($listwrapperEl, modalPath, articlePagePath, articleTitle, articleDesc, videoPath, deepLinkAttr);
7401                BIOG.mediaGalleryViewV2._appendDataAttributes($('.media-gallery-modallink'));
7402                var dataArticleIdentifier = $('.media-gallery-tile[data-article-identifier]');
7403                BIOG.mediaGalleryViewV2._deepLinkMediaTileClickOnLoad(dataArticleIdentifier, deepLinkAttr);
7404                return;
7405            }
7406        }
7407    },
7408    _deepLinkMediaTileClickOnLoad: function(dataArticleIdentifier, deepLinkAttr) {
7409        dataArticleIdentifier.each(function() {
7410            if ($(this).data('article-identifier') === deepLinkAttr) {
7411                $(this).addClass('hoveredtile');
7412                $(this).parent().hide();
7413            }
7414        });
7415        if ($('.media-gallery-tile.hoveredtile').length > 0) {
7416            setTimeout(function() {
7417                $('.media-gallery-tile.hoveredtile').click();
7418            }, 1000);
7419        }
7420        BIOG.mediaGalleryViewV2._mediaTileClikable(dataArticleIdentifier);
7421    }
7422}
7423var articleTileCounter;
7424var listFilterFlag;
7425var mediaTileCounter;
7426var listSortObj = [];
7427BIOG.nextGenArtilceList = {
7428    _init: function($listwrapperEl) {
7429        BIOG.nextGenArtilceList._fetchTiles($listwrapperEl);
7430    },
7431    _fetchTiles: function($listwrapperEl) {
7432        var artileTilesJson = $listwrapperEl.find('[name="currentListJson"]').val() + '.articlelist.json';
7433        BIOG.options.ajaxCallHandler($listwrapperEl, 'GET', artileTilesJson, '', true, false, BIOG.nextGenArtilceList.callbackSucess, BIOG.nextGenArtilceList.callbackFailure);
7434    },
7435    callbackSucess: function(response, $listwrapperEl) {
7436        if (response) {
7437            // get the shuffled array from response array
7438            var articleTileRes = response;
7439            var shuffledArray = BIOG.articleListV2Utility.shuffleTiles(articleTileRes),
7440                getMaxItems = articleTileRes.maxItems,
7441                getloadMoreLabel = articleTileRes.loadMoreLabel ? articleTileRes.loadMoreLabel : '',
7442                renderShuffledArray = [],
7443                cursorEntireClick,
7444                tilesPerRow = articleTileRes.tilesPerRow ? articleTileRes.tilesPerRow : null,
7445            	tilesPerRowTablet = articleTileRes.tilesPerRowTablet ? articleTileRes.tilesPerRowTablet : null,
7446                articleTileResFilter = Object.assign({}, articleTileRes);
7447                articleTileCounter = 0; 
7448                listFilterFlag = false;
7449                mediaTileCounter= 0;
7450            // checking and assigning the tiles per row for tablet view
7451            if (BIOG.devices.isTablet()) {
7452                tilesPerRow = tilesPerRowTablet;
7453            }
7454            if(articleTileRes.sectionView !== "media-gallery-view"){
7455					cursorEntireClick = articleTileRes.entireClickable ? 'cursorclick' : '';
7456            }else{
7457				cursorEntireClick = 'media-gallery-tile';
7458            }
7459            if (shuffledArray !== undefined) {
7460                // create with shuffled array response to sort filter and assign the response to list view
7461                if($listwrapperEl.attr('data-tagged-component')) {
7462                    articleTileResFilter["articleTiles"] = Object.assign([], shuffledArray);
7463                    var getTaggedComponentName = $listwrapperEl.attr('data-tagged-component');
7464                    // object creation for list sort filter and stored in global array
7465                    var currentListObj = {};
7466                    currentListObj[getTaggedComponentName] = articleTileResFilter;
7467                    listSortObj.push(currentListObj);
7468                }
7469                if ($listwrapperEl.find('.cmp-tile-list-wrap').attr('data-enable-dynamic-filter') && articleTileRes.sectionView !== "carousel-view") {
7470                    var articleListArray = shuffledArray, 
7471                        selectedFilter,
7472      					filterObjArray = [], 
7473                        renderfilterObjArray = [];
7474                    $(document).on('click', '.category-filter .filter-item', function () {
7475                        BIOG.nextGenArtilceList._displayFilterItems(filterObjArray, articleTileRes, renderfilterObjArray, articleListArray, selectedFilter, $listwrapperEl, getMaxItems, cursorEntireClick, tilesPerRow, getloadMoreLabel)
7476                    });
7477                    if ('.reset-filter.category-filter.deactivated') {
7478                        BIOG.nextGenArtilceList._displayAllItems(filterObjArray, articleTileRes, renderfilterObjArray, articleListArray, selectedFilter, $listwrapperEl, getMaxItems, cursorEntireClick, tilesPerRow, getloadMoreLabel);
7479                    }
7480                    $(document).on('click', '.reset-filter', function () {
7481                        BIOG.nextGenArtilceList._displayAllItems(filterObjArray, articleTileRes, renderfilterObjArray, articleListArray, selectedFilter, $listwrapperEl, getMaxItems, cursorEntireClick, tilesPerRow, getloadMoreLabel);
7482                    });
7483                } else {
7484                    renderShuffledArray = getMaxItems ? shuffledArray.splice(0, getMaxItems) : shuffledArray;
7485                    BIOG.nextGenArtilceList._appendArticleTile(renderShuffledArray, articleTileRes, $listwrapperEl, getMaxItems, cursorEntireClick, tilesPerRow);
7486                      if ((articleTileRes.loadOnScroll === "true") && ($listwrapperEl.find('.cmp-tile-list'))) {
7487                    BIOG.articleListV2Utility._loadTilesOnScroll(shuffledArray, articleTileRes, $listwrapperEl, getMaxItems, articleTileRes, cursorEntireClick, tilesPerRow);
7488                } else {
7489                    if (shuffledArray.length > 0 && $($listwrapperEl).find('.cmp-tile-list').length > 0 && getMaxItems) {
7490                    	if(getloadMoreLabel !== ''){
7491                    		$listwrapperEl.append('<div class="cmp-tile-btn-wrapper"><a href="javascript:void(0)" aria-label="link" class="cmp-button-link shape-fill-medium-btn article-list-loadmore">' + getloadMoreLabel + '</a></div>');
7492                    	}
7493                    	BIOG.articleListV2Utility._loadTilesOnLoadMore(shuffledArray, articleTileRes, $listwrapperEl, getMaxItems, articleTileRes, cursorEntireClick, tilesPerRow);
7494                    }
7495                }
7496                }
7497                if((articleTileRes.sectionView !== "carousel-view") && (articleTileRes.sectionView !== "right-rail-view")){
7498                	BIOG.articleListV2Utility.calcWidthPerRow($listwrapperEl, tilesPerRow);
7499                    BIOG.articleListV2Utility.calcTileMaxHeightPerRow($listwrapperEl, tilesPerRow);
7500                }
7501
7502            }
7503            if($listwrapperEl.find('.media-gallery-tile').length>0){
7504            	BIOG.mediaGalleryViewV2._entireTileClickbleMediaTile($listwrapperEl,articleTileRes,shuffledArray);
7505        	}
7506        }
7507    },
7508    callbackFailure: function() {
7509        return false;
7510    },
7511    _appendArticleTile: function(shuffledArray, articleTileRes, $listwrapperEl, getMaxItems, cursorEntireClick, tilesPerRow) {
7512        // create the methods based on the list article type view
7513 		 if (articleTileRes.sectionView !== "carousel-view") {
7514           BIOG.nextGenArtilceList._listView(shuffledArray, articleTileRes, $listwrapperEl, getMaxItems, cursorEntireClick, tilesPerRow);
7515         }
7516    },
7517    _displayFilterItems: function (filterObjArray, articleTileRes, renderfilterObjArray, articleListArray, selectedFilter, $listwrapperEl, getMaxItems, cursorEntireClick, tilesPerRow, getloadMoreLabel) {
7518        if ($('.cmp-tile-btn-wrapper').length > 0) {
7519            $('.cmp-tile-btn-wrapper').remove();
7520        }
7521        if (filterObjArray) {
7522            filterObjArray = [];
7523            $('.cmp-tile-btn-wrapper').remove();
7524            $('.cmp-tile-list').each(function () {
7525                $(this).css('display', 'none');
7526            });
7527        } else {
7528            $('.cmp-tile-list').each(function () {
7529                $(this).css('display', 'block');
7530            });
7531        };
7532        $('.category-filter .filter-item.selected').each(function () {
7533            selectedFilter = $(this).data('category-item');
7534        });
7535        articleListArray.filter(function (item) {
7536            var tagId = item.tagIds;
7537            $.each(tagId, function (index, val) {
7538                if (val == selectedFilter) {
7539                    filterObjArray.push(item);
7540                };
7541            });
7542        });
7543        if ($('.category-filter .filter-item.selected').length > 0) {
7544            renderfilterObjArray = getMaxItems ? filterObjArray.splice(0, getMaxItems) : filterObjArray;
7545            BIOG.nextGenArtilceList._listView(renderfilterObjArray, articleTileRes, $listwrapperEl, getMaxItems, cursorEntireClick, tilesPerRow);
7546            if (filterObjArray.length > 0 && $($listwrapperEl).find('.cmp-tile-list').length > 0 && getMaxItems) {
7547                if (getloadMoreLabel !== '') {
7548                    $listwrapperEl.append('<div class="cmp-tile-btn-wrapper"><a href="javascript:void(0)" aria-label="link" class="cmp-button-link shape-fill-medium-btn article-list-loadmore">' + getloadMoreLabel + '</a></div>');
7549                }
7550                BIOG.articleListV2Utility._loadTilesOnLoadMore(filterObjArray, articleTileRes, $listwrapperEl, getMaxItems, articleTileRes, cursorEntireClick, tilesPerRow);
7551            }
7552        }
7553    },
7554    _displayAllItems: function (filterObjArray, articleTileRes, renderfilterObjArray, articleListArray, selectedFilter, $listwrapperEl, getMaxItems, cursorEntireClick, tilesPerRow, getloadMoreLabel) {
7555        if ($('.cmp-tile-btn-wrapper').length > 0) {
7556            $('.cmp-tile-btn-wrapper').remove();
7557        }
7558        if (filterObjArray) {
7559            filterObjArray = [];
7560            $('.cmp-tile-btn-wrapper').remove();
7561            $('.cmp-tile-list').each(function () {
7562                $(this).css('display', 'none');
7563            });
7564        } else {
7565            $('.cmp-tile-list').each(function () {
7566                $(this).css('display', 'block');
7567            });
7568        };
7569        articleListArray.filter(function (item) {
7570            filterObjArray.push(item);
7571        });
7572        if (!$('.category-filter .filter-item.selected').length > 0) {
7573            renderfilterObjArray = getMaxItems ? filterObjArray.splice(0, getMaxItems) : filterObjArray;
7574            BIOG.nextGenArtilceList._listView(renderfilterObjArray, articleTileRes, $listwrapperEl, getMaxItems, cursorEntireClick, tilesPerRow);
7575            if (filterObjArray.length > 0 && $($listwrapperEl).find('.cmp-tile-list').length > 0 && getMaxItems) {
7576                if (getloadMoreLabel !== '') {
7577                    $listwrapperEl.append('<div class="cmp-tile-btn-wrapper"><a href="javascript:void(0)" aria-label="link" class="cmp-button-link shape-fill-medium-btn article-list-loadmore">' + getloadMoreLabel + '</a></div>');
7578                }
7579                BIOG.articleListV2Utility._loadTilesOnLoadMore(filterObjArray, articleTileRes, $listwrapperEl, getMaxItems, articleTileRes, cursorEntireClick, tilesPerRow);
7580            }
7581        }
7582    },
7583    _listView: function(shuffledArray, articleTileRes, $listwrapperEl, getMaxItems, cursorEntireClick, tilesPerRow) {
7584        if (shuffledArray.length > 0) {
7585            $($listwrapperEl).find('.cmp-tile-list').removeClass('scrollMore');
7586            var flexPos;
7587            var allPromoTiles = $($listwrapperEl).find('.cmp-tile-list.flex-unit');
7588            var totalListTiles = articleTileRes["articleTiles"].length;
7589            if (articleTileRes["positions"] !== null) {
7590                flexPos = articleTileRes["positions"];
7591            }
7592            $($listwrapperEl).find('.cmp-tile-list-wrap').attr('list-size', totalListTiles);
7593            $($listwrapperEl).find('.cmp-tile-list-wrap').attr('tiles-per-row', tilesPerRow);
7594            $($listwrapperEl).find('.cmp-tile-list-wrap').attr('data-load-on-scroll', articleTileRes.loadOnScroll);	
7595            var modalPath = BIOG.mediaGalleryViewV2._mediaGalleryModalPath(articleTileRes);
7596            if(articleTileRes.showUnWatchedTiles){	
7597				 $($listwrapperEl).find('.cmp-tile-list-wrap').addClass('unwatched-watched-tiles-shuffle');	
7598            }
7599            for (var i = 0; i < shuffledArray.length; i++) {
7600                 if (allPromoTiles.length > 0 && shuffledArray[i].staticTile === true && !listFilterFlag) {
7601                	for (var j = 0; j < allPromoTiles.length;j++) {
7602	            		 var allPromoTilesPos= $(allPromoTiles[j]).data('flex-
7602position');
7603	            		 if(!$(allPromoTiles[j]).hasClass('showTile')){
7604	                		 var promoTile = allPromoTiles[j];
7605	                         allPromoTiles[j].remove();
7606	                         $($($listwrapperEl).find('.cmp-tile-list-wrap').append($(promoTile)));
7607	                         $(promoTile).addClass('showTile');
7608	                         break;
7609                         }
7610                    }
7611                } else {
7612                    var articlePagePath = shuffledArray[i].path || '';
7613                    var articleDesc = shuffledArray[i].paragraph ? shuffledArray[i].paragraph.trim(): '';
7614                    var articleTitle = shuffledArray[i].heading || '';
7615                    if(articleTitle){
7616                    	var ariaLableVal = articleTitle.replace(/[\!\@\#\$\%\^\&\*\)\(\+\=\.\<\>\{\}\[\]\:\;\'\"\|\~\`\_\-]/g, "");
7617                        ariaLableVal = ariaLableVal.split(" ").join('');
7618                    }
7619                    var imageUrl = BIOG.articleListV2Utility.addAttrToMarkUp(shuffledArray[i]);
7620                    var ctaDetails = BIOG.articleListV2Utility._getCtaTiles(shuffledArray[i], $listwrapperEl,articleTitle);
7621               		ctaDetails = ctaDetails ? ctaDetails : '';
7622                    if(shuffledArray[i].tagIds !== null){
7623                        var artileTag = shuffledArray[i].tagIds ? shuffledArray[i].tagIds.join(", ") : '';
7624                    }
7625                    var imageMarkup = BIOG.articleListV2Utility._imageMarkUpLazyEnabled($listwrapperEl,imageUrl,articleTitle);
7626                    var videoPath="";
7627                    if(shuffledArray[i].videoResourcePath ){
7628                    	  videoPath = shuffledArray[i].videoResourcePath+'.html' || '';
7629                    }
7630                    var dataArticleIdentifier = "";
7631                    if(shuffledArray[i].articleDeeplinkId){
7632                    	dataArticleIdentifier = shuffledArray[i].articleDeeplinkId;
7633                    }
7634					 var dataTranscriptPath = "";
7635                    if(shuffledArray[i].videoTranscriptPath){
7636                    	dataTranscriptPath = shuffledArray[i].videoTranscriptPath;
7637                    }
7638					 var cardVideoOverlay = shuffledArray[i].ctaOverlay  ? shuffledArray[i].ctaOverlay .trim(): '';
7639                    var artileRank = shuffledArray[i].rank || '';
7640                    var publishDate = shuffledArray[i].publishDate || '';
7641                    var createHtml = document.createElement('div');
7642                    var artileTagNames = shuffledArray[i].tags|| '';
7643                    createHtml.className = 'cmp-tile-list '+artileTagNames+'';
7644                    if (artileTag !== '') {
7645                        createHtml.setAttribute('data-tags', artileTag);
7646                    }
7647                    if (artileRank !== '') {
7648                        createHtml.setAttribute('data-rank', artileRank);
7649                    }
7650                    if (publishDate !== '') {
7651                        createHtml.setAttribute('publishdate', publishDate);
7652                    }
7653                    createHtml.innerHTML =
7654                    	'<div class="card cmp-card-tile ' + cursorEntireClick + '" data-article-identifier = "' + dataArticleIdentifier + '" data-transcript-path = "'+ dataTranscriptPath + '" data-video-playlistid = "'+i+'">' +
7655                        '<a class="media-gallery-modallink" aria-hidden="true" href= "'+modalPath+'"></a>'+
7656                        '<a aria-hidden="true" class="cmp-article-list-fullview-link" href="' + articlePagePath + '.html"></a>'+
7657                        '<a aria-label="'+ ariaLableVal +'" class="card-tile-img-link" href="' + articlePagePath + '.html">' +
7658                        imageMarkup +
7659                        '</a>' +
7660                        '<div class="card-body">' +
7661                        '<a aria-label="'+ ariaLableVal +'" href="' + articlePagePath + '.html" class="card-title">' + articleTitle + '</a>' +
7662                        '<div class="card-text">' + articleDesc + '</div>' + ctaDetails +
7663                        '<div class="card-video-overlay">' + cardVideoOverlay + '</div>' +
7664						' <a class="card-video-url" aria-hidden="true" href="' +  videoPath+'"></a>'+
7665                        '</div>' +
7666                        '<a class="data-personalization-url" aria-hidden="true" href="' + articlePagePath + '.html"></a>' +
7667                        '</div>';
7668                    $($listwrapperEl).find('.cmp-tile-list-wrap').append(createHtml);
7669                    if(articleTileRes.shuffle){
7670                    	$($listwrapperEl).find('.cmp-tile-list-wrap').attr('data-tiles-shuffle',articleTileRes.shuffle);
7671                    }
7672                    if(articleTileRes.maxItems){
7673                    	$($listwrapperEl).find('.cmp-tile-list-wrap').attr('data-max-items',articleTileRes.maxItems);
7674                    }
7675                    if ($listwrapperEl.find('.cmp-card-tile.cursorclick').length > 0) {
7676                        BIOG.options._entireTileClickable($('.cmp-card-tile.cursorclick'), '.cmp-article-list-fullview-link');
7677                    } else {
7678                        $listwrapperEl.find('.cmp-card-tile .cmp-article-list-fullview-link').remove();
7679                    }
7680                    if (articleTileRes.sectionView === "media-gallery-view") {
7681                    	BIOG.mediaGalleryViewV2._appendDataAttributes($($listwrapperEl.find('.media-gallery-modallink')));
7682                        BIOG.mediaGalleryViewV2._mediaTileClikable($($listwrapperEl.find('.media-gallery-tile')[mediaTileCounter]));
7683                    	mediaTileCounter++;
7684                   } else {                    	
7685	                   	if (articleTileRes.sectionView === "right-rail-view") {
7686	                   		$($listwrapperEl).addClass('cmp-right-rail-wrapper ' + articleTileRes.alignment + '');
7687	                   	}
7688                        if (articleTileRes.sectionView === "right-rail-view-video-playlist") {
7689	                   		$($listwrapperEl).addClass('cmp-right-rail-wrapper right-rail-view-video-playlist ' + articleTileRes.alignmentRRVideoPlaylist + '');
7690	                   	}
7691                  	    $listwrapperEl.find('.cmp-card-tile .media-gallery-modallink').remove();
7692                  	    $listwrapperEl.find('.cmp-card-tile .card-video-url').remove();
7693						$listwrapperEl.find('.cmp-card-tile .card-video-overlay').remove();
7694                  	    $listwrapperEl.find('.cmp-card-tile').removeAttr('data-article-identifier');
7695						$listwrapperEl.find('.cmp-card-tile').removeAttr('data-transcript-path');
7696                   }
7697                    BIOG.articleListV2Utility.addPersololizedAttr($($listwrapperEl).find('.cmp-tile-list-wrap'));
7698	            }
7699                articleTileCounter++;
7700            }
7701            $($listwrapperEl).find('.cmp-tile-list').last().addClass('scrollMore');
7702            // calculate the with and height of the tiles based on the markup 
7703            if((articleTileRes.sectionView !== "carousel-view") && (articleTileRes.sectionView !== "right-rail-view")){
7704            	BIOG.articleListV2Utility.calcWidthPerRow($listwrapperEl, tilesPerRow);
7705                BIOG.articleListV2Utility.calcTileMaxHeightPerRow($listwrapperEl, tilesPerRow);
7706            }
7707            if(articleTileCounter === articleTileRes['articleTiles'].length ){
7708				 $listwrapperEl.find('.cmp-tile-list').last().removeClass('scrollMore');
7709           }
7710            if (articleTileRes.sectionView === "right-rail-view-video-playlist") {
7711				BIOG.nextGenArtilceList._videoPlaylistViewSeo(shuffledArray, articleTileRes, $listwrapperEl);
7712                BIOG.nextGenArtilceList._bindArticleVideolist($listwrapperEl);
7713            }
7714           BIOG.personolizationHandler._init();
7715        }
7716    },
7717    _videoPlaylistViewSeo: function(shuffledArray, articleTileRes, $listwrapperEl) {
7718        $listwrapperEl.closest('body').find('.video-js-wrapper').addClass('articlelist-videojs-wrapper');
7719        $listwrapperEl.closest('body').find('.share-button').addClass('articlelist-videojs-share');
7720
7721        var videoPlaylistUrl = window.location.pathname.split('.')[0];
7722        var storedArray = JSON.parse(localStorage.getItem('videoplayListArticle'));
7723        $listwrapperEl.find('.cmp-tile-list').each(function(index) {
7724        	$(this).find('.card-tile-img-link .cmp-image').append('<span class="video-list-icon-status"></span>');
7725            var matchedArticleTile = $(this).find('.card-tile-img-link').attr('href').split('.html')[0];
7726            var matchedVideoTile = $(this).find('.card-tile-img-link').attr('href');
7727            // logic to show the completed status from localstorage
7728            if(localStorage && localStorage.getItem('videoplayListArticle')) {
7729                for (var i = 0; i < storedArray.length; i++) {
7730                    if(matchedVideoTile == storedArray[i]) {
7731                        $(this).find('.video-list-icon-status').addClass('completed');
7732                    }
7733                }
7734            }
7735            if(videoPlaylistUrl == matchedArticleTile) {
7736				$(this).find('.card-tile-img-link').addClass('selected');
7737                  var videoplaylistDescription = $('.card-tile-img-link.selected').closest('.cmp-tile-list').find('.card-text').text();
7738                  var videoplaylistTitle = $('.card-tile-img-link.selected').closest('.cmp-tile-list').find('.card-title').text();
7739                  var videoplaylistThumbnailUrl = $('.card-tile-img-link.selected').find('.cmp-image').attr('data-cmp-src');
7740                  var videoplaylistcontentUrl = $('.card-tile-img-link.selected').attr('href');
7741                  var videoplaylistuploadDate = $('.card-tile-img-link.selected').closest('.cmp-tile-list').attr('publishdate');
7742                  var currentVideoContentSeo = 
7743                    '<div itemprop="video" class="hidden" itemscope itemtype="https://schema.org/VideoObject">' +
7744                    '<h2 class="hidden" itemprop="name">'+videoplaylistTitle+'</h2>'+
7745                    '<meta itemprop="thumbnailUrl" content="'+videoplaylistThumbnailUrl+'" />' +
7746                    '<meta itemprop="contentUrl" content="'+videoplaylistcontentUrl+'" />' +
7747                    '<meta itemprop="uploadDate" content="'+videoplaylistuploadDate+'" />'+
7748                    '<span class="hidden" itemprop="description">'+videoplaylistDescription+'</span>'+ 
7749                    '</div>';
7750                	$(this).find('.card-tile-img-link.selected').closest('.cmp-tile-list').append(currentVideoContentSeo);
7751                	$('.articlelist-videojs-wrapper').find('video').trigger('play');
7752            }
7753            // show gradient color on right rail playlist
7754            $listwrapperEl.find('.cmp-tile-list-wrap').addClass('playlist-gradient-show');
7755            if($listwrapperEl.find('.cmp-tile-list:last-child .card-tile-img-link ').hasClass('selected')) {
7756				($listwrapperEl.find(".cmp-tile-list-wrap"))[0].scrollTop = ($listwrapperEl.find('.card-tile-img-link.selected')).offset().top - ($listwrapperEl.find('.cmp-tile-list-wrap').offset().top);
7757            }
7758
7759            $listwrapperEl.find('.cmp-tile-list-wrap').on('scroll', function() {
7760                var scrollTop = $(this).scrollTop();
7761                if ((scrollTop + $(this).innerHeight() + 2) >= this.scrollHeight) {
7762                    $listwrapperEl.find('.cmp-tile-list-wrap').removeClass('playlist-gradient-show');
7763                } else {
7764                    $listwrapperEl.find('.cmp-tile-list-wrap').addClass('playlist-gradient-show');
7765                }
7766            });
7767            // logic to anchor up the video player
7768            $('html, body').animate({
7769                scrollTop: $listwrapperEl.closest('body').find('.articlelist-videojs-wrapper').offset().top - 80
7770            }, 'slow');
7771            // autostart the video in the playlist
7772        });
7773    },
7774    _bindArticleVideolist: function($listwrapperEl) {
7775        $listwrapperEl.find('.cmp-tile-list').on('click', function(event) {
7776            event.preventDefault();
7777			event.stopPropagation();
7778            var videoUrl = $(this).find('.card-tile-img-link').attr('href');
7779            if(videoUrl) {
7780            	window.open(videoUrl, '_self');
7781            }
7782        });
7783    },
7784}
7785$(document).ready(function() {
7786    if ($('.cmp-tile-wrapper-v2').length > 0) {
7787        $('.cmp-tile-wrapper-v2').each(function() {
7788            BIOG.nextGenArtilceList._init($(this));
7789        });
7790    }
7791});
7792BIOG.notificationBanner = {
7793    _init: function($currentElement) {
7794        BIOG.notificationBanner._showNotificationBanner($currentElement);
7795        BIOG.notificationBanner._closeNotification($currentElement);
7796    },
7797    /*check sticky if exists for notification*/
7798    _checkNotificationContainerSticky: function() {
7799        var stickyNotificationVal = $('.notification-banner-bg').data('sticky-notification');
7800        if (stickyNotificationVal) {
7801            $('.cmp-notification').addClass('sticky');
7802            if(window.pageYOffset ===0){
7803                if(BIOG.promoBanner && BIOG.promoBanner._checkPromoContainerSticky()) {
7804                    $('body').css({
7805                        'padding-top': BIOG.notificationBanner._isnotificationContainerTop() + BIOG.promoBanner._ispromoContainerTop()
7806                    });
7807                }
7808                else {
7809					$('body').css({
7810                        'padding-top': BIOG.notificationBanner._isnotificationContainerTop()
7811                    });
7812                }
7813            }
7814            BIOG.notificationBanner._isnotificationContainerTop();
7815            return true;
7816        } else {
7817            $('.cmp-notification').removeClass('sticky');
7818            BIOG.notificationBanner._isnotificationContainerTop();
7819        }
7820    },
7821    /*calculate the outer height for notification*/
7822    _isnotificationContainerTop: function() {
7823        var topOuterHeightVal = 0;
7824        var $notificationContainerDiv = $('.notification-banner-bg').outerHeight();
7825        topOuterHeightVal = $notificationContainerDiv ? $notificationContainerDiv : topOuterHeightVal;
7826        return topOuterHeightVal;
7827    },
7828    /*generate cookie value based on author in notification*/
7829    generateCookieExpiryDays: function($currentElement) {
7830        var cookieExpiryVal = $currentElement.parents().find('.notification-banner-bg').data('cookie-expiry'),
7831            expiryDays;
7832        if (cookieExpiryVal !== undefined && cookieExpiryVal !== "session") {
7833            if (cookieExpiryVal === "never") {
7834                expiryDays = 3650;
7835            } else {
7836                expiryDays = parseInt(cookieExpiryVal);
7837            }
7838        }
7839        return expiryDays;
7840    },
7841    /*assign cookie value for notification*/
7842    assignCookieValues: function($currentElement, cookieName) {
7843        if ($currentElement.data('cookie-expiry') !== "session") {
7844            var cookieExpiryDate = BIOG.notificationBanner.generateCookieExpiryDays($currentElement);
7845            $.cookie(cookieName, 'true', {
7846                path: '/',
7847                expires: cookieExpiryDate
7848            });
7849        } else {
7850            $.cookie(cookieName, 'true', {
7851                path: '/'
7852            });
7853        }
7854    },
7855    /*create cookie for notification if its authored*/
7856    _createCookiesNotification: function($currentElement) {
7857        var cookieName = $currentElement.data('cookie-name');
7858        if (cookieName) {
7859            if ($currentElement.data('cookie-expiry') !== undefined) {
7860                BIOG.notificationBanner.assignCookieValues($currentElement, cookieName);
7861            } else {
7862                $.cookie(cookieName, 'true', {
7863                    path: '/'
7864                });
7865            }
7866        }
7867    },
7868    /*sets cookie for required notification*/
7869    _showNotificationBanner: function($currentElement) {
7870        if ($currentElement.data('create-cookie') && $currentElement.data('cookie-name')) {
7871            var isCookieExist = BIOG.notificationBanner._validateCookie($currentElement);
7872            if (!isCookieExist) {
7873                $currentElement.closest(".cmp-notification").removeClass('hidden');
7874            }
7875            else {
7876				$currentElement.closest(".cmp-notification").addClass('hidden');
7877            }
7878        }
7879        else {
7880			$currentElement.closest(".cmp-notification").removeClass('hidden');
7881        }
7882    },
7883    /*checks whether cookie exist or not in user's browser*/
7884    _validateCookie: function($currentElement) {
7885        var cookieName = $currentElement.data('cookie-name');
7886        return ($.cookie(cookieName)) ? true : false;
7887    },
7888    /*close the notification and create the cookie in user's browser*/
7889    _closeNotification: function($currentElement) {
7890        $(document).on('click', '.notification-close-icon', function() {
7891            $(".cmp-notification").addClass('hidden');
7892            /*reset all the headers sticky on close button click*/
7893            $currentElement.closest(".cmp-notification").addClass('hidden');
7894            $('.cmp-utilitynav-wrapper, #header-mainnav-wrapper, .header-mainnav-wrapper.sticky, .header-utilitynav-wrapper').css({
7895                'top': 0
7896            });
7897            $('body').css({
7898                'padding-top': 0
7899            });
7900            /*logic to set isi below header when notification banner is closed*/
7901            if(!BIOG.devices.isDesktop()){
7902    			addHeaderPadding();
7903    		}
7904            if ($('.cmp-utilitynav-wrapper').data('sticky-utilitynav')) {
7905                BIOG.utilityNav.isUtilityNavSticky();
7906            }
7907            /*create cookie on close button in user's browser*/
7908            if ($currentElement.data('create-cookie') && $currentElement.data('cookie-name')) {
7909                BIOG.notificationBanner._createCookiesNotification($currentElement);
7910            }
7911        });
7912    },
7913    /*function when notification container in mobile view*/
7914    cmpNotiMainNavMobile: function ($cmpUtilityNavWrapper, $headerSticky, $headerTopNavWrapper, $utilityNavCmp, options) {
7915        if (BIOG.notificationBanner._checkNotificationContainerSticky()) {
7916            if (!($cmpUtilityNavWrapper.hasClass('sticky')) && $headerSticky.hasClass('sticky-mobile-header')) {
7917                if($headerTopNavWrapper.outerHeight()) {
7918                	options['height'] = $headerTopNavWrapper.outerHeight();
7919                }
7920                else {
7921					options['height'] = BIOG.notificationBanner._isnotificationContainerTop();
7922                }
7923            } else if (!($cmpUtilityNavWrapper.hasClass('sticky')) && !($headerSticky.hasClass('sticky-mobile-header'))) {
7924                options['height'] = 'undefined';
7925            } else if ($cmpUtilityNavWrapper.hasClass('sticky') && $headerSticky.hasClass('sticky-mobile-header')) {
7926                options['height'] = $headerTopNavWrapper.outerHeight() - $utilityNavCmp.outerHeight();
7927            }
7928            BIOG.mainnav._makeMainNavSticky(options);
7929        } else {
7930            if (!($cmpUtilityNavWrapper.hasClass('sticky')) && $headerSticky.hasClass('sticky-mobile-header')) {
7931                options['height'] = $headerTopNavWrapper.outerHeight() + BIOG.notificationBanner._isnotificationContainerTop();
7932            }
7933            else {
7934                options['height'] = ($headerTopNavWrapper.outerHeight() - $utilityNavCmp.outerHeight()) + BIOG.notificationBanner._isnotificationContainerTop();
7935            }
7936            BIOG.mainnav._makeMainNavSticky(options);
7937        }
7938    },
7939    /*function when notification container in desktop view*/
7940    cmpNotiMainNavDesktop: function ($cmpUtilityNavWrapper, $cmpMainNavContainer, $headerTopNavWrapper, $mobileHeader, $utilityNavCmp, options) {
7941        if (BIOG.notificationBanner._checkNotificationContainerSticky()) {
7942            if (!($cmpUtilityNavWrapper.hasClass('sticky')) && $cmpMainNavContainer.hasClass('sticky-nav')) {
7943                if($headerTopNavWrapper.outerHeight()) {
7944                    options['height'] = $headerTopNavWrapper.outerHeight() + $mobileHeader.outerHeight();
7945                }
7946                else {
7947                    options['height'] = $mobileHeader.outerHeight();
7948                }
7949            } else if (!($cmpUtilityNavWrapper.hasClass('sticky')) && !($cmpMainNavContainer.hasClass('sticky-nav'))) {
7950                options['height'] = 'undefined';
7951            } else if ($cmpUtilityNavWrapper.hasClass('sticky') && $cmpMainNavContainer.hasClass('sticky-nav')) {
7952                if ($mobileHeader.css('display') == 'none') {
7953                    $mobileHeader.css('height', '0');
7954                }
7955                options['height'] = $mobileHeader.outerHeight() + ($headerTopNavWrapper.outerHeight() - $utilityNavCmp.outerHeight());
7956            }
7957            BIOG.mainnav._makeMainNavSticky(options);
7958        } else {
7959            if (($cmpUtilityNavWrapper.hasClass('sticky') && !($cmpMainNavContainer.hasClass('sticky-nav'))) || (!$cmpUtilityNavWrapper.hasClass('sticky') && !($cmpMainNavContainer.hasClass('sticky-nav')))) {
7960                options['height'] = 'undefined';
7961            } else if (!($cmpUtilityNavWrapper.hasClass('sticky') && $cmpMainNavContainer.hasClass('sticky-nav'))) {
7962                if ($headerTopNavWrapper.outerHeight()) {
7963                    options['height'] = $headerTopNavWrapper.outerHeight() + $mobileHeader.outerHeight() + BIOG.notificationBanner._isnotificationContainerTop() + BIOG.promoBanner._ispromoContainerTop();
7964                } else {
7965                    options['height'] = $mobileHeader.outerHeight() + BIOG.notificationBanner._isnotificationContainerTop() + BIOG.promoBanner._ispromoContainerTop();
7966                }
7967            } else if ($cmpUtilityNavWrapper.hasClass('sticky') && $cmpMainNavContainer.hasClass('sticky-nav')) {
7968                if ($mobileHeader.css('display') == 'none') {
7969                    $mobileHeader.css('height', '0');
7970                }
7971                options['height'] = $mobileHeader.outerHeight() + ($headerTopNavWrapper.outerHeight() - $utilityNavCmp.outerHeight()) + BIOG.notificationBanner._isnotificationContainerTop() + BIOG.promoBanner._ispromoContainerTop();
7972            }
7973            BIOG.mainnav._makeMainNavSticky(options);
7974        }
7975    }
7976}
7977$(document).ready(function() {
7978    if ($('.cmp-notification').length > 0) {
7979        BIOG.notificationBanner._init($('.notification-banner-bg'));
7980        $(window).on('load scroll resize', function() {
7981            BIOG.notificationBanner._checkNotificationContainerSticky();
7982        });
7983        if(!$('.container-ask-me').length) {
7984            $(window).on('load', function() {
7985                $('html').animate({scrollTop: $(window).scrollTop()});
7986           });
7987        }
7988    }
7989});
7990var videoPlayerIdList = [];
7991BIOG.Video = {
7992    _fetchCtaOverlay: function(currentVideoItem) {
7993        //show the CTA video overlay when video complete
7994        jwplayer(currentVideoItem).onComplete(function() {
7995            if ($('.cmp-video .cta-video-overlay').length > 0) {
7996            	$('#' + currentVideoItem).closest('.cmp-video').find('.cta-vi
7996deo-overlay').show();
7997            }
7998        });
7999        jwplayer(currentVideoItem).onPlay(function() {
8000            if ($('.cmp-video .cta-video-overlay').length > 0) {
8001                $('#' + currentVideoItem).closest('.cmp-video').find('.cta-video-overlay').hide();
8002            }
8003        });
8004        // Method to get the jwplayer fullscreen
8005        jwplayer(currentVideoItem).on('fullscreen', function(el) {
8006            if ($('.cmp-video .cta-video-overlay').length > 0) {
8007                if (el.fullscreen) {
8008                    var fullscreenOverlay = $('#' + currentVideoItem).closest('.cmp-video').find('.video-overlay').clone();
8009                    $('#' + currentVideoItem).append(fullscreenOverlay);
8010                } else {
8011                    $('#' + currentVideoItem).find('.video-overlay').remove();
8012                }
8013            }
8014        });
8015    },
8016    _videoOnLoad: function(currentVideoItem) {
8017        var currentVideoItem;
8018        var currentVideoId = [];
8019        $('.cmp-video').each(function() {
8020            var divElem = $(this).find('div')[0];
8021            currentVideoItem = $(divElem).attr('id');
8022            currentVideoId.push(currentVideoItem);
8023            BIOG.Video._fetchCtaOverlay(currentVideoItem);
8024        });
8025        videoPlayerIdList = currentVideoId; // store all video id in array
8026
8027        $("#genericLightbox").on('show.bs.modal', function(e) {
8028            if ($('.cmp-video .cta-video-overlay').length > 0) {
8029                jwplayer(currentVideoItem).setup(options);
8030                BIOG.Video._fetchCtaOverlay(currentVideoItem);
8031            }
8032        }); 
8033    
8034        $("#genericLightbox").on('hide.bs.modal', function(e) {
8035            if ($('.cmp-video .cta-video-overlay').length > 0) {
8036                jwplayer(currentVideoItem).remove(); 
8037                $("#" + currentVideoItem).closest(".cmp-video").find(".cta-video-overlay").hide();
8038            }
8039        });
8040
8041        if ($('#genericLightbox .modal-content').length && ((typeof jwplayer(currentVideoItem) === 'undefined') || (jwplayer(currentVideoItem).qoe().setupTime === null))) {
8042            setTimeout(BIOG.Video._videoOnLoad, 100);
8043            return;
8044        }
8045    }
8046}
8047$(document).ready(function() {
8048    if ($('.cmp-video').length > 0) {
8049        BIOG.Video._videoOnLoad();
8050        $('.cmp-video').on('click', function(){
8051            if(videoPlayerIdList.length > 0) {
8052                var currentVideoItem = $(this).find('.jwplayer').attr('id');
8053                videoPlayerIdList.forEach(function (item, el) {
8054                    videoPlayStatus = jwplayer(item).getState();
8055                    if((videoPlayStatus=='playing') && (item !== currentVideoItem)) {
8056                        jwplayer(item).pause();
8057                    }
8058                });
8059            }
8060        })
8061    }
8062});
8063BIOG.interactiveTranscript = {
8064	_init: function ($currentElement) {
8065		var chapters = [],
8066			captions = [],
8067			caption = -1,
8068			matches = [],
8069			query = "",
8070			cycle = -1,
8071			transcriptId = $currentElement.find('.transcript').attr('id'),
8072			captionId = $currentElement.find('.sidebar').attr('id'),
8073			searchId = $currentElement.find('.search').attr('id'),
8074			matchId = $currentElement.find('.match').attr('id'),
8075			transcript = document.getElementById(transcriptId),
8076			search = document.getElementById(searchId),
8077			match = document.getElementById(matchId),
8078			captionsPath = $currentElement.find('.sidebar').data('captionspath'),
8079			chaptersPath = $currentElement.find('.sidebar').data('chapterspath'),
8080			$targetVideoTranscript = $currentElement.parents().find('.cmp-video[data-taggedid="' + $currentElement.attr('data-taggedid') + '"]');
8081
8082		var currentVideoElement = $targetVideoTranscript.find('div')[0],
8083			currentVideoId = $(currentVideoElement).attr('id');
8084
8085		var $videoWrappertag = $('.video-js-wrapper[data-videojs-taggedid="' + $currentElement.attr('data-taggedid') + '"]');
8086        var $playerContainer = $videoWrappertag.find('.video-js');
8087        var playerId = $playerContainer.attr('id');
8088
8089
8090		Promise.all([new Promise(function (resolve) {
8091			return BIOG.interactiveTranscript.fetchTranscriptAjax(captionsPath, resolve)
8092		}), new Promise(function (resolve) {
8093			return BIOG.interactiveTranscript.fetchTranscriptAjax(chaptersPath, resolve)
8094		})]).then(function (textData) {
8095			return textData.map(function (t) {
8096    			return t
8097        			.replace(/\r/g, "")
8098        			.split('\n\n')
8099        			.filter(block => block.includes('-->')) 
8100        			.map(parse);
8101			});
8102		}).then(function (parsedData) {
8103			captions = parsedData[0];
8104			chapters = parsedData[1];
8105			loadCaptions();
8106		});
8107
8108		function loadCaptions() {
8109			var h = "<p>";
8110			var section = 0;
8111			captions.forEach(function (caption, i) {
8112				if (section < chapters.length && caption.begin > chapters[section].begin) {
8113					h += "</p><h4>" + chapters[section].text + "</h4><p>";
8114					section++;
8115				}
8116
8117				h += "<span id=\"caption".concat(captionId).concat(i, "\">").concat(caption.text, "</span>");
8118			});
8119			transcript.innerHTML = h + "</p>";
8120		}
8121
8122		function parse(d) {
8123			var a = d.split('\n');
8124			var i = a[1].indexOf(' --> ');
8125			var t = a[2];
8126
8127			if (a[3]) {
8128				t += " " + a[3];
8129			}
8130
8131			t = t.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
8132			return {
8133				begin: seconds(a[1].substr(0, i)),
8134				btext: a[1].substr(3, i - 7),
8135				end: seconds(a[1].substr(i + 5)),
8136				text: t
8137			};
8138		}
8139
8140		function seconds(s) {
8141			var a = s.split(':');
8142			var r = Number(a[a.length - 1]) + Number(a[a.length - 2]) * 60;
8143
8144			if (a.length > 2) {
8145				r += Number(a[a.length - 3]) * 3600;
8146			}
8147
8148			return r;
8149		} // Highlight current caption and chapter
8150
8151        //videojs
8152		var player = videojs(playerId);
8153		player.on('timeupdate', function () {
8154    		var p = player.currentTime();
8155
8156    		for (var j = 0; j < captions.length; j++) {
8157				if (captions[j].begin < p && captions[j].end > p) {
8158					if (j != caption) {
8159						var c = document.getElementById("caption".concat(captionId).concat(j));
8160
8161						if (caption > -1) {
8162							document.getElementById("caption".concat(captionId).concat(caption)).className = "";
8163						}
8164
8165						c.className = "current";
8166
8167						if (query == "") {
8168							transcript.scrollTop = c.offsetTop - transcript.offsetTop - 40;
8169						}
8170
8171						caption = j;
8172					}
8173
8174					break;
8175				}
8176			}
8177		});
8178
8179        transcript.addEventListener('click', function (e) {
8180    		if (e.target.id.indexOf('caption') === 0) {
8181        		var i = Number(e.target.id.replace('caption'.concat(captionId), ''));
8182        		player.currentTime(captions[i].begin);
8183        		if (player.paused()) {
8184            		player.play();
8185        		}
8186    		}
8187		});
8188
8189		search.addEventListener('focus', function () {
8190			return setTimeout(function () {
8191				return search.select();
8192			}, 100);
8193		});
8194
8195		search.addEventListener('keydown', function (e) {
8196			switch (e.key) {
8197				case 'Escape':
8198				case 'Esc':
8199					resetSearch();
8200					break;
8201
8202				case 'Enter':
8203					var q = this.value.toLowerCase();
8204
8205					if (q.length) {
8206						if (q === query) {
8207							var thisCycle;
8208
8209							if (e.shiftKey) {
8210								thisCycle = cycle <= 0 ? matches.length - 1 : cycle - 1;
8211							} else {
8212								thisCycle = cycle >= matches.length - 1 ? 0 : cycle + 1;
8213							}
8214
8215							cycleSearch(thisCycle);
8216							return;
8217						}
8218
8219						resetSearch();
8220						searchTranscript(q);
8221						return;
8222					}
8223
8224					resetSearch();
8225					break;
8226
8227				default: // none
8228
8229			}
8230		});
8231
8232		var sanitizeRegex = function sanitizeRegex(q) {
8233			return q.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
8234		}; // Execute search
8235
8236
8237		function searchTranscript(q) {
8238			matches = [];
8239			query = q;
8240			captions.forEach(function (_ref, loc) {
8241				var text = _ref.text;
8242				var matchSpot = text.toLowerCase().indexOf(q);
8243
8244				if (matchSpot > -1) {
8245					var replacer = sanitizeRegex(q);
8246					document.getElementById("caption".concat(captionId).concat(loc)).innerHTML = text.replace(new RegExp("(".concat(replacer, ")"), 'gi'), "<em>$1</em>");
8247					matches.push(loc);
8248				}
8249			});
8250
8251			if (matches.length) {
8252				cycleSearch(0);
8253			} else {
8254				resetSearch();
8255			}
8256		};
8257
8258		function cycleSearch(i) {
8259			if (cycle > -1) {
8260				var o = document.getElementById("caption".concat(captionId).concat(matches[cycle]));
8261				o.querySelector('em').classList.remove('current');
8262			}
8263
8264			var c = document.getElementById("caption".concat(captionId).concat(~~matches[i]));
8265			c.querySelector('em').classList.add('current');
8266			match.textContent = "".concat(i + 1, " of ").concat(matches.length);
8267			transcript.scrollTop = c.offsetTop - transcript.offsetTop - 40;
8268			cycle = i;
8269		};
8270
8271		function resetSearch() {
8272			if (matches.length) {
8273				captions.forEach(function (caption, i) {
8274					document.getElementById("caption".concat(captionId).concat(~~i)).textContent = caption.text;
8275				});
8276			}
8277
8278			query = "";
8279			matches = [];
8280			match.textContent = "0 of 0";
8281			cycle = -1;
8282			transcript.scrollTop = 0;
8283		};
8284	},
8285
8286	fetchTranscriptAjax: function (urlPath, resolve) {
8287		$.ajax({
8288			url: urlPath,
8289			success: function (response) {
8290				resolve(response);
8291			}
8292		}).then(function (r) {
8293			return $(r).text();
8294		}).then(function (t) {
8295			return resolve(t);
8296		});
8297	}
8298}
8299$(document).ready(function () {
8300	if ($('.cmp-interactive-transcript').length) {
8301		$('.cmp-interactive-transcript').each(function () {
8302			BIOG.interactiveTranscript._init($(this));
8303		});
8304	}
8305});
8306BIOG.Recaptcha = {
8307    _validateCaptchaResponse : function($captchaEl) {
8308            var v = grecaptcha.getResponse();
8309            if (v.length <= 0) {
8310                var errMsg = $captchaEl.data('no-captcha-err');
8311                $captchaEl.next().html(errMsg);
8312                return false;
8313            } else {
8314                return true;
8315            }
8316
8317        }
8318}
8319// Method to remove the error message for valid recaptcha
8320function validateErrRecaptcha() {
8321    if (BIOG.Recaptcha._validateCaptchaResponse()) {
8322        $('.captcha-alert').html('');
8323    }
8324}
8325/*******************************************************************************
8326 * Copyright 2020 Adobe
8327 *
8328 * Licensed under the Apache License, Version 2.0 (the "License");
8329 * you may not use this file except in compliance with the License.
8330 * You may obtain a copy of the License at
8331 *
8332 *     http://www.apache.org/licenses/LICENSE-2.0
8333 *
8334 * Unless required by applicable law or agreed to in writing, software
8335 * distributed under the License is distributed on an "AS IS" BASIS,
8336 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8337 * See the License for the specific language governing permissions and
8338 * limitations under the License.
8339 ******************************************************************************/
8340(function() {
8341    "use strict";
8342
8343    var NS = "cmp";
8344    var IS = "pdfviewer";
8345    var SDK_URL = "https://acrobatservices.adobe.com/view-sdk/viewer.js";
8346    var SDK_READY_EVENT = "adobe_dc_view_sdk.ready";
8347
8348    var selectors = {
8349        self: "[data-" + NS + '-is="' + IS + '"]',
8350        sdkScript: 'script[src="' + SDK_URL + '"]'
8351    };
8352
8353    function initSDK() {
8354        var sdkIncluded = document.querySelectorAll(selectors.sdkScript).length > 0;
8355        if (!window.adobe_dc_view_sdk && !sdkIncluded) {
8356            var dcv = document.createElement("script");
8357            dcv.type = "text/javascript";
8358            dcv.src = SDK_URL;
8359            document.body.appendChild(dcv);
8360        }
8361    }
8362
8363    function previewPdf(component) {
8364        // prevents multiple initialization
8365        component.removeAttribute("data-" + NS + "-is");
8366
8367        // add the view sdk to the page
8368        initSDK();
8369
8370        // manage the preview
8371        if (component.dataset && component.id) {
8372            if (window.AdobeDC && window.AdobeDC.View) {
8373                dcView(component);
8374            } else {
8375                document.addEventListener(SDK_READY_EVENT, function() {
8376                    dcView(component);
8377                });
8378            }
8379        }
8380    }
8381
8382    function dcView(component) {
8383        var adobeDCView = new window.AdobeDC.View({
8384            clientId: component.dataset.cmpClientId,
8385            divId: component.id + "-content",
8386            reportSuiteId: component.dataset.cmpReportSuiteId,
8387            locale: typeof Granite !== "undefined" && Granite && Granite.I18n ? Granite.I18n.getLocale() : navigator.language || navigator.userLanguage
8388        });
8389        adobeDCView.previewFile({
8390            content: { location: { url: component.dataset.cmpDocumentPath } },
8391            metaData: { fileName: component.dataset.cmpDocumentFileName }
8392        }, JSON.parse(component.dataset.cmpViewerConfigJson));
8393    }
8394
8395    /**
8396     * Document ready handler and DOM mutation observers. Initializes Accordion components as necessary.
8397     *
8398     * @private
8399     */
8400    function onDocumentReady() {
8401        var elements = document.querySelectorAll(selectors.self);
8402        for (var i = 0; i < elements.length; i++) {
8403            previewPdf(elements[i]);
8404        }
8405
8406        var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
8407        var body = document.querySelector("body");
8408        var observer = new MutationObserver(function(mutations) {
8409            mutations.forEach(function(mutation) {
8410                // needed for IE
8411                var nodesArray = [].slice.call(mutation.addedNodes);
8412                if (nodesArray.length > 0) {
8413                    nodesArray.forEach(function(addedNode) {
8414                        if (addedNode.querySelectorAll) {
8415                            var elementsArray = [].slice.call(addedNode.querySelectorAll(selectors.self));
8416                            elementsArray.forEach(function(element) {
8417                                previewPdf(element);
8418                            });
8419                        }
8420                    });
8421                }
8422            });
8423        });
8424
8425        observer.observe(body, {
8426            subtree: true,
8427            childList: true,
8428            characterData: true
8429        });
8430
8431    }
8432
8433    if (document.readyState !== "loading") {
8434        onDocumentReady();
8435    } else {
8436        document.addEventListener("DOMContentLoaded", onDocumentReady);
8437    }
8438}());
8439
8440/*******************************************************************************
8441 * Copyright 2017 Adobe
8442 *
8443 * Licensed under the Apache License, Version 2.0 (the "License");
8444 * you may not use this file except in compliance with the License.
8445 * You may obtain a copy of the License at
8446 *
8447 *     http://www.apache.org/licenses/LICENSE-2.0
8448 *
8449 * Unless required by applicable law or agreed to in writing, software
8450 * distributed under the License is distributed on an "AS IS" BASIS,
8451 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8452 * See the License for the specific language governing permissions and
8453 * limitations under the License.
8454 ******************************************************************************/
8455(function() {
8456    "use strict";
8457
8458    var NS = "cmp";
8459    var IS = "search";
8460
8461    var DELAY = 300; // time before fetching new results when the user is typing a search string
8462    var LOADING_DISPLAY_DELAY = 300; // minimum time during which the loading indicator is displayed
8463    var PARAM_RESULTS_OFFSET = "resultsOffset";
8464
8465    var keyCodes = {
8466        TAB: 9,
8467        ENTER: 13,
8468        ESCAPE: 27,
8469        ARROW_UP: 38,
8470        ARROW_DOWN: 40
8471    };
8472
8473    var selectors = {
8474        self: "[data-" + NS + '-is="' + IS + '"]',
8475        item: {
8476            self: "[data-" + NS + "-hook-" + IS + '="item"]',
8477            title: "[data-" + NS + "-hook-" + IS + '="itemTitle"]',
8478            focused: "." + NS + "-search__item--is-focused"
8479        }
8480    };
8481
8482    var properties = {
8483        /**
8484         * The minimum required length of the search term before results are fetched.
8485         *
8486         * @memberof Search
8487         * @type {Number}
8488         * @default 3
8489         */
8490        minLength: {
8491            "default": 3,
8492            transform: function(value) {
8493                value = parseFloat(value);
8494                return isNaN(value) ? null : value;
8495            }
8496        },
8497        /**
8498         * The maximal number of results fetched by a search request.
8499         *
8500         * @memberof Search
8501         * @type {Number}
8502         * @default 10
8503         */
8504        resultsSize: {
8505            "default": 10,
8506            transform: function(value) {
8507                value = parseFloat(value);
8508                return isNaN(value) ? null : value;
8509            }
8510        }
8511    };
8512
8513    var idCount = 0;
8514
8515    function readData(element) {
8516        var data = element.dataset;
8517        var options = [];
8518        var capitalized = IS;
8519        capitalized = capitalized.charAt(0).toUpperCase() + capitalized.slice(1);
8520        var reserved = ["is", "hook" + capitalized];
8521
8522        for (var key in data) {
8523            if (Object.prototype.hasOwnProperty.call(data, key)) {
8524                var value = data[key];
8525
8526                if (key.indexOf(NS) === 0) {
8527                    key = key.slice(NS.length);
8528                    key = key.charAt(0).toLowerCase() + key.substring(1);
8529
8530                    if (reserved.indexOf(key) === -1) {
8531                        options[key] = value;
8532                    }
8533                }
8534            }
8535        }
8536
8537        return options;
8538    }
8539
8540    function toggleShow(element, show) {
8541        if (element) {
8542            if (show !== false) {
8543                element.style.display = "block";
8544                element.setAttribute("aria-hidden", false);
8545            } else {
8546                element.style.display = "none";
8547                element.setAttribute("aria-hidden", true);
8548            }
8549        }
8550    }
8551
8552    function serialize(form) {
8553        var query = [];
8554        if (form && form.elements) {
8555            for (var i = 0; i < form.elements.length; i++) {
8556                var node = form.elements[i];
8557                if (!node.disabled && node.name) {
8558                    var param = [node.name, encodeURIComponent(node.value)];
8559                    query.push(param.join("="));
8560                }
8561            }
8562        }
8563        return query.join("&");
8564    }
8565
8566    function mark(node, regex) {
8567        if (!node || !regex) {
8568            return;
8569        }
8570
8571        // text nodes
8572        if (node.nodeType === 3) {
8573            var nodeValue = node.nodeValue;
8574            var match = regex.exec(nodeValue);
8575
8576            if (nodeValue && match) {
8577                var element = document.createElement("mark");
8578                element.className = NS + "-search__item-mark";
8579                element.appendChild(document.createTextNode(match[0]));
8580
8581                var after = node.splitText(match.index);
8582                after.nodeValue = after.nodeValue.substring(match[0].length);
8583                node.parentNode.insertBefore(element, after);
8584            }
8585        } else if (node.hasChildNodes()) {
8586            for (var i = 0; i < node.childNodes.length; i++) {
8587                // recurse
8588                mark(node.childNodes[i], regex);
8589            }
8590        }
8591    }
8592
8593    function Search(config) {
8594        if (config.element) {
8595            // prevents multiple initialization
8596            config.element.removeAttribute("data-" + NS + "-is");
8597        }
8598
8599        this._cacheElements(config.element);
8600        this._setupProperties(config.options);
8601
8602        this._action = this._elements.form.getAttribute("action");
8603        this._resultsOffset = 0;
8604        this._hasMoreResults = true;
8605
8606        this._elements.input.addEventListener("input", this._onInput.bind(this));
8607        this._elements.input.addEventListener("focus", this._onInput.bind(this));
8608        this._elements.input.addEventListener("keydown", this._onKeydown.bind(this));
8609        this._elements.clear.addEventListener("click", this._onClearClick.bind(this));
8610        document.addEventListener("click", this._onDocumentClick.bind(this));
8611        this._elements.results.addEventListener("scroll", this._onScroll.bind(this));
8612
8613        this._makeAccessible();
8614    }
8615
8616    Search.prototype._displayResults = function() {
8617        if (this._elements.input.value.length === 0) {
8618            toggleShow(this._elements.clear, false);
8619            this._cancelResults();
8620        } else if (this._elements.input.value.length < this._properties.minLength) {
8621            toggleShow(this._elements.clear, true);
8622        } else {
8623            this._updateResults();
8624            toggleShow(this._elements.clear, true);
8625        }
8626    };
8627
8628    Search.prototype._onScroll = function(event) {
8629        // fetch new results when the results to be scrolled down are less than the visible results
8630        if (this._elements.results.scrollTop + 2 * this._elements.results.clientHeight >= this._elements.results.scrollHeight) {
8631            this._resultsOffset += this._properties.resultsSize;
8632            this._displayResults();
8633        }
8634    };
8635
8636    Search.prototype._onInput = function(event) {
8637        var self = this;
8638        self._cancelResults();
8639        // start searching when the search term reaches the minimum length
8640        this._timeout = setTimeout(function() {
8641            self._displayResults();
8642        }, DELAY);
8643    };
8644
8645    Search.prototype._onKeydown = function(event) {
8646        var self = this;
8647
8648        switch (event.keyCode) {
8649            case keyCodes.TAB:
8650                if (self._resultsOpen()) {
8651                    toggleShow(self._elements.results, false);
8652                    self._elements.input.setAttribute("aria-expanded", "false");
8653                }
8654                break;
8655            case keyCodes.ENTER:
8656                event.preventDefault();
8657                if (self._resultsOpen()) {
8658                    var focused = self._elements.results.querySelector(selectors.item.focused);
8659                    if (focused) {
8660                        focused.click();
8661                    }
8662                }
8663                break;
8664            case keyCodes.ESCAPE:
8665                self._cancelResults();
8666                break;
8667            case keyCodes.ARROW_UP:
8668                if (self._resultsOpen()) {
8669                    event.preventDefault();
8670                    self._stepResultFocus(true);
8671                }
8672                break;
8673            case keyCodes.ARROW_DOWN:
8674                if (self._resultsOpen()) {
8675                    event.preventDefault();
8676                    self._stepResultFocus();
8677                } else {
8678                    // test the input and if necessary fetch and display the results
8679                    self._onInput();
8680                }
8681                break;
8682            default:
8683                return;
8684        }
8685    };
8686
8687    Search.prototype._onClearClick = function(event) {
8688        event.preventDefault();
8689        this._elements.input.value = "";
8690        toggleShow(this._elements.clear, false);
8691        toggleShow(this._elements.results, false);
8692        this._elements.input.setAttribute("aria-expanded", "false");
8693    };
8694
8695    Search.prototype._onDocumentClick = function(event) {
8696        var inputContainsTarget =  this._elements.input.contains(event.target);
8697        var resultsContainTarget = this._elements.results.contains(event.target);
8698
8699        if (!(inputContainsTarget || resultsContainTarget)) {
8700            toggleShow(this._elements.results, false);
8701            this._elements.input.setAttribute("aria-expanded", "false");
8702        }
8703    };
8704
8705    Search.prototype._resultsOpen = function() {
8706        return this._elements.results.style.display !== "none";
8707    };
8708
8709    Search.prototype._makeAccessible = function() {
8710        var id = NS + "-search-results-" + idCount;
8711        this._elements.input.setAttribute("aria-owns", id);
8712        this._elements.results.id = id;
8713        idCount++;
8714    };
8715
8716    Search.prototype._generateItems = function(data, results) {
8717        var self = this;
8718
8719        data.forEach(function(item) {
8720            var el = document.createElement("span");
8721            el.innerHTML = self._elements.itemTemplate.innerHTML;
8722            el.querySelectorAll(selectors.item.title)[0].appendChild(document.createTextNode(item.title));
8723            el.querySelectorAll(selectors.item.self)[0].setAttribute("href", self._safeHref(item.url));
8724            results.innerHTML += el.innerHTML;
8725        });
8726    };
8727
8728    Search.prototype._safeHref = function(href) {
8729        var a = document.createElement("a");
8730        a.href = href;
8731        return a.pathname;
8732    };
8733
8734    Search.prototype._markResults = function() {
8735        var nodeList = this._elements.results.querySelectorAll(selectors.item.self);
8736        var escapedTerm = this._elements.input.value.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
8737        var regex = new RegExp("(" + escapedTerm + ")", "gi");
8738
8739        for (var i = this._resultsOffset - 1; i < nodeList.length; ++i) {
8740            var result = nodeList[i];
8741            mark(result, regex);
8742        }
8743    };
8744
8745    Search.prototype._stepResultFocus = function(reverse) {
8746        var results = this._elements.results.querySelectorAll(selectors.item.self);
8747        var focused = this._elements.results.querySelector(selectors.item.focused);
8748        var newFocused;
8749        var index = Array.prototype.indexOf.call(results, focused);
8750        var focusedCssClass = NS + "-search__item--is-focused";
8751
8752        if (results.length > 0) {
8753
8754            if (!reverse) {
8755                // highlight the next result
8756                if (index < 0) {
8757                    results[0].classList.add(focusedCssClass);
8758                    results[0].setAttribute("aria-selected", "true");
8759                } else if (index + 1 < results.length) {
8760                    results[index].classList.remove(focusedCssClass);
8761                    results[index].setAttribute("aria-selected", "false");
8762                    results[index + 1].classList.add(focusedCssClass);
8763                    results[index + 1].setAttribute("aria-selected", "true");
8764                }
8765
8766                // if the last visible result is partially hidden, scroll up until it's completely visible
8767                newFocused = this._elements.results.querySelector(selectors.item.focused);
8768                if (newFocused) {
8769                    var bottomHiddenHeight = newFocused.offsetTop + newFocused.offsetHeight - this._elements.results.scrollTop - this._elements.results.clientHeight;
8770                    if (bottomHiddenHeight > 0) {
8771                        this._elements.results.scrollTop += bottomHiddenHeight;
8772                    } else {
8773                        this._onScroll();
8774                    }
8775                }
8776
8777            } else {
8778                // highlight the previous result
8779                if (index >= 1) {
8780                    results[index].classList.remove(focusedCssClass);
8781                    results[index].setAttribute("aria-selected", "false");
8782                    results[index - 1].classList.add(focusedCssClass);
8783                    results[index - 1].setAttribute("aria-selected", "true");
8784                }
8785
8786                // if the first visible result is partially hidden, scroll down until it's completely visible
8787                newFocused = this._elements.results.querySelector(selectors.item.focused);
8788                if (newFocused) {
8789                    var topHiddenHeight = this._elements.results.scrollTop - newFocused.offsetTop;
8790                    if (topHiddenHeight > 0) {
8791                        this._elements.results.scrollTop -= topHiddenHeight;
8792                    }
8793                }
8794            }
8795        }
8796    };
8797
8798    Search.prototype._updateResults = function() {
8799        var self = this;
8800        if (self._hasMoreResults) {
8801            var request = new XMLHttpRequest();
8802            var url = self._action + "?" + serialize(self._elements.form) + "&" + PARAM_RESULTS_OFFSET + "=" + self._resultsOffset;
8803
8804            request.open("GET", url, true);
8805            request.onload = function() {
8806                // when the results are loaded: hide the loading indicator and display the search icon after a minimum period
8807                setTimeout(function() {
8808                    toggleShow(self._elements.loadingIndicator, false);
8809                    toggleShow(self._elements.icon, true);
8810                }, LOADING_DISPLAY_DELAY);
8811                if (request.status >= 200 && request.status < 400) {
8812                    // success status
8813                    var data = JSON.parse(request.responseText);
8814                    if (data.length > 0) {
8815                        self._generateItems(data, self._elements.results);
8816                        self._markResults();
8817                        toggleShow(self._elements.results, true);
8818                        self._elements.input.setAttribute("aria-expanded", "true");
8819                    } else {
8820                        self._hasMoreResults = false;
8821                    }
8822                    // the total number of results is not a multiple of the fetched results:
8823                    // -> we reached the end of the query
8824                    if (self._elements.results.querySelectorAll(selectors.item.self).length % self._properties.resultsSize > 0) {
8825                        self._hasMoreResults = false;
8826                    }
8827                } else {
8828                    // error status
8829                }
8830            };
8831            // when the results are loading: display the loading indicator and hide the search icon
8832            toggleShow(self._elements.loadingIndicator, true);
8833            toggleShow(self._elements.icon, false);
8834            request.send();
8835        }
8836    };
8837
8838    Search.prototype._cancelResults = function() {
8839        clearTimeout(this._timeout);
8840        this._elements.results.scrollTop = 0;
8841        this._resultsOffset = 0;
8842        this._hasMoreResults = true;
8843        this._elements.results.innerHTML = "";
8844        this._elements.input.setAttribute("aria-expanded", "false");
8845    };
8846
8847    Search.prototype._cacheElements = function(wrapper) {
8848        this._elements = {};
8849        this._elements.self = wrapper;
8850        var hooks = this._elements.self.querySelectorAll("[data-" + NS + "-hook-" + IS + "]");
8851
8852        for (var i = 0; i < hooks.length; i++) {
8853            var hook = hooks[i];
8854            var capitalized = IS;
8855            capitalized = capitalized.charAt(0).toUpperCase() + capitalized.slice(1);
8856            var key = hook.dataset[NS + "Hook" + capitalized];
8857            this._elements[key] = hook;
8858        }
8859    };
8860
8861    Search.prototype._setupProperties = function(options) {
8862        this._properties = {};
8863
8864        for (var key in properties) {
8865            if (Object.prototype.hasOwnProperty.call(properties, key)) {
8866                var property = properties[key];
8867                if (options && options[key] != null) {
8868                    if (property && typeof property.transform === "function") {
8869                        this._properties[key] = property.transform(options[key]);
8870                    } else {
8871                        this._properties[key] = options[key];
8872                    }
8873                } else {
8874                    this._properties[key] = properties[key]["default"];
8875                }
8876            }
8877        }
8878    };
8879
8880    function onDocumentReady() {
8881        var elements = document.querySelectorAll(selectors.self);
8882        for (var i = 0; i < elements.length; i++) {
8883            new Search({ element: elements[i], options: readData(elements[i]) });
8884        }
8885
8886        var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
8887        var body = document.querySelector("body");
8888        var observer = new MutationObserver(function(mutations) {
8889            mutations.forEach(function(mutation) {
8890                // needed for IE
8891                var nodesArray = [].slice.call(mutation.addedNodes);
8892                if (nodesArray.length > 0) {
8893                    nodesArray.forEach(function(addedNode) {
8894                        if (addedNode.querySelectorAll) {
8895                            var elementsArray = [].slice.call(addedNode.querySelectorAll(selectors.self));
8896                            elementsArray.forEach(function(element) {
8897                                new Search({ element: element, options: readData(element) });
8898                            });
8899                        }
8900                    });
8901                }
8902            });
8903        });
8904
8905        observer.observe(body, {
8906            subtree: true,
8907            childList: true,
8908            characterData: true
8909        });
8910    }
8911
8912    if (document.readyState !== "loading") {
8913        onDocumentReady();
8914    } else {
8915        document.addEventListener("DOMContentLoaded", onDocumentReady);
8916    }
8917
8918})();
8919
8920BIOG.referenceContainer = {
8921    _init: function($refEl,currentPagePath,currentNodePaths) {
8922        BIOG.referenceContainer._appendMarkUp($refEl,currentPagePath,currentNodePaths);
8923    },
8924    _appendMarkUp: function($refEl,currentPagePath,currentNodePaths) {
8925        var currentNodepath =currentNodePaths.split(",");
8926        var dataObj;
8927        dataObj = {
8928            'serviceTags': 'biogen-systems:biogen-services/dxp-reference-service',
8929            'currentNodePath': currentNodePaths,
8930            'currentPagePath': currentPagePath
8931        };
8932        $.ajax({
8933            url: '/bin/dxp/generic.json',
8934            type: 'POST',
8935            data: dataObj,
8936            dataType: 'html',
8937            success: function(data) {
8938                var json=JSON.parse(data);
8939                for (var currentNode in currentNodepath) {
8940  	               var pathList = json[currentNodepath[currentNode]];
8941                    //var currentElem = $($(".dxp-reference")[currentNode]);
8942					BIOG.referenceContainer._createMarkUp($refEl,pathList);
8943                  }
8944            }
8945        });
8946    },
8947    _createMarkUp: function($referenceContEl, response) {
8948        var updatedaaamarkUp = '';
8949        var getPathList = response.pathlist;
8950        if(getPathList){
8951        	for (var i = 0; i < getPathList.length; i++) {
8952                var styleID = getPathList[i].styleID;
8953                BIOG.referenceContainer.fetchdIVS($referenceContEl, getPathList[i].path, styleID, updatedaaamarkUp);
8954            }
8955        }
8956    },
8957    fetchdIVS: function($referenceContEl, getPathList, styleID, updatedaaamarkUp, callback) {
8958        $.ajax({
8959            url: getPathList + '.html',
8960            type: 'GET',
8961            async: "false",
8962            contentType: 'text/plain',
8963            dataType: 'html',
8964            success: function(data) {
8965                var response = data;
8966                var createStyleIDDiv;
8967                var createOuterDiv = $('<div></div>');
8968	            if($(response).hasClass('cmp-cta-tile-wrapper')){
8969					 createStyleIDDiv = $('<div class= "cta-tile ' + styleID + '"></div>');
8970		        }else{
8971		             createStyleIDDiv = $('<div class= "column-control ' + styleID + '"></div>');
8972		   		}
8973				updatedaaamarkUp = updatedaaamarkUp + response;
8974				createOuterDiv.append(createStyleIDDiv);
8975				createStyleIDDiv.append(updatedaaamarkUp);
8976                BIOG.referenceContainer.callback($referenceContEl, createOuterDiv);
8977            }
8978        });
8979    },
8980    callback: function($referenceContEl, updatedaaamarkUp) {
8981        $referenceContEl.append(updatedaaamarkUp);
8982    }
8983}
8984$(document).ready(function() {
8985   if ($('.dxp-reference').length) {
8986        $('.dxp-reference').each(function(){
8987			var currentNodePathsArray = [];
8988			var currentPagePath = $(this).find('[name=currentPagePath]').val();
8989	            currentNodePathsArray.push($(this).find("[name=currentNodePath]").val());
8990			if(currentPagePath != null && currentNodePathsArray.length > 0){
8991				BIOG.referenceContainer._init($(this),currentPagePath, currentNodePathsArray.join());
8992			}
8993        });
8994
8995    }
8996});
8997$(document).ready(function() {
8998    $(document).on('click', '.cmp-accordion-wrapper .cmp-accordion__header', function() {
8999        var hash = $(this).find('button').attr('id');
9000		
9001		//If hash has button, remove sub string
9002        if(hash.indexOf("-button")){
9003            hash = hash.substr(0, hash.indexOf("-button"))
9004        }
9005		history.replaceState(null, null, document.location.pathname + document.location.search + '#' + hash);
9006	});
9007});
9008
9009
9010$(document).ready(function() {
9011    var locationHash = window.location.hash;
9012
9013    //check if hash is accordion
9014    if(locationHash && $(locationHash).length && $(locationHash).hasClass("cmp-accordion__item")){
9015		if($(locationHash).parents(".cmp-accordion__item").length){
9016			expandAccordionItem($(locationHash).parents(".cmp-accordion__item")[0].id);
9017		}
9018	}
9019});
9020
9021function expandAccordionItem(item) {
9022	var cssClasses = {
9023        button: {
9024            disabled: "cmp-accordion__button--disabled",
9025            expanded: "cmp-accordion__button--expanded"
9026        },
9027        panel: {
9028            hidden: "cmp-accordion__panel--hidden",
9029            expanded: "cmp-accordion__panel--expanded"
9030        }
9031    };
9032	
9033	var button = document.getElementById(item + "-button");
9034	var panel = document.getElementById(item + "-panel");
9035	button.classList.add(cssClasses.button.expanded);
9036	
9037	setTimeout(function() {
9038		button.setAttribute("aria-expanded", true);
9039	}, 300);
9040	panel.classList.add(cssClasses.panel.expanded);
9041	panel.classList.remove(cssClasses.panel.hidden);
9042	panel.setAttribute("aria-hidden", false);
9043
9044	//if (that._properties.singleExpansion) {
9045	//	button.classList.add(cssClasses.button.disabled);
9046	//	button.setAttribute("aria-disabled", true);
9047	//}
9048}
9049
9050/*adds ID based on user click on core component accordion section title*/
9051function appendCoreComponentId() {
9052    let coreID = $(this).find('button').attr('id');
9053    var currentUrl = window.location.origin+window.location.pathname;
9054    let newUrl = currentUrl+ '#' + coreID;
9055    if (history.pushState) {
9056        window.history.pushState({
9057            path: newUrl
9058        }, '', newUrl);
9059    }
9060}
9061$( document ).ready(function() {
9062
9063    $('.dxp-carousel').each(function() {
9064
9065        let id = $('.cmp-carousel', this).data('id');
9066        let item = '#' + id + ' .cmp-carousel__item';
9067
9068        function resize_block() {
9069            $(item).attr('style', '')
9070            let a;
9071            let b = 0;
9072            $(item).each(function (index) {
9073                a = $(this).css('height');
9074                if (parseInt(a) > parseInt(b)) {
9075                    b = a;
9076                }
9077            });
9078            $(item).css('height', b)
9079        }
9080
9081        resize_block();
9082
9083        $(window).resize(function () {
9084            resize_block();
9085        });
9086
9087    });
9088});
9089
9090function previous(carouselId) {
9091    var elem = "#" + carouselId + " .cmp-carousel__action--previous";
9092    document.querySelector(elem).click();
9093}
9094
9095function next(carouselId) {
9096    var elem = "#" + carouselId + " .cmp-carousel__action--next";
9097    document.querySelector(elem).click();
9098}
9099$(document).ready(function() {
9100	var $listFiltersElements = $('.multiple-list-filter-sort-options');
9101
9102	if ($listFiltersElements.length) {
9103		$listFiltersElements.each(function() {
9104			var $this = $(this);
9105			var targetFilterElement = defineTargetElement($this);
9106
9107			if (targetFilterElement) {
9108				initFilterBehavier($this, targetFilterElement.elements);				
9109				initSortBehavier($this, targetFilterElement.elements);				
9110				initResetBehavier($this, targetFilterElement);
9111			}
9112		});
9113	}
9114});
9115
9116//---------------------------------------------------
9117
9118/*defined target element with tags*/
9119function defineTargetElement(filterContainer) {
9120	var targetEl = {};
9121	var $listActionsEl = filterContainer;	/*article list*/
9122	var $targetArticle = $listActionsEl.parents().find('.cmp-tile-wrapper[data-tagged-component="' + $listActionsEl.data('tagged-component') + '"]');
9123	var $targetArticleNew = $listActionsEl.parents().find('.cmp-tile-wrapper-v2[data-tagged-component="' + $listActionsEl.data('tagged-component') + '"]');
9124	var $targetRighArticle = $listActionsEl.parents().find('.cmp-right-rail-wrapper[data-tagged-component="' + $listActionsEl.data('tagged-component') + '"]');
9125	var $targetContainer = $listActionsEl.parents().find('[id="' + $listActionsEl.data('tagged-component') + '"]');
9126
9127	if ($targetArticle !== undefined && $targetArticle.length > 0) {
9128		targetEl.elements = $('.cmp-tile-wrapper[data-tagged-component="' + $listActionsEl.data('tagged-component') + '"]');
9129		targetEl.initState = $targetArticle.find('.cmp-tile-list-wrap').html();
9130	} else if ($targetArticleNew !== undefined && $targetArticleNew.length > 0) {
9131		targetEl.elements = $('.cmp-tile-wrapper-v2[data-tagged-component="' + $listActionsEl.data('tagged-component') + '"]');
9132		targetEl.initState = $targetArticleNew.find('.cmp-tile-list-wrap').html();
9133	} else if ($targetRighArticle !== undefined && $targetRighArticle.length > 0) {
9134		targetEl.elements = $('.cmp-right-rail-wrapper[data-tagged-component="' + $listActionsEl.data('tagged-component') + '"]');
9135		targetEl.initState = $targetRighArticle.find('.cmp-tile-list-wrap').html();
9136	} else if ($targetContainer !== undefined && $targetContainer.length > 0) {
9137		targetEl.elements = $('[id="' + $listActionsEl.data('tagged-component') + '"]');
9138		targetEl.initState = $targetContainer.find('.column-control-column').html();
9139	} else {
9140		return false;
9141	}
9142
9143	return targetEl;
9144}
9145
9146
9147//---------------------------------------------------
9148
9149/*update items for filter*/
9150function updateFilter(filterContainer, targetContainer) {
9151	var filterRequest = [];
9152
9153    var articleTiles = $(targetContainer).find('div[data-tags]');
9154    //var articleTiles = $(targetContainer).find('[data-tags]').parent().children();
9155
9156    var emptyArticleTiles = $(articleTiles).parent().children().filter(function(){
9157        return !$(this).is("[data-tags]");
9158    })
9159
9160	/*hide-show empty elements*/
9161    if($(filterContainer).find(".filter-group .selected").length > 0) {
9162        $(emptyArticleTiles).each(function() {
9163            $(this).css('display', 'none');
9164        });
9165    } else {
9166		$(emptyArticleTiles).each(function() {
9167            $(this).css('display', 'block');
9168        });
9169    }
9170
9171	$(articleTiles).each(function(index, item) {
9172		$(item).css('display', 'none');
9173	});
9174
9175	$(filterContainer).find('.filter-group .select-items .filter-item.selected').each(function(index, item) {
9176		filterRequest.push($(item).attr('data-category-item'));
9177	});
9178
9179	var filterEvents = Array.from(articleTiles).filter(function(item) {
9180		var filterResponse = filterRequest.every(function(filterEl) {
9181			return item.getAttribute('data-tags').indexOf(filterEl) >= 0;
9182		});
9183
9184		return filterResponse;
9185	});
9186
9187	$(filterEvents).each(function(index, item) {
9188		$(item).css('display', 'block');
9189	});
9190}
9191
9192//---------------------------------------------------
9193
9194/*init filter behavier*/
9195function initFilterBehavier(filterContainer, targetContainer) {
9196
9197    /*open select dropdown*/
9198	$(filterContainer).on('click', '.filter-group .selected-item', function(e) {
9199		checkDropdown(e.target);
9200	});	
9201
9202    /*active event for select separate category item*/
9203	$(filterContainer).on('click', '.category-filter .filter-item', function(e) {
9204		var itemTitle;
9205
9206		if ($(getParent(e.target)).attr('data-multiple-allowed') == 'false') {
9207			cleanСategoryFilter(e.target);
9208			checkDropdown(e.target);
9209			$(e.target).addClass('selected');
9210			itemTitle = $(e.target).text();
9211			$(getParent(e.target)).find('.selected-item').text(itemTitle);
9212		} else {
9213			$(e.target).toggleClass('selected');
9214			itemTitle = $(getFirstSelectedElementTitle(e.target)).text();
9215			checkSelectedItem(e.target)
9216				? $(getParent(e.target)).find('.selected-item').text(itemTitle)
9217				: clearSelectedValue(e.target);
9218		}
9219
9220		updateFilter(filterContainer, targetContainer);
9221	});	
9222
9223    /*reset event for separate filter category*/
9224	$(filterContainer).on('click', '.reset-filter', function(e) {
9225		cleanСategoryFilter(e.target);
9226		checkDropdown(e.target);
9227		updateFilter(filterContainer, targetContainer);
9228	});
9229}
9230
9231
9232//---------------------------------------------------
9233
9234/*change state for open dropdown filter*/
9235function checkDropdown(filter) {
9236	$(getParent(filter)).find('.select-items').toggleClass('select-hide');
9237	$(getParent(filter)).find('.selected-item').toggleClass('select-arrow-active');
9238}
9239
9240/*return parent node for selected filter item*/
9241function getParent(elem) {
9242	return $(elem).parents('.filter-group');
9243}
9244
9245function cleanСategoryFilter(filter) {
9246	clearSelectedValue(filter);
9247	$(getParent(filter)).find('.filter-item').each(function(index, item) {
9248		if ($(item).hasClass('selected')) {
9249			$(item).removeClass('selected');
9250		}
9251	});
9252}
9253
9254function checkSelectedItem(filter) {
9255	return $(getParent(filter)).find('.selected').length;
9256}
9257
9258/*clear selected field*/
9259function clearSelectedValue(filter) {
9260	var placeholder = $(getParent(filter)).find('.selected-item').attr('placeholder') || '';
9261
9262	$(getParent(filter)).find('.selected-item').text(placeholder);
9263}
9264
9265function getFirstSelectedElementTitle(filterItem) {
9266	return $(getParent(filterItem)).find('.selected')[0];
9267}
9268
9269
9270//---------------------------------------------------
9271
9272/*init sorter behavier*/
9273function initSortBehavier(filterContainer, targetContainer) {
9274	
9275	/*open select dropdown*/
9276	$(filterContainer).on('click', '.sort-group .selected-item', function(e) {
9277		checkSortDropdown(e.target);
9278	});	
9279	
9280	/*active event for select separate category item*/
9281	$(filterContainer).on('click', '.sort-group .sort-item', function(e) {
9282		var itemTitle = $(e.target).text();
9283
9284		getSortParent($(e.target)).find('.selected').toggleClass('selected');
9285		checkSortDropdown(e.target);
9286		$(e.target).addClass('selected');
9287		$(getSortParent(e.target)).find('.selected-item').text(itemTitle);		
9288		updateSort(filterContainer, targetContainer);
9289	});
9290}
9291
9292
9293//---------------------------------------------------
9294
9295
9296/*update items for sort*/
9297function updateSort(filterContainer, targetContainer) {
9298
9299	if ($(filterContainer).find('.sort-group .sort-item.selected').attr('data-sort-item') === 'newest') {
9300		formatDate(targetContainer);
9301		sortByDate(targetContainer);
9302	} else {
9303		sortByRang(targetContainer);
9304	}
9305}
9306
9307//---------------------------------------------------
9308
9309/*sort by rang*/
9310function sortByRang(targetContainer) {
9311	var items = $(targetContainer).find('.cmp-tile-list');
9312
9313	items.sort(function(a, b) {
9314		return +$(a).data('rank') - +$(b).data('rank');
9315	});
9316
9317	var $parentEl = $(targetContainer).find('.cmp-tile-list-wrap');
9318
9319	items.appendTo($parentEl);
9320}
9321
9322function formatDate(targetContainer) {
9323	$(targetContainer).find('.cmp-tile-list').each(function() {
9324		var $this = $(this);
9325
9326		if ($this.attr('publishdate')) {
9327			var date = new Date($this.attr('publishdate'));
9328
9329			$this.attr('data-time', date.getTime());
9330		}
9331	});
9332}
9333
9334function sortByDate(targetContainer) {
9335	$(targetContainer).each(function() {
9336		var $parentEl = $(this).find('.cmp-tile-list-wrap');
9337		var itemsWithPublishDate = $(this).find('.cmp-tile-list[publishdate]');
9338		var itemsWithOutPublishDate = $(this).find('.cmp-tile-list').not('[publishdate]');
9339
9340		itemsWithPublishDate.sort(function(a, b) {
9341			return +$(b).data('time') - +$(a).data('time');
9342		});
9343
9344        itemsWithPublishDate.appendTo($parentEl);
9345		itemsWithOutPublishDate.appendTo($parentEl);
9346	});
9347}
9348
9349//---------------------------------------------------
9350
9351function checkSortDropdown(sort) {
9352	$(getSortParent(sort)).find('.select-items').toggleClass('select-hide');
9353	$(getSortParent(sort)).find('.selected-item').toggleClass('select-arrow-active');
9354}
9355
9356function getSortParent(sort) {
9357	return $(sort).parents('.sort-group');
9358}
9359
9360function cleanSortCategory(sort) {
9361	var placeholder = $(getSortParent(sort)).find('.selected-item').attr('placeholder') || '';
9362
9363	$(getSortParent(sort)).find('.selected-item').text(placeholder);
9364	$(getSortParent(sort)).find('.sort-item').each(function() {
9365		if ($(this).hasClass('selected')) {
9366			$(this).removeClass('selected');
9367		}
9368	});
9369}
9370
9371//---------------------------------------------------
9372
9373/*init common reset behavier*/
9374function initResetBehavier(filterContainer, targetContainer) {
9375	$(filterContainer).on('click', '.multiple-list-filter-sort-options-reset', function() {
9376		$(filterContainer).find('.select-items').each(function() {
9377			resetFilter($(this));
9378		});
9379
9380		if ($(targetContainer.elements).is('.cmp-tile-wrapper') || $(targetContainer.elements).is('.cmp-tile-wrapper-v2')) {
9381			var $parentEl = $(targetContainer.elements).find('.cmp-tile-list-wrap');
9382
9383			$parentEl.find('.cmp-tile-list-wrap').html(targetContainer.initState);
9384			$parentEl.find('.cmp-tile-list').show();
9385		} else if ($(targetContainer.elements).is('.row')) {
9386			var $parentEl = $(targetContainer.elements).find('.column-control-column');
9387
9388			$parentEl.html(targetContainer.initState);
9389		}
9390	});
9391}
9392
9393//---------------------------------------------------
9394
9395/*reset all filters params*/
9396function resetFilter(element) {
9397	cleanСategoryFilter(element);
9398	$(getParent(element)).find('.select-items').addClass('select-hide');
9399
9400	if ($(getParent(element)).find('.select-arrow-active')) {
9401		$(getParent(element)).find('.select-arrow-active').removeClass('select-arrow-active');
9402	}
9403
9404	cleanSortCategory(element);
9405	$(getSortParent(element)).find('.select-items').addClass('select-hide');
9406	if ($(getSortParent(element)).find('.select-arrow-active')) {
9407		$(getSortParent(element)).find('.select-arrow-active').removeClass('select-arrow-active');
9408	}
9409}
9410
9411//---------------------------------------------------
9412
9413
9414//---------------------------------------------------
9415
9416/*deactivate other open filter dropdown*/
9417function checkActiveFilters(elem) {
9418	$(elem).parents('.multiple-list-filter-sort-options').filter(function() {
9419		checkDropdown($('.select-arrow-active'));
9420	});
9421}
9422
9423$(document).click(function(e) {
9424	var filterElement = $('.multiple-list-filter-sort-options').find('.select-arrow-active');
9425
9426	if (filterElement.length > 0) {
9427		if (!$(filterElement).is(e.target) && $(getParent(filterElement)).has(e.target).length === 0) {
9428			checkDropdown(filterElement);
9429			checkSortDropdown(filterElement);
9430		}
9431	}
9432});
9433/*
9434* jQuery listnav plugin
9435*
9436* Add a slick "letter-based" navigation bar to all of your lists.
9437* Click a letter to quickly filter the list to items that match that letter.
9438*
9439* Dual licensed under the MIT and GPL licenses:
9440*   http://www.opensource.org/licenses/mit-license.php
9441*   http://www.gnu.org/licenses/gpl.html
9442*
9443* Version 3.1.0 (04/26/2021)
9444* Author: Eric Steinborn
9445* Compatibility: jQuery 2.0+
9446*
9447*/
9448(function ($) {
9449  $.fn.listnav = function (options) {
9450    var opts = $.extend({}, $.fn.listnav.defaults, options),
9451        firstClick = false,
9452        clickEventType = '';
9453
9454    //detect if you are on a touch device easily.
9455    if (document.ontouchstart !== null) {
9456      clickEventType = 'click';
9457    } else {
9458      // We added 'click' to this becuase on touchscreen computers, when you click with a mouse, it will not fire the click function on a letter, hence disabling the entire plugin functionality. Thanks to my homeboy @clechner77 for pointing this out to me:
9459      // https://github.com/esteinborn/jquery-listnav/issues/34
9460      clickEventType = 'touchend click';
9461    }
9462
9463    opts.prefixes = $.map(opts.prefixes, function (n) {
9464      return n.toLowerCase();
9465    });
9466
9467    return this.each(function () {
9468      var $wrapper, $letters, $letterCount, left, width, count,
9469          id = this.id,
9470          $list = $(this),
9471          counts = {},
9472          allCount = 0, fullCount = 0,
9473          isAll = true,
9474          prevLetter = '';
9475
9476      if ( !$('#' + id + '-nav').length ) {
9477        $('<div id="' + id + '-nav" class="listNav"/>').insertBefore($list);
9478        // Insert the nav if its not been inserted already (preferred method)
9479        // Legacy method was to add the nav yourself in HTML, I didn't like that requirement
9480      }
9481
9482      $wrapper = $('#' + id + '-nav');
9483      // <ul id="myList"> for list and <div id="myList-nav"> for nav wrapper
9484
vendor: 8,374 bytes, lines 9485-9730
9485      function init() {
9486        $wrapper.append(createLettersHtml());
9487
9488        $letters = $('.ln-letters', $wrapper).slice(0, 1);
9489
9490        if ( opts.showCounts ) {
9491          $letterCount = $('.ln-letter-count', $wrapper).slice(0, 1);
9492        }
9493
9494        addClasses();
9495
9496        addNoMatchLI();
9497
9498        bindHandlers();
9499
9500        if (opts.flagDisabled) {
9501          addDisabledClass();
9502        }
9503
9504        // remove nav items we don't need
9505
9506        if ( !opts.includeAll ) {
9507          $('.all', $letters).remove();
9508        }
9509
9510        if ( !opts.includeNums ) {
9511          $('._', $letters).remove();
9512        }
9513
9514        if ( !opts.includeOther ) {
9515          $('.-', $letters).remove();
9516        }
9517
9518        if ( opts.removeDisabled ) {
9519          $('.ln-disabled', $letters).remove();
9520        }
9521
9522        $(':last', $letters).addClass('ln-last');
9523
9524        if ( $.cookie && (opts.cookieName !== null) ) {
9525          var cookieLetter = $.cookie(opts.cookieName);
9526
9527          if ( cookieLetter !== null && typeof cookieLetter !== "undefined" ) {
9528            opts.initLetter = cookieLetter;
9529          }
9530        }
9531
9532        // decide what to show first
9533        // Is there an initLetter set, if so, show that letter first
9534        if ( opts.initLetter !== '' ) {
9535          firstClick = true;
9536
9537          // click the initLetter if there was one
9538          $('.' + opts.initLetter.toLowerCase(), $letters).slice(0, 1).trigger('click');
9539        } else {
9540          // If you want to Hide all options until a user clicks
9541          if ( opts.initHidden ) {
9542
9543            addInitHiddenLI();
9544
9545            $list.children().addClass("listNavHide");
9546
9547            $list.children('.ln-init-hidden').removeClass('listNavHide');
9548          }
9549          // If no init letter is set, and you included All, then show it
9550          else if ( opts.includeAll ) {
9551            // make the All link look clicked, but don't actually click it
9552            $('.all', $letters).addClass('ln-selected');
9553          } else {
9554            // All was not included, lets find the first letter with a count and show it
9555            for ( var i = ((opts.includeNums) ? 0 : 1); i < opts.letters.length; i++) {
9556              if ( counts[opts.letters[i]] > 0 ) {
9557                firstClick = true;
9558
9559                $('.' + opts.letters[i], $letters).slice(0, 1).trigger('click');
9560
9561                break;
9562              }
9563            }
9564          }
9565        }
9566      }
9567
9568      // position the letter count above the letter links
9569      function setLetterCountTop() {
9570        // we're going to need to subtract this from the top value of the wrapper to accomodate changes in font-size in CSS.
9571        var letterCountHeight = $letterCount.outerHeight();
9572
9573        $letterCount.css({
9574          top: $('a:first', $wrapper).slice(0, 1).position().top - letterCountHeight
9575          // we're going to grab the first anchor in the list
9576          // We can no longer guarantee that a specific letter will be present
9577          // since adding the "removeDisabled" option
9578
9579        });
9580
9581      }
9582
9583      // adds a class to each LI that has text content inside of it (ie, inside an <a>, a <div>, nested DOM nodes, etc)
9584      function addClasses() {
9585        var str, spl, $this,
9586          firstChar = '',
9587          hasPrefixes = (opts.prefixes.length > 0),
9588          hasFilterSelector = (opts.filterSelector.length > 0);
9589
9590        // Iterate over the list and set a class on each one and use that to filter by
9591        $($list).children().each(function () {
9592          $this = $(this);
9593
9594          // I'm assuming you didn't choose a filterSelector, hopefully saving some cycles
9595          if ( !hasFilterSelector ) {
9596            //Grab the first text content of the LI, we'll use this to filter by
9597            str = $.trim($this.text()).toLowerCase();
9598          } else {
9599            // You set a filterSelector so lets find it and use that to search by instead
9600            str = $.trim($this.find(opts.filterSelector).text()).toLowerCase();
9601          }
9602
9603          // This will run only if there is something to filter by, skipping over images and non-filterable content.
9604          if (str !== '') {
9605            // Apply the non-prefix class to LIs that have prefixed content in them
9606            if (hasPrefixes) {
9607              var prefixes = $.map(opts.prefixes, function(value) {
9608                return value.indexOf(' ') <= 0 ? value + ' ' : value;
9609              });
9610              var matches = $.grep(prefixes, function(value) {
9611                return str.indexOf(value) === 0;
9612              });
9613              if (matches.length > 0) {
9614                var afterMatch = str.toLowerCase().split(matches[0])[1];
9615
9616                if(afterMatch !== null) {
9617                  firstChar = $.trim(afterMatch).charAt(0);
9618                } else {
9619                  firstChar = str.charAt(0);
9620                }
9621                addLetterClass(firstChar, $this, true);
9622                return;
9623              }
9624            }
9625            // Find the first letter in the LI, including prefixes
9626            firstChar = str.charAt(0);
9627
9628            // Doesn't send true to function, which will ++ the All count on prefixed items
9629            addLetterClass(firstChar, $this);
9630          }
9631        });
9632      }
9633
9634      // Add the appropriate letter class to the current element
9635      function addLetterClass(firstChar, $el, isPrefix) {
9636        // Changed /W/ to /wW/ to allow for non-engligh characters
9637        if ( /\wW/.test(firstChar) ) {
9638          firstChar = '-'; // not A-Z, a-z or 0-9, so considered "other"
9639        }
9640
9641        if ( !isNaN(firstChar) ) {
9642          firstChar = '_'; // use '_' if the first char is a number
9643        }
9644
9645        $el.addClass('ln-' + firstChar);
9646
9647        if ( counts[firstChar] === undefined ) {
9648          counts[firstChar] = 0;
9649        }
9650
9651        counts[firstChar]++;
9652
9653        if (!isPrefix) {
9654          allCount++;
9655        }
9656      }
9657
9658      function addDisabledClass() {
9659        for ( var i = 0; i < opts.letters.length; i++ ) {
9660          if ( counts[opts.letters[i]] === undefined ) {
9661            $('.' + opts.letters[i], $letters).addClass('ln-disabled');
9662          }
9663        }
9664      }
9665
9666      function addNoMatchLI() {
9667        $list.append('<li class="ln-no-match listNavHide">' + opts.noMatchText + '</li>');
9668      }
9669
9670      function addInitHiddenLI() {
9671        $list.append('<li class="ln-init-hidden listNavHide">' + opts.initHiddenText + '</li>');
9672      }
9673
9674      function getLetterCount(el) {
9675        if ($(el).hasClass('all')) {
9676          if (opts.dontCount) {
9677            fullCount = allCount - $list.find(opts.dontCount).length;
9678          } else {
9679            fullCount = allCount;
9680          }
9681
9682          return fullCount;
9683        } else {
9684          el = '.ln-' + $(el).attr('class').split(' ')[0];
9685
9686          if (opts.dontCount) {
9687            count = $list.find(el).not(opts.dontCount).length;
9688          } else {
9689            count = $list.find(el).length;
9690          }
9691
9692          return (count !== undefined) ? count : 0; // some letters may not have a count in the hash
9693        }
9694      }
9695
9696      function bindHandlers() {
9697        if (opts.showCounts) {
9698          // sets the top position of the count div in case something above it on the page has resized
9699          $wrapper.mouseover(function () {
9700            setLetterCountTop();
9701          });
9702
9703          //shows the count above the letter
9704          //
9705          $('.ln-letters a', $wrapper).mouseover(function () {
9706            left = $(this).position().left;
9707            width = ($(this).outerWidth()) + 'px';
9708            count = getLetterCount(this);
9709
9710            $letterCount.css({
9711              left: left,
9712              width: width
9713            }).text(count).addClass("letterCountShow").removeClass("listNavHide"); // set left position and width of letter count, set count text and show it
9714          }).mouseout(function () { // mouseout for each letter: hide the count
9715            $letterCount.addClass("listNavHide").removeClass("letterCountShow");
9716          });
9717        }
9718
9719        // click handler for letters: shows/hides relevant LI's
9720        //
9721        $('a', $letters).on(clickEventType, function (e) {
9722          e.preventDefault();
9723          var $this = $(this),
9724            letter = $this.attr('class').split(' ')[0],
9725            noMatches = $list.children('.ln-no-match');
9726
9727          if ( opts.initHidden ) {
9728            $list.children('.ln-init-hidden').remove();
9729          }
9730
9731          if ( prevLetter !== letter ) {
9732          // Only to run this once for each click, won't double up if they clicked the same letter
9733          // Won't hinder firstRun
9734            $('a.ln-selected', $letters).removeClass('ln-selected');
9735
9736            if ( letter === 'all' ) {
9737              // If ALL button is clicked:
9738              $list.children().addClass("listNavShow").removeClass("listNavHide"); // Show ALL
9739
9740              noMatches.addClass("listNavHide").removeClass("listNavShow"); // Hide the list item for no matches
9741
9742              isAll = true; // set this to quickly check later
9743            } else {
9744              // If you didn't click ALL
9745              if ( isAll ) {
9746                // since you clicked ALL last time:
9747                $list.children().addClass("listNavHide").removeClass("listNavShow");
9748
9749                isAll = false;
9750              } else if (prevLetter !== '') {
9751                $list.children('.ln-' + prevLetter).addClass("listNavHide").removeClass("listNavShow");
9752              }
9753
9754              var count = getLetterCount(this);
9755
9756              if (count > 0) {
9757                $list.children('.ln-' + letter).addClass("listNavShow").removeClass("listNavHide");
9758                noMatches.addClass("listNavHide").removeClass("listNavShow"); // in case it's showing
9759              } else {
9760                noMatches.addClass("listNavShow").removeClass("listNavHide");
9761              }
9762            }
9763
9764            prevLetter = letter;
9765
9766            if ($.cookie && (opts.cookieName !== null)) {
9767              $.cookie(opts.cookieName, letter, {
9768                expires: 999
9769              });
9770            }
9771
9772            $this.addClass('ln-selected');
9773
9774            $this.blur();
9775
9776            if (!firstClick && (opts.onClick !== null)) {
9777              opts.onClick(letter);
9778            } else {
9779              firstClick = false; //return false;
9780            }
9781          } // end if prevLetter !== letter
9782        }); // end click()
9783      } // end BindHandlers()
9784
9785      // creates the HTML for the letter links
9786      //
9787      function createLettersHtml() {
9788        var html = [];
9789        for (var i = 1; i < opts.letters.length; i++) {
9790          if (html.length === 0) {
9791            html.push('<a class="all" href="#">'+ opts.allText + '</a><a class="_" href="#">0-9</a>');
9792          }
9793          html.push('<a class="' + opts.letters[i] + '" href="#">' + ((opts.letters[i] === '-') ? '...' : opts.letters[i].toUpperCase()) + '</a>');
9794        }
9795        return '<div class="ln-letters">' + html.join('') + '</div>' + ((opts.showCounts) ? '<div class="ln-letter-count listNavHide">0</div>' : '');
9796        // Remove inline styles, replace with css class
9797        // Element will be repositioned when made visible
9798      }
9799      init();
9800    });
9801  };
9802
9803  $.fn.listnav.defaults = {
9804    allText: 'All',
9805    cookieName: null,
9806    dontCount: '',
9807    filterSelector: '',
9808    flagDisabled: true,
9809    includeAll: true,
9810    includeNums: true,
9811    includeOther: false,
9812    initHidden: false,
9813    initHiddenText: 'Tap a letter above to view matching items',
9814    initLetter: '',
9815    letters: ['_', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '-'],
9816    noMatchText: 'No matching entries',
9817    onClick: null,
9818    prefixes: [],
9819    removeDisabled: false,
9820    showCounts: true,
9821  };
9822})(jQuery);
9823
9824$(document).ready(function(){
9825    // Bootstrap 5 compatibility shim for legacy jQuery-style .modal('show'/'hide') calls.
9826    // If Bootstrap 5 (window.bootstrap) is present and $.fn.modal is not defined (because BS5 removed the jQuery plugin),
9827    if (typeof window.bootstrap !== 'undefined' && typeof $.fn.modal === 'undefined') {
9828        (function($){
9829            $.fn.modal = function(action){
9830                // support $(el).modal('show') and $(el).modal('hide') and $(el).modal(options)
9831                if (typeof action === 'string') {
9832                    return this.each(function(){
9833                        var el = this;
9834                        var modalInstance = window.bootstrap.Modal.getInstance(el) || new window.bootstrap.Modal(el);
9835                        if (action === 'show') modalInstance.show();
9836                        if (action === 'hide') modalInstance.hide();
9837                        if (action === 'dispose') modalInstance.dispose();
9838                    });
9839                } else if (typeof action === 'object' || typeof action === 'undefined') {
9840                    // initialize with options
9841                    return this.each(function(){
9842                        var el = this;
9843                        if (!window.bootstrap.Modal.getInstance(el)) {
9844                            new window.bootstrap.Modal(el, action);
9845                        }
9846                    });
9847                }
9848            };
9849        })($);
9850    }
9851	
9852	BIOG.Modal = {
9853		exitModalJson :{},
9854		init : function(){
9855			BIOG.Modal.bindEvents();
9856			$(".exit-modal").length > 0 ? BIOG.Modal.getExitModalData() : '';
9857			$('#entryModal').length > 0 ? BIOG.Modal.initialiseCookieSetupForModal($('#entryModal')): '';
9858		},
9859		bindEvents : function(){
9860			$(document).on('click','.generic-modal-button',BIOG.Modal.setCookieIfRequired);
9861			if ($('.entry-modal').length > 0 && $('.entry-modal').data('create-cookie') === true) {
9862			    var cookieName = $('.entry-modal').find('.modal-details').data('cookiename');
9863			    $(document).on('click', '.generic-modal-button.close-icon-button.close', function(e) {
9864			        e.preventDefault();
9865			        BIOG.Modal.createCookieOnEscOrOutsideClickModal(cookieName);
9866			    });
9867			    $(document).keydown(function(e) {
9868			        if (e.which == 27 && $('body').hasClass('modal-open')) {
9869			            // esc pressed while modal is opened
9870			            BIOG.Modal.createCookieOnEscOrOutsideClickModal(cookieName);
9871			        }
9872			    });
9873			    $('body').click(function(e) {
9874			        if ($('.cmp-modal.entry-modal').find('.modal-content').html().trim()) {
9875			            var container = $(".modal-dialog");
9876			            if (!container.is(e.target) && container.has(e.target).length === 0 && $('body').hasClass('modal-open')) {
9877			                BIOG.Modal.createCookieOnEscOrOutsideClickModal(cookieName);
9878			            }
9879			        }
9880			    });
9881			}
9882		},
9883		bindExitEvents :function(){			
9884			$(document).on('click',"a:not([href^='#']):not([href^='javascript']):not('.contact-support-link'):not('.modal-button'):not('[data-lightbox-trigger]')",'.locator-url a',BIOG.Modal.createExitModal);
9885			$(document).on('click','.destination-button',BIOG.Modal.updateTargetUrl);
9886		},
9887		getExitModalData : function(){
9888				$.ajax({
9889					url: $("#exitModalTargetPath").val() ,
9890					/*data:{currentPagePath : $("#resourcePath").val()},*/
9891					success:function(resp){
9892						BIOG.Modal.exitModalJson = resp;
9893						BIOG.Modal.bindExitEvents();
9894					},
9895					error:function(){
9896						
9897					}
9898				})
9899		},
9900		/*intialises cookies for modal popups*/
9901		initialiseCookieSetupForModal :function($modal){
9902			var modalPath = $modal.find('.modal-details').data('modalpath');
9903			if(modalPath !== '' && modalPath !== undefined){
9904				BIOG.Modal.showModal($modal,modalPath + '/jcr:content/root.html?wcmmode=disabled');
9905			}
9906		},	
9907		/*sets cookie based on page properties*/			
9908		setCookieIfRequired : function(evt){ 
9909			evt.stopPropagation();	
9910			var $button = $(this),
9911				$modal = $button.closest('.cmp-modal'),
9912				isRedirect = $button.data('redirect'),
9913				redirectionUrl = $button.data('url');
9914			/*should check only for entry modal button*/
9915			if($modal.hasClass('entry-modal')){
9916			   var $modalDetails =$modal.find('.modal-details'),
9917				   createcookie = $button.data('createcookie'),
9918				   cookieName = $modalDetails.data('cookiename'),
9919				   modalPath = $modalDetails.data('modalpath');
9920			   if (createcookie && cookieName && modalPath) {
9921				    /*if the data attribute setcookie(setcookie for first time users) value is true we are storing
9922					cookie to future date setting expiry date of 3 months(setting perminant cookie not for session)*/
9923				    if ($modal.data('cookie-expiry') !== undefined) {
9924				    	BIOG.Modal.assignCookieValues($modal,cookieName);
9925				    } else {
9926				        if ($modalDetails.data('setcookie')) {
9927				            $.cookie(cookieName, 'true', { path: '/',expires: 90 });
9928				        } else {
9929				            /*if the data attribute setcookie value is false we are storing
9930										cookie for session.once we close the browser we lost the session
9931										and eventually cookie wont exist after reopening the browser.
9932										not setting any expirt date to achieve functionality
9933								   */
9934				            $.cookie(cookieName, 'true', { path: '/'  });
9935				        }
9936				    }
9937				}
9938			}
9939			if(isRedirect){//should check for entry/exit modal button
9940			  var urlObj =BIOG.Modal.checkUrlType(redirectionUrl);
9941			  BIOG.Modal.navigateToPath(urlObj,$button.attr('target'));
9942		  	}
9943		 
9944		 },
9945		/*sets cookie for required modal*/
9946		showModal : function($modal,modalPath){
9947			var	isCookieExist = BIOG.Modal.validateCookie($modal);
9948			if(!isCookieExist && $modal.hasClass('entry-modal')){
9949				  BIOG.Modal.updateModalContent($modal,modalPath,'','');
9950			}
9951		},
9952		/*checks whether cookie exist or not in user's browser*/
9953		validateCookie : function($modal){
9954			var cookieName = $modal.find('.modal-details').data('cookiename');
9955			return ($.cookie(cookieName)) ? true : false;
9956		},
9957		/*gets the content via ajax and update the model popup and shows mpdal popup to user*/
9958		updateModalContent : function($modal,modalPath,targetUrl,targetType){
9959			if(modalPath){          
9960				$.ajax({
9961					url: modalPath,
9962					success: function (resp) {
9963						$modal.find('.modal-content').html($(resp));
9964						$modal.modal('show');
9965						if($modal.hasClass('exit-modal')){
9966							$modal.attr('data-targeturl',targetUrl);
9967							$modal.attr('data-targettype',targetType)
9968						}
9969					},
9970					error:function(){
9971						
9972					}
9973				});    
9974			}
9975		},
9976		/*returns an object which contains proper url and type of url*/
9977		checkUrlType : function(redirectionUrl){
9978			//add http:// if it does n't exist
9979			redirectionUrl =  redirectionUrl.substr(0,3)==='www' ?  "http://" + redirectionUrl : redirectionUrl;
9980			return {isExternal:redirectionUrl.indexOf('http://') > -1 || redirectionUrl.indexOf('https://') > -1 || redirectionUrl.substr(0,4)==='tel:' || redirectionUrl.substr(0,4)==='sms:' || redirectionUrl.substr(0,7)==='mailto:' || redirectionUrl.substr(0,5)=== 'maps:' || redirectionUrl.substr(0,4)==='geo:' || redirectionUrl.substr(0,13)=== 'comgooglemaps',
9981					newUrl : redirectionUrl};
9982		},
9983		/*navigate to the path based on type of url*/
9984		navigateToPath : function(urlObj,targetType){
9985			var url ;
9986			if(targetType === '_blank'){
9987                url = urlObj.isExternal ? urlObj.newUrl : window.location.origin + urlObj.newUrl;
9988				window.open(url,'_blank');
9989		     }else{
9990				url = urlObj.isExternal ?  urlObj.newUrl :  window.location.origin + urlObj.newUrl;
9991	     		window.location =  url;  
9992			 }
9993		},
9994        /*sets properties for the targeturl based on exit modal json data*/			
9995		determineLinkProperties : function(targetUrl){
9996			var linkProperties = {
9997					"isWhitelisted":false,
9998					"isBlackListed":false,
9999					"isModalLink"  :false,
10000					"urlPath"		:""
10001				},
10002				urlObj = BIOG.Modal.exitModalJson,
10003				blackListObj = {};
10004			if(urlObj !== undefined){
10005				if(urlObj.whitelist !== undefined){
10006					linkProperties.isWhitelisted = BIOG.Modal.isWhitelisted(urlObj.whitelist,targetUrl);
10007				}
10008				if(!linkProperties.isWhitelisted){
10009					if(urlObj.blacklist !== undefined){
10010						blackListObj = BIOG.Modal.isBlackListed(urlObj.blacklist,targetUrl);
10011						linkProperties.isBlackListed = blackListObj.isBlacklisted;
10012						if(linkProperties.isBlackListed){
10013                            if(blackListObj.blacklistedUrlPath !== "" &&  blackListObj.blacklistedUrlPath !== undefined){
10014								linkProperties.urlPath = blackListObj.blacklistedUrlPath;
10015								linkProperties.isModalLink = true;
10016                            }    
10017
10018						}else{
10019							if(urlObj.defaultModalPath !== "" &&  urlObj.defaultModalPath !== undefined){
10020								linkProperties.urlPath = urlObj.defaultModalPath;
10021								linkProperties.isModalLink = true;
10022                            }    
10023
10024						}
10025					}else{
10026                        if(urlObj.defaultModalPath !== "" &&  urlObj.defaultModalPath !== undefined){
10027                            linkProperties.urlPath = urlObj.defaultModalPath;
10028                            linkProperties.isModalLink = true;
10029                        }  
10030                    }
10031				}
10032				if(urlObj.whitelist === undefined && urlObj.blacklist === undefined){
10033                   		if(urlObj.defaultModalPath !== "" && urlObj.defaultModalPath !== undefined){
10034                            linkProperties.urlPath = urlObj.defaultModalPath;
10035                            linkProperties.isModalLink = true;
10036                        }
10037				}
10038				
10039			}
10040			return linkProperties;    
10041		},  
10042        /*returns true or false whether target url matches any one of the whitelisted urls*/			
10043		isWhitelisted :function(whitelist,targetUrl){
10044			var whitelistLength = whitelist.length,
10045				isWhitelisted = false;
10046			for(var i=0 ;i < whitelistLength;i++){
10047				var whitelistedExpression = whitelist[i].rule;
10048				isWhitelisted = BIOG.Modal.validatetargetUrl(whitelistedExpression,targetUrl);
10049				if(isWhitelisted){
10050					break;
10051				}
10052			}
10053			return isWhitelisted;
10054		},  
10055        /*returns true or false whether target url matches any one of the blackl
10055isted urls*/						
10056		isBlackListed :function(blacklist,targetUrl){
10057			var blacklistLength = blacklist.length,
10058				isBlacklisted = false,
10059				blacklistedUrlPath ='';
10060			for(var i=0 ;i < blacklistLength;i++){
10061				var blacklistedExpression = blacklist[i].rule;
10062				isBlacklisted = BIOG.Modal.validatetargetUrl(blacklistedExpression,targetUrl);
10063				if(isBlacklisted){
10064					blacklistedUrlPath = blacklist[i].modalPath;
10065					break;
10066				}
10067			}
10068			return {"isBlacklisted":isBlacklisted,'blacklistedUrlPath' : blacklistedUrlPath};
10069		},  
10070        /*validates whether target url and given regex are matches or not*/			
10071		validatetargetUrl: function(exp,targetUrl){
10072			var mapObj = {
10073                  "\/":"\\/",
10074                  "\?":"\\?",
10075                  "\&":"\\&"
10076                };
10077             exp = exp.replace(/\/|\?|\&/gi, function(matched){
10078                        return mapObj[matched];  
10079             });	
10080			var regex = new RegExp(exp);
10081			return regex.test(targetUrl);
10082		},
10083		/*get exit modal content and show popup*/
10084		createExitModal : function(evt){
10085			evt.preventDefault();
10086			var $this = $(this),
10087				targetUrl = $this.attr('href'),
10088				urlObj,
10089				linkProperties;
10090				/*if internal---navigate to path directly*/
10091			if(typeof targetUrl != 'undefined' && targetUrl != ''){
10092				urlObj =BIOG.Modal.checkUrlType(targetUrl);
10093				if(!urlObj.isExternal){
10094					BIOG.Modal.navigateToPath(urlObj,$this.attr('target'));
10095				}else{
10096					/*if external validate targetURL against to whitelist and blacklisted urls*/
10097					linkProperties = BIOG.Modal.determineLinkProperties(targetUrl);
10098					if(linkProperties.isModalLink){
10099						/*if target url is blacklisted,show corresponding modal popup */
10100						var modalPath = linkProperties.urlPath;
10101						if(modalPath !== undefined && modalPath !== ''){
10102							BIOG.Modal.updateModalContent($('#exitModal'),modalPath + '/jcr:content/root.html?wcmmode=disabled',targetUrl,$this.attr('target'));
10103						}
10104					}else{
10105						/*if target url is not any one of blacklists navigate to the corresponding page directly  */
10106						var locatorModal = $this.closest('.locator-tool-container').find('[data-exitModalPath]');
10107						if($this.parent().hasClass('locator-url') && locatorModal.length >0){
10108							var locatorModalPath = locatorModal.attr('data-exitModalPath');
10109							BIOG.Modal.updateModalContent($('#exitModal'),locatorModalPath+'/jcr:content/root.html?wcmmode=disabled',targetUrl,'_blank');
10110
10111						}else{
10112							BIOG.Modal.navigateToPath(urlObj,$this.attr('target'));
10113						}
10114					}
10115				}
10116			}
10117		 },
10118		updateTargetUrl : function(evt){
10119			evt.preventDefault();
10120			var $this = $(this),
10121				$modal = $this.closest('.cmp-modal'),
10122				targetUrl = $modal.attr('data-targeturl'),
10123				targetType = $modal.attr('data-targettype');  
10124			if($modal.hasClass('exit-modal')){   
10125				var urlObj =BIOG.Modal.checkUrlType(targetUrl);
10126			  	BIOG.Modal.navigateToPath(urlObj,targetType);
10127			}
10128		},
10129		createCookieOnEscOrOutsideClickModal:function(cookieName){
10130			 if(typeof $.cookie(cookieName) === "undefined") {
10131                 if ($('.entry-modal').data('cookie-expiry') !== undefined ){
10132                	 BIOG.Modal.assignCookieValues($('.entry-modal'),cookieName);
10133                 }
10134                 else{
10135                	 $.cookie(cookieName,'true',{ path: '/',expires: 90 });
10136                 }
10137             }
10138		},
10139		generateCookieExpiryDays: function($modalEl) {
10140		    var cookieExpiryVal = $modalEl.data('cookie-expiry'),
10141		        expiryDays;
10142		    if (cookieExpiryVal !== undefined && cookieExpiryVal !== "session") {
10143		        if (cookieExpiryVal === "never") {
10144		            expiryDays = 3650;
10145		        } else {
10146		            expiryDays = parseInt(cookieExpiryVal);
10147		        }
10148		    }
10149		    return expiryDays;
10150		},
10151		assignCookieValues:function($modal,cookieName){
10152			if ($modal.data('cookie-expiry') !== "session") {
10153	            var cookieExpiryDate = BIOG.Modal.generateCookieExpiryDays($modal);
10154	            $.cookie(cookieName, 'true', { path: '/', expires: cookieExpiryDate });
10155	        } else {
10156	            $.cookie(cookieName, 'true', { path: '/' });
10157	        }
10158		}
10159	}
10160	if($(".modals").length >
10160 0 && window.iswcmModeEditMode === "false"){     
10161		BIOG.Modal.init();
10162	}   
10163});
10164$(document).on("change", ".hreflang-multifield coral-checkbox", function (e) {
10165    if (!this.name?.endsWith("/./defaultValue") || !this.checked) {
10166        return;
10167    }
10168
10169    $(this).closest(".hreflang-multifield").find('coral-checkbox[name$="/./defaultValue"]').not(this).each(function () {
10170        this.checked = false;
10171    });
10172});
10173$(document).ready(function () {
10174    let currentPageUrl = globalThis.location.href;
10175    $('link[data-autogenerate-href="true"]').each(function () {
10176        $(this).attr('href', currentPageUrl);
10177    });
10178});
10179$(document).on("change", ".hreflang-multifield coral-checkbox", function (e) {
10180    if (!this.name?.endsWith("/./defaultValue") || !this.checked) {
10181        return;
10182    }
10183
10184    $(this).closest(".hreflang-multifield").find('coral-checkbox[name$="/./defaultValue"]').not(this).each(function () {
10185        this.checked = false;
10186    });
10187});
10188$(document).ready(function () {
10189    let currentPageUrl = globalThis.location.href;
10190    $('link[data-autogenerate-href="true"]').each(function () {
10191        $(this).attr('href', currentPageUrl);
10192    });
10193});
10194BIOG.devices = {
10195	isDesktop:function(){
10196		if (screen.width >= 992) {
10197			return true;
10198		}
10199	},
10200	isTablet:function(){
10201		if ((screen.width <= 991) && (screen.width >= 768)) {
10202			return true;
10203		}
10204	},
10205	isMobile:function(){
10206		if (screen.width <= 767) {
10207			return true;
10208		}	
10209	}
10210}
10211
10212var BIOG = window.BIOG = BIOG || {};
10213var scriptsIconsPath= '/etc.clientlibs/dxp-2/clientlibs/base/resources';
10214
10215$(function () {
10216	function _autoload() {
10217		$.each(BIOG, function (fn_key, obj) {
10218			if ($.isArray(obj._autoload)) {
10219				$.each(obj._autoload, function (key, value) {
10220					if ($.isArray(value)) {
10221						if (value[1]) {
10222							BIOG[fn_key][value[0]]();
10223						} else {
10224							if (value[2]) {
10225								BIOG[fn_key][value[2]]();
10226							}
10227						}
10228					} else {
10229						BIOG[fn_key][value]();
10230					}
10231				});
10232			}
10233		});
10234	}
10235	_autoload();
10236});
10237
10238
10239BIOG.options = {
10240	_autoload: ['_anchorTargetClick'],
10241	bindListMaxHeight: function (element, listSize) {
10242		/* function definition for calculating heights with respect to each row */
10243		var $list;
10244                var tilesperrow=element.closest('.cmp-tile-wrapper').data('tilesPerRow');
10245		var height;
10246        if(tilesperrow !==undefined && tilesperrow >3) {
10247			height = 0;
10248		}
10249		var maxProducts = function (maxLen, totLen) {
10250			var lastList = totLen % listSize;
10251			var lastIndex = totLen - lastList;
10252			var maxHeight;
10253			$list.each(function (index) {
10254				$(this).outerHeight() > height ? height = $(this).outerHeight() : null;
10255				index > lastIndex ? maxLen = lastList : null;
10256				/* assign max heights to each tile after calculating in last row */
10257				if ((index + 1) % maxLen === 0 || ((index + 1) % lastList === 1 && (index + 1) === totLen)) {
10258					assignHeightToTile(index);
10259				}				
10260			});
10261			/* max heights function to assign each tile after calculating in each row */
10262			function assignHeightToTile(index) {
10263				maxHeight = height;
10264				$list.each(function (ind) {
10265					if (ind === index) {
10266						for (var i = ind; i > index - maxLen; i--) {
10267							$list.eq(i).css('height', maxHeight);
10268						}
10269						return false;
10270					}
10271				});
10272			}
10273		};
10274		/* function initialization for calculating heights*/
10275		var calcMaxHeight = function () {
10276			element.css('height', 'auto');
10277			$list = element;
10278			var $window = $(window);
10279			if ($window.width() > 767) {
10280				$list.length < listSize ? maxProducts($list.length, $list.length) : maxProducts(listSize, $list.length);
10281			} else {
10282				$list.length < 1 ? maxProducts($list.length, $list.length) : maxProducts(1, $list.length);
10283			}
10284		};
10285		if(element.length > 1) {
10286            calcMaxHeight();
10287        }
10288	},
10289	 /*below functions takes key and value,generates new URL without disturbing other query parameters*/
10290	getFormattedUrl : function(key,referenceKey,setNewUrl){
10291		var currentUrl = window.location.href,
10292			newUrl = '';
10293		if(setNewUrl !== undefined){
10294			currentUrl = setNewUrl;
10295		}
10296		if(currentUrl.indexOf('?') >= 0){
10297			if(currentUrl.indexOf(key + '=') >= 0){
10298				var urlArray = currentUrl.split(key + '='),
10299				qpArray = urlArray[1].split('&'),
10300				qpString = '';
10301				for(var i=1;i< qpArray.length;i++){
10302					qpString  +=  '&' + qpArray[i];
10303				}
10304
10305			   newUrl = urlArray[0] + key + '=' + referenceKey;
10306			   newUrl = urlArray[1].indexOf('&') >= 0 ? newUrl + qpString : newUrl;
10307			}else{
10308				newUrl = currentUrl + '&' + key + '=' + referenceKey;   
10309			}
10310
10311		} else {
10312			 newUrl = currentUrl + '?' + key + '=' + referenceKey;  
10313		}
10314		return newUrl;
10315	},
10316	getQueryParam: function (name) {
10317		if (location.search.indexOf('?') >= 0) {
10318			var qparam = location.search.split('?')[1],
10319				paramValue = '';
10320			qparam.split('&').forEach(function (q) {
10321				var r = q.split('=');
10322				if (r[0] === name) {
10323					paramValue = r[1];
10324				}
10325			});
10326			return paramValue;
10327		}
10328		return '';
10329	},
10330    validateEmail: function(str) {
10331     	var emailRegex = /^\b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b$/i;
10332      	if(str && emailRegex.test(str) && BIOG.emailvalidationAutoSuggestion._successEmailValidation(str)) {
10333       		return true;
10334      	}
10335      	return false;
10336    },
10337	validatePhone: function(str) {
10338		var phoneRegex = /^\s*(?:\+?(\d{1,3}))?[-. (]*(\d{3})[-. )]*(\d{3})[-. ]*(\d{4})(?: *x(\d+))?\s*$/;
10339      	if(str && phoneRegex.test(str)) {
10340       		return true;
10341      	}
10342      	return false;
10343	},
10344	appendErrorElem: function(element, errMsg) {
10345		var $errorElem;
10346		var $highLightElem=element.find('input,select,textarea');
10347		if(!element.find('.hasError').length) {
10348			$errorElem = $('<span class="hasError" />');
10349			$errorElem.text(errMsg || '');
10350			element.append($errorElem);
10351            if(element.find('.mdc-text-field').length > 0) {
10352				element.find('.mdc-text-field').addClass('mdc-text-invalid');
10353			}
10354            if (element.find('.mdc-select').length > 0) {
10355                element.find('.mdc-select').addClass('mdc-select--invalid');
10356            }
10357            if (element.hasClass('radio-checkbox')) {
10358                element.find('.mdc-radio__outer-circle,.mdc-checkbox__background').addClass('highlightError');
10359            }
10360		} else {
10361			element.find('.hasError').text(errMsg || '');
10362            if(element.find('.mdc-text-field').length > 0) {
10363                if(element.find('.hasError').length) {
10364					element.find('.mdc-text-field').addClass('mdc-text-invalid');
10365                }
10366                else {
10367					element.find('.mdc-text-field').removeClass('mdc-text-invalid');
10368                }
10369			}
10370			if (element.hasClass('radio-checkbox') && element.find('.hasError').length) {
10371                element.find('.mdc-radio__outer-circle,.mdc-checkbox__background').addClass('highlightError');
10372            }
10373		}
10374		if(!$highLightElem.find('.highlightError').length && $('input[name="erroroutline"]').val()) {
10375			$highLightElem.addClass('highlightError');
10376		} else {
10377			$highLightElem.removeClass('highlightError');
10378		}
10379	},
10380	valueTrim:function(selfvalue){
10381		if(selfvalue!==undefined) { 
10382			return  $.trim(selfvalue);
10383		}
10384		return;
10385	},
10386	validateInputRegex: function(str,regex) {
10387		var inputRegex = new RegExp(regex);
10388		 if(str!==undefined && regex!==undefined){
10389			if(str && inputRegex.test(str)) {
10390		       return true;
10391			}
10392		 	return false;
10393		 }
10394	},
10395	validateMin: function(str,min) {
10396		 if(str!==undefined && min!==undefined){
10397			 if(str.length > min-1) {
10398		       return true;
10399		     }
10400			 return false;
10401		 }
10402	},
10403	validateFormFields: function($elem) {
10404	    var flag;
10405	    if ($elem.length) {
10406	        $elem.find('.form-group, .mdc-form-group').each(function() {
10407	            BIOG.options.validateFormFieldsElement($(this));
10408	        });
10409	        flag = !($elem.find('.hasError').is(':visible')); 
10410	    }
10411	    return flag;
10412	},
10413	validateFormFieldsElement: function($elem) {
10414	    var flag = true;
10415	    var errorText;
10416	    if ($elem.length) {
10417	    	if(($elem.find('.hasError').is(':visible')) && ($elem.find('.custom-error').is(':visible'))){
10418	    		$elem.find('.custom-error').remove();
10419            }
10420	        var $self = $elem,
10421	            $inputReq = $self.find('[required]:visible'),
10422                $input = $self.find("input:not(:hidden),select,textarea"),
10423				selfvalue1 = $inputReq.val(),
10424	            selfvalue = $input.val(),
10425	            minLength = $input.attr('minlength'),
10426	            maxLength = $input.attr('maxlength'),
10427	            regexValidation = $input.attr('data-regex'),
10428	            isSpecialCase = $inputReq.attr('type') === 'checkbox' || $inputReq.attr('type') === 'radio';
10429	        var isInputType = $input.attr('type') === 'text' || $input.attr('type') === 'password' || $input.attr('type') === 'tel' || $input.attr('type') === 'number' || $input.attr('type') === 'email';
10430	        var isTextArea = $self.find('textarea:visible');
10431	        var isTextAreaVal = isTextArea.length ? BIOG.options.valueTrim(isTextArea.first().val()) : '';
10432	        var formFallBackError = $elem.closest('form').parents().find('.cmp-error-messages-wrapper');
10433	        if (isInputType === true) {
10434	            selfvalue = BIOG.options.valueTrim($input.val());
10435	            $input.val(selfvalue);
10436	        }
10437	        if (isTextArea.length) {
10438	            isTextArea.first().val(isTextAreaVal);
10439	        }
10440	        //selfvalue1 is the value when the required is visible for inputs
10441	        var $highLightElem=$elem.find('input,select,textarea');
10442	        if (!(selfvalue1 === '' || selfvalue1 === null) && isSpecialCase) {
10443	            // checkbox and radio button code goes here
10444	            if (!$inputReq.is(':checked')) {
10445	                errorText = $inputReq.attr('data-cmp-required') || 'Required Field';
10446	                BIOG.options.appendErrorElem($self, errorText);
10447	                flag = false;
10448	            } else {
10449	                $self.find('.hasError').remove();
10450	                $highLightElem.removeClass('highlightError');
10451                    $self.find('.mdc-text-field').removeClass('mdc-text-invalid');
10452                     $self.find('.mdc-radio__outer-circle,.mdc-checkbox__background').removeClass('highlightError');
10453	            }
10454	        } else if (!(selfvalue1 === '' || selfvalue1 === null) && (selfvalue !== "") && isInputType) {
10455	            	//logic for fallback password validation
10456	            	var minmaxfallbackflag = false;
10457	            	if((minLength === undefined) && (maxLength === undefined)){            		
10458	            		minmaxfallbackflag = true;
10459	            	}
10460	            	if(minLength === undefined){minLength = 0;}
10461	            if ((minLength > 0 && isInputType && !BIOG.options.validateMin(selfvalue, minLength))) {
10462	                errorText = $input.attr('data-min-message') || formFallBackError.attr('data-min-length-message') || 'Validation For Minimum Field Length Has Failed.';
10463	                BIOG.options.appendErrorElem($self, errorText);
10464	                flag = false;
10465	            } else if ($input.attr('name') === 'password'){
10466	                var $password = $input.val();
10467	               if (minmaxfallbackflag && ($password.length < 6 || $password.length > 15)) {
10468	                    errorText = 'Please Enter a Value Between 6 and 15 Characters.';
10469	                    BIOG.options.appendErrorElem($self, errorText);
10470	                    flag = false;
10471	                } else if ((isInputType && (regexValidation !== undefined) && !BIOG.options.validateInputRegex(selfvalue, regexValidation))) {
10472	                    errorText = $input.attr('data-regex-constraint-message') || formFallBackError.attr('data-regex-message') || 'Validation For Regular Expression Has Failed.';
10473	                    BIOG.options.appendErrorElem($self, errorText);
10474	                    flag = false;
10475	                } else {
10476	                    $self.find('.hasError').remove();
10477	                    $highLightElem.removeClass('highlightError');
10478                        $self.find('.mdc-text-field').removeClass('mdc-text-invalid');
10479	                }
10480	            } else if ((isInputType && (regexValidation !== undefined) &&  !BIOG.options.validateInputRegex(selfvalue, regexValidation))) {
10481	                errorText = $input.attr('data-regex-constraint-message') || formFallBackError.attr('data-regex-message')|| 'Validation For Regular Expression Has Failed.';
10482	                BIOG.options.appendErrorElem($self, errorText);
10483	                flag = false;
10484	            }else if((regexValidation === undefined) && ((($input.attr('type') === 'email') && !BIOG.options.validateEmail(selfvalue)) || (($input.attr('type') === 'tel') && !BIOG.options.validatePhone(selfvalue)))){ 
10485	            	errorText = $input.attr('data-cmp-constraint') || formFallBackError.attr('data-regex-message') || 'Validation For Regular Expression Has Failed.';
10486	            	 BIOG.options.appendErrorElem($self, errorText);
10487	            }
10488	            else {
10489	                $self.find('.hasError').remove();
10490	                $highLightElem.removeClass('highlightError');
10491                    $self.find('.mdc-text-field').removeClass('mdc-text-invalid');
10492	            }
10493	        } else if (!isInputType && (isTextArea !== undefined) && ((isTextArea.length) > 0) && (isTextAreaVal !== ""))  {
10494	            if ((minLength > 0 && !BIOG.options.validateMin(isTextAreaVal, minLength))) {
10495	                errorText = $input.attr('data-min-message') || formFallBackError.attr('data-min-length-message') || 'Validation For Minimum Field Length Has Failed.';
10496	                BIOG.options.appendErrorElem($self, errorText);
10497	                flag = false;
10498	            } else if ((!isInputType && (regexValidation !== undefined) && (isTextAreaVal) && !BIOG.options.validateInputRegex(isTextAreaVal, regexValidation, $input.attr('type')))) {
10499	                errorText = $input.attr('data-regex-constraint-message') || formFallBackError.attr('data-regex-message') || 'Validation For Regular Expression Has Failed.';
10500	                BIOG.options.appendErrorElem($self, errorText);
10501	                flag = false;
10502	            } else {
10503	                $self.find('.hasError').remove();
10504	                $highLightElem.removeClass('highlightError');
10505                    $self.find('.mdc-text-field').removeClass('mdc-text-invalid');
10506	            }
10507	        } 
10508            else if ($self.find('.mdc-select').length && $self.find('.mdc-select-value').val()) {
10509                flag = true;
10510            } else {
10511	            if (selfvalue1 === '' || selfvalue1 === null) {
10512	                errorText = $inputReq.attr('data-cmp-required') || 'Required Field';
10513	                BIOG.options.appendErrorElem($self, errorText);
10514	                flag = false;
10515	            } else {
10516	                errorText = $input.attr('data-cmp-constraint') || '';
10517	                if (($input.attr('type') === 'email' && (selfvalue !== "") && !BIOG.options.validateEmail(selfvalue)) || ($input.attr('type') === 'tel' && (selfvalue !== "") && !BIOG.options.validatePhone(selfvalue))) {
10518	                    BIOG.options.appendErrorElem($self, errorText);
10519	                } else {
10520	                    $self.find('.hasError').remove();
10521	                    $highLightElem.removeClass('highlightError');
10522                        $self.find('.mdc-text-field').removeClass('mdc-text-invalid');
10523	                }
10524	            }
10525	        }
10526	    }
10527	    return flag;
10528	},
10529	
10530	formTextValidateOnBlur: function($elem) {
10531		   $elem = $(this);
10532	       var el = $('input,select,textarea'),
10533	        $hidden = $elem.attr('type') === 'hidden';
10534	    if (!$hidden) {
10535	        el.on('blur change', function() {
10536	            BIOG.options.validateFormFieldsElement($(this).closest('.form-group, .mdc-form-group'));
10537
10538	        });
10539	        return true;
10540	    }
10541	    return false;
10542	},
10543	populateValues: function($formel, name, fieldval) {
10544		var $elem = $formel.find("[name='" + name + "']");
10545		if (!($elem === undefined)) {
10546			var isAttrCheckOrRadio = $elem.attr('type') === 'checkbox' || $elem.attr('type') === 'radio';
10547			if (!($elem.attr('type') === undefined) && isAttrCheckOrRadio) {
10548				if ($elem.closest('.mdc-switch').length > 0) {
10549					$elem = $formel.find("[name='" + name + "'][value='" + fieldval + "']");
10550					$elem.closest('.mdc-switch').addClass('mdc-switch--checked');
10551				}
10552				$formel.find("[name='" + name + "'][value='" + fieldval + "']").attr("checked", "checked").triggerHandler("change");
10553			} else {
10554				$elem.val(fieldval).triggerHandler("change");
10555			}
10556			return true;
10557		}
10558		return false;
10559	},
10560	_validatePassword: function($elem) {
10561		var $changepwd = $('.changePasswordForm').length;
10562        var isValid = true,
10563        $currentPassword = $elem.find('input[name="current_password"]'),
10564        $password =$elem.find('input[name="password"]'),
10565        $confirmPassword = $elem.find('input[name="confirm_password"]');
10566        	var $passwordField = $password.closest('.form-group, .mdc-form-group'),
10567				$confirmPasswordField = $confirmPassword.closest('.form-group, .mdc-form-group'),
10568				errorText;
10569         	if (($changepwd > 0) && ($currentPassword.val() === $password.val())) {
10570				errorText = $password.attr('data-cmp-constraint') || '';
10571				BIOG.options.appendErrorElem($passwordField, errorText);
10572				isValid = false;
10573			}
10574			if ($password.val() !== $confirmPassword.val()) {
10575				errorText = $confirmPassword.attr('data-cmp-constraint') || '';
10576				BIOG.options.appendErrorElem($confirmPasswordField, errorText);
10577				isValid = false;
10578			}
10579        	if (($elem.find('.mdc-text-field').length > 0) && ($password.val() === $confirmPassword.val())) {
10580                    $elem.find('.mdc-text-field').removeClass('mdc-text-invalid');
10581			}
10582        return isValid;
10583	 },
10584	scrollToFocusElem: function($elem) {
10585		if($elem.length) {
10586			var $body = $('html, body'),
10587				$headerMainnavWrapper = $('#header-mainnav-wrapper'),
10588				$utilitynavWrapper =  $('.cmp-utilitynav-wrapper'),
10589				elemScrollTop;
10590			if($utilitynavWrapper.hasClass('sticky')) {
10591				elemScrollTop = $elem.offset().top - $('.header-utilitynav-wrapper').outerHeight();
10592			}else{
10593				elemScrollTop = $elem.offset().top - $('header').outerHeight() + $headerMainnavWrapper.outerHeight();
10594			}
10595			/* to scroll even top of the page when header has position fixed */
10596			if($headerMainnavWrapper.hasClass('sticky')) {
10597				elemScrollTop = $elem.offset().top - $headerMainnavWrapper.outerHeight() - 70;
10598			}
10599			$body.stop().animate({
10600				scrollTop: elemScrollTop
10601			}, 500);
10602		}
10603	},
10604	/*  Show/hide fields conditionally  */
10605	conditionalFunction: function ($elem) {
10606	var clearFlag = false;
10607		$.fn.conditionize = function (options) {
10608			var settings = $.extend({
10609				hideJS: true
10610			}, options);
10611			$.fn.showOrHide = function (listenTo, listenFor, $section) {
10612				var $listenToElem = $(listenTo);
10613				if(typeof listenFor === "boolean"){
10614					listenFor = listenFor.toString();
10615				}
10616				if ($listenToElem.is('select, input:not([type="radio"]):not([type="checkbox"])') && $listenToElem.val() === listenFor) {
10617					$section.slideDown();
10618					clearFlag = true;
10619				}else if ($listenToElem.val() && $listenToElem.val().length) {
10620				    var slideFlag = false;
10621				    $.each($(listenTo), function() {
10622				        if ($(this).val() === listenFor) {
10623				            slideFlag = true;
10624				            if ($(this).is(':checked')) {
10625				                $section.slideDown();
10626				                clearFlag = true;
10627				            } else if (!$(this).is(':checked')) {
10628				                $section.slideUp();
10629				                if(clearFlag){
10630				                	BIOG.options.clearFields($section);
10631				                }
10632				            }
10633				        }
10634						else {
10635                            if ($(this).is('select')) {
10636				                $section.slideUp();
10637                            } 
10638                        }
10639				    });
10640				    if (!slideFlag && $(listenTo + ":checked").val() === listenFor) {
10641				        $section.slideDown();
10642				        clearFlag = true;
10643				    }
10644				}else {
10645					$section.slideUp();
10646					if(clearFlag){
10647	                	BIOG.options.clearFields($section);
10648	                }
10649				}
10650			}
10651			return this.each(function () {
10652				var $self = $(this),
10653					listenTo = "[name=" + $self.data('cond-option') + "]",
10654					listenFor = $self.data('cond-value'),
10655					$section = $self;
10656				//Set up event listener
10657				$(listenTo).on('change', function () {
10658					$.fn.showOrHide(listenTo, listenFor, $section);
10659				});
10660				//If setting was chosen, hide everything first...
10661				if (settings.hideJS) {
10662					$self.hide();
10663				}
10664				//Show based on current value on page load
10665				$.fn.showOrHide(listenTo, listenFor, $section);
10666			});
10667		}
10668		var $conditionalElem = $elem.find('.conditional'),
10669			isPublishMode;
10670		/*  to check whether CQ object is present or not and handle if there is an error  */
10671		try {
10672		   isPublishMode = JSON.parse(iswcmModeEditMode) ? false : true;
10673		} catch(error) {
10674		   isPublishMode = true;
10675		}
10676		if($conditionalElem.length && isPublishMode) {
10677			$conditionalElem.conditionize();
10678		}
10679	},
10680	/* clearing to default values when fields are in hidden state*/
10681	clearFields:function($section){
10682		$section.find('input').prop('checked',false);
10683        $section.find('select').each(function(){
10684            var defaultVal =  $(this).find('option[disabled]').html();
10685            $(this).val(defaultVal);
10686        });
10687    },
10688	isInViewport: function($elem) {
10689		var elementTop = $elem.offset().top + $elem.outerHeight(),
10690			elementBottom = elementTop + $elem.outerHeight(),
10691			viewportTop = $(window).scrollTop(),
10692			viewportBottom = viewportTop + $(window).height();
10693		return elementBottom > viewportTop && elementTop < viewportBottom;
10694	},
10695	_anchorTargetClick: function() {
10696        $(document).on('click', 'a[href ^= "#"]', function(e) {
10697            var targetLink = $(this).attr('href');
10698            var anchortagVal = targetLink.replace('#', '');
10699            var targetElem;
10700            if (anchortagVal.length > 0) {
10701                targetElem = BIOG.options._getTargetElem(anchortagVal);
10702            }
10703            if (targetElem !== undefined && targetElem.length > 0) {
10704                e.preventDefault();
10705                BIOG.options._calcTargetPosition(targetElem);
10706            }
10707        });
10708       	BIOG.options._deepLinkingElemScroll();
10709    },
10710    _calcTargetPosition: function(elem) {
10711        if (elem.length) {
10712            var $bodyHtml = $('body,html');
10713            var scrollHeight = $(elem).offset().top;
10714            var headerHeightCal = BIOG.options._calStickyHeaderHeight();
10715			$bodyHtml.stop().animate({
10716				scrollTop: scrollHeight - headerHeightCal
10717			}, 1000);
10718		}
10719    },
10720    /*below function is used to scrollto the matched element  when the header is sticky*/
10721	_deepLinkingElemScroll:function(){
10722		var queryParameterOnLoad = window.location.hash;
10723        if (queryParameterOnLoad !== "") {
10724            var scrollElemAttr = queryParameterOnLoad.replace('#', '');
10725            var srolledElem ;
10726            var headerHeightCal = BIOG.options._calStickyHeaderHeight();
10727            if (scrollElemAttr.length > 0) {
10728                srolledElem = BIOG.options._getTargetElem(scrollElemAttr);
10729            }
10730            if(srolledElem !== undefined && srolledElem.length>0 && headerHeightCal!== undefined){
10731                $('html, body').stop().animate({
10732                    scrollTop: srolledElem.offset().top - headerHeightCal
10733                }, 1000);
10734            }
10735        }
10736	},
10737	/*below function is used to get the id/name element assosiated with the href value on a page*/
10738	_getTargetElem:function(elem){
10739        var targetElem;
10740        var targetElemNameAttr = $("[name= " + elem + "]").parent();
10741        var targetElemIdAttr = $("[id= " + elem + "]").parent();
10742        if(targetElemIdAttr.length >0){
10743            targetElem = targetElemIdAttr;
10744        }else{
10745            targetElem = targetElemNameAttr;
10746        }
10747        return targetElem;
10748    },
10749    /*below function is used to calculate the height of header when it is sticky*/
10750    _calStickyHeaderHeight: function() {
10751    	var $mainNavWrapper = $('.header-mainnav-wrapper');
10752    	var $utilityNavWrapper = $('.header-utilitynav-wrapper');
10753    	var $cmpUtilityNavWrapper = $('.cmp-utilitynav-wrapper');
10754        var $headerSticky = $mainNavWrapper.find('.cmp-main-nav-container').hasClass('sticky-nav') || $('.header').hasClass('sticky-mobile-header');
10755        var $utilitynavDivSticky = $('.cmp-utilitynav-wrapper').data('sticky-utilitynav');
10756		var $navigationHeight = $(".navigation-wrapper");
10757        var headerHeightCal = 0;
10758        if ($headerSticky || $utilitynavDivSticky) {
10759            if ($headerSticky && $utilitynavDivSticky) {
10760                if (BIOG.devices.isDesktop()) {
10761                    headerHeightCal = $mainNavWrapper.height() + $cmpUtilityNavWrapper.height();
10762                } else {
10763                    headerHeightCal = $utilityNavWrapper.height() + $cmpUtilityNavWrapper.height();
10764                }
10765            } else {
10766                if ($headerSticky && !$utilitynavDivSticky) {
10767                    if (BIOG.devices.isDesktop()) {
10768                        headerHeightCal = $mainNavWrapper.height();
10769                    } else {
10770                        headerHeightCal = $utilityNavWrapper.height();
10771                    }
10772                }
10773                if (!$headerSticky && $utilitynavDivSticky) {
10774                    headerHeightCal = $cmpUtilityNavWrapper.height();
10775                }
10776            }
10777           
10778        } else if($navigationHeight.length > 0){
10779			headerHeightCal = $navigationHeight.height();
10780		}
10781        if($('.sticky-list-dropdown .cmp-list-dropdown').length >0){
10782        	var $listSelectorSticky = $('.sticky-list-dropdown').find('.cmp-list-dropdown').first();
10783        	if($listSelectorSticky.length >0){
10784        		headerHeightCal =  headerHeightCal +  ($listSelectorSticky.height());
10785        	}
10786        }
10787        /*height added if notification banner exists*/
10788        if ($('.cmp-notification').length > 0) {
10789            if ($('.notification-banner-bg').data('sticky-notification')) {
10790                headerHeightCal = headerHeightCal + $('.cmp-notification').height();
10791            }
10792        }
10793        return headerHeightCal;
10794    },
10795	/*  generic ajax call implenatation
10796	 * formel is the form element, type is get or post for the request, url is the json url which needs to passed
10797	 * and data is the form data 
10798	 * hideloaderflag is need to set by default true and in any scenario if we need to skip it can be passed as false and give in fallback in particular componet
10799	 * callbacksucess is fallback sucess fn for form
10800	 * callbackfailure is fallback failure fn for any form*/
10801	ajaxCallHandler:function($formel,type,URL,data,hideLoaderFlag, showSstaticMsg, callbackSucess,callbackFailure){
10802		$.ajax({
10803			type: type,
10804			url: URL,
10805			data: data,
10806			success: function(response) {
10807				if(response.error === false){
10808                    $formel.parent().find('.alert-danger').addClass("hidden");
10809                    $formel.parent().find('.alert-success').removeClass("hidden");
10810                }
10811                else if(response.error === true){
10812                    $formel.parent().find('.alert-success').addClass("hidden");
10813                    $formel.parent().find('.alert-danger').removeClass("hidden");
10814                    BIOG.options.sucessErrorHandling($formel,response, showSstaticMsg);
10815                }
10816                else{
10817                	$formel.parent().find('.alert-success').addClass("hidden");
10818                    $formel.parent().find('.alert-danger').addClass("hidden");
10819                }
10820                if(hideLoaderFlag !== undefined && hideLoaderFlag === true){
10821                	BIOG.UTILS._hideLoader();
10822                }
10823                var $captchaEl = $formel.find('.g-recaptcha');
10824                if($captchaEl.length > 0) {
10825                	grecaptcha.reset();
10826                }
10827                callbackSucess(response,$formel);
10828            },
10829            error: function(response) {
10830                BIOG.UTILS._hideLoader();
10831                var $captchaEl = $formel.find('.g-recaptcha');
10832                if($captchaEl.length > 0) {
10833                	grecaptcha.reset();
10834                }
10835                BIOG.options.failureErrorHandling($formel,response);
10836                $formel.parent().find('.alert-danger').removeClass("hidden");
10837                callbackFailure(response);
10838            }
10839		});				
10840	},
10841	sucessErrorHandling: function($formel,response,showSstaticMsg){	
10842		var $appendErrorElem = $formel.parent().find('.alert-danger');
10843		var $staticErrorMsg = 'Something went wrong!';
10844		var $errorMsg = response.responseMsg;
10845		if(showSstaticMsg === true){
10846			$errorMsg = $staticErrorMsg + $errorMsg;
10847		}
10848		if(response.error === true){
10849			var $defaultMsg = $formel.parents().find('.cmp-error-messages-wrapper').data('default-message') || $errorMsg;
10850			if($defaultMsg !== undefined){
10851				$appendErrorElem.html($defaultMsg);
10852			}
10853		}		
10854	},
10855	failureErrorHandling: function($formel,response){
10856		var $appendErrorElem = $formel.parent().find('.alert-danger');
10857		var $errorEL = $formel.parents().find('.cmp-error-messages-wrapper');
10858		var $captchaEl = $formel.find('.g-recaptcha');
10859		var $staticErrorMsg = 'Something went wrong!';
10860		var $defaultMsg = $errorEL.data('default-message') || $staticErrorMsg;
10861		if(response.status === 500){
10862			var $serviceErrorMsg = $errorEL.data('status-500-message') || $defaultMsg;
10863			if($serviceErrorMsg != undefined){
10864				$appendErrorElem.html($serviceErrorMsg);
10865			}
10866		} else if(response.status === 400){
10867			var $badReqErrorMsg = $errorEL.data('status-400-message') || $defaultMsg;
10868			if($badReqErrorMsg != undefined){
10869				$appendErrorElem.html($badReqErrorMsg);
10870			}
10871			if($formel.find('.g-recaptcha').length > 0 ){
10872				var $captchaErrorMsg = $captchaEl.data('captcha-err-msg');
10873				if($captchaErrorMsg != undefined) {
10874					var $captchaErrorElem = $captchaEl.next();
10875					$captchaErrorElem.html($captchaErrorMsg);
10876				}
10877			}
10878		} else if(response.status === 401){
10879			var $unAuthorizedErrorMsg = $errorEL.data('status-401-message')  || $defaultMsg;
10880			if($unAuthorizedErrorMsg != undefined){
10881				$appendErrorElem.html($unAuthorizedErrorMsg);
10882			}
10883		} else if(response.status === 503){
10884			var $serviceUnAvilErrorMsg = $errorEL.data('status-503-message') || $defaultMsg;
10885			if($serviceUnAvilErrorMsg != undefined){
10886				$appendErrorElem.html($serviceUnAvilErrorMsg);
10887			}
10888		} else if(response.status === 404){
10889			var $serviceNotFoundErrorMsg = $errorEL.data('status-404-message') || $defaultMsg;
10890			if($serviceNotFoundErrorMsg != undefined){
10891				$appendErrorElem.html($serviceNotFoundErrorMsg);
10892			}
10893		} else if(response.status === 403){
10894			var $forbiddenErrorMsg = $errorEL.data('status-403-message') || $defaultMsg;
10895			if($forbiddenErrorMsg != undefined){
10896				$appendErrorElem.html($forbiddenErrorMsg);
10897			}
10898		} else{
10899			if($defaultMsg != undefined){
10900				$appendErrorElem.html($defaultMsg);
10901			}
10902		}		
10903		$appendErrorElem.removeClass("hidden");
10904	},
10905	formElemresponseMatch:function(formel,response){
10906		if(response !== undefined && response !== ''){
10907			var data = response;
10908			var $formElements = formel.find("input,select");
10909		    $formElements.each(function() {
10910		    	var inputName = $(this).attr("name");
10911		        var isCheckbox = $(this).attr('type') === 'checkbox';
10912		        Object.keys(data).forEach(function(key) {
10913		        	var populateVal;
10914		            if (key === inputName) {
10915		                if(isCheckbox === true){	
10916		                	var checkedVal =data[key];
10917		                	if (typeof checkedVal === "boolean" || typeof checkedVal === "string") {
10918		                	    var tempChedVal = "" + checkedVal;
10919		                	    checkedVal = [];
10920		                	    checkedVal.push(tempChedVal);
10921		                	}
10922			                for(var i=0; i<checkedVal.length; i++) {
10923			                    populateVal = checkedVal[i];
10924			                    BIOG.options.populateValues(formel, inputName, populateVal);
10925			                }
10926				        }
10927		                else{
10928		                	populateVal =data[key];
10929			                BIOG.options.populateValues(formel, inputName, populateVal);
10930		                }
10931		            }
10932		        });
10933		    });
10934		}
10935	},
10936	/*To handle sysnchroous ajax calls*/
10937	synchronousAjax:function($formel,type,URL,data) {
10938      return new Promise(function(resolve, reject) {
10939        $.ajax({
10940    	  type: type,	
10941          url: URL,
10942          data:data,
10943          success: function(response) {
10944				resolve(response); // Resolve promise and go to then()
10945          },
10946          error: function(err) {
10947            reject(err) // Reject the promise and go to catch()
10948          }
10949        })
10950      })
10951	},
10952	filteredValues:function($chkBoxelem,resultsArray,key){
10953		var chkedElemArray = [];
10954		var allElemArray = [];
10955		$.each($($chkBoxelem.find("input[type=checkbox]")), function() {
10956			  allElemArray.push($(this).val());
10957			if($(this).is(':checked')){
10958				chkedElemArray.push($(this).val());
10959			}
10960		});
10961		var resultsData= [];
10962		var resultsOriginal = resultsArray;
10963		resultsOriginal.filter(function(entry) {
10964			var resultElemArray = [];
10965			if ($.isArray(entry[key])){
10966				resultElemArray = entry[key];
10967			}
10968			else{
10969				resultElemArray.push(entry[key]);
10970				
10971			}
10972			var cssClassName = '';
10973			var allActiveFlag =false;
10974			var addToResults = false;
10975			if(($.inArray( 'BOTH', resultElemArray) !== -1) || ($.inArray('ALL', resultElemArray) !== -1)){
10976				allActiveFlag = true;
10977			}
10978			allElemArray.forEach(function(item,index){
10979				if(allActiveFlag || (($.inArray( item, chkedElemArray ) !== -1) && ($.inArray( item, resultElemArray) !== -1 ))){
10980					if(!addToResults && (chkedElemArray.length>0)){
10981						addToResults = true;
10982					}
10983					cssClassName +=  'icon-checkbox-' + item.toLowerCase().trim().replace(/\s/g, '-') + '-active ';
10984				}else{
10985					cssClassName += 'icon-checkbox-' +item.toLowerCase().trim().replace(/\s/g, '-')  + '-inactive ';
10986				}
10987				
10988			});
10989			entry.cssClass = cssClassName.trim();
10990			if(addToResults){
10991				resultsData.push(entry);
10992			}
10993		});
10994		return resultsData;
10995	},
10996	_generateHiddenKeys : function(selectedJsonResp) {
10997		var container = $('<div />');
10998		Object.keys(selectedJsonResp).forEach(function(key) {
10999			$('<input>').attr({
11000				type : 'hidden',
11001				name : key,
11002				value : selectedJsonResp[key]
11003			}).appendTo(container);
11004		});
11005		return container;
11006	},
11007	_entireTileClickable:function($this,clickedElem,dataArticleIdentifier){
11008		$this.each(function(){
11009			$(this).on({
11010	            mouseenter: function () {
11011	            	$(this).addClass('hoveredtile');
11012	            },
11013	            mouseleave: function () {
11014	                $(this).removeClass('hoveredtile');
11015	            }
11016            });
11017			 $(this).click(function(){
11018                if(dataArticleIdentifier !== undefined && dataArticleIdentifier.length>0){
11019					var deepLinkParameter =  $(this).data('article-identifier');
11020                    if(deepLinkParameter){
11021                    	location.href =  window.location.href.split('#')[0] + ('#'+deepLinkParameter);
11022                    }else{
11023                        window.history.pushState({}, document.title, window.location.pathname);
11024                    }
11025                }
11026	        	$(this).find(clickedElem)[0].click();
11027	        });
11028	   });
11029	},
11030	_checkboxAllAndNone: function() {	    
11031	    var allCheckboxFormElem = $('input:checkbox').closest(".form-group").find($(':checkbox'));
11032	    var noneVal = "NONE";
11033	    var allVal = "ALL";	    
11034	    if (allCheckboxFormElem !== undefined && allCheckboxFormElem.length > 0) {
11035	        allCheckboxFormElem.each(function() {
11036	        	var currentNoneEle = $(this).hasClass('icon-checkbox-none');
11037	            var currentAllEle = $(this).hasClass('icon-checkbox-all');
11038	        	if(currentNoneEle || currentAllEle) {
11039		            var currentFormElem = $(this).closest(".form-group");
11040		            currentFormElem.find('.icon-checkbox-all').click(function() {
11041		                if ($(this).prop('checked') === true) {
11042		                    $(this).closest('.form-group').find($(':checkbox')).each(function() {
11043		                        if ($(this).val().toLowerCase() !== noneVal.toLowerCase()) {
11044		                            $(this).prop('checked', true);
11045		                        }
11046		                    })
11047		                    currentFormElem.find('.icon-checkbox-none').prop('checked', false);
11048		                } else {
11049		                    $(this).closest('.form-group').find($(':checkbox')).each(function() {
11050		                        if ($(this).val().toLowerCase() !== noneVal.toLowerCase()) {
11051		                            $(this).prop('checked', false);
11052		                        }
11053		                    })
11054		                }
11055		            });
11056		            currentFormElem.find('.icon-checkbox-none').click(function() {
11057		                if ($(this).prop('checked') === true) {
11058		                    $(this).closest('.form-group').find($(':checkbox')).each(function() {
11059		                        $(this).prop('checked', false);
11060		                    })
11061		                    currentFormElem.find('.icon-checkbox-none').prop('checked', true);
11062		                }
11063		            });
11064		            currentFormElem.find($(':checkbox')).click(function(){	            	
11065		                var checkboxCount;
11066		                var currentFormGroup = $(this).closest(".form-group");
11067		                var currentChecBox = currentFormGroup.find($(':checkbox'));
11068		                var currentNoneEle = currentFormGroup.find($(':checkbox')).hasClass('icon-checkbox-none');
11069		                var currentAllEle = currentFormGroup.find($(':checkbox')).hasClass('icon-checkbox-all');
11070
11071	                    if (currentNoneEle && currentAllEle) {
11072	                        checkboxCount = 2;
11073	                    } else if (currentNoneEle || currentAllEle) {
11074	                        checkboxCount = 1;
11075	                    }
11076
11077						if ($(this).prop("checked") === false && $(this).val().toLowerCase() !== allVal.toLowerCase()) {
11078	                        if (currentChecBox.hasClass('icon-checkbox-all')) {
11079	                            currentFormGroup.find('.icon-checkbox-all').prop('checked', false);
11080	                        }
11081	                        if (currentChecBox.hasClass('icon-checkbox-none')) {
11082	                            currentFormGroup.find('.icon-checkbox-none').prop('checked', false);
11083	                        }
11084	                    } else if ($(this).prop("checked") === true && $(this).val().toLowerCase() !== noneVal.toLowerCase()) {
11085                            if (currentChecBox.hasClass('icon-checkbox-none')) {
11086	                            currentFormGroup.find('.icon-checkbox-none').prop('checked', false);
11087	                        }
11088	                    } else if (allCheckboxFormElem.find($(':checkbox')).not(':checked').length === 0) {
11089	                        if (currentChecBox.hasClass('icon-checkbox-all')) {
11090	                            currentFormGroup.find('.icon-checkbox-all').prop('checked', false);
11091	                        }
11092	                    }
11093	                    if (currentChecBox.length === currentChecBox.filter(':checked').length + checkboxCount &&
11094	                    currentFormGroup.find($(':checkbox')).hasClass('icon-checkbox-all') ) {	                       
11095	                        currentFormGroup.find('.icon-checkbox-all').prop('checked', true);	                      
11096	                    }
11097	                })
11098		        }
11099	        });
11100	    }
11101	},
11102	_shuffleTiles: function($elem, watchedArticleTilesList) {
11103	    $elem.each(function() {
11104	        var listTileWrapper = $(this);
11105	        listTileWrapper.children().removeClass('showTile make-tile-visible');
11106	        var dataMaxCount = listTileWrapper.attr('data-max-items');
11107	        var allPromoTiles = listTileWrapper.find('.cmp-tile-list.flex-unit');
11108	        var totalTilesLength = listTileWrapper.children().length;
11109	        var flexPos = [];
11110	        allPromoTiles.each(function() {
11111	            var flexPosVal = $(this).data('flex-position');
11112	            flexPos.push(flexPosVal);
11113	        });
11114	        var allNonPromoTiles = listTileWrapper.children().not('.cmp-tile-list.flex-unit');
11115	        var shuffleList = [];
11116	        if (watchedArticleTilesList) {
11117	        	var allUnwatchedList;
11118	            var allWatchedList ;
11119                if(allNonPromoTiles.find('.cmp-card-tile').hasClass('article-video-played')){
11120					allUnwatchedList = allNonPromoTiles.find('.cmp-card-tile').not('.article-video-played').parent();
11121	            	allWatchedList = allNonPromoTiles.find('.cmp-card-tile.article-video-played').parent();
11122                }else{
11123					allUnwatchedList = allNonPromoTiles.find('.cmp-card-tile').not('.article-video-completed').parent();
11124	            	allWatchedList = allNonPromoTiles.find('.cmp-card-tile.article-video-completed').parent();
11125                }
11126	            var unWatchedList = [];
11127	            var watchedList = [];
11128	            while (allUnwatchedList.length) {
11129	                unWatchedList.push(allUnwatchedList.splice(Math.floor(Math.random() * allUnwatchedList.length), 1)[0]);
11130	            }
11131	            while (allWatchedList.length) {
11132	                watchedList.push(allWatchedList.splice(Math.floor(Math.random() * allWatchedList.length), 1)[0]);
11133	            }
11134	            for (var m = 0; m < unWatchedList.length; m++) {
11135	            	shuffleList.push(unWatchedList[m]);
11136	            }
11137	            for (var k = 0; k < watchedList.length; k++) {
11138	            	shuffleList.push(watchedList[k]);
11139	            }
11140	        } else {
11141	            while (allNonPromoTiles.length) {
11142	                shuffleList.push(allNonPromoTiles.splice(Math.floor(Math.random() * allNonPromoTiles.length), 1)[0]);
11143	            }
11144	        }
11145	        var arr = [];
11146	        var allPromoIndex = 0;
11147	        var shuffleListIndex = 0;
11148	        for (var i = 0; i < totalTilesLength; i++) {
11149	            if ((allPromoTiles.length > 0) && ($.inArray(i, flexPos) !== -1)) {
11150	                arr.push(allPromoTiles[allPromoIndex]);
11151	                allPromoIndex++;
11152	            } else {
11153                    arr.push(shuffleList[shuffleListIndex]);
11154                    shuffleListIndex++;
11155	            }
11156	        }
11157	        listTileWrapper.children().remove();
11158	        listTileWrapper.append(arr);
11159	        for (var j = 0; j < dataMaxCount; j++) {
11160	            listTileWrapper.find('.cmp-tile-list').eq(j).addClass('showTile');
11161	        }
11162	        if (watchedArticleTilesList) {
11163	            listTileWrapper.find('.cmp-tile-list').not('.showTile').hide();
11164	        }
11165	    });
11166	},
11167	 /* This function handles to ignore the form fields from form submit*/
11168    _ignoreFieldFromSubmit: function(formData, removeField,formName) {
11169        if(formName === true){
11170           	formData = formData.not(function() {
11171           		return $(this).hasClass(removeField);
11172     	  	});
11173        } else {
11174            formData = formData.each(function(){
11175          		$(this).find("[class='" + removeField + "']").remove();
11176       		});
11177        }
11178       return formData;
11179 	},
11180 	/* select converts to custom dropdown specific js*/
11181 	_customDropdown: function($this) {
11182 	    var customSelectDiv, selElmnt, createSelectedDiv, createItemsDiv, createOptionsDiv;
11183 	    $this.parent().addClass('custom-select');
11184 	    customSelectDiv = document.getElementsByClassName("custom-select");
11185 	    for (var i = 0; i < customSelectDiv.length; i++) {
11186 	        selElmnt = customSelectDiv[i].getElementsByTagName("select")[0];
11187 	        createSelectedDiv = document.createElement("DIV");
11188 	        createSelectedDiv.setAttribute("class", "select-selected");
11189 	        createSelectedDiv.innerHTML = selElmnt.options[selElmnt.selectedIndex].innerHTML;
11190 	        customSelectDiv[i].appendChild(createSelectedDiv);
11191 	        createItemsDiv = document.createElement("DIV");
11192 	        createItemsDiv.setAttribute("class", "select-items select-hide");
11193 	        for (var j = 1; j < selElmnt.length; j++) {
11194 	            createOptionsDiv = document.createElement("DIV");
11195 	            createOptionsDiv.innerHTML = selElmnt.options[j].innerHTML;
11196				BIOG.options._clickSlectedItem(createOptionsDiv);
11197 	            createItemsDiv.appendChild(createOptionsDiv);
11198 	        }
11199 	        customSelectDiv[i].appendChild(createItemsDiv);
11200			BIOG.options._mouseEnterMouseLeave(createSelectedDiv,customSelectDiv[i]);
11201 	    }
11202 	},
11203 	_clickSlectedItem: function(selectDiv) {
11204 	    selectDiv.addEventListener("click", function() {
11205 	        var selectedDivReplace, selectItemsParentSelect, selectSiblings;
11206 	        selectItemsParentSelect = this.parentNode.parentNode.getElementsByTagName("select")[0];
11207 	        selectSiblings = this.parentNode.previousSibling;
11208 	        for (var m = 0; m < selectItemsParentSelect.length; m++) {
11209 	            if (selectItemsParentSelect.options[m].innerHTML === this.innerHTML) {
11210 	                selectItemsParentSelect.selectedIndex = m;
11211 	                selectSiblings.innerHTML = this.innerHTML;
11212 	                selectedDivReplace = this.parentNode.getElementsByClassName("same-as-selected");
11213 	                for (var k = 0; k < selectedDivReplace.length; k++) {
11214 	                    selectedDivReplace[k].removeAttribute("class");
11215 	                }
11216 	                this.setAttribute("class", "same-as-selected");
11217 	                break;
11218 	            }
11219 	        }
11220 	        selectSiblings.click();
11221 	        BIOG.options._selectedTriggerChange($(selectItemsParentSelect));
11222 	    });
11223 	},
11224 	_mouseEnterMouseLeave: function(mouseEnterElem, mouseLeaveElem) {
11225 	    mouseEnterElem.addEventListener("mouseenter", function(e) {
11226 	        e.stopPropagation();
11227 	        this.nextSibling.classList.toggle("select-hide");
11228 	    });
11229 	    mouseLeaveElem.addEventListener("mouseleave", function(e) {
11230 	        e.stopPropagation();
11231 	        BIOG.options._closeAllSelect();
11232 	    });
11233 	},
11234 	/*a function that will close all select boxes in the document,
11235	  except the current select box:*/
11236 	_closeAllSelect: function() {
11237 	    var selectItems, arrNo = [];
11238 	    selectItems = document.getElementsByClassName("select-items");
11239 	    for (var n = 0; n < selectItems.length; n++) {
11240 	        if (arrNo.indexOf(n)) {
11241 	            selectItems[n].classList.add("select-hide");
11242 	        }
11243 	    }
11244 	},
11245	/* matching custom dropdown div text with select option text and trigger change on hover*/
11246 	_selectedTriggerChange: function($this) {
11247 		var selectetedText = $this.parent().find('.select-selected').text();
11248 	    var triggerFlag = false;
11249 	    $this.find('option').each(function() {
11250 	        if ($(this).val() !== "0" && $(this).val() !== null && $(this).text() === selectetedText) {
11251 	        	triggerFlag = true;
11252 	            $(this).attr('selected', 'selected');
11253                 return false;
11254 	        }
11255 	    });
11256 	    if(triggerFlag){
11257 	    	$this.trigger("change");
11258            BIOG.options._closeAllSelect(this);
11259 	    }
11260 	},
11261    _countErrorFields: function($formEl){
11262		var count= $formEl.find('.form-group, .mdc-form-group').find('.hasError').length;
11263		return count;
11264    }
11265};
11266BIOG.dateUtils = {
11267	_dateminMax: function($elem) {
11268		var $input = $elem.find('input[type="date"]');
11269		var $inputJqueryDate = $elem.find('input[type="text"][class="jq-datepicker"]');
11270	    var isInputDate = $input.attr('type') === 'date';
11271	    var isJqueryDate = $inputJqueryDate.attr('type') === 'text' && $inputJqueryDate.attr('class') === 'jq-datepicker';
11272        var minLength = $input.attr('minlength');
11273        var maxLength = $input.attr('maxlength');
11274        var minLengthJqueryDate = $inputJqueryDate.attr('minlength');
11275        var maxLengthJqueryDate = $inputJqueryDate.attr('maxlength');
11276        var jqueryDateFormat =  $inputJqueryDate.attr('data-date-format');
11277        if ((minLengthJqueryDate !== undefined || maxLengthJqueryDate !== undefined) && isJqueryDate === true) {
11278        	$inputJqueryDate.datepicker({ 
11279        		dateFormat:jqueryDateFormat,
11280            	minDate: minLengthJqueryDate, 
11281            	maxDate: maxLengthJqueryDate 
11282            });
11283        }
11284        else {
11285        	if((minLength !== undefined || maxLength !== undefined) && isInputDate === true) {
11286	            var futureMin = new Date(); // get today date
11287	            futureMin.setDate(futureMin.getDate() + parseInt(minLength)); // add min days
11288	            var finalDateMin = futureMin.getFullYear() + '-' + ((futureMin.getMonth() + 1) < 10 ? '0' : '') + (futureMin.getMonth() + 1) + '-' + (futureMin.getDate() < 10 ? '0' : '') + futureMin.getDate();
11289	            var futureMax = new Date(); // get today date
11290	            futureMax.setDate(futureMax.getDate() + parseInt(maxLength)); // add max days
11291	            var finalDateMax = futureMax.getFullYear() + '-' + ((futureMax.getMonth() + 1) < 10 ? '0' : '') + (futureMax.getMonth() + 1) + '-' + (futureMax.getDate() < 10 ? '0' : '') + futureMax.getDate();
11292	            if (minLength !== undefined)
11293	                $input.attr('min', finalDateMin);
11294	            if (maxLength !== undefined)
11295	                $input.attr('max', finalDateMax);
11296	        }
11297        }
11298    }
11299}
11300$(document).ready(function() {	
11301	var $this = $(this).find('form.user-form');
11302	var $formGroupDiv = $this.find('.form-group');
11303    if($formGroupDiv !== undefined && $formGroupDiv.length >0){
11304        $formGroupDiv.each(function() {
11305            BIOG.dateUtils._dateminMax($(this).closest('.form-group'));
11306            $(this).find('.jq-datepicker').keypress(function(e) {
11307                e.preventDefault();
11308            });
11309        });
11310        if ($('[data-qname]').length > 0) {
11311            var qParamInput = $('[data-qname]');
11312            qParamInput.each(function() {
11313                var qparamName = $(this).attr('data-qname');
11314                if (BIOG.options.getQueryParam(qparamName)) {
11315                    var getQparamVal = BIOG.options.getQueryParam(qparamName);
11316                    $(this).val(getQparamVal);
11317                }
11318            });
11319        }
11320    }
11321});
11322BIOG.UTILS = {
11323    _showLoader: function($form) {
11324        var $loaderEl = $('#biog-loader');
11325        BIOG.UTILS._showLoaderDEesc($form);
11326        //To showloader for particular form not to entire page.       
11327        $loaderEl.clone().insertAfter($form.parent());
11328        $form.closest('.section').addClass('loaderPosition');
11329        $form.parent().next().addClass('form-biog-loader').removeClass('d-none');
11330        $('.footer').find('#biog-loader').remove();
11331    },
11332    _hideLoader: function() {
11333        $('.biog-loader').each(function(){
11334         	  $(this).addClass('d-none');
11335        });
11336    },
11337    /*function to show loader description specific to the form.*/
11338    _showLoaderDEesc: function($this) {
11339        if ($this.closest('[data-loader-description]').length > 0) {
11340            var dataLoaderDiv = $this.closest('[data-loader-description]'),
vendor: 27,121 bytes, lines 11341-11347
11341                loaderDesc = dataLoaderDiv.attr('data-loader-description'),
11342                loaderIconClass = dataLoaderDiv.attr('class');
11343            $('.biog-loader').addClass(loaderIconClass).append('<div class="loader-desc">' + loaderDesc + '</div>');
11344        }
11345    }
11346}
11347!function(e){function t(a,n){return this instanceof t?(e.isPlainObject(a)?n=a:(n=n||{},n.alias=a),this.el=void 0,this.opts=e.extend(!0,{},this.defaults,n),this.maskset=void 0,this.noMasksCache=n&&void 0!==n.definitions,this.userOptions=n||{},this.events={},this.dataAttribute="data-inputmask",this.isRTL=this.opts.numericInput,void i(this.opts.alias,n,this.opts)):new t(a,n)}function i(t,a,n){var r=n.aliases[t];return r?(r.alias&&i(r.alias,void 0,n),e.extend(!0,n,r),e.extend(!0,n,a),!0):(null===n.mask&&(n.mask=t),!1)}function a(i,a){function n(i,n,r){if(null!==i&&""!==i){if(1===i.length&&r.greedy===!1&&0!==r.repeat&&(r.placeholder=""),r.repeat>0||"*"===r.repeat||"+"===r.repeat){var o="*"===r.repeat?0:"+"===r.repeat?1:r.repeat;i=r.groupmarker.start+i+r.groupmarker.end+r.quantifiermarker.start+o+","+r.repeat+r.quantifiermarker.end}var s;return void 0===t.prototype.masksCache[i]||a===!0?(s={mask:i,maskToken:t.prototype.analyseMask(i,r),validPositions:{},_buffer:void 0,buffer:void 0,tests:{},metadata:n,maskLength:void 0},a!==!0&&(t.prototype.masksCache[r.numericInput?i.split("").reverse().join(""):i]=s,s=e.extend(!0,{},t.prototype.masksCache[r.numericInput?i.split("").reverse().join(""):i]))):s=e.extend(!0,{},t.prototype.masksCache[r.numericInput?i.split("").reverse().join(""):i]),s}}var r;if(e.isFunction(i.mask)&&(i.mask=i.mask(i)),e.isArray(i.mask)){if(i.mask.length>1){i.keepStatic=null===i.keepStatic||i.keepStatic;var o=i.groupmarker.start;return e.each(i.numericInput?i.mask.reverse():i.mask,function(t,a){o.length>1&&(o+=i.groupmarker.end+i.alternatormarker+i.groupmarker.start),o+=void 0===a.mask||e.isFunction(a.mask)?a:a.mask}),o+=i.groupmarker.end,n(o,i.mask,i)}i.mask=i.mask.pop()}return i.mask&&(r=void 0===i.mask.mask||e.isFunction(i.mask.mask)?n(i.mask,i.mask,i):n(i.mask.mask,i.mask,i)),r}function n(i,a,r){function c(e,t,i){t=t||0;var a,n,o,s=[],l=0,u=f();V=void 0!==W?W.maxLength:void 0,V===-1&&(V=void 0);do e===!0&&p().validPositions[l]?(o=p().validPositions[l],n=o.match,a=o.locator.slice(),s.push(i===!0?o.input:i===!1?n.nativeDef:_(l,n))):(o=v(l,a,l-1),n=o.match,a=o.locator.slice(),(r.jitMasking===!1||l<u||"number"==typeof r.jitMasking&&isFinite(r.jitMasking)&&r.jitMasking>l)&&s.push(i===!1?n.nativeDef:_(l,n))),l++;while((void 0===V||l<V)&&(null!==n.fn||""!==n.def)||t>l);return""===s[s.length-1]&&s.pop(),p().maskLength=l+1,s}function p(){return a}function d(e){var t=p();t.buffer=void 0,e!==!0&&(t._buffer=void 0,t.validPositions={},t.p=0)}function f(e,t,i){var a=-1,n=-1,r=i||p().validPositions;void 0===e&&(e=-1);for(var o in r){var s=parseInt(o);r[s]&&(t||null!==r[s].match.fn)&&(s<=e&&(a=s),s>=e&&(n=s))}return a!==-1&&e-a>1||n<e?a:n}function m(t,i,a,n){function o(e){var t=p().validPositions[e];if(void 0!==t&&null===t.match.fn){var i=p().validPositions[e-1],a=p().validPositions[e+1];return void 0!==i&&void 0!==a}return!1}var s,l=t,u=e.extend(!0,{},p().validPositions),c=!1;for(p().p=t,s=i-1;s>=l;s--)void 0!==p().validPositions[s]&&(a!==!0&&(!p().validPositions[s].match.optionality&&o(s)||r.canClearPosition(p(),s,f(),n,r)===!1)||delete p().validPositions[s]);for(d(!0),s=l+1;s<=f();){for(;void 0!==p().validPositions[l];)l++;if(s<l&&(s=l+1),void 0===p().validPositions[s]&&E(s))s++;else{var m=v(s);c===!1&&u[l]&&u[l].match.def===m.match.def?(p().validPositions[l]=e.extend(!0,{},u[l]),p().validPositions[l].input=m.input,delete p().validPositions[s],s++):y(l,m.match.def)?A(l,m.input||_(s),!0)!==!1&&(delete p().validPositions[s],s++,c=!0):E(s)||(s++,l--),l++}}d(!0)}function h(e,t){for(var i,a=e,n=f(),o=p().validPositions[n]||k(0)[0],s=void 0!==o.alternation?o.locator[o.alternation].toString().split(","):[],l=0;l<a.length&&(i=a[l],!(i.match&&(r.greedy&&i.match.optionalQuantifier!==!0||(i.match.optionality===!1||i.match.newBlockMarker===!1)&&i.match.optionalQuantifier!==!0)&&(void 0===o.alternation||o.alternation!==i.alternation||void 0!==i.locator[o.alternation]&&S(i.locator[o.alternation].toString().split(","),s)))||t===!0&&(null!==i.match.fn||/[0-9a-bA-Z]/.test(i.match.def)));l++);return i}function v(e,t,i){return p().validPositions[e]||h(k(e,t?t.slice():t,i))}function g(e){return p().validPositions[e]?p().validPositions[e]:k(e)[0]}function y(e,t){for(var i=!1,a=k(e),n=0;n<a.length;n++)if(a[n].match&&a[n].match.def===t){i=!0;break}return i}function k(t,i,a){function n(i,a,o,s){function u(o,s,d){function h(t,i){var a=0===e.inArray(t,i.matches);return a||e.each(i.matches,function(e,n){if(n.isQuantifier===!0&&(a=h(t,i.matches[e-1])))return!1}),a}function g(t,i,a){var n,r;return(p().tests[t]||p().validPositions[t])&&e.each(p().tests[t]||[p().validPositions[t]],function(e,t){var o=void 0!==a?a:t.alternation,s=void 0!==t.locator[o]?t.locator[o].toString().indexOf(i):-1;(void 0===r||s<r)&&s!==-1&&(n=t,r=s)}),n?n.locator.slice((void 0!==a?a:n.alternation)+1):void 0!==a?g(t,i):void 0}function y(e,i){return null===e.match.fn&&null!==i.match.fn&&i.match.fn.test(e.match.def,p(),t,!1,r,!1)}if(c>1e4)throw"Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. "+p().mask;if(c===t&&void 0===o.matches)return f.push({match:o,locator:s.reverse(),cd:v}),!0;if(void 0!==o.matches){if(o.isGroup&&d!==o){if(o=u(i.matches[e.inArray(o,i.matches)+1],s))return!0}else if(o.isOptional){var k=o;if(o=n(o,a,s,d)){if(l=f[f.length-1].match,!h(l,k))return!0;m=!0,c=t}}else if(o.isAlternator){var x,b=o,P=[],w=f.slice(),S=s.length,A=a.length>0?a.shift():-1;if(A===-1||"string"==typeof A){var E,C=c,R=a.slice(),M=[];if("string"==typeof A)M=A.split(",");else for(E=0;E<b.matches.length;E++)M.push(E);for(var O=0;O<M.length;O++){if(E=parseInt(M[O]),f=[],a=g(c,E,S)||R.slice(),o=u(b.matches[E]||i.matches[E],[E].concat(s),d)||o,o!==!0&&void 0!==o&&M[M.length-1]<b.matches.length){var _=e.inArray(o,i.matches)+1;i.matches.length>_&&(o=u(i.matches[_],[_].concat(s.slice(1,s.length)),d),o&&(M.push(_.toString()),e.each(f,function(e,t){t.alternation=s.length-1})))}x=f.slice(),c=C,f=[];for(var I=0;I<x.length;I++){var j=x[I],D=!1;j.alternation=j.alternation||S;for(var F=0;F<P.length;F++){var N=P[F];if(("string"!=typeof A||e.inArray(j.locator[j.alternation].toString(),M)!==-1)&&(j.match.def===N.match.def||y(j,N))){D=j.match.nativeDef===N.match.nativeDef,j.alternation==N.alternation&&N.locator[N.alternation].toString().indexOf(j.locator[j.alternation])===-1&&(N.locator[N.alternation]=N.locator[N.alternation]+","+j.locator[j.alternation],N.alternation=j.alternation,null==j.match.fn&&(N.na=N.na||j.locator[j.alternation].toString(),N.na.indexOf(j.locator[j.alternation])===-1&&(N.na=N.na+","+j.locator[j.alternation])));break}}D||P.push(j)}}"string"==typeof A&&(P=e.map(P,function(t,i){if(isFinite(i)){var a,n=t.alternation,r=t.locator[n].toString().split(",");t.locator[n]=void 0,t.alternation=void 0;for(var o=0;o<r.length;o++)a=e.inArray(r[o],M)!==-1,a&&(void 0!==t.locator[n]?(t.locator[n]+=",",t.locator[n]+=r[o]):t.locator[n]=parseInt(r[o]),t.alternation=n);if(void 0!==t.locator[n])return t}})),f=w.concat(P),c=t,m=f.length>0,a=R.slice()}else o=u(b.matches[A]||i.matches[A],[A].concat(s),d);if(o)return!0}else if(o.isQuantifier&&d!==i.matches[e.inArray(o,i.matches)-1])for(var T=o,G=a.length>0?a.shift():0;G<(isNaN(T.quantifier.max)?G+1:T.quantifier.max)&&c<=t;G++){var B=i.matches[e.inArray(T,i.matches)-1];if(o=u(B,[G].concat(s),B)){if(l=f[f.length-1].match,l.optionalQuantifier=G>T.quantifier.min-1,h(l,B)){if(G>T.quantifier.min-1){m=!0,c=t;break}return!0}return!0}}else if(o=n(o,a,s,d))return!0}else c++}for(var d=a.length>0?a.shift():0;d<i.matches.length;d++)if(i.matches[d].isQuantifier!==!0){var h=u(i.matches[d],[d].concat(o),s);if(h&&c===t)return h;if(c>t)break}}function o(t){var i=[];return e.isArray(t)||(t=[t]),t.length>0&&(void 0===t[0].alternation?(i=h(t.slice()).locator.slice(),0===i.length&&(i=t[0].locator.slice())):e.each(t,function(e,t){if(""!==t.def)if(0===i.length)i=t.locator.slice();else for(var a=0;a<i.length;a++)t.locator[a]&&i[a].toString().indexOf(t.locator[a])===-1&&(i[a]+=","+t.locator[a])})),i}function s(e){return r.keepStatic&&t>0&&e.length>1+(""===e[e.length-1].match.def?1:0)&&e[0].match.optionality!==!0&&e[0].match.optionalQuantifier!==!0&&null===e[0].match.fn&&!/[0-9a-bA-Z]/.test(e[0].match.def)?[h(e)]:e}var l,u=p().maskToken,c=i?a:0,d=i?i.slice():[0],f=[],m=!1,v=i?i.join(""):"";if(t>-1){if(void 0===i){for(var g,y=t-1;void 0===(g=p().validPositions[y]||p().tests[y])&&y>-1;)y--;void 0!==g&&y>-1&&(d=o(g),v=d.join(""),c=y)}if(p().tests[t]&&p().tests[t][0].cd===v)return s(p().tests[t]);for(var k=d.shift();k<u.length;k++){var x=n(u[k],d,[k]);if(x&&c===t||c>t)break}}return(0===f.length||m)&&f.push({match:{fn:null,cardinality:0,optionality:!0,casing:null,def:"",placeholder:""},locator:[],cd:v}),void 0!==i&&p().tests[t]?s(e.extend(!0,[],f)):(p().tests[t]=e.extend(!0,[],f),s(p().tests[t]))}function x(){return void 0===p()._buffer&&(p()._buffer=c(!1,1),void 0===p().buffer&&p()._buffer.slice()),p()._buffer}function b(e){return void 0!==p().buffer&&e!==!0||(p().buffer=c(!0,f(),!0)),p().buffer}function P(e,t,i){var a;if(e===!0)d(),e=0,t=i.length;else for(a=e;a<t;a++)delete p().validPositions[a];for(a=e;a<t;a++)d(!0),i[a]!==r.skipOptionalPartCharacter&&A(a,i[a],!0,!0)}function w(e,i,a){switch(r.casing||i.casing){case"upper":e=e.toUpperCase();break;case"lower":e=e.toLowerCase();break;case"title":var n=p().validPositions[a-1];e=0===a||n&&n.input===String.fromCharCode(t.keyCode.SPACE)?e.toUpperCase():e.toLowerCase()}return e}function S(t,i){for(var a=r.greedy?i:i.slice(0,1),n=!1,o=0;o<t.length;o++)if(e.inArray(t[o],a)!==-1){n=!0;break}return n}function A(i,a,n,o,s){function l(e){var t=q?e.begin-e.end>1||e.begin-e.end===1&&r.insertMode:e.end-e.begin>1||e.end-e.begin===1&&r.insertMode;return t&&0===e.begin&&e.end===p().maskLength?"full":t}function u(t,a,n){var s=!1;return e.each(k(t),function(u,c){for(var h=c.match,v=a?1:0,g="",y=h.cardinality;y>v;y--)g+=M(t-(y-1));if(a&&(g+=a),b(!0),s=null!=h.fn?h.fn.test(g,p(),t,n,r,l(i)):(a===h.def||a===r.skipOptionalPartCharacter)&&""!==h.def&&{c:h.placeholder||h.def,pos:t},s!==!1){var k=void 0!==s.c?s.c:a;k=k===r.skipOptionalPartCharacter&&null===h.fn?h.placeholder||h.def:k;var S=t,E=b();if(void 0!==s.remove&&(e.isArray(s.remove)||(s.remove=[s.remove]),e.each(s.remove.sort(function(e,t){return t-e}),function(e,t){m(t,t+1,!0)})),void 0!==s.insert&&(e.isArray(s.insert)||(s.insert=[s.insert]),e.each(s.insert.sort(function(e,t){return e-t}),function(e,t){A(t.pos,t.c,!0,o)})),s.refreshFromBuffer){var C=s.refreshFromBuffer;if(n=!0,P(C===!0?C:C.start,C.end,E),void 0===s.pos&&void 0===s.c)return s.pos=f(),!1;if(S=void 0!==s.pos?s.pos:t,S!==t)return s=e.extend(s,A(S,k,!0,o)),!1}else if(s!==!0&&void 0!==s.pos&&s.pos!==t&&(S=s.pos,P(t,S,b().slice()),S!==t))return s=e.extend(s,A(S,k,!0)),!1;return(s===!0||void 0!==s.pos||void 0!==s.c)&&(u>0&&d(!0),x(S,e.extend({},c,{input:w(k,h,S)}),o,l(i))||(s=!1),!1)}}),s}function c(t,i,a){var n,s,l,u,c,m,h,v,g=e.extend(!0,{},p().validPositions),y=!1,x=f();for(u=p().validPositions[x];x>=0;x--)if(l=p().validPositions[x],l&&void 0!==l.alternation){if(n=x,s=p().validPositions[n].alternation,u.locator[l.alternation]!==l.locator[l.alternation])break;u=l}if(void 0!==s){v=parseInt(n);var b=void 0!==u.locator[u.alternation||s]?u.locator[u.alternation||s]:h[0];b.length>0&&(b=b.split(",")[0]);var P=p().validPositions[v],w=p().validPositions[v-1];e.each(k(v,w?w.locator:void 0,v-1),function(n,l){h=l.locator[s]?l.locator[s].toString().split(","):[];for(var u=0;u<h.length;u++){var k=[],x=0,w=0,S=!1;if(b<h[u]&&(void 0===l.na||e.inArray(h[u],l.na.split(","))===-1)){p().validPositions[v]=e.extend(!0,{},l);var E=p().validPositions[v].locator;for(p().validPositions[v].locator[s]=parseInt(h[u]),null==l.match.fn?(P.input!==l.match.def&&(S=!0,P.generatedInput!==!0&&k.push(P.input)),w++,p().validPositions[v].generatedInput=!/[0-9a-bA-Z]/.test(l.match.def),p().validPositions[v].input=l.match.def):p().validPositions[v].input=P.input,c=v+1;c<f(void 0,!0)+1;c++)m=p().validPositions[c],m&&m.generatedInput!==!0&&/[0-9a-bA-Z]/.test(m.input)?k.push(m.input):c<t&&x++,delete p().validPositions[c];for(S&&k[0]===l.match.def&&k.shift(),d(!0),y=!0;k.length>0;){var C=k.shift();if(C!==r.skipOptionalPartCharacter&&!(y=A(f(void 0,!0)+1,C,!1,o,!0)))break}if(y){p().validPositions[v].locator=E;var R=f(t)+1;for(c=v+1;c<f()+1;c++)m=p().validPositions[c],(void 0===m||null==m.match.fn)&&c<t+(w-x)&&w++;t+=w-x,y=A(t>R?R:t,i,a,o,!0)}if(y)return!1;d(),p().validPositions=e.extend(!0,{},g)}}})}return y}function g(t,i){var a=p().validPositions[i];if(a)for(var n=a.locator,r=n.length,o=t;o<i;o++)if(void 0===p().validPositions[o]&&!E(o,!0)){var s=k(o),l=s[0],u=-1;e.each(s,function(e,t){for(var i=0;i<r&&void 0!==t.locator[i]&&S(t.locator[i].toString().split(","),n[i].toString().split(","));i++)u<i&&(u=i,l=t)}),x(o,e.extend({},l,{input:l.match.placeholder||l.match.def}),!0)}}function x(t,i,a,n){if(n||r.insertMode&&void 0!==p().validPositions[t]&&void 0===a){var o,s=e.extend(!0,{},p().validPositions),l=f(void 0,!0);for(o=t;o<=l;o++)delete p().validPositions[o];p().validPositions[t]=e.extend(!0,{},i);var u,c=!0,m=p().validPositions,h=!1,v=p().maskLength;for(o=u=t;o<=l;o++){var g=s[o];if(void 0!==g)for(var k=u;k<p().maskLength&&(null===g.match.fn&&m[o]&&(m[o].match.optionalQuantifier===!0||m[o].match.optionality===!0)||null!=g.match.fn);){if(k++,h===!1&&s[k]&&s[k].match.def===g.match.def)p().validPositions[k]=e.extend(!0,{},s[k]),p().validPositions[k].input=g.input,R(k),u=k,c=!0;else if(y(k,g.match.def)){var x=A(k,g.input,!0,!0);c=x!==!1,u=x.caret||x.insert?f():k,h=!0}else c=g.generatedInput===!0;if(p().maskLength<v&&(p().maskLength=v),c)break}if(!c)break}if(!c)return p().validPositions=e.extend(!0,{},s),d(!0),!1}else p().validPositions[t]=e.extend(!0,{},i);return d(!0),!0}function R(t){for(var i=t-1;i>-1&&!p().validPositions[i];i--);var a,n;for(i++;i<t;i++)void 0===p().validPositions[i]&&(r.jitMasking===!1||r.jitMasking>i)&&(n=k(i,v(i-1).locator,i-1).slice(),""===n[n.length-1].match.def&&n.pop(),a=h(n),a&&(a.match.def===r.radixPointDefinitionSymbol||!E(i,!0)||e.inArray(r.radixPoint,b())<i&&a.match.fn&&a.match.fn.test(_(i),p(),i,!1,r))&&(I=u(i,a.match.placeholder||(null==a.match.fn?a.match.def:""!==_(i)?_(i):b()[i]),!0),I!==!1&&(p().validPositions[I.pos||i].generatedInput=!0)))}n=n===!0;var O=i;void 0!==i.begin&&(O=q&&!l(i)?i.end:i.begin);var I=!1,j=e.extend(!0,{},p().validPositions);if(R(O),l(i)&&(G(void 0,t.keyCode.DELETE,i),O=p().p),O<p().maskLength&&(I=u(O,a,n),(!n||o===!0)&&I===!1)){var D=p().validPositions[O];if(!D||null!==D.match.fn||D.match.def!==a&&a!==r.skipOptionalPartCharacter){if((r.insertMode||void 0===p().validPositions[C(O)])&&!E(O,!0)){var F=k(O).slice();""===F[F.length-1].match.def&&F.pop();var N=h(F,!0);N&&null===N.match.fn&&(N=N.match.placeholder||N.match.def,u(O,N,n),p().validPositions[O].generatedInput=!0);for(var T=O+1,B=C(O);T<=B;T++)if(I=u(T,a,n),I!==!1){g(O,void 0!==I.pos?I.pos:T),O=T;break}}}else I={caret:C(O)}}return I===!1&&r.keepStatic&&!n&&s!==!0&&(I=c(O,a,n)),I===!0&&(I={pos:O}),e.isFunction(r.postValidation)&&I!==!1&&!n&&o!==!0&&(I=!!r.postValidation(b(!0),I,r)&&I),void 0===I.pos&&(I.pos=O),I===!1&&(d(!0),p().validPositions=e.extend(!0,{},j)),I}function E(e,t){var i;if(t?(i=v(e).match,""===i.def&&(i=g(e).match)):i=g(e).match,null!=i.fn)return i.fn;if(t!==!0&&e>-1){var a=k(e);return a.length>1+(""===a[a.length-1].match.def?1:0)}return!1}function C(e,t){var i=p().maskLength;if(e>=i)return i;for(var a=e;++a<i&&(t===!0&&(g(a).match.newBlockMarker!==!0||!E(a))||t!==!0&&!E(a)););return a}function R(e,t){var i,a=e;if(a<=0)return 0;for(;--a>0&&(t===!0&&g(a).match.newBlockMarker!==!0||t!==!0&&!E(a)&&(i=k(a),i.length<2||2===i.length&&""===i[1].match.def)););return a}function M(e){return void 0===p().validPositions[e]?_(e):p().validPositions[e].input}function O(t,i,a,n,o){if(n&&e.isFunction(r.onBeforeWrite)){var s=r.onBeforeWrite(n,i,a,r);if(s){if(s.refreshFromBuffer){var l=s.refreshFromBuffer;P(l===!0?l:l.start,l.end,s.buffer||i),i=b(!0)}void 0!==a&&(a=void 0!==s.caret?s.caret:a)}}t.inputmask._valueSet(i.join("")),void 0===a||void 0!==n&&"blur"===n.type?L(t,i,a):D(t,a),o===!0&&(Y=!0,e(t).trigger("input"))}function _(e,t){if(t=t||g(e).match,void 0!==t.placeholder)return t.placeholder;if(null===t.fn){if(e>-1&&void 0===p().validPositions[e]){var i,a=k(e),n=[];if(a.length>1+(""===a[a.length-1].match.def?1:0))for(var o=0;o<a.length;o++)if(a[o].match.optionality!==!0&&a[o].match.optionalQuantifier!==!0&&(null===a[o].match.fn||void 0===i||a[o].match.fn.test(i.match.def,p(),e,!0,r)!==!1)&&(n.push(a[o]),null===a[o].match.fn&&(i=a[o]),n.length>1&&/[0-9a-bA-Z]/.test(n[0].match.def)))return r.placeholder.charAt(e%r.placeholder.length)}return t.def}return r.placeholder.charAt(e%r.placeholder.length)}function I(i,a,n,o,s,l){function u(){var e=!1,t=x().slice(h,C(h)).join("").indexOf(m);if(t!==-1&&!E(h)){e=!0;for(var i=x().slice(h,h+t),a=0;a<i.length;a++)if(" "!==i[a]){e=!1;break}}return e}var c=o.slice(),m="",h=0,g=void 0;if(d(),p().p=C(-1),!n)if(r.autoUnmask!==!0){var y=x().slice(0,C(-1)).join(""),k=c.join("").match(new RegExp("^"+t.escapeRegex(y),"g"));k&&k.length>0&&(c.splice(0,k.length*y.length),h=C(h))}else h=C(h);if(e.each(c,function(t,a){if(void 0!==a){var o=new e.Event("keypress");o.which=a.charCodeAt(0),m+=a;var s=f(void 0,!0),l=p().validPositions[s],c=v(s+1,l?l.locator.slice():void 0,s);if(!u()||n||r.autoUnmask){var y=n?t:null==c.match.fn&&c.match.optionality&&s+1<p().p?s+1:p().p;g=ee.keypressEvent.call(i,o,!0,!1,n,y),h=y+1,m=""}else g=ee.keypressEvent.call(i,o,!0,!1,!0,s+1);if(!n&&e.isFunction(r.onBeforeWrite)&&(g=r.onBeforeWrite(o,b(),g.forwardPosition,r),g&&g.refreshFromBuffer)){var k=g.refreshFromBuffer;P(k===!0?k:k.start,k.end,g.buffer),d(!0),g.caret&&(p().p=g.caret)}}}),a){var w=void 0,S=f();document.activeElement===i&&(s||g)&&(w=D(i).begin,s&&g===!1&&(w=C(f(w))),g&&l!==!0&&(w<S+1||S===-1)&&(w=r.numericInput&&void 0===g.caret?R(g.forwardPosition):g.forwardPosition)),O(i,b(),w,s||new e.Event("checkval"))}}function j(t){if(t&&void 0===t.inputmask)return t.value;var i=[],a=p().validPositions;for(var n in a)a[n].match&&null!=a[n].match.fn&&i.push(a[n].input);var o=0===i.length?"":(q?i.reverse():i).join("");if(e.isFunction(r.onUnMask)){var s=(q?b().slice().reverse():b()).join("");o=r.onUnMask(s,o,r)||o}return o}function D(e,t,i,a){function n(e){if(a!==!0&&q&&"number"==typeof e&&(!r.greedy||""!==r.placeholder)){var t=b().join("").length;e=t-e}return e}var s;if("number"!=typeof t)return e.setSelectionRange?(t=e.selectionStart,i=e.selectionEnd):window.getSelection?(s=window.getSelection().getRangeAt(0),s.commonAncestorContainer.parentNode!==e&&s.commonAncestorContainer!==e||(t=s.startOffset,i=s.endOffset)):document.selection&&document.selection.createRange&&(s=document.selection.createRange(),t=0-s.duplicate().moveStart("character",-e.inputmask._valueGet().length),i=t+s.text.length),{begin:n(t),end:n(i)};t=n(t),i=n(i),i="number"==typeof i?i:t;var l=parseInt(((e.ownerDocument.defaultView||window).getComputedStyle?(e.ownerDocument.defaultView||window).getComputedStyle(e,null):e.currentStyle).fontSize)*i;if(e.scrollLeft=l>e.scrollWidth?l:0,o||r.insertMode!==!1||t!==i||i++,e.setSelectionRange)e.selectionStart=t,e.selectionEnd=i;else if(window.getSelection){if(s=document.createRange(),void 0===e.firstChild||null===e.firstChild){var u=document.createTextNode("");e.appendChild(u)}s.setStart(e.firstChild,t<e.inputmask._valueGet().length?t:e.inputmask._valueGet().length),s.setEnd(e.firstChild,i<e.inputmask._valueGet().length?i:e.inputmask._valueGet().length),s.collapse(!0);var c=window.getSelection();c.removeAllRanges(),c.addRange(s)}else e.createTextRange&&(s=e.createTextRange(),s.collapse(!0),s.moveEnd("character",i),s.moveStart("character",t),s.select());L(e,void 0,{begin:t,end:i})}function F(t){var i,a,n=b(),r=n.length,o=f(),s={},l=p().validPositions[o],u=void 0!==l?l.locator.slice():void 0;for(i=o+1;i<n.length;i++)a=v(i,u,i-1),u=a.locator.slice(),s[i]=e.extend(!0,{},a);var c=l&&void 0!==l.alternation?l.locator[l.alternation]:void 0;for(i=r-1;i>o&&(a=s[i],(a.match.optionality||a.match.optionalQuantifier||c&&(c!==s[i].locator[l.alternation]&&null!=a.match.fn||null===a.match.fn&&a.locator[l.alternation]&&S(a.locator[l.alternation].toString().split(","),c.toString().split(","))&&""!==k(i)[0].def))&&n[i]===_(i,a.match));i--)r--;return t?{l:r,def:s[r]?s[r].match:void 0}:r}function N(e){for(var t=F(),i=e.length-1;i>t&&!E(i);i--);return e.splice(t,i+1-t),e}function T(t){if(e.isFunction(r.isComplete))return r.isComplete(t,r);if("*"!==r.repeat){var i=!1,a=F(!0),n=R(a.l);if(void 0===a.def||a.def.newBlockMarker||a.def.optionality||a.def.optionalQuantifier){i=!0;for(var o=0;o<=n;o++){var s=v(o).match;if(null!==s.fn&&void 0===p().validPositions[o]&&s.optionality!==!0&&s.optionalQuantifier!==!0||null===s.fn&&t[o]!==_(o,s)){i=!1;break}}}return i}}function G(i,a,n,o){function s(){if(r.keepStatic){for(var t=[],a=f(-1,!0),n=e.extend(!0,{},p().validPositions),o=p().validPositions[a];a>=0;a--){var s=p().validPositions[a];if(s){if(s.generatedInput!==!0&&/[0-9a-bA-Z]/.test(s.input)&&t.push(s.input),delete p().validPositions[a],void 0!==s.alternation&&s.locator[s.alternation]!==o.locator[s.alternation])break;o=s}}if(a>-1)for(p().p=C(f(-1,!0));t.length>0;){var l=new e.Event("keypress");l.which=t.pop().charCodeAt(0),ee.keypressEvent.call(i,l,!0,!1,!1,p().p)}else p().validPositions=e.extend(!0,{},n)}}if((r.numericInput||q)&&(a===t.keyCode.BACKSPACE?a=t.keyCode.DELETE:a===t.keyCode.DELETE&&(a=t.keyCode.BACKSPACE),q)){var l=n.end;n.end=n.begin,n.begin=l}a===t.keyCode.BACKSPACE&&(n.end-n.begin<1||r.insertMode===!1)?(n.begin=R(n.begin),void 0===p().validPositions[n.begin]||p().validPositions[n.begin].input!==r.groupSeparator&&p().validPositions[n.begin].input!==r.radixPoint||n.begin--):a===t.keyCode.DELETE&&n.begin===n.end&&(n.end=E(n.end,!0)?n.end+1:C(n.end)+1,void 0===p().validPositions[n.begin]||p().validPositions[n.begin].input!==r.groupSeparator&&p().validPositions[n.begin].input!==r.radixPoint||n.end++),m(n.begin,n.end,!1,o),o!==!0&&s();var u=f(n.begin,!0);u<n.begin?p().p=C(u):o!==!0&&(p().p=n.begin)}function B(t){function i(e){var i,a=document.createElement("span");for(var n in o)isNaN(n)&&n.indexOf("font")!==-1&&(a.style[n]=o[n]);a.style.textTransform=o.textTransform,a.style.letterSpacing=o.letterSpacing,a.style.position="absolute",a.style.height="auto",a.style.width="auto",a.style.visibility="hidden",a.style.whiteSpace="nowrap",document.body.appendChild(a);var r,s=t.inputmask._valueGet(),l=0;for(i=0,r=s.length;i<=r;i++){if(a.innerHTML+=s.charAt(i)||"_",a.offsetWidth>=e){var u=e-l,c=a.offsetWidth-e;a.innerHTML=s.charAt(i),u-=a.offsetWidth/3,i=u<c?i-1:i;break}l=a.offsetWidth}return document.body.removeChild(a),i}function a(){z.style.position="absolute",z.style.top=n.top+"px",z.style.left=n.left+"px",z.style.width=parseInt(t.offsetWidth)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth)+"px",z.style.height=parseInt(t.offsetHeight)-parseInt(o.paddingTop)-parseInt(o.paddingBottom)-parseInt(o.borderTopWidth)-parseInt(o.borderBottomWidth)+"px",z.style.lineHeight=z.style.height,z.style.zIndex=isNaN(o.zIndex)?-1:o.zIndex-1,z.style.webkitAppearance="textfield",z.style.mozAppearance="textfield",z.style.Appearance="textfield"}var n=e(t).position(),o=(t.ownerDocument.defaultView||window).getComputedStyle(t,null);t.parentNode,z=document.createElement("div"),document.body.appendChild(z);for(var s in o)isNaN(s)&&"cssText"!==s&&s.indexOf("webkit")==-1&&(z.style[s]=o[s]);t.style.backgroundColor="transparent",t.style.color="transparent",t.style.webkitAppearance="caret",t.style.mozAppearance="caret",t.style.Appearance="caret",a(),e(window).on("resize",function(i){n=e(t).position(),o=(t.ownerDocument.defaultView||window).getComputedStyle(t,null),a()}),e(t).on("click",function(e){return D(t,i(e.clientX)),ee.clickEvent.call(this,[e])}),e(t).on("keydown",function(e){e.shiftKey||r.insertMode===!1||setTimeout(function(){L(t)},0)})}function L(e,t,i){function a(){o||null!==l.fn&&void 0!==u.input?o&&null!==l.fn&&void 0!==u.input&&(o=!1,n+="</span>"):(o=!0,n+="<span class='im-static''>")}if(void 0!==z){t=t||b(),void 0===i?i=D(e):void 0===i.begin&&(i={begin:i,end:i});var n="",o=!1;if(""!=t){var s,l,u,c=0,d=f();do c===i.begin&&document.activeElement===e&&(n+="<span class='im-caret' style='border-right-width: 1px;border-right-style: solid;'></span>"),p().validPositions[c]?(u=p().validPositions[c],l=u.match,s=u.locator.slice(),a(),n+=u.input):(u=v(c,s,c-1),l=u.match,s=u.locator.slice(),(r.jitMasking===!1||c<d||"number"==typeof r.jitMasking&&isFinite(r.jitMasking)&&r.jitMasking>c)&&(a(),n+=_(c,l))),c++;while((void 0===V||c<V)&&(null!==l.fn||""!==l.def)||d>c)}z.innerHTML=n}}function H(t){function i(t,i){function a(t){function a(t){if(e.valHooks&&(void 0===e.valHooks[t]||e.valHooks[t].inputmaskpatch!==!0)){var a=e.valHooks[t]&&e.valHooks[t].get?e.valHooks[t].get:function(e){return e.value},n=e.valHooks[t]&&e.valHooks[t].set?e.valHooks[t].set:function(e,t){return e.value=t,e};e.valHooks[t]={get:function(e){if(e.inputmask){if(e.inputmask.opts.autoUnmask)return e.inputmask.unmaskedvalue();var t=a(e);return f(void 0,void 0,e.inputmask.maskset.validPositions)!==-1||i.nullable!==!0?t:""}return a(e)},set:function(t,i){var a,r=e(t);return a=n(t,i),t.inputmask&&r.trigger("setvalue"),a},inputmaskpatch:!0}}}function n(){return this.inputmask?this.inputmask.opts.autoUnmask?this.inputmask.unmaskedvalue():f()!==-1||i.nullable!==!0?document.activeElement===this&&i.clearMaskOnLostFocus?(q?N(b().slice()).reverse():N(b().slice())).join(""):s.call(this):"":s.call(this)}function r(t){l.call(this,t),this.inputmask&&e(this).trigger("setvalue")}function o(t){J.on(t,"mouseenter",function(t){var i=e(this),a=this,n=a.inputmask._valueGet();n!==b().join("")&&i.trigger("setvalue")})}var s,l;if(!t.inputmask.__valueGet){if(i.noValuePatching!==!0){if(Object.getOwnPropertyDescriptor){"function"!=typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"==typeof"test".__proto__?function(e){return e.__proto__}:function(e){return e.constructor.prototype});var u=Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value"):void 0;u&&u.get&&u.set?(s=u.get,l=u.set,Object.defineProperty(t,"value",{get:n,set:r,configurable:!0})):"INPUT"!==t.tagName&&(s=function(){return this.textContent},l=function(e){this.textContent=e},Object.defineProperty(t,"value",{get:n,set:r,configurable:!0}))}else document.__lookupGetter__&&t.__lookupGetter__("value")&&(s=t.__lookupGetter__("value"),l=t.__lookupSetter__("value"),t.__defineGetter__("value",n),t.__defineSetter__("value",r));t.inputmask.__valueGet=s,t.inputmask.__valueSet=l}
vendor: 5,132 bytes, line 11347
11347t.inputmask._valueGet=function(e){return q&&e!==!0?s.call(this.el).split("").reverse().join(""):s.call(this.el)},t.inputmask._valueSet=function(e,t){l.call(this.el,null===e||void 0===e?"":t!==!0&&q?e.split("").reverse().join(""):e)},void 0===s&&(s=function(){return this.value},l=function(e){this.value=e},a(t.type),o(t))}}var n=t.getAttribute("type"),r="INPUT"===t.tagName&&e.inArray(n,i.supportsInputType)!==-1||t.isContentEditable||"TEXTAREA"===t.tagName;if(!r)if("INPUT"===t.tagName){var o=document.createElement("input");o.setAttribute("type",n),r="text"===o.type,o=null}else r="partial";return r!==!1&&a(t),r}var a=i(t,r);if(a!==!1&&(W=t,U=e(W),("rtl"===W.dir||r.rightAlign)&&(W.style.textAlign="right"),("rtl"===W.dir||r.numericInput)&&(W.dir="ltr",W.removeAttribute("dir"),W.inputmask.isRTL=!0,q=!0),r.colorMask===!0&&B(W),u&&(W.hasOwnProperty("inputmode")&&(W.inputmode=r.inputmode,W.setAttribute("inputmode",r.inputmode)),"rtfm"===r.androidHack&&(r.colorMask!==!0&&B(W),W.type="password")),J.off(W),a===!0&&(J.on(W,"submit",ee.submitEvent),J.on(W,"reset",ee.resetEvent),J.on(W,"mouseenter",ee.mouseenterEvent),J.on(W,"blur",ee.blurEvent),J.on(W,"focus",ee.focusEvent),J.on(W,"mouseleave",ee.mouseleaveEvent),r.colorMask!==!0&&J.on(W,"click",ee.clickEvent),J.on(W,"dblclick",ee.dblclickEvent),J.on(W,"paste",ee.pasteEvent),J.on(W,"dragdrop",ee.pasteEvent),J.on(W,"drop",ee.pasteEvent),J.on(W,"cut",ee.cutEvent),J.on(W,"complete",r.oncomplete),J.on(W,"incomplete",r.onincomplete),J.on(W,"cleared",r.oncleared),r.inputEventOnly!==!0&&(J.on(W,"keydown",ee.keydownEvent),J.on(W,"keypress",ee.keypressEvent)),J.on(W,"compositionstart",e.noop),J.on(W,"compositionupdate",e.noop),J.on(W,"compositionend",e.noop),J.on(W,"keyup",e.noop),J.on(W,"input",ee.inputFallBackEvent)),J.on(W,"setvalue",ee.setValueEvent),x(),""!==W.inputmask._valueGet()||r.clearMaskOnLostFocus===!1||document.activeElement===W)){var n=e.isFunction(r.onBeforeMask)?r.onBeforeMask(W.inputmask._valueGet(),r)||W.inputmask._valueGet():W.inputmask._valueGet();I(W,!0,!1,n.split(""));var o=b().slice();K=o.join(""),T(o)===!1&&r.clearIncomplete&&d(),r.clearMaskOnLostFocus&&document.activeElement!==W&&(f()===-1?o=[]:N(o)),O(W,o),document.activeElement===W&&D(W,C(f()))}}a=a||this.maskset,r=r||this.opts;var K,U,V,z,Q,W=this.el,q=this.isRTL,Z=!1,Y=!1,$=!1,X=!1,J={on:function(i,a,n){var o=function(i){if(void 0===this.inputmask&&"FORM"!==this.nodeName){var a=e.data(this,"_inputmask_opts");a?new t(a).mask(this):J.off(this)}else{if("setvalue"===i.type||!(this.disabled||this.readOnly&&!("keydown"===i.type&&i.ctrlKey&&67===i.keyCode||r.tabThrough===!1&&i.keyCode===t.keyCode.TAB))){switch(i.type){case"input":if(Y===!0)return Y=!1,i.preventDefault();break;case"keydown":Z=!1,Y=!1;break;case"keypress":if(Z===!0)return i.preventDefault();Z=!0;break;case"click":if(s||l){var o=this,u=arguments;return setTimeout(function(){n.apply(o,u)},0),!1}}var c=n.apply(this,arguments);return c===!1&&(i.preventDefault(),i.stopPropagation()),c}i.preventDefault()}};i.inputmask.events[a]=i.inputmask.events[a]||[],i.inputmask.events[a].push(o),e.inArray(a,["submit","reset"])!==-1?null!=i.form&&e(i.form).on(a,o):e(i).on(a,o)},off:function(t,i){if(t.inputmask&&t.inputmask.events){var a;i?(a=[],a[i]=t.inputmask.events[i]):a=t.inputmask.events,e.each(a,function(i,a){for(;a.length>0;){var n=a.pop();e.inArray(i,["submit","reset"])!==-1?null!=t.form&&e(t.form).off(i,n):e(t).off(i,n)}delete t.inputmask.events[i]})}}},ee={keydownEvent:function(i){function a(e){var t=document.createElement("input"),i="on"+e,a=i in t;return a||(t.setAttribute(i,"return;"),a="function"==typeof t[i]),t=null,a}var n=this,o=e(n),s=i.keyCode,u=D(n);if(s===t.keyCode.BACKSPACE||s===t.keyCode.DELETE||l&&s===t.keyCode.BACKSPACE_SAFARI||i.ctrlKey&&s===t.keyCode.X&&!a("cut"))i.preventDefault(),G(n,s,u),O(n,b(!0),p().p,i,n.inputmask._valueGet()!==b().join("")),n.inputmask._valueGet()===x().join("")?o.trigger("cleared"):T(b())===!0&&o.trigger("complete");else if(s===t.keyCode.END||s===t.keyCode.PAGE_DOWN){i.preventDefault();var c=C(f());r.insertMode||c!==p().maskLength||i.shiftKey||c--,D(n,i.shiftKey?u.begin:c,c,!0)}else s===t.keyCode.HOME&&!i.shiftKey||s===t.keyCode.PAGE_UP?(i.preventDefault(),D(n,0,i.shiftKey?u.begin:0,!0)):(r.undoOnEscape&&s===t.keyCode.ESCAPE||90===s&&i.ctrlKey)&&i.altKey!==!0?(I(n,!0,!1,K.split("")),o.trigger("click")):s!==t.keyCode.INSERT||i.shiftKey||i.ctrlKey?r.tabThrough===!0&&s===t.keyCode.TAB?(i.shiftKey===!0?(null===g(u.begin).match.fn&&(u.begin=C(u.begin)),u.end=R(u.begin,!0),u.begin=R(u.end,!0)):(u.begin=C(u.begin,!0),u.end=C(u.begin,!0),u.end<p().maskLength&&u.end--),u.begin<p().maskLength&&(i.preventDefault(),D(n,u.begin,u.end))):i.shiftKey||r.insertMode===!1&&(s===t.keyCode.RIGHT?setTimeout(function(){var e=D(n);D(n,e.begin)},0):s===t.keyCode.LEFT&&setTimeout(function(){var e=D(n);D(n,q?e.begin+1:e.begin-1)},0)):(r.insertMode=!r.insertMode,D(n,r.insertMode||u.begin!==p().maskLength?u.begin:u.begin-1));r.onKeyDown.call(this,i,b(),D(n).begin,r),$=e.inArray(s,r.ignorables)!==-1},keypressEvent:function(i,a,n,o,s){var l=this,u=e(l),c=i.which||i.charCo
vendor: 10,896 bytes, lines 11347-11348
11347de||i.keyCode;if(!(a===!0||i.ctrlKey&&i.altKey)&&(i.ctrlKey||i.metaKey||$))return c===t.keyCode.ENTER&&K!==b().join("")&&(K=b().join(""),
11348setTimeout(function(){u.trigger("change")},0)),!0;if(c){46===c&&i.shiftKey===!1&&","===r.radixPoint&&(c=44);var f,m=a?{begin:s,end:s}:D(l),h=String.fromCharCode(c);p().writeOutBuffer=!0;var v=A(m,h,o);if(v!==!1&&(d(!0),f=void 0!==v.caret?v.caret:a?v.pos+1:C(v.pos),p().p=f),n!==!1){var g=this;if(setTimeout(function(){r.onKeyValidation.call(g,c,v,r)},0),p().writeOutBuffer&&v!==!1){var y=b();O(l,y,r.numericInput&&void 0===v.caret?R(f):f,i,a!==!0),a!==!0&&setTimeout(function(){T(y)===!0&&u.trigger("complete")},0)}}if(i.preventDefault(),a)return v.forwardPosition=f,v}},pasteEvent:function(t){var i,a=this,n=t.originalEvent||t,o=e(a),s=a.inputmask._valueGet(!0),l=D(a);q&&(i=l.end,l.end=l.begin,l.begin=i);var u=s.substr(0,l.begin),c=s.substr(l.end,s.length);if(u===(q?x().reverse():x()).slice(0,l.begin).join("")&&(u=""),c===(q?x().reverse():x()).slice(l.end).join("")&&(c=""),q&&(i=u,u=c,c=i),window.clipboardData&&window.clipboardData.getData)s=u+window.clipboardData.getData("Text")+c;else{if(!n.clipboardData||!n.clipboardData.getData)return!0;s=u+n.clipboardData.getData("text/plain")+c}var p=s;if(e.isFunction(r.onBeforePaste)){if(p=r.onBeforePaste(s,r),p===!1)return t.preventDefault();p||(p=s)}return I(a,!1,!1,q?p.split("").reverse():p.toString().split("")),O(a,b(),C(f()),t,K!==b().join("")),T(b())===!0&&o.trigger("complete"),t.preventDefault()},inputFallBackEvent:function(i){var a=this,n=a.inputmask._valueGet();if(b().join("")!==n){var r=D(a);if(n=n.replace(new RegExp("("+t.escapeRegex(x().join(""))+")*"),""),s){var o=n.replace(b().join(""),"");if(1===o.length){var l=new e.Event("keypress");return l.which=o.charCodeAt(0),ee.keypressEvent.call(a,l,!0,!0,!1,p().validPositions[r.begin-1]?r.begin:r.begin-1),!1}}if(r.begin>n.length&&(D(a,n.length),r=D(a)),b().length-n.length!==1||n.charAt(r.begin)===b()[r.begin]||n.charAt(r.begin+1)===b()[r.begin]||E(r.begin)){for(var u=f()+1,c=x().join("");null===n.match(t.escapeRegex(c)+"$");)c=c.slice(1);n=n.replace(c,""),n=n.split(""),I(a,!0,!1,n,i,r.begin<u),T(b())===!0&&e(a).trigger("complete")}else i.keyCode=t.keyCode.BACKSPACE,ee.keydownEvent.call(a,i);i.preventDefault()}},setValueEvent:function(t){var i=this,a=i.inputmask._valueGet();I(i,!0,!1,(e.isFunction(r.onBeforeMask)?r.onBeforeMask(a,r)||a:a).split("")),K=b().join(""),(r.clearMaskOnLostFocus||r.clearIncomplete)&&i.inputmask._valueGet()===x().join("")&&i.inputmask._valueSet("")},focusEvent:function(e){var t=this,i=t.inputmask._valueGet();r.showMaskOnFocus&&(!r.showMaskOnHover||r.showMaskOnHover&&""===i)&&(t.inputmask._valueGet()!==b().join("")?O(t,b(),C(f())):X===!1&&D(t,C(f()))),r.positionCaretOnTab===!0&&ee.clickEvent.apply(t,[e,!0]),K=b().join("")},mouseleaveEvent:function(e){var t=this;if(X=!1,r.clearMaskOnLostFocus&&document.activeElement!==t){var i=b().slice(),a=t.inputmask._valueGet();a!==t.getAttribute("placeholder")&&""!==a&&(f()===-1&&a===x().join("")?i=[]:N(i),O(t,i))}},clickEvent:function(t,i){function a(t){if(""!==r.radixPoint){var i=p().validPositions;if(void 0===i[t]||i[t].input===_(t)){if(t<C(-1))return!0;var a=e.inArray(r.radixPoint,b());if(a!==-1){for(var n in i)if(a<n&&i[n].input!==_(n))return!1;return!0}}}return!1}var n=this;setTimeout(function(){if(document.activeElement===n){var t=D(n);if(i&&(t.begin=t.end),t.begin===t.end)switch(r.positionCaretOnClick){case"none":break;case"radixFocus":if(a(t.begin)){var o=e.inArray(r.radixPoint,b().join(""));D(n,r.numericInput?C(o):o);break}default:var s=t.begin,l=f(s,!0),u=C(l);if(s<u)D(n,E(s)||E(s-1)?s:C(s));else{var c=_(u);(""!==c&&b()[u]!==c&&g(u).match.optionalQuantifier!==!0||!E(u)&&g(u).match.def===c)&&(u=C(u)),D(n,u)}}}},0)},dblclickEvent:function(e){var t=this;setTimeout(function(){D(t,0,C(f()))},0)},cutEvent:function(i){var a=this,n=e(a),r=D(a),o=i.originalEvent||i,s=window.clipboardData||o.clipboardData,l=q?b().slice(r.end,r.begin):b().slice(r.begin,r.end);s.setData("text",q?l.reverse().join(""):l.join("")),document.execCommand&&document.execCommand("copy"),G(a,t.keyCode.DELETE,r),O(a,b(),p().p,i,K!==b().join("")),a.inputmask._valueGet()===x().join("")&&n.trigger("cleared")},blurEvent:function(t){var i=e(this),a=this;if(a.inputmask){var n=a.inputmask._valueGet(),o=b().slice();K!==o.join("")&&setTimeout(function(){i.trigger("change"),K=o.join("")},0),""!==n&&(r.clearMaskOnLostFocus&&(f()===-1&&n===x().join("")?o=[]:N(o)),T(o)===!1&&(setTimeout(function(){i.trigger("incomplete")},0),r.clearIncomplete&&(d(),o=r.clearMaskOnLostFocus?[]:x().slice())),O(a,o,void 0,t))}},mouseenterEvent:function(e){var t=this;X=!0,document.activeElement!==t&&r.showMaskOnHover&&t.inputmask._valueGet()!==b().join("")&&O(t,b())},submitEvent:function(e){K!==b().join("")&&U.trigger("change"),r.clearMaskOnLostFocus&&f()===-1&&W.inputmask._valueGet&&W.inputmask._valueGet()===x().join("")&&W.inputmask._valueSet(""),r.removeMaskOnSubmit&&(W.inputmask._valueSet(W.inputmask.unmaskedvalue(),!0),setTimeout(function(){O(W,b())},0))},resetEvent:function(e){setTimeout(function(){U.trigger("setvalue")},0)}};if(void 0!==i)switch(i.action){case"isComplete":return W=i.el,T(b());case"unmaskedvalue":return void 0!==W&&void 0===i.value||(Q=i.value,Q=(e.isFunction(r.onBeforeMask)?r.onBeforeMask(Q,r)||Q:Q).split(""),I(void 0,!1,!1,q?Q.reverse():Q),e.isFunction(r.onBeforeWrite)&&r.onBeforeWrite(void 0,b(),0,r)),j(W);case"mask":H(W);break;case"format":return Q=(e.isFunction(r.onBeforeMask)?r.onBeforeMask(i.value,r)||i.value:i.value).split(""),I(void 0,!1,!1,q?Q.reverse():Q),e.isFunction(r.onBeforeWrite)&&r.onBeforeWrite(void 0,b(),0,r),i.metadata?{value:q?b().slice().reverse().join(""):b().join(""),metadata:n.call(this,{action:"getmetadata"},a,r)}:q?b().slice().reverse().join(""):b().join("");case"isValid":i.value?(Q=i.value.split(""),I(void 0,!1,!0,q?Q.reverse():Q)):i.value=b().join("");for(var te=b(),ie=F(),ae=te.length-1;ae>ie&&!E(ae);ae--);return te.splice(ie,ae+1-ie),T(te)&&i.value===b().join("");case"getemptymask":return x().join("");case"remove":if(W){U=e(W),W.inputmask._valueSet(j(W)),J.off(W);var ne;Object.getOwnPropertyDescriptor&&Object.getPrototypeOf?(ne=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(W),"value"),ne&&W.inputmask.__valueGet&&Object.defineProperty(W,"value",{get:W.inputmask.__valueGet,set:W.inputmask.__valueSet,configurable:!0})):document.__lookupGetter__&&W.__lookupGetter__("value")&&W.inputmask.__valueGet&&(W.__defineGetter__("value",W.inputmask.__valueGet),W.__defineSetter__("value",W.inputmask.__valueSet)),W.inputmask=void 0}return W;case"getmetadata":if(e.isArray(a.metadata)){var re=c(!0,0,!1).join("");return e.each(a.metadata,function(e,t){if(t.mask===re)return re=t,!1}),re}return a.metadata}}var r=navigator.userAgent,o=/mobile/i.test(r),s=/iemobile/i.test(r),l=/iphone/i.test(r)&&!s,u=/android/i.test(r)&&!s;return t.prototype={defaults:{placeholder:"_",optionalmarker:{start:"[",end:"]"},quantifiermarker:{start:"{",end:"}"},groupmarker:{start:"(",end:")"},alternatormarker:"|",escapeChar:"\\",mask:null,oncomplete:e.noop,onincomplete:e.noop,oncleared:e.noop,repeat:0,greedy:!0,autoUnmask:!1,removeMaskOnSubmit:!1,clearMaskOnLostFocus:!0,insertMode:!0,clearIncomplete:!1,aliases:{},alias:null,onKeyDown:e.noop,onBeforeMask:null,onBeforePaste:function(t,i){return e.isFunction(i.onBeforeMask)?i.onBeforeMask(t,i):t},onBeforeWrite:null,onUnMask:null,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:e.noop,skipOptionalPartCharacter:" ",numericInput:!1,rightAlign:!1,undoOnEscape:!0,radixPoint:"",radixPointDefinitionSymbol:void 0,groupSeparator:"",keepStatic:null,positionCaretOnTab:!0,tabThrough:!1,supportsInputType:["text","tel","password"],definitions:{9:{validator:"[0-9]",cardinality:1,definitionSymbol:"*"},a:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,definitionSymbol:"*"},"*":{validator:"[0-9A-Za-zА-яЁёÀ-ÿµ]",cardinality:1}},ignorables:[8,9,13,19,27,33,34,35,36,37,38,39,40,45,46,93,112,113,114,115,116,117,118,119,120,121,122,123],isComplete:null,canClearPosition:e.noop,postValidation:null,staticDefinitionSymbol:void 0,jitMasking:!1,nullable:!0,inputEventOnly:!1,noValuePatching:!1,positionCaretOnClick:"lvp",casing:null,inputmode:"verbatim",colorMask:!1,androidHack:!1},masksCache:{},mask:function(r){function o(t,a,n,r){function o(e,i){i=void 0!==i?i:t.getAttribute(r+"-"+e),null!==i&&("string"==typeof i&&(0===e.indexOf("on")?i=window[i]:"false"===i?i=!1:"true"===i&&(i=!0)),n[e]=i)}var s,l,u,c,p=t.getAttribute(r);if(p&&""!==p&&(p=p.replace(new RegExp("'","g"),'"'),l=JSON.parse("{"+p+"}")),l){u=void 0;for(c in l)if("alias"===c.toLowerCase()){u=l[c];break}}o("alias",u),n.alias&&i(n.alias,n,a);for(s in a){if(l){u=void 0;for(c in l)if(c.toLowerCase()===s.toLowerCase()){u=l[c];break}}o(s,u)}return e.extend(!0,a,n),a}var s=this;return"string"==typeof r&&(r=document.getElementById(r)||document.querySelectorAll(r)),r=r.nodeName?[r]:r,e.each(r,function(i,r){var l=e.extend(!0,{},s.opts);o(r,l,e.extend(!0,{},s.userOptions),s.dataAttribute);var u=a(l,s.noMasksCache);void 0!==u&&(void 0!==r.inputmask&&r.inputmask.remove(),r.inputmask=new t,r.inputmask.opts=l,r.inputmask.noMasksCache=s.noMasksCache,r.inputmask.userOptions=e.extend(!0,{},s.userOptions),r.inputmask.el=r,r.inputmask.maskset=u,e.data(r,"_inputmask_opts",l),n.call(r.inputmask,{action:"mask"}))}),r&&r[0]?r[0].inputmask||this:this},option:function(t,i){return"string"==typeof t?this.opts[t]:"object"==typeof t?(e.extend(this.userOptions,t),this.el&&i!==!0&&this.mask(this.el),this):void 0},unmaskedvalue:function(e){return this.maskset=this.maskset||a(this.opts,this.noMasksCache),n.call(this,{action:"unmaskedvalue",value:e})},remove:function(){return n.call(this,{action:"remove"})},getemptymask:function(){return this.maskset=this.maskset||a(this.opts,this.noMasksCache),n.call(this,{action:"getemptymask"})},hasMaskedValue:function(){return!this.opts.autoUnmask},isComplete:function(){return this.maskset=this.maskset||a(this.opts,this.noMasksCache),n.call(this,{action:"isComplete"})},getmetadata:function(){return this.maskset=this.maskset||a(this.opts,this.noMasksCache),n.call(this,{action:"getmetadata"})},isValid:function(e){return this.maskset=this.maskset||a(this.opts,this.noMasksCache),n.call(this,{action:"isValid",value:e})},format:function(e,t){return this.maskset=this.maskset||a(this.opts,this.noMasksCache),n.call(this,{action:"format",value:e,metadata:t})},analyseMask:function(t,i){function a(e,t,i,a){this.matches=[],this.openGroup=e||!1,this.isGroup=e||!1,this.isOptional=t||!1,this.isQuantifier=i||!1,this.isAlternator=a||!1,this.quantifier={min:1,max:1}}function n(t,a,n){var r=i.definitions[a];n=void 0!==n?n:t.matches.length;var o=t.matches[n-1];if(r&&!v){r.placeholder=e.isFunction(r.placeholder)?r.placeholder(i):r.placeholder;
11348for(var s=r.prevalidator,l=s?s.length:0,u=1;u<r.cardinality;u++){var c=l>=u?s[u-1]:[],p=c.validator,d=c.cardinality;t.matches.splice(n++,0,{fn:p?"string"==typeof p?new RegExp(p):new function(){this.test=p}:new RegExp("."),cardinality:d?d:1,optionality:t.isOptional,newBlockMarker:void 0===o||o.def!==(r.definitionSymbol||a),casing:r.casing,def:r.definitionSymbol||a,placeholder:r.placeholder,nativeDef:a}),o=t.matches[n-1]}t.matches.splice(n++,0,{fn:r.validator?"string"==typeof r.validator?new RegExp(r.validator):new function(){this.test=r.validator}:new RegExp("."),cardinality:r.cardinality,optionality:t.isOptional,newBlockMarker:void 0===o||o.def!==(r.definitionSymbol||a),casing:r.casing,def:r.definitionSymbol||a,placeholder:r.placeholder,nativeDef:a})}else t.matches.splice(n++,0,{fn:null,cardinality:0,optionality:t.isOptional,newBlockMarker:void 0===o||o.def!==a,casing:null,def:i.staticDefinitionSymbol||a,placeholder:void 0!==i.staticDefinitionSymbol?a:void 0,nativeDef:a}),v=!1}function r(t){t&&t.matches&&e.each(t.matches,function(e,a){var o=t.matches[e+1];(void 0===o||void 0===o.matches||o.isQuantifier===!1)&&a&&a.isGroup&&(a.isGroup=!1,n(a,i.groupmarker.start,0),a.openGroup!==!0&&n(a,i.groupmarker.end)),r(a)})}function o(){if(y.length>0){if(p=y[y.length-1],n(p,u),p.isAlternator){d=y.pop();for(var e=0;e<d.matches.length;e++)d.matches[e].isGroup=!1;y.length>0?(p=y[y.length-1],p.matches.push(d)):g.matches.push(d)}}else n(g,u)}function s(e){function t(e){return e===i.optionalmarker.start?e=i.optionalmarker.end:e===i.optionalmarker.end?e=i.optionalmarker.start:e===i.groupmarker.start?e=i.groupmarker.end:e===i.groupmarker.end&&(e=i.groupmarker.start),e}e.matches=e.matches.reverse();for(var a in e.matches){var n=parseInt(a);if(e.matches[a].isQuantifier&&e.matches[n+1]&&e.matches[n+1].isGroup){var r=e.matches[a];e.matches.splice(a,1),e.matches.splice(n+1,0,r)}void 0!==e.matches[a].matches?e.matches[a]=s(e.matches[a]):e.matches[a]=t(e.matches[a])}return e}for(var l,u,c,p,d,f,m,h=/(?:[?*+]|\{[0-9\+\*]+(?:,[0-9\+\*]*)?\})|[^.?*+^${[]()|\\]+|./g,v=!1,g=new a,y=[],k=[];l=h.exec(t);)if(u=l[0],v)o();else switch(u.charAt(0)){case i.escapeChar:v=!0;break;case i.optionalmarker.end:case i.groupmarker.end:if(c=y.pop(),c.openGroup=!1,void 0!==c)if(y.length>0){if(p=y[y.length-1],p.matches.push(c),p.isAlternator){d=y.pop();for(var x=0;x<d.matches.length;x++)d.matches[x].isGroup=!1;y.length>0?(p=y[y.length-1],p.matches.push(d)):g.matches.push(d)}}else g.matches.push(c);else o();break;case i.optionalmarker.start:y.push(new a(!1,!0));break;case i.groupmarker.start:y.push(new a(!0));break;case i.quantifiermarker.start:var b=new a(!1,!1,!0);u=u.replace(/[{}]/g,"");var P=u.split(","),w=isNaN(P[0])?P[0]:parseInt(P[0]),S=1===P.length?w:isNaN(P[1])?P[1]:parseInt(P[1]);if("*"!==S&&"+"!==S||(w="*"===S?0:1),b.quantifier={min:w,max:S},y.length>0){var A=y[y.length-1].matches;l=A.pop(),l.isGroup||(m=new a(!0),m.matches.push(l),l=m),A.push(l),A.push(b)}else l=g.matches.pop(),l.isGroup||(m=new a(!0),m.matches.push(l),l=m),g.matches.push(l),g.matches.push(b);break;case i.alternatormarker:y.length>0?(p=y[y.length-1],f=p.matches.pop()):f=g.matches.pop(),f.isAlternator?y.push(f):(d=new a(!1,!1,!1,!0),d.matches.push(f),y.push(d));break;default:o()}for(;y.length>0;)c=y.pop(),g.matches.push(c);return g.matches.length>0&&(r(g),k.push(g)),i.numericInput&&s(k[0]),k}},t.extendDefaults=function(i){e.extend(!0,t.prototype.defaults,i)},t.extendDefinitions=function(i){e.extend(!0,t.prototype.defaults.definitions,i)},t.extendAliases=function(i){e.extend(!0,t.prototype.defaults.aliases,i)},t.format=function(e,i,a){return t(i).format(e,a)},t.unmask=function(e,i){return t(i).unmaskedvalue(e)},t.isValid=function(e,i){return t(i).isValid(e)},t.remove=function(t){e.each(t,function(e,t){t.inputmask&&t.inputmask.remove()})},t.escapeRegex=function(e){var t=["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^"];return e.replace(new RegExp("(\\"+t.join("|\\")+")","gim"),"\\$1")},t.keyCode={ALT:18,BACKSPACE:8,BACKSPACE_SAFARI:127,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91,X:88},window.Inputmask=t,t}(jQuery),function(e,t){return void 0===e.fn.inputmask&&(e.fn.inputmask=function(i,a){var n,r=this[0];if(void 0===a&&(a={}),"string"==typeof i)switch(i){case"unmaskedvalue":return r&&r.inputmask?r.inputmask.unmaskedvalue():e(r).val();case"remove":return this.each(function(){this.inputmask&&this.inputmask.remove()});case"getemptymask":return r&&r.inputmask?r.inputmask.getemptymask():"";case"hasMaskedValue":return!(!r||!r.inputmask)&&r.inputmask.hasMaskedValue();case"isComplete":return!r||!r.inputmask||r.inputmask.isComplete();case"getmetadata":return r&&r.inputmask?r.inputmask.getmetadata():void 0;case"setvalue":e(r).val(a),r&&void 0===r.inputmask&&e(r).triggerHandler("setvalue");break;case"option":if("string"!=typeof a)return this.each(function(){if(void 0!==this.inputmask)return this.inputmask.option(a)});if(r&&void 0!==r.inputmask)return r.inputmask.option(a);break;default:return a.alias=i,n=new t(a),this.each(function(){n.mask(this)})}else{if("object"==typeof i)return n=new t(i),void 0===i.mask&&void 0===i.alias?this.each(function(){return void 0!==this.inputmask?this.inputmask.option(i):void n.mask(this)}):this.each(function(){n.mask(this)});if(void 0===i)return this.each(function(){n=new t(a),n.mask(this)})}}),e.fn.inputmask}(jQuery,Inputmask),function(e,t){}(jQuery,Inputmask),function(e,t){function i(e){return isNaN(e)||29===new Date(e,2,0).getDate()}return t.extendAliases({"dd/mm/yyyy":{mask:"1/2/y",placeholder:"dd/mm/yyyy",regex:{val1pre:new RegExp("[0-3]"),val1:new RegExp("0[
113481-9]|[12][0-9]|3[01]"),val2pre:function(e){var i=t.escapeRegex.call(this,e);return new RegExp("((0[1-9]|[12][0-9]|3[01])"+i+"[01])")},val2:function(e){var i=t.escapeRegex.call(this,e);return new RegExp("((0[1-9]|[12][0-9])"+i+"(0[1-9]|1[012]))|(30"+i+"(0[13-9]|1[012]))|(31"+i+"(0[13578]|1[02]))")}},leapday:"29/02/",separator:"/",yearrange:{minyear:1900,maxyear:2099},isInYearRange:function(e,t,i){if(isNaN(e))return!1;var a=parseInt(e.concat(t.toString().slice(e.length))),n=parseInt(e.concat(i.toString().slice(e.length)));return!isNaN(a)&&t<=a&&a<=i||!isNaN(n)&&t<=n&&n<=i},determinebaseyear:function(e,t,i){var a=(new Date).getFullYear();if(e>a)return e;if(t<a){for(var n=t.toString().slice(0,2),r=t.toString().slice(2,4);t<n+i;)n--;var o=n+r;return e>o?e:o}if(e<=a&&a<=t){for(var s=a.toString().slice(0,2);t<s+i;)s--;var l=s+i;return l<e?e:l}return a},onKeyDown:function(i,a,n,r){var o=e(this);if(i.ctrlKey&&i.keyCode===t.keyCode.RIGHT){var s=new Date;o.val(s.getDate().toString()+(s.getMonth()+1).toString()+s.getFullYear().toString()),o.trigger("setvalue")}},getFrontValue:function(e,t,i){for(var a=0,n=0,r=0;r<e.length&&"2"!==e.charAt(r);r++){var o=i.definitions[e.charAt(r)];o?(a+=n,n=o.cardinality):n++}return t.join("").substr(a,n)},postValidation:function(e,t,a){var n,r,o=e.join("");return 0===a.mask.indexOf("y")?(r=o.substr(0,4),n=o.substr(4,11)):(r=o.substr(6,11),n=o.substr(0,6)),t&&(n!==a.leapday||i(r))},definitions:{1:{validator:function(e,t,i,a,n){var r=n.regex.val1.test(e);return a||r||e.charAt(1)!==n.separator&&"-./".indexOf(e.charAt(1))===-1||!(r=n.regex.val1.test("0"+e.charAt(0)))?r:(t.buffer[i-1]="0",{refreshFromBuffer:{start:i-1,end:i},pos:i,c:e.charAt(0)})},cardinality:2,prevalidator:[{validator:function(e,t,i,a,n){var r=e;isNaN(t.buffer[i+1])||(r+=t.buffer[i+1]);var o=1===r.length?n.regex.val1pre.test(r):n.regex.val1.test(r);if(!a&&!o){if(o=n.regex.val1.test(e+"0"))return t.buffer[i]=e,t.buffer[++i]="0",{pos:i,c:"0"};if(o=n.regex.val1.test("0"+e))return t.buffer[i]="0",i++,{pos:i}}return o},cardinality:1}]},2:{validator:function(e,t,i,a,n){var r=n.getFrontValue(t.mask,t.buffer,n);r.indexOf(n.placeholder[0])!==-1&&(r="01"+n.separator);var o=n.regex.val2(n.separator).test(r+e);return a||o||e.charAt(1)!==n.separator&&"-./".indexOf(e.charAt(1))===-1||!(o=n.regex.val2(n.separator).test(r+"0"+e.charAt(0)))?o:(t.buffer[i-1]="0",{refreshFromBuffer:{start:i-1,end:i},pos:i,c:e.charAt(0)})},cardinality:2,prevalidator:[{validator:function(e,t,i,a,n){isNaN(t.buffer[i+1])||(e+=t.buffer[i+1]);var r=n.getFrontValue(t.mask,t.buffer,n);r.indexOf(n.placeholder[0])!==-1&&(r="01"+n.separator);var o=1===e.length?n.regex.val2pre(n.separator).test(r+e):n.regex.val2(n.separator).test(r+e);return a||o||!(o=n.regex.val2(n.separator).test(r+"0"+e))?o:(t.buffer[i]="0",i++,{pos:i})},cardinality:1}]},y:{validator:function(e,t,i,a,n){return n.isInYearRange(e,n.yearrange.minyear,n.yearrange.maxyear)},cardinality:4,prevalidator:[{validator:function(e,t,i,a,n){var r=n.isInYearRange(e,n.yearrange.minyear,n.yearrange.maxyear);if(!a&&!r){var o=n.determinebaseyear(n.yearrange.minyear,n.yearrange.maxyear,e+"0").toString().slice(0,1);if(r=n.isInYearRange(o+e,n.yearrange.minyear,n.yearrange.maxyear))return t.buffer[i++]=o.charAt(0),{pos:i};if(o=n.determinebaseyear(n.yearrange.minyear,n.yearrange.maxyear,e+"0").toString().slice(0,2),r=n.isInYearRange(o+e,n.yearrange.minyear,n.yearrange.maxyear))return t.buffer[i++]=o.charAt(0),t.buffer[i++]=o.charAt(1),{pos:i}}return r},cardinality:1},{validator:function(e,t,i,a,n){var r=n.isInYearRange(e,n.yearrange.minyear,n.yearrange.maxyear);if(!a&&!r){var o=n.determinebaseyear(n.yearrange.minyear,n.yearrange.maxyear,e).toString().slice(0,2);if(r=n.isInYearRange(e[0]+o[1]+e[1],n.yearrange.minyear,n.yearrange.maxyear))return t.buffer[i++]=o.charAt(1),{pos:i};if(o=n.determinebaseyear(n.yearrange.minyear,n.yearrange.maxyear,e).toString().slice(0,2),r=n.isInYearRange(o+e,n.yearrange.minyear,n.yearrange.maxyear))return t.buffer[i-1]=o.charAt(0),t.buffer[i++]=o.charAt(1),t.buffer[i++]=e.charAt(0),{refreshFromBuffer:{start:i-3,end:i},pos:i}}return r},cardinality:2},{validator:function(e,t,i,a,n){return n.isInYearRange(e,n.yearrange.minyear,n.yearrange.maxyear)},cardinality:3}]}},insertMode:!1,autoUnmask:!1},"mm/dd/yyyy":{placeholder:"mm/dd/yyyy",alias:"dd/mm/yyyy",regex:{val2pre:function(e){var i=t.escapeRegex.call(this,e);return new RegExp("((0[13-9]|1[012])"+i+"[0-3])|(02"+i+"[0-2])")},val2:function(e){var i=t.escapeRegex.call(this,e);return new RegExp("((0[1-9]|1[012])"+i+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+i+"30)|((0[13578]|1[02])"+i+"31)")}
vendor: 4,298 bytes, line 11348
11348,val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},leapday:"02/29/",onKeyDown:function(i,a,n,r){var o=e(this);if(i.ctrlKey&&i.keyCode===t.keyCode.RIGHT){var s=new Date;o.val((s.getMonth()+1).toString()+s.getDate().toString()+s.getFullYear().toString()),o.trigger("setvalue")}}},"yyyy/mm/dd":{mask:"y/1/2",placeholder:"yyyy/mm/dd",alias:"mm/dd/yyyy",leapday:"/02/29",onKeyDown:function(i,a,n,r){var o=e(this);if(i.ctrlKey&&i.keyCode===t.keyCode.RIGHT){var s=new Date;o.val(s.getFullYear().toString()+(s.getMonth()+1).toString()+s.getDate().toString()),o.trigger("setvalue")}}},"dd.mm.yyyy":{mask:"1.2.y",placeholder:"dd.mm.yyyy",leapday:"29.02.",separator:".",alias:"dd/mm/yyyy"},"dd-mm-yyyy":{mask:"1-2-y",placeholder:"dd-mm-yyyy",leapday:"29-02-",separator:"-",alias:"dd/mm/yyyy"},"mm.dd.yyyy":{mask:"1.2.y",placeholder:"mm.dd.yyyy",leapday:"02.29.",separator:".",alias:"mm/dd/yyyy"},"mm-dd-yyyy":{mask:"1-2-y",placeholder:"mm-dd-yyyy",leapday:"02-29-",separator:"-",alias:"mm/dd/yyyy"},"yyyy.mm.dd":{mask:"y.1.2",placeholder:"yyyy.mm.dd",leapday:".02.29",separator:".",alias:"yyyy/mm/dd"},"yyyy-mm-dd":{mask:"y-1-2",placeholder:"yyyy-mm-dd",leapday:"-02-29",separator:"-",alias:"yyyy/mm/dd"},datetime:{mask:"1/2/y h:s",placeholder:"dd/mm/yyyy hh:mm",alias:"dd/mm/yyyy",regex:{hrspre:new RegExp("[012]"),hrs24:new RegExp("2[0-4]|1[3-9]"),hrs:new RegExp("[01][0-9]|2[0-4]"),ampm:new RegExp("^[a|p|A|P][m|M]"),mspre:new RegExp("[0-5]"),ms:new RegExp("[0-5][0-9]")},timeseparator:":",hourFormat:"24",definitions:{h:{validator:function(e,t,i,a,n){if("24"===n.hourFormat&&24===parseInt(e,10))return t.buffer[i-1]="0",t.buffer[i]="0",{refreshFromBuffer:{start:i-1,end:i},c:"0"};var r=n.regex.hrs.test(e);if(!a&&!r&&(e.charAt(1)===n.timeseparator||"-.:".indexOf(e.charAt(1))!==-1)&&(r=n.regex.hrs.test("0"+e.charAt(0))))return t.buffer[i-1]="0",t.buffer[i]=e.charAt(0),i++,{refreshFromBuffer:{start:i-2,end:i},pos:i,c:n.timeseparator};if(r&&"24"!==n.hourFormat&&n.regex.hrs24.test(e)){var o=parseInt(e,10);return 24===o?(t.buffer[i+5]="a",t.buffer[i+6]="m"):(t.buffer[i+5]="p",t.buffer[i+6]="m"),o-=12,o<10?(t.buffer[i]=o.toString(),t.buffer[i-1]="0"):(t.buffer[i]=o.toString().charAt(1),t.buffer[i-1]=o.toString().charAt(0)),{refreshFromBuffer:{start:i-1,end:i+6},c:t.buffer[i]}}return r},cardinality:2,prevalidator:[{validator:function(e,t,i,a,n){var r=n.regex.hrspre.test(e);return a||r||!(r=n.regex.hrs.test("0"+e))?r:(t.buffer[i]="0",i++,{pos:i})},cardinality:1}]},s:{validator:"[0-5][0-9]",cardinality:2,prevalidator:[{validator:function(e,t,i,a,n){var r=n.regex.mspre.test(e);return a||r||!(r=n.regex.ms.test("0"+e))?r:(t.buffer[i]="0",i++,{pos:i})},cardinality:1}]},t:{validator:function(e,t,i,a,n){return n.regex.ampm.test(e+"m")},casing:"lower",cardinality:1}},insertMode:!1,autoUnmask:!1},datetime12:{mask:"1/2/y h:s t\\m",placeholder:"dd/mm/yyyy hh:mm xm",alias:"datetime",hourFormat:"12"},"mm/dd/yyyy hh:mm xm":{mask:"1/2/y h:s t\\m",placeholder:"mm/dd/yyyy hh:mm xm",alias:"datetime12",regex:{val2pre:function(e){var i=t.escapeRegex.call(this,e);return new RegExp("((0[13-9]|1[012])"+i+"[0-3])|(02"+i+"[0-2])")},val2:function(e){var i=t.escapeRegex.call(this,e);return new RegExp("((0[1-9]|1[012])"+i+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+i+"30)|((0[13578]|1[02])"+i+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},leapday:"02/29/",onKeyDown:function(i,a,n,r){var o=e(this);if(i.ctrlKey&&i.keyCode===t.keyCode.RIGHT){var s=new Date;o.val((s.getMonth()+1).toString()+s.getDate().toString()+s.getFullYear().toString()),o.trigger("setvalue")}}},"hh:mm t":{mask:"h:s t\\m",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"h:s t":{mask:"h:s t\\m",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"hh:mm:ss":{mask:"h:s:s",placeholder:"hh:mm:ss",alias:"datetime",autoUnmask:!1},"hh:mm":{mask:"h:s",placeholder:"hh:mm",alias:"datetime",autoUnmask:!1},date:{alias:"dd/mm/yyyy"},"mm/yyyy":{mask:"1/y",placeholder:"mm/yyyy",leapday:"donotuse",separator:"/",alias:"mm/dd/yyyy"},shamsi:{regex:{val2pre:function(e){var i=t.escapeRegex.call(this,e);return new RegExp("((0[1-9]|1[012])"+i+"[0-3])")},val2:function(e){var i=t.escapeRegex.call(this,e);return new RegExp("((0[1-9]|1[012])"+i+"(0[1-9]|[12][0-9]))|((0[1-9]|1[012])"+i+"30)|((0[1-6])"+i+"31)")}
vendor: 4,950 bytes, line 11348
11348,val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},yearrange:{minyear:1300,maxyear:1499},mask:"y/1/2",leapday:"/12/30",placeholder:"yyyy/mm/dd",alias:"mm/dd/yyyy",clearIncomplete:!0}}),t}(jQuery,Inputmask),function(e,t){return t.extendDefinitions({A:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,casing:"upper"},"&":{validator:"[0-9A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,casing:"upper"},"#":{validator:"[0-9A-Fa-f]",cardinality:1,casing:"upper"}}),t.extendAliases({url:{definitions:{i:{validator:".",cardinality:1}},mask:"(\\http://)|(\\http\\s://)|(ftp://)|(ftp\\s://)i{+}",insertMode:!1,autoUnmask:!1,inputmode:"url"},ip:{mask:"i[i[i]].i[i[i]].i[i[i]].i[i[i]]",definitions:{i:{validator:function(e,t,i,a,n){return i-1>-1&&"."!==t.buffer[i-1]?(e=t.buffer[i-1]+e,e=i-2>-1&&"."!==t.buffer[i-2]?t.buffer[i-2]+e:"0"+e):e="00"+e,new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(e)},cardinality:1}},onUnMask:function(e,t,i){return e},inputmode:"numeric"},email:{mask:"*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",greedy:!1,onBeforePaste:function(e,t){return e=e.toLowerCase(),e.replace("mailto:","")},definitions:{"*":{validator:"[0-9A-Za-z!#$%&'*+/=?^_`{|}~-]",cardinality:1,casing:"lower"},"-":{validator:"[0-9A-Za-z-]",cardinality:1,casing:"lower"}},onUnMask:function(e,t,i){return e},inputmode:"email"},mac:{mask:"##:##:##:##:##:##"},vin:{mask:"V{13}9{4}",definitions:{V:{validator:"[A-HJ-NPR-Za-hj-npr-z\\d]",cardinality:1,casing:"upper"}},clearIncomplete:!0,autoUnmask:!0}}),t}(jQuery,Inputmask),function(e,t){return t.extendAliases({numeric:{mask:function(e){function i(t){for(var i="",a=0;a<t.length;a++)i+=e.definitions[t.charAt(a)]||e.optionalmarker.start===t.charAt(a)||e.optionalmarker.end===t.charAt(a)||e.quantifiermarker.start===t.charAt(a)||e.quantifiermarker.end===t.charAt(a)||e.groupmarker.start===t.charAt(a)||e.groupmarker.end===t.charAt(a)||e.alternatormarker===t.charAt(a)?"\\"+t.charAt(a):t.charAt(a);return i}if(0!==e.repeat&&isNaN(e.integerDigits)&&(e.integerDigits=e.repeat),e.repeat=0,e.groupSeparator===e.radixPoint&&("."===e.radixPoint?e.groupSeparator=",":","===e.radixPoint?e.groupSeparator=".":e.groupSeparator="")," "===e.groupSeparator&&(e.skipOptionalPartCharacter=void 0),e.autoGroup=e.autoGroup&&""!==e.groupSeparator,e.autoGroup&&("string"==typeof e.groupSize&&isFinite(e.groupSize)&&(e.groupSize=parseInt(e.groupSize)),isFinite(e.integerDigits))){var a=Math.floor(e.integerDigits/e.groupSize),n=e.integerDigits%e.groupSize;e.integerDigits=parseInt(e.integerDigits)+(0===n?a-1:a),e.integerDigits<1&&(e.integerDigits="*")}e.placeholder.length>1&&(e.placeholder=e.placeholder.charAt(0)),"radixFocus"===e.positionCaretOnClick&&""===e.placeholder&&e.integerOptional===!1&&(e.positionCaretOnClick="lvp"),e.definitions[";"]=e.definitions["~"],e.definitions[";"].definitionSymbol="~",e.numericInput===!0&&(e.positionCaretOnClick="radixFocus"===e.positionCaretOnClick?"lvp":e.positionCaretOnClick,e.digitsOptional=!1,isNaN(e.digits)&&(e.digits=2),e.decimalProtect=!1);var r="[+]";if(r+=i(e.prefix),r+=e.integerOptional===!0?"~{1,"+e.integerDigits+"}":"~{"+e.integerDigits+"}",void 0!==e.digits){e.decimalProtect&&(e.radixPointDefinitionSymbol=":");var o=e.digits.toString().split(",");isFinite(o[0]&&o[1]&&isFinite(o[1]))?r+=(e.decimalProtect?":":e.radixPoint)+";{"+e.digits+"}":(isNaN(e.digits)||parseInt(e.digits)>0)&&(r+=e.digitsOptional?"["+(e.decimalProtect?":":e.radixPoint)+";{1,"+e.digits+"}]":(e.decimalProtect?":":e.radixPoint)+";{"+e.digits+"}")}return r+=i(e.suffix),r+="[-]",e.greedy=!1,null!==e.min&&(e.min=e.min.toString().replace(new RegExp(t.escapeRegex(e.groupSeparator),"g"),""),","===e.radixPoint&&(e.min=e.min.replace(e.radixPoint,"."))),null!==e.max&&(e.max=e.max.toString().replace(new RegExp(t.escapeRegex(e.groupSeparator),"g"),""),","===e.radixPoint&&(e.max=e.max.replace(e.radixPoint,"."))),r},placeholder:"",greedy:!1,digits:"*",digitsOptional:!0,radixPoint:".",positionCaretOnClick:"radixFocus",groupSize:3,groupSeparator:"",autoGroup:!1,allowPlus:!0,allowMinus:!0,negationSymbol:{front:"-",back:""},integerDigits:"+",integerOptional:!0,prefix:"",suffix:"",rightAlign:!0,decimalProtect:!0,min:null,max:null,step:1,insertMode:!0,autoUnmask:!1,unmaskAsNumber:!1,inputmode:"numeric",postFormat:function(i,a,n){n.numericInput===!0&&(i=i.reverse(),isFinite(a)&&(a=i.join("").length-a-1));var r,o;a=a>=i.length?i.length-1:a<0?0:a;var s=i[a],l=i.slice();s===n.groupSeparator&&(l.splice(a--,1),s=l[a]);var u=l.join("").match(new RegExp("^"+t.escapeRegex(n.negationSymbol.front)));u=null!==u&&1===u.length,a>(u?n.negationSymbol.front.length:0)+n.prefix.length&&a<l.length-n.suffix.length&&(l[a]="!");var c=l.join(""),p=l.join();if(u&&(c=c.replace(new RegExp("^"+t.escapeRegex(n.negationSymbol.front)),""),c=c.replace(new RegExp(t.escapeRegex(n.negationSymbol.back)+"$"),"")),c=c.replace(new RegExp(t.escapeRegex(n.suffix
vendor: 9,024 bytes, lines 11348-11349
11348)+"$"),""),c=c.replace(new RegExp("^"+t.escapeRegex(n.prefix)),""),c.length>0&&n.autoGroup||c.indexOf(n.groupSeparator)!==-1){var d=t.escapeRegex(n.groupSeparator);c=c.replace(new RegExp(d,"g"),"");var f=c.split(s===n.radixPoint?"!":n.radixPoint);if(c=""===n.radixPoint?c:f[0],s!==n.negationSymbol.front&&(c=c.replace("!","?")),c.length>n.groupSize)for(var m=new RegExp("([-+]?[\\d?]+)([\\d?]{"+n.groupSize+"})");m.test(c)&&""!==n.groupSeparator;)c=c.replace(m,"$1"+n.groupSeparator+"$2"),c=c.replace(n.groupSeparator+n.groupSeparator,n.groupSeparator);c=c.replace("?","!"),""!==n.radixPoint&&f.length>1&&(c+=(s===n.radixPoint?"!":n.radixPoint)+f[1])}c=n.prefix+c+n.suffix,u&&(c=n.negationSymbol.front+c+n.negationSymbol.back);var h=p!==c.split("").join(),v=e.inArray("!",c);if(v===-1&&(v=a),h){for(i.length=c.length,r=0,o=c.length;r<o;r++)i[r]=c.charAt(r);i[v]=s}return v=n.numericInput&&isFinite(a)?i.join("").length-v-1:v,n.numericInput&&(i=i.reverse(),e.inArray(n.radixPoint,i)<v&&i.join("").length-n.suffix.length!==v&&(v-=1)),{pos:v,refreshFromBuffer:h,buffer:i,isNegative:u}},onBeforeWrite:function(i,a,n,r){var o;if(i&&("blur"===i.type||"checkval"===i.type||"keydown"===i.type)){var s=r.numericInput?a.slice().reverse().join(""):a.join(""),l=s.replace(r.prefix,"");l=l.replace(r.suffix,""),l=l.replace(new RegExp(t.escapeRegex(r.groupSeparator),"g"),""),","===r.radixPoint&&(l=l.replace(r.radixPoint,"."));var u=l.match(new RegExp("[-"+t.escapeRegex(r.negationSymbol.front)+"]","g"));if(u=null!==u&&1===u.length,l=l.replace(new RegExp("[-"+t.escapeRegex(r.negationSymbol.front)+"]","g"),""),
11349l=l.replace(new RegExp(t.escapeRegex(r.negationSymbol.back)+"$"),""),isNaN(r.placeholder)&&(l=l.replace(new RegExp(t.escapeRegex(r.placeholder),"g"),"")),l=l===r.negationSymbol.front?l+"0":l,""!==l&&isFinite(l)){var c=parseFloat(l),p=u?c*-1:c;if(null!==r.min&&isFinite(r.min)&&p<parseFloat(r.min)?(c=Math.abs(r.min),u=r.min<0,s=void 0):null!==r.max&&isFinite(r.max)&&p>parseFloat(r.max)&&(c=Math.abs(r.max),u=r.max<0,s=void 0),l=c.toString().replace(".",r.radixPoint).split(""),isFinite(r.digits)){var d=e.inArray(r.radixPoint,l),f=e.inArray(r.radixPoint,s);d===-1&&(l.push(r.radixPoint),d=l.length-1);for(var m=1;m<=r.digits;m++)r.digitsOptional||void 0!==l[d+m]&&l[d+m]!==r.placeholder.charAt(0)?f!==-1&&void 0!==s[f+m]&&(l[d+m]=l[d+m]||s[f+m]):l[d+m]="0";l[l.length-1]===r.radixPoint&&delete l[l.length-1]}if(c.toString()!==l&&c.toString()+"."!==l||u)return l=(r.prefix+l.join("")).split(""),!u||0===c&&"blur"===i.type||(l.unshift(r.negationSymbol.front),l.push(r.negationSymbol.back)),r.numericInput&&(l=l.reverse()),o=r.postFormat(l,r.numericInput?n:n-1,r),o.buffer&&(o.refreshFromBuffer=o.buffer.join("")!==a.join("")),o}}if(r.autoGroup)return o=r.postFormat(a,r.numericInput?n:n-1,r),o.caret=n<(o.isNegative?r.negationSymbol.front.length:0)+r.prefix.length||n>o.buffer.length-(o.isNegative?r.negationSymbol.back.length:0)?o.pos:o.pos+1,o},regex:{integerPart:function(e){return new RegExp("["+t.escapeRegex(e.negationSymbol.front)+"+]?\\d+")},integerNPart:function(e){return new RegExp("[\\d"+t.escapeRegex(e.groupSeparator)+t.escapeRegex(e.placeholder.charAt(0))+"]+")}},signHandler:function(e,t,i,a,n){if(!a&&n.allowMinus&&"-"===e||n.allowPlus&&"+"===e){var r=t.buffer.join("").match(n.regex.integerPart(n));if(r&&r[0].length>0)return t.buffer[r.index]===("-"===e?"+":n.negationSymbol.front)?"-"===e?""!==n.negationSymbol.back?{pos:0,c:n.negationSymbol.front,remove:0,caret:i,insert:{pos:t.buffer.length-1,c:n.negationSymbol.back}}:{pos:0,c:n.negationSymbol.front,remove:0,caret:i}:""!==n.negationSymbol.back?{pos:0,c:"+",remove:[0,t.buffer.length-1],caret:i}:{pos:0,c:"+",remove:0,caret:i}:t.buffer[0]===("-"===e?n.negationSymbol.front:"+")?"-"===e&&""!==n.negationSymbol.back?{remove:[0,t.buffer.length-1],caret:i-1}:{remove:0,caret:i-1}:"-"===e?""!==n.negationSymbol.back?{pos:0,c:n.negationSymbol.front,caret:i+1,insert:{pos:t.buffer.length,c:n.negationSymbol.back}}:{pos:0,c:n.negationSymbol.front,caret:i+1}:{pos:0,c:e,caret:i+1}}return!1},radixHandler:function(t,i,a,n,r){if(!n&&r.numericInput!==!0&&t===r.radixPoint&&void 0!==r.digits&&(isNaN(r.digits)||parseInt(r.digits)>0)){var o=e.inArray(r.radixPoint,i.buffer),s=i.buffer.join("").match(r.regex.integerPart(r));if(o!==-1&&i.validPositions[o])return i.validPositions[o-1]?{caret:o+1}:{pos:s.index,c:s[0],caret:o+1};if(!s||"0"===s[0]&&s.index+1!==a)return i.buffer[s?s.index:a]="0",{pos:(s?s.index:a)+1,c:r.radixPoint}}return!1},leadingZeroHandler:function(t,i,a,n,r,o){if(!n){var s=i.buffer.slice("");if(s.splice(0,r.prefix.length),s.splice(s.length-r.suffix.length,r.suffix.length),r.numericInput===!0){var s=s.reverse(),l=s[0];if("0"===l&&void 0===i.validPositions[a-1])return{pos:a,remove:s.length-1}}else{a-=r.prefix.length;var u=e.inArray(r.radixPoint,s),c=s.slice(0,u!==-1?u:void 0).join("").match(r.regex.integerNPart(r));if(c&&(u===-1||a<=u)){var p=u===-1?0:parseInt(s.slice(u+1).join(""));if(0===c[0].indexOf(""!==r.placeholder?r.placeholder.charAt(0):"0")&&(c.index+1===a||o!==!0&&0===p))return i.buffer.splice(c.index+r.prefix.length,1),{pos:c.index+r.prefix.length,remove:c.index+r.prefix.length};if("0"===t&&a<=c.index&&c[0]!==r.groupSeparator)return!1}}}return!0},definitions:{"~":{validator:function(i,a,n,r,o,s){var l=o.signHandler(i,a,n,r,o);if(!l&&(l=o.radixHandler(i,a,n,r,o),!l&&(l=r?new RegExp("[0-9"+t.escapeRegex(o.groupSeparator)+"]").test(i):new RegExp("[0-9]").test(i),l===!0&&(l=o.leadingZeroHandler(i,a,n,r,o,s),l===!0)))){var u=e.inArray(o.radixPoint,a.buffer);l=u!==-1&&(o.digitsOptional===!1||a.validPositions[n])&&o.numericInput!==!0&&n>u&&!r?{pos:n,remove:n}:{pos:n}}return l},cardinality:1},"+":{validator:function(e,t,i,a,n){var r=n.signHandler(e,t,i,a,n);return!r&&(a&&n.allowMinus&&e===n.negationSymbol.front||n.allowMinus&&"-"===e||n.allowPlus&&"+"===e)&&(r=!(!a&&"-"===e)||(""!==n.negationSymbol.back?{pos:i,c:"-"===e?n.negationSymbol.front:"+",caret:i+1,insert:{pos:t.buffer.length,c:n.negationSymbol.back}}:{pos:i,c:"-"===e?n.negationSymbol.front:"+",caret:i+1})),r},cardinality:1,placeholder:""},"-":{validator:function(e,t,i,a,n){var r=n.signHandler(e,t,i,a,n);return!r&&a&&n.allowMinus&&e===n.negationSymbol.back&&(r=!0),r},cardinality:1,placeholder:""},":":{validator:function(e,i,a,n,r){var o=r.signHandler(e,i,a,n,r);if(!o){var s="["+t.escapeRegex(r.radixPoint)+"]";o=new RegExp(s).test(e),o&&i.validPositions[a]&&i.validPositions[a].match.placeholder===r.radixPoint&&(o={caret:a+1})}return o},cardinality:1,placeholder:function(e){return e.radixPoint}}},onUnMask:function(e,i,a){if(""===i&&a.nullable===!0)return i;var n=e.replace(a.prefix,"");return n=n.replace(a.suffix,""),n=n.replace(new RegExp(t.escapeRegex(a.groupSeparator),"g"),""),a.unmaskAsNumber?(""!==a.radixPoint&&n.indexOf(a.radixPoint)!==-1&&(n=n.replace(t.escapeRegex.call(this,a.radixPoint),".")),Number(n)):n},isComplete:function(e,i){var a=e.join(""),n=e.slice();if(i.postFormat(n,0,i),n.join("")!==a)return!1;var r=a.replace(i.prefix,"");return r=r.replace(i.suffix,""),r=r.replace(new RegExp(t.escapeRegex(i.groupSeparator),"g"),""),","===i.radixPoint&&(r=r.replace(t.escapeRegex(i.radixPoint),".")),isFinite(r)},onBeforeMask:function(e,i){if(i.numericInput===!0&&(e=e.split("").reverse().join("")),""!==i.radixPoint&&isFinite(e)){var a=e.split("."),n=""!==i.groupSeparator?parseInt(i.groupSize):0;2===a.length&&(a[0].length>n||a[1].length>n)&&(e=e.toString().replace(".",i.radixPoint))}var r=e.match(/,/g),o=e.match(/\./g);if(o&&r?o.length>r.length?(e=e.replace(/\./g,""),e=e.replace(",",i.radixPoint)):r.length>o.length?(e=e.replace(/,/g,""),e=e.replace(".",i.radixPoint)):e=e.indexOf(".")<e.indexOf(",")?e.replace(/\./g,""):e=e.replace(/,/g,""):e=e.replace(new RegExp(t.escapeRegex(i.groupSeparator),"g"),""),0===i.digits&&(e.indexOf(".")!==-1?e=e.substring(0,e.indexOf(".")):e.indexOf(",")!==-1&&(e=e.substring(0,e.indexOf(",")))),""!==i.radixPoint&&isFinite(i.digits)&&e.indexOf(i.radixPoint)!==-1){var s=e.split(i.radixPoint),l=s[1].match(new RegExp("\\d*"))[0];if(parseInt(i.digits)<l.toString().length){var u=Math.pow(10,parseInt(i.digits));e=e.replace(t.escapeRegex(i.radixPoint),"."),e=Math.round(parseFloat(e)*u)/u,e=e.toString().replace(".",i.radixPoint)}}return i.numericInput===!0&&(e=e.split("").reverse().join("")),e.toString()},canClearPosition:function(e,t,i,a,n){var r=e.validPositions[t].input,o=r!==n.radixPoint||null!==e.validPositions[t].match.fn&&n.decimalProtect===!1||isFinite(r)||t===i||r===n.groupSeparator||r===n.negationSymbol.front||r===n.negationSymbol.back;return o},onKeyDown:function(i,a,n,r){var o=e(this);if(i.ctrlKey)switch(i.keyCode){case t.keyCode.UP:o.val(parseFloat(this.inputmask.unmaskedvalue())+parseInt(r.step)),o.trigger("setvalue");break;case t.keyCode.DOWN:o.val(parseFloat(this.inputmask.unmaskedvalue())-parseInt(r.step)),o.trigger("setvalue")}}},currency:{prefix:"$ ",groupSeparator:",",alias:"numeric",placeholder:"0",autoGroup:!0,digits:2,digitsOptional:!1,clearMaskOnLostFocus:!1}
11349,decimal:{alias:"numeric"},integer:{alias:"numeric",digits:0,radixPoint:""},percentage:{alias:"numeric",digits:2,radixPoint:".",placeholder:"0",autoGroup:!1,min:0,max:100,suffix:" %",allowPlus:!1,allowMinus:!1}}),t}(jQuery,Inputmask),function(e,t){function i(e,t){var i=(e.mask||e).replace(/#/g,"9").replace(/\)/,"9").replace(/[+()#-]/g,""),a=(t.mask||t).replace(/#/g,"9").replace(/\)/,"9").replace(/[+()#-]/g,""),n=(e.mask||e).split("#")[0],r=(t.mask||t).split("#")[0];return 0===r.indexOf(n)?-1:0===n.indexOf(r)?1:i.localeCompare(a)}var a=t.prototype.analyseMask;return t.prototype.analyseMask=function(t,i){function n(e,i,a){i=i||"",a=a||o,""!==i&&(a[i]={});for(var r="",s=a[i]||a,l=e.length-1;l>=0;l--)t=e[l].mask||e[l],r=t.substr(0,1),s[r]=s[r]||[],s[r].unshift(t.substr(1)),e.splice(l,1);for(var u in s)s[u].length>500&&n(s[u].slice(),u,s)}function r(t){var a="",n=[];for(var o in t)e.isArray(t[o])?1===t[o].length?n.push(o+t[o]):n.push(o+i.groupmarker.start+t[o].join(i.groupmarker.end+i.alternatormarker+i.groupmarker.start)+i.groupmarker.end):n.push(o+r(t[o]));return a+=1===n.length?n[0]:i.groupmarker.start+n.join(i.groupmarker.end+i.alternatormarker+i.groupmarker.start)+i.groupmarker.end}var o={};i.phoneCodes&&i.phoneCodes.length>1e3&&(t=t.substr(1,t.length-2),n(t.split(i.groupmarker.end+i.alternatormarker+i.groupmarker.start)),t=r(o));var s=a.call(this,t,i);return s},t.extendAliases({abstractphone:{groupmarker:{start:"<",end:">"},countrycode:"",phoneCodes:[],mask:function(e){return e.definitions={"#":e.definitions[9]},e.phoneCodes.sort(i)},keepStatic:!0,onBeforeMask:function(e,t){var i=e.replace(/^0{1,2}/,"").replace(/[\s]/g,"");return(i.indexOf(t.countrycode)>1||i.indexOf(t.countrycode)===-1)&&(i="+"+t.countrycode+i),i},onUnMask:function(e,t,i){return t},inputmode:"tel"}}),t}(jQuery,Inputmask),function(e,t){return t.extendAliases({Regex:{mask:"r",greedy:!1,repeat:"*",regex:null,regexTokens:null,tokenizer:/\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g,quantifierFilter:/[0-9]+[^,]/,isComplete:function(e,t){return new RegExp(t.regex).test(e.join(""))},definitions:{r:{validator:function(t,i,a,n,r){function o(e,t){this.matches=[],this.isGroup=e||!1,this.isQuantifier=t||!1,this.quantifier={min:1,max:1},this.repeaterPart=void 0}function s(){var e,t,i=new o,a=[];for(r.regexTokens=[];e=r.tokenizer.exec(r.regex);)switch(t=e[0],t.charAt(0)){case"(":a.push(new o(!0));break;case")":c=a.pop(),a.length>0?a[a.length-1].matches.push(c):i.matches.push(c);break;case"{":case"+":case"*":var n=new o(!1,!0);t=t.replace(/[{}]/g,"");var s=t.split(","),l=isNaN(s[0])?s[0]:parseInt(s[0]),u=1===s.length?l:isNaN(s[1])?s[1]:parseInt(s[1]);if(n.quantifier={min:l,max:u},a.length>0){var p=a[a.length-1].matches;e=p.pop(),e.isGroup||(c=new o(!0),c.matches.push(e),e=c),p.push(e),p.push(n)}else e=i.matches.pop(),e.isGroup||(c=new o(!0),c.matches.push(e),e=c),i.matches.push(e),i.matches.push(n);break;default:a.length>0?a[a.length-1].matches.push(t):i.matches.push(t)}i.matches.length>0&&r.regexTokens.push(i)}function l(t,i){var a=!1;i&&(d+="(",m++);for(var n=0;n<t.matches.length;n++){var r=t.matches[n];if(r.isGroup===!0)a=l(r,!0);else if(r.isQuantifier===!0){var o=e.inArray(r,t.matches),s=t.matches[o-1],c=d;if(isNaN(r.quantifier.max)){for(;r.repeaterPart&&r.repeaterPart!==d&&r.repeaterPart.length>d.length&&!(a=l(s,!0)););a=a||l(s,!0),a&&(r.repeaterPart=d),d=c+r.quantifier.max}else{for(var p=0,f=r.quantifier.max-1;p<f&&!(a=l(s,!0));p++);d=c+"{"+r.quantifier.min+","+r.quantifier.max+"}"}}else if(void 0!==r.matches)for(var h=0;h<r.length&&!(a=l(r[h],i));h++);else{var v;if("["==r.charAt(0)){v=d,v+=r;for(var g=0;g<m;g++)v+=")";var y=new RegExp("^("+v+")$");a=y.test(u)}else for(var k=0,x=r.length;k<x;k++)if("\\"!==r.charAt(k)){v=d,v+=r.substr(0,k+1),v=v.replace(/\|$/,"");for(var g=0;g<m;g++)v+=")";var y=new RegExp("^("+v+")$");if(a=y.test(u))break}d+=r}if(a)break}return i&&(d+=")",m--),a}var u,c,p=i.buffer.slice(),d="",f=!1,m=0;null===r.regexTokens&&s(),p.splice(a,0,t),u=p.join("");for(var h=0;h<r.regexTokens.length;h++){var v=r.regexTokens[h];if(f=l(v,v.isGroup))break}return f},cardinality:1}}}}),t}(jQuery,Inputmask);
11350//# sourceMappingURL=jquery.inputmask.bundle.min.js.map

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.