programming-pages 0.5.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +7 -0
  2. data/CODE_OF_CONDUCT.md +46 -0
  3. data/CONTRIBUTING.md +15 -0
  4. data/LICENSE +21 -0
  5. data/README.md +157 -0
  6. data/_config.yml +40 -0
  7. data/_data/icons/theme.yml +73 -0
  8. data/_includes/elements/attribution.html +28 -0
  9. data/_includes/elements/help.html +24 -0
  10. data/_includes/elements/indices.html +225 -0
  11. data/_includes/elements/search.html +7 -0
  12. data/_includes/elements/title.html +8 -0
  13. data/_includes/icon.liquid +22 -0
  14. data/_includes/ordered_child_list.liquid +48 -0
  15. data/_includes/package_shortener.liquid +29 -0
  16. data/_includes/scripts/example.js +7 -0
  17. data/_includes/scripts/help.js +10 -0
  18. data/_includes/scripts/indices.js +17 -0
  19. data/_includes/scripts/jquery/jquery-3.3.1.custom.min.js +2 -0
  20. data/_includes/scripts/jquery-address/jquery-address-1.6.semantic-ui.min.js +3 -0
  21. data/_includes/scripts/loadcss/loadcss-2.0.1.min.js +2 -0
  22. data/_includes/scripts/mousetrap/mousetrap-1.6.1.min.js +11 -0
  23. data/_includes/scripts/page.js +37 -0
  24. data/_includes/scripts/search.js +30 -0
  25. data/_includes/scripts/semantic-ui/_version.js +5 -0
  26. data/_includes/scripts/semantic-ui/dimmer.min.js +1 -0
  27. data/_includes/scripts/semantic-ui/modal.min.js +1 -0
  28. data/_includes/scripts/semantic-ui/search.min.js +1 -0
  29. data/_includes/scripts/semantic-ui/sidebar.min.js +1 -0
  30. data/_includes/scripts/semantic-ui/site.min.js +1 -0
  31. data/_includes/scripts/semantic-ui/state.min.js +1 -0
  32. data/_includes/scripts/semantic-ui/sticky.min.js +1 -0
  33. data/_includes/scripts/semantic-ui/tab.min.js +1 -0
  34. data/_includes/scripts/semantic-ui/transition.min.js +1 -0
  35. data/_includes/styles/semantic-ui/_version.css +5 -0
  36. data/_includes/styles/semantic-ui/breadcrumb.min.css +1 -0
  37. data/_includes/styles/semantic-ui/container.min.css +1 -0
  38. data/_includes/styles/semantic-ui/dimmer.min.css +1 -0
  39. data/_includes/styles/semantic-ui/divider.min.css +1 -0
  40. data/_includes/styles/semantic-ui/grid.min.css +1 -0
  41. data/_includes/styles/semantic-ui/header.min.css +1 -0
  42. data/_includes/styles/semantic-ui/image.min.css +1 -0
  43. data/_includes/styles/semantic-ui/input.min.css +1 -0
  44. data/_includes/styles/semantic-ui/item.min.css +1 -0
  45. data/_includes/styles/semantic-ui/label.min.css +1 -0
  46. data/_includes/styles/semantic-ui/list.min.css +1 -0
  47. data/_includes/styles/semantic-ui/menu.min.css +1 -0
  48. data/_includes/styles/semantic-ui/message.min.css +1 -0
  49. data/_includes/styles/semantic-ui/modal.min.css +1 -0
  50. data/_includes/styles/semantic-ui/rail.min.css +1 -0
  51. data/_includes/styles/semantic-ui/reset.min.css +1 -0
  52. data/_includes/styles/semantic-ui/search.min.css +1 -0
  53. data/_includes/styles/semantic-ui/segment.min.css +1 -0
  54. data/_includes/styles/semantic-ui/sidebar.min.css +1 -0
  55. data/_includes/styles/semantic-ui/site.min.css +1 -0
  56. data/_includes/styles/semantic-ui/sticky.min.css +1 -0
  57. data/_includes/styles/semantic-ui/tab.min.css +1 -0
  58. data/_includes/styles/semantic-ui/table.min.css +1 -0
  59. data/_includes/styles/semantic-ui/transition.min.css +1 -0
  60. data/_includes/styles/svg-icons.css +520 -0
  61. data/_includes/styles/tweaks.css +195 -0
  62. data/_includes/themes/syntax.css +84 -0
  63. data/_layouts/base.html +26 -0
  64. data/_layouts/compress.html +51 -0
  65. data/_layouts/example.html +43 -0
  66. data/_layouts/guide-index.html +14 -0
  67. data/_layouts/layout.html +70 -0
  68. data/_layouts/page.html +56 -0
  69. data/assets/site.css +36 -0
  70. data/assets/site.js +20 -0
  71. data/favicon.png +0 -0
  72. data/index.md +16 -0
  73. data/screenshot.png +0 -0
  74. metadata +161 -0
