1 2(function(n,t){function s(){var n=r.elements;return"string"==typeof n?n.split(" "):n}function u(n){var t=a[n[l]];return t||(t={},o++,n[l]=o,a[o]=t),t}function h(n,r,f){return(r||(r=t),i)?r.createElement(n):(f||(f=u(r)),r=f.cache[n]?f.cache[n].cloneNode():p.test(n)?(f.cache[n]=f.createElem(n)).cloneNode():f.createElem(n),r.canHaveChildren&&!y.test(n)?f.frag.appendChild(r):r)}function v(n,t){t.cache||(t.cache={},t.createElem=n.createElement,t.createFrag=n.createDocumentFragment,t.frag=t.createFrag());n.createElement=function(i){return r.shivMethods?h(i,n,t):t.createElem(i)};n.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+s().join().replace(/[\w\-]+/g,function(n){return t.createElem(n),t.frag.createElement(n),'c("'+n+'")'})+");return n}")(r,t.frag)}function c(n){var s,o,f;return n||(n=t),s=u(n),!r.shivCSS||e||s.hasCSS||(f=n,o=f.createElement("p"),f=f.getElementsByTagName("head")[0]||f.documentElement,o.innerHTML="x<style>article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}<\/style>",o=f.insertBefore(o.lastChild,f.firstChild),s.hasCSS=!!o),i||v(n,s),n}var f=n.html5||{},y=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,e,l="_html5shiv",o=0,a={},i,r;(function(){var n,u,r;try{n=t.createElement("a");n.innerHTML="<xyz><\/xyz>";e="hidden"in n;(u=1===n.childNodes.length)||(t.createElement("a"),r=t.createDocumentFragment(),u="undefined"==typeof r.cloneNode||"undefined"==typeof r.createDocumentFragment||"undefined"==typeof r.createElement);i=u}catch(f){i=e=!0}})();r={elements:f.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==f.shivCSS,supportsUnknownElements:i,shivMethods:!1!==f.shivMethods,type:"default",shivDocument:c,createElement:h,createDocumentFragment:function(n,r){if(n||(n=t),i)return n.createDocumentFragment();for(var r=r||u(n),e=r.frag.cloneNode(),f=0,o=s(),h=o.length;f<h;f++)e.createElement(o[f]);return e}};n.html5=r;c(t)})(this,document);/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */ 3/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */ 4window.matchMedia=window.matchMedia||(function(e,f){var c,a=e.documentElement,b=a.firstElementChild||a.firstChild,d=e.createElement("body"),g=e.createElement("div");g.id="mq-test-1";g.style.cssText="position:absolute;top:-100em";d.style.background="none";d.appendChild(g);return function(h){g.innerHTML='­<style media="'+h+'"> #mq-test-1 { width: 42px; }</style>';a.insertBefore(d,b);c=g.offsetWidth==42;a.removeChild(d);return{matches:c,media:h}}})(document); 5 6/*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ 7(function(e){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=e.matchMedia&&e.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var w=e.document,s=w.documentElement,i=[],k=[],q=[],o={},h=30,f=w.getElementsByTagName("head")[0]||s,g=w.getElementsByTagName("base")[0],b=f.getElementsByTagName("link"),d=[],a=function(){var D=b,y=D.length,B=0,A,z,C,x;for(;B<y;B++){A=D[B],z=A.href,C=A.media,x=A.rel&&A.rel.toLowerCase()==="stylesheet";if(!!z&&x&&!o[z]){if(A.styleSheet&&A.styleSheet.rawCssText){m(A.styleSheet.rawCssText,z,C);o[z]=true}else{if((!/^([a-zA-Z:]*\/\/)/.test(z)&&!g)||z.replace(RegExp.$1,"").split("/")[0]===e.location.host){d.push({href:z,media:C})}}}}u()},u=function(){if(d.length){var x=d.shift();n(x.href,function(y){m(y,x.href,x.media);o[x.href]=true;u()})}},m=function(I,x,z){var G=I.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),J=G&&G.length||0,x=x.substring(0,x.lastIndexOf("/")),y=function(K){return K.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+x+"$2$3")},A=!J&&z,D=0,C,E,F,B,H;if(x.length){x+="/"}if(A){J=1}for(;D<J;D++){C=0;if(A){E=z;k.push(y(I))}else{E=G[D].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1;k.push(RegExp.$2&&y(RegExp.$2))}B=E.split(",");H=B.length;for(;C<H;C++){F=B[C];i.push({media:F.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:k.length-1,hasquery:F.indexOf("(")>-1,minw:F.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:F.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}j()},l,r,v=function(){var z,A=w.createElement("div"),x=w.body,y=false;A.style.cssText="position:absolute;font-size:1em;width:1em";if(!x){x=y=w.createElement("body");x.style.background="none"}x.appendChild(A);
7s.insertBefore(x,s.firstChild);z=A.offsetWidth;if(y){s.removeChild(x)}else{x.removeChild(A)}z=p=parseFloat(z);return z},p,j=function(I){var x="clientWidth",B=s[x],H=w.compatMode==="CSS1Compat"&&B||w.body[x]||B,D={},G=b[b.length-1],z=(new Date()).getTime();if(I&&l&&z-l<h){clearTimeout(r);r=setTimeout(j,h);return}else{l=z}for(var E in i){var K=i[E],C=K.minw,J=K.maxw,A=C===null,L=J===null,y="em";if(!!C){C=parseFloat(C)*(C.indexOf(y)>-1?(p||v()):1)}if(!!J){J=parseFloat(J)*(J.indexOf(y)>-1?(p||v()):1)}if(!K.hasquery||(!A||!L)&&(A||H>=C)&&(L||H<=J)){if(!D[K.media]){D[K.media]=[]}D[K.media].push(k[K.rules])}}for(var E in q){if(q[E]&&q[E].parentNode===f){f.removeChild(q[E])}}for(var E in D){var M=w.createElement("style"),F=D[E].join("\n");M.type="text/css";M.media=E;f.insertBefore(M,G.nextSibling);if(M.styleSheet){M.styleSheet.cssText=F}else{M.appendChild(w.createTextNode(F))}q.push(M)}},n=function(x,z){var y=c();if(!y){return}y.open("GET",x,true);y.onreadystatechange=function(){if(y.readyState!=4||y.status!=200&&y.status!=304){return}z(y.responseText)};if(y.readyState==4){return}y.send(null)},c=(function(){var x=false;try{x=new XMLHttpRequest()}catch(y){x=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return x}})();a();respond.update=a;function t(){j(true)}if(e.addEventListener){e.addEventListener("resize",t,false)}else{if(e.attachEvent){e.attachEvent("onresize",t)}}})(this);/*SWFObject v2.2 <http://code.google.com/p/swfobject/> 8is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 9*/ 10var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}
10else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();/*! 11 * jQuery JavaScript Library v2.2.4 12 * http://jquery.com/ 13 * 14 * Includes Sizzle.js 15 * http://sizzlejs.com/ 16 * 17 * Copyright jQuery Foundation and other contributors 18 * Released under the MIT license 19 * http://jquery.org/license 20 * 21 * Date: 2016-05-20T17:23Z 22 */ 23 24(function (global, factory) { 25 26if (typeof module === "object" && typeof module.exports === "object") { 27// For CommonJS and CommonJS-like environments where a proper `window` 28// is present, execute the factory and get jQuery. 29// For environments that do not have a `window` with a `document` 30// (such as Node.js), expose a factory as module.exports. 31// This accentuates the need for the creation of a real `window`.
vendor: 8,086 bytes, lines 32-386
32// e.g. var jQuery = require("jquery")(window); 33// See ticket #14549 for more info. 34module.exports = global.document ? 35factory(global, true) : 36function (w) { 37if (!w.document) { 38throw new Error("jQuery requires a window with a document"); 39} 40return factory(w); 41}; 42} else { 43factory(global); 44} 45 46// Pass this if window is not defined yet 47}(typeof window !== "undefined" ? window : this, function (window, noGlobal) { 48 49// Support: Firefox 18+ 50// Can't be in strict mode, several libs including ASP.NET trace 51// the stack via arguments.caller.callee and Firefox dies if 52// you try to trace through "use strict" call chains. (#13335) 53//"use strict"; 54var arr = []; 55 56var document = window.document; 57 58var slice = arr.slice; 59 60var concat = arr.concat; 61 62var push = arr.push; 63 64var indexOf = arr.indexOf; 65 66var class2type = {}; 67 68var toString = class2type.toString; 69 70var hasOwn = class2type.hasOwnProperty; 71 72var support = {}; 73 74 75 76var 77version = "2.2.4", 78 79// Define a local copy of jQuery 80jQuery = function (selector, context) { 81 82// The jQuery object is actually just the init constructor 'enhanced' 83// Need init if jQuery is called (just allow error to be thrown if not included) 84return new jQuery.fn.init(selector, context); 85}, 86 87// Support: Android<4.1 88// Make sure we trim BOM and NBSP 89rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, 90 91// Matches dashed string for camelizing 92rmsPrefix = /^-ms-/, 93rdashAlpha = /-([\da-z])/gi, 94 95// Used by jQuery.camelCase as callback to replace() 96fcamelCase = function (all, letter) { 97return letter.toUpperCase(); 98}; 99 100jQuery.fn = jQuery.prototype = { 101 102// The current version of jQuery being used 103jquery: version, 104 105constructor: jQuery, 106 107// Start with an empty selector 108selector: "", 109 110// The default length of a jQuery object is 0 111length: 0, 112 113toArray: function () { 114return slice.call(this); 115}, 116 117// Get the Nth element in the matched element set OR 118// Get the whole matched element set as a clean array 119get: function (num) { 120return num != null ? 121 122// Return just the one element from the set 123(num < 0 ? this[num + this.length] : this[num]) : 124 125// Return all the elements in a clean array 126slice.call(this); 127}, 128 129// Take an array of elements and push it onto the stack 130// (returning the new matched element set) 131pushStack: function (elems) { 132 133// Build a new jQuery matched element set 134var ret = jQuery.merge(this.constructor(), elems); 135 136// Add the old object onto the stack (as a reference) 137ret.prevObject = this; 138ret.context = this.context; 139 140// Return the newly-formed element set 141return ret; 142}, 143 144// Execute a callback for every element in the matched set. 145each: function (callback) { 146return jQuery.each(this, callback); 147}, 148 149map: function (callback) { 150return this.pushStack(jQuery.map(this, function (elem, i) { 151return callback.call(elem, i, elem); 152})); 153}, 154 155slice: function () { 156return this.pushStack(slice.apply(this, arguments)); 157}, 158 159first: function () { 160return this.eq(0); 161}, 162 163last: function () { 164return this.eq(-1); 165}, 166 167eq: function (i) { 168var len = this.length, 169j = +i + (i < 0 ? len : 0); 170return this.pushStack(j >= 0 && j < len ? [this[j]] : []); 171}, 172 173end: function () { 174return this.prevObject || this.constructor(); 175}, 176 177// For internal use only. 178// Behaves like an Array's method, not like a jQuery method. 179push: push, 180sort: arr.sort, 181splice: arr.splice 182}; 183 184jQuery.extend = jQuery.fn.extend = function () { 185var options, name, src, copy, copyIsArray, clone, 186target = arguments[0] || {}, 187i = 1, 188length = arguments.length, 189deep = false; 190 191// Handle a deep copy situation 192if (typeof target === "boolean") { 193deep = target; 194 195// Skip the boolean and the target 196target = arguments[i] || {}; 197i++; 198} 199 200// Handle case when target is a string or something (possible in deep copy) 201if (typeof target !== "object" && !jQuery.isFunction(target)) { 202target = {}; 203} 204 205// Extend jQuery itself if only one argument is passed 206if (i === length) { 207target = this; 208i--; 209} 210 211for (; i < length; i++) { 212 213// Only deal with non-null/undefined values 214if ((options = arguments[i]) != null) { 215 216// Extend the base object 217for (name in options) { 218src = target[name]; 219copy = options[name]; 220 221// Prevent never-ending loop 222if (target === copy) { 223continue; 224} 225 226// Recurse if we're merging plain objects or arrays 227if (deep && copy && (jQuery.isPlainObject(copy) || 228(copyIsArray = jQuery.isArray(copy)))) { 229 230if (copyIsArray) { 231copyIsArray = false; 232clone = src && jQuery.isArray(src) ? src : []; 233 234} else { 235clone = src && jQuery.isPlainObject(src) ? src : {}; 236} 237 238// Never move original objects, clone them 239target[name] = jQuery.extend(deep, clone, copy); 240 241// Don't bring in undefined values 242} else if (copy !== undefined) { 243target[name] = copy; 244} 245} 246} 247} 248 249// Return the modified object 250return target; 251}; 252 253jQuery.extend({ 254 255// Unique for each copy of jQuery on the page 256expando: "jQuery" + (version + Math.random()).replace(/\D/g, ""), 257 258// Assume jQuery is ready without the ready module 259isReady: true, 260 261error: function (msg) { 262throw new Error(msg); 263}, 264 265noop: function () { }, 266 267isFunction: function (obj) { 268return jQuery.type(obj) === "function"; 269}, 270 271isArray: Array.isArray, 272 273isWindow: function (obj) { 274return obj != null && obj === obj.window; 275}, 276 277isNumeric: function (obj) { 278 279// parseFloat NaNs numeric-cast false positives (null|true|false|"") 280// ...but misinterprets leading-number strings, particularly hex literals ("0x...") 281// subtraction forces infinities to NaN 282// adding 1 corrects loss of precision from parseFloat (#15100) 283var realStringObj = obj && obj.toString(); 284return !jQuery.isArray(obj) && (realStringObj - parseFloat(realStringObj) + 1) >= 0; 285}, 286 287isPlainObject: function (obj) { 288var key; 289 290// Not plain objects: 291// - Any object or value whose internal [[Class]] property is not "[object Object]" 292// - DOM nodes 293// - window 294if (jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow(obj)) { 295return false; 296} 297 298// Not own constructor property must be Object 299if (obj.constructor && 300!hasOwn.call(obj, "constructor") && 301!hasOwn.call(obj.constructor.prototype || {}, "isPrototypeOf")) { 302return false; 303} 304 305// Own properties are enumerated firstly, so to speed up, 306// if last one is own, then all properties are own 307for (key in obj) { } 308 309return key === undefined || hasOwn.call(obj, key); 310}, 311 312isEmptyObject: function (obj) { 313var name; 314for (name in obj) { 315return false; 316} 317return true; 318}, 319 320type: function (obj) { 321if (obj == null) { 322return obj + ""; 323} 324 325// Support: Android<4.0, iOS<6 (functionish RegExp) 326return typeof obj === "object" || typeof obj === "function" ? 327class2type[toString.call(obj)] || "object" : 328typeof obj; 329}, 330 331// Evaluates a script in a global context 332globalEval: function (code) { 333var script, 334indirect = eval; 335 336code = jQuery.trim(code); 337 338if (code) { 339 340// If the code includes a valid, prologue position 341// strict mode pragma, execute code by injecting a 342// script tag into the document. 343if (code.indexOf("use strict") === 1) { 344script = document.createElement("script"); 345script.text = code; 346document.head.appendChild(script).parentNode.removeChild(script); 347} else { 348 349// Otherwise, avoid the DOM node creation, insertion 350// and removal by using an indirect global eval 351 352indirect(code); 353} 354} 355}, 356 357// Convert dashed to camelCase; used by the css and data modules 358// Support: IE9-11+ 359// Microsoft forgot to hump their vendor prefix (#9572) 360camelCase: function (string) { 361return string.replace(rmsPrefix, "ms-").replace(rdashAlpha, fcamelCase); 362}, 363 364nodeName: function (elem, name) { 365return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); 366}, 367 368each: function (obj, callback) { 369var length, i = 0; 370 371if (isArrayLike(obj)) { 372length = obj.length; 373for (; i < length; i++) { 374if (callback.call(obj[i], i, obj[i]) === false) { 375break; 376} 377} 378} else { 379for (i in obj) { 380if (callback.call(obj[i], i, obj[i]) === false) { 381break; 382} 383} 384} 385 386return obj;
vendor: 4,478 bytes, lines 387-598
387}, 388 389// Support: Android<4.1 390trim: function (text) { 391return text == null ? 392"" : 393(text + "").replace(rtrim, ""); 394}, 395 396// results is for internal usage only 397makeArray: function (arr, results) { 398var ret = results || []; 399 400if (arr != null) { 401if (isArrayLike(Object(arr))) { 402jQuery.merge(ret, 403typeof arr === "string" ? 404[arr] : arr 405); 406} else { 407push.call(ret, arr); 408} 409} 410 411return ret; 412}, 413 414inArray: function (elem, arr, i) { 415return arr == null ? -1 : indexOf.call(arr, elem, i); 416}, 417 418merge: function (first, second) { 419var len = +second.length, 420j = 0, 421i = first.length; 422 423for (; j < len; j++) { 424first[i++] = second[j]; 425} 426 427first.length = i; 428 429return first; 430}, 431 432grep: function (elems, callback, invert) { 433var callbackInverse, 434matches = [], 435i = 0, 436length = elems.length, 437callbackExpect = !invert; 438 439// Go through the array, only saving the items 440// that pass the validator function 441for (; i < length; i++) { 442callbackInverse = !callback(elems[i], i); 443if (callbackInverse !== callbackExpect) { 444matches.push(elems[i]); 445} 446} 447 448return matches; 449}, 450 451// arg is for internal usage only 452map: function (elems, callback, arg) { 453var length, value, 454i = 0, 455ret = []; 456 457// Go through the array, translating each of the items to their new values 458if (isArrayLike(elems)) { 459length = elems.length; 460for (; i < length; i++) { 461value = callback(elems[i], i, arg); 462 463if (value != null) { 464ret.push(value); 465} 466} 467 468// Go through every key on the object, 469} else { 470for (i in elems) { 471value = callback(elems[i], i, arg); 472 473if (value != null) { 474ret.push(value); 475} 476} 477} 478 479// Flatten any nested arrays 480return concat.apply([], ret); 481}, 482 483// A global GUID counter for objects 484guid: 1, 485 486// Bind a function to a context, optionally partially applying any 487// arguments. 488proxy: function (fn, context) { 489var tmp, args, proxy; 490 491if (typeof context === "string") { 492tmp = fn[context]; 493context = fn; 494fn = tmp; 495} 496 497// Quick check to determine if target is callable, in the spec 498// this throws a TypeError, but we will just return undefined. 499if (!jQuery.isFunction(fn)) { 500return undefined; 501} 502 503// Simulated bind 504args = slice.call(arguments, 2); 505proxy = function () { 506return fn.apply(context || this, args.concat(slice.call(arguments))); 507}; 508 509// Set the guid of unique handler to the same of original handler, so it can be removed 510proxy.guid = fn.guid = fn.guid || jQuery.guid++; 511 512return proxy; 513}, 514 515now: Date.now, 516 517// jQuery.support is not used in Core but other projects attach their 518// properties to it so it needs to exist. 519support: support 520}); 521 522// JSHint would error on this code due to the Symbol not being defined in ES5. 523// Defining this global in .jshintrc would create a danger of using the global 524// unguarded in another place, it seems safer to just disable JSHint for these 525// three lines. 526/* jshint ignore: start */ 527if (typeof Symbol === "function") { 528jQuery.fn[Symbol.iterator] = arr[Symbol.iterator]; 529} 530/* jshint ignore: end */ 531 532// Populate the class2type map 533jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), 534function (i, name) { 535class2type["[object " + name + "]"] = name.toLowerCase(); 536}); 537 538function isArrayLike(obj) { 539 540// Support: iOS 8.2 (not reproducible in simulator) 541// `in` check used to prevent JIT error (gh-2145) 542// hasOwn isn't used here due to false negatives 543// regarding Nodelist length in IE 544var length = !!obj && "length" in obj && obj.length, 545type = jQuery.type(obj); 546 547if (type === "function" || jQuery.isWindow(obj)) { 548return false; 549} 550 551return type === "array" || length === 0 || 552typeof length === "number" && length > 0 && (length - 1) in obj; 553} 554var Sizzle = 555/*! 556 * Sizzle CSS Selector Engine v2.2.1 557 * http://sizzlejs.com/ 558 * 559 * Copyright jQuery Foundation and other contributors 560 * Released under the MIT license 561 * http://jquery.org/license 562 * 563 * Date: 2015-10-17 564 */ 565(function (window) { 566 567var i, 568support, 569Expr, 570getText, 571isXML, 572tokenize, 573compile, 574select, 575outermostContext, 576sortInput, 577hasDuplicate, 578 579// Local document vars 580setDocument, 581document, 582docElem, 583documentIsHTML, 584rbuggyQSA, 585rbuggyMatches, 586matches, 587contains, 588 589// Instance-specific data 590expando = "sizzle" + 1 * new Date(), 591preferredDoc = window.document, 592dirruns = 0, 593done = 0, 594classCache = createCache(), 595tokenCache = createCache(), 596compilerCache = createCache(), 597sortOrder = function (a, b) { 598if (a === b) {
vendor: 17,080 bytes, lines 599-1205
599hasDuplicate = true; 600} 601return 0; 602}, 603 604// General-purpose constants 605MAX_NEGATIVE = 1 << 31, 606 607// Instance methods 608hasOwn = ({}).hasOwnProperty, 609arr = [], 610pop = arr.pop, 611push_native = arr.push, 612push = arr.push, 613slice = arr.slice, 614// Use a stripped-down indexOf as it's faster than native 615// http://jsperf.com/thor-indexof-vs-for/5 616indexOf = function (list, elem) { 617var i = 0, 618len = list.length; 619for (; i < len; i++) { 620if (list[i] === elem) { 621return i; 622} 623} 624return -1; 625}, 626 627booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", 628 629// Regular expressions 630 631// http://www.w3.org/TR/css3-selectors/#whitespace 632whitespace = "[\\x20\\t\\r\\n\\f]", 633 634// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier 635identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", 636 637// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors 638attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + 639// Operator (capture 2) 640"*([*^$|!~]?=)" + whitespace + 641// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" 642"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + 643"*\\]", 644 645pseudos = ":(" + identifier + ")(?:\\((" + 646// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: 647// 1. quoted (capture 3; capture 4 or capture 5) 648"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + 649// 2. simple (capture 6) 650"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + 651// 3. anything else (capture 2) 652".*" + 653")\\)|)", 654 655// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter 656rwhitespace = new RegExp(whitespace + "+", "g"), 657rtrim = new RegExp("^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g"), 658 659rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*"), 660rcombinators = new RegExp("^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*"), 661 662rattributeQuotes = new RegExp("=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g"), 663 664rpseudo = new RegExp(pseudos), 665ridentifier = new RegExp("^" + identifier + "$"), 666 667matchExpr = { 668"ID": new RegExp("^#(" + identifier + ")"), 669"CLASS": new RegExp("^\\.(" + identifier + ")"), 670"TAG": new RegExp("^(" + identifier + "|[*])"), 671"ATTR": new RegExp("^" + attributes), 672"PSEUDO": new RegExp("^" + pseudos), 673"CHILD": new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + 674"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + 675"*(\\d+)|))" + whitespace + "*\\)|)", "i"), 676"bool": new RegExp("^(?:" + booleans + ")$", "i"), 677// For use in libraries implementing .is() 678// We use this for POS matching in `select` 679"needsContext": new RegExp("^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + 680whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i") 681}, 682 683rinputs = /^(?:input|select|textarea|button)$/i, 684rheader = /^h\d$/i, 685 686rnative = /^[^{]+\{\s*\[native \w/, 687 688// Easily-parseable/retrievable ID or TAG or CLASS selectors 689rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, 690 691rsibling = /[+~]/, 692rescape = /'|\\/g, 693 694// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters 695runescape = new RegExp("\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig"), 696funescape = function (_, escaped, escapedWhitespace) { 697var high = "0x" + escaped - 0x10000; 698// NaN means non-codepoint 699// Support: Firefox<24 700// Workaround erroneous numeric interpretation of +"0x" 701return high !== high || escapedWhitespace ? 702escaped : 703high < 0 ? 704// BMP codepoint 705String.fromCharCode(high + 0x10000) : 706// Supplemental Plane codepoint (surrogate pair) 707String.fromCharCode(high >> 10 | 0xD800, high & 0x3FF | 0xDC00); 708}, 709 710// Used for iframes 711// See setDocument() 712// Removing the function wrapper causes a "Permission Denied" 713// error in IE 714unloadHandler = function () { 715setDocument(); 716}; 717 718// Optimize for push.apply( _, NodeList ) 719try { 720push.apply( 721(arr = slice.call(preferredDoc.childNodes)), 722preferredDoc.childNodes 723); 724// Support: Android<4.0 725// Detect silently failing push.apply 726arr[preferredDoc.childNodes.length].nodeType; 727} catch (e) { 728push = { 729apply: arr.length ? 730 731// Leverage slice if possible 732function (target, els) { 733push_native.apply(target, slice.call(els)); 734} : 735 736// Support: IE<9 737// Otherwise append directly 738function (target, els) { 739var j = target.length, 740i = 0; 741// Can't trust NodeList.length 742while ((target[j++] = els[i++])) { } 743target.length = j - 1; 744} 745}; 746} 747 748function Sizzle(selector, context, results, seed) { 749var m, i, elem, nid, nidselect, match, groups, newSelector, 750newContext = context && context.ownerDocument, 751 752// nodeType defaults to 9, since context defaults to document 753nodeType = context ? context.nodeType : 9; 754 755results = results || []; 756 757// Return early from calls with invalid selector or context 758if (typeof selector !== "string" || !selector || 759nodeType !== 1 && nodeType !== 9 && nodeType !== 11) { 760 761return results; 762} 763 764// Try to shortcut find operations (as opposed to filters) in HTML documents 765if (!seed) { 766 767if ((context ? context.ownerDocument || context : preferredDoc) !== document) { 768setDocument(context); 769} 770context = context || document; 771 772if (documentIsHTML) { 773 774// If the selector is sufficiently simple, try using a "get*By*" DOM method 775// (excepting DocumentFragment context, where the methods don't exist) 776if (nodeType !== 11 && (match = rquickExpr.exec(selector))) { 777 778// ID selector 779if ((m = match[1])) { 780 781// Document context 782if (nodeType === 9) { 783if ((elem = context.getElementById(m))) { 784 785// Support: IE, Opera, Webkit 786// TODO: identify versions 787// getElementById can match elements by name instead of ID 788if (elem.id === m) { 789results.push(elem); 790return results; 791} 792} else { 793return results; 794} 795 796// Element context 797} else { 798 799// Support: IE, Opera, Webkit 800// TODO: identify versions 801// getElementById can match elements by name instead of ID 802if (newContext && (elem = newContext.getElementById(m)) && 803contains(context, elem) && 804elem.id === m) { 805 806results.push(elem); 807return results; 808} 809} 810 811// Type selector 812} else if (match[2]) { 813push.apply(results, context.getElementsByTagName(selector)); 814return results; 815 816// Class selector 817} else if ((m = match[3]) && support.getElementsByClassName && 818context.getElementsByClassName) { 819 820push.apply(results, context.getElementsByClassName(m)); 821return results; 822} 823} 824 825// Take advantage of querySelectorAll 826if (support.qsa && 827!compilerCache[selector + " "] && 828(!rbuggyQSA || !rbuggyQSA.test(selector))) { 829 830if (nodeType !== 1) { 831newContext = context; 832newSelector = selector; 833 834// qSA looks outside Element context, which is not what we want 835// Thanks to Andrew Dupont for this workaround technique 836// Support: IE <=8 837// Exclude object elements 838} else if (context.nodeName.toLowerCase() !== "object") { 839 840// Capture the context ID, setting it first if necessary 841if ((nid = context.getAttribute("id"))) { 842nid = nid.replace(rescape, "\\$&"); 843} else { 844context.setAttribute("id", (nid = expando)); 845} 846 847// Prefix every selector in the list 848groups = tokenize(selector); 849i = groups.length; 850nidselect = ridentifier.test(nid) ? "#" + nid : "[id='" + nid + "']"; 851while (i--) { 852groups[i] = nidselect + " " + toSelector(groups[i]); 853} 854newSelector = groups.join(","); 855 856// Expand context for sibling selectors 857newContext = rsibling.test(selector) && testContext(context.parentNode) || 858context; 859} 860 861if (newSelector) { 862try { 863push.apply(results, 864newContext.querySelectorAll(newSelector) 865); 866return results; 867} catch (qsaError) { 868} finally { 869if (nid === expando) { 870context.removeAttribute("id"); 871} 872} 873} 874} 875} 876} 877 878// All others 879return select(selector.replace(rtrim, "$1"), context, results, seed); 880} 881 882/** 883 * Create key-value caches of limited size 884 * @returns {function(string, object)} Returns the Object data after storing it on itself with 885 *property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) 886 *deleting the oldest entry 887 */ 888function createCache() { 889var keys = []; 890 891function cache(key, value) { 892// Use (key + " ") to avoid collision with native prototype properties (see Issue #157) 893if (keys.push(key + " ") > Expr.cacheLength) { 894// Only keep the most recent entries 895delete cache[keys.shift()]; 896} 897return (cache[key + " "] = value); 898} 899return cache; 900} 901 902/** 903 * Mark a function for special use by Sizzle 904 * @param {Function} fn The function to mark 905 */ 906function markFunction(fn) { 907fn[expando] = true; 908return fn; 909} 910 911/** 912 * Support testing using an element 913 * @param {Function} fn Passed the created div and expects a boolean result 914 */ 915function assert(fn) { 916var div = document.createElement("div"); 917 918try { 919return !!fn(div); 920} catch (e) { 921return false; 922} finally { 923// Remove from its parent by default 924if (div.parentNode) { 925div.parentNode.removeChild(div); 926} 927// release memory in IE 928div = null; 929} 930} 931 932/** 933 * Adds the same handler for all of the specified attrs 934 * @param {String} attrs Pipe-separated list of attributes 935 * @param {Function} handler The method that will be applied 936 */ 937function addHandle(attrs, handler) { 938var arr = attrs.split("|"), 939i = arr.length; 940 941while (i--) { 942Expr.attrHandle[arr[i]] = handler; 943} 944} 945 946/** 947 * Checks document order of two siblings 948 * @param {Element} a 949 * @param {Element} b 950 * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b 951 */ 952function siblingCheck(a, b) { 953var cur = b && a, 954diff = cur && a.nodeType === 1 && b.nodeType === 1 && 955(~b.sourceIndex || MAX_NEGATIVE) - 956(~a.sourceIndex || MAX_NEGATIVE); 957 958// Use IE sourceIndex if available on both nodes 959if (diff) { 960return diff; 961} 962 963// Check if b follows a 964if (cur) { 965while ((cur = cur.nextSibling)) { 966if (cur === b) { 967return -1; 968} 969} 970} 971 972return a ? 1 : -1; 973} 974 975/** 976 * Returns a function to use in pseudos for input types 977 * @param {String} type 978 */ 979function createInputPseudo(type) { 980return function (elem) { 981var name = elem.nodeName.toLowerCase(); 982return name === "input" && elem.type === type; 983}; 984} 985 986/** 987 * Returns a function to use in pseudos for buttons 988 * @param {String} type 989 */ 990function createButtonPseudo(type) { 991return function (elem) { 992var name = elem.nodeName.toLowerCase(); 993return (name === "input" || name === "button") && elem.type === type; 994}; 995} 996 997/** 998 * Returns a function to use in pseudos for positionals 999 * @param {Function} fn 1000 */ 1001function createPositionalPseudo(fn) { 1002return markFunction(function (argument) { 1003argument = +argument; 1004return markFunction(function (seed, matches) { 1005var j, 1006matchIndexes = fn([], seed.length, argument), 1007i = matchIndexes.length; 1008 1009// Match elements found at the specified indexes 1010while (i--) { 1011if (seed[(j = matchIndexes[i])]) { 1012seed[j] = !(matches[j] = seed[j]); 1013} 1014} 1015}); 1016}); 1017} 1018 1019/** 1020 * Checks a node for validity as a Sizzle context 1021 * @param {Element|Object=} context 1022 * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value 1023 */ 1024function testContext(context) { 1025return context && typeof context.getElementsByTagName !== "undefined" && context; 1026} 1027 1028// Expose support vars for convenience 1029support = Sizzle.support = {}; 1030 1031/** 1032 * Detects XML nodes 1033 * @param {Element|Object} elem An element or a document 1034 * @returns {Boolean} True iff elem is a non-HTML XML node 1035 */ 1036isXML = Sizzle.isXML = function (elem) { 1037// documentElement is verified for cases where it doesn't yet exist 1038// (such as loading iframes in IE - #4833) 1039var documentElement = elem && (elem.ownerDocument || elem).documentElement; 1040return documentElement ? documentElement.nodeName !== "HTML" : false; 1041}; 1042 1043/** 1044 * Sets document-related variables once based on the current document 1045 * @param {Element|Object} [doc] An element or document object to use to set the document 1046 * @returns {Object} Returns the current document 1047 */ 1048setDocument = Sizzle.setDocument = function (node) { 1049var hasCompare, parent, 1050doc = node ? node.ownerDocument || node : preferredDoc; 1051 1052// Return early if doc is invalid or already selected 1053if (doc === document || doc.nodeType !== 9 || !doc.documentElement) { 1054return document; 1055} 1056 1057// Update global variables 1058document = doc; 1059docElem = document.documentElement; 1060documentIsHTML = !isXML(document); 1061 1062// Support: IE 9-11, Edge 1063// Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) 1064if ((parent = document.defaultView) && parent.top !== parent) { 1065// Support: IE 11 1066if (parent.addEventListener) { 1067parent.addEventListener("unload", unloadHandler, false); 1068 1069// Support: IE 9 - 10 only 1070} else if (parent.attachEvent) { 1071parent.attachEvent("onunload", unloadHandler); 1072} 1073} 1074 1075/* Attributes 1076---------------------------------------------------------------------- */ 1077 1078// Support: IE<8 1079// Verify that getAttribute really returns attributes and not properties 1080// (excepting IE8 booleans) 1081support.attributes = assert(function (div) { 1082div.className = "i"; 1083return !div.getAttribute("className"); 1084}); 1085 1086/* getElement(s)By* 1087---------------------------------------------------------------------- */ 1088 1089// Check if getElementsByTagName("*") returns only elements 1090support.getElementsByTagName = assert(function (div) { 1091div.appendChild(document.createComment("")); 1092return !div.getElementsByTagName("*").length; 1093}); 1094 1095// Support: IE<9 1096support.getElementsByClassName = rnative.test(document.getElementsByClassName); 1097 1098// Support: IE<10 1099// Check if getElementById returns elements by name 1100// The broken getElementById methods don't pick up programatically-set names, 1101// so use a roundabout getElementsByName test 1102support.getById = assert(function (div) { 1103docElem.appendChild(div).id = expando; 1104return !document.getElementsByName || !document.getElementsByName(expando).length; 1105}); 1106 1107// ID find and filter 1108if (support.getById) { 1109Expr.find["ID"] = function (id, context) { 1110if (typeof context.getElementById !== "undefined" && documentIsHTML) { 1111var m = context.getElementById(id); 1112return m ? [m] : []; 1113} 1114}; 1115Expr.filter["ID"] = function (id) { 1116var attrId = id.replace(runescape, funescape); 1117return function (elem) { 1118return elem.getAttribute("id") === attrId; 1119}; 1120}; 1121} else { 1122// Support: IE6/7 1123// getElementById is not reliable as a find shortcut 1124delete Expr.find["ID"]; 1125 1126Expr.filter["ID"] = function (id) { 1127var attrId = id.replace(runescape, funescape); 1128return function (elem) { 1129var node = typeof elem.getAttributeNode !== "undefined" && 1130elem.getAttributeNode("id"); 1131return node && node.value === attrId; 1132}; 1133}; 1134} 1135 1136// Tag 1137Expr.find["TAG"] = support.getElementsByTagName ? 1138function (tag, context) { 1139if (typeof context.getElementsByTagName !== "undefined") { 1140return context.getElementsByTagName(tag); 1141 1142// DocumentFragment nodes don't have gEBTN 1143} else if (support.qsa) { 1144return context.querySelectorAll(tag); 1145} 1146} : 1147 1148function (tag, context) { 1149var elem, 1150tmp = [], 1151i = 0, 1152// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too 1153results = context.getElementsByTagName(tag); 1154 1155// Filter out possible comments 1156if (tag === "*") { 1157while ((elem = results[i++])) { 1158if (elem.nodeType === 1) { 1159tmp.push(elem); 1160} 1161} 1162 1163return tmp; 1164} 1165return results; 1166}; 1167 1168// Class 1169Expr.find["CLASS"] = support.getElementsByClassName && function (className, context) { 1170if (typeof context.getElementsByClassName !== "undefined" && documentIsHTML) { 1171return context.getElementsByClassName(className); 1172} 1173}; 1174 1175/* QSA/matchesSelector 1176---------------------------------------------------------------------- */ 1177 1178// QSA and matchesSelector support 1179 1180// matchesSelector(:active) reports false when true (IE9/Opera 11.5) 1181rbuggyMatches = []; 1182 1183// qSa(:focus) reports false when true (Chrome 21) 1184// We allow this because of a bug in IE8/9 that throws an error 1185// whenever `document.activeElement` is accessed on an iframe 1186// So, we allow :focus to pass through QSA all the time to avoid the IE error 1187// See http://bugs.jquery.com/ticket/13378 1188rbuggyQSA = []; 1189 1190if ((support.qsa = rnative.test(document.querySelectorAll))) { 1191// Build QSA regex 1192// Regex strategy adopted from Diego Perini 1193assert(function (div) { 1194// Select is set to empty string on purpose 1195// This is to test IE's treatment of not explicitly 1196// setting a boolean content attribute, 1197// since its presence should be enough 1198// http://bugs.jquery.com/ticket/12359 1199docElem.appendChild(div).innerHTML = "<a id='" + expando + "'></a>" + 1200"<select id='" + expando + "-\r\\' msallowcapture=''>" + 1201"<option selected=''></option></select>"; 1202 1203// Support: IE8, Opera 11-12.16 1204// Nothing should be selected when empty strings follow ^= or $= or *= 1205// The test attribute must be unknown in Opera but "safe" for WinRT
vendor: 4,553 bytes, lines 1206-1359
1206// http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section 1207if (div.querySelectorAll("[msallowcapture^='']").length) { 1208rbuggyQSA.push("[*^$]=" + whitespace + "*(?:''|\"\")"); 1209} 1210 1211// Support: IE8 1212// Boolean attributes and "value" are not treated correctly 1213if (!div.querySelectorAll("[selected]").length) { 1214rbuggyQSA.push("\\[" + whitespace + "*(?:value|" + booleans + ")"); 1215} 1216 1217// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ 1218if (!div.querySelectorAll("[id~=" + expando + "-]").length) { 1219rbuggyQSA.push("~="); 1220} 1221 1222// Webkit/Opera - :checked should return selected option elements 1223// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked 1224// IE8 throws error here and will not see later tests 1225if (!div.querySelectorAll(":checked").length) { 1226rbuggyQSA.push(":checked"); 1227} 1228 1229// Support: Safari 8+, iOS 8+ 1230// https://bugs.webkit.org/show_bug.cgi?id=136851 1231// In-page `selector#id sibing-combinator selector` fails 1232if (!div.querySelectorAll("a#" + expando + "+*").length) { 1233rbuggyQSA.push(".#.+[+~]"); 1234} 1235}); 1236 1237assert(function (div) { 1238// Support: Windows 8 Native Apps 1239// The type and name attributes are restricted during .innerHTML assignment 1240var input = document.createElement("input"); 1241input.setAttribute("type", "hidden"); 1242div.appendChild(input).setAttribute("name", "D"); 1243 1244// Support: IE8 1245// Enforce case-sensitivity of name attribute 1246if (div.querySelectorAll("[name=d]").length) { 1247rbuggyQSA.push("name" + whitespace + "*[*^$|!~]?="); 1248} 1249 1250// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) 1251// IE8 throws error here and will not see later tests 1252if (!div.querySelectorAll(":enabled").length) { 1253rbuggyQSA.push(":enabled", ":disabled"); 1254} 1255 1256// Opera 10-11 does not throw on post-comma invalid pseudos 1257div.querySelectorAll("*,:x"); 1258rbuggyQSA.push(",.*:"); 1259}); 1260} 1261 1262if ((support.matchesSelector = rnative.test((matches = docElem.matches || 1263docElem.webkitMatchesSelector || 1264docElem.mozMatchesSelector || 1265docElem.oMatchesSelector || 1266docElem.msMatchesSelector)))) { 1267 1268assert(function (div) { 1269// Check to see if it's possible to do matchesSelector 1270// on a disconnected node (IE 9) 1271support.disconnectedMatch = matches.call(div, "div"); 1272 1273// This should fail with an exception 1274// Gecko does not error, returns false instead 1275matches.call(div, "[s!='']:x"); 1276rbuggyMatches.push("!=", pseudos); 1277}); 1278} 1279 1280rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join("|")); 1281rbuggyMatches = rbuggyMatches.length && new RegExp(rbuggyMatches.join("|")); 1282 1283/* Contains 1284---------------------------------------------------------------------- */ 1285hasCompare = rnative.test(docElem.compareDocumentPosition); 1286 1287// Element contains another 1288// Purposefully self-exclusive 1289// As in, an element does not contain itself 1290contains = hasCompare || rnative.test(docElem.contains) ? 1291function (a, b) { 1292var adown = a.nodeType === 9 ? a.documentElement : a, 1293bup = b && b.parentNode; 1294return a === bup || !!(bup && bup.nodeType === 1 && ( 1295adown.contains ? 1296adown.contains(bup) : 1297a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16 1298)); 1299} : 1300function (a, b) { 1301if (b) { 1302while ((b = b.parentNode)) { 1303if (b === a) { 1304return true; 1305} 1306} 1307} 1308return false; 1309}; 1310 1311/* Sorting 1312---------------------------------------------------------------------- */ 1313 1314// Document order sorting 1315sortOrder = hasCompare ? 1316function (a, b) { 1317 1318// Flag for duplicate removal 1319if (a === b) { 1320hasDuplicate = true; 1321return 0; 1322} 1323 1324// Sort on method existence if only one input has compareDocumentPosition 1325var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; 1326if (compare) { 1327return compare; 1328} 1329 1330// Calculate position if both inputs belong to the same document 1331compare = (a.ownerDocument || a) === (b.ownerDocument || b) ? 1332a.compareDocumentPosition(b) : 1333 1334// Otherwise we know they are disconnected 13351; 1336 1337// Disconnected nodes 1338if (compare & 1 || 1339(!support.sortDetached && b.compareDocumentPosition(a) === compare)) { 1340 1341// Choose the first element that is related to our preferred document 1342if (a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a)) { 1343return -1; 1344} 1345if (b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b)) { 1346return 1; 1347} 1348 1349// Maintain original order 1350return sortInput ? 1351(indexOf(sortInput, a) - indexOf(sortInput, b)) : 13520; 1353} 1354 1355return compare & 4 ? -1 : 1; 1356} : 1357function (a, b) { 1358// Exit early if the nodes are identical 1359if (a === b) {
vendor: 9,468 bytes, lines 1360-1745
1360hasDuplicate = true; 1361return 0; 1362} 1363 1364var cur, 1365i = 0, 1366aup = a.parentNode, 1367bup = b.parentNode, 1368ap = [a], 1369bp = [b]; 1370 1371// Parentless nodes are either documents or disconnected 1372if (!aup || !bup) { 1373return a === document ? -1 : 1374b === document ? 1 : 1375aup ? -1 : 1376bup ? 1 : 1377sortInput ? 1378(indexOf(sortInput, a) - indexOf(sortInput, b)) : 13790; 1380 1381// If the nodes are siblings, we can do a quick check 1382} else if (aup === bup) { 1383return siblingCheck(a, b); 1384} 1385 1386// Otherwise we need full lists of their ancestors for comparison 1387cur = a; 1388while ((cur = cur.parentNode)) { 1389ap.unshift(cur); 1390} 1391cur = b; 1392while ((cur = cur.parentNode)) { 1393bp.unshift(cur); 1394} 1395 1396// Walk down the tree looking for a discrepancy 1397while (ap[i] === bp[i]) { 1398i++; 1399} 1400 1401return i ? 1402// Do a sibling check if the nodes have a common ancestor 1403siblingCheck(ap[i], bp[i]) : 1404 1405// Otherwise nodes in our document sort first 1406ap[i] === preferredDoc ? -1 : 1407bp[i] === preferredDoc ? 1 : 14080; 1409}; 1410 1411return document; 1412}; 1413 1414Sizzle.matches = function (expr, elements) { 1415return Sizzle(expr, null, null, elements); 1416}; 1417 1418Sizzle.matchesSelector = function (elem, expr) { 1419// Set document vars if needed 1420if ((elem.ownerDocument || elem) !== document) { 1421setDocument(elem); 1422} 1423 1424// Make sure that attribute selectors are quoted 1425expr = expr.replace(rattributeQuotes, "='$1']"); 1426 1427if (support.matchesSelector && documentIsHTML && 1428!compilerCache[expr + " "] && 1429(!rbuggyMatches || !rbuggyMatches.test(expr)) && 1430(!rbuggyQSA || !rbuggyQSA.test(expr))) { 1431 1432try { 1433var ret = matches.call(elem, expr); 1434 1435// IE 9's matchesSelector returns false on disconnected nodes 1436if (ret || support.disconnectedMatch || 1437// As well, disconnected nodes are said to be in a document 1438// fragment in IE 9 1439elem.document && elem.document.nodeType !== 11) { 1440return ret; 1441} 1442} catch (e) { } 1443} 1444 1445return Sizzle(expr, document, null, [elem]).length > 0; 1446}; 1447 1448Sizzle.contains = function (context, elem) { 1449// Set document vars if needed 1450if ((context.ownerDocument || context) !== document) { 1451setDocument(context); 1452} 1453return contains(context, elem); 1454}; 1455 1456Sizzle.attr = function (elem, name) { 1457// Set document vars if needed 1458if ((elem.ownerDocument || elem) !== document) { 1459setDocument(elem); 1460} 1461 1462var fn = Expr.attrHandle[name.toLowerCase()], 1463// Don't get fooled by Object.prototype properties (jQuery #13807) 1464val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ? 1465fn(elem, name, !documentIsHTML) : 1466undefined; 1467 1468return val !== undefined ? 1469val : 1470support.attributes || !documentIsHTML ? 1471elem.getAttribute(name) : 1472(val = elem.getAttributeNode(name)) && val.specified ? 1473val.value : 1474null; 1475}; 1476 1477Sizzle.error = function (msg) { 1478throw new Error("Syntax error, unrecognized expression: " + msg); 1479}; 1480 1481/** 1482 * Document sorting and removing duplicates 1483 * @param {ArrayLike} results 1484 */ 1485Sizzle.uniqueSort = function (results) { 1486var elem, 1487duplicates = [], 1488j = 0, 1489i = 0; 1490 1491// Unless we *know* we can detect duplicates, assume their presence 1492hasDuplicate = !support.detectDuplicates; 1493sortInput = !support.sortStable && results.slice(0); 1494results.sort(sortOrder); 1495 1496if (hasDuplicate) { 1497while ((elem = results[i++])) { 1498if (elem === results[i]) { 1499j = duplicates.push(i); 1500} 1501} 1502while (j--) { 1503results.splice(duplicates[j], 1); 1504} 1505} 1506 1507// Clear input after sorting to release objects 1508// See https://github.com/jquery/sizzle/pull/225 1509sortInput = null; 1510 1511return results; 1512}; 1513 1514/** 1515 * Utility function for retrieving the text value of an array of DOM nodes 1516 * @param {Array|Element} elem 1517 */ 1518getText = Sizzle.getText = function (elem) { 1519var node, 1520ret = "", 1521i = 0, 1522nodeType = elem.nodeType; 1523 1524if (!nodeType) { 1525// If no nodeType, this is expected to be an array 1526while ((node = elem[i++])) { 1527// Do not traverse comment nodes 1528ret += getText(node); 1529} 1530} else if (nodeType === 1 || nodeType === 9 || nodeType === 11) { 1531// Use textContent for elements 1532// innerText usage removed for consistency of new lines (jQuery #11153) 1533if (typeof elem.textContent === "string") { 1534return elem.textContent; 1535} else { 1536// Traverse its children 1537for (elem = elem.firstChild; elem; elem = elem.nextSibling) { 1538ret += getText(elem); 1539} 1540} 1541} else if (nodeType === 3 || nodeType === 4) { 1542return elem.nodeValue; 1543} 1544// Do not include comment or processing instruction nodes 1545 1546return ret; 1547}; 1548 1549Expr = Sizzle.selectors = { 1550 1551// Can be adjusted by the user 1552cacheLength: 50, 1553 1554createPseudo: markFunction, 1555 1556match: matchExpr, 1557 1558attrHandle: {}, 1559 1560find: {}, 1561 1562relative: { 1563">": { dir: "parentNode", first: true }, 1564" ": { dir: "parentNode" }, 1565"+": { dir: "previousSibling", first: true }, 1566"~": { dir: "previousSibling" } 1567}, 1568 1569preFilter: { 1570"ATTR": function (match) { 1571match[1] = match[1].replace(runescape, funescape); 1572 1573// Move the given value to match[3] whether quoted or unquoted 1574match[3] = (match[3] || match[4] || match[5] || "").replace(runescape, funescape); 1575 1576if (match[2] === "~=") { 1577match[3] = " " + match[3] + " "; 1578} 1579 1580return match.slice(0, 4); 1581}, 1582 1583"CHILD": function (match) { 1584/* matches from matchExpr["CHILD"] 15851 type (only|nth|...) 15862 what (child|of-type) 15873 argument (even|odd|\d*|\d*n([+-]\d+)?|...) 15884 xn-component of xn+y argument ([+-]?\d*n|) 15895 sign of xn-component 15906 x of xn-component 15917 sign of y-component 15928 y of y-component 1593*/ 1594match[1] = match[1].toLowerCase(); 1595 1596if (match[1].slice(0, 3) === "nth") { 1597// nth-* requires argument 1598if (!match[3]) { 1599Sizzle.error(match[0]); 1600} 1601 1602// numeric x and y parameters for Expr.filter.CHILD 1603// remember that false/true cast respectively to 0/1 1604match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * (match[3] === "even" || match[3] === "odd")); 1605match[5] = +((match[7] + match[8]) || match[3] === "odd"); 1606 1607// other types prohibit arguments 1608} else if (match[3]) { 1609Sizzle.error(match[0]); 1610} 1611 1612return match; 1613}, 1614 1615"PSEUDO": function (match) { 1616var excess, 1617unquoted = !match[6] && match[2]; 1618 1619if (matchExpr["CHILD"].test(match[0])) { 1620return null; 1621} 1622 1623// Accept quoted arguments as-is 1624if (match[3]) { 1625match[2] = match[4] || match[5] || ""; 1626 1627// Strip excess characters from unquoted arguments 1628} else if (unquoted && rpseudo.test(unquoted) && 1629// Get excess from tokenize (recursively) 1630(excess = tokenize(unquoted, true)) && 1631// advance to the next closing parenthesis 1632(excess = unquoted.indexOf(")", unquoted.length - excess) - unquoted.length)) { 1633 1634// excess is a negative index 1635match[0] = match[0].slice(0, excess); 1636match[2] = unquoted.slice(0, excess); 1637} 1638 1639// Return only captures needed by the pseudo filter method (type and argument) 1640return match.slice(0, 3); 1641} 1642}, 1643 1644filter: { 1645 1646"TAG": function (nodeNameSelector) { 1647var nodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase(); 1648return nodeNameSelector === "*" ? 1649function () { return true; } : 1650function (elem) { 1651return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; 1652}; 1653}, 1654 1655"CLASS": function (className) { 1656var pattern = classCache[className + " "]; 1657 1658return pattern || 1659(pattern = new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)")) && 1660classCache(className, function (elem) { 1661return pattern.test(typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || ""); 1662}); 1663}, 1664 1665"ATTR": function (name, operator, check) { 1666return function (elem) { 1667var result = Sizzle.attr(elem, name); 1668 1669if (result == null) { 1670return operator === "!="; 1671} 1672if (!operator) { 1673return true; 1674} 1675 1676result += ""; 1677 1678return operator === "=" ? result === check : 1679operator === "!=" ? result !== check : 1680operator === "^=" ? check && result.indexOf(check) === 0 : 1681operator === "*=" ? check && result.indexOf(check) > -1 : 1682operator === "$=" ? check && result.slice(-check.length) === check : 1683operator === "~=" ? (" " + result.replace(rwhitespace, " ") + " ").indexOf(check) > -1 : 1684operator === "|=" ? result === check || result.slice(0, check.length + 1) === check + "-" : 1685false; 1686}; 1687}, 1688 1689"CHILD": function (type, what, argument, first, last) { 1690var simple = type.slice(0, 3) !== "nth", 1691forward = type.slice(-4) !== "last", 1692ofType = what === "of-type"; 1693 1694return first === 1 && last === 0 ? 1695 1696// Shortcut for :nth-*(n) 1697function (elem) { 1698return !!elem.parentNode; 1699} : 1700 1701function (elem, context, xml) { 1702var cache, uniqueCache, outerCache, node, nodeIndex, start, 1703dir = simple !== forward ? "nextSibling" : "previousSibling", 1704parent = elem.parentNode, 1705name = ofType && elem.nodeName.toLowerCase(), 1706useCache = !xml && !ofType, 1707diff = false; 1708 1709if (parent) { 1710 1711// :(first|last|only)-(child|of-type) 1712if (simple) { 1713while (dir) { 1714node = elem; 1715while ((node = node[dir])) { 1716if (ofType ? 1717node.nodeName.toLowerCase() === name : 1718node.nodeType === 1) { 1719 1720return false; 1721} 1722} 1723// Reverse direction for :only-* (if we haven't yet done so) 1724start = dir = type === "only" && !start && "nextSibling"; 1725} 1726return true; 1727} 1728 1729start = [forward ? parent.firstChild : parent.lastChild]; 1730 1731// non-xml :nth-child(...) stores cache data on `parent` 1732if (forward && useCache) { 1733 1734// Seek `elem` from a previously-cached index 1735 1736// ...in a gzip-friendly way 1737node = parent; 1738outerCache = node[expando] || (node[expando] = {}); 1739 1740// Support: IE <9 only 1741// Defend against cloned attroperties (jQuery gh-1709) 1742uniqueCache = outerCache[node.uniqueID] || 1743(outerCache[node.uniqueID] = {}); 1744 1745cache = uniqueCache[type] || [];
vendor: 19,752 bytes, lines 1746-2507
1746nodeIndex = cache[0] === dirruns && cache[1]; 1747diff = nodeIndex && cache[2]; 1748node = nodeIndex && parent.childNodes[nodeIndex]; 1749 1750while ((node = ++nodeIndex && node && node[dir] || 1751 1752// Fallback to seeking `elem` from the start 1753(diff = nodeIndex = 0) || start.pop())) { 1754 1755// When found, cache indexes on `parent` and break 1756if (node.nodeType === 1 && ++diff && node === elem) { 1757uniqueCache[type] = [dirruns, nodeIndex, diff]; 1758break; 1759} 1760} 1761 1762} else { 1763// Use previously-cached element index if available 1764if (useCache) { 1765// ...in a gzip-friendly way 1766node = elem; 1767outerCache = node[expando] || (node[expando] = {}); 1768 1769// Support: IE <9 only 1770// Defend against cloned attroperties (jQuery gh-1709) 1771uniqueCache = outerCache[node.uniqueID] || 1772(outerCache[node.uniqueID] = {}); 1773 1774cache = uniqueCache[type] || []; 1775nodeIndex = cache[0] === dirruns && cache[1]; 1776diff = nodeIndex; 1777} 1778 1779// xml :nth-child(...) 1780// or :nth-last-child(...) or :nth(-last)?-of-type(...) 1781if (diff === false) { 1782// Use the same loop as above to seek `elem` from the start 1783while ((node = ++nodeIndex && node && node[dir] || 1784(diff = nodeIndex = 0) || start.pop())) { 1785 1786if ((ofType ? 1787node.nodeName.toLowerCase() === name : 1788node.nodeType === 1) && 1789++diff) { 1790 1791// Cache the index of each encountered element 1792if (useCache) { 1793outerCache = node[expando] || (node[expando] = {}); 1794 1795// Support: IE <9 only 1796// Defend against cloned attroperties (jQuery gh-1709) 1797uniqueCache = outerCache[node.uniqueID] || 1798(outerCache[node.uniqueID] = {}); 1799 1800uniqueCache[type] = [dirruns, diff]; 1801} 1802 1803if (node === elem) { 1804break; 1805} 1806} 1807} 1808} 1809} 1810 1811// Incorporate the offset, then check against cycle size 1812diff -= last; 1813return diff === first || (diff % first === 0 && diff / first >= 0); 1814} 1815}; 1816}, 1817 1818"PSEUDO": function (pseudo, argument) { 1819// pseudo-class names are case-insensitive 1820// http://www.w3.org/TR/selectors/#pseudo-classes 1821// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters 1822// Remember that setFilters inherits from pseudos 1823var args, 1824fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || 1825Sizzle.error("unsupported pseudo: " + pseudo); 1826 1827// The user may use createPseudo to indicate that 1828// arguments are needed to create the filter function 1829// just as Sizzle does 1830if (fn[expando]) { 1831return fn(argument); 1832} 1833 1834// But maintain support for old signatures 1835if (fn.length > 1) { 1836args = [pseudo, pseudo, "", argument]; 1837return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? 1838markFunction(function (seed, matches) { 1839var idx, 1840matched = fn(seed, argument), 1841i = matched.length; 1842while (i--) { 1843idx = indexOf(seed, matched[i]); 1844seed[idx] = !(matches[idx] = matched[i]); 1845} 1846}) : 1847function (elem) { 1848return fn(elem, 0, args); 1849}; 1850} 1851 1852return fn; 1853} 1854}, 1855 1856pseudos: { 1857// Potentially complex pseudos 1858"not": markFunction(function (selector) { 1859// Trim the selector passed to compile 1860// to avoid treating leading and trailing 1861// spaces as combinators 1862var input = [], 1863results = [], 1864matcher = compile(selector.replace(rtrim, "$1")); 1865 1866return matcher[expando] ? 1867markFunction(function (seed, matches, context, xml) { 1868var elem, 1869unmatched = matcher(seed, null, xml, []), 1870i = seed.length; 1871 1872// Match elements unmatched by `matcher` 1873while (i--) { 1874if ((elem = unmatched[i])) { 1875seed[i] = !(matches[i] = elem); 1876} 1877} 1878}) : 1879function (elem, context, xml) { 1880input[0] = elem; 1881matcher(input, null, xml, results); 1882// Don't keep the element (issue #299) 1883input[0] = null; 1884return !results.pop(); 1885}; 1886}), 1887 1888"has": markFunction(function (selector) { 1889return function (elem) { 1890return Sizzle(selector, elem).length > 0; 1891}; 1892}), 1893 1894"contains": markFunction(function (text) { 1895text = text.replace(runescape, funescape); 1896return function (elem) { 1897return (elem.textContent || elem.innerText || getText(elem)).indexOf(text) > -1; 1898}; 1899}), 1900 1901// "Whether an element is represented by a :lang() selector 1902// is based solely on the element's language value 1903// being equal to the identifier C, 1904// or beginning with the identifier C immediately followed by "-". 1905// The matching of C against the element's language value is performed case-insensitively. 1906// The identifier C does not have to be a valid language name." 1907// http://www.w3.org/TR/selectors/#lang-pseudo 1908"lang": markFunction(function (lang) { 1909// lang value must be a valid identifier 1910if (!ridentifier.test(lang || "")) { 1911Sizzle.error("unsupported lang: " + lang); 1912} 1913lang = lang.replace(runescape, funescape).toLowerCase(); 1914return function (elem) { 1915var elemLang; 1916do { 1917if ((elemLang = documentIsHTML ? 1918elem.lang : 1919elem.getAttribute("xml:lang") || elem.getAttribute("lang"))) { 1920 1921elemLang = elemLang.toLowerCase(); 1922return elemLang === lang || elemLang.indexOf(lang + "-") === 0; 1923} 1924} while ((elem = elem.parentNode) && elem.nodeType === 1); 1925return false; 1926}; 1927}), 1928 1929// Miscellaneous 1930"target": function (elem) { 1931var hash = window.location && window.location.hash; 1932return hash && hash.slice(1) === elem.id; 1933}, 1934 1935"root": function (elem) { 1936return elem === docElem; 1937}, 1938 1939"focus": function (elem) { 1940return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); 1941}, 1942 1943// Boolean properties 1944"enabled": function (elem) { 1945return elem.disabled === false; 1946}, 1947 1948"disabled": function (elem) { 1949return elem.disabled === true; 1950}, 1951 1952"checked": function (elem) { 1953// In CSS3, :checked should return both checked and selected elements 1954// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked 1955var nodeName = elem.nodeName.toLowerCase(); 1956return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); 1957}, 1958 1959"selected": function (elem) { 1960// Accessing this property makes selected-by-default 1961// options in Safari work properly 1962if (elem.parentNode) { 1963elem.parentNode.selectedIndex; 1964} 1965 1966return elem.selected === true; 1967}, 1968 1969// Contents 1970"empty": function (elem) { 1971// http://www.w3.org/TR/selectors/#empty-pseudo 1972// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), 1973// but not by others (comment: 8; processing instruction: 7; etc.) 1974// nodeType < 6 works because attributes (2) do not appear as children 1975for (elem = elem.firstChild; elem; elem = elem.nextSibling) { 1976if (elem.nodeType < 6) { 1977return false; 1978} 1979} 1980return true; 1981}, 1982 1983"parent": function (elem) { 1984return !Expr.pseudos["empty"](elem); 1985}, 1986 1987// Element/input types 1988"header": function (elem) { 1989return rheader.test(elem.nodeName); 1990}, 1991 1992"input": function (elem) { 1993return rinputs.test(elem.nodeName); 1994}, 1995 1996"button": function (elem) { 1997var name = elem.nodeName.toLowerCase(); 1998return name === "input" && elem.type === "button" || name === "button"; 1999}, 2000 2001"text": function (elem) { 2002var attr; 2003return elem.nodeName.toLowerCase() === "input" && 2004elem.type === "text" && 2005 2006// Support: IE<8 2007// New HTML5 attribute values (e.g., "search") appear with elem.type === "text" 2008((attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text"); 2009}, 2010 2011// Position-in-collection 2012"first": createPositionalPseudo(function () { 2013return [0]; 2014}), 2015 2016"last": createPositionalPseudo(function (matchIndexes, length) { 2017return [length - 1]; 2018}), 2019 2020"eq": createPositionalPseudo(function (matchIndexes, length, argument) { 2021return [argument < 0 ? argument + length : argument]; 2022}), 2023 2024"even": createPositionalPseudo(function (matchIndexes, length) { 2025var i = 0; 2026for (; i < length; i += 2) { 2027matchIndexes.push(i); 2028} 2029return matchIndexes; 2030}), 2031 2032"odd": createPositionalPseudo(function (matchIndexes, length) { 2033var i = 1; 2034for (; i < length; i += 2) { 2035matchIndexes.push(i); 2036} 2037return matchIndexes; 2038}), 2039 2040"lt": createPositionalPseudo(function (matchIndexes, length, argument) { 2041var i = argument < 0 ? argument + length : argument; 2042for (; --i >= 0;) { 2043matchIndexes.push(i); 2044} 2045return matchIndexes; 2046}), 2047 2048"gt": createPositionalPseudo(function (matchIndexes, length, argument) { 2049var i = argument < 0 ? argument + length : argument; 2050for (; ++i < length;) { 2051matchIndexes.push(i); 2052} 2053return matchIndexes; 2054}) 2055} 2056}; 2057 2058Expr.pseudos["nth"] = Expr.pseudos["eq"]; 2059 2060// Add button/input type pseudos 2061for (i in { radio: true, checkbox: true, file: true, password: true, image: true }) { 2062Expr.pseudos[i] = createInputPseudo(i); 2063} 2064for (i in { submit: true, reset: true }) { 2065Expr.pseudos[i] = createButtonPseudo(i); 2066} 2067 2068// Easy API for creating new setFilters 2069function setFilters() { } 2070setFilters.prototype = Expr.filters = Expr.pseudos; 2071Expr.setFilters = new setFilters(); 2072 2073tokenize = Sizzle.tokenize = function (selector, parseOnly) { 2074var matched, match, tokens, type, 2075soFar, groups, preFilters, 2076cached = tokenCache[selector + " "]; 2077 2078if (cached) { 2079return parseOnly ? 0 : cached.slice(0); 2080} 2081 2082soFar = selector; 2083groups = []; 2084preFilters = Expr.preFilter; 2085 2086while (soFar) { 2087 2088// Comma and first run 2089if (!matched || (match = rcomma.exec(soFar))) { 2090if (match) { 2091// Don't consume trailing commas as valid 2092soFar = soFar.slice(match[0].length) || soFar; 2093} 2094groups.push((tokens = [])); 2095} 2096 2097matched = false; 2098 2099// Combinators 2100if ((match = rcombinators.exec(soFar))) { 2101matched = match.shift(); 2102tokens.push({ 2103value: matched, 2104// Cast descendant combinators to space 2105type: match[0].replace(rtrim, " ") 2106}); 2107soFar = soFar.slice(matched.length); 2108} 2109 2110// Filters 2111for (type in Expr.filter) { 2112if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] || 2113(match = preFilters[type](match)))) { 2114matched = match.shift(); 2115tokens.push({ 2116value: matched, 2117type: type, 2118matches: match 2119}); 2120soFar = soFar.slice(matched.length); 2121} 2122} 2123 2124if (!matched) { 2125break; 2126} 2127} 2128 2129// Return the length of the invalid excess 2130// if we're just parsing 2131// Otherwise, throw an error or return tokens 2132return parseOnly ? 2133soFar.length : 2134soFar ? 2135Sizzle.error(selector) : 2136// Cache the tokens 2137tokenCache(selector, groups).slice(0); 2138}; 2139 2140function toSelector(tokens) { 2141var i = 0, 2142len = tokens.length, 2143selector = ""; 2144for (; i < len; i++) { 2145selector += tokens[i].value; 2146} 2147return selector; 2148} 2149 2150function addCombinator(matcher, combinator, base) { 2151var dir = combinator.dir, 2152checkNonElements = base && dir === "parentNode", 2153doneName = done++; 2154 2155return combinator.first ? 2156// Check against closest ancestor/preceding element 2157function (elem, context, xml) { 2158while ((elem = elem[dir])) { 2159if (elem.nodeType === 1 || checkNonElements) { 2160return matcher(elem, context, xml); 2161} 2162} 2163} : 2164 2165// Check against all ancestor/preceding elements 2166function (elem, context, xml) { 2167var oldCache, uniqueCache, outerCache, 2168newCache = [dirruns, doneName]; 2169 2170// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching 2171if (xml) { 2172while ((elem = elem[dir])) { 2173if (elem.nodeType === 1 || checkNonElements) { 2174if (matcher(elem, context, xml)) { 2175return true; 2176} 2177} 2178} 2179} else { 2180while ((elem = elem[dir])) { 2181if (elem.nodeType === 1 || checkNonElements) { 2182outerCache = elem[expando] || (elem[expando] = {}); 2183 2184// Support: IE <9 only 2185// Defend against cloned attroperties (jQuery gh-1709) 2186uniqueCache = outerCache[elem.uniqueID] || (outerCache[elem.uniqueID] = {}); 2187 2188if ((oldCache = uniqueCache[dir]) && 2189oldCache[0] === dirruns && oldCache[1] === doneName) { 2190 2191// Assign to newCache so results back-propagate to previous elements 2192return (newCache[2] = oldCache[2]); 2193} else { 2194// Reuse newcache so results back-propagate to previous elements 2195uniqueCache[dir] = newCache; 2196 2197// A match means we're done; a fail means we have to keep checking 2198if ((newCache[2] = matcher(elem, context, xml))) { 2199return true; 2200} 2201} 2202} 2203} 2204} 2205}; 2206} 2207 2208function elementMatcher(matchers) { 2209return matchers.length > 1 ? 2210function (elem, context, xml) { 2211var i = matchers.length; 2212while (i--) { 2213if (!matchers[i](elem, context, xml)) { 2214return false; 2215} 2216} 2217return true; 2218} : 2219matchers[0]; 2220} 2221 2222function multipleContexts(selector, contexts, results) { 2223var i = 0, 2224len = contexts.length; 2225for (; i < len; i++) { 2226Sizzle(selector, contexts[i], results); 2227} 2228return results; 2229} 2230 2231function condense(unmatched, map, filter, context, xml) { 2232var elem, 2233newUnmatched = [], 2234i = 0, 2235len = unmatched.length, 2236mapped = map != null; 2237 2238for (; i < len; i++) { 2239if ((elem = unmatched[i])) { 2240if (!filter || filter(elem, context, xml)) { 2241newUnmatched.push(elem); 2242if (mapped) { 2243map.push(i); 2244} 2245} 2246} 2247} 2248 2249return newUnmatched; 2250} 2251 2252function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) { 2253if (postFilter && !postFilter[expando]) { 2254postFilter = setMatcher(postFilter); 2255} 2256if (postFinder && !postFinder[expando]) { 2257postFinder = setMatcher(postFinder, postSelector); 2258} 2259return markFunction(function (seed, results, context, xml) { 2260var temp, i, elem, 2261preMap = [], 2262postMap = [], 2263preexisting = results.length, 2264 2265// Get initial elements from seed or context 2266elems = seed || multipleContexts(selector || "*", context.nodeType ? [context] : context, []), 2267 2268// Prefilter to get matcher input, preserving a map for seed-results synchronization 2269matcherIn = preFilter && (seed || !selector) ? 2270condense(elems, preMap, preFilter, context, xml) : 2271elems, 2272 2273matcherOut = matcher ? 2274// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, 2275postFinder || (seed ? preFilter : preexisting || postFilter) ? 2276 2277// ...intermediate processing is necessary 2278[] : 2279 2280// ...otherwise use results directly 2281results : 2282matcherIn; 2283 2284// Find primary matches 2285if (matcher) { 2286matcher(matcherIn, matcherOut, context, xml); 2287} 2288 2289// Apply postFilter 2290if (postFilter) { 2291temp = condense(matcherOut, postMap); 2292postFilter(temp, [], context, xml); 2293 2294// Un-match failing elements by moving them back to matcherIn 2295i = temp.length; 2296while (i--) { 2297if ((elem = temp[i])) { 2298matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem); 2299} 2300} 2301} 2302 2303if (seed) { 2304if (postFinder || preFilter) { 2305if (postFinder) { 2306// Get the final matcherOut by condensing this intermediate into postFinder contexts 2307temp = []; 2308i = matcherOut.length; 2309while (i--) { 2310if ((elem = matcherOut[i])) { 2311// Restore matcherIn since elem is not yet a final match 2312temp.push((matcherIn[i] = elem)); 2313} 2314} 2315postFinder(null, (matcherOut = []), temp, xml); 2316} 2317 2318// Move matched elements from seed to results to keep them synchronized 2319i = matcherOut.length; 2320while (i--) { 2321if ((elem = matcherOut[i]) && 2322(temp = postFinder ? indexOf(seed, elem) : preMap[i]) > -1) { 2323 2324seed[temp] = !(results[temp] = elem); 2325} 2326} 2327} 2328 2329// Add elements to results, through postFinder if defined 2330} else { 2331matcherOut = condense( 2332matcherOut === results ? 2333matcherOut.splice(preexisting, matcherOut.length) : 2334matcherOut 2335); 2336if (postFinder) { 2337postFinder(null, results, matcherOut, xml); 2338} else { 2339push.apply(results, matcherOut); 2340} 2341} 2342}); 2343} 2344 2345function matcherFromTokens(tokens) { 2346var checkContext, matcher, j, 2347len = tokens.length, 2348leadingRelative = Expr.relative[tokens[0].type], 2349implicitRelative = leadingRelative || Expr.relative[" "], 2350i = leadingRelative ? 1 : 0, 2351 2352// The foundational matcher ensures that elements are reachable from top-level context(s) 2353matchContext = addCombinator(function (elem) { 2354return elem === checkContext; 2355}, implicitRelative, true), 2356matchAnyContext = addCombinator(function (elem) { 2357return indexOf(checkContext, elem) > -1; 2358}, implicitRelative, true), 2359matchers = [function (elem, context, xml) { 2360var ret = (!leadingRelative && (xml || context !== outermostContext)) || ( 2361(checkContext = context).nodeType ? 2362matchContext(elem, context, xml) : 2363matchAnyContext(elem, context, xml)); 2364// Avoid hanging onto element (issue #299) 2365checkContext = null; 2366return ret; 2367}]; 2368 2369for (; i < len; i++) { 2370if ((matcher = Expr.relative[tokens[i].type])) { 2371matchers = [addCombinator(elementMatcher(matchers), matcher)]; 2372} else { 2373matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches); 2374 2375// Return special upon seeing a positional matcher 2376if (matcher[expando]) { 2377// Find the next relative operator (if any) for proper handling 2378j = ++i; 2379for (; j < len; j++) { 2380if (Expr.relative[tokens[j].type]) { 2381break; 2382} 2383} 2384return setMatcher( 2385i > 1 && elementMatcher(matchers), 2386i > 1 && toSelector( 2387// If the preceding token was a descendant combinator, insert an implicit any-element `*` 2388tokens.slice(0, i - 1).concat({ value: tokens[i - 2].type === " " ? "*" : "" }) 2389).replace(rtrim, "$1"), 2390matcher, 2391i < j && matcherFromTokens(tokens.slice(i, j)), 2392j < len && matcherFromTokens((tokens = tokens.slice(j))), 2393j < len && toSelector(tokens) 2394); 2395} 2396matchers.push(matcher); 2397} 2398} 2399 2400return elementMatcher(matchers); 2401} 2402 2403function matcherFromGroupMatchers(elementMatchers, setMatchers) { 2404var bySet = setMatchers.length > 0, 2405byElement = elementMatchers.length > 0, 2406superMatcher = function (seed, context, xml, results, outermost) { 2407var elem, j, matcher, 2408matchedCount = 0, 2409i = "0", 2410unmatched = seed && [], 2411setMatched = [], 2412contextBackup = outermostContext, 2413// We must always have either seed elements or outermost context 2414elems = seed || byElement && Expr.find["TAG"]("*", outermost), 2415// Use integer dirruns iff this is the outermost matcher 2416dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), 2417len = elems.length; 2418 2419if (outermost) { 2420outermostContext = context === document || context || outermost; 2421} 2422 2423// Add elements passing elementMatchers directly to results 2424// Support: IE<9, Safari 2425// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id 2426for (; i !== len && (elem = elems[i]) != null; i++) { 2427if (byElement && elem) { 2428j = 0; 2429if (!context && elem.ownerDocument !== document) { 2430setDocument(elem); 2431xml = !documentIsHTML; 2432} 2433while ((matcher = elementMatchers[j++])) { 2434if (matcher(elem, context || document, xml)) { 2435results.push(elem); 2436break; 2437} 2438} 2439if (outermost) { 2440dirruns = dirrunsUnique; 2441} 2442} 2443 2444// Track unmatched elements for set filters 2445if (bySet) { 2446// They will have gone through all possible matchers 2447if ((elem = !matcher && elem)) { 2448matchedCount--; 2449} 2450 2451// Lengthen the array for every element, matched or not 2452if (seed) { 2453unmatched.push(elem); 2454} 2455} 2456} 2457 2458// `i` is now the count of elements visited above, and adding it to `matchedCount` 2459// makes the latter nonnegative. 2460matchedCount += i; 2461 2462// Apply set filters to unmatched elements 2463// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` 2464// equals `i`), unless we didn't visit _any_ elements in the above loop because we have 2465// no element matchers and no seed. 2466// Incrementing an initially-string "0" `i` allows `i` to remain a string only in that 2467// case, which will result in a "00" `matchedCount` that differs from `i` but is also 2468// numerically zero. 2469if (bySet && i !== matchedCount) { 2470j = 0; 2471while ((matcher = setMatchers[j++])) { 2472matcher(unmatched, setMatched, context, xml); 2473} 2474 2475if (seed) { 2476// Reintegrate element matches to eliminate the need for sorting 2477if (matchedCount > 0) { 2478while (i--) { 2479if (!(unmatched[i] || setMatched[i])) { 2480setMatched[i] = pop.call(results); 2481} 2482} 2483} 2484 2485// Discard index placeholder values to get only actual matches 2486setMatched = condense(setMatched); 2487} 2488 2489// Add matches to results 2490push.apply(results, setMatched); 2491 2492// Seedless set matches succeeding multiple successful matchers stipulate sorting 2493if (outermost && !seed && setMatched.length > 0 && 2494(matchedCount + setMatchers.length) > 1) { 2495 2496Sizzle.uniqueSort(results); 2497} 2498} 2499 2500// Override manipulation of globals by nested matchers 2501if (outermost) { 2502dirruns = dirrunsUnique; 2503outermostContext = contextBackup; 2504} 2505 2506return unmatched; 2507};
vendor: 4,272 bytes, lines 2508-2657
2508 2509return bySet ? 2510markFunction(superMatcher) : 2511superMatcher; 2512} 2513 2514compile = Sizzle.compile = function (selector, match /* Internal Use Only */) { 2515var i, 2516setMatchers = [], 2517elementMatchers = [], 2518cached = compilerCache[selector + " "]; 2519 2520if (!cached) { 2521// Generate a function of recursive functions that can be used to check each element 2522if (!match) { 2523match = tokenize(selector); 2524} 2525i = match.length; 2526while (i--) { 2527cached = matcherFromTokens(match[i]); 2528if (cached[expando]) { 2529setMatchers.push(cached); 2530} else { 2531elementMatchers.push(cached); 2532} 2533} 2534 2535// Cache the compiled function 2536cached = compilerCache(selector, matcherFromGroupMatchers(elementMatchers, setMatchers)); 2537 2538// Save selector and tokenization 2539cached.selector = selector; 2540} 2541return cached; 2542}; 2543 2544/** 2545 * A low-level selection function that works with Sizzle's compiled 2546 * selector functions 2547 * @param {String|Function} selector A selector or a pre-compiled 2548 * selector function built with Sizzle.compile 2549 * @param {Element} context 2550 * @param {Array} [results] 2551 * @param {Array} [seed] A set of elements to match against 2552 */ 2553select = Sizzle.select = function (selector, context, results, seed) { 2554var i, tokens, token, type, find, 2555compiled = typeof selector === "function" && selector, 2556match = !seed && tokenize((selector = compiled.selector || selector)); 2557 2558results = results || []; 2559 2560// Try to minimize operations if there is only one selector in the list and no seed 2561// (the latter of which guarantees us context) 2562if (match.length === 1) { 2563 2564// Reduce context if the leading compound selector is an ID 2565tokens = match[0] = match[0].slice(0); 2566if (tokens.length > 2 && (token = tokens[0]).type === "ID" && 2567support.getById && context.nodeType === 9 && documentIsHTML && 2568Expr.relative[tokens[1].type]) { 2569 2570context = (Expr.find["ID"](token.matches[0].replace(runescape, funescape), context) || [])[0]; 2571if (!context) { 2572return results; 2573 2574// Precompiled matchers will still verify ancestry, so step up a level 2575} else if (compiled) { 2576context = context.parentNode; 2577} 2578 2579selector = selector.slice(tokens.shift().value.length); 2580} 2581 2582// Fetch a seed set for right-to-left matching 2583i = matchExpr["needsContext"].test(selector) ? 0 : tokens.length; 2584while (i--) { 2585token = tokens[i]; 2586 2587// Abort if we hit a combinator 2588if (Expr.relative[(type = token.type)]) { 2589break; 2590} 2591if ((find = Expr.find[type])) { 2592// Search, expanding context for leading sibling combinators 2593if ((seed = find( 2594token.matches[0].replace(runescape, funescape), 2595rsibling.test(tokens[0].type) && testContext(context.parentNode) || context 2596))) { 2597 2598// If seed is empty or no tokens remain, we can return early 2599tokens.splice(i, 1); 2600selector = seed.length && toSelector(tokens); 2601if (!selector) { 2602push.apply(results, seed); 2603return results; 2604} 2605 2606break; 2607} 2608} 2609} 2610} 2611 2612// Compile and execute a filtering function if one is not provided 2613// Provide `match` to avoid retokenization if we modified the selector above 2614(compiled || compile(selector, match))( 2615seed, 2616context, 2617!documentIsHTML, 2618results, 2619!context || rsibling.test(selector) && testContext(context.parentNode) || context 2620); 2621return results; 2622}; 2623 2624// One-time assignments 2625 2626// Sort stability 2627support.sortStable = expando.split("").sort(sortOrder).join("") === expando; 2628 2629// Support: Chrome 14-35+ 2630// Always assume duplicates if they aren't passed to the comparison function 2631support.detectDuplicates = !!hasDuplicate; 2632 2633// Initialize against the default document 2634setDocument(); 2635 2636// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) 2637// Detached nodes confoundingly follow *each other* 2638support.sortDetached = assert(function (div1) { 2639// Should return 1, but returns 4 (following) 2640return div1.compareDocumentPosition(document.createElement("div")) & 1; 2641}); 2642 2643// Support: IE<8 2644// Prevent attribute/property "interpolation" 2645// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx 2646if (!assert(function (div) { 2647div.innerHTML = "<a href='#'></a>"; 2648return div.firstChild.getAttribute("href") === "#"; 2649})) { 2650addHandle("type|href|height|width", function (elem, name, isXML) { 2651if (!isXML) { 2652return elem.getAttribute(name, name.toLowerCase() === "type" ? 1 : 2); 2653} 2654}); 2655} 2656 2657// Support: IE<9
vendor: 8,719 bytes, lines 2658-3040
2658// Use defaultValue in place of getAttribute("value") 2659if (!support.attributes || !assert(function (div) { 2660div.innerHTML = "<input/>"; 2661div.firstChild.setAttribute("value", ""); 2662return div.firstChild.getAttribute("value") === ""; 2663})) { 2664addHandle("value", function (elem, name, isXML) { 2665if (!isXML && elem.nodeName.toLowerCase() === "input") { 2666return elem.defaultValue; 2667} 2668}); 2669} 2670 2671// Support: IE<9 2672// Use getAttributeNode to fetch booleans when getAttribute lies 2673if (!assert(function (div) { 2674return div.getAttribute("disabled") == null; 2675})) { 2676addHandle(booleans, function (elem, name, isXML) { 2677var val; 2678if (!isXML) { 2679return elem[name] === true ? name.toLowerCase() : 2680(val = elem.getAttributeNode(name)) && val.specified ? 2681val.value : 2682null; 2683} 2684}); 2685} 2686 2687return Sizzle; 2688 2689})(window); 2690 2691 2692 2693jQuery.find = Sizzle; 2694jQuery.expr = Sizzle.selectors; 2695jQuery.expr[":"] = jQuery.expr.pseudos; 2696jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; 2697jQuery.text = Sizzle.getText; 2698jQuery.isXMLDoc = Sizzle.isXML; 2699jQuery.contains = Sizzle.contains; 2700 2701 2702 2703var dir = function (elem, dir, until) { 2704var matched = [], 2705truncate = until !== undefined; 2706 2707while ((elem = elem[dir]) && elem.nodeType !== 9) { 2708if (elem.nodeType === 1) { 2709if (truncate && jQuery(elem).is(until)) { 2710break; 2711} 2712matched.push(elem); 2713} 2714} 2715return matched; 2716}; 2717 2718 2719var siblings = function (n, elem) { 2720var matched = []; 2721 2722for (; n; n = n.nextSibling) { 2723if (n.nodeType === 1 && n !== elem) { 2724matched.push(n); 2725} 2726} 2727 2728return matched; 2729}; 2730 2731 2732var rneedsContext = jQuery.expr.match.needsContext; 2733 2734var rsingleTag = (/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/); 2735 2736 2737 2738var risSimple = /^.[^:#\[\.,]*$/; 2739 2740// Implement the identical functionality for filter and not 2741function winnow(elements, qualifier, not) { 2742if (jQuery.isFunction(qualifier)) { 2743return jQuery.grep(elements, function (elem, i) { 2744/* jshint -W018 */ 2745return !!qualifier.call(elem, i, elem) !== not; 2746}); 2747 2748} 2749 2750if (qualifier.nodeType) { 2751return jQuery.grep(elements, function (elem) { 2752return (elem === qualifier) !== not; 2753}); 2754 2755} 2756 2757if (typeof qualifier === "string") { 2758if (risSimple.test(qualifier)) { 2759return jQuery.filter(qualifier, elements, not); 2760} 2761 2762qualifier = jQuery.filter(qualifier, elements); 2763} 2764 2765return jQuery.grep(elements, function (elem) { 2766return (indexOf.call(qualifier, elem) > -1) !== not; 2767}); 2768} 2769 2770jQuery.filter = function (expr, elems, not) { 2771var elem = elems[0]; 2772 2773if (not) { 2774expr = ":not(" + expr + ")"; 2775} 2776 2777return elems.length === 1 && elem.nodeType === 1 ? 2778jQuery.find.matchesSelector(elem, expr) ? [elem] : [] : 2779jQuery.find.matches(expr, jQuery.grep(elems, function (elem) { 2780return elem.nodeType === 1; 2781})); 2782}; 2783 2784jQuery.fn.extend({ 2785find: function (selector) { 2786var i, 2787len = this.length, 2788ret = [], 2789self = this; 2790 2791if (typeof selector !== "string") { 2792return this.pushStack(jQuery(selector).filter(function () { 2793for (i = 0; i < len; i++) { 2794if (jQuery.contains(self[i], this)) { 2795return true; 2796} 2797} 2798})); 2799} 2800 2801for (i = 0; i < len; i++) { 2802jQuery.find(selector, self[i], ret); 2803} 2804 2805// Needed because $( selector, context ) becomes $( context ).find( selector ) 2806ret = this.pushStack(len > 1 ? jQuery.unique(ret) : ret); 2807ret.selector = this.selector ? this.selector + " " + selector : selector; 2808return ret; 2809}, 2810filter: function (selector) { 2811return this.pushStack(winnow(this, selector || [], false)); 2812}, 2813not: function (selector) { 2814return this.pushStack(winnow(this, selector || [], true)); 2815}, 2816is: function (selector) { 2817return !!winnow( 2818this, 2819 2820// If this is a positional/relative selector, check membership in the returned set 2821// so $("p:first").is("p:last") won't return true for a doc with two "p". 2822typeof selector === "string" && rneedsContext.test(selector) ? 2823jQuery(selector) : 2824selector || [], 2825false 2826).length; 2827} 2828}); 2829 2830 2831// Initialize a jQuery object 2832 2833 2834// A central reference to the root jQuery(document) 2835var rootjQuery, 2836 2837// A simple way to check for HTML strings 2838// Prioritize #id over <tag> to avoid XSS via location.hash (#9521) 2839// Strict HTML recognition (#11290: must start with <) 2840rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, 2841 2842init = jQuery.fn.init = function (selector, context, root) { 2843var match, elem; 2844 2845// HANDLE: $(""), $(null), $(undefined), $(false) 2846if (!selector) { 2847return this; 2848} 2849 2850// Method init() accepts an alternate rootjQuery 2851// so migrate can support jQuery.sub (gh-2101) 2852root = root || rootjQuery; 2853 2854// Handle HTML strings 2855if (typeof selector === "string") { 2856if (selector[0] === "<" && 2857selector[selector.length - 1] === ">" && 2858selector.length >= 3) { 2859 2860// Assume that strings that start and end with <> are HTML and skip the regex check 2861match = [null, selector, null]; 2862 2863} else { 2864match = rquickExpr.exec(selector); 2865} 2866 2867// Match html or make sure no context is specified for #id 2868if (match && (match[1] || !context)) { 2869 2870// HANDLE: $(html) -> $(array) 2871if (match[1]) { 2872context = context instanceof jQuery ? context[0] : context; 2873 2874// Option to run scripts is true for back-compat 2875// Intentionally let the error be thrown if parseHTML is not present 2876jQuery.merge(this, jQuery.parseHTML( 2877match[1], 2878context && context.nodeType ? context.ownerDocument || context : document, 2879true 2880)); 2881 2882// HANDLE: $(html, props) 2883if (rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) { 2884for (match in context) { 2885 2886// Properties of context are called as methods if possible 2887if (jQuery.isFunction(this[match])) { 2888this[match](context[match]); 2889 2890// ...and otherwise set as attributes 2891} else { 2892this.attr(match, context[match]); 2893} 2894} 2895} 2896 2897return this; 2898 2899// HANDLE: $(#id) 2900} else { 2901elem = document.getElementById(match[2]); 2902 2903// Support: Blackberry 4.6 2904// gEBID returns nodes no longer in the document (#6963) 2905if (elem && elem.parentNode) { 2906 2907// Inject the element directly into the jQuery object 2908this.length = 1; 2909this[0] = elem; 2910} 2911 2912this.context = document; 2913this.selector = selector; 2914return this; 2915} 2916 2917// HANDLE: $(expr, $(...)) 2918} else if (!context || context.jquery) { 2919return (context || root).find(selector); 2920 2921// HANDLE: $(expr, context) 2922// (which is just equivalent to: $(context).find(expr) 2923} else { 2924return this.constructor(context).find(selector); 2925} 2926 2927// HANDLE: $(DOMElement) 2928} else if (selector.nodeType) { 2929this.context = this[0] = selector; 2930this.length = 1; 2931return this; 2932 2933// HANDLE: $(function) 2934// Shortcut for document ready 2935} else if (jQuery.isFunction(selector)) { 2936return root.ready !== undefined ? 2937root.ready(selector) : 2938 2939// Execute immediately if ready is not present 2940selector(jQuery); 2941} 2942 2943if (selector.selector !== undefined) { 2944this.selector = selector.selector; 2945this.context = selector.context; 2946} 2947 2948return jQuery.makeArray(selector, this); 2949}; 2950 2951// Give the init function the jQuery prototype for later instantiation 2952init.prototype = jQuery.fn; 2953 2954// Initialize central reference 2955rootjQuery = jQuery(document); 2956 2957 2958var rparentsprev = /^(?:parents|prev(?:Until|All))/, 2959 2960// Methods guaranteed to produce a unique set when starting from a unique set 2961guaranteedUnique = { 2962children: true, 2963contents: true, 2964next: true, 2965prev: true 2966}; 2967 2968jQuery.fn.extend({ 2969has: function (target) { 2970var targets = jQuery(target, this), 2971l = targets.length; 2972 2973return this.filter(function () { 2974var i = 0; 2975for (; i < l; i++) { 2976if (jQuery.contains(this, targets[i])) { 2977return true; 2978} 2979} 2980}); 2981}, 2982 2983closest: function (selectors, context) { 2984var cur, 2985i = 0, 2986l = this.length, 2987matched = [], 2988pos = rneedsContext.test(selectors) || typeof selectors !== "string" ? 2989jQuery(selectors, context || this.context) : 29900; 2991 2992for (; i < l; i++) { 2993for (cur = this[i]; cur && cur !== context; cur = cur.parentNode) { 2994 2995// Always skip document fragments 2996if (cur.nodeType < 11 && (pos ? 2997pos.index(cur) > -1 : 2998 2999// Don't pass non-elements to Sizzle 3000cur.nodeType === 1 && 3001jQuery.find.matchesSelector(cur, selectors))) { 3002 3003matched.push(cur); 3004break; 3005} 3006} 3007} 3008 3009return this.pushStack(matched.length > 1 ? jQuery.uniqueSort(matched) : matched); 3010}, 3011 3012// Determine the position of an element within the set 3013index: function (elem) { 3014 3015// No argument, return index in parent 3016if (!elem) { 3017return (this[0] && this[0].parentNode) ? this.first().prevAll().length : -1; 3018} 3019 3020// Index in selector 3021if (typeof elem === "string") { 3022return indexOf.call(jQuery(elem), this[0]); 3023} 3024 3025// Locate the position of the desired element 3026return indexOf.call(this, 3027 3028// If it receives a jQuery object, the first element is used 3029elem.jquery ? elem[0] : elem 3030); 3031}, 3032 3033add: function (selector, context) { 3034return this.pushStack( 3035jQuery.uniqueSort( 3036jQuery.merge(this.get(), jQuery(selector, context)) 3037) 3038); 3039}, 3040
vendor: 5,523 bytes, lines 3041-3283
3041addBack: function (selector) { 3042return this.add(selector == null ? 3043this.prevObject : this.prevObject.filter(selector) 3044); 3045} 3046}); 3047 3048function sibling(cur, dir) { 3049while ((cur = cur[dir]) && cur.nodeType !== 1) { } 3050return cur; 3051} 3052 3053jQuery.each({ 3054parent: function (elem) { 3055var parent = elem.parentNode; 3056return parent && parent.nodeType !== 11 ? parent : null; 3057}, 3058parents: function (elem) { 3059return dir(elem, "parentNode"); 3060}, 3061parentsUntil: function (elem, i, until) { 3062return dir(elem, "parentNode", until); 3063}, 3064next: function (elem) { 3065return sibling(elem, "nextSibling"); 3066}, 3067prev: function (elem) { 3068return sibling(elem, "previousSibling"); 3069}, 3070nextAll: function (elem) { 3071return dir(elem, "nextSibling"); 3072}, 3073prevAll: function (elem) { 3074return dir(elem, "previousSibling"); 3075}, 3076nextUntil: function (elem, i, until) { 3077return dir(elem, "nextSibling", until); 3078}, 3079prevUntil: function (elem, i, until) { 3080return dir(elem, "previousSibling", until); 3081}, 3082siblings: function (elem) { 3083return siblings((elem.parentNode || {}).firstChild, elem); 3084}, 3085children: function (elem) { 3086return siblings(elem.firstChild); 3087}, 3088contents: function (elem) { 3089return elem.contentDocument || jQuery.merge([], elem.childNodes); 3090} 3091}, function (name, fn) { 3092jQuery.fn[name] = function (until, selector) { 3093var matched = jQuery.map(this, fn, until); 3094 3095if (name.slice(-5) !== "Until") { 3096selector = until; 3097} 3098 3099if (selector && typeof selector === "string") { 3100matched = jQuery.filter(selector, matched); 3101} 3102 3103if (this.length > 1) { 3104 3105// Remove duplicates 3106if (!guaranteedUnique[name]) { 3107jQuery.uniqueSort(matched); 3108} 3109 3110// Reverse order for parents* and prev-derivatives 3111if (rparentsprev.test(name)) { 3112matched.reverse(); 3113} 3114} 3115 3116return this.pushStack(matched); 3117}; 3118}); 3119var rnotwhite = (/\S+/g); 3120 3121 3122 3123// Convert String-formatted options into Object-formatted ones 3124function createOptions(options) { 3125var object = {}; 3126jQuery.each(options.match(rnotwhite) || [], function (_, flag) { 3127object[flag] = true; 3128}); 3129return object; 3130} 3131 3132/* 3133 * Create a callback list using the following parameters: 3134 * 3135 *options: an optional list of space-separated options that will change how 3136 *the callback list behaves or a more traditional option object 3137 * 3138 * By default a callback list will act like an event callback list and can be 3139 * "fired" multiple times. 3140 * 3141 * Possible options: 3142 * 3143 *once:will ensure the callback list can only be fired once (like a Deferred) 3144 * 3145 *memory:will keep track of previous values and will call any callback added 3146 *after the list has been fired right away with the latest "memorized" 3147 *values (like a Deferred) 3148 * 3149 *unique:will ensure a callback can only be added once (no duplicate in the list) 3150 * 3151 *stopOnFalse:interrupt callings when a callback returns false 3152 * 3153 */ 3154jQuery.Callbacks = function (options) { 3155 3156// Convert options from String-formatted to Object-formatted if needed 3157// (we check in cache first) 3158options = typeof options === "string" ? 3159createOptions(options) : 3160jQuery.extend({}, options); 3161 3162var // Flag to know if list is currently firing 3163firing, 3164 3165// Last fire value for non-forgettable lists 3166memory, 3167 3168// Flag to know if list was already fired 3169fired, 3170 3171// Flag to prevent firing 3172locked, 3173 3174// Actual callback list 3175list = [], 3176 3177// Queue of execution data for repeatable lists 3178queue = [], 3179 3180// Index of currently firing callback (modified by add/remove as needed) 3181firingIndex = -1, 3182 3183// Fire callbacks 3184fire = function () { 3185 3186// Enforce single-firing 3187locked = options.once; 3188 3189// Execute callbacks for all pending executions, 3190// respecting firingIndex overrides and runtime changes 3191fired = firing = true; 3192for (; queue.length; firingIndex = -1) { 3193memory = queue.shift(); 3194while (++firingIndex < list.length) { 3195 3196// Run callback and check for early termination 3197if (list[firingIndex].apply(memory[0], memory[1]) === false && 3198options.stopOnFalse) { 3199 3200// Jump to end and forget the data so .add doesn't re-fire 3201firingIndex = list.length; 3202memory = false; 3203} 3204} 3205} 3206 3207// Forget the data if we're done with it 3208if (!options.memory) { 3209memory = false; 3210} 3211 3212firing = false; 3213 3214// Clean up if we're done firing for good 3215if (locked) { 3216 3217// Keep an empty list if we have data for future add calls 3218if (memory) { 3219list = []; 3220 3221// Otherwise, this object is spent 3222} else { 3223list = ""; 3224} 3225} 3226}, 3227 3228// Actual Callbacks object 3229self = { 3230 3231// Add a callback or a collection of callbacks to the list 3232add: function () { 3233if (list) { 3234 3235// If we have memory from a past run, we should fire after adding 3236if (memory && !firing) { 3237firingIndex = list.length - 1; 3238queue.push(memory); 3239} 3240 3241(function add(args) { 3242jQuery.each(args, function (_, arg) { 3243if (jQuery.isFunction(arg)) { 3244if (!options.unique || !self.has(arg)) { 3245list.push(arg); 3246} 3247} else if (arg && arg.length && jQuery.type(arg) !== "string") { 3248 3249// Inspect recursively 3250add(arg); 3251} 3252}); 3253})(arguments); 3254 3255if (memory && !firing) { 3256fire(); 3257} 3258} 3259return this; 3260}, 3261 3262// Remove a callback from the list 3263remove: function () { 3264jQuery.each(arguments, function (_, arg) { 3265var index; 3266while ((index = jQuery.inArray(arg, list, index)) > -1) { 3267list.splice(index, 1); 3268 3269// Handle firing indexes 3270if (index <= firingIndex) { 3271firingIndex--; 3272} 3273} 3274}); 3275return this; 3276}, 3277 3278// Check if a given callback is in the list. 3279// If no argument is given, return whether or not list has callbacks attached. 3280has: function (fn) { 3281return fn ? 3282jQuery.inArray(fn, list) > -1 : 3283list.length > 0;
vendor: 49,745 bytes, lines 3284-5319
3284}, 3285 3286// Remove all callbacks from the list 3287empty: function () { 3288if (list) { 3289list = []; 3290} 3291return this; 3292}, 3293 3294// Disable .fire and .add 3295// Abort any current/pending executions 3296// Clear all callbacks and values 3297disable: function () { 3298locked = queue = []; 3299list = memory = ""; 3300return this; 3301}, 3302disabled: function () { 3303return !list; 3304}, 3305 3306// Disable .fire 3307// Also disable .add unless we have memory (since it would have no effect) 3308// Abort any pending executions 3309lock: function () { 3310locked = queue = []; 3311if (!memory) { 3312list = memory = ""; 3313} 3314return this; 3315}, 3316locked: function () { 3317return !!locked; 3318}, 3319 3320// Call all callbacks with the given context and arguments 3321fireWith: function (context, args) { 3322if (!locked) { 3323args = args || []; 3324args = [context, args.slice ? args.slice() : args]; 3325queue.push(args); 3326if (!firing) { 3327fire(); 3328} 3329} 3330return this; 3331}, 3332 3333// Call all the callbacks with the given arguments 3334fire: function () { 3335self.fireWith(this, arguments); 3336return this; 3337}, 3338 3339// To know if the callbacks have already been called at least once 3340fired: function () { 3341return !!fired; 3342} 3343}; 3344 3345return self; 3346}; 3347 3348 3349jQuery.extend({ 3350 3351Deferred: function (func) { 3352var tuples = [ 3353 3354// action, add listener, listener list, final state 3355["resolve", "done", jQuery.Callbacks("once memory"), "resolved"], 3356["reject", "fail", jQuery.Callbacks("once memory"), "rejected"], 3357["notify", "progress", jQuery.Callbacks("memory")] 3358], 3359state = "pending", 3360promise = { 3361state: function () { 3362return state; 3363}, 3364always: function () { 3365deferred.done(arguments).fail(arguments); 3366return this; 3367}, 3368then: function ( /* fnDone, fnFail, fnProgress */) { 3369var fns = arguments; 3370return jQuery.Deferred(function (newDefer) { 3371jQuery.each(tuples, function (i, tuple) { 3372var fn = jQuery.isFunction(fns[i]) && fns[i]; 3373 3374// deferred[ done | fail | progress ] for forwarding actions to newDefer 3375deferred[tuple[1]](function () { 3376var returned = fn && fn.apply(this, arguments); 3377if (returned && jQuery.isFunction(returned.promise)) { 3378returned.promise() 3379.progress(newDefer.notify) 3380.done(newDefer.resolve) 3381.fail(newDefer.reject); 3382} else { 3383newDefer[tuple[0] + "With"]( 3384this === promise ? newDefer.promise() : this, 3385fn ? [returned] : arguments 3386); 3387} 3388}); 3389}); 3390fns = null; 3391}).promise(); 3392}, 3393 3394// Get a promise for this deferred 3395// If obj is provided, the promise aspect is added to the object 3396promise: function (obj) { 3397return obj != null ? jQuery.extend(obj, promise) : promise; 3398} 3399}, 3400deferred = {}; 3401 3402// Keep pipe for back-compat 3403promise.pipe = promise.then; 3404 3405// Add list-specific methods 3406jQuery.each(tuples, function (i, tuple) { 3407var list = tuple[2], 3408stateString = tuple[3]; 3409 3410// promise[ done | fail | progress ] = list.add 3411promise[tuple[1]] = list.add; 3412 3413// Handle state 3414if (stateString) { 3415list.add(function () { 3416 3417// state = [ resolved | rejected ] 3418state = stateString; 3419 3420// [ reject_list | resolve_list ].disable; progress_list.lock 3421}, tuples[i ^ 1][2].disable, tuples[2][2].lock); 3422} 3423 3424// deferred[ resolve | reject | notify ] 3425deferred[tuple[0]] = function () { 3426deferred[tuple[0] + "With"](this === deferred ? promise : this, arguments); 3427return this; 3428}; 3429deferred[tuple[0] + "With"] = list.fireWith; 3430}); 3431 3432// Make the deferred a promise 3433promise.promise(deferred); 3434 3435// Call given func if any 3436if (func) { 3437func.call(deferred, deferred); 3438} 3439 3440// All done! 3441return deferred; 3442}, 3443 3444// Deferred helper 3445when: function (subordinate /* , ..., subordinateN */) { 3446var i = 0, 3447resolveValues = slice.call(arguments), 3448length = resolveValues.length, 3449 3450// the count of uncompleted subordinates 3451remaining = length !== 1 || 3452(subordinate && jQuery.isFunction(subordinate.promise)) ? length : 0, 3453 3454// the master Deferred. 3455// If resolveValues consist of only a single Deferred, just use that. 3456deferred = remaining === 1 ? subordinate : jQuery.Deferred(), 3457 3458// Update function for both resolve and progress values 3459updateFunc = function (i, contexts, values) { 3460return function (value) { 3461contexts[i] = this; 3462values[i] = arguments.length > 1 ? slice.call(arguments) : value; 3463if (values === progressValues) { 3464deferred.notifyWith(contexts, values); 3465} else if (!(--remaining)) { 3466deferred.resolveWith(contexts, values); 3467} 3468}; 3469}, 3470 3471progressValues, progressContexts, resolveContexts; 3472 3473// Add listeners to Deferred subordinates; treat others as resolved 3474if (length > 1) { 3475progressValues = new Array(length); 3476progressContexts = new Array(length); 3477resolveContexts = new Array(length); 3478for (; i < length; i++) { 3479if (resolveValues[i] && jQuery.isFunction(resolveValues[i].promise)) { 3480resolveValues[i].promise() 3481.progress(updateFunc(i, progressContexts, progressValues)) 3482.done(updateFunc(i, resolveContexts, resolveValues)) 3483.fail(deferred.reject); 3484} else { 3485--remaining; 3486} 3487} 3488} 3489 3490// If we're not waiting on anything, resolve the master 3491if (!remaining) { 3492deferred.resolveWith(resolveContexts, resolveValues); 3493} 3494 3495return deferred.promise(); 3496} 3497}); 3498 3499 3500// The deferred used on DOM ready 3501var readyList; 3502 3503jQuery.fn.ready = function (fn) { 3504 3505// Add the callback 3506jQuery.ready.promise().done(fn); 3507 3508return this; 3509}; 3510 3511jQuery.extend({ 3512 3513// Is the DOM ready to be used? Set to true once it occurs. 3514isReady: false, 3515 3516// A counter to track how many items to wait for before 3517// the ready event fires. See #6781 3518readyWait: 1, 3519 3520// Hold (or release) the ready event 3521holdReady: function (hold) { 3522if (hold) { 3523jQuery.readyWait++; 3524} else { 3525jQuery.ready(true); 3526} 3527}, 3528 3529// Handle when the DOM is ready 3530ready: function (wait) { 3531 3532// Abort if there are pending holds or we're already ready 3533if (wait === true ? --jQuery.readyWait : jQuery.isReady) { 3534return; 3535} 3536 3537// Remember that the DOM is ready 3538jQuery.isReady = true; 3539 3540// If a normal DOM Ready event fired, decrement, and wait if need be 3541if (wait !== true && --jQuery.readyWait > 0) { 3542return; 3543} 3544 3545// If there are functions bound, to execute 3546readyList.resolveWith(document, [jQuery]); 3547 3548// Trigger any bound ready events 3549if (jQuery.fn.triggerHandler) { 3550jQuery(document).triggerHandler("ready"); 3551jQuery(document).off("ready"); 3552} 3553} 3554}); 3555 3556/** 3557 * The ready event handler and self cleanup method 3558 */ 3559function completed() { 3560document.removeEventListener("DOMContentLoaded", completed); 3561window.removeEventListener("load", completed); 3562jQuery.ready(); 3563} 3564 3565jQuery.ready.promise = function (obj) { 3566if (!readyList) { 3567 3568readyList = jQuery.Deferred(); 3569 3570// Catch cases where $(document).ready() is called 3571// after the browser event has already occurred. 3572// Support: IE9-10 only 3573// Older IE sometimes signals "interactive" too soon 3574if (document.readyState === "complete" || 3575(document.readyState !== "loading" && !document.documentElement.doScroll)) { 3576 3577// Handle it asynchronously to allow scripts the opportunity to delay ready 3578window.setTimeout(jQuery.ready); 3579 3580} else { 3581 3582// Use the handy event callback 3583document.addEventListener("DOMContentLoaded", completed); 3584 3585// A fallback to window.onload, that will always work 3586window.addEventListener("load", completed); 3587} 3588} 3589return readyList.promise(obj); 3590}; 3591 3592// Kick off the DOM ready check even if the user does not 3593jQuery.ready.promise(); 3594 3595 3596 3597 3598// Multifunctional method to get and set values of a collection 3599// The value/s can optionally be executed if it's a function 3600var access = function (elems, fn, key, value, chainable, emptyGet, raw) { 3601var i = 0, 3602len = elems.length, 3603bulk = key == null; 3604 3605// Sets many values 3606if (jQuery.type(key) === "object") { 3607chainable = true; 3608for (i in key) { 3609access(elems, fn, i, key[i], true, emptyGet, raw); 3610} 3611 3612// Sets one value 3613} else if (value !== undefined) { 3614chainable = true; 3615 3616if (!jQuery.isFunction(value)) { 3617raw = true; 3618} 3619 3620if (bulk) { 3621 3622// Bulk operations run against the entire set 3623if (raw) { 3624fn.call(elems, value); 3625fn = null; 3626 3627// ...except when executing function values 3628} else { 3629bulk = fn; 3630fn = function (elem, key, value) { 3631return bulk.call(jQuery(elem), value); 3632}; 3633} 3634} 3635 3636if (fn) { 3637for (; i < len; i++) { 3638fn( 3639elems[i], key, raw ? 3640value : 3641value.call(elems[i], i, fn(elems[i], key)) 3642); 3643} 3644} 3645} 3646 3647return chainable ? 3648elems : 3649 3650// Gets 3651bulk ? 3652fn.call(elems) : 3653len ? fn(elems[0], key) : emptyGet; 3654}; 3655var acceptData = function (owner) { 3656 3657// Accepts only: 3658// - Node 3659// - Node.ELEMENT_NODE 3660// - Node.DOCUMENT_NODE 3661// - Object 3662// - Any 3663/* jshint -W018 */ 3664return owner.nodeType === 1 || owner.nodeType === 9 || !(+owner.nodeType); 3665}; 3666 3667 3668 3669 3670function Data() { 3671this.expando = jQuery.expando + Data.uid++; 3672} 3673 3674Data.uid = 1; 3675 3676Data.prototype = { 3677 3678register: function (owner, initial) { 3679var value = initial || {}; 3680 3681// If it is a node unlikely to be stringify-ed or looped over 3682// use plain assignment 3683if (owner.nodeType) { 3684owner[this.expando] = value; 3685 3686// Otherwise secure it in a non-enumerable, non-writable property 3687// configurability must be true to allow the property to be 3688// deleted with the delete operator 3689} else { 3690Object.defineProperty(owner, this.expando, { 3691value: value, 3692writable: true, 3693configurable: true 3694}); 3695} 3696return owner[this.expando]; 3697}, 3698cache: function (owner) { 3699 3700// We can accept data for non-element nodes in modern browsers, 3701// but we should not, see #8335. 3702// Always return an empty object. 3703if (!acceptData(owner)) { 3704return {}; 3705} 3706 3707// Check if the owner object already has a cache 3708var value = owner[this.expando]; 3709 3710// If not, create one 3711if (!value) { 3712value = {}; 3713 3714// We can accept data for non-element nodes in modern browsers, 3715// but we should not, see #8335. 3716// Always return an empty object. 3717if (acceptData(owner)) { 3718 3719// If it is a node unlikely to be stringify-ed or looped over 3720// use plain assignment 3721if (owner.nodeType) { 3722owner[this.expando] = value; 3723 3724// Otherwise secure it in a non-enumerable property 3725// configurable must be true to allow the property to be 3726// deleted when data is removed 3727} else { 3728Object.defineProperty(owner, this.expando, { 3729value: value, 3730configurable: true 3731}); 3732} 3733} 3734} 3735 3736return value; 3737}, 3738set: function (owner, data, value) { 3739var prop, 3740cache = this.cache(owner); 3741 3742// Handle: [ owner, key, value ] args 3743if (typeof data === "string") { 3744cache[data] = value; 3745 3746// Handle: [ owner, { properties } ] args 3747} else { 3748 3749// Copy the properties one-by-one to the cache object 3750for (prop in data) { 3751cache[prop] = data[prop]; 3752} 3753} 3754return cache; 3755}, 3756get: function (owner, key) { 3757return key === undefined ? 3758this.cache(owner) : 3759owner[this.expando] && owner[this.expando][key]; 3760}, 3761access: function (owner, key, value) { 3762var stored; 3763 3764// In cases where either: 3765// 3766// 1. No key was specified 3767// 2. A string key was specified, but no value provided 3768// 3769// Take the "read" path and allow the get method to determine 3770// which value to return, respectively either: 3771// 3772// 1. The entire cache object 3773// 2. The data stored at the key 3774// 3775if (key === undefined || 3776((key && typeof key === "string") && value === undefined)) { 3777 3778stored = this.get(owner, key); 3779 3780return stored !== undefined ? 3781stored : this.get(owner, jQuery.camelCase(key)); 3782} 3783 3784// When the key is not a string, or both a key and value 3785// are specified, set or extend (existing objects) with either: 3786// 3787// 1. An object of properties 3788// 2. A key and value 3789// 3790this.set(owner, key, value); 3791 3792// Since the "set" path can have two possible entry points 3793// return the expected data based on which path was taken[*] 3794return value !== undefined ? value : key; 3795}, 3796remove: function (owner, key) { 3797var i, name, camel, 3798cache = owner[this.expando]; 3799 3800if (cache === undefined) { 3801return; 3802} 3803 3804if (key === undefined) { 3805this.register(owner); 3806 3807} else { 3808 3809// Support array or space separated string of keys 3810if (jQuery.isArray(key)) { 3811 3812// If "name" is an array of keys... 3813// When data is initially created, via ("key", "val") signature, 3814// keys will be converted to camelCase. 3815// Since there is no way to tell _how_ a key was added, remove 3816// both plain key and camelCase key. #12786 3817// This will only penalize the array argument path. 3818name = key.concat(key.map(jQuery.camelCase)); 3819} else { 3820camel = jQuery.camelCase(key); 3821 3822// Try the string as a key before any manipulation 3823if (key in cache) { 3824name = [key, camel]; 3825} else { 3826 3827// If a key with the spaces exists, use it. 3828// Otherwise, create an array by matching non-whitespace 3829name = camel; 3830name = name in cache ? 3831[name] : (name.match(rnotwhite) || []); 3832} 3833} 3834 3835i = name.length; 3836 3837while (i--) { 3838delete cache[name[i]]; 3839} 3840} 3841 3842// Remove the expando if there's no more data 3843if (key === undefined || jQuery.isEmptyObject(cache)) { 3844 3845// Support: Chrome <= 35-45+ 3846// Webkit & Blink performance suffers when deleting properties 3847// from DOM nodes, so set to undefined instead 3848// https://code.google.com/p/chromium/issues/detail?id=378607 3849if (owner.nodeType) { 3850owner[this.expando] = undefined; 3851} else { 3852delete owner[this.expando]; 3853} 3854} 3855}, 3856hasData: function (owner) { 3857var cache = owner[this.expando]; 3858return cache !== undefined && !jQuery.isEmptyObject(cache); 3859} 3860}; 3861var dataPriv = new Data(); 3862 3863var dataUser = new Data(); 3864 3865 3866 3867//Implementation Summary 3868// 3869//1. Enforce API surface and semantic compatibility with 1.9.x branch 3870//2. Improve the module's maintainability by reducing the storage 3871//paths to a single mechanism. 3872//3. Use the same single mechanism to support "private" and "user" data. 3873//4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) 3874//5. Avoid exposing implementation details on user objects (eg. expando properties) 3875//6. Provide a clear path for implementation upgrade to WeakMap in 2014 3876 3877var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, 3878rmultiDash = /[A-Z]/g; 3879 3880function dataAttr(elem, key, data) { 3881var name; 3882 3883// If nothing was found internally, try to fetch any 3884// data from the HTML5 data-* attribute 3885if (data === undefined && elem.nodeType === 1) { 3886name = "data-" + key.replace(rmultiDash, "-$&").toLowerCase(); 3887data = elem.getAttribute(name); 3888 3889if (typeof data === "string") { 3890try { 3891data = data === "true" ? true : 3892data === "false" ? false : 3893data === "null" ? null : 3894 3895// Only convert to a number if it doesn't change the string 3896+data + "" === data ? +data : 3897rbrace.test(data) ? jQuery.parseJSON(data) : 3898data; 3899} catch (e) { } 3900 3901// Make sure we set the data so it isn't changed later 3902dataUser.set(elem, key, data); 3903} else { 3904data = undefined; 3905} 3906} 3907return data; 3908} 3909 3910jQuery.extend({ 3911hasData: function (elem) { 3912return dataUser.hasData(elem) || dataPriv.hasData(elem); 3913}, 3914 3915data: function (elem, name, data) { 3916return dataUser.access(elem, name, data); 3917}, 3918 3919removeData: function (elem, name) { 3920dataUser.remove(elem, name); 3921}, 3922 3923// TODO: Now that all calls to _data and _removeData have been replaced 3924// with direct calls to dataPriv methods, these can be deprecated. 3925_data: function (elem, name, data) { 3926return dataPriv.access(elem, name, data); 3927}, 3928 3929_removeData: function (elem, name) { 3930dataPriv.remove(elem, name); 3931} 3932}); 3933 3934jQuery.fn.extend({ 3935data: function (key, value) { 3936var i, name, data, 3937elem = this[0], 3938attrs = elem && elem.attributes; 3939 3940// Gets all values 3941if (key === undefined) { 3942if (this.length) { 3943data = dataUser.get(elem); 3944 3945if (elem.nodeType === 1 && !dataPriv.get(elem, "hasDataAttrs")) { 3946i = attrs.length; 3947while (i--) { 3948 3949// Support: IE11+ 3950// The attrs elements can be null (#14894) 3951if (attrs[i]) { 3952name = attrs[i].name; 3953if (name.indexOf("data-") === 0) { 3954name = jQuery.camelCase(name.slice(5)); 3955dataAttr(elem, name, data[name]); 3956} 3957} 3958} 3959dataPriv.set(elem, "hasDataAttrs", true); 3960} 3961} 3962 3963return data; 3964} 3965 3966// Sets multiple values 3967if (typeof key === "object") { 3968return this.each(function () { 3969dataUser.set(this, key); 3970}); 3971} 3972 3973return access(this, function (value) { 3974var data, camelKey; 3975 3976// The calling jQuery object (element matches) is not empty 3977// (and therefore has an element appears at this[ 0 ]) and the 3978// `value` parameter was not undefined. An empty jQuery object 3979// will result in `undefined` for elem = this[ 0 ] which will 3980// throw an exception if an attempt to read a data cache is made. 3981if (elem && value === undefined) { 3982 3983// Attempt to get data from the cache 3984// with the key as-is 3985data = dataUser.get(elem, key) || 3986 3987// Try to find dashed key if it exists (gh-2779) 3988// This is for 2.2.x only 3989dataUser.get(elem, key.replace(rmultiDash, "-$&").toLowerCase()); 3990 3991if (data !== undefined) { 3992return data; 3993} 3994 3995camelKey = jQuery.camelCase(key); 3996 3997// Attempt to get data from the cache 3998// with the key camelized 3999data = dataUser.get(elem, camelKey); 4000if (data !== undefined) { 4001return data; 4002} 4003 4004// Attempt to "discover" the data in 4005// HTML5 custom data-* attrs 4006data = dataAttr(elem, camelKey, undefined); 4007if (data !== undefined) { 4008return data; 4009} 4010 4011// We tried really hard, but the data doesn't exist. 4012return; 4013} 4014 4015// Set the data... 4016camelKey = jQuery.camelCase(key); 4017this.each(function () { 4018 4019// First, attempt to store a copy or reference of any 4020// data that might've been store with a camelCased key. 4021var data = dataUser.get(this, camelKey); 4022 4023// For HTML5 data-* attribute interop, we have to 4024// store property names with dashes in a camelCase form. 4025// This might not apply to all properties...* 4026dataUser.set(this, camelKey, value); 4027 4028// *... In the case of properties that might _actually_ 4029// have dashes, we need to also store a copy of that 4030// unchanged property. 4031if (key.indexOf("-") > -1 && data !== undefined) { 4032dataUser.set(this, key, value); 4033} 4034}); 4035}, null, value, arguments.length > 1, null, true); 4036}, 4037 4038removeData: function (key) { 4039return this.each(function () { 4040dataUser.remove(this, key); 4041}); 4042} 4043}); 4044 4045 4046jQuery.extend({ 4047queue: function (elem, type, data) { 4048var queue; 4049 4050if (elem) { 4051type = (type || "fx") + "queue"; 4052queue = dataPriv.get(elem, type); 4053 4054// Speed up dequeue by getting out quickly if this is just a lookup 4055if (data) { 4056if (!queue || jQuery.isArray(data)) { 4057queue = dataPriv.access(elem, type, jQuery.makeArray(data)); 4058} else { 4059queue.push(data); 4060} 4061} 4062return queue || []; 4063} 4064}, 4065 4066dequeue: function (elem, type) { 4067type = type || "fx"; 4068 4069var queue = jQuery.queue(elem, type), 4070startLength = queue.length, 4071fn = queue.shift(), 4072hooks = jQuery._queueHooks(elem, type), 4073next = function () { 4074jQuery.dequeue(elem, type); 4075}; 4076 4077// If the fx queue is dequeued, always remove the progress sentinel 4078if (fn === "inprogress") { 4079fn = queue.shift(); 4080startLength--; 4081} 4082 4083if (fn) { 4084 4085// Add a progress sentinel to prevent the fx queue from being 4086// automatically dequeued 4087if (type === "fx") { 4088queue.unshift("inprogress"); 4089} 4090 4091// Clear up the last queue stop function 4092delete hooks.stop; 4093fn.call(elem, next, hooks); 4094} 4095 4096if (!startLength && hooks) { 4097hooks.empty.fire(); 4098} 4099}, 4100 4101// Not public - generate a queueHooks object, or return the current one 4102_queueHooks: function (elem, type) { 4103var key = type + "queueHooks"; 4104return dataPriv.get(elem, key) || dataPriv.access(elem, key, { 4105empty: jQuery.Callbacks("once memory").add(function () { 4106dataPriv.remove(elem, [type + "queue", key]); 4107}) 4108}); 4109} 4110}); 4111 4112jQuery.fn.extend({ 4113queue: function (type, data) { 4114var setter = 2; 4115 4116if (typeof type !== "string") { 4117data = type; 4118type = "fx"; 4119setter--; 4120} 4121 4122if (arguments.length < setter) { 4123return jQuery.queue(this[0], type); 4124} 4125 4126return data === undefined ? 4127this : 4128this.each(function () { 4129var queue = jQuery.queue(this, type, data); 4130 4131// Ensure a hooks for this queue 4132jQuery._queueHooks(this, type); 4133 4134if (type === "fx" && queue[0] !== "inprogress") { 4135jQuery.dequeue(this, type); 4136} 4137}); 4138}, 4139dequeue: function (type) { 4140return this.each(function () { 4141jQuery.dequeue(this, type); 4142}); 4143}, 4144clearQueue: function (type) { 4145return this.queue(type || "fx", []); 4146}, 4147 4148// Get a promise resolved when queues of a certain type 4149// are emptied (fx is the type by default) 4150promise: function (type, obj) { 4151var tmp, 4152count = 1, 4153defer = jQuery.Deferred(), 4154elements = this, 4155i = this.length, 4156resolve = function () { 4157if (!(--count)) { 4158defer.resolveWith(elements, [elements]); 4159} 4160}; 4161 4162if (typeof type !== "string") { 4163obj = type; 4164type = undefined; 4165} 4166type = type || "fx"; 4167 4168while (i--) { 4169tmp = dataPriv.get(elements[i], type + "queueHooks"); 4170if (tmp && tmp.empty) { 4171count++; 4172tmp.empty.add(resolve); 4173} 4174} 4175resolve(); 4176return defer.promise(obj); 4177} 4178}); 4179var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source; 4180 4181var rcssNum = new RegExp("^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i"); 4182 4183 4184var cssExpand = ["Top", "Right", "Bottom", "Left"]; 4185 4186var isHidden = function (elem, el) { 4187 4188// isHidden might be called from jQuery#filter function; 4189// in that case, element will be second argument 4190elem = el || elem; 4191return jQuery.css(elem, "display") === "none" || 4192!jQuery.contains(elem.ownerDocument, elem); 4193}; 4194 4195 4196 4197function adjustCSS(elem, prop, valueParts, tween) { 4198var adjusted, 4199scale = 1, 4200maxIterations = 20, 4201currentValue = tween ? 4202function () { return tween.cur(); } : 4203function () { return jQuery.css(elem, prop, ""); }, 4204initial = currentValue(), 4205unit = valueParts && valueParts[3] || (jQuery.cssNumber[prop] ? "" : "px"), 4206 4207// Starting value computation is required for potential unit mismatches 4208initialInUnit = (jQuery.cssNumber[prop] || unit !== "px" && +initial) && 4209rcssNum.exec(jQuery.css(elem, prop)); 4210 4211if (initialInUnit && initialInUnit[3] !== unit) { 4212 4213// Trust units reported by jQuery.css 4214unit = unit || initialInUnit[3]; 4215 4216// Make sure we update the tween properties later on 4217valueParts = valueParts || []; 4218 4219// Iteratively approximate from a nonzero starting point 4220initialInUnit = +initial || 1; 4221 4222do { 4223 4224// If previous iteration zeroed out, double until we get *something*. 4225// Use string for doubling so we don't accidentally see scale as unchanged below 4226scale = scale || ".5"; 4227 4228// Adjust and apply 4229initialInUnit = initialInUnit / scale; 4230jQuery.style(elem, prop, initialInUnit + unit); 4231 4232// Update scale, tolerating zero or NaN from tween.cur() 4233// Break the loop if scale is unchanged or perfect, or if we've just had enough. 4234} while ( 4235scale !== (scale = currentValue() / initial) && scale !== 1 && --maxIterations 4236); 4237} 4238 4239if (valueParts) { 4240initialInUnit = +initialInUnit || +initial || 0; 4241 4242// Apply relative offset (+=/-=) if specified 4243adjusted = valueParts[1] ? 4244initialInUnit + (valueParts[1] + 1) * valueParts[2] : 4245+valueParts[2]; 4246if (tween) { 4247tween.unit = unit; 4248tween.start = initialInUnit; 4249tween.end = adjusted; 4250} 4251} 4252return adjusted; 4253} 4254var rcheckableType = (/^(?:checkbox|radio)$/i); 4255 4256var rtagName = (/<([\w:-]+)/); 4257 4258var rscriptType = (/^$|\/(?:java|ecma)script/i); 4259 4260 4261 4262// We have to close these tags to support XHTML (#13200) 4263var wrapMap = { 4264 4265// Support: IE9 4266option: [1, "<select multiple='multiple'>", "</select>"], 4267 4268// XHTML parsers do not magically insert elements in the 4269// same way that tag soup parsers do. So we cannot shorten 4270// this by omitting <tbody> or other required elements. 4271thead: [1, "<table>", "</table>"], 4272col: [2, "<table><colgroup>", "</colgroup></table>"], 4273tr: [2, "<table><tbody>", "</tbody></table>"], 4274td: [3, "<table><tbody><tr>", "</tr></tbody></table>"], 4275 4276_default: [0, "", ""] 4277}; 4278 4279// Support: IE9 4280wrapMap.optgroup = wrapMap.option; 4281 4282wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; 4283wrapMap.th = wrapMap.td; 4284 4285 4286function getAll(context, tag) { 4287 4288// Support: IE9-11+ 4289// Use typeof to avoid zero-argument method invocation on host objects (#15151) 4290var ret = typeof context.getElementsByTagName !== "undefined" ? 4291context.getElementsByTagName(tag || "*") : 4292typeof context.querySelectorAll !== "undefined" ? 4293context.querySelectorAll(tag || "*") : 4294[]; 4295 4296return tag === undefined || tag && jQuery.nodeName(context, tag) ? 4297jQuery.merge([context], ret) : 4298ret; 4299} 4300 4301 4302// Mark scripts as having already been evaluated 4303function setGlobalEval(elems, refElements) { 4304var i = 0, 4305l = elems.length; 4306 4307for (; i < l; i++) { 4308dataPriv.set( 4309elems[i], 4310"globalEval", 4311!refElements || dataPriv.get(refElements[i], "globalEval") 4312); 4313} 4314} 4315 4316 4317var rhtml = /<|&#?\w+;/; 4318 4319function buildFragment(elems, context, scripts, selection, ignored) { 4320var elem, tmp, tag, wrap, contains, j, 4321fragment = context.createDocumentFragment(), 4322nodes = [], 4323i = 0, 4324l = elems.length; 4325 4326for (; i < l; i++) { 4327elem = elems[i]; 4328 4329if (elem || elem === 0) { 4330 4331// Add nodes directly 4332if (jQuery.type(elem) === "object") { 4333 4334// Support: Android<4.1, PhantomJS<2 4335// push.apply(_, arraylike) throws on ancient WebKit 4336jQuery.merge(nodes, elem.nodeType ? [elem] : elem); 4337 4338// Convert non-html into a text node 4339} else if (!rhtml.test(elem)) { 4340nodes.push(context.createTextNode(elem)); 4341 4342// Convert html into DOM nodes 4343} else { 4344tmp = tmp || fragment.appendChild(context.createElement("div")); 4345 4346// Deserialize a standard representation 4347tag = (rtagName.exec(elem) || ["", ""])[1].toLowerCase(); 4348wrap = wrapMap[tag] || wrapMap._default; 4349tmp.innerHTML = wrap[1] + jQuery.htmlPrefilter(elem) + wrap[2]; 4350 4351// Descend through wrappers to the right content 4352j = wrap[0]; 4353while (j--) { 4354tmp = tmp.lastChild; 4355} 4356 4357// Support: Android<4.1, PhantomJS<2 4358// push.apply(_, arraylike) throws on ancient WebKit 4359jQuery.merge(nodes, tmp.childNodes); 4360 4361// Remember the top-level container 4362tmp = fragment.firstChild; 4363 4364// Ensure the created nodes are orphaned (#12392) 4365tmp.textContent = ""; 4366} 4367} 4368} 4369 4370// Remove wrapper from fragment 4371fragment.textContent = ""; 4372 4373i = 0; 4374while ((elem = nodes[i++])) { 4375 4376// Skip elements already in the context collection (trac-4087) 4377if (selection && jQuery.inArray(elem, selection) > -1) { 4378if (ignored) { 4379ignored.push(elem); 4380} 4381continue; 4382} 4383 4384contains = jQuery.contains(elem.ownerDocument, elem); 4385 4386// Append to fragment 4387tmp = getAll(fragment.appendChild(elem), "script"); 4388 4389// Preserve script evaluation history 4390if (contains) { 4391setGlobalEval(tmp); 4392} 4393 4394// Capture executables 4395if (scripts) { 4396j = 0; 4397while ((elem = tmp[j++])) { 4398if (rscriptType.test(elem.type || "")) { 4399scripts.push(elem); 4400} 4401} 4402} 4403} 4404 4405return fragment; 4406} 4407 4408 4409(function () { 4410var fragment = document.createDocumentFragment(), 4411div = fragment.appendChild(document.createElement("div")), 4412input = document.createElement("input"); 4413 4414// Support: Android 4.0-4.3, Safari<=5.1 4415// Check state lost if the name is set (#11217) 4416// Support: Windows Web Apps (WWA) 4417// `name` and `type` must use .setAttribute for WWA (#14901) 4418input.setAttribute("type", "radio"); 4419input.setAttribute("checked", "checked"); 4420input.setAttribute("name", "t"); 4421 4422div.appendChild(input); 4423 4424// Support: Safari<=5.1, Android<4.2 4425// Older WebKit doesn't clone checked state correctly in fragments 4426support.checkClone = div.cloneNode(true).cloneNode(true).lastChild.checked; 4427 4428// Support: IE<=11+ 4429// Make sure textarea (and checkbox) defaultValue is properly cloned 4430div.innerHTML = "<textarea>x</textarea>"; 4431support.noCloneChecked = !!div.cloneNode(true).lastChild.defaultValue; 4432})(); 4433 4434 4435var 4436rkeyEvent = /^key/, 4437rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, 4438rtypenamespace = /^([^.]*)(?:\.(.+)|)/; 4439 4440function returnTrue() { 4441return true; 4442} 4443 4444function returnFalse() { 4445return false; 4446} 4447 4448// Support: IE9 4449// See #13393 for more info 4450function safeActiveElement() { 4451try { 4452return document.activeElement; 4453} catch (err) { } 4454} 4455 4456function on(elem, types, selector, data, fn, one) { 4457var origFn, type; 4458 4459// Types can be a map of types/handlers 4460if (typeof types === "object") { 4461 4462// ( types-Object, selector, data ) 4463if (typeof selector !== "string") { 4464 4465// ( types-Object, data ) 4466data = data || selector; 4467selector = undefined; 4468} 4469for (type in types) { 4470on(elem, type, selector, data, types[type], one); 4471} 4472return elem; 4473} 4474 4475if (data == null && fn == null) { 4476 4477// ( types, fn ) 4478fn = selector; 4479data = selector = undefined; 4480} else if (fn == null) { 4481if (typeof selector === "string") { 4482 4483// ( types, selector, fn ) 4484fn = data; 4485data = undefined; 4486} else { 4487 4488// ( types, data, fn ) 4489fn = data; 4490data = selector; 4491selector = undefined; 4492} 4493} 4494if (fn === false) { 4495fn = returnFalse; 4496} else if (!fn) { 4497return elem; 4498} 4499 4500if (one === 1) { 4501origFn = fn; 4502fn = function (event) { 4503 4504// Can use an empty set, since event contains the info 4505jQuery().off(event); 4506return origFn.apply(this, arguments); 4507}; 4508 4509// Use same guid so caller can remove using origFn 4510fn.guid = origFn.guid || (origFn.guid = jQuery.guid++); 4511} 4512return elem.each(function () { 4513jQuery.event.add(this, types, fn, data, selector); 4514}); 4515} 4516 4517/* 4518 * Helper functions for managing events -- not part of the public interface. 4519 * Props to Dean Edwards' addEvent library for many of the ideas. 4520 */ 4521jQuery.event = { 4522 4523global: {}, 4524 4525add: function (elem, types, handler, data, selector) { 4526 4527var handleObjIn, eventHandle, tmp, 4528events, t, handleObj, 4529special, handlers, type, namespaces, origType, 4530elemData = dataPriv.get(elem); 4531 4532// Don't attach events to noData or text/comment nodes (but allow plain objects) 4533if (!elemData) { 4534return; 4535} 4536 4537// Caller can pass in an object of custom data in lieu of the handler 4538if (handler.handler) { 4539handleObjIn = handler; 4540handler = handleObjIn.handler; 4541selector = handleObjIn.selector; 4542} 4543 4544// Make sure that the handler has a unique ID, used to find/remove it later 4545if (!handler.guid) { 4546handler.guid = jQuery.guid++; 4547} 4548 4549// Init the element's event structure and main handler, if this is the first 4550if (!(events = elemData.events)) { 4551events = elemData.events = {}; 4552} 4553if (!(eventHandle = elemData.handle)) { 4554eventHandle = elemData.handle = function (e) { 4555 4556// Discard the second event of a jQuery.event.trigger() and 4557// when an event is called after a page has unloaded 4558return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? 4559jQuery.event.dispatch.apply(elem, arguments) : undefined; 4560}; 4561} 4562 4563// Handle multiple events separated by a space 4564types = (types || "").match(rnotwhite) || [""]; 4565t = types.length; 4566while (t--) { 4567tmp = rtypenamespace.exec(types[t]) || []; 4568type = origType = tmp[1]; 4569namespaces = (tmp[2] || "").split(".").sort(); 4570 4571// There *must* be a type, no attaching namespace-only handlers 4572if (!type) { 4573continue; 4574} 4575 4576// If event changes its type, use the special event handlers for the changed type 4577special = jQuery.event.special[type] || {}; 4578 4579// If selector defined, determine special event api type, otherwise given type 4580type = (selector ? special.delegateType : special.bindType) || type; 4581 4582// Update special based on newly reset type 4583special = jQuery.event.special[type] || {}; 4584 4585// handleObj is passed to all event handlers 4586handleObj = jQuery.extend({ 4587type: type, 4588origType: origType, 4589data: data, 4590handler: handler, 4591guid: handler.guid, 4592selector: selector, 4593needsContext: selector && jQuery.expr.match.needsContext.test(selector), 4594namespace: namespaces.join(".") 4595}, handleObjIn); 4596 4597// Init the event handler queue if we're the first 4598if (!(handlers = events[type])) { 4599handlers = events[type] = []; 4600handlers.delegateCount = 0; 4601 4602// Only use addEventListener if the special events handler returns false 4603if (!special.setup || 4604special.setup.call(elem, data, namespaces, eventHandle) === false) { 4605 4606if (elem.addEventListener) { 4607elem.addEventListener(type, eventHandle); 4608} 4609} 4610} 4611 4612if (special.add) { 4613special.add.call(elem, handleObj); 4614 4615if (!handleObj.handler.guid) { 4616handleObj.handler.guid = handler.guid; 4617} 4618} 4619 4620// Add to the element's handler list, delegates in front 4621if (selector) { 4622handlers.splice(handlers.delegateCount++, 0, handleObj); 4623} else { 4624handlers.push(handleObj); 4625} 4626 4627// Keep track of which events have ever been used, for event optimization 4628jQuery.event.global[type] = true; 4629} 4630 4631}, 4632 4633// Detach an event or set of events from an element 4634remove: function (elem, types, handler, selector, mappedTypes) { 4635 4636var j, origCount, tmp, 4637events, t, handleObj, 4638special, handlers, type, namespaces, origType, 4639elemData = dataPriv.hasData(elem) && dataPriv.get(elem); 4640 4641if (!elemData || !(events = elemData.events)) { 4642return; 4643} 4644 4645// Once for each type.namespace in types; type may be omitted 4646types = (types || "").match(rnotwhite) || [""]; 4647t = types.length; 4648while (t--) { 4649tmp = rtypenamespace.exec(types[t]) || []; 4650type = origType = tmp[1]; 4651namespaces = (tmp[2] || "").split(".").sort(); 4652 4653// Unbind all events (on this namespace, if provided) for the element 4654if (!type) { 4655for (type in events) { 4656jQuery.event.remove(elem, type + types[t], handler, selector, true); 4657} 4658continue; 4659} 4660 4661special = jQuery.event.special[type] || {}; 4662type = (selector ? special.delegateType : special.bindType) || type; 4663handlers = events[type] || []; 4664tmp = tmp[2] && 4665new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)"); 4666 4667// Remove matching events 4668origCount = j = handlers.length; 4669while (j--) { 4670handleObj = handlers[j]; 4671 4672if ((mappedTypes || origType === handleObj.origType) && 4673(!handler || handler.guid === handleObj.guid) && 4674(!tmp || tmp.test(handleObj.namespace)) && 4675(!selector || selector === handleObj.selector || 4676selector === "**" && handleObj.selector)) { 4677handlers.splice(j, 1); 4678 4679if (handleObj.selector) { 4680handlers.delegateCount--; 4681} 4682if (special.remove) { 4683special.remove.call(elem, handleObj); 4684} 4685} 4686} 4687 4688// Remove generic event handler if we removed something and no more handlers exist 4689// (avoids potential for endless recursion during removal of special event handlers) 4690if (origCount && !handlers.length) { 4691if (!special.teardown || 4692special.teardown.call(elem, namespaces, elemData.handle) === false) { 4693 4694jQuery.removeEvent(elem, type, elemData.handle); 4695} 4696 4697delete events[type]; 4698} 4699} 4700 4701// Remove data and the expando if it's no longer used 4702if (jQuery.isEmptyObject(events)) { 4703dataPriv.remove(elem, "handle events"); 4704} 4705}, 4706 4707dispatch: function (event) { 4708 4709// Make a writable jQuery.Event from the native event object 4710event = jQuery.event.fix(event); 4711 4712var i, j, ret, matched, handleObj, 4713handlerQueue = [], 4714args = slice.call(arguments), 4715handlers = (dataPriv.get(this, "events") || {})[event.type] || [], 4716special = jQuery.event.special[event.type] || {}; 4717 4718// Use the fix-ed jQuery.Event rather than the (read-only) native event 4719args[0] = event; 4720event.delegateTarget = this; 4721 4722// Call the preDispatch hook for the mapped type, and let it bail if desired 4723if (special.preDispatch && special.preDispatch.call(this, event) === false) { 4724return; 4725} 4726 4727// Determine handlers 4728handlerQueue = jQuery.event.handlers.call(this, event, handlers); 4729 4730// Run delegates first; they may want to stop propagation beneath us 4731i = 0; 4732while ((matched = handlerQueue[i++]) && !event.isPropagationStopped()) { 4733event.currentTarget = matched.elem; 4734 4735j = 0; 4736while ((handleObj = matched.handlers[j++]) && 4737!event.isImmediatePropagationStopped()) { 4738 4739// Triggered event must either 1) have no namespace, or 2) have namespace(s) 4740// a subset or equal to those in the bound event (both can have no namespace). 4741if (!event.rnamespace || event.rnamespace.test(handleObj.namespace)) { 4742 4743event.handleObj = handleObj; 4744event.data = handleObj.data; 4745 4746ret = ((jQuery.event.special[handleObj.origType] || {}).handle || 4747handleObj.handler).apply(matched.elem, args); 4748 4749if (ret !== undefined) { 4750if ((event.result = ret) === false) { 4751event.preventDefault(); 4752event.stopPropagation(); 4753} 4754} 4755} 4756} 4757} 4758 4759// Call the postDispatch hook for the mapped type 4760if (special.postDispatch) { 4761special.postDispatch.call(this, event); 4762} 4763 4764return event.result; 4765}, 4766 4767handlers: function (event, handlers) { 4768var i, matches, sel, handleObj, 4769handlerQueue = [], 4770delegateCount = handlers.delegateCount, 4771cur = event.target; 4772 4773// Support (at least): Chrome, IE9 4774// Find delegate handlers 4775// Black-hole SVG <use> instance trees (#13180) 4776// 4777// Support: Firefox<=42+ 4778// Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343) 4779if (delegateCount && cur.nodeType && 4780(event.type !== "click" || isNaN(event.button) || event.button < 1)) { 4781 4782for (; cur !== this; cur = cur.parentNode || this) { 4783 4784// Don't check non-elements (#13208) 4785// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) 4786if (cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click")) { 4787matches = []; 4788for (i = 0; i < delegateCount; i++) { 4789handleObj = handlers[i]; 4790 4791// Don't conflict with Object.prototype properties (#13203) 4792sel = handleObj.selector + " "; 4793 4794if (matches[sel] === undefined) { 4795matches[sel] = handleObj.needsContext ? 4796jQuery(sel, this).index(cur) > -1 : 4797jQuery.find(sel, this, null, [cur]).length; 4798} 4799if (matches[sel]) { 4800matches.push(handleObj); 4801} 4802} 4803if (matches.length) { 4804handlerQueue.push({ elem: cur, handlers: matches }); 4805} 4806} 4807} 4808} 4809 4810// Add the remaining (directly-bound) handlers 4811if (delegateCount < handlers.length) { 4812handlerQueue.push({ elem: this, handlers: handlers.slice(delegateCount) }); 4813} 4814 4815return handlerQueue; 4816}, 4817 4818// Includes some event props shared by KeyEvent and MouseEvent 4819props: ("altKey bubbles cancelable ctrlKey currentTarget detail eventPhase " + 4820"metaKey relatedTarget shiftKey target timeStamp view which").split(" "), 4821 4822fixHooks: {}, 4823 4824keyHooks: { 4825props: "char charCode key keyCode".split(" "), 4826filter: function (event, original) { 4827 4828// Add which for key events 4829if (event.which == null) { 4830event.which = original.charCode != null ? original.charCode : original.keyCode; 4831} 4832 4833return event; 4834} 4835}, 4836 4837mouseHooks: { 4838props: ("button buttons clientX clientY offsetX offsetY pageX pageY " + 4839"screenX screenY toElement").split(" "), 4840filter: function (event, original) { 4841var eventDoc, doc, body, 4842button = original.button; 4843 4844// Calculate pageX/Y if missing and clientX/Y available 4845if (event.pageX == null && original.clientX != null) { 4846eventDoc = event.target.ownerDocument || document; 4847doc = eventDoc.documentElement; 4848body = eventDoc.body; 4849 4850event.pageX = original.clientX + 4851(doc && doc.scrollLeft || body && body.scrollLeft || 0) - 4852(doc && doc.clientLeft || body && body.clientLeft || 0); 4853event.pageY = original.clientY + 4854(doc && doc.scrollTop || body && body.scrollTop || 0) - 4855(doc && doc.clientTop || body && body.clientTop || 0); 4856} 4857 4858// Add which for click: 1 === left; 2 === middle; 3 === right 4859// Note: button is not normalized, so don't use it 4860if (!event.which && button !== undefined) { 4861event.which = (button & 1 ? 1 : (button & 2 ? 3 : (button & 4 ? 2 : 0))); 4862} 4863 4864return event; 4865} 4866}, 4867 4868fix: function (event) { 4869if (event[jQuery.expando]) { 4870return event; 4871} 4872 4873// Create a writable copy of the event object and normalize some properties 4874var i, prop, copy, 4875type = event.type, 4876originalEvent = event, 4877fixHook = this.fixHooks[type]; 4878 4879if (!fixHook) { 4880this.fixHooks[type] = fixHook = 4881rmouseEvent.test(type) ? this.mouseHooks : 4882rkeyEvent.test(type) ? this.keyHooks : 4883{}; 4884} 4885copy = fixHook.props ? this.props.concat(fixHook.props) : this.props; 4886 4887event = new jQuery.Event(originalEvent); 4888 4889i = copy.length; 4890while (i--) { 4891prop = copy[i]; 4892event[prop] = originalEvent[prop]; 4893} 4894 4895// Support: Cordova 2.5 (WebKit) (#13255) 4896// All events should have a target; Cordova deviceready doesn't 4897if (!event.target) { 4898event.target = document; 4899} 4900 4901// Support: Safari 6.0+, Chrome<28 4902// Target should not be a text node (#504, #13143) 4903if (event.target.nodeType === 3) { 4904event.target = event.target.parentNode; 4905} 4906 4907return fixHook.filter ? fixHook.filter(event, originalEvent) : event; 4908}, 4909 4910special: { 4911load: { 4912 4913// Prevent triggered image.load events from bubbling to window.load 4914noBubble: true 4915}, 4916focus: { 4917 4918// Fire native event if possible so blur/focus sequence is correct 4919trigger: function () { 4920if (this !== safeActiveElement() && this.focus) { 4921this.focus(); 4922return false; 4923} 4924}, 4925delegateType: "focusin" 4926}, 4927blur: { 4928trigger: function () { 4929if (this === safeActiveElement() && this.blur) { 4930this.blur(); 4931return false; 4932} 4933}, 4934delegateType: "focusout" 4935}, 4936click: { 4937 4938// For checkbox, fire native event so checked state will be right 4939trigger: function () { 4940if (this.type === "checkbox" && this.click && jQuery.nodeName(this, "input")) { 4941this.click(); 4942return false; 4943} 4944}, 4945 4946// For cross-browser consistency, don't fire native .click() on links 4947_default: function (event) { 4948return jQuery.nodeName(event.target, "a"); 4949} 4950}, 4951 4952beforeunload: { 4953postDispatch: function (event) { 4954 4955// Support: Firefox 20+ 4956// Firefox doesn't alert if the returnValue field is not set. 4957if (event.result !== undefined && event.originalEvent) { 4958event.originalEvent.returnValue = event.result; 4959} 4960} 4961} 4962} 4963}; 4964 4965jQuery.removeEvent = function (elem, type, handle) { 4966 4967// This "if" is needed for plain objects 4968if (elem.removeEventListener) { 4969elem.removeEventListener(type, handle); 4970} 4971}; 4972 4973jQuery.Event = function (src, props) { 4974 4975// Allow instantiation without the 'new' keyword 4976if (!(this instanceof jQuery.Event)) { 4977return new jQuery.Event(src, props); 4978} 4979 4980// Event object 4981if (src && src.type) { 4982this.originalEvent = src; 4983this.type = src.type; 4984 4985// Events bubbling up the document may have been marked as prevented 4986// by a handler lower down the tree; reflect the correct value. 4987this.isDefaultPrevented = src.defaultPrevented || 4988src.defaultPrevented === undefined && 4989 4990// Support: Android<4.0 4991src.returnValue === false ? 4992returnTrue : 4993returnFalse; 4994 4995// Event type 4996} else { 4997this.type = src; 4998} 4999 5000// Put explicitly provided properties onto the event object 5001if (props) { 5002jQuery.extend(this, props); 5003} 5004 5005// Create a timestamp if incoming event doesn't have one 5006this.timeStamp = src && src.timeStamp || jQuery.now(); 5007 5008// Mark it as fixed 5009this[jQuery.expando] = true; 5010}; 5011 5012// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding 5013// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html 5014jQuery.Event.prototype = { 5015constructor: jQuery.Event, 5016isDefaultPrevented: returnFalse, 5017isPropagationStopped: returnFalse, 5018isImmediatePropagationStopped: returnFalse, 5019isSimulated: false, 5020 5021preventDefault: function () { 5022var e = this.originalEvent; 5023 5024this.isDefaultPrevented = returnTrue; 5025 5026if (e && !this.isSimulated) { 5027e.preventDefault(); 5028} 5029}, 5030stopPropagation: function () { 5031var e = this.originalEvent; 5032 5033this.isPropagationStopped = returnTrue; 5034 5035if (e && !this.isSimulated) { 5036e.stopPropagation(); 5037} 5038}, 5039stopImmediatePropagation: function () { 5040var e = this.originalEvent; 5041 5042this.isImmediatePropagationStopped = returnTrue; 5043 5044if (e && !this.isSimulated) { 5045e.stopImmediatePropagation(); 5046} 5047 5048this.stopPropagation(); 5049} 5050}; 5051 5052// Create mouseenter/leave events using mouseover/out and event-time checks 5053// so that event delegation works in jQuery. 5054// Do the same for pointerenter/pointerleave and pointerover/pointerout 5055// 5056// Support: Safari 7 only 5057// Safari sends mouseenter too often; see: 5058// https://code.google.com/p/chromium/issues/detail?id=470258 5059// for the description of the bug (it existed in older Chrome versions as well). 5060jQuery.each({ 5061mouseenter: "mouseover", 5062mouseleave: "mouseout", 5063pointerenter: "pointerover", 5064pointerleave: "pointerout" 5065}, function (orig, fix) { 5066jQuery.event.special[orig] = { 5067delegateType: fix, 5068bindType: fix, 5069 5070handle: function (event) { 5071var ret, 5072target = this, 5073related = event.relatedTarget, 5074handleObj = event.handleObj; 5075 5076// For mouseenter/leave call the handler if related is outside the target. 5077// NB: No relatedTarget if the mouse left/entered the browser window 5078if (!related || (related !== target && !jQuery.contains(target, related))) { 5079event.type = handleObj.origType; 5080ret = handleObj.handler.apply(this, arguments); 5081event.type = fix; 5082} 5083return ret; 5084} 5085}; 5086}); 5087 5088jQuery.fn.extend({ 5089on: function (types, selector, data, fn) { 5090return on(this, types, selector, data, fn); 5091}, 5092one: function (types, selector, data, fn) { 5093return on(this, types, selector, data, fn, 1); 5094}, 5095off: function (types, selector, fn) { 5096var handleObj, type; 5097if (types && types.preventDefault && types.handleObj) { 5098 5099// ( event ) dispatched jQuery.Event 5100handleObj = types.handleObj; 5101jQuery(types.delegateTarget).off( 5102handleObj.namespace ? 5103handleObj.origType + "." + handleObj.namespace : 5104handleObj.origType, 5105handleObj.selector, 5106handleObj.handler 5107); 5108return this; 5109} 5110if (typeof types === "object") { 5111 5112// ( types-object [, selector] ) 5113for (type in types) { 5114this.off(type, selector, types[type]); 5115} 5116return this; 5117} 5118if (selector === false || typeof selector === "function") { 5119 5120// ( types [, fn] ) 5121fn = selector; 5122selector = undefined; 5123} 5124if (fn === false) { 5125fn = returnFalse; 5126} 5127return this.each(function () { 5128jQuery.event.remove(this, types, fn, selector); 5129}); 5130} 5131}); 5132 5133 5134var 5135rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi, 5136 5137// Support: IE 10-11, Edge 10240+ 5138// In IE/Edge using regex groups here causes severe slowdowns. 5139// See https://connect.microsoft.com/IE/feedback/details/1736512/ 5140rnoInnerhtml = /<script|<style|<link/i, 5141 5142// checked="checked" or checked 5143rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, 5144rscriptTypeMasked = /^true\/(.*)/, 5145rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g; 5146 5147// Manipulating tables requires a tbody 5148function manipulationTarget(elem, content) { 5149return jQuery.nodeName(elem, "table") && 5150jQuery.nodeName(content.nodeType !== 11 ? content : content.firstChild, "tr") ? 5151 5152elem.getElementsByTagName("tbody")[0] || 5153elem.appendChild(elem.ownerDocument.createElement("tbody")) : 5154elem; 5155} 5156 5157// Replace/restore the type attribute of script elements for safe DOM manipulation 5158function disableScript(elem) { 5159elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type; 5160return elem; 5161} 5162function restoreScript(elem) { 5163var match = rscriptTypeMasked.exec(elem.type); 5164 5165if (match) { 5166elem.type = match[1]; 5167} else { 5168elem.removeAttribute("type"); 5169} 5170 5171return elem; 5172} 5173 5174function cloneCopyEvent(src, dest) { 5175var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; 5176 5177if (dest.nodeType !== 1) { 5178return; 5179} 5180 5181// 1. Copy private data: events, handlers, etc. 5182if (dataPriv.hasData(src)) { 5183pdataOld = dataPriv.access(src); 5184pdataCur = dataPriv.set(dest, pdataOld); 5185events = pdataOld.events; 5186 5187if (events) { 5188delete pdataCur.handle; 5189pdataCur.events = {}; 5190 5191for (type in events) { 5192for (i = 0, l = events[type].length; i < l; i++) { 5193jQuery.event.add(dest, type, events[type][i]); 5194} 5195} 5196} 5197} 5198 5199// 2. Copy user data 5200if (dataUser.hasData(src)) { 5201udataOld = dataUser.access(src); 5202udataCur = jQuery.extend({}, udataOld); 5203 5204dataUser.set(dest, udataCur); 5205} 5206} 5207 5208// Fix IE bugs, see support tests 5209function fixInput(src, dest) { 5210var nodeName = dest.nodeName.toLowerCase(); 5211 5212// Fails to persist the checked state of a cloned checkbox or radio button. 5213if (nodeName === "input" && rcheckableType.test(src.type)) { 5214dest.checked = src.checked; 5215 5216// Fails to return the selected option to the default selected state when cloning options 5217} else if (nodeName === "input" || nodeName === "textarea") { 5218dest.defaultValue = src.defaultValue; 5219} 5220} 5221 5222function domManip(collection, args, callback, ignored) { 5223 5224// Flatten any nested arrays 5225args = concat.apply([], args); 5226 5227var fragment, first, scripts, hasScripts, node, doc, 5228i = 0, 5229l = collection.length, 5230iNoClone = l - 1, 5231value = args[0], 5232isFunction = jQuery.isFunction(value); 5233 5234// We can't cloneNode fragments that contain checked, in WebKit 5235if (isFunction || 5236(l > 1 && typeof value === "string" && 5237!support.checkClone && rchecked.test(value))) { 5238return collection.each(function (index) { 5239var self = collection.eq(index); 5240if (isFunction) { 5241args[0] = value.call(this, index, self.html()); 5242} 5243domManip(self, args, callback, ignored); 5244}); 5245} 5246 5247if (l) { 5248fragment = buildFragment(args, collection[0].ownerDocument, false, collection, ignored); 5249first = fragment.firstChild; 5250 5251if (fragment.childNodes.length === 1) { 5252fragment = first; 5253} 5254 5255// Require either new content or an interest in ignored elements to invoke the callback 5256if (first || ignored) { 5257scripts = jQuery.map(getAll(fragment, "script"), disableScript); 5258hasScripts = scripts.length; 5259 5260// Use the original fragment for the last item 5261// instead of the first because it can end up 5262// being emptied incorrectly in certain situations (#8070). 5263for (; i < l; i++) { 5264node = fragment; 5265 5266if (i !== iNoClone) { 5267node = jQuery.clone(node, true, true); 5268 5269// Keep references to cloned scripts for later restoration 5270if (hasScripts) { 5271 5272// Support: Android<4.1, PhantomJS<2 5273// push.apply(_, arraylike) throws on ancient WebKit 5274jQuery.merge(scripts, getAll(node, "script")); 5275} 5276} 5277 5278callback.call(collection[i], node, i); 5279} 5280 5281if (hasScripts) { 5282doc = scripts[scripts.length - 1].ownerDocument; 5283 5284// Reenable scripts 5285jQuery.map(scripts, restoreScript); 5286 5287// Evaluate executable scripts on first document insertion 5288for (i = 0; i < hasScripts; i++) { 5289node = scripts[i]; 5290if (rscriptType.test(node.type || "") && 5291!dataPriv.access(node, "globalEval") && 5292jQuery.contains(doc, node)) { 5293 5294if (node.src) { 5295 5296// Optional AJAX dependency, but won't run scripts if not present 5297if (jQuery._evalUrl) { 5298jQuery._evalUrl(node.src); 5299} 5300} else { 5301jQuery.globalEval(node.textContent.replace(rcleanScript, "")); 5302} 5303} 5304} 5305} 5306} 5307} 5308 5309return collection; 5310} 5311 5312function remove(elem, selector, keepData) { 5313var node, 5314nodes = selector ? jQuery.filter(selector, elem) : elem, 5315i = 0; 5316 5317for (; (node = nodes[i]) != null; i++) { 5318if (!keepData && node.nodeType === 1) { 5319jQuery.cleanData(getAll(node));
vendor: 4,454 bytes, lines 5320-5512
5320} 5321 5322if (node.parentNode) { 5323if (keepData && jQuery.contains(node.ownerDocument, node)) { 5324setGlobalEval(getAll(node, "script")); 5325} 5326node.parentNode.removeChild(node); 5327} 5328} 5329 5330return elem; 5331} 5332 5333jQuery.extend({ 5334htmlPrefilter: function (html) { 5335return html.replace(rxhtmlTag, "<$1></$2>"); 5336}, 5337 5338clone: function (elem, dataAndEvents, deepDataAndEvents) { 5339var i, l, srcElements, destElements, 5340clone = elem.cloneNode(true), 5341inPage = jQuery.contains(elem.ownerDocument, elem); 5342 5343// Fix IE cloning issues 5344if (!support.noCloneChecked && (elem.nodeType === 1 || elem.nodeType === 11) && 5345!jQuery.isXMLDoc(elem)) { 5346 5347// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 5348destElements = getAll(clone); 5349srcElements = getAll(elem); 5350 5351for (i = 0, l = srcElements.length; i < l; i++) { 5352fixInput(srcElements[i], destElements[i]); 5353} 5354} 5355 5356// Copy the events from the original to the clone 5357if (dataAndEvents) { 5358if (deepDataAndEvents) { 5359srcElements = srcElements || getAll(elem); 5360destElements = destElements || getAll(clone); 5361 5362for (i = 0, l = srcElements.length; i < l; i++) { 5363cloneCopyEvent(srcElements[i], destElements[i]); 5364} 5365} else { 5366cloneCopyEvent(elem, clone); 5367} 5368} 5369 5370// Preserve script evaluation history 5371destElements = getAll(clone, "script"); 5372if (destElements.length > 0) { 5373setGlobalEval(destElements, !inPage && getAll(elem, "script")); 5374} 5375 5376// Return the cloned set 5377return clone; 5378}, 5379 5380cleanData: function (elems) { 5381var data, elem, type, 5382special = jQuery.event.special, 5383i = 0; 5384 5385for (; (elem = elems[i]) !== undefined; i++) { 5386if (acceptData(elem)) { 5387if ((data = elem[dataPriv.expando])) { 5388if (data.events) { 5389for (type in data.events) { 5390if (special[type]) { 5391jQuery.event.remove(elem, type); 5392 5393// This is a shortcut to avoid jQuery.event.remove's overhead 5394} else { 5395jQuery.removeEvent(elem, type, data.handle); 5396} 5397} 5398} 5399 5400// Support: Chrome <= 35-45+ 5401// Assign undefined instead of using delete, see Data#remove 5402elem[dataPriv.expando] = undefined; 5403} 5404if (elem[dataUser.expando]) { 5405 5406// Support: Chrome <= 35-45+ 5407// Assign undefined instead of using delete, see Data#remove 5408elem[dataUser.expando] = undefined; 5409} 5410} 5411} 5412} 5413}); 5414 5415jQuery.fn.extend({ 5416 5417// Keep domManip exposed until 3.0 (gh-2225) 5418domManip: domManip, 5419 5420detach: function (selector) { 5421return remove(this, selector, true); 5422}, 5423 5424remove: function (selector) { 5425return remove(this, selector); 5426}, 5427 5428text: function (value) { 5429return access(this, function (value) { 5430return value === undefined ? 5431jQuery.text(this) : 5432this.empty().each(function () { 5433if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) { 5434this.textContent = value; 5435} 5436}); 5437}, null, value, arguments.length); 5438}, 5439 5440append: function () { 5441return domManip(this, arguments, function (elem) { 5442if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) { 5443var target = manipulationTarget(this, elem); 5444target.appendChild(elem); 5445} 5446}); 5447}, 5448 5449prepend: function () { 5450return domManip(this, arguments, function (elem) { 5451if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) { 5452var target = manipulationTarget(this, elem); 5453target.insertBefore(elem, target.firstChild); 5454} 5455}); 5456}, 5457 5458before: function () { 5459return domManip(this, arguments, function (elem) { 5460if (this.parentNode) { 5461this.parentNode.insertBefore(elem, this); 5462} 5463}); 5464}, 5465 5466after: function () { 5467return domManip(this, arguments, function (elem) { 5468if (this.parentNode) { 5469this.parentNode.insertBefore(elem, this.nextSibling); 5470} 5471}); 5472}, 5473 5474empty: function () { 5475var elem, 5476i = 0; 5477 5478for (; (elem = this[i]) != null; i++) { 5479if (elem.nodeType === 1) { 5480 5481// Prevent memory leaks 5482jQuery.cleanData(getAll(elem, false)); 5483 5484// Remove any remaining nodes 5485elem.textContent = ""; 5486} 5487} 5488 5489return this; 5490}, 5491 5492clone: function (dataAndEvents, deepDataAndEvents) { 5493dataAndEvents = dataAndEvents == null ? false : dataAndEvents; 5494deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; 5495 5496return this.map(function () { 5497return jQuery.clone(this, dataAndEvents, deepDataAndEvents); 5498}); 5499}, 5500 5501html: function (value) { 5502return access(this, function (value) { 5503var elem = this[0] || {}, 5504i = 0, 5505l = this.length; 5506 5507if (value === undefined && elem.nodeType === 1) { 5508return elem.innerHTML; 5509} 5510 5511// See if we can take a shortcut and just use innerHTML 5512if (typeof value === "string" && !rnoInnerhtml.test(value) &&
vendor: 25,568 bytes, lines 5513-6529
5513!wrapMap[(rtagName.exec(value) || ["", ""])[1].toLowerCase()]) { 5514 5515value = jQuery.htmlPrefilter(value); 5516 5517try { 5518for (; i < l; i++) { 5519elem = this[i] || {}; 5520 5521// Remove element nodes and prevent memory leaks 5522if (elem.nodeType === 1) { 5523jQuery.cleanData(getAll(elem, false)); 5524elem.innerHTML = value; 5525} 5526} 5527 5528elem = 0; 5529 5530// If using innerHTML throws an exception, use the fallback method 5531} catch (e) { } 5532} 5533 5534if (elem) { 5535this.empty().append(value); 5536} 5537}, null, value, arguments.length); 5538}, 5539 5540replaceWith: function () { 5541var ignored = []; 5542 5543// Make the changes, replacing each non-ignored context element with the new content 5544return domManip(this, arguments, function (elem) { 5545var parent = this.parentNode; 5546 5547if (jQuery.inArray(this, ignored) < 0) { 5548jQuery.cleanData(getAll(this)); 5549if (parent) { 5550parent.replaceChild(elem, this); 5551} 5552} 5553 5554// Force callback invocation 5555}, ignored); 5556} 5557}); 5558 5559jQuery.each({ 5560appendTo: "append", 5561prependTo: "prepend", 5562insertBefore: "before", 5563insertAfter: "after", 5564replaceAll: "replaceWith" 5565}, function (name, original) { 5566jQuery.fn[name] = function (selector) { 5567var elems, 5568ret = [], 5569insert = jQuery(selector), 5570last = insert.length - 1, 5571i = 0; 5572 5573for (; i <= last; i++) { 5574elems = i === last ? this : this.clone(true); 5575jQuery(insert[i])[original](elems); 5576 5577// Support: QtWebKit 5578// .get() because push.apply(_, arraylike) throws 5579push.apply(ret, elems.get()); 5580} 5581 5582return this.pushStack(ret); 5583}; 5584}); 5585 5586 5587var iframe, 5588elemdisplay = { 5589 5590// Support: Firefox 5591// We have to pre-define these values for FF (#10227) 5592HTML: "block", 5593BODY: "block" 5594}; 5595 5596/** 5597 * Retrieve the actual display of a element 5598 * @param {String} name nodeName of the element 5599 * @param {Object} doc Document object 5600 */ 5601 5602// Called only from within defaultDisplay 5603function actualDisplay(name, doc) { 5604var elem = jQuery(doc.createElement(name)).appendTo(doc.body), 5605 5606display = jQuery.css(elem[0], "display"); 5607 5608// We don't have any data stored on the element, 5609// so use "detach" method as fast way to get rid of the element 5610elem.detach(); 5611 5612return display; 5613} 5614 5615/** 5616 * Try to determine the default display value of an element 5617 * @param {String} nodeName 5618 */ 5619function defaultDisplay(nodeName) { 5620var doc = document, 5621display = elemdisplay[nodeName]; 5622 5623if (!display) { 5624display = actualDisplay(nodeName, doc); 5625 5626// If the simple way fails, read from inside an iframe 5627if (display === "none" || !display) { 5628 5629// Use the already-created iframe if possible 5630iframe = (iframe || jQuery("<iframe frameborder='0' width='0' height='0'/>")) 5631.appendTo(doc.documentElement); 5632 5633// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse 5634doc = iframe[0].contentDocument; 5635 5636// Support: IE 5637doc.write(); 5638doc.close(); 5639 5640display = actualDisplay(nodeName, doc); 5641iframe.detach(); 5642} 5643 5644// Store the correct default display 5645elemdisplay[nodeName] = display; 5646} 5647 5648return display; 5649} 5650var rmargin = (/^margin/); 5651 5652var rnumnonpx = new RegExp("^(" + pnum + ")(?!px)[a-z%]+$", "i"); 5653 5654var getStyles = function (elem) { 5655 5656// Support: IE<=11+, Firefox<=30+ (#15098, #14150) 5657// IE throws on elements created in popups 5658// FF meanwhile throws on frame elements through "defaultView.getComputedStyle" 5659var view = elem.ownerDocument.defaultView; 5660 5661if (!view || !view.opener) { 5662view = window; 5663} 5664 5665return view.getComputedStyle(elem); 5666}; 5667 5668var swap = function (elem, options, callback, args) { 5669var ret, name, 5670old = {}; 5671 5672// Remember the old values, and insert the new ones 5673for (name in options) { 5674old[name] = elem.style[name]; 5675elem.style[name] = options[name]; 5676} 5677 5678ret = callback.apply(elem, args || []); 5679 5680// Revert the old values 5681for (name in options) { 5682elem.style[name] = old[name]; 5683} 5684 5685return ret; 5686}; 5687 5688 5689var documentElement = document.documentElement; 5690 5691 5692 5693(function () { 5694var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal, 5695container = document.createElement("div"), 5696div = document.createElement("div"); 5697 5698// Finish early in limited (non-browser) environments 5699if (!div.style) { 5700return; 5701} 5702 5703// Support: IE9-11+ 5704// Style of cloned element affects source element cloned (#8908) 5705div.style.backgroundClip = "content-box"; 5706div.cloneNode(true).style.backgroundClip = ""; 5707support.clearCloneStyle = div.style.backgroundClip === "content-box"; 5708 5709container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" + 5710"padding:0;margin-top:1px;position:absolute"; 5711container.appendChild(div); 5712 5713// Executing both pixelPosition & boxSizingReliable tests require only one layout 5714// so they're executed at the same time to save the second computation. 5715function computeStyleTests() { 5716div.style.cssText = 5717 5718// Support: Firefox<29, Android 2.3 5719// Vendor-prefix box-sizing 5720"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;" + 5721"position:relative;display:block;" + 5722"margin:auto;border:1px;padding:1px;" + 5723"top:1%;width:50%"; 5724div.innerHTML = ""; 5725documentElement.appendChild(container); 5726 5727var divStyle = window.getComputedStyle(div); 5728pixelPositionVal = divStyle.top !== "1%"; 5729reliableMarginLeftVal = divStyle.marginLeft === "2px"; 5730boxSizingReliableVal = divStyle.width === "4px"; 5731 5732// Support: Android 4.0 - 4.3 only 5733// Some styles come back with percentage values, even though they shouldn't 5734div.style.marginRight = "50%"; 5735pixelMarginRightVal = divStyle.marginRight === "4px"; 5736 5737documentElement.removeChild(container); 5738} 5739 5740jQuery.extend(support, { 5741pixelPosition: function () { 5742 5743// This test is executed only once but we still do memoizing 5744// since we can use the boxSizingReliable pre-computing. 5745// No need to check if the test was already performed, though. 5746computeStyleTests(); 5747return pixelPositionVal; 5748}, 5749boxSizingReliable: function () { 5750if (boxSizingReliableVal == null) { 5751computeStyleTests(); 5752} 5753return boxSizingReliableVal; 5754}, 5755pixelMarginRight: function () { 5756 5757// Support: Android 4.0-4.3 5758// We're checking for boxSizingReliableVal here instead of pixelMarginRightVal 5759// since that compresses better and they're computed together anyway. 5760if (boxSizingReliableVal == null) { 5761computeStyleTests(); 5762} 5763return pixelMarginRightVal; 5764}, 5765reliableMarginLeft: function () { 5766 5767// Support: IE <=8 only, Android 4.0 - 4.3 only, Firefox <=3 - 37 5768if (boxSizingReliableVal == null) { 5769computeStyleTests(); 5770} 5771return reliableMarginLeftVal; 5772}, 5773reliableMarginRight: function () { 5774 5775// Support: Android 2.3 5776// Check if div with explicit width and no margin-right incorrectly 5777// gets computed margin-right based on width of container. (#3333) 5778// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right 5779// This support function is only executed once so no memoizing is needed. 5780var ret, 5781marginDiv = div.appendChild(document.createElement("div")); 5782 5783// Reset CSS: box-sizing; display; margin; border; padding 5784marginDiv.style.cssText = div.style.cssText = 5785 5786// Support: Android 2.3 5787// Vendor-prefix box-sizing 5788"-webkit-box-sizing:content-box;box-sizing:content-box;" + 5789"display:block;margin:0;border:0;padding:0"; 5790marginDiv.style.marginRight = marginDiv.style.width = "0"; 5791div.style.width = "1px"; 5792documentElement.appendChild(container); 5793 5794ret = !parseFloat(window.getComputedStyle(marginDiv).marginRight); 5795 5796documentElement.removeChild(container); 5797div.removeChild(marginDiv); 5798 5799return ret; 5800} 5801}); 5802})(); 5803 5804 5805function curCSS(elem, name, computed) { 5806var width, minWidth, maxWidth, ret, 5807style = elem.style; 5808 5809computed = computed || getStyles(elem); 5810ret = computed ? computed.getPropertyValue(name) || computed[name] : undefined; 5811 5812// Support: Opera 12.1x only 5813// Fall back to style even without computed 5814// computed is undefined for elems on document fragments 5815if ((ret === "" || ret === undefined) && !jQuery.contains(elem.ownerDocument, elem)) { 5816ret = jQuery.style(elem, name); 5817} 5818 5819// Support: IE9 5820// getPropertyValue is only needed for .css('filter') (#12537) 5821if (computed) { 5822 5823// A tribute to the "awesome hack by Dean Edwards" 5824// Android Browser returns percentage for some values, 5825// but width seems to be reliably pixels. 5826// This is against the CSSOM draft spec: 5827// http://dev.w3.org/csswg/cssom/#resolved-values 5828if (!support.pixelMarginRight() && rnumnonpx.test(ret) && rmargin.test(name)) { 5829 5830// Remember the original values 5831width = style.width; 5832minWidth = style.minWidth; 5833maxWidth = style.maxWidth; 5834 5835// Put in the new values to get a computed value out 5836style.minWidth = style.maxWidth = style.width = ret; 5837ret = computed.width; 5838 5839// Revert the changed values 5840style.width = width; 5841style.minWidth = minWidth; 5842style.maxWidth = maxWidth; 5843} 5844} 5845 5846return ret !== undefined ? 5847 5848// Support: IE9-11+ 5849// IE returns zIndex value as an integer. 5850ret + "" : 5851ret; 5852} 5853 5854 5855function addGetHookIf(conditionFn, hookFn) { 5856 5857// Define the hook, we'll check on the first run if it's really needed. 5858return { 5859get: function () { 5860if (conditionFn()) { 5861 5862// Hook not needed (or it's not possible to use it due 5863// to missing dependency), remove it. 5864delete this.get; 5865return; 5866} 5867 5868// Hook needed; redefine it so that the support test is not executed again. 5869return (this.get = hookFn).apply(this, arguments); 5870} 5871}; 5872} 5873 5874 5875var 5876 5877// Swappable if display is none or starts with table 5878// except "table", "table-cell", or "table-caption" 5879// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display 5880rdisplayswap = /^(none|table(?!-c[ea]).+)/, 5881 5882cssShow = { position: "absolute", visibility: "hidden", display: "block" }, 5883cssNormalTransform = { 5884letterSpacing: "0", 5885fontWeight: "400" 5886}, 5887 5888cssPrefixes = ["Webkit", "O", "Moz", "ms"], 5889emptyStyle = document.createElement("div").style; 5890 5891// Return a css property mapped to a potentially vendor prefixed property 5892function vendorPropName(name) { 5893 5894// Shortcut for names that are not vendor prefixed 5895if (name in emptyStyle) { 5896return name; 5897} 5898 5899// Check for vendor prefixed names 5900var capName = name[0].toUpperCase() + name.slice(1), 5901i = cssPrefixes.length; 5902 5903while (i--) { 5904name = cssPrefixes[i] + capName; 5905if (name in emptyStyle) { 5906return name; 5907} 5908} 5909} 5910 5911function setPositiveNumber(elem, value, subtract) { 5912 5913// Any relative (+/-) values have already been 5914// normalized at this point 5915var matches = rcssNum.exec(value); 5916return matches ? 5917 5918// Guard against undefined "subtract", e.g., when used as in cssHooks 5919Math.max(0, matches[2] - (subtract || 0)) + (matches[3] || "px") : 5920value; 5921} 5922 5923function augmentWidthOrHeight(elem, name, extra, isBorderBox, styles) { 5924var i = extra === (isBorderBox ? "border" : "content") ? 5925 5926// If we already have the right measurement, avoid augmentation 59274 : 5928 5929// Otherwise initialize for horizontal or vertical properties 5930name === "width" ? 1 : 0, 5931 5932val = 0; 5933 5934for (; i < 4; i += 2) { 5935 5936// Both box models exclude margin, so add it if we want it 5937if (extra === "margin") { 5938val += jQuery.css(elem, extra + cssExpand[i], true, styles); 5939} 5940 5941if (isBorderBox) { 5942 5943// border-box includes padding, so remove it if we want content 5944if (extra === "content") { 5945val -= jQuery.css(elem, "padding" + cssExpand[i], true, styles); 5946} 5947 5948// At this point, extra isn't border nor margin, so remove border 5949if (extra !== "margin") { 5950val -= jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles); 5951} 5952} else { 5953 5954// At this point, extra isn't content, so add padding 5955val += jQuery.css(elem, "padding" + cssExpand[i], true, styles); 5956 5957// At this point, extra isn't content nor padding, so add border 5958if (extra !== "padding") { 5959val += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles); 5960} 5961} 5962} 5963 5964return val; 5965} 5966 5967function getWidthOrHeight(elem, name, extra) { 5968 5969// Start with offset property, which is equivalent to the border-box value 5970var valueIsBorderBox = true, 5971val = name === "width" ? elem.offsetWidth : elem.offsetHeight, 5972styles = getStyles(elem), 5973isBorderBox = jQuery.css(elem, "boxSizing", false, styles) === "border-box"; 5974 5975// Some non-html elements return undefined for offsetWidth, so check for null/undefined 5976// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 5977// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 5978if (val <= 0 || val == null) { 5979 5980// Fall back to computed then uncomputed css if necessary 5981val = curCSS(elem, name, styles); 5982if (val < 0 || val == null) { 5983val = elem.style[name]; 5984} 5985 5986// Computed unit is not pixels. Stop here and return. 5987if (rnumnonpx.test(val)) { 5988return val; 5989} 5990 5991// Check for style in case a browser which returns unreliable values 5992// for getComputedStyle silently falls back to the reliable elem.style 5993valueIsBorderBox = isBorderBox && 5994(support.boxSizingReliable() || val === elem.style[name]); 5995 5996// Normalize "", auto, and prepare for extra 5997val = parseFloat(val) || 0; 5998} 5999 6000// Use the active box-sizing model to add/subtract irrelevant styles 6001return (val + 6002augmentWidthOrHeight( 6003elem, 6004name, 6005extra || (isBorderBox ? "border" : "content"), 6006valueIsBorderBox, 6007styles 6008) 6009) + "px"; 6010} 6011 6012function showHide(elements, show) { 6013var display, elem, hidden, 6014values = [], 6015index = 0, 6016length = elements.length; 6017 6018for (; index < length; index++) { 6019elem = elements[index]; 6020if (!elem.style) { 6021continue; 6022} 6023 6024values[index] = dataPriv.get(elem, "olddisplay"); 6025display = elem.style.display; 6026if (show) { 6027 6028// Reset the inline display of this element to learn if it is 6029// being hidden by cascaded rules or not 6030if (!values[index] && display === "none") { 6031elem.style.display = ""; 6032} 6033 6034// Set elements which have been overridden with display: none 6035// in a stylesheet to whatever the default browser style is 6036// for such an element 6037if (elem.style.display === "" && isHidden(elem)) { 6038values[index] = dataPriv.access( 6039elem, 6040"olddisplay", 6041defaultDisplay(elem.nodeName) 6042); 6043} 6044} else { 6045hidden = isHidden(elem); 6046 6047if (display !== "none" || !hidden) { 6048dataPriv.set( 6049elem, 6050"olddisplay", 6051hidden ? display : jQuery.css(elem, "display") 6052); 6053} 6054} 6055} 6056 6057// Set the display of most of the elements in a second loop 6058// to avoid the constant reflow 6059for (index = 0; index < length; index++) { 6060elem = elements[index]; 6061if (!elem.style) { 6062continue; 6063} 6064if (!show || elem.style.display === "none" || elem.style.display === "") { 6065elem.style.display = show ? values[index] || "" : "none"; 6066} 6067} 6068 6069return elements; 6070} 6071 6072jQuery.extend({ 6073 6074// Add in style property hooks for overriding the default 6075// behavior of getting and setting a style property 6076cssHooks: { 6077opacity: { 6078get: function (elem, computed) { 6079if (computed) { 6080 6081// We should always get a number back from opacity 6082var ret = curCSS(elem, "opacity"); 6083return ret === "" ? "1" : ret; 6084} 6085} 6086} 6087}, 6088 6089// Don't automatically add "px" to these possibly-unitless properties 6090cssNumber: { 6091"animationIterationCount": true, 6092"columnCount": true, 6093"fillOpacity": true, 6094"flexGrow": true, 6095"flexShrink": true, 6096"fontWeight": true, 6097"lineHeight": true, 6098"opacity": true, 6099"order": true, 6100"orphans": true, 6101"widows": true, 6102"zIndex": true, 6103"zoom": true 6104}, 6105 6106// Add in properties whose names you wish to fix before 6107// setting or getting the value 6108cssProps: { 6109"float": "cssFloat" 6110}, 6111 6112// Get and set the style property on a DOM Node 6113style: function (elem, name, value, extra) { 6114 6115// Don't set styles on text and comment nodes 6116if (!elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style) { 6117return; 6118} 6119 6120// Make sure that we're working with the right name 6121var ret, type, hooks, 6122origName = jQuery.camelCase(name), 6123style = elem.style; 6124 6125name = jQuery.cssProps[origName] || 6126(jQuery.cssProps[origName] = vendorPropName(origName) || origName); 6127 6128// Gets hook for the prefixed version, then unprefixed version 6129hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName]; 6130 6131// Check if we're setting a value 6132if (value !== undefined) { 6133type = typeof value; 6134 6135// Convert "+=" or "-=" to relative numbers (#7345) 6136if (type === "string" && (ret = rcssNum.exec(value)) && ret[1]) { 6137value = adjustCSS(elem, name, ret); 6138 6139// Fixes bug #9237 6140type = "number"; 6141} 6142 6143// Make sure that null and NaN values aren't set (#7116) 6144if (value == null || value !== value) { 6145return; 6146} 6147 6148// If a number was passed in, add the unit (except for certain CSS properties) 6149if (type === "number") { 6150value += ret && ret[3] || (jQuery.cssNumber[origName] ? "" : "px"); 6151} 6152 6153// Support: IE9-11+ 6154// background-* props affect original clone's values 6155if (!support.clearCloneStyle && value === "" && name.indexOf("background") === 0) { 6156style[name] = "inherit"; 6157} 6158 6159// If a hook was provided, use that value, otherwise just set the specified value 6160if (!hooks || !("set" in hooks) || 6161(value = hooks.set(elem, value, extra)) !== undefined) { 6162 6163style[name] = value; 6164} 6165 6166} else { 6167 6168// If a hook was provided get the non-computed value from there 6169if (hooks && "get" in hooks && 6170(ret = hooks.get(elem, false, extra)) !== undefined) { 6171 6172return ret; 6173} 6174 6175// Otherwise just get the value from the style object 6176return style[name]; 6177} 6178}, 6179 6180css: function (elem, name, extra, styles) { 6181var val, num, hooks, 6182origName = jQuery.camelCase(name); 6183 6184// Make sure that we're working with the right name 6185name = jQuery.cssProps[origName] || 6186(jQuery.cssProps[origName] = vendorPropName(origName) || origName); 6187 6188// Try prefixed name followed by the unprefixed name 6189hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName]; 6190 6191// If a hook was provided get the computed value from there 6192if (hooks && "get" in hooks) { 6193val = hooks.get(elem, true, extra); 6194} 6195 6196// Otherwise, if a way to get the computed value exists, use that 6197if (val === undefined) { 6198val = curCSS(elem, name, styles); 6199} 6200 6201// Convert "normal" to computed value 6202if (val === "normal" && name in cssNormalTransform) { 6203val = cssNormalTransform[name]; 6204} 6205 6206// Make numeric if forced or a qualifier was provided and val looks numeric 6207if (extra === "" || extra) { 6208num = parseFloat(val); 6209return extra === true || isFinite(num) ? num || 0 : val; 6210} 6211return val; 6212} 6213}); 6214 6215jQuery.each(["height", "width"], function (i, name) { 6216jQuery.cssHooks[name] = { 6217get: function (elem, computed, extra) { 6218if (computed) { 6219 6220// Certain elements can have dimension info if we invisibly show them 6221// but it must have a current display style that would benefit 6222return rdisplayswap.test(jQuery.css(elem, "display")) && 6223elem.offsetWidth === 0 ? 6224swap(elem, cssShow, function () { 6225return getWidthOrHeight(elem, name, extra); 6226}) : 6227getWidthOrHeight(elem, name, extra); 6228} 6229}, 6230 6231set: function (elem, value, extra) { 6232var matches, 6233styles = extra && getStyles(elem), 6234subtract = extra && augmentWidthOrHeight( 6235elem, 6236name, 6237extra, 6238jQuery.css(elem, "boxSizing", false, styles) === "border-box", 6239styles 6240); 6241 6242// Convert to pixels if value adjustment is needed 6243if (subtract && (matches = rcssNum.exec(value)) && 6244(matches[3] || "px") !== "px") { 6245 6246elem.style[name] = value; 6247value = jQuery.css(elem, name); 6248} 6249 6250return setPositiveNumber(elem, value, subtract); 6251} 6252}; 6253}); 6254 6255jQuery.cssHooks.marginLeft = addGetHookIf(support.reliableMarginLeft, 6256function (elem, computed) { 6257if (computed) { 6258return (parseFloat(curCSS(elem, "marginLeft")) || 6259elem.getBoundingClientRect().left - 6260swap(elem, { marginLeft: 0 }, function () { 6261return elem.getBoundingClientRect().left; 6262}) 6263) + "px"; 6264} 6265} 6266); 6267 6268// Support: Android 2.3 6269jQuery.cssHooks.marginRight = addGetHookIf(support.reliableMarginRight, 6270function (elem, computed) { 6271if (computed) { 6272return swap(elem, { "display": "inline-block" }, 6273curCSS, [elem, "marginRight"]); 6274} 6275} 6276); 6277 6278// These hooks are used by animate to expand properties 6279jQuery.each({ 6280margin: "", 6281padding: "", 6282border: "Width" 6283}, function (prefix, suffix) { 6284jQuery.cssHooks[prefix + suffix] = { 6285expand: function (value) { 6286var i = 0, 6287expanded = {}, 6288 6289// Assumes a single number if not a string 6290parts = typeof value === "string" ? value.split(" ") : [value]; 6291 6292for (; i < 4; i++) { 6293expanded[prefix + cssExpand[i] + suffix] = 6294parts[i] || parts[i - 2] || parts[0]; 6295} 6296 6297return expanded; 6298} 6299}; 6300 6301if (!rmargin.test(prefix)) { 6302jQuery.cssHooks[prefix + suffix].set = setPositiveNumber; 6303} 6304}); 6305 6306jQuery.fn.extend({ 6307css: function (name, value) { 6308return access(this, function (elem, name, value) { 6309var styles, len, 6310map = {}, 6311i = 0; 6312 6313if (jQuery.isArray(name)) { 6314styles = getStyles(elem); 6315len = name.length; 6316 6317for (; i < len; i++) { 6318map[name[i]] = jQuery.css(elem, name[i], false, styles); 6319} 6320 6321return map; 6322} 6323 6324return value !== undefined ? 6325jQuery.style(elem, name, value) : 6326jQuery.css(elem, name); 6327}, name, value, arguments.length > 1); 6328}, 6329show: function () { 6330return showHide(this, true); 6331}, 6332hide: function () { 6333return showHide(this); 6334}, 6335toggle: function (state) { 6336if (typeof state === "boolean") { 6337return state ? this.show() : this.hide(); 6338} 6339 6340return this.each(function () { 6341if (isHidden(this)) { 6342jQuery(this).show(); 6343} else { 6344jQuery(this).hide(); 6345} 6346}); 6347} 6348}); 6349 6350 6351function Tween(elem, options, prop, end, easing) { 6352return new Tween.prototype.init(elem, options, prop, end, easing); 6353} 6354jQuery.Tween = Tween; 6355 6356Tween.prototype = { 6357constructor: Tween, 6358init: function (elem, options, prop, end, easing, unit) { 6359this.elem = elem; 6360this.prop = prop; 6361this.easing = easing || jQuery.easing._default; 6362this.options = options; 6363this.start = this.now = this.cur(); 6364this.end = end; 6365this.unit = unit || (jQuery.cssNumber[prop] ? "" : "px"); 6366}, 6367cur: function () { 6368var hooks = Tween.propHooks[this.prop]; 6369 6370return hooks && hooks.get ? 6371hooks.get(this) : 6372Tween.propHooks._default.get(this); 6373}, 6374run: function (percent) { 6375var eased, 6376hooks = Tween.propHooks[this.prop]; 6377 6378if (this.options.duration) { 6379this.pos = eased = jQuery.easing[this.easing]( 6380percent, this.options.duration * percent, 0, 1, this.options.duration 6381); 6382} else { 6383this.pos = eased = percent; 6384} 6385this.now = (this.end - this.start) * eased + this.start; 6386 6387if (this.options.step) { 6388this.options.step.call(this.elem, this.now, this); 6389} 6390 6391if (hooks && hooks.set) { 6392hooks.set(this); 6393} else { 6394Tween.propHooks._default.set(this); 6395} 6396return this; 6397} 6398}; 6399 6400Tween.prototype.init.prototype = Tween.prototype; 6401 6402Tween.propHooks = { 6403_default: { 6404get: function (tween) { 6405var result; 6406 6407// Use a property on the element directly when it is not a DOM element, 6408// or when there is no matching style property that exists. 6409if (tween.elem.nodeType !== 1 || 6410tween.elem[tween.prop] != null && tween.elem.style[tween.prop] == null) { 6411return tween.elem[tween.prop]; 6412} 6413 6414// Passing an empty string as a 3rd parameter to .css will automatically 6415// attempt a parseFloat and fallback to a string if the parse fails. 6416// Simple values such as "10px" are parsed to Float; 6417// complex values such as "rotate(1rad)" are returned as-is. 6418result = jQuery.css(tween.elem, tween.prop, ""); 6419 6420// Empty strings, null, undefined and "auto" are converted to 0. 6421return !result || result === "auto" ? 0 : result; 6422}, 6423set: function (tween) { 6424 6425// Use step hook for back compat. 6426// Use cssHook if its there. 6427// Use .style if available and use plain properties where available. 6428if (jQuery.fx.step[tween.prop]) { 6429jQuery.fx.step[tween.prop](tween); 6430} else if (tween.elem.nodeType === 1 && 6431(tween.elem.style[jQuery.cssProps[tween.prop]] != null || 6432jQuery.cssHooks[tween.prop])) { 6433jQuery.style(tween.elem, tween.prop, tween.now + tween.unit); 6434} else { 6435tween.elem[tween.prop] = tween.now; 6436} 6437} 6438} 6439}; 6440 6441// Support: IE9 6442// Panic based approach to setting things on disconnected nodes 6443Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { 6444set: function (tween) { 6445if (tween.elem.nodeType && tween.elem.parentNode) { 6446tween.elem[tween.prop] = tween.now; 6447} 6448} 6449}; 6450 6451jQuery.easing = { 6452linear: function (p) { 6453return p; 6454}, 6455swing: function (p) { 6456return 0.5 - Math.cos(p * Math.PI) / 2; 6457}, 6458_default: "swing" 6459}; 6460 6461jQuery.fx = Tween.prototype.init; 6462 6463// Back Compat <1.8 extension point 6464jQuery.fx.step = {}; 6465 6466 6467 6468 6469var 6470fxNow, timerId, 6471rfxtypes = /^(?:toggle|show|hide)$/, 6472rrun = /queueHooks$/; 6473 6474// Animations created synchronously will run synchronously 6475function createFxNow() { 6476window.setTimeout(function () { 6477fxNow = undefined; 6478}); 6479return (fxNow = jQuery.now()); 6480} 6481 6482// Generate parameters to create a standard animation 6483function genFx(type, includeWidth) { 6484var which, 6485i = 0, 6486attrs = { height: type }; 6487 6488// If we include width, step value is 1 to do all cssExpand values, 6489// otherwise step value is 2 to skip over Left and Right 6490includeWidth = includeWidth ? 1 : 0; 6491for (; i < 4 ; i += 2 - includeWidth) { 6492which = cssExpand[i]; 6493attrs["margin" + which] = attrs["padding" + which] = type; 6494} 6495 6496if (includeWidth) { 6497attrs.opacity = attrs.width = type; 6498} 6499 6500return attrs; 6501} 6502 6503function createTween(value, prop, animation) { 6504var tween, 6505collection = (Animation.tweeners[prop] || []).concat(Animation.tweeners["*"]), 6506index = 0, 6507length = collection.length; 6508for (; index < length; index++) { 6509if ((tween = collection[index].call(animation, prop, value))) { 6510 6511// We're done with this property 6512return tween; 6513} 6514} 6515} 6516 6517function defaultPrefilter(elem, props, opts) { 6518/* jshint validthis: true */ 6519var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay, 6520anim = this, 6521orig = {}, 6522style = elem.style, 6523hidden = elem.nodeType && isHidden(elem), 6524dataShow = dataPriv.get(elem, "fxshow"); 6525 6526// Handle queue: false promises 6527if (!opts.queue) { 6528hooks = jQuery._queueHooks(elem, "fx"); 6529if (hooks.unqueued == null) {
vendor: 3,223 bytes, lines 6530-6658
6530hooks.unqueued = 0; 6531oldfire = hooks.empty.fire; 6532hooks.empty.fire = function () { 6533if (!hooks.unqueued) { 6534oldfire(); 6535} 6536}; 6537} 6538hooks.unqueued++; 6539 6540anim.always(function () { 6541 6542// Ensure the complete handler is called before this completes 6543anim.always(function () { 6544hooks.unqueued--; 6545if (!jQuery.queue(elem, "fx").length) { 6546hooks.empty.fire(); 6547} 6548}); 6549}); 6550} 6551 6552// Height/width overflow pass 6553if (elem.nodeType === 1 && ("height" in props || "width" in props)) { 6554 6555// Make sure that nothing sneaks out 6556// Record all 3 overflow attributes because IE9-10 do not 6557// change the overflow attribute when overflowX and 6558// overflowY are set to the same value 6559opts.overflow = [style.overflow, style.overflowX, style.overflowY]; 6560 6561// Set display property to inline-block for height/width 6562// animations on inline elements that are having width/height animated 6563display = jQuery.css(elem, "display"); 6564 6565// Test default display if display is currently "none" 6566checkDisplay = display === "none" ? 6567dataPriv.get(elem, "olddisplay") || defaultDisplay(elem.nodeName) : display; 6568 6569if (checkDisplay === "inline" && jQuery.css(elem, "float") === "none") { 6570style.display = "inline-block"; 6571} 6572} 6573 6574if (opts.overflow) { 6575style.overflow = "hidden"; 6576anim.always(function () { 6577style.overflow = opts.overflow[0]; 6578style.overflowX = opts.overflow[1]; 6579style.overflowY = opts.overflow[2]; 6580}); 6581} 6582 6583// show/hide pass 6584for (prop in props) { 6585value = props[prop]; 6586if (rfxtypes.exec(value)) { 6587delete props[prop]; 6588toggle = toggle || value === "toggle"; 6589if (value === (hidden ? "hide" : "show")) { 6590 6591// If there is dataShow left over from a stopped hide or show 6592// and we are going to proceed with show, we should pretend to be hidden 6593if (value === "show" && dataShow && dataShow[prop] !== undefined) { 6594hidden = true; 6595} else { 6596continue; 6597} 6598} 6599orig[prop] = dataShow && dataShow[prop] || jQuery.style(elem, prop); 6600 6601// Any non-fx value stops us from restoring the original display value 6602} else { 6603display = undefined; 6604} 6605} 6606 6607if (!jQuery.isEmptyObject(orig)) { 6608if (dataShow) { 6609if ("hidden" in dataShow) { 6610hidden = dataShow.hidden; 6611} 6612} else { 6613dataShow = dataPriv.access(elem, "fxshow", {}); 6614} 6615 6616// Store state if its toggle - enables .stop().toggle() to "reverse" 6617if (toggle) { 6618dataShow.hidden = !hidden; 6619} 6620if (hidden) { 6621jQuery(elem).show(); 6622} else { 6623anim.done(function () { 6624jQuery(elem).hide(); 6625}); 6626} 6627anim.done(function () { 6628var prop; 6629 6630dataPriv.remove(elem, "fxshow"); 6631for (prop in orig) { 6632jQuery.style(elem, prop, orig[prop]); 6633} 6634}); 6635for (prop in orig) { 6636tween = createTween(hidden ? dataShow[prop] : 0, prop, anim); 6637 6638if (!(prop in dataShow)) { 6639dataShow[prop] = tween.start; 6640if (hidden) { 6641tween.end = tween.start; 6642tween.start = prop === "width" || prop === "height" ? 1 : 0; 6643} 6644} 6645} 6646 6647// If this is a noop like .hide().hide(), restore an overwritten display value 6648} else if ((display === "none" ? defaultDisplay(elem.nodeName) : display) === "inline") { 6649style.display = display; 6650} 6651} 6652 6653function propFilter(props, specialEasing) { 6654var index, name, easing, value, hooks; 6655 6656// camelCase, specialEasing and expand cssHook pass 6657for (index in props) { 6658name = jQuery.camelCase(index);
vendor: 24,186 bytes, lines 6659-7754
6659easing = specialEasing[name]; 6660value = props[index]; 6661if (jQuery.isArray(value)) { 6662easing = value[1]; 6663value = props[index] = value[0]; 6664} 6665 6666if (index !== name) { 6667props[name] = value; 6668delete props[index]; 6669} 6670 6671hooks = jQuery.cssHooks[name]; 6672if (hooks && "expand" in hooks) { 6673value = hooks.expand(value); 6674delete props[name]; 6675 6676// Not quite $.extend, this won't overwrite existing keys. 6677// Reusing 'index' because we have the correct "name" 6678for (index in value) { 6679if (!(index in props)) { 6680props[index] = value[index]; 6681specialEasing[index] = easing; 6682} 6683} 6684} else { 6685specialEasing[name] = easing; 6686} 6687} 6688} 6689 6690function Animation(elem, properties, options) { 6691var result, 6692stopped, 6693index = 0, 6694length = Animation.prefilters.length, 6695deferred = jQuery.Deferred().always(function () { 6696 6697// Don't match elem in the :animated selector 6698delete tick.elem; 6699}), 6700tick = function () { 6701if (stopped) { 6702return false; 6703} 6704var currentTime = fxNow || createFxNow(), 6705remaining = Math.max(0, animation.startTime + animation.duration - currentTime), 6706 6707// Support: Android 2.3 6708// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) 6709temp = remaining / animation.duration || 0, 6710percent = 1 - temp, 6711index = 0, 6712length = animation.tweens.length; 6713 6714for (; index < length ; index++) { 6715animation.tweens[index].run(percent); 6716} 6717 6718deferred.notifyWith(elem, [animation, percent, remaining]); 6719 6720if (percent < 1 && length) { 6721return remaining; 6722} else { 6723deferred.resolveWith(elem, [animation]); 6724return false; 6725} 6726}, 6727animation = deferred.promise({ 6728elem: elem, 6729props: jQuery.extend({}, properties), 6730opts: jQuery.extend(true, { 6731specialEasing: {}, 6732easing: jQuery.easing._default 6733}, options), 6734originalProperties: properties, 6735originalOptions: options, 6736startTime: fxNow || createFxNow(), 6737duration: options.duration, 6738tweens: [], 6739createTween: function (prop, end) { 6740var tween = jQuery.Tween(elem, animation.opts, prop, end, 6741animation.opts.specialEasing[prop] || animation.opts.easing); 6742animation.tweens.push(tween); 6743return tween; 6744}, 6745stop: function (gotoEnd) { 6746var index = 0, 6747 6748// If we are going to the end, we want to run all the tweens 6749// otherwise we skip this part 6750length = gotoEnd ? animation.tweens.length : 0; 6751if (stopped) { 6752return this; 6753} 6754stopped = true; 6755for (; index < length ; index++) { 6756animation.tweens[index].run(1); 6757} 6758 6759// Resolve when we played the last frame; otherwise, reject 6760if (gotoEnd) { 6761deferred.notifyWith(elem, [animation, 1, 0]); 6762deferred.resolveWith(elem, [animation, gotoEnd]); 6763} else { 6764deferred.rejectWith(elem, [animation, gotoEnd]); 6765} 6766return this; 6767} 6768}), 6769props = animation.props; 6770 6771propFilter(props, animation.opts.specialEasing); 6772 6773for (; index < length ; index++) { 6774result = Animation.prefilters[index].call(animation, elem, props, animation.opts); 6775if (result) { 6776if (jQuery.isFunction(result.stop)) { 6777jQuery._queueHooks(animation.elem, animation.opts.queue).stop = 6778jQuery.proxy(result.stop, result); 6779} 6780return result; 6781} 6782} 6783 6784jQuery.map(props, createTween, animation); 6785 6786if (jQuery.isFunction(animation.opts.start)) { 6787animation.opts.start.call(elem, animation); 6788} 6789 6790jQuery.fx.timer( 6791jQuery.extend(tick, { 6792elem: elem, 6793anim: animation, 6794queue: animation.opts.queue 6795}) 6796); 6797 6798// attach callbacks from options 6799return animation.progress(animation.opts.progress) 6800.done(animation.opts.done, animation.opts.complete) 6801.fail(animation.opts.fail) 6802.always(animation.opts.always); 6803} 6804 6805jQuery.Animation = jQuery.extend(Animation, { 6806tweeners: { 6807"*": [function (prop, value) { 6808var tween = this.createTween(prop, value); 6809adjustCSS(tween.elem, prop, rcssNum.exec(value), tween); 6810return tween; 6811}] 6812}, 6813 6814tweener: function (props, callback) { 6815if (jQuery.isFunction(props)) { 6816callback = props; 6817props = ["*"]; 6818} else { 6819props = props.match(rnotwhite); 6820} 6821 6822var prop, 6823index = 0, 6824length = props.length; 6825 6826for (; index < length ; index++) { 6827prop = props[index]; 6828Animation.tweeners[prop] = Animation.tweeners[prop] || []; 6829Animation.tweeners[prop].unshift(callback); 6830} 6831}, 6832 6833prefilters: [defaultPrefilter], 6834 6835prefilter: function (callback, prepend) { 6836if (prepend) { 6837Animation.prefilters.unshift(callback); 6838} else { 6839Animation.prefilters.push(callback); 6840} 6841} 6842}); 6843 6844jQuery.speed = function (speed, easing, fn) { 6845var opt = speed && typeof speed === "object" ? jQuery.extend({}, speed) : { 6846complete: fn || !fn && easing || 6847jQuery.isFunction(speed) && speed, 6848duration: speed, 6849easing: fn && easing || easing && !jQuery.isFunction(easing) && easing 6850}; 6851 6852opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? 6853opt.duration : opt.duration in jQuery.fx.speeds ? 6854jQuery.fx.speeds[opt.duration] : jQuery.fx.speeds._default; 6855 6856// Normalize opt.queue - true/undefined/null -> "fx" 6857if (opt.queue == null || opt.queue === true) { 6858opt.queue = "fx"; 6859} 6860 6861// Queueing 6862opt.old = opt.complete; 6863 6864opt.complete = function () { 6865if (jQuery.isFunction(opt.old)) { 6866opt.old.call(this); 6867} 6868 6869if (opt.queue) { 6870jQuery.dequeue(this, opt.queue); 6871} 6872}; 6873 6874return opt; 6875}; 6876 6877jQuery.fn.extend({ 6878fadeTo: function (speed, to, easing, callback) { 6879 6880// Show any hidden elements after setting opacity to 0 6881return this.filter(isHidden).css("opacity", 0).show() 6882 6883// Animate to the value specified 6884.end().animate({ opacity: to }, speed, easing, callback); 6885}, 6886animate: function (prop, speed, easing, callback) { 6887var empty = jQuery.isEmptyObject(prop), 6888optall = jQuery.speed(speed, easing, callback), 6889doAnimation = function () { 6890 6891// Operate on a copy of prop so per-property easing won't be lost 6892var anim = Animation(this, jQuery.extend({}, prop), optall); 6893 6894// Empty animations, or finishing resolves immediately 6895if (empty || dataPriv.get(this, "finish")) { 6896anim.stop(true); 6897} 6898}; 6899doAnimation.finish = doAnimation; 6900 6901return empty || optall.queue === false ? 6902this.each(doAnimation) : 6903this.queue(optall.queue, doAnimation); 6904}, 6905stop: function (type, clearQueue, gotoEnd) { 6906var stopQueue = function (hooks) { 6907var stop = hooks.stop; 6908delete hooks.stop; 6909stop(gotoEnd); 6910}; 6911 6912if (typeof type !== "string") { 6913gotoEnd = clearQueue; 6914clearQueue = type; 6915type = undefined; 6916} 6917if (clearQueue && type !== false) { 6918this.queue(type || "fx", []); 6919} 6920 6921return this.each(function () { 6922var dequeue = true, 6923index = type != null && type + "queueHooks", 6924timers = jQuery.timers, 6925data = dataPriv.get(this); 6926 6927if (index) { 6928if (data[index] && data[index].stop) { 6929stopQueue(data[index]); 6930} 6931} else { 6932for (index in data) { 6933if (data[index] && data[index].stop && rrun.test(index)) { 6934stopQueue(data[index]); 6935} 6936} 6937} 6938 6939for (index = timers.length; index--;) { 6940if (timers[index].elem === this && 6941(type == null || timers[index].queue === type)) { 6942 6943timers[index].anim.stop(gotoEnd); 6944dequeue = false; 6945timers.splice(index, 1); 6946} 6947} 6948 6949// Start the next in the queue if the last step wasn't forced. 6950// Timers currently will call their complete callbacks, which 6951// will dequeue but only if they were gotoEnd. 6952if (dequeue || !gotoEnd) { 6953jQuery.dequeue(this, type); 6954} 6955}); 6956}, 6957finish: function (type) { 6958if (type !== false) { 6959type = type || "fx"; 6960} 6961return this.each(function () { 6962var index, 6963data = dataPriv.get(this), 6964queue = data[type + "queue"], 6965hooks = data[type + "queueHooks"], 6966timers = jQuery.timers, 6967length = queue ? queue.length : 0; 6968 6969// Enable finishing flag on private data 6970data.finish = true; 6971 6972// Empty the queue first 6973jQuery.queue(this, type, []); 6974 6975if (hooks && hooks.stop) { 6976hooks.stop.call(this, true); 6977} 6978 6979// Look for any active animations, and finish them 6980for (index = timers.length; index--;) { 6981if (timers[index].elem === this && timers[index].queue === type) { 6982timers[index].anim.stop(true); 6983timers.splice(index, 1); 6984} 6985} 6986 6987// Look for any animations in the old queue and finish them 6988for (index = 0; index < length; index++) { 6989if (queue[index] && queue[index].finish) { 6990queue[index].finish.call(this); 6991} 6992} 6993 6994// Turn off finishing flag 6995delete data.finish; 6996}); 6997} 6998}); 6999 7000jQuery.each(["toggle", "show", "hide"], function (i, name) { 7001var cssFn = jQuery.fn[name]; 7002jQuery.fn[name] = function (speed, easing, callback) { 7003return speed == null || typeof speed === "boolean" ? 7004cssFn.apply(this, arguments) : 7005this.animate(genFx(name, true), speed, easing, callback); 7006}; 7007}); 7008 7009// Generate shortcuts for custom animations 7010jQuery.each({ 7011slideDown: genFx("show"), 7012slideUp: genFx("hide"), 7013slideToggle: genFx("toggle"), 7014fadeIn: { opacity: "show" }, 7015fadeOut: { opacity: "hide" }, 7016fadeToggle: { opacity: "toggle" } 7017}, function (name, props) { 7018jQuery.fn[name] = function (speed, easing, callback) { 7019return this.animate(props, speed, easing, callback); 7020}; 7021}); 7022 7023jQuery.timers = []; 7024jQuery.fx.tick = function () { 7025var timer, 7026i = 0, 7027timers = jQuery.timers; 7028 7029fxNow = jQuery.now(); 7030 7031for (; i < timers.length; i++) { 7032timer = timers[i]; 7033 7034// Checks the timer has not already been removed 7035if (!timer() && timers[i] === timer) { 7036timers.splice(i--, 1); 7037} 7038} 7039 7040if (!timers.length) { 7041jQuery.fx.stop(); 7042} 7043fxNow = undefined; 7044}; 7045 7046jQuery.fx.timer = function (timer) { 7047jQuery.timers.push(timer); 7048if (timer()) { 7049jQuery.fx.start(); 7050} else { 7051jQuery.timers.pop(); 7052} 7053}; 7054 7055jQuery.fx.interval = 13; 7056jQuery.fx.start = function () { 7057if (!timerId) { 7058timerId = window.setInterval(jQuery.fx.tick, jQuery.fx.interval); 7059} 7060}; 7061 7062jQuery.fx.stop = function () { 7063window.clearInterval(timerId); 7064 7065timerId = null; 7066}; 7067 7068jQuery.fx.speeds = { 7069slow: 600, 7070fast: 200, 7071 7072// Default speed 7073_default: 400 7074}; 7075 7076 7077// Based off of the plugin by Clint Helfers, with permission. 7078// http://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ 7079jQuery.fn.delay = function (time, type) { 7080time = jQuery.fx ? jQuery.fx.speeds[time] || time : time; 7081type = type || "fx"; 7082 7083return this.queue(type, function (next, hooks) { 7084var timeout = window.setTimeout(next, time); 7085hooks.stop = function () { 7086window.clearTimeout(timeout); 7087}; 7088}); 7089}; 7090 7091 7092(function () { 7093var input = document.createElement("input"), 7094select = document.createElement("select"), 7095opt = select.appendChild(document.createElement("option")); 7096 7097input.type = "checkbox"; 7098 7099// Support: iOS<=5.1, Android<=4.2+ 7100// Default value for a checkbox should be "on" 7101support.checkOn = input.value !== ""; 7102 7103// Support: IE<=11+ 7104// Must access selectedIndex to make default options select 7105support.optSelected = opt.selected; 7106 7107// Support: Android<=2.3 7108// Options inside disabled selects are incorrectly marked as disabled 7109select.disabled = true; 7110support.optDisabled = !opt.disabled; 7111 7112// Support: IE<=11+ 7113// An input loses its value after becoming a radio 7114input = document.createElement("input"); 7115input.value = "t"; 7116input.type = "radio"; 7117support.radioValue = input.value === "t"; 7118})(); 7119 7120 7121var boolHook, 7122attrHandle = jQuery.expr.attrHandle; 7123 7124jQuery.fn.extend({ 7125attr: function (name, value) { 7126return access(this, jQuery.attr, name, value, arguments.length > 1); 7127}, 7128 7129removeAttr: function (name) { 7130return this.each(function () { 7131jQuery.removeAttr(this, name); 7132}); 7133} 7134}); 7135 7136jQuery.extend({ 7137attr: function (elem, name, value) { 7138var ret, hooks, 7139nType = elem.nodeType; 7140 7141// Don't get/set attributes on text, comment and attribute nodes 7142if (nType === 3 || nType === 8 || nType === 2) { 7143return; 7144} 7145 7146// Fallback to prop when attributes are not supported 7147if (typeof elem.getAttribute === "undefined") { 7148return jQuery.prop(elem, name, value); 7149} 7150 7151// All attributes are lowercase 7152// Grab necessary hook if one is defined 7153if (nType !== 1 || !jQuery.isXMLDoc(elem)) { 7154name = name.toLowerCase(); 7155hooks = jQuery.attrHooks[name] || 7156(jQuery.expr.match.bool.test(name) ? boolHook : undefined); 7157} 7158 7159if (value !== undefined) { 7160if (value === null) { 7161jQuery.removeAttr(elem, name); 7162return; 7163} 7164 7165if (hooks && "set" in hooks && 7166(ret = hooks.set(elem, value, name)) !== undefined) { 7167return ret; 7168} 7169 7170elem.setAttribute(name, value + ""); 7171return value; 7172} 7173 7174if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) { 7175return ret; 7176} 7177 7178ret = jQuery.find.attr(elem, name); 7179 7180// Non-existent attributes return null, we normalize to undefined 7181return ret == null ? undefined : ret; 7182}, 7183 7184attrHooks: { 7185type: { 7186set: function (elem, value) { 7187if (!support.radioValue && value === "radio" && 7188jQuery.nodeName(elem, "input")) { 7189var val = elem.value; 7190elem.setAttribute("type", value); 7191if (val) { 7192elem.value = val; 7193} 7194return value; 7195} 7196} 7197} 7198}, 7199 7200removeAttr: function (elem, value) { 7201var name, propName, 7202i = 0, 7203attrNames = value && value.match(rnotwhite); 7204 7205if (attrNames && elem.nodeType === 1) { 7206while ((name = attrNames[i++])) { 7207propName = jQuery.propFix[name] || name; 7208 7209// Boolean attributes get special treatment (#10870) 7210if (jQuery.expr.match.bool.test(name)) { 7211 7212// Set corresponding property to false 7213elem[propName] = false; 7214} 7215 7216elem.removeAttribute(name); 7217} 7218} 7219} 7220}); 7221 7222// Hooks for boolean attributes 7223boolHook = { 7224set: function (elem, value, name) { 7225if (value === false) { 7226 7227// Remove boolean attributes when set to false 7228jQuery.removeAttr(elem, name); 7229} else { 7230elem.setAttribute(name, name); 7231} 7232return name; 7233} 7234}; 7235jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g), function (i, name) { 7236var getter = attrHandle[name] || jQuery.find.attr; 7237 7238attrHandle[name] = function (elem, name, isXML) { 7239var ret, handle; 7240if (!isXML) { 7241 7242// Avoid an infinite loop by temporarily removing this function from the getter 7243handle = attrHandle[name]; 7244attrHandle[name] = ret; 7245ret = getter(elem, name, isXML) != null ? 7246name.toLowerCase() : 7247null; 7248attrHandle[name] = handle; 7249} 7250return ret; 7251}; 7252}); 7253 7254 7255 7256 7257var rfocusable = /^(?:input|select|textarea|button)$/i, 7258rclickable = /^(?:a|area)$/i; 7259 7260jQuery.fn.extend({ 7261prop: function (name, value) { 7262return access(this, jQuery.prop, name, value, arguments.length > 1); 7263}, 7264 7265removeProp: function (name) { 7266return this.each(function () { 7267delete this[jQuery.propFix[name] || name]; 7268}); 7269} 7270}); 7271 7272jQuery.extend({ 7273prop: function (elem, name, value) { 7274var ret, hooks, 7275nType = elem.nodeType; 7276 7277// Don't get/set properties on text, comment and attribute nodes 7278if (nType === 3 || nType === 8 || nType === 2) { 7279return; 7280} 7281 7282if (nType !== 1 || !jQuery.isXMLDoc(elem)) { 7283 7284// Fix name and attach hooks 7285name = jQuery.propFix[name] || name; 7286hooks = jQuery.propHooks[name]; 7287} 7288 7289if (value !== undefined) { 7290if (hooks && "set" in hooks && 7291(ret = hooks.set(elem, value, name)) !== undefined) { 7292return ret; 7293} 7294 7295return (elem[name] = value); 7296} 7297 7298if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) { 7299return ret; 7300} 7301 7302return elem[name]; 7303}, 7304 7305propHooks: { 7306tabIndex: { 7307get: function (elem) { 7308 7309// elem.tabIndex doesn't always return the 7310// correct value when it hasn't been explicitly set 7311// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ 7312// Use proper attribute retrieval(#12072) 7313var tabindex = jQuery.find.attr(elem, "tabindex"); 7314 7315return tabindex ? 7316parseInt(tabindex, 10) : 7317rfocusable.test(elem.nodeName) || 7318rclickable.test(elem.nodeName) && elem.href ? 73190 : 7320-1; 7321} 7322} 7323}, 7324 7325propFix: { 7326"for": "htmlFor", 7327"class": "className" 7328} 7329}); 7330 7331// Support: IE <=11 only 7332// Accessing the selectedIndex property 7333// forces the browser to respect setting selected 7334// on the option 7335// The getter ensures a default option is selected 7336// when in an optgroup 7337if (!support.optSelected) { 7338jQuery.propHooks.selected = { 7339get: function (elem) { 7340var parent = elem.parentNode; 7341if (parent && parent.parentNode) { 7342parent.parentNode.selectedIndex; 7343} 7344return null; 7345}, 7346set: function (elem) { 7347var parent = elem.parentNode; 7348if (parent) { 7349parent.selectedIndex; 7350 7351if (parent.parentNode) { 7352parent.parentNode.selectedIndex; 7353} 7354} 7355} 7356}; 7357} 7358 7359jQuery.each([ 7360"tabIndex", 7361"readOnly", 7362"maxLength", 7363"cellSpacing", 7364"cellPadding", 7365"rowSpan", 7366"colSpan", 7367"useMap", 7368"frameBorder", 7369"contentEditable" 7370], function () { 7371jQuery.propFix[this.toLowerCase()] = this; 7372}); 7373 7374 7375 7376 7377var rclass = /[\t\r\n\f]/g; 7378 7379function getClass(elem) { 7380return elem.getAttribute && elem.getAttribute("class") || ""; 7381} 7382 7383jQuery.fn.extend({ 7384addClass: function (value) { 7385var classes, elem, cur, curValue, clazz, j, finalValue, 7386i = 0; 7387 7388if (jQuery.isFunction(value)) { 7389return this.each(function (j) { 7390jQuery(this).addClass(value.call(this, j, getClass(this))); 7391}); 7392} 7393 7394if (typeof value === "string" && value) { 7395classes = value.match(rnotwhite) || []; 7396 7397while ((elem = this[i++])) { 7398curValue = getClass(elem); 7399cur = elem.nodeType === 1 && 7400(" " + curValue + " ").replace(rclass, " "); 7401 7402if (cur) { 7403j = 0; 7404while ((clazz = classes[j++])) { 7405if (cur.indexOf(" " + clazz + " ") < 0) { 7406cur += clazz + " "; 7407} 7408} 7409 7410// Only assign if different to avoid unneeded rendering. 7411finalValue = jQuery.trim(cur); 7412if (curValue !== finalValue) { 7413elem.setAttribute("class", finalValue); 7414} 7415} 7416} 7417} 7418 7419return this; 7420}, 7421 7422removeClass: function (value) { 7423var classes, elem, cur, curValue, clazz, j, finalValue, 7424i = 0; 7425 7426if (jQuery.isFunction(value)) { 7427return this.each(function (j) { 7428jQuery(this).removeClass(value.call(this, j, getClass(this))); 7429}); 7430} 7431 7432if (!arguments.length) { 7433return this.attr("class", ""); 7434} 7435 7436if (typeof value === "string" && value) { 7437classes = value.match(rnotwhite) || []; 7438 7439while ((elem = this[i++])) { 7440curValue = getClass(elem); 7441 7442// This expression is here for better compressibility (see addClass) 7443cur = elem.nodeType === 1 && 7444(" " + curValue + " ").replace(rclass, " "); 7445 7446if (cur) { 7447j = 0; 7448while ((clazz = classes[j++])) { 7449 7450// Remove *all* instances 7451while (cur.indexOf(" " + clazz + " ") > -1) { 7452cur = cur.replace(" " + clazz + " ", " "); 7453} 7454} 7455 7456// Only assign if different to avoid unneeded rendering. 7457finalValue = jQuery.trim(cur); 7458if (curValue !== finalValue) { 7459elem.setAttribute("class", finalValue); 7460} 7461} 7462} 7463} 7464 7465return this; 7466}, 7467 7468toggleClass: function (value, stateVal) { 7469var type = typeof value; 7470 7471if (typeof stateVal === "boolean" && type === "string") { 7472return stateVal ? this.addClass(value) : this.removeClass(value); 7473} 7474 7475if (jQuery.isFunction(value)) { 7476return this.each(function (i) { 7477jQuery(this).toggleClass( 7478value.call(this, i, getClass(this), stateVal), 7479stateVal 7480); 7481}); 7482} 7483 7484return this.each(function () { 7485var className, i, self, classNames; 7486 7487if (type === "string") { 7488 7489// Toggle individual class names 7490i = 0; 7491self = jQuery(this); 7492classNames = value.match(rnotwhite) || []; 7493 7494while ((className = classNames[i++])) { 7495 7496// Check each className given, space separated list 7497if (self.hasClass(className)) { 7498self.removeClass(className); 7499} else { 7500self.addClass(className); 7501} 7502} 7503 7504// Toggle whole class name 7505} else if (value === undefined || type === "boolean") { 7506className = getClass(this); 7507if (className) { 7508 7509// Store className if set 7510dataPriv.set(this, "__className__", className); 7511} 7512 7513// If the element has a class name or if we're passed `false`, 7514// then remove the whole classname (if there was one, the above saved it). 7515// Otherwise bring back whatever was previously saved (if anything), 7516// falling back to the empty string if nothing was stored. 7517if (this.setAttribute) { 7518this.setAttribute("class", 7519className || value === false ? 7520"" : 7521dataPriv.get(this, "__className__") || "" 7522); 7523} 7524} 7525}); 7526}, 7527 7528hasClass: function (selector) { 7529var className, elem, 7530i = 0; 7531 7532className = " " + selector + " "; 7533while ((elem = this[i++])) { 7534if (elem.nodeType === 1 && 7535(" " + getClass(elem) + " ").replace(rclass, " ") 7536.indexOf(className) > -1 7537) { 7538return true; 7539} 7540} 7541 7542return false; 7543} 7544}); 7545 7546 7547 7548 7549var rreturn = /\r/g, 7550rspaces = /[\x20\t\r\n\f]+/g; 7551 7552jQuery.fn.extend({ 7553val: function (value) { 7554var hooks, ret, isFunction, 7555elem = this[0]; 7556 7557if (!arguments.length) { 7558if (elem) { 7559hooks = jQuery.valHooks[elem.type] || 7560jQuery.valHooks[elem.nodeName.toLowerCase()]; 7561 7562if (hooks && 7563"get" in hooks && 7564(ret = hooks.get(elem, "value")) !== undefined 7565) { 7566return ret; 7567} 7568 7569ret = elem.value; 7570 7571return typeof ret === "string" ? 7572 7573// Handle most common string cases 7574ret.replace(rreturn, "") : 7575 7576// Handle cases where value is null/undef or number 7577ret == null ? "" : ret; 7578} 7579 7580return; 7581} 7582 7583isFunction = jQuery.isFunction(value); 7584 7585return this.each(function (i) { 7586var val; 7587 7588if (this.nodeType !== 1) { 7589return; 7590} 7591 7592if (isFunction) { 7593val = value.call(this, i, jQuery(this).val()); 7594} else { 7595val = value; 7596} 7597 7598// Treat null/undefined as ""; convert numbers to string 7599if (val == null) { 7600val = ""; 7601 7602} else if (typeof val === "number") { 7603val += ""; 7604 7605} else if (jQuery.isArray(val)) { 7606val = jQuery.map(val, function (value) { 7607return value == null ? "" : value + ""; 7608}); 7609} 7610 7611hooks = jQuery.valHooks[this.type] || jQuery.valHooks[this.nodeName.toLowerCase()]; 7612 7613// If set returns undefined, fall back to normal setting 7614if (!hooks || !("set" in hooks) || hooks.set(this, val, "value") === undefined) { 7615this.value = val; 7616} 7617}); 7618} 7619}); 7620 7621jQuery.extend({ 7622valHooks: { 7623option: { 7624get: function (elem) { 7625 7626var val = jQuery.find.attr(elem, "value"); 7627return val != null ? 7628val : 7629 7630// Support: IE10-11+ 7631// option.text throws exceptions (#14686, #14858) 7632// Strip and collapse whitespace 7633// https://html.spec.whatwg.org/#strip-and-collapse-whitespace 7634jQuery.trim(jQuery.text(elem)).replace(rspaces, " "); 7635} 7636}, 7637select: { 7638get: function (elem) { 7639var value, option, 7640options = elem.options, 7641index = elem.selectedIndex, 7642one = elem.type === "select-one" || index < 0, 7643values = one ? null : [], 7644max = one ? index + 1 : options.length, 7645i = index < 0 ? 7646max : 7647one ? index : 0; 7648 7649// Loop through all the selected options 7650for (; i < max; i++) { 7651option = options[i]; 7652 7653// IE8-9 doesn't update selected after form reset (#2551) 7654if ((option.selected || i === index) && 7655 7656// Don't return options that are disabled or in a disabled optgroup 7657(support.optDisabled ? 7658!option.disabled : option.getAttribute("disabled") === null) && 7659(!option.parentNode.disabled || 7660!jQuery.nodeName(option.parentNode, "optgroup"))) { 7661 7662// Get the specific value for the option 7663value = jQuery(option).val(); 7664 7665// We don't need an array for one selects 7666if (one) { 7667return value; 7668} 7669 7670// Multi-Selects return an array 7671values.push(value); 7672} 7673} 7674 7675return values; 7676}, 7677 7678set: function (elem, value) { 7679var optionSet, option, 7680options = elem.options, 7681values = jQuery.makeArray(value), 7682i = options.length; 7683 7684while (i--) { 7685option = options[i]; 7686if (option.selected = 7687jQuery.inArray(jQuery.valHooks.option.get(option), values) > -1 7688) { 7689optionSet = true; 7690} 7691} 7692 7693// Force browsers to behave consistently when non-matching value is set 7694if (!optionSet) { 7695elem.selectedIndex = -1; 7696} 7697return values; 7698} 7699} 7700} 7701}); 7702 7703// Radios and checkboxes getter/setter 7704jQuery.each(["radio", "checkbox"], function () { 7705jQuery.valHooks[this] = { 7706set: function (elem, value) { 7707if (jQuery.isArray(value)) { 7708return (elem.checked = jQuery.inArray(jQuery(elem).val(), value) > -1); 7709} 7710} 7711}; 7712if (!support.checkOn) { 7713jQuery.valHooks[this].get = function (elem) { 7714return elem.getAttribute("value") === null ? "on" : elem.value; 7715}; 7716} 7717}); 7718 7719 7720 7721 7722// Return jQuery for attributes-only inclusion 7723 7724 7725var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/; 7726 7727jQuery.extend(jQuery.event, { 7728 7729trigger: function (event, data, elem, onlyHandlers) { 7730 7731var i, cur, tmp, bubbleType, ontype, handle, special, 7732eventPath = [elem || document], 7733type = hasOwn.call(event, "type") ? event.type : event, 7734namespaces = hasOwn.call(event, "namespace") ? event.namespace.split(".") : []; 7735 7736cur = tmp = elem = elem || document; 7737 7738// Don't do events on text and comment nodes 7739if (elem.nodeType === 3 || elem.nodeType === 8) { 7740return; 7741} 7742 7743// focus/blur morphs to focusin/out; ensure we're not firing them right now 7744if (rfocusMorph.test(type + jQuery.event.triggered)) { 7745return; 7746} 7747 7748if (type.indexOf(".") > -1) { 7749 7750// Namespaced trigger; create a regexp to match event type in handle() 7751namespaces = type.split("."); 7752type = namespaces.shift(); 7753namespaces.sort(); 7754}
vendor: 5,366 bytes, lines 7755-7956
7755ontype = type.indexOf(":") < 0 && "on" + type; 7756 7757// Caller can pass in a jQuery.Event object, Object, or just an event type string 7758event = event[jQuery.expando] ? 7759event : 7760new jQuery.Event(type, typeof event === "object" && event); 7761 7762// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) 7763event.isTrigger = onlyHandlers ? 2 : 3; 7764event.namespace = namespaces.join("."); 7765event.rnamespace = event.namespace ? 7766new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : 7767null; 7768 7769// Clean up the event in case it is being reused 7770event.result = undefined; 7771if (!event.target) { 7772event.target = elem; 7773} 7774 7775// Clone any incoming data and prepend the event, creating the handler arg list 7776data = data == null ? 7777[event] : 7778jQuery.makeArray(data, [event]); 7779 7780// Allow special events to draw outside the lines 7781special = jQuery.event.special[type] || {}; 7782if (!onlyHandlers && special.trigger && special.trigger.apply(elem, data) === false) { 7783return; 7784} 7785 7786// Determine event propagation path in advance, per W3C events spec (#9951) 7787// Bubble up to document, then to window; watch for a global ownerDocument var (#9724) 7788if (!onlyHandlers && !special.noBubble && !jQuery.isWindow(elem)) { 7789 7790bubbleType = special.delegateType || type; 7791if (!rfocusMorph.test(bubbleType + type)) { 7792cur = cur.parentNode; 7793} 7794for (; cur; cur = cur.parentNode) { 7795eventPath.push(cur); 7796tmp = cur; 7797} 7798 7799// Only add window if we got to document (e.g., not plain obj or detached DOM) 7800if (tmp === (elem.ownerDocument || document)) { 7801eventPath.push(tmp.defaultView || tmp.parentWindow || window); 7802} 7803} 7804 7805// Fire handlers on the event path 7806i = 0; 7807while ((cur = eventPath[i++]) && !event.isPropagationStopped()) { 7808 7809event.type = i > 1 ? 7810bubbleType : 7811special.bindType || type; 7812 7813// jQuery handler 7814handle = (dataPriv.get(cur, "events") || {})[event.type] && 7815dataPriv.get(cur, "handle"); 7816if (handle) { 7817handle.apply(cur, data); 7818} 7819 7820// Native handler 7821handle = ontype && cur[ontype]; 7822if (handle && handle.apply && acceptData(cur)) { 7823event.result = handle.apply(cur, data); 7824if (event.result === false) { 7825event.preventDefault(); 7826} 7827} 7828} 7829event.type = type; 7830 7831// If nobody prevented the default action, do it now 7832if (!onlyHandlers && !event.isDefaultPrevented()) { 7833 7834if ((!special._default || 7835special._default.apply(eventPath.pop(), data) === false) && 7836acceptData(elem)) { 7837 7838// Call a native DOM method on the target with the same name name as the event. 7839// Don't do default actions on window, that's where global variables be (#6170) 7840if (ontype && jQuery.isFunction(elem[type]) && !jQuery.isWindow(elem)) { 7841 7842// Don't re-trigger an onFOO event when we call its FOO() method 7843tmp = elem[ontype]; 7844 7845if (tmp) { 7846elem[ontype] = null; 7847} 7848 7849// Prevent re-triggering of the same event, since we already bubbled it above 7850jQuery.event.triggered = type; 7851elem[type](); 7852jQuery.event.triggered = undefined; 7853 7854if (tmp) { 7855elem[ontype] = tmp; 7856} 7857} 7858} 7859} 7860 7861return event.result; 7862}, 7863 7864// Piggyback on a donor event to simulate a different one 7865// Used only for `focus(in | out)` events 7866simulate: function (type, elem, event) { 7867var e = jQuery.extend( 7868new jQuery.Event(), 7869event, 7870{ 7871type: type, 7872isSimulated: true 7873} 7874); 7875 7876jQuery.event.trigger(e, null, elem); 7877} 7878 7879}); 7880 7881jQuery.fn.extend({ 7882 7883trigger: function (type, data) { 7884return this.each(function () { 7885jQuery.event.trigger(type, data, this); 7886}); 7887}, 7888triggerHandler: function (type, data) { 7889var elem = this[0]; 7890if (elem) { 7891return jQuery.event.trigger(type, data, elem, true); 7892} 7893} 7894}); 7895 7896 7897jQuery.each(("blur focus focusin focusout load resize scroll unload click dblclick " + 7898"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + 7899"change select submit keydown keypress keyup error contextmenu").split(" "), 7900function (i, name) { 7901 7902// Handle event binding 7903jQuery.fn[name] = function (data, fn) { 7904return arguments.length > 0 ? 7905this.on(name, null, data, fn) : 7906this.trigger(name); 7907}; 7908}); 7909 7910jQuery.fn.extend({ 7911hover: function (fnOver, fnOut) { 7912return this.mouseenter(fnOver).mouseleave(fnOut || fnOver); 7913} 7914}); 7915 7916 7917 7918 7919support.focusin = "onfocusin" in window; 7920 7921 7922// Support: Firefox 7923// Firefox doesn't have focus(in | out) events 7924// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 7925// 7926// Support: Chrome, Safari 7927// focus(in | out) events fire after focus & blur events, 7928// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order 7929// Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857 7930if (!support.focusin) { 7931jQuery.each({ focus: "focusin", blur: "focusout" }, function (orig, fix) { 7932 7933// Attach a single capturing handler on the document while someone wants focusin/focusout 7934var handler = function (event) { 7935jQuery.event.simulate(fix, event.target, jQuery.event.fix(event)); 7936}; 7937 7938jQuery.event.special[fix] = { 7939setup: function () { 7940var doc = this.ownerDocument || this, 7941attaches = dataPriv.access(doc, fix); 7942 7943if (!attaches) { 7944doc.addEventListener(orig, handler, true); 7945} 7946dataPriv.access(doc, fix, (attaches || 0) + 1); 7947}, 7948teardown: function () { 7949var doc = this.ownerDocument || this, 7950attaches = dataPriv.access(doc, fix) - 1; 7951 7952if (!attaches) { 7953doc.removeEventListener(orig, handler, true); 7954dataPriv.remove(doc, fix); 7955 7956} else {
vendor: 4,791 bytes, lines 7957-8146
7957dataPriv.access(doc, fix, attaches); 7958} 7959} 7960}; 7961}); 7962} 7963var location = window.location; 7964 7965var nonce = jQuery.now(); 7966 7967var rquery = (/\?/); 7968 7969 7970 7971// Support: Android 2.3 7972// Workaround failure to string-cast null input 7973jQuery.parseJSON = function (data) { 7974return JSON.parse(data + ""); 7975}; 7976 7977 7978// Cross-browser xml parsing 7979jQuery.parseXML = function (data) { 7980var xml; 7981if (!data || typeof data !== "string") { 7982return null; 7983} 7984 7985// Support: IE9 7986try { 7987xml = (new window.DOMParser()).parseFromString(data, "text/xml"); 7988} catch (e) { 7989xml = undefined; 7990} 7991 7992if (!xml || xml.getElementsByTagName("parsererror").length) { 7993jQuery.error("Invalid XML: " + data); 7994} 7995return xml; 7996}; 7997 7998 7999var 8000rhash = /#.*$/, 8001rts = /([?&])_=[^&]*/, 8002rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, 8003 8004// #7653, #8125, #8152: local protocol detection 8005rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, 8006rnoContent = /^(?:GET|HEAD)$/, 8007rprotocol = /^\/\//, 8008 8009/* Prefilters 8010 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) 8011 * 2) These are called: 8012 * - BEFORE asking for a transport 8013 * - AFTER param serialization (s.data is a string if s.processData is true) 8014 * 3) key is the dataType 8015 * 4) the catchall symbol "*" can be used 8016 * 5) execution will start with transport dataType and THEN continue down to "*" if needed 8017 */ 8018prefilters = {}, 8019 8020/* Transports bindings 8021 * 1) key is the dataType 8022 * 2) the catchall symbol "*" can be used 8023 * 3) selection will start with transport dataType and THEN go to "*" if needed 8024 */ 8025transports = {}, 8026 8027// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression 8028allTypes = "*/".concat("*"), 8029 8030// Anchor tag for parsing the document origin 8031originAnchor = document.createElement("a"); 8032originAnchor.href = location.href; 8033 8034// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport 8035function addToPrefiltersOrTransports(structure) { 8036 8037// dataTypeExpression is optional and defaults to "*" 8038return function (dataTypeExpression, func) { 8039 8040if (typeof dataTypeExpression !== "string") { 8041func = dataTypeExpression; 8042dataTypeExpression = "*"; 8043} 8044 8045var dataType, 8046i = 0, 8047dataTypes = dataTypeExpression.toLowerCase().match(rnotwhite) || []; 8048 8049if (jQuery.isFunction(func)) { 8050 8051// For each dataType in the dataTypeExpression 8052while ((dataType = dataTypes[i++])) { 8053 8054// Prepend if requested 8055if (dataType[0] === "+") { 8056dataType = dataType.slice(1) || "*"; 8057(structure[dataType] = structure[dataType] || []).unshift(func); 8058 8059// Otherwise append 8060} else { 8061(structure[dataType] = structure[dataType] || []).push(func); 8062} 8063} 8064} 8065}; 8066} 8067 8068// Base inspection function for prefilters and transports 8069function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR) { 8070 8071var inspected = {}, 8072seekingTransport = (structure === transports); 8073 8074function inspect(dataType) { 8075var selected; 8076inspected[dataType] = true; 8077jQuery.each(structure[dataType] || [], function (_, prefilterOrFactory) { 8078var dataTypeOrTransport = prefilterOrFactory(options, originalOptions, jqXHR); 8079if (typeof dataTypeOrTransport === "string" && 8080!seekingTransport && !inspected[dataTypeOrTransport]) { 8081 8082options.dataTypes.unshift(dataTypeOrTransport); 8083inspect(dataTypeOrTransport); 8084return false; 8085} else if (seekingTransport) { 8086return !(selected = dataTypeOrTransport); 8087} 8088}); 8089return selected; 8090} 8091 8092return inspect(options.dataTypes[0]) || !inspected["*"] && inspect("*"); 8093} 8094 8095// A special extend for ajax options 8096// that takes "flat" options (not to be deep extended) 8097// Fixes #9887 8098function ajaxExtend(target, src) { 8099var key, deep, 8100flatOptions = jQuery.ajaxSettings.flatOptions || {}; 8101 8102for (key in src) { 8103if (src[key] !== undefined) { 8104(flatOptions[key] ? target : (deep || (deep = {})))[key] = src[key]; 8105} 8106} 8107if (deep) { 8108jQuery.extend(true, target, deep); 8109} 8110 8111return target; 8112} 8113 8114/* Handles responses to an ajax request: 8115 * - finds the right dataType (mediates between content-type and expected dataType) 8116 * - returns the corresponding response 8117 */ 8118function ajaxHandleResponses(s, jqXHR, responses) { 8119 8120var ct, type, finalDataType, firstDataType, 8121contents = s.contents, 8122dataTypes = s.dataTypes; 8123 8124// Remove auto dataType and get content-type in the process 8125while (dataTypes[0] === "*") { 8126dataTypes.shift(); 8127if (ct === undefined) { 8128ct = s.mimeType || jqXHR.getResponseHeader("Content-Type"); 8129} 8130} 8131 8132// Check if we're dealing with a known content-type 8133if (ct) { 8134for (type in contents) { 8135if (contents[type] && contents[type].test(ct)) { 8136dataTypes.unshift(type); 8137break; 8138} 8139} 8140} 8141 8142// Check to see if we have a response for the expected dataType 8143if (dataTypes[0] in responses) { 8144finalDataType = dataTypes[0]; 8145} else { 8146
vendor: 4,940 bytes, lines 8147-8376
8147// Try convertible dataTypes 8148for (type in responses) { 8149if (!dataTypes[0] || s.converters[type + " " + dataTypes[0]]) { 8150finalDataType = type; 8151break; 8152} 8153if (!firstDataType) { 8154firstDataType = type; 8155} 8156} 8157 8158// Or just use first one 8159finalDataType = finalDataType || firstDataType; 8160} 8161 8162// If we found a dataType 8163// We add the dataType to the list if needed 8164// and return the corresponding response 8165if (finalDataType) { 8166if (finalDataType !== dataTypes[0]) { 8167dataTypes.unshift(finalDataType); 8168} 8169return responses[finalDataType]; 8170} 8171} 8172 8173/* Chain conversions given the request and the original response 8174 * Also sets the responseXXX fields on the jqXHR instance 8175 */ 8176function ajaxConvert(s, response, jqXHR, isSuccess) { 8177var conv2, current, conv, tmp, prev, 8178converters = {}, 8179 8180// Work with a copy of dataTypes in case we need to modify it for conversion 8181dataTypes = s.dataTypes.slice(); 8182 8183// Create converters map with lowercased keys 8184if (dataTypes[1]) { 8185for (conv in s.converters) { 8186converters[conv.toLowerCase()] = s.converters[conv]; 8187} 8188} 8189 8190current = dataTypes.shift(); 8191 8192// Convert to each sequential dataType 8193while (current) { 8194 8195if (s.responseFields[current]) { 8196jqXHR[s.responseFields[current]] = response; 8197} 8198 8199// Apply the dataFilter if provided 8200if (!prev && isSuccess && s.dataFilter) { 8201response = s.dataFilter(response, s.dataType); 8202} 8203 8204prev = current; 8205current = dataTypes.shift(); 8206 8207if (current) { 8208 8209// There's only work to do if current dataType is non-auto 8210if (current === "*") { 8211 8212current = prev; 8213 8214// Convert response if prev dataType is non-auto and differs from current 8215} else if (prev !== "*" && prev !== current) { 8216 8217// Seek a direct converter 8218conv = converters[prev + " " + current] || converters["* " + current]; 8219 8220// If none found, seek a pair 8221if (!conv) { 8222for (conv2 in converters) { 8223 8224// If conv2 outputs current 8225tmp = conv2.split(" "); 8226if (tmp[1] === current) { 8227 8228// If prev can be converted to accepted input 8229conv = converters[prev + " " + tmp[0]] || 8230converters["* " + tmp[0]]; 8231if (conv) { 8232 8233// Condense equivalence converters 8234if (conv === true) { 8235conv = converters[conv2]; 8236 8237// Otherwise, insert the intermediate dataType 8238} else if (converters[conv2] !== true) { 8239current = tmp[0]; 8240dataTypes.unshift(tmp[1]); 8241} 8242break; 8243} 8244} 8245} 8246} 8247 8248// Apply converter (if not an equivalence) 8249if (conv !== true) { 8250 8251// Unless errors are allowed to bubble, catch and return them 8252if (conv && s.throws) { 8253response = conv(response); 8254} else { 8255try { 8256response = conv(response); 8257} catch (e) { 8258return { 8259state: "parsererror", 8260error: conv ? e : "No conversion from " + prev + " to " + current 8261}; 8262} 8263} 8264} 8265} 8266} 8267} 8268 8269return { state: "success", data: response }; 8270} 8271 8272jQuery.extend({ 8273 8274// Counter for holding the number of active queries 8275active: 0, 8276 8277// Last-Modified header cache for next request 8278lastModified: {}, 8279etag: {}, 8280 8281ajaxSettings: { 8282url: location.href, 8283type: "GET", 8284isLocal: rlocalProtocol.test(location.protocol), 8285global: true, 8286processData: true, 8287async: true, 8288contentType: "application/x-www-form-urlencoded; charset=UTF-8", 8289/* 8290timeout: 0, 8291data: null, 8292dataType: null, 8293username: null, 8294password: null, 8295cache: null, 8296throws: false, 8297traditional: false, 8298headers: {}, 8299*/ 8300 8301accepts: { 8302"*": allTypes, 8303text: "text/plain", 8304html: "text/html", 8305xml: "application/xml, text/xml", 8306json: "application/json, text/javascript" 8307}, 8308 8309contents: { 8310xml: /\bxml\b/, 8311html: /\bhtml/, 8312json: /\bjson\b/ 8313}, 8314 8315responseFields: { 8316xml: "responseXML", 8317text: "responseText", 8318json: "responseJSON" 8319}, 8320 8321// Data converters 8322// Keys separate source (or catchall "*") and destination types with a single space 8323converters: { 8324 8325// Convert anything to text 8326"* text": String, 8327 8328// Text to html (true = no transformation) 8329"text html": true, 8330 8331// Evaluate text as a json expression 8332"text json": jQuery.parseJSON, 8333 8334// Parse text as xml 8335"text xml": jQuery.parseXML 8336}, 8337 8338// For options that shouldn't be deep extended: 8339// you can add your own custom options here if 8340// and when you create one that shouldn't be 8341// deep extended (see ajaxExtend) 8342flatOptions: { 8343url: true, 8344context: true 8345} 8346}, 8347 8348// Creates a full fledged settings object into target 8349// with both ajaxSettings and settings fields. 8350// If target is omitted, writes into ajaxSettings. 8351ajaxSetup: function (target, settings) { 8352return settings ? 8353 8354// Building a settings object 8355ajaxExtend(ajaxExtend(target, jQuery.ajaxSettings), settings) : 8356 8357// Extending ajaxSettings 8358ajaxExtend(jQuery.ajaxSettings, target); 8359}, 8360 8361ajaxPrefilter: addToPrefiltersOrTransports(prefilters), 8362ajaxTransport: addToPrefiltersOrTransports(transports), 8363 8364// Main method 8365ajax: function (url, options) { 8366 8367// If url is an object, simulate pre-1.5 signature 8368if (typeof url === "object") { 8369options = url; 8370url = undefined; 8371} 8372 8373// Force options to be an object 8374options = options || {}; 8375 8376var transport,
vendor: 34,858 bytes, lines 8377-9824
8377 8378// URL without anti-cache param 8379cacheURL, 8380 8381// Response headers 8382responseHeadersString, 8383responseHeaders, 8384 8385// timeout handle 8386timeoutTimer, 8387 8388// Url cleanup var 8389urlAnchor, 8390 8391// To know if global events are to be dispatched 8392fireGlobals, 8393 8394// Loop variable 8395i, 8396 8397// Create the final options object 8398s = jQuery.ajaxSetup({}, options), 8399 8400// Callbacks context 8401callbackContext = s.context || s, 8402 8403// Context for global events is callbackContext if it is a DOM node or jQuery collection 8404globalEventContext = s.context && 8405(callbackContext.nodeType || callbackContext.jquery) ? 8406jQuery(callbackContext) : 8407jQuery.event, 8408 8409// Deferreds 8410deferred = jQuery.Deferred(), 8411completeDeferred = jQuery.Callbacks("once memory"), 8412 8413// Status-dependent callbacks 8414statusCode = s.statusCode || {}, 8415 8416// Headers (they are sent all at once) 8417requestHeaders = {}, 8418requestHeadersNames = {}, 8419 8420// The jqXHR state 8421state = 0, 8422 8423// Default abort message 8424strAbort = "canceled", 8425 8426// Fake xhr 8427jqXHR = { 8428readyState: 0, 8429 8430// Builds headers hashtable if needed 8431getResponseHeader: function (key) { 8432var match; 8433if (state === 2) { 8434if (!responseHeaders) { 8435responseHeaders = {}; 8436while ((match = rheaders.exec(responseHeadersString))) { 8437responseHeaders[match[1].toLowerCase()] = match[2]; 8438} 8439} 8440match = responseHeaders[key.toLowerCase()]; 8441} 8442return match == null ? null : match; 8443}, 8444 8445// Raw string 8446getAllResponseHeaders: function () { 8447return state === 2 ? responseHeadersString : null; 8448}, 8449 8450// Caches the header 8451setRequestHeader: function (name, value) { 8452var lname = name.toLowerCase(); 8453if (!state) { 8454name = requestHeadersNames[lname] = requestHeadersNames[lname] || name; 8455requestHeaders[name] = value; 8456} 8457return this; 8458}, 8459 8460// Overrides response content-type header 8461overrideMimeType: function (type) { 8462if (!state) { 8463s.mimeType = type; 8464} 8465return this; 8466}, 8467 8468// Status-dependent callbacks 8469statusCode: function (map) { 8470var code; 8471if (map) { 8472if (state < 2) { 8473for (code in map) { 8474 8475// Lazy-add the new callback in a way that preserves old ones 8476statusCode[code] = [statusCode[code], map[code]]; 8477} 8478} else { 8479 8480// Execute the appropriate callbacks 8481jqXHR.always(map[jqXHR.status]); 8482} 8483} 8484return this; 8485}, 8486 8487// Cancel the request 8488abort: function (statusText) { 8489var finalText = statusText || strAbort; 8490if (transport) { 8491transport.abort(finalText); 8492} 8493done(0, finalText); 8494return this; 8495} 8496}; 8497 8498// Attach deferreds 8499deferred.promise(jqXHR).complete = completeDeferred.add; 8500jqXHR.success = jqXHR.done; 8501jqXHR.error = jqXHR.fail; 8502 8503// Remove hash character (#7531: and string promotion) 8504// Add protocol if not provided (prefilters might expect it) 8505// Handle falsy url in the settings object (#10093: consistency with old signature) 8506// We also use the url parameter if available 8507s.url = ((url || s.url || location.href) + "").replace(rhash, "") 8508.replace(rprotocol, location.protocol + "//"); 8509 8510// Alias method option to type as per ticket #12004 8511s.type = options.method || options.type || s.method || s.type; 8512 8513// Extract dataTypes list 8514s.dataTypes = jQuery.trim(s.dataType || "*").toLowerCase().match(rnotwhite) || [""]; 8515 8516// A cross-domain request is in order when the origin doesn't match the current origin. 8517if (s.crossDomain == null) { 8518urlAnchor = document.createElement("a"); 8519 8520// Support: IE8-11+ 8521// IE throws exception if url is malformed, e.g. http://example.com:80x/ 8522try { 8523urlAnchor.href = s.url; 8524 8525// Support: IE8-11+ 8526// Anchor's host property isn't correctly set when s.url is relative 8527urlAnchor.href = urlAnchor.href; 8528s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== 8529urlAnchor.protocol + "//" + urlAnchor.host; 8530} catch (e) { 8531 8532// If there is an error parsing the URL, assume it is crossDomain, 8533// it can be rejected by the transport if it is invalid 8534s.crossDomain = true; 8535} 8536} 8537 8538// Convert data if not already a string 8539if (s.data && s.processData && typeof s.data !== "string") { 8540s.data = jQuery.param(s.data, s.traditional); 8541} 8542 8543// Apply prefilters 8544inspectPrefiltersOrTransports(prefilters, s, options, jqXHR); 8545 8546// If request was aborted inside a prefilter, stop there 8547if (state === 2) { 8548return jqXHR; 8549} 8550 8551// We can fire global events as of now if asked to 8552// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) 8553fireGlobals = jQuery.event && s.global; 8554 8555// Watch for a new set of requests 8556if (fireGlobals && jQuery.active++ === 0) { 8557jQuery.event.trigger("ajaxStart"); 8558} 8559 8560// Uppercase the type 8561s.type = s.type.toUpperCase(); 8562 8563// Determine if request has content 8564s.hasContent = !rnoContent.test(s.type); 8565 8566// Save the URL in case we're toying with the If-Modified-Since 8567// and/or If-None-Match header later on 8568cacheURL = s.url; 8569 8570// More options handling for requests with no content 8571if (!s.hasContent) { 8572 8573// If data is available, append data to url 8574if (s.data) { 8575cacheURL = (s.url += (rquery.test(cacheURL) ? "&" : "?") + s.data); 8576 8577// #9682: remove data so that it's not used in an eventual retry 8578delete s.data; 8579} 8580 8581// Add anti-cache in url if needed 8582if (s.cache === false) { 8583s.url = rts.test(cacheURL) ? 8584 8585// If there is already a '_' parameter, set its value 8586cacheURL.replace(rts, "$1_=" + nonce++) : 8587 8588// Otherwise add one to the end 8589cacheURL + (rquery.test(cacheURL) ? "&" : "?") + "_=" + nonce++; 8590} 8591} 8592 8593// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. 8594if (s.ifModified) { 8595if (jQuery.lastModified[cacheURL]) { 8596jqXHR.setRequestHeader("If-Modified-Since", jQuery.lastModified[cacheURL]); 8597} 8598if (jQuery.etag[cacheURL]) { 8599jqXHR.setRequestHeader("If-None-Match", jQuery.etag[cacheURL]); 8600} 8601} 8602 8603// Set the correct header, if data is being sent 8604if (s.data && s.hasContent && s.contentType !== false || options.contentType) { 8605jqXHR.setRequestHeader("Content-Type", s.contentType); 8606} 8607 8608// Set the Accepts header for the server, depending on the dataType 8609jqXHR.setRequestHeader( 8610"Accept", 8611s.dataTypes[0] && s.accepts[s.dataTypes[0]] ? 8612s.accepts[s.dataTypes[0]] + 8613(s.dataTypes[0] !== "*" ? ", " + allTypes + "; q=0.01" : "") : 8614s.accepts["*"] 8615); 8616 8617// Check for headers option 8618for (i in s.headers) { 8619jqXHR.setRequestHeader(i, s.headers[i]); 8620} 8621 8622// Allow custom headers/mimetypes and early abort 8623if (s.beforeSend && 8624(s.beforeSend.call(callbackContext, jqXHR, s) === false || state === 2)) { 8625 8626// Abort if not done already and return 8627return jqXHR.abort(); 8628} 8629 8630// Aborting is no longer a cancellation 8631strAbort = "abort"; 8632 8633// Install callbacks on deferreds 8634for (i in { success: 1, error: 1, complete: 1 }) { 8635jqXHR[i](s[i]); 8636} 8637 8638// Get transport 8639transport = inspectPrefiltersOrTransports(transports, s, options, jqXHR); 8640 8641// If no transport, we auto-abort 8642if (!transport) { 8643done(-1, "No Transport"); 8644} else { 8645jqXHR.readyState = 1; 8646 8647// Send global event 8648if (fireGlobals) { 8649globalEventContext.trigger("ajaxSend", [jqXHR, s]); 8650} 8651 8652// If request was aborted inside ajaxSend, stop there 8653if (state === 2) { 8654return jqXHR; 8655} 8656 8657// Timeout 8658if (s.async && s.timeout > 0) { 8659timeoutTimer = window.setTimeout(function () { 8660jqXHR.abort("timeout"); 8661}, s.timeout); 8662} 8663 8664try { 8665state = 1; 8666transport.send(requestHeaders, done); 8667} catch (e) { 8668 8669// Propagate exception as error if not done 8670if (state < 2) { 8671done(-1, e); 8672 8673// Simply rethrow otherwise 8674} else { 8675throw e; 8676} 8677} 8678} 8679 8680// Callback for when everything is done 8681function done(status, nativeStatusText, responses, headers) { 8682var isSuccess, success, error, response, modified, 8683statusText = nativeStatusText; 8684 8685// Called once 8686if (state === 2) { 8687return; 8688} 8689 8690// State is "done" now 8691state = 2; 8692 8693// Clear timeout if it exists 8694if (timeoutTimer) { 8695window.clearTimeout(timeoutTimer); 8696} 8697 8698// Dereference transport for early garbage collection 8699// (no matter how long the jqXHR object will be used) 8700transport = undefined; 8701 8702// Cache response headers 8703responseHeadersString = headers || ""; 8704 8705// Set readyState 8706jqXHR.readyState = status > 0 ? 4 : 0; 8707 8708// Determine if successful 8709isSuccess = status >= 200 && status < 300 || status === 304; 8710 8711// Get response data 8712if (responses) { 8713response = ajaxHandleResponses(s, jqXHR, responses); 8714} 8715 8716// Convert no matter what (that way responseXXX fields are always set) 8717response = ajaxConvert(s, response, jqXHR, isSuccess); 8718 8719// If successful, handle type chaining 8720if (isSuccess) { 8721 8722// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. 8723if (s.ifModified) { 8724modified = jqXHR.getResponseHeader("Last-Modified"); 8725if (modified) { 8726jQuery.lastModified[cacheURL] = modified; 8727} 8728modified = jqXHR.getResponseHeader("etag"); 8729if (modified) { 8730jQuery.etag[cacheURL] = modified; 8731} 8732} 8733 8734// if no content 8735if (status === 204 || s.type === "HEAD") { 8736statusText = "nocontent"; 8737 8738// if not modified 8739} else if (status === 304) { 8740statusText = "notmodified"; 8741 8742// If we have data, let's convert it 8743} else { 8744statusText = response.state; 8745success = response.data; 8746error = response.error; 8747isSuccess = !error; 8748} 8749} else { 8750 8751// Extract error from statusText and normalize for non-aborts 8752error = statusText; 8753if (status || !statusText) { 8754statusText = "error"; 8755if (status < 0) { 8756status = 0; 8757} 8758} 8759} 8760 8761// Set data for the fake xhr object 8762jqXHR.status = status; 8763jqXHR.statusText = (nativeStatusText || statusText) + ""; 8764 8765// Success/Error 8766if (isSuccess) { 8767deferred.resolveWith(callbackContext, [success, statusText, jqXHR]); 8768} else { 8769deferred.rejectWith(callbackContext, [jqXHR, statusText, error]); 8770} 8771 8772// Status-dependent callbacks 8773jqXHR.statusCode(statusCode); 8774statusCode = undefined; 8775 8776if (fireGlobals) { 8777globalEventContext.trigger(isSuccess ? "ajaxSuccess" : "ajaxError", 8778[jqXHR, s, isSuccess ? success : error]); 8779} 8780 8781// Complete 8782completeDeferred.fireWith(callbackContext, [jqXHR, statusText]); 8783 8784if (fireGlobals) { 8785globalEventContext.trigger("ajaxComplete", [jqXHR, s]); 8786 8787// Handle the global AJAX counter 8788if (!(--jQuery.active)) { 8789jQuery.event.trigger("ajaxStop"); 8790} 8791} 8792} 8793 8794return jqXHR; 8795}, 8796 8797getJSON: function (url, data, callback) { 8798return jQuery.get(url, data, callback, "json"); 8799}, 8800 8801getScript: function (url, callback) { 8802return jQuery.get(url, undefined, callback, "script"); 8803} 8804}); 8805 8806jQuery.each(["get", "post"], function (i, method) { 8807jQuery[method] = function (url, data, callback, type) { 8808 8809// Shift arguments if data argument was omitted 8810if (jQuery.isFunction(data)) { 8811type = type || callback; 8812callback = data; 8813data = undefined; 8814} 8815 8816// The url can be an options object (which then must have .url) 8817return jQuery.ajax(jQuery.extend({ 8818url: url, 8819type: method, 8820dataType: type, 8821data: data, 8822success: callback 8823}, jQuery.isPlainObject(url) && url)); 8824}; 8825}); 8826 8827 8828jQuery._evalUrl = function (url) { 8829return jQuery.ajax({ 8830url: url, 8831 8832// Make this explicit, since user can override this through ajaxSetup (#11264) 8833type: "GET", 8834dataType: "script", 8835async: false, 8836global: false, 8837"throws": true 8838}); 8839}; 8840 8841 8842jQuery.fn.extend({ 8843wrapAll: function (html) { 8844var wrap; 8845 8846if (jQuery.isFunction(html)) { 8847return this.each(function (i) { 8848jQuery(this).wrapAll(html.call(this, i)); 8849}); 8850} 8851 8852if (this[0]) { 8853 8854// The elements to wrap the target around 8855wrap = jQuery(html, this[0].ownerDocument).eq(0).clone(true); 8856 8857if (this[0].parentNode) { 8858wrap.insertBefore(this[0]); 8859} 8860 8861wrap.map(function () { 8862var elem = this; 8863 8864while (elem.firstElementChild) { 8865elem = elem.firstElementChild; 8866} 8867 8868return elem; 8869}).append(this); 8870} 8871 8872return this; 8873}, 8874 8875wrapInner: function (html) { 8876if (jQuery.isFunction(html)) { 8877return this.each(function (i) { 8878jQuery(this).wrapInner(html.call(this, i)); 8879}); 8880} 8881 8882return this.each(function () { 8883var self = jQuery(this), 8884contents = self.contents(); 8885 8886if (contents.length) { 8887contents.wrapAll(html); 8888 8889} else { 8890self.append(html); 8891} 8892}); 8893}, 8894 8895wrap: function (html) { 8896var isFunction = jQuery.isFunction(html); 8897 8898return this.each(function (i) { 8899jQuery(this).wrapAll(isFunction ? html.call(this, i) : html); 8900}); 8901}, 8902 8903unwrap: function () { 8904return this.parent().each(function () { 8905if (!jQuery.nodeName(this, "body")) { 8906jQuery(this).replaceWith(this.childNodes); 8907} 8908}).end(); 8909} 8910}); 8911 8912 8913jQuery.expr.filters.hidden = function (elem) { 8914return !jQuery.expr.filters.visible(elem); 8915}; 8916jQuery.expr.filters.visible = function (elem) { 8917 8918// Support: Opera <= 12.12 8919// Opera reports offsetWidths and offsetHeights less than zero on some elements 8920// Use OR instead of AND as the element is not visible if either is true 8921// See tickets #10406 and #13132 8922return elem.offsetWidth > 0 || elem.offsetHeight > 0 || elem.getClientRects().length > 0; 8923}; 8924 8925 8926 8927 8928var r20 = /%20/g, 8929rbracket = /\[\]$/, 8930rCRLF = /\r?\n/g, 8931rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, 8932rsubmittable = /^(?:input|select|textarea|keygen)/i; 8933 8934function buildParams(prefix, obj, traditional, add) { 8935var name; 8936 8937if (jQuery.isArray(obj)) { 8938 8939// Serialize array item. 8940jQuery.each(obj, function (i, v) { 8941if (traditional || rbracket.test(prefix)) { 8942 8943// Treat each array item as a scalar. 8944add(prefix, v); 8945 8946} else { 8947 8948// Item is non-scalar (array or object), encode its numeric index. 8949buildParams( 8950prefix + "[" + (typeof v === "object" && v != null ? i : "") + "]", 8951v, 8952traditional, 8953add 8954); 8955} 8956}); 8957 8958} else if (!traditional && jQuery.type(obj) === "object") { 8959 8960// Serialize object item. 8961for (name in obj) { 8962buildParams(prefix + "[" + name + "]", obj[name], traditional, add); 8963} 8964 8965} else { 8966 8967// Serialize scalar item. 8968add(prefix, obj); 8969} 8970} 8971 8972// Serialize an array of form elements or a set of 8973// key/values into a query string 8974jQuery.param = function (a, traditional) { 8975var prefix, 8976s = [], 8977add = function (key, value) { 8978 8979// If value is a function, invoke it and return its value 8980value = jQuery.isFunction(value) ? value() : (value == null ? "" : value); 8981s[s.length] = encodeURIComponent(key) + "=" + encodeURIComponent(value); 8982}; 8983 8984// Set traditional to true for jQuery <= 1.3.2 behavior. 8985if (traditional === undefined) { 8986traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; 8987} 8988 8989// If an array was passed in, assume that it is an array of form elements. 8990if (jQuery.isArray(a) || (a.jquery && !jQuery.isPlainObject(a))) { 8991 8992// Serialize the form elements 8993jQuery.each(a, function () { 8994add(this.name, this.value); 8995}); 8996 8997} else { 8998 8999// If traditional, encode the "old" way (the way 1.3.2 or older 9000// did it), otherwise encode params recursively. 9001for (prefix in a) { 9002buildParams(prefix, a[prefix], traditional, add); 9003} 9004} 9005 9006// Return the resulting serialization 9007return s.join("&").replace(r20, "+"); 9008}; 9009 9010jQuery.fn.extend({ 9011serialize: function () { 9012return jQuery.param(this.serializeArray()); 9013}, 9014serializeArray: function () { 9015return this.map(function () { 9016 9017// Can add propHook for "elements" to filter or add form elements 9018var elements = jQuery.prop(this, "elements"); 9019return elements ? jQuery.makeArray(elements) : this; 9020}) 9021.filter(function () { 9022var type = this.type; 9023 9024// Use .is( ":disabled" ) so that fieldset[disabled] works 9025return this.name && !jQuery(this).is(":disabled") && 9026rsubmittable.test(this.nodeName) && !rsubmitterTypes.test(type) && 9027(this.checked || !rcheckableType.test(type)); 9028}) 9029.map(function (i, elem) { 9030var val = jQuery(this).val(); 9031 9032return val == null ? 9033null : 9034jQuery.isArray(val) ? 9035jQuery.map(val, function (val) { 9036return { name: elem.name, value: val.replace(rCRLF, "\r\n") }; 9037}) : 9038{ name: elem.name, value: val.replace(rCRLF, "\r\n") }; 9039}).get(); 9040} 9041}); 9042 9043 9044jQuery.ajaxSettings.xhr = function () { 9045try { 9046return new window.XMLHttpRequest(); 9047} catch (e) { } 9048}; 9049 9050var xhrSuccessStatus = { 9051 9052// File protocol always yields status code 0, assume 200 90530: 200, 9054 9055// Support: IE9 9056// #1450: sometimes IE returns 1223 when it should be 204 90571223: 204 9058}, 9059xhrSupported = jQuery.ajaxSettings.xhr(); 9060 9061support.cors = !!xhrSupported && ("withCredentials" in xhrSupported); 9062support.ajax = xhrSupported = !!xhrSupported; 9063 9064jQuery.ajaxTransport(function (options) { 9065var callback, errorCallback; 9066 9067// Cross domain only allowed if supported through XMLHttpRequest 9068if (support.cors || xhrSupported && !options.crossDomain) { 9069return { 9070send: function (headers, complete) { 9071var i, 9072xhr = options.xhr(); 9073 9074xhr.open( 9075options.type, 9076options.url, 9077options.async, 9078options.username, 9079options.password 9080); 9081 9082// Apply custom fields if provided 9083if (options.xhrFields) { 9084for (i in options.xhrFields) { 9085xhr[i] = options.xhrFields[i]; 9086} 9087} 9088 9089// Override mime type if needed 9090if (options.mimeType && xhr.overrideMimeType) { 9091xhr.overrideMimeType(options.mimeType); 9092} 9093 9094// X-Requested-With header 9095// For cross-domain requests, seeing as conditions for a preflight are 9096// akin to a jigsaw puzzle, we simply never set it to be sure. 9097// (it can always be set on a per-request basis or even using ajaxSetup) 9098// For same-domain requests, won't change header if already provided. 9099if (!options.crossDomain && !headers["X-Requested-With"]) { 9100headers["X-Requested-With"] = "XMLHttpRequest"; 9101} 9102 9103// Set headers 9104for (i in headers) { 9105xhr.setRequestHeader(i, headers[i]); 9106} 9107 9108// Callback 9109callback = function (type) { 9110return function () { 9111if (callback) { 9112callback = errorCallback = xhr.onload = 9113xhr.onerror = xhr.onabort = xhr.onreadystatechange = null; 9114 9115if (type === "abort") { 9116xhr.abort(); 9117} else if (type === "error") { 9118 9119// Support: IE9 9120// On a manual native abort, IE9 throws 9121// errors on any property access that is not readyState 9122if (typeof xhr.status !== "number") { 9123complete(0, "error"); 9124} else { 9125complete( 9126 9127// File: protocol always yields status 0; see #8605, #14207 9128xhr.status, 9129xhr.statusText 9130); 9131} 9132} else { 9133complete( 9134xhrSuccessStatus[xhr.status] || xhr.status, 9135xhr.statusText, 9136 9137// Support: IE9 only 9138// IE9 has no XHR2 but throws on binary (trac-11426) 9139// For XHR2 non-text, let the caller handle it (gh-2498) 9140(xhr.responseType || "text") !== "text" || 9141typeof xhr.responseText !== "string" ? 9142{ binary: xhr.response } : 9143{ text: xhr.responseText }, 9144xhr.getAllResponseHeaders() 9145); 9146} 9147} 9148}; 9149}; 9150 9151// Listen to events 9152xhr.onload = callback(); 9153errorCallback = xhr.onerror = callback("error"); 9154 9155// Support: IE9 9156// Use onreadystatechange to replace onabort 9157// to handle uncaught aborts 9158if (xhr.onabort !== undefined) { 9159xhr.onabort = errorCallback; 9160} else { 9161xhr.onreadystatechange = function () { 9162 9163// Check readyState before timeout as it changes 9164if (xhr.readyState === 4) { 9165 9166// Allow onerror to be called first, 9167// but that will not handle a native abort 9168// Also, save errorCallback to a variable 9169// as xhr.onerror cannot be accessed 9170window.setTimeout(function () { 9171if (callback) { 9172errorCallback(); 9173} 9174}); 9175} 9176}; 9177} 9178 9179// Create the abort callback 9180callback = callback("abort"); 9181 9182try { 9183 9184// Do send the request (this may raise an exception) 9185xhr.send(options.hasContent && options.data || null); 9186} catch (e) { 9187 9188// #14683: Only rethrow if this hasn't been notified as an error yet 9189if (callback) { 9190throw e; 9191} 9192} 9193}, 9194 9195abort: function () { 9196if (callback) { 9197callback(); 9198} 9199} 9200}; 9201} 9202}); 9203 9204 9205 9206 9207// Install script dataType 9208jQuery.ajaxSetup({ 9209accepts: { 9210script: "text/javascript, application/javascript, " + 9211"application/ecmascript, application/x-ecmascript" 9212}, 9213contents: { 9214script: /\b(?:java|ecma)script\b/ 9215}, 9216converters: { 9217"text script": function (text) { 9218jQuery.globalEval(text); 9219return text; 9220} 9221} 9222}); 9223 9224// Handle cache's special case and crossDomain 9225jQuery.ajaxPrefilter("script", function (s) { 9226if (s.cache === undefined) { 9227s.cache = false; 9228} 9229if (s.crossDomain) { 9230s.type = "GET"; 9231} 9232}); 9233 9234// Bind script tag hack transport 9235jQuery.ajaxTransport("script", function (s) { 9236 9237// This transport only deals with cross domain requests 9238if (s.crossDomain) { 9239var script, callback; 9240return { 9241send: function (_, complete) { 9242script = jQuery("<script>").prop({ 9243charset: s.scriptCharset, 9244src: s.url 9245}).on( 9246"load error", 9247callback = function (evt) { 9248script.remove(); 9249callback = null; 9250if (evt) { 9251complete(evt.type === "error" ? 404 : 200, evt.type); 9252} 9253} 9254); 9255 9256// Use native DOM manipulation to avoid our domManip AJAX trickery 9257document.head.appendChild(script[0]); 9258}, 9259abort: function () { 9260if (callback) { 9261callback(); 9262} 9263} 9264}; 9265} 9266}); 9267 9268 9269 9270 9271var oldCallbacks = [], 9272rjsonp = /(=)\?(?=&|$)|\?\?/; 9273 9274// Default jsonp settings 9275jQuery.ajaxSetup({ 9276jsonp: "callback", 9277jsonpCallback: function () { 9278var callback = oldCallbacks.pop() || (jQuery.expando + "_" + (nonce++)); 9279this[callback] = true; 9280return callback; 9281} 9282}); 9283 9284// Detect, normalize options and install callbacks for jsonp requests 9285jQuery.ajaxPrefilter("json jsonp", function (s, originalSettings, jqXHR) { 9286 9287var callbackName, overwritten, responseContainer, 9288jsonProp = s.jsonp !== false && (rjsonp.test(s.url) ? 9289"url" : 9290typeof s.data === "string" && 9291(s.contentType || "") 9292.indexOf("application/x-www-form-urlencoded") === 0 && 9293rjsonp.test(s.data) && "data" 9294); 9295 9296// Handle iff the expected data type is "jsonp" or we have a parameter to set 9297if (jsonProp || s.dataTypes[0] === "jsonp") { 9298 9299// Get callback name, remembering preexisting value associated with it 9300callbackName = s.jsonpCallback = jQuery.isFunction(s.jsonpCallback) ? 9301s.jsonpCallback() : 9302s.jsonpCallback; 9303 9304// Insert callback into url or form data 9305if (jsonProp) { 9306s[jsonProp] = s[jsonProp].replace(rjsonp, "$1" + callbackName); 9307} else if (s.jsonp !== false) { 9308s.url += (rquery.test(s.url) ? "&" : "?") + s.jsonp + "=" + callbackName; 9309} 9310 9311// Use data converter to retrieve json after script execution 9312s.converters["script json"] = function () { 9313if (!responseContainer) { 9314jQuery.error(callbackName + " was not called"); 9315} 9316return responseContainer[0]; 9317}; 9318 9319// Force json dataType 9320s.dataTypes[0] = "json"; 9321 9322// Install callback 9323overwritten = window[callbackName]; 9324window[callbackName] = function () { 9325responseContainer = arguments; 9326}; 9327 9328// Clean-up function (fires after converters) 9329jqXHR.always(function () { 9330 9331// If previous value didn't exist - remove it 9332if (overwritten === undefined) { 9333jQuery(window).removeProp(callbackName); 9334 9335// Otherwise restore preexisting value 9336} else { 9337window[callbackName] = overwritten; 9338} 9339 9340// Save back as free 9341if (s[callbackName]) { 9342 9343// Make sure that re-using the options doesn't screw things around 9344s.jsonpCallback = originalSettings.jsonpCallback; 9345 9346// Save the callback name for future use 9347oldCallbacks.push(callbackName); 9348} 9349 9350// Call if it was a function and we have a response 9351if (responseContainer && jQuery.isFunction(overwritten)) { 9352overwritten(responseContainer[0]); 9353} 9354 9355responseContainer = overwritten = undefined; 9356}); 9357 9358// Delegate to script 9359return "script"; 9360} 9361}); 9362 9363 9364 9365 9366// Argument "data" should be string of html 9367// context (optional): If specified, the fragment will be created in this context, 9368// defaults to document 9369// keepScripts (optional): If true, will include scripts passed in the html string 9370jQuery.parseHTML = function (data, context, keepScripts) { 9371if (!data || typeof data !== "string") { 9372return null; 9373} 9374if (typeof context === "boolean") { 9375keepScripts = context; 9376context = false; 9377} 9378context = context || document; 9379 9380var parsed = rsingleTag.exec(data), 9381scripts = !keepScripts && []; 9382 9383// Single tag 9384if (parsed) { 9385return [context.createElement(parsed[1])]; 9386} 9387 9388parsed = buildFragment([data], context, scripts); 9389 9390if (scripts && scripts.length) { 9391jQuery(scripts).remove(); 9392} 9393 9394return jQuery.merge([], parsed.childNodes); 9395}; 9396 9397 9398// Keep a copy of the old load method 9399var _load = jQuery.fn.load; 9400 9401/** 9402 * Load a url into a page 9403 */ 9404jQuery.fn.load = function (url, params, callback) { 9405if (typeof url !== "string" && _load) { 9406return _load.apply(this, arguments); 9407} 9408 9409var selector, type, response, 9410self = this, 9411off = url.indexOf(" "); 9412 9413if (off > -1) { 9414selector = jQuery.trim(url.slice(off)); 9415url = url.slice(0, off); 9416} 9417 9418// If it's a function 9419if (jQuery.isFunction(params)) { 9420 9421// We assume that it's the callback 9422callback = params; 9423params = undefined; 9424 9425// Otherwise, build a param string 9426} else if (params && typeof params === "object") { 9427type = "POST"; 9428} 9429 9430// If we have elements to modify, make the request 9431if (self.length > 0) { 9432jQuery.ajax({ 9433url: url, 9434 9435// If "type" variable is undefined, then "GET" method will be used. 9436// Make value of this field explicit since 9437// user can override it through ajaxSetup method 9438type: type || "GET", 9439dataType: "html", 9440data: params 9441}).done(function (responseText) { 9442 9443// Save response for use in complete callback 9444response = arguments; 9445 9446self.html(selector ? 9447 9448// If a selector was specified, locate the right elements in a dummy div 9449// Exclude scripts to avoid IE 'Permission Denied' errors 9450jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector) : 9451 9452// Otherwise use the full result 9453responseText); 9454 9455// If the request succeeds, this function gets "data", "status", "jqXHR" 9456// but they are ignored because response was set above. 9457// If it fails, this function gets "jqXHR", "status", "error" 9458}).always(callback && function (jqXHR, status) { 9459self.each(function () { 9460callback.apply(this, response || [jqXHR.responseText, status, jqXHR]); 9461}); 9462}); 9463} 9464 9465return this; 9466}; 9467 9468 9469 9470 9471// Attach a bunch of functions for handling common AJAX events 9472jQuery.each([ 9473"ajaxStart", 9474"ajaxStop", 9475"ajaxComplete", 9476"ajaxError", 9477"ajaxSuccess", 9478"ajaxSend" 9479], function (i, type) { 9480jQuery.fn[type] = function (fn) { 9481return this.on(type, fn); 9482}; 9483}); 9484 9485 9486 9487 9488jQuery.expr.filters.animated = function (elem) { 9489return jQuery.grep(jQuery.timers, function (fn) { 9490return elem === fn.elem; 9491}).length; 9492}; 9493 9494 9495 9496 9497/** 9498 * Gets a window from an element 9499 */ 9500function getWindow(elem) { 9501return jQuery.isWindow(elem) ? elem : elem.nodeType === 9 && elem.defaultView; 9502} 9503 9504jQuery.offset = { 9505setOffset: function (elem, options, i) { 9506var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition, 9507position = jQuery.css(elem, "position"), 9508curElem = jQuery(elem), 9509props = {}; 9510 9511// Set position first, in-case top/left are set even on static elem 9512if (position === "static") { 9513elem.style.position = "relative"; 9514} 9515 9516curOffset = curElem.offset(); 9517curCSSTop = jQuery.css(elem, "top"); 9518curCSSLeft = jQuery.css(elem, "left"); 9519calculatePosition = (position === "absolute" || position === "fixed") && 9520(curCSSTop + curCSSLeft).indexOf("auto") > -1; 9521 9522// Need to be able to calculate position if either 9523// top or left is auto and position is either absolute or fixed 9524if (calculatePosition) { 9525curPosition = curElem.position(); 9526curTop = curPosition.top; 9527curLeft = curPosition.left; 9528 9529} else { 9530curTop = parseFloat(curCSSTop) || 0; 9531curLeft = parseFloat(curCSSLeft) || 0; 9532} 9533 9534if (jQuery.isFunction(options)) { 9535 9536// Use jQuery.extend here to allow modification of coordinates argument (gh-1848) 9537options = options.call(elem, i, jQuery.extend({}, curOffset)); 9538} 9539 9540if (options.top != null) { 9541props.top = (options.top - curOffset.top) + curTop; 9542} 9543if (options.left != null) { 9544props.left = (options.left - curOffset.left) + curLeft; 9545} 9546 9547if ("using" in options) { 9548options.using.call(elem, props); 9549 9550} else { 9551curElem.css(props); 9552} 9553} 9554}; 9555 9556jQuery.fn.extend({ 9557offset: function (options) { 9558if (arguments.length) { 9559return options === undefined ? 9560this : 9561this.each(function (i) { 9562jQuery.offset.setOffset(this, options, i); 9563}); 9564} 9565 9566var docElem, win, 9567elem = this[0], 9568box = { top: 0, left: 0 }, 9569doc = elem && elem.ownerDocument; 9570 9571if (!doc) { 9572return; 9573} 9574 9575docElem = doc.documentElement; 9576 9577// Make sure it's not a disconnected DOM node 9578if (!jQuery.contains(docElem, elem)) { 9579return box; 9580} 9581 9582box = elem.getBoundingClientRect(); 9583win = getWindow(doc); 9584return { 9585top: box.top + win.pageYOffset - docElem.clientTop, 9586left: box.left + win.pageXOffset - docElem.clientLeft 9587}; 9588}, 9589 9590position: function () { 9591if (!this[0]) { 9592return; 9593} 9594 9595var offsetParent, offset, 9596elem = this[0], 9597parentOffset = { top: 0, left: 0 }; 9598 9599// Fixed elements are offset from window (parentOffset = {top:0, left: 0}, 9600// because it is its only offset parent 9601if (jQuery.css(elem, "position") === "fixed") { 9602 9603// Assume getBoundingClientRect is there when computed position is fixed 9604offset = elem.getBoundingClientRect(); 9605 9606} else { 9607 9608// Get *real* offsetParent 9609offsetParent = this.offsetParent(); 9610 9611// Get correct offsets 9612offset = this.offset(); 9613if (!jQuery.nodeName(offsetParent[0], "html")) { 9614parentOffset = offsetParent.offset(); 9615} 9616 9617// Add offsetParent borders 9618parentOffset.top += jQuery.css(offsetParent[0], "borderTopWidth", true); 9619parentOffset.left += jQuery.css(offsetParent[0], "borderLeftWidth", true); 9620} 9621 9622// Subtract parent offsets and element margins 9623return { 9624top: offset.top - parentOffset.top - jQuery.css(elem, "marginTop", true), 9625left: offset.left - parentOffset.left - jQuery.css(elem, "marginLeft", true) 9626}; 9627}, 9628 9629// This method will return documentElement in the following cases: 9630// 1) For the element inside the iframe without offsetParent, this method will return 9631// documentElement of the parent window 9632// 2) For the hidden or detached element 9633// 3) For body or html element, i.e. in case of the html node - it will return itself 9634// 9635// but those exceptions were never presented as a real life use-cases 9636// and might be considered as more preferable results. 9637// 9638// This logic, however, is not guaranteed and can change at any point in the future 9639offsetParent: function () { 9640return this.map(function () { 9641var offsetParent = this.offsetParent; 9642 9643while (offsetParent && jQuery.css(offsetParent, "position") === "static") { 9644offsetParent = offsetParent.offsetParent; 9645} 9646 9647return offsetParent || documentElement; 9648}); 9649} 9650}); 9651 9652// Create scrollLeft and scrollTop methods 9653jQuery.each({ scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function (method, prop) { 9654var top = "pageYOffset" === prop; 9655 9656jQuery.fn[method] = function (val) { 9657return access(this, function (elem, method, val) { 9658var win = getWindow(elem); 9659 9660if (val === undefined) { 9661return win ? win[prop] : elem[method]; 9662} 9663 9664if (win) { 9665win.scrollTo( 9666!top ? val : win.pageXOffset, 9667top ? val : win.pageYOffset 9668); 9669 9670} else { 9671elem[method] = val; 9672} 9673}, method, val, arguments.length); 9674}; 9675}); 9676 9677// Support: Safari<7-8+, Chrome<37-44+ 9678// Add the top/left cssHooks using jQuery.fn.position 9679// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 9680// Blink bug: https://code.google.com/p/chromium/issues/detail?id=229280 9681// getComputedStyle returns percent when specified for top/left/bottom/right; 9682// rather than make the css module depend on the offset module, just check for it here 9683jQuery.each(["top", "left"], function (i, prop) { 9684jQuery.cssHooks[prop] = addGetHookIf(support.pixelPosition, 9685function (elem, computed) { 9686if (computed) { 9687computed = curCSS(elem, prop); 9688 9689// If curCSS returns percentage, fallback to offset 9690return rnumnonpx.test(computed) ? 9691jQuery(elem).position()[prop] + "px" : 9692computed; 9693} 9694} 9695); 9696}); 9697 9698 9699// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods 9700jQuery.each({ Height: "height", Width: "width" }, function (name, type) { 9701jQuery.each({ padding: "inner" + name, content: type, "": "outer" + name }, 9702function (defaultExtra, funcName) { 9703 9704// Margin is only for outerHeight, outerWidth 9705jQuery.fn[funcName] = function (margin, value) { 9706var chainable = arguments.length && (defaultExtra || typeof margin !== "boolean"), 9707extra = defaultExtra || (margin === true || value === true ? "margin" : "border"); 9708 9709return access(this, function (elem, type, value) { 9710var doc; 9711 9712if (jQuery.isWindow(elem)) { 9713 9714// As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there 9715// isn't a whole lot we can do. See pull request at this URL for discussion: 9716// https://github.com/jquery/jquery/pull/764 9717return elem.document.documentElement["client" + name]; 9718} 9719 9720// Get document width or height 9721if (elem.nodeType === 9) { 9722doc = elem.documentElement; 9723 9724// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], 9725// whichever is greatest 9726return Math.max( 9727elem.body["scroll" + name], doc["scroll" + name], 9728elem.body["offset" + name], doc["offset" + name], 9729doc["client" + name] 9730); 9731} 9732 9733return value === undefined ? 9734 9735// Get width or height on the element, requesting but not forcing parseFloat 9736jQuery.css(elem, type, extra) : 9737 9738// Set width or height on the element 9739jQuery.style(elem, type, value, extra); 9740}, type, chainable ? margin : undefined, chainable, null); 9741}; 9742}); 9743}); 9744 9745 9746jQuery.fn.extend({ 9747 9748bind: function (types, data, fn) { 9749return this.on(types, null, data, fn); 9750}, 9751unbind: function (types, fn) { 9752return this.off(types, null, fn); 9753}, 9754 9755delegate: function (selector, types, data, fn) { 9756return this.on(types, selector, data, fn); 9757}, 9758undelegate: function (selector, types, fn) { 9759 9760// ( namespace ) or ( selector, types [, fn] ) 9761return arguments.length === 1 ? 9762this.off(selector, "**") : 9763this.off(types, selector || "**", fn); 9764}, 9765size: function () { 9766return this.length; 9767} 9768}); 9769 9770jQuery.fn.andSelf = jQuery.fn.addBack; 9771 9772 9773 9774 9775// Register as a named AMD module, since jQuery can be concatenated with other 9776// files that may use define, but not via a proper concatenation script that 9777// understands anonymous AMD modules. A named AMD is safest and most robust 9778// way to register. Lowercase jquery is used because AMD module names are 9779// derived from file names, and jQuery is normally delivered in a lowercase 9780// file name. Do this after creating the global so that if an AMD module wants 9781// to call noConflict to hide this version of jQuery, it will work. 9782 9783// Note that for maximum portability, libraries that are not jQuery should 9784// declare themselves as anonymous modules, and avoid setting a global if an 9785// AMD loader is present. jQuery is a special case. For more information, see 9786// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon 9787 9788if (typeof define === "function" && define.amd) { 9789define("jquery", [], function () { 9790return jQuery; 9791}); 9792} 9793 9794 9795 9796var 9797 9798// Map over jQuery in case of overwrite 9799_jQuery = window.jQuery, 9800 9801// Map over the $ in case of overwrite 9802_$ = window.$; 9803 9804jQuery.noConflict = function (deep) { 9805if (window.$ === jQuery) { 9806window.$ = _$; 9807} 9808 9809if (deep && window.jQuery === jQuery) { 9810window.jQuery = _jQuery; 9811} 9812 9813return jQuery; 9814}; 9815 9816// Expose jQuery and $ identifiers, even in AMD 9817// (#7102#comment:10, https://github.com/jquery/jquery/pull/557) 9818// and CommonJS for browser emulators (#13566) 9819if (!noGlobal) { 9820window.jQuery = window.$ = jQuery; 9821} 9822 9823return jQuery; 9824}));
vendor: 37,045 bytes, lines 9825-9831
9825/*! 9826 * Bootstrap v3.3.7 (http://getbootstrap.com) 9827 * Copyright 2011-2016 Twitter, Inc. 9828 * Licensed under the MIT license 9829 */ 9830if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.7",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a("#"===f?[]:f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.7",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c).prop(c,!0)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c).prop(c,!1))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target).closest(".btn");b.call(d,"toggle"),a(c.target).is('input[type="radio"], input[type="checkbox"]')||(c.preventDefault(),d.is("input,button")?d.trigger("focus"):d.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(a>this.$items.length-1||a<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.7",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.7",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){document===a.target||this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.7",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),!c.isInStateTrue())return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element&&e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);if(this.$element.trigger(g),!g.isDefaultPrevented())return f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=window.SVGElement&&c instanceof window.SVGElement,g=d?{top:0,left:0}:f?null:b.offset(),h={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},i=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,h,i,g)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null,a.$element=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.7",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.7",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){ 9831this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.7",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return e<c&&"top";if("bottom"==this.affixed)return null!=c?!(e+this.unpin<=f.top)&&"bottom":!(e+g<=a-d)&&"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&e<=c?"top":null!=d&&i+j>=a-d&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
vendor: 1,580 bytes, lines 9831-9837
9831/*! 9832* Lightbox for Bootstrap 3 by @ashleydw 9833* https://github.com/ashleydw/lightbox 9834* 9835* License: https://github.com/ashleydw/lightbox/blob/master/LICENSE 9836*/ 9837(function () { "use strict"; var a, b; a = jQuery, b = function (b, c) { var d, e, f, g = this; return this.options = a.extend({ title: null, footer: null, remote: null }, a.fn.ekkoLightbox.defaults, c || {}), this.$element = a(b), d = "", this.modal_id = this.options.modal_id ? this.options.modal_id : "ekkoLightbox-" + Math.floor(1e3 * Math.random() + 1), f = '<div class="modal-header"' + (this.options.title || this.options.always_show_close ? "" : ' style="display:none"') + '><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><h4 class="modal-title">' + (this.options.title || " ") + "</h4></div>", e = '<div class="modal-footer"' + (this.options.footer ? "" : ' style="display:none"') + ">" + this.options.footer + "</div>", a(document.body).append('<div id="' + this.modal_id + '" class="ekko-lightbox modal fade" tabindex="-1"><div class="modal-dialog"><div class="modal-content">' + f + '<div class="modal-body"><div class="ekko-lightbox-container"><div></div></div></div>' + e + "</div></div></div>"), this.modal = a("#" + this.modal_id), this.modal_dialog = this.modal.find(".modal-dialog").first(), this.modal_content = this.modal.find(".modal-content").first(), this.modal_body = this.modal.find(".modal-body").first(), this.lightbox_container = this.modal_body.find(".ekko-lightbox-container").first(), this.lightbox_body = this.lightbox_container.find(">
9837 div:first-child").first(), this.showLoading(), this.modal_arrows = null, this.border = { top: parseFloat(this.modal_dialog.css("border-top-width")) + parseFloat(this.modal_content.css("border-top-width")) + parseFloat(this.modal_body.css("border-top-width")), right: parseFloat(this.modal_dialog.css("border-right-width")) + parseFloat(this.modal_content.css("border-right-width")) + parseFloat(this.modal_body.css("border-right-width")), bottom: parseFloat(this.modal_dialog.css("border-bottom-width")) + parseFloat(this.modal_content.css("border-bottom-width")) + parseFloat(this.modal_body.css("border-bottom-width")), left: parseFloat(this.modal_dialog.css("border-left-width")) + parseFloat(this.modal_content.css("border-left-width")) + parseFloat(this.modal_body.css("border-left-width")) }, this.padding = { top: parseFloat(this.modal_dialog.css("padding-top")) + parseFloat(this.modal_content.css("padding-top")) + parseFloat(this.modal_body.css("padding-top")), right: parseFloat(this.modal_dialog.css("padding-right")) + parseFloat(this.modal_content.css("padding-right")) + parseFloat(this.modal_body.css("padding-right")), bottom: parseFloat(this.modal_dialog.css("padding-bottom")) + parseFloat(this.modal_content.css("padding-bottom")) + parseFloat(this.modal_body.css("padding-bottom")), left: parseFloat(this.modal_dialog.css("padding-left")) + parseFloat(this.modal_content.css("padding-left")) + parseFloat(this.modal_body.css("padding-left")) }, this.modal.on("show.bs.modal", this.options.onShow.bind(this)).on("shown.bs.modal", function () { return g.modal_shown(), g.options.onShown.call(g) }).on("hide.bs.modal", this.options.onHide.bind(this)).on("hidden.bs.modal", function () { return g.gallery && a(document).off("keydown.ekkoLightbox"), g.modal.remove(), g.options.onHidden.call(g) }).modal("show", c), this.modal }, b.prototype = { modal_shown: function () { var b, c = this; return this.options.remote ? (this.gallery = this.$element.data("gallery"), this.gallery && (this.gallery_items = "document.body" === this.options.gallery_parent_selector || "" === this.options.gallery_parent_selector ? a(document.body).find('*[data-toggle="lightbox"][data-gallery="' + this.gallery + '"]') : this.$element.parents(this.options.gallery_parent_selector).first().find('*[data-toggle="lightbox"][data-gallery="' + this.gallery + '"]'), this.gallery_index = this.gallery_items.index(this.$element), a(document).on("keydown.ekkoLightbox", this.navigate.bind(this)), this.options.directional_arrows && this.gallery_items.length > 1 && (this.lightbox_container.prepend('<div class="ekko-lightbox-nav-overlay"><a href="#" class="' + this.strip_stops(this.options.left_arrow_class) + '"><span class="sr-only">Previous</span></a><a href="#" class="' + this.strip_stops(this.options.right_arrow_class) + '"><span class="sr-only">Next</span></a></div>'), this.modal_arrows = this.lightbox_container.find("div.ekko-lightbox-nav-overlay").first(), this.lightbox_container.find("a" + this.strip_spaces(this.options.left_arrow_class)).on("click", function (a) { return a.preventDefault(), c.navigate_left() }), this.lightbox_container.find("a" + this.strip_spaces(this.options.right_arrow_class)).on("click", function (a) { return a.preventDefault(), c.navigate_right() }))), this.options.type ? "image" === this.options.type ? this.preloadImage(this.options.remote, !0) : "youtube" === this.options.type && (b = this.getYoutubeId(this.options.remote)) ? this.showYoutubeVideo(b) : "vimeo" === this.options.type ? this.showVimeoVideo(this.options.remote) : "instagram" === this.options.type ? this.showInstagramVideo(this.options.remote) : "url" === this.options.type ? this.showInstagramVideo(this.options.remote) : this.error('Could not detect remote target type. Force the type using data-type="image|youtube|vimeo|url"') : this.detectRemoteType(this.options.remote)) : this.error("No remote target given") }, strip_stops: function (a) { return a.replace(/\./g, "") }, strip_spaces: function (a) { return a.replace(/\s/g, "") }, isImage: function (a) { return a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i) }, isSwf: function (a) { return a.match(/\.(swf)((\?|#).*)?$/i) }, getYoutubeId: function (a) { var b; return b = a.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/), b && 11 === b[2].length ? b[2] : !1 }, getVimeoId: function (a) { return a.indexOf("vimeo") > 0 ? a : !1 }, getInstagramId: function (a) { return a.indexOf("instagram") > 0 ? a : !1 }, navigate: function (a) { if (a = a || window.event, 39 === a.keyCode || 37 === a.keyCode) { if (39 === a.keyCode) return this.navigate_right(); if (37 === a.keyCode) return this.navigate_left() } }, navigateTo: function (b) { var c, d; return 0 > b || b >
vendor: 4,958 bytes, line 9837
9837 this.gallery_items.length - 1 ? this : (this.showLoading(), this.gallery_index = b, this.options.onNavigate.call(this, this.gallery_index), this.$element = a(this.gallery_items.get(this.gallery_index)), this.updateTitleAndFooter(), d = this.$element.attr("data-remote") || this.$element.attr("href"), this.detectRemoteType(d, this.$element.attr("data-type") || !1), this.gallery_index + 1 < this.gallery_items.length && (c = a(this.gallery_items.get(this.gallery_index + 1), !1), d = c.attr("data-remote") || c.attr("href"), "image" === c.attr("data-type") || this.isImage(d)) ? this.preloadImage(d, !1) : void 0) }, navigate_left: function () { return 1 !== this.gallery_items.length ? (0 === this.gallery_index ? this.gallery_index = this.gallery_items.length - 1 : this.gallery_index--, this.options.onNavigate.call(this, "left", this.gallery_index), this.navigateTo(this.gallery_index)) : void 0 }, navigate_right: function () { return 1 !== this.gallery_items.length ? (this.gallery_index === this.gallery_items.length - 1 ? this.gallery_index = 0 : this.gallery_index++, this.options.onNavigate.call(this, "right", this.gallery_index), this.navigateTo(this.gallery_index)) : void 0 }, detectRemoteType: function (a, b) { var c; return "image" === b || this.isImage(a) ? (this.options.type = "image", this.preloadImage(a, !0)) : "youtube" === b || (c = this.getYoutubeId(a)) ? (this.options.type = "youtube", this.showYoutubeVideo(c)) : "vimeo" === b || (c = this.getVimeoId(a)) ? (this.options.type = "vimeo", this.showVimeoVideo(c)) : "instagram" === b || (c = this.getInstagramId(a)) ? (this.options.type = "instagram", this.showInstagramVideo(c)) : "url" === b || (c = this.getInstagramId(a)) ? (this.options.type = "instagram", this.showInstagramVideo(c)) : (this.options.type = "url", this.loadRemoteContent(a)) }, updateTitleAndFooter: function () { var a, b, c, d; return c = this.modal_content.find(".modal-header"), b = this.modal_content.find(".modal-footer"), d = this.$element.data("title") || "", a = this.$element.data("footer") || "", d || this.options.always_show_close ? c.css("display", "").find(".modal-title").html(d || " ") : c.css("display", "none"), a ? b.css("display", "").html(a) : b.css("display", "none"), this }, showLoading: function () { return this.lightbox_body.html('<div class="modal-loading">Loading..</div>'), this }, showYoutubeVideo: function (a) { var b, c, d; return b = 560 / 315, d = this.$element.data("width") || 560, d = this.checkDimensions(d), c = d / b, this.resize(d), this.lightbox_body.html('<iframe width="' + d + '" height="' + c + '" src="//www.youtube.com/embed/' + a + '?badge=0&autoplay=1&html5=1" frameborder="0" allowfullscreen></iframe>'), this.options.onContentLoaded.call(this), this.modal_arrows ? this.modal_arrows.css("display", "none") : void 0 }, showVimeoVideo: function (a) { var b, c, d; return b = 500 / 281, d = this.$element.data("width") || 560, d = this.checkDimensions(d), c = d / b, this.resize(d), this.lightbox_body.html('<iframe width="' + d + '" height="' + c + '" src="' + a + '?autoplay=1" frameborder="0" allowfullscreen></iframe>'), this.options.onContentLoaded.call(this), this.modal_arrows ? this.modal_arrows.css("display", "none") : void 0 }, showInstagramVideo: function (a) { var b; return b = this.$element.data("width") || 612, b = this.checkDimensions(b), this.resize(b), this.lightbox_body.html('<iframe width="' + b + '" height="' + b + '" src="' + this.addTrailingSlash(a) + 'embed/" frameborder="0" allowfullscreen></iframe>'), this.options.onContentLoaded.call(this), this.modal_arrows ? this.modal_arrows.css("display", "none") : void 0 }, loadRemoteContent: function (b) { var c, d, e = this; return d = this.$element.data("width") || 560, this.resize(d), c = this.$element.data("disableExternalCheck") || !1, c || this.isExternal(b) ? (this.lightbox_body.html('<iframe width="' + d + '" height="' + d + '" src="' + b + '" frameborder="0" allowfullscreen></iframe>'), this.options.onContentLoaded.call(this)) : this.lightbox_body.load(b, a.proxy(function () { return e.$element.trigger("loaded.bs.modal") })), this.modal_arrows ? this.modal_arrows.css("display", "block") : void 0 }, isExternal: function (a) { var b; return b = a.match(/^([^:\/?#]+:)?(?:\/\/([^\/?#]*))?([^?#]+)?(\?[^#]*)?(#.*)?/), "string" == typeof b[1] && b[1].length > 0 && b[1].toLowerCase() !== location.protocol ? !0 : "string" == typeof b[2] && b[2].length > 0 && b[2].replace(new RegExp(":(" + { "http:": 80, "https:": 443 }[location.protocol] + ")?$"), "") !== location.host ? !0 : !1 }, error: function (a) { return this.lightbox_body.html(a), this }, preloadImage: function (b, c) { var d, e = this; return d = new Image, (null == c || c === !0) && (d.onload = function () { var b; return b = a("<img />"), b.attr("src", d.src), b.addClass("img-responsive"), e.lightbox_body.html(b), e.modal_arrows && e.modal_arrows.css("display", "block"), e.resize(d.width), e.o
9837ptions.onContentLoaded.call(e) }, d.onerror = function () { return e.error("Failed to load image: " + b) }), d.src = b, d }, resize: function (b) { var c; return c = b + this.border.left + this.padding.left + this.padding.right + this.border.right, this.modal_dialog.css("width", "auto").css("max-width", c), this.lightbox_container.find("a").css("padding-top", function () { return a(this).parent().height() / 2 }), this }, checkDimensions: function (a) { var b, c; return c = a + this.border.left + this.padding.left + this.padding.right + this.border.right, b = document.body.clientWidth, c > b && (a = this.modal_body.width()), a }, close: function () { return this.modal.modal("hide") }, addTrailingSlash: function (a) { return "/" !== a.substr(-1) && (a += "/"), a } }, a.fn.ekkoLightbox = function (c) { return this.each(function () { var d; return d = a(this), c = a.extend({ remote: d.attr("data-remote") || d.attr("href"), gallery_parent_selector: d.attr("data-parent"), type: d.attr("data-type") }, c, d.data()), new b(this, c), this }) }, a.fn.ekkoLightbox.defaults = { gallery_parent_selector: "*:not(.row)", left_arrow_class: ".glyphicon .glyphicon-chevron-left", right_arrow_class: ".glyphicon .glyphicon-chevron-right", directional_arrows: !0, type: null, always_show_close: !0, onShow: function () { }, onShown: function () { }, onHide: function () { }, onHidden: function () { }, onNavigate: function () { }, onContentLoaded: function () { } } }).call(this); 9838Function.prototype.bind || (Function.prototype.bind = function (n) { if (typeof this != "function") throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable"); var r = Array.prototype.slice.call(arguments, 1), u = this, t = function () { }, i = function () { return u.apply(this instanceof t ? this : n, r.concat(Array.prototype.slice.call(arguments))) }; return t.prototype = this.prototype, i.prototype = new t, i });/* 9839* jquery-match-height master by @liabru 9840* http://brm.io/jquery-match-height/ 9841* License MIT 9842*/ 9843!function(t){"use strict";"function"===typeof define&&define.amd?define(["jquery"],t):"undefined"!==typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}(function(t){var e=-1,o=-1,i=function(t){return parseFloat(t)||0},n=function(e){var o=1,n=t(e),a=null,r=[];return n.each(function(){var e=t(this),n=e.offset().top-i(e.css("margin-top")),s=r.length>0?r[r.length-1]:null;null===s?r.push(e):Math.floor(Math.abs(a-n))<=o?r[r.length-1]=s.add(e):r.push(e),a=n}),r},a=function(e){var o={ 9844byRow:!0,property:"height",target:null,remove:!1};return"object"===typeof e?t.extend(o,e):("boolean"===typeof e?o.byRow=e:"remove"===e&&(o.remove=!0),o)},r=t.fn.matchHeight=function(e){var o=a(e);if(o.remove){var i=this;return this.css(o.property,""),t.each(r._groups,function(t,e){e.elements=e.elements.not(i)}),this}return this.length<=1&&!o.target?this:(r._groups.push({elements:this,options:o}),r._apply(this,o),this)};r.version="master",r._groups=[],r._throttle=80,r._maintainScroll=!1,r._beforeUpdate=null, 9845r._afterUpdate=null,r._rows=n,r._parse=i,r._parseOptions=a,r._apply=function(e,o){var s=a(o),h=t(e),c=[h],l=t(window).scrollTop(),p=t("html").outerHeight(!0),d=h.parents().filter(":hidden");return d.each(function(){var e=t(this);e.data("style-cache",e.attr("style"))}),d.css("display","block"),s.byRow&&!s.target&&(h.each(function(){var e=t(this),o=e.css("display");"inline-block"!==o&&"flex"!==o&&"inline-flex"!==o&&(o="block"),e.data("style-cache",e.attr("style")),e.css({display:o,"padding-top":"0", 9846"padding-bottom":"0","margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0",height:"100px",overflow:"hidden"})}),c=n(h),h.each(function(){var e=t(this);e.attr("style",e.data("style-cache")||"")})),t.each(c,function(e,o){var n=t(o),a=0;if(s.target)a=s.target.outerHeight(!1);else{if(s.byRow&&n.length<=1)return void n.css(s.property,"");n.each(function(){var e=t(this),o=e.css("display");"inline-block"!==o&&"flex"!==o&&"inline-flex"!==o&&(o="block");var i={display:o};i[s.property]="", 9847e.css(i),e.outerHeight(!1)>a&&(a=e.outerHeight(!1)),e.css("display","")})}n.each(function(){var e=t(this),o=0;s.target&&e.is(s.target)||("border-box"!==e.css("box-sizing")&&(o+=i(e.css("border-top-width"))+i(e.css("border-bottom-width")),o+=i(e.css("padding-top"))+i(e.css("padding-bottom"))),e.css(s.property,a-o+"px"))})}),d.each(function(){var e=t(this);e.attr("style",e.data("style-cache")||null)}),r._maintainScroll&&t(window).scrollTop(l/p*t("html").outerHeight(!0)),this},r._applyDataApi=function(){ 9848var e={};t("[data-match-height], [data-mh]").each(function(){var o=t(this),i=o.attr("data-mh")||o.attr("data-match-height");i in e?e[i]=e[i].add(o):e[i]=o}),t.each(e,function(){this.matchHeight(!0)})};var s=function(e){r._beforeUpdate&&r._beforeUpdate(e,r._groups),t.each(r._groups,function(){r._apply(this.elements,this.options)}),r._afterUpdate&&r._afterUpdate(e,r._groups)};r._update=function(i,n){if(n&&"resize"===n.type){var a=t(window).width();if(a===e)return;e=a}i?-1===o&&(o=setTimeout(function(){ 9849s(n),o=-1},r._throttle)):s(n)},t(r._applyDataApi),t(window).bind("load",function(t){r._update(!1,t)}),t(window).bind("resize orientationchange",function(t){r._update(!0,t)})});/*! 9850 * imagesLoaded PACKAGED v3.2.0 9851 * JavaScript is all like "You images are done yet or what?" 9852 * MIT License 9853 */ 9854 9855(function(){"use strict";function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,s=r.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;t<e.length;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,n){var i,r=this.getListenersAsObject(e),s="object"==typeof n;for(i in r)r.hasOwnProperty(i)&&-1===t(r[i],n)&&r[i].push(s?n:{listener:n,once:!1});return this},i.on=n("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,n){var i,r,s=this.getListenersAsObject(e);for(r in s)s.hasOwnProperty(r)&&(i=t(s[r],n),-1!==i&&s[r].splice(i,1));return this},i.off=n("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var i,r,s=e?this.removeListener:this.addListener,o=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)s.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(r=t[i])&&("function"==typeof r?s.call(this,i,r):o.call(this,i,r));return this},i.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if("object"===n)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},i.removeAllListeners=n("removeEvent"),i.emitEvent=function(e,t){var n,i,r,s,o=this.getListenersAsObject(e);for(r in o)if(o.hasOwnProperty(r))for(i=o[r].length;i--;)n=o[r][i],n.once===!0&&this.removeListener(e,n.listener),s=n.listener.apply(this,t||[]),s===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1
9855);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return r.EventEmitter=s,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}).call(this),function(e){function t(t){var n=e.event;return n.target=n.target||n.srcElement||t,n}var n=document.documentElement,i=function(){};n.addEventListener?i=function(e,t,n){e.addEventListener(t,n,!1)}:n.attachEvent&&(i=function(e,n,i){e[n+i]=i.handleEvent?function(){var n=t(e);i.handleEvent.call(i,n)}:function(){var n=t(e);i.call(e,n)},e.attachEvent("on"+n,e[n+i])});var r=function(){};n.removeEventListener?r=function(e,t,n){e.removeEventListener(t,n,!1)}:n.detachEvent&&(r=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(i){e[t+n]=void 0}});var s={bind:i,unbind:r};"function"==typeof define&&define.amd?define("eventie/eventie",s):e.eventie=s}(this),function(e,t){"use strict";"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(n,i){return t(e,n,i)}):"object"==typeof module&&module.exports?module.exports=t(e,require("wolfy87-eventemitter"),require("eventie")):e.imagesLoaded=t(e,e.EventEmitter,e.eventie)}(window,function(e,t,n){function i(e,t){for(var n in t)e[n]=t[n];return e}function r(e){return"[object Array]"==f.call(e)}function s(e){var t=[];if(r(e))t=e;else if("number"==typeof e.length)for(var n=0;n<e.length;n++)t.push(e[n]);else t.push(e);return t}function o(e,t,n){if(!(this instanceof o))return new o(e,t,n);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=s(e),this.options=i({},this.options),"function"==typeof t?n=t:i(this.options,t),n&&this.on("always",n),this.getImages(),u&&(this.jqDeferred=new u.Deferred);var r=this;setTimeout(function(){r.check()})}function h(e){this.img=e}function a(e,t){this.url=e,this.element=t,this.img=new Image}var u=e.jQuery,c=e.console,f=Object.prototype.toString;o.prototype=new t,o.prototype.options={},o.prototype.getImages=function(){this.images=[];for(var e=0;e<this.elements.length;e++){var t=this.elements[e];this.addElementImages(t)}},o.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),this.options.background===!0&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&d[t]){for(var n=e.querySelectorAll("img"),i=0;i<n.length;i++){var r=n[i];this.addImage(r)}if("string"==typeof this.options.background){var s=e.querySelectorAll(this.options.background);for(i=0;i<s.length;i++){var o=s[i];this.addElementBackgroundImages(o)}}}};var d={1:!0,9:!0,11:!0};o.prototype.addElementBackgroundImages=function(e){for(var t=m(e),n=/url\(['"]*([^'"\)]+)['"]*\)/gi,i=n.exec(t.backgroundImage);null!==i;){var r=i&&i[1];r&&this.addBackground(r,e),i=n.exec(t.backgroundImage)}};var m=e.getComputedStyle||function(e){return e.currentStyle};return o.prototype.addImage=function(e){var t=new h(e);this.images.push(t)},o.prototype.addBackground=function(e,t){var n=new a(e,t);this.images.push(n)},o.prototype.check=function(){function e(e,n,i){setTimeout(function(){t.progress(e,n,i)})}var t=this;if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length)return void this.complete();for(var n=0;n<this.images.length;n++){var i=this.images[n];i.once("progress",e),i.check()}},o.prototype.progress=function(e,t,n){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emit("progress",this,e,t),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&c&&c.log("progress: "+n,e,t)},o.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emit(e,this),this.emit("always",this),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},h.prototype=new t,h.prototype.check=function(){var e=this.getIsImageComplete();
9855return e?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,n.bind(this.proxyImage,"load",this),n.bind(this.proxyImage,"error",this),n.bind(this.img,"load",this),n.bind(this.img,"error",this),void(this.proxyImage.src=this.img.src))},h.prototype.getIsImageComplete=function(){return this.img.complete&&void 0!==this.img.naturalWidth},h.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("progress",this,this.img,t)},h.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){n.unbind(this.proxyImage,"load",this),n.unbind(this.proxyImage,"error",this),n.unbind(this.img,"load",this),n.unbind(this.img,"error",this)},a.prototype=new h,a.prototype.check=function(){n.bind(this.img,"load",this),n.bind(this.img,"error",this),this.img.src=this.url;var e=this.getIsImageComplete();e&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},a.prototype.unbindEvents=function(){n.unbind(this.img,"load",this),n.unbind(this.img,"error",this)},a.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("progress",this,this.element,t)},o.makeJQueryPlugin=function(t){t=t||e.jQuery,t&&(u=t,u.fn.imagesLoaded=function(e,t){var n=new o(this,e,t);return n.jqDeferred.promise(u(this))})},o.makeJQueryPlugin(),o});
vendor: 24,103 bytes, lines 9855-9863
9855/*! 9856 * Masonry PACKAGED v4.2.2 9857 * Cascading grid layout library 9858 * https://masonry.desandro.com 9859 * MIT License 9860 * by David DeSandro 9861 */ 9862 9863!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,r,a){function h(t,e,n){var o,r="$()."+i+'("'+e+'")';return t.each(function(t,h){var u=a.data(h,i);if(!u)return void s(i+" not initialized. Cannot call methods, i.e. "+r);var d=u[e];if(!d||"_"==e.charAt(0))return void s(r+" is not a valid method");var l=d.apply(u,n);o=void 0===o?l:o}),void 0!==o?o:t}function u(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new r(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(r.prototype.option||(r.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return h(this,t,e)}return u(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(t,r),delete n[r]),r.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t}),function(t,e){"function"==typeof define&&define.amd?define("get-size/get-size",e):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=-1==t.indexOf("%")&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;u>e;e++){var i=h[e];t[i]=0}return t}function n(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}function o(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var o=n(e);s=200==Math.round(t(o.width)),r.isBoxSizeOuter=s,i.removeChild(e)}}function r(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var r=n(e);if("none"==r.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==r.boxSizing,l=0;u>l;l++){var c=h[l],f=r[c],m=parseFloat(f);a[c]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,g=a.paddingTop+a.paddingBottom,y=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,z=a.borderTopWidth+a.borderBottomWidth,E=d&&s,b=t(r.width);b!==!1&&(a.width=b+(E?0:p+_));var x=t(r.height);return x!==!1&&(a.height=x+(E?0:g+z)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(g+z),a.outerWidth=a.width+y,a.outerHeight=a.height+v,a}}var s,a="undefined"==typeof console?e:function(t){console.error(t)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],u=h.length,d=!1;return r}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var n=e[i],o=n+"MatchesSelector";if(t[o])return o}}();return function(e,i){return e[t](i)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var i={};i.extend=function(t,e){for(var i in e)t[i]=e[i];return t},i.modulo=function(t,e){return(t%e+e)%e};var n=Array.prototype.slice;i.makeArray=function(t){if(Array.isArray(t))return t;if(null===t||void 0===t)return[];var e="object"==typeof t&&"number"==typeof t.length;return e?n.call(t):[t]},i.removeFrom=function(t,e){var i=t.indexOf(e);-1!=i&&t.splice(i,1)},i.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,i))return t},i.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.filterFindElements=function(t,n){t=i.makeArray(t);var o=[];return t.forEach(function(t){if(t instanceof HTMLElement){if(!n)return void o.push(t);e(t,n)&&o.push(t);for(var i=t.querySelectorAll(n),r=0;r<i.length;r++)o.push(i[r])}}),o},i.debounceMethod=function(t,e,i){i=i||100;var n=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){var t=this[o];clearTimeout(t);var e=arguments,r=this;this[o]=setTimeout(function(){n.apply(r,e),delete r[o]},i)}},i.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},i.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var o=t.console;return i.htmlInit=function(e,n){i.docReady(function(){var r=i.toDashed(n),s="data-"+r,a=document.querySelectorAll("["+s+"]"),h=document.querySelectorAll(".js-"+r),u=i.makeArray(a).concat(i.makeArray(h)),d=s+"-options",l=t.jQuery;u.forEach(function(t){var i,r=t.getAttribute(s)||t.getAttribute(d);try{i=r&&JSON.parse(r)}catch(a){return void(o&&o.error("Error parsing "+s+" on "+t.className+": "+a))}var h=new e(t,i);l&&l.data(t,n,h)})})},i}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("ev-emitter"),require("get-size")):(t.Outlayer={},t.Outlayer.Item=e(t.EvEmitter,t.getSize))}(window,function(t,e){"use strict";function i(t){for(var e in t)return!1;return e=null,!0}function n(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}function o(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}var r=document.documentElement.style,s="string"==typeof r.transition?"transition":"WebkitTransition",a="string"==typeof r.transform?"transform":"WebkitTransform",h={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[s],u={transform:a,transition:s,transitionDuration:s+"Duration",transitionProperty:s+"Property",transitionDelay:s+"Delay"},d=n.prototype=Object.create(t.prototype);d.constructor=n,d._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},d.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},d.getSize=function(){this.size=e(this.element)},d.css=function(t){var e=this.element.style;for(var i in t){var n=u[i]||i;e[n]=t[i]}},d.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),n=t[e?"left":"right"],o=t[i?"top":"bottom"],r=parseFloat(n),s=parseFloat(o),a=this.layout.size;-1!=n.indexOf("%")&&(r=r/100*a.width),-1!=o.indexOf("%")&&(s=s/100*a.height),r=isNaN(r)?0:r,s=isNaN(s)?0:s,r-=e?a.paddingLeft:a.paddingRight,s-=i?a.paddingTop:a.paddingBottom,this.position.x=r,this.position.y=s},d.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),o=i?"paddingLeft":"paddingRight",r=i?"left":"right",s=i?"right":"left",a=this.position.x+t[o];e[r]=this.getXValue(a),e[s]="";var h=n?"paddingTop":"paddingBottom",u=n?"top":"bottom",d=n?"bottom":"top",l=this.position.y+t[h];e[u]=this.getYValue(l),e[d]="",this.css(e),this.emitEvent("layout",[this])},d.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},d.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},d._transitionTo=function(t,e){this.getPosition();var i=this.position.x,n=this.position.y,o=t==this.position.x&&e==this.position.y;if(this.setPosition(t,e),o&&!this.isTransitioning)return void this.layoutPosition();var r=t-i,s=e-n,a={};a.transform=this.getTranslate(r,s),this.transition({to:a,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},d.getTranslate=function(t,e){var i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop");return t=i?t:-t,e=n?e:-e,"translate3d("+t+"px, "+e+"px, 0)"},d.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},d.moveTo=d._transitionTo,d.setPosition=function(t,e){this.position.x=parseFloat(t),this.position.y=parseFloat(e)},d._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},d.transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(t);var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var n=this.element.offsetHeight;n=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var l="opacity,"+o(a);d.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:l,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(h,this,!1)}},d.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},d.onotransitionend=function(t){this.ontransitionend(t)};var c={"-webkit-transform":"transform"};d.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,n=c[t.propertyName]||t.propertyName;if(delete e.ingProperties[n],i(e.ingProperties)&&this.disableTransition(),n in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[n]),n in e.onEnd){var o=e.onEnd[n];o.call(this),delete e.onEnd[n]}this.emitEvent("transitionEnd",[this])}},d.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(h,this,!1),this.isTransitioning=!1},d._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var f={transitionProperty:"",transitionDuration:"",transitionDelay:""};return d.removeTransitionStyles=function(){this.css(f)},d.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},d.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},d.remove=function(){return s&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):void this.removeElem()},d.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("visibleStyle");e[i]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},d.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},d.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},d.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("hiddenStyle");e[i]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},d.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},d.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},n}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,n,o,r){return e(t,i,n,o,r)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,n,o){"use strict";function r(t,e){var i=n.getQueryElement(t);if(!i)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(i||t)));this.element=i,u&&(this.$element=u(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(e);var o=++l;this.element.outlayerGUID=o,c[o]=this,this._create();var r=this._getOption("initLayout");r&&this.layout()}function s(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}function a(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),i=e&&e[1],n=e&&e[2];if(!i.length)return 0;i=parseFloat(i);var o=m[n]||1;return i*o}var h=t.console,u=t.jQuery,d=function(){},l=0,c={};r.namespace="outlayer",r.Item=o,r.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var f=r.prototype;n.extend(f,e.prototype),f.option=function(t){n.extend(this.options,t)},f._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},r.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},f._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),n.extend(this.element.style,this.options.containerStyle);var t=this._getOption("resize");t&&this.bindResize()},f.reloadItems=function(){this.items=this._itemize(this.element.children)},f._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],o=0;o<e.length;o++){var r=e[o],s=new i(r,this);n.push(s)}return n},f._filterFindItemElements=function(t){return n.filterFindElements(t,this.options.itemSelector)},f.getItemElements=function(){return this.items.map(function(t){return t.element})},f.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},f._init=f.layout,f._resetLayout=function(){this.getSize()},f.getSize=function(){this.size=i(this.element)},f._getMeasurement=function(t,e){var n,o=this.options[t];o?("string"==typeof o?n=this.element.querySelector(o):o instanceof HTMLElement&&(n=o),this[t]=n?i(n)[e]:o):this[t]=0},f.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},f._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},f._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){var i=[];t.forEach(function(t){var n=this._getItemLayoutPosition(t);n.item=t,n.isInstant=e||t.isLayoutInstant,i.push(n)},this),this._processLayoutQueue(i)}},f._getItemLayoutPosition=function(){return{x:0,y:0}},f._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},f.updateStagger=function(){var t=this.options.stagger;return null===t||void 0===t?void(this.stagger=0):(this.stagger=a(t),this.stagger)},f._positionItem=function(t,e,i,n,o){n?t.goTo(e,i):(t.stagger(o*this.stagger),t.moveTo(e,i))},f._postLayout=function(){this.resizeContainer()},f.resizeContainer=function(){var t=this._getOption("resizeContainer");if(t){var e=this._getContainerSize();e&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))}},f._getContainerSize=d,f._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},f._emitCompleteOnItems=function(t,e){function i(){o.dispatchEvent(t+"Complete",null,[e])}function n(){s++,s==r&&i()}var o=this,r=e.length;if(!e||!r)return void i();var s=0;e.forEach(function(e){e.once(t,n)})},f.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;if(this.emitEvent(t,n),u)if(this.$element=this.$element||u(this.element),e){var o=u.Event(e);o.type=t,this.$element.trigger(o,i)}else this.$element.trigger(t,i)},f.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},f.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},f.stamp=function(t){t=this._find(t),t&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},f.unstamp=function(t){t=this._find(t),t&&t.forEach(function(t){n.removeFrom(this.stamps,t),this.unignore(t)},this)},f._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=n.makeArray(t)):void 0},f._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},f._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},f._manageStamp=d,f._getElementOffset=function(t){var e=t.getBoundingClientRect(),n=this._boundingRect,o=i(t),r={left:e.left-n.left-o.marginLeft,top:e.top-n.top-o.marginTop,right:n.right-e.right-o.marginRight,bottom:n.bottom-e.bottom-o.marginBottom};return r},f.handleEvent=n.handleEvent,f.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},f.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},f.onresize=function(){this.resize()},n.debounceMethod(r,"onresize",100),f.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},f.needsResizeLayout=function(){var t=i(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},f.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},f.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},f.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},f.reveal=function(t){if(this._emitCompleteOnItems("reveal",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.reveal()})}},f.hide=function(t){if(this._emitCompleteOnItems("hide",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.hide()})}},f.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},f.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},f.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},f.getItems=function(t){t=n.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getItem(t);i&&e.push(i)},this),e},f.remove=function(t){var e=this.getItems(t);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach(function(t){t.remove(),n.removeFrom(this.items,t)},this)},f.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();var e=this.element.outlayerGUID;delete c[e],delete this.element.outlayerGUID,u&&u.removeData(this.element,this.constructor.namespace)},r.data=function(t){t=n.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&c[e]},r.create=function(t,e){var i=s(r);return i.defaults=n.extend({},r.defaults),n.extend(i.defaults,e),i.compatOptions=n.extend({},r.compatOptions),i.namespace=t,i.data=r.data,i.Item=s(o),n.htmlInit(i,t),u&&u.bridget&&u.bridget(t,i),i};var m={ms:1,s:1e3};return r.Item=o,r}),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer"),require("get-size")):t.Masonry=e(t.Outlayer,t.getSize)}(window,function(t,e){var i=t.create("masonry");i.compatOptions.fitWidth="isFitWidth";var n=i.prototype;return n._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},n.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}var n=this.columnWidth+=this.gutter,o=this.containerWidth+this.gutter,r=o/n,s=n-o%n,a=s&&1>s?"round":"floor";r=Math[a](r),this.cols=Math.max(r,1)},n.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,n=e(i);this.containerWidth=n&&n.innerWidth},n._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&1>e?"round":"ceil",n=Math[i](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var o=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",r=this[o](n,t),s={x:this.columnWidth*r.col,y:r.y},a=r.y+t.size.outerHeight,h=n+r.col,u=r.col;h>u;u++)this.colYs[u]=a;return s},n._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},n._getTopColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;i>n;n++)e[n]=this._getColGroupY(n,t);return e},n._getColGroupY=function(t,e){if(2>e)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},n._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,n=t>1&&i+t>this.cols;i=n?0:i;var o=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=o?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},n._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this._getOption("originLeft"),r=o?n.left:n.right,s=r+i.outerWidth,a=Math.floor(r/this.columnWidth);a=Math.max(0,a);var h=Math.floor(s/this.columnWidth);h-=s%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var u=this._getOption("originTop"),d=(u?n.top:n.bottom)+i.outerHeight,l=a;h>=l;l++)this.colYs[l]=Math.max(d,this.colYs[l])},n._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},n._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},n.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i});
9863/*! 9864 * SmartMenus jQuery Plugin - v1.1.0 - September 17, 2017 9865 * http://www.smartmenus.org/ 9866 * 9867 * Copyright Vasil Dinkov, Vadikom Web Ltd. 9868 * http://vadikom.com 9869 * 9870 * Licensed MIT 9871 */ 9872 9873(function(factory) { 9874if (typeof define === 'function' && define.amd) { 9875// AMD 9876define(['jquery'], factory); 9877} else if (typeof module === 'object' && typeof module.exports === 'object') { 9878// CommonJS 9879module.exports = factory(require('jquery')); 9880} else { 9881// Global jQuery 9882factory(jQuery); 9883} 9884} (function($) { 9885 9886var menuTrees = [], 9887mouse = false, // optimize for touch by default - we will detect for mouse input 9888touchEvents = 'ontouchstart' in window, // we use this just to choose between toucn and pointer events, not for touch screen detection 9889mouseDetectionEnabled = false, 9890requestAnimationFrame = window.requestAnimationFrame || function(callback) { return setTimeout(callback, 1000 / 60); }, 9891cancelAnimationFrame = window.cancelAnimationFrame || function(id) { clearTimeout(id); }, 9892canAnimate = !!$.fn.animate; 9893 9894// Handle detection for mouse input (i.e. desktop browsers, tablets with a mouse, etc.) 9895function initMouseDetection(disable) { 9896var eNS = '.smartmenus_mouse'; 9897if (!mouseDetectionEnabled && !disable) { 9898// if we get two consecutive mousemoves within 2 pixels from each other and within 300ms, we assume a real mouse/cursor is present 9899// in practice, this seems like impossible to trick unintentianally with a real mouse and a pretty safe detection on touch devices (even with older browsers that do not support touch events) 9900var firstTime = true, 9901lastMove = null, 9902events = { 9903'mousemove': function(e) { 9904var thisMove = { x: e.pageX, y: e.pageY, timeStamp: new Date().getTime() }; 9905if (lastMove) { 9906var deltaX = Math.abs(lastMove.x - thisMove.x), 9907deltaY = Math.abs(lastMove.y - thisMove.y); 9908 if ((deltaX > 0 || deltaY > 0) && deltaX <= 2 && deltaY <= 2 && thisMove.timeStamp - lastMove.timeStamp <= 300) { 9909mouse = true; 9910// if this is the first check after page load, check if we are not over some item by chance and call the mouseenter handler if yes 9911if (firstTime) { 9912var $a = $(e.target).closest('a'); 9913if ($a.is('a')) { 9914$.each(menuTrees, function() { 9915if ($.contains(this.$root[0], $a[0])) { 9916this.itemEnter({ currentTarget: $a[0] }); 9917return false; 9918} 9919}); 9920} 9921firstTime = false; 9922} 9923} 9924} 9925lastMove = thisMove; 9926} 9927}; 9928events[touchEvents ? 'touchstart' : 'pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut'] = function(e) { 9929if (isTouchEvent(e.originalEvent)) { 9930mouse = false; 9931} 9932}; 9933$(document).on(getEventsNS(events, eNS)); 9934mouseDetectionEnabled = true; 9935} else if (mouseDetectionEnabled && disable) { 9936$(document).off(eNS); 9937mouseDetectionEnabled = false; 9938} 9939} 9940 9941function isTouchEvent(e) { 9942return !/^(4|mouse)$/.test(e.pointerType); 9943} 9944 9945// returns a jQuery on() ready object 9946function getEventsNS(events, eNS) { 9947if (!eNS) { 9948eNS = ''; 9949} 9950var eventsNS = {}; 9951for (var i in events) { 9952eventsNS[i.split(' ').join(eNS + ' ') + eNS] = events[i]; 9953} 9954return eventsNS; 9955} 9956 9957$.SmartMenus = function(elm, options) { 9958this.$root = $(elm); 9959this.opts = options; 9960this.rootId = ''; // internal 9961this.accessIdPrefix = ''; 9962this.$subArrow = null; 9963this.activatedItems = []; // stores last activated A's for each level 9964this.visibleSubMenus = []; // stores visible sub menus UL's (might be in no particular order) 9965this.showTimeout = 0; 9966this.hideTimeout = 0; 9967this.scrollTimeout = 0; 9968this.clickActivated = false; 9969this.focusActivated = false; 9970this.zIndexInc = 0; 9971this.idInc = 0; 9972this.$firstLink = null; // we'll use these for some tests 9973this.$firstSub = null; // at runtime so we'll cache them 9974this.disabled = false; 9975this.$disableOverlay = null; 9976this.$touchScrollingSub = null; 9977this.cssTransforms3d = 'perspective' in elm.style || 'webkitPerspective' in elm.style; 9978this.wasCollapsible = false; 9979this.init(); 9980}; 9981 9982$.extend($.SmartMenus, { 9983hideAll: function() { 9984$.each(menuTrees, function() { 9985this.menuHideAll(); 9986}); 9987}, 9988destroy: function() { 9989while (menuTrees.length) { 9990menuTrees[0].destroy(); 9991} 9992initMouseDetection(true); 9993}, 9994prototype: { 9995init: function(refresh) { 9996var self = this; 9997 9998if (!refresh) { 9999menuTrees.push(this); 10000 10001this.rootId = (new Date().getTime() + Math.random() + '').replace(/\D/g, ''); 10002this.accessIdPrefix = 'sm-' + this.rootId + '-'; 10003 10004if (this.$root.hasClass('sm-rtl')) { 10005this.opts.rightToLeftSubMenus = true; 10006} 10007 10008// init root (main menu) 10009var eNS = '.smartmenus'; 10010this.$root 10011.data('smartmenus', this) 10012.attr('data-smartmenus-id', this.rootId) 10013.dataSM('level', 1) 10014.on(getEventsNS({ 10015'mouseover focusin': $.proxy(this.rootOver, this), 10016'mouseout focusout': $.proxy(this.rootOut, this), 10017'keydown': $.proxy(this.rootKeyDown, this) 10018}, eNS)) 10019.on(getEventsNS({ 10020'mouseenter': $.proxy(this.itemEnter, this), 10021'mouseleave': $.proxy(this.itemLeave, this), 10022'mousedown': $.proxy(this.itemDown, this), 10023'focus': $.proxy(this.itemFocus, this), 10024'blur': $.proxy(this.itemBlur, this), 10025'click': $.proxy(this.itemClick, this) 10026}, eNS), 'a'); 10027 10028// hide menus on tap or click outside the root UL 10029eNS += this.rootId; 10030if (this.opts.hideOnClick) { 10031$(document).on(getEventsNS({ 10032'touchstart': $.proxy(this.docTouchStart, this), 10033'touchmove': $.proxy(this.docTouchMove, this), 10034'touchend': $.proxy(this.docTouchEnd, this), 10035// for Opera Mobile < 11.5, webOS browser, etc. we'll check click too 10036'click': $.proxy(this.docClick, this) 10037}, eNS)); 10038} 10039// hide sub menus on resize 10040$(window).on(getEventsNS({ 'resize orientationchange': $.proxy(this.winResize, this) }, eNS)); 10041 10042if (this.opts.subIndicators) { 10043this.$subArrow = $('<span/>').addClass('sub-arrow'); 10044if (this.opts.subIndicatorsText) { 10045this.$subArrow.html(this.opts.subIndicatorsText); 10046} 10047} 10048 10049// make sure mouse detection is enabled 10050initMouseDetection(); 10051} 10052 10053// init sub menus 10054this.$firstSub = this.$root.find('ul').each(function() { self.menuInit($(this)); }).eq(0); 10055 10056this.$firstLink = this.$root.find('a').eq(0); 10057 10058// find current item 10059if (this.opts.markCurrentItem) { 10060var reDefaultDoc = /(index|default)\.[^#\?\/]*/i, 10061reHash = /#.*/, 10062locHref = window.location.href.replace(reDefaultDoc, ''), 10063locHrefNoHash = locHref.replace(reHash, ''); 10064this.$root.find('a').each(function() { 10065var href = this.href.replace(reDefaultDoc, ''), 10066$this = $(this); 10067if (href == locHref || href == locHrefNoHash) { 10068$this.addClass('current'); 10069if (self.opts.markCurrentTree) { 10070$this.parentsUntil('[data-smartmenus-id]', 'ul').each(function() { 10071$(this).dataSM('parent-a').addClass('current'); 10072}); 10073} 10074} 10075}); 10076} 10077 10078// save initial state 10079this.wasCollapsible = this.isCollapsible(); 10080}, 10081destroy: function(refresh) { 10082if (!refresh) { 10083var eNS = '.smartmenus'; 10084this.$root 10085.removeData('smartmenus') 10086.removeAttr('data-smartmenus-id') 10087.removeDataSM('level') 10088.off(eNS); 10089eNS += this.rootId; 10090$(document).off(eNS); 10091$(window).off(eNS); 10092if (this.opts.subIndicators) { 10093this.$subArrow = null; 10094} 10095} 10096this.menuHideAll(); 10097var self = this; 10098this.$root.find('ul').each(function() { 10099var $this = $(this); 10100if ($this.dataSM('scroll-arrows')) { 10101$this.dataSM('scroll-arrows').remove(); 10102} 10103if ($this.dataSM('shown-before')) { 10104if (self.opts.subMenusMinWidth || self.opts.subMenusMaxWidth) { 10105$this.css({ width: '', minWidth: '', maxWidth: '' }).removeClass('sm-nowrap'); 10106} 10107if ($this.dataSM('scroll-arrows')) { 10108$this.dataSM('scroll-arrows').remove(); 10109} 10110$this.css({ zIndex: '', top: '', left: '', marginLeft: '', marginTop: '', display: '' }); 10111} 10112if (($this.attr('id') || '').indexOf(self.accessIdPrefix) == 0) { 10113$this.removeAttr('id'); 10114} 10115}) 10116.removeDataSM('in-mega') 10117.removeDataSM('shown-before') 10118.removeDataSM('scroll-arrows') 10119.removeDataSM('parent-a') 10120.removeDataSM('level') 10121.removeDataSM('beforefirstshowfired') 10122.removeAttr('role') 10123.removeAttr('aria-hidden') 10124.removeAttr('aria-labelledby') 10125.removeAttr('aria-expanded'); 10126this.$root.find('a.has-submenu').each(function() { 10127var $this = $(this); 10128if ($this.attr('id').indexOf(self.accessIdPrefix) == 0) { 10129$this.removeAttr('id'); 10130} 10131}) 10132.removeClass('has-submenu') 10133.removeDataSM('sub') 10134.removeAttr('aria-haspopup') 10135.removeAttr('aria-controls') 10136.removeAttr('aria-expanded') 10137.closest('li').removeDataSM('sub'); 10138if (this.opts.subIndicators) { 10139this.$root.find('span.sub-arrow').remove(); 10140} 10141if (this.opts.markCurrentItem) { 10142this.$root.find('a.current').removeClass('current'); 10143} 10144if (!refresh) { 10145this.$root = null; 10146this.$firstLink = null; 10147this.$firstSub = null; 10148if (this.$disableOverlay) { 10149this.$disableOverlay.remove(); 10150this.$disableOverlay = null; 10151} 10152menuTrees.splice($.inArray(this, menuTrees), 1); 10153} 10154}, 10155disable: function(noOverlay) { 10156if (!this.disabled) { 10157this.menuHideAll();
10158// display overlay over the menu to prevent interaction 10159if (!noOverlay && !this.opts.isPopup && this.$root.is(':visible')) { 10160var pos = this.$root.offset(); 10161this.$disableOverlay = $('<div class="sm-jquery-disable-overlay"/>').css({ 10162position: 'absolute', 10163top: pos.top, 10164left: pos.left, 10165width: this.$root.outerWidth(), 10166height: this.$root.outerHeight(), 10167zIndex: this.getStartZIndex(true), 10168opacity: 0 10169}).appendTo(document.body); 10170} 10171this.disabled = true; 10172} 10173}, 10174docClick: function(e) { 10175if (this.$touchScrollingSub) { 10176this.$touchScrollingSub = null; 10177return; 10178} 10179// hide on any click outside the menu or on a menu link 10180if (this.visibleSubMenus.length && !$.contains(this.$root[0], e.target) || $(e.target).closest('a').length) { 10181this.menuHideAll(); 10182} 10183}, 10184docTouchEnd: function(e) { 10185if (!this.lastTouch) { 10186return; 10187} 10188if (this.visibleSubMenus.length && (this.lastTouch.x2 === undefined || this.lastTouch.x1 == this.lastTouch.x2) && (this.lastTouch.y2 === undefined || this.lastTouch.y1 == this.lastTouch.y2) && (!this.lastTouch.target || !$.contains(this.$root[0], this.lastTouch.target))) { 10189if (this.hideTimeout) { 10190clearTimeout(this.hideTimeout); 10191this.hideTimeout = 0; 10192} 10193// hide with a delay to prevent triggering accidental unwanted click on some page element 10194var self = this; 10195this.hideTimeout = setTimeout(function() { self.menuHideAll(); }, 350); 10196} 10197this.lastTouch = null; 10198}, 10199docTouchMove: function(e) { 10200if (!this.lastTouch) { 10201return; 10202} 10203var touchPoint = e.originalEvent.touches[0]; 10204this.lastTouch.x2 = touchPoint.pageX; 10205this.lastTouch.y2 = touchPoint.pageY; 10206}, 10207docTouchStart: function(e) { 10208var touchPoint = e.originalEvent.touches[0]; 10209this.lastTouch = { x1: touchPoint.pageX, y1: touchPoint.pageY, target: touchPoint.target }; 10210}, 10211enable: function() { 10212if (this.disabled) { 10213if (this.$disableOverlay) { 10214this.$disableOverlay.remove(); 10215this.$disableOverlay = null; 10216} 10217this.disabled = false; 10218} 10219}, 10220getClosestMenu: function(elm) { 10221var $closestMenu = $(elm).closest('ul'); 10222while ($closestMenu.dataSM('in-mega')) { 10223$closestMenu = $closestMenu.parent().closest('ul'); 10224} 10225return $closestMenu[0] || null; 10226}, 10227getHeight: function($elm) { 10228return this.getOffset($elm, true); 10229}, 10230// returns precise width/height float values 10231getOffset: function($elm, height) { 10232var old; 10233if ($elm.css('display') == 'none') { 10234old = { position: $elm[0].style.position, visibility: $elm[0].style.visibility }; 10235$elm.css({ position: 'absolute', visibility: 'hidden' }).show(); 10236} 10237var box = $elm[0].getBoundingClientRect && $elm[0].getBoundingClientRect(), 10238val = box && (height ? box.height || box.bottom - box.top : box.width || box.right - box.left); 10239if (!val && val !== 0) { 10240val = height ? $elm[0].offsetHeight : $elm[0].offsetWidth; 10241} 10242if (old) { 10243$elm.hide().css(old); 10244} 10245return val; 10246}, 10247getStartZIndex: function(root) { 10248var zIndex = parseInt(this[root ? '$root' : '$firstSub'].css('z-index')); 10249if (!root && isNaN(zIndex)) { 10250zIndex = parseInt(this.$root.css('z-index')); 10251} 10252return !isNaN(zIndex) ? zIndex : 1; 10253}, 10254getTouchPoint: function(e) { 10255return e.touches && e.touches[0] || e.changedTouches && e.changedTouches[0] || e; 10256}, 10257getViewport: function(height) { 10258var name = height ? 'Height' : 'Width', 10259val = document.documentElement['client' + name], 10260val2 = window['inner' + name]; 10261if (val2) { 10262val = Math.min(val, val2); 10263} 10264return val; 10265}, 10266getViewportHeight: function() { 10267return this.getViewport(true); 10268}, 10269getViewportWidth: function() { 10270return this.getViewport(); 10271}, 10272getWidth: function($elm) { 10273return this.getOffset($elm); 10274}, 10275handleEvents: function() { 10276return !this.disabled && this.isCSSOn(); 10277}, 10278handleItemEvents: function($a) { 10279return this.handleEvents() && !this.isLinkInMegaMenu($a); 10280}, 10281isCollapsible: function() { 10282return this.$firstSub.css('position') == 'static'; 10283}, 10284isCSSOn: function() { 10285return this.$firstLink.css('display') != 'inline'; 10286}, 10287isFixed: function() { 10288var isFixed = this.$root.css('position') == 'fixed'; 10289if (!isFixed) { 10290this.$root.parentsUntil('body').each(function() { 10291if ($(this).css('position') == 'fixed') { 10292isFixed = true; 10293return false; 10294} 10295}); 10296} 10297return isFixed; 10298}, 10299isLinkInMegaMenu: function($a) { 10300return $(this.getClosestMenu($a[0])).hasClass('mega-menu'); 10301}, 10302isTouchMode: function() { 10303return !mouse || this.opts.noMouseOver || this.isCollapsible(); 10304}, 10305itemActivate: function($a, hideDeeperSubs) { 10306var $ul = $a.closest('ul'), 10307level = $ul.dataSM('level'); 10308// if for some reason the parent item is not activated (e.g. this is an API call to activate the item), activate all parent items first 10309if (level > 1 && (!this.activatedItems[level - 2] || this.activatedItems[level - 2][0] != $ul.dataSM('parent-a')[0])) { 10310var self = this; 10311$($ul.parentsUntil('[data-smartmenus-id]', 'ul').get().reverse()).add($ul).each(function() { 10312self.itemActivate($(this).dataSM('parent-a')); 10313}); 10314} 10315// hide any visible deeper level sub menus 10316if (!this.isCollapsible() || hideDeeperSubs) {
10317this.menuHideSubMenus(!this.activatedItems[level - 1] || this.activatedItems[level - 1][0] != $a[0] ? level - 1 : level); 10318} 10319// save new active item for this level 10320this.activatedItems[level - 1] = $a; 10321if (this.$root.triggerHandler('activate.smapi', $a[0]) === false) { 10322return; 10323} 10324// show the sub menu if this item has one 10325var $sub = $a.dataSM('sub'); 10326if ($sub && (this.isTouchMode() || (!this.opts.showOnClick || this.clickActivated))) { 10327this.menuShow($sub); 10328} 10329}, 10330itemBlur: function(e) { 10331var $a = $(e.currentTarget); 10332if (!this.handleItemEvents($a)) { 10333return; 10334} 10335this.$root.triggerHandler('blur.smapi', $a[0]); 10336}, 10337itemClick: function(e) { 10338var $a = $(e.currentTarget); 10339if (!this.handleItemEvents($a)) { 10340return; 10341} 10342if (this.$touchScrollingSub && this.$touchScrollingSub[0] == $a.closest('ul')[0]) { 10343this.$touchScrollingSub = null; 10344e.stopPropagation(); 10345return false; 10346} 10347if (this.$root.triggerHandler('click.smapi', $a[0]) === false) { 10348return false; 10349} 10350var subArrowClicked = $(e.target).is('.sub-arrow'), 10351$sub = $a.dataSM('sub'), 10352firstLevelSub = $sub ? $sub.dataSM('level') == 2 : false, 10353collapsible = this.isCollapsible(), 10354behaviorToggle = /toggle$/.test(this.opts.collapsibleBehavior), 10355behaviorLink = /link$/.test(this.opts.collapsibleBehavior), 10356behaviorAccordion = /^accordion/.test(this.opts.collapsibleBehavior); 10357// if the sub is hidden, try to show it 10358if ($sub && !$sub.is(':visible')) { 10359if (!behaviorLink || !collapsible || subArrowClicked) { 10360if (this.opts.showOnClick && firstLevelSub) { 10361this.clickActivated = true; 10362} 10363// try to activate the item and show the sub 10364this.itemActivate($a, behaviorAccordion); 10365// if "itemActivate" showed the sub, prevent the click so that the link is not loaded 10366// if it couldn't show it, then the sub menus are disabled with an !important declaration (e.g. via mobile styles) so let the link get loaded 10367if ($sub.is(':visible')) { 10368this.focusActivated = true; 10369return false; 10370} 10371} 10372// if the sub is visible and we are in collapsible mode 10373} else if (collapsible && (behaviorToggle || subArrowClicked)) { 10374this.itemActivate($a, behaviorAccordion); 10375this.menuHide($sub); 10376if (behaviorToggle) { 10377this.focusActivated = false; 10378} 10379return false; 10380} 10381if (this.opts.showOnClick && firstLevelSub || $a.hasClass('disabled') || this.$root.triggerHandler('select.smapi', $a[0]) === false) { 10382return false; 10383} 10384}, 10385itemDown: function(e) { 10386var $a = $(e.currentTarget); 10387if (!this.handleItemEvents($a)) { 10388return; 10389} 10390$a.dataSM('mousedown', true); 10391}, 10392itemEnter: function(e) { 10393var $a = $(e.currentTarget); 10394if (!this.handleItemEvents($a)) { 10395return; 10396} 10397if (!this.isTouchMode()) { 10398if (this.showTimeout) { 10399clearTimeout(this.showTimeout); 10400this.showTimeout = 0; 10401} 10402var self = this; 10403this.showTimeout = setTimeout(function() { self.itemActivate($a); }, this.opts.showOnClick && $a.closest('ul').dataSM('level') == 1 ? 1 : this.opts.showTimeout); 10404} 10405this.$root.triggerHandler('mouseenter.smapi', $a[0]); 10406}, 10407itemFocus: function(e) { 10408var $a = $(e.currentTarget); 10409if (!this.handleItemEvents($a)) { 10410return; 10411} 10412// fix (the mousedown check): in some browsers a tap/click produces consecutive focus + click events so we don't need to activate the item on focus 10413if (this.focusActivated && (!this.isTouchMode() || !$a.dataSM('mousedown')) && (!this.activatedItems.length || this.activatedItems[this.activatedItems.length - 1][0] != $a[0])) { 10414this.itemActivate($a, true); 10415} 10416this.$root.triggerHandler('focus.smapi', $a[0]); 10417}, 10418itemLeave: function(e) { 10419var $a = $(e.currentTarget); 10420if (!this.handleItemEvents($a)) { 10421return; 10422} 10423if (!this.isTouchMode()) { 10424$a[0].blur(); 10425if (this.showTimeout) { 10426clearTimeout(this.showTimeout); 10427this.showTimeout = 0; 10428} 10429} 10430$a.removeDataSM('mousedown'); 10431this.$root.triggerHandler('mouseleave.smapi', $a[0]); 10432}, 10433menuHide: function($sub) { 10434if (this.$root.triggerHandler('beforehide.smapi', $sub[0]) === false) { 10435return; 10436} 10437if (canAnimate) { 10438$sub.stop(true, true); 10439} 10440if ($sub.css('display') != 'none') { 10441var complete = function() { 10442// unset z-index 10443$sub.css('z-index', ''); 10444}; 10445// if sub is collapsible (mobile view) 10446if (this.isCollapsible()) { 10447if (canAnimate && this.opts.collapsibleHideFunction) { 10448this.opts.collapsibleHideFunction.call(this, $sub, complete); 10449} else { 10450$sub.hide(this.opts.collapsibleHideDuration, complete); 10451} 10452} else {
10453if (canAnimate && this.opts.hideFunction) { 10454this.opts.hideFunction.call(this, $sub, complete); 10455} else { 10456$sub.hide(this.opts.hideDuration, complete); 10457} 10458} 10459// deactivate scrolling if it is activated for this sub 10460if ($sub.dataSM('scroll')) { 10461this.menuScrollStop($sub); 10462$sub.css({ 'touch-action': '', '-ms-touch-action': '', '-webkit-transform': '', transform: '' }) 10463.off('.smartmenus_scroll').removeDataSM('scroll').dataSM('scroll-arrows').hide(); 10464} 10465// unhighlight parent item + accessibility 10466$sub.dataSM('parent-a').removeClass('highlighted').attr('aria-expanded', 'false'); 10467$sub.attr({ 10468'aria-expanded': 'false', 10469'aria-hidden': 'true' 10470}); 10471var level = $sub.dataSM('level'); 10472this.activatedItems.splice(level - 1, 1); 10473this.visibleSubMenus.splice($.inArray($sub, this.visibleSubMenus), 1); 10474this.$root.triggerHandler('hide.smapi', $sub[0]); 10475} 10476}, 10477menuHideAll: function() { 10478if (this.showTimeout) { 10479clearTimeout(this.showTimeout); 10480this.showTimeout = 0; 10481} 10482// hide all subs 10483// if it's a popup, this.visibleSubMenus[0] is the root UL 10484var level = this.opts.isPopup ? 1 : 0; 10485for (var i = this.visibleSubMenus.length - 1; i >= level; i--) { 10486this.menuHide(this.visibleSubMenus[i]); 10487} 10488// hide root if it's popup 10489if (this.opts.isPopup) { 10490if (canAnimate) { 10491this.$root.stop(true, true); 10492} 10493if (this.$root.is(':visible')) { 10494if (canAnimate && this.opts.hideFunction) { 10495this.opts.hideFunction.call(this, this.$root); 10496} else { 10497this.$root.hide(this.opts.hideDuration); 10498} 10499} 10500} 10501this.activatedItems = []; 10502this.visibleSubMenus = []; 10503this.clickActivated = false; 10504this.focusActivated = false; 10505// reset z-index increment 10506this.zIndexInc = 0; 10507this.$root.triggerHandler('hideAll.smapi'); 10508}, 10509menuHideSubMenus: function(level) { 10510for (var i = this.activatedItems.length - 1; i >= level; i--) { 10511var $sub = this.activatedItems[i].dataSM('sub'); 10512if ($sub) { 10513this.menuHide($sub); 10514} 10515} 10516}, 10517menuInit: function($ul) { 10518if (!$ul.dataSM('in-mega')) { 10519// mark UL's in mega drop downs (if any) so we can neglect them 10520if ($ul.hasClass('mega-menu')) { 10521$ul.find('ul').dataSM('in-mega', true); 10522} 10523// get level (much faster than, for example, using parentsUntil) 10524var level = 2, 10525par = $ul[0]; 10526while ((par = par.parentNode.parentNode) != this.$root[0]) { 10527level++; 10528} 10529// cache stuff for quick access 10530var $a = $ul.prevAll('a').eq(-1); 10531// if the link is nested (e.g. in a heading) 10532if (!$a.length) { 10533$a = $ul.prevAll().find('a').eq(-1); 10534} 10535$a.addClass('has-submenu').dataSM('sub', $ul); 10536$ul.dataSM('parent-a', $a) 10537.dataSM('level', level) 10538.parent().dataSM('sub', $ul); 10539// accessibility 10540var aId = $a.attr('id') || this.accessIdPrefix + (++this.idInc), 10541ulId = $ul.attr('id') || this.accessIdPrefix + (++this.idInc); 10542$a.attr({ 10543id: aId, 10544'aria-haspopup': 'true', 10545'aria-controls': ulId, 10546'aria-expanded': 'false' 10547}); 10548$ul.attr({ 10549id: ulId, 10550'role': 'group', 10551'aria-hidden': 'true', 10552'aria-labelledby': aId, 10553'aria-expanded': 'false' 10554}); 10555// add sub indicator to parent item 10556if (this.opts.subIndicators) { 10557$a[this.opts.subIndicatorsPos](this.$subArrow.clone()); 10558} 10559} 10560}, 10561menuPosition: function($sub) { 10562var $a = $sub.dataSM('parent-a'), 10563$li = $a.closest('li'), 10564$ul = $li.parent(), 10565level = $sub.dataSM('level'), 10566subW = this.getWidth($sub), 10567subH = this.getHeight($sub), 10568itemOffset = $a.offset(), 10569itemX = itemOffset.left, 10570itemY = itemOffset.top, 10571itemW = this.getWidth($a), 10572itemH = this.getHeight($a), 10573$win = $(window), 10574winX = $win.scrollLeft(), 10575winY = $win.scrollTop(), 10576winW = this.getViewportWidth(), 10577winH = this.getViewportHeight(), 10578horizontalParent = $ul.parent().is('[data-sm-horizontal-sub]') || level == 2 && !$ul.hasClass('sm-vertical'), 10579rightToLeft = this.opts.rightToLeftSubMenus && !$li.is('[data-sm-reverse]') || !this.opts.rightToLeftSubMenus && $li.is('[data-sm-reverse]'), 10580subOffsetX = level == 2 ? this.opts.mainMenuSubOffsetX : this.opts.subMenusSubOffsetX, 10581subOffsetY = level == 2 ? this.opts.mainMenuSubOffsetY : this.opts.subMenusSubOffsetY, 10582x, y; 10583if (horizontalParent) { 10584x = rightToLeft ? itemW - subW - subOffsetX : subOffsetX; 10585y = this.opts.bottomToTopSubMenus ? -subH - subOffsetY : itemH + subOffsetY; 10586} else { 10587x = rightToLeft ? subOffsetX - subW : itemW - subOffsetX; 10588y = this.opts.bottomToTopSubMenus ? itemH - subOffsetY - subH : subOffsetY; 10589} 10590if (this.opts.keepInViewport) { 10591var absX = itemX + x, 10592absY = itemY + y; 10593if (rightToLeft && absX < winX) { 10594x = horizontalParent ? winX - absX + x : itemW - subOffsetX; 10595} else if (!rightToLeft && absX + subW > winX + winW) { 10596x = horizontalParent ? winX + winW - subW - absX + x : subOffsetX - subW; 10597} 10598if (!horizontalParent) { 10599if (subH < winH && absY + subH > winY + winH) { 10600y += winY + winH - subH - absY; 10601} else if (subH >= winH || absY < winY) { 10602y += winY - absY; 10603} 10604} 10605// do we need scrolling? 10606// 0.49 used for better precision when dealing with float values 10607if (horizontalParent && (absY + subH > winY + winH + 0.49 || absY < winY) || !horizontalParent && subH > winH + 0.49) { 10608var self = this; 10609if (!$sub.dataSM('scroll-arrows')) { 10610$sub.dataSM('scroll-arrows', $([$('<span class="scroll-up"><span class="scroll-up-arrow"></span></span>')[0], $('<span class="scroll-down"><span class="scroll-down-arrow"></span></span>')[0]]) 10611.on({ 10612mouseenter: function() { 10613$sub.dataSM('scroll').up = $(this).hasClass('scroll-up'); 10614self.menuScroll($sub); 10615}, 10616mouseleave: function(e) { 10617self.menuScrollStop($sub); 10618self.menuScrollOut($sub, e); 10619}, 10620'mousewheel DOMMouseScroll': function(e) { e.preventDefault(); } 10621}) 10622.insertAfter($sub) 10623); 10624} 10625// bind scroll events and save scroll data for this sub 10626var eNS = '.smartmenus_scroll'; 10627$sub.dataSM('scroll', { 10628y: this.cssTransforms3d ? 0 : y - itemH, 10629step: 1,
10630// cache stuff for faster recalcs later 10631itemH: itemH, 10632subH: subH, 10633arrowDownH: this.getHeight($sub.dataSM('scroll-arrows').eq(1)) 10634}) 10635.on(getEventsNS({ 10636'mouseover': function(e) { self.menuScrollOver($sub, e); }, 10637'mouseout': function(e) { self.menuScrollOut($sub, e); }, 10638'mousewheel DOMMouseScroll': function(e) { self.menuScrollMousewheel($sub, e); } 10639}, eNS)) 10640.dataSM('scroll-arrows').css({ top: 'auto', left: '0', marginLeft: x + (parseInt($sub.css('border-left-width')) || 0), width: subW - (parseInt($sub.css('border-left-width')) || 0) - (parseInt($sub.css('border-right-width')) || 0), zIndex: $sub.css('z-index') }) 10641.eq(horizontalParent && this.opts.bottomToTopSubMenus ? 0 : 1).show(); 10642// when a menu tree is fixed positioned we allow scrolling via touch too 10643// since there is no other way to access such long sub menus if no mouse is present 10644if (this.isFixed()) { 10645var events = {}; 10646events[touchEvents ? 'touchstart touchmove touchend' : 'pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp'] = function(e) { 10647self.menuScrollTouch($sub, e); 10648}; 10649$sub.css({ 'touch-action': 'none', '-ms-touch-action': 'none' }).on(getEventsNS(events, eNS)); 10650} 10651} 10652} 10653$sub.css({ top: 'auto', left: '0', marginLeft: x, marginTop: y - itemH }); 10654}, 10655menuScroll: function($sub, once, step) { 10656var data = $sub.dataSM('scroll'), 10657$arrows = $sub.dataSM('scroll-arrows'), 10658end = data.up ? data.upEnd : data.downEnd, 10659diff; 10660if (!once && data.momentum) { 10661data.momentum *= 0.92; 10662diff = data.momentum; 10663if (diff < 0.5) { 10664this.menuScrollStop($sub); 10665return; 10666} 10667} else { 10668diff = step || (once || !this.opts.scrollAccelerate ? this.opts.scrollStep : Math.floor(data.step)); 10669} 10670// hide any visible deeper level sub menus 10671var level = $sub.dataSM('level'); 10672if (this.activatedItems[level - 1] && this.activatedItems[level - 1].dataSM('sub') && this.activatedItems[level - 1].dataSM('sub').is(':visible')) { 10673this.menuHideSubMenus(level - 1); 10674} 10675data.y = data.up && end <= data.y || !data.up && end >= data.y ? data.y : (Math.abs(end - data.y) > diff ? data.y + (data.up ? diff : -diff) : end); 10676$sub.css(this.cssTransforms3d ? { '-webkit-transform': 'translate3d(0, ' + data.y + 'px, 0)', transform: 'translate3d(0, ' + data.y + 'px, 0)' } : { marginTop: data.y }); 10677// show opposite arrow if appropriate 10678if (mouse && (data.up && data.y > data.downEnd || !data.up && data.y < data.upEnd)) { 10679$arrows.eq(data.up ? 1 : 0).show(); 10680} 10681// if we've reached the end 10682if (data.y == end) { 10683if (mouse) { 10684$arrows.eq(data.up ? 0 : 1).hide(); 10685} 10686this.menuScrollStop($sub); 10687} else if (!once) { 10688if (this.opts.scrollAccelerate && data.step < this.opts.scrollStep) { 10689data.step += 0.2; 10690} 10691var self = this; 10692this.scrollTimeout = requestAnimationFrame(function() { self.menuScroll($sub); }); 10693} 10694}, 10695menuScrollMousewheel: function($sub, e) { 10696if (this.getClosestMenu(e.target) == $sub[0]) { 10697e = e.originalEvent; 10698var up = (e.wheelDelta || -e.detail) > 0; 10699if ($sub.dataSM('scroll-arrows').eq(up ? 0 : 1).is(':visible')) { 10700$sub.dataSM('scroll').up = up; 10701this.menuScroll($sub, true); 10702} 10703} 10704e.preventDefault(); 10705}, 10706menuScrollOut: function($sub, e) { 10707if (mouse) { 10708if (!/^scroll-(up|down)/.test((e.relatedTarget || '').className) && ($sub[0] != e.relatedTarget && !$.contains($sub[0], e.relatedTarget) || this.getClosestMenu(e.relatedTarget) != $sub[0])) { 10709$sub.dataSM('scroll-arrows').css('visibility', 'hidden'); 10710} 10711} 10712}, 10713menuScrollOver: function($sub, e) { 10714if (mouse) { 10715if (!/^scroll-(up|down)/.test(e.target.className) && this.getClosestMenu(e.target) == $sub[0]) { 10716this.menuScrollRefreshData($sub); 10717var data = $sub.dataSM('scroll'), 10718upEnd = $(window).scrollTop() - $sub.dataSM('parent-a').offset().top - data.itemH; 10719$sub.dataSM('scroll-arrows').eq(0).css('margin-top', upEnd).end() 10720.eq(1).css('margin-top', upEnd + this.getViewportHeight() - data.arrowDownH).end() 10721.css('visibility', 'visible'); 10722} 10723} 10724}, 10725menuScrollRefreshData: function($sub) { 10726var data = $sub.dataSM('scroll'), 10727upEnd = $(window).scrollTop() - $sub.dataSM('parent-a').offset().top - data.itemH; 10728if (this.cssTransforms3d) { 10729upEnd = -(parseFloat($sub.css('margin-top')) - upEnd); 10730} 10731$.extend(data, { 10732upEnd: upEnd,
10733downEnd: upEnd + this.getViewportHeight() - data.subH 10734}); 10735}, 10736menuScrollStop: function($sub) { 10737if (this.scrollTimeout) { 10738cancelAnimationFrame(this.scrollTimeout); 10739this.scrollTimeout = 0; 10740$sub.dataSM('scroll').step = 1; 10741return true; 10742} 10743}, 10744menuScrollTouch: function($sub, e) { 10745e = e.originalEvent; 10746if (isTouchEvent(e)) { 10747var touchPoint = this.getTouchPoint(e); 10748// neglect event if we touched a visible deeper level sub menu 10749if (this.getClosestMenu(touchPoint.target) == $sub[0]) { 10750var data = $sub.dataSM('scroll'); 10751if (/(start|down)$/i.test(e.type)) { 10752if (this.menuScrollStop($sub)) { 10753// if we were scrolling, just stop and don't activate any link on the first touch 10754e.preventDefault(); 10755this.$touchScrollingSub = $sub; 10756} else { 10757this.$touchScrollingSub = null; 10758} 10759// update scroll data since the user might have zoomed, etc. 10760this.menuScrollRefreshData($sub); 10761// extend it with the touch properties 10762$.extend(data, { 10763touchStartY: touchPoint.pageY, 10764touchStartTime: e.timeStamp 10765}); 10766} else if (/move$/i.test(e.type)) { 10767var prevY = data.touchY !== undefined ? data.touchY : data.touchStartY; 10768if (prevY !== undefined && prevY != touchPoint.pageY) { 10769this.$touchScrollingSub = $sub; 10770var up = prevY < touchPoint.pageY; 10771// changed direction? reset... 10772if (data.up !== undefined && data.up != up) { 10773$.extend(data, { 10774touchStartY: touchPoint.pageY, 10775touchStartTime: e.timeStamp 10776}); 10777} 10778$.extend(data, { 10779up: up, 10780touchY: touchPoint.pageY 10781}); 10782this.menuScroll($sub, true, Math.abs(touchPoint.pageY - prevY)); 10783} 10784e.preventDefault(); 10785} else { // touchend/pointerup 10786if (data.touchY !== undefined) { 10787if (data.momentum = Math.pow(Math.abs(touchPoint.pageY - data.touchStartY) / (e.timeStamp - data.touchStartTime), 2) * 15) { 10788this.menuScrollStop($sub); 10789this.menuScroll($sub); 10790e.preventDefault(); 10791} 10792delete data.touchY; 10793} 10794} 10795} 10796} 10797}, 10798menuShow: function($sub) { 10799if (!$sub.dataSM('beforefirstshowfired')) { 10800$sub.dataSM('beforefirstshowfired', true); 10801if (this.$root.triggerHandler('beforefirstshow.smapi', $sub[0]) === false) { 10802return; 10803} 10804} 10805if (this.$root.triggerHandler('beforeshow.smapi', $sub[0]) === false) { 10806return; 10807} 10808$sub.dataSM('shown-before', true); 10809if (canAnimate) { 10810$sub.stop(true, true); 10811} 10812if (!$sub.is(':visible')) { 10813// highlight parent item 10814var $a = $sub.dataSM('parent-a'), 10815collapsible = this.isCollapsible(); 10816if (this.opts.keepHighlighted || collapsible) { 10817$a.addClass('highlighted'); 10818} 10819if (collapsible) { 10820$sub.removeClass('sm-nowrap').css({ zIndex: '', width: 'auto', minWidth: '', maxWidth: '', top: '', left: '', marginLeft: '', marginTop: '' }); 10821} else { 10822// set z-index 10823$sub.css('z-index', this.zIndexInc = (this.zIndexInc || this.get
10823StartZIndex()) + 1); 10824// min/max-width fix - no way to rely purely on CSS as all UL's are nested 10825if (this.opts.subMenusMinWidth || this.opts.subMenusMaxWidth) { 10826$sub.css({ width: 'auto', minWidth: '', maxWidth: '' }).addClass('sm-nowrap'); 10827if (this.opts.subMenusMinWidth) { 10828 $sub.css('min-width', this.opts.subMenusMinWidth); 10829} 10830if (this.opts.subMenusMaxWidth) { 10831 var noMaxWidth = this.getWidth($sub); 10832 $sub.css('max-width', this.opts.subMenusMaxWidth); 10833if (noMaxWidth > this.getWidth($sub)) { 10834$sub.removeClass('sm-nowrap').css('width', this.opts.subMenusMaxWidth); 10835} 10836} 10837} 10838this.menuPosition($sub); 10839} 10840var complete = function() { 10841// fix: "overflow: hidden;" is not reset on animation complete in jQuery < 1.9.0 in Chrome when global "box-sizing: border-box;" is used 10842$sub.css('overflow', ''); 10843}; 10844// if sub is collapsible (mobile view) 10845if (collapsible) { 10846if (canAnimate && this.opts.collapsibleShowFunction) { 10847this.opts.collapsibleShowFunction.call(this, $sub, complete); 10848} else { 10849$sub.show(this.opts.collapsibleShowDuration, complete); 10850} 10851} else { 10852if (canAnimate && this.opts.showFunction) { 10853this.opts.showFunction.call(this, $sub, complete); 10854} else { 10855$sub.show(this.opts.showDuration, complete); 10856} 10857} 10858// accessibility 10859$a.attr('aria-expanded', 'true'); 10860$sub.attr({ 10861'aria-expanded': 'true', 10862'aria-hidden': 'false' 10863}); 10864// store sub menu in visible array 10865this.visibleSubMenus.push($sub); 10866this.$root.triggerHandler('show.smapi', $sub[0]); 10867} 10868}, 10869popupHide: function(noHideTimeout) { 10870if (this.hideTimeout) { 10871clearTimeout(this.hideTimeout); 10872this.hideTimeout = 0; 10873} 10874var self = this; 10875this.hideTimeout = setTimeout(function() { 10876self.menuHideAll(); 10877}, noHideTimeout ? 1 : this.opts.hideTimeout); 10878}, 10879popupShow: function(left, top) { 10880if (!this.opts.isPopup) { 10881alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'); 10882return; 10883} 10884if (this.hideTimeout) { 10885clearTimeout(this.hideTimeout); 10886this.hideTimeout = 0; 10887} 10888this.$root.dataSM('shown-before', true); 10889if (canAnimate) { 10890this.$root.stop(true, true); 10891} 10892if (!this.$root.is(':visible')) { 10893this.$root.css({ left: left, top: top }); 10894// show menu 10895var self = this, 10896complete = function() { 10897self.$root.css('overflow', ''); 10898}; 10899if (canAnimate && this.opts.showFunction) { 10900this.opts.showFunction.call(this, this.$root, complete); 10901} else { 10902this.$root.show(this.opts.showDuration, complete); 10903} 10904this.visibleSubMenus[0] = this.$root; 10905} 10906}, 10907refresh: function() { 10908this.destroy(true); 10909this.init(true); 10910}, 10911rootKeyDown: function(e) { 10912if (!this.handleEvents()) { 10913return; 10914} 10915switch (e.keyCode) { 10916case 27: // reset on Esc 10917var $activeTopItem = this.activatedItems[0]; 10918if ($activeTopItem) { 10919this.menuHideAll(); 10920$activeTopItem[0].focus(); 10921var $sub = $activeTopItem.dataSM('sub'); 10922if ($sub) { 10923this.menuHide($sub); 10924} 10925} 10926break; 10927case 32: // activate item's sub on Space 10928var $target = $(e.target); 10929if ($target.is('a') && this.handleItemEvents($target)) { 10930var $sub = $target.dataSM('sub'); 10931if ($sub && !$sub.is(':visible')) { 10932this.itemClick({ currentTarget: e.target }); 10933e.preventDefault(); 10934} 10935} 10936break; 10937} 10938}, 10939rootOut: function(e) { 10940if (!this.handleEvents() || this.isTouchMode() || e.target == this.$root[0]) { 10941return; 10942} 10943if (this.hideTimeout) { 10944clearTimeout(this.hideTimeout); 10945this.hideTimeout = 0; 10946} 10947if (!this.opts.showOnClick || !this.opts.hideOnClick) { 10948var self = this; 10949this.hideTimeout = setTimeout(function() { self.menuHideAll(); }, this.opts.hideTimeout); 10950} 10951}, 10952rootOver: function(e) { 10953if (!this.handleEvents() || this.isTouchMode() || e.target == this.$root[0]) { 10954return; 10955} 10956if (this.hideTimeout) { 10957clearTimeout(this.hideTimeout); 10958this.hideTimeout = 0; 10959} 10960}, 10961winResize: function(e) { 10962if (!this.handleEvents()) { 10963// we still need to resize the disable overlay if it's visible 10964if (this.$disableOverlay) { 10965var pos = this.$root.offset(); 10966 this.$disableOverlay.css({ 10967top: pos.top, 10968left: pos.left, 10969width: this.$root.outerWidth(), 10970height: this.$root.outerHeight() 10971}); 10972} 10973return; 10974} 10975// hide sub menus on resize - on mobile do it only on orientation change 10976if (!('onorientationchange' in window) || e.type == 'orientationchange') { 10977var collapsible = this.isCollapsible(); 10978// if it was collapsible before resize and still is, don't do it 10979if (!(this.wasCollapsible && collapsible)) { 10980if (this.activatedItems.length) { 10981this.activatedItems[this.activatedItems.length - 1][0].blur(); 10982} 10983this.menuHideAll(); 10984} 10985this.wasCollapsible = collapsible; 10986} 10987} 10988} 10989}); 10990 10991$.fn.dataSM = function(key, val) { 10992if (val) { 10993return this.data(key + '_smartmenus', val); 10994} 10995return this.data(key + '_smartmenus'); 10996}; 10997 10998$.fn.removeDataSM = function(key) { 10999return this.removeData(key + '_smartmenus'); 11000}; 11001 11002$.fn.smartmenus = function(options) { 11003if (typeof options == 'string') { 11004var args = arguments, 11005method = options; 11006Array.prototype.shift.call(args); 11007return this.each(function() { 11008var smartmenus = $(this).data('smartmenus'); 11009if (smartmenus && smartmenus[method]) { 11010smartmenus[method].apply(smartmenus, args); 11011} 11012}); 11013} 11014return this.each(function() { 11015// [data-sm-options] attribute on the root UL 11016var dataOpts = $(this).data('sm-options') || null; 11017if (dataOpts) { 11018try { 11019dataOpts = eval('(' + dataOpts + ')'); 11020} catch(e) { 11021dataOpts = null;
11022alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.'); 11023}; 11024} 11025new $.SmartMenus(this, $.extend({}, $.fn.smartmenus.defaults, options, dataOpts)); 11026}); 11027}; 11028 11029// default settings 11030$.fn.smartmenus.defaults = { 11031isPopup:false,// is this a popup menu (can be shown via the popupShow/popupHide methods) or a permanent menu bar 11032mainMenuSubOffsetX:0,// pixels offset from default position 11033mainMenuSubOffsetY:0,// pixels offset from default position 11034subMenusSubOffsetX:0,// pixels offset from default position 11035subMenusSubOffsetY:0,// pixels offset from default position 11036subMenusMinWidth:'10em',// min-width for the sub menus (any CSS unit) - if set, the fixed width set in CSS will be ignored 11037subMenusMaxWidth:'20em',// max-width for the sub menus (any CSS unit) - if set, the fixed width set in CSS will be ignored 11038subIndicators: true,// create sub menu indicators - creates a SPAN and inserts it in the A 11039subIndicatorsPos: 'append',// position of the SPAN relative to the menu item content ('append', 'prepend') 11040subIndicatorsText:'',// [optionally] add text in the SPAN (e.g. '+') (you may want to check the CSS for the sub indicators too) 11041scrollStep: 30,// pixels step when scrolling long sub menus that do not fit in the viewport height 11042scrollAccelerate: true,// accelerate scrolling or use a fixed step 11043 11044showTimeout:0,// timeout before showing the sub menus 11045hideTimeout:50,// timeout before hiding the sub menus 11046 11047showDuration:0,// duration for show animation - set to 0 for no animation - matters only if showFunction:null 11048showFunction:null,// custom function to use when showing a sub menu (the default is the jQuery 'show') 11049// don't forget to call complete() at the end of whatever you do 11050// e.g.: function($ul, complete) { $ul.fadeIn(250, complete); } 11051hideDuration:0,// duration for hide animation - set to 0 for no animation - matters only if hideFunction:null 11052hideFunction:function($ul, complete) { $ul.fadeOut(200, complete); },// custom function to use when hiding a sub menu (the default is the jQuery 'hide') 11053// don't forget to call complete() at the end of whatever you do 11054// e.g.: function($ul, complete) { $ul.fadeOut(250, complete); } 11055collapsibleShowDuration:0,// duration for show animation for collapsible sub menus - matters only if collapsibleShowFunction:null 11056collapsibleShowFunction:function($ul, complete) { $ul.slideDown(200, complete); },// custom function to use when showing a collapsible sub menu 11057// (i.e. when mobile styles are used to make the sub menus collapsible) 11058collapsibleHideDuration:0,// duration for hide animation for collapsible sub menus - matters only if collapsibleHideFunction:null 11059collapsibleHideFunction:function($ul, complete) { $ul.slideUp(200, complete); },// custom function to use when hiding a collapsible sub menu 11060// (i.e. when mobile styles are used to make the sub menus collapsible) 11061showOnClick:false,// show the first-level sub menus onclick instead of onmouseover (i.e. mimic desktop app menus) (matters only for mouse input) 11062hideOnClick:true,// hide the sub menus on click/tap anywhere on the page 11063noMouseOver:false,// disable sub menus activation onmouseover (i.e. behave like in touch mode - use just mouse clicks) (matters only for mouse input) 11064keepInViewport:true,// reposition the sub menus if needed to make sure they always appear inside the viewport 11065keepHighlighted:true,// keep all ancestor items of the current sub menu highlighted (adds the 'highlighted' class to the A's) 11066markCurrentItem:false,// automatically add the 'current' class to the A element of the item linking to the current URL 11067markCurrentTree:true,// add the 'current' class also to the A elements of all ancestor items of the current item 11068rightToLeftSubMenus:false,// right to left display of the sub menus (check the CSS for the sub indicators' position) 11069bottomToTopSubMenus:false,// bottom to top display of the sub menus 11070collapsibleBehavior:'default'// parent items behavior in collapsible (mobile) view ('default', 'toggle', 'link', 'accordion', 'accordion-toggle', 'accordion-link') 11071// 'default' - first tap on parent item expands sub, second tap loads its link 11072// 'toggle' - the whole parent item acts just as a toggle button for its sub menu (expands/collapses on each tap) 11073// 'link' - the parent item acts as a regular item (first tap loads its link), the sub menu can be expanded only via the +/- button 11074// 'accordion' - like 'default' but on expand also resets any visible sub menus from deeper levels or other branches 11075// 'accordion-toggle' - like 'toggle' but on expand also resets any visible sub menus from deeper levels or other branches 11076// 'accordion-link' - like 'link' but on expand also resets any visible sub menus from deeper levels or other branches 11077}; 11078 11079return $; 11080}));/*! 11081 * SmartMenus jQuery Plugin Bootstrap Addon - v0.4.1 - September 17, 2017 11082 * http://www.smartmenus.org/ 11083 * 11084 * Copyright Vasil Dinkov, Vadikom Web Ltd. 11085 * http://vadikom.com 11086 * 11087 * Licensed MIT 11088 */ 11089 11090(function(factory) { 11091if (typeof define === 'function' && define.amd) { 11092// AMD 11093define(['jquery', 'smartmenus'], factory); 11094} else if (typeof module === 'object' && typeof module.exports === 'object') { 11095// CommonJS 11096module.exports = factory(require('jquery')); 11097} else { 11098// Global jQuery 11099factory(jQuery); 11100} 11101} (function($) { 11102 11103$.extend($.SmartMenus.Bootstrap = {}, { 11104keydownFix: false, 11105init: function() { 11106// init all navbars that don't have the "data-sm-skip" attribute set 11107var $navbars = $('ul.navbar-nav:not([data-sm-skip])'); 11108$navbars.each(function() { 11109var $this = $(this), 11110obj = $this.data('smartmenus'); 11111// if this navbar is not initialized 11112if (!obj) { 11113$this.smartmenus({ 11114// these are some good default options that should work for all 11115subMenusSubOffsetX: 2, 11116subMenusSubOffsetY: -6, 11117subIndicators: false, 11118collapsibleShowFunction: null, 11119collapsibleHideFunction: null, 11120rightToLeftSubMenus: $this.hasClass('navbar-right'), 11121bottomToTopSubMenus: $this.closest('.navbar').hasClass('navbar-fixed-bottom') 11122}) 11123.on({ 11124// set/unset proper Bootstrap classes for some menu elements 11125'show.smapi': function(e, menu) { 11126var $menu = $(menu), 11127$scrollArrows = $menu.dataSM('scroll-arrows'); 11128if ($scrollArrows) { 11129// they inherit border-color from body, so we can use its background-color too 11130$scrollArrows.css('background-color', $(document.body).css('background-color')); 11131} 11132$menu.parent().addClass('open'); 11133}, 11134'hide.smapi': function(e, menu) { 11135$(menu).parent().removeClass('open'); 11136} 11137}); 11138 11139function onInit() { 11140// set Bootstrap's "active" class to SmartMenus "current" items (should someone decide to enable markCurrentItem: true) 11141$this.find('a.current').parent().addClass('active'); 11142// remove any Bootstrap required attributes that might cause conflicting issues with the SmartMenus script 11143$this.find('a.has-submenu').each(function() { 11144var $this = $(this); 11145if ($this.is('[data-toggle="dropdown"]')) { 11146$this.dataSM('bs-data-toggle-dropdown', true).removeAttr('data-toggle'); 11147} 11148if ($this.is('[role="button"]')) { 11149$this.dataSM('bs-role-button', true).removeAttr('role'); 11150} 11151}); 11152} 11153 11154onInit(); 11155 11156function onBeforeDestroy() { 11157$this.find('a.current').parent().removeClass('active'); 11158$this.find('a.has-submenu').each(function() { 11159var $this = $(this); 11160if ($this.dataSM('bs-data-toggle-dropdown')) { 11161$this.attr('data-toggle', 'dropdown').removeDataSM('bs-data-toggle-dropdown'); 11162} 11163if ($this.dataSM('bs-role-button')) { 11164$this.attr('role', 'button').removeDataSM('bs-role-button'); 11165} 11166}
11166); 11167} 11168 11169obj = $this.data('smartmenus'); 11170 11171// custom "isCollapsible" method for Bootstrap 11172obj.isCollapsible = function() { 11173return !/^(left|right)$/.test(this.$firstLink.parent().css('float')) && this.$root.css('display') == 'block'; 11174}; 11175 11176// custom "refresh" method for Bootstrap 11177obj.refresh = function() { 11178$.SmartMenus.prototype.refresh.call(this); 11179onInit(); 11180// update collapsible detection 11181detectCollapsible(true); 11182}; 11183 11184// custom "destroy" method for Bootstrap 11185obj.destroy = function(refresh) { 11186onBeforeDestroy(); 11187$.SmartMenus.prototype.destroy.call(this, refresh); 11188}; 11189 11190// keep Bootstrap's default behavior for parent items when the "data-sm-skip-collapsible-behavior" attribute is set to the ul.navbar-nav 11191// i.e. use the whole item area just as a sub menu toggle and don't customize the carets 11192if ($this.is('[data-sm-skip-collapsible-behavior]')) { 11193obj.opts.collapsibleBehavior = 'toggle'; 11194} 11195 11196// onresize detect when the navbar becomes collapsible and add it the "sm-collapsible" class 11197var winW; 11198function detectCollapsible(force) { 11199var newW = obj.getViewportWidth(); 11200if (newW != winW || force) { 11201var $carets = $this.find('.caret'); 11202if (obj.isCollapsible()) { 11203$this.addClass('sm-collapsible'); 11204// set "navbar-toggle" class to carets (so they look like a button) if the "data-sm-skip-collapsible-behavior" attribute is not set to the ul.navbar-nav 11205if (!$this.is('[data-sm-skip-collapsible-behavior]')) { 11206$carets.addClass('navbar-toggle sub-arrow'); 11207} 11208} else { 11209$this.removeClass('sm-collapsible'); 11210if (!$this.is('[data-sm-skip-collapsible-behavior]')) { 11211$carets.removeClass('navbar-toggle sub-arrow'); 11212} 11213} 11214winW = newW; 11215} 11216} 11217detectCollapsible(); 11218$(window).on('resize.smartmenus' + obj.rootId, detectCollapsible); 11219} 11220}); 11221// keydown fix for Bootstrap 3.3.5+ conflict 11222if ($navbars.length && !$.SmartMenus.Bootstrap.keydownFix) { 11223// unhook BS keydown handler for all dropdowns 11224$(document).off('keydown.bs.dropdown.data-api', '.dropdown-menu'); 11225// restore BS keydown handler for dropdowns that are not inside SmartMenus navbars 11226if ($.fn.dropdown && $.fn.dropdown.Constructor) { 11227$(document).on('keydown.bs.dropdown.data-api', '.dropdown-menu:not([id^="sm-"])', $.fn.dropdown.Constructor.prototype.keydown); 11228} 11229$.SmartMenus.Bootstrap.keydownFix = true; 11230} 11231} 11232}); 11233 11234// init ondomready 11235$($.SmartMenus.Bootstrap.init); 11236 11237return $; 11238})); 11239function isUrl(n){if(n.substring(0,1)==="/")return!0;return/^(ftp|http|https|):{0,1}\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/.test(n)}var bootstrapModal={};bootstrapModal.showModal=function(n,t,i,r,u,f,e){var c='<div id="'+e+'" class="modal '+u+'" tabindex="-1" role="dialog"><div class="modal-dialog modal-'+r+'"><div class="modal-content"><\/div><\/div><\/div>',o,s,h;$("body").append(c);o='<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×<\/span><\/button>
11239'+n+"<\/div>";$("#"+e+" .modal-content").append(o);s='<div class="modal-body">'+t+"<\/div>";$("#"+e+" .modal-content").append(s);i!==""&&(h='<div class="modal-footer">'+i+"<\/div>",$("#"+e+" .modal-content").append(h));$.isNumeric(t)?$.ajax({url:`/fend/request/reqArticle.asp?article_id=${t}&doNotRedirect=true`,success:function(n){$(`#${e} .modal-body`).html(n)}}):isUrl(t)?($(`#${e} .modal-body`).html('<p><em class="fa fa-2x fa-cog fa-spin"><\/em> Loading...<\/p>'),$.ajax({url:t,success:function(n){$(`#${e} .modal-body`).html(n)}})):$(`#${e} .modal-body`).html(t);f?(backdrop=!0,keyboard=!0):(backdrop="static",keyboard=!1);$(`#${e}`).on("show.bs.modal",function(){var t=$(".modal:visible").length,n;t>0&&(n=parseInt($(this).css("z-index"))+10*t,$(this).css("z-index",n),setTimeout(function(){$(".modal-backdrop").last().css("z-index",n-1)},0))});$("#"+e+"").on("hidden.bs.modal",function(){$(".modal .select-actions").removeClass("active");$("#"+e+"").remove()}).modal({backdrop:backdrop,keyboard:keyboard,show:!0})};/*! 11240 * @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2015 11241 * @version 1.3.3 11242 * 11243 * Date formatter utility library that allows formatting date/time variables or Date objects using PHP DateTime format. 11244 * @see http://php.net/manual/en/function.date.php 11245 * 11246 * For more JQuery plugins visit http://plugins.krajee.com 11247 * For more Yii related demos visit http://demos.krajee.com 11248 */ 11249var DateFormatter; 11250(function () { 11251"use strict"; 11252 11253var _compare, _lpad, _extend, defaultSettings, DAY, HOUR; 11254DAY = 1000 * 60 * 60 * 24; 11255HOUR = 3600; 11256 11257_compare = function (str1, str2) { 11258return typeof (str1) === 'string' && typeof (str2) === 'string' && str1.toLowerCase() === str2.toLowerCase(); 11259}; 11260_lpad = function (value, length, char) { 11261var chr = char || '0', val = value.toString(); 11262return val.length < length ? _lpad(chr + val, length) : val; 11263}; 11264_extend = function (out) { 11265var i, obj; 11266out = out || {}; 11267for (i = 1; i < arguments.length; i++) { 11268obj = arguments[i]; 11269if (!obj) { 11270continue; 11271} 11272for (var key in obj) { 11273if (obj.hasOwnProperty(key)) { 11274if (typeof obj[key] === 'object') { 11275_extend(out[key], obj[key]); 11276} else { 11277out[key] = obj[key]; 11278} 11279} 11280} 11281} 11282return out; 11283}; 11284defaultSettings = { 11285dateSettings: { 11286days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], 11287daysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], 11288months: [ 11289'January', 'February', 'March', 'April', 'May', 'June', 'July', 11290'August', 'September', 'October', 'November', 'December' 11291], 11292monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], 11293meridiem: ['AM', 'PM'], 11294ordinal: function (number) { 11295var n = number % 10, suffixes = { 1: 'st', 2: 'nd', 3: 'rd' }; 11296return Math.floor(number % 100 / 10) === 1 || !suffixes[n] ? 'th' : suffixes[n]; 11297} 11298}, 11299separators: /[ \-+\/\.T:@]/g, 11300validParts: /[dDjlNSwzWFmMntLoYyaABgGhHisueTIOPZcrU]/g, 11301intParts: /[djwNzmnyYhHgGis]/g, 11302tzParts: /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g, 11303tzClip: /[^-+\dA-Z]/g 11304}; 11305 11306DateFormatter = function (options) { 11307var self = this, config = _extend(defaultSettings, options); 11308self.dateSettings = config.dateSettings; 11309self.separators = config.separators; 11310self.validParts = config.validParts; 11311self.intParts = config.intParts; 11312self.tzParts = config.tzParts; 11313self.tzClip = config.tzClip; 11314}; 11315 11316DateFormatter.prototype = { 11317constructor: DateFormatter, 11318parseDate: function (vDate, vFormat) { 11319var self = this, vFormatParts, vDateParts, i, vDateFlag = false, vTimeFlag = false, vDatePart, iDatePart, 11320vSettings = self.dateSettings, vMonth, vMeriIndex, vMeriOffset, len, mer, 11321out = { date: null, year: null, month: null, day: null, hour: 0, min: 0, sec: 0 }; 11322if (!vDate) { 11323return undefined; 11324} 11325if (vDate instanceof Date) { 11326return vDate; 11327} 11328if (typeof vDate === 'number') { 11329return new Date(vDate); 11330} 11331if (vFormat === 'U') { 11332i = parseInt(vDate); 11333return i ? new Date(i * 1000) : vDate; 11334} 11335if (typeof vDate !== 'string') { 11336return ''; 11337} 11338vFormatParts = vFormat.match(self.validParts); 11339if (!vFormatParts || vFormatParts.length === 0) { 11340throw new Error("Invalid date format definition."); 11341} 11342vDateParts = vDate.replace(self.separators, '\0').split('\0'); 11343for (i = 0; i < vDateParts.length; i++) { 11344vDatePart = vDateParts[i]; 11345iDatePart = parseInt(vDatePart); 11346switch (vFormatParts[i]) { 11347case 'y': 11348case 'Y': 11349len = vDatePart.length; 11350if (len === 2) { 11351out.year = parseInt((iDatePart < 70 ? '20' : '19') + vDatePart); 11352} else if (len === 4) { 11353out.year = iDatePart; 11354} 11355vDateFlag = true; 11356break; 11357case 'm': 11358case 'n': 11359case 'M': 11360case 'F': 11361if (isNaN(vDatePart)) { 11362vMonth = vSettings.monthsShort.indexOf(vDatePart); 11363if (vMonth > -1) { 11364out.month = vMonth + 1; 11365} 11366vMonth = vSettings.months.indexOf(vDatePart); 11367if (vMonth > -1) { 11368out.month = vMonth + 1; 11369} 11370} else { 11371if (iDatePart >= 1 && iDatePart <= 12) { 11372out.month = iDatePart; 11373} 11374} 11375vDateFlag = true; 11376break; 11377case 'd': 11378case 'j': 11379if (iDatePart >= 1 && iDatePart <= 31) { 11380out.day = iDatePart; 11381} 11382vDateFlag = true; 11383break; 11384case 'g': 11385case 'h': 11386vMeriIndex = (vFormatParts.indexOf('a') > -1) ? vFormatParts.indexOf('a') : 11387(vFormatParts.indexOf('A') > -1) ? vFormatParts.indexOf('A') : -1; 11388mer = vDateParts[vMeriIndex]; 11389if (vMeriIndex > -1) { 11390vMeriOffset = _compare(mer, vSettings.meridiem[0]) ? 0 : 11391(_compare(mer, vSettings.meridiem[1]) ? 12 : -1); 11392if (iDatePart >= 1 && iDatePart <= 12 && vMeriOffset > -1) { 11393out.hour = iDatePart + vMeriOffset - 1; 11394} else if (iDatePart >= 0 && iDatePart <= 23) { 11395out.hour = iDatePart; 11396} 11397} else if (iDatePart >= 0 && iDatePart <= 23) { 11398out.hour = iDatePart; 11399} 11400vTimeFlag = true; 11401break; 11402case 'G': 11403case 'H': 11404if (iDatePart >= 0 && iDatePart <= 23) { 11405out.hour = iDatePart; 11406} 11407vTimeFlag = true; 11408break; 11409case 'i': 11410if (iDatePart >= 0 && iDatePart <= 59) { 11411out.min = iDatePart; 11412} 11413vTimeFlag = true; 11414break; 11415case 's': 11416if (iDatePart >= 0 && iDatePart <= 59) { 11417out.sec = iDatePart; 11418} 11419vTimeFlag = true; 11420break; 11421} 11422} 11423if (vDateFlag === true && out.year && out.month && out.day) { 11424out.date = new Date(out.year, out.month - 1, out.day, out.hour, out.min, out.sec, 0); 11425} else { 11426if (vTimeFlag !== true) { 11427return false; 11428} 11429out.date = new Date(0, 0, 0, out.hour, out.min, out.sec, 0); 11430} 11431return out.date; 11432}, 11433guessDate: function (vDateStr, vFormat) { 11434if (typeof vDateStr !== 'string') { 11435return vDateStr; 11436} 11437var self = this, vParts = vDateStr.replace(self.separators, '\0').split('\0'), vPattern = /^[djmn]/g, 11438vFormatParts = vFormat.match(self.validParts), vDate = new Date(), vDigit = 0, vYear, i, iPart, iSec; 11439 11440if (!vPattern.test(vFormatParts[0])) { 11441return vDateStr; 11442} 11443 11444for (i = 0; i < vParts.length; i++) { 11445vDigit = 2; 11446iPart = vParts[i]; 11447iSec = parseInt(iPart.substr(0, 2)); 11448switch (i) { 11449case 0: 11450if (vFormatParts[0] === 'm' || vFormatParts[0] === 'n') { 11451vDate.setMonth(iSec - 1); 11452} else { 11453vDate.setDate(iSec); 11454} 11455break; 11456case 1: 11457if (vFormatParts[0] === 'm' || vFormatParts[0] === 'n') { 11458vDate.setDate(iSec); 11459} else { 11460vDate.setMonth(iSec - 1); 11461} 11462break; 11463case 2: 11464vYear = vDate.getFullYear(); 11465if (iPart.length < 4) { 11466vDate.setFullYear(parseInt(vYear.toString().substr(0, 4 - iPart.length) + iPart)); 11467vDigit = iPart.length; 11468} else { 11469vDate.setFullYear = parseInt(iPart.substr(0, 4)); 11470vDigit = 4; 11471} 11472break; 11473case 3: 11474vDate.setHours(iSec); 11475break; 11476case 4: 11477vDate.setMinutes(iSec); 11478break; 11479case 5: 11480vDate.setSeconds(iSec); 11481break; 11482} 11483if (iPart.substr(vDigit).length > 0) { 11484vParts.splice(i + 1, 0, iPart.substr(vDigit)); 11485} 11486} 11487return vDate; 11488}, 11489parseFormat: function (vChar, vDate) { 11490var self = this, vSettings = self.dateSettings, fmt, backspace = /\\?(.?)/gi, doFormat = function (t, s) { 11491return fmt[t] ? fmt[t]() : s; 11492}; 11493fmt = { 11494///////// 11495// DAY // 11496///////// 11497/** 11498 * Day of month with leading 0: `01..31` 11499 * @return {string} 11500 */ 11501d: function () { 11502return _lpad(fmt.j(), 2); 11503}, 11504/** 11505 * Shorthand day name: `Mon...Sun` 11506 * @return {string} 11507 */ 11508D: function () { 11509return vSettings.daysShort[fmt.w()]; 11510}, 11511/** 11512 * Day of month: `1..31` 11513 * @return {number} 11514 */ 11515j: function () { 11516return vDate.getDate(); 11517}, 11518/** 11519 * Full day name: `Monday...Sunday` 11520 * @return {number} 11521 */ 11522l: function () { 11523return vSettings.days[fmt.w()]; 11524}, 11525/** 11526 * ISO-8601 day of week: `1[Mon]..7[Sun]` 11527 * @return {number} 11528 */ 11529N: function () { 11530return fmt.w() || 7; 11531}, 11532/** 11533 * Day of week: `0[Sun]..6[Sat]` 11534 * @return {number} 11535 */ 11536w: function () { 11537return vDate.getDay(); 11538}, 11539/** 11540 * Day of year: `0..365` 11541 * @return {number} 11542 */ 11543z: function () { 11544var a = new Date(fmt.Y(), fmt.n() - 1, fmt.j()), b = new Date(fmt.Y(), 0, 1); 11545return Math.round((a - b) / DAY); 11546}, 11547 11548////////// 11549// WEEK // 11550////////// 11551/** 11552 * ISO-8601 week number 11553 * @return {number} 11554 */ 11555W: function () { 11556var a = new Date(fmt.Y(), fmt.n() - 1, fmt.j() - fmt.N() + 3), b = new Date(a.getFullYear(), 0, 4); 11557return _lpad(1 + Math.round((a - b) / DAY / 7), 2); 11558}, 11559 11560/////////// 11561// MONTH // 11562/////////// 11563/** 11564 * Full month name: `January...December` 11565 * @return {string} 11566 */ 11567F: function () { 11568return vSettings.months[vDate.getMonth()];
11569}, 11570/** 11571 * Month w/leading 0: `01..12` 11572 * @return {string} 11573 */ 11574m: function () { 11575return _lpad(fmt.n(), 2); 11576}, 11577/** 11578 * Shorthand month name; `Jan...Dec` 11579 * @return {string} 11580 */ 11581M: function () { 11582return vSettings.monthsShort[vDate.getMonth()]; 11583}, 11584/** 11585 * Month: `1...12` 11586 * @return {number} 11587 */ 11588n: function () { 11589return vDate.getMonth() + 1; 11590}, 11591/** 11592 * Days in month: `28...31` 11593 * @return {number} 11594 */ 11595t: function () { 11596return (new Date(fmt.Y(), fmt.n(), 0)).getDate(); 11597}, 11598 11599////////// 11600// YEAR // 11601////////// 11602/** 11603 * Is leap year? `0 or 1` 11604 * @return {number} 11605 */ 11606L: function () { 11607var Y = fmt.Y(); 11608return (Y % 4 === 0 && Y % 100 !== 0 || Y % 400 === 0) ? 1 : 0; 11609}, 11610/** 11611 * ISO-8601 year 11612 * @return {number} 11613 */ 11614o: function () { 11615var n = fmt.n(), W = fmt.W(), Y = fmt.Y(); 11616return Y + (n === 12 && W < 9 ? 1 : n === 1 && W > 9 ? -1 : 0); 11617}, 11618/** 11619 * Full year: `e.g. 1980...2010` 11620 * @return {number} 11621 */ 11622Y: function () { 11623return vDate.getFullYear(); 11624}, 11625/** 11626 * Last two digits of year: `00...99` 11627 * @return {string} 11628 */ 11629y: function () { 11630return fmt.Y().toString().slice(-2); 11631}, 11632 11633////////// 11634// TIME // 11635////////// 11636/** 11637 * Meridian lower: `am or pm` 11638 * @return {string} 11639 */ 11640a: function () { 11641return fmt.A().toLowerCase(); 11642}, 11643/** 11644 * Meridian upper: `AM or PM` 11645 * @return {string} 11646 */ 11647A: function () { 11648var n = fmt.G() < 12 ? 0 : 1; 11649return vSettings.meridiem[n]; 11650}, 11651/** 11652 * Swatch Internet time: `000..999` 11653 * @return {string} 11654 */ 11655B: function () { 11656var H = vDate.getUTCHours() * HOUR, i = vDate.getUTCMinutes() * 60, s = vDate.getUTCSeconds(); 11657return _lpad(Math.floor((H + i + s + HOUR) / 86.4) % 1000, 3); 11658}, 11659/** 11660 * 12-Hours: `1..12` 11661 * @return {number} 11662 */ 11663g: function () { 11664return fmt.G() % 12 || 12; 11665}, 11666/** 11667 * 24-Hours: `0..23` 11668 * @return {number} 11669 */ 11670G: function () { 11671return vDate.getHours(); 11672}, 11673/** 11674 * 12-Hours with leading 0: `01..12` 11675 * @return {string} 11676 */ 11677h: function () { 11678return _lpad(fmt.g(), 2); 11679}, 11680/** 11681 * 24-Hours w/leading 0: `00..23` 11682 * @return {string} 11683 */ 11684H: function () { 11685return _lpad(fmt.G(), 2); 11686}, 11687/** 11688 * Minutes w/leading 0: `00..59` 11689 * @return {string} 11690 */ 11691i: function () { 11692return _lpad(vDate.getMinutes(), 2); 11693}, 11694/** 11695 * Seconds w/leading 0: `00..59` 11696 * @return {string} 11697 */ 11698s: function () { 11699return _lpad(vDate.getSeconds(), 2); 11700}, 11701/** 11702 * Microseconds: `000000-999000` 11703 * @return {string} 11704 */ 11705u: function () { 11706return _lpad(vDate.getMilliseconds() * 1000, 6); 11707}, 11708 11709////////////// 11710// TIMEZONE // 11711////////////// 11712/** 11713 * Timezone identifier: `e.g. Atlantic/Azores, ...` 11714 * @return {string} 11715 */ 11716e: function () { 11717var str = /\((.*)\)/.exec(String(vDate))[1]; 11718return str || 'Coordinated Universal Time'; 11719}, 11720/** 11721 * Timezone abbreviation: `e.g. EST, MDT, ...` 11722 * @return {string} 11723 */ 11724T: function () { 11725var str = (String(vDate).match(self.tzParts) || [""]).pop().replace(self.tzClip, ""); 11726return str || 'UTC'; 11727}, 11728/** 11729 * DST observed? `0 or 1` 11730 * @return {number} 11731 */ 11732I: function () { 11733var a = new Date(fmt.Y(), 0), c = Date.UTC(fmt.Y(), 0), 11734b = new Date(fmt.Y(), 6), d = Date.UTC(fmt.Y(), 6); 11735return ((a - c) !== (b - d)) ? 1 : 0; 11736}, 11737/** 11738 * Difference to GMT in hour format: `e.g. +0200` 11739 * @return {string} 11740 */ 11741O: function () { 11742var tzo = vDate.getTimezoneOffset(), a = Math.abs(tzo); 11743return (tzo > 0 ? '-' : '+') + _lpad(Math.floor(a / 60) * 100 + a % 60, 4); 11744}, 11745/** 11746 * Difference to GMT with colon: `e.g. +02:00` 11747 * @return {string} 11748 */ 11749P: function () { 11750var O = fmt.O(); 11751return (O.substr(0, 3) + ':' + O.substr(3, 2)); 11752}, 11753/** 11754 * Timezone offset in seconds: `-43200...50400` 11755 * @return {number} 11756 */ 11757Z: function () { 11758return -vDate.getTimezoneOffset() * 60; 11759}, 11760 11761//////////////////// 11762// FULL DATE TIME // 11763//////////////////// 11764/** 11765 * ISO-8601 date 11766 * @return {string} 11767 */ 11768c: function () { 11769return 'Y-m-d\\TH:i:sP'.replace(backspace, doFormat); 11770}, 11771/** 11772 * RFC 2822 date 11773 * @return {string} 11774 */ 11775r: function () { 11776return 'D, d M Y H:i:s O'.replace(backspace, doFormat); 11777}, 11778/** 11779 * Seconds since UNIX epoch 11780 * @return {number} 11781 */ 11782U: function () { 11783return vDate.getTime() / 1000 || 0; 11784} 11785}; 11786return doFormat(vChar, vChar); 11787}, 11788formatDate: function (vDate, vFormat) { 11789var self = this, i, n, len, str, vChar, vDateStr = ''; 11790if (typeof vDate === 'string') { 11791vDate = self.parseDate(vDate, vFormat); 11792if (vDate === false) { 11793return false; 11794} 11795} 11796if (vDate instanceof Date) { 11797len = vFormat.length; 11798for (i = 0; i < len; i++) { 11799vChar = vFormat.charAt(i); 11800if (vChar === 'S') { 11801continue; 11802} 11803str = self.parseFormat(vChar, vDate); 11804if (i !== (len - 1) && self.intParts.test(vChar) && vFormat.charAt(i + 1) === 'S') { 11805n = parseInt(str); 11806str += self.dateSettings.ordinal(n); 11807} 11808vDateStr += str; 11809} 11810return vDateStr; 11811} 11812return ''; 11813} 11814}; 11815})();/** 11816 * @preserve jQuery DateTimePicker plugin v2.5.4 11817 * @homepage http://xdsoft.net/jqplugins/datetimepicker/ 11818 * @author Chupurnov Valeriy (<[email protected]>) 11819 */ 11820/*global DateFormatter, document,window,jQuery,setTimeout,clearTimeout,HighlightedDate,getCurrentValue*/ 11821; (function (factory) { 11822if (typeof define === 'function' && define.amd) { 11823// AMD. Register as an anonymous module. 11824define(['jquery', 'jquery-mousewheel'], factory); 11825} else if (typeof exports === 'object') {
11826// Node/CommonJS style for Browserify 11827module.exports = factory; 11828} else { 11829// Browser globals 11830factory(jQuery); 11831} 11832}(function ($) { 11833'use strict'; 11834var default_options = { 11835i18n: { 11836ar: { // Arabic 11837months: [ 11838"ÙØ§ÙÙÙ Ø§ÙØ«Ø§ÙÙ", "شباط", "آذار", "ÙÙØ³Ø§Ù", "٠اÙÙ", "ØØ²ÙراÙ", "ØªÙ ÙØ²", "آب", "Ø£ÙÙÙÙ", "تشرÙÙ Ø§ÙØ£ÙÙ", "تشرÙÙ Ø§ÙØ«Ø§ÙÙ", "ÙØ§ÙÙÙ Ø§ÙØ£ÙÙ" 11839], 11840dayOfWeekShort: [ 11841"Ù", "Ø«", "ع", "Ø®", "ج", "س", "Ø" 11842], 11843dayOfWeek: ["Ø§ÙØ£ØØ¯", "Ø§ÙØ§Ø«ÙÙÙ", "Ø§ÙØ«Ùاثاء", "Ø§ÙØ£Ø±Ø¨Ø¹Ø§Ø¡", "Ø§ÙØ®Ù ÙØ³", "Ø§ÙØ¬Ù عة", "Ø§ÙØ³Ø¨Øª", "Ø§ÙØ£ØØ¯"] 11844}, 11845ro: { // Romanian 11846months: [ 11847"Ianuarie", "Februarie", "Martie", "Aprilie", "Mai", "Iunie", "Iulie", "August", "Septembrie", "Octombrie", "Noiembrie", "Decembrie" 11848], 11849dayOfWeekShort: [ 11850"Du", "Lu", "Ma", "Mi", "Jo", "Vi", "Sâ" 11851], 11852dayOfWeek: ["DuminicÄ", "Luni", "MarÅ£i", "Miercuri", "Joi", "Vineri", "SâmbÄtÄ"] 11853}, 11854id: { // Indonesian 11855months: [ 11856"Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember" 11857], 11858dayOfWeekShort: [ 11859"Min", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab" 11860], 11861dayOfWeek: ["Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu"] 11862}, 11863is: { // Icelandic 11864months: [ 11865"Janúar", "Febrúar", "Mars", "AprÃl", "MaÃ", "JúnÃ", "JúlÃ", "Ãgúst", "September", "Október", "Nóvember", "Desember" 11866], 11867dayOfWeekShort: [ 11868"Sun", "Mán", "Ãrið", "Mið", "Fim", "Fös", "Lau" 11869], 11870dayOfWeek: ["Sunnudagur", "Mánudagur", "Ãriðjudagur", "Miðvikudagur", "Fimmtudagur", "Föstudagur", "Laugardagur"] 11871}, 11872bg: { // Bulgarian 11873months: [ 11874"ЯнÑаÑи", "ФевÑÑаÑи", "ÐаÑÑ", "ÐпÑил", "Ðай", "Юни", "Юли", "ÐвгÑÑÑ", "СепÑемвÑи", "ÐкÑомвÑи", "ÐоемвÑи", "ÐекемвÑи" 11875], 11876dayOfWeekShort: [ 11877"Ðд", "Ðн", "ÐÑ", "СÑ", "ЧÑ", "ÐÑ", "Сб" 11878], 11879dayOfWeek: ["ÐеделÑ", "Ðонеделник", "ÐÑоÑник", "СÑÑда", "ЧеÑвÑÑÑÑк", "ÐеÑÑк", "СÑбоÑа"] 11880}, 11881fa: { // Persian/Farsi 11882months: [ 11883'ÙØ±ÙردÛÙ', 'Ø§Ø±Ø¯ÛØ¨Ùشت', 'خرداد', 'ØªÛØ±', '٠رداد', 'Ø´ÙØ±ÛÙØ±', 'Ù ÙØ±', 'آباÙ', 'آذر', 'دÛ', 'بÙÙ Ù', 'اسÙÙØ¯' 11884], 11885dayOfWeekShort: [ 11886'ÛÚ©Ø´ÙØ¨Ù', 'Ø¯ÙØ´ÙبÙ', 'Ø³Ù Ø´ÙØ¨Ù', 'ÚÙØ§Ø±Ø´ÙبÙ', 'Ù¾ÙØ¬Ø´ÙبÙ', 'ج٠عÙ', 'Ø´ÙØ¨Ù' 11887], 11888dayOfWeek: ["ÛÚ©âØ´ÙØ¨Ù", "Ø¯ÙØ´ÙبÙ", "سÙâØ´ÙØ¨Ù", "ÚÙØ§Ø±Ø´ÙبÙ", "Ù¾ÙØ¬âØ´ÙØ¨Ù", "ج٠عÙ", "Ø´ÙØ¨Ù", "ÛÚ©âØ´ÙØ¨Ù"] 11889}, 11890ru: { // Russian 11891months: [ 11892'ЯнваÑÑ', 'ФевÑалÑ', 'ÐаÑÑ', 'ÐпÑелÑ', 'Ðай', 'ÐÑнÑ', 'ÐÑлÑ', 'ÐвгÑÑÑ', 'СенÑÑбÑÑ', 'ÐкÑÑбÑÑ', 'ÐоÑбÑÑ', 'ÐекабÑÑ' 11893], 11894dayOfWeekShort: [ 11895"ÐÑ", "Ðн", "ÐÑ", "СÑ", "ЧÑ", "ÐÑ", "Сб" 11896], 11897dayOfWeek: ["ÐоÑкÑеÑенÑе", "ÐонеделÑник", "ÐÑоÑник", "СÑеда", "ЧеÑвеÑг", "ÐÑÑниÑа", "СÑббоÑа"] 11898}, 11899uk: { // Ukrainian 11900months: [ 11901'СÑÑенÑ', 'ÐÑÑий', 'ÐеÑезенÑ', 'ÐвÑÑенÑ', 'ТÑавенÑ', 'ЧеÑвенÑ', 'ÐипенÑ', 'СеÑпенÑ', 'ÐеÑеÑенÑ', 'ÐовÑенÑ', 'ÐиÑÑопад', 'ÐÑÑденÑ' 11902], 11903dayOfWeekShort: [ 11904"Ðдл", "Ðнд", "ÐÑÑ", "СÑд", "ЧÑв", "ÐÑн", "СбÑ" 11905], 11906dayOfWeek: ["ÐедÑлÑ", "ÐонедÑлок", "ÐÑвÑоÑок", "СеÑеда", "ЧеÑвеÑ", "Ð'ÑÑниÑÑ", "СÑбоÑа"] 11907}, 11908en: { // English 11909months: [ 11910"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "
11910November", "December" 11911], 11912dayOfWeekShort: [ 11913"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" 11914], 11915dayOfWeek: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] 11916}, 11917el: { // Îλληνικά 11918months: [ 11919"ÎÎ±Î½Î¿Ï Î¬ÏιοÏ", "ΦεβÏÎ¿Ï Î¬ÏιοÏ", "ÎάÏÏιοÏ", "ÎÏÏίλιοÏ", "ÎάιοÏ", "ÎοÏνιοÏ", "ÎοÏλιοÏ", "ÎÏÎ³Î¿Ï ÏÏοÏ", "ΣεÏÏÎμβÏιοÏ", "ÎκÏÏβÏιοÏ", "ÎοÎμβÏιοÏ", "ÎεκÎμβÏιοÏ" 11920], 11921dayOfWeekShort: [ 11922"ÎÏ Ï", "ÎÎµÏ ", "ΤÏι", "ΤεÏ", "Πεμ", "ΠαÏ", "Σαβ" 11923], 11924dayOfWeek: ["ÎÏ Ïιακή", "ÎÎµÏ ÏÎÏα", "ΤÏίÏη", "ΤεÏάÏÏη", "Î ÎμÏÏη", "ΠαÏαÏÎºÎµÏ Î®", "ΣάββαÏο"] 11925}, 11926de: { // German 11927months: [ 11928'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember' 11929], 11930dayOfWeekShort: [ 11931"So", "Mo", "Di", "Mi", "Do", "Fr", "Sa" 11932], 11933dayOfWeek: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"] 11934}, 11935nl: { // Dutch 11936months: [ 11937"januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december" 11938], 11939dayOfWeekShort: [ 11940"zo", "ma", "di", "wo", "do", "vr", "za" 11941], 11942dayOfWeek: ["zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"] 11943}, 11944tr: { // Turkish 11945months: [ 11946"Ocak", "Åubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "AÄustos", "Eylül", "Ekim", "Kasım", "Aralık" 11947], 11948dayOfWeekShort: [ 11949"Paz", "Pts", "Sal", "Ãar", "Per", "Cum", "Cts" 11950], 11951dayOfWeek: ["Pazar", "Pazartesi", "Salı", "ÃarÅamba", "PerÅembe", "Cuma", "Cumartesi"] 11952}, 11953fr: { //French 11954months: [ 11955"Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre" 11956], 11957dayOfWeekShort: [ 11958"Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam" 11959], 11960dayOfWeek: ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"] 11961}, 11962es: { // Spanish 11963months: [ 11964"Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre" 11965], 11966dayOfWeekShort: [ 11967"Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb" 11968], 11969dayOfWeek: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"] 11970}, 11971th: { // Thai 11972months: [ 11973'มà¸à¸£à¸²à¸à¸¡', 'à¸à¸¸à¸¡à¸ าà¸à¸±à¸à¸à¹', 'มีà¸à¸²à¸à¸¡', 'à¹à¸¡à¸©à¸²à¸¢à¸', 'à¸à¸¤à¸©à¸ าà¸à¸¡', 'มิà¸à¸¸à¸à¸²à¸¢à¸', 'à¸à¸£à¸à¸à¸²à¸à¸¡', 'สิà¸à¸«à¸²à¸à¸¡', 'à¸à¸±à¸à¸¢à¸²à¸¢à¸', 'à¸à¸¸à¸¥à¸²à¸à¸¡', 'à¸à¸¤à¸¨à¸à¸´à¸à¸²à¸¢à¸', 'à¸à¸±à¸à¸§à¸²à¸à¸¡' 11974], 11975dayOfWeekShort: [ 11976'à¸à¸².', 'à¸.', 'à¸.', 'à¸.', 'à¸à¸¤.', 'ศ.', 'ส.' 11977], 11978dayOfWeek: ["à¸à¸²à¸à¸´à¸à¸¢à¹", "à¸à¸±à¸à¸à¸£à¹", "à¸à¸±à¸à¸à¸²à¸£", "à¸à¸¸à¸", "à¸à¸¤à¸«à¸±à¸ª", "ศุà¸à¸£à¹", "à¹à¸ªà¸²à¸£à¹", "à¸à¸²à¸à¸´à¸à¸¢à¹"] 11979}, 11980pl: { // Polish 11981months: [ 11982"styczeÅ", "luty", "marzec", "kwiecieÅ", "maj", "czerwiec", "lipiec", "sierpieÅ", "wrzesieÅ", "październik", "listopad", "grudzieÅ" 11983], 11984dayOfWeekShort: [ 11985"nd", "pn", "wt", "År", "cz", "pt", "sb" 11986], 11987dayOfWeek: ["niedziela", "poniedziaÅek", "wtorek", "Åroda", "czwartek", "piÄ tek", "sobota"] 11988}, 11989pt: { // Portuguese 11990months: [ 11991"Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro" 11992], 11993dayOfWeekShort: [ 11994"Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sab" 11995], 11996dayOfWeek: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"] 11997}, 11998ch: { // Simplified Chinese 11999months: [ 12000"䏿", "äºæ", "䏿", "åæ", "äºæ", "å æ", "䏿", "å «æ", "乿", "åæ", "å䏿", "åäºæ" 12001], 12002dayOfWeekShort: [ 12003"æ¥", "ä¸", "äº", "ä¸", "å", "äº", "å " 12004] 12005}, 12006se: { // Swedish 12007months: [ 12008"Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December" 12009], 12010dayOfWeekShort: [ 12011"Sön", "MÃ¥n", "Tis", "Ons", "Tor", "Fre", "Lör" 12012] 12013}, 12014kr: { // Korean 12015months: [ 12016"1ì", "2ì", "3ì", "4ì", "5ì", "6ì", "7ì", "8ì", "9ì", "10ì", "11ì", "12ì" 12017], 12018dayOfWeekShort: [ 12019"ì¼", "ì", "í", "ì", "목", "ê¸", "í " 12020], 12021dayOfWeek: ["ì¼ìì¼", "ììì¼", "íìì¼", "ììì¼", "목ìì¼", "ê¸ìì¼", "í ìì¼"] 12022}, 12023it: { // Italian 12024months: [ 12025"Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre" 12026], 12027dayOfWeekShort: [ 12028"Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab" 12029], 12030dayOfWeek: ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"] 12031}, 12032da: { // Dansk 12033months: [ 12034"January", "Februar", "Marts", "April", "Maj", "Juni", "July", "August", "September", "Oktober", "
12034November", "December" 12035], 12036dayOfWeekShort: [ 12037"Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør" 12038], 12039dayOfWeek: ["søndag", "mandag", "tirsdag", "onsdag", "torsdag", "fredag", "lørdag"] 12040}, 12041no: { // Norwegian 12042months: [ 12043"Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember" 12044], 12045dayOfWeekShort: [ 12046"Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør" 12047], 12048dayOfWeek: ['Søndag', 'Mandag', 'Tirsdag', 'Onsdag', 'Torsdag', 'Fredag', 'Lørdag'] 12049}, 12050ja: { // Japanese 12051months: [ 12052"1æ", "2æ", "3æ", "4æ", "5æ", "6æ", "7æ", "8æ", "9æ", "10æ", "11æ", "12æ" 12053], 12054dayOfWeekShort: [ 12055"æ¥", "æ", "ç«", "æ°´", "æ¨", "é", "å" 12056], 12057dayOfWeek: ["æ¥æ", "ææ", "ç«æ", "æ°´æ", "æ¨æ", "éæ", "åæ"] 12058}, 12059vi: { // Vietnamese 12060months: [ 12061"Tháng 1", "Tháng 2", "Tháng 3", "Tháng 4", "Tháng 5", "Tháng 6", "Tháng 7", "Tháng 8", "Tháng 9", "Tháng 10", "Tháng 11", "Tháng 12" 12062], 12063dayOfWeekShort: [ 12064"CN", "T2", "T3", "T4", "T5", "T6", "T7" 12065], 12066dayOfWeek: ["Chá»§ nháºt", "Thứ hai", "Thứ ba", "Thứ tư", "Thứ nÄm", "Thứ sáu", "Thứ bảy"] 12067}, 12068sl: { // SlovenÅ¡Äina 12069months: [ 12070"Januar", "Februar", "Marec", "April", "Maj", "Junij", "Julij", "Avgust", "September", "Oktober", "November", "December" 12071], 12072dayOfWeekShort: [ 12073"Ned", "Pon", "Tor", "Sre", "Äet", "Pet", "Sob" 12074], 12075dayOfWeek: ["Nedelja", "Ponedeljek", "Torek", "Sreda", "Äetrtek", "Petek", "Sobota"] 12076}, 12077cs: { // ÄeÅ¡tina 12078months: [ 12079"Leden", "Ãnor", "BÅezen", "Duben", "KvÄten", "Äerven", "Äervenec", "Srpen", "ZáÅÃ", "ÅÃjen", "Listopad", "Prosinec" 12080], 12081dayOfWeekShort: [ 12082"Ne", "Po", "Ãt", "St", "Ät", "Pá", "So" 12083] 12084}, 12085hu: { // Hungarian 12086months: [ 12087"Január", "Február", "Március", "Ãprilis", "Május", "Június", "Július", "Augusztus", "Szeptember", "Október", "November", "December" 12088], 12089dayOfWeekShort: [ 12090"Va", "Hé", "Ke", "Sze", "Cs", "Pé", "Szo" 12091], 12092dayOfWeek: ["vasárnap", "hétfÅ", "kedd", "szerda", "csütörtök", "péntek", "szombat"] 12093}, 12094az: { //Azerbaijanian (Azeri) 12095months: [ 12096"Yanvar", "Fevral", "Mart", "Aprel", "May", "Iyun", "Iyul", "Avqust", "Sentyabr", "Oktyabr", "Noyabr", "Dekabr" 12097], 12098dayOfWeekShort: [ 12099"B", "Be", "Ãa", "Ã", "Ca", "C", "Å" 12100], 12101dayOfWeek: ["Bazar", "Bazar ertÉsi", "ÃÉrÅÉnbÉ axÅamı", "ÃÉrÅÉnbÉ", "CümÉ axÅamı", "CümÉ", "ÅÉnbÉ"] 12102}, 12103bs: { //Bosanski 12104months: [ 12105"Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar" 12106], 12107dayOfWeekShort: [ 12108"Ned", "Pon", "Uto", "Sri", "Äet", "Pet", "Sub" 12109], 12110dayOfWeek: ["Nedjelja", "Ponedjeljak", "Utorak", "Srijeda", "Äetvrtak", "Petak", "Subota"] 12111}, 12112ca: { //Català 12113months: [ 12114"Gener", "Febrer", "Març", "Abril", "Maig", "Juny", "Juliol", "Agost", "Setembre", "Octubre", "Novembre", "Desembre" 12115], 12116dayOfWeekShort: [ 12117"Dg", "Dl", "Dt", "Dc", "Dj", "Dv", "Ds" 12118], 12119dayOfWeek: ["Diumenge", "Dilluns", "Dimarts", "Dimecres", "Dijous", "Divendres", "Dissabte"] 12120}, 12121'en-GB': { //English (British) 12122months: [ 12123"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "
12123November", "December" 12124], 12125dayOfWeekShort: [ 12126"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" 12127], 12128dayOfWeek: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] 12129}, 12130et: { //"Eesti" 12131months: [ 12132"Jaanuar", "Veebruar", "Märts", "Aprill", "Mai", "Juuni", "Juuli", "August", "September", "Oktoober", "November", "Detsember" 12133], 12134dayOfWeekShort: [ 12135"P", "E", "T", "K", "N", "R", "L" 12136], 12137dayOfWeek: ["Pühapäev", "Esmaspäev", "Teisipäev", "Kolmapäev", "Neljapäev", "Reede", "Laupäev"] 12138}, 12139eu: { //Euskara 12140months: [ 12141"Urtarrila", "Otsaila", "Martxoa", "Apirila", "Maiatza", "Ekaina", "Uztaila", "Abuztua", "Iraila", "Urria", "Azaroa", "Abendua" 12142], 12143dayOfWeekShort: [ 12144"Ig.", "Al.", "Ar.", "Az.", "Og.", "Or.", "La." 12145], 12146dayOfWeek: ['Igandea', 'Astelehena', 'Asteartea', 'Asteazkena', 'Osteguna', 'Ostirala', 'Larunbata'] 12147}, 12148fi: { //Finnish (Suomi) 12149months: [ 12150"Tammikuu", "Helmikuu", "Maaliskuu", "Huhtikuu", "Toukokuu", "Kesäkuu", "Heinäkuu", "Elokuu", "Syyskuu", "Lokakuu", "Marraskuu", "Joulukuu" 12151], 12152dayOfWeekShort: [ 12153"Su", "Ma", "Ti", "Ke", "To", "Pe", "La" 12154], 12155dayOfWeek: ["sunnuntai", "maanantai", "tiistai", "keskiviikko", "torstai", "perjantai", "lauantai"] 12156}, 12157gl: { //Galego 12158months: [ 12159"Xan", "Feb", "Maz", "Abr", "Mai", "Xun", "Xul", "Ago", "Set", "Out", "Nov", "Dec" 12160], 12161dayOfWeekShort: [ 12162"Dom", "Lun", "Mar", "Mer", "Xov", "Ven", "Sab" 12163], 12164dayOfWeek: ["Domingo", "Luns", "Martes", "Mércores", "Xoves", "Venres", "Sábado"] 12165}, 12166hr: { //Hrvatski 12167months: [ 12168"SijeÄanj", "VeljaÄa", "Ožujak", "Travanj", "Svibanj", "Lipanj", "Srpanj", "Kolovoz", "Rujan", "Listopad", "Studeni", "Prosinac" 12169], 12170dayOfWeekShort: [ 12171"Ned", "Pon", "Uto", "Sri", "Äet", "Pet", "Sub" 12172], 12173dayOfWeek: ["Nedjelja", "Ponedjeljak", "Utorak", "Srijeda", "Äetvrtak", "Petak", "Subota"] 12174}, 12175ko: { //Korean (íêµì´) 12176months: [ 12177"1ì", "2ì", "3ì", "4ì", "5ì", "6ì", "7ì", "8ì", "9ì", "10ì", "11ì", "12ì" 12178], 12179dayOfWeekShort: [ 12180"ì¼", "ì", "í", "ì", "목", "ê¸", "í " 12181], 12182dayOfWeek: ["ì¼ìì¼", "ììì¼", "íìì¼", "ììì¼", "목ìì¼", "ê¸ìì¼", "í ìì¼"] 12183}, 12184lt: { //Lithuanian (lietuvių) 12185months: [ 12186"Sausio", "Vasario", "Kovo", "Balandžio", "GegužÄs", "Birželio", "Liepos", "RugpjÅ«Äio", "RugsÄjo", "Spalio", "LapkriÄio", "Gruodžio" 12187], 12188dayOfWeekShort: [ 12189"Sek", "Pir", "Ant", "Tre", "Ket", "Pen", "Å eÅ¡" 12190], 12191dayOfWeek: ["Sekmadienis", "Pirmadienis", "Antradienis", "TreÄiadienis", "Ketvirtadienis", "Penktadienis", "Å eÅ¡tadienis"] 12192}, 12193lv: { //Latvian (LatvieÅ¡u) 12194months: [ 12195"JanvÄris", "FebruÄris", "Marts", "AprÄ«lis ", "Maijs", "JÅ«nijs", "JÅ«lijs", "Augusts", "Septembris", "Oktobris", "Novembris", "Decembris" 12196], 12197dayOfWeekShort: [ 12198"Sv", "Pr", "Ot", "Tr", "Ct", "Pk", "St" 12199], 12200dayOfWeek: ["SvÄtdiena", "Pirmdiena", "Otrdiena", "TreÅ¡diena", "Ceturtdiena", "Piektdiena", "Sestdiena"] 12201}, 12202mk: { //Macedonian (ÐакедонÑки) 12203months: [ 12204"ÑанÑаÑи", "ÑевÑÑаÑи", "маÑÑ", "апÑил", "маÑ", "ÑÑни", "ÑÑли", "авгÑÑÑ", "ÑепÑемвÑи", "окÑомвÑи", "ноемвÑи", "декемвÑи" 12205], 12206dayOfWeekShort: [ 12207"нед", "пон", "вÑо", "ÑÑе", "ÑеÑ", "пеÑ", "Ñаб" 12208], 12209dayOfWeek: ["Ðедела", "Ðонеделник", "ÐÑоÑник", "СÑеда", "ЧеÑвÑÑок", "ÐеÑок", "СабоÑа"] 12210}, 12211mn: { //Mongolian (Ðонгол) 12212months: [ 12213"1-Ñ ÑаÑ", "2-Ñ ÑаÑ", "3-Ñ ÑаÑ", "4-Ñ ÑаÑ", "5-Ñ ÑаÑ", "6-Ñ ÑаÑ", "7-Ñ ÑаÑ", "8-Ñ ÑаÑ", "9-Ñ ÑаÑ", "10-Ñ ÑаÑ", "11-Ñ ÑаÑ", "12-Ñ ÑаÑ" 12214], 12215dayOfWeekShort: [ 12216"Ðав", "ÐÑг", "ÐÑ Ð°", "ÐÒ¯Ñ", "ÐÑн", "ÐÑм", "ÐÑм" 12217], 12218dayOfWeek: ["Ðаваа", "ÐÑгмаÑ", "ÐÑ Ð°Ð³Ð²Ð°", "ÐÒ¯ÑÑв", "ÐааÑан", "ÐÑмба", "ÐÑм"] 12219}, 12220'pt-BR': { //Português(Brasil) 12221months: [ 12222"Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro" 12223], 12224dayOfWeekShort: [ 12225"Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb" 12226], 12227dayOfWeek: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"] 12228}, 12229sk: { //SlovenÄina 12230months: [ 12231"Január", "Február", "Marec", "AprÃl", "Máj", "Jún", "Júl", "August", "September", "Október", "
12231November", "December" 12232], 12233dayOfWeekShort: [ 12234"Ne", "Po", "Ut", "St", "Å t", "Pi", "So" 12235], 12236dayOfWeek: ["Nedeľa", "Pondelok", "Utorok", "Streda", "Å tvrtok", "Piatok", "Sobota"] 12237}, 12238sq: { //Albanian (Shqip) 12239months: [ 12240"Janar", "Shkurt", "Mars", "Prill", "Maj", "Qershor", "Korrik", "Gusht", "Shtator", "Tetor", "Nëntor", "Dhjetor" 12241], 12242dayOfWeekShort: [ 12243"Die", "Hën", "Mar", "Mër", "Enj", "Pre", "Shtu" 12244], 12245dayOfWeek: ["E Diel", "E Hënë", "E MartÄ", "E Mërkurë", "E Enjte", "E Premte", "E Shtunë"] 12246}, 12247'sr-YU': { //Serbian (Srpski) 12248months: [ 12249"Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar" 12250], 12251dayOfWeekShort: [ 12252"Ned", "Pon", "Uto", "Sre", "Äet", "Pet", "Sub" 12253], 12254dayOfWeek: ["Nedelja", "Ponedeljak", "Utorak", "Sreda", "Äetvrtak", "Petak", "Subota"] 12255}, 12256sr: { //Serbian Cyrillic (СÑпÑки) 12257months: [ 12258"ÑанÑаÑ", "ÑебÑÑаÑ", "маÑÑ", "апÑил", "маÑ", "ÑÑн", "ÑÑл", "авгÑÑÑ", "ÑепÑембаÑ", "окÑобаÑ", "новембаÑ", "деÑембаÑ" 12259], 12260dayOfWeekShort: [ 12261"нед", "пон", "ÑÑо", "ÑÑе", "ÑеÑ", "пеÑ", "ÑÑб" 12262], 12263dayOfWeek: ["ÐедеÑа", "ÐонедеÑак", "УÑоÑак", "СÑеда", "ЧеÑвÑÑак", "ÐеÑак", "СÑбоÑа"] 12264}, 12265sv: { //Svenska 12266months: [ 12267"Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December" 12268], 12269dayOfWeekShort: [ 12270"Sön", "MÃ¥n", "Tis", "Ons", "Tor", "Fre", "Lör" 12271], 12272dayOfWeek: ["Söndag", "MÃ¥ndag", "Tisdag", "Onsdag", "Torsdag", "Fredag", "Lördag"] 12273}, 12274'zh-TW': { //Traditional Chinese (ç¹é«ä¸æ) 12275months: [ 12276"䏿", "äºæ", "䏿", "åæ", "äºæ", "å æ", "䏿", "å «æ", "乿", "åæ", "å䏿", "åäºæ" 12277], 12278dayOfWeekShort: [ 12279"æ¥", "ä¸", "äº", "ä¸", "å", "äº", "å " 12280], 12281dayOfWeek: ["æææ¥", "ææä¸", "ææäº", "ææä¸", "ææå", "ææäº", "ææå "] 12282}, 12283zh: { //Simplified Chinese (ç®ä½ä¸æ) 12284months: [ 12285"䏿", "äºæ", "䏿", "åæ", "äºæ", "å æ", "䏿", "å «æ", "乿", "åæ", "å䏿", "åäºæ" 12286], 12287dayOfWeekShort: [ 12288"æ¥", "ä¸", "äº", "ä¸", "å", "äº", "å " 12289], 12290dayOfWeek: ["æææ¥", "ææä¸", "ææäº", "ææä¸", "ææå", "ææäº", "ææå "] 12291}, 12292he: { //Hebrew (×¢×ר×ת) 12293months: [ 12294'×× ××ר', 'פ×ר××ר', '×רץ', '×פר××', '×××', '××× ×', '××××', '××××ס×', 'ספ×××ר', '×××§×××ר', '× ××××ר', '×צ××ר' 12295], 12296dayOfWeekShort: [ 12297'×\'', '×\'', '×\'', '×\'', '×\'', '×\'', 'ש×ת' 12298], 12299dayOfWeek: ["ר×ש××", "×©× ×", "ש××ש×", "ר×××¢×", "×××ש×", "ש×ש×", "ש×ת", "ר×ש××"] 12300}, 12301hy: { // Armenian 12302months: [ 12303"ÕÕ¸ÖÕ¶Õ¾Õ¡Ö", "ÕÕ¥Õ¿ÖÕ¾Õ¡Ö", "ÕÕ¡ÖÕ¿", "Ô±ÕºÖÕ«Õ¬", "ÕÕ¡ÕµÕ«Õ½", "ÕÕ¸ÖÕ¶Õ«Õ½", "ÕÕ¸ÖÕ¬Õ«Õ½", "ÕÕ£Õ¸Õ½Õ¿Õ¸Õ½", "ÕÕ¥ÕºÕ¿Õ¥Õ´Õ¢Õ¥Ö", "ÕÕ¸Õ¯Õ¿Õ¥Õ´Õ¢Õ¥Ö", "ÕÕ¸ÕµÕ¥Õ´Õ¢Õ¥Ö", "Ô´Õ¥Õ¯Õ¿Õ¥Õ´Õ¢Õ¥Ö" 12304], 12305dayOfWeekShort: [ 12306"Ô¿Õ«", "ÔµÖÕ¯", "ÔµÖÖ", "ÕÕ¸Ö", "ÕÕ¶Õ£", "ÕÖÖÕ¢", "ÕÕ¢Õ©" 12307], 12308dayOfWeek: ["Ô¿Õ«ÖÕ¡Õ¯Õ«", "ÔµÖÕ¯Õ¸ÖÕ·Õ¡Õ¢Õ©Õ«", "ÔµÖÕ¥ÖÕ·Õ¡Õ¢Õ©Õ«", "ÕÕ¸ÖÕ¥ÖÕ·Õ¡Õ¢Õ©Õ«", "ÕÕ«Õ¶Õ£Õ·Õ¡Õ¢Õ©Õ«", "ÕÖÖÕ¢Õ¡Õ©", "ÕÕ¡Õ¢Õ¡Õ©"] 12309}, 12310kg: { // Kyrgyz 12311months: [ 12312'Ò®ÑÑүн айÑ', 'ÐиÑдин айÑ', 'Ðалган ÐÑÑан', 'ЧÑн ÐÑÑан', 'ÐÑгÑ', 'ÐÑлжа', 'Теке', 'ÐÐ°Ñ Ðона', 'ÐÑк Ðона', 'ТогÑздÑн айÑ', 'ÐеÑинин айÑ', 'ÐеÑÑин айÑ' 12313], 12314dayOfWeekShort: [ 12315"Ðек", "Ðүй", "Шей", "ШаÑ", "Ðей", "ÐÑм", "ÐÑе" 12316], 12317dayOfWeek: [ 12318"ÐекÑемб", "ÐүйÑөмб", "ШейÑемб", "ШаÑÑемб", "ÐейÑемби", "ÐÑма", "ÐÑенб" 12319] 12320}, 12321rm: { // Romansh 12322months: [ 12323"Schaner", "Favrer", "Mars", "Avrigl", "Matg", "Zercladur", "Fanadur", "Avust", "Settember", "October", "
vendor: 4,162 bytes, lines 12323-12499
12323November", "December" 12324], 12325dayOfWeekShort: [ 12326"Du", "Gli", "Ma", "Me", "Gie", "Ve", "So" 12327], 12328dayOfWeek: [ 12329"Dumengia", "Glindesdi", "Mardi", "Mesemna", "Gievgia", "Venderdi", "Sonda" 12330] 12331}, 12332ka: { // Georgian 12333months: [ 12334'áááááá á', 'ááááá áááá', 'ááá á¢á', 'ááá ááá', 'áááá¡á', 'ááááá¡á', 'ááááá¡á', 'ááááá¡á¢á', 'á¡áá¥á¢ááááá á', 'áá¥á¢ááááá á', 'ááááááá á', 'áááááááá á' 12335], 12336dayOfWeekShort: [ 12337"áá", "áá á¨", "á¡ááá¨", "ááá®", "á®á£á", "ááá ", "á¨áá" 12338], 12339dayOfWeek: ["áááá á", "áá á¨ááááá", "á¡ááá¨ááááá", "ááá®á¨ááááá", "á®á£áá¨ááááá", "ááá áá¡áááá", "á¨ááááá"] 12340}, 12341}, 12342value: '', 12343rtl: false, 12344 12345format: 'Y/m/d H:i', 12346formatTime: 'H:i', 12347formatDate: 'Y/m/d', 12348 12349startDate: false, // new Date(), '1986/12/08', '-1970/01/05','-1970/01/05', 12350step: 60, 12351monthChangeSpinner: true, 12352 12353closeOnDateSelect: false, 12354closeOnTimeSelect: true, 12355closeOnWithoutClick: true, 12356closeOnInputClick: true, 12357 12358timepicker: true, 12359datepicker: true, 12360weeks: false, 12361 12362defaultTime: false,// use formatTime format (ex. '10:00' for formatTime:'H:i') 12363defaultDate: false,// use formatDate format (ex new Date() or '1986/12/08' or '-1970/01/05' or '-1970/01/05') 12364 12365minDate: false, 12366maxDate: false, 12367minTime: false, 12368maxTime: false, 12369disabledMinTime: false, 12370disabledMaxTime: false, 12371 12372allowTimes: [], 12373opened: false, 12374initTime: true, 12375inline: false, 12376theme: '', 12377 12378onSelectDate: function () { }, 12379onSelectTime: function () { }, 12380onChangeMonth: function () { }, 12381onGetWeekOfYear: function () { }, 12382onChangeYear: function () { }, 12383onChangeDateTime: function () { }, 12384onShow: function () { }, 12385onClose: function () { }, 12386onGenerate: function () { }, 12387 12388withoutCopyright: true, 12389inverseButton: false, 12390hours12: false, 12391next: 'xdsoft_next', 12392prev: 'xdsoft_prev', 12393dayOfWeekStart: 0, 12394parentID: 'body', 12395timeHeightInTimePicker: 25, 12396timepickerScrollbar: true, 12397todayButton: true, 12398prevButton: true, 12399nextButton: true, 12400defaultSelect: true, 12401 12402scrollMonth: true, 12403scrollTime: true, 12404scrollInput: true, 12405 12406lazyInit: false, 12407mask: false, 12408validateOnBlur: true, 12409allowBlank: true, 12410yearStart: 1950, 12411yearEnd: 2050, 12412monthStart: 0, 12413monthEnd: 11, 12414style: '', 12415id: '', 12416fixed: false, 12417roundTime: 'round', // ceil, floor 12418className: '', 12419weekends: [], 12420highlightedDates: [], 12421highlightedPeriods: [], 12422allowDates: [], 12423allowDateRe: null, 12424disabledDates: [], 12425disabledWeekDays: [], 12426yearOffset: 0, 12427beforeShowDay: null, 12428 12429enterLikeTab: true, 12430showApplyButton: false 12431}; 12432 12433var dateHelper = null, 12434globalLocaleDefault = 'en', 12435globalLocale = 'en'; 12436 12437var dateFormatterOptionsDefault = { 12438meridiem: ['AM', 'PM'] 12439}; 12440 12441var initDateFormatter = function () { 12442var locale = default_options.i18n[globalLocale], 12443opts = { 12444days: locale.dayOfWeek, 12445daysShort: locale.dayOfWeekShort, 12446months: locale.months, 12447monthsShort: $.map(locale.months, function (n) { return n.substring(0, 3) }), 12448}; 12449 12450dateHelper = new DateFormatter({ 12451dateSettings: $.extend({}, dateFormatterOptionsDefault, opts) 12452}); 12453}; 12454 12455// for locale settings 12456$.datetimepicker = { 12457setLocale: function (locale) { 12458var newLocale = default_options.i18n[locale] ? locale : globalLocaleDefault; 12459if (globalLocale != newLocale) { 12460globalLocale = newLocale; 12461// reinit date formatter 12462initDateFormatter(); 12463} 12464}, 12465setDateFormatter: function (dateFormatter) { 12466dateHelper = dateFormatter; 12467}, 12468RFC_2822: 'D, d M Y H:i:s O', 12469ATOM: 'Y-m-d\TH:i:sP', 12470ISO_8601: 'Y-m-d\TH:i:sO', 12471RFC_822: 'D, d M y H:i:s O', 12472RFC_850: 'l, d-M-y H:i:s T', 12473RFC_1036: 'D, d M y H:i:s O', 12474RFC_1123: 'D, d M Y H:i:s O', 12475RSS: 'D, d M Y H:i:s O', 12476W3C: 'Y-m-d\TH:i:sP' 12477}; 12478 12479// first init date formatter 12480initDateFormatter(); 12481 12482// fix for ie8 12483if (!window.getComputedStyle) { 12484window.getComputedStyle = function (el, pseudo) { 12485this.el = el; 12486this.getPropertyValue = function (prop) { 12487var re = /(\-([a-z]){1})/g; 12488if (prop === 'float') { 12489prop = 'styleFloat'; 12490} 12491if (re.test(prop)) { 12492prop = prop.replace(re, function (a, b, c) { 12493return c.toUpperCase(); 12494}); 12495} 12496return el.currentStyle[prop] || null; 12497}; 12498return this; 12499};
vendor: 4,927 bytes, lines 12500-12661
12500} 12501if (!Array.prototype.indexOf) { 12502Array.prototype.indexOf = function (obj, start) { 12503var i, j; 12504for (i = (start || 0), j = this.length; i < j; i += 1) { 12505if (this[i] === obj) { return i; } 12506} 12507return -1; 12508}; 12509} 12510Date.prototype.countDaysInMonth = function () { 12511return new Date(this.getFullYear(), this.getMonth() + 1, 0).getDate(); 12512}; 12513$.fn.xdsoftScroller = function (percent) { 12514return this.each(function () { 12515var timeboxparent = $(this), 12516pointerEventToXY = function (e) { 12517var out = { x: 0, y: 0 }, 12518touch; 12519if (e.type === 'touchstart' || e.type === 'touchmove' || e.type === 'touchend' || e.type === 'touchcancel') { 12520touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0]; 12521out.x = touch.clientX; 12522out.y = touch.clientY; 12523} else if (e.type === 'mousedown' || e.type === 'mouseup' || e.type === 'mousemove' || e.type === 'mouseover' || e.type === 'mouseout' || e.type === 'mouseenter' || e.type === 'mouseleave') { 12524out.x = e.clientX; 12525out.y = e.clientY; 12526} 12527return out; 12528}, 12529timebox, 12530parentHeight, 12531height, 12532scrollbar, 12533scroller, 12534maximumOffset = 100, 12535start = false, 12536startY = 0, 12537startTop = 0, 12538h1 = 0, 12539touchStart = false, 12540startTopScroll = 0, 12541calcOffset = function () { }; 12542if (percent === 'hide') { 12543timeboxparent.find('.xdsoft_scrollbar').hide(); 12544return; 12545} 12546if (!$(this).hasClass('xdsoft_scroller_box')) { 12547timebox = timeboxparent.children().eq(0); 12548parentHeight = timeboxparent[0].clientHeight; 12549height = timebox[0].offsetHeight; 12550scrollbar = $('<div class="xdsoft_scrollbar"></div>'); 12551scroller = $('<div class="xdsoft_scroller"></div>'); 12552scrollbar.append(scroller); 12553 12554timeboxparent.addClass('xdsoft_scroller_box').append(scrollbar); 12555calcOffset = function calcOffset(event) { 12556var offset = pointerEventToXY(event).y - startY + startTopScroll; 12557if (offset < 0) { 12558offset = 0; 12559} 12560if (offset + scroller[0].offsetHeight > h1) { 12561offset = h1 - scroller[0].offsetHeight; 12562} 12563timeboxparent.trigger('scroll_element.xdsoft_scroller', [maximumOffset ? offset / maximumOffset : 0]); 12564}; 12565 12566scroller 12567.on('touchstart.xdsoft_scroller mousedown.xdsoft_scroller', function (event) { 12568if (!parentHeight) { 12569timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percent]); 12570} 12571 12572startY = pointerEventToXY(event).y; 12573startTopScroll = parseInt(scroller.css('margin-top'), 10); 12574h1 = scrollbar[0].offsetHeight; 12575 12576if (event.type === 'mousedown' || event.type === 'touchstart') { 12577if (document) { 12578$(document.body).addClass('xdsoft_noselect'); 12579} 12580$([document.body, window]).on('touchend mouseup.xdsoft_scroller', function arguments_callee() { 12581$([document.body, window]).off('touchend mouseup.xdsoft_scroller', arguments_callee) 12582.off('mousemove.xdsoft_scroller', calcOffset) 12583.removeClass('xdsoft_noselect'); 12584}); 12585$(document.body).on('mousemove.xdsoft_scroller', calcOffset); 12586} else { 12587touchStart = true; 12588event.stopPropagation(); 12589event.preventDefault(); 12590} 12591}) 12592.on('touchmove', function (event) { 12593if (touchStart) { 12594event.preventDefault(); 12595calcOffset(event); 12596} 12597}) 12598.on('touchend touchcancel', function () { 12599touchStart = false; 12600startTopScroll = 0; 12601}); 12602 12603timeboxparent 12604.on('scroll_element.xdsoft_scroller', function (event, percentage) { 12605if (!parentHeight) { 12606timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percentage, true]); 12607} 12608percentage = percentage > 1 ? 1 : (percentage < 0 || isNaN(percentage)) ? 0 : percentage; 12609 12610scroller.css('margin-top', maximumOffset * percentage); 12611 12612setTimeout(function () { 12613timebox.css('marginTop', -parseInt((timebox[0].offsetHeight - parentHeight) * percentage, 10)); 12614}, 10); 12615}) 12616.on('resize_scroll.xdsoft_scroller', function (event, percentage, noTriggerScroll) { 12617var percent, sh; 12618parentHeight = timeboxparent[0].clientHeight; 12619height = timebox[0].offsetHeight; 12620percent = parentHeight / height; 12621sh = percent * scrollbar[0].offsetHeight; 12622if (percent > 1) { 12623scroller.hide(); 12624} else { 12625scroller.show(); 12626scroller.css('height', parseInt(sh > 10 ? sh : 10, 10)); 12627maximumOffset = scrollbar[0].offsetHeight - scroller[0].offsetHeight; 12628if (noTriggerScroll !== true) { 12629timeboxparent.trigger('scroll_element.xdsoft_scroller', [percentage || Math.abs(parseInt(timebox.css('marginTop'), 10)) / (height - parentHeight)]); 12630} 12631} 12632}); 12633 12634timeboxparent.on('mousewheel', function (event) { 12635var top = Math.abs(parseInt(timebox.css('marginTop'), 10)); 12636 12637top = top - (event.deltaY * 20); 12638if (top < 0) { 12639top = 0; 12640} 12641 12642timeboxparent.trigger('scroll_element.xdsoft_scroller', [top / (height - parentHeight)]); 12643event.stopPropagation(); 12644return false; 12645}); 12646 12647timeboxparent.on('touchstart', function (event) { 12648start = pointerEventToXY(event); 12649startTop = Math.abs(parseInt(timebox.css('marginTop'), 10)); 12650}); 12651 12652timeboxparent.on('touchmove', function (event) { 12653if (start) { 12654event.preventDefault(); 12655var coord = pointerEventToXY(event); 12656timeboxparent.trigger('scroll_element.xdsoft_scroller', [(startTop - (coord.y - start.y)) / (height - parentHeight)]); 12657} 12658}); 12659 12660timeboxparent.on('touchend touchcancel', function () { 12661start = false;
vendor: 45,652 bytes, lines 12662-14214
12662startTop = 0; 12663}); 12664} 12665timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percent]); 12666}); 12667}; 12668 12669$.fn.datetimepicker = function (opt, opt2) { 12670var result = this, 12671KEY0 = 48, 12672KEY9 = 57, 12673_KEY0 = 96, 12674_KEY9 = 105, 12675CTRLKEY = 17, 12676DEL = 46, 12677ENTER = 13, 12678ESC = 27, 12679BACKSPACE = 8, 12680ARROWLEFT = 37, 12681ARROWUP = 38, 12682ARROWRIGHT = 39, 12683ARROWDOWN = 40, 12684TAB = 9, 12685F5 = 116, 12686AKEY = 65, 12687CKEY = 67, 12688VKEY = 86, 12689ZKEY = 90, 12690YKEY = 89, 12691ctrlDown = false, 12692options = ($.isPlainObject(opt) || !opt) ? $.extend(true, {}, default_options, opt) : $.extend(true, {}, default_options), 12693 12694lazyInitTimer = 0, 12695createDateTimePicker, 12696destroyDateTimePicker, 12697 12698lazyInit = function (input) { 12699input 12700.on('open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart', function initOnActionCallback() { 12701if (input.is(':disabled') || input.data('xdsoft_datetimepicker')) { 12702return; 12703} 12704clearTimeout(lazyInitTimer); 12705lazyInitTimer = setTimeout(function () { 12706 12707if (!input.data('xdsoft_datetimepicker')) { 12708createDateTimePicker(input); 12709} 12710input 12711.off('open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart', initOnActionCallback) 12712.trigger('open.xdsoft'); 12713}, 100); 12714}); 12715}; 12716 12717createDateTimePicker = function (input) { 12718var datetimepicker = $('<div class="xdsoft_datetimepicker xdsoft_noselect"></div>'), 12719xdsoft_copyright = $('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'), 12720datepicker = $('<div class="xdsoft_datepicker active"></div>'), 12721mounth_picker = $('<div class="xdsoft_mounthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button>' + 12722'<div class="xdsoft_label xdsoft_month"><span></span><i></i></div>' + 12723'<div class="xdsoft_label xdsoft_year"><span></span><i></i></div>' + 12724'<button type="button" class="xdsoft_next"></button></div>'), 12725calendar = $('<div class="xdsoft_calendar"></div>'), 12726timepicker = $('<div class="xdsoft_timepicker active"><button type="button" class="xdsoft_prev"></button><div class="xdsoft_time_box"></div><button type="button" class="xdsoft_next"></button></div>'), 12727timeboxparent = timepicker.find('.xdsoft_time_box').eq(0), 12728timebox = $('<div class="xdsoft_time_variant"></div>'), 12729applyButton = $('<button type="button" class="xdsoft_save_selected blue-gradient-button">Save Selected</button>'), 12730 12731monthselect = $('<div class="xdsoft_select xdsoft_monthselect"><div></div></div>'), 12732yearselect = $('<div class="xdsoft_select xdsoft_yearselect"><div></div></div>'), 12733triggerAfterOpen = false, 12734XDSoft_datetime, 12735 12736xchangeTimer, 12737timerclick, 12738current_time_index, 12739setPos, 12740timer = 0, 12741_xdsoft_datetime, 12742forEachAncestorOf, 12743throttle; 12744 12745if (options.id) { 12746datetimepicker.attr('id', options.id); 12747} 12748if (options.style) { 12749datetimepicker.attr('style', options.style); 12750} 12751if (options.weeks) { 12752datetimepicker.addClass('xdsoft_showweeks'); 12753} 12754if (options.rtl) { 12755datetimepicker.addClass('xdsoft_rtl'); 12756} 12757 12758datetimepicker.addClass('xdsoft_' + options.theme); 12759datetimepicker.addClass(options.className); 12760 12761mounth_picker 12762.find('.xdsoft_month span') 12763.after(monthselect); 12764mounth_picker 12765.find('.xdsoft_year span') 12766.after(yearselect); 12767 12768mounth_picker 12769.find('.xdsoft_month,.xdsoft_year') 12770.on('touchstart mousedown.xdsoft', function (event) { 12771var select = $(this).find('.xdsoft_select').eq(0), 12772val = 0, 12773top = 0, 12774visible = select.is(':visible'), 12775items, 12776i; 12777 12778mounth_picker 12779.find('.xdsoft_select') 12780.hide(); 12781if (_xdsoft_datetime.currentTime) { 12782val = _xdsoft_datetime.currentTime[$(this).hasClass('xdsoft_month') ? 'getMonth' : 'getFullYear'](); 12783} 12784 12785select[visible ? 'hide' : 'show'](); 12786for (items = select.find('div.xdsoft_option'), i = 0; i < items.length; i += 1) { 12787if (items.eq(i).data('value') === val) { 12788break; 12789} else { 12790top += items[0].offsetHeight; 12791} 12792} 12793 12794select.xdsoftScroller(top / (select.children()[0].offsetHeight - (select[0].clientHeight))); 12795event.stopPropagation(); 12796return false; 12797}); 12798 12799mounth_picker 12800.find('.xdsoft_select') 12801.xdsoftScroller() 12802.on('touchstart mousedown.xdsoft', function (event) { 12803event.stopPropagation(); 12804event.preventDefault(); 12805}) 12806.on('touchstart mousedown.xdsoft', '.xdsoft_option', function () { 12807if (_xdsoft_datetime.currentTime === undefined || _xdsoft_datetime.currentTime === null) { 12808_xdsoft_datetime.currentTime = _xdsoft_datetime.now(); 12809} 12810 12811var year = _xdsoft_datetime.currentTime.getFullYear(); 12812if (_xdsoft_datetime && _xdsoft_datetime.currentTime) { 12813_xdsoft_datetime.currentTime[$(this).parent().parent().hasClass('xdsoft_monthselect') ? 'setMonth' : 'setFullYear']($(this).data('value')); 12814} 12815 12816$(this).parent().parent().hide(); 12817 12818datetimepicker.trigger('xchange.xdsoft'); 12819if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) { 12820options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input')); 12821} 12822 12823if (year !== _xdsoft_datetime.currentTime.getFullYear() && $.isFunction(options.onChangeYear)) { 12824options.onChangeYear.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input')); 12825} 12826}); 12827 12828datetimepicker.getValue = function () { 12829return _xdsoft_datetime.getCurrentTime(); 12830}; 12831 12832datetimepicker.setOptions = function (_options) { 12833var highlightedDates = {}; 12834 12835options = $.extend(true, {}, options, _options); 12836 12837if (_options.allowTimes && $.isArray(_options.allowTimes) && _options.allowTimes.length) { 12838options.allowTimes = $.extend(true, [], _options.allowTimes); 12839} 12840 12841if (_options.weekends && $.isArray(_options.weekends) && _options.weekends.length) { 12842options.weekends = $.extend(true, [], _options.weekends); 12843} 12844 12845if (_options.allowDates && $.isArray(_options.allowDates) && _options.allowDates.length) { 12846options.allowDates = $.extend(true, [], _options.allowDates); 12847} 12848 12849if (_options.allowDateRe && Object.prototype.toString.call(_options.allowDateRe) === "[object String]") { 12850options.allowDateRe = new RegExp(_options.allowDateRe); 12851} 12852 12853if (_options.highlightedDates && $.isArray(_options.highlightedDates) && _options.highlightedDates.length) { 12854$.each(_options.highlightedDates, function (index, value) { 12855var splitData = $.map(value.split(','), $.trim), 12856exDesc, 12857hDate = new HighlightedDate(dateHelper.parseDate(splitData[0], options.formatDate), splitData[1], splitData[2]), // date, desc, style 12858keyDate = dateHelper.formatDate(hDate.date, options.formatDate); 12859if (highlightedDates[keyDate] !== undefined) { 12860exDesc = highlightedDates[keyDate].desc; 12861if (exDesc && exDesc.length && hDate.desc && hDate.desc.length) { 12862highlightedDates[keyDate].desc = exDesc + "\n" + hDate.desc; 12863} 12864} else { 12865highlightedDates[keyDate] = hDate; 12866} 12867}); 12868 12869options.highlightedDates = $.extend(true, [], highlightedDates); 12870} 12871 12872if (_options.highlightedPeriods && $.isArray(_options.highlightedPeriods) && _options.highlightedPeriods.length) { 12873highlightedDates = $.extend(true, [], options.highlightedDates); 12874$.each(_options.highlightedPeriods, function (index, value) { 12875var dateTest, // start date 12876dateEnd, 12877desc, 12878hDate, 12879keyDate, 12880exDesc, 12881style; 12882if ($.isArray(value)) { 12883dateTest = value[0]; 12884dateEnd = value[1]; 12885desc = value[2]; 12886style = value[3]; 12887} 12888else { 12889var splitData = $.map(value.split(','), $.trim); 12890dateTest = dateHelper.parseDate(splitData[0], options.formatDate); 12891dateEnd = dateHelper.parseDate(splitData[1], options.formatDate); 12892desc = splitData[2]; 12893style = splitData[3]; 12894} 12895 12896while (dateTest <= dateEnd) { 12897hDate = new HighlightedDate(dateTest, desc, style); 12898keyDate = dateHelper.formatDate(dateTest, options.formatDate); 12899dateTest.setDate(dateTest.getDate() + 1); 12900if (highlightedDates[keyDate] !== undefined) { 12901exDesc = highlightedDates[keyDate].desc; 12902if (exDesc && exDesc.length && hDate.desc && hDate.desc.length) { 12903highlightedDates[keyDate].desc = exDesc + "\n" + hDate.desc; 12904} 12905} else { 12906highlightedDates[keyDate] = hDate; 12907} 12908} 12909}); 12910 12911options.highlightedDates = $.extend(true, [], highlightedDates); 12912} 12913 12914if (_options.disabledDates && $.isArray(_options.disabledDates) && _options.disabledDates.length) { 12915options.disabledDates = $.extend(true, [], _options.disabledDates); 12916} 12917 12918if (_options.disabledWeekDays && $.isArray(_options.disabledWeekDays) && _options.disabledWeekDays.length) { 12919options.disabledWeekDays = $.extend(true, [], _options.disabledWeekDays); 12920} 12921 12922if ((options.open || options.opened) && (!options.inline)) { 12923input.trigger('open.xdsoft'); 12924} 12925 12926if (options.inline) { 12927triggerAfterOpen = true; 12928datetimepicker.addClass('xdsoft_inline'); 12929input.after(datetimepicker).hide(); 12930} 12931 12932if (options.inverseButton) { 12933options.next = 'xdsoft_prev'; 12934options.prev = 'xdsoft_next'; 12935} 12936 12937if (options.datepicker) { 12938datepicker.addClass('active'); 12939} else { 12940datepicker.removeClass('active'); 12941} 12942 12943if (options.timepicker) { 12944timepicker.addClass('active'); 12945} else { 12946timepicker.removeClass('active'); 12947} 12948 12949if (options.value) { 12950_xdsoft_datetime.setCurrentTime(options.value); 12951if (input && input.val) { 12952input.val(_xdsoft_datetime.str); 12953} 12954} 12955 12956if (isNaN(options.dayOfWeekStart)) { 12957options.dayOfWeekStart = 0; 12958} else { 12959options.dayOfWeekStart = parseInt(options.dayOfWeekStart, 10) % 7; 12960} 12961 12962if (!options.timepickerScrollbar) { 12963timeboxparent.xdsoftScroller('hide'); 12964} 12965 12966if (options.minDate && /^[\+\-](.*)$/.test(options.minDate)) { 12967options.minDate = dateHelper.formatDate(_xdsoft_datetime.strToDateTime(options.minDate), options.formatDate); 12968} 12969 12970if (options.maxDate && /^[\+\-](.*)$/.test(options.maxDate)) { 12971options.maxDate = dateHelper.formatDate(_xdsoft_datetime.strToDateTime(options.maxDate), options.formatDate); 12972} 12973 12974applyButton.toggle(options.showApplyButton); 12975 12976mounth_picker 12977.find('.xdsoft_today_button') 12978.css('visibility', !options.todayButton ? 'hidden' : 'visible'); 12979 12980mounth_picker 12981.find('.' + options.prev) 12982.css('visibility', !options.prevButton ? 'hidden' : 'visible'); 12983 12984mounth_picker 12985.find('.' + options.next) 12986.css('visibility', !options.nextButton ? 'hidden' : 'visible'); 12987 12988setMask(options); 12989 12990if (options.validateOnBlur) { 12991input 12992.off('blur.xdsoft') 12993.on('blur.xdsoft', function () { 12994if (options.allowBlank && (!$.trim($(this).val()).length || (typeof options.mask == "string" && $.trim($(this).val()) === options.mask.replace(/[0-9]/g, '_')))) { 12995$(this).val(null); 12996datetimepicker.data('xdsoft_datetime').empty(); 12997} else { 12998var d = dateHelper.parseDate($(this).val(), options.format); 12999if (d) { // parseDate() may skip some invalid parts like date or time, so make it clear for user: show parsed date/time 13000$(this).val(dateHelper.formatDate(d, options.format)); 13001} else { 13002var splittedHours = +([$(this).val()[0], $(this).val()[1]].join('')), 13003splittedMinutes = +([$(this).val()[2], $(this).val()[3]].join('')); 13004 13005// parse the numbers as 0312 => 03:12 13006if (!options.datepicker && options.timepicker && splittedHours >= 0 && splittedHours < 24 && splittedMinutes >= 0 && splittedMinutes < 60) { 13007$(this).val([splittedHours, splittedMinutes].map(function (item) { 13008return item > 9 ? item : '0' + item; 13009}).join(':')); 13010} else { 13011$(this).val(dateHelper.formatDate(_xdsoft_datetime.now(), options.format)); 13012} 13013} 13014datetimepicker.data('xdsoft_datetime').setCurrentTime($(this).val()); 13015} 13016 13017datetimepicker.trigger('changedatetime.xdsoft'); 13018datetimepicker.trigger('close.xdsoft'); 13019}); 13020} 13021options.dayOfWeekStartPrev = (options.dayOfWeekStart === 0) ? 6 : options.dayOfWeekStart - 1; 13022 13023datetimepicker 13024.trigger('xchange.xdsoft') 13025.trigger('afterOpen.xdsoft'); 13026}; 13027 13028datetimepicker 13029.data('options', options) 13030.on('touchstart mousedown.xdsoft', function (event) { 13031event.stopPropagation(); 13032event.preventDefault(); 13033yearselect.hide(); 13034monthselect.hide(); 13035return false; 13036}); 13037 13038//scroll_element = timepicker.find('.xdsoft_time_box'); 13039timeboxparent.append(timebox); 13040timeboxparent.xdsoftScroller(); 13041 13042datetimepicker.on('afterOpen.xdsoft', function () { 13043timeboxparent.xdsoftScroller(); 13044}); 13045 13046datetimepicker 13047.append(datepicker) 13048.append(timepicker); 13049 13050if (options.withoutCopyright !== true) { 13051datetimepicker 13052.append(xdsoft_copyright); 13053} 13054 13055datepicker 13056.append(mounth_picker) 13057.append(calendar) 13058.append(applyButton); 13059 13060$(options.parentID) 13061.append(datetimepicker); 13062 13063XDSoft_datetime = function () { 13064var _this = this; 13065_this.now = function (norecursion) { 13066var d = new Date(), 13067date, 13068time; 13069 13070if (!norecursion && options.defaultDate) { 13071date = _this.strToDateTime(options.defaultDate); 13072d.setFullYear(date.getFullYear()); 13073d.setMonth(date.getMonth()); 13074d.setDate(date.getDate()); 13075} 13076 13077if (options.yearOffset) { 13078d.setFullYear(d.getFullYear() + options.yearOffset); 13079} 13080 13081if (!norecursion && options.defaultTime) { 13082time = _this.strtotime(options.defaultTime); 13083d.setHours(time.getHours()); 13084d.setMinutes(time.getMinutes()); 13085} 13086return d; 13087}; 13088 13089_this.isValidDate = function (d) { 13090if (Object.prototype.toString.call(d) !== "[object Date]") { 13091return false; 13092} 13093return !isNaN(d.getTime()); 13094}; 13095 13096_this.setCurrentTime = function (dTime, requireValidDate) { 13097if (typeof dTime === 'string') { 13098_this.currentTime = _this.strToDateTime(dTime); 13099} 13100else if (_this.isValidDate(dTime)) { 13101_this.currentTime = dTime; 13102} 13103else if (!dTime && !requireValidDate && options.allowBlank) { 13104_this.currentTime = null; 13105} 13106else { 13107_this.currentTime = _this.now(); 13108} 13109 13110datetimepicker.trigger('xchange.xdsoft'); 13111}; 13112 13113_this.empty = function () { 13114_this.currentTime = null; 13115}; 13116 13117_this.getCurrentTime = function (dTime) { 13118return _this.currentTime; 13119}; 13120 13121_this.nextMonth = function () { 13122 13123if (_this.currentTime === undefined || _this.currentTime === null) { 13124_this.currentTime = _this.now(); 13125} 13126 13127var month = _this.currentTime.getMonth() + 1, 13128year; 13129if (month === 12) { 13130_this.currentTime.setFullYear(_this.currentTime.getFullYear() + 1); 13131month = 0; 13132} 13133 13134year = _this.currentTime.getFullYear(); 13135 13136_this.currentTime.setDate( 13137Math.min( 13138new Date(_this.currentTime.getFullYear(), month + 1, 0).getDate(), 13139_this.currentTime.getDate() 13140) 13141); 13142_this.currentTime.setMonth(month); 13143 13144if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) { 13145options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input')); 13146} 13147 13148if (year !== _this.currentTime.getFullYear() && $.isFunction(options.onChangeYear)) { 13149options.onChangeYear.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input')); 13150} 13151 13152datetimepicker.trigger('xchange.xdsoft'); 13153return month; 13154}; 13155 13156_this.prevMonth = function () { 13157 13158if (_this.currentTime === undefined || _this.currentTime === null) { 13159_this.currentTime = _this.now(); 13160} 13161 13162var month = _this.currentTime.getMonth() - 1; 13163if (month === -1) { 13164_this.currentTime.setFullYear(_this.currentTime.getFullYear() - 1); 13165month = 11; 13166} 13167_this.currentTime.setDate( 13168Math.min( 13169new Date(_this.currentTime.getFullYear(), month + 1, 0).getDate(), 13170_this.currentTime.getDate() 13171) 13172); 13173_this.currentTime.setMonth(month); 13174if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) { 13175options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input')); 13176} 13177datetimepicker.trigger('xchange.xdsoft'); 13178return month; 13179}; 13180 13181_this.getWeekOfYear = function (datetime) { 13182if (options.onGetWeekOfYear && $.isFunction(options.onGetWeekOfYear)) { 13183var week = options.onGetWeekOfYear.call(datetimepicker, datetime); 13184if (typeof week !== 'undefined') { 13185return week; 13186} 13187} 13188var onejan = new Date(datetime.getFullYear(), 0, 1); 13189//First week of the year is th one with the first Thursday according to ISO8601 13190if (onejan.getDay() != 4) 13191onejan.setMonth(0, 1 + ((4 - onejan.getDay() + 7) % 7)); 13192return Math.ceil((((datetime - onejan) / 86400000) + onejan.getDay() + 1) / 7); 13193}; 13194 13195_this.strToDateTime = function (sDateTime) { 13196var tmpDate = [], timeOffset, currentTime; 13197 13198if (sDateTime && sDateTime instanceof Date && _this.isValidDate(sDateTime)) { 13199return sDateTime; 13200} 13201 13202tmpDate = /^(\+|\-)(.*)$/.exec(sDateTime); 13203if (tmpDate) { 13204tmpDate[2] = dateHelper.parseDate(tmpDate[2], options.formatDate); 13205} 13206if (tmpDate && tmpDate[2]) { 13207timeOffset = tmpDate[2].getTime() - (tmpDate[2].getTimezoneOffset()) * 60000; 13208currentTime = new Date((_this.now(true)).getTime() + parseInt(tmpDate[1] + '1', 10) * timeOffset); 13209} else { 13210currentTime = sDateTime ? dateHelper.parseDate(sDateTime, options.format) : _this.now(); 13211} 13212 13213if (!_this.isValidDate(currentTime)) { 13214currentTime = _this.now(); 13215} 13216 13217return currentTime; 13218}; 13219 13220_this.strToDate = function (sDate) { 13221if (sDate && sDate instanceof Date && _this.isValidDate(sDate)) { 13222return sDate; 13223} 13224 13225var currentTime = sDate ? dateHelper.parseDate(sDate, options.formatDate) : _this.now(true); 13226if (!_this.isValidDate(currentTime)) { 13227currentTime = _this.now(true); 13228} 13229return currentTime; 13230}; 13231 13232_this.strtotime = function (sTime) { 13233if (sTime && sTime instanceof Date && _this.isValidDate(sTime)) { 13234return sTime; 13235} 13236var currentTime = sTime ? dateHelper.parseDate(sTime, options.formatTime) : _this.now(true); 13237if (!_this.isValidDate(currentTime)) { 13238currentTime = _this.now(true); 13239} 13240return currentTime; 13241}; 13242 13243_this.str = function () { 13244return dateHelper.formatDate(_this.currentTime, options.format); 13245}; 13246_this.currentTime = this.now(); 13247}; 13248 13249_xdsoft_datetime = new XDSoft_datetime(); 13250 13251applyButton.on('touchend click', function (e) {//pathbrite 13252e.preventDefault(); 13253datetimepicker.data('changed', true); 13254_xdsoft_datetime.setCurrentTime(getCurrentValue()); 13255input.val(_xdsoft_datetime.str()); 13256datetimepicker.trigger('close.xdsoft'); 13257}); 13258mounth_picker 13259.find('.xdsoft_today_button') 13260.on('touchend mousedown.xdsoft', function () { 13261datetimepicker.data('changed', true); 13262_xdsoft_datetime.setCurrentTime(0, true); 13263datetimepicker.trigger('afterOpen.xdsoft'); 13264}).on('dblclick.xdsoft', function () { 13265var currentDate = _xdsoft_datetime.getCurrentTime(), minDate, maxDate; 13266currentDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate()); 13267minDate = _xdsoft_datetime.strToDate(options.minDate); 13268minDate = new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate()); 13269if (currentDate < minDate) { 13270return; 13271} 13272maxDate = _xdsoft_datetime.strToDate(options.maxDate); 13273maxDate = new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate()); 13274if (currentDate > maxDate) { 13275return; 13276} 13277input.val(_xdsoft_datetime.str()); 13278input.trigger('change'); 13279datetimepicker.trigger('close.xdsoft'); 13280}); 13281mounth_picker 13282.find('.xdsoft_prev,.xdsoft_next') 13283.on('touchend mousedown.xdsoft', function () { 13284var $this = $(this), 13285timer = 0, 13286stop = false; 13287 13288(function arguments_callee1(v) { 13289if ($this.hasClass(options.next)) { 13290_xdsoft_datetime.nextMonth(); 13291} else if ($this.hasClass(options.prev)) { 13292_xdsoft_datetime.prevMonth(); 13293} 13294if (options.monthChangeSpinner) { 13295if (!stop) { 13296timer = setTimeout(arguments_callee1, v || 100); 13297} 13298} 13299}(500)); 13300 13301$([document.body, window]).on('touchend mouseup.xdsoft', function arguments_callee2() { 13302clearTimeout(timer); 13303stop = true; 13304$([document.body, window]).off('touchend mouseup.xdsoft', arguments_callee2); 13305}); 13306}); 13307 13308timepicker 13309.find('.xdsoft_prev,.xdsoft_next') 13310.on('touchend mousedown.xdsoft', function () { 13311var $this = $(this), 13312timer = 0, 13313stop = false, 13314period = 110; 13315(function arguments_callee4(v) { 13316var pheight = timeboxparent[0].clientHeight, 13317height = timebox[0].offsetHeight, 13318top = Math.abs(parseInt(timebox.css('marginTop'), 10)); 13319if ($this.hasClass(options.next) && (height - pheight) - options.timeHeightInTimePicker >= top) { 13320timebox.css('marginTop', '-' + (top + options.timeHeightInTimePicker) + 'px'); 13321} else if ($this.hasClass(options.prev) && top - options.timeHeightInTimePicker >= 0) { 13322timebox.css('marginTop', '-' + (top - options.timeHeightInTimePicker) + 'px'); 13323} 13324/** 13325 * Fixed bug: 13326 * When using css3 transition, it will cause a bug that you cannot scroll the timepicker list. 13327 * The reason is that the transition-duration time, if you set it to 0, all things fine, otherwise, this 13328 * would cause a bug when you use jquery.css method. 13329 * Let's say: * { transition: all .5s ease; } 13330 * jquery timebox.css('marginTop') will return the original value which is before you clicking the next/prev button, 13331 * meanwhile the timebox[0].style.marginTop will return the right value which is after you clicking the 13332 * next/prev button. 13333 * 13334 * What we should do: 13335 * Replace timebox.css('marginTop') with timebox[0].style.marginTop. 13336 */ 13337timeboxparent.trigger('scroll_element.xdsoft_scroller', [Math.abs(parseInt(timebox[0].style.marginTop, 10) / (height - pheight))]); 13338period = (period > 10) ? 10 : period - 10; 13339if (!stop) { 13340timer = setTimeout(arguments_callee4, v || period); 13341} 13342}(500)); 13343$([document.body, window]).on('touchend mouseup.xdsoft', function arguments_callee5() { 13344clearTimeout(timer); 13345stop = true; 13346$([document.body, window]) 13347.off('touchend mouseup.xdsoft', arguments_callee5); 13348}); 13349}); 13350 13351xchangeTimer = 0; 13352// base handler - generating a calendar and timepicker 13353datetimepicker 13354.on('xchange.xdsoft', function (event) { 13355clearTimeout(xchangeTimer); 13356xchangeTimer = setTimeout(function () { 13357 13358if (_xdsoft_datetime.currentTime === undefined || _xdsoft_datetime.currentTime === null) { 13359//In case blanks are allowed, delay construction until we have a valid date 13360if (options.allowBlank) 13361return; 13362 13363_xdsoft_datetime.currentTime = _xdsoft_datetime.now(); 13364} 13365 13366var table = '', 13367start = new Date(_xdsoft_datetime.currentTime.getFullYear(), _xdsoft_datetime.currentTime.getMonth(), 1, 12, 0, 0), 13368i = 0, 13369j, 13370today = _xdsoft_datetime.now(), 13371maxDate = false, 13372minDate = false, 13373hDate, 13374day, 13375d, 13376y, 13377m, 13378w, 13379classes = [], 13380customDateSettings, 13381newRow = true, 13382time = '', 13383h = '', 13384line_time, 13385description; 13386 13387while (start.getDay() !== options.dayOfWeekStart) { 13388start.setDate(start.getDate() - 1); 13389} 13390 13391table += '<table><thead><tr>'; 13392 13393if (options.weeks) { 13394table += '<th></th>'; 13395} 13396 13397for (j = 0; j < 7; j += 1) { 13398table += '<th>' + options.i18n[globalLocale].dayOfWeekShort[(j + options.dayOfWeekStart) % 7] + '</th>'; 13399} 13400 13401table += '</tr></thead>'; 13402table += '<tbody>'; 13403 13404if (options.maxDate !== false) { 13405maxDate = _xdsoft_datetime.strToDate(options.maxDate); 13406maxDate = new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate(), 23, 59, 59, 999); 13407} 13408 13409if (options.minDate !== false) { 13410minDate = _xdsoft_datetime.strToDate(options.minDate); 13411minDate = new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate()); 13412} 13413 13414while (i < _xdsoft_datetime.currentTime.countDaysInMonth() || start.getDay() !== options.dayOfWeekStart || _xdsoft_datetime.currentTime.getMonth() === start.getMonth()) { 13415classes = []; 13416i += 1; 13417 13418day = start.getDay(); 13419d = start.getDate(); 13420y = start.getFullYear(); 13421m = start.getMonth(); 13422w = _xdsoft_datetime.getWeekOfYear(start); 13423description = ''; 13424 13425classes.push('xdsoft_date'); 13426 13427if (options.beforeShowDay && $.isFunction(options.beforeShowDay.call)) { 13428customDateSettings = options.beforeShowDay.call(datetimepicker, start); 13429} else { 13430customDateSettings = null; 13431} 13432 13433if (options.allowDateRe && Object.prototype.toString.call(options.allowDateRe) === "[object RegExp]") { 13434if (!options.allowDateRe.test(dateHelper.formatDate(start, options.formatDate))) { 13435classes.push('xdsoft_disabled'); 13436} 13437} else if (options.allowDates && options.allowDates.length > 0) { 13438if (options.allowDates.indexOf(dateHelper.formatDate(start, options.formatDate)) === -1) { 13439classes.push('xdsoft_disabled'); 13440} 13441} else if ((maxDate !== false && start > maxDate) || (minDate !== false && start < minDate) || (customDateSettings && customDateSettings[0] === false)) { 13442classes.push('xdsoft_disabled'); 13443} else if (options.disabledDates.indexOf(dateHelper.formatDate(start, options.formatDate)) !== -1) { 13444classes.push('xdsoft_disabled'); 13445} else if (options.disabledWeekDays.indexOf(day) !== -1) { 13446classes.push('xdsoft_disabled'); 13447} else if (input.is('[readonly]')) { 13448classes.push('xdsoft_disabled'); 13449} 13450 13451if (customDateSettings && customDateSettings[1] !== "") { 13452classes.push(customDateSettings[1]); 13453} 13454 13455if (_xdsoft_datetime.currentTime.getMonth() !== m) { 13456classes.push('xdsoft_other_month'); 13457} 13458 13459if ((options.defaultSelect || datetimepicker.data('changed')) && dateHelper.formatDate(_xdsoft_datetime.currentTime, options.formatDate) === dateHelper.formatDate(start, options.formatDate)) { 13460classes.push('xdsoft_current'); 13461} 13462 13463if (dateHelper.formatDate(today, options.formatDate) === dateHelper.formatDate(start, options.formatDate)) { 13464classes.push('xdsoft_today'); 13465} 13466 13467if (start.getDay() === 0 || start.getDay() === 6 || options.weekends.indexOf(dateHelper.formatDate(start, options.formatDate)) !== -1) { 13468classes.push('xdsoft_weekend'); 13469} 13470 13471if (options.highlightedDates[dateHelper.formatDate(start, options.formatDate)] !== undefined) { 13472hDate = options.highlightedDates[dateHelper.formatDate(start, options.formatDate)]; 13473classes.push(hDate.style === undefined ? 'xdsoft_highlighted_default' : hDate.style); 13474description = hDate.desc === undefined ? '' : hDate.desc; 13475} 13476 13477if (options.beforeShowDay && $.isFunction(options.beforeShowDay)) { 13478classes.push(options.beforeShowDay(start)); 13479} 13480 13481if (newRow) { 13482table += '<tr>'; 13483newRow = false; 13484if (options.weeks) { 13485table += '<th>' + w + '</th>'; 13486} 13487} 13488 13489table += '<td data-date="' + d + '" data-month="' + m + '" data-year="' + y + '"' + ' class="xdsoft_date xdsoft_day_of_week' + start.getDay() + ' ' + classes.join(' ') + '" title="' + description + '">' + 13490'<div>' + d + '</div>' + 13491'</td>'; 13492 13493if (start.getDay() === options.dayOfWeekStartPrev) { 13494table += '</tr>'; 13495newRow = true; 13496} 13497 13498start.setDate(d + 1); 13499} 13500table += '</tbody></table>'; 13501 13502calendar.html(table); 13503 13504mounth_picker.find('.xdsoft_label span').eq(0).text(options.i18n[globalLocale].months[_xdsoft_datetime.currentTime.getMonth()]); 13505mounth_picker.find('.xdsoft_label span').eq(1).text(_xdsoft_datetime.currentTime.getFullYear()); 13506 13507// generate timebox 13508time = ''; 13509h = ''; 13510m = ''; 13511 13512line_time = function line_time(h, m) { 13513var now = _xdsoft_datetime.now(), optionDateTime, current_time, 13514isALlowTimesInit = options.allowTimes && $.isArray(options.allowTimes) && options.allowTimes.length; 13515now.setHours(h); 13516h = parseInt(now.getHours(), 10); 13517now.setMinutes(m); 13518m = parseInt(now.getMinutes(), 10); 13519optionDateTime = new Date(_xdsoft_datetime.currentTime); 13520optionDateTime.setHours(h); 13521optionDateTime.setMinutes(m); 13522classes = []; 13523if ((options.minDateTime !== false && options.minDateTime > optionDateTime) || (options.maxTime !== false && _xdsoft_datetime.strtotime(options.maxTime).getTime() < now.getTime()) || (options.minTime !== false && _xdsoft_datetime.strtotime(options.minTime).getTime() > now.getTime())) { 13524classes.push('xdsoft_disabled'); 13525} else if ((options.minDateTime !== false && options.minDateTime > optionDateTime) || ((options.disabledMinTime !== false && now.getTime() > _xdsoft_datetime.strtotime(options.disabledMinTime).getTime()) && (options.disabledMaxTime !== false && now.getTime() < _xdsoft_datetime.strtotime(options.disabledMaxTime).getTime()))) { 13526classes.push('xdsoft_disabled'); 13527} else if (input.is('[readonly]')) { 13528classes.push('xdsoft_disabled'); 13529} 13530 13531current_time = new Date(_xdsoft_datetime.currentTime); 13532current_time.setHours(parseInt(_xdsoft_datetime.currentTime.getHours(), 10)); 13533 13534if (!isALlowTimesInit) { 13535current_time.setMinutes(Math[options.roundTime](_xdsoft_datetime.currentTime.getMinutes() / options.step) * options.step); 13536} 13537 13538if ((options.initTime || options.defaultSelect || datetimepicker.data('changed')) && current_time.getHours() === parseInt(h, 10) && ((!isALlowTimesInit && options.step > 59) || current_time.getMinutes() === parseInt(m, 10))) { 13539if (options.defaultSelect || datetimepicker.data('changed')) { 13540classes.push('xdsoft_current'); 13541} else if (options.initTime) { 13542classes.push('xdsoft_init_time'); 13543} 13544} 13545if (parseInt(today.getHours(), 10) === parseInt(h, 10) && parseInt(today.getMinutes(), 10) === parseInt(m, 10)) { 13546classes.push('xdsoft_today'); 13547} 13548time += '<div class="xdsoft_time ' + classes.join(' ') + '" data-hour="' + h + '" data-minute="' + m + '">' + dateHelper.formatDate(now, options.formatTime) + '</div>'; 13549}; 13550 13551if (!options.allowTimes || !$.isArray(options.allowTimes) || !options.allowTimes.length) { 13552for (i = 0, j = 0; i < (options.hours12 ? 12 : 24) ; i += 1) { 13553for (j = 0; j < 60; j += options.step) { 13554h = (i < 10 ? '0' : '') + i; 13555m = (j < 10 ? '0' : '') + j; 13556line_time(h, m); 13557} 13558} 13559} else { 13560for (i = 0; i < options.allowTimes.length; i += 1) { 13561h = _xdsoft_datetime.strtotime(options.allowTimes[i]).getHours(); 13562m = _xdsoft_datetime.strtotime(options.allowTimes[i]).getMinutes(); 13563line_time(h, m); 13564} 13565} 13566 13567timebox.html(time); 13568 13569opt = ''; 13570i = 0; 13571 13572for (i = parseInt(options.yearStart, 10) + options.yearOffset; i <= parseInt(options.yearEnd, 10) + options.yearOffset; i += 1) { 13573opt += '<div class="xdsoft_option ' + (_xdsoft_datetime.currentTime.getFullYear() === i ? 'xdsoft_current' : '') + '" data-value="' + i + '">' + i + '</div>'; 13574} 13575yearselect.children().eq(0) 13576.html(opt); 13577 13578for (i = parseInt(options.monthStart, 10), opt = ''; i <= parseInt(options.monthEnd, 10) ; i += 1) { 13579opt += '<div class="xdsoft_option ' + (_xdsoft_datetime.currentTime.getMonth() === i ? 'xdsoft_current' : '') + '" data-value="' + i + '">' + options.i18n[globalLocale].months[i] + '</div>'; 13580} 13581monthselect.children().eq(0).html(opt); 13582$(datetimepicker) 13583.trigger('generate.xdsoft'); 13584}, 10); 13585event.stopPropagation(); 13586}) 13587.on('afterOpen.xdsoft', function () { 13588if (options.timepicker) { 13589var classType, pheight, height, top; 13590if (timebox.find('.xdsoft_current').length) { 13591classType = '.xdsoft_current'; 13592} else if (timebox.find('.xdsoft_init_time').length) { 13593classType = '.xdsoft_init_time'; 13594} 13595if (classType) { 13596pheight = timeboxparent[0].clientHeight; 13597height = timebox[0].offsetHeight; 13598top = timebox.find(classType).index() * options.timeHeightInTimePicker + 1; 13599if ((height - pheight) < top) { 13600top = height - pheight; 13601} 13602timeboxparent.trigger('scroll_element.xdsoft_scroller', [parseInt(top, 10) / (height - pheight)]); 13603} else { 13604timeboxparent.trigger('scroll_element.xdsoft_scroller', [0]); 13605} 13606} 13607}); 13608 13609timerclick = 0; 13610calendar 13611.on('touchend click.xdsoft', 'td', function (xdevent) { 13612xdevent.stopPropagation(); // Prevents closing of Pop-ups, Modals and Flyouts in Bootstrap 13613timerclick += 1; 13614var $this = $(this), 13615currentTime = _xdsoft_datetime.currentTime; 13616 13617if (currentTime === undefined || currentTime === null) { 13618_xdsoft_datetime.currentTime = _xdsoft_datetime.now(); 13619currentTime = _xdsoft_datetime.currentTime; 13620} 13621 13622if ($this.hasClass('xdsoft_disabled')) { 13623return false; 13624} 13625 13626currentTime.setDate(1); 13627currentTime.setFullYear($this.data('year')); 13628currentTime.setMonth($this.data('month')); 13629currentTime.setDate($this.data('date')); 13630 13631datetimepicker.trigger('select.xdsoft', [currentTime]); 13632 13633input.val(_xdsoft_datetime.str()); 13634 13635if (options.onSelectDate && $.isFunction(options.onSelectDate)) { 13636options.onSelectDate.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent); 13637} 13638 13639datetimepicker.data('changed', true); 13640datetimepicker.trigger('xchange.xdsoft'); 13641datetimepicker.trigger('changedatetime.xdsoft'); 13642if ((timerclick > 1 || (options.closeOnDateSelect === true || (options.closeOnDateSelect === false && !options.timepicker))) && !options.inline) { 13643datetimepicker.trigger('close.xdsoft'); 13644} 13645setTimeout(function () { 13646timerclick = 0; 13647}, 200); 13648}); 13649 13650timebox 13651.on('touchend click.xdsoft', 'div', function (xdevent) { 13652xdevent.stopPropagation(); 13653var $this = $(this), 13654currentTime = _xdsoft_datetime.currentTime; 13655 13656if (currentTime === undefined || currentTime === null) { 13657_xdsoft_datetime.currentTime = _xdsoft_datetime.now(); 13658currentTime = _xdsoft_datetime.currentTime; 13659} 13660 13661if ($this.hasClass('xdsoft_disabled')) { 13662return false; 13663} 13664currentTime.setHours($this.data('hour')); 13665currentTime.setMinutes($this.data('minute')); 13666datetimepicker.trigger('select.xdsoft', [currentTime]); 13667 13668datetimepicker.data('input').val(_xdsoft_datetime.str()); 13669 13670if (options.onSelectTime && $.isFunction(options.onSelectTime)) { 13671options.onSelectTime.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent); 13672} 13673datetimepicker.data('changed', true); 13674datetimepicker.trigger('xchange.xdsoft'); 13675datetimepicker.trigger('changedatetime.xdsoft'); 13676if (options.inline !== true && options.closeOnTimeSelect === true) { 13677datetimepicker.trigger('close.xdsoft'); 13678} 13679}); 13680 13681datepicker 13682.on('mousewheel.xdsoft', function (event) { 13683if (!options.scrollMonth) { 13684return true; 13685} 13686if (event.deltaY < 0) { 13687_xdsoft_datetime.nextMonth(); 13688} else { 13689_xdsoft_datetime.prevMonth(); 13690} 13691return false; 13692}); 13693 13694input 13695.on('mousewheel.xdsoft', function (event) { 13696if (!options.scrollInput) { 13697return true; 13698} 13699if (!options.datepicker && options.timepicker) { 13700current_time_index = timebox.find('.xdsoft_current').length ? timebox.find('.xdsoft_current').eq(0).index() : 0; 13701if (current_time_index + event.deltaY >= 0 && current_time_index + event.deltaY < timebox.children().length) { 13702current_time_index += event.deltaY; 13703} 13704if (timebox.children().eq(current_time_index).length) { 13705timebox.children().eq(current_time_index).trigger('mousedown'); 13706} 13707return false; 13708} 13709if (options.datepicker && !options.timepicker) { 13710datepicker.trigger(event, [event.deltaY, event.deltaX, event.deltaY]); 13711if (input.val) { 13712input.val(_xdsoft_datetime.str()); 13713} 13714datetimepicker.trigger('changedatetime.xdsoft'); 13715return false; 13716} 13717}); 13718 13719datetimepicker 13720.on('changedatetime.xdsoft', function (event) { 13721if (options.onChangeDateTime && $.isFunction(options.onChangeDateTime)) { 13722var $input = datetimepicker.data('input'); 13723options.onChangeDateTime.call(datetimepicker, _xdsoft_datetime.currentTime, $input, event); 13724delete options.value; 13725$input.trigger('change'); 13726} 13727}) 13728.on('generate.xdsoft', function () { 13729if (options.onGenerate && $.isFunction(options.onGenerate)) { 13730options.onGenerate.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input')); 13731} 13732if (triggerAfterOpen) { 13733datetimepicker.trigger('afterOpen.xdsoft'); 13734triggerAfterOpen = false; 13735} 13736}) 13737.on('click.xdsoft', function (xdevent) { 13738xdevent.stopPropagation(); 13739}); 13740 13741current_time_index = 0; 13742 13743/** 13744 * Runs the callback for each of the specified node's ancestors. 13745 * 13746 * Return FALSE from the callback to stop ascending. 13747 * 13748 * @param {DOMNode} node 13749 * @param {Function} callback 13750 * @returns {undefined} 13751 */ 13752forEachAncestorOf = function (node, callback) { 13753do { 13754node = node.parentNode; 13755 13756if (callback(node) === false) { 13757break; 13758} 13759} while (node.nodeName !== 'HTML'); 13760}; 13761 13762/** 13763 * Sets the position of the picker. 13764 * 13765 * @returns {undefined} 13766 */ 13767setPos = function () { 13768var dateInputOffset, 13769dateInputElem, 13770verticalPosition, 13771left, 13772position, 13773datetimepickerElem, 13774dateInputHasFixedAncestor, 13775$dateInput, 13776windowWidth, 13777verticalAnchorEdge, 13778datetimepickerCss, 13779windowHeight, 13780windowScrollTop; 13781 13782$dateInput = datetimepicker.data('input'); 13783dateInputOffset = $dateInput.offset(); 13784dateInputElem = $dateInput[0]; 13785 13786verticalAnchorEdge = 'top'; 13787verticalPosition = (dateInputOffset.top + dateInputElem.offsetHeight) - 1; 13788left = dateInputOffset.left; 13789position = "absolute"; 13790 13791windowWidth = $(window).width(); 13792windowHeight = $(window).height(); 13793windowScrollTop = $(window).scrollTop(); 13794 13795if ((document.documentElement.clientWidth - dateInputOffset.left) < datepicker.parent().outerWidth(true)) { 13796var diff = datepicker.parent().outerWidth(true) - dateInputElem.offsetWidth; 13797left = left - diff; 13798} 13799 13800if ($dateInput.parent().css('direction') === 'rtl') { 13801left -= (datetimepicker.outerWidth() - $dateInput.outerWidth()); 13802} 13803 13804if (options.fixed) { 13805verticalPosition -= windowScrollTop; 13806left -= $(window).scrollLeft(); 13807position = "fixed"; 13808} else { 13809dateInputHasFixedAncestor = false; 13810 13811forEachAncestorOf(dateInputElem, function (ancestorNode) { 13812if (window.getComputedStyle(ancestorNode).getPropertyValue('position') === 'fixed') { 13813dateInputHasFixedAncestor = true; 13814return false; 13815} 13816}); 13817 13818if (dateInputHasFixedAncestor) { 13819position = 'fixed'; 13820 13821//If the picker won't fit entirely within the viewport then display it above the date input. 13822if (verticalPosition + datetimepicker.outerHeight() > windowHeight + windowScrollTop) { 13823verticalAnchorEdge = 'bottom'; 13824verticalPosition = (windowHeight + windowScrollTop) - dateInputOffset.top; 13825} else { 13826verticalPosition -= windowScrollTop; 13827} 13828} else { 13829if (verticalPosition + dateInputElem.offsetHeight > windowHeight + windowScrollTop) { 13830verticalPosition = dateInputOffset.top - dateInputElem.offsetHeight + 1; 13831} 13832} 13833 13834if (verticalPosition < 0) { 13835verticalPosition = 0; 13836} 13837 13838if (left + dateInputElem.offsetWidth > windowWidth) { 13839left = windowWidth - dateInputElem.offsetWidth; 13840} 13841} 13842 13843datetimepickerElem = datetimepicker[0]; 13844 13845forEachAncestorOf(datetimepickerElem, function (ancestorNode) { 13846var ancestorNodePosition; 13847 13848ancestorNodePosition = window.getComputedStyle(ancestorNode).getPropertyValue('position'); 13849 13850if (ancestorNodePosition === 'relative' && windowWidth >= ancestorNode.offsetWidth) { 13851left = left - ((windowWidth - ancestorNode.offsetWidth) / 2); 13852return false; 13853} 13854}); 13855 13856datetimepickerCss = { 13857position: position, 13858left: left, 13859top: '', //Initialize to prevent previous values interfering with new ones. 13860bottom: '' //Initialize to prevent previous values interfering with new ones. 13861}; 13862 13863datetimepickerCss[verticalAnchorEdge] = verticalPosition; 13864 13865datetimepicker.css(datetimepickerCss); 13866}; 13867 13868datetimepicker 13869.on('open.xdsoft', function (event) { 13870var onShow = true; 13871if (options.onShow && $.isFunction(options.onShow)) { 13872onShow = options.onShow.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), event); 13873} 13874if (onShow !== false) { 13875datetimepicker.show(); 13876setPos(); 13877$(window) 13878.off('resize.xdsoft', setPos) 13879.on('resize.xdsoft', setPos); 13880 13881if (options.closeOnWithoutClick) { 13882$([document.body, window]).on('touchstart mousedown.xdsoft', function arguments_callee6() { 13883datetimepicker.trigger('close.xdsoft'); 13884$([document.body, window]).off('touchstart mousedown.xdsoft', arguments_callee6); 13885}); 13886} 13887} 13888}) 13889.on('close.xdsoft', function (event) { 13890var onClose = true; 13891mounth_picker 13892.find('.xdsoft_month,.xdsoft_year') 13893.find('.xdsoft_select') 13894.hide(); 13895if (options.onClose && $.isFunction(options.onClose)) { 13896onClose = options.onClose.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), event); 13897} 13898if (onClose !== false && !options.opened && !options.inline) { 13899datetimepicker.hide(); 13900} 13901event.stopPropagation(); 13902}) 13903.on('toggle.xdsoft', function () { 13904if (datetimepicker.is(':visible')) { 13905datetimepicker.trigger('close.xdsoft'); 13906} else { 13907datetimepicker.trigger('open.xdsoft'); 13908} 13909}) 13910.data('input', input); 13911 13912timer = 0; 13913 13914datetimepicker.data('xdsoft_datetime', _xdsoft_datetime); 13915datetimepicker.setOptions(options); 13916 13917function getCurrentValue() { 13918var ct = false, time; 13919 13920if (options.startDate) { 13921ct = _xdsoft_datetime.strToDate(options.startDate); 13922} else { 13923ct = options.value || ((input && input.val && input.val()) ? input.val() : ''); 13924if (ct) { 13925ct = _xdsoft_datetime.strToDateTime(ct); 13926} else if (options.defaultDate) { 13927ct = _xdsoft_datetime.strToDateTime(options.defaultDate); 13928if (options.defaultTime) { 13929time = _xdsoft_datetime.strtotime(options.defaultTime); 13930ct.setHours(time.getHours()); 13931ct.setMinutes(time.getMinutes()); 13932} 13933} 13934} 13935 13936if (ct && _xdsoft_datetime.isValidDate(ct)) { 13937datetimepicker.data('changed', true); 13938} else { 13939ct = ''; 13940} 13941 13942return ct || 0; 13943} 13944 13945function setMask(options) { 13946 13947var isValidValue = function (mask, value) { 13948var reg = mask 13949.replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g, '\\$1') 13950.replace(/_/g, '{digit+}') 13951.replace(/([0-9]{1})/g, '{digit$1}') 13952.replace(/\{digit([0-9]{1})\}/g, '[0-$1_]{1}') 13953.replace(/\{digit[\+]\}/g, '[0-9_]{1}'); 13954return (new RegExp(reg)).test(value); 13955}, 13956getCaretPos = function (input) { 13957try { 13958if (document.selection && document.selection.createRange) { 13959var range = document.selection.createRange(); 13960return range.getBookmark().charCodeAt(2) - 2; 13961} 13962if (input.setSelectionRange) { 13963return input.selectionStart; 13964} 13965} catch (e) { 13966return 0; 13967} 13968}, 13969setCaretPos = function (node, pos) { 13970node = (typeof node === "string" || node instanceof String) ? document.getElementById(node) : node; 13971if (!node) { 13972return false; 13973} 13974if (node.createTextRange) { 13975var textRange = node.createTextRange(); 13976textRange.collapse(true); 13977textRange.moveEnd('character', pos); 13978textRange.moveStart('character', pos); 13979textRange.select(); 13980return true; 13981} 13982if (node.setSelectionRange) { 13983node.setSelectionRange(pos, pos); 13984return true; 13985} 13986return false; 13987}; 13988if (options.mask) { 13989input.off('keydown.xdsoft'); 13990} 13991if (options.mask === true) { 13992if (typeof moment != 'undefined') { 13993options.mask = options.format 13994.replace(/Y{4}/g, '9999') 13995.replace(/Y{2}/g, '99') 13996.replace(/M{2}/g, '19') 13997.replace(/D{2}/g, '39') 13998.replace(/H{2}/g, '29') 13999.replace(/m{2}/g, '59') 14000.replace(/s{2}/g, '59'); 14001} else { 14002options.mask = options.format 14003.replace(/Y/g, '9999') 14004.replace(/F/g, '9999') 14005.replace(/m/g, '19') 14006.replace(/d/g, '39') 14007.replace(/H/g, '29') 14008.replace(/i/g, '59') 14009.replace(/s/g, '59'); 14010} 14011} 14012 14013if ($.type(options.mask) === 'string') { 14014if (!isValidValue(options.mask, input.val())) { 14015input.val(options.mask.replace(/[0-9]/g, '_')); 14016setCaretPos(input[0], 0); 14017} 14018 14019input.on('keydown.xdsoft', function (event) { 14020var val = this.value, 14021key = event.which, 14022pos, 14023digit; 14024 14025if (((key >= KEY0 && key <= KEY9) || (key >= _KEY0 && key <= _KEY9)) || (key === BACKSPACE || key === DEL)) { 14026pos = getCaretPos(this); 14027digit = (key !== BACKSPACE && key !== DEL) ? String.fromCharCode((_KEY0 <= key && key <= _KEY9) ? key - KEY0 : key) : '_'; 14028 14029if ((key === BACKSPACE || key === DEL) && pos) { 14030pos -= 1; 14031digit = '_'; 14032} 14033 14034while (/[^0-9_]/.test(options.mask.substr(pos, 1)) && pos < options.mask.length && pos > 0) { 14035pos += (key === BACKSPACE || key === DEL) ? -1 : 1; 14036} 14037 14038val = val.substr(0, pos) + digit + val.substr(pos + 1); 14039if ($.trim(val) === '') { 14040val = options.mask.replace(/[0-9]/g, '_'); 14041} else { 14042if (pos === options.mask.length) { 14043event.preventDefault(); 14044return false; 14045} 14046} 14047 14048pos += (key === BACKSPACE || key === DEL) ? 0 : 1; 14049while (/[^0-9_]/.test(options.mask.substr(pos, 1)) && pos < options.mask.length && pos > 0) { 14050pos += (key === BACKSPACE || key === DEL) ? -1 : 1; 14051} 14052 14053if (isValidValue(options.mask, val)) { 14054this.value = val; 14055setCaretPos(this, pos); 14056} else if ($.trim(val) === '') { 14057this.value = options.mask.replace(/[0-9]/g, '_'); 14058} else { 14059input.trigger('error_input.xdsoft'); 14060} 14061} else { 14062if (([AKEY, CKEY, VKEY, ZKEY, YKEY].indexOf(key) !== -1 && ctrlDown) || [ESC, ARROWUP, ARROWDOWN, ARROWLEFT, ARROWRIGHT, F5, CTRLKEY, TAB, ENTER].indexOf(key) !== -1) { 14063return true; 14064} 14065} 14066 14067event.preventDefault(); 14068return false; 14069}); 14070} 14071} 14072 14073_xdsoft_datetime.setCurrentTime(getCurrentValue()); 14074 14075input 14076.data('xdsoft_datetimepicker', datetimepicker) 14077.on('open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart', function () { 14078if (input.is(':disabled') || (input.data('xdsoft_datetimepicker').is(':visible') && options.closeOnInputClick)) { 14079return; 14080} 14081clearTimeout(timer); 14082timer = setTimeout(function () { 14083if (input.is(':disabled')) { 14084return; 14085} 14086 14087triggerAfterOpen = true; 14088_xdsoft_datetime.setCurrentTime(getCurrentValue(), true); 14089if (options.mask) { 14090setMask(options); 14091} 14092datetimepicker.trigger('open.xdsoft'); 14093}, 100); 14094}) 14095.on('keydown.xdsoft', function (event) { 14096var elementSelector, 14097key = event.which; 14098if ([ENTER].indexOf(key) !== -1 && options.enterLikeTab) { 14099elementSelector = $("input:visible,textarea:visible,button:visible,a:visible"); 14100datetimepicker.trigger('close.xdsoft'); 14101elementSelector.eq(elementSelector.index(this) + 1).focus(); 14102return false; 14103} 14104if ([TAB].indexOf(key) !== -1) { 14105datetimepicker.trigger('close.xdsoft'); 14106return true; 14107} 14108}) 14109.on('blur.xdsoft', function () { 14110datetimepicker.trigger('close.xdsoft'); 14111}); 14112}; 14113destroyDateTimePicker = function (input) { 14114var datetimepicker = input.data('xdsoft_datetimepicker'); 14115if (datetimepicker) { 14116datetimepicker.data('xdsoft_datetime', null); 14117datetimepicker.remove(); 14118input 14119.data('xdsoft_datetimepicker', null) 14120.off('.xdsoft'); 14121$(window).off('resize.xdsoft'); 14122$([window, document.body]).off('mousedown.xdsoft touchstart'); 14123if (input.unmousewheel) { 14124input.unmousewheel(); 14125} 14126} 14127}; 14128$(document) 14129.off('keydown.xdsoftctrl keyup.xdsoftctrl') 14130.on('keydown.xdsoftctrl', function (e) { 14131if (e.keyCode === CTRLKEY) { 14132ctrlDown = true; 14133} 14134}) 14135.on('keyup.xdsoftctrl', function (e) { 14136if (e.keyCode === CTRLKEY) { 14137ctrlDown = false; 14138} 14139}); 14140 14141this.each(function () { 14142var datetimepicker = $(this).data('xdsoft_datetimepicker'), $input; 14143if (datetimepicker) { 14144if ($.type(opt) === 'string') { 14145switch (opt) { 14146case 'show': 14147$(this).select().focus(); 14148datetimepicker.trigger('open.xdsoft'); 14149break; 14150case 'hide': 14151datetimepicker.trigger('close.xdsoft'); 14152break; 14153case 'toggle': 14154datetimepicker.trigger('toggle.xdsoft'); 14155break; 14156case 'destroy': 14157destroyDateTimePicker($(this)); 14158break; 14159case 'reset': 14160this.value = this.defaultValue; 14161if (!this.value || !datetimepicker.data('xdsoft_datetime').isValidDate(dateHelper.parseDate(this.value, options.format))) { 14162datetimepicker.data('changed', false); 14163} 14164datetimepicker.data('xdsoft_datetime').setCurrentTime(this.value); 14165break; 14166case 'validate': 14167$input = datetimepicker.data('input'); 14168$input.trigger('blur.xdsoft'); 14169break; 14170default: 14171if (datetimepicker[opt] && $.isFunction(datetimepicker[opt])) { 14172result = datetimepicker[opt](opt2); 14173} 14174} 14175} else { 14176datetimepicker 14177.setOptions(opt); 14178} 14179return 0; 14180} 14181if ($.type(opt) !== 'string') { 14182if (!options.lazyInit || options.open || options.inline) { 14183createDateTimePicker($(this)); 14184} else { 14185lazyInit($(this)); 14186} 14187} 14188}); 14189 14190return result; 14191}; 14192 14193$.fn.datetimepicker.defaults = default_options; 14194 14195function HighlightedDate(date, desc, style) { 14196"use strict"; 14197this.date = date; 14198this.desc = desc; 14199this.style = style; 14200} 14201})); 14202/*! 14203 * jQuery Mousewheel 3.1.13 14204 * 14205 * Copyright jQuery Foundation and other contributors 14206 * Released under the MIT license 14207 * http://jquery.org/license 14208 */ 14209 14210(function (factory) { 14211if (typeof define === 'function' && define.amd) { 14212// AMD. Register as an anonymous module. 14213define(['jquery'], factory); 14214} else if (typeof exports === 'object') {
vendor: 5,303 bytes, lines 14215-14400
14215// Node/CommonJS style for Browserify 14216module.exports = factory; 14217} else { 14218// Browser globals 14219factory(jQuery); 14220} 14221}(function ($) { 14222 14223var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'], 14224toBind = ('onwheel' in document || document.documentMode >= 9) ? 14225['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'], 14226slice = Array.prototype.slice, 14227nullLowestDeltaTimeout, lowestDelta; 14228 14229if ($.event.fixHooks) { 14230for (var i = toFix.length; i;) { 14231$.event.fixHooks[toFix[--i]] = $.event.mouseHooks; 14232} 14233} 14234 14235var special = $.event.special.mousewheel = { 14236version: '3.1.12', 14237 14238setup: function () { 14239if (this.addEventListener) { 14240for (var i = toBind.length; i;) { 14241this.addEventListener(toBind[--i], handler, false); 14242} 14243} else { 14244this.onmousewheel = handler; 14245} 14246// Store the line height and page height for this particular element 14247$.data(this, 'mousewheel-line-height', special.getLineHeight(this)); 14248$.data(this, 'mousewheel-page-height', special.getPageHeight(this)); 14249}, 14250 14251teardown: function () { 14252if (this.removeEventListener) { 14253for (var i = toBind.length; i;) { 14254this.removeEventListener(toBind[--i], handler, false); 14255} 14256} else { 14257this.onmousewheel = null; 14258} 14259// Clean up the data we added to the element 14260$.removeData(this, 'mousewheel-line-height'); 14261$.removeData(this, 'mousewheel-page-height'); 14262}, 14263 14264getLineHeight: function (elem) { 14265var $elem = $(elem), 14266$parent = $elem['offsetParent' in $.fn ? 'offsetParent' : 'parent'](); 14267if (!$parent.length) { 14268$parent = $('body'); 14269} 14270return parseInt($parent.css('fontSize'), 10) || parseInt($elem.css('fontSize'), 10) || 16; 14271}, 14272 14273getPageHeight: function (elem) { 14274return $(elem).height(); 14275}, 14276 14277settings: { 14278adjustOldDeltas: true, // see shouldAdjustOldDeltas() below 14279normalizeOffset: true // calls getBoundingClientRect for each event 14280} 14281}; 14282 14283$.fn.extend({ 14284mousewheel: function (fn) { 14285return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel'); 14286}, 14287 14288unmousewheel: function (fn) { 14289return this.unbind('mousewheel', fn); 14290} 14291}); 14292 14293 14294function handler(event) { 14295var orgEvent = event || window.event, 14296args = slice.call(arguments, 1), 14297delta = 0, 14298deltaX = 0, 14299deltaY = 0, 14300absDelta = 0, 14301offsetX = 0, 14302offsetY = 0; 14303event = $.event.fix(orgEvent); 14304event.type = 'mousewheel'; 14305 14306// Old school scrollwheel delta 14307if ('detail' in orgEvent) { deltaY = orgEvent.detail * -1; } 14308if ('wheelDelta' in orgEvent) { deltaY = orgEvent.wheelDelta; } 14309if ('wheelDeltaY' in orgEvent) { deltaY = orgEvent.wheelDeltaY; } 14310if ('wheelDeltaX' in orgEvent) { deltaX = orgEvent.wheelDeltaX * -1; } 14311 14312// Firefox < 17 horizontal scrolling related to DOMMouseScroll event 14313if ('axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS) { 14314deltaX = deltaY * -1; 14315deltaY = 0; 14316} 14317 14318// Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy 14319delta = deltaY === 0 ? deltaX : deltaY; 14320 14321// New school wheel delta (wheel event) 14322if ('deltaY' in orgEvent) { 14323deltaY = orgEvent.deltaY * -1; 14324delta = deltaY; 14325} 14326if ('deltaX' in orgEvent) { 14327deltaX = orgEvent.deltaX; 14328if (deltaY === 0) { delta = deltaX * -1; } 14329} 14330 14331// No change actually happened, no reason to go any further 14332if (deltaY === 0 && deltaX === 0) { return; } 14333 14334// Need to convert lines and pages to pixels if we aren't already in pixels 14335// There are three delta modes: 14336// * deltaMode 0 is by pixels, nothing to do 14337// * deltaMode 1 is by lines 14338// * deltaMode 2 is by pages 14339if (orgEvent.deltaMode === 1) { 14340var lineHeight = $.data(this, 'mousewheel-line-height'); 14341delta *= lineHeight; 14342deltaY *= lineHeight; 14343deltaX *= lineHeight; 14344} else if (orgEvent.deltaMode === 2) { 14345var pageHeight = $.data(this, 'mousewheel-page-height'); 14346delta *= pageHeight; 14347deltaY *= pageHeight; 14348deltaX *= pageHeight; 14349} 14350 14351// Store lowest absolute delta to normalize the delta values 14352absDelta = Math.max(Math.abs(deltaY), Math.abs(deltaX)); 14353 14354if (!lowestDelta || absDelta < lowestDelta) { 14355lowestDelta = absDelta; 14356 14357// Adjust older deltas if necessary 14358if (shouldAdjustOldDeltas(orgEvent, absDelta)) { 14359lowestDelta /= 40; 14360} 14361} 14362 14363// Adjust older deltas if necessary 14364if (shouldAdjustOldDeltas(orgEvent, absDelta)) { 14365// Divide all the things by 40! 14366delta /= 40; 14367deltaX /= 40; 14368deltaY /= 40; 14369} 14370 14371// Get a whole, normalized value for the deltas 14372delta = Math[delta >= 1 ? 'floor' : 'ceil'](delta / lowestDelta); 14373deltaX = Math[deltaX >= 1 ? 'floor' : 'ceil'](deltaX / lowestDelta); 14374deltaY = Math[deltaY >= 1 ? 'floor' : 'ceil'](deltaY / lowestDelta); 14375 14376// Normalise offsetX and offsetY properties 14377if (special.settings.normalizeOffset && this.getBoundingClientRect) { 14378var boundingRect = this.getBoundingClientRect(); 14379offsetX = event.clientX - boundingRect.left; 14380offsetY = event.clientY - boundingRect.top; 14381} 14382 14383// Add information to the event object 14384event.deltaX = deltaX; 14385event.deltaY = deltaY; 14386event.deltaFactor = lowestDelta; 14387event.offsetX = offsetX; 14388event.offsetY = offsetY; 14389// Go ahead and set deltaMode to 0 since we converted to pixels 14390// Although this is a little odd since we overwrite the deltaX/Y 14391// properties with normalized deltas. 14392event.deltaMode = 0; 14393 14394// Add event and delta to the front of the arguments 14395args.unshift(event, delta, deltaX, deltaY); 14396 14397// Clearout lowestDelta after sometime to better 14398// handle multiple device types that give different 14399// a different lowestDelta 14400// Ex: trackpad = 3 and mouse wheel = 120
14401if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); } 14402nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200); 14403 14404return ($.event.dispatch || $.event.handle).apply(this, args); 14405} 14406 14407function nullLowestDelta() { 14408lowestDelta = null; 14409} 14410 14411function shouldAdjustOldDeltas(orgEvent, absDelta) { 14412// If this is an older event and the delta is divisable by 120, 14413// then we are assuming that the browser is treating this as an 14414// older mouse wheel event and that we should divide the deltas 14415// by 40 to try and get a more usable deltaFactor. 14416// Side note, this actually impacts the reported scroll distance 14417// in older browsers and can cause scrolling to be slower than native. 14418// Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false. 14419return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0; 14420} 14421 14422})); 14423function unscrambleEmailLinks(){$('a[onmouseover^="javascript:this.href=unscrambleMailto"]').each(function(){$(this).html()!==""&&$(this).html().indexOf("|")>0&&(emailArr=$.trim($(this).html()).split("|"),domain=emailArr[0].replace(/<span class=\"?scrambledEmail\"?>/gi,""),user=emailArr[1].replace(/<\/span>/gi,""),$(this).html(unscrambleEmail(domain,user)))});$(".scrambledEmail").each(function(){$(this).html().indexOf("|")>0&&(emailArr=$(this).html().split("|"),domain=emailArr[0],user=emailArr[1],$(this).html(unscrambleEmail(domain,user)))})}function unscrambleMailto(n,t){return"mailto:"+unscrambleEmail(n,t)}function unscrambleEmail(n,t){return t.replace(/%23/g,".")+"@"+n.replace(/%23/g,".")}function displayWindow2(n,t,i){var r=window.open(n,"displayWindow","width="+t+",height="+i+",resizable=1,scrollbars=yes,menubar=no")}function checkSearchForm(n){return!n.search_string.value||n.search_string.value==="Enter Keyword"||n.search_string.value==="Enter Search"||n.search_string.value==="Search Here"?(alertMessage(0,!1,"Please enter search criteria.","danger"),n.search_string.focus(),!1):!0}function checkSearchFormFrench(n){return!n.search_string.value||n.search_string.value==="Recherche ici"||n.search_string.value==="Enter Search"?(alertMessage(0,!1,"Veuillez insérer un mot pour votre recherche!","danger"),n.search_string.focus(),!1):!0}function openPopup(n,t,i,r){var f=location.hostname,u=window.open(n,t,i);u&&u.opener&&(r&&(u.opener.location=r),u.opener.top.name="opener");u.focus()}function insert_desc(n){document.getElementById("desc_div").innerHTML=n;document.location="#desc_div"}function checkSubscribeForm(n){return!n.subscribe_email.value||n.subscribe_email.value==="Enter Email Here"?($(n).prepend('<div class="alert alert-danger">Please enter an email address!<\/div>'),n.subscribe_email.focus(),!1):n.subscribe_email.value.indexOf("@",0)===-1||n.subscribe_email.value.indexOf(".",0)===-1||n.subscribe_email.value.length<8||n.subscribe_email.value.length===n.subscribe_email.value.indexOf(".",0)+1?($(n).prepend('<div class="alert alert-danger">Please enter a valid email address!<\/div>'),n.subscribe_email.focus(),!1):!0}function printit(){window.print()}function Go(){return}function submitPollCheck(n){var t="";for(i=0;i<n.poll_vote.length;i++)if(n.poll_vote[i].checked)return t=!0,!0;return t||alertMessage(0,!1,"Please click the radio button of choice before voting!","danger"),!1}function submitForm(n){document.getElementById(n).submit()}function iGallery(n){larger_image=new Image;larger_image.src=n.src.replace("_thumb","");document.getElementById("main_image").src=larger_image.src;document.getElementById("main_image").width=larger_image.width;document.getElementById("main_image").height=larger_image.height}function swapTabs(n,t,i){$("#"+n).html($("#"+t).html());$("#"+activeTab).removeClass("active");$("#"+i).addClass("active");activeTab=i}function playFLV(n,t,i,r,u){var f={file:i,autostart:"true",image:r};swfobject.embedSWF("/fend/images/mediaplayer.swf",u,n,t,"9.0.0","",f,{},{})}function appendFunction(n,t){return function(){n&&n();t&&t()}}function changeFontSize(n,t){typeof t=="undefined"&&(t="include");$("#fontSizeCss").length>0?$("#fontSizeCss").attr("href","/fend/"+t+"/font_"+n+".css"):$("head").append('<link rel="stylesheet" href="/fend/'+t+"/font_"+n+'.css" type="text/css" id="fontSizeCss" />');
14423$.ajax({url:"/fend/request/set-font-size.asp?fontSize="+n+"&rndNum="+Math.floor(Math.random()*1e5)})}function checkRequiredFields(n,t,i=0){var r,o,u,h,c,f,s;if(t.find(".form-error").remove(),$("*").removeClass("field-error").removeClass("has-error"),r="",o=n.split(","),n.indexOf("|")==-1&&n.indexOf(":")==-1&&n.indexOf("@")==-1)for(field in o)fieldName=$.trim(o[field]),$fieldObj=t.find('[name="'+fieldName+'"]'),fieldContents=$fieldObj.val(),$fieldObj.is(":enabled")&&(fieldName.toLowerCase()!=="email"||$("#"+fieldName).hasClass("simplevalidation")?fieldName.toLowerCase()!=="confirm_email"||$("#"+fieldName).hasClass("simplevalidation")?fieldName.toLowerCase()!=="confirm_password"||$("#"+fieldName).hasClass("simplevalidation")?$('[name="'+fieldName+'"]').attr("type")==="radio"||$('[name="'+fieldName+'"]').attr("type")==="checkbox"?$('[name="'+fieldName+'"]:checked').length===0&&($fieldObj.closest(".form-group").data("error")?(u=$fieldObj.closest(".form-group").data("error"),r+="<li>"+u+"<\/li>",$fieldObj.addClass("field-error").closest(".form-group").addClass("has-error")):(u=$("label[for="+fieldName+"]").text().toLowerCase().replace(":",""),u===""&&(u=fieldName.toLowerCase().replace("_"," ")),r+="<li> Please enter a valid "+u+"<\/li>",$fieldObj.addClass("field-error").closest(".form-group").addClass("has-error"))):fieldContents===""&&($fieldObj.closest(".form-group").data("error")?(u=$fieldObj.closest(".form-group").data("error"),r+="<li>"+u+"<\/li>",$fieldObj.addClass("field-error").closest(".form-group").addClass("has-error")):(u=$("label[for="+fieldName+"]").text().toLowerCase().replace(":",""),u===""&&(u=fieldName.toLowerCase().replace("_"," ")),r+="<li> Please enter a valid "+u+"<\/li>",$fieldObj.addClass("field-error").closest(".form-group").addClass("has-error"))):fieldContents!==$("#Password").val()&&(r+="<li>Passwords do not match.<\/li>",$fieldObj.addClass("field-error").closest(".form-group").addClass("has-error")):fieldContents!==$("#Email").val()&&(r+="<li>Email Addresses do not match.<\/li>",$fieldObj.addClass("field-error").closest(".form-group").addClass("has-error")):(h=new RegExp("^[A-Za-z0-9]((([_]*[-]?[.]?)[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([.-]?[a-zA-Z0-9]+)*).([A-Za-z]{2,})$"),c=h.exec(fieldContents),(c===null||fieldContents==="")&&(r+="<li>Please enter a valid email address.<\/li>",$fieldObj.addClass("field-error").closest(".form-group").addClass("has-error"))));else $(o).each(function(n,t){var o,u,f,i;if(t=$.trim(t),t.indexOf("|")!=-1||t.indexOf(":")!=-1||t.indexOf("@")!=-1||$(`[name="${t}"]`).prop("disabled")||(o=$(`[name="${t}"]`).val(),t.toLowerCase()!=="confirm_email"||$(`[name="${t}"]`).hasClass("simplevalidation")?t.toLowerCase()!=="confirm_password"||$(`[name="${t}"]`).hasClass("simplevalidation")?checkRequiredFields_validateField(`[name="${t}"]`)||($(document).find(`[name="${t}"]`).closest(".form-group").addClass("has-error"),r+=`<li>Need value for ${checkRequiredFields_getError($(document).find(`[name="${t}"]`))}</li>`):o!==$("#Password").val()&&($(document).find(`[name="${t}"]`).closest(".form-group").addClass("has-error"),r+="<li><strong><u>Passwords<\/u><\/strong> do not match<\/li>"):o!==$("#Email").val()&&($(document).find(`[name="${t}"]`).closest(".form-group").addClass("has-error"),r+="<li><strong><u>Email Addresses<\/u><\/strong> do not match<\/li>")),~t.indexOf("|")){var c=0,l=0,s=t.split("|");$(s).each(function(n,t){checkRequiredFields_validateField(`[name="${t}"]`)&&c++;$(`[name="${t}"]`).prop("disabled")&&l++});l!==s.length&&c==0&&(u="",f="",$(s).each(function(n,t){$(document).find(`[name="${t}"]`).parent().addClass("has-error");u+=f+checkRequiredFields_getError(`[name="${t}"]`);f=" / "}),r+=`<li>Need at least one value between ${u}</li>`)}if(~t.indexOf("@")){var h=0,a=0,e=t.split("@");$(e).each(function(n,t){checkRequiredFields_validateField(`[name="${t}"]`)&&h++;$(`[name="${t}"]`).prop("disabled")&&a++});a!==e.length&&h>0&&h!==e.length&&(u="",f="",$(e).each(function(n,t){$(document).find(`[name="${t}"]`).parent().addClass("has-error");u+=f+checkRequiredFields_getError(`[name="${t}"]`);f=" / "}),r+=`<li>Need all values for ${u}</li>`)}
14423~t.indexOf(":")&&!$(`[name="${t}"]`).prop("disabled")&&(i=t.split(":"),checkRequiredFields_validateField(`[name="${i[0]}"]`)?$.post({url:i[1],async:!1,data:{formInput:$(document).find(`[name="${i[0]}"]`).val()},success:function(n){n=="#BAD#"&&($(document).find(`[name="${i[0]}"]`).parent().addClass("has-error"),r+=`<li>Value for ${checkRequiredFields_getError(`[name="${i[0]}"]`)} already used; please enter a different value</li>`)}}):($(document).find(`[name="${i[0]}"]`).parent().addClass("has-error"),r+=`<li>Need value for ${checkRequiredFields_getError(`[name="${i[0]}"]`)}</li>`))});if(r==="")return!0;f=document.createElement("div");f=$(f);f.addClass("form-error alert alert-danger");f.html("<ul>"+r+"<\/ul>");t.prepend(f);var e=0,l=$("#header").height(),a=$("#header .navbar").height();return e=l>0?l:a,e>0&&(e+=25),i>0&&(e=i),$(t).find('[id="customErrorOffset"]').length&&(s=$(t).find('[id="customErrorOffset"]').val(),/^\d+$/.test(s)&&(e=s)),$(this).scrollTop($(f).offset().top-e),$(t).find('[name="conf-recaptchaComplete"]').val(""),!1}function checkRequiredFieldsCustom(n,t){var r,u,i,f,e;if(t.find(".form-error").remove(),$("*").removeClass("field-error").removeClass("has-error"),r="",u=n.split(","),n.indexOf("|")==-1&&n.indexOf(":")==-1&&n.indexOf("@")==-1)for(field in u)fieldName=$.trim(u[field]),$fieldObj=t.find('[name="'+fieldName+'"]'),fieldContents=$fieldObj.val(),$fieldObj.is(":enabled")&&($fieldObj.attr("type")==="email"?(f=new RegExp(/^[A-Za-z0-9]((([_]*[-]?[.]?)[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([\.\-]?[a-zA-Z0-9]+)*)\.([A-Za-z]{2,})$/g),e=f.exec(fieldContents),(e===null||fieldContents==="")&&($fieldObj.closest(".form-group").data("error")?(i=$fieldObj.closest(".form-group").data("error"),r+="<li>"+i+"<\/li>",$fieldObj.addClass("field-error").closest(".form-group").addClass("has-error")):(i=$("label[for="+fieldName+"]").text().toLowerCase().replace(":",""),i===""&&(i=fieldName.toLowerCase().replace("_"," ")),r+="<li>Please enter a valid "+i+"<\/li>",$fieldObj.addClass("field-error").closest(".form-group").addClass("has-error")))):$('[name="'+fieldName+'"]').attr("type")==="radio"||$('[name="'+fieldName+'"]').attr("type")==="checkbox"?$('[name="'+fieldName+'"]:checked').length===0&&($fieldObj.closest(".form-group").data("error")?(i=$fieldObj.closest(".form-group").data("error"),r+="<li>"+i+"<\/li>",$fieldObj.addClass("field-error").closest(".form-group").addClass("has-error")):(i=$("label[for="+fieldName+"]").text().toLowerCase().replace(":",""),i===""&&(i=fieldName.toLowerCase().replace("_"," ")),r+="<li>Please enter a valid "+i+"<\/li>",$fieldObj.addClass("field-error").closest(".form-group").addClass("has-error"))):fieldContents===""&&($fieldObj.closest(".form-group").data("error")?(i=$fieldObj.closest(".form-group").data("error"),r+="<li>"+i+"<\/li>",$fieldObj.addClass("field-error").closest(".form-group").addClass("has-error")):(i=$("label[for="+fieldName+"]").text().toLowerCase().replace(":",""),i===""&&(i=fieldName.toLowerCase().replace("_"," ")),r+="<li>Please enter a valid "+i+"<\/li>",$fieldObj.addClass("field-error").closest(".form-group").addClass("has-error"))));else $(u).each(function(n,t){var r,u,i;if(t=$.trim(t),t.indexOf("|")==-1&&t.indexOf(":")==-1&&t.indexOf("@")==-1&&$(`[name="${t}"]`).is(":enabled")&&(checkRequiredFields_validateField(`[name="${t}"]`)||($(document).find(`[name="${t}"]`).closest(".form-group").addClass("has-error"),errorHtml+=`<li>Need value for ${checkRequiredFields_getError($(document).find(`[name="${t}"]`))}</li>`)),~t.indexOf("|")){var s=0,h=0,e=t.split("|");$(e).each(function(n,t){checkRequiredFields_validateField(`[name="${t}"]`)&&s++;$(`[name="${t}"]`).is(":disabled")&&h++});h!==e.length&&s==0&&(r="",u="",$(e).each(function(n,t){$(document).find(`[name="${t}"]`).parent().addClass("has-error");r+=u+checkRequiredFields_getError(`[name="${t}"]`);u=" / "}),errorHtml+=`<li>Need at least one value between ${r}</li>`)}if(~t.indexOf("@")){var o=0,c=0,f=t.split("@");$(f).each(function(n,t){checkRequiredFields_validateField(`[name="${t}"]`)&&o++;$(`[name="${t}"]`).is(":disabled")&&c++});c!==f.length&&o>0&&o!==f.length&&(r="",u="",$(f).each(function(n,t){$(document).find(`[name="${t}"]`).parent().addClass("has-error");r+=u+checkRequiredFields_getError(`[name="${t}"]`);u=" / "}),errorHtml+=`<li>Need all values for ${r}</li>`)}~t.indexOf(":")&&(i=t.split(":"),$(`[name="${i[0]}"]`).is(":enabled")&&(checkRequiredFields_validateField(`[name="${i[0]}"]`)?$.post({url:i[1],async:!1,data:{formInput:$(document).find(`[name="${i[0]}"]`).val()},success:function(n){n=="#BAD#"&&($(document).find(`[name="${i[0]}"]`).parent().addClass("has-error"),errorHtml+=`<li>The value for ${checkRequiredFields_getError(`[name="${i[0]}"]`)} is already used; please use another value</li>`)}}):($(document).find(`[name="${i[0]}"]`).parent().addClass("has-error"),errorHtml+=`<li>Need value for ${checkRequiredFields_getError(`[name="${i[0]}"]`)}</li>`)))});return r}function invCaptchaSubmit(){invCaptchaPassed=!0}function randomQueryString(){return returnString="&UID="+(new Date).getTime()+Math.random()}function highlightText(n,t,i){$(n).each(function(){var n=new RegExp("\\b"+t+"\\b","gi");this.innerHTML=this.innerHTML.replace(n,function(n){return'<span class="'+i+'">'+n+"<\/span>"})})}function checkRequiredFields_validateField(n){var i=!1,t,r,u;return $(document).find(n).length&&(t=$(n),t.is("input")&&t.attr("type")=="email"?(r=new RegExp(/^[A-Za-z0-9]((([_]*[-]?[.]?)[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([\.\-]?[a-zA-Z0-9]+)*)\.([A-Za-z]{2,})$/g),u=r.exec(t.val()),u!==null&&t.val()!==""&&(i=!0)):t.is("input")&&(t.attr("type")=="text"||t.attr("type")=="number")&&t.val().length?i=!0:(t.is("select")||t.is("textarea"))&&t.val().length?i=!0:t.is("input")&&(t.attr("type")=="radio"||t.attr("type")=="checkbox")&&$(document).find(`${n}:checked`).length&&(i=!0)),i}function checkRequiredFields_getError(n){var i="",t;return $(document).find(n).length&&(t=$(n).attr("data-error-label"),i=typeof t!="undefined"&&t!==!1?`<strong><u>${t}</u></strong>`:`<strong><u>${$(n).closest(".form-group").find("label.control-label").text()}</u></strong>`),i}$(document).ready(function(){var n,t;if($("iframe").each(function(){var n=$(this).attr("src");n!==undefined&&($(this).attr("src").indexOf("?")>0?$(this).attr({src:n+"&wmode=transparent",wmode:"Opaque"}):$(this).attr({src:n+"?wmode=transparent",wmode:"Opaque"}))}),$("#slider").length>0&&$("#slider").anythingSlider(),$(".igallery-masonry").length>0&&(n=$(".igallery-masonry").masonry({itemSelector:".igallery-masonry-item",columnWidth:".grid-sizer",percentPosition:!0}),n.imagesLoaded().progress(function(){n.masonry("layout");n.on("layoutComplete",function(){$(".igallery-masonry").addClass("active")})})),$(".igallery-grid").length>0&&$(".igallery-grid .lightbox").matchHeight({byRow:!0,property:"height",target:null,remove:!1}),typeof $.fn.ekkoLightbox!="undefined"&&$.isFunction($.fn.ekkoLightbox))$(document).on("click",'*[data-toggle="lightbox"], a.lightbox',function(n){n.preventDefault();
14423$(this).ekkoLightbox({title:$(this).attr("title"),gallery:$(this).data("gallery")})});else typeof $.fn.lightBox!="undefined"&&$.isFunction($.fn.lightBox)&&$("a.lightbox").lightBox({overlayBgColor:"#000",overlayOpacity:.75,imageLoading:"/fend/images/loading.gif",imageBtnClose:"/fend/images/close.gif",imageBtnPrev:"/fend/images/prev.gif",imageBtnNext:"/fend/images/next.gif",containerResizeSpeed:350,txtImage:"Image",txtOf:"of"});if($("body a[rel~=external]").attr("target","blank"),$("body a[rel~=nofollow]").attr("rel","nofollow"),$("#fontsmall").bind("click",function(n){changeFontSize("small",window.cssPath);n.preventDefault()}),$("#fontmedium").bind("click",function(n){changeFontSize("medium",window.cssPath);n.preventDefault()}),$("#fontbig").bind("click",function(n){changeFontSize("big",window.cssPath);n.preventDefault()}),$(document).find(".sims_form_session_token").length&&$.ajax({url:"/vfend/include/req_session_token.asp",async:!1,success:function(n){$(document).find(".sims_form_session_token").each(function(){$(this).append(`<input type="hidden" name="sims_form_token" value="${n}" />`)})}}),t="/modules/recaptcha/request/recaptchaCheck.asp",$('[name="conf-requiredFields"],#blogcomment').closest("form").submit(function(n){var r,i,u,f;return n.stopImmediatePropagation(),r=n,i=$(this),checkRequiredFields(i.find('[name="conf-requiredFields"]').val(),$(this))&&(i.find("#g-recaptcha-container").length?i.find("#g-recaptcha-response").length?grecaptcha.getResponse().length>0&&$.post({url:`${t}?type=v2`,data:{token:grecaptcha.getResponse()},success:function(){i.unbind(r).submit()}}):(u=new Date,f=""+(u.getMonth()+1)+u.getDate()+"_"+parseInt(Math.random()*1e5+1),grecaptcha.execute("6LcTOHsaAAAAAMZytv7D0QhJkxy2wNBSLMLdu2yM",{action:f}).then(function(n){$.post({url:`${t}?type=v3`,data:{token:n},success:function(){i.unbind(r).submit()}}).fail(function(){grecaptcha.render("g-recaptcha-container",{sitekey:"6LdWeUsUAAAAAOr4ZSrJEzxaEJYC7UwrX1Eogk9M"})})})):i.unbind(r).submit()),!1}),$('[name="_requiredFields"]').closest("form").submit(function(){return checkRequiredFields($(this).find('[name="_requiredFields"]').val(),$(this))}),highlightText(".search-results-list a",$(".search-string").text(),"highlight"),$("#advPageIndex").length)$("[data-pagination-index]").on("click",function(n){n.preventDefault();$("#advPageIndex").val($(this).attr("data-pagination-index"));$("#adv-search-form").submit()});$("#recaptcha-modal-bs").length&&$("#recaptcha-modal-bs").modal("show");$("#recaptcha-modal").on("click",function(){$("#recaptcha-modal").remove()});$("#recaptcha-modal-body").on("click",function(n){n.stopPropagation()})});$(".dropdown").hover(function(){$(this).closest(".navbar-deep").length||(dropdownMenu=$(this).find(".dropdown-menu"),dropdownMenuLeft=dropdownMenu.offset().left,dropdownMenuRight=dropdownMenuLeft+dropdownMenu.width(),dropdownMenuLeft<0?dropdownMenu.css({right:"auto",left:"0"}):dropdownMenuRight>$(window).width()&&dropdownMenu.css({right:"0",left:"auto"}))});function showModal(n){showModal(n,null)}function showModal(n,t){var r=$("body"),u=r.height(),f=document.createElement("div"),i,e,o;f.setAttribute("id","modaloverlay");f.style.display="none";r.append(f);$("#modaloverlay").bind("click",function(){return closeModal(),!1});i=document.createElement("div");i.setAttribute("id","modalwindow");i.style.display="none";r.append(i);i=$(i);e=document.createElement("div");e.setAttribute("id","modalinner");i.append(e);i.bind("click",function(){closeModal()});$("#modalinner").click(function(n){n.stopPropagation()});isNaN(n)?($("#modalinner").html(n+'<div id="modalclose"><a href="#" onclick="javascript:closeModal();return false;"><span>close<\/span><\/div>'),t&&t()):(o="/fend/request/reqArticle.asp?article_id="+n+"&doNotRedirect=true"+randomQueryString(),$.ajax({url:o,success:function(n){$("#modalinner").html(n);centerModal(i);t&&t()}}));centerModal(i);$("select").css("visibility","hidden");$("#modaloverlay").fadeTo("slow",.7);$("#modalwindow").fadeIn("slow");$("#modalinner").height()<$(window).height()?setOverlaySize($("#modaloverlay"),u):setOverlaySize($("#modaloverlay"),$(document).height());$(window).resize(function(){$("#modalinner").height()<$(window).height()?(setOverlaySize($("#modaloverlay"),u),centerModal(i)):setOverlaySize($("#modaloverlay"),$(document).height())});$(window).scroll(function(){$("#modalinner").height()<$(window).height()?(setOverlaySize($("#modaloverlay"),u),centerModal(i)):setOverlaySize($("#modaloverlay"),$(document).height())})}function closeModal(){$("select").css("visibility","visible");$("#modalwindow").hide();$("#modaloverlay").hide();$("#modaloverlay").remove();$("#modalwindow").remove()}function centerModal(n){var t=($(window).height()-n.outerHeight())/2+$(window).scrollTop();t<10&&(t=10);n.css("top",t)}function setOverlaySize(n,t){var i=$(window).height();overlayHeight=t>i?t:i;n.height(overlayHeight)}/*! BigText - v0.1.8 - 2015-02-28 14424 * https://github.com/zachleat/bigtext 14425 * Copyright (c) 2015 Zach Leatherman (@zachleat) 14426 * MIT License */ 14427 14428(function(window, $) { 14429 "use strict"; 14430 14431 var counter = 0, 14432 $headCache = $('head'), 14433 oldBigText = window.BigText, 14434 oldjQueryMethod = $.fn.bigtext, 14435 BigText = { 14436 DEBUG_MODE: false, 14437 DEFAULT_MIN_FONT_SIZE_PX: null, 14438 DEFAULT_MAX_FONT_SIZE_PX: 528, 14439 GLOBAL_STYLE_ID: 'bigtext-style', 14440 STYLE_ID: 'bigtext-id', 14441 LINE_CLASS_PREFIX: 'bigtext-line', 14442 EXEMPT_CLASS: 'bigtext-exempt', 14443 noConflict: function(restore) 14444 { 14445 if(restore) { 14446 $.fn.bigtext = oldjQueryMethod; 14447 window.BigText = oldBigText; 14448 } 14449 return BigText; 14450 }, 14451 supports: { 14452 wholeNumberFontSizeOnly: (function() { 14453 if( !( 'getComputedStyle' in window ) ) { 14454 return true; 14455 } 14456 var test = $('<div/>').css({ 14457 position: 'absolute', 14458 'font-size': '14.1px' 14459 }).insertBefore( $('script').eq(0) ), 14460 computedStyle = window.getComputedStyle( test[0], null ); 14461 14462 var ret = computedStyle && computedStyle.getPropertyValue( 'font-size' ) === '14px'; 14463 test.remove(); 14464 return ret; 14465 })() 14466 }, 14467 init: function() { 14468 if(!$('#'+BigText.GLOBAL_STYLE_ID).length) { 14469 $headCache.append(BigText.generateStyleTag(BigText.GLOBAL_STYLE_ID, ['.bigtext * { white-space: nowrap; } .bigtext > * { display: block; }', 14470 '.bigtext .' + BigText.EXEMPT_CLASS + ', .bigtext .' + BigText.EXEMPT_CLASS + ' * { white-space: normal; }'])); 14471 } 14472 }, 14473 bindResize: function(eventName, resizeFunction) { 14474 var timeoutId; 14475 $(window).unbind(eventName).bind(eventName, function() { 14476 if( timeoutId ) { 14477 clearTimeout( timeoutId ); 14478 } 14479 timeoutId = setTimeout( resizeFunction, 100 ); 14480 }); 14481 }, 14482 getStyleId: function(id) 14483 { 14484 return BigText.STYLE_ID + '-' + id; 14485 }, 14486 generateStyleTag: function(id, css) 14487 { 14488 return $('<style>' + css.join('\n') + '</style>').attr('id', id); 14489 }, 14490 clearCss: function(id) 14491 { 14492 var styleId = BigText.getStyleId(id); 14493 $('#' + styleId).remove(); 14494 }, 14495 generateCss: function(id, linesFontSizes, lineWordSpacings, minFontSizes) 14496 { 14497 var css = []; 14498 14499 BigText.clearCss(id); 14500 14501 for(var j=0, k=linesFontSizes.length; j<k; j++) { 14502 css.push('#' + id + ' .' + BigText.LINE_CLASS_PREFIX + j + ' {' + 14503 (minFontSizes[j] ? ' white-space: normal;' : '') + 14504 (linesFontSizes[j] ? ' font-size: ' + linesFontSizes[j] + 'px;' : '') + 14505 (lineWordSpacings[j] ? ' word-spacing: ' + lineWordSpacings[j] + 'px;' : '') + 14506 '}'); 14507 } 14508 14509 return BigText.generateStyleTag(BigText.getStyleId(id), css); 14510 }, 14511 jQueryMethod: function(options) 14512 {
14513 BigText.init(); 14514 14515 options = $.extend({ 14516 minfontsize: BigText.DEFAULT_MIN_FONT_SIZE_PX, 14517 maxfontsize: BigText.DEFAULT_MAX_FONT_SIZE_PX, 14518 childSelector: '', 14519 resize: true 14520 }, options || {}); 14521 14522 this.each(function() 14523 { 14524 var $t = $(this).addClass('bigtext'), 14525 maxWidth = $t.width(), 14526 id = $t.attr('id'), 14527 $children = options.childSelector ? $t.find( options.childSelector ) : $t.children(); 14528 14529 if(!id) { 14530 id = 'bigtext-id' + (counter++); 14531 $t.attr('id', id); 14532 } 14533 14534 if(options.resize) { 14535 BigText.bindResize('resize.bigtext-event-' + id, function() 14536 { 14537 // TODO only call this if the width has changed. 14538 BigText.jQueryMethod.call($('#' + id), options); 14539 }); 14540 } 14541 14542 BigText.clearCss(id); 14543 14544 $children.addClass(function(lineNumber, className) 14545 { 14546 // remove existing line classes. 14547 return [className.replace(new RegExp('\\b' + BigText.LINE_CLASS_PREFIX + '\\d+\\b'), ''), 14548 BigText.LINE_CLASS_PREFIX + lineNumber].join(' '); 14549 }); 14550 14551 var sizes = calculateSizes($t, $children, maxWidth, options.maxfontsize, options.minfontsize); 14552 $headCache.append(BigText.generateCss(id, sizes.fontSizes, sizes.wordSpacings, sizes.minFontSizes)); 14553 }); 14554 14555 return this.trigger('bigtext:complete'); 14556 } 14557 }; 14558 14559 function testLineDimensions($line, maxWidth, property, size, interval, units, previousWidth) 14560 { 14561 var width; 14562 previousWidth = typeof previousWidth === 'number' ? previousWidth : 0; 14563 $line.css(property, size + units); 14564 14565 width = $line.width(); 14566 14567 if(width >= maxWidth) { 14568// console.log(width, ' previous: ' + previousWidth, property + ' at ' + interval, 'prior: ' + (parseFloat(size) - interval), 'new:' + parseFloat(size)); 14569 $line.css(property, ''); 14570 14571 if(width === maxWidth) { 14572 return { 14573 match: 'exact', 14574 size: parseFloat((parseFloat(size) - 0.1).toFixed(3)) 14575 }; 14576 } 14577 14578 // Since this is an estimate, we calculate how far over the width we went with the new value. 14579 // If this is word-spacing (our last resort guess) and the over is less than the under, we keep the higher value. 14580 // Otherwise, we revert to the underestimate. 14581 var under = maxWidth - previousWidth, 14582 over = width - maxWidth; 14583 14584 return { 14585 match: 'estimate', 14586 size: parseFloat((parseFloat(size) - (property === 'word-spacing' && previousWidth && ( over < under ) ? 0 : interval)).toFixed(3)) 14587 }; 14588 } 14589 14590 return width; 14591 } 14592 14593 function calculateSizes($t, $children, maxWidth, maxFontSize, minFontSize) 14594 { 14595 var $c = $t.clone(true) 14596 .addClass('bigtext-cloned') 14597 .css({ 14598 fontFamily: $t.css('font-family'), 14599 textTransform: $t.css('text-transform'), 14600 wordSpacing: $t.css('word-spacing'), 14601 letterSpacing: $t.css('letter-spacing'), 14602 position: 'absolute', 14603 left: BigText.DEBUG_MODE ? 0 : -9999, 14604 top: BigText.DEBUG_MODE ? 0 : -9999 14605 }) 14606 .appendTo(document.body); 14607 14608 // font-size isn't the only thing we can modify, we can also mess with: 14609 // word-spacing and letter-spacing. WebKit does not respect subpixel 14610 // letter-spacing, word-spacing, or font-size. 14611 // TODO try -webkit-transform: scale() as a workaround. 14612 var fontSizes = [], 14613 wordSpacings = [], 14614 minFontSizes = [], 14615 ratios = []; 14616 14617 $children.css('float', 'left').each(function() { 14618 var $line = $(this), 14619 // TODO replace 8, 4 with a proportional size to the calculated font-size. 14620 intervals = BigText.supports.wholeNumberFontSizeOnly ? [8, 4, 1] : [8, 4, 1, 0.1], 14621 lineMax, 14622 newFontSize; 14623 14624 if($line.hasClass(BigText.EXEMPT_CLASS)) { 14625 fontSizes.push(null); 14626 ratios.push(null); 14627 minFontSizes.push(false); 14628 return; 14629 } 14630 14631 // TODO we can cache this ratio? 14632 var autoGuessSubtraction = 32, // font size in px 14633 currentFontSize = parseFloat($line.css('font-size')), 14634 ratio = ( $line.width() / currentFontSize ).toFixed(6); 14635 14636 newFontSize = parseInt( maxWidth / ratio, 10 ) - autoGuessSubtraction; 14637 14638 outer: for(var m=0, n=intervals.length; m<n; m++) { 14639 inner: for(var j=1, k=10; j<=k; j++) { 14640 if(newFontSize + j*intervals[m] > maxFontSize) { 14641 newFontSize = maxFontSize; 14642 break outer; 14643 } 14644 14645 lineMax = testLineDimensions($line, maxWidth, 'font-size', newFontSize + j*intervals[m], intervals[m], 'px', lineMax); 14646 if(typeof lineMax !== 'number') { 14647 newFontSize = lineMax.size; 14648 14649 if(lineMax.match === 'exact') { 14650 break outer; 14651 } 14652 break inner; 14653 } 14654 } 14655 } 14656 14657 ratios.push(maxWidth / newFontSize); 14658 14659 if(newFontSize > maxFontSize) { 14660 fontSizes.push(maxFontSize); 14661 minFontSizes.push(false); 14662 } else if(!!minFontSize && newFontSize < minFontSize) { 14663 fontSizes.push(minFontSize); 14664 minFontSizes.push(true); 14665 } else { 14666 fontSizes.push(newFontSize); 14667 minFontSizes.push(false); 14668 } 14669 }).each(function(lineNumber) { 14670 var $line = $(this), 14671 wordSpacing = 0, 14672 interval = 1, 14673 maxWordSpacing; 14674 14675 if($line.hasClass(BigText.EXEMPT_CLASS)) { 14676 wordSpacings.push(null); 14677 return; 14678 } 14679 14680 // must re-use font-size, even though it was removed above. 14681 $line.css('font-size', fontSizes[lineNumber] + 'px'); 14682 14683 for(var m=1, n=3; m<n; m+=interval) { 14684 maxWordSpacing = testLineDimensions($line, maxWidth, 'word-spacing', m, interval, 'px', maxWordSpacing); 14685 if(typeof maxWordSpacing !== 'number') { 14686 wordSpacing = maxWordSpacing.size; 14687 break; 14688 } 14689 } 14690 14691 $line.css('font-size', ''); 14692 wordSpacings.push(wordSpacing); 14693 }).removeAttr('style'); 14694 14695 if( !BigText.DEBUG_MODE ) { 14696 $c.remove(); 14697 } else { 14698 $c.css({ 14699 'background-color': 'rgba(255,255,255,.4)' 14700 }); 14701 } 14702 14703 return { 14704 fontSizes: fontSizes, 14705 wordSpacings: wordSpacings, 14706 ratios: ratios, 14707 minFontSizes: minFontSizes 14708 }; 14709 } 14710 14711 $.fn.bigtext = BigText.jQueryMethod; 14712 window.BigText = BigText; 14713 14714})(this, jQuery); 14715/* 14716 _ _ _ _ 14717 ___| (_) ___| | __ (_)___ 14718/ __| | |/ __| |/ / | / __| 14719\__ \ | | (__| < _ | \__ \ 14720|___/_|_|\___|_|\_(_)/ |___/ 14721 |__/ 14722 14723 Version: 1.6.0 14724 Author: Ken Wheeler 14725 Website: http://kenwheeler.github.io 14726 Docs: http://kenwheeler.github.io/slick 14727 Repo: http://github.com/kenwheeler/slick 14728 Issues: http://github.com/kenwheeler/slick/issues 14729 14730 */ 14731!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){"use strict";var b=window.Slick||{};b=function(){function c(c,d){var f,e=this;e.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:a(c),appendDots:a(c),arrows:!0,asNavFor:null,prevArrow:'<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',nextArrow:'<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(b,c){return a('<button type="button" data-role="none" role="button" tabindex="0" />').text(c+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},e.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,
vendor: 9,458 bytes, line 14731
14731sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},a.extend(e,e.initials),e.activeBreakpoint=null,e.animType=null,e.animProp=null,e.breakpoints=[],e.breakpointSettings=[],e.cssTransitions=!1,e.focussed=!1,e.interrupted=!1,e.hidden="hidden",e.paused=!0,e.positionProp=null,e.respondTo=null,e.rowCount=1,e.shouldClick=!0,e.$slider=a(c),e.$slidesCache=null,e.transformType=null,e.transitionType=null,e.visibilityChange="visibilitychange",e.windowWidth=0,e.windowTimer=null,f=a(c).data("slick")||{},e.options=a.extend({},e.defaults,d,f),e.currentSlide=e.options.initialSlide,e.originalSettings=e.options,"undefined"!=typeof document.mozHidden?(e.hidden="mozHidden",e.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(e.hidden="webkitHidden",e.visibilityChange="webkitvisibilitychange"),e.autoPlay=a.proxy(e.autoPlay,e),e.autoPlayClear=a.proxy(e.autoPlayClear,e),e.autoPlayIterator=a.proxy(e.autoPlayIterator,e),e.changeSlide=a.proxy(e.changeSlide,e),e.clickHandler=a.proxy(e.clickHandler,e),e.selectHandler=a.proxy(e.selectHandler,e),e.setPosition=a.proxy(e.setPosition,e),e.swipeHandler=a.proxy(e.swipeHandler,e),e.dragHandler=a.proxy(e.dragHandler,e),e.keyHandler=a.proxy(e.keyHandler,e),e.instanceUid=b++,e.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,e.registerBreakpoints(),e.init(!0)}var b=0;return c}(),b.prototype.activateADA=function(){var a=this;a.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},b.prototype.addSlide=b.prototype.slickAdd=function(b,c,d){var e=this;if("boolean"==typeof c)d=c,c=null;else if(0>c||c>=e.slideCount)return!1;e.unload(),"number"==typeof c?0===c&&0===e.$slides.length?a(b).appendTo(e.$slideTrack):d?a(b).insertBefore(e.$slides.eq(c)):a(b).insertAfter(e.$slides.eq(c)):d===!0?a(b).prependTo(e.$slideTrack):a(b).appendTo(e.$slideTrack),e.$slides=e.$slideTrack.children(this.options.slide),e.$slideTrack.children(this.options.slide).detach(),e.$slideTrack.append(e.$slides),e.$slides.each(function(b,c){a(c).attr("data-slick-index",b)}),e.$slidesCache=e.$slides,e.reinit()},b.prototype.animateHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.animate({height:b},a.options.speed)}},b.prototype.animateSlide=function(b,c){var d={},e=this;e.animateHeight(),e.options.rtl===!0&&e.options.vertical===!1&&(b=-b),e.transformsEnabled===!1?e.options.vertical===!1?e.$slideTrack.animate({left:b},e.options.speed,e.options.easing,c):e.$slideTrack.animate({top:b},e.options.speed,e.options.easing,c):e.cssTransitions===!1?(e.options.rtl===!0&&(e.currentLeft=-e.currentLeft),a({animStart:e.currentLeft}).animate({animStart:b},{duration:e.options.speed,easing:e.options.easing,step:function(a){a=Math.ceil(a),e.options.vertical===!1?(d[e.animType]="translate("+a+"px, 0px)",e.$slideTrack.css(d)):(d[e.animType]="translate(0px,"+a+"px)",e.$slideTrack.css(d))},complete:function(){c&&c.call()}})):(e.applyTransition(),b=Math.ceil(b),e.options.vertical===!1?d[e.animType]="translate3d("+b+"px, 0px, 0px)":d[e.animType]="translate3d(0px,"+b+"px, 0px)",e.$slideTrack.css(d),c&&setTimeout(function(){e.disableTransition(),c.call()},e.options.speed))},b.prototype.getNavTarget=function(){var b=this,c=b.options.asNavFor;return c&&null!==c&&(c=a(c).not(b.$slider)),c},b.prototype.asNavFor=function(b){var c=this,d=c.getNavTarget();null!==d&&"object"==typeof d&&d.each(function(){var c=a(this).slick("getSlick");c.unslicked||c.slideHandler(b,!0)})},b.prototype.applyTransition=function(a){var b=this,c={};b.options.fade===!1?c[b.transitionType]=b.transformType+" "+b.options.speed+"ms "+b.options.cssEase:c[b.transitionType]="opacity "+b.options.speed+"ms "+b.options.cssEase,b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.autoPlay=function(){var a=this;a.autoPlayClear(),a.slideCount>a.options.slidesToShow&&(a.autoPlayTimer=setInterval(a.autoPlayIterator,a.options.autoplaySpeed))},b.prototype.autoPlayClear=function(){var a=this;a.autoPlayTimer&&clearInterval(a.autoPlayTimer)},b.prototype.autoPlayIterator=function(){var a=this,b=a.currentSlide+a.options.slidesToScroll;a.paused||a.interrupted||a.focussed||(a.options.infinite===!1&&(1===a.direction&&a.currentSlide+1===a.slideCount-1?a.direction=0:0===a.direction&&(b=a.currentSlide-a.options.slidesToScroll,a.currentSlide-1===0&&(a.direction=1))),a.slideHandler(b))},b.prototype.buildArrows=function(){var b=this;b.options.arrows===!0&&(b.$prevArrow=a(b.options.prevArrow).addClass("slick-arrow"),b.$nextArrow=a(b.options.nextArrow).addClass("slick-arrow"),b.slideCount>b.options.slidesToShow?(b.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),b.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.prependTo(b.options.appendArrows),b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.appendTo(b.options.appendArrows),b.options.infinite!==!0&&b.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):b.$prevArrow.add(b.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},b.prototype.buildDots=function(){var c,d,b=this;if(b.options.dots===!0&&b.slideCount>b.options.slidesToShow){for(b.$slider.addClass("slick-dotted"),d=a("<ul />").addClass(b.options.dotsClass),c=0;c<=b.getDotCount();c+=1)d.append(a("<li />").append(b.options.customPaging.call(this,b,c)));b.$dots=d.appendTo(b.options.appendDots),b.$dots.find("li").first().addClass("slick-active").attr("aria-hidden","false")}},b.prototype.buildOut=function(){var b=this;b.$slides=b.$slider.children(b.options.slide+":not(.slick-cloned)").addClass("slick-slide"),b.slideCount=b.$slides.length,b.$slides.each(function(b,c){a(c).attr("data-slick-index",b).data("originalStyling",a(c).attr("style")||"")}),b.$slider.addClass("slick-slider"),b.$slideTrack=0===b.slideCount?a('<div class="slick-track"/>').appendTo(b.$slider):b.$slides.wrapAll('<div class="slick-track"/>').parent(),b.$list=b.$slideTrack.wrap('<div aria-live="polite" class="slick-list"/>').parent(),b.$slideTrack.css("opacity",0),(b.options.centerMode===!0||b.options.swipeToSlide===!0)&&(b.options.slidesToScroll=1),a("img[data-lazy]",b.$slider).not("[src]").addClass("slick-loading"),b.setupInfinite(),b.buildArrows(),b.buildDots(),b.updateDots(),b.setSlideClasses("number"==typeof b.currentSlide?b.currentSlide:0),b.options.draggable===!0&&b.$list.addClass("draggable")},b.prototype.buildRows=function(){var b,c,d,e,f,g,h,a=this;if(e=document.createDocumentFragment(),g=a.$slider.children(),a.options.rows>1){for(h=a.options.slidesPerRow*a.options.rows,f=Math.ceil(g.length/h),b=0;f>b;b++){var i=document.createElement("div");for(c=0;c<a.options.rows;c++){var j=document.createElement("div");for(d=0;d<a.options.slidesPerRow;d++){var k=b*h+(c*a.options.slidesPerRow+d);g.get(k)&&j.appendChild(g.get(k))}i.appendChild(j)}e.appendChild(i)}a.$slider.empty().append(e),a.$slider.children().children().children().css({width:100/a.options.slidesPerRow+"%",display:"inline-block"})}},b.prototype.checkResponsive=function(b,c){var e,f,g,d=this,h=!1,i=d.$slider.width(),j=window.innerWidth||a(window).width();if("window"===d.respondTo?g=j:"slider"===d.respondTo?g=i:"min"===d.respondTo&&(g=Math.min(j,i)),d.options.responsive&&d.options.responsive.length&&null!==d.options.responsive){f=null;for(e in d.breakpoints)d.breakpoints.hasOwnProperty(e)&&(d.originalSettings.mobileFirst===!1?g<d.breakpoints[e]&&(f=d.breakpoints[e]):g>d.breakpoints[e]&&(f=d.breakpoints[e]));null!==f?null!==d.activeBreakpoint?(f!==d.activeBreakpoint||c)&&(d.activeBreakpoint=f,"unslick"===d.breakpointSettings[f]?d.unslick(f):(d.options=a.extend({},d.originalSettings,d.breakpointSettings[f]),b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b)),h=f):(d.activeBreakpoint=f,"unslick"===d.breakpointSettings[f]?d.unslick(f):(d.options=a.extend({},d.originalSettings,d.breakpointSettings[f]),b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b)),h=f):null!==d.activeBreakpoint&&(d.activeBreakpoint=null,d.options=d.originalSettings,b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b),h=f),b||h===!1||d.$slider.trigger("breakpoint",[d,h])}},b.prototype.changeSlide=function(b,c){var f,g,h,d=this,e=a(b.currentTarget);switch(e.is("a")&&b.preventDefault(),e.is("li")||(e=e.closest("li")),h=d.slideCount%d.options.slidesToScroll!==0,f=h?0:(d.slideCount-d.currentSlide)%d.options.slidesToScroll,b.data.message){case"previous":g=0===f?d.options.slidesToScroll:d.options.slidesToShow-f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide-g,!1,c);break;case"next":g=0===f?d.options.slidesToScroll:f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide+g,!1,c);break;case"index":var i=0===b.data.index?0:b.data.index||e.index()*d.options.slidesToScroll;d.slideHandler(d.checkNavigable(i),!1,c),e.children().trigger("focus");break;default:return}},b.prototype.checkNavigable=function(a){var c,d,b=this;if(c=b.getNavigableIndexes(),d=0,a>c[c.length-1])a=c[c.length-1];else for(var e in c){if(a<c[e]){a=d;break}d=c[e]}return a},b.prototype.cleanUpEvents=function(){var b=this;b.options.dots&&null!==b.$dots&&a("li",b.$dots).off("click.slick",b.changeSlide).off("mouseenter.slick",a.proxy(b.interrupt,b,!0)).off("mouseleave.
14731slick",a.proxy(b.interrupt,b,!1)),b.$slider.off("focus.slick blur.slick"),b.options.arrows===!0&&b.slideCount>b.options.slidesToShow&&(b.$prevArrow&&b.$prevArrow.off("click.slick",b.changeSlide),b.$nextArrow&&b.$nextArrow.off("click.slick",b.changeSlide)),b.$list.off("touchstart.slick mousedown.slick",b.swipeHandler),b.$list.off("touchmove.slick mousemove.slick",b.swipeHandler),b.$list.off("touchend.slick mouseup.slick",b.swipeHandler),b.$list.off("touchcancel.slick mouseleave.slick",b.swipeHandler),b.$list.off("click.slick",b.clickHandler),a(document).off(b.visibilityChange,b.visibility),b.cleanUpSlideEvents(),b.options.accessibility===!0&&b.$list.off("keydown.slick",b.keyHandler),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().off("click.slick",b.selectHandler),a(window).off("orientationchange.slick.slick-"+b.instanceUid,b.orientationChange),a(window).off("resize.slick.slick-"+b.instanceUid,b.resize),a("[draggable!=true]",b.$slideTrack).off("dragstart",b.preventDefault),a(window).off("load.slick.slick-"+b.instanceUid,b.setPosition),a(document).off("ready.slick.slick-"+b.instanceUid,b.setPosition)},b.prototype.cleanUpSlideEvents=function(){var b=this;b.$list.off("mouseenter.slick",a.proxy(b.interrupt,b,!0)),b.$list.off("mouseleave.slick",a.proxy(b.interrupt,b,!1))},b.prototype.cleanUpRows=function(){var b,a=this;a.options.rows>1&&(b=a.$slides.children().children(),b.removeAttr("style"),a.$slider.empty().append(b))},b.prototype.clickHandler=function(a){var b=this;b.shouldClick===!1&&(a.stopImmediatePropagation(),a.stopPropagation(),a.preventDefault())},b.prototype.destroy=function(b){var c=this;c.autoPlayClear(),c.touchObject={},c.cleanUpEvents(),a(".slick-cloned",c.$slider).detach(),c.$dots&&c.$dots.remove(),c.$prevArrow&&c.$prevArrow.length&&(c.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),c.htmlExpr.test(c.options.prevArrow)&&c.$prevArrow.remove()),c.$nextArrow&&c.$nextArrow.length&&(c.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),c.htmlExpr.test(c.options.nextArrow)&&c.$nextArrow.remove()),c.$slides&&(c.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){a(this).attr("style",a(this).data("originalStyling"))}),c.$slideTrack.children(this.options.slide).detach(),c.$slideTrack.detach(),c.$list.detach(),c.$slider.append(c.$slides)),c.cleanUpRows(),c.$slider.removeClass("slick-slider"),c.$slider.removeClass("slick-initialized"),c.$slider.removeClass("slick-dotted"),c.unslicked=!0,b||c.$slider.trigger("destroy",[c])},b.prototype.disableTransition=function(a){var b=this,c={};c[b.transitionType]="",b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.fadeSlide=function(a,b){var c=this;c.cssTransitions===!1?(c.$slides.eq(a).css({zIndex:c.options.zIndex}),c.$slides.eq(a).animate({opacity:1},c.options.speed,c.options.easing,b)):(c.applyTransition(a),c.$slides.eq(a).css({opacity:1,zIndex:c.options.zIndex}),b&&setTimeout(function(){c.disableTransition(a),b.call()},c.options.speed))},b.prototype.fadeSlideOut=function(a){var b=this;b.cssTransitions===!1?b.$slides.eq(a).animate({opacity:0,zIndex:b.options.zIndex-2},b.options.speed,b.options.easing):(b.applyTransition(a),b.$slides.eq(a).css({opacity:0,zIndex:b.options.zIndex-2}))},b.prototype.filterSlides=b.prototype.slickFilter=function(a){var b=this;null!==a&&(b.$slidesCache=b.$slides,b.unload(),b.$slideTrack.children(this.options.slide).detach(),b.$slidesCache.filter(a).appendTo(b.$slideTrack),b.reinit())},b.prototype.focusHandler=function(){var b=this;b.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*:not(.slick-arrow)",function(c){c.stopImmediatePropagation();var d=a(this);setTimeout(function(){b.options.pauseOnFocus&&(b.focussed=d.is(":focus"),b.autoPlay())},0)})},b.prototype.getCurrent=b.prototype.slickCurrentSlide=function(){var a=this;return a.currentSlide},b.prototype.getDotCount=function(){var a=this,b=0,c=0,d=0;if(a.options.infinite===!0)for(;b<a.slideCount;)++d,b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;else if(a.options.centerMode===!0)d=a.slideCount;else if(a.options.asNavFor)for(;b<a.slideCount;)++d,b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;else d=1+Math.ceil((a.slideCount-a.options.slidesToShow)/a.options.slidesToScroll);return d-1},b.prototype.getLeft=function(a){var c,d,f,b=this,e=0;return b.slideOffset=0,d=b.$slides.first().outerHeight(!0),b.options.infinite===!0?(b.slideCount>b.options.slidesToShow&&(b.slideOffset=b.slideWidth*b.options.slidesToShow*-1,e=d*b.options.slidesToShow*-1),b.slideCount%b.options.slidesToScroll!==0&&a+b.options.slidesToScroll>b.slideCount&&b.slideCount>b.options.slidesToShow&&(a>b.slideCount?(b.slideOffset=(b.options.slidesToShow-(a-b.slideCount))*b.slideWidth*-1,e=(b.options.slidesToShow-(a-b.slideCount))*d*-1):(b.slideOffset=b.slideCount%b.options.slidesToScroll*b.slideWidth*-1,e=b.slideCount%b.options.slidesToScroll*d*-1))):a+b.o
vendor: 4,100 bytes, line 14731
14731ptions.slidesToShow>b.slideCount&&(b.slideOffset=(a+b.options.slidesToShow-b.slideCount)*b.slideWidth,e=(a+b.options.slidesToShow-b.slideCount)*d),b.slideCount<=b.options.slidesToShow&&(b.slideOffset=0,e=0),b.options.centerMode===!0&&b.options.infinite===!0?b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)-b.slideWidth:b.options.centerMode===!0&&(b.slideOffset=0,b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)),c=b.options.vertical===!1?a*b.slideWidth*-1+b.slideOffset:a*d*-1+e,b.options.variableWidth===!0&&(f=b.slideCount<=b.options.slidesToShow||b.options.infinite===!1?b.$slideTrack.children(".slick-slide").eq(a):b.$slideTrack.children(".slick-slide").eq(a+b.options.slidesToShow),c=b.options.rtl===!0?f[0]?-1*(b.$slideTrack.width()-f[0].offsetLeft-f.width()):0:f[0]?-1*f[0].offsetLeft:0,b.options.centerMode===!0&&(f=b.slideCount<=b.options.slidesToShow||b.options.infinite===!1?b.$slideTrack.children(".slick-slide").eq(a):b.$slideTrack.children(".slick-slide").eq(a+b.options.slidesToShow+1),c=b.options.rtl===!0?f[0]?-1*(b.$slideTrack.width()-f[0].offsetLeft-f.width()):0:f[0]?-1*f[0].offsetLeft:0,c+=(b.$list.width()-f.outerWidth())/2)),c},b.prototype.getOption=b.prototype.slickGetOption=function(a){var b=this;return b.options[a]},b.prototype.getNavigableIndexes=function(){var e,a=this,b=0,c=0,d=[];for(a.options.infinite===!1?e=a.slideCount:(b=-1*a.options.slidesToScroll,c=-1*a.options.slidesToScroll,e=2*a.slideCount);e>b;)d.push(b),b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;return d},b.prototype.getSlick=function(){return this},b.prototype.getSlideCount=function(){var c,d,e,b=this;return e=b.options.centerMode===!0?b.slideWidth*Math.floor(b.options.slidesToShow/2):0,b.options.swipeToSlide===!0?(b.$slideTrack.find(".slick-slide").each(function(c,f){return f.offsetLeft-e+a(f).outerWidth()/2>-1*b.swipeLeft?(d=f,!1):void 0}),c=Math.abs(a(d).attr("data-slick-index")-b.currentSlide)||1):b.options.slidesToScroll},b.prototype.goTo=b.prototype.slickGoTo=function(a,b){var c=this;c.changeSlide({data:{message:"index",index:parseInt(a)}},b)},b.prototype.init=function(b){var c=this;a(c.$slider).hasClass("slick-initialized")||(a(c.$slider).addClass("slick-initialized"),c.buildRows(),c.buildOut(),c.setProps(),c.startLoad(),c.loadSlider(),c.initializeEvents(),c.updateArrows(),c.updateDots(),c.checkResponsive(!0),c.focusHandler()),b&&c.$slider.trigger("init",[c]),c.options.accessibility===!0&&c.initADA(),c.options.autoplay&&(c.paused=!1,c.autoPlay())},b.prototype.initADA=function(){var b=this;b.$slides.add(b.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),b.$slideTrack.attr("role","listbox"),b.$slides.not(b.$slideTrack.find(".slick-cloned")).each(function(c){a(this).attr({role:"option","aria-describedby":"slick-slide"+b.instanceUid+c})}),null!==b.$dots&&b.$dots.attr("role","tablist").find("li").each(function(c){a(this).attr({role:"presentation","aria-selected":"false","aria-controls":"navigation"+b.instanceUid+c,id:"slick-slide"+b.instanceUid+c})}).first().attr("aria-selected","true").end().find("button").attr("role","button").end().closest("div").attr("role","toolbar"),b.activateADA()},b.prototype.initArrowEvents=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},a.changeSlide),a.$nextArrow.off("click.slick").on("click.slick",{message:"next"},a.changeSlide))},b.prototype.initDotEvents=function(){var b=this;b.options.dots===!0&&b.slideCount>b.options.slidesToShow&&a("li",b.$dots).on("click.slick",{message:"index"},b.changeSlide),b.options.dots===!0&&b.options.pauseOnDotsHover===!0&&a("li",b.$dots).on("mouseenter.slick",a.proxy(b.interrupt,b,!0)).on("mouseleave.slick",a.proxy(b.interrupt,b,!1))},b.prototype.initSlideEvents=function(){var b=this;b.options.pauseOnHover&&(b.$list.on("mouseenter.slick",a.proxy(b.interrupt,b,!0)),b.$list.on("mouseleave.
14731slick",a.proxy(b.interrupt,b,!1)))},b.prototype.initializeEvents=function(){var b=this;b.initArrowEvents(),b.initDotEvents(),b.initSlideEvents(),b.$list.on("touchstart.slick mousedown.slick",{action:"start"},b.swipeHandler),b.$list.on("touchmove.slick mousemove.slick",{action:"move"},b.swipeHandler),b.$list.on("touchend.slick mouseup.slick",{action:"end"},b.swipeHandler),b.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},b.swipeHandler),b.$list.on("click.slick",b.clickHandler),a(document).on(b.visibilityChange,a.proxy(b.visibility,b)),b.options.accessibility===!0&&b.$list.on("keydown.slick",b.keyHandler),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().on("click.slick",b.selectHandler),a(window).on("orientationchange.slick.slick-"+b.instanceUid,a.proxy(b.orientationChange,b)),a(window).on("resize.slick.slick-"+b.instanceUid,a.proxy(b.resize,b)),a("[draggable!=true]",b.$slideTrack).on("dragstart",b.preventDefault),a(window).on("load.slick.slick-"+b.instanceUid,b.setPosition),a(document).on("ready.slick.slick-"+b.instanceUid,b.setPosition)},b.prototype.initUI=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.show(),a.$nextArrow.show()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.show()},b.prototype.keyHandler=function(a){var b=this;a.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===a.keyCode&&b.options.accessibility===!0?b.changeSlide({data:{message:b.options.rtl===!0?"next":"previous"}}):39===a.keyCode&&b.options.accessibility===!0&&b.changeSlide({data:{message:b.options.rtl===!0?"previous":"next"}}))},b.prototype.lazyLoad=function(){function g(c){a("img[data-lazy]",c).each(function(){var c=a(this),d=a(this).attr("data-lazy"),e=document.createElement("img");e.onload=function(){c.animate({opacity:0}
vendor: 4,284 bytes, line 14731
14731,100,function(){c.attr("src",d).animate({opacity:1},200,function(){c.removeAttr("data-lazy").removeClass("slick-loading")}),b.$slider.trigger("lazyLoaded",[b,c,d])})},e.onerror=function(){c.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),b.$slider.trigger("lazyLoadError",[b,c,d])},e.src=d})}var c,d,e,f,b=this;b.options.centerMode===!0?b.options.infinite===!0?(e=b.currentSlide+(b.options.slidesToShow/2+1),f=e+b.options.slidesToShow+2):(e=Math.max(0,b.currentSlide-(b.options.slidesToShow/2+1)),f=2+(b.options.slidesToShow/2+1)+b.currentSlide):(e=b.options.infinite?b.options.slidesToShow+b.currentSlide:b.currentSlide,f=Math.ceil(e+b.options.slidesToShow),b.options.fade===!0&&(e>0&&e--,f<=b.slideCount&&f++)),c=b.$slider.find(".slick-slide").slice(e,f),g(c),b.slideCount<=b.options.slidesToShow?(d=b.$slider.find(".slick-slide"),g(d)):b.currentSlide>=b.slideCount-b.options.slidesToShow?(d=b.$slider.find(".slick-cloned").slice(0,b.options.slidesToShow),g(d)):0===b.currentSlide&&(d=b.$slider.find(".slick-cloned").slice(-1*b.options.slidesToShow),g(d))},b.prototype.loadSlider=function(){var a=this;a.setPosition(),a.$slideTrack.css({opacity:1}),a.$slider.removeClass("slick-loading"),a.initUI(),"progressive"===a.options.lazyLoad&&a.progressiveLazyLoad()},b.prototype.next=b.prototype.slickNext=function(){var a=this;a.changeSlide({data:{message:"next"}})},b.prototype.orientationChange=function(){var a=this;a.checkResponsive(),a.setPosition()},b.prototype.pause=b.prototype.slickPause=function(){var a=this;a.autoPlayClear(),a.paused=!0},b.prototype.play=b.prototype.slickPlay=function(){var a=this;a.autoPlay(),a.options.autoplay=!0,a.paused=!1,a.focussed=!1,a.interrupted=!1},b.prototype.postSlide=function(a){var b=this;b.unslicked||(b.$slider.trigger("afterChange",[b,a]),b.animating=!1,b.setPosition(),b.swipeLeft=null,b.options.autoplay&&b.autoPlay(),b.options.accessibility===!0&&b.initADA())},b.prototype.prev=b.prototype.slickPrev=function(){var a=this;a.changeSlide({data:{message:"previous"}})},b.prototype.preventDefault=function(a){a.preventDefault()},b.prototype.progressiveLazyLoad=function(b){b=b||1;var e,f,g,c=this,d=a("img[data-lazy]",c.$slider);d.length?(e=d.first(),f=e.attr("data-lazy"),g=document.createElement("img"),g.onload=function(){e.attr("src",f).removeAttr("data-lazy").removeClass("slick-loading"),c.options.adaptiveHeight===!0&&c.setPosition(),c.$slider.trigger("lazyLoaded",[c,e,f]),c.progressiveLazyLoad()},g.onerror=function(){3>b?setTimeout(function(){c.progressiveLazyLoad(b+1)},500):(e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),c.$slider.trigger("lazyLoadError",[c,e,f]),c.progressiveLazyLoad())},g.src=f):c.$slider.trigger("allImagesLoaded",[c])},b.prototype.refresh=function(b){var d,e,c=this;e=c.slideCount-c.options.slidesToShow,!c.options.infinite&&c.currentSlide>e&&(c.currentSlide=e),c.slideCount<=c.options.slidesToShow&&(c.currentSlide=0),d=c.currentSlide,c.destroy(!0),a.extend(c,c.initials,{currentSlide:d}),c.init(),b||c.changeSlide({data:{message:"index",index:d}},!1)},b.prototype.registerBreakpoints=function(){var c,d,e,b=this,f=b.options.responsive||null;if("array"===a.type(f)&&f.length){b.respondTo=b.options.respondTo||"window";for(c in f)if(e=b.breakpoints.length-1,d=f[c].breakpoint,f.hasOwnProperty(c)){for(;e>=0;)b.breakpoints[e]&&b.breakpoints[e]===d&&b.breakpoints.splice(e,1),e--;b.breakpoints.push(d),b.breakpointSettings[d]=f[c].settings}b.breakpoints.sort(function(a,c){return b.options.mobileFirst?a-c:c-a})}},b.prototype.reinit=function(){var b=this;b.$slides=b.$slideTrack.children(b.options.slide).addClass("slick-slide"),b.slideCount=b.$slides.length,b.currentSlide>=b.slideCount&&0!==b.currentSlide&&(b.currentSlide=b.currentSlide-b.options.slidesToScroll),b.slideCount<=b.options.slidesToShow&&(b.currentSlide=0),b.registerBreakpoints(),b.setProps(),b.setupInfinite(),b.buildArrows(),b.updateArrows(),b.initArrowEvents(),b.buildDots(),b.updateDots(),b.initDotEvents(),b.cleanUpSlideEvents(),b.initSlideEvents(),b.checkResponsive(!1,!0),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().on("click.slick",b.selectHandler),b.setSlideClasses("number"==typeof b.currentSlide?b.currentSlide:0),b.setPosition(),b.focu
vendor: 2,346 bytes, line 14731
14731sHandler(),b.paused=!b.options.autoplay,b.autoPlay(),b.$slider.trigger("reInit",[b])},b.prototype.resize=function(){var b=this;a(window).width()!==b.windowWidth&&(clearTimeout(b.windowDelay),b.windowDelay=window.setTimeout(function(){b.windowWidth=a(window).width(),b.checkResponsive(),b.unslicked||b.setPosition()},50))},b.prototype.removeSlide=b.prototype.slickRemove=function(a,b,c){var d=this;return"boolean"==typeof a?(b=a,a=b===!0?0:d.slideCount-1):a=b===!0?--a:a,d.slideCount<1||0>a||a>d.slideCount-1?!1:(d.unload(),c===!0?d.$slideTrack.children().remove():d.$slideTrack.children(this.options.slide).eq(a).remove(),d.$slides=d.$slideTrack.children(this.options.slide),d.$slideTrack.children(this.options.slide).detach(),d.$slideTrack.append(d.$slides),d.$slidesCache=d.$slides,void d.reinit())},b.prototype.setCSS=function(a){var d,e,b=this,c={};b.options.rtl===!0&&(a=-a),d="left"==b.positionProp?Math.ceil(a)+"px":"0px",e="top"==b.positionProp?Math.ceil(a)+"px":"0px",c[b.positionProp]=a,b.transformsEnabled===!1?b.$slideTrack.css(c):(c={},b.cssTransitions===!1?(c[b.animType]="translate("+d+", "+e+")",b.$slideTrack.css(c)):(c[b.animType]="translate3d("+d+", "+e+", 0px)",b.$slideTrack.css(c)))},b.prototype.setDimensions=function(){var a=this;a.options.vertical===!1?a.options.centerMode===!0&&a.$list.css({padding:"0px "+a.options.centerPadding}):(a.$list.height(a.$slides.first().outerHeight(!0)*a.options.slidesToShow),a.options.centerMode===!0&&a.$list.css({padding:a.options.centerPadding+" 0px"})),a.listWidth=a.$list.width(),a.listHeight=a.$list.height(),a.options.vertical===!1&&a.options.variableWidth===!1?(a.slideWidth=Math.ceil(a.listWidth/a.options.slidesToShow),a.$slideTrack.width(Math.ceil(a.slideWidth*a.$slideTrack.children(".slick-slide").length))):a.options.variableWidth===!0?a.$slideTrack.width(5e3*a.slideCount):(a.slideWidth=Math.ceil(a.listWidth),a.$slideTrack.height(Math.ceil(a.$slides.first().outerHeight(!0)*a.$slideTrack.children(".slick-slide").length)));var b=a.$slides.first().outerWidth(!0)-a.$slides.first().width();a.options.variableWidth===!1&&a.$slideTrack.children(".slick-slide").width(a.slideWidth-b)},b.prototype.setFade=function(){var c,b=this;b.$slides.each(function(d,e){c=b.slideWidth*d*-1,b.options.rtl===!0?a(e).css({position:"relative",right:c,top:0,zIndex:b.options.zIndex-2,opacity:0}
vendor: 3,177 bytes, line 14731
14731):a(e).css({position:"relative",left:c,top:0,zIndex:b.options.zIndex-2,opacity:0})}),b.$slides.eq(b.currentSlide).css({zIndex:b.options.zIndex-1,opacity:1})},b.prototype.setHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.css("height",b)}},b.prototype.setOption=b.prototype.slickSetOption=function(){var c,d,e,f,h,b=this,g=!1;if("object"===a.type(arguments[0])?(e=arguments[0],g=arguments[1],h="multiple"):"string"===a.type(arguments[0])&&(e=arguments[0],f=arguments[1],g=arguments[2],"responsive"===arguments[0]&&"array"===a.type(arguments[1])?h="responsive":"undefined"!=typeof arguments[1]&&(h="single")),"single"===h)b.options[e]=f;else if("multiple"===h)a.each(e,function(a,c){b.options[a]=c});else if("responsive"===h)for(d in f)if("array"!==a.type(b.options.responsive))b.options.responsive=[f[d]];else{for(c=b.options.responsive.length-1;c>=0;)b.options.responsive[c].breakpoint===f[d].breakpoint&&b.options.responsive.splice(c,1),c--;b.options.responsive.push(f[d])}g&&(b.unload(),b.reinit())},b.prototype.setPosition=function(){var a=this;a.setDimensions(),a.setHeight(),a.options.fade===!1?a.setCSS(a.getLeft(a.currentSlide)):a.setFade(),a.$slider.trigger("setPosition",[a])},b.prototype.setProps=function(){var a=this,b=document.body.style;a.positionProp=a.options.vertical===!0?"top":"left","top"===a.positionProp?a.$slider.addClass("slick-vertical"):a.$slider.removeClass("slick-vertical"),(void 0!==b.WebkitTransition||void 0!==b.MozTransition||void 0!==b.msTransition)&&a.options.useCSS===!0&&(a.cssTransitions=!0),a.options.fade&&("number"==typeof a.options.zIndex?a.options.zIndex<3&&(a.options.zIndex=3):a.options.zIndex=a.defaults.zIndex),void 0!==b.OTransform&&(a.animType="OTransform",a.transformType="-o-transform",a.transitionType="OTransition",void 0===b.perspectiveProperty&&void 0===b.webkitPerspective&&(a.animType=!1)),void 0!==b.MozTransform&&(a.animType="MozTransform",a.transformType="-moz-transform",a.transitionType="MozTransition",void 0===b.perspectiveProperty&&void 0===b.MozPerspective&&(a.animType=!1)),void 0!==b.webkitTransform&&(a.animType="webkitTransform",a.transformType="-webkit-transform",a.transitionType="webkitTransition",void 0===b.perspectiveProperty&&void 0===b.webkitPerspective&&(a.animType=!1)),void 0!==b.msTransform&&(a.animType="msTransform",a.transformType="-ms-transform",a.transitionType="msTransition",void 0===b.msTransform&&(a.animType=!1)),void 0!==b.transform&&a.animType!==!1&&(a.animType="transform",a.transformType="transform",a.transitionType="transition"),a.transformsEnabled=a.options.useTransform&&null!==a.animType&&a.animType!==!1},b.prototype.setSlideClasses=function(a){var c,d,e,f,b=this;d=b.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),b.$slides.eq(a).addClass("slick-current"),b.options.centerMode===!0?(c=Math.floor(b.options.slidesToShow/2),b.options.infinite===!0&&(a>=c&&a<=b.slideCount-1-c?b.$slides.slice(a-c,a+c+1).addClass("slick-active").attr("aria-hidden","false"):(e=b.options.slidesToShow+a,
vendor: 1,607 bytes, line 14732
14732d.slice(e-c+1,e+c+2).addClass("slick-active").attr("aria-hidden","false")),0===a?d.eq(d.length-1-b.options.slidesToShow).addClass("slick-center"):a===b.slideCount-1&&d.eq(b.options.slidesToShow).addClass("slick-center")),b.$slides.eq(a).addClass("slick-center")):a>=0&&a<=b.slideCount-b.options.slidesToShow?b.$slides.slice(a,a+b.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):d.length<=b.options.slidesToShow?d.addClass("slick-active").attr("aria-hidden","false"):(f=b.slideCount%b.options.slidesToShow,e=b.options.infinite===!0?b.options.slidesToShow+a:a,b.options.slidesToShow==b.options.slidesToScroll&&b.slideCount-a<b.options.slidesToShow?d.slice(e-(b.options.slidesToShow-f),e+f).addClass("slick-active").attr("aria-hidden","false"):d.slice(e,e+b.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false")),"ondemand"===b.options.lazyLoad&&b.lazyLoad()},b.prototype.setupInfinite=function(){var c,d,e,b=this;if(b.options.fade===!0&&(b.options.centerMode=!1),b.options.infinite===!0&&b.options.fade===!1&&(d=null,b.slideCount>b.options.slidesToShow)){for(e=b.options.centerMode===!0?b.options.slidesToShow+1:b.options.slidesToShow,c=b.slideCount;c>b.slideCount-e;c-=1)d=c-1,a(b.$slides[d]).clone(!0).attr("id","").attr("data-slick-index",d-b.slideCount).prependTo(b.$slideTrack).addClass("slick-cloned");for(c=0;e>c;c+=1)d=c,a(b.$slides[d]).clone(!0).attr("id","").attr("data-slick-index",d+b.slideCount).appendTo(b.$slideTrack).addClass("slick-cloned");b.$slideTrack.find(".slick-cloned").find("[id]").each(function(){a(this).attr("id","")})}},b.prototype.
vendor: 4,540 bytes, line 14732
14732interrupt=function(a){var b=this;a||b.autoPlay(),b.interrupted=a},b.prototype.selectHandler=function(b){var c=this,d=a(b.target).is(".slick-slide")?a(b.target):a(b.target).parents(".slick-slide"),e=parseInt(d.attr("data-slick-index"));return e||(e=0),c.slideCount<=c.options.slidesToShow?(c.setSlideClasses(e),void c.asNavFor(e)):void c.slideHandler(e)},b.prototype.slideHandler=function(a,b,c){var d,e,f,g,j,h=null,i=this;return b=b||!1,i.animating===!0&&i.options.waitForAnimate===!0||i.options.fade===!0&&i.currentSlide===a||i.slideCount<=i.options.slidesToShow?void 0:(b===!1&&i.asNavFor(a),d=a,h=i.getLeft(d),g=i.getLeft(i.currentSlide),i.currentLeft=null===i.swipeLeft?g:i.swipeLeft,i.options.infinite===!1&&i.options.centerMode===!1&&(0>a||a>i.getDotCount()*i.options.slidesToScroll)?void(i.options.fade===!1&&(d=i.currentSlide,c!==!0?i.animateSlide(g,function(){i.postSlide(d)}):i.postSlide(d))):i.options.infinite===!1&&i.options.centerMode===!0&&(0>a||a>i.slideCount-i.options.slidesToScroll)?void(i.options.fade===!1&&(d=i.currentSlide,c!==!0?i.animateSlide(g,function(){i.postSlide(d)}):i.postSlide(d))):(i.options.autoplay&&clearInterval(i.autoPlayTimer),e=0>d?i.slideCount%i.options.slidesToScroll!==0?i.slideCount-i.slideCount%i.options.slidesToScroll:i.slideCount+d:d>=i.slideCount?i.slideCount%i.options.slidesToScroll!==0?0:d-i.slideCount:d,i.animating=!0,i.$slider.trigger("beforeChange",[i,i.currentSlide,e]),f=i.currentSlide,i.currentSlide=e,i.setSlideClasses(i.currentSlide),i.options.asNavFor&&(j=i.getNavTarget(),j=j.slick("getSlick"),j.slideCount<=j.options.slidesToShow&&j.setSlideClasses(i.currentSlide)),i.updateDots(),i.updateArrows(),i.options.fade===!0?(c!==!0?(i.fadeSlideOut(f),i.fadeSlide(e,function(){i.postSlide(e)})):i.postSlide(e),void i.animateHeight()):void(c!==!0?i.animateSlide(h,function(){i.postSlide(e)}):i.postSlide(e))))},b.prototype.startLoad=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.hide(),a.$nextArrow.hide()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.hide(),a.$slider.addClass("slick-loading")},b.prototype.swipeDirection=function(){var a,b,c,d,e=this;return a=e.touchObject.startX-e.touchObject.curX,b=e.touchObject.startY-e.touchObject.curY,c=Math.atan2(b,a),d=Math.round(180*c/Math.PI),0>d&&(d=360-Math.abs(d)),45>=d&&d>=0?e.options.rtl===!1?"left":"right":360>=d&&d>=315?e.options.rtl===!1?"left":"right":d>=135&&225>=d?e.options.rtl===!1?"right":"left":e.options.verticalSwiping===!0?d>=35&&135>=d?"down":"up":"vertical"},b.prototype.swipeEnd=function(a){var c,d,b=this;if(b.dragging=!1,b.interrupted=!1,b.shouldClick=b.touchObject.swipeLength>10?!1:!0,void 0===b.touchObject.curX)return!1;if(b.touchObject.edgeHit===!0&&b.$slider.trigger("edge",[b,b.swipeDirection()]),b.touchObject.swipeLength>=b.touchObject.minSwipe){switch(d=b.swipeDirection()){case"left":case"down":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide+b.getSlideCount()):b.currentSlide+b.getSlideCount(),b.currentDirection=0;break;case"right":case"up":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide-b.getSlideCount()):b.currentSlide-b.getSlideCount(),b.currentDirection=1}"vertical"!=d&&(b.slideHandler(c),b.touchObject={},b.$slider.trigger("swipe",[b,d]))}else b.touchObject.startX!==b.touchObject.curX&&(b.slideHandler(b.currentSlide),b.touchObject={})},b.prototype.swipeHandler=function(a){var b=this;if(!(b.options.swipe===!1||"ontouchend"in document&&b.options.swipe===!1||b.options.draggable===!1&&-1!==a.type.indexOf("mouse")))switch(b.touchObject.fingerCount=a.originalEvent&&void 0!==a.originalEvent.touches?a.originalEvent.touches.length:1,b.touchObject.minSwipe=b.listWidth/b.options.touchThreshold,b.options.verticalSwiping===!0&&(b.touchObject.minSwipe=b.listHeight/b.options.touchThreshold),a.data.action){case"start":b.swipeStart(a);break;case"move":b.swipeMove(a);break;case"end":b.swipeEnd(a)}},b.prototype.swipeMove=function(a){var d,e,f,g,h,b=this;return h=void 0!==a.originalEvent?a.originalEvent.touches:null,!b.dragging||h&&1!==h.length?!1:(d=b.getLeft(b.currentSlide),b.touchObject.curX=void 0!==h?h[0].pageX:a.clientX,b.touchObject.curY=void 0!==h?h[0].pageY:a.clientY,b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curX-b.touchObject.startX,2))),b.options.verticalSwiping===!0&&(b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curY-b.touchObject.startY,2)))),e=b.swipeDirection(),"vertical"!==e?(void 0!==a.originalEvent&&b.touchObject.swipeLength>
147324&&a.preventDefault(),g=(b.options.rtl===!1?1:-1)*(b.touchObject.curX>b.touchObject.startX?1:-1),b.options.verticalSwiping===!0&&(g=b.touchObject.curY>b.touchObject.startY?1:-1),f=b.touchObject.swipeLength,b.touchObject.edgeHit=!1,b.options.infinite===!1&&(0===b.currentSlide&&"right"===e||b.currentSlide>=b.getDotCount()&&"left"===e)&&(f=b.touchObject.swipeLength*b.options.edgeFriction,b.touchObject.edgeHit=!0),b.options.vertical===!1?b.swipeLeft=d+f*g:b.swipeLeft=d+f*(b.$list.height()/b.listWidth)*g,b.options.verticalSwiping===!0&&(b.swipeLeft=d+f*g),b.options.fade===!0||b.options.touchMove===!1?!1:b.animating===!0?(b.swipeLeft=null,!1):void b.setCSS(b.swipeLeft)):void 0)},b.prototype.swipeStart=function(a){var c,b=this;return b.interrupted=!0,1!==b.touchObject.fingerCount||b.slideCount<=b.options.slidesToShow?(b.touchObject={},!1):(void 0!==a.originalEvent&&void 0!==a.originalEvent.touches&&(c=a.originalEvent.touches[0]),b.touchObject.startX=b.touchObject.curX=void 0!==c?c.pageX:a.clientX,b.touchObject.startY=b.touchObject.curY=void 0!==c?c.pageY:a.clientY,void(b.dragging=!0))},b.prototype.unfilterSlides=b.prototype.slickUnfilter=function(){var a=this;null!==a.$slidesCache&&(a.unload(),a.$slideTrack.children(this.options.slide).detach(),a.$slidesCache.appendTo(a.$slideTrack),a.reinit())},b.prototype.unload=function(){var b=this;a(".slick-cloned",b.$slider).remove(),b.$dots&&b.$dots.remove(),b.$prevArrow&&b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.remove(),b.$nextArrow&&b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.remove(),b.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")},b.prototype.unslick=function(a){var b=this;b.$slider.trigger("unslick",[b,a]),b.destroy()},b.prototype.updateArrows=function(){var b,a=this;b=Math.floor(a.options.slidesToShow/2),a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&!a.options.infinite&&(a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),a.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===a.currentSlide?(a.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):a.currentSlide>=a.slideCount-a.options.slidesToShow&&a.options.centerMode===!1?(a.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):a.currentSlide>=a.slideCount-1&&a.options.centerMode===!0&&(a.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},b.prototype.updateDots=function(){var a=this;null!==a.$dots&&(a.$dots.find("li").removeClass("slick-active").attr("aria-hidden","true"),a.$dots.find("li").eq(Math.floor(a.currentSlide/a.options.slidesToScroll)).addClass("slick-active").attr("aria-hidden","false"))},b.prototype.visibility=function(){var a=this;a.options.autoplay&&(document[a.hidden]?a.interrupted=!0:a.interrupted=!1)},a.fn.slick=function(){var f,g,a=this,c=arguments[0],d=Array.prototype.slice.call(arguments,1),e=a.length;for(f=0;e>f;f++)if("object"==typeof c||"undefined"==typeof c?a[f].slick=new b(a[f],c):g=a[f].slick[c].apply(a[f].slick,d),"undefined"!=typeof g)return g;return a}});function countdown(year, month, day, hour, minute, format) { 14733Today = new Date(); 14734Todays_Year = Today.getFullYear() - 2000; 14735Todays_Month = Today.getMonth() + 1; 14736 14737//Convert both today's date and the target date into miliseconds. 14738Todays_Date = (new Date(Todays_Year, Todays_Month, Today.getDate(),Today.getHours(), Today.getMinutes(), Today.getSeconds())).getTime(); 14739Target_Date = (new Date(year, month, day, hour, minute, 0)).getTime(); 14740 14741//Find their difference, and convert that into seconds. 14742Time_Left = Math.round((Target_Date - Todays_Date) / 1000); 14743 14744if (Time_Left < 0) 14745Time_Left = 0; 14746 14747switch (format) { 14748 14749case 0: 14750//The simplest way to display the time left. 14751document.all.countdown.innerHTML = Time_Left + ' seconds'; 14752break; 14753case 1: 14754//More datailed. 14755days = Math.floor(Time_Left / (60 * 60 * 24)); 14756Time_Left %= 60 * 60 * 24; 14757hours = Math.floor(Time_Left / (60 * 60)); 14758Time_Left %= 60 * 60; 14759minutes = Math.floor(Time_Left / 60); 14760Time_Left %= 60; 14761seconds = Time_Left; 14762 14763dps = 'S'; hps = 'S'; mps = 'S'; sps = 'S';
14764//ps is short for plural suffix. 14765if (days === 1) dps = ''; 14766if (hours === 1) hps = ''; 14767if (minutes === 1) mps = ''; 14768if (seconds === 1) sps = ''; 14769 14770$('#countdown').html('<span class="days"><strong>' + days + '</strong> DAY' + dps + '</span><br/>'); 14771$('#countdown').append('<strong>' + hours + '</strong>H : '); 14772$('#countdown').append('<strong>' + minutes + '</strong>M : '); 14773$('#countdown').append('<strong>' + seconds + '</strong>S'); 14774break; 14775default: 14776//$('#countdown').html(Time_Left + ' seconds'); 14777} 14778 14779//Recursive call, keeps the clock ticking. 14780setTimeout('countdown(' + year + ',' + month + ',' + day + ',' + hour + ',' + minute + ',' + format + ');', 1000); 14781}$(document).ready(function(){var n=$("#countdown").data("date");setTimeout("countdown("+n+");",50);$("body.articleid1").length&&($("#banners").slick({autoplay:!0,arrows:!0}),$(".banner-heading").bigtext());$("#sponsors-carousel").slick({autoplay:!0,arrows:!1,dots:!1,slidesToShow:6,draggable:!1,responsive:[{breakpoint:992,settings:{slidesToShow:4}},{breakpoint:768,settings:{slidesToShow:3}},{breakpoint:480,settings:{slidesToShow:2}}]})});
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.