kit_cms 2.3.20 → 2.3.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. data/app/assets/images/kit/toolbar/smile.png +0 -0
  2. data/app/assets/images/kit/toolbar/wink.gif +0 -0
  3. data/app/assets/images/kit/toolbar/wink.png +0 -0
  4. data/app/assets/javascripts/codemirror/editor.js +55 -17
  5. data/app/assets/javascripts/codemirror/jquery.js +0 -1
  6. data/app/assets/javascripts/codemirror/ruby.js +196 -0
  7. data/app/assets/javascripts/jquery.js +3036 -2838
  8. data/app/assets/javascripts/kit/utilities.js +655 -586
  9. data/app/assets/stylesheets/codemirror/style.css +1 -1
  10. data/app/assets/stylesheets/codemirror/theme.css +23 -3
  11. data/app/assets/stylesheets/kit/calendar.css +6 -1
  12. data/app/assets/stylesheets/kit/cms/cms.css +36 -0
  13. data/app/assets/stylesheets/kit/forums.css +5 -1
  14. data/app/assets/stylesheets/kit/kit.css +3 -1
  15. data/app/controllers/account_controller.rb +306 -0
  16. data/app/controllers/ad_controller.rb +2 -0
  17. data/app/controllers/admin/ad_units_controller.rb +1 -1
  18. data/app/controllers/admin/ad_zones_controller.rb +15 -0
  19. data/app/controllers/admin/ads_controller.rb +5 -0
  20. data/app/controllers/admin/block_controller.rb +1 -65
  21. data/app/controllers/admin/blocks_controller.rb +2 -0
  22. data/app/controllers/admin/content_controller.rb +3 -1
  23. data/app/controllers/admin/dashboard_controller.rb +28 -4
  24. data/app/controllers/admin/dj_controller.rb +45 -0
  25. data/app/controllers/admin/help_controller.rb +1 -1
  26. data/app/controllers/admin/html_asset_controller.rb +0 -12
  27. data/app/controllers/admin/q_controller.rb +120 -0
  28. data/app/controllers/admin/user_controller.rb +4 -4
  29. data/app/controllers/api_controller.rb +34 -0
  30. data/app/controllers/calendar_controller.rb +1 -1
  31. data/app/controllers/form_controller.rb +3 -3
  32. data/app/controllers/forum_controller.rb +39 -29
  33. data/app/controllers/kit_controller.rb +42 -15
  34. data/app/controllers/pages_controller.rb +25 -5
  35. data/app/controllers/q_controller.rb +235 -0
  36. data/app/controllers/repo_controller.rb +7 -0
  37. data/app/controllers/user_controller.rb +14 -10
  38. data/app/controllers/utility_controller.rb +1 -1
  39. data/app/helpers/account_helper.rb +47 -0
  40. data/app/helpers/admin/layouts_helper.rb +8 -0
  41. data/app/helpers/admin/page_templates_helper.rb +8 -0
  42. data/app/helpers/ads_helper.rb +11 -12
  43. data/app/helpers/calendar_helper.rb +6 -2
  44. data/app/helpers/form_data_helper.rb +1 -1
  45. data/app/helpers/form_helper.rb +8 -0
  46. data/app/helpers/forum_helper.rb +5 -1
  47. data/app/helpers/kit_helper.rb +65 -35
  48. data/app/helpers/kit_modules_helper.rb +4 -0
  49. data/app/helpers/user_helper.rb +0 -28
  50. data/app/jobs/page_link_job.rb +34 -0
  51. data/app/jobs/queue_job.rb +134 -0
  52. data/app/mailers/notification.rb +10 -0
  53. data/app/mailers/queue_mailer.rb +13 -0
  54. data/app/models/ad.rb +6 -6
  55. data/app/models/ad_unit.rb +1 -1
  56. data/app/models/ad_zone.rb +4 -0
  57. data/app/models/block.rb +1 -1
  58. data/app/models/delayed_job.rb +3 -0
  59. data/app/models/form.rb +16 -4
  60. data/app/models/html_asset.rb +19 -4
  61. data/app/models/html_asset_usage.rb +3 -0
  62. data/app/models/html_assetable.rb +4 -0
  63. data/app/models/layout.rb +36 -6
  64. data/app/models/newsletter.rb +1 -1
  65. data/app/models/page.rb +36 -2
  66. data/app/models/page_link.rb +5 -0
  67. data/app/models/page_template.rb +22 -2
  68. data/app/models/preference.rb +1 -1
  69. data/app/models/q_event.rb +12 -0
  70. data/app/models/q_klass.rb +5 -0
  71. data/app/models/q_message.rb +9 -0
  72. data/app/models/q_publisher.rb +35 -0
  73. data/app/models/q_subscription.rb +7 -0
  74. data/app/models/q_user.rb +29 -0
  75. data/app/models/q_users_method.rb +6 -0
  76. data/app/models/q_users_publisher.rb +6 -0
  77. data/app/models/user.rb +127 -19
  78. data/app/models/user_login.rb +4 -0
  79. data/app/validators/email_validator.rb +14 -0
  80. data/app/views/account/_edit.html.haml +40 -0
  81. data/app/views/account/_edit_intro.html.haml +3 -0
  82. data/app/views/account/_forgotten.html.haml +20 -0
  83. data/app/views/account/_forgotten_intro.html.haml +5 -0
  84. data/app/views/account/_sign_in.html.haml +31 -0
  85. data/app/views/account/_sign_in_intro.html.haml +4 -0
  86. data/app/views/account/_sign_up.html.haml +51 -0
  87. data/app/views/account/_sign_up_intro.html.haml +4 -0
  88. data/app/views/account/edit.html.haml +1 -0
  89. data/app/views/account/forgotten.html.haml +1 -0
  90. data/app/views/account/sign_in.html.haml +2 -0
  91. data/app/views/account/sign_up.html.haml +1 -0
  92. data/app/views/ad/_buy.html.haml +2 -1
  93. data/app/views/admin/ad_zones/_form.html.haml +1 -1
  94. data/app/views/admin/ad_zones/show.html.haml +2 -0
  95. data/app/views/admin/blocks/_form.html.haml +11 -1
  96. data/app/views/admin/dashboard/broken_links.html.haml +9 -0
  97. data/app/views/admin/dashboard/system.html.haml +11 -0
  98. data/app/views/admin/dj/index.html.haml +43 -0
  99. data/app/views/admin/form/_form.html.haml +15 -10
  100. data/app/views/admin/group/index.html.haml +1 -1
  101. data/app/views/admin/help/edit.html.haml +1 -1
  102. data/app/views/admin/html_asset/show.html.haml +9 -2
  103. data/app/views/admin/layouts/show.html.haml +10 -16
  104. data/app/views/admin/page_templates/_form.html.haml +9 -17
  105. data/app/views/admin/page_templates/show.html.haml +5 -4
  106. data/app/views/admin/q/events.html.haml +26 -0
  107. data/app/views/admin/q/index.html.haml +28 -0
  108. data/app/views/admin/q/klasses.html.haml +61 -0
  109. data/app/views/admin/q/messages.html.haml +37 -0
  110. data/app/views/admin/q/show.html.haml +98 -0
  111. data/app/views/admin/q/subscriptions.html.haml +26 -0
  112. data/app/views/admin/q/users.html.haml +27 -0
  113. data/app/views/admin/snippet/edit.html.erb +1 -1
  114. data/app/views/admin/snippet/new.html.erb +1 -1
  115. data/app/views/admin/stylesheet/show.html.haml +1 -1
  116. data/app/views/admin/user/index.html.erb +15 -6
  117. data/app/views/admin/user/view.html.erb +5 -4
  118. data/app/views/admin/views/_form.html.haml +3 -3
  119. data/app/views/calendar/_buy_tickets.html.haml +1 -1
  120. data/app/views/calendar/_calendar_entry.html.haml +1 -1
  121. data/app/views/calendar/_month.html.haml +7 -7
  122. data/app/views/form/_show.html.haml +1 -1
  123. data/app/views/forum/_add_post.html.haml +7 -8
  124. data/app/views/forum/_mod_thread.js.erb +46 -6
  125. data/app/views/forum/_post_moderation.html.haml +2 -1
  126. data/app/views/forum/_post_preview.html.haml +1 -9
  127. data/app/views/forum/_post_scripts.js.erb +29 -5
  128. data/app/views/forum/fetch_raw.html.haml +1 -0
  129. data/app/views/forum/moderate.html.haml +1 -0
  130. data/app/views/forum/topic_index.html.haml +4 -0
  131. data/app/views/notification/{event.txt.erb → event.text.erb} +0 -0
  132. data/app/views/notification/forgotten_password.text.erb +2 -0
  133. data/app/views/pages/content_edit.html.haml +1 -1
  134. data/app/views/pages/info.html.erb +13 -2
  135. data/app/views/pages/links.html.haml +63 -0
  136. data/app/views/user/edit_profile.html.haml +1 -1
  137. data/app/views/utility/_cm_editor.html.erb +13 -10
  138. data/app/views/utility/_cm_toolbar_markdown.html.haml +8 -1
  139. data/app/views/utility/_menu.html.haml +4 -0
  140. data/app/views/utility/mercury_html.html.haml +1 -0
  141. data/config/initializers/elastic_search.rb +6 -3
  142. data/config/initializers/extend_controller.rb +3 -0
  143. data/config/initializers/string.rb +9 -6
  144. data/config/initializers/warden.rb +49 -0
  145. data/config/locales/en.yml +29 -1
  146. data/config/routes.rb +35 -2
  147. data/lib/kit_cms.rb +7 -2
  148. data/lib/tasks/kit.rake +90 -2
  149. metadata +139 -27
  150. data/app/controllers/user/confirmations_controller.rb +0 -11
  151. data/app/controllers/user/passwords_controller.rb +0 -13
  152. data/app/controllers/user/registrations_controller.rb +0 -110
  153. data/app/controllers/user/sessions_controller.rb +0 -33
  154. data/app/controllers/user/unlocks_controller.rb +0 -13
  155. data/app/views/devise/_links.erb +0 -25
  156. data/app/views/devise/confirmations/new.html.erb +0 -12
  157. data/app/views/devise/mailer/confirmation_instructions.html.erb +0 -5
  158. data/app/views/devise/mailer/reset_password_instructions.html.erb +0 -8
  159. data/app/views/devise/mailer/unlock_instructions.html.erb +0 -7
  160. data/app/views/devise/passwords/edit.html.erb +0 -16
  161. data/app/views/devise/passwords/new.html.erb +0 -12
  162. data/app/views/devise/registrations/edit.html.erb +0 -28
  163. data/app/views/devise/registrations/new.html.erb +0 -18
  164. data/app/views/devise/sessions/new.html.erb +0 -18
  165. data/app/views/devise/shared/_links.erb +0 -25
  166. data/app/views/devise/unlocks/new.html.erb +0 -12
  167. data/app/views/pages/links.html.erb +0 -8
  168. data/app/views/user/shared/_links.erb +0 -25
  169. data/config/initializers/devise.rb +0 -196
  170. data/config/initializers/devise_extender.rb +0 -39
@@ -7,6 +7,7 @@
7
7
  *= require "./css"
8
8
  *= require "./markdown"
9
9
  *= require "./xml"
10
+ *= require "./ruby"
10
11
  *= require "./javascript"
11
12
  *= require "./dialog"
12
13
  *= require "./match-highlighter"
@@ -17,7 +18,36 @@
17
18
  *
18
19
  */
19
20
 
20
- var html_editors = new Array();
21
+ var _editors = {};
22
+
23
+ function deregister_editor_by_name(name) {
24
+ var editor_record = get_editor_record_by_name(name);
25
+ delete _editors[editor_record.id];
26
+ }
27
+
28
+ function get_editor_record_by_name(name) {
29
+ for (var id in _editors) {
30
+ if (_editors[id].name === name) {
31
+ return _editors[id];
32
+ }
33
+ }
34
+ return null;
35
+ }
36
+
37
+ function register_editor(editor, id, name) {
38
+ var the_editor = { editor: editor, id: id, name: name };
39
+ _editors[id] = the_editor;
40
+ }
41
+
42
+ function get_editor_by_id(id) {
43
+ return _editors[id].editor;
44
+ }
45
+
46
+ function get_editor_by_name(name) {
47
+ var editor_record = get_editor_record_by_name(name);
48
+ if (editor_record) return editor_record.editor;
49
+ return null;
50
+ }
21
51
 
