· 8 years ago · Mar 08, 2018, 10:48 AM
1<!doctype html>
2<html lang="en" dir="ltr">
3<head>
4
5<meta charset="utf-8">
6
7var _adrtx = _adrtx || {}; _adrtx.rt = "ti"; _adrtx.p = "adaud"; (function() { var adrtx = document.createElement("script"); adrtx.type = "text/javascript"; adrtx.async = true; adrtx.src = ("https:" == document.location.protocol ? "https://" : "http://") + "cdn.adrtx.net/adrtxtag.min.js"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(adrtx, s); })();window.ada_publisher = "ada_publisher=EMS";_EQPService.Cookie.setCookie('adp_segs', 'e0', 3);var _emqYL = new Image(); _emqYL.src = ("https:" == document.location.protocol ? "https:" : "http:") + "//p.yieldlab.net/m?dm_id=23666&ext_id=BSakBiaAWSbkWSa0Bif-BiUABifkBi7kWsfABifABifABfrr&ddata_seg=e0";var _emqConImpact = new Image(); _emqConImpact.src = ("https:" == document.location.protocol ? "https:" : "http:") + "//d.df-srv.de/match/a.js?pid=42";var _emqAdexGif = new Image(); _emqAdexGif.src = ("https:" == document.location.protocol ? "https:" : "http:") + "//xpl.theadex.com/d/279/i/2.gif?axd_pid=22&axd_fuid=BSakBiaAWSbkWSa0Bif-BiUABifkBi7kWsfABifABifABfrr";@charset "UTF-8";[ng\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}
8
9
10 Die Millionen-Party - Das Oktoberfest aus n-tv Dokumentation online schauen als Stream bei TV NOW
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 GujAd.getClient().setSiteType("tvnow");
31
32
33
34
35
36
37
38
39
40
41
42
43
44 $AC.loadConfig({
45 "autoDetection": true,
46 "site": "tvnow.de",
47 "nuggadID": 1441718982 // ab sofort EINE nugg.ad ID für alle NOWs!!! Kein Switch mehr notwendig!
48 });
49
50
51
52 (function () {
53 var s = document.createElement('script');
54 s.id = 'ipems';
55 s.type = 'text/javascript';
56 s.async = true;
57 s.src = env.ems;
58 s.innerHTML = 'GujAd.getClient().setSiteType("tvnow");';
59 var x = document.getElementsByTagName('script')[0];
60 x.parentNode.insertBefore(s, x);
61 })();
62
63
64 .sv-helper{position: fixed !important;z-index: 99999;margin: 0 !important;}.sv-candidate{}.sv-placeholder{}.sv-sorting-in-progress{-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;}.sv-visibility-hidden{visibility: hidden !important;opacity: 0 !important;}
65
66
67
68
69
70
71 var ip_network = "rtl-now.de";
72
73 window.prerenderReady = false;
74 window.setTimeout(function () {
75 window.prerenderReady = true;
76 }, 15000);
77
78 if (bowser.msie) {
79 $('html').addClass('isie');
80 }
81
82 if(navigator.userAgent.indexOf('AFT') !== -1){
83 returnurl = window.location.protocol + window.env.desktop + '/firetv.html';
84 window.location.replace(returnurl);
85 }
86
87 if (bowser.mobile) {
88 var ffcurl = window.location.protocol + window.env.ffc + '/';
89 var mobileurl = window.location.protocol + window.env.mobile;
90
91 if (window.location.search.indexOf('emailverify') !== -1 && window.location.search.indexOf('loyalty') !== -1) {
92 returnurl = ffcurl + '?emailverify&loyalty';
93 } else if (window.location.search.indexOf('newsletter') !== -1) {
94 returnurl = ffcurl + '?newsletter';
95 } else if (window.location.search.indexOf('account') !== -1) {
96 returnurl = ffcurl + 'profile';
97 } else if (window.location.search.indexOf('emailverify') !== -1) {
98 returnurl = ffcurl + '?emailverify';
99 } else if (window.location.search.indexOf('loyalty') !== -1) {
100 returnurl = ffcurl + '?loyalty';
101 } else if (window.location.search.indexOf('passwordrecover') !== -1) {
102 returnurl = ffcurl + 'login' + window.location.search;
103 } else {
104 returnurl = mobileurl + window.location.pathname;
105 if (window.location.search) {
106 returnurl += window.location.search;
107 }
108 document.cookie = "redirectref=" + document.referrer + ";domain=.tvnow.de;path=/";
109 }
110 window.location.replace(returnurl);
111 }
112
113 //elementary Search engine detection.
114 var nowSEDetected = !(window.navigator.userAgent.indexOf('Prerender') === -1 && window.navigator.userAgent.indexOf('Googlebot') === -1);
115
116 // OEWA
117 var nowResearch = 'ivw';
118 if ('at' === document.location.hostname.substr(-2)) {
119 nowResearch = 'oewa';
120 }
121
122 /* <![CDATA[ */
123 if (!nowSEDetected) {
124 (function (i, s, o, g, r, a, m) {
125 i['GoogleAnalyticsObject'] = r;
126 i[r] = i[r] || function () {
127 (
128 i[r].q = i[r].q || []
129 ).push(arguments)
130 }, i[r].l = 1 * new Date();
131 a = s.createElement(o), m = s.getElementsByTagName(o)[0];
132 a.async = 1;
133 a.src = g;
134 m.parentNode.insertBefore(a, m)
135 })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
136 (function () {
137 var s = document.createElement('script');
138 s.type = 'text/javascript';
139 s.async = true;
140 s.src = 'https://script.ioam.de/iam.js';
141 var x = document.getElementsByTagName('script')[0];
142 x.parentNode.insertBefore(s, x);
143 })();
144
145 if (nowResearch == 'oewa') {
146 (function () {
147 var s = document.createElement('script');
148 s.type = 'text/javascript';
149 s.async = true;
150 s.src = '//dispatcher.oewabox.at/oewa.js';
151 var x = document.getElementsByTagName('script')[0];
152 x.parentNode.insertBefore(s, x);
153 })();
154 }
155
156 (function () {
157 var protocol = ('http:' === location.protocol ? 'http:' : 'https:');
158 window._adexc = window._adexc || [];
159 window._adexc.push(['/229/505/', 'cm', '_cb', [protocol + '//www.technical-service.net/cb-pixel.gif?auid={{UUID}}']]);
160 var axd = document.createElement('script');
161 axd.type = 'text/javascript';
162 axd.async = 1;
163 axd.src = protocol + "//dmp.theadex.com/d/229/505/s/adex.js";
164 var s = document.getElementsByTagName('script')[0];
165 s.parentNode.insertBefore(axd, s);
166 })();
167 }
168 /* ]]> */
169
170
171
172
173.at-icon{fill:#fff;border:0}.at-icon-wrapper{display:inline-block;overflow:hidden}a .at-icon-wrapper{cursor:pointer}.at-rounded,.at-rounded-element .at-icon-wrapper{border-radius:12%}.at-circular,.at-circular-element .at-icon-wrapper{border-radius:50%}.addthis_32x32_style .at-icon{width:2pc;height:2pc}.addthis_24x24_style .at-icon{width:24px;height:24px}.addthis_20x20_style .at-icon{width:20px;height:20px}.addthis_16x16_style .at-icon{width:1pc;height:1pc}#at16lb{display:none;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1001;background-color:#000;opacity:.001}#at_complete,#at_error,#at_share,#at_success{position:static!important}.at15dn{display:none}#at15s,#at16p,#at16p form input,#at16p label,#at16p textarea,#at_share .at_item{font-family:arial,helvetica,tahoma,verdana,sans-serif!important;font-size:9pt!important;outline-style:none;outline-width:0;line-height:1em}* html #at15s.mmborder{position:absolute!important}#at15s.mmborder{position:fixed!important;width:250px!important}#at15s{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABtJREFUeNpiZGBgaGAgAjAxEAlGFVJHIUCAAQDcngCUgqGMqwAAAABJRU5ErkJggg==);float:none;line-height:1em;margin:0;overflow:visible;padding:5px;text-align:left;position:absolute}#at15s a,#at15s span{outline:0;direction:ltr;text-transform:none}#at15s .at-label{margin-left:5px}#at15s .at-icon-wrapper{width:1pc;height:1pc;vertical-align:middle}#at15s .at-icon{width:1pc;height:1pc}.at4-icon{display:inline-block;background-repeat:no-repeat;background-position:top left;margin:0;overflow:hidden;cursor:pointer}.addthis_16x16_style .at4-icon,.addthis_default_style .at4-icon,.at4-icon,.at-16x16{width:1pc;height:1pc;line-height:1pc;background-size:1pc!important}.addthis_32x32_style .at4-icon,.at-32x32{width:2pc;height:2pc;line-height:2pc;background-size:2pc!important}.addthis_24x24_style .at4-icon,.at-24x24{width:24px;height:24px;line-height:24px;background-size:24px!important}.addthis_20x20_style .at4-icon,.at-20x20{width:20px;height:20px;line-height:20px;background-size:20px!important}.at4-icon.circular,.circular .at4-icon,.circular.aticon{border-radius:50%}.at4-icon.rounded,.rounded .at4-icon{border-radius:4px}.at4-icon-left{float:left}#at15s .at4-icon{text-indent:20px;padding:0;overflow:visible;white-space:nowrap;background-size:1pc;width:1pc;height:1pc;background-position:top left;display:inline-block;line-height:1pc}.addthis_vertical_style .at4-icon,.at4-follow-container .at4-icon{margin-right:5px}html>body #at15s{width:250px!important}#at15s.atm{background:none!important;padding:0!important;width:10pc!important}#at15s_inner{background:#fff;border:1px solid #fff;margin:0}#at15s_head{position:relative;background:#f2f2f2;padding:4px;cursor:default;border-bottom:1px solid #e5e5e5}.at15s_head_success{background:#cafd99!important;border-bottom:1px solid #a9d582!important}.at15s_head_success a,.at15s_head_success span{color:#000!important;text-decoration:none}#at15s_brand,#at15sptx,#at16_brand{position:absolute}#at15s_brand{top:4px;right:4px}.at15s_brandx{right:20px!important}a#at15sptx{top:4px;right:4px;text-decoration:none;color:#4c4c4c;font-weight:700}#at15sptx:hover{text-decoration:underline}#at16_brand{top:5px;right:30px;cursor:default}#at_hover{padding:4px}#at_hover .at_item,#at_share .at_item{background:#fff!important;float:left!important;color:#4c4c4c!important}#at_share .at_item .at-icon-wrapper{margin-right:5px}#at_hover .at_bold{font-weight:700;color:#000!important}#at_hover .at_item{width:7pc!important;padding:2px 3px!important;margin:1px;text-decoration:none!important}#at_hover .at_item.athov,#at_hover .at_item:focus,#at_hover .at_item:hover{margin:0!important}#at_hover .at_item.athov,#at_hover .at_item:focus,#at_hover .at_item:hover,#at_share .at_item.athov,#at_share .at_item:hover{background:#f2f2f2!important;border:1px solid #e5e5e5;color:#000!important;text-decoration:none}.ipad #at_hover .at_item:focus{background:#fff!important;border:1px solid #fff}.at15t{display:block!important;height:1pc!important;line-height:1pc!important;padding-left:20px!important;background-position:0 0;text-align:left}.addthis_button,.at15t{cursor:pointer}.addthis_toolbox a.at300b,.addthis_toolbox a.at300m{width:auto}.addthis_toolbox a{margin-bottom:5px;line-height:initial}.addthis_toolbox.addthis_vertical_style{width:200px}.addthis_button_facebook_like .fb_iframe_widget{line-height:100%}.addthis_button_facebook_like iframe.fb_iframe_widget_lift{max-width:none}.addthis_toolbox a.addthis_button_counter,.addthis_toolbox a.addthis_button_facebook_like,.addthis_toolbox a.addthis_button_facebook_send,.addthis_toolbox a.addthis_button_facebook_share,.addthis_toolbox a.addthis_button_foursquare,.addthis_toolbox a.addthis_button_google_plusone,.addthis_toolbox a.addthis_button_linkedin_counter,.addthis_toolbox a.addthis_button_pinterest_pinit,.addthis_toolbox a.addthis_button_stumbleupon_badge,.addthis_toolbox a.addthis_button_tweet{display:inline-block}.at-share-tbx-element .google_plusone_iframe_widget>span>div{vertical-align:top!important}.addthis_toolbox span.addthis_follow_label{display:none}.addthis_toolbox.addthis_vertical_style span.addthis_follow_label{display:block;white-space:nowrap}.addthis_toolbox.addthis_vertical_style a{display:block}.addthis_toolbox.addthis_vertical_style.addthis_32x32_style a{line-height:2pc;height:2pc}.addthis_toolbox.addthis_vertical_style .at300bs{margin-right:4px;float:left}.addthis_toolbox.addthis_20x20_style span{line-height:20px}.addthis_toolbox.addthis_32x32_style span{line-height:2pc}.addthis_toolbox.addthis_pill_combo_style .addthis_button_compact .at15t_compact,.addthis_toolbox.addthis_pill_combo_style a{float:left}.addthis_toolbox.addthis_pill_combo_style a.addthis_button_tweet{margin-top:-2px}.addthis_toolbox.addthis_pill_combo_style .addthis_button_compact .at15t_compact{margin-right:4px}.addthis_default_style .addthis_separator{margin:0 5px;display:inline}div.atclear{clear:both}.addthis_default_style .addthis_separator,.addthis_default_style .at4-icon,.addthis_default_style .at300b,.addthis_default_style .at300bo,.addthis_default_style .at300bs,.addthis_default_style .at300m{float:left}.at300b img,.at300bo img{border:0}a.at300b .at4-icon,a.at300m .at4-icon{display:block}.addthis_default_style .at300b,.addthis_default_style .at300bo,.addthis_default_style .at300m{padding:0 2px}.at300b,.at300bo,.at300bs,.at300m{cursor:pointer}.addthis_button_facebook_like.at300b:hover,.addthis_button_facebook_like.at300bs:hover,.addthis_button_facebook_send.at300b:hover,.addthis_button_facebook_send.at300bs:hover{opacity:1}.addthis_20x20_style .at15t,.addthis_20x20_style .at300bs{overflow:hidden;display:block;height:20px!important;width:20px!important;line-height:20px!important}.addthis_32x32_style .at15t,.addthis_32x32_style .at300bs{overflow:hidden;display:block;height:2pc!important;width:2pc!important;line-height:2pc!important}.at300bs{overflow:hidden;display:block;background-position:0 0;height:1pc;width:1pc;line-height:1pc!important}.addthis_default_style .at15t_compact,.addthis_default_style .at15t_expanded{margin-right:4px}#at_share .at_item{width:123px!important;padding:4px;margin-right:2px;border:1px solid #fff}#at16p{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABtJREFUeNpiZGBgaGAgAjAxEAlGFVJHIUCAAQDcngCUgqGMqwAAAABJRU5ErkJggg==);z-index:10000001;position:absolute;top:50%;left:50%;width:300px;padding:10px;margin:0 auto;margin-top:-185px;margin-left:-155px;font-family:arial,helvetica,tahoma,verdana,sans-serif;font-size:9pt;color:#5e5e5e}#at_share{margin:0;padding:0}#at16pt{position:relative;background:#f2f2f2;height:13px;padding:5px 10px}#at16pt a,#at16pt h4{font-weight:700}#at16pt h4{display:inline;margin:0;padding:0;font-size:9pt;color:#4c4c4c;cursor:default}#at16pt a{position:absolute;top:5px;right:10px;color:#4c4c4c;text-decoration:none;padding:2px}#at15sptx:focus,#at16pt a:focus{outline:thin dotted}#at15s #at16pf a{top:1px}#_atssh{width:1px!important;height:1px!important;border:0!important}.atm{width:10pc!important;padding:0;margin:0;line-height:9pt;letter-spacing:normal;font-family:arial,helvetica,tahoma,verdana,sans-serif;font-size:9pt;color:#444;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABtJREFUeNpiZGBgaGAgAjAxEAlGFVJHIUCAAQDcngCUgqGMqwAAAABJRU5ErkJggg==);padding:4px}.atm-f{text-align:right;border-top:1px solid #ddd;padding:5px 8px}.atm-i{background:#fff;border:1px solid #d5d6d6;padding:0;margin:0;box-shadow:1px 1px 5px rgba(0,0,0,.15)}.atm-s{margin:0!important;padding:0!important}.atm-s a:focus{border:transparent;outline:0;transition:none}#at_hover.atm-s a,.atm-s a{display:block;text-decoration:none;padding:4px 10px;color:#235dab!important;font-weight:400;font-style:normal;transition:none}#at_hover.atm-s .at_bold{color:#235dab!important}#at_hover.atm-s a:hover,.atm-s a:hover{background:#2095f0;text-decoration:none;color:#fff!important}#at_hover.atm-s .at_bold{font-weight:700}#at_hover.atm-s a:hover .at_bold{color:#fff!important}.atm-s a .at-label{vertical-align:middle;margin-left:5px;direction:ltr}.at_PinItButton{display:block;width:40px;height:20px;padding:0;margin:0;background-image:url(//s7.addthis.com/static/t00/pinit00.png);background-repeat:no-repeat}.at_PinItButton:hover{background-position:0 -20px}.addthis_toolbox .addthis_button_pinterest_pinit{position:relative}.at-share-tbx-element .fb_iframe_widget span{vertical-align:baseline!important}#at16pf{height:auto;text-align:right;padding:4px 8px}.at-privacy-info{position:absolute;left:7px;bottom:7px;cursor:pointer;text-decoration:none;font-family:helvetica,arial,sans-serif;font-size:10px;line-height:9pt;letter-spacing:.2px;color:#666}.at-privacy-info:hover{color:#000}.body .wsb-social-share .wsb-social-share-button-vert{padding-top:0;padding-bottom:0}.body .wsb-social-share.addthis_counter_style .addthis_button_tweet.wsb-social-share-button{padding-top:40px}.body .wsb-social-share.addthis_counter_style .addthis_button_google_plusone.wsb-social-share-button{padding-top:0}.body .wsb-social-share.addthis_counter_style .addthis_button_facebook_like.wsb-social-share-button{padding-top:21px}@media print{#at4-follow,#at4-share,#at4-thankyou,#at4-whatsnext,#at4m-mobile,#at15s,.at4,.at4-recommended{display:none!important}}@media screen and (max-width:400px){.at4win{width:100%}}@media screen and (max-height:700px) and (max-width:400px){.at4-thankyou-inner .at4-recommended-container{height:122px;overflow:hidden}.at4-thankyou-inner .at4-recommended .at4-recommended-item:first-child{border-bottom:1px solid #c5c5c5}}.at-branding-logo{font-family:helvetica,arial,sans-serif;text-decoration:none;font-size:10px;display:inline-block;margin:2px 0;letter-spacing:.2px}.at-branding-logo .at-branding-icon{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF////+GlNUkcc1QAAAB1JREFUeNpiYIQDBjQmAwMmkwEM0JnY1WIxFyDAABGeAFEudiZsAAAAAElFTkSuQmCC")}.at-branding-logo .at-branding-icon,.at-branding-logo .at-privacy-icon{display:inline-block;height:10px;width:10px;margin-left:4px;margin-right:3px;margin-bottom:-1px;background-repeat:no-repeat}.at-branding-logo .at-privacy-icon{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAKCAMAAABR24SMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABhQTFRF8fr9ot/xXcfn2/P5AKva////////AKTWodjhjAAAAAd0Uk5T////////ABpLA0YAAAA6SURBVHjaJMzBDQAwCAJAQaj7b9xifV0kUKJ9ciWxlzWEWI5gMF65KUTv0VKkjVeTerqE/x7+9BVgAEXbAWI8QDcfAAAAAElFTkSuQmCC")}.at-branding-logo span{text-decoration:none}.at-branding-logo .at-branding-addthis,.at-branding-logo .at-branding-powered-by{color:#666}.at-branding-logo .at-branding-addthis:hover{color:#333}.at-cv-with-image .at-branding-addthis,.at-cv-with-image .at-branding-addthis:hover{color:#fff}a.at-branding-logo:visited{color:initial}.at-branding-info{display:inline-block;padding:0 5px;color:#666;border:1px solid #666;border-radius:50%;font-size:10px;line-height:9pt;opacity:.7;transition:all .3s ease;text-decoration:none}.at-branding-info span{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.at-branding-info:before{content:'i';font-family:Times New Roman}.at-branding-info:hover{color:#0780df;border-color:#0780df}.GujAdHidden{display: none !important; }
174.GujAdHiddenWallpaperSlot{height: 0; }
175.GujAdHeight.GujAdHiddenWallpaperSlot{height: 90px; }
176#skyscraper_1{position: fixed; }
177#superbanner_1{text-align: center; }
178.now-header-fixed{z-index: 600010; }
179.now-toolbar{z-index: 600000;position: relative; }
180.now-overlay-search{z-index: 600020; }
181.now-playerlayer{z-index: 600040; }
182.emsAnzeige, #mr2Anzeige{top: -12px;left: 0;position: absolute;font-family: "Open Sans",sans-serif,Arial;font-size: 10px;text-transform: none;font-weight: 400;line-height: 1.4;color: #a6a39c; }
183.bitmovinplayer-container *{box-sizing:border-box;padding:0}.bitmovinplayer-container embed,.bitmovinplayer-container img,.bitmovinplayer-container object{height:100%}.bitmovinplayer-ad-container,.bitmovinplayer-container{width:100%;height:100%;background-color:#000;color:#fff;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.bitmovinplayer-ad-container video,.bitmovinplayer-container video{width:100%!important;height:100%!important;position:absolute;top:0;left:0;object-fit:contain;-o-object-fit:contain}html:-ms-fullscreen{width:100%;height:100%}:-webkit-full-screen{background-color:transparent;width:100%!important;height:100%!important}video:-webkit-full-screen+.bitmovinplayer-ctrl{background:#ccc}figure[data-fullscreen=true],figure[data-legacy-fullscreen=true]{max-width:100%;max-height:100%;width:100%!important;height:100%!important;background-color:#000!important;margin:0;padding:0;position:fixed!important;top:0!important;left:0!important}figure[data-legacy-fullscreen=true]{z-index:99999}.bitmovinplayer-error-message ul{text-align:left}.bitmovinplayer-error-message a{color:#31c5c7}.bitmovinplayer-container video::-webkit-media-controls-panel,.bitmovinplayer-container video::\--webkit-media-controls-play-button{display:none!important;-webkit-appearance:none}.bitmovinplayer-container video::-webkit-media-controls-start-playback-button{display:none!important;-webkit-appearance:none}.fb_hidden{position:absolute;top:-10000px;z-index:10001}.fb_reposition{overflow:hidden;position:relative}.fb_invisible{display:none}.fb_reset{background:none;border:0;border-spacing:0;color:#000;cursor:auto;direction:ltr;font-family:"lucida grande", tahoma, verdana, arial, sans-serif;font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:1;margin:0;overflow:visible;padding:0;text-align:left;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;visibility:visible;white-space:normal;word-spacing:normal}.fb_reset>div{overflow:hidden}.fb_link img{border:none}@keyframes fb_transform{from{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.fb_animate{animation:fb_transform .3s forwards}
184.fb_dialog{background:rgba(82, 82, 82, .7);position:absolute;top:-10000px;z-index:10001}.fb_reset .fb_dialog_legacy{overflow:visible}.fb_dialog_advanced{padding:10px;border-radius:8px}.fb_dialog_content{background:#fff;color:#333}.fb_dialog_close_icon{background:url(https://static.xx.fbcdn.net/rsrc.php/v3/yq/r/IE9JII6Z1Ys.png) no-repeat scroll 0 0 transparent;cursor:pointer;display:block;height:15px;position:absolute;right:18px;top:17px;width:15px}.fb_dialog_mobile .fb_dialog_close_icon{top:5px;left:5px;right:auto}.fb_dialog_padding{background-color:transparent;position:absolute;width:1px;z-index:-1}.fb_dialog_close_icon:hover{background:url(https://static.xx.fbcdn.net/rsrc.php/v3/yq/r/IE9JII6Z1Ys.png) no-repeat scroll 0 -15px transparent}.fb_dialog_close_icon:active{background:url(https://static.xx.fbcdn.net/rsrc.php/v3/yq/r/IE9JII6Z1Ys.png) no-repeat scroll 0 -30px transparent}.fb_dialog_loader{background-color:#f6f7f9;border:1px solid #606060;font-size:24px;padding:20px}.fb_dialog_top_left,.fb_dialog_top_right,.fb_dialog_bottom_left,.fb_dialog_bottom_right{height:10px;width:10px;overflow:hidden;position:absolute}.fb_dialog_top_left{background:url(https://static.xx.fbcdn.net/rsrc.php/v3/ye/r/8YeTNIlTZjm.png) no-repeat 0 0;left:-10px;top:-10px}.fb_dialog_top_right{background:url(https://static.xx.fbcdn.net/rsrc.php/v3/ye/r/8YeTNIlTZjm.png) no-repeat 0 -10px;right:-10px;top:-10px}.fb_dialog_bottom_left{background:url(https://static.xx.fbcdn.net/rsrc.php/v3/ye/r/8YeTNIlTZjm.png) no-repeat 0 -20px;bottom:-10px;left:-10px}.fb_dialog_bottom_right{background:url(https://static.xx.fbcdn.net/rsrc.php/v3/ye/r/8YeTNIlTZjm.png) no-repeat 0 -30px;right:-10px;bottom:-10px}.fb_dialog_vert_left,.fb_dialog_vert_right,.fb_dialog_horiz_top,.fb_dialog_horiz_bottom{position:absolute;background:#525252;filter:alpha(opacity=70);opacity:.7}.fb_dialog_vert_left,.fb_dialog_vert_right{width:10px;height:100%}.fb_dialog_vert_left{margin-left:-10px}.fb_dialog_vert_right{right:0;margin-right:-10px}.fb_dialog_horiz_top,.fb_dialog_horiz_bottom{width:100%;height:10px}.fb_dialog_horiz_top{margin-top:-10px}.fb_dialog_horiz_bottom{bottom:0;margin-bottom:-10px}.fb_dialog_iframe{line-height:0}.fb_dialog_content .dialog_title{background:#6d84b4;border:1px solid #365899;color:#fff;font-size:14px;font-weight:bold;margin:0}.fb_dialog_content .dialog_title>span{background:url(https://static.xx.fbcdn.net/rsrc.php/v3/yd/r/Cou7n-nqK52.gif) no-repeat 5px 50%;float:left;padding:5px 0 7px 26px}body.fb_hidden{-webkit-transform:none;height:100%;margin:0;overflow:visible;position:absolute;top:-10000px;left:0;width:100%}.fb_dialog.fb_dialog_mobile.loading{background:url(https://static.xx.fbcdn.net/rsrc.php/v3/ya/r/3rhSv5V8j3o.gif) white no-repeat 50% 50%;min-height:100%;min-width:100%;overflow:hidden;position:absolute;top:0;z-index:10001}.fb_dialog.fb_dialog_mobile.loading.centered{width:auto;height:auto;min-height:initial;min-width:initial;background:none}.fb_dialog.fb_dialog_mobile.loading.centered #fb_dialog_loader_spinner{width:100%}.fb_dialog.fb_dialog_mobile.loading.centered .fb_dialog_content{background:none}.loading.centered #fb_dialog_loader_close{color:#fff;display:block;padding-top:20px;clear:both;font-size:18px}#fb-root #fb_dialog_ipad_overlay{background:rgba(0, 0, 0, .45);position:absolute;bottom:0;left:0;right:0;top:0;width:100%;min-height:100%;z-index:10000}#fb-root #fb_dialog_ipad_overlay.hidden{display:none}.fb_dialog.fb_dialog_mobile.loading iframe{visibility:hidden}.fb_dialog_content .dialog_header{-webkit-box-shadow:white 0 1px 1px -1px inset;background:-webkit-gradient(linear, 0% 0%, 0% 100%, from(#738ABA), to(#2C4987));border-bottom:1px solid;border-color:#1d4088;color:#fff;font:14px Helvetica, sans-serif;font-weight:bold;text-overflow:ellipsis;text-shadow:rgba(0, 30, 84, .296875) 0 -1px 0;vertical-align:middle;white-space:nowrap}.fb_dialog_content .dialog_header table{-webkit-font-smoothing:subpixel-antialiased;height:43px;width:100%}.fb_dialog_content .dialog_header td.header_left{font-size:12px;padding-left:5px;vertical-align:middle;width:60px}.fb_dialog_content .dialog_header td.header_right{font-size:12px;padding-right:5px;vertical-align:middle;width:60px}.fb_dialog_content .touchable_button{background:-webkit-gradient(linear, 0% 0%, 0% 100%, from(#4966A6), color-stop(.5, #355492), to(#2A4887));border:1px solid #29487d;-webkit-background-clip:padding-box;-webkit-border-radius:3px;-webkit-box-shadow:rgba(0, 0, 0, .117188) 0 1px 1px inset, rgba(255, 255, 255, .167969) 0 1px 0;display:inline-block;margin-top:3px;max-width:85px;line-height:18px;padding:4px 12px;position:relative}.fb_dialog_content .dialog_header .touchable_button input{border:none;background:none;color:#fff;font:12px Helvetica, sans-serif;font-weight:bold;margin:2px -12px;padding:2px 6px 3px 6px;text-shadow:rgba(0, 30, 84, .296875) 0 -1px 0}.fb_dialog_content .dialog_header .header_center{color:#fff;font-size:16px;font-weight:bold;line-height:18px;text-align:center;vertical-align:middle}.fb_dialog_content .dialog_content{background:url(https://static.xx.fbcdn.net/rsrc.php/v3/y9/r/jKEcVPZFk-2.gif) no-repeat 50% 50%;border:1px solid #555;border-bottom:0;border-top:0;height:150px}.fb_dialog_content .dialog_footer{background:#f6f7f9;border:1px solid #555;border-top-color:#ccc;height:40px}#fb_dialog_loader_close{float:left}.fb_dialog.fb_dialog_mobile .fb_dialog_close_button{text-shadow:rgba(0, 30, 84, .296875) 0 -1px 0}.fb_dialog.fb_dialog_mobile .fb_dialog_close_icon{visibility:hidden}#fb_dialog_loader_spinner{animation:rotateSpinner 1.2s linear infinite;background-color:transparent;background-image:url(https://static.xx.fbcdn.net/rsrc.php/v3/yD/r/t-wz8gw1xG1.png);background-repeat:no-repeat;background-position:50% 50%;height:24px;width:24px}@keyframes rotateSpinner{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}
185.fb_iframe_widget{display:inline-block;position:relative}.fb_iframe_widget span{display:inline-block;position:relative;text-align:justify}.fb_iframe_widget iframe{position:absolute}.fb_iframe_widget_fluid_desktop,.fb_iframe_widget_fluid_desktop span,.fb_iframe_widget_fluid_desktop iframe{max-width:100%}.fb_iframe_widget_fluid_desktop iframe{min-width:220px;position:relative}.fb_iframe_widget_lift{z-index:1}.fb_hide_iframes iframe{position:relative;left:-10000px}.fb_iframe_widget_loader{position:relative;display:inline-block}.fb_iframe_widget_fluid{display:inline}.fb_iframe_widget_fluid span{width:100%}.fb_iframe_widget_loader iframe{min-height:32px;z-index:2;zoom:1}.fb_iframe_widget_loader .FB_Loader{background:url(https://static.xx.fbcdn.net/rsrc.php/v3/y9/r/jKEcVPZFk-2.gif) no-repeat;height:32px;width:32px;margin-left:-16px;position:absolute;left:50%;z-index:4}
186.fb_customer_chat_bounce_in{animation-duration:250ms;animation-name:fb_bounce_in}.fb_customer_chat_bounce_out{animation-duration:250ms;animation-name:fb_fade_out}.fb_invisible_flow{display:inherit;height:0;overflow-x:hidden;width:0}.fb_mobile_overlay_active{background-color:#fff;height:100%;overflow:hidden;position:fixed;visibility:hidden;width:100%}@keyframes fb_fade_out{from{opacity:1}to{opacity:0}}@keyframes fb_bounce_in{0%{opacity:0;transform:scale(.8, .8);transform-origin:100% 100%}10%{opacity:.1}20%{opacity:.2}30%{opacity:.3}40%{opacity:.4}50%{opacity:.5}60%{opacity:.6}70%{opacity:.7}80%{opacity:.8;transform:scale(1.03, 1.03)}90{opacity:.9}100%{opacity:1;transform:scale(1, 1)}}/*!
187 * jQuery JavaScript Library v3.3.1
188 * https://jquery.com/
189 *
190 * Includes Sizzle.js
191 * https://sizzlejs.com/
192 *
193 * Copyright JS Foundation and other contributors
194 * Released under the MIT license
195 * https://jquery.org/license
196 *
197 * Date: 2018-01-20T17:24Z
198 */
199( function( global, factory ) {
200
201 "use strict";
202
203 if ( typeof module === "object" && typeof module.exports === "object" ) {
204
205 // For CommonJS and CommonJS-like environments where a proper `window`
206 // is present, execute the factory and get jQuery.
207 // For environments that do not have a `window` with a `document`
208 // (such as Node.js), expose a factory as module.exports.
209 // This accentuates the need for the creation of a real `window`.
210 // e.g. var jQuery = require("jquery")(window);
211 // See ticket #14549 for more info.
212 module.exports = global.document ?
213 factory( global, true ) :
214 function( w ) {
215 if ( !w.document ) {
216 throw new Error( "jQuery requires a window with a document" );
217 }
218 return factory( w );
219 };
220 } else {
221 factory( global );
222 }
223
224// Pass this if window is not defined yet
225} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
226
227// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1
228// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode
229// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common
230// enough that all such attempts are guarded in a try block.
231"use strict";
232
233var arr = [];
234
235var document = window.document;
236
237var getProto = Object.getPrototypeOf;
238
239var slice = arr.slice;
240
241var concat = arr.concat;
242
243var push = arr.push;
244
245var indexOf = arr.indexOf;
246
247var class2type = {};
248
249var toString = class2type.toString;
250
251var hasOwn = class2type.hasOwnProperty;
252
253var fnToString = hasOwn.toString;
254
255var ObjectFunctionString = fnToString.call( Object );
256
257var support = {};
258
259var isFunction = function isFunction( obj ) {
260
261 // Support: Chrome <=57, Firefox <=52
262 // In some browsers, typeof returns "function" for HTML <object> elements
263 // (i.e., `typeof document.createElement( "object" ) === "function"`).
264 // We don't want to classify *any* DOM node as a function.
265 return typeof obj === "function" && typeof obj.nodeType !== "number";
266 };
267
268
269var isWindow = function isWindow( obj ) {
270 return obj != null && obj === obj.window;
271 };
272
273
274
275
276 var preservedScriptAttributes = {
277 type: true,
278 src: true,
279 noModule: true
280 };
281
282 function DOMEval( code, doc, node ) {
283 doc = doc || document;
284
285 var i,
286 script = doc.createElement( "script" );
287
288 script.text = code;
289 if ( node ) {
290 for ( i in preservedScriptAttributes ) {
291 if ( node[ i ] ) {
292 script[ i ] = node[ i ];
293 }
294 }
295 }
296 doc.head.appendChild( script ).parentNode.removeChild( script );
297 }
298
299
300function toType( obj ) {
301 if ( obj == null ) {
302 return obj + "";
303 }
304
305 // Support: Android <=2.3 only (functionish RegExp)
306 return typeof obj === "object" || typeof obj === "function" ?
307 class2type[ toString.call( obj ) ] || "object" :
308 typeof obj;
309}
310/* global Symbol */
311// Defining this global in .eslintrc.json would create a danger of using the global
312// unguarded in another place, it seems safer to define global only for this module
313
314
315
316var
317 version = "3.3.1",
318
319 // Define a local copy of jQuery
320 jQuery = function( selector, context ) {
321
322 // The jQuery object is actually just the init constructor 'enhanced'
323 // Need init if jQuery is called (just allow error to be thrown if not included)
324 return new jQuery.fn.init( selector, context );
325 },
326
327 // Support: Android <=4.0 only
328 // Make sure we trim BOM and NBSP
329 rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
330
331jQuery.fn = jQuery.prototype = {
332
333 // The current version of jQuery being used
334 jquery: version,
335
336 constructor: jQuery,
337
338 // The default length of a jQuery object is 0
339 length: 0,
340
341 toArray: function() {
342 return slice.call( this );
343 },
344
345 // Get the Nth element in the matched element set OR
346 // Get the whole matched element set as a clean array
347 get: function( num ) {
348
349 // Return all the elements in a clean array
350 if ( num == null ) {
351 return slice.call( this );
352 }
353
354 // Return just the one element from the set
355 return num < 0 ? this[ num + this.length ] : this[ num ];
356 },
357
358 // Take an array of elements and push it onto the stack
359 // (returning the new matched element set)
360 pushStack: function( elems ) {
361
362 // Build a new jQuery matched element set
363 var ret = jQuery.merge( this.constructor(), elems );
364
365 // Add the old object onto the stack (as a reference)
366 ret.prevObject = this;
367
368 // Return the newly-formed element set
369 return ret;
370 },
371
372 // Execute a callback for every element in the matched set.
373 each: function( callback ) {
374 return jQuery.each( this, callback );
375 },
376
377 map: function( callback ) {
378 return this.pushStack( jQuery.map( this, function( elem, i ) {
379 return callback.call( elem, i, elem );
380 } ) );
381 },
382
383 slice: function() {
384 return this.pushStack( slice.apply( this, arguments ) );
385 },
386
387 first: function() {
388 return this.eq( 0 );
389 },
390
391 last: function() {
392 return this.eq( -1 );
393 },
394
395 eq: function( i ) {
396 var len = this.length,
397 j = +i + ( i < 0 ? len : 0 );
398 return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
399 },
400
401 end: function() {
402 return this.prevObject || this.constructor();
403 },
404
405 // For internal use only.
406 // Behaves like an Array's method, not like a jQuery method.
407 push: push,
408 sort: arr.sort,
409 splice: arr.splice
410};
411
412jQuery.extend = jQuery.fn.extend = function() {
413 var options, name, src, copy, copyIsArray, clone,
414 target = arguments[ 0 ] || {},
415 i = 1,
416 length = arguments.length,
417 deep = false;
418
419 // Handle a deep copy situation
420 if ( typeof target === "boolean" ) {
421 deep = target;
422
423 // Skip the boolean and the target
424 target = arguments[ i ] || {};
425 i++;
426 }
427
428 // Handle case when target is a string or something (possible in deep copy)
429 if ( typeof target !== "object" && !isFunction( target ) ) {
430 target = {};
431 }
432
433 // Extend jQuery itself if only one argument is passed
434 if ( i === length ) {
435 target = this;
436 i--;
437 }
438
439 for ( ; i < length; i++ ) {
440
441 // Only deal with non-null/undefined values
442 if ( ( options = arguments[ i ] ) != null ) {
443
444 // Extend the base object
445 for ( name in options ) {
446 src = target[ name ];
447 copy = options[ name ];
448
449 // Prevent never-ending loop
450 if ( target === copy ) {
451 continue;
452 }
453
454 // Recurse if we're merging plain objects or arrays
455 if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
456 ( copyIsArray = Array.isArray( copy ) ) ) ) {
457
458 if ( copyIsArray ) {
459 copyIsArray = false;
460 clone = src && Array.isArray( src ) ? src : [];
461
462 } else {
463 clone = src && jQuery.isPlainObject( src ) ? src : {};
464 }
465
466 // Never move original objects, clone them
467 target[ name ] = jQuery.extend( deep, clone, copy );
468
469 // Don't bring in undefined values
470 } else if ( copy !== undefined ) {
471 target[ name ] = copy;
472 }
473 }
474 }
475 }
476
477 // Return the modified object
478 return target;
479};
480
481jQuery.extend( {
482
483 // Unique for each copy of jQuery on the page
484 expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
485
486 // Assume jQuery is ready without the ready module
487 isReady: true,
488
489 error: function( msg ) {
490 throw new Error( msg );
491 },
492
493 noop: function() {},
494
495 isPlainObject: function( obj ) {
496 var proto, Ctor;
497
498 // Detect obvious negatives
499 // Use toString instead of jQuery.type to catch host objects
500 if ( !obj || toString.call( obj ) !== "[object Object]" ) {
501 return false;
502 }
503
504 proto = getProto( obj );
505
506 // Objects with no prototype (e.g., `Object.create( null )`) are plain
507 if ( !proto ) {
508 return true;
509 }
510
511 // Objects with prototype are plain iff they were constructed by a global Object function
512 Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;
513 return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString;
514 },
515
516 isEmptyObject: function( obj ) {
517
518 /* eslint-disable no-unused-vars */
519 // See https://github.com/eslint/eslint/issues/6125
520 var name;
521
522 for ( name in obj ) {
523 return false;
524 }
525 return true;
526 },
527
528 // Evaluates a script in a global context
529 globalEval: function( code ) {
530 DOMEval( code );
531 },
532
533 each: function( obj, callback ) {
534 var length, i = 0;
535
536 if ( isArrayLike( obj ) ) {
537 length = obj.length;
538 for ( ; i < length; i++ ) {
539 if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
540 break;
541 }
542 }
543 } else {
544 for ( i in obj ) {
545 if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
546 break;
547 }
548 }
549 }
550
551 return obj;
552 },
553
554 // Support: Android <=4.0 only
555 trim: function( text ) {
556 return text == null ?
557 "" :
558 ( text + "" ).replace( rtrim, "" );
559 },
560
561 // results is for internal usage only
562 makeArray: function( arr, results ) {
563 var ret = results || [];
564
565 if ( arr != null ) {
566 if ( isArrayLike( Object( arr ) ) ) {
567 jQuery.merge( ret,
568 typeof arr === "string" ?
569 [ arr ] : arr
570 );
571 } else {
572 push.call( ret, arr );
573 }
574 }
575
576 return ret;
577 },
578
579 inArray: function( elem, arr, i ) {
580 return arr == null ? -1 : indexOf.call( arr, elem, i );
581 },
582
583 // Support: Android <=4.0 only, PhantomJS 1 only
584 // push.apply(_, arraylike) throws on ancient WebKit
585 merge: function( first, second ) {
586 var len = +second.length,
587 j = 0,
588 i = first.length;
589
590 for ( ; j < len; j++ ) {
591 first[ i++ ] = second[ j ];
592 }
593
594 first.length = i;
595
596 return first;
597 },
598
599 grep: function( elems, callback, invert ) {
600 var callbackInverse,
601 matches = [],
602 i = 0,
603 length = elems.length,
604 callbackExpect = !invert;
605
606 // Go through the array, only saving the items
607 // that pass the validator function
608 for ( ; i < length; i++ ) {
609 callbackInverse = !callback( elems[ i ], i );
610 if ( callbackInverse !== callbackExpect ) {
611 matches.push( elems[ i ] );
612 }
613 }
614
615 return matches;
616 },
617
618 // arg is for internal usage only
619 map: function( elems, callback, arg ) {
620 var length, value,
621 i = 0,
622 ret = [];
623
624 // Go through the array, translating each of the items to their new values
625 if ( isArrayLike( elems ) ) {
626 length = elems.length;
627 for ( ; i < length; i++ ) {
628 value = callback( elems[ i ], i, arg );
629
630 if ( value != null ) {
631 ret.push( value );
632 }
633 }
634
635 // Go through every key on the object,
636 } else {
637 for ( i in elems ) {
638 value = callback( elems[ i ], i, arg );
639
640 if ( value != null ) {
641 ret.push( value );
642 }
643 }
644 }
645
646 // Flatten any nested arrays
647 return concat.apply( [], ret );
648 },
649
650 // A global GUID counter for objects
651 guid: 1,
652
653 // jQuery.support is not used in Core but other projects attach their
654 // properties to it so it needs to exist.
655 support: support
656} );
657
658if ( typeof Symbol === "function" ) {
659 jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
660}
661
662// Populate the class2type map
663jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
664function( i, name ) {
665 class2type[ "[object " + name + "]" ] = name.toLowerCase();
666} );
667
668function isArrayLike( obj ) {
669
670 // Support: real iOS 8.2 only (not reproducible in simulator)
671 // `in` check used to prevent JIT error (gh-2145)
672 // hasOwn isn't used here due to false negatives
673 // regarding Nodelist length in IE
674 var length = !!obj && "length" in obj && obj.length,
675 type = toType( obj );
676
677 if ( isFunction( obj ) || isWindow( obj ) ) {
678 return false;
679 }
680
681 return type === "array" || length === 0 ||
682 typeof length === "number" && length > 0 && ( length - 1 ) in obj;
683}
684var Sizzle =
685/*!
686 * Sizzle CSS Selector Engine v2.3.3
687 * https://sizzlejs.com/
688 *
689 * Copyright jQuery Foundation and other contributors
690 * Released under the MIT license
691 * http://jquery.org/license
692 *
693 * Date: 2016-08-08
694 */
695(function( window ) {
696
697var i,
698 support,
699 Expr,
700 getText,
701 isXML,
702 tokenize,
703 compile,
704 select,
705 outermostContext,
706 sortInput,
707 hasDuplicate,
708
709 // Local document vars
710 setDocument,
711 document,
712 docElem,
713 documentIsHTML,
714 rbuggyQSA,
715 rbuggyMatches,
716 matches,
717 contains,
718
719 // Instance-specific data
720 expando = "sizzle" + 1 * new Date(),
721 preferredDoc = window.document,
722 dirruns = 0,
723 done = 0,
724 classCache = createCache(),
725 tokenCache = createCache(),
726 compilerCache = createCache(),
727 sortOrder = function( a, b ) {
728 if ( a === b ) {
729 hasDuplicate = true;
730 }
731 return 0;
732 },
733
734 // Instance methods
735 hasOwn = ({}).hasOwnProperty,
736 arr = [],
737 pop = arr.pop,
738 push_native = arr.push,
739 push = arr.push,
740 slice = arr.slice,
741 // Use a stripped-down indexOf as it's faster than native
742 // https://jsperf.com/thor-indexof-vs-for/5
743 indexOf = function( list, elem ) {
744 var i = 0,
745 len = list.length;
746 for ( ; i < len; i++ ) {
747 if ( list[i] === elem ) {
748 return i;
749 }
750 }
751 return -1;
752 },
753
754 booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
755
756 // Regular expressions
757
758 // http://www.w3.org/TR/css3-selectors/#whitespace
759 whitespace = "[\\x20\\t\\r\\n\\f]",
760
761 // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
762 identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+",
763
764 // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
765 attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
766 // Operator (capture 2)
767 "*([*^$|!~]?=)" + whitespace +
768 // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
769 "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
770 "*\\]",
771
772 pseudos = ":(" + identifier + ")(?:\\((" +
773 // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
774 // 1. quoted (capture 3; capture 4 or capture 5)
775 "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
776 // 2. simple (capture 6)
777 "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
778 // 3. anything else (capture 2)
779 ".*" +
780 ")\\)|)",
781
782 // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
783 rwhitespace = new RegExp( whitespace + "+", "g" ),
784 rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
785
786 rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
787 rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
788
789 rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
790
791 rpseudo = new RegExp( pseudos ),
792 ridentifier = new RegExp( "^" + identifier + "$" ),
793
794 matchExpr = {
795 "ID": new RegExp( "^#(" + identifier + ")" ),
796 "CLASS": new RegExp( "^\\.(" + identifier + ")" ),
797 "TAG": new RegExp( "^(" + identifier + "|[*])" ),
798 "ATTR": new RegExp( "^" + attributes ),
799 "PSEUDO": new RegExp( "^" + pseudos ),
800 "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
801 "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
802 "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
803 "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
804 // For use in libraries implementing .is()
805 // We use this for POS matching in `select`
806 "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
807 whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
808 },
809
810 rinputs = /^(?:input|select|textarea|button)$/i,
811 rheader = /^h\d$/i,
812
813 rnative = /^[^{]+\{\s*\[native \w/,
814
815 // Easily-parseable/retrievable ID or TAG or CLASS selectors
816 rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
817
818 rsibling = /[+~]/,
819
820 // CSS escapes
821 // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
822 runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
823 funescape = function( _, escaped, escapedWhitespace ) {
824 var high = "0x" + escaped - 0x10000;
825 // NaN means non-codepoint
826 // Support: Firefox<24
827 // Workaround erroneous numeric interpretation of +"0x"
828 return high !== high || escapedWhitespace ?
829 escaped :
830 high < 0 ?
831 // BMP codepoint
832 String.fromCharCode( high + 0x10000 ) :
833 // Supplemental Plane codepoint (surrogate pair)
834 String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
835 },
836
837 // CSS string/identifier serialization
838 // https://drafts.csswg.org/cssom/#common-serializing-idioms
839 rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
840 fcssescape = function( ch, asCodePoint ) {
841 if ( asCodePoint ) {
842
843 // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
844 if ( ch === "\0" ) {
845 return "\uFFFD";
846 }
847
848 // Control characters and (dependent upon position) numbers get escaped as code points
849 return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
850 }
851
852 // Other potentially-special ASCII characters get backslash-escaped
853 return "\\" + ch;
854 },
855
856 // Used for iframes
857 // See setDocument()
858 // Removing the function wrapper causes a "Permission Denied"
859 // error in IE
860 unloadHandler = function() {
861 setDocument();
862 },
863
864 disabledAncestor = addCombinator(
865 function( elem ) {
866 return elem.disabled === true && ("form" in elem || "label" in elem);
867 },
868 { dir: "parentNode", next: "legend" }
869 );
870
871// Optimize for push.apply( _, NodeList )
872try {
873 push.apply(
874 (arr = slice.call( preferredDoc.childNodes )),
875 preferredDoc.childNodes
876 );
877 // Support: Android<4.0
878 // Detect silently failing push.apply
879 arr[ preferredDoc.childNodes.length ].nodeType;
880} catch ( e ) {
881 push = { apply: arr.length ?
882
883 // Leverage slice if possible
884 function( target, els ) {
885 push_native.apply( target, slice.call(els) );
886 } :
887
888 // Support: IE<9
889 // Otherwise append directly
890 function( target, els ) {
891 var j = target.length,
892 i = 0;
893 // Can't trust NodeList.length
894 while ( (target[j++] = els[i++]) ) {}
895 target.length = j - 1;
896 }
897 };
898}
899
900function Sizzle( selector, context, results, seed ) {
901 var m, i, elem, nid, match, groups, newSelector,
902 newContext = context && context.ownerDocument,
903
904 // nodeType defaults to 9, since context defaults to document
905 nodeType = context ? context.nodeType : 9;
906
907 results = results || [];
908
909 // Return early from calls with invalid selector or context
910 if ( typeof selector !== "string" || !selector ||
911 nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
912
913 return results;
914 }
915
916 // Try to shortcut find operations (as opposed to filters) in HTML documents
917 if ( !seed ) {
918
919 if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
920 setDocument( context );
921 }
922 context = context || document;
923
924 if ( documentIsHTML ) {
925
926 // If the selector is sufficiently simple, try using a "get*By*" DOM method
927 // (excepting DocumentFragment context, where the methods don't exist)
928 if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
929
930 // ID selector
931 if ( (m = match[1]) ) {
932
933 // Document context
934 if ( nodeType === 9 ) {
935 if ( (elem = context.getElementById( m )) ) {
936
937 // Support: IE, Opera, Webkit
938 // TODO: identify versions
939 // getElementById can match elements by name instead of ID
940 if ( elem.id === m ) {
941 results.push( elem );
942 return results;
943 }
944 } else {
945 return results;
946 }
947
948 // Element context
949 } else {
950
951 // Support: IE, Opera, Webkit
952 // TODO: identify versions
953 // getElementById can match elements by name instead of ID
954 if ( newContext && (elem = newContext.getElementById( m )) &&
955 contains( context, elem ) &&
956 elem.id === m ) {
957
958 results.push( elem );
959 return results;
960 }
961 }
962
963 // Type selector
964 } else if ( match[2] ) {
965 push.apply( results, context.getElementsByTagName( selector ) );
966 return results;
967
968 // Class selector
969 } else if ( (m = match[3]) && support.getElementsByClassName &&
970 context.getElementsByClassName ) {
971
972 push.apply( results, context.getElementsByClassName( m ) );
973 return results;
974 }
975 }
976
977 // Take advantage of querySelectorAll
978 if ( support.qsa &&
979 !compilerCache[ selector + " " ] &&
980 (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
981
982 if ( nodeType !== 1 ) {
983 newContext = context;
984 newSelector = selector;
985
986 // qSA looks outside Element context, which is not what we want
987 // Thanks to Andrew Dupont for this workaround technique
988 // Support: IE <=8
989 // Exclude object elements
990 } else if ( context.nodeName.toLowerCase() !== "object" ) {
991
992 // Capture the context ID, setting it first if necessary
993 if ( (nid = context.getAttribute( "id" )) ) {
994 nid = nid.replace( rcssescape, fcssescape );
995 } else {
996 context.setAttribute( "id", (nid = expando) );
997 }
998
999 // Prefix every selector in the list
1000 groups = tokenize( selector );
1001 i = groups.length;
1002 while ( i-- ) {
1003 groups[i] = "#" + nid + " " + toSelector( groups[i] );
1004 }
1005 newSelector = groups.join( "," );
1006
1007 // Expand context for sibling selectors
1008 newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
1009 context;
1010 }
1011
1012 if ( newSelector ) {
1013 try {
1014 push.apply( results,
1015 newContext.querySelectorAll( newSelector )
1016 );
1017 return results;
1018 } catch ( qsaError ) {
1019 } finally {
1020 if ( nid === expando ) {
1021 context.removeAttribute( "id" );
1022 }
1023 }
1024 }
1025 }
1026 }
1027 }
1028
1029 // All others
1030 return select( selector.replace( rtrim, "$1" ), context, results, seed );
1031}
1032
1033/**
1034 * Create key-value caches of limited size
1035 * @returns {function(string, object)} Returns the Object data after storing it on itself with
1036 * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
1037 * deleting the oldest entry
1038 */
1039function createCache() {
1040 var keys = [];
1041
1042 function cache( key, value ) {
1043 // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
1044 if ( keys.push( key + " " ) > Expr.cacheLength ) {
1045 // Only keep the most recent entries
1046 delete cache[ keys.shift() ];
1047 }
1048 return (cache[ key + " " ] = value);
1049 }
1050 return cache;
1051}
1052
1053/**
1054 * Mark a function for special use by Sizzle
1055 * @param {Function} fn The function to mark
1056 */
1057function markFunction( fn ) {
1058 fn[ expando ] = true;
1059 return fn;
1060}
1061
1062/**
1063 * Support testing using an element
1064 * @param {Function} fn Passed the created element and returns a boolean result
1065 */
1066function assert( fn ) {
1067 var el = document.createElement("fieldset");
1068
1069 try {
1070 return !!fn( el );
1071 } catch (e) {
1072 return false;
1073 } finally {
1074 // Remove from its parent by default
1075 if ( el.parentNode ) {
1076 el.parentNode.removeChild( el );
1077 }
1078 // release memory in IE
1079 el = null;
1080 }
1081}
1082
1083/**
1084 * Adds the same handler for all of the specified attrs
1085 * @param {String} attrs Pipe-separated list of attributes
1086 * @param {Function} handler The method that will be applied
1087 */
1088function addHandle( attrs, handler ) {
1089 var arr = attrs.split("|"),
1090 i = arr.length;
1091
1092 while ( i-- ) {
1093 Expr.attrHandle[ arr[i] ] = handler;
1094 }
1095}
1096
1097/**
1098 * Checks document order of two siblings
1099 * @param {Element} a
1100 * @param {Element} b
1101 * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
1102 */
1103function siblingCheck( a, b ) {
1104 var cur = b && a,
1105 diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
1106 a.sourceIndex - b.sourceIndex;
1107
1108 // Use IE sourceIndex if available on both nodes
1109 if ( diff ) {
1110 return diff;
1111 }
1112
1113 // Check if b follows a
1114 if ( cur ) {
1115 while ( (cur = cur.nextSibling) ) {
1116 if ( cur === b ) {
1117 return -1;
1118 }
1119 }
1120 }
1121
1122 return a ? 1 : -1;
1123}
1124
1125/**
1126 * Returns a function to use in pseudos for input types
1127 * @param {String} type
1128 */
1129function createInputPseudo( type ) {
1130 return function( elem ) {
1131 var name = elem.nodeName.toLowerCase();
1132 return name === "input" && elem.type === type;
1133 };
1134}
1135
1136/**
1137 * Returns a function to use in pseudos for buttons
1138 * @param {String} type
1139 */
1140function createButtonPseudo( type ) {
1141 return function( elem ) {
1142 var name = elem.nodeName.toLowerCase();
1143 return (name === "input" || name === "button") && elem.type === type;
1144 };
1145}
1146
1147/**
1148 * Returns a function to use in pseudos for :enabled/:disabled
1149 * @param {Boolean} disabled true for :disabled; false for :enabled
1150 */
1151function createDisabledPseudo( disabled ) {
1152
1153 // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
1154 return function( elem ) {
1155
1156 // Only certain elements can match :enabled or :disabled
1157 // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled
1158 // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled
1159 if ( "form" in elem ) {
1160
1161 // Check for inherited disabledness on relevant non-disabled elements:
1162 // * listed form-associated elements in a disabled fieldset
1163 // https://html.spec.whatwg.org/multipage/forms.html#category-listed
1164 // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled
1165 // * option elements in a disabled optgroup
1166 // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled
1167 // All such elements have a "form" property.
1168 if ( elem.parentNode && elem.disabled === false ) {
1169
1170 // Option elements defer to a parent optgroup if present
1171 if ( "label" in elem ) {
1172 if ( "label" in elem.parentNode ) {
1173 return elem.parentNode.disabled === disabled;
1174 } else {
1175 return elem.disabled === disabled;
1176 }
1177 }
1178
1179 // Support: IE 6 - 11
1180 // Use the isDisabled shortcut property to check for disabled fieldset ancestors
1181 return elem.isDisabled === disabled ||
1182
1183 // Where there is no isDisabled, check manually
1184 /* jshint -W018 */
1185 elem.isDisabled !== !disabled &&
1186 disabledAncestor( elem ) === disabled;
1187 }
1188
1189 return elem.disabled === disabled;
1190
1191 // Try to winnow out elements that can't be disabled before trusting the disabled property.
1192 // Some victims get caught in our net (label, legend, menu, track), but it shouldn't
1193 // even exist on them, let alone have a boolean value.
1194 } else if ( "label" in elem ) {
1195 return elem.disabled === disabled;
1196 }
1197
1198 // Remaining elements are neither :enabled nor :disabled
1199 return false;
1200 };
1201}
1202
1203/**
1204 * Returns a function to use in pseudos for positionals
1205 * @param {Function} fn
1206 */
1207function createPositionalPseudo( fn ) {
1208 return markFunction(function( argument ) {
1209 argument = +argument;
1210 return markFunction(function( seed, matches ) {
1211 var j,
1212 matchIndexes = fn( [], seed.length, argument ),
1213 i = matchIndexes.length;
1214
1215 // Match elements found at the specified indexes
1216 while ( i-- ) {
1217 if ( seed[ (j = matchIndexes[i]) ] ) {
1218 seed[j] = !(matches[j] = seed[j]);
1219 }
1220 }
1221 });
1222 });
1223}
1224
1225/**
1226 * Checks a node for validity as a Sizzle context
1227 * @param {Element|Object=} context
1228 * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
1229 */
1230function testContext( context ) {
1231 return context && typeof context.getElementsByTagName !== "undefined" && context;
1232}
1233
1234// Expose support vars for convenience
1235support = Sizzle.support = {};
1236
1237/**
1238 * Detects XML nodes
1239 * @param {Element|Object} elem An element or a document
1240 * @returns {Boolean} True iff elem is a non-HTML XML node
1241 */
1242isXML = Sizzle.isXML = function( elem ) {
1243 // documentElement is verified for cases where it doesn't yet exist
1244 // (such as loading iframes in IE - #4833)
1245 var documentElement = elem && (elem.ownerDocument || elem).documentElement;
1246 return documentElement ? documentElement.nodeName !== "HTML" : false;
1247};
1248
1249/**
1250 * Sets document-related variables once based on the current document
1251 * @param {Element|Object} [doc] An element or document object to use to set the document
1252 * @returns {Object} Returns the current document
1253 */
1254setDocument = Sizzle.setDocument = function( node ) {
1255 var hasCompare, subWindow,
1256 doc = node ? node.ownerDocument || node : preferredDoc;
1257
1258 // Return early if doc is invalid or already selected
1259 if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
1260 return document;
1261 }
1262
1263 // Update global variables
1264 document = doc;
1265 docElem = document.documentElement;
1266 documentIsHTML = !isXML( document );
1267
1268 // Support: IE 9-11, Edge
1269 // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
1270 if ( preferredDoc !== document &&
1271 (subWindow = document.defaultView) && subWindow.top !== subWindow ) {
1272
1273 // Support: IE 11, Edge
1274 if ( subWindow.addEventListener ) {
1275 subWindow.addEventListener( "unload", unloadHandler, false );
1276
1277 // Support: IE 9 - 10 only
1278 } else if ( subWindow.attachEvent ) {
1279 subWindow.attachEvent( "onunload", unloadHandler );
1280 }
1281 }
1282
1283 /* Attributes
1284 ---------------------------------------------------------------------- */
1285
1286 // Support: IE<8
1287 // Verify that getAttribute really returns attributes and not properties
1288 // (excepting IE8 booleans)
1289 support.attributes = assert(function( el ) {
1290 el.className = "i";
1291 return !el.getAttribute("className");
1292 });
1293
1294 /* getElement(s)By*
1295 ---------------------------------------------------------------------- */
1296
1297 // Check if getElementsByTagName("*") returns only elements
1298 support.getElementsByTagName = assert(function( el ) {
1299 el.appendChild( document.createComment("") );
1300 return !el.getElementsByTagName("*").length;
1301 });
1302
1303 // Support: IE<9
1304 support.getElementsByClassName = rnative.test( document.getElementsByClassName );
1305
1306 // Support: IE<10
1307 // Check if getElementById returns elements by name
1308 // The broken getElementById methods don't pick up programmatically-set names,
1309 // so use a roundabout getElementsByName test
1310 support.getById = assert(function( el ) {
1311 docElem.appendChild( el ).id = expando;
1312 return !document.getElementsByName || !document.getElementsByName( expando ).length;
1313 });
1314
1315 // ID filter and find
1316 if ( support.getById ) {
1317 Expr.filter["ID"] = function( id ) {
1318 var attrId = id.replace( runescape, funescape );
1319 return function( elem ) {
1320 return elem.getAttribute("id") === attrId;
1321 };
1322 };
1323 Expr.find["ID"] = function( id, context ) {
1324 if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
1325 var elem = context.getElementById( id );
1326 return elem ? [ elem ] : [];
1327 }
1328 };
1329 } else {
1330 Expr.filter["ID"] = function( id ) {
1331 var attrId = id.replace( runescape, funescape );
1332 return function( elem ) {
1333 var node = typeof elem.getAttributeNode !== "undefined" &&
1334 elem.getAttributeNode("id");
1335 return node && node.value === attrId;
1336 };
1337 };
1338
1339 // Support: IE 6 - 7 only
1340 // getElementById is not reliable as a find shortcut
1341 Expr.find["ID"] = function( id, context ) {
1342 if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
1343 var node, i, elems,
1344 elem = context.getElementById( id );
1345
1346 if ( elem ) {
1347
1348 // Verify the id attribute
1349 node = elem.getAttributeNode("id");
1350 if ( node && node.value === id ) {
1351 return [ elem ];
1352 }
1353
1354 // Fall back on getElementsByName
1355 elems = context.getElementsByName( id );
1356 i = 0;
1357 while ( (elem = elems[i++]) ) {
1358 node = elem.getAttributeNode("id");
1359 if ( node && node.value === id ) {
1360 return [ elem ];
1361 }
1362 }
1363 }
1364
1365 return [];
1366 }
1367 };
1368 }
1369
1370 // Tag
1371 Expr.find["TAG"] = support.getElementsByTagName ?
1372 function( tag, context ) {
1373 if ( typeof context.getElementsByTagName !== "undefined" ) {
1374 return context.getElementsByTagName( tag );
1375
1376 // DocumentFragment nodes don't have gEBTN
1377 } else if ( support.qsa ) {
1378 return context.querySelectorAll( tag );
1379 }
1380 } :
1381
1382 function( tag, context ) {
1383 var elem,
1384 tmp = [],
1385 i = 0,
1386 // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
1387 results = context.getElementsByTagName( tag );
1388
1389 // Filter out possible comments
1390 if ( tag === "*" ) {
1391 while ( (elem = results[i++]) ) {
1392 if ( elem.nodeType === 1 ) {
1393 tmp.push( elem );
1394 }
1395 }
1396
1397 return tmp;
1398 }
1399 return results;
1400 };
1401
1402 // Class
1403 Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
1404 if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
1405 return context.getElementsByClassName( className );
1406 }
1407 };
1408
1409 /* QSA/matchesSelector
1410 ---------------------------------------------------------------------- */
1411
1412 // QSA and matchesSelector support
1413
1414 // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
1415 rbuggyMatches = [];
1416
1417 // qSa(:focus) reports false when true (Chrome 21)
1418 // We allow this because of a bug in IE8/9 that throws an error
1419 // whenever `document.activeElement` is accessed on an iframe
1420 // So, we allow :focus to pass through QSA all the time to avoid the IE error
1421 // See https://bugs.jquery.com/ticket/13378
1422 rbuggyQSA = [];
1423
1424 if ( (support.qsa = rnative.test( document.querySelectorAll )) ) {
1425 // Build QSA regex
1426 // Regex strategy adopted from Diego Perini
1427 assert(function( el ) {
1428 // Select is set to empty string on purpose
1429 // This is to test IE's treatment of not explicitly
1430 // setting a boolean content attribute,
1431 // since its presence should be enough
1432 // https://bugs.jquery.com/ticket/12359
1433 docElem.appendChild( el ).innerHTML = "<a id='" + expando + "'></a>" +
1434 "<select id='" + expando + "-\r\\' msallowcapture=''>" +
1435 "<option selected=''></option></select>";
1436
1437 // Support: IE8, Opera 11-12.16
1438 // Nothing should be selected when empty strings follow ^= or $= or *=
1439 // The test attribute must be unknown in Opera but "safe" for WinRT
1440 // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
1441 if ( el.querySelectorAll("[msallowcapture^='']").length ) {
1442 rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
1443 }
1444
1445 // Support: IE8
1446 // Boolean attributes and "value" are not treated correctly
1447 if ( !el.querySelectorAll("[selected]").length ) {
1448 rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
1449 }
1450
1451 // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
1452 if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
1453 rbuggyQSA.push("~=");
1454 }
1455
1456 // Webkit/Opera - :checked should return selected option elements
1457 // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
1458 // IE8 throws error here and will not see later tests
1459 if ( !el.querySelectorAll(":checked").length ) {
1460 rbuggyQSA.push(":checked");
1461 }
1462
1463 // Support: Safari 8+, iOS 8+
1464 // https://bugs.webkit.org/show_bug.cgi?id=136851
1465 // In-page `selector#id sibling-combinator selector` fails
1466 if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
1467 rbuggyQSA.push(".#.+[+~]");
1468 }
1469 });
1470
1471 assert(function( el ) {
1472 el.innerHTML = "<a href='' disabled='disabled'></a>" +
1473 "<select disabled='disabled'><option/></select>";
1474
1475 // Support: Windows 8 Native Apps
1476 // The type and name attributes are restricted during .innerHTML assignment
1477 var input = document.createElement("input");
1478 input.setAttribute( "type", "hidden" );
1479 el.appendChild( input ).setAttribute( "name", "D" );
1480
1481 // Support: IE8
1482 // Enforce case-sensitivity of name attribute
1483 if ( el.querySelectorAll("[name=d]").length ) {
1484 rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
1485 }
1486
1487 // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
1488 // IE8 throws error here and will not see later tests
1489 if ( el.querySelectorAll(":enabled").length !== 2 ) {
1490 rbuggyQSA.push( ":enabled", ":disabled" );
1491 }
1492
1493 // Support: IE9-11+
1494 // IE's :disabled selector does not pick up the children of disabled fieldsets
1495 docElem.appendChild( el ).disabled = true;
1496 if ( el.querySelectorAll(":disabled").length !== 2 ) {
1497 rbuggyQSA.push( ":enabled", ":disabled" );
1498 }
1499
1500 // Opera 10-11 does not throw on post-comma invalid pseudos
1501 el.querySelectorAll("*,:x");
1502 rbuggyQSA.push(",.*:");
1503 });
1504 }
1505
1506 if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
1507 docElem.webkitMatchesSelector ||
1508 docElem.mozMatchesSelector ||
1509 docElem.oMatchesSelector ||
1510 docElem.msMatchesSelector) )) ) {
1511
1512 assert(function( el ) {
1513 // Check to see if it's possible to do matchesSelector
1514 // on a disconnected node (IE 9)
1515 support.disconnectedMatch = matches.call( el, "*" );
1516
1517 // This should fail with an exception
1518 // Gecko does not error, returns false instead
1519 matches.call( el, "[s!='']:x" );
1520 rbuggyMatches.push( "!=", pseudos );
1521 });
1522 }
1523
1524 rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
1525 rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
1526
1527 /* Contains
1528 ---------------------------------------------------------------------- */
1529 hasCompare = rnative.test( docElem.compareDocumentPosition );
1530
1531 // Element contains another
1532 // Purposefully self-exclusive
1533 // As in, an element does not contain itself
1534 contains = hasCompare || rnative.test( docElem.contains ) ?
1535 function( a, b ) {
1536 var adown = a.nodeType === 9 ? a.documentElement : a,
1537 bup = b && b.parentNode;
1538 return a === bup || !!( bup && bup.nodeType === 1 && (
1539 adown.contains ?
1540 adown.contains( bup ) :
1541 a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
1542 ));
1543 } :
1544 function( a, b ) {
1545 if ( b ) {
1546 while ( (b = b.parentNode) ) {
1547 if ( b === a ) {
1548 return true;
1549 }
1550 }
1551 }
1552 return false;
1553 };
1554
1555 /* Sorting
1556 ---------------------------------------------------------------------- */
1557
1558 // Document order sorting
1559 sortOrder = hasCompare ?
1560 function( a, b ) {
1561
1562 // Flag for duplicate removal
1563 if ( a === b ) {
1564 hasDuplicate = true;
1565 return 0;
1566 }
1567
1568 // Sort on method existence if only one input has compareDocumentPosition
1569 var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
1570 if ( compare ) {
1571 return compare;
1572 }
1573
1574 // Calculate position if both inputs belong to the same document
1575 compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
1576 a.compareDocumentPosition( b ) :
1577
1578 // Otherwise we know they are disconnected
1579 1;
1580
1581 // Disconnected nodes
1582 if ( compare & 1 ||
1583 (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
1584
1585 // Choose the first element that is related to our preferred document
1586 if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
1587 return -1;
1588 }
1589 if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
1590 return 1;
1591 }
1592
1593 // Maintain original order
1594 return sortInput ?
1595 ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
1596 0;
1597 }
1598
1599 return compare & 4 ? -1 : 1;
1600 } :
1601 function( a, b ) {
1602 // Exit early if the nodes are identical
1603 if ( a === b ) {
1604 hasDuplicate = true;
1605 return 0;
1606 }
1607
1608 var cur,
1609 i = 0,
1610 aup = a.parentNode,
1611 bup = b.parentNode,
1612 ap = [ a ],
1613 bp = [ b ];
1614
1615 // Parentless nodes are either documents or disconnected
1616 if ( !aup || !bup ) {
1617 return a === document ? -1 :
1618 b === document ? 1 :
1619 aup ? -1 :
1620 bup ? 1 :
1621 sortInput ?
1622 ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
1623 0;
1624
1625 // If the nodes are siblings, we can do a quick check
1626 } else if ( aup === bup ) {
1627 return siblingCheck( a, b );
1628 }
1629
1630 // Otherwise we need full lists of their ancestors for comparison
1631 cur = a;
1632 while ( (cur = cur.parentNode) ) {
1633 ap.unshift( cur );
1634 }
1635 cur = b;
1636 while ( (cur = cur.parentNode) ) {
1637 bp.unshift( cur );
1638 }
1639
1640 // Walk down the tree looking for a discrepancy
1641 while ( ap[i] === bp[i] ) {
1642 i++;
1643 }
1644
1645 return i ?
1646 // Do a sibling check if the nodes have a common ancestor
1647 siblingCheck( ap[i], bp[i] ) :
1648
1649 // Otherwise nodes in our document sort first
1650 ap[i] === preferredDoc ? -1 :
1651 bp[i] === preferredDoc ? 1 :
1652 0;
1653 };
1654
1655 return document;
1656};
1657
1658Sizzle.matches = function( expr, elements ) {
1659 return Sizzle( expr, null, null, elements );
1660};
1661
1662Sizzle.matchesSelector = function( elem, expr ) {
1663 // Set document vars if needed
1664 if ( ( elem.ownerDocument || elem ) !== document ) {
1665 setDocument( elem );
1666 }
1667
1668 // Make sure that attribute selectors are quoted
1669 expr = expr.replace( rattributeQuotes, "='$1']" );
1670
1671 if ( support.matchesSelector && documentIsHTML &&
1672 !compilerCache[ expr + " " ] &&
1673 ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
1674 ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
1675
1676 try {
1677 var ret = matches.call( elem, expr );
1678
1679 // IE 9's matchesSelector returns false on disconnected nodes
1680 if ( ret || support.disconnectedMatch ||
1681 // As well, disconnected nodes are said to be in a document
1682 // fragment in IE 9
1683 elem.document && elem.document.nodeType !== 11 ) {
1684 return ret;
1685 }
1686 } catch (e) {}
1687 }
1688
1689 return Sizzle( expr, document, null, [ elem ] ).length > 0;
1690};
1691
1692Sizzle.contains = function( context, elem ) {
1693 // Set document vars if needed
1694 if ( ( context.ownerDocument || context ) !== document ) {
1695 setDocument( context );
1696 }
1697 return contains( context, elem );
1698};
1699
1700Sizzle.attr = function( elem, name ) {
1701 // Set document vars if needed
1702 if ( ( elem.ownerDocument || elem ) !== document ) {
1703 setDocument( elem );
1704 }
1705
1706 var fn = Expr.attrHandle[ name.toLowerCase() ],
1707 // Don't get fooled by Object.prototype properties (jQuery #13807)
1708 val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
1709 fn( elem, name, !documentIsHTML ) :
1710 undefined;
1711
1712 return val !== undefined ?
1713 val :
1714 support.attributes || !documentIsHTML ?
1715 elem.getAttribute( name ) :
1716 (val = elem.getAttributeNode(name)) && val.specified ?
1717 val.value :
1718 null;
1719};
1720
1721Sizzle.escape = function( sel ) {
1722 return (sel + "").replace( rcssescape, fcssescape );
1723};
1724
1725Sizzle.error = function( msg ) {
1726 throw new Error( "Syntax error, unrecognized expression: " + msg );
1727};
1728
1729/**
1730 * Document sorting and removing duplicates
1731 * @param {ArrayLike} results
1732 */
1733Sizzle.uniqueSort = function( results ) {
1734 var elem,
1735 duplicates = [],
1736 j = 0,
1737 i = 0;
1738
1739 // Unless we *know* we can detect duplicates, assume their presence
1740 hasDuplicate = !support.detectDuplicates;
1741 sortInput = !support.sortStable && results.slice( 0 );
1742 results.sort( sortOrder );
1743
1744 if ( hasDuplicate ) {
1745 while ( (elem = results[i++]) ) {
1746 if ( elem === results[ i ] ) {
1747 j = duplicates.push( i );
1748 }
1749 }
1750 while ( j-- ) {
1751 results.splice( duplicates[ j ], 1 );
1752 }
1753 }
1754
1755 // Clear input after sorting to release objects
1756 // See https://github.com/jquery/sizzle/pull/225
1757 sortInput = null;
1758
1759 return results;
1760};
1761
1762/**
1763 * Utility function for retrieving the text value of an array of DOM nodes
1764 * @param {Array|Element} elem
1765 */
1766getText = Sizzle.getText = function( elem ) {
1767 var node,
1768 ret = "",
1769 i = 0,
1770 nodeType = elem.nodeType;
1771
1772 if ( !nodeType ) {
1773 // If no nodeType, this is expected to be an array
1774 while ( (node = elem[i++]) ) {
1775 // Do not traverse comment nodes
1776 ret += getText( node );
1777 }
1778 } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
1779 // Use textContent for elements
1780 // innerText usage removed for consistency of new lines (jQuery #11153)
1781 if ( typeof elem.textContent === "string" ) {
1782 return elem.textContent;
1783 } else {
1784 // Traverse its children
1785 for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
1786 ret += getText( elem );
1787 }
1788 }
1789 } else if ( nodeType === 3 || nodeType === 4 ) {
1790 return elem.nodeValue;
1791 }
1792 // Do not include comment or processing instruction nodes
1793
1794 return ret;
1795};
1796
1797Expr = Sizzle.selectors = {
1798
1799 // Can be adjusted by the user
1800 cacheLength: 50,
1801
1802 createPseudo: markFunction,
1803
1804 match: matchExpr,
1805
1806 attrHandle: {},
1807
1808 find: {},
1809
1810 relative: {
1811 ">": { dir: "parentNode", first: true },
1812 " ": { dir: "parentNode" },
1813 "+": { dir: "previousSibling", first: true },
1814 "~": { dir: "previousSibling" }
1815 },
1816
1817 preFilter: {
1818 "ATTR": function( match ) {
1819 match[1] = match[1].replace( runescape, funescape );
1820
1821 // Move the given value to match[3] whether quoted or unquoted
1822 match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
1823
1824 if ( match[2] === "~=" ) {
1825 match[3] = " " + match[3] + " ";
1826 }
1827
1828 return match.slice( 0, 4 );
1829 },
1830
1831 "CHILD": function( match ) {
1832 /* matches from matchExpr["CHILD"]
1833 1 type (only|nth|...)
1834 2 what (child|of-type)
1835 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
1836 4 xn-component of xn+y argument ([+-]?\d*n|)
1837 5 sign of xn-component
1838 6 x of xn-component
1839 7 sign of y-component
1840 8 y of y-component
1841 */
1842 match[1] = match[1].toLowerCase();
1843
1844 if ( match[1].slice( 0, 3 ) === "nth" ) {
1845 // nth-* requires argument
1846 if ( !match[3] ) {
1847 Sizzle.error( match[0] );
1848 }
1849
1850 // numeric x and y parameters for Expr.filter.CHILD
1851 // remember that false/true cast respectively to 0/1
1852 match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
1853 match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
1854
1855 // other types prohibit arguments
1856 } else if ( match[3] ) {
1857 Sizzle.error( match[0] );
1858 }
1859
1860 return match;
1861 },
1862
1863 "PSEUDO": function( match ) {
1864 var excess,
1865 unquoted = !match[6] && match[2];
1866
1867 if ( matchExpr["CHILD"].test( match[0] ) ) {
1868 return null;
1869 }
1870
1871 // Accept quoted arguments as-is
1872 if ( match[3] ) {
1873 match[2] = match[4] || match[5] || "";
1874
1875 // Strip excess characters from unquoted arguments
1876 } else if ( unquoted && rpseudo.test( unquoted ) &&
1877 // Get excess from tokenize (recursively)
1878 (excess = tokenize( unquoted, true )) &&
1879 // advance to the next closing parenthesis
1880 (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
1881
1882 // excess is a negative index
1883 match[0] = match[0].slice( 0, excess );
1884 match[2] = unquoted.slice( 0, excess );
1885 }
1886
1887 // Return only captures needed by the pseudo filter method (type and argument)
1888 return match.slice( 0, 3 );
1889 }
1890 },
1891
1892 filter: {
1893
1894 "TAG": function( nodeNameSelector ) {
1895 var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
1896 return nodeNameSelector === "*" ?
1897 function() { return true; } :
1898 function( elem ) {
1899 return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
1900 };
1901 },
1902
1903 "CLASS": function( className ) {
1904 var pattern = classCache[ className + " " ];
1905
1906 return pattern ||
1907 (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
1908 classCache( className, function( elem ) {
1909 return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
1910 });
1911 },
1912
1913 "ATTR": function( name, operator, check ) {
1914 return function( elem ) {
1915 var result = Sizzle.attr( elem, name );
1916
1917 if ( result == null ) {
1918 return operator === "!=";
1919 }
1920 if ( !operator ) {
1921 return true;
1922 }
1923
1924 result += "";
1925
1926 return operator === "=" ? result === check :
1927 operator === "!=" ? result !== check :
1928 operator === "^=" ? check && result.indexOf( check ) === 0 :
1929 operator === "*=" ? check && result.indexOf( check ) > -1 :
1930 operator === "$=" ? check && result.slice( -check.length ) === check :
1931 operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
1932 operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
1933 false;
1934 };
1935 },
1936
1937 "CHILD": function( type, what, argument, first, last ) {
1938 var simple = type.slice( 0, 3 ) !== "nth",
1939 forward = type.slice( -4 ) !== "last",
1940 ofType = what === "of-type";
1941
1942 return first === 1 && last === 0 ?
1943
1944 // Shortcut for :nth-*(n)
1945 function( elem ) {
1946 return !!elem.parentNode;
1947 } :
1948
1949 function( elem, context, xml ) {
1950 var cache, uniqueCache, outerCache, node, nodeIndex, start,
1951 dir = simple !== forward ? "nextSibling" : "previousSibling",
1952 parent = elem.parentNode,
1953 name = ofType && elem.nodeName.toLowerCase(),
1954 useCache = !xml && !ofType,
1955 diff = false;
1956
1957 if ( parent ) {
1958
1959 // :(first|last|only)-(child|of-type)
1960 if ( simple ) {
1961 while ( dir ) {
1962 node = elem;
1963 while ( (node = node[ dir ]) ) {
1964 if ( ofType ?
1965 node.nodeName.toLowerCase() === name :
1966 node.nodeType === 1 ) {
1967
1968 return false;
1969 }
1970 }
1971 // Reverse direction for :only-* (if we haven't yet done so)
1972 start = dir = type === "only" && !start && "nextSibling";
1973 }
1974 return true;
1975 }
1976
1977 start = [ forward ? parent.firstChild : parent.lastChild ];
1978
1979 // non-xml :nth-child(...) stores cache data on `parent`
1980 if ( forward && useCache ) {
1981
1982 // Seek `elem` from a previously-cached index
1983
1984 // ...in a gzip-friendly way
1985 node = parent;
1986 outerCache = node[ expando ] || (node[ expando ] = {});
1987
1988 // Support: IE <9 only
1989 // Defend against cloned attroperties (jQuery gh-1709)
1990 uniqueCache = outerCache[ node.uniqueID ] ||
1991 (outerCache[ node.uniqueID ] = {});
1992
1993 cache = uniqueCache[ type ] || [];
1994 nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
1995 diff = nodeIndex && cache[ 2 ];
1996 node = nodeIndex && parent.childNodes[ nodeIndex ];
1997
1998 while ( (node = ++nodeIndex && node && node[ dir ] ||
1999
2000 // Fallback to seeking `elem` from the start
2001 (diff = nodeIndex = 0) || start.pop()) ) {
2002
2003 // When found, cache indexes on `parent` and break
2004 if ( node.nodeType === 1 && ++diff && node === elem ) {
2005 uniqueCache[ type ] = [ dirruns, nodeIndex, diff ];
2006 break;
2007 }
2008 }
2009
2010 } else {
2011 // Use previously-cached element index if available
2012 if ( useCache ) {
2013 // ...in a gzip-friendly way
2014 node = elem;
2015 outerCache = node[ expando ] || (node[ expando ] = {});
2016
2017 // Support: IE <9 only
2018 // Defend against cloned attroperties (jQuery gh-1709)
2019 uniqueCache = outerCache[ node.uniqueID ] ||
2020 (outerCache[ node.uniqueID ] = {});
2021
2022 cache = uniqueCache[ type ] || [];
2023 nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
2024 diff = nodeIndex;
2025 }
2026
2027 // xml :nth-child(...)
2028 // or :nth-last-child(...) or :nth(-last)?-of-type(...)
2029 if ( diff === false ) {
2030 // Use the same loop as above to seek `elem` from the start
2031 while ( (node = ++nodeIndex && node && node[ dir ] ||
2032 (diff = nodeIndex = 0) || start.pop()) ) {
2033
2034 if ( ( ofType ?
2035 node.nodeName.toLowerCase() === name :
2036 node.nodeType === 1 ) &&
2037 ++diff ) {
2038
2039 // Cache the index of each encountered element
2040 if ( useCache ) {
2041 outerCache = node[ expando ] || (node[ expando ] = {});
2042
2043 // Support: IE <9 only
2044 // Defend against cloned attroperties (jQuery gh-1709)
2045 uniqueCache = outerCache[ node.uniqueID ] ||
2046 (outerCache[ node.uniqueID ] = {});
2047
2048 uniqueCache[ type ] = [ dirruns, diff ];
2049 }
2050
2051 if ( node === elem ) {
2052 break;
2053 }
2054 }
2055 }
2056 }
2057 }
2058
2059 // Incorporate the offset, then check against cycle size
2060 diff -= last;
2061 return diff === first || ( diff % first === 0 && diff / first >= 0 );
2062 }
2063 };
2064 },
2065
2066 "PSEUDO": function( pseudo, argument ) {
2067 // pseudo-class names are case-insensitive
2068 // http://www.w3.org/TR/selectors/#pseudo-classes
2069 // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
2070 // Remember that setFilters inherits from pseudos
2071 var args,
2072 fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
2073 Sizzle.error( "unsupported pseudo: " + pseudo );
2074
2075 // The user may use createPseudo to indicate that
2076 // arguments are needed to create the filter function
2077 // just as Sizzle does
2078 if ( fn[ expando ] ) {
2079 return fn( argument );
2080 }
2081
2082 // But maintain support for old signatures
2083 if ( fn.length > 1 ) {
2084 args = [ pseudo, pseudo, "", argument ];
2085 return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
2086 markFunction(function( seed, matches ) {
2087 var idx,
2088 matched = fn( seed, argument ),
2089 i = matched.length;
2090 while ( i-- ) {
2091 idx = indexOf( seed, matched[i] );
2092 seed[ idx ] = !( matches[ idx ] = matched[i] );
2093 }
2094 }) :
2095 function( elem ) {
2096 return fn( elem, 0, args );
2097 };
2098 }
2099
2100 return fn;
2101 }
2102 },
2103
2104 pseudos: {
2105 // Potentially complex pseudos
2106 "not": markFunction(function( selector ) {
2107 // Trim the selector passed to compile
2108 // to avoid treating leading and trailing
2109 // spaces as combinators
2110 var input = [],
2111 results = [],
2112 matcher = compile( selector.replace( rtrim, "$1" ) );
2113
2114 return matcher[ expando ] ?
2115 markFunction(function( seed, matches, context, xml ) {
2116 var elem,
2117 unmatched = matcher( seed, null, xml, [] ),
2118 i = seed.length;
2119
2120 // Match elements unmatched by `matcher`
2121 while ( i-- ) {
2122 if ( (elem = unmatched[i]) ) {
2123 seed[i] = !(matches[i] = elem);
2124 }
2125 }
2126 }) :
2127 function( elem, context, xml ) {
2128 input[0] = elem;
2129 matcher( input, null, xml, results );
2130 // Don't keep the element (issue #299)
2131 input[0] = null;
2132 return !results.pop();
2133 };
2134 }),
2135
2136 "has": markFunction(function( selector ) {
2137 return function( elem ) {
2138 return Sizzle( selector, elem ).length > 0;
2139 };
2140 }),
2141
2142 "contains": markFunction(function( text ) {
2143 text = text.replace( runescape, funescape );
2144 return function( elem ) {
2145 return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
2146 };
2147 }),
2148
2149 // "Whether an element is represented by a :lang() selector
2150 // is based solely on the element's language value
2151 // being equal to the identifier C,
2152 // or beginning with the identifier C immediately followed by "-".
2153 // The matching of C against the element's language value is performed case-insensitively.
2154 // The identifier C does not have to be a valid language name."
2155 // http://www.w3.org/TR/selectors/#lang-pseudo
2156 "lang": markFunction( function( lang ) {
2157 // lang value must be a valid identifier
2158 if ( !ridentifier.test(lang || "") ) {
2159 Sizzle.error( "unsupported lang: " + lang );
2160 }
2161 lang = lang.replace( runescape, funescape ).toLowerCase();
2162 return function( elem ) {
2163 var elemLang;
2164 do {
2165 if ( (elemLang = documentIsHTML ?
2166 elem.lang :
2167 elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
2168
2169 elemLang = elemLang.toLowerCase();
2170 return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
2171 }
2172 } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
2173 return false;
2174 };
2175 }),
2176
2177 // Miscellaneous
2178 "target": function( elem ) {
2179 var hash = window.location && window.location.hash;
2180 return hash && hash.slice( 1 ) === elem.id;
2181 },
2182
2183 "root": function( elem ) {
2184 return elem === docElem;
2185 },
2186
2187 "focus": function( elem ) {
2188 return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
2189 },
2190
2191 // Boolean properties
2192 "enabled": createDisabledPseudo( false ),
2193 "disabled": createDisabledPseudo( true ),
2194
2195 "checked": function( elem ) {
2196 // In CSS3, :checked should return both checked and selected elements
2197 // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
2198 var nodeName = elem.nodeName.toLowerCase();
2199 return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
2200 },
2201
2202 "selected": function( elem ) {
2203 // Accessing this property makes selected-by-default
2204 // options in Safari work properly
2205 if ( elem.parentNode ) {
2206 elem.parentNode.selectedIndex;
2207 }
2208
2209 return elem.selected === true;
2210 },
2211
2212 // Contents
2213 "empty": function( elem ) {
2214 // http://www.w3.org/TR/selectors/#empty-pseudo
2215 // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
2216 // but not by others (comment: 8; processing instruction: 7; etc.)
2217 // nodeType < 6 works because attributes (2) do not appear as children
2218 for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
2219 if ( elem.nodeType < 6 ) {
2220 return false;
2221 }
2222 }
2223 return true;
2224 },
2225
2226 "parent": function( elem ) {
2227 return !Expr.pseudos["empty"]( elem );
2228 },
2229
2230 // Element/input types
2231 "header": function( elem ) {
2232 return rheader.test( elem.nodeName );
2233 },
2234
2235 "input": function( elem ) {
2236 return rinputs.test( elem.nodeName );
2237 },
2238
2239 "button": function( elem ) {
2240 var name = elem.nodeName.toLowerCase();
2241 return name === "input" && elem.type === "button" || name === "button";
2242 },
2243
2244 "text": function( elem ) {
2245 var attr;
2246 return elem.nodeName.toLowerCase() === "input" &&
2247 elem.type === "text" &&
2248
2249 // Support: IE<8
2250 // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
2251 ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
2252 },
2253
2254 // Position-in-collection
2255 "first": createPositionalPseudo(function() {
2256 return [ 0 ];
2257 }),
2258
2259 "last": createPositionalPseudo(function( matchIndexes, length ) {
2260 return [ length - 1 ];
2261 }),
2262
2263 "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
2264 return [ argument < 0 ? argument + length : argument ];
2265 }),
2266
2267 "even": createPositionalPseudo(function( matchIndexes, length ) {
2268 var i = 0;
2269 for ( ; i < length; i += 2 ) {
2270 matchIndexes.push( i );
2271 }
2272 return matchIndexes;
2273 }),
2274
2275 "odd": createPositionalPseudo(function( matchIndexes, length ) {
2276 var i = 1;
2277 for ( ; i < length; i += 2 ) {
2278 matchIndexes.push( i );
2279 }
2280 return matchIndexes;
2281 }),
2282
2283 "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
2284 var i = argument < 0 ? argument + length : argument;
2285 for ( ; --i >= 0; ) {
2286 matchIndexes.push( i );
2287 }
2288 return matchIndexes;
2289 }),
2290
2291 "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
2292 var i = argument < 0 ? argument + length : argument;
2293 for ( ; ++i < length; ) {
2294 matchIndexes.push( i );
2295 }
2296 return matchIndexes;
2297 })
2298 }
2299};
2300
2301Expr.pseudos["nth"] = Expr.pseudos["eq"];
2302
2303// Add button/input type pseudos
2304for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
2305 Expr.pseudos[ i ] = createInputPseudo( i );
2306}
2307for ( i in { submit: true, reset: true } ) {
2308 Expr.pseudos[ i ] = createButtonPseudo( i );
2309}
2310
2311// Easy API for creating new setFilters
2312function setFilters() {}
2313setFilters.prototype = Expr.filters = Expr.pseudos;
2314Expr.setFilters = new setFilters();
2315
2316tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
2317 var matched, match, tokens, type,
2318 soFar, groups, preFilters,
2319 cached = tokenCache[ selector + " " ];
2320
2321 if ( cached ) {
2322 return parseOnly ? 0 : cached.slice( 0 );
2323 }
2324
2325 soFar = selector;
2326 groups = [];
2327 preFilters = Expr.preFilter;
2328
2329 while ( soFar ) {
2330
2331 // Comma and first run
2332 if ( !matched || (match = rcomma.exec( soFar )) ) {
2333 if ( match ) {
2334 // Don't consume trailing commas as valid
2335 soFar = soFar.slice( match[0].length ) || soFar;
2336 }
2337 groups.push( (tokens = []) );
2338 }
2339
2340 matched = false;
2341
2342 // Combinators
2343 if ( (match = rcombinators.exec( soFar )) ) {
2344 matched = match.shift();
2345 tokens.push({
2346 value: matched,
2347 // Cast descendant combinators to space
2348 type: match[0].replace( rtrim, " " )
2349 });
2350 soFar = soFar.slice( matched.length );
2351 }
2352
2353 // Filters
2354 for ( type in Expr.filter ) {
2355 if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
2356 (match = preFilters[ type ]( match ))) ) {
2357 matched = match.shift();
2358 tokens.push({
2359 value: matched,
2360 type: type,
2361 matches: match
2362 });
2363 soFar = soFar.slice( matched.length );
2364 }
2365 }
2366
2367 if ( !matched ) {
2368 break;
2369 }
2370 }
2371
2372 // Return the length of the invalid excess
2373 // if we're just parsing
2374 // Otherwise, throw an error or return tokens
2375 return parseOnly ?
2376 soFar.length :
2377 soFar ?
2378 Sizzle.error( selector ) :
2379 // Cache the tokens
2380 tokenCache( selector, groups ).slice( 0 );
2381};
2382
2383function toSelector( tokens ) {
2384 var i = 0,
2385 len = tokens.length,
2386 selector = "";
2387 for ( ; i < len; i++ ) {
2388 selector += tokens[i].value;
2389 }
2390 return selector;
2391}
2392
2393function addCombinator( matcher, combinator, base ) {
2394 var dir = combinator.dir,
2395 skip = combinator.next,
2396 key = skip || dir,
2397 checkNonElements = base && key === "parentNode",
2398 doneName = done++;
2399
2400 return combinator.first ?
2401 // Check against closest ancestor/preceding element
2402 function( elem, context, xml ) {
2403 while ( (elem = elem[ dir ]) ) {
2404 if ( elem.nodeType === 1 || checkNonElements ) {
2405 return matcher( elem, context, xml );
2406 }
2407 }
2408 return false;
2409 } :
2410
2411 // Check against all ancestor/preceding elements
2412 function( elem, context, xml ) {
2413 var oldCache, uniqueCache, outerCache,
2414 newCache = [ dirruns, doneName ];
2415
2416 // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
2417 if ( xml ) {
2418 while ( (elem = elem[ dir ]) ) {
2419 if ( elem.nodeType === 1 || checkNonElements ) {
2420 if ( matcher( elem, context, xml ) ) {
2421 return true;
2422 }
2423 }
2424 }
2425 } else {
2426 while ( (elem = elem[ dir ]) ) {
2427 if ( elem.nodeType === 1 || checkNonElements ) {
2428 outerCache = elem[ expando ] || (elem[ expando ] = {});
2429
2430 // Support: IE <9 only
2431 // Defend against cloned attroperties (jQuery gh-1709)
2432 uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});
2433
2434 if ( skip && skip === elem.nodeName.toLowerCase() ) {
2435 elem = elem[ dir ] || elem;
2436 } else if ( (oldCache = uniqueCache[ key ]) &&
2437 oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
2438
2439 // Assign to newCache so results back-propagate to previous elements
2440 return (newCache[ 2 ] = oldCache[ 2 ]);
2441 } else {
2442 // Reuse newcache so results back-propagate to previous elements
2443 uniqueCache[ key ] = newCache;
2444
2445 // A match means we're done; a fail means we have to keep checking
2446 if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
2447 return true;
2448 }
2449 }
2450 }
2451 }
2452 }
2453 return false;
2454 };
2455}
2456
2457function elementMatcher( matchers ) {
2458 return matchers.length > 1 ?
2459 function( elem, context, xml ) {
2460 var i = matchers.length;
2461 while ( i-- ) {
2462 if ( !matchers[i]( elem, context, xml ) ) {
2463 return false;
2464 }
2465 }
2466 return true;
2467 } :
2468 matchers[0];
2469}
2470
2471function multipleContexts( selector, contexts, results ) {
2472 var i = 0,
2473 len = contexts.length;
2474 for ( ; i < len; i++ ) {
2475 Sizzle( selector, contexts[i], results );
2476 }
2477 return results;
2478}
2479
2480function condense( unmatched, map, filter, context, xml ) {
2481 var elem,
2482 newUnmatched = [],
2483 i = 0,
2484 len = unmatched.length,
2485 mapped = map != null;
2486
2487 for ( ; i < len; i++ ) {
2488 if ( (elem = unmatched[i]) ) {
2489 if ( !filter || filter( elem, context, xml ) ) {
2490 newUnmatched.push( elem );
2491 if ( mapped ) {
2492 map.push( i );
2493 }
2494 }
2495 }
2496 }
2497
2498 return newUnmatched;
2499}
2500
2501function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
2502 if ( postFilter && !postFilter[ expando ] ) {
2503 postFilter = setMatcher( postFilter );
2504 }
2505 if ( postFinder && !postFinder[ expando ] ) {
2506 postFinder = setMatcher( postFinder, postSelector );
2507 }
2508 return markFunction(function( seed, results, context, xml ) {
2509 var temp, i, elem,
2510 preMap = [],
2511 postMap = [],
2512 preexisting = results.length,
2513
2514 // Get initial elements from seed or context
2515 elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
2516
2517 // Prefilter to get matcher input, preserving a map for seed-results synchronization
2518 matcherIn = preFilter && ( seed || !selector ) ?
2519 condense( elems, preMap, preFilter, context, xml ) :
2520 elems,
2521
2522 matcherOut = matcher ?
2523 // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
2524 postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
2525
2526 // ...intermediate processing is necessary
2527 [] :
2528
2529 // ...otherwise use results directly
2530 results :
2531 matcherIn;
2532
2533 // Find primary matches
2534 if ( matcher ) {
2535 matcher( matcherIn, matcherOut, context, xml );
2536 }
2537
2538 // Apply postFilter
2539 if ( postFilter ) {
2540 temp = condense( matcherOut, postMap );
2541 postFilter( temp, [], context, xml );
2542
2543 // Un-match failing elements by moving them back to matcherIn
2544 i = temp.length;
2545 while ( i-- ) {
2546 if ( (elem = temp[i]) ) {
2547 matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
2548 }
2549 }
2550 }
2551
2552 if ( seed ) {
2553 if ( postFinder || preFilter ) {
2554 if ( postFinder ) {
2555 // Get the final matcherOut by condensing this intermediate into postFinder contexts
2556 temp = [];
2557 i = matcherOut.length;
2558 while ( i-- ) {
2559 if ( (elem = matcherOut[i]) ) {
2560 // Restore matcherIn since elem is not yet a final match
2561 temp.push( (matcherIn[i] = elem) );
2562 }
2563 }
2564 postFinder( null, (matcherOut = []), temp, xml );
2565 }
2566
2567 // Move matched elements from seed to results to keep them synchronized
2568 i = matcherOut.length;
2569 while ( i-- ) {
2570 if ( (elem = matcherOut[i]) &&
2571 (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {
2572
2573 seed[temp] = !(results[temp] = elem);
2574 }
2575 }
2576 }
2577
2578 // Add elements to results, through postFinder if defined
2579 } else {
2580 matcherOut = condense(
2581 matcherOut === results ?
2582 matcherOut.splice( preexisting, matcherOut.length ) :
2583 matcherOut
2584 );
2585 if ( postFinder ) {
2586 postFinder( null, results, matcherOut, xml );
2587 } else {
2588 push.apply( results, matcherOut );
2589 }
2590 }
2591 });
2592}
2593
2594function matcherFromTokens( tokens ) {
2595 var checkContext, matcher, j,
2596 len = tokens.length,
2597 leadingRelative = Expr.relative[ tokens[0].type ],
2598 implicitRelative = leadingRelative || Expr.relative[" "],
2599 i = leadingRelative ? 1 : 0,
2600
2601 // The foundational matcher ensures that elements are reachable from top-level context(s)
2602 matchContext = addCombinator( function( elem ) {
2603 return elem === checkContext;
2604 }, implicitRelative, true ),
2605 matchAnyContext = addCombinator( function( elem ) {
2606 return indexOf( checkContext, elem ) > -1;
2607 }, implicitRelative, true ),
2608 matchers = [ function( elem, context, xml ) {
2609 var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
2610 (checkContext = context).nodeType ?
2611 matchContext( elem, context, xml ) :
2612 matchAnyContext( elem, context, xml ) );
2613 // Avoid hanging onto element (issue #299)
2614 checkContext = null;
2615 return ret;
2616 } ];
2617
2618 for ( ; i < len; i++ ) {
2619 if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
2620 matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
2621 } else {
2622 matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
2623
2624 // Return special upon seeing a positional matcher
2625 if ( matcher[ expando ] ) {
2626 // Find the next relative operator (if any) for proper handling
2627 j = ++i;
2628 for ( ; j < len; j++ ) {
2629 if ( Expr.relative[ tokens[j].type ] ) {
2630 break;
2631 }
2632 }
2633 return setMatcher(
2634 i > 1 && elementMatcher( matchers ),
2635 i > 1 && toSelector(
2636 // If the preceding token was a descendant combinator, insert an implicit any-element `*`
2637 tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
2638 ).replace( rtrim, "$1" ),
2639 matcher,
2640 i < j && matcherFromTokens( tokens.slice( i, j ) ),
2641 j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
2642 j < len && toSelector( tokens )
2643 );
2644 }
2645 matchers.push( matcher );
2646 }
2647 }
2648
2649 return elementMatcher( matchers );
2650}
2651
2652function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
2653 var bySet = setMatchers.length > 0,
2654 byElement = elementMatchers.length > 0,
2655 superMatcher = function( seed, context, xml, results, outermost ) {
2656 var elem, j, matcher,
2657 matchedCount = 0,
2658 i = "0",
2659 unmatched = seed && [],
2660 setMatched = [],
2661 contextBackup = outermostContext,
2662 // We must always have either seed elements or outermost context
2663 elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
2664 // Use integer dirruns iff this is the outermost matcher
2665 dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
2666 len = elems.length;
2667
2668 if ( outermost ) {
2669 outermostContext = context === document || context || outermost;
2670 }
2671
2672 // Add elements passing elementMatchers directly to results
2673 // Support: IE<9, Safari
2674 // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
2675 for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
2676 if ( byElement && elem ) {
2677 j = 0;
2678 if ( !context && elem.ownerDocument !== document ) {
2679 setDocument( elem );
2680 xml = !documentIsHTML;
2681 }
2682 while ( (matcher = elementMatchers[j++]) ) {
2683 if ( matcher( elem, context || document, xml) ) {
2684 results.push( elem );
2685 break;
2686 }
2687 }
2688 if ( outermost ) {
2689 dirruns = dirrunsUnique;
2690 }
2691 }
2692
2693 // Track unmatched elements for set filters
2694 if ( bySet ) {
2695 // They will have gone through all possible matchers
2696 if ( (elem = !matcher && elem) ) {
2697 matchedCount--;
2698 }
2699
2700 // Lengthen the array for every element, matched or not
2701 if ( seed ) {
2702 unmatched.push( elem );
2703 }
2704 }
2705 }
2706
2707 // `i` is now the count of elements visited above, and adding it to `matchedCount`
2708 // makes the latter nonnegative.
2709 matchedCount += i;
2710
2711 // Apply set filters to unmatched elements
2712 // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
2713 // equals `i`), unless we didn't visit _any_ elements in the above loop because we have
2714 // no element matchers and no seed.
2715 // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
2716 // case, which will result in a "00" `matchedCount` that differs from `i` but is also
2717 // numerically zero.
2718 if ( bySet && i !== matchedCount ) {
2719 j = 0;
2720 while ( (matcher = setMatchers[j++]) ) {
2721 matcher( unmatched, setMatched, context, xml );
2722 }
2723
2724 if ( seed ) {
2725 // Reintegrate element matches to eliminate the need for sorting
2726 if ( matchedCount > 0 ) {
2727 while ( i-- ) {
2728 if ( !(unmatched[i] || setMatched[i]) ) {
2729 setMatched[i] = pop.call( results );
2730 }
2731 }
2732 }
2733
2734 // Discard index placeholder values to get only actual matches
2735 setMatched = condense( setMatched );
2736 }
2737
2738 // Add matches to results
2739 push.apply( results, setMatched );
2740
2741 // Seedless set matches succeeding multiple successful matchers stipulate sorting
2742 if ( outermost && !seed && setMatched.length > 0 &&
2743 ( matchedCount + setMatchers.length ) > 1 ) {
2744
2745 Sizzle.uniqueSort( results );
2746 }
2747 }
2748
2749 // Override manipulation of globals by nested matchers
2750 if ( outermost ) {
2751 dirruns = dirrunsUnique;
2752 outermostContext = contextBackup;
2753 }
2754
2755 return unmatched;
2756 };
2757
2758 return bySet ?
2759 markFunction( superMatcher ) :
2760 superMatcher;
2761}
2762
2763compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
2764 var i,
2765 setMatchers = [],
2766 elementMatchers = [],
2767 cached = compilerCache[ selector + " " ];
2768
2769 if ( !cached ) {
2770 // Generate a function of recursive functions that can be used to check each element
2771 if ( !match ) {
2772 match = tokenize( selector );
2773 }
2774 i = match.length;
2775 while ( i-- ) {
2776 cached = matcherFromTokens( match[i] );
2777 if ( cached[ expando ] ) {
2778 setMatchers.push( cached );
2779 } else {
2780 elementMatchers.push( cached );
2781 }
2782 }
2783
2784 // Cache the compiled function
2785 cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
2786
2787 // Save selector and tokenization
2788 cached.selector = selector;
2789 }
2790 return cached;
2791};
2792
2793/**
2794 * A low-level selection function that works with Sizzle's compiled
2795 * selector functions
2796 * @param {String|Function} selector A selector or a pre-compiled
2797 * selector function built with Sizzle.compile
2798 * @param {Element} context
2799 * @param {Array} [results]
2800 * @param {Array} [seed] A set of elements to match against
2801 */
2802select = Sizzle.select = function( selector, context, results, seed ) {
2803 var i, tokens, token, type, find,
2804 compiled = typeof selector === "function" && selector,
2805 match = !seed && tokenize( (selector = compiled.selector || selector) );
2806
2807 results = results || [];
2808
2809 // Try to minimize operations if there is only one selector in the list and no seed
2810 // (the latter of which guarantees us context)
2811 if ( match.length === 1 ) {
2812
2813 // Reduce context if the leading compound selector is an ID
2814 tokens = match[0] = match[0].slice( 0 );
2815 if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
2816 context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) {
2817
2818 context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
2819 if ( !context ) {
2820 return results;
2821
2822 // Precompiled matchers will still verify ancestry, so step up a level
2823 } else if ( compiled ) {
2824 context = context.parentNode;
2825 }
2826
2827 selector = selector.slice( tokens.shift().value.length );
2828 }
2829
2830 // Fetch a seed set for right-to-left matching
2831 i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
2832 while ( i-- ) {
2833 token = tokens[i];
2834
2835 // Abort if we hit a combinator
2836 if ( Expr.relative[ (type = token.type) ] ) {
2837 break;
2838 }
2839 if ( (find = Expr.find[ type ]) ) {
2840 // Search, expanding context for leading sibling combinators
2841 if ( (seed = find(
2842 token.matches[0].replace( runescape, funescape ),
2843 rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
2844 )) ) {
2845
2846 // If seed is empty or no tokens remain, we can return early
2847 tokens.splice( i, 1 );
2848 selector = seed.length && toSelector( tokens );
2849 if ( !selector ) {
2850 push.apply( results, seed );
2851 return results;
2852 }
2853
2854 break;
2855 }
2856 }
2857 }
2858 }
2859
2860 // Compile and execute a filtering function if one is not provided
2861 // Provide `match` to avoid retokenization if we modified the selector above
2862 ( compiled || compile( selector, match ) )(
2863 seed,
2864 context,
2865 !documentIsHTML,
2866 results,
2867 !context || rsibling.test( selector ) && testContext( context.parentNode ) || context
2868 );
2869 return results;
2870};
2871
2872// One-time assignments
2873
2874// Sort stability
2875support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
2876
2877// Support: Chrome 14-35+
2878// Always assume duplicates if they aren't passed to the comparison function
2879support.detectDuplicates = !!hasDuplicate;
2880
2881// Initialize against the default document
2882setDocument();
2883
2884// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
2885// Detached nodes confoundingly follow *each other*
2886support.sortDetached = assert(function( el ) {
2887 // Should return 1, but returns 4 (following)
2888 return el.compareDocumentPosition( document.createElement("fieldset") ) & 1;
2889});
2890
2891// Support: IE<8
2892// Prevent attribute/property "interpolation"
2893// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
2894if ( !assert(function( el ) {
2895 el.innerHTML = "<a href='#'></a>";
2896 return el.firstChild.getAttribute("href") === "#" ;
2897}) ) {
2898 addHandle( "type|href|height|width", function( elem, name, isXML ) {
2899 if ( !isXML ) {
2900 return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
2901 }
2902 });
2903}
2904
2905// Support: IE<9
2906// Use defaultValue in place of getAttribute("value")
2907if ( !support.attributes || !assert(function( el ) {
2908 el.innerHTML = "<input/>";
2909 el.firstChild.setAttribute( "value", "" );
2910 return el.firstChild.getAttribute( "value" ) === "";
2911}) ) {
2912 addHandle( "value", function( elem, name, isXML ) {
2913 if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
2914 return elem.defaultValue;
2915 }
2916 });
2917}
2918
2919// Support: IE<9
2920// Use getAttributeNode to fetch booleans when getAttribute lies
2921if ( !assert(function( el ) {
2922 return el.getAttribute("disabled") == null;
2923}) ) {
2924 addHandle( booleans, function( elem, name, isXML ) {
2925 var val;
2926 if ( !isXML ) {
2927 return elem[ name ] === true ? name.toLowerCase() :
2928 (val = elem.getAttributeNode( name )) && val.specified ?
2929 val.value :
2930 null;
2931 }
2932 });
2933}
2934
2935return Sizzle;
2936
2937})( window );
2938
2939
2940
2941jQuery.find = Sizzle;
2942jQuery.expr = Sizzle.selectors;
2943
2944// Deprecated
2945jQuery.expr[ ":" ] = jQuery.expr.pseudos;
2946jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
2947jQuery.text = Sizzle.getText;
2948jQuery.isXMLDoc = Sizzle.isXML;
2949jQuery.contains = Sizzle.contains;
2950jQuery.escapeSelector = Sizzle.escape;
2951
2952
2953
2954
2955var dir = function( elem, dir, until ) {
2956 var matched = [],
2957 truncate = until !== undefined;
2958
2959 while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
2960 if ( elem.nodeType === 1 ) {
2961 if ( truncate && jQuery( elem ).is( until ) ) {
2962 break;
2963 }
2964 matched.push( elem );
2965 }
2966 }
2967 return matched;
2968};
2969
2970
2971var siblings = function( n, elem ) {
2972 var matched = [];
2973
2974 for ( ; n; n = n.nextSibling ) {
2975 if ( n.nodeType === 1 && n !== elem ) {
2976 matched.push( n );
2977 }
2978 }
2979
2980 return matched;
2981};
2982
2983
2984var rneedsContext = jQuery.expr.match.needsContext;
2985
2986
2987
2988function nodeName( elem, name ) {
2989
2990 return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
2991
2992};
2993var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );
2994
2995
2996
2997// Implement the identical functionality for filter and not
2998function winnow( elements, qualifier, not ) {
2999 if ( isFunction( qualifier ) ) {
3000 return jQuery.grep( elements, function( elem, i ) {
3001 return !!qualifier.call( elem, i, elem ) !== not;
3002 } );
3003 }
3004
3005 // Single element
3006 if ( qualifier.nodeType ) {
3007 return jQuery.grep( elements, function( elem ) {
3008 return ( elem === qualifier ) !== not;
3009 } );
3010 }
3011
3012 // Arraylike of elements (jQuery, arguments, Array)
3013 if ( typeof qualifier !== "string" ) {
3014 return jQuery.grep( elements, function( elem ) {
3015 return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
3016 } );
3017 }
3018
3019 // Filtered directly for both simple and complex selectors
3020 return jQuery.filter( qualifier, elements, not );
3021}
3022
3023jQuery.filter = function( expr, elems, not ) {
3024 var elem = elems[ 0 ];
3025
3026 if ( not ) {
3027 expr = ":not(" + expr + ")";
3028 }
3029
3030 if ( elems.length === 1 && elem.nodeType === 1 ) {
3031 return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];
3032 }
3033
3034 return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
3035 return elem.nodeType === 1;
3036 } ) );
3037};
3038
3039jQuery.fn.extend( {
3040 find: function( selector ) {
3041 var i, ret,
3042 len = this.length,
3043 self = this;
3044
3045 if ( typeof selector !== "string" ) {
3046 return this.pushStack( jQuery( selector ).filter( function() {
3047 for ( i = 0; i < len; i++ ) {
3048 if ( jQuery.contains( self[ i ], this ) ) {
3049 return true;
3050 }
3051 }
3052 } ) );
3053 }
3054
3055 ret = this.pushStack( [] );
3056
3057 for ( i = 0; i < len; i++ ) {
3058 jQuery.find( selector, self[ i ], ret );
3059 }
3060
3061 return len > 1 ? jQuery.uniqueSort( ret ) : ret;
3062 },
3063 filter: function( selector ) {
3064 return this.pushStack( winnow( this, selector || [], false ) );
3065 },
3066 not: function( selector ) {
3067 return this.pushStack( winnow( this, selector || [], true ) );
3068 },
3069 is: function( selector ) {
3070 return !!winnow(
3071 this,
3072
3073 // If this is a positional/relative selector, check membership in the returned set
3074 // so $("p:first").is("p:last") won't return true for a doc with two "p".
3075 typeof selector === "string" && rneedsContext.test( selector ) ?
3076 jQuery( selector ) :
3077 selector || [],
3078 false
3079 ).length;
3080 }
3081} );
3082
3083
3084// Initialize a jQuery object
3085
3086
3087// A central reference to the root jQuery(document)
3088var rootjQuery,
3089
3090 // A simple way to check for HTML strings
3091 // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
3092 // Strict HTML recognition (#11290: must start with <)
3093 // Shortcut simple #id case for speed
3094 rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,
3095
3096 init = jQuery.fn.init = function( selector, context, root ) {
3097 var match, elem;
3098
3099 // HANDLE: $(""), $(null), $(undefined), $(false)
3100 if ( !selector ) {
3101 return this;
3102 }
3103
3104 // Method init() accepts an alternate rootjQuery
3105 // so migrate can support jQuery.sub (gh-2101)
3106 root = root || rootjQuery;
3107
3108 // Handle HTML strings
3109 if ( typeof selector === "string" ) {
3110 if ( selector[ 0 ] === "<" &&
3111 selector[ selector.length - 1 ] === ">" &&
3112 selector.length >= 3 ) {
3113
3114 // Assume that strings that start and end with <> are HTML and skip the regex check
3115 match = [ null, selector, null ];
3116
3117 } else {
3118 match = rquickExpr.exec( selector );
3119 }
3120
3121 // Match html or make sure no context is specified for #id
3122 if ( match && ( match[ 1 ] || !context ) ) {
3123
3124 // HANDLE: $(html) -> $(array)
3125 if ( match[ 1 ] ) {
3126 context = context instanceof jQuery ? context[ 0 ] : context;
3127
3128 // Option to run scripts is true for back-compat
3129 // Intentionally let the error be thrown if parseHTML is not present
3130 jQuery.merge( this, jQuery.parseHTML(
3131 match[ 1 ],
3132 context && context.nodeType ? context.ownerDocument || context : document,
3133 true
3134 ) );
3135
3136 // HANDLE: $(html, props)
3137 if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
3138 for ( match in context ) {
3139
3140 // Properties of context are called as methods if possible
3141 if ( isFunction( this[ match ] ) ) {
3142 this[ match ]( context[ match ] );
3143
3144 // ...and otherwise set as attributes
3145 } else {
3146 this.attr( match, context[ match ] );
3147 }
3148 }
3149 }
3150
3151 return this;
3152
3153 // HANDLE: $(#id)
3154 } else {
3155 elem = document.getElementById( match[ 2 ] );
3156
3157 if ( elem ) {
3158
3159 // Inject the element directly into the jQuery object
3160 this[ 0 ] = elem;
3161 this.length = 1;
3162 }
3163 return this;
3164 }
3165
3166 // HANDLE: $(expr, $(...))
3167 } else if ( !context || context.jquery ) {
3168 return ( context || root ).find( selector );
3169
3170 // HANDLE: $(expr, context)
3171 // (which is just equivalent to: $(context).find(expr)
3172 } else {
3173 return this.constructor( context ).find( selector );
3174 }
3175
3176 // HANDLE: $(DOMElement)
3177 } else if ( selector.nodeType ) {
3178 this[ 0 ] = selector;
3179 this.length = 1;
3180 return this;
3181
3182 // HANDLE: $(function)
3183 // Shortcut for document ready
3184 } else if ( isFunction( selector ) ) {
3185 return root.ready !== undefined ?
3186 root.ready( selector ) :
3187
3188 // Execute immediately if ready is not present
3189 selector( jQuery );
3190 }
3191
3192 return jQuery.makeArray( selector, this );
3193 };
3194
3195// Give the init function the jQuery prototype for later instantiation
3196init.prototype = jQuery.fn;
3197
3198// Initialize central reference
3199rootjQuery = jQuery( document );
3200
3201
3202var rparentsprev = /^(?:parents|prev(?:Until|All))/,
3203
3204 // Methods guaranteed to produce a unique set when starting from a unique set
3205 guaranteedUnique = {
3206 children: true,
3207 contents: true,
3208 next: true,
3209 prev: true
3210 };
3211
3212jQuery.fn.extend( {
3213 has: function( target ) {
3214 var targets = jQuery( target, this ),
3215 l = targets.length;
3216
3217 return this.filter( function() {
3218 var i = 0;
3219 for ( ; i < l; i++ ) {
3220 if ( jQuery.contains( this, targets[ i ] ) ) {
3221 return true;
3222 }
3223 }
3224 } );
3225 },
3226
3227 closest: function( selectors, context ) {
3228 var cur,
3229 i = 0,
3230 l = this.length,
3231 matched = [],
3232 targets = typeof selectors !== "string" && jQuery( selectors );
3233
3234 // Positional selectors never match, since there's no _selection_ context
3235 if ( !rneedsContext.test( selectors ) ) {
3236 for ( ; i < l; i++ ) {
3237 for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {
3238
3239 // Always skip document fragments
3240 if ( cur.nodeType < 11 && ( targets ?
3241 targets.index( cur ) > -1 :
3242
3243 // Don't pass non-elements to Sizzle
3244 cur.nodeType === 1 &&
3245 jQuery.find.matchesSelector( cur, selectors ) ) ) {
3246
3247 matched.push( cur );
3248 break;
3249 }
3250 }
3251 }
3252 }
3253
3254 return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );
3255 },
3256
3257 // Determine the position of an element within the set
3258 index: function( elem ) {
3259
3260 // No argument, return index in parent
3261 if ( !elem ) {
3262 return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
3263 }
3264
3265 // Index in selector
3266 if ( typeof elem === "string" ) {
3267 return indexOf.call( jQuery( elem ), this[ 0 ] );
3268 }
3269
3270 // Locate the position of the desired element
3271 return indexOf.call( this,
3272
3273 // If it receives a jQuery object, the first element is used
3274 elem.jquery ? elem[ 0 ] : elem
3275 );
3276 },
3277
3278 add: function( selector, context ) {
3279 return this.pushStack(
3280 jQuery.uniqueSort(
3281 jQuery.merge( this.get(), jQuery( selector, context ) )
3282 )
3283 );
3284 },
3285
3286 addBack: function( selector ) {
3287 return this.add( selector == null ?
3288 this.prevObject : this.prevObject.filter( selector )
3289 );
3290 }
3291} );
3292
3293function sibling( cur, dir ) {
3294 while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}
3295 return cur;
3296}
3297
3298jQuery.each( {
3299 parent: function( elem ) {
3300 var parent = elem.parentNode;
3301 return parent && parent.nodeType !== 11 ? parent : null;
3302 },
3303 parents: function( elem ) {
3304 return dir( elem, "parentNode" );
3305 },
3306 parentsUntil: function( elem, i, until ) {
3307 return dir( elem, "parentNode", until );
3308 },
3309 next: function( elem ) {
3310 return sibling( elem, "nextSibling" );
3311 },
3312 prev: function( elem ) {
3313 return sibling( elem, "previousSibling" );
3314 },
3315 nextAll: function( elem ) {
3316 return dir( elem, "nextSibling" );
3317 },
3318 prevAll: function( elem ) {
3319 return dir( elem, "previousSibling" );
3320 },
3321 nextUntil: function( elem, i, until ) {
3322 return dir( elem, "nextSibling", until );
3323 },
3324 prevUntil: function( elem, i, until ) {
3325 return dir( elem, "previousSibling", until );
3326 },
3327 siblings: function( elem ) {
3328 return siblings( ( elem.parentNode || {} ).firstChild, elem );
3329 },
3330 children: function( elem ) {
3331 return siblings( elem.firstChild );
3332 },
3333 contents: function( elem ) {
3334 if ( nodeName( elem, "iframe" ) ) {
3335 return elem.contentDocument;
3336 }
3337
3338 // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only
3339 // Treat the template element as a regular one in browsers that
3340 // don't support it.
3341 if ( nodeName( elem, "template" ) ) {
3342 elem = elem.content || elem;
3343 }
3344
3345 return jQuery.merge( [], elem.childNodes );
3346 }
3347}, function( name, fn ) {
3348 jQuery.fn[ name ] = function( until, selector ) {
3349 var matched = jQuery.map( this, fn, until );
3350
3351 if ( name.slice( -5 ) !== "Until" ) {
3352 selector = until;
3353 }
3354
3355 if ( selector && typeof selector === "string" ) {
3356 matched = jQuery.filter( selector, matched );
3357 }
3358
3359 if ( this.length > 1 ) {
3360
3361 // Remove duplicates
3362 if ( !guaranteedUnique[ name ] ) {
3363 jQuery.uniqueSort( matched );
3364 }
3365
3366 // Reverse order for parents* and prev-derivatives
3367 if ( rparentsprev.test( name ) ) {
3368 matched.reverse();
3369 }
3370 }
3371
3372 return this.pushStack( matched );
3373 };
3374} );
3375var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g );
3376
3377
3378
3379// Convert String-formatted options into Object-formatted ones
3380function createOptions( options ) {
3381 var object = {};
3382 jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {
3383 object[ flag ] = true;
3384 } );
3385 return object;
3386}
3387
3388/*
3389 * Create a callback list using the following parameters:
3390 *
3391 * options: an optional list of space-separated options that will change how
3392 * the callback list behaves or a more traditional option object
3393 *
3394 * By default a callback list will act like an event callback list and can be
3395 * "fired" multiple times.
3396 *
3397 * Possible options:
3398 *
3399 * once: will ensure the callback list can only be fired once (like a Deferred)
3400 *
3401 * memory: will keep track of previous values and will call any callback added
3402 * after the list has been fired right away with the latest "memorized"
3403 * values (like a Deferred)
3404 *
3405 * unique: will ensure a callback can only be added once (no duplicate in the list)
3406 *
3407 * stopOnFalse: interrupt callings when a callback returns false
3408 *
3409 */
3410jQuery.Callbacks = function( options ) {
3411
3412 // Convert options from String-formatted to Object-formatted if needed
3413 // (we check in cache first)
3414 options = typeof options === "string" ?
3415 createOptions( options ) :
3416 jQuery.extend( {}, options );
3417
3418 var // Flag to know if list is currently firing
3419 firing,
3420
3421 // Last fire value for non-forgettable lists
3422 memory,
3423
3424 // Flag to know if list was already fired
3425 fired,
3426
3427 // Flag to prevent firing
3428 locked,
3429
3430 // Actual callback list
3431 list = [],
3432
3433 // Queue of execution data for repeatable lists
3434 queue = [],
3435
3436 // Index of currently firing callback (modified by add/remove as needed)
3437 firingIndex = -1,
3438
3439 // Fire callbacks
3440 fire = function() {
3441
3442 // Enforce single-firing
3443 locked = locked || options.once;
3444
3445 // Execute callbacks for all pending executions,
3446 // respecting firingIndex overrides and runtime changes
3447 fired = firing = true;
3448 for ( ; queue.length; firingIndex = -1 ) {
3449 memory = queue.shift();
3450 while ( ++firingIndex < list.length ) {
3451
3452 // Run callback and check for early termination
3453 if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
3454 options.stopOnFalse ) {
3455
3456 // Jump to end and forget the data so .add doesn't re-fire
3457 firingIndex = list.length;
3458 memory = false;
3459 }
3460 }
3461 }
3462
3463 // Forget the data if we're done with it
3464 if ( !options.memory ) {
3465 memory = false;
3466 }
3467
3468 firing = false;
3469
3470 // Clean up if we're done firing for good
3471 if ( locked ) {
3472
3473 // Keep an empty list if we have data for future add calls
3474 if ( memory ) {
3475 list = [];
3476
3477 // Otherwise, this object is spent
3478 } else {
3479 list = "";
3480 }
3481 }
3482 },
3483
3484 // Actual Callbacks object
3485 self = {
3486
3487 // Add a callback or a collection of callbacks to the list
3488 add: function() {
3489 if ( list ) {
3490
3491 // If we have memory from a past run, we should fire after adding
3492 if ( memory && !firing ) {
3493 firingIndex = list.length - 1;
3494 queue.push( memory );
3495 }
3496
3497 ( function add( args ) {
3498 jQuery.each( args, function( _, arg ) {
3499 if ( isFunction( arg ) ) {
3500 if ( !options.unique || !self.has( arg ) ) {
3501 list.push( arg );
3502 }
3503 } else if ( arg && arg.length && toType( arg ) !== "string" ) {
3504
3505 // Inspect recursively
3506 add( arg );
3507 }
3508 } );
3509 } )( arguments );
3510
3511 if ( memory && !firing ) {
3512 fire();
3513 }
3514 }
3515 return this;
3516 },
3517
3518 // Remove a callback from the list
3519 remove: function() {
3520 jQuery.each( arguments, function( _, arg ) {
3521 var index;
3522 while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
3523 list.splice( index, 1 );
3524
3525 // Handle firing indexes
3526 if ( index <= firingIndex ) {
3527 firingIndex--;
3528 }
3529 }
3530 } );
3531 return this;
3532 },
3533
3534 // Check if a given callback is in the list.
3535 // If no argument is given, return whether or not list has callbacks attached.
3536 has: function( fn ) {
3537 return fn ?
3538 jQuery.inArray( fn, list ) > -1 :
3539 list.length > 0;
3540 },
3541
3542 // Remove all callbacks from the list
3543 empty: function() {
3544 if ( list ) {
3545 list = [];
3546 }
3547 return this;
3548 },
3549
3550 // Disable .fire and .add
3551 // Abort any current/pending executions
3552 // Clear all callbacks and values
3553 disable: function() {
3554 locked = queue = [];
3555 list = memory = "";
3556 return this;
3557 },
3558 disabled: function() {
3559 return !list;
3560 },
3561
3562 // Disable .fire
3563 // Also disable .add unless we have memory (since it would have no effect)
3564 // Abort any pending executions
3565 lock: function() {
3566 locked = queue = [];
3567 if ( !memory && !firing ) {
3568 list = memory = "";
3569 }
3570 return this;
3571 },
3572 locked: function() {
3573 return !!locked;
3574 },
3575
3576 // Call all callbacks with the given context and arguments
3577 fireWith: function( context, args ) {
3578 if ( !locked ) {
3579 args = args || [];
3580 args = [ context, args.slice ? args.slice() : args ];
3581 queue.push( args );
3582 if ( !firing ) {
3583 fire();
3584 }
3585 }
3586 return this;
3587 },
3588
3589 // Call all the callbacks with the given arguments
3590 fire: function() {
3591 self.fireWith( this, arguments );
3592 return this;
3593 },
3594
3595 // To know if the callbacks have already been called at least once
3596 fired: function() {
3597 return !!fired;
3598 }
3599 };
3600
3601 return self;
3602};
3603
3604
3605function Identity( v ) {
3606 return v;
3607}
3608function Thrower( ex ) {
3609 throw ex;
3610}
3611
3612function adoptValue( value, resolve, reject, noValue ) {
3613 var method;
3614
3615 try {
3616
3617 // Check for promise aspect first to privilege synchronous behavior
3618 if ( value && isFunction( ( method = value.promise ) ) ) {
3619 method.call( value ).done( resolve ).fail( reject );
3620
3621 // Other thenables
3622 } else if ( value && isFunction( ( method = value.then ) ) ) {
3623 method.call( value, resolve, reject );
3624
3625 // Other non-thenables
3626 } else {
3627
3628 // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:
3629 // * false: [ value ].slice( 0 ) => resolve( value )
3630 // * true: [ value ].slice( 1 ) => resolve()
3631 resolve.apply( undefined, [ value ].slice( noValue ) );
3632 }
3633
3634 // For Promises/A+, convert exceptions into rejections
3635 // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in
3636 // Deferred#then to conditionally suppress rejection.
3637 } catch ( value ) {
3638
3639 // Support: Android 4.0 only
3640 // Strict mode functions invoked without .call/.apply get global-object context
3641 reject.apply( undefined, [ value ] );
3642 }
3643}
3644
3645jQuery.extend( {
3646
3647 Deferred: function( func ) {
3648 var tuples = [
3649
3650 // action, add listener, callbacks,
3651 // ... .then handlers, argument index, [final state]
3652 [ "notify", "progress", jQuery.Callbacks( "memory" ),
3653 jQuery.Callbacks( "memory" ), 2 ],
3654 [ "resolve", "done", jQuery.Callbacks( "once memory" ),
3655 jQuery.Callbacks( "once memory" ), 0, "resolved" ],
3656 [ "reject", "fail", jQuery.Callbacks( "once memory" ),
3657 jQuery.Callbacks( "once memory" ), 1, "rejected" ]
3658 ],
3659 state = "pending",
3660 promise = {
3661 state: function() {
3662 return state;
3663 },
3664 always: function() {
3665 deferred.done( arguments ).fail( arguments );
3666 return this;
3667 },
3668 "catch": function( fn ) {
3669 return promise.then( null, fn );
3670 },
3671
3672 // Keep pipe for back-compat
3673 pipe: function( /* fnDone, fnFail, fnProgress */ ) {
3674 var fns = arguments;
3675
3676 return jQuery.Deferred( function( newDefer ) {
3677 jQuery.each( tuples, function( i, tuple ) {
3678
3679 // Map tuples (progress, done, fail) to arguments (done, fail, progress)
3680 var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];
3681
3682 // deferred.progress(function() { bind to newDefer or newDefer.notify })
3683 // deferred.done(function() { bind to newDefer or newDefer.resolve })
3684 // deferred.fail(function() { bind to newDefer or newDefer.reject })
3685 deferred[ tuple[ 1 ] ]( function() {
3686 var returned = fn && fn.apply( this, arguments );
3687 if ( returned && isFunction( returned.promise ) ) {
3688 returned.promise()
3689 .progress( newDefer.notify )
3690 .done( newDefer.resolve )
3691 .fail( newDefer.reject );
3692 } else {
3693 newDefer[ tuple[ 0 ] + "With" ](
3694 this,
3695 fn ? [ returned ] : arguments
3696 );
3697 }
3698 } );
3699 } );
3700 fns = null;
3701 } ).promise();
3702 },
3703 then: function( onFulfilled, onRejected, onProgress ) {
3704 var maxDepth = 0;
3705 function resolve( depth, deferred, handler, special ) {
3706 return function() {
3707 var that = this,
3708 args = arguments,
3709 mightThrow = function() {
3710 var returned, then;
3711
3712 // Support: Promises/A+ section 2.3.3.3.3
3713 // https://promisesaplus.com/#point-59
3714 // Ignore double-resolution attempts
3715 if ( depth < maxDepth ) {
3716 return;
3717 }
3718
3719 returned = handler.apply( that, args );
3720
3721 // Support: Promises/A+ section 2.3.1
3722 // https://promisesaplus.com/#point-48
3723 if ( returned === deferred.promise() ) {
3724 throw new TypeError( "Thenable self-resolution" );
3725 }
3726
3727 // Support: Promises/A+ sections 2.3.3.1, 3.5
3728 // https://promisesaplus.com/#point-54
3729 // https://promisesaplus.com/#point-75
3730 // Retrieve `then` only once
3731 then = returned &&
3732
3733 // Support: Promises/A+ section 2.3.4
3734 // https://promisesaplus.com/#point-64
3735 // Only check objects and functions for thenability
3736 ( typeof returned === "object" ||
3737 typeof returned === "function" ) &&
3738 returned.then;
3739
3740 // Handle a returned thenable
3741 if ( isFunction( then ) ) {
3742
3743 // Special processors (notify) just wait for resolution
3744 if ( special ) {
3745 then.call(
3746 returned,
3747 resolve( maxDepth, deferred, Identity, special ),
3748 resolve( maxDepth, deferred, Thrower, special )
3749 );
3750
3751 // Normal processors (resolve) also hook into progress
3752 } else {
3753
3754 // ...and disregard older resolution values
3755 maxDepth++;
3756
3757 then.call(
3758 returned,
3759 resolve( maxDepth, deferred, Identity, special ),
3760 resolve( maxDepth, deferred, Thrower, special ),
3761 resolve( maxDepth, deferred, Identity,
3762 deferred.notifyWith )
3763 );
3764 }
3765
3766 // Handle all other returned values
3767 } else {
3768
3769 // Only substitute handlers pass on context
3770 // and multiple values (non-spec behavior)
3771 if ( handler !== Identity ) {
3772 that = undefined;
3773 args = [ returned ];
3774 }
3775
3776 // Process the value(s)
3777 // Default process is resolve
3778 ( special || deferred.resolveWith )( that, args );
3779 }
3780 },
3781
3782 // Only normal processors (resolve) catch and reject exceptions
3783 process = special ?
3784 mightThrow :
3785 function() {
3786 try {
3787 mightThrow();
3788 } catch ( e ) {
3789
3790 if ( jQuery.Deferred.exceptionHook ) {
3791 jQuery.Deferred.exceptionHook( e,
3792 process.stackTrace );
3793 }
3794
3795 // Support: Promises/A+ section 2.3.3.3.4.1
3796 // https://promisesaplus.com/#point-61
3797 // Ignore post-resolution exceptions
3798 if ( depth + 1 >= maxDepth ) {
3799
3800 // Only substitute handlers pass on context
3801 // and multiple values (non-spec behavior)
3802 if ( handler !== Thrower ) {
3803 that = undefined;
3804 args = [ e ];
3805 }
3806
3807 deferred.rejectWith( that, args );
3808 }
3809 }
3810 };
3811
3812 // Support: Promises/A+ section 2.3.3.3.1
3813 // https://promisesaplus.com/#point-57
3814 // Re-resolve promises immediately to dodge false rejection from
3815 // subsequent errors
3816 if ( depth ) {
3817 process();
3818 } else {
3819
3820 // Call an optional hook to record the stack, in case of exception
3821 // since it's otherwise lost when execution goes async
3822 if ( jQuery.Deferred.getStackHook ) {
3823 process.stackTrace = jQuery.Deferred.getStackHook();
3824 }
3825 window.setTimeout( process );
3826 }
3827 };
3828 }
3829
3830 return jQuery.Deferred( function( newDefer ) {
3831
3832 // progress_handlers.add( ... )
3833 tuples[ 0 ][ 3 ].add(
3834 resolve(
3835 0,
3836 newDefer,
3837 isFunction( onProgress ) ?
3838 onProgress :
3839 Identity,
3840 newDefer.notifyWith
3841 )
3842 );
3843
3844 // fulfilled_handlers.add( ... )
3845 tuples[ 1 ][ 3 ].add(
3846 resolve(
3847 0,
3848 newDefer,
3849 isFunction( onFulfilled ) ?
3850 onFulfilled :
3851 Identity
3852 )
3853 );
3854
3855 // rejected_handlers.add( ... )
3856 tuples[ 2 ][ 3 ].add(
3857 resolve(
3858 0,
3859 newDefer,
3860 isFunction( onRejected ) ?
3861 onRejected :
3862 Thrower
3863 )
3864 );
3865 } ).promise();
3866 },
3867
3868 // Get a promise for this deferred
3869 // If obj is provided, the promise aspect is added to the object
3870 promise: function( obj ) {
3871 return obj != null ? jQuery.extend( obj, promise ) : promise;
3872 }
3873 },
3874 deferred = {};
3875
3876 // Add list-specific methods
3877 jQuery.each( tuples, function( i, tuple ) {
3878 var list = tuple[ 2 ],
3879 stateString = tuple[ 5 ];
3880
3881 // promise.progress = list.add
3882 // promise.done = list.add
3883 // promise.fail = list.add
3884 promise[ tuple[ 1 ] ] = list.add;
3885
3886 // Handle state
3887 if ( stateString ) {
3888 list.add(
3889 function() {
3890
3891 // state = "resolved" (i.e., fulfilled)
3892 // state = "rejected"
3893 state = stateString;
3894 },
3895
3896 // rejected_callbacks.disable
3897 // fulfilled_callbacks.disable
3898 tuples[ 3 - i ][ 2 ].disable,
3899
3900 // rejected_handlers.disable
3901 // fulfilled_handlers.disable
3902 tuples[ 3 - i ][ 3 ].disable,
3903
3904 // progress_callbacks.lock
3905 tuples[ 0 ][ 2 ].lock,
3906
3907 // progress_handlers.lock
3908 tuples[ 0 ][ 3 ].lock
3909 );
3910 }
3911
3912 // progress_handlers.fire
3913 // fulfilled_handlers.fire
3914 // rejected_handlers.fire
3915 list.add( tuple[ 3 ].fire );
3916
3917 // deferred.notify = function() { deferred.notifyWith(...) }
3918 // deferred.resolve = function() { deferred.resolveWith(...) }
3919 // deferred.reject = function() { deferred.rejectWith(...) }
3920 deferred[ tuple[ 0 ] ] = function() {
3921 deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments );
3922 return this;
3923 };
3924
3925 // deferred.notifyWith = list.fireWith
3926 // deferred.resolveWith = list.fireWith
3927 // deferred.rejectWith = list.fireWith
3928 deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
3929 } );
3930
3931 // Make the deferred a promise
3932 promise.promise( deferred );
3933
3934 // Call given func if any
3935 if ( func ) {
3936 func.call( deferred, deferred );
3937 }
3938
3939 // All done!
3940 return deferred;
3941 },
3942
3943 // Deferred helper
3944 when: function( singleValue ) {
3945 var
3946
3947 // count of uncompleted subordinates
3948 remaining = arguments.length,
3949
3950 // count of unprocessed arguments
3951 i = remaining,
3952
3953 // subordinate fulfillment data
3954 resolveContexts = Array( i ),
3955 resolveValues = slice.call( arguments ),
3956
3957 // the master Deferred
3958 master = jQuery.Deferred(),
3959
3960 // subordinate callback factory
3961 updateFunc = function( i ) {
3962 return function( value ) {
3963 resolveContexts[ i ] = this;
3964 resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
3965 if ( !( --remaining ) ) {
3966 master.resolveWith( resolveContexts, resolveValues );
3967 }
3968 };
3969 };
3970
3971 // Single- and empty arguments are adopted like Promise.resolve
3972 if ( remaining <= 1 ) {
3973 adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject,
3974 !remaining );
3975
3976 // Use .then() to unwrap secondary thenables (cf. gh-3000)
3977 if ( master.state() === "pending" ||
3978 isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {
3979
3980 return master.then();
3981 }
3982 }
3983
3984 // Multiple arguments are aggregated like Promise.all array elements
3985 while ( i-- ) {
3986 adoptValue( resolveValues[ i ], updateFunc( i ), master.reject );
3987 }
3988
3989 return master.promise();
3990 }
3991} );
3992
3993
3994// These usually indicate a programmer mistake during development,
3995// warn about them ASAP rather than swallowing them by default.
3996var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
3997
3998jQuery.Deferred.exceptionHook = function( error, stack ) {
3999
4000 // Support: IE 8 - 9 only
4001 // Console exists when dev tools are open, which can happen at any time
4002 if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {
4003 window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack );
4004 }
4005};
4006
4007
4008
4009
4010jQuery.readyException = function( error ) {
4011 window.setTimeout( function() {
4012 throw error;
4013 } );
4014};
4015
4016
4017
4018
4019// The deferred used on DOM ready
4020var readyList = jQuery.Deferred();
4021
4022jQuery.fn.ready = function( fn ) {
4023
4024 readyList
4025 .then( fn )
4026
4027 // Wrap jQuery.readyException in a function so that the lookup
4028 // happens at the time of error handling instead of callback
4029 // registration.
4030 .catch( function( error ) {
4031 jQuery.readyException( error );
4032 } );
4033
4034 return this;
4035};
4036
4037jQuery.extend( {
4038
4039 // Is the DOM ready to be used? Set to true once it occurs.
4040 isReady: false,
4041
4042 // A counter to track how many items to wait for before
4043 // the ready event fires. See #6781
4044 readyWait: 1,
4045
4046 // Handle when the DOM is ready
4047 ready: function( wait ) {
4048
4049 // Abort if there are pending holds or we're already ready
4050 if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
4051 return;
4052 }
4053
4054 // Remember that the DOM is ready
4055 jQuery.isReady = true;
4056
4057 // If a normal DOM Ready event fired, decrement, and wait if need be
4058 if ( wait !== true && --jQuery.readyWait > 0 ) {
4059 return;
4060 }
4061
4062 // If there are functions bound, to execute
4063 readyList.resolveWith( document, [ jQuery ] );
4064 }
4065} );
4066
4067jQuery.ready.then = readyList.then;
4068
4069// The ready event handler and self cleanup method
4070function completed() {
4071 document.removeEventListener( "DOMContentLoaded", completed );
4072 window.removeEventListener( "load", completed );
4073 jQuery.ready();
4074}
4075
4076// Catch cases where $(document).ready() is called
4077// after the browser event has already occurred.
4078// Support: IE <=9 - 10 only
4079// Older IE sometimes signals "interactive" too soon
4080if ( document.readyState === "complete" ||
4081 ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
4082
4083 // Handle it asynchronously to allow scripts the opportunity to delay ready
4084 window.setTimeout( jQuery.ready );
4085
4086} else {
4087
4088 // Use the handy event callback
4089 document.addEventListener( "DOMContentLoaded", completed );
4090
4091 // A fallback to window.onload, that will always work
4092 window.addEventListener( "load", completed );
4093}
4094
4095
4096
4097
4098// Multifunctional method to get and set values of a collection
4099// The value/s can optionally be executed if it's a function
4100var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
4101 var i = 0,
4102 len = elems.length,
4103 bulk = key == null;
4104
4105 // Sets many values
4106 if ( toType( key ) === "object" ) {
4107 chainable = true;
4108 for ( i in key ) {
4109 access( elems, fn, i, key[ i ], true, emptyGet, raw );
4110 }
4111
4112 // Sets one value
4113 } else if ( value !== undefined ) {
4114 chainable = true;
4115
4116 if ( !isFunction( value ) ) {
4117 raw = true;
4118 }
4119
4120 if ( bulk ) {
4121
4122 // Bulk operations run against the entire set
4123 if ( raw ) {
4124 fn.call( elems, value );
4125 fn = null;
4126
4127 // ...except when executing function values
4128 } else {
4129 bulk = fn;
4130 fn = function( elem, key, value ) {
4131 return bulk.call( jQuery( elem ), value );
4132 };
4133 }
4134 }
4135
4136 if ( fn ) {
4137 for ( ; i < len; i++ ) {
4138 fn(
4139 elems[ i ], key, raw ?
4140 value :
4141 value.call( elems[ i ], i, fn( elems[ i ], key ) )
4142 );
4143 }
4144 }
4145 }
4146
4147 if ( chainable ) {
4148 return elems;
4149 }
4150
4151 // Gets
4152 if ( bulk ) {
4153 return fn.call( elems );
4154 }
4155
4156 return len ? fn( elems[ 0 ], key ) : emptyGet;
4157};
4158
4159
4160// Matches dashed string for camelizing
4161var rmsPrefix = /^-ms-/,
4162 rdashAlpha = /-([a-z])/g;
4163
4164// Used by camelCase as callback to replace()
4165function fcamelCase( all, letter ) {
4166 return letter.toUpperCase();
4167}
4168
4169// Convert dashed to camelCase; used by the css and data modules
4170// Support: IE <=9 - 11, Edge 12 - 15
4171// Microsoft forgot to hump their vendor prefix (#9572)
4172function camelCase( string ) {
4173 return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
4174}
4175var acceptData = function( owner ) {
4176
4177 // Accepts only:
4178 // - Node
4179 // - Node.ELEMENT_NODE
4180 // - Node.DOCUMENT_NODE
4181 // - Object
4182 // - Any
4183 return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
4184};
4185
4186
4187
4188
4189function Data() {
4190 this.expando = jQuery.expando + Data.uid++;
4191}
4192
4193Data.uid = 1;
4194
4195Data.prototype = {
4196
4197 cache: function( owner ) {
4198
4199 // Check if the owner object already has a cache
4200 var value = owner[ this.expando ];
4201
4202 // If not, create one
4203 if ( !value ) {
4204 value = {};
4205
4206 // We can accept data for non-element nodes in modern browsers,
4207 // but we should not, see #8335.
4208 // Always return an empty object.
4209 if ( acceptData( owner ) ) {
4210
4211 // If it is a node unlikely to be stringify-ed or looped over
4212 // use plain assignment
4213 if ( owner.nodeType ) {
4214 owner[ this.expando ] = value;
4215
4216 // Otherwise secure it in a non-enumerable property
4217 // configurable must be true to allow the property to be
4218 // deleted when data is removed
4219 } else {
4220 Object.defineProperty( owner, this.expando, {
4221 value: value,
4222 configurable: true
4223 } );
4224 }
4225 }
4226 }
4227
4228 return value;
4229 },
4230 set: function( owner, data, value ) {
4231 var prop,
4232 cache = this.cache( owner );
4233
4234 // Handle: [ owner, key, value ] args
4235 // Always use camelCase key (gh-2257)
4236 if ( typeof data === "string" ) {
4237 cache[ camelCase( data ) ] = value;
4238
4239 // Handle: [ owner, { properties } ] args
4240 } else {
4241
4242 // Copy the properties one-by-one to the cache object
4243 for ( prop in data ) {
4244 cache[ camelCase( prop ) ] = data[ prop ];
4245 }
4246 }
4247 return cache;
4248 },
4249 get: function( owner, key ) {
4250 return key === undefined ?
4251 this.cache( owner ) :
4252
4253 // Always use camelCase key (gh-2257)
4254 owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];
4255 },
4256 access: function( owner, key, value ) {
4257
4258 // In cases where either:
4259 //
4260 // 1. No key was specified
4261 // 2. A string key was specified, but no value provided
4262 //
4263 // Take the "read" path and allow the get method to determine
4264 // which value to return, respectively either:
4265 //
4266 // 1. The entire cache object
4267 // 2. The data stored at the key
4268 //
4269 if ( key === undefined ||
4270 ( ( key && typeof key === "string" ) && value === undefined ) ) {
4271
4272 return this.get( owner, key );
4273 }
4274
4275 // When the key is not a string, or both a key and value
4276 // are specified, set or extend (existing objects) with either:
4277 //
4278 // 1. An object of properties
4279 // 2. A key and value
4280 //
4281 this.set( owner, key, value );
4282
4283 // Since the "set" path can have two possible entry points
4284 // return the expected data based on which path was taken[*]
4285 return value !== undefined ? value : key;
4286 },
4287 remove: function( owner, key ) {
4288 var i,
4289 cache = owner[ this.expando ];
4290
4291 if ( cache === undefined ) {
4292 return;
4293 }
4294
4295 if ( key !== undefined ) {
4296
4297 // Support array or space separated string of keys
4298 if ( Array.isArray( key ) ) {
4299
4300 // If key is an array of keys...
4301 // We always set camelCase keys, so remove that.
4302 key = key.map( camelCase );
4303 } else {
4304 key = camelCase( key );
4305
4306 // If a key with the spaces exists, use it.
4307 // Otherwise, create an array by matching non-whitespace
4308 key = key in cache ?
4309 [ key ] :
4310 ( key.match( rnothtmlwhite ) || [] );
4311 }
4312
4313 i = key.length;
4314
4315 while ( i-- ) {
4316 delete cache[ key[ i ] ];
4317 }
4318 }
4319
4320 // Remove the expando if there's no more data
4321 if ( key === undefined || jQuery.isEmptyObject( cache ) ) {
4322
4323 // Support: Chrome <=35 - 45
4324 // Webkit & Blink performance suffers when deleting properties
4325 // from DOM nodes, so set to undefined instead
4326 // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)
4327 if ( owner.nodeType ) {
4328 owner[ this.expando ] = undefined;
4329 } else {
4330 delete owner[ this.expando ];
4331 }
4332 }
4333 },
4334 hasData: function( owner ) {
4335 var cache = owner[ this.expando ];
4336 return cache !== undefined && !jQuery.isEmptyObject( cache );
4337 }
4338};
4339var dataPriv = new Data();
4340
4341var dataUser = new Data();
4342
4343
4344
4345// Implementation Summary
4346//
4347// 1. Enforce API surface and semantic compatibility with 1.9.x branch
4348// 2. Improve the module's maintainability by reducing the storage
4349// paths to a single mechanism.
4350// 3. Use the same single mechanism to support "private" and "user" data.
4351// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
4352// 5. Avoid exposing implementation details on user objects (eg. expando properties)
4353// 6. Provide a clear path for implementation upgrade to WeakMap in 2014
4354
4355var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
4356 rmultiDash = /[A-Z]/g;
4357
4358function getData( data ) {
4359 if ( data === "true" ) {
4360 return true;
4361 }
4362
4363 if ( data === "false" ) {
4364 return false;
4365 }
4366
4367 if ( data === "null" ) {
4368 return null;
4369 }
4370
4371 // Only convert to a number if it doesn't change the string
4372 if ( data === +data + "" ) {
4373 return +data;
4374 }
4375
4376 if ( rbrace.test( data ) ) {
4377 return JSON.parse( data );
4378 }
4379
4380 return data;
4381}
4382
4383function dataAttr( elem, key, data ) {
4384 var name;
4385
4386 // If nothing was found internally, try to fetch any
4387 // data from the HTML5 data-* attribute
4388 if ( data === undefined && elem.nodeType === 1 ) {
4389 name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
4390 data = elem.getAttribute( name );
4391
4392 if ( typeof data === "string" ) {
4393 try {
4394 data = getData( data );
4395 } catch ( e ) {}
4396
4397 // Make sure we set the data so it isn't changed later
4398 dataUser.set( elem, key, data );
4399 } else {
4400 data = undefined;
4401 }
4402 }
4403 return data;
4404}
4405
4406jQuery.extend( {
4407 hasData: function( elem ) {
4408 return dataUser.hasData( elem ) || dataPriv.hasData( elem );
4409 },
4410
4411 data: function( elem, name, data ) {
4412 return dataUser.access( elem, name, data );
4413 },
4414
4415 removeData: function( elem, name ) {
4416 dataUser.remove( elem, name );
4417 },
4418
4419 // TODO: Now that all calls to _data and _removeData have been replaced
4420 // with direct calls to dataPriv methods, these can be deprecated.
4421 _data: function( elem, name, data ) {
4422 return dataPriv.access( elem, name, data );
4423 },
4424
4425 _removeData: function( elem, name ) {
4426 dataPriv.remove( elem, name );
4427 }
4428} );
4429
4430jQuery.fn.extend( {
4431 data: function( key, value ) {
4432 var i, name, data,
4433 elem = this[ 0 ],
4434 attrs = elem && elem.attributes;
4435
4436 // Gets all values
4437 if ( key === undefined ) {
4438 if ( this.length ) {
4439 data = dataUser.get( elem );
4440
4441 if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
4442 i = attrs.length;
4443 while ( i-- ) {
4444
4445 // Support: IE 11 only
4446 // The attrs elements can be null (#14894)
4447 if ( attrs[ i ] ) {
4448 name = attrs[ i ].name;
4449 if ( name.indexOf( "data-" ) === 0 ) {
4450 name = camelCase( name.slice( 5 ) );
4451 dataAttr( elem, name, data[ name ] );
4452 }
4453 }
4454 }
4455 dataPriv.set( elem, "hasDataAttrs", true );
4456 }
4457 }
4458
4459 return data;
4460 }
4461
4462 // Sets multiple values
4463 if ( typeof key === "object" ) {
4464 return this.each( function() {
4465 dataUser.set( this, key );
4466 } );
4467 }
4468
4469 return access( this, function( value ) {
4470 var data;
4471
4472 // The calling jQuery object (element matches) is not empty
4473 // (and therefore has an element appears at this[ 0 ]) and the
4474 // `value` parameter was not undefined. An empty jQuery object
4475 // will result in `undefined` for elem = this[ 0 ] which will
4476 // throw an exception if an attempt to read a data cache is made.
4477 if ( elem && value === undefined ) {
4478
4479 // Attempt to get data from the cache
4480 // The key will always be camelCased in Data
4481 data = dataUser.get( elem, key );
4482 if ( data !== undefined ) {
4483 return data;
4484 }
4485
4486 // Attempt to "discover" the data in
4487 // HTML5 custom data-* attrs
4488 data = dataAttr( elem, key );
4489 if ( data !== undefined ) {
4490 return data;
4491 }
4492
4493 // We tried really hard, but the data doesn't exist.
4494 return;
4495 }
4496
4497 // Set the data...
4498 this.each( function() {
4499
4500 // We always store the camelCased key
4501 dataUser.set( this, key, value );
4502 } );
4503 }, null, value, arguments.length > 1, null, true );
4504 },
4505
4506 removeData: function( key ) {
4507 return this.each( function() {
4508 dataUser.remove( this, key );
4509 } );
4510 }
4511} );
4512
4513
4514jQuery.extend( {
4515 queue: function( elem, type, data ) {
4516 var queue;
4517
4518 if ( elem ) {
4519 type = ( type || "fx" ) + "queue";
4520 queue = dataPriv.get( elem, type );
4521
4522 // Speed up dequeue by getting out quickly if this is just a lookup
4523 if ( data ) {
4524 if ( !queue || Array.isArray( data ) ) {
4525 queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
4526 } else {
4527 queue.push( data );
4528 }
4529 }
4530 return queue || [];
4531 }
4532 },
4533
4534 dequeue: function( elem, type ) {
4535 type = type || "fx";
4536
4537 var queue = jQuery.queue( elem, type ),
4538 startLength = queue.length,
4539 fn = queue.shift(),
4540 hooks = jQuery._queueHooks( elem, type ),
4541 next = function() {
4542 jQuery.dequeue( elem, type );
4543 };
4544
4545 // If the fx queue is dequeued, always remove the progress sentinel
4546 if ( fn === "inprogress" ) {
4547 fn = queue.shift();
4548 startLength--;
4549 }
4550
4551 if ( fn ) {
4552
4553 // Add a progress sentinel to prevent the fx queue from being
4554 // automatically dequeued
4555 if ( type === "fx" ) {
4556 queue.unshift( "inprogress" );
4557 }
4558
4559 // Clear up the last queue stop function
4560 delete hooks.stop;
4561 fn.call( elem, next, hooks );
4562 }
4563
4564 if ( !startLength && hooks ) {
4565 hooks.empty.fire();
4566 }
4567 },
4568
4569 // Not public - generate a queueHooks object, or return the current one
4570 _queueHooks: function( elem, type ) {
4571 var key = type + "queueHooks";
4572 return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
4573 empty: jQuery.Callbacks( "once memory" ).add( function() {
4574 dataPriv.remove( elem, [ type + "queue", key ] );
4575 } )
4576 } );
4577 }
4578} );
4579
4580jQuery.fn.extend( {
4581 queue: function( type, data ) {
4582 var setter = 2;
4583
4584 if ( typeof type !== "string" ) {
4585 data = type;
4586 type = "fx";
4587 setter--;
4588 }
4589
4590 if ( arguments.length < setter ) {
4591 return jQuery.queue( this[ 0 ], type );
4592 }
4593
4594 return data === undefined ?
4595 this :
4596 this.each( function() {
4597 var queue = jQuery.queue( this, type, data );
4598
4599 // Ensure a hooks for this queue
4600 jQuery._queueHooks( this, type );
4601
4602 if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {
4603 jQuery.dequeue( this, type );
4604 }
4605 } );
4606 },
4607 dequeue: function( type ) {
4608 return this.each( function() {
4609 jQuery.dequeue( this, type );
4610 } );
4611 },
4612 clearQueue: function( type ) {
4613 return this.queue( type || "fx", [] );
4614 },
4615
4616 // Get a promise resolved when queues of a certain type
4617 // are emptied (fx is the type by default)
4618 promise: function( type, obj ) {
4619 var tmp,
4620 count = 1,
4621 defer = jQuery.Deferred(),
4622 elements = this,
4623 i = this.length,
4624 resolve = function() {
4625 if ( !( --count ) ) {
4626 defer.resolveWith( elements, [ elements ] );
4627 }
4628 };
4629
4630 if ( typeof type !== "string" ) {
4631 obj = type;
4632 type = undefined;
4633 }
4634 type = type || "fx";
4635
4636 while ( i-- ) {
4637 tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
4638 if ( tmp && tmp.empty ) {
4639 count++;
4640 tmp.empty.add( resolve );
4641 }
4642 }
4643 resolve();
4644 return defer.promise( obj );
4645 }
4646} );
4647var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source;
4648
4649var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );
4650
4651
4652var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
4653
4654var isHiddenWithinTree = function( elem, el ) {
4655
4656 // isHiddenWithinTree might be called from jQuery#filter function;
4657 // in that case, element will be second argument
4658 elem = el || elem;
4659
4660 // Inline style trumps all
4661 return elem.style.display === "none" ||
4662 elem.style.display === "" &&
4663
4664 // Otherwise, check computed style
4665 // Support: Firefox <=43 - 45
4666 // Disconnected elements can have computed display: none, so first confirm that elem is
4667 // in the document.
4668 jQuery.contains( elem.ownerDocument, elem ) &&
4669
4670 jQuery.css( elem, "display" ) === "none";
4671 };
4672
4673var swap = function( elem, options, callback, args ) {
4674 var ret, name,
4675 old = {};
4676
4677 // Remember the old values, and insert the new ones
4678 for ( name in options ) {
4679 old[ name ] = elem.style[ name ];
4680 elem.style[ name ] = options[ name ];
4681 }
4682
4683 ret = callback.apply( elem, args || [] );
4684
4685 // Revert the old values
4686 for ( name in options ) {
4687 elem.style[ name ] = old[ name ];
4688 }
4689
4690 return ret;
4691};
4692
4693
4694
4695
4696function adjustCSS( elem, prop, valueParts, tween ) {
4697 var adjusted, scale,
4698 maxIterations = 20,
4699 currentValue = tween ?
4700 function() {
4701 return tween.cur();
4702 } :
4703 function() {
4704 return jQuery.css( elem, prop, "" );
4705 },
4706 initial = currentValue(),
4707 unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
4708
4709 // Starting value computation is required for potential unit mismatches
4710 initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
4711 rcssNum.exec( jQuery.css( elem, prop ) );
4712
4713 if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
4714
4715 // Support: Firefox <=54
4716 // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)
4717 initial = initial / 2;
4718
4719 // Trust units reported by jQuery.css
4720 unit = unit || initialInUnit[ 3 ];
4721
4722 // Iteratively approximate from a nonzero starting point
4723 initialInUnit = +initial || 1;
4724
4725 while ( maxIterations-- ) {
4726
4727 // Evaluate and update our best guess (doubling guesses that zero out).
4728 // Finish if the scale equals or crosses 1 (making the old*new product non-positive).
4729 jQuery.style( elem, prop, initialInUnit + unit );
4730 if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {
4731 maxIterations = 0;
4732 }
4733 initialInUnit = initialInUnit / scale;
4734
4735 }
4736
4737 initialInUnit = initialInUnit * 2;
4738 jQuery.style( elem, prop, initialInUnit + unit );
4739
4740 // Make sure we update the tween properties later on
4741 valueParts = valueParts || [];
4742 }
4743
4744 if ( valueParts ) {
4745 initialInUnit = +initialInUnit || +initial || 0;
4746
4747 // Apply relative offset (+=/-=) if specified
4748 adjusted = valueParts[ 1 ] ?
4749 initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
4750 +valueParts[ 2 ];
4751 if ( tween ) {
4752 tween.unit = unit;
4753 tween.start = initialInUnit;
4754 tween.end = adjusted;
4755 }
4756 }
4757 return adjusted;
4758}
4759
4760
4761var defaultDisplayMap = {};
4762
4763function getDefaultDisplay( elem ) {
4764 var temp,
4765 doc = elem.ownerDocument,
4766 nodeName = elem.nodeName,
4767 display = defaultDisplayMap[ nodeName ];
4768
4769 if ( display ) {
4770 return display;
4771 }
4772
4773 temp = doc.body.appendChild( doc.createElement( nodeName ) );
4774 display = jQuery.css( temp, "display" );
4775
4776 temp.parentNode.removeChild( temp );
4777
4778 if ( display === "none" ) {
4779 display = "block";
4780 }
4781 defaultDisplayMap[ nodeName ] = display;
4782
4783 return display;
4784}
4785
4786function showHide( elements, show ) {
4787 var display, elem,
4788 values = [],
4789 index = 0,
4790 length = elements.length;
4791
4792 // Determine new display value for elements that need to change
4793 for ( ; index < length; index++ ) {
4794 elem = elements[ index ];
4795 if ( !elem.style ) {
4796 continue;
4797 }
4798
4799 display = elem.style.display;
4800 if ( show ) {
4801
4802 // Since we force visibility upon cascade-hidden elements, an immediate (and slow)
4803 // check is required in this first loop unless we have a nonempty display value (either
4804 // inline or about-to-be-restored)
4805 if ( display === "none" ) {
4806 values[ index ] = dataPriv.get( elem, "display" ) || null;
4807 if ( !values[ index ] ) {
4808 elem.style.display = "";
4809 }
4810 }
4811 if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) {
4812 values[ index ] = getDefaultDisplay( elem );
4813 }
4814 } else {
4815 if ( display !== "none" ) {
4816 values[ index ] = "none";
4817
4818 // Remember what we're overwriting
4819 dataPriv.set( elem, "display", display );
4820 }
4821 }
4822 }
4823
4824 // Set the display of the elements in a second loop to avoid constant reflow
4825 for ( index = 0; index < length; index++ ) {
4826 if ( values[ index ] != null ) {
4827 elements[ index ].style.display = values[ index ];
4828 }
4829 }
4830
4831 return elements;
4832}
4833
4834jQuery.fn.extend( {
4835 show: function() {
4836 return showHide( this, true );
4837 },
4838 hide: function() {
4839 return showHide( this );
4840 },
4841 toggle: function( state ) {
4842 if ( typeof state === "boolean" ) {
4843 return state ? this.show() : this.hide();
4844 }
4845
4846 return this.each( function() {
4847 if ( isHiddenWithinTree( this ) ) {
4848 jQuery( this ).show();
4849 } else {
4850 jQuery( this ).hide();
4851 }
4852 } );
4853 }
4854} );
4855var rcheckableType = ( /^(?:checkbox|radio)$/i );
4856
4857var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]+)/i );
4858
4859var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i );
4860
4861
4862
4863// We have to close these tags to support XHTML (#13200)
4864var wrapMap = {
4865
4866 // Support: IE <=9 only
4867 option: [ 1, "<select multiple='multiple'>", "</select>" ],
4868
4869 // XHTML parsers do not magically insert elements in the
4870 // same way that tag soup parsers do. So we cannot shorten
4871 // this by omitting <tbody> or other required elements.
4872 thead: [ 1, "<table>", "</table>" ],
4873 col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
4874 tr: [ 2, "<table><tbody>", "</tbody></table>" ],
4875 td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
4876
4877 _default: [ 0, "", "" ]
4878};
4879
4880// Support: IE <=9 only
4881wrapMap.optgroup = wrapMap.option;
4882
4883wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
4884wrapMap.th = wrapMap.td;
4885
4886
4887function getAll( context, tag ) {
4888
4889 // Support: IE <=9 - 11 only
4890 // Use typeof to avoid zero-argument method invocation on host objects (#15151)
4891 var ret;
4892
4893 if ( typeof context.getElementsByTagName !== "undefined" ) {
4894 ret = context.getElementsByTagName( tag || "*" );
4895
4896 } else if ( typeof context.querySelectorAll !== "undefined" ) {
4897 ret = context.querySelectorAll( tag || "*" );
4898
4899 } else {
4900 ret = [];
4901 }
4902
4903 if ( tag === undefined || tag && nodeName( context, tag ) ) {
4904 return jQuery.merge( [ context ], ret );
4905 }
4906
4907 return ret;
4908}
4909
4910
4911// Mark scripts as having already been evaluated
4912function setGlobalEval( elems, refElements ) {
4913 var i = 0,
4914 l = elems.length;
4915
4916 for ( ; i < l; i++ ) {
4917 dataPriv.set(
4918 elems[ i ],
4919 "globalEval",
4920 !refElements || dataPriv.get( refElements[ i ], "globalEval" )
4921 );
4922 }
4923}
4924
4925
4926var rhtml = /<|&#?\w+;/;
4927
4928function buildFragment( elems, context, scripts, selection, ignored ) {
4929 var elem, tmp, tag, wrap, contains, j,
4930 fragment = context.createDocumentFragment(),
4931 nodes = [],
4932 i = 0,
4933 l = elems.length;
4934
4935 for ( ; i < l; i++ ) {
4936 elem = elems[ i ];
4937
4938 if ( elem || elem === 0 ) {
4939
4940 // Add nodes directly
4941 if ( toType( elem ) === "object" ) {
4942
4943 // Support: Android <=4.0 only, PhantomJS 1 only
4944 // push.apply(_, arraylike) throws on ancient WebKit
4945 jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
4946
4947 // Convert non-html into a text node
4948 } else if ( !rhtml.test( elem ) ) {
4949 nodes.push( context.createTextNode( elem ) );
4950
4951 // Convert html into DOM nodes
4952 } else {
4953 tmp = tmp || fragment.appendChild( context.createElement( "div" ) );
4954
4955 // Deserialize a standard representation
4956 tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
4957 wrap = wrapMap[ tag ] || wrapMap._default;
4958 tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];
4959
4960 // Descend through wrappers to the right content
4961 j = wrap[ 0 ];
4962 while ( j-- ) {
4963 tmp = tmp.lastChild;
4964 }
4965
4966 // Support: Android <=4.0 only, PhantomJS 1 only
4967 // push.apply(_, arraylike) throws on ancient WebKit
4968 jQuery.merge( nodes, tmp.childNodes );
4969
4970 // Remember the top-level container
4971 tmp = fragment.firstChild;
4972
4973 // Ensure the created nodes are orphaned (#12392)
4974 tmp.textContent = "";
4975 }
4976 }
4977 }
4978
4979 // Remove wrapper from fragment
4980 fragment.textContent = "";
4981
4982 i = 0;
4983 while ( ( elem = nodes[ i++ ] ) ) {
4984
4985 // Skip elements already in the context collection (trac-4087)
4986 if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
4987 if ( ignored ) {
4988 ignored.push( elem );
4989 }
4990 continue;
4991 }
4992
4993 contains = jQuery.contains( elem.ownerDocument, elem );
4994
4995 // Append to fragment
4996 tmp = getAll( fragment.appendChild( elem ), "script" );
4997
4998 // Preserve script evaluation history
4999 if ( contains ) {
5000 setGlobalEval( tmp );
5001 }
5002
5003 // Capture executables
5004 if ( scripts ) {
5005 j = 0;
5006 while ( ( elem = tmp[ j++ ] ) ) {
5007 if ( rscriptType.test( elem.type || "" ) ) {
5008 scripts.push( elem );
5009 }
5010 }
5011 }
5012 }
5013
5014 return fragment;
5015}
5016
5017
5018( function() {
5019 var fragment = document.createDocumentFragment(),
5020 div = fragment.appendChild( document.createElement( "div" ) ),
5021 input = document.createElement( "input" );
5022
5023 // Support: Android 4.0 - 4.3 only
5024 // Check state lost if the name is set (#11217)
5025 // Support: Windows Web Apps (WWA)
5026 // `name` and `type` must use .setAttribute for WWA (#14901)
5027 input.setAttribute( "type", "radio" );
5028 input.setAttribute( "checked", "checked" );
5029 input.setAttribute( "name", "t" );
5030
5031 div.appendChild( input );
5032
5033 // Support: Android <=4.1 only
5034 // Older WebKit doesn't clone checked state correctly in fragments
5035 support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
5036
5037 // Support: IE <=11 only
5038 // Make sure textarea (and checkbox) defaultValue is properly cloned
5039 div.innerHTML = "<textarea>x</textarea>";
5040 support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
5041} )();
5042var documentElement = document.documentElement;
5043
5044
5045
5046var
5047 rkeyEvent = /^key/,
5048 rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
5049 rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
5050
5051function returnTrue() {
5052 return true;
5053}
5054
5055function returnFalse() {
5056 return false;
5057}
5058
5059// Support: IE <=9 only
5060// See #13393 for more info
5061function safeActiveElement() {
5062 try {
5063 return document.activeElement;
5064 } catch ( err ) { }
5065}
5066
5067function on( elem, types, selector, data, fn, one ) {
5068 var origFn, type;
5069
5070 // Types can be a map of types/handlers
5071 if ( typeof types === "object" ) {
5072
5073 // ( types-Object, selector, data )
5074 if ( typeof selector !== "string" ) {
5075
5076 // ( types-Object, data )
5077 data = data || selector;
5078 selector = undefined;
5079 }
5080 for ( type in types ) {
5081 on( elem, type, selector, data, types[ type ], one );
5082 }
5083 return elem;
5084 }
5085
5086 if ( data == null && fn == null ) {
5087
5088 // ( types, fn )
5089 fn = selector;
5090 data = selector = undefined;
5091 } else if ( fn == null ) {
5092 if ( typeof selector === "string" ) {
5093
5094 // ( types, selector, fn )
5095 fn = data;
5096 data = undefined;
5097 } else {
5098
5099 // ( types, data, fn )
5100 fn = data;
5101 data = selector;
5102 selector = undefined;
5103 }
5104 }
5105 if ( fn === false ) {
5106 fn = returnFalse;
5107 } else if ( !fn ) {
5108 return elem;
5109 }
5110
5111 if ( one === 1 ) {
5112 origFn = fn;
5113 fn = function( event ) {
5114
5115 // Can use an empty set, since event contains the info
5116 jQuery().off( event );
5117 return origFn.apply( this, arguments );
5118 };
5119
5120 // Use same guid so caller can remove using origFn
5121 fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
5122 }
5123 return elem.each( function() {
5124 jQuery.event.add( this, types, fn, data, selector );
5125 } );
5126}
5127
5128/*
5129 * Helper functions for managing events -- not part of the public interface.
5130 * Props to Dean Edwards' addEvent library for many of the ideas.
5131 */
5132jQuery.event = {
5133
5134 global: {},
5135
5136 add: function( elem, types, handler, data, selector ) {
5137
5138 var handleObjIn, eventHandle, tmp,
5139 events, t, handleObj,
5140 special, handlers, type, namespaces, origType,
5141 elemData = dataPriv.get( elem );
5142
5143 // Don't attach events to noData or text/comment nodes (but allow plain objects)
5144 if ( !elemData ) {
5145 return;
5146 }
5147
5148 // Caller can pass in an object of custom data in lieu of the handler
5149 if ( handler.handler ) {
5150 handleObjIn = handler;
5151 handler = handleObjIn.handler;
5152 selector = handleObjIn.selector;
5153 }
5154
5155 // Ensure that invalid selectors throw exceptions at attach time
5156 // Evaluate against documentElement in case elem is a non-element node (e.g., document)
5157 if ( selector ) {
5158 jQuery.find.matchesSelector( documentElement, selector );
5159 }
5160
5161 // Make sure that the handler has a unique ID, used to find/remove it later
5162 if ( !handler.guid ) {
5163 handler.guid = jQuery.guid++;
5164 }
5165
5166 // Init the element's event structure and main handler, if this is the first
5167 if ( !( events = elemData.events ) ) {
5168 events = elemData.events = {};
5169 }
5170 if ( !( eventHandle = elemData.handle ) ) {
5171 eventHandle = elemData.handle = function( e ) {
5172
5173 // Discard the second event of a jQuery.event.trigger() and
5174 // when an event is called after a page has unloaded
5175 return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
5176 jQuery.event.dispatch.apply( elem, arguments ) : undefined;
5177 };
5178 }
5179
5180 // Handle multiple events separated by a space
5181 types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
5182 t = types.length;
5183 while ( t-- ) {
5184 tmp = rtypenamespace.exec( types[ t ] ) || [];
5185 type = origType = tmp[ 1 ];
5186 namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
5187
5188 // There *must* be a type, no attaching namespace-only handlers
5189 if ( !type ) {
5190 continue;
5191 }
5192
5193 // If event changes its type, use the special event handlers for the changed type
5194 special = jQuery.event.special[ type ] || {};
5195
5196 // If selector defined, determine special event api type, otherwise given type
5197 type = ( selector ? special.delegateType : special.bindType ) || type;
5198
5199 // Update special based on newly reset type
5200 special = jQuery.event.special[ type ] || {};
5201
5202 // handleObj is passed to all event handlers
5203 handleObj = jQuery.extend( {
5204 type: type,
5205 origType: origType,
5206 data: data,
5207 handler: handler,
5208 guid: handler.guid,
5209 selector: selector,
5210 needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
5211 namespace: namespaces.join( "." )
5212 }, handleObjIn );
5213
5214 // Init the event handler queue if we're the first
5215 if ( !( handlers = events[ type ] ) ) {
5216 handlers = events[ type ] = [];
5217 handlers.delegateCount = 0;
5218
5219 // Only use addEventListener if the special events handler returns false
5220 if ( !special.setup ||
5221 special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
5222
5223 if ( elem.addEventListener ) {
5224 elem.addEventListener( type, eventHandle );
5225 }
5226 }
5227 }
5228
5229 if ( special.add ) {
5230 special.add.call( elem, handleObj );
5231
5232 if ( !handleObj.handler.guid ) {
5233 handleObj.handler.guid = handler.guid;
5234 }
5235 }
5236
5237 // Add to the element's handler list, delegates in front
5238 if ( selector ) {
5239 handlers.splice( handlers.delegateCount++, 0, handleObj );
5240 } else {
5241 handlers.push( handleObj );
5242 }
5243
5244 // Keep track of which events have ever been used, for event optimization
5245 jQuery.event.global[ type ] = true;
5246 }
5247
5248 },
5249
5250 // Detach an event or set of events from an element
5251 remove: function( elem, types, handler, selector, mappedTypes ) {
5252
5253 var j, origCount, tmp,
5254 events, t, handleObj,
5255 special, handlers, type, namespaces, origType,
5256 elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );
5257
5258 if ( !elemData || !( events = elemData.events ) ) {
5259 return;
5260 }
5261
5262 // Once for each type.namespace in types; type may be omitted
5263 types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
5264 t = types.length;
5265 while ( t-- ) {
5266 tmp = rtypenamespace.exec( types[ t ] ) || [];
5267 type = origType = tmp[ 1 ];
5268 namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
5269
5270 // Unbind all events (on this namespace, if provided) for the element
5271 if ( !type ) {
5272 for ( type in events ) {
5273 jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
5274 }
5275 continue;
5276 }
5277
5278 special = jQuery.event.special[ type ] || {};
5279 type = ( selector ? special.delegateType : special.bindType ) || type;
5280 handlers = events[ type ] || [];
5281 tmp = tmp[ 2 ] &&
5282 new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );
5283
5284 // Remove matching events
5285 origCount = j = handlers.length;
5286 while ( j-- ) {
5287 handleObj = handlers[ j ];
5288
5289 if ( ( mappedTypes || origType === handleObj.origType ) &&
5290 ( !handler || handler.guid === handleObj.guid ) &&
5291 ( !tmp || tmp.test( handleObj.namespace ) ) &&
5292 ( !selector || selector === handleObj.selector ||
5293 selector === "**" && handleObj.selector ) ) {
5294 handlers.splice( j, 1 );
5295
5296 if ( handleObj.selector ) {
5297 handlers.delegateCount--;
5298 }
5299 if ( special.remove ) {
5300 special.remove.call( elem, handleObj );
5301 }
5302 }
5303 }
5304
5305 // Remove generic event handler if we removed something and no more handlers exist
5306 // (avoids potential for endless recursion during removal of special event handlers)
5307 if ( origCount && !handlers.length ) {
5308 if ( !special.teardown ||
5309 special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
5310
5311 jQuery.removeEvent( elem, type, elemData.handle );
5312 }
5313
5314 delete events[ type ];
5315 }
5316 }
5317
5318 // Remove data and the expando if it's no longer used
5319 if ( jQuery.isEmptyObject( events ) ) {
5320 dataPriv.remove( elem, "handle events" );
5321 }
5322 },
5323
5324 dispatch: function( nativeEvent ) {
5325
5326 // Make a writable jQuery.Event from the native event object
5327 var event = jQuery.event.fix( nativeEvent );
5328
5329 var i, j, ret, matched, handleObj, handlerQueue,
5330 args = new Array( arguments.length ),
5331 handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [],
5332 special = jQuery.event.special[ event.type ] || {};
5333
5334 // Use the fix-ed jQuery.Event rather than the (read-only) native event
5335 args[ 0 ] = event;
5336
5337 for ( i = 1; i < arguments.length; i++ ) {
5338 args[ i ] = arguments[ i ];
5339 }
5340
5341 event.delegateTarget = this;
5342
5343 // Call the preDispatch hook for the mapped type, and let it bail if desired
5344 if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
5345 return;
5346 }
5347
5348 // Determine handlers
5349 handlerQueue = jQuery.event.handlers.call( this, event, handlers );
5350
5351 // Run delegates first; they may want to stop propagation beneath us
5352 i = 0;
5353 while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
5354 event.currentTarget = matched.elem;
5355
5356 j = 0;
5357 while ( ( handleObj = matched.handlers[ j++ ] ) &&
5358 !event.isImmediatePropagationStopped() ) {
5359
5360 // Triggered event must either 1) have no namespace, or 2) have namespace(s)
5361 // a subset or equal to those in the bound event (both can have no namespace).
5362 if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {
5363
5364 event.handleObj = handleObj;
5365 event.data = handleObj.data;
5366
5367 ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
5368 handleObj.handler ).apply( matched.elem, args );
5369
5370 if ( ret !== undefined ) {
5371 if ( ( event.result = ret ) === false ) {
5372 event.preventDefault();
5373 event.stopPropagation();
5374 }
5375 }
5376 }
5377 }
5378 }
5379
5380 // Call the postDispatch hook for the mapped type
5381 if ( special.postDispatch ) {
5382 special.postDispatch.call( this, event );
5383 }
5384
5385 return event.result;
5386 },
5387
5388 handlers: function( event, handlers ) {
5389 var i, handleObj, sel, matchedHandlers, matchedSelectors,
5390 handlerQueue = [],
5391 delegateCount = handlers.delegateCount,
5392 cur = event.target;
5393
5394 // Find delegate handlers
5395 if ( delegateCount &&
5396
5397 // Support: IE <=9
5398 // Black-hole SVG <use> instance trees (trac-13180)
5399 cur.nodeType &&
5400
5401 // Support: Firefox <=42
5402 // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)
5403 // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click
5404 // Support: IE 11 only
5405 // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)
5406 !( event.type === "click" && event.button >= 1 ) ) {
5407
5408 for ( ; cur !== this; cur = cur.parentNode || this ) {
5409
5410 // Don't check non-elements (#13208)
5411 // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
5412 if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) {
5413 matchedHandlers = [];
5414 matchedSelectors = {};
5415 for ( i = 0; i < delegateCount; i++ ) {
5416 handleObj = handlers[ i ];
5417
5418 // Don't conflict with Object.prototype properties (#13203)
5419 sel = handleObj.selector + " ";
5420
5421 if ( matchedSelectors[ sel ] === undefined ) {
5422 matchedSelectors[ sel ] = handleObj.needsContext ?
5423 jQuery( sel, this ).index( cur ) > -1 :
5424 jQuery.find( sel, this, null, [ cur ] ).length;
5425 }
5426 if ( matchedSelectors[ sel ] ) {
5427 matchedHandlers.push( handleObj );
5428 }
5429 }
5430 if ( matchedHandlers.length ) {
5431 handlerQueue.push( { elem: cur, handlers: matchedHandlers } );
5432 }
5433 }
5434 }
5435 }
5436
5437 // Add the remaining (directly-bound) handlers
5438 cur = this;
5439 if ( delegateCount < handlers.length ) {
5440 handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );
5441 }
5442
5443 return handlerQueue;
5444 },
5445
5446 addProp: function( name, hook ) {
5447 Object.defineProperty( jQuery.Event.prototype, name, {
5448 enumerable: true,
5449 configurable: true,
5450
5451 get: isFunction( hook ) ?
5452 function() {
5453 if ( this.originalEvent ) {
5454 return hook( this.originalEvent );
5455 }
5456 } :
5457 function() {
5458 if ( this.originalEvent ) {
5459 return this.originalEvent[ name ];
5460 }
5461 },
5462
5463 set: function( value ) {
5464 Object.defineProperty( this, name, {
5465 enumerable: true,
5466 configurable: true,
5467 writable: true,
5468 value: value
5469 } );
5470 }
5471 } );
5472 },
5473
5474 fix: function( originalEvent ) {
5475 return originalEvent[ jQuery.expando ] ?
5476 originalEvent :
5477 new jQuery.Event( originalEvent );
5478 },
5479
5480 special: {
5481 load: {
5482
5483 // Prevent triggered image.load events from bubbling to window.load
5484 noBubble: true
5485 },
5486 focus: {
5487
5488 // Fire native event if possible so blur/focus sequence is correct
5489 trigger: function() {
5490 if ( this !== safeActiveElement() && this.focus ) {
5491 this.focus();
5492 return false;
5493 }
5494 },
5495 delegateType: "focusin"
5496 },
5497 blur: {
5498 trigger: function() {
5499 if ( this === safeActiveElement() && this.blur ) {
5500 this.blur();
5501 return false;
5502 }
5503 },
5504 delegateType: "focusout"
5505 },
5506 click: {
5507
5508 // For checkbox, fire native event so checked state will be right
5509 trigger: function() {
5510 if ( this.type === "checkbox" && this.click && nodeName( this, "input" ) ) {
5511 this.click();
5512 return false;
5513 }
5514 },
5515
5516 // For cross-browser consistency, don't fire native .click() on links
5517 _default: function( event ) {
5518 return nodeName( event.target, "a" );
5519 }
5520 },
5521
5522 beforeunload: {
5523 postDispatch: function( event ) {
5524
5525 // Support: Firefox 20+
5526 // Firefox doesn't alert if the returnValue field is not set.
5527 if ( event.result !== undefined && event.originalEvent ) {
5528 event.originalEvent.returnValue = event.result;
5529 }
5530 }
5531 }
5532 }
5533};
5534
5535jQuery.removeEvent = function( elem, type, handle ) {
5536
5537 // This "if" is needed for plain objects
5538 if ( elem.removeEventListener ) {
5539 elem.removeEventListener( type, handle );
5540 }
5541};
5542
5543jQuery.Event = function( src, props ) {
5544
5545 // Allow instantiation without the 'new' keyword
5546 if ( !( this instanceof jQuery.Event ) ) {
5547 return new jQuery.Event( src, props );
5548 }
5549
5550 // Event object
5551 if ( src && src.type ) {
5552 this.originalEvent = src;
5553 this.type = src.type;
5554
5555 // Events bubbling up the document may have been marked as prevented
5556 // by a handler lower down the tree; reflect the correct value.
5557 this.isDefaultPrevented = src.defaultPrevented ||
5558 src.defaultPrevented === undefined &&
5559
5560 // Support: Android <=2.3 only
5561 src.returnValue === false ?
5562 returnTrue :
5563 returnFalse;
5564
5565 // Create target properties
5566 // Support: Safari <=6 - 7 only
5567 // Target should not be a text node (#504, #13143)
5568 this.target = ( src.target && src.target.nodeType === 3 ) ?
5569 src.target.parentNode :
5570 src.target;
5571
5572 this.currentTarget = src.currentTarget;
5573 this.relatedTarget = src.relatedTarget;
5574
5575 // Event type
5576 } else {
5577 this.type = src;
5578 }
5579
5580 // Put explicitly provided properties onto the event object
5581 if ( props ) {
5582 jQuery.extend( this, props );
5583 }
5584
5585 // Create a timestamp if incoming event doesn't have one
5586 this.timeStamp = src && src.timeStamp || Date.now();
5587
5588 // Mark it as fixed
5589 this[ jQuery.expando ] = true;
5590};
5591
5592// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
5593// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
5594jQuery.Event.prototype = {
5595 constructor: jQuery.Event,
5596 isDefaultPrevented: returnFalse,
5597 isPropagationStopped: returnFalse,
5598 isImmediatePropagationStopped: returnFalse,
5599 isSimulated: false,
5600
5601 preventDefault: function() {
5602 var e = this.originalEvent;
5603
5604 this.isDefaultPrevented = returnTrue;
5605
5606 if ( e && !this.isSimulated ) {
5607 e.preventDefault();
5608 }
5609 },
5610 stopPropagation: function() {
5611 var e = this.originalEvent;
5612
5613 this.isPropagationStopped = returnTrue;
5614
5615 if ( e && !this.isSimulated ) {
5616 e.stopPropagation();
5617 }
5618 },
5619 stopImmediatePropagation: function() {
5620 var e = this.originalEvent;
5621
5622 this.isImmediatePropagationStopped = returnTrue;
5623
5624 if ( e && !this.isSimulated ) {
5625 e.stopImmediatePropagation();
5626 }
5627
5628 this.stopPropagation();
5629 }
5630};
5631
5632// Includes all common event props including KeyEvent and MouseEvent specific props
5633jQuery.each( {
5634 altKey: true,
5635 bubbles: true,
5636 cancelable: true,
5637 changedTouches: true,
5638 ctrlKey: true,
5639 detail: true,
5640 eventPhase: true,
5641 metaKey: true,
5642 pageX: true,
5643 pageY: true,
5644 shiftKey: true,
5645 view: true,
5646 "char": true,
5647 charCode: true,
5648 key: true,
5649 keyCode: true,
5650 button: true,
5651 buttons: true,
5652 clientX: true,
5653 clientY: true,
5654 offsetX: true,
5655 offsetY: true,
5656 pointerId: true,
5657 pointerType: true,
5658 screenX: true,
5659 screenY: true,
5660 targetTouches: true,
5661 toElement: true,
5662 touches: true,
5663
5664 which: function( event ) {
5665 var button = event.button;
5666
5667 // Add which for key events
5668 if ( event.which == null && rkeyEvent.test( event.type ) ) {
5669 return event.charCode != null ? event.charCode : event.keyCode;
5670 }
5671
5672 // Add which for click: 1 === left; 2 === middle; 3 === right
5673 if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {
5674 if ( button & 1 ) {
5675 return 1;
5676 }
5677
5678 if ( button & 2 ) {
5679 return 3;
5680 }
5681
5682 if ( button & 4 ) {
5683 return 2;
5684 }
5685
5686 return 0;
5687 }
5688
5689 return event.which;
5690 }
5691}, jQuery.event.addProp );
5692
5693// Create mouseenter/leave events using mouseover/out and event-time checks
5694// so that event delegation works in jQuery.
5695// Do the same for pointerenter/pointerleave and pointerover/pointerout
5696//
5697// Support: Safari 7 only
5698// Safari sends mouseenter too often; see:
5699// https://bugs.chromium.org/p/chromium/issues/detail?id=470258
5700// for the description of the bug (it existed in older Chrome versions as well).
5701jQuery.each( {
5702 mouseenter: "mouseover",
5703 mouseleave: "mouseout",
5704 pointerenter: "pointerover",
5705 pointerleave: "pointerout"
5706}, function( orig, fix ) {
5707 jQuery.event.special[ orig ] = {
5708 delegateType: fix,
5709 bindType: fix,
5710
5711 handle: function( event ) {
5712 var ret,
5713 target = this,
5714 related = event.relatedTarget,
5715 handleObj = event.handleObj;
5716
5717 // For mouseenter/leave call the handler if related is outside the target.
5718 // NB: No relatedTarget if the mouse left/entered the browser window
5719 if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
5720 event.type = handleObj.origType;
5721 ret = handleObj.handler.apply( this, arguments );
5722 event.type = fix;
5723 }
5724 return ret;
5725 }
5726 };
5727} );
5728
5729jQuery.fn.extend( {
5730
5731 on: function( types, selector, data, fn ) {
5732 return on( this, types, selector, data, fn );
5733 },
5734 one: function( types, selector, data, fn ) {
5735 return on( this, types, selector, data, fn, 1 );
5736 },
5737 off: function( types, selector, fn ) {
5738 var handleObj, type;
5739 if ( types && types.preventDefault && types.handleObj ) {
5740
5741 // ( event ) dispatched jQuery.Event
5742 handleObj = types.handleObj;
5743 jQuery( types.delegateTarget ).off(
5744 handleObj.namespace ?
5745 handleObj.origType + "." + handleObj.namespace :
5746 handleObj.origType,
5747 handleObj.selector,
5748 handleObj.handler
5749 );
5750 return this;
5751 }
5752 if ( typeof types === "object" ) {
5753
5754 // ( types-object [, selector] )
5755 for ( type in types ) {
5756 this.off( type, selector, types[ type ] );
5757 }
5758 return this;
5759 }
5760 if ( selector === false || typeof selector === "function" ) {
5761
5762 // ( types [, fn] )
5763 fn = selector;
5764 selector = undefined;
5765 }
5766 if ( fn === false ) {
5767 fn = returnFalse;
5768 }
5769 return this.each( function() {
5770 jQuery.event.remove( this, types, fn, selector );
5771 } );
5772 }
5773} );
5774
5775
5776var
5777
5778 /* eslint-disable max-len */
5779
5780 // See https://github.com/eslint/eslint/issues/3229
5781 rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,
5782
5783 /* eslint-enable */
5784
5785 // Support: IE <=10 - 11, Edge 12 - 13 only
5786 // In IE/Edge using regex groups here causes severe slowdowns.
5787 // See https://connect.microsoft.com/IE/feedback/details/1736512/
5788 rnoInnerhtml = /<script|<style|<link/i,
5789
5790 // checked="checked" or checked
5791 rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
5792 rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
5793
5794// Prefer a tbody over its parent table for containing new rows
5795function manipulationTarget( elem, content ) {
5796 if ( nodeName( elem, "table" ) &&
5797 nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {
5798
5799 return jQuery( elem ).children( "tbody" )[ 0 ] || elem;
5800 }
5801
5802 return elem;
5803}
5804
5805// Replace/restore the type attribute of script elements for safe DOM manipulation
5806function disableScript( elem ) {
5807 elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;
5808 return elem;
5809}
5810function restoreScript( elem ) {
5811 if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) {
5812 elem.type = elem.type.slice( 5 );
5813 } else {
5814 elem.removeAttribute( "type" );
5815 }
5816
5817 return elem;
5818}
5819
5820function cloneCopyEvent( src, dest ) {
5821 var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;
5822
5823 if ( dest.nodeType !== 1 ) {
5824 return;
5825 }
5826
5827 // 1. Copy private data: events, handlers, etc.
5828 if ( dataPriv.hasData( src ) ) {
5829 pdataOld = dataPriv.access( src );
5830 pdataCur = dataPriv.set( dest, pdataOld );
5831 events = pdataOld.events;
5832
5833 if ( events ) {
5834 delete pdataCur.handle;
5835 pdataCur.events = {};
5836
5837 for ( type in events ) {
5838 for ( i = 0, l = events[ type ].length; i < l; i++ ) {
5839 jQuery.event.add( dest, type, events[ type ][ i ] );
5840 }
5841 }
5842 }
5843 }
5844
5845 // 2. Copy user data
5846 if ( dataUser.hasData( src ) ) {
5847 udataOld = dataUser.access( src );
5848 udataCur = jQuery.extend( {}, udataOld );
5849
5850 dataUser.set( dest, udataCur );
5851 }
5852}
5853
5854// Fix IE bugs, see support tests
5855function fixInput( src, dest ) {
5856 var nodeName = dest.nodeName.toLowerCase();
5857
5858 // Fails to persist the checked state of a cloned checkbox or radio button.
5859 if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
5860 dest.checked = src.checked;
5861
5862 // Fails to return the selected option to the default selected state when cloning options
5863 } else if ( nodeName === "input" || nodeName === "textarea" ) {
5864 dest.defaultValue = src.defaultValue;
5865 }
5866}
5867
5868function domManip( collection, args, callback, ignored ) {
5869
5870 // Flatten any nested arrays
5871 args = concat.apply( [], args );
5872
5873 var fragment, first, scripts, hasScripts, node, doc,
5874 i = 0,
5875 l = collection.length,
5876 iNoClone = l - 1,
5877 value = args[ 0 ],
5878 valueIsFunction = isFunction( value );
5879
5880 // We can't cloneNode fragments that contain checked, in WebKit
5881 if ( valueIsFunction ||
5882 ( l > 1 && typeof value === "string" &&
5883 !support.checkClone && rchecked.test( value ) ) ) {
5884 return collection.each( function( index ) {
5885 var self = collection.eq( index );
5886 if ( valueIsFunction ) {
5887 args[ 0 ] = value.call( this, index, self.html() );
5888 }
5889 domManip( self, args, callback, ignored );
5890 } );
5891 }
5892
5893 if ( l ) {
5894 fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );
5895 first = fragment.firstChild;
5896
5897 if ( fragment.childNodes.length === 1 ) {
5898 fragment = first;
5899 }
5900
5901 // Require either new content or an interest in ignored elements to invoke the callback
5902 if ( first || ignored ) {
5903 scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
5904 hasScripts = scripts.length;
5905
5906 // Use the original fragment for the last item
5907 // instead of the first because it can end up
5908 // being emptied incorrectly in certain situations (#8070).
5909 for ( ; i < l; i++ ) {
5910 node = fragment;
5911
5912 if ( i !== iNoClone ) {
5913 node = jQuery.clone( node, true, true );
5914
5915 // Keep references to cloned scripts for later restoration
5916 if ( hasScripts ) {
5917
5918 // Support: Android <=4.0 only, PhantomJS 1 only
5919 // push.apply(_, arraylike) throws on ancient WebKit
5920 jQuery.merge( scripts, getAll( node, "script" ) );
5921 }
5922 }
5923
5924 callback.call( collection[ i ], node, i );
5925 }
5926
5927 if ( hasScripts ) {
5928 doc = scripts[ scripts.length - 1 ].ownerDocument;
5929
5930 // Reenable scripts
5931 jQuery.map( scripts, restoreScript );
5932
5933 // Evaluate executable scripts on first document insertion
5934 for ( i = 0; i < hasScripts; i++ ) {
5935 node = scripts[ i ];
5936 if ( rscriptType.test( node.type || "" ) &&
5937 !dataPriv.access( node, "globalEval" ) &&
5938 jQuery.contains( doc, node ) ) {
5939
5940 if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) {
5941
5942 // Optional AJAX dependency, but won't run scripts if not present
5943 if ( jQuery._evalUrl ) {
5944 jQuery._evalUrl( node.src );
5945 }
5946 } else {
5947 DOMEval( node.textContent.replace( rcleanScript, "" ), doc, node );
5948 }
5949 }
5950 }
5951 }
5952 }
5953 }
5954
5955 return collection;
5956}
5957
5958function remove( elem, selector, keepData ) {
5959 var node,
5960 nodes = selector ? jQuery.filter( selector, elem ) : elem,
5961 i = 0;
5962
5963 for ( ; ( node = nodes[ i ] ) != null; i++ ) {
5964 if ( !keepData && node.nodeType === 1 ) {
5965 jQuery.cleanData( getAll( node ) );
5966 }
5967
5968 if ( node.parentNode ) {
5969 if ( keepData && jQuery.contains( node.ownerDocument, node ) ) {
5970 setGlobalEval( getAll( node, "script" ) );
5971 }
5972 node.parentNode.removeChild( node );
5973 }
5974 }
5975
5976 return elem;
5977}
5978
5979jQuery.extend( {
5980 htmlPrefilter: function( html ) {
5981 return html.replace( rxhtmlTag, "<$1></$2>" );
5982 },
5983
5984 clone: function( elem, dataAndEvents, deepDataAndEvents ) {
5985 var i, l, srcElements, destElements,
5986 clone = elem.cloneNode( true ),
5987 inPage = jQuery.contains( elem.ownerDocument, elem );
5988
5989 // Fix IE cloning issues
5990 if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
5991 !jQuery.isXMLDoc( elem ) ) {
5992
5993 // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2
5994 destElements = getAll( clone );
5995 srcElements = getAll( elem );
5996
5997 for ( i = 0, l = srcElements.length; i < l; i++ ) {
5998 fixInput( srcElements[ i ], destElements[ i ] );
5999 }
6000 }
6001
6002 // Copy the events from the original to the clone
6003 if ( dataAndEvents ) {
6004 if ( deepDataAndEvents ) {
6005 srcElements = srcElements || getAll( elem );
6006 destElements = destElements || getAll( clone );
6007
6008 for ( i = 0, l = srcElements.length; i < l; i++ ) {
6009 cloneCopyEvent( srcElements[ i ], destElements[ i ] );
6010 }
6011 } else {
6012 cloneCopyEvent( elem, clone );
6013 }
6014 }
6015
6016 // Preserve script evaluation history
6017 destElements = getAll( clone, "script" );
6018 if ( destElements.length > 0 ) {
6019 setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
6020 }
6021
6022 // Return the cloned set
6023 return clone;
6024 },
6025
6026 cleanData: function( elems ) {
6027 var data, elem, type,
6028 special = jQuery.event.special,
6029 i = 0;
6030
6031 for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {
6032 if ( acceptData( elem ) ) {
6033 if ( ( data = elem[ dataPriv.expando ] ) ) {
6034 if ( data.events ) {
6035 for ( type in data.events ) {
6036 if ( special[ type ] ) {
6037 jQuery.event.remove( elem, type );
6038
6039 // This is a shortcut to avoid jQuery.event.remove's overhead
6040 } else {
6041 jQuery.removeEvent( elem, type, data.handle );
6042 }
6043 }
6044 }
6045
6046 // Support: Chrome <=35 - 45+
6047 // Assign undefined instead of using delete, see Data#remove
6048 elem[ dataPriv.expando ] = undefined;
6049 }
6050 if ( elem[ dataUser.expando ] ) {
6051
6052 // Support: Chrome <=35 - 45+
6053 // Assign undefined instead of using delete, see Data#remove
6054 elem[ dataUser.expando ] = undefined;
6055 }
6056 }
6057 }
6058 }
6059} );
6060
6061jQuery.fn.extend( {
6062 detach: function( selector ) {
6063 return remove( this, selector, true );
6064 },
6065
6066 remove: function( selector ) {
6067 return remove( this, selector );
6068 },
6069
6070 text: function( value ) {
6071 return access( this, function( value ) {
6072 return value === undefined ?
6073 jQuery.text( this ) :
6074 this.empty().each( function() {
6075 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
6076 this.textContent = value;
6077 }
6078 } );
6079 }, null, value, arguments.length );
6080 },
6081
6082 append: function() {
6083 return domManip( this, arguments, function( elem ) {
6084 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
6085 var target = manipulationTarget( this, elem );
6086 target.appendChild( elem );
6087 }
6088 } );
6089 },
6090
6091 prepend: function() {
6092 return domManip( this, arguments, function( elem ) {
6093 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
6094 var target = manipulationTarget( this, elem );
6095 target.insertBefore( elem, target.firstChild );
6096 }
6097 } );
6098 },
6099
6100 before: function() {
6101 return domManip( this, arguments, function( elem ) {
6102 if ( this.parentNode ) {
6103 this.parentNode.insertBefore( elem, this );
6104 }
6105 } );
6106 },
6107
6108 after: function() {
6109 return domManip( this, arguments, function( elem ) {
6110 if ( this.parentNode ) {
6111 this.parentNode.insertBefore( elem, this.nextSibling );
6112 }
6113 } );
6114 },
6115
6116 empty: function() {
6117 var elem,
6118 i = 0;
6119
6120 for ( ; ( elem = this[ i ] ) != null; i++ ) {
6121 if ( elem.nodeType === 1 ) {
6122
6123 // Prevent memory leaks
6124 jQuery.cleanData( getAll( elem, false ) );
6125
6126 // Remove any remaining nodes
6127 elem.textContent = "";
6128 }
6129 }
6130
6131 return this;
6132 },
6133
6134 clone: function( dataAndEvents, deepDataAndEvents ) {
6135 dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
6136 deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
6137
6138 return this.map( function() {
6139 return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
6140 } );
6141 },
6142
6143 html: function( value ) {
6144 return access( this, function( value ) {
6145 var elem = this[ 0 ] || {},
6146 i = 0,
6147 l = this.length;
6148
6149 if ( value === undefined && elem.nodeType === 1 ) {
6150 return elem.innerHTML;
6151 }
6152
6153 // See if we can take a shortcut and just use innerHTML
6154 if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
6155 !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {
6156
6157 value = jQuery.htmlPrefilter( value );
6158
6159 try {
6160 for ( ; i < l; i++ ) {
6161 elem = this[ i ] || {};
6162
6163 // Remove element nodes and prevent memory leaks
6164 if ( elem.nodeType === 1 ) {
6165 jQuery.cleanData( getAll( elem, false ) );
6166 elem.innerHTML = value;
6167 }
6168 }
6169
6170 elem = 0;
6171
6172 // If using innerHTML throws an exception, use the fallback method
6173 } catch ( e ) {}
6174 }
6175
6176 if ( elem ) {
6177 this.empty().append( value );
6178 }
6179 }, null, value, arguments.length );
6180 },
6181
6182 replaceWith: function() {
6183 var ignored = [];
6184
6185 // Make the changes, replacing each non-ignored context element with the new content
6186 return domManip( this, arguments, function( elem ) {
6187 var parent = this.parentNode;
6188
6189 if ( jQuery.inArray( this, ignored ) < 0 ) {
6190 jQuery.cleanData( getAll( this ) );
6191 if ( parent ) {
6192 parent.replaceChild( elem, this );
6193 }
6194 }
6195
6196 // Force callback invocation
6197 }, ignored );
6198 }
6199} );
6200
6201jQuery.each( {
6202 appendTo: "append",
6203 prependTo: "prepend",
6204 insertBefore: "before",
6205 insertAfter: "after",
6206 replaceAll: "replaceWith"
6207}, function( name, original ) {
6208 jQuery.fn[ name ] = function( selector ) {
6209 var elems,
6210 ret = [],
6211 insert = jQuery( selector ),
6212 last = insert.length - 1,
6213 i = 0;
6214
6215 for ( ; i <= last; i++ ) {
6216 elems = i === last ? this : this.clone( true );
6217 jQuery( insert[ i ] )[ original ]( elems );
6218
6219 // Support: Android <=4.0 only, PhantomJS 1 only
6220 // .get() because push.apply(_, arraylike) throws on ancient WebKit
6221 push.apply( ret, elems.get() );
6222 }
6223
6224 return this.pushStack( ret );
6225 };
6226} );
6227var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
6228
6229var getStyles = function( elem ) {
6230
6231 // Support: IE <=11 only, Firefox <=30 (#15098, #14150)
6232 // IE throws on elements created in popups
6233 // FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
6234 var view = elem.ownerDocument.defaultView;
6235
6236 if ( !view || !view.opener ) {
6237 view = window;
6238 }
6239
6240 return view.getComputedStyle( elem );
6241 };
6242
6243var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
6244
6245
6246
6247( function() {
6248
6249 // Executing both pixelPosition & boxSizingReliable tests require only one layout
6250 // so they're executed at the same time to save the second computation.
6251 function computeStyleTests() {
6252
6253 // This is a singleton, we need to execute it only once
6254 if ( !div ) {
6255 return;
6256 }
6257
6258 container.style.cssText = "position:absolute;left:-11111px;width:60px;" +
6259 "margin-top:1px;padding:0;border:0";
6260 div.style.cssText =
6261 "position:relative;display:block;box-sizing:border-box;overflow:scroll;" +
6262 "margin:auto;border:1px;padding:1px;" +
6263 "width:60%;top:1%";
6264 documentElement.appendChild( container ).appendChild( div );
6265
6266 var divStyle = window.getComputedStyle( div );
6267 pixelPositionVal = divStyle.top !== "1%";
6268
6269 // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44
6270 reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;
6271
6272 // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3
6273 // Some styles come back with percentage values, even though they shouldn't
6274 div.style.right = "60%";
6275 pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;
6276
6277 // Support: IE 9 - 11 only
6278 // Detect misreporting of content dimensions for box-sizing:border-box elements
6279 boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;
6280
6281 // Support: IE 9 only
6282 // Detect overflow:scroll screwiness (gh-3699)
6283 div.style.position = "absolute";
6284 scrollboxSizeVal = div.offsetWidth === 36 || "absolute";
6285
6286 documentElement.removeChild( container );
6287
6288 // Nullify the div so it wouldn't be stored in the memory and
6289 // it will also be a sign that checks already performed
6290 div = null;
6291 }
6292
6293 function roundPixelMeasures( measure ) {
6294 return Math.round( parseFloat( measure ) );
6295 }
6296
6297 var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,
6298 reliableMarginLeftVal,
6299 container = document.createElement( "div" ),
6300 div = document.createElement( "div" );
6301
6302 // Finish early in limited (non-browser) environments
6303 if ( !div.style ) {
6304 return;
6305 }
6306
6307 // Support: IE <=9 - 11 only
6308 // Style of cloned element affects source element cloned (#8908)
6309 div.style.backgroundClip = "content-box";
6310 div.cloneNode( true ).style.backgroundClip = "";
6311 support.clearCloneStyle = div.style.backgroundClip === "content-box";
6312
6313 jQuery.extend( support, {
6314 boxSizingReliable: function() {
6315 computeStyleTests();
6316 return boxSizingReliableVal;
6317 },
6318 pixelBoxStyles: function() {
6319 computeStyleTests();
6320 return pixelBoxStylesVal;
6321 },
6322 pixelPosition: function() {
6323 computeStyleTests();
6324 return pixelPositionVal;
6325 },
6326 reliableMarginLeft: function() {
6327 computeStyleTests();
6328 return reliableMarginLeftVal;
6329 },
6330 scrollboxSize: function() {
6331 computeStyleTests();
6332 return scrollboxSizeVal;
6333 }
6334 } );
6335} )();
6336
6337
6338function curCSS( elem, name, computed ) {
6339 var width, minWidth, maxWidth, ret,
6340
6341 // Support: Firefox 51+
6342 // Retrieving style before computed somehow
6343 // fixes an issue with getting wrong values
6344 // on detached elements
6345 style = elem.style;
6346
6347 computed = computed || getStyles( elem );
6348
6349 // getPropertyValue is needed for:
6350 // .css('filter') (IE 9 only, #12537)
6351 // .css('--customProperty) (#3144)
6352 if ( computed ) {
6353 ret = computed.getPropertyValue( name ) || computed[ name ];
6354
6355 if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
6356 ret = jQuery.style( elem, name );
6357 }
6358
6359 // A tribute to the "awesome hack by Dean Edwards"
6360 // Android Browser returns percentage for some values,
6361 // but width seems to be reliably pixels.
6362 // This is against the CSSOM draft spec:
6363 // https://drafts.csswg.org/cssom/#resolved-values
6364 if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {
6365
6366 // Remember the original values
6367 width = style.width;
6368 minWidth = style.minWidth;
6369 maxWidth = style.maxWidth;
6370
6371 // Put in the new values to get a computed value out
6372 style.minWidth = style.maxWidth = style.width = ret;
6373 ret = computed.width;
6374
6375 // Revert the changed values
6376 style.width = width;
6377 style.minWidth = minWidth;
6378 style.maxWidth = maxWidth;
6379 }
6380 }
6381
6382 return ret !== undefined ?
6383
6384 // Support: IE <=9 - 11 only
6385 // IE returns zIndex value as an integer.
6386 ret + "" :
6387 ret;
6388}
6389
6390
6391function addGetHookIf( conditionFn, hookFn ) {
6392
6393 // Define the hook, we'll check on the first run if it's really needed.
6394 return {
6395 get: function() {
6396 if ( conditionFn() ) {
6397
6398 // Hook not needed (or it's not possible to use it due
6399 // to missing dependency), remove it.
6400 delete this.get;
6401 return;
6402 }
6403
6404 // Hook needed; redefine it so that the support test is not executed again.
6405 return ( this.get = hookFn ).apply( this, arguments );
6406 }
6407 };
6408}
6409
6410
6411var
6412
6413 // Swappable if display is none or starts with table
6414 // except "table", "table-cell", or "table-caption"
6415 // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
6416 rdisplayswap = /^(none|table(?!-c[ea]).+)/,
6417 rcustomProp = /^--/,
6418 cssShow = { position: "absolute", visibility: "hidden", display: "block" },
6419 cssNormalTransform = {
6420 letterSpacing: "0",
6421 fontWeight: "400"
6422 },
6423
6424 cssPrefixes = [ "Webkit", "Moz", "ms" ],
6425 emptyStyle = document.createElement( "div" ).style;
6426
6427// Return a css property mapped to a potentially vendor prefixed property
6428function vendorPropName( name ) {
6429
6430 // Shortcut for names that are not vendor prefixed
6431 if ( name in emptyStyle ) {
6432 return name;
6433 }
6434
6435 // Check for vendor prefixed names
6436 var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
6437 i = cssPrefixes.length;
6438
6439 while ( i-- ) {
6440 name = cssPrefixes[ i ] + capName;
6441 if ( name in emptyStyle ) {
6442 return name;
6443 }
6444 }
6445}
6446
6447// Return a property mapped along what jQuery.cssProps suggests or to
6448// a vendor prefixed property.
6449function finalPropName( name ) {
6450 var ret = jQuery.cssProps[ name ];
6451 if ( !ret ) {
6452 ret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;
6453 }
6454 return ret;
6455}
6456
6457function setPositiveNumber( elem, value, subtract ) {
6458
6459 // Any relative (+/-) values have already been
6460 // normalized at this point
6461 var matches = rcssNum.exec( value );
6462 return matches ?
6463
6464 // Guard against undefined "subtract", e.g., when used as in cssHooks
6465 Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
6466 value;
6467}
6468
6469function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
6470 var i = dimension === "width" ? 1 : 0,
6471 extra = 0,
6472 delta = 0;
6473
6474 // Adjustment may not be necessary
6475 if ( box === ( isBorderBox ? "border" : "content" ) ) {
6476 return 0;
6477 }
6478
6479 for ( ; i < 4; i += 2 ) {
6480
6481 // Both box models exclude margin
6482 if ( box === "margin" ) {
6483 delta += jQuery.css( elem, box + cssExpand[ i ], true, styles );
6484 }
6485
6486 // If we get here with a content-box, we're seeking "padding" or "border" or "margin"
6487 if ( !isBorderBox ) {
6488
6489 // Add padding
6490 delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
6491
6492 // For "border" or "margin", add border
6493 if ( box !== "padding" ) {
6494 delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
6495
6496 // But still keep track of it otherwise
6497 } else {
6498 extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
6499 }
6500
6501 // If we get here with a border-box (content + padding + border), we're seeking "content" or
6502 // "padding" or "margin"
6503 } else {
6504
6505 // For "content", subtract padding
6506 if ( box === "content" ) {
6507 delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
6508 }
6509
6510 // For "content" or "padding", subtract border
6511 if ( box !== "margin" ) {
6512 delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
6513 }
6514 }
6515 }
6516
6517 // Account for positive content-box scroll gutter when requested by providing computedVal
6518 if ( !isBorderBox && computedVal >= 0 ) {
6519
6520 // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border
6521 // Assuming integer scroll gutter, subtract the rest and round down
6522 delta += Math.max( 0, Math.ceil(
6523 elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
6524 computedVal -
6525 delta -
6526 extra -
6527 0.5
6528 ) );
6529 }
6530
6531 return delta;
6532}
6533
6534function getWidthOrHeight( elem, dimension, extra ) {
6535
6536 // Start with computed style
6537 var styles = getStyles( elem ),
6538 val = curCSS( elem, dimension, styles ),
6539 isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
6540 valueIsBorderBox = isBorderBox;
6541
6542 // Support: Firefox <=54
6543 // Return a confounding non-pixel value or feign ignorance, as appropriate.
6544 if ( rnumnonpx.test( val ) ) {
6545 if ( !extra ) {
6546 return val;
6547 }
6548 val = "auto";
6549 }
6550
6551 // Check for style in case a browser which returns unreliable values
6552 // for getComputedStyle silently falls back to the reliable elem.style
6553 valueIsBorderBox = valueIsBorderBox &&
6554 ( support.boxSizingReliable() || val === elem.style[ dimension ] );
6555
6556 // Fall back to offsetWidth/offsetHeight when value is "auto"
6557 // This happens for inline elements with no explicit setting (gh-3571)
6558 // Support: Android <=4.1 - 4.3 only
6559 // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)
6560 if ( val === "auto" ||
6561 !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) {
6562
6563 val = elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ];
6564
6565 // offsetWidth/offsetHeight provide border-box values
6566 valueIsBorderBox = true;
6567 }
6568
6569 // Normalize "" and auto
6570 val = parseFloat( val ) || 0;
6571
6572 // Adjust for the element's box model
6573 return ( val +
6574 boxModelAdjustment(
6575 elem,
6576 dimension,
6577 extra || ( isBorderBox ? "border" : "content" ),
6578 valueIsBorderBox,
6579 styles,
6580
6581 // Provide the current computed size to request scroll gutter calculation (gh-3589)
6582 val
6583 )
6584 ) + "px";
6585}
6586
6587jQuery.extend( {
6588
6589 // Add in style property hooks for overriding the default
6590 // behavior of getting and setting a style property
6591 cssHooks: {
6592 opacity: {
6593 get: function( elem, computed ) {
6594 if ( computed ) {
6595
6596 // We should always get a number back from opacity
6597 var ret = curCSS( elem, "opacity" );
6598 return ret === "" ? "1" : ret;
6599 }
6600 }
6601 }
6602 },
6603
6604 // Don't automatically add "px" to these possibly-unitless properties
6605 cssNumber: {
6606 "animationIterationCount": true,
6607 "columnCount": true,
6608 "fillOpacity": true,
6609 "flexGrow": true,
6610 "flexShrink": true,
6611 "fontWeight": true,
6612 "lineHeight": true,
6613 "opacity": true,
6614 "order": true,
6615 "orphans": true,
6616 "widows": true,
6617 "zIndex": true,
6618 "zoom": true
6619 },
6620
6621 // Add in properties whose names you wish to fix before
6622 // setting or getting the value
6623 cssProps: {},
6624
6625 // Get and set the style property on a DOM Node
6626 style: function( elem, name, value, extra ) {
6627
6628 // Don't set styles on text and comment nodes
6629 if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
6630 return;
6631 }
6632
6633 // Make sure that we're working with the right name
6634 var ret, type, hooks,
6635 origName = camelCase( name ),
6636 isCustomProp = rcustomProp.test( name ),
6637 style = elem.style;
6638
6639 // Make sure that we're working with the right name. We don't
6640 // want to query the value if it is a CSS custom property
6641 // since they are user-defined.
6642 if ( !isCustomProp ) {
6643 name = finalPropName( origName );
6644 }
6645
6646 // Gets hook for the prefixed version, then unprefixed version
6647 hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
6648
6649 // Check if we're setting a value
6650 if ( value !== undefined ) {
6651 type = typeof value;
6652
6653 // Convert "+=" or "-=" to relative numbers (#7345)
6654 if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
6655 value = adjustCSS( elem, name, ret );
6656
6657 // Fixes bug #9237
6658 type = "number";
6659 }
6660
6661 // Make sure that null and NaN values aren't set (#7116)
6662 if ( value == null || value !== value ) {
6663 return;
6664 }
6665
6666 // If a number was passed in, add the unit (except for certain CSS properties)
6667 if ( type === "number" ) {
6668 value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
6669 }
6670
6671 // background-* props affect original clone's values
6672 if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
6673 style[ name ] = "inherit";
6674 }
6675
6676 // If a hook was provided, use that value, otherwise just set the specified value
6677 if ( !hooks || !( "set" in hooks ) ||
6678 ( value = hooks.set( elem, value, extra ) ) !== undefined ) {
6679
6680 if ( isCustomProp ) {
6681 style.setProperty( name, value );
6682 } else {
6683 style[ name ] = value;
6684 }
6685 }
6686
6687 } else {
6688
6689 // If a hook was provided get the non-computed value from there
6690 if ( hooks && "get" in hooks &&
6691 ( ret = hooks.get( elem, false, extra ) ) !== undefined ) {
6692
6693 return ret;
6694 }
6695
6696 // Otherwise just get the value from the style object
6697 return style[ name ];
6698 }
6699 },
6700
6701 css: function( elem, name, extra, styles ) {
6702 var val, num, hooks,
6703 origName = camelCase( name ),
6704 isCustomProp = rcustomProp.test( name );
6705
6706 // Make sure that we're working with the right name. We don't
6707 // want to modify the value if it is a CSS custom property
6708 // since they are user-defined.
6709 if ( !isCustomProp ) {
6710 name = finalPropName( origName );
6711 }
6712
6713 // Try prefixed name followed by the unprefixed name
6714 hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
6715
6716 // If a hook was provided get the computed value from there
6717 if ( hooks && "get" in hooks ) {
6718 val = hooks.get( elem, true, extra );
6719 }
6720
6721 // Otherwise, if a way to get the computed value exists, use that
6722 if ( val === undefined ) {
6723 val = curCSS( elem, name, styles );
6724 }
6725
6726 // Convert "normal" to computed value
6727 if ( val === "normal" && name in cssNormalTransform ) {
6728 val = cssNormalTransform[ name ];
6729 }
6730
6731 // Make numeric if forced or a qualifier was provided and val looks numeric
6732 if ( extra === "" || extra ) {
6733 num = parseFloat( val );
6734 return extra === true || isFinite( num ) ? num || 0 : val;
6735 }
6736
6737 return val;
6738 }
6739} );
6740
6741jQuery.each( [ "height", "width" ], function( i, dimension ) {
6742 jQuery.cssHooks[ dimension ] = {
6743 get: function( elem, computed, extra ) {
6744 if ( computed ) {
6745
6746 // Certain elements can have dimension info if we invisibly show them
6747 // but it must have a current display style that would benefit
6748 return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&
6749
6750 // Support: Safari 8+
6751 // Table columns in Safari have non-zero offsetWidth & zero
6752 // getBoundingClientRect().width unless display is changed.
6753 // Support: IE <=11 only
6754 // Running getBoundingClientRect on a disconnected node
6755 // in IE throws an error.
6756 ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?
6757 swap( elem, cssShow, function() {
6758 return getWidthOrHeight( elem, dimension, extra );
6759 } ) :
6760 getWidthOrHeight( elem, dimension, extra );
6761 }
6762 },
6763
6764 set: function( elem, value, extra ) {
6765 var matches,
6766 styles = getStyles( elem ),
6767 isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
6768 subtract = extra && boxModelAdjustment(
6769 elem,
6770 dimension,
6771 extra,
6772 isBorderBox,
6773 styles
6774 );
6775
6776 // Account for unreliable border-box dimensions by comparing offset* to computed and
6777 // faking a content-box to get border and padding (gh-3699)
6778 if ( isBorderBox && support.scrollboxSize() === styles.position ) {
6779 subtract -= Math.ceil(
6780 elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
6781 parseFloat( styles[ dimension ] ) -
6782 boxModelAdjustment( elem, dimension, "border", false, styles ) -
6783 0.5
6784 );
6785 }
6786
6787 // Convert to pixels if value adjustment is needed
6788 if ( subtract && ( matches = rcssNum.exec( value ) ) &&
6789 ( matches[ 3 ] || "px" ) !== "px" ) {
6790
6791 elem.style[ dimension ] = value;
6792 value = jQuery.css( elem, dimension );
6793 }
6794
6795 return setPositiveNumber( elem, value, subtract );
6796 }
6797 };
6798} );
6799
6800jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
6801 function( elem, computed ) {
6802 if ( computed ) {
6803 return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||
6804 elem.getBoundingClientRect().left -
6805 swap( elem, { marginLeft: 0 }, function() {
6806 return elem.getBoundingClientRect().left;
6807 } )
6808 ) + "px";
6809 }
6810 }
6811);
6812
6813// These hooks are used by animate to expand properties
6814jQuery.each( {
6815 margin: "",
6816 padding: "",
6817 border: "Width"
6818}, function( prefix, suffix ) {
6819 jQuery.cssHooks[ prefix + suffix ] = {
6820 expand: function( value ) {
6821 var i = 0,
6822 expanded = {},
6823
6824 // Assumes a single number if not a string
6825 parts = typeof value === "string" ? value.split( " " ) : [ value ];
6826
6827 for ( ; i < 4; i++ ) {
6828 expanded[ prefix + cssExpand[ i ] + suffix ] =
6829 parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
6830 }
6831
6832 return expanded;
6833 }
6834 };
6835
6836 if ( prefix !== "margin" ) {
6837 jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
6838 }
6839} );
6840
6841jQuery.fn.extend( {
6842 css: function( name, value ) {
6843 return access( this, function( elem, name, value ) {
6844 var styles, len,
6845 map = {},
6846 i = 0;
6847
6848 if ( Array.isArray( name ) ) {
6849 styles = getStyles( elem );
6850 len = name.length;
6851
6852 for ( ; i < len; i++ ) {
6853 map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
6854 }
6855
6856 return map;
6857 }
6858
6859 return value !== undefined ?
6860 jQuery.style( elem, name, value ) :
6861 jQuery.css( elem, name );
6862 }, name, value, arguments.length > 1 );
6863 }
6864} );
6865
6866
6867function Tween( elem, options, prop, end, easing ) {
6868 return new Tween.prototype.init( elem, options, prop, end, easing );
6869}
6870jQuery.Tween = Tween;
6871
6872Tween.prototype = {
6873 constructor: Tween,
6874 init: function( elem, options, prop, end, easing, unit ) {
6875 this.elem = elem;
6876 this.prop = prop;
6877 this.easing = easing || jQuery.easing._default;
6878 this.options = options;
6879 this.start = this.now = this.cur();
6880 this.end = end;
6881 this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
6882 },
6883 cur: function() {
6884 var hooks = Tween.propHooks[ this.prop ];
6885
6886 return hooks && hooks.get ?
6887 hooks.get( this ) :
6888 Tween.propHooks._default.get( this );
6889 },
6890 run: function( percent ) {
6891 var eased,
6892 hooks = Tween.propHooks[ this.prop ];
6893
6894 if ( this.options.duration ) {
6895 this.pos = eased = jQuery.easing[ this.easing ](
6896 percent, this.options.duration * percent, 0, 1, this.options.duration
6897 );
6898 } else {
6899 this.pos = eased = percent;
6900 }
6901 this.now = ( this.end - this.start ) * eased + this.start;
6902
6903 if ( this.options.step ) {
6904 this.options.step.call( this.elem, this.now, this );
6905 }
6906
6907 if ( hooks && hooks.set ) {
6908 hooks.set( this );
6909 } else {
6910 Tween.propHooks._default.set( this );
6911 }
6912 return this;
6913 }
6914};
6915
6916Tween.prototype.init.prototype = Tween.prototype;
6917
6918Tween.propHooks = {
6919 _default: {
6920 get: function( tween ) {
6921 var result;
6922
6923 // Use a property on the element directly when it is not a DOM element,
6924 // or when there is no matching style property that exists.
6925 if ( tween.elem.nodeType !== 1 ||
6926 tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {
6927 return tween.elem[ tween.prop ];
6928 }
6929
6930 // Passing an empty string as a 3rd parameter to .css will automatically
6931 // attempt a parseFloat and fallback to a string if the parse fails.
6932 // Simple values such as "10px" are parsed to Float;
6933 // complex values such as "rotate(1rad)" are returned as-is.
6934 result = jQuery.css( tween.elem, tween.prop, "" );
6935
6936 // Empty strings, null, undefined and "auto" are converted to 0.
6937 return !result || result === "auto" ? 0 : result;
6938 },
6939 set: function( tween ) {
6940
6941 // Use step hook for back compat.
6942 // Use cssHook if its there.
6943 // Use .style if available and use plain properties where available.
6944 if ( jQuery.fx.step[ tween.prop ] ) {
6945 jQuery.fx.step[ tween.prop ]( tween );
6946 } else if ( tween.elem.nodeType === 1 &&
6947 ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||
6948 jQuery.cssHooks[ tween.prop ] ) ) {
6949 jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
6950 } else {
6951 tween.elem[ tween.prop ] = tween.now;
6952 }
6953 }
6954 }
6955};
6956
6957// Support: IE <=9 only
6958// Panic based approach to setting things on disconnected nodes
6959Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
6960 set: function( tween ) {
6961 if ( tween.elem.nodeType && tween.elem.parentNode ) {
6962 tween.elem[ tween.prop ] = tween.now;
6963 }
6964 }
6965};
6966
6967jQuery.easing = {
6968 linear: function( p ) {
6969 return p;
6970 },
6971 swing: function( p ) {
6972 return 0.5 - Math.cos( p * Math.PI ) / 2;
6973 },
6974 _default: "swing"
6975};
6976
6977jQuery.fx = Tween.prototype.init;
6978
6979// Back compat <1.8 extension point
6980jQuery.fx.step = {};
6981
6982
6983
6984
6985var
6986 fxNow, inProgress,
6987 rfxtypes = /^(?:toggle|show|hide)$/,
6988 rrun = /queueHooks$/;
6989
6990function schedule() {
6991 if ( inProgress ) {
6992 if ( document.hidden === false && window.requestAnimationFrame ) {
6993 window.requestAnimationFrame( schedule );
6994 } else {
6995 window.setTimeout( schedule, jQuery.fx.interval );
6996 }
6997
6998 jQuery.fx.tick();
6999 }
7000}
7001
7002// Animations created synchronously will run synchronously
7003function createFxNow() {
7004 window.setTimeout( function() {
7005 fxNow = undefined;
7006 } );
7007 return ( fxNow = Date.now() );
7008}
7009
7010// Generate parameters to create a standard animation
7011function genFx( type, includeWidth ) {
7012 var which,
7013 i = 0,
7014 attrs = { height: type };
7015
7016 // If we include width, step value is 1 to do all cssExpand values,
7017 // otherwise step value is 2 to skip over Left and Right
7018 includeWidth = includeWidth ? 1 : 0;
7019 for ( ; i < 4; i += 2 - includeWidth ) {
7020 which = cssExpand[ i ];
7021 attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
7022 }
7023
7024 if ( includeWidth ) {
7025 attrs.opacity = attrs.width = type;
7026 }
7027
7028 return attrs;
7029}
7030
7031function createTween( value, prop, animation ) {
7032 var tween,
7033 collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ),
7034 index = 0,
7035 length = collection.length;
7036 for ( ; index < length; index++ ) {
7037 if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {
7038
7039 // We're done with this property
7040 return tween;
7041 }
7042 }
7043}
7044
7045function defaultPrefilter( elem, props, opts ) {
7046 var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
7047 isBox = "width" in props || "height" in props,
7048 anim = this,
7049 orig = {},
7050 style = elem.style,
7051 hidden = elem.nodeType && isHiddenWithinTree( elem ),
7052 dataShow = dataPriv.get( elem, "fxshow" );
7053
7054 // Queue-skipping animations hijack the fx hooks
7055 if ( !opts.queue ) {
7056 hooks = jQuery._queueHooks( elem, "fx" );
7057 if ( hooks.unqueued == null ) {
7058 hooks.unqueued = 0;
7059 oldfire = hooks.empty.fire;
7060 hooks.empty.fire = function() {
7061 if ( !hooks.unqueued ) {
7062 oldfire();
7063 }
7064 };
7065 }
7066 hooks.unqueued++;
7067
7068 anim.always( function() {
7069
7070 // Ensure the complete handler is called before this completes
7071 anim.always( function() {
7072 hooks.unqueued--;
7073 if ( !jQuery.queue( elem, "fx" ).length ) {
7074 hooks.empty.fire();
7075 }
7076 } );
7077 } );
7078 }
7079
7080 // Detect show/hide animations
7081 for ( prop in props ) {
7082 value = props[ prop ];
7083 if ( rfxtypes.test( value ) ) {
7084 delete props[ prop ];
7085 toggle = toggle || value === "toggle";
7086 if ( value === ( hidden ? "hide" : "show" ) ) {
7087
7088 // Pretend to be hidden if this is a "show" and
7089 // there is still data from a stopped show/hide
7090 if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
7091 hidden = true;
7092
7093 // Ignore all other no-op show/hide data
7094 } else {
7095 continue;
7096 }
7097 }
7098 orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
7099 }
7100 }
7101
7102 // Bail out if this is a no-op like .hide().hide()
7103 propTween = !jQuery.isEmptyObject( props );
7104 if ( !propTween && jQuery.isEmptyObject( orig ) ) {
7105 return;
7106 }
7107
7108 // Restrict "overflow" and "display" styles during box animations
7109 if ( isBox && elem.nodeType === 1 ) {
7110
7111 // Support: IE <=9 - 11, Edge 12 - 15
7112 // Record all 3 overflow attributes because IE does not infer the shorthand
7113 // from identically-valued overflowX and overflowY and Edge just mirrors
7114 // the overflowX value there.
7115 opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
7116
7117 // Identify a display type, preferring old show/hide data over the CSS cascade
7118 restoreDisplay = dataShow && dataShow.display;
7119 if ( restoreDisplay == null ) {
7120 restoreDisplay = dataPriv.get( elem, "display" );
7121 }
7122 display = jQuery.css( elem, "display" );
7123 if ( display === "none" ) {
7124 if ( restoreDisplay ) {
7125 display = restoreDisplay;
7126 } else {
7127
7128 // Get nonempty value(s) by temporarily forcing visibility
7129 showHide( [ elem ], true );
7130 restoreDisplay = elem.style.display || restoreDisplay;
7131 display = jQuery.css( elem, "display" );
7132 showHide( [ elem ] );
7133 }
7134 }
7135
7136 // Animate inline elements as inline-block
7137 if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) {
7138 if ( jQuery.css( elem, "float" ) === "none" ) {
7139
7140 // Restore the original display value at the end of pure show/hide animations
7141 if ( !propTween ) {
7142 anim.done( function() {
7143 style.display = restoreDisplay;
7144 } );
7145 if ( restoreDisplay == null ) {
7146 display = style.display;
7147 restoreDisplay = display === "none" ? "" : display;
7148 }
7149 }
7150 style.display = "inline-block";
7151 }
7152 }
7153 }
7154
7155 if ( opts.overflow ) {
7156 style.overflow = "hidden";
7157 anim.always( function() {
7158 style.overflow = opts.overflow[ 0 ];
7159 style.overflowX = opts.overflow[ 1 ];
7160 style.overflowY = opts.overflow[ 2 ];
7161 } );
7162 }
7163
7164 // Implement show/hide animations
7165 propTween = false;
7166 for ( prop in orig ) {
7167
7168 // General show/hide setup for this element animation
7169 if ( !propTween ) {
7170 if ( dataShow ) {
7171 if ( "hidden" in dataShow ) {
7172 hidden = dataShow.hidden;
7173 }
7174 } else {
7175 dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } );
7176 }
7177
7178 // Store hidden/visible for toggle so `.stop().toggle()` "reverses"
7179 if ( toggle ) {
7180 dataShow.hidden = !hidden;
7181 }
7182
7183 // Show elements before animating them
7184 if ( hidden ) {
7185 showHide( [ elem ], true );
7186 }
7187
7188 /* eslint-disable no-loop-func */
7189
7190 anim.done( function() {
7191
7192 /* eslint-enable no-loop-func */
7193
7194 // The final step of a "hide" animation is actually hiding the element
7195 if ( !hidden ) {
7196 showHide( [ elem ] );
7197 }
7198 dataPriv.remove( elem, "fxshow" );
7199 for ( prop in orig ) {
7200 jQuery.style( elem, prop, orig[ prop ] );
7201 }
7202 } );
7203 }
7204
7205 // Per-property setup
7206 propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
7207 if ( !( prop in dataShow ) ) {
7208 dataShow[ prop ] = propTween.start;
7209 if ( hidden ) {
7210 propTween.end = propTween.start;
7211 propTween.start = 0;
7212 }
7213 }
7214 }
7215}
7216
7217function propFilter( props, specialEasing ) {
7218 var index, name, easing, value, hooks;
7219
7220 // camelCase, specialEasing and expand cssHook pass
7221 for ( index in props ) {
7222 name = camelCase( index );
7223 easing = specialEasing[ name ];
7224 value = props[ index ];
7225 if ( Array.isArray( value ) ) {
7226 easing = value[ 1 ];
7227 value = props[ index ] = value[ 0 ];
7228 }
7229
7230 if ( index !== name ) {
7231 props[ name ] = value;
7232 delete props[ index ];
7233 }
7234
7235 hooks = jQuery.cssHooks[ name ];
7236 if ( hooks && "expand" in hooks ) {
7237 value = hooks.expand( value );
7238 delete props[ name ];
7239
7240 // Not quite $.extend, this won't overwrite existing keys.
7241 // Reusing 'index' because we have the correct "name"
7242 for ( index in value ) {
7243 if ( !( index in props ) ) {
7244 props[ index ] = value[ index ];
7245 specialEasing[ index ] = easing;
7246 }
7247 }
7248 } else {
7249 specialEasing[ name ] = easing;
7250 }
7251 }
7252}
7253
7254function Animation( elem, properties, options ) {
7255 var result,
7256 stopped,
7257 index = 0,
7258 length = Animation.prefilters.length,
7259 deferred = jQuery.Deferred().always( function() {
7260
7261 // Don't match elem in the :animated selector
7262 delete tick.elem;
7263 } ),
7264 tick = function() {
7265 if ( stopped ) {
7266 return false;
7267 }
7268 var currentTime = fxNow || createFxNow(),
7269 remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
7270
7271 // Support: Android 2.3 only
7272 // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
7273 temp = remaining / animation.duration || 0,
7274 percent = 1 - temp,
7275 index = 0,
7276 length = animation.tweens.length;
7277
7278 for ( ; index < length; index++ ) {
7279 animation.tweens[ index ].run( percent );
7280 }
7281
7282 deferred.notifyWith( elem, [ animation, percent, remaining ] );
7283
7284 // If there's more to do, yield
7285 if ( percent < 1 && length ) {
7286 return remaining;
7287 }
7288
7289 // If this was an empty animation, synthesize a final progress notification
7290 if ( !length ) {
7291 deferred.notifyWith( elem, [ animation, 1, 0 ] );
7292 }
7293
7294 // Resolve the animation and report its conclusion
7295 deferred.resolveWith( elem, [ animation ] );
7296 return false;
7297 },
7298 animation = deferred.promise( {
7299 elem: elem,
7300 props: jQuery.extend( {}, properties ),
7301 opts: jQuery.extend( true, {
7302 specialEasing: {},
7303 easing: jQuery.easing._default
7304 }, options ),
7305 originalProperties: properties,
7306 originalOptions: options,
7307 startTime: fxNow || createFxNow(),
7308 duration: options.duration,
7309 tweens: [],
7310 createTween: function( prop, end ) {
7311 var tween = jQuery.Tween( elem, animation.opts, prop, end,
7312 animation.opts.specialEasing[ prop ] || animation.opts.easing );
7313 animation.tweens.push( tween );
7314 return tween;
7315 },
7316 stop: function( gotoEnd ) {
7317 var index = 0,
7318
7319 // If we are going to the end, we want to run all the tweens
7320 // otherwise we skip this part
7321 length = gotoEnd ? animation.tweens.length : 0;
7322 if ( stopped ) {
7323 return this;
7324 }
7325 stopped = true;
7326 for ( ; index < length; index++ ) {
7327 animation.tweens[ index ].run( 1 );
7328 }
7329
7330 // Resolve when we played the last frame; otherwise, reject
7331 if ( gotoEnd ) {
7332 deferred.notifyWith( elem, [ animation, 1, 0 ] );
7333 deferred.resolveWith( elem, [ animation, gotoEnd ] );
7334 } else {
7335 deferred.rejectWith( elem, [ animation, gotoEnd ] );
7336 }
7337 return this;
7338 }
7339 } ),
7340 props = animation.props;
7341
7342 propFilter( props, animation.opts.specialEasing );
7343
7344 for ( ; index < length; index++ ) {
7345 result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );
7346 if ( result ) {
7347 if ( isFunction( result.stop ) ) {
7348 jQuery._queueHooks( animation.elem, animation.opts.queue ).stop =
7349 result.stop.bind( result );
7350 }
7351 return result;
7352 }
7353 }
7354
7355 jQuery.map( props, createTween, animation );
7356
7357 if ( isFunction( animation.opts.start ) ) {
7358 animation.opts.start.call( elem, animation );
7359 }
7360
7361 // Attach callbacks from options
7362 animation
7363 .progress( animation.opts.progress )
7364 .done( animation.opts.done, animation.opts.complete )
7365 .fail( animation.opts.fail )
7366 .always( animation.opts.always );
7367
7368 jQuery.fx.timer(
7369 jQuery.extend( tick, {
7370 elem: elem,
7371 anim: animation,
7372 queue: animation.opts.queue
7373 } )
7374 );
7375
7376 return animation;
7377}
7378
7379jQuery.Animation = jQuery.extend( Animation, {
7380
7381 tweeners: {
7382 "*": [ function( prop, value ) {
7383 var tween = this.createTween( prop, value );
7384 adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );
7385 return tween;
7386 } ]
7387 },
7388
7389 tweener: function( props, callback ) {
7390 if ( isFunction( props ) ) {
7391 callback = props;
7392 props = [ "*" ];
7393 } else {
7394 props = props.match( rnothtmlwhite );
7395 }
7396
7397 var prop,
7398 index = 0,
7399 length = props.length;
7400
7401 for ( ; index < length; index++ ) {
7402 prop = props[ index ];
7403 Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];
7404 Animation.tweeners[ prop ].unshift( callback );
7405 }
7406 },
7407
7408 prefilters: [ defaultPrefilter ],
7409
7410 prefilter: function( callback, prepend ) {
7411 if ( prepend ) {
7412 Animation.prefilters.unshift( callback );
7413 } else {
7414 Animation.prefilters.push( callback );
7415 }
7416 }
7417} );
7418
7419jQuery.speed = function( speed, easing, fn ) {
7420 var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
7421 complete: fn || !fn && easing ||
7422 isFunction( speed ) && speed,
7423 duration: speed,
7424 easing: fn && easing || easing && !isFunction( easing ) && easing
7425 };
7426
7427 // Go to the end state if fx are off
7428 if ( jQuery.fx.off ) {
7429 opt.duration = 0;
7430
7431 } else {
7432 if ( typeof opt.duration !== "number" ) {
7433 if ( opt.duration in jQuery.fx.speeds ) {
7434 opt.duration = jQuery.fx.speeds[ opt.duration ];
7435
7436 } else {
7437 opt.duration = jQuery.fx.speeds._default;
7438 }
7439 }
7440 }
7441
7442 // Normalize opt.queue - true/undefined/null -> "fx"
7443 if ( opt.queue == null || opt.queue === true ) {
7444 opt.queue = "fx";
7445 }
7446
7447 // Queueing
7448 opt.old = opt.complete;
7449
7450 opt.complete = function() {
7451 if ( isFunction( opt.old ) ) {
7452 opt.old.call( this );
7453 }
7454
7455 if ( opt.queue ) {
7456 jQuery.dequeue( this, opt.queue );
7457 }
7458 };
7459
7460 return opt;
7461};
7462
7463jQuery.fn.extend( {
7464 fadeTo: function( speed, to, easing, callback ) {
7465
7466 // Show any hidden elements after setting opacity to 0
7467 return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show()
7468
7469 // Animate to the value specified
7470 .end().animate( { opacity: to }, speed, easing, callback );
7471 },
7472 animate: function( prop, speed, easing, callback ) {
7473 var empty = jQuery.isEmptyObject( prop ),
7474 optall = jQuery.speed( speed, easing, callback ),
7475 doAnimation = function() {
7476
7477 // Operate on a copy of prop so per-property easing won't be lost
7478 var anim = Animation( this, jQuery.extend( {}, prop ), optall );
7479
7480 // Empty animations, or finishing resolves immediately
7481 if ( empty || dataPriv.get( this, "finish" ) ) {
7482 anim.stop( true );
7483 }
7484 };
7485 doAnimation.finish = doAnimation;
7486
7487 return empty || optall.queue === false ?
7488 this.each( doAnimation ) :
7489 this.queue( optall.queue, doAnimation );
7490 },
7491 stop: function( type, clearQueue, gotoEnd ) {
7492 var stopQueue = function( hooks ) {
7493 var stop = hooks.stop;
7494 delete hooks.stop;
7495 stop( gotoEnd );
7496 };
7497
7498 if ( typeof type !== "string" ) {
7499 gotoEnd = clearQueue;
7500 clearQueue = type;
7501 type = undefined;
7502 }
7503 if ( clearQueue && type !== false ) {
7504 this.queue( type || "fx", [] );
7505 }
7506
7507 return this.each( function() {
7508 var dequeue = true,
7509 index = type != null && type + "queueHooks",
7510 timers = jQuery.timers,
7511 data = dataPriv.get( this );
7512
7513 if ( index ) {
7514 if ( data[ index ] && data[ index ].stop ) {
7515 stopQueue( data[ index ] );
7516 }
7517 } else {
7518 for ( index in data ) {
7519 if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
7520 stopQueue( data[ index ] );
7521 }
7522 }
7523 }
7524
7525 for ( index = timers.length; index--; ) {
7526 if ( timers[ index ].elem === this &&
7527 ( type == null || timers[ index ].queue === type ) ) {
7528
7529 timers[ index ].anim.stop( gotoEnd );
7530 dequeue = false;
7531 timers.splice( index, 1 );
7532 }
7533 }
7534
7535 // Start the next in the queue if the last step wasn't forced.
7536 // Timers currently will call their complete callbacks, which
7537 // will dequeue but only if they were gotoEnd.
7538 if ( dequeue || !gotoEnd ) {
7539 jQuery.dequeue( this, type );
7540 }
7541 } );
7542 },
7543 finish: function( type ) {
7544 if ( type !== false ) {
7545 type = type || "fx";
7546 }
7547 return this.each( function() {
7548 var index,
7549 data = dataPriv.get( this ),
7550 queue = data[ type + "queue" ],
7551 hooks = data[ type + "queueHooks" ],
7552 timers = jQuery.timers,
7553 length = queue ? queue.length : 0;
7554
7555 // Enable finishing flag on private data
7556 data.finish = true;
7557
7558 // Empty the queue first
7559 jQuery.queue( this, type, [] );
7560
7561 if ( hooks && hooks.stop ) {
7562 hooks.stop.call( this, true );
7563 }
7564
7565 // Look for any active animations, and finish them
7566 for ( index = timers.length; index--; ) {
7567 if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
7568 timers[ index ].anim.stop( true );
7569 timers.splice( index, 1 );
7570 }
7571 }
7572
7573 // Look for any animations in the old queue and finish them
7574 for ( index = 0; index < length; index++ ) {
7575 if ( queue[ index ] && queue[ index ].finish ) {
7576 queue[ index ].finish.call( this );
7577 }
7578 }
7579
7580 // Turn off finishing flag
7581 delete data.finish;
7582 } );
7583 }
7584} );
7585
7586jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) {
7587 var cssFn = jQuery.fn[ name ];
7588 jQuery.fn[ name ] = function( speed, easing, callback ) {
7589 return speed == null || typeof speed === "boolean" ?
7590 cssFn.apply( this, arguments ) :
7591 this.animate( genFx( name, true ), speed, easing, callback );
7592 };
7593} );
7594
7595// Generate shortcuts for custom animations
7596jQuery.each( {
7597 slideDown: genFx( "show" ),
7598 slideUp: genFx( "hide" ),
7599 slideToggle: genFx( "toggle" ),
7600 fadeIn: { opacity: "show" },
7601 fadeOut: { opacity: "hide" },
7602 fadeToggle: { opacity: "toggle" }
7603}, function( name, props ) {
7604 jQuery.fn[ name ] = function( speed, easing, callback ) {
7605 return this.animate( props, speed, easing, callback );
7606 };
7607} );
7608
7609jQuery.timers = [];
7610jQuery.fx.tick = function() {
7611 var timer,
7612 i = 0,
7613 timers = jQuery.timers;
7614
7615 fxNow = Date.now();
7616
7617 for ( ; i < timers.length; i++ ) {
7618 timer = timers[ i ];
7619
7620 // Run the timer and safely remove it when done (allowing for external removal)
7621 if ( !timer() && timers[ i ] === timer ) {
7622 timers.splice( i--, 1 );
7623 }
7624 }
7625
7626 if ( !timers.length ) {
7627 jQuery.fx.stop();
7628 }
7629 fxNow = undefined;
7630};
7631
7632jQuery.fx.timer = function( timer ) {
7633 jQuery.timers.push( timer );
7634 jQuery.fx.start();
7635};
7636
7637jQuery.fx.interval = 13;
7638jQuery.fx.start = function() {
7639 if ( inProgress ) {
7640 return;
7641 }
7642
7643 inProgress = true;
7644 schedule();
7645};
7646
7647jQuery.fx.stop = function() {
7648 inProgress = null;
7649};
7650
7651jQuery.fx.speeds = {
7652 slow: 600,
7653 fast: 200,
7654
7655 // Default speed
7656 _default: 400
7657};
7658
7659
7660// Based off of the plugin by Clint Helfers, with permission.
7661// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/
7662jQuery.fn.delay = function( time, type ) {
7663 time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
7664 type = type || "fx";
7665
7666 return this.queue( type, function( next, hooks ) {
7667 var timeout = window.setTimeout( next, time );
7668 hooks.stop = function() {
7669 window.clearTimeout( timeout );
7670 };
7671 } );
7672};
7673
7674
7675( function() {
7676 var input = document.createElement( "input" ),
7677 select = document.createElement( "select" ),
7678 opt = select.appendChild( document.createElement( "option" ) );
7679
7680 input.type = "checkbox";
7681
7682 // Support: Android <=4.3 only
7683 // Default value for a checkbox should be "on"
7684 support.checkOn = input.value !== "";
7685
7686 // Support: IE <=11 only
7687 // Must access selectedIndex to make default options select
7688 support.optSelected = opt.selected;
7689
7690 // Support: IE <=11 only
7691 // An input loses its value after becoming a radio
7692 input = document.createElement( "input" );
7693 input.value = "t";
7694 input.type = "radio";
7695 support.radioValue = input.value === "t";
7696} )();
7697
7698
7699var boolHook,
7700 attrHandle = jQuery.expr.attrHandle;
7701
7702jQuery.fn.extend( {
7703 attr: function( name, value ) {
7704 return access( this, jQuery.attr, name, value, arguments.length > 1 );
7705 },
7706
7707 removeAttr: function( name ) {
7708 return this.each( function() {
7709 jQuery.removeAttr( this, name );
7710 } );
7711 }
7712} );
7713
7714jQuery.extend( {
7715 attr: function( elem, name, value ) {
7716 var ret, hooks,
7717 nType = elem.nodeType;
7718
7719 // Don't get/set attributes on text, comment and attribute nodes
7720 if ( nType === 3 || nType === 8 || nType === 2 ) {
7721 return;
7722 }
7723
7724 // Fallback to prop when attributes are not supported
7725 if ( typeof elem.getAttribute === "undefined" ) {
7726 return jQuery.prop( elem, name, value );
7727 }
7728
7729 // Attribute hooks are determined by the lowercase version
7730 // Grab necessary hook if one is defined
7731 if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
7732 hooks = jQuery.attrHooks[ name.toLowerCase() ] ||
7733 ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );
7734 }
7735
7736 if ( value !== undefined ) {
7737 if ( value === null ) {
7738 jQuery.removeAttr( elem, name );
7739 return;
7740 }
7741
7742 if ( hooks && "set" in hooks &&
7743 ( ret = hooks.set( elem, value, name ) ) !== undefined ) {
7744 return ret;
7745 }
7746
7747 elem.setAttribute( name, value + "" );
7748 return value;
7749 }
7750
7751 if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
7752 return ret;
7753 }
7754
7755 ret = jQuery.find.attr( elem, name );
7756
7757 // Non-existent attributes return null, we normalize to undefined
7758 return ret == null ? undefined : ret;
7759 },
7760
7761 attrHooks: {
7762 type: {
7763 set: function( elem, value ) {
7764 if ( !support.radioValue && value === "radio" &&
7765 nodeName( elem, "input" ) ) {
7766 var val = elem.value;
7767 elem.setAttribute( "type", value );
7768 if ( val ) {
7769 elem.value = val;
7770 }
7771 return value;
7772 }
7773 }
7774 }
7775 },
7776
7777 removeAttr: function( elem, value ) {
7778 var name,
7779 i = 0,
7780
7781 // Attribute names can contain non-HTML whitespace characters
7782 // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
7783 attrNames = value && value.match( rnothtmlwhite );
7784
7785 if ( attrNames && elem.nodeType === 1 ) {
7786 while ( ( name = attrNames[ i++ ] ) ) {
7787 elem.removeAttribute( name );
7788 }
7789 }
7790 }
7791} );
7792
7793// Hooks for boolean attributes
7794boolHook = {
7795 set: function( elem, value, name ) {
7796 if ( value === false ) {
7797
7798 // Remove boolean attributes when set to false
7799 jQuery.removeAttr( elem, name );
7800 } else {
7801 elem.setAttribute( name, name );
7802 }
7803 return name;
7804 }
7805};
7806
7807jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
7808 var getter = attrHandle[ name ] || jQuery.find.attr;
7809
7810 attrHandle[ name ] = function( elem, name, isXML ) {
7811 var ret, handle,
7812 lowercaseName = name.toLowerCase();
7813
7814 if ( !isXML ) {
7815
7816 // Avoid an infinite loop by temporarily removing this function from the getter
7817 handle = attrHandle[ lowercaseName ];
7818 attrHandle[ lowercaseName ] = ret;
7819 ret = getter( elem, name, isXML ) != null ?
7820 lowercaseName :
7821 null;
7822 attrHandle[ lowercaseName ] = handle;
7823 }
7824 return ret;
7825 };
7826} );
7827
7828
7829
7830
7831var rfocusable = /^(?:input|select|textarea|button)$/i,
7832 rclickable = /^(?:a|area)$/i;
7833
7834jQuery.fn.extend( {
7835 prop: function( name, value ) {
7836 return access( this, jQuery.prop, name, value, arguments.length > 1 );
7837 },
7838
7839 removeProp: function( name ) {
7840 return this.each( function() {
7841 delete this[ jQuery.propFix[ name ] || name ];
7842 } );
7843 }
7844} );
7845
7846jQuery.extend( {
7847 prop: function( elem, name, value ) {
7848 var ret, hooks,
7849 nType = elem.nodeType;
7850
7851 // Don't get/set properties on text, comment and attribute nodes
7852 if ( nType === 3 || nType === 8 || nType === 2 ) {
7853 return;
7854 }
7855
7856 if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
7857
7858 // Fix name and attach hooks
7859 name = jQuery.propFix[ name ] || name;
7860 hooks = jQuery.propHooks[ name ];
7861 }
7862
7863 if ( value !== undefined ) {
7864 if ( hooks && "set" in hooks &&
7865 ( ret = hooks.set( elem, value, name ) ) !== undefined ) {
7866 return ret;
7867 }
7868
7869 return ( elem[ name ] = value );
7870 }
7871
7872 if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
7873 return ret;
7874 }
7875
7876 return elem[ name ];
7877 },
7878
7879 propHooks: {
7880 tabIndex: {
7881 get: function( elem ) {
7882
7883 // Support: IE <=9 - 11 only
7884 // elem.tabIndex doesn't always return the
7885 // correct value when it hasn't been explicitly set
7886 // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
7887 // Use proper attribute retrieval(#12072)
7888 var tabindex = jQuery.find.attr( elem, "tabindex" );
7889
7890 if ( tabindex ) {
7891 return parseInt( tabindex, 10 );
7892 }
7893
7894 if (
7895 rfocusable.test( elem.nodeName ) ||
7896 rclickable.test( elem.nodeName ) &&
7897 elem.href
7898 ) {
7899 return 0;
7900 }
7901
7902 return -1;
7903 }
7904 }
7905 },
7906
7907 propFix: {
7908 "for": "htmlFor",
7909 "class": "className"
7910 }
7911} );
7912
7913// Support: IE <=11 only
7914// Accessing the selectedIndex property
7915// forces the browser to respect setting selected
7916// on the option
7917// The getter ensures a default option is selected
7918// when in an optgroup
7919// eslint rule "no-unused-expressions" is disabled for this code
7920// since it considers such accessions noop
7921if ( !support.optSelected ) {
7922 jQuery.propHooks.selected = {
7923 get: function( elem ) {
7924
7925 /* eslint no-unused-expressions: "off" */
7926
7927 var parent = elem.parentNode;
7928 if ( parent && parent.parentNode ) {
7929 parent.parentNode.selectedIndex;
7930 }
7931 return null;
7932 },
7933 set: function( elem ) {
7934
7935 /* eslint no-unused-expressions: "off" */
7936
7937 var parent = elem.parentNode;
7938 if ( parent ) {
7939 parent.selectedIndex;
7940
7941 if ( parent.parentNode ) {
7942 parent.parentNode.selectedIndex;
7943 }
7944 }
7945 }
7946 };
7947}
7948
7949jQuery.each( [
7950 "tabIndex",
7951 "readOnly",
7952 "maxLength",
7953 "cellSpacing",
7954 "cellPadding",
7955 "rowSpan",
7956 "colSpan",
7957 "useMap",
7958 "frameBorder",
7959 "contentEditable"
7960], function() {
7961 jQuery.propFix[ this.toLowerCase() ] = this;
7962} );
7963
7964
7965
7966
7967 // Strip and collapse whitespace according to HTML spec
7968 // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace
7969 function stripAndCollapse( value ) {
7970 var tokens = value.match( rnothtmlwhite ) || [];
7971 return tokens.join( " " );
7972 }
7973
7974
7975function getClass( elem ) {
7976 return elem.getAttribute && elem.getAttribute( "class" ) || "";
7977}
7978
7979function classesToArray( value ) {
7980 if ( Array.isArray( value ) ) {
7981 return value;
7982 }
7983 if ( typeof value === "string" ) {
7984 return value.match( rnothtmlwhite ) || [];
7985 }
7986 return [];
7987}
7988
7989jQuery.fn.extend( {
7990 addClass: function( value ) {
7991 var classes, elem, cur, curValue, clazz, j, finalValue,
7992 i = 0;
7993
7994 if ( isFunction( value ) ) {
7995 return this.each( function( j ) {
7996 jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
7997 } );
7998 }
7999
8000 classes = classesToArray( value );
8001
8002 if ( classes.length ) {
8003 while ( ( elem = this[ i++ ] ) ) {
8004 curValue = getClass( elem );
8005 cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
8006
8007 if ( cur ) {
8008 j = 0;
8009 while ( ( clazz = classes[ j++ ] ) ) {
8010 if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
8011 cur += clazz + " ";
8012 }
8013 }
8014
8015 // Only assign if different to avoid unneeded rendering.
8016 finalValue = stripAndCollapse( cur );
8017 if ( curValue !== finalValue ) {
8018 elem.setAttribute( "class", finalValue );
8019 }
8020 }
8021 }
8022 }
8023
8024 return this;
8025 },
8026
8027 removeClass: function( value ) {
8028 var classes, elem, cur, curValue, clazz, j, finalValue,
8029 i = 0;
8030
8031 if ( isFunction( value ) ) {
8032 return this.each( function( j ) {
8033 jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
8034 } );
8035 }
8036
8037 if ( !arguments.length ) {
8038 return this.attr( "class", "" );
8039 }
8040
8041 classes = classesToArray( value );
8042
8043 if ( classes.length ) {
8044 while ( ( elem = this[ i++ ] ) ) {
8045 curValue = getClass( elem );
8046
8047 // This expression is here for better compressibility (see addClass)
8048 cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
8049
8050 if ( cur ) {
8051 j = 0;
8052 while ( ( clazz = classes[ j++ ] ) ) {
8053
8054 // Remove *all* instances
8055 while ( cur.indexOf( " " + clazz + " " ) > -1 ) {
8056 cur = cur.replace( " " + clazz + " ", " " );
8057 }
8058 }
8059
8060 // Only assign if different to avoid unneeded rendering.
8061 finalValue = stripAndCollapse( cur );
8062 if ( curValue !== finalValue ) {
8063 elem.setAttribute( "class", finalValue );
8064 }
8065 }
8066 }
8067 }
8068
8069 return this;
8070 },
8071
8072 toggleClass: function( value, stateVal ) {
8073 var type = typeof value,
8074 isValidValue = type === "string" || Array.isArray( value );
8075
8076 if ( typeof stateVal === "boolean" && isValidValue ) {
8077 return stateVal ? this.addClass( value ) : this.removeClass( value );
8078 }
8079
8080 if ( isFunction( value ) ) {
8081 return this.each( function( i ) {
8082 jQuery( this ).toggleClass(
8083 value.call( this, i, getClass( this ), stateVal ),
8084 stateVal
8085 );
8086 } );
8087 }
8088
8089 return this.each( function() {
8090 var className, i, self, classNames;
8091
8092 if ( isValidValue ) {
8093
8094 // Toggle individual class names
8095 i = 0;
8096 self = jQuery( this );
8097 classNames = classesToArray( value );
8098
8099 while ( ( className = classNames[ i++ ] ) ) {
8100
8101 // Check each className given, space separated list
8102 if ( self.hasClass( className ) ) {
8103 self.removeClass( className );
8104 } else {
8105 self.addClass( className );
8106 }
8107 }
8108
8109 // Toggle whole class name
8110 } else if ( value === undefined || type === "boolean" ) {
8111 className = getClass( this );
8112 if ( className ) {
8113
8114 // Store className if set
8115 dataPriv.set( this, "__className__", className );
8116 }
8117
8118 // If the element has a class name or if we're passed `false`,
8119 // then remove the whole classname (if there was one, the above saved it).
8120 // Otherwise bring back whatever was previously saved (if anything),
8121 // falling back to the empty string if nothing was stored.
8122 if ( this.setAttribute ) {
8123 this.setAttribute( "class",
8124 className || value === false ?
8125 "" :
8126 dataPriv.get( this, "__className__" ) || ""
8127 );
8128 }
8129 }
8130 } );
8131 },
8132
8133 hasClass: function( selector ) {
8134 var className, elem,
8135 i = 0;
8136
8137 className = " " + selector + " ";
8138 while ( ( elem = this[ i++ ] ) ) {
8139 if ( elem.nodeType === 1 &&
8140 ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) {
8141 return true;
8142 }
8143 }
8144
8145 return false;
8146 }
8147} );
8148
8149
8150
8151
8152var rreturn = /\r/g;
8153
8154jQuery.fn.extend( {
8155 val: function( value ) {
8156 var hooks, ret, valueIsFunction,
8157 elem = this[ 0 ];
8158
8159 if ( !arguments.length ) {
8160 if ( elem ) {
8161 hooks = jQuery.valHooks[ elem.type ] ||
8162 jQuery.valHooks[ elem.nodeName.toLowerCase() ];
8163
8164 if ( hooks &&
8165 "get" in hooks &&
8166 ( ret = hooks.get( elem, "value" ) ) !== undefined
8167 ) {
8168 return ret;
8169 }
8170
8171 ret = elem.value;
8172
8173 // Handle most common string cases
8174 if ( typeof ret === "string" ) {
8175 return ret.replace( rreturn, "" );
8176 }
8177
8178 // Handle cases where value is null/undef or number
8179 return ret == null ? "" : ret;
8180 }
8181
8182 return;
8183 }
8184
8185 valueIsFunction = isFunction( value );
8186
8187 return this.each( function( i ) {
8188 var val;
8189
8190 if ( this.nodeType !== 1 ) {
8191 return;
8192 }
8193
8194 if ( valueIsFunction ) {
8195 val = value.call( this, i, jQuery( this ).val() );
8196 } else {
8197 val = value;
8198 }
8199
8200 // Treat null/undefined as ""; convert numbers to string
8201 if ( val == null ) {
8202 val = "";
8203
8204 } else if ( typeof val === "number" ) {
8205 val += "";
8206
8207 } else if ( Array.isArray( val ) ) {
8208 val = jQuery.map( val, function( value ) {
8209 return value == null ? "" : value + "";
8210 } );
8211 }
8212
8213 hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
8214
8215 // If set returns undefined, fall back to normal setting
8216 if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {
8217 this.value = val;
8218 }
8219 } );
8220 }
8221} );
8222
8223jQuery.extend( {
8224 valHooks: {
8225 option: {
8226 get: function( elem ) {
8227
8228 var val = jQuery.find.attr( elem, "value" );
8229 return val != null ?
8230 val :
8231
8232 // Support: IE <=10 - 11 only
8233 // option.text throws exceptions (#14686, #14858)
8234 // Strip and collapse whitespace
8235 // https://html.spec.whatwg.org/#strip-and-collapse-whitespace
8236 stripAndCollapse( jQuery.text( elem ) );
8237 }
8238 },
8239 select: {
8240 get: function( elem ) {
8241 var value, option, i,
8242 options = elem.options,
8243 index = elem.selectedIndex,
8244 one = elem.type === "select-one",
8245 values = one ? null : [],
8246 max = one ? index + 1 : options.length;
8247
8248 if ( index < 0 ) {
8249 i = max;
8250
8251 } else {
8252 i = one ? index : 0;
8253 }
8254
8255 // Loop through all the selected options
8256 for ( ; i < max; i++ ) {
8257 option = options[ i ];
8258
8259 // Support: IE <=9 only
8260 // IE8-9 doesn't update selected after form reset (#2551)
8261 if ( ( option.selected || i === index ) &&
8262
8263 // Don't return options that are disabled or in a disabled optgroup
8264 !option.disabled &&
8265 ( !option.parentNode.disabled ||
8266 !nodeName( option.parentNode, "optgroup" ) ) ) {
8267
8268 // Get the specific value for the option
8269 value = jQuery( option ).val();
8270
8271 // We don't need an array for one selects
8272 if ( one ) {
8273 return value;
8274 }
8275
8276 // Multi-Selects return an array
8277 values.push( value );
8278 }
8279 }
8280
8281 return values;
8282 },
8283
8284 set: function( elem, value ) {
8285 var optionSet, option,
8286 options = elem.options,
8287 values = jQuery.makeArray( value ),
8288 i = options.length;
8289
8290 while ( i-- ) {
8291 option = options[ i ];
8292
8293 /* eslint-disable no-cond-assign */
8294
8295 if ( option.selected =
8296 jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
8297 ) {
8298 optionSet = true;
8299 }
8300
8301 /* eslint-enable no-cond-assign */
8302 }
8303
8304 // Force browsers to behave consistently when non-matching value is set
8305 if ( !optionSet ) {
8306 elem.selectedIndex = -1;
8307 }
8308 return values;
8309 }
8310 }
8311 }
8312} );
8313
8314// Radios and checkboxes getter/setter
8315jQuery.each( [ "radio", "checkbox" ], function() {
8316 jQuery.valHooks[ this ] = {
8317 set: function( elem, value ) {
8318 if ( Array.isArray( value ) ) {
8319 return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
8320 }
8321 }
8322 };
8323 if ( !support.checkOn ) {
8324 jQuery.valHooks[ this ].get = function( elem ) {
8325 return elem.getAttribute( "value" ) === null ? "on" : elem.value;
8326 };
8327 }
8328} );
8329
8330
8331
8332
8333// Return jQuery for attributes-only inclusion
8334
8335
8336support.focusin = "onfocusin" in window;
8337
8338
8339var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
8340 stopPropagationCallback = function( e ) {
8341 e.stopPropagation();
8342 };
8343
8344jQuery.extend( jQuery.event, {
8345
8346 trigger: function( event, data, elem, onlyHandlers ) {
8347
8348 var i, cur, tmp, bubbleType, ontype, handle, special, lastElement,
8349 eventPath = [ elem || document ],
8350 type = hasOwn.call( event, "type" ) ? event.type : event,
8351 namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : [];
8352
8353 cur = lastElement = tmp = elem = elem || document;
8354
8355 // Don't do events on text and comment nodes
8356 if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
8357 return;
8358 }
8359
8360 // focus/blur morphs to focusin/out; ensure we're not firing them right now
8361 if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
8362 return;
8363 }
8364
8365 if ( type.indexOf( "." ) > -1 ) {
8366
8367 // Namespaced trigger; create a regexp to match event type in handle()
8368 namespaces = type.split( "." );
8369 type = namespaces.shift();
8370 namespaces.sort();
8371 }
8372 ontype = type.indexOf( ":" ) < 0 && "on" + type;
8373
8374 // Caller can pass in a jQuery.Event object, Object, or just an event type string
8375 event = event[ jQuery.expando ] ?
8376 event :
8377 new jQuery.Event( type, typeof event === "object" && event );
8378
8379 // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
8380 event.isTrigger = onlyHandlers ? 2 : 3;
8381 event.namespace = namespaces.join( "." );
8382 event.rnamespace = event.namespace ?
8383 new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) :
8384 null;
8385
8386 // Clean up the event in case it is being reused
8387 event.result = undefined;
8388 if ( !event.target ) {
8389 event.target = elem;
8390 }
8391
8392 // Clone any incoming data and prepend the event, creating the handler arg list
8393 data = data == null ?
8394 [ event ] :
8395 jQuery.makeArray( data, [ event ] );
8396
8397 // Allow special events to draw outside the lines
8398 special = jQuery.event.special[ type ] || {};
8399 if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
8400 return;
8401 }
8402
8403 // Determine event propagation path in advance, per W3C events spec (#9951)
8404 // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
8405 if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {
8406
8407 bubbleType = special.delegateType || type;
8408 if ( !rfocusMorph.test( bubbleType + type ) ) {
8409 cur = cur.parentNode;
8410 }
8411 for ( ; cur; cur = cur.parentNode ) {
8412 eventPath.push( cur );
8413 tmp = cur;
8414 }
8415
8416 // Only add window if we got to document (e.g., not plain obj or detached DOM)
8417 if ( tmp === ( elem.ownerDocument || document ) ) {
8418 eventPath.push( tmp.defaultView || tmp.parentWindow || window );
8419 }
8420 }
8421
8422 // Fire handlers on the event path
8423 i = 0;
8424 while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {
8425 lastElement = cur;
8426 event.type = i > 1 ?
8427 bubbleType :
8428 special.bindType || type;
8429
8430 // jQuery handler
8431 handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] &&
8432 dataPriv.get( cur, "handle" );
8433 if ( handle ) {
8434 handle.apply( cur, data );
8435 }
8436
8437 // Native handler
8438 handle = ontype && cur[ ontype ];
8439 if ( handle && handle.apply && acceptData( cur ) ) {
8440 event.result = handle.apply( cur, data );
8441 if ( event.result === false ) {
8442 event.preventDefault();
8443 }
8444 }
8445 }
8446 event.type = type;
8447
8448 // If nobody prevented the default action, do it now
8449 if ( !onlyHandlers && !event.isDefaultPrevented() ) {
8450
8451 if ( ( !special._default ||
8452 special._default.apply( eventPath.pop(), data ) === false ) &&
8453 acceptData( elem ) ) {
8454
8455 // Call a native DOM method on the target with the same name as the event.
8456 // Don't do default actions on window, that's where global variables be (#6170)
8457 if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {
8458
8459 // Don't re-trigger an onFOO event when we call its FOO() method
8460 tmp = elem[ ontype ];
8461
8462 if ( tmp ) {
8463 elem[ ontype ] = null;
8464 }
8465
8466 // Prevent re-triggering of the same event, since we already bubbled it above
8467 jQuery.event.triggered = type;
8468
8469 if ( event.isPropagationStopped() ) {
8470 lastElement.addEventListener( type, stopPropagationCallback );
8471 }
8472
8473 elem[ type ]();
8474
8475 if ( event.isPropagationStopped() ) {
8476 lastElement.removeEventListener( type, stopPropagationCallback );
8477 }
8478
8479 jQuery.event.triggered = undefined;
8480
8481 if ( tmp ) {
8482 elem[ ontype ] = tmp;
8483 }
8484 }
8485 }
8486 }
8487
8488 return event.result;
8489 },
8490
8491 // Piggyback on a donor event to simulate a different one
8492 // Used only for `focus(in | out)` events
8493 simulate: function( type, elem, event ) {
8494 var e = jQuery.extend(
8495 new jQuery.Event(),
8496 event,
8497 {
8498 type: type,
8499 isSimulated: true
8500 }
8501 );
8502
8503 jQuery.event.trigger( e, null, elem );
8504 }
8505
8506} );
8507
8508jQuery.fn.extend( {
8509
8510 trigger: function( type, data ) {
8511 return this.each( function() {
8512 jQuery.event.trigger( type, data, this );
8513 } );
8514 },
8515 triggerHandler: function( type, data ) {
8516 var elem = this[ 0 ];
8517 if ( elem ) {
8518 return jQuery.event.trigger( type, data, elem, true );
8519 }
8520 }
8521} );
8522
8523
8524// Support: Firefox <=44
8525// Firefox doesn't have focus(in | out) events
8526// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
8527//
8528// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
8529// focus(in | out) events fire after focus & blur events,
8530// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
8531// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
8532if ( !support.focusin ) {
8533 jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {
8534
8535 // Attach a single capturing handler on the document while someone wants focusin/focusout
8536 var handler = function( event ) {
8537 jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );
8538 };
8539
8540 jQuery.event.special[ fix ] = {
8541 setup: function() {
8542 var doc = this.ownerDocument || this,
8543 attaches = dataPriv.access( doc, fix );
8544
8545 if ( !attaches ) {
8546 doc.addEventListener( orig, handler, true );
8547 }
8548 dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
8549 },
8550 teardown: function() {
8551 var doc = this.ownerDocument || this,
8552 attaches = dataPriv.access( doc, fix ) - 1;
8553
8554 if ( !attaches ) {
8555 doc.removeEventListener( orig, handler, true );
8556 dataPriv.remove( doc, fix );
8557
8558 } else {
8559 dataPriv.access( doc, fix, attaches );
8560 }
8561 }
8562 };
8563 } );
8564}
8565var location = window.location;
8566
8567var nonce = Date.now();
8568
8569var rquery = ( /\?/ );
8570
8571
8572
8573// Cross-browser xml parsing
8574jQuery.parseXML = function( data ) {
8575 var xml;
8576 if ( !data || typeof data !== "string" ) {
8577 return null;
8578 }
8579
8580 // Support: IE 9 - 11 only
8581 // IE throws on parseFromString with invalid input.
8582 try {
8583 xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
8584 } catch ( e ) {
8585 xml = undefined;
8586 }
8587
8588 if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
8589 jQuery.error( "Invalid XML: " + data );
8590 }
8591 return xml;
8592};
8593
8594
8595var
8596 rbracket = /\[\]$/,
8597 rCRLF = /\r?\n/g,
8598 rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
8599 rsubmittable = /^(?:input|select|textarea|keygen)/i;
8600
8601function buildParams( prefix, obj, traditional, add ) {
8602 var name;
8603
8604 if ( Array.isArray( obj ) ) {
8605
8606 // Serialize array item.
8607 jQuery.each( obj, function( i, v ) {
8608 if ( traditional || rbracket.test( prefix ) ) {
8609
8610 // Treat each array item as a scalar.
8611 add( prefix, v );
8612
8613 } else {
8614
8615 // Item is non-scalar (array or object), encode its numeric index.
8616 buildParams(
8617 prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",
8618 v,
8619 traditional,
8620 add
8621 );
8622 }
8623 } );
8624
8625 } else if ( !traditional && toType( obj ) === "object" ) {
8626
8627 // Serialize object item.
8628 for ( name in obj ) {
8629 buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
8630 }
8631
8632 } else {
8633
8634 // Serialize scalar item.
8635 add( prefix, obj );
8636 }
8637}
8638
8639// Serialize an array of form elements or a set of
8640// key/values into a query string
8641jQuery.param = function( a, traditional ) {
8642 var prefix,
8643 s = [],
8644 add = function( key, valueOrFunction ) {
8645
8646 // If value is a function, invoke it and use its return value
8647 var value = isFunction( valueOrFunction ) ?
8648 valueOrFunction() :
8649 valueOrFunction;
8650
8651 s[ s.length ] = encodeURIComponent( key ) + "=" +
8652 encodeURIComponent( value == null ? "" : value );
8653 };
8654
8655 // If an array was passed in, assume that it is an array of form elements.
8656 if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
8657
8658 // Serialize the form elements
8659 jQuery.each( a, function() {
8660 add( this.name, this.value );
8661 } );
8662
8663 } else {
8664
8665 // If traditional, encode the "old" way (the way 1.3.2 or older
8666 // did it), otherwise encode params recursively.
8667 for ( prefix in a ) {
8668 buildParams( prefix, a[ prefix ], traditional, add );
8669 }
8670 }
8671
8672 // Return the resulting serialization
8673 return s.join( "&" );
8674};
8675
8676jQuery.fn.extend( {
8677 serialize: function() {
8678 return jQuery.param( this.serializeArray() );
8679 },
8680 serializeArray: function() {
8681 return this.map( function() {
8682
8683 // Can add propHook for "elements" to filter or add form elements
8684 var elements = jQuery.prop( this, "elements" );
8685 return elements ? jQuery.makeArray( elements ) : this;
8686 } )
8687 .filter( function() {
8688 var type = this.type;
8689
8690 // Use .is( ":disabled" ) so that fieldset[disabled] works
8691 return this.name && !jQuery( this ).is( ":disabled" ) &&
8692 rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
8693 ( this.checked || !rcheckableType.test( type ) );
8694 } )
8695 .map( function( i, elem ) {
8696 var val = jQuery( this ).val();
8697
8698 if ( val == null ) {
8699 return null;
8700 }
8701
8702 if ( Array.isArray( val ) ) {
8703 return jQuery.map( val, function( val ) {
8704 return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
8705 } );
8706 }
8707
8708 return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
8709 } ).get();
8710 }
8711} );
8712
8713
8714var
8715 r20 = /%20/g,
8716 rhash = /#.*$/,
8717 rantiCache = /([?&])_=[^&]*/,
8718 rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
8719
8720 // #7653, #8125, #8152: local protocol detection
8721 rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
8722 rnoContent = /^(?:GET|HEAD)$/,
8723 rprotocol = /^\/\//,
8724
8725 /* Prefilters
8726 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
8727 * 2) These are called:
8728 * - BEFORE asking for a transport
8729 * - AFTER param serialization (s.data is a string if s.processData is true)
8730 * 3) key is the dataType
8731 * 4) the catchall symbol "*" can be used
8732 * 5) execution will start with transport dataType and THEN continue down to "*" if needed
8733 */
8734 prefilters = {},
8735
8736 /* Transports bindings
8737 * 1) key is the dataType
8738 * 2) the catchall symbol "*" can be used
8739 * 3) selection will start with transport dataType and THEN go to "*" if needed
8740 */
8741 transports = {},
8742
8743 // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
8744 allTypes = "*/".concat( "*" ),
8745
8746 // Anchor tag for parsing the document origin
8747 originAnchor = document.createElement( "a" );
8748 originAnchor.href = location.href;
8749
8750// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
8751function addToPrefiltersOrTransports( structure ) {
8752
8753 // dataTypeExpression is optional and defaults to "*"
8754 return function( dataTypeExpression, func ) {
8755
8756 if ( typeof dataTypeExpression !== "string" ) {
8757 func = dataTypeExpression;
8758 dataTypeExpression = "*";
8759 }
8760
8761 var dataType,
8762 i = 0,
8763 dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];
8764
8765 if ( isFunction( func ) ) {
8766
8767 // For each dataType in the dataTypeExpression
8768 while ( ( dataType = dataTypes[ i++ ] ) ) {
8769
8770 // Prepend if requested
8771 if ( dataType[ 0 ] === "+" ) {
8772 dataType = dataType.slice( 1 ) || "*";
8773 ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );
8774
8775 // Otherwise append
8776 } else {
8777 ( structure[ dataType ] = structure[ dataType ] || [] ).push( func );
8778 }
8779 }
8780 }
8781 };
8782}
8783
8784// Base inspection function for prefilters and transports
8785function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
8786
8787 var inspected = {},
8788 seekingTransport = ( structure === transports );
8789
8790 function inspect( dataType ) {
8791 var selected;
8792 inspected[ dataType ] = true;
8793 jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
8794 var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
8795 if ( typeof dataTypeOrTransport === "string" &&
8796 !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
8797
8798 options.dataTypes.unshift( dataTypeOrTransport );
8799 inspect( dataTypeOrTransport );
8800 return false;
8801 } else if ( seekingTransport ) {
8802 return !( selected = dataTypeOrTransport );
8803 }
8804 } );
8805 return selected;
8806 }
8807
8808 return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
8809}
8810
8811// A special extend for ajax options
8812// that takes "flat" options (not to be deep extended)
8813// Fixes #9887
8814function ajaxExtend( target, src ) {
8815 var key, deep,
8816 flatOptions = jQuery.ajaxSettings.flatOptions || {};
8817
8818 for ( key in src ) {
8819 if ( src[ key ] !== undefined ) {
8820 ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
8821 }
8822 }
8823 if ( deep ) {
8824 jQuery.extend( true, target, deep );
8825 }
8826
8827 return target;
8828}
8829
8830/* Handles responses to an ajax request:
8831 * - finds the right dataType (mediates between content-type and expected dataType)
8832 * - returns the corresponding response
8833 */
8834function ajaxHandleResponses( s, jqXHR, responses ) {
8835
8836 var ct, type, finalDataType, firstDataType,
8837 contents = s.contents,
8838 dataTypes = s.dataTypes;
8839
8840 // Remove auto dataType and get content-type in the process
8841 while ( dataTypes[ 0 ] === "*" ) {
8842 dataTypes.shift();
8843 if ( ct === undefined ) {
8844 ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" );
8845 }
8846 }
8847
8848 // Check if we're dealing with a known content-type
8849 if ( ct ) {
8850 for ( type in contents ) {
8851 if ( contents[ type ] && contents[ type ].test( ct ) ) {
8852 dataTypes.unshift( type );
8853 break;
8854 }
8855 }
8856 }
8857
8858 // Check to see if we have a response for the expected dataType
8859 if ( dataTypes[ 0 ] in responses ) {
8860 finalDataType = dataTypes[ 0 ];
8861 } else {
8862
8863 // Try convertible dataTypes
8864 for ( type in responses ) {
8865 if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) {
8866 finalDataType = type;
8867 break;
8868 }
8869 if ( !firstDataType ) {
8870 firstDataType = type;
8871 }
8872 }
8873
8874 // Or just use first one
8875 finalDataType = finalDataType || firstDataType;
8876 }
8877
8878 // If we found a dataType
8879 // We add the dataType to the list if needed
8880 // and return the corresponding response
8881 if ( finalDataType ) {
8882 if ( finalDataType !== dataTypes[ 0 ] ) {
8883 dataTypes.unshift( finalDataType );
8884 }
8885 return responses[ finalDataType ];
8886 }
8887}
8888
8889/* Chain conversions given the request and the original response
8890 * Also sets the responseXXX fields on the jqXHR instance
8891 */
8892function ajaxConvert( s, response, jqXHR, isSuccess ) {
8893 var conv2, current, conv, tmp, prev,
8894 converters = {},
8895
8896 // Work with a copy of dataTypes in case we need to modify it for conversion
8897 dataTypes = s.dataTypes.slice();
8898
8899 // Create converters map with lowercased keys
8900 if ( dataTypes[ 1 ] ) {
8901 for ( conv in s.converters ) {
8902 converters[ conv.toLowerCase() ] = s.converters[ conv ];
8903 }
8904 }
8905
8906 current = dataTypes.shift();
8907
8908 // Convert to each sequential dataType
8909 while ( current ) {
8910
8911 if ( s.responseFields[ current ] ) {
8912 jqXHR[ s.responseFields[ current ] ] = response;
8913 }
8914
8915 // Apply the dataFilter if provided
8916 if ( !prev && isSuccess && s.dataFilter ) {
8917 response = s.dataFilter( response, s.dataType );
8918 }
8919
8920 prev = current;
8921 current = dataTypes.shift();
8922
8923 if ( current ) {
8924
8925 // There's only work to do if current dataType is non-auto
8926 if ( current === "*" ) {
8927
8928 current = prev;
8929
8930 // Convert response if prev dataType is non-auto and differs from current
8931 } else if ( prev !== "*" && prev !== current ) {
8932
8933 // Seek a direct converter
8934 conv = converters[ prev + " " + current ] || converters[ "* " + current ];
8935
8936 // If none found, seek a pair
8937 if ( !conv ) {
8938 for ( conv2 in converters ) {
8939
8940 // If conv2 outputs current
8941 tmp = conv2.split( " " );
8942 if ( tmp[ 1 ] === current ) {
8943
8944 // If prev can be converted to accepted input
8945 conv = converters[ prev + " " + tmp[ 0 ] ] ||
8946 converters[ "* " + tmp[ 0 ] ];
8947 if ( conv ) {
8948
8949 // Condense equivalence converters
8950 if ( conv === true ) {
8951 conv = converters[ conv2 ];
8952
8953 // Otherwise, insert the intermediate dataType
8954 } else if ( converters[ conv2 ] !== true ) {
8955 current = tmp[ 0 ];
8956 dataTypes.unshift( tmp[ 1 ] );
8957 }
8958 break;
8959 }
8960 }
8961 }
8962 }
8963
8964 // Apply converter (if not an equivalence)
8965 if ( conv !== true ) {
8966
8967 // Unless errors are allowed to bubble, catch and return them
8968 if ( conv && s.throws ) {
8969 response = conv( response );
8970 } else {
8971 try {
8972 response = conv( response );
8973 } catch ( e ) {
8974 return {
8975 state: "parsererror",
8976 error: conv ? e : "No conversion from " + prev + " to " + current
8977 };
8978 }
8979 }
8980 }
8981 }
8982 }
8983 }
8984
8985 return { state: "success", data: response };
8986}
8987
8988jQuery.extend( {
8989
8990 // Counter for holding the number of active queries
8991 active: 0,
8992
8993 // Last-Modified header cache for next request
8994 lastModified: {},
8995 etag: {},
8996
8997 ajaxSettings: {
8998 url: location.href,
8999 type: "GET",
9000 isLocal: rlocalProtocol.test( location.protocol ),
9001 global: true,
9002 processData: true,
9003 async: true,
9004 contentType: "application/x-www-form-urlencoded; charset=UTF-8",
9005
9006 /*
9007 timeout: 0,
9008 data: null,
9009 dataType: null,
9010 username: null,
9011 password: null,
9012 cache: null,
9013 throws: false,
9014 traditional: false,
9015 headers: {},
9016 */
9017
9018 accepts: {
9019 "*": allTypes,
9020 text: "text/plain",
9021 html: "text/html",
9022 xml: "application/xml, text/xml",
9023 json: "application/json, text/javascript"
9024 },
9025
9026 contents: {
9027 xml: /\bxml\b/,
9028 html: /\bhtml/,
9029 json: /\bjson\b/
9030 },
9031
9032 responseFields: {
9033 xml: "responseXML",
9034 text: "responseText",
9035 json: "responseJSON"
9036 },
9037
9038 // Data converters
9039 // Keys separate source (or catchall "*") and destination types with a single space
9040 converters: {
9041
9042 // Convert anything to text
9043 "* text": String,
9044
9045 // Text to html (true = no transformation)
9046 "text html": true,
9047
9048 // Evaluate text as a json expression
9049 "text json": JSON.parse,
9050
9051 // Parse text as xml
9052 "text xml": jQuery.parseXML
9053 },
9054
9055 // For options that shouldn't be deep extended:
9056 // you can add your own custom options here if
9057 // and when you create one that shouldn't be
9058 // deep extended (see ajaxExtend)
9059 flatOptions: {
9060 url: true,
9061 context: true
9062 }
9063 },
9064
9065 // Creates a full fledged settings object into target
9066 // with both ajaxSettings and settings fields.
9067 // If target is omitted, writes into ajaxSettings.
9068 ajaxSetup: function( target, settings ) {
9069 return settings ?
9070
9071 // Building a settings object
9072 ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
9073
9074 // Extending ajaxSettings
9075 ajaxExtend( jQuery.ajaxSettings, target );
9076 },
9077
9078 ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
9079 ajaxTransport: addToPrefiltersOrTransports( transports ),
9080
9081 // Main method
9082 ajax: function( url, options ) {
9083
9084 // If url is an object, simulate pre-1.5 signature
9085 if ( typeof url === "object" ) {
9086 options = url;
9087 url = undefined;
9088 }
9089
9090 // Force options to be an object
9091 options = options || {};
9092
9093 var transport,
9094
9095 // URL without anti-cache param
9096 cacheURL,
9097
9098 // Response headers
9099 responseHeadersString,
9100 responseHeaders,
9101
9102 // timeout handle
9103 timeoutTimer,
9104
9105 // Url cleanup var
9106 urlAnchor,
9107
9108 // Request state (becomes false upon send and true upon completion)
9109 completed,
9110
9111 // To know if global events are to be dispatched
9112 fireGlobals,
9113
9114 // Loop variable
9115 i,
9116
9117 // uncached part of the url
9118 uncached,
9119
9120 // Create the final options object
9121 s = jQuery.ajaxSetup( {}, options ),
9122
9123 // Callbacks context
9124 callbackContext = s.context || s,
9125
9126 // Context for global events is callbackContext if it is a DOM node or jQuery collection
9127 globalEventContext = s.context &&
9128 ( callbackContext.nodeType || callbackContext.jquery ) ?
9129 jQuery( callbackContext ) :
9130 jQuery.event,
9131
9132 // Deferreds
9133 deferred = jQuery.Deferred(),
9134 completeDeferred = jQuery.Callbacks( "once memory" ),
9135
9136 // Status-dependent callbacks
9137 statusCode = s.statusCode || {},
9138
9139 // Headers (they are sent all at once)
9140 requestHeaders = {},
9141 requestHeadersNames = {},
9142
9143 // Default abort message
9144 strAbort = "canceled",
9145
9146 // Fake xhr
9147 jqXHR = {
9148 readyState: 0,
9149
9150 // Builds headers hashtable if needed
9151 getResponseHeader: function( key ) {
9152 var match;
9153 if ( completed ) {
9154 if ( !responseHeaders ) {
9155 responseHeaders = {};
9156 while ( ( match = rheaders.exec( responseHeadersString ) ) ) {
9157 responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ];
9158 }
9159 }
9160 match = responseHeaders[ key.toLowerCase() ];
9161 }
9162 return match == null ? null : match;
9163 },
9164
9165 // Raw string
9166 getAllResponseHeaders: function() {
9167 return completed ? responseHeadersString : null;
9168 },
9169
9170 // Caches the header
9171 setRequestHeader: function( name, value ) {
9172 if ( completed == null ) {
9173 name = requestHeadersNames[ name.toLowerCase() ] =
9174 requestHeadersNames[ name.toLowerCase() ] || name;
9175 requestHeaders[ name ] = value;
9176 }
9177 return this;
9178 },
9179
9180 // Overrides response content-type header
9181 overrideMimeType: function( type ) {
9182 if ( completed == null ) {
9183 s.mimeType = type;
9184 }
9185 return this;
9186 },
9187
9188 // Status-dependent callbacks
9189 statusCode: function( map ) {
9190 var code;
9191 if ( map ) {
9192 if ( completed ) {
9193
9194 // Execute the appropriate callbacks
9195 jqXHR.always( map[ jqXHR.status ] );
9196 } else {
9197
9198 // Lazy-add the new callbacks in a way that preserves old ones
9199 for ( code in map ) {
9200 statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
9201 }
9202 }
9203 }
9204 return this;
9205 },
9206
9207 // Cancel the request
9208 abort: function( statusText ) {
9209 var finalText = statusText || strAbort;
9210 if ( transport ) {
9211 transport.abort( finalText );
9212 }
9213 done( 0, finalText );
9214 return this;
9215 }
9216 };
9217
9218 // Attach deferreds
9219 deferred.promise( jqXHR );
9220
9221 // Add protocol if not provided (prefilters might expect it)
9222 // Handle falsy url in the settings object (#10093: consistency with old signature)
9223 // We also use the url parameter if available
9224 s.url = ( ( url || s.url || location.href ) + "" )
9225 .replace( rprotocol, location.protocol + "//" );
9226
9227 // Alias method option to type as per ticket #12004
9228 s.type = options.method || options.type || s.method || s.type;
9229
9230 // Extract dataTypes list
9231 s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ];
9232
9233 // A cross-domain request is in order when the origin doesn't match the current origin.
9234 if ( s.crossDomain == null ) {
9235 urlAnchor = document.createElement( "a" );
9236
9237 // Support: IE <=8 - 11, Edge 12 - 15
9238 // IE throws exception on accessing the href property if url is malformed,
9239 // e.g. http://example.com:80x/
9240 try {
9241 urlAnchor.href = s.url;
9242
9243 // Support: IE <=8 - 11 only
9244 // Anchor's host property isn't correctly set when s.url is relative
9245 urlAnchor.href = urlAnchor.href;
9246 s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==
9247 urlAnchor.protocol + "//" + urlAnchor.host;
9248 } catch ( e ) {
9249
9250 // If there is an error parsing the URL, assume it is crossDomain,
9251 // it can be rejected by the transport if it is invalid
9252 s.crossDomain = true;
9253 }
9254 }
9255
9256 // Convert data if not already a string
9257 if ( s.data && s.processData && typeof s.data !== "string" ) {
9258 s.data = jQuery.param( s.data, s.traditional );
9259 }
9260
9261 // Apply prefilters
9262 inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
9263
9264 // If request was aborted inside a prefilter, stop there
9265 if ( completed ) {
9266 return jqXHR;
9267 }
9268
9269 // We can fire global events as of now if asked to
9270 // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
9271 fireGlobals = jQuery.event && s.global;
9272
9273 // Watch for a new set of requests
9274 if ( fireGlobals && jQuery.active++ === 0 ) {
9275 jQuery.event.trigger( "ajaxStart" );
9276 }
9277
9278 // Uppercase the type
9279 s.type = s.type.toUpperCase();
9280
9281 // Determine if request has content
9282 s.hasContent = !rnoContent.test( s.type );
9283
9284 // Save the URL in case we're toying with the If-Modified-Since
9285 // and/or If-None-Match header later on
9286 // Remove hash to simplify url manipulation
9287 cacheURL = s.url.replace( rhash, "" );
9288
9289 // More options handling for requests with no content
9290 if ( !s.hasContent ) {
9291
9292 // Remember the hash so we can put it back
9293 uncached = s.url.slice( cacheURL.length );
9294
9295 // If data is available and should be processed, append data to url
9296 if ( s.data && ( s.processData || typeof s.data === "string" ) ) {
9297 cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data;
9298
9299 // #9682: remove data so that it's not used in an eventual retry
9300 delete s.data;
9301 }
9302
9303 // Add or update anti-cache param if needed
9304 if ( s.cache === false ) {
9305 cacheURL = cacheURL.replace( rantiCache, "$1" );
9306 uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached;
9307 }
9308
9309 // Put hash and anti-cache on the URL that will be requested (gh-1732)
9310 s.url = cacheURL + uncached;
9311
9312 // Change '%20' to '+' if this is encoded form body content (gh-2658)
9313 } else if ( s.data && s.processData &&
9314 ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) {
9315 s.data = s.data.replace( r20, "+" );
9316 }
9317
9318 // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
9319 if ( s.ifModified ) {
9320 if ( jQuery.lastModified[ cacheURL ] ) {
9321 jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
9322 }
9323 if ( jQuery.etag[ cacheURL ] ) {
9324 jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
9325 }
9326 }
9327
9328 // Set the correct header, if data is being sent
9329 if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
9330 jqXHR.setRequestHeader( "Content-Type", s.contentType );
9331 }
9332
9333 // Set the Accepts header for the server, depending on the dataType
9334 jqXHR.setRequestHeader(
9335 "Accept",
9336 s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?
9337 s.accepts[ s.dataTypes[ 0 ] ] +
9338 ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
9339 s.accepts[ "*" ]
9340 );
9341
9342 // Check for headers option
9343 for ( i in s.headers ) {
9344 jqXHR.setRequestHeader( i, s.headers[ i ] );
9345 }
9346
9347 // Allow custom headers/mimetypes and early abort
9348 if ( s.beforeSend &&
9349 ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {
9350
9351 // Abort if not done already and return
9352 return jqXHR.abort();
9353 }
9354
9355 // Aborting is no longer a cancellation
9356 strAbort = "abort";
9357
9358 // Install callbacks on deferreds
9359 completeDeferred.add( s.complete );
9360 jqXHR.done( s.success );
9361 jqXHR.fail( s.error );
9362
9363 // Get transport
9364 transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
9365
9366 // If no transport, we auto-abort
9367 if ( !transport ) {
9368 done( -1, "No Transport" );
9369 } else {
9370 jqXHR.readyState = 1;
9371
9372 // Send global event
9373 if ( fireGlobals ) {
9374 globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
9375 }
9376
9377 // If request was aborted inside ajaxSend, stop there
9378 if ( completed ) {
9379 return jqXHR;
9380 }
9381
9382 // Timeout
9383 if ( s.async && s.timeout > 0 ) {
9384 timeoutTimer = window.setTimeout( function() {
9385 jqXHR.abort( "timeout" );
9386 }, s.timeout );
9387 }
9388
9389 try {
9390 completed = false;
9391 transport.send( requestHeaders, done );
9392 } catch ( e ) {
9393
9394 // Rethrow post-completion exceptions
9395 if ( completed ) {
9396 throw e;
9397 }
9398
9399 // Propagate others as results
9400 done( -1, e );
9401 }
9402 }
9403
9404 // Callback for when everything is done
9405 function done( status, nativeStatusText, responses, headers ) {
9406 var isSuccess, success, error, response, modified,
9407 statusText = nativeStatusText;
9408
9409 // Ignore repeat invocations
9410 if ( completed ) {
9411 return;
9412 }
9413
9414 completed = true;
9415
9416 // Clear timeout if it exists
9417 if ( timeoutTimer ) {
9418 window.clearTimeout( timeoutTimer );
9419 }
9420
9421 // Dereference transport for early garbage collection
9422 // (no matter how long the jqXHR object will be used)
9423 transport = undefined;
9424
9425 // Cache response headers
9426 responseHeadersString = headers || "";
9427
9428 // Set readyState
9429 jqXHR.readyState = status > 0 ? 4 : 0;
9430
9431 // Determine if successful
9432 isSuccess = status >= 200 && status < 300 || status === 304;
9433
9434 // Get response data
9435 if ( responses ) {
9436 response = ajaxHandleResponses( s, jqXHR, responses );
9437 }
9438
9439 // Convert no matter what (that way responseXXX fields are always set)
9440 response = ajaxConvert( s, response, jqXHR, isSuccess );
9441
9442 // If successful, handle type chaining
9443 if ( isSuccess ) {
9444
9445 // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
9446 if ( s.ifModified ) {
9447 modified = jqXHR.getResponseHeader( "Last-Modified" );
9448 if ( modified ) {
9449 jQuery.lastModified[ cacheURL ] = modified;
9450 }
9451 modified = jqXHR.getResponseHeader( "etag" );
9452 if ( modified ) {
9453 jQuery.etag[ cacheURL ] = modified;
9454 }
9455 }
9456
9457 // if no content
9458 if ( status === 204 || s.type === "HEAD" ) {
9459 statusText = "nocontent";
9460
9461 // if not modified
9462 } else if ( status === 304 ) {
9463 statusText = "notmodified";
9464
9465 // If we have data, let's convert it
9466 } else {
9467 statusText = response.state;
9468 success = response.data;
9469 error = response.error;
9470 isSuccess = !error;
9471 }
9472 } else {
9473
9474 // Extract error from statusText and normalize for non-aborts
9475 error = statusText;
9476 if ( status || !statusText ) {
9477 statusText = "error";
9478 if ( status < 0 ) {
9479 status = 0;
9480 }
9481 }
9482 }
9483
9484 // Set data for the fake xhr object
9485 jqXHR.status = status;
9486 jqXHR.statusText = ( nativeStatusText || statusText ) + "";
9487
9488 // Success/Error
9489 if ( isSuccess ) {
9490 deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
9491 } else {
9492 deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
9493 }
9494
9495 // Status-dependent callbacks
9496 jqXHR.statusCode( statusCode );
9497 statusCode = undefined;
9498
9499 if ( fireGlobals ) {
9500 globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
9501 [ jqXHR, s, isSuccess ? success : error ] );
9502 }
9503
9504 // Complete
9505 completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
9506
9507 if ( fireGlobals ) {
9508 globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
9509
9510 // Handle the global AJAX counter
9511 if ( !( --jQuery.active ) ) {
9512 jQuery.event.trigger( "ajaxStop" );
9513 }
9514 }
9515 }
9516
9517 return jqXHR;
9518 },
9519
9520 getJSON: function( url, data, callback ) {
9521 return jQuery.get( url, data, callback, "json" );
9522 },
9523
9524 getScript: function( url, callback ) {
9525 return jQuery.get( url, undefined, callback, "script" );
9526 }
9527} );
9528
9529jQuery.each( [ "get", "post" ], function( i, method ) {
9530 jQuery[ method ] = function( url, data, callback, type ) {
9531
9532 // Shift arguments if data argument was omitted
9533 if ( isFunction( data ) ) {
9534 type = type || callback;
9535 callback = data;
9536 data = undefined;
9537 }
9538
9539 // The url can be an options object (which then must have .url)
9540 return jQuery.ajax( jQuery.extend( {
9541 url: url,
9542 type: method,
9543 dataType: type,
9544 data: data,
9545 success: callback
9546 }, jQuery.isPlainObject( url ) && url ) );
9547 };
9548} );
9549
9550
9551jQuery._evalUrl = function( url ) {
9552 return jQuery.ajax( {
9553 url: url,
9554
9555 // Make this explicit, since user can override this through ajaxSetup (#11264)
9556 type: "GET",
9557 dataType: "script",
9558 cache: true,
9559 async: false,
9560 global: false,
9561 "throws": true
9562 } );
9563};
9564
9565
9566jQuery.fn.extend( {
9567 wrapAll: function( html ) {
9568 var wrap;
9569
9570 if ( this[ 0 ] ) {
9571 if ( isFunction( html ) ) {
9572 html = html.call( this[ 0 ] );
9573 }
9574
9575 // The elements to wrap the target around
9576 wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
9577
9578 if ( this[ 0 ].parentNode ) {
9579 wrap.insertBefore( this[ 0 ] );
9580 }
9581
9582 wrap.map( function() {
9583 var elem = this;
9584
9585 while ( elem.firstElementChild ) {
9586 elem = elem.firstElementChild;
9587 }
9588
9589 return elem;
9590 } ).append( this );
9591 }
9592
9593 return this;
9594 },
9595
9596 wrapInner: function( html ) {
9597 if ( isFunction( html ) ) {
9598 return this.each( function( i ) {
9599 jQuery( this ).wrapInner( html.call( this, i ) );
9600 } );
9601 }
9602
9603 return this.each( function() {
9604 var self = jQuery( this ),
9605 contents = self.contents();
9606
9607 if ( contents.length ) {
9608 contents.wrapAll( html );
9609
9610 } else {
9611 self.append( html );
9612 }
9613 } );
9614 },
9615
9616 wrap: function( html ) {
9617 var htmlIsFunction = isFunction( html );
9618
9619 return this.each( function( i ) {
9620 jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );
9621 } );
9622 },
9623
9624 unwrap: function( selector ) {
9625 this.parent( selector ).not( "body" ).each( function() {
9626 jQuery( this ).replaceWith( this.childNodes );
9627 } );
9628 return this;
9629 }
9630} );
9631
9632
9633jQuery.expr.pseudos.hidden = function( elem ) {
9634 return !jQuery.expr.pseudos.visible( elem );
9635};
9636jQuery.expr.pseudos.visible = function( elem ) {
9637 return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );
9638};
9639
9640
9641
9642
9643jQuery.ajaxSettings.xhr = function() {
9644 try {
9645 return new window.XMLHttpRequest();
9646 } catch ( e ) {}
9647};
9648
9649var xhrSuccessStatus = {
9650
9651 // File protocol always yields status code 0, assume 200
9652 0: 200,
9653
9654 // Support: IE <=9 only
9655 // #1450: sometimes IE returns 1223 when it should be 204
9656 1223: 204
9657 },
9658 xhrSupported = jQuery.ajaxSettings.xhr();
9659
9660support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
9661support.ajax = xhrSupported = !!xhrSupported;
9662
9663jQuery.ajaxTransport( function( options ) {
9664 var callback, errorCallback;
9665
9666 // Cross domain only allowed if supported through XMLHttpRequest
9667 if ( support.cors || xhrSupported && !options.crossDomain ) {
9668 return {
9669 send: function( headers, complete ) {
9670 var i,
9671 xhr = options.xhr();
9672
9673 xhr.open(
9674 options.type,
9675 options.url,
9676 options.async,
9677 options.username,
9678 options.password
9679 );
9680
9681 // Apply custom fields if provided
9682 if ( options.xhrFields ) {
9683 for ( i in options.xhrFields ) {
9684 xhr[ i ] = options.xhrFields[ i ];
9685 }
9686 }
9687
9688 // Override mime type if needed
9689 if ( options.mimeType && xhr.overrideMimeType ) {
9690 xhr.overrideMimeType( options.mimeType );
9691 }
9692
9693 // X-Requested-With header
9694 // For cross-domain requests, seeing as conditions for a preflight are
9695 // akin to a jigsaw puzzle, we simply never set it to be sure.
9696 // (it can always be set on a per-request basis or even using ajaxSetup)
9697 // For same-domain requests, won't change header if already provided.
9698 if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) {
9699 headers[ "X-Requested-With" ] = "XMLHttpRequest";
9700 }
9701
9702 // Set headers
9703 for ( i in headers ) {
9704 xhr.setRequestHeader( i, headers[ i ] );
9705 }
9706
9707 // Callback
9708 callback = function( type ) {
9709 return function() {
9710 if ( callback ) {
9711 callback = errorCallback = xhr.onload =
9712 xhr.onerror = xhr.onabort = xhr.ontimeout =
9713 xhr.onreadystatechange = null;
9714
9715 if ( type === "abort" ) {
9716 xhr.abort();
9717 } else if ( type === "error" ) {
9718
9719 // Support: IE <=9 only
9720 // On a manual native abort, IE9 throws
9721 // errors on any property access that is not readyState
9722 if ( typeof xhr.status !== "number" ) {
9723 complete( 0, "error" );
9724 } else {
9725 complete(
9726
9727 // File: protocol always yields status 0; see #8605, #14207
9728 xhr.status,
9729 xhr.statusText
9730 );
9731 }
9732 } else {
9733 complete(
9734 xhrSuccessStatus[ xhr.status ] || xhr.status,
9735 xhr.statusText,
9736
9737 // Support: IE <=9 only
9738 // IE9 has no XHR2 but throws on binary (trac-11426)
9739 // For XHR2 non-text, let the caller handle it (gh-2498)
9740 ( xhr.responseType || "text" ) !== "text" ||
9741 typeof xhr.responseText !== "string" ?
9742 { binary: xhr.response } :
9743 { text: xhr.responseText },
9744 xhr.getAllResponseHeaders()
9745 );
9746 }
9747 }
9748 };
9749 };
9750
9751 // Listen to events
9752 xhr.onload = callback();
9753 errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" );
9754
9755 // Support: IE 9 only
9756 // Use onreadystatechange to replace onabort
9757 // to handle uncaught aborts
9758 if ( xhr.onabort !== undefined ) {
9759 xhr.onabort = errorCallback;
9760 } else {
9761 xhr.onreadystatechange = function() {
9762
9763 // Check readyState before timeout as it changes
9764 if ( xhr.readyState === 4 ) {
9765
9766 // Allow onerror to be called first,
9767 // but that will not handle a native abort
9768 // Also, save errorCallback to a variable
9769 // as xhr.onerror cannot be accessed
9770 window.setTimeout( function() {
9771 if ( callback ) {
9772 errorCallback();
9773 }
9774 } );
9775 }
9776 };
9777 }
9778
9779 // Create the abort callback
9780 callback = callback( "abort" );
9781
9782 try {
9783
9784 // Do send the request (this may raise an exception)
9785 xhr.send( options.hasContent && options.data || null );
9786 } catch ( e ) {
9787
9788 // #14683: Only rethrow if this hasn't been notified as an error yet
9789 if ( callback ) {
9790 throw e;
9791 }
9792 }
9793 },
9794
9795 abort: function() {
9796 if ( callback ) {
9797 callback();
9798 }
9799 }
9800 };
9801 }
9802} );
9803
9804
9805
9806
9807// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)
9808jQuery.ajaxPrefilter( function( s ) {
9809 if ( s.crossDomain ) {
9810 s.contents.script = false;
9811 }
9812} );
9813
9814// Install script dataType
9815jQuery.ajaxSetup( {
9816 accepts: {
9817 script: "text/javascript, application/javascript, " +
9818 "application/ecmascript, application/x-ecmascript"
9819 },
9820 contents: {
9821 script: /\b(?:java|ecma)script\b/
9822 },
9823 converters: {
9824 "text script": function( text ) {
9825 jQuery.globalEval( text );
9826 return text;
9827 }
9828 }
9829} );
9830
9831// Handle cache's special case and crossDomain
9832jQuery.ajaxPrefilter( "script", function( s ) {
9833 if ( s.cache === undefined ) {
9834 s.cache = false;
9835 }
9836 if ( s.crossDomain ) {
9837 s.type = "GET";
9838 }
9839} );
9840
9841// Bind script tag hack transport
9842jQuery.ajaxTransport( "script", function( s ) {
9843
9844 // This transport only deals with cross domain requests
9845 if ( s.crossDomain ) {
9846 var script, callback;
9847 return {
9848 send: function( _, complete ) {
9849 script = jQuery( "<script>" ).prop( {
9850 charset: s.scriptCharset,
9851 src: s.url
9852 } ).on(
9853 "load error",
9854 callback = function( evt ) {
9855 script.remove();
9856 callback = null;
9857 if ( evt ) {
9858 complete( evt.type === "error" ? 404 : 200, evt.type );
9859 }
9860 }
9861 );
9862
9863 // Use native DOM manipulation to avoid our domManip AJAX trickery
9864 document.head.appendChild( script[ 0 ] );
9865 },
9866 abort: function() {
9867 if ( callback ) {
9868 callback();
9869 }
9870 }
9871 };
9872 }
9873} );
9874
9875
9876
9877
9878var oldCallbacks = [],
9879 rjsonp = /(=)\?(?=&|$)|\?\?/;
9880
9881// Default jsonp settings
9882jQuery.ajaxSetup( {
9883 jsonp: "callback",
9884 jsonpCallback: function() {
9885 var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
9886 this[ callback ] = true;
9887 return callback;
9888 }
9889} );
9890
9891// Detect, normalize options and install callbacks for jsonp requests
9892jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
9893
9894 var callbackName, overwritten, responseContainer,
9895 jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
9896 "url" :
9897 typeof s.data === "string" &&
9898 ( s.contentType || "" )
9899 .indexOf( "application/x-www-form-urlencoded" ) === 0 &&
9900 rjsonp.test( s.data ) && "data"
9901 );
9902
9903 // Handle iff the expected data type is "jsonp" or we have a parameter to set
9904 if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
9905
9906 // Get callback name, remembering preexisting value associated with it
9907 callbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?
9908 s.jsonpCallback() :
9909 s.jsonpCallback;
9910
9911 // Insert callback into url or form data
9912 if ( jsonProp ) {
9913 s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
9914 } else if ( s.jsonp !== false ) {
9915 s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
9916 }
9917
9918 // Use data converter to retrieve json after script execution
9919 s.converters[ "script json" ] = function() {
9920 if ( !responseContainer ) {
9921 jQuery.error( callbackName + " was not called" );
9922 }
9923 return responseContainer[ 0 ];
9924 };
9925
9926 // Force json dataType
9927 s.dataTypes[ 0 ] = "json";
9928
9929 // Install callback
9930 overwritten = window[ callbackName ];
9931 window[ callbackName ] = function() {
9932 responseContainer = arguments;
9933 };
9934
9935 // Clean-up function (fires after converters)
9936 jqXHR.always( function() {
9937
9938 // If previous value didn't exist - remove it
9939 if ( overwritten === undefined ) {
9940 jQuery( window ).removeProp( callbackName );
9941
9942 // Otherwise restore preexisting value
9943 } else {
9944 window[ callbackName ] = overwritten;
9945 }
9946
9947 // Save back as free
9948 if ( s[ callbackName ] ) {
9949
9950 // Make sure that re-using the options doesn't screw things around
9951 s.jsonpCallback = originalSettings.jsonpCallback;
9952
9953 // Save the callback name for future use
9954 oldCallbacks.push( callbackName );
9955 }
9956
9957 // Call if it was a function and we have a response
9958 if ( responseContainer && isFunction( overwritten ) ) {
9959 overwritten( responseContainer[ 0 ] );
9960 }
9961
9962 responseContainer = overwritten = undefined;
9963 } );
9964
9965 // Delegate to script
9966 return "script";
9967 }
9968} );
9969
9970
9971
9972
9973// Support: Safari 8 only
9974// In Safari 8 documents created via document.implementation.createHTMLDocument
9975// collapse sibling forms: the second one becomes a child of the first one.
9976// Because of that, this security measure has to be disabled in Safari 8.
9977// https://bugs.webkit.org/show_bug.cgi?id=137337
9978support.createHTMLDocument = ( function() {
9979 var body = document.implementation.createHTMLDocument( "" ).body;
9980 body.innerHTML = "<form></form><form></form>";
9981 return body.childNodes.length === 2;
9982} )();
9983
9984
9985// Argument "data" should be string of html
9986// context (optional): If specified, the fragment will be created in this context,
9987// defaults to document
9988// keepScripts (optional): If true, will include scripts passed in the html string
9989jQuery.parseHTML = function( data, context, keepScripts ) {
9990 if ( typeof data !== "string" ) {
9991 return [];
9992 }
9993 if ( typeof context === "boolean" ) {
9994 keepScripts = context;
9995 context = false;
9996 }
9997
9998 var base, parsed, scripts;
9999
10000 if ( !context ) {
10001
10002 // Stop scripts or inline event handlers from being executed immediately
10003 // by using document.implementation
10004 if ( support.createHTMLDocument ) {
10005 context = document.implementation.createHTMLDocument( "" );
10006
10007 // Set the base href for the created document
10008 // so any parsed elements with URLs
10009 // are based on the document's URL (gh-2965)
10010 base = context.createElement( "base" );
10011 base.href = document.location.href;
10012 context.head.appendChild( base );
10013 } else {
10014 context = document;
10015 }
10016 }
10017
10018 parsed = rsingleTag.exec( data );
10019 scripts = !keepScripts && [];
10020
10021 // Single tag
10022 if ( parsed ) {
10023 return [ context.createElement( parsed[ 1 ] ) ];
10024 }
10025
10026 parsed = buildFragment( [ data ], context, scripts );
10027
10028 if ( scripts && scripts.length ) {
10029 jQuery( scripts ).remove();
10030 }
10031
10032 return jQuery.merge( [], parsed.childNodes );
10033};
10034
10035
10036/**
10037 * Load a url into a page
10038 */
10039jQuery.fn.load = function( url, params, callback ) {
10040 var selector, type, response,
10041 self = this,
10042 off = url.indexOf( " " );
10043
10044 if ( off > -1 ) {
10045 selector = stripAndCollapse( url.slice( off ) );
10046 url = url.slice( 0, off );
10047 }
10048
10049 // If it's a function
10050 if ( isFunction( params ) ) {
10051
10052 // We assume that it's the callback
10053 callback = params;
10054 params = undefined;
10055
10056 // Otherwise, build a param string
10057 } else if ( params && typeof params === "object" ) {
10058 type = "POST";
10059 }
10060
10061 // If we have elements to modify, make the request
10062 if ( self.length > 0 ) {
10063 jQuery.ajax( {
10064 url: url,
10065
10066 // If "type" variable is undefined, then "GET" method will be used.
10067 // Make value of this field explicit since
10068 // user can override it through ajaxSetup method
10069 type: type || "GET",
10070 dataType: "html",
10071 data: params
10072 } ).done( function( responseText ) {
10073
10074 // Save response for use in complete callback
10075 response = arguments;
10076
10077 self.html( selector ?
10078
10079 // If a selector was specified, locate the right elements in a dummy div
10080 // Exclude scripts to avoid IE 'Permission Denied' errors
10081 jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :
10082
10083 // Otherwise use the full result
10084 responseText );
10085
10086 // If the request succeeds, this function gets "data", "status", "jqXHR"
10087 // but they are ignored because response was set above.
10088 // If it fails, this function gets "jqXHR", "status", "error"
10089 } ).always( callback && function( jqXHR, status ) {
10090 self.each( function() {
10091 callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );
10092 } );
10093 } );
10094 }
10095
10096 return this;
10097};
10098
10099
10100
10101
10102// Attach a bunch of functions for handling common AJAX events
10103jQuery.each( [
10104 "ajaxStart",
10105 "ajaxStop",
10106 "ajaxComplete",
10107 "ajaxError",
10108 "ajaxSuccess",
10109 "ajaxSend"
10110], function( i, type ) {
10111 jQuery.fn[ type ] = function( fn ) {
10112 return this.on( type, fn );
10113 };
10114} );
10115
10116
10117
10118
10119jQuery.expr.pseudos.animated = function( elem ) {
10120 return jQuery.grep( jQuery.timers, function( fn ) {
10121 return elem === fn.elem;
10122 } ).length;
10123};
10124
10125
10126
10127
10128jQuery.offset = {
10129 setOffset: function( elem, options, i ) {
10130 var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
10131 position = jQuery.css( elem, "position" ),
10132 curElem = jQuery( elem ),
10133 props = {};
10134
10135 // Set position first, in-case top/left are set even on static elem
10136 if ( position === "static" ) {
10137 elem.style.position = "relative";
10138 }
10139
10140 curOffset = curElem.offset();
10141 curCSSTop = jQuery.css( elem, "top" );
10142 curCSSLeft = jQuery.css( elem, "left" );
10143 calculatePosition = ( position === "absolute" || position === "fixed" ) &&
10144 ( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1;
10145
10146 // Need to be able to calculate position if either
10147 // top or left is auto and position is either absolute or fixed
10148 if ( calculatePosition ) {
10149 curPosition = curElem.position();
10150 curTop = curPosition.top;
10151 curLeft = curPosition.left;
10152
10153 } else {
10154 curTop = parseFloat( curCSSTop ) || 0;
10155 curLeft = parseFloat( curCSSLeft ) || 0;
10156 }
10157
10158 if ( isFunction( options ) ) {
10159
10160 // Use jQuery.extend here to allow modification of coordinates argument (gh-1848)
10161 options = options.call( elem, i, jQuery.extend( {}, curOffset ) );
10162 }
10163
10164 if ( options.top != null ) {
10165 props.top = ( options.top - curOffset.top ) + curTop;
10166 }
10167 if ( options.left != null ) {
10168 props.left = ( options.left - curOffset.left ) + curLeft;
10169 }
10170
10171 if ( "using" in options ) {
10172 options.using.call( elem, props );
10173
10174 } else {
10175 curElem.css( props );
10176 }
10177 }
10178};
10179
10180jQuery.fn.extend( {
10181
10182 // offset() relates an element's border box to the document origin
10183 offset: function( options ) {
10184
10185 // Preserve chaining for setter
10186 if ( arguments.length ) {
10187 return options === undefined ?
10188 this :
10189 this.each( function( i ) {
10190 jQuery.offset.setOffset( this, options, i );
10191 } );
10192 }
10193
10194 var rect, win,
10195 elem = this[ 0 ];
10196
10197 if ( !elem ) {
10198 return;
10199 }
10200
10201 // Return zeros for disconnected and hidden (display: none) elements (gh-2310)
10202 // Support: IE <=11 only
10203 // Running getBoundingClientRect on a
10204 // disconnected node in IE throws an error
10205 if ( !elem.getClientRects().length ) {
10206 return { top: 0, left: 0 };
10207 }
10208
10209 // Get document-relative position by adding viewport scroll to viewport-relative gBCR
10210 rect = elem.getBoundingClientRect();
10211 win = elem.ownerDocument.defaultView;
10212 return {
10213 top: rect.top + win.pageYOffset,
10214 left: rect.left + win.pageXOffset
10215 };
10216 },
10217
10218 // position() relates an element's margin box to its offset parent's padding box
10219 // This corresponds to the behavior of CSS absolute positioning
10220 position: function() {
10221 if ( !this[ 0 ] ) {
10222 return;
10223 }
10224
10225 var offsetParent, offset, doc,
10226 elem = this[ 0 ],
10227 parentOffset = { top: 0, left: 0 };
10228
10229 // position:fixed elements are offset from the viewport, which itself always has zero offset
10230 if ( jQuery.css( elem, "position" ) === "fixed" ) {
10231
10232 // Assume position:fixed implies availability of getBoundingClientRect
10233 offset = elem.getBoundingClientRect();
10234
10235 } else {
10236 offset = this.offset();
10237
10238 // Account for the *real* offset parent, which can be the document or its root element
10239 // when a statically positioned element is identified
10240 doc = elem.ownerDocument;
10241 offsetParent = elem.offsetParent || doc.documentElement;
10242 while ( offsetParent &&
10243 ( offsetParent === doc.body || offsetParent === doc.documentElement ) &&
10244 jQuery.css( offsetParent, "position" ) === "static" ) {
10245
10246 offsetParent = offsetParent.parentNode;
10247 }
10248 if ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {
10249
10250 // Incorporate borders into its offset, since they are outside its content origin
10251 parentOffset = jQuery( offsetParent ).offset();
10252 parentOffset.top += jQuery.css( offsetParent, "borderTopWidth", true );
10253 parentOffset.left += jQuery.css( offsetParent, "borderLeftWidth", true );
10254 }
10255 }
10256
10257 // Subtract parent offsets and element margins
10258 return {
10259 top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
10260 left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
10261 };
10262 },
10263
10264 // This method will return documentElement in the following cases:
10265 // 1) For the element inside the iframe without offsetParent, this method will return
10266 // documentElement of the parent window
10267 // 2) For the hidden or detached element
10268 // 3) For body or html element, i.e. in case of the html node - it will return itself
10269 //
10270 // but those exceptions were never presented as a real life use-cases
10271 // and might be considered as more preferable results.
10272 //
10273 // This logic, however, is not guaranteed and can change at any point in the future
10274 offsetParent: function() {
10275 return this.map( function() {
10276 var offsetParent = this.offsetParent;
10277
10278 while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) {
10279 offsetParent = offsetParent.offsetParent;
10280 }
10281
10282 return offsetParent || documentElement;
10283 } );
10284 }
10285} );
10286
10287// Create scrollLeft and scrollTop methods
10288jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
10289 var top = "pageYOffset" === prop;
10290
10291 jQuery.fn[ method ] = function( val ) {
10292 return access( this, function( elem, method, val ) {
10293
10294 // Coalesce documents and windows
10295 var win;
10296 if ( isWindow( elem ) ) {
10297 win = elem;
10298 } else if ( elem.nodeType === 9 ) {
10299 win = elem.defaultView;
10300 }
10301
10302 if ( val === undefined ) {
10303 return win ? win[ prop ] : elem[ method ];
10304 }
10305
10306 if ( win ) {
10307 win.scrollTo(
10308 !top ? val : win.pageXOffset,
10309 top ? val : win.pageYOffset
10310 );
10311
10312 } else {
10313 elem[ method ] = val;
10314 }
10315 }, method, val, arguments.length );
10316 };
10317} );
10318
10319// Support: Safari <=7 - 9.1, Chrome <=37 - 49
10320// Add the top/left cssHooks using jQuery.fn.position
10321// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
10322// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347
10323// getComputedStyle returns percent when specified for top/left/bottom/right;
10324// rather than make the css module depend on the offset module, just check for it here
10325jQuery.each( [ "top", "left" ], function( i, prop ) {
10326 jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
10327 function( elem, computed ) {
10328 if ( computed ) {
10329 computed = curCSS( elem, prop );
10330
10331 // If curCSS returns percentage, fallback to offset
10332 return rnumnonpx.test( computed ) ?
10333 jQuery( elem ).position()[ prop ] + "px" :
10334 computed;
10335 }
10336 }
10337 );
10338} );
10339
10340
10341// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
10342jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
10343 jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name },
10344 function( defaultExtra, funcName ) {
10345
10346 // Margin is only for outerHeight, outerWidth
10347 jQuery.fn[ funcName ] = function( margin, value ) {
10348 var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
10349 extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
10350
10351 return access( this, function( elem, type, value ) {
10352 var doc;
10353
10354 if ( isWindow( elem ) ) {
10355
10356 // $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)
10357 return funcName.indexOf( "outer" ) === 0 ?
10358 elem[ "inner" + name ] :
10359 elem.document.documentElement[ "client" + name ];
10360 }
10361
10362 // Get document width or height
10363 if ( elem.nodeType === 9 ) {
10364 doc = elem.documentElement;
10365
10366 // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
10367 // whichever is greatest
10368 return Math.max(
10369 elem.body[ "scroll" + name ], doc[ "scroll" + name ],
10370 elem.body[ "offset" + name ], doc[ "offset" + name ],
10371 doc[ "client" + name ]
10372 );
10373 }
10374
10375 return value === undefined ?
10376
10377 // Get width or height on the element, requesting but not forcing parseFloat
10378 jQuery.css( elem, type, extra ) :
10379
10380 // Set width or height on the element
10381 jQuery.style( elem, type, value, extra );
10382 }, type, chainable ? margin : undefined, chainable );
10383 };
10384 } );
10385} );
10386
10387
10388jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +
10389 "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
10390 "change select submit keydown keypress keyup contextmenu" ).split( " " ),
10391 function( i, name ) {
10392
10393 // Handle event binding
10394 jQuery.fn[ name ] = function( data, fn ) {
10395 return arguments.length > 0 ?
10396 this.on( name, null, data, fn ) :
10397 this.trigger( name );
10398 };
10399} );
10400
10401jQuery.fn.extend( {
10402 hover: function( fnOver, fnOut ) {
10403 return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
10404 }
10405} );
10406
10407
10408
10409
10410jQuery.fn.extend( {
10411
10412 bind: function( types, data, fn ) {
10413 return this.on( types, null, data, fn );
10414 },
10415 unbind: function( types, fn ) {
10416 return this.off( types, null, fn );
10417 },
10418
10419 delegate: function( selector, types, data, fn ) {
10420 return this.on( types, selector, data, fn );
10421 },
10422 undelegate: function( selector, types, fn ) {
10423
10424 // ( namespace ) or ( selector, types [, fn] )
10425 return arguments.length === 1 ?
10426 this.off( selector, "**" ) :
10427 this.off( types, selector || "**", fn );
10428 }
10429} );
10430
10431// Bind a function to a context, optionally partially applying any
10432// arguments.
10433// jQuery.proxy is deprecated to promote standards (specifically Function#bind)
10434// However, it is not slated for removal any time soon
10435jQuery.proxy = function( fn, context ) {
10436 var tmp, args, proxy;
10437
10438 if ( typeof context === "string" ) {
10439 tmp = fn[ context ];
10440 context = fn;
10441 fn = tmp;
10442 }
10443
10444 // Quick check to determine if target is callable, in the spec
10445 // this throws a TypeError, but we will just return undefined.
10446 if ( !isFunction( fn ) ) {
10447 return undefined;
10448 }
10449
10450 // Simulated bind
10451 args = slice.call( arguments, 2 );
10452 proxy = function() {
10453 return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
10454 };
10455
10456 // Set the guid of unique handler to the same of original handler, so it can be removed
10457 proxy.guid = fn.guid = fn.guid || jQuery.guid++;
10458
10459 return proxy;
10460};
10461
10462jQuery.holdReady = function( hold ) {
10463 if ( hold ) {
10464 jQuery.readyWait++;
10465 } else {
10466 jQuery.ready( true );
10467 }
10468};
10469jQuery.isArray = Array.isArray;
10470jQuery.parseJSON = JSON.parse;
10471jQuery.nodeName = nodeName;
10472jQuery.isFunction = isFunction;
10473jQuery.isWindow = isWindow;
10474jQuery.camelCase = camelCase;
10475jQuery.type = toType;
10476
10477jQuery.now = Date.now;
10478
10479jQuery.isNumeric = function( obj ) {
10480
10481 // As of jQuery 3.0, isNumeric is limited to
10482 // strings and numbers (primitives or objects)
10483 // that can be coerced to finite numbers (gh-2662)
10484 var type = jQuery.type( obj );
10485 return ( type === "number" || type === "string" ) &&
10486
10487 // parseFloat NaNs numeric-cast false positives ("")
10488 // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
10489 // subtraction forces infinities to NaN
10490 !isNaN( obj - parseFloat( obj ) );
10491};
10492
10493
10494
10495
10496// Register as a named AMD module, since jQuery can be concatenated with other
10497// files that may use define, but not via a proper concatenation script that
10498// understands anonymous AMD modules. A named AMD is safest and most robust
10499// way to register. Lowercase jquery is used because AMD module names are
10500// derived from file names, and jQuery is normally delivered in a lowercase
10501// file name. Do this after creating the global so that if an AMD module wants
10502// to call noConflict to hide this version of jQuery, it will work.
10503
10504// Note that for maximum portability, libraries that are not jQuery should
10505// declare themselves as anonymous modules, and avoid setting a global if an
10506// AMD loader is present. jQuery is a special case. For more information, see
10507// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
10508
10509if ( typeof define === "function" && define.amd ) {
10510 define( "jquery", [], function() {
10511 return jQuery;
10512 } );
10513}
10514
10515
10516
10517
10518var
10519
10520 // Map over jQuery in case of overwrite
10521 _jQuery = window.jQuery,
10522
10523 // Map over the $ in case of overwrite
10524 _$ = window.$;
10525
10526jQuery.noConflict = function( deep ) {
10527 if ( window.$ === jQuery ) {
10528 window.$ = _$;
10529 }
10530
10531 if ( deep && window.jQuery === jQuery ) {
10532 window.jQuery = _jQuery;
10533 }
10534
10535 return jQuery;
10536};
10537
10538// Expose jQuery and $ identifiers, even in AMD
10539// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
10540// and CommonJS for browser emulators (#13566)
10541if ( !noGlobal ) {
10542 window.jQuery = window.$ = jQuery;
10543}
10544
10545
10546
10547
10548return jQuery;
10549} );
10550//# sourceURL=/Users/viktoria/node_modules/jquery/dist/jquery.js
10551
10552
10553</head>
10554<body>
10555
10556
10557
10558 if (window.location.search.webview || window.location.href.indexOf('?webview') > -1) {
10559 $('body').addClass('webview');
10560 window.isWebview = true;
10561 }
10562
10563
10564 <div class="nojs">
10565 <h2>Willkommen bei TV NOW,</h2>
10566
10567 <p>
10568 das neue TV NOW hält viele neue Funktionen für Sie bereit. Um die Neuerungen nutzen zu können, ist es jedoch
10569 erforderlich, JavaScript zu aktivieren.<br>
10570 Alle Informationen zur Aktivierung von JavaScript erhalten Sie <a href="https://hilfe.tvnow.de/hc/de/articles/206944559"><strong>hier</strong></a>.<br><br>
10571 Ihr TV NOW Team
10572 </p>
10573 </div>
10574
10575
10576 Bitte geben Sie mindestens 3 Buchstaben einSuche wird geladen...0%Leider keine Ergebnisse!
10577 Registrieren Einloggen Mein ProfilErneut senden E-Mail Adresse ändernZUM LOGIN OK MEIN PROFIL Abbrechen Abbrechen Jetzt einloggen und kostenlos die Playliste- und Favoritenfunktion nutzen.ZUM LOGINVielen Dank! Ihre E-Mail Adresse ist nun bestätigt und Sie haben Ihr Profil aktiviert.ZUM LOGIN MEIN PROFIL ×Sendungen A-Z×Sendung verpasst?×Live TV×TV Programm×Channels×Meine Merkliste×Suche Sendungen A-Z A-Z Sendung verpasst? Live TV TV Programm Channels Meine Merkliste0 Merkliste0
10578
10579
10580
10581
10582
10583
10584
10585
10586 PLAYER
10587
10588
10589
10590
10591
10592
10593 Hilfe & Kontakt | Impressum | AGB | Datenschutz | WiderrufsformularNutzungsbasierte Online-Werbung | Werben auf TV NOW | Glossar | Vorschauvideos deaktivieren | Vorschauvideos aktivieren © 2018 RTL interactive GmbH 2602HTML5Mode aktivTVNOW-Debugbar - Version 2602OptionenHTML5-Mode deaktivieren HTML5-Mode aktivierenLogoutLocal- und Sessionstorage löschenLogs - löschen#Log
10594
10595 Gleich geht's los!Hinweis schließen Um Videos bei TV NOW schauen zu können, musst du den Adobe Flash Player installieren und aktivieren.Weitere Informationen findest du in unserer Hilfe. Empfehlungen Player schließen JETZT LÄUFT DANACHn-tv Dokumentation FREE | Di. 06.03.2018 22:10JETZT LÄUFT DANACH Jetzt ansehenDie Millionen-Party - Das Oktoberfest n-tv Dokumentation FREE | Di. 06.03.2018 22:10JETZT LÄUFT DANACHDer BachelorFREE | Folge 7 | Mi. 21.02.2018 20:15JETZT LÄUFT DANACH Jetzt ansehenDie Homedates Der BachelorFREE | Folge 7 | Mi. 21.02.2018 20:15JETZT LÄUFT DANACHKöln 50667FREE | Folge 1313 | Mi. 07.03.2018 18:00JETZT LÄUFT DANACH Jetzt ansehenKöln 50667 (Folge 1313) Köln 50667FREE | Folge 1313 | Mi. 07.03.2018 18:00JETZT LÄUFT DANACHGZSZFREE | Folge 6461 | Mi. 07.03.2018 19:40JETZT LÄUFT DANACH Jetzt ansehenEine schlechte Nachricht GZSZFREE | Folge 6461 | Mi. 07.03.2018 19:40JETZT LÄUFT DANACHBerlin - Tag & NachtFREE | Folge 1637 | Mi. 28.02.2018 19:00JETZT LÄUFT DANACH Jetzt ansehenBerlin - Tag & Nacht (Folge 1637) Berlin - Tag & NachtFREE | Folge 1637 | Mi. 28.02.2018 19:00JETZT LÄUFT DANACHUnter unsFREE | Folge 5808 | Do. 01.03.2018 17:30JETZT LÄUFT DANACH Jetzt ansehenRomantischer Abend Unter unsFREE | Folge 5808 | Do. 01.03.2018 17:30JETZT LÄUFT DANACHNaked Attraction - Dating hautnahFREE | Folge 8 | Mo. 19.02.2018 22:15JETZT LÄUFT DANACH Jetzt ansehenCathy Lugner und Robin Naked Attraction - Dating hautnahFREE | Folge 8 | Mo. 19.02.2018 22:15JETZT LÄUFT DANACHAlles was zähltFREE | Folge 2890 | Mi. 07.03.2018 19:05JETZT LÄUFT DANACH Jetzt ansehenEin fataler Fehler Alles was zähltFREE | Folge 2890 | Mi. 07.03.2018 19:05JETZT LÄUFT DANACHSankt MaikFREE | Folge 8 | Di. 06.03.2018 20:15JETZT LÄUFT DANACH Jetzt ansehenSchnittchen oder Flittchen Sankt MaikFREE | Folge 8 | Di. 06.03.2018 20:15JETZT LÄUFT DANACHGoodbye DeutschlandFREE | Folge 14 | Di. 06.03.2018 22:25JETZT LÄUFT DANACH Jetzt ansehenZurück auf die Insel Goodbye DeutschlandFREE | Folge 14 | Di. 06.03.2018 22:25JETZT LÄUFT DANACHBeck is back!FREE | Folge 6 | Di. 20.02.2018 21:15JETZT LÄUFT DANACH Jetzt ansehenTodesraser Beck is back!FREE | Folge 6 | Di. 20.02.2018 21:15JETZT LÄUFT DANACHSchwestern - Volle Dosis LiebeFREE | Folge 3 | Mi. 07.03.2018 17:00JETZT LÄUFT DANACH Jetzt ansehenAnna muss sich ihre Gefühle für Ben eingestehen Schwestern - Volle Dosis LiebeFREE | Folge 3 | Mi. 07.03.2018 17:00JETZT LÄUFT DANACHDer Preis ist heißFREE | Folge 18 | Mi. 07.03.2018 23:35JETZT LÄUFT DANACH Jetzt ansehenFolge 18 vom 07.03.2018 Der Preis ist heißFREE | Folge 18 | Mi. 07.03.2018 23:35JETZT LÄUFT DANACHShopping QueenFREE | Folge 3 | Mi. 07.03.2018 15:00JETZT LÄUFT DANACH Jetzt ansehenGruppe Hannover: Tag 3 / Rosemarie Shopping QueenFREE | Folge 3 | Mi. 07.03.2018 15:00JETZT LÄUFT DANACHFirst Dates - Ein Tisch für zweiFREE | Folge 2 | Di. 06.03.2018 18:00JETZT LÄUFT DANACH Jetzt ansehenDaniel und Nadine First Dates - Ein Tisch für zweiFREE | Folge 2 | Di. 06.03.2018 18:00JETZT LÄUFT DANACHGuten Morgen DeutschlandFREE | Folge 48 | Do. 08.03.2018 06:00JETZT LÄUFT DANACH Jetzt ansehenTeil 1/2, Guten Morgen Deutschland Guten Morgen DeutschlandFREE | Folge 48 | Do. 08.03.2018 06:00JETZT LÄUFT DANACHMein himmlisches HotelFREE | Folge 3 | Mi. 07.03.2018 18:05JETZT LÄUFT DANACH Jetzt ansehenHarz: Tag 3 / Harzer Hof Mein himmlisches HotelFREE | Folge 3 | Mi. 07.03.2018 18:05JETZT LÄUFT DANACHKitchen ImpossibleFREE | Folge 5 | So. 04.03.2018 20:15JETZT LÄUFT DANACH Jetzt ansehenFolge 19: Roland Trettl vs. Peter Maria Schnurr Kitchen ImpossibleFREE | Folge 5 | So. 04.03.2018 20:15JETZT LÄUFT DANACHUnsere erste gemeinsame WohnungFREE | Folge 26 | Mi. 07.03.2018 19:50JETZT LÄUFT DANACH Jetzt ansehenAnja & Markus, Hamburg Unsere erste gemeinsame WohnungFREE | Folge 26 | Mi. 07.03.2018 19:50JETZT LÄUFT DANACHUndercover BossFREE | Folge 6 | Mo. 05.03.2018 21:15JETZT LÄUFT DANACH Jetzt ansehenPromi-Special: Detlef Soost Undercover BossFREE | Folge 6 | Mo. 05.03.2018 21:15JETZT LÄUFT DANACHTraut euch! In 12 Stunden zum AltarFREE | Folge 2 | Di. 06.03.2018 20:15JETZT LÄUFT DANACH Jetzt ansehenEvgenia und Atilla Traut euch! In 12 Stunden zum AltarFREE | Folge 2 | Di. 06.03.2018 20:15Liebe Userin, lieber User,das von dir gewählte Video steht zum kostenlosen Abruf bereit, weil wir es dir werbefinanziert anbieten. Wenn du einen AdBlocker aktiviert hast, der das Ausspielen der Werbung verhindern soll, kann das Video nicht abgespielt werden.Wir freuen uns, wenn du deinen AdBlocker auf unserer Seite deaktivierst – dann geht es hier sofort weiter.Nähere Informationen erhältst du hier.Nach dem Deaktivieren musst du die Seite neu laden.Vielen Dank für dein Verständnis!  Biite schalte deinen AdBlocker aus!Biite schalte deinen AdBlocker aus!Video teilenTeilen ab+-aufVideo teilen auf
10596
10597
10598 Willkommen bei TV NOW,
10599
10600
10601 um das neue TV NOW nutzen zu können, bitten wir Sie ein Browserupdate vorzunehmen. Alle Informationen dazu
10602 erhalten Sie hier.
10603 Ihr TV NOW Team
10604
10605
10606
10607
10608 if ((bowser.firefox && bowser.version < 4) ||
10609 (bowser.msie && bowser.version < 11)) {
10610 document.getElementsByClassName('background')[0].style.display = 'none';
10611 document.getElementsByClassName('oldbrowser')[0].style.display = 'block';
10612 }
10613
10614
10615
10616
10617 if (!nowSEDetected) {
10618 (function () {
10619 var s = document.createElement('script');
10620 s.type = 'text/javascript';
10621 s.async = true;
10622 s.src = 'https://track.adform.net/serving/scripts/trackpoint/async/';
10623 var x = document.getElementsByTagName('script')[0];
10624 x.parentNode.insertBefore(s, x);
10625 })();
10626
10627 (function () {
10628 var s = document.createElement('script');
10629 s.type = 'text/javascript';
10630 s.async = true;
10631 s.src = '//s7.addthis.com/js/300/addthis_widget.js#pubid=rtlnow&async=1';
10632 var x = document.getElementsByTagName('script')[0];
10633 x.parentNode.insertBefore(s, x);
10634 })();
10635 }
10636
10637
10638
10639
10640 !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
10641 n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
10642 n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
10643 t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
10644 document,'script','https://connect.facebook.net/en_US/fbevents.js');
10645 // Insert Your Facebook Pixel ID below.
10646 fbq('init', '1579375912126150');
10647 fbq('track', 'PageView');
10648
10649
10650<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1579375912126150&ev=PageView&noscript=1">
10651
10652
10653
10654 var _spef = _spef || [];
10655 _spef.push(["trackPageView"]);
10656 _spef.push(["enableLinkTracking"]);
10657 (function () {
10658 var u = "//trck.spoteffects.net/analytics/";
10659 _spef.push(['setTrackerUrl', u + 'piwik.php']);
10660 _spef.push(['setSiteId', 484]);
10661 var d = document, g = d.createElement("script"), s = d.getElementsByTagName("script")[0];
10662 g.type = "text/javascript";
10663 g.defer = true;
10664 g.async = true;
10665 g.src = u + "spef.min.js";
10666 s.parentNode.insertBefore(g, s);
10667 })();
10668
10669
10670
10671
10672
10673
10674
10675#wee9 {
10676 position: fixed !important;
10677 position: absolute;
10678 top: 3px;
10679 top: expression((t=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)+"px");
10680 left: -1px;
10681 width: 101%;
10682 height: 102%;
10683 background-color: #ffffff;
10684 opacity: .95;
10685 filter: alpha(opacity=95);
10686 display: block;
10687 padding: 20% 0
10688}
10689
10690#wee9 * {
10691 text-align: center;
10692 margin: 0 auto;
10693 display: block;
10694 filter: none;
10695 font: bold 14px Verdana, Arial, sans-serif;
10696 text-decoration: none
10697}
10698
10699#wee9 ~ * {
10700 display: none
10701}
10702
10703window.document.getElementById("wee9").parentNode.removeChild(window.document.getElementById("wee9"));
10704
10705
10706
10707
10708
10709</body>
10710</html>