@@ -0,0 +1,8 @@
1
+ <a class="borderless toggle item">{% include icon.liquid id='bars' %} Menu</a>
2
+
3
+ <a class="borderless item" href="{{ site.baseurl }}/">{% include icon.liquid id='home' %} Home</a>
4
+
5
+ <div class="borderless header item">
6
+ <span class="larger text">{{ site.project.name }}</span>
7
+ <div class="ui horizontal basic grey label" style="font-weight: lighter;">v{{ site.project.version }}</div>
8
+ </div>
@@ -0,0 +1,22 @@
1
+ {%- comment -%}
2
+
3
+ icon
4
+ embeds an svg icon for a provided id,
5
+ optionally with additional css classes applied
6
+
7
+ icon data is retrieved from _data/icons/*.yml
8
+
9
+ params:
10
+ id=<icon-id>
11
+ class=<css-class-string> (optional)
12
+
13
+ {%- endcomment -%}
14
+ {%- if include.id -%}
15
+ {% assign svg = nil -%}
16
+ {% for set in site.data.icons -%}
17
+ {% if set[1][include.id] %}{% assign svg = set[1][include.id] %}{% break %}{% endif -%}
18
+ {% endfor -%}
19
+ {%- if svg -%}
20
+ <svg version="1.1" class="icon{% if include.class %} {{ include.class }}{% endif %}" role="img" aria-hidden="true" viewBox="{{ svg.viewbox }}"><path d="{{ svg.path }}"/></svg>
21
+ {%- endif -%}
22
+ {%- endif -%}
@@ -0,0 +1,48 @@
1
+ {%- comment -%}
2
+
3
+ ordered_child_list
4
+ generates an html list of child pages, respecting the page.order value.
5
+ only first-level children are listed, grandchildren and beyond are ignored.
6
+ order: 0 is first, -1 is last, undefined orders go in the middle alphabetically
7
+
8
+ params:
9
+ docs=<array-of-docs-to-order>
10
+ page=<calling-page-object> (optional, will restrict list to children of given page)
11
+
12
+ {%- endcomment -%}
13
+ {% assign doc_list = include.docs %}
14
+ {% if include.page %}
15
+ {% assign parent = include.page.path | split: '.' | first %}
16
+ {% assign child_depth = include.page.path | split:'/' | size | minus:1 %}
17
+ {% endif %}
18
+
19
+ {% assign ordered = '' | split: '' %}
20
+ {% assign endered = '' | split: '' %}
21
+ {% assign unorder = '' | split: '' %}
22
+ {% for doc in doc_list %}
23
+ {% if doc.order %}
24
+ {% if doc.order < 0 %}{% assign endered = endered | push: doc %}
25
+ {% else %}{% assign ordered = ordered | push: doc %}
26
+ {% endif %}
27
+ {% else %}{% assign unorder = unorder | push: doc %}
28
+ {% endif %}
29
+ {% endfor %}
30
+ {% assign ordered = ordered | sort: 'order' %}
31
+ {% assign endered = endered | sort: 'order' | reverse %}
32
+ {% assign doc_list = ordered | concat: unorder | concat: endered %}
33
+
34
+ <div class="ui bulleted link list">
35
+ {% for doc in doc_list %}
36
+ {% assign listable = true %}
37
+ {% if include.page %}
38
+ {% assign child = doc.path | split: '.' | first %}
39
+ {% if parent == child %}{% continue %}{%endif%}
40
+ {% assign prefix = child | truncate: parent.size, '' %}
41
+ {% unless prefix == parent %}{% assign listable = false %}{% endunless %}
42
+ {% endif %}
43
+ {% if listable %}
44
+ {% capture url %}{{ doc.url }}#/{{ doc.collection | downcase }}/{% endcapture %}
45
+ <a class="item" href="{{ site.baseurl }}{{ url }}">{{ doc.title }}</a>
46
+ {% endif %}
47
+ {% endfor %}
48
+ </div>
@@ -0,0 +1,29 @@
1
+ {%- comment -%}
2
+
3
+ package_shortener
4
+ when threshold=2:
5
+ turns foo.bar.bat into: foo.b.bat
6
+ turns foo.bar.bat.Baz into: foo.b.b.Baz
7
+ turns foo.Qix into: foo.Qix
8
+
9
+ params:
10
+ package="foo.bar.Baz"
11
+ threshold=2 (optional, defaults to 2)
12
+
13
+ {%- endcomment -%}
14
+ {%- assign t = include.threshold | default: 2 -%}
15
+ {%- assign pkg_long = include.package | split: '.' -%}
16
+ {%- if pkg_long.size > t -%}
17
+ {%- assign pkg_abbr = pkg_long.first -%}
18
+ {%- for pkg in pkg_long offset: 1 -%}
19
+ {%- unless forloop.last -%}
20
+ {%- assign p = pkg | truncate: 1, "" | downcase -%}
21
+ {%- assign pkg_abbr = pkg_abbr | append: "." | append: p -%}
22
+ {%- endunless -%}
23
+ {%- if forloop.last -%}
24
+ {%- assign pkg_abbr = pkg_abbr | append: "." | append: pkg -%}
25
+ {%- endif -%}
26
+ {%- endfor -%}
27
+ {%- else -%}
28
+ {%- assign pkg_abbr = include.package -%}
29
+ {%- endif -%}{{- pkg_abbr -}}
@@ -0,0 +1,7 @@
1
+ example_code_tabs_init = function() {
2
+ $('#example-code-tabs .item')
3
+ .tab()
4
+ ;
5
+ };
6
+
7
+ $(example_code_tabs_init);
@@ -0,0 +1,10 @@
1
+ help_modal_init = function() {
2
+ $('.ui.modal').modal({
3
+ inverted: true
4
+ });
5
+
6
+ // set up shortut key sequence to toggle modal
7
+ Mousetrap.bind('h', function() { $('#site-help').modal('toggle'); return false; });
8
+ };
9
+
10
+ $(help_modal_init);
@@ -0,0 +1,17 @@
1
+ collection_tabs_init = function() {
2
+ $('#collection-tabs .item').tab({
3
+ history: true,
4
+ historyType: 'hash',
5
+ });
6
+
7
+ // set up shortut key sequences to change tabs
8
+ {% for collection in site.collections %}
9
+ {% unless collection.label == 'posts' %}
10
+ {% capture label %}{{ collection.label | downcase }}{% endcapture %}
11
+ {% capture key %}{{ label | split: '' | first }}{% endcapture %}
12
+ Mousetrap.bind('g {{ key }}', function() { window.location.hash = '#/{{ label }}/'; return false; });
13
+ {% endunless %}
14
+ {% endfor %}
15
+ };
16
+
17
+ $(collection_tabs_init);
@@ -0,0 +1,2 @@
1
+ /*! jQuery v3.3.1 -ajax,-ajax/jsonp,-ajax/load,-ajax/parseXML,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-event/ajax,-wrap | (c) JS Foundation and other contributors | jquery.org/license */
2
+ !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],r=e.document,i=Object.getPrototypeOf,o=n.slice,s=n.concat,a=n.push,u=n.indexOf,l={},c=l.toString,f=l.hasOwnProperty,p=f.toString,d=p.call(Object),h={},g=function e(t){return"function"==typeof t&&"number"!=typeof t.nodeType},v=function e(t){return null!=t&&t===t.window},y={type:!0,src:!0,noModule:!0};function m(e,t,n){var i,o=(t=t||r).createElement("script");if(o.text=e,n)for(i in y)n[i]&&(o[i]=n[i]);t.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var b="3.3.1",w=function(e,t){return new w.fn.init(e,t)},T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;w.fn=w.prototype={jquery:"3.3.1",constructor:w,length:0,toArray:function(){return o.call(this)},get:function(e){return null==e?o.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return w.each(this,e)},map:function(e){return this.pushStack(w.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:a,sort:n.sort,splice:n.splice},w.extend=w.fn.extend=function(){var e,t,n,r,i,o,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[a]||{},a++),"object"==typeof s||g(s)||(s={}),a===u&&(s=this,a--);a<u;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],s!==(r=e[t])&&(l&&r&&(w.isPlainObject(r)||(i=Array.isArray(r)))?(i?(i=!1,o=n&&Array.isArray(n)?n:[]):o=n&&w.isPlainObject(n)?n:{},s[t]=w.extend(l,o,r)):void 0!==r&&(s[t]=r));return s},w.extend({expando:"jQuery"+("3.3.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==c.call(e))&&(!(t=i(e))||"function"==typeof(n=f.call(t,"constructor")&&t.constructor)&&p.call(n)===d)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){m(e)},each:function(e,t){var n,r=0;if(C(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(C(Object(e))?w.merge(n,"string"==typeof e?[e]:e):a.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:u.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],o=0,s=e.length,a=!n;o<s;o++)(r=!t(e[o],o))!==a&&i.push(e[o]);return i},map:function(e,t,n){var r,i,o=0,a=[];if(C(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return s.apply([],a)},guid:1,support:h}),"function"==typeof Symbol&&(w.fn[Symbol.iterator]=n[Symbol.iterator]),w.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function C(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!g(e)&&!v(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}var k=function(e){var t,n,r,i,o,s,a,u,l,c,f,p,d,h,g,v,y,m,x,b="sizzle"+1*new Date,w=e.document,T=0,C=0,k=se(),E=se(),N=se(),A=function(e,t){return e===t&&(f=!0),0},D={}.hasOwnProperty,S=[],q=S.pop,L=S.push,j=S.push,H=S.slice,O=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},P="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",I="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",W="\\["+I+"*("+R+")(?:"+I+"*([*^$|!~]?=)"+I+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+R+"))|)"+I+"*\\]",B=":("+R+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",M=new RegExp(I+"+","g"),$=new RegExp("^"+I+"+|((?:^|[^\\\\])(?:\\\\.)*)"+I+"+$","g"),F=new RegExp("^"+I+"*,"+I+"*"),_=new RegExp("^"+I+"*([>+~]|"+I+")"+I+"*"),z=new RegExp("="+I+"*([^\\]'\"]*?)"+I+"*\\]","g"),U=new RegExp(B),V=new RegExp("^"+R+"$"),X={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,G=/^[^{]+\{\s*\[native \w/,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,J=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+I+"?|("+I+")|.)","ig"),ee=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){p()},ie=me(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{j.apply(S=H.call(w.childNodes),w.childNodes),S[w.childNodes.length].nodeType}catch(e){j={apply:S.length?function(e,t){L.apply(e,H.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function oe(e,t,r,i){var o,a,l,c,f,h,y,m=t&&t.ownerDocument,T=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==T&&9!==T&&11!==T)return r;if(!i&&((t?t.ownerDocument||t:w)!==d&&p(t),t=t||d,g)){if(11!==T&&(f=K.exec(e)))if(o=f[1]){if(9===T){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(m&&(l=m.getElementById(o))&&x(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return j.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return j.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!N[e+" "]&&(!v||!v.test(e))){if(1!==T)m=t,y=e;else if("object"!==t.nodeName.toLowerCase()){(c=t.getAttribute("id"))?c=c.replace(te,ne):t.setAttribute("id",c=b),a=(h=s(e)).length;while(a--)h[a]="#"+c+" "+ye(h[a]);y=h.join(","),m=J.test(e)&&ge(t.parentNode)||t}if(y)try{return j.apply(r,m.querySelectorAll(y)),r}catch(e){}finally{c===b&&t.removeAttribute("id")}}}return u(e.replace($,"$1"),t,r,i)}function se(){var e=[];function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}return t}function ae(e){return e[b]=!0,e}function ue(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){var n=e.split("|"),i=n.length;while(i--)r.attrHandle[n[i]]=t}function ce(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function de(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ie(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function he(e){return ae(function(t){return t=+t,ae(function(n,r){var i,o=e([],n.length,t),s=o.length;while(s--)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}function ge(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}n=oe.support={},o=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},p=oe.setDocument=function(e){var t,i,s=e?e.ownerDocument||e:w;return s!==d&&9===s.nodeType&&s.documentElement?(d=s,h=d.documentElement,g=!o(d),w!==d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.attributes=ue(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ue(function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=G.test(d.getElementsByClassName),n.getById=ue(function(e){return h.appendChild(e).id=b,!d.getElementsByName||!d.getElementsByName(b).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&g)return t.getElementsByClassName(e)},y=[],v=[],(n.qsa=G.test(d.querySelectorAll))&&(ue(function(e){h.appendChild(e).innerHTML="<a id='"+b+"'></a><select id='"+b+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+I+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+I+"*(?:value|"+P+")"),e.querySelectorAll("[id~="+b+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||v.push(".#.+[+~]")}),ue(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+I+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(n.matchesSelector=G.test(m=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ue(function(e){n.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),y.push("!=",B)}),v=v.length&&new RegExp(v.join("|")),y=y.length&&new RegExp(y.join("|")),t=G.test(h.compareDocumentPosition),x=t||G.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===d||e.ownerDocument===w&&x(w,e)?-1:t===d||t.ownerDocument===w&&x(w,t)?1:c?O(c,e)-O(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],a=[t];if(!i||!o)return e===d?-1:t===d?1:i?-1:o?1:c?O(c,e)-O(c,t):0;if(i===o)return ce(e,t);n=e;while(n=n.parentNode)s.unshift(n);n=t;while(n=n.parentNode)a.unshift(n);while(s[r]===a[r])r++;return r?ce(s[r],a[r]):s[r]===w?-1:a[r]===w?1:0},d):d},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==d&&p(e),t=t.replace(z,"='$1']"),n.matchesSelector&&g&&!N[t+" "]&&(!y||!y.test(t))&&(!v||!v.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return oe(t,d,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==d&&p(e),x(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==d&&p(e);var i=r.attrHandle[t.toLowerCase()],o=i&&D.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(A),f){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return c=null,e},i=oe.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else while(t=e[r++])n+=i(t);return n},(r=oe.selectors={cacheLength:50,createPseudo:ae,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===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]||oe.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]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return X.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&U.test(n)&&(t=s(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=k[e+" "];return t||(t=new RegExp("(^|"+I+")"+e+"("+I+"|$)"))&&k(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=oe.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.slice(-n.length)===n:"~="===t?(" "+i.replace(M," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="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!==s?"nextSibling":"previousSibling",v=t.parentNode,y=a&&t.nodeName.toLowerCase(),m=!u&&!a,x=!1;if(v){if(o){while(g){p=t;while(p=p[g])if(a?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[s?v.firstChild:v.lastChild],s&&m){x=(d=(l=(c=(f=(p=v)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1])&&l[2],p=d&&v.childNodes[d];while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if(1===p.nodeType&&++x&&p===t){c[e]=[T,d,x];break}}else if(m&&(x=d=(l=(c=(f=(p=t)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1]),!1===x)while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if((a?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++x&&(m&&((c=(f=p[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[T,x]),p===t))break;return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return i[b]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?ae(function(e,n){var r,o=i(e,t),s=o.length;while(s--)e[r=O(e,o[s])]=!(n[r]=o[s])}):function(e){return i(e,0,n)}):i}},pseudos:{not:ae(function(e){var t=[],n=[],r=a(e.replace($,"$1"));return r[b]?ae(function(e,t,n,i){var o,s=r(e,null,i,[]),a=e.length;while(a--)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:ae(function(e){return function(t){return oe(e,t).length>0}}),contains:ae(function(e){return e=e.replace(Z,ee),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:ae(function(e){return V.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(Z,ee).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===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===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:de(!1),disabled:de(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return Y.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:he(function(){return[0]}),last:he(function(e,t){return[t-1]}),eq:he(function(e,t,n){return[n<0?n+t:n]}),even:he(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:he(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:he(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:he(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=r.pseudos.eq;for(t in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=fe(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=pe(t);function ve(){}ve.prototype=r.filters=r.pseudos,r.setFilters=new ve,s=oe.tokenize=function(e,t){var n,i,o,s,a,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);a=e,u=[],l=r.preFilter;while(a){n&&!(i=F.exec(a))||(i&&(a=a.slice(i[0].length)||a),u.push(o=[])),n=!1,(i=_.exec(a))&&(n=i.shift(),o.push({value:n,type:i[0].replace($," ")}),a=a.slice(n.length));for(s in r.filter)!(i=X[s].exec(a))||l[s]&&!(i=l[s](i))||(n=i.shift(),o.push({value:n,type:s,matches:i}),a=a.slice(n.length));if(!n)break}return t?a.length:a?oe.error(e):E(e,u).slice(0)};function ye(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function me(e,t,n){var r=t.dir,i=t.next,o=i||r,s=n&&"parentNode"===o,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||s)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,p=[T,a];if(u){while(t=t[r])if((1===t.nodeType||s)&&e(t,n,u))return!0}else while(t=t[r])if(1===t.nodeType||s)if(f=t[b]||(t[b]={}),c=f[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===T&&l[1]===a)return p[2]=l[2];if(c[o]=p,p[2]=e(t,n,u))return!0}return!1}}function xe(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function be(e,t,n){for(var r=0,i=t.length;r<i;r++)oe(e,t[r],n);return n}function we(e,t,n,r,i){for(var o,s=[],a=0,u=e.length,l=null!=t;a<u;a++)(o=e[a])&&(n&&!n(o,r,i)||(s.push(o),l&&t.push(a)));return s}function Te(e,t,n,r,i,o){return r&&!r[b]&&(r=Te(r)),i&&!i[b]&&(i=Te(i,o)),ae(function(o,s,a,u){var l,c,f,p=[],d=[],h=s.length,g=o||be(t||"*",a.nodeType?[a]:a,[]),v=!e||!o&&t?g:we(g,p,e,a,u),y=n?i||(o?e:h||r)?[]:s:v;if(n&&n(v,y,a,u),r){l=we(y,d),r(l,[],a,u),c=l.length;while(c--)(f=l[c])&&(y[d[c]]=!(v[d[c]]=f))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(f=y[c])&&l.push(v[c]=f);i(null,y=[],l,u)}c=y.length;while(c--)(f=y[c])&&(l=i?O(o,f):p[c])>-1&&(o[l]=!(s[l]=f))}}else y=we(y===s?y.splice(h,y.length):y),i?i(null,s,y,u):j.apply(s,y)})}function Ce(e){for(var t,n,i,o=e.length,s=r.relative[e[0].type],a=s||r.relative[" "],u=s?1:0,c=me(function(e){return e===t},a,!0),f=me(function(e){return O(t,e)>-1},a,!0),p=[function(e,n,r){var i=!s&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];u<o;u++)if(n=r.relative[e[u].type])p=[me(xe(p),n)];else{if((n=r.filter[e[u].type].apply(null,e[u].matches))[b]){for(i=++u;i<o;i++)if(r.relative[e[i].type])break;return Te(u>1&&xe(p),u>1&&ye(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace($,"$1"),n,u<i&&Ce(e.slice(u,i)),i<o&&Ce(e=e.slice(i)),i<o&&ye(e))}p.push(n)}return xe(p)}function ke(e,t){var n=t.length>0,i=e.length>0,o=function(o,s,a,u,c){var f,h,v,y=0,m="0",x=o&&[],b=[],w=l,C=o||i&&r.find.TAG("*",c),k=T+=null==w?1:Math.random()||.1,E=C.length;for(c&&(l=s===d||s||c);m!==E&&null!=(f=C[m]);m++){if(i&&f){h=0,s||f.ownerDocument===d||(p(f),a=!g);while(v=e[h++])if(v(f,s||d,a)){u.push(f);break}c&&(T=k)}n&&((f=!v&&f)&&y--,o&&x.push(f))}if(y+=m,n&&m!==y){h=0;while(v=t[h++])v(x,b,s,a);if(o){if(y>0)while(m--)x[m]||b[m]||(b[m]=q.call(u));b=we(b)}j.apply(u,b),c&&!o&&b.length>0&&y+t.length>1&&oe.uniqueSort(u)}return c&&(T=k,l=w),x};return n?ae(o):o}return a=oe.compile=function(e,t){var n,r=[],i=[],o=N[e+" "];if(!o){t||(t=s(e)),n=t.length;while(n--)(o=Ce(t[n]))[b]?r.push(o):i.push(o);(o=N(e,ke(i,r))).selector=e}return o},u=oe.select=function(e,t,n,i){var o,u,l,c,f,p="function"==typeof e&&e,d=!i&&s(e=p.selector||e);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(Z,ee),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(u.shift().value.length)}o=X.needsContext.test(e)?0:u.length;while(o--){if(l=u[o],r.relative[c=l.type])break;if((f=r.find[c])&&(i=f(l.matches[0].replace(Z,ee),J.test(u[0].type)&&ge(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&ye(u)))return j.apply(n,i),n;break}}}return(p||a(e,d))(i,t,!g,n,!t||J.test(e)&&ge(t.parentNode)||t),n},n.sortStable=b.split("").sort(A).join("")===b,n.detectDuplicates=!!f,p(),n.sortDetached=ue(function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))}),ue(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ue(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ue(function(e){return null==e.getAttribute("disabled")})||le(P,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(e);w.find=k,w.expr=k.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=k.uniqueSort,w.text=k.getText,w.isXMLDoc=k.isXML,w.contains=k.contains,w.escapeSelector=k.escape;var E=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&w(e).is(n))break;r.push(e)}return r},N=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},A=w.expr.match.needsContext;function D(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var S=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function q(e,t,n){return g(t)?w.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?w.grep(e,function(e){return e===t!==n}):"string"!=typeof t?w.grep(e,function(e){return u.call(t,e)>-1!==n}):w.filter(t,e,n)}w.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?w.find.matchesSelector(r,e)?[r]:[]:w.find.matches(e,w.grep(t,function(e){return 1===e.nodeType}))},w.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(w(e).filter(function(){for(t=0;t<r;t++)if(w.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)w.find(e,i[t],n);return r>1?w.uniqueSort(n):n},filter:function(e){return this.pushStack(q(this,e||[],!1))},not:function(e){return this.pushStack(q(this,e||[],!0))},is:function(e){return!!q(this,"string"==typeof e&&A.test(e)?w(e):e||[],!1).length}});var L,j=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||L,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:j.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:r,!0)),S.test(i[1])&&w.isPlainObject(t))for(i in t)g(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=r.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,L=w(r);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(w.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],s="string"!=typeof e&&w(e);if(!A.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&w.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?w.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?u.call(w(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}w.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return E(e,"parentNode")},parentsUntil:function(e,t,n){return E(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return E(e,"nextSibling")},prevAll:function(e){return E(e,"previousSibling")},nextUntil:function(e,t,n){return E(e,"nextSibling",n)},prevUntil:function(e,t,n){return E(e,"previousSibling",n)},siblings:function(e){return N((e.parentNode||{}).firstChild,e)},children:function(e){return N(e.firstChild)},contents:function(e){return D(e,"iframe")?e.contentDocument:(D(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},function(e,t){w.fn[e]=function(n,r){var i=w.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=w.filter(r,i)),this.length>1&&(O[e]||w.uniqueSort(i),H.test(e)&&i.reverse()),this.pushStack(i)}});var I=/[^\x20\t\r\n\f]+/g;function R(e){var t={};return w.each(e.match(I)||[],function(e,n){t[n]=!0}),t}w.Callbacks=function(e){e="string"==typeof e?R(e):w.extend({},e);var t,n,r,i,o=[],s=[],a=-1,u=function(){for(i=i||e.once,r=t=!0;s.length;a=-1){n=s.shift();while(++a<o.length)!1===o[a].apply(n[0],n[1])&&e.stopOnFalse&&(a=o.length,n=!1)}e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!t&&(a=o.length-1,s.push(n)),function t(n){w.each(n,function(n,r){g(r)?e.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==x(r)&&t(r)})}(arguments),n&&!t&&u()),this},remove:function(){return w.each(arguments,function(e,t){var n;while((n=w.inArray(t,o,n))>-1)o.splice(n,1),n<=a&&a--}),this},has:function(e){return e?w.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=s=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],s.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l};function W(e){return e}function B(e){throw e}function M(e,t,n,r){var i;try{e&&g(i=e.promise)?i.call(e).done(t).fail(n):e&&g(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}w.extend({Deferred:function(t){var n=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return i.then(null,e)},pipe:function(){var e=arguments;return w.Deferred(function(t){w.each(n,function(n,r){var i=g(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&g(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){var o=0;function s(t,n,r,i){return function(){var a=this,u=arguments,l=function(){var e,l;if(!(t<o)){if((e=r.apply(a,u))===n.promise())throw new TypeError("Thenable self-resolution");l=e&&("object"==typeof e||"function"==typeof e)&&e.then,g(l)?i?l.call(e,s(o,n,W,i),s(o,n,B,i)):(o++,l.call(e,s(o,n,W,i),s(o,n,B,i),s(o,n,W,n.notifyWith))):(r!==W&&(a=void 0,u=[e]),(i||n.resolveWith)(a,u))}},c=i?l:function(){try{l()}catch(e){w.Deferred.exceptionHook&&w.Deferred.exceptionHook(e,c.stackTrace),t+1>=o&&(r!==B&&(a=void 0,u=[e]),n.rejectWith(a,u))}};t?c():(w.Deferred.getStackHook&&(c.stackTrace=w.Deferred.getStackHook()),e.setTimeout(c))}}return w.Deferred(function(e){n[0][3].add(s(0,e,g(i)?i:W,e.notifyWith)),n[1][3].add(s(0,e,g(t)?t:W)),n[2][3].add(s(0,e,g(r)?r:B))}).promise()},promise:function(e){return null!=e?w.extend(e,i):i}},o={};return w.each(n,function(e,t){var s=t[2],a=t[5];i[t[1]]=s.add,a&&s.add(function(){r=a},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),s.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=s.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=o.call(arguments),s=w.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?o.call(arguments):n,--t||s.resolveWith(r,i)}};if(t<=1&&(M(e,s.done(a(n)).resolve,s.reject,!t),"pending"===s.state()||g(i[n]&&i[n].then)))return s.then();while(n--)M(i[n],a(n),s.reject);return s.promise()}});var $=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&$.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},w.readyException=function(t){e.setTimeout(function(){throw t})};var F=w.Deferred();w.fn.ready=function(e){return F.then(e)["catch"](function(e){w.readyException(e)}),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==e&&--w.readyWait>0||F.resolveWith(r,[w]))}}),w.ready.then=F.then;function _(){r.removeEventListener("DOMContentLoaded",_),e.removeEventListener("load",_),w.ready()}"complete"===r.readyState||"loading"!==r.readyState&&!r.documentElement.doScroll?e.setTimeout(w.ready):(r.addEventListener("DOMContentLoaded",_),e.addEventListener("load",_));var z=function(e,t,n,r,i,o,s){var a=0,u=e.length,l=null==n;if("object"===x(n)){i=!0;for(a in n)z(e,t,a,n[a],!0,o,s)}else if(void 0!==r&&(i=!0,g(r)||(s=!0),l&&(s?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(w(e),n)})),t))for(;a<u;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return i?e:l?t.call(e):u?t(e[0],n):o},U=/^-ms-/,V=/-([a-z])/g;function X(e,t){return t.toUpperCase()}function Y(e){return e.replace(U,"ms-").replace(V,X)}var Q=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=w.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Q(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[Y(t)]=n;else for(r in t)i[Y(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][Y(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(Y):(t=Y(t))in r?[t]:t.match(I)||[]).length;while(n--)delete r[t[n]]}(void 0===t||w.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!w.isEmptyObject(t)}};var K=new G,J=new G,Z=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ee=/[A-Z]/g;function te(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Z.test(e)?JSON.parse(e):e)}function ne(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(ee,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=te(n)}catch(e){}J.set(e,t,n)}else n=void 0;return n}w.extend({hasData:function(e){return J.hasData(e)||K.hasData(e)},data:function(e,t,n){return J.access(e,t,n)},removeData:function(e,t){J.remove(e,t)},_data:function(e,t,n){return K.access(e,t,n)},_removeData:function(e,t){K.remove(e,t)}}),w.fn.extend({data:function(e,t){var n,r,i,o=this[0],s=o&&o.attributes;if(void 0===e){if(this.length&&(i=J.get(o),1===o.nodeType&&!K.get(o,"hasDataAttrs"))){n=s.length;while(n--)s[n]&&0===(r=s[n].name).indexOf("data-")&&(r=Y(r.slice(5)),ne(o,r,i[r]));K.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){J.set(this,e)}):z(this,function(t){var n;if(o&&void 0===t){if(void 0!==(n=J.get(o,e)))return n;if(void 0!==(n=ne(o,e)))return n}else this.each(function(){J.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){J.remove(this,e)})}}),w.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=K.get(e,t),n&&(!r||Array.isArray(n)?r=K.access(e,t,w.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),r=n.length,i=n.shift(),o=w._queueHooks(e,t),s=function(){w.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,s,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return K.get(e,n)||K.access(e,n,{empty:w.Callbacks("once memory").add(function(){K.remove(e,[t+"queue",n])})})}}),w.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?w.queue(this[0],e):void 0===t?this:this.each(function(){var n=w.queue(this,e,t);w._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&w.dequeue(this,e)})},dequeue:function(e){return this.each(function(){w.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=w.Deferred(),o=this,s=this.length,a=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(s--)(n=K.get(o[s],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(t)}});var re=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ie=new RegExp("^(?:([+-])=|)("+re+")([a-z%]*)$","i"),oe=["Top","Right","Bottom","Left"],se=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&w.contains(e.ownerDocument,e)&&"none"===w.css(e,"display")},ae=function(e,t,n,r){var i,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=s[o];return i};function ue(e,t,n,r){var i,o,s=20,a=r?function(){return r.cur()}:function(){return w.css(e,t,"")},u=a(),l=n&&n[3]||(w.cssNumber[t]?"":"px"),c=(w.cssNumber[t]||"px"!==l&&+u)&&ie.exec(w.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(s--)w.style(e,t,c+l),(1-o)*(1-(o=a()/u||.5))<=0&&(s=0),c/=o;c*=2,w.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var le={};function ce(e){var t,n=e.ownerDocument,r=e.nodeName,i=le[r];return i||(t=n.body.appendChild(n.createElement(r)),i=w.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),le[r]=i,i)}function fe(e,t){for(var n,r,i=[],o=0,s=e.length;o<s;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=K.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&se(r)&&(i[o]=ce(r))):"none"!==n&&(i[o]="none",K.set(r,"display",n)));for(o=0;o<s;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}w.fn.extend({show:function(){return fe(this,!0)},hide:function(){return fe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){se(this)?w(this).show():w(this).hide()})}});var pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&D(e,t)?w.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)K.set(e[n],"globalEval",!t||K.get(t[n],"globalEval"))}var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,s,a,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===x(o))w.merge(p,o.nodeType?[o]:o);else if(me.test(o)){s=s||f.appendChild(t.createElement("div")),a=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[a]||ge._default,s.innerHTML=u[1]+w.htmlPrefilter(o)+u[2],c=u[0];while(c--)s=s.lastChild;w.merge(p,s.childNodes),(s=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&w.inArray(o,r)>-1)i&&i.push(o);else if(l=w.contains(o.ownerDocument,o),s=ve(f.appendChild(o),"script"),l&&ye(s),n){c=0;while(o=s[c++])he.test(o.type||"")&&n.push(o)}return f}!function(){var e=r.createDocumentFragment().appendChild(r.createElement("div")),t=r.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),h.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",h.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var be=r.documentElement,we=/^key/,Te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ce=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Ee(){return!1}function Ne(){try{return r.activeElement}catch(e){}}function Ae(e,t,n,r,i,o){var s,a;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(a in t)Ae(e,a,n,r,t[a],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ee;else if(!i)return e;return 1===o&&(s=i,(i=function(e){return w().off(e),s.apply(this,arguments)}).guid=s.guid||(s.guid=w.guid++)),e.each(function(){w.event.add(this,t,i,r,n)})}w.event={global:{},add:function(e,t,n,r,i){var o,s,a,u,l,c,f,p,d,h,g,v=K.get(e);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&w.find.matchesSelector(be,i),n.guid||(n.guid=w.guid++),(u=v.events)||(u=v.events={}),(s=v.handle)||(s=v.handle=function(t){return"undefined"!=typeof w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(I)||[""]).length;while(l--)d=g=(a=Ce.exec(t[l])||[])[1],h=(a[2]||"").split(".").sort(),d&&(f=w.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=w.event.special[d]||{},c=w.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&w.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,s)||e.addEventListener&&e.addEventListener(d,s)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),w.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,s,a,u,l,c,f,p,d,h,g,v=K.hasData(e)&&K.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(I)||[""]).length;while(l--)if(a=Ce.exec(t[l])||[],d=g=a[1],h=(a[2]||"").split(".").sort(),d){f=w.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],a=a[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||a&&!a.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));s&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||w.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)w.event.remove(e,d+t[l],n,r,!0);w.isEmptyObject(u)&&K.remove(e,"handle events")}},dispatch:function(e){var t=w.event.fix(e),n,r,i,o,s,a,u=new Array(arguments.length),l=(K.get(this,"events")||{})[t.type]||[],c=w.event.special[t.type]||{};for(u[0]=t,n=1;n<arguments.length;n++)u[n]=arguments[n];if(t.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,t)){a=w.event.handlers.call(this,t,l),n=0;while((o=a[n++])&&!t.isPropagationStopped()){t.currentTarget=o.elem,r=0;while((s=o.handlers[r++])&&!t.isImmediatePropagationStopped())t.rnamespace&&!t.rnamespace.test(s.namespace)||(t.handleObj=s,t.data=s.data,void 0!==(i=((w.event.special[s.origType]||{}).handle||s.handler).apply(o.elem,u))&&!1===(t.result=i)&&(t.preventDefault(),t.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,t),t.result}},handlers:function(e,t){var n,r,i,o,s,a=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],s={},n=0;n<u;n++)void 0===s[i=(r=t[n]).selector+" "]&&(s[i]=r.needsContext?w(i,this).index(l)>-1:w.find(i,this,null,[l]).length),s[i]&&o.push(r);o.length&&a.push({elem:l,handlers:o})}return l=this,u<t.length&&a.push({elem:l,handlers:t.slice(u)}),a},addProp:function(e,t){Object.defineProperty(w.Event.prototype,e,{enumerable:!0,configurable:!0,get:g(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[w.expando]?e:new w.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==Ne()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===Ne()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&D(this,"input"))return this.click(),!1},_default:function(e){return D(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},w.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},w.Event=function(e,t){if(!(this instanceof w.Event))return new w.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?ke:Ee,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&w.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[w.expando]=!0},w.Event.prototype={constructor:w.Event,isDefaultPrevented:Ee,isPropagationStopped:Ee,isImmediatePropagationStopped:Ee,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=ke,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=ke,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=ke,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},w.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&we.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Te.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},w.event.addProp),w.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){w.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||w.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),w.fn.extend({on:function(e,t,n,r){return Ae(this,e,t,n,r)},one:function(e,t,n,r){return Ae(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,w(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Ee),this.each(function(){w.event.remove(this,e,n,t)})}});var De=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Se=/<script|<style|<link/i,qe=/checked\s*(?:[^=]|=\s*.checked.)/i,Le=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function je(e,t){return D(e,"table")&&D(11!==t.nodeType?t:t.firstChild,"tr")?w(e).children("tbody")[0]||e:e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Oe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Pe(e,t){var n,r,i,o,s,a,u,l;if(1===t.nodeType){if(K.hasData(e)&&(o=K.access(e),s=K.set(t,o),l=o.events)){delete s.handle,s.events={};for(i in l)for(n=0,r=l[i].length;n<r;n++)w.event.add(t,i,l[i][n])}J.hasData(e)&&(a=J.access(e),u=w.extend({},a),J.set(t,u))}}function Ie(e,t){var n=t.nodeName.toLowerCase();"input"===n&&pe.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Re(e,t,n,r){t=s.apply([],t);var i,o,a,u,l,c,f=0,p=e.length,d=p-1,v=t[0],y=g(v);if(y||p>1&&"string"==typeof v&&!h.checkClone&&qe.test(v))return e.each(function(i){var o=e.eq(i);y&&(t[0]=v.call(this,i,o.html())),Re(o,t,n,r)});if(p&&(i=xe(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(a=w.map(ve(i,"script"),He)).length;f<p;f++)l=i,f!==d&&(l=w.clone(l,!0,!0),u&&w.merge(a,ve(l,"script"))),n.call(e[f],l,f);if(u)for(c=a[a.length-1].ownerDocument,w.map(a,Oe),f=0;f<u;f++)l=a[f],he.test(l.type||"")&&!K.access(l,"globalEval")&&w.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?w._evalUrl&&w._evalUrl(l.src):m(l.textContent.replace(Le,""),c,l))}return e}function We(e,t,n){for(var r,i=t?w.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||w.cleanData(ve(r)),r.parentNode&&(n&&w.contains(r.ownerDocument,r)&&ye(ve(r,"script")),r.parentNode.removeChild(r));return e}w.extend({htmlPrefilter:function(e){return e.replace(De,"<$1></$2>")},clone:function(e,t,n){var r,i,o,s,a=e.cloneNode(!0),u=w.contains(e.ownerDocument,e);if(!(h.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(s=ve(a),r=0,i=(o=ve(e)).length;r<i;r++)Ie(o[r],s[r]);if(t)if(n)for(o=o||ve(e),s=s||ve(a),r=0,i=o.length;r<i;r++)Pe(o[r],s[r]);else Pe(e,a);return(s=ve(a,"script")).length>0&&ye(s,!u&&ve(e,"script")),a},cleanData:function(e){for(var t,n,r,i=w.event.special,o=0;void 0!==(n=e[o]);o++)if(Q(n)){if(t=n[K.expando]){if(t.events)for(r in t.events)i[r]?w.event.remove(n,r):w.removeEvent(n,r,t.handle);n[K.expando]=void 0}n[J.expando]&&(n[J.expando]=void 0)}}}),w.fn.extend({detach:function(e){return We(this,e,!0)},remove:function(e){return We(this,e)},text:function(e){return z(this,function(e){return void 0===e?w.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Re(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||je(this,e).appendChild(e)})},prepend:function(){return Re(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=je(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(w.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return w.clone(this,e,t)})},html:function(e){return z(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Se.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(w.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return Re(this,arguments,function(t){var n=this.parentNode;w.inArray(this,e)<0&&(w.cleanData(ve(this)),n&&n.replaceChild(t,this))},e)}}),w.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){w.fn[e]=function(e){for(var n,r=[],i=w(e),o=i.length-1,s=0;s<=o;s++)n=s===o?this:this.clone(!0),w(i[s])[t](n),a.apply(r,n.get());return this.pushStack(r)}});var Be=new RegExp("^("+re+")(?!px)[a-z%]+$","i"),Me=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},$e=new RegExp(oe.join("|"),"i");!function(){function t(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",be.appendChild(l).appendChild(c);var t=e.getComputedStyle(c);i="1%"!==t.top,u=12===n(t.marginLeft),c.style.right="60%",a=36===n(t.right),o=36===n(t.width),c.style.position="absolute",s=36===c.offsetWidth||"absolute",be.removeChild(l),c=null}}function n(e){return Math.round(parseFloat(e))}var i,o,s,a,u,l=r.createElement("div"),c=r.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",h.clearCloneStyle="content-box"===c.style.backgroundClip,w.extend(h,{boxSizingReliable:function(){return t(),o},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),i},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),s}}))}();function Fe(e,t,n){var r,i,o,s,a=e.style;return(n=n||Me(e))&&(""!==(s=n.getPropertyValue(t)||n[t])||w.contains(e.ownerDocument,e)||(s=w.style(e,t)),!h.pixelBoxStyles()&&Be.test(s)&&$e.test(t)&&(r=a.width,i=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=r,a.minWidth=i,a.maxWidth=o)),void 0!==s?s+"":s}function _e(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}var ze=/^(none|table(?!-c[ea]).+)/,Ue=/^--/,Ve={position:"absolute",visibility:"hidden",display:"block"},Xe={letterSpacing:"0",fontWeight:"400"},Ye=["Webkit","Moz","ms"],Qe=r.createElement("div").style;function Ge(e){if(e in Qe)return e;var t=e[0].toUpperCase()+e.slice(1),n=Ye.length;while(n--)if((e=Ye[n]+t)in Qe)return e}function Ke(e){var t=w.cssProps[e];return t||(t=w.cssProps[e]=Ge(e)||e),t}function Je(e,t,n){var r=ie.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ze(e,t,n,r,i,o){var s="width"===t?1:0,a=0,u=0;if(n===(r?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(u+=w.css(e,n+oe[s],!0,i)),r?("content"===n&&(u-=w.css(e,"padding"+oe[s],!0,i)),"margin"!==n&&(u-=w.css(e,"border"+oe[s]+"Width",!0,i))):(u+=w.css(e,"padding"+oe[s],!0,i),"padding"!==n?u+=w.css(e,"border"+oe[s]+"Width",!0,i):a+=w.css(e,"border"+oe[s]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-a-.5))),u}function et(e,t,n){var r=Me(e),i=Fe(e,t,r),o="border-box"===w.css(e,"boxSizing",!1,r),s=o;if(Be.test(i)){if(!n)return i;i="auto"}return s=s&&(h.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===w.css(e,"display",!1,r))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],s=!0),(i=parseFloat(i)||0)+Ze(e,t,n||(o?"border":"content"),s,r,i)+"px"}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Fe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=Y(t),u=Ue.test(t),l=e.style;if(u||(t=Ke(a)),s=w.cssHooks[t]||w.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(i=s.get(e,!1,r))?i:l[t];"string"==(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=ue(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(w.cssNumber[a]?"":"px")),h.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,s,a=Y(t);return Ue.test(t)||(t=Ke(a)),(s=w.cssHooks[t]||w.cssHooks[a])&&"get"in s&&(i=s.get(e,!0,n)),void 0===i&&(i=Fe(e,t,r)),"normal"===i&&t in Xe&&(i=Xe[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),w.each(["height","width"],function(e,t){w.cssHooks[t]={get:function(e,n,r){if(n)return!ze.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?et(e,t,r):ae(e,Ve,function(){return et(e,t,r)})},set:function(e,n,r){var i,o=Me(e),s="border-box"===w.css(e,"boxSizing",!1,o),a=r&&Ze(e,t,r,s,o);return s&&h.scrollboxSize()===o.position&&(a-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Ze(e,t,"border",!1,o)-.5)),a&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),Je(e,n,a)}}}),w.cssHooks.marginLeft=_e(h.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Fe(e,"marginLeft"))||e.getBoundingClientRect().left-ae(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),w.each({margin:"",padding:"",border:"Width"},function(e,t){w.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(w.cssHooks[e+t].set=Je)}),w.fn.extend({css:function(e,t){return z(this,function(e,t,n){var r,i,o={},s=0;if(Array.isArray(t)){for(r=Me(e),i=t.length;s<i;s++)o[t[s]]=w.css(e,t[s],!1,r);return o}return void 0!==n?w.style(e,t,n):w.css(e,t)},e,t,arguments.length>1)}});function tt(e,t,n,r,i){return new tt.prototype.init(e,t,n,r,i)}w.Tween=tt,tt.prototype={constructor:tt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||w.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(w.cssNumber[n]?"":"px")},cur:function(){var e=tt.propHooks[this.prop];return e&&e.get?e.get(this):tt.propHooks._default.get(this)},run:function(e){var t,n=tt.propHooks[this.prop];return this.options.duration?this.pos=t=w.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):tt.propHooks._default.set(this),this}},tt.prototype.init.prototype=tt.prototype,tt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=w.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){w.fx.step[e.prop]?w.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[w.cssProps[e.prop]]&&!w.cssHooks[e.prop]?e.elem[e.prop]=e.now:w.style(e.elem,e.prop,e.now+e.unit)}}},tt.propHooks.scrollTop=tt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},w.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},w.fx=tt.prototype.init,w.fx.step={};var nt,rt,it=/^(?:toggle|show|hide)$/,ot=/queueHooks$/;function st(){rt&&(!1===r.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(st):e.setTimeout(st,w.fx.interval),w.fx.tick())}function at(){return e.setTimeout(function(){nt=void 0}),nt=Date.now()}function ut(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function lt(e,t,n){for(var r,i=(pt.tweeners[t]||[]).concat(pt.tweeners["*"]),o=0,s=i.length;o<s;o++)if(r=i[o].call(n,t,e))return r}function ct(e,t,n){var r,i,o,s,a,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&se(e),v=K.get(e,"fxshow");n.queue||(null==(s=w._queueHooks(e,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,p.always(function(){p.always(function(){s.unqueued--,w.queue(e,"fx").length||s.empty.fire()})}));for(r in t)if(i=t[r],it.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||w.style(e,r)}if((u=!w.isEmptyObject(t))||!w.isEmptyObject(d)){f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=K.get(e,"display")),"none"===(c=w.css(e,"display"))&&(l?c=l:(fe([e],!0),l=e.style.display||l,c=w.css(e,"display"),fe([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===w.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1;for(r in d)u||(v?"hidden"in v&&(g=v.hidden):v=K.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&fe([e],!0),p.done(function(){g||fe([e]),K.remove(e,"fxshow");for(r in d)w.style(e,r,d[r])})),u=lt(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}}function ft(e,t){var n,r,i,o,s;for(n in e)if(r=Y(n),i=t[r],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(s=w.cssHooks[r])&&"expand"in s){o=s.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function pt(e,t,n){var r,i,o=0,s=pt.prefilters.length,a=w.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=nt||at(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),o=0,s=l.tweens.length;o<s;o++)l.tweens[o].run(r);return a.notifyWith(e,[l,r,n]),r<1&&s?n:(s||a.notifyWith(e,[l,1,0]),a.resolveWith(e,[l]),!1)},l=a.promise({elem:e,props:w.extend({},t),opts:w.extend(!0,{specialEasing:{},easing:w.easing._default},n),originalProperties:t,originalOptions:n,startTime:nt||at(),duration:n.duration,tweens:[],createTween:function(t,n){var r=w.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;n<r;n++)l.tweens[n].run(1);return t?(a.notifyWith(e,[l,1,0]),a.resolveWith(e,[l,t])):a.rejectWith(e,[l,t]),this}}),c=l.props;for(ft(c,l.opts.specialEasing);o<s;o++)if(r=pt.prefilters[o].call(l,e,c,l.opts))return g(r.stop)&&(w._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return w.map(c,lt,l),g(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),w.fx.timer(w.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}w.Animation=w.extend(pt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ue(n.elem,e,ie.exec(t),n),n}]},tweener:function(e,t){g(e)?(t=e,e=["*"]):e=e.match(I);for(var n,r=0,i=e.length;r<i;r++)n=e[r],pt.tweeners[n]=pt.tweeners[n]||[],pt.tweeners[n].unshift(t)},prefilters:[ct],prefilter:function(e,t){t?pt.prefilters.unshift(e):pt.prefilters.push(e)}}),w.speed=function(e,t,n){var r=e&&"object"==typeof e?w.extend({},e):{complete:n||!n&&t||g(e)&&e,duration:e,easing:n&&t||t&&!g(t)&&t};return w.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in w.fx.speeds?r.duration=w.fx.speeds[r.duration]:r.duration=w.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){g(r.old)&&r.old.call(this),r.queue&&w.dequeue(this,r.queue)},r},w.fn.extend({fadeTo:function(e,t,n,r){return this.filter(se).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=w.isEmptyObject(e),o=w.speed(t,n,r),s=function(){var t=pt(this,w.extend({},e),o);(i||K.get(this,"finish"))&&t.stop(!0)};return s.finish=s,i||!1===o.queue?this.each(s):this.queue(o.queue,s)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=w.timers,s=K.get(this);if(i)s[i]&&s[i].stop&&r(s[i]);else for(i in s)s[i]&&s[i].stop&&ot.test(i)&&r(s[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||w.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=K.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=w.timers,s=r?r.length:0;for(n.finish=!0,w.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<s;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),w.each(["toggle","show","hide"],function(e,t){var n=w.fn[t];w.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ut(t,!0),e,r,i)}}),w.each({slideDown:ut("show"),slideUp:ut("hide"),slideToggle:ut("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){w.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),w.timers=[],w.fx.tick=function(){var e,t=0,n=w.timers;for(nt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||w.fx.stop(),nt=void 0},w.fx.timer=function(e){w.timers.push(e),w.fx.start()},w.fx.interval=13,w.fx.start=function(){rt||(rt=!0,st())},w.fx.stop=function(){rt=null},w.fx.speeds={slow:600,fast:200,_default:400},w.fn.delay=function(t,n){return t=w.fx?w.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})},function(){var e=r.createElement("input"),t=r.createElement("select").appendChild(r.createElement("option"));e.type="checkbox",h.checkOn=""!==e.value,h.optSelected=t.selected,(e=r.createElement("input")).value="t",e.type="radio",h.radioValue="t"===e.value}();var dt,ht=w.expr.attrHandle;w.fn.extend({attr:function(e,t){return z(this,w.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){w.removeAttr(this,e)})}}),w.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?w.prop(e,t,n):(1===o&&w.isXMLDoc(e)||(i=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?dt:void 0)),void 0!==n?null===n?void w.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=w.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!h.radioValue&&"radio"===t&&D(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(I);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),dt={set:function(e,t,n){return!1===t?w.removeAttr(e,n):e.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ht[t]||w.find.attr;ht[t]=function(e,t,r){var i,o,s=t.toLowerCase();return r||(o=ht[s],ht[s]=i,i=null!=n(e,t,r)?s:null,ht[s]=o),i}});var gt=/^(?:input|select|textarea|button)$/i,vt=/^(?:a|area)$/i;w.fn.extend({prop:function(e,t){return z(this,w.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[w.propFix[e]||e]})}}),w.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&w.isXMLDoc(e)||(t=w.propFix[t]||t,i=w.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||vt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),h.optSelected||(w.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){w.propFix[this.toLowerCase()]=this});function yt(e){return(e.match(I)||[]).join(" ")}function mt(e){return e.getAttribute&&e.getAttribute("class")||""}function xt(e){return Array.isArray(e)?e:"string"==typeof e?e.match(I)||[]:[]}w.fn.extend({addClass:function(e){var t,n,r,i,o,s,a,u=0;if(g(e))return this.each(function(t){w(this).addClass(e.call(this,t,mt(this)))});if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+yt(i)+" "){s=0;while(o=t[s++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(a=yt(r))&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,r,i,o,s,a,u=0;if(g(e))return this.each(function(t){w(this).removeClass(e.call(this,t,mt(this)))});if(!arguments.length)return this.attr("class","");if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+yt(i)+" "){s=0;while(o=t[s++])while(r.indexOf(" "+o+" ")>-1)r=r.replace(" "+o+" "," ");i!==(a=yt(r))&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):g(e)?this.each(function(n){w(this).toggleClass(e.call(this,n,mt(this),t),t)}):this.each(function(){var t,i,o,s;if(r){i=0,o=w(this),s=xt(e);while(t=s[i++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else void 0!==e&&"boolean"!==n||((t=mt(this))&&K.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":K.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&(" "+yt(mt(n))+" ").indexOf(t)>-1)return!0;return!1}});var bt=/\r/g;w.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=g(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,w(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=w.map(i,function(e){return null==e?"":e+""})),(t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(bt,""):null==n?"":n}}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:yt(w.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,s="select-one"===e.type,a=s?null:[],u=s?o+1:i.length;for(r=o<0?u:s?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!D(n.parentNode,"optgroup"))){if(t=w(n).val(),s)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=w.makeArray(t),s=i.length;while(s--)((r=i[s]).selected=w.inArray(w.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),w.each(["radio","checkbox"],function(){w.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=w.inArray(w(e).val(),t)>-1}},h.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),h.focusin="onfocusin"in e;var wt=/^(?:focusinfocus|focusoutblur)$/,Tt=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(t,n,i,o){var s,a,u,l,c,p,d,h,y=[i||r],m=f.call(t,"type")?t.type:t,x=f.call(t,"namespace")?t.namespace.split("."):[];if(a=h=u=i=i||r,3!==i.nodeType&&8!==i.nodeType&&!wt.test(m+w.event.triggered)&&(m.indexOf(".")>-1&&(m=(x=m.split(".")).shift(),x.sort()),c=m.indexOf(":")<0&&"on"+m,t=t[w.expando]?t:new w.Event(m,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=x.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+x.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:w.makeArray(n,[t]),d=w.event.special[m]||{},o||!d.trigger||!1!==d.trigger.apply(i,n))){if(!o&&!d.noBubble&&!v(i)){for(l=d.delegateType||m,wt.test(l+m)||(a=a.parentNode);a;a=a.parentNode)y.push(a),u=a;u===(i.ownerDocument||r)&&y.push(u.defaultView||u.parentWindow||e)}s=0;while((a=y[s++])&&!t.isPropagationStopped())h=a,t.type=s>1?l:d.bindType||m,(p=(K.get(a,"events")||{})[t.type]&&K.get(a,"handle"))&&p.apply(a,n),(p=c&&a[c])&&p.apply&&Q(a)&&(t.result=p.apply(a,n),!1===t.result&&t.preventDefault());return t.type=m,o||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(y.pop(),n)||!Q(i)||c&&g(i[m])&&!v(i)&&((u=i[c])&&(i[c]=null),w.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,Tt),i[m](),t.isPropagationStopped()&&h.removeEventListener(m,Tt),w.event.triggered=void 0,u&&(i[c]=u)),t.result}},simulate:function(e,t,n){var r=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(r,null,t)}}),w.fn.extend({trigger:function(e,t){return this.each(function(){w.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return w.event.trigger(e,t,n,!0)}}),h.focusin||w.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){w.event.simulate(t,e.target,w.event.fix(e))};w.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=K.access(r,t);i||r.addEventListener(e,n,!0),K.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=K.access(r,t)-1;i?K.access(r,t,i):(r.removeEventListener(e,n,!0),K.remove(r,t))}}});var Ct=/\[\]$/,kt=/\r?\n/g,Et=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function At(e,t,n,r){var i;if(Array.isArray(t))w.each(t,function(t,i){n||Ct.test(e)?r(e,i):At(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==x(t))r(e,t);else for(i in t)At(e+"["+i+"]",t[i],n,r)}w.param=function(e,t){var n,r=[],i=function(e,t){var n=g(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,function(){i(this.name,this.value)});else for(n in e)At(n,e[n],t,i);return r.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&Nt.test(this.nodeName)&&!Et.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,function(e){return{name:t.name,value:e.replace(kt,"\r\n")}}):{name:t.name,value:n.replace(kt,"\r\n")}}).get()}}),w.expr.pseudos.hidden=function(e){return!w.expr.pseudos.visible(e)},w.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},h.createHTMLDocument=function(){var e=r.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),w.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var i,o,s;return t||(h.createHTMLDocument?((i=(t=r.implementation.createHTMLDocument("")).createElement("base")).href=r.location.href,t.head.appendChild(i)):t=r),o=S.exec(e),s=!n&&[],o?[t.createElement(o[1])]:(o=xe([e],t,s),s&&s.length&&w(s).remove(),w.merge([],o.childNodes))},w.expr.pseudos.animated=function(e){return w.grep(w.timers,function(t){return e===t.elem}).length},w.offset={setOffset:function(e,t,n){var r,i,o,s,a,u,l,c=w.css(e,"position"),f=w(e),p={};"static"===c&&(e.style.position="relative"),a=f.offset(),o=w.css(e,"top"),u=w.css(e,"left"),(l=("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1)?(s=(r=f.position()).top,i=r.left):(s=parseFloat(o)||0,i=parseFloat(u)||0),g(t)&&(t=t.call(e,n,w.extend({},a))),null!=t.top&&(p.top=t.top-a.top+s),null!=t.left&&(p.left=t.left-a.left+i),"using"in t?t.using.call(e,p):f.css(p)}},w.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){w.offset.setOffset(this,e,t)});var t,n,r=this[0];if(r)return r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===w.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===w.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=w(e).offset()).top+=w.css(e,"borderTopWidth",!0),i.left+=w.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-w.css(r,"marginTop",!0),left:t.left-i.left-w.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===w.css(e,"position"))e=e.offsetParent;return e||be})}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;w.fn[e]=function(r){return z(this,function(e,r,i){var o;if(v(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),w.each(["top","left"],function(e,t){w.cssHooks[t]=_e(h.pixelPosition,function(e,n){if(n)return n=Fe(e,t),Be.test(n)?w(e).position()[t]+"px":n})}),w.each({Height:"height",Width:"width"},function(e,t){w.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){w.fn[r]=function(i,o){var s=arguments.length&&(n||"boolean"!=typeof i),a=n||(!0===i||!0===o?"margin":"border");return z(this,function(t,n,i){var o;return v(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?w.css(t,n,a):w.style(t,n,i,a)},t,s?i:void 0,s)}})}),w.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){w.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),w.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),w.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),w.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),g(e))return r=o.call(arguments,2),i=function(){return e.apply(t||this,r.concat(o.call(arguments)))},i.guid=e.guid=e.guid||w.guid++,i},w.holdReady=function(e){e?w.readyWait++:w.ready(!0)},w.isArray=Array.isArray,w.parseJSON=JSON.parse,w.nodeName=D,w.isFunction=g,w.isWindow=v,w.camelCase=Y,w.type=x,w.now=Date.now,w.isNumeric=function(e){var t=w.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return w});var Dt=e.jQuery,St=e.$;return w.noConflict=function(t){return e.$===w&&(e.$=St),t&&e.jQuery===w&&(e.jQuery=Dt),w},t||(e.jQuery=e.$=w),w});
@@ -0,0 +1,3 @@
1
+ /*! jQuery Address v1.6 | (c) 2009, 2013 Rostislav Hristov | jquery.org/license */
2
+ /*! modified: https://github.com/Semantic-Org/Semantic-UI-Docs/blob/master/server/files/javascript/library/history.js */
3
+ !function(a){a.address=function(){var x,W,b=function(b){var c=a.extend(a.Event(b),function(){for(var b={},c=a.address.parameterNames(),d=0,e=c.length;e>d;d++)b[c[d]]=a.address.parameter(c[d]);return{value:a.address.value(),path:a.address.path(),pathNames:a.address.pathNames(),parameterNames:c,parameters:b,queryString:a.address.queryString()}}.call(a.address));return a(a.address).trigger(c),c},c=function(a){return Array.prototype.slice.call(a)},d=function(){return a().bind.apply(a(a.address),Array.prototype.slice.call(arguments)),a.address},e=function(){return a().unbind.apply(a(a.address),Array.prototype.slice.call(arguments)),a.address},f=function(){return P.pushState&&I.state!==x},g=function(){return("/"+Q.pathname.replace(new RegExp(I.state),"")+Q.search+(h()?"#"+h():"")).replace(T,"/")},h=function(){var a=Q.href.indexOf("#");return-1!=a?Q.href.substr(a+1):""},i=function(){return f()?g():h()},j=function(){try{return top.document!==x&&top.document.title!==x?top:window}catch(a){return window}},k=function(){return"javascript"},l=function(a){return a=a.toString(),(I.strict&&"/"!=a.substr(0,1)?"/":"")+a},m=function(a,b){return parseInt(a.css(b),10)},n=function(){if(!_){var a=i(),b=decodeURI(eb)!=decodeURI(a);b&&(M&&7>K?Q.reload():(M&&!V&&I.history&&S(q,50),eb=a,o(H)))}},o=function(a){return"null"!==I.tracker&&I.tracker!==y&&S(p,10),b(D).isDefaultPrevented()||b(a?E:F).isDefaultPrevented()},p=function(){if("null"!==I.tracker&&I.tracker!==y){var b=a.isFunction(I.tracker)?I.tracker:N[I.tracker],c=(Q.pathname+Q.search+(a.address&&!f()?a.address.value():"")).replace(/\/\//,"/").replace(/^\/$/,"");a.isFunction(b)?b(c):a.isFunction(N.urchinTracker)?N.urchinTracker(c):N.pageTracker!==x&&a.isFunction(N.pageTracker._trackPageview)?N.pageTracker._trackPageview(c):N._gaq!==x&&a.isFunction(N._gaq.push)&&N._gaq.push(["_trackPageview",decodeURI(c)])}},q=function(){var a=k()+":"+H+";document.open();document.writeln('<html><head><title>"+O.title.replace(/\'/g,"\\'")+"</title><script>var "+z+' = "'+encodeURIComponent(i()).replace(/\'/g,"\\'")+(O.domain!=Q.hostname?'";document.domain="'+O.domain:"")+'";</'+"script></head></html>');document.close();";7>K?W.src=a:W.contentWindow.location.replace(a)},r=function(){if(Y&&-1!=Z){var a,b,c=Y.substr(Z+1).split("&");for(a=0;a<c.length;a++)b=c[a].split("="),/^(autoUpdate|history|strict|wrap)$/.test(b[0])&&(I[b[0]]=isNaN(b[1])?/^(true|yes)$/i.test(b[1]):0!==parseInt(b[1],10)),/^(state|tracker)$/.test(b[0])&&(I[b[0]]=b[1]);Y=y}eb=i()},s=function(){if(!ab){if(ab=G,r(),a('a[rel*="address:"]').address(),I.wrap){var c=a("body");a("body > *").wrapAll('<div style="padding:'+(m(c,"marginTop")+m(c,"paddingTop"))+"px "+(m(c,"marginRight")+m(c,"paddingRight"))+"px "+(m(c,"marginBottom")+m(c,"paddingBottom"))+"px "+(m(c,"marginLeft")+m(c,"paddingLeft"))+'px;" />').parent().wrap('<div id="'+z+'" style="height:100%;overflow:auto;position:relative;'+(L&&!window.statusbar.visible?"resize:both;":"")+'" />'),a("html, body").css({height:"100%",margin:0,padding:0,overflow:"hidden"}),L&&a('<style type="text/css" />').appendTo("head").text("#"+z+"::-webkit-resizer { background-color: #fff; }")}if(M&&!V){var e=O.getElementsByTagName("frameset")[0];W=O.createElement((e?"":"i")+"frame"),W.src=k()+":"+H,e?(e.insertAdjacentElement("beforeEnd",W),e[e.cols?"cols":"rows"]+=",0",W.noResize=G,W.frameBorder=W.frameSpacing=0):(W.style.display="none",W.style.width=W.style.height=0,W.tabIndex=-1,O.body.insertAdjacentElement("afterBegin",W)),S(function(){a(W).bind("load",function(){var a=W.contentWindow;eb=a[z]!==x?a[z]:"",eb!=i()&&(o(H),Q.hash=eb)}),W.contentWindow[z]===x&&q()},50)}S(function(){b("init"),o(H)},1),f()||(M&&K>7||!M&&V?N.addEventListener?N.addEventListener(B,n,H):N.attachEvent&&N.attachEvent("on"+B,n):R(n,50)),"state"in window.history&&a(window).trigger("popstate")}},t=function(){decodeURI(eb)!=decodeURI(i())&&(eb=i(),o(H))},u=function(){N.removeEventListener?N.removeEventListener(B,n,H):N.detachEvent&&N.detachEvent("on"+B,n)},v=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},w=function(){var a={},b=v(navigator.userAgent);return b.browser&&(a[b.browser]=!0,a.version=b.version),a.chrome?a.webkit=!0:a.webkit&&(a.safari=!0),a},y=null,z="jQueryAddress",A="string",B="hashchange",C="init",D="change",E="internalChange",F="externalChange",G=!0,H=!1,I={autoUpdate:G,history:G,strict:G,wrap:H},J=w(),K=parseFloat(J.version),L=J.webkit||J.safari,M=J.msie,N=j(),O=N.document,P=N.history,Q=N.location,R=setInterval,S=setTimeout,T=/\/{2,9}/g,U=navigator.userAgent,V="on"+B in N,Y=a("script:last").attr("src"),Z=Y?Y.indexOf("?"):-1,$=O.title,_=H,ab=H,bb=G,cb=H,eb=i();if(M){K=parseFloat(U.substr(U.indexOf("MSIE")+4)),O.documentMode&&O.documentMode!=K&&(K=8!=O.documentMode?7:8);var fb=O.onpropertychange;O.onpropertychange=function(){fb&&fb.call(O),O.title!=$&&-1!=O.title.indexOf("#"+i())&&(O.title=$)}}if(P.navigationMode&&(P.navigationMode="compatible"),"complete"==document.readyState)var gb=setInterval(function(){a.address&&(s(),clearInterval(gb))},50);else r(),a(s);return a(window).bind("popstate",t).bind("unload",u),{bind:function(){return d.apply(this,c(arguments))},unbind:function(){return e.apply(this,c(arguments))},init:function(){return d.apply(this,[C].concat(c(arguments)))},change:function(){return d.apply(this,[D].concat(c(arguments)))},internalChange:function(){return d.apply(this,[E].concat(c(arguments)))},externalChange:function(){return d.apply(this,[F].concat(c(arguments)))},baseURL:function(){var a=Q.href;return-1!=a.indexOf("#")&&(a=a.substr(0,a.indexOf("#"))),/\/$/.test(a)&&(a=a.substr(0,a.length-1)),a},autoUpdate:function(a){return a!==x?(I.autoUpdate=a,this):I.autoUpdate},history:function(a){return a!==x?(I.history=a,this):I.history},state:function(a){if(a!==x){I.state=a;var b=g();return I.state!==x&&(P.pushState?"/#/"==b.substr(0,3)&&Q.replace(I.state.replace(/^\/$/,"")+b.substr(2)):"/"!=b&&b.replace(/^\/#/,"")!=h()&&S(function(){Q.replace(I.state.replace(/^\/$/,"")+"/#"+b)},1)),this}return I.state},strict:function(a){return a!==x?(I.strict=a,this):I.strict},tracker:function(a){return a!==x?(I.tracker=a,this):I.tracker},wrap:function(a){return a!==x?(I.wrap=a,this):I.wrap},update:function(){return cb=G,this.value(eb),cb=H,this},title:function(a){return a!==x?(S(function(){$=O.title=a,bb&&W&&W.contentWindow&&W.contentWindow.document&&(W.contentWindow.document.title=a,bb=H)},50),this):O.title},value:function(a){if(a!==x){if(a=l(a),"/"==a&&(a=""),eb==a&&!cb)return;if(eb=a,I.autoUpdate||cb){if(o(G))return this;f()?P[I.history?"pushState":"replaceState"]({},"",I.state.replace(/\/$/,"")+(""===eb?"/":eb)):(_=G,L?I.history?Q.hash="#"+eb:Q.replace("#"+eb):eb!=i()&&(I.history?Q.hash="#"+eb:Q.replace("#"+eb)),M&&!V&&I.history&&S(q,50),L?S(function(){_=H},1):_=H)}return this}return l(eb)},path:function(a){if(a!==x){var b=this.queryString(),c=this.hash();return this.value(a+(b?"?"+b:"")+(c?"#"+c:"")),this}return l(eb).split("#")[0].split("?")[0]},pathNames:function(){var a=this.path(),b=a.replace(T,"/").split("/");return("/"==a.substr(0,1)||0===a.length)&&b.splice(0,1),"/"==a.substr(a.length-1,1)&&b.splice(b.length-1,1),b},queryString:function(a){if(a!==x){var b=this.hash();return this.value(this.path()+(a?"?"+a:"")+(b?"#"+b:"")),this}var c=eb.split("?");return c.slice(1,c.length).join("?").split("#")[0]},parameter:function(b,c,d){var e,f;if(c!==x){var g=this.parameterNames();for(f=[],c=c===x||c===y?"":c.toString(),e=0;e<g.length;e++){var h=g[e],i=this.parameter(h);typeof i==A&&(i=[i]),h==b&&(i=c===y||""===c?[]:d?i.concat([c]):[c]);for(var j=0;j<i.length;j++)f.push(h+"="+i[j])}return-1==a.inArray(b,g)&&c!==y&&""!==c&&f.push(b+"="+c),this.queryString(f.join("&")),this}if(c=this.queryString()){var k=[];for(f=c.split("&"),e=0;e<f.length;e++){var l=f[e].split("=");l[0]==b&&k.push(l.slice(1).join("="))}if(0!==k.length)return 1!=k.length?k:k[0]}},parameterNames:function(){var b=this.queryString(),c=[];if(b&&-1!=b.indexOf("="))for(var d=b.split("&"),e=0;e<d.length;e++){var f=d[e].split("=")[0];-1==a.inArray(f,c)&&c.push(f)}return c},hash:function(a){if(a!==x)return this.value(eb.split("#")[0]+(a?"#"+a:"")),this;var b=eb.split("#");return b.slice(1,b.length).join("#")}}}(),a.fn.address=function(b){return this.data("address")||this.on("click",function(c){if(c.shiftKey||c.ctrlKey||c.metaKey||2==c.which)return!0;var d=c.currentTarget;if(a(d).is("a")){c.preventDefault();var e=b?b.call(d):/address:/.test(a(d).attr("rel"))?a(d).attr("rel").split("address:")[1].split(" ")[0]:void 0===a.address.state()||/^\/?$/.test(a.address.state())?a(d).attr("href").replace(/^(#\!?|\.)/,""):a(d).attr("href").replace(new RegExp("^(.*"+a.address.state()+"|\\.)"),"");a.address.value(e)}}).on("submit",function(c){var d=c.currentTarget;if(a(d).is("form")){c.preventDefault();var e=a(d).attr("action"),f=b?b.call(d):(-1!=e.indexOf("?")?e.replace(/&$/,""):e+"?")+a(d).serialize();a.address.value(f)}}).data("address",!0),this}}(jQuery);
@@ -0,0 +1,2 @@
1
+ /*! loadCSS rel=preload polyfill. [c]2017 Filament Group, Inc. MIT License */
2
+ !function(e){"use strict";var n=function(n,t,o){var i,r=e.document,d=r.createElement("link");if(t)i=t;else{var a=(r.body||r.getElementsByTagName("head")[0]).childNodes;i=a[a.length-1]}var l=r.styleSheets;d.rel="stylesheet",d.href=n,d.media="only x",function e(n){if(r.body)return n();setTimeout(function(){e(n)})}(function(){i.parentNode.insertBefore(d,t?i:i.nextSibling)});var f=function(e){for(var n=d.href,t=l.length;t--;)if(l[t].href===n)return e();setTimeout(function(){f(e)})};function s(){d.addEventListener&&d.removeEventListener("load",s),d.media=o||"all"}return d.addEventListener&&d.addEventListener("load",s),d.onloadcssdefined=f,f(s),d};"undefined"!=typeof exports?exports.loadCSS=n:e.loadCSS=n}("undefined"!=typeof global?global:this);
@@ -0,0 +1,11 @@
1
+ /*! mousetrap v1.6.1 craig.is/killing/mice */
2
+ (function(r,v,f){function w(a,b,g){a.addEventListener?a.addEventListener(b,g,!1):a.attachEvent("on"+b,g)}function A(a){if("keypress"==a.type){var b=String.fromCharCode(a.which);a.shiftKey||(b=b.toLowerCase());return b}return p[a.which]?p[a.which]:t[a.which]?t[a.which]:String.fromCharCode(a.which).toLowerCase()}function F(a){var b=[];a.shiftKey&&b.push("shift");a.altKey&&b.push("alt");a.ctrlKey&&b.push("ctrl");a.metaKey&&b.push("meta");return b}function x(a){return"shift"==a||"ctrl"==a||"alt"==a||
3
+ "meta"==a}function B(a,b){var g,c,d,f=[];g=a;"+"===g?g=["+"]:(g=g.replace(/\+{2}/g,"+plus"),g=g.split("+"));for(d=0;d<g.length;++d)c=g[d],C[c]&&(c=C[c]),b&&"keypress"!=b&&D[c]&&(c=D[c],f.push("shift")),x(c)&&f.push(c);g=c;d=b;if(!d){if(!n){n={};for(var q in p)95<q&&112>q||p.hasOwnProperty(q)&&(n[p[q]]=q)}d=n[g]?"keydown":"keypress"}"keypress"==d&&f.length&&(d="keydown");return{key:c,modifiers:f,action:d}}function E(a,b){return null===a||a===v?!1:a===b?!0:E(a.parentNode,b)}function c(a){function b(a){a=
4
+ a||{};var b=!1,l;for(l in n)a[l]?b=!0:n[l]=0;b||(y=!1)}function g(a,b,u,e,c,g){var l,m,k=[],f=u.type;if(!h._callbacks[a])return[];"keyup"==f&&x(a)&&(b=[a]);for(l=0;l<h._callbacks[a].length;++l)if(m=h._callbacks[a][l],(e||!m.seq||n[m.seq]==m.level)&&f==m.action){var d;(d="keypress"==f&&!u.metaKey&&!u.ctrlKey)||(d=m.modifiers,d=b.sort().join(",")===d.sort().join(","));d&&(d=e&&m.seq==e&&m.level==g,(!e&&m.combo==c||d)&&h._callbacks[a].splice(l,1),k.push(m))}return k}function f(a,b,c,e){h.stopCallback(b,
5
+ b.target||b.srcElement,c,e)||!1!==a(b,c)||(b.preventDefault?b.preventDefault():b.returnValue=!1,b.stopPropagation?b.stopPropagation():b.cancelBubble=!0)}function d(a){"number"!==typeof a.which&&(a.which=a.keyCode);var b=A(a);b&&("keyup"==a.type&&z===b?z=!1:h.handleKey(b,F(a),a))}function p(a,c,u,e){function l(c){return function(){y=c;++n[a];clearTimeout(r);r=setTimeout(b,1E3)}}function g(c){f(u,c,a);"keyup"!==e&&(z=A(c));setTimeout(b,10)}for(var d=n[a]=0;d<c.length;++d){var m=d+1===c.length?g:l(e||
6
+ B(c[d+1]).action);q(c[d],m,e,a,d)}}function q(a,b,c,e,d){h._directMap[a+":"+c]=b;a=a.replace(/\s+/g," ");var f=a.split(" ");1<f.length?p(a,f,b,c):(c=B(a,c),h._callbacks[c.key]=h._callbacks[c.key]||[],g(c.key,c.modifiers,{type:c.action},e,a,d),h._callbacks[c.key][e?"unshift":"push"]({callback:b,modifiers:c.modifiers,action:c.action,seq:e,level:d,combo:a}))}var h=this;a=a||v;if(!(h instanceof c))return new c(a);h.target=a;h._callbacks={};h._directMap={};var n={},r,z=!1,t=!1,y=!1;h._handleKey=function(a,
7
+ c,d){var e=g(a,c,d),k;c={};var h=0,l=!1;for(k=0;k<e.length;++k)e[k].seq&&(h=Math.max(h,e[k].level));for(k=0;k<e.length;++k)e[k].seq?e[k].level==h&&(l=!0,c[e[k].seq]=1,f(e[k].callback,d,e[k].combo,e[k].seq)):l||f(e[k].callback,d,e[k].combo);e="keypress"==d.type&&t;d.type!=y||x(a)||e||b(c);t=l&&"keydown"==d.type};h._bindMultiple=function(a,b,c){for(var d=0;d<a.length;++d)q(a[d],b,c)};w(a,"keypress",d);w(a,"keydown",d);w(a,"keyup",d)}if(r){var p={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",
8
+ 18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},t={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},D={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},C={option:"alt",command:"meta","return":"enter",
9
+ escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},n;for(f=1;20>f;++f)p[111+f]="f"+f;for(f=0;9>=f;++f)p[f+96]=f.toString();c.prototype.bind=function(a,b,c){a=a instanceof Array?a:[a];this._bindMultiple.call(this,a,b,c);return this};c.prototype.unbind=function(a,b){return this.bind.call(this,a,function(){},b)};c.prototype.trigger=function(a,b){if(this._directMap[a+":"+b])this._directMap[a+":"+b]({},a);return this};c.prototype.reset=function(){this._callbacks={};
10
+ this._directMap={};return this};c.prototype.stopCallback=function(a,b){return-1<(" "+b.className+" ").indexOf(" mousetrap ")||E(b,this.target)?!1:"INPUT"==b.tagName||"SELECT"==b.tagName||"TEXTAREA"==b.tagName||b.isContentEditable};c.prototype.handleKey=function(){return this._handleKey.apply(this,arguments)};c.addKeycodes=function(a){for(var b in a)a.hasOwnProperty(b)&&(p[b]=a[b]);n=null};c.init=function(){var a=c(v),b;for(b in a)"_"!==b.charAt(0)&&(c[b]=function(b){return function(){return a[b].apply(a,
11
+ arguments)}}(b))};c.init();r.Mousetrap=c;"undefined"!==typeof module&&module.exports&&(module.exports=c);"function"===typeof define&&define.amd&&define(function(){return c})}})("undefined"!==typeof window?window:null,"undefined"!==typeof window?document:null);
@@ -0,0 +1,37 @@
1
+ sidebar_init = function() {
2
+ $('#sidebar-retractable')
3
+ .sidebar({
4
+ closable: true,
5
+ dimPage: false,
6
+ transition: 'push',
7
+ })
8
+ .sidebar('attach events', '#site-title .toggle.item', 'toggle')
9
+ ;
10
+ };
11
+
12
+ $(sidebar_init);
13
+
14
+ ensure_mobile_view = function() {
15
+ if (0 == $('#sidebar-retractable').has('#collection-indices').length) {
16
+ $('#collection-indices').appendTo( $('#sidebar-retractable') );
17
+ }
18
+ };
19
+ ensure_desktop_view = function() {
20
+ if (0 == $('#sidebar-fixed').has('#collection-indices').length) {
21
+ $('#collection-indices').appendTo( $('#sidebar-fixed') );
22
+ }
23
+ if ($('#sidebar-retractable').sidebar('is visible')) {
24
+ $('#sidebar-retractable').sidebar('hide');
25
+ }
26
+ };
27
+ check_sidebar_visibility = function() {
28
+ if ('none' == $('#sidebar-fixed').css('display')) ensure_mobile_view();
29
+ else ensure_desktop_view();
30
+ };
31
+
32
+ set_resize_handler = function() {
33
+ check_sidebar_visibility();
34
+ $(window).resize(check_sidebar_visibility);
35
+ };
36
+
37
+ $(set_resize_handler);
@@ -0,0 +1,30 @@
1
+ site_search_init = function() {
2
+ var search_content = [
3
+ {% for collection in site.collections %}
4
+ {% unless collection.label == 'posts' %}
5
+ {% for doc in collection.docs %}
6
+ {% assign title = doc.title %}
7
+ {% capture url %}{{ doc.url }}#/{{ collection.label | downcase }}/{% endcapture %}
8
+ {% case doc.layout %}
9
+ {% when 'package' %}
10
+ {% assign title = doc.module %}
11
+ {% when 'type' %}
12
+ {% assign title = doc.name %}
13
+ {% endcase %}
14
+ { title: '{{ title }}', url: '{{ site.baseurl }}{{ url }}' },
15
+ {% endfor %}
16
+ {% endunless %}
17
+ {% endfor %}
18
+ ];
19
+
20
+ // urls are auto-followed, so no callback needed
21
+ $('#site-search').search({
22
+ source: search_content,
23
+ selectFirstResult: true,
24
+ });
25
+
26
+ // set up shortut key for search input focus
27
+ Mousetrap.bind('s', function() { $( '#site-search .prompt' ).focus(); return false; });
28
+ };
29
+
30
+ $(site_search_init);
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * Semantic UI 2.3.0
3
+ * http://github.com/semantic-org/semantic-ui/
4
+ * http://opensource.org/licenses/MIT
5
+ */
@@ -0,0 +1 @@
1
+ !function(e,i,n,t){"use strict";i=void 0!==i&&i.Math==Math?i:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.dimmer=function(i){var t,o=e(this),a=(new Date).getTime(),r=[],s=arguments[0],d="string"==typeof s,m=[].slice.call(arguments,1);return o.each(function(){var c,u,l,f=e.isPlainObject(i)?e.extend(!0,{},e.fn.dimmer.settings,i):e.extend({},e.fn.dimmer.settings),g=f.selector,p=f.namespace,v=f.className,h=f.error,b="."+p,y="module-"+p,C=o.selector||"",w="ontouchstart"in n.documentElement?"touchstart":"click",S=e(this),T=this,D=S.data(y);(l={preinitialize:function(){l.is.dimmer()?(u=S.parent(),c=S):(u=S,c=l.has.dimmer()?f.dimmerName?u.find(g.dimmer).filter("."+f.dimmerName):u.find(g.dimmer):l.create(),l.set.variation())},initialize:function(){l.debug("Initializing dimmer",f),l.bind.events(),l.set.dimmable(),l.instantiate()},instantiate:function(){l.verbose("Storing instance of module",l),D=l,S.data(y,D)},destroy:function(){l.verbose("Destroying previous module",c),l.unbind.events(),l.remove.variation(),u.off(b)},bind:{events:function(){"hover"==f.on?u.on("mouseenter"+b,l.show).on("mouseleave"+b,l.hide):"click"==f.on&&u.on(w+b,l.toggle),l.is.page()&&(l.debug("Setting as a page dimmer",u),l.set.pageDimmer()),l.is.closable()&&(l.verbose("Adding dimmer close event",c),u.on(w+b,g.dimmer,l.event.click))}},unbind:{events:function(){S.removeData(y),u.off(b)}},event:{click:function(i){l.verbose("Determining if event occured on dimmer",i),(0===c.find(i.target).length||e(i.target).is(g.content))&&(l.hide(),i.stopImmediatePropagation())}},addContent:function(i){var n=e(i);l.debug("Add content to dimmer",n),n.parent()[0]!==c[0]&&n.detach().appendTo(c)},create:function(){var i=e(f.template.dimmer());return f.dimmerName&&(l.debug("Creating named dimmer",f.dimmerName),i.addClass(f.dimmerName)),i.appendTo(u),i},show:function(i){i=e.isFunction(i)?i:function(){},l.debug("Showing dimmer",c,f),l.is.dimmed()&&!l.is.animating()||!l.is.enabled()?l.debug("Dimmer is already shown or disabled"):(l.animate.show(i),f.onShow.call(T),f.onChange.call(T))},hide:function(i){i=e.isFunction(i)?i:function(){},l.is.dimmed()||l.is.animating()?(l.debug("Hiding dimmer",c),l.animate.hide(i),f.onHide.call(T),f.onChange.call(T)):l.debug("Dimmer is not visible")},toggle:function(){l.verbose("Toggling dimmer visibility",c),l.is.dimmed()?l.hide():l.show()},animate:{show:function(i){i=e.isFunction(i)?i:function(){},f.useCSS&&void 0!==e.fn.transition&&c.transition("is supported")?("auto"!==f.opacity&&l.set.opacity(),c.transition({displayType:"flex",animation:f.transition+" in",queue:!1,duration:l.get.duration(),useFailSafe:!0,onStart:function(){l.set.dimmed()},onComplete:function(){l.set.active(),i()}})):(l.verbose("Showing dimmer animation with javascript"),l.set.dimmed(),"auto"==f.opacity&&(f.opacity=.8),c.stop().css({opacity:0,width:"100%",height:"100%"}).fadeTo(l.get.duration(),f.opacity,function(){c.removeAttr("style"),l.set.active(),i()}))},hide:function(i){i=e.isFunction(i)?i:function(){},f.useCSS&&void 0!==e.fn.transition&&c.transition("is supported")?(l.verbose("Hiding dimmer with css"),c.transition({displayType:"flex",animation:f.transition+" out",queue:!1,duration:l.get.duration(),useFailSafe:!0,onStart:function(){l.remove.dimmed()},onComplete:function(){l.remove.active(),i()}})):(l.verbose("Hiding dimmer with javascript"),l.remove.dimmed(),c.stop().fadeOut(l.get.duration(),function(){l.remove.active(),c.removeAttr("style"),i()}))}},get:{dimmer:function(){return c},duration:function(){return"object"==typeof f.duration?l.is.active()?f.duration.hide:f.duration.show:f.duration}},has:{dimmer:function(){return f.dimmerName?S.find(g.dimmer).filter("."+f.dimmerName).length>0:S.find(g.dimmer).length>0}},is:{active:function(){return c.hasClass(v.active)},animating:function(){return c.is(":animated")||c.hasClass(v.animating)},closable:function(){return"auto"==f.closable?"hover"!=f.on:f.closable},dimmer:function(){return S.hasClass(v.dimmer)},dimmable:function(){return S.hasClass(v.dimmable)},dimmed:function(){return u.hasClass(v.dimmed)},disabled:function(){return u.hasClass(v.disabled)},enabled:function(){return!l.is.disabled()},page:function(){return u.is("body")},pageDimmer:function(){return c.hasClass(v.pageDimmer)}},can:{show:function(){return!c.hasClass(v.disabled)}},set:{opacity:function(e){var i=c.css("background-color"),n=i.split(","),t=n&&3==n.length,o=n&&4==n.length;e=0===f.opacity?0:f.opacity||e,t||o?(n[3]=e+")",i=n.join(",")):i="rgba(0, 0, 0, "+e+")",l.debug("Setting opacity to",e),c.css("background-color",i)},active:function(){c.addClass(v.active)},dimmable:function(){u.addClass(v.dimmable)},dimmed:function(){u.addClass(v.dimmed)},pageDimmer:function(){c.addClass(v.pageDimmer)},disabled:function(){c.addClass(v.disabled)},variation:function(e){(e=e||f.variation)&&c.addClass(e)}},remove:{active:function(){c.removeClass(v.active)},dimmed:function(){u.removeClass(v.dimmed)},disabled:function(){c.removeClass(v.disabled)},variation:function(e){(e=e||f.variation)&&c.removeClass(e)}},setting:function(i,n){if(l.debug("Changing setting",i,n),e.isPlainObject(i))e.extend(!0,f,i);else{if(void 0===n)return f[i];e.isPlainObject(f[i])?e.extend(!0,f[i],n):f[i]=n}},internal:function(i,n){if(e.isPlainObject(i))e.extend(!0,l,i);else{if(void 0===n)return l[i];l[i]=n}},debug:function(){!f.silent&&f.debug&&(f.performance?l.performance.log(arguments):(l.debug=Function.prototype.bind.call(console.info,console,f.name+":"),l.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?l.performance.log(arguments):(l.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),l.verbose.apply(console,arguments)))},error:function(){f.silent||(l.error=Function.prototype.bind.call(console.error,console,f.name+":"),l.error.apply(console,arguments))},performance:{log:function(e){var i,n;f.performance&&(n=(i=(new Date).getTime())-(a||i),a=i,r.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:T,"Execution Time":n})),clearTimeout(l.performance.timer),l.performance.timer=setTimeout(l.performance.display,500)},display:function(){var i=f.name+":",n=0;a=!1,clearTimeout(l.performance.timer),e.each(r,function(e,i){n+=i["Execution Time"]}),i+=" "+n+"ms",C&&(i+=" '"+C+"'"),o.length>1&&(i+=" ("+o.length+")"),(void 0!==console.group||void 0!==console.table)&&r.length>0&&(console.groupCollapsed(i),console.table?console.table(r):e.each(r,function(e,i){console.log(i.Name+": "+i["Execution Time"]+"ms")}),console.groupEnd()),r=[]}},invoke:function(i,n,o){var a,r,s,d=D;return n=n||m,o=T||o,"string"==typeof i&&void 0!==d&&(i=i.split(/[\. ]/),a=i.length-1,e.each(i,function(n,t){var o=n!=a?t+i[n+1].charAt(0).toUpperCase()+i[n+1].slice(1):i;if(e.isPlainObject(d[o])&&n!=a)d=d[o];else{if(void 0!==d[o])return r=d[o],!1;if(!e.isPlainObject(d[t])||n==a)return void 0!==d[t]?(r=d[t],!1):(l.error(h.method,i),!1);d=d[t]}})),e.isFunction(r)?s=r.apply(o,n):void 0!==r&&(s=r),e.isArray(t)?t.push(s):void 0!==t?t=[t,s]:void 0!==s&&(t=s),r}}).preinitialize(),d?(void 0===D&&l.initialize(),l.invoke(s)):(void 0!==D&&D.invoke("destroy"),l.initialize())}),void 0!==t?t:this},e.fn.dimmer.settings={name:"Dimmer",namespace:"dimmer",silent:!1,debug:!1,verbose:!1,performance:!0,dimmerName:!1,variation:!1,closable:"auto",useCSS:!0,transition:"fade",on:!1,opacity:"auto",duration:{show:500,hide:500},onChange:function(){},onShow:function(){},onHide:function(){},error:{method:"The method you called is not defined."},className:{active:"active",animating:"animating",dimmable:"dimmable",dimmed:"dimmed",dimmer:"dimmer",disabled:"disabled",hide:"hide",pageDimmer:"page",show:"show"},selector:{dimmer:"> .ui.dimmer",content:".ui.dimmer > .content, .ui.dimmer > .content > .center"},template:{dimmer:function(){return e("<div />").attr("class","ui dimmer")}}}}(jQuery,window,document);
@@ -0,0 +1 @@
1
+ !function(e,i,n,t){"use strict";i=void 0!==i&&i.Math==Math?i:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.modal=function(t){var o,a=e(this),r=e(i),s=e(n),c=e("body"),l=a.selector||"",d=(new Date).getTime(),u=[],m=arguments[0],f="string"==typeof m,g=[].slice.call(arguments,1),h=i.requestAnimationFrame||i.mozRequestAnimationFrame||i.webkitRequestAnimationFrame||i.msRequestAnimationFrame||function(e){setTimeout(e,0)};return a.each(function(){var a,v,b,p,y,k,w,S,C,M=e.isPlainObject(t)?e.extend(!0,{},e.fn.modal.settings,t):e.extend({},e.fn.modal.settings),H=M.selector,F=M.className,D=M.namespace,A=M.error,x="."+D,T="module-"+D,O=e(this),z=e(M.context),q=O.find(H.close),E=this,j=O.data(T),N=!1;C={initialize:function(){C.verbose("Initializing dimmer",z),C.create.id(),C.create.dimmer(),C.refreshModals(),C.bind.events(),M.observeChanges&&C.observeChanges(),C.instantiate()},instantiate:function(){C.verbose("Storing instance of modal"),j=C,O.data(T,j)},create:{dimmer:function(){var i={debug:M.debug,variation:!M.centered&&"top aligned",dimmerName:"modals"},n=e.extend(!0,i,M.dimmerSettings);void 0!==e.fn.dimmer?(C.debug("Creating dimmer"),p=z.dimmer(n),M.detachable?(C.verbose("Modal is detachable, moving content into dimmer"),p.dimmer("add content",O)):C.set.undetached(),y=p.dimmer("get dimmer")):C.error(A.dimmer)},id:function(){w=(Math.random().toString(16)+"000000000").substr(2,8),k="."+w,C.verbose("Creating unique id for element",w)}},destroy:function(){C.verbose("Destroying previous modal"),O.removeData(T).off(x),r.off(k),y.off(k),q.off(x),z.dimmer("destroy")},observeChanges:function(){"MutationObserver"in i&&((S=new MutationObserver(function(e){C.debug("DOM tree modified, refreshing"),C.refresh()})).observe(E,{childList:!0,subtree:!0}),C.debug("Setting up mutation observer",S))},refresh:function(){C.remove.scrolling(),C.cacheSizes(),C.set.screenHeight(),C.set.type()},refreshModals:function(){v=O.siblings(H.modal),a=v.add(O)},attachEvents:function(i,n){var t=e(i);n=e.isFunction(C[n])?C[n]:C.toggle,t.length>0?(C.debug("Attaching modal events to element",i,n),t.off(x).on("click"+x,n)):C.error(A.notFound,i)},bind:{events:function(){C.verbose("Attaching events"),O.on("click"+x,H.close,C.event.close).on("click"+x,H.approve,C.event.approve).on("click"+x,H.deny,C.event.deny),r.on("resize"+k,C.event.resize)}},get:{id:function(){return(Math.random().toString(16)+"000000000").substr(2,8)}},event:{approve:function(){N||!1===M.onApprove.call(E,e(this))?C.verbose("Approve callback returned false cancelling hide"):(N=!0,C.hide(function(){N=!1}))},deny:function(){N||!1===M.onDeny.call(E,e(this))?C.verbose("Deny callback returned false cancelling hide"):(N=!0,C.hide(function(){N=!1}))},close:function(){C.hide()},click:function(i){if(M.closable){var t=e(i.target).closest(H.modal).length>0,o=e.contains(n.documentElement,i.target);!t&&o&&C.is.active()&&(C.debug("Dimmer clicked, hiding all modals"),C.remove.clickaway(),M.allowMultiple?C.hide():C.hideAll())}else C.verbose("Dimmer clicked but closable setting is disabled")},debounce:function(e,i){clearTimeout(C.timer),C.timer=setTimeout(e,i)},keyboard:function(e){27==e.which&&(M.closable?(C.debug("Escape key pressed hiding modal"),C.hide()):C.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){p.dimmer("is active")&&(C.is.animating()||C.is.active())&&h(C.refresh)}},toggle:function(){C.is.active()||C.is.animating()?C.hide():C.show()},show:function(i){i=e.isFunction(i)?i:function(){},C.refreshModals(),C.set.dimmerSettings(),C.showModal(i)},hide:function(i){i=e.isFunction(i)?i:function(){},C.refreshModals(),C.hideModal(i)},showModal:function(i){i=e.isFunction(i)?i:function(){},C.is.animating()||!C.is.active()?(C.showDimmer(),C.cacheSizes(),C.set.screenHeight(),C.set.type(),C.set.clickaway(),!M.allowMultiple&&C.others.active()?C.hideOthers(C.showModal):(M.allowMultiple&&M.detachable&&O.detach().appendTo(y),M.onShow.call(E),M.transition&&void 0!==e.fn.transition&&O.transition("is supported")?(C.debug("Showing modal with css animations"),O.transition({debug:M.debug,animation:M.transition+" in",queue:M.queue,duration:M.duration,useFailSafe:!0,onComplete:function(){M.onVisible.apply(E),M.keyboardShortcuts&&C.add.keyboardShortcuts(),C.save.focus(),C.set.active(),M.autofocus&&C.set.autofocus(),i()}})):C.error(A.noTransition))):C.debug("Modal is already visible")},hideModal:function(i,n){i=e.isFunction(i)?i:function(){},C.debug("Hiding modal"),!1!==M.onHide.call(E,e(this))?(C.is.animating()||C.is.active())&&(M.transition&&void 0!==e.fn.transition&&O.transition("is supported")?(C.remove.active(),O.transition({debug:M.debug,animation:M.transition+" out",queue:M.queue,duration:M.duration,useFailSafe:!0,onStart:function(){C.others.active()||n||C.hideDimmer(),M.keyboardShortcuts&&C.remove.keyboardShortcuts()},onComplete:function(){M.onHidden.call(E),C.restore.focus(),i()}})):C.error(A.noTransition)):C.verbose("Hide callback returned false cancelling hide")},showDimmer:function(){p.dimmer("is animating")||!p.dimmer("is active")?(C.debug("Showing dimmer"),p.dimmer("show")):C.debug("Dimmer already visible")},hideDimmer:function(){p.dimmer("is animating")||p.dimmer("is active")?p.dimmer("hide",function(){C.remove.clickaway(),C.remove.screenHeight()}):C.debug("Dimmer is not visible cannot hide")},hideAll:function(i){var n=a.filter("."+F.active+", ."+F.animating);i=e.isFunction(i)?i:function(){},n.length>0&&(C.debug("Hiding all visible modals"),C.hideDimmer(),n.modal("hide modal",i))},hideOthers:function(i){var n=v.filter("."+F.active+", ."+F.animating);i=e.isFunction(i)?i:function(){},n.length>0&&(C.debug("Hiding other modals",v),n.modal("hide modal",i,!0))},others:{active:function(){return v.filter("."+F.active).length>0},animating:function(){return v.filter("."+F.animating).length>0}},add:{keyboardShortcuts:function(){C.verbose("Adding keyboard shortcuts"),s.on("keyup"+x,C.event.keyboard)}},save:{focus:function(){e(n.activeElement).closest(O).length>0||(b=e(n.activeElement).blur())}},restore:{focus:function(){b&&b.length>0&&b.focus()}},remove:{active:function(){O.removeClass(F.active)},clickaway:function(){y.off("click"+k)},bodyStyle:function(){""===c.attr("style")&&(C.verbose("Removing style attribute"),c.removeAttr("style"))},screenHeight:function(){C.debug("Removing page height"),c.css("height","")},keyboardShortcuts:function(){C.verbose("Removing keyboard shortcuts"),s.off("keyup"+x)},scrolling:function(){p.removeClass(F.scrolling),O.removeClass(F.scrolling)}},cacheSizes:function(){O.addClass(F.loading);var t=O.prop("scrollHeight"),o=O.outerHeight();void 0!==C.cache&&0===o||(C.cache={pageHeight:e(n).outerHeight(),height:o+M.offset,scrollHeight:t+M.offset,contextHeight:"body"==M.context?e(i).height():p.height()},C.cache.topOffset=-C.cache.height/2),O.removeClass(F.loading),C.debug("Caching modal and container sizes",C.cache)},can:{fit:function(){var e=C.cache.contextHeight,i=C.cache.contextHeight/2,n=C.cache.topOffset,t=C.cache.scrollHeight,o=C.cache.height,a=M.padding;return t>o?i+n+t+a<e:o+2*a<e}},is:{active:function(){return O.hasClass(F.active)},animating:function(){return O.transition("is supported")?O.transition("is animating"):O.is(":visible")},scrolling:function(){return p.hasClass(F.scrolling)},modernBrowser:function(){return!(i.ActiveXObject||"ActiveXObject"in i)}},set:{autofocus:function(){var e=O.find("[tabindex], :input").filter(":visible"),i=e.filter("[autofocus]"),n=i.length>0?i.first():e.first();n.length>0&&n.focus()},clickaway:function(){y.on("click"+k,C.event.click)},dimmerSettings:function(){if(void 0!==e.fn.dimmer){var i={debug:M.debug,dimmerName:"modals",closable:"auto",variation:!M.centered&&"top aligned",duration:{show:M.duration,hide:M.duration}},n=e.extend(!0,i,M.dimmerSettings);M.inverted?(n.variation=void 0!==n.variation?n.variation+" inverted":"inverted",y.addClass(F.inverted)):y.removeClass(F.inverted),M.blurring?p.addClass(F.blurring):p.removeClass(F.blurring),z.dimmer("setting",n)}else C.error(A.dimmer)},screenHeight:function(){C.can.fit()?c.css("height",""):(C.debug("Modal is taller than page content, resizing page height"),c.css("height",C.cache.height+2*M.padding))},active:function(){O.addClass(F.active)},scrolling:function(){p.addClass(F.scrolling),O.addClass(F.scrolling)},type:function(){C.can.fit()?(C.verbose("Modal fits on screen"),C.others.active()||C.others.animating()||C.remove.scrolling()):(C.verbose("Modal cannot fit on screen setting to scrolling"),C.set.scrolling())},undetached:function(){p.addClass(F.undetached)}},setting:function(i,n){if(C.debug("Changing setting",i,n),e.isPlainObject(i))e.extend(!0,M,i);else{if(void 0===n)return M[i];e.isPlainObject(M[i])?e.extend(!0,M[i],n):M[i]=n}},internal:function(i,n){if(e.isPlainObject(i))e.extend(!0,C,i);else{if(void 0===n)return C[i];C[i]=n}},debug:function(){!M.silent&&M.debug&&(M.performance?C.performance.log(arguments):(C.debug=Function.prototype.bind.call(console.info,console,M.name+":"),C.debug.apply(console,arguments)))},verbose:function(){!M.silent&&M.verbose&&M.debug&&(M.performance?C.performance.log(arguments):(C.verbose=Function.prototype.bind.call(console.info,console,M.name+":"),C.verbose.apply(console,arguments)))},error:function(){M.silent||(C.error=Function.prototype.bind.call(console.error,console,M.name+":"),C.error.apply(console,arguments))},performance:{log:function(e){var i,n;M.performance&&(n=(i=(new Date).getTime())-(d||i),d=i,u.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:E,"Execution Time":n})),clearTimeout(C.performance.timer),C.performance.timer=setTimeout(C.performance.display,500)},display:function(){var i=M.name+":",n=0;d=!1,clearTimeout(C.performance.timer),e.each(u,function(e,i){n+=i["Execution Time"]}),i+=" "+n+"ms",l&&(i+=" '"+l+"'"),(void 0!==console.group||void 0!==console.table)&&u.length>0&&(console.groupCollapsed(i),console.table?console.table(u):e.each(u,function(e,i){console.log(i.Name+": "+i["Execution Time"]+"ms")}),console.groupEnd()),u=[]}},invoke:function(i,n,t){var a,r,s,c=j;return n=n||g,t=E||t,"string"==typeof i&&void 0!==c&&(i=i.split(/[\. ]/),a=i.length-1,e.each(i,function(n,t){var o=n!=a?t+i[n+1].charAt(0).toUpperCase()+i[n+1].slice(1):i;if(e.isPlainObject(c[o])&&n!=a)c=c[o];else{if(void 0!==c[o])return r=c[o],!1;if(!e.isPlainObject(c[t])||n==a)return void 0!==c[t]&&(r=c[t],!1);c=c[t]}})),e.isFunction(r)?s=r.apply(t,n):void 0!==r&&(s=r),e.isArray(o)?o.push(s):void 0!==o?o=[o,s]:void 0!==s&&(o=s),r}},f?(void 0===j&&C.initialize(),C.invoke(m)):(void 0!==j&&j.invoke("destroy"),C.initialize())}),void 0!==o?o:this},e.fn.modal.settings={name:"Modal",namespace:"modal",silent:!1,debug:!1,verbose:!1,performance:!0,observeChanges:!1,allowMultiple:!1,detachable:!0,closable:!0,autofocus:!0,inverted:!1,blurring:!1,centered:!0,dimmerSettings:{closable:!1,useCSS:!0},keyboardShortcuts:!0,context:"body",queue:!1,duration:500,offset:0,transition:"scale",padding:50,onShow:function(){},onVisible:function(){},onHide:function(){return!0},onHidden:function(){},onApprove:function(){return!0},onDeny:function(){return!0},selector:{close:"> .close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel",modal:".ui.modal"},error:{dimmer:"UI Dimmer, a required component is not included in this page",method:"The method you called is not defined.",notFound:"The element you specified could not be found"},className:{active:"active",animating:"animating",blurring:"blurring",inverted:"inverted",loading:"loading",scrolling:"scrolling",undetached:"undetached"}}}(jQuery,window,document);
@@ -0,0 +1 @@
1
+ !function(e,t,s,n){"use strict";t=void 0!==t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.search=function(n){var r,i=e(this),a=i.selector||"",o=(new Date).getTime(),c=[],u=arguments[0],l="string"==typeof u,d=[].slice.call(arguments,1);return e(this).each(function(){var f,v=e.isPlainObject(n)?e.extend(!0,{},e.fn.search.settings,n):e.extend({},e.fn.search.settings),g=v.className,h=v.metadata,p=v.regExp,m=v.fields,y=v.selector,b=v.error,R=v.namespace,C="."+R,x=R+"-module",w=e(this),S=w.find(y.prompt),F=w.find(y.searchButton),j=w.find(y.results),T=w.find(y.result),k=w.find(y.category),A=this,q=w.data(x),E=!1,D=!1;f={initialize:function(){f.verbose("Initializing module"),f.get.settings(),f.determine.searchFields(),f.bind.events(),f.set.type(),f.create.results(),f.instantiate()},instantiate:function(){f.verbose("Storing instance of module",f),q=f,w.data(x,f)},destroy:function(){f.verbose("Destroying instance"),w.off(C).removeData(x)},refresh:function(){f.debug("Refreshing selector cache"),S=w.find(y.prompt),F=w.find(y.searchButton),k=w.find(y.category),j=w.find(y.results),T=w.find(y.result)},refreshResults:function(){j=w.find(y.results),T=w.find(y.result)},bind:{events:function(){f.verbose("Binding events to search"),v.automatic&&(w.on(f.get.inputEvent()+C,y.prompt,f.event.input),S.attr("autocomplete","off")),w.on("focus"+C,y.prompt,f.event.focus).on("blur"+C,y.prompt,f.event.blur).on("keydown"+C,y.prompt,f.handleKeyboard).on("click"+C,y.searchButton,f.query).on("mousedown"+C,y.results,f.event.result.mousedown).on("mouseup"+C,y.results,f.event.result.mouseup).on("click"+C,y.result,f.event.result.click)}},determine:{searchFields:function(){n&&void 0!==n.searchFields&&(v.searchFields=n.searchFields)}},event:{input:function(){v.searchDelay?(clearTimeout(f.timer),f.timer=setTimeout(function(){f.is.focused()&&f.query()},v.searchDelay)):f.query()},focus:function(){f.set.focus(),v.searchOnFocus&&f.has.minimumCharacters()&&f.query(function(){f.can.show()&&f.showResults()})},blur:function(e){var t=function(){f.cancel.query(),f.remove.focus(),f.timer=setTimeout(f.hideResults,v.hideDelay)};s.activeElement===this||(D=!1,f.resultsClicked?(f.debug("Determining if user action caused search to close"),w.one("click.close"+C,y.results,function(e){f.is.inMessage(e)||E?S.focus():(E=!1,f.is.animating()||f.is.hidden()||t())})):(f.debug("Input blurred without user action, closing results"),t()))},result:{mousedown:function(){f.resultsClicked=!0},mouseup:function(){f.resultsClicked=!1},click:function(s){f.debug("Search result selected");var n=e(this),r=n.find(y.title).eq(0),i=n.is("a[href]")?n:n.find("a[href]").eq(0),a=i.attr("href")||!1,o=i.attr("target")||!1,c=(r.html(),r.length>0&&r.text()),u=f.get.results(),l=n.data(h.result)||f.get.result(c,u);if(e.isFunction(v.onSelect)&&!1===v.onSelect.call(A,l,u))return f.debug("Custom onSelect callback cancelled default select action"),void(E=!0);f.hideResults(),c&&f.set.value(c),a&&(f.verbose("Opening search link found in result",i),"_blank"==o||s.ctrlKey?t.open(a):t.location.href=a)}}},handleKeyboard:function(e){var t,s=w.find(y.result),n=w.find(y.category),r=s.filter("."+g.active),i=s.index(r),a=s.length,o=r.length>0,c=e.which,u={backspace:8,enter:13,escape:27,upArrow:38,downArrow:40};if(c==u.escape&&(f.verbose("Escape key pressed, blurring search field"),f.hideResults(),D=!0),f.is.visible())if(c==u.enter){if(f.verbose("Enter key pressed, selecting active result"),s.filter("."+g.active).length>0)return f.event.result.click.call(s.filter("."+g.active),e),e.preventDefault(),!1}else c==u.upArrow&&o?(f.verbose("Up key pressed, changing active result"),t=i-1<0?i:i-1,n.removeClass(g.active),s.removeClass(g.active).eq(t).addClass(g.active).closest(n).addClass(g.active),e.preventDefault()):c==u.downArrow&&(f.verbose("Down key pressed, changing active result"),t=i+1>=a?i:i+1,n.removeClass(g.active),s.removeClass(g.active).eq(t).addClass(g.active).closest(n).addClass(g.active),e.preventDefault());else c==u.enter&&(f.verbose("Enter key pressed, executing query"),f.query(),f.set.buttonPressed(),S.one("keyup",f.remove.buttonFocus))},setup:{api:function(t,s){var n={debug:v.debug,on:!1,cache:!0,action:"search",urlData:{query:t},onSuccess:function(e){f.parse.response.call(A,e,t),s()},onFailure:function(){f.displayMessage(b.serverError),s()},onAbort:function(e){},onError:f.error};e.extend(!0,n,v.apiSettings),f.verbose("Setting up API request",n),w.api(n)}},can:{useAPI:function(){return void 0!==e.fn.api},show:function(){return f.is.focused()&&!f.is.visible()&&!f.is.empty()},transition:function(){return v.transition&&void 0!==e.fn.transition&&w.transition("is supported")}},is:{animating:function(){return j.hasClass(g.animating)},hidden:function(){return j.hasClass(g.hidden)},inMessage:function(t){if(t.target){var n=e(t.target);return e.contains(s.documentElement,t.target)&&n.closest(y.message).length>0}},empty:function(){return""===j.html()},visible:function(){return j.filter(":visible").length>0},focused:function(){return S.filter(":focus").length>0}},get:{settings:function(){e.isPlainObject(n)&&n.searchFullText&&(v.fullTextSearch=n.searchFullText,f.error(v.error.oldSearchSyntax,A))},inputEvent:function(){var e=S[0];return void 0!==e&&void 0!==e.oninput?"input":void 0!==e&&void 0!==e.onpropertychange?"propertychange":"keyup"},value:function(){return S.val()},results:function(){return w.data(h.results)},result:function(t,s){var n=["title","id"],r=!1;return t=void 0!==t?t:f.get.value(),s=void 0!==s?s:f.get.results(),"category"===v.type?(f.debug("Finding result that matches",t),e.each(s,function(s,i){if(e.isArray(i.results)&&(r=f.search.object(t,i.results,n)[0]))return!1})):(f.debug("Finding result in results object",t),r=f.search.object(t,s,n)[0]),r||!1}},select:{firstResult:function(){f.verbose("Selecting first result"),T.first().addClass(g.active)}},set:{focus:function(){w.addClass(g.focus)},loading:function(){w.addClass(g.loading)},value:function(e){f.verbose("Setting search input value",e),S.val(e)},type:function(e){e=e||v.type,"category"==v.type&&w.addClass(v.type)},buttonPressed:function(){F.addClass(g.pressed)}},remove:{loading:function(){w.removeClass(g.loading)},focus:function(){w.removeClass(g.focus)},buttonPressed:function(){F.removeClass(g.pressed)}},query:function(t){t=e.isFunction(t)?t:function(){};var s=f.get.value(),n=f.read.cache(s);t=t||function(){},f.has.minimumCharacters()?(n?(f.debug("Reading result from cache",s),f.save.results(n.results),f.addResults(n.html),f.inject.id(n.results),t()):(f.debug("Querying for",s),e.isPlainObject(v.source)||e.isArray(v.source)?(f.search.local(s),t()):f.can.useAPI()?f.search.remote(s,t):(f.error(b.source),t())),v.onSearchQuery.call(A,s)):f.hideResults()},search:{local:function(e){var t,s=f.search.object(e,v.content);f.set.loading(),f.save.results(s),f.debug("Returned full local search results",s),v.maxResults>0&&(f.debug("Using specified max results",s),s=s.slice(0,v.maxResults)),"category"==v.type&&(s=f.create.categoryResults(s)),t=f.generateResults({results:s}),f.remove.loading(),f.addResults(t),f.inject.id(s),f.write.cache(e,{html:t,results:s})},remote:function(t,s){s=e.isFunction(s)?s:function(){},w.api("is loading")&&w.api("abort"),f.setup.api(t,s),w.api("query")},object:function(t,s,n){var r=[],i=[],a=[],o=t.toString().replace(p.escape,"\\$&"),c=new RegExp(p.beginsWith+o,"i"),u=function(t,s){var n=-1==e.inArray(s,r),i=-1==e.inArray(s,a);n&&i&&t.push(s)};return s=s||v.source,n=void 0!==n?n:v.searchFields,e.isArray(n)||(n=[n]),void 0===s||!1===s?(f.error(b.source),[]):(e.each(n,function(n,o){e.each(s,function(e,s){"string"==typeof s[o]&&(-1!==s[o].search(c)?u(r,s):"exact"===v.fullTextSearch&&f.exactSearch(t,s[o])?u(i,s):1==v.fullTextSearch&&f.fuzzySearch(t,s[o])&&u(a,s))})}),e.merge(i,a),e.merge(r,i),r)}},exactSearch:function(e,t){return e=e.toLowerCase(),(t=t.toLowerCase()).indexOf(e)>-1},fuzzySearch:function(e,t){var s=t.length,n=e.length;if("string"!=typeof e)return!1;if(e=e.toLowerCase(),t=t.toLowerCase(),n>s)return!1;if(n===s)return e===t;e:for(var r=0,i=0;r<n;r++){for(var a=e.charCodeAt(r);i<s;)if(t.charCodeAt(i++)===a)continue e;return!1}return!0},parse:{response:function(e,t){var s=f.generateResults(e);f.verbose("Parsing server response",e),void 0!==e&&void 0!==t&&void 0!==e[m.results]&&(f.addResults(s),f.inject.id(e[m.results]),f.write.cache(t,{html:s,results:e[m.results]}),f.save.results(e[m.results]))}},cancel:{query:function(){f.can.useAPI()&&w.api("abort")}},has:{minimumCharacters:function(){return f.get.value().length>=v.minCharacters},results:function(){return 0!==j.length&&""!=j.html()}},clear:{cache:function(e){var t=w.data(h.cache);e?e&&t&&t[e]&&(f.debug("Removing value from cache",e),delete t[e],w.data(h.cache,t)):(f.debug("Clearing cache",e),w.removeData(h.cache))}},read:{cache:function(e){var t=w.data(h.cache);return!!v.cache&&(f.verbose("Checking cache for generated html for query",e),"object"==typeof t&&void 0!==t[e]&&t[e])}},create:{categoryResults:function(t){var s={};return e.each(t,function(e,t){t.category&&(void 0===s[t.category]?(f.verbose("Creating new category of results",t.category),s[t.category]={name:t.category,results:[t]}):s[t.category].results.push(t))}),s},id:function(e,t){var s,n=e+1;return void 0!==t?(s=String.fromCharCode(97+t)+n,f.verbose("Creating category result id",s)):(s=n,f.verbose("Creating result id",s)),s},results:function(){0===j.length&&(j=e("<div />").addClass(g.results).appendTo(w))}},inject:{result:function(e,t,s){f.verbose("Injecting result into results");var n=void 0!==s?j.children().eq(s).children(y.results).first().children(y.result).eq(t):j.children(y.result).eq(t);f.verbose("Injecting results metadata",n),n.data(h.result,e)},id:function(t){f.debug("Injecting unique ids into results");var s=0,n=0;return"category"===v.type?e.each(t,function(t,r){n=0,e.each(r.results,function(e,t){var i=r.results[e];void 0===i.id&&(i.id=f.create.id(n,s)),f.inject.result(i,n,s),n++}),s++}):e.each(t,function(e,s){var r=t[e];void 0===r.id&&(r.id=f.create.id(n)),f.inject.result(r,n),n++}),t}},save:{results:function(e){f.verbose("Saving current search results to metadata",e),w.data(h.results,e)}},write:{cache:function(e,t){var s=void 0!==w.data(h.cache)?w.data(h.cache):{};v.cache&&(f.verbose("Writing generated html to cache",e,t),s[e]=t,w.data(h.cache,s))}},addResults:function(t){if(e.isFunction(v.onResultsAdd)&&!1===v.onResultsAdd.call(j,t))return f.debug("onResultsAdd callback cancelled default action"),!1;t?(j.html(t),f.refreshResults(),v.selectFirstResult&&f.select.firstResult(),f.showResults()):f.hideResults(function(){j.empty()})},showResults:function(t){t=e.isFunction(t)?t:function(){},D||!f.is.visible()&&f.has.results()&&(f.can.transition()?(f.debug("Showing results with css animations"),j.transition({animation:v.transition+" in",debug:v.debug,verbose:v.verbose,duration:v.duration,onComplete:function(){t()},queue:!0})):(f.debug("Showing results with javascript"),j.stop().fadeIn(v.duration,v.easing)),v.onResultsOpen.call(j))},hideResults:function(t){t=e.isFunction(t)?t:function(){},f.is.visible()&&(f.can.transition()?(f.debug("Hiding results with css animations"),j.transition({animation:v.transition+" out",debug:v.debug,verbose:v.verbose,duration:v.duration,onComplete:function(){t()},queue:!0})):(f.debug("Hiding results with javascript"),j.stop().fadeOut(v.duration,v.easing)),v.onResultsClose.call(j))},generateResults:function(t){f.debug("Generating html from response",t);var s=v.templates[v.type],n=e.isPlainObject(t[m.results])&&!e.isEmptyObject(t[m.results]),r=e.isArray(t[m.results])&&t[m.results].length>0,i="";return n||r?(v.maxResults>0&&(n?"standard"==v.type&&f.error(b.maxResults):t[m.results]=t[m.results].slice(0,v.maxResults)),e.isFunction(s)?i=s(t,m):f.error(b.noTemplate,!1)):v.showNoResults&&(i=f.displayMessage(b.noResults,"empty")),v.onResults.call(A,t),i},displayMessage:function(e,t){return t=t||"standard",f.debug("Displaying message",e,t),f.addResults(v.templates.message(e,t)),v.templates.message(e,t)},setting:function(t,s){if(e.isPlainObject(t))e.extend(!0,v,t);else{if(void 0===s)return v[t];v[t]=s}},internal:function(t,s){if(e.isPlainObject(t))e.extend(!0,f,t);else{if(void 0===s)return f[t];f[t]=s}},debug:function(){!v.silent&&v.debug&&(v.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,v.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!v.silent&&v.verbose&&v.debug&&(v.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,v.name+":"),f.verbose.apply(console,arguments)))},error:function(){v.silent||(f.error=Function.prototype.bind.call(console.error,console,v.name+":"),f.error.apply(console,arguments))},performance:{log:function(e){var t,s;v.performance&&(s=(t=(new Date).getTime())-(o||t),o=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:A,"Execution Time":s})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var t=v.name+":",s=0;o=!1,clearTimeout(f.performance.timer),e.each(c,function(e,t){s+=t["Execution Time"]}),t+=" "+s+"ms",a&&(t+=" '"+a+"'"),i.length>1&&(t+=" ("+i.length+")"),(void 0!==console.group||void 0!==console.table)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,s,n){var i,a,o,c=q;return s=s||d,n=A||n,"string"==typeof t&&void 0!==c&&(t=t.split(/[\. ]/),i=t.length-1,e.each(t,function(s,n){var r=s!=i?n+t[s+1].charAt(0).toUpperCase()+t[s+1].slice(1):t;if(e.isPlainObject(c[r])&&s!=i)c=c[r];else{if(void 0!==c[r])return a=c[r],!1;if(!e.isPlainObject(c[n])||s==i)return void 0!==c[n]&&(a=c[n],!1);c=c[n]}})),e.isFunction(a)?o=a.apply(n,s):void 0!==a&&(o=a),e.isArray(r)?r.push(o):void 0!==r?r=[r,o]:void 0!==o&&(r=o),a}},l?(void 0===q&&f.initialize(),f.invoke(u)):(void 0!==q&&q.invoke("destroy"),f.initialize())}),void 0!==r?r:this},e.fn.search.settings={name:"Search",namespace:"search",silent:!1,debug:!1,verbose:!1,performance:!0,type:"standard",minCharacters:1,selectFirstResult:!1,apiSettings:!1,source:!1,searchOnFocus:!0,searchFields:["title","description"],displayField:"",fullTextSearch:"exact",automatic:!0,hideDelay:0,searchDelay:200,maxResults:7,cache:!0,showNoResults:!0,transition:"scale",duration:200,easing:"easeOutExpo",onSelect:!1,onResultsAdd:!1,onSearchQuery:function(e){},onResults:function(e){},onResultsOpen:function(){},onResultsClose:function(){},className:{animating:"animating",active:"active",empty:"empty",focus:"focus",hidden:"hidden",loading:"loading",results:"results",pressed:"down"},error:{source:"Cannot search. No source used, and Semantic API module was not included",noResults:"Your search returned no results",logging:"Error in debug logging, exiting.",noEndpoint:"No search endpoint was specified",noTemplate:"A valid template name was not specified.",oldSearchSyntax:"searchFullText setting has been renamed fullTextSearch for consistency, please adjust your settings.",serverError:"There was an issue querying the server.",maxResults:"Results must be an array to use maxResults setting",method:"The method you called is not defined."},metadata:{cache:"cache",results:"results",result:"result"},regExp:{escape:/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,beginsWith:"(?:s|^)"},fields:{categories:"results",categoryName:"name",categoryResults:"results",description:"description",image:"image",price:"price",results:"results",title:"title",url:"url",action:"action",actionText:"text",actionURL:"url"},selector:{prompt:".prompt",searchButton:".search.button",results:".results",message:".results > .message",category:".category",result:".result",title:".title, .name"},templates:{escape:function(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/[&<>"'`]/.test(e)?e.replace(/[&<>"'`]/g,function(e){return t[e]}):e},message:function(e,t){var s="";return void 0!==e&&void 0!==t&&(s+='<div class="message '+t+'">',s+="empty"==t?'<div class="header">No Results</div class="header"><div class="description">'+e+'</div class="description">':' <div class="description">'+e+"</div>",s+="</div>"),s},category:function(t,s){var n="";e.fn.search.settings.templates.escape;return void 0!==t[s.categoryResults]&&(e.each(t[s.categoryResults],function(t,r){void 0!==r[s.results]&&r.results.length>0&&(n+='<div class="category">',void 0!==r[s.categoryName]&&(n+='<div class="name">'+r[s.categoryName]+"</div>"),n+='<div class="results">',e.each(r.results,function(e,t){t[s.url]?n+='<a class="result" href="'+t[s.url]+'">':n+='<a class="result">',void 0!==t[s.image]&&(n+='<div class="image"> <img src="'+t[s.image]+'"></div>'),n+='<div class="content">',void 0!==t[s.price]&&(n+='<div class="price">'+t[s.price]+"</div>"),void 0!==t[s.title]&&(n+='<div class="title">'+t[s.title]+"</div>"),void 0!==t[s.description]&&(n+='<div class="description">'+t[s.description]+"</div>"),n+="</div>",n+="</a>"}),n+="</div>",n+="</div>")}),t[s.action]&&(n+='<a href="'+t[s.action][s.actionURL]+'" class="action">'+t[s.action][s.actionText]+"</a>"),n)},standard:function(t,s){var n="";return void 0!==t[s.results]&&(e.each(t[s.results],function(e,t){t[s.url]?n+='<a class="result" href="'+t[s.url]+'">':n+='<a class="result">',void 0!==t[s.image]&&(n+='<div class="image"> <img src="'+t[s.image]+'"></div>'),n+='<div class="content">',void 0!==t[s.price]&&(n+='<div class="price">'+t[s.price]+"</div>"),void 0!==t[s.title]&&(n+='<div class="title">'+t[s.title]+"</div>"),void 0!==t[s.description]&&(n+='<div class="description">'+t[s.description]+"</div>"),n+="</div>",n+="</a>"}),t[s.action]&&(n+='<a href="'+t[s.action][s.actionURL]+'" class="action">'+t[s.action][s.actionText]+"</a>"),n)}}}}(jQuery,window,document);