vendor: 13,852 bytes, lines 1-2
1/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ 2!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),D=function(e,t){return e===t&&(l=!0),0},j={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",B=new RegExp(M+"+","g"),$=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="<a id='"+S+"'></a><select id='"+S+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=C&&T(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&j.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(D
vendor: 9,284 bytes, line 2
2),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(B," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var y="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!==m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[k,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[k,d]),a===e))break;return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace($,"$1"));return s[S]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[k,p];if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[S]||(e[S]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===k&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(d,h,g,v,y,e){return v&&!v[S]&&(v=Ce(v)),y&&!y[S]&&(y=Ce(y,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v){i=Te(p,u),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(y||d){if(y){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=y?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace($,"$1"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace($," ")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,v,y,m,x,r,i=[],o=[],a=A[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[S]?i.push(a):o.push(a);(a=A(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=k+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==C||(T(o),n=!E);while(s=v[a++])if(s(o,t||C,n)){r.push(o);break}i&&(k=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&se.uniqueSort(r)}return i&&(k=h,w=p),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ye(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},d.sortStable=S.split("").sort(
vendor: 1,187 bytes, line 2
2D).join("")===S,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);S.find=d,S.expr=d.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=d.uniqueSort,S.text=d.getText,S.isXMLDoc=d.isXML,S.contains=d.contains,S.escapeSelector=d.escape;var h=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&S(e).is(n))break;r.push(e)}return r},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=S.expr.match.needsContext;
vendor: 1,695 bytes, line 2
2function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1<i.call(n,e)!==r}):S.filter(n,e,r)}S.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=0;t<r;t++)if(S.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return 1<r?S.uniqueSort(n):n},filter:function(e){return this.pushStack(D(this,e||[],!1))},not:function(e){return this.pushStack(D(this,e||[],!0))},is:function(e){return!!D(this,"string"==typeof e&&k.test(e)?S(e):e||[],!1).length}});var j,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j
vendor: 13,580 bytes, line 2
2=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&S(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&S.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?S.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(S(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return h(e,"parentNode")},parentsUntil:function(e,t,n){return h(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return h(e,"nextSibling")},prevAll:function(e){return h(e,"previousSibling")},nextUntil:function(e,t,n){return h(e,"nextSibling",n)},prevUntil:function(e,t,n){return h(e,"previousSibling",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},function(r,i){S.fn[r]=function(e,t){var n=S.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=S.filter(t,n)),1<this.length&&(H[r]||S.uniqueSort(n),L.test(r)&&n.reverse()),this.pushStack(n)}});var P=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},S.each(e.match(P)||[],function(e,t){n[t]=!0}),n):S.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){S.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return S.each(arguments,function(e,t){var n;while(-1<(n=S.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<S.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},S.extend({Deferred:function(e){var o=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return S.Deferred(function(r){S.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,R,s),l(u,o,M,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,M,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(S.Deferred.getStackHook&&(t.stackTrace=S.Deferred.getStackHook()),C.setTimeout(t))}}return S.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:R)),o[2][3].add(l(0,e,m(n)?n:M))}).promise()},promise:function(e){return null!=e?S.extend(e,a):a}},s={};return S.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=S.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(I(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)I(i[t],a(t),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&W.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){C.setTimeout(function(){throw e})};var F=S.Deferred();function B(){E.removeEventListener("DOMContentLoaded",B),C.removeEventListener("load",B),S.ready()}S.fn.ready=function(e){return F.then(e)["catch"](function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0)!==e&&0<--S.readyWait||F.resolveWith(E,[S])}}),S.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(S.ready):(E.addEventListener("DOMContentLoaded",B),C.addEventListener("load",B));var $=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)$(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},_=/^-ms-/,z=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function X(e){return e.replace(_,"ms-").replace(z,U)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=S.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},V(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in r?[t]:t.match(P)||[]).length;while(n--)delete r[t[n]]}(void 0===t||S.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};var Y=new G,Q=new G,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(K,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:J.test(i)?JSON.parse(i):i)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),S.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=Q.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=X(r.slice(5)),Z(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){Q.set(this,n)}):$(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=Q.get(o,n))?t:void 0!==(t=Z(o,n))?t:void 0;this.each(function(){Q.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),r=n.length,i=n.shift(),o=S._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){S.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:S.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),S.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?S.queue(this[0],t):void 0===n?this:this.each(function(){var e=S.queue(this,t,n);S._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&S.dequeue(this,t)})},dequeue:function(e){return this.each(function(){S.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=S.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=Y.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=E.documentElement,ie=function(e){return S.contains(e.ownerDocument,e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===S.css(e,"display")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,"")},u=s(),l=n&&n[3]||(S.cssNumber[t]?"":"px"),c=e.nodeType&&(S.cssNumber[t]||"px"!==l&&+u)&&te.exec(S.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)S.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,S.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ue={};function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(o=a.body.appendChild(a.createElement(s)),u=S.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ue[s]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}S.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?S(this).show():S(this).hide()})}});var ce,fe,pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="<option></option>",y.option=!!ce.lastChild;var ge={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,y.option||(ge.optgroup=ge.option=[1,"<select multiple='multiple'>","</select>"]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))S.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+S.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;S.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<S.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ve(f.appendChild(o),"script"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}var be=/^
vendor: 6,849 bytes, line 2
2key/,we=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Te=/^([^.]*)(?:\.(.+)|)/;function Ce(){return!0}function Ee(){return!1}function Se(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function ke(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)ke(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ee;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return S().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),e.each(function(){S.event.add(this,t,i,r,n)})}function Ae(e,i,o){o?(Y.set(e,i,!1),S.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(S.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Y.set(this,i,{value:S.event.trigger(S.extend(r[0],S.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&S.event.add(e,i,Ce)}S.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.get(t);if(V(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(re,i),n.guid||(n.guid=S.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof S&&S.event.triggered!==e.type?S.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(P)||[""]).length;while(l--)d=g=(s=Te.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=S.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=S.event.special[d]||{},c=S.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),S.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.hasData(e)&&Y.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(P)||[""]).length;while(l--)if(d=g=(s=Te.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=S.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||S.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)S.event.remove(e,d+t[l],n,r,!0);S.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=S.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=S.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=S.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((S.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<S(i,this).index(l):S.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(S.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Ae(t,"click",Ce),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Ae(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Y.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ce:Ee,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Ee,isPropagationStopped:Ee,isImmediatePropagationStopped:Ee,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ce,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ce,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ce,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&be.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&we.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(e,t){S.event.special[e]={setup:function(){return Ae(this,e,Se),!1},trigger:function(){return Ae(this,e),!0},delegateType:t}}
vendor: 5,886 bytes, line 2
2),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){S.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||S.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),S.fn.extend({on:function(e,t,n,r){return ke(this,e,t,n,r)},one:function(e,t,n,r){return ke(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Ee),this.each(function(){S.event.remove(this,e,n,t)})}});var Ne=/<script|<style|<link/i,De=/checked\s*(?:[^=]|=\s*.checked.)/i,je=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)S.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=S.extend({},o),Q.set(t,a))}}function Pe(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&"string"==typeof d&&!y.checkClone&&De.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),Pe(t,r,i,o)});if(f&&(t=(e=xe(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=S.map(ve(e,"script"),Le)).length;c<f;c++)u=e,c!==p&&(u=S.clone(u,!0,!0),s&&S.merge(a,ve(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,S.map(a,He),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Y.access(u,"globalEval")&&S.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?S._evalUrl&&!u.noModule&&S._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):b(u.textContent.replace(je,""),u,l))}return n}function Re(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||S.cleanData(ve(r)),r.parentNode&&(n&&ie(r)&&ye(ve(r,"script")),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=ie(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ve(e),a=a||ve(c),r=0,i=o.length;r<i;r++)Oe(o[r],a[r]);else Oe(e,c);return 0<(a=ve(c,"script")).length&&ye(a,!f&&ve(e,"script")),c},cleanData:function(e){for(var t,n,r,i=S.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Re(this,e,!0)},remove:function(e){return Re(this,e)},text:function(e){return $(this,function(e){return void 0===e?S.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Pe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||qe(this,e).appendChild(e)})},prepend:function(){return Pe(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=qe(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return $(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ne.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return Pe(this,arguments,function(e){var t=this.parentNode;S.inArray(this,n)<0&&(S.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){S.fn[e]=function(e){for(var t,n=[],r=S(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),S(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Me=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Ie=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},We=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Fe=new RegExp(ne.join("|"),"i");function Be(e,t,n){var r,i,o,a,s=e.style;return(n=n||Ie(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||ie(e)||(a=S.style(e,t)),!y.pixelBoxStyles()&&Me.test(a)&&Fe.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function $e(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;
2left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",re.appendChild(u).appendChild(l);var e=C.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),re.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=E.createElement("div"),l=E.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===l.style.backgroundClip,S.extend(y,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=E.createElement("table"),t=E.createElement("tr"),n=E.createElement("div"),e.style.cssText="position:absolute;left:-11111px",t.style.height="1px",n.style.height="9px",re.appendChild(e).appendChild(t).appendChild(n),r=C.getComputedStyle(t),a=3<parseInt(r.height),re.removeChild(e)),a}}))}();var _e=["Webkit","Moz","ms"],ze=E.createElement("div").style,Ue={};function Xe(e){var t=S.cssProps[e]||Ue[e];return t||(e in ze?e:Ue[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=_e.length;while(n--)if((e=_e[n]+t)in ze)return e}(e)||e)}var Ve=/^(none|table(?!-c[ea]).+)/,Ge=/^--/,Ye={position:"absolute",visibility:"hidden",display:"block"},Qe={letterSpacing:"0",fontWeight:"400"};function Je(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ke(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=S.css(e,n+ne[a],!0,i)),r?("content"===n&&(u-=S.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(u-=S.css(e,"border"+ne[a]+"Width",!0,i))):(u+=S.css(e,"padding"+ne[a],!0,i),"padding"!==n?u+=S.css(e,"border"+ne[a]+"Width",!0,i):s+=S.css(e,"border"+ne[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function Ze(e,t,n){var r=Ie(e),i=(!y.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,r),o=i,a=Be(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Me.test(a)){if(!n)return a;a="auto"}return(!y.boxSizingReliable()&&i||!y.reliableTrDimensions()&&A(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===S.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===S.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Ke(e,t,n||(i?"border":"content"),o,r,a)+"px"}function et(e,t,n,r,i){return new et.prototype.init(e,t,n,r,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Be(e,"o
2pacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=Ge.test(t),l=e.style;if(u||(t=Xe(s)),a=S.cssHooks[t]||S.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=te.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(S.cssNumber[s]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=X(t);return Ge.test(t)||(t=Xe(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Be(e,t,r)),"normal"===i&&t in Qe&&(i=Qe[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each(["height","width"],function(e,u){S.cssHooks[u]={get:function(e,t,n){if(t)return!Ve.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Ze(e,u,n):We(e,Ye,function(){return Ze(e,u,n)})},set:function(e,t,n){var r,i=Ie(e),o=!y.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===S.css(e,"boxSizing",!1,i),s=n?Ke(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Ke(e,u,"border",!1,i)-.5)),s&&(r=te.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=S.css(e,u)),Je(0,t,s)}}}),S.cssHooks.marginLeft=$e(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Be(e,"marginLeft"))||e.getBoundingClientRect().left-We(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(i,o){S.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ne[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(S.cssHooks[i+o].set=Je)}),S.fn.extend({css:function(e,t){return $(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Ie(e),i=t.length;a<i;a++)o[t[a]]=S.css(e,t[a],!1,r);return o}return void 0!==n?S.style(e,t,n):S.css(e,t)},e,t,1<arguments.length)}}),((S.Tween=et).prototype={constructor:et,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(S.cssNumber[n]?"":"px")},cur:function(){var e=et.propHooks[this.prop];return e&&e.get?e.get(this):et.propHooks._default.get(this)},run:function(e){var t,n=et.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):et.propHooks._default.set(this),this}}).init.prototype=et.prototype,(et.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[Xe(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=et.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=et.prototype.init,S.fx.step={};var tt,nt,rt,it,ot=/^(?:toggle|show|hide)$/,at=/queueHooks$/;function st(){nt&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(st):C.setTimeout(st,S.fx.interval),S.fx.tick())}function ut(){return C.setTimeout(function(){tt=void 0}),tt=Date.now()}function lt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ct(e,t,n){for(var r,i=(ft.tweeners[t]||[]).concat(ft.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function ft(o,e,t){var n,a,r=0,i=ft.prefilters.length,s=S.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=tt||ut(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:S.extend({},e),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},t),originalProperties:e,originalOptions:t,startTime:tt||ut(),duration:t.duration,tweens:[],createTween:function(e,t){var n=S.Tween(o,l.o
vendor: 4,766 bytes, line 2
2pts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=S.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=ft.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(S._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return S.map(c,ct,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),S.fx.timer(S.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(ft,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],ft.tweeners[n]=ft.tweeners[n]||[],ft.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),v=Y.get(e,"fxshow");for(r in n.queue||(null==(a=S._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,S.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ot.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Y.get(e,"display")),"none"===(c=S.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=S.css(e,"display"),le([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===S.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Y.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)S.style(e,r,d[r])})),u=ct(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?ft.prefilters.unshift(e):ft.prefilters.push(e)}}),S.speed=function(e,t,n){var r=e&&"object"==typeof e?S.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return S.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&S.dequeue(this,r.queue)},r},S.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=S.isEmptyObject(t),o=S.speed(e,n,r),a=function(){var e=ft(this,S.extend({},t),o);(i||Y.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=S.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&at.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||S.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Y.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=S.timers,o=n?n.length:0;for(t.finish=!0,S.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),S.each(["toggle","show","hide"],function(e,r){var i=S.fn[r];S.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(lt(r,!0),e,t,n)}}),S.each({slideDown:lt("show"),slideUp:lt("hide"),slideToggle:lt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){S.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(tt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),tt=void 0}
vendor: 6,576 bytes, line 2
2,S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){nt||(nt=!0,st())},S.fx.stop=function(){nt=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(r,e){return r=S.fx&&S.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},rt=E.createElement("input"),it=E.createElement("select").appendChild(E.createElement("option")),rt.type="checkbox",y.checkOn=""!==rt.value,y.optSelected=it.selected,(rt=E.createElement("input")).value="t",rt.type="radio",y.radioValue="t"===rt.value;var pt,dt=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return $(this,S.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?pt:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),pt={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var a=dt[t]||S.find.attr;dt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=dt[o],dt[o]=r,r=null!=a(e,t,n)?o:null,dt[o]=i),r}});var ht=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;function vt(e){return(e.match(P)||[]).join(" ")}function yt(e){return e.getAttribute&&e.getAttribute("class")||""}function mt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}S.fn.extend({prop:function(e,t){return $(this,S.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):ht.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),y.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).addClass(t.call(this,e,yt(this)))});if((e=mt(t)).length)while(n=this[u++])if(i=yt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=e[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).removeClass(t.call(this,e,yt(this)))});if(!arguments.length)return this.attr("class","");if((e=mt(t)).length)while(n=this[u++])if(i=yt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=e[a++])while(-1<r.indexOf(" "+o+" "))r=r.replace(" "+o+" "," ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"===o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):m(i)?this.each(function(e){S(this).toggleClass(i.call(this,e,yt(this),t),t)}):this.each(function(){var e,t,n,r;if(a){t=0,n=S(this),r=mt(i);while(e=r[t++])n.hasClass(e)?n.removeClass(e):n.addClass(e)}else void 0!==i&&"boolean"!==o||((e=yt(this))&&Y.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":Y.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+vt(yt(n))+" ").indexOf(t))return!0;return!1}});var xt=/\r/g;S.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,S(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=S.map(t,function(e){return null==e?"":e+""})),(r=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=S.valHooks[t.type]||S.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(xt,""):null==e?"":e:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:vt(S.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(t=S(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=S.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<S.inArray(S.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<S.inArray(S(e).val(),t)}},y.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in C;var bt=/^(?:focusinfocus|focusoutblur)$/,wt=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=v.call(e,"type")?e.type:e,h=v.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!bt.test(d+S.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[S.expando]?e:new S.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:S.makeArray(t,[e]),c=S.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,bt.test(s+d)||
vendor: 14,195 bytes, line 2
2(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Y.get(o,"events")||Object.create(null))[e.type]&&Y.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&V(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!V(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),S.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,wt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,wt),S.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),y.focusin||S.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){S.event.simulate(r,e.target,S.event.fix(e))};S.event.special[r]={setup:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}});var Tt=C.location,Ct={guid:Date.now()},Et=/\?/;S.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||S.error("Invalid XML: "+e),t};var St=/\[\]$/,kt=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function Dt(n,e,r,i){var t;if(Array.isArray(e))S.each(e,function(e,t){r||St.test(n)?i(n,t):Dt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)Dt(n+"["+t+"]",e[t],r,i)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){i(this.name,this.value)});else for(n in e)Dt(n,e[n],t,i);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&Nt.test(this.nodeName)&&!At.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(kt,"\r\n")}}):{name:t.name,value:n.replace(kt,"\r\n")}}).get()}});var jt=/%20/g,qt=/#.*$/,Lt=/([?&])_=[^&]*/,Ht=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ot=/^(?:GET|HEAD)$/,Pt=/^\/\//,Rt={},Mt={},It="*/".concat("*"),Wt=E.createElement("a");function Ft(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(P)||[];if(m(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Bt(t,i,o,a){var s={},u=t===Mt;function l(e){var r;return s[e]=!0,S.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function $t(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&S.extend(!0,e,r),e}Wt.href=Tt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Tt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Tt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":It,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?$t($t(e,S.ajaxSettings),t):$t(S.ajaxSettings,e)},ajaxPrefilter:Ft(Rt),ajaxTransport:Ft(Mt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=S.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?S(y):S.event,x=S.Deferred(),b=S.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Ht.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||Tt.href)+"").replace(Pt,Tt.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(P)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Wt.protocol+"//"+Wt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=S.param(v.data,v.traditional)),Bt(Rt,v,t,T),h)return T;for(i in(g=S.event&&v.global)&&0==S.active++&&S.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Ot.test(v.type),f=v.url.replace(qt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(jt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(Et.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Lt,"$1"),o=(Et.test(f)?"&":"?")+"_="+Ct.guid+++o),v.url=f+o),v.ifModified&&(S.lastModified[f]&&T.setRequestHeader("If-Modified-Since",S.lastModified[f]),S.etag[f]&&T.setRequestHeader("If-None-Match",S.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+It+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Bt(Mt,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<S.inArray("script",v.dataTypes)&&(v.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(S.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(S.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--S.active||S.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return S.get(e,t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],function(e,i){S[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),S.ajax(S.extend({url:e,type:i,dataType:r,data:t,success:n},S.isPlainObject(e)&&e))}}),S.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){S(this).wrapInner(n.call(this,e))}):this.each(function(){var e=S(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){S(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var _t={0:200,1223:204},zt=S.ajaxSettings.xhr();y.cors=!!zt&&"withCredentials"in zt,y.ajax=zt=!!zt,S.ajaxTransport(function(i){var o,a;if(y.cors||zt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(_t[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),S.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=S("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=vt(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&S.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?S("<div>").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"to
vendor: 8,710 bytes, lines 2-146
2p"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var Gt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||S.guid++,i},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=A,S.isFunction=m,S.isWindow=x,S.camelCase=X,S.type=w,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?"":(e+"").replace(Gt,"")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return S});var Yt=C.jQuery,Qt=C.$;return S.noConflict=function(e){return C.$===S&&(C.$=Qt),e&&C.jQuery===S&&(C.jQuery=Yt),S},"undefined"==typeof e&&(C.jQuery=C.$=S),S}); 3 4/*! jQuery UI - v1.12.1 - 2016-09-14 5* http://jqueryui.com 6* 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-1-7.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 7* Copyright jQuery Foundation and other contributors; Licensed MIT */ 8 9(function( factory ) { 10 if ( typeof define === "function" && define.amd ) { 11 12 // AMD. Register as an anonymous module. 13 define([ "jquery" ], factory ); 14 } else { 15 16 // Browser globals 17 factory( jQuery ); 18 } 19}(function( $ ) { 20 21$.ui = $.ui || {}; 22 23var version = $.ui.version = "1.12.1"; 24 25 26/*! 27 * jQuery UI Widget 1.12.1 28 * http://jqueryui.com 29 * 30 * Copyright jQuery Foundation and other contributors 31 * Released under the MIT license. 32 * http://jquery.org/license 33 */ 34 35//>>label: Widget 36//>>group: Core 37//>>description: Provides a factory for creating stateful widgets with a common API. 38//>>docs: http://api.jqueryui.com/jQuery.widget/ 39//>>demos: http://jqueryui.com/widget/ 40 41 42 43var widgetUuid = 0; 44var widgetSlice = Array.prototype.slice; 45 46$.cleanData = ( function( orig ) { 47 return function( elems ) { 48 var events, elem, i; 49 for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) { 50 try { 51 52 // Only trigger remove when necessary to save time 53 events = $._data( elem, "events" ); 54 if ( events && events.remove ) { 55 $( elem ).triggerHandler( "remove" ); 56 } 57 58 // Http://bugs.jquery.com/ticket/8235 59 } catch ( e ) {} 60 } 61 orig( elems ); 62 }; 63} )( $.cleanData ); 64 65$.widget = function( name, base, prototype ) { 66 var existingConstructor, constructor, basePrototype; 67 68 // ProxiedPrototype allows the provided prototype to remain unmodified 69 // so that it can be used as a mixin for multiple widgets (#8876) 70 var proxiedPrototype = {}; 71 72 var namespace = name.split( "." )[ 0 ]; 73 name = name.split( "." )[ 1 ]; 74 var fullName = namespace + "-" + name; 75 76 if ( !prototype ) { 77 prototype = base; 78 base = $.Widget; 79 } 80 81 if ( $.isArray( prototype ) ) { 82 prototype = $.extend.apply( null, [ {} ].concat( prototype ) ); 83 } 84 85 // Create selector for plugin 86 $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { 87 return !!$.data( elem, fullName ); 88 }; 89 90 $[ namespace ] = $[ namespace ] || {}; 91 existingConstructor = $[ namespace ][ name ]; 92 constructor = $[ namespace ][ name ] = function( options, element ) { 93 94 // Allow instantiation without "new" keyword 95 if ( !this._createWidget ) { 96 return new constructor( options, element ); 97 } 98 99 // Allow instantiation without initializing for simple inheritance 100 // must use "new" keyword (the code above always passes args) 101 if ( arguments.length ) { 102 this._createWidget( options, element ); 103 } 104 }; 105 106 // Extend with the existing constructor to carry over any static properties 107 $.extend( constructor, existingConstructor, { 108 version: prototype.version, 109 110 // Copy the object used to create the prototype in case we need to 111 // redefine the widget later 112 _proto: $.extend( {}, prototype ), 113 114 // Track widgets that inherit from this widget in case this widget is 115 // redefined after a widget inherits from it 116 _childConstructors: [] 117 } ); 118 119 basePrototype = new base(); 120 121 // We need to make the options hash a property directly on the new instance 122 // otherwise we'll modify the options hash on the prototype that we're 123 // inheriting from 124 basePrototype.options = $.widget.extend( {}, basePrototype.options ); 125 $.each( prototype, function( prop, value ) { 126 if ( !$.isFunction( value ) ) { 127 proxiedPrototype[ prop ] = value; 128 return; 129 } 130 proxiedPrototype[ prop ] = ( function() { 131 function _super() { 132 return base.prototype[ prop ].apply( this, arguments ); 133 } 134 135 function _superApply( args ) { 136 return base.prototype[ prop ].apply( this, args ); 137 } 138 139 return function() { 140 var __super = this._super; 141 var __superApply = this._superApply; 142 var returnValue; 143 144 this._super = _super; 145 this._superApply = _superApply; 146
vendor: 19,841 bytes, lines 147-885
147 returnValue = value.apply( this, arguments ); 148 149 this._super = __super; 150 this._superApply = __superApply; 151 152 return returnValue; 153 }; 154 } )(); 155 } ); 156 constructor.prototype = $.widget.extend( basePrototype, { 157 158 // TODO: remove support for widgetEventPrefix 159 // always use the name + a colon as the prefix, e.g., draggable:start 160 // don't prefix for widgets that aren't DOM-based 161 widgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name 162 }, proxiedPrototype, { 163 constructor: constructor, 164 namespace: namespace, 165 widgetName: name, 166 widgetFullName: fullName 167 } ); 168 169 // If this widget is being redefined then we need to find all widgets that 170 // are inheriting from it and redefine all of them so that they inherit from 171 // the new version of this widget. We're essentially trying to replace one 172 // level in the prototype chain. 173 if ( existingConstructor ) { 174 $.each( existingConstructor._childConstructors, function( i, child ) { 175 var childPrototype = child.prototype; 176 177 // Redefine the child widget using the same prototype that was 178 // originally used, but inherit from the new version of the base 179 $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, 180 child._proto ); 181 } ); 182 183 // Remove the list of existing child constructors from the old constructor 184 // so the old child constructors can be garbage collected 185 delete existingConstructor._childConstructors; 186 } else { 187 base._childConstructors.push( constructor ); 188 } 189 190 $.widget.bridge( name, constructor ); 191 192 return constructor; 193}; 194 195$.widget.extend = function( target ) { 196 var input = widgetSlice.call( arguments, 1 ); 197 var inputIndex = 0; 198 var inputLength = input.length; 199 var key; 200 var value; 201 202 for ( ; inputIndex < inputLength; inputIndex++ ) { 203 for ( key in input[ inputIndex ] ) { 204 value = input[ inputIndex ][ key ]; 205 if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { 206 207 // Clone objects 208 if ( $.isPlainObject( value ) ) { 209 target[ key ] = $.isPlainObject( target[ key ] ) ? 210 $.widget.extend( {}, target[ key ], value ) : 211 212 // Don't extend strings, arrays, etc. with objects 213 $.widget.extend( {}, value ); 214 215 // Copy everything else by reference 216 } else { 217 target[ key ] = value; 218 } 219 } 220 } 221 } 222 return target; 223}; 224 225$.widget.bridge = function( name, object ) { 226 var fullName = object.prototype.widgetFullName || name; 227 $.fn[ name ] = function( options ) { 228 var isMethodCall = typeof options === "string"; 229 var args = widgetSlice.call( arguments, 1 ); 230 var returnValue = this; 231 232 if ( isMethodCall ) { 233 234 // If this is an empty collection, we need to have the instance method 235 // return undefined instead of the jQuery instance 236 if ( !this.length && options === "instance" ) { 237 returnValue = undefined; 238 } else { 239 this.each( function() { 240 var methodValue; 241 var instance = $.data( this, fullName ); 242 243 if ( options === "instance" ) { 244 returnValue = instance; 245 return false; 246 } 247 248 if ( !instance ) { 249 return $.error( "cannot call methods on " + name + 250 " prior to initialization; " + 251 "attempted to call method '" + options + "'" ); 252 } 253 254 if ( !$.isFunction( instance[ options ] ) || options.charAt( 0 ) === "_" ) { 255 return $.error( "no such method '" + options + "' for " + name + 256 " widget instance" ); 257 } 258 259 methodValue = instance[ options ].apply( instance, args ); 260 261 if ( methodValue !== instance && methodValue !== undefined ) { 262 returnValue = methodValue && methodValue.jquery ? 263 returnValue.pushStack( methodValue.get() ) : 264 methodValue; 265 return false; 266 } 267 } ); 268 } 269 } else { 270 271 // Allow multiple hashes to be passed on init 272 if ( args.length ) { 273 options = $.widget.extend.apply( null, [ options ].concat( args ) ); 274 } 275 276 this.each( function() { 277 var instance = $.data( this, fullName ); 278 if ( instance ) { 279 instance.option( options || {} ); 280 if ( instance._init ) { 281 instance._init(); 282 } 283 } else { 284 $.data( this, fullName, new object( options, this ) ); 285 } 286 } ); 287 } 288 289 return returnValue; 290 }; 291}; 292 293$.Widget = function( /* options, element */ ) {}; 294$.Widget._childConstructors = []; 295 296$.Widget.prototype = { 297 widgetName: "widget", 298 widgetEventPrefix: "", 299 defaultElement: "<div>", 300 301 options: { 302 classes: {}, 303 disabled: false, 304 305 // Callbacks 306 create: null 307 }, 308 309 _createWidget: function( options, element ) { 310 element = $( element || this.defaultElement || this )[ 0 ]; 311 this.element = $( element ); 312 this.uuid = widgetUuid++; 313 this.eventNamespace = "." + this.widgetName + this.uuid; 314 315 this.bindings = $(); 316 this.hoverable = $(); 317 this.focusable = $(); 318 this.classesElementLookup = {}; 319 320 if ( element !== this ) { 321 $.data( element, this.widgetFullName, this ); 322 this._on( true, this.element, { 323 remove: function( event ) { 324 if ( event.target === element ) { 325 this.destroy(); 326 } 327 } 328 } ); 329 this.document = $( element.style ? 330 331 // Element within the document 332 element.ownerDocument : 333 334 // Element is window or document 335 element.document || element ); 336 this.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow ); 337 } 338 339 this.options = $.widget.extend( {}, 340 this.options, 341 this._getCreateOptions(), 342 options ); 343 344 this._create(); 345 346 if ( this.options.disabled ) { 347 this._setOptionDisabled( this.options.disabled ); 348 } 349 350 this._trigger( "create", null, this._getCreateEventData() ); 351 this._init(); 352 }, 353 354 _getCreateOptions: function() { 355 return {}; 356 }, 357 358 _getCreateEventData: $.noop, 359 360 _create: $.noop, 361 362 _init: $.noop, 363 364 destroy: function() { 365 var that = this; 366 367 this._destroy(); 368 $.each( this.classesElementLookup, function( key, value ) { 369 that._removeClass( value, key ); 370 } ); 371 372 // We can probably remove the unbind calls in 2.0 373 // all event bindings should go through this._on() 374 this.element 375 .off( this.eventNamespace ) 376 .removeData( this.widgetFullName ); 377 this.widget() 378 .off( this.eventNamespace ) 379 .removeAttr( "aria-disabled" ); 380 381 // Clean up events and states 382 this.bindings.off( this.eventNamespace ); 383 }, 384 385 _destroy: $.noop, 386 387 widget: function() { 388 return this.element; 389 }, 390 391 option: function( key, value ) { 392 var options = key; 393 var parts; 394 var curOption; 395 var i; 396 397 if ( arguments.length === 0 ) { 398 399 // Don't return a reference to the internal hash 400 return $.widget.extend( {}, this.options ); 401 } 402 403 if ( typeof key === "string" ) { 404 405 // Handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } 406 options = {}; 407 parts = key.split( "." ); 408 key = parts.shift(); 409 if ( parts.length ) { 410 curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); 411 for ( i = 0; i < parts.length - 1; i++ ) { 412 curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; 413 curOption = curOption[ parts[ i ] ]; 414 } 415 key = parts.pop(); 416 if ( arguments.length === 1 ) { 417 return curOption[ key ] === undefined ? null : curOption[ key ]; 418 } 419 curOption[ key ] = value; 420 } else { 421 if ( arguments.length === 1 ) { 422 return this.options[ key ] === undefined ? null : this.options[ key ]; 423 } 424 options[ key ] = value; 425 } 426 } 427 428 this._setOptions( options ); 429 430 return this; 431 }, 432 433 _setOptions: function( options ) { 434 var key; 435 436 for ( key in options ) { 437 this._setOption( key, options[ key ] ); 438 } 439 440 return this; 441 }, 442 443 _setOption: function( key, value ) { 444 if ( key === "classes" ) { 445 this._setOptionClasses( value ); 446 } 447 448 this.options[ key ] = value; 449 450 if ( key === "disabled" ) { 451 this._setOptionDisabled( value ); 452 } 453 454 return this; 455 }, 456 457 _setOptionClasses: function( value ) { 458 var classKey, elements, currentElements; 459 460 for ( classKey in value ) { 461 currentElements = this.classesElementLookup[ classKey ]; 462 if ( value[ classKey ] === this.options.classes[ classKey ] || 463 !currentElements || 464 !currentElements.length ) { 465 continue; 466 } 467 468 // We are doing this to create a new jQuery object because the _removeClass() call 469 // on the next line is going to destroy the reference to the current elements being 470 // tracked. We need to save a copy of this collection so that we can add the new classes 471 // below. 472 elements = $( currentElements.get() ); 473 this._removeClass( currentElements, classKey ); 474 475 // We don't use _addClass() here, because that uses this.options.classes 476 // for generating the string of classes. We want to use the value passed in from 477 // _setOption(), this is the new value of the classes option which was passed to 478 // _setOption(). We pass this value directly to _classes(). 479 elements.addClass( this._classes( { 480 element: elements, 481 keys: classKey, 482 classes: value, 483 add: true 484 } ) ); 485 } 486 }, 487 488 _setOptionDisabled: function( value ) { 489 this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null, !!value ); 490 491 // If the widget is becoming disabled, then nothing is interactive 492 if ( value ) { 493 this._removeClass( this.hoverable, null, "ui-state-hover" ); 494 this._removeClass( this.focusable, null, "ui-state-focus" ); 495 } 496 }, 497 498 enable: function() { 499 return this._setOptions( { disabled: false } ); 500 }, 501 502 disable: function() { 503 return this._setOptions( { disabled: true } ); 504 }, 505 506 _classes: function( options ) { 507 var full = []; 508 var that = this; 509 510 options = $.extend( { 511 element: this.element, 512 classes: this.options.classes || {} 513 }, options ); 514 515 function processClassString( classes, checkOption ) { 516 var current, i; 517 for ( i = 0; i < classes.length; i++ ) { 518 current = that.classesElementLookup[ classes[ i ] ] || $(); 519 if ( options.add ) { 520 current = $( $.unique( current.get().concat( options.element.get() ) ) ); 521 } else { 522 current = $( current.not( options.element ).get() ); 523 } 524 that.classesElementLookup[ classes[ i ] ] = current; 525 full.push( classes[ i ] ); 526 if ( checkOption && options.classes[ classes[ i ] ] ) { 527 full.push( options.classes[ classes[ i ] ] ); 528 } 529 } 530 } 531 532 this._on( options.element, { 533 "remove": "_untrackClassesElement" 534 } ); 535 536 if ( options.keys ) { 537 processClassString( options.keys.match( /\S+/g ) || [], true ); 538 } 539 if ( options.extra ) { 540 processClassString( options.extra.match( /\S+/g ) || [] ); 541 } 542 543 return full.join( " " ); 544 }, 545 546 _untrackClassesElement: function( event ) { 547 var that = this; 548 $.each( that.classesElementLookup, function( key, value ) { 549 if ( $.inArray( event.target, value ) !== -1 ) { 550 that.classesElementLookup[ key ] = $( value.not( event.target ).get() ); 551 } 552 } ); 553 }, 554 555 _removeClass: function( element, keys, extra ) { 556 return this._toggleClass( element, keys, extra, false ); 557 }, 558 559 _addClass: function( element, keys, extra ) { 560 return this._toggleClass( element, keys, extra, true ); 561 }, 562 563 _toggleClass: function( element, keys, extra, add ) { 564 add = ( typeof add === "boolean" ) ? add : extra; 565 var shift = ( typeof element === "string" || element === null ), 566 options = { 567 extra: shift ? keys : extra, 568 keys: shift ? element : keys, 569 element: shift ? this.element : element, 570 add: add 571 }; 572 options.element.toggleClass( this._classes( options ), add ); 573 return this; 574 }, 575 576 _on: function( suppressDisabledCheck, element, handlers ) { 577 var delegateElement; 578 var instance = this; 579 580 // No suppressDisabledCheck flag, shuffle arguments 581 if ( typeof suppressDisabledCheck !== "boolean" ) { 582 handlers = element; 583 element = suppressDisabledCheck; 584 suppressDisabledCheck = false; 585 } 586 587 // No element argument, shuffle and use this.element 588 if ( !handlers ) { 589 handlers = element; 590 element = this.element; 591 delegateElement = this.widget(); 592 } else { 593 element = delegateElement = $( element ); 594 this.bindings = this.bindings.add( element ); 595 } 596 597 $.each( handlers, function( event, handler ) { 598 function handlerProxy() { 599 600 // Allow widgets to customize the disabled handling 601 // - disabled as an array instead of boolean 602 // - disabled class as method for disabling individual parts 603 if ( !suppressDisabledCheck && 604 ( instance.options.disabled === true || 605 $( this ).hasClass( "ui-state-disabled" ) ) ) { 606 return; 607 } 608 return ( typeof handler === "string" ? instance[ handler ] : handler ) 609 .apply( instance, arguments ); 610 } 611 612 // Copy the guid so direct unbinding works 613 if ( typeof handler !== "string" ) { 614 handlerProxy.guid = handler.guid = 615 handler.guid || handlerProxy.guid || $.guid++; 616 } 617 618 var match = event.match( /^([\w:-]*)\s*(.*)$/ ); 619 var eventName = match[ 1 ] + instance.eventNamespace; 620 var selector = match[ 2 ]; 621 622 if ( selector ) { 623 delegateElement.on( eventName, selector, handlerProxy ); 624 } else { 625 element.on( eventName, handlerProxy ); 626 } 627 } ); 628 }, 629 630 _off: function( element, eventName ) { 631 eventName = ( eventName || "" ).split( " " ).join( this.eventNamespace + " " ) + 632 this.eventNamespace; 633 element.off( eventName ).off( eventName ); 634 635 // Clear the stack to avoid memory leaks (#10056) 636 this.bindings = $( this.bindings.not( element ).get() ); 637 this.focusable = $( this.focusable.not( element ).get() ); 638 this.hoverable = $( this.hoverable.not( element ).get() ); 639 }, 640 641 _delay: function( handler, delay ) { 642 function handlerProxy() { 643 return ( typeof handler === "string" ? instance[ handler ] : handler ) 644 .apply( instance, arguments ); 645 } 646 var instance = this; 647 return setTimeout( handlerProxy, delay || 0 ); 648 }, 649 650 _hoverable: function( element ) { 651 this.hoverable = this.hoverable.add( element ); 652 this._on( element, { 653 mouseenter: function( event ) { 654 this._addClass( $( event.currentTarget ), null, "ui-state-hover" ); 655 }, 656 mouseleave: function( event ) { 657 this._removeClass( $( event.currentTarget ), null, "ui-state-hover" ); 658 } 659 } ); 660 }, 661 662 _focusable: function( element ) { 663 this.focusable = this.focusable.add( element ); 664 this._on( element, { 665 focusin: function( event ) { 666 this._addClass( $( event.currentTarget ), null, "ui-state-focus" ); 667 }, 668 focusout: function( event ) { 669 this._removeClass( $( event.currentTarget ), null, "ui-state-focus" ); 670 } 671 } ); 672 }, 673 674 _trigger: function( type, event, data ) { 675 var prop, orig; 676 var callback = this.options[ type ]; 677 678 data = data || {}; 679 event = $.Event( event ); 680 event.type = ( type === this.widgetEventPrefix ? 681 type : 682 this.widgetEventPrefix + type ).toLowerCase(); 683 684 // The original event may come from any element 685 // so we need to reset the target on the new event 686 event.target = this.element[ 0 ]; 687 688 // Copy original event properties over to the new event 689 orig = event.originalEvent; 690 if ( orig ) { 691 for ( prop in orig ) { 692 if ( !( prop in event ) ) { 693 event[ prop ] = orig[ prop ]; 694 } 695 } 696 } 697 698 this.element.trigger( event, data ); 699 return !( $.isFunction( callback ) && 700 callback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false || 701 event.isDefaultPrevented() ); 702 } 703}; 704 705$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { 706 $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { 707 if ( typeof options === "string" ) { 708 options = { effect: options }; 709 } 710 711 var hasOptions; 712 var effectName = !options ? 713 method : 714 options === true || typeof options === "number" ? 715 defaultEffect : 716 options.effect || defaultEffect; 717 718 options = options || {}; 719 if ( typeof options === "number" ) { 720 options = { duration: options }; 721 } 722 723 hasOptions = !$.isEmptyObject( options ); 724 options.complete = callback; 725 726 if ( options.delay ) { 727 element.delay( options.delay ); 728 } 729 730 if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { 731 element[ method ]( options ); 732 } else if ( effectName !== method && element[ effectName ] ) { 733 element[ effectName ]( options.duration, options.easing, callback ); 734 } else { 735 element.queue( function( next ) { 736 $( this )[ method ](); 737 if ( callback ) { 738 callback.call( element[ 0 ] ); 739 } 740 next(); 741 } ); 742 } 743 }; 744} ); 745 746var widget = $.widget; 747 748 749/*! 750 * jQuery UI Position 1.12.1 751 * http://jqueryui.com 752 * 753 * Copyright jQuery Foundation and other contributors 754 * Released under the MIT license. 755 * http://jquery.org/license 756 * 757 * http://api.jqueryui.com/position/ 758 */ 759 760//>>label: Position 761//>>group: Core 762//>>description: Positions elements relative to other elements. 763//>>docs: http://api.jqueryui.com/position/ 764//>>demos: http://jqueryui.com/position/ 765 766 767( function() { 768var cachedScrollbarWidth, 769 max = Math.max, 770 abs = Math.abs, 771 rhorizontal = /left|center|right/, 772 rvertical = /top|center|bottom/, 773 roffset = /[\+\-]\d+(\.[\d]+)?%?/, 774 rposition = /^\w+/, 775 rpercent = /%$/, 776 _position = $.fn.position; 777 778function getOffsets( offsets, width, height ) { 779 return [ 780 parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ), 781 parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 ) 782 ]; 783} 784 785function parseCss( element, property ) { 786 return parseInt( $.css( element, property ), 10 ) || 0; 787} 788 789function getDimensions( elem ) { 790 var raw = elem[ 0 ]; 791 if ( raw.nodeType === 9 ) { 792 return { 793 width: elem.width(), 794 height: elem.height(), 795 offset: { top: 0, left: 0 } 796 }; 797 } 798 if ( $.isWindow( raw ) ) { 799 return { 800 width: elem.width(), 801 height: elem.height(), 802 offset: { top: elem.scrollTop(), left: elem.scrollLeft() } 803 }; 804 } 805 if ( raw.preventDefault ) { 806 return { 807 width: 0, 808 height: 0, 809 offset: { top: raw.pageY, left: raw.pageX } 810 }; 811 } 812 return { 813 width: elem.outerWidth(), 814 height: elem.outerHeight(), 815 offset: elem.offset() 816 }; 817} 818 819$.position = { 820 scrollbarWidth: function() { 821 if ( cachedScrollbarWidth !== undefined ) { 822 return cachedScrollbarWidth; 823 } 824 var w1, w2, 825 div = $( "<div " + 826 "style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'>" + 827 "<div style='height:100px;width:auto;'></div></div>" ), 828 innerDiv = div.children()[ 0 ]; 829 830 $( "body" ).append( div ); 831 w1 = innerDiv.offsetWidth; 832 div.css( "overflow", "scroll" ); 833 834 w2 = innerDiv.offsetWidth; 835 836 if ( w1 === w2 ) { 837 w2 = div[ 0 ].clientWidth; 838 } 839 840 div.remove(); 841 842 return ( cachedScrollbarWidth = w1 - w2 ); 843 }, 844 getScrollInfo: function( within ) { 845 var overflowX = within.isWindow || within.isDocument ? "" : 846 within.element.css( "overflow-x" ), 847 overflowY = within.isWindow || within.isDocument ? "" : 848 within.element.css( "overflow-y" ), 849 hasOverflowX = overflowX === "scroll" || 850 ( overflowX === "auto" && within.width < within.element[ 0 ].scrollWidth ), 851 hasOverflowY = overflowY === "scroll" || 852 ( overflowY === "auto" && within.height < within.element[ 0 ].scrollHeight ); 853 return { 854 width: hasOverflowY ? $.position.scrollbarWidth() : 0, 855 height: hasOverflowX ? $.position.scrollbarWidth() : 0 856 }; 857 }, 858 getWithinInfo: function( element ) { 859 var withinElement = $( element || window ), 860 isWindow = $.isWindow( withinElement[ 0 ] ), 861 isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9, 862 hasOffset = !isWindow && !isDocument; 863 return { 864 element: withinElement, 865 isWindow: isWindow, 866 isDocument: isDocument, 867 offset: hasOffset ? $( element ).offset() : { left: 0, top: 0 }, 868 scrollLeft: withinElement.scrollLeft(), 869 scrollTop: withinElement.scrollTop(), 870 width: withinElement.outerWidth(), 871 height: withinElement.outerHeight() 872 }; 873 } 874}; 875 876$.fn.position = function( options ) { 877 if ( !options || !options.of ) { 878 return _position.apply( this, arguments ); 879 } 880 881 // Make a copy, we don't want to modify arguments 882 options = $.extend( {}, options ); 883 884 var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions, 885 target = $( options.of ),
vendor: 10,992 bytes, lines 885-1238
885 886 within = $.position.getWithinInfo( options.within ), 887 scrollInfo = $.position.getScrollInfo( within ), 888 collision = ( options.collision || "flip" ).split( " " ), 889 offsets = {}; 890 891 dimensions = getDimensions( target ); 892 if ( target[ 0 ].preventDefault ) { 893 894 // Force left top to allow flipping 895 options.at = "left top"; 896 } 897 targetWidth = dimensions.width; 898 targetHeight = dimensions.height; 899 targetOffset = dimensions.offset; 900 901 // Clone to reuse original targetOffset later 902 basePosition = $.extend( {}, targetOffset ); 903 904 // Force my and at to have valid horizontal and vertical positions 905 // if a value is missing or invalid, it will be converted to center 906 $.each( [ "my", "at" ], function() { 907 var pos = ( options[ this ] || "" ).split( " " ), 908 horizontalOffset, 909 verticalOffset; 910 911 if ( pos.length === 1 ) { 912 pos = rhorizontal.test( pos[ 0 ] ) ? 913 pos.concat( [ "center" ] ) : 914 rvertical.test( pos[ 0 ] ) ? 915 [ "center" ].concat( pos ) : 916 [ "center", "center" ]; 917 } 918 pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center"; 919 pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center"; 920 921 // Calculate offsets 922 horizontalOffset = roffset.exec( pos[ 0 ] ); 923 verticalOffset = roffset.exec( pos[ 1 ] ); 924 offsets[ this ] = [ 925 horizontalOffset ? horizontalOffset[ 0 ] : 0, 926 verticalOffset ? verticalOffset[ 0 ] : 0 927 ]; 928 929 // Reduce to just the positions without the offsets 930 options[ this ] = [ 931 rposition.exec( pos[ 0 ] )[ 0 ], 932 rposition.exec( pos[ 1 ] )[ 0 ] 933 ]; 934 } ); 935 936 // Normalize collision option 937 if ( collision.length === 1 ) { 938 collision[ 1 ] = collision[ 0 ]; 939 } 940 941 if ( options.at[ 0 ] === "right" ) { 942 basePosition.left += targetWidth; 943 } else if ( options.at[ 0 ] === "center" ) { 944 basePosition.left += targetWidth / 2; 945 } 946 947 if ( options.at[ 1 ] === "bottom" ) { 948 basePosition.top += targetHeight; 949 } else if ( options.at[ 1 ] === "center" ) { 950 basePosition.top += targetHeight / 2; 951 } 952 953 atOffset = getOffsets( offsets.at, targetWidth, targetHeight ); 954 basePosition.left += atOffset[ 0 ]; 955 basePosition.top += atOffset[ 1 ]; 956 957 return this.each( function() { 958 var collisionPosition, using, 959 elem = $( this ), 960 elemWidth = elem.outerWidth(), 961 elemHeight = elem.outerHeight(), 962 marginLeft = parseCss( this, "marginLeft" ), 963 marginTop = parseCss( this, "marginTop" ), 964 collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + 965 scrollInfo.width, 966 collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + 967 scrollInfo.height, 968 position = $.extend( {}, basePosition ), 969 myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() ); 970 971 if ( options.my[ 0 ] === "right" ) { 972 position.left -= elemWidth; 973 } else if ( options.my[ 0 ] === "center" ) { 974 position.left -= elemWidth / 2; 975 } 976 977 if ( options.my[ 1 ] === "bottom" ) { 978 position.top -= elemHeight; 979 } else if ( options.my[ 1 ] === "center" ) { 980 position.top -= elemHeight / 2; 981 } 982 983 position.left += myOffset[ 0 ]; 984 position.top += myOffset[ 1 ]; 985 986 collisionPosition = { 987 marginLeft: marginLeft, 988 marginTop: marginTop 989 }; 990 991 $.each( [ "left", "top" ], function( i, dir ) { 992 if ( $.ui.position[ collision[ i ] ] ) { 993 $.ui.position[ collision[ i ] ][ dir ]( position, { 994 targetWidth: targetWidth, 995 targetHeight: targetHeight, 996 elemWidth: elemWidth, 997 elemHeight: elemHeight, 998 collisionPosition: collisionPosition, 999 collisionWidth: collisionWidth, 1000 collisionHeight: collisionHeight, 1001 offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ], 1002 my: options.my, 1003 at: options.at, 1004 within: within, 1005 elem: elem 1006 } ); 1007 } 1008 } ); 1009 1010 if ( options.using ) { 1011 1012 // Adds feedback as second argument to using callback, if present 1013 using = function( props ) { 1014 var left = targetOffset.left - position.left, 1015 right = left + targetWidth - elemWidth, 1016 top = targetOffset.top - position.top, 1017 bottom = top + targetHeight - elemHeight, 1018 feedback = { 1019 target: { 1020 element: target, 1021 left: targetOffset.left, 1022 top: targetOffset.top, 1023 width: targetWidth, 1024 height: targetHeight 1025 }, 1026 element: { 1027 element: elem, 1028 left: position.left, 1029 top: position.top, 1030 width: elemWidth, 1031 height: elemHeight 1032 }, 1033 horizontal: right < 0 ? "left" : left > 0 ? "right" : "center", 1034 vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle" 1035 }; 1036 if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) { 1037 feedback.horizontal = "center"; 1038 } 1039 if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) { 1040 feedback.vertical = "middle"; 1041 } 1042 if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) { 1043 feedback.important = "horizontal"; 1044 } else { 1045 feedback.important = "vertical"; 1046 } 1047 options.using.call( this, props, feedback ); 1048 }; 1049 } 1050 1051 elem.offset( $.extend( position, { using: using } ) ); 1052 } ); 1053}; 1054 1055$.ui.position = { 1056 fit: { 1057 left: function( position, data ) { 1058 var within = data.within, 1059 withinOffset = within.isWindow ? within.scrollLeft : within.offset.left, 1060 outerWidth = within.width, 1061 collisionPosLeft = position.left - data.collisionPosition.marginLeft, 1062 overLeft = withinOffset - collisionPosLeft, 1063 overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset, 1064 newOverRight; 1065 1066 // Element is wider than within 1067 if ( data.collisionWidth > outerWidth ) { 1068 1069 // Element is initially over the left side of within 1070 if ( overLeft > 0 && overRight <= 0 ) { 1071 newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - 1072 withinOffset; 1073 position.left += overLeft - newOverRight; 1074 1075 // Element is initially over right side of within 1076 } else if ( overRight > 0 && overLeft <= 0 ) { 1077 position.left = withinOffset; 1078 1079 // Element is initially over both left and right sides of within 1080 } else { 1081 if ( overLeft > overRight ) { 1082 position.left = withinOffset + outerWidth - data.collisionWidth; 1083 } else { 1084 position.left = withinOffset; 1085 } 1086 } 1087 1088 // Too far left -> align with left edge 1089 } else if ( overLeft > 0 ) { 1090 position.left += overLeft; 1091 1092 // Too far right -> align with right edge 1093 } else if ( overRight > 0 ) { 1094 position.left -= overRight; 1095 1096 // Adjust based on position and margin 1097 } else { 1098 position.left = max( position.left - collisionPosLeft, position.left ); 1099 } 1100 }, 1101 top: function( position, data ) { 1102 var within = data.within, 1103 withinOffset = within.isWindow ? within.scrollTop : within.offset.top, 1104 outerHeight = data.within.height, 1105 collisionPosTop = position.top - data.collisionPosition.marginTop, 1106 overTop = withinOffset - collisionPosTop, 1107 overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset, 1108 newOverBottom; 1109 1110 // Element is taller than within 1111 if ( data.collisionHeight > outerHeight ) { 1112 1113 // Element is initially over the top of within 1114 if ( overTop > 0 && overBottom <= 0 ) { 1115 newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - 1116 withinOffset; 1117 position.top += overTop - newOverBottom; 1118 1119 // Element is initially over bottom of within 1120 } else if ( overBottom > 0 && overTop <= 0 ) { 1121 position.top = withinOffset; 1122 1123 // Element is initially over both top and bottom of within 1124 } else { 1125 if ( overTop > overBottom ) { 1126 position.top = withinOffset + outerHeight - data.collisionHeight; 1127 } else { 1128 position.top = withinOffset; 1129 } 1130 } 1131 1132 // Too far up -> align with top 1133 } else if ( overTop > 0 ) { 1134 position.top += overTop; 1135 1136 // Too far down -> align with bottom edge 1137 } else if ( overBottom > 0 ) { 1138 position.top -= overBottom; 1139 1140 // Adjust based on position and margin 1141 } else { 1142 position.top = max( position.top - collisionPosTop, position.top ); 1143 } 1144 } 1145 }, 1146 flip: { 1147 left: function( position, data ) { 1148 var within = data.within, 1149 withinOffset = within.offset.left + within.scrollLeft, 1150 outerWidth = within.width, 1151 offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left, 1152 collisionPosLeft = position.left - data.collisionPosition.marginLeft, 1153 overLeft = collisionPosLeft - offsetLeft, 1154 overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft, 1155 myOffset = data.my[ 0 ] === "left" ? 1156 -data.elemWidth : 1157 data.my[ 0 ] === "right" ? 1158 data.elemWidth : 1159 0, 1160 atOffset = data.at[ 0 ] === "left" ? 1161 data.targetWidth : 1162 data.at[ 0 ] === "right" ? 1163 -data.targetWidth : 1164 0, 1165 offset = -2 * data.offset[ 0 ], 1166 newOverRight, 1167 newOverLeft; 1168 1169 if ( overLeft < 0 ) { 1170 newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - 1171 outerWidth - withinOffset; 1172 if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) { 1173 position.left += myOffset + atOffset + offset; 1174 } 1175 } else if ( overRight > 0 ) { 1176 newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + 1177 atOffset + offset - offsetLeft; 1178 if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) { 1179 position.left += myOffset + atOffset + offset; 1180 } 1181 } 1182 }, 1183 top: function( position, data ) { 1184 var within = data.within, 1185 withinOffset = within.offset.top + within.scrollTop, 1186 outerHeight = within.height, 1187 offsetTop = within.isWindow ? within.scrollTop : within.offset.top, 1188 collisionPosTop = position.top - data.collisionPosition.marginTop, 1189 overTop = collisionPosTop - offsetTop, 1190 overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop, 1191 top = data.my[ 1 ] === "top", 1192 myOffset = top ? 1193 -data.elemHeight : 1194 data.my[ 1 ] === "bottom" ? 1195 data.elemHeight : 1196 0, 1197 atOffset = data.at[ 1 ] === "top" ? 1198 data.targetHeight : 1199 data.at[ 1 ] === "bottom" ? 1200 -data.targetHeight : 1201 0, 1202 offset = -2 * data.offset[ 1 ], 1203 newOverTop, 1204 newOverBottom; 1205 if ( overTop < 0 ) { 1206 newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - 1207 outerHeight - withinOffset; 1208 if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) { 1209 position.top += myOffset + atOffset + offset; 1210 } 1211 } else if ( overBottom > 0 ) { 1212 newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + 1213 offset - offsetTop; 1214 if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) { 1215 position.top += myOffset + atOffset + offset; 1216 } 1217 } 1218 } 1219 }, 1220 flipfit: { 1221 left: function() { 1222 $.ui.position.flip.left.apply( this, arguments ); 1223 $.ui.position.fit.left.apply( this, arguments ); 1224 }, 1225 top: function() { 1226 $.ui.position.flip.top.apply( this, arguments ); 1227 $.ui.position.fit.top.apply( this, arguments ); 1228 } 1229 } 1230}; 1231 1232} )(); 1233 1234var position = $.ui.position; 1235 1236 1237/*! 1238 * jQuery UI :data 1.1
12382.1 1239 * http://jqueryui.com 1240 * 1241 * Copyright jQuery Foundation and other contributors 1242 * Released under the MIT license. 1243 * http://jquery.org/license 1244 */ 1245 1246//>>label: :data Selector
vendor: 29,604 bytes, lines 1247-2457
1247//>>group: Core 1248//>>description: Selects elements which have data stored under the specified key. 1249//>>docs: http://api.jqueryui.com/data-selector/ 1250 1251 1252var data = $.extend( $.expr[ ":" ], { 1253 data: $.expr.createPseudo ? 1254 $.expr.createPseudo( function( dataName ) { 1255 return function( elem ) { 1256 return !!$.data( elem, dataName ); 1257 }; 1258 } ) : 1259 1260 // Support: jQuery <1.8 1261 function( elem, i, match ) { 1262 return !!$.data( elem, match[ 3 ] ); 1263 } 1264} ); 1265 1266/*! 1267 * jQuery UI Disable Selection 1.12.1 1268 * http://jqueryui.com 1269 * 1270 * Copyright jQuery Foundation and other contributors 1271 * Released under the MIT license. 1272 * http://jquery.org/license 1273 */ 1274 1275//>>label: disableSelection 1276//>>group: Core 1277//>>description: Disable selection of text content within the set of matched elements. 1278//>>docs: http://api.jqueryui.com/disableSelection/ 1279 1280// This file is deprecated 1281 1282 1283var disableSelection = $.fn.extend( { 1284 disableSelection: ( function() { 1285 var eventType = "onselectstart" in document.createElement( "div" ) ? 1286 "selectstart" : 1287 "mousedown"; 1288 1289 return function() { 1290 return this.on( eventType + ".ui-disableSelection", function( event ) { 1291 event.preventDefault(); 1292 } ); 1293 }; 1294 } )(), 1295 1296 enableSelection: function() { 1297 return this.off( ".ui-disableSelection" ); 1298 } 1299} ); 1300 1301 1302/*! 1303 * jQuery UI Effects 1.12.1 1304 * http://jqueryui.com 1305 * 1306 * Copyright jQuery Foundation and other contributors 1307 * Released under the MIT license. 1308 * http://jquery.org/license 1309 */ 1310 1311//>>label: Effects Core 1312//>>group: Effects 1313// jscs:disable maximumLineLength 1314//>>description: Extends the internal jQuery effects. Includes morphing and easing. Required by all other effects. 1315// jscs:enable maximumLineLength 1316//>>docs: http://api.jqueryui.com/category/effects-core/ 1317//>>demos: http://jqueryui.com/effect/ 1318 1319 1320 1321var dataSpace = "ui-effects-", 1322 dataSpaceStyle = "ui-effects-style", 1323 dataSpaceAnimated = "ui-effects-animated", 1324 1325 // Create a local jQuery because jQuery Color relies on it and the 1326 // global may not exist with AMD and a custom build (#10199) 1327 jQuery = $; 1328 1329$.effects = { 1330 effect: {} 1331}; 1332 1333/*! 1334 * jQuery Color Animations v2.1.2 1335 * https://github.com/jquery/jquery-color 1336 * 1337 * Copyright 2014 jQuery Foundation and other contributors 1338 * Released under the MIT license. 1339 * http://jquery.org/license 1340 * 1341 * Date: Wed Jan 16 08:47:09 2013 -0600 1342 */ 1343( function( jQuery, undefined ) { 1344 1345 var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor " + 1346 "borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor", 1347 1348 // Plusequals test for += 100 -= 100 1349 rplusequals = /^([\-+])=\s*(\d+\.?\d*)/, 1350 1351 // A set of RE's that can match strings and generate color tuples. 1352 stringParsers = [ { 1353 re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, 1354 parse: function( execResult ) { 1355 return [ 1356 execResult[ 1 ], 1357 execResult[ 2 ], 1358 execResult[ 3 ], 1359 execResult[ 4 ] 1360 ]; 1361 } 1362 }, { 1363 re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, 1364 parse: function( execResult ) { 1365 return [ 1366 execResult[ 1 ] * 2.55, 1367 execResult[ 2 ] * 2.55, 1368 execResult[ 3 ] * 2.55, 1369 execResult[ 4 ] 1370 ]; 1371 } 1372 }, { 1373 1374 // This regex ignores A-F because it's compared against an already lowercased string 1375 re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, 1376 parse: function( execResult ) { 1377 return [ 1378 parseInt( execResult[ 1 ], 16 ), 1379 parseInt( execResult[ 2 ], 16 ), 1380 parseInt( execResult[ 3 ], 16 ) 1381 ]; 1382 } 1383 }, { 1384 1385 // This regex ignores A-F because it's compared against an already lowercased string 1386 re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, 1387 parse: function( execResult ) { 1388 return [ 1389 parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ), 1390 parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ), 1391 parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ) 1392 ]; 1393 } 1394 }, { 1395 re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, 1396 space: "hsla", 1397 parse: function( execResult ) { 1398 return [ 1399 execResult[ 1 ], 1400 execResult[ 2 ] / 100, 1401 execResult[ 3 ] / 100, 1402 execResult[ 4 ] 1403 ]; 1404 } 1405 } ], 1406 1407 // JQuery.Color( ) 1408 color = jQuery.Color = function( color, green, blue, alpha ) { 1409 return new jQuery.Color.fn.parse( color, green, blue, alpha ); 1410 }, 1411 spaces = { 1412 rgba: { 1413 props: { 1414 red: { 1415 idx: 0, 1416 type: "byte" 1417 }, 1418 green: { 1419 idx: 1, 1420 type: "byte" 1421 }, 1422 blue: { 1423 idx: 2, 1424 type: "byte" 1425 } 1426 } 1427 }, 1428 1429 hsla: { 1430 props: { 1431 hue: { 1432 idx: 0, 1433 type: "degrees" 1434 }, 1435 saturation: { 1436 idx: 1, 1437 type: "percent" 1438 }, 1439 lightness: { 1440 idx: 2, 1441 type: "percent" 1442 } 1443 } 1444 } 1445 }, 1446 propTypes = { 1447 "byte": { 1448 floor: true, 1449 max: 255 1450 }, 1451 "percent": { 1452 max: 1 1453 }, 1454 "degrees": { 1455 mod: 360, 1456 floor: true 1457 } 1458 }, 1459 support = color.support = {}, 1460 1461 // Element for support tests 1462 supportElem = jQuery( "<p>" )[ 0 ], 1463 1464 // Colors = jQuery.Color.names 1465 colors, 1466 1467 // Local aliases of functions called often 1468 each = jQuery.each; 1469 1470// Determine rgba support immediately 1471supportElem.style.cssText = "background-color:rgba(1,1,1,.5)"; 1472support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1; 1473 1474// Define cache name and alpha properties 1475// for rgba and hsla spaces 1476each( spaces, function( spaceName, space ) { 1477 space.cache = "_" + spaceName; 1478 space.props.alpha = { 1479 idx: 3, 1480 type: "percent", 1481 def: 1 1482 }; 1483} ); 1484 1485function clamp( value, prop, allowEmpty ) { 1486 var type = propTypes[ prop.type ] || {}; 1487 1488 if ( value == null ) { 1489 return ( allowEmpty || !prop.def ) ? null : prop.def; 1490 } 1491 1492 // ~~ is an short way of doing floor for positive numbers 1493 value = type.floor ? ~~value : parseFloat( value ); 1494 1495 // IE will pass in empty strings as value for alpha, 1496 // which will hit this case 1497 if ( isNaN( value ) ) { 1498 return prop.def; 1499 } 1500 1501 if ( type.mod ) { 1502 1503 // We add mod before modding to make sure that negatives values 1504 // get converted properly: -10 -> 350 1505 return ( value + type.mod ) % type.mod; 1506 } 1507 1508 // For now all property types without mod have min and max 1509 return 0 > value ? 0 : type.max < value ? type.max : value; 1510} 1511 1512function stringParse( string ) { 1513 var inst = color(), 1514 rgba = inst._rgba = []; 1515 1516 string = string.toLowerCase(); 1517 1518 each( stringParsers, function( i, parser ) { 1519 var parsed, 1520 match = parser.re.exec( string ), 1521 values = match && parser.parse( match ), 1522 spaceName = parser.space || "rgba"; 1523 1524 if ( values ) { 1525 parsed = inst[ spaceName ]( values ); 1526 1527 // If this was an rgba parse the assignment might happen twice 1528 // oh well.... 1529 inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ]; 1530 rgba = inst._rgba = parsed._rgba; 1531 1532 // Exit each( stringParsers ) here because we matched 1533 return false; 1534 } 1535 } ); 1536 1537 // Found a stringParser that handled it 1538 if ( rgba.length ) { 1539 1540 // If this came from a parsed string, force "transparent" when alpha is 0 1541 // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0) 1542 if ( rgba.join() === "0,0,0,0" ) { 1543 jQuery.extend( rgba, colors.transparent ); 1544 } 1545 return inst; 1546 } 1547 1548 // Named colors 1549 return colors[ string ]; 1550} 1551 1552color.fn = jQuery.extend( color.prototype, { 1553 parse: function( red, green, blue, alpha ) { 1554 if ( red === undefined ) { 1555 this._rgba = [ null, null, null, null ]; 1556 return this; 1557 } 1558 if ( red.jquery || red.nodeType ) { 1559 red = jQuery( red ).css( green ); 1560 green = undefined; 1561 } 1562 1563 var inst = this, 1564 type = jQuery.type( red ), 1565 rgba = this._rgba = []; 1566 1567 // More than 1 argument specified - assume ( red, green, blue, alpha ) 1568 if ( green !== undefined ) { 1569 red = [ red, green, blue, alpha ]; 1570 type = "array"; 1571 } 1572 1573 if ( type === "string" ) { 1574 return this.parse( stringParse( red ) || colors._default ); 1575 } 1576 1577 if ( type === "array" ) { 1578 each( spaces.rgba.props, function( key, prop ) { 1579 rgba[ prop.idx ] = clamp( red[ prop.idx ], prop ); 1580 } ); 1581 return this; 1582 } 1583 1584 if ( type === "object" ) { 1585 if ( red instanceof color ) { 1586 each( spaces, function( spaceName, space ) { 1587 if ( red[ space.cache ] ) { 1588 inst[ space.cache ] = red[ space.cache ].slice(); 1589 } 1590 } ); 1591 } else { 1592 each( spaces, function( spaceName, space ) { 1593 var cache = space.cache; 1594 each( space.props, function( key, prop ) { 1595 1596 // If the cache doesn't exist, and we know how to convert 1597 if ( !inst[ cache ] && space.to ) { 1598 1599 // If the value was null, we don't need to copy it 1600 // if the key was alpha, we don't need to copy it either 1601 if ( key === "alpha" || red[ key ] == null ) { 1602 return; 1603 } 1604 inst[ cache ] = space.to( inst._rgba ); 1605 } 1606 1607 // This is the only case where we allow nulls for ALL properties. 1608 // call clamp with alwaysAllowEmpty 1609 inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true ); 1610 } ); 1611 1612 // Everything defined but alpha? 1613 if ( inst[ cache ] && 1614 jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) { 1615 1616 // Use the default of 1 1617 inst[ cache ][ 3 ] = 1; 1618 if ( space.from ) { 1619 inst._rgba = space.from( inst[ cache ] ); 1620 } 1621 } 1622 } ); 1623 } 1624 return this; 1625 } 1626 }, 1627 is: function( compare ) { 1628 var is = color( compare ), 1629 same = true, 1630 inst = this; 1631 1632 each( spaces, function( _, space ) { 1633 var localCache, 1634 isCache = is[ space.cache ]; 1635 if ( isCache ) { 1636 localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || []; 1637 each( space.props, function( _, prop ) { 1638 if ( isCache[ prop.idx ] != null ) { 1639 same = ( isCache[ prop.idx ] === localCache[ prop.idx ] ); 1640 return same; 1641 } 1642 } ); 1643 } 1644 return same; 1645 } ); 1646 return same; 1647 }, 1648 _space: function() { 1649 var used = [], 1650 inst = this; 1651 each( spaces, function( spaceName, space ) { 1652 if ( inst[ space.cache ] ) { 1653 used.push( spaceName ); 1654 } 1655 } ); 1656 return used.pop(); 1657 }, 1658 transition: function( other, distance ) { 1659 var end = color( other ), 1660 spaceName = end._space(), 1661 space = spaces[ spaceName ], 1662 startColor = this.alpha() === 0 ? color( "transparent" ) : this, 1663 start = startColor[ space.cache ] || space.to( startColor._rgba ), 1664 result = start.slice(); 1665 1666 end = end[ space.cache ]; 1667 each( space.props, function( key, prop ) { 1668 var index = prop.idx, 1669 startValue = start[ index ], 1670 endValue = end[ index ], 1671 type = propTypes[ prop.type ] || {}; 1672 1673 // If null, don't override start value 1674 if ( endValue === null ) { 1675 return; 1676 } 1677 1678 // If null - use end 1679 if ( startValue === null ) { 1680 result[ index ] = endValue; 1681 } else { 1682 if ( type.mod ) { 1683 if ( endValue - startValue > type.mod / 2 ) { 1684 startValue += type.mod; 1685 } else if ( startValue - endValue > type.mod / 2 ) { 1686 startValue -= type.mod; 1687 } 1688 } 1689 result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop ); 1690 } 1691 } ); 1692 return this[ spaceName ]( result ); 1693 }, 1694 blend: function( opaque ) { 1695 1696 // If we are already opaque - return ourself 1697 if ( this._rgba[ 3 ] === 1 ) { 1698 return this; 1699 } 1700 1701 var rgb = this._rgba.slice(), 1702 a = rgb.pop(), 1703 blend = color( opaque )._rgba; 1704 1705 return color( jQuery.map( rgb, function( v, i ) { 1706 return ( 1 - a ) * blend[ i ] + a * v; 1707 } ) ); 1708 }, 1709 toRgbaString: function() { 1710 var prefix = "rgba(", 1711 rgba = jQuery.map( this._rgba, function( v, i ) { 1712 return v == null ? ( i > 2 ? 1 : 0 ) : v; 1713 } ); 1714 1715 if ( rgba[ 3 ] === 1 ) { 1716 rgba.pop(); 1717 prefix = "rgb("; 1718 } 1719 1720 return prefix + rgba.join() + ")"; 1721 }, 1722 toHslaString: function() { 1723 var prefix = "hsla(", 1724 hsla = jQuery.map( this.hsla(), function( v, i ) { 1725 if ( v == null ) { 1726 v = i > 2 ? 1 : 0; 1727 } 1728 1729 // Catch 1 and 2 1730 if ( i && i < 3 ) { 1731 v = Math.round( v * 100 ) + "%"; 1732 } 1733 return v; 1734 } ); 1735 1736 if ( hsla[ 3 ] === 1 ) { 1737 hsla.pop(); 1738 prefix = "hsl("; 1739 } 1740 return prefix + hsla.join() + ")"; 1741 }, 1742 toHexString: function( includeAlpha ) { 1743 var rgba = this._rgba.slice(), 1744 alpha = rgba.pop(); 1745 1746 if ( includeAlpha ) { 1747 rgba.push( ~~( alpha * 255 ) ); 1748 } 1749 1750 return "#" + jQuery.map( rgba, function( v ) { 1751 1752 // Default to 0 when nulls exist 1753 v = ( v || 0 ).toString( 16 ); 1754 return v.length === 1 ? "0" + v : v; 1755 } ).join( "" ); 1756 }, 1757 toString: function() { 1758 return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString(); 1759 } 1760} ); 1761color.fn.parse.prototype = color.fn; 1762 1763// Hsla conversions adapted from: 1764// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021 1765 1766function hue2rgb( p, q, h ) { 1767 h = ( h + 1 ) % 1; 1768 if ( h * 6 < 1 ) { 1769 return p + ( q - p ) * h * 6; 1770 } 1771 if ( h * 2 < 1 ) { 1772 return q; 1773 } 1774 if ( h * 3 < 2 ) { 1775 return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6; 1776 } 1777 return p; 1778} 1779 1780spaces.hsla.to = function( rgba ) { 1781 if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) { 1782 return [ null, null, null, rgba[ 3 ] ]; 1783 } 1784 var r = rgba[ 0 ] / 255, 1785 g = rgba[ 1 ] / 255, 1786 b = rgba[ 2 ] / 255, 1787 a = rgba[ 3 ], 1788 max = Math.max( r, g, b ), 1789 min = Math.min( r, g, b ), 1790 diff = max - min, 1791 add = max + min, 1792 l = add * 0.5, 1793 h, s; 1794 1795 if ( min === max ) { 1796 h = 0; 1797 } else if ( r === max ) { 1798 h = ( 60 * ( g - b ) / diff ) + 360; 1799 } else if ( g === max ) { 1800 h = ( 60 * ( b - r ) / diff ) + 120; 1801 } else { 1802 h = ( 60 * ( r - g ) / diff ) + 240; 1803 } 1804 1805 // Chroma (diff) == 0 means greyscale which, by definition, saturation = 0% 1806 // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add) 1807 if ( diff === 0 ) { 1808 s = 0; 1809 } else if ( l <= 0.5 ) { 1810 s = diff / add; 1811 } else { 1812 s = diff / ( 2 - add ); 1813 } 1814 return [ Math.round( h ) % 360, s, l, a == null ? 1 : a ]; 1815}; 1816 1817spaces.hsla.from = function( hsla ) { 1818 if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) { 1819 return [ null, null, null, hsla[ 3 ] ]; 1820 } 1821 var h = hsla[ 0 ] / 360, 1822 s = hsla[ 1 ], 1823 l = hsla[ 2 ], 1824 a = hsla[ 3 ], 1825 q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s, 1826 p = 2 * l - q; 1827 1828 return [ 1829 Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ), 1830 Math.round( hue2rgb( p, q, h ) * 255 ), 1831 Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ), 1832 a 1833 ]; 1834}; 1835 1836each( spaces, function( spaceName, space ) { 1837 var props = space.props, 1838 cache = space.cache, 1839 to = space.to, 1840 from = space.from; 1841 1842 // Makes rgba() and hsla() 1843 color.fn[ spaceName ] = function( value ) { 1844 1845 // Generate a cache for this space if it doesn't exist 1846 if ( to && !this[ cache ] ) { 1847 this[ cache ] = to( this._rgba ); 1848 } 1849 if ( value === undefined ) { 1850 return this[ cache ].slice(); 1851 } 1852 1853 var ret, 1854 type = jQuery.type( value ), 1855 arr = ( type === "array" || type === "object" ) ? value : arguments, 1856 local = this[ cache ].slice(); 1857 1858 each( props, function( key, prop ) { 1859 var val = arr[ type === "object" ? key : prop.idx ]; 1860 if ( val == null ) { 1861 val = local[ prop.idx ]; 1862 } 1863 local[ prop.idx ] = clamp( val, prop ); 1864 } ); 1865 1866 if ( from ) { 1867 ret = color( from( local ) ); 1868 ret[ cache ] = local; 1869 return ret; 1870 } else { 1871 return color( local ); 1872 } 1873 }; 1874 1875 // Makes red() green() blue() alpha() hue() saturation() lightness() 1876 each( props, function( key, prop ) { 1877 1878 // Alpha is included in more than one space 1879 if ( color.fn[ key ] ) { 1880 return; 1881 } 1882 color.fn[ key ] = function( value ) { 1883 var vtype = jQuery.type( value ), 1884 fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ), 1885 local = this[ fn ](), 1886 cur = local[ prop.idx ], 1887 match; 1888 1889 if ( vtype === "undefined" ) { 1890 return cur; 1891 } 1892 1893 if ( vtype === "function" ) { 1894 value = value.call( this, cur ); 1895 vtype = jQuery.type( value ); 1896 } 1897 if ( value == null && prop.empty ) { 1898 return this; 1899 } 1900 if ( vtype === "string" ) { 1901 match = rplusequals.exec( value ); 1902 if ( match ) { 1903 value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 ); 1904 } 1905 } 1906 local[ prop.idx ] = value; 1907 return this[ fn ]( local ); 1908 }; 1909 } ); 1910} ); 1911 1912// Add cssHook and .fx.step function for each named hook. 1913// accept a space separated string of properties 1914color.hook = function( hook ) { 1915 var hooks = hook.split( " " ); 1916 each( hooks, function( i, hook ) { 1917 jQuery.cssHooks[ hook ] = { 1918 set: function( elem, value ) { 1919 var parsed, curElem, 1920 backgroundColor = ""; 1921 1922 if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || 1923 ( parsed = stringParse( value ) ) ) ) { 1924 value = color( parsed || value ); 1925 if ( !support.rgba && value._rgba[ 3 ] !== 1 ) { 1926 curElem = hook === "backgroundColor" ? elem.parentNode : elem; 1927 while ( 1928 ( backgroundColor === "" || backgroundColor === "transparent" ) && 1929 curElem && curElem.style 1930 ) { 1931 try { 1932 backgroundColor = jQuery.css( curElem, "backgroundColor" ); 1933 curElem = curElem.parentNode; 1934 } catch ( e ) { 1935 } 1936 } 1937 1938 value = value.blend( backgroundColor && backgroundColor !== "transparent" ? 1939 backgroundColor : 1940 "_default" ); 1941 } 1942 1943 value = value.toRgbaString(); 1944 } 1945 try { 1946 elem.style[ hook ] = value; 1947 } catch ( e ) { 1948 1949 // Wrapped to prevent IE from throwing errors on "invalid" values like 1950 // 'auto' or 'inherit' 1951 } 1952 } 1953 }; 1954 jQuery.fx.step[ hook ] = function( fx ) { 1955 if ( !fx.colorInit ) { 1956 fx.start = color( fx.elem, hook ); 1957 fx.end = color( fx.end ); 1958 fx.colorInit = true; 1959 } 1960 jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) ); 1961 }; 1962 } ); 1963 1964}; 1965 1966color.hook( stepHooks ); 1967 1968jQuery.cssHooks.borderColor = { 1969 expand: function( value ) { 1970 var expanded = {}; 1971 1972 each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) { 1973 expanded[ "border" + part + "Color" ] = value; 1974 } ); 1975 return expanded; 1976 } 1977}; 1978 1979// Basic color names only. 1980// Usage of any of the other color names requires adding yourself or including 1981// jquery.color.svg-names.js. 1982colors = jQuery.Color.names = { 1983 1984 // 4.1. Basic color keywords 1985 aqua: "#00ffff", 1986 black: "#000000", 1987 blue: "#0000ff", 1988 fuchsia: "#ff00ff", 1989 gray: "#808080", 1990 green: "#008000", 1991 lime: "#00ff00", 1992 maroon: "#800000", 1993 navy: "#000080", 1994 olive: "#808000", 1995 purple: "#800080", 1996 red: "#ff0000", 1997 silver: "#c0c0c0", 1998 teal: "#008080", 1999 white: "#ffffff", 2000 yellow: "#ffff00", 2001 2002 // 4.2.3. "transparent" color keyword 2003 transparent: [ null, null, null, 0 ], 2004 2005 _default: "#ffffff" 2006}; 2007 2008} )( jQuery ); 2009 2010/******************************************************************************/ 2011/****************************** CLASS ANIMATIONS ******************************/ 2012/******************************************************************************/ 2013( function() { 2014 2015var classAnimationActions = [ "add", "remove", "toggle" ], 2016 shorthandStyles = { 2017 border: 1, 2018 borderBottom: 1, 2019 borderColor: 1, 2020 borderLeft: 1, 2021 borderRight: 1, 2022 borderTop: 1, 2023 borderWidth: 1, 2024 margin: 1, 2025 padding: 1 2026 }; 2027 2028$.each( 2029 [ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], 2030 function( _, prop ) { 2031 $.fx.step[ prop ] = function( fx ) { 2032 if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) { 2033 jQuery.style( fx.elem, prop, fx.end ); 2034 fx.setAttr = true; 2035 } 2036 }; 2037 } 2038); 2039 2040function getElementStyles( elem ) { 2041 var key, len, 2042 style = elem.ownerDocument.defaultView ? 2043 elem.ownerDocument.defaultView.getComputedStyle( elem, null ) : 2044 elem.currentStyle, 2045 styles = {}; 2046 2047 if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) { 2048 len = style.length; 2049 while ( len-- ) { 2050 key = style[ len ]; 2051 if ( typeof style[ key ] === "string" ) { 2052 styles[ $.camelCase( key ) ] = style[ key ]; 2053 } 2054 } 2055 2056 // Support: Opera, IE <9 2057 } else { 2058 for ( key in style ) { 2059 if ( typeof style[ key ] === "string" ) { 2060 styles[ key ] = style[ key ]; 2061 } 2062 } 2063 } 2064 2065 return styles; 2066} 2067 2068function styleDifference( oldStyle, newStyle ) { 2069 var diff = {}, 2070 name, value; 2071 2072 for ( name in newStyle ) { 2073 value = newStyle[ name ]; 2074 if ( oldStyle[ name ] !== value ) { 2075 if ( !shorthandStyles[ name ] ) { 2076 if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) { 2077 diff[ name ] = value; 2078 } 2079 } 2080 } 2081 } 2082 2083 return diff; 2084} 2085 2086// Support: jQuery <1.8 2087if ( !$.fn.addBack ) { 2088 $.fn.addBack = function( selector ) { 2089 return this.add( selector == null ? 2090 this.prevObject : this.prevObject.filter( selector ) 2091 ); 2092 }; 2093} 2094 2095$.effects.animateClass = function( value, duration, easing, callback ) { 2096 var o = $.speed( duration, easing, callback ); 2097 2098 return this.queue( function() { 2099 var animated = $( this ), 2100 baseClass = animated.attr( "class" ) || "", 2101 applyClassChange, 2102 allAnimations = o.children ? animated.find( "*" ).addBack() : animated; 2103 2104 // Map the animated objects to store the original styles. 2105 allAnimations = allAnimations.map( function() { 2106 var el = $( this ); 2107 return { 2108 el: el, 2109 start: getElementStyles( this ) 2110 }; 2111 } ); 2112 2113 // Apply class change 2114 applyClassChange = function() { 2115 $.each( classAnimationActions, function( i, action ) { 2116 if ( value[ action ] ) { 2117 animated[ action + "Class" ]( value[ action ] ); 2118 } 2119 } ); 2120 }; 2121 applyClassChange(); 2122 2123 // Map all animated objects again - calculate new styles and diff 2124 allAnimations = allAnimations.map( function() { 2125 this.end = getElementStyles( this.el[ 0 ] ); 2126 this.diff = styleDifference( this.start, this.end ); 2127 return this; 2128 } ); 2129 2130 // Apply original class 2131 animated.attr( "class", baseClass ); 2132 2133 // Map all animated objects again - this time collecting a promise 2134 allAnimations = allAnimations.map( function() { 2135 var styleInfo = this, 2136 dfd = $.Deferred(), 2137 opts = $.extend( {}, o, { 2138 queue: false, 2139 complete: function() { 2140 dfd.resolve( styleInfo ); 2141 } 2142 } ); 2143 2144 this.el.animate( this.diff, opts ); 2145 return dfd.promise(); 2146 } ); 2147 2148 // Once all animations have completed: 2149 $.when.apply( $, allAnimations.get() ).done( function() { 2150 2151 // Set the final class 2152 applyClassChange(); 2153 2154 // For each animated element, 2155 // clear all css properties that were animated 2156 $.each( arguments, function() { 2157 var el = this.el; 2158 $.each( this.diff, function( key ) { 2159 el.css( key, "" ); 2160 } ); 2161 } ); 2162 2163 // This is guarnteed to be there if you use jQuery.speed() 2164 // it also handles dequeuing the next anim... 2165 o.complete.call( animated[ 0 ] ); 2166 } ); 2167 } ); 2168}; 2169 2170$.fn.extend( { 2171 addClass: ( function( orig ) { 2172 return function( classNames, speed, easing, callback ) { 2173 return speed ? 2174 $.effects.animateClass.call( this, 2175 { add: classNames }, speed, easing, callback ) : 2176 orig.apply( this, arguments ); 2177 }; 2178 } )( $.fn.addClass ), 2179 2180 removeClass: ( function( orig ) { 2181 return function( classNames, speed, easing, callback ) { 2182 return arguments.length > 1 ? 2183 $.effects.animateClass.call( this, 2184 { remove: classNames }, speed, easing, callback ) : 2185 orig.apply( this, arguments ); 2186 }; 2187 } )( $.fn.removeClass ), 2188 2189 toggleClass: ( function( orig ) { 2190 return function( classNames, force, speed, easing, callback ) { 2191 if ( typeof force === "boolean" || force === undefined ) { 2192 if ( !speed ) { 2193 2194 // Without speed parameter 2195 return orig.apply( this, arguments ); 2196 } else { 2197 return $.effects.animateClass.call( this, 2198 ( force ? { add: classNames } : { remove: classNames } ), 2199 speed, easing, callback ); 2200 } 2201 } else { 2202 2203 // Without force parameter 2204 return $.effects.animateClass.call( this, 2205 { toggle: classNames }, force, speed, easing ); 2206 } 2207 }; 2208 } )( $.fn.toggleClass ), 2209 2210 switchClass: function( remove, add, speed, easing, callback ) { 2211 return $.effects.animateClass.call( this, { 2212 add: add, 2213 remove: remove 2214 }, speed, easing, callback ); 2215 } 2216} ); 2217 2218} )(); 2219 2220/******************************************************************************/ 2221/*********************************** EFFECTS **********************************/ 2222/******************************************************************************/ 2223 2224( function() { 2225 2226if ( $.expr && $.expr.filters && $.expr.filters.animated ) { 2227 $.expr.filters.animated = ( function( orig ) { 2228 return function( elem ) { 2229 return !!$( elem ).data( dataSpaceAnimated ) || orig( elem ); 2230 }; 2231 } )( $.expr.filters.animated ); 2232} 2233 2234if ( $.uiBackCompat !== false ) { 2235 $.extend( $.effects, { 2236 2237 // Saves a set of properties in a data storage 2238 save: function( element, set ) { 2239 var i = 0, length = set.length; 2240 for ( ; i < length; i++ ) { 2241 if ( set[ i ] !== null ) { 2242 element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] ); 2243 } 2244 } 2245 }, 2246 2247 // Restores a set of previously saved properties from a data storage 2248 restore: function( element, set ) { 2249 var val, i = 0, length = set.length; 2250 for ( ; i < length; i++ ) { 2251 if ( set[ i ] !== null ) { 2252 val = element.data( dataSpace + set[ i ] ); 2253 element.css( set[ i ], val ); 2254 } 2255 } 2256 }, 2257 2258 setMode: function( el, mode ) { 2259 if ( mode === "toggle" ) { 2260 mode = el.is( ":hidden" ) ? "show" : "hide"; 2261 } 2262 return mode; 2263 }, 2264 2265 // Wraps the element around a wrapper that copies position properties 2266 createWrapper: function( element ) { 2267 2268 // If the element is already wrapped, return it 2269 if ( element.parent().is( ".ui-effects-wrapper" ) ) { 2270 return element.parent(); 2271 } 2272 2273 // Wrap the element 2274 var props = { 2275 width: element.outerWidth( true ), 2276 height: element.outerHeight( true ), 2277 "float": element.css( "float" ) 2278 }, 2279 wrapper = $( "<div></div>" ) 2280 .addClass( "ui-effects-wrapper" ) 2281 .css( { 2282 fontSize: "100%", 2283 background: "transparent", 2284 border: "none", 2285 margin: 0, 2286 padding: 0 2287 } ), 2288 2289 // Store the size in case width/height are defined in % - Fixes #5245 2290 size = { 2291 width: element.width(), 2292 height: element.height() 2293 }, 2294 active = document.activeElement; 2295 2296 // Support: Firefox 2297 // Firefox incorrectly exposes anonymous content 2298 // https://bugzilla.mozilla.org/show_bug.cgi?id=561664 2299 try { 2300 active.id; 2301 } catch ( e ) { 2302 active = document.body; 2303 } 2304 2305 element.wrap( wrapper ); 2306 2307 // Fixes #7595 - Elements lose focus when wrapped. 2308 if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { 2309 $( active ).trigger( "focus" ); 2310 } 2311 2312 // Hotfix for jQuery 1.4 since some change in wrap() seems to actually 2313 // lose the reference to the wrapped element 2314 wrapper = element.parent(); 2315 2316 // Transfer positioning properties to the wrapper 2317 if ( element.css( "position" ) === "static" ) { 2318 wrapper.css( { position: "relative" } ); 2319 element.css( { position: "relative" } ); 2320 } else { 2321 $.extend( props, { 2322 position: element.css( "position" ), 2323 zIndex: element.css( "z-index" ) 2324 } ); 2325 $.each( [ "top", "left", "bottom", "right" ], function( i, pos ) { 2326 props[ pos ] = element.css( pos ); 2327 if ( isNaN( parseInt( props[ pos ], 10 ) ) ) { 2328 props[ pos ] = "auto"; 2329 } 2330 } ); 2331 element.css( { 2332 position: "relative", 2333 top: 0, 2334 left: 0, 2335 right: "auto", 2336 bottom: "auto" 2337 } ); 2338 } 2339 element.css( size ); 2340 2341 return wrapper.css( props ).show(); 2342 }, 2343 2344 removeWrapper: function( element ) { 2345 var active = document.activeElement; 2346 2347 if ( element.parent().is( ".ui-effects-wrapper" ) ) { 2348 element.parent().replaceWith( element ); 2349 2350 // Fixes #7595 - Elements lose focus when wrapped. 2351 if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { 2352 $( active ).trigger( "focus" ); 2353 } 2354 } 2355 2356 return element; 2357 } 2358 } ); 2359} 2360 2361$.extend( $.effects, { 2362 version: "1.12.1", 2363 2364 define: function( name, mode, effect ) { 2365 if ( !effect ) { 2366 effect = mode; 2367 mode = "effect"; 2368 } 2369 2370 $.effects.effect[ name ] = effect; 2371 $.effects.effect[ name ].mode = mode; 2372 2373 return effect; 2374 }, 2375 2376 scaledDimensions: function( element, percent, direction ) { 2377 if ( percent === 0 ) { 2378 return { 2379 height: 0, 2380 width: 0, 2381 outerHeight: 0, 2382 outerWidth: 0 2383 }; 2384 } 2385 2386 var x = direction !== "horizontal" ? ( ( percent || 100 ) / 100 ) : 1, 2387 y = direction !== "vertical" ? ( ( percent || 100 ) / 100 ) : 1; 2388 2389 return { 2390 height: element.height() * y, 2391 width: element.width() * x, 2392 outerHeight: element.outerHeight() * y, 2393 outerWidth: element.outerWidth() * x 2394 }; 2395 2396 }, 2397 2398 clipToBox: function( animation ) { 2399 return { 2400 width: animation.clip.right - animation.clip.left, 2401 height: animation.clip.bottom - animation.clip.top, 2402 left: animation.clip.left, 2403 top: animation.clip.top 2404 }; 2405 }, 2406 2407 // Injects recently queued functions to be first in line (after "inprogress") 2408 unshift: function( element, queueLength, count ) { 2409 var queue = element.queue(); 2410 2411 if ( queueLength > 1 ) { 2412 queue.splice.apply( queue, 2413 [ 1, 0 ].concat( queue.splice( queueLength, count ) ) ); 2414 } 2415 element.dequeue(); 2416 }, 2417 2418 saveStyle: function( element ) { 2419 element.data( dataSpaceStyle, element[ 0 ].style.cssText ); 2420 }, 2421 2422 restoreStyle: function( element ) { 2423 element[ 0 ].style.cssText = element.data( dataSpaceStyle ) || ""; 2424 element.removeData( dataSpaceStyle ); 2425 }, 2426 2427 mode: function( element, mode ) { 2428 var hidden = element.is( ":hidden" ); 2429 2430 if ( mode === "toggle" ) { 2431 mode = hidden ? "show" : "hide"; 2432 } 2433 if ( hidden ? mode === "hide" : mode === "show" ) { 2434 mode = "none"; 2435 } 2436 return mode; 2437 }, 2438 2439 // Translates a [top,left] array into a baseline value 2440 getBaseline: function( origin, original ) { 2441 var y, x; 2442 2443 switch ( origin[ 0 ] ) { 2444 case "top": 2445 y = 0; 2446 break; 2447 case "middle": 2448 y = 0.5; 2449 break; 2450 case "bottom": 2451 y = 1; 2452 break; 2453 default: 2454 y = origin[ 0 ] / original.height; 2455 } 2456 2457 switch ( origin[ 1 ] ) {
vendor: 4,228 bytes, lines 2458-2630
2458 case "left": 2459 x = 0; 2460 break; 2461 case "center": 2462 x = 0.5; 2463 break; 2464 case "right": 2465 x = 1; 2466 break; 2467 default: 2468 x = origin[ 1 ] / original.width; 2469 } 2470 2471 return { 2472 x: x, 2473 y: y 2474 }; 2475 }, 2476 2477 // Creates a placeholder element so that the original element can be made absolute 2478 createPlaceholder: function( element ) { 2479 var placeholder, 2480 cssPosition = element.css( "position" ), 2481 position = element.position(); 2482 2483 // Lock in margins first to account for form elements, which 2484 // will change margin if you explicitly set height 2485 // see: http://jsfiddle.net/JZSMt/3/ https://bugs.webkit.org/show_bug.cgi?id=107380 2486 // Support: Safari 2487 element.css( { 2488 marginTop: element.css( "marginTop" ), 2489 marginBottom: element.css( "marginBottom" ), 2490 marginLeft: element.css( "marginLeft" ), 2491 marginRight: element.css( "marginRight" ) 2492 } ) 2493 .outerWidth( element.outerWidth() ) 2494 .outerHeight( element.outerHeight() ); 2495 2496 if ( /^(static|relative)/.test( cssPosition ) ) { 2497 cssPosition = "absolute"; 2498 2499 placeholder = $( "<" + element[ 0 ].nodeName + ">" ).insertAfter( element ).css( { 2500 2501 // Convert inline to inline block to account for inline elements 2502 // that turn to inline block based on content (like img) 2503 display: /^(inline|ruby)/.test( element.css( "display" ) ) ? 2504 "inline-block" : 2505 "block", 2506 visibility: "hidden", 2507 2508 // Margins need to be set to account for margin collapse 2509 marginTop: element.css( "marginTop" ), 2510 marginBottom: element.css( "marginBottom" ), 2511 marginLeft: element.css( "marginLeft" ), 2512 marginRight: element.css( "marginRight" ), 2513 "float": element.css( "float" ) 2514 } ) 2515 .outerWidth( element.outerWidth() ) 2516 .outerHeight( element.outerHeight() ) 2517 .addClass( "ui-effects-placeholder" ); 2518 2519 element.data( dataSpace + "placeholder", placeholder ); 2520 } 2521 2522 element.css( { 2523 position: cssPosition, 2524 left: position.left, 2525 top: position.top 2526 } ); 2527 2528 return placeholder; 2529 }, 2530 2531 removePlaceholder: function( element ) { 2532 var dataKey = dataSpace + "placeholder", 2533 placeholder = element.data( dataKey ); 2534 2535 if ( placeholder ) { 2536 placeholder.remove(); 2537 element.removeData( dataKey ); 2538 } 2539 }, 2540 2541 // Removes a placeholder if it exists and restores 2542 // properties that were modified during placeholder creation 2543 cleanUp: function( element ) { 2544 $.effects.restoreStyle( element ); 2545 $.effects.removePlaceholder( element ); 2546 }, 2547 2548 setTransition: function( element, list, factor, value ) { 2549 value = value || {}; 2550 $.each( list, function( i, x ) { 2551 var unit = element.cssUnit( x ); 2552 if ( unit[ 0 ] > 0 ) { 2553 value[ x ] = unit[ 0 ] * factor + unit[ 1 ]; 2554 } 2555 } ); 2556 return value; 2557 } 2558} ); 2559 2560// Return an effect options object for the given parameters: 2561function _normalizeArguments( effect, options, speed, callback ) { 2562 2563 // Allow passing all options as the first parameter 2564 if ( $.isPlainObject( effect ) ) { 2565 options = effect; 2566 effect = effect.effect; 2567 } 2568 2569 // Convert to an object 2570 effect = { effect: effect }; 2571 2572 // Catch (effect, null, ...) 2573 if ( options == null ) { 2574 options = {}; 2575 } 2576 2577 // Catch (effect, callback) 2578 if ( $.isFunction( options ) ) { 2579 callback = options; 2580 speed = null; 2581 options = {}; 2582 } 2583 2584 // Catch (effect, speed, ?) 2585 if ( typeof options === "number" || $.fx.speeds[ options ] ) { 2586 callback = speed; 2587 speed = options; 2588 options = {}; 2589 } 2590 2591 // Catch (effect, options, callback) 2592 if ( $.isFunction( speed ) ) { 2593 callback = speed; 2594 speed = null; 2595 } 2596 2597 // Add options to effect 2598 if ( options ) { 2599 $.extend( effect, options ); 2600 } 2601 2602 speed = speed || options.duration; 2603 effect.duration = $.fx.off ? 0 : 2604 typeof speed === "number" ? speed : 2605 speed in $.fx.speeds ? $.fx.speeds[ speed ] : 2606 $.fx.speeds._default; 2607 2608 effect.complete = callback || options.complete; 2609 2610 return effect; 2611} 2612 2613function standardAnimationOption( option ) { 2614 2615 // Valid standard speeds (nothing, number, named speed) 2616 if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) { 2617 return true; 2618 } 2619 2620 // Invalid strings - treat as "normal" speed 2621 if ( typeof option === "string" && !$.effects.effect[ option ] ) { 2622 return true; 2623 } 2624 2625 // Complete callback 2626 if ( $.isFunction( option ) ) { 2627 return true; 2628 } 2629 2630 // Options hash (but not naming an effect)
vendor: 4,796 bytes, lines 2631-2814
2631 if ( typeof option === "object" && !option.effect ) { 2632 return true; 2633 } 2634 2635 // Didn't match any standard API 2636 return false; 2637} 2638 2639$.fn.extend( { 2640 effect: function( /* effect, options, speed, callback */ ) { 2641 var args = _normalizeArguments.apply( this, arguments ), 2642 effectMethod = $.effects.effect[ args.effect ], 2643 defaultMode = effectMethod.mode, 2644 queue = args.queue, 2645 queueName = queue || "fx", 2646 complete = args.complete, 2647 mode = args.mode, 2648 modes = [], 2649 prefilter = function( next ) { 2650 var el = $( this ), 2651 normalizedMode = $.effects.mode( el, mode ) || defaultMode; 2652 2653 // Sentinel for duck-punching the :animated psuedo-selector 2654 el.data( dataSpaceAnimated, true ); 2655 2656 // Save effect mode for later use, 2657 // we can't just call $.effects.mode again later, 2658 // as the .show() below destroys the initial state 2659 modes.push( normalizedMode ); 2660 2661 // See $.uiBackCompat inside of run() for removal of defaultMode in 1.13 2662 if ( defaultMode && ( normalizedMode === "show" || 2663 ( normalizedMode === defaultMode && normalizedMode === "hide" ) ) ) { 2664 el.show(); 2665 } 2666 2667 if ( !defaultMode || normalizedMode !== "none" ) { 2668 $.effects.saveStyle( el ); 2669 } 2670 2671 if ( $.isFunction( next ) ) { 2672 next(); 2673 } 2674 }; 2675 2676 if ( $.fx.off || !effectMethod ) { 2677 2678 // Delegate to the original method (e.g., .show()) if possible 2679 if ( mode ) { 2680 return this[ mode ]( args.duration, complete ); 2681 } else { 2682 return this.each( function() { 2683 if ( complete ) { 2684 complete.call( this ); 2685 } 2686 } ); 2687 } 2688 } 2689 2690 function run( next ) { 2691 var elem = $( this ); 2692 2693 function cleanup() { 2694 elem.removeData( dataSpaceAnimated ); 2695 2696 $.effects.cleanUp( elem ); 2697 2698 if ( args.mode === "hide" ) { 2699 elem.hide(); 2700 } 2701 2702 done(); 2703 } 2704 2705 function done() { 2706 if ( $.isFunction( complete ) ) { 2707 complete.call( elem[ 0 ] ); 2708 } 2709 2710 if ( $.isFunction( next ) ) { 2711 next(); 2712 } 2713 } 2714 2715 // Override mode option on a per element basis, 2716 // as toggle can be either show or hide depending on element state 2717 args.mode = modes.shift(); 2718 2719 if ( $.uiBackCompat !== false && !defaultMode ) { 2720 if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) { 2721 2722 // Call the core method to track "olddisplay" properly 2723 elem[ mode ](); 2724 done(); 2725 } else { 2726 effectMethod.call( elem[ 0 ], args, done ); 2727 } 2728 } else { 2729 if ( args.mode === "none" ) { 2730 2731 // Call the core method to track "olddisplay" properly 2732 elem[ mode ](); 2733 done(); 2734 } else { 2735 effectMethod.call( elem[ 0 ], args, cleanup ); 2736 } 2737 } 2738 } 2739 2740 // Run prefilter on all elements first to ensure that 2741 // any showing or hiding happens before placeholder creation, 2742 // which ensures that any layout changes are correctly captured. 2743 return queue === false ? 2744 this.each( prefilter ).each( run ) : 2745 this.queue( queueName, prefilter ).queue( queueName, run ); 2746 }, 2747 2748 show: ( function( orig ) { 2749 return function( option ) { 2750 if ( standardAnimationOption( option ) ) { 2751 return orig.apply( this, arguments ); 2752 } else { 2753 var args = _normalizeArguments.apply( this, arguments ); 2754 args.mode = "show"; 2755 return this.effect.call( this, args ); 2756 } 2757 }; 2758 } )( $.fn.show ), 2759 2760 hide: ( function( orig ) { 2761 return function( option ) { 2762 if ( standardAnimationOption( option ) ) { 2763 return orig.apply( this, arguments ); 2764 } else { 2765 var args = _normalizeArguments.apply( this, arguments ); 2766 args.mode = "hide"; 2767 return this.effect.call( this, args ); 2768 } 2769 }; 2770 } )( $.fn.hide ), 2771 2772 toggle: ( function( orig ) { 2773 return function( option ) { 2774 if ( standardAnimationOption( option ) || typeof option === "boolean" ) { 2775 return orig.apply( this, arguments ); 2776 } else { 2777 var args = _normalizeArguments.apply( this, arguments ); 2778 args.mode = "toggle"; 2779 return this.effect.call( this, args ); 2780 } 2781 }; 2782 } )( $.fn.toggle ), 2783 2784 cssUnit: function( key ) { 2785 var style = this.css( key ), 2786 val = []; 2787 2788 $.each( [ "em", "px", "%", "pt" ], function( i, unit ) { 2789 if ( style.indexOf( unit ) > 0 ) { 2790 val = [ parseFloat( style ), unit ]; 2791 } 2792 } ); 2793 return val; 2794 }, 2795 2796 cssClip: function( clipObj ) { 2797 if ( clipObj ) { 2798 return this.css( "clip", "rect(" + clipObj.top + "px " + clipObj.right + "px " + 2799 clipObj.bottom + "px " + clipObj.left + "px)" ); 2800 } 2801 return parseClip( this.css( "clip" ), this ); 2802 }, 2803 2804 transfer: function( options, done ) { 2805 var element = $( this ), 2806 target = $( options.to ), 2807 targetFixed = target.css( "position" ) === "fixed", 2808 body = $( "body" ), 2809 fixTop = targetFixed ? body.scrollTop() : 0, 2810 fixLeft = targetFixed ? body.scrollLeft() : 0, 2811 endPosition = target.offset(), 2812 animation = { 2813 top: endPosition.top - fixTop, 2814 left: endPosition.left - fixLeft,
vendor: 27,020 bytes, lines 2815-3844
2815 height: target.innerHeight(), 2816 width: target.innerWidth() 2817 }, 2818 startPosition = element.offset(), 2819 transfer = $( "<div class='ui-effects-transfer'></div>" ) 2820 .appendTo( "body" ) 2821 .addClass( options.className ) 2822 .css( { 2823 top: startPosition.top - fixTop, 2824 left: startPosition.left - fixLeft, 2825 height: element.innerHeight(), 2826 width: element.innerWidth(), 2827 position: targetFixed ? "fixed" : "absolute" 2828 } ) 2829 .animate( animation, options.duration, options.easing, function() { 2830 transfer.remove(); 2831 if ( $.isFunction( done ) ) { 2832 done(); 2833 } 2834 } ); 2835 } 2836} ); 2837 2838function parseClip( str, element ) { 2839 var outerWidth = element.outerWidth(), 2840 outerHeight = element.outerHeight(), 2841 clipRegex = /^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/, 2842 values = clipRegex.exec( str ) || [ "", 0, outerWidth, outerHeight, 0 ]; 2843 2844 return { 2845 top: parseFloat( values[ 1 ] ) || 0, 2846 right: values[ 2 ] === "auto" ? outerWidth : parseFloat( values[ 2 ] ), 2847 bottom: values[ 3 ] === "auto" ? outerHeight : parseFloat( values[ 3 ] ), 2848 left: parseFloat( values[ 4 ] ) || 0 2849 }; 2850} 2851 2852$.fx.step.clip = function( fx ) { 2853 if ( !fx.clipInit ) { 2854 fx.start = $( fx.elem ).cssClip(); 2855 if ( typeof fx.end === "string" ) { 2856 fx.end = parseClip( fx.end, fx.elem ); 2857 } 2858 fx.clipInit = true; 2859 } 2860 2861 $( fx.elem ).cssClip( { 2862 top: fx.pos * ( fx.end.top - fx.start.top ) + fx.start.top, 2863 right: fx.pos * ( fx.end.right - fx.start.right ) + fx.start.right, 2864 bottom: fx.pos * ( fx.end.bottom - fx.start.bottom ) + fx.start.bottom, 2865 left: fx.pos * ( fx.end.left - fx.start.left ) + fx.start.left 2866 } ); 2867}; 2868 2869} )(); 2870 2871/******************************************************************************/ 2872/*********************************** EASING ***********************************/ 2873/******************************************************************************/ 2874 2875( function() { 2876 2877// Based on easing equations from Robert Penner (http://www.robertpenner.com/easing) 2878 2879var baseEasings = {}; 2880 2881$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) { 2882 baseEasings[ name ] = function( p ) { 2883 return Math.pow( p, i + 2 ); 2884 }; 2885} ); 2886 2887$.extend( baseEasings, { 2888 Sine: function( p ) { 2889 return 1 - Math.cos( p * Math.PI / 2 ); 2890 }, 2891 Circ: function( p ) { 2892 return 1 - Math.sqrt( 1 - p * p ); 2893 }, 2894 Elastic: function( p ) { 2895 return p === 0 || p === 1 ? p : 2896 -Math.pow( 2, 8 * ( p - 1 ) ) * Math.sin( ( ( p - 1 ) * 80 - 7.5 ) * Math.PI / 15 ); 2897 }, 2898 Back: function( p ) { 2899 return p * p * ( 3 * p - 2 ); 2900 }, 2901 Bounce: function( p ) { 2902 var pow2, 2903 bounce = 4; 2904 2905 while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {} 2906 return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 ); 2907 } 2908} ); 2909 2910$.each( baseEasings, function( name, easeIn ) { 2911 $.easing[ "easeIn" + name ] = easeIn; 2912 $.easing[ "easeOut" + name ] = function( p ) { 2913 return 1 - easeIn( 1 - p ); 2914 }; 2915 $.easing[ "easeInOut" + name ] = function( p ) { 2916 return p < 0.5 ? 2917 easeIn( p * 2 ) / 2 : 2918 1 - easeIn( p * -2 + 2 ) / 2; 2919 }; 2920} ); 2921 2922} )(); 2923 2924var effect = $.effects; 2925 2926 2927/*! 2928 * jQuery UI Effects Blind 1.12.1 2929 * http://jqueryui.com 2930 * 2931 * Copyright jQuery Foundation and other contributors 2932 * Released under the MIT license. 2933 * http://jquery.org/license 2934 */ 2935 2936//>>label: Blind Effect 2937//>>group: Effects 2938//>>description: Blinds the element. 2939//>>docs: http://api.jqueryui.com/blind-effect/ 2940//>>demos: http://jqueryui.com/effect/ 2941 2942 2943 2944var effectsEffectBlind = $.effects.define( "blind", "hide", function( options, done ) { 2945 var map = { 2946 up: [ "bottom", "top" ], 2947 vertical: [ "bottom", "top" ], 2948 down: [ "top", "bottom" ], 2949 left: [ "right", "left" ], 2950 horizontal: [ "right", "left" ], 2951 right: [ "left", "right" ] 2952 }, 2953 element = $( this ), 2954 direction = options.direction || "up", 2955 start = element.cssClip(), 2956 animate = { clip: $.extend( {}, start ) }, 2957 placeholder = $.effects.createPlaceholder( element ); 2958 2959 animate.clip[ map[ direction ][ 0 ] ] = animate.clip[ map[ direction ][ 1 ] ]; 2960 2961 if ( options.mode === "show" ) { 2962 element.cssClip( animate.clip ); 2963 if ( placeholder ) { 2964 placeholder.css( $.effects.clipToBox( animate ) ); 2965 } 2966 2967 animate.clip = start; 2968 } 2969 2970 if ( placeholder ) { 2971 placeholder.animate( $.effects.clipToBox( animate ), options.duration, options.easing ); 2972 } 2973 2974 element.animate( animate, { 2975 queue: false, 2976 duration: options.duration, 2977 easing: options.easing, 2978 complete: done 2979 } ); 2980} ); 2981 2982 2983/*! 2984 * jQuery UI Effects Bounce 1.12.1 2985 * http://jqueryui.com 2986 * 2987 * Copyright jQuery Foundation and other contributors 2988 * Released under the MIT license. 2989 * http://jquery.org/license 2990 */ 2991 2992//>>label: Bounce Effect 2993//>>group: Effects 2994//>>description: Bounces an element horizontally or vertically n times. 2995//>>docs: http://api.jqueryui.com/bounce-effect/ 2996//>>demos: http://jqueryui.com/effect/ 2997 2998 2999 3000var effectsEffectBounce = $.effects.define( "bounce", function( options, done ) { 3001 var upAnim, downAnim, refValue, 3002 element = $( this ), 3003 3004 // Defaults: 3005 mode = options.mode, 3006 hide = mode === "hide", 3007 show = mode === "show", 3008 direction = options.direction || "up", 3009 distance = options.distance, 3010 times = options.times || 5, 3011 3012 // Number of internal animations 3013 anims = times * 2 + ( show || hide ? 1 : 0 ), 3014 speed = options.duration / anims, 3015 easing = options.easing, 3016 3017 // Utility: 3018 ref = ( direction === "up" || direction === "down" ) ? "top" : "left", 3019 motion = ( direction === "up" || direction === "left" ), 3020 i = 0, 3021 3022 queuelen = element.queue().length; 3023 3024 $.effects.createPlaceholder( element ); 3025 3026 refValue = element.css( ref ); 3027 3028 // Default distance for the BIGGEST bounce is the outer Distance / 3 3029 if ( !distance ) { 3030 distance = element[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3; 3031 } 3032 3033 if ( show ) { 3034 downAnim = { opacity: 1 }; 3035 downAnim[ ref ] = refValue; 3036 3037 // If we are showing, force opacity 0 and set the initial position 3038 // then do the "first" animation 3039 element 3040 .css( "opacity", 0 ) 3041 .css( ref, motion ? -distance * 2 : distance * 2 ) 3042 .animate( downAnim, speed, easing ); 3043 } 3044 3045 // Start at the smallest distance if we are hiding 3046 if ( hide ) { 3047 distance = distance / Math.pow( 2, times - 1 ); 3048 } 3049 3050 downAnim = {}; 3051 downAnim[ ref ] = refValue; 3052 3053 // Bounces up/down/left/right then back to 0 -- times * 2 animations happen here 3054 for ( ; i < times; i++ ) { 3055 upAnim = {}; 3056 upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance; 3057 3058 element 3059 .animate( upAnim, speed, easing ) 3060 .animate( downAnim, speed, easing ); 3061 3062 distance = hide ? distance * 2 : distance / 2; 3063 } 3064 3065 // Last Bounce when Hiding 3066 if ( hide ) { 3067 upAnim = { opacity: 0 }; 3068 upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance; 3069 3070 element.animate( upAnim, speed, easing ); 3071 } 3072 3073 element.queue( done ); 3074 3075 $.effects.unshift( element, queuelen, anims + 1 ); 3076} ); 3077 3078 3079/*! 3080 * jQuery UI Effects Clip 1.12.1 3081 * http://jqueryui.com 3082 * 3083 * Copyright jQuery Foundation and other contributors 3084 * Released under the MIT license. 3085 * http://jquery.org/license 3086 */ 3087 3088//>>label: Clip Effect 3089//>>group: Effects 3090//>>description: Clips the element on and off like an old TV. 3091//>>docs: http://api.jqueryui.com/clip-effect/ 3092//>>demos: http://jqueryui.com/effect/ 3093 3094 3095 3096var effectsEffectClip = $.effects.define( "clip", "hide", function( options, done ) { 3097 var start, 3098 animate = {}, 3099 element = $( this ), 3100 direction = options.direction || "vertical", 3101 both = direction === "both", 3102 horizontal = both || direction === "horizontal", 3103 vertical = both || direction === "vertical"; 3104 3105 start = element.cssClip(); 3106 animate.clip = { 3107 top: vertical ? ( start.bottom - start.top ) / 2 : start.top, 3108 right: horizontal ? ( start.right - start.left ) / 2 : start.right, 3109 bottom: vertical ? ( start.bottom - start.top ) / 2 : start.bottom, 3110 left: horizontal ? ( start.right - start.left ) / 2 : start.left 3111 }; 3112 3113 $.effects.createPlaceholder( element ); 3114 3115 if ( options.mode === "show" ) { 3116 element.cssClip( animate.clip ); 3117 animate.clip = start; 3118 } 3119 3120 element.animate( animate, { 3121 queue: false, 3122 duration: options.duration, 3123 easing: options.easing, 3124 complete: done 3125 } ); 3126 3127} ); 3128 3129 3130/*! 3131 * jQuery UI Effects Drop 1.12.1 3132 * http://jqueryui.com 3133 * 3134 * Copyright jQuery Foundation and other contributors 3135 * Released under the MIT license. 3136 * http://jquery.org/license 3137 */ 3138 3139//>>label: Drop Effect 3140//>>group: Effects 3141//>>description: Moves an element in one direction and hides it at the same time. 3142//>>docs: http://api.jqueryui.com/drop-effect/ 3143//>>demos: http://jqueryui.com/effect/ 3144 3145 3146 3147var effectsEffectDrop = $.effects.define( "drop", "hide", function( options, done ) { 3148 3149 var distance, 3150 element = $( this ), 3151 mode = options.mode, 3152 show = mode === "show", 3153 direction = options.direction || "left", 3154 ref = ( direction === "up" || direction === "down" ) ? "top" : "left", 3155 motion = ( direction === "up" || direction === "left" ) ? "-=" : "+=", 3156 oppositeMotion = ( motion === "+=" ) ? "-=" : "+=", 3157 animation = { 3158 opacity: 0 3159 }; 3160 3161 $.effects.createPlaceholder( element ); 3162 3163 distance = options.distance || 3164 element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ) / 2; 3165 3166 animation[ ref ] = motion + distance; 3167 3168 if ( show ) { 3169 element.css( animation ); 3170 3171 animation[ ref ] = oppositeMotion + distance; 3172 animation.opacity = 1; 3173 } 3174 3175 // Animate 3176 element.animate( animation, { 3177 queue: false, 3178 duration: options.duration, 3179 easing: options.easing, 3180 complete: done 3181 } ); 3182} ); 3183 3184 3185/*! 3186 * jQuery UI Effects Explode 1.12.1 3187 * http://jqueryui.com 3188 * 3189 * Copyright jQuery Foundation and other contributors 3190 * Released under the MIT license. 3191 * http://jquery.org/license 3192 */ 3193 3194//>>label: Explode Effect 3195//>>group: Effects 3196// jscs:disable maximumLineLength 3197//>>description: Explodes an element in all directions into n pieces. Implodes an element to its original wholeness. 3198// jscs:enable maximumLineLength 3199//>>docs: http://api.jqueryui.com/explode-effect/ 3200//>>demos: http://jqueryui.com/effect/ 3201 3202 3203 3204var effectsEffectExplode = $.effects.define( "explode", "hide", function( options, done ) { 3205 3206 var i, j, left, top, mx, my, 3207 rows = options.pieces ? Math.round( Math.sqrt( options.pieces ) ) : 3, 3208 cells = rows, 3209 element = $( this ), 3210 mode = options.mode, 3211 show = mode === "show", 3212 3213 // Show and then visibility:hidden the element before calculating offset 3214 offset = element.show().css( "visibility", "hidden" ).offset(), 3215 3216 // Width and height of a piece 3217 width = Math.ceil( element.outerWidth() / cells ), 3218 height = Math.ceil( element.outerHeight() / rows ), 3219 pieces = []; 3220 3221 // Children animate complete: 3222 function childComplete() { 3223 pieces.push( this ); 3224 if ( pieces.length === rows * cells ) { 3225 animComplete(); 3226 } 3227 } 3228 3229 // Clone the element for each row and cell. 3230 for ( i = 0; i < rows; i++ ) { // ===> 3231 top = offset.top + i * height; 3232 my = i - ( rows - 1 ) / 2; 3233 3234 for ( j = 0; j < cells; j++ ) { // ||| 3235 left = offset.left + j * width; 3236 mx = j - ( cells - 1 ) / 2; 3237 3238 // Create a clone of the now hidden main element that will be absolute positioned 3239 // within a wrapper div off the -left and -top equal to size of our pieces 3240 element 3241 .clone() 3242 .appendTo( "body" ) 3243 .wrap( "<div></div>" ) 3244 .css( { 3245 position: "absolute", 3246 visibility: "visible", 3247 left: -j * width, 3248 top: -i * height 3249 } ) 3250 3251 // Select the wrapper - make it overflow: hidden and absolute positioned based on 3252 // where the original was located +left and +top equal to the size of pieces 3253 .parent() 3254 .addClass( "ui-effects-explode" ) 3255 .css( { 3256 position: "absolute", 3257 overflow: "hidden", 3258 width: width, 3259 height: height, 3260 left: left + ( show ? mx * width : 0 ), 3261 top: top + ( show ? my * height : 0 ), 3262 opacity: show ? 0 : 1 3263 } ) 3264 .animate( { 3265 left: left + ( show ? 0 : mx * width ), 3266 top: top + ( show ? 0 : my * height ), 3267 opacity: show ? 1 : 0 3268 }, options.duration || 500, options.easing, childComplete ); 3269 } 3270 } 3271 3272 function animComplete() { 3273 element.css( { 3274 visibility: "visible" 3275 } ); 3276 $( pieces ).remove(); 3277 done(); 3278 } 3279} ); 3280 3281 3282/*! 3283 * jQuery UI Effects Fade 1.12.1 3284 * http://jqueryui.com 3285 * 3286 * Copyright jQuery Foundation and other contributors 3287 * Released under the MIT license. 3288 * http://jquery.org/license 3289 */ 3290 3291//>>label: Fade Effect 3292//>>group: Effects 3293//>>description: Fades the element. 3294//>>docs: http://api.jqueryui.com/fade-effect/ 3295//>>demos: http://jqueryui.com/effect/ 3296 3297 3298 3299var effectsEffectFade = $.effects.define( "fade", "toggle", function( options, done ) { 3300 var show = options.mode === "show"; 3301 3302 $( this ) 3303 .css( "opacity", show ? 0 : 1 ) 3304 .animate( { 3305 opacity: show ? 1 : 0 3306 }, { 3307 queue: false, 3308 duration: options.duration, 3309 easing: options.easing, 3310 complete: done 3311 } ); 3312} ); 3313 3314 3315/*! 3316 * jQuery UI Effects Fold 1.12.1 3317 * http://jqueryui.com 3318 * 3319 * Copyright jQuery Foundation and other contributors 3320 * Released under the MIT license. 3321 * http://jquery.org/license 3322 */ 3323 3324//>>label: Fold Effect 3325//>>group: Effects 3326//>>description: Folds an element first horizontally and then vertically. 3327//>>docs: http://api.jqueryui.com/fold-effect/ 3328//>>demos: http://jqueryui.com/effect/ 3329 3330 3331 3332var effectsEffectFold = $.effects.define( "fold", "hide", function( options, done ) { 3333 3334 // Create element 3335 var element = $( this ), 3336 mode = options.mode, 3337 show = mode === "show", 3338 hide = mode === "hide", 3339 size = options.size || 15, 3340 percent = /([0-9]+)%/.exec( size ), 3341 horizFirst = !!options.horizFirst, 3342 ref = horizFirst ? [ "right", "bottom" ] : [ "bottom", "right" ], 3343 duration = options.duration / 2, 3344 3345 placeholder = $.effects.createPlaceholder( element ), 3346 3347 start = element.cssClip(), 3348 animation1 = { clip: $.extend( {}, start ) }, 3349 animation2 = { clip: $.extend( {}, start ) }, 3350 3351 distance = [ start[ ref[ 0 ] ], start[ ref[ 1 ] ] ], 3352 3353 queuelen = element.queue().length; 3354 3355 if ( percent ) { 3356 size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ]; 3357 } 3358 animation1.clip[ ref[ 0 ] ] = size; 3359 animation2.clip[ ref[ 0 ] ] = size; 3360 animation2.clip[ ref[ 1 ] ] = 0; 3361 3362 if ( show ) { 3363 element.cssClip( animation2.clip ); 3364 if ( placeholder ) { 3365 placeholder.css( $.effects.clipToBox( animation2 ) ); 3366 } 3367 3368 animation2.clip = start; 3369 } 3370 3371 // Animate 3372 element 3373 .queue( function( next ) { 3374 if ( placeholder ) { 3375 placeholder 3376 .animate( $.effects.clipToBox( animation1 ), duration, options.easing ) 3377 .animate( $.effects.clipToBox( animation2 ), duration, options.easing ); 3378 } 3379 3380 next(); 3381 } ) 3382 .animate( animation1, duration, options.easing ) 3383 .animate( animation2, duration, options.easing ) 3384 .queue( done ); 3385 3386 $.effects.unshift( element, queuelen, 4 ); 3387} ); 3388 3389 3390/*! 3391 * jQuery UI Effects Highlight 1.12.1 3392 * http://jqueryui.com 3393 * 3394 * Copyright jQuery Foundation and other contributors 3395 * Released under the MIT license. 3396 * http://jquery.org/license 3397 */ 3398 3399//>>label: Highlight Effect 3400//>>group: Effects 3401//>>description: Highlights the background of an element in a defined color for a custom duration. 3402//>>docs: http://api.jqueryui.com/highlight-effect/ 3403//>>demos: http://jqueryui.com/effect/ 3404 3405 3406 3407var effectsEffectHighlight = $.effects.define( "highlight", "show", function( options, done ) { 3408 var element = $( this ), 3409 animation = { 3410 backgroundColor: element.css( "backgroundColor" ) 3411 }; 3412 3413 if ( options.mode === "hide" ) { 3414 animation.opacity = 0; 3415 } 3416 3417 $.effects.saveStyle( element ); 3418 3419 element 3420 .css( { 3421 backgroundImage: "none", 3422 backgroundColor: options.color || "#ffff99" 3423 } ) 3424 .animate( animation, { 3425 queue: false, 3426 duration: options.duration, 3427 easing: options.easing, 3428 complete: done 3429 } ); 3430} ); 3431 3432 3433/*! 3434 * jQuery UI Effects Size 1.12.1 3435 * http://jqueryui.com 3436 * 3437 * Copyright jQuery Foundation and other contributors 3438 * Released under the MIT license. 3439 * http://jquery.org/license 3440 */ 3441 3442//>>label: Size Effect 3443//>>group: Effects 3444//>>description: Resize an element to a specified width and height. 3445//>>docs: http://api.jqueryui.com/size-effect/ 3446//>>demos: http://jqueryui.com/effect/ 3447 3448 3449 3450var effectsEffectSize = $.effects.define( "size", function( options, done ) { 3451 3452 // Create element 3453 var baseline, factor, temp, 3454 element = $( this ), 3455 3456 // Copy for children 3457 cProps = [ "fontSize" ], 3458 vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ], 3459 hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ], 3460 3461 // Set options 3462 mode = options.mode, 3463 restore = mode !== "effect", 3464 scale = options.scale || "both", 3465 origin = options.origin || [ "middle", "center" ], 3466 position = element.css( "position" ), 3467 pos = element.position(), 3468 original = $.effects.scaledDimensions( element ), 3469 from = options.from || original, 3470 to = options.to || $.effects.scaledDimensions( element, 0 ); 3471 3472 $.effects.createPlaceholder( element ); 3473 3474 if ( mode === "show" ) { 3475 temp = from; 3476 from = to; 3477 to = temp; 3478 } 3479 3480 // Set scaling factor 3481 factor = { 3482 from: { 3483 y: from.height / original.height, 3484 x: from.width / original.width 3485 }, 3486 to: { 3487 y: to.height / original.height, 3488 x: to.width / original.width 3489 } 3490 }; 3491 3492 // Scale the css box 3493 if ( scale === "box" || scale === "both" ) { 3494 3495 // Vertical props scaling 3496 if ( factor.from.y !== factor.to.y ) { 3497 from = $.effects.setTransition( element, vProps, factor.from.y, from ); 3498 to = $.effects.setTransition( element, vProps, factor.to.y, to ); 3499 } 3500 3501 // Horizontal props scaling 3502 if ( factor.from.x !== factor.to.x ) { 3503 from = $.effects.setTransition( element, hProps, factor.from.x, from ); 3504 to = $.effects.setTransition( element, hProps, factor.to.x, to ); 3505 } 3506 } 3507 3508 // Scale the content 3509 if ( scale === "content" || scale === "both" ) { 3510 3511 // Vertical props scaling 3512 if ( factor.from.y !== factor.to.y ) { 3513 from = $.effects.setTransition( element, cProps, factor.from.y, from ); 3514 to = $.effects.setTransition( element, cProps, factor.to.y, to ); 3515 } 3516 } 3517 3518 // Adjust the position properties based on the provided origin points 3519 if ( origin ) { 3520 baseline = $.effects.getBaseline( origin, original ); 3521 from.top = ( original.outerHeight - from.outerHeight ) * baseline.y + pos.top; 3522 from.left = ( original.outerWidth - from.outerWidth ) * baseline.x + pos.left; 3523 to.top = ( original.outerHeight - to.outerHeight ) * baseline.y + pos.top; 3524 to.left = ( original.outerWidth - to.outerWidth ) * baseline.x + pos.left; 3525 } 3526 element.css( from ); 3527 3528 // Animate the children if desired 3529 if ( scale === "content" || scale === "both" ) { 3530 3531 vProps = vProps.concat( [ "marginTop", "marginBottom" ] ).concat( cProps ); 3532 hProps = hProps.concat( [ "marginLeft", "marginRight" ] ); 3533 3534 // Only animate children with width attributes specified 3535 // TODO: is this right? should we include anything with css width specified as well 3536 element.find( "*[width]" ).each( function() { 3537 var child = $( this ), 3538 childOriginal = $.effects.scaledDimensions( child ), 3539 childFrom = { 3540 height: childOriginal.height * factor.from.y, 3541 width: childOriginal.width * factor.from.x, 3542 outerHeight: childOriginal.outerHeight * factor.from.y, 3543 outerWidth: childOriginal.outerWidth * factor.from.x 3544 }, 3545 childTo = { 3546 height: childOriginal.height * factor.to.y, 3547 width: childOriginal.width * factor.to.x, 3548 outerHeight: childOriginal.height * factor.to.y, 3549 outerWidth: childOriginal.width * factor.to.x 3550 }; 3551 3552 // Vertical props scaling 3553 if ( factor.from.y !== factor.to.y ) { 3554 childFrom = $.effects.setTransition( child, vProps, factor.from.y, childFrom ); 3555 childTo = $.effects.setTransition( child, vProps, factor.to.y, childTo ); 3556 } 3557 3558 // Horizontal props scaling 3559 if ( factor.from.x !== factor.to.x ) { 3560 childFrom = $.effects.setTransition( child, hProps, factor.from.x, childFrom ); 3561 childTo = $.effects.setTransition( child, hProps, factor.to.x, childTo ); 3562 } 3563 3564 if ( restore ) { 3565 $.effects.saveStyle( child ); 3566 } 3567 3568 // Animate children 3569 child.css( childFrom ); 3570 child.animate( childTo, options.duration, options.easing, function() { 3571 3572 // Restore children 3573 if ( restore ) { 3574 $.effects.restoreStyle( child ); 3575 } 3576 } ); 3577 } ); 3578 } 3579 3580 // Animate 3581 element.animate( to, { 3582 queue: false, 3583 duration: options.duration, 3584 easing: options.easing, 3585 complete: function() { 3586 3587 var offset = element.offset(); 3588 3589 if ( to.opacity === 0 ) { 3590 element.css( "opacity", from.opacity ); 3591 } 3592 3593 if ( !restore ) { 3594 element 3595 .css( "position", position === "static" ? "relative" : position ) 3596 .offset( offset ); 3597 3598 // Need to save style here so that automatic style restoration 3599 // doesn't restore to the original styles from before the animation. 3600 $.effects.saveStyle( element ); 3601 } 3602 3603 done(); 3604 } 3605 } ); 3606 3607} ); 3608 3609 3610/*! 3611 * jQuery UI Effects Scale 1.12.1 3612 * http://jqueryui.com 3613 * 3614 * Copyright jQuery Foundation and other contributors 3615 * Released under the MIT license. 3616 * http://jquery.org/license 3617 */ 3618 3619//>>label: Scale Effect 3620//>>group: Effects 3621//>>description: Grows or shrinks an element and its content. 3622//>>docs: http://api.jqueryui.com/scale-effect/ 3623//>>demos: http://jqueryui.com/effect/ 3624 3625 3626 3627var effectsEffectScale = $.effects.define( "scale", function( options, done ) { 3628 3629 // Create element 3630 var el = $( this ), 3631 mode = options.mode, 3632 percent = parseInt( options.percent, 10 ) || 3633 ( parseInt( options.percent, 10 ) === 0 ? 0 : ( mode !== "effect" ? 0 : 100 ) ), 3634 3635 newOptions = $.extend( true, { 3636 from: $.effects.scaledDimensions( el ), 3637 to: $.effects.scaledDimensions( el, percent, options.direction || "both" ), 3638 origin: options.origin || [ "middle", "center" ] 3639 }, options ); 3640 3641 // Fade option to support puff 3642 if ( options.fade ) { 3643 newOptions.from.opacity = 1; 3644 newOptions.to.opacity = 0; 3645 } 3646 3647 $.effects.effect.size.call( this, newOptions, done ); 3648} ); 3649 3650 3651/*! 3652 * jQuery UI Effects Puff 1.12.1 3653 * http://jqueryui.com 3654 * 3655 * Copyright jQuery Foundation and other contributors 3656 * Released under the MIT license. 3657 * http://jquery.org/license 3658 */ 3659 3660//>>label: Puff Effect 3661//>>group: Effects 3662//>>description: Creates a puff effect by scaling the element up and hiding it at the same time. 3663//>>docs: http://api.jqueryui.com/puff-effect/ 3664//>>demos: http://jqueryui.com/effect/ 3665 3666 3667 3668var effectsEffectPuff = $.effects.define( "puff", "hide", function( options, done ) { 3669 var newOptions = $.extend( true, {}, options, { 3670 fade: true, 3671 percent: parseInt( options.percent, 10 ) || 150 3672 } ); 3673 3674 $.effects.effect.scale.call( this, newOptions, done ); 3675} ); 3676 3677 3678/*! 3679 * jQuery UI Effects Pulsate 1.12.1 3680 * http://jqueryui.com 3681 * 3682 * Copyright jQuery Foundation and other contributors 3683 * Released under the MIT license. 3684 * http://jquery.org/license 3685 */ 3686 3687//>>label: Pulsate Effect 3688//>>group: Effects 3689//>>description: Pulsates an element n times by changing the opacity to zero and back. 3690//>>docs: http://api.jqueryui.com/pulsate-effect/ 3691//>>demos: http://jqueryui.com/effect/ 3692 3693 3694 3695var effectsEffectPulsate = $.effects.define( "pulsate", "show", function( options, done ) { 3696 var element = $( this ), 3697 mode = options.mode, 3698 show = mode === "show", 3699 hide = mode === "hide", 3700 showhide = show || hide, 3701 3702 // Showing or hiding leaves off the "last" animation 3703 anims = ( ( options.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ), 3704 duration = options.duration / anims, 3705 animateTo = 0, 3706 i = 1, 3707 queuelen = element.queue().length; 3708 3709 if ( show || !element.is( ":visible" ) ) { 3710 element.css( "opacity", 0 ).show(); 3711 animateTo = 1; 3712 } 3713 3714 // Anims - 1 opacity "toggles" 3715 for ( ; i < anims; i++ ) { 3716 element.animate( { opacity: animateTo }, duration, options.easing ); 3717 animateTo = 1 - animateTo; 3718 } 3719 3720 element.animate( { opacity: animateTo }, duration, options.easing ); 3721 3722 element.queue( done ); 3723 3724 $.effects.unshift( element, queuelen, anims + 1 ); 3725} ); 3726 3727 3728/*! 3729 * jQuery UI Effects Shake 1.12.1 3730 * http://jqueryui.com 3731 * 3732 * Copyright jQuery Foundation and other contributors 3733 * Released under the MIT license. 3734 * http://jquery.org/license 3735 */ 3736 3737//>>label: Shake Effect 3738//>>group: Effects 3739//>>description: Shakes an element horizontally or vertically n times. 3740//>>docs: http://api.jqueryui.com/shake-effect/ 3741//>>demos: http://jqueryui.com/effect/ 3742 3743 3744 3745var effectsEffectShake = $.effects.define( "shake", function( options, done ) { 3746 3747 var i = 1, 3748 element = $( this ), 3749 direction = options.direction || "left", 3750 distance = options.distance || 20, 3751 times = options.times || 3, 3752 anims = times * 2 + 1, 3753 speed = Math.round( options.duration / anims ), 3754 ref = ( direction === "up" || direction === "down" ) ? "top" : "left", 3755 positiveMotion = ( direction === "up" || direction === "left" ), 3756 animation = {}, 3757 animation1 = {}, 3758 animation2 = {}, 3759 3760 queuelen = element.queue().length; 3761 3762 $.effects.createPlaceholder( element ); 3763 3764 // Animation 3765 animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance; 3766 animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2; 3767 animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2; 3768 3769 // Animate 3770 element.animate( animation, speed, options.easing ); 3771 3772 // Shakes 3773 for ( ; i < times; i++ ) { 3774 element 3775 .animate( animation1, speed, options.easing ) 3776 .animate( animation2, speed, options.easing ); 3777 } 3778 3779 element 3780 .animate( animation1, speed, options.easing ) 3781 .animate( animation, speed / 2, options.easing ) 3782 .queue( done ); 3783 3784 $.effects.unshift( element, queuelen, anims + 1 ); 3785} ); 3786 3787 3788/*! 3789 * jQuery UI Effects Slide 1.12.1 3790 * http://jqueryui.com 3791 * 3792 * Copyright jQuery Foundation and other contributors 3793 * Released under the MIT license. 3794 * http://jquery.org/license 3795 */ 3796 3797//>>label: Slide Effect 3798//>>group: Effects 3799//>>description: Slides an element in and out of the viewport. 3800//>>docs: http://api.jqueryui.com/slide-effect/ 3801//>>demos: http://jqueryui.com/effect/ 3802 3803 3804 3805var effectsEffectSlide = $.effects.define( "slide", "show", function( options, done ) { 3806 var startClip, startRef, 3807 element = $( this ), 3808 map = { 3809 up: [ "bottom", "top" ], 3810 down: [ "top", "bottom" ], 3811 left: [ "right", "left" ], 3812 right: [ "left", "right" ] 3813 }, 3814 mode = options.mode, 3815 direction = options.direction || "left", 3816 ref = ( direction === "up" || direction === "down" ) ? "top" : "left", 3817 positiveMotion = ( direction === "up" || direction === "left" ), 3818 distance = options.distance || 3819 element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ), 3820 animation = {}; 3821 3822 $.effects.createPlaceholder( element ); 3823 3824 startClip = element.cssClip(); 3825 startRef = element.position()[ ref ]; 3826 3827 // Define hide animation 3828 animation[ ref ] = ( positiveMotion ? -1 : 1 ) * distance + startRef; 3829 animation.clip = element.cssClip(); 3830 animation.clip[ map[ direction ][ 1 ] ] = animation.clip[ map[ direction ][ 0 ] ]; 3831 3832 // Reverse the animation if we're showing 3833 if ( mode === "show" ) { 3834 element.cssClip( animation.clip ); 3835 element.css( ref, animation[ ref ] ); 3836 animation.clip = startClip; 3837 animation[ ref ] = startRef; 3838 } 3839 3840 // Actually animate 3841 element.animate( animation, { 3842 queue: false, 3843 duration: options.duration, 3844 easing: options.easing,
vendor: 4,900 bytes, lines 3845-4040
3845 complete: done 3846 } ); 3847} ); 3848 3849 3850/*! 3851 * jQuery UI Effects Transfer 1.12.1 3852 * http://jqueryui.com 3853 * 3854 * Copyright jQuery Foundation and other contributors 3855 * Released under the MIT license. 3856 * http://jquery.org/license 3857 */ 3858 3859//>>label: Transfer Effect 3860//>>group: Effects 3861//>>description: Displays a transfer effect from one element to another. 3862//>>docs: http://api.jqueryui.com/transfer-effect/ 3863//>>demos: http://jqueryui.com/effect/ 3864 3865 3866 3867var effect; 3868if ( $.uiBackCompat !== false ) { 3869 effect = $.effects.define( "transfer", function( options, done ) { 3870 $( this ).transfer( options, done ); 3871 } ); 3872} 3873var effectsEffectTransfer = effect; 3874 3875 3876/*! 3877 * jQuery UI Focusable 1.12.1 3878 * http://jqueryui.com 3879 * 3880 * Copyright jQuery Foundation and other contributors 3881 * Released under the MIT license. 3882 * http://jquery.org/license 3883 */ 3884 3885//>>label: :focusable Selector 3886//>>group: Core 3887//>>description: Selects elements which can be focused. 3888//>>docs: http://api.jqueryui.com/focusable-selector/ 3889 3890 3891 3892// Selectors 3893$.ui.focusable = function( element, hasTabindex ) { 3894 var map, mapName, img, focusableIfVisible, fieldset, 3895 nodeName = element.nodeName.toLowerCase(); 3896 3897 if ( "area" === nodeName ) { 3898 map = element.parentNode; 3899 mapName = map.name; 3900 if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { 3901 return false; 3902 } 3903 img = $( "img[usemap='#" + mapName + "']" ); 3904 return img.length > 0 && img.is( ":visible" ); 3905 } 3906 3907 if ( /^(input|select|textarea|button|object)$/.test( nodeName ) ) { 3908 focusableIfVisible = !element.disabled; 3909 3910 if ( focusableIfVisible ) { 3911 3912 // Form controls within a disabled fieldset are disabled. 3913 // However, controls within the fieldset's legend do not get disabled. 3914 // Since controls generally aren't placed inside legends, we skip 3915 // this portion of the check. 3916 fieldset = $( element ).closest( "fieldset" )[ 0 ]; 3917 if ( fieldset ) { 3918 focusableIfVisible = !fieldset.disabled; 3919 } 3920 } 3921 } else if ( "a" === nodeName ) { 3922 focusableIfVisible = element.href || hasTabindex; 3923 } else { 3924 focusableIfVisible = hasTabindex; 3925 } 3926 3927 return focusableIfVisible && $( element ).is( ":visible" ) && visible( $( element ) ); 3928}; 3929 3930// Support: IE 8 only 3931// IE 8 doesn't resolve inherit to visible/hidden for computed values 3932function visible( element ) { 3933 var visibility = element.css( "visibility" ); 3934 while ( visibility === "inherit" ) { 3935 element = element.parent(); 3936 visibility = element.css( "visibility" ); 3937 } 3938 return visibility !== "hidden"; 3939} 3940 3941$.extend( $.expr[ ":" ], { 3942 focusable: function( element ) { 3943 return $.ui.focusable( element, $.attr( element, "tabindex" ) != null ); 3944 } 3945} ); 3946 3947var focusable = $.ui.focusable; 3948 3949 3950 3951 3952// Support: IE8 Only 3953// IE8 does not support the form attribute and when it is supplied. It overwrites the form prop 3954// with a string, so we need to find the proper form. 3955var form = $.fn.form = function() { 3956 return typeof this[ 0 ].form === "string" ? this.closest( "form" ) : $( this[ 0 ].form ); 3957}; 3958 3959 3960/*! 3961 * jQuery UI Form Reset Mixin 1.12.1 3962 * http://jqueryui.com 3963 * 3964 * Copyright jQuery Foundation and other contributors 3965 * Released under the MIT license. 3966 * http://jquery.org/license 3967 */ 3968 3969//>>label: Form Reset Mixin 3970//>>group: Core 3971//>>description: Refresh input widgets when their form is reset 3972//>>docs: http://api.jqueryui.com/form-reset-mixin/ 3973 3974 3975 3976var formResetMixin = $.ui.formResetMixin = { 3977 _formResetHandler: function() { 3978 var form = $( this ); 3979 3980 // Wait for the form reset to actually happen before refreshing 3981 setTimeout( function() { 3982 var instances = form.data( "ui-form-reset-instances" ); 3983 $.each( instances, function() { 3984 this.refresh(); 3985 } ); 3986 } ); 3987 }, 3988 3989 _bindFormResetHandler: function() { 3990 this.form = this.element.form(); 3991 if ( !this.form.length ) { 3992 return; 3993 } 3994 3995 var instances = this.form.data( "ui-form-reset-instances" ) || []; 3996 if ( !instances.length ) { 3997 3998 // We don't use _on() here because we use a single event handler per form 3999 this.form.on( "reset.ui-form-reset", this._formResetHandler ); 4000 } 4001 instances.push( this ); 4002 this.form.data( "ui-form-reset-instances", instances ); 4003 }, 4004 4005 _unbindFormResetHandler: function() { 4006 if ( !this.form.length ) { 4007 return; 4008 } 4009 4010 var instances = this.form.data( "ui-form-reset-instances" ); 4011 instances.splice( $.inArray( this, instances ), 1 ); 4012 if ( instances.length ) { 4013 this.form.data( "ui-form-reset-instances", instances ); 4014 } else { 4015 this.form 4016 .removeData( "ui-form-reset-instances" ) 4017 .off( "reset.ui-form-reset" ); 4018 } 4019 } 4020}; 4021 4022 4023/*! 4024 * jQuery UI Support for jQuery core 1.7.x 1.12.1 4025 * http://jqueryui.com 4026 * 4027 * Copyright jQuery Foundation and other contributors 4028 * Released under the MIT license. 4029 * http://jquery.org/license 4030 * 4031 */ 4032 4033//>>label: jQuery 1.7 Support 4034//>>group: Core 4035//>>description: Support version 1.7.x of jQuery core 4036 4037 4038 4039// Support: jQuery 1.7 only 4040// Not a great way to check versions, but since we only support
40401.7+ and only 4041// need to detect <1.8, this is a simple check that should suffice. Checking 4042// for "1.7." would be a bit safer, but the version string is 1.7, not 1.7.0 4043// and we'll never reach 1.70.0 (if we do, we certainly won't be supporting 4044// 1.7 anymore). See #11197 for why we're not using feature detection. 4045if ( $.fn.jquery.substring( 0, 3 ) === "1.7" ) { 4046 4047 // Setters for .innerWidth(), .innerHeight(), .outerWidth(), .outerHeight() 4048 // Unlike jQuery Core 1.8+, these only support numeric values to set the 4049 // dimensions in pixels 4050 $.each( [ "Width", "Height" ], function( i, name ) { 4051 var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], 4052 type = name.toLowerCase(), 4053 orig = { 4054 innerWidth: $.fn.innerWidth, 4055 innerHeight: $.fn.innerHeight, 4056 outerWidth: $.fn.outerWidth, 4057 outerHeight: $.fn.outerHeight 4058 }; 4059 4060 function reduce( elem, size, border, margin ) { 4061 $.each( side, function() { 4062 size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; 4063 if ( border ) { 4064 size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; 4065 } 4066 if ( margin ) { 4067 size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; 4068 } 4069 } ); 4070 return size; 4071 } 4072 4073 $.fn[ "inner" + name ] = function( size ) { 4074 if ( size === undefined ) { 4075 return orig[ "inner" + name ].call( this ); 4076 } 4077 4078 return this.each( function() { 4079 $( this ).css( type, reduce( this, size ) + "px" ); 4080 } ); 4081 }; 4082 4083 $.fn[ "outer" + name ] = function( size, margin ) { 4084 if ( typeof size !== "number" ) { 4085 return orig[ "outer" + name ].call( this, size ); 4086 } 4087 4088 return this.each( function() { 4089 $( this ).css( type, reduce( this, size, true, margin ) + "px" ); 4090 } ); 4091 }; 4092 } ); 4093 4094 $.fn.addBack = function( selector ) { 4095 return this.add( selector == null ? 4096 this.prevObject : this.prevObject.filter( selector ) 4097 ); 4098 }; 4099} 4100 4101; 4102/*! 4103 * jQuery UI Keycode 1.12.1 4104 * http://jqueryui.com 4105 * 4106 * Copyright jQuery Foundation and other contributors 4107 * Released under the MIT license. 4108 * http://jquery.org/license 4109 */ 4110 4111//>>label: Keycode 4112//>>group: Core 4113//>>description: Provide keycodes as keynames 4114//>>docs: http://api.jqueryui.com/jQuery.ui.keyCode/ 4115 4116 4117var keycode = $.ui.keyCode = { 4118 BACKSPACE: 8, 4119 COMMA: 188, 4120 DELETE: 46, 4121 DOWN: 40, 4122 END: 35, 4123 ENTER: 13, 4124 ESCAPE: 27, 4125 HOME: 36, 4126 LEFT: 37, 4127 PAGE_DOWN: 34, 4128 PAGE_UP: 33, 4129 PERIOD: 190, 4130 RIGHT: 39, 4131 SPACE: 32, 4132 TAB: 9, 4133 UP: 38 4134}; 4135 4136 4137 4138 4139// Internal use only 4140var escapeSelector = $.ui.escapeSelector = ( function() { 4141 var selectorEscape = /([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g; 4142 return function( selector ) { 4143 return selector.replace( selectorEscape, "\\$1" ); 4144 }; 4145} )(); 4146 4147 4148/*! 4149 * jQuery UI Labels 1.12.1 4150 * http://jqueryui.com 4151 * 4152 * Copyright jQuery Foundation and other contributors 4153 * Released under the MIT license. 4154 * http://jquery.org/license 4155 */ 4156 4157//>>label: labels 4158//>>group: Core 4159//>>description: Find all the labels associated with a given input 4160//>>docs: http://api.jqueryui.com/labels/ 4161 4162 4163 4164var labels = $.fn.labels = function() { 4165 var ancestor, selector, id, labels, ancestors; 4166 4167 // Check control.labels first 4168 if ( this[ 0 ].labels && this[ 0 ].labels.length ) { 4169 return this.pushStack( this[ 0 ].labels ); 4170 } 4171 4172 // Support: IE <= 11, FF <= 37, Android <= 2.3 only 4173 // Above browsers do not support control.labels. Everything below is to support them 4174 // as well as document fragments. control.labels does not work on document fragments 4175 labels = this.eq( 0 ).parents( "label" ); 4176 4177 // Look for the label based on the id 4178 id = this.attr( "id" ); 4179 if ( id ) { 4180 4181 // We don't search against the document in case the element 4182 // is disconnected from the DOM 4183 ancestor = this.eq( 0 ).parents().last(); 4184 4185 // Get a full set of top level ancestors 4186 ancestors = ancestor.add( ancestor.length ? ancestor.siblings() : this.siblings() ); 4187 4188 // Create a selector for the label based on the id 4189 selector = "label[for='" + $.ui.escapeSelector( id ) + "']"; 4190 4191 labels = labels.add( ancestors.find( selector ).addBack( selector ) ); 4192 4193 } 4194 4195 // Return whatever we have found for labels 4196 return this.pushStack( labels ); 4197}; 4198 4199 4200/*! 4201 * jQuery UI Scroll Parent 1.12.1 4202 * http://jqueryui.com 4203 * 4204 * Copyright jQuery Foundation and other contributors 4205 * Released under the MIT license. 4206 * http://jquery.org/license 4207 */ 4208 4209//>>label: scrollParent 4210//>>group: Core 4211//>>description: Get the closest ancestor element that is scrollable. 4212//>>docs: http://api.jqueryui.com/scrollParent/ 4213 4214 4215 4216var scrollParent = $.fn.scrollParent = function( includeHidden ) { 4217 var position = this.css( "position" ), 4218 excludeStaticParent = position === "absolute", 4219 overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/, 4220 scrollParent = this.parents().filter( function() { 4221 var parent = $( this ); 4222 if ( excludeStaticParent && parent.css( "position" ) === "static" ) { 4223 return false;
vendor: 5,582 bytes, lines 4224-4467
4224 } 4225 return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + 4226 parent.css( "overflow-x" ) ); 4227 } ).eq( 0 ); 4228 4229 return position === "fixed" || !scrollParent.length ? 4230 $( this[ 0 ].ownerDocument || document ) : 4231 scrollParent; 4232}; 4233 4234 4235/*! 4236 * jQuery UI Tabbable 1.12.1 4237 * http://jqueryui.com 4238 * 4239 * Copyright jQuery Foundation and other contributors 4240 * Released under the MIT license. 4241 * http://jquery.org/license 4242 */ 4243 4244//>>label: :tabbable Selector 4245//>>group: Core 4246//>>description: Selects elements which can be tabbed to. 4247//>>docs: http://api.jqueryui.com/tabbable-selector/ 4248 4249 4250 4251var tabbable = $.extend( $.expr[ ":" ], { 4252 tabbable: function( element ) { 4253 var tabIndex = $.attr( element, "tabindex" ), 4254 hasTabindex = tabIndex != null; 4255 return ( !hasTabindex || tabIndex >= 0 ) && $.ui.focusable( element, hasTabindex ); 4256 } 4257} ); 4258 4259 4260/*! 4261 * jQuery UI Unique ID 1.12.1 4262 * http://jqueryui.com 4263 * 4264 * Copyright jQuery Foundation and other contributors 4265 * Released under the MIT license. 4266 * http://jquery.org/license 4267 */ 4268 4269//>>label: uniqueId 4270//>>group: Core 4271//>>description: Functions to generate and remove uniqueId's 4272//>>docs: http://api.jqueryui.com/uniqueId/ 4273 4274 4275 4276var uniqueId = $.fn.extend( { 4277 uniqueId: ( function() { 4278 var uuid = 0; 4279 4280 return function() { 4281 return this.each( function() { 4282 if ( !this.id ) { 4283 this.id = "ui-id-" + ( ++uuid ); 4284 } 4285 } ); 4286 }; 4287 } )(), 4288 4289 removeUniqueId: function() { 4290 return this.each( function() { 4291 if ( /^ui-id-\d+$/.test( this.id ) ) { 4292 $( this ).removeAttr( "id" ); 4293 } 4294 } ); 4295 } 4296} ); 4297 4298 4299/*! 4300 * jQuery UI Accordion 1.12.1 4301 * http://jqueryui.com 4302 * 4303 * Copyright jQuery Foundation and other contributors 4304 * Released under the MIT license. 4305 * http://jquery.org/license 4306 */ 4307 4308//>>label: Accordion 4309//>>group: Widgets 4310// jscs:disable maximumLineLength 4311//>>description: Displays collapsible content panels for presenting information in a limited amount of space. 4312// jscs:enable maximumLineLength 4313//>>docs: http://api.jqueryui.com/accordion/ 4314//>>demos: http://jqueryui.com/accordion/ 4315//>>css.structure: ../../themes/base/core.css 4316//>>css.structure: ../../themes/base/accordion.css 4317//>>css.theme: ../../themes/base/theme.css 4318 4319 4320 4321var widgetsAccordion = $.widget( "ui.accordion", { 4322 version: "1.12.1", 4323 options: { 4324 active: 0, 4325 animate: {}, 4326 classes: { 4327 "ui-accordion-header": "ui-corner-top", 4328 "ui-accordion-header-collapsed": "ui-corner-all", 4329 "ui-accordion-content": "ui-corner-bottom" 4330 }, 4331 collapsible: false, 4332 event: "click", 4333 header: "> li > :first-child, > :not(li):even", 4334 heightStyle: "auto", 4335 icons: { 4336 activeHeader: "ui-icon-triangle-1-s", 4337 header: "ui-icon-triangle-1-e" 4338 }, 4339 4340 // Callbacks 4341 activate: null, 4342 beforeActivate: null 4343 }, 4344 4345 hideProps: { 4346 borderTopWidth: "hide", 4347 borderBottomWidth: "hide", 4348 paddingTop: "hide", 4349 paddingBottom: "hide", 4350 height: "hide" 4351 }, 4352 4353 showProps: { 4354 borderTopWidth: "show", 4355 borderBottomWidth: "show", 4356 paddingTop: "show", 4357 paddingBottom: "show", 4358 height: "show" 4359 }, 4360 4361 _create: function() { 4362 var options = this.options; 4363 4364 this.prevShow = this.prevHide = $(); 4365 this._addClass( "ui-accordion", "ui-widget ui-helper-reset" ); 4366 this.element.attr( "role", "tablist" ); 4367 4368 // Don't allow collapsible: false and active: false / null 4369 if ( !options.collapsible && ( options.active === false || options.active == null ) ) { 4370 options.active = 0; 4371 } 4372 4373 this._processPanels(); 4374 4375 // handle negative values 4376 if ( options.active < 0 ) { 4377 options.active += this.headers.length; 4378 } 4379 this._refresh(); 4380 }, 4381 4382 _getCreateEventData: function() { 4383 return { 4384 header: this.active, 4385 panel: !this.active.length ? $() : this.active.next() 4386 }; 4387 }, 4388 4389 _createIcons: function() { 4390 var icon, children, 4391 icons = this.options.icons; 4392 4393 if ( icons ) { 4394 icon = $( "<span>" ); 4395 this._addClass( icon, "ui-accordion-header-icon", "ui-icon " + icons.header ); 4396 icon.prependTo( this.headers ); 4397 children = this.active.children( ".ui-accordion-header-icon" ); 4398 this._removeClass( children, icons.header ) 4399 ._addClass( children, null, icons.activeHeader ) 4400 ._addClass( this.headers, "ui-accordion-icons" ); 4401 } 4402 }, 4403 4404 _destroyIcons: function() { 4405 this._removeClass( this.headers, "ui-accordion-icons" ); 4406 this.headers.children( ".ui-accordion-header-icon" ).remove(); 4407 }, 4408 4409 _destroy: function() { 4410 var contents; 4411 4412 // Clean up main element 4413 this.element.removeAttr( "role" ); 4414 4415 // Clean up headers 4416 this.headers 4417 .removeAttr( "role aria-expanded aria-selected aria-controls tabIndex" ) 4418 .removeUniqueId(); 4419 4420 this._destroyIcons(); 4421 4422 // Clean up content panels 4423 contents = this.headers.next() 4424 .css( "display", "" ) 4425 .removeAttr( "role aria-hidden aria-labelledby" ) 4426 .removeUniqueId(); 4427 4428 if ( this.options.heightStyle !== "content" ) { 4429 contents.css( "height", "" ); 4430 } 4431 }, 4432 4433 _setOption: function( key, value ) { 4434 if ( key === "active" ) { 4435 4436 // _activate() will handle invalid values and update this.options 4437 this._activate( value ); 4438 return; 4439 } 4440 4441 if ( key === "event" ) { 4442 if ( this.options.event ) { 4443 this._off( this.headers, this.options.event ); 4444 } 4445 this._setupEvents( value ); 4446 } 4447 4448 this._super( key, value ); 4449 4450 // Setting collapsible: false while collapsed; open first panel 4451 if ( key === "collapsible" && !value && this.options.active === false ) { 4452 this._activate( 0 ); 4453 } 4454 4455 if ( key === "icons" ) { 4456 this._destroyIcons(); 4457 if ( value ) { 4458 this._createIcons(); 4459 } 4460 } 4461 }, 4462 4463 _setOptionDisabled: function( value ) { 4464 this._super( value ); 4465 4466 this.element.attr( "aria-disabled", value ); 4467
vendor: 13,346 bytes, lines 4468-4973
4468 // Support: IE8 Only 4469 // #5332 / #6059 - opacity doesn't cascade to positioned elements in IE 4470 // so we need to add the disabled class to the headers and panels 4471 this._toggleClass( null, "ui-state-disabled", !!value ); 4472 this._toggleClass( this.headers.add( this.headers.next() ), null, "ui-state-disabled", 4473 !!value ); 4474 }, 4475 4476 _keydown: function( event ) { 4477 if ( event.altKey || event.ctrlKey ) { 4478 return; 4479 } 4480 4481 var keyCode = $.ui.keyCode, 4482 length = this.headers.length, 4483 currentIndex = this.headers.index( event.target ), 4484 toFocus = false; 4485 4486 switch ( event.keyCode ) { 4487 case keyCode.RIGHT: 4488 case keyCode.DOWN: 4489 toFocus = this.headers[ ( currentIndex + 1 ) % length ]; 4490 break; 4491 case keyCode.LEFT: 4492 case keyCode.UP: 4493 toFocus = this.headers[ ( currentIndex - 1 + length ) % length ]; 4494 break; 4495 case keyCode.SPACE: 4496 case keyCode.ENTER: 4497 this._eventHandler( event ); 4498 break; 4499 case keyCode.HOME: 4500 toFocus = this.headers[ 0 ]; 4501 break; 4502 case keyCode.END: 4503 toFocus = this.headers[ length - 1 ]; 4504 break; 4505 } 4506 4507 if ( toFocus ) { 4508 $( event.target ).attr( "tabIndex", -1 ); 4509 $( toFocus ).attr( "tabIndex", 0 ); 4510 $( toFocus ).trigger( "focus" ); 4511 event.preventDefault(); 4512 } 4513 }, 4514 4515 _panelKeyDown: function( event ) { 4516 if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) { 4517 $( event.currentTarget ).prev().trigger( "focus" ); 4518 } 4519 }, 4520 4521 refresh: function() { 4522 var options = this.options; 4523 this._processPanels(); 4524 4525 // Was collapsed or no panel 4526 if ( ( options.active === false && options.collapsible === true ) || 4527 !this.headers.length ) { 4528 options.active = false; 4529 this.active = $(); 4530 4531 // active false only when collapsible is true 4532 } else if ( options.active === false ) { 4533 this._activate( 0 ); 4534 4535 // was active, but active panel is gone 4536 } else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) { 4537 4538 // all remaining panel are disabled 4539 if ( this.headers.length === this.headers.find( ".ui-state-disabled" ).length ) { 4540 options.active = false; 4541 this.active = $(); 4542 4543 // activate previous panel 4544 } else { 4545 this._activate( Math.max( 0, options.active - 1 ) ); 4546 } 4547 4548 // was active, active panel still exists 4549 } else { 4550 4551 // make sure active index is correct 4552 options.active = this.headers.index( this.active ); 4553 } 4554 4555 this._destroyIcons(); 4556 4557 this._refresh(); 4558 }, 4559 4560 _processPanels: function() { 4561 var prevHeaders = this.headers, 4562 prevPanels = this.panels; 4563 4564 this.headers = this.element.find( this.options.header ); 4565 this._addClass( this.headers, "ui-accordion-header ui-accordion-header-collapsed", 4566 "ui-state-default" ); 4567 4568 this.panels = this.headers.next().filter( ":not(.ui-accordion-content-active)" ).hide(); 4569 this._addClass( this.panels, "ui-accordion-content", "ui-helper-reset ui-widget-content" ); 4570 4571 // Avoid memory leaks (#10056) 4572 if ( prevPanels ) { 4573 this._off( prevHeaders.not( this.headers ) ); 4574 this._off( prevPanels.not( this.panels ) ); 4575 } 4576 }, 4577 4578 _refresh: function() { 4579 var maxHeight, 4580 options = this.options, 4581 heightStyle = options.heightStyle, 4582 parent = this.element.parent(); 4583 4584 this.active = this._findActive( options.active ); 4585 this._addClass( this.active, "ui-accordion-header-active", "ui-state-active" ) 4586 ._removeClass( this.active, "ui-accordion-header-collapsed" ); 4587 this._addClass( this.active.next(), "ui-accordion-content-active" ); 4588 this.active.next().show(); 4589 4590 this.headers 4591 .attr( "role", "tab" ) 4592 .each( function() { 4593 var header = $( this ), 4594 headerId = header.uniqueId().attr( "id" ), 4595 panel = header.next(), 4596 panelId = panel.uniqueId().attr( "id" ); 4597 header.attr( "aria-controls", panelId ); 4598 panel.attr( "aria-labelledby", headerId ); 4599 } ) 4600 .next() 4601 .attr( "role", "tabpanel" ); 4602 4603 this.headers 4604 .not( this.active ) 4605 .attr( { 4606 "aria-selected": "false", 4607 "aria-expanded": "false", 4608 tabIndex: -1 4609 } ) 4610 .next() 4611 .attr( { 4612 "aria-hidden": "true" 4613 } ) 4614 .hide(); 4615 4616 // Make sure at least one header is in the tab order 4617 if ( !this.active.length ) { 4618 this.headers.eq( 0 ).attr( "tabIndex", 0 ); 4619 } else { 4620 this.active.attr( { 4621 "aria-selected": "true", 4622 "aria-expanded": "true", 4623 tabIndex: 0 4624 } ) 4625 .next() 4626 .attr( { 4627 "aria-hidden": "false" 4628 } ); 4629 } 4630 4631 this._createIcons(); 4632 4633 this._setupEvents( options.event ); 4634 4635 if ( heightStyle === "fill" ) { 4636 maxHeight = parent.height(); 4637 this.element.siblings( ":visible" ).each( function() { 4638 var elem = $( this ), 4639 position = elem.css( "position" ); 4640 4641 if ( position === "absolute" || position === "fixed" ) { 4642 return; 4643 } 4644 maxHeight -= elem.outerHeight( true ); 4645 } ); 4646 4647 this.headers.each( function() { 4648 maxHeight -= $( this ).outerHeight( true ); 4649 } ); 4650 4651 this.headers.next() 4652 .each( function() { 4653 $( this ).height( Math.max( 0, maxHeight - 4654 $( this ).innerHeight() + $( this ).height() ) ); 4655 } ) 4656 .css( "overflow", "auto" ); 4657 } else if ( heightStyle === "auto" ) { 4658 maxHeight = 0; 4659 this.headers.next() 4660 .each( function() { 4661 var isVisible = $( this ).is( ":visible" ); 4662 if ( !isVisible ) { 4663 $( this ).show(); 4664 } 4665 maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() ); 4666 if ( !isVisible ) { 4667 $( this ).hide(); 4668 } 4669 } ) 4670 .height( maxHeight ); 4671 } 4672 }, 4673 4674 _activate: function( index ) { 4675 var active = this._findActive( index )[ 0 ]; 4676 4677 // Trying to activate the already active panel 4678 if ( active === this.active[ 0 ] ) { 4679 return; 4680 } 4681 4682 // Trying to collapse, simulate a click on the currently active header 4683 active = active || this.active[ 0 ]; 4684 4685 this._eventHandler( { 4686 target: active, 4687 currentTarget: active, 4688 preventDefault: $.noop 4689 } ); 4690 }, 4691 4692 _findActive: function( selector ) { 4693 return typeof selector === "number" ? this.headers.eq( selector ) : $(); 4694 }, 4695 4696 _setupEvents: function( event ) { 4697 var events = { 4698 keydown: "_keydown" 4699 }; 4700 if ( event ) { 4701 $.each( event.split( " " ), function( index, eventName ) { 4702 events[ eventName ] = "_eventHandler"; 4703 } ); 4704 } 4705 4706 this._off( this.headers.add( this.headers.next() ) ); 4707 this._on( this.headers, events ); 4708 this._on( this.headers.next(), { keydown: "_panelKeyDown" } ); 4709 this._hoverable( this.headers ); 4710 this._focusable( this.headers ); 4711 }, 4712 4713 _eventHandler: function( event ) { 4714 var activeChildren, clickedChildren, 4715 options = this.options, 4716 active = this.active, 4717 clicked = $( event.currentTarget ), 4718 clickedIsActive = clicked[ 0 ] === active[ 0 ], 4719 collapsing = clickedIsActive && options.collapsible, 4720 toShow = collapsing ? $() : clicked.next(), 4721 toHide = active.next(), 4722 eventData = { 4723 oldHeader: active, 4724 oldPanel: toHide, 4725 newHeader: collapsing ? $() : clicked, 4726 newPanel: toShow 4727 }; 4728 4729 event.preventDefault(); 4730 4731 if ( 4732 4733 // click on active header, but not collapsible 4734 ( clickedIsActive && !options.collapsible ) || 4735 4736 // allow canceling activation 4737 ( this._trigger( "beforeActivate", event, eventData ) === false ) ) { 4738 return; 4739 } 4740 4741 options.active = collapsing ? false : this.headers.index( clicked ); 4742 4743 // When the call to ._toggle() comes after the class changes 4744 // it causes a very odd bug in IE 8 (see #6720) 4745 this.active = clickedIsActive ? $() : clicked; 4746 this._toggle( eventData ); 4747 4748 // Switch classes 4749 // corner classes on the previously active header stay after the animation 4750 this._removeClass( active, "ui-accordion-header-active", "ui-state-active" ); 4751 if ( options.icons ) { 4752 activeChildren = active.children( ".ui-accordion-header-icon" ); 4753 this._removeClass( activeChildren, null, options.icons.activeHeader ) 4754 ._addClass( activeChildren, null, options.icons.header ); 4755 } 4756 4757 if ( !clickedIsActive ) { 4758 this._removeClass( clicked, "ui-accordion-header-collapsed" ) 4759 ._addClass( clicked, "ui-accordion-header-active", "ui-state-active" ); 4760 if ( options.icons ) { 4761 clickedChildren = clicked.children( ".ui-accordion-header-icon" ); 4762 this._removeClass( clickedChildren, null, options.icons.header ) 4763 ._addClass( clickedChildren, null, options.icons.activeHeader ); 4764 } 4765 4766 this._addClass( clicked.next(), "ui-accordion-content-active" ); 4767 } 4768 }, 4769 4770 _toggle: function( data ) { 4771 var toShow = data.newPanel, 4772 toHide = this.prevShow.length ? this.prevShow : data.oldPanel; 4773 4774 // Handle activating a panel during the animation for another activation 4775 this.prevShow.add( this.prevHide ).stop( true, true ); 4776 this.prevShow = toShow; 4777 this.prevHide = toHide; 4778 4779 if ( this.options.animate ) { 4780 this._animate( toShow, toHide, data ); 4781 } else { 4782 toHide.hide(); 4783 toShow.show(); 4784 this._toggleComplete( data ); 4785 } 4786 4787 toHide.attr( { 4788 "aria-hidden": "true" 4789 } ); 4790 toHide.prev().attr( { 4791 "aria-selected": "false", 4792 "aria-expanded": "false" 4793 } ); 4794 4795 // if we're switching panels, remove the old header from the tab order 4796 // if we're opening from collapsed state, remove the previous header from the tab order 4797 // if we're collapsing, then keep the collapsing header in the tab order 4798 if ( toShow.length && toHide.length ) { 4799 toHide.prev().attr( { 4800 "tabIndex": -1, 4801 "aria-expanded": "false" 4802 } ); 4803 } else if ( toShow.length ) { 4804 this.headers.filter( function() { 4805 return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0; 4806 } ) 4807 .attr( "tabIndex", -1 ); 4808 } 4809 4810 toShow 4811 .attr( "aria-hidden", "false" ) 4812 .prev() 4813 .attr( { 4814 "aria-selected": "true", 4815 "aria-expanded": "true", 4816 tabIndex: 0 4817 } ); 4818 }, 4819 4820 _animate: function( toShow, toHide, data ) { 4821 var total, easing, duration, 4822 that = this, 4823 adjust = 0, 4824 boxSizing = toShow.css( "box-sizing" ), 4825 down = toShow.length && 4826 ( !toHide.length || ( toShow.index() < toHide.index() ) ), 4827 animate = this.options.animate || {}, 4828 options = down && animate.down || animate, 4829 complete = function() { 4830 that._toggleComplete( data ); 4831 }; 4832 4833 if ( typeof options === "number" ) { 4834 duration = options; 4835 } 4836 if ( typeof options === "string" ) { 4837 easing = options; 4838 } 4839 4840 // fall back from options to animation in case of partial down settings 4841 easing = easing || options.easing || animate.easing; 4842 duration = duration || options.duration || animate.duration; 4843 4844 if ( !toHide.length ) { 4845 return toShow.animate( this.showProps, duration, easing, complete ); 4846 } 4847 if ( !toShow.length ) { 4848 return toHide.animate( this.hideProps, duration, easing, complete ); 4849 } 4850 4851 total = toShow.show().outerHeight(); 4852 toHide.animate( this.hideProps, { 4853 duration: duration, 4854 easing: easing, 4855 step: function( now, fx ) { 4856 fx.now = Math.round( now ); 4857 } 4858 } ); 4859 toShow 4860 .hide() 4861 .animate( this.showProps, { 4862 duration: duration, 4863 easing: easing, 4864 complete: complete, 4865 step: function( now, fx ) { 4866 fx.now = Math.round( now ); 4867 if ( fx.prop !== "height" ) { 4868 if ( boxSizing === "content-box" ) { 4869 adjust += fx.now; 4870 } 4871 } else if ( that.options.heightStyle !== "content" ) { 4872 fx.now = Math.round( total - toHide.outerHeight() - adjust ); 4873 adjust = 0; 4874 } 4875 } 4876 } ); 4877 }, 4878 4879 _toggleComplete: function( data ) { 4880 var toHide = data.oldPanel, 4881 prev = toHide.prev(); 4882 4883 this._removeClass( toHide, "ui-accordion-content-active" ); 4884 this._removeClass( prev, "ui-accordion-header-active" ) 4885 ._addClass( prev, "ui-accordion-header-collapsed" ); 4886 4887 // Work around for rendering bug in IE (#5421) 4888 if ( toHide.length ) { 4889 toHide.parent()[ 0 ].className = toHide.parent()[ 0 ].className; 4890 } 4891 this._trigger( "activate", null, data ); 4892 } 4893} ); 4894 4895 4896 4897var safeActiveElement = $.ui.safeActiveElement = function( document ) { 4898 var activeElement; 4899 4900 // Support: IE 9 only 4901 // IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe> 4902 try { 4903 activeElement = document.activeElement; 4904 } catch ( error ) { 4905 activeElement = document.body; 4906 } 4907 4908 // Support: IE 9 - 11 only 4909 // IE may return null instead of an element 4910 // Interestingly, this only seems to occur when NOT in an iframe 4911 if ( !activeElement ) { 4912 activeElement = document.body; 4913 } 4914 4915 // Support: IE 11 only 4916 // IE11 returns a seemingly empty object in some cases when accessing 4917 // document.activeElement from an <iframe> 4918 if ( !activeElement.nodeName ) { 4919 activeElement = document.body; 4920 } 4921 4922 return activeElement; 4923}; 4924 4925 4926/*! 4927 * jQuery UI Menu 1.12.1 4928 * http://jqueryui.com 4929 * 4930 * Copyright jQuery Foundation and other contributors 4931 * Released under the MIT license. 4932 * http://jquery.org/license 4933 */ 4934 4935//>>label: Menu 4936//>>group: Widgets 4937//>>description: Creates nestable menus. 4938//>>docs: http://api.jqueryui.com/menu/ 4939//>>demos: http://jqueryui.com/menu/ 4940//>>css.structure: ../../themes/base/core.css 4941//>>css.structure: ../../themes/base/menu.css 4942//>>css.theme: ../../themes/base/theme.css 4943 4944 4945 4946var widgetsMenu = $.widget( "ui.menu", { 4947 version: "1.12.1", 4948 defaultElement: "<ul>", 4949 delay: 300, 4950 options: { 4951 icons: { 4952 submenu: "ui-icon-caret-1-e" 4953 }, 4954 items: "> *", 4955 menus: "ul", 4956 position: { 4957 my: "left top", 4958 at: "right top" 4959 }, 4960 role: "menu", 4961 4962 // Callbacks 4963 blur: null, 4964 focus: null, 4965 select: null 4966 }, 4967 4968 _create: function() { 4969 this.activeMenu = this.element; 4970 4971 // Flag used to prevent firing of the click handler 4972 // as the event bubbles up through nested menus 4973 this.mouseHandled = false;
4974 this.element 4975 .uniqueId() 4976 .attr( { 4977 role: this.options.role, 4978 tabIndex: 0 4979 } ); 4980 4981 this._addClass( "ui-menu", "ui-widget ui-widget-content" ); 4982 this._on( { 4983 4984 // Prevent focus from sticking to links inside menu after clicking 4985 // them (focus should always stay on UL during navigation). 4986 "mousedown .ui-menu-item": function( event ) { 4987 event.preventDefault(); 4988 }, 4989 "click .ui-menu-item": function( event ) { 4990 var target = $( event.target ); 4991 var active = $( $.ui.safeActiveElement( this.document[ 0 ] ) ); 4992 if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) { 4993 this.select( event ); 4994 4995 // Only set the mouseHandled flag if the event will bubble, see #9469. 4996 if ( !event.isPropagationStopped() ) { 4997 this.mouseHandled = true; 4998 } 4999 5000 // Open submenu on click 5001 if ( target.has( ".ui-menu" ).length ) { 5002 this.expand( event ); 5003 } else if ( !this.element.is( ":focus" ) && 5004 active.closest( ".ui-menu" ).length ) { 5005 5006 // Redirect focus to the menu 5007 this.element.trigger( "focus", [ true ] ); 5008 5009 // If the active item is on the top level, let it stay active. 5010 // Otherwise, blur the active item since it is no longer visible. 5011 if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) { 5012 clearTimeout( this.timer ); 5013 } 5014 } 5015 } 5016 }, 5017 "mouseenter .ui-menu-item": function( event ) { 5018 5019 // Ignore mouse events while typeahead is active, see #10458. 5020 // Prevents focusing the wrong item when typeahead causes a scroll while the mouse 5021 // is over an item in the menu 5022 if ( this.previousFilter ) { 5023 return; 5024 } 5025 5026 var actualTarget = $( event.target ).closest( ".ui-menu-item" ), 5027 target = $( event.currentTarget ); 5028 5029 // Ignore bubbled events on parent items, see #11641 5030 if ( actualTarget[ 0 ] !== target[ 0 ] ) { 5031 return; 5032 } 5033 5034 // Remove ui-state-active class from siblings of the newly focused menu item 5035 // to avoid a jump caused by adjacent elements both having a class with a border 5036 this._removeClass( target.siblings().children( ".ui-state-active" ), 5037 null, "ui-state-active" ); 5038 this.focus( event, target ); 5039 }, 5040 mouseleave: "collapseAll", 5041 "mouseleave .ui-menu": "collapseAll", 5042 focus: function( event, keepActiveItem ) { 5043 5044 // If there's already an active item, keep it active 5045 // If not, activate the first item 5046 var item = this.active || this.element.find( this.options.items ).eq( 0 ); 5047 5048 if ( !keepActiveItem ) { 5049 this.focus( event, item ); 5050 } 5051 }, 5052 blur: function( event ) { 5053 this._delay( function() { 5054 var notContained = !$.contains( 5055 this.element[ 0 ], 5056 $.ui.safeActiveElement( this.document[ 0 ] ) 5057 ); 5058 if ( notContained ) { 5059 this.collapseAll( event ); 5060 } 5061 } ); 5062 }, 5063 keydown: "_keydown" 5064 } ); 5065 5066 this.refresh(); 5067
5068 // Clicks outside of a menu collapse any open menus 5069 this._on( this.document, { 5070 click: function( event ) { 5071 if ( this._closeOnDocumentClick( event ) ) { 5072 this.collapseAll( event ); 5073 } 5074 5075 // Reset the mouseHandled flag 5076 this.mouseHandled = false; 5077 } 5078 }
vendor: 9,131 bytes, lines 5078-5412
5078 ); 5079 }, 5080 5081 _destroy: function() { 5082 var items = this.element.find( ".ui-menu-item" ) 5083 .removeAttr( "role aria-disabled" ), 5084 submenus = items.children( ".ui-menu-item-wrapper" ) 5085 .removeUniqueId() 5086 .removeAttr( "tabIndex role aria-haspopup" ); 5087 5088 // Destroy (sub)menus 5089 this.element 5090 .removeAttr( "aria-activedescendant" ) 5091 .find( ".ui-menu" ).addBack() 5092 .removeAttr( "role aria-labelledby aria-expanded aria-hidden aria-disabled " + 5093 "tabIndex" ) 5094 .removeUniqueId() 5095 .show(); 5096 5097 submenus.children().each( function() { 5098 var elem = $( this ); 5099 if ( elem.data( "ui-menu-submenu-caret" ) ) { 5100 elem.remove(); 5101 } 5102 } ); 5103 }, 5104 5105 _keydown: function( event ) { 5106 var match, prev, character, skip, 5107 preventDefault = true; 5108 5109 switch ( event.keyCode ) { 5110 case $.ui.keyCode.PAGE_UP: 5111 this.previousPage( event ); 5112 break; 5113 case $.ui.keyCode.PAGE_DOWN: 5114 this.nextPage( event ); 5115 break; 5116 case $.ui.keyCode.HOME: 5117 this._move( "first", "first", event ); 5118 break; 5119 case $.ui.keyCode.END: 5120 this._move( "last", "last", event ); 5121 break; 5122 case $.ui.keyCode.UP: 5123 this.previous( event ); 5124 break; 5125 case $.ui.keyCode.DOWN: 5126 this.next( event ); 5127 break; 5128 case $.ui.keyCode.LEFT: 5129 this.collapse( event ); 5130 break; 5131 case $.ui.keyCode.RIGHT: 5132 if ( this.active && !this.active.is( ".ui-state-disabled" ) ) { 5133 this.expand( event ); 5134 } 5135 break; 5136 case $.ui.keyCode.ENTER: 5137 case $.ui.keyCode.SPACE: 5138 this._activate( event ); 5139 break; 5140 case $.ui.keyCode.ESCAPE: 5141 this.collapse( event ); 5142 break; 5143 default: 5144 preventDefault = false; 5145 prev = this.previousFilter || ""; 5146 skip = false; 5147 5148 // Support number pad values 5149 character = event.keyCode >= 96 && event.keyCode <= 105 ? 5150 ( event.keyCode - 96 ).toString() : String.fromCharCode( event.keyCode ); 5151 5152 clearTimeout( this.filterTimer ); 5153 5154 if ( character === prev ) { 5155 skip = true; 5156 } else { 5157 character = prev + character; 5158 } 5159 5160 match = this._filterMenuItems( character ); 5161 match = skip && match.index( this.active.next() ) !== -1 ? 5162 this.active.nextAll( ".ui-menu-item" ) : 5163 match; 5164 5165 // If no matches on the current filter, reset to the last character pressed 5166 // to move down the menu to the first item that starts with that character 5167 if ( !match.length ) { 5168 character = String.fromCharCode( event.keyCode ); 5169 match = this._filterMenuItems( character ); 5170 } 5171 5172 if ( match.length ) { 5173 this.focus( event, match ); 5174 this.previousFilter = character; 5175 this.filterTimer = this._delay( function() { 5176 delete this.previousFilter; 5177 }, 1000 ); 5178 } else { 5179 delete this.previousFilter; 5180 } 5181 } 5182 5183 if ( preventDefault ) { 5184 event.preventDefault(); 5185 } 5186 }, 5187 5188 _activate: function( event ) { 5189 if ( this.active && !this.active.is( ".ui-state-disabled" ) ) { 5190 if ( this.active.children( "[aria-haspopup='true']" ).length ) { 5191 this.expand( event ); 5192 } else { 5193 this.select( event ); 5194 } 5195 } 5196 }, 5197 5198 refresh: function() { 5199 var menus, items, newSubmenus, newItems, newWrappers, 5200 that = this, 5201 icon = this.options.icons.submenu, 5202 submenus = this.element.find( this.options.menus ); 5203 5204 this._toggleClass( "ui-menu-icons", null, !!this.element.find( ".ui-icon" ).length ); 5205 5206 // Initialize nested menus 5207 newSubmenus = submenus.filter( ":not(.ui-menu)" ) 5208 .hide() 5209 .attr( { 5210 role: this.options.role, 5211 "aria-hidden": "true", 5212 "aria-expanded": "false" 5213 } ) 5214 .each( function() { 5215 var menu = $( this ), 5216 item = menu.prev(), 5217 submenuCaret = $( "<span>" ).data( "ui-menu-submenu-caret", true ); 5218 5219 that._addClass( submenuCaret, "ui-menu-icon", "ui-icon " + icon ); 5220 item 5221 .attr( "aria-haspopup", "true" ) 5222 .prepend( submenuCaret ); 5223 menu.attr( "aria-labelledby", item.attr( "id" ) ); 5224 } ); 5225 5226 this._addClass( newSubmenus, "ui-menu", "ui-widget ui-widget-content ui-front" ); 5227 5228 menus = submenus.add( this.element ); 5229 items = menus.find( this.options.items ); 5230 5231 // Initialize menu-items containing spaces and/or dashes only as dividers 5232 items.not( ".ui-menu-item" ).each( function() { 5233 var item = $( this ); 5234 if ( that._isDivider( item ) ) { 5235 that._addClass( item, "ui-menu-divider", "ui-widget-content" ); 5236 } 5237 } ); 5238 5239 // Don't refresh list items that are already adapted 5240 newItems = items.not( ".ui-menu-item, .ui-menu-divider" ); 5241 newWrappers = newItems.children() 5242 .not( ".ui-menu" ) 5243 .uniqueId() 5244 .attr( { 5245 tabIndex: -1, 5246 role: this._itemRole() 5247 } ); 5248 this._addClass( newItems, "ui-menu-item" ) 5249 ._addClass( newWrappers, "ui-menu-item-wrapper" ); 5250 5251 // Add aria-disabled attribute to any disabled menu item 5252 items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" ); 5253 5254 // If the active item has been removed, blur the menu 5255 if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) { 5256 this.blur(); 5257 } 5258 }, 5259 5260 _itemRole: function() { 5261 return { 5262 menu: "menuitem", 5263 listbox: "option" 5264 }[ this.options.role ]; 5265 }, 5266 5267 _setOption: function( key, value ) { 5268 if ( key === "icons" ) { 5269 var icons = this.element.find( ".ui-menu-icon" ); 5270 this._removeClass( icons, null, this.options.icons.submenu ) 5271 ._addClass( icons, null, value.submenu ); 5272 } 5273 this._super( key, value ); 5274 }, 5275 5276 _setOptionDisabled: function( value ) { 5277 this._super( value ); 5278 5279 this.element.attr( "aria-disabled", String( value ) ); 5280 this._toggleClass( null, "ui-state-disabled", !!value ); 5281 }, 5282 5283 focus: function( event, item ) { 5284 var nested, focused, activeParent; 5285 this.blur( event, event && event.type === "focus" ); 5286 5287 this._scrollIntoView( item ); 5288 5289 this.active = item.first(); 5290 5291 focused = this.active.children( ".ui-menu-item-wrapper" ); 5292 this._addClass( focused, null, "ui-state-active" ); 5293 5294 // Only update aria-activedescendant if there's a role 5295 // otherwise we assume focus is managed elsewhere 5296 if ( this.options.role ) { 5297 this.element.attr( "aria-activedescendant", focused.attr( "id" ) ); 5298 } 5299 5300 // Highlight active parent menu item, if any 5301 activeParent = this.active 5302 .parent() 5303 .closest( ".ui-menu-item" ) 5304 .children( ".ui-menu-item-wrapper" ); 5305 this._addClass( activeParent, null, "ui-state-active" ); 5306 5307 if ( event && event.type === "keydown" ) { 5308 this._close(); 5309 } else { 5310 this.timer = this._delay( function() { 5311 this._close(); 5312 }, this.delay ); 5313 } 5314 5315 nested = item.children( ".ui-menu" ); 5316 if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) { 5317 this._startOpening( nested ); 5318 } 5319 this.activeMenu = item.parent(); 5320 5321 this._trigger( "focus", event, { item: item } ); 5322 }, 5323 5324 _scrollIntoView: function( item ) { 5325 var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight; 5326 if ( this._hasScroll() ) { 5327 borderTop = parseFloat( $.css( this.activeMenu[ 0 ], "borderTopWidth" ) ) || 0; 5328 paddingTop = parseFloat( $.css( this.activeMenu[ 0 ], "paddingTop" ) ) || 0; 5329 offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop; 5330 scroll = this.activeMenu.scrollTop(); 5331 elementHeight = this.activeMenu.height(); 5332 itemHeight = item.outerHeight(); 5333 5334 if ( offset < 0 ) { 5335 this.activeMenu.scrollTop( scroll + offset ); 5336 } else if ( offset + itemHeight > elementHeight ) { 5337 this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight ); 5338 } 5339 } 5340 }, 5341 5342 blur: function( event, fromFocus ) { 5343 if ( !fromFocus ) { 5344 clearTimeout( this.timer ); 5345 } 5346 5347 if ( !this.active ) { 5348 return; 5349 } 5350 5351 this._removeClass( this.active.children( ".ui-menu-item-wrapper" ), 5352 null, "ui-state-active" ); 5353 5354 this._trigger( "blur", event, { item: this.active } ); 5355 this.active = null; 5356 }, 5357 5358 _startOpening: function( submenu ) { 5359 clearTimeout( this.timer ); 5360 5361 // Don't open if already open fixes a Firefox bug that caused a .5 pixel 5362 // shift in the submenu position when mousing over the caret icon 5363 if ( submenu.attr( "aria-hidden" ) !== "true" ) { 5364 return; 5365 } 5366 5367 this.timer = this._delay( function() { 5368 this._close(); 5369 this._open( submenu ); 5370 }, this.delay ); 5371 }, 5372 5373 _open: function( submenu ) { 5374 var position = $.extend( { 5375 of: this.active 5376 }, this.options.position ); 5377 5378 clearTimeout( this.timer ); 5379 this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) ) 5380 .hide() 5381 .attr( "aria-hidden", "true" ); 5382 5383 submenu 5384 .show() 5385 .removeAttr( "aria-hidden" ) 5386 .attr( "aria-expanded", "true" ) 5387 .position( position ); 5388 }, 5389 5390 collapseAll: function( event, all ) { 5391 clearTimeout( this.timer ); 5392 this.timer = this._delay( function() { 5393 5394 // If we were passed an event, look for the submenu that contains the event 5395 var currentMenu = all ? this.element : 5396 $( event && event.target ).closest( this.element.find( ".ui-menu" ) ); 5397 5398 // If we found no valid submenu ancestor, use the main menu to close all 5399 // sub menus anyway 5400 if ( !currentMenu.length ) { 5401 currentMenu = this.element; 5402 } 5403 5404 this._close( currentMenu ); 5405 5406 this.blur( event ); 5407 5408 // Work around active item staying active after menu is blurred 5409 this._removeClass( currentMenu.find( ".ui-state-active" ), null, "ui-state-active" ); 5410 5411 this.activeMenu = currentMenu; 5412 },
vendor: 15,210 bytes, lines 5412-5984
5412this.delay ); 5413 }, 5414 5415 // With no arguments, closes the currently active menu - if nothing is active 5416 // it closes all menus. If passed an argument, it will search for menus BELOW 5417 _close: function( startMenu ) { 5418 if ( !startMenu ) { 5419 startMenu = this.active ? this.active.parent() : this.element; 5420 } 5421 5422 startMenu.find( ".ui-menu" ) 5423 .hide() 5424 .attr( "aria-hidden", "true" ) 5425 .attr( "aria-expanded", "false" ); 5426 }, 5427 5428 _closeOnDocumentClick: function( event ) { 5429 return !$( event.target ).closest( ".ui-menu" ).length; 5430 }, 5431 5432 _isDivider: function( item ) { 5433 5434 // Match hyphen, em dash, en dash 5435 return !/[^\-\u2014\u2013\s]/.test( item.text() ); 5436 }, 5437 5438 collapse: function( event ) { 5439 var newItem = this.active && 5440 this.active.parent().closest( ".ui-menu-item", this.element ); 5441 if ( newItem && newItem.length ) { 5442 this._close(); 5443 this.focus( event, newItem ); 5444 } 5445 }, 5446 5447 expand: function( event ) { 5448 var newItem = this.active && 5449 this.active 5450 .children( ".ui-menu " ) 5451 .find( this.options.items ) 5452 .first(); 5453 5454 if ( newItem && newItem.length ) { 5455 this._open( newItem.parent() ); 5456 5457 // Delay so Firefox will not hide activedescendant change in expanding submenu from AT 5458 this._delay( function() { 5459 this.focus( event, newItem ); 5460 } ); 5461 } 5462 }, 5463 5464 next: function( event ) { 5465 this._move( "next", "first", event ); 5466 }, 5467 5468 previous: function( event ) { 5469 this._move( "prev", "last", event ); 5470 }, 5471 5472 isFirstItem: function() { 5473 return this.active && !this.active.prevAll( ".ui-menu-item" ).length; 5474 }, 5475 5476 isLastItem: function() { 5477 return this.active && !this.active.nextAll( ".ui-menu-item" ).length; 5478 }, 5479 5480 _move: function( direction, filter, event ) { 5481 var next; 5482 if ( this.active ) { 5483 if ( direction === "first" || direction === "last" ) { 5484 next = this.active 5485 [ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" ) 5486 .eq( -1 ); 5487 } else { 5488 next = this.active 5489 [ direction + "All" ]( ".ui-menu-item" ) 5490 .eq( 0 ); 5491 } 5492 } 5493 if ( !next || !next.length || !this.active ) { 5494 next = this.activeMenu.find( this.options.items )[ filter ](); 5495 } 5496 5497 this.focus( event, next ); 5498 }, 5499 5500 nextPage: function( event ) { 5501 var item, base, height; 5502 5503 if ( !this.active ) { 5504 this.next( event ); 5505 return; 5506 } 5507 if ( this.isLastItem() ) { 5508 return; 5509 } 5510 if ( this._hasScroll() ) { 5511 base = this.active.offset().top; 5512 height = this.element.height(); 5513 this.active.nextAll( ".ui-menu-item" ).each( function() { 5514 item = $( this ); 5515 return item.offset().top - base - height < 0; 5516 } ); 5517 5518 this.focus( event, item ); 5519 } else { 5520 this.focus( event, this.activeMenu.find( this.options.items ) 5521 [ !this.active ? "first" : "last" ]() ); 5522 } 5523 }, 5524 5525 previousPage: function( event ) { 5526 var item, base, height; 5527 if ( !this.active ) { 5528 this.next( event ); 5529 return; 5530 } 5531 if ( this.isFirstItem() ) { 5532 return; 5533 } 5534 if ( this._hasScroll() ) { 5535 base = this.active.offset().top; 5536 height = this.element.height(); 5537 this.active.prevAll( ".ui-menu-item" ).each( function() { 5538 item = $( this ); 5539 return item.offset().top - base + height > 0; 5540 } ); 5541 5542 this.focus( event, item ); 5543 } else { 5544 this.focus( event, this.activeMenu.find( this.options.items ).first() ); 5545 } 5546 }, 5547 5548 _hasScroll: function() { 5549 return this.element.outerHeight() < this.element.prop( "scrollHeight" ); 5550 }, 5551 5552 select: function( event ) { 5553 5554 // TODO: It should never be possible to not have an active item at this 5555 // point, but the tests don't trigger mouseenter before click. 5556 this.active = this.active || $( event.target ).closest( ".ui-menu-item" ); 5557 var ui = { item: this.active }; 5558 if ( !this.active.has( ".ui-menu" ).length ) { 5559 this.collapseAll( event, true ); 5560 } 5561 this._trigger( "select", event, ui ); 5562 }, 5563 5564 _filterMenuItems: function( character ) { 5565 var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ), 5566 regex = new RegExp( "^" + escapedCharacter, "i" ); 5567 5568 return this.activeMenu 5569 .find( this.options.items ) 5570 5571 // Only match on items, not dividers or other content (#10571) 5572 .filter( ".ui-menu-item" ) 5573 .filter( function() { 5574 return regex.test( 5575 $.trim( $( this ).children( ".ui-menu-item-wrapper" ).text() ) ); 5576 } ); 5577 } 5578} ); 5579 5580 5581/*! 5582 * jQuery UI Autocomplete 1.12.1 5583 * http://jqueryui.com 5584 * 5585 * Copyright jQuery Foundation and other contributors 5586 * Released under the MIT license. 5587 * http://jquery.org/license 5588 */ 5589 5590//>>label: Autocomplete 5591//>>group: Widgets 5592//>>description: Lists suggested words as the user is typing. 5593//>>docs: http://api.jqueryui.com/autocomplete/ 5594//>>demos: http://jqueryui.com/autocomplete/ 5595//>>css.structure: ../../themes/base/core.css 5596//>>css.structure: ../../themes/base/autocomplete.css 5597//>>css.theme: ../../themes/base/theme.css 5598 5599 5600 5601$.widget( "ui.autocomplete", { 5602 version: "1.12.1", 5603 defaultElement: "<input>", 5604 options: { 5605 appendTo: null, 5606 autoFocus: false, 5607 delay: 300, 5608 minLength: 1, 5609 position: { 5610 my: "left top", 5611 at: "left bottom", 5612 collision: "none" 5613 }, 5614 source: null, 5615 5616 // Callbacks 5617 change: null, 5618 close: null, 5619 focus: null, 5620 open: null, 5621 response: null, 5622 search: null, 5623 select: null 5624 }, 5625 5626 requestIndex: 0, 5627 pending: 0, 5628 5629 _create: function() { 5630 5631 // Some browsers only repeat keydown events, not keypress events, 5632 // so we use the suppressKeyPress flag to determine if we've already 5633 // handled the keydown event. #7269 5634 // Unfortunately the code for & in keypress is the same as the up arrow, 5635 // so we use the suppressKeyPressRepeat flag to avoid handling keypress 5636 // events when we know the keydown event was used to modify the 5637 // search term. #7799 5638 var suppressKeyPress, suppressKeyPressRepeat, suppressInput, 5639 nodeName = this.element[ 0 ].nodeName.toLowerCase(), 5640 isTextarea = nodeName === "textarea", 5641 isInput = nodeName === "input"; 5642 5643 // Textareas are always multi-line 5644 // Inputs are always single-line, even if inside a contentEditable element 5645 // IE also treats inputs as contentEditable 5646 // All other element types are determined by whether or not they're contentEditable 5647 this.isMultiLine = isTextarea || !isInput && this._isContentEditable( this.element ); 5648 5649 this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ]; 5650 this.isNewMenu = true; 5651 5652 this._addClass( "ui-autocomplete-input" ); 5653 this.element.attr( "autocomplete", "off" ); 5654 5655 this._on( this.element, { 5656 keydown: function( event ) { 5657 if ( this.element.prop( "readOnly" ) ) { 5658 suppressKeyPress = true; 5659 suppressInput = true; 5660 suppressKeyPressRepeat = true; 5661 return; 5662 } 5663 5664 suppressKeyPress = false; 5665 suppressInput = false; 5666 suppressKeyPressRepeat = false; 5667 var keyCode = $.ui.keyCode; 5668 switch ( event.keyCode ) { 5669 case keyCode.PAGE_UP: 5670 suppressKeyPress = true; 5671 this._move( "previousPage", event ); 5672 break; 5673 case keyCode.PAGE_DOWN: 5674 suppressKeyPress = true; 5675 this._move( "nextPage", event ); 5676 break; 5677 case keyCode.UP: 5678 suppressKeyPress = true; 5679 this._keyEvent( "previous", event ); 5680 break; 5681 case keyCode.DOWN: 5682 suppressKeyPress = true; 5683 this._keyEvent( "next", event ); 5684 break; 5685 case keyCode.ENTER: 5686 5687 // when menu is open and has focus 5688 if ( this.menu.active ) { 5689 5690 // #6055 - Opera still allows the keypress to occur 5691 // which causes forms to submit 5692 suppressKeyPress = true; 5693 event.preventDefault(); 5694 this.menu.select( event ); 5695 } 5696 break; 5697 case keyCode.TAB: 5698 if ( this.menu.active ) { 5699 this.menu.select( event ); 5700 } 5701 break; 5702 case keyCode.ESCAPE: 5703 if ( this.menu.element.is( ":visible" ) ) { 5704 if ( !this.isMultiLine ) { 5705 this._value( this.term ); 5706 } 5707 this.close( event ); 5708 5709 // Different browsers have different default behavior for escape 5710 // Single press can mean undo or clear 5711 // Double press in IE means clear the whole form 5712 event.preventDefault(); 5713 } 5714 break; 5715 default: 5716 suppressKeyPressRepeat = true; 5717 5718 // search timeout should be triggered before the input value is changed 5719 this._searchTimeout( event ); 5720 break; 5721 } 5722 }, 5723 keypress: function( event ) { 5724 if ( suppressKeyPress ) { 5725 suppressKeyPress = false; 5726 if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) { 5727 event.preventDefault(); 5728 } 5729 return; 5730 } 5731 if ( suppressKeyPressRepeat ) { 5732 return; 5733 } 5734 5735 // Replicate some key handlers to allow them to repeat in Firefox and Opera 5736 var keyCode = $.ui.keyCode; 5737 switch ( event.keyCode ) { 5738 case keyCode.PAGE_UP: 5739 this._move( "previousPage", event ); 5740 break; 5741 case keyCode.PAGE_DOWN: 5742 this._move( "nextPage", event ); 5743 break; 5744 case keyCode.UP: 5745 this._keyEvent( "previous", event ); 5746 break; 5747 case keyCode.DOWN: 5748 this._keyEvent( "next", event ); 5749 break; 5750 } 5751 }, 5752 input: function( event ) { 5753 if ( suppressInput ) { 5754 suppressInput = false; 5755 event.preventDefault(); 5756 return; 5757 } 5758 this._searchTimeout( event ); 5759 }, 5760 focus: function() { 5761 this.selectedItem = null; 5762 this.previous = this._value(); 5763 }, 5764 blur: function( event ) { 5765 if ( this.cancelBlur ) { 5766 delete this.cancelBlur; 5767 return; 5768 } 5769 5770 clearTimeout( this.searching ); 5771 this.close( event ); 5772 this._change( event ); 5773 } 5774 } ); 5775 5776 this._initSource(); 5777 this.menu = $( "<ul>" ) 5778 .appendTo( this._appendTo() ) 5779 .menu( { 5780 5781 // disable ARIA support, the live region takes care of that 5782 role: null 5783 } ) 5784 .hide() 5785 .menu( "instance" ); 5786 5787 this._addClass( this.menu.element, "ui-autocomplete", "ui-front" ); 5788 this._on( this.menu.element, { 5789 mousedown: function( event ) { 5790 5791 // prevent moving focus out of the text field 5792 event.preventDefault(); 5793 5794 // IE doesn't prevent moving focus even with event.preventDefault() 5795 // so we set a flag to know when we should ignore the blur event 5796 this.cancelBlur = true; 5797 this._delay( function() { 5798 delete this.cancelBlur; 5799 5800 // Support: IE 8 only 5801 // Right clicking a menu item or selecting text from the menu items will 5802 // result in focus moving out of the input. However, we've already received 5803 // and ignored the blur event because of the cancelBlur flag set above. So 5804 // we restore focus to ensure that the menu closes properly based on the user's 5805 // next actions. 5806 if ( this.element[ 0 ] !== $.ui.safeActiveElement( this.document[ 0 ] ) ) { 5807 this.element.trigger( "focus" ); 5808 } 5809 } ); 5810 }, 5811 menufocus: function( event, ui ) { 5812 var label, item; 5813 5814 // support: Firefox 5815 // Prevent accidental activation of menu items in Firefox (#7024 #9118) 5816 if ( this.isNewMenu ) { 5817 this.isNewMenu = false; 5818 if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) { 5819 this.menu.blur(); 5820 5821 this.document.one( "mousemove", function() { 5822 $( event.target ).trigger( event.originalEvent ); 5823 } ); 5824 5825 return; 5826 } 5827 } 5828 5829 item = ui.item.data( "ui-autocomplete-item" ); 5830 if ( false !== this._trigger( "focus", event, { item: item } ) ) { 5831 5832 // use value to match what will end up in the input, if it was a key event 5833 if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) { 5834 this._value( item.value ); 5835 } 5836 } 5837 5838 // Announce the value in the liveRegion 5839 label = ui.item.attr( "aria-label" ) || item.value; 5840 if ( label && $.trim( label ).length ) { 5841 this.liveRegion.children().hide(); 5842 $( "<div>" ).text( label ).appendTo( this.liveRegion ); 5843 } 5844 }, 5845 menuselect: function( event, ui ) { 5846 var item = ui.item.data( "ui-autocomplete-item" ), 5847 previous = this.previous; 5848 5849 // Only trigger when focus was lost (click on menu) 5850 if ( this.element[ 0 ] !== $.ui.safeActiveElement( this.document[ 0 ] ) ) { 5851 this.element.trigger( "focus" ); 5852 this.previous = previous; 5853 5854 // #6109 - IE triggers two focus events and the second 5855 // is asynchronous, so we need to reset the previous 5856 // term synchronously and asynchronously :-( 5857 this._delay( function() { 5858 this.previous = previous; 5859 this.selectedItem = item; 5860 } ); 5861 } 5862 5863 if ( false !== this._trigger( "select", event, { item: item } ) ) { 5864 this._value( item.value ); 5865 } 5866 5867 // reset the term after the select event 5868 // this allows custom select handling to work properly 5869 this.term = this._value(); 5870 5871 this.close( event ); 5872 this.selectedItem = item; 5873 } 5874 } ); 5875 5876 this.liveRegion = $( "<div>", { 5877 role: "status", 5878 "aria-live": "assertive", 5879 "aria-relevant": "additions" 5880 } ) 5881 .appendTo( this.document[ 0 ].body ); 5882 5883 this._addClass( this.liveRegion, null, "ui-helper-hidden-accessible" ); 5884 5885 // Turning off autocomplete prevents the browser from remembering the 5886 // value when navigating through history, so we re-enable autocomplete 5887 // if the page is unloaded before the widget is destroyed. #7790 5888 this._on( this.window, { 5889 beforeunload: function() { 5890 this.element.removeAttr( "autocomplete" ); 5891 } 5892 } ); 5893 }, 5894 5895 _destroy: function() { 5896 clearTimeout( this.searching ); 5897 this.element.removeAttr( "autocomplete" ); 5898 this.menu.element.remove(); 5899 this.liveRegion.remove(); 5900 }, 5901 5902 _setOption: function( key, value ) { 5903 this._super( key, value ); 5904 if ( key === "source" ) { 5905 this._initSource(); 5906 } 5907 if ( key === "appendTo" ) { 5908 this.menu.element.appendTo( this._appendTo() ); 5909 } 5910 if ( key === "disabled" && value && this.xhr ) { 5911 this.xhr.abort(); 5912 } 5913 }, 5914 5915 _isEventTargetInWidget: function( event ) { 5916 var menuElement = this.menu.element[ 0 ]; 5917 5918 return event.target === this.element[ 0 ] || 5919 event.target === menuElement || 5920 $.contains( menuElement, event.target ); 5921 }, 5922 5923 _closeOnClickOutside: function( event ) { 5924 if ( !this._isEventTargetInWidget( event ) ) { 5925 this.close(); 5926 } 5927 }, 5928 5929 _appendTo: function() { 5930 var element = this.options.appendTo; 5931 5932 if ( element ) { 5933 element = element.jquery || element.nodeType ? 5934 $( element ) : 5935 this.document.find( element ).eq( 0 ); 5936 } 5937 5938 if ( !element || !element[ 0 ] ) { 5939 element = this.element.closest( ".ui-front, dialog" ); 5940 } 5941 5942 if ( !element.length ) { 5943 element = this.document[ 0 ].body; 5944 } 5945 5946 return element; 5947 }, 5948 5949 _initSource: function() { 5950 var array, url, 5951 that = this; 5952 if ( $.isArray( this.options.source ) ) { 5953 array = this.options.source; 5954 this.source = function( request, response ) { 5955 response( $.ui.autocomplete.filter( array, request.term ) ); 5956 }; 5957 } else if ( typeof this.options.source === "string" ) { 5958 url = this.options.source; 5959 this.source = function( request, response ) { 5960 if ( that.xhr ) { 5961 that.xhr.abort(); 5962 } 5963 that.xhr = $.ajax( { 5964 url: url, 5965 data: request, 5966 dataType: "json", 5967 success: function( data ) { 5968 response( data ); 5969 }, 5970 error: function() { 5971 response( [] ); 5972 } 5973 } ); 5974 }; 5975 } else { 5976 this.source = this.options.source; 5977 } 5978 }, 5979 5980 _searchTimeout: function( event ) { 5981 clearTimeout( this.searching ); 5982 this.searching = this._delay( function() { 5983 5984 // Search if the value has changed, or if the user retypes the same value (see #7434)
vendor: 4,901 bytes, lines 5985-6187
5985 var equalValues = this.term === this._value(), 5986 menuVisible = this.menu.element.is( ":visible" ), 5987 modifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey; 5988 5989 if ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) { 5990 this.selectedItem = null; 5991 this.search( null, event ); 5992 } 5993 }, this.options.delay ); 5994 }, 5995 5996 search: function( value, event ) { 5997 value = value != null ? value : this._value(); 5998 5999 // Always save the actual value, not the one passed as an argument 6000 this.term = this._value(); 6001 6002 if ( value.length < this.options.minLength ) { 6003 return this.close( event ); 6004 } 6005 6006 if ( this._trigger( "search", event ) === false ) { 6007 return; 6008 } 6009 6010 return this._search( value ); 6011 }, 6012 6013 _search: function( value ) { 6014 this.pending++; 6015 this._addClass( "ui-autocomplete-loading" ); 6016 this.cancelSearch = false; 6017 6018 this.source( { term: value }, this._response() ); 6019 }, 6020 6021 _response: function() { 6022 var index = ++this.requestIndex; 6023 6024 return $.proxy( function( content ) { 6025 if ( index === this.requestIndex ) { 6026 this.__response( content ); 6027 } 6028 6029 this.pending--; 6030 if ( !this.pending ) { 6031 this._removeClass( "ui-autocomplete-loading" ); 6032 } 6033 }, this ); 6034 }, 6035 6036 __response: function( content ) { 6037 if ( content ) { 6038 content = this._normalize( content ); 6039 } 6040 this._trigger( "response", null, { content: content } ); 6041 if ( !this.options.disabled && content && content.length && !this.cancelSearch ) { 6042 this._suggest( content ); 6043 this._trigger( "open" ); 6044 } else { 6045 6046 // use ._close() instead of .close() so we don't cancel future searches 6047 this._close(); 6048 } 6049 }, 6050 6051 close: function( event ) { 6052 this.cancelSearch = true; 6053 this._close( event ); 6054 }, 6055 6056 _close: function( event ) { 6057 6058 // Remove the handler that closes the menu on outside clicks 6059 this._off( this.document, "mousedown" ); 6060 6061 if ( this.menu.element.is( ":visible" ) ) { 6062 this.menu.element.hide(); 6063 this.menu.blur(); 6064 this.isNewMenu = true; 6065 this._trigger( "close", event ); 6066 } 6067 }, 6068 6069 _change: function( event ) { 6070 if ( this.previous !== this._value() ) { 6071 this._trigger( "change", event, { item: this.selectedItem } ); 6072 } 6073 }, 6074 6075 _normalize: function( items ) { 6076 6077 // assume all items have the right format when the first item is complete 6078 if ( items.length && items[ 0 ].label && items[ 0 ].value ) { 6079 return items; 6080 } 6081 return $.map( items, function( item ) { 6082 if ( typeof item === "string" ) { 6083 return { 6084 label: item, 6085 value: item 6086 }; 6087 } 6088 return $.extend( {}, item, { 6089 label: item.label || item.value, 6090 value: item.value || item.label 6091 } ); 6092 } ); 6093 }, 6094 6095 _suggest: function( items ) { 6096 var ul = this.menu.element.empty(); 6097 this._renderMenu( ul, items ); 6098 this.isNewMenu = true; 6099 this.menu.refresh(); 6100 6101 // Size and position menu 6102 ul.show(); 6103 this._resizeMenu(); 6104 ul.position( $.extend( { 6105 of: this.element 6106 }, this.options.position ) ); 6107 6108 if ( this.options.autoFocus ) { 6109 this.menu.next(); 6110 } 6111 6112 // Listen for interactions outside of the widget (#6642) 6113 this._on( this.document, { 6114 mousedown: "_closeOnClickOutside" 6115 } ); 6116 }, 6117 6118 _resizeMenu: function() { 6119 var ul = this.menu.element; 6120 ul.outerWidth( Math.max( 6121 6122 // Firefox wraps long text (possibly a rounding bug) 6123 // so we add 1px to avoid the wrapping (#7513) 6124 ul.width( "" ).outerWidth() + 1, 6125 this.element.outerWidth() 6126 ) ); 6127 }, 6128 6129 _renderMenu: function( ul, items ) { 6130 var that = this; 6131 $.each( items, function( index, item ) { 6132 that._renderItemData( ul, item ); 6133 } ); 6134 }, 6135 6136 _renderItemData: function( ul, item ) { 6137 return this._renderItem( ul, item ).data( "ui-autocomplete-item", item ); 6138 }, 6139 6140 _renderItem: function( ul, item ) { 6141 return $( "<li>" ) 6142 .append( $( "<div>" ).text( item.label ) ) 6143 .appendTo( ul ); 6144 }, 6145 6146 _move: function( direction, event ) { 6147 if ( !this.menu.element.is( ":visible" ) ) { 6148 this.search( null, event ); 6149 return; 6150 } 6151 if ( this.menu.isFirstItem() && /^previous/.test( direction ) || 6152 this.menu.isLastItem() && /^next/.test( direction ) ) { 6153 6154 if ( !this.isMultiLine ) { 6155 this._value( this.term ); 6156 } 6157 6158 this.menu.blur(); 6159 return; 6160 } 6161 this.menu[ direction ]( event ); 6162 }, 6163 6164 widget: function() { 6165 return this.menu.element; 6166 }, 6167 6168 _value: function() { 6169 return this.valueMethod.apply( this.element, arguments ); 6170 }, 6171 6172 _keyEvent: function( keyEvent, event ) { 6173 if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) { 6174 this._move( keyEvent, event ); 6175 6176 // Prevents moving cursor to beginning/end of the text field in some browsers 6177 event.preventDefault(); 6178 } 6179 }, 6180 6181 // Support: Chrome <=50 6182 // We should be able to just use this.element.prop( "isContentEditable" ) 6183 // but hidden elements always report false in Chrome. 6184 // https://code.google.com/p/chromium/issues/detail?id=313082 6185 _isContentEditable: function( element ) { 6186 if ( !element.length ) { 6187 return false;
vendor: 14,931 bytes, lines 6188-6713
6188 } 6189 6190 var editable = element.prop( "contentEditable" ); 6191 6192 if ( editable === "inherit" ) { 6193 return this._isContentEditable( element.parent() ); 6194 } 6195 6196 return editable === "true"; 6197 } 6198} ); 6199 6200$.extend( $.ui.autocomplete, { 6201 escapeRegex: function( value ) { 6202 return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ); 6203 }, 6204 filter: function( array, term ) { 6205 var matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), "i" ); 6206 return $.grep( array, function( value ) { 6207 return matcher.test( value.label || value.value || value ); 6208 } ); 6209 } 6210} ); 6211 6212// Live region extension, adding a `messages` option 6213// NOTE: This is an experimental API. We are still investigating 6214// a full solution for string manipulation and internationalization. 6215$.widget( "ui.autocomplete", $.ui.autocomplete, { 6216 options: { 6217 messages: { 6218 noResults: "No search results.", 6219 results: function( amount ) { 6220 return amount + ( amount > 1 ? " results are" : " result is" ) + 6221 " available, use up and down arrow keys to navigate."; 6222 } 6223 } 6224 }, 6225 6226 __response: function( content ) { 6227 var message; 6228 this._superApply( arguments ); 6229 if ( this.options.disabled || this.cancelSearch ) { 6230 return; 6231 } 6232 if ( content && content.length ) { 6233 message = this.options.messages.results( content.length ); 6234 } else { 6235 message = this.options.messages.noResults; 6236 } 6237 this.liveRegion.children().hide(); 6238 $( "<div>" ).text( message ).appendTo( this.liveRegion ); 6239 } 6240} ); 6241 6242var widgetsAutocomplete = $.ui.autocomplete; 6243 6244 6245/*! 6246 * jQuery UI Controlgroup 1.12.1 6247 * http://jqueryui.com 6248 * 6249 * Copyright jQuery Foundation and other contributors 6250 * Released under the MIT license. 6251 * http://jquery.org/license 6252 */ 6253 6254//>>label: Controlgroup 6255//>>group: Widgets 6256//>>description: Visually groups form control widgets 6257//>>docs: http://api.jqueryui.com/controlgroup/ 6258//>>demos: http://jqueryui.com/controlgroup/ 6259//>>css.structure: ../../themes/base/core.css 6260//>>css.structure: ../../themes/base/controlgroup.css 6261//>>css.theme: ../../themes/base/theme.css 6262 6263 6264var controlgroupCornerRegex = /ui-corner-([a-z]){2,6}/g; 6265 6266var widgetsControlgroup = $.widget( "ui.controlgroup", { 6267 version: "1.12.1", 6268 defaultElement: "<div>", 6269 options: { 6270 direction: "horizontal", 6271 disabled: null, 6272 onlyVisible: true, 6273 items: { 6274 "button": "input[type=button], input[type=submit], input[type=reset], button, a", 6275 "controlgroupLabel": ".ui-controlgroup-label", 6276 "checkboxradio": "input[type='checkbox'], input[type='radio']", 6277 "selectmenu": "select", 6278 "spinner": ".ui-spinner-input" 6279 } 6280 }, 6281 6282 _create: function() { 6283 this._enhance(); 6284 }, 6285 6286 // To support the enhanced option in jQuery Mobile, we isolate DOM manipulation 6287 _enhance: function() { 6288 this.element.attr( "role", "toolbar" ); 6289 this.refresh(); 6290 }, 6291 6292 _destroy: function() { 6293 this._callChildMethod( "destroy" ); 6294 this.childWidgets.removeData( "ui-controlgroup-data" ); 6295 this.element.removeAttr( "role" ); 6296 if ( this.options.items.controlgroupLabel ) { 6297 this.element 6298 .find( this.options.items.controlgroupLabel ) 6299 .find( ".ui-controlgroup-label-contents" ) 6300 .contents().unwrap(); 6301 } 6302 }, 6303 6304 _initWidgets: function() { 6305 var that = this, 6306 childWidgets = []; 6307 6308 // First we iterate over each of the items options 6309 $.each( this.options.items, function( widget, selector ) { 6310 var labels; 6311 var options = {}; 6312 6313 // Make sure the widget has a selector set 6314 if ( !selector ) { 6315 return; 6316 } 6317 6318 if ( widget === "controlgroupLabel" ) { 6319 labels = that.element.find( selector ); 6320 labels.each( function() { 6321 var element = $( this ); 6322 6323 if ( element.children( ".ui-controlgroup-label-contents" ).length ) { 6324 return; 6325 } 6326 element.contents() 6327 .wrapAll( "<span class='ui-controlgroup-label-contents'></span>" ); 6328 } ); 6329 that._addClass( labels, null, "ui-widget ui-widget-content ui-state-default" ); 6330 childWidgets = childWidgets.concat( labels.get() ); 6331 return; 6332 } 6333 6334 // Make sure the widget actually exists 6335 if ( !$.fn[ widget ] ) { 6336 return; 6337 } 6338 6339 // We assume everything is in the middle to start because we can't determine 6340 // first / last elements until all enhancments are done. 6341 if ( that[ "_" + widget + "Options" ] ) { 6342 options = that[ "_" + widget + "Options" ]( "middle" ); 6343 } else { 6344 options = { classes: {} }; 6345 } 6346 6347 // Find instances of this widget inside controlgroup and init them 6348 that.element 6349 .find( selector ) 6350 .each( function() { 6351 var element = $( this ); 6352 var instance = element[ widget ]( "instance" ); 6353 6354 // We need to clone the default options for this type of widget to avoid 6355 // polluting the variable options which has a wider scope than a single widget. 6356 var instanceOptions = $.widget.extend( {}, options ); 6357 6358 // If the button is the child of a spinner ignore it 6359 // TODO: Find a more generic solution 6360 if ( widget === "button" && element.parent( ".ui-spinner" ).length ) { 6361 return; 6362 } 6363 6364 // Create the widget if it doesn't exist 6365 if ( !instance ) { 6366 instance = element[ widget ]()[ widget ]( "instance" ); 6367 } 6368 if ( instance ) { 6369 instanceOptions.classes = 6370 that._resolveClassesValues( instanceOptions.classes, instance ); 6371 } 6372 element[ widget ]( instanceOptions ); 6373 6374 // Store an instance of the controlgroup to be able to reference 6375 // from the outermost element for changing options and refresh 6376 var widgetElement = element[ widget ]( "widget" ); 6377 $.data( widgetElement[ 0 ], "ui-controlgroup-data", 6378 instance ? instance : element[ widget ]( "instance" ) ); 6379 6380 childWidgets.push( widgetElement[ 0 ] ); 6381 } ); 6382 } ); 6383 6384 this.childWidgets = $( $.unique( childWidgets ) ); 6385 this._addClass( this.childWidgets, "ui-controlgroup-item" ); 6386 }, 6387 6388 _callChildMethod: function( method ) { 6389 this.childWidgets.each( function() { 6390 var element = $( this ), 6391 data = element.data( "ui-controlgroup-data" ); 6392 if ( data && data[ method ] ) { 6393 data[ method ](); 6394 } 6395 } ); 6396 }, 6397 6398 _updateCornerClass: function( element, position ) { 6399 var remove = "ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"; 6400 var add = this._buildSimpleOptions( position, "label" ).classes.label; 6401 6402 this._removeClass( element, null, remove ); 6403 this._addClass( element, null, add ); 6404 }, 6405 6406 _buildSimpleOptions: function( position, key ) { 6407 var direction = this.options.direction === "vertical"; 6408 var result = { 6409 classes: {} 6410 }; 6411 result.classes[ key ] = { 6412 "middle": "", 6413 "first": "ui-corner-" + ( direction ? "top" : "left" ), 6414 "last": "ui-corner-" + ( direction ? "bottom" : "right" ), 6415 "only": "ui-corner-all" 6416 }[ position ]; 6417 6418 return result; 6419 }, 6420 6421 _spinnerOptions: function( position ) { 6422 var options = this._buildSimpleOptions( position, "ui-spinner" ); 6423 6424 options.classes[ "ui-spinner-up" ] = ""; 6425 options.classes[ "ui-spinner-down" ] = ""; 6426 6427 return options; 6428 }, 6429 6430 _buttonOptions: function( position ) { 6431 return this._buildSimpleOptions( position, "ui-button" ); 6432 }, 6433 6434 _checkboxradioOptions: function( position ) { 6435 return this._buildSimpleOptions( position, "ui-checkboxradio-label" ); 6436 }, 6437 6438 _selectmenuOptions: function( position ) { 6439 var direction = this.options.direction === "vertical"; 6440 return { 6441 width: direction ? "auto" : false, 6442 classes: { 6443 middle: { 6444 "ui-selectmenu-button-open": "", 6445 "ui-selectmenu-button-closed": "" 6446 }, 6447 first: { 6448 "ui-selectmenu-button-open": "ui-corner-" + ( direction ? "top" : "tl" ), 6449 "ui-selectmenu-button-closed": "ui-corner-" + ( direction ? "top" : "left" ) 6450 }, 6451 last: { 6452 "ui-selectmenu-button-open": direction ? "" : "ui-corner-tr", 6453 "ui-selectmenu-button-closed": "ui-corner-" + ( direction ? "bottom" : "right" ) 6454 }, 6455 only: { 6456 "ui-selectmenu-button-open": "ui-corner-top", 6457 "ui-selectmenu-button-closed": "ui-corner-all" 6458 } 6459 6460 }[ position ] 6461 }; 6462 }, 6463 6464 _resolveClassesValues: function( classes, instance ) { 6465 var result = {}; 6466 $.each( classes, function( key ) { 6467 var current = instance.options.classes[ key ] || ""; 6468 current = $.trim( current.replace( controlgroupCornerRegex, "" ) ); 6469 result[ key ] = ( current + " " + classes[ key ] ).replace( /\s+/g, " " ); 6470 } ); 6471 return result; 6472 }, 6473 6474 _setOption: function( key, value ) { 6475 if ( key === "direction" ) { 6476 this._removeClass( "ui-controlgroup-" + this.options.direction ); 6477 } 6478 6479 this._super( key, value ); 6480 if ( key === "disabled" ) { 6481 this._callChildMethod( value ? "disable" : "enable" ); 6482 return; 6483 } 6484 6485 this.refresh(); 6486 }, 6487 6488 refresh: function() { 6489 var children, 6490 that = this; 6491 6492 this._addClass( "ui-controlgroup ui-controlgroup-" + this.options.direction ); 6493 6494 if ( this.options.direction === "horizontal" ) { 6495 this._addClass( null, "ui-helper-clearfix" ); 6496 } 6497 this._initWidgets(); 6498 6499 children = this.childWidgets; 6500 6501 // We filter here because we need to track all childWidgets not just the visible ones 6502 if ( this.options.onlyVisible ) { 6503 children = children.filter( ":visible" ); 6504 } 6505 6506 if ( children.length ) { 6507 6508 // We do this last because we need to make sure all enhancment is done 6509 // before determining first and last 6510 $.each( [ "first", "last" ], function( index, value ) { 6511 var instance = children[ value ]().data( "ui-controlgroup-data" ); 6512 6513 if ( instance && that[ "_" + instance.widgetName + "Options" ] ) { 6514 var options = that[ "_" + instance.widgetName + "Options" ]( 6515 children.length === 1 ? "only" : value 6516 ); 6517 options.classes = that._resolveClassesValues( options.classes, instance ); 6518 instance.element[ instance.widgetName ]( options ); 6519 } else { 6520 that._updateCornerClass( children[ value ](), value ); 6521 } 6522 } ); 6523 6524 // Finally call the refresh method on each of the child widgets. 6525 this._callChildMethod( "refresh" ); 6526 } 6527 } 6528} ); 6529 6530/*! 6531 * jQuery UI Checkboxradio 1.12.1 6532 * http://jqueryui.com 6533 * 6534 * Copyright jQuery Foundation and other contributors 6535 * Released under the MIT license. 6536 * http://jquery.org/license 6537 */ 6538 6539//>>label: Checkboxradio 6540//>>group: Widgets 6541//>>description: Enhances a form with multiple themeable checkboxes or radio buttons. 6542//>>docs: http://api.jqueryui.com/checkboxradio/ 6543//>>demos: http://jqueryui.com/checkboxradio/ 6544//>>css.structure: ../../themes/base/core.css 6545//>>css.structure: ../../themes/base/button.css 6546//>>css.structure: ../../themes/base/checkboxradio.css 6547//>>css.theme: ../../themes/base/theme.css 6548 6549 6550 6551$.widget( "ui.checkboxradio", [ $.ui.formResetMixin, { 6552 version: "1.12.1", 6553 options: { 6554 disabled: null, 6555 label: null, 6556 icon: true, 6557 classes: { 6558 "ui-checkboxradio-label": "ui-corner-all", 6559 "ui-checkboxradio-icon": "ui-corner-all" 6560 } 6561 }, 6562 6563 _getCreateOptions: function() { 6564 var disabled, labels; 6565 var that = this; 6566 var options = this._super() || {}; 6567 6568 // We read the type here, because it makes more sense to throw a element type error first, 6569 // rather then the error for lack of a label. Often if its the wrong type, it 6570 // won't have a label (e.g. calling on a div, btn, etc) 6571 this._readType(); 6572 6573 labels = this.element.labels(); 6574 6575 // If there are multiple labels, use the last one 6576 this.label = $( labels[ labels.length - 1 ] ); 6577 if ( !this.label.length ) { 6578 $.error( "No label found for checkboxradio widget" ); 6579 } 6580 6581 this.originalLabel = ""; 6582 6583 // We need to get the label text but this may also need to make sure it does not contain the 6584 // input itself. 6585 this.label.contents().not( this.element[ 0 ] ).each( function() { 6586 6587 // The label contents could be text, html, or a mix. We concat each element to get a 6588 // string representation of the label, without the input as part of it. 6589 that.originalLabel += this.nodeType === 3 ? $( this ).text() : this.outerHTML; 6590 } ); 6591 6592 // Set the label option if we found label text 6593 if ( this.originalLabel ) { 6594 options.label = this.originalLabel; 6595 } 6596 6597 disabled = this.element[ 0 ].disabled; 6598 if ( disabled != null ) { 6599 options.disabled = disabled; 6600 } 6601 return options; 6602 }, 6603 6604 _create: function() { 6605 var checked = this.element[ 0 ].checked; 6606 6607 this._bindFormResetHandler(); 6608 6609 if ( this.options.disabled == null ) { 6610 this.options.disabled = this.element[ 0 ].disabled; 6611 } 6612 6613 this._setOption( "disabled", this.options.disabled ); 6614 this._addClass( "ui-checkboxradio", "ui-helper-hidden-accessible" ); 6615 this._addClass( this.label, "ui-checkboxradio-label", "ui-button ui-widget" ); 6616 6617 if ( this.type === "radio" ) { 6618 this._addClass( this.label, "ui-checkboxradio-radio-label" ); 6619 } 6620 6621 if ( this.options.label && this.options.label !== this.originalLabel ) { 6622 this._updateLabel(); 6623 } else if ( this.originalLabel ) { 6624 this.options.label = this.originalLabel; 6625 } 6626 6627 this._enhance(); 6628 6629 if ( checked ) { 6630 this._addClass( this.label, "ui-checkboxradio-checked", "ui-state-active" ); 6631 if ( this.icon ) { 6632 this._addClass( this.icon, null, "ui-state-hover" ); 6633 } 6634 } 6635 6636 this._on( { 6637 change: "_toggleClasses", 6638 focus: function() { 6639 this._addClass( this.label, null, "ui-state-focus ui-visual-focus" ); 6640 }, 6641 blur: function() { 6642 this._removeClass( this.label, null, "ui-state-focus ui-visual-focus" ); 6643 } 6644 } ); 6645 }, 6646 6647 _readType: function() { 6648 var nodeName = this.element[ 0 ].nodeName.toLowerCase(); 6649 this.type = this.element[ 0 ].type; 6650 if ( nodeName !== "input" || !/radio|checkbox/.test( this.type ) ) { 6651 $.error( "Can't create checkboxradio on element.nodeName=" + nodeName + 6652 " and element.type=" + this.type ); 6653 } 6654 }, 6655 6656 // Support jQuery Mobile enhanced option 6657 _enhance: function() { 6658 this._updateIcon( this.element[ 0 ].checked ); 6659 }, 6660 6661 widget: function() { 6662 return this.label; 6663 }, 6664 6665 _getRadioGroup: function() { 6666 var group; 6667 var name = this.element[ 0 ].name; 6668 var nameSelector = "input[name='" + $.ui.escapeSelector( name ) + "']"; 6669 6670 if ( !name ) { 6671 return $( [] ); 6672 } 6673 6674 if ( this.form.length ) { 6675 group = $( this.form[ 0 ].elements ).filter( nameSelector ); 6676 } else { 6677 6678 // Not inside a form, check all inputs that also are not inside a form 6679 group = $( nameSelector ).filter( function() { 6680 return $( this ).form().length === 0; 6681 } ); 6682 } 6683 6684 return group.not( this.element ); 6685 }, 6686 6687 _toggleClasses: function() { 6688 var checked = this.element[ 0 ].checked; 6689 this._toggleClass( this.label, "ui-checkboxradio-checked", "ui-state-active", checked ); 6690 6691 if ( this.options.icon && this.type === "checkbox" ) { 6692 this._toggleClass( this.icon, null, "ui-icon-check ui-state-checked", checked ) 6693 ._toggleClass( this.icon, null, "ui-icon-blank", !checked ); 6694 } 6695 6696 if ( this.type === "radio" ) { 6697 this._getRadioGroup() 6698 .each( function() { 6699 var instance = $( this ).checkboxradio( "instance" ); 6700 6701 if ( instance ) { 6702 instance._removeClass( instance.label, 6703 "ui-checkboxradio-checked", "ui-state-active" ); 6704 } 6705 } ); 6706 } 6707 }, 6708 6709 _destroy: function() { 6710 this._unbindFormResetHandler(); 6711 6712 if ( this.icon ) { 6713 this.icon.remove();
vendor: 4,485 bytes, lines 6714-6887
6714 this.iconSpace.remove(); 6715 } 6716 }, 6717 6718 _setOption: function( key, value ) { 6719 6720 // We don't allow the value to be set to nothing 6721 if ( key === "label" && !value ) { 6722 return; 6723 } 6724 6725 this._super( key, value ); 6726 6727 if ( key === "disabled" ) { 6728 this._toggleClass( this.label, null, "ui-state-disabled", value ); 6729 this.element[ 0 ].disabled = value; 6730 6731 // Don't refresh when setting disabled 6732 return; 6733 } 6734 this.refresh(); 6735 }, 6736 6737 _updateIcon: function( checked ) { 6738 var toAdd = "ui-icon ui-icon-background "; 6739 6740 if ( this.options.icon ) { 6741 if ( !this.icon ) { 6742 this.icon = $( "<span>" ); 6743 this.iconSpace = $( "<span> </span>" ); 6744 this._addClass( this.iconSpace, "ui-checkboxradio-icon-space" ); 6745 } 6746 6747 if ( this.type === "checkbox" ) { 6748 toAdd += checked ? "ui-icon-check ui-state-checked" : "ui-icon-blank"; 6749 this._removeClass( this.icon, null, checked ? "ui-icon-blank" : "ui-icon-check" ); 6750 } else { 6751 toAdd += "ui-icon-blank"; 6752 } 6753 this._addClass( this.icon, "ui-checkboxradio-icon", toAdd ); 6754 if ( !checked ) { 6755 this._removeClass( this.icon, null, "ui-icon-check ui-state-checked" ); 6756 } 6757 this.icon.prependTo( this.label ).after( this.iconSpace ); 6758 } else if ( this.icon !== undefined ) { 6759 this.icon.remove(); 6760 this.iconSpace.remove(); 6761 delete this.icon; 6762 } 6763 }, 6764 6765 _updateLabel: function() { 6766 6767 // Remove the contents of the label ( minus the icon, icon space, and input ) 6768 var contents = this.label.contents().not( this.element[ 0 ] ); 6769 if ( this.icon ) { 6770 contents = contents.not( this.icon[ 0 ] ); 6771 } 6772 if ( this.iconSpace ) { 6773 contents = contents.not( this.iconSpace[ 0 ] ); 6774 } 6775 contents.remove(); 6776 6777 this.label.append( this.options.label ); 6778 }, 6779 6780 refresh: function() { 6781 var checked = this.element[ 0 ].checked, 6782 isDisabled = this.element[ 0 ].disabled; 6783 6784 this._updateIcon( checked ); 6785 this._toggleClass( this.label, "ui-checkboxradio-checked", "ui-state-active", checked ); 6786 if ( this.options.label !== null ) { 6787 this._updateLabel(); 6788 } 6789 6790 if ( isDisabled !== this.options.disabled ) { 6791 this._setOptions( { "disabled": isDisabled } ); 6792 } 6793 } 6794 6795} ] ); 6796 6797var widgetsCheckboxradio = $.ui.checkboxradio; 6798 6799 6800/*! 6801 * jQuery UI Button 1.12.1 6802 * http://jqueryui.com 6803 * 6804 * Copyright jQuery Foundation and other contributors 6805 * Released under the MIT license. 6806 * http://jquery.org/license 6807 */ 6808 6809//>>label: Button 6810//>>group: Widgets 6811//>>description: Enhances a form with themeable buttons. 6812//>>docs: http://api.jqueryui.com/button/ 6813//>>demos: http://jqueryui.com/button/ 6814//>>css.structure: ../../themes/base/core.css 6815//>>css.structure: ../../themes/base/button.css 6816//>>css.theme: ../../themes/base/theme.css 6817 6818 6819 6820$.widget( "ui.button", { 6821 version: "1.12.1", 6822 defaultElement: "<button>", 6823 options: { 6824 classes: { 6825 "ui-button": "ui-corner-all" 6826 }, 6827 disabled: null, 6828 icon: null, 6829 iconPosition: "beginning", 6830 label: null, 6831 showLabel: true 6832 }, 6833 6834 _getCreateOptions: function() { 6835 var disabled, 6836 6837 // This is to support cases like in jQuery Mobile where the base widget does have 6838 // an implementation of _getCreateOptions 6839 options = this._super() || {}; 6840 6841 this.isInput = this.element.is( "input" ); 6842 6843 disabled = this.element[ 0 ].disabled; 6844 if ( disabled != null ) { 6845 options.disabled = disabled; 6846 } 6847 6848 this.originalLabel = this.isInput ? this.element.val() : this.element.html(); 6849 if ( this.originalLabel ) { 6850 options.label = this.originalLabel; 6851 } 6852 6853 return options; 6854 }, 6855 6856 _create: function() { 6857 if ( !this.option.showLabel & !this.options.icon ) { 6858 this.options.showLabel = true; 6859 } 6860 6861 // We have to check the option again here even though we did in _getCreateOptions, 6862 // because null may have been passed on init which would override what was set in 6863 // _getCreateOptions 6864 if ( this.options.disabled == null ) { 6865 this.options.disabled = this.element[ 0 ].disabled || false; 6866 } 6867 6868 this.hasTitle = !!this.element.attr( "title" ); 6869 6870 // Check to see if the label needs to be set or if its already correct 6871 if ( this.options.label && this.options.label !== this.originalLabel ) { 6872 if ( this.isInput ) { 6873 this.element.val( this.options.label ); 6874 } else { 6875 this.element.html( this.options.label ); 6876 } 6877 } 6878 this._addClass( "ui-button", "ui-widget" ); 6879 this._setOption( "disabled", this.options.disabled ); 6880 this._enhance(); 6881 6882 if ( this.element.is( "a" ) ) { 6883 this._on( { 6884 "keyup": function( event ) { 6885 if ( event.keyCode === $.ui.keyCode.SPACE ) { 6886 event.preventDefault(); 6887
vendor: 11,926 bytes, lines 6888-7257
6888 // Support: PhantomJS <= 1.9, IE 8 Only 6889 // If a native click is available use it so we actually cause navigation 6890 // otherwise just trigger a click event 6891 if ( this.element[ 0 ].click ) { 6892 this.element[ 0 ].click(); 6893 } else { 6894 this.element.trigger( "click" ); 6895 } 6896 } 6897 } 6898 } ); 6899 } 6900 }, 6901 6902 _enhance: function() { 6903 if ( !this.element.is( "button" ) ) { 6904 this.element.attr( "role", "button" ); 6905 } 6906 6907 if ( this.options.icon ) { 6908 this._updateIcon( "icon", this.options.icon ); 6909 this._updateTooltip(); 6910 } 6911 }, 6912 6913 _updateTooltip: function() { 6914 this.title = this.element.attr( "title" ); 6915 6916 if ( !this.options.showLabel && !this.title ) { 6917 this.element.attr( "title", this.options.label ); 6918 } 6919 }, 6920 6921 _updateIcon: function( option, value ) { 6922 var icon = option !== "iconPosition", 6923 position = icon ? this.options.iconPosition : value, 6924 displayBlock = position === "top" || position === "bottom"; 6925 6926 // Create icon 6927 if ( !this.icon ) { 6928 this.icon = $( "<span>" ); 6929 6930 this._addClass( this.icon, "ui-button-icon", "ui-icon" ); 6931 6932 if ( !this.options.showLabel ) { 6933 this._addClass( "ui-button-icon-only" ); 6934 } 6935 } else if ( icon ) { 6936 6937 // If we are updating the icon remove the old icon class 6938 this._removeClass( this.icon, null, this.options.icon ); 6939 } 6940 6941 // If we are updating the icon add the new icon class 6942 if ( icon ) { 6943 this._addClass( this.icon, null, value ); 6944 } 6945 6946 this._attachIcon( position ); 6947 6948 // If the icon is on top or bottom we need to add the ui-widget-icon-block class and remove 6949 // the iconSpace if there is one. 6950 if ( displayBlock ) { 6951 this._addClass( this.icon, null, "ui-widget-icon-block" ); 6952 if ( this.iconSpace ) { 6953 this.iconSpace.remove(); 6954 } 6955 } else { 6956 6957 // Position is beginning or end so remove the ui-widget-icon-block class and add the 6958 // space if it does not exist 6959 if ( !this.iconSpace ) { 6960 this.iconSpace = $( "<span> </span>" ); 6961 this._addClass( this.iconSpace, "ui-button-icon-space" ); 6962 } 6963 this._removeClass( this.icon, null, "ui-wiget-icon-block" ); 6964 this._attachIconSpace( position ); 6965 } 6966 }, 6967 6968 _destroy: function() { 6969 this.element.removeAttr( "role" ); 6970 6971 if ( this.icon ) { 6972 this.icon.remove(); 6973 } 6974 if ( this.iconSpace ) { 6975 this.iconSpace.remove(); 6976 } 6977 if ( !this.hasTitle ) { 6978 this.element.removeAttr( "title" ); 6979 } 6980 }, 6981 6982 _attachIconSpace: function( iconPosition ) { 6983 this.icon[ /^(?:end|bottom)/.test( iconPosition ) ? "before" : "after" ]( this.iconSpace ); 6984 }, 6985 6986 _attachIcon: function( iconPosition ) { 6987 this.element[ /^(?:end|bottom)/.test( iconPosition ) ? "append" : "prepend" ]( this.icon ); 6988 }, 6989 6990 _setOptions: function( options ) { 6991 var newShowLabel = options.showLabel === undefined ? 6992 this.options.showLabel : 6993 options.showLabel, 6994 newIcon = options.icon === undefined ? this.options.icon : options.icon; 6995 6996 if ( !newShowLabel && !newIcon ) { 6997 options.showLabel = true; 6998 } 6999 this._super( options ); 7000 }, 7001 7002 _setOption: function( key, value ) { 7003 if ( key === "icon" ) { 7004 if ( value ) { 7005 this._updateIcon( key, value ); 7006 } else if ( this.icon ) { 7007 this.icon.remove(); 7008 if ( this.iconSpace ) { 7009 this.iconSpace.remove(); 7010 } 7011 } 7012 } 7013 7014 if ( key === "iconPosition" ) { 7015 this._updateIcon( key, value ); 7016 } 7017 7018 // Make sure we can't end up with a button that has neither text nor icon 7019 if ( key === "showLabel" ) { 7020 this._toggleClass( "ui-button-icon-only", null, !value ); 7021 this._updateTooltip(); 7022 } 7023 7024 if ( key === "label" ) { 7025 if ( this.isInput ) { 7026 this.element.val( value ); 7027 } else { 7028 7029 // If there is an icon, append it, else nothing then append the value 7030 // this avoids removal of the icon when setting label text 7031 this.element.html( value ); 7032 if ( this.icon ) { 7033 this._attachIcon( this.options.iconPosition ); 7034 this._attachIconSpace( this.options.iconPosition ); 7035 } 7036 } 7037 } 7038 7039 this._super( key, value ); 7040 7041 if ( key === "disabled" ) { 7042 this._toggleClass( null, "ui-state-disabled", value ); 7043 this.element[ 0 ].disabled = value; 7044 if ( value ) { 7045 this.element.blur(); 7046 } 7047 } 7048 }, 7049 7050 refresh: function() { 7051 7052 // Make sure to only check disabled if its an element that supports this otherwise 7053 // check for the disabled class to determine state 7054 var isDisabled = this.element.is( "input, button" ) ? 7055 this.element[ 0 ].disabled : this.element.hasClass( "ui-button-disabled" ); 7056 7057 if ( isDisabled !== this.options.disabled ) { 7058 this._setOptions( { disabled: isDisabled } ); 7059 } 7060 7061 this._updateTooltip(); 7062 } 7063} ); 7064 7065// DEPRECATED 7066if ( $.uiBackCompat !== false ) { 7067 7068 // Text and Icons options 7069 $.widget( "ui.button", $.ui.button, { 7070 options: { 7071 text: true, 7072 icons: { 7073 primary: null, 7074 secondary: null 7075 } 7076 }, 7077 7078 _create: function() { 7079 if ( this.options.showLabel && !this.options.text ) { 7080 this.options.showLabel = this.options.text; 7081 } 7082 if ( !this.options.showLabel && this.options.text ) { 7083 this.options.text = this.options.showLabel; 7084 } 7085 if ( !this.options.icon && ( this.options.icons.primary || 7086 this.options.icons.secondary ) ) { 7087 if ( this.options.icons.primary ) { 7088 this.options.icon = this.options.icons.primary; 7089 } else { 7090 this.options.icon = this.options.icons.secondary; 7091 this.options.iconPosition = "end"; 7092 } 7093 } else if ( this.options.icon ) { 7094 this.options.icons.primary = this.options.icon; 7095 } 7096 this._super(); 7097 }, 7098 7099 _setOption: function( key, value ) { 7100 if ( key === "text" ) { 7101 this._super( "showLabel", value ); 7102 return; 7103 } 7104 if ( key === "showLabel" ) { 7105 this.options.text = value; 7106 } 7107 if ( key === "icon" ) { 7108 this.options.icons.primary = value; 7109 } 7110 if ( key === "icons" ) { 7111 if ( value.primary ) { 7112 this._super( "icon", value.primary ); 7113 this._super( "iconPosition", "beginning" ); 7114 } else if ( value.secondary ) { 7115 this._super( "icon", value.secondary ); 7116 this._super( "iconPosition", "end" ); 7117 } 7118 } 7119 this._superApply( arguments ); 7120 } 7121 } ); 7122 7123 $.fn.button = ( function( orig ) { 7124 return function() { 7125 if ( !this.length || ( this.length && this[ 0 ].tagName !== "INPUT" ) || 7126 ( this.length && this[ 0 ].tagName === "INPUT" && ( 7127 this.attr( "type" ) !== "checkbox" && this.attr( "type" ) !== "radio" 7128 ) ) ) { 7129 return orig.apply( this, arguments ); 7130 } 7131 if ( !$.ui.checkboxradio ) { 7132 $.error( "Checkboxradio widget missing" ); 7133 } 7134 if ( arguments.length === 0 ) { 7135 return this.checkboxradio( { 7136 "icon": false 7137 } ); 7138 } 7139 return this.checkboxradio.apply( this, arguments ); 7140 }; 7141 } )( $.fn.button ); 7142 7143 $.fn.buttonset = function() { 7144 if ( !$.ui.controlgroup ) { 7145 $.error( "Controlgroup widget missing" ); 7146 } 7147 if ( arguments[ 0 ] === "option" && arguments[ 1 ] === "items" && arguments[ 2 ] ) { 7148 return this.controlgroup.apply( this, 7149 [ arguments[ 0 ], "items.button", arguments[ 2 ] ] ); 7150 } 7151 if ( arguments[ 0 ] === "option" && arguments[ 1 ] === "items" ) { 7152 return this.controlgroup.apply( this, [ arguments[ 0 ], "items.button" ] ); 7153 } 7154 if ( typeof arguments[ 0 ] === "object" && arguments[ 0 ].items ) { 7155 arguments[ 0 ].items = { 7156 button: arguments[ 0 ].items 7157 }; 7158 } 7159 return this.controlgroup.apply( this, arguments ); 7160 }; 7161} 7162 7163var widgetsButton = $.ui.button; 7164 7165 7166// jscs:disable maximumLineLength 7167/* jscs:disable requireCamelCaseOrUpperCaseIdentifiers */ 7168/*! 7169 * jQuery UI Datepicker 1.12.1 7170 * http://jqueryui.com 7171 * 7172 * Copyright jQuery Foundation and other contributors 7173 * Released under the MIT license. 7174 * http://jquery.org/license 7175 */ 7176 7177//>>label: Datepicker 7178//>>group: Widgets 7179//>>description: Displays a calendar from an input or inline for selecting dates. 7180//>>docs: http://api.jqueryui.com/datepicker/ 7181//>>demos: http://jqueryui.com/datepicker/ 7182//>>css.structure: ../../themes/base/core.css 7183//>>css.structure: ../../themes/base/datepicker.css 7184//>>css.theme: ../../themes/base/theme.css 7185 7186 7187 7188$.extend( $.ui, { datepicker: { version: "1.12.1" } } ); 7189 7190var datepicker_instActive; 7191 7192function datepicker_getZindex( elem ) { 7193 var position, value; 7194 while ( elem.length && elem[ 0 ] !== document ) { 7195 7196 // Ignore z-index if position is set to a value where z-index is ignored by the browser 7197 // This makes behavior of this function consistent across browsers 7198 // WebKit always returns auto if the element is positioned 7199 position = elem.css( "position" ); 7200 if ( position === "absolute" || position === "relative" || position === "fixed" ) { 7201 7202 // IE returns 0 when zIndex is not specified 7203 // other browsers return a string 7204 // we ignore the case of nested elements with an explicit value of 0 7205 // <div style="z-index: -10;"><div style="z-index: 0;"></div></div> 7206 value = parseInt( elem.css( "zIndex" ), 10 ); 7207 if ( !isNaN( value ) && value !== 0 ) { 7208 return value; 7209 } 7210 } 7211 elem = elem.parent(); 7212 } 7213 7214 return 0; 7215} 7216/* Date picker manager. 7217 Use the singleton instance of this class, $.datepicker, to interact with the date picker. 7218 Settings for (groups of) date pickers are maintained in an instance object, 7219 allowing multiple different settings on the same page. */ 7220 7221function Datepicker() { 7222 this._curInst = null; // The current instance in use 7223 this._keyEvent = false; // If the last event was a key event 7224 this._disabledInputs = []; // List of date picker inputs that have been disabled 7225 this._datepickerShowing = false; // True if the popup picker is showing , false if not 7226 this._inDialog = false; // True if showing within a "dialog", false if not 7227 this._mainDivId = "ui-datepicker-div"; // The ID of the main datepicker division 7228 this._inlineClass = "ui-datepicker-inline"; // The name of the inline marker class 7229 this._appendClass = "ui-datepicker-append"; // The name of the append marker class 7230 this._triggerClass = "ui-datepicker-trigger"; // The name of the trigger marker class 7231 this._dialogClass = "ui-datepicker-dialog"; // The name of the dialog marker class 7232 this._disableClass = "ui-datepicker-disabled"; // The name of the disabled covering marker class 7233 this._unselectableClass = "ui-datepicker-unselectable"; // The name of the unselectable cell marker class 7234 this._currentClass = "ui-datepicker-current-day"; // The name of the current day marker class 7235 this._dayOverClass = "ui-datepicker-days-cell-over"; // The name of the day hover marker class 7236 this.regional = []; // Available regional settings, indexed by language code 7237 this.regional[ "" ] = { // Default regional settings 7238 closeText: "Done", // Display text for close link 7239 prevText: "Prev", // Display text for previous month link 7240 nextText: "Next", // Display text for next month link 7241 currentText: "Today", // Display text for current month link 7242 monthNames: [ "January","February","March","April","May","June", 7243 "July","August","September","October","November","December" ], // Names of months for drop-down and formatting 7244 monthNamesShort: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ], // For formatting 7245 dayNames: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], // For formatting 7246 dayNamesShort: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], // For formatting 7247 dayNamesMin: [ "Su","Mo","Tu","We","Th","Fr","Sa" ], // Column headings for days starting at Sunday 7248 weekHeader: "Wk", // Column header for week of the year 7249 dateFormat: "mm/dd/yy", // See format options on parseDate 7250 firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ... 7251 isRTL: false, // True if right-to-left language, false if left-to-right 7252 showMonthAfterYear: false, // True if the year select precedes month, false for month then year 7253 yearSuffix: "" // Additional text to append to the year in the month headers 7254 }; 7255 this._defaults = { // Global defaults for all the date picker instances 7256 showOn: "focus", // "focus" for popup on focus, 7257 // "button" for trigger button, or "both" for either
vendor: 12,662 bytes, lines 7258-7548
7258 showAnim: "fadeIn", // Name of jQuery animation for popup 7259 showOptions: {}, // Options for enhanced animations 7260 defaultDate: null, // Used when field is blank: actual date, 7261 // +/-number for offset from today, null for today 7262 appendText: "", // Display text following the input box, e.g. showing the format 7263 buttonText: "...", // Text for trigger button 7264 buttonImage: "", // URL for trigger button image 7265 buttonImageOnly: false, // True if the image appears alone, false if it appears on a button 7266 hideIfNoPrevNext: false, // True to hide next/previous month links 7267 // if not applicable, false to just disable them 7268 navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links 7269 gotoCurrent: false, // True if today link goes back to current selection instead 7270 changeMonth: false, // True if month can be selected directly, false if only prev/next 7271 changeYear: false, // True if year can be selected directly, false if only prev/next 7272 yearRange: "c-10:c+10", // Range of years to display in drop-down, 7273 // either relative to today's year (-nn:+nn), relative to currently displayed year 7274 // (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n) 7275 showOtherMonths: false, // True to show dates in other months, false to leave blank 7276 selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable 7277 showWeek: false, // True to show week of the year, false to not show it 7278 calculateWeek: this.iso8601Week, // How to calculate the week of the year, 7279 // takes a Date and returns the number of the week for it 7280 shortYearCutoff: "+10", // Short year values < this are in the current century, 7281 // > this are in the previous century, 7282 // string value starting with "+" for current year + value 7283 minDate: null, // The earliest selectable date, or null for no limit 7284 maxDate: null, // The latest selectable date, or null for no limit 7285 duration: "fast", // Duration of display/closure 7286 beforeShowDay: null, // Function that takes a date and returns an array with 7287 // [0] = true if selectable, false if not, [1] = custom CSS class name(s) or "", 7288 // [2] = cell title (optional), e.g. $.datepicker.noWeekends 7289 beforeShow: null, // Function that takes an input field and 7290 // returns a set of custom settings for the date picker 7291 onSelect: null, // Define a callback function when a date is selected 7292 onChangeMonthYear: null, // Define a callback function when the month or year is changed 7293 onClose: null, // Define a callback function when the datepicker is closed 7294 numberOfMonths: 1, // Number of months to show at a time 7295 showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0) 7296 stepMonths: 1, // Number of months to step back/forward 7297 stepBigMonths: 12, // Number of months to step back/forward for the big links 7298 altField: "", // Selector for an alternate field to store selected dates into 7299 altFormat: "", // The date format to use for the alternate field 7300 constrainInput: true, // The input is constrained by the current date format 7301 showButtonPanel: false, // True to show button panel, false to not show it 7302 autoSize: false, // True to size the input for the date format, false to leave as is 7303 disabled: false // The initial disabled state 7304 }; 7305 $.extend( this._defaults, this.regional[ "" ] ); 7306 this.regional.en = $.extend( true, {}, this.regional[ "" ] ); 7307 this.regional[ "en-US" ] = $.extend( true, {}, this.regional.en ); 7308 this.dpDiv = datepicker_bindHover( $( "<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>" ) ); 7309} 7310 7311$.extend( Datepicker.prototype, { 7312 /* Class name added to elements to indicate already configured with a date picker. */ 7313 markerClassName: "hasDatepicker", 7314 7315 //Keep track of the maximum number of rows displayed (see #7043) 7316 maxRows: 4, 7317 7318 // TODO rename to "widget" when switching to widget factory 7319 _widgetDatepicker: function() { 7320 return this.dpDiv; 7321 }, 7322 7323 /* Override the default settings for all instances of the date picker. 7324 * @param settings object - the new settings to use as defaults (anonymous object) 7325 * @return the manager object 7326 */ 7327 setDefaults: function( settings ) { 7328 datepicker_extendRemove( this._defaults, settings || {} ); 7329 return this; 7330 }, 7331 7332 /* Attach the date picker to a jQuery selection. 7333 * @param target element - the target input field or division or span 7334 * @param settings object - the new settings to use for this date picker instance (anonymous) 7335 */ 7336 _attachDatepicker: function( target, settings ) { 7337 var nodeName, inline, inst; 7338 nodeName = target.nodeName.toLowerCase(); 7339 inline = ( nodeName === "div" || nodeName === "span" ); 7340 if ( !target.id ) { 7341 this.uuid += 1; 7342 target.id = "dp" + this.uuid; 7343 } 7344 inst = this._newInst( $( target ), inline ); 7345 inst.settings = $.extend( {}, settings || {} ); 7346 if ( nodeName === "input" ) { 7347 this._connectDatepicker( target, inst ); 7348 } else if ( inline ) { 7349 this._inlineDatepicker( target, inst ); 7350 } 7351 }, 7352 7353 /* Create a new instance object. */ 7354 _newInst: function( target, inline ) { 7355 var id = target[ 0 ].id.replace( /([^A-Za-z0-9_\-])/g, "\\\\$1" ); // escape jQuery meta chars 7356 return { id: id, input: target, // associated target 7357 selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection 7358 drawMonth: 0, drawYear: 0, // month being drawn 7359 inline: inline, // is datepicker inline or not 7360 dpDiv: ( !inline ? this.dpDiv : // presentation div 7361 datepicker_bindHover( $( "<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>" ) ) ) }; 7362 }, 7363 7364 /* Attach the date picker to an input field. */ 7365 _connectDatepicker: function( target, inst ) { 7366 var input = $( target ); 7367 inst.append = $( [] ); 7368 inst.trigger = $( [] ); 7369 if ( input.hasClass( this.markerClassName ) ) { 7370 return; 7371 } 7372 this._attachments( input, inst ); 7373 input.addClass( this.markerClassName ).on( "keydown", this._doKeyDown ). 7374 on( "keypress", this._doKeyPress ).on( "keyup", this._doKeyUp ); 7375 this._autoSize( inst ); 7376 $.data( target, "datepicker", inst ); 7377 7378 //If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665) 7379 if ( inst.settings.disabled ) { 7380 this._disableDatepicker( target ); 7381 } 7382 }, 7383 7384 /* Make attachments based on settings. */ 7385 _attachments: function( input, inst ) { 7386 var showOn, buttonText, buttonImage, 7387 appendText = this._get( inst, "appendText" ), 7388 isRTL = this._get( inst, "isRTL" ); 7389 7390 if ( inst.append ) { 7391 inst.append.remove(); 7392 } 7393 if ( appendText ) { 7394 inst.append = $( "<span class='" + this._appendClass + "'>" + appendText + "</span>" ); 7395 input[ isRTL ? "before" : "after" ]( inst.append ); 7396 } 7397 7398 input.off( "focus", this._showDatepicker ); 7399 7400 if ( inst.trigger ) { 7401 inst.trigger.remove(); 7402 } 7403 7404 showOn = this._get( inst, "showOn" ); 7405 if ( showOn === "focus" || showOn === "both" ) { // pop-up date picker when in the marked field 7406 input.on( "focus", this._showDatepicker ); 7407 } 7408 if ( showOn === "button" || showOn === "both" ) { // pop-up date picker when button clicked 7409 buttonText = this._get( inst, "buttonText" ); 7410 buttonImage = this._get( inst, "buttonImage" ); 7411 inst.trigger = $( this._get( inst, "buttonImageOnly" ) ? 7412 $( "<img/>" ).addClass( this._triggerClass ). 7413 attr( { src: buttonImage, alt: buttonText, title: buttonText } ) : 7414 $( "<button type='button'></button>" ).addClass( this._triggerClass ). 7415 html( !buttonImage ? buttonText : $( "<img/>" ).attr( 7416 { src:buttonImage, alt:buttonText, title:buttonText } ) ) ); 7417 input[ isRTL ? "before" : "after" ]( inst.trigger ); 7418 inst.trigger.on( "click", function() { 7419 if ( $.datepicker._datepickerShowing && $.datepicker._lastInput === input[ 0 ] ) { 7420 $.datepicker._hideDatepicker(); 7421 } else if ( $.datepicker._datepickerShowing && $.datepicker._lastInput !== input[ 0 ] ) { 7422 $.datepicker._hideDatepicker(); 7423 $.datepicker._showDatepicker( input[ 0 ] ); 7424 } else { 7425 $.datepicker._showDatepicker( input[ 0 ] ); 7426 } 7427 return false; 7428 } ); 7429 } 7430 }, 7431 7432 /* Apply the maximum length for the date format. */ 7433 _autoSize: function( inst ) { 7434 if ( this._get( inst, "autoSize" ) && !inst.inline ) { 7435 var findMax, max, maxI, i, 7436 date = new Date( 2009, 12 - 1, 20 ), // Ensure double digits 7437 dateFormat = this._get( inst, "dateFormat" ); 7438 7439 if ( dateFormat.match( /[DM]/ ) ) { 7440 findMax = function( names ) { 7441 max = 0; 7442 maxI = 0; 7443 for ( i = 0; i < names.length; i++ ) { 7444 if ( names[ i ].length > max ) { 7445 max = names[ i ].length; 7446 maxI = i; 7447 } 7448 } 7449 return maxI; 7450 }; 7451 date.setMonth( findMax( this._get( inst, ( dateFormat.match( /MM/ ) ? 7452 "monthNames" : "monthNamesShort" ) ) ) ); 7453 date.setDate( findMax( this._get( inst, ( dateFormat.match( /DD/ ) ? 7454 "dayNames" : "dayNamesShort" ) ) ) + 20 - date.getDay() ); 7455 } 7456 inst.input.attr( "size", this._formatDate( inst, date ).length ); 7457 } 7458 }, 7459 7460 /* Attach an inline date picker to a div. */ 7461 _inlineDatepicker: function( target, inst ) { 7462 var divSpan = $( target ); 7463 if ( divSpan.hasClass( this.markerClassName ) ) { 7464 return; 7465 } 7466 divSpan.addClass( this.markerClassName ).append( inst.dpDiv ); 7467 $.data( target, "datepicker", inst ); 7468 this._setDate( inst, this._getDefaultDate( inst ), true ); 7469 this._updateDatepicker( inst ); 7470 this._updateAlternate( inst ); 7471 7472 //If disabled option is true, disable the datepicker before showing it (see ticket #5665) 7473 if ( inst.settings.disabled ) { 7474 this._disableDatepicker( target ); 7475 } 7476 7477 // Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements 7478 // http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height 7479 inst.dpDiv.css( "display", "block" ); 7480 }, 7481 7482 /* Pop-up the date picker in a "dialog" box. 7483 * @param input element - ignored 7484 * @param date string or Date - the initial date to display 7485 * @param onSelect function - the function to call when a date is selected 7486 * @param settings object - update the dialog date picker instance's settings (anonymous object) 7487 * @param pos int[2] - coordinates for the dialog's position within the screen or 7488 * event - with x/y coordinates or 7489 * leave empty for default (screen centre) 7490 * @return the manager object 7491 */ 7492 _dialogDatepicker: function( input, date, onSelect, settings, pos ) { 7493 var id, browserWidth, browserHeight, scrollX, scrollY, 7494 inst = this._dialogInst; // internal instance 7495 7496 if ( !inst ) { 7497 this.uuid += 1; 7498 id = "dp" + this.uuid; 7499 this._dialogInput = $( "<input type='text' id='" + id + 7500 "' style='position: absolute; top: -100px; width: 0px;'/>" ); 7501 this._dialogInput.on( "keydown", this._doKeyDown ); 7502 $( "body" ).append( this._dialogInput ); 7503 inst = this._dialogInst = this._newInst( this._dialogInput, false ); 7504 inst.settings = {}; 7505 $.data( this._dialogInput[ 0 ], "datepicker", inst ); 7506 } 7507 datepicker_extendRemove( inst.settings, settings || {} ); 7508 date = ( date && date.constructor === Date ? this._formatDate( inst, date ) : date ); 7509 this._dialogInput.val( date ); 7510 7511 this._pos = ( pos ? ( pos.length ? pos : [ pos.pageX, pos.pageY ] ) : null ); 7512 if ( !this._pos ) { 7513 browserWidth = document.documentElement.clientWidth; 7514 browserHeight = document.documentElement.clientHeight; 7515 scrollX = document.documentElement.scrollLeft || document.body.scrollLeft; 7516 scrollY = document.documentElement.scrollTop || document.body.scrollTop; 7517 this._pos = // should use actual width/height below 7518 [ ( browserWidth / 2 ) - 100 + scrollX, ( browserHeight / 2 ) - 150 + scrollY ]; 7519 } 7520 7521 // Move input on screen for focus, but hidden behind dialog 7522 this._dialogInput.css( "left", ( this._pos[ 0 ] + 20 ) + "px" ).css( "top", this._pos[ 1 ] + "px" ); 7523 inst.settings.onSelect = onSelect; 7524 this._inDialog = true; 7525 this.dpDiv.addClass( this._dialogClass ); 7526 this._showDatepicker( this._dialogInput[ 0 ] ); 7527 if ( $.blockUI ) { 7528 $.blockUI( this.dpDiv ); 7529 } 7530 $.data( this._dialogInput[ 0 ], "datepicker", inst ); 7531 return this; 7532 }, 7533 7534 /* Detach a datepicker from its control. 7535 * @param target element - the target input field or division or span 7536 */ 7537 _destroyDatepicker: function( target ) { 7538 var nodeName, 7539 $target = $( target ), 7540 inst = $.data( target, "datepicker" ); 7541 7542 if ( !$target.hasClass( this.markerClassName ) ) { 7543 return; 7544 } 7545 7546 nodeName = target.nodeName.toLowerCase(); 7547 $.removeData( target, "datepicker" ); 7548 if ( nodeName === "input" ) {
vendor: 7,135 bytes, lines 7549-7761
7549 inst.append.remove(); 7550 inst.trigger.remove(); 7551 $target.removeClass( this.markerClassName ). 7552 off( "focus", this._showDatepicker ). 7553 off( "keydown", this._doKeyDown ). 7554 off( "keypress", this._doKeyPress ). 7555 off( "keyup", this._doKeyUp ); 7556 } else if ( nodeName === "div" || nodeName === "span" ) { 7557 $target.removeClass( this.markerClassName ).empty(); 7558 } 7559 7560 if ( datepicker_instActive === inst ) { 7561 datepicker_instActive = null; 7562 } 7563 }, 7564 7565 /* Enable the date picker to a jQuery selection. 7566 * @param target element - the target input field or division or span 7567 */ 7568 _enableDatepicker: function( target ) { 7569 var nodeName, inline, 7570 $target = $( target ), 7571 inst = $.data( target, "datepicker" ); 7572 7573 if ( !$target.hasClass( this.markerClassName ) ) { 7574 return; 7575 } 7576 7577 nodeName = target.nodeName.toLowerCase(); 7578 if ( nodeName === "input" ) { 7579 target.disabled = false; 7580 inst.trigger.filter( "button" ). 7581 each( function() { this.disabled = false; } ).end(). 7582 filter( "img" ).css( { opacity: "1.0", cursor: "" } ); 7583 } else if ( nodeName === "div" || nodeName === "span" ) { 7584 inline = $target.children( "." + this._inlineClass ); 7585 inline.children().removeClass( "ui-state-disabled" ); 7586 inline.find( "select.ui-datepicker-month, select.ui-datepicker-year" ). 7587 prop( "disabled", false ); 7588 } 7589 this._disabledInputs = $.map( this._disabledInputs, 7590 function( value ) { return ( value === target ? null : value ); } ); // delete entry 7591 }, 7592 7593 /* Disable the date picker to a jQuery selection. 7594 * @param target element - the target input field or division or span 7595 */ 7596 _disableDatepicker: function( target ) { 7597 var nodeName, inline, 7598 $target = $( target ), 7599 inst = $.data( target, "datepicker" ); 7600 7601 if ( !$target.hasClass( this.markerClassName ) ) { 7602 return; 7603 } 7604 7605 nodeName = target.nodeName.toLowerCase(); 7606 if ( nodeName === "input" ) { 7607 target.disabled = true; 7608 inst.trigger.filter( "button" ). 7609 each( function() { this.disabled = true; } ).end(). 7610 filter( "img" ).css( { opacity: "0.5", cursor: "default" } ); 7611 } else if ( nodeName === "div" || nodeName === "span" ) { 7612 inline = $target.children( "." + this._inlineClass ); 7613 inline.children().addClass( "ui-state-disabled" ); 7614 inline.find( "select.ui-datepicker-month, select.ui-datepicker-year" ). 7615 prop( "disabled", true ); 7616 } 7617 this._disabledInputs = $.map( this._disabledInputs, 7618 function( value ) { return ( value === target ? null : value ); } ); // delete entry 7619 this._disabledInputs[ this._disabledInputs.length ] = target; 7620 }, 7621 7622 /* Is the first field in a jQuery collection disabled as a datepicker? 7623 * @param target element - the target input field or division or span 7624 * @return boolean - true if disabled, false if enabled 7625 */ 7626 _isDisabledDatepicker: function( target ) { 7627 if ( !target ) { 7628 return false; 7629 } 7630 for ( var i = 0; i < this._disabledInputs.length; i++ ) { 7631 if ( this._disabledInputs[ i ] === target ) { 7632 return true; 7633 } 7634 } 7635 return false; 7636 }, 7637 7638 /* Retrieve the instance data for the target control. 7639 * @param target element - the target input field or division or span 7640 * @return object - the associated instance data 7641 * @throws error if a jQuery problem getting data 7642 */ 7643 _getInst: function( target ) { 7644 try { 7645 return $.data( target, "datepicker" ); 7646 } 7647 catch ( err ) { 7648 throw "Missing instance data for this datepicker"; 7649 } 7650 }, 7651 7652 /* Update or retrieve the settings for a date picker attached to an input field or division. 7653 * @param target element - the target input field or division or span 7654 * @param name object - the new settings to update or 7655 * string - the name of the setting to change or retrieve, 7656 * when retrieving also "all" for all instance settings or 7657 * "defaults" for all global defaults 7658 * @param value any - the new value for the setting 7659 * (omit if above is an object or to retrieve a value) 7660 */ 7661 _optionDatepicker: function( target, name, value ) { 7662 var settings, date, minDate, maxDate, 7663 inst = this._getInst( target ); 7664 7665 if ( arguments.length === 2 && typeof name === "string" ) { 7666 return ( name === "defaults" ? $.extend( {}, $.datepicker._defaults ) : 7667 ( inst ? ( name === "all" ? $.extend( {}, inst.settings ) : 7668 this._get( inst, name ) ) : null ) ); 7669 } 7670 7671 settings = name || {}; 7672 if ( typeof name === "string" ) { 7673 settings = {}; 7674 settings[ name ] = value; 7675 } 7676 7677 if ( inst ) { 7678 if ( this._curInst === inst ) { 7679 this._hideDatepicker(); 7680 } 7681 7682 date = this._getDateDatepicker( target, true ); 7683 minDate = this._getMinMaxDate( inst, "min" ); 7684 maxDate = this._getMinMaxDate( inst, "max" ); 7685 datepicker_extendRemove( inst.settings, settings ); 7686 7687 // reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided 7688 if ( minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined ) { 7689 inst.settings.minDate = this._formatDate( inst, minDate ); 7690 } 7691 if ( maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined ) { 7692 inst.settings.maxDate = this._formatDate( inst, maxDate ); 7693 } 7694 if ( "disabled" in settings ) { 7695 if ( settings.disabled ) { 7696 this._disableDatepicker( target ); 7697 } else { 7698 this._enableDatepicker( target ); 7699 } 7700 } 7701 this._attachments( $( target ), inst ); 7702 this._autoSize( inst ); 7703 this._setDate( inst, date ); 7704 this._updateAlternate( inst ); 7705 this._updateDatepicker( inst ); 7706 } 7707 }, 7708 7709 // Change method deprecated 7710 _changeDatepicker: function( target, name, value ) { 7711 this._optionDatepicker( target, name, value ); 7712 }, 7713 7714 /* Redraw the date picker attached to an input field or division. 7715 * @param target element - the target input field or division or span 7716 */ 7717 _refreshDatepicker: function( target ) { 7718 var inst = this._getInst( target ); 7719 if ( inst ) { 7720 this._updateDatepicker( inst ); 7721 } 7722 }, 7723 7724 /* Set the dates for a jQuery selection. 7725 * @param target element - the target input field or division or span 7726 * @param date Date - the new date 7727 */ 7728 _setDateDatepicker: function( target, date ) { 7729 var inst = this._getInst( target ); 7730 if ( inst ) { 7731 this._setDate( inst, date ); 7732 this._updateDatepicker( inst ); 7733 this._updateAlternate( inst ); 7734 } 7735 }, 7736 7737 /* Get the date(s) for the first entry in a jQuery selection. 7738 * @param target element - the target input field or division or span 7739 * @param noDefault boolean - true if no default date is to be used 7740 * @return Date - the current date 7741 */ 7742 _getDateDatepicker: function( target, noDefault ) { 7743 var inst = this._getInst( target ); 7744 if ( inst && !inst.inline ) { 7745 this._setDateFromField( inst, noDefault ); 7746 } 7747 return ( inst ? this._getDate( inst ) : null ); 7748 }, 7749 7750 /* Handle keystrokes. */ 7751 _doKeyDown: function( event ) { 7752 var onSelect, dateStr, sel, 7753 inst = $.datepicker._getInst( event.target ), 7754 handled = true, 7755 isRTL = inst.dpDiv.is( ".ui-datepicker-rtl" ); 7756 7757 inst._keyEvent = true; 7758 if ( $.datepicker._datepickerShowing ) { 7759 switch ( event.keyCode ) { 7760 case 9: $.datepicker._hideDatepicker(); 7761 handled = false;
vendor: 8,894 bytes, lines 7762-8011
7762 break; // hide on tab out 7763 case 13: sel = $( "td." + $.datepicker._dayOverClass + ":not(." + 7764 $.datepicker._currentClass + ")", inst.dpDiv ); 7765 if ( sel[ 0 ] ) { 7766 $.datepicker._selectDay( event.target, inst.selectedMonth, inst.selectedYear, sel[ 0 ] ); 7767 } 7768 7769 onSelect = $.datepicker._get( inst, "onSelect" ); 7770 if ( onSelect ) { 7771 dateStr = $.datepicker._formatDate( inst ); 7772 7773 // Trigger custom callback 7774 onSelect.apply( ( inst.input ? inst.input[ 0 ] : null ), [ dateStr, inst ] ); 7775 } else { 7776 $.datepicker._hideDatepicker(); 7777 } 7778 7779 return false; // don't submit the form 7780 case 27: $.datepicker._hideDatepicker(); 7781 break; // hide on escape 7782 case 33: $.datepicker._adjustDate( event.target, ( event.ctrlKey ? 7783 -$.datepicker._get( inst, "stepBigMonths" ) : 7784 -$.datepicker._get( inst, "stepMonths" ) ), "M" ); 7785 break; // previous month/year on page up/+ ctrl 7786 case 34: $.datepicker._adjustDate( event.target, ( event.ctrlKey ? 7787 +$.datepicker._get( inst, "stepBigMonths" ) : 7788 +$.datepicker._get( inst, "stepMonths" ) ), "M" ); 7789 break; // next month/year on page down/+ ctrl 7790 case 35: if ( event.ctrlKey || event.metaKey ) { 7791 $.datepicker._clearDate( event.target ); 7792 } 7793 handled = event.ctrlKey || event.metaKey; 7794 break; // clear on ctrl or command +end 7795 case 36: if ( event.ctrlKey || event.metaKey ) { 7796 $.datepicker._gotoToday( event.target ); 7797 } 7798 handled = event.ctrlKey || event.metaKey; 7799 break; // current on ctrl or command +home 7800 case 37: if ( event.ctrlKey || event.metaKey ) { 7801 $.datepicker._adjustDate( event.target, ( isRTL ? +1 : -1 ), "D" ); 7802 } 7803 handled = event.ctrlKey || event.metaKey; 7804 7805 // -1 day on ctrl or command +left 7806 if ( event.originalEvent.altKey ) { 7807 $.datepicker._adjustDate( event.target, ( event.ctrlKey ? 7808 -$.datepicker._get( inst, "stepBigMonths" ) : 7809 -$.datepicker._get( inst, "stepMonths" ) ), "M" ); 7810 } 7811 7812 // next month/year on alt +left on Mac 7813 break; 7814 case 38: if ( event.ctrlKey || event.metaKey ) { 7815 $.datepicker._adjustDate( event.target, -7, "D" ); 7816 } 7817 handled = event.ctrlKey || event.metaKey; 7818 break; // -1 week on ctrl or command +up 7819 case 39: if ( event.ctrlKey || event.metaKey ) { 7820 $.datepicker._adjustDate( event.target, ( isRTL ? -1 : +1 ), "D" ); 7821 } 7822 handled = event.ctrlKey || event.metaKey; 7823 7824 // +1 day on ctrl or command +right 7825 if ( event.originalEvent.altKey ) { 7826 $.datepicker._adjustDate( event.target, ( event.ctrlKey ? 7827 +$.datepicker._get( inst, "stepBigMonths" ) : 7828 +$.datepicker._get( inst, "stepMonths" ) ), "M" ); 7829 } 7830 7831 // next month/year on alt +right 7832 break; 7833 case 40: if ( event.ctrlKey || event.metaKey ) { 7834 $.datepicker._adjustDate( event.target, +7, "D" ); 7835 } 7836 handled = event.ctrlKey || event.metaKey; 7837 break; // +1 week on ctrl or command +down 7838 default: handled = false; 7839 } 7840 } else if ( event.keyCode === 36 && event.ctrlKey ) { // display the date picker on ctrl+home 7841 $.datepicker._showDatepicker( this ); 7842 } else { 7843 handled = false; 7844 } 7845 7846 if ( handled ) { 7847 event.preventDefault(); 7848 event.stopPropagation(); 7849 } 7850 }, 7851 7852 /* Filter entered characters - based on date format. */ 7853 _doKeyPress: function( event ) { 7854 var chars, chr, 7855 inst = $.datepicker._getInst( event.target ); 7856 7857 if ( $.datepicker._get( inst, "constrainInput" ) ) { 7858 chars = $.datepicker._possibleChars( $.datepicker._get( inst, "dateFormat" ) ); 7859 chr = String.fromCharCode( event.charCode == null ? event.keyCode : event.charCode ); 7860 return event.ctrlKey || event.metaKey || ( chr < " " || !chars || chars.indexOf( chr ) > -1 ); 7861 } 7862 }, 7863 7864 /* Synchronise manual entry and field/alternate field. */ 7865 _doKeyUp: function( event ) { 7866 var date, 7867 inst = $.datepicker._getInst( event.target ); 7868 7869 if ( inst.input.val() !== inst.lastVal ) { 7870 try { 7871 date = $.datepicker.parseDate( $.datepicker._get( inst, "dateFormat" ), 7872 ( inst.input ? inst.input.val() : null ), 7873 $.datepicker._getFormatConfig( inst ) ); 7874 7875 if ( date ) { // only if valid 7876 $.datepicker._setDateFromField( inst ); 7877 $.datepicker._updateAlternate( inst ); 7878 $.datepicker._updateDatepicker( inst ); 7879 } 7880 } 7881 catch ( err ) { 7882 } 7883 } 7884 return true; 7885 }, 7886 7887 /* Pop-up the date picker for a given input field. 7888 * If false returned from beforeShow event handler do not show. 7889 * @param input element - the input field attached to the date picker or 7890 * event - if triggered by focus 7891 */ 7892 _showDatepicker: function( input ) { 7893 input = input.target || input; 7894 if ( input.nodeName.toLowerCase() !== "input" ) { // find from button/image trigger 7895 input = $( "input", input.parentNode )[ 0 ]; 7896 } 7897 7898 if ( $.datepicker._isDisabledDatepicker( input ) || $.datepicker._lastInput === input ) { // already here 7899 return; 7900 } 7901 7902 var inst, beforeShow, beforeShowSettings, isFixed, 7903 offset, showAnim, duration; 7904 7905 inst = $.datepicker._getInst( input ); 7906 if ( $.datepicker._curInst && $.datepicker._curInst !== inst ) { 7907 $.datepicker._curInst.dpDiv.stop( true, true ); 7908 if ( inst && $.datepicker._datepickerShowing ) { 7909 $.datepicker._hideDatepicker( $.datepicker._curInst.input[ 0 ] ); 7910 } 7911 } 7912 7913 beforeShow = $.datepicker._get( inst, "beforeShow" ); 7914 beforeShowSettings = beforeShow ? beforeShow.apply( input, [ input, inst ] ) : {}; 7915 if ( beforeShowSettings === false ) { 7916 return; 7917 } 7918 datepicker_extendRemove( inst.settings, beforeShowSettings ); 7919 7920 inst.lastVal = null; 7921 $.datepicker._lastInput = input; 7922 $.datepicker._setDateFromField( inst ); 7923 7924 if ( $.datepicker._inDialog ) { // hide cursor 7925 input.value = ""; 7926 } 7927 if ( !$.datepicker._pos ) { // position below input 7928 $.datepicker._pos = $.datepicker._findPos( input ); 7929 $.datepicker._pos[ 1 ] += input.offsetHeight; // add the height 7930 } 7931 7932 isFixed = false; 7933 $( input ).parents().each( function() { 7934 isFixed |= $( this ).css( "position" ) === "fixed"; 7935 return !isFixed; 7936 } ); 7937 7938 offset = { left: $.datepicker._pos[ 0 ], top: $.datepicker._pos[ 1 ] }; 7939 $.datepicker._pos = null; 7940 7941 //to avoid flashes on Firefox 7942 inst.dpDiv.empty(); 7943 7944 // determine sizing offscreen 7945 inst.dpDiv.css( { position: "absolute", display: "block", top: "-1000px" } ); 7946 $.datepicker._updateDatepicker( inst ); 7947 7948 // fix width for dynamic number of date pickers 7949 // and adjust position before showing 7950 offset = $.datepicker._checkOffset( inst, offset, isFixed ); 7951 inst.dpDiv.css( { position: ( $.datepicker._inDialog && $.blockUI ? 7952 "static" : ( isFixed ? "fixed" : "absolute" ) ), display: "none", 7953 left: offset.left + "px", top: offset.top + "px" } ); 7954 7955 if ( !inst.inline ) { 7956 showAnim = $.datepicker._get( inst, "showAnim" ); 7957 duration = $.datepicker._get( inst, "duration" ); 7958 inst.dpDiv.css( "z-index", datepicker_getZindex( $( input ) ) + 1 ); 7959 $.datepicker._datepickerShowing = true; 7960 7961 if ( $.effects && $.effects.effect[ showAnim ] ) { 7962 inst.dpDiv.show( showAnim, $.datepicker._get( inst, "showOptions" ), duration ); 7963 } else { 7964 inst.dpDiv[ showAnim || "show" ]( showAnim ? duration : null ); 7965 } 7966 7967 if ( $.datepicker._shouldFocusInput( inst ) ) { 7968 inst.input.trigger( "focus" ); 7969 } 7970 7971 $.datepicker._curInst = inst; 7972 } 7973 }, 7974 7975 /* Generate the date picker content. */ 7976 _updateDatepicker: function( inst ) { 7977 this.maxRows = 4; //Reset the max number of rows being displayed (see #7043) 7978 datepicker_instActive = inst; // for delegate hover events 7979 inst.dpDiv.empty().append( this._generateHTML( inst ) ); 7980 this._attachHandlers( inst ); 7981 7982 var origyearshtml, 7983 numMonths = this._getNumberOfMonths( inst ), 7984 cols = numMonths[ 1 ], 7985 width = 17, 7986 activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" ); 7987 7988 if ( activeCell.length > 0 ) { 7989 datepicker_handleMouseover.apply( activeCell.get( 0 ) ); 7990 } 7991 7992 inst.dpDiv.removeClass( "ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4" ).width( "" ); 7993 if ( cols > 1 ) { 7994 inst.dpDiv.addClass( "ui-datepicker-multi-" + cols ).css( "width", ( width * cols ) + "em" ); 7995 } 7996 inst.dpDiv[ ( numMonths[ 0 ] !== 1 || numMonths[ 1 ] !== 1 ? "add" : "remove" ) + 7997 "Class" ]( "ui-datepicker-multi" ); 7998 inst.dpDiv[ ( this._get( inst, "isRTL" ) ? "add" : "remove" ) + 7999 "Class" ]( "ui-datepicker-rtl" ); 8000 8001 if ( inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) { 8002 inst.input.trigger( "focus" ); 8003 } 8004 8005 // Deffered render of the years select (to avoid flashes on Firefox) 8006 if ( inst.yearshtml ) { 8007 origyearshtml = inst.yearshtml; 8008 setTimeout( function() { 8009 8010 //assure that inst.yearshtml didn't change. 8011 if ( origyearshtml === inst.yearshtml && inst.yearshtml ) {
vendor: 5,480 bytes, lines 8012-8168
8012 inst.dpDiv.find( "select.ui-datepicker-year:first" ).replaceWith( inst.yearshtml ); 8013 } 8014 origyearshtml = inst.yearshtml = null; 8015 }, 0 ); 8016 } 8017 }, 8018 8019 // #6694 - don't focus the input if it's already focused 8020 // this breaks the change event in IE 8021 // Support: IE and jQuery <1.9 8022 _shouldFocusInput: function( inst ) { 8023 return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" ); 8024 }, 8025 8026 /* Check positioning to remain on screen. */ 8027 _checkOffset: function( inst, offset, isFixed ) { 8028 var dpWidth = inst.dpDiv.outerWidth(), 8029 dpHeight = inst.dpDiv.outerHeight(), 8030 inputWidth = inst.input ? inst.input.outerWidth() : 0, 8031 inputHeight = inst.input ? inst.input.outerHeight() : 0, 8032 viewWidth = document.documentElement.clientWidth + ( isFixed ? 0 : $( document ).scrollLeft() ), 8033 viewHeight = document.documentElement.clientHeight + ( isFixed ? 0 : $( document ).scrollTop() ); 8034 8035 offset.left -= ( this._get( inst, "isRTL" ) ? ( dpWidth - inputWidth ) : 0 ); 8036 offset.left -= ( isFixed && offset.left === inst.input.offset().left ) ? $( document ).scrollLeft() : 0; 8037 offset.top -= ( isFixed && offset.top === ( inst.input.offset().top + inputHeight ) ) ? $( document ).scrollTop() : 0; 8038 8039 // Now check if datepicker is showing outside window viewport - move to a better place if so. 8040 offset.left -= Math.min( offset.left, ( offset.left + dpWidth > viewWidth && viewWidth > dpWidth ) ? 8041 Math.abs( offset.left + dpWidth - viewWidth ) : 0 ); 8042 offset.top -= Math.min( offset.top, ( offset.top + dpHeight > viewHeight && viewHeight > dpHeight ) ? 8043 Math.abs( dpHeight + inputHeight ) : 0 ); 8044 8045 return offset; 8046 }, 8047 8048 /* Find an object's position on the screen. */ 8049 _findPos: function( obj ) { 8050 var position, 8051 inst = this._getInst( obj ), 8052 isRTL = this._get( inst, "isRTL" ); 8053 8054 while ( obj && ( obj.type === "hidden" || obj.nodeType !== 1 || $.expr.filters.hidden( obj ) ) ) { 8055 obj = obj[ isRTL ? "previousSibling" : "nextSibling" ]; 8056 } 8057 8058 position = $( obj ).offset(); 8059 return [ position.left, position.top ]; 8060 }, 8061 8062 /* Hide the date picker from view. 8063 * @param input element - the input field attached to the date picker 8064 */ 8065 _hideDatepicker: function( input ) { 8066 var showAnim, duration, postProcess, onClose, 8067 inst = this._curInst; 8068 8069 if ( !inst || ( input && inst !== $.data( input, "datepicker" ) ) ) { 8070 return; 8071 } 8072 8073 if ( this._datepickerShowing ) { 8074 showAnim = this._get( inst, "showAnim" ); 8075 duration = this._get( inst, "duration" ); 8076 postProcess = function() { 8077 $.datepicker._tidyDialog( inst ); 8078 }; 8079 8080 // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed 8081 if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) { 8082 inst.dpDiv.hide( showAnim, $.datepicker._get( inst, "showOptions" ), duration, postProcess ); 8083 } else { 8084 inst.dpDiv[ ( showAnim === "slideDown" ? "slideUp" : 8085 ( showAnim === "fadeIn" ? "fadeOut" : "hide" ) ) ]( ( showAnim ? duration : null ), postProcess ); 8086 } 8087 8088 if ( !showAnim ) { 8089 postProcess(); 8090 } 8091 this._datepickerShowing = false; 8092 8093 onClose = this._get( inst, "onClose" ); 8094 if ( onClose ) { 8095 onClose.apply( ( inst.input ? inst.input[ 0 ] : null ), [ ( inst.input ? inst.input.val() : "" ), inst ] ); 8096 } 8097 8098 this._lastInput = null; 8099 if ( this._inDialog ) { 8100 this._dialogInput.css( { position: "absolute", left: "0", top: "-100px" } ); 8101 if ( $.blockUI ) { 8102 $.unblockUI(); 8103 $( "body" ).append( this.dpDiv ); 8104 } 8105 } 8106 this._inDialog = false; 8107 } 8108 }, 8109 8110 /* Tidy up after a dialog display. */ 8111 _tidyDialog: function( inst ) { 8112 inst.dpDiv.removeClass( this._dialogClass ).off( ".ui-datepicker-calendar" ); 8113 }, 8114 8115 /* Close date picker if clicked elsewhere. */ 8116 _checkExternalClick: function( event ) { 8117 if ( !$.datepicker._curInst ) { 8118 return; 8119 } 8120 8121 var $target = $( event.target ), 8122 inst = $.datepicker._getInst( $target[ 0 ] ); 8123 8124 if ( ( ( $target[ 0 ].id !== $.datepicker._mainDivId && 8125 $target.parents( "#" + $.datepicker._mainDivId ).length === 0 && 8126 !$target.hasClass( $.datepicker.markerClassName ) && 8127 !$target.closest( "." + $.datepicker._triggerClass ).length && 8128 $.datepicker._datepickerShowing && !( $.datepicker._inDialog && $.blockUI ) ) ) || 8129 ( $target.hasClass( $.datepicker.markerClassName ) && $.datepicker._curInst !== inst ) ) { 8130 $.datepicker._hideDatepicker(); 8131 } 8132 }, 8133 8134 /* Adjust one of the date sub-fields. */ 8135 _adjustDate: function( id, offset, period ) { 8136 var target = $( id ), 8137 inst = this._getInst( target[ 0 ] ); 8138 8139 if ( this._isDisabledDatepicker( target[ 0 ] ) ) { 8140 return; 8141 } 8142 this._adjustInstDate( inst, offset + 8143 ( period === "M" ? this._get( inst, "showCurrentAtPos" ) : 0 ), // undo positioning 8144 period ); 8145 this._updateDatepicker( inst ); 8146 }, 8147 8148 /* Action for current link. */ 8149 _gotoToday: function( id ) { 8150 var date, 8151 target = $( id ), 8152 inst = this._getInst( target[ 0 ] ); 8153 8154 if ( this._get( inst, "gotoCurrent" ) && inst.currentDay ) { 8155 inst.selectedDay = inst.currentDay; 8156 inst.drawMonth = inst.selectedMonth = inst.currentMonth; 8157 inst.drawYear = inst.selectedYear = inst.currentYear; 8158 } else { 8159 date = new Date(); 8160 inst.selectedDay = date.getDate(); 8161 inst.drawMonth = inst.selectedMonth = date.getMonth(); 8162 inst.drawYear = inst.selectedYear = date.getFullYear(); 8163 } 8164 this._notifyChange( inst ); 8165 this._adjustDate( target ); 8166 }, 8167 8168 /* Action for selecting a new month/year. */
vendor: 2,372 bytes, lines 8169-8244
8169 _selectMonthYear: function( id, select, period ) { 8170 var target = $( id ), 8171 inst = this._getInst( target[ 0 ] ); 8172 8173 inst[ "selected" + ( period === "M" ? "Month" : "Year" ) ] = 8174 inst[ "draw" + ( period === "M" ? "Month" : "Year" ) ] = 8175 parseInt( select.options[ select.selectedIndex ].value, 10 ); 8176 8177 this._notifyChange( inst ); 8178 this._adjustDate( target ); 8179 }, 8180 8181 /* Action for selecting a day. */ 8182 _selectDay: function( id, month, year, td ) { 8183 var inst, 8184 target = $( id ); 8185 8186 if ( $( td ).hasClass( this._unselectableClass ) || this._isDisabledDatepicker( target[ 0 ] ) ) { 8187 return; 8188 } 8189 8190 inst = this._getInst( target[ 0 ] ); 8191 inst.selectedDay = inst.currentDay = $( "a", td ).html(); 8192 inst.selectedMonth = inst.currentMonth = month; 8193 inst.selectedYear = inst.currentYear = year; 8194 this._selectDate( id, this._formatDate( inst, 8195 inst.currentDay, inst.currentMonth, inst.currentYear ) ); 8196 }, 8197 8198 /* Erase the input field and hide the date picker. */ 8199 _clearDate: function( id ) { 8200 var target = $( id ); 8201 this._selectDate( target, "" ); 8202 }, 8203 8204 /* Update the input field with the selected date. */ 8205 _selectDate: function( id, dateStr ) { 8206 var onSelect, 8207 target = $( id ), 8208 inst = this._getInst( target[ 0 ] ); 8209 8210 dateStr = ( dateStr != null ? dateStr : this._formatDate( inst ) ); 8211 if ( inst.input ) { 8212 inst.input.val( dateStr ); 8213 } 8214 this._updateAlternate( inst ); 8215 8216 onSelect = this._get( inst, "onSelect" ); 8217 if ( onSelect ) { 8218 onSelect.apply( ( inst.input ? inst.input[ 0 ] : null ), [ dateStr, inst ] ); // trigger custom callback 8219 } else if ( inst.input ) { 8220 inst.input.trigger( "change" ); // fire the change event 8221 } 8222 8223 if ( inst.inline ) { 8224 this._updateDatepicker( inst ); 8225 } else { 8226 this._hideDatepicker(); 8227 this._lastInput = inst.input[ 0 ]; 8228 if ( typeof( inst.input[ 0 ] ) !== "object" ) { 8229 inst.input.trigger( "focus" ); // restore focus 8230 } 8231 this._lastInput = null; 8232 } 8233 }, 8234 8235 /* Update any alternate field to synchronise with the main field. */ 8236 _updateAlternate: function( inst ) { 8237 var altFormat, date, dateStr, 8238 altField = this._get( inst, "altField" ); 8239 8240 if ( altField ) { // update alternate field too 8241 altFormat = this._get( inst, "altFormat" ) || this._get( inst, "dateFormat" ); 8242 date = this._getDate( inst ); 8243 dateStr = this.formatDate( altFormat, date, this._getFormatConfig( inst ) ); 8244 $
vendor: 13,647 bytes, lines 8244-8683
8244( altField ).val( dateStr ); 8245 } 8246 }, 8247 8248 /* Set as beforeShowDay function to prevent selection of weekends. 8249 * @param date Date - the date to customise 8250 * @return [boolean, string] - is this date selectable?, what is its CSS class? 8251 */ 8252 noWeekends: function( date ) { 8253 var day = date.getDay(); 8254 return [ ( day > 0 && day < 6 ), "" ]; 8255 }, 8256 8257 /* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition. 8258 * @param date Date - the date to get the week for 8259 * @return number - the number of the week within the year that contains this date 8260 */ 8261 iso8601Week: function( date ) { 8262 var time, 8263 checkDate = new Date( date.getTime() ); 8264 8265 // Find Thursday of this week starting on Monday 8266 checkDate.setDate( checkDate.getDate() + 4 - ( checkDate.getDay() || 7 ) ); 8267 8268 time = checkDate.getTime(); 8269 checkDate.setMonth( 0 ); // Compare with Jan 1 8270 checkDate.setDate( 1 ); 8271 return Math.floor( Math.round( ( time - checkDate ) / 86400000 ) / 7 ) + 1; 8272 }, 8273 8274 /* Parse a string value into a date object. 8275 * See formatDate below for the possible formats. 8276 * 8277 * @param format string - the expected format of the date 8278 * @param value string - the date in the above format 8279 * @param settings Object - attributes include: 8280 * shortYearCutoff number - the cutoff year for determining the century (optional) 8281 * dayNamesShort string[7] - abbreviated names of the days from Sunday (optional) 8282 * dayNames string[7] - names of the days from Sunday (optional) 8283 * monthNamesShort string[12] - abbreviated names of the months (optional) 8284 * monthNames string[12] - names of the months (optional) 8285 * @return Date - the extracted date value or null if value is blank 8286 */ 8287 parseDate: function( format, value, settings ) { 8288 if ( format == null || value == null ) { 8289 throw "Invalid arguments"; 8290 } 8291 8292 value = ( typeof value === "object" ? value.toString() : value + "" ); 8293 if ( value === "" ) { 8294 return null; 8295 } 8296 8297 var iFormat, dim, extra, 8298 iValue = 0, 8299 shortYearCutoffTemp = ( settings ? settings.shortYearCutoff : null ) || this._defaults.shortYearCutoff, 8300 shortYearCutoff = ( typeof shortYearCutoffTemp !== "string" ? shortYearCutoffTemp : 8301 new Date().getFullYear() % 100 + parseInt( shortYearCutoffTemp, 10 ) ), 8302 dayNamesShort = ( settings ? settings.dayNamesShort : null ) || this._defaults.dayNamesShort, 8303 dayNames = ( settings ? settings.dayNames : null ) || this._defaults.dayNames, 8304 monthNamesShort = ( settings ? settings.monthNamesShort : null ) || this._defaults.monthNamesShort, 8305 monthNames = ( settings ? settings.monthNames : null ) || this._defaults.monthNames, 8306 year = -1, 8307 month = -1, 8308 day = -1, 8309 doy = -1, 8310 literal = false, 8311 date, 8312 8313 // Check whether a format character is doubled 8314 lookAhead = function( match ) { 8315 var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match ); 8316 if ( matches ) { 8317 iFormat++; 8318 } 8319 return matches; 8320 }, 8321 8322 // Extract a number from the string value 8323 getNumber = function( match ) { 8324 var isDoubled = lookAhead( match ), 8325 size = ( match === "@" ? 14 : ( match === "!" ? 20 : 8326 ( match === "y" && isDoubled ? 4 : ( match === "o" ? 3 : 2 ) ) ) ), 8327 minSize = ( match === "y" ? size : 1 ), 8328 digits = new RegExp( "^\\d{" + minSize + "," + size + "}" ), 8329 num = value.substring( iValue ).match( digits ); 8330 if ( !num ) { 8331 throw "Missing number at position " + iValue; 8332 } 8333 iValue += num[ 0 ].length; 8334 return parseInt( num[ 0 ], 10 ); 8335 }, 8336 8337 // Extract a name from the string value and convert to an index 8338 getName = function( match, shortNames, longNames ) { 8339 var index = -1, 8340 names = $.map( lookAhead( match ) ? longNames : shortNames, function( v, k ) { 8341 return [ [ k, v ] ]; 8342 } ).sort( function( a, b ) { 8343 return -( a[ 1 ].length - b[ 1 ].length ); 8344 } ); 8345 8346 $.each( names, function( i, pair ) { 8347 var name = pair[ 1 ]; 8348 if ( value.substr( iValue, name.length ).toLowerCase() === name.toLowerCase() ) { 8349 index = pair[ 0 ]; 8350 iValue += name.length; 8351 return false; 8352 } 8353 } ); 8354 if ( index !== -1 ) { 8355 return index + 1; 8356 } else { 8357 throw "Unknown name at position " + iValue; 8358 } 8359 }, 8360 8361 // Confirm that a literal character matches the string value 8362 checkLiteral = function() { 8363 if ( value.charAt( iValue ) !== format.charAt( iFormat ) ) { 8364 throw "Unexpected literal at position " + iValue; 8365 } 8366 iValue++; 8367 }; 8368 8369 for ( iFormat = 0; iFormat < format.length; iFormat++ ) { 8370 if ( literal ) { 8371 if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) { 8372 literal = false; 8373 } else { 8374 checkLiteral(); 8375 } 8376 } else { 8377 switch ( format.charAt( iFormat ) ) { 8378 case "d": 8379 day = getNumber( "d" ); 8380 break; 8381 case "D": 8382 getName( "D", dayNamesShort, dayNames ); 8383 break; 8384 case "o": 8385 doy = getNumber( "o" ); 8386 break; 8387 case "m": 8388 month = getNumber( "m" ); 8389 break; 8390 case "M": 8391 month = getName( "M", monthNamesShort, monthNames ); 8392 break; 8393 case "y": 8394 year = getNumber( "y" ); 8395 break; 8396 case "@": 8397 date = new Date( getNumber( "@" ) ); 8398 year = date.getFullYear(); 8399 month = date.getMonth() + 1; 8400 day = date.getDate(); 8401 break; 8402 case "!": 8403 date = new Date( ( getNumber( "!" ) - this._ticksTo1970 ) / 10000 ); 8404 year = date.getFullYear(); 8405 month = date.getMonth() + 1; 8406 day = date.getDate(); 8407 break; 8408 case "'": 8409 if ( lookAhead( "'" ) ) { 8410 checkLiteral(); 8411 } else { 8412 literal = true; 8413 } 8414 break; 8415 default: 8416 checkLiteral(); 8417 } 8418 } 8419 } 8420 8421 if ( iValue < value.length ) { 8422 extra = value.substr( iValue ); 8423 if ( !/^\s+/.test( extra ) ) { 8424 throw "Extra/unparsed characters found in date: " + extra; 8425 } 8426 } 8427 8428 if ( year === -1 ) { 8429 year = new Date().getFullYear(); 8430 } else if ( year < 100 ) { 8431 year += new Date().getFullYear() - new Date().getFullYear() % 100 + 8432 ( year <= shortYearCutoff ? 0 : -100 ); 8433 } 8434 8435 if ( doy > -1 ) { 8436 month = 1; 8437 day = doy; 8438 do { 8439 dim = this._getDaysInMonth( year, month - 1 ); 8440 if ( day <= dim ) { 8441 break; 8442 } 8443 month++; 8444 day -= dim; 8445 } while ( true ); 8446 } 8447 8448 date = this._daylightSavingAdjust( new Date( year, month - 1, day ) ); 8449 if ( date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day ) { 8450 throw "Invalid date"; // E.g. 31/02/00 8451 } 8452 return date; 8453 }, 8454 8455 /* Standard date formats. */ 8456 ATOM: "yy-mm-dd", // RFC 3339 (ISO 8601) 8457 COOKIE: "D, dd M yy", 8458 ISO_8601: "yy-mm-dd", 8459 RFC_822: "D, d M y", 8460 RFC_850: "DD, dd-M-y", 8461 RFC_1036: "D, d M y", 8462 RFC_1123: "D, d M yy", 8463 RFC_2822: "D, d M yy", 8464 RSS: "D, d M y", // RFC 822 8465 TICKS: "!", 8466 TIMESTAMP: "@", 8467 W3C: "yy-mm-dd", // ISO 8601 8468 8469 _ticksTo1970: ( ( ( 1970 - 1 ) * 365 + Math.floor( 1970 / 4 ) - Math.floor( 1970 / 100 ) + 8470 Math.floor( 1970 / 400 ) ) * 24 * 60 * 60 * 10000000 ), 8471 8472 /* Format a date object into a string value. 8473 * The format can be combinations of the following: 8474 * d - day of month (no leading zero) 8475 * dd - day of month (two digit) 8476 * o - day of year (no leading zeros) 8477 * oo - day of year (three digit) 8478 * D - day name short 8479 * DD - day name long 8480 * m - month of year (no leading zero) 8481 * mm - month of year (two digit) 8482 * M - month name short 8483 * MM - month name long 8484 * y - year (two digit) 8485 * yy - year (four digit) 8486 * @ - Unix timestamp (ms since 01/01/1970) 8487 * ! - Windows ticks (100ns since 01/01/0001) 8488 * "..." - literal text 8489 * '' - single quote 8490 * 8491 * @param format string - the desired format of the date 8492 * @param date Date - the date value to format 8493 * @param settings Object - attributes include: 8494 * dayNamesShort string[7] - abbreviated names of the days from Sunday (optional) 8495 * dayNames string[7] - names of the days from Sunday (optional) 8496 * monthNamesShort string[12] - abbreviated names of the months (optional) 8497 * monthNames string[12] - names of the months (optional) 8498 * @return string - the date in the above format 8499 */ 8500 formatDate: function( format, date, settings ) { 8501 if ( !date ) { 8502 return ""; 8503 } 8504 8505 var iFormat, 8506 dayNamesShort = ( settings ? settings.dayNamesShort : null ) || this._defaults.dayNamesShort, 8507 dayNames = ( settings ? settings.dayNames : null ) || this._defaults.dayNames, 8508 monthNamesShort = ( settings ? settings.monthNamesShort : null ) || this._defaults.monthNamesShort, 8509 monthNames = ( settings ? settings.monthNames : null ) || this._defaults.monthNames, 8510 8511 // Check whether a format character is doubled 8512 lookAhead = function( match ) { 8513 var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match ); 8514 if ( matches ) { 8515 iFormat++; 8516 } 8517 return matches; 8518 }, 8519 8520 // Format a number, with leading zero if necessary 8521 formatNumber = function( match, value, len ) { 8522 var num = "" + value; 8523 if ( lookAhead( match ) ) { 8524 while ( num.length < len ) { 8525 num = "0" + num; 8526 } 8527 } 8528 return num; 8529 }, 8530 8531 // Format a name, short or long as requested 8532 formatName = function( match, value, shortNames, longNames ) { 8533 return ( lookAhead( match ) ? longNames[ value ] : shortNames[ value ] ); 8534 }, 8535 output = "", 8536 literal = false; 8537 8538 if ( date ) { 8539 for ( iFormat = 0; iFormat < format.length; iFormat++ ) { 8540 if ( literal ) { 8541 if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) { 8542 literal = false; 8543 } else { 8544 output += format.charAt( iFormat ); 8545 } 8546 } else { 8547 switch ( format.charAt( iFormat ) ) { 8548 case "d": 8549 output += formatNumber( "d", date.getDate(), 2 ); 8550 break; 8551 case "D": 8552 output += formatName( "D", date.getDay(), dayNamesShort, dayNames ); 8553 break; 8554 case "o": 8555 output += formatNumber( "o", 8556 Math.round( ( new Date( date.getFullYear(), date.getMonth(), date.getDate() ).getTime() - new Date( date.getFullYear(), 0, 0 ).getTime() ) / 86400000 ), 3 ); 8557 break; 8558 case "m": 8559 output += formatNumber( "m", date.getMonth() + 1, 2 ); 8560 break; 8561 case "M": 8562 output += formatName( "M", date.getMonth(), monthNamesShort, monthNames ); 8563 break; 8564 case "y": 8565 output += ( lookAhead( "y" ) ? date.getFullYear() : 8566 ( date.getFullYear() % 100 < 10 ? "0" : "" ) + date.getFullYear() % 100 ); 8567 break; 8568 case "@": 8569 output += date.getTime(); 8570 break; 8571 case "!": 8572 output += date.getTime() * 10000 + this._ticksTo1970; 8573 break; 8574 case "'": 8575 if ( lookAhead( "'" ) ) { 8576 output += "'"; 8577 } else { 8578 literal = true; 8579 } 8580 break; 8581 default: 8582 output += format.charAt( iFormat ); 8583 } 8584 } 8585 } 8586 } 8587 return output; 8588 }, 8589 8590 /* Extract all possible characters from the date format. */ 8591 _possibleChars: function( format ) { 8592 var iFormat, 8593 chars = "", 8594 literal = false, 8595 8596 // Check whether a format character is doubled 8597 lookAhead = function( match ) { 8598 var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match ); 8599 if ( matches ) { 8600 iFormat++; 8601 } 8602 return matches; 8603 }; 8604 8605 for ( iFormat = 0; iFormat < format.length; iFormat++ ) { 8606 if ( literal ) { 8607 if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) { 8608 literal = false; 8609 } else { 8610 chars += format.charAt( iFormat ); 8611 } 8612 } else { 8613 switch ( format.charAt( iFormat ) ) { 8614 case "d": case "m": case "y": case "@": 8615 chars += "0123456789"; 8616 break; 8617 case "D": case "M": 8618 return null; // Accept anything 8619 case "'": 8620 if ( lookAhead( "'" ) ) { 8621 chars += "'"; 8622 } else { 8623 literal = true; 8624 } 8625 break; 8626 default: 8627 chars += format.charAt( iFormat ); 8628 } 8629 } 8630 } 8631 return chars; 8632 }, 8633 8634 /* Get a setting value, defaulting if necessary. */ 8635 _get: function( inst, name ) { 8636 return inst.settings[ name ] !== undefined ? 8637 inst.settings[ name ] : this._defaults[ name ]; 8638 }, 8639 8640 /* Parse existing date and initialise date picker. */ 8641 _setDateFromField: function( inst, noDefault ) { 8642 if ( inst.input.val() === inst.lastVal ) { 8643 return; 8644 } 8645 8646 var dateFormat = this._get( inst, "dateFormat" ), 8647 dates = inst.lastVal = inst.input ? inst.input.val() : null, 8648 defaultDate = this._getDefaultDate( inst ), 8649 date = defaultDate, 8650 settings = this._getFormatConfig( inst ); 8651 8652 try { 8653 date = this.parseDate( dateFormat, dates, settings ) || defaultDate; 8654 } catch ( event ) { 8655 dates = ( noDefault ? "" : dates ); 8656 } 8657 inst.selectedDay = date.getDate(); 8658 inst.drawMonth = inst.selectedMonth = date.getMonth(); 8659 inst.drawYear = inst.selectedYear = date.getFullYear(); 8660 inst.currentDay = ( dates ? date.getDate() : 0 ); 8661 inst.currentMonth = ( dates ? date.getMonth() : 0 ); 8662 inst.currentYear = ( dates ? date.getFullYear() : 0 ); 8663 this._adjustInstDate( inst ); 8664 }, 8665 8666 /* Retrieve the default date shown on opening. */ 8667 _getDefaultDate: function( inst ) { 8668 return this._restrictMinMax( inst, 8669 this._determineDate( inst, this._get( inst, "defaultDate" ), new Date() ) ); 8670 }, 8671 8672 /* A date may be specified as an exact value or a relative one. */ 8673 _determineDate: function( inst, date, defaultDate ) { 8674 var offsetNumeric = function( offset ) { 8675 var date = new Date(); 8676 date.setDate( date.getDate() + offset ); 8677 return date; 8678 }, 8679 offsetString = function( offset ) { 8680 try { 8681 return $.datepicker.parseDate( $.datepicker._get( inst, "dateFormat" ), 8682 offset, $.datepicker._getFormatConfig( inst ) ); 8683 }
8683 8684
vendor: 6,426 bytes, lines 8684-8858
8684catch ( e ) { 8685 8686 // Ignore 8687 } 8688 8689 var date = ( offset.toLowerCase().match( /^c/ ) ? 8690 $.datepicker._getDate( inst ) : null ) || new Date(), 8691 year = date.getFullYear(), 8692 month = date.getMonth(), 8693 day = date.getDate(), 8694 pattern = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, 8695 matches = pattern.exec( offset ); 8696 8697 while ( matches ) { 8698 switch ( matches[ 2 ] || "d" ) { 8699 case "d" : case "D" : 8700 day += parseInt( matches[ 1 ], 10 ); break; 8701 case "w" : case "W" : 8702 day += parseInt( matches[ 1 ], 10 ) * 7; break; 8703 case "m" : case "M" : 8704 month += parseInt( matches[ 1 ], 10 ); 8705 day = Math.min( day, $.datepicker._getDaysInMonth( year, month ) ); 8706 break; 8707 case "y": case "Y" : 8708 year += parseInt( matches[ 1 ], 10 ); 8709 day = Math.min( day, $.datepicker._getDaysInMonth( year, month ) ); 8710 break; 8711 } 8712 matches = pattern.exec( offset ); 8713 } 8714 return new Date( year, month, day ); 8715 }, 8716 newDate = ( date == null || date === "" ? defaultDate : ( typeof date === "string" ? offsetString( date ) : 8717 ( typeof date === "number" ? ( isNaN( date ) ? defaultDate : offsetNumeric( date ) ) : new Date( date.getTime() ) ) ) ); 8718 8719 newDate = ( newDate && newDate.toString() === "Invalid Date" ? defaultDate : newDate ); 8720 if ( newDate ) { 8721 newDate.setHours( 0 ); 8722 newDate.setMinutes( 0 ); 8723 newDate.setSeconds( 0 ); 8724 newDate.setMilliseconds( 0 ); 8725 } 8726 return this._daylightSavingAdjust( newDate ); 8727 }, 8728 8729 /* Handle switch to/from daylight saving. 8730 * Hours may be non-zero on daylight saving cut-over: 8731 * > 12 when midnight changeover, but then cannot generate 8732 * midnight datetime, so jump to 1AM, otherwise reset. 8733 * @param date (Date) the date to check 8734 * @return (Date) the corrected date 8735 */ 8736 _daylightSavingAdjust: function( date ) { 8737 if ( !date ) { 8738 return null; 8739 } 8740 date.setHours( date.getHours() > 12 ? date.getHours() + 2 : 0 ); 8741 return date; 8742 }, 8743 8744 /* Set the date(s) directly. */ 8745 _setDate: function( inst, date, noChange ) { 8746 var clear = !date, 8747 origMonth = inst.selectedMonth, 8748 origYear = inst.selectedYear, 8749 newDate = this._restrictMinMax( inst, this._determineDate( inst, date, new Date() ) ); 8750 8751 inst.selectedDay = inst.currentDay = newDate.getDate(); 8752 inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth(); 8753 inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear(); 8754 if ( ( origMonth !== inst.selectedMonth || origYear !== inst.selectedYear ) && !noChange ) { 8755 this._notifyChange( inst ); 8756 } 8757 this._adjustInstDate( inst ); 8758 if ( inst.input ) { 8759 inst.input.val( clear ? "" : this._formatDate( inst ) ); 8760 } 8761 }, 8762 8763 /* Retrieve the date(s) directly. */ 8764 _getDate: function( inst ) { 8765 var startDate = ( !inst.currentYear || ( inst.input && inst.input.val() === "" ) ? null : 8766 this._daylightSavingAdjust( new Date( 8767 inst.currentYear, inst.currentMonth, inst.currentDay ) ) ); 8768 return startDate; 8769 }, 8770 8771 /* Attach the onxxx handlers. These are declared statically so 8772 * they work with static code transformers like Caja. 8773 */ 8774 _attachHandlers: function( inst ) { 8775 var stepMonths = this._get( inst, "stepMonths" ), 8776 id = "#" + inst.id.replace( /\\\\/g, "\\" ); 8777 inst.dpDiv.find( "[data-handler]" ).map( function() { 8778 var handler = { 8779 prev: function() { 8780 $.datepicker._adjustDate( id, -stepMonths, "M" ); 8781 }, 8782 next: function() { 8783 $.datepicker._adjustDate( id, +stepMonths, "M" ); 8784 }, 8785 hide: function() { 8786 $.datepicker._hideDatepicker(); 8787 }, 8788 today: function() { 8789 $.datepicker._gotoToday( id ); 8790 }, 8791 selectDay: function() { 8792 $.datepicker._selectDay( id, +this.getAttribute( "data-month" ), +this.getAttribute( "data-year" ), this ); 8793 return false; 8794 }, 8795 selectMonth: function() { 8796 $.datepicker._selectMonthYear( id, this, "M" ); 8797 return false; 8798 }, 8799 selectYear: function() { 8800 $.datepicker._selectMonthYear( id, this, "Y" ); 8801 return false; 8802 } 8803 }; 8804 $( this ).on( this.getAttribute( "data-event" ), handler[ this.getAttribute( "data-handler" ) ] ); 8805 } ); 8806 }, 8807 8808 /* Generate the HTML for the current state of the date picker. */ 8809 _generateHTML: function( inst ) { 8810 var maxDraw, prevText, prev, nextText, next, currentText, gotoDate, 8811 controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin, 8812 monthNames, monthNamesShort, beforeShowDay, showOtherMonths, 8813 selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate, 8814 cornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows, 8815 printDate, dRow, tbody, daySettings, otherMonth, unselectable, 8816 tempDate = new Date(), 8817 today = this._daylightSavingAdjust( 8818 new Date( tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate() ) ), // clear time 8819 isRTL = this._get( inst, "isRTL" ), 8820 showButtonPanel = this._get( inst, "showButtonPanel" ), 8821 hideIfNoPrevNext = this._get( inst, "hideIfNoPrevNext" ), 8822 navigationAsDateFormat = this._get( inst, "navigationAsDateFormat" ), 8823 numMonths = this._getNumberOfMonths( inst ), 8824 showCurrentAtPos = this._get( inst, "showCurrentAtPos" ), 8825 stepMonths = this._get( inst, "stepMonths" ), 8826 isMultiMonth = ( numMonths[ 0 ] !== 1 || numMonths[ 1 ] !== 1 ), 8827 currentDate = this._daylightSavingAdjust( ( !inst.currentDay ? new Date( 9999, 9, 9 ) : 8828 new Date( inst.currentYear, inst.currentMonth, inst.currentDay ) ) ), 8829 minDate = this._getMinMaxDate( inst, "min" ), 8830 maxDate = this._getMinMaxDate( inst, "max" ), 8831 drawMonth = inst.drawMonth - showCurrentAtPos, 8832 drawYear = inst.drawYear; 8833 8834 if ( drawMonth < 0 ) { 8835 drawMonth += 12; 8836 drawYear--; 8837 } 8838 if ( maxDate ) { 8839 maxDraw = this._daylightSavingAdjust( new Date( maxDate.getFullYear(), 8840 maxDate.getMonth() - ( numMonths[ 0 ] * numMonths[ 1 ] ) + 1, maxDate.getDate() ) ); 8841 maxDraw = ( minDate && maxDraw < minDate ? minDate : maxDraw ); 8842 while ( this._daylightSavingAdjust( new Date( drawYear, drawMonth, 1 ) ) > maxDraw ) { 8843 drawMonth--; 8844 if ( drawMonth < 0 ) { 8845 drawMonth = 11; 8846 drawYear--; 8847 } 8848 } 8849 } 8850 inst.drawMonth = drawMonth; 8851 inst.drawYear = drawYear; 8852 8853 prevText = this._get( inst, "prevText" ); 8854 prevText = ( !navigationAsDateFormat ? prevText : this.formatDate( prevText, 8855 this._daylightSavingAdjust( new Date( drawYear, drawMonth - stepMonths, 1 ) ), 8856 this._getFormatConfig( inst ) ) ); 8857 8858
8858prev = ( this._canAdjustMonth( inst, -1, drawYear, drawMonth ) ? 8859 "<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'" + 8860 " title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w" ) + "'>" + prevText + "</span></a>" : 8861 ( hideIfNoPrevNext ? "" : "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w" ) + "'>" + prevText + "</span></a>" ) ); 8862 8863 nextText = this._get( inst, "nextText" ); 8864 nextText = ( !navigationAsDateFormat ? nextText : this.formatDate( nextText, 8865 this._daylightSavingAdjust( new Date( drawYear, drawMonth + stepMonths, 1 ) ), 8866 this._getFormatConfig( inst ) ) ); 8867 8868 next = ( this._canAdjustMonth( inst, +1, drawYear, drawMonth ) ? 8869 "<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'" + 8870 " title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e" ) + "'>" + nextText + "</span></a>" : 8871 ( hideIfNoPrevNext ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e" ) + "'>" + nextText + "</span></a>" ) ); 8872 8873 currentText = this._get( inst, "currentText" ); 8874 gotoDate = ( this._get( inst, "gotoCurrent" ) && inst.currentDay ? currentDate : today ); 8875 currentText = ( !navigationAsDateFormat ? currentText : 8876 this.formatDate( currentText, gotoDate, this._getFormatConfig( inst ) ) ); 8877 8878 controls = ( !inst.inline ? "<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>" + 8879 this._get( inst, "closeText" ) + "</button>" : "" ); 8880 8881 buttonPanel = ( showButtonPanel ) ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + ( isRTL ? controls : "" ) + 8882 ( this._isInRange( inst, gotoDate ) ? "<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'" + 8883 ">" + currentText + "</button>" : "" ) + ( isRTL ? "" : controls ) + "</div>" : ""; 8884 8885 firstDay = parseInt( this._get( inst, "firstDay" ), 10 ); 8886 firstDay = ( isNaN( firstDay ) ? 0 : firstDay ); 8887 8888 showWeek = this._get( inst, "showWeek" ); 8889 dayNames = this._get( inst, "dayNames" ); 8890 dayNamesMin = this._get( inst, "dayNamesMin" ); 8891 monthNames = this._get( inst, "monthNames" ); 8892 monthNamesShort = this._get( inst, "monthNamesShort" ); 8893 beforeShowDay = this._get( inst, "beforeShowDay" ); 8894 showOtherMonths = this._get( inst, "showOtherMonths" ); 8895 selectOtherMonths = this._get( inst, "selectOtherMonths" ); 8896 defaultDate = this._getDefaultDate( inst ); 8897 html = ""; 8898 8899 for ( row = 0; row < numMonths[ 0 ]; row++ ) { 8900 group = ""; 8901 this.maxRows = 4; 8902 for ( col = 0; col < numMonths[ 1 ]; col++ ) { 8903 selectedDate = this._daylightSavingAdjust( new Date( drawYear, drawMonth, inst.selectedDay ) ); 8904 cornerClass = " ui-corner-all"; 8905 calender = ""; 8906 if ( isMultiMonth ) { 8907 calender += "<div class='ui-datepicker-group"; 8908 if ( numMonths[ 1 ] > 1 ) { 8909 switch ( col ) { 8910 case 0: calender += " ui-datepicker-group-first";
vendor: 15,908 bytes, lines 8911-9265
8911 cornerClass = " ui-corner-" + ( isRTL ? "right" : "left" ); break; 8912 case numMonths[ 1 ] - 1: calender += " ui-datepicker-group-last"; 8913 cornerClass = " ui-corner-" + ( isRTL ? "left" : "right" ); break; 8914 default: calender += " ui-datepicker-group-middle"; cornerClass = ""; break; 8915 } 8916 } 8917 calender += "'>"; 8918 } 8919 calender += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + cornerClass + "'>" + 8920 ( /all|left/.test( cornerClass ) && row === 0 ? ( isRTL ? next : prev ) : "" ) + 8921 ( /all|right/.test( cornerClass ) && row === 0 ? ( isRTL ? prev : next ) : "" ) + 8922 this._generateMonthYearHeader( inst, drawMonth, drawYear, minDate, maxDate, 8923 row > 0 || col > 0, monthNames, monthNamesShort ) + // draw month headers 8924 "</div><table class='ui-datepicker-calendar'><thead>" + 8925 "<tr>"; 8926 thead = ( showWeek ? "<th class='ui-datepicker-week-col'>" + this._get( inst, "weekHeader" ) + "</th>" : "" ); 8927 for ( dow = 0; dow < 7; dow++ ) { // days of the week 8928 day = ( dow + firstDay ) % 7; 8929 thead += "<th scope='col'" + ( ( dow + firstDay + 6 ) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "" ) + ">" + 8930 "<span title='" + dayNames[ day ] + "'>" + dayNamesMin[ day ] + "</span></th>"; 8931 } 8932 calender += thead + "</tr></thead><tbody>"; 8933 daysInMonth = this._getDaysInMonth( drawYear, drawMonth ); 8934 if ( drawYear === inst.selectedYear && drawMonth === inst.selectedMonth ) { 8935 inst.selectedDay = Math.min( inst.selectedDay, daysInMonth ); 8936 } 8937 leadDays = ( this._getFirstDayOfMonth( drawYear, drawMonth ) - firstDay + 7 ) % 7; 8938 curRows = Math.ceil( ( leadDays + daysInMonth ) / 7 ); // calculate the number of rows to generate 8939 numRows = ( isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows ); //If multiple months, use the higher number of rows (see #7043) 8940 this.maxRows = numRows; 8941 printDate = this._daylightSavingAdjust( new Date( drawYear, drawMonth, 1 - leadDays ) ); 8942 for ( dRow = 0; dRow < numRows; dRow++ ) { // create date picker rows 8943 calender += "<tr>"; 8944 tbody = ( !showWeek ? "" : "<td class='ui-datepicker-week-col'>" + 8945 this._get( inst, "calculateWeek" )( printDate ) + "</td>" ); 8946 for ( dow = 0; dow < 7; dow++ ) { // create date picker days 8947 daySettings = ( beforeShowDay ? 8948 beforeShowDay.apply( ( inst.input ? inst.input[ 0 ] : null ), [ printDate ] ) : [ true, "" ] ); 8949 otherMonth = ( printDate.getMonth() !== drawMonth ); 8950 unselectable = ( otherMonth && !selectOtherMonths ) || !daySettings[ 0 ] || 8951 ( minDate && printDate < minDate ) || ( maxDate && printDate > maxDate ); 8952 tbody += "<td class='" + 8953 ( ( dow + firstDay + 6 ) % 7 >= 5 ? " ui-datepicker-week-end" : "" ) + // highlight weekends 8954 ( otherMonth ? " ui-datepicker-other-month" : "" ) + // highlight days from other months 8955 ( ( printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent ) || // user pressed key 8956 ( defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime() ) ? 8957 8958 // or defaultDate is current printedDate and defaultDate is selectedDate 8959 " " + this._dayOverClass : "" ) + // highlight selected day 8960 ( unselectable ? " " + this._unselectableClass + " ui-state-disabled" : "" ) + // highlight unselectable days 8961 ( otherMonth && !showOtherMonths ? "" : " " + daySettings[ 1 ] + // highlight custom dates 8962 ( printDate.getTime() === currentDate.getTime() ? " " + this._currentClass : "" ) + // highlight selected day 8963 ( printDate.getTime() === today.getTime() ? " ui-datepicker-today" : "" ) ) + "'" + // highlight today (if different) 8964 ( ( !otherMonth || showOtherMonths ) && daySettings[ 2 ] ? " title='" + daySettings[ 2 ].replace( /'/g, "'" ) + "'" : "" ) + // cell title 8965 ( unselectable ? "" : " data-handler='selectDay' data-event='click' data-month='" + printDate.getMonth() + "' data-year='" + printDate.getFullYear() + "'" ) + ">" + // actions 8966 ( otherMonth && !showOtherMonths ? " " : // display for other months 8967 ( unselectable ? "<span class='ui-state-default'>" + printDate.getDate() + "</span>" : "<a class='ui-state-default" + 8968 ( printDate.getTime() === today.getTime() ? " ui-state-highlight" : "" ) + 8969 ( printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "" ) + // highlight selected day 8970 ( otherMonth ? " ui-priority-secondary" : "" ) + // distinguish dates from other months 8971 "' href='#'>" + printDate.getDate() + "</a>" ) ) + "</td>"; // display selectable date 8972 printDate.setDate( printDate.getDate() + 1 ); 8973 printDate = this._daylightSavingAdjust( printDate ); 8974 } 8975 calender += tbody + "</tr>"; 8976 } 8977 drawMonth++; 8978 if ( drawMonth > 11 ) { 8979 drawMonth = 0; 8980 drawYear++; 8981 } 8982 calender += "</tbody></table>" + ( isMultiMonth ? "</div>" + 8983 ( ( numMonths[ 0 ] > 0 && col === numMonths[ 1 ] - 1 ) ? "<div class='ui-datepicker-row-break'></div>" : "" ) : "" ); 8984 group += calender; 8985 } 8986 html += group; 8987 } 8988 html += buttonPanel; 8989 inst._keyEvent = false; 8990 return html; 8991 }, 8992 8993 /* Generate the month and year header. */ 8994 _generateMonthYearHeader: function( inst, drawMonth, drawYear, minDate, maxDate, 8995 secondary, monthNames, monthNamesShort ) { 8996 8997 var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear, 8998 changeMonth = this._get( inst, "changeMonth" ), 8999 changeYear = this._get( inst, "changeYear" ), 9000 showMonthAfterYear = this._get( inst, "showMonthAfterYear" ), 9001 html = "<div class='ui-datepicker-title'>", 9002 monthHtml = ""; 9003 9004 // Month selection 9005 if ( secondary || !changeMonth ) { 9006 monthHtml += "<span class='ui-datepicker-month'>" + monthNames[ drawMonth ] + "</span>"; 9007 } else { 9008 inMinYear = ( minDate && minDate.getFullYear() === drawYear ); 9009 inMaxYear = ( maxDate && maxDate.getFullYear() === drawYear ); 9010 monthHtml += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>"; 9011 for ( month = 0; month < 12; month++ ) { 9012 if ( ( !inMinYear || month >= minDate.getMonth() ) && ( !inMaxYear || month <= maxDate.getMonth() ) ) { 9013 monthHtml += "<option value='" + month + "'" + 9014 ( month === drawMonth ? " selected='selected'" : "" ) + 9015 ">" + monthNamesShort[ month ] + "</option>"; 9016 } 9017 } 9018 monthHtml += "</select>"; 9019 } 9020 9021 if ( !showMonthAfterYear ) { 9022 html += monthHtml + ( secondary || !( changeMonth && changeYear ) ? " " : "" ); 9023 } 9024 9025 // Year selection 9026 if ( !inst.yearshtml ) { 9027 inst.yearshtml = ""; 9028 if ( secondary || !changeYear ) { 9029 html += "<span class='ui-datepicker-year'>" + drawYear + "</span>"; 9030 } else { 9031 9032 // determine range of years to display 9033 years = this._get( inst, "yearRange" ).split( ":" ); 9034 thisYear = new Date().getFullYear(); 9035 determineYear = function( value ) { 9036 var year = ( value.match( /c[+\-].*/ ) ? drawYear + parseInt( value.substring( 1 ), 10 ) : 9037 ( value.match( /[+\-].*/ ) ? thisYear + parseInt( value, 10 ) : 9038 parseInt( value, 10 ) ) ); 9039 return ( isNaN( year ) ? thisYear : year ); 9040 }; 9041 year = determineYear( years[ 0 ] ); 9042 endYear = Math.max( year, determineYear( years[ 1 ] || "" ) ); 9043 year = ( minDate ? Math.max( year, minDate.getFullYear() ) : year ); 9044 endYear = ( maxDate ? Math.min( endYear, maxDate.getFullYear() ) : endYear ); 9045 inst.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>"; 9046 for ( ; year <= endYear; year++ ) { 9047 inst.yearshtml += "<option value='" + year + "'" + 9048 ( year === drawYear ? " selected='selected'" : "" ) + 9049 ">" + year + "</option>"; 9050 } 9051 inst.yearshtml += "</select>"; 9052 9053 html += inst.yearshtml; 9054 inst.yearshtml = null; 9055 } 9056 } 9057 9058 html += this._get( inst, "yearSuffix" ); 9059 if ( showMonthAfterYear ) { 9060 html += ( secondary || !( changeMonth && changeYear ) ? " " : "" ) + monthHtml; 9061 } 9062 html += "</div>"; // Close datepicker_header 9063 return html; 9064 }, 9065 9066 /* Adjust one of the date sub-fields. */ 9067 _adjustInstDate: function( inst, offset, period ) { 9068 var year = inst.selectedYear + ( period === "Y" ? offset : 0 ), 9069 month = inst.selectedMonth + ( period === "M" ? offset : 0 ), 9070 day = Math.min( inst.selectedDay, this._getDaysInMonth( year, month ) ) + ( period === "D" ? offset : 0 ), 9071 date = this._restrictMinMax( inst, this._daylightSavingAdjust( new Date( year, month, day ) ) ); 9072 9073 inst.selectedDay = date.getDate(); 9074 inst.drawMonth = inst.selectedMonth = date.getMonth(); 9075 inst.drawYear = inst.selectedYear = date.getFullYear(); 9076 if ( period === "M" || period === "Y" ) { 9077 this._notifyChange( inst ); 9078 } 9079 }, 9080 9081 /* Ensure a date is within any min/max bounds. */ 9082 _restrictMinMax: function( inst, date ) { 9083 var minDate = this._getMinMaxDate( inst, "min" ), 9084 maxDate = this._getMinMaxDate( inst, "max" ), 9085 newDate = ( minDate && date < minDate ? minDate : date ); 9086 return ( maxDate && newDate > maxDate ? maxDate : newDate ); 9087 }, 9088 9089 /* Notify change of month/year. */ 9090 _notifyChange: function( inst ) { 9091 var onChange = this._get( inst, "onChangeMonthYear" ); 9092 if ( onChange ) { 9093 onChange.apply( ( inst.input ? inst.input[ 0 ] : null ), 9094 [ inst.selectedYear, inst.selectedMonth + 1, inst ] ); 9095 } 9096 }, 9097 9098 /* Determine the number of months to show. */ 9099 _getNumberOfMonths: function( inst ) { 9100 var numMonths = this._get( inst, "numberOfMonths" ); 9101 return ( numMonths == null ? [ 1, 1 ] : ( typeof numMonths === "number" ? [ 1, numMonths ] : numMonths ) ); 9102 }, 9103 9104 /* Determine the current maximum date - ensure no time components are set. */ 9105 _getMinMaxDate: function( inst, minMax ) { 9106 return this._determineDate( inst, this._get( inst, minMax + "Date" ), null ); 9107 }, 9108 9109 /* Find the number of days in a given month. */ 9110 _getDaysInMonth: function( year, month ) { 9111 return 32 - this._daylightSavingAdjust( new Date( year, month, 32 ) ).getDate(); 9112 }, 9113 9114 /* Find the day of the week of the first of a month. */ 9115 _getFirstDayOfMonth: function( year, month ) { 9116 return new Date( year, month, 1 ).getDay(); 9117 }, 9118 9119 /* Determines if we should allow a "next/prev" month display change. */ 9120 _canAdjustMonth: function( inst, offset, curYear, curMonth ) { 9121 var numMonths = this._getNumberOfMonths( inst ), 9122 date = this._daylightSavingAdjust( new Date( curYear, 9123 curMonth + ( offset < 0 ? offset : numMonths[ 0 ] * numMonths[ 1 ] ), 1 ) ); 9124 9125 if ( offset < 0 ) { 9126 date.setDate( this._getDaysInMonth( date.getFullYear(), date.getMonth() ) ); 9127 } 9128 return this._isInRange( inst, date ); 9129 }, 9130 9131 /* Is the given date in the accepted range? */ 9132 _isInRange: function( inst, date ) { 9133 var yearSplit, currentYear, 9134 minDate = this._getMinMaxDate( inst, "min" ), 9135 maxDate = this._getMinMaxDate( inst, "max" ), 9136 minYear = null, 9137 maxYear = null, 9138 years = this._get( inst, "yearRange" ); 9139 if ( years ) { 9140 yearSplit = years.split( ":" ); 9141 currentYear = new Date().getFullYear(); 9142 minYear = parseInt( yearSplit[ 0 ], 10 ); 9143 maxYear = parseInt( yearSplit[ 1 ], 10 ); 9144 if ( yearSplit[ 0 ].match( /[+\-].*/ ) ) { 9145 minYear += currentYear; 9146 } 9147 if ( yearSplit[ 1 ].match( /[+\-].*/ ) ) { 9148 maxYear += currentYear; 9149 } 9150 } 9151 9152 return ( ( !minDate || date.getTime() >= minDate.getTime() ) && 9153 ( !maxDate || date.getTime() <= maxDate.getTime() ) && 9154 ( !minYear || date.getFullYear() >= minYear ) && 9155 ( !maxYear || date.getFullYear() <= maxYear ) ); 9156 }, 9157 9158 /* Provide the configuration settings for formatting/parsing. */ 9159 _getFormatConfig: function( inst ) { 9160 var shortYearCutoff = this._get( inst, "shortYearCutoff" ); 9161 shortYearCutoff = ( typeof shortYearCutoff !== "string" ? shortYearCutoff : 9162 new Date().getFullYear() % 100 + parseInt( shortYearCutoff, 10 ) ); 9163 return { shortYearCutoff: shortYearCutoff, 9164 dayNamesShort: this._get( inst, "dayNamesShort" ), dayNames: this._get( inst, "dayNames" ), 9165 monthNamesShort: this._get( inst, "monthNamesShort" ), monthNames: this._get( inst, "monthNames" ) }; 9166 }, 9167 9168 /* Format the given date for display. */ 9169 _formatDate: function( inst, day, month, year ) { 9170 if ( !day ) { 9171 inst.currentDay = inst.selectedDay; 9172 inst.currentMonth = inst.selectedMonth; 9173 inst.currentYear = inst.selectedYear; 9174 } 9175 var date = ( day ? ( typeof day === "object" ? day : 9176 this._daylightSavingAdjust( new Date( year, month, day ) ) ) : 9177 this._daylightSavingAdjust( new Date( inst.currentYear, inst.currentMonth, inst.currentDay ) ) ); 9178 return this.formatDate( this._get( inst, "dateFormat" ), date, this._getFormatConfig( inst ) ); 9179 } 9180} ); 9181 9182/* 9183 * Bind hover events for datepicker elements. 9184 * Done via delegate so the binding only occurs once in the lifetime of the parent div. 9185 * Global datepicker_instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker. 9186 */ 9187function datepicker_bindHover( dpDiv ) { 9188 var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a"; 9189 return dpDiv.on( "mouseout", selector, function() { 9190 $( this ).removeClass( "ui-state-hover" ); 9191 if ( this.className.indexOf( "ui-datepicker-prev" ) !== -1 ) { 9192 $( this ).removeClass( "ui-datepicker-prev-hover" ); 9193 } 9194 if ( this.className.indexOf( "ui-datepicker-next" ) !== -1 ) { 9195 $( this ).removeClass( "ui-datepicker-next-hover" ); 9196 } 9197 } ) 9198 .on( "mouseover", selector, datepicker_handleMouseover ); 9199} 9200 9201function datepicker_handleMouseover() { 9202 if ( !$.datepicker._isDisabledDatepicker( datepicker_instActive.inline ? datepicker_instActive.dpDiv.parent()[ 0 ] : datepicker_instActive.input[ 0 ] ) ) { 9203 $( this ).parents( ".ui-datepicker-calendar" ).find( "a" ).removeClass( "ui-state-hover" ); 9204 $( this ).addClass( "ui-state-hover" ); 9205 if ( this.className.indexOf( "ui-datepicker-prev" ) !== -1 ) { 9206 $( this ).addClass( "ui-datepicker-prev-hover" ); 9207 } 9208 if ( this.className.indexOf( "ui-datepicker-next" ) !== -1 ) { 9209 $( this ).addClass( "ui-datepicker-next-hover" ); 9210 } 9211 } 9212} 9213 9214/* jQuery extend now ignores nulls! */ 9215function datepicker_extendRemove( target, props ) { 9216 $.extend( target, props ); 9217 for ( var name in props ) { 9218 if ( props[ name ] == null ) { 9219 target[ name ] = props[ name ]; 9220 } 9221 } 9222 return target; 9223} 9224 9225/* Invoke the datepicker functionality. 9226 @param options string - a command, optionally followed by additional parameters or 9227 Object - settings for attaching new datepicker functionality 9228 @return jQuery object */ 9229$.fn.datepicker = function( options ) { 9230 9231 /* Verify an empty collection wasn't passed - Fixes #6976 */ 9232 if ( !this.length ) { 9233 return this; 9234 } 9235 9236 /* Initialise the date picker. */ 9237 if ( !$.datepicker.initialized ) { 9238 $( document ).on( "mousedown", $.datepicker._checkExternalClick ); 9239 $.datepicker.initialized = true; 9240 } 9241 9242 /* Append datepicker main container to body if not exist. */ 9243 if ( $( "#" + $.datepicker._mainDivId ).length === 0 ) { 9244 $( "body" ).append( $.datepicker.dpDiv ); 9245 } 9246 9247 var otherArgs = Array.prototype.slice.call( arguments, 1 ); 9248 if ( typeof options === "string" && ( options === "isDisabled" || options === "getDate" || options === "widget" ) ) { 9249 return $.datepicker[ "_" + options + "Datepicker" ]. 9250 apply( $.datepicker, [ this[ 0 ] ].concat( otherArgs ) ); 9251 } 9252 if ( options === "option" && arguments.length === 2 && typeof arguments[ 1 ] === "string" ) { 9253 return $.datepicker[ "_" + options + "Datepicker" ]. 9254 apply( $.datepicker, [ this[ 0 ] ].concat( otherArgs ) ); 9255 } 9256 return this.each( function() { 9257 typeof options === "string" ? 9258 $.datepicker[ "_" + options + "Datepicker" ]. 9259 apply( $.datepicker, [ this ].concat( otherArgs ) ) : 9260 $.datepicker._attachDatepicker( this, options ); 9261 } ); 9262}; 9263 9264$.datepicker = new Datepicker(); // singleton instance 9265$.datepicker.initialized = false;
vendor: 11,796 bytes, lines 9266-9724
9266$.datepicker.uuid = new Date().getTime(); 9267$.datepicker.version = "1.12.1"; 9268 9269var widgetsDatepicker = $.datepicker; 9270 9271 9272 9273 9274// This file is deprecated 9275var ie = $.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); 9276 9277/*! 9278 * jQuery UI Mouse 1.12.1 9279 * http://jqueryui.com 9280 * 9281 * Copyright jQuery Foundation and other contributors 9282 * Released under the MIT license. 9283 * http://jquery.org/license 9284 */ 9285 9286//>>label: Mouse 9287//>>group: Widgets 9288//>>description: Abstracts mouse-based interactions to assist in creating certain widgets. 9289//>>docs: http://api.jqueryui.com/mouse/ 9290 9291 9292 9293var mouseHandled = false; 9294$( document ).on( "mouseup", function() { 9295 mouseHandled = false; 9296} ); 9297 9298var widgetsMouse = $.widget( "ui.mouse", { 9299 version: "1.12.1", 9300 options: { 9301 cancel: "input, textarea, button, select, option", 9302 distance: 1, 9303 delay: 0 9304 }, 9305 _mouseInit: function() { 9306 var that = this; 9307 9308 this.element 9309 .on( "mousedown." + this.widgetName, function( event ) { 9310 return that._mouseDown( event ); 9311 } ) 9312 .on( "click." + this.widgetName, function( event ) { 9313 if ( true === $.data( event.target, that.widgetName + ".preventClickEvent" ) ) { 9314 $.removeData( event.target, that.widgetName + ".preventClickEvent" ); 9315 event.stopImmediatePropagation(); 9316 return false; 9317 } 9318 } ); 9319 9320 this.started = false; 9321 }, 9322 9323 // TODO: make sure destroying one instance of mouse doesn't mess with 9324 // other instances of mouse 9325 _mouseDestroy: function() { 9326 this.element.off( "." + this.widgetName ); 9327 if ( this._mouseMoveDelegate ) { 9328 this.document 9329 .off( "mousemove." + this.widgetName, this._mouseMoveDelegate ) 9330 .off( "mouseup." + this.widgetName, this._mouseUpDelegate ); 9331 } 9332 }, 9333 9334 _mouseDown: function( event ) { 9335 9336 // don't let more than one widget handle mouseStart 9337 if ( mouseHandled ) { 9338 return; 9339 } 9340 9341 this._mouseMoved = false; 9342 9343 // We may have missed mouseup (out of window) 9344 ( this._mouseStarted && this._mouseUp( event ) ); 9345 9346 this._mouseDownEvent = event; 9347 9348 var that = this, 9349 btnIsLeft = ( event.which === 1 ), 9350 9351 // event.target.nodeName works around a bug in IE 8 with 9352 // disabled inputs (#7620) 9353 elIsCancel = ( typeof this.options.cancel === "string" && event.target.nodeName ? 9354 $( event.target ).closest( this.options.cancel ).length : false ); 9355 if ( !btnIsLeft || elIsCancel || !this._mouseCapture( event ) ) { 9356 return true; 9357 } 9358 9359 this.mouseDelayMet = !this.options.delay; 9360 if ( !this.mouseDelayMet ) { 9361 this._mouseDelayTimer = setTimeout( function() { 9362 that.mouseDelayMet = true; 9363 }, this.options.delay ); 9364 } 9365 9366 if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) { 9367 this._mouseStarted = ( this._mouseStart( event ) !== false ); 9368 if ( !this._mouseStarted ) { 9369 event.preventDefault(); 9370 return true; 9371 } 9372 } 9373 9374 // Click event may never have fired (Gecko & Opera) 9375 if ( true === $.data( event.target, this.widgetName + ".preventClickEvent" ) ) { 9376 $.removeData( event.target, this.widgetName + ".preventClickEvent" ); 9377 } 9378 9379 // These delegates are required to keep context 9380 this._mouseMoveDelegate = function( event ) { 9381 return that._mouseMove( event ); 9382 }; 9383 this._mouseUpDelegate = function( event ) { 9384 return that._mouseUp( event ); 9385 }; 9386 9387 this.document 9388 .on( "mousemove." + this.widgetName, this._mouseMoveDelegate ) 9389 .on( "mouseup." + this.widgetName, this._mouseUpDelegate ); 9390 9391 event.preventDefault(); 9392 9393 mouseHandled = true; 9394 return true; 9395 }, 9396 9397 _mouseMove: function( event ) { 9398 9399 // Only check for mouseups outside the document if you've moved inside the document 9400 // at least once. This prevents the firing of mouseup in the case of IE<9, which will 9401 // fire a mousemove event if content is placed under the cursor. See #7778 9402 // Support: IE <9 9403 if ( this._mouseMoved ) { 9404 9405 // IE mouseup check - mouseup happened when mouse was out of window 9406 if ( $.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && 9407 !event.button ) { 9408 return this._mouseUp( event ); 9409 9410 // Iframe mouseup check - mouseup occurred in another document 9411 } else if ( !event.which ) { 9412 9413 // Support: Safari <=8 - 9 9414 // Safari sets which to 0 if you press any of the following keys 9415 // during a drag (#14461) 9416 if ( event.originalEvent.altKey || event.originalEvent.ctrlKey || 9417 event.originalEvent.metaKey || event.originalEvent.shiftKey ) { 9418 this.ignoreMissingWhich = true; 9419 } else if ( !this.ignoreMissingWhich ) { 9420 return this._mouseUp( event ); 9421 } 9422 } 9423 } 9424 9425 if ( event.which || event.button ) { 9426 this._mouseMoved = true; 9427 } 9428 9429 if ( this._mouseStarted ) { 9430 this._mouseDrag( event ); 9431 return event.preventDefault(); 9432 } 9433 9434 if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) { 9435 this._mouseStarted = 9436 ( this._mouseStart( this._mouseDownEvent, event ) !== false ); 9437 ( this._mouseStarted ? this._mouseDrag( event ) : this._mouseUp( event ) ); 9438 } 9439 9440 return !this._mouseStarted; 9441 }, 9442 9443 _mouseUp: function( event ) { 9444 this.document 9445 .off( "mousemove." + this.widgetName, this._mouseMoveDelegate ) 9446 .off( "mouseup." + this.widgetName, this._mouseUpDelegate ); 9447 9448 if ( this._mouseStarted ) { 9449 this._mouseStarted = false; 9450 9451 if ( event.target === this._mouseDownEvent.target ) { 9452 $.data( event.target, this.widgetName + ".preventClickEvent", true ); 9453 } 9454 9455 this._mouseStop( event ); 9456 } 9457 9458 if ( this._mouseDelayTimer ) { 9459 clearTimeout( this._mouseDelayTimer ); 9460 delete this._mouseDelayTimer; 9461 } 9462 9463 this.ignoreMissingWhich = false; 9464 mouseHandled = false; 9465 event.preventDefault(); 9466 }, 9467 9468 _mouseDistanceMet: function( event ) { 9469 return ( Math.max( 9470 Math.abs( this._mouseDownEvent.pageX - event.pageX ), 9471 Math.abs( this._mouseDownEvent.pageY - event.pageY ) 9472 ) >= this.options.distance 9473 ); 9474 }, 9475 9476 _mouseDelayMet: function( /* event */ ) { 9477 return this.mouseDelayMet; 9478 }, 9479 9480 // These are placeholder methods, to be overriden by extending plugin 9481 _mouseStart: function( /* event */ ) {}, 9482 _mouseDrag: function( /* event */ ) {}, 9483 _mouseStop: function( /* event */ ) {}, 9484 _mouseCapture: function( /* event */ ) { return true; } 9485} ); 9486 9487 9488 9489 9490// $.ui.plugin is deprecated. Use $.widget() extensions instead. 9491var plugin = $.ui.plugin = { 9492 add: function( module, option, set ) { 9493 var i, 9494 proto = $.ui[ module ].prototype; 9495 for ( i in set ) { 9496 proto.plugins[ i ] = proto.plugins[ i ] || []; 9497 proto.plugins[ i ].push( [ option, set[ i ] ] ); 9498 } 9499 }, 9500 call: function( instance, name, args, allowDisconnected ) { 9501 var i, 9502 set = instance.plugins[ name ]; 9503 9504 if ( !set ) { 9505 return; 9506 } 9507 9508 if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode || 9509 instance.element[ 0 ].parentNode.nodeType === 11 ) ) { 9510 return; 9511 } 9512 9513 for ( i = 0; i < set.length; i++ ) { 9514 if ( instance.options[ set[ i ][ 0 ] ] ) { 9515 set[ i ][ 1 ].apply( instance.element, args ); 9516 } 9517 } 9518 } 9519}; 9520 9521 9522 9523var safeBlur = $.ui.safeBlur = function( element ) { 9524 9525 // Support: IE9 - 10 only 9526 // If the <body> is blurred, IE will switch windows, see #9420 9527 if ( element && element.nodeName.toLowerCase() !== "body" ) { 9528 $( element ).trigger( "blur" ); 9529 } 9530}; 9531 9532 9533/*! 9534 * jQuery UI Draggable 1.12.1 9535 * http://jqueryui.com 9536 * 9537 * Copyright jQuery Foundation and other contributors 9538 * Released under the MIT license. 9539 * http://jquery.org/license 9540 */ 9541 9542//>>label: Draggable 9543//>>group: Interactions 9544//>>description: Enables dragging functionality for any element. 9545//>>docs: http://api.jqueryui.com/draggable/ 9546//>>demos: http://jqueryui.com/draggable/ 9547//>>css.structure: ../../themes/base/draggable.css 9548 9549 9550 9551$.widget( "ui.draggable", $.ui.mouse, { 9552 version: "1.12.1", 9553 widgetEventPrefix: "drag", 9554 options: { 9555 addClasses: true, 9556 appendTo: "parent", 9557 axis: false, 9558 connectToSortable: false, 9559 containment: false, 9560 cursor: "auto", 9561 cursorAt: false, 9562 grid: false, 9563 handle: false, 9564 helper: "original", 9565 iframeFix: false, 9566 opacity: false, 9567 refreshPositions: false, 9568 revert: false, 9569 revertDuration: 500, 9570 scope: "default", 9571 scroll: true, 9572 scrollSensitivity: 20, 9573 scrollSpeed: 20, 9574 snap: false, 9575 snapMode: "both", 9576 snapTolerance: 20, 9577 stack: false, 9578 zIndex: false, 9579 9580 // Callbacks 9581 drag: null, 9582 start: null, 9583 stop: null 9584 }, 9585 _create: function() { 9586 9587 if ( this.options.helper === "original" ) { 9588 this._setPositionRelative(); 9589 } 9590 if ( this.options.addClasses ) { 9591 this._addClass( "ui-draggable" ); 9592 } 9593 this._setHandleClassName(); 9594 9595 this._mouseInit(); 9596 }, 9597 9598 _setOption: function( key, value ) { 9599 this._super( key, value ); 9600 if ( key === "handle" ) { 9601 this._removeHandleClassName(); 9602 this._setHandleClassName(); 9603 } 9604 }, 9605 9606 _destroy: function() { 9607 if ( ( this.helper || this.element ).is( ".ui-draggable-dragging" ) ) { 9608 this.destroyOnClear = true; 9609 return; 9610 } 9611 this._removeHandleClassName(); 9612 this._mouseDestroy(); 9613 }, 9614 9615 _mouseCapture: function( event ) { 9616 var o = this.options; 9617 9618 // Among others, prevent a drag on a resizable-handle 9619 if ( this.helper || o.disabled || 9620 $( event.target ).closest( ".ui-resizable-handle" ).length > 0 ) { 9621 return false; 9622 } 9623 9624 //Quit if we're not on a valid handle 9625 this.handle = this._getHandle( event ); 9626 if ( !this.handle ) { 9627 return false; 9628 } 9629 9630 this._blurActiveElement( event ); 9631 9632 this._blockFrames( o.iframeFix === true ? "iframe" : o.iframeFix ); 9633 9634 return true; 9635 9636 }, 9637 9638 _blockFrames: function( selector ) { 9639 this.iframeBlocks = this.document.find( selector ).map( function() { 9640 var iframe = $( this ); 9641 9642 return $( "<div>" ) 9643 .css( "position", "absolute" ) 9644 .appendTo( iframe.parent() ) 9645 .outerWidth( iframe.outerWidth() ) 9646 .outerHeight( iframe.outerHeight() ) 9647 .offset( iframe.offset() )[ 0 ]; 9648 } ); 9649 }, 9650 9651 _unblockFrames: function() { 9652 if ( this.iframeBlocks ) { 9653 this.iframeBlocks.remove(); 9654 delete this.iframeBlocks; 9655 } 9656 }, 9657 9658 _blurActiveElement: function( event ) { 9659 var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ), 9660 target = $( event.target ); 9661 9662 // Don't blur if the event occurred on an element that is within 9663 // the currently focused element 9664 // See #10527, #12472 9665 if ( target.closest( activeElement ).length ) { 9666 return; 9667 } 9668 9669 // Blur any element that currently has focus, see #4261 9670 $.ui.safeBlur( activeElement ); 9671 }, 9672 9673 _mouseStart: function( event ) { 9674 9675 var o = this.options; 9676 9677 //Create and append the visible helper 9678 this.helper = this._createHelper( event ); 9679 9680 this._addClass( this.helper, "ui-draggable-dragging" ); 9681 9682 //Cache the helper size 9683 this._cacheHelperProportions(); 9684 9685 //If ddmanager is used for droppables, set the global draggable 9686 if ( $.ui.ddmanager ) { 9687 $.ui.ddmanager.current = this; 9688 } 9689 9690 /* 9691 * - Position generation - 9692 * This block generates everything position related - it's the core of draggables. 9693 */ 9694 9695 //Cache the margins of the original element 9696 this._cacheMargins(); 9697 9698 //Store the helper's css position 9699 this.cssPosition = this.helper.css( "position" ); 9700 this.scrollParent = this.helper.scrollParent( true ); 9701 this.offsetParent = this.helper.offsetParent(); 9702 this.hasFixedAncestor = this.helper.parents().filter( function() { 9703 return $( this ).css( "position" ) === "fixed"; 9704 } ).length > 0; 9705 9706 //The element's absolute position on the page minus margins 9707 this.positionAbs = this.element.offset(); 9708 this._refreshOffsets( event ); 9709 9710 //Generate the original position 9711 this.originalPosition = this.position = this._generatePosition( event, false ); 9712 this.originalPageX = event.pageX; 9713 this.originalPageY = event.pageY; 9714 9715 //Adjust the mouse offset relative to the helper if "cursorAt" is supplied 9716 ( o.cursorAt && this._adjustOffsetFromHelper( o.cursorAt ) ); 9717 9718 //Set a containment if given in the options 9719 this._setContainment(); 9720 9721 //Trigger event + callbacks 9722 if ( this._trigger( "start", event ) === false ) { 9723 this._clear(); 9724 return false;
vendor: 5,171 bytes, lines 9725-9922
9725 } 9726 9727 //Recache the helper size 9728 this._cacheHelperProportions(); 9729 9730 //Prepare the droppable offsets 9731 if ( $.ui.ddmanager && !o.dropBehaviour ) { 9732 $.ui.ddmanager.prepareOffsets( this, event ); 9733 } 9734 9735 // Execute the drag once - this causes the helper not to be visible before getting its 9736 // correct position 9737 this._mouseDrag( event, true ); 9738 9739 // If the ddmanager is used for droppables, inform the manager that dragging has started 9740 // (see #5003) 9741 if ( $.ui.ddmanager ) { 9742 $.ui.ddmanager.dragStart( this, event ); 9743 } 9744 9745 return true; 9746 }, 9747 9748 _refreshOffsets: function( event ) { 9749 this.offset = { 9750 top: this.positionAbs.top - this.margins.top, 9751 left: this.positionAbs.left - this.margins.left, 9752 scroll: false, 9753 parent: this._getParentOffset(), 9754 relative: this._getRelativeOffset() 9755 }; 9756 9757 this.offset.click = { 9758 left: event.pageX - this.offset.left, 9759 top: event.pageY - this.offset.top 9760 }; 9761 }, 9762 9763 _mouseDrag: function( event, noPropagation ) { 9764 9765 // reset any necessary cached properties (see #5009) 9766 if ( this.hasFixedAncestor ) { 9767 this.offset.parent = this._getParentOffset(); 9768 } 9769 9770 //Compute the helpers position 9771 this.position = this._generatePosition( event, true ); 9772 this.positionAbs = this._convertPositionTo( "absolute" ); 9773 9774 //Call plugins and callbacks and use the resulting position if something is returned 9775 if ( !noPropagation ) { 9776 var ui = this._uiHash(); 9777 if ( this._trigger( "drag", event, ui ) === false ) { 9778 this._mouseUp( new $.Event( "mouseup", event ) ); 9779 return false; 9780 } 9781 this.position = ui.position; 9782 } 9783 9784 this.helper[ 0 ].style.left = this.position.left + "px"; 9785 this.helper[ 0 ].style.top = this.position.top + "px"; 9786 9787 if ( $.ui.ddmanager ) { 9788 $.ui.ddmanager.drag( this, event ); 9789 } 9790 9791 return false; 9792 }, 9793 9794 _mouseStop: function( event ) { 9795 9796 //If we are using droppables, inform the manager about the drop 9797 var that = this, 9798 dropped = false; 9799 if ( $.ui.ddmanager && !this.options.dropBehaviour ) { 9800 dropped = $.ui.ddmanager.drop( this, event ); 9801 } 9802 9803 //if a drop comes from outside (a sortable) 9804 if ( this.dropped ) { 9805 dropped = this.dropped; 9806 this.dropped = false; 9807 } 9808 9809 if ( ( this.options.revert === "invalid" && !dropped ) || 9810 ( this.options.revert === "valid" && dropped ) || 9811 this.options.revert === true || ( $.isFunction( this.options.revert ) && 9812 this.options.revert.call( this.element, dropped ) ) 9813 ) { 9814 $( this.helper ).animate( 9815 this.originalPosition, 9816 parseInt( this.options.revertDuration, 10 ), 9817 function() { 9818 if ( that._trigger( "stop", event ) !== false ) { 9819 that._clear(); 9820 } 9821 } 9822 ); 9823 } else { 9824 if ( this._trigger( "stop", event ) !== false ) { 9825 this._clear(); 9826 } 9827 } 9828 9829 return false; 9830 }, 9831 9832 _mouseUp: function( event ) { 9833 this._unblockFrames(); 9834 9835 // If the ddmanager is used for droppables, inform the manager that dragging has stopped 9836 // (see #5003) 9837 if ( $.ui.ddmanager ) { 9838 $.ui.ddmanager.dragStop( this, event ); 9839 } 9840 9841 // Only need to focus if the event occurred on the draggable itself, see #10527 9842 if ( this.handleElement.is( event.target ) ) { 9843 9844 // The interaction is over; whether or not the click resulted in a drag, 9845 // focus the element 9846 this.element.trigger( "focus" ); 9847 } 9848 9849 return $.ui.mouse.prototype._mouseUp.call( this, event ); 9850 }, 9851 9852 cancel: function() { 9853 9854 if ( this.helper.is( ".ui-draggable-dragging" ) ) { 9855 this._mouseUp( new $.Event( "mouseup", { target: this.element[ 0 ] } ) ); 9856 } else { 9857 this._clear(); 9858 } 9859 9860 return this; 9861 9862 }, 9863 9864 _getHandle: function( event ) { 9865 return this.options.handle ? 9866 !!$( event.target ).closest( this.element.find( this.options.handle ) ).length : 9867 true; 9868 }, 9869 9870 _setHandleClassName: function() { 9871 this.handleElement = this.options.handle ? 9872 this.element.find( this.options.handle ) : this.element; 9873 this._addClass( this.handleElement, "ui-draggable-handle" ); 9874 }, 9875 9876 _removeHandleClassName: function() { 9877 this._removeClass( this.handleElement, "ui-draggable-handle" ); 9878 }, 9879 9880 _createHelper: function( event ) { 9881 9882 var o = this.options, 9883 helperIsFunction = $.isFunction( o.helper ), 9884 helper = helperIsFunction ? 9885 $( o.helper.apply( this.element[ 0 ], [ event ] ) ) : 9886 ( o.helper === "clone" ? 9887 this.element.clone().removeAttr( "id" ) : 9888 this.element ); 9889 9890 if ( !helper.parents( "body" ).length ) { 9891 helper.appendTo( ( o.appendTo === "parent" ? 9892 this.element[ 0 ].parentNode : 9893 o.appendTo ) ); 9894 } 9895 9896 // Http://bugs.jqueryui.com/ticket/9446 9897 // a helper function can return the original element 9898 // which wouldn't have been set to relative in _create 9899 if ( helperIsFunction && helper[ 0 ] === this.element[ 0 ] ) { 9900 this._setPositionRelative(); 9901 } 9902 9903 if ( helper[ 0 ] !== this.element[ 0 ] && 9904 !( /(fixed|absolute)/ ).test( helper.css( "position" ) ) ) { 9905 helper.css( "position", "absolute" ); 9906 } 9907 9908 return helper; 9909 9910 }, 9911 9912 _setPositionRelative: function() { 9913 if ( !( /^(?:r|a|f)/ ).test( this.element.css( "position" ) ) ) { 9914 this.element[ 0 ].style.position = "relative"; 9915 } 9916 }, 9917 9918 _adjustOffsetFromHelper: function( obj ) { 9919 if ( typeof obj === "string" ) { 9920 obj = obj.split( " " ); 9921 } 9922 if ( $
vendor: 22,091 bytes, lines 9922-10631
9922.isArray( obj ) ) { 9923 obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 }; 9924 } 9925 if ( "left" in obj ) { 9926 this.offset.click.left = obj.left + this.margins.left; 9927 } 9928 if ( "right" in obj ) { 9929 this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; 9930 } 9931 if ( "top" in obj ) { 9932 this.offset.click.top = obj.top + this.margins.top; 9933 } 9934 if ( "bottom" in obj ) { 9935 this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; 9936 } 9937 }, 9938 9939 _isRootNode: function( element ) { 9940 return ( /(html|body)/i ).test( element.tagName ) || element === this.document[ 0 ]; 9941 }, 9942 9943 _getParentOffset: function() { 9944 9945 //Get the offsetParent and cache its position 9946 var po = this.offsetParent.offset(), 9947 document = this.document[ 0 ]; 9948 9949 // This is a special case where we need to modify a offset calculated on start, since the 9950 // following happened: 9951 // 1. The position of the helper is absolute, so it's position is calculated based on the 9952 // next positioned parent 9953 // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't 9954 // the document, which means that the scroll is included in the initial calculation of the 9955 // offset of the parent, and never recalculated upon drag 9956 if ( this.cssPosition === "absolute" && this.scrollParent[ 0 ] !== document && 9957 $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) { 9958 po.left += this.scrollParent.scrollLeft(); 9959 po.top += this.scrollParent.scrollTop(); 9960 } 9961 9962 if ( this._isRootNode( this.offsetParent[ 0 ] ) ) { 9963 po = { top: 0, left: 0 }; 9964 } 9965 9966 return { 9967 top: po.top + ( parseInt( this.offsetParent.css( "borderTopWidth" ), 10 ) || 0 ), 9968 left: po.left + ( parseInt( this.offsetParent.css( "borderLeftWidth" ), 10 ) || 0 ) 9969 }; 9970 9971 }, 9972 9973 _getRelativeOffset: function() { 9974 if ( this.cssPosition !== "relative" ) { 9975 return { top: 0, left: 0 }; 9976 } 9977 9978 var p = this.element.position(), 9979 scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ); 9980 9981 return { 9982 top: p.top - ( parseInt( this.helper.css( "top" ), 10 ) || 0 ) + 9983 ( !scrollIsRootNode ? this.scrollParent.scrollTop() : 0 ), 9984 left: p.left - ( parseInt( this.helper.css( "left" ), 10 ) || 0 ) + 9985 ( !scrollIsRootNode ? this.scrollParent.scrollLeft() : 0 ) 9986 }; 9987 9988 }, 9989 9990 _cacheMargins: function() { 9991 this.margins = { 9992 left: ( parseInt( this.element.css( "marginLeft" ), 10 ) || 0 ), 9993 top: ( parseInt( this.element.css( "marginTop" ), 10 ) || 0 ), 9994 right: ( parseInt( this.element.css( "marginRight" ), 10 ) || 0 ), 9995 bottom: ( parseInt( this.element.css( "marginBottom" ), 10 ) || 0 ) 9996 }; 9997 }, 9998 9999 _cacheHelperProportions: function() { 10000 this.helperProportions = { 10001 width: this.helper.outerWidth(), 10002 height: this.helper.outerHeight() 10003 }; 10004 }, 10005 10006 _setContainment: function() { 10007 10008 var isUserScrollable, c, ce, 10009 o = this.options, 10010 document = this.document[ 0 ]; 10011 10012 this.relativeContainer = null; 10013 10014 if ( !o.containment ) { 10015 this.containment = null; 10016 return; 10017 } 10018 10019 if ( o.containment === "window" ) { 10020 this.containment = [ 10021 $( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left, 10022 $( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top, 10023 $( window ).scrollLeft() + $( window ).width() - 10024 this.helperProportions.width - this.margins.left, 10025 $( window ).scrollTop() + 10026 ( $( window ).height() || document.body.parentNode.scrollHeight ) - 10027 this.helperProportions.height - this.margins.top 10028 ]; 10029 return; 10030 } 10031 10032 if ( o.containment === "document" ) { 10033 this.containment = [ 10034 0, 10035 0, 10036 $( document ).width() - this.helperProportions.width - this.margins.left, 10037 ( $( document ).height() || document.body.parentNode.scrollHeight ) - 10038 this.helperProportions.height - this.margins.top 10039 ]; 10040 return; 10041 } 10042 10043 if ( o.containment.constructor === Array ) { 10044 this.containment = o.containment; 10045 return; 10046 } 10047 10048 if ( o.containment === "parent" ) { 10049 o.containment = this.helper[ 0 ].parentNode; 10050 } 10051 10052 c = $( o.containment ); 10053 ce = c[ 0 ]; 10054 10055 if ( !ce ) { 10056 return; 10057 } 10058 10059 isUserScrollable = /(scroll|auto)/.test( c.css( "overflow" ) ); 10060 10061 this.containment = [ 10062 ( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) + 10063 ( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ), 10064 ( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) + 10065 ( parseInt( c.css( "paddingTop" ), 10 ) || 0 ), 10066 ( isUserScrollable ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) - 10067 ( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) - 10068 ( parseInt( c.css( "paddingRight" ), 10 ) || 0 ) - 10069 this.helperProportions.width - 10070 this.margins.left - 10071 this.margins.right, 10072 ( isUserScrollable ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) - 10073 ( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 ) - 10074 ( parseInt( c.css( "paddingBottom" ), 10 ) || 0 ) - 10075 this.helperProportions.height - 10076 this.margins.top - 10077 this.margins.bottom 10078 ]; 10079 this.relativeContainer = c; 10080 }, 10081 10082 _convertPositionTo: function( d, pos ) { 10083 10084 if ( !pos ) { 10085 pos = this.position; 10086 } 10087 10088 var mod = d === "absolute" ? 1 : -1, 10089 scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ); 10090 10091 return { 10092 top: ( 10093 10094 // The absolute mouse position 10095 pos.top + 10096 10097 // Only for relative positioned nodes: Relative offset from element to offset parent 10098 this.offset.relative.top * mod + 10099 10100 // The offsetParent's offset without borders (offset + border) 10101 this.offset.parent.top * mod - 10102 ( ( this.cssPosition === "fixed" ? 10103 -this.offset.scroll.top : 10104 ( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) * mod ) 10105 ), 10106 left: ( 10107 10108 // The absolute mouse position 10109 pos.left + 10110 10111 // Only for relative positioned nodes: Relative offset from element to offset parent 10112 this.offset.relative.left * mod + 10113 10114 // The offsetParent's offset without borders (offset + border) 10115 this.offset.parent.left * mod - 10116 ( ( this.cssPosition === "fixed" ? 10117 -this.offset.scroll.left : 10118 ( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) * mod ) 10119 ) 10120 }; 10121 10122 }, 10123 10124 _generatePosition: function( event, constrainPosition ) { 10125 10126 var containment, co, top, left, 10127 o = this.options, 10128 scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ), 10129 pageX = event.pageX, 10130 pageY = event.pageY; 10131 10132 // Cache the scroll 10133 if ( !scrollIsRootNode || !this.offset.scroll ) { 10134 this.offset.scroll = { 10135 top: this.scrollParent.scrollTop(), 10136 left: this.scrollParent.scrollLeft() 10137 }; 10138 } 10139 10140 /* 10141 * - Position constraining - 10142 * Constrain the position to a mix of grid, containment. 10143 */ 10144 10145 // If we are not dragging yet, we won't check for options 10146 if ( constrainPosition ) { 10147 if ( this.containment ) { 10148 if ( this.relativeContainer ) { 10149 co = this.relativeContainer.offset(); 10150 containment = [ 10151 this.containment[ 0 ] + co.left, 10152 this.containment[ 1 ] + co.top, 10153 this.containment[ 2 ] + co.left, 10154 this.containment[ 3 ] + co.top 10155 ]; 10156 } else { 10157 containment = this.containment; 10158 } 10159 10160 if ( event.pageX - this.offset.click.left < containment[ 0 ] ) { 10161 pageX = containment[ 0 ] + this.offset.click.left; 10162 } 10163 if ( event.pageY - this.offset.click.top < containment[ 1 ] ) { 10164 pageY = containment[ 1 ] + this.offset.click.top; 10165 } 10166 if ( event.pageX - this.offset.click.left > containment[ 2 ] ) { 10167 pageX = containment[ 2 ] + this.offset.click.left; 10168 } 10169 if ( event.pageY - this.offset.click.top > containment[ 3 ] ) { 10170 pageY = containment[ 3 ] + this.offset.click.top; 10171 } 10172 } 10173 10174 if ( o.grid ) { 10175 10176 //Check for grid elements set to 0 to prevent divide by 0 error causing invalid 10177 // argument errors in IE (see ticket #6950) 10178 top = o.grid[ 1 ] ? this.originalPageY + Math.round( ( pageY - 10179 this.originalPageY ) / o.grid[ 1 ] ) * o.grid[ 1 ] : this.originalPageY; 10180 pageY = containment ? ( ( top - this.offset.click.top >= containment[ 1 ] || 10181 top - this.offset.click.top > containment[ 3 ] ) ? 10182 top : 10183 ( ( top - this.offset.click.top >= containment[ 1 ] ) ? 10184 top - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) : top; 10185 10186 left = o.grid[ 0 ] ? this.originalPageX + 10187 Math.round( ( pageX - this.originalPageX ) / o.grid[ 0 ] ) * o.grid[ 0 ] : 10188 this.originalPageX; 10189 pageX = containment ? ( ( left - this.offset.click.left >= containment[ 0 ] || 10190 left - this.offset.click.left > containment[ 2 ] ) ? 10191 left : 10192 ( ( left - this.offset.click.left >= containment[ 0 ] ) ? 10193 left - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) : left; 10194 } 10195 10196 if ( o.axis === "y" ) { 10197 pageX = this.originalPageX; 10198 } 10199 10200 if ( o.axis === "x" ) { 10201 pageY = this.originalPageY; 10202 } 10203 } 10204 10205 return { 10206 top: ( 10207 10208 // The absolute mouse position 10209 pageY - 10210 10211 // Click offset (relative to the element) 10212 this.offset.click.top - 10213 10214 // Only for relative positioned nodes: Relative offset from element to offset parent 10215 this.offset.relative.top - 10216 10217 // The offsetParent's offset without borders (offset + border) 10218 this.offset.parent.top + 10219 ( this.cssPosition === "fixed" ? 10220 -this.offset.scroll.top : 10221 ( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) 10222 ), 10223 left: ( 10224 10225 // The absolute mouse position 10226 pageX - 10227 10228 // Click offset (relative to the element) 10229 this.offset.click.left - 10230 10231 // Only for relative positioned nodes: Relative offset from element to offset parent 10232 this.offset.relative.left - 10233 10234 // The offsetParent's offset without borders (offset + border) 10235 this.offset.parent.left + 10236 ( this.cssPosition === "fixed" ? 10237 -this.offset.scroll.left : 10238 ( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) 10239 ) 10240 }; 10241 10242 }, 10243 10244 _clear: function() { 10245 this._removeClass( this.helper, "ui-draggable-dragging" ); 10246 if ( this.helper[ 0 ] !== this.element[ 0 ] && !this.cancelHelperRemoval ) { 10247 this.helper.remove(); 10248 } 10249 this.helper = null; 10250 this.cancelHelperRemoval = false; 10251 if ( this.destroyOnClear ) { 10252 this.destroy(); 10253 } 10254 }, 10255 10256 // From now on bulk stuff - mainly helpers 10257 10258 _trigger: function( type, event, ui ) { 10259 ui = ui || this._uiHash(); 10260 $.ui.plugin.call( this, type, [ event, ui, this ], true ); 10261 10262 // Absolute position and offset (see #6884 ) have to be recalculated after plugins 10263 if ( /^(drag|start|stop)/.test( type ) ) { 10264 this.positionAbs = this._convertPositionTo( "absolute" ); 10265 ui.offset = this.positionAbs; 10266 } 10267 return $.Widget.prototype._trigger.call( this, type, event, ui ); 10268 }, 10269 10270 plugins: {}, 10271 10272 _uiHash: function() { 10273 return { 10274 helper: this.helper, 10275 position: this.position, 10276 originalPosition: this.originalPosition, 10277 offset: this.positionAbs 10278 }; 10279 } 10280 10281} ); 10282 10283$.ui.plugin.add( "draggable", "connectToSortable", { 10284 start: function( event, ui, draggable ) { 10285 var uiSortable = $.extend( {}, ui, { 10286 item: draggable.element 10287 } ); 10288 10289 draggable.sortables = []; 10290 $( draggable.options.connectToSortable ).each( function() { 10291 var sortable = $( this ).sortable( "instance" ); 10292 10293 if ( sortable && !sortable.options.disabled ) { 10294 draggable.sortables.push( sortable ); 10295 10296 // RefreshPositions is called at drag start to refresh the containerCache 10297 // which is used in drag. This ensures it's initialized and synchronized 10298 // with any changes that might have happened on the page since initialization. 10299 sortable.refreshPositions(); 10300 sortable._trigger( "activate", event, uiSortable ); 10301 } 10302 } ); 10303 }, 10304 stop: function( event, ui, draggable ) { 10305 var uiSortable = $.extend( {}, ui, { 10306 item: draggable.element 10307 } ); 10308 10309 draggable.cancelHelperRemoval = false; 10310 10311 $.each( draggable.sortables, function() { 10312 var sortable = this; 10313 10314 if ( sortable.isOver ) { 10315 sortable.isOver = 0; 10316 10317 // Allow this sortable to handle removing the helper 10318 draggable.cancelHelperRemoval = true; 10319 sortable.cancelHelperRemoval = false; 10320 10321 // Use _storedCSS To restore properties in the sortable, 10322 // as this also handles revert (#9675) since the draggable 10323 // may have modified them in unexpected ways (#8809) 10324 sortable._storedCSS = { 10325 position: sortable.placeholder.css( "position" ), 10326 top: sortable.placeholder.css( "top" ), 10327 left: sortable.placeholder.css( "left" ) 10328 }; 10329 10330 sortable._mouseStop( event ); 10331 10332 // Once drag has ended, the sortable should return to using 10333 // its original helper, not the shared helper from draggable 10334 sortable.options.helper = sortable.options._helper; 10335 } else { 10336 10337 // Prevent this Sortable from removing the helper. 10338 // However, don't set the draggable to remove the helper 10339 // either as another connected Sortable may yet handle the removal. 10340 sortable.cancelHelperRemoval = true; 10341 10342 sortable._trigger( "deactivate", event, uiSortable ); 10343 } 10344 } ); 10345 }, 10346 drag: function( event, ui, draggable ) { 10347 $.each( draggable.sortables, function() { 10348 var innermostIntersecting = false, 10349 sortable = this; 10350 10351 // Copy over variables that sortable's _intersectsWith uses 10352 sortable.positionAbs = draggable.positionAbs; 10353 sortable.helperProportions = draggable.helperProportions; 10354 sortable.offset.click = draggable.offset.click; 10355 10356 if ( sortable._intersectsWith( sortable.containerCache ) ) { 10357 innermostIntersecting = true; 10358 10359 $.each( draggable.sortables, function() { 10360 10361 // Copy over variables that sortable's _intersectsWith uses 10362 this.positionAbs = draggable.positionAbs; 10363 this.helperProportions = draggable.helperProportions; 10364 this.offset.click = draggable.offset.click; 10365 10366 if ( this !== sortable && 10367 this._intersectsWith( this.containerCache ) && 10368 $.contains( sortable.element[ 0 ], this.element[ 0 ] ) ) { 10369 innermostIntersecting = false; 10370 } 10371 10372 return innermostIntersecting; 10373 } ); 10374 } 10375 10376 if ( innermostIntersecting ) { 10377 10378 // If it intersects, we use a little isOver variable and set it once, 10379 // so that the move-in stuff gets fired only once. 10380 if ( !sortable.isOver ) { 10381 sortable.isOver = 1; 10382 10383 // Store draggable's parent in case we need to reappend to it later. 10384 draggable._parent = ui.helper.parent(); 10385 10386 sortable.currentItem = ui.helper 10387 .appendTo( sortable.element ) 10388 .data( "ui-sortable-item", true ); 10389 10390 // Store helper option to later restore it 10391 sortable.options._helper = sortable.options.helper; 10392 10393 sortable.options.helper = function() { 10394 return ui.helper[ 0 ]; 10395 }; 10396 10397 // Fire the start events of the sortable with our passed browser event, 10398 // and our own helper (so it doesn't create a new one) 10399 event.target = sortable.currentItem[ 0 ]; 10400 sortable._mouseCapture( event, true ); 10401 sortable._mouseStart( event, true, true ); 10402 10403 // Because the browser event is way off the new appended portlet, 10404 // modify necessary variables to reflect the changes 10405 sortable.offset.click.top = draggable.offset.click.top; 10406 sortable.offset.click.left = draggable.offset.click.left; 10407 sortable.offset.parent.left -= draggable.offset.parent.left - 10408 sortable.offset.parent.left; 10409 sortable.offset.parent.top -= draggable.offset.parent.top - 10410 sortable.offset.parent.top; 10411 10412 draggable._trigger( "toSortable", event ); 10413 10414 // Inform draggable that the helper is in a valid drop zone, 10415 // used solely in the revert option to handle "valid/invalid". 10416 draggable.dropped = sortable.element; 10417 10418 // Need to refreshPositions of all sortables in the case that 10419 // adding to one sortable changes the location of the other sortables (#9675) 10420 $.each( draggable.sortables, function() { 10421 this.refreshPositions(); 10422 } ); 10423 10424 // Hack so receive/update callbacks work (mostly) 10425 draggable.currentItem = draggable.element; 10426 sortable.fromOutside = draggable; 10427 } 10428 10429 if ( sortable.currentItem ) { 10430 sortable._mouseDrag( event ); 10431 10432 // Copy the sortable's position because the draggable's can potentially reflect 10433 // a relative position, while sortable is always absolute, which the dragged 10434 // element has now become. (#8809) 10435 ui.position = sortable.position; 10436 } 10437 } else { 10438 10439 // If it doesn't intersect with the sortable, and it intersected before, 10440 // we fake the drag stop of the sortable, but make sure it doesn't remove 10441 // the helper by using cancelHelperRemoval. 10442 if ( sortable.isOver ) { 10443 10444 sortable.isOver = 0; 10445 sortable.cancelHelperRemoval = true; 10446 10447 // Calling sortable's mouseStop would trigger a revert, 10448 // so revert must be temporarily false until after mouseStop is called. 10449 sortable.options._revert = sortable.options.revert; 10450 sortable.options.revert = false; 10451 10452 sortable._trigger( "out", event, sortable._uiHash( sortable ) ); 10453 sortable._mouseStop( event, true ); 10454 10455 // Restore sortable behaviors that were modfied 10456 // when the draggable entered the sortable area (#9481) 10457 sortable.options.revert = sortable.options._revert; 10458 sortable.options.helper = sortable.options._helper; 10459 10460 if ( sortable.placeholder ) { 10461 sortable.placeholder.remove(); 10462 } 10463 10464 // Restore and recalculate the draggable's offset considering the sortable 10465 // may have modified them in unexpected ways. (#8809, #10669) 10466 ui.helper.appendTo( draggable._parent ); 10467 draggable._refreshOffsets( event ); 10468 ui.position = draggable._generatePosition( event, true ); 10469 10470 draggable._trigger( "fromSortable", event ); 10471 10472 // Inform draggable that the helper is no longer in a valid drop zone 10473 draggable.dropped = false; 10474 10475 // Need to refreshPositions of all sortables just in case removing 10476 // from one sortable changes the location of other sortables (#9675) 10477 $.each( draggable.sortables, function() { 10478 this.refreshPositions(); 10479 } ); 10480 } 10481 } 10482 } ); 10483 } 10484} ); 10485 10486$.ui.plugin.add( "draggable", "cursor", { 10487 start: function( event, ui, instance ) { 10488 var t = $( "body" ), 10489 o = instance.options; 10490 10491 if ( t.css( "cursor" ) ) { 10492 o._cursor = t.css( "cursor" ); 10493 } 10494 t.css( "cursor", o.cursor ); 10495 }, 10496 stop: function( event, ui, instance ) { 10497 var o = instance.options; 10498 if ( o._cursor ) { 10499 $( "body" ).css( "cursor", o._cursor ); 10500 } 10501 } 10502} ); 10503 10504$.ui.plugin.add( "draggable", "opacity", { 10505 start: function( event, ui, instance ) { 10506 var t = $( ui.helper ), 10507 o = instance.options; 10508 if ( t.css( "opacity" ) ) { 10509 o._opacity = t.css( "opacity" ); 10510 } 10511 t.css( "opacity", o.opacity ); 10512 }, 10513 stop: function( event, ui, instance ) { 10514 var o = instance.options; 10515 if ( o._opacity ) { 10516 $( ui.helper ).css( "opacity", o._opacity ); 10517 } 10518 } 10519} ); 10520 10521$.ui.plugin.add( "draggable", "scroll", { 10522 start: function( event, ui, i ) { 10523 if ( !i.scrollParentNotHidden ) { 10524 i.scrollParentNotHidden = i.helper.scrollParent( false ); 10525 } 10526 10527 if ( i.scrollParentNotHidden[ 0 ] !== i.document[ 0 ] && 10528 i.scrollParentNotHidden[ 0 ].tagName !== "HTML" ) { 10529 i.overflowOffset = i.scrollParentNotHidden.offset(); 10530 } 10531 }, 10532 drag: function( event, ui, i ) { 10533 10534 var o = i.options, 10535 scrolled = false, 10536 scrollParent = i.scrollParentNotHidden[ 0 ], 10537 document = i.document[ 0 ]; 10538 10539 if ( scrollParent !== document && scrollParent.tagName !== "HTML" ) { 10540 if ( !o.axis || o.axis !== "x" ) { 10541 if ( ( i.overflowOffset.top + scrollParent.offsetHeight ) - event.pageY < 10542 o.scrollSensitivity ) { 10543 scrollParent.scrollTop = scrolled = scrollParent.scrollTop + o.scrollSpeed; 10544 } else if ( event.pageY - i.overflowOffset.top < o.scrollSensitivity ) { 10545 scrollParent.scrollTop = scrolled = scrollParent.scrollTop - o.scrollSpeed; 10546 } 10547 } 10548 10549 if ( !o.axis || o.axis !== "y" ) { 10550 if ( ( i.overflowOffset.left + scrollParent.offsetWidth ) - event.pageX < 10551 o.scrollSensitivity ) { 10552 scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft + o.scrollSpeed; 10553 } else if ( event.pageX - i.overflowOffset.left < o.scrollSensitivity ) { 10554 scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft - o.scrollSpeed; 10555 } 10556 } 10557 10558 } else { 10559 10560 if ( !o.axis || o.axis !== "x" ) { 10561 if ( event.pageY - $( document ).scrollTop() < o.scrollSensitivity ) { 10562 scrolled = $( document ).scrollTop( $( document ).scrollTop() - o.scrollSpeed ); 10563 } else if ( $( window ).height() - ( event.pageY - $( document ).scrollTop() ) < 10564 o.scrollSensitivity ) { 10565 scrolled = $( document ).scrollTop( $( document ).scrollTop() + o.scrollSpeed ); 10566 } 10567 } 10568 10569 if ( !o.axis || o.axis !== "y" ) { 10570 if ( event.pageX - $( document ).scrollLeft() < o.scrollSensitivity ) { 10571 scrolled = $( document ).scrollLeft( 10572 $( document ).scrollLeft() - o.scrollSpeed 10573 ); 10574 } else if ( $( window ).width() - ( event.pageX - $( document ).scrollLeft() ) < 10575 o.scrollSensitivity ) { 10576 scrolled = $( document ).scrollLeft( 10577 $( document ).scrollLeft() + o.scrollSpeed 10578 ); 10579 } 10580 } 10581 10582 } 10583 10584 if ( scrolled !== false && $.ui.ddmanager && !o.dropBehaviour ) { 10585 $.ui.ddmanager.prepareOffsets( i, event ); 10586 } 10587 10588 } 10589} ); 10590 10591$.ui.plugin.add( "draggable", "snap", { 10592 start: function( event, ui, i ) { 10593 10594 var o = i.options; 10595 10596 i.snapElements = []; 10597 10598 $( o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap ) 10599 .each( function() { 10600 var $t = $( this ), 10601 $o = $t.offset(); 10602 if ( this !== i.element[ 0 ] ) { 10603 i.snapElements.push( { 10604 item: this, 10605 width: $t.outerWidth(), height: $t.outerHeight(), 10606 top: $o.top, left: $o.left 10607 } ); 10608 } 10609 } ); 10610 10611 }, 10612 drag: function( event, ui, inst ) { 10613 10614 var ts, bs, ls, rs, l, r, t, b, i, first, 10615 o = inst.options, 10616 d = o.snapTolerance, 10617 x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width, 10618 y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height; 10619 10620 for ( i = inst.snapElements.length - 1; i >= 0; i-- ) { 10621 10622 l = inst.snapElements[ i ].left - inst.margins.left; 10623 r = l + inst.snapElements[ i ].width; 10624 t = inst.snapElements[ i ].top - inst.margins.top; 10625 b = t + inst.snapElements[ i ].height; 10626 10627 if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d || 10628 !$.contains( inst.snapElements[ i ].item.ownerDocument, 10629 inst.snapElements[ i ].item ) ) { 10630 if ( inst.snapElements[ i ].snapping ) { 10631
10631( inst.options.snap.release && 10632 inst.options.snap.release.call( 10633 inst.element, 10634 event, 10635 $.extend( inst._uiHash(), { snapItem: inst.snapElements[ i ].item } ) 10636 ) ); 10637 } 10638 inst.snapElements[ i ].snapping = false;
vendor: 58,938 bytes, lines 10639-13027
10639 continue; 10640 } 10641 10642 if ( o.snapMode !== "inner" ) { 10643 ts = Math.abs( t - y2 ) <= d; 10644 bs = Math.abs( b - y1 ) <= d; 10645 ls = Math.abs( l - x2 ) <= d; 10646 rs = Math.abs( r - x1 ) <= d; 10647 if ( ts ) { 10648 ui.position.top = inst._convertPositionTo( "relative", { 10649 top: t - inst.helperProportions.height, 10650 left: 0 10651 } ).top; 10652 } 10653 if ( bs ) { 10654 ui.position.top = inst._convertPositionTo( "relative", { 10655 top: b, 10656 left: 0 10657 } ).top; 10658 } 10659 if ( ls ) { 10660 ui.position.left = inst._convertPositionTo( "relative", { 10661 top: 0, 10662 left: l - inst.helperProportions.width 10663 } ).left; 10664 } 10665 if ( rs ) { 10666 ui.position.left = inst._convertPositionTo( "relative", { 10667 top: 0, 10668 left: r 10669 } ).left; 10670 } 10671 } 10672 10673 first = ( ts || bs || ls || rs ); 10674 10675 if ( o.snapMode !== "outer" ) { 10676 ts = Math.abs( t - y1 ) <= d; 10677 bs = Math.abs( b - y2 ) <= d; 10678 ls = Math.abs( l - x1 ) <= d; 10679 rs = Math.abs( r - x2 ) <= d; 10680 if ( ts ) { 10681 ui.position.top = inst._convertPositionTo( "relative", { 10682 top: t, 10683 left: 0 10684 } ).top; 10685 } 10686 if ( bs ) { 10687 ui.position.top = inst._convertPositionTo( "relative", { 10688 top: b - inst.helperProportions.height, 10689 left: 0 10690 } ).top; 10691 } 10692 if ( ls ) { 10693 ui.position.left = inst._convertPositionTo( "relative", { 10694 top: 0, 10695 left: l 10696 } ).left; 10697 } 10698 if ( rs ) { 10699 ui.position.left = inst._convertPositionTo( "relative", { 10700 top: 0, 10701 left: r - inst.helperProportions.width 10702 } ).left; 10703 } 10704 } 10705 10706 if ( !inst.snapElements[ i ].snapping && ( ts || bs || ls || rs || first ) ) { 10707 ( inst.options.snap.snap && 10708 inst.options.snap.snap.call( 10709 inst.element, 10710 event, 10711 $.extend( inst._uiHash(), { 10712 snapItem: inst.snapElements[ i ].item 10713 } ) ) ); 10714 } 10715 inst.snapElements[ i ].snapping = ( ts || bs || ls || rs || first ); 10716 10717 } 10718 10719 } 10720} ); 10721 10722$.ui.plugin.add( "draggable", "stack", { 10723 start: function( event, ui, instance ) { 10724 var min, 10725 o = instance.options, 10726 group = $.makeArray( $( o.stack ) ).sort( function( a, b ) { 10727 return ( parseInt( $( a ).css( "zIndex" ), 10 ) || 0 ) - 10728 ( parseInt( $( b ).css( "zIndex" ), 10 ) || 0 ); 10729 } ); 10730 10731 if ( !group.length ) { return; } 10732 10733 min = parseInt( $( group[ 0 ] ).css( "zIndex" ), 10 ) || 0; 10734 $( group ).each( function( i ) { 10735 $( this ).css( "zIndex", min + i ); 10736 } ); 10737 this.css( "zIndex", ( min + group.length ) ); 10738 } 10739} ); 10740 10741$.ui.plugin.add( "draggable", "zIndex", { 10742 start: function( event, ui, instance ) { 10743 var t = $( ui.helper ), 10744 o = instance.options; 10745 10746 if ( t.css( "zIndex" ) ) { 10747 o._zIndex = t.css( "zIndex" ); 10748 } 10749 t.css( "zIndex", o.zIndex ); 10750 }, 10751 stop: function( event, ui, instance ) { 10752 var o = instance.options; 10753 10754 if ( o._zIndex ) { 10755 $( ui.helper ).css( "zIndex", o._zIndex ); 10756 } 10757 } 10758} ); 10759 10760var widgetsDraggable = $.ui.draggable; 10761 10762 10763/*! 10764 * jQuery UI Resizable 1.12.1 10765 * http://jqueryui.com 10766 * 10767 * Copyright jQuery Foundation and other contributors 10768 * Released under the MIT license. 10769 * http://jquery.org/license 10770 */ 10771 10772//>>label: Resizable 10773//>>group: Interactions 10774//>>description: Enables resize functionality for any element. 10775//>>docs: http://api.jqueryui.com/resizable/ 10776//>>demos: http://jqueryui.com/resizable/ 10777//>>css.structure: ../../themes/base/core.css 10778//>>css.structure: ../../themes/base/resizable.css 10779//>>css.theme: ../../themes/base/theme.css 10780 10781 10782 10783$.widget( "ui.resizable", $.ui.mouse, { 10784 version: "1.12.1", 10785 widgetEventPrefix: "resize", 10786 options: { 10787 alsoResize: false, 10788 animate: false, 10789 animateDuration: "slow", 10790 animateEasing: "swing", 10791 aspectRatio: false, 10792 autoHide: false, 10793 classes: { 10794 "ui-resizable-se": "ui-icon ui-icon-gripsmall-diagonal-se" 10795 }, 10796 containment: false, 10797 ghost: false, 10798 grid: false, 10799 handles: "e,s,se", 10800 helper: false, 10801 maxHeight: null, 10802 maxWidth: null, 10803 minHeight: 10, 10804 minWidth: 10, 10805 10806 // See #7960 10807 zIndex: 90, 10808 10809 // Callbacks 10810 resize: null, 10811 start: null, 10812 stop: null 10813 }, 10814 10815 _num: function( value ) { 10816 return parseFloat( value ) || 0; 10817 }, 10818 10819 _isNumber: function( value ) { 10820 return !isNaN( parseFloat( value ) ); 10821 }, 10822 10823 _hasScroll: function( el, a ) { 10824 10825 if ( $( el ).css( "overflow" ) === "hidden" ) { 10826 return false; 10827 } 10828 10829 var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop", 10830 has = false; 10831 10832 if ( el[ scroll ] > 0 ) { 10833 return true; 10834 } 10835 10836 // TODO: determine which cases actually cause this to happen 10837 // if the element doesn't have the scroll set, see if it's possible to 10838 // set the scroll 10839 el[ scroll ] = 1; 10840 has = ( el[ scroll ] > 0 ); 10841 el[ scroll ] = 0; 10842 return has; 10843 }, 10844 10845 _create: function() { 10846 10847 var margins, 10848 o = this.options, 10849 that = this; 10850 this._addClass( "ui-resizable" ); 10851 10852 $.extend( this, { 10853 _aspectRatio: !!( o.aspectRatio ), 10854 aspectRatio: o.aspectRatio, 10855 originalElement: this.element, 10856 _proportionallyResizeElements: [], 10857 _helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null 10858 } ); 10859 10860 // Wrap the element if it cannot hold child nodes 10861 if ( this.element[ 0 ].nodeName.match( /^(canvas|textarea|input|select|button|img)$/i ) ) { 10862 10863 this.element.wrap( 10864 $( "<div class='ui-wrapper' style='overflow: hidden;'></div>" ).css( { 10865 position: this.element.css( "position" ), 10866 width: this.element.outerWidth(), 10867 height: this.element.outerHeight(), 10868 top: this.element.css( "top" ), 10869 left: this.element.css( "left" ) 10870 } ) 10871 ); 10872 10873 this.element = this.element.parent().data( 10874 "ui-resizable", this.element.resizable( "instance" ) 10875 ); 10876 10877 this.elementIsWrapper = true; 10878 10879 margins = { 10880 marginTop: this.originalElement.css( "marginTop" ), 10881 marginRight: this.originalElement.css( "marginRight" ), 10882 marginBottom: this.originalElement.css( "marginBottom" ), 10883 marginLeft: this.originalElement.css( "marginLeft" ) 10884 }; 10885 10886 this.element.css( margins ); 10887 this.originalElement.css( "margin", 0 ); 10888 10889 // support: Safari 10890 // Prevent Safari textarea resize 10891 this.originalResizeStyle = this.originalElement.css( "resize" ); 10892 this.originalElement.css( "resize", "none" ); 10893 10894 this._proportionallyResizeElements.push( this.originalElement.css( { 10895 position: "static", 10896 zoom: 1, 10897 display: "block" 10898 } ) ); 10899 10900 // Support: IE9 10901 // avoid IE jump (hard set the margin) 10902 this.originalElement.css( margins ); 10903 10904 this._proportionallyResize(); 10905 } 10906 10907 this._setupHandles(); 10908 10909 if ( o.autoHide ) { 10910 $( this.element ) 10911 .on( "mouseenter", function() { 10912 if ( o.disabled ) { 10913 return; 10914 } 10915 that._removeClass( "ui-resizable-autohide" ); 10916 that._handles.show(); 10917 } ) 10918 .on( "mouseleave", function() { 10919 if ( o.disabled ) { 10920 return; 10921 } 10922 if ( !that.resizing ) { 10923 that._addClass( "ui-resizable-autohide" ); 10924 that._handles.hide(); 10925 } 10926 } ); 10927 } 10928 10929 this._mouseInit(); 10930 }, 10931 10932 _destroy: function() { 10933 10934 this._mouseDestroy(); 10935 10936 var wrapper, 10937 _destroy = function( exp ) { 10938 $( exp ) 10939 .removeData( "resizable" ) 10940 .removeData( "ui-resizable" ) 10941 .off( ".resizable" ) 10942 .find( ".ui-resizable-handle" ) 10943 .remove(); 10944 }; 10945 10946 // TODO: Unwrap at same DOM position 10947 if ( this.elementIsWrapper ) { 10948 _destroy( this.element ); 10949 wrapper = this.element; 10950 this.originalElement.css( { 10951 position: wrapper.css( "position" ), 10952 width: wrapper.outerWidth(), 10953 height: wrapper.outerHeight(), 10954 top: wrapper.css( "top" ), 10955 left: wrapper.css( "left" ) 10956 } ).insertAfter( wrapper ); 10957 wrapper.remove(); 10958 } 10959 10960 this.originalElement.css( "resize", this.originalResizeStyle ); 10961 _destroy( this.originalElement ); 10962 10963 return this; 10964 }, 10965 10966 _setOption: function( key, value ) { 10967 this._super( key, value ); 10968 10969 switch ( key ) { 10970 case "handles": 10971 this._removeHandles(); 10972 this._setupHandles(); 10973 break; 10974 default: 10975 break; 10976 } 10977 }, 10978 10979 _setupHandles: function() { 10980 var o = this.options, handle, i, n, hname, axis, that = this; 10981 this.handles = o.handles || 10982 ( !$( ".ui-resizable-handle", this.element ).length ? 10983 "e,s,se" : { 10984 n: ".ui-resizable-n", 10985 e: ".ui-resizable-e", 10986 s: ".ui-resizable-s", 10987 w: ".ui-resizable-w", 10988 se: ".ui-resizable-se", 10989 sw: ".ui-resizable-sw", 10990 ne: ".ui-resizable-ne", 10991 nw: ".ui-resizable-nw" 10992 } ); 10993 10994 this._handles = $(); 10995 if ( this.handles.constructor === String ) { 10996 10997 if ( this.handles === "all" ) { 10998 this.handles = "n,e,s,w,se,sw,ne,nw"; 10999 } 11000 11001 n = this.handles.split( "," ); 11002 this.handles = {}; 11003 11004 for ( i = 0; i < n.length; i++ ) { 11005 11006 handle = $.trim( n[ i ] ); 11007 hname = "ui-resizable-" + handle; 11008 axis = $( "<div>" ); 11009 this._addClass( axis, "ui-resizable-handle " + hname ); 11010 11011 axis.css( { zIndex: o.zIndex } ); 11012 11013 this.handles[ handle ] = ".ui-resizable-" + handle; 11014 this.element.append( axis ); 11015 } 11016 11017 } 11018 11019 this._renderAxis = function( target ) { 11020 11021 var i, axis, padPos, padWrapper; 11022 11023 target = target || this.element; 11024 11025 for ( i in this.handles ) { 11026 11027 if ( this.handles[ i ].constructor === String ) { 11028 this.handles[ i ] = this.element.children( this.handles[ i ] ).first().show(); 11029 } else if ( this.handles[ i ].jquery || this.handles[ i ].nodeType ) { 11030 this.handles[ i ] = $( this.handles[ i ] ); 11031 this._on( this.handles[ i ], { "mousedown": that._mouseDown } ); 11032 } 11033 11034 if ( this.elementIsWrapper && 11035 this.originalElement[ 0 ] 11036 .nodeName 11037 .match( /^(textarea|input|select|button)$/i ) ) { 11038 axis = $( this.handles[ i ], this.element ); 11039 11040 padWrapper = /sw|ne|nw|se|n|s/.test( i ) ? 11041 axis.outerHeight() : 11042 axis.outerWidth(); 11043 11044 padPos = [ "padding", 11045 /ne|nw|n/.test( i ) ? "Top" : 11046 /se|sw|s/.test( i ) ? "Bottom" : 11047 /^e$/.test( i ) ? "Right" : "Left" ].join( "" ); 11048 11049 target.css( padPos, padWrapper ); 11050 11051 this._proportionallyResize(); 11052 } 11053 11054 this._handles = this._handles.add( this.handles[ i ] ); 11055 } 11056 }; 11057 11058 // TODO: make renderAxis a prototype function 11059 this._renderAxis( this.element ); 11060 11061 this._handles = this._handles.add( this.element.find( ".ui-resizable-handle" ) ); 11062 this._handles.disableSelection(); 11063 11064 this._handles.on( "mouseover", function() { 11065 if ( !that.resizing ) { 11066 if ( this.className ) { 11067 axis = this.className.match( /ui-resizable-(se|sw|ne|nw|n|e|s|w)/i ); 11068 } 11069 that.axis = axis && axis[ 1 ] ? axis[ 1 ] : "se"; 11070 } 11071 } ); 11072 11073 if ( o.autoHide ) { 11074 this._handles.hide(); 11075 this._addClass( "ui-resizable-autohide" ); 11076 } 11077 }, 11078 11079 _removeHandles: function() { 11080 this._handles.remove(); 11081 }, 11082 11083 _mouseCapture: function( event ) { 11084 var i, handle, 11085 capture = false; 11086 11087 for ( i in this.handles ) { 11088 handle = $( this.handles[ i ] )[ 0 ]; 11089 if ( handle === event.target || $.contains( handle, event.target ) ) { 11090 capture = true; 11091 } 11092 } 11093 11094 return !this.options.disabled && capture; 11095 }, 11096 11097 _mouseStart: function( event ) { 11098 11099 var curleft, curtop, cursor, 11100 o = this.options, 11101 el = this.element; 11102 11103 this.resizing = true; 11104 11105 this._renderProxy(); 11106 11107 curleft = this._num( this.helper.css( "left" ) ); 11108 curtop = this._num( this.helper.css( "top" ) ); 11109 11110 if ( o.containment ) { 11111 curleft += $( o.containment ).scrollLeft() || 0; 11112 curtop += $( o.containment ).scrollTop() || 0; 11113 } 11114 11115 this.offset = this.helper.offset(); 11116 this.position = { left: curleft, top: curtop }; 11117 11118 this.size = this._helper ? { 11119 width: this.helper.width(), 11120 height: this.helper.height() 11121 } : { 11122 width: el.width(), 11123 height: el.height() 11124 }; 11125 11126 this.originalSize = this._helper ? { 11127 width: el.outerWidth(), 11128 height: el.outerHeight() 11129 } : { 11130 width: el.width(), 11131 height: el.height() 11132 }; 11133 11134 this.sizeDiff = { 11135 width: el.outerWidth() - el.width(), 11136 height: el.outerHeight() - el.height() 11137 }; 11138 11139 this.originalPosition = { left: curleft, top: curtop }; 11140 this.originalMousePosition = { left: event.pageX, top: event.pageY }; 11141 11142 this.aspectRatio = ( typeof o.aspectRatio === "number" ) ? 11143 o.aspectRatio : 11144 ( ( this.originalSize.width / this.originalSize.height ) || 1 ); 11145 11146 cursor = $( ".ui-resizable-" + this.axis ).css( "cursor" ); 11147 $( "body" ).css( "cursor", cursor === "auto" ? this.axis + "-resize" : cursor ); 11148 11149 this._addClass( "ui-resizable-resizing" ); 11150 this._propagate( "start", event ); 11151 return true; 11152 }, 11153 11154 _mouseDrag: function( event ) { 11155 11156 var data, props, 11157 smp = this.originalMousePosition, 11158 a = this.axis, 11159 dx = ( event.pageX - smp.left ) || 0, 11160 dy = ( event.pageY - smp.top ) || 0, 11161 trigger = this._change[ a ]; 11162 11163 this._updatePrevProperties(); 11164 11165 if ( !trigger ) { 11166 return false; 11167 } 11168 11169 data = trigger.apply( this, [ event, dx, dy ] ); 11170 11171 this._updateVirtualBoundaries( event.shiftKey ); 11172 if ( this._aspectRatio || event.shiftKey ) { 11173 data = this._updateRatio( data, event ); 11174 } 11175 11176 data = this._respectSize( data, event ); 11177 11178 this._updateCache( data ); 11179 11180 this._propagate( "resize", event ); 11181 11182 props = this._applyChanges(); 11183 11184 if ( !this._helper && this._proportionallyResizeElements.length ) { 11185 this._proportionallyResize(); 11186 } 11187 11188 if ( !$.isEmptyObject( props ) ) { 11189 this._updatePrevProperties(); 11190 this._trigger( "resize", event, this.ui() ); 11191 this._applyChanges(); 11192 } 11193 11194 return false; 11195 }, 11196 11197 _mouseStop: function( event ) { 11198 11199 this.resizing = false; 11200 var pr, ista, soffseth, soffsetw, s, left, top, 11201 o = this.options, that = this; 11202 11203 if ( this._helper ) { 11204 11205 pr = this._proportionallyResizeElements; 11206 ista = pr.length && ( /textarea/i ).test( pr[ 0 ].nodeName ); 11207 soffseth = ista && this._hasScroll( pr[ 0 ], "left" ) ? 0 : that.sizeDiff.height; 11208 soffsetw = ista ? 0 : that.sizeDiff.width; 11209 11210 s = { 11211 width: ( that.helper.width() - soffsetw ), 11212 height: ( that.helper.height() - soffseth ) 11213 }; 11214 left = ( parseFloat( that.element.css( "left" ) ) + 11215 ( that.position.left - that.originalPosition.left ) ) || null; 11216 top = ( parseFloat( that.element.css( "top" ) ) + 11217 ( that.position.top - that.originalPosition.top ) ) || null; 11218 11219 if ( !o.animate ) { 11220 this.element.css( $.extend( s, { top: top, left: left } ) ); 11221 } 11222 11223 that.helper.height( that.size.height ); 11224 that.helper.width( that.size.width ); 11225 11226 if ( this._helper && !o.animate ) { 11227 this._proportionallyResize(); 11228 } 11229 } 11230 11231 $( "body" ).css( "cursor", "auto" ); 11232 11233 this._removeClass( "ui-resizable-resizing" ); 11234 11235 this._propagate( "stop", event ); 11236 11237 if ( this._helper ) { 11238 this.helper.remove(); 11239 } 11240 11241 return false; 11242 11243 }, 11244 11245 _updatePrevProperties: function() { 11246 this.prevPosition = { 11247 top: this.position.top, 11248 left: this.position.left 11249 }; 11250 this.prevSize = { 11251 width: this.size.width, 11252 height: this.size.height 11253 }; 11254 }, 11255 11256 _applyChanges: function() { 11257 var props = {}; 11258 11259 if ( this.position.top !== this.prevPosition.top ) { 11260 props.top = this.position.top + "px"; 11261 } 11262 if ( this.position.left !== this.prevPosition.left ) { 11263 props.left = this.position.left + "px"; 11264 } 11265 if ( this.size.width !== this.prevSize.width ) { 11266 props.width = this.size.width + "px"; 11267 } 11268 if ( this.size.height !== this.prevSize.height ) { 11269 props.height = this.size.height + "px"; 11270 } 11271 11272 this.helper.css( props ); 11273 11274 return props; 11275 }, 11276 11277 _updateVirtualBoundaries: function( forceAspectRatio ) { 11278 var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b, 11279 o = this.options; 11280 11281 b = { 11282 minWidth: this._isNumber( o.minWidth ) ? o.minWidth : 0, 11283 maxWidth: this._isNumber( o.maxWidth ) ? o.maxWidth : Infinity, 11284 minHeight: this._isNumber( o.minHeight ) ? o.minHeight : 0, 11285 maxHeight: this._isNumber( o.maxHeight ) ? o.maxHeight : Infinity 11286 }; 11287 11288 if ( this._aspectRatio || forceAspectRatio ) { 11289 pMinWidth = b.minHeight * this.aspectRatio; 11290 pMinHeight = b.minWidth / this.aspectRatio; 11291 pMaxWidth = b.maxHeight * this.aspectRatio; 11292 pMaxHeight = b.maxWidth / this.aspectRatio; 11293 11294 if ( pMinWidth > b.minWidth ) { 11295 b.minWidth = pMinWidth; 11296 } 11297 if ( pMinHeight > b.minHeight ) { 11298 b.minHeight = pMinHeight; 11299 } 11300 if ( pMaxWidth < b.maxWidth ) { 11301 b.maxWidth = pMaxWidth; 11302 } 11303 if ( pMaxHeight < b.maxHeight ) { 11304 b.maxHeight = pMaxHeight; 11305 } 11306 } 11307 this._vBoundaries = b; 11308 }, 11309 11310 _updateCache: function( data ) { 11311 this.offset = this.helper.offset(); 11312 if ( this._isNumber( data.left ) ) { 11313 this.position.left = data.left; 11314 } 11315 if ( this._isNumber( data.top ) ) { 11316 this.position.top = data.top; 11317 } 11318 if ( this._isNumber( data.height ) ) { 11319 this.size.height = data.height; 11320 } 11321 if ( this._isNumber( data.width ) ) { 11322 this.size.width = data.width; 11323 } 11324 }, 11325 11326 _updateRatio: function( data ) { 11327 11328 var cpos = this.position, 11329 csize = this.size, 11330 a = this.axis; 11331 11332 if ( this._isNumber( data.height ) ) { 11333 data.width = ( data.height * this.aspectRatio ); 11334 } else if ( this._isNumber( data.width ) ) { 11335 data.height = ( data.width / this.aspectRatio ); 11336 } 11337 11338 if ( a === "sw" ) { 11339 data.left = cpos.left + ( csize.width - data.width ); 11340 data.top = null; 11341 } 11342 if ( a === "nw" ) { 11343 data.top = cpos.top + ( csize.height - data.height ); 11344 data.left = cpos.left + ( csize.width - data.width ); 11345 } 11346 11347 return data; 11348 }, 11349 11350 _respectSize: function( data ) { 11351 11352 var o = this._vBoundaries, 11353 a = this.axis, 11354 ismaxw = this._isNumber( data.width ) && o.maxWidth && ( o.maxWidth < data.width ), 11355 ismaxh = this._isNumber( data.height ) && o.maxHeight && ( o.maxHeight < data.height ), 11356 isminw = this._isNumber( data.width ) && o.minWidth && ( o.minWidth > data.width ), 11357 isminh = this._isNumber( data.height ) && o.minHeight && ( o.minHeight > data.height ), 11358 dw = this.originalPosition.left + this.originalSize.width, 11359 dh = this.originalPosition.top + this.originalSize.height, 11360 cw = /sw|nw|w/.test( a ), ch = /nw|ne|n/.test( a ); 11361 if ( isminw ) { 11362 data.width = o.minWidth; 11363 } 11364 if ( isminh ) { 11365 data.height = o.minHeight; 11366 } 11367 if ( ismaxw ) { 11368 data.width = o.maxWidth; 11369 } 11370 if ( ismaxh ) { 11371 data.height = o.maxHeight; 11372 } 11373 11374 if ( isminw && cw ) { 11375 data.left = dw - o.minWidth; 11376 } 11377 if ( ismaxw && cw ) { 11378 data.left = dw - o.maxWidth; 11379 } 11380 if ( isminh && ch ) { 11381 data.top = dh - o.minHeight; 11382 } 11383 if ( ismaxh && ch ) { 11384 data.top = dh - o.maxHeight; 11385 } 11386 11387 // Fixing jump error on top/left - bug #2330 11388 if ( !data.width && !data.height && !data.left && data.top ) { 11389 data.top = null; 11390 } else if ( !data.width && !data.height && !data.top && data.left ) { 11391 data.left = null; 11392 } 11393 11394 return data; 11395 }, 11396 11397 _getPaddingPlusBorderDimensions: function( element ) { 11398 var i = 0, 11399 widths = [], 11400 borders = [ 11401 element.css( "borderTopWidth" ), 11402 element.css( "borderRightWidth" ), 11403 element.css( "borderBottomWidth" ), 11404 element.css( "borderLeftWidth" ) 11405 ], 11406 paddings = [ 11407 element.css( "paddingTop" ), 11408 element.css( "paddingRight" ), 11409 element.css( "paddingBottom" ), 11410 element.css( "paddingLeft" ) 11411 ]; 11412 11413 for ( ; i < 4; i++ ) { 11414 widths[ i ] = ( parseFloat( borders[ i ] ) || 0 ); 11415 widths[ i ] += ( parseFloat( paddings[ i ] ) || 0 ); 11416 } 11417 11418 return { 11419 height: widths[ 0 ] + widths[ 2 ], 11420 width: widths[ 1 ] + widths[ 3 ] 11421 }; 11422 }, 11423 11424 _proportionallyResize: function() { 11425 11426 if ( !this._proportionallyResizeElements.length ) { 11427 return; 11428 } 11429 11430 var prel, 11431 i = 0, 11432 element = this.helper || this.element; 11433 11434 for ( ; i < this._proportionallyResizeElements.length; i++ ) { 11435 11436 prel = this._proportionallyResizeElements[ i ]; 11437 11438 // TODO: Seems like a bug to cache this.outerDimensions 11439 // considering that we are in a loop. 11440 if ( !this.outerDimensions ) { 11441 this.outerDimensions = this._getPaddingPlusBorderDimensions( prel ); 11442 } 11443 11444 prel.css( { 11445 height: ( element.height() - this.outerDimensions.height ) || 0, 11446 width: ( element.width() - this.outerDimensions.width ) || 0 11447 } ); 11448 11449 } 11450 11451 }, 11452 11453 _renderProxy: function() { 11454 11455 var el = this.element, o = this.options; 11456 this.elementOffset = el.offset(); 11457 11458 if ( this._helper ) { 11459 11460 this.helper = this.helper || $( "<div style='overflow:hidden;'></div>" ); 11461 11462 this._addClass( this.helper, this._helper ); 11463 this.helper.css( { 11464 width: this.element.outerWidth(), 11465 height: this.element.outerHeight(), 11466 position: "absolute", 11467 left: this.elementOffset.left + "px", 11468 top: this.elementOffset.top + "px", 11469 zIndex: ++o.zIndex //TODO: Don't modify option 11470 } ); 11471 11472 this.helper 11473 .appendTo( "body" ) 11474 .disableSelection(); 11475 11476 } else { 11477 this.helper = this.element; 11478 } 11479 11480 }, 11481 11482 _change: { 11483 e: function( event, dx ) { 11484 return { width: this.originalSize.width + dx }; 11485 }, 11486 w: function( event, dx ) { 11487 var cs = this.originalSize, sp = this.originalPosition; 11488 return { left: sp.left + dx, width: cs.width - dx }; 11489 }, 11490 n: function( event, dx, dy ) { 11491 var cs = this.originalSize, sp = this.originalPosition; 11492 return { top: sp.top + dy, height: cs.height - dy }; 11493 }, 11494 s: function( event, dx, dy ) { 11495 return { height: this.originalSize.height + dy }; 11496 }, 11497 se: function( event, dx, dy ) { 11498 return $.extend( this._change.s.apply( this, arguments ), 11499 this._change.e.apply( this, [ event, dx, dy ] ) ); 11500 }, 11501 sw: function( event, dx, dy ) { 11502 return $.extend( this._change.s.apply( this, arguments ), 11503 this._change.w.apply( this, [ event, dx, dy ] ) ); 11504 }, 11505 ne: function( event, dx, dy ) { 11506 return $.extend( this._change.n.apply( this, arguments ), 11507 this._change.e.apply( this, [ event, dx, dy ] ) ); 11508 }, 11509 nw: function( event, dx, dy ) { 11510 return $.extend( this._change.n.apply( this, arguments ), 11511 this._change.w.apply( this, [ event, dx, dy ] ) ); 11512 } 11513 }, 11514 11515 _propagate: function( n, event ) { 11516 $.ui.plugin.call( this, n, [ event, this.ui() ] ); 11517 ( n !== "resize" && this._trigger( n, event, this.ui() ) ); 11518 }, 11519 11520 plugins: {}, 11521 11522 ui: function() { 11523 return { 11524 originalElement: this.originalElement, 11525 element: this.element, 11526 helper: this.helper, 11527 position: this.position, 11528 size: this.size, 11529 originalSize: this.originalSize, 11530 originalPosition: this.originalPosition 11531 }; 11532 } 11533 11534} ); 11535 11536/* 11537 * Resizable Extensions 11538 */ 11539 11540$.ui.plugin.add( "resizable", "animate", { 11541 11542 stop: function( event ) { 11543 var that = $( this ).resizable( "instance" ), 11544 o = that.options, 11545 pr = that._proportionallyResizeElements, 11546 ista = pr.length && ( /textarea/i ).test( pr[ 0 ].nodeName ), 11547 soffseth = ista && that._hasScroll( pr[ 0 ], "left" ) ? 0 : that.sizeDiff.height, 11548 soffsetw = ista ? 0 : that.sizeDiff.width, 11549 style = { 11550 width: ( that.size.width - soffsetw ), 11551 height: ( that.size.height - soffseth ) 11552 }, 11553 left = ( parseFloat( that.element.css( "left" ) ) + 11554 ( that.position.left - that.originalPosition.left ) ) || null, 11555 top = ( parseFloat( that.element.css( "top" ) ) + 11556 ( that.position.top - that.originalPosition.top ) ) || null; 11557 11558 that.element.animate( 11559 $.extend( style, top && left ? { top: top, left: left } : {} ), { 11560 duration: o.animateDuration, 11561 easing: o.animateEasing, 11562 step: function() { 11563 11564 var data = { 11565 width: parseFloat( that.element.css( "width" ) ), 11566 height: parseFloat( that.element.css( "height" ) ), 11567 top: parseFloat( that.element.css( "top" ) ), 11568 left: parseFloat( that.element.css( "left" ) ) 11569 }; 11570 11571 if ( pr && pr.length ) { 11572 $( pr[ 0 ] ).css( { width: data.width, height: data.height } ); 11573 } 11574 11575 // Propagating resize, and updating values for each animation step 11576 that._updateCache( data ); 11577 that._propagate( "resize", event ); 11578 11579 } 11580 } 11581 ); 11582 } 11583 11584} ); 11585 11586$.ui.plugin.add( "resizable", "containment", { 11587 11588 start: function() { 11589 var element, p, co, ch, cw, width, height, 11590 that = $( this ).resizable( "instance" ), 11591 o = that.options, 11592 el = that.element, 11593 oc = o.containment, 11594 ce = ( oc instanceof $ ) ? 11595 oc.get( 0 ) : 11596 ( /parent/.test( oc ) ) ? el.parent().get( 0 ) : oc; 11597 11598 if ( !ce ) { 11599 return; 11600 } 11601 11602 that.containerElement = $( ce ); 11603 11604 if ( /document/.test( oc ) || oc === document ) { 11605 that.containerOffset = { 11606 left: 0, 11607 top: 0 11608 }; 11609 that.containerPosition = { 11610 left: 0, 11611 top: 0 11612 }; 11613 11614 that.parentData = { 11615 element: $( document ), 11616 left: 0, 11617 top: 0, 11618 width: $( document ).width(), 11619 height: $( document ).height() || document.body.parentNode.scrollHeight 11620 }; 11621 } else { 11622 element = $( ce ); 11623 p = []; 11624 $( [ "Top", "Right", "Left", "Bottom" ] ).each( function( i, name ) { 11625 p[ i ] = that._num( element.css( "padding" + name ) ); 11626 } ); 11627 11628 that.containerOffset = element.offset(); 11629 that.containerPosition = element.position(); 11630 that.containerSize = { 11631 height: ( element.innerHeight() - p[ 3 ] ), 11632 width: ( element.innerWidth() - p[ 1 ] ) 11633 }; 11634 11635 co = that.containerOffset; 11636 ch = that.containerSize.height; 11637 cw = that.containerSize.width; 11638 width = ( that._hasScroll ( ce, "left" ) ? ce.scrollWidth : cw ); 11639 height = ( that._hasScroll ( ce ) ? ce.scrollHeight : ch ) ; 11640 11641 that.parentData = { 11642 element: ce, 11643 left: co.left, 11644 top: co.top, 11645 width: width, 11646 height: height 11647 }; 11648 } 11649 }, 11650 11651 resize: function( event ) { 11652 var woset, hoset, isParent, isOffsetRelative, 11653 that = $( this ).resizable( "instance" ), 11654 o = that.options, 11655 co = that.containerOffset, 11656 cp = that.position, 11657 pRatio = that._aspectRatio || event.shiftKey, 11658 cop = { 11659 top: 0, 11660 left: 0 11661 }, 11662 ce = that.containerElement, 11663 continueResize = true; 11664 11665 if ( ce[ 0 ] !== document && ( /static/ ).test( ce.css( "position" ) ) ) { 11666 cop = co; 11667 } 11668 11669 if ( cp.left < ( that._helper ? co.left : 0 ) ) { 11670 that.size.width = that.size.width + 11671 ( that._helper ? 11672 ( that.position.left - co.left ) : 11673 ( that.position.left - cop.left ) ); 11674 11675 if ( pRatio ) { 11676 that.size.height = that.size.width / that.aspectRatio; 11677 continueResize = false; 11678 } 11679 that.position.left = o.helper ? co.left : 0; 11680 } 11681 11682 if ( cp.top < ( that._helper ? co.top : 0 ) ) { 11683 that.size.height = that.size.height + 11684 ( that._helper ? 11685 ( that.position.top - co.top ) : 11686 that.position.top ); 11687 11688 if ( pRatio ) { 11689 that.size.width = that.size.height * that.aspectRatio; 11690 continueResize = false; 11691 } 11692 that.position.top = that._helper ? co.top : 0; 11693 } 11694 11695 isParent = that.containerElement.get( 0 ) === that.element.parent().get( 0 ); 11696 isOffsetRelative = /relative|absolute/.test( that.containerElement.css( "position" ) ); 11697 11698 if ( isParent && isOffsetRelative ) { 11699 that.offset.left = that.parentData.left + that.position.left; 11700 that.offset.top = that.parentData.top + that.position.top; 11701 } else { 11702 that.offset.left = that.element.offset().left; 11703 that.offset.top = that.element.offset().top; 11704 } 11705 11706 woset = Math.abs( that.sizeDiff.width + 11707 ( that._helper ? 11708 that.offset.left - cop.left : 11709 ( that.offset.left - co.left ) ) ); 11710 11711 hoset = Math.abs( that.sizeDiff.height + 11712 ( that._helper ? 11713 that.offset.top - cop.top : 11714 ( that.offset.top - co.top ) ) ); 11715 11716 if ( woset + that.size.width >= that.parentData.width ) { 11717 that.size.width = that.parentData.width - woset; 11718 if ( pRatio ) { 11719 that.size.height = that.size.width / that.aspectRatio; 11720 continueResize = false; 11721 } 11722 } 11723 11724 if ( hoset + that.size.height >= that.parentData.height ) { 11725 that.size.height = that.parentData.height - hoset; 11726 if ( pRatio ) { 11727 that.size.width = that.size.height * that.aspectRatio; 11728 continueResize = false; 11729 } 11730 } 11731 11732 if ( !continueResize ) { 11733 that.position.left = that.prevPosition.left; 11734 that.position.top = that.prevPosition.top; 11735 that.size.width = that.prevSize.width; 11736 that.size.height = that.prevSize.height; 11737 } 11738 }, 11739 11740 stop: function() { 11741 var that = $( this ).resizable( "instance" ), 11742 o = that.options, 11743 co = that.containerOffset, 11744 cop = that.containerPosition, 11745 ce = that.containerElement, 11746 helper = $( that.helper ), 11747 ho = helper.offset(), 11748 w = helper.outerWidth() - that.sizeDiff.width, 11749 h = helper.outerHeight() - that.sizeDiff.height; 11750 11751 if ( that._helper && !o.animate && ( /relative/ ).test( ce.css( "position" ) ) ) { 11752 $( this ).css( { 11753 left: ho.left - cop.left - co.left, 11754 width: w, 11755 height: h 11756 } ); 11757 } 11758 11759 if ( that._helper && !o.animate && ( /static/ ).test( ce.css( "position" ) ) ) { 11760 $( this ).css( { 11761 left: ho.left - cop.left - co.left, 11762 width: w, 11763 height: h 11764 } ); 11765 } 11766 } 11767} ); 11768 11769$.ui.plugin.add( "resizable", "alsoResize", { 11770 11771 start: function() { 11772 var that = $( this ).resizable( "instance" ), 11773 o = that.options; 11774 11775 $( o.alsoResize ).each( function() { 11776 var el = $( this ); 11777 el.data( "ui-resizable-alsoresize", { 11778 width: parseFloat( el.width() ), height: parseFloat( el.height() ), 11779 left: parseFloat( el.css( "left" ) ), top: parseFloat( el.css( "top" ) ) 11780 } ); 11781 } ); 11782 }, 11783 11784 resize: function( event, ui ) { 11785 var that = $( this ).resizable( "instance" ), 11786 o = that.options, 11787 os = that.originalSize, 11788 op = that.originalPosition, 11789 delta = { 11790 height: ( that.size.height - os.height ) || 0, 11791 width: ( that.size.width - os.width ) || 0, 11792 top: ( that.position.top - op.top ) || 0, 11793 left: ( that.position.left - op.left ) || 0 11794 }; 11795 11796 $( o.alsoResize ).each( function() { 11797 var el = $( this ), start = $( this ).data( "ui-resizable-alsoresize" ), style = {}, 11798 css = el.parents( ui.originalElement[ 0 ] ).length ? 11799 [ "width", "height" ] : 11800 [ "width", "height", "top", "left" ]; 11801 11802 $.each( css, function( i, prop ) { 11803 var sum = ( start[ prop ] || 0 ) + ( delta[ prop ] || 0 ); 11804 if ( sum && sum >= 0 ) { 11805 style[ prop ] = sum || null; 11806 } 11807 } ); 11808 11809 el.css( style ); 11810 } ); 11811 }, 11812 11813 stop: function() { 11814 $( this ).removeData( "ui-resizable-alsoresize" ); 11815 } 11816} ); 11817 11818$.ui.plugin.add( "resizable", "ghost", { 11819 11820 start: function() { 11821 11822 var that = $( this ).resizable( "instance" ), cs = that.size; 11823 11824 that.ghost = that.originalElement.clone(); 11825 that.ghost.css( { 11826 opacity: 0.25, 11827 display: "block", 11828 position: "relative", 11829 height: cs.height, 11830 width: cs.width, 11831 margin: 0, 11832 left: 0, 11833 top: 0 11834 } ); 11835 11836 that._addClass( that.ghost, "ui-resizable-ghost" ); 11837 11838 // DEPRECATED 11839 // TODO: remove after 1.12 11840 if ( $.uiBackCompat !== false && typeof that.options.ghost === "string" ) { 11841 11842 // Ghost option 11843 that.ghost.addClass( this.options.ghost ); 11844 } 11845 11846 that.ghost.appendTo( that.helper ); 11847 11848 }, 11849 11850 resize: function() { 11851 var that = $( this ).resizable( "instance" ); 11852 if ( that.ghost ) { 11853 that.ghost.css( { 11854 position: "relative", 11855 height: that.size.height, 11856 width: that.size.width 11857 } ); 11858 } 11859 }, 11860 11861 stop: function() { 11862 var that = $( this ).resizable( "instance" ); 11863 if ( that.ghost && that.helper ) { 11864 that.helper.get( 0 ).removeChild( that.ghost.get( 0 ) ); 11865 } 11866 } 11867 11868} ); 11869 11870$.ui.plugin.add( "resizable", "grid", { 11871 11872 resize: function() { 11873 var outerDimensions, 11874 that = $( this ).resizable( "instance" ), 11875 o = that.options, 11876 cs = that.size, 11877 os = that.originalSize, 11878 op = that.originalPosition, 11879 a = that.axis, 11880 grid = typeof o.grid === "number" ? [ o.grid, o.grid ] : o.grid, 11881 gridX = ( grid[ 0 ] || 1 ), 11882 gridY = ( grid[ 1 ] || 1 ), 11883 ox = Math.round( ( cs.width - os.width ) / gridX ) * gridX, 11884 oy = Math.round( ( cs.height - os.height ) / gridY ) * gridY, 11885 newWidth = os.width + ox, 11886 newHeight = os.height + oy, 11887 isMaxWidth = o.maxWidth && ( o.maxWidth < newWidth ), 11888 isMaxHeight = o.maxHeight && ( o.maxHeight < newHeight ), 11889 isMinWidth = o.minWidth && ( o.minWidth > newWidth ), 11890 isMinHeight = o.minHeight && ( o.minHeight > newHeight ); 11891 11892 o.grid = grid; 11893 11894 if ( isMinWidth ) { 11895 newWidth += gridX; 11896 } 11897 if ( isMinHeight ) { 11898 newHeight += gridY; 11899 } 11900 if ( isMaxWidth ) { 11901 newWidth -= gridX; 11902 } 11903 if ( isMaxHeight ) { 11904 newHeight -= gridY; 11905 } 11906 11907 if ( /^(se|s|e)$/.test( a ) ) { 11908 that.size.width = newWidth; 11909 that.size.height = newHeight; 11910 } else if ( /^(ne)$/.test( a ) ) { 11911 that.size.width = newWidth; 11912 that.size.height = newHeight; 11913 that.position.top = op.top - oy; 11914 } else if ( /^(sw)$/.test( a ) ) { 11915 that.size.width = newWidth; 11916 that.size.height = newHeight; 11917 that.position.left = op.left - ox; 11918 } else { 11919 if ( newHeight - gridY <= 0 || newWidth - gridX <= 0 ) { 11920 outerDimensions = that._getPaddingPlusBorderDimensions( this ); 11921 } 11922 11923 if ( newHeight - gridY > 0 ) { 11924 that.size.height = newHeight; 11925 that.position.top = op.top - oy; 11926 } else { 11927 newHeight = gridY - outerDimensions.height; 11928 that.size.height = newHeight; 11929 that.position.top = op.top + os.height - newHeight; 11930 } 11931 if ( newWidth - gridX > 0 ) { 11932 that.size.width = newWidth; 11933 that.position.left = op.left - ox; 11934 } else { 11935 newWidth = gridX - outerDimensions.width; 11936 that.size.width = newWidth; 11937 that.position.left = op.left + os.width - newWidth; 11938 } 11939 } 11940 } 11941 11942} ); 11943 11944var widgetsResizable = $.ui.resizable; 11945 11946 11947/*! 11948 * jQuery UI Dialog 1.12.1 11949 * http://jqueryui.com 11950 * 11951 * Copyright jQuery Foundation and other contributors 11952 * Released under the MIT license. 11953 * http://jquery.org/license 11954 */ 11955 11956//>>label: Dialog 11957//>>group: Widgets 11958//>>description: Displays customizable dialog windows. 11959//>>docs: http://api.jqueryui.com/dialog/ 11960//>>demos: http://jqueryui.com/dialog/ 11961//>>css.structure: ../../themes/base/core.css 11962//>>css.structure: ../../themes/base/dialog.css 11963//>>css.theme: ../../themes/base/theme.css 11964 11965 11966 11967$.widget( "ui.dialog", { 11968 version: "1.12.1", 11969 options: { 11970 appendTo: "body", 11971 autoOpen: true, 11972 buttons: [], 11973 classes: { 11974 "ui-dialog": "ui-corner-all", 11975 "ui-dialog-titlebar": "ui-corner-all" 11976 }, 11977 closeOnEscape: true, 11978 closeText: "Close", 11979 draggable: true, 11980 hide: null, 11981 height: "auto", 11982 maxHeight: null, 11983 maxWidth: null, 11984 minHeight: 150, 11985 minWidth: 150, 11986 modal: false, 11987 position: { 11988 my: "center", 11989 at: "center", 11990 of: window, 11991 collision: "fit", 11992 11993 // Ensure the titlebar is always visible 11994 using: function( pos ) { 11995 var topOffset = $( this ).css( pos ).offset().top; 11996 if ( topOffset < 0 ) { 11997 $( this ).css( "top", pos.top - topOffset ); 11998 } 11999 } 12000 }, 12001 resizable: true, 12002 show: null, 12003 title: null, 12004 width: 300, 12005 12006 // Callbacks 12007 beforeClose: null, 12008 close: null, 12009 drag: null, 12010 dragStart: null, 12011 dragStop: null, 12012 focus: null, 12013 open: null, 12014 resize: null, 12015 resizeStart: null, 12016 resizeStop: null 12017 }, 12018 12019 sizeRelatedOptions: { 12020 buttons: true, 12021 height: true, 12022 maxHeight: true, 12023 maxWidth: true, 12024 minHeight: true, 12025 minWidth: true, 12026 width: true 12027 }, 12028 12029 resizableRelatedOptions: { 12030 maxHeight: true, 12031 maxWidth: true, 12032 minHeight: true, 12033 minWidth: true 12034 }, 12035 12036 _create: function() { 12037 this.originalCss = { 12038 display: this.element[ 0 ].style.display, 12039 width: this.element[ 0 ].style.width, 12040 minHeight: this.element[ 0 ].style.minHeight, 12041 maxHeight: this.element[ 0 ].style.maxHeight, 12042 height: this.element[ 0 ].style.height 12043 }; 12044 this.originalPosition = { 12045 parent: this.element.parent(), 12046 index: this.element.parent().children().index( this.element ) 12047 }; 12048 this.originalTitle = this.element.attr( "title" ); 12049 if ( this.options.title == null && this.originalTitle != null ) { 12050 this.options.title = this.originalTitle; 12051 } 12052 12053 // Dialogs can't be disabled 12054 if ( this.options.disabled ) { 12055 this.options.disabled = false; 12056 } 12057 12058 this._createWrapper(); 12059 12060 this.element 12061 .show() 12062 .removeAttr( "title" ) 12063 .appendTo( this.uiDialog ); 12064 12065 this._addClass( "ui-dialog-content", "ui-widget-content" ); 12066 12067 this._createTitlebar(); 12068 this._createButtonPane(); 12069 12070 if ( this.options.draggable && $.fn.draggable ) { 12071 this._makeDraggable(); 12072 } 12073 if ( this.options.resizable && $.fn.resizable ) { 12074 this._makeResizable(); 12075 } 12076 12077 this._isOpen = false; 12078 12079 this._trackFocus(); 12080 }, 12081 12082 _init: function() { 12083 if ( this.options.autoOpen ) { 12084 this.open(); 12085 } 12086 }, 12087 12088 _appendTo: function() { 12089 var element = this.options.appendTo; 12090 if ( element && ( element.jquery || element.nodeType ) ) { 12091 return $( element ); 12092 } 12093 return this.document.find( element || "body" ).eq( 0 ); 12094 }, 12095 12096 _destroy: function() { 12097 var next, 12098 originalPosition = this.originalPosition; 12099 12100 this._untrackInstance(); 12101 this._destroyOverlay(); 12102 12103 this.element 12104 .removeUniqueId() 12105 .css( this.originalCss ) 12106 12107 // Without detaching first, the following becomes really slow 12108 .detach(); 12109 12110 this.uiDialog.remove(); 12111 12112 if ( this.originalTitle ) { 12113 this.element.attr( "title", this.originalTitle ); 12114 } 12115 12116 next = originalPosition.parent.children().eq( originalPosition.index ); 12117 12118 // Don't try to place the dialog next to itself (#8613) 12119 if ( next.length && next[ 0 ] !== this.element[ 0 ] ) { 12120 next.before( this.element ); 12121 } else { 12122 originalPosition.parent.append( this.element ); 12123 } 12124 }, 12125 12126 widget: function() { 12127 return this.uiDialog; 12128 }, 12129 12130 disable: $.noop, 12131 enable: $.noop, 12132 12133 close: function( event ) { 12134 var that = this; 12135 12136 if ( !this._isOpen || this._trigger( "beforeClose", event ) === false ) { 12137 return; 12138 } 12139 12140 this._isOpen = false; 12141 this._focusedElement = null; 12142 this._destroyOverlay(); 12143 this._untrackInstance(); 12144 12145 if ( !this.opener.filter( ":focusable" ).trigger( "focus" ).length ) { 12146 12147 // Hiding a focused element doesn't trigger blur in WebKit 12148 // so in case we have nothing to focus on, explicitly blur the active element 12149 // https://bugs.webkit.org/show_bug.cgi?id=47182 12150 $.ui.safeBlur( $.ui.safeActiveElement( this.document[ 0 ] ) ); 12151 } 12152 12153 this._hide( this.uiDialog, this.options.hide, function() { 12154 that._trigger( "close", event ); 12155 } ); 12156 }, 12157 12158 isOpen: function() { 12159 return this._isOpen; 12160 }, 12161 12162 moveToTop: function() { 12163 this._moveToTop(); 12164 }, 12165 12166 _moveToTop: function( event, silent ) { 12167 var moved = false, 12168 zIndices = this.uiDialog.siblings( ".ui-front:visible" ).map( function() { 12169 return +$( this ).css( "z-index" ); 12170 } ).get(), 12171 zIndexMax = Math.max.apply( null, zIndices ); 12172 12173 if ( zIndexMax >= +this.uiDialog.css( "z-index" ) ) { 12174 this.uiDialog.css( "z-index", zIndexMax + 1 ); 12175 moved = true; 12176 } 12177 12178 if ( moved && !silent ) { 12179 this._trigger( "focus", event ); 12180 } 12181 return moved; 12182 }, 12183 12184 open: function() { 12185 var that = this; 12186 if ( this._isOpen ) { 12187 if ( this._moveToTop() ) { 12188 this._focusTabbable(); 12189 } 12190 return; 12191 } 12192 12193 this._isOpen = true; 12194 this.opener = $( $.ui.safeActiveElement( this.document[ 0 ] ) ); 12195 12196 this._size(); 12197 this._position(); 12198 this._createOverlay(); 12199 this._moveToTop( null, true ); 12200 12201 // Ensure the overlay is moved to the top with the dialog, but only when 12202 // opening. The overlay shouldn't move after the dialog is open so that 12203 // modeless dialogs opened after the modal dialog stack properly. 12204 if ( this.overlay ) { 12205 this.overlay.css( "z-index", this.uiDialog.css( "z-index" ) - 1 ); 12206 } 12207 12208 this._show( this.uiDialog, this.options.show, function() { 12209 that._focusTabbable(); 12210 that._trigger( "focus" ); 12211 } ); 12212 12213 // Track the dialog immediately upon openening in case a focus event 12214 // somehow occurs outside of the dialog before an element inside the 12215 // dialog is focused (#10152) 12216 this._makeFocusTarget(); 12217 12218 this._trigger( "open" ); 12219 }, 12220 12221 _focusTabbable: function() { 12222 12223 // Set focus to the first match: 12224 // 1. An element that was focused previously 12225 // 2. First element inside the dialog matching [autofocus] 12226 // 3. Tabbable element inside the content element 12227 // 4. Tabbable element inside the buttonpane 12228 // 5. The close button 12229 // 6. The dialog itself 12230 var hasFocus = this._focusedElement; 12231 if ( !hasFocus ) { 12232 hasFocus = this.element.find( "[autofocus]" ); 12233 } 12234 if ( !hasFocus.length ) { 12235 hasFocus = this.element.find( ":tabbable" ); 12236 } 12237 if ( !hasFocus.length ) { 12238 hasFocus = this.uiDialogButtonPane.find( ":tabbable" ); 12239 } 12240 if ( !hasFocus.length ) { 12241 hasFocus = this.uiDialogTitlebarClose.filter( ":tabbable" ); 12242 } 12243 if ( !hasFocus.length ) { 12244 hasFocus = this.uiDialog; 12245 } 12246 hasFocus.eq( 0 ).trigger( "focus" ); 12247 }, 12248 12249 _keepFocus: function( event ) { 12250 function checkFocus() { 12251 var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ), 12252 isActive = this.uiDialog[ 0 ] === activeElement || 12253 $.contains( this.uiDialog[ 0 ], activeElement ); 12254 if ( !isActive ) { 12255 this._focusTabbable(); 12256 } 12257 } 12258 event.preventDefault(); 12259 checkFocus.call( this ); 12260 12261 // support: IE 12262 // IE <= 8 doesn't prevent moving focus even with event.preventDefault() 12263 // so we check again later 12264 this._delay( checkFocus ); 12265 }, 12266 12267 _createWrapper: function() { 12268 this.uiDialog = $( "<div>" ) 12269 .hide() 12270 .attr( { 12271 12272 // Setting tabIndex makes the div focusable 12273 tabIndex: -1, 12274 role: "dialog" 12275 } ) 12276 .appendTo( this._appendTo() ); 12277 12278 this._addClass( this.uiDialog, "ui-dialog", "ui-widget ui-widget-content ui-front" ); 12279 this._on( this.uiDialog, { 12280 keydown: function( event ) { 12281 if ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode && 12282 event.keyCode === $.ui.keyCode.ESCAPE ) { 12283 event.preventDefault(); 12284 this.close( event ); 12285 return; 12286 } 12287 12288 // Prevent tabbing out of dialogs 12289 if ( event.keyCode !== $.ui.keyCode.TAB || event.isDefaultPrevented() ) { 12290 return; 12291 } 12292 var tabbables = this.uiDialog.find( ":tabbable" ), 12293 first = tabbables.filter( ":first" ), 12294 last = tabbables.filter( ":last" ); 12295 12296 if ( ( event.target === last[ 0 ] || event.target === this.uiDialog[ 0 ] ) && 12297 !event.shiftKey ) { 12298 this._delay( function() { 12299 first.trigger( "focus" ); 12300 } ); 12301 event.preventDefault(); 12302 } else if ( ( event.target === first[ 0 ] || 12303 event.target === this.uiDialog[ 0 ] ) && event.shiftKey ) { 12304 this._delay( function() { 12305 last.trigger( "focus" ); 12306 } ); 12307 event.preventDefault(); 12308 } 12309 }, 12310 mousedown: function( event ) { 12311 if ( this._moveToTop( event ) ) { 12312 this._focusTabbable(); 12313 } 12314 } 12315 } ); 12316 12317 // We assume that any existing aria-describedby attribute means 12318 // that the dialog content is marked up properly 12319 // otherwise we brute force the content as the description 12320 if ( !this.element.find( "[aria-describedby]" ).length ) { 12321 this.uiDialog.attr( { 12322 "aria-describedby": this.element.uniqueId().attr( "id" ) 12323 } ); 12324 } 12325 }, 12326 12327 _createTitlebar: function() { 12328 var uiDialogTitle; 12329 12330 this.uiDialogTitlebar = $( "<div>" ); 12331 this._addClass( this.uiDialogTitlebar, 12332 "ui-dialog-titlebar", "ui-widget-header ui-helper-clearfix" ); 12333 this._on( this.uiDialogTitlebar, { 12334 mousedown: function( event ) { 12335 12336 // Don't prevent click on close button (#8838) 12337 // Focusing a dialog that is partially scrolled out of view 12338 // causes the browser to scroll it into view, preventing the click event 12339 if ( !$( event.target ).closest( ".ui-dialog-titlebar-close" ) ) { 12340 12341 // Dialog isn't getting focus when dragging (#8063) 12342 this.uiDialog.trigger( "focus" ); 12343 } 12344 } 12345 } ); 12346 12347 // Support: IE 12348 // Use type="button" to prevent enter keypresses in textboxes from closing the 12349 // dialog in IE (#9312) 12350 this.uiDialogTitlebarClose = $( "<button type='button'></button>" ) 12351 .button( { 12352 label: $( "<a>" ).text( this.options.closeText ).html(), 12353 icon: "ui-icon-closethick", 12354 showLabel: false 12355 } ) 12356 .appendTo( this.uiDialogTitlebar ); 12357 12358 this._addClass( this.uiDialogTitlebarClose, "ui-dialog-titlebar-close" ); 12359 this._on( this.uiDialogTitlebarClose, { 12360 click: function( event ) { 12361 event.preventDefault(); 12362 this.close( event ); 12363 } 12364 } ); 12365 12366 uiDialogTitle = $( "<span>" ).uniqueId().prependTo( this.uiDialogTitlebar ); 12367 this._addClass( uiDialogTitle, "ui-dialog-title" ); 12368 this._title( uiDialogTitle ); 12369 12370 this.uiDialogTitlebar.prependTo( this.uiDialog ); 12371 12372 this.uiDialog.attr( { 12373 "aria-labelledby": uiDialogTitle.attr( "id" ) 12374 } ); 12375 }, 12376 12377 _title: function( title ) { 12378 if ( this.options.title ) { 12379 title.text( this.options.title ); 12380 } else { 12381 title.html( " " ); 12382 } 12383 }, 12384 12385 _createButtonPane: function() { 12386 this.uiDialogButtonPane = $( "<div>" ); 12387 this._addClass( this.uiDialogButtonPane, "ui-dialog-buttonpane", 12388 "ui-widget-content ui-helper-clearfix" ); 12389 12390 this.uiButtonSet = $( "<div>" ) 12391 .appendTo( this.uiDialogButtonPane ); 12392 this._addClass( this.uiButtonSet, "ui-dialog-buttonset" ); 12393 12394 this._createButtons(); 12395 }, 12396 12397 _createButtons: function() { 12398 var that = this, 12399 buttons = this.options.buttons; 12400 12401 // If we already have a button pane, remove it 12402 this.uiDialogButtonPane.remove(); 12403 this.uiButtonSet.empty(); 12404 12405 if ( $.isEmptyObject( buttons ) || ( $.isArray( buttons ) && !buttons.length ) ) { 12406 this._removeClass( this.uiDialog, "ui-dialog-buttons" ); 12407 return; 12408 } 12409 12410 $.each( buttons, function( name, props ) { 12411 var click, buttonOptions; 12412 props = $.isFunction( props ) ? 12413 { click: props, text: name } : 12414 props; 12415 12416 // Default to a non-submitting button 12417 props = $.extend( { type: "button" }, props ); 12418 12419 // Change the context for the click callback to be the main element 12420 click = props.click; 12421 buttonOptions = { 12422 icon: props.icon, 12423 iconPosition: props.iconPosition, 12424 showLabel: props.showLabel, 12425 12426 // Deprecated options 12427 icons: props.icons, 12428 text: props.text 12429 }; 12430 12431 delete props.click; 12432 delete props.icon; 12433 delete props.iconPosition; 12434 delete props.showLabel; 12435 12436 // Deprecated options 12437 delete props.icons; 12438 if ( typeof props.text === "boolean" ) { 12439 delete props.text; 12440 } 12441 12442 $( "<button></button>", props ) 12443 .button( buttonOptions ) 12444 .appendTo( that.uiButtonSet ) 12445 .on( "click", function() { 12446 click.apply( that.element[ 0 ], arguments ); 12447 } ); 12448 } ); 12449 this._addClass( this.uiDialog, "ui-dialog-buttons" ); 12450 this.uiDialogButtonPane.appendTo( this.uiDialog ); 12451 }, 12452 12453 _makeDraggable: function() { 12454 var that = this, 12455 options = this.options; 12456 12457 function filteredUi( ui ) { 12458 return { 12459 position: ui.position, 12460 offset: ui.offset 12461 }; 12462 } 12463 12464 this.uiDialog.draggable( { 12465 cancel: ".ui-dialog-content, .ui-dialog-titlebar-close", 12466 handle: ".ui-dialog-titlebar", 12467 containment: "document", 12468 start: function( event, ui ) { 12469 that._addClass( $( this ), "ui-dialog-dragging" ); 12470 that._blockFrames(); 12471 that._trigger( "dragStart", event, filteredUi( ui ) ); 12472 }, 12473 drag: function( event, ui ) { 12474 that._trigger( "drag", event, filteredUi( ui ) ); 12475 }, 12476 stop: function( event, ui ) { 12477 var left = ui.offset.left - that.document.scrollLeft(), 12478 top = ui.offset.top - that.document.scrollTop(); 12479 12480 options.position = { 12481 my: "left top", 12482 at: "left" + ( left >= 0 ? "+" : "" ) + left + " " + 12483 "top" + ( top >= 0 ? "+" : "" ) + top, 12484 of: that.window 12485 }; 12486 that._removeClass( $( this ), "ui-dialog-dragging" ); 12487 that._unblockFrames(); 12488 that._trigger( "dragStop", event, filteredUi( ui ) ); 12489 } 12490 } ); 12491 }, 12492 12493 _makeResizable: function() { 12494 var that = this, 12495 options = this.options, 12496 handles = options.resizable, 12497 12498 // .ui-resizable has position: relative defined in the stylesheet 12499 // but dialogs have to use absolute or fixed positioning 12500 position = this.uiDialog.css( "position" ), 12501 resizeHandles = typeof handles === "string" ? 12502 handles : 12503 "n,e,s,w,se,sw,ne,nw"; 12504 12505 function filteredUi( ui ) { 12506 return { 12507 originalPosition: ui.originalPosition, 12508 originalSize: ui.originalSize, 12509 position: ui.position, 12510 size: ui.size 12511 }; 12512 } 12513 12514 this.uiDialog.resizable( { 12515 cancel: ".ui-dialog-content", 12516 containment: "document", 12517 alsoResize: this.element, 12518 maxWidth: options.maxWidth, 12519 maxHeight: options.maxHeight, 12520 minWidth: options.minWidth, 12521 minHeight: this._minHeight(), 12522 handles: resizeHandles, 12523 start: function( event, ui ) { 12524 that._addClass( $( this ), "ui-dialog-resizing" ); 12525 that._blockFrames(); 12526 that._trigger( "resizeStart", event, filteredUi( ui ) ); 12527 }, 12528 resize: function( event, ui ) { 12529 that._trigger( "resize", event, filteredUi( ui ) ); 12530 }, 12531 stop: function( event, ui ) { 12532 var offset = that.uiDialog.offset(), 12533 left = offset.left - that.document.scrollLeft(), 12534 top = offset.top - that.document.scrollTop(); 12535 12536 options.height = that.uiDialog.height(); 12537 options.width = that.uiDialog.width(); 12538 options.position = { 12539 my: "left top", 12540 at: "left" + ( left >= 0 ? "+" : "" ) + left + " " + 12541 "top" + ( top >= 0 ? "+" : "" ) + top, 12542 of: that.window 12543 }; 12544 that._removeClass( $( this ), "ui-dialog-resizing" ); 12545 that._unblockFrames(); 12546 that._trigger( "resizeStop", event, filteredUi( ui ) ); 12547 } 12548 } ) 12549 .css( "position", position ); 12550 }, 12551 12552 _trackFocus: function() { 12553 this._on( this.widget(), { 12554 focusin: function( event ) { 12555 this._makeFocusTarget(); 12556 this._focusedElement = $( event.target ); 12557 } 12558 } ); 12559 }, 12560 12561 _makeFocusTarget: function() { 12562 this._untrackInstance(); 12563 this._trackingInstances().unshift( this ); 12564 }, 12565 12566 _untrackInstance: function() { 12567 var instances = this._trackingInstances(), 12568 exists = $.inArray( this, instances ); 12569 if ( exists !== -1 ) { 12570 instances.splice( exists, 1 ); 12571 } 12572 }, 12573 12574 _trackingInstances: function() { 12575 var instances = this.document.data( "ui-dialog-instances" ); 12576 if ( !instances ) { 12577 instances = []; 12578 this.document.data( "ui-dialog-instances", instances ); 12579 } 12580 return instances; 12581 }, 12582 12583 _minHeight: function() { 12584 var options = this.options; 12585 12586 return options.height === "auto" ? 12587 options.minHeight : 12588 Math.min( options.minHeight, options.height ); 12589 }, 12590 12591 _position: function() { 12592 12593 // Need to show the dialog to get the actual offset in the position plugin 12594 var isVisible = this.uiDialog.is( ":visible" ); 12595 if ( !isVisible ) { 12596 this.uiDialog.show(); 12597 } 12598 this.uiDialog.position( this.options.position ); 12599 if ( !isVisible ) { 12600 this.uiDialog.hide(); 12601 } 12602 }, 12603 12604 _setOptions: function( options ) { 12605 var that = this, 12606 resize = false, 12607 resizableOptions = {}; 12608 12609 $.each( options, function( key, value ) { 12610 that._setOption( key, value ); 12611 12612 if ( key in that.sizeRelatedOptions ) { 12613 resize = true; 12614 } 12615 if ( key in that.resizableRelatedOptions ) { 12616 resizableOptions[ key ] = value; 12617 } 12618 } ); 12619 12620 if ( resize ) { 12621 this._size(); 12622 this._position(); 12623 } 12624 if ( this.uiDialog.is( ":data(ui-resizable)" ) ) { 12625 this.uiDialog.resizable( "option", resizableOptions ); 12626 } 12627 }, 12628 12629 _setOption: function( key, value ) { 12630 var isDraggable, isResizable, 12631 uiDialog = this.uiDialog; 12632 12633 if ( key === "disabled" ) { 12634 return; 12635 } 12636 12637 this._super( key, value ); 12638 12639 if ( key === "appendTo" ) { 12640 this.uiDialog.appendTo( this._appendTo() ); 12641 } 12642 12643 if ( key === "buttons" ) { 12644 this._createButtons(); 12645 } 12646 12647 if ( key === "closeText" ) { 12648 this.uiDialogTitlebarClose.button( { 12649 12650 // Ensure that we always pass a string 12651 label: $( "<a>" ).text( "" + this.options.closeText ).html() 12652 } ); 12653 } 12654 12655 if ( key === "draggable" ) { 12656 isDraggable = uiDialog.is( ":data(ui-draggable)" ); 12657 if ( isDraggable && !value ) { 12658 uiDialog.draggable( "destroy" ); 12659 } 12660 12661 if ( !isDraggable && value ) { 12662 this._makeDraggable(); 12663 } 12664 } 12665 12666 if ( key === "position" ) { 12667 this._position(); 12668 } 12669 12670 if ( key === "resizable" ) { 12671 12672 // currently resizable, becoming non-resizable 12673 isResizable = uiDialog.is( ":data(ui-resizable)" ); 12674 if ( isResizable && !value ) { 12675 uiDialog.resizable( "destroy" ); 12676 } 12677 12678 // Currently resizable, changing handles 12679 if ( isResizable && typeof value === "string" ) { 12680 uiDialog.resizable( "option", "handles", value ); 12681 } 12682 12683 // Currently non-resizable, becoming resizable 12684 if ( !isResizable && value !== false ) { 12685 this._makeResizable(); 12686 } 12687 } 12688 12689 if ( key === "title" ) { 12690 this._title( this.uiDialogTitlebar.find( ".ui-dialog-title" ) ); 12691 } 12692 }, 12693 12694 _size: function() { 12695 12696 // If the user has resized the dialog, the .ui-dialog and .ui-dialog-content 12697 // divs will both have width and height set, so we need to reset them 12698 var nonContentHeight, minContentHeight, maxContentHeight, 12699 options = this.options; 12700 12701 // Reset content sizing 12702 this.element.show().css( { 12703 width: "auto", 12704 minHeight: 0, 12705 maxHeight: "none", 12706 height: 0 12707 } ); 12708 12709 if ( options.minWidth > options.width ) { 12710 options.width = options.minWidth; 12711 } 12712 12713 // Reset wrapper sizing 12714 // determine the height of all the non-content elements 12715 nonContentHeight = this.uiDialog.css( { 12716 height: "auto", 12717 width: options.width 12718 } ) 12719 .outerHeight(); 12720 minContentHeight = Math.max( 0, options.minHeight - nonContentHeight ); 12721 maxContentHeight = typeof options.maxHeight === "number" ? 12722 Math.max( 0, options.maxHeight - nonContentHeight ) : 12723 "none"; 12724 12725 if ( options.height === "auto" ) { 12726 this.element.css( { 12727 minHeight: minContentHeight, 12728 maxHeight: maxContentHeight, 12729 height: "auto" 12730 } ); 12731 } else { 12732 this.element.height( Math.max( 0, options.height - nonContentHeight ) ); 12733 } 12734 12735 if ( this.uiDialog.is( ":data(ui-resizable)" ) ) { 12736 this.uiDialog.resizable( "option", "minHeight", this._minHeight() ); 12737 } 12738 }, 12739 12740 _blockFrames: function() { 12741 this.iframeBlocks = this.document.find( "iframe" ).map( function() { 12742 var iframe = $( this ); 12743 12744 return $( "<div>" ) 12745 .css( { 12746 position: "absolute", 12747 width: iframe.outerWidth(), 12748 height: iframe.outerHeight() 12749 } ) 12750 .appendTo( iframe.parent() ) 12751 .offset( iframe.offset() )[ 0 ]; 12752 } ); 12753 }, 12754 12755 _unblockFrames: function() { 12756 if ( this.iframeBlocks ) { 12757 this.iframeBlocks.remove(); 12758 delete this.iframeBlocks; 12759 } 12760 }, 12761 12762 _allowInteraction: function( event ) { 12763 if ( $( event.target ).closest( ".ui-dialog" ).length ) { 12764 return true; 12765 } 12766 12767 // TODO: Remove hack when datepicker implements 12768 // the .ui-front logic (#8989) 12769 return !!$( event.target ).closest( ".ui-datepicker" ).length; 12770 }, 12771 12772 _createOverlay: function() { 12773 if ( !this.options.modal ) { 12774 return; 12775 } 12776 12777 // We use a delay in case the overlay is created from an 12778 // event that we're going to be cancelling (#2804) 12779 var isOpening = true; 12780 this._delay( function() { 12781 isOpening = false; 12782 } ); 12783 12784 if ( !this.document.data( "ui-dialog-overlays" ) ) { 12785 12786 // Prevent use of anchors and inputs 12787 // Using _on() for an event handler shared across many instances is 12788 // safe because the dialogs stack and must be closed in reverse order 12789 this._on( this.document, { 12790 focusin: function( event ) { 12791 if ( isOpening ) { 12792 return; 12793 } 12794 12795 if ( !this._allowInteraction( event ) ) { 12796 event.preventDefault(); 12797 this._trackingInstances()[ 0 ]._focusTabbable(); 12798 } 12799 } 12800 } ); 12801 } 12802 12803 this.overlay = $( "<div>" ) 12804 .appendTo( this._appendTo() ); 12805 12806 this._addClass( this.overlay, null, "ui-widget-overlay ui-front" ); 12807 this._on( this.overlay, { 12808 mousedown: "_keepFocus" 12809 } ); 12810 this.document.data( "ui-dialog-overlays", 12811 ( this.document.data( "ui-dialog-overlays" ) || 0 ) + 1 ); 12812 }, 12813 12814 _destroyOverlay: function() { 12815 if ( !this.options.modal ) { 12816 return; 12817 } 12818 12819 if ( this.overlay ) { 12820 var overlays = this.document.data( "ui-dialog-overlays" ) - 1; 12821 12822 if ( !overlays ) { 12823 this._off( this.document, "focusin" ); 12824 this.document.removeData( "ui-dialog-overlays" ); 12825 } else { 12826 this.document.data( "ui-dialog-overlays", overlays ); 12827 } 12828 12829 this.overlay.remove(); 12830 this.overlay = null; 12831 } 12832 } 12833} ); 12834 12835// DEPRECATED 12836// TODO: switch return back to widget declaration at top of file when this is removed 12837if ( $.uiBackCompat !== false ) { 12838 12839 // Backcompat for dialogClass option 12840 $.widget( "ui.dialog", $.ui.dialog, { 12841 options: { 12842 dialogClass: "" 12843 }, 12844 _createWrapper: function() { 12845 this._super(); 12846 this.uiDialog.addClass( this.options.dialogClass ); 12847 }, 12848 _setOption: function( key, value ) { 12849 if ( key === "dialogClass" ) { 12850 this.uiDialog 12851 .removeClass( this.options.dialogClass ) 12852 .addClass( value ); 12853 } 12854 this._superApply( arguments ); 12855 } 12856 } ); 12857} 12858 12859var widgetsDialog = $.ui.dialog; 12860 12861 12862/*! 12863 * jQuery UI Droppable 1.12.1 12864 * http://jqueryui.com 12865 * 12866 * Copyright jQuery Foundation and other contributors 12867 * Released under the MIT license. 12868 * http://jquery.org/license 12869 */ 12870 12871//>>label: Droppable 12872//>>group: Interactions 12873//>>description: Enables drop targets for draggable elements. 12874//>>docs: http://api.jqueryui.com/droppable/ 12875//>>demos: http://jqueryui.com/droppable/ 12876 12877 12878 12879$.widget( "ui.droppable", { 12880 version: "1.12.1", 12881 widgetEventPrefix: "drop", 12882 options: { 12883 accept: "*", 12884 addClasses: true, 12885 greedy: false, 12886 scope: "default", 12887 tolerance: "intersect", 12888 12889 // Callbacks 12890 activate: null, 12891 deactivate: null, 12892 drop: null, 12893 out: null, 12894 over: null 12895 }, 12896 _create: function() { 12897 12898 var proportions, 12899 o = this.options, 12900 accept = o.accept; 12901 12902 this.isover = false; 12903 this.isout = true; 12904 12905 this.accept = $.isFunction( accept ) ? accept : function( d ) { 12906 return d.is( accept ); 12907 }; 12908 12909 this.proportions = function( /* valueToWrite */ ) { 12910 if ( arguments.length ) { 12911 12912 // Store the droppable's proportions 12913 proportions = arguments[ 0 ]; 12914 } else { 12915 12916 // Retrieve or derive the droppable's proportions 12917 return proportions ? 12918 proportions : 12919 proportions = { 12920 width: this.element[ 0 ].offsetWidth, 12921 height: this.element[ 0 ].offsetHeight 12922 }; 12923 } 12924 }; 12925 12926 this._addToManager( o.scope ); 12927 12928 o.addClasses && this._addClass( "ui-droppable" ); 12929 12930 }, 12931 12932 _addToManager: function( scope ) { 12933 12934 // Add the reference and positions to the manager 12935 $.ui.ddmanager.droppables[ scope ] = $.ui.ddmanager.droppables[ scope ] || []; 12936 $.ui.ddmanager.droppables[ scope ].push( this ); 12937 }, 12938 12939 _splice: function( drop ) { 12940 var i = 0; 12941 for ( ; i < drop.length; i++ ) { 12942 if ( drop[ i ] === this ) { 12943 drop.splice( i, 1 ); 12944 } 12945 } 12946 }, 12947 12948 _destroy: function() { 12949 var drop = $.ui.ddmanager.droppables[ this.options.scope ]; 12950 12951 this._splice( drop ); 12952 }, 12953 12954 _setOption: function( key, value ) { 12955 12956 if ( key === "accept" ) { 12957 this.accept = $.isFunction( value ) ? value : function( d ) { 12958 return d.is( value ); 12959 }; 12960 } else if ( key === "scope" ) { 12961 var drop = $.ui.ddmanager.droppables[ this.options.scope ]; 12962 12963 this._splice( drop ); 12964 this._addToManager( value ); 12965 } 12966 12967 this._super( key, value ); 12968 }, 12969 12970 _activate: function( event ) { 12971 var draggable = $.ui.ddmanager.current; 12972 12973 this._addActiveClass(); 12974 if ( draggable ) { 12975 this._trigger( "activate", event, this.ui( draggable ) ); 12976 } 12977 }, 12978 12979 _deactivate: function( event ) { 12980 var draggable = $.ui.ddmanager.current; 12981 12982 this._removeActiveClass(); 12983 if ( draggable ) { 12984 this._trigger( "deactivate", event, this.ui( draggable ) ); 12985 } 12986 }, 12987 12988 _over: function( event ) { 12989 12990 var draggable = $.ui.ddmanager.current; 12991 12992 // Bail if draggable and droppable are same element 12993 if ( !draggable || ( draggable.currentItem || 12994 draggable.element )[ 0 ] === this.element[ 0 ] ) { 12995 return; 12996 } 12997 12998 if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || 12999 draggable.element ) ) ) { 13000 this._addHoverClass(); 13001 this._trigger( "over", event, this.ui( draggable ) ); 13002 } 13003 13004 }, 13005 13006 _out: function( event ) { 13007 13008 var draggable = $.ui.ddmanager.current; 13009 13010 // Bail if draggable and droppable are same element 13011 if ( !draggable || ( draggable.currentItem || 13012 draggable.element )[ 0 ] === this.element[ 0 ] ) { 13013 return; 13014 } 13015 13016 if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || 13017 draggable.element ) ) ) { 13018 this._removeHoverClass(); 13019 this._trigger( "out", event, this.ui( draggable ) ); 13020 } 13021 13022 }, 13023 13024 _drop: function( event, custom ) { 13025 13026 var draggable = custom || $.ui.ddmanager.current, 13027 childrenIntersection = false;
vendor: 4,744 bytes, lines 13028-13200
13028 13029 // Bail if draggable and droppable are same element 13030 if ( !draggable || ( draggable.currentItem || 13031 draggable.element )[ 0 ] === this.element[ 0 ] ) { 13032 return false; 13033 } 13034 13035 this.element 13036 .find( ":data(ui-droppable)" ) 13037 .not( ".ui-draggable-dragging" ) 13038 .each( function() { 13039 var inst = $( this ).droppable( "instance" ); 13040 if ( 13041 inst.options.greedy && 13042 !inst.options.disabled && 13043 inst.options.scope === draggable.options.scope && 13044 inst.accept.call( 13045 inst.element[ 0 ], ( draggable.currentItem || draggable.element ) 13046 ) && 13047 intersect( 13048 draggable, 13049 $.extend( inst, { offset: inst.element.offset() } ), 13050 inst.options.tolerance, event 13051 ) 13052 ) { 13053 childrenIntersection = true; 13054 return false; } 13055 } ); 13056 if ( childrenIntersection ) { 13057 return false; 13058 } 13059 13060 if ( this.accept.call( this.element[ 0 ], 13061 ( draggable.currentItem || draggable.element ) ) ) { 13062 this._removeActiveClass(); 13063 this._removeHoverClass(); 13064 13065 this._trigger( "drop", event, this.ui( draggable ) ); 13066 return this.element; 13067 } 13068 13069 return false; 13070 13071 }, 13072 13073 ui: function( c ) { 13074 return { 13075 draggable: ( c.currentItem || c.element ), 13076 helper: c.helper, 13077 position: c.position, 13078 offset: c.positionAbs 13079 }; 13080 }, 13081 13082 // Extension points just to make backcompat sane and avoid duplicating logic 13083 // TODO: Remove in 1.13 along with call to it below 13084 _addHoverClass: function() { 13085 this._addClass( "ui-droppable-hover" ); 13086 }, 13087 13088 _removeHoverClass: function() { 13089 this._removeClass( "ui-droppable-hover" ); 13090 }, 13091 13092 _addActiveClass: function() { 13093 this._addClass( "ui-droppable-active" ); 13094 }, 13095 13096 _removeActiveClass: function() { 13097 this._removeClass( "ui-droppable-active" ); 13098 } 13099} ); 13100 13101var intersect = $.ui.intersect = ( function() { 13102 function isOverAxis( x, reference, size ) { 13103 return ( x >= reference ) && ( x < ( reference + size ) ); 13104 } 13105 13106 return function( draggable, droppable, toleranceMode, event ) { 13107 13108 if ( !droppable.offset ) { 13109 return false; 13110 } 13111 13112 var x1 = ( draggable.positionAbs || 13113 draggable.position.absolute ).left + draggable.margins.left, 13114 y1 = ( draggable.positionAbs || 13115 draggable.position.absolute ).top + draggable.margins.top, 13116 x2 = x1 + draggable.helperProportions.width, 13117 y2 = y1 + draggable.helperProportions.height, 13118 l = droppable.offset.left, 13119 t = droppable.offset.top, 13120 r = l + droppable.proportions().width, 13121 b = t + droppable.proportions().height; 13122 13123 switch ( toleranceMode ) { 13124 case "fit": 13125 return ( l <= x1 && x2 <= r && t <= y1 && y2 <= b ); 13126 case "intersect": 13127 return ( l < x1 + ( draggable.helperProportions.width / 2 ) && // Right Half 13128 x2 - ( draggable.helperProportions.width / 2 ) < r && // Left Half 13129 t < y1 + ( draggable.helperProportions.height / 2 ) && // Bottom Half 13130 y2 - ( draggable.helperProportions.height / 2 ) < b ); // Top Half 13131 case "pointer": 13132 return isOverAxis( event.pageY, t, droppable.proportions().height ) && 13133 isOverAxis( event.pageX, l, droppable.proportions().width ); 13134 case "touch": 13135 return ( 13136 ( y1 >= t && y1 <= b ) || // Top edge touching 13137 ( y2 >= t && y2 <= b ) || // Bottom edge touching 13138 ( y1 < t && y2 > b ) // Surrounded vertically 13139 ) && ( 13140 ( x1 >= l && x1 <= r ) || // Left edge touching 13141 ( x2 >= l && x2 <= r ) || // Right edge touching 13142 ( x1 < l && x2 > r ) // Surrounded horizontally 13143 ); 13144 default: 13145 return false; 13146 } 13147 }; 13148} )(); 13149 13150/* 13151 This manager tracks offsets of draggables and droppables 13152*/ 13153$.ui.ddmanager = { 13154 current: null, 13155 droppables: { "default": [] }, 13156 prepareOffsets: function( t, event ) { 13157 13158 var i, j, 13159 m = $.ui.ddmanager.droppables[ t.options.scope ] || [], 13160 type = event ? event.type : null, // workaround for #2317 13161 list = ( t.currentItem || t.element ).find( ":data(ui-droppable)" ).addBack(); 13162 13163 droppablesLoop: for ( i = 0; i < m.length; i++ ) { 13164 13165 // No disabled and non-accepted 13166 if ( m[ i ].options.disabled || ( t && !m[ i ].accept.call( m[ i ].element[ 0 ], 13167 ( t.currentItem || t.element ) ) ) ) { 13168 continue; 13169 } 13170 13171 // Filter out elements in the current dragged item 13172 for ( j = 0; j < list.length; j++ ) { 13173 if ( list[ j ] === m[ i ].element[ 0 ] ) { 13174 m[ i ].proportions().height = 0; 13175 continue droppablesLoop; 13176 } 13177 } 13178 13179 m[ i ].visible = m[ i ].element.css( "display" ) !== "none"; 13180 if ( !m[ i ].visible ) { 13181 continue; 13182 } 13183 13184 // Activate the droppable if used directly from draggables 13185 if ( type === "mousedown" ) { 13186 m[ i ]._activate.call( m[ i ], event ); 13187 } 13188 13189 m[ i ].offset = m[ i ].element.offset(); 13190 m[ i ].proportions( { 13191 width: m[ i ].element[ 0 ].offsetWidth, 13192 height: m[ i ].element[ 0 ].offsetHeight 13193 } ); 13194 13195 } 13196 13197 }, 13198 drop: function( draggable, event ) { 13199 13200 var dropped = false;
vendor: 4,444 bytes, lines 13201-13355
13201 13202 // Create a copy of the droppables in case the list changes during the drop (#9116) 13203 $.each( ( $.ui.ddmanager.droppables[ draggable.options.scope ] || [] ).slice(), function() { 13204 13205 if ( !this.options ) { 13206 return; 13207 } 13208 if ( !this.options.disabled && this.visible && 13209 intersect( draggable, this, this.options.tolerance, event ) ) { 13210 dropped = this._drop.call( this, event ) || dropped; 13211 } 13212 13213 if ( !this.options.disabled && this.visible && this.accept.call( this.element[ 0 ], 13214 ( draggable.currentItem || draggable.element ) ) ) { 13215 this.isout = true; 13216 this.isover = false; 13217 this._deactivate.call( this, event ); 13218 } 13219 13220 } ); 13221 return dropped; 13222 13223 }, 13224 dragStart: function( draggable, event ) { 13225 13226 // Listen for scrolling so that if the dragging causes scrolling the position of the 13227 // droppables can be recalculated (see #5003) 13228 draggable.element.parentsUntil( "body" ).on( "scroll.droppable", function() { 13229 if ( !draggable.options.refreshPositions ) { 13230 $.ui.ddmanager.prepareOffsets( draggable, event ); 13231 } 13232 } ); 13233 }, 13234 drag: function( draggable, event ) { 13235 13236 // If you have a highly dynamic page, you might try this option. It renders positions 13237 // every time you move the mouse. 13238 if ( draggable.options.refreshPositions ) { 13239 $.ui.ddmanager.prepareOffsets( draggable, event ); 13240 } 13241 13242 // Run through all droppables and check their positions based on specific tolerance options 13243 $.each( $.ui.ddmanager.droppables[ draggable.options.scope ] || [], function() { 13244 13245 if ( this.options.disabled || this.greedyChild || !this.visible ) { 13246 return; 13247 } 13248 13249 var parentInstance, scope, parent, 13250 intersects = intersect( draggable, this, this.options.tolerance, event ), 13251 c = !intersects && this.isover ? 13252 "isout" : 13253 ( intersects && !this.isover ? "isover" : null ); 13254 if ( !c ) { 13255 return; 13256 } 13257 13258 if ( this.options.greedy ) { 13259 13260 // find droppable parents with same scope 13261 scope = this.options.scope; 13262 parent = this.element.parents( ":data(ui-droppable)" ).filter( function() { 13263 return $( this ).droppable( "instance" ).options.scope === scope; 13264 } ); 13265 13266 if ( parent.length ) { 13267 parentInstance = $( parent[ 0 ] ).droppable( "instance" ); 13268 parentInstance.greedyChild = ( c === "isover" ); 13269 } 13270 } 13271 13272 // We just moved into a greedy child 13273 if ( parentInstance && c === "isover" ) { 13274 parentInstance.isover = false; 13275 parentInstance.isout = true; 13276 parentInstance._out.call( parentInstance, event ); 13277 } 13278 13279 this[ c ] = true; 13280 this[ c === "isout" ? "isover" : "isout" ] = false; 13281 this[ c === "isover" ? "_over" : "_out" ].call( this, event ); 13282 13283 // We just moved out of a greedy child 13284 if ( parentInstance && c === "isout" ) { 13285 parentInstance.isout = false; 13286 parentInstance.isover = true; 13287 parentInstance._over.call( parentInstance, event ); 13288 } 13289 } ); 13290 13291 }, 13292 dragStop: function( draggable, event ) { 13293 draggable.element.parentsUntil( "body" ).off( "scroll.droppable" ); 13294 13295 // Call prepareOffsets one final time since IE does not fire return scroll events when 13296 // overflow was caused by drag (see #5003) 13297 if ( !draggable.options.refreshPositions ) { 13298 $.ui.ddmanager.prepareOffsets( draggable, event ); 13299 } 13300 } 13301}; 13302 13303// DEPRECATED 13304// TODO: switch return back to widget declaration at top of file when this is removed 13305if ( $.uiBackCompat !== false ) { 13306 13307 // Backcompat for activeClass and hoverClass options 13308 $.widget( "ui.droppable", $.ui.droppable, { 13309 options: { 13310 hoverClass: false, 13311 activeClass: false 13312 }, 13313 _addActiveClass: function() { 13314 this._super(); 13315 if ( this.options.activeClass ) { 13316 this.element.addClass( this.options.activeClass ); 13317 } 13318 }, 13319 _removeActiveClass: function() { 13320 this._super(); 13321 if ( this.options.activeClass ) { 13322 this.element.removeClass( this.options.activeClass ); 13323 } 13324 }, 13325 _addHoverClass: function() { 13326 this._super(); 13327 if ( this.options.hoverClass ) { 13328 this.element.addClass( this.options.hoverClass ); 13329 } 13330 }, 13331 _removeHoverClass: function() { 13332 this._super(); 13333 if ( this.options.hoverClass ) { 13334 this.element.removeClass( this.options.hoverClass ); 13335 } 13336 } 13337 } ); 13338} 13339 13340var widgetsDroppable = $.ui.droppable; 13341 13342 13343/*! 13344 * jQuery UI Progressbar 1.12.1 13345 * http://jqueryui.com 13346 * 13347 * Copyright jQuery Foundation and other contributors 13348 * Released under the MIT license. 13349 * http://jquery.org/license 13350 */ 13351 13352//>>label: Progressbar 13353//>>group: Widgets 13354// jscs:disable maximumLineLength 13355//>>
vendor: 15,214 bytes, lines 13355-13948
13355description: Displays a status indicator for loading state, standard percentage, and other progress indicators. 13356// jscs:enable maximumLineLength 13357//>>docs: http://api.jqueryui.com/progressbar/ 13358//>>demos: http://jqueryui.com/progressbar/ 13359//>>css.structure: ../../themes/base/core.css 13360//>>css.structure: ../../themes/base/progressbar.css 13361//>>css.theme: ../../themes/base/theme.css 13362 13363 13364 13365var widgetsProgressbar = $.widget( "ui.progressbar", { 13366 version: "1.12.1", 13367 options: { 13368 classes: { 13369 "ui-progressbar": "ui-corner-all", 13370 "ui-progressbar-value": "ui-corner-left", 13371 "ui-progressbar-complete": "ui-corner-right" 13372 }, 13373 max: 100, 13374 value: 0, 13375 13376 change: null, 13377 complete: null 13378 }, 13379 13380 min: 0, 13381 13382 _create: function() { 13383 13384 // Constrain initial value 13385 this.oldValue = this.options.value = this._constrainedValue(); 13386 13387 this.element.attr( { 13388 13389 // Only set static values; aria-valuenow and aria-valuemax are 13390 // set inside _refreshValue() 13391 role: "progressbar", 13392 "aria-valuemin": this.min 13393 } ); 13394 this._addClass( "ui-progressbar", "ui-widget ui-widget-content" ); 13395 13396 this.valueDiv = $( "<div>" ).appendTo( this.element ); 13397 this._addClass( this.valueDiv, "ui-progressbar-value", "ui-widget-header" ); 13398 this._refreshValue(); 13399 }, 13400 13401 _destroy: function() { 13402 this.element.removeAttr( "role aria-valuemin aria-valuemax aria-valuenow" ); 13403 13404 this.valueDiv.remove(); 13405 }, 13406 13407 value: function( newValue ) { 13408 if ( newValue === undefined ) { 13409 return this.options.value; 13410 } 13411 13412 this.options.value = this._constrainedValue( newValue ); 13413 this._refreshValue(); 13414 }, 13415 13416 _constrainedValue: function( newValue ) { 13417 if ( newValue === undefined ) { 13418 newValue = this.options.value; 13419 } 13420 13421 this.indeterminate = newValue === false; 13422 13423 // Sanitize value 13424 if ( typeof newValue !== "number" ) { 13425 newValue = 0; 13426 } 13427 13428 return this.indeterminate ? false : 13429 Math.min( this.options.max, Math.max( this.min, newValue ) ); 13430 }, 13431 13432 _setOptions: function( options ) { 13433 13434 // Ensure "value" option is set after other values (like max) 13435 var value = options.value; 13436 delete options.value; 13437 13438 this._super( options ); 13439 13440 this.options.value = this._constrainedValue( value ); 13441 this._refreshValue(); 13442 }, 13443 13444 _setOption: function( key, value ) { 13445 if ( key === "max" ) { 13446 13447 // Don't allow a max less than min 13448 value = Math.max( this.min, value ); 13449 } 13450 this._super( key, value ); 13451 }, 13452 13453 _setOptionDisabled: function( value ) { 13454 this._super( value ); 13455 13456 this.element.attr( "aria-disabled", value ); 13457 this._toggleClass( null, "ui-state-disabled", !!value ); 13458 }, 13459 13460 _percentage: function() { 13461 return this.indeterminate ? 13462 100 : 13463 100 * ( this.options.value - this.min ) / ( this.options.max - this.min ); 13464 }, 13465 13466 _refreshValue: function() { 13467 var value = this.options.value, 13468 percentage = this._percentage(); 13469 13470 this.valueDiv 13471 .toggle( this.indeterminate || value > this.min ) 13472 .width( percentage.toFixed( 0 ) + "%" ); 13473 13474 this 13475 ._toggleClass( this.valueDiv, "ui-progressbar-complete", null, 13476 value === this.options.max ) 13477 ._toggleClass( "ui-progressbar-indeterminate", null, this.indeterminate ); 13478 13479 if ( this.indeterminate ) { 13480 this.element.removeAttr( "aria-valuenow" ); 13481 if ( !this.overlayDiv ) { 13482 this.overlayDiv = $( "<div>" ).appendTo( this.valueDiv ); 13483 this._addClass( this.overlayDiv, "ui-progressbar-overlay" ); 13484 } 13485 } else { 13486 this.element.attr( { 13487 "aria-valuemax": this.options.max, 13488 "aria-valuenow": value 13489 } ); 13490 if ( this.overlayDiv ) { 13491 this.overlayDiv.remove(); 13492 this.overlayDiv = null; 13493 } 13494 } 13495 13496 if ( this.oldValue !== value ) { 13497 this.oldValue = value; 13498 this._trigger( "change" ); 13499 } 13500 if ( value === this.options.max ) { 13501 this._trigger( "complete" ); 13502 } 13503 } 13504} ); 13505 13506 13507/*! 13508 * jQuery UI Selectable 1.12.1 13509 * http://jqueryui.com 13510 * 13511 * Copyright jQuery Foundation and other contributors 13512 * Released under the MIT license. 13513 * http://jquery.org/license 13514 */ 13515 13516//>>label: Selectable 13517//>>group: Interactions 13518//>>description: Allows groups of elements to be selected with the mouse. 13519//>>docs: http://api.jqueryui.com/selectable/ 13520//>>demos: http://jqueryui.com/selectable/ 13521//>>css.structure: ../../themes/base/selectable.css 13522 13523 13524 13525var widgetsSelectable = $.widget( "ui.selectable", $.ui.mouse, { 13526 version: "1.12.1", 13527 options: { 13528 appendTo: "body", 13529 autoRefresh: true, 13530 distance: 0, 13531 filter: "*", 13532 tolerance: "touch", 13533 13534 // Callbacks 13535 selected: null, 13536 selecting: null, 13537 start: null, 13538 stop: null, 13539 unselected: null, 13540 unselecting: null 13541 }, 13542 _create: function() { 13543 var that = this; 13544 13545 this._addClass( "ui-selectable" ); 13546 13547 this.dragged = false; 13548 13549 // Cache selectee children based on filter 13550 this.refresh = function() { 13551 that.elementPos = $( that.element[ 0 ] ).offset(); 13552 that.selectees = $( that.options.filter, that.element[ 0 ] ); 13553 that._addClass( that.selectees, "ui-selectee" ); 13554 that.selectees.each( function() { 13555 var $this = $( this ), 13556 selecteeOffset = $this.offset(), 13557 pos = { 13558 left: selecteeOffset.left - that.elementPos.left, 13559 top: selecteeOffset.top - that.elementPos.top 13560 }; 13561 $.data( this, "selectable-item", { 13562 element: this, 13563 $element: $this, 13564 left: pos.left, 13565 top: pos.top, 13566 right: pos.left + $this.outerWidth(), 13567 bottom: pos.top + $this.outerHeight(), 13568 startselected: false, 13569 selected: $this.hasClass( "ui-selected" ), 13570 selecting: $this.hasClass( "ui-selecting" ), 13571 unselecting: $this.hasClass( "ui-unselecting" ) 13572 } ); 13573 } ); 13574 }; 13575 this.refresh(); 13576 13577 this._mouseInit(); 13578 13579 this.helper = $( "<div>" ); 13580 this._addClass( this.helper, "ui-selectable-helper" ); 13581 }, 13582 13583 _destroy: function() { 13584 this.selectees.removeData( "selectable-item" ); 13585 this._mouseDestroy(); 13586 }, 13587 13588 _mouseStart: function( event ) { 13589 var that = this, 13590 options = this.options; 13591 13592 this.opos = [ event.pageX, event.pageY ]; 13593 this.elementPos = $( this.element[ 0 ] ).offset(); 13594 13595 if ( this.options.disabled ) { 13596 return; 13597 } 13598 13599 this.selectees = $( options.filter, this.element[ 0 ] ); 13600 13601 this._trigger( "start", event ); 13602 13603 $( options.appendTo ).append( this.helper ); 13604 13605 // position helper (lasso) 13606 this.helper.css( { 13607 "left": event.pageX, 13608 "top": event.pageY, 13609 "width": 0, 13610 "height": 0 13611 } ); 13612 13613 if ( options.autoRefresh ) { 13614 this.refresh(); 13615 } 13616 13617 this.selectees.filter( ".ui-selected" ).each( function() { 13618 var selectee = $.data( this, "selectable-item" ); 13619 selectee.startselected = true; 13620 if ( !event.metaKey && !event.ctrlKey ) { 13621 that._removeClass( selectee.$element, "ui-selected" ); 13622 selectee.selected = false; 13623 that._addClass( selectee.$element, "ui-unselecting" ); 13624 selectee.unselecting = true; 13625 13626 // selectable UNSELECTING callback 13627 that._trigger( "unselecting", event, { 13628 unselecting: selectee.element 13629 } ); 13630 } 13631 } ); 13632 13633 $( event.target ).parents().addBack().each( function() { 13634 var doSelect, 13635 selectee = $.data( this, "selectable-item" ); 13636 if ( selectee ) { 13637 doSelect = ( !event.metaKey && !event.ctrlKey ) || 13638 !selectee.$element.hasClass( "ui-selected" ); 13639 that._removeClass( selectee.$element, doSelect ? "ui-unselecting" : "ui-selected" ) 13640 ._addClass( selectee.$element, doSelect ? "ui-selecting" : "ui-unselecting" ); 13641 selectee.unselecting = !doSelect; 13642 selectee.selecting = doSelect; 13643 selectee.selected = doSelect; 13644 13645 // selectable (UN)SELECTING callback 13646 if ( doSelect ) { 13647 that._trigger( "selecting", event, { 13648 selecting: selectee.element 13649 } ); 13650 } else { 13651 that._trigger( "unselecting", event, { 13652 unselecting: selectee.element 13653 } ); 13654 } 13655 return false; 13656 } 13657 } ); 13658 13659 }, 13660 13661 _mouseDrag: function( event ) { 13662 13663 this.dragged = true; 13664 13665 if ( this.options.disabled ) { 13666 return; 13667 } 13668 13669 var tmp, 13670 that = this, 13671 options = this.options, 13672 x1 = this.opos[ 0 ], 13673 y1 = this.opos[ 1 ], 13674 x2 = event.pageX, 13675 y2 = event.pageY; 13676 13677 if ( x1 > x2 ) { tmp = x2; x2 = x1; x1 = tmp; } 13678 if ( y1 > y2 ) { tmp = y2; y2 = y1; y1 = tmp; } 13679 this.helper.css( { left: x1, top: y1, width: x2 - x1, height: y2 - y1 } ); 13680 13681 this.selectees.each( function() { 13682 var selectee = $.data( this, "selectable-item" ), 13683 hit = false, 13684 offset = {}; 13685 13686 //prevent helper from being selected if appendTo: selectable 13687 if ( !selectee || selectee.element === that.element[ 0 ] ) { 13688 return; 13689 } 13690 13691 offset.left = selectee.left + that.elementPos.left; 13692 offset.right = selectee.right + that.elementPos.left; 13693 offset.top = selectee.top + that.elementPos.top; 13694 offset.bottom = selectee.bottom + that.elementPos.top; 13695 13696 if ( options.tolerance === "touch" ) { 13697 hit = ( !( offset.left > x2 || offset.right < x1 || offset.top > y2 || 13698 offset.bottom < y1 ) ); 13699 } else if ( options.tolerance === "fit" ) { 13700 hit = ( offset.left > x1 && offset.right < x2 && offset.top > y1 && 13701 offset.bottom < y2 ); 13702 } 13703 13704 if ( hit ) { 13705 13706 // SELECT 13707 if ( selectee.selected ) { 13708 that._removeClass( selectee.$element, "ui-selected" ); 13709 selectee.selected = false; 13710 } 13711 if ( selectee.unselecting ) { 13712 that._removeClass( selectee.$element, "ui-unselecting" ); 13713 selectee.unselecting = false; 13714 } 13715 if ( !selectee.selecting ) { 13716 that._addClass( selectee.$element, "ui-selecting" ); 13717 selectee.selecting = true; 13718 13719 // selectable SELECTING callback 13720 that._trigger( "selecting", event, { 13721 selecting: selectee.element 13722 } ); 13723 } 13724 } else { 13725 13726 // UNSELECT 13727 if ( selectee.selecting ) { 13728 if ( ( event.metaKey || event.ctrlKey ) && selectee.startselected ) { 13729 that._removeClass( selectee.$element, "ui-selecting" ); 13730 selectee.selecting = false; 13731 that._addClass( selectee.$element, "ui-selected" ); 13732 selectee.selected = true; 13733 } else { 13734 that._removeClass( selectee.$element, "ui-selecting" ); 13735 selectee.selecting = false; 13736 if ( selectee.startselected ) { 13737 that._addClass( selectee.$element, "ui-unselecting" ); 13738 selectee.unselecting = true; 13739 } 13740 13741 // selectable UNSELECTING callback 13742 that._trigger( "unselecting", event, { 13743 unselecting: selectee.element 13744 } ); 13745 } 13746 } 13747 if ( selectee.selected ) { 13748 if ( !event.metaKey && !event.ctrlKey && !selectee.startselected ) { 13749 that._removeClass( selectee.$element, "ui-selected" ); 13750 selectee.selected = false; 13751 13752 that._addClass( selectee.$element, "ui-unselecting" ); 13753 selectee.unselecting = true; 13754 13755 // selectable UNSELECTING callback 13756 that._trigger( "unselecting", event, { 13757 unselecting: selectee.element 13758 } ); 13759 } 13760 } 13761 } 13762 } ); 13763 13764 return false; 13765 }, 13766 13767 _mouseStop: function( event ) { 13768 var that = this; 13769 13770 this.dragged = false; 13771 13772 $( ".ui-unselecting", this.element[ 0 ] ).each( function() { 13773 var selectee = $.data( this, "selectable-item" ); 13774 that._removeClass( selectee.$element, "ui-unselecting" ); 13775 selectee.unselecting = false; 13776 selectee.startselected = false; 13777 that._trigger( "unselected", event, { 13778 unselected: selectee.element 13779 } ); 13780 } ); 13781 $( ".ui-selecting", this.element[ 0 ] ).each( function() { 13782 var selectee = $.data( this, "selectable-item" ); 13783 that._removeClass( selectee.$element, "ui-selecting" ) 13784 ._addClass( selectee.$element, "ui-selected" ); 13785 selectee.selecting = false; 13786 selectee.selected = true; 13787 selectee.startselected = true; 13788 that._trigger( "selected", event, { 13789 selected: selectee.element 13790 } ); 13791 } ); 13792 this._trigger( "stop", event ); 13793 13794 this.helper.remove(); 13795 13796 return false; 13797 } 13798 13799} ); 13800 13801 13802/*! 13803 * jQuery UI Selectmenu 1.12.1 13804 * http://jqueryui.com 13805 * 13806 * Copyright jQuery Foundation and other contributors 13807 * Released under the MIT license. 13808 * http://jquery.org/license 13809 */ 13810 13811//>>label: Selectmenu 13812//>>group: Widgets 13813// jscs:disable maximumLineLength 13814//>>description: Duplicates and extends the functionality of a native HTML select element, allowing it to be customizable in behavior and appearance far beyond the limitations of a native select. 13815// jscs:enable maximumLineLength 13816//>>docs: http://api.jqueryui.com/selectmenu/ 13817//>>demos: http://jqueryui.com/selectmenu/ 13818//>>css.structure: ../../themes/base/core.css 13819//>>css.structure: ../../themes/base/selectmenu.css, ../../themes/base/button.css 13820//>>css.theme: ../../themes/base/theme.css 13821 13822 13823 13824var widgetsSelectmenu = $.widget( "ui.selectmenu", [ $.ui.formResetMixin, { 13825 version: "1.12.1", 13826 defaultElement: "<select>", 13827 options: { 13828 appendTo: null, 13829 classes: { 13830 "ui-selectmenu-button-open": "ui-corner-top", 13831 "ui-selectmenu-button-closed": "ui-corner-all" 13832 }, 13833 disabled: null, 13834 icons: { 13835 button: "ui-icon-triangle-1-s" 13836 }, 13837 position: { 13838 my: "left top", 13839 at: "left bottom", 13840 collision: "none" 13841 }, 13842 width: false, 13843 13844 // Callbacks 13845 change: null, 13846 close: null, 13847 focus: null, 13848 open: null, 13849 select: null 13850 }, 13851 13852 _create: function() { 13853 var selectmenuId = this.element.uniqueId().attr( "id" ); 13854 this.ids = { 13855 element: selectmenuId, 13856 button: selectmenuId + "-button", 13857 menu: selectmenuId + "-menu" 13858 }; 13859 13860 this._drawButton(); 13861 this._drawMenu(); 13862 this._bindFormResetHandler(); 13863 13864 this._rendered = false; 13865 this.menuItems = $(); 13866 }, 13867 13868 _drawButton: function() { 13869 var icon, 13870 that = this, 13871 item = this._parseOption( 13872 this.element.find( "option:selected" ), 13873 this.element[ 0 ].selectedIndex 13874 ); 13875 13876 // Associate existing label with the new button 13877 this.labels = this.element.labels().attr( "for", this.ids.button ); 13878 this._on( this.labels, { 13879 click: function( event ) { 13880 this.button.focus(); 13881 event.preventDefault(); 13882 } 13883 } ); 13884 13885 // Hide original select element 13886 this.element.hide(); 13887 13888 // Create button 13889 this.button = $( "<span>", { 13890 tabindex: this.options.disabled ? -1 : 0, 13891 id: this.ids.button, 13892 role: "combobox", 13893 "aria-expanded": "false", 13894 "aria-autocomplete": "list", 13895 "aria-owns": this.ids.menu, 13896 "aria-haspopup": "true", 13897 title: this.element.attr( "title" ) 13898 } ) 13899 .insertAfter( this.element ); 13900 13901 this._addClass( this.button, "ui-selectmenu-button ui-selectmenu-button-closed", 13902 "ui-button ui-widget" ); 13903 13904 icon = $( "<span>" ).appendTo( this.button ); 13905 this._addClass( icon, "ui-selectmenu-icon", "ui-icon " + this.options.icons.button ); 13906 this.buttonItem = this._renderButtonItem( item ) 13907 .appendTo( this.button ); 13908 13909 if ( this.options.width !== false ) { 13910 this._resizeButton(); 13911 } 13912 13913 this._on( this.button, this._buttonEvents ); 13914 this.button.one( "focusin", function() { 13915 13916 // Delay rendering the menu items until the button receives focus. 13917 // The menu may have already been rendered via a programmatic open. 13918 if ( !that._rendered ) { 13919 that._refreshMenu(); 13920 } 13921 } ); 13922 }, 13923 13924 _drawMenu: function() { 13925 var that = this; 13926 13927 // Create menu 13928 this.menu = $( "<ul>", { 13929 "aria-hidden": "true", 13930 "aria-labelledby": this.ids.button, 13931 id: this.ids.menu 13932 } ); 13933 13934 // Wrap menu 13935 this.menuWrap = $( "<div>" ).append( this.menu ); 13936 this._addClass( this.menuWrap, "ui-selectmenu-menu", "ui-front" ); 13937 this.menuWrap.appendTo( this._appendTo() ); 13938 13939 // Initialize menu widget 13940 this.menuInstance = this.menu 13941 .menu( { 13942 classes: { 13943 "ui-menu": "ui-corner-bottom" 13944 }, 13945 role: "listbox", 13946 select: function( event, ui ) { 13947 event.preventDefault(); 13948
vendor: 5,595 bytes, lines 13949-14189
13949 // Support: IE8 13950 // If the item was selected via a click, the text selection 13951 // will be destroyed in IE 13952 that._setSelection(); 13953 13954 that._select( ui.item.data( "ui-selectmenu-item" ), event ); 13955 }, 13956 focus: function( event, ui ) { 13957 var item = ui.item.data( "ui-selectmenu-item" ); 13958 13959 // Prevent inital focus from firing and check if its a newly focused item 13960 if ( that.focusIndex != null && item.index !== that.focusIndex ) { 13961 that._trigger( "focus", event, { item: item } ); 13962 if ( !that.isOpen ) { 13963 that._select( item, event ); 13964 } 13965 } 13966 that.focusIndex = item.index; 13967 13968 that.button.attr( "aria-activedescendant", 13969 that.menuItems.eq( item.index ).attr( "id" ) ); 13970 } 13971 } ) 13972 .menu( "instance" ); 13973 13974 // Don't close the menu on mouseleave 13975 this.menuInstance._off( this.menu, "mouseleave" ); 13976 13977 // Cancel the menu's collapseAll on document click 13978 this.menuInstance._closeOnDocumentClick = function() { 13979 return false; 13980 }; 13981 13982 // Selects often contain empty items, but never contain dividers 13983 this.menuInstance._isDivider = function() { 13984 return false; 13985 }; 13986 }, 13987 13988 refresh: function() { 13989 this._refreshMenu(); 13990 this.buttonItem.replaceWith( 13991 this.buttonItem = this._renderButtonItem( 13992 13993 // Fall back to an empty object in case there are no options 13994 this._getSelectedItem().data( "ui-selectmenu-item" ) || {} 13995 ) 13996 ); 13997 if ( this.options.width === null ) { 13998 this._resizeButton(); 13999 } 14000 }, 14001 14002 _refreshMenu: function() { 14003 var item, 14004 options = this.element.find( "option" ); 14005 14006 this.menu.empty(); 14007 14008 this._parseOptions( options ); 14009 this._renderMenu( this.menu, this.items ); 14010 14011 this.menuInstance.refresh(); 14012 this.menuItems = this.menu.find( "li" ) 14013 .not( ".ui-selectmenu-optgroup" ) 14014 .find( ".ui-menu-item-wrapper" ); 14015 14016 this._rendered = true; 14017 14018 if ( !options.length ) { 14019 return; 14020 } 14021 14022 item = this._getSelectedItem(); 14023 14024 // Update the menu to have the correct item focused 14025 this.menuInstance.focus( null, item ); 14026 this._setAria( item.data( "ui-selectmenu-item" ) ); 14027 14028 // Set disabled state 14029 this._setOption( "disabled", this.element.prop( "disabled" ) ); 14030 }, 14031 14032 open: function( event ) { 14033 if ( this.options.disabled ) { 14034 return; 14035 } 14036 14037 // If this is the first time the menu is being opened, render the items 14038 if ( !this._rendered ) { 14039 this._refreshMenu(); 14040 } else { 14041 14042 // Menu clears focus on close, reset focus to selected item 14043 this._removeClass( this.menu.find( ".ui-state-active" ), null, "ui-state-active" ); 14044 this.menuInstance.focus( null, this._getSelectedItem() ); 14045 } 14046 14047 // If there are no options, don't open the menu 14048 if ( !this.menuItems.length ) { 14049 return; 14050 } 14051 14052 this.isOpen = true; 14053 this._toggleAttr(); 14054 this._resizeMenu(); 14055 this._position(); 14056 14057 this._on( this.document, this._documentClick ); 14058 14059 this._trigger( "open", event ); 14060 }, 14061 14062 _position: function() { 14063 this.menuWrap.position( $.extend( { of: this.button }, this.options.position ) ); 14064 }, 14065 14066 close: function( event ) { 14067 if ( !this.isOpen ) { 14068 return; 14069 } 14070 14071 this.isOpen = false; 14072 this._toggleAttr(); 14073 14074 this.range = null; 14075 this._off( this.document ); 14076 14077 this._trigger( "close", event ); 14078 }, 14079 14080 widget: function() { 14081 return this.button; 14082 }, 14083 14084 menuWidget: function() { 14085 return this.menu; 14086 }, 14087 14088 _renderButtonItem: function( item ) { 14089 var buttonItem = $( "<span>" ); 14090 14091 this._setText( buttonItem, item.label ); 14092 this._addClass( buttonItem, "ui-selectmenu-text" ); 14093 14094 return buttonItem; 14095 }, 14096 14097 _renderMenu: function( ul, items ) { 14098 var that = this, 14099 currentOptgroup = ""; 14100 14101 $.each( items, function( index, item ) { 14102 var li; 14103 14104 if ( item.optgroup !== currentOptgroup ) { 14105 li = $( "<li>", { 14106 text: item.optgroup 14107 } ); 14108 that._addClass( li, "ui-selectmenu-optgroup", "ui-menu-divider" + 14109 ( item.element.parent( "optgroup" ).prop( "disabled" ) ? 14110 " ui-state-disabled" : 14111 "" ) ); 14112 14113 li.appendTo( ul ); 14114 14115 currentOptgroup = item.optgroup; 14116 } 14117 14118 that._renderItemData( ul, item ); 14119 } ); 14120 }, 14121 14122 _renderItemData: function( ul, item ) { 14123 return this._renderItem( ul, item ).data( "ui-selectmenu-item", item ); 14124 }, 14125 14126 _renderItem: function( ul, item ) { 14127 var li = $( "<li>" ), 14128 wrapper = $( "<div>", { 14129 title: item.element.attr( "title" ) 14130 } ); 14131 14132 if ( item.disabled ) { 14133 this._addClass( li, null, "ui-state-disabled" ); 14134 } 14135 this._setText( wrapper, item.label ); 14136 14137 return li.append( wrapper ).appendTo( ul ); 14138 }, 14139 14140 _setText: function( element, value ) { 14141 if ( value ) { 14142 element.text( value ); 14143 } else { 14144 element.html( " " ); 14145 } 14146 }, 14147 14148 _move: function( direction, event ) { 14149 var item, next, 14150 filter = ".ui-menu-item"; 14151 14152 if ( this.isOpen ) { 14153 item = this.menuItems.eq( this.focusIndex ).parent( "li" ); 14154 } else { 14155 item = this.menuItems.eq( this.element[ 0 ].selectedIndex ).parent( "li" ); 14156 filter += ":not(.ui-state-disabled)"; 14157 } 14158 14159 if ( direction === "first" || direction === "last" ) { 14160 next = item[ direction === "first" ? "prevAll" : "nextAll" ]( filter ).eq( -1 ); 14161 } else { 14162 next = item[ direction + "All" ]( filter ).eq( 0 ); 14163 } 14164 14165 if ( next.length ) { 14166 this.menuInstance.focus( event, next ); 14167 } 14168 }, 14169 14170 _getSelectedItem: function() { 14171 return this.menuItems.eq( this.element[ 0 ].selectedIndex ).parent( "li" ); 14172 }, 14173 14174 _toggle: function( event ) { 14175 this[ this.isOpen ? "close" : "open" ]( event ); 14176 }, 14177 14178 _setSelection: function() { 14179 var selection; 14180 14181 if ( !this.range ) { 14182 return; 14183 } 14184 14185 if ( window.getSelection ) { 14186 selection = window.getSelection(); 14187 selection.removeAllRanges(); 14188 selection.addRange( this.range ); 14189
14190 // Support: IE8 14191 } else { 14192 this.range.select(); 14193 } 14194 14195 // Support: IE 14196 // Setting the text selection kills the button focus in IE, but 14197 // restoring the focus doesn't kill the selection. 14198 this.button.focus(); 14199 }, 14200 14201 _documentClick: { 14202 mousedown: function( event ) { 14203 if ( !this.isOpen ) { 14204 return; 14205 } 14206 14207 if ( !$( event.target ).closest( ".ui-selectmenu-menu, #" + 14208 $.ui
vendor: 5,768 bytes, lines 14208-14452
14208.escapeSelector( this.ids.button ) ).length ) { 14209 this.close( event ); 14210 } 14211 } 14212 }, 14213 14214 _buttonEvents: { 14215 14216 // Prevent text selection from being reset when interacting with the selectmenu (#10144) 14217 mousedown: function() { 14218 var selection; 14219 14220 if ( window.getSelection ) { 14221 selection = window.getSelection(); 14222 if ( selection.rangeCount ) { 14223 this.range = selection.getRangeAt( 0 ); 14224 } 14225 14226 // Support: IE8 14227 } else { 14228 this.range = document.selection.createRange(); 14229 } 14230 }, 14231 14232 click: function( event ) { 14233 this._setSelection(); 14234 this._toggle( event ); 14235 }, 14236 14237 keydown: function( event ) { 14238 var preventDefault = true; 14239 switch ( event.keyCode ) { 14240 case $.ui.keyCode.TAB: 14241 case $.ui.keyCode.ESCAPE: 14242 this.close( event ); 14243 preventDefault = false; 14244 break; 14245 case $.ui.keyCode.ENTER: 14246 if ( this.isOpen ) { 14247 this._selectFocusedItem( event ); 14248 } 14249 break; 14250 case $.ui.keyCode.UP: 14251 if ( event.altKey ) { 14252 this._toggle( event ); 14253 } else { 14254 this._move( "prev", event ); 14255 } 14256 break; 14257 case $.ui.keyCode.DOWN: 14258 if ( event.altKey ) { 14259 this._toggle( event ); 14260 } else { 14261 this._move( "next", event ); 14262 } 14263 break; 14264 case $.ui.keyCode.SPACE: 14265 if ( this.isOpen ) { 14266 this._selectFocusedItem( event ); 14267 } else { 14268 this._toggle( event ); 14269 } 14270 break; 14271 case $.ui.keyCode.LEFT: 14272 this._move( "prev", event ); 14273 break; 14274 case $.ui.keyCode.RIGHT: 14275 this._move( "next", event ); 14276 break; 14277 case $.ui.keyCode.HOME: 14278 case $.ui.keyCode.PAGE_UP: 14279 this._move( "first", event ); 14280 break; 14281 case $.ui.keyCode.END: 14282 case $.ui.keyCode.PAGE_DOWN: 14283 this._move( "last", event ); 14284 break; 14285 default: 14286 this.menu.trigger( event ); 14287 preventDefault = false; 14288 } 14289 14290 if ( preventDefault ) { 14291 event.preventDefault(); 14292 } 14293 } 14294 }, 14295 14296 _selectFocusedItem: function( event ) { 14297 var item = this.menuItems.eq( this.focusIndex ).parent( "li" ); 14298 if ( !item.hasClass( "ui-state-disabled" ) ) { 14299 this._select( item.data( "ui-selectmenu-item" ), event ); 14300 } 14301 }, 14302 14303 _select: function( item, event ) { 14304 var oldIndex = this.element[ 0 ].selectedIndex; 14305 14306 // Change native select element 14307 this.element[ 0 ].selectedIndex = item.index; 14308 this.buttonItem.replaceWith( this.buttonItem = this._renderButtonItem( item ) ); 14309 this._setAria( item ); 14310 this._trigger( "select", event, { item: item } ); 14311 14312 if ( item.index !== oldIndex ) { 14313 this._trigger( "change", event, { item: item } ); 14314 } 14315 14316 this.close( event ); 14317 }, 14318 14319 _setAria: function( item ) { 14320 var id = this.menuItems.eq( item.index ).attr( "id" ); 14321 14322 this.button.attr( { 14323 "aria-labelledby": id, 14324 "aria-activedescendant": id 14325 } ); 14326 this.menu.attr( "aria-activedescendant", id ); 14327 }, 14328 14329 _setOption: function( key, value ) { 14330 if ( key === "icons" ) { 14331 var icon = this.button.find( "span.ui-icon" ); 14332 this._removeClass( icon, null, this.options.icons.button ) 14333 ._addClass( icon, null, value.button ); 14334 } 14335 14336 this._super( key, value ); 14337 14338 if ( key === "appendTo" ) { 14339 this.menuWrap.appendTo( this._appendTo() ); 14340 } 14341 14342 if ( key === "width" ) { 14343 this._resizeButton(); 14344 } 14345 }, 14346 14347 _setOptionDisabled: function( value ) { 14348 this._super( value ); 14349 14350 this.menuInstance.option( "disabled", value ); 14351 this.button.attr( "aria-disabled", value ); 14352 this._toggleClass( this.button, null, "ui-state-disabled", value ); 14353 14354 this.element.prop( "disabled", value ); 14355 if ( value ) { 14356 this.button.attr( "tabindex", -1 ); 14357 this.close(); 14358 } else { 14359 this.button.attr( "tabindex", 0 ); 14360 } 14361 }, 14362 14363 _appendTo: function() { 14364 var element = this.options.appendTo; 14365 14366 if ( element ) { 14367 element = element.jquery || element.nodeType ? 14368 $( element ) : 14369 this.document.find( element ).eq( 0 ); 14370 } 14371 14372 if ( !element || !element[ 0 ] ) { 14373 element = this.element.closest( ".ui-front, dialog" ); 14374 } 14375 14376 if ( !element.length ) { 14377 element = this.document[ 0 ].body; 14378 } 14379 14380 return element; 14381 }, 14382 14383 _toggleAttr: function() { 14384 this.button.attr( "aria-expanded", this.isOpen ); 14385 14386 // We can't use two _toggleClass() calls here, because we need to make sure 14387 // we always remove classes first and add them second, otherwise if both classes have the 14388 // same theme class, it will be removed after we add it. 14389 this._removeClass( this.button, "ui-selectmenu-button-" + 14390 ( this.isOpen ? "closed" : "open" ) ) 14391 ._addClass( this.button, "ui-selectmenu-button-" + 14392 ( this.isOpen ? "open" : "closed" ) ) 14393 ._toggleClass( this.menuWrap, "ui-selectmenu-open", null, this.isOpen ); 14394 14395 this.menu.attr( "aria-hidden", !this.isOpen ); 14396 }, 14397 14398 _resizeButton: function() { 14399 var width = this.options.width; 14400 14401 // For `width: false`, just remove inline style and stop 14402 if ( width === false ) { 14403 this.button.css( "width", "" ); 14404 return; 14405 } 14406 14407 // For `width: null`, match the width of the original element 14408 if ( width === null ) { 14409 width = this.element.show().outerWidth(); 14410 this.element.hide(); 14411 } 14412 14413 this.button.outerWidth( width ); 14414 }, 14415 14416 _resizeMenu: function() { 14417 this.menu.outerWidth( Math.max( 14418 this.button.outerWidth(), 14419 14420 // Support: IE10 14421 // IE10 wraps long text (possibly a rounding bug) 14422 // so we add 1px to avoid the wrapping 14423 this.menu.width( "" ).outerWidth() + 1 14424 ) ); 14425 }, 14426 14427 _getCreateOptions: function() { 14428 var options = this._super(); 14429 14430 options.disabled = this.element.prop( "disabled" ); 14431 14432 return options; 14433 }, 14434 14435 _parseOptions: function( options ) { 14436 var that = this, 14437 data = []; 14438 options.each( function( index, item ) { 14439 data.push( that._parseOption( $( item ), index ) ); 14440 } ); 14441 this.items = data; 14442 }, 14443 14444 _parseOption: function( option, index ) { 14445 var optgroup = option.parent( "optgroup" ); 14446 14447 return { 14448 element: option, 14449 index: index, 14450 value: option.val(), 14451 label: option.text(), 14452
vendor: 3,348 bytes, lines 14452-14586
14452optgroup: optgroup.attr( "label" ) || "", 14453 disabled: optgroup.prop( "disabled" ) || option.prop( "disabled" ) 14454 }; 14455 }, 14456 14457 _destroy: function() { 14458 this._unbindFormResetHandler(); 14459 this.menuWrap.remove(); 14460 this.button.remove(); 14461 this.element.show(); 14462 this.element.removeUniqueId(); 14463 this.labels.attr( "for", this.ids.element ); 14464 } 14465} ] ); 14466 14467 14468/*! 14469 * jQuery UI Slider 1.12.1 14470 * http://jqueryui.com 14471 * 14472 * Copyright jQuery Foundation and other contributors 14473 * Released under the MIT license. 14474 * http://jquery.org/license 14475 */ 14476 14477//>>label: Slider 14478//>>group: Widgets 14479//>>description: Displays a flexible slider with ranges and accessibility via keyboard. 14480//>>docs: http://api.jqueryui.com/slider/ 14481//>>demos: http://jqueryui.com/slider/ 14482//>>css.structure: ../../themes/base/core.css 14483//>>css.structure: ../../themes/base/slider.css 14484//>>css.theme: ../../themes/base/theme.css 14485 14486 14487 14488var widgetsSlider = $.widget( "ui.slider", $.ui.mouse, { 14489 version: "1.12.1", 14490 widgetEventPrefix: "slide", 14491 14492 options: { 14493 animate: false, 14494 classes: { 14495 "ui-slider": "ui-corner-all", 14496 "ui-slider-handle": "ui-corner-all", 14497 14498 // Note: ui-widget-header isn't the most fittingly semantic framework class for this 14499 // element, but worked best visually with a variety of themes 14500 "ui-slider-range": "ui-corner-all ui-widget-header" 14501 }, 14502 distance: 0, 14503 max: 100, 14504 min: 0, 14505 orientation: "horizontal", 14506 range: false, 14507 step: 1, 14508 value: 0, 14509 values: null, 14510 14511 // Callbacks 14512 change: null, 14513 slide: null, 14514 start: null, 14515 stop: null 14516 }, 14517 14518 // Number of pages in a slider 14519 // (how many times can you page up/down to go through the whole range) 14520 numPages: 5, 14521 14522 _create: function() { 14523 this._keySliding = false; 14524 this._mouseSliding = false; 14525 this._animateOff = true; 14526 this._handleIndex = null; 14527 this._detectOrientation(); 14528 this._mouseInit(); 14529 this._calculateNewMax(); 14530 14531 this._addClass( "ui-slider ui-slider-" + this.orientation, 14532 "ui-widget ui-widget-content" ); 14533 14534 this._refresh(); 14535 14536 this._animateOff = false; 14537 }, 14538 14539 _refresh: function() { 14540 this._createRange(); 14541 this._createHandles(); 14542 this._setupEvents(); 14543 this._refreshValue(); 14544 }, 14545 14546 _createHandles: function() { 14547 var i, handleCount, 14548 options = this.options, 14549 existingHandles = this.element.find( ".ui-slider-handle" ), 14550 handle = "<span tabindex='0'></span>", 14551 handles = []; 14552 14553 handleCount = ( options.values && options.values.length ) || 1; 14554 14555 if ( existingHandles.length > handleCount ) { 14556 existingHandles.slice( handleCount ).remove(); 14557 existingHandles = existingHandles.slice( 0, handleCount ); 14558 } 14559 14560 for ( i = existingHandles.length; i < handleCount; i++ ) { 14561 handles.push( handle ); 14562 } 14563 14564 this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) ); 14565 14566 this._addClass( this.handles, "ui-slider-handle", "ui-state-default" ); 14567 14568 this.handle = this.handles.eq( 0 ); 14569 14570 this.handles.each( function( i ) { 14571 $( this ) 14572 .data( "ui-slider-handle-index", i ) 14573 .attr( "tabIndex", 0 ); 14574 } ); 14575 }, 14576 14577 _createRange: function() { 14578 var options = this.options; 14579 14580 if ( options.range ) { 14581 if ( options.range === true ) { 14582 if ( !options.values ) { 14583 options.values = [ this._valueMin(), this._valueMin() ]; 14584 } else if ( options.values.length && options.values.length !== 2 ) { 14585 options.values = [ options.values[ 0 ], options.values[ 0 ] ]; 14586 } else if ( $
vendor: 6,653 bytes, lines 14586-14849
14586.isArray( options.values ) ) { 14587 options.values = options.values.slice( 0 ); 14588 } 14589 } 14590 14591 if ( !this.range || !this.range.length ) { 14592 this.range = $( "<div>" ) 14593 .appendTo( this.element ); 14594 14595 this._addClass( this.range, "ui-slider-range" ); 14596 } else { 14597 this._removeClass( this.range, "ui-slider-range-min ui-slider-range-max" ); 14598 14599 // Handle range switching from true to min/max 14600 this.range.css( { 14601 "left": "", 14602 "bottom": "" 14603 } ); 14604 } 14605 if ( options.range === "min" || options.range === "max" ) { 14606 this._addClass( this.range, "ui-slider-range-" + options.range ); 14607 } 14608 } else { 14609 if ( this.range ) { 14610 this.range.remove(); 14611 } 14612 this.range = null; 14613 } 14614 }, 14615 14616 _setupEvents: function() { 14617 this._off( this.handles ); 14618 this._on( this.handles, this._handleEvents ); 14619 this._hoverable( this.handles ); 14620 this._focusable( this.handles ); 14621 }, 14622 14623 _destroy: function() { 14624 this.handles.remove(); 14625 if ( this.range ) { 14626 this.range.remove(); 14627 } 14628 14629 this._mouseDestroy(); 14630 }, 14631 14632 _mouseCapture: function( event ) { 14633 var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle, 14634 that = this, 14635 o = this.options; 14636 14637 if ( o.disabled ) { 14638 return false; 14639 } 14640 14641 this.elementSize = { 14642 width: this.element.outerWidth(), 14643 height: this.element.outerHeight() 14644 }; 14645 this.elementOffset = this.element.offset(); 14646 14647 position = { x: event.pageX, y: event.pageY }; 14648 normValue = this._normValueFromMouse( position ); 14649 distance = this._valueMax() - this._valueMin() + 1; 14650 this.handles.each( function( i ) { 14651 var thisDistance = Math.abs( normValue - that.values( i ) ); 14652 if ( ( distance > thisDistance ) || 14653 ( distance === thisDistance && 14654 ( i === that._lastChangedValue || that.values( i ) === o.min ) ) ) { 14655 distance = thisDistance; 14656 closestHandle = $( this ); 14657 index = i; 14658 } 14659 } ); 14660 14661 allowed = this._start( event, index ); 14662 if ( allowed === false ) { 14663 return false; 14664 } 14665 this._mouseSliding = true; 14666 14667 this._handleIndex = index; 14668 14669 this._addClass( closestHandle, null, "ui-state-active" ); 14670 closestHandle.trigger( "focus" ); 14671 14672 offset = closestHandle.offset(); 14673 mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" ); 14674 this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : { 14675 left: event.pageX - offset.left - ( closestHandle.width() / 2 ), 14676 top: event.pageY - offset.top - 14677 ( closestHandle.height() / 2 ) - 14678 ( parseInt( closestHandle.css( "borderTopWidth" ), 10 ) || 0 ) - 14679 ( parseInt( closestHandle.css( "borderBottomWidth" ), 10 ) || 0 ) + 14680 ( parseInt( closestHandle.css( "marginTop" ), 10 ) || 0 ) 14681 }; 14682 14683 if ( !this.handles.hasClass( "ui-state-hover" ) ) { 14684 this._slide( event, index, normValue ); 14685 } 14686 this._animateOff = true; 14687 return true; 14688 }, 14689 14690 _mouseStart: function() { 14691 return true; 14692 }, 14693 14694 _mouseDrag: function( event ) { 14695 var position = { x: event.pageX, y: event.pageY }, 14696 normValue = this._normValueFromMouse( position ); 14697 14698 this._slide( event, this._handleIndex, normValue ); 14699 14700 return false; 14701 }, 14702 14703 _mouseStop: function( event ) { 14704 this._removeClass( this.handles, null, "ui-state-active" ); 14705 this._mouseSliding = false; 14706 14707 this._stop( event, this._handleIndex ); 14708 this._change( event, this._handleIndex ); 14709 14710 this._handleIndex = null; 14711 this._clickOffset = null; 14712 this._animateOff = false; 14713 14714 return false; 14715 }, 14716 14717 _detectOrientation: function() { 14718 this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal"; 14719 }, 14720 14721 _normValueFromMouse: function( position ) { 14722 var pixelTotal, 14723 pixelMouse, 14724 percentMouse, 14725 valueTotal, 14726 valueMouse; 14727 14728 if ( this.orientation === "horizontal" ) { 14729 pixelTotal = this.elementSize.width; 14730 pixelMouse = position.x - this.elementOffset.left - 14731 ( this._clickOffset ? this._clickOffset.left : 0 ); 14732 } else { 14733 pixelTotal = this.elementSize.height; 14734 pixelMouse = position.y - this.elementOffset.top - 14735 ( this._clickOffset ? this._clickOffset.top : 0 ); 14736 } 14737 14738 percentMouse = ( pixelMouse / pixelTotal ); 14739 if ( percentMouse > 1 ) { 14740 percentMouse = 1; 14741 } 14742 if ( percentMouse < 0 ) { 14743 percentMouse = 0; 14744 } 14745 if ( this.orientation === "vertical" ) { 14746 percentMouse = 1 - percentMouse; 14747 } 14748 14749 valueTotal = this._valueMax() - this._valueMin(); 14750 valueMouse = this._valueMin() + percentMouse * valueTotal; 14751 14752 return this._trimAlignValue( valueMouse ); 14753 }, 14754 14755 _uiHash: function( index, value, values ) { 14756 var uiHash = { 14757 handle: this.handles[ index ], 14758 handleIndex: index, 14759 value: value !== undefined ? value : this.value() 14760 }; 14761 14762 if ( this._hasMultipleValues() ) { 14763 uiHash.value = value !== undefined ? value : this.values( index ); 14764 uiHash.values = values || this.values(); 14765 } 14766 14767 return uiHash; 14768 }, 14769 14770 _hasMultipleValues: function() { 14771 return this.options.values && this.options.values.length; 14772 }, 14773 14774 _start: function( event, index ) { 14775 return this._trigger( "start", event, this._uiHash( index ) ); 14776 }, 14777 14778 _slide: function( event, index, newVal ) { 14779 var allowed, otherVal, 14780 currentValue = this.value(), 14781 newValues = this.values(); 14782 14783 if ( this._hasMultipleValues() ) { 14784 otherVal = this.values( index ? 0 : 1 ); 14785 currentValue = this.values( index ); 14786 14787 if ( this.options.values.length === 2 && this.options.range === true ) { 14788 newVal = index === 0 ? Math.min( otherVal, newVal ) : Math.max( otherVal, newVal ); 14789 } 14790 14791 newValues[ index ] = newVal; 14792 } 14793 14794 if ( newVal === currentValue ) { 14795 return; 14796 } 14797 14798 allowed = this._trigger( "slide", event, this._uiHash( index, newVal, newValues ) ); 14799 14800 // A slide can be canceled by returning false from the slide callback 14801 if ( allowed === false ) { 14802 return; 14803 } 14804 14805 if ( this._hasMultipleValues() ) { 14806 this.values( index, newVal ); 14807 } else { 14808 this.value( newVal ); 14809 } 14810 }, 14811 14812 _stop: function( event, index ) { 14813 this._trigger( "stop", event, this._uiHash( index ) ); 14814 }, 14815 14816 _change: function( event, index ) { 14817 if ( !this._keySliding && !this._mouseSliding ) { 14818 14819 //store the last changed value index for reference when handles overlap 14820 this._lastChangedValue = index; 14821 this._trigger( "change", event, this._uiHash( index ) ); 14822 } 14823 }, 14824 14825 value: function( newValue ) { 14826 if ( arguments.length ) { 14827 this.options.value = this._trimAlignValue( newValue ); 14828 this._refreshValue(); 14829 this._change( null, 0 ); 14830 return; 14831 } 14832 14833 return this._value(); 14834 }, 14835 14836 values: function( index, newValue ) { 14837 var vals, 14838 newValues, 14839 i; 14840 14841 if ( arguments.length > 1 ) { 14842 this.options.values[ index ] = this._trimAlignValue( newValue ); 14843 this._refreshValue(); 14844 this._change( null, index ); 14845 return; 14846 } 14847 14848 if ( arguments.length ) { 14849 if (
vendor: 829 bytes, lines 14849-14883
14849$.isArray( arguments[ 0 ] ) ) { 14850 vals = this.options.values; 14851 newValues = arguments[ 0 ]; 14852 for ( i = 0; i < vals.length; i += 1 ) { 14853 vals[ i ] = this._trimAlignValue( newValues[ i ] ); 14854 this._change( null, i ); 14855 } 14856 this._refreshValue(); 14857 } else { 14858 if ( this._hasMultipleValues() ) { 14859 return this._values( index ); 14860 } else { 14861 return this.value(); 14862 } 14863 } 14864 } else { 14865 return this._values(); 14866 } 14867 }, 14868 14869 _setOption: function( key, value ) { 14870 var i, 14871 valsLength = 0; 14872 14873 if ( key === "range" && this.options.range === true ) { 14874 if ( value === "min" ) { 14875 this.options.value = this._values( 0 ); 14876 this.options.values = null; 14877 } else if ( value === "max" ) { 14878 this.options.value = this._values( this.options.values.length - 1 ); 14879 this.options.values = null; 14880 } 14881 } 14882 14883 if ( $
vendor: 8,805 bytes, lines 14883-15205
14883.isArray( this.options.values ) ) { 14884 valsLength = this.options.values.length; 14885 } 14886 14887 this._super( key, value ); 14888 14889 switch ( key ) { 14890 case "orientation": 14891 this._detectOrientation(); 14892 this._removeClass( "ui-slider-horizontal ui-slider-vertical" ) 14893 ._addClass( "ui-slider-" + this.orientation ); 14894 this._refreshValue(); 14895 if ( this.options.range ) { 14896 this._refreshRange( value ); 14897 } 14898 14899 // Reset positioning from previous orientation 14900 this.handles.css( value === "horizontal" ? "bottom" : "left", "" ); 14901 break; 14902 case "value": 14903 this._animateOff = true; 14904 this._refreshValue(); 14905 this._change( null, 0 ); 14906 this._animateOff = false; 14907 break; 14908 case "values": 14909 this._animateOff = true; 14910 this._refreshValue(); 14911 14912 // Start from the last handle to prevent unreachable handles (#9046) 14913 for ( i = valsLength - 1; i >= 0; i-- ) { 14914 this._change( null, i ); 14915 } 14916 this._animateOff = false; 14917 break; 14918 case "step": 14919 case "min": 14920 case "max": 14921 this._animateOff = true; 14922 this._calculateNewMax(); 14923 this._refreshValue(); 14924 this._animateOff = false; 14925 break; 14926 case "range": 14927 this._animateOff = true; 14928 this._refresh(); 14929 this._animateOff = false; 14930 break; 14931 } 14932 }, 14933 14934 _setOptionDisabled: function( value ) { 14935 this._super( value ); 14936 14937 this._toggleClass( null, "ui-state-disabled", !!value ); 14938 }, 14939 14940 //internal value getter 14941 // _value() returns value trimmed by min and max, aligned by step 14942 _value: function() { 14943 var val = this.options.value; 14944 val = this._trimAlignValue( val ); 14945 14946 return val; 14947 }, 14948 14949 //internal values getter 14950 // _values() returns array of values trimmed by min and max, aligned by step 14951 // _values( index ) returns single value trimmed by min and max, aligned by step 14952 _values: function( index ) { 14953 var val, 14954 vals, 14955 i; 14956 14957 if ( arguments.length ) { 14958 val = this.options.values[ index ]; 14959 val = this._trimAlignValue( val ); 14960 14961 return val; 14962 } else if ( this._hasMultipleValues() ) { 14963 14964 // .slice() creates a copy of the array 14965 // this copy gets trimmed by min and max and then returned 14966 vals = this.options.values.slice(); 14967 for ( i = 0; i < vals.length; i += 1 ) { 14968 vals[ i ] = this._trimAlignValue( vals[ i ] ); 14969 } 14970 14971 return vals; 14972 } else { 14973 return []; 14974 } 14975 }, 14976 14977 // Returns the step-aligned value that val is closest to, between (inclusive) min and max 14978 _trimAlignValue: function( val ) { 14979 if ( val <= this._valueMin() ) { 14980 return this._valueMin(); 14981 } 14982 if ( val >= this._valueMax() ) { 14983 return this._valueMax(); 14984 } 14985 var step = ( this.options.step > 0 ) ? this.options.step : 1, 14986 valModStep = ( val - this._valueMin() ) % step, 14987 alignValue = val - valModStep; 14988 14989 if ( Math.abs( valModStep ) * 2 >= step ) { 14990 alignValue += ( valModStep > 0 ) ? step : ( -step ); 14991 } 14992 14993 // Since JavaScript has problems with large floats, round 14994 // the final value to 5 digits after the decimal point (see #4124) 14995 return parseFloat( alignValue.toFixed( 5 ) ); 14996 }, 14997 14998 _calculateNewMax: function() { 14999 var max = this.options.max, 15000 min = this._valueMin(), 15001 step = this.options.step, 15002 aboveMin = Math.round( ( max - min ) / step ) * step; 15003 max = aboveMin + min; 15004 if ( max > this.options.max ) { 15005 15006 //If max is not divisible by step, rounding off may increase its value 15007 max -= step; 15008 } 15009 this.max = parseFloat( max.toFixed( this._precision() ) ); 15010 }, 15011 15012 _precision: function() { 15013 var precision = this._precisionOf( this.options.step ); 15014 if ( this.options.min !== null ) { 15015 precision = Math.max( precision, this._precisionOf( this.options.min ) ); 15016 } 15017 return precision; 15018 }, 15019 15020 _precisionOf: function( num ) { 15021 var str = num.toString(), 15022 decimal = str.indexOf( "." ); 15023 return decimal === -1 ? 0 : str.length - decimal - 1; 15024 }, 15025 15026 _valueMin: function() { 15027 return this.options.min; 15028 }, 15029 15030 _valueMax: function() { 15031 return this.max; 15032 }, 15033 15034 _refreshRange: function( orientation ) { 15035 if ( orientation === "vertical" ) { 15036 this.range.css( { "width": "", "left": "" } ); 15037 } 15038 if ( orientation === "horizontal" ) { 15039 this.range.css( { "height": "", "bottom": "" } ); 15040 } 15041 }, 15042 15043 _refreshValue: function() { 15044 var lastValPercent, valPercent, value, valueMin, valueMax, 15045 oRange = this.options.range, 15046 o = this.options, 15047 that = this, 15048 animate = ( !this._animateOff ) ? o.animate : false, 15049 _set = {}; 15050 15051 if ( this._hasMultipleValues() ) { 15052 this.handles.each( function( i ) { 15053 valPercent = ( that.values( i ) - that._valueMin() ) / ( that._valueMax() - 15054 that._valueMin() ) * 100; 15055 _set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%"; 15056 $( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate ); 15057 if ( that.options.range === true ) { 15058 if ( that.orientation === "horizontal" ) { 15059 if ( i === 0 ) { 15060 that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 15061 left: valPercent + "%" 15062 }, o.animate ); 15063 } 15064 if ( i === 1 ) { 15065 that.range[ animate ? "animate" : "css" ]( { 15066 width: ( valPercent - lastValPercent ) + "%" 15067 }, { 15068 queue: false, 15069 duration: o.animate 15070 } ); 15071 } 15072 } else { 15073 if ( i === 0 ) { 15074 that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 15075 bottom: ( valPercent ) + "%" 15076 }, o.animate ); 15077 } 15078 if ( i === 1 ) { 15079 that.range[ animate ? "animate" : "css" ]( { 15080 height: ( valPercent - lastValPercent ) + "%" 15081 }, { 15082 queue: false, 15083 duration: o.animate 15084 } ); 15085 } 15086 } 15087 } 15088 lastValPercent = valPercent; 15089 } ); 15090 } else { 15091 value = this.value(); 15092 valueMin = this._valueMin(); 15093 valueMax = this._valueMax(); 15094 valPercent = ( valueMax !== valueMin ) ? 15095 ( value - valueMin ) / ( valueMax - valueMin ) * 100 : 15096 0; 15097 _set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%"; 15098 this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate ); 15099 15100 if ( oRange === "min" && this.orientation === "horizontal" ) { 15101 this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 15102 width: valPercent + "%" 15103 }, o.animate ); 15104 } 15105 if ( oRange === "max" && this.orientation === "horizontal" ) { 15106 this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 15107 width: ( 100 - valPercent ) + "%" 15108 }, o.animate ); 15109 } 15110 if ( oRange === "min" && this.orientation === "vertical" ) { 15111 this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 15112 height: valPercent + "%" 15113 }, o.animate ); 15114 } 15115 if ( oRange === "max" && this.orientation === "vertical" ) { 15116 this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 15117 height: ( 100 - valPercent ) + "%" 15118 }, o.animate ); 15119 } 15120 } 15121 }, 15122 15123 _handleEvents: { 15124 keydown: function( event ) { 15125 var allowed, curVal, newVal, step, 15126 index = $( event.target ).data( "ui-slider-handle-index" ); 15127 15128 switch ( event.keyCode ) { 15129 case $.ui.keyCode.HOME: 15130 case $.ui.keyCode.END: 15131 case $.ui.keyCode.PAGE_UP: 15132 case $.ui.keyCode.PAGE_DOWN: 15133 case $.ui.keyCode.UP: 15134 case $.ui.keyCode.RIGHT: 15135 case $.ui.keyCode.DOWN: 15136 case $.ui.keyCode.LEFT: 15137 event.preventDefault(); 15138 if ( !this._keySliding ) { 15139 this._keySliding = true; 15140 this._addClass( $( event.target ), null, "ui-state-active" ); 15141 allowed = this._start( event, index ); 15142 if ( allowed === false ) { 15143 return; 15144 } 15145 } 15146 break; 15147 } 15148 15149 step = this.options.step; 15150 if ( this._hasMultipleValues() ) { 15151 curVal = newVal = this.values( index ); 15152 } else { 15153 curVal = newVal = this.value(); 15154 } 15155 15156 switch ( event.keyCode ) { 15157 case $.ui.keyCode.HOME: 15158 newVal = this._valueMin(); 15159 break; 15160 case $.ui.keyCode.END: 15161 newVal = this._valueMax(); 15162 break; 15163 case $.ui.keyCode.PAGE_UP: 15164 newVal = this._trimAlignValue( 15165 curVal + ( ( this._valueMax() - this._valueMin() ) / this.numPages ) 15166 ); 15167 break; 15168 case $.ui.keyCode.PAGE_DOWN: 15169 newVal = this._trimAlignValue( 15170 curVal - ( ( this._valueMax() - this._valueMin() ) / this.numPages ) ); 15171 break; 15172 case $.ui.keyCode.UP: 15173 case $.ui.keyCode.RIGHT: 15174 if ( curVal === this._valueMax() ) { 15175 return; 15176 } 15177 newVal = this._trimAlignValue( curVal + step ); 15178 break; 15179 case $.ui.keyCode.DOWN: 15180 case $.ui.keyCode.LEFT: 15181 if ( curVal === this._valueMin() ) { 15182 return; 15183 } 15184 newVal = this._trimAlignValue( curVal - step ); 15185 break; 15186 } 15187 15188 this._slide( event, index, newVal ); 15189 }, 15190 keyup: function( event ) { 15191 var index = $( event.target ).data( "ui-slider-handle-index" ); 15192 15193 if ( this._keySliding ) { 15194 this._keySliding = false; 15195 this._stop( event, index ); 15196 this._change( event, index ); 15197 this._removeClass( $( event.target ), null, "ui-state-active" ); 15198 } 15199 } 15200 } 15201} ); 15202 15203 15204/*! 15205 * jQuery UI Sortable 1.1
vendor: 3,492 bytes, lines 15205-15362
152052.1 15206 * http://jqueryui.com 15207 * 15208 * Copyright jQuery Foundation and other contributors 15209 * Released under the MIT license. 15210 * http://jquery.org/license 15211 */ 15212 15213//>>label: Sortable 15214//>>group: Interactions 15215//>>description: Enables items in a list to be sorted using the mouse. 15216//>>docs: http://api.jqueryui.com/sortable/ 15217//>>demos: http://jqueryui.com/sortable/ 15218//>>css.structure: ../../themes/base/sortable.css 15219 15220 15221 15222var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { 15223 version: "1.12.1", 15224 widgetEventPrefix: "sort", 15225 ready: false, 15226 options: { 15227 appendTo: "parent", 15228 axis: false, 15229 connectWith: false, 15230 containment: false, 15231 cursor: "auto", 15232 cursorAt: false, 15233 dropOnEmpty: true, 15234 forcePlaceholderSize: false, 15235 forceHelperSize: false, 15236 grid: false, 15237 handle: false, 15238 helper: "original", 15239 items: "> *", 15240 opacity: false, 15241 placeholder: false, 15242 revert: false, 15243 scroll: true, 15244 scrollSensitivity: 20, 15245 scrollSpeed: 20, 15246 scope: "default", 15247 tolerance: "intersect", 15248 zIndex: 1000, 15249 15250 // Callbacks 15251 activate: null, 15252 beforeStop: null, 15253 change: null, 15254 deactivate: null, 15255 out: null, 15256 over: null, 15257 receive: null, 15258 remove: null, 15259 sort: null, 15260 start: null, 15261 stop: null, 15262 update: null 15263 }, 15264 15265 _isOverAxis: function( x, reference, size ) { 15266 return ( x >= reference ) && ( x < ( reference + size ) ); 15267 }, 15268 15269 _isFloating: function( item ) { 15270 return ( /left|right/ ).test( item.css( "float" ) ) || 15271 ( /inline|table-cell/ ).test( item.css( "display" ) ); 15272 }, 15273 15274 _create: function() { 15275 this.containerCache = {}; 15276 this._addClass( "ui-sortable" ); 15277 15278 //Get the items 15279 this.refresh(); 15280 15281 //Let's determine the parent's offset 15282 this.offset = this.element.offset(); 15283 15284 //Initialize mouse events for interaction 15285 this._mouseInit(); 15286 15287 this._setHandleClassName(); 15288 15289 //We're ready to go 15290 this.ready = true; 15291 15292 }, 15293 15294 _setOption: function( key, value ) { 15295 this._super( key, value ); 15296 15297 if ( key === "handle" ) { 15298 this._setHandleClassName(); 15299 } 15300 }, 15301 15302 _setHandleClassName: function() { 15303 var that = this; 15304 this._removeClass( this.element.find( ".ui-sortable-handle" ), "ui-sortable-handle" ); 15305 $.each( this.items, function() { 15306 that._addClass( 15307 this.instance.options.handle ? 15308 this.item.find( this.instance.options.handle ) : 15309 this.item, 15310 "ui-sortable-handle" 15311 ); 15312 } ); 15313 }, 15314 15315 _destroy: function() { 15316 this._mouseDestroy(); 15317 15318 for ( var i = this.items.length - 1; i >= 0; i-- ) { 15319 this.items[ i ].item.removeData( this.widgetName + "-item" ); 15320 } 15321 15322 return this; 15323 }, 15324 15325 _mouseCapture: function( event, overrideHandle ) { 15326 var currentItem = null, 15327 validHandle = false, 15328 that = this; 15329 15330 if ( this.reverting ) { 15331 return false; 15332 } 15333 15334 if ( this.options.disabled || this.options.type === "static" ) { 15335 return false; 15336 } 15337 15338 //We have to refresh the items data once first 15339 this._refreshItems( event ); 15340 15341 //Find out if the clicked node (or one of its parents) is a actual item in this.items 15342 $( event.target ).parents().each( function() { 15343 if ( $.data( this, that.widgetName + "-item" ) === that ) { 15344 currentItem = $( this ); 15345 return false; 15346 } 15347 } ); 15348 if ( $.data( event.target, that.widgetName + "-item" ) === that ) { 15349 currentItem = $( event.target ); 15350 } 15351 15352 if ( !currentItem ) { 15353 return false; 15354 } 15355 if ( this.options.handle && !overrideHandle ) { 15356 $( this.options.handle, currentItem ).find( "*" ).addBack().each( function() { 15357 if ( this === event.target ) { 15358 validHandle = true; 15359 } 15360 } ); 15361 if ( !validHandle ) { 15362 return false;
vendor: 4,350 bytes, lines 15363-15521
15363 } 15364 } 15365 15366 this.currentItem = currentItem; 15367 this._removeCurrentsFromItems(); 15368 return true; 15369 15370 }, 15371 15372 _mouseStart: function( event, overrideHandle, noActivation ) { 15373 15374 var i, body, 15375 o = this.options; 15376 15377 this.currentContainer = this; 15378 15379 //We only need to call refreshPositions, because the refreshItems call has been moved to 15380 // mouseCapture 15381 this.refreshPositions(); 15382 15383 //Create and append the visible helper 15384 this.helper = this._createHelper( event ); 15385 15386 //Cache the helper size 15387 this._cacheHelperProportions(); 15388 15389 /* 15390 * - Position generation - 15391 * This block generates everything position related - it's the core of draggables. 15392 */ 15393 15394 //Cache the margins of the original element 15395 this._cacheMargins(); 15396 15397 //Get the next scrolling parent 15398 this.scrollParent = this.helper.scrollParent(); 15399 15400 //The element's absolute position on the page minus margins 15401 this.offset = this.currentItem.offset(); 15402 this.offset = { 15403 top: this.offset.top - this.margins.top, 15404 left: this.offset.left - this.margins.left 15405 }; 15406 15407 $.extend( this.offset, { 15408 click: { //Where the click happened, relative to the element 15409 left: event.pageX - this.offset.left, 15410 top: event.pageY - this.offset.top 15411 }, 15412 parent: this._getParentOffset(), 15413 15414 // This is a relative to absolute position minus the actual position calculation - 15415 // only used for relative positioned helper 15416 relative: this._getRelativeOffset() 15417 } ); 15418 15419 // Only after we got the offset, we can change the helper's position to absolute 15420 // TODO: Still need to figure out a way to make relative sorting possible 15421 this.helper.css( "position", "absolute" ); 15422 this.cssPosition = this.helper.css( "position" ); 15423 15424 //Generate the original position 15425 this.originalPosition = this._generatePosition( event ); 15426 this.originalPageX = event.pageX; 15427 this.originalPageY = event.pageY; 15428 15429 //Adjust the mouse offset relative to the helper if "cursorAt" is supplied 15430 ( o.cursorAt && this._adjustOffsetFromHelper( o.cursorAt ) ); 15431 15432 //Cache the former DOM position 15433 this.domPosition = { 15434 prev: this.currentItem.prev()[ 0 ], 15435 parent: this.currentItem.parent()[ 0 ] 15436 }; 15437 15438 // If the helper is not the original, hide the original so it's not playing any role during 15439 // the drag, won't cause anything bad this way 15440 if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) { 15441 this.currentItem.hide(); 15442 } 15443 15444 //Create the placeholder 15445 this._createPlaceholder(); 15446 15447 //Set a containment if given in the options 15448 if ( o.containment ) { 15449 this._setContainment(); 15450 } 15451 15452 if ( o.cursor && o.cursor !== "auto" ) { // cursor option 15453 body = this.document.find( "body" ); 15454 15455 // Support: IE 15456 this.storedCursor = body.css( "cursor" ); 15457 body.css( "cursor", o.cursor ); 15458 15459 this.storedStylesheet = 15460 $( "<style>*{ cursor: " + o.cursor + " !important; }</style>" ).appendTo( body ); 15461 } 15462 15463 if ( o.opacity ) { // opacity option 15464 if ( this.helper.css( "opacity" ) ) { 15465 this._storedOpacity = this.helper.css( "opacity" ); 15466 } 15467 this.helper.css( "opacity", o.opacity ); 15468 } 15469 15470 if ( o.zIndex ) { // zIndex option 15471 if ( this.helper.css( "zIndex" ) ) { 15472 this._storedZIndex = this.helper.css( "zIndex" ); 15473 } 15474 this.helper.css( "zIndex", o.zIndex ); 15475 } 15476 15477 //Prepare scrolling 15478 if ( this.scrollParent[ 0 ] !== this.document[ 0 ] && 15479 this.scrollParent[ 0 ].tagName !== "HTML" ) { 15480 this.overflowOffset = this.scrollParent.offset(); 15481 } 15482 15483 //Call callbacks 15484 this._trigger( "start", event, this._uiHash() ); 15485 15486 //Recache the helper size 15487 if ( !this._preserveHelperProportions ) { 15488 this._cacheHelperProportions(); 15489 } 15490 15491 //Post "activate" events to possible containers 15492 if ( !noActivation ) { 15493 for ( i = this.containers.length - 1; i >= 0; i-- ) { 15494 this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) ); 15495 } 15496 } 15497 15498 //Prepare possible droppables 15499 if ( $.ui.ddmanager ) { 15500 $.ui.ddmanager.current = this; 15501 } 15502 15503 if ( $.ui.ddmanager && !o.dropBehaviour ) { 15504 $.ui.ddmanager.prepareOffsets( this, event ); 15505 } 15506 15507 this.dragging = true; 15508 15509 this._addClass( this.helper, "ui-sortable-helper" ); 15510 15511 // Execute the drag once - this causes the helper not to be visiblebefore getting its 15512 // correct position 15513 this._mouseDrag( event ); 15514 return true; 15515 15516 }, 15517 15518 _mouseDrag: function( event ) { 15519 var i, item, itemElement, intersection, 15520 o = this.options, 15521 scrolled = false;
vendor: 3,877 bytes, lines 15522-15628
15522 15523 //Compute the helpers position 15524 this.position = this._generatePosition( event ); 15525 this.positionAbs = this._convertPositionTo( "absolute" ); 15526 15527 if ( !this.lastPositionAbs ) { 15528 this.lastPositionAbs = this.positionAbs; 15529 } 15530 15531 //Do scrolling 15532 if ( this.options.scroll ) { 15533 if ( this.scrollParent[ 0 ] !== this.document[ 0 ] && 15534 this.scrollParent[ 0 ].tagName !== "HTML" ) { 15535 15536 if ( ( this.overflowOffset.top + this.scrollParent[ 0 ].offsetHeight ) - 15537 event.pageY < o.scrollSensitivity ) { 15538 this.scrollParent[ 0 ].scrollTop = 15539 scrolled = this.scrollParent[ 0 ].scrollTop + o.scrollSpeed; 15540 } else if ( event.pageY - this.overflowOffset.top < o.scrollSensitivity ) { 15541 this.scrollParent[ 0 ].scrollTop = 15542 scrolled = this.scrollParent[ 0 ].scrollTop - o.scrollSpeed; 15543 } 15544 15545 if ( ( this.overflowOffset.left + this.scrollParent[ 0 ].offsetWidth ) - 15546 event.pageX < o.scrollSensitivity ) { 15547 this.scrollParent[ 0 ].scrollLeft = scrolled = 15548 this.scrollParent[ 0 ].scrollLeft + o.scrollSpeed; 15549 } else if ( event.pageX - this.overflowOffset.left < o.scrollSensitivity ) { 15550 this.scrollParent[ 0 ].scrollLeft = scrolled = 15551 this.scrollParent[ 0 ].scrollLeft - o.scrollSpeed; 15552 } 15553 15554 } else { 15555 15556 if ( event.pageY - this.document.scrollTop() < o.scrollSensitivity ) { 15557 scrolled = this.document.scrollTop( this.document.scrollTop() - o.scrollSpeed ); 15558 } else if ( this.window.height() - ( event.pageY - this.document.scrollTop() ) < 15559 o.scrollSensitivity ) { 15560 scrolled = this.document.scrollTop( this.document.scrollTop() + o.scrollSpeed ); 15561 } 15562 15563 if ( event.pageX - this.document.scrollLeft() < o.scrollSensitivity ) { 15564 scrolled = this.document.scrollLeft( 15565 this.document.scrollLeft() - o.scrollSpeed 15566 ); 15567 } else if ( this.window.width() - ( event.pageX - this.document.scrollLeft() ) < 15568 o.scrollSensitivity ) { 15569 scrolled = this.document.scrollLeft( 15570 this.document.scrollLeft() + o.scrollSpeed 15571 ); 15572 } 15573 15574 } 15575 15576 if ( scrolled !== false && $.ui.ddmanager && !o.dropBehaviour ) { 15577 $.ui.ddmanager.prepareOffsets( this, event ); 15578 } 15579 } 15580 15581 //Regenerate the absolute position used for position checks 15582 this.positionAbs = this._convertPositionTo( "absolute" ); 15583 15584 //Set the helper position 15585 if ( !this.options.axis || this.options.axis !== "y" ) { 15586 this.helper[ 0 ].style.left = this.position.left + "px"; 15587 } 15588 if ( !this.options.axis || this.options.axis !== "x" ) { 15589 this.helper[ 0 ].style.top = this.position.top + "px"; 15590 } 15591 15592 //Rearrange 15593 for ( i = this.items.length - 1; i >= 0; i-- ) { 15594 15595 //Cache variables and intersection, continue if no intersection 15596 item = this.items[ i ]; 15597 itemElement = item.item[ 0 ]; 15598 intersection = this._intersectsWithPointer( item ); 15599 if ( !intersection ) { 15600 continue; 15601 } 15602 15603 // Only put the placeholder inside the current Container, skip all 15604 // items from other containers. This works because when moving 15605 // an item from one container to another the 15606 // currentContainer is switched before the placeholder is moved. 15607 // 15608 // Without this, moving items in "sub-sortables" can cause 15609 // the placeholder to jitter between the outer and inner container. 15610 if ( item.instance !== this.currentContainer ) { 15611 continue; 15612 } 15613 15614 // Cannot intersect with itself 15615 // no useless actions that have been done before 15616 // no action if the item moved is the parent of the item checked 15617 if ( itemElement !== this.currentItem[ 0 ] && 15618 this.placeholder[ intersection === 1 ? "next" : "prev" ]()[ 0 ] !== itemElement && 15619 !$.contains( this.placeholder[ 0 ], itemElement ) && 15620 ( this.options.type === "semi-dynamic" ? 15621 !$.contains( this.element[ 0 ], itemElement ) : 15622 true 15623 ) 15624 ) { 15625 15626 this.direction = intersection === 1 ? "down" : "up"; 15627 15628 if ( this.options.tolerance === "pointer" ||
vendor: 5,576 bytes, lines 15628-15844
15628this._intersectsWithSides( item ) ) { 15629 this._rearrange( event, item ); 15630 } else { 15631 break; 15632 } 15633 15634 this._trigger( "change", event, this._uiHash() ); 15635 break; 15636 } 15637 } 15638 15639 //Post events to containers 15640 this._contactContainers( event ); 15641 15642 //Interconnect with droppables 15643 if ( $.ui.ddmanager ) { 15644 $.ui.ddmanager.drag( this, event ); 15645 } 15646 15647 //Call callbacks 15648 this._trigger( "sort", event, this._uiHash() ); 15649 15650 this.lastPositionAbs = this.positionAbs; 15651 return false; 15652 15653 }, 15654 15655 _mouseStop: function( event, noPropagation ) { 15656 15657 if ( !event ) { 15658 return; 15659 } 15660 15661 //If we are using droppables, inform the manager about the drop 15662 if ( $.ui.ddmanager && !this.options.dropBehaviour ) { 15663 $.ui.ddmanager.drop( this, event ); 15664 } 15665 15666 if ( this.options.revert ) { 15667 var that = this, 15668 cur = this.placeholder.offset(), 15669 axis = this.options.axis, 15670 animation = {}; 15671 15672 if ( !axis || axis === "x" ) { 15673 animation.left = cur.left - this.offset.parent.left - this.margins.left + 15674 ( this.offsetParent[ 0 ] === this.document[ 0 ].body ? 15675 0 : 15676 this.offsetParent[ 0 ].scrollLeft 15677 ); 15678 } 15679 if ( !axis || axis === "y" ) { 15680 animation.top = cur.top - this.offset.parent.top - this.margins.top + 15681 ( this.offsetParent[ 0 ] === this.document[ 0 ].body ? 15682 0 : 15683 this.offsetParent[ 0 ].scrollTop 15684 ); 15685 } 15686 this.reverting = true; 15687 $( this.helper ).animate( 15688 animation, 15689 parseInt( this.options.revert, 10 ) || 500, 15690 function() { 15691 that._clear( event ); 15692 } 15693 ); 15694 } else { 15695 this._clear( event, noPropagation ); 15696 } 15697 15698 return false; 15699 15700 }, 15701 15702 cancel: function() { 15703 15704 if ( this.dragging ) { 15705 15706 this._mouseUp( new $.Event( "mouseup", { target: null } ) ); 15707 15708 if ( this.options.helper === "original" ) { 15709 this.currentItem.css( this._storedCSS ); 15710 this._removeClass( this.currentItem, "ui-sortable-helper" ); 15711 } else { 15712 this.currentItem.show(); 15713 } 15714 15715 //Post deactivating events to containers 15716 for ( var i = this.containers.length - 1; i >= 0; i-- ) { 15717 this.containers[ i ]._trigger( "deactivate", null, this._uiHash( this ) ); 15718 if ( this.containers[ i ].containerCache.over ) { 15719 this.containers[ i ]._trigger( "out", null, this._uiHash( this ) ); 15720 this.containers[ i ].containerCache.over = 0; 15721 } 15722 } 15723 15724 } 15725 15726 if ( this.placeholder ) { 15727 15728 //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, 15729 // it unbinds ALL events from the original node! 15730 if ( this.placeholder[ 0 ].parentNode ) { 15731 this.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] ); 15732 } 15733 if ( this.options.helper !== "original" && this.helper && 15734 this.helper[ 0 ].parentNode ) { 15735 this.helper.remove(); 15736 } 15737 15738 $.extend( this, { 15739 helper: null, 15740 dragging: false, 15741 reverting: false, 15742 _noFinalSort: null 15743 } ); 15744 15745 if ( this.domPosition.prev ) { 15746 $( this.domPosition.prev ).after( this.currentItem ); 15747 } else { 15748 $( this.domPosition.parent ).prepend( this.currentItem ); 15749 } 15750 } 15751 15752 return this; 15753 15754 }, 15755 15756 serialize: function( o ) { 15757 15758 var items = this._getItemsAsjQuery( o && o.connected ), 15759 str = []; 15760 o = o || {}; 15761 15762 $( items ).each( function() { 15763 var res = ( $( o.item || this ).attr( o.attribute || "id" ) || "" ) 15764 .match( o.expression || ( /(.+)[\-=_](.+)/ ) ); 15765 if ( res ) { 15766 str.push( 15767 ( o.key || res[ 1 ] + "[]" ) + 15768 "=" + ( o.key && o.expression ? res[ 1 ] : res[ 2 ] ) ); 15769 } 15770 } ); 15771 15772 if ( !str.length && o.key ) { 15773 str.push( o.key + "=" ); 15774 } 15775 15776 return str.join( "&" ); 15777 15778 }, 15779 15780 toArray: function( o ) { 15781 15782 var items = this._getItemsAsjQuery( o && o.connected ), 15783 ret = []; 15784 15785 o = o || {}; 15786 15787 items.each( function() { 15788 ret.push( $( o.item || this ).attr( o.attribute || "id" ) || "" ); 15789 } ); 15790 return ret; 15791 15792 }, 15793 15794 /* Be careful with the following core functions */ 15795 _intersectsWith: function( item ) { 15796 15797 var x1 = this.positionAbs.left, 15798 x2 = x1 + this.helperProportions.width, 15799 y1 = this.positionAbs.top, 15800 y2 = y1 + this.helperProportions.height, 15801 l = item.left, 15802 r = l + item.width, 15803 t = item.top, 15804 b = t + item.height, 15805 dyClick = this.offset.click.top, 15806 dxClick = this.offset.click.left, 15807 isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && 15808 ( y1 + dyClick ) < b ), 15809 isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && 15810 ( x1 + dxClick ) < r ), 15811 isOverElement = isOverElementHeight && isOverElementWidth; 15812 15813 if ( this.options.tolerance === "pointer" || 15814 this.options.forcePointerForContainers || 15815 ( this.options.tolerance !== "pointer" && 15816 this.helperProportions[ this.floating ? "width" : "height" ] > 15817 item[ this.floating ? "width" : "height" ] ) 15818 ) { 15819 return isOverElement; 15820 } else { 15821 15822 return ( l < x1 + ( this.helperProportions.width / 2 ) && // Right Half 15823 x2 - ( this.helperProportions.width / 2 ) < r && // Left Half 15824 t < y1 + ( this.helperProportions.height / 2 ) && // Bottom Half 15825 y2 - ( this.helperProportions.height / 2 ) < b ); // Top Half 15826 15827 } 15828 }, 15829 15830 _intersectsWithPointer: function( item ) { 15831 var verticalDirection, horizontalDirection, 15832 isOverElementHeight = ( this.options.axis === "x" ) || 15833 this._isOverAxis( 15834 this.positionAbs.top + this.offset.click.top, item.top, item.height ), 15835 isOverElementWidth = ( this.options.axis === "y" ) || 15836 this._isOverAxis( 15837 this.positionAbs.left + this.offset.click.left, item.left, item.width ), 15838 isOverElement = isOverElementHeight && isOverElementWidth; 15839 15840 if ( !isOverElement ) { 15841 return false; 15842 } 15843 15844 verticalDirection = this.
vendor: 13,806 bytes, lines 15844-16291
15844_getDragVerticalDirection(); 15845 horizontalDirection = this._getDragHorizontalDirection(); 15846 15847 return this.floating ? 15848 ( ( horizontalDirection === "right" || verticalDirection === "down" ) ? 2 : 1 ) 15849 : ( verticalDirection && ( verticalDirection === "down" ? 2 : 1 ) ); 15850 15851 }, 15852 15853 _intersectsWithSides: function( item ) { 15854 15855 var isOverBottomHalf = this._isOverAxis( this.positionAbs.top + 15856 this.offset.click.top, item.top + ( item.height / 2 ), item.height ), 15857 isOverRightHalf = this._isOverAxis( this.positionAbs.left + 15858 this.offset.click.left, item.left + ( item.width / 2 ), item.width ), 15859 verticalDirection = this._getDragVerticalDirection(), 15860 horizontalDirection = this._getDragHorizontalDirection(); 15861 15862 if ( this.floating && horizontalDirection ) { 15863 return ( ( horizontalDirection === "right" && isOverRightHalf ) || 15864 ( horizontalDirection === "left" && !isOverRightHalf ) ); 15865 } else { 15866 return verticalDirection && ( ( verticalDirection === "down" && isOverBottomHalf ) || 15867 ( verticalDirection === "up" && !isOverBottomHalf ) ); 15868 } 15869 15870 }, 15871 15872 _getDragVerticalDirection: function() { 15873 var delta = this.positionAbs.top - this.lastPositionAbs.top; 15874 return delta !== 0 && ( delta > 0 ? "down" : "up" ); 15875 }, 15876 15877 _getDragHorizontalDirection: function() { 15878 var delta = this.positionAbs.left - this.lastPositionAbs.left; 15879 return delta !== 0 && ( delta > 0 ? "right" : "left" ); 15880 }, 15881 15882 refresh: function( event ) { 15883 this._refreshItems( event ); 15884 this._setHandleClassName(); 15885 this.refreshPositions(); 15886 return this; 15887 }, 15888 15889 _connectWith: function() { 15890 var options = this.options; 15891 return options.connectWith.constructor === String ? 15892 [ options.connectWith ] : 15893 options.connectWith; 15894 }, 15895 15896 _getItemsAsjQuery: function( connected ) { 15897 15898 var i, j, cur, inst, 15899 items = [], 15900 queries = [], 15901 connectWith = this._connectWith(); 15902 15903 if ( connectWith && connected ) { 15904 for ( i = connectWith.length - 1; i >= 0; i-- ) { 15905 cur = $( connectWith[ i ], this.document[ 0 ] ); 15906 for ( j = cur.length - 1; j >= 0; j-- ) { 15907 inst = $.data( cur[ j ], this.widgetFullName ); 15908 if ( inst && inst !== this && !inst.options.disabled ) { 15909 queries.push( [ $.isFunction( inst.options.items ) ? 15910 inst.options.items.call( inst.element ) : 15911 $( inst.options.items, inst.element ) 15912 .not( ".ui-sortable-helper" ) 15913 .not( ".ui-sortable-placeholder" ), inst ] ); 15914 } 15915 } 15916 } 15917 } 15918 15919 queries.push( [ $.isFunction( this.options.items ) ? 15920 this.options.items 15921 .call( this.element, null, { options: this.options, item: this.currentItem } ) : 15922 $( this.options.items, this.element ) 15923 .not( ".ui-sortable-helper" ) 15924 .not( ".ui-sortable-placeholder" ), this ] ); 15925 15926 function addItems() { 15927 items.push( this ); 15928 } 15929 for ( i = queries.length - 1; i >= 0; i-- ) { 15930 queries[ i ][ 0 ].each( addItems ); 15931 } 15932 15933 return $( items ); 15934 15935 }, 15936 15937 _removeCurrentsFromItems: function() { 15938 15939 var list = this.currentItem.find( ":data(" + this.widgetName + "-item)" ); 15940 15941 this.items = $.grep( this.items, function( item ) { 15942 for ( var j = 0; j < list.length; j++ ) { 15943 if ( list[ j ] === item.item[ 0 ] ) { 15944 return false; 15945 } 15946 } 15947 return true; 15948 } ); 15949 15950 }, 15951 15952 _refreshItems: function( event ) { 15953 15954 this.items = []; 15955 this.containers = [ this ]; 15956 15957 var i, j, cur, inst, targetData, _queries, item, queriesLength, 15958 items = this.items, 15959 queries = [ [ $.isFunction( this.options.items ) ? 15960 this.options.items.call( this.element[ 0 ], event, { item: this.currentItem } ) : 15961 $( this.options.items, this.element ), this ] ], 15962 connectWith = this._connectWith(); 15963 15964 //Shouldn't be run the first time through due to massive slow-down 15965 if ( connectWith && this.ready ) { 15966 for ( i = connectWith.length - 1; i >= 0; i-- ) { 15967 cur = $( connectWith[ i ], this.document[ 0 ] ); 15968 for ( j = cur.length - 1; j >= 0; j-- ) { 15969 inst = $.data( cur[ j ], this.widgetFullName ); 15970 if ( inst && inst !== this && !inst.options.disabled ) { 15971 queries.push( [ $.isFunction( inst.options.items ) ? 15972 inst.options.items 15973 .call( inst.element[ 0 ], event, { item: this.currentItem } ) : 15974 $( inst.options.items, inst.element ), inst ] ); 15975 this.containers.push( inst ); 15976 } 15977 } 15978 } 15979 } 15980 15981 for ( i = queries.length - 1; i >= 0; i-- ) { 15982 targetData = queries[ i ][ 1 ]; 15983 _queries = queries[ i ][ 0 ]; 15984 15985 for ( j = 0, queriesLength = _queries.length; j < queriesLength; j++ ) { 15986 item = $( _queries[ j ] ); 15987 15988 // Data for target checking (mouse manager) 15989 item.data( this.widgetName + "-item", targetData ); 15990 15991 items.push( { 15992 item: item, 15993 instance: targetData, 15994 width: 0, height: 0, 15995 left: 0, top: 0 15996 } ); 15997 } 15998 } 15999 16000 }, 16001 16002 refreshPositions: function( fast ) { 16003 16004 // Determine whether items are being displayed horizontally 16005 this.floating = this.items.length ? 16006 this.options.axis === "x" || this._isFloating( this.items[ 0 ].item ) : 16007 false; 16008 16009 //This has to be redone because due to the item being moved out/into the offsetParent, 16010 // the offsetParent's position will change 16011 if ( this.offsetParent && this.helper ) { 16012 this.offset.parent = this._getParentOffset(); 16013 } 16014 16015 var i, item, t, p; 16016 16017 for ( i = this.items.length - 1; i >= 0; i-- ) { 16018 item = this.items[ i ]; 16019 16020 //We ignore calculating positions of all connected containers when we're not over them 16021 if ( item.instance !== this.currentContainer && this.currentContainer && 16022 item.item[ 0 ] !== this.currentItem[ 0 ] ) { 16023 continue; 16024 } 16025 16026 t = this.options.toleranceElement ? 16027 $( this.options.toleranceElement, item.item ) : 16028 item.item; 16029 16030 if ( !fast ) { 16031 item.width = t.outerWidth(); 16032 item.height = t.outerHeight(); 16033 } 16034 16035 p = t.offset(); 16036 item.left = p.left; 16037 item.top = p.top; 16038 } 16039 16040 if ( this.options.custom && this.options.custom.refreshContainers ) { 16041 this.options.custom.refreshContainers.call( this ); 16042 } else { 16043 for ( i = this.containers.length - 1; i >= 0; i-- ) { 16044 p = this.containers[ i ].element.offset(); 16045 this.containers[ i ].containerCache.left = p.left; 16046 this.containers[ i ].containerCache.top = p.top; 16047 this.containers[ i ].containerCache.width = 16048 this.containers[ i ].element.outerWidth(); 16049 this.containers[ i ].containerCache.height = 16050 this.containers[ i ].element.outerHeight(); 16051 } 16052 } 16053 16054 return this; 16055 }, 16056 16057 _createPlaceholder: function( that ) { 16058 that = that || this; 16059 var className, 16060 o = that.options; 16061 16062 if ( !o.placeholder || o.placeholder.constructor === String ) { 16063 className = o.placeholder; 16064 o.placeholder = { 16065 element: function() { 16066 16067 var nodeName = that.currentItem[ 0 ].nodeName.toLowerCase(), 16068 element = $( "<" + nodeName + ">", that.document[ 0 ] ); 16069 16070 that._addClass( element, "ui-sortable-placeholder", 16071 className || that.currentItem[ 0 ].className ) 16072 ._removeClass( element, "ui-sortable-helper" ); 16073 16074 if ( nodeName === "tbody" ) { 16075 that._createTrPlaceholder( 16076 that.currentItem.find( "tr" ).eq( 0 ), 16077 $( "<tr>", that.document[ 0 ] ).appendTo( element ) 16078 ); 16079 } else if ( nodeName === "tr" ) { 16080 that._createTrPlaceholder( that.currentItem, element ); 16081 } else if ( nodeName === "img" ) { 16082 element.attr( "src", that.currentItem.attr( "src" ) ); 16083 } 16084 16085 if ( !className ) { 16086 element.css( "visibility", "hidden" ); 16087 } 16088 16089 return element; 16090 }, 16091 update: function( container, p ) { 16092 16093 // 1. If a className is set as 'placeholder option, we don't force sizes - 16094 // the class is responsible for that 16095 // 2. The option 'forcePlaceholderSize can be enabled to force it even if a 16096 // class name is specified 16097 if ( className && !o.forcePlaceholderSize ) { 16098 return; 16099 } 16100 16101 //If the element doesn't have a actual height by itself (without styles coming 16102 // from a stylesheet), it receives the inline height from the dragged item 16103 if ( !p.height() ) { 16104 p.height( 16105 that.currentItem.innerHeight() - 16106 parseInt( that.currentItem.css( "paddingTop" ) || 0, 10 ) - 16107 parseInt( that.currentItem.css( "paddingBottom" ) || 0, 10 ) ); 16108 } 16109 if ( !p.width() ) { 16110 p.width( 16111 that.currentItem.innerWidth() - 16112 parseInt( that.currentItem.css( "paddingLeft" ) || 0, 10 ) - 16113 parseInt( that.currentItem.css( "paddingRight" ) || 0, 10 ) ); 16114 } 16115 } 16116 }; 16117 } 16118 16119 //Create the placeholder 16120 that.placeholder = $( o.placeholder.element.call( that.element, that.currentItem ) ); 16121 16122 //Append it after the actual current item 16123 that.currentItem.after( that.placeholder ); 16124 16125 //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317) 16126 o.placeholder.update( that, that.placeholder ); 16127 16128 }, 16129 16130 _createTrPlaceholder: function( sourceTr, targetTr ) { 16131 var that = this; 16132 16133 sourceTr.children().each( function() { 16134 $( "<td> </td>", that.document[ 0 ] ) 16135 .attr( "colspan", $( this ).attr( "colspan" ) || 1 ) 16136 .appendTo( targetTr ); 16137 } ); 16138 }, 16139 16140 _contactContainers: function( event ) { 16141 var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom, 16142 floating, axis, 16143 innermostContainer = null, 16144 innermostIndex = null; 16145 16146 // Get innermost container that intersects with item 16147 for ( i = this.containers.length - 1; i >= 0; i-- ) { 16148 16149 // Never consider a container that's located within the item itself 16150 if ( $.contains( this.currentItem[ 0 ], this.containers[ i ].element[ 0 ] ) ) { 16151 continue; 16152 } 16153 16154 if ( this._intersectsWith( this.containers[ i ].containerCache ) ) { 16155 16156 // If we've already found a container and it's more "inner" than this, then continue 16157 if ( innermostContainer && 16158 $.contains( 16159 this.containers[ i ].element[ 0 ], 16160 innermostContainer.element[ 0 ] ) ) { 16161 continue; 16162 } 16163 16164 innermostContainer = this.containers[ i ]; 16165 innermostIndex = i; 16166 16167 } else { 16168 16169 // container doesn't intersect. trigger "out" event if necessary 16170 if ( this.containers[ i ].containerCache.over ) { 16171 this.containers[ i ]._trigger( "out", event, this._uiHash( this ) ); 16172 this.containers[ i ].containerCache.over = 0; 16173 } 16174 } 16175 16176 } 16177 16178 // If no intersecting containers found, return 16179 if ( !innermostContainer ) { 16180 return; 16181 } 16182 16183 // Move the item into the container if it's not there already 16184 if ( this.containers.length === 1 ) { 16185 if ( !this.containers[ innermostIndex ].containerCache.over ) { 16186 this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash( this ) ); 16187 this.containers[ innermostIndex ].containerCache.over = 1; 16188 } 16189 } else { 16190 16191 // When entering a new container, we will find the item with the least distance and 16192 // append our item near it 16193 dist = 10000; 16194 itemWithLeastDistance = null; 16195 floating = innermostContainer.floating || this._isFloating( this.currentItem ); 16196 posProperty = floating ? "left" : "top"; 16197 sizeProperty = floating ? "width" : "height"; 16198 axis = floating ? "pageX" : "pageY"; 16199 16200 for ( j = this.items.length - 1; j >= 0; j-- ) { 16201 if ( !$.contains( 16202 this.containers[ innermostIndex ].element[ 0 ], this.items[ j ].item[ 0 ] ) 16203 ) { 16204 continue; 16205 } 16206 if ( this.items[ j ].item[ 0 ] === this.currentItem[ 0 ] ) { 16207 continue; 16208 } 16209 16210 cur = this.items[ j ].item.offset()[ posProperty ]; 16211 nearBottom = false; 16212 if ( event[ axis ] - cur > this.items[ j ][ sizeProperty ] / 2 ) { 16213 nearBottom = true; 16214 } 16215 16216 if ( Math.abs( event[ axis ] - cur ) < dist ) { 16217 dist = Math.abs( event[ axis ] - cur ); 16218 itemWithLeastDistance = this.items[ j ]; 16219 this.direction = nearBottom ? "up" : "down"; 16220 } 16221 } 16222 16223 //Check if dropOnEmpty is enabled 16224 if ( !itemWithLeastDistance && !this.options.dropOnEmpty ) { 16225 return; 16226 } 16227 16228 if ( this.currentContainer === this.containers[ innermostIndex ] ) { 16229 if ( !this.currentContainer.containerCache.over ) { 16230 this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash() ); 16231 this.currentContainer.containerCache.over = 1; 16232 } 16233 return; 16234 } 16235 16236 itemWithLeastDistance ? 16237 this._rearrange( event, itemWithLeastDistance, null, true ) : 16238 this._rearrange( event, null, this.containers[ innermostIndex ].element, true ); 16239 this._trigger( "change", event, this._uiHash() ); 16240 this.containers[ innermostIndex ]._trigger( "change", event, this._uiHash( this ) ); 16241 this.currentContainer = this.containers[ innermostIndex ]; 16242 16243 //Update the placeholder 16244 this.options.placeholder.update( this.currentContainer, this.placeholder ); 16245 16246 this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash( this ) ); 16247 this.containers[ innermostIndex ].containerCache.over = 1; 16248 } 16249 16250 }, 16251 16252 _createHelper: function( event ) { 16253 16254 var o = this.options, 16255 helper = $.isFunction( o.helper ) ? 16256 $( o.helper.apply( this.element[ 0 ], [ event, this.currentItem ] ) ) : 16257 ( o.helper === "clone" ? this.currentItem.clone() : this.currentItem ); 16258 16259 //Add the helper to the DOM if that didn't happen already 16260 if ( !helper.parents( "body" ).length ) { 16261 $( o.appendTo !== "parent" ? 16262 o.appendTo : 16263 this.currentItem[ 0 ].parentNode )[ 0 ].appendChild( helper[ 0 ] ); 16264 } 16265 16266 if ( helper[ 0 ] === this.currentItem[ 0 ] ) { 16267 this._storedCSS = { 16268 width: this.currentItem[ 0 ].style.width, 16269 height: this.currentItem[ 0 ].style.height, 16270 position: this.currentItem.css( "position" ), 16271 top: this.currentItem.css( "top" ), 16272 left: this.currentItem.css( "left" ) 16273 }; 16274 } 16275 16276 if ( !helper[ 0 ].style.width || o.forceHelperSize ) { 16277 helper.width( this.currentItem.width() ); 16278 } 16279 if ( !helper[ 0 ].style.height || o.forceHelperSize ) { 16280 helper.height( this.currentItem.height() ); 16281 } 16282 16283 return helper; 16284 16285 }, 16286 16287 _adjustOffsetFromHelper: function( obj ) { 16288 if ( typeof obj === "string" ) { 16289 obj = obj.split( " " ); 16290 } 16291 if ( $
vendor: 9,476 bytes, lines 16291-16571
16291.isArray( obj ) ) { 16292 obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 }; 16293 } 16294 if ( "left" in obj ) { 16295 this.offset.click.left = obj.left + this.margins.left; 16296 } 16297 if ( "right" in obj ) { 16298 this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; 16299 } 16300 if ( "top" in obj ) { 16301 this.offset.click.top = obj.top + this.margins.top; 16302 } 16303 if ( "bottom" in obj ) { 16304 this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; 16305 } 16306 }, 16307 16308 _getParentOffset: function() { 16309 16310 //Get the offsetParent and cache its position 16311 this.offsetParent = this.helper.offsetParent(); 16312 var po = this.offsetParent.offset(); 16313 16314 // This is a special case where we need to modify a offset calculated on start, since the 16315 // following happened: 16316 // 1. The position of the helper is absolute, so it's position is calculated based on the 16317 // next positioned parent 16318 // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't 16319 // the document, which means that the scroll is included in the initial calculation of the 16320 // offset of the parent, and never recalculated upon drag 16321 if ( this.cssPosition === "absolute" && this.scrollParent[ 0 ] !== this.document[ 0 ] && 16322 $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) { 16323 po.left += this.scrollParent.scrollLeft(); 16324 po.top += this.scrollParent.scrollTop(); 16325 } 16326 16327 // This needs to be actually done for all browsers, since pageX/pageY includes this 16328 // information with an ugly IE fix 16329 if ( this.offsetParent[ 0 ] === this.document[ 0 ].body || 16330 ( this.offsetParent[ 0 ].tagName && 16331 this.offsetParent[ 0 ].tagName.toLowerCase() === "html" && $.ui.ie ) ) { 16332 po = { top: 0, left: 0 }; 16333 } 16334 16335 return { 16336 top: po.top + ( parseInt( this.offsetParent.css( "borderTopWidth" ), 10 ) || 0 ), 16337 left: po.left + ( parseInt( this.offsetParent.css( "borderLeftWidth" ), 10 ) || 0 ) 16338 }; 16339 16340 }, 16341 16342 _getRelativeOffset: function() { 16343 16344 if ( this.cssPosition === "relative" ) { 16345 var p = this.currentItem.position(); 16346 return { 16347 top: p.top - ( parseInt( this.helper.css( "top" ), 10 ) || 0 ) + 16348 this.scrollParent.scrollTop(), 16349 left: p.left - ( parseInt( this.helper.css( "left" ), 10 ) || 0 ) + 16350 this.scrollParent.scrollLeft() 16351 }; 16352 } else { 16353 return { top: 0, left: 0 }; 16354 } 16355 16356 }, 16357 16358 _cacheMargins: function() { 16359 this.margins = { 16360 left: ( parseInt( this.currentItem.css( "marginLeft" ), 10 ) || 0 ), 16361 top: ( parseInt( this.currentItem.css( "marginTop" ), 10 ) || 0 ) 16362 }; 16363 }, 16364 16365 _cacheHelperProportions: function() { 16366 this.helperProportions = { 16367 width: this.helper.outerWidth(), 16368 height: this.helper.outerHeight() 16369 }; 16370 }, 16371 16372 _setContainment: function() { 16373 16374 var ce, co, over, 16375 o = this.options; 16376 if ( o.containment === "parent" ) { 16377 o.containment = this.helper[ 0 ].parentNode; 16378 } 16379 if ( o.containment === "document" || o.containment === "window" ) { 16380 this.containment = [ 16381 0 - this.offset.relative.left - this.offset.parent.left, 16382 0 - this.offset.relative.top - this.offset.parent.top, 16383 o.containment === "document" ? 16384 this.document.width() : 16385 this.window.width() - this.helperProportions.width - this.margins.left, 16386 ( o.containment === "document" ? 16387 ( this.document.height() || document.body.parentNode.scrollHeight ) : 16388 this.window.height() || this.document[ 0 ].body.parentNode.scrollHeight 16389 ) - this.helperProportions.height - this.margins.top 16390 ]; 16391 } 16392 16393 if ( !( /^(document|window|parent)$/ ).test( o.containment ) ) { 16394 ce = $( o.containment )[ 0 ]; 16395 co = $( o.containment ).offset(); 16396 over = ( $( ce ).css( "overflow" ) !== "hidden" ); 16397 16398 this.containment = [ 16399 co.left + ( parseInt( $( ce ).css( "borderLeftWidth" ), 10 ) || 0 ) + 16400 ( parseInt( $( ce ).css( "paddingLeft" ), 10 ) || 0 ) - this.margins.left, 16401 co.top + ( parseInt( $( ce ).css( "borderTopWidth" ), 10 ) || 0 ) + 16402 ( parseInt( $( ce ).css( "paddingTop" ), 10 ) || 0 ) - this.margins.top, 16403 co.left + ( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) - 16404 ( parseInt( $( ce ).css( "borderLeftWidth" ), 10 ) || 0 ) - 16405 ( parseInt( $( ce ).css( "paddingRight" ), 10 ) || 0 ) - 16406 this.helperProportions.width - this.margins.left, 16407 co.top + ( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) - 16408 ( parseInt( $( ce ).css( "borderTopWidth" ), 10 ) || 0 ) - 16409 ( parseInt( $( ce ).css( "paddingBottom" ), 10 ) || 0 ) - 16410 this.helperProportions.height - this.margins.top 16411 ]; 16412 } 16413 16414 }, 16415 16416 _convertPositionTo: function( d, pos ) { 16417 16418 if ( !pos ) { 16419 pos = this.position; 16420 } 16421 var mod = d === "absolute" ? 1 : -1, 16422 scroll = this.cssPosition === "absolute" && 16423 !( this.scrollParent[ 0 ] !== this.document[ 0 ] && 16424 $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? 16425 this.offsetParent : 16426 this.scrollParent, 16427 scrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName ); 16428 16429 return { 16430 top: ( 16431 16432 // The absolute mouse position 16433 pos.top + 16434 16435 // Only for relative positioned nodes: Relative offset from element to offset parent 16436 this.offset.relative.top * mod + 16437 16438 // The offsetParent's offset without borders (offset + border) 16439 this.offset.parent.top * mod - 16440 ( ( this.cssPosition === "fixed" ? 16441 -this.scrollParent.scrollTop() : 16442 ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod ) 16443 ), 16444 left: ( 16445 16446 // The absolute mouse position 16447 pos.left + 16448 16449 // Only for relative positioned nodes: Relative offset from element to offset parent 16450 this.offset.relative.left * mod + 16451 16452 // The offsetParent's offset without borders (offset + border) 16453 this.offset.parent.left * mod - 16454 ( ( this.cssPosition === "fixed" ? 16455 -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : 16456 scroll.scrollLeft() ) * mod ) 16457 ) 16458 }; 16459 16460 }, 16461 16462 _generatePosition: function( event ) { 16463 16464 var top, left, 16465 o = this.options, 16466 pageX = event.pageX, 16467 pageY = event.pageY, 16468 scroll = this.cssPosition === "absolute" && 16469 !( this.scrollParent[ 0 ] !== this.document[ 0 ] && 16470 $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? 16471 this.offsetParent : 16472 this.scrollParent, 16473 scrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName ); 16474 16475 // This is another very weird special case that only happens for relative elements: 16476 // 1. If the css position is relative 16477 // 2. and the scroll parent is the document or similar to the offset parent 16478 // we have to refresh the relative offset during the scroll so there are no jumps 16479 if ( this.cssPosition === "relative" && !( this.scrollParent[ 0 ] !== this.document[ 0 ] && 16480 this.scrollParent[ 0 ] !== this.offsetParent[ 0 ] ) ) { 16481 this.offset.relative = this._getRelativeOffset(); 16482 } 16483 16484 /* 16485 * - Position constraining - 16486 * Constrain the position to a mix of grid, containment. 16487 */ 16488 16489 if ( this.originalPosition ) { //If we are not dragging yet, we won't check for options 16490 16491 if ( this.containment ) { 16492 if ( event.pageX - this.offset.click.left < this.containment[ 0 ] ) { 16493 pageX = this.containment[ 0 ] + this.offset.click.left; 16494 } 16495 if ( event.pageY - this.offset.click.top < this.containment[ 1 ] ) { 16496 pageY = this.containment[ 1 ] + this.offset.click.top; 16497 } 16498 if ( event.pageX - this.offset.click.left > this.containment[ 2 ] ) { 16499 pageX = this.containment[ 2 ] + this.offset.click.left; 16500 } 16501 if ( event.pageY - this.offset.click.top > this.containment[ 3 ] ) { 16502 pageY = this.containment[ 3 ] + this.offset.click.top; 16503 } 16504 } 16505 16506 if ( o.grid ) { 16507 top = this.originalPageY + Math.round( ( pageY - this.originalPageY ) / 16508 o.grid[ 1 ] ) * o.grid[ 1 ]; 16509 pageY = this.containment ? 16510 ( ( top - this.offset.click.top >= this.containment[ 1 ] && 16511 top - this.offset.click.top <= this.containment[ 3 ] ) ? 16512 top : 16513 ( ( top - this.offset.click.top >= this.containment[ 1 ] ) ? 16514 top - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) : 16515 top; 16516 16517 left = this.originalPageX + Math.round( ( pageX - this.originalPageX ) / 16518 o.grid[ 0 ] ) * o.grid[ 0 ]; 16519 pageX = this.containment ? 16520 ( ( left - this.offset.click.left >= this.containment[ 0 ] && 16521 left - this.offset.click.left <= this.containment[ 2 ] ) ? 16522 left : 16523 ( ( left - this.offset.click.left >= this.containment[ 0 ] ) ? 16524 left - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) : 16525 left; 16526 } 16527 16528 } 16529 16530 return { 16531 top: ( 16532 16533 // The absolute mouse position 16534 pageY - 16535 16536 // Click offset (relative to the element) 16537 this.offset.click.top - 16538 16539 // Only for relative positioned nodes: Relative offset from element to offset parent 16540 this.offset.relative.top - 16541 16542 // The offsetParent's offset without borders (offset + border) 16543 this.offset.parent.top + 16544 ( ( this.cssPosition === "fixed" ? 16545 -this.scrollParent.scrollTop() : 16546 ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) ) 16547 ), 16548 left: ( 16549 16550 // The absolute mouse position 16551 pageX - 16552 16553 // Click offset (relative to the element) 16554 this.offset.click.left - 16555 16556 // Only for relative positioned nodes: Relative offset from element to offset parent 16557 this.offset.relative.left - 16558 16559 // The offsetParent's offset without borders (offset + border) 16560 this.offset.parent.left + 16561 ( ( this.cssPosition === "fixed" ? 16562 -this.scrollParent.scrollLeft() : 16563 scrollIsRootNode ? 0 : scroll.scrollLeft() ) ) 16564 ) 16565 }; 16566 16567 }, 16568 16569 _rearrange: function( event, i, a, hardRefresh ) { 16570 16571
16571a ? a[ 0 ].appendChild( this.placeholder[ 0 ] ) : 16572 i.item[ 0 ].parentNode.insertBefore( this.placeholder[ 0 ], 16573 ( this.direction === "down" ? i.item[ 0 ] : i.item[ 0 ].nextSibling ) );
vendor: 5,013 bytes, lines 16573-16741
16573 16574 16575 //Various things done here to improve the performance: 16576 // 1. we create a setTimeout, that calls refreshPositions 16577 // 2. on the instance, we have a counter variable, that get's higher after every append 16578 // 3. on the local scope, we copy the counter variable, and check in the timeout, 16579 // if it's still the same 16580 // 4. this lets only the last addition to the timeout stack through 16581 this.counter = this.counter ? ++this.counter : 1; 16582 var counter = this.counter; 16583 16584 this._delay( function() { 16585 if ( counter === this.counter ) { 16586 16587 //Precompute after each DOM insertion, NOT on mousemove 16588 this.refreshPositions( !hardRefresh ); 16589 } 16590 } ); 16591 16592 }, 16593 16594 _clear: function( event, noPropagation ) { 16595 16596 this.reverting = false; 16597 16598 // We delay all events that have to be triggered to after the point where the placeholder 16599 // has been removed and everything else normalized again 16600 var i, 16601 delayedTriggers = []; 16602 16603 // We first have to update the dom position of the actual currentItem 16604 // Note: don't do it if the current item is already removed (by a user), or it gets 16605 // reappended (see #4088) 16606 if ( !this._noFinalSort && this.currentItem.parent().length ) { 16607 this.placeholder.before( this.currentItem ); 16608 } 16609 this._noFinalSort = null; 16610 16611 if ( this.helper[ 0 ] === this.currentItem[ 0 ] ) { 16612 for ( i in this._storedCSS ) { 16613 if ( this._storedCSS[ i ] === "auto" || this._storedCSS[ i ] === "static" ) { 16614 this._storedCSS[ i ] = ""; 16615 } 16616 } 16617 this.currentItem.css( this._storedCSS ); 16618 this._removeClass( this.currentItem, "ui-sortable-helper" ); 16619 } else { 16620 this.currentItem.show(); 16621 } 16622 16623 if ( this.fromOutside && !noPropagation ) { 16624 delayedTriggers.push( function( event ) { 16625 this._trigger( "receive", event, this._uiHash( this.fromOutside ) ); 16626 } ); 16627 } 16628 if ( ( this.fromOutside || 16629 this.domPosition.prev !== 16630 this.currentItem.prev().not( ".ui-sortable-helper" )[ 0 ] || 16631 this.domPosition.parent !== this.currentItem.parent()[ 0 ] ) && !noPropagation ) { 16632 16633 // Trigger update callback if the DOM position has changed 16634 delayedTriggers.push( function( event ) { 16635 this._trigger( "update", event, this._uiHash() ); 16636 } ); 16637 } 16638 16639 // Check if the items Container has Changed and trigger appropriate 16640 // events. 16641 if ( this !== this.currentContainer ) { 16642 if ( !noPropagation ) { 16643 delayedTriggers.push( function( event ) { 16644 this._trigger( "remove", event, this._uiHash() ); 16645 } ); 16646 delayedTriggers.push( ( function( c ) { 16647 return function( event ) { 16648 c._trigger( "receive", event, this._uiHash( this ) ); 16649 }; 16650 } ).call( this, this.currentContainer ) ); 16651 delayedTriggers.push( ( function( c ) { 16652 return function( event ) { 16653 c._trigger( "update", event, this._uiHash( this ) ); 16654 }; 16655 } ).call( this, this.currentContainer ) ); 16656 } 16657 } 16658 16659 //Post events to containers 16660 function delayEvent( type, instance, container ) { 16661 return function( event ) { 16662 container._trigger( type, event, instance._uiHash( instance ) ); 16663 }; 16664 } 16665 for ( i = this.containers.length - 1; i >= 0; i-- ) { 16666 if ( !noPropagation ) { 16667 delayedTriggers.push( delayEvent( "deactivate", this, this.containers[ i ] ) ); 16668 } 16669 if ( this.containers[ i ].containerCache.over ) { 16670 delayedTriggers.push( delayEvent( "out", this, this.containers[ i ] ) ); 16671 this.containers[ i ].containerCache.over = 0; 16672 } 16673 } 16674 16675 //Do what was originally in plugins 16676 if ( this.storedCursor ) { 16677 this.document.find( "body" ).css( "cursor", this.storedCursor ); 16678 this.storedStylesheet.remove(); 16679 } 16680 if ( this._storedOpacity ) { 16681 this.helper.css( "opacity", this._storedOpacity ); 16682 } 16683 if ( this._storedZIndex ) { 16684 this.helper.css( "zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex ); 16685 } 16686 16687 this.dragging = false; 16688 16689 if ( !noPropagation ) { 16690 this._trigger( "beforeStop", event, this._uiHash() ); 16691 } 16692 16693 //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, 16694 // it unbinds ALL events from the original node! 16695 this.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] ); 16696 16697 if ( !this.cancelHelperRemoval ) { 16698 if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) { 16699 this.helper.remove(); 16700 } 16701 this.helper = null; 16702 } 16703 16704 if ( !noPropagation ) { 16705 for ( i = 0; i < delayedTriggers.length; i++ ) { 16706 16707 // Trigger all delayed events 16708 delayedTriggers[ i ].call( this, event ); 16709 } 16710 this._trigger( "stop", event, this._uiHash() ); 16711 } 16712 16713 this.fromOutside = false; 16714 return !this.cancelHelperRemoval; 16715 16716 }, 16717 16718 _trigger: function() { 16719 if ( $.Widget.prototype._trigger.apply( this, arguments ) === false ) { 16720 this.cancel(); 16721 } 16722 }, 16723 16724 _uiHash: function( _inst ) { 16725 var inst = _inst || this; 16726 return { 16727 helper: inst.helper, 16728 placeholder: inst.placeholder || $( [] ), 16729 position: inst.position, 16730 originalPosition: inst.originalPosition, 16731 offset: inst.positionAbs, 16732 item: inst.currentItem, 16733 sender: _inst ? _inst.element : null 16734 }; 16735 } 16736 16737} ); 16738 16739 16740/*! 16741 * jQuery UI Spinner 1.1
vendor: 26,644 bytes, lines 16741-17785
167412.1 16742 * http://jqueryui.com 16743 * 16744 * Copyright jQuery Foundation and other contributors 16745 * Released under the MIT license. 16746 * http://jquery.org/license 16747 */ 16748 16749//>>label: Spinner 16750//>>group: Widgets 16751//>>description: Displays buttons to easily input numbers via the keyboard or mouse. 16752//>>docs: http://api.jqueryui.com/spinner/ 16753//>>demos: http://jqueryui.com/spinner/ 16754//>>css.structure: ../../themes/base/core.css 16755//>>css.structure: ../../themes/base/spinner.css 16756//>>css.theme: ../../themes/base/theme.css 16757 16758 16759 16760function spinnerModifer( fn ) { 16761 return function() { 16762 var previous = this.element.val(); 16763 fn.apply( this, arguments ); 16764 this._refresh(); 16765 if ( previous !== this.element.val() ) { 16766 this._trigger( "change" ); 16767 } 16768 }; 16769} 16770 16771$.widget( "ui.spinner", { 16772 version: "1.12.1", 16773 defaultElement: "<input>", 16774 widgetEventPrefix: "spin", 16775 options: { 16776 classes: { 16777 "ui-spinner": "ui-corner-all", 16778 "ui-spinner-down": "ui-corner-br", 16779 "ui-spinner-up": "ui-corner-tr" 16780 }, 16781 culture: null, 16782 icons: { 16783 down: "ui-icon-triangle-1-s", 16784 up: "ui-icon-triangle-1-n" 16785 }, 16786 incremental: true, 16787 max: null, 16788 min: null, 16789 numberFormat: null, 16790 page: 10, 16791 step: 1, 16792 16793 change: null, 16794 spin: null, 16795 start: null, 16796 stop: null 16797 }, 16798 16799 _create: function() { 16800 16801 // handle string values that need to be parsed 16802 this._setOption( "max", this.options.max ); 16803 this._setOption( "min", this.options.min ); 16804 this._setOption( "step", this.options.step ); 16805 16806 // Only format if there is a value, prevents the field from being marked 16807 // as invalid in Firefox, see #9573. 16808 if ( this.value() !== "" ) { 16809 16810 // Format the value, but don't constrain. 16811 this._value( this.element.val(), true ); 16812 } 16813 16814 this._draw(); 16815 this._on( this._events ); 16816 this._refresh(); 16817 16818 // Turning off autocomplete prevents the browser from remembering the 16819 // value when navigating through history, so we re-enable autocomplete 16820 // if the page is unloaded before the widget is destroyed. #7790 16821 this._on( this.window, { 16822 beforeunload: function() { 16823 this.element.removeAttr( "autocomplete" ); 16824 } 16825 } ); 16826 }, 16827 16828 _getCreateOptions: function() { 16829 var options = this._super(); 16830 var element = this.element; 16831 16832 $.each( [ "min", "max", "step" ], function( i, option ) { 16833 var value = element.attr( option ); 16834 if ( value != null && value.length ) { 16835 options[ option ] = value; 16836 } 16837 } ); 16838 16839 return options; 16840 }, 16841 16842 _events: { 16843 keydown: function( event ) { 16844 if ( this._start( event ) && this._keydown( event ) ) { 16845 event.preventDefault(); 16846 } 16847 }, 16848 keyup: "_stop", 16849 focus: function() { 16850 this.previous = this.element.val(); 16851 }, 16852 blur: function( event ) { 16853 if ( this.cancelBlur ) { 16854 delete this.cancelBlur; 16855 return; 16856 } 16857 16858 this._stop(); 16859 this._refresh(); 16860 if ( this.previous !== this.element.val() ) { 16861 this._trigger( "change", event ); 16862 } 16863 }, 16864 mousewheel: function( event, delta ) { 16865 if ( !delta ) { 16866 return; 16867 } 16868 if ( !this.spinning && !this._start( event ) ) { 16869 return false; 16870 } 16871 16872 this._spin( ( delta > 0 ? 1 : -1 ) * this.options.step, event ); 16873 clearTimeout( this.mousewheelTimer ); 16874 this.mousewheelTimer = this._delay( function() { 16875 if ( this.spinning ) { 16876 this._stop( event ); 16877 } 16878 }, 100 ); 16879 event.preventDefault(); 16880 }, 16881 "mousedown .ui-spinner-button": function( event ) { 16882 var previous; 16883 16884 // We never want the buttons to have focus; whenever the user is 16885 // interacting with the spinner, the focus should be on the input. 16886 // If the input is focused then this.previous is properly set from 16887 // when the input first received focus. If the input is not focused 16888 // then we need to set this.previous based on the value before spinning. 16889 previous = this.element[ 0 ] === $.ui.safeActiveElement( this.document[ 0 ] ) ? 16890 this.previous : this.element.val(); 16891 function checkFocus() { 16892 var isActive = this.element[ 0 ] === $.ui.safeActiveElement( this.document[ 0 ] ); 16893 if ( !isActive ) { 16894 this.element.trigger( "focus" ); 16895 this.previous = previous; 16896 16897 // support: IE 16898 // IE sets focus asynchronously, so we need to check if focus 16899 // moved off of the input because the user clicked on the button. 16900 this._delay( function() { 16901 this.previous = previous; 16902 } ); 16903 } 16904 } 16905 16906 // Ensure focus is on (or stays on) the text field 16907 event.preventDefault(); 16908 checkFocus.call( this ); 16909 16910 // Support: IE 16911 // IE doesn't prevent moving focus even with event.preventDefault() 16912 // so we set a flag to know when we should ignore the blur event 16913 // and check (again) if focus moved off of the input. 16914 this.cancelBlur = true; 16915 this._delay( function() { 16916 delete this.cancelBlur; 16917 checkFocus.call( this ); 16918 } ); 16919 16920 if ( this._start( event ) === false ) { 16921 return; 16922 } 16923 16924 this._repeat( null, $( event.currentTarget ) 16925 .hasClass( "ui-spinner-up" ) ? 1 : -1, event ); 16926 }, 16927 "mouseup .ui-spinner-button": "_stop", 16928 "mouseenter .ui-spinner-button": function( event ) { 16929 16930 // button will add ui-state-active if mouse was down while mouseleave and kept down 16931 if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) { 16932 return; 16933 } 16934 16935 if ( this._start( event ) === false ) { 16936 return false; 16937 } 16938 this._repeat( null, $( event.currentTarget ) 16939 .hasClass( "ui-spinner-up" ) ? 1 : -1, event ); 16940 }, 16941 16942 // TODO: do we really want to consider this a stop? 16943 // shouldn't we just stop the repeater and wait until mouseup before 16944 // we trigger the stop event? 16945 "mouseleave .ui-spinner-button": "_stop" 16946 }, 16947 16948 // Support mobile enhanced option and make backcompat more sane 16949 _enhance: function() { 16950 this.uiSpinner = this.element 16951 .attr( "autocomplete", "off" ) 16952 .wrap( "<span>" ) 16953 .parent() 16954 16955 // Add buttons 16956 .append( 16957 "<a></a><a></a>" 16958 ); 16959 }, 16960 16961 _draw: function() { 16962 this._enhance(); 16963 16964 this._addClass( this.uiSpinner, "ui-spinner", "ui-widget ui-widget-content" ); 16965 this._addClass( "ui-spinner-input" ); 16966 16967 this.element.attr( "role", "spinbutton" ); 16968 16969 // Button bindings 16970 this.buttons = this.uiSpinner.children( "a" ) 16971 .attr( "tabIndex", -1 ) 16972 .attr( "aria-hidden", true ) 16973 .button( { 16974 classes: { 16975 "ui-button": "" 16976 } 16977 } ); 16978 16979 // TODO: Right now button does not support classes this is already updated in button PR 16980 this._removeClass( this.buttons, "ui-corner-all" ); 16981 16982 this._addClass( this.buttons.first(), "ui-spinner-button ui-spinner-up" ); 16983 this._addClass( this.buttons.last(), "ui-spinner-button ui-spinner-down" ); 16984 this.buttons.first().button( { 16985 "icon": this.options.icons.up, 16986 "showLabel": false 16987 } ); 16988 this.buttons.last().button( { 16989 "icon": this.options.icons.down, 16990 "showLabel": false 16991 } ); 16992 16993 // IE 6 doesn't understand height: 50% for the buttons 16994 // unless the wrapper has an explicit height 16995 if ( this.buttons.height() > Math.ceil( this.uiSpinner.height() * 0.5 ) && 16996 this.uiSpinner.height() > 0 ) { 16997 this.uiSpinner.height( this.uiSpinner.height() ); 16998 } 16999 }, 17000 17001 _keydown: function( event ) { 17002 var options = this.options, 17003 keyCode = $.ui.keyCode; 17004 17005 switch ( event.keyCode ) { 17006 case keyCode.UP: 17007 this._repeat( null, 1, event ); 17008 return true; 17009 case keyCode.DOWN: 17010 this._repeat( null, -1, event ); 17011 return true; 17012 case keyCode.PAGE_UP: 17013 this._repeat( null, options.page, event ); 17014 return true; 17015 case keyCode.PAGE_DOWN: 17016 this._repeat( null, -options.page, event ); 17017 return true; 17018 } 17019 17020 return false; 17021 }, 17022 17023 _start: function( event ) { 17024 if ( !this.spinning && this._trigger( "start", event ) === false ) { 17025 return false; 17026 } 17027 17028 if ( !this.counter ) { 17029 this.counter = 1; 17030 } 17031 this.spinning = true; 17032 return true; 17033 }, 17034 17035 _repeat: function( i, steps, event ) { 17036 i = i || 500; 17037 17038 clearTimeout( this.timer ); 17039 this.timer = this._delay( function() { 17040 this._repeat( 40, steps, event ); 17041 }, i ); 17042 17043 this._spin( steps * this.options.step, event ); 17044 }, 17045 17046 _spin: function( step, event ) { 17047 var value = this.value() || 0; 17048 17049 if ( !this.counter ) { 17050 this.counter = 1; 17051 } 17052 17053 value = this._adjustValue( value + step * this._increment( this.counter ) ); 17054 17055 if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false ) { 17056 this._value( value ); 17057 this.counter++; 17058 } 17059 }, 17060 17061 _increment: function( i ) { 17062 var incremental = this.options.incremental; 17063 17064 if ( incremental ) { 17065 return $.isFunction( incremental ) ? 17066 incremental( i ) : 17067 Math.floor( i * i * i / 50000 - i * i / 500 + 17 * i / 200 + 1 ); 17068 } 17069 17070 return 1; 17071 }, 17072 17073 _precision: function() { 17074 var precision = this._precisionOf( this.options.step ); 17075 if ( this.options.min !== null ) { 17076 precision = Math.max( precision, this._precisionOf( this.options.min ) ); 17077 } 17078 return precision; 17079 }, 17080 17081 _precisionOf: function( num ) { 17082 var str = num.toString(), 17083 decimal = str.indexOf( "." ); 17084 return decimal === -1 ? 0 : str.length - decimal - 1; 17085 }, 17086 17087 _adjustValue: function( value ) { 17088 var base, aboveMin, 17089 options = this.options; 17090 17091 // Make sure we're at a valid step 17092 // - find out where we are relative to the base (min or 0) 17093 base = options.min !== null ? options.min : 0; 17094 aboveMin = value - base; 17095 17096 // - round to the nearest step 17097 aboveMin = Math.round( aboveMin / options.step ) * options.step; 17098 17099 // - rounding is based on 0, so adjust back to our base 17100 value = base + aboveMin; 17101 17102 // Fix precision from bad JS floating point math 17103 value = parseFloat( value.toFixed( this._precision() ) ); 17104 17105 // Clamp the value 17106 if ( options.max !== null && value > options.max ) { 17107 return options.max; 17108 } 17109 if ( options.min !== null && value < options.min ) { 17110 return options.min; 17111 } 17112 17113 return value; 17114 }, 17115 17116 _stop: function( event ) { 17117 if ( !this.spinning ) { 17118 return; 17119 } 17120 17121 clearTimeout( this.timer ); 17122 clearTimeout( this.mousewheelTimer ); 17123 this.counter = 0; 17124 this.spinning = false; 17125 this._trigger( "stop", event ); 17126 }, 17127 17128 _setOption: function( key, value ) { 17129 var prevValue, first, last; 17130 17131 if ( key === "culture" || key === "numberFormat" ) { 17132 prevValue = this._parse( this.element.val() ); 17133 this.options[ key ] = value; 17134 this.element.val( this._format( prevValue ) ); 17135 return; 17136 } 17137 17138 if ( key === "max" || key === "min" || key === "step" ) { 17139 if ( typeof value === "string" ) { 17140 value = this._parse( value ); 17141 } 17142 } 17143 if ( key === "icons" ) { 17144 first = this.buttons.first().find( ".ui-icon" ); 17145 this._removeClass( first, null, this.options.icons.up ); 17146 this._addClass( first, null, value.up ); 17147 last = this.buttons.last().find( ".ui-icon" ); 17148 this._removeClass( last, null, this.options.icons.down ); 17149 this._addClass( last, null, value.down ); 17150 } 17151 17152 this._super( key, value ); 17153 }, 17154 17155 _setOptionDisabled: function( value ) { 17156 this._super( value ); 17157 17158 this._toggleClass( this.uiSpinner, null, "ui-state-disabled", !!value ); 17159 this.element.prop( "disabled", !!value ); 17160 this.buttons.button( value ? "disable" : "enable" ); 17161 }, 17162 17163 _setOptions: spinnerModifer( function( options ) { 17164 this._super( options ); 17165 } ), 17166 17167 _parse: function( val ) { 17168 if ( typeof val === "string" && val !== "" ) { 17169 val = window.Globalize && this.options.numberFormat ? 17170 Globalize.parseFloat( val, 10, this.options.culture ) : +val; 17171 } 17172 return val === "" || isNaN( val ) ? null : val; 17173 }, 17174 17175 _format: function( value ) { 17176 if ( value === "" ) { 17177 return ""; 17178 } 17179 return window.Globalize && this.options.numberFormat ? 17180 Globalize.format( value, this.options.numberFormat, this.options.culture ) : 17181 value; 17182 }, 17183 17184 _refresh: function() { 17185 this.element.attr( { 17186 "aria-valuemin": this.options.min, 17187 "aria-valuemax": this.options.max, 17188 17189 // TODO: what should we do with values that can't be parsed? 17190 "aria-valuenow": this._parse( this.element.val() ) 17191 } ); 17192 }, 17193 17194 isValid: function() { 17195 var value = this.value(); 17196 17197 // Null is invalid 17198 if ( value === null ) { 17199 return false; 17200 } 17201 17202 // If value gets adjusted, it's invalid 17203 return value === this._adjustValue( value ); 17204 }, 17205 17206 // Update the value without triggering change 17207 _value: function( value, allowAny ) { 17208 var parsed; 17209 if ( value !== "" ) { 17210 parsed = this._parse( value ); 17211 if ( parsed !== null ) { 17212 if ( !allowAny ) { 17213 parsed = this._adjustValue( parsed ); 17214 } 17215 value = this._format( parsed ); 17216 } 17217 } 17218 this.element.val( value ); 17219 this._refresh(); 17220 }, 17221 17222 _destroy: function() { 17223 this.element 17224 .prop( "disabled", false ) 17225 .removeAttr( "autocomplete role aria-valuemin aria-valuemax aria-valuenow" ); 17226 17227 this.uiSpinner.replaceWith( this.element ); 17228 }, 17229 17230 stepUp: spinnerModifer( function( steps ) { 17231 this._stepUp( steps ); 17232 } ), 17233 _stepUp: function( steps ) { 17234 if ( this._start() ) { 17235 this._spin( ( steps || 1 ) * this.options.step ); 17236 this._stop(); 17237 } 17238 }, 17239 17240 stepDown: spinnerModifer( function( steps ) { 17241 this._stepDown( steps ); 17242 } ), 17243 _stepDown: function( steps ) { 17244 if ( this._start() ) { 17245 this._spin( ( steps || 1 ) * -this.options.step ); 17246 this._stop(); 17247 } 17248 }, 17249 17250 pageUp: spinnerModifer( function( pages ) { 17251 this._stepUp( ( pages || 1 ) * this.options.page ); 17252 } ), 17253 17254 pageDown: spinnerModifer( function( pages ) { 17255 this._stepDown( ( pages || 1 ) * this.options.page ); 17256 } ), 17257 17258 value: function( newVal ) { 17259 if ( !arguments.length ) { 17260 return this._parse( this.element.val() ); 17261 } 17262 spinnerModifer( this._value ).call( this, newVal ); 17263 }, 17264 17265 widget: function() { 17266 return this.uiSpinner; 17267 } 17268} ); 17269 17270// DEPRECATED 17271// TODO: switch return back to widget declaration at top of file when this is removed 17272if ( $.uiBackCompat !== false ) { 17273 17274 // Backcompat for spinner html extension points 17275 $.widget( "ui.spinner", $.ui.spinner, { 17276 _enhance: function() { 17277 this.uiSpinner = this.element 17278 .attr( "autocomplete", "off" ) 17279 .wrap( this._uiSpinnerHtml() ) 17280 .parent() 17281 17282 // Add buttons 17283 .append( this._buttonHtml() ); 17284 }, 17285 _uiSpinnerHtml: function() { 17286 return "<span>"; 17287 }, 17288 17289 _buttonHtml: function() { 17290 return "<a></a><a></a>"; 17291 } 17292 } ); 17293} 17294 17295var widgetsSpinner = $.ui.spinner; 17296 17297 17298/*! 17299 * jQuery UI Tabs 1.12.1 17300 * http://jqueryui.com 17301 * 17302 * Copyright jQuery Foundation and other contributors 17303 * Released under the MIT license. 17304 * http://jquery.org/license 17305 */ 17306 17307//>>label: Tabs 17308//>>group: Widgets 17309//>>description: Transforms a set of container elements into a tab structure. 17310//>>docs: http://api.jqueryui.com/tabs/ 17311//>>demos: http://jqueryui.com/tabs/ 17312//>>css.structure: ../../themes/base/core.css 17313//>>css.structure: ../../themes/base/tabs.css 17314//>>css.theme: ../../themes/base/theme.css 17315 17316 17317 17318$.widget( "ui.tabs", { 17319 version: "1.12.1", 17320 delay: 300, 17321 options: { 17322 active: null, 17323 classes: { 17324 "ui-tabs": "ui-corner-all", 17325 "ui-tabs-nav": "ui-corner-all", 17326 "ui-tabs-panel": "ui-corner-bottom", 17327 "ui-tabs-tab": "ui-corner-top" 17328 }, 17329 collapsible: false, 17330 event: "click", 17331 heightStyle: "content", 17332 hide: null, 17333 show: null, 17334 17335 // Callbacks 17336 activate: null, 17337 beforeActivate: null, 17338 beforeLoad: null, 17339 load: null 17340 }, 17341 17342 _isLocal: ( function() { 17343 var rhash = /#.*$/; 17344 17345 return function( anchor ) { 17346 var anchorUrl, locationUrl; 17347 17348 anchorUrl = anchor.href.replace( rhash, "" ); 17349 locationUrl = location.href.replace( rhash, "" ); 17350 17351 // Decoding may throw an error if the URL isn't UTF-8 (#9518) 17352 try { 17353 anchorUrl = decodeURIComponent( anchorUrl ); 17354 } catch ( error ) {} 17355 try { 17356 locationUrl = decodeURIComponent( locationUrl ); 17357 } catch ( error ) {} 17358 17359 return anchor.hash.length > 1 && anchorUrl === locationUrl; 17360 }; 17361 } )(), 17362 17363 _create: function() { 17364 var that = this, 17365 options = this.options; 17366 17367 this.running = false; 17368 17369 this._addClass( "ui-tabs", "ui-widget ui-widget-content" ); 17370 this._toggleClass( "ui-tabs-collapsible", null, options.collapsible ); 17371 17372 this._processTabs(); 17373 options.active = this._initialActive(); 17374 17375 // Take disabling tabs via class attribute from HTML 17376 // into account and update option properly. 17377 if ( $.isArray( options.disabled ) ) { 17378 options.disabled = $.unique( options.disabled.concat( 17379 $.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) { 17380 return that.tabs.index( li ); 17381 } ) 17382 ) ).sort(); 17383 } 17384 17385 // Check for length avoids error when initializing empty list 17386 if ( this.options.active !== false && this.anchors.length ) { 17387 this.active = this._findActive( options.active ); 17388 } else { 17389 this.active = $(); 17390 } 17391 17392 this._refresh(); 17393 17394 if ( this.active.length ) { 17395 this.load( options.active ); 17396 } 17397 }, 17398 17399 _initialActive: function() { 17400 var active = this.options.active, 17401 collapsible = this.options.collapsible, 17402 locationHash = location.hash.substring( 1 ); 17403 17404 if ( active === null ) { 17405 17406 // check the fragment identifier in the URL 17407 if ( locationHash ) { 17408 this.tabs.each( function( i, tab ) { 17409 if ( $( tab ).attr( "aria-controls" ) === locationHash ) { 17410 active = i; 17411 return false; 17412 } 17413 } ); 17414 } 17415 17416 // Check for a tab marked active via a class 17417 if ( active === null ) { 17418 active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) ); 17419 } 17420 17421 // No active tab, set to false 17422 if ( active === null || active === -1 ) { 17423 active = this.tabs.length ? 0 : false; 17424 } 17425 } 17426 17427 // Handle numbers: negative, out of range 17428 if ( active !== false ) { 17429 active = this.tabs.index( this.tabs.eq( active ) ); 17430 if ( active === -1 ) { 17431 active = collapsible ? false : 0; 17432 } 17433 } 17434 17435 // Don't allow collapsible: false and active: false 17436 if ( !collapsible && active === false && this.anchors.length ) { 17437 active = 0; 17438 } 17439 17440 return active; 17441 }, 17442 17443 _getCreateEventData: function() { 17444 return { 17445 tab: this.active, 17446 panel: !this.active.length ? $() : this._getPanelForTab( this.active ) 17447 }; 17448 }, 17449 17450 _tabKeydown: function( event ) { 17451 var focusedTab = $( $.ui.safeActiveElement( this.document[ 0 ] ) ).closest( "li" ), 17452 selectedIndex = this.tabs.index( focusedTab ), 17453 goingForward = true; 17454 17455 if ( this._handlePageNav( event ) ) { 17456 return; 17457 } 17458 17459 switch ( event.keyCode ) { 17460 case $.ui.keyCode.RIGHT: 17461 case $.ui.keyCode.DOWN: 17462 selectedIndex++; 17463 break; 17464 case $.ui.keyCode.UP: 17465 case $.ui.keyCode.LEFT: 17466 goingForward = false; 17467 selectedIndex--; 17468 break; 17469 case $.ui.keyCode.END: 17470 selectedIndex = this.anchors.length - 1; 17471 break; 17472 case $.ui.keyCode.HOME: 17473 selectedIndex = 0; 17474 break; 17475 case $.ui.keyCode.SPACE: 17476 17477 // Activate only, no collapsing 17478 event.preventDefault(); 17479 clearTimeout( this.activating ); 17480 this._activate( selectedIndex ); 17481 return; 17482 case $.ui.keyCode.ENTER: 17483 17484 // Toggle (cancel delayed activation, allow collapsing) 17485 event.preventDefault(); 17486 clearTimeout( this.activating ); 17487 17488 // Determine if we should collapse or activate 17489 this._activate( selectedIndex === this.options.active ? false : selectedIndex ); 17490 return; 17491 default: 17492 return; 17493 } 17494 17495 // Focus the appropriate tab, based on which key was pressed 17496 event.preventDefault(); 17497 clearTimeout( this.activating ); 17498 selectedIndex = this._focusNextTab( selectedIndex, goingForward ); 17499 17500 // Navigating with control/command key will prevent automatic activation 17501 if ( !event.ctrlKey && !event.metaKey ) { 17502 17503 // Update aria-selected immediately so that AT think the tab is already selected. 17504 // Otherwise AT may confuse the user by stating that they need to activate the tab, 17505 // but the tab will already be activated by the time the announcement finishes. 17506 focusedTab.attr( "aria-selected", "false" ); 17507 this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" ); 17508 17509 this.activating = this._delay( function() { 17510 this.option( "active", selectedIndex ); 17511 }, this.delay ); 17512 } 17513 }, 17514 17515 _panelKeydown: function( event ) { 17516 if ( this._handlePageNav( event ) ) { 17517 return; 17518 } 17519 17520 // Ctrl+up moves focus to the current tab 17521 if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) { 17522 event.preventDefault(); 17523 this.active.trigger( "focus" ); 17524 } 17525 }, 17526 17527 // Alt+page up/down moves focus to the previous/next tab (and activates) 17528 _handlePageNav: function( event ) { 17529 if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) { 17530 this._activate( this._focusNextTab( this.options.active - 1, false ) ); 17531 return true; 17532 } 17533 if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) { 17534 this._activate( this._focusNextTab( this.options.active + 1, true ) ); 17535 return true; 17536 } 17537 }, 17538 17539 _findNextTab: function( index, goingForward ) { 17540 var lastTabIndex = this.tabs.length - 1; 17541 17542 function constrain() { 17543 if ( index > lastTabIndex ) { 17544 index = 0; 17545 } 17546 if ( index < 0 ) { 17547 index = lastTabIndex; 17548 } 17549 return index; 17550 } 17551 17552 while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) { 17553 index = goingForward ? index + 1 : index - 1; 17554 } 17555 17556 return index; 17557 }, 17558 17559 _focusNextTab: function( index, goingForward ) { 17560 index = this._findNextTab( index, goingForward ); 17561 this.tabs.eq( index ).trigger( "focus" ); 17562 return index; 17563 }, 17564 17565 _setOption: function( key, value ) { 17566 if ( key === "active" ) { 17567 17568 // _activate() will handle invalid values and update this.options 17569 this._activate( value ); 17570 return; 17571 } 17572 17573 this._super( key, value ); 17574 17575 if ( key === "collapsible" ) { 17576 this._toggleClass( "ui-tabs-collapsible", null, value ); 17577 17578 // Setting collapsible: false while collapsed; open first panel 17579 if ( !value && this.options.active === false ) { 17580 this._activate( 0 ); 17581 } 17582 } 17583 17584 if ( key === "event" ) { 17585 this._setupEvents( value ); 17586 } 17587 17588 if ( key === "heightStyle" ) { 17589 this._setupHeightStyle( value ); 17590 } 17591 }, 17592 17593 _sanitizeSelector: function( hash ) { 17594 return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : ""; 17595 }, 17596 17597 refresh: function() { 17598 var options = this.options, 17599 lis = this.tablist.children( ":has(a[href])" ); 17600 17601 // Get disabled tabs from class attribute from HTML 17602 // this will get converted to a boolean if needed in _refresh() 17603 options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) { 17604 return lis.index( tab ); 17605 } ); 17606 17607 this._processTabs(); 17608 17609 // Was collapsed or no tabs 17610 if ( options.active === false || !this.anchors.length ) { 17611 options.active = false; 17612 this.active = $(); 17613 17614 // was active, but active tab is gone 17615 } else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) { 17616 17617 // all remaining tabs are disabled 17618 if ( this.tabs.length === options.disabled.length ) { 17619 options.active = false; 17620 this.active = $(); 17621 17622 // activate previous tab 17623 } else { 17624 this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) ); 17625 } 17626 17627 // was active, active tab still exists 17628 } else { 17629 17630 // make sure active index is correct 17631 options.active = this.tabs.index( this.active ); 17632 } 17633 17634 this._refresh(); 17635 }, 17636 17637 _refresh: function() { 17638 this._setOptionDisabled( this.options.disabled ); 17639 this._setupEvents( this.options.event ); 17640 this._setupHeightStyle( this.options.heightStyle ); 17641 17642 this.tabs.not( this.active ).attr( { 17643 "aria-selected": "false", 17644 "aria-expanded": "false", 17645 tabIndex: -1 17646 } ); 17647 this.panels.not( this._getPanelForTab( this.active ) ) 17648 .hide() 17649 .attr( { 17650 "aria-hidden": "true" 17651 } ); 17652 17653 // Make sure one tab is in the tab order 17654 if ( !this.active.length ) { 17655 this.tabs.eq( 0 ).attr( "tabIndex", 0 ); 17656 } else { 17657 this.active 17658 .attr( { 17659 "aria-selected": "true", 17660 "aria-expanded": "true", 17661 tabIndex: 0 17662 } ); 17663 this._addClass( this.active, "ui-tabs-active", "ui-state-active" ); 17664 this._getPanelForTab( this.active ) 17665 .show() 17666 .attr( { 17667 "aria-hidden": "false" 17668 } ); 17669 } 17670 }, 17671 17672 _processTabs: function() { 17673 var that = this, 17674 prevTabs = this.tabs, 17675 prevAnchors = this.anchors, 17676 prevPanels = this.panels; 17677 17678 this.tablist = this._getList().attr( "role", "tablist" ); 17679 this._addClass( this.tablist, "ui-tabs-nav", 17680 "ui-helper-reset ui-helper-clearfix ui-widget-header" ); 17681 17682 // Prevent users from focusing disabled tabs via click 17683 this.tablist 17684 .on( "mousedown" + this.eventNamespace, "> li", function( event ) { 17685 if ( $( this ).is( ".ui-state-disabled" ) ) { 17686 event.preventDefault(); 17687 } 17688 } ) 17689 17690 // Support: IE <9 17691 // Preventing the default action in mousedown doesn't prevent IE 17692 // from focusing the element, so if the anchor gets focused, blur. 17693 // We don't have to worry about focusing the previously focused 17694 // element since clicking on a non-focusable element should focus 17695 // the body anyway. 17696 .on( "focus" + this.eventNamespace, ".ui-tabs-anchor", function() { 17697 if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) { 17698 this.blur(); 17699 } 17700 } ); 17701 17702 this.tabs = this.tablist.find( "> li:has(a[href])" ) 17703 .attr( { 17704 role: "tab", 17705 tabIndex: -1 17706 } ); 17707 this._addClass( this.tabs, "ui-tabs-tab", "ui-state-default" ); 17708 17709 this.anchors = this.tabs.map( function() { 17710 return $( "a", this )[ 0 ]; 17711 } ) 17712 .attr( { 17713 role: "presentation", 17714 tabIndex: -1 17715 } ); 17716 this._addClass( this.anchors, "ui-tabs-anchor" ); 17717 17718 this.panels = $(); 17719 17720 this.anchors.each( function( i, anchor ) { 17721 var selector, panel, panelId, 17722 anchorId = $( anchor ).uniqueId().attr( "id" ), 17723 tab = $( anchor ).closest( "li" ), 17724 originalAriaControls = tab.attr( "aria-controls" ); 17725 17726 // Inline tab 17727 if ( that._isLocal( anchor ) ) { 17728 selector = anchor.hash; 17729 panelId = selector.substring( 1 ); 17730 panel = that.element.find( that._sanitizeSelector( selector ) ); 17731 17732 // remote tab 17733 } else { 17734 17735 // If the tab doesn't already have aria-controls, 17736 // generate an id by using a throw-away element 17737 panelId = tab.attr( "aria-controls" ) || $( {} ).uniqueId()[ 0 ].id; 17738 selector = "#" + panelId; 17739 panel = that.element.find( selector ); 17740 if ( !panel.length ) { 17741 panel = that._createPanel( panelId ); 17742 panel.insertAfter( that.panels[ i - 1 ] || that.tablist ); 17743 } 17744 panel.attr( "aria-live", "polite" ); 17745 } 17746 17747 if ( panel.length ) { 17748 that.panels = that.panels.add( panel ); 17749 } 17750 if ( originalAriaControls ) { 17751 tab.data( "ui-tabs-aria-controls", originalAriaControls ); 17752 } 17753 tab.attr( { 17754 "aria-controls": panelId, 17755 "aria-labelledby": anchorId 17756 } ); 17757 panel.attr( "aria-labelledby", anchorId ); 17758 } ); 17759 17760 this.panels.attr( "role", "tabpanel" ); 17761 this._addClass( this.panels, "ui-tabs-panel", "ui-widget-content" ); 17762 17763 // Avoid memory leaks (#10056) 17764 if ( prevTabs ) { 17765 this._off( prevTabs.not( this.tabs ) ); 17766 this._off( prevAnchors.not( this.anchors ) ); 17767 this._off( prevPanels.not( this.panels ) ); 17768 } 17769 }, 17770 17771 // Allow overriding how to find the list for rare usage scenarios (#7715) 17772 _getList: function() { 17773 return this.tablist || this.element.find( "ol, ul" ).eq( 0 ); 17774 }, 17775 17776 _createPanel: function( id ) { 17777 return $( "<div>" ) 17778 .attr( "id", id ) 17779 .data( "ui-tabs-destroy", true ); 17780 }, 17781 17782 _setOptionDisabled: function( disabled ) { 17783 var currentItem, li, i; 17784 17785 if ( $
vendor: 6,224 bytes, lines 17785-18016
17785.isArray( disabled ) ) { 17786 if ( !disabled.length ) { 17787 disabled = false; 17788 } else if ( disabled.length === this.anchors.length ) { 17789 disabled = true; 17790 } 17791 } 17792 17793 // Disable tabs 17794 for ( i = 0; ( li = this.tabs[ i ] ); i++ ) { 17795 currentItem = $( li ); 17796 if ( disabled === true || $.inArray( i, disabled ) !== -1 ) { 17797 currentItem.attr( "aria-disabled", "true" ); 17798 this._addClass( currentItem, null, "ui-state-disabled" ); 17799 } else { 17800 currentItem.removeAttr( "aria-disabled" ); 17801 this._removeClass( currentItem, null, "ui-state-disabled" ); 17802 } 17803 } 17804 17805 this.options.disabled = disabled; 17806 17807 this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null, 17808 disabled === true ); 17809 }, 17810 17811 _setupEvents: function( event ) { 17812 var events = {}; 17813 if ( event ) { 17814 $.each( event.split( " " ), function( index, eventName ) { 17815 events[ eventName ] = "_eventHandler"; 17816 } ); 17817 } 17818 17819 this._off( this.anchors.add( this.tabs ).add( this.panels ) ); 17820 17821 // Always prevent the default action, even when disabled 17822 this._on( true, this.anchors, { 17823 click: function( event ) { 17824 event.preventDefault(); 17825 } 17826 } ); 17827 this._on( this.anchors, events ); 17828 this._on( this.tabs, { keydown: "_tabKeydown" } ); 17829 this._on( this.panels, { keydown: "_panelKeydown" } ); 17830 17831 this._focusable( this.tabs ); 17832 this._hoverable( this.tabs ); 17833 }, 17834 17835 _setupHeightStyle: function( heightStyle ) { 17836 var maxHeight, 17837 parent = this.element.parent(); 17838 17839 if ( heightStyle === "fill" ) { 17840 maxHeight = parent.height(); 17841 maxHeight -= this.element.outerHeight() - this.element.height(); 17842 17843 this.element.siblings( ":visible" ).each( function() { 17844 var elem = $( this ), 17845 position = elem.css( "position" ); 17846 17847 if ( position === "absolute" || position === "fixed" ) { 17848 return; 17849 } 17850 maxHeight -= elem.outerHeight( true ); 17851 } ); 17852 17853 this.element.children().not( this.panels ).each( function() { 17854 maxHeight -= $( this ).outerHeight( true ); 17855 } ); 17856 17857 this.panels.each( function() { 17858 $( this ).height( Math.max( 0, maxHeight - 17859 $( this ).innerHeight() + $( this ).height() ) ); 17860 } ) 17861 .css( "overflow", "auto" ); 17862 } else if ( heightStyle === "auto" ) { 17863 maxHeight = 0; 17864 this.panels.each( function() { 17865 maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() ); 17866 } ).height( maxHeight ); 17867 } 17868 }, 17869 17870 _eventHandler: function( event ) { 17871 var options = this.options, 17872 active = this.active, 17873 anchor = $( event.currentTarget ), 17874 tab = anchor.closest( "li" ), 17875 clickedIsActive = tab[ 0 ] === active[ 0 ], 17876 collapsing = clickedIsActive && options.collapsible, 17877 toShow = collapsing ? $() : this._getPanelForTab( tab ), 17878 toHide = !active.length ? $() : this._getPanelForTab( active ), 17879 eventData = { 17880 oldTab: active, 17881 oldPanel: toHide, 17882 newTab: collapsing ? $() : tab, 17883 newPanel: toShow 17884 }; 17885 17886 event.preventDefault(); 17887 17888 if ( tab.hasClass( "ui-state-disabled" ) || 17889 17890 // tab is already loading 17891 tab.hasClass( "ui-tabs-loading" ) || 17892 17893 // can't switch durning an animation 17894 this.running || 17895 17896 // click on active header, but not collapsible 17897 ( clickedIsActive && !options.collapsible ) || 17898 17899 // allow canceling activation 17900 ( this._trigger( "beforeActivate", event, eventData ) === false ) ) { 17901 return; 17902 } 17903 17904 options.active = collapsing ? false : this.tabs.index( tab ); 17905 17906 this.active = clickedIsActive ? $() : tab; 17907 if ( this.xhr ) { 17908 this.xhr.abort(); 17909 } 17910 17911 if ( !toHide.length && !toShow.length ) { 17912 $.error( "jQuery UI Tabs: Mismatching fragment identifier." ); 17913 } 17914 17915 if ( toShow.length ) { 17916 this.load( this.tabs.index( tab ), event ); 17917 } 17918 this._toggle( event, eventData ); 17919 }, 17920 17921 // Handles show/hide for selecting tabs 17922 _toggle: function( event, eventData ) { 17923 var that = this, 17924 toShow = eventData.newPanel, 17925 toHide = eventData.oldPanel; 17926 17927 this.running = true; 17928 17929 function complete() { 17930 that.running = false; 17931 that._trigger( "activate", event, eventData ); 17932 } 17933 17934 function show() { 17935 that._addClass( eventData.newTab.closest( "li" ), "ui-tabs-active", "ui-state-active" ); 17936 17937 if ( toShow.length && that.options.show ) { 17938 that._show( toShow, that.options.show, complete ); 17939 } else { 17940 toShow.show(); 17941 complete(); 17942 } 17943 } 17944 17945 // Start out by hiding, then showing, then completing 17946 if ( toHide.length && this.options.hide ) { 17947 this._hide( toHide, this.options.hide, function() { 17948 that._removeClass( eventData.oldTab.closest( "li" ), 17949 "ui-tabs-active", "ui-state-active" ); 17950 show(); 17951 } ); 17952 } else { 17953 this._removeClass( eventData.oldTab.closest( "li" ), 17954 "ui-tabs-active", "ui-state-active" ); 17955 toHide.hide(); 17956 show(); 17957 } 17958 17959 toHide.attr( "aria-hidden", "true" ); 17960 eventData.oldTab.attr( { 17961 "aria-selected": "false", 17962 "aria-expanded": "false" 17963 } ); 17964 17965 // If we're switching tabs, remove the old tab from the tab order. 17966 // If we're opening from collapsed state, remove the previous tab from the tab order. 17967 // If we're collapsing, then keep the collapsing tab in the tab order. 17968 if ( toShow.length && toHide.length ) { 17969 eventData.oldTab.attr( "tabIndex", -1 ); 17970 } else if ( toShow.length ) { 17971 this.tabs.filter( function() { 17972 return $( this ).attr( "tabIndex" ) === 0; 17973 } ) 17974 .attr( "tabIndex", -1 ); 17975 } 17976 17977 toShow.attr( "aria-hidden", "false" ); 17978 eventData.newTab.attr( { 17979 "aria-selected": "true", 17980 "aria-expanded": "true", 17981 tabIndex: 0 17982 } ); 17983 }, 17984 17985 _activate: function( index ) { 17986 var anchor, 17987 active = this._findActive( index ); 17988 17989 // Trying to activate the already active panel 17990 if ( active[ 0 ] === this.active[ 0 ] ) { 17991 return; 17992 } 17993 17994 // Trying to collapse, simulate a click on the current active header 17995 if ( !active.length ) { 17996 active = this.active; 17997 } 17998 17999 anchor = active.find( ".ui-tabs-anchor" )[ 0 ]; 18000 this._eventHandler( { 18001 target: anchor, 18002 currentTarget: anchor, 18003 preventDefault: $.noop 18004 } ); 18005 }, 18006 18007 _findActive: function( index ) { 18008 return index === false ? $() : this.tabs.eq( index ); 18009 }, 18010 18011 _getIndex: function( index ) { 18012 18013 // meta-function to give users option to provide a href string instead of a numerical index. 18014 if ( typeof index === "string" ) { 18015 index = this.anchors.index( this.anchors.filter( "[href$='" + 18016 $.
vendor: 18,892 bytes, lines 18016-18713
18016ui.escapeSelector( index ) + "']" ) ); 18017 } 18018 18019 return index; 18020 }, 18021 18022 _destroy: function() { 18023 if ( this.xhr ) { 18024 this.xhr.abort(); 18025 } 18026 18027 this.tablist 18028 .removeAttr( "role" ) 18029 .off( this.eventNamespace ); 18030 18031 this.anchors 18032 .removeAttr( "role tabIndex" ) 18033 .removeUniqueId(); 18034 18035 this.tabs.add( this.panels ).each( function() { 18036 if ( $.data( this, "ui-tabs-destroy" ) ) { 18037 $( this ).remove(); 18038 } else { 18039 $( this ).removeAttr( "role tabIndex " + 18040 "aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded" ); 18041 } 18042 } ); 18043 18044 this.tabs.each( function() { 18045 var li = $( this ), 18046 prev = li.data( "ui-tabs-aria-controls" ); 18047 if ( prev ) { 18048 li 18049 .attr( "aria-controls", prev ) 18050 .removeData( "ui-tabs-aria-controls" ); 18051 } else { 18052 li.removeAttr( "aria-controls" ); 18053 } 18054 } ); 18055 18056 this.panels.show(); 18057 18058 if ( this.options.heightStyle !== "content" ) { 18059 this.panels.css( "height", "" ); 18060 } 18061 }, 18062 18063 enable: function( index ) { 18064 var disabled = this.options.disabled; 18065 if ( disabled === false ) { 18066 return; 18067 } 18068 18069 if ( index === undefined ) { 18070 disabled = false; 18071 } else { 18072 index = this._getIndex( index ); 18073 if ( $.isArray( disabled ) ) { 18074 disabled = $.map( disabled, function( num ) { 18075 return num !== index ? num : null; 18076 } ); 18077 } else { 18078 disabled = $.map( this.tabs, function( li, num ) { 18079 return num !== index ? num : null; 18080 } ); 18081 } 18082 } 18083 this._setOptionDisabled( disabled ); 18084 }, 18085 18086 disable: function( index ) { 18087 var disabled = this.options.disabled; 18088 if ( disabled === true ) { 18089 return; 18090 } 18091 18092 if ( index === undefined ) { 18093 disabled = true; 18094 } else { 18095 index = this._getIndex( index ); 18096 if ( $.inArray( index, disabled ) !== -1 ) { 18097 return; 18098 } 18099 if ( $.isArray( disabled ) ) { 18100 disabled = $.merge( [ index ], disabled ).sort(); 18101 } else { 18102 disabled = [ index ]; 18103 } 18104 } 18105 this._setOptionDisabled( disabled ); 18106 }, 18107 18108 load: function( index, event ) { 18109 index = this._getIndex( index ); 18110 var that = this, 18111 tab = this.tabs.eq( index ), 18112 anchor = tab.find( ".ui-tabs-anchor" ), 18113 panel = this._getPanelForTab( tab ), 18114 eventData = { 18115 tab: tab, 18116 panel: panel 18117 }, 18118 complete = function( jqXHR, status ) { 18119 if ( status === "abort" ) { 18120 that.panels.stop( false, true ); 18121 } 18122 18123 that._removeClass( tab, "ui-tabs-loading" ); 18124 panel.removeAttr( "aria-busy" ); 18125 18126 if ( jqXHR === that.xhr ) { 18127 delete that.xhr; 18128 } 18129 }; 18130 18131 // Not remote 18132 if ( this._isLocal( anchor[ 0 ] ) ) { 18133 return; 18134 } 18135 18136 this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) ); 18137 18138 // Support: jQuery <1.8 18139 // jQuery <1.8 returns false if the request is canceled in beforeSend, 18140 // but as of 1.8, $.ajax() always returns a jqXHR object. 18141 if ( this.xhr && this.xhr.statusText !== "canceled" ) { 18142 this._addClass( tab, "ui-tabs-loading" ); 18143 panel.attr( "aria-busy", "true" ); 18144 18145 this.xhr 18146 .done( function( response, status, jqXHR ) { 18147 18148 // support: jQuery <1.8 18149 // http://bugs.jquery.com/ticket/11778 18150 setTimeout( function() { 18151 panel.html( response ); 18152 that._trigger( "load", event, eventData ); 18153 18154 complete( jqXHR, status ); 18155 }, 1 ); 18156 } ) 18157 .fail( function( jqXHR, status ) { 18158 18159 // support: jQuery <1.8 18160 // http://bugs.jquery.com/ticket/11778 18161 setTimeout( function() { 18162 complete( jqXHR, status ); 18163 }, 1 ); 18164 } ); 18165 } 18166 }, 18167 18168 _ajaxSettings: function( anchor, event, eventData ) { 18169 var that = this; 18170 return { 18171 18172 // Support: IE <11 only 18173 // Strip any hash that exists to prevent errors with the Ajax request 18174 url: anchor.attr( "href" ).replace( /#.*$/, "" ), 18175 beforeSend: function( jqXHR, settings ) { 18176 return that._trigger( "beforeLoad", event, 18177 $.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) ); 18178 } 18179 }; 18180 }, 18181 18182 _getPanelForTab: function( tab ) { 18183 var id = $( tab ).attr( "aria-controls" ); 18184 return this.element.find( this._sanitizeSelector( "#" + id ) ); 18185 } 18186} ); 18187 18188// DEPRECATED 18189// TODO: Switch return back to widget declaration at top of file when this is removed 18190if ( $.uiBackCompat !== false ) { 18191 18192 // Backcompat for ui-tab class (now ui-tabs-tab) 18193 $.widget( "ui.tabs", $.ui.tabs, { 18194 _processTabs: function() { 18195 this._superApply( arguments ); 18196 this._addClass( this.tabs, "ui-tab" ); 18197 } 18198 } ); 18199} 18200 18201var widgetsTabs = $.ui.tabs; 18202 18203 18204/*! 18205 * jQuery UI Tooltip 1.12.1 18206 * http://jqueryui.com 18207 * 18208 * Copyright jQuery Foundation and other contributors 18209 * Released under the MIT license. 18210 * http://jquery.org/license 18211 */ 18212 18213//>>label: Tooltip 18214//>>group: Widgets 18215//>>description: Shows additional information for any element on hover or focus. 18216//>>docs: http://api.jqueryui.com/tooltip/ 18217//>>demos: http://jqueryui.com/tooltip/ 18218//>>css.structure: ../../themes/base/core.css 18219//>>css.structure: ../../themes/base/tooltip.css 18220//>>css.theme: ../../themes/base/theme.css 18221 18222 18223 18224$.widget( "ui.tooltip", { 18225 version: "1.12.1", 18226 options: { 18227 classes: { 18228 "ui-tooltip": "ui-corner-all ui-widget-shadow" 18229 }, 18230 content: function() { 18231 18232 // support: IE<9, Opera in jQuery <1.7 18233 // .text() can't accept undefined, so coerce to a string 18234 var title = $( this ).attr( "title" ) || ""; 18235 18236 // Escape title, since we're going from an attribute to raw HTML 18237 return $( "<a>" ).text( title ).html(); 18238 }, 18239 hide: true, 18240 18241 // Disabled elements have inconsistent behavior across browsers (#8661) 18242 items: "[title]:not([disabled])", 18243 position: { 18244 my: "left top+15", 18245 at: "left bottom", 18246 collision: "flipfit flip" 18247 }, 18248 show: true, 18249 track: false, 18250 18251 // Callbacks 18252 close: null, 18253 open: null 18254 }, 18255 18256 _addDescribedBy: function( elem, id ) { 18257 var describedby = ( elem.attr( "aria-describedby" ) || "" ).split( /\s+/ ); 18258 describedby.push( id ); 18259 elem 18260 .data( "ui-tooltip-id", id ) 18261 .attr( "aria-describedby", $.trim( describedby.join( " " ) ) ); 18262 }, 18263 18264 _removeDescribedBy: function( elem ) { 18265 var id = elem.data( "ui-tooltip-id" ), 18266 describedby = ( elem.attr( "aria-describedby" ) || "" ).split( /\s+/ ), 18267 index = $.inArray( id, describedby ); 18268 18269 if ( index !== -1 ) { 18270 describedby.splice( index, 1 ); 18271 } 18272 18273 elem.removeData( "ui-tooltip-id" ); 18274 describedby = $.trim( describedby.join( " " ) ); 18275 if ( describedby ) { 18276 elem.attr( "aria-describedby", describedby ); 18277 } else { 18278 elem.removeAttr( "aria-describedby" ); 18279 } 18280 }, 18281 18282 _create: function() { 18283 this._on( { 18284 mouseover: "open", 18285 focusin: "open" 18286 } ); 18287 18288 // IDs of generated tooltips, needed for destroy 18289 this.tooltips = {}; 18290 18291 // IDs of parent tooltips where we removed the title attribute 18292 this.parents = {}; 18293 18294 // Append the aria-live region so tooltips announce correctly 18295 this.liveRegion = $( "<div>" ) 18296 .attr( { 18297 role: "log", 18298 "aria-live": "assertive", 18299 "aria-relevant": "additions" 18300 } ) 18301 .appendTo( this.document[ 0 ].body ); 18302 this._addClass( this.liveRegion, null, "ui-helper-hidden-accessible" ); 18303 18304 this.disabledTitles = $( [] ); 18305 }, 18306 18307 _setOption: function( key, value ) { 18308 var that = this; 18309 18310 this._super( key, value ); 18311 18312 if ( key === "content" ) { 18313 $.each( this.tooltips, function( id, tooltipData ) { 18314 that._updateContent( tooltipData.element ); 18315 } ); 18316 } 18317 }, 18318 18319 _setOptionDisabled: function( value ) { 18320 this[ value ? "_disable" : "_enable" ](); 18321 }, 18322 18323 _disable: function() { 18324 var that = this; 18325 18326 // Close open tooltips 18327 $.each( this.tooltips, function( id, tooltipData ) { 18328 var event = $.Event( "blur" ); 18329 event.target = event.currentTarget = tooltipData.element[ 0 ]; 18330 that.close( event, true ); 18331 } ); 18332 18333 // Remove title attributes to prevent native tooltips 18334 this.disabledTitles = this.disabledTitles.add( 18335 this.element.find( this.options.items ).addBack() 18336 .filter( function() { 18337 var element = $( this ); 18338 if ( element.is( "[title]" ) ) { 18339 return element 18340 .data( "ui-tooltip-title", element.attr( "title" ) ) 18341 .removeAttr( "title" ); 18342 } 18343 } ) 18344 ); 18345 }, 18346 18347 _enable: function() { 18348 18349 // restore title attributes 18350 this.disabledTitles.each( function() { 18351 var element = $( this ); 18352 if ( element.data( "ui-tooltip-title" ) ) { 18353 element.attr( "title", element.data( "ui-tooltip-title" ) ); 18354 } 18355 } ); 18356 this.disabledTitles = $( [] ); 18357 }, 18358 18359 open: function( event ) { 18360 var that = this, 18361 target = $( event ? event.target : this.element ) 18362 18363 // we need closest here due to mouseover bubbling, 18364 // but always pointing at the same event target 18365 .closest( this.options.items ); 18366 18367 // No element to show a tooltip for or the tooltip is already open 18368 if ( !target.length || target.data( "ui-tooltip-id" ) ) { 18369 return; 18370 } 18371 18372 if ( target.attr( "title" ) ) { 18373 target.data( "ui-tooltip-title", target.attr( "title" ) ); 18374 } 18375 18376 target.data( "ui-tooltip-open", true ); 18377 18378 // Kill parent tooltips, custom or native, for hover 18379 if ( event && event.type === "mouseover" ) { 18380 target.parents().each( function() { 18381 var parent = $( this ), 18382 blurEvent; 18383 if ( parent.data( "ui-tooltip-open" ) ) { 18384 blurEvent = $.Event( "blur" ); 18385 blurEvent.target = blurEvent.currentTarget = this; 18386 that.close( blurEvent, true ); 18387 } 18388 if ( parent.attr( "title" ) ) { 18389 parent.uniqueId(); 18390 that.parents[ this.id ] = { 18391 element: this, 18392 title: parent.attr( "title" ) 18393 }; 18394 parent.attr( "title", "" ); 18395 } 18396 } ); 18397 } 18398 18399 this._registerCloseHandlers( event, target ); 18400 this._updateContent( target, event ); 18401 }, 18402 18403 _updateContent: function( target, event ) { 18404 var content, 18405 contentOption = this.options.content, 18406 that = this, 18407 eventType = event ? event.type : null; 18408 18409 if ( typeof contentOption === "string" || contentOption.nodeType || 18410 contentOption.jquery ) { 18411 return this._open( event, target, contentOption ); 18412 } 18413 18414 content = contentOption.call( target[ 0 ], function( response ) { 18415 18416 // IE may instantly serve a cached response for ajax requests 18417 // delay this call to _open so the other call to _open runs first 18418 that._delay( function() { 18419 18420 // Ignore async response if tooltip was closed already 18421 if ( !target.data( "ui-tooltip-open" ) ) { 18422 return; 18423 } 18424 18425 // JQuery creates a special event for focusin when it doesn't 18426 // exist natively. To improve performance, the native event 18427 // object is reused and the type is changed. Therefore, we can't 18428 // rely on the type being correct after the event finished 18429 // bubbling, so we set it back to the previous value. (#8740) 18430 if ( event ) { 18431 event.type = eventType; 18432 } 18433 this._open( event, target, response ); 18434 } ); 18435 } ); 18436 if ( content ) { 18437 this._open( event, target, content ); 18438 } 18439 }, 18440 18441 _open: function( event, target, content ) { 18442 var tooltipData, tooltip, delayedShow, a11yContent, 18443 positionOption = $.extend( {}, this.options.position ); 18444 18445 if ( !content ) { 18446 return; 18447 } 18448 18449 // Content can be updated multiple times. If the tooltip already 18450 // exists, then just update the content and bail. 18451 tooltipData = this._find( target ); 18452 if ( tooltipData ) { 18453 tooltipData.tooltip.find( ".ui-tooltip-content" ).html( content ); 18454 return; 18455 } 18456 18457 // If we have a title, clear it to prevent the native tooltip 18458 // we have to check first to avoid defining a title if none exists 18459 // (we don't want to cause an element to start matching [title]) 18460 // 18461 // We use removeAttr only for key events, to allow IE to export the correct 18462 // accessible attributes. For mouse events, set to empty string to avoid 18463 // native tooltip showing up (happens only when removing inside mouseover). 18464 if ( target.is( "[title]" ) ) { 18465 if ( event && event.type === "mouseover" ) { 18466 target.attr( "title", "" ); 18467 } else { 18468 target.removeAttr( "title" ); 18469 } 18470 } 18471 18472 tooltipData = this._tooltip( target ); 18473 tooltip = tooltipData.tooltip; 18474 this._addDescribedBy( target, tooltip.attr( "id" ) ); 18475 tooltip.find( ".ui-tooltip-content" ).html( content ); 18476 18477 // Support: Voiceover on OS X, JAWS on IE <= 9 18478 // JAWS announces deletions even when aria-relevant="additions" 18479 // Voiceover will sometimes re-read the entire log region's contents from the beginning 18480 this.liveRegion.children().hide(); 18481 a11yContent = $( "<div>" ).html( tooltip.find( ".ui-tooltip-content" ).html() ); 18482 a11yContent.removeAttr( "name" ).find( "[name]" ).removeAttr( "name" ); 18483 a11yContent.removeAttr( "id" ).find( "[id]" ).removeAttr( "id" ); 18484 a11yContent.appendTo( this.liveRegion ); 18485 18486 function position( event ) { 18487 positionOption.of = event; 18488 if ( tooltip.is( ":hidden" ) ) { 18489 return; 18490 } 18491 tooltip.position( positionOption ); 18492 } 18493 if ( this.options.track && event && /^mouse/.test( event.type ) ) { 18494 this._on( this.document, { 18495 mousemove: position 18496 } ); 18497 18498 // trigger once to override element-relative positioning 18499 position( event ); 18500 } else { 18501 tooltip.position( $.extend( { 18502 of: target 18503 }, this.options.position ) ); 18504 } 18505 18506 tooltip.hide(); 18507 18508 this._show( tooltip, this.options.show ); 18509 18510 // Handle tracking tooltips that are shown with a delay (#8644). As soon 18511 // as the tooltip is visible, position the tooltip using the most recent 18512 // event. 18513 // Adds the check to add the timers only when both delay and track options are set (#14682) 18514 if ( this.options.track && this.options.show && this.options.show.delay ) { 18515 delayedShow = this.delayedShow = setInterval( function() { 18516 if ( tooltip.is( ":visible" ) ) { 18517 position( positionOption.of ); 18518 clearInterval( delayedShow ); 18519 } 18520 }, $.fx.interval ); 18521 } 18522 18523 this._trigger( "open", event, { tooltip: tooltip } ); 18524 }, 18525 18526 _registerCloseHandlers: function( event, target ) { 18527 var events = { 18528 keyup: function( event ) { 18529 if ( event.keyCode === $.ui.keyCode.ESCAPE ) { 18530 var fakeEvent = $.Event( event ); 18531 fakeEvent.currentTarget = target[ 0 ]; 18532 this.close( fakeEvent, true ); 18533 } 18534 } 18535 }; 18536 18537 // Only bind remove handler for delegated targets. Non-delegated 18538 // tooltips will handle this in destroy. 18539 if ( target[ 0 ] !== this.element[ 0 ] ) { 18540 events.remove = function() { 18541 this._removeTooltip( this._find( target ).tooltip ); 18542 }; 18543 } 18544 18545 if ( !event || event.type === "mouseover" ) { 18546 events.mouseleave = "close"; 18547 } 18548 if ( !event || event.type === "focusin" ) { 18549 events.focusout = "close"; 18550 } 18551 this._on( true, target, events ); 18552 }, 18553 18554 close: function( event ) { 18555 var tooltip, 18556 that = this, 18557 target = $( event ? event.currentTarget : this.element ), 18558 tooltipData = this._find( target ); 18559 18560 // The tooltip may already be closed 18561 if ( !tooltipData ) { 18562 18563 // We set ui-tooltip-open immediately upon open (in open()), but only set the 18564 // additional data once there's actually content to show (in _open()). So even if the 18565 // tooltip doesn't have full data, we always remove ui-tooltip-open in case we're in 18566 // the period between open() and _open(). 18567 target.removeData( "ui-tooltip-open" ); 18568 return; 18569 } 18570 18571 tooltip = tooltipData.tooltip; 18572 18573 // Disabling closes the tooltip, so we need to track when we're closing 18574 // to avoid an infinite loop in case the tooltip becomes disabled on close 18575 if ( tooltipData.closing ) { 18576 return; 18577 } 18578 18579 // Clear the interval for delayed tracking tooltips 18580 clearInterval( this.delayedShow ); 18581 18582 // Only set title if we had one before (see comment in _open()) 18583 // If the title attribute has changed since open(), don't restore 18584 if ( target.data( "ui-tooltip-title" ) && !target.attr( "title" ) ) { 18585 target.attr( "title", target.data( "ui-tooltip-title" ) ); 18586 } 18587 18588 this._removeDescribedBy( target ); 18589 18590 tooltipData.hiding = true; 18591 tooltip.stop( true ); 18592 this._hide( tooltip, this.options.hide, function() { 18593 that._removeTooltip( $( this ) ); 18594 } ); 18595 18596 target.removeData( "ui-tooltip-open" ); 18597 this._off( target, "mouseleave focusout keyup" ); 18598 18599 // Remove 'remove' binding only on delegated targets 18600 if ( target[ 0 ] !== this.element[ 0 ] ) { 18601 this._off( target, "remove" ); 18602 } 18603 this._off( this.document, "mousemove" ); 18604 18605 if ( event && event.type === "mouseleave" ) { 18606 $.each( this.parents, function( id, parent ) { 18607 $( parent.element ).attr( "title", parent.title ); 18608 delete that.parents[ id ]; 18609 } ); 18610 } 18611 18612 tooltipData.closing = true; 18613 this._trigger( "close", event, { tooltip: tooltip } ); 18614 if ( !tooltipData.hiding ) { 18615 tooltipData.closing = false; 18616 } 18617 }, 18618 18619 _tooltip: function( element ) { 18620 var tooltip = $( "<div>" ).attr( "role", "tooltip" ), 18621 content = $( "<div>" ).appendTo( tooltip ), 18622 id = tooltip.uniqueId().attr( "id" ); 18623 18624 this._addClass( content, "ui-tooltip-content" ); 18625 this._addClass( tooltip, "ui-tooltip", "ui-widget ui-widget-content" ); 18626 18627 tooltip.appendTo( this._appendTo( element ) ); 18628 18629 return this.tooltips[ id ] = { 18630 element: element, 18631 tooltip: tooltip 18632 }; 18633 }, 18634 18635 _find: function( target ) { 18636 var id = target.data( "ui-tooltip-id" ); 18637 return id ? this.tooltips[ id ] : null; 18638 }, 18639 18640 _removeTooltip: function( tooltip ) { 18641 tooltip.remove(); 18642 delete this.tooltips[ tooltip.attr( "id" ) ]; 18643 }, 18644 18645 _appendTo: function( target ) { 18646 var element = target.closest( ".ui-front, dialog" ); 18647 18648 if ( !element.length ) { 18649 element = this.document[ 0 ].body; 18650 } 18651 18652 return element; 18653 }, 18654 18655 _destroy: function() { 18656 var that = this; 18657 18658 // Close open tooltips 18659 $.each( this.tooltips, function( id, tooltipData ) { 18660 18661 // Delegate to close method to handle common cleanup 18662 var event = $.Event( "blur" ), 18663 element = tooltipData.element; 18664 event.target = event.currentTarget = element[ 0 ]; 18665 that.close( event, true ); 18666 18667 // Remove immediately; destroying an open tooltip doesn't use the 18668 // hide animation 18669 $( "#" + id ).remove(); 18670 18671 // Restore the title 18672 if ( element.data( "ui-tooltip-title" ) ) { 18673 18674 // If the title attribute has changed since open(), don't restore 18675 if ( !element.attr( "title" ) ) { 18676 element.attr( "title", element.data( "ui-tooltip-title" ) ); 18677 } 18678 element.removeData( "ui-tooltip-title" ); 18679 } 18680 } ); 18681 this.liveRegion.remove(); 18682 } 18683} ); 18684 18685// DEPRECATED 18686// TODO: Switch return back to widget declaration at top of file when this is removed 18687if ( $.uiBackCompat !== false ) { 18688 18689 // Backcompat for tooltipClass option 18690 $.widget( "ui.tooltip", $.ui.tooltip, { 18691 options: { 18692 tooltipClass: null 18693 }, 18694 _tooltip: function() { 18695 var tooltipData = this._superApply( arguments ); 18696 if ( this.options.tooltipClass ) { 18697 tooltipData.tooltip.addClass( this.options.tooltipClass ); 18698 } 18699 return tooltipData; 18700 } 18701 } ); 18702} 18703 18704var widgetsTooltip = $.ui.tooltip; 18705 18706 18707 18708 18709})); 18710/* 18711 Copyright (C) Federico Zivolo 2019 18712 Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). 18713 */(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.Popper=t()})(this,function(){'use strict';function e(e){return e&&'[object Function]'==={}.toString.call(e)}function t(e,t){if(1!==e.nodeType)return[];var o=e.ownerDocument.defaultView,n=o.getComputedStyle(e,null);return t?n[t]:n}
vendor: 3,236 bytes, line 18713
18713function o(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function n(e){if(!e)return document.body;switch(e.nodeName){case'HTML':case'BODY':return e.ownerDocument.body;case'#document':return e.body;}var i=t(e),r=i.overflow,p=i.overflowX,s=i.overflowY;return /(auto|scroll|overlay)/.test(r+s+p)?e:n(o(e))}function i(e){return e&&e.referenceNode?e.referenceNode:e}function r(e){return 11===e?re:10===e?pe:re||pe}function p(e){if(!e)return document.documentElement;for(var o=r(10)?document.body:null,n=e.offsetParent||null;n===o&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&'BODY'!==i&&'HTML'!==i?-1!==['TH','TD','TABLE'].indexOf(n.nodeName)&&'static'===t(n,'position')?p(n):n:e?e.ownerDocument.documentElement:document.documentElement}function s(e){var t=e.nodeName;return'BODY'!==t&&('HTML'===t||p(e.firstElementChild)===e)}function d(e){return null===e.parentNode?e:d(e.parentNode)}function a(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,n=o?e:t,i=o?t:e,r=document.createRange();r.setStart(n,0),r.setEnd(i,0);var l=r.commonAncestorContainer;if(e!==l&&t!==l||n.contains(i))return s(l)?l:p(l);var f=d(e);return f.host?a(f.host,t):a(e,d(t).host)}function l(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:'top',o='top'===t?'scrollTop':'scrollLeft',n=e.nodeName;if('BODY'===n||'HTML'===n){var i=e.ownerDocument.documentElement,r=e.ownerDocument.scrollingElement||i;return r[o]}return e[o]}function f(e,t){var o=2<arguments.length&&void 0!==arguments[2]&&arguments[2],n=l(t,'top'),i=l(t,'left'),r=o?-1:1;return e.top+=n*r,e.bottom+=n*r,e.left+=i*r,e.right+=i*r,e}function m(e,t){var o='x'===t?'Left':'Top',n='Left'==o?'Right':'Bottom';return parseFloat(e['border'+o+'Width'],10)+parseFloat(e['border'+n+'Width'],10)}function h(e,t,o,n){return ee(t['offset'+e],t['scroll'+e],o['client'+e],o['offset'+e],o['scroll'+e],r(10)?parseInt(o['offset'+e])+parseInt(n['margin'+('Height'===e?'Top':'Left')])+parseInt(n['margin'+('Height'===e?'Bottom':'Right')]):0)}function c(e){var t=e.body,o=e.documentElement,n=r(10)&&getComputedStyle(o);return{height:h('Height',t,o,n),width:h('Width',t,o,n)}}function g(e){return le({},e,{right:e.left+e.width,bottom:e.top+e.height})}function u(e){var o={};try{if(r(10)){o=e.getBoundingClientRect();var n=l(e,'top'),i=l(e,'left');o.top+=n,o.left+=i,o.bottom+=n,o.right+=i}else o=e.getBoundingClientRect()}catch(t){}var p={left:o.left,top:o.top,width:o.right-o.left,height:o.bottom-o.top},s='HTML'===e.nodeName?c(e.ownerDocument):{},d=s.width||e.clientWidth||p.width,a=s.height||e.clientHeight||p.height,f=e.offsetWidth-d,h=e.offsetHeight-a;if(f||h){var u=t(e);f-=m(u,'x'),h-=m(u,'y'),p.width-=f,p.height-=h}return g(p)}function b(e,o){var i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],p=r(10),s='HTML'===o.nodeName,d=u(e),a=u(o),l=n(e),m=t(o),h=parseFloat(m.borderTopWidth,10),c=parseFloat(m.borderLeftWidth,10);i&&s&&(a.top=ee(a.top,0),a.left=ee(a.left,0));var b=g({top:d.top-a.top-h,left:d.left-a.left-c,width:d.width,height:d.height});if(b.marginTop=0,b.marginLeft=0,!p&&s){var w=parseFloat(m.marginTop,10),y=parseFloat(m.marginLeft,10
vendor: 13,566 bytes, line 18713
18713);b.top-=h-w,b.bottom-=h-w,b.left-=c-y,b.right-=c-y,b.marginTop=w,b.marginLeft=y}return(p&&!i?o.contains(l):o===l&&'BODY'!==l.nodeName)&&(b=f(b,o)),b}function w(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o=e.ownerDocument.documentElement,n=b(e,o),i=ee(o.clientWidth,window.innerWidth||0),r=ee(o.clientHeight,window.innerHeight||0),p=t?0:l(o),s=t?0:l(o,'left'),d={top:p-n.top+n.marginTop,left:s-n.left+n.marginLeft,width:i,height:r};return g(d)}function y(e){var n=e.nodeName;if('BODY'===n||'HTML'===n)return!1;if('fixed'===t(e,'position'))return!0;var i=o(e);return!!i&&y(i)}function E(e){if(!e||!e.parentElement||r())return document.documentElement;for(var o=e.parentElement;o&&'none'===t(o,'transform');)o=o.parentElement;return o||document.documentElement}function v(e,t,r,p){var s=4<arguments.length&&void 0!==arguments[4]&&arguments[4],d={top:0,left:0},l=s?E(e):a(e,i(t));if('viewport'===p)d=w(l,s);else{var f;'scrollParent'===p?(f=n(o(t)),'BODY'===f.nodeName&&(f=e.ownerDocument.documentElement)):'window'===p?f=e.ownerDocument.documentElement:f=p;var m=b(f,l,s);if('HTML'===f.nodeName&&!y(l)){var h=c(e.ownerDocument),g=h.height,u=h.width;d.top+=m.top-m.marginTop,d.bottom=g+m.top,d.left+=m.left-m.marginLeft,d.right=u+m.left}else d=m}r=r||0;var v='number'==typeof r;return d.left+=v?r:r.left||0,d.top+=v?r:r.top||0,d.right-=v?r:r.right||0,d.bottom-=v?r:r.bottom||0,d}function x(e){var t=e.width,o=e.height;return t*o}function O(e,t,o,n,i){var r=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf('auto'))return e;var p=v(o,n,r,i),s={top:{width:p.width,height:t.top-p.top},right:{width:p.right-t.right,height:p.height},bottom:{width:p.width,height:p.bottom-t.bottom},left:{width:t.left-p.left,height:p.height}},d=Object.keys(s).map(function(e){return le({key:e},s[e],{area:x(s[e])})}).sort(function(e,t){return t.area-e.area}),a=d.filter(function(e){var t=e.width,n=e.height;return t>=o.clientWidth&&n>=o.clientHeight}),l=0<a.length?a[0].key:d[0].key,f=e.split('-')[1];return l+(f?'-'+f:'')}function L(e,t,o){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null,r=n?E(t):a(t,i(o));return b(o,r,n)}function S(e){var t=e.ownerDocument.defaultView,o=t.getComputedStyle(e),n=parseFloat(o.marginTop||0)+parseFloat(o.marginBottom||0),i=parseFloat(o.marginLeft||0)+parseFloat(o.marginRight||0),r={width:e.offsetWidth+i,height:e.offsetHeight+n};return r}function T(e){var t={left:'right',right:'left',bottom:'top',top:'bottom'};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function C(e,t,o){o=o.split('-')[0];var n=S(e),i={width:n.width,height:n.height},r=-1!==['right','left'].indexOf(o),p=r?'top':'left',s=r?'left':'top',d=r?'height':'width',a=r?'width':'height';return i[p]=t[p]+t[d]/2-n[d]/2,i[s]=o===s?t[s]-n[a]:t[T(s)],i}function D(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function N(e,t,o){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===o});var n=D(e,function(e){return e[t]===o});return e.indexOf(n)}function P(t,o,n){var i=void 0===n?t:t.slice(0,N(t,'name',n));return i.forEach(function(t){t['function']&&console.warn('`modifier.function` is deprecated, use `modifier.fn`!');var n=t['function']||t.fn;t.enabled&&e(n)&&(o.offsets.popper=g(o.offsets.popper),o.offsets.reference=g(o.offsets.reference),o=n(o,t))}),o}function k(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=L(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=O(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=C(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?'fixed':'absolute',e=P(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function W(e,t){return e.some(function(e){var o=e.name,n=e.enabled;return n&&o===t})}function B(e){for(var t=[!1,'ms','Webkit','Moz','O'],o=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<t.length;n++){var i=t[n],r=i?''+i+o:e;if('undefined'!=typeof document.body.style[r])return r}return null}function H(){return this.state.isDestroyed=!0,W(this.modifiers,'applyStyle')&&(this.popper.removeAttribute('x-placement'),this.popper.style.position='',this.popper.style.top='',this.popper.style.left='',this.popper.style.right='',this.popper.style.bottom='',this.popper.style.willChange='',this.popper.style[B('transform')]=''),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function A(e){var t=e.ownerDocument;return t?t.defaultView:window}function M(e,t,o,i){var r='BODY'===e.nodeName,p=r?e.ownerDocument.defaultView:e;p.addEventListener(t,o,{passive:!0}),r||M(n(p.parentNode),t,o,i),i.push(p)}function F(e,t,o,i){o.updateBound=i,A(e).addEventListener('resize',o.updateBound,{passive:!0});var r=n(e);return M(r,'scroll',o.updateBound,o.scrollParents),o.scrollElement=r,o.eventsEnabled=!0,o}function I(){this.state.eventsEnabled||(this.state=F(this.reference,this.options,this.state,this.scheduleUpdate))}function R(e,t){return A(e).removeEventListener('resize',t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener('scroll',t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function U(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=R(this.reference,this.state))}function Y(e){return''!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function V(e,t){Object.keys(t).forEach(function(o){var n='';-1!==['width','height','top','right','bottom','left'].indexOf(o)&&Y(t[o])&&(n='px'),e.style[o]=t[o]+n})}function j(e,t){Object.keys(t).forEach(function(o){var n=t[o];!1===n?e.removeAttribute(o):e.setAttribute(o,t[o])})}function q(e,t){var o=e.offsets,n=o.popper,i=o.reference,r=$,p=function(e){return e},s=r(i.width),d=r(n.width),a=-1!==['left','right'].indexOf(e.placement),l=-1!==e.placement.indexOf('-'),f=t?a||l||s%2==d%2?r:Z:p,m=t?r:p;return{left:f(1==s%2&&1==d%2&&!l&&t?n.left-1:n.left),top:m(n.top),bottom:m(n.bottom),right:f(n.right)}}function K(e,t,o){var n=D(e,function(e){var o=e.name;return o===t}),i=!!n&&e.some(function(e){return e.name===o&&e.enabled&&e.order<n.order});if(!i){var r='`'+t+'`';console.warn('`'+o+'`'+' modifier is required by '+r+' modifier in order to work, be sure to include it before '+r+'!')}return i}function z(e){return'end'===e?'start':'start'===e?'end':e}function G(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o=he.indexOf(e),n=he.slice(o+1).concat(he.slice(0,o));return t?n.reverse():n}function _(e,t,o,n){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+i[1],p=i[2];if(!r)return e;if(0===p.indexOf('%')){var s;switch(p){case'%p':s=o;break;case'%':case'%r':default:s=n;}var d=g(s);return d[t]/100*r}if('vh'===p||'vw'===p){var a;return a='vh'===p?ee(document.documentElement.clientHeight,window.innerHeight||0):ee(document.documentElement.clientWidth,window.innerWidth||0),a/100*r}return r}function X(e,t,o,n){var i=[0,0],r=-1!==['right','left'].indexOf(n),p=e.split(/(\+|\-)/).map(function(e){return e.trim()}),s=p.indexOf(D(p,function(e){return-1!==e.search(/,|\s/)}));p[s]&&-1===p[s].indexOf(',')&&console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');var d=/\s*,\s*|\s+/,a=-1===s?[p]:[p.slice(0,s).concat([p[s].split(d)[0]]),[p[s].split(d)[1]].concat(p.slice(s+1))];return a=a.map(function(e,n){var i=(1===n?!r:r)?'height':'width',p=!1;return e.reduce(function(e,t){return''===e[e.length-1]&&-1!==['+','-'].indexOf(t)?(e[e.length-1]=t,p=!0,e):p?(e[e.length-1]+=t,p=!1,e):e.concat(t)},[]).map(function(e){return _(e,i,t,o)})}),a.forEach(function(e,t){e.forEach(function(o,n){Y(o)&&(i[t]+=o*('-'===e[n-1]?-1:1))})}),i}function J(e,t){var o,n=t.offset,i=e.placement,r=e.offsets,p=r.popper,s=r.reference,d=i.split('-')[0];return o=Y(+n)?[+n,0]:X(n,p,s,d),'left'===d?(p.top+=o[0],p.left-=o[1]):'right'===d?(p.top+=o[0],p.left+=o[1]):'top'===d?(p.left+=o[0],p.top-=o[1]):'bottom'===d&&(p.left+=o[0],p.top+=o[1]),e.popper=p,e}var Q=Math.min,Z=Math.floor,$=Math.round,ee=Math.max,te='undefined'!=typeof window&&'undefined'!=typeof document&&'undefined'!=typeof navigator,oe=function(){for(var e=['Edge','Trident','Firefox'],t=0;t<e.length;t+=1)if(te&&0<=navigator.userAgent.indexOf(e[t]))return 1;return 0}(),ne=te&&window.Promise,ie=ne?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},oe))}},re=te&&!!(window.MSInputMethodContext&&document.documentMode),pe=te&&/MSIE 10/.test(navigator.userAgent),se=function(e,t){if(!(e instanceof t))throw new TypeError('Cannot call a class as a function')},de=function(){function e(e,t){for(var o,n=0;n<t.length;n++)o=t[n],o.enumerable=o.enumerable||!1,o.configurable=!0,'value'in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),ae=function(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e},le=Object.assign||function(e){for(var t,o=1;o<arguments.length;o++)for(var n in t=arguments[o],t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},fe=te&&/Firefox/i.test(navigator.userAgent),me=['auto-start','auto','auto-end','top-start','top','top-end','right-start','right','right-end','bottom-end','bottom','bottom-start','left-end','left','left-start'],he=me.slice(3),ce={FLIP:'flip',CLOCKWISE:'clockwise',COUNTERCLOCKWISE:'counterclockwise'},ge=function(){function t(o,n){var i=this,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};se(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=ie(this.update.bind(this)),this.options=le({},t.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=o&&o.jquery?o[0]:o,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(le({},t.Defaults.modifiers,r.modifiers)).forEach(function(e){i.options.modifiers[e]=le({},t.Defaults.modifiers[e]||{},r.modifiers?r.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return le({name:e},i.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(t){t.enabled&&e(t.onLoad)&&t.onLoad(i.reference,i.popper,i.options,t,i.state)}),this.update();var p=this.options.eventsEnabled;p&&this.enableEventListeners(),this.state.eventsEnabled=p}return de(t,[{key:'update',value:function(){return k.call(this)}},{key:'destroy',value:function(){return H.call(this)}},{key:'enableEventListeners',value:function(){return I.call(this)}},{key:'disableEventListeners',value:function(){return U.call(this)}}]),t}();return ge.Utils=('undefined'==typeof window?global:window).PopperUtils,ge.placements=me,ge.Defaults={placement:'bottom',positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,o=t.split('-')[0],n=t.split('-')[1];if(n){var i=e.offsets,r=i.reference,p=i.popper,s=-1!==['bottom','top'].indexOf(o),d=s?'left':'top',a=s?'width':'height',l={start:ae({},d,r[d]),end:ae({},d,r[d]+r[a]-p[a])};e.offsets.popper=le({},p,l[n])}return e}},offset:{order:200,enabled:!0,fn:J,offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var o=t.boundariesElement||p(e.instance.popper);e.instance.reference===o&&(o=p(o));var n=B('transform'),i=e.instance.popper.style,r=i.top,s=i.left,d=i[n];i.top='',i.left='',i[n]='';var a=v(e.instance.popper,e.instance.reference,t.padding,o,e.positionFixed);i.top=r,i.left=s,i[n]=d,t.boundaries=a;var l=t.priority,f=e.offsets.popper,m={primary:function(e){var o=f[e];return f[e]<a[e]&&!t.escapeWithReference&&(o=ee(f[e],a[e])),ae({},e,o)},secondary:function(e){var o='right'===e?'left':'top',n=f[o];return f[e]>a[e]&&!t.escapeWithReference&&(n=Q(f[o],a[e]-('right'===e?f.width:f.height))),ae({},o,n)}};return l.forEach(function(e){var t=-1===['left','top'].indexOf(e)?'secondary':'primary';f=le({},f,m[t](e))}),e.offsets.popper=f,e},priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,o=t.popper,n=t.reference,i=e.placement.split('-')[0],r=Z,p=-1!==['top','bottom'].indexOf(i),s=p?'right':'bottom',d=p?'left':'top',a=p?'width':'height';return o[s]<r(n[d])&&(e.offsets.popper[d]=r(n[d])-o[a]),o[d]>r(n[s])&&(e.offsets.popper[d]=r(n[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,o){var n;if(!K(e.instance.modifiers,'arrow','keepTogether'))return e;var i=o.element;if('string'==typeof i){if(i=e.instance.popper.querySelector(i),!i)return e;}else if(!e.instance.popper.contains(i))return console.warn('WARNING: `arrow.element` must be child of its popper element!'),e;var r=e.placement.split('-')[0],p=e.offsets,s=p.popper,d=p.reference,a=-1!==['left','right'].indexOf(r),l=a?'height':'width',f=a?'Top':'Left',m=f.toLowerCase(),h=a?'left':'top',c=a?'bottom':'right',u=S(i)[l];d[c]-u<s[m]&&(e.offsets.popper[m]-=s[m]-(d[c]-u)),d[m]+u>s[c]&&(e.offsets.popper[m]+=d[m]+u-s[c]),e.offsets.popper=g(e.offsets.popper);var b=d[m]+d[l]/2-u/2,w=t(e.instance.popper),y=parseFloat(w['margin'+f]
vendor: 2,544 bytes, line 18713
18713,10),E=parseFloat(w['border'+f+'Width'],10),v=b-e.offsets.popper[m]-y-E;return v=ee(Q(s[l]-u,v),0),e.arrowElement=i,e.offsets.arrow=(n={},ae(n,m,$(v)),ae(n,h,''),n),e},element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:function(e,t){if(W(e.instance.modifiers,'inner'))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var o=v(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),n=e.placement.split('-')[0],i=T(n),r=e.placement.split('-')[1]||'',p=[];switch(t.behavior){case ce.FLIP:p=[n,i];break;case ce.CLOCKWISE:p=G(n);break;case ce.COUNTERCLOCKWISE:p=G(n,!0);break;default:p=t.behavior;}return p.forEach(function(s,d){if(n!==s||p.length===d+1)return e;n=e.placement.split('-')[0],i=T(n);var a=e.offsets.popper,l=e.offsets.reference,f=Z,m='left'===n&&f(a.right)>f(l.left)||'right'===n&&f(a.left)<f(l.right)||'top'===n&&f(a.bottom)>f(l.top)||'bottom'===n&&f(a.top)<f(l.bottom),h=f(a.left)<f(o.left),c=f(a.right)>f(o.right),g=f(a.top)<f(o.top),u=f(a.bottom)>f(o.bottom),b='left'===n&&h||'right'===n&&c||'top'===n&&g||'bottom'===n&&u,w=-1!==['top','bottom'].indexOf(n),y=!!t.flipVariations&&(w&&'start'===r&&h||w&&'end'===r&&c||!w&&'start'===r&&g||!w&&'end'===r&&u),E=!!t.flipVariationsByContent&&(w&&'start'===r&&c||w&&'end'===r&&h||!w&&'start'===r&&u||!w&&'end'===r&&g),v=y||E;(m||b||v)&&(e.flipped=!0,(m||b)&&(n=p[d+1]),v&&(r=z(r)),e.placement=n+(r?'-'+r:''),e.offsets.popper=le({},e.offsets.popper,C(e.instance.popper,e.offsets.reference,e.placement)),e=P(e.instance.modifiers,e,'flip'))}),e},behavior:'flip',padding:5,boundariesElement:'viewport',flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,o=t.split('-')[0],n=e.offsets,i=n.popper,r=n.reference,p=-1!==['left','right'].indexOf(o),s=-1===['top','left'].indexOf(o);return i[p?'left':'top']=r[o]-(s?i[p?'width':'height']:0),e.placement=T(t),e.offsets.popper=g(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!K(e.instance.modifiers,'hide','preventOverflow'))return e;var t=e.offsets.reference,o=D(e.instance.modifiers,function(e){return'preventOverflow'===e.name}).boundaries;if(t.bottom<o.top||t.left>o.right||t.top>o.bottom||t.right<o.left){if(!0===e.hide)return e;e.hide=!0,e.attributes['x-out-of-boundaries']=''}else{if(!1===e.hide)return e;e.hide=!1,e.attributes['x-out-of-boundaries']=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var o=t.x,n=t.y,i=e.offsets.popper,r=D(e.instance.modifiers,function(e){return'applyStyle'===e.name}).gpuAcceleration;
18713void 0!==r&&console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');var s,d,a=void 0===r?t.gpuAcceleration:r,l=p(e.instance.popper),f=u(l),m={position:i.position},h=q(e,2>window.devicePixelRatio||!fe),c='bottom'===o?'top':'bottom',g='right'===n?'left':'right',b=B('transform');if(d='bottom'==c?'HTML'===l.nodeName?-l.clientHeight+h.bottom:-f.height+h.bottom:h.top,s='right'==g?'HTML'===l.nodeName?-l.clientWidth+h.right:-f.width+h.right:h.left,a&&b)m[b]='translate3d('+s+'px, '+d+'px, 0)',m[c]=0,m[g]=0,m.willChange='transform';else{var w='bottom'==c?-1:1,y='right'==g?-1:1;m[c]=d*w,m[g]=s*y,m.willChange=c+', '+g}var E={"x-placement":e.placement};return e.attributes=le({},E,e.attributes),e.styles=le({},m,e.styles),e.arrowStyles=le({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:'bottom',y:'right'},applyStyle:{order:900,enabled:!0,fn:function(e){return V(e.instance.popper,e.styles),j(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&V(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,o,n,i){var r=L(i,t,e,o.positionFixed),p=O(o.placement,r,t,e,o.modifiers.flip.boundariesElement,o.modifiers.flip.padding);return t.setAttribute('x-placement',p),V(t,{position:o.positionFixed?'fixed':'absolute'}),o},gpuAcceleration:void 0}}},ge}); 18714//# sourceMappingURL=popper.min.js.map 18715 18716/*! 18717 * Bootstrap v4.0.0 (https://getbootstrap.com) 18718 * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 18719 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 18720 */ 18721!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e(t.bootstrap={},t.jQuery,t.Popper)}(this,function(t,e,n){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function s(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}e=e&&e.hasOwnProperty("default")?e.default:e,n=n&&n.hasOwnProperty("default")?n.default:n;var o,a,l,h,c,u,f,d,_,g,p,m,v,E,T,y,C,I,A,b,D,S,w,N,O,k,P=function(t){var e=!1;function n(e){var n=this,s=!1;return t(this).one(i.TRANSITION_END,function(){s=!0}),setTimeout(function(){s||i.triggerTransitionEnd(n)},e),this}var i={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(e){var n,i=e.getAttribute("data-target");i&&"#"!==i||(i=e.getAttribute("href")||""),"#"===i.charAt(0)&&(n=i,i=n="function"==typeof t.escapeSelector?t.escapeSelector(n).substr(1):n.replace(/(:|\.|\[|\]|,|=|@)/g,"\\$1"));try{return t(document).find(i).length>0?i:null}catch(t){return null}},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(n){t(n).trigger(e.end)},supportsTransitionEnd:function(){return Boolean(e)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var s in n)if(Object.prototype.hasOwnProperty.call(n,s)){var r=n[s],o=e[s],a=o&&i.isElement(o)?"element":(l=o,{}.toString.call(l).match(/\s([a-zA-Z]+)/)[1].toLowerCase());if(!new RegExp(r).test(a))throw new Error(t.toUpperCase()+': Option "'+s+'" provided type "'+a+'" but expected type "'+r+'".')}var l}};return e=("undefined"==typeof window||!window.QUnit)&&{end:"transitionend"},t.fn.emulateTransitionEnd=n,i.supportsTransitionEnd()&&(t.event.special[i.TRANSITION_END]={bindType:e.end,delegateType:e.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}}),i}(e),L=(a="alert",h="."+(l="bs.alert"),c=(o=e).fn[a],u={CLOSE:"close"+h,CLOSED:"closed"+h,CLICK_DATA_API:"click"+h+".data-api"},f="alert",d="fade",_="show",g=function(){function t(t){this._element=t}var e=t.prototype;return e.close=function(t){t=t||this._element;var e=this._getRootElement(t);this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},e.dispose=function(){o.removeData(this._element,l),this._element=null},e._getRootElement=function(t){var e=P.getSelectorFromElement(t),n=!1;return e&&(n=o(e)[0]),n||(n=o(t).closest("."+f)[0]),n},e._triggerCloseEvent=function(t){var e=o.Event(u.CLOSE);return o(t).trigger(e),e},e._removeElement=function(t){var e=this;o(t).removeClass(_),P.supportsTransitionEnd()&&o(t).hasClass(d)?o(t).one(P.TRANSITION_END,function(n){return e._destroyElement(t,n)}).emulateTransitionEnd(150):this._destroyElement(t)},e._destroyElement=function(t){o(t).detach().trigger(u.CLOSED).remove()},t._jQueryInterface=function(e){return this.each(function(){var n=o(this),i=n.data(l);i||(i=new t(this),n.data(l,i)),"close"===e&&i[e](this)})},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},s(t,null,[{key:"VERSION",get:function(){return"4.0.0"}}]),t}(),o(document).on(u.CLICK_DATA_API,'[data-dismiss="alert"]',g._handleDismiss(new g)),o.fn[a]=g._jQueryInterface,o.fn[a].Constructor=g,o.fn[a].noConflict=function(){return o.fn[a]=c,g._jQueryInterface},g),R=(m="button",E="."+(v="bs.button"),T=".data-api",y=(p=e).fn[m],C="active",I="btn",A="focus",b='[data-toggle^="button"]',D='[data-toggle="buttons"]',S="input",w=".active",N=".btn",O={CLICK_DATA_API:"click"+E+T,FOCUS_BLUR_DATA_API:"focus"+E+T+" blur"+E+T},k=function(){function t(t){this._element=t}var e=t.prototype;return e.toggle=function(){var t=!0,e=!0,n=p(this._element).closest(D)[0];if(n){var i=p(this._element).find(S)[0];if(i){if("radio"===i.type)if(i.checked&&p(this._element).hasClass(C))t=!1;else{var s=p(n).find(w)[0];s&&p(s).removeClass(C)}if(t){if(i.hasAttribute("disabled")||n.hasAttribute("disabled")||i.classList.contains("disabled")||n.classList.contains("disabled"))return;i.checked=!p(this._element).hasClass(C),p(i).trigger("change")}i.focus(),e=!1}}e&&this._element.setAttribute("aria-pressed",!p(this._element).hasClass(C)),t&&p(this._element).toggleClass(C)},e.dispose=function(){p.removeData(this._element,v),this._element=null},t._jQueryInterface=function(e){return this.each(function(){var n=p(this).data(v);n||(n=new t(this),p(this).data(v,n)),"toggle"===e&&n[e]()})},s(t,null,[{key:"VERSION",get:function(){return"4.0.0"}}]),t}(),p(document).on(O.CLICK_DATA_API,b,function(t){t.preventDefault();var e=t.target;p(e).hasClass(I)||(e=p(e).closest(N)),k._jQueryInterface.call(p(e),"toggle")}).on(O.FOCUS_BLUR_DATA_API,b,function(t){var e=p(t.target).closest(N)[0];p(e).toggleClass(A,/^focus(in)?$/.test(t.type))}),p.fn[m]=k._jQueryInterface,p.fn[m].Constructor=k,p.fn[m].noConflict=function(){return p.fn[m]=y,k._jQueryInterface},k),j=function(t){var e="carousel",n="bs.carousel",i="."+n,o=t.fn[e],a={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},l={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},h="next",c="prev",u="left",f="right",d={SLIDE:"slide"+i,SLID:"slid"+i,KEYDOWN:"keydown"+i,MOUSEENTER:"mouseenter"+i,MOUSELEAVE:"mouseleave"+i,TOUCHEND:"touchend"+i,LOAD_DATA_API:"load"+i+".data-api",CLICK_DATA_API:"click"+i+".data-api"},_="carousel",g="active",p="slide",m="carousel-item-right",v="carousel-item-left",E="carousel-item-next",T="carousel-item-prev",y={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",NEXT_PREV:".carousel-item-next, .carousel-item-prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-sli
18721de], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},C=function(){function o(e,n){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this._config=this._getConfig(n),this._element=t(e)[0],this._indicatorsElement=t(this._element).find(y.INDICATORS)[0],this._addEventListeners()}var C=o.prototype;return C.next=function(){this._isSliding||this._slide(h)},C.nextWhenVisible=function(){!document.hidden&&t(this._element).is(":visible")&&"hidden"!==t(this._element).css("visibility")&&this.next()},C.prev=function(){this._isSliding||this._slide(c)},C.pause=function(e){e||(this._isPaused=!0),t(this._element).find(y.NEXT_PREV)[0]&&P.supportsTransitionEnd()&&(P.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},C.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},C.to=function(e){var n=this;this._activeElement=t(this._element).find(y.ACTIVE_ITEM)[0];var i=this._getItemIndex(this._activeElement);if(!(e>this._items.length-1||e<0))if(this._isSliding)t(this._element).one(d.SLID,function(){return n.to(e)});else{if(i===e)return this.pause(),void this.cycle();var s=e>i?h:c;this._slide(s,this._items[e])}},C.dispose=function(){t(this._element).off(i),t.removeData(this._element,n),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},C._getConfig=function(t){return t=r({},a,t),P.typeCheckConfig(e,t,l),t},C._addEventListeners=function(){var e=this;this._config.keyboard&&t(this._element).on(d.KEYDOWN,function(t){return e._keydown(t)}),"hover"===this._config.pause&&(t(this._element).on(d.MOUSEENTER,function(t){return e.pause(t)}).on(d.MOUSELEAVE,function(t){return e.cycle(t)}),"ontouchstart"in document.documentElement&&t(this._element).on(d.TOUCHEND,function(){e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout(function(t){return e.cycle(t)},500+e._config.interval)}))},C._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},C._getItemIndex=function(e){return this._items=t.makeArray(t(e).parent().find(y.ITEM)),this._items.indexOf(e)},C._getItemByDirection=function(t,e){var n=t===h,i=t===c,s=this._getItemIndex(e),r=this._items.length-1;if((i&&0===s||n&&s===r)&&!this._config.wrap)return e;var o=(s+(t===c?-1:1))%this._items.length;return-1===o?this._items[this._items.length-1]:this._items[o]},C._triggerSlideEvent=function(e,n){var i=this._getItemIndex(e),s=this._getItemIndex(t(this._element).find(y.ACTIVE_ITEM)[0]),r=t.Event(d.SLIDE,{relatedTarget:e,direction:n,from:s,to:i});return t(this._element).trigger(r),r},C._setActiveIndicatorElement=function(e){if(this._indicatorsElement){t(this._indicatorsElement).find(y.ACTIVE).removeClass(g);var n=this._indicatorsElement.children[this._getItemIndex(e)];n&&t(n).addClass(g)}},C._slide=function(e,n){var i,s,r,o=this,a=t(this._element).find(y.ACTIVE_ITEM)[0],l=this._getItemIndex(a),c=n||a&&this._getItemByDirection(e,a),_=this._getItemIndex(c),C=Boolean(this._interval);if(e===h?(i=v,s=E,r=u):(i=m,s=T,r=f),c&&t(c).hasClass(g))this._isSliding=!1;else if(!this._triggerSlideEvent(c,r).isDefaultPrevented()&&a&&c){this._isSliding=!0,C&&this.pause(),this._setActiveIndicatorElement(c);var I=t.Event(d.SLID,{relatedTarget:c,direction:r,from:l,to:_});P.supportsTransitionEnd()&&t(this._element).hasClass(p)?(t(c).addClass(s),P.reflow(c),t(a).addClass(i),t(c).addClass(i),t(a).one(P.TRANSITION_END,function(){t(c).removeClass(i+" "+s).addClass(g),t(a).removeClass(g+" "+s+" "+i),o._isSliding=!1,setTimeout(function(){return t(o._element).trigger(I)},0)}).emulateTransitionEnd(600)):(t(a).removeClass(g),t(c).addClass(g),this._isSliding=!1,t(this._element).trigger(I)),C&&this.cycle()}},o._jQueryInterface=function(e){return this.each(function(){var i=t(this).data(n),s=r({},a,t(this).data());"object"==typeof e&&(s=r({},s,e));var l="string"==typeof e?e:s.slide;if(i||(i=new o(this,s),t(this).data(n,i)),"number"==typeof e)i.to(e);else if("string"==typeof l){if("undefined"==typeof i[l])throw new TypeError('No method n
18721amed "'+l+'"');i[l]()}else s.interval&&(i.pause(),i.cycle())})},o._dataApiClickHandler=function(e){var i=P.getSelectorFromElement(this);if(i){var s=t(i)[0];if(s&&t(s).hasClass(_)){var a=r({},t(s).data(),t(this).data()),l=this.getAttribute("data-slide-to");l&&(a.interval=!1),o._jQueryInterface.call(t(s),a),l&&t(s).data(n).to(l),e.preventDefault()}}},s(o,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return a}}]),o}();return t(document).on(d.CLICK_DATA_API,y.DATA_SLIDE,C._dataApiClickHandler),t(window).on(d.LOAD_DATA_API,function(){t(y.DATA_RIDE).each(function(){var e=t(this);C._jQueryInterface.call(e,e.data())})}),t.fn[e]=C._jQueryInterface,t.fn[e].Constructor=C,t.fn[e].noConflict=function(){return t.fn[e]=o,C._jQueryInterface},C}(e),H=function(t){var e="collapse",n="bs.collapse",i="."+n,o=t.fn[e],a={toggle:!0,parent:""},l={toggle:"boolean",parent:"(string|element)"},h={SHOW:"show"+i,SHOWN:"shown"+i,HIDE:"hide"+i,HIDDEN:"hidden"+i,CLICK_DATA_API:"click"+i+".data-api"},c="show",u="collapse",f="collapsing",d="collapsed",_="width",g="height",p={ACTIVES:".show, .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},m=function(){function i(e,n){this._isTransitioning=!1,this._element=e,this._config=this._getConfig(n),this._triggerArray=t.makeArray(t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'));for(var i=t(p.DATA_TOGGLE),s=0;s<i.length;s++){var r=i[s],o=P.getSelectorFromElement(r);null!==o&&t(o).filter(e).length>0&&(this._selector=o,this._triggerArray.push(r))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var o=i.prototype;return o.toggle=function(){t(this._element).hasClass(c)?this.hide():this.show()},o.show=function(){var e,s,r=this;if(!this._isTransitioning&&!t(this._element).hasClass(c)&&(this._parent&&0===(e=t.makeArray(t(this._parent).find(p.ACTIVES).filter('[data-parent="'+this._config.parent+'"]'))).length&&(e=null),!(e&&(s=t(e).not(this._selector).data(n))&&s._isTransitioning))){var o=t.Event(h.SHOW);if(t(this._element).trigger(o),!o.isDefaultPrevented()){e&&(i._jQueryInterface.call(t(e).not(this._selector),"hide"),s||t(e).data(n,null));var a=this._getDimension();t(this._element).removeClass(u).addClass(f),this._element.style[a]=0,this._triggerArray.length>0&&t(this._triggerArray).removeClass(d).attr("aria-expanded",!0),this.setTransitioning(!0);var l=function(){t(r._element).removeClass(f).addClass(u).addClass(c),r._element.style[a]="",r.setTransitioning(!1),t(r._element).trigger(h.SHOWN)};if(P.supportsTransitionEnd()){var _="scroll"+(a[0].toUpperCase()+a.slice(1));t(this._element).one(P.TRANSITION_END,l).emulateTransitionEnd(600),this._element.style[a]=this._element[_]+"px"}else l()}}},o.hide=function(){var e=this;if(!this._isTransitioning&&t(this._element).hasClass(c)){var n=t.Event(h.HIDE);if(t(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension();if(this._element.style[i]=this._element.getBoundingClientRect()[i]+"px",P.reflow(this._element),t(this._element).addClass(f).removeClass(u).removeClass(c),this._triggerArray.length>0)for(var s=0;s<this._triggerArray.length;s++){var r=this._triggerArray[s],o=P.getSelectorFromElement(r);if(null!==o)t(o).hasClass(c)||t(r).addClass(d).attr("aria-expanded",!1)}this.setTransitioning(!0);var a=function(){e.setTransitioning(!1),t(e._element).removeClass(f).addClass(u).trigger(h.HIDDEN)};this._element.style[i]="",P.supportsTransitionEnd()?t(this._element).one(P.TRANSITION_END,a).emulateTransitionEnd(600):a()}}},o.setTransitioning=function(t){this._isTransitioning=t},o.dispose=function(){t.removeData(this._element,n),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},o._getConfig=function(t){return(t=r({},a,t)).toggle=Boolean(t.toggle),P.typeCheckConfig(e,t,l),t},o._getDimension=function(){return t(this._element).hasClass(_)?_:g},o._getParent=function(){var e=this,n=null;P.isElement(this._config.parent)?(n=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(n=this._config.parent[0])):n=t(this._config.parent)[0];var s='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return t(n).find(s).each(function(t,n){e._addAriaAndCollapsedClass(i._getTargetFromElement(n),[n])}),n},o._addAriaAndCollapsedClass=function(e,n){if(e){var i=t(e).hasClass(c);n.length>0&&t(n).toggleClass(d,!i).attr("aria-expanded",i)}},i._getTargetFromElement=function(e){var n=P.getSelectorFromElement(e);return n?t(n)[0]:null},i._jQueryInterface=function(e){return this.each(function(){var s=t(this),o=s.data(n),l=r({},a,s.data(),"object"==typeof e&&e);if(!o&&l.toggle&&/show|hide/.test(e)&&(l.toggle=!1),o||(o=new i(this,l),s.data(n,o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method n
18721amed "'+e+'"');o[e]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return a}}]),i}();return t(document).on(h.CLICK_DATA_API,p.DATA_TOGGLE,function(e){"A"===e.currentTarget.tagName&&e.preventDefault();var i=t(this),s=P.getSelectorFromElement(this);t(s).each(function(){var e=t(this),s=e.data(n)?"toggle":i.data();m._jQueryInterface.call(e,s)})}),t.fn[e]=m._jQueryInterface,t.fn[e].Constructor=m,t.fn[e].noConflict=function(){return t.fn[e]=o,m._jQueryInterface},m}(e),W=function(t){var e="dropdown",i="bs.dropdown",o="."+i,a=".data-api",l=t.fn[e],h=new RegExp("38|40|27"),c={HIDE:"hide"+o,HIDDEN:"hidden"+o,SHOW:"show"+o,SHOWN:"shown"+o,CLICK:"click"+o,CLICK_DATA_API:"click"+o+a,KEYDOWN_DATA_API:"keydown"+o+a,KEYUP_DATA_API:"keyup"+o+a},u="disabled",f="show",d="dropup",_="dropright",g="dropleft",p="dropdown-menu-right",m="dropdown-menu-left",v="position-static",E='[data-toggle="dropdown"]',T=".dropdown form",y=".dropdown-menu",C=".navbar-nav",I=".dropdown-menu .dropdown-item:not(.disabled)",A="top-start",b="top-end",D="bottom-start",S="bottom-end",w="right-start",N="left-start",O={offset:0,flip:!0,boundary:"scrollParent"},k={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)"},L=function(){function a(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var l=a.prototype;return l.toggle=function(){if(!this._element.disabled&&!t(this._element).hasClass(u)){var e=a._getParentFromElement(this._element),i=t(this._menu).hasClass(f);if(a._clearMenus(),!i){var s={relatedTarget:this._element},r=t.Event(c.SHOW,s);if(t(e).trigger(r),!r.isDefaultPrevented()){if(!this._inNavbar){if("undefined"==typeof n)throw new TypeError("Bootstrap dropdown require Popper.js (https://popper.js.org)");var o=this._element;t(e).hasClass(d)&&(t(this._menu).hasClass(m)||t(this._menu).hasClass(p))&&(o=e),"scrollParent"!==this._config.boundary&&t(e).addClass(v),this._popper=new n(o,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===t(e).closest(C).length&&t("body").children().on("mouseover",null,t.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),t(this._menu).toggleClass(f),t(e).toggleClass(f).trigger(t.Event(c.SHOWN,s))}}}},l.dispose=function(){t.removeData(this._element,i),t(this._element).off(o),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},l.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},l._addEventListeners=function(){var e=this;t(this._element).on(c.CLICK,function(t){t.preventDefault(),t.stopPropagation(),e.toggle()})},l._getConfig=function(n){return n=r({},this.constructor.Default,t(this._element).data(),n),P.typeCheckConfig(e,n,this.constructor.DefaultType),n},l._getMenuElement=function(){if(!this._menu){var e=a._getParentFromElement(this._element);this._menu=t(e).find(y)[0]}return this._menu},l._getPlacement=function(){var e=t(this._element).parent(),n=D;return e.hasClass(d)?(n=A,t(this._menu).hasClass(p)&&(n=b)):e.hasClass(_)?n=w:e.hasClass(g)?n=N:t(this._menu).hasClass(p)&&(n=S),n},l._detectNavbar=function(){return t(this._element).closest(".navbar").length>0},l._getPopperConfig=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=r({},e.offsets,t._config.offset(e.offsets)||{}),e}:e.offset=this._config.offset,{placement:this._getPlacement(),modifiers:{offset:e,flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}}},a._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(i);if(n||(n=new a(this,"object"==typeof e?e:null),t(this).data(i,n)),"string"==typeof e){if("undefined"==typeof n[e])throw new TypeError('No method named "'+e+'"');n[e]()}})},a._clearMenus=function(e){if(!e||3!==e.which&&("keyup"!==e.type||9===e.which))for(var n=t.makeArray(t(E)),s=0;s<n.length;s++){var r=a._getParentFromElement(n[s]),o=t(n[s]).data(i),l={relatedTarget:n[s]};if(o){var h=o._menu;if(t(r).hasClass(f)&&!(e&&("click"===e.type&&/input|textarea/i.test(e.target.tagName)||"keyup"===e.type&&9===e.which)&&t.contains(r,e.target))){var u=t.Event(c.HIDE,l);t(r).trigger(u),u.isDefaultPrevented()||("ontouchstart"in document.documentElement&&t("body").children().off("mouseover",null,t.noop),n[s].setAttribute("aria-expanded","fal
18721se"),t(h).removeClass(f),t(r).removeClass(f).trigger(t.Event(c.HIDDEN,l)))}}}},a._getParentFromElement=function(e){var n,i=P.getSelectorFromElement(e);return i&&(n=t(i)[0]),n||e.parentNode},a._dataApiKeydownHandler=function(e){if((/input|textarea/i.test(e.target.tagName)?!(32===e.which||27!==e.which&&(40!==e.which&&38!==e.which||t(e.target).closest(y).length)):h.test(e.which))&&(e.preventDefault(),e.stopPropagation(),!this.disabled&&!t(this).hasClass(u))){var n=a._getParentFromElement(this),i=t(n).hasClass(f);if((i||27===e.which&&32===e.which)&&(!i||27!==e.which&&32!==e.which)){var s=t(n).find(I).get();if(0!==s.length){var r=s.indexOf(e.target);38===e.which&&r>0&&r--,40===e.which&&r<s.length-1&&r++,r<0&&(r=0),s[r].focus()}}else{if(27===e.which){var o=t(n).find(E)[0];t(o).trigger("focus")}t(this).trigger("click")}}},s(a,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return O}},{key:"DefaultType",get:function(){return k}}]),a}();return t(document).on(c.KEYDOWN_DATA_API,E,L._dataApiKeydownHandler).on(c.KEYDOWN_DATA_API,y,L._dataApiKeydownHandler).on(c.CLICK_DATA_API+" "+c.KEYUP_DATA_API,L._clearMenus).on(c.CLICK_DATA_API,E,function(e){e.preventDefault(),e.stopPropagation(),L._jQueryInterface.call(t(this),"toggle")}).on(c.CLICK_DATA_API,T,function(t){t.stopPropagation()}),t.fn[e]=L._jQueryInterface,t.fn[e].Constructor=L,t.fn[e].noConflict=function(){return t.fn[e]=l,L._jQueryInterface},L}(e),M=function(t){var e="modal",n="bs.modal",i="."+n,o=t.fn.modal,a={backdrop:!0,keyboard:!0,focus:!0,show:!0},l={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},h={HIDE:"hide"+i,HIDDEN:"hidden"+i,SHOW:"show"+i,SHOWN:"shown"+i,FOCUSIN:"focusin"+i,RESIZE:"resize"+i,CLICK_DISMISS:"click.dismiss"+i,KEYDOWN_DISMISS:"keydown.dismiss"+i,MOUSEUP_DISMISS:"mouseup.dismiss"+i,MOUSEDOWN_DISMISS:"mousedown.dismiss"+i,CLICK_DATA_API:"click"+i+".data-api"},c="modal-scrollbar-measure",u="modal-backdrop",f="modal-open",d="fade",_="show",g={DIALOG:".modal-dialog",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"},p=function(){function o(e,n){this._config=this._getConfig(n),this._element=e,this._dialog=t(e).find(g.DIALOG)[0],this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._originalBodyPadding=0,this._scrollbarWidth=0}var p=o.prototype;return p.toggle=function(t){return this._isShown?this.hide():this.show(t)},p.show=function(e){var n=this;if(!this._isTransitioning&&!this._isShown){P.supportsTransitionEnd()&&t(this._element).hasClass(d)&&(this._isTransitioning=!0);var i=t.Event(h.SHOW,{relatedTarget:e});t(this._element).trigger(i),this._isShown||i.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),t(document.body).addClass(f),this._setEscapeEvent(),this._setResizeEvent(),t(this._element).on(h.CLICK_DISMISS,g.DATA_DISMISS,function(t){return n.hide(t)}),t(this._dialog).on(h.MOUSEDOWN_DISMISS,function(){t(n._element).one(h.MOUSEUP_DISMISS,function(e){t(e.target).is(n._element)&&(n._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return n._showElement(e)}))}},p.hide=function(e){var n=this;if(e&&e.preventDefault(),!this._isTransitioning&&this._isShown){var i=t.Event(h.HIDE);if(t(this._element).trigger(i),this._isShown&&!i.isDefaultPrevented()){this._isShown=!1;var s=P.supportsTransitionEnd()&&t(this._element).hasClass(d);s&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),t(document).off(h.FOCUSIN),t(this._element).removeClass(_),t(this._element).off(h.CLICK_DISMISS),t(this._dialog).off(h.MOUSEDOWN_DISMISS),s?t(this._element).one(P.TRANSITION_END,function(t){return n._hideModal(t)}).emulateTransitionEnd(300):this._hideModal()}}},p.dispose=function(){t.removeData(this._element,n),t(window,document,this._element,this._backdrop).off(i),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._scrollbarWidth=null},p.handleUpdate=function(){this._adjustDialog()},p._getConfig=function(t){return t=r({},a,t),P.typeCheckConfig(e,t,l),t},p._showElement=function(e){var n=this,i=P.supportsTransitionEnd()&&t(this._element).hasClass(d);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.scrollTop=0,i&&P.reflow(this._element),t(this._element).addClass(_),this._config.focus&&this._enforceFocus();var s=t.Event(h.SHOWN,{relatedTarget:e}),r=function(){n._config.focus&&n._element.focus(),n._isTransitioning=!1,t(n._element).trigger(s)};i?t(this._dialog).one(P.TRANSITION_END,r).emulateTransitionEnd(300):r()},p._enforceFocus=function(){var e=this;t(document).off(h.FOCUSIN).on(h.FOCUSIN,function(n){document!==n.target&&e._element!==n.target&&0===t(e._element).has(n.target).length&&e._element.focus()})},p._setEscapeEvent=function(){var e=this;this._isShown&&this._config.keyboard?t(this._element).on(h.KEYDOWN_DISMISS,function(t){27===t.which&&(t.preventDefault(),e.hide())}):this._isShown||t(this._element).off(h.KEYDOWN_DISMISS)},p._setResizeEvent=function(){var e=this;this._isShown?t(window).on(h.RESIZE,function(t){return e.handleUpdate(t)}):t(window).off(h.RESIZE)},p._hideModal=function(){var e=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1,this._showBackdrop(function(){t(document.body).removeClass(f),e._resetAdjustments(),e._resetScrollbar(),t(e._element).trigger(h.HIDDEN)})},p._removeBackdrop=function(){this._backdrop&&(t(this._backdrop).remove(),this._backdrop=null)},p._showBackdrop=function(e){var n=this,i=t(this._element).hasClass(d)?d:"";if(this._isShown&&this._config.backdrop){var s=P.supportsTransitionEnd()&&i;if(this._backdrop=document.createElement("div"),this._backdrop.className=u,i&&t(this._backdrop).addClass(i),t(this._backdrop).appendTo(document.body),t(this._element).on(h.CLICK_DISMISS,function(t){n._ignoreBackdropClick?n._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===n._config.backdrop?n._element.focus():n.hide())}),s&&P.reflow(this._backdrop),t(this._backdrop).addClass(_),!e)return;if(!s)return void e();t(this._backdrop).one(P.TRANSITION_END,e).emulateTransitionEnd(150)}else if(!this._isShown&&this._backdrop){t(this._backdrop).removeClass(_);var r=function(){n._removeBackdrop(),e&&e()};P.supportsTransitionEnd()&&t(this._element).hasClass(d)?t(this._backdrop).one(P.TRANSITION_END,r).emulateTransitionEnd(150):r()}else e&&e()},p._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},p._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},p._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},p._setScrollbar=function(){var e=this;if(this._isBodyOverflowing){t(g.FIXED_CONTENT).each(function(n,i){var s=t(i)[0].style.paddingRight,r=t(i).css("padding-right");t(i).data("padding-right",s).css("padding-right",parseFloat(r)+e._scrollbarWidth+"px")}),t(g.STICKY_CONTENT).each(function(n,i){var s=t(i)[0].style.marginRight,r=t(i).css("margin-right");t(i).data("margin-right",s).css("margin-right",parseFloat(r)-e._scrollbarWidth+"px")}),t(g.NAVBAR_TOGGLER).each(function(n,i){var s=t(i)[0].style.marginRight,r=t(i).css("margin-right");t(i).data("margin-right",s).css("margin-right",parseFloat(r)+e._scrollbarWidth+"px")});var n=document.body.style.paddingRight,i=t("body").css("padding-right");t("body").data("padding-right",n).css("padding-right",parseFloat(i)+this._scrollbarWidth+"px")}},p._resetScrollbar=function(){t(g.FIXED_CONTENT).each(function(e,n){var i=t(n).data("padding-right");"undefined"!=typeof i&&t(n).css("padding-right",i).removeData("padding-right")}),t(g.STICKY_CONTENT+", "+g.NAVBAR_TOGGLER).each(function(e,n){var i=t(n).data("margin-right");"undefined"!=typeof i&&t(n).css("margin-right",i).removeData("margin-right")});var e=t("body").data("padding-right");"undefined"!=typeof e&&t("body").css("padding-right",e).removeData("padding-right")},p._getScrollbarWidth=function(){var t=document.createElement("div");t.className=c,document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},o._jQueryInterface=function(e,i){return this.each(function(){var s=t(this).data(n),a=r({},o.Default,t(this).data(),"object"==typeof e&&e);if(s||(s=new o(this,a),t(this).data(n,s)),"string"==typeof e){if("undefined"==typeof s[e])throw new TypeError('No method n
18721amed "'+e+'"');s[e](i)}else a.show&&s.show(i)})},s(o,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return a}}]),o}();return t(document).on(h.CLICK_DATA_API,g.DATA_TOGGLE,function(e){var i,s=this,o=P.getSelectorFromElement(this);o&&(i=t(o)[0]);var a=t(i).data(n)?"toggle":r({},t(i).data(),t(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||e.preventDefault();var l=t(i).one(h.SHOW,function(e){e.isDefaultPrevented()||l.one(h.HIDDEN,function(){t(s).is(":visible")&&s.focus()})});p._jQueryInterface.call(t(i),a,this)}),t.fn.modal=p._jQueryInterface,t.fn.modal.Constructor=p,t.fn.modal.noConflict=function(){return t.fn.modal=o,p._jQueryInterface},p}(e),U=function(t){var e="tooltip",i="bs.tooltip",o="."+i,a=t.fn[e],l=new RegExp("(^|\\s)bs-tooltip\\S+","g"),h={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)"},c={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},u={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent"},f="show",d="out",_={HIDE:"hide"+o,HIDDEN:"hidden"+o,SHOW:"show"+o,SHOWN:"shown"+o,INSERTED:"inserted"+o,CLICK:"click"+o,FOCUSIN:"focusin"+o,FOCUSOUT:"focusout"+o,MOUSEENTER:"mouseenter"+o,MOUSELEAVE:"mouseleave"+o},g="fade",p="show",m=".tooltip-inner",v=".arrow",E="hover",T="focus",y="click",C="manual",I=function(){function a(t,e){if("undefined"==typeof n)throw new TypeError("Bootstrap tooltips require Popper.js (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var I=a.prototype;return I.enable=function(){this._isEnabled=!0},I.disable=function(){this._isEnabled=!1},I.toggleEnabled=function(){this._isEnabled=!this._isEnabled},I.toggle=function(e){if(this._isEnabled)if(e){var n=this.constructor.DATA_KEY,i=t(e.currentTarget).data(n);i||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(t(this.getTipElement()).hasClass(p))return void this._leave(null,this);this._enter(null,this)}},I.dispose=function(){clearTimeout(this._timeout),t.removeData(this.element,this.constructor.DATA_KEY),t(this.element).off(this.constructor.EVENT_KEY),t(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&t(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,null!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},I.show=function(){var e=this;if("none"===t(this.element).css("display"))throw new Error("Please use show on visible elements");var i=t.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){t(this.element).trigger(i);var s=t.contains(this.element.ownerDocument.documentElement,this.element);if(i.isDefaultPrevented()||!s)return;var r=this.getTipElement(),o=P.getUID(this.constructor.NAME);r.setAttribute("id",o),this.element.setAttribute("aria-describedby",o),this.setContent(),this.config.animation&&t(r).addClass(g);var l="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,h=this._getAttachment(l);this.addAttachmentClass(h);var c=!1===this.config.container?document.body:t(this.config.container);t(r).data(this.constructor.DATA_KEY,this),t.contains(this.element.ownerDocument.documentElement,this.tip)||t(r).appendTo(c),t(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new n(this.element,r,{placement:h,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:v}
18721,preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){e._handlePopperPlacementChange(t)}}),t(r).addClass(p),"ontouchstart"in document.documentElement&&t("body").children().on("mouseover",null,t.noop);var u=function(){e.config.animation&&e._fixTransition();var n=e._hoverState;e._hoverState=null,t(e.element).trigger(e.constructor.Event.SHOWN),n===d&&e._leave(null,e)};P.supportsTransitionEnd()&&t(this.tip).hasClass(g)?t(this.tip).one(P.TRANSITION_END,u).emulateTransitionEnd(a._TRANSITION_DURATION):u()}},I.hide=function(e){var n=this,i=this.getTipElement(),s=t.Event(this.constructor.Event.HIDE),r=function(){n._hoverState!==f&&i.parentNode&&i.parentNode.removeChild(i),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),t(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),e&&e()};t(this.element).trigger(s),s.isDefaultPrevented()||(t(i).removeClass(p),"ontouchstart"in document.documentElement&&t("body").children().off("mouseover",null,t.noop),this._activeTrigger[y]=!1,this._activeTrigger[T]=!1,this._activeTrigger[E]=!1,P.supportsTransitionEnd()&&t(this.tip).hasClass(g)?t(i).one(P.TRANSITION_END,r).emulateTransitionEnd(150):r(),this._hoverState="")},I.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},I.isWithContent=function(){return Boolean(this.getTitle())},I.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-tooltip-"+e)},I.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},I.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(m),this.getTitle()),e.removeClass(g+" "+p)},I.setElementContent=function(e,n){var i=this.config.html;"object"==typeof n&&(n.nodeType||n.jquery)?i?t(n).parent().is(e)||e.empty().append(n):e.text(t(n).text()):e[i?"html":"text"](n)},I.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},I._getAttachment=function(t){return c[t.toUpperCase()]},I._setListeners=function(){var e=this;this.config.trigger.split(" ").forEach(function(n){if("click"===n)t(e.element).on(e.constructor.Event.CLICK,e.config.selector,function(t){return e.toggle(t)});else if(n!==C){var i=n===E?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,s=n===E?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;t(e.element).on(i,e.config.selector,function(t){return e._enter(t)}).on(s,e.config.selector,function(t){return e._leave(t)})}t(e.element).closest(".modal").on("hide.bs.modal",function(){return e.hide()})}),this.config.selector?this.config=r({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},I._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},I._enter=function(e,n){var i=this.constructor.DATA_KEY;(n=n||t(e.currentTarget).data(i))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusin"===e.type?T:E]=!0),t(n.getTipElement()).hasClass(p)||n._hoverState===f?n._hoverState=f:(clearTimeout(n._timeout),n._hoverState=f,n.config.delay&&n.config.delay.show?n._timeout=setTimeout(function(){n._hoverState===f&&n.show()},n.config.delay.show):n.show())},I._leave=function(e,n){var i=this.constructor.DATA_KEY;(n=n||t(e.currentTarget).data(i))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusout"===e.type?T:E]=!1),n._isWithActiveTrigger()||(clearTimeout(n._timeout),n._hoverState=d,n.config.delay&&n.config.delay.hide?n._timeout=setTimeout(function(){n._hoverState===d&&n.hide()},n.config.delay.hide):n.hide())},I._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},I._getConfig=function(n){return"number"==typeof(n=r({},this.constructor.Default,t(this.element).data(),n)).delay&&(n.delay={show:n.delay,hide:n.delay}),"number"==typeof n.title&&(n.title=n.title.toString()),"number"==typeof n.content&&(n.content=n.content.toString()),P.typeCheckConfig(e,n,this.constructor.DefaultType),n},I._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},I._cleanTipClass=function(){var e=t(this.getTipElement()),n=e.attr("class").match(l);null!==n&&n.length>0&&e.removeClass(n.join(""))},I._handlePopperPlacementChange=function(t){this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},I._fixTransition=function(){var e=this.getTipElement(),n=this.config.animation;null===e.getAttribute("x-placement")&&(t(e).removeClass(g),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)},a._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(i),s="object"==typeof e&&e;if((n||!/dispose|hide/.test(e))&&(n||(n=new a(this,s),t(this).data(i,n)),"string"==typeof e)){if("undefined"==typeof n[e])throw new TypeError('No method n
18721amed "'+e+'"');n[e]()}})},s(a,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return u}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return i}},{key:"Event",get:function(){return _}},{key:"EVENT_KEY",get:function(){return o}},{key:"DefaultType",get:function(){return h}}]),a}();return t.fn[e]=I._jQueryInterface,t.fn[e].Constructor=I,t.fn[e].noConflict=function(){return t.fn[e]=a,I._jQueryInterface},I}(e),x=function(t){var e="popover",n="bs.popover",i="."+n,o=t.fn[e],a=new RegExp("(^|\\s)bs-popover\\S+","g"),l=r({},U.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),h=r({},U.DefaultType,{content:"(string|element|function)"}),c="fade",u="show",f=".popover-header",d=".popover-body",_={HIDE:"hide"+i,HIDDEN:"hidden"+i,SHOW:"show"+i,SHOWN:"shown"+i,INSERTED:"inserted"+i,CLICK:"click"+i,FOCUSIN:"focusin"+i,FOCUSOUT:"focusout"+i,MOUSEENTER:"mouseenter"+i,MOUSELEAVE:"mouseleave"+i},g=function(r){var o,g;function p(){return r.apply(this,arguments)||this}g=r,(o=p).prototype=Object.create(g.prototype),o.prototype.constructor=o,o.__proto__=g;var m=p.prototype;return m.isWithContent=function(){return this.getTitle()||this._getContent()},m.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-popover-"+e)},m.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},m.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(f),this.getTitle());var n=this._getContent();"function"==typeof n&&(n=n.call(this.element)),this.setElementContent(e.find(d),n),e.removeClass(c+" "+u)},m._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},m._cleanTipClass=function(){var e=t(this.getTipElement()),n=e.attr("class").match(a);null!==n&&n.length>0&&e.removeClass(n.join(""))},p._jQueryInterface=function(e){return this.each(function(){var i=t(this).data(n),s="object"==typeof e?e:null;if((i||!/destroy|hide/.test(e))&&(i||(i=new p(this,s),t(this).data(n,i)),"string"==typeof e)){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e]()}})},s(p,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return l}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return n}},{key:"Event",get:function(){return _}},{key:"EVENT_KEY",get:function(){return i}},{key:"DefaultType",get:function(){return h}}]),p}(U);return t.fn[e]=g._jQueryInterface,t.fn[e].Constructor=g,t.fn[e].noConflict=function(){return t.fn[e]=o,g._jQueryInterface},g}(e),K=function(t){var e="scrollspy",n="bs.scrollspy",i="."+n,o=t.fn[e],a={offset:10,method:"auto",target:""},l={offset:"number",method:"string",target:"(string|element)"},h={ACTIVATE:"activate"+i,SCROLL:"scroll"+i,LOAD_DATA_API:"load"+i+".data-api"},c="dropdown-item",u="active",f={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",NAV_LIST_GROUP:".nav, .list-group",NAV_LINKS:".nav-link",NAV_ITEMS:".nav-item",LIST_ITEMS:".list-group-item",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},d="offset",_="position",g=function(){function o(e,n){var i=this;this._element=e,this._scrollElement="BODY"===e.tagName?window:e,this._config=this._getConfig(n),this._selector=this._config.target+" "+f.NAV_LINKS+","+this._config.target+" "+f.LIST_ITEMS+","+this._config.target+" "+f.DROPDOWN_ITEMS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,t(this._scrollElement).on(h.SCROLL,function(t){return i._process(t)}),this.refresh(),this._process()}var g=o.prototype;return g.refresh=function(){var e=this,n=this._scrollElement===this._scrollElement.window?d:_,i="auto"===this._config.method?n:this._config.method,s=i===_?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),t.makeArray(t(this._selector)).map(function(e){var n,r=P.getSelectorFromElement(e);if(r&&(n=t(r)[0]),n){var o=n.getBoundingClientRect();if(o.width||o.height)return[t(n)[i]().top+s,r]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}
18721).forEach(function(t){e._offsets.push(t[0]),e._targets.push(t[1])})},g.dispose=function(){t.removeData(this._element,n),t(this._scrollElement).off(i),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},g._getConfig=function(n){if("string"!=typeof(n=r({},a,n)).target){var i=t(n.target).attr("id");i||(i=P.getUID(e),t(n.target).attr("id",i)),n.target="#"+i}return P.typeCheckConfig(e,n,l),n},g._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},g._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},g._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},g._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var s=this._offsets.length;s--;){this._activeTarget!==this._targets[s]&&t>=this._offsets[s]&&("undefined"==typeof this._offsets[s+1]||t<this._offsets[s+1])&&this._activate(this._targets[s])}}},g._activate=function(e){this._activeTarget=e,this._clear();var n=this._selector.split(",");n=n.map(function(t){return t+'[data-target="'+e+'"],'+t+'[href="'+e+'"]'});var i=t(n.join(","));i.hasClass(c)?(i.closest(f.DROPDOWN).find(f.DROPDOWN_TOGGLE).addClass(u),i.addClass(u)):(i.addClass(u),i.parents(f.NAV_LIST_GROUP).prev(f.NAV_LINKS+", "+f.LIST_ITEMS).addClass(u),i.parents(f.NAV_LIST_GROUP).prev(f.NAV_ITEMS).children(f.NAV_LINKS).addClass(u)),t(this._scrollElement).trigger(h.ACTIVATE,{relatedTarget:e})},g._clear=function(){t(this._selector).filter(f.ACTIVE).removeClass(u)},o._jQueryInterface=function(e){return this.each(function(){var i=t(this).data(n);if(i||(i=new o(this,"object"==typeof e&&e),t(this).data(n,i)),"string"==typeof e){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e]()}})},s(o,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return a}}]),o}();return t(window).on(h.LOAD_DATA_API,function(){for(var e=t.makeArray(t(f.DATA_SPY)),n=e.length;n--;){var i=t(e[n]);g._jQueryInterface.call(i,i.data())}}),t.fn[e]=g._jQueryInterface,t.fn[e].Constructor=g,t.fn[e].noConflict=function(){return t.fn[e]=o,g._jQueryInterface},g}(e),V=function(t){var e="bs.tab",n="."+e,i=t.fn.tab,r={HIDE:"hide"+n,HIDDEN:"hidden"+n,SHOW:"show"+n,SHOWN:"shown"+n,CLICK_DATA_API:"click.bs.tab.data-api"},o="dropdown-menu",a="active",l="disabled",h="fade",c="show",u=".dropdown",f=".nav, .list-group",d=".active",_="> li > .active",g='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',p=".dropdown-toggle",m="> .dropdown-menu .active",v=function(){function n(t){this._element=t}var i=n.prototype;return i.show=function(){var e=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&t(this._element).hasClass(a)||t(this._element).hasClass(l))){var n,i,s=t(this._element).closest(f)[0],o=P.getSelectorFromElement(this._element);if(s){var h="UL"===s.nodeName?_:d;i=(i=t.makeArray(t(s).find(h)))[i.length-1]}var c=t.Event(r.HIDE,{relatedTarget:this._element}),u=t.Event(r.SHOW,{relatedTarget:i});if(i&&t(i).trigger(c),t(this._element).trigger(u),!u.isDefaultPrevented()&&!c.isDefaultPrevented()){o&&(n=t(o)[0]),this._activate(this._element,s);var g=function(){var n=t.Event(r.HIDDEN,{relatedTarget:e._element}),s=t.Event(r.SHOWN,{relatedTarget:i});t(i).trigger(n),t(e._element).trigger(s)};n?this._activate(n,n.parentNode,g):g()}}},i.dispose=function(){t.removeData(this._element,e),this._element=null},i._activate=function(e,n,i){var s=this,r=("UL"===n.nodeName?t(n).find(_):t(n).children(d))[0],o=i&&P.supportsTransitionEnd()&&r&&t(r).hasClass(h),a=function(){return s._transitionComplete(e,r,i)};r&&o?t(r).one(P.TRANSITION_END,a).emulateTransitionEnd(150):a()},i._transitionComplete=function(e,n,i){if(n){t(n).removeClass(c+" "+a);var s=t(n.parentNode).find(m)[0];s&&t(s).removeClass(a),"tab"===n.getAttribute("role")&&n.setAttribute("aria-selected",!1)}if(t(e).addClass(a),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!0),P.reflow(e),t(e).addClass(c),e.parentNode&&t(e.parentNode).hasClass(o)){var r=t(e).closest(u)[0];r&&t(r).find(p).addClass(a),e.setAttribute("aria-expanded",!0)}i&&i()},n._jQueryInterface=function(i){return this.each(function(){var s=t(this),r=s.data(e);if(r||(r=new n(this),s.data(e,r)),"string"==typeof i){if("undefined"==typeof r[i])throw new TypeError('No method n
18721amed "'+i+'"');r[i]()}})},s(n,null,[{key:"VERSION",get:function(){return"4.0.0"}}]),n}();return t(document).on(r.CLICK_DATA_API,g,function(e){e.preventDefault(),v._jQueryInterface.call(t(this),"show")}),t.fn.tab=v._jQueryInterface,t.fn.tab.Constructor=v,t.fn.tab.noConflict=function(){return t.fn.tab=i,v._jQueryInterface},v}(e);!function(t){if("undefined"==typeof t)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1===e[0]&&9===e[1]&&e[2]<1||e[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(e),t.Util=P,t.Alert=L,t.Button=R,t.Carousel=j,t.Collapse=H,t.Dropdown=W,t.Modal=M,t.Popover=x,t.Scrollspy=K,t.Tab=V,t.Tooltip=U,Object.defineProperty(t,"__esModule",{value:!0})}); 18722//# sourceMappingURL=bootstrap.min.js.map 18723/*! 18724 * pagination v1.4.1 (https://github.com/nashaofu/pagination) 18725 * Copyright 2018 nashaofu 18726 * Licensed under MIT 18727 */ 18728 18729! function(a) { "use strict"; "function" == typeof define && define.amd ? define(["jquery"], a) : "function" == typeof define && define.cmd ? define(function(b, c, d) { a(b("jquery")) }) : a(jQuery) }(function(a) { 18730 "use strict"; 18731 var b = function(c, d) { this.$target = c, this.options = a.extend({}, b.DEFAULTS, this.$target.data("pagination"), "object" == typeof d && d), this.init() }; 18732 b.VERSION = "1.4.0", b.DEFAULTS = { total: 1, current: 1, length: 10, size: 2, prev: "‹", next: "›", click: function(a) {} }, b.prototype = { 18733 init: function() { 18734 if (this.options.total < 1 && (this.options.total = 1), this.options.current < 1 && (this.options.current = 1), this.options.length < 1 && (this.options.length = 1), this.options.current > Math.ceil(this.options.total / this.options.length) && (this.options.current = Math.ceil(this.options.total / this.options.length)), this.options.size < 1 && (this.options.size = 1), "function" == typeof this.options.ajax) { 18735 var a = this; 18736 this.options.ajax({ current: a.options.current, length: a.options.length, total: a.options.total }, function(b) { return a.refresh(b) }, a.$target) 18737 } else this.render(); 18738 this.onClick() 18739 }, 18740 render: function() { 18741 var a = this.options, 18742 b = this.$target; 18743 b.empty(), b.append('<li><a herf="javascript:void(0)" data-page="prev" class="prev-icon">' + a.prev + "</a></li>"); 18744 var c = this.getPages(); 18745 if ($(window).width() <= 767) { 18746 c.start > 1 && (b.append('<li><a herf="javascript:void(0)" data-page="1">1</a></li>'), b.append("<li class='disabled'><a><span class='ellipsis-icon'>...</span></a></li>")); 18747 b.append('<li><a herf="javascript:void(0)" data-page="' + c.start + '">' + c.start + "</a></li>"); 18748 c.end < Math.ceil(a.total / a.length) && (b.append("<li class='disabled'><a><span class='ellipsis-icon'>...</span></a></li>"), b.append('<li><a herf="javascript:void(0)" data-page="' + Math.ceil(a.total / a.length) + '">' + Math.ceil(a.total / a.length) + "</a></li>")), b.append('<li><a herf="javascript:void(0)" data-page="next" class="next-icon">' + a.next + "</a></li>"), b.find('li>a[data-page="' + a.current + '"]').parent().addClass("active"), a.current <= 1 && b.find('li>a[data-page="prev"]').parent().addClass("disabled"), a.current >= Math.ceil(a.total / a.length) && b.find('li>a[data-page="next"]').parent().addClass("disabled") 18749 } 18750 else { 18751 c.start > 1 && (b.append('<li><a herf="javascript:void(0)" data-page="1">1</a></li>'), b.append("<li class='disabled'><a><span class='ellipsis-icon'>...</span></a></li>")); 18752 for (var d = c.start; d <= c.end; d++) b.append('<li><a herf="javascript:void(0)" data-page="' + d + '">' + d + "</a></li>"); 18753 c.end < Math.ceil(a.total / a.length) && (b.append("<li class='disabled'><a><span class='ellipsis-icon'>...</span></a></li>"), b.append('<li><a herf="javascript:void(0)" data-page="' + Math.ceil(a.total / a.length) + '">' + Math.ceil(a.total / a.length) + "</a></li>")), b.append('<li><a herf="javascript:void(0)" data-page="next" class="next-icon">' + a.next + "</a></li>"), b.find('li>a[data-page="' + a.current + '"]').parent().addClass("active"), a.current <= 1 && b.find('li>a[data-page="prev"]').parent().addClass("disabled"), a.current >= Math.ceil(a.total / a.length) && b.find('li>a[data-page="next"]').parent().addClass("disabled") 18754 } 18755 }, 18756 getPages: function() { 18757 var a = (this.$target, this.options), 18758 b = a.current - a.size, 18759 c = a.current + a.size; 18760 return a.current >= Math.ceil(a.total / a.length) - a.size && (b -= a.current - Math.
18760ceil(a.total / a.length) + a.size), a.current <= a.size && (c += a.size - a.current + 1), b < 1 && (b = 1), c > Math.ceil(a.total / a.length) && (c = Math.ceil(a.total / a.length)), { start: b, end: c } 18761 }, 18762 onClick: function() { 18763 var b = this.$target, 18764 c = this.options, 18765 d = this; 18766 b.off("click"), b.on("click", ">li>a[data-page]", function(e) { 18767 if (!a(this).parent().hasClass("disabled") && !a(this).parent().hasClass("active")) { 18768 var f = a(this).data("page"); 18769 switch (f) { 18770 case "prev": 18771 c.current > 1 && c.current--; 18772 break; 18773 case "next": 18774 c.current < Math.ceil(c.total) && c.current++; 18775 break; 18776 default: 18777 f = parseInt(f), isNaN(f) || (c.current = parseInt(f)) 18778 } 18779 var g = { current: c.current, length: c.length, total: c.total }; 18780 "function" == typeof c.ajax ? c.ajax(g, function(a) { return d.refresh(a) }, b) : d.render(), c.click(g, b) 18781 } 18782 }) 18783 }, 18784 refresh: function(a) { "object" == typeof a && (a.total && (this.options.total = a.total), a.length && (this.options.length = a.length)), this.render() } 18785 }, a.fn.pagination = function(c) { return this.each(function() { a(this).data("pagination", new b(a(this), c)) }), this } 18786}); 18787/*! 18788 18789 handlebars v4.0.5 18790 18791Copyright (C) 2011-2015 by Yehuda Katz 18792 18793Permission is hereby granted, free of charge, to any person obtaining a copy 18794of this software and associated documentation files (the "Software"), to deal 18795in the Software without restriction, including without limitation the rights 18796to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 18797copies of the Software, and to permit persons to whom the Software is 18798furnished to do so, subject to the following conditions: 18799 18800The above copyright notice and this permission notice shall be included in 18801all copies or substantial portions of the Software. 18802 18803THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18804IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18805FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18806AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18807LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18808OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 18809THE SOFTWARE. 18810 18811@license 18812*/ 18813!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?exports.Handlebars=b():a.Handlebars=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(){var a=r();return a.compile=function(b,c){return k.compile(b,c,a)},a.precompile=function(b,c){return k.precompile(b,c,a)},a.AST=i["default"],a.Compiler=k.Compiler,a.JavaScriptCompiler=m["default"],a.Parser=j.parser,a.parse=j.parse,a}var e=c(1)["default"];b.__esModule=!0;var f=c(2),g=e(f),h=c(21),i=e(h),j=c(22),k=c(27),l=c(28),m=e(l),n=c(25),o=e(n),p=c(20),q=e(p),r=g["default"].create,s=d();s.create=d,q["default"](s),s.Visitor=o["default"],s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){return a&&a.__esModule?a:{"default":a}},b.__esModule=!0},function(a,b,c){"use strict";function d(){var a=new h.HandlebarsEnvironment;return n.extend(a,h),a.SafeString=j["default"],a.Exception=l["default"],a.Utils=n,a.escapeExpression=n.escapeExpression,a.VM=p,a.template=function(b){return p.template(b,a)},a}var e=c(3)["default"],f=c(1)["default"];b.__esModule=!0;var g=c(4),h=e(g),i=c(18),j=f(i),k=c(6),l=f(k),m=c(5),n=e(m),o=c(19),p=e(o),q=c(20),r=f(q),s=d();s.create=d,r["default"](s),s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";
vendor: 7,046 bytes, line 18813
18813b["default"]=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b},b.__esModule=!0},function(a,b,c){"use strict";function d(a,b,c){this.helpers=a||{},this.partials=b||{},this.decorators=c||{},i.registerDefaultHelpers(this),j.registerDefaultDecorators(this)}var e=c(1)["default"];b.__esModule=!0,b.HandlebarsEnvironment=d;var f=c(5),g=c(6),h=e(g),i=c(7),j=c(15),k=c(17),l=e(k),m="4.0.5";b.VERSION=m;var n=7;b.COMPILER_REVISION=n;var o={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0"};b.REVISION_CHANGES=o;var p="[object Object]";d.prototype={constructor:d,logger:l["default"],log:l["default"].log,registerHelper:function(a,b){if(f.toString.call(a)===p){if(b)throw new h["default"]("Arg not supported with multiple helpers");f.extend(this.helpers,a)}else this.helpers[a]=b},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){if(f.toString.call(a)===p)f.extend(this.partials,a);else{if("undefined"==typeof b)throw new h["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=b}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,b){if(f.toString.call(a)===p){if(b)throw new h["default"]("Arg not supported with multiple decorators");f.extend(this.decorators,a)}else this.decorators[a]=b},unregisterDecorator:function(a){delete this.decorators[a]}};var q=l["default"].log;b.log=q,b.createFrame=f.createFrame,b.logger=l["default"]},function(a,b){"use strict";function c(a){return k[a]}function d(a){for(var b=1;b<arguments.length;b++)for(var c in arguments[b])Object.prototype.hasOwnProperty.call(arguments[b],c)&&(a[c]=arguments[b][c]);return a}function e(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1}function f(a){if("string"!=typeof a){if(a&&a.toHTML)return a.toHTML();if(null==a)return"";if(!a)return a+"";a=""+a}return m.test(a)?a.replace(l,c):a}function g(a){return a||0===a?p(a)&&0===a.length?!0:!1:!0}function h(a){var b=d({},a);return b._parent=a,b}function i(a,b){return a.path=b,a}function j(a,b){return(a?a+".":"")+b}b.__esModule=!0,b.extend=d,b.indexOf=e,b.escapeExpression=f,b.isEmpty=g,b.createFrame=h,b.blockParams=i,b.appendContextPath=j;var k={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},l=/[&<>"'`=]/g,m=/[&<>"'`=]/,n=Object.prototype.toString;b.toString=n;var o=function(a){return"function"==typeof a};o(/x/)&&(b.isFunction=o=function(a){return"function"==typeof a&&"[object Function]"===n.call(a)}),b.isFunction=o;var p=Array.isArray||function(a){return a&&"object"==typeof a?"[object Array]"===n.call(a):!1};b.isArray=p},function(a,b){"use strict";function c(a,b){var e=b&&b.loc,f=void 0,g=void 0;e&&(f=e.start.line,g=e.start.column,a+=" - "+f+":"+g);for(var h=Error.prototype.constructor.call(this,a),i=0;i<d.length;i++)this[d[i]]=h[d[i]];Error.captureStackTrace&&Error.captureStackTrace(this,c),e&&(this.lineNumber=f,this.column=g)}b.__esModule=!0;var d=["description","fileName","lineNumber","message","name","number","stack"];c.prototype=new Error,b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a){g["default"](a),i["default"](a),k["default"](a),m["default"](a),o["default"](a),q["default"](a),s["default"](a)}var e=c(1)["default"];b.__esModule=!0,b.registerDefaultHelpers=d;var f=c(8),g=e(f),h=c(9),i=e(h),j=c(10),k=e(j),l=c(11),m=e(l),n=c(12),o=e(n),p=c(13),q=e(p),r=c(14),s=e(r)},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerHelper("blockHelperMissing",function(b,c){var e=c.inverse,f=c.fn;if(b===!0)return f(this);if(b===!1||null==b)return e(this);if(d.isArray(b))return b.length>0?(c.ids&&(c.ids=[c.name]),a.helpers.each(b,c)):e(this);if(c.data&&c.ids){var g=d.createFrame(c.data);g.contextPath=d.appendContextPath(c.data.contextPath,c.name),c={data:g}}return f(b,c)})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(5),f=c(6),g=d(f);b["default"]=function(a){a.registerHelper("each",function(a,b){function c(b,c,f){j&&(j.key=b,j.index=c,j.first=0===c,j.last=!!f,k&&(j.contextPath=k+b)),i+=d(a[b],{data:j,blockParams:e.blockParams([a[b],b],[k+b,null])})}if(!b)throw new g["default"]("Must pass iterator to #each");var d=b.fn,f=b.inverse,h=0,i="",j=void 0,k=void 0;if(b.data&&b.ids&&(k=e.appendContextPath(b.data.contextPath,b.ids[0])+"."),e.isFunction(a)&&(a=a.call(this)),b.data&&(j=e.createFrame(b.data)),a&&"object"==typeof a)if(e.isArray(a))for(var l=a.length;l>h;h++)h in a&&c(h,h,h===a.length-1);else{var m=void 0;for(var n in a)a.hasOwnProperty(n)&&(void 0!==m&&c(m,h-1),m=n,h++);void 0!==m&&c(m,h-1,!0)}return 0===h&&(i=f(this)),i})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(6),f=d(e);b["default"]=function(a){a.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new f["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')})},a.exports=b["default"]},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerHelper("if",function(a,b){return d.isFunction(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||d.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})})},a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){a.registerHelper("log",function(){for(var b=[void 0],c=arguments[arguments.length-1],d=0;d<arguments.length-1;d++)b.push(arguments[d]);var e=1;null!=c.hash.level?e=c.hash.level:c.data&&null!=c.data.level&&(e=c.data.level),b[0]=e,a.log.apply(a,b)})},a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){a.registerHelper("lookup",function(a,b){return a&&a[b]})},a.exports=b["default"]},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerHelper("with",function(a,b){d.isFunction(a)&&(a=a.call(this));var c=b.fn;if(d.isEmpty(a))return b.inverse(this);var e=b.data;return b.data&&b.ids&&(e=d.createFrame(b.data),e.contextPath=d.appendContextPath(b.data.contextPath,b.ids[0])),c(a,{data:e,blockParams:d.blockParams([a],[e&&e.contextPath])})})},a.exports=b["default"]},function(a,b,c){"use strict";function d(a){g["default"](a)}var e=c(1)["default"];b.__esModule=!0,b.registerDefaultDecorators=d;var f=c(16),g=e(f)},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerDecorator("inline",function(a,b,c,e){var f=a;return b.partials||(b.partials={},f=function(e,f){var g=c.partials;c.partials=d.extend({},g,b.partials);var h=a(e,f);return c.partials=g,h}),b.partials[e.args[0]]=e.fn,f})},a.exports=b["default"]},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5),e={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(a){if
18813("string"==typeof a){var b=d.indexOf(e.methodMap,a.toLowerCase());a=b>=0?b:parseInt(a,10)}return a},log:function(a){if(a=e.lookupLevel(a),"undefined"!=typeof console&&e.lookupLevel(e.level)<=a){var b=e.methodMap[a];console[b]||(b="log");for(var c=arguments.length,d=Array(c>1?c-1:0),f=1;c>f;f++)d[f-1]=arguments[f];console[b].apply(console,d)}}};b["default"]=e,a.exports=b["default"]},function(a,b){"use strict";function c(a){this.string=a}b.__esModule=!0,c.prototype.toString=c.prototype.toHTML=function(){return""+this.string},b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a){var b=a&&a[0]||1,c=r.COMPILER_REVISION;if(b!==c){if(c>b){var d=r.REVISION_CHANGES[c],e=r.REVISION_CHANGES[b];throw new q["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+d+") or downgrade your runtime to an older version ("+e+").")}throw new q["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function e(a,b){function c(c,d,e){e.hash&&(d=o.extend({},d,e.hash),e.ids&&(e.ids[0]=!0)),c=b.VM.resolvePartial.call(this,c,d,e);var f=b.VM.invokePartial.call(this,c,d,e);if(null==f&&b.compile&&(e.partials[e.name]=b.compile(c,a.compilerOptions,b),f=e.partials[e.name](d,e)),null!=f){if(e.indent){for(var g=f.split("\n"),h=0,i=g.length;i>h&&(g[h]||h+1!==i);h++)g[h]=e.indent+g[h];f=g.join("\n")}return f}throw new q["default"]("The partial "+e.name+" could not be compiled when running in runtime-only mode")}function d(b){function c(b){return""+a.main(e,b,e.helpers,e.partials,g,i,h)}var f=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],g=f.data;d._setup(f),!f.partial&&a.useData&&(g=j(b,g));var h=void 0,i=a.useBlockParams?[]:void 0;return a.useDepths&&(h=f.depths?b!==f.depths[0]?[b].concat(f.depths):f.depths:[b]),(c=k(a.main,c,e,f.depths||[],g,i))(b,f)}if(!b)throw new q["default"]("No environment passed to template");if(!a||!a.main)throw new q["default"]("Unknown template object: "+typeof a);a.main.decorator=a.main_d,b.VM.checkRevision(a.compiler);var e={strict:function(a,b){if(!(b in a))throw new q["default"]('"'+b+'" not defined in '+a);return a[b]},lookup:function(a,b){for(var c=a.length,d=0;c>d;d++)if(a[d]&&null!=a[d][b])return a[d][b]},lambda:function(a,b){return"function"==typeof a?a.call(b):a},escapeExpression:o.escapeExpression,invokePartial:c,fn:function(b){var c=a[b];return c.decorator=a[b+"_d"],c},programs:[],program:function(a,b,c,d,e){var g=this.programs[a],h=this.fn(a);return b||e||d||c?g=f(this,a,h,b,c,d,e):g||(g=this.programs[a]=f(this,a,h)),g},data:function(a,b){for(;a&&b--;)a=a._parent;return a},merge:function(a,b){var c=a||b;return a&&b&&a!==b&&(c=o.extend({},b,a)),c},noop:b.VM.noop,compilerInfo:a.compiler};return d.isTop=!0,d._setup=function(c){c.partial?(e.helpers=c.helpers,e.partials=c.partials,e.decorators=c.decorators):(e.helpers=e.merge(c.helpers,b.helpers),a.usePartial&&(e.partials=e.merge(c.partials,b.partials)),(a.usePartial||a.useDecorators)&&(e.decorators=e.merge(c.decorators,b.decorators)))},d._child=function(b,c,d,g){if(a.useBlockParams&&!d)throw new q["default"]("must pass block params");if(a.useDepths&&!g)throw new q["default"]("must pass parent depths");return f(e,b,a[b],c,0,d,g)},d}function f(a,b,c,d,e,f,g){function h(b){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],h=g;return g&&b!==g[0]&&(h=[b].concat(g)),c(a,b,a.helpers,a.partials,e.data||d,f&&[e.blockParams].concat(f),h)}return h=k(c,h,a,g,d,f),h.program=b,h.depth=g?g.length:0,h.blockParams=e||0,h}function g(a,b,c){return a?a.call||c.name||(c.name=a,a=c.partials[a]):a="@partial-block"===c.name?c.data["partial-block"]:c.partials[c.name],a}function h(a,b,c){c.partial=!0,c.ids&&(c.data.contextPath=c.ids[0]||c.data.contextPath);var d=void 0;if(c.fn&&c.fn!==i&&(c.data=r.createFrame(c.data),d=c.data["partial-block"]=c.fn,d.partials&&(c.partials=o.extend({},c.partials,d.partials))),void 0===a&&d&&(a=d),void 0===a)throw new q["default"]("The partial "+c.name+" could not be found");return a instanceof Function?a(b,c):void 0}function i(){return""}function j(a,b){return b&&"root"in b||(b=b?r.createFrame(b):{},b.root=a),b}function k(a,b,c,d,e,f){if(a.decorator){var g={};b=a.decorator(b,g,c,d&&d[0],e,f,d),o.extend(b,g)}return b}var l=c(3)["default"],m=c(1)["default"];b.__esModule=!0,b.checkRevision=d,b.template=e,b.wrapProgram=f,b.resolvePartial=g,b.invokePartial=h,b.noop=i;var n=c(5),o=l(n),p=c(6),q=m(p),r=c(4)},function(a,b){(function(c){"use strict";b.__esModule=!0,b["default"]=function(a){var b="undefined"!=typeof c?c:window,d=b.Handlebars;a.noConflict=function(){return b.Handlebars===a&&(b.Handlebars=d),a}},a.exports=b["default"]}).call(b,function(){return this}())},function(a,b){"use strict";b.__esModule=!0;var c={helpers:{helperExpression:function(a){return"SubExpression"===a.type||("MustacheStatement"===a.type||"BlockStatement"===a.type)&&!!(a.params&&a.params.length||a.hash)},scopedId:function(a){return/^\.|this\b/.test(a.original)},simpleId:function(a){return 1===a.parts.length&&!c.helpers.scopedId(a)&&!a.depth}}};b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b){if("Program"===a.type)return a;h["default"].yy=n,n.locInfo=function(a){return new n.SourceLocation(b&&b.srcName,a)};var c=new j["default"](b);return c.accept(h["default"].parse(a))}var e=c(1)["default"],f=c(3)["default"];b.__esModule=!0,b.parse=d;var g=c(23),h=e(g),i=c(24),j=e(i),k=c(26),l=f(k),m=c(5);b.parser=h["default"];var n={};m.extend(n,l)},function(a,b){"use strict";var c=function(){function a(){this.yy={}}var b={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition_plus0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sex
vendor: 8,717 bytes, line 18813
18813pr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,1],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 1:return f[h-1];case 2:this.$=d.prepareProgram(f[h]);break;case 3:this.$=f[h];break;case 4:this.$=f[h];break;case 5:this.$=f[h];break;case 6:this.$=f[h];break;case 7:this.$=f[h];break;case 8:this.$=f[h];break;case 9:this.$={type:"CommentStatement",value:d.stripComment(f[h]),strip:d.stripFlags(f[h],f[h]),loc:d.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:f[h],value:f[h],loc:d.locInfo(this._$)};break;case 11:this.$=d.prepareRawBlock(f[h-2],f[h-1],f[h],this._$);break;case 12:this.$={path:f[h-3],params:f[h-2],hash:f[h-1]};break;case 13:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!1,this._$);break;case 14:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!0,this._$);break;case 15:this.$={open:f[h-5],path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 16:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 17:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 18:this.$={strip:d.stripFlags(f[h-1],f[h-1]),program:f[h]};break;case 19:var i=d.prepareBlock(f[h-2],f[h-1],f[h],f[h],!1,this._$),j=d.prepareProgram([i],f[h-1].loc);j.chained=!0,this.$={strip:f[h-2].strip,program:j,chain:!0};break;case 20:this.$=f[h];break;case 21:this.$={path:f[h-1],strip:d.stripFlags(f[h-2],f[h])};break;case 22:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 23:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 24:this.$={type:"PartialStatement",name:f[h-3],params:f[h-2],hash:f[h-1],indent:"",strip:d.stripFlags(f[h-4],f[h]),loc:d.locInfo(this._$)};break;case 25:this.$=d.preparePartialBlock(f[h-2],f[h-1],f[h],this._$);break;case 26:this.$={path:f[h-3],params:f[h-2],hash:f[h-1],strip:d.stripFlags(f[h-4],f[h])};break;case 27:this.$=f[h];break;case 28:this.$=f[h];break;case 29:this.$={type:"SubExpression",path:f[h-3],params:f[h-2],hash:f[h-1],loc:d.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:f[h],loc:d.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:d.id(f[h-2]),value:f[h],loc:d.locInfo(this._$)};break;case 32:this.$=d.id(f[h-1]);break;case 33:this.$=f[h];break;case 34:this.$=f[h];break;case 35:this.$={type:"StringLiteral",value:f[h],original:f[h],loc:d.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(f[h]),original:Number(f[h]),loc:d.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===f[h],original:"true"===f[h],loc:d.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:d.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:d.locInfo(this._$)};break;case 40:this.$=f[h];break;case 41:this.$=f[h];break;case 42:this.$=d.preparePath(!0,f[h],this._$);break;case 43:this.$=d.preparePath(!1,f[h],this._$);break;case 44:f[h-2].push({part:d.id(f[h]),original:f[h],separator:f[h-1]}),this.$=f[h-2];break;case 45:this.$=[{part:d.id(f[h]),original:f[h]}];break;case 46:this.$=[];break;case 47:f[h-1].push(f[h]);break;case 48:this.$=[f[h]];break;case 49:f[h-1].push(f[h]);break;case 50:this.$=[];break;case 51:f[h-1].push(f[h]);break;case 58:this.$=[];break;case 59:f[h-1].push(f[h]);break;case 64:this.$=[];break;case 65:f[h-1].push(f[h]);break;case 70:this.$=[];break;case 71:f[h-1].push(f[h]);break;case 78:this.$=[];break;case 79:f[h-1].push(f[h]);break;case 82:this.$=[];break;case 83:f[h-1].push(f[h]);break;case 86:this.$=[];break;case 87:f[h-1].push(f[h]);break;case 90:this.$=[];break;case 91:f[h-1].push(f[h]);break;case 94:this.$=[];break;case 95:f[h-1].push(f[h]);break;case 98:this.$=[f[h]];break;case 99:f[h-1].push(f[h]);break;case 100:this.$=[f[h]];break;case 101:f[h-1].push(f[h])}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{13:40,15:[1,20],17:39},{20:42,56:41,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:45,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:48,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:42,56:49,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:50,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37
vendor: 4,137 bytes, line 18813
18813],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,51]},{72:[1,35],86:52},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:53,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:54,38:56,39:[1,58],43:57,44:[1,59],45:55,47:[2,54]},{28:60,43:61,44:[1,59],47:[2,56]},{13:63,15:[1,20],18:[1,62]},{15:[2,48],18:[2,48]},{33:[2,86],57:64,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:65,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:66,47:[1,67]},{30:68,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:69,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:70,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:71,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:75,33:[2,80],50:72,63:73,64:76,65:[1,44],69:74,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,80]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,51]},{20:75,53:81,54:[2,84],63:82,64:76,65:[1,44],69:83,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:84,47:[1,67]},{47:[2,55]},{4:85,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:86,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:87,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:88,47:[1,67]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:75,33:[2,88],58:89,63:90,64:76,65:[1,44],69:91,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:92,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:93,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,31:94,33:[2,60],63:95,64:76,65:[1,44],69:96,70:77,71:78,72:[1,79],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,66],36:97,63:98,64:76,65:[1,44],69:99,70:77,71:78,72:[1,79],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,22:100,23:[2,52],63:101,64:76,65:[1,44],69:102,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,92],62:103,63:104,64:76,65:[1,44],69:105,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,106]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]}
vendor: 6,593 bytes, lines 18813-18814
18813,{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:107,72:[1,108],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,109],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,110]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:56,39:[1,58],43:57,44:[1,59],45:112,46:111,47:[2,76]},{33:[2,70],40:113,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,114]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:75,63:116,64:76,65:[1,44],67:115,68:[2,96],69:117,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,118]},{32:119,33:[2,62],74:120,75:[1,121]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:122,74:123,75:[1,121]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,124]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,125]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,109]},{20:75,63:126,64:76,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:75,33:[2,72],41:127,63:128,64:76,65:[1,44],69:129,70:77,71:78,72:[1,79],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,130]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,131]},{33:[2,63]},{72:[1,133],76:132},{33:[1,134]},{33:[2,69]},{15:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:135,74:136,75:[1,121]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,138],77:[1,137]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16], 1881448:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,139]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],55:[2,55],57:[2,20],61:[2,57],74:[2,81],83:[2,85],87:[2,18],91:[2,89],102:[2,53],105:[2,93],111:[2,19],112:[2,77],117:[2,97],120:[2,63],123:[2,69],124:[2,12],136:[2,75],137:[2,32]},parseError:function(a,b){throw new Error(a)},parse:function(a){function b(){var a;return a=c.lexer.lex()||1,"number"!=typeof a&&(a=c.symbols_[a]||a),a}var c=this,d=[0],e=[null],f=[],g=this.table,h="",i=0,j=0,k=0;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var l=this.lexer.yylloc;f.push(l);var m=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var n,o,p,q,r,s,t,u,v,w={};;){if(p=d[d.length-1],this.defaultActions[p]?q=this.defaultActions[p]:((null===n||"undefined"==typeof n)&&(n=b()),q=g[p]&&g[p][n]),"undefined"==typeof q||!q.length||!q[0]){var x="";if(!k){v=[];for(s in g[p])this.terminals_[s]&&s>2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},c=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}
vendor: 32,485 bytes, lines 18814-18815
18814,input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;g<f.length&&(c=this._input.match(this.rules[f[g]]),!c||b&&!(c[0].length>b[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substr(a,b.yyleng-c)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(b.yytext=b.yytext.substr(5,b.yyleng-9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(b.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return b.yytext=e(1,2).replace(/\\"/g,'"'),80;case 32:return b.yytext=e(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return b.yytext=b.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},a}();return b.lexer=c,a.prototype=b,b.Parser=a,new a}();b.__esModule=!0,b["default"]=c},function(a,b,c){"use strict";function d(){var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=a}function e(a,b,c){void 0===b&&(b=a.length);var d=a[b-1],e=a[b-2];return d?"ContentStatement"===d.type?(e||!c?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original):void 0:c}function f(a,b,c){void 0===b&&(b=-1);var d=a[b+1],e=a[b+2];return d?"ContentStatement"===d.type?(e||!c?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original):void 0:c}function g(a,b,c){var d=a[null==b?0:b+1];if(d&&"ContentStatement"===d.type&&(c||!d.rightStripped)){var e=d.value;d.value=d.value.replace(c?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.value!==e}}function h(a,b,c){var d=a[null==b?a.length-1:b-1];if(d&&"ContentStatement"===d.type&&(c||!d.leftStripped)){var e=d.value;return d.value=d.value.replace(c?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.value!==e,d.leftStripped}}var i=c(1)["default"];b.__esModule=!0;var j=c(25),k=i(j);d.prototype=new k["default"],d.prototype.Program=function(a){var b=!this.options.ignoreStandalone,c=!this.isRootSeen;this.isRootSeen=!0;for(var d=a.body,i=0,j=d.length;j>i;i++){var k=d[i],l=this.accept(k);if(l){var m=e(d,i,c),n=f(d,i,c),o=l.openStandalone&&m,p=l.closeStandalone&&n,q=l.inlineStandalone&&m&&n;l.close&&g(d,i,!0),l.open&&h(d,i,!0),b&&q&&(g(d,i),h(d,i)&&"PartialStatement"===k.type&&(k.indent=/([ \t]+$)/.exec(d[i-1].original)[1])),b&&o&&(g((k.program||k.inverse).body),h(d,i)),b&&p&&(g(d,i),h((k.inverse||k.program).body))}}return a},d.prototype.BlockStatement=d.prototype.DecoratorBlock=d.prototype.PartialBlockStatement=function(a){this.accept(a.program),this.accept(a.inverse);var b=a.program||a.inverse,c=a.program&&a.inverse,d=c,i=c;if(c&&c.chained)for(d=c.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var j={open:a.openStrip.open,close:a.closeStrip.close,openStandalone:f(b.body),closeStandalone:e((d||b).body)};if(a.openStrip.close&&g(b.body,null,!0),c){var k=a.inverseStrip;k.open&&h(b.body,null,!0),k.close&&g(d.body,null,!0),a.closeStrip.open&&h(i.body,null,!0),!this.options.ignoreStandalone&&e(b.body)&&f(d.body)&&(h(b.body),g(d.body))}else a.closeStrip.open&&h(b.body,null,!0);return j},d.prototype.Decorator=d.prototype.MustacheStatement=function(a){return a.strip},d.prototype.PartialStatement=d.prototype.CommentStatement=function(a){var b=a.strip||{};return{inlineStandalone:!0,open:b.open,close:b.close}},b["default"]=d,a.exports=b["default"]},function(a,b,c){"use strict";function d(){this.parents=[]}function e(a){this.acceptRequired(a,"path"),this.acceptArray(a.params),this.acceptKey(a,"hash")}function f(a){e.call(this,a),this.acceptKey(a,"program"),this.acceptKey(a,"inverse")}function g(a){this.acceptRequired(a,"name"),this.acceptArray(a.params),this.acceptKey(a,"hash")}var h=c(1)["default"];b.__esModule=!0;var i=c(6),j=h(i);d.prototype={constructor:d,mutating:!1,acceptKey:function(a,b){var c=this.accept(a[b]);if(this.mutating){if(c&&!d.prototype[c.type])throw new j["default"]('Unexpected node type "'+c.type+'" found when accepting '+b+" on "+a.type);a[b]=c}},acceptRequired:function(a,b){if(this.acceptKey(a,b),!a[b])throw new j["default"](a.type+" requires "+b)},acceptArray:function(a){for(var b=0,c=a.length;c>b;b++)this.acceptKey(a,b),a[b]||(a.splice(b,1),b--,c--)},accept:function(a){if(a){if(!this[a.type])throw new j["default"]("Unknown type: "+a.type,a);this.current&&this.parents.unshift(this.current),this.current=a;var b=this[a.type](a);return this.current=this.parents.shift(),!this.mutating||b?b:b!==!1?a:void 0}},Program:function(a){this.acceptArray(a.body)},MustacheStatement:e,Decorator:e,BlockStatement:f,DecoratorBlock:f,PartialStatement:g,PartialBlockStatement:function(a){g.call(this,a),this.acceptKey(a,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:e,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(a){this.acceptArray(a.pairs)},HashPair:function(a){this.acceptRequired(a,"value")}},b["default"]=d,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b){if(b=b.path?b.path.original:b,a.path.original!==b){var c={loc:a.path.loc};throw new q["default"](a.path.original+" doesn't match "+b,c)}}function e(a,b){this.source=a,this.start={line:b.first_line,column:b.first_column},this.end={line:b.last_line,column:b.last_column}}function f(a){return/^\[.*\]$/.test(a)?a.substr(1,a.length-2):a}function g(a,b){return{open:"~"===a.charAt(2),close:"~"===b.charAt(b.length-3)}}function h(a){return a.replace(/^\{\{~?\!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function i(a,b,c){c=this.locInfo(c);for(var d=a?"@":"",e=[],f=0,g="",h=0,i=b.length;i>h;h++){var j=b[h].part,k=b[h].original!==j;if(d+=(b[h].separator||"")+j,k||".."!==j&&"."!==j&&"this"!==j)e.push(j);else{if(e.length>0)throw new q["default"]("Invalid path: "+d,{loc:c});".."===j&&(f++,g+="../")}}return{type:"PathExpression",data:a,depth:f,parts:e,original:d,loc:c}}function j(a,b,c,d,e,f){var g=d.charAt(3)||d.charAt(2),h="{"!==g&&"&"!==g,i=/\*/.test(d);return{type:i?"Decorator":"MustacheStatement",path:a,params:b,hash:c,escaped:h,strip:e,loc:this.locInfo(f)}}function k(a,b,c,e){d(a,c),e=this.locInfo(e);var f={type:"Program",body:b,strip:{},loc:e};return{type:"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:f,openStrip:{},inverseStrip:{},closeStrip:{},loc:e}}function l(a,b,c,e,f,g){e&&e.path&&d(a,e);var h=/\*/.test(a.open);b.blockParams=a.blockParams;var i=void 0,j=void 0;if(c){if(h)throw new q["default"]("Unexpected inverse block on decorator",c);c.chain&&(c.program.body[0].closeStrip=e.strip),j=c.strip,i=c.program}return f&&(f=i,i=b,b=f),{type:h?"DecoratorBlock":"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:b,inverse:i,openStrip:a.strip,inverseStrip:j,closeStrip:e&&e.strip,loc:this.locInfo(g)}}function m(a,b){if(!b&&a.length){var c=a[0].loc,d=a[a.length-1].loc;c&&d&&(b={source:c.source,start:{line:c.start.line,column:c.start.column},end:{line:d.end.line,column:d.end.column}})}return{type:"Program",body:a,strip:{},loc:b}}function n(a,b,c,e){return d(a,c),{type:"PartialBlockStatement",name:a.path,params:a.params,hash:a.hash,program:b,openStrip:a.strip,closeStrip:c&&c.strip,loc:this.locInfo(e)}}var o=c(1)["default"];b.__esModule=!0,b.SourceLocation=e,b.id=f,b.stripFlags=g,b.stripComment=h,b.preparePath=i,b.prepareMustache=j,b.prepareRawBlock=k,b.prepareBlock=l,b.prepareProgram=m,b.preparePartialBlock=n;var p=c(6),q=o(p)},function(a,b,c){"use strict";function d(){}function e(a,b,c){if(null==a||"string"!=typeof a&&"Program"!==a.type)throw new k["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var d=c.parse(a,b),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function f(a,b,c){function d(){var d=c.parse(a,b),e=(new c.Compiler).compile(d,b),f=(new c.JavaScriptCompiler).compile(e,b,void 0,!0);return c.template(f)}function e(a,b){return f||(f=d()),f.call(this,a,b)}if(void 0===b&&(b={}),null==a||"string"!=typeof a&&"Program"!==a.type)throw new k["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var f=void 0;return e._setup=function(a){return f||(f=d()),f._setup(a)},e._child=function(a,b,c,e){return f||(f=d()),f._child(a,b,c,e)},e}function g(a,b){if(a===b)return!0;if(l.isArray(a)&&l.isArray(b)&&a.length===b.length){for(var c=0;c<a.length;c++)if(!g(a[c],b[c]))return!1;return!0}}function h(a){if(!a.path.parts){var b=a.path;a.path={type:"PathExpression",data:!1,depth:0,parts:[b.original+""],original:b.original+"",loc:b.loc}}}var i=c(1)["default"];b.__esModule=!0,b.Compiler=d,b.precompile=e,b.compile=f;var j=c(6),k=i(j),l=c(5),m=c(21),n=i(m),o=[].slice;d.prototype={compiler:d,equals:function(a){var b=this.opcodes.length;if(a.opcodes.length!==b)return!1;for(var c=0;b>c;c++){var d=this.opcodes[c],e=a.opcodes[c];if(d.opcode!==e.opcode||!g(d.args,e.args))return!1}b=this.children.length;for(var c=0;b>c;c++)if(!this.children[c].equals(a.children[c]))return!1;return!0},guid:0,compile:function(a,b){this.sourceNode=[],this.opcodes=[],this.children=[],this.options=b,this.stringParams=b.stringParams,this.trackIds=b.trackIds,b.blockParams=b.blockParams||[];var c=b.knownHelpers;if(b.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0,lookup:!0},c)for(var d in c)d in c&&(b.knownHelpers[d]=c[d]);return this.accept(a)},compileProgram:function(a){var b=new this.compiler,c=b.compile(a,this.options),d=this.guid++;return this.usePartial=this.usePartial||c.usePartial,this.children[d]=c,this.useDepths=this.useDepths||c.useDepths,d},accept:function(a){if(!this[a.type])throw new k["default"]("Unknown type: "+a.type,a);this.sourceNode.unshift(a);var b=this[a.type](a);return this.sourceNode.shift(),b},Program:function(a){this.options.blockParams.unshift(a.blockParams);for(var b=a.body,c=b.length,d=0;c>d;d++)this.accept(b[d]);return this.options.blockParams.shift(),this.isSimple=1===c,this.blockParams=a.blockParams?a.blockParams.length:0,this},BlockStatement:function(a){h(a);var b=a.program,c=a.inverse;b=b&&this.compileProgram(b),c=c&&this.compileProgram(c);var d=this.classifySexpr(a);"helper"===d?this.helperSexpr(a,b,c):"simple"===d?(this.simpleSexpr(a),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("blockValue",a.path.original)):(this.ambiguousSexpr(a,b,c),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(a){var b=a.program&&this.compileProgram(a.program),c=this.setupFullMustacheParams(a,b,void 0),d=a.path;this.useDecorators=!0,this.opcode("registerDecorator",c.length,d.original)},PartialStatement:function(a){this.usePartial=!0;var b=a.program;b&&(b=this.compileProgram(a.program));var c=a.params;if(c.length>1)throw new k["default"]("Unsupported number of partial arguments: "+c.length,a);c.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):c.push({type:"PathExpression",parts:[],depth:0}));var d=a.name.original,e="SubExpression"===a.name.type;e&&this.accept(a.name),this.setupFullMustacheParams(a,b,void 0,!0);var f=a.indent||"";this.options.preventIndent&&f&&(this.opcode("appendContent",f),f=""),this.opcode("invokePartial",e,d,f),this.opcode("append")},PartialBlockStatement:function(a){this.PartialStatement(a)},MustacheStatement:function(a){this.SubExpression(a),a.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(a){this.DecoratorBlock(a)},ContentStatement:function(a){a.value&&this.opcode("appendContent",a.value)},CommentStatement:function(){},SubExpression:function(a){h(a);var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ambiguousSexpr:function(a,b,c){var d=a.path,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),d.strict=!0,this.accept(d),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.path;b.strict=!0,this.accept(b),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.path,f=e.parts[0];if(this.options.knownHelpers[f])this.opcode("invokeKnownHelper",d.length,f);else{if(this.options.knownHelpersOnly)throw new k["default"]("You specified knownHelpersOnly, but used the unknown helper "+f,a);e.strict=!0,e.falsy=!0,this.accept(e),this.opcode("invokeHelper",d.length,e.original,n["default"].helpers.simpleId(e))}},PathExpression:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0],c=n["default"].helpers.scopedId(a),d=!a.depth&&!c&&this.blockParamIndex(b);d?this.opcode("lookupBlockParam",d,a.parts):b?a.data?(this.options.data=!0,this.opcode("lookupData",a.depth,a.parts,a.strict)):this.opcode("lookupOnContext",a.parts,a.falsy,a.strict,c):this.opcode("pushContext")},StringLiteral:function(a){this.opcode("pushString",a.value)},NumberLiteral:function(a){this.opcode("pushLiteral",a.value)},BooleanLiteral:function(a){this.opcode("pushLiteral",a.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(a){var b=a.pairs,c=0,d=b.length;for(this.opcode("pushHash");d>c;c++)this.pushParam(b[c].value);for(;c--;)this.opcode("assignToHash",b[c].key);this.opcode("popHash")},opcode:function(a){this.opcodes.push({opcode:a,args:o.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(a){a&&(this.useDepths=!0)},classifySexpr:function(a){var b=n["default"].helpers.simpleId(a.path),c=b&&!!this.blockParamIndex(a.path.parts[0]),d=!c&&n["default"].helpers.helperExpression(a),e=!c&&(d||b);if(e&&!d){var f=a.path.parts[0],g=this.options;g.knownHelpers[f]?d=!0:g.knownHelpersOnly&&(e=!1)}return d?"helper":e?"ambiguous":"simple"},pushParams:function(a){for(var b=0,c=a.length;c>b;b++)this.pushParam(a[b])},pushParam:function(a){var b=null!=a.value?a.value:a.original||"";if(this.stringParams)b.replace&&(b=b.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),a.depth&&this.addDepth(a.depth),this.opcode("getContext",a.depth||0),this.opcode("pushStringParam",b,a.type),"SubExpression"===a.type&&this.accept(a);else{if(this.trackIds){var c=void 0;if(!a.parts||n["default"].helpers.scopedId(a)||a.depth||(c=this.blockParamIndex(a.parts[0])),c){var d=a.parts.slice(1).join(".");this.opcode("pushId","BlockParam",c,d)}else b=a.original||b,b.replace&&(b=b.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",a.type,b)}this.accept(a)}},setupFullMustacheParams:function(a,b,c,d){var e=a.params;return this.pushParams(e),this.opcode("pushProgram",b),this.opcode("pushProgram",c),a.hash?this.accept(a.hash):this.opcode("emptyHash",d),e},blockParamIndex:function(a){for(var b=0,c=this.options.blockParams.length;c>b;b++){var d=this.options.blockParams[b],e=d&&l.indexOf(d,a);if(d&&e>=0)return[b,e]}}}},function(a,b,c){"use strict";function d(a){this.value=a}function e(){}function f(a,b,c,d){var e=b.popStack(),f=0,g=c.length;for(a&&g--;g>f;f++)e=b.nameLookup(e,c[f],d);return a?[b.aliasable("container.strict"),"(",e,", ",b.quotedString(c[f]),")"]:e}var g=c(1)["default"];b.__esModule=!0;var h=c(4),i=c(6),j=g(i),k=c(5),l=c(29),m=g(l);e.prototype={nameLookup:function(a,b){return e.isValidJavaScriptVariableName(b)?[a,".",b]:[a,"[",JSON.stringify(b),"]"]},depthedLookup:function(a){return[this.aliasable("container.lookup"),'(depths, "',a,'")']},compilerInfo:function(){var a=h.COMPILER_REVISION,b=h.REVISION_CHANGES[a];return[a,b]},appendToBuffer:function(a,b,c){return k.isArray(a)||(a=[a]),a=this.source.wrap(a,b),this.environment.isSimple?["return ",a,";"]:c?["buffer += ",a,";"]:(a.appendToBuffer=!0,a)},initializeBuffer:function(){return this.quotedString("")},compile:function(a,b,c,d){this.environment=a,this.options=b,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!d,this.name=this.environment.name,this.isChild=!!c,this.context=c||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(a,b),this.useDepths=this.useDepths||a.useDepths||a.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||a.useBlockParams;var e=a.opcodes,f=void 0,g=void 0,h=void 0,i=void 0;for(h=0,i=e.length;i>h;h++)f=e[h],this.source.currentLocation=f.loc,g=g||f.loc,this[f.opcode].apply(this,f.args);if(this.source.currentLocation=g,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new j["default"]("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend("var decorators = container.decorators;\n"),this.decorators.push("return fn;"),d?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"),this.decorators.push("}\n"),this.decorators=this.decorators.merge()));var k=this.createFunctionContext(d);if(this.isChild)return k;var l={compiler:this.compilerInfo(),main:k};this.decorators&&(l.main_d=this.decorators,l.useDecorators=!0);var m=this.context,n=m.programs,o=m.decorators;for(h=0,i=n.length;i>h;h++)n[h]&&(l[h]=n[h],o[h]&&(l[h+"_d"]=o[h],l.useDecorators=!0));return this.environment.usePartial&&(l.usePartial=!0),this.options.data&&(l.useData=!0),this.useDepths&&(l.useDepths=!0),this.useBlockParams&&(l.useBlockParams=!0),this.options.compat&&(l.compat=!0),d?l.compilerOptions=this.options:(l.compiler=JSON.stringify(l.compiler),this.source.currentLocation={start:{line:1,column:0}},l=this.objectLiteral(l),b.srcName?(l=l.toStringWithSourceMap({file:b.destName}),l.map=l.map&&l.map.toString()):l=l.toString()),l},preamble:function(){this.lastContext=0,this.source=new m["default"](this.options.srcName),this.decorators=new m["default"](this.options.srcName)},createFunctionContext:function(a){var b="",c=this.stackVars.concat(this.registers.list);c.length>0&&(b+=", "+c.join(", "));var d=0;for(var e in this.aliases){var f=this.aliases[e];this.aliases.hasOwnProperty(e)&&f.children&&f.referenceCount>1&&(b+=", alias"+ ++d+"="+e,f.children[0]="alias"+d)}var g=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&g.push("blockParams"),this.useDepths&&g.push("depths");var h=this.mergeSource(b);return a?(g.push(h),Function.apply(this,g)):this.source.wrap(["function(",g.join(","),") {\n ",h,"}"])},mergeSource:function(a){var b=this.environment.isSimple,c=!this.forceBuffer,d=void 0,e=void 0,f=void 0,g=void 0;return this.source.each(function(a){a.appendToBuffer?(f?a.prepend(" + "):f=a,g=a):(f&&(e?f.prepend("buffer += "):d=!0,g.add(";"),f=g=void 0),e=!0,b||(c=!1))}),c?f?(f.prepend("return "),g.add(";")):e||this.source.push('return "";'):(a+=", buffer = "+(d?"":this.initializeBuffer()),f?(f.prepend("return buffer + "),g.add(";")):this.source.push("return buffer;")),a&&this.source.prepend("var "+a.substring(2)+(d?"":";\n")),this.source.merge()},blockValue:function(a){var b=this.aliasable("helpers.blockHelperMissing"),c=[this.contextName(0)];this.setupHelperArgs(a,0,c);var d=this.popStack();c.splice(1,0,d),this.push(this.source.functionCall(b,"call",c))},ambiguousBlockValue:function(){var a=this.aliasable("helpers.blockHelperMissing"),b=[this.contextName(0)];this.setupHelperArgs("",0,b,!0),this.flushInline();var c=this.topStack();b.splice(1,0,c),this.pushSource(["if (!",this.lastHelper,") { ",c," = ",this.source.functionCall(a,"call",b),"}"])},appendContent:function(a){this.pendingContent?a=this.pendingContent+a:this.pendingLocation=this.source.currentLocation,this.pendingContent=a},append:function(){if(this.isInline())this.replaceStack(function(a){return[" != null ? ",a,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var a=this.popStack();this.pushSource(["if (",a," != null) { ",this.appendToBuffer(a,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(a){this.lastContext=a},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(a,b,c,d){var e=0;d||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(a[e++])),this.resolvePath("context",a,e,b,c)},lookupBlockParam:function(a,b){this.useBlockParams=!0,this.push(["blockParams[",a[0],"][",a[1],"]"]),this.resolvePath("context",b,1)},lookupData:function(a,b,c){a?this.pushStackLiteral("container.data(data, "+a+")"):this.pushStackLiteral("data"),this.resolvePath("data",b,0,!0,c)},resolvePath:function(a,b,c,d,e){var g=this;if(this.options.strict||this.options.assumeObjects)return void this.push(f(this.options.strict&&e,this,b,a));for(var h=b.length;h>c;c++)this.replaceStack(function(e){var f=g.nameLookup(e,b[c],a);return d?[" && ",f]:[" != null ? ",f," : ",e]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(a,b){this.pushContext(),this.pushString(b),"SubExpression"!==b&&("string"==typeof a?this.pushString(a):this.pushStackLiteral(a))},emptyHash:function(a){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(a?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var a=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(a.ids)),this.stringParams&&(this.push(this.objectLiteral(a.contexts)),this.push(this.objectLiteral(a.types))),this.push(this.objectLiteral(a.values))},pushString:function(a){this.pushStackLiteral(this.quotedString(a))},pushLiteral:function(a){this.pushStackLiteral(a)},pushProgram:function(a){null!=a?this.pushStackLiteral(this.programExpression(a)):this.pushStackLiteral(null)},registerDecorator:function(a,b){var c=this.nameLookup("decorators",b,"decorator"),d=this.setupHelperArgs(b,a);this.decorators.push(["fn = ",this.decorators.functionCall(c,"",["fn","props","container",d])," || fn;"])},invokeHelper:function(a,b,c){var d=this.popStack(),e=this.setupHelper(a,b),f=c?[e.name," || "]:"",g=["("].concat(f,d);this.options.strict||g.push(" || ",this.aliasable("helpers.helperMissing")),g.push(")"),this.push(this.source.functionCall(g,"call",e.callParams))},invokeKnownHelper:function(a,b){var c=this.setupHelper(a,b);this.push(this.source.functionCall(c.name,"call",c.callParams))},invokeAmbiguous:function(a,b){this.useRegister("helper");var c=this.popStack();this.emptyHash();var d=this.setupHelper(0,a,b),e=this.lastHelper=this.nameLookup("helpers",a,"helper"),f=["(","(helper = ",e," || ",c,")"];this.options.strict||(f[0]="(helper = ",f.push(" != null ? helper : ",this.aliasable("helpers.helperMissing"))),this.push(["(",f,d.paramsInit?["),(",d.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",d.callParams)," : helper))"])},invokePartial:function(a,b,c){var d=[],e=this.setupParams(b,1,d);a&&(b=this.popStack(),delete e.name),c&&(e.indent=JSON.stringify(c)),e.helpers="helpers",e.partials="partials",e.decorators="container.decorators",a?d.unshift(b):d.unshift(this.nameLookup("partials",b,"partial")),this.options.compat&&(e.depths="depths"),e=this.objectLiteral(e), 18815d.push(e),this.push(this.source.functionCall("container.invokePartial","",d))},assignToHash:function(a){var b=this.popStack(),c=void 0,d=void 0,e=void 0;this.trackIds&&(e=this.popStack()),this.stringParams&&(d=this.popStack(),c=this.popStack());var f=this.hash;c&&(f.contexts[a]=c),d&&(f.types[a]=d),e&&(f.ids[a]=e),f.values[a]=b},pushId:function(a,b,c){"BlockParam"===a?this.pushStackLiteral("blockParams["+b[0]+"].path["+b[1]+"]"+(c?" + "+JSON.stringify("."+c):"")):"PathExpression"===a?this.pushString(b):"SubExpression"===a?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:e,compileChildren:function(a,b){for(var c=a.children,d=void 0,e=void 0,f=0,g=c.length;g>f;f++){d=c[f],e=new this.compiler;var h=this.matchExistingProgram(d);null==h?(this.context.programs.push(""),h=this.context.programs.length,d.index=h,d.name="program"+h,this.context.programs[h]=e.compile(d,b,this.context,!this.precompile),this.context.decorators[h]=e.decorators,this.context.environments[h]=d,this.useDepths=this.useDepths||e.useDepths,this.useBlockParams=this.useBlockParams||e.useBlockParams):(d.index=h,d.name="program"+h,this.useDepths=this.useDepths||d.useDepths,this.useBlockParams=this.useBlockParams||d.useBlockParams)}},matchExistingProgram:function(a){for(var b=0,c=this.context.environments.length;c>b;b++){var d=this.context.environments[b];if(d&&d.equals(a))return b}},programExpression:function(a){var b=this.environment.children[a],c=[b.index,"data",b.blockParams];return(this.useBlockParams||this.useDepths)&&c.push("blockParams"),this.useDepths&&c.push("depths"),"container.program("+c.join(", ")+")"},useRegister:function(a){this.registers[a]||(this.registers[a]=!0,this.registers.list.push(a))},push:function(a){return a instanceof d||(a=this.source.wrap(a)),this.inlineStack.push(a),a},pushStackLiteral:function(a){this.push(new d(a))},pushSource:function(a){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),a&&this.source.push(a)},replaceStack:function(a){var b=["("],c=void 0,e=void 0,f=void 0;if(!this.isInline())throw new j["default"]("replaceStack on non-inline");var g=this.popStack(!0);if(g instanceof d)c=[g.value],b=["(",c],f=!0;else{e=!0;var h=this.incrStack();b=["((",this.push(h)," = ",g,")"],c=this.topStack()}var i=a.call(this,c);f||this.popStack(),e&&this.stackSlot--,this.push(b.concat(i,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;this.inlineStack=[];for(var b=0,c=a.length;c>b;b++){var e=a[b];if(e instanceof d)this.compileStack.push(e);else{var f=this.incrStack();this.pushSource([f," = ",e,";"]),this.compileStack.push(f)}}},isInline:function(){return this.inlineStack.length},popStack:function(a){var b=this.isInline(),c=(b?this.inlineStack:this.compileStack).pop();if(!a&&c instanceof d)return c.value;if(!b){if(!this.stackSlot)throw new j["default"]("Invalid stack pop");this.stackSlot--}return c},topStack:function(){var a=this.isInline()?this.inlineStack:this.compileStack,b=a[a.length-1];return b instanceof d?b.value:b},contextName:function(a){return this.useDepths&&a?"depths["+a+"]":"depth"+a},quotedString:function(a){return this.source.quotedString(a)}
18815,objectLiteral:function(a){return this.source.objectLiteral(a)},aliasable:function(a){var b=this.aliases[a];return b?(b.referenceCount++,b):(b=this.aliases[a]=this.source.wrap(a),b.aliasable=!0,b.referenceCount=1,b)},setupHelper:function(a,b,c){var d=[],e=this.setupHelperArgs(b,a,d,c),f=this.nameLookup("helpers",b,"helper"),g=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : {}");return{params:d,paramsInit:e,name:f,callParams:[g].concat(d)}},setupParams:function(a,b,c){var d={},e=[],f=[],g=[],h=!c,i=void 0;h&&(c=[]),d.name=this.quotedString(a),d.hash=this.popStack(),this.trackIds&&(d.hashIds=this.popStack()),this.stringParams&&(d.hashTypes=this.popStack(),d.hashContexts=this.popStack());var j=this.popStack(),k=this.popStack();(k||j)&&(d.fn=k||"container.noop",d.inverse=j||"container.noop");for(var l=b;l--;)i=this.popStack(),c[l]=i,this.trackIds&&(g[l]=this.popStack()),this.stringParams&&(f[l]=this.popStack(),e[l]=this.popStack());return h&&(d.args=this.source.generateArray(c)),this.trackIds&&(d.ids=this.source.generateArray(g)),this.stringParams&&(d.types=this.source.generateArray(f),d.contexts=this.source.generateArray(e)),this.options.data&&(d.data="data"),this.useBlockParams&&(d.blockParams="blockParams"),d},setupHelperArgs:function(a,b,c,d){var e=this.setupParams(a,b,c);return e=this.objectLiteral(e),d?(this.useRegister("options"),c.push("options"),["options=",e]):c?(c.push(e),""):e}},function(){for(var a="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),b=e.RESERVED_WORDS={},c=0,d=a.length;d>c;c++)b[a[c]]=!0}(),e.isValidJavaScriptVariableName=function(a){return!e.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(a)},b["default"]=e,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b,c){if(f.isArray(a)){for(var d=[],e=0,g=a.length;g>e;e++)d.push(b.wrap(a[e],c));return d}return"boolean"==typeof a||"number"==typeof a?a+"":a}function e(a){this.srcFile=a,this.source=[]}b.__esModule=!0;var f=c(5),g=void 0;try{}catch(h){}g||(g=function(a,b,c,d){this.src="",d&&this.add(d)},g.prototype={add:function(a){f.isArray(a)&&(a=a.join("")),this.src+=a},prepend:function(a){f.isArray(a)&&(a=a.join("")),this.src=a+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),e.prototype={isEmpty:function(){return!this.source.length},prepend:function(a,b){this.source.unshift(this.wrap(a,b))},push:function(a,b){this.source.push(this.wrap(a,b))},merge:function(){var a=this.empty();return this.each(function(b){a.add([" ",b,"\n"])}),a},each:function(a){for(var b=0,c=this.source.length;c>b;b++)a(this.source[b])},empty:function(){var a=this.currentLocation||{start:{}};return new g(a.start.line,a.start.column,this.srcFile)},wrap:function(a){var b=arguments.length<=1||void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return a instanceof g?a:(a=d(a,this,b),new g(b.start.line,b.start.column,this.srcFile,a))},functionCall:function(a,b,c){return c=this.generateList(c),this.wrap([a,b?"."+b+"(":"(",c,")"])},quotedString:function(a){return'"'+(a+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(a){var b=[];for(var c in a)if(a.hasOwnProperty(c)){var e=d(a[c],this);"undefined"!==e&&b.push([this.quotedString(c),":",e])}var f=this.generateList(b);return f.prepend("{"),f.add("}"),f},generateList:function(a){for(var b=this.empty(),c=0,e=a.length;e>c;c++)c&&b.add(","),b.add(d(a[c],this));return b},generateArray:function(a){var b=this.generateList(a);return b.prepend("["),b.add("]"),b}},b["default"]=e,a.exports=b["default"]}])}); 18816//! moment.js 18817//! version : 2.2.22 18818!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var e,i;function c(){return e.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function u(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function l(e){return void 0===e}function d(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function h(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var n,s=[];for(n=0;n<e.length;++n)s.push(t(e[n],n));return s}function m(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function _(e,t){for(var n in t)m(t,n)&&(e[n]=t[n]);return m(t,"toString")&&(e.toString=t.toString),m(t,"valueOf")&&(e.valueOf=t.valueOf),e}function y(e,t,n,s){return Ot(e,t,n,s,!0).utc()}function g(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invali
vendor: 50,979 bytes, lines 18818-18826
18818dFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function p(e){if(null==e._isValid){var t=g(e),n=i.call(t.parsedDateParts,function(e){return null!=e}),s=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(s=s&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return s;e._isValid=s}return e._isValid}function v(e){var t=y(NaN);return null!=e?_(g(t),e):g(t).userInvalidated=!0,t}i=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,s=0;s<n;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1};var r=c.momentProperties=[];function w(e,t){var n,s,i;if(l(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),l(t._i)||(e._i=t._i),l(t._f)||(e._f=t._f),l(t._l)||(e._l=t._l),l(t._strict)||(e._strict=t._strict),l(t._tzm)||(e._tzm=t._tzm),l(t._isUTC)||(e._isUTC=t._isUTC),l(t._offset)||(e._offset=t._offset),l(t._pf)||(e._pf=g(t)),l(t._locale)||(e._locale=t._locale),0<r.length)for(n=0;n<r.length;n++)l(i=t[s=r[n]])||(e[s]=i);return e}var t=!1;function M(e){w(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===t&&(t=!0,c.updateOffset(this),t=!1)}function S(e){return e instanceof M||null!=e&&null!=e._isAMomentObject}function D(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function k(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=D(t)),n}function a(e,t,n){var s,i=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),a=0;for(s=0;s<i;s++)(n&&e[s]!==t[s]||!n&&k(e[s])!==k(t[s]))&&a++;return a+r}function Y(e){!1===c.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function n(i,r){var a=!0;return _(function(){if(null!=c.deprecationHandler&&c.deprecationHandler(null,i),a){for(var e,t=[],n=0;n<arguments.length;n++){if(e="","object"==typeof arguments[n]){for(var s in e+="\n["+n+"] ",arguments[0])e+=s+": "+arguments[0][s]+", ";e=e.slice(0,-2)}else e=arguments[n];t.push(e)}Y(i+"\nArguments: "+Array.prototype.slice.call(t).join("")+"\n"+(new Error).stack),a=!1}return r.apply(this,arguments)},r)}var s,O={};function T(e,t){null!=c.deprecationHandler&&c.deprecationHandler(e,t),O[e]||(Y(t),O[e]=!0)}function x(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function b(e,t){var n,s=_({},e);for(n in t)m(t,n)&&(u(e[n])&&u(t[n])?(s[n]={},_(s[n],e[n]),_(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)m(e,n)&&!m(t,n)&&u(e[n])&&(s[n]=_({},s[n]));return s}function P(e){null!=e&&this.set(e)}c.suppressDeprecationWarnings=!1,c.deprecationHandler=null,s=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)m(e,t)&&n.push(t);return n};var W={};function H(e,t){var n=e.toLowerCase();W[n]=W[n+"s"]=W[t]=e}function R(e){return"string"==typeof e?W[e]||W[e.toLowerCase()]:void 0}function C(e){var t,n,s={};for(n in e)m(e,n)&&(t=R(n))&&(s[t]=e[n]);return s}var F={};function L(e,t){F[e]=t}function U(e,t,n){var s=""+Math.abs(e),i=t-s.length;return(0<=e?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+s}var N=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,G=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,V={},E={};function I(e,t,n,s){var i=s;"string"==typeof s&&(i=function(){return this[s]()}),e&&(E[e]=i),t&&(E[t[0]]=function(){return U(i.apply(this,arguments),t[1],t[2])}),n&&(E[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function A(e,t){return e.isValid()?(t=j(t,e.localeData()),V[t]=V[t]||function(s){var e,i,t,r=s.match(N);for(e=0,i=r.length;e<i;e++)E[r[e]]?r[e]=E[r[e]]:r[e]=(t=r[e]).match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"");return function(e){var t,n="";for(t=0;t<i;t++)n+=x(r[t])?r[t].call(e,s):r[t];return n}}(t),V[t](e)):e.localeData().invalidDate()}function j(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(G.lastIndex=0;0<=n&&G.test(e);)e=e.replace(G,s),G.lastIndex=0,n-=1;return e}var Z=/\d/,z=/\d\d/,$=/\d{3}/,q=/\d{4}/,J=/[+-]?\d{6}/,B=/\d\d?/,Q=/\d\d\d\d?/,X=/\d\d\d\d\d\d?/,K=/\d{1,3}/,ee=/\d{1,4}/,te=/[+-]?\d{1,6}/,ne=/\d+/,se=/[+-]?\d+/,ie=/Z|[+-]\d\d:?\d\d/gi,re=/Z|[+-]\d\d(?::?\d\d)?/gi,ae=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,oe={};function ue(e,n,s){oe[e]=x(n)?n:function(e,t){return e&&s?s:n}}function le(e,t){return m(oe,e)?oe[e](t._strict,t._locale):new RegExp(de(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,s,i){return t||n||s||i})))}function de(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var he={};function ce(e,n){var t,s=n;for("string"==typeof e&&(e=[e]),d(n)&&(s=function(e,t){t[n]=k(e)}),t=0;t<e.length;t++)he[e[t]]=s}function fe(e,i){ce(e,function(e,t,n,s){n._w=n._w||{},i(e,n._w,n,s)})}var me=0,_e=1,ye=2,ge=3,pe=4,ve=5,we=6,Me=7,Se=8;function De(e){return ke(e)?366:365}function ke(e){return e%4==0&&e%100!=0||e%400==0}I("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e}),I(0,["YY",2],0,function(){return this.year()%100}),I(0,["YYYY",4],0,"year"),I(0,["YYYYY",5],0,"year"),I(0,["YYYYYY",6,!0],0,"year"),H("year","y"),L("year",1),ue("Y",se),ue("YY",B,z),ue("YYYY",ee,q),ue("YYYYY",te,J),ue("YYYYYY",te,J),ce(["YYYYY","YYYYYY"],me),ce("YYYY",function(e,t){t[me]=2===e.length?c.parseTwoDigitYear(e):k(e)}),ce("YY",function(e,t){t[me]=c.parseTwoDigitYear(e)}),ce("Y",function(e,t){t[me]=parseInt(e,10)}),c.parseTwoDigitYear=function(e){return k(e)+(68<k(e)?1900:2e3)};var Ye,Oe=Te("FullYear",!0);function Te(t,n){return function(e){return null!=e?(be(this,t,e),c.updateOffset(this,n),this):xe(this,t)}}function xe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function be(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&ke(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Pe(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Pe(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,s=(t%(n=12)+n)%n;return e+=(t-s)/12,1===s?ke(e)?29:28:31-s%7%2}Ye=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},I("M",["MM",2],"Mo",function(){return this.month()+1}),I("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),I("MMMM",0,0,function(e){return this.localeData().months(this,e)}),H("month","M"),L("month",8),ue("M",B),ue("MM",B,z),ue("MMM",function(e,t){return t.monthsShortRegex(e)}),ue("MMMM",function(e,t){return t.monthsRegex(e)}),ce(["M","MM"],function(e,t){t[_e]=k(e)-1}),ce(["MMM","MMMM"],function(e,t,n,s){var i=n._locale.monthsParse(e,s,n._strict);null!=i?t[_e]=i:g(n).invalidMonth=e});var We=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,He="January_February_March_April_May_June_July_August_September_October_November_December".split("_");var Re="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Ce(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=k(t);else if(!d(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Pe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Fe(e){return null!=e?(Ce(this,e),c.updateOffset(this,!0),this):xe(this,"Month")}var Le=ae;var Ue=ae;function Ne(){function e(e,t){return t.length-e.length}var t,n,s=[],i=[],r=[];for(t=0;t<12;t++)n=y([2e3,t]),s.push(this.monthsShort(n,"")),i.push(this.months(n,"")),r.push(this.months(n,"")),r.push(this.monthsShort(n,""));for(s.sort(e),i.sort(e),r.sort(e),t=0;t<12;t++)s[t]=de(s[t]),i[t]=de(i[t]);for(t=0;t<24;t++)r[t]=de(r[t]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Ge(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&0<=e&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function Ve(e,t,n){var s=7+t-n;return-((7+Ge(e,0,s).getUTCDay()-t)%7)+s-1}function Ee(e,t,n,s,i){var r,a,o=1+7*(t-1)+(7+n-s)%7+Ve(e,s,i);return o<=0?a=De(r=e-1)+o:o>De(e)?(r=e+1,a=o-De(e)):(r=e,a=o),{year:r,dayOfYear:a}}function Ie(e,t,n){var s,i,r=Ve(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+Ae(i=e.year()-1,t,n):a>Ae(e.year(),t,n)?(s=a-Ae(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function Ae(e,t,n){var s=Ve(e,t,n),i=Ve(e+1,t,n);return(De(e)-s+i)/7}I("w",["ww",2],"wo","week"),I("W",["WW",2],"Wo","isoWeek"),H("week","w"),H("isoWeek","W"),L("week",5),L("isoWeek",5),ue("w",B),ue("ww",B,z),ue("W",B),ue("WW",B,z),fe(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=k(e)});I("d",0,"do","day"),I("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),I("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),I("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),I("e",0,0,"weekday"),I("E",0,0,"isoWeekday"),H("day","d"),H("weekday","e"),H("isoWeekday","E"),L("day",11),L("weekday",11),L("isoWeekday",11),ue("d",B),ue("e",B),ue("E",B),ue("dd",function(e,t){return t.weekdaysMinRegex(e)}),ue("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ue("dddd",function(e,t){return t.weekdaysRegex(e)}),fe(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e}),fe(["d","e","E"],function(e,t,n,s){t[s]=k(e)});var je="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var ze="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var $e=ae;var qe=ae;var Je=ae;function Be(){function e(e,t){return t.length-e.length}var t,n,s,i,r,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=y([2e3,1]).day(t),s=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),r=this.weekdays(n,""),a.push(s),o.push(i),u.push(r),l.push(s),l.push(i),l.push(r);for(a.sort(e),o.sort(e),u.sort(e),l.sort(e),t=0;t<7;t++)o[t]=de(o[t]),u[t]=de(u[t]),l[t]=de(l[t]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Qe(){return this.hours()%12||12}function Xe(e,t){I(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Ke(e,t){return t._meridiemParse}I("H",["HH",2],0,"hour"),I("h",["hh",2],0,Qe),I("k",["kk",2],0,function(){return this.hours()||24}),I("hmm",0,0,function(){return""+Qe.apply(this)+U(this.minutes(),2)}),I("hmmss",0,0,function(){return""+Qe.apply(this)+U(this.minutes(),2)+U(this.seconds(),2)}),I("Hmm",0,0,function(){return""+this.hours()+U(this.minutes(),2)}),I("Hmmss",0,0,function(){return""+this.hours()+U(this.minutes(),2)+U(this.seconds(),2)}),Xe("a",!0),Xe("A",!1),H("hour","h"),L("hour",13),ue("a",Ke),ue("A",Ke),ue("H",B),ue("h",B),ue("k",B),ue("HH",B,z),ue("hh",B,z),ue("kk",B,z),ue("hmm",Q),ue("hmmss",X),ue("Hmm",Q),ue("Hmmss",X),ce(["H","HH"],ge),ce(["k","kk"],function(e,t,n){var s=k(e);t[ge]=24===s?0:s}),ce(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ce(["h","hh"],function(e,t,n){t[ge]=k(e),g(n).bigHour=!0}),ce("hmm",function(e,t,n){var s=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s)),g(n).bigHour=!0}),ce("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s,2)),t[ve]=k(e.substr(i)),g(n).bigHour=!0}),ce("Hmm",function(e,t,n){var s=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s))}),ce("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s,2)),t[ve]=k(e.substr(i))});var et,tt=Te("Hours",!0),nt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:He,monthsShort:Re,week:{dow:0,doy:6},weekdays:je,weekdaysMin:ze,weekdaysShort:Ze,meridiemParse:/[ap]\.?m?\.?/i},st={},it={};function rt(e){return e?e.toLowerCase().replace("_","-"):e}function at(e){var t=null;if(!st[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=et._abbr,require("./locale/"+e),ot(t)}catch(e){}return st[e]}function ot(e,t){var n;return e&&((n=l(t)?lt(e):ut(e,t))?et=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),et._abbr}function ut(e,t){if(null!==t){var n,s=nt;if(t.abbr=e,null!=st[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=st[e]._config;else if(null!=t.parentLocale)if(null!=st[t.parentLocale])s=st[t.parentLocale]._config;else{if(null==(n=at(t.parentLocale)))return it[t.parentLocale]||(it[t.parentLocale]=[]),it[t.parentLocale].push({name:e,config:t}),null;s=n._config}return st[e]=new P(b(s,t)),it[e]&&it[e].forEach(function(e){ut(e.name,e.config)}),ot(e),st[e]}return delete st[e],null}function lt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return et;if(!o(e)){if(t=at(e))return t;e=[e]}return function(e){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=rt(e[r]).split("-")).length,n=(n=rt(e[r+1]))?n.split("-"):null;0<t;){if(s=at(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&a(i,n,!0)>=t-1)break;t--}r++}return et}(e)}function dt(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[_e]<0||11<n[_e]?_e:n[ye]<1||n[ye]>Pe(n[me],n[_e])?ye:n[ge]<0||24<n[ge]||24===n[ge]&&(0!==n[pe]||0!==n[ve]||0!==n[we])?ge:n[pe]<0||59<n[pe]?pe:n[ve]<0||59<n[ve]?ve:n[we]<0||999<n[we]?we:-1,g(e)._overflowDayOfYear&&(t<me||ye<t)&&(t=ye),g(e)._overflowWeeks&&-1===t&&(t=Me),g(e)._overflowWeekday&&-1===t&&(t=Se),g(e).overflow=t),e}function ht(e,t,n){return null!=e?e:null!=t?t:n}function ct(e){var t,n,s,i,r,a=[];if(!e._d){var o,u;for(o=e,u=new Date(c.now()),s=o._useUTC?[u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()]:[u.getFullYear(),u.getMonth(),u.getDate()],e._w&&null==e._a[ye]&&null==e._a[_e]&&function(e){var t,n,s,i,r,a,o,u;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)r=1,a=4,n=ht(t.GG,e._a[me],Ie(Tt(),1,4).year),s=ht(t.W,1),((i=ht(t.E,1))<1||7<i)&&(u=!0);else{r=e._locale._week.dow,a=e._locale._week.doy;var l=Ie(Tt(),r,a);n=ht(t.gg,e._a[me],l.year),s=ht(t.w,l.week),null!=t.d?((i=t.d)<0||6<i)&&(u=!0):null!=t.e?(i=t.e+r,(t.e<0||6<t.e)&&(u=!0)):i=r}s<1||s>Ae(n,r,a)?g(e)._overflowWeeks=!0:null!=u?g(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[me]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=ht(e._a[me],s[me]),(e._dayOfYear>De(r)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=Ge(r,0,e._dayOfYear),e._a[_e]=n.getUTCMonth(),e._a[ye]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=s[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ge]&&0===e._a[pe]&&0===e._a[ve]&&0===e._a[we]&&(e._nextDay=!0,e._a[ge]=0),e._d=(e._useUTC?Ge:function(e,t,n,s,i,r,a){var o=new Date(e,t,n,s,i,r,a);return e<100&&0<=e&&isFinite(o.getFullYear())&&o.setFullYear(e),o}).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ge]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}var ft=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,mt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/Z|[+-]\d\d(?::?\d\d)?/,yt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],gt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],pt=/^\/?Date\((\-?\d+)/i;function vt(e){var t,n,s,i,r,a,o=e._i,u=ft.exec(o)||mt.exec(o);if(u){for(g(e).iso=!0,t=0,n=yt.length;t<n;t++)if(yt[t][1].exec(u[1])){i=yt[t][0],s=!1!==yt[t][2];break}if(null==i)return void(e._isValid=!1);if(u[3]){for(t=0,n=gt.length;t<n;t++)if(gt[t][1].exec(u[3])){r=(u[2]||" ")+gt[t][0];break}if(null==r)return void(e._isValid=!1)}if(!s&&null!=r)return void(e._isValid=!1);if(u[4]){if(!_t.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=i+(r||"")+(a||""),kt(e)}else e._isValid=!1}var wt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function Mt(e,t,n,s,i,r){var a=[function(e){var t=parseInt(e,10);{if(t<=49)return 2e3+t;if(t<=999)return 1900+t}return t}(e),Re.indexOf(t),parseInt(n,10),parseInt(s,10),parseInt(i,10)];return r&&a.push(parseInt(r,10)),a}var St={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Dt(e){var t,n,s,i=wt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(i){var r=Mt(i[4],i[3],i[2],i[5],i[6],i[7]);if(t=i[1],n=r,s=e,t&&Ze.indexOf(t)!==new Date(n[0],n[1],n[2]).getDay()&&(g(s).weekdayMismatch=!0,!(s._isValid=!1)))return;e._a=r,e._tzm=function(e,t,n){if(e)return St[e];if(t)return 0;var s=parseInt(n,10),i=s%100;return(s-i)/100*60+i}(i[8],i[9],i[10]),e._d=Ge.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function kt(e){if(e._f!==c.ISO_8601)if(e._f!==c.RFC_2822){e._a=[],g(e).empty=!0;var t,n,s,i,r,a,o,u,l=""+e._i,d=l.length,h=0;for(s=j(e._f,e._locale).match(N)||[],t=0;t<s.length;t++)i=s[t],(n=(l.match(le(i,e))||[])[0])&&(0<(r=l.substr(0,l.indexOf(n))).length&&g(e).unusedInput.push(r),l=l.slice(l.indexOf(n)+n.length),h+=n.length),E[i]?(n?g(e).empty=!1:g(e).unusedTokens.push(i),a=i,u=e,null!=(o=n)&&m(he,a)&&he[a](o,u._a,u,a)):e._strict&&!n&&g(e).unusedTokens.push(i);g(e).charsLeftOver=d-h,0<l.length&&g(e).unusedInput.push(l),e._a[ge]<=12&&!0===g(e).bigHour&&0<e._a[ge]&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[ge]=function(e,t,n){var s;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):(null!=e.isPM&&((s=e.isPM(n))&&t<12&&(t+=12),s||12!==t||(t=0)),t)}(e._locale,e._a[ge],e._meridiem),ct(e),dt(e)}else Dt(e);else vt(e)}function Yt(e){var t,n,s,i,r=e._i,a=e._f;return e._locale=e._locale||lt(e._l),null===r||void 0===a&&""===r?v({nullInput:!0}):("string"==typeof r&&(e._i=r=e._locale.preparse(r)),S(r)?new M(dt(r)):(h(r)?e._d=r:o(a)?function(e){var t,n,s,i,r;if(0===e._f.length)return g(e).invalidFormat=!0,e._d=new Date(NaN);for(i=0;i<e._f.length;i++)r=0,t=w({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],kt(t),p(t)&&(r+=g(t).charsLeftOver,r+=10*g(t).unusedTokens.length,g(t).score=r,(null==s||r<s)&&(s=r,n=t));_(e,n||t)}(e):a?kt(e):l(n=(t=e)._i)?t._d=new Date(c.now()):h(n)?t._d=new Date(n.valueOf()):"string"==typeof n?(s=t,null===(i=pt.exec(s._i))?(vt(s),!1===s._isValid&&(delete s._isValid,Dt(s),!1===s._isValid&&(delete s._isValid,c.createFromInputFallback(s)))):s._d=new Date(+i[1])):o(n)?(t._a=f(n.slice(0),function(e){return parseInt(e,10)}),ct(t)):u(n)?function(e){if(!e._d){var t=C(e._i);e._a=f([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),ct(e)}}(t):d(n)?t._d=new Date(n):c.createFromInputFallback(t),p(e)||(e._d=null),e))}function Ot(e,t,n,s,i){var r,a={};return!0!==n&&!1!==n||(s=n,n=void 0),(u(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||o(e)&&0===e.length)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=e,a._f=t,a._strict=s,(r=new M(dt(Yt(a))))._nextDay&&(r.add(1,"d"),r._nextDay=void 0),r}function Tt(e,t,n,s){return Ot(e,t,n,s,!1)}c.createFromInputFallback=n("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),c.ISO_8601=function(){},c.RFC_2822=function(){};var xt=n("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:v()}),bt=n("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:v()});function Pt(e,t){var n,s;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Tt();for(n=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](n)||(n=t[s]);return n}var Wt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ht(e){var t=C(e),n=t.year||0,s=t.quarter||0,i=t.month||0,r=t.week||0,a=t.day||0,o=t.hour||0,u=t.minute||0,l=t.second||0,d=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===Ye.call(Wt,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,s=0;s<Wt.length;++s)if(e[Wt[s]]){if(n)return!1;parseFloat(e[Wt[s]])!==k(e[Wt[s]])&&(n=!0)}return!0}(t),this._milliseconds=+d+1e3*l+6e4*u+1e3*o*60*60,this._days=+a+7*r,this._months=+i+3*s+12*n,this._data={},this._locale=lt(),this._bubble()}function Rt(e){return e instanceof Ht}function Ct(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ft(e,n){I(e,0,0,function(){var e=this.utcOffset(),t="+";return e<0&&(e=-e,t="-"),t+U(~~(e/60),2)+n+U(~~e%60,2)})}Ft("Z",":"),Ft("ZZ",""),ue("Z",re),ue("ZZ",re),ce(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Ut(re,e)});var Lt=/([\+\-]|\d\d)/gi;function Ut(e,t){var n=(t||"").match(e);if(null===n)return null;var s=((n[n.length-1]||[])+"").match(Lt)||["-",0,0],i=60*s[1]+k(s[2]);return 0===i?0:"+"===s[0]?i:-i}function Nt(e,t){var n,s;return t._isUTC?(n=t.clone(),s=(S(e)||h(e)?e.valueOf():Tt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+s),c.updateOffset(n,!1),n):Tt(e).local()}function Gt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Vt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}c.updateOffset=function(){};var Et=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,It=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function At(e,t){var n,s,i,r=e,a=null;return Rt(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:d(e)?(r={},t?r[t]=e:r.milliseconds=e):(a=Et.exec(e))?(n="-"===a[1]?-1:1,r={y:0,d:k(a[ye])*n,h:k(a[ge])*n,m:k(a[pe])*n,s:k(a[ve])*n,ms:k(Ct(1e3*a[we]))*n}):(a=It.exec(e))?(n="-"===a[1]?-1:(a[1],1),r={y:jt(a[2],n),M:jt(a[3],n),w:jt(a[4],n),d:jt(a[5],n),h:jt(a[6],n),m:jt(a[7],n),s:jt(a[8],n)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(i=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Nt(t,e),e.isBefore(t)?n=Zt(e,t):((n=Zt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(Tt(r.from),Tt(r.to)),(r={}).ms=i.milliseconds,r.M=i.months),s=new Ht(r),Rt(e)&&m(e,"_locale")&&(s._locale=e._locale),s}function jt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Zt(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function zt(s,i){return function(e,t){var n;return null===t||isNaN(+t)||(T(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=e,e=t,t=n),$t(this,At(e="string"==typeof e?+e:e,t),s),this}}function $t(e,t,n,s){var i=t._milliseconds,r=Ct(t._days),a=Ct(t._months);e.isValid()&&(s=null==s||s,a&&Ce(e,xe(e,"Month")+a*n),r&&be(e,"Date",xe(e,"Date")+r*n),i&&e._d.setTime(e._d.valueOf()+i*n),s&&c.updateOffset(e,r||a))}At.fn=Ht.prototype,At.invalid=function(){return At(NaN)};var qt=zt(1,"add"),Jt=zt(-1,"subtract");function Bt(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),s=e.clone().add(n,"months");return-(n+(t-s<0?(t-s)/(s-e.clone().add(n-1,"months")):(t-s)/(e.clone().add(n+1,"months")-s)))||0}function Qt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=lt(e))&&(this._locale=t),this)}c.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",c.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Xt=n("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function Kt(){return this._locale}function en(e,t){I(0,[e,e.length],0,t)}function tn(e,t,n,s,i){var r;return null==e?Ie(this,s,i).year:((r=Ae(e,s,i))<t&&(t=r),function(e,t,n,s,i){var r=Ee(e,t,n,s,i),a=Ge(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,n,s,i))}I(0,["gg",2],0,function(){return this.weekYear()%100}),I(0,["GG",2],0,function(){return this.isoWeekYear()%100}),en("gggg","weekYear"),en("ggggg","weekYear"),en("GGGG","isoWeekYear"),en("GGGGG","isoWeekYear"),H("weekYear","gg"),H("isoWeekYear","GG"),L("weekYear",1),L("isoWeekYear",1),ue("G",se),ue("g",se),ue("GG",B,z),ue("gg",B,z),ue("GGGG",ee,q),ue("gggg",ee,q),ue("GGGGG",te,J),ue("ggggg",te,J),fe(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=k(e)}),fe(["gg","GG"],function(e,t,n,s){t[s]=c.parseTwoDigitYear(e)}),I("Q",0,"Qo","quarter"),H("quarter","Q"),L("quarter",7),ue("Q",Z),ce("Q",function(e,t){t[_e]=3*(k(e)-1)}),I("D",["DD",2],"Do","date"),H("date","D"),L("date",9),ue("D",B),ue("DD",B,z),ue("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),ce(["D","DD"],ye),ce("Do",function(e,t){t[ye]=k(e.match(B)[0])});var nn=Te("Date",!0);I("DDD",["DDDD",3],"DDDo","dayOfYear"),H("dayOfYear","DDD"),L("dayOfYear",4),ue("DDD",K),ue("DDDD",$),ce(["DDD","DDDD"],function(e,t,n){n._dayOfYear=k(e)}),I("m",["mm",2],0,"minute"),H("minute","m"),L("minute",14),ue("m",B),ue("mm",B,z),ce(["m","mm"],pe);var sn=Te("Minutes",!1);I("s",["ss",2],0,"second"),H("second","s"),L("second",15),ue("s",B),ue("ss",B,z),ce(["s","ss"],ve);var rn,an=Te("Seconds",!1);for(I("S",0,0,function(){return~~(this.millisecond()/100)}),I(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),I(0,["SSS",3],0,"millisecond"),I(0,["SSSS",4],0,function(){return 10*this.millisecond()}),I(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),I(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),I(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),I(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),I(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),H("millisecond","ms"),L("millisecond",16),ue("S",K,Z),ue("SS",K,z),ue("SSS",K,$),rn="SSSS";rn.length<=9;rn+="S")ue(rn,ne);function on(e,t){t[we]=k(1e3*("0."+e))}for(rn="S";rn.length<=9;rn+="S")ce(rn,on);var un=Te("Milliseconds",!1);I("z",0,0,"zoneAbbr"),I("zz",0,0,"zoneName");var ln=M.prototype;function dn(e){return e}ln.add=qt,ln.calendar=function(e,t){var n=e||Tt(),s=Nt(n,this).startOf("day"),i=c.calendarFormat(this,s)||"sameElse",r=t&&(x(t[i])?t[i].call(this,n):t[i]);return this.format(r||this.localeData().calendar(i,this,Tt(n)))},ln.clone=function(){return new M(this)},ln.diff=function(e,t,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=Nt(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=R(t)){case"year":r=Bt(this,s)/12;break;case"month":r=Bt(this,s);break;case"quarter":r=Bt(this,s)/3;break;case"second":r=(this-s)/1e3;break;case"minute":r=(this-s)/6e4;break;case"hour":r=(this-s)/36e5;break;case"day":r=(this-s-i)/864e5;break;case"week":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:D(r)},ln.endOf=function(e){return void 0===(e=R(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},ln.format=function(e){e||(e=this.isUtc()?c.defaultFormatUtc:c.defaultFormat);var t=A(this,e);return this.localeData().postformat(t)},ln.from=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Tt(e).isValid())?At({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},ln.fromNow=function(e){return this.from(Tt(),e)},ln.to=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Tt(e).isValid())?At({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},ln.toNow=function(e){return this.to(Tt(),e)},ln.get=function(e){return x(this[e=R(e)])?this[e]():this},ln.invalidAt=function(){return g(this).overflow},ln.isAfter=function(e,t){var n=S(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=R(l(t)?"millisecond":t))?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},ln.isBefore=function(e,t){var n=S(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=R(l(t)?"millisecond":t))?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},ln.isBetween=function(e,t,n,s){return("("===(s=s||"()")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===s[1]?this.isBefore(t,n):!this.isAfter(t,n))},ln.isSame=function(e,t){var n,s=S(e)?e:Tt(e);return!(!this.isValid()||!s.isValid())&&("millisecond"===(t=R(t||"millisecond"))?this.valueOf()===s.valueOf():(n=s.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},ln.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},ln.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},ln.isValid=function(){return p(this)},ln.lang=Xt,ln.locale=Qt,ln.localeData=Kt,ln.max=bt,ln.min=xt,ln.parsingFlags=function(){return _({},g(this))},ln.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:F[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}(e=C(e)),s=0;s<n.length;s++)this[n[s].unit](e[n[s].unit]);else if(x(this[e=R(e)]))return this[e](t);return this},ln.startOf=function(e){switch(e=R(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this},ln.subtract=Jt,ln.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},ln.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},ln.toDate=function(){return new Date(this.valueOf())},ln.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||9999<n.year()?A(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):x(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",A(n,"Z")):A(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},ln.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',s=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=t+'[")]';return this.format(n+s+"-MM-DD[T]HH:mm:ss.SSS"+i)},ln.toJSON=function(){return this.isValid()?this.toISOString():null},ln.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},ln.unix=function(){return Math.floor(this.valueOf()/1e3)},ln.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},ln.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},ln.year=Oe,ln.isLeapYear=function(){return ke(this.year())},ln.weekYear=function(e){return tn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},ln.isoWeekYear=function(e){return tn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},ln.quarter=ln.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},ln.month=Fe,ln.daysInMonth=function(){return Pe(this.year(),this.month())},ln.week=ln.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},ln.isoWeek=ln.isoWeeks=function(e){var t=Ie(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},ln.weeksInYear=function(){var e=this.localeData()._week;return Ae(this.year(),e.dow,e.doy)},ln.isoWeeksInYear=function(){return Ae(this.year(),1,4)},ln.date=nn,ln.day=ln.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t,n,s=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(t=e,n=this.localeData(),e="string"!=typeof t?t:isNaN(t)?"number"==typeof(t=n.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-s,"d")):s},ln.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},ln.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=(n=e,s=this.localeData(),"string"==typeof n?s.weekdaysParse(n)%7||7:isNaN(n)?null:n);return this.day(this.day()%7?t:t-7)}return this.day()||7;var n,s},ln.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},ln.hour=ln.hours=tt,ln.minute=ln.minutes=sn,ln.second=ln.seconds=an,ln.millisecond=ln.milliseconds=un,ln.utcOffset=function(e,t,n){var s,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Ut(re,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(s=Gt(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,"m"),i!==e&&(!t||this._changeInProgress?$t(this,At(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,c.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Gt(this)},ln.utc=function(e){return this.utcOffset(0,e)},ln.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Gt(this),"m")),this},ln.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Ut(ie,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},ln.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Tt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},ln.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},ln.isLocal=function(){return!!this.isValid()&&!this._isUTC},ln.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},ln.isUtc=Vt,ln.isUTC=Vt,ln.zoneAbbr=function(){return this._isUTC?"UTC":""},ln.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},ln.dates=n("dates accessor is deprecated. Use date instead.",nn),ln.months=n("months accessor is deprecated. Use month instead",Fe),ln.years=n("years accessor is deprecated. Use year instead",Oe),ln.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),ln.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e={};if(w(e,this),(e=Yt(e))._a){var t=e._isUTC?y(e._a):Tt(e._a);this._isDSTShifted=this.isValid()&&0<a(e._a,t.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted});var hn=P.prototype;function cn(e,t,n,s){var i=lt(),r=y().set(s,t);return i[n](r,e)}function fn(e,t,n){if(d(e)&&(t=e,e=void 0),e=e||"",null!=t)return cn(e,t,n,"month");var s,i=[];for(s=0;s<12;s++)i[s]=cn(e,s,n,"month");return i}function mn(e,t,n,s){"boolean"==typeof e?d(t)&&(n=t,t=void 0):(t=e,e=!1,d(n=t)&&(n=t,t=void 0)),t=t||"";var i,r=lt(),a=e?r._week.dow:0;if(null!=n)return cn(t,(n+a)%7,s,"day");var o=[];for(i=0;i<7;i++)o[i]=cn(t,(i+a)%7,s,"day");return o}hn.calendar=function(e,t,n){var s=this._calendar[e]||this._calendar.sameElse;return x(s)?s.call(t,n):s},hn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},hn.invalidDate=function(){return this._invalidDate},hn.ordinal=function(e){return this._ordinal.replace("%d",e)},hn.preparse=dn,hn.postformat=dn,hn.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return x(i)?i(e,t,n,s):i.replace(/%d/i,e)},hn.pastFuture=function(e,t){var n=this._relativeTime[0<e?"future":"past"];return x(n)?n(t):n.replace(/%s/i,t)},hn.set=function(e){var t,n;for(n in e)x(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},hn.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||We).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone},hn.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[We.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},hn.monthsParse=function(e,t,n){var s,i,r;if(this._monthsParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=y([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=Ye.call(this._shortMonthsParse,a))?i:null:-1!==(i=Ye.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=Ye.call(this._shortMonthsParse,a))?i:-1!==(i=Ye.call(this._longMonthsParse,a))?i:null:-1!==(i=Ye.call(this._longMonthsParse,a))?i:-1!==(i=Ye.call(this._shortMonthsParse,a))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=y([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(r="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},hn.monthsRegex=function(e){return this._monthsParseExact?(m(this,"_monthsRegex")||Ne.call(this),e?this._monthsStrictRegex:this._monthsRegex):(m(this,"_monthsRegex")||(this._monthsRegex=Ue),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},hn.monthsShortRegex=function(e){return this._monthsParseExact?(m(this,"_monthsRegex")||Ne.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(m(this,"_monthsShortRegex")||(this._monthsShortRegex=Le),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},hn.week=function(e){return Ie(e,this._week.dow,this._week.doy).week},hn.firstDayOfYear=function(){return this._week.doy},hn.firstDayOfWeek=function(){return this._week.dow},hn.weekdays=function(e,t){return e?o(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:o(this._weekdays)?this._weekdays:this._weekdays.standalone},hn.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},hn.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},hn.weekdaysParse=function(e,t,n){var s,i,r;if(this._weekdaysParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=y([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=Ye.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=y([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(r="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},hn.weekdaysRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Be.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(m(this,"_weekdaysRegex")||(this._weekdaysRegex=$e),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},hn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Be.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(m(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=qe),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},hn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Be.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(m(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Je),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},hn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},hn.meridiem=function(e,t,n){return 11<e?n?"pm":"PM":n?"am":"AM"},ot("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===k(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),c.lang=n("moment.lang is deprecated. Use moment.locale instead.",ot),c.langData=n("moment.langData is deprecated. Use moment.localeData instead.",lt);var _n=Math.abs;function yn(e,t,n,s){var i=At(t,n);return e._milliseconds+=s*i._milliseconds,e._days+=s*i._days,e._months+=s*i._months,e._bubble()}function gn(e){return e<0?Math.floor(e):Math.ceil(e)}function pn(e){return 4800*e/146097}function vn(e){return 146097*e/4800}function wn(e){return function(){return this.as(e)}}var Mn=wn("ms"),Sn=wn("s"),Dn=wn("m"),kn=wn("h"),Yn=wn("d"),On=wn("w"),Tn=wn("M"),xn=wn("y");function bn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Pn=bn("milliseconds"),Wn=bn("seconds"),Hn=bn("minutes"),Rn=bn("hours"),Cn=bn("days"),Fn=bn("months"),Ln=bn("years");var Un=Math.round,Nn={ss:44,s:45,m:45,h:22,d:26,M:11};var Gn=Math.abs;function Vn(e){return(0<e)-(e<0)||+e}function En(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Gn(this._milliseconds)/1e3,s=Gn(this._days),i=Gn(this._months);t=D((e=D(n/60))/60),n%=60,e%=60;var r=D(i/12),a=i%=12,o=s,u=t,l=e,d=n?n.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var c=h<0?"-":"",f=Vn(this._months)!==Vn(h)?"-":"",m=Vn(this._days)!==Vn(h)?"-":"",_=Vn(this._milliseconds)!==Vn(h)?"-":"";return c+"P"+(r?f+r+"Y":"")+(a?f+a+"M":"")+(o?m+o+"D":"")+(u||l||d?"T":"")+(u?_+u+"H":"")+(l?_+l+"M":"")+(d?_+d+"S":"")}var In=Ht.prototype;return In.isValid=function(){return this._isValid},In.abs=function(){var e=this._data;return this._milliseconds=_n(this._milliseconds),this._days=_n(this._days),this._months=_n(this._months),e.milliseconds=_n(e.milliseconds),e.seconds=_n(e.seconds),e.minutes=_n(e.minutes),e.hours=_n(e.hours),e.months=_n(e.months),e.years=_n(e.years),this},In.add=function(e,t){return yn(this,e,t,1)},In.subtract=function(e,t){return yn(this,e,t,-1)},In.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if("month"===(e=R(e))||"year"===e)return t=this._days+s/864e5,n=this._months+pn(t),"month"===e?n:n/12;switch(t=this._days+Math.round(vn(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}},In.asMilliseconds=Mn,In.asSeconds=Sn,In.asMinutes=Dn,In.asHours=kn,In.asDays=Yn,In.asWeeks=On,In.asMonths=Tn,In.asYears=xn,In.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},In._bubble=function(){var e,t,n,s,i,r=this._milliseconds,a=this._days,o=this._months,u=this._data;return 0<=r&&0<=a&&0<=o||r<=0&&a<=0&&o<=0||(r+=864e5*gn(vn(o)+a),o=a=0),u.milliseconds=r%1e3,e=D(r/1e3),u.seconds=e%60,t=D(e/60),u.minutes=t%60,n=D(t/60),u.hours=n%24,o+=i=D(pn(a+=D(n/24))),a-=gn(vn(i)),s=D(o/12),o%=12,u.days=a,u.months=o,u.years=s,this},In.clone=function(){return At(this)},In.get=function(e){return e=R(e),this.isValid()?this[e+"s"]():NaN},In.milliseconds=Pn,In.seconds=Wn,In.minutes=Hn,In.hours=Rn,In.days=Cn,In.weeks=function(){return D(this.days()/7)},In.months=Fn,In.years=Ln,In.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t,n,s,i,r,a,o,u,l,d,h,c=this.localeData(),f=(n=!e,s=c,i=At(t=this).abs(),r=Un(i.as("s")),a=Un(i.as("m")),o=Un(i.as("h")),u=Un(i.as("d")),l=Un(i.as("M")),d=Un(i.as("y")),(h=r<=Nn.ss&&["s",r]||r<Nn.s&&["ss",r]||a<=1&&["m"]||a<Nn.m&&["mm",a]||o<=1&&["h"]||o<Nn.h&&["hh",o]||u<=1&&["d"]||u<Nn.d&&["dd",u]||l<=1&&["M"]||l<Nn.M&&["MM",l]||d<=1&&["y"]||["yy",d])[2]=n,h[3]=0<+t,h[4]=s,function(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}.apply(null,h));return e&&(f=c.pastFuture(+this,f)),c.postformat(f)},In.toISOString=En,In.toString=En,In.toJSON=En,In.locale=Qt,In.localeData=Kt,In.toIsoString=n("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",En),In.lang=Xt,I("X",0,0,"unix"),I("x",0,0,"valueOf"),ue("x",se),ue("X",/[+-]?\d+(\.\d{1,3})?/),ce("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),ce("x",function(e,t,n){n._d=new Date(k(e))}),c.version="2.22.2",e=Tt,c.fn=ln,c.min=function(){return Pt("isBefore",[].slice.call(arguments,0))},c.max=function(){return Pt("isAfter",[].slice.call(arguments,0))},c.now=function(){return Date.now?Date.now():+new Date},c.utc=y,c.unix=function(e){return Tt(1e3*e)},c.months=function(e,t){return fn(e,t,"months")},c.isDate=h,c.locale=ot,c.invalid=v,c.duration=At,c.isMoment=S,c.weekdays=function(e,t,n){return mn(e,t,n,"weekdays")},c.parseZone=function(){return Tt.apply(null,arguments).parseZone()},c.localeData=lt,c.isDuration=Rt,c.monthsShort=function(e,t){return fn(e,t,"monthsShort")},c.weekdaysMin=function(e,t,n){return mn(e,t,n,"weekdaysMin")},c.defineLocale=ut,c.updateLocale=function(e,t){if(null!=t){var n,s,i=nt;null!=(s=at(e))&&(i=s._config),(n=new P(t=b(i,t))).parentLocale=st[e],st[e]=n,ot(e)}else null!=st[e]&&(null!=st[e].parentLocale?st[e]=st[e].parentLocale:null!=st[e]&&delete st[e]);return st[e]},c.locales=function(){return s(st)},c.weekdaysShort=function(e,t,n){return mn(e,t,n,"weekdaysShort")},c.normalizeUnits=R,c.relativeTimeRounding=function(e){return void 0===e?Un:"function"==typeof e&&(Un=e,!0)},c.relativeTimeThreshold=function(e,t){return void 0!==Nn[e]&&(void 0===t?Nn[e]:(Nn[e]=t,"s"===e&&(Nn.ss=t-1),!0))},c.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},c.prototype=ln,c.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},c}); 18819function setupContactLocalCouncilForm() { 18820 'use strict'; 18821 // Setup "contact local council" form 18822 $('.booth-finder form.contactlocalcouncil').submit(function () { 18823 $.post($(this).attr('action'), $(this).serialize(), function (response) { 18824 // Remove blank lines 18825 response = response.replace(/^\s*\n/gm, '').trim(); 18826 if (response.toUpperCase() == 'OK') {
18827 $('.contactlocalcouncil').html('Thank you. A representative will contact you shortly.'); 18828 } else { 18829 $('.contactlocalcouncil div.error').html(DOMPurify.sanitize(response, {SAFE_FOR_JQUERY:true})); 18830 } 18831 }); 18832 // Prevent default 18833 return false; 18834 }); 18835} 18836 18837 18838 18839$(document).ready(setupContactLocalCouncilForm); 18840// Needed for "View Detail" data 18841Handlebars.registerHelper('json', function (context) { 18842 'use strict'; 18843 return JSON.stringify(context).replace(/'/g, "'"); 18844}); 18845Handlebars.registerHelper('escapeDoubleQuotes', function (context) { 18846 'use strict'; 18847 if (typeof context == 'string') { 18848 return context.replace(/"/g, '\\\"'); 18849 } 18850 return ''; 18851}); 18852Handlebars.registerHelper({ 18853 eq: function (v1, v2) { 18854 'use strict'; 18855 return v1 === v2; 18856 }, 18857 ne: function (v1, v2) { 18858 'use strict'; 18859 return v1 !== v2; 18860 }, 18861 lt: function (v1, v2) { 18862 'use strict'; 18863 return v1 < v2; 18864 }, 18865 gt: function (v1, v2) { 18866 'use strict'; 18867 return v1 > v2; 18868 }, 18869 lte: function (v1, v2) { 18870 'use strict'; 18871 return v1 <= v2; 18872 }, 18873 gte: function (v1, v2) { 18874 'use strict'; 18875 return v1 >= v2; 18876 }, 18877 and: function (v1, v2) { 18878 'use strict'; 18879 return v1 && v2; 18880 }, 18881 or: function (v1, v2) { 18882 'use strict'; 18883 return v1 || v2; 18884 } 18885}); 18886!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(i){"use strict";var e=window.Slick||{};(e=function(){var e=0;return function(t,o){var s,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:i(t),appendDots:i(t),arrows:!0,asNavFor:null,prevArrow:'<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',nextArrow:'<button class="slick-next" aria-label="Next" type="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i('<button type="button" />').text(t+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,focusOnChange:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},n.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},i.extend(n,n.initials),n.activeBreakpoint=null,n.animType=null,n.animProp=null,n.breakpoints=[],n.breakpointSettings=[],n.cssTransitions=!1,n.focussed=!1,n.interrupted=!1,n.hidden="hidden",n.paused=!0,n.positionProp=null,n.respondTo=null,n.rowCount=1,n.shouldClick=!0,n.$slider=i(t),n.$slidesCache=null,n.transformType=null,n.transitionType=null,n.visibilityChange="visibilitychange",n.windowWidth=0,n.windowTimer=null,s=i(t).data("slick")||{},n.options=i.extend({},n.defaults,o,s),n.currentSlide=n.options.initialSlide,n.originalSettings=n.options,void 0!==document.mozHidden?(n.hidden="mozHidden",n.visibilityChange="mozvisibilitychange"):void 0!==document.webkitHidden&&(n.hidden="webkitHidden",n.visibilityChange="webkitvisibilitychange"),n.autoPlay=i.proxy(n.autoPlay,n),n.autoPlayClear=i.proxy(n.autoPlayClear,n),n.autoPlayIterator=i.proxy(n.autoPlayIterator,n),n.changeSlide=i.proxy(n.changeSlide,n),n.clickHandler=i.proxy(n.clickHandler,n),n.selectHandler=i.proxy(n.selectHandler,n),n.setPosition=i.proxy(n.setPosition,n),n.swipeHandler=i.proxy(n.swipeHandler,n),n.dragHandler=i.proxy(n.dragHandler,n),n.keyHandler=i.proxy(n.keyHandler,n),n.instanceUid=e++,n.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,n.registerBreakpoints(),n.init(!0)}}()).prototype.activateADA=function(){this.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},e.prototype.addSlide=e.prototype.slickAdd=function(e,t,o){var s=this;if("boolean"==typeof t)o=t,t=null;else if(t<0||t>=s.slideCount)return!1;s.unload(),"number"==typeof t?0===t&&0===s.$slides.length?i(e).appendTo(s.$slideTrack):o?i(e).insertBefore(s.$slides.eq(t)):i(e).insertAfter(s.$slides.eq(t)):!0===o?i(e).prependTo(s.$slideTrack):i(e).appendTo(s.$slideTrack),s.$slides=s.$slideTrack.children(this.options.slide),s.$slideTrack.children(this.options.slide).detach(),s.$slideTrack.append(s.$slides),s.$slides.each(function(e,t){i(t).attr("data-slick-index",e)}),s.$slidesCache=s.$slides,s.reinit()},e.prototype.animateHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.animate({height:e},i.options.speed)}},e.prototype.animateSlide=function(e,t){var o={},s=this;s.animateHeight(),!0===s.options.rtl&&!1===s.options.vertical&&(e=-e),!1===s.transformsEnabled?!1===s.options.vertical?s.$slideTrack.animate({left:e},s.options.speed,s.options.easing,t):s.$slideTrack.animate({top:e},s.options.speed,s.options.easing,t):!1===s.cssTransitions?(!0===s.options.rtl&&(s.currentLeft=-s.currentLeft),i({animStart:s.currentLeft}).animate({animStart:e},{duration:s.options.speed,easing:s.options.easing,step:function(i){i=Math.ceil(i),!1===s.options.vertical?(o[s.animType]="translate("+i+"px, 0px)",s.$slideTrack.css(o)):(o[s.animType]="translate(0px,"+i+"px)",s.$slideTrack.css(o))},complete:function(){t&&t.call()}})):(s.applyTransition(),e=Math.ceil(e),!1===s.options.vertical?o[s.animType]="translate3d("+e+"px, 0px, 0px)":o[s.animType]="translate3d(0px,"+e+"px, 0px)",s.$slideTrack.css(o),t&&setTimeout(function(){s.disableTransition(),t.call()},s.options.speed))},e.prototype.getNavTarget=function(){var e=this,t=e.options.asNavFor;return t&&null!==t&&(t=i(t).not(e.$slider)),t},e.prototype.asNavFor=function(e){var t=this.getNavTarget();null!==t&&"object"==typeof t&&t.each(function(){var t=i(this).slick("getSlick");t.unslicked||t.slideHandler(e,!0)})},e.prototype.applyTransition=function(i){var e=this,t={};!1===e.options.fade?t[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:t[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.autoPlay=function(){var i=this;i.autoPlayClear(),i.slideCount>i.options.slidesToShow&&(i.autoPlayTimer=setInterval(i.autoPlayIterator,i.options.autoplaySpeed))},e.prototype.autoPlayClear=function(){var i=this;i.autoPlayTimer&&clearInterval(i.autoPlayTimer)},e.prototype.autoPlayIterator=function(){var i=this,e=i.currentSlide+i.options.slidesToScroll;i.paused||i.interrupted||i.focussed||(!1===i.options.infinite&&(1===i.direction&&i.currentSlide+1===i.slideCount-1?i.direction=0:0===i.direction&&(e=i.currentSlide-i.options.slidesToScroll,i.currentSlide-1==0&&(i.direction=1))),i.slideHandler(e))},e.prototype.buildArrows=function(){var e=this;!0===e.options.arrows&&(e.$prevArrow=i(e.options.prevArrow).addClass("slick-arrow"),e.$nextArrow=i(e.options.nextArrow).addClass("slick-arrow"),e.slideCount>e.options.slidesToShow?(e.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.prependTo(e.options.appendArrows),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.appendTo(e.options.appendArrows),!0!==e.options.infinite&&e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):e.$prevArrow.add(e.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},e.prototype.buildDots=function(){var e,t,o=this;if(!0===o.options.dots){for(o.$slider.addClass("slick-dotted"),t=i("<ul />").addClass(o.options.dotsClass),e=0;e<=o.getDotCount();e+=1)t.append(i("<li />").append(o.options.customPaging.call(this,o,e)));o.$dots=t.appendTo(o.options.appendDots),o.$dots.find("li").first().addClass("slick-active")}},e.prototype.buildOut=function(){var e=this;e.$slides=e.$slider.children(e.options.slide+":not(.slick-cloned)").addClass("slick-slide"),e.slideCount=e.$slides.length,e.$slides.each(function(e,t){i(t).attr("data-slick-index",e).data("originalStyling",i(t).attr("style")||"")}),e.$slider.addClass("slick-slider"),e.$slideTrack=0===e.slideCount?i('<div class="slick-track"/>').appendTo(e.$slider):e.$slides.wrapAll('<div class="slick-track"/>').parent(),e.$list=e.$slideTrack.wrap('<div class="slick-list"/>').parent(),e.$slideTrack.css("opacity",0),!0!==e.options.centerMode&&!0!==e.options.swipeToSlide||(e.options.slidesToScroll=1),i("img[data-lazy]",e.$slider).not("[src]").addClass("slick-loading"),e.setupInfinite(),e.buildArrows(),e.buildDots(),e.updateDots(),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),!0===e.options.draggable&&e.$list.addClass("draggable")},e.prototype.buildRows=function(){var i,e,t,o,s,n,r,l=this;if(o=document.createDocumentFragment(),n=l.$slider.children(),l.o
18886ptions.rows>1){for(r=l.options.slidesPerRow*l.options.rows,s=Math.ceil(n.length/r),i=0;i<s;i++){var d=document.createElement("div");for(e=0;e<l.options.rows;e++){var a=document.createElement("div");for(t=0;t<l.options.slidesPerRow;t++){var c=i*r+(e*l.options.slidesPerRow+t);n.get(c)&&a.appendChild(n.get(c))}d.appendChild(a)}o.appendChild(d)}l.$slider.empty().append(o),l.$slider.children().children().children().css({width:100/l.options.slidesPerRow+"%",display:"inline-block"})}},e.prototype.checkResponsive=function(e,t){var o,s,n,r=this,l=!1,d=r.$slider.width(),a=window.innerWidth||i(window).width();if("window"===r.respondTo?n=a:"slider"===r.respondTo?n=d:"min"===r.respondTo&&(n=Math.min(a,d)),r.options.responsive&&r.options.responsive.length&&null!==r.options.responsive){s=null;for(o in r.breakpoints)r.breakpoints.hasOwnProperty(o)&&(!1===r.originalSettings.mobileFirst?n<r.breakpoints[o]&&(s=r.breakpoints[o]):n>r.breakpoints[o]&&(s=r.breakpoints[o]));null!==s?null!==r.activeBreakpoint?(s!==r.activeBreakpoint||t)&&(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.options=r.originalSettings,!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e),l=s),e||!1===l||r.$slider.trigger("breakpoint",[r,l])}},e.prototype.changeSlide=function(e,t){var o,s,n,r=this,l=i(e.currentTarget);switch(l.is("a")&&e.preventDefault(),l.is("li")||(l=l.closest("li")),n=r.slideCount%r.options.slidesToScroll!=0,o=n?0:(r.slideCount-r.currentSlide)%r.options.slidesToScroll,e.data.message){case"previous":s=0===o?r.options.slidesToScroll:r.options.slidesToShow-o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide-s,!1,t);break;case"next":s=0===o?r.options.slidesToScroll:o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide+s,!1,t);break;case"index":var d=0===e.data.index?0:e.data.index||l.index()*r.options.slidesToScroll;r.slideHandler(r.checkNavigable(d),!1,t),l.children().trigger("focus");break;default:return}},e.prototype.checkNavigable=function(i){var e,t;if(e=this.getNavigableIndexes(),t=0,i>e[e.length-1])i=e[e.length-1];else for(var o in e){if(i<e[o]){i=t;break}t=e[o]}return i},e.prototype.cleanUpEvents=function(){var e=this;e.options.dots&&null!==e.$dots&&(i("li",e.$dots).off("click.slick",e.changeSlide).off("mouseenter.slick",i.proxy(e.interrupt,e,!0)).off("mouseleave.slick",i.proxy(e.interrupt,e,!1)),!0===e.options.accessibility&&e.$dots.off("keydown.slick",e.keyHandler)),e.$slider.off("focus.slick blur.slick"),!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow&&e.$prevArrow.off("click.slick",e.changeSlide),e.$nextArrow&&e.$nextArrow.off("click.slick",e.changeSlide),!0===e.options.accessibility&&(e.$prevArrow&&e.$prevArrow.off("keydown.slick",e.keyHandler),e.$nextArrow&&e.$nextArrow.off("keydown.slick",e.keyHandler))),e.$list.off("touchstart.slick mousedown.slick",e.swipeHandler),e.$list.off("touchmove.slick mousemove.slick",e.swipeHandler),e.$list.off("touchend.slick mouseup.slick",e.swipeHandler),e.$list.off("touchcancel.slick mouseleave.
18886slick",e.swipeHandler),e.$list.off("click.slick",e.clickHandler),i(document).off(e.visibilityChange,e.visibility),e.cleanUpSlideEvents(),!0===e.options.accessibility&&e.$list.off("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().off("click.slick",e.selectHandler),i(window).off("orientationchange.slick.slick-"+e.instanceUid,e.orientationChange),i(window).off("resize.slick.slick-"+e.instanceUid,e.resize),i("[draggable!=true]",e.$slideTrack).off("dragstart",e.preventDefault),i(window).off("load.slick.slick-"+e.instanceUid,e.setPosition)},e.prototype.cleanUpSlideEvents=function(){var e=this;e.$list.off("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.off("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.cleanUpRows=function(){var i,e=this;e.options.rows>1&&((i=e.$slides.children().children()).removeAttr("style"),e.$slider.empty().append(i))},e.prototype.clickHandler=function(i){!1===this.shouldClick&&(i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault())},e.prototype.destroy=function(e){var t=this;t.autoPlayClear(),t.touchObject={},t.cleanUpEvents(),i(".slick-cloned",t.$slider).detach(),t.$dots&&t.$dots.remove(),t.$prevArrow&&t.$prevArrow.length&&(t.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove()),t.$nextArrow&&t.$nextArrow.length&&(t.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove()),t.$slides&&(t.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){i(this).attr("style",i(this).data("originalStyling"))}),t.$slideTrack.children(this.options.slide).detach(),t.$slideTrack.detach(),t.$list.detach(),t.$slider.append(t.$slides)),t.cleanUpRows(),t.$slider.removeClass("slick-slider"),t.$slider.removeClass("slick-initialized"),t.$slider.removeClass("slick-dotted"),t.unslicked=!0,e||t.$slider.trigger("destroy",[t])},e.prototype.disableTransition=function(i){var e=this,t={};t[e.transitionType]="",!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.fadeSlide=function(i,e){var t=this;!1===t.cssTransitions?(t.$slides.eq(i).css({zIndex:t.options.zIndex}),t.$slides.eq(i).animate({opacity:1},t.options.speed,t.options.easing,e)):(t.applyTransition(i),t.$slides.eq(i).css({opacity:1,zIndex:t.options.zIndex}),e&&setTimeout(function(){t.disableTransition(i),e.call()},t.options.speed))},e.prototype.fadeSlideOut=function(i){var e=this;!1===e.cssTransitions?e.$slides.eq(i).animate({opacity:0,zIndex:e.options.zIndex-2},e.options.speed,e.options.easing):(e.applyTransition(i),e.$slides.eq(i).css({opacity:0,zIndex:e.options.zIndex-2}))},e.prototype.filterSlides=e.prototype.slickFilter=function(i){var e=this;null!==i&&(e.$slidesCache=e.$slides,e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(i).appendTo(e.$slideTrack),e.reinit())},e.prototype.focusHandler=function(){var e=this;e.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*",function(t){t.stopImmediatePropagation();var o=i(this);setTimeout(function(){e.options.pauseOnFocus&&(e.focussed=o.is(":focus"),e.autoPlay())},0)})},e.prototype.getCurrent=e.prototype.slickCurrentSlide=function(){return this.currentSlide},e.prototype.getDotCount=function(){var i=this,e=0,t=0,o=0;if(!0===i.options.infinite)if(i.slideCount<=i.options.slidesToShow)++o;else for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else if(!0===i.options.centerMode)o=i.slideCount;else if(i.options.asNavFor)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else o=1+Math.ceil((i.slideCount-i.options.slidesToShow)/i.options.slidesToScroll);return o-1},e.prototype.getLeft=function(i){var e,t,o,s,n=this,r=0;return n.slideOffset=0,t=n.$slides.first().outerHeight(!0),!0===n.options.infinite?(n.slideCount>n.options.slidesToShow&&(n.slideOffset=n.slideWidth*n.options.slidesToShow*-1,s=-1,!0===n.options.vertical&&!0===n.options.centerMode&&(2===n.options.slidesToShow?s=-1.5:1===n.options.slidesToShow&&(s=-2)),r=t*n.options.slidesToShow*s),n.slideCount%n.options.slidesToScroll!=0&&i+n.options.slidesToScroll>n.slideCount&&n.slideCount>n.options.slidesToShow&&(i>n.slideCount?(n.slideOffset=(n.options.slidesToShow-(i-n.slideCount))*n.slideWidth*-1,r=(n.options.slidesToShow-(i-n.slideCount))*t*-1):(n.slideOffset=n.slideCount%n.options.slidesToScroll*n.slideWidth*-1,r=n.slideCount%n.options.slidesToScroll*t*-1))):i+n.options.slidesToShow>n.slideCount&&(n.slideOffset=(i+n.options.slidesToShow-n.slideCount)*n.slideWidth,r=(i+n.options.slidesToShow-n.slideCount)*t),n.slideCount<=n.options.slidesToShow&&(n.slideOffset=0,r=0),!0===n.options.centerMode&&n.slideCount<=n.options.slidesToShow?n.slideOffset=n.slideWidth*Math.floor(n.options.slidesToShow)/2-n.slideWidth*n.slideCount/2:!0===n.options.centerMode&&!0===n.options.infinite?n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)-n.slideWidth:!0===n.options.centerMode&&(n.slideOffset=0,n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)),e=!1===n.options.vertical?i*n.slideWidth*-1+n.slideOffset:i*t*-1+r,!0===n.options.variableWidth&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,!0===n.options.centerMode&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow+1),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,e+=(n.$list.width()-o.outerWidth())/2)),e},e.prototype.getOption=e.prototype.slickGetOption=function(i){return this.options[i]},e.prototype.getNavigableIndexes=function(){var i,e=this,t=0,o=0,s=[];for(!1===e.options.infinite?i=e.slideCount:(t=-1*e.options.slidesToScroll,o=-1*e.options.slidesToScroll,i=2*e.slideCount);t<i;)s.push(t),t=o+e.options.slidesToScroll,o+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;return s},e.prototype.getSlick=function(){return this},e.prototype.getSlideCount=function(){var e,t,o=this;return t=!0===o.options.centerMode?o.slideWidth*Math.floor(o.options.slidesToShow/2):0,!0===o.options.swipeToSlide?(o.$slideTrack.find(".slick-slide").each(function(s,n){if(n.offsetLeft-t+i(n).outerWidth()/2>-1*o.swipeLeft)return e=n,!1}),Math.abs(i(e).attr("data-slick-index")-o.currentSlide)||1):o.options.slidesToScroll},e.prototype.goTo=e.prototype.slickGoTo=function(i,e){this.changeSlide({data:{message:"index",index:
18886parseInt(i)}},e)},e.prototype.init=function(e){var t=this;i(t.$slider).hasClass("slick-initialized")||(i(t.$slider).addClass("slick-initialized"),t.buildRows(),t.buildOut(),t.setProps(),t.startLoad(),t.loadSlider(),t.initializeEvents(),t.updateArrows(),t.updateDots(),t.checkResponsive(!0),t.focusHandler()),e&&t.$slider.trigger("init",[t]),!0===t.options.accessibility&&t.initADA(),t.options.autoplay&&(t.paused=!1,t.autoPlay())},e.prototype.initADA=function(){var e=this,t=Math.ceil(e.slideCount/e.options.slidesToShow),o=e.getNavigableIndexes().filter(function(i){return i>=0&&i<e.slideCount});e.$slides.add(e.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),null!==e.$dots&&(e.$slides.not(e.$slideTrack.find(".slick-cloned")).each(function(t){var s=o.indexOf(t);i(this).attr({role:"tabpanel",id:"slick-slide"+e.instanceUid+t,tabindex:-1}),-1!==s&&i(this).attr({"aria-describedby":"slick-slide-control"+e.instanceUid+s})}),e.$dots.attr("role","tablist").find("li").each(function(s){var n=o[s];i(this).attr({role:"presentation"}),i(this).find("button").first().attr({role:"tab",id:"slick-slide-control"+e.instanceUid+s,"aria-controls":"slick-slide"+e.instanceUid+n,"aria-label":s+1+" of "+t,"aria-selected":null,tabindex:"-1"})}).eq(e.currentSlide).find("button").attr({"aria-selected":"true",tabindex:"0"}).end());for(var s=e.currentSlide,n=s+e.options.slidesToShow;s<n;s++)e.$slides.eq(s).attr("tabindex",0);e.activateADA()},e.prototype.initArrowEvents=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},i.changeSlide),i.$nextArrow.off("click.slick").on("click.slick",{message:"next"},i.changeSlide),!0===i.options.accessibility&&(i.$prevArrow.on("keydown.slick",i.keyHandler),i.$nextArrow.on("keydown.slick",i.keyHandler)))},e.prototype.initDotEvents=function(){var e=this;!0===e.options.dots&&(i("li",e.$dots).on("click.slick",{message:"index"},e.changeSlide),!0===e.options.accessibility&&e.$dots.on("keydown.slick",e.keyHandler)),!0===e.options.dots&&!0===e.options.pauseOnDotsHover&&i("li",e.$dots).on("mouseenter.slick",i.proxy(e.interrupt,e,!0)).on("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.initSlideEvents=function(){var e=this;e.options.pauseOnHover&&(e.$list.on("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.on("mouseleave.slick",i.proxy(e.interrupt,e,!1)))},e.prototype.initializeEvents=function(){var e=this;e.initArrowEvents(),e.initDotEvents(),e.initSlideEvents(),e.$list.on("touchstart.slick mousedown.slick",{action:"start"},e.swipeHandler),e.$list.on("touchmove.slick mousemove.slick",{action:"move"},e.swipeHandler),e.$list.on("touchend.slick mouseup.slick",{action:"end"}
18886,e.swipeHandler),e.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},e.swipeHandler),e.$list.on("click.slick",e.clickHandler),i(document).on(e.visibilityChange,i.proxy(e.visibility,e)),!0===e.options.accessibility&&e.$list.on("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),i(window).on("orientationchange.slick.slick-"+e.instanceUid,i.proxy(e.orientationChange,e)),i(window).on("resize.slick.slick-"+e.instanceUid,i.proxy(e.resize,e)),i("[draggable!=true]",e.$slideTrack).on("dragstart",e.preventDefault),i(window).on("load.slick.slick-"+e.instanceUid,e.setPosition),i(e.setPosition)},e.prototype.initUI=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.show()},e.prototype.keyHandler=function(i){var e=this;i.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===i.keyCode&&!0===e.options.accessibility?e.changeSlide({data:{message:!0===e.options.rtl?"next":"previous"}}):39===i.keyCode&&!0===e.options.accessibility&&e.changeSlide({data:{message:!0===e.options.rtl?"previous":"next"}}))},e.prototype.lazyLoad=function(){function e(e){i("img[data-lazy]",e).each(function(){var e=i(this),t=i(this).attr("data-lazy"),o=i(this).attr("data-srcset"),s=i(this).attr("data-sizes")||n.$slider.attr("data-sizes"),r=document.createElement("img");r.onload=function(){e.animate({opacity:0}
vendor: 5,619 bytes, line 18886
18886,100,function(){o&&(e.attr("srcset",o),s&&e.attr("sizes",s)),e.attr("src",t).animate({opacity:1},200,function(){e.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")}),n.$slider.trigger("lazyLoaded",[n,e,t])})},r.onerror=function(){e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),n.$slider.trigger("lazyLoadError",[n,e,t])},r.src=t})}var t,o,s,n=this;if(!0===n.options.centerMode?!0===n.options.infinite?s=(o=n.currentSlide+(n.options.slidesToShow/2+1))+n.options.slidesToShow+2:(o=Math.max(0,n.currentSlide-(n.options.slidesToShow/2+1)),s=n.options.slidesToShow/2+1+2+n.currentSlide):(o=n.options.infinite?n.options.slidesToShow+n.currentSlide:n.currentSlide,s=Math.ceil(o+n.options.slidesToShow),!0===n.options.fade&&(o>0&&o--,s<=n.slideCount&&s++)),t=n.$slider.find(".slick-slide").slice(o,s),"anticipated"===n.options.lazyLoad)for(var r=o-1,l=s,d=n.$slider.find(".slick-slide"),a=0;a<n.options.slidesToScroll;a++)r<0&&(r=n.slideCount-1),t=(t=t.add(d.eq(r))).add(d.eq(l)),r--,l++;e(t),n.slideCount<=n.options.slidesToShow?e(n.$slider.find(".slick-slide")):n.currentSlide>=n.slideCount-n.options.slidesToShow?e(n.$slider.find(".slick-cloned").slice(0,n.options.slidesToShow)):0===n.currentSlide&&e(n.$slider.find(".slick-cloned").slice(-1*n.options.slidesToShow))},e.prototype.loadSlider=function(){var i=this;i.setPosition(),i.$slideTrack.css({opacity:1}),i.$slider.removeClass("slick-loading"),i.initUI(),"progressive"===i.options.lazyLoad&&i.progressiveLazyLoad()},e.prototype.next=e.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},e.prototype.orientationChange=function(){var i=this;i.checkResponsive(),i.setPosition()},e.prototype.pause=e.prototype.slickPause=function(){var i=this;i.autoPlayClear(),i.paused=!0},e.prototype.play=e.prototype.slickPlay=function(){var i=this;i.autoPlay(),i.options.autoplay=!0,i.paused=!1,i.focussed=!1,i.interrupted=!1},e.prototype.postSlide=function(e){var t=this;t.unslicked||(t.$slider.trigger("afterChange",[t,e]),t.animating=!1,t.slideCount>t.options.slidesToShow&&t.setPosition(),t.swipeLeft=null,t.options.autoplay&&t.autoPlay(),!0===t.options.accessibility&&(t.initADA(),t.options.focusOnChange&&i(t.$slides.get(t.currentSlide)).attr("tabindex",0).focus()))},e.prototype.prev=e.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},e.prototype.preventDefault=function(i){i.preventDefault()},e.prototype.progressiveLazyLoad=function(e){e=e||1;var t,o,s,n,r,l=this,d=i("img[data-lazy]",l.$slider);d.length?(t=d.first(),o=t.attr("data-lazy"),s=t.attr("data-srcset"),n=t.attr("data-sizes")||l.$slider.attr("data-sizes"),(r=document.createElement("img")).onload=function(){s&&(t.attr("srcset",s),n&&t.attr("sizes",n)),t.attr("src",o).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"),!0===l.options.adaptiveHeight&&l.setPosition(),l.$slider.trigger("lazyLoaded",[l,t,o]),l.progressiveLazyLoad()},r.onerror=function(){e<3?setTimeout(function(){l.progressiveLazyLoad(e+1)},500):(t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),l.$slider.trigger("lazyLoadError",[l,t,o]),l.progressiveLazyLoad())},r.src=o):l.$slider.trigger("allImagesLoaded",[l])},e.prototype.refresh=function(e){var t,o,s=this;o=s.slideCount-s.options.slidesToShow,!s.options.infinite&&s.currentSlide>o&&(s.currentSlide=o),s.slideCount<=s.options.slidesToShow&&(s.currentSlide=0),t=s.currentSlide,s.destroy(!0),i.extend(s,s.initials,{currentSlide:t}),s.init(),e||s.changeSlide({data:{message:"index",index:t}},!1)},e.prototype.registerBreakpoints=function(){var e,t,o,s=this,n=s.options.responsive||null;if("array"===i.type(n)&&n.length){s.respondTo=s.options.respondTo||"window";for(e in n)if(o=s.breakpoints.length-1,n.hasOwnProperty(e)){for(t=n[e].breakpoint;o>=0;)s.breakpoints[o]&&s.breakpoints[o]===t&&s.breakpoints.splice(o,1),o--;s.breakpoints.push(t),s.breakpointSettings[t]=n[e].settings}s.breakpoints.sort(function(i,e){return s.options.mobileFirst?i-e:e-i})}},e.prototype.reinit=function(){var e=this;e.$slides=e.$slideTrack.children(e.options.slide).addClass("slick-slide"),e.slideCount=e.$slides.length,e.currentSlide>=e.slideCount&&0!==e.currentSlide&&(e.currentSlide=e.currentSlide-e.options.slidesToScroll),e.slideCount<=e.options.slidesToShow&&(e.currentSlide=0),e.registerBreakpoints(),e.setProps(),e.setupInfinite(),e.buildArrows(),e.updateArrows(),e.initArrowEvents(),e.buildDots(),e.updateDots(),e.initDotEvents(),e.cleanUpSlideEvents(),e.initSlideEvents(),e.checkResponsive(!1,!0),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),e.setPosition(),e.focusHandler(),e.paused=!e.options.autoplay,e.autoPlay(),e.$slider.trigger("reInit",[e])},e.prototype.resize=function(){var e=this;i(window).width()!==e.windowWidth&&(clearTimeout(e.windowDelay),e.windowDelay=window.setTimeout(function(){e.windowWidth=i(window).width(),e.checkResponsive(),e.unslicked||e.setPosition()},50))},e.prototype.removeSlide=e.prototype.slickRemove=function(i,e,t){var o=this;if(i="boolean"==typeof i?!0===(e=i)?0:o.slideCount-1:!0===e?--i:i,o.slideCount<1||i<0||i>o.slideCount-1)return!1;o.unload(),!0===t?o.$slideTrack.children().remove():o.$slideTrack.children(this.options.slide).eq(i).remove(),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slidesCache=o.$slides,o.reinit()},e.prototype.setCSS=function(i){var e,t,o=this,s={};
18886!0===o.options.rtl&&(i=-i),e="left"==o.positionProp?Math.ceil(i)+"px":"0px",t="top"==o.positionProp?Math.ceil(i)+"px":"0px",s[o.positionProp]=i,!1===o.transformsEnabled?o.$slideTrack.css(s):(s={},!1===o.cssTransitions?(s[o.animType]="translate("+e+", "+t+")",o.$slideTrack.css(s)):(s[o.animType]="translate3d("+e+", "+t+", 0px)",o.$slideTrack.css(s)))},e.prototype.setDimensions=function(){var i=this;!1===i.options.vertical?!0===i.options.centerMode&&i.$list.css({padding:"0px "+i.options.centerPadding}):(i.$list.height(i.$slides.first().outerHeight(!0)*i.options.slidesToShow),!0===i.options.centerMode&&i.$list.css({padding:i.options.centerPadding+" 0px"})),i.listWidth=i.$list.width(),i.listHeight=i.$list.height(),!1===i.options.vertical&&!1===i.options.variableWidth?(i.slideWidth=Math.ceil(i.listWidth/i.options.slidesToShow),i.$slideTrack.width(Math.ceil(i.slideWidth*i.$slideTrack.children(".slick-slide").length))):!0===i.options.variableWidth?i.$slideTrack.width(5e3*i.slideCount):(i.slideWidth=Math.ceil(i.listWidth),i.$slideTrack.height(Math.ceil(i.$slides.first().outerHeight(!0)*i.$slideTrack.children(".slick-slide").length)));var e=i.$slides.first().outerWidth(!0)-i.$slides.first().width();!1===i.options.variableWidth&&i.$slideTrack.children(".slick-slide").width(i.slideWidth-e)},e.prototype.setFade=function(){var e,t=this;t.$slides.each(function(o,s){e=t.slideWidth*o*-1,!0===t.options.rtl?i(s).css({position:"relative",right:e,top:0,zIndex:t.options.zIndex-2,opacity:0}
18886):i(s).css({position:"relative",left:e,top:0,zIndex:t.options.zIndex-2,opacity:0})}),t.$slides.eq(t.currentSlide).css({zIndex:t.options.zIndex-1,opacity:1})},e.prototype.setHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.css("height",e)}},e.prototype.setOption=e.prototype.slickSetOption=function(){var e,t,o,s,n,r=this,l=!1;if("object"===i.type(arguments[0])?(o=arguments[0],l=arguments[1],n="multiple"):"string"===i.type(arguments[0])&&(o=arguments[0],s=arguments[1],l=arguments[2],"responsive"===arguments[0]&&"array"===i.type(arguments[1])?n="responsive":void 0!==arguments[1]&&(n="single")),"single"===n)r.options[o]=s;else if("multiple"===n)i.each(o,function(i,e){r.options[i]=e});else if("responsive"===n)for(t in s)if("array"!==i.type(r.options.responsive))r.options.responsive=[s[t]];else{for(e=r.options.responsive.length-1;e>=0;)r.options.responsive[e].breakpoint===s[t].breakpoint&&r.options.responsive.splice(e,1),e--;r.options.responsive.push(s[t])}l&&(r.unload(),r.reinit())},e.prototype.setPosition=function(){var i=this;i.setDimensions(),i.setHeight(),!1===i.options.fade?i.setCSS(i.getLeft(i.currentSlide)):i.setFade(),i.$slider.trigger("setPosition",[i])},e.prototype.setProps=function(){var i=this,e=document.body.style;i.positionProp=!0===i.options.vertical?"top":"left","top"===i.positionProp?i.$slider.addClass("slick-vertical"):i.$slider.removeClass("slick-vertical"),void 0===e.WebkitTransition&&void 0===e.MozTransition&&void 0===e.msTransition||!0===i.options.useCSS&&(i.cssTransitions=!0),i.options.fade&&("number"==typeof i.options.zIndex?i.options.zIndex<3&&(i.options.zIndex=3):i.options.zIndex=i.defaults.zIndex),void 0!==e.OTransform&&(i.animType="OTransform",i.transformType="-o-transform",i.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.MozTransform&&(i.animType="MozTransform",i.transformType="-moz-transform",i.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(i.animType=!1)),void 0!==e.webkitTransform&&(i.animType="webkitTransform",i.transformType="-webkit-transform",i.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.msTransform&&(i.animType="msTransform",i.transformType="-ms-transform",i.transitionType="msTransition",void 0===e.msTransform&&(i.animType=!1)),void 0!==e.transform&&!1!==i.animType&&(i.animType="transform",i.transformType="transform",i.transitionType="transition"),i.transformsEnabled=i.options.useTransform&&null!==i.animType&&!1!==i.animType},e.prototype.setSlideClasses=function(i){var e,t,o,s,n=this;if(t=n.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),n.$slides.eq(i).addClass("slick-current"),!0===n.options.centerMode){var r=n.options.slidesToShow%2==0?1:0;e=Math.floor(n.options.slidesToShow/2),!0===n.options.infinite&&(i>=e&&i<=n.slideCount-1-e?n.$slides.slice(i-e+r,i+e+1).addClass("slick-active").attr("aria-hidden","false"):(o=n.options.slidesToShow+i,t.slice(o-e+1+r,o+e+2).addClass("slick-active").attr("aria-hidden","false")),0===i?t.eq(t.length-1-n.options.slidesToShow).addClass("slick-center"):i===n.slideCount-1&&t.eq(n.options.slidesToShow).addClass("slick-center")),n.$slides.eq(i).addClass("slick-center")}else i>=0&&i<=n.slideCount-n.options.slidesToShow?n.$slides.slice(i,i+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):t.length<=n.options.slidesToShow?t.addClass("slick-active").attr("aria-hidden","false"):(s=n.slideCount%n.options.slidesToShow,o=!0===n.options.infinite?n.options.slidesToShow+i:i,n.options.slidesToShow==n.options.slidesToScroll&&n.slideCount-i<n.options.slidesToShow?t.slice(o-(n.options.slidesToShow-s),o+s).addClass("slick-active").attr("aria-hidden","false"):t.slice(o,o+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"));"ondemand"!==n.options.lazyLoad&&"anticipated"!==n.options.lazyLoad||n.lazyLoad()},e.prototype.setupInfinite=function(){var e,t,o,s=this;if(!0===s.options.fade&&(s.options.centerMode=!1),!0===s.options.infinite&&!1===s.options.fade&&(t=null,s.slideCount>s.options.slidesToShow)){for(o=!0===s.options.centerMode?s.options.slidesToShow+1:s.options.slidesToShow,e=s.slideCount;e>s.slideCount-o;e-=1)t=e-1,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t-s.slideCount).prependTo(s.$slideTrack).addClass("slick-cloned");for(e=0;e<o+s.slideCount;e+=1)t=e,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t+s.slideCount).appendTo(s.$slideTrack).addClass("slick-cloned");s.$slideTrack.find(".slick-cloned").find("[id]").each(function(){i(this).attr("id","")})}},e.prototype.interrupt=function(i){var e=this;i||e.autoPlay(),e.interrupted=i},e.prototype.selectHandler=function(e){var t=this,o=i(e.target).is(".slick-slide")?i(e.target):i(e.target).parents(".slick-slide"),s=parseInt(o.attr("data-slick-index"));s||(s=0),t.slideCount<=t.options.slidesToShow?t.slideHandler(s,!1,!0):t.slideHandler(s)},e.prototype.slideHandler=function(i,e,t){var o,s,n,r,l,d=null,a=this;if(e=e||!1,!(!0===a.animating&&!0===a.options.waitForAnimate||!0===a.options.fade&&a.currentSlide===i))if(!1===e&&a.asNavFor(i),o=i,d=a.getLeft(o),r=a.getLeft(a.currentSlide),a.currentLeft=null===a.swipeLeft?r:a.swipeLeft,!1===a.options.infinite&&!1===a.options.centerMode&&(i<0||i>a.getDotCount()*a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else if(!1===a.options.infinite&&!0===a.options.centerMode&&(i<0||i>a.slideCount-a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else{if(a.options.autoplay&&clearInterval(a.autoPlayTimer),s=o<0?a.slideCount%a.options.slidesToScroll!=0?a.slideCount-a.slideCount%a.options.slidesToScroll:a.slideCount+
18886o:o>=a.slideCount?a.slideCount%a.options.slidesToScroll!=0?0:o-a.slideCount:o,a.animating=!0,a.$slider.trigger("beforeChange",[a,a.currentSlide,s]),n=a.currentSlide,a.currentSlide=s,a.setSlideClasses(a.currentSlide),a.options.asNavFor&&(l=(l=a.getNavTarget()).slick("getSlick")).slideCount<=l.options.slidesToShow&&l.setSlideClasses(a.currentSlide),a.updateDots(),a.updateArrows(),!0===a.options.fade)return!0!==t?(a.fadeSlideOut(n),a.fadeSlide(s,function(){a.postSlide(s)})):a.postSlide(s),void a.animateHeight();!0!==t?a.animateSlide(d,function(){a.postSlide(s)}):a.postSlide(s)}},e.prototype.startLoad=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.hide(),i.$slider.addClass("slick-loading")},e.prototype.swipeDirection=function(){var i,e,t,o,s=this;return i=s.touchObject.startX-s.touchObject.curX,e=s.touchObject.startY-s.touchObject.curY,t=Math.atan2(e,i),(o=Math.round(180*t/Math.PI))<0&&(o=360-Math.abs(o)),o<=45&&o>=0?!1===s.options.rtl?"left":"right":o<=360&&o>=315?!1===s.options.rtl?"left":"right":o>=135&&o<=225?!1===s.options.rtl?"right":"left":!0===s.options.verticalSwiping?o>=35&&o<=135?"down":"up":"vertical"},e.prototype.swipeEnd=function(i){var e,t,o=this;if(o.dragging=!1,o.swiping=!1,o.scrolling)return o.scrolling=!1,!1;if(o.interrupted=!1,o.shouldClick=!(o.touchObject.swipeLength>10),void 0===o.touchObject.curX)return!1;if(!0===o.touchObject.edgeHit&&o.$slider.trigger("edge",[o,o.swipeDirection()]),o.touchObject.swipeLength>=o.touchObject.minSwipe){switch(t=o.swipeDirection()){case"left":case"down":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide+o.getSlideCount()):o.currentSlide+o.getSlideCount(),o.currentDirection=0;break;case"right":case"up":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide-o.getSlideCount()):o.currentSlide-o.getSlideCount(),o.currentDirection=1}"vertical"!=t&&(o.slideHandler(e),o.touchObject={},o.$slider.trigger("swipe",[o,t]))}else o.touchObject.startX!==o.touchObject.curX&&(o.slideHandler(o.currentSlide),o.touchObject={})},e.prototype.swipeHandler=function(i){var e=this;if(!(!1===e.options.swipe||"ontouchend"in document&&!1===e.options.swipe||!1===e.options.draggable&&-1!==i.type.indexOf("mouse")))switch(e.touchObject.fingerCount=i.originalEvent&&void 0!==i.originalEvent.touches?i.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,!0===e.options.verticalSwiping&&(e.touchObject.minSwipe=e.listHeight/e.options.touchThreshold),i.data.action){case"start":e.swipeStart(i);break;case"move":e.swipeMove(i);break;case"end":e.swipeEnd(i)}},e.prototype.swipeMove=function(i){var e,t,o,s,n,r,l=this;return n=void 0!==i.originalEvent?i.originalEvent.touches:null,!(!l.dragging||l.scrolling||n&&1!==n.length)&&(e=l.getLeft(l.currentSlide),l.touchObject.curX=void 0!==n?n[0].pageX:i.clientX,l.touchObject.curY=void 0!==n?n[0].pageY:i.clientY,l.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(l.touchObject.curX-l.touchObject.startX,2))),r=Math.round(Math.sqrt(Math.pow(l.touchObject.curY-l.touchObject.startY,2))),!l.options.verticalSwiping&&!l.swiping&&r>4?(l.scrolling=!0,!1):(!0===l.options.verticalSwiping&&(l.touchObject.swipeLength=r),t=l.swipeDirection(),void 0!==i.originalEvent&&l.touchObject.swipeLength>4&&(l.swiping=!0,i.preventDefault()),s=(!1===l.options.rtl?1:-1)*(l.touchObject.curX>l.touchObject.startX?1:-1),!0===l.options.verticalSwiping&&(s=l.touchObject.curY>l.touchObject.startY?1:-1),o=l.touchObject.swipeLength,l.touchObject.edgeHit=!1,!1===l.options.infinite&&(0===l.currentSlide&&"right"===t||l.currentSlide>=l.getDotCount()&&"left"===t)&&(o=l.touchObject.swipeLength*l.options.edgeFriction,l.touchObject.edgeHit=!0),!1===l.options.vertical?l.swipeLeft=e+o*s:l.swipeLeft=e+o*(l.$list.height()/l.listWidth)*s,!0===l.options.verticalSwiping&&(l.swipeLeft=e+o*s),!0!==l.options.fade&&!1!==l.options.touchMove&&(!0===l.animating?(l.swipeLeft=null,!1):void l.setCSS(l.swipeLeft))))},e.prototype.swipeStart=function(i){var e,t=this;if(t.interrupted=!0,1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow)return t.touchObject={},!1;void 0!==i.originalEvent&&void 0!==i.originalEvent.touches&&(e=i.originalEvent.touches[0]),t.touchObject.startX=t.touchObject.curX=void 0!==e?e.pageX:i.clientX,t.touchObject.startY=t.touchObject.curY=void 0!==e?e.pageY:i.clientY,t.dragging=!0},e.prototype.unfilterSlides=e.prototype.slickUnfilter=function(){var i=this;null!==i.$slidesCache&&(i.unload(),i.$slideTrack.children(this.options.slide).detach(),i.$slidesCache.appendTo(i.$slideTrack),i.reinit())},e.prototype.unload=function(){var e=this;i(".slick-cloned",e.$slider).remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.remove(),e.$nextArrow&&e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.remove(),e.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")}
18886,e.prototype.unslick=function(i){var e=this;e.$slider.trigger("unslick",[e,i]),e.destroy()},e.prototype.updateArrows=function(){var i=this;Math.floor(i.options.slidesToShow/2),!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&!i.options.infinite&&(i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===i.currentSlide?(i.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-i.options.slidesToShow&&!1===i.options.centerMode?(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-1&&!0===i.options.centerMode&&(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},e.prototype.updateDots=function(){var i=this;null!==i.$dots&&(i.$dots.find("li").removeClass("slick-active").end(),i.$dots.find("li").eq(Math.floor(i.currentSlide/i.options.slidesToScroll)).addClass("slick-active"))},e.prototype.visibility=function(){var i=this;i.options.autoplay&&(document[i.hidden]?i.interrupted=!0:i.interrupted=!1)},i.fn.slick=function(){var i,t,o=this,s=arguments[0],n=Array.prototype.slice.call(arguments,1),r=o.length;for(i=0;i<r;i++)if("object"==typeof s||void 0===s?o[i].slick=new e(o[i],s):t=o[i].slick[s].apply(o[i].slick,n),void 0!==t)return t;return o}}); 18887$(document).ready(function () { 18888 $(".skipToContent_div").css("visibility","hidden"); 18889 (function () { 18890 window.onpageshow = function(event) { 18891 if (event.persisted) { 18892 window.stop(); 18893 } 18894 }; 18895 })(); 18896 $(window).bind("hashchange", function() { 18897 window.location.reload(); 18898 }); 18899 $('.visually-hidden').keypress(function(event){ 18900 if(event.keyCode == 13){ 18901 $(this).click(); 18902 } 18903 }); 18904 $(".visually-hidden").click(function () { 18905 $(".control_input").remove(); 18906 let headerHeight = $("#article-header-Nav").length == 0 ? ($("#header-part").height() + 20) : ($("#article-header-Nav").height() + 20); 18907 setTimeout(() => { 18908 $("#main-content").before("<div class='control_input'><input type='text' val='' /></div>"); 18909 $(".control_input input").focus(); 18910 $(".control_input").hide(); 18911 },0) 18912 }) 18913 $(window).on("scroll", function() { 18914 $(".visually-hidden.focusable.skip-link").blur(); 18915 }); 18916 if($(window).width() > 1023) { 18917 $(".cof_outter_parent").css("background-image", 'url('+$(".cookie_imagedeskUrl").val()+')'); 18918 } 18919 else if($(window).width() > 767 && $(window).width() < 1024) { 18920 $(".cof_outter_parent").css("background-image", 'url('+$(".cookie_imageipadUrl").val()+')'); 18921 } 18922 else { 18923 $(".cof_outter_parent").css("background-image", 'url('+$(".cookie_imagemobileUrl").val()+')'); 18924 } 18925 var scrollOnLinkClick = false; 18926 var accordionClick = false; 18927 var accordionId = ''; 18928 $("body").css("overflow", "overlay"); 18929 if($(".gs-breadcrum.breadcrumb-white").children('nav.breadcrumb-wrapper').length==0) { 18930 $(".gs-breadcrum.breadcrumb-white").css("min-height", "0px") 18931 } 18932 // else { 18933 // $(".gs-breadcrum.breadcrumb-white").css("min-height", "0px") 18934 // } 18935 var iframeArr = []; 18936 history.scrollRestoration = "manual"; 18937 //OnOpenExpandAccordian(); 18938 if ($(window).width() >= 1023) { 18939 if ($(".fa_title_twolines").length > 0) { 18940 if ( 18941 $(".fa_title_twolines")[0].innerText.split(" ").length < 7 || 18942 $(".fa_title_twolines")[0].innerText.length < 22 18943 ) { 18944 $(".fa_title_twolines").css("margin-bottom", "0px"); 18945 $(".fa_description_twolines").css("margin-bottom", "40px"); 18946 } else { 18947 $(".fa_title_twolines").css("margin-bottom", "20px"); 18948 $(".fa_description_twolines").css("margin-bottom", "20px"); 18949 } 18950 } 18951 } 18952 const sliders = document.querySelectorAll('.slick-initialized'); 18953 sliders.forEach(item => { 18954 $(item).slick('unslick'); 18955 }) 18956 18957 /*executes when HTML-Document is loaded and DOM is ready */ 18958 /*to make the entire comp clickable -ft.short story */ 18959 $(".clickableComp").click(function (e) { 18960 if ($(e.target).closest("a.ft-short-story-link").length) { 18961 return; 18962 } 18963 var nTab = $(this).find("a.ft-short-story-link").attr("target"); 18964 var url = $(this).find("a.ft-short-story-link").attr("href"); 18965 if (/^(sms:|mailto:|tel:)/i.test(url)) { 18966 return; 18967 } 18968 if(url) { 18969 e.preventDefault(); 18970 if($(".enableCheckbox").val() == "true") { 18971 let domainListNames = $(".excludeDomain").val() == "" ? 0 : $(".excludeDomain").val().split(","); 18972 let domainExist = false;
18973 if(domainListNames.length > 0) { 18974 domainListNames.forEach((name)=> { 18975 if(url.indexOf(name) != -1) { 18976 domainExist = true; 18977 } 18978 }) 18979 } 18980 if(!domainExist) { 18981 let a = document.createElement('a'); 18982 a.href = url; 18983 if(window.location.origin != a.origin) { 18984 if($(".selectionCheck").val() == "showOnAll") { 18985 e.preventDefault(); 18986 $("#externalPopup-modal-dialog").modal('show'); 18987 } 18988 else if($(".selectionCheck").val() == 'showAd') { 18989 let pageListArray = JSON.parse($(".pageListPaths").val()); 18990 pageListArray.forEach((ele, index) => { 18991 pageListArray[index] = ele.split("/us")[1]; 18992 }) 18993 if(pageListArray.includes(window.location.pathname.split(".")[0]) == true) { 18994 e.preventDefault(); 18995 $("#externalPopup-modal-dialog").modal('show'); 18996 } 18997 else { 18998 if(url.startsWith("/")) { 18999 if (nTab == "_blank") { 19000 window.open(url, "_blank"); 19001 } else { 19002 window.open(url, "_self"); 19003 } 19004 } 19005 else { 19006 let elementArr = ["A", "SPAN"]; 19007 if(elementArr.indexOf(e.target.tagName) == -1) { 19008 if (nTab == "_blank") { 19009 window.open(url, "_blank"); 19010 } else { 19011 window.open(url, "_self"); 19012 } 19013 } 19014 } 19015 } 19016 } 19017 else if($(".selectionCheck").val() == 'hideAd') { 19018 let pageListArray = JSON.parse($(".pageListPaths").val()); 19019 pageListArray.forEach((ele, index) => { 19020 pageListArray[index] = ele.split("/us")[1]; 19021 }) 19022 if(pageListArray.includes(window.location.pathname.split(".")[0]) == false) { 19023 e.preventDefault(); 19024 $("#externalPopup-modal-dialog").modal('show'); 19025 } 19026 else { 19027 if(url.startsWith("/")) { 19028 if (nTab == "_blank") { 19029 window.open(url, "_blank"); 19030 } else { 19031 window.open(url, "_self"); 19032 } 19033 } 19034 else { 19035 let elementArr = ["A", "SPAN"]; 19036 if(elementArr.indexOf(e.target.tagName) == -1) { 19037 if (nTab == "_blank") { 19038 window.open(url, "_blank"); 19039 } else { 19040 window.open(url, "_self"); 19041 } 19042 } 19043 } 19044 } 19045 } 19046 } 19047 else { 19048 if(url.startsWith("/")) { 19049 if (nTab == "_blank") { 19050 window.open(url, "_blank"); 19051 } else { 19052 window.open(url, "_self"); 19053 } 19054 } 19055 else { 19056 let elementArr = ["A", "SPAN"]; 19057 if(elementArr.indexOf(e.target.tagName) == -1) { 19058 if (nTab == "_blank") { 19059 window.open(url, "_blank"); 19060 } else { 19061 window.open(url, "_self"); 19062 } 19063 } 19064 } 19065 } 19066 } 19067 else { 19068 if(url.startsWith("/")) { 19069 if (nTab == "_blank") { 19070 window.open(url, "_blank"); 19071 } else { 19072 window.open(url, "_self"); 19073 } 19074 } 19075 else { 19076 let elementArr = ["A", "SPAN"]; 19077 if(elementArr.indexOf(e.target.tagName) == -1) { 19078 if (nTab == "_blank") { 19079 window.open(url, "_blank"); 19080 } else { 19081 window.open(url, "_self"); 19082 } 19083 } 19084 } 19085 } 19086 } 19087 else { 19088 if(url.startsWith("/")) { 19089 if (nTab == "_blank") { 19090 window.open(url, "_blank"); 19091 } else { 19092 window.open(url, "_self"); 19093 } 19094 } 19095 else { 19096 let elementArr = ["A", "SPAN"]; 19097 if(elementArr.indexOf(e.target.tagName) == -1) { 19098 if (nTab == "_blank") { 19099 window.open(url, "_blank"); 19100 } else { 19101 window.open(url, "_self"); 19102 } 19103 } 19104 } 19105 } 19106 } 19107 }); 19108 19109 $("a[href^='#']").on("click", function(e) { 19110 if($(this).parents(".article-socialbar").length ==0){ 19111 e.preventDefault(); 19112 e.stopPropagation(); 19113 scrollOnLinkClick = true;
19114 accordionClick = false; 19115 var url = $(this).attr("href"); 19116 var hash = window.location.hash; 19117 $(hash).removeAttr("style"); 19118 formUrl(url); 19119 OnOpenExpandAccordian(); 19120 } 19121 }); 19122 19123 $("a[href^='http']").on("click", function(e) { 19124 if(e.currentTarget.href.indexOf("$$$") == -1 && $(this).attr("href")?.charAt(0) != '#' && e.currentTarget.href && e.currentTarget.href.startsWith('https') && (e.currentTarget.target == "_self" || e.currentTarget.target == "")){ 19125 e.preventDefault(); 19126 if(e.currentTarget.origin == window.location.origin) { 19127 history.pushState({}, '', e.currentTarget.href); 19128 window.location.reload(); 19129 return false; 19130 } 19131 } 19132 var url = e.currentTarget.href; 19133 let headerHeight = $("#article-header-Nav").length == 0 ? ($("#header-part").height() + 20) : ($("#article-header-Nav").height() + 20) 19134 if(url) { 19135 if (url.indexOf("$$$") == -1 && url.charAt(0) != "#" && $(e.currentTarget.href.split("#")[1]).hasClass("collapse") && e.currentTarget.target !='_blank'){ 19136 e.preventDefault(); 19137 window.location.reload(); 19138 setTimeout(() => { 19139 $('html, body').animate({ 19140 scrollTop: $("#"+url.split('#')[1])?.offset()?.top - headerHeight 19141 }, 1000); 19142 },400) 19143 } 19144 else if(url.indexOf("$$$") == -1 && url.split('#')[1] && e.currentTarget.target !='_blank'){ 19145 e.preventDefault(); 19146 if($("#"+url.split('#')[1])?.offset()?.top && $("#"+url.split('#')[1])?.offset()?.top !=0) { 19147 setTimeout(() => { 19148 $('html, body').animate({ 19149 scrollTop: $("#"+url.split('#')[1])?.offset()?.top - headerHeight 19150 }, 1000); 19151 },400) 19152 } 19153 } 19154 } 19155 }); 19156 19157 if ($(window).width() >= 1024) { 19158 $("#header-part") 19159 .mouseenter(function () { 19160 var scroll = (scroll = $(window).scrollTop()); 19161 $(this).addClass("nav-hover"); 19162 $(this).addClass("sticky-header"); 19163 $(this) 19164 .parent() 19165 .closest(".gshomepage-tophead") 19166 .addClass("sticky-banner"); 19167 var finalScroll = 51 - Number(scroll); 19168 if ($(".navbar-breaking").length && finalScroll >= 1) { 19169 $(".sticky-header").css("top", finalScroll + "px"); 19170 } 19171 }).mouseleave(function() { 19172 var scroll = scroll = $(window).scrollTop(); 19173 if((scroll <= 50) && ($('#header-part').is(':hover') == false)){ 19174 $('.sticky-header').css('top','0px'); 19175 $(this).removeClass("sticky-header"); 19176 $(this).parent().closest('.gshomepage-tophead').removeClass('sticky-banner'); 19177 } 19178 if(!$('#header-part').is(':hover')){ 19179 var hasShowClass = $("#navbarSupportedContent").find(".dropdown").hasClass("showDropdown"); 19180 if(hasShowClass){ 19181 19182 var eleWithClass = $("#navbarSupportedContent").find(".showDropdown"); 19183 $(eleWithClass).removeClass("showDropdown"); 19184 $(eleWithClass).find(".nav-link.dropdown-toggle.navbar-dropdown").attr("aria-expanded", "false"); 19185 $(eleWithClass).find(".dropdown-menu").css({"visibility":"hidden", "opacity":"0"}); 19186 19187 } 19188 19189 } 19190 $(this).removeClass("nav-hover"); 19191 }); 19192 } 19193 19194 /*show/hide floating menu*/ 19195 $(".floating-menu-toggle").click(function () { 19196 const isExpanded = $(".floating-menu-items").is(":visible"); 19197 19198 $(".flt-menu-close,.flt-menu-open,.floating-menu-items").toggle(); 19199 $("body").toggleClass("disableScroll_gs"); 19200 $(".flt-menu-ovelay").toggle(); 19201 19202 // OPEN MENU 19203 if (!isExpanded) { 19204 19205 // Move focus to first menu item 19206 setTimeout(() => { 19207 $(".floating-menu-items a:first").focus(); 19208 }, 0); 19209 19210 } else { 19211 19212 // Return focus to toggle button on close 19213 $(".floating-menu-toggle").focus(); 19214 } 19215 }); 19216 19217/* Keyboard support */ 19218$(".floating-menu-toggle").keydown(function (e) { 19219 19220 if (e.key === "Enter" || e.key === " ") { 19221 e.preventDefault(); 19222 $(this).click(); 19223 } 19224}); 19225 19226 19227/* ESC closes floating menu */ 19228$(document).on("keydown", function (e) { 19229 19230 if (!$(".floating-menu-items").is(":visible")) { 19231 return; 19232 } 19233 19234 if (e.key === "Escape") { 19235 19236 $(".flt-menu-close,.flt-menu-open,.floating-menu-items").toggle(); 19237 19238 $("body").removeClass("disableScroll_gs"); 19239 19240 $(".flt-menu-ovelay").hide(); 19241 19242 $(".floating-menu-toggle").focus(); 19243 } 19244}); 19245 19246 /*show/hide Council Finder on click of eyebrow icon*/ 19247 $(".header-eyebrow .find-council, .cf-update-location").click(function () { 19248 $(".gs-navbarDropmenu .find-A-Council").fadeIn(); 19249 $(".header-eyebrow .find-council").addClass("cf-clicked"); 19250 }); 19251 $(".find-a-council .close-find-a-council").click(function () { 19252 $(".gs-navbarDropmenu .find-A-Council").hide(); 19253 $(".header-eyebrow .find-council").removeClass("cf-clicked"); 19254 }); 19255 19256 /* to toggle nav in mobile on click of council finder(Eyebrow)*/ 19257 $(".header-eyebrow .find-council").click(function () { 19258 $(".gs-navbarDropmenu .navbar-collapse").collapse("hide"); 19259 $(".header-search.mob-search-icon").toggleClass("invisible"); 19260 $("#navbarSupportedContent").toggleClass("fast"); 19261 $(".navbar-toggler-icon").toggleClass("invisible"); 19262 $(".navbar-toggler .close").toggleClass("invisible"); 19263 if ($(window).width() > 767) { 19264 $("body").removeClass("StopScroll"); 19265 } 19266 const heightOfHeader = $(".gs-navbarDropmenu").height(); 19267 $(".gs-navbarDropmenu .find-A-Council, .find-a-council").css("top", heightOfHeader); 19268 }); 19269 19270 function setScroll() { 19271 var sticky = $("#header-part"), 19272 scroll = $(window).scrollTop(); 19273 var hash = window.location.hash; 19274 if (hash && hash.indexOf("$$$") == -1 && $(hash).position() !== undefined & hash != "#main-content") { 19275 sticky.addClass("sticky-header"); 19276 sticky.addClass("nav-hover"); 19277 sticky.css("box-shadow", "0 10px 10px 0 rgb(0 0 0 / 16%)"); 19278 $(".gshomepage-tophead").css("margin-top", "0"); 19279 // $(".bannerTopShape").css("margin-top", "0"); 19280 if($(window).width() >= 1024 && $(window).width() < 1280) { 19281 $(".bannerTopShape ").css("position", "relative"); 19282 $(".bannerTopShape").css("top", $(".sticky-header").height() + 32); 19283 } 19284 else if($(window).width() >= 1280 && $(window).width() < 1921){ 19285 // $(".bannerTopShape").css("margin-top", "165px"); 19286 $(".bannerTopShape ").css("position", "relative"); 19287 $(".bannerTopShape").css("top", $(".sticky-header").height() + 32); 19288 } 19289 else if($(window).width() >= 1921){ 19290 // $(".bannerTopShape").css("margin-top", "165px"); 19291 $(".bannerTopShape ").css("position", "relative"); 19292 $(".bannerTopShape").css("top", $(".sticky-header").height() + 32); 19293 } 19294 if ($(window).width() < 1024) { 19295 $(".bannerTopShape ").css("position", "relative"); 19296 19297 // $(".bannerTopShape ").css("top", "120px"); 19298 19299 $(".bannerTopShape").css("top", $(".sticky-header").height() + 32); 19300 19301 // $(".gshomepage-tophead").css("margin-top", "-50px"); 19302 } 19303 } else if (scroll >= 50) { 19304 $(".gshomepage-tophead").css("margin-top", "0"); 19305 // $(".bannerTopShape").css("margin-top", "0"); 19306 sticky.addClass("sticky-header"); 19307 sticky.css("box-shadow", "0 10px 10px 0 rgb(0 0 0 / 16%)"); 19308 if($(window).width() >= 1024 && $(window).width() < 1280) { 19309 // $(".bannerTopShape").css("margin-top", "170px"); 19310 $(".bannerTopShape ").css("position", "relative"); 19311 $(".bannerTopShape").css("top", $(".sticky-header").height() + 32); 19312 } 19313 else if($(window).width() >= 1280 && $(window).width() < 1921){ 19314 // $(".bannerTopShape").css("margin-top", "165px"); 19315 $(".bannerTopShape ").css("position", "relative"); 19316 $(".bannerTopShape").css("top", $(".sticky-header").height() + 32); 19317 } 19318 else if($(window).width() >= 1921){ 19319 // $(".bannerTopShape").css("margin-top", "165px"); 19320 $(".bannerTopShape ").css("position", "relative"); 19321 $(".bannerTopShape").css("top", $(".sticky-header").height() + 32); 19322 } 19323 if ($(window).width() < 1024) { 19324 // $(".bannerTopShape ").css("top", "120px"); 19325 $(".bannerTopShape ").css("position", "relative"); 19326 $(".bannerTopShape").css("top", $(".sticky-header").height() + 32); 19327 } 19328 } else { 19329 $(".sticky-header").css("top", "0px"); 19330 sticky.removeClass("sticky-header"); 19331 if($(window).width() < 1024) { 19332 $(".bannerTopShape ").css("position", "relative"); 19333 $(".bannerTopShape ").css("top", "0px"); 19334 // $(".gshomepage-tophead").css("margin-top", "0px"); 19335 } 19336 sticky.removeClass("nav-hover"); 19337 sticky.css("box-shadow", "none"); 19338 sticky 19339 .parent() 19340 .closest(".gshomepage-tophead") 19341 .removeClass("sticky-banner"); 19342 $(".bannerTopShape").css("position", "relative"); 19343 $(".bannerTopShape").css("top", "32px"); 19344 // $(".bannerTopShape").css("margin-top", "32px"); 19345 } 19346 } 19347 19348 $("#header-part").on("mouseenter",function() { 19349 if(!$("#header-part").hasClass("cf-open")) { 19350 let scroll = $(window).scrollTop(); 19351 if (scroll <= 50) { 19352 if($(window).width() >= 1024 && $(window).width() < 1280) { 19353 $(".bannerTopShape ").css("position", "relative"); 19354 $(".bannerTopShape").css("top", $(this).height() + 32); 19355 } 19356 else if($(window).width() >= 1280 && $(window).width() < 1921){ 19357 $(".bannerTopShape ").css("position", "relative"); 19358 $(".bannerTopShape").css("top", $(this).height() + 32); 19359 } 19360 else if($(window).width() >= 1921){ 19361 $(".bannerTopShape ").css("position", "relative"); 19362 $(".bannerTopShape").css("top", $(this).height() + 32); 19363 } 19364 if ($(window).width() < 1024) { 19365 $(".bannerTopShape ").css("position", "relative"); 19366 $(".bannerTopShape").css("top", "32px"); 19367 } 19368 } 19369 } 19370 }) 19371 $("#header-part").on("mouseleave",function() { 19372 let scroll = $(window).scrollTop(); 19373 if (scroll <= 50) { 19374 $(".bannerTopShape").css("position", "relative"); 19375 $(".bannerTopShape").css("top", "32px"); 19376 } 19377 }) 19378 19379 /*if(sessionStorage.getItem("firstLoad")){ 19380window.onbeforeunload = function () { 19381 window.scrollTo(0,0); 19382 }; 19383}*/ 19384 19385 /* for sticky header */ 19386 if ($("#header-part").length > 0) { 19387 var hash = window.location.hash; 19388 const specialChars = /[`!@$%^&*()+\=\[\]{};':"\\|,.<>\/?~]/; 19389 var checkNew = specialChars.test(hash); 19390 if(!checkNew) { 19391 if (hash && hash.indexOf("$$$") == -1 && $(hash).position() !== undefined) { 19392 setTimeout(function () { 19393 window.scrollTo({
19394 top: $(hash).position().top - 250, 19395 behavior: "smooth", 19396 }); 19397 }, 50); 19398 } else { 19399 setScroll(); 19400 $(window).scroll(function () { 19401 setScroll(); 19402 }); 19403 } 19404 } 19405 } 19406 19407 /* to hide hamburger on click in mobile */ 19408 $("#header-part .navbar-toggler").click(function () { 19409 $(".navbar-toggler-icon").toggleClass("invisible"); 19410 $(".close").toggleClass("invisible"); 19411 $(".header-search").toggleClass("invisible"); 19412 if ($(".floating-menu").length && $(window).width() <= 1023) { 19413 if ($(".floating-menu").is(":visible")) { 19414 $(".floating-menu").css("display", "none"); 19415 } else { 19416 $(".floating-menu").css("display", "block"); 19417 } 19418 } 19419 var hash = window.location.hash; 19420 const specialChars = /[`!@$%^&*()+\=\[\]{};':"\\|,.<>\/?~]/; 19421 var checkNew = specialChars.test(hash); 19422 if(!checkNew) { 19423 if (hash && hash.indexOf("$$$") == -1 && $(hash).position() !== undefined) { 19424 setTimeout(function () { 19425 window.scrollTo({ 19426 top: $(hash).position().top - 250, 19427 behavior: "smooth", 19428 }); 19429 }, 50); 19430 } else { 19431 const scrolled = $(window).scrollTop(); 19432 if ($("#header-part").length && scrolled <= 50) { 19433 $("#header-part").removeClass("nav-hover"); 19434 } 19435 } 19436 } 19437 if ($(window).width() < 1024) { 19438 if($(".navbar-toggler-icon").hasClass("invisible")) { 19439 $(".header-search").addClass("d-none"); 19440 } 19441 else { 19442 $(".header-search").removeClass("d-none"); 19443 } 19444 } 19445 }); 19446 19447 /*to bring eyebrow into hamburger menu in mobile */ 19448 $(window).on("load resize", function () { 19449 var hash = window.location.hash; 19450 const specialChars = /[`!@$%^&*()+\=\[\]{};':"\\|,.<>\/?~]/; 19451 var checkNew = specialChars.test(hash); 19452 if(checkNew){ 19453 return false; 19454 } 19455 if ( 19456 hash && 19457 hash.indexOf("$$$") == -1 && 19458 $(hash).position() !== undefined && 19459 $(hash).position().top 19460 ) { 19461 $(".gs-navbarDropmenu").addClass("sticky-header"); 19462 $(".gs-navbarDropmenu").css( 19463 "box-shadow", 19464 "0 10px 10px 0 rgb(0 0 0 / 16%)" 19465 ); 19466 } 19467 if ($(window).width() <= 1023) { 19468 $( 19469 "#header-part .navbar-toggler .navbar-toggler-icon, #article-header-Nav .navbar-toggler .navbar-toggler-icon" 19470 ).click(function () { 19471 $(".gs-navbarDropmenu").addClass("cf-open"); 19472 $("body").addClass("StopScroll"); 19473 }); 19474 $( 19475 ".close-find-a-council,.close-search, #header-part .navbar-toggler .close, #article-header-Nav .navbar-toggler .close" 19476 ).click(function () { 19477 $(".gs-navbarDropmenu").removeClass("cf-open"); 19478 $("body").removeClass("StopScroll"); 19479 var hash = window.location.hash; 19480 if ( 19481 hash && 19482 hash.indexOf("$$$") == -1 && 19483 $(hash).position() !== undefined 19484 ) { 19485 setTimeout(function () { 19486 window.scrollTo({ 19487 top: $(hash).position().top - 250, 19488 behavior: "smooth", 19489 }); 19490 }, 50); 19491 } else { 19492 const scrolled = $(window).scrollTop(); 19493 if ($("#header-part").length && scrolled <= 50) { 19494 $("#header-part").removeClass("nav-hover"); 19495 } 19496 } 19497 }); 19498 } 19499 19500 if ($(".skip-to-content-link").length) { 19501 $(".skip-link").length && $(".skip-link").hide(); 19502 } 19503 const heightOfHeader = $(".gs-navbarDropmenu").height(); 19504 $(".gs-navbarDropmenu .find-A-Council, .search-group, .find-a-council").css( 19505 "top", 19506 heightOfHeader 19507 ); 19508 /*height 0f article carousel*/ 19509 $(".article_caraousel").each(function () { 19510 var $carousel = $(this); 19511 // Reset heights before recalculating 19512 $carousel.find(".carouselCard-des").css("height", "auto"); 19513 $carousel.find(".carouselCard.SeeMore").css("height", "auto"); 19514 var maxDescHeight = 0; 19515 $carousel.find(".carouselCard-des").each(function () { 19516 maxDescHeight = Math.max(maxDescHeight, $(this).outerHeight()); 19517 }); 19518 $carousel.find(".carouselCard-des").height(maxDescHeight); 19519 var maxCardHeight = 0; 19520 $carousel.find(".carouselCard").each(function () { 19521 maxCardHeight = Math.max(maxCardHeight, $(this).outerHeight()); 19522 }); 19523 $carousel.find(".carouselCard.SeeMore").height(maxCardHeight); 19524 }); 19525 /**article carousel */ 19526 /*height 0f article card*/ 19527 var artCardMaxHt = 0; 19528 $(".art-card-desWrap").each(function () { 19529 if ($(this).height() > artCardMaxHt) { 19530 artCardMaxHt = $(this).height(); 19531 } 19532 }); 19533 $(".art-card-desWrap").height(artCardMaxHt); 19534 var artCardShapeHt = 0; 19535 $(".art-card-shape").each(function () { 19536 if ($(this).height() > artCardShapeHt) { 19537 artCardShapeHt = $(this).height(); 19538 } 19539 }); 19540 $(".art-card-shape").height(artCardShapeHt); 19541 /*height 0f article card*/ 19542 19543 if ($(window).width() <= 1023) { 19544 /*to hide slick dots in article carousel*/ 19545 var artCardLength = $(".article_caraousel .carouselCard").length; 19546 if (artCardLength <= 2) { 19547 $(".article_caraousel").find(".slick-dots").css("display", "none"); 19548 } 19549 } else { 19550 /***TO set equal ht for title shape and description in cards*/ 19551 $(".grid-comp,.rowColumn").each(function () { 19552 var MAxHtTitle = 0; /*title*/ 19553 var MAxWdTitle = 0; /*title*/ 19554 var MaxHtShapes = 0; /*shapes*/ 19555 var MaxWdShapes = 0; 19556 var maxHeightDes = 0; /*description*/ 19557 var maxWidthDes = 0; /*description*/ 19558 var maxHeightButton = 0; /*button*/ 19559 var maxWidthButton = 0; /*button*/ 19560 /*equalise ht of title*/ 19561 $(".hpcardTitleWrapper", this).each(function () { 19562 if ($(this).height() > MAxHtTitle) { 19563 MAxHtTitle = $(this).height(); 19564 } 19565 if ($(this).width() > MAxWdTitle) { 19566 MAxWdTitle = $(this).width(); 19567 } 19568 }); 19569 $(".hpcardTitleWrapper", this).height(MAxHtTitle ? MAxHtTitle : 'auto'); 19570 // $(".hpcardTitleWrapper", this).width(MAxWdTitle ? MAxWdTitle : 'auto'); 19571 /*equalise ht of shapes*/ 19572 $(".hpcard-shapes-wrapper ", this).each(function () { 19573 if ($(this).height() > MaxHtShapes) { 19574 MaxHtShapes = $(this).height(); 19575 } 19576 if ($(this).width() > MaxWdShapes) { 19577 MaxWdShapes = $(this).width(); 19578 } 19579 }); 19580 $(".hpcard-shapes-wrapper ", this).height(MaxHtShapes ? MaxHtShapes : 'auto'); 19581 // $(".hpcard-shapes-wrapper ", this).width(MaxWdShapes ? MaxWdShapes : 'auto'); 19582 /*equalise ht of description text*/ 19583 $(".hpcard-text-wrapper", this).each(function () { 19584 if ($(this).height() > maxHeightDes) { 19585 maxHeightDes = $(this).height(); 19586 } 19587 if ($(this).width() > maxWidthDes) { 19588 maxWidthDes = $(this).width(); 19589 } 19590 }); 19591 $(".hpcard-text-wrapper", this).height(maxHeightDes ? maxHeightDes : 'auto'); 19592 // $(".hpcard-text-wrapper", this).width(maxWidthDes ? maxWidthDes : 'auto'); 19593 /*equalise ht of button text*/ 19594 $(".hpcard-button-wrapper", this).each(function () { 19595 if ($(this).height() > maxHeightButton) { 19596 maxHeightButton = $(this).height(); 19597 } 19598 if ($(this).width() > maxWidthButton) { 19599 maxWidthButton = $(this).width(); 19600 } 19601 }); 19602 $(".hpcard-button-wrapper", this).height(maxHeightButton ? maxHeightButton : 'auto'); 19603 // $(".hpcard-button-wrapper", this).width(maxWidthButton ? maxWidthButton : 'auto'); 19604 }); 19605 /*card inside accordion*/ 19606 $(".accordionitems").each(function () { 19607 var lengthOfCard = $(this).find(".homePage-card").length; 19608 if (lengthOfCard == 1) { 19609 console.log(lengthOfCard); 19610 $(this) 19611 .find( 19612 ".hpcard-button-wrapper, .hpcard-text-wrapper, .hpcard-shapes-wrapper, .hpcardTitleWrapper" 19613 ) 19614 .removeAttr("style"); 19615 $(this) 19616 .find( 19617 ".hpcard-button-wrapper, .hpcard-text-wrapper, .hpcard-shapes-wrapper, .hpcardTitleWrapper" 19618 ) 19619 .css("height", "auto"); 19620 } 19621 }); 19622 /***TO set equal ht for title shape and description in cards*/ 19623 /*to hide slick dots in article carousel*/ 19624 var artCardLength = $(".article_caraousel .carouselCard").length; 19625 if (artCardLength <= 3) { 19626 $(".article_caraousel").find(".slick-dots").css("display", "none"); 19627 } 19628 } 19629 19630 if ($(window).width() < 768) { 19631 /* To show/hide breadcrumbs*/ 19632 if ($(".breadcrumb-wrapper ol li").length > 2) { 19633 $(".breadcrumb-dots").show(); 19634 $(".breadcrumb-dots").click(function () { 19635 $(".breadcrumb li").show(); 19636 $(".breadcrumb-dots").hide(); 19637 }); 19638 } 19639 /**To hide slick dots in article carousel */ 19640 var artCardLength = $(".article_caraousel .carouselCard").length; 19641 if (artCardLength == 1) { 19642 $(".article_caraousel").find(".slick-dots").css("display", "none"); 19643 } 19644 } else { 19645 /* to remove breadcrum dots*/ 19646 $(".breadcrumb-dots").hide(); 19647 }
19648 /* add class to nav on hover to change icon colors */ 19649 if ($(window).width() >= 1024) { 19650 $("#header-part") 19651 .mouseenter(function () { 19652 var scroll = (scroll = $(window).scrollTop()); 19653 $(this).addClass("nav-hover"); 19654 $(this).addClass("sticky-header"); 19655 $(this) 19656 .parent() 19657 .closest(".gshomepage-tophead") 19658 .addClass("sticky-banner"); 19659 var finalScroll = 51 - Number(scroll); 19660 if ($(".navbar-breaking").length && finalScroll >= 1) { 19661 $(".sticky-header").css("top", finalScroll + "px"); 19662 } 19663 }).mouseleave(function() { 19664 var scroll = scroll = $(window).scrollTop(); 19665 if((scroll <= 50) && ($('#header-part').is(':hover') == false)){ 19666 $('.sticky-header').css('top','0px'); 19667 $(this).removeClass("sticky-header"); 19668 $(this).parent().closest('.gshomepage-tophead').removeClass('sticky-banner'); 19669 } 19670 if(!$('#header-part').is(':hover')){ 19671 var hasShowClass = $("#navbarSupportedContent").find(".dropdown").hasClass("showDropdown"); 19672 if(hasShowClass){ 19673 19674 var eleWithClass = $("#navbarSupportedContent").find(".showDropdown"); 19675 $(eleWithClass).removeClass("showDropdown"); 19676 $(eleWithClass).find(".nav-link.dropdown-toggle.navbar-dropdown").attr("aria-expanded", "false"); 19677 $(eleWithClass).find(".dropdown-menu").css({"visibility":"hidden", "opacity":"0"}); 19678 19679 } 19680 19681 } 19682 $(this).removeClass("nav-hover"); 19683 }); 19684 } 19685 //To Remove aria-hidden attribute on promotioncarousel 19686 setTimeout(() => { 19687 $(".splide__slide").each(function () { 19688 $(this).removeClass("is-visible"); 19689 $(this).removeAttr("aria-hidden"); 19690 }); 19691 }, 1000); 19692 }); 19693 19694 let searchTrigger = null; 19695 $(".header-search .top-link").on("click keydown", function (event) { 19696 if (event.type === "click" || 19697 (event.type === "keydown" && event.key === "Enter")) { 19698 19699 event.preventDefault(); 19700 searchTrigger = this; // save the anchor, not the li 19701 showSearch(); 19702 } 19703 }); 19704 $(".search-group").on("keydown", function (event) { 19705 if (event.key === "Escape") { 19706 event.preventDefault(); 19707 collapseSearchPanel(); 19708 } 19709 }); 19710 $(".search-group a[aria-label='Close']").on("keydown", function (event) { 19711 if (event.key === "Tab" && !event.shiftKey) { 19712 event.preventDefault(); 19713 const nextElement = getNextFocusable(searchTrigger); 19714 collapseSearchPanel(false); 19715 setTimeout(() => { 19716 nextElement?.focus(); 19717 }, 100); 19718 } 19719 }); 19720 $(".search-group input").on("keydown", function (event) { 19721 if (event.key === "Tab" && event.shiftKey) { 19722 event.preventDefault(); 19723 collapseSearchPanel(); 19724 setTimeout(() => { 19725 searchTrigger?.focus(); 19726 }, 0); 19727 } 19728 }); 19729 function getNextFocusable(element) { 19730 const focusable = $( 19731 'a[href], button, input, select, textarea, [tabindex]:not([tabindex="-1"])' 19732 ).filter(':visible'); 19733 const index = focusable.index(element); 19734 return index > -1 ? focusable.get(index + 1) : null; 19735 } 19736 function showSearch() { 19737 if ($(window).width() > 767) { 19738 $("body").removeClass("StopScroll"); 19739 } 19740 // const heightOfHeader = $(".gs-navbarDropmenu").height(); 19741 const heightOfHeader = $(".container.homepagemenuRelative").innerHeight(); 19742 $(".search-group").css("top", heightOfHeader); 19743 $(".search-group").css({ display: "flex" }); 19744 $(".search-group").find(".container").css({ position: "relative" }); 19745 $("#header-part, #article-header-Nav").addClass("pos-searchbtn"); 19746 $(".close-search-container").children(".close-search").removeClass("invisible"); 19747 setTimeout(() => { 19748 $(".search-group input").first().focus(); 19749 }, 0); 19750 } 19751 $(".close-search").click(function () { 19752 collapseSearchPanel(); 19753 }); 19754 $(".search-group a").on("keyup", function (event) { 19755 if (event.key === "Enter") { 19756 collapseSearchPanel(); 19757 } 19758 }); 19759 function collapseSearchPanel(returnFocus = true) { 19760 $(".search-group").hide(); 19761 $("#header-part, #article-header-Nav").removeClass("pos-searchbtn"); 19762 $(".close-search-container").children(".close-search").addClass("invisible"); 19763 setTimeout(() => { 19764 if (searchTrigger) { 19765 searchTrigger.focus(); 19766 } 19767 }, 50); 19768} 19769 19770 /* To have white background when search and cf in open*/ 19771 $( 19772 ".header-eyebrow .find-council,.header-search, #header-part .navbar-toggler .navbar-toggler-icon, #article-header-Nav .navbar-toggler .navbar-toggler-icon" 19773 ).click(function () { 19774 $(".gs-navbarDropmenu").addClass("cf-open"); 19775 }); 19776 $( 19777 ".find-a-council .close-find-a-council, .close-search, #header-part .navbar-toggler .close, #article-header-Nav .navbar-toggler .close" 19778 ).click(function () { 19779 $(".gs-navbarDropmenu").removeClass("cf-open"); 19780 }); 19781 /*To change color of council finder eyebrow icon on hover */ 19782 $(".header-eyebrow .find-council").hover(function () { 19783 /*$(this).toggleClass("council-hover");*/ 19784 }); 19785 19786 /*IE only - To set width for shapes*/ 19787 if (/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) { 19788 $(".homePage-card .hpcard-shapes-wrapper .img-clipPath").attr({ 19789 width: "1000px", 19790 height: "100%", 19791 }); 19792 $(".homePage-card .hpcard-shapes-wrapper svg").each(function () { 19793 var imgSrc = $(this).find("image").attr("xlink:href"); 19794 $('<img class="noShapeImg" src="" width="100%"/>').insertAfter(this); 19795 $(this).next().attr("src", imgSrc); 19796 }); 19797 } 19798 19799 /*footer compoenent js */ 19800 19801 /*end footer component js */ 19802 19803 // Code for Changing footer down bg image for different resolutions. 19804 $(window).resize(function () { 19805 //path of image in DAM 19806 var imageipad = $("#imageipad").attr("value"); 19807 var imagemobile = $("#imagephone").attr("value"); 19808 var imagedeskt = $("#imagedesk").attr("value"); 19809 19810 if ($(window).width() >= 1024) { 19811 $(".gs-footer-main").css('background-image','url("' + imagedeskt+'")'); 19812 } 19813 if ($(window).width() <= 1023) { 19814 $(".gs-footer-main").css('background-image','url("' + imageipad+'")'); 19815 } 19816 if ($(window).width() <= 767) { 19817 $(".gs-footer-main").css('background-image','url("' + imagemobile+'")'); 19818 } 19819 }); 19820 19821 /*show hide article social-bar */ 19822 $(".article-socialbar .artShare").click(function () { 19823 $(this).toggleClass("artshare-close"); 19824 $(".article-socialbar .inline-list").toggleClass("show-article"); 19825 }); 19826 19827 $("#artShareId").on("keyup", function (event) { 19828 if (event.key === "Enter") { 19829 $(this).find("span").toggleClass("artshare-close"); 19830 $(".article-socialbar .inline-list").toggleClass("show-article"); 19831 } 19832 }); 19833 /*social media start*/ 19834 19835 $(".for-slick-slider").length && 19836 $(".for-slick-slider").slick({ 19837 slidesToShow: 3, 19838 slidesToScroll: 3, 19839 infinite: true, 19840 variableWidth: true, 19841 swipeToSlide: true, 19842 arrows: true, 19843 accessibility: true, 19844 responsive: [ 19845 { 19846 breakpoint: 1420, 19847 settings: { 19848 slidesToShow: 2, 19849 slidesToScroll: 2, 19850 }, 19851 }, 19852 { 19853 breakpoint: 1024, 19854 settings: { 19855 slidesToShow: 2, 19856 slidesToScroll: 2, 19857 }, 19858 }, 19859 { 19860 breakpoint: 767, 19861 settings: { 19862 slidesToShow: 1, 19863 slidesToScroll: 1, 19864 }, 19865 }, 19866 ], 19867 }); 19868 19869 $(".postMessage").each(function () { 19870 if ($(".postMessage a").length == 0) { 19871 } else {
19872 var appenItem = $(this).parent().prev(".slick-slide"); 19873 var parentItem = $(this).parent(); 19874 $(parentItem).appendTo(appenItem); 19875 } 19876 }); 19877 /* to show hide post*/ 19878 19879 function showInstagramCards(ele) { 19880 if ($(ele).hasClass("active-feed")) { 19881 $("#posts-from-all").show(); 19882 $("#posts-from-twitter,#posts-from-fb,#posts-from-insta").hide(); 19883 $(ele).toggleClass("active-feed"); 19884 } else { 19885 $("#posts-from-twitter,#posts-from-fb,#posts-from-all").hide(); 19886 $("#posts-from-insta").show(); 19887 $(ele).toggleClass("active-feed"); 19888 $( 19889 ".social .icons .social-facebook, .social .icons .social-twitter" 19890 ).removeClass("active-feed"); 19891 } 19892 $('.for-slick-slider').slick('slickGoTo', 0); 19893 } 19894 19895 $(".social .icons .social-instagram").click(function () { 19896 showInstagramCards(this); 19897 }); 19898 19899 $(".social .icons #instagram").on("keyup", function (event) { 19900 if (event.key === "Enter") { 19901 var ele = $(this).find("div"); 19902 showInstagramCards(ele); 19903 } 19904 }); 19905 $(".social").find(".slick-arrow").text(""); 19906 19907 function showFacebookCards(ele) { 19908 if ($(ele).hasClass("active-feed")) { 19909 $("#posts-from-all").show(); 19910 $("#posts-from-twitter,#posts-from-fb,#posts-from-insta").hide(); 19911 $(ele).toggleClass("active-feed"); 19912 } else { 19913 $("#posts-from-twitter,#posts-from-insta,#posts-from-all").hide(); 19914 $("#posts-from-fb").show(); 19915 $(ele).toggleClass("active-feed"); 19916 $( 19917 ".social .icons .social-instagram, .social .icons .social-twitter" 19918 ).removeClass("active-feed"); 19919 } 19920 $('.for-slick-slider').slick('slickGoTo', 0); 19921 } 19922 19923 $(".social .icons .social-facebook").click(function () { 19924 showFacebookCards(this); 19925 }); 19926 19927 $(".social .icons #facebook").on("keyup", function (event) { 19928 if (event.key === "Enter") { 19929 var ele = $(this).find("div"); 19930 showFacebookCards(ele); 19931 } 19932 }); 19933 19934 function showTwitterCards(ele) { 19935 if ($(ele).hasClass("active-feed")) { 19936 $("#posts-from-all").show(); 19937 $("#posts-from-twitter,#posts-from-fb,#posts-from-insta").hide(); 19938 $(ele).toggleClass("active-feed"); 19939 } else { 19940 $("#posts-from-insta,#posts-from-fb,#posts-from-all").hide(); 19941 $("#posts-from-twitter").show(); 19942 $(ele).toggleClass("active-feed"); 19943 $( 19944 ".social .icons .social-instagram, .social .icons .social-facebook" 19945 ).removeClass("active-feed"); 19946 } 19947 $('.for-slick-slider').slick('slickGoTo', 0); 19948 } 19949 19950 $(".social .icons .social-twitter").click(function () { 19951 showTwitterCards(this); 19952 }); 19953 19954 $(".social .icons #twitter").on("keyup", function (event) { 19955 if (event.key === "Enter") { 19956 var ele = $(this).find("div"); 19957 showTwitterCards(ele); 19958 } 19959 }); 19960 19961 /*social media end*/ 19962 function bannertextAreaSize(els) { 19963 for (var i = 0; i < els.length; i++) { 19964 if (els[i].value != undefined) { 19965 if (els[i].closest(".BannerComponent") != undefined) { 19966 const desk = els[i].closest(".BannerComponent"); 19967 if (desk.querySelector(".bannertextArea") != undefined) { 19968 desk.querySelector(".bannertextArea").style.fontSize = els[i].value; 19969 } 19970 } else if (els[i].closest(".banner-comp") != undefined) { 19971 const desk = els[i].closest(".banner-comp"); 19972 if (desk.querySelector(".bannertextArea") != undefined) { 19973 desk.querySelector(".bannertextArea").style.fontSize = els[i].value; 19974 } 19975 } 19976 } 19977 } 19978 } 19979 /* Code for Changing Banner image for different resolutions.*/ 19980 for(let s=0; s<$(".banner-image").length;s++) { 19981 var bannerImagedeskt = $($(".banner-image")[s]).find("#bannerImage-webimage").attr("value"); 19982 var bannerImageipad = $($(".banner-image")[s]).find("#bannerImage-ipadImage").attr("value"); 19983 var bannerImagemobile = $($(".banner-image")[s]).find("#bannerImage-mobileImage").attr("value"); 19984 if ($(window).width() >= 1024) { 19985 $($(".banner-image")[s]).find(".banner_Image_main img").attr('src', bannerImagedeskt ); 19986 } 19987 if ($(window).width() < 1024 && $(window).width() > 767) { 19988 if(bannerImageipad) { 19989 $($(".banner-image")[s]).find(".banner_Image_main img").attr('src', bannerImageipad ); 19990 } 19991 else { 19992 $($(".banner-image")[s]).find(".banner_Image_main img").attr('src', bannerImagedeskt ); 19993 } 19994 } 19995 if ($(window).width() <= 767) { 19996 if(bannerImagemobile) { 19997 $($(".banner-image")[s]).find(".banner_Image_main img").attr('src', bannerImagemobile ); 19998 } 19999 else { 20000 $($(".banner-image")[s]).find(".banner_Image_main img").attr('src', bannerImagedeskt ); 20001 } 20002 } 20003 } 20004 function setBannerShapeSize() { 20005 var $shape = $(".bannerTopShape"); 20006 var currentStyle = $shape.attr("style") || ""; 20007 if (currentStyle.indexOf("flower") > -1) { 20008 $shape.css("width", "300px"); 20009 $shape.css("height", "300px"); 20010 } else { 20011 if ($(window).width() < 768) { 20012 $shape.css("width", "320px"); 20013 $shape.css("height", "221px"); 20014 } else if ($(window).width() < 1024) { 20015 $shape.css("width", "352px"); 20016 $shape.css("height", "221px"); 20017 } else { 20018 $shape.css("width", "505px"); 20019 $shape.css("height", "330px"); 20020 } 20021 } 20022 } 20023 20024 /* Code for Changing Homepage Banner bg image for different resolutions.*/ 20025 //path of image in DAM 20026 var banner1Enabled = $("#banner1-enabled").val(); 20027 var banner1SortOrder = $("#banner1-sortOrderNumber").val(); 20028 var banner2Enabled = $("#banner2-enabled").val(); 20029 var banner2SortOrder = $("#banner2-sortOrderNumber").val(); 20030 var banner3Enabled = $("#banner3-enabled").val(); 20031 var banner3SortOrder = $("#banner3-sortOrderNumber").val(); 20032 var disableInfiniteWrap = $(".disableInfiniteWrap").val() == "" ? "false" : "true"; 20033 var delayInSeconds = $(".delayInSeconds").val() ? $(".delayInSeconds").val() : 5; 20034 var imageipad = $("#banner1-ipadImage").attr("value"); 20035 var imagemobile = $("#banner1-mobileImage").attr("value"); 20036 var imagedeskt = $("#banner1-webimage").attr("value"); 20037 var imageipad2 = $("#banner2-ipadImage").attr("value"); 20038 var imagemobile2 = $("#banner2-mobileImage").attr("value"); 20039 var imagedeskt2 = $("#banner2-webimage").attr("value"); 20040 var imageipad3 = $("#banner3-ipadImage").attr("value"); 20041 var imagemobile3 = $("#banner3-mobileImage").attr("value"); 20042 var imagedeskt3 = $("#banner3-webimage").attr("value"); 20043 var shapeType1 = $("#banner1-shapeType").attr("value"); 20044 var shapeTextColor1 = $("#banner1-shapeTextColor").attr("value"); 20045 var shapeAlignment1 = $("#banner1-shapeAlignment").attr("value"); 20046 var shapeText1 = $("#banner1-shapeText").attr("value"); 20047 var shapeType2 = $("#banner2-shapeType").attr("value"); 20048 var shapeTextColor2 = $("#banner2-shapeTextColor").attr("value"); 20049 var shapeAlignment2 = $("#banner2-shapeAlignment").attr("value"); 20050 var shapeText2 = $("#banner2-shapeText").attr("value"); 20051 var shapeType3 = $("#banner3-shapeType").attr("value"); 20052 var shapeTextColor3 = $("#banner3-shapeTextColor").attr("value"); 20053 var shapeAlignment3 = $("#banner3-shapeAlignment").attr("value"); 20054 var shapeText3 = $("#banner3-shapeText").attr("value"); 20055 var shapeTextSizeDesktop1 = $("#banner1-shapeTextSizeDesktop").attr("value") ? $("#banner1-shapeTextSizeDesktop").attr("value")+'px' : ''; 20056 var shapeTextSizeTablet1 = $("#banner1-shapeTextSizeTablet").attr("value") ? $("#banner1-shapeTextSizeTablet").attr("value")+'px' : ''; 20057 var shapeTextSizeMobile1 = $("#banner1-shapeTextSizeMobile").attr("value") ? $("#banner1-shapeTextSizeMobile").attr("value")+'px' : ''; 20058 var shapeTextSizeDesktop2 = $("#banner2-shapeTextSizeDesktop").attr("value") ? $("#banner2-shapeTextSizeDesktop").attr("value")+'px' : ''; 20059 var shapeTextSizeTablet2 = $("#banner2-shapeTextSizeTablet").attr("value") ? $("#banner2-shapeTextSizeTablet").attr("value")+'px' : ''; 20060 var shapeTextSizeMobile2 = $("#banner2-shapeTextSizeMobile").attr("value") ? $("#banner2-shapeTextSizeMobile").attr("value")+'px' : ''; 20061 var shapeTextSizeDesktop3 = $("#banner3-shapeTextSizeDesktop").attr("value") ? $("#banner3-shapeTextSizeDesktop").attr("value")+'px' : ''; 20062 var shapeTextSizeTablet3 = $("#banner3-shapeTextSizeTablet").attr("value") ? $("#banner3-shapeTextSizeTablet").attr("value")+'px' : ''; 20063 var shapeTextSizeMobile3 = $("#banner3-shapeTextSizeMobile").attr("value") ? $("#banner3-shapeTextSizeMobile").attr("value")+'px' : ''; 20064 $(".bannerTopShape").addClass(shapeAlignment1 == "auto" ? 'bnr-shape-center' : ''); 20065 $(".bannertextArea").css("visibility", "visible"); 20066 $(".bannerTopShape").css("visibility", "visible"); 20067 setBannerShapeSize(); 20068 $(".bannerTopShape .bannertextArea").html(banner1SortOrder == '1' ? shapeText1 : (banner2SortOrder == '1' ? shapeText2 : shapeText3)); 20069 $(".bannerTopShape .bannertextArea, .bannerTopShape .bannertextArea > *").css("font-size", $(window).width() > 1023 ? shapeTextSizeDesktop1 : ($(window).width() < 768 ? shapeTextSizeMobile1 : shapeTextSizeTablet1)); 20070 var bannerImages = []; 20071 if($(window).width() >= 1024) { 20072 banner1Enabled == 'true' && bannerImages.push({order: 1, img: imagedeskt}); 20073 banner2Enabled == 'true' && bannerImages.push({order: 2, img: imagedeskt2}); 20074 banner3Enabled == 'true' && bannerImages.push({order: 3, img: imagedeskt3}); 20075 } 20076 else if($(window).width() < 1024 && $(window).width() > 767) { 20077 banner1Enabled == 'true' && bannerImages.push({order: 1, img: imageipad}); 20078 banner2Enabled == 'true' && bannerImages.push({order: 2, img: imageipad2}); 20079 banner3Enabled == 'true' && bannerImages.push({order: 3, img: imageipad3}); 20080 } 20081 else { 20082 banner1Enabled == 'true' && bannerImages.push({order: 1, img: imagemobile}); 20083 banner2Enabled == 'true' && bannerImages.push({order: 2, img: imagemobile2}); 20084 banner3Enabled == 'true' && bannerImages.push({order: 3, img: imagemobile3}); 20085 } 20086 // Append slides dynamically
20087 bannerImages.forEach(function (data, index) { 20088 if(data.img) 20089 $(".bannerComp_slider").append('<div class="slide" style="background-image: url(\'' + data.img + '\');"></div>'); 20090 }); 20091 $(".bannerComp_slider .slide").length > 1 && 20092 $(".bannerComp_slider").slick({ 20093 slidesToShow: 1, 20094 slidesToScroll: 1, 20095 infinite: JSON.parse(disableInfiniteWrap), 20096 autoplay: true, 20097 autoplaySpeed: delayInSeconds * 1000, 20098 dots: true, 20099 arrows: false, 20100 prevArrow: false, 20101 nextArrow: false, 20102 fade: true, 20103 cssEase: 'linear', 20104 pauseOnHover: false 20105 }); 20106 let slickDotClicked = false; 20107 let clickedslideIndex; 20108 $(".bannerComp_slider .slick-dots li button").click((e) => { 20109 $(".bannerComp_slider").slick('slickPause'); 20110 $('.play-pause-btn').html(`<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 30 30" fill="currentColor"> 20111 <path d="M8 5v14l11-7z" fill="white" filter="drop-shadow(0px 1px 3px rgba(0,0,0,0.6))"/> 20112 </svg> 20113 `); // Change to Play 20114 isPlaying = false; 20115 slickDotClicked = true; 20116 clickedslideIndex = Number(e.target.textContent); 20117 $(".bannerTopShape").css("float", ""); 20118 }); 20119 $('.bannerTopShape').on('click', function () { 20120 const link = $(this).attr('data-banner-link'); 20121 const target = $(this).attr('data-banner-target') || '_self'; 20122 if (link) { 20123 window.open(link, target); 20124 } 20125 }); 20126 $(".bannerComp_slider").on("beforeChange", function(e, slick, cur) { 20127 $(".bannerTopShape").css("float", ""); 20128 let indexNum; 20129 if(slickDotClicked) { 20130 indexNum = bannerImages[clickedslideIndex-1].order; 20131 slickDotClicked = false; 20132 } 20133 else { 20134 indexNum = (cur == slick.$slides.length-1) ? bannerImages[0].order : bannerImages[cur+1].order; 20135 } 20136 if(indexNum == 1) { 20137 $(".bannerTopShape").attr("data-banner-target", $("#banner1-target").val()); 20138 $(".bannerTopShape").attr("data-banner-link", $('#banner1-link').val()); 20139 $(".bannerTopShape").css( 20140 "background-image", 20141 shapeType1 == null 20142 ? 'url("/content/dam/gsusa-redesign/headers/barrels/GSUSA_banner-barrelshape-stargreen.png")' 20143 : 'url("' + shapeType1 + '")' 20144 ); 20145 $(".bannerTopShape .bannertextArea").html(shapeText1); 20146 $(".bannerTopShape .bannertextArea").css("color", shapeTextColor1 == null ? '#000000' : shapeTextColor1) 20147 $(".bannerTopShape").css("float", shapeAlignment1); 20148 $(".bannerTopShape").addClass(shapeAlignment1 == "auto" ? 'bnr-shape-center' : ''); 20149 $(".bannerTopShape .bannertextArea, .bannerTopShape .bannertextArea > *").css("font-size", $(window).width() > 1023 ? shapeTextSizeDesktop1 : ($(window).width() < 768 ? shapeTextSizeMobile1 : shapeTextSizeTablet1)); 20150 } 20151 else if(indexNum == 2){ 20152 $(".bannerTopShape").attr("data-banner-target", $("#banner2-target").val()); 20153 $(".bannerTopShape").attr("data-banner-link", $('#banner2-link').val()); 20154 $(".bannerTopShape").css( 20155 "background-image", 20156 shapeType2 == null 20157 ? 'url("/content/dam/gsusa-redesign/headers/barrels/GSUSA_banner-barrelshape-stargreen.png")' 20158 : 'url("' + shapeType2 + '")' 20159 ); 20160 $(".bannerTopShape .bannertextArea").html(shapeText2); 20161 $(".bannerTopShape .bannertextArea").css("color", shapeTextColor2 == null ? '#000000' : shapeTextColor2) 20162 $(".bannerTopShape").css("float", shapeAlignment2); 20163 $(".bannerTopShape").addClass(shapeAlignment2 == "auto" ? 'bnr-shape-center' : ''); 20164 $(".bannerTopShape .bannertextArea, .bannerTopShape .bannertextArea > *").css("font-size", $(window).width() > 1023 ? shapeTextSizeDesktop2 : ($(window).width() < 768 ? shapeTextSizeMobile2 : shapeTextSizeTablet2)); 20165 } 20166 else if(indexNum == 3) { 20167 $(".bannerTopShape").attr("data-banner-target", $("#banner3-target").val()); 20168 $(".bannerTopShape").attr("data-banner-link", $('#banner3-link').val()); 20169 $(".bannerTopShape").css( 20170 "background-image", 20171 shapeType3 == null 20172 ? 'url("/content/dam/gsusa-redesign/headers/barrels/GSUSA_banner-barrelshape-stargreen.png")' 20173 : 'url("' + shapeType3 + '")' 20174 ); 20175 $(".bannerTopShape .bannertextArea").html(shapeText3); 20176 $(".bannerTopShape .bannertextArea").css("color", shapeTextColor3 == null ? '#000000' : shapeTextColor3) 20177 $(".bannerTopShape").css("float", shapeAlignment3); 20178 $(".bannerTopShape").addClass(shapeAlignment3 == "auto" ? 'bnr-shape-center' : ''); 20179 $(".bannerTopShape .bannertextArea, .bannerTopShape .bannertextArea > *").css("font-size", $(window).width() > 1023 ? shapeTextSizeDesktop3 : ($(window).width() < 768 ? shapeTextSizeMobile3 : shapeTextSizeTablet3)); 20180 } 20181 setBannerShapeSize(); 20182 }); 20183 $(".bannerComp_slider").on("afterChange", function(e, slick, cur) { 20184 if( cur === slick.$slides.length-1 && JSON.parse($(".disableInfiniteWrap").val())) { 20185 slick.setOption("autoplay", false); 20186 $(".bannerComp_slider").slick('slickPause'); 20187 $('.play-pause-btn').html(` 20188 <svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 30 30" fill="currentColor"> 20189 <path d="M8 5v14l11-7z" fill="white" filter="drop-shadow(0px 1px 3px rgba(0,0,0,0.6))"/> 20190 </svg> 20191 `); // Change to Play 20192 isPlaying = false;
20193 } 20194 else { 20195 slick.setOption("autoplay", true); 20196 } 20197 });; 20198 var isPlaying = true; 20199 if($(".bannerComp_slider .slide").length > 1) { 20200 // Wait for Slick to Initialize and Append Play/Pause Button 20201 $('.slick-dots').append(`<button class="play-pause-btn"> 20202 <svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 30 30" fill="currentColor"> 20203 <path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z" fill="white" filter="drop-shadow(0px 1px 3px rgba(0,0,0,0.6))"/> 20204 </svg> 20205 </button>`); 20206 // Play/Pause Button Click Event 20207 $(document).on('click', '.play-pause-btn', function () { 20208 if (isPlaying) { 20209 $(".bannerComp_slider").slick('slickPause'); 20210 $(this).html(` 20211 <svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 30 30" fill="currentColor"> 20212 <path d="M8 5v14l11-7z" fill="white" filter="drop-shadow(0px 1px 3px rgba(0,0,0,0.6))"/> 20213 </svg> 20214 `); // Change to Play 20215 } else { 20216 $(".bannerComp_slider").slick('slickPlay'); 20217 $(this).html(` 20218 <svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 30 30" fill="currentColor"> 20219 <path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z" fill="white" filter="drop-shadow(0px 1px 3px rgba(0,0,0,0.6))"/> 20220 </svg>`); // Change to Pause 20221 if($(".bannerComp_slider .slick-dots li.slick-active").find("button").text() == $(".bannerComp_slider .slick-dots li").length) { 20222 setTimeout(() => { 20223 $(".bannerComp_slider").slick('slickGoTo', 0, true); 20224 }, 1000); 20225 } 20226 } 20227 isPlaying = !isPlaying; 20228 }); 20229 } 20230 // if ($(window).width() >= 1024) { 20231 // $(".gshomepage-tophead").css( 20232 // 'background-image','url("' + imagedeskt+'")' 20233 // ); 20234 // var els = document.getElementsByClassName("banner-webFontSize"); 20235 // bannertextAreaSize(els); 20236 // } 20237 // if ($(window).width() < 1024 && $(window).width() > 767) { 20238 // $(".gshomepage-tophead").css( 20239 // 'background-image','url("' + imageipad+'")' 20240 // ); 20241 // var els = document.getElementsByClassName("banner-tabletFontSize"); 20242 // bannertextAreaSize(els); 20243 // } 20244 // if ($(window).width() <= 767) { 20245 // $(".gshomepage-tophead").css( 20246 // 'background-image','url("' + imagemobile+'")' 20247 // ); 20248 // var els = document.getElementsByClassName("banner-mobileFontSize"); 20249 // bannertextAreaSize(els); 20250 // } 20251 $(window).on("resize", function () { 20252 //path of image in DAM 20253 var imageipad = $("#banner-ipadImage").attr("value"); 20254 var imagemobile = $("#banner-mobileImage").attr("value"); 20255 var imagedeskt = $("#banner-webimage").attr("value"); 20256 20257 // $('.gshomepage-tophead').css('background-image','url("' + imagedeskt+'")'); 20258 20259 if ($(window).width() >= 1024) { 20260 $(".gshomepage-tophead").css( 20261 'background-image','url("' + imagedeskt+'")' 20262 ); 20263 var els = document.getElementsByClassName("banner-webFontSize"); 20264 bannertextAreaSize(els); 20265 } 20266 if ($(window).width() < 1024 && $(window).width() > 767) { 20267 $(".gshomepage-tophead").css( 20268 'background-image','url("' + imageipad+'")' 20269 ); 20270 var els = document.getElementsByClassName("banner-tabletFontSize"); 20271 bannertextAreaSize(els); 20272 } 20273 if ($(window).width() <= 767) { 20274 $(".gshomepage-tophead").css( 20275 'background-image','url("' + imagemobile+'")' 20276 ); 20277 var els = document.getElementsByClassName("banner-mobileFontSize"); 20278 bannertextAreaSize(els); 20279 } 20280 setBannerShapeSize(); 20281 }); 20282 20283 /* Article Social Bar component */ 20284 if ($(".article-socialbar").length > 0) { 20285 var tweetText = $("#tweetText").val(); 20286 var tweetUrl = $("#tweetUrl").val(); 20287 var uniqueID = $("#uniqueID").val(); 20288 var facebookId = $("#facebookId").val(); 20289 var facebookText = $("#facebookText").val(); 20290 var imageUrl = $("#imageUrl").val(); 20291 var url = $("#url").val(); 20292 var title = $("#title").val(); 20293 var finalFacebookText = $("#finalFacebookText").val(); 20294 var finalTitle = $("#finalTitle").val(); 20295 var scriptTag = document.createElement("script"); 20296 20297 scriptTag.type = "text/javascript"; 20298 scriptTag.src = "//connect.facebook.net/en_US/all.js"; 20299 scriptTag.async = true; 20300 document.getElementsByTagName("head")[0].appendChild(scriptTag); 20301 20302 // scriptTag.onload = initFB; 20303 // scriptTag.onreadystatechange = function () { 20304 // if (this.readyState == "complete" || this.readyState == "loaded") 20305 // initFB(); 20306 // }; 20307 20308 // function initFB() {
20309 // FB.init({ appId: facebookId, status: true, cookie: true }); 20310 // } 20311 20312 // $("#facebook-tool").click(function () { 20313 // // calling the API ... 20314 // var obj = { 20315 // method: "feed", 20316 // link: url, 20317 // picture: imageUrl, 20318 // name: finalTitle, 20319 // description: finalFacebookText, 20320 // }; 20321 20322 // function callback(response) {} 20323 20324 // FB.ui(obj, callback); 20325 // return false; 20326 // }); 20327 20328 // function get_bitly_short_url(long_url, login, api_key, func) { 20329 // $.getJSON( 20330 // "//api-ssl.bitly.com/v3/shorten?callback=?", 20331 // { 20332 // apiKey: api_key, 20333 // login: login, 20334 // longUrl: long_url, 20335 // format: "json", 20336 // }, 20337 // function (response) { 20338 // if (response.data.url) func(response.data.url); 20339 // else func(long_url); 20340 // } 20341 // ); 20342 // } 20343 // var bitly_login = "gsusa"; 20344 // var bitly_api_key = "R_f738e9d3ad5d828e8c2224e4f1bf531b"; 20345 // var bitly_long_url = tweetUrl; 20346 // get_bitly_short_url( 20347 // bitly_long_url, 20348 // bitly_login, 20349 // bitly_api_key, 20350 // function (short_url) { 20351 // /*var bitly_twitter_url = "//twitter.com/share?text=<%=tweetText%>&url=" + short_url;*/ 20352 // var bitly_twitter_url = 20353 // "//twitter.com/intent/tweet?text=" + tweetText + "&url=" + short_url; 20354 // $("a.icon-social-twitter-tweet-bird").attr("href", bitly_twitter_url); 20355 // } 20356 // ); 20357 var bitly_fabebook_url = "https://www.facebook.com/sharer/sharer.php?u="+ tweetUrl; 20358 $("a.icon-social-facebook").attr("href", bitly_fabebook_url); 20359 var bitly_twitter_url = "//twitter.com/intent/tweet?text=" + tweetText + "&url=" + tweetUrl; 20360 $("a.icon-social-twitter-tweet-bird").attr("href", bitly_twitter_url); 20361 var bitly_linkedin_url = "//www.linkedin.com/shareArticle?text=" + tweetText + "&url=" + tweetUrl; 20362 $("a.icon-social-linkedin").attr("href", bitly_linkedin_url); 20363 var bitly_pinterest_url = "https://pinterest.com/pin/create/button?text=" + tweetText + "&url=" + tweetUrl; 20364 $("a.icon-social-pinterest").attr("href", bitly_pinterest_url); 20365 } 20366 $(".icon-printer").click(function() { 20367 window.print(); 20368 }) 20369 /* Article Social Bar component End*/ 20370 20371 /* Curriculam Filter component */ 20372 20373 var path = $("#filter-path").val(); 20374 var actualPath = $.trim(path); 20375 var currentNodePath = $("#filter-node-path").val(); 20376 if (actualPath != "") { 20377 actualPath = actualPath + "/"; 20378 } 20379 20380 $("#openPdf").click(function () { 20381 var fileNotFoundMsg = $("#filter-msg").val(); 20382 if (fileNotFoundMsg == "") { 20383 fileNotFoundMsg = 20384 "Sorry, we could not find the Curriculum Standards for your search criteria. Please refine your search and try again."; 20385 } 20386 20387 var program = $(".program option:selected").val(); 20388 var grade = $(".grade option:selected").val(); 20389 var state = $(".state option:selected").val(); 20390 20391 var filePath = encodeURI( 20392 actualPath + 20393 grade + 20394 "_" + 20395 program + 20396 "/" + 20397 state + 20398 "_" + 20399 grade + 20400 "_" + 20401 program + 20402 ".pdf" 20403 ); 20404 20405 $.ajax({ 20406 type: "POST", 20407 url: currentNodePath + ".html", 20408 async: false, 20409 data: { path: filePath }, 20410 }) 20411 .done(function (msg) { 20412 /* var json = JSON.parse(msg); 20413 console.log( json ); */ 20414 if (msg == "found") { 20415 if ($("#cf-file-msg").length > 0) { 20416 $("#cf-file-msg").html(""); 20417 } 20418 window.open(filePath, "_blank"); 20419 } else { 20420 /* window.location.href="/content/gsusa/en/404.html"; */ 20421 $("#cf-file-msg").html(fileNotFoundMsg); 20422 } 20423 }) 20424 .fail(function (msg) { 20425 //console.log( msg ); 20426 }); 20427 return false; 20428 }); 20429 20430 /* Curriculam Filter component end*/ 20431 20432 /* Custom HTML Tags for Rich Text Editor */ 20433 document.createElement("H1DesktopOnLight"); 20434 document.createElement("H1DesktopOnDark"); 20435 document.createElement("H2DesktopOnLight"); 20436 document.createElement("H2DesktopOnDark"); 20437 document.createElement("H3DesktopOnLight"); 20438 document.createElement("H3DesktopOnDark"); 20439 /* Custom HTML Tags for Rich Text Editor - end */ 20440 20441 /*home page card*/ 20442 var par = $(".only-for-homepage").parent(); 20443 $(par).closest(".row").addClass("row-card"); 20444 var cardParent = $(".homePage-card").parent(); 20445 $(cardParent).closest(".container").addClass("cardWrapper"); 20446 $(".home-page .header") 20447 .parents(".experiencefragment") 20448 .addClass("this-is-header"); 20449 $(".council-home-page .header") 20450 .parents(".experiencefragment") 20451 .addClass("this-is-header"); 20452 /*homepage card*/ 20453 20454 /**article carousel */
20455 $(".article-carousel ").each((index, value) => { 20456 var data = $(value).find(".artCarousel").attr("data-article-card") != undefined ? JSON.parse($(value).find(".artCarousel").attr("data-article-card")) : []; 20457 var titleLink = $(value).find(".titleLink").val(); 20458 var openLink = $(value).find(".openLink").val() 20459 var dataListingPageURL = $(value).find(".artCarousel").attr("data-listing-page-url"); 20460 var dataShapeValue = $(value).find(".artCarousel").attr("data-shape-val"); 20461 if ($(value).find(".randomizeArticles").val() == 'true') { 20462 function shuffle(array) { 20463 let currentIndex = array.length, randomIndex; 20464 // While there remain elements to shuffle. 20465 while (currentIndex != 0) { 20466 // Pick a remaining element. 20467 randomIndex = Math.floor(Math.random() * currentIndex); 20468 currentIndex--; 20469 // And swap it with the current element. 20470 [array[currentIndex], array[randomIndex]] = [ 20471 array[randomIndex], array[currentIndex]]; 20472 } 20473 return array; 20474 } 20475 shuffle(data); 20476 } 20477 var template = ''; 20478 var template2 = ''; 20479 for(let i=0;i<data.length;i++) { 20480 var svg = ''; 20481 if(dataShapeValue == 'rectangle') { 20482 svg = `<svg class="svg-wrapper" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 610 405" role="graphics-document"> 20483 <title>`+data[i].articleShrtDesc+`</title> 20484 <g> 20485 <clipPath id="card-rect"> 20486 <path fill="#11b45a" d="M17.4 0h575.2A17.4 17.4 0 0 1 610 17.4v350.2a17.4 17.4 0 0 1-17.4 17.4H17.4A17.4 17.4 0 0 1 0 367.6V17.4A17.4 17.4 0 0 1 17.4 0z"> 20487 </path> 20488 </clipPath> 20489 </g> 20490 <image class="img-to-clip" alt="`+data[i].articleShrtDesc+`" role="img" aria-labelledby="`+data[i].articleShrtDesc+`" width="100%" height="100%" preserveAspectRatio="xMidYMid slice" clip-path="url(#card-rect)" x="0" y="0" xlink:href="`+data[i].articleImgLink+`"> 20491 <desc id="imgDes1">`+data[i].articleShrtDesc+`</desc></image> 20492 </svg>`; 20493 } 20494 else if(dataShapeValue == 'barrel') { 20495 svg = `<svg class="svg-wrapper" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 610 405" role="graphics-document"> 20496 <title>`+data[i].articleShrtDesc+`</title> 20497 <g> 20498 <clipPath id="card-barrel"> 20499 <path fill="#11b45a" d="M978.86 279.944c-108.2 0-208.343 29.012-297.648 86.225-6.478 4.15-7.353 8.658-7.353 12.522V566.2c0 3.864.874 8.373 7.353 12.522 89.3 57.213 189.449 86.225 297.648 86.225s208.342-29.012 297.648-86.225c6.478-4.15 7.352-8.658 7.352-12.522V378.7c0-3.864-.874-8.373-7.352-12.522-89.305-57.213-189.449-86.225-297.648-86.225z" transform="translate(-673.86 -279.944)"> 20500 </path> 20501 </clipPath> 20502 </g> 20503 <image class="img-to-clip" alt="`+data[i].articleShrtDesc+`" role="img" aria-labelledby="`+data[i].articleShrtDesc+`" width="100%" height="100%" preserveAspectRatio="xMidYMid slice" clip-path="url(#card-barrel)" x="0" y="0" xlink:href="`+data[i].articleImgLink+`"> 20504 <desc id="imgDes2">`+data[i].articleShrtDesc+`</desc></image> 20505 </svg>`; 20506 } 20507 else if(dataShapeValue == 'frame') { 20508 svg = `<svg class="svg-wrapper" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 610 405" role="graphics-document"> 20509 <title>`+data[i].articleShrtDesc+`</title> 20510 <g> 20511 <clipPath id="card-frame"> 20512 <path fill="#11b45a" d="M1139.921 474.434a3.257 3.257 0 0 0-3.176-3.179 57.348 57.348 0 0 1-54.01-54.01 3.227 3.227 0 0 0-3.177-3.176H590.284a3.253 3.253 0 0 0-3.176 3.176 57.346 57.346 0 0 1-54.01 54.01 3.228 3.228 0 0 0-3.176 3.179v264.271a3.252 3.252 0 0 0 3.176 3.176 57.351 57.351 0 0 1 54.01 54.01 3.225 3.225 0 0 0 3.176 3.177h489.274a3.255 3.255 0 0 0 3.177-3.177 57.348 57.348 0 0 1 54.01-54.01 3.227 3.227 0 0 0 3.176-3.176z" transform="translate(-529.921 -414.068)"> 20513 </path> 20514 </clipPath> 20515 </g> 20516 <image class="img-to-clip" alt="`+data[i].articleShrtDesc+`" role="img" aria-labelledby="`+data[i].articleShrtDesc+`" width="100%" height="100%" preserveAspectRatio="xMidYMid slice" clip-path="url(#card-frame)" x="0" y="0" xlink:href="`+data[i].articleImgLink+`">
20517 <desc id="imgDes3">`+data[i].articleShrtDesc+`</desc></image> 20518 </svg>`; 20519 } 20520 else if(dataShapeValue == 'capsule') { 20521 svg = `<svg class="svg-wrapper" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 610 405" role="graphics-document"> 20522 <title>`+data[i].articleShrtDesc+`</title> 20523 <g> 20524 <clipPath id="card-capsule"> 20525 <path fill="#11b45a" d="M1021.8 657.939c-106.21 0-192.309-86.186-192.309-192.5s86.1-192.5 192.309-192.5h225.383c106.21 0 192.308 86.186 192.308 192.5s-86.1 192.5-192.308 192.5z" transform="translate(-829.49 -272.939)"> 20526 </path> 20527 </clipPath> 20528 </g> 20529 <image class="img-to-clip" alt="`+data[i].articleShrtDesc+`" role="img" aria-labelledby="`+data[i].articleShrtDesc+`" width="100%" height="100%" preserveAspectRatio="xMidYMid slice" clip-path="url(#card-capsule)" x="0" y="0" xlink:href="`+data[i].articleImgLink+`"> 20530 <desc id="imgDes4">`+data[i].articleShrtDesc+`</desc></image> 20531 </svg>`; 20532 } 20533 else if(dataShapeValue == 'square') { 20534 svg = `<svg class="svg-wrapper" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 610 610" role="graphics-document"> 20535 <title>`+data[i].articleShrtDesc+`</title> 20536 <g> 20537 <clipPath id="card-square"> 20538 <path fill="#11b45a" d="M17.4 0h575.2A17.4 17.4 0 0 1 610 17.4v575.2a17.4 17.4 0 0 1-17.4 17.4H17.4A17.4 17.4 0 0 1 0 592.6V17.4A17.4 17.4 0 0 1 17.4 0z"></path> 20539 </clipPath> 20540 </g> 20541 <image class="img-to-clip" alt="`+data[i].articleShrtDesc+`" role="img" aria-labelledby="`+data[i].articleShrtDesc+`" width="100%" height="100%" preserveAspectRatio="xMidYMid slice" clip-path="url(#card-square)" x="0" y="0" xlink:href="`+data[i].articleImgLink+`"> 20542 <desc id="imgDes5">`+data[i].articleShrtDesc+`</desc></image> 20543 </svg>`; 20544 } 20545 else if(dataShapeValue == 'octagon') { 20546 svg = `<svg class="svg-wrapper" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 610 610" role="graphics-document"> 20547 <title>`+data[i].articleShrtDesc+`</title> 20548 <g> 20549 <clipPath id="card-octogen"> 20550 <path fill="#11b45a" d="M990.279 251.315v230.046a27.29 27.29 0 0 1-8 19.31L819.612 663.342a27.313 27.313 0 0 1-19.31 8H570.256a27.3 27.3 0 0 1-19.31-8L388.275 500.67a27.312 27.312 0 0 1-8-19.31V251.315a27.312 27.312 0 0 1 8-19.31L550.947 69.334a27.3 27.3 0 0 1 19.31-8H800.3a27.313 27.313 0 0 1 19.31 8l162.666 162.672a27.29 27.29 0 0 1 8.003 19.309z" transform="translate(-380.279 -61.338)"> 20551 </path> 20552 </clipPath> 20553 </g> 20554 <image class="img-to-clip" alt="`+data[i].articleShrtDesc+`" role="img" aria-labelledby="`+data[i].articleShrtDesc+`" width="100%" height="100%" preserveAspectRatio="xMidYMid slice" clip-path="url(#card-octogen)" x="0" y="0" xlink:href="`+data[i].articleImgLink+`"> 20555 <desc id="imgDes6">`+data[i].articleShrtDesc+`</desc></image> 20556 </svg>`; 20557 } 20558 else if(dataShapeValue == 'circle') { 20559 svg = `<svg class="svg-wrapper" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 610 610" role="graphics-document"> 20560 <title>`+data[i].articleShrtDesc+`</title> 20561 <g> 20562 <clipPath id="card-circle"> 20563 <circle cx="305" cy="305" r="305" fill="#11b45a"/> 20564 </clipPath> 20565 </g> 20566 <image class="img-to-clip" alt="`+data[i].articleShrtDesc+`" role="img" aria-labelledby="`+data[i].articleShrtDesc+`" width="100%" height="100%" preserveAspectRatio="xMidYMid slice" clip-path="url(#card-circle)" x="0" y="0" xlink:href="`+data[i].articleImgLink+`"> 20567 <desc id="imgDes7">`+data[i].articleShrtDesc+`</desc></image> 20568 </svg>`; 20569 } 20570 else if(dataShapeValue == 'arch') { 20571 svg = `<svg class="svg-wrapper" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 610 610" role="graphics-document"> 20572 <title>`+data[i].articleShrtDesc+`</title> 20573 <g> 20574 <clipPath id="card-arch"> 20575 <path fill="#11b45a" d="M813.654 645.664a16.945 16.945 0 0 1-16.944 16.951H220.6
20575a16.949 16.949 0 0 1-16.944-16.951v-287.94c0-168.508 136.559-305.109 305-305.109s305 136.6 305 305.109z" transform="translate(-203.654 -52.615)"> 20576 </path> 20577 </clipPath> 20578 </g> 20579 <image class="img-to-clip" alt="`+data[i].articleShrtDesc+`" role="img" aria-labelledby="`+data[i].articleShrtDesc+`" width="100%" height="100%" preserveAspectRatio="xMidYMid slice" clip-path="url(#card-arch)" x="0" y="0" xlink:href="`+data[i].articleImgLink+`"> 20580 <desc id="imgDes8">`+data[i].articleShrtDesc+`</desc></image> 20581 </svg>`; 20582 } 20583 20584 var buttonTxt = $(value).find(".buttonText").val(); 20585 var condition1 = $(value).find(".hideButtons").val(); 20586 var condition2 = $(value).find(".hideDescriptionCard").val(); 20587 var ptag = ''; 20588 var btn = ''; 20589 var _target = (data?.[i]?.articleLink && openLink === 'true') ? "_blank" : "_self"; 20590 if(condition1 == 'false' && buttonTxt !='') { 20591 var btn = '<button href='+data[i].articleLink+' class="buttonOnHover carouselCard-button" aria-label="'+buttonTxt+'" target="_blank"><span>'+buttonTxt+'</span></button>'; 20592 } 20593 if(condition2 == 'false') { 20594 var ptag = "<p>"+data[i].articleDescription+"</p>"; 20595 } 20596 var articleLink = data?.[i]?.articleLink ? data[i].articleLink : 'javascript:void(0)'; 20597 var carousel = `<a href="`+articleLink+`" target="`+_target+`" title="" alt=""> 20598 <div class="carouselCard"> 20599 <div class="carouselCard-shape"> 20600 `+svg+` 20601 </div> 20602 <div class="carouselCard-des"> 20603 <span class="carouselCard-des-wrap"> 20604 <div class="h4">`+data[i].articleShrtDesc+`</div> 20605 `+ptag+` 20606 </span> 20607 </div> 20608 `+btn+` 20609 </div> 20610 </a>`; 20611 template = template+ carousel; 20612 } 20613 20614 if(titleLink) { 20615 var SeeMoreCardText = $(".seeMoreCardText").val(); 20616 template2 = `<div class="carouselCard SeeMore"> 20617 <a href="`+dataListingPageURL+`" title="`+SeeMoreCardText+`" alt="SeeMore"<button class=" carouselCard-button"><span> `+SeeMoreCardText+` </span></button></a> 20618 </div>`; 20619 } 20620 $(value).find(".article_caraousel").append(template + template2); 20621 /*height 0f article carousel*/ 20622 var $carousel = $(value).find(".article_caraousel"); 20623 $carousel.find(".articleCardQuoteTitle").css("height", "auto"); 20624 $carousel.find(".carouselCard-des").css("height", "auto"); 20625 $carousel.find(".carouselCard.SeeMore").css("height", "auto"); 20626 var maxTitleHeight = 0; 20627 $carousel.find(".articleCardQuoteTitle").each(function () { 20628 maxTitleHeight = Math.max(maxTitleHeight, $(this).outerHeight()); 20629 }); 20630 $carousel.find(".articleCardQuoteTitle").height(maxTitleHeight); 20631 var maxDescHeight = 0; 20632 $carousel.find(".carouselCard-des").each(function () { 20633 maxDescHeight = Math.max(maxDescHeight, $(this).outerHeight()); 20634 }); 20635 $carousel.find(".carouselCard-des").height(maxDescHeight); 20636 var maxCardHeight = 0; 20637 $carousel.find(".carouselCard").each(function () { 20638 maxCardHeight = Math.max(maxCardHeight, $(this).outerHeight()); 20639 }); 20640 $carousel.find(".carouselCard.SeeMore").height(maxCardHeight); 20641 /**article carousel */ 20642 /*height 0f article card*/ 20643 var artCardMaxHt = 0; 20644 $(".art-card-desWrap").each(function () { 20645 if ($(this).height() > artCardMaxHt) { 20646 artCardMaxHt = $(this).height(); 20647 } 20648 }); 20649 $(".art-card-desWrap").height(artCardMaxHt); 20650 var artCardShapeHt = 0; 20651 $(".art-card-shape").each(function () { 20652 if ($(this).height() > artCardShapeHt) { 20653 artCardShapeHt = $(this).height(); 20654 } 20655 }); 20656 $(".art-card-shape").height(artCardShapeHt); 20657 /*height 0f article card*/ 20658 }); 20659 $(".article_caraousel").length && 20660 $(".article_caraousel").slick({ 20661 variableWidth: true, 20662 slidesToShow: 3, 20663 slidesToScroll: 1, 20664 infinite: false, 20665 arrows: true, 20666 dots: true, 20667 swipeToSlide: true, 20668 responsive: [ 20669 { 20670 breakpoint: 1023, 20671 settings: { 20672 slidesToShow: 2, 20673 slidesToScroll: 1,
20674 arrows: false, 20675 }, 20676 }, 20677 { 20678 breakpoint: 767, 20679 settings: { 20680 slidesToShow: 1, 20681 slidesToScroll: 1, 20682 arrows: false, 20683 }, 20684 }, 20685 ], 20686 }); 20687 20688 /**to make navigation highlighten on showing dropdown */ 20689 20690 /*Header click href when component to be opened in same tab*/ 20691 $(".navbar-nav > li .navbar-dropdown").click(function () { 20692 const linkToRedirect = $(this).attr("href"); 20693 const isSameTabCall = $(this).attr("target") ? false : true; 20694 if (isSameTabCall) { 20695 if(validateURL(linkToRedirect)) 20696 window.location = linkToRedirect; 20697 } 20698 }); 20699 20700 function validateURL(surl) { 20701 var url = parseURL(surl); 20702 var urlHostname = url.hostname.trim(); 20703 if (urlHostname == '') { 20704 return true; 20705 } 20706 else { 20707 if (urlHostname.toUpperCase() == location.hostname.trim().toUpperCase()) { 20708 return true; 20709 } 20710 else 20711 return false; 20712 } 20713 } 20714 20715 function parseURL(url) { 20716 var a = document.createElement('a'); 20717 a.href = url; 20718 return { 20719 source: url, 20720 protocol: a.protocol.replace(':', ''), 20721 hostname: a.hostname, 20722 host: a.host, 20723 port: a.port, 20724 query: a.search, 20725 params: (function () { 20726 var ret = {}, 20727 seg = a.search.replace(/^\?/, '').split('&'), 20728 len = seg.length, i = 0, s; 20729 for (; i < len; i++) { 20730 if (!seg[i]) { continue; } 20731 s = seg[i].split('='); 20732 ret[s[0]] = s[1]; 20733 } 20734 return ret; 20735 })(), 20736 file: (a.pathname.match(/\/([^\/?#]+)$/i) || [, ''])[1], 20737 hash: a.hash.replace('#', ''), 20738 path: a.pathname.replace(/^([^\/])/, '/$1'), 20739 relative: (a.href.match(/tps?:\/\/[^\/]+(.+)/) || [, ''])[1], 20740 segments: a.pathname.replace(/^\//, '').split('/') 20741 }; 20742 } 20743 $(".navbar-nav > li .dropdown-toggle.nav-mobile-caret").click(function () { 20744 element = $(this); 20745 setTimeout(function () { 20746 if ($(window).width() <= 1023) { 20747 var $container = $(".navbar-collapse"); 20748 $scrollTo = element.parent(); 20749 $container.animate( 20750 { 20751 scrollTop: 20752 $scrollTo.offset().top - 20753 $container.offset().top + 20754 $container.scrollTop() - 20755 30, 20756 }, 20757 800 20758 ); 20759 } 20760 }, 500); 20761 20762 // $(".gs-navbarDropmenu .navbar-collapse").animate({ 20763 // scrollTop: 0 20764 // }, 400); 20765 }); 20766 20767 /**keyboard navigation trigger starts here */ 20768 $("#header-part").mouseover(function () { 20769 $("#header-part").addClass("nav-hover"); 20770 }); 20771 $("#header-part").mouseout(function () { 20772 $("#header-part").removeClass("nav-hover"); 20773 }); 20774 20775 $("#navbarSupportedContent .dropdown .dropdown-menu").mouseout(function () { 20776 $(this).removeClass("showDropdown"); 20777 $(this).find(".nav-link.dropdown-toggle.navbar-dropdown").attr("aria-expanded", "false"); 20778 }); 20779 20780 var pageLoad = true; 20781 20782 $(document).ready(function () { 20783 $(document).mousemove(function () { 20784 //console.log("len" + $("#navbarSupportedContent").find(".dropdown:hover").length); 20785 if ( 20786 !$("#navbarSupportedContent").find(".dropdown:hover").length && 20787 pageLoad 20788 ) { 20789 pageLoad = false; 20790 } 20791 }); 20792 }); 20793 20794 $("#navbarSupportedContent .dropdown").mouseleave(function () { 20795 pageLoad = false; 20796 var scroll = (scroll = $(window).scrollTop()); 20797 // if (scroll <= 50) { 20798 // $('#header-part') 20799 // .parent() 20800 // .closest(".gshomepage-tophead") 20801 // .removeClass("sticky-banner"); 20802 // $(".sticky-header").css("top", "0px"); 20803 // $(".gs-navbarDropmenu").removeClass("sticky-header"); 20804 // } 20805 $(this).removeClass("showDropdown"); 20806 $(this).find(".nav-link.dropdown-toggle.navbar-dropdown").attr("aria-expanded", "false"); 20807 if ($(window).width() >= 1023) { 20808 $(this) 20809 .find(".dropdown-menu") 20810 .css({ visibility: "hidden", opacity: "0" }); 20811 } 20812 }); 20813 20814 $("#navbarSupportedContent .dropdown").mouseenter(function () { 20815 var currentURL = window.location.href; 20816 var pagename = currentURL.split("/").pop(); 20817 var hoverURL = $(this).find("a:first").attr("href"); 20818 var hovername = hoverURL.split("/").pop(); 20819 20820 if (pagename == hovername && pageLoad) { 20821 pageLoad = false;
20822 $(this).removeClass("showDropdown"); 20823 $(this).find(".nav-link.dropdown-toggle.navbar-dropdown").attr("aria-expanded", "false"); 20824 $(this) 20825 .find(".dropdown-menu") 20826 .css({ visibility: "hidden", opacity: "0" }); 20827 } else { 20828 if ( 20829 !$(".search-group").is(":visible") && 20830 !$(".find-A-Council").is(":visible") 20831 ) { 20832 setTimeout(() => { 20833 var hasShowClass = $("#navbarSupportedContent").find(".dropdown").hasClass("showDropdown"); 20834 if(hasShowClass){ 20835 20836 var eleWithClass = $("#navbarSupportedContent").find(".showDropdown"); 20837 $(eleWithClass).removeClass("showDropdown"); 20838 $(eleWithClass).find(".nav-link.dropdown-toggle.navbar-dropdown").attr("aria-expanded", "false"); 20839 $(eleWithClass).find(".dropdown-menu").css({"visibility":"hidden", "opacity":"0"}); 20840 20841 } 20842 if($(this).is(':hover')){ 20843 $(this).addClass("showDropdown"); 20844 $(this).find(".nav-link.dropdown-toggle.navbar-dropdown").attr("aria-expanded", "true"); 20845 $(this) 20846 .find(".dropdown-menu") 20847 .css({ visibility: "visible", opacity: "1" });} 20848 }, 500); 20849 } 20850 } 20851 }); 20852 $("#navbarSupportedContent .dropdown .dropdown-menu").mouseover(function () { 20853 $(this).addClass("showDropdown"); 20854 $(this).find(".nav-link.dropdown-toggle.navbar-dropdown").attr("aria-expanded", "true"); 20855 }); 20856 $("#navbarSupportedContent .dropdown").on("keyup", function (event) { 20857 if (event.key === "Tab") { 20858 var hasShowClass = $("#navbarSupportedContent") 20859 .find(".dropdown") 20860 .hasClass("showDropdown"); 20861 if (hasShowClass) { 20862 var eleWithClass = $("#navbarSupportedContent").find(".showDropdown"); 20863 $(eleWithClass).removeClass("showDropdown"); 20864 $(eleWithClass).find(".nav-link.dropdown-toggle.navbar-dropdown").attr("aria-expanded", "false"); 20865 $(eleWithClass) 20866 .find(".dropdown-menu") 20867 .css({ visibility: "hidden", opacity: "0" }); 20868 } 20869 $(this).addClass("showDropdown"); 20870 $(this).find(".nav-link.dropdown-toggle.navbar-dropdown").attr("aria-expanded", "true"); 20871 $(this) 20872 .find(".dropdown-menu") 20873 .css({ visibility: "visible", opacity: "1" }); 20874 20875 var lastDropdownEle = $("#navbarSupportedContent .dropdown") 20876 .last() 20877 .hasClass("showDropdown"); 20878 if (lastDropdownEle) { 20879 var eleWithClass = $("#navbarSupportedContent").find(".showDropdown"); 20880 var dropdownMenuEle = $(eleWithClass).find(".dropdown-menu"); 20881 var isLastEleFocused = $(dropdownMenuEle) 20882 .find(".gs-menuImg a") 20883 .is(":focus"); 20884 if (isLastEleFocused) { 20885 var lastFocusedEle = $(dropdownMenuEle).find(".gs-menuImg a"); 20886 $(lastFocusedEle).bind("keydown", function (e) { 20887 if (e.key === "Tab") { 20888 $(eleWithClass).removeClass("showDropdown"); 20889 $(eleWithClass).find(".nav-link.dropdown-toggle.navbar-dropdown").attr("aria-expanded", "false"); 20890 $(eleWithClass) 20891 .find(".dropdown-menu") 20892 .css({ visibility: "hidden", opacity: "0" }); 20893 } 20894 }); 20895 } 20896 } 20897 } 20898 }); 20899 20900 $("#navbarSupportedContent .dropdown .dropdown-menu a").on( 20901 "keyup", 20902 function (event) { 20903 if (event.key === "Tab") { 20904 $("#navbarSupportedContent .dropdown .dropdown-menu ul li a") 20905 .find("span") 20906 .css("cssText", "color: #000000 !important;"); 20907 var hasFocused = 20908 $("#navbarSupportedContent .dropdown .dropdown-menu") 20909 .find("span") 20910 .css("color") === "rgb(0, 180, 81)"; 20911 20912 if (hasFocused) { 20913 var x = $("#navbarSupportedContent .dropdown .dropdown-menu") 20914 .find("span") 20915 .filter(function () { 20916 return $(this).css("color") == "rgb(0, 180, 81)"; 20917 }); 20918 $(x).css("cssText", "color: #000000 !important;"); 20919 } 20920 20921 $(this).find("span").css("cssText", "color: #00b451 !important;"); 20922 } 20923 } 20924 ); 20925 20926 $("#navbarSupportedContent .dropdown .dropdown-menu ul li a").on( 20927 "keyup", 20928 function (event) { 20929 if (event.key === "Tab") { 20930 $("#navbarSupportedContent .dropdown .dropdown-menu a") 20931 .find("span") 20932 .css("cssText", "color: #000000 !important;"); 20933 var focusedEle = $( 20934 "#navbarSupportedContent .dropdown .dropdown-menu ul li" 20935 ) 20936 .find("span") 20937 .filter(function () { 20938 return $(this).css("color") == "rgb(0, 180, 81)"; 20939 }); 20940 20941 if (focusedEle.css("color") == "rgb(0, 180, 81)") { 20942 var x = $("#navbarSupportedContent .dropdown .dropdown-menu ul li") 20943 .find("span") 20944 .filter(function () { 20945 return $(this).css("color") == "rgb(0, 180, 81)"; 20946 }); 20947 $(x).css("cssText", "color: #000000 !important;"); 20948 } 20949 20950 $(this).find("span").css("cssText", "color: #00b451 !important;"); 20951 } 20952 } 20953 ); 20954 20955 $("#navbarSupportedContent .dropdown .navbar-dropdown").on("keydown", function (event) { 20956 const $dropdown = $(this).closest(".dropdown"); 20957 if (event.key === "Tab") { 20958 return; 20959 } 20960 if ( event.key === "Enter" || event.key === " " || event.key === "ArrowDown" ) { 20961 event.preventDefault(); 20962 var hasShowClass = $("#navbarSupportedContent").find(".dropdown").hasClass("showDropdown"); 20963 if (hasShowClass) { 20964 var eleWithClass = $("#navbarSupportedContent").find(".showDropdown"); 20965 $(eleWithClass).removeClass("showDropdown"); 20966 $(eleWithClass).find(".nav-link.dropdown-toggle.navbar-dropdown").attr("aria-expanded", "false"); 20967 $(eleWithClass).find(".dropdown-menu").css({ visibility: "hidden", opacity: "0" }); 20968 } 20969 $dropdown.addClass("showDropdown"); 20970 $dropdown.find(".nav-link.dropdown-toggle.navbar-dropdown").attr("aria-expanded", "true"); 20971 $dropdown.find(".dropdown-menu").css({ visibility: "visible", opacity: "1"}); 20972 return; 20973 } 20974 if (event.key === "Escape") { 20975 event.preventDefault(); 20976 $dropdown.removeClass("showDropdown"); 20977 $dropdown.find(".nav-link.dropdown-toggle.navbar-dropdown").attr("aria-expanded", "false"); 20978 $dropdown.find(".dropdown-menu").css({visibility: "hidden", opacity: "0"}); 20979 $(this).focus(); 20980 } 20981}); 20982$("#navbarSupportedContent .navbar-dropdown").on("focus", function () { 20983 const currentDropdown = $(this).closest(".dropdown"); 20984 $("#navbarSupportedContent .dropdown.showDropdown").each(function () { 20985 if (!$(this).is(currentDropdown)) { 20986 $(this).removeClass("showDropdown"); 20987 $(this).find(".nav-link.dropdown-toggle.navbar-dropdown").attr("aria-expanded", "false"); 20988 $(this).find(".dropdown-menu").css({ visibility: "hidden", opacity: "0" }); 20989 } 20990 }); 20991}); 20992 20993 /** keyboard navigation trigger ends here */ 20994 20995 /*** Grid Component JS Starts ***/ 20996 20997 $(".grid-comp").each(function () { 20998 var $gridComp = $(this); 20999 var $gridClasses = $gridComp.find(".row > .gridClass"); 21000 // Merge multiple gridClass wrappers 21001 if ($gridClasses.length > 1) { 21002 var $first = $gridClasses.first(); 21003 $first.attr("class", "gridClass"); 21004 $gridClasses.not($first).each(function () { 21005 $first.append($(this).children()); 21006 }); 21007 $gridClasses.not($first).remove(); 21008 } 21009 21010 // Keep only the first direct child (your existing functionality) 21011 $gridComp.find(".gridClass").each(function () { 21012 $(this).children(":not(:first)").remove(); 21013 }); 21014 var $row = $gridComp.find(".row"); 21015 var $items = $gridComp.find(".gridClass > div > .aem-Grid").first().children(); 21016 21017 // Ensure default data attributes exist 21018 var blockLarge = $row.attr("data-blocklargeval") || "4"; 21019 var blockMedium = $row.attr("data-blockmediumval") || "2"; 21020 var blockSmall = $row.attr("data-blocksmallval") || "1"; 21021 21022 // Set them back on the row 21023 $row.attr("data-blocklargeval", blockLarge); 21024 $row.attr("data-blockmediumval", blockMedium); 21025 $row.attr("data-blocksmallval", blockSmall); 21026 21027 // Block count logic 21028 var blocksChosen; 21029 if ($(window).width() >= 1024) { 21030 blocksChosen = $row.attr("data-blocklargeval"); 21031 } else if ($(window).width() > 767) { 21032 blocksChosen = $row.attr("data-blockmediumval"); 21033 } else { 21034 blocksChosen = $row.attr("data-blocksmallval"); 21035 } 21036 $items.removeClass("two three four five six seven greaterthanseven"); 21037 switch (blocksChosen) { 21038 case "2": $items.addClass("two"); break; 21039 case "3": $items.addClass("three"); break; 21040 case "4": $items.addClass("four"); break; 21041 case "5": $items.addClass("five"); break; 21042 case "6": $items.addClass("six"); break; 21043 case "7": $items.addClass("seven"); break; 21044 default: 21045 if (parseInt(blocksChosen, 10) > 7) { 21046 $items.addClass("greaterthanseven"); 21047 } 21048 } 21049 21050 // Add responsive classes 21051 var classes = [ 21052 $gridComp.find(".desktopClass").val(), 21053 $gridComp.find(".tabletClass").val(), 21054 $gridComp.find(".mobileClass").val(), 21055 $gridComp.find(".smalldeviceClass").val()
21056 ].filter(Boolean).join(" "); 21057 $items.addClass(classes); 21058 21059 // Padding logic 21060 var paddingVal = $gridComp.parent().find(".removePadding-grid").val(); 21061 if (paddingVal === "true" || $(window).width() < 768) { 21062 $items.css("padding", "0"); 21063 } else { 21064 $items.css("padding", "20px 10px"); 21065 } 21066 }); 21067 21068 /****Grid Component JS Ends**************/ 21069 /****Email SignUP JS Starts****/ 21070 /* email validation*/ 21071 $("#emailForm").submit(function () { 21072 var a = $("#signUpEmail").val(); 21073 var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/; 21074 if (a == "") { 21075 $(".errormsg") 21076 .html("Please enter your email address.") 21077 .css("color", "red"); 21078 $(".textfield").css("border", "2px solid red"); 21079 return false; 21080 } else if (a.indexOf("@") < 0) { 21081 $(".errormsg") 21082 .html("Please include the '@' in the email address.") 21083 .css("color", "red"); 21084 $(".textfield").css("border", "2px solid red"); 21085 return false; 21086 } else if (a.indexOf(".") < 0) { 21087 $(".errormsg") 21088 .html("Please include the '.' (dot) in the email address.") 21089 .css("color", "red"); 21090 $(".textfield").css("border", "2px solid red"); 21091 return false; 21092 } else if (regex.test(a) == false) { 21093 $(".errormsg").html("Please enter a valid email id.").css("color", "red"); 21094 $(".textfield").css("border", "2px solid red"); 21095 return false; 21096 } else { 21097 var checkbox = $("#signUpNewTab").val(); 21098 var centralUrl = $("#signUpCenterUrl").val(); 21099 21100 if (checkbox == "false") { 21101 $("#emailForm").addClass("hide"); 21102 $("#signUpLabel").addClass("hide"); 21103 $("#signUpThankYou").addClass("show"); 21104 $("#emailForm").attr("action", centralUrl); 21105 // event.preventDefault(false); 21106 } else { 21107 $("#emailForm").addClass("hide"); 21108 $("#signUpLabel").addClass("hide"); 21109 $("#signUpThankYou").removeClass("hide"); 21110 $("#signUpThankYou").addClass("show"); 21111 $("#emailForm").attr("action", centralUrl); 21112 } 21113 } 21114 }); 21115 21116 /*****Email SignUP JS Ends*****/ 21117 21118 /** Video component**/ 21119 if ($(".video-component").length > 0) { 21120 $(".video-component").each(function () { 21121 var author_url = $(this).find(".videoUrl").val(); 21122 if(author_url) 21123 author_url = author_url.indexOf("?si=")>-1 ? author_url.split("?si=")[0] : author_url; 21124 if (author_url != undefined) { 21125 var seg = author_url.split("/"); 21126 var len = seg.length; 21127 var video_id_array = seg[len - 1]; 21128 var embed_link; 21129 if(seg[2].indexOf("youtube") > 0 || seg[2] === "youtu.be") { 21130 var indexof_equals = video_id_array.indexOf("=") + 1; 21131 var indexof_and = video_id_array.indexOf("&"); 21132 if (indexof_equals > 0) { 21133 video_id_array = video_id_array.substring( 21134 indexof_equals, 21135 indexof_and > 0 ? indexof_and : video_id_array.length 21136 ); 21137 } else { 21138 video_id_array = video_id_array; 21139 } 21140 } else { 21141 21142 var video = new URL(author_url).pathname; 21143 video_id_array = video.split("/")[1]+"?h="+video.split("/")[2] 21144 } 21145 embed_link = apppend(video_id_array, seg, author_url); 21146 $(this).find(".video-link").attr("src", embed_link); 21147 } 21148 }); 21149 21150 function apppend(video_id, host_name, author_url) { 21151 var ytbe_url = "https://www.youtube.com/embed/"; 21152 var vim_url = "https://player.vimeo.com/video/"; 21153 21154 if (host_name[2] == "www.youtube.com" || host_name[2] == "youtu.be") { 21155 var gen_embed_url = ytbe_url.concat(video_id); 21156 var apnd = "?rel=0&enablejsapi=1"; 21157 gen_embed_url = gen_embed_url.concat(apnd); 21158 return gen_embed_url; 21159 } else if ( 21160 host_name[2] == "vimeo.com" 21161 ) { 21162 var gen_embed_url = vim_url.concat(video_id); 21163 return gen_embed_url; 21164 } 21165 21166 else 21167 { 21168 var gen_embed_url = author_url; 21169 return gen_embed_url; 21170 } 21171 } 21172 } 21173 /** Video component**/ 21174 21175 /******secondary navigation */ 21176 if ($(".sec-nav-cont").length == 0) { 21177 $(".gs-sec-navigation").addClass("bkgwhite"); 21178 } 21179 $(".nav-dropdown-icon").click(function () { 21180 if ( 21181 $(this).children("img").attr("src") == 21182 "/content/dam/gsusa-redesign/dropdown-arrow.png" 21183 ) { 21184 $(this) 21185 .children("img") 21186 .attr("src", "/content/dam/gsusa-redesign/cross-focus.png"); 21187 $(this).addClass("closed"); 21188 } else { 21189 $(this) 21190 .children("img") 21191 .attr("src", "/content/dam/gsusa-redesign/dropdown-arrow.png"); 21192 $(this).removeClass("closed"); 21193 } 21194 $(".sec-nav-list").toggle(); 21195 }); 21196 /**** secondary naviation*** */ 21197 21198 /* After clicking the item, the floating menu should close */ 21199 $(".floating-menu-items a").click(function () { 21200 $(".flt-menu-close,.flt-menu-open,.floating-menu-items").toggle(); 21201 $(".flt-menu-ovelay").toggle(); /*close overlay*/ 21202 $("body").removeClass("disableScroll_gs"); 21203 }); 21204 21205 /* To make hamburger response fast */ 21206 $(".gs-navbarDropmenu .navbar-toggler").click(function () { 21207 $("#navbarSupportedContent").toggleClass("fast"); 21208 }); 21209 /******To add the chosen value in council results page******** */ 21210 21211 // $(".cf-state").change(function () { 21212 // var selVal = $(".cf-state option:selected").text(); 21213 // sessionStorage.setItem("SelItem", selVal); 21214 // }); 21215 // $(".cf-council-name").change(function () { 21216 // var selVal = $(".cf-council-name option:selected").text(); 21217 // sessionStorage.setItem("SelItem", selVal); 21218 // }); 21219 // $(".cf-zipcode").change(function () { 21220 // var selVal = $(this).val(); 21221 // sessionStorage.setItem("SelItem", selVal); 21222 // }); 21223 setTimeout(() => { 21224 var selItem = sessionStorage.getItem("SelItem"); 21225 $(".cfOptionChosen").text(selItem); 21226 }, 1000); 21227 /******To add the chosen value in council results page END ******** */ 21228 21229 /****** common methods used for form submission START******** */ 21230 bindButtonForms(); 21231 function bindButtonForms() { 21232 "use strict"; 21233 //Detect ipad 21234 var touchOrClick = navigator.userAgent.match(/iPad/i) 21235 ? "touchstart" 21236 : "click"; 21237 21238 $(document).on(touchOrClick, function (event) { 21239 var target = $(event.target), 21240 form = target.closest(".button-form-target.open").length, 21241 button = target.is(".button-form"); 21242 21243 // Close all other open forms, including when clicking on a button 21244 if (!form) { 21245 //console.log("clicked outside form"); 21246 $(".button-form-target.open").removeClass("open").addClass("hide"); 21247 } 21248 /* 21249 if (form) { 21250 console.log("clicked form"); 21251 } 21252 */ 21253 // Open child form 21254 if (button) { 21255 //console.log("clicked button"); 21256 target 21257 .find(".button-form-target.hide") 21258 .removeClass("hide") 21259 .addClass("open"); 21260 target.find("input[type='text']").focus(); 21261 } 21262 }); 21263 } 21264 var boundHashForms = {}; 21265 21266 function bindSubmitHash(form) { 21267 "use strict"; 21268 // Check if form exists and ensure a single form binding 21269 21270 if (boundHashForms[form.formElement] || !$(form.formElement)) { 21271 return false;
21272 } 21273 boundHashForms[form.formElement] = true; 21274 21275 $(form.formElement).submit(function (event) { 21276 // Stop other events 21277 if (event.preventDefault) { 21278 event.preventDefault(); 21279 } else { 21280 event.stop(); 21281 } 21282 event.returnValue = false; 21283 event.stopPropagation(); 21284 21285 var hashElement = $(this).find(form.hashElement), 21286 hash = hashElement.val(), 21287 pattern = hashElement.attr("pattern") || false, 21288 match = !pattern || (pattern && hash.match(pattern)); 21289 21290 // Prevent double submit on redirect and invalid data (if a pattern is specified) 21291 if (form.submitted || !match) { 21292 return false; 21293 } 21294 21295 // Do ajax request instead of redirect 21296 if (form.ajax) { 21297 if (form.edit) { 21298 alert("This tool can only be used on a live page"); 21299 return false; 21300 } 21301 $.ajax({ 21302 method: form.ajax.method || "POST", 21303 url: form.ajax.url || "", 21304 data: form.ajax.data || $(this).serialize(), 21305 async: form.ajax.async || false, 21306 success: form.ajax.success || function () {}, 21307 }); 21308 return false; 21309 } 21310 21311 // Redirect to the results page while maintaining query 21312 if (form.currentUrl == form.redirectUrl) { 21313 location.hash = hash; 21314 window.location.reload(); 21315 } else { 21316 window.location = 21317 form.redirectUrl + 21318 ".html" + 21319 (window.location.search != "" ? window.location.search : "?") + 21320 "#" + 21321 hash; 21322 } 21323 21324 form.submitted = true; 21325 return false; 21326 }); 21327 } 21328 /****** common methods used for form submission END******** */ 21329 /******Text and image********/ 21330 /* $(window).on('load', function(){ 21331 var WidthOfImage = $(".textandimage .text-image img").width(); 21332 var WidthOfImageComp = $(".ImageWrapper img").width(); 21333 $(".textandimage .text-image").css("width", WidthOfImage); 21334 $(".image_container").css("width", WidthOfImageComp); 21335 });*/ 21336 /******Text and image********/ 21337 21338 /****Accordian***/ 21339 21340 var windowHeight = $(window).height(); 21341 21342 /* Utility functions*/ 21343 function vScrollTo(theOffsetTopValue) { 21344 var hash = window.location.hash; 21345 if (!$(hash).parent().parent().hasClass("multi_expansion_accordian")) 21346 $(hash).removeClass("show"); 21347 $(hash).prev().addClass('collapsed'); 21348 if ( 21349 !theOffsetTopValue && 21350 hash && 21351 hash.indexOf("$$$") == -1 && 21352 $(hash).position() !== undefined 21353 ) { 21354 setTimeout(() => { 21355 $('html, body').animate({ 21356 scrollTop: $(hash)?.offset()?.top - 150 21357 }, 1000); 21358 }, 400); 21359 } else { 21360 setTimeout(() => { 21361 let headerHeight = $("#article-header-Nav").length == 0 ? ($("#header-part").height() + 20) : ($("#article-header-Nav").height() + 20) 21362 if (pageLoad || scrollOnLinkClick) { 21363 $(hash).addClass("show"); 21364 setTimeout(() => { 21365 $('html, body').animate({ 21366 scrollTop: ( $(hash).prev().offset() && !( $(hash).prev().offset().top === 0 && $(hash).prev().offset().left === 0)) 21367 ? ($(hash).prev().offset().top - headerHeight) : ($(hash).offset().top - headerHeight) 21368 }, 1000); 21369 }, 400); 21370 } 21371 if(accordionClick && !pageLoad) { 21372 let timeout = 400; 21373 setTimeout(() => { 21374 $('html, body').animate({ 21375 scrollTop: $(accordionId).prev().offset().top - headerHeight 21376 }, 1000); 21377 },timeout) 21378 accordionClick = false; 21379 } 21380 }, 400) 21381 } 21382 } 21383 if ($(window).width() < 1023) { 21384 var heightOfHeader = $(".gs-navbarDropmenu").height() + 50; 21385 } else { 21386 var heightOfHeader = $(".gs-navbarDropmenu").height() + 15; 21387 } 21388 21389 function OnOpenExpandAccordian() { 21390 /* var pageURL = window.location.href; // Code to get the current page's full URL including the id - '#'*/ 21391 let selectorFromPageID = window.location.hash; 21392 selectorFromPageID = selectorFromPageID.split("$$$")[0]; 21393 if (!selectorFromPageID) { 21394 return; 21395 } 21396 const selectedElement = $(selectorFromPageID); 21397 const accordianTitleDivSelector = 21398 selectedElement.closest(".accordian_item"); 21399 let selectedElementsParents = selectedElement.parents(".accordian_item"); 21400 if (selectedElementsParents.length > 1) {
21401 $(selectedElementsParents.last().children()[0]).removeClass("collapsed"); 21402 $(selectedElementsParents.last().children()[1]).addClass("show"); 21403 } 21404 selectedElement 21405 .parent() 21406 .find(".accordian_item_wrapper") 21407 .removeClass("collapsed"); 21408 selectedElement.addClass("show"); 21409 let selectedItemcontent = selectedElement.parents( 21410 ".accordian_item_content" 21411 ); 21412 if (selectedItemcontent.length >= 1) { 21413 $(selectedItemcontent.parent(".collapse")).addClass("show"); 21414 selectedElement 21415 .parents(".accordian_item") 21416 .find(".accordian_item_wrapper") 21417 .removeClass("collapsed"); 21418 } 21419 openAccordian(accordianTitleDivSelector, true); 21420 } 21421 21422 $(".accordian_item_wrapper").on("click", function (e) { 21423 "use strict"; 21424 scrollOnLinkClick = false; 21425 if(!$(this).next().hasClass('show')) 21426 accordionClick = true; 21427 accordionId = "#"+$(this).next().attr("id"); 21428 for(let i=0;i<iframeArr.length; i++) { 21429 $("iframe")[i].style.height = iframeArr[i]; 21430 } 21431 if (accordionId != window.location.hash || pageLoad){ 21432 openAccordian(this, true); 21433 } 21434 else if (!$(this).next().hasClass("show")){ 21435 let headerHeight = $("#article-header-Nav").length == 0 ? ($("#header-part").height() + 20) : ($("#article-header-Nav").height() + 20) 21436 setTimeout(() => { 21437 $('html, body').animate({ 21438 scrollTop: $(this).offset().top - headerHeight 21439 }, 1000); 21440 },1000) 21441 } 21442 }); 21443 21444 // OnOpenExpandAccordian(); 21445 /* if(sessionStorage.getItem("firstLoad")){ 21446 OnOpenExpandAccordian(); 21447}else{ 21448var hash = window.location.hash; 21449//$(hash).parent().find('.accordian_item_wrapper').removeClass("collapsed"); 21450// $(hash).addClass("show"); 21451 $('html, body').animate({scrollTop: $(hash).offset().top}, 500); 21452}*/ 21453 21454 /** Generating Random ID ***/ 21455 $(".accordian_item").each(function () { 21456 if ($(this).children(".accordian_item_wrapper").attr("href") == "#") { 21457 var RandomId = Math.random().toString(36).substr(2, 9); 21458 $(this) 21459 .children(".accordian_item_wrapper") 21460 .attr("href", "#" + RandomId); 21461 $(this) 21462 .children(".accordian_item_wrapper") 21463 .attr("aria-controls", RandomId); 21464 $(this).children(".collapse").attr("id", RandomId); 21465 } 21466 }); 21467 21468 /* URL Based accordian 21469 OnClick Accordian open/close toggle - bootstrap classing (toggle 'collapsed' & 'collapse show') 21470 Sliding of the accordian to the top / ~ 135px from the top (because there is a header area at the top on scroll) 21471 - OnClick 21472 - URL accessing 21473 single expansion - bootstrap classing (toggle data-parent OR adding respective classname to the div with classname : 'accordian_list' ) */ 21474 21475 /****Accordian Ends***********/ 21476 21477 /********core form text - Email validation****************** */ 21478 $(".formText").each(function () { 21479 $(".formText .form-text input[type=email]").keyup(function () { 21480 var a = $(this).val(); 21481 var regex = 21482 /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/; 21483 if (a == "" && $(".form-text .emailvalid.required").length == 0) { 21484 $(this) 21485 .siblings(".helperText") 21486 .html("Please fill this field.") 21487 .css("color", "#E31C3D"); 21488 $(this).addClass("emailvalid"); 21489 $(this).siblings(".emailhelpmsg").css("display", "none"); 21490 } else if (a.indexOf("@") < 0) { 21491 $(this) 21492 .siblings(".helperText") 21493 .html("Please include the '@' in the email address.") 21494 .css("color", "#E31C3D"); 21495 $(this).addClass("emailvalid"); 21496 $(this).siblings(".emailhelpmsg").css("display", "none"); 21497 } else if (a.indexOf(".") < 0) { 21498 $(this) 21499 .siblings(".helperText") 21500 .html("Please include the '.' (dot) in the email address.") 21501 .css("color", "#E31C3D"); 21502 $(this).addClass("emailvalid"); 21503 $(this).siblings(".emailhelpmsg").css("display", "none"); 21504 } else if (regex.test(a) == false) { 21505 $(this) 21506 .siblings(".helperText") 21507 .html("Please enter a valid email id.") 21508 .css("color", "#E31C3D"); 21509 $(this).addClass("emailvalid"); 21510 $(this).siblings(".emailhelpmsg").css("display", "none"); 21511 } else { 21512 $(this).removeClass("emailvalid"); 21513 var helpmsg = $(this).siblings(".helperText").attr("value"); 21514 21515 $(this).siblings(".helperText").html(helpmsg).css("color", "#5B616B"); 21516 $(this).siblings(".emailhelpmsg").css("display", "none"); 21517 } 21518 }); 21519 }); 21520 /********core form text - Email validation ends****************** */ 21521 /****council finder alignment of update location in mobile *****/ 21522 $(window).on("load resize", function () { 21523 if ($(window).width() < 768) { 21524 $(".resultsHwrap .cf-update-location").appendTo(".resultsHwrap p"); 21525 } 21526 }); 21527 /****council finder alignment of update location in mobile *****/ 21528 /******* Document ready Ends ******/ 21529 21530 // New for Open Accordian click 21531 21532 function openAccordian(obj, isreload) { 21533 const currentlyClickedElement = obj; 21534 if ( 21535 $($(currentlyClickedElement).children()[0]).hasClass("collapsed") || 21536 isreload 21537 ) { 21538 /*Checking for single-expansion-accordian *by checking reverse of "multi_expansion_accordian".*/ 21539 const parentOfCurrentElement = $(obj).parent(); 21540 const isMultiExpansionAccordian = $(parentOfCurrentElement).hasClass( 21541 "multi_expansion_accordian" 21542 ); 21543 if (!isMultiExpansionAccordian) { 21544 const childrenOfParentElement = parentOfCurrentElement.children(); 21545 const offsetOfFirstElement = 21546 childrenOfParentElement.length && 21547 childrenOfParentElement[0].offsetTop; 21548 /* Checking if all the accordian_items in the accordian_list are at the same height, i.e. row based accordian*/ 21549 let areAllChildrenAtSameOffset = true; 21550 childrenOfParentElement.length && 21551 childrenOfParentElement.each(function (currentIndex, currentElement) { 21552 if (currentElement.offsetTop !== offsetOfFirstElement) 21553 areAllChildrenAtSameOffset = false;
21554 }); 21555 if (childrenOfParentElement.length > 1) { 21556 $(childrenOfParentElement).each(function (index, element) { 21557 if ( 21558 element === currentlyClickedElement || 21559 element === currentlyClickedElement[0] 21560 ) { 21561 if (index === 0) { 21562 const offsetTopValue = $(element).offset().top - heightOfHeader; 21563 vScrollTo(offsetTopValue); 21564 } else { 21565 if (!areAllChildrenAtSameOffset) { 21566 /* Scrolling calculation if all the siblings have different offset, i.e. if all the siblings are stacked instead of side-by-side as in a flex container.*/ 21567 const offsetTopValue = 21568 $(childrenOfParentElement[0]).offset().top + 21569 78 * index - 21570 heightOfHeader; 21571 vScrollTo(offsetTopValue); 21572 } else { 21573 const offsetTopValue = 21574 $(childrenOfParentElement[index - 1]).offset().top - 21575 heightOfHeader; 21576 vScrollTo(offsetTopValue); 21577 } 21578 } 21579 } 21580 }); 21581 } else { 21582 const offsetTopValue = $(obj).length 21583 ? $(obj).offset().top - heightOfHeader 21584 : 0; 21585 vScrollTo(offsetTopValue); 21586 } 21587 } else { 21588 /* Scrolling calculation for multi_expansion_accordian*/ 21589 const offsetTopValue = 21590 $(currentlyClickedElement).offset().top - heightOfHeader; 21591 vScrollTo(offsetTopValue); 21592 } 21593 } 21594 } 21595 21596 function formUrl(id) { 21597 const url = window.location.href.split("#")[0]; 21598 history.pushState({}, null, url + id); 21599 } 21600 21601 $(document).on("click", ".homePage-card", function (e) { 21602 const link = $(this).find("a").attr("href"); 21603 if (link.charAt(0) == "#") { 21604 e.preventDefault(); 21605 scrollOnLinkClick = true; 21606 accordionClick = false; 21607 const el_id = $(this).find("a").attr("href"); 21608 formUrl(el_id); 21609 OnOpenExpandAccordian(); 21610 } 21611 else { 21612 scrollOnLinkClick = false; 21613 accordionClick = false; 21614 } 21615 }); 21616 21617 /**** ----- image alt tag -------- ****/ 21618 var images = document.querySelectorAll("img"); 21619 if (images) { 21620 for (var i = images.length - 1; i >= 0; i--) { 21621 var alt = images[i].getAttribute("alt"); 21622 if (!alt) { 21623 images[i].setAttribute("alt", " "); 21624 } 21625 } 21626 } 21627 21628 /* breadcumbs title issue */ 21629 21630 const getLinkText = $(".gs-breadcrum .breadcrumb li:last-child a").html(); 21631 const currentPageText = "current page " + getLinkText; 21632 $(".gs-breadcrum .breadcrumb li:last-child a").attr( 21633 "aria-label", 21634 currentPageText 21635 ); 21636 if($(".containercomponent").parent().find(".banner-image").length > 0) { 21637 $(".containercomponent").parent().find(".banner-image").next().attr("id", "main-content"); 21638 } 21639 else { 21640 $(".header + div").attr("id", "main-content"); 21641 } 21642 21643 /**** Floating menu */ 21644 $(".floating-menu-toggle").keypress(function (e) { 21645 var key = e.which; 21646 if (key == 13) { 21647 // the enter key code 21648 $(".floating-menu-toggle").click(); 21649 return false; 21650 } 21651 }); 21652 21653 /**** sec nav icon */ 21654 $(".nav-dropdown-icon").keypress(function (e) { 21655 var key = e.which; 21656 if (key == 13) { 21657 // the enter key code 21658 $(".nav-dropdown-icon").click(); 21659 return false; 21660 } 21661 }); 21662 21663 $(".cookie_updatelocatn").keypress(function (e) { 21664 var key = e.which; 21665 if (key == 13) { 21666 // the enter key code 21667 $(".cookie_updatelocatn").click(); 21668 return false; 21669 } 21670 }); 21671 $(".update-location-cancel").keypress(function (e) { 21672 var key = e.which; 21673 if (key == 13) { 21674 // the enter key code 21675 $(".cookiecancel").click(); 21676 return false; 21677 } 21678 }); 21679 21680 $(".cookie-close-popup-cross").keypress(function (e) { 21681 var key = e.which; 21682 if (key == 13) { 21683 // the enter key code 21684 $(".cookie-close-popup-cross").click(); 21685 return false; 21686 } 21687 }); 21688 21689 $(".skip-link").keypress(function (e) { 21690 console.log("Dd"); 21691 var key = e.which; 21692 if (key == 13) { 21693 // the enter key code 21694 $(".breadcrumb li:first-child a").focus(); 21695 $(".breadcrumb li:first-child a").attr("tabindex", "0"); 21696 return false;
21697 } 21698 }); 21699 21700 /* booth detaisl close */ 21701 $(".close-popup-icon").keypress(function (e) { 21702 var key = e.which; 21703 if (key == 13) { 21704 // the enter key code 21705 $(".close-popup-icon").click(); 21706 return false; 21707 } 21708 }); 21709 21710 $(".accordian_item_wrapper").keypress(function (e) { 21711 var key = e.which; 21712 if (key == 13) { 21713 // the enter key code 21714 $(this).click(); 21715 if ($(this).hasClass("collapsed")) { 21716 $(this).attr("aria-label", "collapsed"); 21717 } else { 21718 $(this).attr("aria-label", "expanded"); 21719 } 21720 21721 return false; 21722 } 21723 }); 21724 21725 if (!sessionStorage.getItem("firstLoad")) { 21726 sessionStorage.setItem("firstLoad", true); 21727 } 21728 21729 for(let i=0;i<$(".findACookie").length;i++) { 21730 if($($(".findACookie")[i]).find('#cookieExpandedVersion').val() == 'true'){ 21731 if($(window).width() > 1023){ 21732 $($(".findACookie")[i]).find('.fac_landingpage').css('height', '300px'); 21733 if(i==0) 21734 $('.containercomponent ~ div > div > .findACookie:first .fac_landingpage').css('height', '450px'); 21735 } 21736 else if($(window).width() < 1024 && $(window).width() > 767){ 21737 $($(".findACookie")[i]).find('.fac_landingpage').css('height', '260px'); 21738 if(i==0) 21739 $('.containercomponent ~ div > div > .findACookie:first .fac_landingpage').css('height', '450px'); 21740 } 21741 else { 21742 $($(".findACookie")[i]).find('.fac_landingpage').css('height', '320px'); 21743 if(i==0) 21744 $('.containercomponent ~ div > div > .findACookie:first .fac_landingpage').css('height', '320px'); 21745 } 21746 $($(".findACookie")[i]).find('.fac_squareBox').css('height', '248px'); 21747 $($(".findACookie")[i]).find('.fac_input_cont').show(); 21748 $($(".findACookie")[i]).find('.close-img-fac').show(); 21749 $($(".findACookie")[i]).find('.down-arrow-black').hide(); 21750 } else{ 21751 $($(".findACookie")[i]).find('.fac_landingpage').css('height', '100px'); 21752 if($(window).width() > 1023){ 21753 $($(".findACookie")[i]).find('.fac_landingpage').css('height', '100px'); 21754 } 21755 else { 21756 $($(".findACookie")[i]).find('.fac_landingpage').css('height', '60px'); 21757 } 21758 $($(".findACookie")[i]).find('.fac_squareBox').css('height', '60px'); 21759 $($(".findACookie")[i]).find('.fac_input_cont').hide(); 21760 $($(".findACookie")[i]).find('.close-img-fac').hide(); 21761 $($(".findACookie")[i]).find('.down-arrow-black').show(); 21762 } 21763 } 21764 21765 $(document).on("click", ".form-submit-main", function(e) { 21766 e.preventDefault() 21767 let phoneVal = $(this).parents("form.formElements").find(".typePhn").val()?.length; 21768 if (phoneVal > 0 && phoneVal < 14) { 21769 $('html, body').animate({ 21770 scrollTop: $(this).parents("form.formElements").find(".typePhn").offset().top - 150 21771 }, 500); 21772 } 21773 else { 21774 $(this).parents("form.formElements").submit(); 21775 } 21776 }) 21777 // Logic to set height to hidden iframe 21778 var iframeLength = $("iframe").length; 21779 for(let i=0;i<iframeLength; i++) { 21780 var height = $("iframe")[i].style.height; 21781 iframeArr.push(height); 21782 } 21783 setTimeout(() => { 21784 for(let i=0;i<iframeArr.length; i++) { 21785 $("iframe")[i].style.height = iframeArr[i]; 21786 } 21787 }, 3000); 21788 (function() { 21789 window.scrollTo(0,0) 21790 })(); 21791 //To Remove aria-hidden attribute on promotioncarousel 21792 setTimeout(() => { 21793 $(".splide__slide").each(function () { 21794 $(this).removeClass("is-visible"); 21795 $(this).removeAttr("aria-hidden"); 21796 }); 21797 }, 500); 21798 let hpcardBtnHeightArray = []; 21799 setTimeout(() => { 21800 for(let i=0; i<$(".hpcard-link").length ;i++ ) { 21801 hpcardBtnHeightArray.push($($(".hpcard-link")[i]).height()); 21802 $($(".hpcard-link")[i]).attr("heightindex", i); 21803 } 21804 }, 1000); 21805 let cardBtnText; 21806 let btnTextArr = []; 21807 $(".hpcard-link").hover(function() { 21808 let index = $(this).attr("heightindex"); 21809 if(hpcardBtnHeightArray[index] < 55) { 21810 cardBtnText = $(this).find("span").text().trim(); 21811 btnTextArr.push(cardBtnText); 21812 if ($(this).parents(".row").children('div').length == 3) { 21813 if($(this).parents(".container").hasClass("maxwidthforgridrow")) { 21814 if(cardBtnText.length > 11 && $(window).width() > 1023) { 21815 $(this).find("span").css("transition", "none"); 21816 $(this).find("span").text(cardBtnText.substring(0,10) + "..."); 21817 } 21818 } 21819 else { 21820 if(cardBtnText.length > 16 && $(window).width() > 1023) { 21821 $(this).find("span").css("transition", "none"); 21822 $(this).find("span").text(cardBtnText.substring(0,16) + "..."); 21823 } 21824 } 21825 } 21826 else if ($(this).parents(".row").children('div').length >= 4) { 21827 if($(this).parents(".container").hasClass("maxwidthforgridrow")) { 21828 if(cardBtnText.length > 6 && $(window).width() > 1023) { 21829 $(this).find("span").css("transition", "none"); 21830 $(this).find("span").text(cardBtnText.substring(0,6) + "..."); 21831 } 21832 } 21833 else { 21834 if(cardBtnText.length > 11 && $(window).width() > 1023) { 21835 $(this).find("span").css("transition", "none"); 21836 $(this).find("span").text(cardBtnText.substring(0,11) + "..."); 21837 } 21838 } 21839 } 21840 } 21841 else { 21842 cardBtnText = $(this).find("span").text().trim(); 21843 btnTextArr.push(cardBtnText); 21844 } 21845 }, function() { 21846 $(this).find("span").text(btnTextArr[0]); 21847 btnTextArr.splice(0, 1); 21848 }); 21849 $(".skipToContent_div").css("visibility","visible"); 21850 /**** ----- Document Ready Ends -------- ****/ 21851}); 21852$(window).on('load', function() { 21853 var hash = window.location.hash; 21854 const specialChars = /[`!@$%^&*()+\=\[\]{};':"\\|,.<>\/?~]/; 21855 var checkNew = specialChars.test(hash); 21856 let headerHeight = $("#article-header-Nav").length == 0 ? ($("#header-part").height() + 20) : ($("#article-header-Nav").height() + 20) 21857 if (navigator.userAgent.toLowerCase().indexOf('firefox') === -1) { 21858 var hash = window.location.hash; 21859 const specialChars = /[`!@$%^&*()+\=\[\]{};':"\\|,.<>\/?~]/; 21860 var checkNew = specialChars.test(hash); 21861 if(checkNew){ 21862 return false;
21863 } 21864 var hash = window.location.hash; 21865 if (!$(hash).parent().parent().hasClass("multi_expansion_accordian")) { 21866 for(let i=0; i< $(hash).parents(".accordian_list").find(".accordian_item").length; i++) { 21867 if(hash != "#" +$($($(hash).parents(".accordian_list").find(".accordian_item"))[i]).children(":last").attr("id")) { 21868 $($($(hash).parents(".accordian_list").find(".accordian_item"))[i]).children(":last").removeClass("show"); 21869 $($($(hash).parents(".accordian_list").find(".accordian_item"))[i]).children(":last").removeClass('collapsed'); 21870 } 21871 } 21872 } 21873 let headerHeight = $("#article-header-Nav").length == 0 ? ($("#header-part").height() + 20) : ($("#article-header-Nav").height() + 20) 21874 if($(hash).parent().children(":first").hasClass("accordian_item_wrapper")){ 21875 $(hash).addClass("show"); 21876 setTimeout(() => { 21877 $('html, body').animate({ 21878 scrollTop: $(hash).prev().offset().top - headerHeight 21879 }, 1000); 21880 },0) 21881 } 21882 } 21883 if (navigator.userAgent.toLowerCase().indexOf('firefox') !== -1) { 21884 var hash = window.location.hash; 21885 const specialChars = /[`!@$%^&*()+\=\[\]{};':"\\|,.<>\/?~]/; 21886 var checkNew = specialChars.test(hash); 21887 if(checkNew){ 21888 return false; 21889 } 21890 var hash = window.location.hash; 21891 if (!$(hash).parent().parent().hasClass("multi_expansion_accordian")) { 21892 for(let i=0; i< $(hash).parents(".accordian_list").find(".accordian_item").length; i++) { 21893 if(hash != "#" +$($($(hash).parents(".accordian_list").find(".accordian_item"))[i]).children(":last").attr("id")) { 21894 $($($(hash).parents(".accordian_list").find(".accordian_item"))[i]).children(":last").removeClass("show"); 21895 $($($(hash).parents(".accordian_list").find(".accordian_item"))[i]).children(":last").removeClass('collapsed'); 21896 } 21897 } 21898 } 21899 let headerHeight = $("#article-header-Nav").length == 0 ? ($("#header-part").height() + 20) : ($("#article-header-Nav").height() + 20) 21900 if($(hash).parent().children(":first").hasClass("accordian_item_wrapper")){ 21901 $(hash).addClass("show"); 21902 setTimeout(() => { 21903 $('html, body').animate({ 21904 scrollTop: $(hash).prev().offset().top - headerHeight 21905 }, 1000); 21906 },0) 21907 } 21908 } 21909 if (!checkNew && hash.charAt(0) == "#" && !$(hash).hasClass("collapse")){ 21910 if($(hash).length > 0) { 21911 if(!$(hash).parent().children(":first").hasClass("accordian_item_wrapper")) { 21912 setTimeout(() => { 21913 $(hash).parents(".collapse")?.addClass("show"); 21914 $('html, body').animate({ 21915 scrollTop: $(hash).offset().top - headerHeight 21916 }, 1000); 21917 }, 0) 21918 } 21919 } 21920 } 21921 21922 //Logic to manage clip path IDs 21923 for (var i = 0; i < $("clipPath").length; i++) { 21924 let randomeNum = Math.floor((Math.random() * 100) + 1); 21925 var clipPathID = $($("clipPath")[i]).attr("id"); 21926 $($("clipPath")[i]).attr("id", clipPathID+ "-"+randomeNum); 21927 $($("clipPath")[i]).parent().next().attr("clip-path", "url(#"+clipPathID+ "-"+ randomeNum+")"); 21928 $($("clipPath")[i]).parent().next().attr("role", "img"); 21929 $($("clipPath")[i]).parent().next().children().removeAttr("id"); 21930 } 21931 21932 //Logic to manage Web to lead IDs 21933 for(let i=0; i < $("form.web-to-lead").length; i++) { 21934 $($("form.web-to-lead")[i]).attr("id", "web-to-lead-"+i); 21935 } 21936 //To Remove aria-hidden attribute on promotioncarousel 21937 setTimeout(() => { 21938 $(".splide__slide").each(function () { 21939 $(this).removeClass("is-visible"); 21940 $(this).removeAttr("aria-hidden"); 21941 }); 21942 }, 500); 21943}) 21944 $(document).ready(function () { 21945 const el = document.querySelector('.footer-btn-box') 21946 const observer = new window.IntersectionObserver(([entry]) => { 21947 if (entry.isIntersecting) { 21948 document.getElementsByClassName('floating-menu')[0].style.visibility='hidden'; 21949 return 21950 } 21951 if(document.getElementsByClassName('floating-menu').length > 0) 21952 document.getElementsByClassName('floating-menu')[0].style.visibility='visible'; 21953 }, { 21954 root: null, 21955 threshold: 0.1, // set offset 0.1 means trigger if atleast 10% of element in viewport 21956 }) 21957 observer.observe(el); 21958 21959 $('.email-signin .enteEmail').on('keydown', function() { 21960 if ($(this).val().length > 0) { 21961 $(this).nextAll('.form-clear').removeClass('d-none'); 21962 } 21963 }).on('keydown keyup', function() { 21964 if ($(this).val().length === 0) { 21965 $(this).nextAll('.form-clear').addClass('d-none'); 21966 } 21967 }); 21968 $('.form-clear').on('click', function() { 21969 $(this).addClass('d-none').prevAll(':input').val(''); 21970 $(this).addClass('d-none').prevAll(':input').focus(); 21971 $(this).prevAll('.floating-label').removeAttr("style"); 21972 $(this).prevAll('.floating-label-field').removeAttr("style"); 21973 }); 21974 21975 $("#footer-email").change(function(){ 21976 21977 var a=$('#footer-email').val(); 21978 var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/ 21979 21980 if(a==''){ 21981 $('.footer_errormsg').html("Please enter your email address.").css("color","#e31c3d"); 21982 $('.footer_errormsg').attr('tabindex', '-1'); 21983 $('.footer_errormsg').focus();
21984 $('.enteEmail').css("border","1px solid #e31c3d"); 21985 $('.footerEmailInput .floating-label').css('color','#E31C3D'); 21986 return false; 21987 } 21988 else if(a.indexOf("@")<0) 21989 { 21990 21991 $('.footer_errormsg').html("Please include an ‘@' in the email address " + " ' " + a + " ' " + " is missing an '@' . ").css("color","#e31c3d"); 21992 $('.enteEmail').css("border","1px solid #e31c3d"); 21993 $('.footerEmailInput .floating-label').css('color','#E31C3D'); 21994 return false; 21995 } 21996 else if(a.indexOf('.')<0) 21997 { 21998 $('.footer_errormsg').html("Please include an ‘.' in the email address " + " ' " + a + " ' " + " is missing an '.’ ").css("color","#e31c3d"); 21999 $('.enteEmail').css("border","1px solid #e31c3d"); 22000 $('.footerEmailInput .floating-label').css('color','#E31C3D'); 22001 return false; 22002 } 22003 else if(!regex.test(a)) 22004 { 22005 $('.footer_errormsg').html("Please enter correct email id. " + a + " is not correct. ").css("color","#e31c3d"); 22006 $('.enteEmail').css("border","1px solid #e31c3d"); 22007 $('.footerEmailInput .floating-label').css('color','#E31C3D'); 22008 return false; 22009 } 22010 else if(regex.test(a)) 22011 { 22012 $('.footer_errormsg').html(""); 22013 $('.enteEmail').css("border","1px solid #00b451"); 22014 $('.footerEmailInput .floating-label').css('color','#00b451'); 22015 } 22016 22017 }); 22018 22019$('.email-signin').submit(function(event){ 22020 22021 var me = event.target; 22022 var emailAddress = $(me).find("[name='footer-email']").val(); 22023 var corphomeValue = $(me).find("[name='CORPHOME']").val(); 22024 var a=$('#footer-email').val(); 22025 var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/ 22026 22027 if(a==''){ 22028 $('.footer_errormsg').html("Please enter your email address.").css("color","#e31c3d"); 22029 $('.footer_errormsg').attr('tabindex', '-1'); 22030 $('.footer_errormsg').focus(); 22031 $('.enteEmail').css("border","1px solid #e31c3d"); 22032 $('.footerEmailInput .floating-label').css('color','#E31C3D'); 22033 return false; 22034 } 22035 else if(a.indexOf("@")<0) 22036 { 22037 22038 $('.footer_errormsg').html("Please include an ‘@' in the email address " + " ' " + a + " ' " + " is missing an '@' . ").css("color","#e31c3d"); 22039 $('.enteEmail').css("border","1px solid #e31c3d"); 22040 $('.footerEmailInput .floating-label').css('color','#E31C3D'); 22041 return false; 22042 } 22043 else if(a.indexOf('.')<0) 22044 { 22045 $('.footer_errormsg').html("Please include an ‘.' in the email address " + " ' " + a + " ' " + " is missing an '.’ ").css("color","#e31c3d"); 22046 $('.enteEmail').css("border","1px solid #e31c3d"); 22047 $('.footerEmailInput .floating-label').css('color','#E31C3D'); 22048 return false; 22049 } 22050 else if(!regex.test(a)) 22051 { 22052 $('.footer_errormsg').html("Please enter correct email id. " + a + " is not correct. ").css("color","#e31c3d"); 22053 $('.enteEmail').css("border","1px solid #e31c3d"); 22054 $('.footerEmailInput .floating-label').css('color','#E31C3D'); 22055 return false; 22056 } 22057 else if(regex.test(a)) 22058 { 22059 $('.footer_errormsg').html(""); 22060 $('.enteEmail').css("border","1px solid #00b451"); 22061 $('.footerEmailInput .floating-label').css('color','#00b451'); 22062 } 22063 22064 22065 $.post('/includes/ajax_sendinfo_home.asp',{ 22066 email: emailAddress, 22067 CORPHOME: corphomeValue 22068 }, function(txt){ 22069 22070 if(txt.search(/OK/i) == -1) { 22071 alert('Uh-oh! We’re having difficulty processing your request right now. We’re working on the issue. Please try again later.'); 22072 22073 } else { 22074 // show thank you 22075 $(me).find("[name='footer-email']").val(''); 22076 $('.email-signin').hide(); 22077 $('#thankYou').css('display','block').html("<p>You’re set! Watch your inbox for future emails from Girl Scouts of the USA. Thank y
22077ou.</p>"); 22078 } 22079 }); 22080 22081 return false; 22082 }); 22083 }); 22084 22085 22086 22087 /** var checkbox = $("#subNewTab").val(); 22088 if(checkbox == "false") 22089 { 22090 $('#emailLable, .emailText_Mobile').addClass("hide"); 22091 $('#email').addClass("hide"); 22092 $('#scrptn').addClass("hide"); 22093 $('#thankYou').removeClass("hide"); 22094 $('#thankYou').addClass("show"); 22095 $('.footer_errormsg').addClass("hide"); 22096 $('.footerEmailInput').addClass("hide"); 22097 event.preventDefault(false); 22098 } 22099 else 22100 { 22101 var emailIdVal= $("#email").val(); 22102 var encrypted_email = btoa(emailIdVal); 22103 $("#email").val(encrypted_email); 22104 $('#emailLable, .emailText_Mobile').addClass("hide"); 22105 $('#email').addClass("hide"); 22106 $('#scrptn').addClass("hide"); 22107 $('.footerEmailInput').addClass("hide"); 22108 $('#thankYou').removeClass("hide"); 22109 $('#thankYou').addClass("show"); 22110 var centralUrl = $("#central").val(); 22111 $("#target").attr("action", centralUrl); 22112 $('.footer_errormsg').addClass("hide"); 22113 22114 } 22115 Email validation for Homepage footer Subscribe END **/ 22116 22117 22118/** form comp**/ 22119$(document).ready(function () { 22120 /*** to show state field when country is US ****/ 22121 const $country = $('#country-dropdown'); 22122 const $stateDropdown = $('#state-dropdown'); 22123 22124 // --- Handle initial load --- 22125 if ($country.length == 0 && $stateDropdown.length > 0) { 22126 if (!$('input[name="country_code"]').length) { 22127 $('<input>', { 22128 type: 'hidden', 22129 name: 'country_code', 22130 value: 'US' // default country code 22131 }).appendTo('form'); 22132 } 22133 $stateDropdown.closest('.form-options-dropdown').show(); 22134 $stateDropdown.prop('disabled', false); 22135 $stateDropdown.closest('.bootstrap-select') 22136 .removeClass('disabled') // remove 'disabled' class from wrapper 22137 .find('.dropdown-toggle') // find the generated <button> 22138 .removeClass('disabled') 22139 .attr('aria-disabled', 'false'); 22140 } else { 22141 $stateDropdown.closest('.form-options-dropdown').show(); 22142 $stateDropdown.prop('disabled', false); 22143 } 22144 // --- Handle country change --- 22145 $(document).on('change', '#country-dropdown', function () { 22146 const $form = $(this).closest('.formElements'); 22147 const $stateDropdown = $form.find('#state-dropdown'); // select element 22148 22149 if (this.value === 'US') { 22150 $stateDropdown.closest('.form-options-dropdown').show(); 22151 $stateDropdown.prop('disabled', false); 22152 $stateDropdown.closest('.bootstrap-select') 22153 .removeClass('disabled') // remove 'disabled' class from wrapper 22154 .find('.dropdown-toggle') // find the generated <button> 22155 .removeClass('disabled') 22156 .attr('aria-disabled', 'false'); 22157 } else { 22158 $stateDropdown.closest('.form-options-dropdown').hide(); 22159 $stateDropdown.prop('disabled', true); 22160 } 22161 }); 22162 22163 22164 $.each($('.formText'), function(ind) { 22165 $(this).attr('id', 'formlist-' + parseInt(ind + 1)); 22166 var el_id = $(this).attr("id"); 22167 22168 $('.floating-label-wrap .floating-label-field').keyup(updateStyle); 22169 $('.floating-label-wrap .floating-label-field').keydown(updateStyle); 22170 var filedtype = $(`#${el_id} .floating-label-wrap .floating-label-field`).attr("type"); 22171 22172 22173 22174 if ($( `#${el_id} #showcharcount`).val() == true || $( `#${el_id} #showcharcount`).val() == 'true') { 22175 22176 if(filedtype == "date"){ 22177 $(`#${el_id} .charCounter`).css({"display":"none"}); 22178 } 22179 else{ 22180 $(`#${el_id} .charCounter`).css({"display":"block"}); 22181 } 22182 22183 } 22184 else{ 22185 $(`#${el_id} .charCounter`).css({"display":"none"}); 22186 } 22187 22188 22189 $('.form-clear').click(removeCouter) 22190 22191 22192 function updateStyle() { 22193 var cs = $(`#${el_id} .floating-label-wrap .floating-label-field`).val().length; 22194 var mxl = Number($(`#${el_id} .floating-label-wrap .floating-label-field`).attr("maxlength")); 22195 22196 22197 var showcharcount = false 22198 if ($( `#${el_id} #showcharcount`).val() == true || $( `#${el_id} #showcharcount`).val() == 'true') { 22199 showcharcount = true; 22200 $(`#${el_id} .floating-label-wrap .floating-label-field`).siblings(`#${el_id} .charCounter`).text(cs + "/" + mxl); 22201 if (cs > 0 && cs < mxl) { 22202 22203 $(`#${el_id} .floating-label-wrap .floating-label-field`).siblings(`#${el_id} .charCounter`).css({"display": "block","font-weight": "bold","color": "rgb(91, 97, 107)"}); 22204 } 22205 else if (cs == mxl) { 22206 $(`#${el_id} .floating-label-wrap .floating-label-field`).siblings(`#${el_id} .charCounter`).css('color','red'); 22207 22208 } 22209 if(filedtype == "date"){ 22210 $(`#${el_id} .charCounter`).css({"display":"none"}); 22211 } 22212 else{ 22213 $(`#${el_id} .charCounter`).css({"display":"block"}); 22214 } 22215 22216 } else { 22217 showcharcount = false;
22218 $(`#${el_id} .charCounter`).css({"display":"none"}); 22219 22220 } 22221 22222 } 22223 22224 }); 22225 $(".orgnl-input-file.required").prev().find(".plus-sign")?.addClass("requiredSymbol") 22226 let requiredTextCount = []; 22227 for(let i=0; i< $("form.cmp-form").length; i++) { 22228 let count = 0; 22229 $.each($($(".cmp-form")[i]).children('div') , function(ind) { 22230 if($(this).hasClass("formText") || $(this).hasClass("formOptions") || 22231 $(this).hasClass("state-dropdown") || $(this).hasClass("country-dropdown") || 22232 $(this).hasClass("recaptcha-v2") || $(this).hasClass("fileUpload")) { 22233 $(this).addClass("formFieldMain"); 22234 } 22235 if($(this).find(".required").length != 0) { 22236 count++; 22237 } 22238 }); 22239 requiredTextCount.push(count); 22240 } 22241 for(let j=0; j< requiredTextCount.length; j++){ 22242 if(requiredTextCount[j] > 0) { 22243 let requiredTextElement = '<div class="requiredTxt"><span style="color: red;">*</span> Required</div>'; 22244 $($("form.cmp-form")[j]).find(".formFieldMain:first").before(requiredTextElement); 22245 } 22246 else { 22247 $($("form.cmp-form")[j]).find(".requiredTxt").remove(); 22248 } 22249 } 22250 function removeCouter() { 22251 22252 var parentremovelist = $(this).parent().parent().attr('id'); 22253 var mxllength = Number($(`#${parentremovelist} .floating-label-wrap .floating-label-field`).attr("maxlength")); 22254 $(`#${parentremovelist} .floating-label-wrap .floating-label-field`).siblings(`#${parentremovelist} .charCounter`).text(0 + "/" + mxllength); 22255 } 22256 22257 22258 /* Color change of lable and border on focus*/ 22259 $( ".form-text .floating-label-field" ).focus(function() { 22260 $(this).css("border-color","#00B451"); 22261 $(this).next(".floating-label").css("color","#00B451"); 22262 }); 22263 $( ".form-text .floating-label-field" ).focusout(function(){ 22264 $(this).css("border-color","#5B616B"); 22265 $(this).next(".floating-label").css("color","#5B616B"); 22266 }); 22267 /**clear button */ 22268 function inputClearButton() { 22269 $('.formElements :input').on('keydown', function() { 22270 if ($(this).val().length > 0) { 22271 $(this).nextAll('.form-clear').removeClass('d-none'); 22272 } 22273 }).on('keydown keyup', function() { 22274 if ($(this).val().length === 0) { 22275 $(this).nextAll('.form-clear').addClass('d-none'); 22276 } 22277 }); 22278 $('.form-clear').on('click', function() { 22279 $(this).addClass('d-none').prevAll(':input').val(''); 22280 $(this).addClass('d-none').prevAll(':input').focus(); 22281 $(this).prevAll('.floating-label').removeAttr("style"); 22282 $(this).prevAll('.floating-label-field').removeAttr("style"); 22283 }); 22284 } 22285 inputClearButton(); 22286 /**validation**/ 22287 22288/* form validation */ 22289 function isFormValid (scope) { 22290 const formOptions = scope.find('.formOptions'); 22291 const formTexts = scope.find('.formText'); 22292 const formUploads = scope.find(".fileUpload"); 22293 let isFormOptionsValid = true; 22294 let isFormTextsValid = true; 22295 let isFormUploadValid = true; 22296 formOptions && $(formOptions).each((index,options) => { 22297 const reqOptions = $(options).find('.required'); 22298 const isCheckable = $(options).find('input').length ? true : false; 22299 const isSelectable = $(options).find('select').length ? true : false; 22300 if(isCheckable){ 22301 let isChecked = false; 22302 if(reqOptions.length){ 22303 // .required is on the legend/wrapper, not the inputs — check the actual radios/checkboxes 22304 $(options).find('input[type="radio"], input[type="checkbox"]').each((index,subOpt) => { 22305 if($(subOpt).is(':checked') && !$(subOpt).prop('disabled')){ 22306 isChecked = true; 22307 } 22308 }); 22309 } 22310 else{ 22311 isChecked = true; 22312 } 22313 if($(options).css("display") != 'none') { 22314 if(!isChecked){ 22315 $(options).closest('.formOptions').find('.error-msg-checkbox').css('display','block'); 22316 $(options).closest('.formOptions').find('.error-msg-radio').css('display','block'); 22317 $(options).closest('.formOptions').find('.helperText').css('display','none'); 22318 isFormOptionsValid = false;
22319 } 22320 else{ 22321 $(options).closest('.formOptions').find('.error-msg-checkbox').css('display','none'); 22322 $(options).closest('.formOptions').find('.error-msg-radio').css('display','none'); 22323 $(options).closest('.formOptions').find('.helperText').css('display','block'); 22324 } 22325 } 22326 } 22327 else if(isSelectable){ 22328 let isSelected = true; 22329 reqOptions && $(reqOptions).each((index,opt) => { 22330 if((!$(opt).find('select').val() || !$(opt).find('select').val().length) && 22331 !$(opt).find('select').prop('disabled')){ 22332 isSelected = false; 22333 } 22334 }); 22335 if($(options).css("display") != 'none') { 22336 if(!isSelected){ 22337 $(options).closest('.formOptions').find('.floating-label-wrap').addClass("errfld"); 22338 $(options).closest('.formOptions').find('.error-msg-checkbox').css('display','block'); 22339 $(options).closest('.formOptions').find('.helperText').css('display','none'); 22340 isFormOptionsValid = false; 22341 } 22342 else{ 22343 $(options).closest('.formOptions').find('.floating-label-wrap').removeClass("errfld"); 22344 $(options).closest('.formOptions').find('.error-msg-checkbox').css('display','none'); 22345 $(options).closest('.formOptions').find('.helperText').css('display','block'); 22346 } 22347 } 22348 } 22349 }); 22350 formTexts && $(formTexts).each((index,texts) => { 22351 const reqInputs = $(texts).find('.required'); 22352 reqInputs && $(reqInputs).each((index,inp) => { 22353 //For all required 22354 if(!$(reqInputs).val() && !$(reqInputs).prop('disabled')){ 22355 $(reqInputs).closest('.formText').find('.textError').css('display','block'); 22356 $(reqInputs).closest('.formText').find('.helperText').css('display','none'); 22357 $(reqInputs).closest('.formText').find('.charCounter').css("color","#E31C3D"); 22358 $(reqInputs).css("border","1px solid #E31C3D"); 22359 $(reqInputs).addClass("errfld"); 22360 isFormTextsValid = false; 22361 } 22362 else{ 22363 $(reqInputs).closest('.formText').find('.textError').css('display','none'); 22364 $(reqInputs).closest('.formText').find('.helperText').css('display','none'); 22365 $(reqInputs).closest('.formText').find('.emailhelpmsg.helperText').css('display','none'); 22366 $(reqInputs).remove("errfld"); 22367 $(reqInputs).closest('.formText').find('.charCounter').css("color","#5B616B"); 22368 $(reqInputs).closest('.formText').find('.floating-label').css("color","#00B451"); 22369 $(reqInputs).css("border","1px solid #00B451"); 22370 } 22371 }); 22372 //For Email 22373 const emailInputs = $(texts).find('.typeEmail'); 22374 emailInputs && $(emailInputs).each((index,inp) => { 22375 if($(emailInputs).val()){ 22376 const emailregx = /^\w+([-+.']?[^\s]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/; 22377 const emailValue = $(inp).val(); 22378 const emailFormat = emailregx.test(emailValue); 22379 if (!emailFormat) { 22380 $(emailInputs).closest(".formText").find('.helperText').css('display','none'); 22381 $(emailInputs).closest('.formText').find('.textError').css('display','none'); 22382 $(emailInputs).closest(".formText").find('.emailhelpmsg.helperText').css('display','block'); 22383 $(emailInputs).closest(".formText").find('.emailhelpmsg.helperText').css("color","#E31C3D"); 22384 $(emailInputs).closest('.formText').find('.charCounter').css("color","#E31C3D"); 22385 $(emailInputs).css("border","1px solid #E31C3D"); 22386 $(emailInputs).addClass("errfld"); 22387 isFormTextsValid = false; 22388 } 22389 else{ 22390 $(emailInputs).closest(".formText").find('.helperText').css('display','block'); 22391 $(emailInputs).closest(".formText").find('.emailhelpmsg.helperText').css('display','none'); 22392 } 22393 } 22394 }); 22395 //For Number 22396 let numInputs = $(texts).find('.typeTel'); 22397 numInputs && $(numInputs).each((index,inp) => { 22398 if($(numInputs).val()){ 22399 const maxValue = $(inp).attr('maxlength'); // from dialogue 22400 const minValue = $(inp).attr('min-length'); // from dialogue 22401 const typeTel = $(inp).val(); 22402 if((minValue && typeTel.length < parseInt(minValue)) || (maxValue && typeTel.length > parseInt(maxValue)) || isNaN(typeTel)) { 22403 $(numInputs).closest(".formText").find('.helperText').css('display','none'); 22404 $(numInputs).closest('.formText').find('.textError').css('display','none'); 22405 $(numInputs).closest(".formText").find('.emailhelpmsg.helperText').css('display','block'); 22406 $(numInputs).closest(".formText").find('.emailhelpmsg.helperText').css("color","#E31C3D"); 22407 $(numInputs).closest('.formText').find('.charCounter').css("color","#E31C3D");
22408 $(numInputs).css("border","1px solid #E31C3D"); 22409 $(numInputs).addClass("errfld"); 22410 isFormTextsValid = false; 22411 } 22412 else{ 22413 $(numInputs).closest(".formText").find('.helperText').css('display','block'); 22414 $(numInputs).closest(".formText").find('.emailhelpmsg.helperText').css('display','none'); 22415 } 22416 } 22417 }); 22418 }); 22419 formUploads && $(formUploads).each((index,uploads) => { 22420 if($(uploads).find('.required').length > 0 && $(uploads).find('.file-list').children().length == 0){ 22421 $(uploads).find('.file-upload-parent').css("border","1px solid #E31C3D"); 22422 if ($(uploads).find(".nofile-error-msg").html() != '') { 22423 $(uploads).find(".no-file-uploaded").css('display', 'none'); 22424 } 22425 $(uploads).find(".nofile-error-msg").css('display', 'block'); 22426 $(uploads).find('.file-upload-parent').addClass("errfld"); 22427 isFormUploadValid = false; 22428 } 22429 else{ 22430 $(uploads).find('.file-upload-parent').remove("errfld"); 22431 $(uploads).find('.file-upload-parent').css("border","1px solid rgb(91, 97, 107)"); 22432 $(uploads).find(".nofile-error-msg").css('display', 'none'); 22433 if ($(uploads).find('.file-list').children().length == 0) 22434 $(uploads).find(".no-file-uploaded").css('display', 'block'); 22435 } 22436 }); 22437 return isFormTextsValid && isFormOptionsValid && isFormUploadValid; 22438 } 22439 22440 $(document).on('click, focus','.formText input, .formText textarea, .formOptions input',function(e){ 22441 const ele = ($(this).closest('.formText').length && $(this).closest('.formText')) || 22442 ($(this).closest('.formOptions').length && $(this).closest('.formOptions')); 22443 22444 if($(this).closest('.formText').length && $(this).closest('.formText')){ 22445 22446 $(ele).find('.textError').css('display','none'); 22447 $(ele).find('.helperText').css('display','block'); 22448 $(ele).find('.emailhelpmsg.helperText').css('display','none'); 22449 $(ele).find('.charCounter').css("color","#5B616B"); 22450 $(ele).find('.floating-label').css("color","#00B451"); 22451 $(ele).find('input').css("border","1px solid #00B451"); 22452 $(ele).find('.floating-label-field').removeClass("errfld"); 22453 } 22454 else if($(this).closest('.formOptions').length && $(this).closest('.formOptions')){ 22455 22456 $(ele).find('.error-msg-checkbox').css('display','none'); 22457 $(ele).find('.error-msg-radio').css('display','none'); 22458 $(ele).find('.helperText').css('display','block'); 22459 $(ele).closest('.formOptions').find('.floating-label-wrap').removeClass("errfld"); 22460 } 22461 }); 22462 22463 22464 $(".formElements").submit(function(e) { 22465 var flagg = isFormValid($(this)); 22466 22467 if(!flagg){ 22468 // Scroll to first visible validation error (radio/checkbox errors have no .errfld) 22469 var $errorTarget = $(this).find( 22470 ".errfld:visible, .textError:visible, .error-msg-radio:visible, .error-msg-checkbox:visible, .emailhelpmsg.helperText:visible, .nofile-error-msg:visible" 22471 ).filter(function () { 22472 return $(this).offset() != null; 22473 }).first(); 22474 22475 if ($errorTarget.length) { 22476 var errorOffset = $errorTarget.offset(); 22477 if (errorOffset) { 22478 var $focusInput = $errorTarget.closest('.formText, .formOptions, .fileUpload').find('input, select, textarea').first(); 22479 if ($focusInput.length) { 22480 $focusInput.focus(); 22481 } 22482 $("html, body").animate({ 22483 scrollTop: errorOffset.top - 150 22484 }, { 22485 duration: "slow", 22486 queue: true 22487 }); 22488 } 22489 } 22490 } 22491 22492 22493 $(this).find('.gs-date').each(function(){ 22494 var a=$(this).prop('disabled'); 22495 22496 if(a==false && $(this).val()=='') 22497 { 22498 $(this).siblings('.helperText').html("Please pick a date.").css("color","#E31C3D"); 22499 $(this).siblings('.gs-date-label').css("color","#E31C3D"); 22500 $(this).css("border","1px solid #E31C3D"); 22501 $(this).click( 22502 function(){ 22503 $(this).siblings('.helperText').html("We'll never share your details with anyone else.").css("color","#5B616B"); 22504 $(this).siblings('.gs-date-label').css("color","#5B616B");
22505 $(this).css("border","1px solid #5B616B"); 22506 $(this).siblings('.ui-datepicker-trigger').attr("src",'images/cal-default.png'); 22507 } 22508 ) 22509 } 22510 22511 }); 22512 $(this).find('.gs-time').each(function(){ 22513 var a=$(this).prop('disabled'); 22514 22515 if(a==false && $(this).val()=='') 22516 { 22517 $(this).siblings('.helperText').html("Please enter the time.").css("color","#E31C3D"); 22518 $(this).siblings('.gs-time-label').css("color","#E31C3D"); 22519 $(this).css("border","1px solid #E31C3D"); 22520 $(this).click( 22521 function(){ 22522 $(this).siblings('.helperText').html("We'll never share your details with anyone else.").css("color","#5B616B"); 22523 $(this).siblings('.gs-time-label').css("color","#5B616B"); 22524 $(this).css("border","1px solid #5B616B"); 22525 $(this).siblings('.gs-time-icon').find('.gs-image').attr("src",'images/clock-default.png'); 22526 } 22527 ) 22528 } 22529 }); 22530 return flagg; 22531 }); 22532 /* Multiple select*/ 22533 $(function () { 22534 $('.selectpicker').length && $('.selectpicker').selectpicker(); 22535 }); 22536 22537 $('.selectpicker').on('show.bs.select',function(){ 22538 $(this).parentsUntil(".form-group").addClass("showfield"); 22539 $(this).parentsUntil(".form-group").removeClass("errfld"); 22540 /* $(this).parentsUntil(".form-options-dropdown").removeClass("onFocus");*/ 22541 22542 $(this).closest('.formOptions').find('.error-msg-checkbox').css('display','none'); 22543 $(this).closest('.formOptions').find('.error-msg-radio').css('display','none'); 22544 $(this).closest('.formOptions').find('.helperText').css('display','block'); 22545 $(this).closest('.formOptions').find('.floating-label-wrap').removeClass("errfld"); 22546 22547 22548 }); 22549 $('.selectpicker').on('hide.bs.select',function(){ 22550 $(this).parentsUntil(".form-group").removeClass("showfield"); 22551 /*$(this).parentsUntil(".form-options-dropdown").addClass("onFocus"); 22552 $('body').on("click", function () { 22553 $(".form-options-dropdown").find(".onFocus").removeClass("onFocus"); 22554 });*/ 22555 22556 }); 22557 22558 $('.form-options-dropdown .bootstrap-select>.dropdown-toggle').focus(function(){ 22559 $(this).parentsUntil(".form-options-dropdown").addClass("onFocus"); 22560 }); 22561 $('.form-options-dropdown .bootstrap-select>.dropdown-toggle').focusout(function(){ 22562 $(this).parentsUntil(".form-options-dropdown").removeClass("onFocus"); 22563 }); 22564 22565 $(".bt-select"). change(function(){ 22566 if($(this).find( ".dropdown-menu.inner li").hasClass("selected")) { 22567 $(this).closest(".bt-select").addClass("itIsSelected"); 22568 } 22569 else{ 22570 $(this).closest(".bt-select").removeClass("itIsSelected"); 22571 } 22572 let floatingTxt = $(this).find(".floating-label").text(); 22573 let dropdownTxt = $(this).find(".filter-option-inner-inner").text(); 22574 if(floatingTxt == dropdownTxt ) { 22575 setTimeout(() => { 22576 $(this).find(".filter-option-inner-inner").text(floatingTxt); 22577 }, 1000); 22578 if($(this).hasClass("required")) 22579 $(this).find(".filter-option-inner-inner").addClass("requiredBtnTxt"); 22580 } 22581 else { 22582 $(this).find(".filter-option-inner-inner").removeClass("requiredBtnTxt"); 22583 } 22584 }); 22585 22586 /*date picker*/ 22587 $('.gs-date').length && $('.gs-date').datepicker( 22588 { 22589 showOn: "button", 22590 buttonImageOnly: true, 22591 buttonImage: 'images/cal-default.png', 22592 changeMonth: true, 22593 changeYear : true, 22594 beforeShow : function(){ 22595 $('.gs-date-field').append($('#ui-datepicker-div')); 22596 } 22597 } 22598 22599 ); 22600 $('.gs-date').each(function(){ 22601 var a=$(this).prop('disabled'); 22602 if(a==true) 22603 { 22604 $(this).siblings('.ui-datepicker-trigger').attr("src",'images/cal-disabled.png'); 22605 $(this).datepicker('disable'); 22606 } 22607 22608 }); 22609 22610 $('.gs-date').focus(function(){ 22611 $(this).siblings('.ui-datepicker-trigger').attr("src",'images/cal-focus.png'); 22612 }); 22613 $('.gs-date').focusout(function(){ 22614 $(this).siblings('.ui-datepicker-trigger').attr("src",'images/cal-default.png'); 22615 }); 22616 22617 /*date picker*/ 22618 22619 /*time picker*/
vendor: 22,486 bytes, lines 22620-22667
22620 $('.gs-time').length && $('.gs-time').timepicker({}); 22621 $('.gs-time').each(function(){ 22622 var b=$(this).prop('disabled'); 22623 if(b==true) 22624 { 22625 $(this).siblings('.gs-time-icon').find('.gs-image').attr("src",'images/clock-disabled.png'); 22626 22627 } 22628 22629 }); 22630 22631 $('.gs-time').focus(function(){ 22632 $(this).siblings('.gs-time-icon').find('.gs-image').attr("src",'images/clock-focus.png'); 22633 }); 22634 $('.gs-time').focusout(function(){ 22635 $(this).siblings('.gs-time-icon').find('.gs-image').attr("src",'images/clock-default.png'); 22636 }); 22637 /*time picker*/ 22638}); 22639/** form comp**/ 22640/**Add focus to form options when focused through TAB key**/ 22641$(document).on("focus", ".bootstrap-select .dropdown-toggle.bs-placeholder", function(){ 22642 $(this).closest(".bt-select").addClass("onFocusOption"); 22643 $(this).closest('.formOptions').find('.error-msg-checkbox').css('display','none'); 22644 $(this).closest('.formOptions').find('.helperText').css('display','block'); 22645 $(this).closest('.formOptions').find('.floating-label-wrap').removeClass("errfld"); 22646 }); 22647 $(document).on("focusout", ".bootstrap-select .dropdown-toggle.bs-placeholder", function(){ 22648 $(this).closest(".bt-select").removeClass("onFocusOption"); 22649 }); 22650$(window).on('load', function() { 22651 let formRequiredValidationLen = $(".floating-label-wrap.required").length; 22652 for(let i=0; i< formRequiredValidationLen; i++) { 22653 let floatingTxt = $($(".floating-label-wrap.required")[i]).find(".floating-label").text(); 22654 let dropdownTxt = $($(".floating-label-wrap.required")[i]).find(".filter-option-inner-inner").text(); 22655 if(floatingTxt == dropdownTxt ) { 22656 $($(".floating-label-wrap.required")[i]).find(".filter-option-inner-inner").addClass("requiredBtnTxt") 22657 } 22658 } 22659}) 22660/*! 22661 * Bootstrap-select v1.13.9 (https://developer.snapappointments.com/bootstrap-select) 22662 * 22663 * Copyright 2012-2019 SnapAppointments, LLC 22664 * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 22665 */ 22666 22667!function(e,t){void 0===e&&void 0!==window&&(e=window),"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery")):t(e.jQuery)}(this,function(e){!function(z){"use strict";var d=["sanitize","whiteList","sanitizeFn"],l=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],e={"*":["class","dir","id","lang","role","tabindex","style",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},r=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,a=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function v(e,t){var i=e.nodeName.toLowerCase();if(-1!==z.inArray(i,t))return-1===z.inArray(i,l)||Boolean(e.nodeValue.match(r)||e.nodeValue.match(a));for(var s=z(t).filter(function(e,t){return t instanceof RegExp}),n=0,o=s.length;n<o;n++)if(i.match(s[n]))return!0;return!1}function B(e,t,i){if(i&&"function"==typeof i)return i(e);for(var s=Object.keys(t),n=0,o=e.length;n<o;n++)for(var l=e[n].querySelectorAll("*"),r=0,a=l.length;r<a;r++){var c=l[r],d=c.nodeName.toLowerCase();if(-1!==s.indexOf(d))for(var h=[].slice.call(c.attributes),p=[].concat(t["*"]||[],t[d]||[]),u=0,f=h.length;u<f;u++){var m=h[u];v(m,p)||c.removeAttribute(m.nodeName)}else c.parentNode.removeChild(c)}}"classList"in document.createElement("_")||function(e){if("Element"in e){var t="classList",i="prototype",s=e.Element[i],n=Object,o=function(){var i=z(this);return{add:function(e){return e=Array.prototype.slice.call(arguments).join(" "),i.addClass(e)},remove:function(e){return e=Array.prototype.slice.call(arguments).join(" "),i.removeClass(e)},toggle:function(e,t){return i.toggleClass(e,t)},contains:function(e){return i.hasClass(e)}}};if(n.defineProperty){var l={get:o,enumerable:!0,configurable:!0};try{n.defineProperty(s,t,l)}catch(e){void 0!==e.number&&-2146823252!==e.number||(l.enumerable=!1,n.defineProperty(s,t,l))}}else n[i].__defineGetter__&&s.__defineGetter__(t,o)}}(window);var t,c,i,s=document.createElement("_");if(s.classList.add("c1","c2"),!s.classList.contains("c2")){var n=DOMTokenList.prototype.add,o=DOMTokenList.prototype.remove;DOMTokenList.prototype.add=function(){Array.prototype.forEach.call(arguments,n.bind(this))},DOMTokenList.prototype.remove=function(){Array.prototype.forEach.call(arguments,o.bind(this))}}if(s.classList.toggle("c3",!1),s.classList.contains("c3")){var h=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return 1 in arguments&&!this.contains(e)==!t?t:h.call(this,e)}}function E(e){var t,i=[],s=e.selectedOptions;if(e.multiple)for(var n=0,o=s.length;n<o;n++)t=s[n],i.push(t.value||t.text);else i=e.value;return i}s=null,String.prototype.startsWith||(t=function(){try{var e={},t=Object.defineProperty,i=t(e,e,e)&&t}catch(e){}return i}(),c={}.toString,i=function(e){if(null==this)throw new TypeError;var t=String(this);if(e&&"[object RegExp]"==c.call(e))throw new TypeError;var i=t.length,s=String(e),n=s.length,o=1<arguments.length?arguments[1]:void 0,l=o?Number(o):0;l!=l&&(l=0);var r=Math.min(Math.max(l,0),i);if(i<n+r)return!1;for(var a=-1;++a<n;)if(t.charCodeAt(r+a)!=s.charCodeAt(a))return!1;return!0},t?t(String.prototype,"startsWith",{value:i,configurable:!0,writable:!0}):String.prototype.startsWith=i),Object.keys||(Object.keys=function(e,t,i){for(t in i=[],e)i.hasOwnProperty.call(e,t)&&i.push(t);return i}),HTMLSelectElement&&!HTMLSelectElement.prototype.hasOwnProperty("selectedOptions")&&Object.defineProperty(HTMLSelectElement.prototype,"selectedOptions",{get:function(){return this.querySelectorAll(":checked")}});var p={useDefault:!1,_set:z.valHooks.select.set};z.valHooks.select.set=function(e,t){return t&&!p.useDefault&&z(e).data("selected",!0),p._set.apply(this,arguments)};var C=null,u=function(){try{return new Event("change"),!0}catch(e){return!1}}();function $(e,t,i,s){for(var n=["display","subtext","tokens"],o=!1,l=0;l<n.length;l++){var r=n[l],a=e[r];if(a&&(a=a.toString(),"display"===r&&(a=a.replace(/<[^>]+>/g,"")),s&&(a=w(a)),a=a.toUpperCase(),o="contains"===i?0<=a.indexOf(t):a.startsWith(t)))break}return o}function L(e){return parseInt(e,10)||0}z.fn.triggerNative=function(e){var t,i=this[0];i.dispatchEvent?(u?t=new Event(e,{bubbles:!0}):(t=document.createEvent("Event")).initEvent(e,!0,!1),i.dispatchEvent(t)):i.fireEvent?((t=document.createEventObject()).eventType=e,i.fireEvent("on"+e,t)):this.trigger(e)};var f={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"},m=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,g=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\u1ab0-\\u1aff\\u1dc0-\\u1dff]","g");function b(e){return f[e]}function w(e){return(e=e.toString())&&e.replace(m,b).replace(g,"")}var x,I,k,y,S,O=(x={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},I=function(e){return x[e]},k="(?:"+Object.keys(x).join("|")+")",y=RegExp(k),S=RegExp(k,"g"),function(e){return e=null==e?"":""+e,y.test(e)?e.replace(S,I):e}),T={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"},A=27,N=13,D=32,H=9,P=38,W=40,M={success:!1,major:"3"};try{M.full=(z.fn.dropdown.Constructor.VERSION||"").split(" ")[0].split("."),M.major=M.full[0],M.success=!0}catch(e){}var R=0,U=".bs.select",j={DISABLED:"disabled",DIVIDER:"divider",SHOW:"open",DROPUP:"dropup",MENU:"dropdown-menu",MENURIGHT:"dropdown-menu-right",MENULEFT:"dropdown-menu-left",BUTTONCLASS:"btn-default",POPOVERHEADER:"popover-title",ICONBASE:"glyphicon",TICKICON:"glyphicon-ok"},V={MENU:"."+j.MENU},F={span:document.createElement("span"),i:document.createElement("i"),subtext:document.createElement("small"),a:document.createElement("a"),li:document.createElement("li"),whitespace:document.createTextNode("\xa0"),fragment:document.createDocumentFragment()};F.a.setAttribute("role","option"),F.subtext.className="text-muted",F.text=F.span.cloneNode(!1),F.text.className="text",F.checkMark=F.span.cloneNode(!1);var _=new RegExp(P+"|"+W),q=new RegExp("^"+H+"$|"+A),G=function(e,t,i){var s=F.li.cloneNode(!1);return e&&(1===e.nodeType||11===e.nodeType?s.appendChild(e):s.innerHTML=e),void 0!==t&&""!==t&&(s.className=t),null!=i&&s.classList.add("optgroup-"+i),s},K=function(e,t,i){var s=F.a.cloneNode(!0);return e&&(11===e.nodeType?s.appendChild(e):s.insertAdjacentHTML("beforeend",e)),void 0!==t&&""!==t&&(s.className=t),"4"===M.major&&s.classList.add("dropdown-item"),i&&s.setAttribute("style",i),s},Y=function(e,t){var i,s,n=F.text.cloneNode(!1);if(e.content)n.innerHTML=e.content;else{if(n.textContent=e.text,e.icon){var o=F.whitespace.cloneNode(!1);(s=(!0===t?F.i:F.span).cloneNode(!1)).className=e.iconBase+" "+e.icon,F.fragment.appendChild(s),F.fragment.appendChild(o)}e.subtext&&((i=F.subtext.cloneNode(!1)).textContent=e.subtext,n.appendChild(i))}if(!0===t)for(;0<n.childNodes.length;)F.fragment.appendChild(n.childNodes[0]);else F.fragment.appendChild(n);return F.fragment},Z=function(e){var t,i,s=F.text.cloneNode(!1);if(s.innerHTML=e.label,e.icon){var n=F.whitespace.cloneNode(!1);(i=F.span.cloneNode(!1)).className=e.iconBase+" "+e.icon,F.fragment.appendChild(i),F.fragment.appendChild(n)}return e.subtext&&((t=F.subtext.cloneNode(!1)).textContent=e.subtext,s.appendChild(t)),F.fragment.appendChild(s),F.fragment},J=function(e,t){var i=this;p.useDefault||(z.valHooks.select.set=p._set,p.useDefault=!0),this.$element=z(e),this.$newElement=null,this.$button=null,this.$menu=null,this.options=t,this.selectpicker={main:{},current:{},search:{},view:{},keydown:{keyHistory:"",resetKeyHistory:{start:function(){return setTimeout(function(){i.selectpicker.keydown.keyHistory=""},800)}}}},null===this.options.title&&(this.options.title=this.$element.attr("title"));var s=this.options.windowPadding;"number"==typeof s&&(this.options.windowPadding=[s,s,s,s]),this.val=J.prototype.val,this.render=J.prototype.render,this.refresh=J.prototype.refresh,this.setStyle=J.prototype.setStyle,this.selectAll=J.prototype.selectAll,this.deselectAll=J.prototype.deselectAll,this.destroy=J.prototype.destroy,this.remove=J.prototype.remove,this.show=J.prototype.show,this.hide=J.prototype.hide,this.init()};function Q(e){var r,a=arguments,c=e;if([].shift.apply(a),!M.success){try{M.full=(z.fn.dropdown.Constructor.VERSION||"").split(" ")[0].split(".")}catch(e){J.BootstrapVersion?M.full=J.BootstrapVersion.split(" ")[0].split("."):(M.full=[M.major,"0","0"],console.warn("There was an issue retrieving Bootstrap's version. Ensure Bootstrap is being loaded before bootstrap-select and there is no namespace collision. If loading Bootstrap asynchronously, the version may need to be manually specified via $.fn.selectpicker.Constructor.BootstrapVersion.",e))}M.major=M.full[0],M.success=!0}if("4"===M.major){var t=[];J.DEFAULTS.style===j.BUTTONCLASS&&t.push({name:"style",className:"BUTTONCLASS"}),J.DEFAULTS.iconBase===j.ICONBASE&&t.push({name:"iconBase",className:"ICONBASE"}),J.DEFAULTS.tickIcon===j.TICKICON&&t.push({name:"tickIcon",className:"TICKICON"}),j.DIVIDER="dropdown-divider",j.SHOW="show",j.BUTTONCLASS="btn-light",j.POPOVERHEADER="popover-header",j.ICONBASE="",j.TICKICON="bs-ok-default";for(var i=0;i<t.length;i++){e=t[i];J.DEFAULTS[e.name]=j[e.className]}}var s=this.each(function(){var e=z(this);if(e.is("select")){var t=e.data("selectpicker"),i="object"==typeof c&&c;if(t){if(i)for(var s in i)i.hasOwnProperty(s)&&(t.options[s]=i[s])}else{var n=e.data();for(var o in n)n.hasOwnProperty(o)&&-1!==z.inArray(o,d)&&delete n[o];var l=z.extend({},J.DEFAULTS,z.fn.selectpicker.defaults||{},n,i);l.template=z.extend({},J.DEFAULTS.template,z.fn.selectpicker.defaults?z.fn.selectpicker.defaults.template:{},n.template,i.template),e.data("selectpicker",t=new J(this,l))}"string"==typeof c&&(r=t[c]instanceof Function?t[c].apply(t,a):t.options[c])}});return void 0!==r?r:s}J.VERSION="1.13.9",J.DEFAULTS={noneSelectedText:"Nothing selected",noneResultsText:"No results matched {0}",countSelectedText:function(e,t){return 1==e?"{0} item selected":"{0} items selected"},maxOptionsText:function(e,t){return[1==e?"Limit reached ({n} item max)":"Limit reached ({n} items max)",1==t?"Group limit reached ({n} item max)":"Group limit reached ({n} items max)"]},selectAllText:"Select All",deselectAllText:"Deselect All",doneButton:!1,doneButtonText:"Close",multipleSeparator:", ",styleBase:"btn",style:j.BUTTONCLASS,size:"auto",title:null,selectedTextFormat:"values",width:!1,container:!1,hideDisabled:!1,showSubtext:!1,showIcon:!0,showContent:!0,dropupAuto:!0,header:!1,liveSearch:!1,liveSearchPlaceholder:null,liveSearchNormalize:!1,liveSearchStyle:"contains",actionsBox:!1,iconBase:j.ICONBASE,tickIcon:j.TICKICON,showTick:!1,template:{caret:'<span class="caret"></span>'},maxOptions:!1,mobile:!1,selectOnTab:!1,dropdownAlignRight:!1,windowPadding:0,virtualScroll:600,display:!1,sanitize:!0,sanitizeFn:null,whiteList:e},J.prototype={constructor:J,init:function(){var i=this,e=this.$element.attr("id");this.selectId=R++,this.$element[0].classList.add("bs-select-hidden"),this.multiple=this.$element.prop("multiple"),this.autofocus=this.$element.prop("autofocus"),this.options.showTick=this.$element[0].classList.contains("show-tick"),this.$newElement=this.createDropdown(),this.$element.after(this.$newElement).prependTo(this.$newElement),this.$button=this.$newElement.children("button"),this.$menu=this.$newElement.children(V.MENU),this.$menuInner=this.$menu.children(".inner"),this.$searchbox=this.$menu.find("input"),this.$element[0].classList.remove("bs-select-hidden"),!0===this.options.dropdownAlignRight&&this.$menu[0].classList.add(j.MENURIGHT),void 0!==e&&this.$button.attr("data-id",e),this.checkDisabled(),this.clickListener(),this.options.liveSearch&&this.liveSearchListener(),this.setStyle(),this.render(),this.setWidth(),this.options.container?this.selectPosition():this.$element.on("hide"+U,function(){if(i.isVirtual()){var e=i.$menuInner[0],t=e.firstChild.cloneNode(!1);e.replaceChild(t,e.firstChild),e.scrollTop=0}}),this.$menu.data("this",this),this.$newElement.data("this",this),this.options.mobile&&this.mobile(),this.$newElement.on({"hide.bs.dropdown":function(e){i.$menuInner.attr("aria-expanded",!1),i.$element.trigger("hide"+U,e)},"hidden.bs.dropdown":function(e){i.$element.trigger("hidden"+U,e)},"show.bs.dropdown":function(e){i.$menuInner.attr("aria-expanded",!0),i.$element.trigger("show"+U,e)},"shown.bs.dropdown":function(e){i.$element.trigger("shown"+U,e)}}),i.$element[0].hasAttribute("required")&&this.$element.on("invalid"+U,function(){i.$button[0].classList.add("bs-invalid"),i.$element.on("shown"+U+".invalid",function(){i.$element.val(i.$element.val()).off("shown"+U+".invalid")}).on("rendered"+U,function(){this.validity.valid&&i.$button[0].classList.remove("bs-invalid"),i.$element.off("rendered"+U)}),i.$button.on("blur"+U,function(){i.$element.trigger("focus").trigger("blur"),i.$button.off("blur"+U)})}),setTimeout(function(){i.createLi(),i.$element.trigger("loaded"+U)})},createDropdown:function(){var e=this.multiple||this.options.showTick?" show-tick":"",t="",i=this.autofocus?" autofocus":"";M.major<4&&this.$element.parent().hasClass("input-group")&&(t=" input-group-btn");var s,n="",o="",l="",r="";return this.options.header&&(n='<div class="'+j.POPOVERHEADER+'"><button type="button" class="close" aria-hidden="true">×</button>'+this.options.header+"</div>"),this.options.liveSearch&&(o='<div class="bs-searchbox"><input type="text" class="form-control" autocomplete="off"'+(null===this.options.liveSearchPlaceholder?"":' placeholder="'+O(this.options.liveSearchPlaceholder)+'"')+' role="textbox" aria-label="Search"></div>'),this.multiple&&this.options.actionsBox&&(l='<div class="bs-actionsbox"><div class="btn-group btn-group-sm btn-block"><button type="button" class="actions-btn bs-select-all btn '+j.BUTTONCLASS+'">'+this.options.selectAllText+'</button><button type="button" class="actions-btn bs-deselect-all btn '+j.BUTTONCLASS+'">'+this.options.deselectAllText+"</button></div></div>"),this.multiple&&this.options.doneButton&&(r='<div class="bs-donebutton"><div class="btn-group btn-block"><button type="button" class="btn btn-sm '+j.BUTTONCLASS+'">'+this.options.doneButtonText+"</button></div></div>"),s='<div class="dropdown bootstrap-select'+e+t+'"><button type="button" class="'+this.options.styleBase+' dropdown-toggle" '+("static"===this.options.display?'data-display="static"':"")+'data-toggle="dropdown"'+i+' role="button"><div class="filter-option"><div class="filter-option-inner"><div class="filter-option-inner-inner"></div></div> </div>'+("4"===M.major?"":'<span class="bs-caret">'+this.options.template.caret+"</span>")+'</button><div class="'+j.MENU+" "+("4"===M.major?"":j.SHOW)+'" role="combobox">'+n+o+l+'<div class="inner '+j.SHOW+'" role="listbox" aria-expanded="false" tabindex="-1"><ul class="'+j.MENU+" inner "+("4"===M.major?j.SHOW:"")+'"></ul></div>'+r+"</div></div>",z(s)},setPositionData:function(){this.selectpicker.view.canHighlight=[];for(var e=0;e<this.selectpicker.current.data.length;e++){var t=this.selectpicker.current.data[e],i=!0;"divider"===t.type?(i=!1,t.height=this.sizeInfo.dividerHeight):"optgroup-label"===t.type?(i=!1,t.height=this.sizeInfo.dropdownHeaderHeight):t.height=this.sizeInfo.liHeight,t.disabled&&(i=!1),this.selectpicker.view.canHighlight.push(i),t.position=(0===e?0:this.selectpicker.current.data[e-1].position)+t.height}},isVirtual:function(){return!1!==this.options.virtualScroll&&this.selectpicker.main.elements.length>=this.options.virtualScroll||!0===this.options.virtualScroll},createView:function(T,e){e=e||0;var A=this;this.selectpicker.current=T?this.selectpicker.search:this.selectpicker.main;var N,D,H=[];function i(e,t){var i,s,n,o,l,r,a,c,d,h,p=A.selectpicker.current.elements.length,u=[],f=!0,m=A.isVirtual();A.selectpicker.view.scrollTop=e,!0===m&&A.sizeInfo.hasScrollBar&&A.$menu[0].offsetWidth>A.sizeInfo.totalMenuWidth&&(A.sizeInfo.menuWidth=A.$menu[0].offsetWidth,A.sizeInfo.totalMenuWidth=A.sizeInfo.menuWidth+A.sizeInfo.scrollBarWidth,A.$menu.css("min-width",A.sizeInfo.menuWidth)),i=Math.ceil(A.sizeInfo.menuInnerHeight/A.sizeInfo.liHeight*1.5),s=Math.round(p/i)||1;for(var v=0;v<s;v++){var g=(v+1)*i;if(v===s-1&&(g=p),u[v]=[v*i+(v?1:0),g],!p)break;void 0===l&&e<=A.selectpicker.current.data[g-1].position-A.sizeInfo.menuInnerHeight&&(l=v)}if(void 0===l&&(l=0),r=[A.selectpicker.view.position0,A.selectpicker.view.position1],n=Math.max(0,l-1),o=Math.min(s-1,l+1),A.selectpicker.view.position0=!1===m?0:Math.max(0,u[n][0])||0,A.selectpicker.view.position1=!1===m?p:Math.min(p,u[o][1])||0,a=r[0]!==A.selectpicker.view.position0||r[1]!==A.selectpicker.view.position1,void 0!==A.activeIndex&&(D=A.selectpicker.main.elements[A.prevActiveIndex],H=A.selectpicker.main.elements[A.activeIndex],N=A.selectpicker.main.elements[A.selectedIndex],t&&(A.activeIndex!==A.selectedIndex&&H&&H.length&&(H.classList.remove("active"),H.firstChild&&H.firstChild.classList.remove("active")),A.activeIndex=void 0),A.activeIndex&&A.activeIndex!==A.selectedIndex&&N&&N.length&&(N.classList.remove("active"),N.firstChild&&N.firstChild.classList.remove("active"))),void 0!==A.prevActiveIndex&&A.prevActiveIndex!==A.activeIndex&&A.prevActiveIndex!==A.selectedIndex&&D&&D.length&&(D.classList.remove("active"),D.firstChild&&D.firstChild.classList.remove("active")),(t||a)&&(c=A.selectpicker.view.visibleElements?A.selectpicker.view.visibleElements.slice():[],A.selectpicker.view.visibleElements=!1===m?A.selectpicker.current.elements:A.selectpicker.current.elements.slice(A.selectpicker.view.position0,A.selectpicker.view.position1),A.setOptionStatus(),(T||!1===m&&t)&&(d=c,h=A.selectpicker.view.visibleElements,f=!(d.length===
22667h.length&&d.every(function(e,t){return e===h[t]}))),(t||!0===m)&&f)){var b,w,x=A.$menuInner[0],I=document.createDocumentFragment(),k=x.firstChild.cloneNode(!1),$=A.selectpicker.view.visibleElements,y=[];x.replaceChild(k,x.firstChild);v=0;for(var S=$.length;v<S;v++){var E,C,O=$[v];A.options.sanitize&&(E=O.lastChild)&&(C=A.selectpicker.current.data[v+A.selectpicker.view.position0])&&C.content&&!C.sanitized&&(y.push(E),C.sanitized=!0),I.appendChild(O)}A.options.sanitize&&y.length&&B(y,A.options.whiteList,A.options.sanitizeFn),!0===m&&(b=0===A.selectpicker.view.position0?0:A.selectpicker.current.data[A.selectpicker.view.position0-1].position,w=A.selectpicker.view.position1>p-1?0:A.selectpicker.current.data[p-1].position-A.selectpicker.current.data[A.selectpicker.view.position1-1].position,x.firstChild.style.marginTop=b+"px",x.firstChild.style.marginBottom=w+"px"),x.firstChild.appendChild(I)}if(A.prevActiveIndex=A.activeIndex,A.options.liveSearch){if(T&&t){var z,L=0;A.selectpicker.view.canHighlight[L]||(L=1+A.selectpicker.view.canHighlight.slice(1).indexOf(!0)),z=A.selectpicker.view.visibleElements[L],A.selectpicker.view.currentActive&&(A.selectpicker.view.currentActive.classList.remove("active"),A.selectpicker.view.currentActive.firstChild&&A.selectpicker.view.currentActive.firstChild.classList.remove("active")),z&&(z.classList.add("active"),z.firstChild&&z.firstChild.classList.add("active")),A.activeIndex=(A.selectpicker.current.data[L]||{}).index}}else A.$menuInner.trigger("focus")}this.setPositionData(),i(e,!0),this.$menuInner.off("scroll.createView").on("scroll.createView",function(e,t){A.noScroll||i(this.scrollTop,t),A.noScroll=!1}),z(window).off("resize"+U+"."+this.selectId+".createView").on("resize"+U+"."+this.selectId+".createView",function(){A.$newElement.hasClass(j.SHOW)&&i(A.$menuInner[0].scrollTop)})},setPlaceholder:function(){var e=!1;if(this.options.title&&!this.multiple){this.selectpicker.view.titleOption||(this.selectpicker.view.titleOption=document.createElement("option")),e=!0;var t=this.$element[0],i=!1,s=!this.selectpicker.view.titleOption.parentNode;if(s)this.selectpicker.view.titleOption.className="bs-title-option",this.selectpicker.view.titleOption.value="",i=void 0===z(t.options[t.selectedIndex]).attr("selected")&&void 0===this.$element.data("selected");(s||0!==this.selectpicker.view.titleOption.index)&&t.insertBefore(this.selectpicker.view.titleOption,t.firstChild),i&&(t.selectedIndex=0)}return e},createLi:function(){var a=this,f=this.options.iconBase,m=':not([hidden]):not([data-hidden="true"])',v=[],g=[],c=0,b=0,e=this.setPlaceholder()?1:0;this.options.hideDisabled&&(m+=":not(:disabled)"),!a.options.showTick&&!a.multiple||F.checkMark.parentNode||(F.checkMark.className=f+" "+a.options.tickIcon+" check-mark",F.a.appendChild(F.checkMark));var t=this.$element[0].querySelectorAll("select > *"+m);function w(e){var t=g[g.length-1];t&&"divider"===t.type&&(t.optID||e.optID)||((e=e||{}).type="divider",v.push(G(!1,j.DIVIDER,e.optID?e.optID+"div":void 0)),g.push(e))}function x(e,t){if((t=t||{}).divider="true"===e.getAttribute("data-divider"),t.divider)w({optID:t.optID});else{var i=g.length,s=e.style.cssText,n=s?O(s):"",o=(e.className||"")+(t.optgroupClass||"");t.optID&&(o="opt "+o),t.text=e.textContent,t.content=e.getAttribute("data-content"),t.tokens=e.getAttribute("data-tokens"),t.subtext=e.getAttribute("data-subtext"),t.icon=e.getAttribute("data-icon"),t.iconBase=f;var l=Y(t);v.push(G(K(l,o,n),"",t.optID)),e.liIndex=i,t.display=t.content||t.text,t.type="option",t.index=i,t.option=e,t.disabled=t.disabled||e.disabled,g.push(t);var r=0;t.display&&(r+=t.display.length),t.subtext&&(r+=t.subtext.length),t.icon&&(r+=1),c<r&&(c=r,a.selectpicker.view.widestOption=v[v.length-1])}}function i(e,t){var i=t[e],s=t[e-1],n=t[e+1],o=i.querySelectorAll("option"+m);if(o.length){var l,r,a={label:O(i.label),subtext:i.getAttribute("data-subtext"),icon:i.getAttribute("data-icon"),iconBase:f},c=" "+(i.className||"");b++,s&&w({optID:b});var d=Z(a);v.push(G(d,"dropdown-header"+c,b)),g.push({display:a.label,subtext:a.subtext,type:"optgroup-label",optID:b});for(var h=0,p=o.length;h<p;h++){var u=o[h];0===h&&(r=(l=g.length-1)+p),x(u,{headerIndex:l,lastIndex:r,optID:b,optgroupClass:c,disabled:i.disabled})}n&&w({optID:b})}}for(var s=t.length;e<s;e++){var n=t[e];"OPTGROUP"!==n.tagName?x(n,{}):i(e,t)}this.selectpicker.main.elements=v,this.selectpicker.main.data=g,this.selectpicker.current=this.selectpicker.main}
vendor: 6,860 bytes, line 22667
22667,findLis:function(){return this.$menuInner.find(".inner > li")},render:function(){this.setPlaceholder();var e,t,i=this,s=this.$element[0].selectedOptions,n=s.length,o=this.$button[0],l=o.querySelector(".filter-option-inner-inner"),r=document.createTextNode(this.options.multipleSeparator),a=F.fragment.cloneNode(!1),c=!1;if(this.togglePlaceholder(),this.tabIndex(),"static"===this.options.selectedTextFormat)a=Y({text:this.options.title},!0);else if((e=this.multiple&&-1!==this.options.selectedTextFormat.indexOf("count")&&1<n)&&(e=1<(t=this.options.selectedTextFormat.split(">")).length&&n>t[1]||1===t.length&&2<=n),!1===e){for(var d=0;d<n&&d<50;d++){var h=s[d],p={},u={content:h.getAttribute("data-content"),subtext:h.getAttribute("data-subtext"),icon:h.getAttribute("data-icon")};this.multiple&&0<d&&a.appendChild(r.cloneNode(!1)),h.title?p.text=h.title:u.content&&i.options.showContent?(p.content=u.content.toString(),c=!0):(i.options.showIcon&&(p.icon=u.icon,p.iconBase=this.options.iconBase),i.options.showSubtext&&!i.multiple&&u.subtext&&(p.subtext=" "+u.subtext),p.text=h.textContent.trim()),a.appendChild(Y(p,!0))}49<n&&a.appendChild(document.createTextNode("..."))}else{var f=':not([hidden]):not([data-hidden="true"]):not([data-divider="true"])';this.options.hideDisabled&&(f+=":not(:disabled)");var m=this.$element[0].querySelectorAll("select > option"+f+", optgroup"+f+" option"+f).length,v="function"==typeof this.options.countSelectedText?this.options.countSelectedText(n,m):this.options.countSelectedText;a=Y({text:v.replace("{0}",n.toString()).replace("{1}",m.toString())},!0)}if(null==this.options.title&&(this.options.title=this.$element.attr("title")),a.childNodes.length||(a=Y({text:void 0!==this.options.title?this.options.title:this.options.noneSelectedText},!0)),o.title=a.textContent.replace(/<[^>]*>?/g,"").trim(),this.options.sanitize&&c&&B([a],i.options.whiteList,i.options.sanitizeFn),l.innerHTML="",l.appendChild(a),M.major<4&&this.$newElement[0].classList.contains("bs3-has-addon")){var g=o.querySelector(".filter-expand"),b=l.cloneNode(!0);b.className="filter-expand",g?o.replaceChild(b,g):o.appendChild(b)}this.$element.trigger("rendered"+U)},setStyle:function(e,t){var i,s=this.$button[0],n=this.$newElement[0],o=this.options.style.trim();this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,"")),M.major<4&&(n.classList.add("bs3"),n.parentNode.classList.contains("input-group")&&(n.previousElementSibling||n.nextElementSibling)&&(n.previousElementSibling||n.nextElementSibling).classList.contains("input-group-addon")&&n.classList.add("bs3-has-addon")),i=e?e.trim():o,"add"==t?i&&s.classList.add.apply(s.classList,i.split(" ")):"remove"==t?i&&s.classList.remove.apply(s.classList,i.split(" ")):(o&&s.classList.remove.apply(s.classList,o.split(" ")),i&&s.classList.add.apply(s.classList,i.split(" ")))},liHeight:function(e){if(e||!1!==this.options.size&&!this.sizeInfo){this.sizeInfo||(this.sizeInfo={});var t=document.createElement("div"),i=document.createElement("div"),s=document.createElement("div"),n=document.createElement("ul"),o=document.createElement("li"),l=document.createElement("li"),r=document.createElement("li"),a=document.createElement("a"),c=document.createElement("span"),d=this.options.header&&0<this.$menu.find("."+j.POPOVERHEADER).length?this.$menu.find("."+j.POPOVERHEADER)[0].cloneNode(!0):null,h=this.options.liveSearch?document.createElement("div"):null,p=this.options.actionsBox&&this.multiple&&0<this.$menu.find(".bs-actionsbox").length?this.$menu.find(".bs-actionsbox")[0].cloneNode(!0):null,u=this.options.doneButton&&this.multiple&&0<this.$menu.find(".bs-donebutton").length?this.$menu.find(".bs-donebutton")[0].cloneNode(!0):null,f=this.$element.find("option")[0];if(this.sizeInfo.selectWidth=this.$newElement[0].offsetWidth,c.className="text",a.className="dropdown-item "+(f?f.className:""),t.className=this.$menu[0].parentNode.className+" "+j.SHOW,t.style.width=this.sizeInfo.selectWidth+"px","auto"===this.options.width&&(i.style.minWidth=0),i.className=j.MENU+" "+j.SHOW,s.className="inner "+j.SHOW,n.className=j.MENU+" inner "+("4"===M.major?j.SHOW:""),o.className=j.DIVIDER,l.className="dropdown-header",c.appendChild(document.createTextNode("\u200b")),a.appendChild(c),r.appendChild(a),l.appendChild(c.cloneNode(!0)),this.selectpicker.view.widestOption&&n.appendChild(this.selectpicker.view.widestOption.cloneNode(!0)),n.appendChild(r),n.appendChild(o),n.appendChild(l),d&&i.appendChild(d),h){var m=document.createElement("input");h.className="bs-searchbox",m.className="form-control",h.appendChild(m),i.appendChild(h)}p&&i.appendChild(p),s.appendChild(n),i.appendChild(s),u&&i.appendChild(u),t.appendChild(i),document.body.appendChild(t);var v,g=r.offsetHeight,b=l?l.offsetHeight:0,w=d?d.offsetHeight:0,x=h?h.offsetHeight:0,I=p?p.offsetHeight:0,k=u?u.offsetHeight:0,$=z(o).outerHeight(!0),y=!!window.getComputedStyle&&window.getComputedStyle(i),S=i.offsetWidth,E=y?null:z(i),C={vert:L(y?y.paddingTop:E.css("paddingTop"))+L(y?y.paddingBottom:E.css("paddingBottom"))+L(y?y.borderTopWidth:E.css("borderTopWidth"))+L(y?y.borderBottomWidth:E.css("borderBottomWidth")),horiz:L(y?y.paddingLeft:E.css("paddingLeft"))+L(y?y.paddingRight:E.css("paddingRight"))+L(y?y.borderLeftWidth:E.css("borderLeftWidth"))+L(y?y.borderRightWidth:E.css("borderRightWidth"))},O={vert:C.vert+L(y?y.marginTop:E.css("marginTop"))+L(y?y.marginBottom:E.css("marginBottom"))+2,horiz:C.horiz+L(y?y.marginLeft:E.css("marginLeft"))+L(y?y.marginRight:E.css("marginRight"))+2};s.style.overflowY="scroll",v=i.offsetWidth-S,document.body.removeChild(t),this.sizeInfo.liHeight=g,this.sizeInfo.dropdownHeaderHeight=b,this.sizeInfo.headerHeight=w,this.sizeInfo.searchHeight=x,this.sizeInfo.actionsHeight=I,this.sizeInfo.doneButtonHeight=k,this.sizeInfo.dividerHeight=$,this.sizeInfo.menuPadding=C,this.sizeInfo.menuExtras=O,this.sizeInfo.menuWidth=S,this.sizeInfo.totalMenuWidth=this.sizeInfo.menuWidth,this.sizeInfo.scrollBarWidth=v,this.sizeInfo.selectHeight=this.$newElement[0].offsetHeight,this.setPositionData()}},getSelectPosition:function(){var e,t=z(window),i=this.$newElement.offset(),s=z(this.options.container);this.options.container&&s.length&&!s.is("body")?((e=s.offset()).top+=parseInt(s.css("borderTopWidth")),e.left+=parseInt(s.css("borderLeftWidth"))):e={top:0,left:0};var n=this.options.windowPadding;this.sizeInfo.selectOffsetTop=i.top-e.top-t.scrollTop(),this.sizeInfo.selectOffsetBot=t.height()-this.sizeInfo.selectOffsetTop-this.sizeInfo.selectHeight-e.top-n[2],this.sizeInfo.selectOffsetLeft=i.left-e.left-t.scrollLeft(),this.sizeInfo.selectOffsetRight=t.width()-this.sizeInfo.selectOffsetLeft-this.sizeInfo.selectWidth-e.left-n[1],this.sizeInfo.selectOffsetTop-=n[0],this.sizeInfo.selectOffsetLeft-=n[3]}
22667,setMenuSize:function(e){this.getSelectPosition();var t,i,s,n,o,l,r,a=this.sizeInfo.selectWidth,c=this.sizeInfo.liHeight,d=this.sizeInfo.headerHeight,h=this.sizeInfo.searchHeight,p=this.sizeInfo.actionsHeight,u=this.sizeInfo.doneButtonHeight,f=this.sizeInfo.dividerHeight,m=this.sizeInfo.menuPadding,v=0;if(this.options.dropupAuto&&(r=c*this.selectpicker.current.elements.length+m.vert,this.$newElement.toggleClass(j.DROPUP,this.sizeInfo.selectOffsetTop-this.sizeInfo.selectOffsetBot>this.sizeInfo.menuExtras.vert&&r+this.sizeInfo.menuExtras.vert+50>this.sizeInfo.selectOffsetBot)),"auto"===this.options.size)n=3<this.selectpicker.current.elements.length?3*this.sizeInfo.liHeight+this.sizeInfo.menuExtras.vert-2:0,i=this.sizeInfo.selectOffsetBot-this.sizeInfo.menuExtras.vert,s=n+d+h+p+u,l=Math.max(n-m.vert,0),this.$newElement.hasClass(j.DROPUP)&&(i=this.sizeInfo.selectOffsetTop-this.sizeInfo.menuExtras.vert),t=(o=i)-d-h-p-u-m.vert;else if(this.options.size&&"auto"!=this.options.size&&this.selectpicker.current.elements.length>this.options.size){for(var g=0;g<this.options.size;g++)"divider"===this.selectpicker.current.data[g].type&&v++;t=(i=c*this.options.size+v*f+m.vert)-m.vert,o=i+d+h+p+u,s=l=""}"auto"===this.options.dropdownAlignRight&&this.$menu.toggleClass(j.MENURIGHT,this.sizeInfo.selectOffsetLeft>this.sizeInfo.selectOffsetRight&&this.sizeInfo.selectOffsetRight<this.sizeInfo.totalMenuWidth-a),this.$menu.css({"max-height":o+"px",overflow:"hidden","min-height":s+"px"}),this.$menuInner.css({"max-height":t+"px","overflow-y":"auto","min-height":l+"px"}),this.sizeInfo.menuInnerHeight=Math.max(t,1),this.selectpicker.current.data.length&&this.selectpicker.current.data[this.selectpicker.current.data.length-1].position>this.sizeInfo.menuInnerHeight&&(this.sizeInfo.hasScrollBar=!0,this.sizeInfo.totalMenuWidth=this.sizeInfo.menuWidth+this.sizeInfo.scrollBarWidth,this.$menu.css("min-width",this.sizeInfo.totalMenuWidth)),this.dropdown&&this.dropdown._popper&&this.dropdown._popper.update()},setSize:function(e){if(this.liHeight(e),this.options.header&&this.$menu.css("padding-top",0),!1!==this.options.size){var t,i=this,s=z(window),n=0;if(this.setMenuSize(),this.options.liveSearch&&this.$searchbox.off("input.setMenuSize propertychange.setMenuSize").on("input.setMenuSize propertychange.setMenuSize",function(){return i.setMenuSize()}),"auto"===this.options.size?s.off("resize"+U+"."+this.selectId+".setMenuSize scroll"+U+"."+this.selectId+".setMenuSize").on("resize"+U+"."+this.selectId+".setMenuSize scroll"+U+"."+this.selectId+".setMenuSize",function(){return i.setMenuSize()}):this.options.size&&"auto"!=this.options.size&&this.selectpicker.current.elements.length>this.options.size&&s.off("resize"+U+"."+this.selectId+".setMenuSize scroll"+U+"."+this.selectId+".setMenuSize"),e)n=this.$menuInner[0].scrollTop;else if(!i.multiple){var o=i.$element[0];"number"==typeof(t=(o.options[o.selectedIndex]||{}).liIndex)&&!1!==i.options.size&&(n=(n=i.sizeInfo.liHeight*t)-i.sizeInfo.menuInnerHeight/2+i.sizeInfo.liHeight/2)}i.createView(!1,n)}},setWidth:function(){var i=this;"auto"===this.options.width?requestAnimationFrame(function(){i.$menu.css("min-width","0"),i.$element.on("loaded"+U,function(){i.liHeight(),i.setMenuSize();var e=i.$newElement.clone().appendTo("body"),t=e.css("width","auto").children("button").outerWidth();e.remove(),i.sizeInfo.selectWidth=Math.max(i.sizeInfo.totalMenuWidth,t),i.$newElement.css("width",i.sizeInfo.selectWidth+"px")})}):"fit"===this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width","").addClass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newElement.css("width","")),this.$newElement.hasClass("fit-width")&&"fit"!==this.options.width&&this.$newElement[0].classList.remove("fit-width")},selectPosition:function(){this.$bsContainer=z('<div class="bs-container" />');var s,n,o,l=this,r=z(this.options.container),e=function(e){var t={},i=l.options.display||!!z.fn.dropdown.Constructor.Default&&z.fn.dropdown.Constructor.Default.display;l.$bsContainer.addClass(e.attr("class").replace(/form-control|fit-width/gi,"")).toggleClass(j.DROPUP,e.hasClass(j.DROPUP)),s=e.offset(),r.is("body")?n={top:0,left:0}:((n=r.offset()).top+=parseInt(r.css("borderTopWidth"))-r.scrollTop(),n.left+=parseInt(r.css("borderLeftWidth"))-r.scrollLeft()),o=e.hasClass(j.DROPUP)?0:e[0].offsetHeight,(M.major<4||"static"===i)&&(t.top=s.top-n.top+o,t.left=s.left-n.left),t.width=e[0].offsetWidth,l.$bsContainer.css(t)};this.$button.on("click.bs.dropdown.data-api",function(){l.isDisabled()||(e(l.$newElement),l.$bsContainer.appendTo(l.options.container).toggleClass(j.SHOW,!l.$button.hasClass(j.SHOW)).append(l.$menu))}),z(window).off("resize"+U+"."+this.selectId+" scroll"+U+"."+this.selectId).on("resize"+U+"."+this.selectId+" scroll"+U+"."+this.selectId,function(){l.$newElement.hasClass(j.SHOW)&&e(l.$newElement)}),this.$element.on("hide"+U,function(){l.$menu.data("height",l.$menu.height()),l.$bsContainer.detach()})},setOptionStatus:function(){var e=this;if(e.noScroll=!1,e.selectpicker.view.visibleElements&&e.selectpicker.view.visibleElements.length)for(var t=0;t<e.selectpicker.view.visibleElements.length;t++){var i=e.selectpicker.current.data[t+e.selectpicker.view.position0],s=i.option;s&&(e.setDisabled(i.index,i.disabled),e.setSelected(i.index,s.selected))}},setSelected:function(e,t){var i,s,n=this.selectpicker.main.elements[e],o=this.selectpicker.main.data[e],l=void 0!==this.activeIndex,r=this.activeIndex===e||t&&!this.multiple&&!l;o.selected=t,s=n.firstChild,t&&(this.selectedIndex=e),n.classList.toggle("selected",t),n.classList.toggle("active",r),r&&(this.selectpicker.view.currentActive=n,this.activeIndex=e),s&&(s.classList.toggle("selected",t),s.classList.toggle("active",r),s.setAttribute("aria-selected",t)),r||!l&&t&&void 0!==this.prevActiveIndex&&((i=this.selectpicker.main.elements[this.prevActiveIndex]).classList.remove("active"),i.firstChild&&i.firstChild.classList.remove("active"))},setDisabled:function(e,t){var i,s=this.selectpicker.main.elements[e];this.selectpicker.main.data[e].disabled=t,i=s.firstChild,s.classList.toggle(j.DISABLED,t),i&&("4"===M.major&&i.classList.toggle(j.DISABLED,t),i.setAttribute("aria-disabled",t),t?i.setAttribute("tabindex",-1):i.setAttribute("tabindex",0))},isDisabled:function(){return this.$element[0].disabled},checkDisabled:function(){var e=this;this.isDisabled()?(this.$newElement[0].classList.add(j.DISABLED),this.$button.addClass(j.DISABLED).attr("tabindex",-1).attr("aria-disabled",!0)):(this.$button[0].classList.contains(j.DISABLED)&&(this.$newElement[0].classList.remove(j.DISABLED),this.$button.removeClass(j.DISABLED).attr("aria-disabled",!1)),-1!=this.$button.attr("tabindex")||this.$element.data("tabindex")||this.$button.removeAttr("tabindex")),this.$button.on("click",function(){return!e.isDisabled()})},togglePlaceholder:function(){var e=this.$element[0],t=e.selectedIndex,i=-1===t;i||e.options[t].value||(i=!0),this.$button.toggleClass("bs-placeholder",i)},tabIndex:function(){this.$element.data("tabindex")!==this.$element.attr("tabindex")&&-98!==this.$element.attr("tabindex")&&"-98"!==this.$element.attr("tabindex")&&(this.$element.data("tabindex",this.$element.attr("tabindex")),this.$button.attr("tabindex",this.$element.data("tabindex"))),this.$element.attr("tabindex",-98)},clickListener:function(){var S=this,t=z(document);function e(){S.options.liveSearch?S.$searchbox.trigger("focus"):S.$menuInner.trigger("focus")}function i(){S.dropdown&&S.dropdown._popper&&S.dropdown._popper.state.isCreated?e():requestAnimationFrame(i)}t.data("spaceSelect",!1),this.$button.on("keyup",function(e){/(32)/.test(e.keyCode.toString(10))&&t.data("spaceSelect")&&(e.preventDefault(),t.data("spaceSelect",!1))}),this.$newElement.on("show.bs.dropdown",function(){3<M.major&&!S.dropdown&&(S.dropdown=S.$button.data("bs.dropdown"),S.dropdown._menu=S.$menu[0])}),this.$button.on("click.bs.dropdown.data-api",function(){S.$newElement.hasClass(j.SHOW)||S.setSize()}),this.$element.on("shown"+U,function(){S.$menuInner[0].scrollTop!==S.selectpicker.view.scrollTop&&(S.$menuInner[0].scrollTop=S.selectpicker.view.scrollTop),3<M.major?requestAnimationFrame(i):e()}),this.$menuInner.on("click","li a",function(e,t){var i=z(this),s=S.isVirtual()?S.selectpicker.view.position0:0,n=S.selectpicker.current.data[i.parent().index()+s],o=n.index,l=E(S.$element[0]),r=S.$element.prop("selectedIndex"),a=!0;if(S.multiple&&1!==S.options.maxOptions&&e.stopPropagation(),e.preventDefault(),!S.isDisabled()&&!i.parent().hasClass(j.DISABLED)){var c=S.$element.find("option"),d=n.option,h=z(d),p=d.selected,u=h.parent("optgroup"),f=u.find("option"),m=S.options.maxOptions,v=u.data("maxOptions")||!1;if(o===S.activeIndex&&(t=!0),t||(S.prevActiveIndex=S.activeIndex,S.activeIndex=void 0),S.multiple){if(d.selected=!p,S.setSelected(o,!p),i.trigger("blur"),!1!==m||!1!==v){var g=m<c.filter(":selected").length,b=v<u.find("option:selected").length;if(m&&g||v&&b)if(m&&1==m){c.prop("selected",!1),h.prop("selected",!0);for(var w=0;w<c.length;w++)S.setSelected(w,!1);S.setSelected(o,!0)}else if(v&&1==v){u.find("option:selected").prop("selected",!1),h.prop("selected",!0);for(w=0;w<f.length;w++){d=f[w];S.setSelected(c.index(d),!1)}S.setSelected(o,!0)}else{var x="string"==typeof S.options.maxOptionsText?[S.options.maxOptionsText,S.options.maxOptionsText]:S.options.maxOptionsText,I="function"==typeof x?x(m,v):x,k=I[0].replace("{n}",m),$=I[1].replace("{n}",v),y=z('<div class="notify"></div>');I[2]&&(k=k.replace("{var}",I[2][1<m?0:1]),$=$.replace("{var}",I[2][1<v?0:1])),h.prop("selected",!1),S.$menu.append(y),m&&g&&(y.append(z("<div>"+k+"</div>")),a=!1,S.$element.trigger("maxReached"+U)),v&&b&&(y.append(z("<div>"+$+"</div>")),a=!1,S.$element.trigger("maxReachedGrp"+U)),setTimeout(function(){S.setSelected(o,!1)},10),y.delay(750).fadeOut(300,function(){z(this).remove()})}}}else c.prop("selected",!1),d.selected=!0,S.setSelected(o,!0);!S.multiple||S.multiple&&1===S.options.maxOptions?S.$button.trigger("focus"):S.options.liveSearch&&S.$searchbox.trigger("focus"),a&&(l!=E(S.$element[0])&&S.multiple||r!=S.$element.prop("selectedIndex")&&!S.multiple)&&(C=[d.index,h.prop("selected"),l],S.$element.triggerNative("change"))}}),this.$menu.on("click","li."+j.DISABLED+" a, ."+j.POPOVERHEADER+", ."+j.POPOVERHEADER+" :not(.close)",function(e){e.currentTarget==this&&(e.preventDefault(),e.stopPropagation(),S.options.liveSearch&&!z(e.target).hasClass("close")?S.$searchbox.trigger("focus"):S.$button.trigger("focus"))}
22667),this.$menuInner.on("click",".divider, .dropdown-header",function(e){e.preventDefault(),e.stopPropagation(),S.options.liveSearch?S.$searchbox.trigger("focus"):S.$button.trigger("focus")}),this.$menu.on("click","."+j.POPOVERHEADER+" .close",function(){S.$button.trigger("click")}),this.$searchbox.on("click",function(e){e.stopPropagation()}),this.$menu.on("click",".actions-btn",function(e){S.options.liveSearch?S.$searchbox.trigger("focus"):S.$button.trigger("focus"),e.preventDefault(),e.stopPropagation(),z(this).hasClass("bs-select-all")?S.selectAll():S.deselectAll()}),this.$element.on("change"+U,function(){S.render(),S.$element.trigger("changed"+U,C),C=null}).on("focus"+U,function(){S.options.mobile||S.$button.trigger("focus")})},liveSearchListener:function(){var u=this,f=document.createElement("li");this.$button.on("click.bs.dropdown.data-api",function(){u.$searchbox.val()&&u.$searchbox.val("")}),this.$searchbox.on("click.bs.dropdown.data-api focus.bs.dropdown.data-api touchend.bs.dropdown.data-api",function(e){e.stopPropagation()}),this.$searchbox.on("input propertychange",function(){var e=u.$searchbox.val();if(u.selectpicker.search.elements=[],u.selectpicker.search.data=[],e){var t=[],i=e.toUpperCase(),s={},n=[],o=u._searchStyle(),l=u.options.liveSearchNormalize;l&&(i=w(i)),u._$lisSelected=u.$menuInner.find(".selected");for(var r=0;r<u.selectpicker.main.data.length;r++){var a=u.selectpicker.main.data[r];s[r]||(s[r]=$(a,i,o,l)),s[r]&&void 0!==a.headerIndex&&-1===n.indexOf(a.headerIndex)&&(0<a.headerIndex&&(s[a.headerIndex-1]=!0,n.push(a.headerIndex-1)),s[a.headerIndex]=!0,n.push(a.headerIndex),s[a.lastIndex+1]=!0),s[r]&&"optgroup-label"!==a.type&&n.push(r)}r=0;for(var c=n.length;r<c;r++){var d=n[r],h=n[r-1],p=(a=u.selectpicker.main.data[d],u.selectpicker.main.data[h]);("divider"!==a.type||"divider"===a.type&&p&&"divider"!==p.type&&c-1!==r)&&(u.selectpicker.search.data.push(a),t.push(u.selectpicker.main.elements[d]))}u.activeIndex=void 0,u.noScroll=!0,u.$menuInner.scrollTop(0),u.selectpicker.search.elements=t,u.createView(!0),t.length||(f.className="no-results",f.innerHTML=u.options.noneResultsText.replace("{0}",'"'+O(e)+'"'),u.$menuInner[0].firstChild.appendChild(f))}else u.$menuInner.scrollTop(0),u.createView(!1)})},_searchStyle:function(){return this.options.liveSearchStyle||"contains"},val:function(e){if(void 0===e)return this.$element.val();var t=E(this.$element[0]);return C=[null,null,t],this.$element.val(e).trigger("changed"+U,C),this.render(),C=null,this.$element},changeAll:function(e){if(this.multiple){void 0===e&&(e=!0);var t=this.$element[0],i=0,s=0,n=E(t);t.classList.add("bs-select-hidden");for(var o=0,l=this.selectpicker.current.elements.length;o<l;o++){var r=this.selectpicker.current.data[o],a=r.option;a&&!r.disabled&&"divider"!==r.type&&(r.selected&&i++,(a.selected=e)&&s++)}t.classList.remove("bs-select-hidden"),i!==s&&(this.setOptionStatus(),this.togglePlaceholder(),C=[null,null,n],this.$element.triggerNative("change"))}},selectAll:function(){return this.changeAll(!0)},deselectAll:function(){return this.changeAll(!1)},toggle:function(e){(e=e||window.event)&&e.stopPropagation(),this.$button.trigger("click.bs.dropdown.data-api")},keydown:function(e){var t,i,s,n,o,l=z(this),r=l.hasClass("dropdown-toggle"),a=(r?l.closest(".dropdown"):l.closest(V.MENU)).data("this"),c=a.findLis(),d=!1,h=e.which===H&&!r&&!a.options.selectOnTab,p=_.test(e.which)||h,u=a.$menuInner[0].scrollTop,f=a.isVirtual(),m=!0===f?a.selectpicker.view.position0:0;if(!(i=a.$newElement.hasClass(j.SHOW))&&(p||48<=e.which&&e.which<=57||96<=e.which&&e.which<=105||65<=e.which&&e.which<=90)&&(a.$button.trigger("click.bs.dropdown.data-api"),a.options.liveSearch))a.$searchbox.trigger("focus");else{if(e.which===A&&i&&(e.preventDefault(),a.$button.trigger("click.bs.dropdown.data-api").trigger("focus")),p){if(!c.length)return;void 0===(t=!0===f?c.index(c.filter(".active")):a.activeIndex)&&(t=-1),-1!==t&&((s=a.selectpicker.current.elements[t+m]).classList.remove("active"),s.firstChild&&s.firstChild.classList.remove("active")),e.which===P?(-1!==t&&t--,t+m<0&&(t+=c.length),a.selectpicker.view.canHighlight[t+m]||-1===(t=a.selectpicker.view.canHighlight.slice(0,t+m).lastIndexOf(!0)-m)&&(t=c.length-1)):(e.which===W||h)&&(++t+m>=a.selectpicker.view.canHighlight.length&&(t=0),a.selectpicker.view.canHighlight[t+m]||(t=t+1+a.selectpicker.view.canHighlight.slice(t+m+1).indexOf(!0))),e.preventDefault();var v=m+t;e.which===P?0===m&&t===c.length-1?(a.$menuInner[0].scrollTop=a.$menuInner[0].scrollHeight,v=a.selectpicker.current.elements.length-1):d=(o=(n=a.selectpicker.current.data[v]).position-n.height)<u:(e.which===W||h)&&(0===t?v=a.$menuInner[0].scrollTop=0:d=u<(o=(n=a.selectpicker.current.data[v]).position-a.sizeInfo.menuInnerHeight)),(s=a.selectpicker.current.elements[v])&&(s.classList.add("active"),s.firstChild&&s.firstChild.classList.add("active")),a.activeIndex=a.selectpicker.current.data[v].index,a.selectpicker.view.currentActive=s,d&&(a.$menuInner[0].scrollTop=o),a.options.liveSearch?a.$searchbox.trigger("focus"):l.trigger("focus")}else if(!l.is("input")&&!q.test(e.which)||e.which===D&&a.selectpicker.keydown.keyHistory){var g,b,w=[];e.preventDefault(),a.selectpicker.keydown.keyHistory+=T[e.which],a.selectpicker.keydown.resetKeyHistory.cancel&&clearTimeout(a.selectpicker.keydown.resetKeyHistory.cancel),a.selectpicker.keydown.resetKeyHistory.cancel=a.selectpicker.keydown.resetKeyHistory.start(),b=a.selectpicker.keydown.keyHistory,/^(.)\1+$/.test(b)&&(b=b.charAt(0));for(var x=0;x<a.selectpicker.current.data.length;x++){var I=a.selectpicker.current.data[x];$(I,b,"startsWith",!0)&&a.selectpicker.view.canHighlight[x]&&w.push(I.index)}if(w.length){var k=0;c.removeClass("active").find("a").removeClass("active"),1===b.length&&(-1===(k=w.indexOf(a.activeIndex))||k===w.length-1?k=0:k++),g=w[k],d=0<u-(n=a.selectpicker.main.data[g]).position?(o=n.position-n.height,!0):(o=n.position-a.sizeInfo.menuInnerHeight,n.position>u+a.sizeInfo.menuInnerHeight),(s=a.selectpicker.main.elements[g]).classList.add("active"),s.firstChild&&s.firstChild.classList.add("active"),a.activeIndex=w[k],s.firstChild.focus(),d&&(a.$menuInner[0].scrollTop=o),l.trigger("focus")}}
22667i&&(e.which===D&&!a.selectpicker.keydown.keyHistory||e.which===N||e.which===H&&a.options.selectOnTab)&&(e.which!==D&&e.preventDefault(),a.options.liveSearch&&e.which===D||(a.$menuInner.find(".active a").trigger("click",!0),l.trigger("focus"),a.options.liveSearch||(e.preventDefault(),z(document).data("spaceSelect",!0))))}},mobile:function(){this.$element[0].classList.add("mobile-device")},refresh:function(){var e=z.extend({},this.options,this.$element.data());this.options=e,this.checkDisabled(),this.setStyle(),this.render(),this.createLi(),this.setWidth(),this.setSize(!0),this.$element.trigger("refreshed"+U)},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},remove:function(){this.$newElement.remove(),this.$element.remove()},destroy:function(){this.$newElement.before(this.$element).remove(),this.$bsContainer?this.$bsContainer.remove():this.$menu.remove(),this.$element.off(U).removeData("selectpicker").removeClass("bs-select-hidden selectpicker"),z(window).off(U+"."+this.selectId)}};var X=z.fn.selectpicker;z.fn.selectpicker=Q,z.fn.selectpicker.Constructor=J,z.fn.selectpicker.noConflict=function(){return z.fn.selectpicker=X,this},z(document).off("keydown.bs.dropdown.data-api").on("keydown"+U,'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input',J.prototype.keydown).on("focusin.modal",'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input',function(e){e.stopPropagation()}),z(window).on("load"+U+".data-api",function(){z(".selectpicker").each(function(){var e=z(this);Q.call(e,e.data())})})}(e)}); 22668//# sourceMappingURL=bootstrap-select.min.js.map 22669!function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function s(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function r(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?s(Object(i),!0).forEach((function(t){n(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):s(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function l(e,t){var i;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return a(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?a(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,s=function(){};return{s:s,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,l=!0,o=!1;return{s:function(){i=e[Symbol.iterator]()},n:function(){var e=i.next();return l=e.done,e},e:function(e){o=!0,r=e},f:function(){try{l||null==i.return||i.return()}finally{if(o)throw r}}}}var o=86400,u=function(e,t){if(null===e)return null;if("number"!=typeof t.step)return e;var i,n=e%(60*t.step);return(n-=(null!==(i=t.minTime())&&void 0!==i?i:0)%(60*t.step))>=30*t.step?e+=60*t.step-n:e-=n,function(e,t){if(e==o&&t.show2400)return e;return e%o}(e,t)};var c,m={appendTo:"body",className:null,closeOnWindowScroll:!1,disableTextInput:!1,disableTimeRanges:[],disableTouchKeyboard:!1,durationTime:null,forceRoundTime:!1,lang:{},listWidth:null,maxTime:null,minTime:null,noneOption:!1,orientation:"l",roundingFunction:u,scrollDefault:null,selectOnBlur:!1,show2400:!1,showDuration:!1,showOn:["click","focus"],showOnFocus:!0,step:30,stopScrollPropagation:!1,timeFormat:"g:ia",typeaheadHighlight:!0,useSelect:!1,wrapHours:!0},p={am:"am",pm:"pm",AM:"AM",PM:"PM",decimal:".",mins:"mins",hr:"hr",hrs:"hrs"},f={bubbles:!0,cancelable:!1,detail:null},h=function(){function n(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(this,n),this._handleFormatValue=this._handleFormatValue.bind(this),this._handleKeyUp=this._handleKeyUp.bind(this),this.targetEl=e;var s=n.extractAttrOptions(e,Object.keys(m));this.settings=this.parseSettings(r(r(r({},m),i),s))}var s,a,u;return s=n,u=[{key:"extractAttrOptions",value:function(e,t){var i,n={},s=l(t);try{for(s.s();!(i=s.n()).done;){var r=i.value;r in e.dataset&&(n[r]=e.dataset[r])}}catch(e){s.e(e)}finally{s.f()}return n}},{key:"isVisible",value:function(e){var t=e[0];return t.offsetWidth>0&&t.offsetHeight>0}},{key:"hideAll",value:function(){var e,t=l(document.getElementsByClassName("ui-timepicker-input"));try{for(t.s();!(e=t.n()).done;){var i=e.value.timepickerObj;i&&i.hideMe()}}catch(e){t.e(e)}finally{t.f()}}}],(a=[{key:"hideMe",value:function(){if(this.settings.useSelect)this.targetEl.blur();else if(this.list&&n.isVisible(this.list)){this.settings.selectOnBlur&&this._selectValue(),this.list.hide();var e=new CustomEvent("hideTimepicker",f);
22669this.targetEl.dispatchEvent(e)}}},{key:"_findRow",value:function(e){if(!e&&0!==e)return!1;var t=!1;return e=this.settings.roundingFunction(e,this.settings),!!this.list&&(this.list.find("li").each((function(i,n){var s=parseInt(n.dataset.time);if(!isNaN(s))return s==e?(t=n,!1):void 0})),t)}},{key:"_hideKeyboard",value:function(){return(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&this.settings.disableTouchKeyboard}},{key:"_setTimeValue",value:function(e,t){if("INPUT"===this.targetEl.nodeName){null===e&&""==this.targetEl.value||(this.targetEl.value=e);var i=this;i.settings.useSelect&&"select"!=t&&i.list&&i.list.val(i._roundAndFormatTime(i.anytime2int(e)))}var n=new CustomEvent("selectTime",f);if(this.selectedValue!=e){this.selectedValue=e;var s=new CustomEvent("changeTime",f),r=new CustomEvent("change",Object.assign(f,{detail:"timepicker"}));return"select"==t?(this.targetEl.dispatchEvent(n),this.targetEl.dispatchEvent(s),this.targetEl.dispatchEvent(r)):-1==["error","initial"].indexOf(t)&&this.targetEl.dispatchEvent(s),!0}return-1==["error","initial"].indexOf(t)&&this.targetEl.dispatchEvent(n),!1}},{key:"_getTimeValue",value:function(){return"INPUT"===this.targetEl.nodeName?this.targetEl.value:this.selectedValue}},{key:"_selectValue",value:function(){var e=this;e.settings;var t=e.list.find(".ui-timepicker-selected");if(t.hasClass("ui-timepicker-disabled"))return!1;if(!t.length)return!0;var i=t.get(0).dataset.time;if(i){var n=parseInt(i);isNaN(n)||(i=n)}return null!==i&&("string"!=typeof i&&(i=e._int2time(i)),e._setTimeValue(i,"select")),!0}},{key:"anytime2int",value:function(t){return"number"==typeof t?t:"string"==typeof t?this.time2int(t):"object"===e(t)&&t instanceof Date?3600*t.getHours()+60*t.getMinutes()+t.getSeconds():"function"==typeof t?t():null}},{key:"time2int",value:function(e){if(""===e||null==e)return null;if("now"===e)return this.anytime2int(new Date);if("string"!=typeof e)return e;"a"!=(e=e.toLowerCase().replace(/[\s\.]/g,"")).slice(-1)&&"p"!=e.slice(-1)||(e+="m");var t=/^(([^0-9]*))?([0-9]?[0-9])(([0-5][0-9]))?(([0-5][0-9]))?(([^0-9]*))$/;e.match(/\W/)&&(t=/^(([^0-9]*))?([0-9]?[0-9])(\W+([0-5][0-9]?))?(\W+([0-5][0-9]))?(([^0-9]*))$/);var i=e.match(t);if(!i)return null;var n=parseInt(1*i[3],10),s=i[2]||i[9],r=n,a=1*i[5]||0,l=1*i[7]||0;if(s||2!=i[3].length||"0"!=i[3][0]||(s="am"),n<=12&&s){var u=(s=s.trim())==this.settings.lang.pm||s==this.settings.lang.PM;r=12==n?u?12:0:n+(u?12:0)}else if(3600*n+60*a+l>=o+(this.settings.show2400?1:0)){if(!1===this.settings.wrapHours)return null;r=n%24}var c=3600*r+60*a+l;if(n<12&&!s&&this.settings._twelveHourTime&&this.settings.scrollDefault()){var m=c-this.settings.scrollDefault();m<0&&m>=-43200&&(c=(c+43200)%o)}return c}},{key:"intStringDateOrFunc2func",value:function(e){var t=this;return null==e?function(){return null}:"function"==typeof e?function(){return t.anytime2int(e())}:function(){return t.anytime2int(e)}}},{key:"parseSettings",value:function(e){if(e.lang=r(r({},p),e.lang),this.settings=e,e.listWidth&&(e.listWidth=this.anytime2int(e.listWidth)),e.minTime=this.intStringDateOrFunc2func(e.minTime),e.maxTime=this.intStringDateOrFunc2func(e.maxTime),e.durationTime=this.intStringDateOrFunc2func(e.durationTime),e.scrollDefault?e.scrollDefault=this.intStringDateOrFunc2func(e.scrollDefault):e.scrollDefault=e.minTime,"string"==typeof e.timeFormat&&e.timeFormat.match(/[gh]/)&&(e._twelveHourTime=!0),!1===e.showOnFocus&&-1!=e.showOn.indexOf("focus")&&e.showOn.splice(e.showOn.indexOf("focus"),1),e.disableTimeRanges||(e.disableTimeRanges=[]),e.disableTimeRanges.length>0){for(var t in e.disableTimeRanges)e.disableTimeRanges[t]=[this.anytime2int(e.disableTimeRanges[t][0]),this.anytime2int(e.disableTimeRanges[t][1])];for(e.disableTimeRanges=e.disableTimeRanges.sort((function(e,t){return e[0]-t[0]})),t=e.disableTimeRanges.length-1;t>0;t--)e.disableTimeRanges[t][0]<=e.disableTimeRanges[t-1][1]&&(e.disableTimeRanges[t-1]=[Math.min(e.disableTimeRanges[t][0],e.disableTimeRanges[t-1][0]),Math.max(e.disableTimeRanges[t][1],e.disableTimeRanges[t-1][1])],e.disableTimeRanges.splice(t,1)
vendor: 11,364 bytes, line 22669
22669)}return e}},{key:"_disableTextInputHandler",value:function(e){switch(e.keyCode){case 13:case 9:return;default:e.preventDefault()}}},{key:"_int2duration",value:function(e,t){e=Math.abs(e);var i,n,s=Math.round(e/60),r=[];return s<60?r=[s,this.settings.lang.mins]:(i=Math.floor(s/60),n=s%60,30==t&&30==n&&(i+=this.settings.lang.decimal+5),r.push(i),r.push(1==i?this.settings.lang.hr:this.settings.lang.hrs),30!=t&&n&&(r.push(n),r.push(this.settings.lang.mins))),r.join(" ")}},{key:"_roundAndFormatTime",value:function(e){if(null!==(e=this.settings.roundingFunction(e,this.settings)))return this._int2time(e)}},{key:"_int2time",value:function(e){if("number"!=typeof e)return null;var t=parseInt(e%60),i=parseInt(e/60%60),n=parseInt(e/3600%24),s=new Date(1970,0,2,n,i,t,0);if(isNaN(s.getTime()))return null;if("function"==typeof this.settings.timeFormat)return this.settings.timeFormat(s);for(var r,a,l="",u=0;u<this.settings.timeFormat.length;u++)switch(a=this.settings.timeFormat.charAt(u)){case"a":l+=s.getHours()>11?this.settings.lang.pm:this.settings.lang.am;break;case"A":l+=s.getHours()>11?this.settings.lang.PM:this.settings.lang.AM;break;case"g":l+=0==(r=s.getHours()%12)?"12":r;break;case"G":r=s.getHours(),e===o&&(r=this.settings.show2400?24:0),l+=r;break;case"h":0!=(r=s.getHours()%12)&&r<10&&(r="0"+r),l+=0===r?"12":r;break;case"H":r=s.getHours(),e===o&&(r=this.settings.show2400?24:0),l+=r>9?r:"0"+r;break;case"i":l+=(i=s.getMinutes())>9?i:"0"+i;break;case"s":l+=(t=s.getSeconds())>9?t:"0"+t;break;case"\\":u++,l+=this.settings.timeFormat.charAt(u);break;default:l+=a}return l}},{key:"_setSelected",value:function(){var e=this.list;e.find("li").removeClass("ui-timepicker-selected");var t=this.anytime2int(this._getTimeValue());if(null!==t){var i=this._findRow(t);if(i){var n=i.getBoundingClientRect(),s=e.get(0).getBoundingClientRect(),r=n.top-s.top;if(r+n.height>s.height||r<0){var a=e.scrollTop()+(n.top-s.top)-n.height;e.scrollTop(a)}var l=parseInt(i.dataset.time);(this.settings.forceRoundTime||l===t)&&i.classList.add("ui-timepicker-selected")}}}},{key:"_isFocused",value:function(e){return e===document.activeElement}},{key:"_handleFormatValue",value:function(e){e&&"timepicker"==e.detail||this._formatValue(e)}},{key:"_formatValue",value:function(e,t){if(""!==this.targetEl.value){if(!this._isFocused(this.targetEl)||e&&"change"==e.type){var i=this.settings,n=this.anytime2int(this.targetEl.value);if(null!==n){var s=!1;null!==i.minTime&&null!==i.maxTime&&(n<i.minTime()||n>i.maxTime())&&(s=!0);var r,a=l(i.disableTimeRanges);try{for(a.s();!(r=a.n()).done;){var o=r.value;if(n>=o[0]&&n<o[1]){s=!0;break}}}catch(e){a.e(e)}finally{a.f()}if(i.forceRoundTime){var u=i.roundingFunction(n,i);u!=n&&(n=u,t=null)}var c=this._int2time(n);if(s){this._setTimeValue(c);var m=new CustomEvent("timeRangeError",f);this.targetEl.dispatchEvent(m)}else this._setTimeValue(c,t)}else{var p=new CustomEvent("timeFormatError",f);this.targetEl.dispatchEvent(p)}}}else this._setTimeValue(null,t)}},{key:"_generateNoneElement",value:function(t,i){var n,s,r,a;return"object"==e(t)?(n=t.label,s=t.className,r=t.value):"string"==typeof t?(n=t,r=""):$.error("Invalid noneOption value"),i?(a=document.createElement("option")).value=r:(a=document.createElement("li")).dataset.time=String(r),a.innerText=n,a.classList.add(s),a}},{key:"_handleKeyUp",value:function(e){var t=this;if(!this.list||!n.isVisible(this.list)||this.settings.disableTextInput)return!0;if("paste"!==e.type&&"cut"!==e.type)switch(e.keyCode){case 96:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 65:case 77:case 80:case 186:case 8:case 46:this.settings.typeaheadHighlight?this._setSelected():this.list.hide()}else setTimeout((function(){t.settings.typeaheadHighlight?t._setSelected():t.list.hide()}),0)}}])&&i(s.prototype,a),u&&i(s,u),n}();!function(){if("function"==typeof window.CustomEvent)return!1;window.CustomEvent=function(e,t){t||(t={}),t=Object.assign(f,t);var i=document.createEvent("CustomEvent");return i.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),i}}(),c=function(t){var i={init:function(e){return this.each((function(){var s=t(this),a=new h(this,e),l=a.settings;if(l.lang,this.timepickerObj=a,s.addClass("ui-timepicker-input"),l.useSelect)n(s);else{if(s.prop("autocomplete","off"),l.showOn)for(var o in l.showOn)s.on(l.showOn[o]+".timepicker",i.show);s.on("change.timepicker",a._handleFormatValue),s.on("keydown.timepicker",r),s.on("keyup.timepicker",a._handleKeyUp),l.disableTextInput&&s.on("keydown.timepicker",a._disableTextInputHandler),s.on("cut.timepicker",a._handleKeyUp),s.on("paste.timepicker",a._handleKeyUp),a._formatValue(null,"initial")}}))},show:function(e){var i=t(this),r=i[0].timepickerObj,a=r.settings;if(e&&e.preventDefault(),a.useSelect)r.list.trigger("focus");else{r._hideKeyboard()&&i.trigger("blur");var l=r.list;if(!i.prop("readonly")&&(n(i),l=r.list,!h.isVisible(l))){i.is("input")&&(r.selectedValue=i.val()),r._setSelected(),h.hideAll(),"number"==typeof a.listWidth&&l.width(i.outerWidth()*a.listWidth),l.show();var o={};a.orientation.match(/r/)?o.left=i.offset().left+i.outerWidth()-l.outerWidth()+parseInt(l.css("marginLeft").replace("px",""),10):a.orientation.match(/l/)?o.left=i.offset().left+parseInt(l.css("marginLeft").replace("px",""),10):a.orientation.match(/c/)&&(o.left=i.offset().left+(i.outerWidth()-l.outerWidth())/2+parseInt(l.css("marginLeft").replace("px",""),10)),"t"==(a.orientation.match(/t/)?"t":a.orientation.match(/b/)?"b":i.offset().top+i.outerHeight(!0)+l.outerHeight()>t(window).height()+t(window).scrollTop()?"t":"b")?(l.addClass("ui-timepicker-positioned-top"),o.top=i.offset().top-l.outerHeight()+parseInt(l.css("marginTop").replace("px",""),10)):(l.removeClass("ui-timepicker-positioned-top"),o.top=i.offset().top+i.outerHeight()+parseInt(l.css("marginTop").replace("px",""),10)),l.offset(o);var u=l.find(".ui-timepicker-selected");if(!u.length){var c=r.anytime2int(r._getTimeValue());null!==c?u=t(r._findRow(c)):a.scrollDefault()&&(u=t(r._findRow(a.scrollDefault())))}if(u.length&&!u.hasClass("ui-timepicker-disabled")||(u=l.find("li:not(.ui-timepicker-disabled):first")),u&&u.length){var m=l.scrollTop()+u.position().top-u.outerHeight();l.scrollTop(m)}else l.scrollTop(0);return a.stopScrollPropagation&&t(document).on("wheel.ui-timepicker",".ui-timepicker-wrapper",(function(e){e.preventDefault();var i=t(this).scrollTop();t(this).scrollTop(i+e.originalEvent.deltaY)})),t(document).on("mousedown.ui-timepicker",s),window.addEventListener("resize",s),a.closeOnWindowScroll&&t(document).on("scroll.ui-timepicker",s),i.trigger("showTimepicker"),this}}},hide:function(e){var t=this[0].timepickerObj;return t&&t.hideMe(),h.hideAll(),this},option:function(i,s){return"string"==typeof i&&void 0===s?this[0].timepickerObj.settings[i]:this.each((function(){var r=t(this),a=r[0].timepickerObj,l=a.settings,o=a.list;"object"==e(i)?l=t.extend(l,i):"string"==typeof i&&(l[i]=s),l=a.parseSettings(l),a.settings=l,a._formatValue({type:"change"},"initial"),o&&(o.remove(),a.list=null),l.useSelect&&n(r)}))},getSecondsFromMidnight:function(){var e=this[0].timepickerObj;return e.anytime2int(e._getTimeValue())},getTime:function(e){var t=this[0].timepickerObj,i=t._getTimeValue();if(!i)return null;var n=t.anytime2int(i);if(null===n)return null;e||(e=new Date);var s=new Date(e);return s.setHours(n/3600),s.setMinutes(n%3600/60),s.setSeconds(n%60),s.setMilliseconds(0),s},isVisible:function(){var e=this[0].timepickerObj;return!!(e&&e.list&&h.isVisible(e.list))},setTime:function(e){var t=this[0].timepickerObj,i=t.settings;if(i.forceRoundTime)var n=t._roundAndFormatTime(t.anytime2int(e));else n=t._int2time(t.anytime2int(e));return e&&null===n&&i.noneOption&&(n=e),t._setTimeValue(n,"initial"),t._formatValue({type:"change"},"initial"),t&&t.list&&t._setSelected(),this},remove:function(){var e=this;if(e.hasClass("ui-timepicker-input")){var t=e[0].timepickerObj,i=t.settings;return e.removeAttr("autocomplete","off"),e.removeClass("ui-timepicker-input"),e.removeData("timepicker-obj"),e.off(".timepicker"),t.list&&t.list.remove(),i.useSelect&&e.show(),t.list=null,this}}};function n(e){var n,s,r,a=e[0].timepickerObj,l=a.list,c=a.settings;if(l&&l.length&&(l.remove(),a.list=null),c.useSelect){l=t("<select></select>",{class:"ui-timepicker-select"}),e.attr("name")&&l.attr("name","ui-timepicker-"+e.attr("name"));var m=l}else l=t("<ul></ul>",{class:"ui-timepicker-list"}),(m=t("<div></div>",{class:"ui-timepicker-wrapper",tabindex:-1})).css({display:"none",position:"absolute"}).append(l);if(c.noneOption)if(!0===c.noneOption&&(c.noneOption=c.useSelect?"Time...":"None"),t.isArray(c.noneOption)){for(var p in c.noneOption)if(parseInt(p,10)==p){var f=a._generateNoneElement(c.noneOption[p],c.useSelect);l.append(f)}}else f=a._generateNoneElement(c.noneOption,c.useSelect),l.append(f);c.className&&m.addClass(c.className),null===c.minTime&&null===c.durationTime||!c.showDuration||("function"==typeof c.step||c.step,m.addClass("ui-timepicker-with-duration"),m.addClass("ui-timepicker-step-"+c.step));var h=null!==(n=c.durationTime())&&void 0!==n?n:c.minTime(),d=null!==(s=c.minTime())&&void 0!==s?s:0,g=null!==(r=c.maxTime())&&void 0!==r?r:d+o-1;g<d&&(g+=o),86399===g&&"string"===t.type(c.timeFormat)&&c.show2400&&(g=o);var v=c.disableTimeRanges,y=0,b=v.length,k=c.step;"function"!=typeof k&&(k=function(){return c.step}),p=d;for(var T=0;p<=g;p+=60*k(++T)){var w,O=p,_=a._int2time(O);if(c.useSelect?(w=t("<option></option>",{value:_})).text(_):((w=t("<li></li>")).addClass(O%o<43200?"ui-timepicker-am":"ui-timepicker-pm"),w.attr("data-time",u(O,c)),w.text(_)),(null!==c.minTime()||null!==c.durationTime())&&c.showDuration){var E=a._int2duration(p-h,c.step);if(c.useSelect)w.text(w.text()+" ("+E+")");else{var S=t("<span></span>",{class:"ui-timepicker-duration"});S.text(" ("+E+")"),w.append(S)}}y<b&&(O>=v[y][1]&&(y+=1),v[y]&&O>=v[y][0]&&O<v[y][1]&&(c.useSelect?w.prop("disabled",!0):w.addClass("ui-timepicker-disabled"))),l.append(w)}if(m.data("timepicker-input",e),a.list=m,c.useSelect)e.val()&&l.val(a._roundAndFormatTime(a.anytime2int(e.val()))),l.on("focus",(function(){t(this).data("timepicker-input").trigger("showTimepicker")})),l.on("blur",(function(){t(this).data("timepicker-input").trigger("hideTimepicker")})),l.on("change",(function(){a._setTimeValue(t(this).val(),"select")})),a._setTimeValue(l.val(),"initial"),e.hide().after(l);else{var j=c.appendTo;"string"==typeof j?j=t(j):"function"==typeof j&&(j=j(e)),j.append(m),a._setSelected(),l.on("mousedown click","li",(function(n){e.off("focus.timepicker"),e.on("focus.timepicker-ie-hack",(function(){e.off("focus.timepicker-ie-hack"),e.on("focus.timepicker",i.show)})),a._hideKeyboard()||e[0].focus(),l.find("li").removeClass("ui-timepicker-selected"),t(this).addClass("ui-timepicker-selected"),a._selectValue()&&(e.trigger("hideTimepicker"),l.on("mouseup.timepicker click.timepicker","li",(function(e){l.off("mouseup.timepicker click.timepicker"),m.hide()})))}))}}function s(e){if("focus"!=e.type||e.target!=window){var i=t(e.target);i.closest(".ui-timepicker-input").length||i.closest(".ui-timepicker-wrapper").length||(h.hideAll(),t(document).unbind(".ui-timepicker"),t(window).unbind(".ui-timepicker"))}}function r(e){var n=t(this),s=n[0].timepickerObj,r=s.list;
22669if(!r||!h.isVisible(r)){if(40!=e.keyCode)return!0;i.show.call(n.get(0)),r=s.list,s._hideKeyboard()||n.trigger("focus")}switch(e.keyCode){case 13:return s._selectValue()&&(s._formatValue({type:"change"}),s.hideMe()),e.preventDefault(),!1;case 38:var a=r.find(".ui-timepicker-selected");return a.length?a.is(":first-child")||(a.removeClass("ui-timepicker-selected"),a.prev().addClass("ui-timepicker-selected"),a.prev().position().top<a.outerHeight()&&r.scrollTop(r.scrollTop()-a.outerHeight())):(r.find("li").each((function(e,i){if(t(i).position().top>0)return a=t(i),!1})),a.addClass("ui-timepicker-selected")),!1;case 40:return 0===(a=r.find(".ui-timepicker-selected")).length?(r.find("li").each((function(e,i){if(t(i).position().top>0)return a=t(i),!1})),a.addClass("ui-timepicker-selected")):a.is(":last-child")||(a.removeClass("ui-timepicker-selected"),a.next().addClass("ui-timepicker-selected"),a.next().position().top+2*a.outerHeight()>r.outerHeight()&&r.scrollTop(r.scrollTop()+a.outerHeight())),!1;case 27:r.find("li").removeClass("ui-timepicker-selected"),s.hideMe();break;case 9:s.hideMe();break;default:return!0}}t.fn.timepicker=function(n){return this.length?i[n]?this.hasClass("ui-timepicker-input")?i[n].apply(this,Array.prototype.slice.call(arguments,1)):this:"object"!==e(n)&&n?void t.error("Method "+n+" does not exist on jQuery.timepicker"):i.init.apply(this,arguments):this},t.fn.timepicker.defaults=m},"object"===("undefined"==typeof exports?"undefined":e(exports))&&exports&&"object"===("undefined"==typeof module?"undefined":e(module))&&module&&module.exports===exports?c(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],c):c(jQuery)}(); 22670$(document).ready(function () { 22671 setTimeout(() => { 22672 $('body').css('opacity', 1); 22673 }, 1000); 22674 $(window).resize(function(){ 22675 const $height = $(".nav-contain.container-fluid").outerHeight(); 22676 var $el = $('.article-white-navarea'); 22677 $el.css({'position': 'fixed', 'top': '0px'}); 22678 $el.css('box-shadow', '0 10px 10px 0 rgb(0 0 0 / 16%)'); 22679 $(".containercomponent").css("margin-top", $height); 22680 setTimeout(() => { 22681 $('body').css('opacity', 1); 22682 }, 1000); 22683 }); 22684 /* for sticky header -- Only for Article Navbar */ 22685 if ($(".article-tophead").length > 0){ 22686 if($(window.location.hash).length > 0) { 22687 const $height = $(".nav-contain.container-fluid").outerHeight(); 22688 var $el = $('.article-white-navarea'); 22689 $el.css({'position': 'fixed', 'top': '0px'}); 22690 $el.css('box-shadow', '0 10px 10px 0 rgb(0 0 0 / 16%)'); 22691 $(".containercomponent").css("margin-top", $height); 22692 } 22693 setTimeout(() => { 22694 const $height = $(".nav-contain.container-fluid").outerHeight(); 22695 var $el = $('.article-white-navarea'); 22696 $el.css({'position': 'fixed', 'top': '0px'}); 22697 $el.css('box-shadow', '0 10px 10px 0 rgb(0 0 0 / 16%)'); 22698 $(".containercomponent").css("margin-top", $height); 22699 }, 1000); 22700 } 22701 /* Only for Article Navbar - END */ 22702/* for nav Close button Show in Mobile */ 22703 $('#article-header-Nav .navbar-toggler').click(function () { 22704 $('.navbar-toggler-icon').toggleClass('invisible'); 22705 $('.close').toggleClass('invisible'); 22706 if($(".navbar-toggler-icon").hasClass("invisible")){ 22707 $('.mob-search-icon.header-search').addClass('invisible'); 22708 if($('.floating-menu').length){ 22709 $('.floating-menu').addClass('invisible'); 22710 } 22711 } 22712 else{ 22713 $('.mob-search-icon.header-search').removeClass('invisible'); 22714 if($('.floating-menu').length){ 22715 $('.floating-menu').removeClass('invisible'); 22716 } 22717 } 22718 }); 22719}); 22720 22721$(document).ready(function() { 22722 if ($('.scholar-search').length > 0) { 22723 var field1 = ($('.hi_ddn1').val()).split(','); 22724 var field2 = ($('.hi_ddn2').val()).split(','); 22725 for (var i = 0; i < field1.length; i++) { 22726 //field1[i]=field1[i].replace(' ',' '); 22727 //$('.sc-types').append('<option value='+field1[i]+'>' + field1[i] + '</option>'); 22728 $('select.sc-types').append('<option>' + field1[i] + '</option>'); 22729 } 22730 for (var j = 0; j < field2.length; j++) { 22731 $('select.sc-states').append('<option>' + field2[j] + '</option>'); 22732 } 22733 $('.search_form').submit(function(e){ 22734 e.preventDefault(); 22735 scholarshipSearch(); 22736 }); 22737 var selectorArr = window.location.pathname.split('.'); 22738 if (selectorArr[1] && selectorArr[2]) { 22739 selectorArr[1] = selectorArr[1].replace('~', '/'); 22740 selectorArr[1] = selectorArr[1].replaceAll('%20', ' '); 22741 selectorArr[2] = selectorArr[2].replaceAll('%20', ' '); 22742 $('select.sc-types').val(selectorArr[1]); 22743 $('select.sc-states').val(selectorArr[2]); 22744 $('select.sc-types').selectpicker('val', selectorArr[1]); 22745 $('select.sc-states').selectpicker('val', selectorArr[2]); 22746 scholarshipSearch(); 22747 } 22748 22749 } 22750 22751}); 22752function scholarshipSearch() { 22753 var fl_ag = true; 22754 var ty_pe = $('select.sc-types option:selected').val(); 22755 var st_ate = $('select.sc-states option:selected').val(); 22756 var nodeScholarshipPath = $(".currentScholarshipSearchNode").val(); 22757 var fileScholarshipPath = $(".scholarshipSearchRootPath").val(); 22758 var noResultsText = $("input[name='scholarshipNoResultsText']").val() || "<b>No scholarships found.</b> <br> Try a different type or state—there may be more options available. New listings are added regularly, so check back soon!"; 22759 $('.imp_note').remove(); 22760 if (ty_pe == 0 || st_ate == 0) { 22761 fl_ag = false;
22762 } else { 22763 $.ajax({ 22764 type: 'POST', 22765 url: nodeScholarshipPath + ".html", 22766 async: true, 22767 data: { 22768 rootPathScholarship: fileScholarshipPath, 22769 typeParam: ty_pe, 22770 stateParam: st_ate 22771 }, 22772 22773 success: function(msg) { 22774 var cnt = 1; 22775 const $results = $('.scholar-search-result'); 22776 const $announcement = $('#sr-announcement'); 22777 22778 // clear old results (DO NOT remove container) 22779 $results.html(''); 22780 22781 // NO RESULTS 22782 if (jQuery.isEmptyObject(msg)) { 22783 $results.html('<div class="sorry_msg"><p>' + noResultsText + '</p></div>'); 22784 $announcement.text('No scholarships found'); 22785 $results.focus(); 22786 return; 22787 } else { 22788 $('.sorry_msg').remove(); 22789 } 22790 22791 // LOOP THROUGH RESULTS 22792 for (const pro_perty in msg) { 22793 22794 $results.append('<div class="type-wrapper' + cnt + ' "></div>'); 22795 $('.type-wrapper' + cnt).append("<div class='h4'>" + pro_perty + "</div><ul class='scholar-records" + cnt + "'></ul>"); 22796 22797 var cnt_1 = 1; 22798 22799 for (var i = 0; i < msg[pro_perty].length; i++) { 22800 22801 $('.scholar-records' + cnt).append('<li class="record-list child_' + cnt_1 + '"></li>'); 22802 22803 var prop_name = "awardName"; 22804 var prop_content = "awardContent"; 22805 var prop_req = "awardReq"; 22806 22807 $('.scholar-records' + cnt + ' .child_' + cnt_1) 22808 .append(DOMPurify.sanitize('<div class=h5><a href="' + msg[pro_perty][i].website + '" target="_blank">' + msg[pro_perty][i].sponsor + '</a></div>', {SAFE_FOR_JQUERY:true})); 22809 22810 // location 22811 if (msg[pro_perty][i].hasOwnProperty('city')) { 22812 if (msg[pro_perty][i].hasOwnProperty('state')) { 22813 $('.scholar-records' + cnt + ' .child_' + cnt_1) 22814 .append(DOMPurify.sanitize('<p style="padding-top:10px;">' + msg[pro_perty][i].city + ', ' + msg[pro_perty][i].state + '</p>', {SAFE_FOR_JQUERY:true})); 22815 } else { 22816 $('.scholar-records' + cnt + ' .child_' + cnt_1) 22817 .append(DOMPurify.sanitize('<p style="padding-top:10px;">' + msg[pro_perty][i].city + '</p>', {SAFE_FOR_JQUERY:true})); 22818 } 22819 } else if (msg[pro_perty][i].state != undefined) { 22820 $('.scholar-records' + cnt + ' .child_' + cnt_1) 22821 .append(DOMPurify.sanitize('<p style="padding-top:10px;">' + msg[pro_perty][i].state + '</p>', {SAFE_FOR_JQUERY:true})); 22822 } 22823 22824 // extra states 22825 ['state2','state3'].forEach(function(s){ 22826 if (msg[pro_perty][i].hasOwnProperty(s) && msg[pro_perty][i][s] !== 'None' && msg[pro_perty][i][s] !== undefined) { 22827 $('.scholar-records' + cnt + ' .child_' + cnt_1) 22828 .append(DOMPurify.sanitize('<p style="padding-top:10px;">' + msg[pro_perty][i][s] + '</p>', {SAFE_FOR_JQUERY:true})); 22829 } 22830 }); 22831 22832 // award / requirements 22833 for (var j = 1; j <= 4; j++) { 22834 22835 if (msg[pro_perty][i][prop_name + j] != undefined) { 22836 $('.scholar-records' + cnt + ' .child_' + cnt_1) 22837 .append(DOMPurify.sanitize('<p class="bold">' + msg[pro_perty][i][prop_name + j] + '</p>', {SAFE_FOR_JQUERY:true})); 22838 } 22839 22840 if (msg[pro_perty][i][prop_content + j] != undefined) { 22841 $('.scholar-records' + cnt + ' .child_' + cnt_1
22841) 22842 .append('<p class="title bold">Award:</p>') 22843 .append(DOMPurify.sanitize('<p>' + msg[pro_perty][i][prop_content + j] + '</p>', {SAFE_FOR_JQUERY:true})); 22844 } 22845 22846 if (msg[pro_perty][i][prop_req + j] != undefined) { 22847 $('.scholar-records' + cnt + ' .child_' + cnt_1) 22848 .append('<p class="title bold">Requirements:</p>') 22849 .append(DOMPurify.sanitize('<p>' + msg[pro_perty][i][prop_req + j] + '</p>', {SAFE_FOR_JQUERY:true})); 22850 } 22851 } 22852 22853 cnt_1++; 22854 } 22855 22856 cnt++; 22857 } 22858 22859 // ANNOUNCE + MOVE FOCUS (ACCESSIBILITY FIX) 22860 $announcement.text('Search results updated'); 22861 $('html, body').animate({ 22862 scrollTop: $(".scholar-search-result").offset().top - ($("#article-white-navarea").height()) 22863 }, 1000) 22864 $results.attr('tabindex', '-1'); 22865 $results.focus(); 22866 } 22867 }); 22868 //Fetching data from json 22869 22870 ty_pe = ty_pe.replace('/', '~'); 22871 ty_pe = ty_pe.replaceAll(' ', '%20'); 22872 st_ate = st_ate.replaceAll(' ', '%20'); 22873 // var new_url=arry[0]+"."+ty_pe+"."+st_ate+"."+"html"; 22874 22875 var url = window.location.href; 22876 var url_1; 22877 var Lsplit = url.split('/'); 22878 url_1 = Lsplit[Lsplit.length - 1]; 22879 url_1 = url_1.split('.'); 22880 Lsplit[Lsplit.length - 1] = url_1[0] + "." + ty_pe + "." + st_ate + ".html"; 22881 var new_url = ""; 22882 for (var m = 0; m < Lsplit.length; m++) { 22883 new_url = new_url + Lsplit[m] + "/"; 22884 } 22885 new_url = new_url.substring(0, new_url.length - 1); 22886 window.history.pushState("", "", new_url); 22887 22888 fl_ag = false; 22889 } 22890 return fl_ag; 22891} 22892 22893/****council finder start***/ 22894/*if($('.editmodeCouncil').val() === 'false'){ 22895$.get("/councilfinder/ajax_results.asp?short=yes", function(data) { 22896//var json = JSON.stringify(data); 22897 22898 var request = "", 22899 json = JSON.parse(data), 22900 22901codeSelect = $(".councilCodeSearch [name='council-code']")[0], 22902appendStr = "", 22903selected, 22904code, 22905name; 22906for (var i = 0; i < json.councils.length; i++) { 22907code = json.councils[i].councilCode; 22908name = json.councils[i].councilShortName; 22909selected = request == code ? "selected='selected' " : ""; 22910 22911 22912 22913appendStr += "<option " + selected + "value='" + code + "'>" + name + "</option>"; 22914} 22915 22916 $(".councilCodeSearch [name='council-code']").html(appendStr); 22917}); 22918}*/ 22919 22920 22921 $(document).ready(function () { 22922 22923 22924 22925 var relativeResultPath = $("#relativeResultPath").val(); 22926 var relativeCurrentPath = $("#relativeCurrentPath").val(); 22927 $(document).ready(function () { 22928 $(document).ready(function () { 22929 bindSubmitHash({ // zip 22930 formElement: ".zipSearch", 22931 hashElement: "input[name='zip-code']", 22932 redirectUrl: relativeResultPath, 22933 currentUrl: relativeCurrentPath 22934 }); 22935 bindSubmitHash({ // state 22936 formElement: ".stateSearch", 22937 hashElement: "select[name='state']", 22938 redirectUrl: relativeResultPath, 22939 currentUrl: relativeCurrentPath 22940 }); 22941 bindSubmitHash({ // council-code 22942 formElement: ".councilCodeSearch", 22943 hashElement: "select[name='council-code']", 22944 redirectUrl: relativeResultPath, 22945 currentUrl: relativeCurrentPath 22946 }); 22947 }); 22948 }); 22949 22950 //validation of zipcode in input field 22951 $('.zipSearch .cfSubmit').click(function() { 22952 var zip = $(this).siblings('.cf-zipcode').val(); 22953 var councilZipLength = zip.length; 22954 var maxCount = 5; 22955 var isnum=/^\d+$/.test(zip); 22956 22957 if (zip == '') { 22958 22959 22960 $(this).siblings('.council_err_helpertext').css('display', 'block'); 22961 if($(this).parents(".findACouncil").length == 0 ) { 22962 $(this).siblings('.council_err_helpertext').html($(this).parents(".find-A-Council").find(".requiredMessage").val() != "" ? $(this).parents(".find-A-Council").find(".requiredMessage").val() : "Please fill out this field"); 22963 } 22964 else { 22965 $(this).siblings('.council_err_helpertext').html($(this).parents(".findACouncil").find(".requiredMessage").val() != "" ? $(this).parents(".findACouncil").find(".requiredMessage").val() : "Please fill out this field"); 22966 } 22967 $(this).siblings('.cf-zipcode').addClass('err-style'); 22968 $(this).siblings('.cf-zipcode').css("border", "2px solid red"); 22969 22970 return false;
22971 22972 } else if(councilZipLength<maxCount || councilZipLength>maxCount) { 22973 22974 $(this).siblings('.council_err_helpertext').css('display', 'block'); 22975 if($(this).parents(".findACouncil").length == 0 ) { 22976 $(this).siblings('.council_err_helpertext').html($(this).parents(".find-A-Council").find(".invalidZipcodeMessage").val() != "" ? $(this).parents(".find-A-Council").find(".invalidZipcodeMessage").val() : "Please enter a valid zip code"); 22977 } 22978 else { 22979 $(this).siblings('.council_err_helpertext').html($(this).parents(".findACouncil").find(".invalidZipcodeMessage").val() != "" ? $(this).parents(".findACouncil").find(".invalidZipcodeMessage").val() : "Please enter a valid zip code"); 22980 } 22981 $(this).siblings('.cf-zipcode').css("border", "2px solid red"); 22982 $(this).siblings('.cf-zipcode').addClass('err-style'); 22983 return false; 22984 22985 } else if(councilZipLength==maxCount && !(isnum)){ 22986 22987 $(this).siblings('.council_err_helpertext').css('display', 'block'); 22988 if($(this).parents(".findACouncil").length == 0 ) { 22989 $(this).siblings('.council_err_helpertext').html($(this).parents(".find-A-Council").find(".invalidZipcodeMessage").val() != "" ? $(this).parents(".find-A-Council").find(".invalidZipcodeMessage").val() : "Please enter a valid zip code"); 22990 } 22991 else { 22992 $(this).siblings('.council_err_helpertext').html($(this).parents(".findACouncil").find(".invalidZipcodeMessage").val() != "" ? $(this).parents(".findACouncil").find(".invalidZipcodeMessage").val() : "Please enter a valid zip code"); 22993 } 22994 $(this).siblings('.cf-zipcode').css("border", "2px solid red"); 22995 $(this).siblings('.cf-zipcode').addClass('err-style'); 22996 return false; 22997 22998 } else { 22999 sessionStorage.setItem("SelItem", zip); 23000 sessionStorage.setItem("council-name-selected", false); 23001 $(this).siblings('.council_err_helpertext').css('display', 'block'); 23002 $(this).siblings('.council_err_helpertext').html(""); 23003 $(this).siblings('.cf-zipcode').css("border", "2px solid green"); 23004 $(this).siblings('.cf-zipcode').removeClass('err-style'); 23005 return true; 23006 23007 } 23008 23009 }); 23010 //Required validation for state dropdown 23011 $(document).on('click','.stateSearch .cfSubmit', function(e) { 23012 e.stopPropagation(); 23013 var selVal = $(this).parents(".stateSearch").find(".filter-option-inner-inner").text(); 23014 // var selVal = $(".cf-state option:selected").length >1 ? $($(".cf-state option:selected")[1]).text() : $(".cf-state option:selected").text(); 23015 sessionStorage.setItem("SelItem", selVal); 23016 sessionStorage.setItem("council-name-selected", false); 23017 var stateSearch = $(this).prev(".bt-select").find('#bystate').val(); 23018 console.log("this is state" + stateSearch); 23019 if(!stateSearch){ 23020 $(this).prev(".bt-select").addClass("errfld"); 23021 $(this).parent(".stateSearch").find(".stateSearchErr").css("display","block"); 23022 if($(this).parents(".findACouncil").length == 0 ) { 23023 $(this).parent(".stateSearch").find(".stateSearchErr").html($(this).parents(".find-A-Council").find(".requiredMessage").val() != "" ? $(this).parents(".find-A-Council").find(".requiredMessage").val() : "Please fill out this field"); 23024 } 23025 else { 23026 $(this).parent(".stateSearch").find(".stateSearchErr").html($(this).parents(".findACouncil").find(".requiredMessage").val() != "" ? $(this).parents(".findACouncil").find(".requiredMessage").val() : "Please fill out this field"); 23027 } 23028 return false; 23029 23030 } 23031 else{ 23032 $(this).prev(".bt-select").removeClass("errfld"); 23033 $(this).parent(".stateSearch").find(".stateSearchErr").css("display","none"); 23034 $(this).parent(".stateSearch").find(".stateSearchErr").html(""); 23035 return true; 23036 } 23037 }); 23038 //Required validation for council dropdown 23039 $(document).on('click','.councilCodeSearch .cfSubmit', function(e) { 23040 e.stopPropagation(); 23041 var selVal = $(this).parents(".councilCodeSearch").find(".filter-option-inner-inner").text(); 23042 // var selVal = $(".cf-council-name option:selected").length >1 ? $($(".cf-council-name option:selected")[1]).text() : $(".cf-council-name option:selected").text(); 23043 sessionStorage.setItem("SelItem", selVal); 23044 sessionStorage.setItem("council-name-selected", true); 23045 var stateSearch = $(this).prev(".bt-select").find('#bycouncil').val(); 23046 if(!stateSearch){ 23047 $(this).prev(".bt-select").addClass("errfld"); 23048 $(this).parent(".councilCodeSearch").find(".CouncilSearchErr").css("display","block"); 23049 if($(this).parents(".findACouncil").length == 0 ) { 23050 $(this).parent(".councilCodeSearch").find(".CouncilSearchErr").html($(this).parents(".find-A-Council").find(".requiredMessage").val() != "" ? $(this).parents(".find-A-Council").find(".requiredMessage").val() : "Please fill out this field"); 23051 } 23052 else { 23053 $(this).parent(".councilCodeSearch").find(".CouncilSearchErr").html($(this).parents(".findACouncil").find(".requiredMessage").val() != "" ? $(this).parents(".findACouncil").find(".requiredMessage").val() : "Please fill out this field"); 23054 } 23055 return false;
23056 23057 } 23058 else{ 23059 $(this).prev(".bt-select").removeClass("errfld"); 23060 $(this).parent(".councilCodeSearch").find(".CouncilSearchErr").css("display","none"); 23061 $(this).parent(".councilCodeSearch").find(".CouncilSearchErr").html(""); 23062 return true; 23063 } 23064 }); 23065 23066 23067 23068 }); 23069var boundHashForms = {}; 23070 function bindSubmitHash(form) { 23071 "use strict"; 23072 // Check if form exists and ensure a single form binding 23073 23074 23075 23076 23077 if (boundHashForms[form.formElement] || !$(form.formElement)) { 23078 return false; 23079 } 23080 boundHashForms[form.formElement] = true; 23081 23082 23083 23084 $(form.formElement).submit(function (event) { 23085 23086 23087 23088 // Stop other events 23089 if (event.preventDefault) { 23090 event.preventDefault(); 23091 } else { 23092 event.stop(); 23093 } 23094 event.returnValue = false; 23095 event.stopPropagation(); 23096 23097 23098 23099 var hashElement = $(this).find(form.hashElement), 23100 hash = hashElement.val(), 23101 pattern = hashElement.attr("pattern") || false, 23102 match = !pattern || (pattern && hash.match(pattern)); 23103 23104 23105 23106 // Prevent double submit on redirect and invalid data (if a pattern is specified) 23107 if (form.submitted || !match) { 23108 return false; 23109 } 23110 23111 23112 23113 // Do ajax request instead of redirect 23114 if (form.ajax) { 23115 if (form.edit) { 23116 alert("This tool can only be used on a live page"); 23117 return false; 23118 } 23119 $.ajax({ 23120 method: form.ajax.method || "POST", 23121 url: form.ajax.url || "", 23122 data: form.ajax.data || $(this).serialize(), 23123 async: form.ajax.async || false, 23124 success: form.ajax.success || function () {} 23125 }); 23126 return false; 23127 } 23128 23129 23130 23131 // Redirect to the results page while maintaining query 23132 if (form.currentUrl == form.redirectUrl) { 23133 location = window.location; 23134 location.hash = hash; 23135 window.location.reload(); 23136 }else if(form.newTab && form.newTab.value === "_blank" ){ 23137 var location = form.redirectUrl + (window.location.search != "" ? window.location.search : "?") + "#" + hash; 23138 window.open(location, form.newTab.value); 23139 window.location.reload(); 23140 }else{ 23141 let redirectURL = form.redirectUrl + (window.location.search != "" ? window.location.search : "?") + "#" + hash; 23142 if(validateURL(redirectURL)) 23143 window.location = redirectURL; 23144 // var location = form.redirectUrl + (window.location.search != "" ? window.location.search : "?") + "#" + hash; 23145 // window.open(location, form.newTab.value); 23146 } 23147 23148 23149 23150 form.submitted = true; 23151 return false; 23152 }); 23153} 23154 23155function validateURL(surl) { 23156 var url = parseURL(surl); 23157 var urlHostname = url.hostname.trim(); 23158 if (urlHostname == '') { 23159 return true; 23160 } 23161 else { 23162 if (urlHostname.toUpperCase() == location.hostname.trim().toUpperCase()) { 23163 return true; 23164 } 23165 else 23166 return false; 23167 } 23168 } 23169 23170 function parseURL(url) { 23171 var a = document.createElement('a'); 23172 a.href = url; 23173 return { 23174 source: url, 23175 protocol: a.protocol.replace(':', ''), 23176 hostname: a.hostname, 23177 host: a.host, 23178 port: a.port, 23179 query: a.search, 23180 params: (function () { 23181 var ret = {}, 23182 seg = a.search.replace(/^\?/, '').split('&'), 23183 len = seg.length, i = 0, s; 23184 for (; i < len; i++) { 23185 if (!seg[i]) { continue; } 23186 s = seg[i].split('='); 23187 ret[s[0]] = s[1]; 23188 } 23189 return ret; 23190 })(), 23191 file: (a.pathname.match(/\/([^\/?#]+)$/i) || [, ''])[1], 23192 hash: a.hash.replace('#', ''), 23193 path: a.pathname.replace(/^([^\/])/, '/$1'), 23194 relative: (a.href.match(/tps?:\/\/[^\/]+(.+)/) || [, ''])[1], 23195 segments: a.pathname.replace(/^\//, '').split('/') 23196 }; 23197 } 23198 23199 $(window).on('load', function() { 23200 for(let i=0; i< $("select.cf-state").length; i++) { 23201 if($($("select.cf-state")[i]).parents(".find-A-Council").length > 0) { 23202 $($("select.cf-state")[i]).next().attr("title", $($("select.cf-state")[i]).parents(".find-A-Council").find(".stateOnHovermsg").val()); 23203 $($($("select.cf-council-name ")[i])).next().attr("title", $($("select.cf-council-name ")[i]).parents(".find-A-Council").find(".councilOnHovermsg").val()); 23204 } 23205 else { 23206 $($("select.cf-state")[i]).next().attr("title", $($("select.cf-state")[i]).parents(".findACouncil").find(".stateOnHovermsg").val()); 23207 $($("select.cf-council-name ")[i]).next().attr("title", $($("select.cf-council-name ")[i]).parents(".findACouncil").find(".councilOnHovermsg").val()); 23208 } 23209 } 23210 }) 23211
23212/*******/ 23213 23214 23215 23216var res = $("#displayCFresults"); 23217var result=""; 23218function IsJsonString(str) { 23219 try { 23220 JSON.parse(str); 23221 return true; 23222 } catch (e) { 23223 return false; 23224 } 23225}; 23226 23227function getLogoRatio(url,imgClass,varC) { 23228 if (typeof varC !== 'undefined') { 23229 console.log(url); 23230 console.log(imgClass); 23231 console.log(varC); 23232 var width = varC/4.2; 23233 console.log(width); 23234 $('.'+imgClass).width(width); 23235 } else { 23236 var img = new Image(); 23237 img.src = url; 23238 img.onload = function() { 23239 getLogoRatio(url,imgClass, this.width); 23240 } 23241 } 23242} 23243 23244if($('.editmodeCouncil').val() === 'false'){ 23245 var display = function(data){ 23246 //var json = JSON.stringify(data); 23247 var json = IsJsonString(data) && JSON.parse(data); 23248 if(sessionStorage.getItem("council-name-selected") == "true") { 23249 $(".cfOptionChosen").text(json.councils[0].councilFullName); 23250 sessionStorage.setItem("SelItem", json.councils[0].councilFullName); 23251 } 23252 23253 if (json.councils == undefined){ 23254 res.html("<p>It looks like something went wrong with your search.<br>Please try again.</p>"); 23255 } 23256 else if(json.councils.length == 0){ 23257 res.html("<p>No results found.</p>"); 23258 } 23259 else{ 23260 23261 for(var i=0; i < json.councils.length; i++) { 23262 23263 var siteURL = json.councils[i].website; 23264 var donateURL = json.councils[i].donateUrl; 23265 var signupURL = json.councils[i].onlineRegistrationUrl; 23266 var shortSite = siteURL.split("//")[1] != undefined ? siteURL.split("//")[1] : siteURL; 23267 var email = json.councils[i].email; 23268 var fbURL = json.councils[i].facebook; 23269 var shortFB = ''; 23270 if (fbURL != undefined) { 23271 if(fbURL.split("/")[3] != undefined) { 23272 shortFB = fbURL.split("/")[3]; 23273 } else { 23274 shortFB = fbURL; 23275 } 23276 } 23277 var twitterURL = json.councils[i].twitter; 23278 var shortTwitter = ''; 23279 if(twitterURL != undefined) { 23280 if(twitterURL.split("/")[3] != undefined) { 23281 shortTwitter = twitterURL.split("/")[3]; 23282 } else { 23283 shortTwitter = twitterURL; 23284 } 23285 } 23286 var q; 23287 getLogoRatio($('.'+json.councils[i].councilCode+'').val(),"cf-logo-"+i); 23288 23289 result += "<div class='container cf-resultsInfo'><div class='row m-0 add-border'><div class='col-md-4 col-sm-12 resultsLeft'> <div class='councilLogo'><img class='cf-logo-"+i+"' src='"+$('.'+json.councils[i].councilCode+'').val()+"'></div> <div class='cf-signup'><a href=\"" + signupURL + "\" class='CfSignUp' target='_blank'><span>" + $('.bTextSignUp').val() +"</span></a><a href=\"" + siteURL + "\" class='CfWebsite' target='_blank'><span>" + $('.bTextWebsite').val() +"</span></a><a href=\"" + donateURL + "\" class='CfDonate' target='_blank'><span>" + $('.bTextDonate').val() +"</span></a></div></div>"; 23290 if(json.councils[i].joinUrl != undefined){ 23291 //result += "<a href=\"" + json.councils[i].joinUrl + "\">Join</a>"; 23292 } 23293 if(json.councils[i].volunteerUrl != undefined){ 23294 // result += "<a href=\"" + json.councils[i].volunteerUrl + "\">Volunteer</a>"; 23295 } 23296 if(json.councils[i].onlineRegistrationUrl){ 23297 // result += "<a href=\"" + json.councils[i].onlineRegistrationUrl + "\" >Online Registration</a>"; 23298 } 23299 let contactInfoTitle = $(".contactInfoTitle").val(); 23300 // result +="<div class='cf-signup'><a href=''><span>Sign Up</span></a><a href=''><span>Sign Up</span></a><a href=''><span>Sign Up</span></a></div></div>"; 23301 result +="<div class='col-md-8 col-sm-12 resultsRight'><div class='results-heading h4'>"+contactInfoTitle+"</div><div class='row m-0'>" 23302 result +="<div class='col-md-6 resultsRight-col1'><div class='cf-address'><div class='row m-0'><div class='col-md-2 col-sm-2 col-2 p-0'><img src='/content/dam/gsusa-redesign/Council-Icons-Location-D.png'></div><div class='col-md-10 col-sm-10 col-10 p-0 cf-cityName'><p>" + json.councils[i].city + ", " + json.councils[i].state + " " + json.councils[i].zipcode + "</p></div></div></div>"; 23303 result +="<div class='cf-contact'><div class='row m-0'><div class='col-md-2 col-sm-2 col-2 p-0'> <img src='/content/dam/gsusa-redesign/Council-Icons-Phone-D.png'></div><div class='col-md-10 col-sm-10 col-10 p-0 cf-contact-info'>"; 23304 if(json.councils[i].phone) { 23305 result += "<a href='tel:"+json.councils[i].phone+"'><p>" + json.councils[i].phone + "</p></a>"; 23306 } 23307 if(json.councils[i].tollFreePhone != undefined && json.councils[i].tollFreePhone != "") { 23308 result += "<p>" + json.councils[i].tollFreePhone + "</p>"; 23309 } 23310 result +="</div></div></div></div>" 23311 if(shortSite != undefined){ 23312 q = shortSite.indexOf('?'); 23313 if(q != -1){ 23314 shortSite = shortSite.substring(0,q); 23315 } 23316 } 23317 if(shortFB != undefined){ 23318 q = shortFB.indexOf('?'); 23319 if(q != -1){ 23320 shortFB = shortFB.substring(0,q); 23321 } 23322 } 23323 if(shortTwitter != undefined){ 23324 q = shortTwitter.indexOf('?'); 23325 if(q != -1){ 23326 shortTwitter = shortTwitter.substring(0,q); 23327 } 23328 } 23329 result += "<div class='col-md-6 resultsRight-col2'>" 23330 if(email){ 23331 result += "<a href=\"mailto:" + email + "\"><img src='/content/dam/gsusa-redesign/Council-Icons-Email-D.png'><span class='cfSocio'>" + email + "</span></a>"; 23332 } 23333 if(siteURL){ 23334 result += "<a target='_blank' href=\"" + siteURL + "\"><img src='/content/dam/gsusa-redesign/Council-Icons-Link-D.png'><span class='cfSocio'>" + shortSite + "</span></a>"; 23335 } 23336 if(fbURL){ 23337 result += "<a target='_blank' href=\"" + fbURL + "\"><img src='/content/dam/gsusa-redesign/Council-Icons-Facebook-D.png'><span class='cfSocio'>" + shortFB + "</span></a>"; 23338 } 23339 if(shortTwitter){ 23340 result += "<a target='_blank' href=\"" + twitterURL + "\"><img src='/content/dam/gsusa-redesign/Council-Icons-Twitter-D.png'><span class='cfSocio'>" + shortTwitter + "</span></a>"; 23341 } 23342 result += "</div>"; 23343 result += "</div></div></div></div>"; 23344 } 23345 $("#displayCFresults").html(result); 23346} 23347}; 23348} 23349 23350 23351// get zip 23352var zip; 23353zip = (function(zip){ 23354var hash = window.location.hash; 23355if (hash.indexOf('#') == 0) { 23356hash = hash.substring(1); 23357} 23358var zipRegex = /[0-9]{5}/; 23359return zipRegex.test(hash) ? hash : zip; 23360 23361})(); 23362 23363 23364 23365// get state 23366var state; 23367state = (function(state){ 23368var hash = window.location.hash; 23369if (hash.indexOf('#') == 0) { 23370hash = hash.substring(1); 23371} 23372var stateRegex = /[A-Z]{2}/; 23373return stateRegex.test(hash) ? hash : state; 23374 23375})(); 23376 23377 23378
23379// get code 23380var code; 23381code = (function(code){ 23382var hash = window.location.hash; 23383if (hash.indexOf('#') == 0) { 23384hash = hash.substring(1); 23385} 23386var codeRegex = /[0-9]{3}/; 23387return codeRegex.test(hash) ? hash : code; 23388 23389})(); 23390 23391 23392var url = ""; 23393 if (zip != undefined) { 23394 url = "/councilfinder/ajax_results.asp?zip=" + zip; 23395 } else if (state != undefined) { 23396 url = "/councilfinder/ajax_results.asp?state=" + state; 23397 } else if (code != undefined) { 23398 url = "/councilfinder/ajax_results.asp?code=" + code; 23399 } 23400 23401$(document).ready(function() { 23402if($('.editmodeCouncil').val() === 'false'){ 23403 $.get(url,display); 23404} 23405}); 23406 23407$(document).ready(function() { 23408 /* For Ellepsis*/ 23409 function isOverflown(element) { 23410 return element.scrollHeight > element.clientHeight || element.scrollWidth > element.clientWidth; 23411 } 23412 23413 function showHideEllepsis(){ 23414 if($('.desc-block p').length){ 23415 $('.desc-block p').each(function(){ 23416 if(!isOverflown(this)){ 23417 $(this).addClass('no-ellepsis'); 23418 } 23419 else{ 23420 $(this).removeClass('no-ellepsis'); 23421 } 23422 }); 23423 } 23424 } 23425 23426 showHideEllepsis(); 23427 23428 23429 var relativeResultPath = $("#findResultPath").val(); 23430 var relativeCurrentPath = $("#findRelativeCurrentPath").val(); 23431 bindSubmitHash({ 23432 formElement: ".find-camp", 23433 hashElement: "input[name='zip-code']", 23434 redirectUrl: relativeResultPath, 23435 currentUrl: relativeCurrentPath 23436 }); 23437 23438 if($('#showExpandedVersion').val() == 'true'){ 23439 $('.find_camp_parent').addClass('exp-img'); 23440 $('.content').show(); 23441 $(this).find('.text-margin').hide(); 23442 $(this).find('.close-icon img').show(); 23443 } 23444 23445 $('.header-find-a-camp').click(function() { 23446 23447 /*$('.find_camp_parent').css('height', '300px');*/ 23448 $('.find_camp_parent').toggleClass('exp-img'); 23449 $('.content').toggle(); 23450 23451 // if ($(this).find('span').text() == '▼') { 23452 // $(this).find('span').text('x'); 23453 // } else if ($(this).find('span').text() == 'x') { 23454 // $(this).find('span').html('▼'); 23455 // $('.find_camp_parent').css('height', '108px'); 23456 // } else { 23457 // $(this).find('span').text('x'); 23458 23459 // } 23460 if ($(this).find('.text-margin').css('display') == 'none'){ 23461 $(this).find('.text-margin').show(); 23462 $(this).find('.close-icon img').hide(); 23463 } 23464 else if ($(this).find('.close-icon img').css('display') == 'none') { 23465 $(this).find('.text-margin').hide(); 23466 $(this).find('.close-icon img').show(); 23467 } 23468 else { 23469 $(this).find('.text-margin').hide(); 23470 $(this).find('.close-icon img').css('display','inline-block'); 23471 } 23472 23473 23474 }); 23475 23476 23477 $('.goBtn').click(function() { 23478 23479 window.localStorage.removeItem("advanceSearchData"); 23480 var fromGoBtn = { 'fromGoBtn': 'Y'}; 23481 23482 /** Put the object into storage **/ 23483 window.localStorage.setItem('fromGoBtn', JSON.stringify(fromGoBtn)); 23484 23485 /** Validation for Camp Input Zipcode **/ 23486 23487 var zip = $('.camp_zip_input').val(); 23488 var campzipLength = zip.length; 23489 var maxCount = 5; 23490 var isnum=/^\d+$/.test(zip); 23491 23492 if (zip == '') { 23493 23494 $('.fac_err_helpertext').css('display', 'block'); 23495 $('.fac_err_helpertext').html("Please fill out this field"); 23496 $('.camp_zip_input').addClass('err-style'); 23497 $('.camp_zip_input').css("border", "2px solid red"); 23498 23499 return false; 23500 23501 } else if(campzipLength<maxCount || campzipLength>maxCount) { 23502 23503 $('.fac_err_helpertext').css('display', 'block'); 23504 $('.fac_err_helpertext').html("Please enter a valid zip code"); 23505 $('.camp_zip_input').css("border", "2px solid red"); 23506 $('.camp_zip_input').addClass('err-style'); 23507 return false; 23508 23509 } else if(campzipLength==maxCount && !(isnum)){ 23510 23511 $('.fac_err_helpertext').css('display', 'block'); 23512 $('.fac_err_helpertext').html("Please enter a valid zip code"); 23513 $('.camp_zip_input').css("border", "2px solid red"); 23514 $('.camp_zip_input').addClass('err-style'); 23515 return false;
23516 23517 } else { 23518 23519 $('.fac_err_helpertext').css('display', 'block'); 23520 $('.fac_err_helpertext').html(""); 23521 $('.camp_zip_input').css("border", "2px solid green"); 23522 $('.camp_zip_input').removeClass('err-style'); 23523 return true; 23524 23525 } 23526 23527 }); 23528 23529 23530 23531 /** Code for Taking HREF from Div and Passing Link **/ 23532 $(document).on('click','.camp_card_outer',function(e) { 23533 e.stopPropagation(); 23534 const url = $(this).attr('data-href'); 23535 url && window.open(url,'_blank'); 23536 }); 23537 23538 $(".loadMorebtn").on("click", function() { 23539 showHideEllepsis(); 23540 }); 23541 23542}); 23543 23544$(document).ready(function(){ 23545 23546 $('.close-popup-cross,.cancel-button_2').on('click',function(){ 23547 $('.advance-search').css('display','none'); 23548 $('body').css('background-color','white'); 23549 23550 $(".camp-search-overlay").hide(); 23551 $('.update_location_parent').hide(); 23552 }) 23553 23554 $( ".Start-date" ).length && $( ".Start-date" ).datepicker({ 23555 showOn:"both", 23556 buttonImageOnly:true, 23557 buttonImage:'/content/dam/gsusa-redesign/formimages/cal-default.png', 23558 changeMonth: true, 23559 changeYear: true, 23560 dateFormat:'mm/dd/yy', 23561 yearRange: 'c-20:c+20', 23562 onClose: function (selected) { 23563 var date=$('.Start-date').datepicker("getDate"); 23564 if(date!=null){ 23565 $(".End-date").datepicker("option", "minDate", date); 23566 } 23567 else{ 23568 $(".End-date").datepicker("option", "minDate", null); 23569 } 23570 } 23571 }); 23572 $( ".End-date" ).length && $( ".End-date" ).datepicker({ 23573 showOn:"both", 23574 buttonImageOnly:true, 23575 buttonImage:'/content/dam/gsusa-redesign/formimages/cal-default.png', 23576 changeMonth: true, 23577 changeYear: true, 23578 dateFormat:'mm/dd/yy', 23579 yearRange: 'c-20:c+20', 23580 onClose: function (selected) { 23581 23582 var date=$('.End-date').datepicker("getDate"); 23583 if(date!=null){ 23584 $(".Start-date").datepicker("option", "maxDate", date); 23585 } 23586 else{ 23587 $(".Start-date").datepicker("option", "maxDate", null); 23588 } 23589 } 23590 }); 23591 23592 23593 /** Code for Update Location Popup**/ 23594 23595 23596 $('.updateFilterBtn, .Advanced-Search-Options').on('click',function(){ 23597 $('.camp-search-overlay').show(); 23598 $('.update_location_parent').show(); 23599 $('.advance-search').show(); 23600 }); 23601 23602 $(".Advanced-Search-Options").click(function() { 23603 var replaceTitleValue=$('.Advanced-Search-Options').html(); 23604 $('.popup-title').html(replaceTitleValue); 23605 }); 23606 23607 $(".update_filter_btn .updateFilterBtn span").click(function() { 23608 var replaceTitleValue=$('.update_filter_btn .updateFilterBtn span').html(); 23609 $('.popup-title').html(replaceTitleValue); 23610 }); 23611 23612 23613 $(".searchAdvance").click(function() { 23614 23615 /** Validation for Camp Input Zipcode **/ 23616 23617 var zip = $('.zipCodeAdvance').val(); 23618 var campzipLength = zip.length; 23619 var maxCount = 5; 23620 var isnum=/^\d+$/.test(zip); 23621 23622 if (zip == '') { 23623 23624 $('.camp_advance_helpertext').css('display', 'block'); 23625 $('.camp_advance_helpertext').html("Please fill out this field"); 23626 $('.zipCodeAdvance').addClass('err-style'); 23627 $('.zipCodeAdvance').css("border", "2px solid red"); 23628 23629 return false; 23630 23631 } else if(campzipLength<maxCount || campzipLength>maxCount) { 23632 23633 $('.camp_advance_helpertext').css('display', 'block'); 23634 $('.camp_advance_helpertext').html("Please enter a valid zip code"); 23635 $('.zipCodeAdvance').css("border", "2px solid red"); 23636 $('.zipCodeAdvance').addClass('err-style'); 23637 return false; 23638 23639 } else if(campzipLength==maxCount && !(isnum)){ 23640 23641 $('.camp_advance_helpertext').css('display', 'block'); 23642 $('.camp_advance_helpertext').html("Please enter a valid zip code"); 23643 $('.zipCodeAdvance').css("border", "2px solid red"); 23644 $('.zipCodeAdvance').addClass('err-style'); 23645 return false;
23646 23647 } else { 23648 23649 $('.camp_advance_helpertext').css('display', 'block'); 23650 $('.camp_advance_helpertext').html(""); 23651 $('.zipCodeAdvance').css("border", "2px solid green"); 23652 $('.zipCodeAdvance').removeClass('err-style'); 23653 // $('html, body').animate({ 23654 // scrollTop: $(".campFinderFilter").offset().top - 80 23655 // }, 500); 23656 return true; 23657 23658 } 23659 23660 23661 }); 23662 23663 23664}); 23665$(document).ready(function() { 23666 var mode =($("#mode").val() === 'true'); 23667 bindSubmitHash({ 23668 formElement: ".formDonate", 23669 23670 ajax: { 23671 url: '/invest/ajax_CouncilFinder.asp', 23672 success: function (resp) { 23673 if (resp == null || resp == "") { 23674 alert("The council you have searched for does not exist"); 23675 } else { 23676 //console.log("Data: " + this.data); 23677 var url = resp.split(',', 3); 23678 // window.open(url[2], '_blank'); 23679 window.open(url[2], '_blank') || window.location.assign(url[2],"_blank"); 23680 } 23681 } 23682 }, 23683 edit: mode 23684 }); 23685 23686 23687 $('#donateGoBtn').click(function() { 23688 23689 $(this).hide(); 23690 $('.zipcode').focus(); 23691 $('#formDonate').show(); 23692 $('.donate-comp').addClass('active'); 23693 $('#zip').focus(); 23694 }); 23695 23696 23697 23698$(document).mouseup(function(e){ 23699 23700 23701 23702 if($(e.target).closest('#formDonate').length===0) 23703 { 23704 $('#formDonate').hide(); 23705 $('#donateGoBtn').show(); 23706 $('.donate-comp').removeClass('active'); 23707 } 23708 23709 23710 23711 }); 23712 23713 $('.goButtons').click(function() { 23714 23715 var regex= /^[0-9]{5}/ 23716 23717 23718 var zipCodeValue = $('.zipcode').val(); 23719 var coucilerrormsg = $('#coucilerrormsg').attr('value'); 23720 23721 if(zipCodeValue === ""){ 23722 23723 $('.donateError').html("Please enter zip code.").css("color","red"); 23724 $('.donateError').attr('tabindex', '-1'); 23725 $('.donateError').focus(); 23726 $('.zipcode').css("border","1px solid red"); 23727 return false; 23728 23729 } 23730 23731 if(isNaN(zipCodeValue)){ 23732 23733 $('.donateError').html(coucilerrormsg).css("color","red"); 23734 $('.zipcode').css("border","1px solid red"); 23735 23736 return false; 23737 } 23738 23739 23740 if(!regex.test(zipCodeValue)){ 23741 23742 $('.donateError').html(coucilerrormsg).css("color","red"); 23743 $('.zipcode').css("border","1px solid red"); 23744 return false; 23745 } 23746 $('.donateError').html(" "); 23747 return true; 23748 23749 }); 23750 23751 }); 23752$(document).ready(function () { 23753 23754 function getInstance($el) { 23755 return $el.closest('.email-signup-newsletter-instance'); 23756 } 23757 23758 function escapeSource(value) { 23759 return value && value.replaceAll("\'", "\\\\'"); 23760 } 23761 23762 function getConfig($root) { 23763 var sourcefromInput = $root.find('.source').val(); 23764 var sourceValuefromInput = $root.find('.sourceValue').val(); 23765 return { 23766 url: $root.find('.url').val() || '', 23767 sfmc: $root.find('.sfmc').val() || '', 23768 cid: $root.find('.cid').val() || '', 23769 dekey: $root.find('.dekey').val() || '', 23770 deemail: $root.find('.deemail').val() || '', 23771 tskey: $root.find('.tskey').val() || '', 23772 sourceOption: $root.find('.sourceOption').val() || '', 23773 source: escapeSource(sourcefromInput), 23774 sourceValue: escapeSource(sourceValuefromInput), 23775 validEmail: ($root.find('.ens_uhoh').text() + ' ' + $root.find('.ens_addressInvalid').text()).trim(), 23776 successHeading: $root.find('.ens_youareset').first().text(), 23777 successDescription: $root.find('.ens_confirmemail').first().text(), 23778 alreadySignedUp: $root.find('.ens_alreadysign').first().text() 23779 }; 23780 } 23781 23782 function showFieldError($root, message) { 23783 $root.find('.enewsletter_errortext').html(message); 23784 $root.find('.email_newsletter').css("border", "2px solid red"); 23785 } 23786 23787 function clearFieldError($root) { 23788 $root.find('.enewsletter_errortext').html(""); 23789 $root.find('.email_newsletter').css("border", "2px solid green"); 23790 } 23791 23792 function submitNewsletter($root) { 23793 var config = getConfig($root); 23794 var emailnlt = $root.find('.email_newsletter').val(); 23795 var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/; 23796 23797 if (emailnlt == '') { 23798 showFieldError($root, "Please enter an email address!"); 23799 return false;
23800 } 23801 if (emailnlt.length >= 100) { 23802 showFieldError($root, "Maximum 100 chars!"); 23803 return false; 23804 } 23805 if (!regex.test(emailnlt)) { 23806 showFieldError($root, config.validEmail); 23807 return false; 23808 } 23809 23810 clearFieldError($root); 23811 23812 if (config.url.length == 0) 23813 alert("Error: API Endpoint is missing!"); 23814 else if (config.cid.length == 0) 23815 alert("Error: Council ID is missing!"); 23816 else if (config.dekey.length == 0 && config.tskey.length == 0) 23817 alert("Error: Please enter Data Extension Key or Trigger Send ID!"); 23818 else 23819 post($root, config, emailnlt); 23820 23821 return false; 23822 } 23823 23824 $(document) 23825 .off('submit.emailNewsletter click.emailNewsletter') 23826 .on('submit.emailNewsletter', '.email-signup-newsletter-instance form.email-form', function (event) { 23827 event.preventDefault(); 23828 submitNewsletter(getInstance($(this))); 23829 }); 23830 23831 /** After Email NewsLetter Ajax Sucess **/ 23832 function afterENSAjaxSuceess($root, config) { 23833 $root.find('.email_signup_main').hide(); 23834 $root.find('.youareset_ens_alreadySign').text(''); 23835 $root.find('.email_signup_result_ens').show(); 23836 $root.find('.youareset_ens').text(config.successHeading); 23837 $root.find('.youareset_ens_line2').text(config.successDescription); 23838 } 23839 23840 function alreadySignupEns($root, config) { 23841 $root.find('.email_signup_main').hide(); 23842 $root.find('.youareset_ens').text(''); 23843 $root.find('.youareset_ens_line2').text(''); 23844 $root.find('.email_signup_result_ens').show(); 23845 $root.find('.youareset_ens_alreadySign').text(config.alreadySignedUp); 23846 } 23847 23848 /****************************************** Code from Existing JSP *************************/ 23849 23850 function successEmailSignUp(form) { 23851 $(form).find('.mainText, .subText').hide(); 23852 $(form).find('.error').hide(); 23853 $(form).find('input[name="email"]').hide(); 23854 $(form).find('input[type="submit"]').hide(); 23855 $(form).find('.success').show(); 23856 $(form).find('.success').css("display", "inline"); 23857 } 23858 23859 function errorEmailSignUp(form, message) { 23860 $(form).find('.mainText, .subText').hide(); 23861 $(form).find('.error').show(); 23862 $(form).find('.error').css("display", "inline"); 23863 $(form).find('input[name="email"]').css("border-color", "red"); 23864 $(form).find('input[name="email"]').css("color", "red"); 23865 } 23866 23867 function toDefault(form) { 23868 $(form).find('.mainText, .subText').show(); 23869 $(form).find('.error').hide(); 23870 $(form).find('.success').hide(); 23871 $(form).find('input[name="email"]').css("border-color", "#cccccc"); 23872 $(form).find('input[name="email"]').css("color", "black"); 23873 } 23874 23875 function post($root, config, email) { 23876 var source = config.source; 23877 var sourceValue = config.sourceValue; 23878 23879 if ((source == "" || sourceValue == "") || config.sourceOption != "pair") { 23880 source = ""; 23881 sourceValue = ""; 23882 } 23883 23884 $.ajax({ 23885 type: 'POST', 23886 url: config.url, 23887 data: { 23888 sfmc: config.sfmc, 23889 email: email, 23890 cid: config.cid, 23891 tskey: config.tskey, 23892 dekey: config.dekey, 23893 deemail: config.deemail, 23894 source: source, 23895 sourcevalue: sourceValue 23896 }, 23897 dataType: 'json', 23898 success: function (data) { 23899 processEmailSignUpResult($root, config, data); 23900 }, 23901 error: function (data) { 23902 alert("Error: " + data.status + " " + data.statusText); 23903 }, 23904 complete: function (data) { 23905 } 23906 }); 23907 } 23908 23909 function processEmailSignUpResult($root, config, data) { 23910 /* Our own status code 23911 SUCC Email was successfully added to SFMC data extension 23912 NAIP IP address not found in the list of authorized IP addresses 23913 MVCO Council is missing 23914 MVEM Email is missing 23915 MVDN DEName is missing 23916 MVDK DEKey is missing 23917 CNFD Could not find council from dictionary of APP ID/KEY 23918 MISC Error non specified from SFMC 23919 EAEX Email Already EXists 23920 UNEX Unexpected Exception 23921 */ 23922 23923 if (data.status == 'SUCC') { 23924 afterENSAjaxSuceess($root, config); 23925 } else if (data.status == 'NAIP') { 23926 alert("IP address not found in the list of authorized IP addresses"); 23927 } else if (data.status == 'MVCO') { 23928 alert("Council is missing"); 23929 } else if (data.status == 'MVEM') { 23930 alert("Email is missing"); 23931 } else if (data.status == 'MVDN') { 23932 alert("DEName is missing"); 23933 } else if (data.status == 'MVDK') { 23934 alert("DEKey is missing"); 23935 } else if (data.status == 'CNFD') { 23936 alert("Could not find council from dictionary of APP ID/KEY"); 23937 } else if (data.status == 'EAEX') { 23938 alreadySignupEns($root, config); 23939 } else if (data.status == 'MISC') { 23940 alert("SFMC Error"); 23941 } else if (data.status == 'UNEX') { 23942 alert(data.message); 23943 } else { 23944 alert(data.message); 23945 } 23946 } 23947 23948}); 23949 23950$(document).ready(function(){ 23951 23952 23953 /*** Find height Div and Apply height in article tag***/ 23954 // var highest = null; 23955 // var hi = 0; 23956 // $(".at_shape_textwrap").each(function(){ 23957 // var h = $(this).height(); 23958 // if(h > hi){ 23959 // hi = h; 23960 // highest = $(this); 23961 // } 23962 // $(".at_shape_textwrap").css('height', h) 23963 // }); 23964 23965 23966 /* 23967 $(".at_list_more img").mouseover(function () { 23968 $(this).attr("src", $(this).attr("src").replace("/content/dam/gsusa-redesign/downarrowblack.png", "/content/dam/gsusa-redesign/downarrowgreen.png")); 23969 }).mouseout(function (e) { 23970 $(this).attr("src", $(this).attr("src").replace("/content/dam/gsusa-redesign/downarrowgreen.png", "/content/dam/gsusa-redesign/downarrowblack.png")); 23971 }); 23972 23973 */ 23974 23975 23976 23977 23978}); 23979 23980/** Core Component JS **/ 23981 23982$(document).ready(function() { 23983 $('.text-image img').each(function(){ 23984 if($(window).width() < 768) { 23985 let widthForMobile = $(this).parents(".textandimage").find(".widthForMobile").val(); 23986 $(this).parents(".text-image").css({"width": widthForMobile+"%", "height": "100%"}); 23987 $(this).css({"width": 100+"%", "height": "100%"}); 23988 if(widthForMobile == "100") { 23989 $(this).parents(".text-image").css("margin", "0"); 23990 } 23991 } 23992 }) 23993}) 23994$(window).on('load', function () { 23995 23996 /*** Set width for tezt-Image Component ***/ 23997 23998 // var TextImgCompwidth; 23999 $('.text-image img').each(function(){ 24000 if( $(this)[0].width == 0) { 24001 $(this).removeAttr('width'); 24002 } 24003 if($(this)[0].height == 0) { 24004 $(this).removeAttr('height'); 24005 } 24006 // TextImgCompwidth = $(this).width(); 24007 // TextImgCompwidth = $('.text-image img').width(); 24008 24009 // if ($(window).width() > 991) { 24010 // if($(this).closest('.gridClass').length > 0){ 24011 // if((($(this).closest(".grid-comp.maxwidthforgridrow .row .gridClass.col-lg-3:nth-child(4n)").length) || ($(this).closest(".grid-comp.maxwidthforgridrow .row .gridClass.col-lg-3:nth-child(4n+1)").length)) > 0){ 24012 // TextImgCompwidth = parseFloat(TextImgCompwidth).toFixed(1) - parseFloat(10.0).toFixed(1); 24013 // } 24014 // } 24015 // } 24016 24017 // $(this).closest(".text-image").css("width", TextImgCompwidth); 24018 24019 }); 24020 24021}); 24022 24023 24024// $(window).on('load', function () { 24025 24026 /**image and image with text core component **/ 24027 24028 // $('.accordian_item .text-image img').each(function(){ 24029 // if($(this).width() <=0){ 24030 // $(this).closest('.text-image').removeAttr('style'); 24031 // var imag=new Image(); 24032 // var src=$(this).attr('src'); 24033 // imag.src=src;
24034 // var nw=imag.naturalWidth; 24035 // var accrw=$(this).closest('.accordian_item').width()-40; 24036 // if(nw>accrw) 24037 // { 24038 // $(this).closest('.text-image').attr('style','width:'+accrw+'px;'); 24039 24040 // } 24041 // else 24042 // { 24043 // $(this).closest('.text-image').attr('style','width:'+nw+'px;'); 24044 24045 // } 24046 // } 24047 // }); 24048 // }); 24049 24050 24051 24052 24053 24054 24055 24056 24057 24058 24059 24060$(document).ready(function() { 24061 jQuery('#councilSearchForm').bind('submit', function(event){ 24062 if (jQuery.trim(jQuery(this).find('input[name="q"]').val()) === ''){ 24063 event.preventDefault(); 24064 } 24065 }); 24066 if(screen.width < 768){ 24067 $("#CSIsMobile").removeClass("hide"); 24068 } 24069 else{ 24070 $("#CSNotMobile").removeClass("hide"); 24071 } 24072}); 24073$(document).ready(function() { 24074 24075 // $('.fac_gobtn').click(function(){ 24076 24077 // var zipcode = $('.fac_zip_input').val(); 24078 // var cookiezipLength = zipcode.length; 24079 // var maxCount = 5; 24080 // var isnum=/^\d+$/.test(zipcode); 24081 24082 // if(zipcode!='' && (isnum) && (cookiezipLength==maxCount)){ 24083 24084 // var relativeResultPath = $("#cookieResultPath").val(); 24085 // var relativeCurrentPath = $("#cookieRelativeCurrentPath").val(); 24086 24087 // bindSubmitHash({ 24088 // formElement: ".find-cookies", 24089 // hashElement: "input[name='zip-code']", 24090 // redirectUrl: relativeResultPath, 24091 // currentUrl: relativeCurrentPath, 24092 // newTab: newTab 24093 // }); 24094 // } 24095 // }); 24096 24097 24098 // $('.fac_squareBox').css('height', '60px'); 24099 // $('.fac_squareBox').css('margin-top', '0px'); 24100 // $('.fac_landingpage').css('height', '100px'); 24101 // if($(window).width() > 1023){ 24102 // $('.containercomponent ~ div > div > .findACookie:first .fac_landingpage').css('height', '450px'); 24103 // } 24104 // else if($(window).width() < 1024 && $(window).width() > 767){ 24105 // $('.containercomponent ~ div > div > .findACookie:first .fac_landingpage').css('height', '260px'); 24106 // } 24107 // else { 24108 // $('.containercomponent ~ div > div > .findACookie:first .fac_landingpage').css('height', '320px'); 24109 // } 24110 // $('.fac_input_cont').hide(); 24111 24112 $('.fac_closebtn').click(function() { 24113 24114 $(this).parents(".findACookie").find('.fac_landingpage').toggleClass('fac_close_clicked'); 24115 24116 if($(this).parents(".findACookie").find('.fac_landingpage').hasClass("fac_close_clicked")){ 24117 if($(this).parents(".findACookie").parent().parent().siblings(".containercomponent").length > 0) { 24118 if($(window).width() > 1023){ 24119 $(this).parents(".findACookie").find('.fac_landingpage').css('height', '300px'); 24120 $(this).parents(".findACookie").parent().find(".findACookie:first").find('.fac_landingpage').css('height', '450px'); 24121 } 24122 else if($(window).width() < 1024 && $(window).width() > 767){ 24123 $(this).parents(".findACookie").find('.fac_landingpage').css('height', '260px'); 24124 $(this).parents(".findACookie").parent().find(".findACookie:first").find('.fac_landingpage').css('height', '450px'); 24125 } 24126 else { 24127 $(this).parents(".findACookie").find('.fac_landingpage').css('height', '320px'); 24128 $(this).parents(".findACookie").parent().find(".findACookie:first").find('.fac_landingpage').css('height', '320px'); 24129 } 24130 } 24131 else { 24132 if($(window).width() > 1023){ 24133 $(this).parents(".findACookie").find('.fac_landingpage').css('height', '300px'); 24134 } 24135 else if($(window).width() < 1024 && $(window).width() > 767){ 24136 $(this).parents(".findACookie").find('.fac_landingpage').css('height', '260px'); 24137 } 24138 else { 24139 $(this).parents(".findACookie").find('.fac_landingpage').css('height', '320px'); 24140 } 24141 } 24142 $(this).parents(".findACookie").find('.fac_squareBox').css('height', '248px'); 24143 $(this).parents(".findACookie").find('.fac_input_cont').show(); 24144 $(this).parents(".findACookie").find('.close-img-fac').show(); 24145 $(this).parents(".findACookie").find('.down-arrow-black').hide(); 24146 $(this).attr('aria-label', 'Close Find Cookie pop-up'); 24147 }else{ 24148 if($(window).width() > 1023){ 24149 $(this).parents(".findACookie").find('.fac_landingpage').css('height', '100px'); 24150 } 24151 else { 24152 $(this).parents(".findACookie").find('.fac_landingpage').css('height', '60px'); 24153 } 24154 $(this).parents(".findACookie").find('.fac_squareBox').css('height', '60px'); 24155 $(this).parents(".findACookie").find('.fac_input_cont').hide(); 24156 $(this).parents(".findACookie").find('.close-img-fac').hide(); 24157 $(this).parents(".findACookie").find('.down-arrow-black').show(); 24158 $(this).attr('aria-label', 'Open Find Cookie pop-up'); 24159 } 24160 24161 }); 24162 24163 $('.fac_zip_input').keydown(function(event) { 24164 if (event.keyCode == 13) { 24165 // $('#fac_gobtn').submit(); 24166 } 24167 }); 24168 24169 24170 /** Validation for Cookie Zipcode **/ 24171 $('.fac_gobtn').on('click', function(event){ 24172 var zip = $(this).parents('.fac_zipcodeInput').find('.fac_zip_input').val(); 24173 var cookiezipLength = zip.length; 24174 var maxCount = 5; 24175 var isnum=/^\d+$/.test(zip); 24176 if (zip == '') { 24177 $(this).parents(".fac_zipcodeInput").find('.fac_err_helpertext').css('display', 'block'); 24178 $(this).parents(".fac_zipcodeInput").find('.fac_err_helpertext').attr('tabindex', '-1'); 24179 $(this).parents(".fac_zipcodeInput").find('.fac_err_helpertext').html("Please enter zip code"); 24180 $(this).parents(".fac_zipcodeInput").find('.fac_err_helpertext').focus(); 24181 $(this).parents(".fac_zipcodeInput").find('.fac_zip_input').addClass('err-style'); 24182 $(this).parents(".fac_zipcodeInput").find('.fac_zip_input').css("border", "2px solid red"); 24183 return false;
24184 } else if(cookiezipLength<maxCount || cookiezipLength>maxCount) { 24185 $(this).parents(".fac_zipcodeInput").find('.fac_err_helpertext').css('display', 'block'); 24186 $(this).parents(".fac_zipcodeInput").find('.fac_err_helpertext').html("Please enter a valid zip code"); 24187 $(this).parents(".fac_zipcodeInput").find('.fac_zip_input').css("border", "2px solid red"); 24188 $(this).parents(".fac_zipcodeInput").find('.fac_zip_input').addClass('err-style'); 24189 return false; 24190 } else if(cookiezipLength==maxCount && !(isnum)){ 24191 $(this).parents(".fac_zipcodeInput").find('.fac_err_helpertext').css('display', 'block'); 24192 $(this).parents(".fac_zipcodeInput").find('.fac_err_helpertext').html("Please enter a valid zip code"); 24193 $(this).parents(".fac_zipcodeInput").find('.fac_zip_input').css("border", "2px solid red"); 24194 $(this).parents(".fac_zipcodeInput").find('.fac_zip_input').addClass('err-style'); 24195 return false; 24196 } else { 24197 event.preventDefault(); 24198 $(this).parents(".fac_zipcodeInput").find('.fac_err_helpertext').html(""); 24199 $(this).parents(".fac_zipcodeInput").find('.fac_zip_input').css("border", "2px solid green"); 24200 $(this).parents(".fac_zipcodeInput").find('.fac_zip_input').removeClass('err-style'); 24201 var origin = $('#cookieResultPath').val().startsWith("http") ? '' : window.location.origin; 24202 if(window.location.search.toLowerCase().indexOf("utm") > -1 ) { 24203 var origin = $('#cookieResultPath').val().startsWith("http") ? '' : window.location.origin; 24204 $(this).parents(".find-cookies").attr("action",$("#fac_gobtn").attr("action")+"#"+$(this).parents(".fac_zipcodeInput").find('.fac_zip_input').val()); 24205 if($(this).parents(".find-cookies").attr("target") == "_blank") { 24206 window.open( origin + $('#cookieResultPath').val() + window.location.search+"#"+ zip, "_blank"); 24207 } 24208 else { 24209 window.open( origin + $('#cookieResultPath').val() + window.location.search+"#"+ zip, "_self"); 24210 } 24211 // $('#fac_gobtn').submit(); 24212 return false; 24213 } 24214 else { 24215 $(this).parents(".find-cookies").attr("action",$("#fac_gobtn").attr("action")+"#"+$(this).parents(".fac_zipcodeInput").find('.fac_zip_input').val()); 24216 $(this).parents(".find-cookies").attr("action", origin + $('#cookieResultPath').val() + window.location.search+"#"+ zip); 24217 $(this).parents(".find-cookies").submit(); 24218 } 24219 } 24220 24221 }); 24222 24223 24224 24225 /** Change Image BG for Cookie Finder **/ 24226 24227 var imagedeskUrl = $('.cookie_imagedeskUrl').val(); 24228 var imageipadUrl = $('.cookie_imageipadUrl').val(); 24229 var imagemobileUrl = $('.cookie_imagemobileUrl').val(); 24230 $(".cookies_frmbtext").css("padding-left", parseInt($($(".container")[0]).css("margin-left"), 10)+ 35 + 'px'); 24231 $(".cookie_dropdown_distance").css("margin-right", parseInt($($(".container")[0]).css("margin-right"), 10)+ 35 + 'px'); 24232 24233 $(window).on("load resize", function () { 24234 24235 windowSize = $(window).width(); 24236 24237 if (windowSize >= 1024) { 24238 24239 $('.cof_outter_parent').css('background-image', 'url(' + imagedeskUrl + ')'); 24240 } 24241 else if(windowSize <= 1023 && windowSize >= 768) { 24242 24243 $('.cof_outter_parent').css('background-image', 'url(' + imageipadUrl + ')'); 24244 } 24245 else if(windowSize < 767) { 24246 24247 $('.cof_outter_parent').css('background-image', 'url(' + imagemobileUrl + ')'); 24248 } 24249 $(".cookies_frmbtext").css("padding-left", parseInt($($(".container")[0]).css("margin-left"), 10)+ 35 + 'px'); 24250 $(".cookie_dropdown_distance").css("margin-right", parseInt($($(".container")[0]).css("margin-right"), 10)+ 35 + 'px'); 24251 }); 24252 24253 var shiptomechecked = localStorage.getItem("shiptometrue"); 24254 var fromboothchecked = localStorage.getItem("frombooth"); 24255 24256 24257 if (shiptomechecked == 'true'){ 24258 24259 $('#radio_cookie_shipped').attr('checked', true); 24260 $('#radio_cookie_booth').removeAttr("checked"); 24261 $("#radio_cookie_shipped").trigger("click"); 24262 24263 $('.cookie-dist-dropdown').hide(); 24264 $('.cookie-shippedtext').show(); 24265 24266 } else if (fromboothchecked == 'true'){ 24267 24268 $('#radio_cookie_booth').attr('checked', true); 24269 $('#radio_cookie_shipped').removeAttr("checked"); 24270 24271 } 24272}); 24273 24274$(document).ready(function() { 24275 $(".cookie-radiusAdvance").val($("#filter-distance-per-miles").attr("data")); 24276 $(".cookie-durationAdvance").val(60); 24277 $(".sortBoothResults").val('distance'); 24278 $('.selectpicker').selectpicker('refresh'); 24279 var numPerPage = $("#booth-finder-details").data("num-per-page"); 24280 var radius = $('.cookie-radiusAdvance option:selected').val(); 24281 var date = $('.cookie-durationAdvance option:selected').val(); 24282 var zipcode =$("#cookie-advance-zip").val(); 24283 var relativeCurrentPath = $("#cookieAdvanceCurrentPage").val(); 24284 var sortBy = $(".sortBoothResults option:selected").val(); 24285 24286 /** setting values to localStorage **/ 24287 var boothadvanceSearchData = { 'zipCodeAdvance': zipcode, 'radius': radius, 'date': date, 's
24287ortBy': sortBy, 'numPerPage': numPerPage}; 24288 24289 /** Put the object into storage **/ 24290 window.localStorage.setItem('boothadvanceSearchData', JSON.stringify(boothadvanceSearchData)); 24291 24292 /** Code for Cokkie Update Location Popup**/ 24293 $('.cookie_updatelocatn').on('click', function() { 24294 var radius; 24295 var date; 24296 var choosenZip = $(".cof_cookiezip").text(); 24297 $(".cookie-zipCodeAdvance").val(choosenZip); 24298 24299 var boothadvanceSearchData_retrived = JSON.parse(window.localStorage.getItem('boothadvanceSearchData')); 24300 if (boothadvanceSearchData_retrived != null) { 24301 radius = boothadvanceSearchData_retrived.radius; 24302 date = boothadvanceSearchData_retrived.date; 24303 } 24304 if (!radius) { 24305 radius = $("#filter-distance-per-miles").attr("data"); 24306 $(".cookie-radiusAdvance").val(radius).change(); 24307 } 24308 $('.cookie-overlay').show(); 24309 $('.cookie_advance_search').show(); 24310 $('.advance-search').show(); 24311 }); 24312 24313 24314 $('.cookiecancel, .cookie-close-popup-cross').on('click', function() { 24315 $('.cookie-overlay').hide(); 24316 $('.cookie_advance_search').hide(); 24317 $('.advance-search').hide(); 24318 }); 24319 24320}); 24321$(document).ready(function () { 24322 /*equalise ht of prpmo*/ 24323 var maxHeightPromo = 0; 24324 $('.sd-wrapper', this).each(function(){ 24325 if($(this).height() > maxHeightPromo) { 24326 maxHeightPromo = $(this).height(); 24327 } 24328 }); 24329$('.sd-wrapper',this).height(maxHeightPromo); 24330 /*equalise ht of prpmo*/ 24331 $(".splide__slide").each(function () { 24332 if ($(this).attr("data-hidefromdesktop") == "true") { 24333 $(this).addClass("hideForDesk"); 24334 } 24335 if ($(this).attr("data-hidefrommobile") == "true") { 24336 $(this).addClass("hideForMobile"); 24337 } 24338 }); 24339 24340 if ($(window).width() < 1024) { 24341 $(".hideForMobile").remove(); 24342 } 24343 if ($(window).width() > 767) { 24344 $(".hideForDesk").remove(); 24345 } 24346 24347 $(".slider").each(function (key, item) { 24348 var dynamicSlider = $(".slider-col", this).attr("data-dynamiccarousel"); 24349 var wrapSlider = $(".slider-col", this).attr("data-carouselwrap"); 24350 24351 var removeItems = 0; 24352 var slideCount = $(".splide__slide", this).length; 24353 if (slideCount > 1) { 24354 if (dynamicSlider == "true") { 24355 24356 } else { 24357 removeItems = $(".splide__list .splide__slide", this).slice(1).clone(); 24358 $(".splide__list .splide__slide", this).slice(1).remove(); 24359 $(".slider-col", this).addClass("no-slide"); 24360 } 24361 } 24362 24363 var sliderIdName = "slider" + key; 24364 $(".splide", this).addClass("sliderIdName"); 24365 $(".splide", this).id = sliderIdName; 24366 $(".splide", this).attr("id", sliderIdName); 24367 var sliderId = "#" + $(".splide", this).attr("id"); 24368 24369 var options = { 24370 focus: "left", 24371 start: 0, 24372 perPage: 1, 24373 perMove: 1, 24374 }; 24375 24376 var sliderNavigation = true; 24377 if (dynamicSlider == "true" && wrapSlider == "true") { 24378 24379 $(".product-carousel", this).removeClass("splide--slide"); 24380 $(".splide__pagination", this).remove(); 24381 $(".splide__slide--clone", this).remove(); 24382 loadDesk = {}; 24383 24384 24385 loadDesk = new Splide(sliderId, { 24386 type: "loop", 24387 pagination: sliderNavigation, 24388 arrows: sliderNavigation, 24389 type : 'loop', 24390 24391 breakpoints: { 24392 3000: { 24393 perPage: 1, 24394 fixedWidth: "610px", 24395 padding: { 24396 right: "10rem", 24397 left: "0rem", 24398 }, 24399 }, 24400 1280: { 24401 perPage: 1, 24402 fixedWidth: "610px", 24403 padding: { 24404 right: "10rem", 24405 left: "0rem", 24406 }, 24407 }, 24408 1023: { 24409 perPage: 1, 24410 fixedWidth: "538px", 24411 right: "0rem", 24412 left: "0rem", 24413 }, 24414 767: { 24415 perPage: 1, 24416 fixedWidth: "264px", 24417 padding: { 24418 right: "27rem", 24419 left: "0rem", 24420 }, 24421 }, 24422 264: { 24423 perPage: 1, 24424 fixedWidth: "100%", 24425 padding: { 24426 right: "27rem", 24427 left: "0rem", 24428 }, 24429 }, 24430 }, 24431 options, 24432 focus: "left" 24433 }).mount(); 24434 loadDesk.on("updated", function () { 24435 removeAriaHidden(); 24436 }); 24437 loadDesk.on( 'mounted', function () { 24438 removeAriaHidden(); 24439 } ); 24440 loadDesk.on("dragged", function () { 24441 removeAriaHidden(); 24442 }); 24443 loadDesk.on( 'move', function(itemIndex) { 24444 $(sliderId + ' .splide__pagination__page').css('opacity', '0.6'); 24445 $(sliderId + ' .splide__pagination__page.is-active').css('opacity', '1'); 24446 removeAriaHidden(); 24447 }); 24448 24449 } else if (dynamicSlider == "true" && wrapSlider == "false") { 24450 24451 let loadDesk = new Splide(sliderId, { 24452 pagination: sliderNavigation, 24453 arrows: sliderNavigation, 24454 perMove: 1, 24455 breakpoints: { 24456 3000: { 24457 fixedWidth: "610px", 24458 padding: { 24459 right: "27rem", 24460 left: "0rem", 24461 }, 24462 }, 24463 1023: { 24464 perPage: 2, 24465 fixedWidth: "538px", 24466 }, 24467 767: { 24468 perPage: 1, 24469 fixedWidth: "264px", 24470 padding: { 24471 right: "27rem", 24472 left: "0rem", 24473 }, 24474 }, 24475 264: { 24476 perPage: 1, 24477 fixedWidth: "100%", 24478 padding: { 24479 right: "27rem", 24480 left: "0rem", 24481 }, 24482 }, 24483 }, 24484 options, 24485 focus: "left", 24486 }).mount(); 24487 loadDesk.on("updated", function () { 24488 removeAriaHidden(); 24489 }); 24490 loadDesk.on( 'mounted', function () { 24491 removeAriaHidden(); 24492 } ); 24493 loadDesk.on("dragged", function () { 24494 removeAriaHidden(); 24495 }); 24496 $(sliderId + ' .splide__arrow.splide__arrow--prev').addClass('disabled'); 24497 loadDesk.on( 'move', function(itemIndex) { 24498 removeAriaHidden(); 24499 let checkCount = $(sliderId + " .splide__list li").length; 24500 $(sliderId + ' .splide__arrow.splide__arrow--prev').removeClass('disabled'); 24501 if(itemIndex === 0){ 24502 24503 $(sliderId + ' .splide__arrow.splide__arrow--prev').addClass('disabled'); 24504 } 24505 if ($(window).width() < 1023) { 24506 if (itemIndex == (checkCount -1 )) { 24507 $(sliderId + " .splide__list").addClass('last-item-tablet'); 24508 $(sliderId + ' .splide__arrow.splide__arrow--next').addClass('disabled'); 24509 } 24510 else{ 24511 $(sliderId + " .splide__list").removeClass('last-item-tablet'); 24512 $(sliderId + ' .splide__arrow.splide__arrow--next').removeClass('disabled'); 24513 } 24514 } 24515 24516 if ($(window).width() > 1023) { 24517 if (itemIndex == (checkCount -1 )) { 24518 $(sliderId + " .splide__list").addClass('last-item-desk'); 24519 $(sliderId + ' .splide__arrow.splide__arrow--next').addClass('disabled'); 24520 } 24521 else{ 24522 $(sliderId + " .splide__list").removeClass('last-item-desk'); 24523 $(sliderId + ' .splide__arrow.splide__arrow--next').removeClass('disabled'); 24524 } 24525 } 24526 if ($(window).width() > 1023) { 24527 if (itemIndex == (checkCount -1 )) { 24528 $(sliderId + " .splide__list").addClass('last-item-large'); 24529 $(sliderId + ' .splide__arrow.splide__arrow--next').addClass('disabled'); 24530 } 24531 else{ 24532 $(sliderId + " .splide__list").removeClass('last-item-large'); 24533 $(sliderId + ' .splide__arrow.splide__arrow--next').removeClass('disabled'); 24534 } 24535 } 24536 if ($(window).width() < 767) { 24537 if (itemIndex == (checkCount -1 )) { 24538 $(sliderId + " .splide__list").addClass('last-item-mobile'); 24539 } 24540 else{ 24541 $(sliderId + " .splide__list").removeClass('last-item-mobile'); 24542 } 24543 } 24544 24545 if ($(window).width() == 767) { 24546 if (itemIndex == (checkCount -1 )) { 24547 $(sliderId + " .splide__list").addClass('last-tablet-main'); 24548 } 24549 else{ 24550 $(sliderId + " .splide__list").removeClass('last-tablet-main'); 24551 } 24552 } 24553 24554 24555 24556 $(sliderId + ' .splide__pagination__page').css('opacity', '0.6') 24557 $(sliderId + ' .splide__pagination__page.is-active').css('opacity', '1') 24558 24559 }); 24560 24561 24562 setTimeout(function () { 24563 if ($(window).width() < 767) { 24564 24565 $(sliderId + ".splide--loop .splide__list", this).attr( 24566 "style", 24567 "transform: 'none !important" 24568 ); 24569 $(".splide__slide", this).removeClass("is-active"); 24570 $(".splide__slide", this).removeClass("is-visible"); 24571 $(".splide__list li:first-child", this).addClass("is-active"); 24572 $(".splide__list li:first-child", this).addClass("is-visible"); 24573 $(".splide--slide .splide__list ").attr( 24574 "style", 24575 "transform: 'none !important" 24576 ); 24577 } 24578 }, 600); 24579 } else if (dynamicSlider == "false" && wrapSlider == "true") { 24580 24581 let loadDesk = new Splide(sliderId, { 24582 pagination: sliderNavigation, 24583 rewind: false, 24584 arrows: sliderNavigation, 24585 options, 24586 }).mount(); 24587 loadDesk.on("updated", function () { 24588 removeAriaHidden(); 24589 }); 24590 loadDesk.on( 'mounted', function () { 24591 removeAriaHidden(); 24592 } ); 24593 loadDesk.on("dragged", function () { 24594 removeAriaHidden(); 24595 });
24596 $(".product-carousel", this).removeClass("splide--loop"); 24597 $(".product-carousel", this).removeClass("splide--slide"); 24598 loadDesk.refresh(); 24599 } else if (dynamicSlider == "false" && wrapSlider == "false") { 24600 24601 $(".product-carousel", this).removeClass("splide--slide"); 24602 let loadDesk = new Splide(sliderId, { 24603 pagination: sliderNavigation, 24604 arrows: sliderNavigation, 24605 options, 24606 }).mount(); 24607 loadDesk.on("updated", function () { 24608 removeAriaHidden(); 24609 }); 24610 loadDesk.on( 'mounted', function () { 24611 removeAriaHidden(); 24612 } ); 24613 loadDesk.on("dragged", function () { 24614 removeAriaHidden(); 24615 }); 24616 } 24617 24618 var h3Height = 0; 24619 var h5Height = 0; 24620 var pHeightt = 0; 24621 24622 $(".splide__slide .slider-details .h3 ", this).each(function () {      24623 let thisH = $(this).height();      24624 if (thisH > h3Height) {        24625 h3Height = thisH;      24626 }    24627});    24628$(".splide__slide .slider-details .h3", this).css("height", h3Height);        24629$(".splide__slide .slider-details .h5", this).each(function () {      24630 let thisH = $(this).height();      24631 if (thisH > h5Height) {        24632 h5Height = thisH;      24633 }    24634});    24635$(".splide__slide .slider-details .h5", this).css("height", h5Height);    24636$(".splide__slide .slider-details p", this).each(function () {      24637 let thisH = $(this).height();      24638 if (thisH > pHeightt) {        24639 pHeightt = thisH;      24640 }    24641});    24642$(".splide__slide .slider-details p", this).css("height", pHeightt); 24643 24644 24645 24646 $(".no-slide .splide__list .splide__slide").slice(1).remove(); 24647 24648 if ( 24649 $(".splide--loop .splide__list .splide__slide:last-child").hasClass( 24650 "is-active" 24651 ) 24652 ) { 24653 24654 $(".splide--loop .splide__list ").attr( 24655 "style", 24656 "transform: 'none !important" 24657 ); 24658 } 24659 }); 24660 24661 $(".splide__arrow, .splide__pagination__page").click(()=> { 24662 setTimeout(() => { 24663 $(".splide__slide").each(function () { 24664 $(this).removeAttr("aria-hidden"); 24665 }); 24666 }, 500); 24667 }) 24668 $(".splide__slide").click(()=> { 24669 setTimeout(() => { 24670 $(".splide__slide").each(function () { 24671 $(this).removeAttr("aria-hidden"); 24672 }); 24673 }, 500); 24674 }) 24675 24676 function removeAriaHidden(){ 24677 setTimeout(() => { 24678 $(".splide__slide").each(function () { 24679 $(this).removeAttr("aria-hidden"); 24680 }); 24681 }, 500); 24682 } 24683}); 24684 24685/*! 24686 * Splide.js 24687 * Version : 2.4.20 24688 * License : MIT 24689 * Copyright: 2020 Naotoshi Fujita 24690 */!function(){"use strict";var t={d:function(n,e){for(var i in e)t.o(e,i)&&!t.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:e[i]})},o:function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},n={};t.r(n),t.d(n,{CREATED:function(){return R},DESTROYED:function(){return X},IDLE:function(){return F},MOUNTED:function(){return B},MOVING:function(){return G}});function e(){return(e=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t}).apply(this,arguments)}var i=Object.keys;function o(t,n){i(t).some((function(e,i){return n(t[e],e,i)}))}function r(t){return i(t).map((function(n){return t[n]}))}function s(t){return"object"==typeof t}function a(t,n){var i=e({},t);return o(n,(function(t,n){s(t)?(s(i[n])||(i[n]={}),i[n]=a(i[n],t)):i[n]=t})),i}function u(t){return Array.isArray(t)?t:[t]}function c(t,n,e){return Math.min(Math.max(t,n>e?e:n),n>e?n:e)}function d(t,n){var e=0;return t.replace(/%s/g,(function(){return u(n)[e++]}))}function f(t){var n=typeof t;return"number"===n&&t>0?parseFloat(t)+"px":"string"===n?t:""}function l(t){return t<10?"0"+t:t}function h(t,n){if("string"==typeof n){var e=m("div",{});E(e,{position:"absolute",width:n}),w(t,e),n=e.clientWidth,b(e)}return+n||0}function p(t,n){return t?t.querySelector(n.split(" ")[0]):null}function g(t,n){return v(t,n)[0]}function v(t,n){return t?r(t.children).filter((function(t){return P(t,n.split(" ")[0])||t.tagName===n})):[]}function m(t,n){var e=document.createElement(t);return o(n,(function(t,n){return C(e,n,t)})),e}function y(t){var n=m("div",{});return n.innerHTML=t,n.firstChild}function b(t){u(t).forEach((function(t){if(t){var n=t.parentElement;n&&n.removeChild(t)}}
24690))}function w(t,n){t&&t.appendChild(n)}function x(t,n){if(t&&n){var e=n.parentElement;e&&e.insertBefore(t,n)}}function E(t,n){t&&o(n,(function(n,e){null!==n&&(t.style[e]=n)}))}function _(t,n,e){t&&u(n).forEach((function(n){n&&t.classList[e?"remove":"add"](n)}))}function k(t,n){_(t,n,!1)}function S(t,n){_(t,n,!0)}function P(t,n){return!!t&&t.classList.contains(n)}function C(t,n,e){t&&t.setAttribute(n,e)}function z(t,n){return t?t.getAttribute(n):""}function I(t,n){u(n).forEach((function(n){u(t).forEach((function(t){return t&&t.removeAttribute(n)}))}))}function M(t){return t.getBoundingClientRect()}var T="slide",A="loop",O="fade",L=function(t,n){var e,i;return{mount:function(){e=n.Elements.list,t.on("transitionend",(function(t){t.target===e&&i&&i()}),e)},start:function(o,r,s,a,u){var c=t.options,d=n.Controller.edgeIndex,f=c.speed;i=u,t.is(T)&&(0===s&&r>=d||s>=d&&0===r)&&(f=c.rewindSpeed||f),E(e,{transition:"transform "+f+"ms "+c.easing,transform:"translate("+a.x+"px,"+a.y+"px)"})}}},W=function(t,n){function e(e){var i=t.options;E(n.Elements.slides[e],{transition:"opacity "+i.speed+"ms "+i.easing})}return{mount:function(){e(t.index)},start:function(t,i,o,r,s){var a=n.Elements.track;E(a,{height:f(a.clientHeight)}),e(i),setTimeout((function(){s(),E(a,{height:""})}))}}};function H(t){console.error("[SPLIDE] "+t)}function j(t,n){if(!t)throw new Error(n)}var q="splide",D={active:"is-active",visible:"is-visible",loading:"is-loading"},N={type:"slide",rewind:!1,speed:400,rewindSpeed:0,waitForTransition:!0,width:0,height:0,fixedWidth:0,fixedHeight:0,heightRatio:0,autoWidth:!1,autoHeight:!1,perPage:1,perMove:0,clones:0,start:0,focus:!1,gap:0,padding:0,arrows:!0,arrowPath:"",pagination:!0,autoplay:!1,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,lazyLoad:!1,preloadPages:1,easing:"cubic-bezier(.42,.65,.27,.99)",keyboard:"global",drag:!0,dragAngleThreshold:30,swipeDistanceThreshold:150,flickVelocityThreshold:.6,flickPower:600,flickMaxPages:1,direction:"ltr",cover:!1,accessibility:!0,slideFocus:!0,isNavigation:!1,trimSpace:!0,updateOnMove:!1,throttle:100,destroy:!1,breakpoints:!1,classes:{root:q,slider:q+"__slider",track:q+"__track",list:q+"__list",slide:q+"__slide",container:q+"__slide__container",arrows:q+"__arrows",arrow:q+"__arrow",prev:q+"__arrow--prev",next:q+"__arrow--next",pagination:q+"__pagination",page:q+"__pagination__page",clone:q+"__slide--clone",progress:q+"__progress",bar:q+"__progress__bar",autoplay:q+"__autoplay",play:q+"__play",pause:q+"__pause",spinner:q+"__spinner",sr:q+"__sr"},i18n:{prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay"}},R=1,B=2,F=3,G=4,X=5;function V(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var U=function(){function t(t,e,i){var o;void 0===e&&(e={}),void 0===i&&(i={}),this.root=t instanceof Element?t:document.querySelector(t),j(this.root,"An invalid element/selector was given."),this.Components=null,this.Event=function(){var t=[];function n(t){t.elm&&t.elm.removeEventListener(t.event,t.handler,t.options)}return{on:function(n,e,i,o){void 0===i&&(i=null),void 0===o&&(o={}),n.split(" ").forEach((function(n){i&&i.addEventListener(n,e,o),t.push({event:n,handler:e,elm:i,options:o})}))},off:function(e,i){void 0===i&&(i=null),e.split(" ").forEach((function(e){t=t.filter((function(t){return!t||t.event!==e||t.elm!==i||(n(t),!1)}))}))},emit:function(n){for(var e=arguments.length,i=new Array(e>1?e-1:0),o=1;o<e;o++)i[o-1]=arguments[o];t.forEach((function(t){t.elm||t.event.split(".")[0]!==n||t.handler.apply(t,i)}))},destroy:function(){t.forEach(n),t=[]}}}(),this.State=(o=R,{set:function(t){o=t},is:function(t){return t===o}}),this.STATES=n,this._o=a(N,e),this._i=0,this._c=i,this._e={},this._t=null}var e,i,s,u=t.prototype;return u.mount=function(t,n){var e=this;void 0===t&&(t=this._e),void 0===n&&(n=this._t),this.State.set(R),this._e=t,this._t=n,this.Components=function(t,n,e){var i={};return o(n,(function(n,e){i[e]=n(t,i,e.toLowerCase())})),e||(e=t.is(O)?W:L),i.Transition=e(t,i),i}(this,a(this._c,t),n);try{o(this.Components,(function(t,n){var i=t.required;void 0===i||i?t.mount&&t.mount():delete e.Components[n]}))}catch(t){return void H(t.message)}var i=this.State;return i.set(B),o(this.Components,(function(t){t.mounted&&t.mounted()}
24690)),this.emit("mounted"),i.set(F),this.emit("ready"),E(this.root,{visibility:"visible"}),this.on("move drag",(function(){return i.set(G)})).on("moved dragged",(function(){return i.set(F)})),this},u.sync=function(t){return this.sibling=t,this},u.on=function(t,n,e,i){return void 0===e&&(e=null),void 0===i&&(i={}),this.Event.on(t,n,e,i),this},u.off=function(t,n){return void 0===n&&(n=null),this.Event.off(t,n),this},u.emit=function(t){for(var n,e=arguments.length,i=new Array(e>1?e-1:0),o=1;o<e;o++)i[o-1]=arguments[o];return(n=this.Event).emit.apply(n,[t].concat(i)),this},u.go=function(t,n){return void 0===n&&(n=this.options.waitForTransition),(this.State.is(F)||this.State.is(G)&&!n)&&this.Components.Controller.go(t,!1),this},u.is=function(t){return t===this._o.type},u.add=function(t,n){return void 0===n&&(n=-1),this.Components.Elements.add(t,n,this.refresh.bind(this)),this},u.remove=function(t){return this.Components.Elements.remove(t),this.refresh(),this},u.refresh=function(){return this.emit("refresh:before").emit("refresh").emit("resize"),this},u.destroy=function(t){var n=this;if(void 0===t&&(t=!0),!this.State.is(R))return r(this.Components).reverse().forEach((function(n){n.destroy&&n.destroy(t)})),this.emit("destroy",t),this.Event.destroy(),this.State.set(X),this;this.on("ready",(function(){return n.destroy(t)}))},e=t,(i=[{key:"index",get:function(){return this._i},set:function(t){this._i=parseInt(t)}},{key:"length",get:function(){return this.Components.Elements.length}},{key:"options",get:function(){return this._o},set:function(t){var n=this.State.is(R);n||this.emit("update"),this._o=a(this._o,t),n||this.emit("updated",this._o)}},{key:"classes",get:function(){return this._o.classes}},{key:"i18n",get:function(){return this._o.i18n}}])&&V(e.prototype,i),s&&V(e,s),t}(),Y=function(t){var n=z(t.root,"data-splide");if(n)try{t.options=JSON.parse(n)}catch(t){H(t.message)}return{mount:function(){t.State.is(R)&&(t.index=t.options.start)}}},J="rtl",K="ttb",Q="update.slide",Z=function(t,n){var e=t.root,i=t.classes,s=[];if(!e.id){window.splide=window.splide||{};var a=window.splide.uid||0;window.splide.uid=++a,e.id="splide"+l(a)}var u={mount:function(){var n=this;this.init(),t.on("refresh",(function(){n.destroy(),n.init()})).on("updated",(function(){S(e,c()),k(e,c())}))},destroy:function(){s.forEach((function(t){t.destroy()})),s=[],S(e,c())},init:function(){var t=this;!function(){u.slider=g(e,i.slider),u.track=p(e,"."+i.track),u.list=g(u.track,i.list),j(u.track&&u.list,"Track or list was not found."),u.slides=v(u.list,i.slide);var t=d(i.arrows);u.arrows={prev:p(t,"."+i.prev),next:p(t,"."+i.next)};var n=d(i.autoplay);u.bar=p(d(i.progress),"."+i.bar),u.play=p(n,"."+i.play),u.pause=p(n,"."+i.pause),u.track.id=u.track.id||e.id+"-track",u.list.id=u.list.id||e.id+"-list"}(),k(e,c()),this.slides.forEach((function(n,e){t.register(n,e,-1)}))},register:function(n,e,i){var o=function(t,n,e,i){var o=t.options.updateOnMove,s="ready.slide updated.slide resized.slide moved.slide"+(o?" move.slide":""),a={slide:i,index:n,realIndex:e,container:g(i,t.classes.container),isClone:e>-1,mount:function(){var r=this;this.isClone||(i.id=t.root.id+"-slide"+l(n+1)),t.on(s,(function(){return r.update()})).on(Q,c).on("click",(function(){return t.emit("click",r)}),i),o&&t.on("move.slide",(function(t){t===e&&u(!0,!1)})),E(i,{display:""}),this.styles=z(i,"style")||""},destroy:function(){t.off(s).off(Q).off("click",i),S(i,r(D)),c(),I(this.container,"style")},update:function(){u(this.isActive(),!1),u(this.isVisible(),!0)},isActive:function(){return t.index===n},isVisible:function(){var n=this.isActive();if(t.is(O)||n)return n;var e=Math.ceil,o=M(t.Components.Elements.track),r=M(i);return t.options.direction===K?o.top<=r.top&&r.bottom<=e(o.bottom):o.left<=r.left&&r.right<=e(o.right)},isWithin:function(e,i){var o=Math.abs(e-n);return t.is(T)||this.isClone||(o=Math.min(o,t.length-o)),o<i}};function u(n,e){var o=e?"visible":"active",r=D[o];n?(k(i,r),t.emit(""+o,a)):P(i,r)&&(S(i,r),t.emit(e?"hidden":"inactive",a))}function c(){C(i,"style",a.styles)}return a}(t,e,i,n);o.mount(),s.push(o)},getSlide:function(t){return s.filter((function(n){return n.index===t}))[0]},getSlides:function(t){return t?s:s.filter((function(t){return!t.isClone}))},getSlidesByPage:function(e){var i=n.Controller.toIndex(e),o=t.options,r=!1!==o.focus?1:o.perPage;return s.filter((function(t){var n=t.index;return i<=n&&n<i+r}))},add:function(t,n,e){if("string"==typeof t&&(t=y(t)),t instanceof Element){var i=this.slides[n];E(t,{display:"none"}),i?(x(t,i),this.slides.splice(n,0,t)):(w(this.list,t),this.slides.push(t)),function(t,n){var e=t.querySelectorAll("img"),i=e.length;if(i){var r=0;o(e,(function(t){t.onload=t.onerror=function(){++r===i&&n()}}))}else n()}(t,(function(){e&&e(t)}
24690))}},remove:function(t){b(this.slides.splice(t,1)[0])},each:function(t){s.forEach(t)},get length(){return this.slides.length},get total(){return s.length}};function c(){var n=i.root,e=t.options;return[n+"--"+e.type,n+"--"+e.direction,e.drag?n+"--draggable":"",e.isNavigation?n+"--nav":"",D.active]}function d(t){return g(e,t)||g(u.slider,t)}return u},$=Math.floor,tt=function(t,n){var e,i,o={mount:function(){e=t.options,i=t.is(A),t.on("move",(function(n){t.index=n})).on("updated refresh",(function(n){e=n||e,t.index=c(t.index,0,o.edgeIndex)}))},go:function(t,e){var i=this.trim(this.parse(t));n.Track.go(i,this.rewind(i),e)},parse:function(n){var i=t.index,r=String(n).match(/([+\-<>]+)(\d+)?/),s=r?r[1]:"",a=r?parseInt(r[2]):0;switch(s){case"+":i+=a||1;break;case"-":i-=a||1;break;case">":case"<":i=function(t,n,i){if(t>-1)return o.toIndex(t);var r=e.perMove,s=i?-1:1;if(r)return n+r*s;return o.toIndex(o.toPage(n)+s)}(a,i,"<"===s);break;default:i=parseInt(n)}return i},toIndex:function(n){if(r())return n;var i=t.length,o=e.perPage,s=n*o;return i-o<=(s-=(this.pageLength*o-i)*$(s/i))&&s<i&&(s=i-o),s},toPage:function(n){if(r())return n;var i=t.length,o=e.perPage;return $(i-o<=n&&n<i?(i-1)/o:n/o)},trim:function(t){return i||(t=e.rewind?this.rewind(t):c(t,0,this.edgeIndex)),t},rewind:function(t){var n=this.edgeIndex;if(i){for(;t>n;)t-=n+1;for(;t<0;)t+=n+1}else t>n?t=0:t<0&&(t=n);return t},isRtl:function(){return e.direction===J},get pageLength(){var n=t.length;return r()?n:Math.ceil(n/e.perPage)},get edgeIndex(){var n=t.length;return n?r()||e.isNavigation||i?n-1:n-e.perPage:0},get prevIndex(){var n=t.index-1;return(i||e.rewind)&&(n=this.rewind(n)),n>-1?n:-1},get nextIndex(){var n=t.index+1;return(i||e.rewind)&&(n=this.rewind(n)),t.index<n&&n<=this.edgeIndex||0===n?n:-1}};function r(){return!1!==e.focus}return o},nt=Math.abs,et=function(t,n){var e,i,o,r=t.options.direction===K,s=t.is(O),a=t.options.direction===J,u=!1,d=a?1:-1,f={sign:d,mount:function(){i=n.Elements,e=n.Layout,o=i.list},mounted:function(){var n=this;s||(this.jump(0),t.on("mounted resize updated",(function(){n.jump(t.index)})))},go:function(e,i,o){var r=h(e),a=t.index;t.State.is(G)&&u||(u=e!==i,o||t.emit("move",i,a,e),Math.abs(r-this.position)>=1||s?n.Transition.start(e,i,a,this.toCoord(r),(function(){l(e,i,a,o)})):e!==a&&"move"===t.options.trimSpace?n.Controller.go(e+e-a,o):l(e,i,a,o))},jump:function(t){this.translate(h(t))},translate:function(t){E(o,{transform:"translate"+(r?"Y":"X")+"("+t+"px)"})},cancel:function(){t.is(A)?this.shift():this.translate(this.position),E(o,{transition:""})},shift:function(){var n=nt(this.position),e=nt(this.toPosition(0)),i=nt(this.toPosition(t.length)),o=i-e;n<e?n+=o:n>i&&(n-=o),this.translate(d*n)},trim:function(n){return!t.options.trimSpace||t.is(A)?n:c(n,d*(e.totalSize()-e.size-e.gap),0)},toIndex:function(t){var n=this,e=0,o=1/0;return i.getSlides(!0).forEach((function(i){var r=i.index,s=nt(n.toPosition(r)-t);s<o&&(o=s,e=r)})),e},toCoord:function(t){return{x:r?0:t,y:r?t:0}},toPosition:function(t){var n=e.totalSize(t)-e.slideSize(t)-e.gap;return d*(n+this.offset(t))},offset:function(n){var i=t.options.focus,o=e.slideSize(n);return"center"===i?-(e.size-o)/2:-(parseInt(i)||0)*(o+e.gap)},get position(){var t=r?"top":a?"right":"left";return M(o)[t]-(M(i.track)[t]-e.padding[t]*d)}};function l(n,e,i,r){E(o,{transition:""}),u=!1,s||f.jump(e),r||t.emit("moved",e,i,n)}function h(t){return f.trim(f.toPosition(t))}return f},it=function(t,n){var e=[],i=0,o=n.Elements,r={mount:function(){var n=this;t.is(A)&&(s(),t.on("refresh:before",(function(){n.destroy()})).on("refresh",s).on("resize",(function(){i!==a()&&(n.destroy(),t.refresh())})))},destroy:function(){b(e),e=[]},get clones(){return e},get length(){return e.length}};function s(){r.destroy(),function(t){var n=o.length,i=o.register;if(n){for(var r=o.slides;r.length<t;)r=r.concat(r);r.slice(0,t).forEach((function(t,r){var s=u(t);w(o.list,s),e.push(s),i(s,r+n,r%n)})),r.slice(-t).forEach((function(o,s){var a=u(o);x(a,r[0]),e.push(a),i(a,s-t,(n+s-t%n)%n)}))}}(i=a())}function a(){var n=t.options;if(n.clones)return n.clones;var e=n.autoWidth||n.autoHeight?o.length:n.perPage,i=n.direction===K?"Height":"Width",r=h(t.root,n["fixed"+i]);return r&&(e=Math.ceil(o.track["client"+i]/r)),e*(n.drag?n.flickMaxPages+1:1)}function u(n){var e=n.cloneNode(!0);return k(e,t.classes.clone),I(e,"id"),e}return r};function ot(t,n){var e;return function(){e||(e=setTimeout((function(){t(),e=null}),n))}}
24690var rt=function(t,n){var e,o,r=n.Elements,s=t.options.direction===K,a=(e={mount:function(){t.on("resize load",ot((function(){t.emit("resize")}),t.options.throttle),window).on("resize",c).on("updated refresh",u),u(),this.totalSize=s?this.totalHeight:this.totalWidth,this.slideSize=s?this.slideHeight:this.slideWidth},destroy:function(){I([r.list,r.track],"style")},get size(){return s?this.height:this.width}},o=s?function(t,n){var e,i,o=n.Elements,r=t.root;return{margin:"marginBottom",init:function(){this.resize()},resize:function(){i=t.options,e=o.track,this.gap=h(r,i.gap);var n=i.padding,s=h(r,n.top||n),a=h(r,n.bottom||n);this.padding={top:s,bottom:a},E(e,{paddingTop:f(s),paddingBottom:f(a)})},totalHeight:function(n){void 0===n&&(n=t.length-1);var e=o.getSlide(n);return e?M(e.slide).bottom-M(o.list).top+this.gap:0},slideWidth:function(){return h(r,i.fixedWidth||this.width)},slideHeight:function(t){if(i.autoHeight){var n=o.getSlide(t);return n?n.slide.offsetHeight:0}var e=i.fixedHeight||(this.height+this.gap)/i.perPage-this.gap;return h(r,e)},get width(){return e.clientWidth},get height(){var t=i.height||this.width*i.heightRatio;return j(t,'"height" or "heightRatio" is missing.'),h(r,t)-this.padding.top-this.padding.bottom}}}(t,n):function(t,n){var e,i=n.Elements,o=t.root,r=t.options;return{margin:"margin"+(r.direction===J?"Left":"Right"),height:0,init:function(){this.resize()},resize:function(){r=t.options,e=i.track,this.gap=h(o,r.gap);var n=r.padding,s=h(o,n.left||n),a=h(o,n.right||n);this.padding={left:s,right:a},E(e,{paddingLeft:f(s),paddingRight:f(a)})},totalWidth:function(n){void 0===n&&(n=t.length-1);var e=i.getSlide(n),o=0;if(e){var s=M(e.slide),a=M(i.list);o=r.direction===J?a.right-s.left:s.right-a.left,o+=this.gap}return o},slideWidth:function(t){if(r.autoWidth){var n=i.getSlide(t);return n?n.slide.offsetWidth:0}var e=r.fixedWidth||(this.width+this.gap)/r.perPage-this.gap;return h(o,e)},slideHeight:function(){var t=r.height||r.fixedHeight||this.width*r.heightRatio;return h(o,t)},get width(){return e.clientWidth-this.padding.left-this.padding.right}}}(t,n),i(o).forEach((function(t){e[t]||Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})),e);function u(){a.init(),E(t.root,{maxWidth:f(t.options.width)}),r.each((function(t){t.slide.style[a.margin]=f(a.gap)})),c()}function c(){var n=t.options;a.resize(),E(r.track,{height:f(a.height)});var e=n.autoHeight?null:f(a.slideHeight());r.each((function(t){E(t.container,{height:e}),E(t.slide,{width:n.autoWidth?null:f(a.slideWidth(t.index)),height:t.container?null:e})})),t.emit("resized")}return a},st=Math.abs,at=function(t,n){var e,i,r,s,a=n.Track,u=n.Controller,d=t.options.direction===K,f=d?"y":"x",l={disabled:!1,mount:function(){var e=this,i=n.Elements,r=i.track;t.on("touchstart mousedown",h,r).on("touchmove mousemove",g,r,{passive:!1}).on("touchend touchcancel mouseleave mouseup dragend",v,r).on("mounted refresh",(function(){o(i.list.querySelectorAll("img, a"),(function(n){t.off("dragstart",n).on("dragstart",(function(t){t.preventDefault()}),n,{passive:!1})}))})).on("mounted updated",(function(){e.disabled=!t.options.drag}))}};function h(t){l.disabled||s||p(t)}function p(t){e=a.toCoord(a.position),i=m(t,{}),r=i}function g(n){if(i)if(r=m(n,i),s){if(n.cancelable&&n.preventDefault(),!t.is(O)){var o=e[f]+r.offset[f];a.translate(function(n){if(t.is(T)){var e=a.sign,i=e*a.trim(a.toPosition(0)),o=e*a.trim(a.toPosition(u.edgeIndex));(n*=e)<i?n=i-7*Math.log(i-n):n>o&&(n=o+7*Math.log(n-o)),n*=e}return n}(o))}}else(function(n){var e=n.offset;if(t.State.is(G)&&t.options.waitForTransition)return!1;var i=180*Math.atan(st(e.y)/st(e.x))/Math.PI;d&&(i=90-i);return i<t.options.dragAngleThreshold})(r)&&(t.emit("drag",i),s=!0,a.cancel(),p(n))}function v(){i=null,s&&(t.emit("dragged",r),function(e){var i=e.velocity[f],o=st(i);if(o>0){var r=t.options,s=t.index,d=i<0?-1:1,l=s;if(!t.is(O)){var h=a.position;o>r.flickVelocityThreshold&&st(e.offset[f])<r.swipeDistanceThreshold&&(h+=d*Math.min(o*r.flickPower,n.Layout.size*(r.flickMaxPages||1))),l=a.toIndex(h)}l===s&&o>.1&&(l=s+d*a.sign),t.is(T)&&(l=c(l,0,u.edgeIndex)),u.go(l,r.isNavigation)}}(r),s=!1)}function m(t,n){var e=t.timeStamp,i=t.touches,o=i?i[0]:t,r=o.clientX,s=o.clientY,a=n.to||{},u=a.x,c=void 0===u?r:u,d=a.y,f={x:r-c,y:s-(void 0===d?s:d)},l=e-(n.time||0);return{to:{x:r,y:s},offset:f,time:e,velocity:{x:f.x/l,y:f.y/l}}}return l},ut=function(t,n){var e=!1;function i(t){e&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}return{required:t.options.drag,mount:function(){t.on("click",i,n.Elements.track,{capture:!0}).on("drag",(function(){e=!0})).on("dragged",(function(){setTimeout((function(){e=!1}))}))}}},ct=1,dt=2,ft=3,lt=function(t,n,e){var i,o,r,s=t.classes,a=t.root,u=n.Elements;function c(){var r=n.Controller,s=r.prevIndex,a=r.nextIndex,u=t.length>t.options.perPage||t.is(A);i.disabled=s<0||!u,o.disabled=a<0||!u,t.emit(e+":updated",i,o,s,a)}function d(n){return y('<button class="'+s.arrow+" "+(n?s.prev:s.next)+'" type="button"><svg xmlns="http://www.w3.org/2000/svg"\tviewBox="0 0 40 40"\twidth="40"\theight="40"><path d="'+(t.options.arrowPath||"m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z")+'" />')}return{required:t.options.arrows,mount:function(){i=u.arrows.prev,o=u.arrows.next,i&&o||!t.options.arrows||(i=d(!0),o=d(!1),r=!0,function(){var n=m("div",{class:s.arrows});w(n,i),w(n,o);var e=u.slider,r="slider"===t.options.arrows&&e?e:a;x(n,r.firstElementChild)}()),i&&o&&t.on("click",(function(){t.go("<")}),i).on("click",(function(){t.go(">")}),o).on("mounted move updated refresh",c),this.arrows={prev:i,next:o}},mounted:function(){t.emit(e+":mounted",i,o)},destroy:function(){I([i,o],"disabled"),r&&b(i.parentElement)}}},ht="move.page",pt="updated.page refresh.page",gt=function(t,n,e){var i={},o=n.Elements,r={mount:function(){var n=t.options.pagination;if(n){i=function(){var n=t.options,e=t.classes,i=m("ul",{class:e.pagination}),r=o.getSlides(!1).filter((function(t){return!1!==n.focus||t.index%n.perPage==0})).map((function(n,r){var s=m("li",{}),a=m("button",{class:e.page,type:"button"});return w(s,a),w(i,s),t.on("click",(function(){t.go(">"+r)}),a),{li:s,button:a,page:r,Slides:o.getSlidesByPage(r)}}));return{list:i,items:r}}();var e=o.slider;w("slider"===n&&e?e:t.root,i.list),t.on(ht,s)}t.off(pt).on(pt,(function(){r.destroy(),t.options.pagination&&(r.mount(),r.mounted())}))},mounted:function(){if(t.options.pagination){var n=t.index;t.emit(e+":mounted",i,this.getItem(n)),s(n,-1)}}
24690,destroy:function(){b(i.list),i.items&&i.items.forEach((function(n){t.off("click",n.button)})),t.off(ht),i={}},getItem:function(t){return i.items[n.Controller.toPage(t)]},get data(){return i}};function s(n,o){var s=r.getItem(o),a=r.getItem(n),u=D.active;s&&S(s.button,u),a&&k(a.button,u),t.emit(e+":updated",i,s,a)}return r},vt="data-splide-lazy",mt="data-splide-lazy-srcset",yt="aria-current",bt="aria-controls",wt="aria-label",xt="aria-hidden",Et="tabindex",_t={ltr:{ArrowLeft:"<",ArrowRight:">",Left:"<",Right:">"},rtl:{ArrowLeft:">",ArrowRight:"<",Left:">",Right:"<"},ttb:{ArrowUp:"<",ArrowDown:">",Up:"<",Down:">"}},kt=function(t,n){var e=t.i18n,i=n.Elements,o=[xt,Et,bt,wt,yt,"role"];function r(n,e){C(n,xt,!e),t.options.slideFocus&&C(n,Et,e?0:-1)}function s(t,n){var e=i.track.id;C(t,bt,e),C(n,bt,e)}function a(n,i,o,r){var s=t.index,a=o>-1&&s<o?e.last:e.prev,u=r>-1&&s>r?e.first:e.next;C(n,wt,a),C(i,wt,u)}function u(n,i){i&&C(i.button,yt,!0),n.items.forEach((function(n){var i=t.options,o=d(!1===i.focus&&i.perPage>1?e.pageX:e.slideX,n.page+1),r=n.button,s=n.Slides.map((function(t){return t.slide.id}));C(r,bt,s.join(" ")),C(r,wt,o)}))}function c(t,n,e){n&&I(n.button,yt),e&&C(e.button,yt,!0)}function f(t){i.each((function(n){var i=n.slide,o=n.realIndex;h(i)||C(i,"role","button");var r=o>-1?o:n.index,s=d(e.slideX,r+1),a=t.Components.Elements.getSlide(r);C(i,wt,s),a&&C(i,bt,a.slide.id)}))}function l(t,n){var e=t.slide;n?C(e,yt,!0):I(e,yt)}function h(t){return"BUTTON"===t.tagName}return{required:t.options.accessibility,mount:function(){t.on("visible",(function(t){r(t.slide,!0)})).on("hidden",(function(t){r(t.slide,!1)})).on("arrows:mounted",s).on("arrows:updated",a).on("pagination:mounted",u).on("pagination:updated",c).on("refresh",(function(){I(n.Clones.clones,o)})),t.options.isNavigation&&t.on("navigation:mounted navigation:updated",f).on("active",(function(t){l(t,!0)})).on("inactive",(function(t){l(t,!1)})),["play","pause"].forEach((function(t){var n=i[t];n&&(h(n)||C(n,"role","button"),C(n,bt,i.track.id),C(n,wt,e[t]))}))},destroy:function(){var t=n.Arrows,e=t?t.arrows:{};I(i.slides.concat([e.prev,e.next,i.play,i.pause]),o)}}},St="move.sync",Pt="mouseup touchend",Ct=[" ","Enter","Spacebar"],zt={Options:Y,Breakpoints:function(t){var n,e,i=t.options.breakpoints,o=ot(s,50),r=[];function s(){var o,s=(o=r.filter((function(t){return t.mql.matches}))[0])?o.point:-1;if(s!==e){e=s;var a=t.State,u=i[s]||n,c=u.destroy;c?(t.options=n,t.destroy("completely"===c)):(a.is(X)&&t.mount(),t.options=u)}}return{required:i&&matchMedia,mount:function(){r=Object.keys(i).sort((function(t,n){return+t-+n})).map((function(t){return{point:t,mql:matchMedia("(max-width:"+t+"px)")}})),this.destroy(!0),addEventListener("resize",o),n=t.options,s()},destroy:function(t){t&&removeEventListener("resize",o)}}},Controller:tt,Elements:Z,Track:et,Clones:it,Layout:rt,Drag:at,Click:ut,Autoplay:function(t,n,e){var i,o=[],r=n.Elements,s={required:t.options.autoplay,mount:function(){var n=t.options;r.slides.length>n.perPage&&(i=function(t,n,e){var i,o,r,s=window.requestAnimationFrame,a=!0,u=function u(c){a||(i||(i=c,r&&r<1&&(i-=r*n)),r=(o=c-i)/n,o>=n&&(i=0,r=1,t()),e&&e(r),s(u))};return{pause:function(){a=!0,i=0},play:function(t){i=0,t&&(r=0),a&&(a=!1,s(u))}}}((function(){t.go(">")}),n.interval,(function(n){t.emit(e+":playing",n),r.bar&&E(r.bar,{width:100*n+"%"})})),function(){var n=t.options,e=t.sibling,i=[t.root,e?e.root:null];n.pauseOnHover&&(a(i,"mouseleave",ct,!0),a(i,"mouseenter",ct,!1));n.pauseOnFocus&&(a(i,"focusout",dt,!0),a(i,"focusin",dt,!1));r.play&&t.on("click",(function(){s.play(dt),s.play(ft)}),r.play);r.pause&&a([r.pause],"click",ft,!1);t.on("move refresh",(function(){s.play()})).on("destroy",(function(){s.pause()}))}(),this.play())},play:function(n){void 0===n&&(n=0),(o=o.filter((function(t){return t!==n}))).length||(t.emit(e+":play"),i.play(t.options.resetProgress))},pause:function(n){void 0===n&&(n=0),i.pause(),-1===o.indexOf(n)&&o.push(n),1===o.length&&t.emit(e+":pause")}};function a(n,e,i,o){n.forEach((function(n){t.on(e,(function(){s[o?"play":"pause"](i)}),n)}))}return s},Cover:function(t,n){function e(t){n.Elements.each((function(n){var e=g(n.slide,"IMG")||g(n.container,"IMG");e&&e.src&&i(e,t)}))}function i(t,n){E(t.parentElement,{background:n?"":'center/cover no-repeat url("'+t.src+'")'}),E(t,{display:n?"":"none"})}return{required:t.options.cover,mount:function(){t.on("lazyload:loaded",(function(t){i(t,!1)})),t.on("mounted updated refresh",(function(){return e(!1)}))},destroy:function(){e(!0)}}},Arrows:lt,Pagination:gt,LazyLoad:function(t,n,e){var i,r,s=t.options,a="sequential"===s.lazyLoad;function u(){r=[],i=0}
24690function c(n){n=isNaN(n)?t.index:n,(r=r.filter((function(t){return!t.Slide.isWithin(n,s.perPage*(s.preloadPages+1))||(d(t.img,t.Slide),!1)})))[0]||t.off("moved."+e)}function d(n,e){k(e.slide,D.loading);var i=m("span",{class:t.classes.spinner});w(n.parentElement,i),n.onload=function(){l(n,i,e,!1)},n.onerror=function(){l(n,i,e,!0)},C(n,"srcset",z(n,mt)||""),C(n,"src",z(n,vt)||"")}function f(){if(i<r.length){var t=r[i];d(t.img,t.Slide)}i++}function l(n,i,o,r){S(o.slide,D.loading),r||(b(i),E(n,{display:""}),t.emit(e+":loaded",n).emit("resize")),a&&f()}return{required:s.lazyLoad,mount:function(){t.on("mounted refresh",(function(){u(),n.Elements.each((function(t){o(t.slide.querySelectorAll("[data-splide-lazy], ["+mt+"]"),(function(n){n.src||n.srcset||(r.push({img:n,Slide:t}),E(n,{display:"none"}))}))})),a&&f()})),a||t.on("mounted refresh moved."+e,c)},destroy:u}},Keyboard:function(t){var n;return{mount:function(){t.on("mounted updated",(function(){var e=t.options,i=t.root,o=_t[e.direction],r=e.keyboard;n&&(t.off("keydown",n),I(i,Et)),r&&("focused"===r?(n=i,C(i,Et,0)):n=document,t.on("keydown",(function(n){o[n.key]&&t.go(o[n.key])}),n))}))}}},Sync:function(t){var n=t.sibling,e=n&&n.options.isNavigation;function i(){t.on(St,(function(t,e,i){n.off(St).go(n.is(A)?i:t,!1),o()}))}function o(){n.on(St,(function(n,e,o){t.off(St).go(t.is(A)?o:n,!1),i()}))}function r(){n.Components.Elements.each((function(n){var e=n.slide,i=n.index;t.off(Pt,e).on(Pt,(function(t){t.button&&0!==t.button||s(i)}),e),t.off("keyup",e).on("keyup",(function(t){Ct.indexOf(t.key)>-1&&(t.preventDefault(),s(i))}),e,{passive:!1})}))}function s(e){t.State.is(F)&&n.go(e)}return{required:!!n,mount:function(){i(),o(),e&&(r(),t.on("refresh",(function(){setTimeout((function(){r(),n.emit("navigation:updated",t)}))})))},mounted:function(){e&&n.emit("navigation:mounted",t)}}},A11y:kt};var It=function(t){var n,e;function i(n,e){return t.call(this,n,e,zt)||this}return e=t,(n=i).prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__proto__=e,i}(U);window.Splide=It}(); 24691$(document).ready(function(){ 24692 $('.typePhn').on("change keyup paste", function (e) { 24693 var output, 24694 $this = $(this), 24695 input = $this.val(); 24696 var minLength = $(this).attr("min-length"); 24697 if (e.keyCode != 8) { 24698 input = input.replace(/[^0-9]/g, ''); 24699 if (input.length == 11) { 24700 $('.phone-number_errormsg').remove(""); 24701 $('.phone-validation').css("border", "1px solid #00b451"); 24702 } 24703 var area = input.substr(0, 3); 24704 var pre = input.substr(3, 3); 24705 var tel = input.substr(6, 4); 24706 if (input.length > 0) { 24707 if (area.length < 3) { 24708 output = "(" + area; 24709 } else if (area.length == 3 && pre.length < 3) { 24710 output = "(" + area + ")" + " " + pre; 24711 } else if (area.length == 3 && pre.length == 3) { 24712 output = "(" + area + ")" + " " + pre + "-" + tel; 24713 } 24714 $this.val(output); 24715 } else { 24716 $this.val(input); 24717 } 24718 } 24719 }); 24720 $('.typePhn').on("focusin", function (e) { 24721 $('.phone-number_errormsg').remove(""); 24722 $(".formContainer .form-button").prop("disabled", false); 24723 $('.phone-validation').css("border", "1px solid #00b451"); 24724 }); 24725 $('.typePhn').on("focusout", function (e) { 24726 var output, 24727 $this = $(this), 24728 input = $this.val(); 24729 var minLength = $(this).attr("min-length"); 24730 if (e.keyCode != 8) { 24731 input = input.replace(/[^0-9]/g, ''); 24732 if (input.length == 11) { 24733 $('.phone-number_errormsg').remove(""); 24734 $(".formContainer .form-button").prop("disabled", false); 24735 $('.phone-validation').css("border", "1px solid #00b451"); 24736 } 24737 var area = input.substr(0, 3); 24738 var pre = input.substr(3, 3); 24739 var tel = input.substr(6, 4); 24740 if (input.length > 0) { 24741 if (area.length < 3) { 24742 output = "(" + area; 24743 } else if (area.length == 3 && pre.length < 3) { 24744 output = "(" + area + ")" + " " + pre; 24745 } else if (area.length == 3 && pre.length == 3) { 24746 output = "(" + area + ")" + " " + pre + "-" + tel; 24747 } 24748 $this.val(output); 24749 if (minLength > output.length) { 24750 console.log(`Min Length should be ${minLength}`); 24751 $('.phone-validation').css("border", "1px solid #e31c3d"); 24752 $('.phone-number_errormsg').remove(""); 24753 $(this).parent().append('<span class="phone-number_errormsg" role="alert" id="error-name"></span>'); 24754 // $(".phone-number_errormsg").parent().css({ "margin-bottom": "40px" }); 24755 $('.phone-number_errormsg').html(`Minimum Length should be ${minLength}`).css("color", "#e31c3d"); 24756 // $(".formContainer .form-button").prop("disabled", true); 24757 $('.phone-validation-input .floating-label').css('color', '#E31C3D'); 24758 $("#gf-modal-submit-btn").prop("disabled", true); 24759 }else{ 24760 24761 $('.phone-number_errormsg').remove(""); 24762 $(".formContainer .form-button").prop("disabled", false); 24763 24764 } 24765 } else { 24766 $this.val(input); 24767 $(".phone-number_errormsg").parent().css({ "margin-bottom": "20px" }); 24768 $('.phone-number_errormsg').remove(""); 24769 $(".formContainer .form-button").prop("disabled", false); 24770 $('.phone-validation').css("border", "1px solid #00b451"); 24771 } 24772 }else { 24773 if (input.length > 0) { 24774 $('.phone-validation').css("border", "1px solid #e31c3d"); 24775 $('.phone-number_errormsg').remove(""); 24776 $(this).parent().append('<span class="phone-number_errormsg" role="alert" id="error-name"></span>'); 24777 $(".phone-number_errormsg").parent().css({ "margin-bottom": "40px" }); 24778 $('.phone-number_errormsg').html(`Min Length should be ${minLength}`).css("color", "#e31c3d"); 24779 $(".formContainer .form-button").prop("disabled", true); 24780 $('.phone-validation-input .floating-label').css('color', '#E31C3D'); 24781 $("#gf-modal-submit-btn").prop("disabled", true); 24782 } 24783 } 24784 }); 24785}) 24786/*! @license DOMPurify 2.4.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.0/LICENSE */ 24787!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,n){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,n)}function n(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function r(e,o,a){return r=n()?Reflect.construct:function(e,n,r){var o=[null];o.push.apply(o,n);var a=new(Function.bind.apply(e,o));return r&&t(a,r.prototype),a},r.apply(null,arguments)}function o(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var i=Object.hasOwnProperty,l=Object.setPrototypeOf,c=Object.isFrozen,u=Object.getPrototypeOf,s=Object.getOwnPropertyDescriptor,m=Object.freeze,f=Object.seal,p=Object.create,d="undefined"!=typeof Reflect&&Reflect,h=d.apply,g=d.construct;h||(h=function(e,t,n){return e.apply(t,n)}),m||(m=function(e){return e}),f||(f=function(e){return e}),g||(g=function(e,t){return r(e,o(t))});var y,b=_(Array.prototype.forEach),v=_(Array.prototype.pop),T=_(Array.prototype.push),N=_(String.prototype.toLowerCase),A=_(String.prototype.match),E=_(String.prototype.replace),w=_(String.prototype.indexOf),x=_(String.prototype.trim),S=_(RegExp.prototype.test),k=(y=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return g(y,t)});function _(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return h(e,t,r)}}function O(e,t,n){n=n||N,l&&l(e,null);for(var r=t.length;r--;){var o=t[r];if("string"==typeof o){var a=n(o);a!==o&&(c(t)||(t[r]=a),o=a)}e[o]=!0}return e}function D(e){var t,n=p(null);for(t in e)h(i,e,[t])&&(n[t]=e[t]);return n}function R(e,t){for(;null!==e;){var n=s(e,t);if(n){if(n.get)return _(n.get);if("function"==typeof n.value)return _(n.value)}e=u(e)}return function(e){return console.warn("fallback value for",e),null}}var M=m(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),C=m(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),L=m(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),I=m(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),F=m(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),H=m(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=m(["#text"]),z=m(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
24787spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),j=m(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),B=m(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),P=m(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),G=f(/\{\{[\w\W]*|[\w\W]*\}\}/gm),W=f(/<%[\w\W]*|[\w\W]*%>/gm),q=f(/^data-[\-\w.\u00B7-\uFFFF]/),Y=f(/^aria-[\-\w]+$/),K=f(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),V=f(/^(?:\w+script|data):/i),$=f(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),X=f(/^html$/i),Z=function(){return"undefined"==typeof window?null:window},J=function(t,n){if("object"!==e(t)||"function"!=typeof t.createPolicy)return null;var r=null,o="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(o)&&(r=n.currentScript.getAttribute(o));var a="dompurify"+(r?"#"+r:"");try{return t.createPolicy(a,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+a+" could not be created."),null}};var Q=function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Z(),r=function(e){return t(e)};if(r.version="2.4.0",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;var a=n.document,i=n.document,l=n.DocumentFragment,c=n.HTMLTemplateElement,u=n.Node,s=n.Element,f=n.NodeFilter,p=n.NamedNodeMap,d=void 0===p?n.NamedNodeMap||n.MozNamedAttrMap:p,h=n.HTMLFormElement,g=n.DOMParser,y=n.trustedTypes,_=s.prototype,Q=R(_,"cloneNode"),ee=R(_,"nextSibling"),te=R(_,"childNodes"),ne=R(_,"parentNode");if("function"==typeof c){var re=i.createElement("template");re.content&&re.content.ownerDocument&&(i=re.content.ownerDocument)}var oe=J(y,a),ae=oe?oe.createHTML(""):"",ie=i,le=ie.implementation,ce=ie.createNodeIterator,ue=ie.createDocumentFragment,se=ie.getElementsByTagName,me=a.importNode,fe={};try{fe=D(i).documentMode?i.documentMode:{}}catch(e){}var pe={};r.isSupported="function"==typeof ne&&le&&void 0!==le.createHTMLDocument&&9!==fe;var de,he,ge=G,ye=W,be=q,ve=Y,Te=V,Ne=$,Ae=K,Ee=null,we=O({},[].concat(o(M),o(C),o(L),o(F),o(U))),xe=null,Se=O({},[].concat(o(z),o(j),o(B),o(P))),ke=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),_e=null,Oe=null,De=!0,Re=!0,Me=!1,Ce=!1,Le=!1,Ie=!1,Fe=!1,He=!1,Ue=!1,ze=!1,je=!0,Be=!1,Pe="user-content-",Ge=!0,We=!1,qe={},Ye=null,Ke=O({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ve=null,$e=O({},["audio","video","img","source","image","track"]),Xe=null,Ze=O({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Je="http://www.w3.org/1998/Math/MathML",Qe="http://www.w3.org/2000/svg",et="http://www.w3.org/1999/xhtml",tt=et,nt=!1,rt=["application/xhtml+xml","text/html"],ot="text/html",at=null,it=i.createElement("form"),lt=function(e){return e instanceof RegExp||e instanceof Function},ct=function(t){at&&at===t||(t&&"object"===e(t)||(t={}
24787),t=D(t),de=de=-1===rt.indexOf(t.PARSER_MEDIA_TYPE)?ot:t.PARSER_MEDIA_TYPE,he="application/xhtml+xml"===de?function(e){return e}:N,Ee="ALLOWED_TAGS"in t?O({},t.ALLOWED_TAGS,he):we,xe="ALLOWED_ATTR"in t?O({},t.ALLOWED_ATTR,he):Se,Xe="ADD_URI_SAFE_ATTR"in t?O(D(Ze),t.ADD_URI_SAFE_ATTR,he):Ze,Ve="ADD_DATA_URI_TAGS"in t?O(D($e),t.ADD_DATA_URI_TAGS,he):$e,Ye="FORBID_CONTENTS"in t?O({},t.FORBID_CONTENTS,he):Ke,_e="FORBID_TAGS"in t?O({},t.FORBID_TAGS,he):{},Oe="FORBID_ATTR"in t?O({},t.FORBID_ATTR,he):{},qe="USE_PROFILES"in t&&t.USE_PROFILES,De=!1!==t.ALLOW_ARIA_ATTR,Re=!1!==t.ALLOW_DATA_ATTR,Me=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Ce=t.SAFE_FOR_TEMPLATES||!1,Le=t.WHOLE_DOCUMENT||!1,He=t.RETURN_DOM||!1,Ue=t.RETURN_DOM_FRAGMENT||!1,ze=t.RETURN_TRUSTED_TYPE||!1,Fe=t.FORCE_BODY||!1,je=!1!==t.SANITIZE_DOM,Be=t.SANITIZE_NAMED_PROPS||!1,Ge=!1!==t.KEEP_CONTENT,We=t.IN_PLACE||!1,Ae=t.ALLOWED_URI_REGEXP||Ae,tt=t.NAMESPACE||et,t.CUSTOM_ELEMENT_HANDLING&<(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ke.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&<(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ke.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ke.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ce&&(Re=!1),Ue&&(He=!0),qe&&(Ee=O({},o(U)),xe=[],!0===qe.html&&(O(Ee,M),O(xe,z)),!0===qe.svg&&(O(Ee,C),O(xe,j),O(xe,P)),!0===qe.svgFilters&&(O(Ee,L),O(xe,j),O(xe,P)),!0===qe.mathMl&&(O(Ee,F),O(xe,B),O(xe,P))),t.ADD_TAGS&&(Ee===we&&(Ee=D(Ee)),O(Ee,t.ADD_TAGS,he)),t.ADD_ATTR&&(xe===Se&&(xe=D(xe)),O(xe,t.ADD_ATTR,he)),t.ADD_URI_SAFE_ATTR&&O(Xe,t.ADD_URI_SAFE_ATTR,he),t.FORBID_CONTENTS&&(Ye===Ke&&(Ye=D(Ye)),O(Ye,t.FORBID_CONTENTS,he)),Ge&&(Ee["#text"]=!0),Le&&O(Ee,["html","head","body"]),Ee.table&&(O(Ee,["tbody"]),delete _e.tbody),m&&m(t),at=t)},ut=O({},["mi","mo","mn","ms","mtext"]),st=O({},["foreignobject","desc","title","annotation-xml"]),mt=O({},["title","style","font","a","script"]),ft=O({},C);O(ft,L),O(ft,I);var pt=O({},F);O(pt,H);var dt=function(e){var t=ne(e);t&&t.tagName||(t={namespaceURI:et,tagName:"template"});var n=N(e.tagName),r=N(t.tagName);return e.namespaceURI===Qe?t.namespaceURI===et?"svg"===n:t.namespaceURI===Je?"svg"===n&&("annotation-xml"===r||ut[r]):Boolean(ft[n]):e.namespaceURI===Je?t.namespaceURI===et?"math"===n:t.namespaceURI===Qe?"math"===n&&st[r]:Boolean(pt[n]):e.namespaceURI===et&&(!(t.namespaceURI===Qe&&!st[r])&&(!(t.namespaceURI===Je&&!ut[r])&&(!pt[n]&&(mt[n]||!ft[n]))))},ht=function(e){T(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=ae}catch(t){e.remove()}}},gt=function(e,t){try{T(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){T(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!xe[e])if(He||Ue)try{ht(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},yt=function(e){var t,n;if(Fe)e="<remove></remove>"+e;else{var r=A(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===de&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var o=oe?oe.createHTML(e):e;if(tt===et)try{t=(new g).parseFromString(o,de)}catch(e){}if(!t||!t.documentElement){t=le.createDocument(tt,"template",null);try{t.documentElement.innerHTML=nt?"":o}catch(e){}}var a=t.body||t.documentElement;return e&&n&&a.insertBefore(i.createTextNode(n),a.childNodes[0]||null),tt===et?se.call(t,Le?"html":"body")[0]:Le?t.documentElement:a},bt=function(e){return ce.call(e.ownerDocument||e,e,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT,null,!1)},vt=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Tt=function(t){return"object"===e(u)?t instanceof u:t&&"object"===e(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},Nt=function(e,t,n){pe[e]&&b(pe[e],(function(e){e.call(r,t,n,at)}))},At=function(e){var t;if(Nt("beforeSanitizeElements",e,null),vt(e))return ht(e),!0;if(S(/[\u0080-\uFFFF]/,e.nodeName))return ht(e),!0;var n=he(e.nodeName);if(Nt("uponSanitizeElement",e,{tagName:n,allowedTags:Ee}),e.hasChildNodes()&&!Tt(e.firstElementChild)&&(!Tt(e.content)||!Tt(e.content.firstElementChild))&&S(/<[/\w]/g,e.innerHTML)&&S(/<[/\w]/g,e.textContent))return ht(e),!0;if("select"===n&&S(/<template/i,e.innerHTML))return ht(e),!0;
24787if(!Ee[n]||_e[n]){if(!_e[n]&&wt(n)){if(ke.tagNameCheck instanceof RegExp&&S(ke.tagNameCheck,n))return!1;if(ke.tagNameCheck instanceof Function&&ke.tagNameCheck(n))return!1}if(Ge&&!Ye[n]){var o=ne(e)||e.parentNode,a=te(e)||e.childNodes;if(a&&o)for(var i=a.length-1;i>=0;--i)o.insertBefore(Q(a[i],!0),ee(e))}return ht(e),!0}return e instanceof s&&!dt(e)?(ht(e),!0):"noscript"!==n&&"noembed"!==n||!S(/<\/no(script|embed)/i,e.innerHTML)?(Ce&&3===e.nodeType&&(t=e.textContent,t=E(t,ge," "),t=E(t,ye," "),e.textContent!==t&&(T(r.removed,{element:e.cloneNode()}),e.textContent=t)),Nt("afterSanitizeElements",e,null),!1):(ht(e),!0)},Et=function(e,t,n){if(je&&("id"===t||"name"===t)&&(n in i||n in it))return!1;if(Re&&!Oe[t]&&S(be,t));else if(De&&S(ve,t));else if(!xe[t]||Oe[t]){if(!(wt(e)&&(ke.tagNameCheck instanceof RegExp&&S(ke.tagNameCheck,e)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(e))&&(ke.attributeNameCheck instanceof RegExp&&S(ke.attributeNameCheck,t)||ke.attributeNameCheck instanceof Function&&ke.attributeNameCheck(t))||"is"===t&&ke.allowCustomizedBuiltInElements&&(ke.tagNameCheck instanceof RegExp&&S(ke.tagNameCheck,n)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(n))))return!1}else if(Xe[t]);else if(S(Ae,E(n,Ne,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==w(n,"data:")||!Ve[e]){if(Me&&!S(Te,E(n,Ne,"")));else if(n)return!1}else;return!0},wt=function(e){return e.indexOf("-")>0},xt=function(t){var n,o,a,i;Nt("beforeSanitizeAttributes",t,null);var l=t.attributes;if(l){var c={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:xe};for(i=l.length;i--;){var u=n=l[i],s=u.name,m=u.namespaceURI;if(o="value"===s?n.value:x(n.value),a=he(s),c.attrName=a,c.attrValue=o,c.keepAttr=!0,c.forceKeepAttr=void 0,Nt("uponSanitizeAttribute",t,c),o=c.attrValue,!c.forceKeepAttr&&(gt(s,t),c.keepAttr))if(S(/\/>/i,o))gt(s,t);else{Ce&&(o=E(o,ge," "),o=E(o,ye," "));var f=he(t.nodeName);if(Et(f,a,o)){if(!Be||"id"!==a&&"name"!==a||(gt(s,t),o=Pe+o),oe&&"object"===e(y)&&"function"==typeof y.getAttributeType)if(m);else switch(y.getAttributeType(f,a)){case"TrustedHTML":o=oe.createHTML(o);break;case"TrustedScriptURL":o=oe.createScriptURL(o)}try{m?t.setAttributeNS(m,s,o):t.setAttribute(s,o),v(r.removed)}catch(e){}}}}Nt("afterSanitizeAttributes",t,null)}},St=function e(t){var n,r=bt(t);for(Nt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)Nt("uponSanitizeShadowNode",n,null),At(n)||(n.content instanceof l&&e(n.content),xt(n));Nt("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(t){var o,i,c,s,m,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((nt=!t)&&(t="\x3c!--\x3e"),"string"!=typeof t&&!Tt(t)){if("function"!=typeof t.toString)throw k("toString is not a function");if("string"!=typeof(t=t.toString()))throw k("dirty is not a string, aborting")}if(!r.isSupported){if("object"===e(n.toStaticHTML)||"function"==typeof n.toStaticHTML){if("string"==typeof t)return n.toStaticHTML(t);if(Tt(t))return n.toStaticHTML(t.outerHTML)}return t}if(Ie||ct(f),r.removed=[],"string"==typeof t&&(We=!1),We){if(t.nodeName){var p=he(t.nodeName);if(!Ee[p]||_e[p])throw k("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof u)1===(i=(o=yt("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?o=i:o.appendChild(i);else{if(!He&&!Ce&&!Le&&-1===t.indexOf("<"))return oe&&ze?oe.createHTML(t):t;if(!(o=yt(t)))return He?null:ze?ae:""}o&&Fe&&ht(o.firstChild);for(var d=bt(We?t:o);c=d.nextNode();)3===c.nodeType&&c===s||At(c)||(c.content instanceof l&&St(c.content),xt(c),s=c);if(s=null,We)return t;if(He){if(Ue)for(m=ue.call(o.ownerDocument);o.firstChild;)m.appendChild(o.firstChild);else m=o;return xe.shadowroot&&(m=me.call(a,m,!0)),m}var h=Le?o.outerHTML:o.innerHTML;return Le&&Ee["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&S(X,o.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+o.ownerDocument.doctype.name+">\n"+h),Ce&&(h=E(h,ge," "),h=E(h,ye," ")),oe&&ze?oe.createHTML(h):h},r.setConfig=function(e){ct(e),Ie=!0},r.clearConfig=function(){at=null,Ie=!1},r.isValidAttribute=function(e,t,n){at||ct({});var r=he(e),o=he(t);return Et(r,o,n)},r.addHook=function(e,t){"function"==typeof t&&(pe[e]=pe[e]||[],T(pe[e],t))},r.removeHook=function(e){if(pe[e])return v(pe[e])},r.removeHooks=function(e){pe[e]&&(pe[e]=[])},r.removeAllHooks=function(){pe={}},r}();return Q})); 24788//# sourceMappingURL=purify.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.