From 174042a6944536e3908d76dc8ad51c8d354910f3 Mon Sep 17 00:00:00 2001 From: c-stellfri Date: Thu, 20 Jul 2017 12:19:57 +0200 Subject: [PATCH 1/3] Added a template substitution It lets you fetch content from an external file. The path can be set in the config variable templatePath --- .../test-fixtures/substitition-template.html | 1 + build/fonts/SG-icons.eot | Bin 2596 -> 2596 bytes build/fonts/SG-icons.ttf | Bin 2428 -> 2428 bytes build/fonts/SG-icons.woff | Bin 1556 -> 1552 bytes build/scripts/app.js | 16 +++++----- build/styles/app.css | 2 +- src/Substitute.js | 29 ++++++++++++++++++ src/messages/warnings.js | 9 ++++++ test/Substitution.test.js | 25 +++++++++++++++ 9 files changed, 73 insertions(+), 9 deletions(-) create mode 100644 assets/test-fixtures/substitition-template.html diff --git a/assets/test-fixtures/substitition-template.html b/assets/test-fixtures/substitition-template.html new file mode 100644 index 0000000..79e6680 --- /dev/null +++ b/assets/test-fixtures/substitition-template.html @@ -0,0 +1 @@ +---TEMPLATE--- \ No newline at end of file diff --git a/build/fonts/SG-icons.eot b/build/fonts/SG-icons.eot index 1960149450c9c97ef3d670703a355421a7ccb7f1..b1571fb2d60e2d7d5c008d92d9f7be6e68c1b41a 100644 GIT binary patch delta 78 zcmZ1?vP5Kp4a=_uO-2(PDw(@gt0wNTVd0uNb?3xCQ)G;q7W|6mxB1Gz&0xR)1Xri& c=)vg8YZx84T-61DA`NPY45FPGU*kWT#Pi#H1*$Os hs${tQK4=w;p3K7Nz?G9&lE=X3;^q^w*^g0=0|20k7Ks1= diff --git a/build/fonts/SG-icons.woff b/build/fonts/SG-icons.woff index 1823d3cb063d9decee34d26c3b40be89c60ed452..41b2309a637b281a4be553075eb1304152eb529a 100644 GIT binary patch delta 228 zcmbQjGl7Sv+~3WOfsp|S*aRl>7&3ROR!wwpuQvb+m~qXVx-%mqHIadV#RbTh24WS4 z28Pg#+>#2QSOSnQ2E-DKLjV8eX8YJhw`5N6)SRFs=oQ2-R{0rKU6Sb3} M0~)p2h2;z*04l^f)Bpeg diff --git a/build/scripts/app.js b/build/scripts/app.js index 4c33739..b66deaf 100644 --- a/build/scripts/app.js +++ b/build/scripts/app.js @@ -1,8 +1,8 @@ -!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="/scripts/",t(0)}([function(e,t,n){"use strict";n(1)},function(e,t,n){"use strict";n(2),n(6),n(7),n(25),n(33)},function(e,t,n){(function(e){"use strict";var t=n(4);n(5),e("[data-d-code-preview]").each(function(e,n){t.highlightElement(n)})}).call(t,n(3))},function(e,t,n){var r,i;!function(t,n){"use strict";"object"==typeof e&&"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(n,o){"use strict";function a(e,t){t=t||oe;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function u(e){var t=!!e&&"length"in e&&e.length,n=me.type(e);return"function"!==n&&!me.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function s(e,t,n){return me.isFunction(t)?me.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?me.grep(e,function(e){return e===t!==n}):"string"!=typeof t?me.grep(e,function(e){return ce.call(t,e)>-1!==n}):Ae.test(t)?me.filter(t,e,n):(t=me.filter(t,e),me.grep(e,function(e){return ce.call(t,e)>-1!==n&&1===e.nodeType}))}function l(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function c(e){var t={};return me.each(e.match(Ne)||[],function(e,n){t[n]=!0}),t}function f(e){return e}function p(e){throw e}function d(e,t,n){var r;try{e&&me.isFunction(r=e.promise)?r.call(e).done(t).fail(n):e&&me.isFunction(r=e.then)?r.call(e,t,n):t.call(void 0,e)}catch(e){n.call(void 0,e)}}function h(){oe.removeEventListener("DOMContentLoaded",h),n.removeEventListener("load",h),me.ready()}function g(){this.expando=me.expando+g.uid++}function v(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Me.test(e)?JSON.parse(e):e)}function y(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Be,"-$&").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n=v(n)}catch(e){}He.set(e,t,n)}else n=void 0;return n}function m(e,t,n,r){var i,o=1,a=20,u=r?function(){return r.cur()}:function(){return me.css(e,t,"")},s=u(),l=n&&n[3]||(me.cssNumber[t]?"":"px"),c=(me.cssNumber[t]||"px"!==l&&+s)&&We.exec(me.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+s||1;do o=o||".5",c/=o,me.style(e,t,c+l);while(o!==(o=u()/s)&&1!==o&&--a)}return n&&(c=+c||+s||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function b(e){var t,n=e.ownerDocument,r=e.nodeName,i=Ke[r];return i?i:(t=n.body.appendChild(n.createElement(r)),i=me.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),Ke[r]=i,i)}function w(e,t){for(var n,r,i=[],o=0,a=e.length;o-1)i&&i.push(o);else if(l=me.contains(o.ownerDocument,o),a=_(f.appendChild(o),"script"),l&&x(a),n)for(c=0;o=a[c++];)Ye.test(o.type||"")&&n.push(o);return f}function k(){return!0}function S(){return!1}function T(){try{return oe.activeElement}catch(e){}}function O(e,t,n,r,i,o){var a,u;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(u in t)O(e,u,n,r,t[u],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)),i===!1)i=S;else if(!i)return e;return 1===o&&(a=i,i=function(e){return me().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=me.guid++)),e.each(function(){me.event.add(this,t,i,r,n)})}function A(e,t){return me.nodeName(e,"table")&&me.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e:e}function E(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function j(e){var t=ut.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function D(e,t){var n,r,i,o,a,u,s,l;if(1===t.nodeType){if(Re.hasData(e)&&(o=Re.access(e),a=Re.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n1&&"string"==typeof h&&!ve.checkClone&&at.test(h))return e.each(function(i){var o=e.eq(i);g&&(t[0]=h.call(this,i,o.html())),$(o,t,n,r)});if(p&&(i=C(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=me.map(_(i,"script"),E),s=u.length;f=0&&nC.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[H]=!0,e}function i(e){var t=$.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)C.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function u(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function s(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return function(t){return"form"in t?t.parentNode&&t.disabled===!1?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ke(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function c(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function f(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function p(){}function d(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function v(e,n,r){for(var i=0,o=n.length;i-1&&(r[l]=!(a[l]=f))}}else b=y(b===a?b.splice(h,b.length):b),o?o(null,a,b,s):J.apply(a,b)})}function b(e){for(var t,n,r,i=e.length,o=C.relative[e[0].type],a=o||C.relative[" "],u=o?1:0,s=h(function(e){return e===t},a,!0),l=h(function(e){return ee(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==E)||((t=n).nodeType?s(e,n,r):l(e,n,r));return t=null,i}];u1&&g(c),u>1&&d(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(ue,"$1"),n,u0,o=e.length>0,a=function(r,a,u,s,l){var c,f,p,d=0,h="0",g=r&&[],v=[],m=E,b=r||o&&C.find.TAG("*",l),w=B+=null==m?1:Math.random()||.1,_=b.length;for(l&&(E=a===$||a||l);h!==_&&null!=(c=b[h]);h++){if(o&&c){for(f=0,a||c.ownerDocument===$||(I(c),u=!L);p=e[f++];)if(p(c,a||$,u)){s.push(c);break}l&&(B=w)}i&&((c=!p&&c)&&d--,r&&g.push(c))}if(d+=h,i&&h!==d){for(f=0;p=n[f++];)p(g,v,a,u);if(r){if(d>0)for(;h--;)g[h]||v[h]||(v[h]=Q.call(s));v=y(v)}J.apply(s,v),l&&!r&&v.length>0&&d+n.length>1&&t.uniqueSort(s)}return l&&(B=w,E=m),g};return i?r(a):a}var _,x,C,k,S,T,O,A,E,j,D,I,$,N,L,F,P,q,R,H="sizzle"+1*new Date,M=e.document,B=0,z=0,W=n(),U=n(),V=n(),G=function(e,t){return e===t&&(D=!0),0},K={}.hasOwnProperty,X=[],Q=X.pop,Y=X.push,J=X.push,Z=X.slice,ee=function(e,t){for(var n=0,r=e.length;n+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(oe),pe=new RegExp("^"+re+"$"),de={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,ve=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,me=/[+~]/,be=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),we=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)},_e=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,xe=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},Ce=function(){I()},ke=h(function(e){return e.disabled===!0&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{J.apply(X=Z.call(M.childNodes),M.childNodes),X[M.childNodes.length].nodeType}catch(e){J={apply:X.length?function(e,t){Y.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}x=t.support={},S=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},I=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:M;return r!==$&&9===r.nodeType&&r.documentElement?($=r,N=$.documentElement,L=!S($),M!==$&&(n=$.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Ce,!1):n.attachEvent&&n.attachEvent("onunload",Ce)),x.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=i(function(e){return e.appendChild($.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=ve.test($.getElementsByClassName),x.getById=i(function(e){return N.appendChild(e).id=H,!$.getElementsByName||!$.getElementsByName(H).length}),x.getById?(C.filter.ID=function(e){var t=e.replace(be,we);return function(e){return e.getAttribute("id")===t}},C.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&L){var n=t.getElementById(e);return n?[n]:[]}}):(C.filter.ID=function(e){var t=e.replace(be,we);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},C.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&L){var n,r,i,o=t.getElementById(e);if(o){if(n=o.getAttributeNode("id"),n&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if(n=o.getAttributeNode("id"),n&&n.value===e)return[o]}return[]}}),C.find.TAG=x.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):x.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},C.find.CLASS=x.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&L)return t.getElementsByClassName(e)},P=[],F=[],(x.qsa=ve.test($.querySelectorAll))&&(i(function(e){N.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&F.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||F.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+H+"-]").length||F.push("~="),e.querySelectorAll(":checked").length||F.push(":checked"),e.querySelectorAll("a#"+H+"+*").length||F.push(".#.+[+~]")}),i(function(e){e.innerHTML="";var t=$.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&F.push("name"+ne+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&F.push(":enabled",":disabled"),N.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&F.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),F.push(",.*:")})),(x.matchesSelector=ve.test(q=N.matches||N.webkitMatchesSelector||N.mozMatchesSelector||N.oMatchesSelector||N.msMatchesSelector))&&i(function(e){x.disconnectedMatch=q.call(e,"*"),q.call(e,"[s!='']:x"),P.push("!=",oe)}),F=F.length&&new RegExp(F.join("|")),P=P.length&&new RegExp(P.join("|")),t=ve.test(N.compareDocumentPosition),R=t||ve.test(N.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)for(;t=t.parentNode;)if(t===e)return!0;return!1},G=t?function(e,t){if(e===t)return D=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!x.sortDetached&&t.compareDocumentPosition(e)===n?e===$||e.ownerDocument===M&&R(M,e)?-1:t===$||t.ownerDocument===M&&R(M,t)?1:j?ee(j,e)-ee(j,t):0:4&n?-1:1)}:function(e,t){if(e===t)return D=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,u=[e],s=[t];if(!i||!o)return e===$?-1:t===$?1:i?-1:o?1:j?ee(j,e)-ee(j,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)u.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;u[r]===s[r];)r++;return r?a(u[r],s[r]):u[r]===M?-1:s[r]===M?1:0},$):$},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==$&&I(e),n=n.replace(ce,"='$1']"),x.matchesSelector&&L&&!V[n+" "]&&(!P||!P.test(n))&&(!F||!F.test(n)))try{var r=q.call(e,n);if(r||x.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,$,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==$&&I(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==$&&I(e);var n=C.attrHandle[t.toLowerCase()],r=n&&K.call(C.attrHandle,t.toLowerCase())?n(e,t,!L):void 0;return void 0!==r?r:x.attributes||!L?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.escape=function(e){return(e+"").replace(_e,xe)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(D=!x.detectDuplicates,j=!x.sortStable&&e.slice(0),e.sort(G),D){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return j=null,e},k=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=k(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=k(t);return n},C=t.selectors={cacheLength:50,createPseudo:r,match:de,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(be,we),e[3]=(e[3]||e[4]||e[5]||"").replace(be,we),"~="===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]||t.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]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return de.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=T(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(be,we).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=W[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&W(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ae," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),u="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,s){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",v=t.parentNode,y=u&&t.nodeName.toLowerCase(),m=!s&&!u,b=!1;if(v){if(o){for(;g;){for(p=t;p=p[g];)if(u?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?v.firstChild:v.lastChild],a&&m){for(p=v,f=p[H]||(p[H]={}),c=f[p.uniqueID]||(f[p.uniqueID]={}),l=c[e]||[],d=l[0]===B&&l[1],b=d&&l[2],p=d&&v.childNodes[d];p=++d&&p&&p[g]||(b=d=0)||h.pop();)if(1===p.nodeType&&++b&&p===t){c[e]=[B,d,b];break}}else if(m&&(p=t,f=p[H]||(p[H]={}),c=f[p.uniqueID]||(f[p.uniqueID]={}),l=c[e]||[],d=l[0]===B&&l[1],b=d),b===!1)for(;(p=++d&&p&&p[g]||(b=d=0)||h.pop())&&((u?p.nodeName.toLowerCase()!==y:1!==p.nodeType)||!++b||(m&&(f=p[H]||(p[H]={}),c=f[p.uniqueID]||(f[p.uniqueID]={}),c[e]=[B,b]),p!==t)););return b-=i,b===r||b%r===0&&b/r>=0}}},PSEUDO:function(e,n){var i,o=C.pseudos[e]||C.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[H]?o(n):o.length>1?(i=[e,e,"",n],C.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=ee(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=O(e.replace(ue,"$1"));return i[H]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),u=e.length;u--;)(o=a[u])&&(e[u]=!(t[u]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){ -return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(be,we),function(t){return(t.textContent||t.innerText||k(t)).indexOf(e)>-1}}),lang:r(function(e){return pe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(be,we).toLowerCase(),function(t){var n;do if(n=L?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===N},focus:function(e){return e===$.activeElement&&(!$.hasFocus||$.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:l(!1),disabled:l(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!C.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return he.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:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[n<0?n+t:n]}),even:c(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=n<0?n+t:n;++r2&&"ID"===(a=o[0]).type&&9===t.nodeType&&L&&C.relative[o[1].type]){if(t=(C.find.ID(a.matches[0].replace(be,we),t)||[])[0],!t)return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=de.needsContext.test(e)?0:o.length;i--&&(a=o[i],!C.relative[u=a.type]);)if((s=C.find[u])&&(r=s(a.matches[0].replace(be,we),me.test(o[0].type)&&f(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&d(o),!e)return J.apply(n,r),n;break}}return(l||O(e,c))(r,t,!L,n,!t||me.test(e)&&f(t.parentNode)||t),n},x.sortStable=H.split("").sort(G).join("")===H,x.detectDuplicates=!!D,I(),x.sortDetached=i(function(e){return 1&e.compareDocumentPosition($.createElement("fieldset"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),x.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(n);me.find=Ce,me.expr=Ce.selectors,me.expr[":"]=me.expr.pseudos,me.uniqueSort=me.unique=Ce.uniqueSort,me.text=Ce.getText,me.isXMLDoc=Ce.isXML,me.contains=Ce.contains,me.escapeSelector=Ce.escape;var ke=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&me(e).is(n))break;r.push(e)}return r},Se=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},Te=me.expr.match.needsContext,Oe=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,Ae=/^.[^:#\[\.,]*$/;me.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?me.find.matchesSelector(r,e)?[r]:[]:me.find.matches(e,me.grep(t,function(e){return 1===e.nodeType}))},me.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(me(e).filter(function(){for(t=0;t1?me.uniqueSort(n):n},filter:function(e){return this.pushStack(s(this,e||[],!1))},not:function(e){return this.pushStack(s(this,e||[],!0))},is:function(e){return!!s(this,"string"==typeof e&&Te.test(e)?me(e):e||[],!1).length}});var Ee,je=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,De=me.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||Ee,"string"==typeof e){if(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:je.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof me?t[0]:t,me.merge(this,me.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:oe,!0)),Oe.test(r[1])&&me.isPlainObject(t))for(r in t)me.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=oe.getElementById(r[2]),i&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):me.isFunction(e)?void 0!==n.ready?n.ready(e):e(me):me.makeArray(e,this)};De.prototype=me.fn,Ee=me(oe);var Ie=/^(?:parents|prev(?:Until|All))/,$e={children:!0,contents:!0,next:!0,prev:!0};me.fn.extend({has:function(e){var t=me(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&me.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?me.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?ce.call(me(e),this[0]):ce.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(me.uniqueSort(me.merge(this.get(),me(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),me.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ke(e,"parentNode")},parentsUntil:function(e,t,n){return ke(e,"parentNode",n)},next:function(e){return l(e,"nextSibling")},prev:function(e){return l(e,"previousSibling")},nextAll:function(e){return ke(e,"nextSibling")},prevAll:function(e){return ke(e,"previousSibling")},nextUntil:function(e,t,n){return ke(e,"nextSibling",n)},prevUntil:function(e,t,n){return ke(e,"previousSibling",n)},siblings:function(e){return Se((e.parentNode||{}).firstChild,e)},children:function(e){return Se(e.firstChild)},contents:function(e){return e.contentDocument||me.merge([],e.childNodes)}},function(e,t){me.fn[e]=function(n,r){var i=me.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=me.filter(r,i)),this.length>1&&($e[e]||me.uniqueSort(i),Ie.test(e)&&i.reverse()),this.pushStack(i)}});var Ne=/[^\x20\t\r\n\f]+/g;me.Callbacks=function(e){e="string"==typeof e?c(e):me.extend({},e);var t,n,r,i,o=[],a=[],u=-1,s=function(){for(i=e.once,r=t=!0;a.length;u=-1)for(n=a.shift();++u-1;)o.splice(n,1),n<=u&&u--}),this},has:function(e){return e?me.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],a.push(n),t||s()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},me.extend({Deferred:function(e){var t=[["notify","progress",me.Callbacks("memory"),me.Callbacks("memory"),2],["resolve","done",me.Callbacks("once memory"),me.Callbacks("once memory"),0,"resolved"],["reject","fail",me.Callbacks("once memory"),me.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 me.Deferred(function(n){me.each(t,function(t,r){var i=me.isFunction(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&me.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(e,r,i){function o(e,t,r,i){return function(){var u=this,s=arguments,l=function(){var n,l;if(!(e=a&&(r!==p&&(u=void 0,s=[n]),t.rejectWith(u,s))}};e?c():(me.Deferred.getStackHook&&(c.stackTrace=me.Deferred.getStackHook()),n.setTimeout(c))}}var a=0;return me.Deferred(function(n){t[0][3].add(o(0,n,me.isFunction(i)?i:f,n.notifyWith)),t[1][3].add(o(0,n,me.isFunction(e)?e:f)),t[2][3].add(o(0,n,me.isFunction(r)?r:p))}).promise()},promise:function(e){return null!=e?me.extend(e,i):i}},o={};return me.each(t,function(e,n){var a=n[2],u=n[5];i[n[1]]=a.add,u&&a.add(function(){r=u},t[3-e][2].disable,t[0][2].lock),a.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=a.fireWith}),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=ue.call(arguments),o=me.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?ue.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(d(e,o.done(a(n)).resolve,o.reject),"pending"===o.state()||me.isFunction(i[n]&&i[n].then)))return o.then();for(;n--;)d(i[n],a(n),o.reject);return o.promise()}});var Le=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;me.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&Le.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},me.readyException=function(e){n.setTimeout(function(){throw e})};var Fe=me.Deferred();me.fn.ready=function(e){return Fe.then(e).catch(function(e){me.readyException(e)}),this},me.extend({isReady:!1,readyWait:1,holdReady:function(e){e?me.readyWait++:me.ready(!0)},ready:function(e){(e===!0?--me.readyWait:me.isReady)||(me.isReady=!0,e!==!0&&--me.readyWait>0||Fe.resolveWith(oe,[me]))}}),me.ready.then=Fe.then,"complete"===oe.readyState||"loading"!==oe.readyState&&!oe.documentElement.doScroll?n.setTimeout(me.ready):(oe.addEventListener("DOMContentLoaded",h),n.addEventListener("load",h));var Pe=function(e,t,n,r,i,o,a){var u=0,s=e.length,l=null==n;if("object"===me.type(n)){i=!0;for(u in n)Pe(e,t,u,n[u],!0,o,a)}else if(void 0!==r&&(i=!0,me.isFunction(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(me(e),n)})),t))for(;u1,null,!0)},removeData:function(e){return this.each(function(){He.remove(this,e)})}}),me.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Re.get(e,t),n&&(!r||me.isArray(n)?r=Re.access(e,t,me.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=me.queue(e,t),r=n.length,i=n.shift(),o=me._queueHooks(e,t),a=function(){me.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Re.get(e,n)||Re.access(e,n,{empty:me.Callbacks("once memory").add(function(){Re.remove(e,[t+"queue",n])})})}}),me.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,Ye=/^$|\/(?:java|ecma)script/i,Je={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};Je.optgroup=Je.option,Je.tbody=Je.tfoot=Je.colgroup=Je.caption=Je.thead,Je.th=Je.td;var Ze=/<|&#?\w+;/;!function(){var e=oe.createDocumentFragment(),t=e.appendChild(oe.createElement("div")),n=oe.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),ve.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",ve.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var et=oe.documentElement,tt=/^key/,nt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,rt=/^([^.]*)(?:\.(.+)|)/;me.event={global:{},add:function(e,t,n,r,i){var o,a,u,s,l,c,f,p,d,h,g,v=Re.get(e);if(v)for(n.handler&&(o=n,n=o.handler,i=o.selector),i&&me.find.matchesSelector(et,i),n.guid||(n.guid=me.guid++),(s=v.events)||(s=v.events={}),(a=v.handle)||(a=v.handle=function(t){return"undefined"!=typeof me&&me.event.triggered!==t.type?me.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(Ne)||[""],l=t.length;l--;)u=rt.exec(t[l])||[],d=g=u[1],h=(u[2]||"").split(".").sort(),d&&(f=me.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=me.event.special[d]||{},c=me.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&me.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=s[d])||(p=s[d]=[],p.delegateCount=0,f.setup&&f.setup.call(e,r,h,a)!==!1||e.addEventListener&&e.addEventListener(d,a)),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),me.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,a,u,s,l,c,f,p,d,h,g,v=Re.hasData(e)&&Re.get(e);if(v&&(s=v.events)){for(t=(t||"").match(Ne)||[""],l=t.length;l--;)if(u=rt.exec(t[l])||[],d=g=u[1],h=(u[2]||"").split(".").sort(),d){for(f=me.event.special[d]||{},d=(r?f.delegateType:f.bindType)||d,p=s[d]||[],u=u[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||u&&!u.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&f.teardown.call(e,h,v.handle)!==!1||me.removeEvent(e,d,v.handle),delete s[d])}else for(d in s)me.event.remove(e,d+t[l],n,r,!0);me.isEmptyObject(s)&&Re.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,u=me.event.fix(e),s=new Array(arguments.length),l=(Re.get(this,"events")||{})[u.type]||[],c=me.event.special[u.type]||{};for(s[0]=u,t=1;t=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||l.disabled!==!0)){for(o=[],a={},n=0;n-1:me.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&u.push({elem:l,handlers:o})}return l=this,s\x20\t\r\n\f]*)[^>]*)\/>/gi,ot=/\s*$/g;me.extend({htmlPrefilter:function(e){return e.replace(it,"<$1>")},clone:function(e,t,n){var r,i,o,a,u=e.cloneNode(!0),s=me.contains(e.ownerDocument,e);if(!(ve.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||me.isXMLDoc(e)))for(a=_(u),o=_(e),r=0,i=o.length;r0&&x(a,!s&&_(e,"script")),u},cleanData:function(e){for(var t,n,r,i=me.event.special,o=0;void 0!==(n=e[o]);o++)if(qe(n)){if(t=n[Re.expando]){if(t.events)for(r in t.events)i[r]?me.event.remove(n,r):me.removeEvent(n,r,t.handle);n[Re.expando]=void 0}n[He.expando]&&(n[He.expando]=void 0)}}}),me.fn.extend({detach:function(e){return N(this,e,!0)},remove:function(e){return N(this,e)},text:function(e){return Pe(this,function(e){return void 0===e?me.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 $(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=A(this,e);t.appendChild(e)}})},prepend:function(){return $(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=A(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return $(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return $(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&&(me.cleanData(_(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return me.clone(this,e,t)})},html:function(e){return Pe(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&&!ot.test(e)&&!Je[(Qe.exec(e)||["",""])[1].toLowerCase()]){e=me.htmlPrefilter(e);try{for(;n1)}}),me.Tween=M,M.prototype={constructor:M,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||me.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(me.cssNumber[n]?"":"px")},cur:function(){var e=M.propHooks[this.prop];return e&&e.get?e.get(this):M.propHooks._default.get(this)},run:function(e){var t,n=M.propHooks[this.prop];return this.options.duration?this.pos=t=me.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):M.propHooks._default.set(this),this}},M.prototype.init.prototype=M.prototype,M.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=me.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){me.fx.step[e.prop]?me.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[me.cssProps[e.prop]]&&!me.cssHooks[e.prop]?e.elem[e.prop]=e.now:me.style(e.elem,e.prop,e.now+e.unit)}}},M.propHooks.scrollTop=M.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},me.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},me.fx=M.prototype.init,me.fx.step={};var yt,mt,bt=/^(?:toggle|show|hide)$/,wt=/queueHooks$/;me.Animation=me.extend(K,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return m(n.elem,e,We.exec(t),n),n}]},tweener:function(e,t){me.isFunction(e)?(t=e,e=["*"]):e=e.match(Ne);for(var n,r=0,i=e.length;r1)},removeAttr:function(e){return this.each(function(){me.removeAttr(this,e)})}}),me.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?me.prop(e,t,n):(1===o&&me.isXMLDoc(e)||(i=me.attrHooks[t.toLowerCase()]||(me.expr.match.bool.test(t)?_t:void 0)),void 0!==n?null===n?void me.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:(r=me.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!ve.radioValue&&"radio"===t&&me.nodeName(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(Ne);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),_t={set:function(e,t,n){return t===!1?me.removeAttr(e,n):e.setAttribute(n,n),n}},me.each(me.expr.match.bool.source.match(/\w+/g),function(e,t){var n=xt[t]||me.find.attr;xt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=xt[a],xt[a]=i,i=null!=n(e,t,r)?a:null,xt[a]=o),i}});var Ct=/^(?:input|select|textarea|button)$/i,kt=/^(?:a|area)$/i;me.fn.extend({prop:function(e,t){return Pe(this,me.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[me.propFix[e]||e]})}}),me.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&me.isXMLDoc(e)||(t=me.propFix[t]||t,i=me.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=me.find.attr(e,"tabindex");return t?parseInt(t,10):Ct.test(e.nodeName)||kt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),ve.optSelected||(me.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)}}),me.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){me.propFix[this.toLowerCase()]=this}),me.fn.extend({addClass:function(e){var t,n,r,i,o,a,u,s=0;if(me.isFunction(e))return this.each(function(t){me(this).addClass(e.call(this,t,Q(this)))});if("string"==typeof e&&e)for(t=e.match(Ne)||[];n=this[s++];)if(i=Q(n),r=1===n.nodeType&&" "+X(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");u=X(r),i!==u&&n.setAttribute("class",u)}return this},removeClass:function(e){var t,n,r,i,o,a,u,s=0;if(me.isFunction(e))return this.each(function(t){me(this).removeClass(e.call(this,t,Q(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(Ne)||[];n=this[s++];)if(i=Q(n),r=1===n.nodeType&&" "+X(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");u=X(r),i!==u&&n.setAttribute("class",u)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):me.isFunction(e)?this.each(function(n){me(this).toggleClass(e.call(this,n,Q(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=me(this),o=e.match(Ne)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=Q(this),t&&Re.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||e===!1?"":Re.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+X(Q(n))+" ").indexOf(t)>-1)return!0;return!1}});var St=/\r/g;me.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=me.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,me(this).val()):e,null==i?i="":"number"==typeof i?i+="":me.isArray(i)&&(i=me.map(i,function(e){return null==e?"":e+""})),t=me.valHooks[this.type]||me.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=me.valHooks[i.type]||me.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(St,""):null==n?"":n)}}}),me.extend({valHooks:{option:{get:function(e){var t=me.find.attr(e,"value");return null!=t?t:X(me.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,u=a?null:[],s=a?o+1:i.length;for(r=o<0?s:a?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),me.each(["radio","checkbox"],function(){me.valHooks[this]={set:function(e,t){if(me.isArray(t))return e.checked=me.inArray(me(e).val(),t)>-1}},ve.checkOn||(me.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Tt=/^(?:focusinfocus|focusoutblur)$/;me.extend(me.event,{trigger:function(e,t,r,i){var o,a,u,s,l,c,f,p=[r||oe],d=de.call(e,"type")?e.type:e,h=de.call(e,"namespace")?e.namespace.split("."):[];if(a=u=r=r||oe,3!==r.nodeType&&8!==r.nodeType&&!Tt.test(d+me.event.triggered)&&(d.indexOf(".")>-1&&(h=d.split("."),d=h.shift(),h.sort()),l=d.indexOf(":")<0&&"on"+d,e=e[me.expando]?e:new me.Event(d,"object"==typeof e&&e),e.isTrigger=i?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:me.makeArray(t,[e]),f=me.event.special[d]||{},i||!f.trigger||f.trigger.apply(r,t)!==!1)){if(!i&&!f.noBubble&&!me.isWindow(r)){for(s=f.delegateType||d,Tt.test(s+d)||(a=a.parentNode);a;a=a.parentNode)p.push(a),u=a;u===(r.ownerDocument||oe)&&p.push(u.defaultView||u.parentWindow||n)}for(o=0;(a=p[o++])&&!e.isPropagationStopped();)e.type=o>1?s:f.bindType||d,c=(Re.get(a,"events")||{})[e.type]&&Re.get(a,"handle"),c&&c.apply(a,t),c=l&&a[l],c&&c.apply&&qe(a)&&(e.result=c.apply(a,t),e.result===!1&&e.preventDefault());return e.type=d,i||e.isDefaultPrevented()||f._default&&f._default.apply(p.pop(),t)!==!1||!qe(r)||l&&me.isFunction(r[d])&&!me.isWindow(r)&&(u=r[l],u&&(r[l]=null),me.event.triggered=d,r[d](),me.event.triggered=void 0,u&&(r[l]=u)),e.result}},simulate:function(e,t,n){var r=me.extend(new me.Event,n,{type:e,isSimulated:!0});me.event.trigger(r,null,t)}}),me.fn.extend({trigger:function(e,t){return this.each(function(){me.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return me.event.trigger(e,t,n,!0)}}),me.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){me.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),me.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),ve.focusin="onfocusin"in n,ve.focusin||me.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){me.event.simulate(t,e.target,me.event.fix(e))};me.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=Re.access(r,t);i||r.addEventListener(e,n,!0),Re.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Re.access(r,t)-1;i?Re.access(r,t,i):(r.removeEventListener(e,n,!0),Re.remove(r,t))}}});var Ot=n.location,At=me.now(),Et=/\?/;me.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||me.error("Invalid XML: "+e),t};var jt=/\[\]$/,Dt=/\r?\n/g,It=/^(?:submit|button|image|reset|file)$/i,$t=/^(?:input|select|textarea|keygen)/i;me.param=function(e,t){var n,r=[],i=function(e,t){var n=me.isFunction(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(me.isArray(e)||e.jquery&&!me.isPlainObject(e))me.each(e,function(){i(this.name,this.value)});else for(n in e)Y(n,e[n],t,i);return r.join("&")},me.fn.extend({serialize:function(){return me.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=me.prop(this,"elements");return e?me.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!me(this).is(":disabled")&&$t.test(this.nodeName)&&!It.test(e)&&(this.checked||!Xe.test(e))}).map(function(e,t){var n=me(this).val();return null==n?null:me.isArray(n)?me.map(n,function(e){return{name:t.name,value:e.replace(Dt,"\r\n")}}):{name:t.name,value:n.replace(Dt,"\r\n")}}).get()}});var Nt=/%20/g,Lt=/#.*$/,Ft=/([?&])_=[^&]*/,Pt=/^(.*?):[ \t]*([^\r\n]*)$/gm,qt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Rt=/^(?:GET|HEAD)$/,Ht=/^\/\//,Mt={},Bt={},zt="*/".concat("*"),Wt=oe.createElement("a");Wt.href=Ot.href,me.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ot.href,type:"GET",isLocal:qt.test(Ot.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":me.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?ee(ee(e,me.ajaxSettings),t):ee(me.ajaxSettings,e)},ajaxPrefilter:J(Mt),ajaxTransport:J(Bt),ajax:function(e,t){function r(e,t,r,u){var l,p,d,w,_,x=t;c||(c=!0,s&&n.clearTimeout(s),i=void 0,a=u||"",C.readyState=e>0?4:0,l=e>=200&&e<300||304===e,r&&(w=te(h,C,r)),w=ne(h,w,C,l),l?(h.ifModified&&(_=C.getResponseHeader("Last-Modified"),_&&(me.lastModified[o]=_),_=C.getResponseHeader("etag"),_&&(me.etag[o]=_)),204===e||"HEAD"===h.type?x="nocontent":304===e?x="notmodified":(x=w.state,p=w.data,d=w.error,l=!d)):(d=x,!e&&x||(x="error",e<0&&(e=0))),C.status=e,C.statusText=(t||x)+"",l?y.resolveWith(g,[p,x,C]):y.rejectWith(g,[C,x,d]),C.statusCode(b),b=void 0,f&&v.trigger(l?"ajaxSuccess":"ajaxError",[C,h,l?p:d]),m.fireWith(g,[C,x]),f&&(v.trigger("ajaxComplete",[C,h]),--me.active||me.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,o,a,u,s,l,c,f,p,d,h=me.ajaxSetup({},t),g=h.context||h,v=h.context&&(g.nodeType||g.jquery)?me(g):me.event,y=me.Deferred(),m=me.Callbacks("once memory"),b=h.statusCode||{},w={},_={},x="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(c){if(!u)for(u={};t=Pt.exec(a);)u[t[1].toLowerCase()]=t[2];t=u[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=_[e.toLowerCase()]=_[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)C.always(e[C.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||x;return i&&i.abort(t),r(0,t),this}};if(y.promise(C),h.url=((e||h.url||Ot.href)+"").replace(Ht,Ot.protocol+"//"),h.type=t.method||t.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(Ne)||[""],null==h.crossDomain){l=oe.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=Wt.protocol+"//"+Wt.host!=l.protocol+"//"+l.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=me.param(h.data,h.traditional)),Z(Mt,h,t,C),c)return C;f=me.event&&h.global,f&&0===me.active++&&me.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Rt.test(h.type),o=h.url.replace(Lt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Nt,"+")):(d=h.url.slice(o.length),h.data&&(o+=(Et.test(o)?"&":"?")+h.data,delete h.data),h.cache===!1&&(o=o.replace(Ft,"$1"),d=(Et.test(o)?"&":"?")+"_="+At++ +d),h.url=o+d),h.ifModified&&(me.lastModified[o]&&C.setRequestHeader("If-Modified-Since",me.lastModified[o]),me.etag[o]&&C.setRequestHeader("If-None-Match",me.etag[o])),(h.data&&h.hasContent&&h.contentType!==!1||t.contentType)&&C.setRequestHeader("Content-Type",h.contentType),C.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+zt+"; q=0.01":""):h.accepts["*"]);for(p in h.headers)C.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(h.beforeSend.call(g,C,h)===!1||c))return C.abort();if(x="abort",m.add(h.complete),C.done(h.success),C.fail(h.error),i=Z(Bt,h,t,C)){if(C.readyState=1,f&&v.trigger("ajaxSend",[C,h]),c)return C;h.async&&h.timeout>0&&(s=n.setTimeout(function(){C.abort("timeout")},h.timeout));try{c=!1,i.send(w,r)}catch(e){if(c)throw e;r(-1,e)}}else r(-1,"No Transport");return C},getJSON:function(e,t,n){return me.get(e,t,n,"json")},getScript:function(e,t){return me.get(e,void 0,t,"script")}}),me.each(["get","post"],function(e,t){me[t]=function(e,n,r,i){return me.isFunction(n)&&(i=i||r,r=n,n=void 0),me.ajax(me.extend({url:e,type:t,dataType:i,data:n,success:r},me.isPlainObject(e)&&e))}}),me._evalUrl=function(e){return me.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},me.fn.extend({wrapAll:function(e){var t;return this[0]&&(me.isFunction(e)&&(e=e.call(this[0])),t=me(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return me.isFunction(e)?this.each(function(t){me(this).wrapInner(e.call(this,t))}):this.each(function(){var t=me(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=me.isFunction(e);return this.each(function(n){me(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){me(this).replaceWith(this.childNodes)}),this}}),me.expr.pseudos.hidden=function(e){return!me.expr.pseudos.visible(e)},me.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},me.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Ut={0:200,1223:204},Vt=me.ajaxSettings.xhr();ve.cors=!!Vt&&"withCredentials"in Vt,ve.ajax=Vt=!!Vt,me.ajaxTransport(function(e){var t,r;if(ve.cors||Vt&&!e.crossDomain)return{send:function(i,o){var a,u=e.xhr();if(u.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)u[a]=e.xhrFields[a];e.mimeType&&u.overrideMimeType&&u.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(a in i)u.setRequestHeader(a,i[a]);t=function(e){return function(){t&&(t=r=u.onload=u.onerror=u.onabort=u.onreadystatechange=null,"abort"===e?u.abort():"error"===e?"number"!=typeof u.status?o(0,"error"):o(u.status,u.statusText):o(Ut[u.status]||u.status,u.statusText,"text"!==(u.responseType||"text")||"string"!=typeof u.responseText?{binary:u.response}:{text:u.responseText},u.getAllResponseHeaders()))}},u.onload=t(),r=u.onerror=t("error"),void 0!==u.onabort?u.onabort=r:u.onreadystatechange=function(){4===u.readyState&&n.setTimeout(function(){t&&r()})},t=t("abort");try{u.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),me.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),me.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return me.globalEval(e),e}}}),me.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),me.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=me("