22
52
  function do_bold(editor) {
23
53
  insert_formatting(editor, "*", "*", "Bold");
@@ -27,7 +57,14 @@ function do_underline(editor) {
27
57
  insert_formatting(editor, "_", "_", "Underlined");
28
58
  }
29
59
 
30
- function do_cmd(editor, cmd) {
60
+ function do_cmd(id, cmd) {
61
+ var editor = get_editor_by_id(id);
62
+ if (cmd=='wink') {
63
+ do_smile(editor, 'wink');
64
+ }
65
+ if (cmd=='smile') {
66
+ do_smile(editor, 'smile');
67
+ }
31
68
  if (cmd=='list') {
32
69
  do_list(editor, '-');
33
70
  }
@@ -62,12 +99,11 @@ function do_cmd(editor, cmd) {
62
99
  do_redo(editor);
63
100
  }
64
101
  if (cmd=='preview') {
65
- do_preview(editor);
102
+ do_preview(editor,id);
66
103
  }
67
104
  }
68
105
 
69
106
  function do_prefix(editor, prefix) {
70
- var editor = html_editors[editor];
71
107
  var start_pos = editor.getCursor('start');
72
108
  var end_pos = editor.getCursor('end');
73
109
 
@@ -95,7 +131,6 @@ function do_link(editor) {
95
131
  }
96
132
 
97
133
  function do_video(editor) {
98
- var editor = html_editors[editor];
99
134
  var start_pos = editor.getCursor('start');
100
135
  var url = prompt("Enter Youtube 'share' URL or Vimeo URL");
101
136
 
@@ -105,18 +140,23 @@ function do_video(editor) {
105
140
  editor.focus();
106
141
  }
107
142
 
143
+ function do_smile(editor, smile) {
144
+ var start_pos = editor.getCursor('start');
145
+ editor.replaceSelection(" :" + smile + ": ");
146
+ start_pos.ch = start_pos.ch + smile.length + 4;
147
+ editor.setCursor(start_pos);
148
+ editor.focus();
149
+ }
150
+
108
151
  function do_undo(editor) {
109
- var editor = html_editors[editor];
110
152
  editor.undo();
111
153
  }
112
154
 
113
155
  function do_redo(editor) {
114
- var editor = html_editors[editor];
115
156
  editor.redo();
116
157
  }
117
158
 
118
159
  function do_image(editor) {
119
- var editor = html_editors[editor];
120
160
  var url = prompt("Enter the full URL of the image", "http://");
121
161
  var start_pos = editor.getCursor('start');
122
162
 
@@ -126,15 +166,14 @@ function do_image(editor) {
126
166
  editor.focus();
127
167
  }
128
168
 
129
- function do_list(editor_name,list) {
130
- var editor = html_editors[editor_name];
169
+ function do_list(editor,list) {
131
170
  var start_pos = editor.getCursor('start');
132
171
  var end_pos = editor.getCursor('end');
133
172
  var to_insert = '';
134
173
 
135
174
  if (editor.somethingSelected()) {
136
175
  if (start_pos.line != end_pos.line) {
137
- do_prefix(editor_name, list);
176
+ do_prefix(editor, list);
138
177
  return;
139
178
  }
140
179
  else {
@@ -166,7 +205,6 @@ function do_list(editor_name,list) {
166
205
  }
167
206
 
168
207
  function insert_formatting(editor,start,end,placeholder) {
169
- var editor = html_editors[editor];
170
208
  var current = editor.getSelection();
171
209
  var placeholder_mode = false;
172
210
  var start_pos = editor.getCursor("start");
@@ -191,12 +229,12 @@ function insert_formatting(editor,start,end,placeholder) {
191
229
  }
192
230
 
193
231
 
194
- function do_preview(field) {
195
- var editor = html_editors[field];
196
- $('#preview_' + field).dialog({ autoOpen: true,
197
- width: 800, height: 500, modal: true, resizable: true, show: {effect:"drop"}, title: "Preview", closeOnEscape: true, dialogClass: "modal_markdown_preview" });
232
+ function do_preview(editor,id) {
233
+
234
+ $('#preview_' + id).dialog({ autoOpen: true,
235
+ width: 820, height: 500, modal: true, resizable: false, class: "preview_modal", show: {effect:"drop"}, title: "Preview", closeOnEscape: true, dialogClass: "modal_markdown_preview" });
198
236
 
199
237
  $.post('/utility/markdown_preview', {body: editor.getValue()}, function(data) {
200
- $('#preview_' + field).html(data);
238
+ $('#preview_' + id).html(data);
201
239
  });
202
240
  }
@@ -1,4 +1,3 @@
1
- /*! jQuery v1.9.0 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license */(function(e,t){"use strict";function n(e){var t=e.length,n=st.type(e);return st.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e){var t=Tt[e]={};return st.each(e.match(lt)||[],function(e,n){t[n]=!0}),t}function i(e,n,r,i){if(st.acceptData(e)){var o,a,s=st.expando,u="string"==typeof n,l=e.nodeType,c=l?st.cache:e,f=l?e[s]:e[s]&&s;if(f&&c[f]&&(i||c[f].data)||!u||r!==t)return f||(l?e[s]=f=K.pop()||st.guid++:f=s),c[f]||(c[f]={},l||(c[f].toJSON=st.noop)),("object"==typeof n||"function"==typeof n)&&(i?c[f]=st.extend(c[f],n):c[f].data=st.extend(c[f].data,n)),o=c[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[st.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[st.camelCase(n)])):a=o,a}}function o(e,t,n){if(st.acceptData(e)){var r,i,o,a=e.nodeType,u=a?st.cache:e,l=a?e[st.expando]:st.expando;if(u[l]){if(t&&(r=n?u[l]:u[l].data)){st.isArray(t)?t=t.concat(st.map(t,st.camelCase)):t in r?t=[t]:(t=st.camelCase(t),t=t in r?[t]:t.split(" "));for(i=0,o=t.length;o>i;i++)delete r[t[i]];if(!(n?s:st.isEmptyObject)(r))return}(n||(delete u[l].data,s(u[l])))&&(a?st.cleanData([e],!0):st.support.deleteExpando||u!=u.window?delete u[l]:u[l]=null)}}}function a(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(Nt,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:wt.test(r)?st.parseJSON(r):r}catch(o){}st.data(e,n,r)}else r=t}return r}function s(e){var t;for(t in e)if(("data"!==t||!st.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function u(){return!0}function l(){return!1}function c(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function f(e,t,n){if(t=t||0,st.isFunction(t))return st.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return st.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=st.grep(e,function(e){return 1===e.nodeType});if(Wt.test(t))return st.filter(t,r,!n);t=st.filter(t,r)}return st.grep(e,function(e){return st.inArray(e,t)>=0===n})}function p(e){var t=zt.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function d(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function h(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function g(e){var t=nn.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function m(e,t){for(var n,r=0;null!=(n=e[r]);r++)st._data(n,"globalEval",!t||st._data(t[r],"globalEval"))}function y(e,t){if(1===t.nodeType&&st.hasData(e)){var n,r,i,o=st._data(e),a=st._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)st.event.add(t,n,s[n][r])}a.data&&(a.data=st.extend({},a.data))}}function v(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!st.support.noCloneEvent&&t[st.expando]){r=st._data(t);for(i in r.events)st.removeEvent(t,i,r.handle);t.removeAttribute(st.expando)}"script"===n&&t.text!==e.text?(h(t).text=e.text,g(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),st.support.html5Clone&&e.innerHTML&&!st.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Zt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function b(e,n){var r,i,o=0,a=e.getElementsByTagName!==t?e.getElementsByTagName(n||"*"):e.querySelectorAll!==t?e.querySelectorAll(n||"*"):t;if(!a)for(a=[],r=e.childNodes||e;null!=(i=r[o]);o++)!n||st.nodeName(i,n)?a.push(i):st.merge(a,b(i,n));return n===t||n&&st.nodeName(e,n)?st.merge([e],a):a}function x(e){Zt.test(e.type)&&(e.defaultChecked=e.checked)}function T(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Nn.length;i--;)if(t=Nn[i]+n,t in e)return t;return r}function w(e,t){return e=t||e,"none"===st.css(e,"display")||!st.contains(e.ownerDocument,e)}function N(e,t){for(var n,r=[],i=0,o=e.length;o>i;i++)n=e[i],n.style&&(r[i]=st._data(n,"olddisplay"),t?(r[i]||"none"!==n.style.display||(n.style.display=""),""===n.style.display&&w(n)&&(r[i]=st._data(n,"olddisplay",S(n.nodeName)))):r[i]||w(n)||st._data(n,"olddisplay",st.css(n,"display")));for(i=0;o>i;i++)n=e[i],n.style&&(t&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=t?r[i]||"":"none"));return e}function C(e,t,n){var r=mn.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function k(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=st.css(e,n+wn[o],!0,i)),r?("content"===n&&(a-=st.css(e,"padding"+wn[o],!0,i)),"margin"!==n&&(a-=st.css(e,"border"+wn[o]+"Width",!0,i))):(a+=st.css(e,"padding"+wn[o],!0,i),"padding"!==n&&(a+=st.css(e,"border"+wn[o]+"Width",!0,i)));return a}function E(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=ln(e),a=st.support.boxSizing&&"border-box"===st.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=un(e,t,o),(0>i||null==i)&&(i=e.style[t]),yn.test(i))return i;r=a&&(st.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+k(e,t,n||(a?"border":"content"),r,o)+"px"}function S(e){var t=V,n=bn[e];return n||(n=A(e,t),"none"!==n&&n||(cn=(cn||st("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(cn[0].contentWindow||cn[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=A(e,t),cn.detach()),bn[e]=n),n}function A(e,t){var n=st(t.createElement(e)).appendTo(t.body),r=st.css(n[0],"display");return n.remove(),r}function j(e,t,n,r){var i;if(st.isArray(t))st.each(t,function(t,i){n||kn.test(e)?r(e,i):j(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==st.type(t))r(e,t);else for(i in t)j(e+"["+i+"]",t[i],n,r)}function D(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(lt)||[];if(st.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function L(e,n,r,i){function o(u){var l;return a[u]=!0,st.each(e[u]||[],function(e,u){var c=u(n,r,i);return"string"!=typeof c||s||a[c]?s?!(l=c):t:(n.dataTypes.unshift(c),o(c),!1)}),l}var a={},s=e===$n;return o(n.dataTypes[0])||!a["*"]&&o("*")}function H(e,n){var r,i,o=st.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((o[r]?e:i||(i={}))[r]=n[r]);return i&&st.extend(!0,e,i),e}function M(e,n,r){var i,o,a,s,u=e.contents,l=e.dataTypes,c=e.responseFields;for(o in c)o in r&&(n[c[o]]=r[o]);for(;"*"===l[0];)l.shift(),i===t&&(i=e.mimeType||n.getResponseHeader("Content-Type"));if(i)for(o in u)if(u[o]&&u[o].test(i)){l.unshift(o);break}if(l[0]in r)a=l[0];else{for(o in r){if(!l[0]||e.converters[o+" "+l[0]]){a=o;break}s||(s=o)}a=a||s}return a?(a!==l[0]&&l.unshift(a),r[a]):t}function q(e,t){var n,r,i,o,a={},s=0,u=e.dataTypes.slice(),l=u[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u[1])for(n in e.converters)a[n.toLowerCase()]=e.converters[n];for(;i=u[++s];)if("*"!==i){if("*"!==l&&l!==i){if(n=a[l+" "+i]||a["* "+i],!n)for(r in a)if(o=r.split(" "),o[1]===i&&(n=a[l+" "+o[0]]||a["* "+o[0]])){n===!0?n=a[r]:a[r]!==!0&&(i=o[0],u.splice(s--,0,i));break}if(n!==!0)if(n&&e["throws"])t=n(t);else try{t=n(t)}catch(c){return{state:"parsererror",error:n?c:"No conversion from "+l+" to "+i}}}l=i}return{state:"success",data:t}}function _(){try{return new e.XMLHttpRequest}catch(t){}}function F(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function O(){return setTimeout(function(){Qn=t}),Qn=st.now()}function B(e,t){st.each(t,function(t,n){for(var r=(rr[t]||[]).concat(rr["*"]),i=0,o=r.length;o>i;i++)if(r[i].call(e,t,n))return})}function P(e,t,n){var r,i,o=0,a=nr.length,s=st.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=Qn||O(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;u>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:st.extend({},t),opts:st.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Qn||O(),duration:n.duration,tweens:[],createTween:function(t,n){var r=st.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),c=l.props;for(R(c,l.opts.specialEasing);a>o;o++)if(r=nr[o].call(l,e,c,l.opts))return r;return B(l,c),st.isFunction(l.opts.start)&&l.opts.start.call(e,l),st.fx.timer(st.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function R(e,t){var n,r,i,o,a;for(n in e)if(r=st.camelCase(n),i=t[r],o=e[n],st.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=st.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function W(e,t,n){var r,i,o,a,s,u,l,c,f,p=this,d=e.style,h={},g=[],m=e.nodeType&&w(e);n.queue||(c=st._queueHooks(e,"fx"),null==c.unqueued&&(c.unqueued=0,f=c.empty.fire,c.empty.fire=function(){c.unqueued||f()}),c.unqueued++,p.always(function(){p.always(function(){c.unqueued--,st.queue(e,"fx").length||c.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===st.css(e,"display")&&"none"===st.css(e,"float")&&(st.support.inlineBlockNeedsLayout&&"inline"!==S(e.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",st.support.shrinkWrapBlocks||p.done(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(r in t)if(o=t[r],Zn.exec(o)){if(delete t[r],u=u||"toggle"===o,o===(m?"hide":"show"))continue;g.push(r)}if(a=g.length){s=st._data(e,"fxshow")||st._data(e,"fxshow",{}),"hidden"in s&&(m=s.hidden),u&&(s.hidden=!m),m?st(e).show():p.done(function(){st(e).hide()}),p.done(function(){var t;st._removeData(e,"fxshow");for(t in h)st.style(e,t,h[t])});for(r=0;a>r;r++)i=g[r],l=p.createTween(i,m?s[i]:0),h[i]=s[i]||st.style(e,i),i in s||(s[i]=l.start,m&&(l.end=l.start,l.start="width"===i||"height"===i?1:0))}}function $(e,t,n,r,i){return new $.prototype.init(e,t,n,r,i)}function I(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=wn[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function z(e){return st.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var X,U,V=e.document,Y=e.location,J=e.jQuery,G=e.$,Q={},K=[],Z="1.9.0",et=K.concat,tt=K.push,nt=K.slice,rt=K.indexOf,it=Q.toString,ot=Q.hasOwnProperty,at=Z.trim,st=function(e,t){return new st.fn.init(e,t,X)},ut=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,lt=/\S+/g,ct=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ft=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,pt=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,dt=/^[\],:{}\s]*$/,ht=/(?:^|:|,)(?:\s*\[)+/g,gt=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,mt=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,yt=/^-ms-/,vt=/-([\da-z])/gi,bt=function(e,t){return t.toUpperCase()},xt=function(){V.addEventListener?(V.removeEventListener("DOMContentLoaded",xt,!1),st.ready()):"complete"===V.readyState&&(V.detachEvent("onreadystatechange",xt),st.ready())};st.fn=st.prototype={jquery:Z,constructor:st,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:ft.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof st?n[0]:n,st.merge(this,st.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:V,!0)),pt.test(i[1])&&st.isPlainObject(n))for(i in n)st.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=V.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=V,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):st.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),st.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return nt.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=st.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return st.each(this,e,t)},ready:function(e){return st.ready.promise().done(e),this},slice:function(){return this.pushStack(nt.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(st.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:tt,sort:[].sort,splice:[].splice},st.fn.init.prototype=st.fn,st.extend=st.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||st.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(e=arguments[u]))for(n in e)r=s[n],i=e[n],s!==i&&(c&&i&&(st.isPlainObject(i)||(o=st.isArray(i)))?(o?(o=!1,a=r&&st.isArray(r)?r:[]):a=r&&st.isPlainObject(r)?r:{},s[n]=st.extend(c,a,i)):i!==t&&(s[n]=i));return s},st.extend({noConflict:function(t){return e.$===st&&(e.$=G),t&&e.jQuery===st&&(e.jQuery=J),st},isReady:!1,readyWait:1,holdReady:function(e){e?st.readyWait++:st.ready(!0)},ready:function(e){if(e===!0?!--st.readyWait:!st.isReady){if(!V.body)return setTimeout(st.ready);st.isReady=!0,e!==!0&&--st.readyWait>0||(U.resolveWith(V,[st]),st.fn.trigger&&st(V).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===st.type(e)},isArray:Array.isArray||function(e){return"array"===st.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?Q[it.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==st.type(e)||e.nodeType||st.isWindow(e))return!1;try{if(e.constructor&&!ot.call(e,"constructor")&&!ot.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||ot.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||V;var r=pt.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=st.buildFragment([e],t,i),i&&st(i).remove(),st.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=st.trim(n),n&&dt.test(n.replace(gt,"@").replace(mt,"]").replace(ht,"")))?Function("return "+n)():(st.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||st.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&st.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(yt,"ms-").replace(vt,bt)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,r){var i,o=0,a=e.length,s=n(e);if(r){if(s)for(;a>o&&(i=t.apply(e[o],r),i!==!1);o++);else for(o in e)if(i=t.apply(e[o],r),i===!1)break}else if(s)for(;a>o&&(i=t.call(e[o],o,e[o]),i!==!1);o++);else for(o in e)if(i=t.call(e[o],o,e[o]),i===!1)break;return e},trim:at&&!at.call("\ufeff\u00a0")?function(e){return null==e?"":at.call(e)}:function(e){return null==e?"":(e+"").replace(ct,"")},makeArray:function(e,t){var r=t||[];return null!=e&&(n(Object(e))?st.merge(r,"string"==typeof e?[e]:e):tt.call(r,e)),r},inArray:function(e,t,n){var r;if(t){if(rt)return rt.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else for(;n[o]!==t;)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,r){var i,o=0,a=e.length,s=n(e),u=[];if(s)for(;a>o;o++)i=t(e[o],o,r),null!=i&&(u[u.length]=i);else for(o in e)i=t(e[o],o,r),null!=i&&(u[u.length]=i);return et.apply([],u)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(r=e[n],n=e,e=r),st.isFunction(e)?(i=nt.call(arguments,2),o=function(){return e.apply(n||this,i.concat(nt.call(arguments)))},o.guid=e.guid=e.guid||st.guid++,o):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===st.type(r)){o=!0;for(u in r)st.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,st.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(st(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),st.ready.promise=function(t){if(!U)if(U=st.Deferred(),"complete"===V.readyState)setTimeout(st.ready);else if(V.addEventListener)V.addEventListener("DOMContentLoaded",xt,!1),e.addEventListener("load",st.ready,!1);else{V.attachEvent("onreadystatechange",xt),e.attachEvent("onload",st.ready);var n=!1;try{n=null==e.frameElement&&V.documentElement}catch(r){}n&&n.doScroll&&function i(){if(!st.isReady){try{n.doScroll("left")}catch(e){return setTimeout(i,50)}st.ready()}}()}return U.promise(t)},st.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){Q["[object "+t+"]"]=t.toLowerCase()}),X=st(V);var Tt={};st.Callbacks=function(e){e="string"==typeof e?Tt[e]||r(e):st.extend({},e);var n,i,o,a,s,u,l=[],c=!e.once&&[],f=function(t){for(n=e.memory&&t,i=!0,u=a||0,a=0,s=l.length,o=!0;l&&s>u;u++)if(l[u].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}o=!1,l&&(c?c.length&&f(c.shift()):n?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function r(t){st.each(t,function(t,n){var i=st.type(n);"function"===i?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==i&&r(n)})})(arguments),o?s=l.length:n&&(a=t,f(n))}return this},remove:function(){return l&&st.each(arguments,function(e,t){for(var n;(n=st.inArray(t,l,n))>-1;)l.splice(n,1),o&&(s>=n&&s--,u>=n&&u--)}),this},has:function(e){return st.inArray(e,l)>-1},empty:function(){return l=[],this},disable:function(){return l=c=n=t,this},disabled:function(){return!l},lock:function(){return c=t,n||p.disable(),this},locked:function(){return!c},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!l||i&&!c||(o?c.push(t):f(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},st.extend({Deferred:function(e){var t=[["resolve","done",st.Callbacks("once memory"),"resolved"],["reject","fail",st.Callbacks("once memory"),"rejected"],["notify","progress",st.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return st.Deferred(function(n){st.each(t,function(t,o){var a=o[0],s=st.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&st.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?st.extend(e,r):r}},i={};return r.pipe=r.then,st.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=nt.call(arguments),a=o.length,s=1!==a||e&&st.isFunction(e.promise)?a:0,u=1===s?e:st.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?nt.call(arguments):i,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(t=Array(a),n=Array(a),r=Array(a);a>i;i++)o[i]&&st.isFunction(o[i].promise)?o[i].promise().done(l(i,r,o)).fail(u.reject).progress(l(i,n,t)):--s;return s||u.resolveWith(r,o),u.promise()}}),st.support=function(){var n,r,i,o,a,s,u,l,c,f,p=V.createElement("div");if(p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",r=p.getElementsByTagName("*"),i=p.getElementsByTagName("a")[0],!r||!i||!r.length)return{};o=V.createElement("select"),a=o.appendChild(V.createElement("option")),s=p.getElementsByTagName("input")[0],i.style.cssText="top:1px;float:left;opacity:.5",n={getSetAttribute:"t"!==p.className,leadingWhitespace:3===p.firstChild.nodeType,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(i.getAttribute("style")),hrefNormalized:"/a"===i.getAttribute("href"),opacity:/^0.5/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:!!s.value,optSelected:a.selected,enctype:!!V.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==V.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===V.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},s.checked=!0,n.noCloneChecked=s.cloneNode(!0).checked,o.disabled=!0,n.optDisabled=!a.disabled;try{delete p.test}catch(d){n.deleteExpando=!1}s=V.createElement("input"),s.setAttribute("value",""),n.input=""===s.getAttribute("value"),s.value="t",s.setAttribute("type","radio"),n.radioValue="t"===s.value,s.setAttribute("checked","t"),s.setAttribute("name","t"),u=V.createDocumentFragment(),u.appendChild(s),n.appendChecked=s.checked,n.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,p.attachEvent&&(p.attachEvent("onclick",function(){n.noCloneEvent=!1}),p.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})p.setAttribute(l="on"+f,"t"),n[f+"Bubbles"]=l in e||p.attributes[l].expando===!1;return p.style.backgroundClip="content-box",p.cloneNode(!0).style.backgroundClip="",n.clearCloneStyle="content-box"===p.style.backgroundClip,st(function(){var r,i,o,a="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",s=V.getElementsByTagName("body")[0];s&&(r=V.createElement("div"),r.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",s.appendChild(r).appendChild(p),p.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=p.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",c=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",n.reliableHiddenOffsets=c&&0===o[0].offsetHeight,p.innerHTML="",p.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",n.boxSizing=4===p.offsetWidth,n.doesNotIncludeMarginInBodyOffset=1!==s.offsetTop,e.getComputedStyle&&(n.pixelPosition="1%"!==(e.getComputedStyle(p,null)||{}).top,n.boxSizingReliable="4px"===(e.getComputedStyle(p,null)||{width:"4px"}).width,i=p.appendChild(V.createElement("div")),i.style.cssText=p.style.cssText=a,i.style.marginRight=i.style.width="0",p.style.width="1px",n.reliableMarginRight=!parseFloat((e.getComputedStyle(i,null)||{}).marginRight)),p.style.zoom!==t&&(p.innerHTML="",p.style.cssText=a+"width:1px;padding:1px;display:inline;zoom:1",n.inlineBlockNeedsLayout=3===p.offsetWidth,p.style.display="block",p.innerHTML="<div></div>",p.firstChild.style.width="5px",n.shrinkWrapBlocks=3!==p.offsetWidth,s.style.zoom=1),s.removeChild(r),r=p=o=i=null)}),r=o=u=a=i=s=null,n}();var wt=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,Nt=/([A-Z])/g;st.extend({cache:{},expando:"jQuery"+(Z+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?st.cache[e[st.expando]]:e[st.expando],!!e&&!s(e)},data:function(e,t,n){return i(e,t,n,!1)},removeData:function(e,t){return o(e,t,!1)},_data:function(e,t,n){return i(e,t,n,!0)},_removeData:function(e,t){return o(e,t,!0)},acceptData:function(e){var t=e.nodeName&&st.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),st.fn.extend({data:function(e,n){var r,i,o=this[0],s=0,u=null;if(e===t){if(this.length&&(u=st.data(o),1===o.nodeType&&!st._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>s;s++)i=r[s].name,i.indexOf("data-")||(i=st.camelCase(i.substring(5)),a(o,i,u[i]));st._data(o,"parsedAttrs",!0)}return u}return"object"==typeof e?this.each(function(){st.data(this,e)}):st.access(this,function(n){return n===t?o?a(o,e,st.data(o,e)):null:(this.each(function(){st.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){st.removeData(this,e)})}}),st.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=st._data(e,n),r&&(!i||st.isArray(r)?i=st._data(e,n,st.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=st.queue(e,t),r=n.length,i=n.shift(),o=st._queueHooks(e,t),a=function(){st.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return st._data(e,n)||st._data(e,n,{empty:st.Callbacks("once memory").add(function(){st._removeData(e,t+"queue"),st._removeData(e,n)})})}}),st.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?st.queue(this[0],e):n===t?this:this.each(function(){var t=st.queue(this,e,n);st._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&st.dequeue(this,e)})},dequeue:function(e){return this.each(function(){st.dequeue(this,e)})},delay:function(e,t){return e=st.fx?st.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=st.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};for("string"!=typeof e&&(n=e,e=t),e=e||"fx";s--;)r=st._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var Ct,kt,Et=/[\t\r\n]/g,St=/\r/g,At=/^(?:input|select|textarea|button|object)$/i,jt=/^(?:a|area)$/i,Dt=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,Lt=/^(?:checked|selected)$/i,Ht=st.support.getSetAttribute,Mt=st.support.input;st.fn.extend({attr:function(e,t){return st.access(this,st.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){st.removeAttr(this,e)})},prop:function(e,t){return st.access(this,st.prop,e,t,arguments.length>1)},removeProp:function(e){return e=st.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(st.isFunction(e))return this.each(function(t){st(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(lt)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Et," "):" ")){for(o=0;i=t[o++];)0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=st.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(st.isFunction(e))return this.each(function(t){st(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(lt)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Et," "):"")){for(o=0;i=t[o++];)for(;r.indexOf(" "+i+" ")>=0;)r=r.replace(" "+i+" "," ");n.className=e?st.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return st.isFunction(e)?this.each(function(n){st(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var i,o=0,a=st(this),s=t,u=e.match(lt)||[];i=u[o++];)s=r?s:!a.hasClass(i),a[s?"addClass":"removeClass"](i);else("undefined"===n||"boolean"===n)&&(this.className&&st._data(this,"__className__",this.className),this.className=this.className||e===!1?"":st._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(Et," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=st.isFunction(e),this.each(function(r){var o,a=st(this);1===this.nodeType&&(o=i?e.call(this,r,a.val()):e,null==o?o="":"number"==typeof o?o+="":st.isArray(o)&&(o=st.map(o,function(e){return null==e?"":e+""})),n=st.valHooks[this.type]||st.valHooks[this.nodeName.toLowerCase()],n&&"set"in n&&n.set(this,o,"value")!==t||(this.value=o))});if(o)return n=st.valHooks[o.type]||st.valHooks[o.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(o,"value"))!==t?r:(r=o.value,"string"==typeof r?r.replace(St,""):null==r?"":r)}}}),st.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(st.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&st.nodeName(n.parentNode,"optgroup"))){if(t=st(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=st.makeArray(t);return st(e).find("option").each(function(){this.selected=st.inArray(st(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return e.getAttribute===t?st.prop(e,n,r):(a=1!==s||!st.isXMLDoc(e),a&&(n=n.toLowerCase(),o=st.attrHooks[n]||(Dt.test(n)?kt:Ct)),r===t?o&&a&&"get"in o&&null!==(i=o.get(e,n))?i:(e.getAttribute!==t&&(i=e.getAttribute(n)),null==i?t:i):null!==r?o&&a&&"set"in o&&(i=o.set(e,r,n))!==t?i:(e.setAttribute(n,r+""),r):(st.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(lt);if(o&&1===e.nodeType)for(;n=o[i++];)r=st.propFix[n]||n,Dt.test(n)?!Ht&&Lt.test(n)?e[st.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:st.attr(e,n,""),e.removeAttribute(Ht?n:r)},attrHooks:{type:{set:function(e,t){if(!st.support.radioValue&&"radio"===t&&st.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!st.isXMLDoc(e),a&&(n=st.propFix[n]||n,o=st.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):At.test(e.nodeName)||jt.test(e.nodeName)&&e.href?0:t}}}}),kt={get:function(e,n){var r=st.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?Mt&&Ht?null!=i:Lt.test(n)?e[st.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?st.removeAttr(e,n):Mt&&Ht||!Lt.test(n)?e.setAttribute(!Ht&&st.propFix[n]||n,n):e[st.camelCase("default-"+n)]=e[n]=!0,n}},Mt&&Ht||(st.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return st.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t
2
1
  },set:function(e,n,r){return st.nodeName(e,"input")?(e.defaultValue=n,t):Ct&&Ct.set(e,n,r)}}),Ht||(Ct=st.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},st.attrHooks.contenteditable={get:Ct.get,set:function(e,t,n){Ct.set(e,""===t?!1:t,n)}},st.each(["width","height"],function(e,n){st.attrHooks[n]=st.extend(st.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),st.support.hrefNormalized||(st.each(["href","src","width","height"],function(e,n){st.attrHooks[n]=st.extend(st.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),st.each(["href","src"],function(e,t){st.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),st.support.style||(st.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),st.support.optSelected||(st.propHooks.selected=st.extend(st.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),st.support.enctype||(st.propFix.enctype="encoding"),st.support.checkOn||st.each(["radio","checkbox"],function(){st.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),st.each(["radio","checkbox"],function(){st.valHooks[this]=st.extend(st.valHooks[this],{set:function(e,n){return st.isArray(n)?e.checked=st.inArray(st(e).val(),n)>=0:t}})});var qt=/^(?:input|select|textarea)$/i,_t=/^key/,Ft=/^(?:mouse|contextmenu)|click/,Ot=/^(?:focusinfocus|focusoutblur)$/,Bt=/^([^.]*)(?:\.(.+)|)$/;st.event={global:{},add:function(e,n,r,i,o){var a,s,u,l,c,f,p,d,h,g,m,y=3!==e.nodeType&&8!==e.nodeType&&st._data(e);if(y){for(r.handler&&(a=r,r=a.handler,o=a.selector),r.guid||(r.guid=st.guid++),(l=y.events)||(l=y.events={}),(s=y.handle)||(s=y.handle=function(e){return st===t||e&&st.event.triggered===e.type?t:st.event.dispatch.apply(s.elem,arguments)},s.elem=e),n=(n||"").match(lt)||[""],c=n.length;c--;)u=Bt.exec(n[c])||[],h=m=u[1],g=(u[2]||"").split(".").sort(),p=st.event.special[h]||{},h=(o?p.delegateType:p.bindType)||h,p=st.event.special[h]||{},f=st.extend({type:h,origType:m,data:i,handler:r,guid:r.guid,selector:o,needsContext:o&&st.expr.match.needsContext.test(o),namespace:g.join(".")},a),(d=l[h])||(d=l[h]=[],d.delegateCount=0,p.setup&&p.setup.call(e,i,g,s)!==!1||(e.addEventListener?e.addEventListener(h,s,!1):e.attachEvent&&e.attachEvent("on"+h,s))),p.add&&(p.add.call(e,f),f.handler.guid||(f.handler.guid=r.guid)),o?d.splice(d.delegateCount++,0,f):d.push(f),st.event.global[h]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,m=st.hasData(e)&&st._data(e);if(m&&(u=m.events)){for(t=(t||"").match(lt)||[""],l=t.length;l--;)if(s=Bt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){for(f=st.event.special[d]||{},d=(r?f.delegateType:f.bindType)||d,p=u[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&f.teardown.call(e,h,m.handle)!==!1||st.removeEvent(e,d,m.handle),delete u[d])}else for(d in u)st.event.remove(e,d+t[l],n,r,!0);st.isEmptyObject(u)&&(delete m.handle,st._removeData(e,"events"))}},trigger:function(n,r,i,o){var a,s,u,l,c,f,p,d=[i||V],h=n.type||n,g=n.namespace?n.namespace.split("."):[];if(s=u=i=i||V,3!==i.nodeType&&8!==i.nodeType&&!Ot.test(h+st.event.triggered)&&(h.indexOf(".")>=0&&(g=h.split("."),h=g.shift(),g.sort()),c=0>h.indexOf(":")&&"on"+h,n=n[st.expando]?n:new st.Event(h,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=g.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:st.makeArray(r,[n]),p=st.event.special[h]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!st.isWindow(i)){for(l=p.delegateType||h,Ot.test(l+h)||(s=s.parentNode);s;s=s.parentNode)d.push(s),u=s;u===(i.ownerDocument||V)&&d.push(u.defaultView||u.parentWindow||e)}for(a=0;(s=d[a++])&&!n.isPropagationStopped();)n.type=a>1?l:p.bindType||h,f=(st._data(s,"events")||{})[n.type]&&st._data(s,"handle"),f&&f.apply(s,r),f=c&&s[c],f&&st.acceptData(s)&&f.apply&&f.apply(s,r)===!1&&n.preventDefault();if(n.type=h,!(o||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===h&&st.nodeName(i,"a")||!st.acceptData(i)||!c||!i[h]||st.isWindow(i))){u=i[c],u&&(i[c]=null),st.event.triggered=h;try{i[h]()}catch(m){}st.event.triggered=t,u&&(i[c]=u)}return n.result}},dispatch:function(e){e=st.event.fix(e);var n,r,i,o,a,s=[],u=nt.call(arguments),l=(st._data(this,"events")||{})[e.type]||[],c=st.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){for(s=st.event.handlers.call(this,e,l),n=0;(o=s[n++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,r=0;(a=o.handlers[r++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(a.namespace))&&(e.handleObj=a,e.data=a.data,i=((st.event.special[a.origType]||{}).handle||a.handler).apply(o.elem,u),i!==t&&(e.result=i)===!1&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(l.disabled!==!0||"click"!==e.type){for(i=[],r=0;u>r;r++)a=n[r],o=a.selector+" ",i[o]===t&&(i[o]=a.needsContext?st(o,this).index(l)>=0:st.find(o,this,null,[l]).length),i[o]&&i.push(a);i.length&&s.push({elem:l,handlers:i})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[st.expando])return e;var t,n,r=e,i=st.event.fixHooks[e.type]||{},o=i.props?this.props.concat(i.props):this.props;for(e=new st.Event(r),t=o.length;t--;)n=o[t],e[n]=r[n];return e.target||(e.target=r.srcElement||V),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,i.filter?i.filter(e,r):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,a=n.button,s=n.fromElement;return null==e.pageX&&null!=n.clientX&&(r=e.target.ownerDocument||V,i=r.documentElement,o=r.body,e.pageX=n.clientX+(i&&i.scrollLeft||o&&o.scrollLeft||0)-(i&&i.clientLeft||o&&o.clientLeft||0),e.pageY=n.clientY+(i&&i.scrollTop||o&&o.scrollTop||0)-(i&&i.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&s&&(e.relatedTarget=s===e.target?n.toElement:s),e.which||a===t||(e.which=1&a?1:2&a?3:4&a?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return st.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==V.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===V.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=st.extend(new st.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?st.event.trigger(i,null,t):st.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},st.removeEvent=V.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,n,r){var i="on"+n;e.detachEvent&&(e[i]===t&&(e[i]=null),e.detachEvent(i,r))},st.Event=function(e,n){return this instanceof st.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?u:l):this.type=e,n&&st.extend(this,n),this.timeStamp=e&&e.timeStamp||st.now(),this[st.expando]=!0,t):new st.Event(e,n)},st.Event.prototype={isDefaultPrevented:l,isPropagationStopped:l,isImmediatePropagationStopped:l,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=u,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=u,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u,this.stopPropagation()}},st.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){st.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!st.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),st.support.submitBubbles||(st.event.special.submit={setup:function(){return st.nodeName(this,"form")?!1:(st.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=st.nodeName(n,"input")||st.nodeName(n,"button")?n.form:t;r&&!st._data(r,"submitBubbles")&&(st.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),st._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&st.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return st.nodeName(this,"form")?!1:(st.event.remove(this,"._submit"),t)}}),st.support.changeBubbles||(st.event.special.change={setup:function(){return qt.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(st.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),st.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),st.event.simulate("change",this,e,!0)})),!1):(st.event.add(this,"beforeactivate._change",function(e){var t=e.target;qt.test(t.nodeName)&&!st._data(t,"changeBubbles")&&(st.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||st.event.simulate("change",this.parentNode,e,!0)}),st._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return st.event.remove(this,"._change"),!qt.test(this.nodeName)}}),st.support.focusinBubbles||st.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){st.event.simulate(t,e.target,st.event.fix(e),!0)};st.event.special[t]={setup:function(){0===n++&&V.addEventListener(e,r,!0)},teardown:function(){0===--n&&V.removeEventListener(e,r,!0)}}}),st.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(s in e)this.on(s,n,r,e[s],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=l;else if(!i)return this;return 1===o&&(a=i,i=function(e){return st().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=st.guid++)),this.each(function(){st.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,st(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=l),this.each(function(){st.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){st.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?st.event.trigger(e,n,r,!0):t},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),st.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){st.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)},_t.test(t)&&(st.event.fixHooks[t]=st.event.keyHooks),Ft.test(t)&&(st.event.fixHooks[t]=st.event.mouseHooks)}),function(e,t){function n(e){return ht.test(e+"")}function r(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>C.cacheLength&&delete e[t.shift()],e[n]=r}}function i(e){return e[P]=!0,e}function o(e){var t=L.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function a(e,t,n,r){var i,o,a,s,u,l,c,d,h,g;if((t?t.ownerDocument||t:R)!==L&&D(t),t=t||L,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!M&&!r){if(i=gt.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&O(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return Q.apply(n,K.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&W.getByClassName&&t.getElementsByClassName)return Q.apply(n,K.call(t.getElementsByClassName(a),0)),n}if(W.qsa&&!q.test(e)){if(c=!0,d=P,h=t,g=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(l=f(e),(c=t.getAttribute("id"))?d=c.replace(vt,"\\$&"):t.setAttribute("id",d),d="[id='"+d+"'] ",u=l.length;u--;)l[u]=d+p(l[u]);h=dt.test(e)&&t.parentNode||t,g=l.join(",")}if(g)try{return Q.apply(n,K.call(h.querySelectorAll(g),0)),n}catch(m){}finally{c||t.removeAttribute("id")}}}return x(e.replace(at,"$1"),t,n,r)}function s(e,t){for(var n=e&&t&&e.nextSibling;n;n=n.nextSibling)if(n===t)return-1;return e?1:-1}function u(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return i(function(t){return t=+t,i(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function f(e,t){var n,r,i,o,s,u,l,c=X[e+" "];if(c)return t?0:c.slice(0);for(s=e,u=[],l=C.preFilter;s;){(!n||(r=ut.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(i=[])),n=!1,(r=lt.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(at," ")}),s=s.slice(n.length));for(o in C.filter)!(r=pt[o].exec(s))||l[o]&&!(r=l[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?a.error(e):X(e,u).slice(0)}function p(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function d(e,t,n){var r=t.dir,i=n&&"parentNode"===t.dir,o=I++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,a){var s,u,l,c=$+" "+o;if(a){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||i)if(l=t[P]||(t[P]={}),(u=l[r])&&u[0]===c){if((s=u[1])===!0||s===N)return s===!0}else if(u=l[r]=[c],u[1]=e(t,n,a)||N,u[1]===!0)return!0}}function h(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function g(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function m(e,t,n,r,o,a){return r&&!r[P]&&(r=m(r)),o&&!o[P]&&(o=m(o,a)),i(function(i,a,s,u){var l,c,f,p=[],d=[],h=a.length,m=i||b(t||"*",s.nodeType?[s]:s,[]),y=!e||!i&&t?m:g(m,p,e,s,u),v=n?o||(i?e:h||r)?[]:a:y;if(n&&n(y,v,s,u),r)for(l=g(v,d),r(l,[],s,u),c=l.length;c--;)(f=l[c])&&(v[d[c]]=!(y[d[c]]=f));if(i){if(o||e){if(o){for(l=[],c=v.length;c--;)(f=v[c])&&l.push(y[c]=f);o(null,v=[],l,u)}for(c=v.length;c--;)(f=v[c])&&(l=o?Z.call(i,f):p[c])>-1&&(i[l]=!(a[l]=f))}}else v=g(v===a?v.splice(h,v.length):v),o?o(null,a,v,u):Q.apply(a,v)})}function y(e){for(var t,n,r,i=e.length,o=C.relative[e[0].type],a=o||C.relative[" "],s=o?1:0,u=d(function(e){return e===t},a,!0),l=d(function(e){return Z.call(t,e)>-1},a,!0),c=[function(e,n,r){return!o&&(r||n!==j)||((t=n).nodeType?u(e,n,r):l(e,n,r))}];i>s;s++)if(n=C.relative[e[s].type])c=[d(h(c),n)];else{if(n=C.filter[e[s].type].apply(null,e[s].matches),n[P]){for(r=++s;i>r&&!C.relative[e[r].type];r++);return m(s>1&&h(c),s>1&&p(e.slice(0,s-1)).replace(at,"$1"),n,r>s&&y(e.slice(s,r)),i>r&&y(e=e.slice(r)),i>r&&p(e))}c.push(n)}return h(c)}function v(e,t){var n=0,r=t.length>0,o=e.length>0,s=function(i,s,u,l,c){var f,p,d,h=[],m=0,y="0",v=i&&[],b=null!=c,x=j,T=i||o&&C.find.TAG("*",c&&s.parentNode||s),w=$+=null==x?1:Math.E;for(b&&(j=s!==L&&s,N=n);null!=(f=T[y]);y++){if(o&&f){for(p=0;d=e[p];p++)if(d(f,s,u)){l.push(f);break}b&&($=w,N=++n)}r&&((f=!d&&f)&&m--,i&&v.push(f))}if(m+=y,r&&y!==m){for(p=0;d=t[p];p++)d(v,h,s,u);if(i){if(m>0)for(;y--;)v[y]||h[y]||(h[y]=G.call(l));h=g(h)}Q.apply(l,h),b&&!i&&h.length>0&&m+t.length>1&&a.uniqueSort(l)}return b&&($=w,j=x),v};return r?i(s):s}function b(e,t,n){for(var r=0,i=t.length;i>r;r++)a(e,t[r],n);return n}function x(e,t,n,r){var i,o,a,s,u,l=f(e);if(!r&&1===l.length){if(o=l[0]=l[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&9===t.nodeType&&!M&&C.relative[o[1].type]){if(t=C.find.ID(a.matches[0].replace(xt,Tt),t)[0],!t)return n;e=e.slice(o.shift().value.length)}for(i=pt.needsContext.test(e)?-1:o.length-1;i>=0&&(a=o[i],!C.relative[s=a.type]);i--)if((u=C.find[s])&&(r=u(a.matches[0].replace(xt,Tt),dt.test(o[0].type)&&t.parentNode||t))){if(o.splice(i,1),e=r.length&&p(o),!e)return Q.apply(n,K.call(r,0)),n;break}}return S(e,l)(r,t,M,n,dt.test(e)),n}function T(){}var w,N,C,k,E,S,A,j,D,L,H,M,q,_,F,O,B,P="sizzle"+-new Date,R=e.document,W={},$=0,I=0,z=r(),X=r(),U=r(),V=typeof t,Y=1<<31,J=[],G=J.pop,Q=J.push,K=J.slice,Z=J.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},et="[\\x20\\t\\r\\n\\f]",tt="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",nt=tt.replace("w","w#"),rt="([*^$|!~]?=)",it="\\["+et+"*("+tt+")"+et+"*(?:"+rt+et+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+nt+")|)|)"+et+"*\\]",ot=":("+tt+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+it.replace(3,8)+")*)|.*)\\)|)",at=RegExp("^"+et+"+|((?:^|[^\\\\])(?:\\\\.)*)"+et+"+$","g"),ut=RegExp("^"+et+"*,"+et+"*"),lt=RegExp("^"+et+"*([\\x20\\t\\r\\n\\f>+~])"+et+"*"),ct=RegExp(ot),ft=RegExp("^"+nt+"$"),pt={ID:RegExp("^#("+tt+")"),CLASS:RegExp("^\\.("+tt+")"),NAME:RegExp("^\\[name=['\"]?("+tt+")['\"]?\\]"),TAG:RegExp("^("+tt.replace("w","w*")+")"),ATTR:RegExp("^"+it),PSEUDO:RegExp("^"+ot),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+et+"*(even|odd|(([+-]|)(\\d*)n|)"+et+"*(?:([+-]|)"+et+"*(\\d+)|))"+et+"*\\)|)","i"),needsContext:RegExp("^"+et+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+et+"*((?:-\\d)?\\d*)"+et+"*\\)|)(?=[^-]|$)","i")},dt=/[\x20\t\r\n\f]*[+~]/,ht=/\{\s*\[native code\]\s*\}/,gt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,mt=/^(?:input|select|textarea|button)$/i,yt=/^h\d$/i,vt=/'|\\/g,bt=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,xt=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,Tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{K.call(H.childNodes,0)[0].nodeType}catch(wt){K=function(e){for(var t,n=[];t=this[e];e++)n.push(t);return n}}E=a.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},D=a.setDocument=function(e){var r=e?e.ownerDocument||e:R;return r!==L&&9===r.nodeType&&r.documentElement?(L=r,H=r.documentElement,M=E(r),W.tagNameNoComments=o(function(e){return e.appendChild(r.createComment("")),!e.getElementsByTagName("*").length}),W.attributes=o(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),W.getByClassName=o(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),W.getByName=o(function(e){e.id=P+0,e.innerHTML="<a name='"+P+"'></a><div name='"+P+"'></div>",H.insertBefore(e,H.firstChild);var t=r.getElementsByName&&r.getElementsByName(P).length===2+r.getElementsByName(P+0).length;return W.getIdNotName=!r.getElementById(P),H.removeChild(e),t}),C.attrHandle=o(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==V&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},W.getIdNotName?(C.find.ID=function(e,t){if(typeof t.getElementById!==V&&!M){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},C.filter.ID=function(e){var t=e.replace(xt,Tt);return function(e){return e.getAttribute("id")===t}}):(C.find.ID=function(e,n){if(typeof n.getElementById!==V&&!M){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==V&&r.getAttributeNode("id").value===e?[r]:t:[]}},C.filter.ID=function(e){var t=e.replace(xt,Tt);return function(e){var n=typeof e.getAttributeNode!==V&&e.getAttributeNode("id");return n&&n.value===t}}),C.find.TAG=W.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==V?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i];i++)1===n.nodeType&&r.push(n);return r}return o},C.find.NAME=W.getByName&&function(e,n){return typeof n.getElementsByName!==V?n.getElementsByName(name):t},C.find.CLASS=W.getByClassName&&function(e,n){return typeof n.getElementsByClassName===V||M?t:n.getElementsByClassName(e)},_=[],q=[":focus"],(W.qsa=n(r.querySelectorAll))&&(o(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||q.push("\\["+et+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||q.push(":checked")}),o(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&q.push("[*^$]="+et+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),q.push(",.*:")})),(W.matchesSelector=n(F=H.matchesSelector||H.mozMatchesSelector||H.webkitMatchesSelector||H.oMatchesSelector||H.msMatchesSelector))&&o(function(e){W.disconnectedMatch=F.call(e,"div"),F.call(e,"[s!='']:x"),_.push("!=",ot)}),q=RegExp(q.join("|")),_=RegExp(_.join("|")),O=n(H.contains)||H.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},B=H.compareDocumentPosition?function(e,t){var n;return e===t?(A=!0,0):(n=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&n||e.parentNode&&11===e.parentNode.nodeType?e===r||O(R,e)?-1:t===r||O(R,t)?1:0:4&n?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var n,i=0,o=e.parentNode,a=t.parentNode,u=[e],l=[t];if(e===t)return A=!0,0;if(e.sourceIndex&&t.sourceIndex)return(~t.sourceIndex||Y)-(O(R,e)&&~e.sourceIndex||Y);if(!o||!a)return e===r?-1:t===r?1:o?-1:a?1:0;if(o===a)return s(e,t);for(n=e;n=n.parentNode;)u.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;u[i]===l[i];)i++;return i?s(u[i],l[i]):u[i]===R?-1:l[i]===R?1:0},A=!1,[0,0].sort(B),W.detectDuplicates=A,L):L},a.matches=function(e,t){return a(e,null,null,t)},a.matchesSelector=function(e,t){if((e.ownerDocument||e)!==L&&D(e),t=t.replace(bt,"='$1']"),!(!W.matchesSelector||M||_&&_.test(t)||q.test(t)))try{var n=F.call(e,t);if(n||W.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return a(t,L,null,[e]).length>0},a.contains=function(e,t){return(e.ownerDocument||e)!==L&&D(e),O(e,t)},a.attr=function(e,t){var n;return(e.ownerDocument||e)!==L&&D(e),M||(t=t.toLowerCase()),(n=C.attrHandle[t])?n(e):M||W.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},a.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},a.uniqueSort=function(e){var t,n=[],r=1,i=0;if(A=!W.detectDuplicates,e.sort(B),A){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return e},k=a.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=k(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=k(t);return n},C=a.selectors={cacheLength:50,createPseudo:i,match:pt,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(xt,Tt),e[3]=(e[4]||e[5]||"").replace(xt,Tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||a.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&a.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return pt.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&ct.test(n)&&(t=f(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(xt,Tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=z[e+" "];return t||(t=RegExp("(^|"+et+")"+e+"("+et+"|$)"))&&z(e,function(e){return t.test(e.className||typeof e.getAttribute!==V&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=a.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.substr(i.length-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){for(;g;){for(f=t;f=f[g];)if(s?f.nodeName.toLowerCase()===y:1===f.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){for(c=m[P]||(m[P]={}),l=c[e]||[],d=l[0]===$&&l[1],p=l[0]===$&&l[2],f=d&&m.childNodes[d];f=++d&&f&&f[g]||(p=d=0)||h.pop();)if(1===f.nodeType&&++p&&f===t){c[e]=[$,d,p];break}}else if(v&&(l=(t[P]||(t[P]={}))[e])&&l[0]===$)p=l[1];else for(;(f=++d&&f&&f[g]||(p=d=0)||h.pop())&&((s?f.nodeName.toLowerCase()!==y:1!==f.nodeType)||!++p||(v&&((f[P]||(f[P]={}))[e]=[$,p]),f!==t)););return p-=i,p===r||0===p%r&&p/r>=0}}},PSEUDO:function(e,t){var n,r=C.pseudos[e]||C.setFilters[e.toLowerCase()]||a.error("unsupported pseudo: "+e);return r[P]?r(t):r.length>1?(n=[e,e,"",t],C.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,n){for(var i,o=r(e,t),a=o.length;a--;)i=Z.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:i(function(e){var t=[],n=[],r=S(e.replace(at,"$1"));return r[P]?i(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:i(function(e){return function(t){return a(e,t).length>0}}),contains:i(function(e){return function(t){return(t.textContent||t.innerText||k(t)).indexOf(e)>-1}}),lang:i(function(e){return ft.test(e||"")||a.error("unsupported lang: "+e),e=e.replace(xt,Tt).toLowerCase(),function(t){var n;do if(n=M?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===H},focus:function(e){return e===L.activeElement&&(!L.hasFocus||L.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!C.pseudos.empty(e)},header:function(e){return yt.test(e.nodeName)},input:function(e){return mt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[0>n?n+t:n]}),even:c(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=0>n?n+t:n;t>++r;)e.push(r);return e})}};for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})C.pseudos[w]=u(w);for(w in{submit:!0,reset:!0})C.pseudos[w]=l(w);S=a.compile=function(e,t){var n,r=[],i=[],o=U[e+" "];if(!o){for(t||(t=f(e)),n=t.length;n--;)o=y(t[n]),o[P]?r.push(o):i.push(o);o=U(e,v(i,r))}return o},C.pseudos.nth=C.pseudos.eq,C.filters=T.prototype=C.pseudos,C.setFilters=new T,D(),a.attr=st.attr,st.find=a,st.expr=a.selectors,st.expr[":"]=st.expr.pseudos,st.unique=a.uniqueSort,st.text=a.getText,st.isXMLDoc=a.isXML,st.contains=a.contains}(e);var Pt=/Until$/,Rt=/^(?:parents|prev(?:Until|All))/,Wt=/^.[^:#\[\.,]*$/,$t=st.expr.match.needsContext,It={children:!0,contents:!0,next:!0,prev:!0};st.fn.extend({find:function(e){var t,n,r;if("string"!=typeof e)return r=this,this.pushStack(st(e).filter(function(){for(t=0;r.length>t;t++)if(st.contains(r[t],this))return!0}));for(n=[],t=0;this.length>t;t++)st.find(e,this[t],n);return n=this.pushStack(st.unique(n)),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=st(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(st.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(f(this,e,!1))},filter:function(e){return this.pushStack(f(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?$t.test(e)?st(e,this.context).index(this[0])>=0:st.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){for(var n,r=0,i=this.length,o=[],a=$t.test(e)||"string"!=typeof e?st(e,t||this.context):0;i>r;r++)for(n=this[r];n&&n.ownerDocument&&n!==t&&11!==n.nodeType;){if(a?a.index(n)>-1:st.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}return this.pushStack(o.length>1?st.unique(o):o)},index:function(e){return e?"string"==typeof e?st.inArray(this[0],st(e)):st.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?st(e,t):st.makeArray(e&&e.nodeType?[e]:e),r=st.merge(this.get(),n);return this.pushStack(st.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),st.fn.andSelf=st.fn.addBack,st.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return st.dir(e,"parentNode")},parentsUntil:function(e,t,n){return st.dir(e,"parentNode",n)},next:function(e){return c(e,"nextSibling")},prev:function(e){return c(e,"previousSibling")
3
2
  },nextAll:function(e){return st.dir(e,"nextSibling")},prevAll:function(e){return st.dir(e,"previousSibling")},nextUntil:function(e,t,n){return st.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return st.dir(e,"previousSibling",n)},siblings:function(e){return st.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return st.sibling(e.firstChild)},contents:function(e){return st.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:st.merge([],e.childNodes)}},function(e,t){st.fn[e]=function(n,r){var i=st.map(this,t,n);return Pt.test(e)||(r=n),r&&"string"==typeof r&&(i=st.filter(r,i)),i=this.length>1&&!It[e]?st.unique(i):i,this.length>1&&Rt.test(e)&&(i=i.reverse()),this.pushStack(i)}}),st.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?st.find.matchesSelector(t[0],e)?[t[0]]:[]:st.find.matches(e,t)},dir:function(e,n,r){for(var i=[],o=e[n];o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!st(o).is(r));)1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});var zt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Xt=/ jQuery\d+="(?:null|\d+)"/g,Ut=RegExp("<(?:"+zt+")[\\s/>]","i"),Vt=/^\s+/,Yt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Jt=/<([\w:]+)/,Gt=/<tbody/i,Qt=/<|&#?\w+;/,Kt=/<(?:script|style|link)/i,Zt=/^(?:checkbox|radio)$/i,en=/checked\s*(?:[^=]|=\s*.checked.)/i,tn=/^$|\/(?:java|ecma)script/i,nn=/^true\/(.*)/,rn=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,on={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:st.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},an=p(V),sn=an.appendChild(V.createElement("div"));on.optgroup=on.option,on.tbody=on.tfoot=on.colgroup=on.caption=on.thead,on.th=on.td,st.fn.extend({text:function(e){return st.access(this,function(e){return e===t?st.text(this):this.empty().append((this[0]&&this[0].ownerDocument||V).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(st.isFunction(e))return this.each(function(t){st(this).wrapAll(e.call(this,t))});if(this[0]){var t=st(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return st.isFunction(e)?this.each(function(t){st(this).wrapInner(e.call(this,t))}):this.each(function(){var t=st(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=st.isFunction(e);return this.each(function(n){st(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){st.nodeName(this,"body")||st(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,r=0;null!=(n=this[r]);r++)(!e||st.filter(e,[n]).length>0)&&(t||1!==n.nodeType||st.cleanData(b(n)),n.parentNode&&(t&&st.contains(n.ownerDocument,n)&&m(b(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&st.cleanData(b(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&st.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return st.clone(this,e,t)})},html:function(e){return st.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(Xt,""):t;if(!("string"!=typeof e||Kt.test(e)||!st.support.htmlSerialize&&Ut.test(e)||!st.support.leadingWhitespace&&Vt.test(e)||on[(Jt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(Yt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(st.cleanData(b(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=st.isFunction(e);return t||"string"==typeof e||(e=st(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;(n&&1===this.nodeType||11===this.nodeType)&&(st(this).remove(),t?t.parentNode.insertBefore(e,t):n.appendChild(e))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=et.apply([],e);var i,o,a,s,u,l,c=0,f=this.length,p=this,m=f-1,y=e[0],v=st.isFunction(y);if(v||!(1>=f||"string"!=typeof y||st.support.checkClone)&&en.test(y))return this.each(function(i){var o=p.eq(i);v&&(e[0]=y.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(f&&(i=st.buildFragment(e,this[0].ownerDocument,!1,this),o=i.firstChild,1===i.childNodes.length&&(i=o),o)){for(n=n&&st.nodeName(o,"tr"),a=st.map(b(i,"script"),h),s=a.length;f>c;c++)u=i,c!==m&&(u=st.clone(u,!0,!0),s&&st.merge(a,b(u,"script"))),r.call(n&&st.nodeName(this[c],"table")?d(this[c],"tbody"):this[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,st.map(a,g),c=0;s>c;c++)u=a[c],tn.test(u.type||"")&&!st._data(u,"globalEval")&&st.contains(l,u)&&(u.src?st.ajax({url:u.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):st.globalEval((u.text||u.textContent||u.innerHTML||"").replace(rn,"")));i=o=null}return this}}),st.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){st.fn[e]=function(e){for(var n,r=0,i=[],o=st(e),a=o.length-1;a>=r;r++)n=r===a?this:this.clone(!0),st(o[r])[t](n),tt.apply(i,n.get());return this.pushStack(i)}}),st.extend({clone:function(e,t,n){var r,i,o,a,s,u=st.contains(e.ownerDocument,e);if(st.support.html5Clone||st.isXMLDoc(e)||!Ut.test("<"+e.nodeName+">")?s=e.cloneNode(!0):(sn.innerHTML=e.outerHTML,sn.removeChild(s=sn.firstChild)),!(st.support.noCloneEvent&&st.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||st.isXMLDoc(e)))for(r=b(s),i=b(e),a=0;null!=(o=i[a]);++a)r[a]&&v(o,r[a]);if(t)if(n)for(i=i||b(e),r=r||b(s),a=0;null!=(o=i[a]);a++)y(o,r[a]);else y(e,s);return r=b(s,"script"),r.length>0&&m(r,!u&&b(e,"script")),r=i=o=null,s},buildFragment:function(e,t,n,r){for(var i,o,a,s,u,l,c,f=e.length,d=p(t),h=[],g=0;f>g;g++)if(o=e[g],o||0===o)if("object"===st.type(o))st.merge(h,o.nodeType?[o]:o);else if(Qt.test(o)){for(s=s||d.appendChild(t.createElement("div")),a=(Jt.exec(o)||["",""])[1].toLowerCase(),u=on[a]||on._default,s.innerHTML=u[1]+o.replace(Yt,"<$1></$2>")+u[2],c=u[0];c--;)s=s.lastChild;if(!st.support.leadingWhitespace&&Vt.test(o)&&h.push(t.createTextNode(Vt.exec(o)[0])),!st.support.tbody)for(o="table"!==a||Gt.test(o)?"<table>"!==u[1]||Gt.test(o)?0:s:s.firstChild,c=o&&o.childNodes.length;c--;)st.nodeName(l=o.childNodes[c],"tbody")&&!l.childNodes.length&&o.removeChild(l);for(st.merge(h,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=d.lastChild}else h.push(t.createTextNode(o));for(s&&d.removeChild(s),st.support.appendChecked||st.grep(b(h,"input"),x),g=0;o=h[g++];)if((!r||-1===st.inArray(o,r))&&(i=st.contains(o.ownerDocument,o),s=b(d.appendChild(o),"script"),i&&m(s),n))for(c=0;o=s[c++];)tn.test(o.type||"")&&n.push(o);return s=null,d},cleanData:function(e,n){for(var r,i,o,a,s=0,u=st.expando,l=st.cache,c=st.support.deleteExpando,f=st.event.special;null!=(o=e[s]);s++)if((n||st.acceptData(o))&&(i=o[u],r=i&&l[i])){if(r.events)for(a in r.events)f[a]?st.event.remove(o,a):st.removeEvent(o,a,r.handle);l[i]&&(delete l[i],c?delete o[u]:o.removeAttribute!==t?o.removeAttribute(u):o[u]=null,K.push(i))}}});var un,ln,cn,fn=/alpha\([^)]*\)/i,pn=/opacity\s*=\s*([^)]*)/,dn=/^(top|right|bottom|left)$/,hn=/^(none|table(?!-c[ea]).+)/,gn=/^margin/,mn=RegExp("^("+ut+")(.*)$","i"),yn=RegExp("^("+ut+")(?!px)[a-z%]+$","i"),vn=RegExp("^([+-])=("+ut+")","i"),bn={BODY:"block"},xn={position:"absolute",visibility:"hidden",display:"block"},Tn={letterSpacing:0,fontWeight:400},wn=["Top","Right","Bottom","Left"],Nn=["Webkit","O","Moz","ms"];st.fn.extend({css:function(e,n){return st.access(this,function(e,n,r){var i,o,a={},s=0;if(st.isArray(n)){for(i=ln(e),o=n.length;o>s;s++)a[n[s]]=st.css(e,n[s],!1,i);return a}return r!==t?st.style(e,n,r):st.css(e,n)},e,n,arguments.length>1)},show:function(){return N(this,!0)},hide:function(){return N(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:w(this))?st(this).show():st(this).hide()})}}),st.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=un(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":st.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=st.camelCase(n),l=e.style;if(n=st.cssProps[u]||(st.cssProps[u]=T(l,u)),s=st.cssHooks[n]||st.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=vn.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(st.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||st.cssNumber[u]||(r+="px"),st.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=st.camelCase(n);return n=st.cssProps[u]||(st.cssProps[u]=T(e.style,u)),s=st.cssHooks[n]||st.cssHooks[u],s&&"get"in s&&(o=s.get(e,!0,r)),o===t&&(o=un(e,n,i)),"normal"===o&&n in Tn&&(o=Tn[n]),r?(a=parseFloat(o),r===!0||st.isNumeric(a)?a||0:o):o},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(ln=function(t){return e.getComputedStyle(t,null)},un=function(e,n,r){var i,o,a,s=r||ln(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||st.contains(e.ownerDocument,e)||(u=st.style(e,n)),yn.test(u)&&gn.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):V.documentElement.currentStyle&&(ln=function(e){return e.currentStyle},un=function(e,n,r){var i,o,a,s=r||ln(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),yn.test(u)&&!dn.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u}),st.each(["height","width"],function(e,n){st.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&hn.test(st.css(e,"display"))?st.swap(e,xn,function(){return E(e,n,i)}):E(e,n,i):t},set:function(e,t,r){var i=r&&ln(e);return C(e,t,r?k(e,n,r,st.support.boxSizing&&"border-box"===st.css(e,"boxSizing",!1,i),i):0)}}}),st.support.opacity||(st.cssHooks.opacity={get:function(e,t){return pn.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=st.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===st.trim(o.replace(fn,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=fn.test(o)?o.replace(fn,i):o+" "+i)}}),st(function(){st.support.reliableMarginRight||(st.cssHooks.marginRight={get:function(e,n){return n?st.swap(e,{display:"inline-block"},un,[e,"marginRight"]):t}}),!st.support.pixelPosition&&st.fn.position&&st.each(["top","left"],function(e,n){st.cssHooks[n]={get:function(e,r){return r?(r=un(e,n),yn.test(r)?st(e).position()[n]+"px":r):t}}})}),st.expr&&st.expr.filters&&(st.expr.filters.hidden=function(e){return 0===e.offsetWidth&&0===e.offsetHeight||!st.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||st.css(e,"display"))},st.expr.filters.visible=function(e){return!st.expr.filters.hidden(e)}),st.each({margin:"",padding:"",border:"Width"},function(e,t){st.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];4>r;r++)i[e+wn[r]+t]=o[r]||o[r-2]||o[0];return i}},gn.test(e)||(st.cssHooks[e+t].set=C)});var Cn=/%20/g,kn=/\[\]$/,En=/\r?\n/g,Sn=/^(?:submit|button|image|reset)$/i,An=/^(?:input|select|textarea|keygen)/i;st.fn.extend({serialize:function(){return st.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=st.prop(this,"elements");return e?st.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!st(this).is(":disabled")&&An.test(this.nodeName)&&!Sn.test(e)&&(this.checked||!Zt.test(e))}).map(function(e,t){var n=st(this).val();return null==n?null:st.isArray(n)?st.map(n,function(e){return{name:t.name,value:e.replace(En,"\r\n")}}):{name:t.name,value:n.replace(En,"\r\n")}}).get()}}),st.param=function(e,n){var r,i=[],o=function(e,t){t=st.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=st.ajaxSettings&&st.ajaxSettings.traditional),st.isArray(e)||e.jquery&&!st.isPlainObject(e))st.each(e,function(){o(this.name,this.value)});else for(r in e)j(r,e[r],n,o);return i.join("&").replace(Cn,"+")};var jn,Dn,Ln=st.now(),Hn=/\?/,Mn=/#.*$/,qn=/([?&])_=[^&]*/,_n=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Fn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,On=/^(?:GET|HEAD)$/,Bn=/^\/\//,Pn=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Rn=st.fn.load,Wn={},$n={},In="*/".concat("*");try{Dn=Y.href}catch(zn){Dn=V.createElement("a"),Dn.href="",Dn=Dn.href}jn=Pn.exec(Dn.toLowerCase())||[],st.fn.load=function(e,n,r){if("string"!=typeof e&&Rn)return Rn.apply(this,arguments);var i,o,a,s=this,u=e.indexOf(" ");return u>=0&&(i=e.slice(u,e.length),e=e.slice(0,u)),st.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(o="POST"),s.length>0&&st.ajax({url:e,type:o,dataType:"html",data:n}).done(function(e){a=arguments,s.html(i?st("<div>").append(st.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,a||[e.responseText,t,e])}),this},st.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){st.fn[t]=function(e){return this.on(t,e)}}),st.each(["get","post"],function(e,n){st[n]=function(e,r,i,o){return st.isFunction(r)&&(o=o||i,i=r,r=t),st.ajax({url:e,type:n,dataType:o,data:r,success:i})}}),st.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Dn,type:"GET",isLocal:Fn.test(jn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":In,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":st.parseJSON,"text xml":st.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?H(H(e,st.ajaxSettings),t):H(st.ajaxSettings,e)},ajaxPrefilter:D(Wn),ajaxTransport:D($n),ajax:function(e,n){function r(e,n,r,s){var l,f,v,b,T,N=n;2!==x&&(x=2,u&&clearTimeout(u),i=t,a=s||"",w.readyState=e>0?4:0,r&&(b=M(p,w,r)),e>=200&&300>e||304===e?(p.ifModified&&(T=w.getResponseHeader("Last-Modified"),T&&(st.lastModified[o]=T),T=w.getResponseHeader("etag"),T&&(st.etag[o]=T)),304===e?(l=!0,N="notmodified"):(l=q(p,b),N=l.state,f=l.data,v=l.error,l=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),w.status=e,w.statusText=(n||N)+"",l?g.resolveWith(d,[f,N,w]):g.rejectWith(d,[w,N,v]),w.statusCode(y),y=t,c&&h.trigger(l?"ajaxSuccess":"ajaxError",[w,p,l?f:v]),m.fireWith(d,[w,N]),c&&(h.trigger("ajaxComplete",[w,p]),--st.active||st.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=t),n=n||{};var i,o,a,s,u,l,c,f,p=st.ajaxSetup({},n),d=p.context||p,h=p.context&&(d.nodeType||d.jquery)?st(d):st.event,g=st.Deferred(),m=st.Callbacks("once memory"),y=p.statusCode||{},v={},b={},x=0,T="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!s)for(s={};t=_n.exec(a);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=b[n]=b[n]||e,v[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)y[t]=[y[t],e[t]];else w.always(e[w.status]);return this},abort:function(e){var t=e||T;return i&&i.abort(t),r(0,t),this}};if(g.promise(w).complete=m.add,w.success=w.done,w.error=w.fail,p.url=((e||p.url||Dn)+"").replace(Mn,"").replace(Bn,jn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=st.trim(p.dataType||"*").toLowerCase().match(lt)||[""],null==p.crossDomain&&(l=Pn.exec(p.url.toLowerCase()),p.crossDomain=!(!l||l[1]===jn[1]&&l[2]===jn[2]&&(l[3]||("http:"===l[1]?80:443))==(jn[3]||("http:"===jn[1]?80:443)))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=st.param(p.data,p.traditional)),L(Wn,p,n,w),2===x)return w;c=p.global,c&&0===st.active++&&st.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!On.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(Hn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=qn.test(o)?o.replace(qn,"$1_="+Ln++):o+(Hn.test(o)?"&":"?")+"_="+Ln++)),p.ifModified&&(st.lastModified[o]&&w.setRequestHeader("If-Modified-Since",st.lastModified[o]),st.etag[o]&&w.setRequestHeader("If-None-Match",st.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&w.setRequestHeader("Content-Type",p.contentType),w.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+In+"; q=0.01":""):p.accepts["*"]);for(f in p.headers)w.setRequestHeader(f,p.headers[f]);if(p.beforeSend&&(p.beforeSend.call(d,w,p)===!1||2===x))return w.abort();T="abort";for(f in{success:1,error:1,complete:1})w[f](p[f]);if(i=L($n,p,n,w)){w.readyState=1,c&&h.trigger("ajaxSend",[w,p]),p.async&&p.timeout>0&&(u=setTimeout(function(){w.abort("timeout")},p.timeout));try{x=1,i.send(v,r)}catch(N){if(!(2>x))throw N;r(-1,N)}}else r(-1,"No Transport");return w},getScript:function(e,n){return st.get(e,t,n,"script")},getJSON:function(e,t,n){return st.get(e,t,n,"json")}}),st.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return st.globalEval(e),e}}}),st.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),st.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=V.head||st("head")[0]||V.documentElement;return{send:function(t,i){n=V.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Xn=[],Un=/(=)\?(?=&|$)|\?\?/;st.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xn.pop()||st.expando+"_"+Ln++;return this[e]=!0,e}}),st.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,u=n.jsonp!==!1&&(Un.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Un.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=st.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Un,"$1"+o):n.jsonp!==!1&&(n.url+=(Hn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||st.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Xn.push(o)),s&&st.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Vn,Yn,Jn=0,Gn=e.ActiveXObject&&function(){var e;for(e in Vn)Vn[e](t,!0)};st.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&_()||F()}:_,Yn=st.ajaxSettings.xhr(),st.support.cors=!!Yn&&"withCredentials"in Yn,Yn=st.support.ajax=!!Yn,Yn&&st.ajaxTransport(function(n){if(!n.crossDomain||st.support.cors){var r;return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,f,p;try{if(r&&(i||4===u.readyState))if(r=t,a&&(u.onreadystatechange=st.noop,Gn&&delete Vn[a]),i)4!==u.readyState&&u.abort();else{f={},s=u.status,p=u.responseXML,c=u.getAllResponseHeaders(),p&&p.documentElement&&(f.xml=p),"string"==typeof u.responseText&&(f.text=u.responseText);try{l=u.statusText}catch(d){l=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=f.text?200:404}}catch(h){i||o(-1,h)}f&&o(s,l,f,c)},n.async?4===u.readyState?setTimeout(r):(a=++Jn,Gn&&(Vn||(Vn={},st(e).unload(Gn)),Vn[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Qn,Kn,Zn=/^(?:toggle|show|hide)$/,er=RegExp("^(?:([+-])=|)("+ut+")([a-z%]*)$","i"),tr=/queueHooks$/,nr=[W],rr={"*":[function(e,t){var n,r,i=this.createTween(e,t),o=er.exec(t),a=i.cur(),s=+a||0,u=1,l=20;if(o){if(n=+o[2],r=o[3]||(st.cssNumber[e]?"":"px"),"px"!==r&&s){s=st.css(i.elem,e,!0)||n||1;do u=u||".5",s/=u,st.style(i.elem,e,s+r);while(u!==(u=i.cur()/a)&&1!==u&&--l)}i.unit=r,i.start=s,i.end=o[1]?s+(o[1]+1)*n:n}return i}]};st.Animation=st.extend(P,{tweener:function(e,t){st.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;i>r;r++)n=e[r],rr[n]=rr[n]||[],rr[n].unshift(t)},prefilter:function(e,t){t?nr.unshift(e):nr.push(e)}}),st.Tween=$,$.prototype={constructor:$,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(st.cssNumber[n]?"":"px")},cur:function(){var e=$.propHooks[this.prop];return e&&e.get?e.get(this):$.propHooks._default.get(this)},run:function(e){var t,n=$.propHooks[this.prop];return this.pos=t=this.options.duration?st.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):$.propHooks._default.set(this),this}},$.prototype.init.prototype=$.prototype,$.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=st.css(e.elem,e.prop,"auto"),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){st.fx.step[e.prop]?st.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[st.cssProps[e.prop]]||st.cssHooks[e.prop])?st.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},$.propHooks.scrollTop=$.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},st.each(["toggle","show","hide"],function(e,t){var n=st.fn[t];st.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(I(t,!0),e,r,i)}}),st.fn.extend({fadeTo:function(e,t,n,r){return this.filter(w).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=st.isEmptyObject(e),o=st.speed(t,n,r),a=function(){var t=P(this,st.extend({},e),o);a.finish=function(){t.stop(!0)},(i||st._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=st.timers,a=st._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&tr.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&st.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=st._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=st.timers,a=r?r.length:0;for(n.finish=!0,st.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),st.each({slideDown:I("show"),slideUp:I("hide"),slideToggle:I("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){st.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),st.speed=function(e,t,n){var r=e&&"object"==typeof e?st.extend({},e):{complete:n||!n&&t||st.isFunction(e)&&e,duration:e,easing:n&&t||t&&!st.isFunction(t)&&t};return r.duration=st.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in st.fx.speeds?st.fx.speeds[r.duration]:st.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){st.isFunction(r.old)&&r.old.call(this),r.queue&&st.dequeue(this,r.queue)},r},st.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},st.timers=[],st.fx=$.prototype.init,st.fx.tick=function(){var e,n=st.timers,r=0;for(Qn=st.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||st.fx.stop(),Qn=t},st.fx.timer=function(e){e()&&st.timers.push(e)&&st.fx.start()},st.fx.interval=13,st.fx.start=function(){Kn||(Kn=setInterval(st.fx.tick,st.fx.interval))},st.fx.stop=function(){clearInterval(Kn),Kn=null},st.fx.speeds={slow:600,fast:200,_default:400},st.fx.step={},st.expr&&st.expr.filters&&(st.expr.filters.animated=function(e){return st.grep(st.timers,function(t){return e===t.elem}).length}),st.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){st.offset.setOffset(this,e,t)});var n,r,i={top:0,left:0},o=this[0],a=o&&o.ownerDocument;if(a)return n=a.documentElement,st.contains(n,o)?(o.getBoundingClientRect!==t&&(i=o.getBoundingClientRect()),r=z(a),{top:i.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:i.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):i},st.offset={setOffset:function(e,t,n){var r=st.css(e,"position");"static"===r&&(e.style.position="relative");var i,o,a=st(e),s=a.offset(),u=st.css(e,"top"),l=st.css(e,"left"),c=("absolute"===r||"fixed"===r)&&st.inArray("auto",[u,l])>-1,f={},p={};c?(p=a.position(),i=p.top,o=p.left):(i=parseFloat(u)||0,o=parseFloat(l)||0),st.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(f.top=t.top-s.top+i),null!=t.left&&(f.left=t.left-s.left+o),"using"in t?t.using.call(e,f):a.css(f)}},st.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===st.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),st.nodeName(e[0],"html")||(n=e.offset()),n.top+=st.css(e[0],"borderTopWidth",!0),n.left+=st.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-st.css(r,"marginTop",!0),left:t.left-n.left-st.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||V.documentElement;e&&!st.nodeName(e,"html")&&"static"===st.css(e,"position");)e=e.offsetParent;return e||V.documentElement})}}),st.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);st.fn[e]=function(i){return st.access(this,function(e,i,o){var a=z(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?st(a).scrollLeft():o,r?o:st(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}}),st.each({Height:"height",Width:"width"},function(e,n){st.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){st.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return st.access(this,function(n,r,i){var o;return st.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?st.css(n,r,s):st.style(n,r,i,s)},n,a?i:t,a,null)}})}),e.jQuery=e.$=st,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return st})})(window);
4
3
  //@ sourceMappingURL=jquery.min.map
@@ -0,0 +1,196 @@
1
+ CodeMirror.defineMode("ruby", function(config) {
2
+ function wordObj(words) {
3
+ var o = {};
4
+ for (var i = 0, e = words.length; i < e; ++i) o[words[i]] = true;
5
+ return o;
6
+ }
7
+ var keywords = wordObj([
8
+ "alias", "and", "BEGIN", "begin", "break", "case", "class", "def", "defined?", "do", "else",
9
+ "elsif", "END", "end", "ensure", "false", "for", "if", "in", "module", "next", "not", "or",
10
+ "redo", "rescue", "retry", "return", "self", "super", "then", "true", "undef", "unless",
11
+ "until", "when", "while", "yield", "nil", "raise", "throw", "catch", "fail", "loop", "callcc",
12
+ "caller", "lambda", "proc", "public", "protected", "private", "require", "load",
13
+ "require_relative", "extend", "autoload"
14
+ ]);
15
+ var indentWords = wordObj(["def", "class", "case", "for", "while", "do", "module", "then",
16
+ "catch", "loop", "proc", "begin"]);
17
+ var dedentWords = wordObj(["end", "until"]);
18
+ var matching = {"[": "]", "{": "}", "(": ")"};
19
+ var curPunc;
20
+
21
+ function chain(newtok, stream, state) {
22
+ state.tokenize.push(newtok);
23
+ return newtok(stream, state);
24
+ }
25
+
26
+ function tokenBase(stream, state) {
27
+ curPunc = null;
28
+ if (stream.sol() && stream.match("=begin") && stream.eol()) {
29
+ state.tokenize.push(readBlockComment);
30
+ return "comment";
31
+ }
32
+ if (stream.eatSpace()) return null;
33
+ var ch = stream.next(), m;
34
+ if (ch == "`" || ch == "'" || ch == '"' ||
35
+ (ch == "/" && !stream.eol() && stream.peek() != " ")) {
36
+ return chain(readQuoted(ch, "string", ch == '"' || ch == "`"), stream, state);
37
+ } else if (ch == "%") {
38
+ var style, embed = false;
39
+ if (stream.eat("s")) style = "atom";
40
+ else if (stream.eat(/[WQ]/)) { style = "string"; embed = true; }
41
+ else if (stream.eat(/[wxqr]/)) style = "string";
42
+ var delim = stream.eat(/[^\w\s]/);
43
+ if (!delim) return "operator";
44
+ if (matching.propertyIsEnumerable(delim)) delim = matching[delim];
45
+ return chain(readQuoted(delim, style, embed, true), stream, state);
46
+ } else if (ch == "#") {
47
+ stream.skipToEnd();
48
+ return "comment";
49
+ } else if (ch == "<" && (m = stream.match(/^<-?[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/))) {
50
+ return chain(readHereDoc(m[1]), stream, state);
51
+ } else if (ch == "0") {
52
+ if (stream.eat("x")) stream.eatWhile(/[\da-fA-F]/);
53
+ else if (stream.eat("b")) stream.eatWhile(/[01]/);
54
+ else stream.eatWhile(/[0-7]/);
55
+ return "number";
56
+ } else if (/\d/.test(ch)) {
57
+ stream.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+\-]?[\d_]+)?/);
58
+ return "number";
59
+ } else if (ch == "?") {
60
+ while (stream.match(/^\\[CM]-/)) {}
61
+ if (stream.eat("\\")) stream.eatWhile(/\w/);
62
+ else stream.next();
63
+ return "string";
64
+ } else if (ch == ":") {
65
+ if (stream.eat("'")) return chain(readQuoted("'", "atom", false), stream, state);
66
+ if (stream.eat('"')) return chain(readQuoted('"', "atom", true), stream, state);
67
+ stream.eatWhile(/[\w\?]/);
68
+ return "atom";
69
+ } else if (ch == "@") {
70
+ stream.eat("@");
71
+ stream.eatWhile(/[\w\?]/);
72
+ return "variable-2";
73
+ } else if (ch == "$") {
74
+ stream.next();
75
+ stream.eatWhile(/[\w\?]/);
76
+ return "variable-3";
77
+ } else if (/\w/.test(ch)) {
78
+ stream.eatWhile(/[\w\?]/);
79
+ if (stream.eat(":")) return "atom";
80
+ return "ident";
81
+ } else if (ch == "|" && (state.varList || state.lastTok == "{" || state.lastTok == "do")) {
82
+ curPunc = "|";
83
+ return null;
84
+ } else if (/[\(\)\[\]{}\\;]/.test(ch)) {
85
+ curPunc = ch;
86
+ return null;
87
+ } else if (ch == "-" && stream.eat(">")) {
88
+ return "arrow";
89
+ } else if (/[=+\-\/*:\.^%<>~|]/.test(ch)) {
90
+ stream.eatWhile(/[=+\-\/*:\.^%<>~|]/);
91
+ return "operator";
92
+ } else {
93
+ return null;
94
+ }
95
+ }
96
+
97
+ function tokenBaseUntilBrace() {
98
+ var depth = 1;
99
+ return function(stream, state) {
100
+ if (stream.peek() == "}") {
101
+ depth--;
102
+ if (depth == 0) {
103
+ state.tokenize.pop();
104
+ return state.tokenize[state.tokenize.length-1](stream, state);
105
+ }
106
+ } else if (stream.peek() == "{") {
107
+ depth++;
108
+ }
109
+ return tokenBase(stream, state);
110
+ };
111
+ }
112
+ function readQuoted(quote, style, embed, unescaped) {
113
+ return function(stream, state) {
114
+ var escaped = false, ch;
115
+ while ((ch = stream.next()) != null) {
116
+ if (ch == quote && (unescaped || !escaped)) {
117
+ state.tokenize.pop();
118
+ break;
119
+ }
120
+ if (embed && ch == "#" && !escaped && stream.eat("{")) {
121
+ state.tokenize.push(tokenBaseUntilBrace(arguments.callee));
122
+ break;
123
+ }
124
+ escaped = !escaped && ch == "\\";
125
+ }
126
+ return style;
127
+ };
128
+ }
129
+ function readHereDoc(phrase) {
130
+ return function(stream, state) {
131
+ if (stream.match(phrase)) state.tokenize.pop();
132
+ else stream.skipToEnd();
133
+ return "string";
134
+ };
135
+ }
136
+ function readBlockComment(stream, state) {
137
+ if (stream.sol() && stream.match("=end") && stream.eol())
138
+ state.tokenize.pop();
139
+ stream.skipToEnd();
140
+ return "comment";
141
+ }
142
+
143
+ return {
144
+ startState: function() {
145
+ return {tokenize: [tokenBase],
146
+ indented: 0,
147
+ context: {type: "top", indented: -config.indentUnit},
148
+ continuedLine: false,
149
+ lastTok: null,
150
+ varList: false};
151
+ },
152
+
153
+ token: function(stream, state) {
154
+ if (stream.sol()) state.indented = stream.indentation();
155
+ var style = state.tokenize[state.tokenize.length-1](stream, state), kwtype;
156
+ if (style == "ident") {
157
+ var word = stream.current();
158
+ style = keywords.propertyIsEnumerable(stream.current()) ? "keyword"
159
+ : /^[A-Z]/.test(word) ? "tag"
160
+ : (state.lastTok == "def" || state.lastTok == "class" || state.varList) ? "def"
161
+ : "variable";
162
+ if (indentWords.propertyIsEnumerable(word)) kwtype = "indent";
163
+ else if (dedentWords.propertyIsEnumerable(word)) kwtype = "dedent";
164
+ else if ((word == "if" || word == "unless") && stream.column() == stream.indentation())
165
+ kwtype = "indent";
166
+ }
167
+ if (curPunc || (style && style != "comment")) state.lastTok = word || curPunc || style;
168
+ if (curPunc == "|") state.varList = !state.varList;
169
+
170
+ if (kwtype == "indent" || /[\(\[\{]/.test(curPunc))
171
+ state.context = {prev: state.context, type: curPunc || style, indented: state.indented};
172
+ else if ((kwtype == "dedent" || /[\)\]\}]/.test(curPunc)) && state.context.prev)
173
+ state.context = state.context.prev;
174
+
175
+ if (stream.eol())
176
+ state.continuedLine = (curPunc == "\\" || style == "operator");
177
+ return style;
178
+ },
179
+
180
+ indent: function(state, textAfter) {
181
+ if (state.tokenize[state.tokenize.length-1] != tokenBase) return 0;
182
+ var firstChar = textAfter && textAfter.charAt(0);
183
+ var ct = state.context;
184
+ var closing = ct.type == matching[firstChar] ||
185
+ ct.type == "keyword" && /^(?:end|until|else|elsif|when|rescue)\b/.test(textAfter);
186
+ return ct.indented + (closing ? 0 : config.indentUnit) +
187
+ (state.continuedLine ? config.indentUnit : 0);
188
+ },
189
+ electricChars: "}de" // enD and rescuE
190
+
191
+ };
192
+ });
193
+
194
+ CodeMirror.defineMIME("text/x-ruby", "ruby");
195
+
196
+
@@ -1,28 +1,37 @@
1
1
  /*!
2
- * jQuery JavaScript Library v1.8.3
2
+ * jQuery JavaScript Library v1.9.1
3
3
  * http://jquery.com/
4
4
  *
5
5
  * Includes Sizzle.js
6
6
  * http://sizzlejs.com/
7
7
  *
8
- * Copyright 2012 jQuery Foundation and other contributors
8
+ * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors
9
9
  * Released under the MIT license
10
10
  * http://jquery.org/license
11
11
  *
12
- * Date: Tue Nov 13 2012 08:20:33 GMT-0500 (Eastern Standard Time)
12
+ * Date: 2013-2-4
13
13
  */
14
14
  (function( window, undefined ) {
15
+
16
+ // Can't do this because several apps including ASP.NET trace
17
+ // the stack via arguments.caller.callee and Firefox dies if
18
+ // you try to trace through "use strict" call chains. (#13335)
19
+ // Support: Firefox 18+
20
+ //"use strict";
15
21
  var
22
+ // The deferred used on DOM ready
23
+ readyList,
24
+
16
25
  // A central reference to the root jQuery(document)
17
26
  rootjQuery,
18
27
 
19
- // The deferred used on DOM ready
20
- readyList,
28
+ // Support: IE<9
29
+ // For `typeof node.method` instead of `node.method !== undefined`
30
+ core_strundefined = typeof undefined,
21
31
 
22
32
  // Use the correct document accordingly with window argument (sandbox)
23
33
  document = window.document,
24
34
  location = window.location,
25
- navigator = window.navigator,
26
35
 
27
36
  // Map over jQuery in case of overwrite
28
37
  _jQuery = window.jQuery,
@@ -30,13 +39,22 @@ var
30
39
  // Map over the $ in case of overwrite
31
40
  _$ = window.$,
32
41
 
42
+ // [[Class]] -> type pairs
43
+ class2type = {},
44
+
45
+ // List of deleted data cache ids, so we can reuse them
46
+ core_deletedIds = [],
47
+
48
+ core_version = "1.9.1",
49
+
33
50
  // Save a reference to some core methods
34
- core_push = Array.prototype.push,
35
- core_slice = Array.prototype.slice,
36
- core_indexOf = Array.prototype.indexOf,
37
- core_toString = Object.prototype.toString,
38
- core_hasOwn = Object.prototype.hasOwnProperty,
39
- core_trim = String.prototype.trim,
51
+ core_concat = core_deletedIds.concat,
52
+ core_push = core_deletedIds.push,
53
+ core_slice = core_deletedIds.slice,
54
+ core_indexOf = core_deletedIds.indexOf,
55
+ core_toString = class2type.toString,
56
+ core_hasOwn = class2type.hasOwnProperty,
57
+ core_trim = core_version.trim,
40
58
 
41
59
  // Define a local copy of jQuery
42
60
  jQuery = function( selector, context ) {
@@ -45,18 +63,18 @@ var
45
63
  },
46
64
 
47
65
  // Used for matching numbers
48
- core_pnum = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,
66
+ core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
49
67
 
50
- // Used for detecting and trimming whitespace
51
- core_rnotwhite = /\S/,
52
- core_rspace = /\s+/,
68
+ // Used for splitting on whitespace
69
+ core_rnotwhite = /\S+/g,
53
70
 
54
71
  // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
55
72
  rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
56
73
 
57
74
  // A simple way to check for HTML strings
58
75
  // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
59
- rquickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
76
+ // Strict HTML recognition (#11290: must start with <)
77
+ rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,
60
78
 
61
79
  // Match a standalone tag
62
80
  rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
@@ -65,7 +83,7 @@ var
65
83
  rvalidchars = /^[\],:{}\s]*$/,
66
84
  rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
67
85
  rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
68
- rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,
86
+ rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,
69
87
 
70
88
  // Matches dashed string for camelizing
71
89
  rmsPrefix = /^-ms-/,
@@ -73,42 +91,43 @@ var
73
91
 
74
92
  // Used by jQuery.camelCase as callback to replace()
75
93
  fcamelCase = function( all, letter ) {
76
- return ( letter + "" ).toUpperCase();
94
+ return letter.toUpperCase();
77
95
  },
78
96
 
79
- // The ready event handler and self cleanup method
80
- DOMContentLoaded = function() {
81
- if ( document.addEventListener ) {
82
- document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
83
- jQuery.ready();
84
- } else if ( document.readyState === "complete" ) {
85
- // we're here because readyState === "complete" in oldIE
86
- // which is good enough for us to call the dom ready!
87
- document.detachEvent( "onreadystatechange", DOMContentLoaded );
97
+ // The ready event handler
98
+ completed = function( event ) {
99
+
100
+ // readyState === "complete" is good enough for us to call the dom ready in oldIE
101
+ if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) {
102
+ detach();
88
103
  jQuery.ready();
89
104
  }
90
105
  },
106
+ // Clean-up method for dom ready events
107
+ detach = function() {
108
+ if ( document.addEventListener ) {
109
+ document.removeEventListener( "DOMContentLoaded", completed, false );
110
+ window.removeEventListener( "load", completed, false );
91
111
 
92
- // [[Class]] -> type pairs
93
- class2type = {};
112
+ } else {
113
+ document.detachEvent( "onreadystatechange", completed );
114
+ window.detachEvent( "onload", completed );
115
+ }
116
+ };
94
117
 
95
118
  jQuery.fn = jQuery.prototype = {
119
+ // The current version of jQuery being used
120
+ jquery: core_version,
121
+
96
122
  constructor: jQuery,
97
123
  init: function( selector, context, rootjQuery ) {
98
- var match, elem, ret, doc;
124
+ var match, elem;
99
125
 
100
- // Handle $(""), $(null), $(undefined), $(false)
126
+ // HANDLE: $(""), $(null), $(undefined), $(false)
101
127
  if ( !selector ) {
102
128
  return this;
103
129
  }
104
130
 
105
- // Handle $(DOMElement)
106
- if ( selector.nodeType ) {
107
- this.context = this[0] = selector;
108
- this.length = 1;
109
- return this;
110
- }
111
-
112
131
  // Handle HTML strings
113
132
  if ( typeof selector === "string" ) {
114
133
  if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
@@ -125,15 +144,29 @@ jQuery.fn = jQuery.prototype = {
125
144
  // HANDLE: $(html) -> $(array)
126
145
  if ( match[1] ) {
127
146
  context = context instanceof jQuery ? context[0] : context;
128
- doc = ( context && context.nodeType ? context.ownerDocument || context : document );
129
147
 
130
148
  // scripts is true for back-compat
131
- selector = jQuery.parseHTML( match[1], doc, true );
149
+ jQuery.merge( this, jQuery.parseHTML(
150
+ match[1],
151
+ context && context.nodeType ? context.ownerDocument || context : document,
152
+ true
153
+ ) );
154
+
155
+ // HANDLE: $(html, props)
132
156
  if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
133
- this.attr.call( selector, context, true );
157
+ for ( match in context ) {
158
+ // Properties of context are called as methods if possible
159
+ if ( jQuery.isFunction( this[ match ] ) ) {
160
+ this[ match ]( context[ match ] );
161
+
162
+ // ...and otherwise set as attributes
163
+ } else {
164
+ this.attr( match, context[ match ] );
165
+ }
166
+ }
134
167
  }
135
168
 
136
- return jQuery.merge( this, selector );
169
+ return this;
137
170
 
138
171
  // HANDLE: $(#id)
139
172
  } else {
@@ -168,6 +201,12 @@ jQuery.fn = jQuery.prototype = {
168
201
  return this.constructor( context ).find( selector );
169
202
  }
170
203
 
204
+ // HANDLE: $(DOMElement)
205
+ } else if ( selector.nodeType ) {
206
+ this.context = this[0] = selector;
207
+ this.length = 1;
208
+ return this;
209
+
171
210
  // HANDLE: $(function)
172
211
  // Shortcut for document ready
173
212
  } else if ( jQuery.isFunction( selector ) ) {
@@ -185,9 +224,6 @@ jQuery.fn = jQuery.prototype = {
185
224
  // Start with an empty selector
186
225
  selector: "",
187
226
 
188
- // The current version of jQuery being used
189
- jquery: "1.8.3",
190
-
191
227
  // The default length of a jQuery object is 0
192
228
  length: 0,
193
229
 
@@ -214,22 +250,15 @@ jQuery.fn = jQuery.prototype = {
214
250
 
215
251
  // Take an array of elements and push it onto the stack
216
252
  // (returning the new matched element set)
217
- pushStack: function( elems, name, selector ) {
253
+ pushStack: function( elems ) {
218
254
 
219
255
  // Build a new jQuery matched element set
220
256
  var ret = jQuery.merge( this.constructor(), elems );
221
257
 
222
258
  // Add the old object onto the stack (as a reference)
223
259
  ret.prevObject = this;
224
-
225
260
  ret.context = this.context;
226
261
 
227
- if ( name === "find" ) {
228
- ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
229
- } else if ( name ) {
230
- ret.selector = this.selector + "." + name + "(" + selector + ")";
231
- }
232
-
233
262
  // Return the newly-formed element set
234
263
  return ret;
235
264
  },
@@ -248,11 +277,8 @@ jQuery.fn = jQuery.prototype = {
248
277
  return this;
249
278
  },
250
279
 
251
- eq: function( i ) {
252
- i = +i;
253
- return i === -1 ?
254
- this.slice( i ) :
255
- this.slice( i, i + 1 );
280
+ slice: function() {
281
+ return this.pushStack( core_slice.apply( this, arguments ) );
256
282
  },
257
283
 
258
284
  first: function() {
@@ -263,9 +289,10 @@ jQuery.fn = jQuery.prototype = {
263
289
  return this.eq( -1 );
264
290
  },
265
291
 
266
- slice: function() {
267
- return this.pushStack( core_slice.apply( this, arguments ),
268
- "slice", core_slice.call(arguments).join(",") );
292
+ eq: function( i ) {
293
+ var len = this.length,
294
+ j = +i + ( i < 0 ? len : 0 );
295
+ return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
269
296
  },
270
297
 
271
298
  map: function( callback ) {
@@ -289,7 +316,7 @@ jQuery.fn = jQuery.prototype = {
289
316
  jQuery.fn.init.prototype = jQuery.fn;
290
317
 
291
318
  jQuery.extend = jQuery.fn.extend = function() {
292
- var options, name, src, copy, copyIsArray, clone,
319
+ var src, copyIsArray, copy, name, options, clone,
293
320
  target = arguments[0] || {},
294
321
  i = 1,
295
322
  length = arguments.length,
@@ -391,7 +418,7 @@ jQuery.extend({
391
418
 
392
419
  // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
393
420
  if ( !document.body ) {
394
- return setTimeout( jQuery.ready, 1 );
421
+ return setTimeout( jQuery.ready );
395
422
  }
396
423
 
397
424
  // Remember that the DOM is ready
@@ -431,9 +458,12 @@ jQuery.extend({
431
458
  },
432
459
 
433
460
  type: function( obj ) {
434
- return obj == null ?
435
- String( obj ) :
436
- class2type[ core_toString.call(obj) ] || "object";
461
+ if ( obj == null ) {
462
+ return String( obj );
463
+ }
464
+ return typeof obj === "object" || typeof obj === "function" ?
465
+ class2type[ core_toString.call(obj) ] || "object" :
466
+ typeof obj;
437
467
  },
438
468
 
439
469
  isPlainObject: function( obj ) {
@@ -479,50 +509,59 @@ jQuery.extend({
479
509
 
480
510
  // data: string of html
481
511
  // context (optional): If specified, the fragment will be created in this context, defaults to document
482
- // scripts (optional): If true, will include scripts passed in the html string
483
- parseHTML: function( data, context, scripts ) {
484
- var parsed;
512
+ // keepScripts (optional): If true, will include scripts passed in the html string
513
+ parseHTML: function( data, context, keepScripts ) {
485
514
  if ( !data || typeof data !== "string" ) {
486
515
  return null;
487
516
  }
488
517
  if ( typeof context === "boolean" ) {
489
- scripts = context;
490
- context = 0;
518
+ keepScripts = context;
519
+ context = false;
491
520
  }
492
521
  context = context || document;
493
522
 
523
+ var parsed = rsingleTag.exec( data ),
524
+ scripts = !keepScripts && [];
525
+
494
526
  // Single tag
495
- if ( (parsed = rsingleTag.exec( data )) ) {
527
+ if ( parsed ) {
496
528
  return [ context.createElement( parsed[1] ) ];
497
529
  }
498
530
 
499
- parsed = jQuery.buildFragment( [ data ], context, scripts ? null : [] );
500
- return jQuery.merge( [],
501
- (parsed.cacheable ? jQuery.clone( parsed.fragment ) : parsed.fragment).childNodes );
531
+ parsed = jQuery.buildFragment( [ data ], context, scripts );
532
+ if ( scripts ) {
533
+ jQuery( scripts ).remove();
534
+ }
535
+ return jQuery.merge( [], parsed.childNodes );
502
536
  },
503
537
 
504
538
  parseJSON: function( data ) {
505
- if ( !data || typeof data !== "string") {
506
- return null;
507
- }
508
-
509
- // Make sure leading/trailing whitespace is removed (IE can't handle it)
510
- data = jQuery.trim( data );
511
-
512
539
  // Attempt to parse using the native JSON parser first
513
540
  if ( window.JSON && window.JSON.parse ) {
514
541
  return window.JSON.parse( data );
515
542
  }
516
543
 
517
- // Make sure the incoming data is actual JSON
518
- // Logic borrowed from http://json.org/json2.js
519
- if ( rvalidchars.test( data.replace( rvalidescape, "@" )
520
- .replace( rvalidtokens, "]" )
521
- .replace( rvalidbraces, "")) ) {
544
+ if ( data === null ) {
545
+ return data;
546
+ }
547
+
548
+ if ( typeof data === "string" ) {
549
+
550
+ // Make sure leading/trailing whitespace is removed (IE can't handle it)
551
+ data = jQuery.trim( data );
522
552
 
523
- return ( new Function( "return " + data ) )();
553
+ if ( data ) {
554
+ // Make sure the incoming data is actual JSON
555
+ // Logic borrowed from http://json.org/json2.js
556
+ if ( rvalidchars.test( data.replace( rvalidescape, "@" )
557
+ .replace( rvalidtokens, "]" )
558
+ .replace( rvalidbraces, "")) ) {
524
559
 
560
+ return ( new Function( "return " + data ) )();
561
+ }
562
+ }
525
563
  }
564
+
526
565
  jQuery.error( "Invalid JSON: " + data );
527
566
  },
528
567
 
@@ -556,7 +595,7 @@ jQuery.extend({
556
595
  // Workarounds based on findings by Jim Driscoll
557
596
  // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
558
597
  globalEval: function( data ) {
559
- if ( data && core_rnotwhite.test( data ) ) {
598
+ if ( data && jQuery.trim( data ) ) {
560
599
  // We use execScript on Internet Explorer
561
600
  // We use an anonymous function so that context is window
562
601
  // rather than jQuery in Firefox
@@ -578,21 +617,25 @@ jQuery.extend({
578
617
 
579
618
  // args is for internal usage only
580
619
  each: function( obj, callback, args ) {
581
- var name,
620
+ var value,
582
621
  i = 0,
583
622
  length = obj.length,
584
- isObj = length === undefined || jQuery.isFunction( obj );
623
+ isArray = isArraylike( obj );
585
624
 
586
625
  if ( args ) {
587
- if ( isObj ) {
588
- for ( name in obj ) {
589
- if ( callback.apply( obj[ name ], args ) === false ) {
626
+ if ( isArray ) {
627
+ for ( ; i < length; i++ ) {
628
+ value = callback.apply( obj[ i ], args );
629
+
630
+ if ( value === false ) {
590
631
  break;
591
632
  }
592
633
  }
593
634
  } else {
594
- for ( ; i < length; ) {
595
- if ( callback.apply( obj[ i++ ], args ) === false ) {
635
+ for ( i in obj ) {
636
+ value = callback.apply( obj[ i ], args );
637
+
638
+ if ( value === false ) {
596
639
  break;
597
640
  }
598
641
  }
@@ -600,15 +643,19 @@ jQuery.extend({
600
643
 
601
644
  // A special, fast, case for the most common use of each
602
645
  } else {
603
- if ( isObj ) {
604
- for ( name in obj ) {
605
- if ( callback.call( obj[ name ], name, obj[ name ] ) === false ) {
646
+ if ( isArray ) {
647
+ for ( ; i < length; i++ ) {
648
+ value = callback.call( obj[ i ], i, obj[ i ] );
649
+
650
+ if ( value === false ) {
606
651
  break;
607
652
  }
608
653
  }
609
654
  } else {
610
- for ( ; i < length; ) {
611
- if ( callback.call( obj[ i ], i, obj[ i++ ] ) === false ) {
655
+ for ( i in obj ) {
656
+ value = callback.call( obj[ i ], i, obj[ i ] );
657
+
658
+ if ( value === false ) {
612
659
  break;
613
660
  }
614
661
  }
@@ -635,18 +682,16 @@ jQuery.extend({
635
682
 
636
683
  // results is for internal usage only
637
684
  makeArray: function( arr, results ) {
638
- var type,
639
- ret = results || [];
685
+ var ret = results || [];
640
686
 
641
687
  if ( arr != null ) {
642
- // The window, strings (and functions) also have 'length'
643
- // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
644
- type = jQuery.type( arr );
645
-
646
- if ( arr.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( arr ) ) {
647
- core_push.call( ret, arr );
688
+ if ( isArraylike( Object(arr) ) ) {
689
+ jQuery.merge( ret,
690
+ typeof arr === "string" ?
691
+ [ arr ] : arr
692
+ );
648
693
  } else {
649
- jQuery.merge( ret, arr );
694
+ core_push.call( ret, arr );
650
695
  }
651
696
  }
652
697
 
@@ -684,7 +729,6 @@ jQuery.extend({
684
729
  for ( ; j < l; j++ ) {
685
730
  first[ i++ ] = second[ j ];
686
731
  }
687
-
688
732
  } else {
689
733
  while ( second[j] !== undefined ) {
690
734
  first[ i++ ] = second[ j++ ];
@@ -717,12 +761,11 @@ jQuery.extend({
717
761
 
718
762
  // arg is for internal usage only
719
763
  map: function( elems, callback, arg ) {
720
- var value, key,
721
- ret = [],
764
+ var value,
722
765
  i = 0,
723
766
  length = elems.length,
724
- // jquery objects are treated as arrays
725
- isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
767
+ isArray = isArraylike( elems ),
768
+ ret = [];
726
769
 
727
770
  // Go through the array, translating each of the items to their
728
771
  if ( isArray ) {
@@ -736,8 +779,8 @@ jQuery.extend({
736
779
 
737
780
  // Go through every key on the object,
738
781
  } else {
739
- for ( key in elems ) {
740
- value = callback( elems[ key ], key, arg );
782
+ for ( i in elems ) {
783
+ value = callback( elems[ i ], i, arg );
741
784
 
742
785
  if ( value != null ) {
743
786
  ret[ ret.length ] = value;
@@ -746,7 +789,7 @@ jQuery.extend({
746
789
  }
747
790
 
748
791
  // Flatten any nested arrays
749
- return ret.concat.apply( [], ret );
792
+ return core_concat.apply( [], ret );
750
793
  },
751
794
 
752
795
  // A global GUID counter for objects
@@ -755,7 +798,7 @@ jQuery.extend({
755
798
  // Bind a function to a context, optionally partially applying any
756
799
  // arguments.
757
800
  proxy: function( fn, context ) {
758
- var tmp, args, proxy;
801
+ var args, proxy, tmp;
759
802
 
760
803
  if ( typeof context === "string" ) {
761
804
  tmp = fn[ context ];
@@ -772,7 +815,7 @@ jQuery.extend({
772
815
  // Simulated bind
773
816
  args = core_slice.call( arguments, 2 );
774
817
  proxy = function() {
775
- return fn.apply( context, args.concat( core_slice.call( arguments ) ) );
818
+ return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );
776
819
  };
777
820
 
778
821
  // Set the guid of unique handler to the same of original handler, so it can be removed
@@ -783,46 +826,46 @@ jQuery.extend({
783
826
 
784
827
  // Multifunctional method to get and set values of a collection
785
828
  // The value/s can optionally be executed if it's a function
786
- access: function( elems, fn, key, value, chainable, emptyGet, pass ) {
787
- var exec,
788
- bulk = key == null,
789
- i = 0,
790
- length = elems.length;
829
+ access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
830
+ var i = 0,
831
+ length = elems.length,
832
+ bulk = key == null;
791
833
 
792
834
  // Sets many values
793
- if ( key && typeof key === "object" ) {
835
+ if ( jQuery.type( key ) === "object" ) {
836
+ chainable = true;
794
837
  for ( i in key ) {
795
- jQuery.access( elems, fn, i, key[i], 1, emptyGet, value );
838
+ jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
796
839
  }
797
- chainable = 1;
798
840
 
799
841
  // Sets one value
800
842
  } else if ( value !== undefined ) {
801
- // Optionally, function values get executed if exec is true
802
- exec = pass === undefined && jQuery.isFunction( value );
843
+ chainable = true;
803
844
 
804
- if ( bulk ) {
805
- // Bulk operations only iterate when executing function values
806
- if ( exec ) {
807
- exec = fn;
808
- fn = function( elem, key, value ) {
809
- return exec.call( jQuery( elem ), value );
810
- };
845
+ if ( !jQuery.isFunction( value ) ) {
846
+ raw = true;
847
+ }
811
848
 
812
- // Otherwise they run against the entire set
813
- } else {
849
+ if ( bulk ) {
850
+ // Bulk operations run against the entire set
851
+ if ( raw ) {
814
852
  fn.call( elems, value );
815
853
  fn = null;
854
+
855
+ // ...except when executing function values
856
+ } else {
857
+ bulk = fn;
858
+ fn = function( elem, key, value ) {
859
+ return bulk.call( jQuery( elem ), value );
860
+ };
816
861
  }
817
862
  }
818
863
 
819
864
  if ( fn ) {
820
- for (; i < length; i++ ) {
821
- fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
865
+ for ( ; i < length; i++ ) {
866
+ fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
822
867
  }
823
868
  }
824
-
825
- chainable = 1;
826
869
  }
827
870
 
828
871
  return chainable ?
@@ -849,23 +892,23 @@ jQuery.ready.promise = function( obj ) {
849
892
  // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
850
893
  if ( document.readyState === "complete" ) {
851
894
  // Handle it asynchronously to allow scripts the opportunity to delay ready
852
- setTimeout( jQuery.ready, 1 );
895
+ setTimeout( jQuery.ready );
853
896
 
854
897
  // Standards-based browsers support DOMContentLoaded
855
898
  } else if ( document.addEventListener ) {
856
899
  // Use the handy event callback
857
- document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
900
+ document.addEventListener( "DOMContentLoaded", completed, false );
858
901
 
859
902
  // A fallback to window.onload, that will always work
860
- window.addEventListener( "load", jQuery.ready, false );
903
+ window.addEventListener( "load", completed, false );
861
904
 
862
905
  // If IE event model is used
863
906
  } else {
864
907
  // Ensure firing before onload, maybe late but safe also for iframes
865
- document.attachEvent( "onreadystatechange", DOMContentLoaded );
908
+ document.attachEvent( "onreadystatechange", completed );
866
909
 
867
910
  // A fallback to window.onload, that will always work
868
- window.attachEvent( "onload", jQuery.ready );
911
+ window.attachEvent( "onload", completed );
869
912
 
870
913
  // If IE and not a frame
871
914
  // continually check to see if the document is ready
@@ -887,6 +930,9 @@ jQuery.ready.promise = function( obj ) {
887
930
  return setTimeout( doScrollCheck, 50 );
888
931
  }
889
932
 
933
+ // detach all dom ready events
934
+ detach();
935
+
890
936
  // and execute any waiting functions
891
937
  jQuery.ready();
892
938
  }
@@ -898,10 +944,27 @@ jQuery.ready.promise = function( obj ) {
898
944
  };
899
945
 
900
946
  // Populate the class2type map
901
- jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
947
+ jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
902
948
  class2type[ "[object " + name + "]" ] = name.toLowerCase();
903
949
  });
904
950
 
951
+ function isArraylike( obj ) {
952
+ var length = obj.length,
953
+ type = jQuery.type( obj );
954
+
955
+ if ( jQuery.isWindow( obj ) ) {
956
+ return false;
957
+ }
958
+
959
+ if ( obj.nodeType === 1 && length ) {
960
+ return true;
961
+ }
962
+
963
+ return type === "array" || type !== "function" &&
964
+ ( length === 0 ||
965
+ typeof length === "number" && length > 0 && ( length - 1 ) in obj );
966
+ }
967
+
905
968
  // All jQuery objects should point back to these
906
969
  rootjQuery = jQuery(document);
907
970
  // String to Object options format cache
@@ -910,7 +973,7 @@ var optionsCache = {};
910
973
  // Convert String-formatted options into Object-formatted ones and store in cache
911
974
  function createOptions( options ) {
912
975
  var object = optionsCache[ options ] = {};
913
- jQuery.each( options.split( core_rspace ), function( _, flag ) {
976
+ jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {
914
977
  object[ flag ] = true;
915
978
  });
916
979
  return object;
@@ -946,18 +1009,18 @@ jQuery.Callbacks = function( options ) {
946
1009
  ( optionsCache[ options ] || createOptions( options ) ) :
947
1010
  jQuery.extend( {}, options );
948
1011
 
949
- var // Last fire value (for non-forgettable lists)
1012
+ var // Flag to know if list is currently firing
1013
+ firing,
1014
+ // Last fire value (for non-forgettable lists)
950
1015
  memory,
951
1016
  // Flag to know if list was already fired
952
1017
  fired,
953
- // Flag to know if list is currently firing
954
- firing,
955
- // First callback to fire (used internally by add and fireWith)
956
- firingStart,
957
1018
  // End of the loop when firing
958
1019
  firingLength,
959
1020
  // Index of currently firing callback (modified by remove if needed)
960
1021
  firingIndex,
1022
+ // First callback to fire (used internally by add and fireWith)
1023
+ firingStart,
961
1024
  // Actual callback list
962
1025
  list = [],
963
1026
  // Stack of fire calls for repeatable lists
@@ -1043,9 +1106,10 @@ jQuery.Callbacks = function( options ) {
1043
1106
  }
1044
1107
  return this;
1045
1108
  },
1046
- // Control if a given callback is in the list
1109
+ // Check if a given callback is in the list.
1110
+ // If no argument is given, return whether or not list has callbacks attached.
1047
1111
  has: function( fn ) {
1048
- return jQuery.inArray( fn, list ) > -1;
1112
+ return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
1049
1113
  },
1050
1114
  // Remove all callbacks from the list
1051
1115
  empty: function() {
@@ -1122,22 +1186,19 @@ jQuery.extend({
1122
1186
  return jQuery.Deferred(function( newDefer ) {
1123
1187
  jQuery.each( tuples, function( i, tuple ) {
1124
1188
  var action = tuple[ 0 ],
1125
- fn = fns[ i ];
1189
+ fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
1126
1190
  // deferred[ done | fail | progress ] for forwarding actions to newDefer
1127
- deferred[ tuple[1] ]( jQuery.isFunction( fn ) ?
1128
- function() {
1129
- var returned = fn.apply( this, arguments );
1130
- if ( returned && jQuery.isFunction( returned.promise ) ) {
1131
- returned.promise()
1132
- .done( newDefer.resolve )
1133
- .fail( newDefer.reject )
1134
- .progress( newDefer.notify );
1135
- } else {
1136
- newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
1137
- }
1138
- } :
1139
- newDefer[ action ]
1140
- );
1191
+ deferred[ tuple[1] ](function() {
1192
+ var returned = fn && fn.apply( this, arguments );
1193
+ if ( returned && jQuery.isFunction( returned.promise ) ) {
1194
+ returned.promise()
1195
+ .done( newDefer.resolve )
1196
+ .fail( newDefer.reject )
1197
+ .progress( newDefer.notify );
1198
+ } else {
1199
+ newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
1200
+ }
1201
+ });
1141
1202
  });
1142
1203
  fns = null;
1143
1204
  }).promise();
@@ -1171,8 +1232,11 @@ jQuery.extend({
1171
1232
  }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
1172
1233
  }
1173
1234
 
1174
- // deferred[ resolve | reject | notify ] = list.fire
1175
- deferred[ tuple[0] ] = list.fire;
1235
+ // deferred[ resolve | reject | notify ]
1236
+ deferred[ tuple[0] ] = function() {
1237
+ deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
1238
+ return this;
1239
+ };
1176
1240
  deferred[ tuple[0] + "With" ] = list.fireWith;
1177
1241
  });
1178
1242
 
@@ -1242,17 +1306,9 @@ jQuery.extend({
1242
1306
  });
1243
1307
  jQuery.support = (function() {
1244
1308
 
1245
- var support,
1246
- all,
1247
- a,
1248
- select,
1249
- opt,
1250
- input,
1251
- fragment,
1252
- eventName,
1253
- i,
1254
- isSupported,
1255
- clickFn,
1309
+ var support, all, a,
1310
+ input, select, fragment,
1311
+ opt, eventName, isSupported, i,
1256
1312
  div = document.createElement("div");
1257
1313
 
1258
1314
  // Setup
@@ -1273,8 +1329,11 @@ jQuery.support = (function() {
1273
1329
 
1274
1330
  a.style.cssText = "top:1px;float:left;opacity:.5";
1275
1331
  support = {
1332
+ // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
1333
+ getSetAttribute: div.className !== "t",
1334
+
1276
1335
  // IE strips leading whitespace when .innerHTML is used
1277
- leadingWhitespace: ( div.firstChild.nodeType === 3 ),
1336
+ leadingWhitespace: div.firstChild.nodeType === 3,
1278
1337
 
1279
1338
  // Make sure that tbody elements aren't automatically inserted
1280
1339
  // IE will insert them into empty tables
@@ -1290,7 +1349,7 @@ jQuery.support = (function() {
1290
1349
 
1291
1350
  // Make sure that URLs aren't manipulated
1292
1351
  // (IE normalizes it by default)
1293
- hrefNormalized: ( a.getAttribute("href") === "/a" ),
1352
+ hrefNormalized: a.getAttribute("href") === "/a",
1294
1353
 
1295
1354
  // Make sure that element opacity exists
1296
1355
  // (IE uses filter instead)
@@ -1301,18 +1360,13 @@ jQuery.support = (function() {
1301
1360
  // (IE uses styleFloat instead of cssFloat)
1302
1361
  cssFloat: !!a.style.cssFloat,
1303
1362
 
1304
- // Make sure that if no value is specified for a checkbox
1305
- // that it defaults to "on".
1306
- // (WebKit defaults to "" instead)
1307
- checkOn: ( input.value === "on" ),
1363
+ // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
1364
+ checkOn: !!input.value,
1308
1365
 
1309
1366
  // Make sure that a selected-by-default option has a working selected property.
1310
1367
  // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
1311
1368
  optSelected: opt.selected,
1312
1369
 
1313
- // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
1314
- getSetAttribute: div.className !== "t",
1315
-
1316
1370
  // Tests for enctype support on a form (#6743)
1317
1371
  enctype: !!document.createElement("form").enctype,
1318
1372
 
@@ -1321,12 +1375,9 @@ jQuery.support = (function() {
1321
1375
  html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>",
1322
1376
 
1323
1377
  // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode
1324
- boxModel: ( document.compatMode === "CSS1Compat" ),
1378
+ boxModel: document.compatMode === "CSS1Compat",
1325
1379
 
1326
1380
  // Will be defined later
1327
- submitBubbles: true,
1328
- changeBubbles: true,
1329
- focusinBubbles: false,
1330
1381
  deleteExpando: true,
1331
1382
  noCloneEvent: true,
1332
1383
  inlineBlockNeedsLayout: false,
@@ -1345,76 +1396,64 @@ jQuery.support = (function() {
1345
1396
  select.disabled = true;
1346
1397
  support.optDisabled = !opt.disabled;
1347
1398
 
1348
- // Test to see if it's possible to delete an expando from an element
1349
- // Fails in Internet Explorer
1399
+ // Support: IE<9
1350
1400
  try {
1351
1401
  delete div.test;
1352
1402
  } catch( e ) {
1353
1403
  support.deleteExpando = false;
1354
1404
  }
1355
1405
 
1356
- if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
1357
- div.attachEvent( "onclick", clickFn = function() {
1358
- // Cloning a node shouldn't copy over any
1359
- // bound event handlers (IE does this)
1360
- support.noCloneEvent = false;
1361
- });
1362
- div.cloneNode( true ).fireEvent("onclick");
1363
- div.detachEvent( "onclick", clickFn );
1364
- }
1365
-
1366
- // Check if a radio maintains its value
1367
- // after being appended to the DOM
1406
+ // Check if we can trust getAttribute("value")
1368
1407
  input = document.createElement("input");
1408
+ input.setAttribute( "value", "" );
1409
+ support.input = input.getAttribute( "value" ) === "";
1410
+
1411
+ // Check if an input maintains its value after becoming a radio
1369
1412
  input.value = "t";
1370
1413
  input.setAttribute( "type", "radio" );
1371
1414
  support.radioValue = input.value === "t";
1372
1415
 
1373
- input.setAttribute( "checked", "checked" );
1374
-
1375
1416
  // #11217 - WebKit loses check when the name is after the checked attribute
1417
+ input.setAttribute( "checked", "t" );
1376
1418
  input.setAttribute( "name", "t" );
1377
1419
 
1378
- div.appendChild( input );
1379
1420
  fragment = document.createDocumentFragment();
1380
- fragment.appendChild( div.lastChild );
1381
-
1382
- // WebKit doesn't clone checked state correctly in fragments
1383
- support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
1421
+ fragment.appendChild( input );
1384
1422
 
1385
1423
  // Check if a disconnected checkbox will retain its checked
1386
1424
  // value of true after appended to the DOM (IE6/7)
1387
1425
  support.appendChecked = input.checked;
1388
1426
 
1389
- fragment.removeChild( input );
1390
- fragment.appendChild( div );
1427
+ // WebKit doesn't clone checked state correctly in fragments
1428
+ support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
1391
1429
 
1392
- // Technique from Juriy Zaytsev
1393
- // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
1394
- // We only care about the case where non-standard event systems
1395
- // are used, namely in IE. Short-circuiting here helps us to
1396
- // avoid an eval call (in setAttribute) which can cause CSP
1397
- // to go haywire. See: https://developer.mozilla.org/en/Security/CSP
1430
+ // Support: IE<9
1431
+ // Opera does not clone events (and typeof div.attachEvent === undefined).
1432
+ // IE9-10 clones events bound via attachEvent, but they don't trigger with .click()
1398
1433
  if ( div.attachEvent ) {
1399
- for ( i in {
1400
- submit: true,
1401
- change: true,
1402
- focusin: true
1403
- }) {
1404
- eventName = "on" + i;
1405
- isSupported = ( eventName in div );
1406
- if ( !isSupported ) {
1407
- div.setAttribute( eventName, "return;" );
1408
- isSupported = ( typeof div[ eventName ] === "function" );
1409
- }
1410
- support[ i + "Bubbles" ] = isSupported;
1411
- }
1434
+ div.attachEvent( "onclick", function() {
1435
+ support.noCloneEvent = false;
1436
+ });
1437
+
1438
+ div.cloneNode( true ).click();
1412
1439
  }
1413
1440
 
1441
+ // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event)
1442
+ // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP), test/csp.php
1443
+ for ( i in { submit: true, change: true, focusin: true }) {
1444
+ div.setAttribute( eventName = "on" + i, "t" );
1445
+
1446
+ support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false;
1447
+ }
1448
+
1449
+ div.style.backgroundClip = "content-box";
1450
+ div.cloneNode( true ).style.backgroundClip = "";
1451
+ support.clearCloneStyle = div.style.backgroundClip === "content-box";
1452
+
1414
1453
  // Run tests that need a body at doc ready
1415
1454
  jQuery(function() {
1416
- var container, div, tds, marginDiv,
1417
- divReset = "padding:0;margin:0;border:0;display:block;overflow:hidden;",
1455
+ var container, marginDiv, tds,
1456
+ divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",
1418
1457
  body = document.getElementsByTagName("body")[0];
1419
1458
 
1420
1459
  if ( !body ) {
@@ -1423,20 +1462,17 @@ jQuery.support = (function() {
1423
1462
  }
1424
1463
 
1425
1464
  container = document.createElement("div");
1426
- container.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px";
1427
- body.insertBefore( container, body.firstChild );
1465
+ container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
1428
1466
 
1429
- // Construct the test element
1430
- div = document.createElement("div");
1431
- container.appendChild( div );
1467
+ body.appendChild( container ).appendChild( div );
1432
1468
 
1469
+ // Support: IE8
1433
1470
  // Check if table cells still have offsetWidth/Height when they are set
1434
1471
  // to display:none and there are still other visible table cells in a
1435
1472
  // table row; if so, offsetWidth/Height are not reliable for use when
1436
1473
  // determining if an element has been hidden directly using
1437
1474
  // display:none (it is still safe to use offsets if a parent element is
1438
1475
  // hidden; don safety goggles and see bug #4512 for more information).
1439
- // (only IE 8 fails this test)
1440
1476
  div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
1441
1477
  tds = div.getElementsByTagName("td");
1442
1478
  tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none";
@@ -1445,8 +1481,8 @@ jQuery.support = (function() {
1445
1481
  tds[ 0 ].style.display = "";
1446
1482
  tds[ 1 ].style.display = "none";
1447
1483
 
1484
+ // Support: IE8
1448
1485
  // Check if empty table cells still have offsetWidth/Height
1449
- // (IE <= 8 fail this test)
1450
1486
  support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
1451
1487
 
1452
1488
  // Check box-sizing and margin behavior
@@ -1455,269 +1491,291 @@ jQuery.support = (function() {
1455
1491
  support.boxSizing = ( div.offsetWidth === 4 );
1456
1492
  support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 );
1457
1493
 
1458
- // NOTE: To any future maintainer, we've window.getComputedStyle
1459
- // because jsdom on node.js will break without it.
1494
+ // Use window.getComputedStyle because jsdom on node.js will break without it.
1460
1495
  if ( window.getComputedStyle ) {
1461
1496
  support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
1462
1497
  support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
1463
1498
 
1464
1499
  // Check if div with explicit width and no margin-right incorrectly
1465
- // gets computed margin-right based on width of container. For more
1466
- // info see bug #3333
1500
+ // gets computed margin-right based on width of container. (#3333)
1467
1501
  // Fails in WebKit before Feb 2011 nightlies
1468
1502
  // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
1469
- marginDiv = document.createElement("div");
1503
+ marginDiv = div.appendChild( document.createElement("div") );
1470
1504
  marginDiv.style.cssText = div.style.cssText = divReset;
1471
1505
  marginDiv.style.marginRight = marginDiv.style.width = "0";
1472
1506
  div.style.width = "1px";
1473
- div.appendChild( marginDiv );
1507
+
1474
1508
  support.reliableMarginRight =
1475
1509
  !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
1476
1510
  }
1477
1511
 
1478
- if ( typeof div.style.zoom !== "undefined" ) {
1512
+ if ( typeof div.style.zoom !== core_strundefined ) {
1513
+ // Support: IE<8
1479
1514
  // Check if natively block-level elements act like inline-block
1480
1515
  // elements when setting their display to 'inline' and giving
1481
1516
  // them layout
1482
- // (IE < 8 does this)
1483
1517
  div.innerHTML = "";
1484
1518
  div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
1485
1519
  support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
1486
1520
 
1521
+ // Support: IE6
1487
1522
  // Check if elements with layout shrink-wrap their children
1488
- // (IE 6 does this)
1489
1523
  div.style.display = "block";
1490
- div.style.overflow = "visible";
1491
1524
  div.innerHTML = "<div></div>";
1492
1525
  div.firstChild.style.width = "5px";
1493
1526
  support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
1494
1527
 
1495
- container.style.zoom = 1;
1528
+ if ( support.inlineBlockNeedsLayout ) {
1529
+ // Prevent IE 6 from affecting layout for positioned elements #11048
1530
+ // Prevent IE from shrinking the body in IE 7 mode #12869
1531
+ // Support: IE<8
1532
+ body.style.zoom = 1;
1533
+ }
1496
1534
  }
1497
1535
 
1498
- // Null elements to avoid leaks in IE
1499
1536
  body.removeChild( container );
1537
+
1538
+ // Null elements to avoid leaks in IE
1500
1539
  container = div = tds = marginDiv = null;
1501
1540
  });
1502
1541
 
1503
1542
  // Null elements to avoid leaks in IE
1504
- fragment.removeChild( div );
1505
- all = a = select = opt = input = fragment = div = null;
1543
+ all = select = fragment = opt = a = input = null;
1506
1544
 
1507
1545
  return support;
1508
1546
  })();
1547
+
1509
1548
  var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
1510
1549
  rmultiDash = /([A-Z])/g;
1511
1550
 
1512
- jQuery.extend({
1513
- cache: {},
1551
+ function internalData( elem, name, data, pvt /* Internal Use Only */ ){
1552
+ if ( !jQuery.acceptData( elem ) ) {
1553
+ return;
1554
+ }
1514
1555
 
1515
- deletedIds: [],
1556
+ var thisCache, ret,
1557
+ internalKey = jQuery.expando,
1558
+ getByName = typeof name === "string",
1516
1559
 
1517
- // Remove at next major release (1.9/2.0)
1518
- uuid: 0,
1560
+ // We have to handle DOM nodes and JS objects differently because IE6-7
1561
+ // can't GC object references properly across the DOM-JS boundary
1562
+ isNode = elem.nodeType,
1519
1563
 
1520
- // Unique for each copy of jQuery on the page
1521
- // Non-digits removed to match rinlinejQuery
1522
- expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
1564
+ // Only DOM nodes need the global jQuery cache; JS object data is
1565
+ // attached directly to the object so GC can occur automatically
1566
+ cache = isNode ? jQuery.cache : elem,
1523
1567
 
1524
- // The following elements throw uncatchable exceptions if you
1525
- // attempt to add expando properties to them.
1526
- noData: {
1527
- "embed": true,
1528
- // Ban all objects except for Flash (which handle expandos)
1529
- "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
1530
- "applet": true
1531
- },
1568
+ // Only defining an ID for JS objects if its cache already exists allows
1569
+ // the code to shortcut on the same path as a DOM node with no cache
1570
+ id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
1532
1571
 
1533
- hasData: function( elem ) {
1534
- elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
1535
- return !!elem && !isEmptyDataObject( elem );
1536
- },
1572
+ // Avoid doing any more work than we need to when trying to get data on an
1573
+ // object that has no data at all
1574
+ if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) {
1575
+ return;
1576
+ }
1537
1577
 
1538
- data: function( elem, name, data, pvt /* Internal Use Only */ ) {
1539
- if ( !jQuery.acceptData( elem ) ) {
1540
- return;
1578
+ if ( !id ) {
1579
+ // Only DOM nodes need a new unique ID for each element since their data
1580
+ // ends up in the global cache
1581
+ if ( isNode ) {
1582
+ elem[ internalKey ] = id = core_deletedIds.pop() || jQuery.guid++;
1583
+ } else {
1584
+ id = internalKey;
1541
1585
  }
1586
+ }
1542
1587
 
1543
- var thisCache, ret,
1544
- internalKey = jQuery.expando,
1545
- getByName = typeof name === "string",
1546
-
1547
- // We have to handle DOM nodes and JS objects differently because IE6-7
1548
- // can't GC object references properly across the DOM-JS boundary
1549
- isNode = elem.nodeType,
1550
-
1551
- // Only DOM nodes need the global jQuery cache; JS object data is
1552
- // attached directly to the object so GC can occur automatically
1553
- cache = isNode ? jQuery.cache : elem,
1554
-
1555
- // Only defining an ID for JS objects if its cache already exists allows
1556
- // the code to shortcut on the same path as a DOM node with no cache
1557
- id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
1588
+ if ( !cache[ id ] ) {
1589
+ cache[ id ] = {};
1558
1590
 
1559
- // Avoid doing any more work than we need to when trying to get data on an
1560
- // object that has no data at all
1561
- if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) {
1562
- return;
1591
+ // Avoids exposing jQuery metadata on plain JS objects when the object
1592
+ // is serialized using JSON.stringify
1593
+ if ( !isNode ) {
1594
+ cache[ id ].toJSON = jQuery.noop;
1563
1595
  }
1596
+ }
1564
1597
 
1565
- if ( !id ) {
1566
- // Only DOM nodes need a new unique ID for each element since their data
1567
- // ends up in the global cache
1568
- if ( isNode ) {
1569
- elem[ internalKey ] = id = jQuery.deletedIds.pop() || jQuery.guid++;
1570
- } else {
1571
- id = internalKey;
1572
- }
1598
+ // An object can be passed to jQuery.data instead of a key/value pair; this gets
1599
+ // shallow copied over onto the existing cache
1600
+ if ( typeof name === "object" || typeof name === "function" ) {
1601
+ if ( pvt ) {
1602
+ cache[ id ] = jQuery.extend( cache[ id ], name );
1603
+ } else {
1604
+ cache[ id ].data = jQuery.extend( cache[ id ].data, name );
1573
1605
  }
1606
+ }
1574
1607
 
1575
- if ( !cache[ id ] ) {
1576
- cache[ id ] = {};
1577
-
1578
- // Avoids exposing jQuery metadata on plain JS objects when the object
1579
- // is serialized using JSON.stringify
1580
- if ( !isNode ) {
1581
- cache[ id ].toJSON = jQuery.noop;
1582
- }
1583
- }
1608
+ thisCache = cache[ id ];
1584
1609
 
1585
- // An object can be passed to jQuery.data instead of a key/value pair; this gets
1586
- // shallow copied over onto the existing cache
1587
- if ( typeof name === "object" || typeof name === "function" ) {
1588
- if ( pvt ) {
1589
- cache[ id ] = jQuery.extend( cache[ id ], name );
1590
- } else {
1591
- cache[ id ].data = jQuery.extend( cache[ id ].data, name );
1592
- }
1610
+ // jQuery data() is stored in a separate object inside the object's internal data
1611
+ // cache in order to avoid key collisions between internal data and user-defined
1612
+ // data.
1613
+ if ( !pvt ) {
1614
+ if ( !thisCache.data ) {
1615
+ thisCache.data = {};
1593
1616
  }
1594
1617
 
1595
- thisCache = cache[ id ];
1596
-
1597
- // jQuery data() is stored in a separate object inside the object's internal data
1598
- // cache in order to avoid key collisions between internal data and user-defined
1599
- // data.
1600
- if ( !pvt ) {
1601
- if ( !thisCache.data ) {
1602
- thisCache.data = {};
1603
- }
1604
-
1605
- thisCache = thisCache.data;
1606
- }
1618
+ thisCache = thisCache.data;
1619
+ }
1607
1620
 
1608
- if ( data !== undefined ) {
1609
- thisCache[ jQuery.camelCase( name ) ] = data;
1610
- }
1621
+ if ( data !== undefined ) {
1622
+ thisCache[ jQuery.camelCase( name ) ] = data;
1623
+ }
1611
1624
 
1612
- // Check for both converted-to-camel and non-converted data property names
1613
- // If a data property was specified
1614
- if ( getByName ) {
1625
+ // Check for both converted-to-camel and non-converted data property names
1626
+ // If a data property was specified
1627
+ if ( getByName ) {
1615
1628
 
1616
- // First Try to find as-is property data
1617
- ret = thisCache[ name ];
1629
+ // First Try to find as-is property data
1630
+ ret = thisCache[ name ];
1618
1631
 
1619
- // Test for null|undefined property data
1620
- if ( ret == null ) {
1632
+ // Test for null|undefined property data
1633
+ if ( ret == null ) {
1621
1634
 
1622
- // Try to find the camelCased property
1623
- ret = thisCache[ jQuery.camelCase( name ) ];
1624
- }
1625
- } else {
1626
- ret = thisCache;
1635
+ // Try to find the camelCased property
1636
+ ret = thisCache[ jQuery.camelCase( name ) ];
1627
1637
  }
1638
+ } else {
1639
+ ret = thisCache;
1640
+ }
1628
1641
 
1629
- return ret;
1630
- },
1642
+ return ret;
1643
+ }
1631
1644
 
1632
- removeData: function( elem, name, pvt /* Internal Use Only */ ) {
1633
- if ( !jQuery.acceptData( elem ) ) {
1634
- return;
1635
- }
1645
+ function internalRemoveData( elem, name, pvt ) {
1646
+ if ( !jQuery.acceptData( elem ) ) {
1647
+ return;
1648
+ }
1636
1649
 
1637
- var thisCache, i, l,
1650
+ var i, l, thisCache,
1651
+ isNode = elem.nodeType,
1638
1652
 
1639
- isNode = elem.nodeType,
1653
+ // See jQuery.data for more information
1654
+ cache = isNode ? jQuery.cache : elem,
1655
+ id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
1640
1656
 
1641
- // See jQuery.data for more information
1642
- cache = isNode ? jQuery.cache : elem,
1643
- id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
1657
+ // If there is already no cache entry for this object, there is no
1658
+ // purpose in continuing
1659
+ if ( !cache[ id ] ) {
1660
+ return;
1661
+ }
1644
1662
 
1645
- // If there is already no cache entry for this object, there is no
1646
- // purpose in continuing
1647
- if ( !cache[ id ] ) {
1648
- return;
1649
- }
1663
+ if ( name ) {
1650
1664
 
1651
- if ( name ) {
1665
+ thisCache = pvt ? cache[ id ] : cache[ id ].data;
1652
1666
 
1653
- thisCache = pvt ? cache[ id ] : cache[ id ].data;
1667
+ if ( thisCache ) {
1654
1668
 
1655
- if ( thisCache ) {
1669
+ // Support array or space separated string names for data keys
1670
+ if ( !jQuery.isArray( name ) ) {
1656
1671
 
1657
- // Support array or space separated string names for data keys
1658
- if ( !jQuery.isArray( name ) ) {
1672
+ // try the string as a key before any manipulation
1673
+ if ( name in thisCache ) {
1674
+ name = [ name ];
1675
+ } else {
1659
1676
 
1660
- // try the string as a key before any manipulation
1677
+ // split the camel cased version by spaces unless a key with the spaces exists
1678
+ name = jQuery.camelCase( name );
1661
1679
  if ( name in thisCache ) {
1662
1680
  name = [ name ];
1663
1681
  } else {
1664
-
1665
- // split the camel cased version by spaces unless a key with the spaces exists
1666
- name = jQuery.camelCase( name );
1667
- if ( name in thisCache ) {
1668
- name = [ name ];
1669
- } else {
1670
- name = name.split(" ");
1671
- }
1682
+ name = name.split(" ");
1672
1683
  }
1673
1684
  }
1685
+ } else {
1686
+ // If "name" is an array of keys...
1687
+ // When data is initially created, via ("key", "val") signature,
1688
+ // keys will be converted to camelCase.
1689
+ // Since there is no way to tell _how_ a key was added, remove
1690
+ // both plain key and camelCase key. #12786
1691
+ // This will only penalize the array argument path.
1692
+ name = name.concat( jQuery.map( name, jQuery.camelCase ) );
1693
+ }
1674
1694
 
1675
- for ( i = 0, l = name.length; i < l; i++ ) {
1676
- delete thisCache[ name[i] ];
1677
- }
1695
+ for ( i = 0, l = name.length; i < l; i++ ) {
1696
+ delete thisCache[ name[i] ];
1697
+ }
1678
1698
 
1679
- // If there is no data left in the cache, we want to continue
1680
- // and let the cache object itself get destroyed
1681
- if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
1682
- return;
1683
- }
1699
+ // If there is no data left in the cache, we want to continue
1700
+ // and let the cache object itself get destroyed
1701
+ if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
1702
+ return;
1684
1703
  }
1685
1704
  }
1705
+ }
1686
1706
 
1687
- // See jQuery.data for more information
1688
- if ( !pvt ) {
1689
- delete cache[ id ].data;
1707
+ // See jQuery.data for more information
1708
+ if ( !pvt ) {
1709
+ delete cache[ id ].data;
1690
1710
 
1691
- // Don't destroy the parent cache unless the internal data object
1692
- // had been the only thing left in it
1693
- if ( !isEmptyDataObject( cache[ id ] ) ) {
1694
- return;
1695
- }
1711
+ // Don't destroy the parent cache unless the internal data object
1712
+ // had been the only thing left in it
1713
+ if ( !isEmptyDataObject( cache[ id ] ) ) {
1714
+ return;
1696
1715
  }
1716
+ }
1697
1717
 
1698
- // Destroy the cache
1699
- if ( isNode ) {
1700
- jQuery.cleanData( [ elem ], true );
1718
+ // Destroy the cache
1719
+ if ( isNode ) {
1720
+ jQuery.cleanData( [ elem ], true );
1701
1721
 
1702
- // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
1703
- } else if ( jQuery.support.deleteExpando || cache != cache.window ) {
1704
- delete cache[ id ];
1722
+ // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
1723
+ } else if ( jQuery.support.deleteExpando || cache != cache.window ) {
1724
+ delete cache[ id ];
1705
1725
 
1706
- // When all else fails, null
1707
- } else {
1708
- cache[ id ] = null;
1709
- }
1726
+ // When all else fails, null
1727
+ } else {
1728
+ cache[ id ] = null;
1729
+ }
1730
+ }
1731
+
1732
+ jQuery.extend({
1733
+ cache: {},
1734
+
1735
+ // Unique for each copy of jQuery on the page
1736
+ // Non-digits removed to match rinlinejQuery
1737
+ expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ),
1738
+
1739
+ // The following elements throw uncatchable exceptions if you
1740
+ // attempt to add expando properties to them.
1741
+ noData: {
1742
+ "embed": true,
1743
+ // Ban all objects except for Flash (which handle expandos)
1744
+ "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
1745
+ "applet": true
1746
+ },
1747
+
1748
+ hasData: function( elem ) {
1749
+ elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
1750
+ return !!elem && !isEmptyDataObject( elem );
1751
+ },
1752
+
1753
+ data: function( elem, name, data ) {
1754
+ return internalData( elem, name, data );
1755
+ },
1756
+
1757
+ removeData: function( elem, name ) {
1758
+ return internalRemoveData( elem, name );
1710
1759
  },
1711
1760
 
1712
1761
  // For internal use only.
1713
1762
  _data: function( elem, name, data ) {
1714
- return jQuery.data( elem, name, data, true );
1763
+ return internalData( elem, name, data, true );
1764
+ },
1765
+
1766
+ _removeData: function( elem, name ) {
1767
+ return internalRemoveData( elem, name, true );
1715
1768
  },
1716
1769
 
1717
1770
  // A method for determining if a DOM node can handle the data expando
1718
1771
  acceptData: function( elem ) {
1719
- var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];
1720
-
1772
+ // Do not set data on non-element because it will not be cleared (#8335).
1773
+ if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) {
1774
+ return false;
1775
+ }
1776
+
1777
+ var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];
1778
+
1721
1779
  // nodes accept data unless otherwise specified; rejection can be conditional
1722
1780
  return !noData || noData !== true && elem.getAttribute("classid") === noData;
1723
1781
  }
@@ -1725,7 +1783,7 @@ jQuery.extend({
1725
1783
 
1726
1784
  jQuery.fn.extend({
1727
1785
  data: function( key, value ) {
1728
- var parts, part, attr, name, l,
1786
+ var attrs, name,
1729
1787
  elem = this[0],
1730
1788
  i = 0,
1731
1789
  data = null;
@@ -1736,12 +1794,12 @@ jQuery.fn.extend({
1736
1794
  data = jQuery.data( elem );
1737
1795
 
1738
1796
  if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
1739
- attr = elem.attributes;
1740
- for ( l = attr.length; i < l; i++ ) {
1741
- name = attr[i].name;
1797
+ attrs = elem.attributes;
1798
+ for ( ; i < attrs.length; i++ ) {
1799
+ name = attrs[i].name;
1742
1800
 
1743
1801
  if ( !name.indexOf( "data-" ) ) {
1744
- name = jQuery.camelCase( name.substring(5) );
1802
+ name = jQuery.camelCase( name.slice(5) );
1745
1803
 
1746
1804
  dataAttr( elem, name, data[ name ] );
1747
1805
  }
@@ -1760,35 +1818,17 @@ jQuery.fn.extend({
1760
1818
  });
1761
1819
  }
1762
1820
 
1763
- parts = key.split( ".", 2 );
1764
- parts[1] = parts[1] ? "." + parts[1] : "";
1765
- part = parts[1] + "!";
1766
-
1767
1821
  return jQuery.access( this, function( value ) {
1768
1822
 
1769
1823
  if ( value === undefined ) {
1770
- data = this.triggerHandler( "getData" + part, [ parts[0] ] );
1771
-
1772
1824
  // Try to fetch any internally stored data first
1773
- if ( data === undefined && elem ) {
1774
- data = jQuery.data( elem, key );
1775
- data = dataAttr( elem, key, data );
1776
- }
1777
-
1778
- return data === undefined && parts[1] ?
1779
- this.data( parts[0] ) :
1780
- data;
1825
+ return elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null;
1781
1826
  }
1782
1827
 
1783
- parts[1] = value;
1784
1828
  this.each(function() {
1785
- var self = jQuery( this );
1786
-
1787
- self.triggerHandler( "setData" + part, parts );
1788
1829
  jQuery.data( this, key, value );
1789
- self.triggerHandler( "changeData" + part, parts );
1790
1830
  });
1791
- }, null, value, arguments.length > 1, null, false );
1831
+ }, null, value, arguments.length > 1, null, true );
1792
1832
  },
1793
1833
 
1794
1834
  removeData: function( key ) {
@@ -1810,12 +1850,12 @@ function dataAttr( elem, key, data ) {
1810
1850
  if ( typeof data === "string" ) {
1811
1851
  try {
1812
1852
  data = data === "true" ? true :
1813
- data === "false" ? false :
1814
- data === "null" ? null :
1815
- // Only convert to a number if it doesn't change the string
1816
- +data + "" === data ? +data :
1817
- rbrace.test( data ) ? jQuery.parseJSON( data ) :
1818
- data;
1853
+ data === "false" ? false :
1854
+ data === "null" ? null :
1855
+