jekyll-lunr-js-search-multilingual 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 5517048814b03088230a8e52e3462bc9ff56d79376d6840877d3b0871f07f87b
4
+ data.tar.gz: 5a92e8e0478815da5c7ae8ee5cbb7c4c6cbb7689836c4412b8936fb0c92e188f
5
+ SHA512:
6
+ metadata.gz: 6ae2590bde689e5cf7122148d82e02b56286035c03950748b76f21a94901c25ebe83bbda8409f55b908f15e1153dce4b3b3d24e65185136b3322743ca3e8aea8
7
+ data.tar.gz: 3a52fdf8fa44e16fb11bc636839a686ed5beebca76d7d94cf6b32663c2de3c5bfecd35355fea8f46d2ac19e792a72ff7152c85df38d86c540dc8ad68f94b9199
@@ -0,0 +1,6 @@
1
+ /**
2
+ * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.5-multilingual-0.0.3
3
+ * Copyright (C) 2018 Oliver Nightingale
4
+ * @license MIT
5
+ */
6
+ !function(){var e=function(t){var r=new e.Builder;return r.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),r.searchPipeline.add(e.stemmer),t.call(r,r),r.build()};e.version="2.3.5-multilingual-0.0.3",e.utils={},e.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),e.utils.asString=function(e){return void 0===e||null===e?"":e.toString()},e.utils.clone=function(e){if(null===e||void 0===e)return e;for(var t=Object.create(null),r=Object.keys(e),i=0;i<r.length;i++){var n=r[i],s=e[n];if(Array.isArray(s))t[n]=s.slice();else{if("string"!=typeof s&&"number"!=typeof s&&"boolean"!=typeof s)throw new TypeError("clone is not deep and does not support nested objects");t[n]=s}}return t},e.FieldRef=function(e,t,r){this.docRef=e,this.fieldName=t,this._stringValue=r},e.FieldRef.joiner="/",e.FieldRef.fromString=function(t){var r=t.indexOf(e.FieldRef.joiner);if(r===-1)throw"malformed field ref string";var i=t.slice(0,r),n=t.slice(r+1);return new e.FieldRef(n,i,t)},e.FieldRef.prototype.toString=function(){return void 0==this._stringValue&&(this._stringValue=this.fieldName+e.FieldRef.joiner+this.docRef),this._stringValue},e.Set=function(e){if(this.elements=Object.create(null),e){this.length=e.length;for(var t=0;t<this.length;t++)this.elements[e[t]]=!0}else this.length=0},e.Set.complete={intersect:function(e){return e},union:function(e){return e},contains:function(){return!0}},e.Set.empty={intersect:function(){return this},union:function(e){return e},contains:function(){return!1}},e.Set.prototype.contains=function(e){return!!this.elements[e]},e.Set.prototype.intersect=function(t){var r,i,n,s=[];if(t===e.Set.complete)return this;if(t===e.Set.empty)return t;this.length<t.length?(r=this,i=t):(r=t,i=this),n=Object.keys(r.elements);for(var o=0;o<n.length;o++){var a=n[o];a in i.elements&&s.push(a)}return new e.Set(s)},e.Set.prototype.union=function(t){return t===e.Set.complete?e.Set.complete:t===e.Set.empty?this:new e.Set(Object.keys(this.elements).concat(Object.keys(t.elements)))},e.idf=function(e,t){var r=0;for(var i in e)"_index"!=i&&(r+=Object.keys(e[i]).length);var n=(t-r+.5)/(r+.5);return Math.log(1+Math.abs(n))},e.Token=function(e,t){this.str=e||"",this.metadata=t||{}},e.Token.prototype.toString=function(){return this.str},e.Token.prototype.update=function(e){return this.str=e(this.str,this.metadata),this},e.Token.prototype.clone=function(t){return t=t||function(e){return e},new e.Token(t(this.str,this.metadata),this.metadata)},e.tokenizer=function(t,r){if(null==t||void 0==t)return[];if(Array.isArray(t))return t.map(function(t){return new e.Token(e.utils.asString(t).toLowerCase(),e.utils.clone(r))});for(var i=t.toString().trim().toLowerCase(),n=i.length,s=[],o=0,a=0;o<=n;o++){var u=i.charAt(o),l=o-a;if(u.match(e.tokenizer.separator)||o==n){if(l>0){var c=e.utils.clone(r)||{};c.position=[a,l],c.index=s.length,s.push(new e.Token(i.slice(a,o),c))}a=o+1}}return s},e.tokenizer.separator=/[\s\-]+/,e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,r){r in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+r),t.label=r,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var r=t.label&&t.label in this.registeredFunctions;r||e.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},e.Pipeline.load=function(t){var r=new e.Pipeline;return t.forEach(function(t){var i=e.Pipeline.registeredFunctions[t];if(!i)throw new Error("Cannot load unregistered function: "+t);r.add(i)}),r},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(t){e.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},e.Pipeline.prototype.after=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,r)},e.Pipeline.prototype.before=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");this._stack.splice(i,0,r)},e.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);t!=-1&&this._stack.splice(t,1)},e.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r<t;r++){for(var i=this._stack[r],n=[],s=0;s<e.length;s++){var o=i(e[s],s,e);if(void 0!==o&&""!==o)if(Array.isArray(o))for(var a=0;a<o.length;a++)n.push(o[a]);else n.push(o)}e=n}return e},e.Pipeline.prototype.runString=function(t,r){var i=new e.Token(t,r);return this.run([i]).map(function(e){return e.toString()})},e.Pipeline.prototype.reset=function(){this._stack=[]},e.Pipeline.prototype.toJSON=function(){return this._stack.map(function(t){return e.Pipeline.warnIfFunctionNotRegistered(t),t.label})},e.Vector=function(e){this._magnitude=0,this.elements=e||[]},e.Vector.prototype.positionForIndex=function(e){if(0==this.elements.length)return 0;for(var t=0,r=this.elements.length/2,i=r-t,n=Math.floor(i/2),s=this.elements[2*n];i>1&&(s<e&&(t=n),s>e&&(r=n),s!=e);)i=r-t,n=t+Math.floor(i/2),s=this.elements[2*n];return s==e?2*n:s>e?2*n:s<e?2*(n+1):void 0},e.Vector.prototype.insert=function(e,t){this.upsert(e,t,function(){throw"duplicate index"})},e.Vector.prototype.upsert=function(e,t,r){this._magnitude=0;var i=this.positionForIndex(e);this.elements[i]==e?this.elements[i+1]=r(this.elements[i+1],t):this.elements.splice(i,0,e,t)},e.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var e=0,t=this.elements.length,r=1;r<t;r+=2){var i=this.elements[r];e+=i*i}return this._magnitude=Math.sqrt(e)},e.Vector.prototype.dot=function(e){for(var t=0,r=this.elements,i=e.elements,n=r.length,s=i.length,o=0,a=0,u=0,l=0;u<n&&l<s;)o=r[u],a=i[l],o<a?u+=2:o>a?l+=2:o==a&&(t+=r[u+1]*i[l+1],u+=2,l+=2);return t},e.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},e.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t<this.elements.length;t+=2,r++)e[r]=this.elements[t];return e},e.Vector.prototype.toJSON=function(){return this.elements},e.stemmer=function(){function e(e){return e}function t(e){var t,n,s,o,a,u,l;if(e.length<3)return e;if(s=e.substr(0,1),"y"==s&&(e=s.toUpperCase()+e.substr(1)),o=m,a=v,o.test(e)?e=e.replace(o,"$1$2"):a.test(e)&&(e=e.replace(a,"$1$2")),o=g,a=x,o.test(e)){var c=o.exec(e);o=h,o.test(c[1])&&(o=w,e=e.replace(o,""))}else if(a.test(e)){var c=a.exec(e);t=c[1],a=y,a.test(t)&&(e=t,a=Q,u=k,l=S,a.test(e)?e+="e":u.test(e)?(o=w,e=e.replace(o,"")):l.test(e)&&(e+="e"))}if(o=E,o.test(e)){var c=o.exec(e);t=c[1],e=t+"i"}if(o=L,o.test(e)){var c=o.exec(e);t=c[1],n=c[2],o=h,o.test(t)&&(e=t+r[n])}if(o=b,o.test(e)){var c=o.exec(e);t=c[1],n=c[2],o=h,o.test(t)&&(e=t+i[n])}if(o=P,a=T,o.test(e)){var c=o.exec(e);t=c[1],o=f,o.test(t)&&(e=t)}else if(a.test(e)){var c=a.exec(e);t=c[1]+c[2],a=f,a.test(t)&&(e=t)}if(o=O,o.test(e)){var c=o.exec(e);t=c[1],o=f,a=p,u=R,(o.test(t)||a.test(t)&&!u.test(t))&&(e=t)}return o=I,a=f,o.test(e)&&a.test(e)&&(o=w,e=e.replace(o,"")),"y"==s&&(e=s.toLowerCase()+e.substr(1)),e}var r={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},i={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",s="[aeiouy]",o=n+"[^aeiouy]*",a=s+"[aeiou]*",u="^("+o+")?"+a+o,l="^("+o+")?"+a+o+"("+a+")?$",c="^("+o+")?"+a+o+a+o,d="^("+o+")?"+s,h=new RegExp(u),f=new RegExp(c),p=new RegExp(l),y=new RegExp(d),m=/^(.+?)(ss|i)es$/,v=/^(.+?)([^s])s$/,g=/^(.+?)eed$/,x=/^(.+?)(ed|ing)$/,w=/.$/,Q=/(at|bl|iz)$/,k=new RegExp("([^aeiouylsz])\\1$"),S=new RegExp("^"+o+s+"[^aeiouwxy]$"),E=/^(.+?[^aeiou])y$/,L=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,b=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,P=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,T=/^(.+?)(s|t)(ion)$/,O=/^(.+?)e$/,I=/ll$/,R=new RegExp("^"+o+s+"[^aeiouwxy]$"),F=function(r){return r=t(r),r=e(r)};return function(e){return e.update(F)}}(),e.Pipeline.registerFunction(e.stemmer,"stemmer"),e.generateStopWordFilter=function(e){var t=e.reduce(function(e,t){return e[t]=t,e},{});return function(e){if(e&&t[e.toString()]!==e.toString())return e}},e.stopWordFilter=e.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),e.Pipeline.registerFunction(e.stopWordFilter,"stopWordFilter"),e.trimmer=function(e){return e.update(function(e){return e.replace(new RegExp("^[^\\wа-яА-ЯёЁ]+"),"").replace(new RegExp("[^\\wа-яА-ЯёЁ]+$"),"")})},e.Pipeline.registerFunction(e.trimmer,"trimmer"),e.TokenSet=function(){this["final"]=!1,this.edges={},this.id=e.TokenSet._nextId,e.TokenSet._nextId+=1},e.TokenSet._nextId=1,e.TokenSet.fromArray=function(t){for(var r=new e.TokenSet.Builder,i=0,n=t.length;i<n;i++)r.insert(t[i]);return r.finish(),r.root},e.TokenSet.fromClause=function(t){return"editDistance"in t?e.TokenSet.fromFuzzyString(t.term,t.editDistance):e.TokenSet.fromString(t.term)},e.TokenSet.fromFuzzyString=function(t,r){for(var i=new e.TokenSet,n=[{node:i,editsRemaining:r,str:t}];n.length;){var s=n.pop();if(s.str.length>0){var o,a=s.str.charAt(0);a in s.node.edges?o=s.node.edges[a]:(o=new e.TokenSet,s.node.edges[a]=o),1==s.str.length&&(o["final"]=!0),n.push({node:o,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining>0&&s.str.length>1){var u,a=s.str.charAt(1);a in s.node.edges?u=s.node.edges[a]:(u=new e.TokenSet,s.node.edges[a]=u),s.str.length<=2?u["final"]=!0:n.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(2)})}if(s.editsRemaining>0&&1==s.str.length&&(s.node["final"]=!0),s.editsRemaining>0&&s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new e.TokenSet;s.node.edges["*"]=l}1==s.str.length?l["final"]=!0:n.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.editsRemaining>0){if("*"in s.node.edges)var c=s.node.edges["*"];else{var c=new e.TokenSet;s.node.edges["*"]=c}0==s.str.length?c["final"]=!0:n.push({node:c,editsRemaining:s.editsRemaining-1,str:s.str})}if(s.editsRemaining>0&&s.str.length>1){var d,h=s.str.charAt(0),f=s.str.charAt(1);f in s.node.edges?d=s.node.edges[f]:(d=new e.TokenSet,s.node.edges[f]=d),1==s.str.length?d["final"]=!0:n.push({node:d,editsRemaining:s.editsRemaining-1,str:h+s.str.slice(2)})}}return i},e.TokenSet.fromString=function(t){for(var r=new e.TokenSet,i=r,n=0,s=t.length;n<s;n++){var o=t[n],a=n==s-1;if("*"==o)r.edges[o]=r,r["final"]=a;else{var u=new e.TokenSet;u["final"]=a,r.edges[o]=u,r=u}}return i},e.TokenSet.prototype.toArray=function(){for(var e=[],t=[{prefix:"",node:this}];t.length;){var r=t.pop(),i=Object.keys(r.node.edges),n=i.length;r.node["final"]&&(r.prefix.charAt(0),e.push(r.prefix));for(var s=0;s<n;s++){var o=i[s];t.push({prefix:r.prefix.concat(o),node:r.node.edges[o]})}}return e},e.TokenSet.prototype.toString=function(){if(this._str)return this._str;for(var e=this["final"]?"1":"0",t=Object.keys(this.edges).sort(),r=t.length,i=0;i<r;i++){var n=t[i],s=this.edges[n];e=e+n+s.id}return e},e.TokenSet.prototype.intersect=function(t){for(var r=new e.TokenSet,i=void 0,n=[{qNode:t,output:r,node:this}];n.length;){i=n.pop();for(var s=Object.keys(i.qNode.edges),o=s.length,a=Object.keys(i.node.edges),u=a.length,l=0;l<o;l++)for(var c=s[l],d=0;d<u;d++){var h=a[d];if(h==c||"*"==c){var f=i.node.edges[h],p=i.qNode.edges[c],y=f["final"]&&p["final"],m=void 0;h in i.output.edges?(m=i.output.edges[h],m["final"]=m["final"]||y):(m=new e.TokenSet,m["final"]=y,i.output.edges[h]=m),n.push({qNode:p,output:m,node:f})}}}return r},e.TokenSet.Builder=function(){this.previousWord="",this.root=new e.TokenSet,this.uncheckedNodes=[],this.minimizedNodes={}},e.TokenSet.Builder.prototype.insert=function(t){var r,i=0;if(t<this.previousWord)throw new Error("Out of order word insertion");for(var n=0;n<t.length&&n<this.previousWord.length&&t[n]==this.previousWord[n];n++)i++;this.minimize(i),r=0==this.uncheckedNodes.length?this.root:this.uncheckedNodes[this.uncheckedNodes.length-1].child;for(var n=i;n<t.length;n++){var s=new e.TokenSet,o=t[n];r.edges[o]=s,this.uncheckedNodes.push({parent:r,"char":o,child:s}),r=s}r["final"]=!0,this.previousWord=t},e.TokenSet.Builder.prototype.finish=function(){this.minimize(0)},e.TokenSet.Builder.prototype.minimize=function(e){for(var t=this.uncheckedNodes.length-1;t>=e;t--){var r=this.uncheckedNodes[t],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r["char"]]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}},e.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},e.Index.prototype.search=function(t){return this.query(function(r){var i=new e.QueryParser(t,r);i.parse()})},e.Index.prototype.query=function(t){for(var r=new e.Query(this.fields),i=Object.create(null),n=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),u=0;u<this.fields.length;u++)n[this.fields[u]]=new e.Vector;t.call(r,r);for(var u=0;u<r.clauses.length;u++){var l=r.clauses[u],c=null,d=e.Set.complete;c=l.usePipeline?this.pipeline.runString(l.term,{fields:l.fields}):[l.term];for(var h=0;h<c.length;h++){var f=c[h];l.term=f;var p=e.TokenSet.fromClause(l),y=this.tokenSet.intersect(p).toArray();if(0===y.length&&l.presence===e.Query.presence.REQUIRED){for(var m=0;m<l.fields.length;m++){var v=l.fields[m];o[v]=e.Set.empty}break}for(var g=0;g<y.length;g++)for(var x=y[g],w=this.invertedIndex[x],Q=w._index,m=0;m<l.fields.length;m++){var v=l.fields[m],k=w[v],S=Object.keys(k),E=x+"/"+v,L=new e.Set(S);if(l.presence==e.Query.presence.REQUIRED&&(d=d.union(L),void 0===o[v]&&(o[v]=e.Set.complete)),l.presence!=e.Query.presence.PROHIBITED){if(n[v].upsert(Q,l.boost,function(e,t){return e+t}),!s[E]){for(var b=0;b<S.length;b++){var P,T=S[b],O=new e.FieldRef(T,v),I=k[T];void 0===(P=i[O])?i[O]=new e.MatchData(x,v,I):P.add(x,v,I)}s[E]=!0}}else void 0===a[v]&&(a[v]=e.Set.empty),a[v]=a[v].union(L)}}if(l.presence===e.Query.presence.REQUIRED)for(var m=0;m<l.fields.length;m++){var v=l.fields[m];o[v]=o[v].intersect(d)}}for(var R=e.Set.complete,F=e.Set.empty,u=0;u<this.fields.length;u++){var v=this.fields[u];o[v]&&(R=R.intersect(o[v])),a[v]&&(F=F.union(a[v]))}var C=Object.keys(i),N=[],_=Object.create(null);if(r.isNegated()){C=Object.keys(this.fieldVectors);for(var u=0;u<C.length;u++){var O=C[u],j=e.FieldRef.fromString(O);i[O]=new e.MatchData}}for(var u=0;u<C.length;u++){var j=e.FieldRef.fromString(C[u]),D=j.docRef;if(R.contains(D)&&!F.contains(D)){var A,B=this.fieldVectors[j],V=n[j.fieldName].similarity(B);if(void 0!==(A=_[D]))A.score+=V,A.matchData.combine(i[j]);else{var z={ref:D,score:V,matchData:i[j]};_[D]=z,N.push(z)}}}return N.sort(function(e,t){return t.score-e.score})},e.Index.prototype.toJSON=function(){var t=Object.keys(this.invertedIndex).sort().map(function(e){return[e,this.invertedIndex[e]]},this),r=Object.keys(this.fieldVectors).map(function(e){return[e,this.fieldVectors[e].toJSON()]},this);return{version:e.version,fields:this.fields,fieldVectors:r,invertedIndex:t,pipeline:this.pipeline.toJSON()}},e.Index.load=function(t){var r={},i={},n=t.fieldVectors,s=Object.create(null),o=t.invertedIndex,a=new e.TokenSet.Builder,u=e.Pipeline.load(t.pipeline);t.version!=e.version&&e.utils.warn("Version mismatch when loading serialised index. Current version of lunr '"+e.version+"' does not match serialized index '"+t.version+"'");for(var l=0;l<n.length;l++){var c=n[l],d=c[0],h=c[1];i[d]=new e.Vector(h)}for(var l=0;l<o.length;l++){var c=o[l],f=c[0],p=c[1];a.insert(f),s[f]=p}return a.finish(),r.fields=t.fields,r.fieldVectors=i,r.invertedIndex=s,r.tokenSet=a.root,r.pipeline=u,new e.Index(r)},e.Builder=function(){this._ref="id",this._fields=Object.create(null),this._documents=Object.create(null),this.invertedIndex=Object.create(null),this.fieldTermFrequencies={},this.fieldLengths={},this.tokenizer=e.tokenizer,this.pipeline=new e.Pipeline,this.searchPipeline=new e.Pipeline,this.documentCount=0,this._b=.75,this._k1=1.2,this.termIndex=0,this.metadataWhitelist=[]},e.Builder.prototype.ref=function(e){this._ref=e},e.Builder.prototype.field=function(e,t){if(/\//.test(e))throw new RangeError("Field '"+e+"' contains illegal character '/'");this._fields[e]=t||{}},e.Builder.prototype.b=function(e){e<0?this._b=0:e>1?this._b=1:this._b=e},e.Builder.prototype.k1=function(e){this._k1=e},e.Builder.prototype.add=function(t,r){var i=t[this._ref],n=Object.keys(this._fields);this._documents[i]=r||{},this.documentCount+=1;for(var s=0;s<n.length;s++){var o=n[s],a=this._fields[o].extractor,u=a?a(t):t[o],l=this.tokenizer(u,{fields:[o]}),c=this.pipeline.run(l),d=new e.FieldRef(i,o),h=Object.create(null);this.fieldTermFrequencies[d]=h,this.fieldLengths[d]=0,this.fieldLengths[d]+=c.length;for(var f=0;f<c.length;f++){var p=c[f];if(void 0==h[p]&&(h[p]=0),h[p]+=1,void 0==this.invertedIndex[p]){var y=Object.create(null);y._index=this.termIndex,this.termIndex+=1;for(var m=0;m<n.length;m++)y[n[m]]=Object.create(null);this.invertedIndex[p]=y}void 0==this.invertedIndex[p][o][i]&&(this.invertedIndex[p][o][i]=Object.create(null));for(var v=0;v<this.metadataWhitelist.length;v++){var g=this.metadataWhitelist[v],x=p.metadata[g];void 0==this.invertedIndex[p][o][i][g]&&(this.invertedIndex[p][o][i][g]=[]),this.invertedIndex[p][o][i][g].push(x)}}}},e.Builder.prototype.calculateAverageFieldLengths=function(){for(var t=Object.keys(this.fieldLengths),r=t.length,i={},n={},s=0;s<r;s++){var o=e.FieldRef.fromString(t[s]),a=o.fieldName;n[a]||(n[a]=0),n[a]+=1,i[a]||(i[a]=0),i[a]+=this.fieldLengths[o]}for(var u=Object.keys(this._fields),s=0;s<u.length;s++){var l=u[s];i[l]=i[l]/n[l]}this.averageFieldLength=i},e.Builder.prototype.createFieldVectors=function(){for(var t={},r=Object.keys(this.fieldTermFrequencies),i=r.length,n=Object.create(null),s=0;s<i;s++){for(var o=e.FieldRef.fromString(r[s]),a=o.fieldName,u=this.fieldLengths[o],l=new e.Vector,c=this.fieldTermFrequencies[o],d=Object.keys(c),h=d.length,f=this._fields[a].boost||1,p=this._documents[o.docRef].boost||1,y=0;y<h;y++){var m,v,g,x=d[y],w=c[x],Q=this.invertedIndex[x]._index;void 0===n[x]?(m=e.idf(this.invertedIndex[x],this.documentCount),n[x]=m):m=n[x],v=m*((this._k1+1)*w)/(this._k1*(1-this._b+this._b*(u/this.averageFieldLength[a]))+w),v*=f,v*=p,g=Math.round(1e3*v)/1e3,l.insert(Q,g)}t[o]=l}this.fieldVectors=t},e.Builder.prototype.createTokenSet=function(){this.tokenSet=e.TokenSet.fromArray(Object.keys(this.invertedIndex).sort())},e.Builder.prototype.build=function(){return this.calculateAverageFieldLengths(),this.createFieldVectors(),this.createTokenSet(),new e.Index({invertedIndex:this.invertedIndex,fieldVectors:this.fieldVectors,tokenSet:this.tokenSet,fields:Object.keys(this._fields),pipeline:this.searchPipeline})},e.Builder.prototype.use=function(e){var t=Array.prototype.slice.call(arguments,1);t.unshift(this),e.apply(this,t)},e.MatchData=function(e,t,r){for(var i=Object.create(null),n=Object.keys(r||{}),s=0;s<n.length;s++){var o=n[s];i[o]=r[o].slice()}this.metadata=Object.create(null),void 0!==e&&(this.metadata[e]=Object.create(null),this.metadata[e][t]=i)},e.MatchData.prototype.combine=function(e){for(var t=Object.keys(e.metadata),r=0;r<t.length;r++){var i=t[r],n=Object.keys(e.metadata[i]);void 0==this.metadata[i]&&(this.metadata[i]=Object.create(null));for(var s=0;s<n.length;s++){var o=n[s],a=Object.keys(e.metadata[i][o]);void 0==this.metadata[i][o]&&(this.metadata[i][o]=Object.create(null));for(var u=0;u<a.length;u++){var l=a[u];void 0==this.metadata[i][o][l]?this.metadata[i][o][l]=e.metadata[i][o][l]:this.metadata[i][o][l]=this.metadata[i][o][l].concat(e.metadata[i][o][l])}}}},e.MatchData.prototype.add=function(e,t,r){if(!(e in this.metadata))return this.metadata[e]=Object.create(null),void(this.metadata[e][t]=r);if(!(t in this.metadata[e]))return void(this.metadata[e][t]=r);for(var i=Object.keys(r),n=0;n<i.length;n++){var s=i[n];s in this.metadata[e][t]?this.metadata[e][t][s]=this.metadata[e][t][s].concat(r[s]):this.metadata[e][t][s]=r[s]}},e.Query=function(e){this.clauses=[],this.allFields=e},e.Query.wildcard=new String("*"),e.Query.wildcard.NONE=0,e.Query.wildcard.LEADING=1,e.Query.wildcard.TRAILING=2,e.Query.presence={OPTIONAL:1,REQUIRED:2,PROHIBITED:3},e.Query.prototype.clause=function(t){return"fields"in t||(t.fields=this.allFields),"boost"in t||(t.boost=1),"usePipeline"in t||(t.usePipeline=!0),"wildcard"in t||(t.wildcard=e.Query.wildcard.NONE),t.wildcard&e.Query.wildcard.LEADING&&t.term.charAt(0)!=e.Query.wildcard&&(t.term="*"+t.term),t.wildcard&e.Query.wildcard.TRAILING&&t.term.slice(-1)!=e.Query.wildcard&&(t.term=""+t.term+"*"),"presence"in t||(t.presence=e.Query.presence.OPTIONAL),this.clauses.push(t),this},e.Query.prototype.isNegated=function(){for(var t=0;t<this.clauses.length;t++)if(this.clauses[t].presence!=e.Query.presence.PROHIBITED)return!1;return!0},e.Query.prototype.term=function(t,r){if(Array.isArray(t))return t.forEach(function(t){this.term(t,e.utils.clone(r))},this),this;var i=r||{};return i.term=t.toString(),this.clause(i),this},e.QueryParseError=function(e,t,r){this.name="QueryParseError",this.message=e,this.start=t,this.end=r},e.QueryParseError.prototype=new Error,e.QueryLexer=function(e){this.lexemes=[],this.str=e,this.length=e.length,this.pos=0,this.start=0,this.escapeCharPositions=[]},e.QueryLexer.prototype.run=function(){for(var t=e.QueryLexer.lexText;t;)t=t(this)},e.QueryLexer.prototype.sliceString=function(){for(var e=[],t=this.start,r=this.pos,i=0;i<this.escapeCharPositions.length;i++)r=this.escapeCharPositions[i],e.push(this.str.slice(t,r)),t=r+1;return e.push(this.str.slice(t,this.pos)),this.escapeCharPositions.length=0,e.join("")},e.QueryLexer.prototype.emit=function(e){this.lexemes.push({type:e,str:this.sliceString(),start:this.start,end:this.pos}),this.start=this.pos},e.QueryLexer.prototype.escapeCharacter=function(){this.escapeCharPositions.push(this.pos-1),this.pos+=1},e.QueryLexer.prototype.next=function(){if(this.pos>=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){var t,r;do t=this.next(),r=t.charCodeAt(0);while(r>47&&r<58);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos<this.length},e.QueryLexer.EOS="EOS",e.QueryLexer.FIELD="FIELD",e.QueryLexer.TERM="TERM",e.QueryLexer.EDIT_DISTANCE="EDIT_DISTANCE",e.QueryLexer.BOOST="BOOST",e.QueryLexer.PRESENCE="PRESENCE",e.QueryLexer.lexField=function(t){return t.backup(),t.emit(e.QueryLexer.FIELD),t.ignore(),e.QueryLexer.lexText},e.QueryLexer.lexTerm=function(t){if(t.width()>1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more())return e.QueryLexer.lexText},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.termSeparator=e.tokenizer.separator,e.QueryLexer.lexText=function(t){for(;;){var r=t.next();if(r==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(92!=r.charCodeAt(0)){if(":"==r)return e.QueryLexer.lexField;if("~"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if("^"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if("+"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if("-"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if(r.match(e.QueryLexer.termSeparator))return e.QueryLexer.lexTerm}else t.escapeCharacter()}},e.QueryParser=function(t,r){this.lexer=new e.QueryLexer(t),this.query=r,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseClause;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},e.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},e.QueryParser.parseClause=function(t){var r=t.peekLexeme();if(void 0!=r)switch(r.type){case e.QueryLexer.PRESENCE:return e.QueryParser.parsePresence;case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(i+=" with value '"+r.str+"'"),new e.QueryParseError(i,r.start,r.end)}},e.QueryParser.parsePresence=function(t){var r=t.consumeLexeme();if(void 0!=r){switch(r.str){case"-":t.currentClause.presence=e.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=e.Query.presence.REQUIRED;break;default:var i="unrecognised presence operator'"+r.str+"'";throw new e.QueryParseError(i,r.start,r.end)}var n=t.peekLexeme();if(void 0==n){var i="expecting term or field, found nothing";throw new e.QueryParseError(i,r.start,r.end)}switch(n.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expecting term or field, found '"+n.type+"'";throw new e.QueryParseError(i,n.start,n.end)}}},e.QueryParser.parseField=function(t){var r=t.consumeLexeme();if(void 0!=r){if(t.query.allFields.indexOf(r.str)==-1){var i=t.query.allFields.map(function(e){return"'"+e+"'"}).join(", "),n="unrecognised field '"+r.str+"', possible fields: "+i;throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.fields=[r.str];var s=t.peekLexeme();if(void 0==s){var n="expecting term, found nothing";throw new e.QueryParseError(n,r.start,r.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var n="expecting term, found '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseTerm=function(t){var r=t.consumeLexeme();if(void 0!=r){t.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(t.currentClause.usePipeline=!1);var i=t.peekLexeme();if(void 0==i)return void t.nextClause();switch(i.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+i.type+"'";throw new e.QueryParseError(n,i.start,i.end)}}},e.QueryParser.parseEditDistance=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="edit distance must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.editDistance=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="boost must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.boost=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.lunr=t()}(this,function(){return e})}();
@@ -0,0 +1,43 @@
1
+ /*!
2
+ * jQuery JavaScript Library v2.2.4
3
+ * http://jquery.com/
4
+ *
5
+ * Includes Sizzle.js
6
+ * http://sizzlejs.com/
7
+ *
8
+ * Copyright jQuery Foundation and other contributors
9
+ * Released under the MIT license
10
+ * http://jquery.org/license
11
+ *
12
+ * Date: 2016-05-20T17:23Z
13
+ */
14
+ !function(e,t){"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){function n(e){var t=!!e&&"length"in e&&e.length,n=se.type(e);return"function"!==n&&!se.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e,t,n){if(se.isFunction(t))return se.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return se.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(me.test(t))return se.filter(t,e,n);t=se.filter(t,e)}return se.grep(e,function(e){return K.call(t,e)>-1!==n})}function i(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function s(e){var t={};return se.each(e.match(be)||[],function(e,n){t[n]=!0}),t}function o(){J.removeEventListener("DOMContentLoaded",o),e.removeEventListener("load",o),se.ready()}function a(){this.expando=se.expando+a.uid++}function u(e,t,n){var r;if(n===undefined&&1===e.nodeType)if(r="data-"+t.replace(Ce,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:ke.test(n)?se.parseJSON(n):n)}catch(e){}_e.set(e,t,n)}else n=undefined;return n}function l(e,t,n,r){var i,s=1,o=20,a=r?function(){return r.cur()}:function(){return se.css(e,t,"")},u=a(),l=n&&n[3]||(se.cssNumber[t]?"":"px"),c=(se.cssNumber[t]||"px"!==l&&+u)&&Pe.exec(se.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do{s=s||".5",c/=s,se.style(e,t,c+l)}while(s!==(s=a()/u)&&1!==s&&--o)}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}function c(e,t){var n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[];return t===undefined||t&&se.nodeName(e,t)?se.merge([e],n):n}function f(e,t){for(var n=0,r=e.length;n<r;n++)Ee.set(e[n],"globalEval",!t||Ee.get(t[n],"globalEval"))}function d(e,t,n,r,i){for(var s,o,a,u,l,d,p=t.createDocumentFragment(),h=[],m=0,g=e.length;m<g;m++)if((s=e[m])||0===s)if("object"===se.type(s))se.merge(h,s.nodeType?[s]:s);else if(Ie.test(s)){for(o=o||p.appendChild(t.createElement("div")),a=(De.exec(s)||["",""])[1].toLowerCase(),u=Re[a]||Re._default,o.innerHTML=u[1]+se.htmlPrefilter(s)+u[2],d=u[0];d--;)o=o.lastChild;se.merge(h,o.childNodes),o=p.firstChild,o.textContent=""}else h.push(t.createTextNode(s));for(p.textContent="",m=0;s=h[m++];)if(r&&se.inArray(s,r)>-1)i&&i.push(s);else if(l=se.contains(s.ownerDocument,s),o=c(p.appendChild(s),"script"),l&&f(o),n)for(d=0;s=o[d++];)je.test(s.type||"")&&n.push(s);return p}function p(){return!0}function h(){return!1}function m(){try{return J.activeElement}catch(e){}}function g(e,t,n,r,i,s){var o,a;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=undefined);for(a in t)g(e,a,n,r,t[a],s);return e}if(null==r&&null==i?(i=n,r=n=undefined):null==i&&("string"==typeof n?(i=r,r=undefined):(i=r,r=n,n=undefined)),!1===i)i=h;else if(!i)return e;return 1===s&&(o=i,i=function(e){return se().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=se.guid++)),e.each(function(){se.event.add(this,t,i,r,n)})}function y(e,t){return se.nodeName(e,"table")&&se.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function v(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function x(e){var t=ze.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function b(e,t){var n,r,i,s,o,a,u,l;if(1===t.nodeType){if(Ee.hasData(e)&&(s=Ee.access(e),o=Ee.set(t,s),l=s.events)){delete o.handle,o.events={};for(i in l)for(n=0,r=l[i].length;n<r;n++)se.event.add(t,i,l[i][n])}_e.hasData(e)&&(a=_e.access(e),u=se.extend({},a),_e.set(t,u))}}function w(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ne.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function T(e,t,n,r){t=G.apply([],t);var i,s,o,a,u,l,f=0,p=e.length,h=p-1,m=t[0],g=se.isFunction(m);if(g||p>1&&"string"==typeof m&&!re.checkClone&&$e.test(m))return e.each(function(i){var s=e.eq(i);g&&(t[0]=m.call(this,i,s.html())),T(s,t,n,r)});if(p&&(i=d(t,e[0].ownerDocument,!1,e,r),s=i.firstChild,1===i.childNodes.length&&(i=s),s||r)){for(o=se.map(c(i,"script"),v),a=o.length;f<p;f++)u=i,f!==h&&(u=se.clone(u,!0,!0),a&&se.merge(o,c(u,"script"))),n.call(e[f],u,f);if(a)for(l=o[o.length-1].ownerDocument,se.map(o,x),f=0;f<a;f++)u=o[f],je.test(u.type||"")&&!Ee.access(u,"globalEval")&&se.contains(l,u)&&(u.src?se._evalUrl&&se._evalUrl(u.src):se.globalEval(u.textContent.replace(Be,"")))}return e}function S(e,t,n){for(var r,i=t?se.filter(t,e):e,s=0;null!=(r=i[s]);s++)n||1!==r.nodeType||se.cleanData(c(r)),r.parentNode&&(n&&se.contains(r.ownerDocument,r)&&f(c(r,"script")),r.parentNode.removeChild(r));return e}function E(e,t){var n=se(t.createElement(e)).appendTo(t.body),r=se.css(n[0],"display");return n.detach(),r}function _(e){var t=J,n=We[e];return n||(n=E(e,t),"none"!==n&&n||(Ue=(Ue||se("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=Ue[0].contentDocument,t.write(),t.close(),n=E(e,t),Ue.detach()),We[e]=n),n}function k(e,t,n){var r,i,s,o,a=e.style;return n=n||Je(e),o=n?n.getPropertyValue(t)||n[t]:undefined,""!==o&&o!==undefined||se.contains(e.ownerDocument,e)||(o=se.style(e,t)),n&&!re.pixelMarginRight()&&Xe.test(o)&&Ve.test(t)&&(r=a.width,i=a.minWidth,s=a.maxWidth,a.minWidth=a.maxWidth=a.width=o,o=n.width,a.width=r,a.minWidth=i,a.maxWidth=s),o!==undefined?o+"":o}function C(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function A(e){if(e in nt)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=tt.length;n--;)if((e=tt[n]+t)in nt)return e}function P(e,t,n){var r=Pe.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Q(e,t,n,r,i){for(var s=n===(r?"border":"content")?4:"width"===t?1:0,o=0;s<4;s+=2)"margin"===n&&(o+=se.css(e,n+Qe[s],!0,i)),r?("content"===n&&(o-=se.css(e,"padding"+Qe[s],!0,i)),"margin"!==n&&(o-=se.css(e,"border"+Qe[s]+"Width",!0,i))):(o+=se.css(e,"padding"+Qe[s],!0,i),"padding"!==n&&(o+=se.css(e,"border"+Qe[s]+"Width",!0,i)));return o}function L(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,s=Je(e),o="border-box"===se.css(e,"boxSizing",!1,s);if(i<=0||null==i){if(i=k(e,t,s),(i<0||null==i)&&(i=e.style[t]),Xe.test(i))return i;r=o&&(re.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+Q(e,t,n||(o?"border":"content"),r,s)+"px"}function N(e,t){for(var n,r,i,s=[],o=0,a=e.length;o<a;o++)r=e[o],r.style&&(s[o]=Ee.get(r,"olddisplay"),n=r.style.display,t?(s[o]||"none"!==n||(r.style.display=""),""===r.style.display&&Le(r)&&(s[o]=Ee.access(r,"olddisplay",_(r.nodeName)))):(i=Le(r),"none"===n&&i||Ee.set(r,"olddisplay",i?n:se.css(r,"display"))));for(o=0;o<a;o++)r=e[o],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?s[o]||"":"none"));return e}function D(e,t,n,r,i){return new D.prototype.init(e,t,n,r,i)}function j(){return e.setTimeout(function(){rt=undefined}),rt=se.now()}function R(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)n=Qe[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function I(e,t,n){for(var r,i=(q.tweeners[t]||[]).concat(q.tweeners["*"]),s=0,o=i.length;s<o;s++)if(r=i[s].call(n,t,e))return r}function O(e,t,n){var r,i,s,o,a,u,l,c=this,f={},d=e.style,p=e.nodeType&&Le(e),h=Ee.get(e,"fxshow");n.queue||(a=se._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,u=a.empty.fire,a.empty.fire=function(){a.unqueued||u()}),a.unqueued++,c.always(function(){c.always(function(){a.unqueued--,se.queue(e,"fx").length||a.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],l=se.css(e,"display"),"inline"===("none"===l?Ee.get(e,"olddisplay")||_(e.nodeName):l)&&"none"===se.css(e,"float")&&(d.display="inline-block")),n.overflow&&(d.overflow="hidden",c.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],st.exec(i)){if(delete t[r],s=s||"toggle"===i,i===(p?"hide":"show")){if("show"!==i||!h||h[r]===undefined)continue;p=!0}f[r]=h&&h[r]||se.style(e,r)}else l=undefined;if(se.isEmptyObject(f))"inline"===("none"===l?_(e.nodeName):l)&&(d.display=l);else{h?"hidden"in h&&(p=h.hidden):h=Ee.access(e,"fxshow",{}),s&&(h.hidden=!p),p?se(e).show():c.done(function(){se(e).hide()}),c.done(function(){var t;Ee.remove(e,"fxshow");for(t in f)se.style(e,t,f[t])});for(r in f)o=I(p?h[r]:0,r,c),r in h||(h[r]=o.start,p&&(o.end=o.start,o.start="width"===r||"height"===r?1:0))}}function F(e,t){var n,r,i,s,o;for(n in e)if(r=se.camelCase(n),i=t[r],s=e[n],se.isArray(s)&&(i=s[1],s=e[n]=s[0]),n!==r&&(e[r]=s,delete e[n]),(o=se.cssHooks[r])&&"expand"in o){s=o.expand(s),delete e[r];for(n in s)n in e||(e[n]=s[n],t[n]=i)}else t[r]=i}function q(e,t,n){var r,i,s=0,o=q.prefilters.length,a=se.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=rt||j(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,s=1-r,o=0,u=l.tweens.length;o<u;o++)l.tweens[o].run(s);return a.notifyWith(e,[l,s,n]),s<1&&u?n:(a.resolveWith(e,[l]),!1)},l=a.promise({elem:e,props:se.extend({},t),opts:se.extend(!0,{specialEasing:{},easing:se.easing._default},n),originalProperties:t,originalOptions:n,startTime:rt||j(),duration:n.duration,tweens:[],createTween:function(t,n){var r=se.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(F(c,l.opts.specialEasing);s<o;s++)if(r=q.prefilters[s].call(l,e,c,l.opts))return se.isFunction(r.stop)&&(se._queueHooks(l.elem,l.opts.queue).stop=se.proxy(r.stop,r)),r;return se.map(c,I,l),se.isFunction(l.opts.start)&&l.opts.start.call(e,l),se.fx.timer(se.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function M(e){return e.getAttribute&&e.getAttribute("class")||""}function H(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,s=t.toLowerCase().match(be)||[];if(se.isFunction(n))for(;r=s[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function $(e,t,n,r){function i(a){var u;return s[a]=!0,se.each(e[a]||[],function(e,a){var l=a(t,n,r);return"string"!=typeof l||o||s[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),i(l),!1)}),u}var s={},o=e===_t;return i(t.dataTypes[0])||!s["*"]&&i("*")}function z(e,t){var n,r,i=se.ajaxSettings.flatOptions||{};for(n in t)t[n]!==undefined&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&se.extend(!0,e,r),e}function B(e,t,n){for(var r,i,s,o,a=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),r===undefined&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)s=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){s=i;break}o||(o=i)}s=s||o}if(s)return s!==u[0]&&u.unshift(s),n[s]}function U(e,t,n,r){var i,s,o,a,u,l={},c=e.dataTypes.slice();if(c[1])for(o in e.converters)l[o.toLowerCase()]=e.converters[o];for(s=c.shift();s;)if(e.responseFields[s]&&(n[e.responseFields[s]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=s,s=c.shift())if("*"===s)s=u;else if("*"!==u&&u!==s){if(!(o=l[u+" "+s]||l["* "+s]))for(i in l)if(a=i.split(" "),a[1]===s&&(o=l[u+" "+a[0]]||l["* "+a[0]])){!0===o?o=l[i]:!0!==l[i]&&(s=a[0],c.unshift(a[1]));break}if(!0!==o)if(o&&e["throws"])t=o(t);else try{t=o(t)}catch(e){return{state:"parsererror",error:o?e:"No conversion from "+u+" to "+s}}}return{state:"success",data:t}}function W(e,t,n,r){var i;if(se.isArray(t))se.each(t,function(t,i){n||Pt.test(e)?r(e,i):W(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==se.type(t))r(e,t);else for(i in t)W(e+"["+i+"]",t[i],n,r)}function V(e){return se.isWindow(e)?e:9===e.nodeType&&e.defaultView}var X=[],J=e.document,Z=X.slice,G=X.concat,Y=X.push,K=X.indexOf,ee={},te=ee.toString,ne=ee.hasOwnProperty,re={},ie="2.2.4",se=function(e,t){return new se.fn.init(e,t)},oe=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ae=/^-ms-/,ue=/-([\da-z])/gi,le=function(e,t){return t.toUpperCase()};se.fn=se.prototype={jquery:ie,constructor:se,selector:"",length:0,toArray:function(){return Z.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:Z.call(this)},pushStack:function(e){var t=se.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e){return se.each(this,e)},map:function(e){return this.pushStack(se.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(Z.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:Y,sort:X.sort,splice:X.splice},se.extend=se.fn.extend=function(){var e,t,n,r,i,s,o=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof o&&(l=o,o=arguments[a]||{},a++),"object"==typeof o||se.isFunction(o)||(o={}),a===u&&(o=this,a--);a<u;a++)if(null!=(e=arguments[a]))for(t in e)n=o[t],r=e[t],o!==r&&(l&&r&&(se.isPlainObject(r)||(i=se.isArray(r)))?(i?(i=!1,s=n&&se.isArray(n)?n:[]):s=n&&se.isPlainObject(n)?n:{},o[t]=se.extend(l,s,r)):r!==undefined&&(o[t]=r));return o},se.extend({expando:"jQuery"+(ie+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===se.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=e&&e.toString();return!se.isArray(e)&&t-parseFloat(t)+1>=0},isPlainObject:function(e){var t;if("object"!==se.type(e)||e.nodeType||se.isWindow(e))return!1;if(e.constructor&&!ne.call(e,"constructor")&&!ne.call(e.constructor.prototype||{},"isPrototypeOf"))return!1;for(t in e);return t===undefined||ne.call(e,t)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ee[te.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;(e=se.trim(e))&&(1===e.indexOf("use strict")?(t=J.createElement("script"),t.text=e,J.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(ae,"ms-").replace(ue,le)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var r,i=0;if(n(e))for(r=e.length;i<r&&!1!==t.call(e[i],i,e[i]);i++);else for(i in e)if(!1===t.call(e[i],i,e[i]))break;return e},trim:function(e){return null==e?"":(e+"").replace(oe,"")},makeArray:function(e,t){var r=t||[];return null!=e&&(n(Object(e))?se.merge(r,"string"==typeof e?[e]:e):Y.call(r,e)),r},inArray:function(e,t,n){return null==t?-1:K.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=0,s=e.length,o=!n;i<s;i++)!t(e[i],i)!==o&&r.push(e[i]);return r},map:function(e,t,r){var i,s,o=0,a=[];if(n(e))for(i=e.length;o<i;o++)null!=(s=t(e[o],o,r))&&a.push(s);else for(o in e)null!=(s=t(e[o],o,r))&&a.push(s);return G.apply([],a)},guid:1,proxy:function(e,t){var n,r,i;return"string"==typeof t&&(n=e[t],t=e,e=n),se.isFunction(e)?(r=Z.call(arguments,2),i=function(){return e.apply(t||this,r.concat(Z.call(arguments)))},i.guid=e.guid=e.guid||se.guid++,i):undefined},now:Date.now,support:re}),"function"==typeof Symbol&&(se.fn[Symbol.iterator]=X[Symbol.iterator]),se.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){ee["[object "+t+"]"]=t.toLowerCase()});var ce=/*!
15
+ * Sizzle CSS Selector Engine v2.2.1
16
+ * http://sizzlejs.com/
17
+ *
18
+ * Copyright jQuery Foundation and other contributors
19
+ * Released under the MIT license
20
+ * http://jquery.org/license
21
+ *
22
+ * Date: 2015-10-17
23
+ */
24
+ function(e){function t(e,t,n,r){var i,s,o,a,u,l,f,p,h=t&&t.ownerDocument,m=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==m&&9!==m&&11!==m)return n;if(!r&&((t?t.ownerDocument||t:M)!==N&&L(t),t=t||N,j)){if(11!==m&&(l=ye.exec(e)))if(i=l[1]){if(9===m){if(!(o=t.getElementById(i)))return n;if(o.id===i)return n.push(o),n}else if(h&&(o=h.getElementById(i))&&F(t,o)&&o.id===i)return n.push(o),n}else{if(l[2])return Y.apply(n,t.getElementsByTagName(e)),n;if((i=l[3])&&w.getElementsByClassName&&t.getElementsByClassName)return Y.apply(n,t.getElementsByClassName(i)),n}if(w.qsa&&!U[e+" "]&&(!R||!R.test(e))){if(1!==m)h=t,p=e;else if("object"!==t.nodeName.toLowerCase()){for((a=t.getAttribute("id"))?a=a.replace(xe,"\\$&"):t.setAttribute("id",a=q),f=_(e),s=f.length,u=de.test(a)?"#"+a:"[id='"+a+"']";s--;)f[s]=u+" "+d(f[s]);p=f.join(","),h=ve.test(e)&&c(t.parentNode)||t}if(p)try{return Y.apply(n,h.querySelectorAll(p)),n}catch(e){}finally{a===q&&t.removeAttribute("id")}}}return C(e.replace(ae,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>T.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[q]=!0,e}function i(e){var t=N.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function s(e,t){for(var n=e.split("|"),r=n.length;r--;)T.attrHandle[n[r]]=t}function o(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||V)-(~e.sourceIndex||V);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var i,s=e([],n.length,t),o=s.length;o--;)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function d(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function p(e,t,n){var r=t.dir,i=n&&"parentNode"===r,s=$++;return t.first?function(t,n,s){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,s)}:function(t,n,o){var a,u,l,c=[H,s];if(o){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,o))return!0}else for(;t=t[r];)if(1===t.nodeType||i){if(l=t[q]||(t[q]={}),u=l[t.uniqueID]||(l[t.uniqueID]={}),(a=u[r])&&a[0]===H&&a[1]===s)return c[2]=a[2];if(u[r]=c,c[2]=e(t,n,o))return!0}}}function h(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function m(e,n,r){for(var i=0,s=n.length;i<s;i++)t(e,n[i],r);return r}function g(e,t,n,r,i){for(var s,o=[],a=0,u=e.length,l=null!=t;a<u;a++)(s=e[a])&&(n&&!n(s,r,i)||(o.push(s),l&&t.push(a)));return o}function y(e,t,n,i,s,o){return i&&!i[q]&&(i=y(i)),s&&!s[q]&&(s=y(s,o)),r(function(r,o,a,u){var l,c,f,d=[],p=[],h=o.length,y=r||m(t||"*",a.nodeType?[a]:a,[]),v=!e||!r&&t?y:g(y,d,e,a,u),x=n?s||(r?e:h||i)?[]:o:v;if(n&&n(v,x,a,u),i)for(l=g(x,p),i(l,[],a,u),c=l.length;c--;)(f=l[c])&&(x[p[c]]=!(v[p[c]]=f));if(r){if(s||e){if(s){for(l=[],c=x.length;c--;)(f=x[c])&&l.push(v[c]=f);s(null,x=[],l,u)}for(c=x.length;c--;)(f=x[c])&&(l=s?ee(r,f):d[c])>-1&&(r[l]=!(o[l]=f))}}else x=g(x===o?x.splice(h,x.length):x),s?s(null,o,x,u):Y.apply(o,x)})}function v(e){for(var t,n,r,i=e.length,s=T.relative[e[0].type],o=s||T.relative[" "],a=s?1:0,u=p(function(e){return e===t},o,!0),l=p(function(e){return ee(t,e)>-1},o,!0),c=[function(e,n,r){var i=!s&&(r||n!==A)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];a<i;a++)if(n=T.relative[e[a].type])c=[p(h(c),n)];else{if(n=T.filter[e[a].type].apply(null,e[a].matches),n[q]){for(r=++a;r<i&&!T.relative[e[r].type];r++);return y(a>1&&h(c),a>1&&d(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(ae,"$1"),n,a<r&&v(e.slice(a,r)),r<i&&v(e=e.slice(r)),r<i&&d(e))}c.push(n)}return h(c)}function x(e,n){var i=n.length>0,s=e.length>0,o=function(r,o,a,u,l){var c,f,d,p=0,h="0",m=r&&[],y=[],v=A,x=r||s&&T.find.TAG("*",l),b=H+=null==v?1:Math.random()||.1,w=x.length;for(l&&(A=o===N||o||l);h!==w&&null!=(c=x[h]);h++){if(s&&c){for(f=0,o||c.ownerDocument===N||(L(c),a=!j);d=e[f++];)if(d(c,o||N,a)){u.push(c);break}l&&(H=b)}i&&((c=!d&&c)&&p--,r&&m.push(c))}if(p+=h,i&&h!==p){for(f=0;d=n[f++];)d(m,y,o,a);if(r){if(p>0)for(;h--;)m[h]||y[h]||(y[h]=Z.call(u));y=g(y)}Y.apply(u,y),l&&!r&&y.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(H=b,A=v),m};return i?r(o):o}var b,w,T,S,E,_,k,C,A,P,Q,L,N,D,j,R,I,O,F,q="sizzle"+1*new Date,M=e.document,H=0,$=0,z=n(),B=n(),U=n(),W=function(e,t){return e===t&&(Q=!0),0},V=1<<31,X={}.hasOwnProperty,J=[],Z=J.pop,G=J.push,Y=J.push,K=J.slice,ee=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",re="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ie="\\["+ne+"*("+re+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+re+"))|)"+ne+"*\\]",se=":("+re+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ie+")*)|.*)\\)|)",oe=new RegExp(ne+"+","g"),ae=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),ue=new RegExp("^"+ne+"*,"+ne+"*"),le=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(se),de=new RegExp("^"+re+"$"),pe={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+se),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,me=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,xe=/'|\\/g,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)},Te=function(){L()};try{Y.apply(J=K.call(M.childNodes),M.childNodes),J[M.childNodes.length].nodeType}catch(e){Y={apply:J.length?function(e,t){G.apply(e,K.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}w=t.support={},E=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},L=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:M;return r!==N&&9===r.nodeType&&r.documentElement?(N=r,D=N.documentElement,j=!E(N),(n=N.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Te,!1):n.attachEvent&&n.attachEvent("onunload",Te)),w.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=i(function(e){return e.appendChild(N.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=ge.test(N.getElementsByClassName),w.getById=i(function(e){return D.appendChild(e).id=q,!N.getElementsByName||!N.getElementsByName(q).length}),w.getById?(T.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&j){var n=t.getElementById(e);return n?[n]:[]}},T.filter.ID=function(e){var t=e.replace(be,we);return function(e){return e.getAttribute("id")===t}}):(delete T.find.ID,T.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}}),T.find.TAG=w.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):w.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,s=t.getElementsByTagName(e);if("*"===e){for(;n=s[i++];)1===n.nodeType&&r.push(n);return r}return s},T.find.CLASS=w.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&j)return t.getElementsByClassName(e)},I=[],R=[],(w.qsa=ge.test(N.querySelectorAll))&&(i(function(e){D.appendChild(e).innerHTML="<a id='"+q+"'></a><select id='"+q+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&R.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||R.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+q+"-]").length||R.push("~="),e.querySelectorAll(":checked").length||R.push(":checked"),e.querySelectorAll("a#"+q+"+*").length||R.push(".#.+[+~]")}),i(function(e){var t=N.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&R.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||R.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),R.push(",.*:")})),(w.matchesSelector=ge.test(O=D.matches||D.webkitMatchesSelector||D.mozMatchesSelector||D.oMatchesSelector||D.msMatchesSelector))&&i(function(e){w.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),I.push("!=",se)}),R=R.length&&new RegExp(R.join("|")),I=I.length&&new RegExp(I.join("|")),t=ge.test(D.compareDocumentPosition),F=t||ge.test(D.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},W=t?function(e,t){if(e===t)return Q=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!w.sortDetached&&t.compareDocumentPosition(e)===n?e===N||e.ownerDocument===M&&F(M,e)?-1:t===N||t.ownerDocument===M&&F(M,t)?1:P?ee(P,e)-ee(P,t):0:4&n?-1:1)}:function(e,t){if(e===t)return Q=!0,0;var n,r=0,i=e.parentNode,s=t.parentNode,a=[e],u=[t];if(!i||!s)return e===N?-1:t===N?1:i?-1:s?1:P?ee(P,e)-ee(P,t):0;if(i===s)return o(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;a[r]===u[r];)r++;return r?o(a[r],u[r]):a[r]===M?-1:u[r]===M?1:0},N):N},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==N&&L(e),n=n.replace(ce,"='$1']"),w.matchesSelector&&j&&!U[n+" "]&&(!I||!I.test(n))&&(!R||!R.test(n)))try{var r=O.call(e,n);if(r||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,N,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==N&&L(e),F(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==N&&L(e);var n=T.attrHandle[t.toLowerCase()],r=n&&X.call(T.attrHandle,t.toLowerCase())?n(e,t,!j):undefined;return r!==undefined?r:w.attributes||!j?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(Q=!w.detectDuplicates,P=!w.sortStable&&e.slice(0),e.sort(W),Q){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return P=null,e},S=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+=S(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=S(t);return n},T=t.selectors={cacheLength:50,createPseudo:r,match:pe,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 pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(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=z[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&z(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 s=t.attr(i,e);return null==s?"!="===n:!n||(s+="","="===n?s===r:"!="===n?s!==r:"^="===n?r&&0===s.indexOf(r):"*="===n?r&&s.indexOf(r)>-1:"$="===n?r&&s.slice(-r.length)===r:"~="===n?(" "+s.replace(oe," ")+" ").indexOf(r)>-1:"|="===n&&(s===r||s.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var s="nth"!==e.slice(0,3),o="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,d,p,h,m=s!==o?"nextSibling":"previousSibling",g=t.parentNode,y=a&&t.nodeName.toLowerCase(),v=!u&&!a,x=!1;if(g){if(s){for(;m;){for(d=t;d=d[m];)if(a?d.nodeName.toLowerCase()===y:1===d.nodeType)return!1;h=m="only"===e&&!h&&"nextSibling"}return!0}if(h=[o?g.firstChild:g.lastChild],o&&v){for(d=g,f=d[q]||(d[q]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===H&&l[1],x=p&&l[2],d=p&&g.childNodes[p];d=++p&&d&&d[m]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[H,p,x];break}}else if(v&&(d=t,f=d[q]||(d[q]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===H&&l[1],x=p),!1===x)for(;(d=++p&&d&&d[m]||(x=p=0)||h.pop())&&((a?d.nodeName.toLowerCase()!==y:1!==d.nodeType)||!++x||(v&&(f=d[q]||(d[q]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),c[e]=[H,x]),d!==t)););return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,n){var i,s=T.pseudos[e]||T.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return s[q]?s(n):s.length>1?(i=[e,e,"",n],T.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=s(e,n),o=i.length;o--;)r=ee(e,i[o]),e[r]=!(t[r]=i[o])}):function(e){return s(e,0,i)}):s}},pseudos:{not:r(function(e){var t=[],n=[],i=k(e.replace(ae,"$1"));return i[q]?r(function(e,t,n,r){for(var s,o=i(e,null,r,[]),a=e.length;a--;)(s=o[a])&&(e[a]=!(t[a]=s))}):function(e,r,s){return t[0]=e,i(t,null,s,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||S(t)).indexOf(e)>-1}}),lang:r(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(be,we).toLowerCase(),function(t){var n;do{if(n=j?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===D},focus:function(e){return e===N.activeElement&&(!N.hasFocus||N.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},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!T.pseudos.empty(e)},header:function(e){return me.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:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:l(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:l(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},T.pseudos.nth=T.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})T.pseudos[b]=a(b);for(b in{submit:!0,reset:!0})T.pseudos[b]=u(b);return f.prototype=T.filters=T.pseudos,T.setFilters=new f,_=t.tokenize=function(e,n){var r,i,s,o,a,u,l,c=B[e+" "];if(c)return n?0:c.slice(0);for(a=e,u=[],l=T.preFilter;a;){r&&!(i=ue.exec(a))||(i&&(a=a.slice(i[0].length)||a),u.push(s=[])),r=!1,(i=le.exec(a))&&(r=i.shift(),s.push({value:r,type:i[0].replace(ae," ")}),a=a.slice(r.length));for(o in T.filter)!(i=pe[o].exec(a))||l[o]&&!(i=l[o](i))||(r=i.shift(),s.push({value:r,type:o,matches:i}),a=a.slice(r.length));if(!r)break}return n?a.length:a?t.error(e):B(e,u).slice(0)},k=t.compile=function(e,t){var n,r=[],i=[],s=U[e+" "];if(!s){for(t||(t=_(e)),n=t.length;n--;)s=v(t[n]),s[q]?r.push(s):i.push(s);s=U(e,x(i,r)),s.selector=e}return s},C=t.select=function(e,t,n,r){var i,s,o,a,u,l="function"==typeof e&&e,f=!r&&_(e=l.selector||e);if(n=n||[],1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(o=s[0]).type&&w.getById&&9===t.nodeType&&j&&T.relative[s[1].type]){if(!(t=(T.find.ID(o.matches[0].replace(be,we),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(s.shift().value.length)}for(i=pe.needsContext.test(e)?0:s.length;i--&&(o=s[i],!T.relative[a=o.type]);)if((u=T.find[a])&&(r=u(o.matches[0].replace(be,we),ve.test(s[0].type)&&c(t.parentNode)||t))){if(s.splice(i,1),!(e=r.length&&d(s)))return Y.apply(n,r),n;break}}return(l||k(e,f))(r,t,!j,n,!t||ve.test(e)&&c(t.parentNode)||t),n},w.sortStable=q.split("").sort(W).join("")===q,w.detectDuplicates=!!Q,L(),w.sortDetached=i(function(e){return 1&e.compareDocumentPosition(N.createElement("div"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||s("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||s("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||s(te,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);se.find=ce,se.expr=ce.selectors,se.expr[":"]=se.expr.pseudos,se.uniqueSort=se.unique=ce.uniqueSort,se.text=ce.getText,se.isXMLDoc=ce.isXML,se.contains=ce.contains;var fe=function(e,t,n){for(var r=[],i=n!==undefined;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&se(e).is(n))break;r.push(e)}return r},de=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},pe=se.expr.match.needsContext,he=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,me=/^.[^:#\[\.,]*$/;se.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?se.find.matchesSelector(r,e)?[r]:[]:se.find.matches(e,se.grep(t,function(e){return 1===e.nodeType}))},se.fn.extend({find:function(e){var t,n=this.length,r=[],i=this;if("string"!=typeof e)return this.pushStack(se(e).filter(function(){for(t=0;t<n;t++)if(se.contains(i[t],this))return!0}));for(t=0;t<n;t++)se.find(e,i[t],r);return r=this.pushStack(n>1?se.unique(r):r),r.selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&pe.test(e)?se(e):e||[],!1).length}});var ge,ye=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(se.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||ge,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:ye.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof se?t[0]:t,se.merge(this,se.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:J,!0)),he.test(r[1])&&se.isPlainObject(t))for(r in t)se.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=J.getElementById(r[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=J,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):se.isFunction(e)?n.ready!==undefined?n.ready(e):e(se):(e.selector!==undefined&&(this.selector=e.selector,this.context=e.context),se.makeArray(e,this))}).prototype=se.fn,ge=se(J);var ve=/^(?:parents|prev(?:Until|All))/,xe={children:!0,contents:!0,next:!0,prev:!0};se.fn.extend({has:function(e){var t=se(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(se.contains(this,t[e]))return!0})},closest:function(e,t){for(var n,r=0,i=this.length,s=[],o=pe.test(e)||"string"!=typeof e?se(e,t||this.context):0;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(o?o.index(n)>-1:1===n.nodeType&&se.find.matchesSelector(n,e))){s.push(n);break}return this.pushStack(s.length>1?se.uniqueSort(s):s)},index:function(e){return e?"string"==typeof e?K.call(se(e),this[0]):K.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(se.uniqueSort(se.merge(this.get(),se(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),se.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return fe(e,"parentNode")},parentsUntil:function(e,t,n){return fe(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return fe(e,"nextSibling")},prevAll:function(e){return fe(e,"previousSibling")},nextUntil:function(e,t,n){return fe(e,"nextSibling",n)},prevUntil:function(e,t,n){return fe(e,"previousSibling",n)},siblings:function(e){return de((e.parentNode||{}).firstChild,e)},children:function(e){return de(e.firstChild)},contents:function(e){return e.contentDocument||se.merge([],e.childNodes)}},function(e,t){se.fn[e]=function(n,r){var i=se.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=se.filter(r,i)),this.length>1&&(xe[e]||se.uniqueSort(i),ve.test(e)&&i.reverse()),this.pushStack(i)}});var be=/\S+/g;se.Callbacks=function(e){e="string"==typeof e?s(e):se.extend({},e);var t,n,r,i,o=[],a=[],u=-1,l=function(){for(i=e.once,r=t=!0;a.length;u=-1)for(n=a.shift();++u<o.length;)!1===o[u].apply(n[0],n[1])&&e.stopOnFalse&&(u=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},c={add:function(){return o&&(n&&!t&&(u=o.length-1,a.push(n)),function t(n){se.each(n,function(n,r){se.isFunction(r)?e.unique&&c.has(r)||o.push(r):r&&r.length&&"string"!==se.type(r)&&t(r)})}(arguments),n&&!t&&l()),this},remove:function(){return se.each(arguments,function(e,t){for(var n;(n=se.inArray(t,o,n))>-1;)o.splice(n,1),n<=u&&u--}),this},has:function(e){return e?se.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||(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||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},se.extend({Deferred:function(e){var t=[["resolve","done",se.Callbacks("once memory"),"resolved"],["reject","fail",se.Callbacks("once memory"),"rejected"],["notify","progress",se.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return se.Deferred(function(n){se.each(t,function(t,s){var o=se.isFunction(e[t])&&e[t];i[s[1]](function(){var e=o&&o.apply(this,arguments);e&&se.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[s[0]+"With"](this===r?n.promise():this,o?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?se.extend(e,r):r}},i={};return r.pipe=r.then,se.each(t,function(e,s){var o=s[2],a=s[3];r[s[1]]=o.add,a&&o.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),i[s[0]]=function(){return i[s[0]+"With"](this===i?r:this,arguments),this},i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,s=Z.call(arguments),o=s.length,a=1!==o||e&&se.isFunction(e.promise)?o:0,u=1===a?e:se.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?Z.call(arguments):i,r===t?u.notifyWith(n,r):--a||u.resolveWith(n,r)}};if(o>1)for(t=new Array(o),n=new Array(o),r=new Array(o);i<o;i++)s[i]&&se.isFunction(s[i].promise)?s[i].promise().progress(l(i,n,t)).done(l(i,r,s)).fail(u.reject):--a;return a||u.resolveWith(r,s),u.promise()}});var we;se.fn.ready=function(e){return se.ready.promise().done(e),this},se.extend({isReady:!1,readyWait:1,holdReady:function(e){e?se.readyWait++:se.ready(!0)},ready:function(e){(!0===e?--se.readyWait:se.isReady)||(se.isReady=!0,!0!==e&&--se.readyWait>0||(we.resolveWith(J,[se]),se.fn.triggerHandler&&(se(J).triggerHandler("ready"),se(J).off("ready"))))}}),se.ready.promise=function(t){return we||(we=se.Deferred(),"complete"===J.readyState||"loading"!==J.readyState&&!J.documentElement.doScroll?e.setTimeout(se.ready):(J.addEventListener("DOMContentLoaded",o),e.addEventListener("load",o))),we.promise(t)},se.ready.promise();var Te=function(e,t,n,r,i,s,o){var a=0,u=e.length,l=null==n;if("object"===se.type(n)){i=!0;for(a in n)Te(e,t,a,n[a],!0,s,o)}else if(r!==undefined&&(i=!0,se.isFunction(r)||(o=!0),l&&(o?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(se(e),n)})),t))for(;a<u;a++)t(e[a],n,o?r:r.call(e[a],a,t(e[a],n)));return i?e:l?t.call(e):u?t(e[0],n):s},Se=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};a.uid=1,a.prototype={register:function(e,t){var n=t||{};return e.nodeType?e[this.expando]=n:Object.defineProperty(e,this.expando,{value:n,writable:!0,configurable:!0}),e[this.expando]},cache:function(e){if(!Se(e))return{};var t=e[this.expando];return t||(t={},Se(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[t]=n;else for(r in t)i[r]=t[r];return i},get:function(e,t){return t===undefined?this.cache(e):e[this.expando]&&e[this.expando][t]},access:function(e,t,n){var r;return t===undefined||t&&"string"==typeof t&&n===undefined?(r=this.get(e,t),r!==undefined?r:this.get(e,se.camelCase(t))):(this.set(e,t,n),n!==undefined?n:t)},remove:function(e,t){var n,r,i,s=e[this.expando];if(s!==undefined){if(t===undefined)this.register(e);else{se.isArray(t)?r=t.concat(t.map(se.camelCase)):(i=se.camelCase(t),t in s?r=[t,i]:(r=i,r=r in s?[r]:r.match(be)||[])),n=r.length;for(;n--;)delete s[r[n]]}(t===undefined||se.isEmptyObject(s))&&(e.nodeType?e[this.expando]=undefined:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return t!==undefined&&!se.isEmptyObject(t)}};var Ee=new a,_e=new a,ke=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Ce=/[A-Z]/g;se.extend({hasData:function(e){return _e.hasData(e)||Ee.hasData(e)},data:function(e,t,n){return _e.access(e,t,n)},removeData:function(e,t){_e.remove(e,t)},_data:function(e,t,n){return Ee.access(e,t,n)},_removeData:function(e,t){Ee.remove(e,t)}}),se.fn.extend({data:function(e,t){var n,r,i,s=this[0],o=s&&s.attributes;if(e===undefined){if(this.length&&(i=_e.get(s),1===s.nodeType&&!Ee.get(s,"hasDataAttrs"))){for(n=o.length;n--;)o[n]&&(r=o[n].name,0===r.indexOf("data-")&&(r=se.camelCase(r.slice(5)),u(s,r,i[r])));Ee.set(s,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){_e.set(this,e)}):Te(this,function(t){var n,r;if(s&&t===undefined){if((n=_e.get(s,e)||_e.get(s,e.replace(Ce,"-$&").toLowerCase()))!==undefined)return n;if(r=se.camelCase(e),(n=_e.get(s,r))!==undefined)return n;if((n=u(s,r,undefined))!==undefined)return n}else r=se.camelCase(e),this.each(function(){var n=_e.get(this,r);_e.set(this,r,t),e.indexOf("-")>-1&&n!==undefined&&_e.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){_e.remove(this,e)})}}),se.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Ee.get(e,t),n&&(!r||se.isArray(n)?r=Ee.access(e,t,se.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=se.queue(e,t),r=n.length,i=n.shift(),s=se._queueHooks(e,t),o=function(){se.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Ee.get(e,n)||Ee.access(e,n,{empty:se.Callbacks("once memory").add(function(){Ee.remove(e,[t+"queue",n])})})}}),se.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?se.queue(this[0],e):t===undefined?this:this.each(function(){var n=se.queue(this,e,t);se._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&se.dequeue(this,e)})},dequeue:function(e){return this.each(function(){se.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=se.Deferred(),s=this,o=this.length,a=function(){--r||i.resolveWith(s,[s])};for("string"!=typeof e&&(t=e,e=undefined),e=e||"fx";o--;)(n=Ee.get(s[o],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(t)}});var Ae=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Pe=new RegExp("^(?:([+-])=|)("+Ae+")([a-z%]*)$","i"),Qe=["Top","Right","Bottom","Left"],Le=function(e,t){return e=t||e,"none"===se.css(e,"display")||!se.contains(e.ownerDocument,e)},Ne=/^(?:checkbox|radio)$/i,De=/<([\w:-]+)/,je=/^$|\/(?:java|ecma)script/i,Re={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,"",""]};Re.optgroup=Re.option,Re.tbody=Re.tfoot=Re.colgroup=Re.caption=Re.thead,Re.th=Re.td;var Ie=/<|&#?\w+;/;!function(){var e=J.createDocumentFragment(),t=e.appendChild(J.createElement("div")),n=J.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),re.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",re.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Oe=/^key/,Fe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,qe=/^([^.]*)(?:\.(.+)|)/;se.event={global:{},add:function(e,t,n,r,i){var s,o,a,u,l,c,f,d,p,h,m,g=Ee.get(e);if(g)for(n.handler&&(s=n,n=s.handler,i=s.selector),n.guid||(n.guid=se.guid++),(u=g.events)||(u=g.events={}),(o=g.handle)||(o=g.handle=function(t){return void 0!==se&&se.event.triggered!==t.type?se.event.dispatch.apply(e,arguments):undefined}),t=(t||"").match(be)||[""],l=t.length;l--;)a=qe.exec(t[l])||[],p=m=a[1],h=(a[2]||"").split(".").sort(),p&&(f=se.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=se.event.special[p]||{},c=se.extend({type:p,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&se.expr.match.needsContext.test(i),namespace:h.join(".")},s),(d=u[p])||(d=u[p]=[],d.delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,o)||e.addEventListener&&e.addEventListener(p,o)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,c):d.push(c),se.event.global[p]=!0)},remove:function(e,t,n,r,i){var s,o,a,u,l,c,f,d,p,h,m,g=Ee.hasData(e)&&Ee.get(e);if(g&&(u=g.events)){for(t=(t||"").match(be)||[""],l=t.length;l--;)if(a=qe.exec(t[l])||[],p=m=a[1],h=(a[2]||"").split(".").sort(),p){for(f=se.event.special[p]||{},p=(r?f.delegateType:f.bindType)||p,d=u[p]||[],a=a[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=s=d.length;s--;)c=d[s],!i&&m!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(s,1),c.selector&&d.delegateCount--,f.remove&&f.remove.call(e,c));o&&!d.length&&(f.teardown&&!1!==f.teardown.call(e,h,g.handle)||se.removeEvent(e,p,g.handle),delete u[p])}else for(p in u)se.event.remove(e,p+t[l],n,r,!0);se.isEmptyObject(u)&&Ee.remove(e,"handle events")}},dispatch:function(e){e=se.event.fix(e);var t,n,r,i,s,o=[],a=Z.call(arguments),u=(Ee.get(this,"events")||{})[e.type]||[],l=se.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,e)){for(o=se.event.handlers.call(this,e,u),t=0;(i=o[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,
25
+ n=0;(s=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(s.namespace)||(e.handleObj=s,e.data=s.data,(r=((se.event.special[s.origType]||{}).handle||s.handler).apply(i.elem,a))!==undefined&&!1===(e.result=r)&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,s,o=[],a=t.delegateCount,u=e.target;if(a&&u.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&(!0!==u.disabled||"click"!==e.type)){for(r=[],n=0;n<a;n++)s=t[n],i=s.selector+" ",r[i]===undefined&&(r[i]=s.needsContext?se(i,this).index(u)>-1:se.find(i,this,null,[u]).length),r[i]&&r.push(s);r.length&&o.push({elem:u,handlers:r})}return a<t.length&&o.push({elem:this,handlers:t.slice(a)}),o},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,s=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||J,r=n.documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),e.which||s===undefined||(e.which=1&s?1:2&s?3:4&s?2:0),e}},fix:function(e){if(e[se.expando])return e;var t,n,r,i=e.type,s=e,o=this.fixHooks[i];for(o||(this.fixHooks[i]=o=Fe.test(i)?this.mouseHooks:Oe.test(i)?this.keyHooks:{}),r=o.props?this.props.concat(o.props):this.props,e=new se.Event(s),t=r.length;t--;)n=r[t],e[n]=s[n];return e.target||(e.target=J),3===e.target.nodeType&&(e.target=e.target.parentNode),o.filter?o.filter(e,s):e},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==m()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===m()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&se.nodeName(this,"input"))return this.click(),!1},_default:function(e){return se.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==undefined&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},se.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},se.Event=function(e,t){if(!(this instanceof se.Event))return new se.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.defaultPrevented===undefined&&!1===e.returnValue?p:h):this.type=e,t&&se.extend(this,t),this.timeStamp=e&&e.timeStamp||se.now(),this[se.expando]=!0},se.Event.prototype={constructor:se.Event,isDefaultPrevented:h,isPropagationStopped:h,isImmediatePropagationStopped:h,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=p,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=p,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=p,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},se.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){se.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj;return i&&(i===r||se.contains(r,i))||(e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t),n}}}),se.fn.extend({on:function(e,t,n,r){return g(this,e,t,n,r)},one:function(e,t,n,r){return g(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,se(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=undefined),!1===n&&(n=h),this.each(function(){se.event.remove(this,e,n,t)})}});var Me=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,He=/<script|<style|<link/i,$e=/checked\s*(?:[^=]|=\s*.checked.)/i,ze=/^true\/(.*)/,Be=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;se.extend({htmlPrefilter:function(e){return e.replace(Me,"<$1></$2>")},clone:function(e,t,n){var r,i,s,o,a=e.cloneNode(!0),u=se.contains(e.ownerDocument,e);if(!(re.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||se.isXMLDoc(e)))for(o=c(a),s=c(e),r=0,i=s.length;r<i;r++)w(s[r],o[r]);if(t)if(n)for(s=s||c(e),o=o||c(a),r=0,i=s.length;r<i;r++)b(s[r],o[r]);else b(e,a);return o=c(a,"script"),o.length>0&&f(o,!u&&c(e,"script")),a},cleanData:function(e){for(var t,n,r,i=se.event.special,s=0;(n=e[s])!==undefined;s++)if(Se(n)){if(t=n[Ee.expando]){if(t.events)for(r in t.events)i[r]?se.event.remove(n,r):se.removeEvent(n,r,t.handle);n[Ee.expando]=undefined}n[_e.expando]&&(n[_e.expando]=undefined)}}}),se.fn.extend({domManip:T,detach:function(e){return S(this,e,!0)},remove:function(e){return S(this,e)},text:function(e){return Te(this,function(e){return e===undefined?se.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 T(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){y(this,e).appendChild(e)}})},prepend:function(){return T(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=y(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return T(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return T(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&&(se.cleanData(c(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return se.clone(this,e,t)})},html:function(e){return Te(this,function(e){var t=this[0]||{},n=0,r=this.length;if(e===undefined&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!He.test(e)&&!Re[(De.exec(e)||["",""])[1].toLowerCase()]){e=se.htmlPrefilter(e);try{for(;n<r;n++)t=this[n]||{},1===t.nodeType&&(se.cleanData(c(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return T(this,arguments,function(t){var n=this.parentNode;se.inArray(this,e)<0&&(se.cleanData(c(this)),n&&n.replaceChild(t,this))},e)}}),se.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){se.fn[e]=function(e){for(var n,r=[],i=se(e),s=i.length-1,o=0;o<=s;o++)n=o===s?this:this.clone(!0),se(i[o])[t](n),Y.apply(r,n.get());return this.pushStack(r)}});var Ue,We={HTML:"block",BODY:"block"},Ve=/^margin/,Xe=new RegExp("^("+Ae+")(?!px)[a-z%]+$","i"),Je=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},Ze=function(e,t,n,r){var i,s,o={};for(s in t)o[s]=e.style[s],e.style[s]=t[s];i=n.apply(e,r||[]);for(s in t)e.style[s]=o[s];return i},Ge=J.documentElement;!function(){function t(){a.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",a.innerHTML="",Ge.appendChild(o);var t=e.getComputedStyle(a);n="1%"!==t.top,s="2px"===t.marginLeft,r="4px"===t.width,a.style.marginRight="50%",i="4px"===t.marginRight,Ge.removeChild(o)}var n,r,i,s,o=J.createElement("div"),a=J.createElement("div");a.style&&(a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",re.clearCloneStyle="content-box"===a.style.backgroundClip,o.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",o.appendChild(a),se.extend(re,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return null==r&&t(),r},pixelMarginRight:function(){return null==r&&t(),i},reliableMarginLeft:function(){return null==r&&t(),s},reliableMarginRight:function(){var t,n=a.appendChild(J.createElement("div"));return n.style.cssText=a.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",n.style.marginRight=n.style.width="0",a.style.width="1px",Ge.appendChild(o),t=!parseFloat(e.getComputedStyle(n).marginRight),Ge.removeChild(o),a.removeChild(n),t}}))}();var Ye=/^(none|table(?!-c[ea]).+)/,Ke={position:"absolute",visibility:"hidden",display:"block"},et={letterSpacing:"0",fontWeight:"400"},tt=["Webkit","O","Moz","ms"],nt=J.createElement("div").style;se.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=k(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:{"float":"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,s,o,a=se.camelCase(t),u=e.style;if(t=se.cssProps[a]||(se.cssProps[a]=A(a)||a),o=se.cssHooks[t]||se.cssHooks[a],n===undefined)return o&&"get"in o&&(i=o.get(e,!1,r))!==undefined?i:u[t];s=typeof n,"string"===s&&(i=Pe.exec(n))&&i[1]&&(n=l(e,t,i),s="number"),null!=n&&n===n&&("number"===s&&(n+=i&&i[3]||(se.cssNumber[a]?"":"px")),re.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),o&&"set"in o&&(n=o.set(e,n,r))===undefined||(u[t]=n))}},css:function(e,t,n,r){var i,s,o,a=se.camelCase(t);return t=se.cssProps[a]||(se.cssProps[a]=A(a)||a),o=se.cssHooks[t]||se.cssHooks[a],o&&"get"in o&&(i=o.get(e,!0,n)),i===undefined&&(i=k(e,t,r)),"normal"===i&&t in et&&(i=et[t]),""===n||n?(s=parseFloat(i),!0===n||isFinite(s)?s||0:i):i}}),se.each(["height","width"],function(e,t){se.cssHooks[t]={get:function(e,n,r){if(n)return Ye.test(se.css(e,"display"))&&0===e.offsetWidth?Ze(e,Ke,function(){return L(e,t,r)}):L(e,t,r)},set:function(e,n,r){var i,s=r&&Je(e),o=r&&Q(e,t,r,"border-box"===se.css(e,"boxSizing",!1,s),s);return o&&(i=Pe.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=se.css(e,t)),P(e,n,o)}}}),se.cssHooks.marginLeft=C(re.reliableMarginLeft,function(e,t){if(t)return(parseFloat(k(e,"marginLeft"))||e.getBoundingClientRect().left-Ze(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),se.cssHooks.marginRight=C(re.reliableMarginRight,function(e,t){if(t)return Ze(e,{display:"inline-block"},k,[e,"marginRight"])}),se.each({margin:"",padding:"",border:"Width"},function(e,t){se.cssHooks[e+t]={expand:function(n){for(var r=0,i={},s="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+Qe[r]+t]=s[r]||s[r-2]||s[0];return i}},Ve.test(e)||(se.cssHooks[e+t].set=P)}),se.fn.extend({css:function(e,t){return Te(this,function(e,t,n){var r,i,s={},o=0;if(se.isArray(t)){for(r=Je(e),i=t.length;o<i;o++)s[t[o]]=se.css(e,t[o],!1,r);return s}return n!==undefined?se.style(e,t,n):se.css(e,t)},e,t,arguments.length>1)},show:function(){return N(this,!0)},hide:function(){return N(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Le(this)?se(this).show():se(this).hide()})}}),se.Tween=D,D.prototype={constructor:D,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||se.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(se.cssNumber[n]?"":"px")},cur:function(){var e=D.propHooks[this.prop];return e&&e.get?e.get(this):D.propHooks._default.get(this)},run:function(e){var t,n=D.propHooks[this.prop];return this.options.duration?this.pos=t=se.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):D.propHooks._default.set(this),this}},D.prototype.init.prototype=D.prototype,D.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=se.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){se.fx.step[e.prop]?se.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[se.cssProps[e.prop]]&&!se.cssHooks[e.prop]?e.elem[e.prop]=e.now:se.style(e.elem,e.prop,e.now+e.unit)}}},D.propHooks.scrollTop=D.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},se.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},se.fx=D.prototype.init,se.fx.step={};var rt,it,st=/^(?:toggle|show|hide)$/,ot=/queueHooks$/;se.Animation=se.extend(q,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return l(n.elem,e,Pe.exec(t),n),n}]},tweener:function(e,t){se.isFunction(e)?(t=e,e=["*"]):e=e.match(be);for(var n,r=0,i=e.length;r<i;r++)n=e[r],q.tweeners[n]=q.tweeners[n]||[],q.tweeners[n].unshift(t)},prefilters:[O],prefilter:function(e,t){t?q.prefilters.unshift(e):q.prefilters.push(e)}}),se.speed=function(e,t,n){var r=e&&"object"==typeof e?se.extend({},e):{complete:n||!n&&t||se.isFunction(e)&&e,duration:e,easing:n&&t||t&&!se.isFunction(t)&&t};return r.duration=se.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in se.fx.speeds?se.fx.speeds[r.duration]:se.fx.speeds._default,null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){se.isFunction(r.old)&&r.old.call(this),r.queue&&se.dequeue(this,r.queue)},r},se.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Le).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=se.isEmptyObject(e),s=se.speed(t,n,r),o=function(){var t=q(this,se.extend({},e),s);(i||Ee.get(this,"finish"))&&t.stop(!0)};return o.finish=o,i||!1===s.queue?this.each(o):this.queue(s.queue,o)},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=undefined),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",s=se.timers,o=Ee.get(this);if(i)o[i]&&o[i].stop&&r(o[i]);else for(i in o)o[i]&&o[i].stop&&ot.test(i)&&r(o[i]);for(i=s.length;i--;)s[i].elem!==this||null!=e&&s[i].queue!==e||(s[i].anim.stop(n),t=!1,s.splice(i,1));!t&&n||se.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=Ee.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],s=se.timers,o=r?r.length:0;for(n.finish=!0,se.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=s.length;t--;)s[t].elem===this&&s[t].queue===e&&(s[t].anim.stop(!0),s.splice(t,1));for(t=0;t<o;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),se.each(["toggle","show","hide"],function(e,t){var n=se.fn[t];se.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(R(t,!0),e,r,i)}}),se.each({slideDown:R("show"),slideUp:R("hide"),slideToggle:R("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){se.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),se.timers=[],se.fx.tick=function(){var e,t=0,n=se.timers;for(rt=se.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||se.fx.stop(),rt=undefined},se.fx.timer=function(e){se.timers.push(e),e()?se.fx.start():se.timers.pop()},se.fx.interval=13,se.fx.start=function(){it||(it=e.setInterval(se.fx.tick,se.fx.interval))},se.fx.stop=function(){e.clearInterval(it),it=null},se.fx.speeds={slow:600,fast:200,_default:400},se.fn.delay=function(t,n){return t=se.fx?se.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=J.createElement("input"),t=J.createElement("select"),n=t.appendChild(J.createElement("option"));e.type="checkbox",re.checkOn=""!==e.value,re.optSelected=n.selected,t.disabled=!0,re.optDisabled=!n.disabled,e=J.createElement("input"),e.value="t",e.type="radio",re.radioValue="t"===e.value}();var at,ut=se.expr.attrHandle;se.fn.extend({attr:function(e,t){return Te(this,se.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){se.removeAttr(this,e)})}}),se.extend({attr:function(e,t,n){var r,i,s=e.nodeType;if(3!==s&&8!==s&&2!==s)return"undefined"==typeof e.getAttribute?se.prop(e,t,n):(1===s&&se.isXMLDoc(e)||(t=t.toLowerCase(),i=se.attrHooks[t]||(se.expr.match.bool.test(t)?at:undefined)),n!==undefined?null===n?void se.removeAttr(e,t):i&&"set"in i&&(r=i.set(e,n,t))!==undefined?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=se.find.attr(e,t),null==r?undefined:r))},attrHooks:{type:{set:function(e,t){if(!re.radioValue&&"radio"===t&&se.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,s=t&&t.match(be);if(s&&1===e.nodeType)for(;n=s[i++];)r=se.propFix[n]||n,se.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)}}),at={set:function(e,t,n){return!1===t?se.removeAttr(e,n):e.setAttribute(n,n),n}},se.each(se.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ut[t]||se.find.attr;ut[t]=function(e,t,r){var i,s;return r||(s=ut[t],ut[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,ut[t]=s),i}});var lt=/^(?:input|select|textarea|button)$/i,ct=/^(?:a|area)$/i;se.fn.extend({prop:function(e,t){return Te(this,se.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[se.propFix[e]||e]})}}),se.extend({prop:function(e,t,n){var r,i,s=e.nodeType;if(3!==s&&8!==s&&2!==s)return 1===s&&se.isXMLDoc(e)||(t=se.propFix[t]||t,i=se.propHooks[t]),n!==undefined?i&&"set"in i&&(r=i.set(e,n,t))!==undefined?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=se.find.attr(e,"tabindex");return t?parseInt(t,10):lt.test(e.nodeName)||ct.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),re.optSelected||(se.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)}}),se.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){se.propFix[this.toLowerCase()]=this});var ft=/[\t\r\n\f]/g;se.fn.extend({addClass:function(e){var t,n,r,i,s,o,a,u=0;if(se.isFunction(e))return this.each(function(t){se(this).addClass(e.call(this,t,M(this)))});if("string"==typeof e&&e)for(t=e.match(be)||[];n=this[u++];)if(i=M(n),r=1===n.nodeType&&(" "+i+" ").replace(ft," ")){for(o=0;s=t[o++];)r.indexOf(" "+s+" ")<0&&(r+=s+" ");a=se.trim(r),i!==a&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,r,i,s,o,a,u=0;if(se.isFunction(e))return this.each(function(t){se(this).removeClass(e.call(this,t,M(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(be)||[];n=this[u++];)if(i=M(n),r=1===n.nodeType&&(" "+i+" ").replace(ft," ")){for(o=0;s=t[o++];)for(;r.indexOf(" "+s+" ")>-1;)r=r.replace(" "+s+" "," ");a=se.trim(r),i!==a&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):se.isFunction(e)?this.each(function(n){se(this).toggleClass(e.call(this,n,M(this),t),t)}):this.each(function(){var t,r,i,s;if("string"===n)for(r=0,i=se(this),s=e.match(be)||[];t=s[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else e!==undefined&&"boolean"!==n||(t=M(this),t&&Ee.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Ee.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+M(n)+" ").replace(ft," ").indexOf(t)>-1)return!0;return!1}});var dt=/\r/g,pt=/[\x20\t\r\n\f]+/g;se.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=se.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,se(this).val()):e,null==i?i="":"number"==typeof i?i+="":se.isArray(i)&&(i=se.map(i,function(e){return null==e?"":e+""})),(t=se.valHooks[this.type]||se.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&t.set(this,i,"value")!==undefined||(this.value=i))});if(i)return(t=se.valHooks[i.type]||se.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&(n=t.get(i,"value"))!==undefined?n:(n=i.value,"string"==typeof n?n.replace(dt,""):null==n?"":n)}}}),se.extend({valHooks:{option:{get:function(e){var t=se.find.attr(e,"value");return null!=t?t:se.trim(se.text(e)).replace(pt," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,s="select-one"===e.type||i<0,o=s?null:[],a=s?i+1:r.length,u=i<0?a:s?i:0;u<a;u++)if(n=r[u],(n.selected||u===i)&&(re.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!se.nodeName(n.parentNode,"optgroup"))){if(t=se(n).val(),s)return t;o.push(t)}return o},set:function(e,t){for(var n,r,i=e.options,s=se.makeArray(t),o=i.length;o--;)r=i[o],(r.selected=se.inArray(se.valHooks.option.get(r),s)>-1)&&(n=!0);return n||(e.selectedIndex=-1),s}}}}),se.each(["radio","checkbox"],function(){se.valHooks[this]={set:function(e,t){if(se.isArray(t))return e.checked=se.inArray(se(e).val(),t)>-1}},re.checkOn||(se.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var ht=/^(?:focusinfocus|focusoutblur)$/;se.extend(se.event,{trigger:function(t,n,r,i){var s,o,a,u,l,c,f,d=[r||J],p=ne.call(t,"type")?t.type:t,h=ne.call(t,"namespace")?t.namespace.split("."):[];if(o=a=r=r||J,3!==r.nodeType&&8!==r.nodeType&&!ht.test(p+se.event.triggered)&&(p.indexOf(".")>-1&&(h=p.split("."),p=h.shift(),h.sort()),l=p.indexOf(":")<0&&"on"+p,t=t[se.expando]?t:new se.Event(p,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=undefined,t.target||(t.target=r),n=null==n?[t]:se.makeArray(n,[t]),f=se.event.special[p]||{},i||!f.trigger||!1!==f.trigger.apply(r,n))){if(!i&&!f.noBubble&&!se.isWindow(r)){for(u=f.delegateType||p,ht.test(u+p)||(o=o.parentNode);o;o=o.parentNode)d.push(o),a=o;a===(r.ownerDocument||J)&&d.push(a.defaultView||a.parentWindow||e)}for(s=0;(o=d[s++])&&!t.isPropagationStopped();)t.type=s>1?u:f.bindType||p,c=(Ee.get(o,"events")||{})[t.type]&&Ee.get(o,"handle"),c&&c.apply(o,n),(c=l&&o[l])&&c.apply&&Se(o)&&(t.result=c.apply(o,n),!1===t.result&&t.preventDefault());return t.type=p,i||t.isDefaultPrevented()||f._default&&!1!==f._default.apply(d.pop(),n)||!Se(r)||l&&se.isFunction(r[p])&&!se.isWindow(r)&&(a=r[l],a&&(r[l]=null),se.event.triggered=p,r[p](),se.event.triggered=undefined,a&&(r[l]=a)),t.result}},simulate:function(e,t,n){var r=se.extend(new se.Event,n,{type:e,isSimulated:!0});se.event.trigger(r,null,t)}}),se.fn.extend({trigger:function(e,t){return this.each(function(){se.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return se.event.trigger(e,t,n,!0)}}),se.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){se.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),se.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),re.focusin="onfocusin"in e,re.focusin||se.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){se.event.simulate(t,e.target,se.event.fix(e))};se.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=Ee.access(r,t);i||r.addEventListener(e,n,!0),Ee.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Ee.access(r,t)-1;i?Ee.access(r,t,i):(r.removeEventListener(e,n,!0),Ee.remove(r,t))}}});var mt=e.location,gt=se.now(),yt=/\?/;se.parseJSON=function(e){return JSON.parse(e+"")},se.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=undefined}return n&&!n.getElementsByTagName("parsererror").length||se.error("Invalid XML: "+t),n};var vt=/#.*$/,xt=/([?&])_=[^&]*/,bt=/^(.*?):[ \t]*([^\r\n]*)$/gm,wt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Tt=/^(?:GET|HEAD)$/,St=/^\/\//,Et={},_t={},kt="*/".concat("*"),Ct=J.createElement("a");Ct.href=mt.href,se.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:mt.href,type:"GET",isLocal:wt.test(mt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":kt,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":se.parseJSON,"text xml":se.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?z(z(e,se.ajaxSettings),t):z(se.ajaxSettings,e)},ajaxPrefilter:H(Et),ajaxTransport:H(_t),ajax:function(t,n){function r(t,n,r,a){var l,f,v,x,w,S=n;2!==b&&(b=2,u&&e.clearTimeout(u),i=undefined,o=a||"",T.readyState=t>0?4:0,l=t>=200&&t<300||304===t,r&&(x=B(d,T,r)),x=U(d,x,T,l),l?(d.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(se.lastModified[s]=w),(w=T.getResponseHeader("etag"))&&(se.etag[s]=w)),204===t||"HEAD"===d.type?S="nocontent":304===t?S="notmodified":(S=x.state,f=x.data,v=x.error,l=!v)):(v=S,!t&&S||(S="error",t<0&&(t=0))),T.status=t,T.statusText=(n||S)+"",l?m.resolveWith(p,[f,S,T]):m.rejectWith(p,[T,S,v]),T.statusCode(y),y=undefined,c&&h.trigger(l?"ajaxSuccess":"ajaxError",[T,d,l?f:v]),g.fireWith(p,[T,S]),c&&(h.trigger("ajaxComplete",[T,d]),--se.active||se.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=undefined),n=n||{};var i,s,o,a,u,l,c,f,d=se.ajaxSetup({},n),p=d.context||d,h=d.context&&(p.nodeType||p.jquery)?se(p):se.event,m=se.Deferred(),g=se.Callbacks("once memory"),y=d.statusCode||{},v={},x={},b=0,w="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!a)for(a={};t=bt.exec(o);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?o:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=x[n]=x[n]||e,v[e]=t),this},overrideMimeType:function(e){return b||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)y[t]=[y[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||w;return i&&i.abort(t),r(0,t),this}};if(m.promise(T).complete=g.add,T.success=T.done,T.error=T.fail,d.url=((t||d.url||mt.href)+"").replace(vt,"").replace(St,mt.protocol+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=se.trim(d.dataType||"*").toLowerCase().match(be)||[""],null==d.crossDomain){l=J.createElement("a");try{l.href=d.url,l.href=l.href,d.crossDomain=Ct.protocol+"//"+Ct.host!=l.protocol+"//"+l.host}catch(e){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=se.param(d.data,d.traditional)),$(Et,d,n,T),2===b)return T;c=se.event&&d.global,c&&0==se.active++&&se.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Tt.test(d.type),s=d.url,d.hasContent||(d.data&&(s=d.url+=(yt.test(s)?"&":"?")+d.data,delete d.data),!1===d.cache&&(d.url=xt.test(s)?s.replace(xt,"$1_="+gt++):s+(yt.test(s)?"&":"?")+"_="+gt++)),d.ifModified&&(se.lastModified[s]&&T.setRequestHeader("If-Modified-Since",se.lastModified[s]),se.etag[s]&&T.setRequestHeader("If-None-Match",se.etag[s])),(d.data&&d.hasContent&&!1!==d.contentType||n.contentType)&&T.setRequestHeader("Content-Type",d.contentType),T.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+kt+"; q=0.01":""):d.accepts["*"]);for(f in d.headers)T.setRequestHeader(f,d.headers[f]);if(d.beforeSend&&(!1===d.beforeSend.call(p,T,d)||2===b))return T.abort();w="abort";for(f in{success:1,error:1,complete:1})T[f](d[f]);if(i=$(_t,d,n,T)){if(T.readyState=1,c&&h.trigger("ajaxSend",[T,d]),2===b)return T;d.async&&d.timeout>0&&(u=e.setTimeout(function(){T.abort("timeout")},d.timeout));try{b=1,i.send(v,r)}catch(e){if(!(b<2))throw e;r(-1,e)}}else r(-1,"No Transport");return T},getJSON:function(e,t,n){return se.get(e,t,n,"json")},getScript:function(e,t){return se.get(e,undefined,t,"script")}}),se.each(["get","post"],function(e,t){se[t]=function(e,n,r,i){return se.isFunction(n)&&(i=i||r,r=n,n=undefined),se.ajax(se.extend({url:e,type:t,dataType:i,data:n,success:r},se.isPlainObject(e)&&e))}}),se._evalUrl=function(e){return se.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},se.fn.extend({wrapAll:function(e){var t;return se.isFunction(e)?this.each(function(t){se(this).wrapAll(e.call(this,t))}):(this[0]&&(t=se(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 se.isFunction(e)?this.each(function(t){se(this).wrapInner(e.call(this,t))}):this.each(function(){var t=se(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=se.isFunction(e);return this.each(function(n){se(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){se.nodeName(this,"body")||se(this).replaceWith(this.childNodes)}).end()}}),se.expr.filters.hidden=function(e){return!se.expr.filters.visible(e)},se.expr.filters.visible=function(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0};var At=/%20/g,Pt=/\[\]$/,Qt=/\r?\n/g,Lt=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;se.param=function(e,t){var n,r=[],i=function(e,t){t=se.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(t===undefined&&(t=se.ajaxSettings&&se.ajaxSettings.traditional),se.isArray(e)||e.jquery&&!se.isPlainObject(e))se.each(e,function(){i(this.name,this.value)});else for(n in e)W(n,e[n],t,i);return r.join("&").replace(At,"+")},se.fn.extend({serialize:function(){return se.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=se.prop(this,"elements");return e?se.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!se(this).is(":disabled")&&Nt.test(this.nodeName)&&!Lt.test(e)&&(this.checked||!Ne.test(e))}).map(function(e,t){var n=se(this).val();return null==n?null:se.isArray(n)?se.map(n,function(e){return{name:t.name,value:e.replace(Qt,"\r\n")}}):{name:t.name,value:n.replace(Qt,"\r\n")}}).get()}}),se.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Dt={0:200,1223:204},jt=se.ajaxSettings.xhr();re.cors=!!jt&&"withCredentials"in jt,re.ajax=jt=!!jt,se.ajaxTransport(function(t){var n,r;if(re.cors||jt&&!t.crossDomain)return{send:function(i,s){var o,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(o in i)a.setRequestHeader(o,i[o]);n=function(e){return function(){n&&(n=r=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?s(0,"error"):s(a.status,a.statusText):s(Dt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=n(),r=a.onerror=n("error"),a.onabort!==undefined?a.onabort=r:a.onreadystatechange=function(){4===a.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{a.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),se.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 se.globalEval(e),e}}}),se.ajaxPrefilter("script",function(e){e.cache===undefined&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),se.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=se("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),
26
+ J.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Rt=[],It=/(=)\?(?=&|$)|\?\?/;se.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Rt.pop()||se.expando+"_"+gt++;return this[e]=!0,e}}),se.ajaxPrefilter("json jsonp",function(t,n,r){var i,s,o,a=!1!==t.jsonp&&(It.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&It.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=se.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(It,"$1"+i):!1!==t.jsonp&&(t.url+=(yt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return o||se.error(i+" was not called"),o[0]},t.dataTypes[0]="json",s=e[i],e[i]=function(){o=arguments},r.always(function(){s===undefined?se(e).removeProp(i):e[i]=s,t[i]&&(t.jsonpCallback=n.jsonpCallback,Rt.push(i)),o&&se.isFunction(s)&&s(o[0]),o=s=undefined}),"script"}),se.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||J;var r=he.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=d([e],t,i),i&&i.length&&se(i).remove(),se.merge([],r.childNodes))};var Ot=se.fn.load;se.fn.load=function(e,t,n){if("string"!=typeof e&&Ot)return Ot.apply(this,arguments);var r,i,s,o=this,a=e.indexOf(" ");return a>-1&&(r=se.trim(e.slice(a)),e=e.slice(0,a)),se.isFunction(t)?(n=t,t=undefined):t&&"object"==typeof t&&(i="POST"),o.length>0&&se.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){s=arguments,o.html(r?se("<div>").append(se.parseHTML(e)).find(r):e)}).always(n&&function(e,t){o.each(function(){n.apply(this,s||[e.responseText,t,e])})}),this},se.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){se.fn[t]=function(e){return this.on(t,e)}}),se.expr.filters.animated=function(e){return se.grep(se.timers,function(t){return e===t.elem}).length},se.offset={setOffset:function(e,t,n){var r,i,s,o,a,u,l,c=se.css(e,"position"),f=se(e),d={};"static"===c&&(e.style.position="relative"),a=f.offset(),s=se.css(e,"top"),u=se.css(e,"left"),l=("absolute"===c||"fixed"===c)&&(s+u).indexOf("auto")>-1,l?(r=f.position(),o=r.top,i=r.left):(o=parseFloat(s)||0,i=parseFloat(u)||0),se.isFunction(t)&&(t=t.call(e,n,se.extend({},a))),null!=t.top&&(d.top=t.top-a.top+o),null!=t.left&&(d.left=t.left-a.left+i),"using"in t?t.using.call(e,d):f.css(d)}},se.fn.extend({offset:function(e){if(arguments.length)return e===undefined?this:this.each(function(t){se.offset.setOffset(this,e,t)});var t,n,r=this[0],i={top:0,left:0},s=r&&r.ownerDocument;if(s)return t=s.documentElement,se.contains(t,r)?(i=r.getBoundingClientRect(),n=V(s),{top:i.top+n.pageYOffset-t.clientTop,left:i.left+n.pageXOffset-t.clientLeft}):i},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===se.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),se.nodeName(e[0],"html")||(r=e.offset()),r.top+=se.css(e[0],"borderTopWidth",!0),r.left+=se.css(e[0],"borderLeftWidth",!0)),{top:t.top-r.top-se.css(n,"marginTop",!0),left:t.left-r.left-se.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===se.css(e,"position");)e=e.offsetParent;return e||Ge})}}),se.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;se.fn[e]=function(r){return Te(this,function(e,r,i){var s=V(e);if(i===undefined)return s?s[t]:e[r];s?s.scrollTo(n?s.pageXOffset:i,n?i:s.pageYOffset):e[r]=i},e,r,arguments.length)}}),se.each(["top","left"],function(e,t){se.cssHooks[t]=C(re.pixelPosition,function(e,n){if(n)return n=k(e,t),Xe.test(n)?se(e).position()[t]+"px":n})}),se.each({Height:"height",Width:"width"},function(e,t){se.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){se.fn[r]=function(r,i){var s=arguments.length&&(n||"boolean"!=typeof r),o=n||(!0===r||!0===i?"margin":"border");return Te(this,function(t,n,r){var i;return se.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):r===undefined?se.css(t,n,o):se.style(t,n,r,o)},t,s?r:undefined,s,null)}})}),se.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)},size:function(){return this.length}}),se.fn.andSelf=se.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return se});var Ft=e.jQuery,qt=e.$;return se.noConflict=function(t){return e.$===se&&(e.$=qt),t&&e.jQuery===se&&(e.jQuery=Ft),se},t||(e.jQuery=e.$=se),se}),/*!
27
+ * mustache.js - Logic-less {{mustache}} templates with JavaScript
28
+ * http://github.com/janl/mustache.js
29
+ */
30
+ function(e,t){"object"==typeof exports&&exports&&"string"!=typeof exports.nodeName?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):(e.Mustache={},t(e.Mustache))}(this,function(e){function t(e){return"function"==typeof e}function n(e){return m(e)?"array":typeof e}function r(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function i(e,t){return null!=e&&"object"==typeof e&&t in e}function s(e,t){return g.call(e,t)}function o(e){return!s(y,e)}function a(e){return String(e).replace(/[&<>"'`=\/]/g,function(e){return v[e]})}function u(t,n){function i(){if(y&&!v)for(;g.length;)delete h[g.pop()];else g=[];y=!1,v=!1}function s(e){if("string"==typeof e&&(e=e.split(b,2)),!m(e)||2!==e.length)throw new Error("Invalid tags: "+e);a=new RegExp(r(e[0])+"\\s*"),u=new RegExp("\\s*"+r(e[1])),d=new RegExp("\\s*"+r("}"+e[1]))}if(!t)return[];var a,u,d,p=[],h=[],g=[],y=!1,v=!1;s(n||e.tags);for(var E,_,k,C,A,P,Q=new f(t);!Q.eos();){if(E=Q.pos,k=Q.scanUntil(a))for(var L=0,N=k.length;L<N;++L)C=k.charAt(L),o(C)?g.push(h.length):v=!0,h.push(["text",C,E,E+1]),E+=1,"\n"===C&&i();if(!Q.scan(a))break;if(y=!0,_=Q.scan(S)||"name",Q.scan(x),"="===_?(k=Q.scanUntil(w),Q.scan(w),Q.scanUntil(u)):"{"===_?(k=Q.scanUntil(d),Q.scan(T),Q.scanUntil(u),_="&"):k=Q.scanUntil(u),!Q.scan(u))throw new Error("Unclosed tag at "+Q.pos);if(A=[_,k,E,Q.pos],h.push(A),"#"===_||"^"===_)p.push(A);else if("/"===_){if(!(P=p.pop()))throw new Error('Unopened section "'+k+'" at '+E);if(P[1]!==k)throw new Error('Unclosed section "'+P[1]+'" at '+E)}else"name"===_||"{"===_||"&"===_?v=!0:"="===_&&s(k)}if(P=p.pop())throw new Error('Unclosed section "'+P[1]+'" at '+Q.pos);return c(l(h))}function l(e){for(var t,n,r=[],i=0,s=e.length;i<s;++i)(t=e[i])&&("text"===t[0]&&n&&"text"===n[0]?(n[1]+=t[1],n[3]=t[3]):(r.push(t),n=t));return r}function c(e){for(var t,n,r=[],i=r,s=[],o=0,a=e.length;o<a;++o)switch(t=e[o],t[0]){case"#":case"^":i.push(t),s.push(t),i=t[4]=[];break;case"/":n=s.pop(),n[5]=t[2],i=s.length>0?s[s.length-1][4]:r;break;default:i.push(t)}return r}function f(e){this.string=e,this.tail=e,this.pos=0}function d(e,t){this.view=e,this.cache={".":this.view},this.parent=t}function p(){this.cache={}}var h=Object.prototype.toString,m=Array.isArray||function(e){return"[object Array]"===h.call(e)},g=RegExp.prototype.test,y=/\S/,v={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"},x=/\s*/,b=/\s+/,w=/\s*=/,T=/\s*\}/,S=/#|\^|\/|>|\{|&|=|!/;f.prototype.eos=function(){return""===this.tail},f.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n},f.prototype.scanUntil=function(e){var t,n=this.tail.search(e);switch(n){case-1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=t.length,t},d.prototype.push=function(e){return new d(e,this)},d.prototype.lookup=function(e){var n,r=this.cache;if(r.hasOwnProperty(e))n=r[e];else{for(var s,o,a=this,u=!1;a;){if(e.indexOf(".")>0)for(n=a.view,s=e.split("."),o=0;null!=n&&o<s.length;)o===s.length-1&&(u=i(n,s[o])),n=n[s[o++]];else n=a.view[e],u=i(a.view,e);if(u)break;a=a.parent}r[e]=n}return t(n)&&(n=n.call(this.view)),n},p.prototype.clearCache=function(){this.cache={}},p.prototype.parse=function(e,t){var n=this.cache,r=n[e];return null==r&&(r=n[e]=u(e,t)),r},p.prototype.render=function(e,t,n){var r=this.parse(e),i=t instanceof d?t:new d(t);return this.renderTokens(r,i,n,e)},p.prototype.renderTokens=function(e,t,n,r){for(var i,s,o,a="",u=0,l=e.length;u<l;++u)o=undefined,i=e[u],s=i[0],"#"===s?o=this.renderSection(i,t,n,r):"^"===s?o=this.renderInverted(i,t,n,r):">"===s?o=this.renderPartial(i,t,n,r):"&"===s?o=this.unescapedValue(i,t):"name"===s?o=this.escapedValue(i,t):"text"===s&&(o=this.rawValue(i)),o!==undefined&&(a+=o);return a},p.prototype.renderSection=function(e,n,r,i){function s(e){return o.render(e,n,r)}var o=this,a="",u=n.lookup(e[1]);if(u){if(m(u))for(var l=0,c=u.length;l<c;++l)a+=this.renderTokens(e[4],n.push(u[l]),r,i);else if("object"==typeof u||"string"==typeof u||"number"==typeof u)a+=this.renderTokens(e[4],n.push(u),r,i);else if(t(u)){if("string"!=typeof i)throw new Error("Cannot use higher-order sections without the original template");u=u.call(n.view,i.slice(e[3],e[5]),s),null!=u&&(a+=u)}else a+=this.renderTokens(e[4],n,r,i);return a}},p.prototype.renderInverted=function(e,t,n,r){var i=t.lookup(e[1]);if(!i||m(i)&&0===i.length)return this.renderTokens(e[4],t,n,r)},p.prototype.renderPartial=function(e,n,r){if(r){var i=t(r)?r(e[1]):r[e[1]];return null!=i?this.renderTokens(this.parse(i),n,r,i):void 0}},p.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(null!=n)return n},p.prototype.escapedValue=function(t,n){var r=n.lookup(t[1]);if(null!=r)return e.escape(r)},p.prototype.rawValue=function(e){return e[1]},e.name="mustache.js",e.version="2.3.2",e.tags=["{{","}}"];var E=new p;return e.clearCache=function(){return E.clearCache()},e.parse=function(e,t){return E.parse(e,t)},e.render=function(e,t,r){if("string"!=typeof e)throw new TypeError('Invalid template! Template should be a "string" but "'+n(e)+'" was given as the first argument for mustache#render(template, view, partials)');return E.render(e,t,r)},e.to_html=function(n,r,i,s){var o=e.render(n,r,i);if(!t(s))return o;s(o)},e.escape=a,e.Scanner=f,e.Context=d,e.Writer=p,e});var dateFormat=function(){var e=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,t=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,n=/[^-+\dA-Z]/g,r=function(e,t){for(e=String(e),t=t||2;e.length<t;)e="0"+e;return e};return function(i,s,o){var a=dateFormat;if(1!=arguments.length||"[object String]"!=Object.prototype.toString.call(i)||/\d/.test(i)||(s=i,i=undefined),i=i?new Date(i):new Date,isNaN(i))throw SyntaxError("invalid date");s=String(a.masks[s]||s||a.masks["default"]),"UTC:"==s.slice(0,4)&&(s=s.slice(4),o=!0);var u=o?"getUTC":"get",l=i[u+"Date"](),c=i[u+"Day"](),f=i[u+"Month"](),d=i[u+"FullYear"](),p=i[u+"Hours"](),h=i[u+"Minutes"](),m=i[u+"Seconds"](),g=i[u+"Milliseconds"](),y=o?0:i.getTimezoneOffset(),v={d:l,dd:r(l),ddd:a.i18n.dayNames[c],dddd:a.i18n.dayNames[c+7],m:f+1,mm:r(f+1),mmm:a.i18n.monthNames[f],mmmm:a.i18n.monthNames[f+12],yy:String(d).slice(2),yyyy:d,h:p%12||12,hh:r(p%12||12),H:p,HH:r(p),M:h,MM:r(h),s:m,ss:r(m),l:r(g,3),L:r(g>99?Math.round(g/10):g),t:p<12?"a":"p",tt:p<12?"am":"pm",T:p<12?"A":"P",TT:p<12?"AM":"PM",Z:o?"UTC":(String(i).match(t)||[""]).pop().replace(n,""),o:(y>0?"-":"+")+r(100*Math.floor(Math.abs(y)/60)+Math.abs(y)%60,4),S:["th","st","nd","rd"][l%10>3?0:(l%100-l%10!=10)*l%10]};return s.replace(e,function(e){return e in v?v[e]:e.slice(1,e.length-1)})}}();dateFormat.masks={"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"},dateFormat.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]},Date.prototype.format=function(e,t){return dateFormat(this,e,t)},/*!
31
+ * URI.js - Mutating URLs
32
+ *
33
+ * Version: 1.18.12
34
+ *
35
+ * Author: Rodney Rehm
36
+ * Web: http://medialize.github.io/URI.js/
37
+ *
38
+ * Licensed under
39
+ * MIT License http://www.opensource.org/licenses/mit-license
40
+ *
41
+ */
42
+ function(e,t){"use strict";"object"==typeof module&&module.exports?module.exports=t(require("./punycode"),require("./IPv6"),require("./SecondLevelDomains")):"function"==typeof define&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],t):e.URI=t(e.punycode,e.IPv6,e.SecondLevelDomains,e)}(this,function(e,t,n,r){"use strict";function i(e,t){var n=arguments.length>=1,r=arguments.length>=2;if(!(this instanceof i))return n?r?new i(e,t):new i(e):new i;if(e===undefined){if(n)throw new TypeError("undefined is not a valid argument for URI");e="undefined"!=typeof location?location.href+"":""}if(null===e&&n)throw new TypeError("null is not a valid argument for URI");return this.href(e),t!==undefined?this.absoluteTo(t):this}function s(e){return/^[0-9]+$/.test(e)}function o(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function a(e){return e===undefined?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function u(e){return"Array"===a(e)}function l(e,t){var n,r,i={};if("RegExp"===a(t))i=null;else if(u(t))for(n=0,r=t.length;n<r;n++)i[t[n]]=!0;else i[t]=!0;for(n=0,r=e.length;n<r;n++){(i&&i[e[n]]!==undefined||!i&&t.test(e[n]))&&(e.splice(n,1),r--,n--)}return e}function c(e,t){var n,r;if(u(t)){for(n=0,r=t.length;n<r;n++)if(!c(e,t[n]))return!1;return!0}var i=a(t);for(n=0,r=e.length;n<r;n++)if("RegExp"===i){if("string"==typeof e[n]&&e[n].match(t))return!0}else if(e[n]===t)return!0;return!1}function f(e,t){if(!u(e)||!u(t))return!1;if(e.length!==t.length)return!1;e.sort(),t.sort();for(var n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}function d(e){var t=/^\/+|\/+$/g;return e.replace(t,"")}function p(e){return escape(e)}function h(e){return encodeURIComponent(e).replace(/[!'()*]/g,p).replace(/\*/g,"%2A")}function m(e){return function(t,n){return t===undefined?this._parts[e]||"":(this._parts[e]=t||null,this.build(!n),this)}}function g(e,t){return function(n,r){return n===undefined?this._parts[e]||"":(null!==n&&(n+="",n.charAt(0)===t&&(n=n.substring(1))),this._parts[e]=n,this.build(!r),this)}}var y=r&&r.URI;i.version="1.18.12";var v=i.prototype,x=Object.prototype.hasOwnProperty;i._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,duplicateQueryParameters:i.duplicateQueryParameters,escapeQuerySpace:i.escapeQuerySpace}},i.duplicateQueryParameters=!1,i.escapeQuerySpace=!0,i.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,i.idn_expression=/[^a-z0-9\._-]/i,i.punycode_expression=/(xn--)/i,i.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,i.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,i.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\xab\xbb\u201c\u201d\u2018\u2019]))/gi,i.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?\xab\xbb\u201c\u201d\u201e\u2018\u2019]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},i.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},i.hostProtocols=["http","https"],i.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,i.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},i.getDomAttribute=function(e){if(!e||!e.nodeName)return undefined;var t=e.nodeName.toLowerCase();return"input"===t&&"image"!==e.type?undefined:i.domAttributes[t]},i.encode=h,i.decode=decodeURIComponent,i.iso8859=function(){i.encode=escape,i.decode=unescape},i.unicode=function(){i.encode=h,i.decode=decodeURIComponent},i.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},i.encodeQuery=function(e,t){var n=i.encode(e+"");return t===undefined&&(t=i.escapeQuerySpace),t?n.replace(/%20/g,"+"):n},i.decodeQuery=function(e,t){e+="",t===undefined&&(t=i.escapeQuerySpace);try{return i.decode(t?e.replace(/\+/g,"%20"):e)}catch(t){return e}};var b,w={encode:"encode",decode:"decode"},T=function(e,t){return function(n){try{return i[t](n+"").replace(i.characters[e][t].expression,function(n){return i.characters[e][t].map[n]})}catch(e){return n}}};for(b in w)i[b+"PathSegment"]=T("pathname",w[b]),i[b+"UrnPathSegment"]=T("urnpath",w[b]);var S=function(e,t,n){return function(r){var s;s=n?function(e){return i[t](i[n](e))}:i[t];for(var o=(r+"").split(e),a=0,u=o.length;a<u;a++)o[a]=s(o[a]);return o.join(e)}};i.decodePath=S("/","decodePathSegment"),i.decodeUrnPath=S(":","decodeUrnPathSegment"),i.recodePath=S("/","encodePathSegment","decode"),i.recodeUrnPath=S(":","encodeUrnPathSegment","decode"),i.encodeReserved=T("reserved","encode"),i.parse=function(e,t){var n;return t||(t={}),n=e.indexOf("#"),n>-1&&(t.fragment=e.substring(n+1)||null,e=e.substring(0,n)),n=e.indexOf("?"),n>-1&&(t.query=e.substring(n+1)||null,e=e.substring(0,n)),"//"===e.substring(0,2)?(t.protocol=null,e=e.substring(2),e=i.parseAuthority(e,t)):(n=e.indexOf(":"))>-1&&(t.protocol=e.substring(0,n)||null,t.protocol&&!t.protocol.match(i.protocol_expression)?t.protocol=undefined:"//"===e.substring(n+1,n+3)?(e=e.substring(n+3),e=i.parseAuthority(e,t)):(e=e.substring(n+1),t.urn=!0)),t.path=e,t},i.parseHost=function(e,t){e=e.replace(/\\/g,"/");var n,r,s=e.indexOf("/");if(-1===s&&(s=e.length),"["===e.charAt(0))n=e.indexOf("]"),t.hostname=e.substring(1,n)||null,t.port=e.substring(n+2,s)||null,"/"===t.port&&(t.port=null);else{var o=e.indexOf(":"),a=e.indexOf("/"),u=e.indexOf(":",o+1);-1!==u&&(-1===a||u<a)?(t.hostname=e.substring(0,s)||null,t.port=null):(r=e.substring(0,s).split(":"),t.hostname=r[0]||null,t.port=r[1]||null)}return t.hostname&&"/"!==e.substring(s).charAt(0)&&(s++,e="/"+e),i.ensureValidHostname(t.hostname,t.protocol),t.port&&i.ensureValidPort(t.port),e.substring(s)||"/"},i.parseAuthority=function(e,t){return e=i.parseUserinfo(e,t),i.parseHost(e,t)},i.parseUserinfo=function(e,t){var n,r=e.indexOf("/"),s=e.lastIndexOf("@",r>-1?r:e.length-1);return s>-1&&(-1===r||s<r)?(n=e.substring(0,s).split(":"),t.username=n[0]?i.decode(n[0]):null,n.shift(),t.password=n[0]?i.decode(n.join(":")):null,e=e.substring(s+1)):(t.username=null,t.password=null),e},i.parseQuery=function(e,t){if(!e)return{};if(!(e=e.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"")))return{};for(var n,r,s,o={},a=e.split("&"),u=a.length,l=0;l<u;l++)n=a[l].split("="),r=i.decodeQuery(n.shift(),t),s=n.length?i.decodeQuery(n.join("="),t):null,x.call(o,r)?("string"!=typeof o[r]&&null!==o[r]||(o[r]=[o[r]]),o[r].push(s)):o[r]=s;return o},i.build=function(e){var t="";return e.protocol&&(t+=e.protocol+":"),e.urn||!t&&!e.hostname||(t+="//"),t+=i.buildAuthority(e)||"","string"==typeof e.path&&("/"!==e.path.charAt(0)&&"string"==typeof e.hostname&&(t+="/"),t+=e.path),"string"==typeof e.query&&e.query&&(t+="?"+e.query),"string"==typeof e.fragment&&e.fragment&&(t+="#"+e.fragment),t},i.buildHost=function(e){var t="";return e.hostname?(i.ip6_expression.test(e.hostname)?t+="["+e.hostname+"]":t+=e.hostname,e.port&&(t+=":"+e.port),t):""},i.buildAuthority=function(e){return i.buildUserinfo(e)+i.buildHost(e)},i.buildUserinfo=function(e){var t="";return e.username&&(t+=i.encode(e.username)),e.password&&(t+=":"+i.encode(e.password)),t&&(t+="@"),t},i.buildQuery=function(e,t,n){var r,s,o,a,l="";for(s in e)if(x.call(e,s)&&s)if(u(e[s]))for(r={},o=0,a=e[s].length;o<a;o++)e[s][o]!==undefined&&r[e[s][o]+""]===undefined&&(l+="&"+i.buildQueryParameter(s,e[s][o],n),!0!==t&&(r[e[s][o]+""]=!0));else e[s]!==undefined&&(l+="&"+i.buildQueryParameter(s,e[s],n));return l.substring(1)},i.buildQueryParameter=function(e,t,n){return i.encodeQuery(e,n)+(null!==t?"="+i.encodeQuery(t,n):"")},i.addQuery=function(e,t,n){if("object"==typeof t)for(var r in t)x.call(t,r)&&i.addQuery(e,r,t[r]);else{if("string"!=typeof t)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");if(e[t]===undefined)return void(e[t]=n);"string"==typeof e[t]&&(e[t]=[e[t]]),u(n)||(n=[n]),e[t]=(e[t]||[]).concat(n)}},i.removeQuery=function(e,t,n){var r,s,o;if(u(t))for(r=0,s=t.length;r<s;r++)e[t[r]]=undefined;else if("RegExp"===a(t))for(o in e)t.test(o)&&(e[o]=undefined);else if("object"==typeof t)for(o in t)x.call(t,o)&&i.removeQuery(e,o,t[o]);else{if("string"!=typeof t)throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");n!==undefined?"RegExp"===a(n)?!u(e[t])&&n.test(e[t])?e[t]=undefined:e[t]=l(e[t],n):e[t]!==String(n)||u(n)&&1!==n.length?u(e[t])&&(e[t]=l(e[t],n)):e[t]=undefined:e[t]=undefined}},i.hasQuery=function(e,t,n,r){switch(a(t)){case"String":break;case"RegExp":for(var s in e)if(x.call(e,s)&&t.test(s)&&(n===undefined||i.hasQuery(e,s,n)))return!0;return!1;case"Object":for(var o in t)if(x.call(t,o)&&!i.hasQuery(e,o,t[o]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(a(n)){case"Undefined":return t in e;case"Boolean":return n===Boolean(u(e[t])?e[t].length:e[t]);case"Function":return!!n(e[t],t,e);case"Array":if(!u(e[t]))return!1;return(r?c:f)(e[t],n);case"RegExp":return u(e[t])?!!r&&c(e[t],n):Boolean(e[t]&&e[t].match(n));case"Number":n=String(n);case"String":return u(e[t])?!!r&&c(e[t],n):e[t]===n;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},i.joinPaths=function(){for(var e=[],t=[],n=0,r=0;r<arguments.length;r++){var s=new i(arguments[r]);e.push(s);for(var o=s.segment(),a=0;a<o.length;a++)"string"==typeof o[a]&&t.push(o[a]),o[a]&&n++}if(!t.length||!n)return new i("");var u=new i("").segment(t);return""!==e[0].path()&&"/"!==e[0].path().slice(0,1)||u.path("/"+u.path()),u.normalize()},i.commonPath=function(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n++)if(e.charAt(n)!==t.charAt(n)){n--;break}return n<1?e.charAt(0)===t.charAt(0)&&"/"===e.charAt(0)?"/":"":("/"===e.charAt(n)&&"/"===t.charAt(n)||(n=e.substring(0,n).lastIndexOf("/")),e.substring(0,n+1))},i.withinString=function(e,t,n){n||(n={});var r=n.start||i.findUri.start,s=n.end||i.findUri.end,o=n.trim||i.findUri.trim,a=n.parens||i.findUri.parens,u=/[a-z0-9-]=["']?$/i;for(r.lastIndex=0;;){var l=r.exec(e);if(!l)break;var c=l.index;if(n.ignoreHtml){var f=e.slice(Math.max(c-3,0),c);if(f&&u.test(f))continue}for(var d=c+e.slice(c).search(s),p=e.slice(c,d),h=-1;;){var m=a.exec(p);if(!m)break;var g=m.index+m[0].length;h=Math.max(h,g)}if(p=h>-1?p.slice(0,h)+p.slice(h).replace(o,""):p.replace(o,""),!(p.length<=l[0].length||n.ignore&&n.ignore.test(p))){d=c+p.length;var y=t(p,c,d,e);y!==undefined?(y=String(y),e=e.slice(0,c)+y+e.slice(d),r.lastIndex=c+y.length):r.lastIndex=d}}return r.lastIndex=0,e},i.ensureValidHostname=function(t,n){var r=!!t,s=!!n,o=!1;if(s&&(o=c(i.hostProtocols,n)),o&&!r)throw new TypeError("Hostname cannot be empty, if protocol is "+n);if(t&&t.match(i.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(t).match(i.invalid_hostname_characters))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_]')}},i.ensureValidPort=function(e){if(e){var t=Number(e);if(!(s(t)&&t>0&&t<65536))throw new TypeError('Port "'+e+'" is not a valid port')}},i.noConflict=function(e){if(e){var t={URI:this.noConflict()};return r.URITemplate&&"function"==typeof r.URITemplate.noConflict&&(t.URITemplate=r.URITemplate.noConflict()),r.IPv6&&"function"==typeof r.IPv6.noConflict&&(t.IPv6=r.IPv6.noConflict()),r.SecondLevelDomains&&"function"==typeof r.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=r.SecondLevelDomains.noConflict()),t}return r.URI===this&&(r.URI=y),this},v.build=function(e){return!0===e?this._deferred_build=!0:(e===undefined||this._deferred_build)&&(this._string=i.build(this._parts),this._deferred_build=!1),this},v.clone=function(){return new i(this)},v.valueOf=v.toString=function(){return this.build(!1)._string},v.protocol=m("protocol"),v.username=m("username"),v.password=m("password"),v.hostname=m("hostname"),v.port=m("port"),v.query=g("query","?"),v.fragment=g("fragment","#"),v.search=function(e,t){var n=this.query(e,t);return"string"==typeof n&&n.length?"?"+n:n},v.hash=function(e,t){var n=this.fragment(e,t);return"string"==typeof n&&n.length?"#"+n:n},v.pathname=function(e,t){if(e===undefined||!0===e){var n=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?i.decodeUrnPath:i.decodePath)(n):n}return this._parts.urn?this._parts.path=e?i.recodeUrnPath(e):"":this._parts.path=e?i.recodePath(e):"/",this.build(!t),this},v.path=v.pathname,v.href=function(e,t){var n;if(e===undefined)return this.toString();this._string="",this._parts=i._parts();var r=e instanceof i,s="object"==typeof e&&(e.hostname||e.path||e.pathname);if(e.nodeName){e=e[i.getDomAttribute(e)]||"",s=!1}if(!r&&s&&e.pathname!==undefined&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=i.parse(String(e),this._parts);else{if(!r&&!s)throw new TypeError("invalid input");var o=r?e._parts:e;for(n in o)x.call(this._parts,n)&&(this._parts[n]=o[n])}return this.build(!t),this},v.is=function(e){var t=!1,r=!1,s=!1,o=!1,a=!1,u=!1,l=!1,c=!this._parts.urn;switch(this._parts.hostname&&(c=!1,r=i.ip4_expression.test(this._parts.hostname),s=i.ip6_expression.test(this._parts.hostname),t=r||s,o=!t,a=o&&n&&n.has(this._parts.hostname),u=o&&i.idn_expression.test(this._parts.hostname),l=o&&i.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return c;case"absolute":return!c;case"domain":case"name":return o;case"sld":return a;case"ip":return t;case"ip4":case"ipv4":case"inet4":return r;case"ip6":case"ipv6":case"inet6":return s;case"idn":return u;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return l}return null};var E=v.protocol,_=v.port,k=v.hostname;v.protocol=function(e,t){if(e!==undefined&&e&&(e=e.replace(/:(\/\/)?$/,""),!e.match(i.protocol_expression)))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return E.call(this,e,t)},v.scheme=v.protocol,v.port=function(e,t){return this._parts.urn?e===undefined?"":this:(e!==undefined&&(0===e&&(e=null),e&&(e+="",":"===e.charAt(0)&&(e=e.substring(1)),i.ensureValidPort(e))),_.call(this,e,t))},v.hostname=function(e,t){if(this._parts.urn)return e===undefined?"":this;if(e!==undefined){var n={};if("/"!==i.parseHost(e,n))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=n.hostname,i.ensureValidHostname(e,this._parts.protocol)}return k.call(this,e,t)},v.origin=function(e,t){if(this._parts.urn)return e===undefined?"":this;if(e===undefined){var n=this.protocol();return this.authority()?(n?n+"://":"")+this.authority():""}var r=i(e);return this.protocol(r.protocol()).authority(r.authority()).build(!t),this},v.host=function(e,t){if(this._parts.urn)return e===undefined?"":this;if(e===undefined)return this._parts.hostname?i.buildHost(this._parts):"";if("/"!==i.parseHost(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},v.authority=function(e,t){if(this._parts.urn)return e===undefined?"":this;if(e===undefined)return this._parts.hostname?i.buildAuthority(this._parts):"";if("/"!==i.parseAuthority(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},v.userinfo=function(e,t){if(this._parts.urn)return e===undefined?"":this;if(e===undefined){var n=i.buildUserinfo(this._parts);return n?n.substring(0,n.length-1):n}return"@"!==e[e.length-1]&&(e+="@"),i.parseUserinfo(e,this._parts),this.build(!t),this},v.resource=function(e,t){var n;return e===undefined?this.path()+this.search()+this.hash():(n=i.parse(e),this._parts.path=n.path,this._parts.query=n.query,this._parts.fragment=n.fragment,this.build(!t),this)},v.subdomain=function(e,t){if(this._parts.urn)return e===undefined?"":this;if(e===undefined){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,n)||""}var r=this._parts.hostname.length-this.domain().length,s=this._parts.hostname.substring(0,r),a=new RegExp("^"+o(s));if(e&&"."!==e.charAt(e.length-1)&&(e+="."),-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");return e&&i.ensureValidHostname(e,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(a,e),this.build(!t),this},v.domain=function(e,t){if(this._parts.urn)return e===undefined?"":this;if("boolean"==typeof e&&(t=e,e=undefined),e===undefined){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.match(/\./g);if(n&&n.length<2)return this._parts.hostname;var r=this._parts.hostname.length-this.tld(t).length-1;return r=this._parts.hostname.lastIndexOf(".",r-1)+1,this._parts.hostname.substring(r)||""}if(!e)throw new TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(i.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var s=new RegExp(o(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(s,e)}return this.build(!t),this},v.tld=function(e,t){if(this._parts.urn)return e===undefined?"":this;if("boolean"==typeof e&&(t=e,e=undefined),e===undefined){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.lastIndexOf("."),i=this._parts.hostname.substring(r+1);return!0!==t&&n&&n.list[i.toLowerCase()]?n.get(this._parts.hostname)||i:i}var s;if(!e)throw new TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!n||!n.is(e))throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');s=new RegExp(o(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(s,e)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");s=new RegExp(o(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(s,e)}return this.build(!t),this},v.directory=function(e,t){if(this._parts.urn)return e===undefined?"":this;if(e===undefined||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var n=this._parts.path.length-this.filename().length-1,r=this._parts.path.substring(0,n)||(this._parts.hostname?"/":"");return e?i.decodePath(r):r}var s=this._parts.path.length-this.filename().length,a=this._parts.path.substring(0,s),u=new RegExp("^"+o(a));return this.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=i.recodePath(e),this._parts.path=this._parts.path.replace(u,e),this.build(!t),this},v.filename=function(e,t){if(this._parts.urn)return e===undefined?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var n=this._parts.path.lastIndexOf("/"),r=this._parts.path.substring(n+1);return e?i.decodePathSegment(r):r}var s=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(s=!0);var a=new RegExp(o(this.filename())+"$");return e=i.recodePath(e),this._parts.path=this._parts.path.replace(a,e),s?this.normalizePath(t):this.build(!t),this},v.suffix=function(e,t){if(this._parts.urn)return e===undefined?"":this;if(e===undefined||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var n,r,s=this.filename(),a=s.lastIndexOf(".");return-1===a?"":(n=s.substring(a+1),r=/^[a-z0-9%]+$/i.test(n)?n:"",e?i.decodePathSegment(r):r)}"."===e.charAt(0)&&(e=e.substring(1));var u,l=this.suffix();if(l)u=e?new RegExp(o(l)+"$"):new RegExp(o("."+l)+"$");else{if(!e)return this;this._parts.path+="."+i.recodePath(e)}return u&&(e=i.recodePath(e),this._parts.path=this._parts.path.replace(u,e)),this.build(!t),this},v.segment=function(e,t,n){var r=this._parts.urn?":":"/",i=this.path(),s="/"===i.substring(0,1),o=i.split(r);if(e!==undefined&&"number"!=typeof e&&(n=t,t=e,e=undefined),e!==undefined&&"number"!=typeof e)throw new Error('Bad segment "'+e+'", must be 0-based integer');if(s&&o.shift(),e<0&&(e=Math.max(o.length+e,0)),t===undefined)return e===undefined?o:o[e];if(null===e||o[e]===undefined)if(u(t)){o=[];for(var a=0,l=t.length;a<l;a++)(t[a].length||o.length&&o[o.length-1].length)&&(o.length&&!o[o.length-1].length&&o.pop(),o.push(d(t[a])))}else(t||"string"==typeof t)&&(t=d(t),""===o[o.length-1]?o[o.length-1]=t:o.push(t));else t?o[e]=d(t):o.splice(e,1);return s&&o.unshift(""),this.path(o.join(r),n)},v.segmentCoded=function(e,t,n){var r,s,o;if("number"!=typeof e&&(n=t,t=e,e=undefined),t===undefined){if(r=this.segment(e,t,n),u(r))for(s=0,o=r.length;s<o;s++)r[s]=i.decode(r[s]);else r=r!==undefined?i.decode(r):undefined;return r}if(u(t))for(s=0,o=t.length;s<o;s++)t[s]=i.encode(t[s]);else t="string"==typeof t||t instanceof String?i.encode(t):t;return this.segment(e,t,n)};var C=v.query;return v.query=function(e,t){if(!0===e)return i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof e){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace),r=e.call(this,n);return this._parts.query=i.buildQuery(r||n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this}return e!==undefined&&"string"!=typeof e?(this._parts.query=i.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this):C.call(this,e,t)},v.setQuery=function(e,t,n){var r=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof e||e instanceof String)r[e]=t!==undefined?t:null;else{if("object"!=typeof e)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var s in e)x.call(e,s)&&(r[s]=e[s])}return this._parts.query=i.buildQuery(r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(n=t),this.build(!n),this},v.addQuery=function(e,t,n){var r=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.addQuery(r,e,t===undefined?null:t),this._parts.query=i.buildQuery(r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(n=t),this.build(!n),this},v.removeQuery=function(e,t,n){var r=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.removeQuery(r,e,t),this._parts.query=i.buildQuery(r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(n=t),this.build(!n),this},v.hasQuery=function(e,t,n){var r=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.hasQuery(r,e,t,n)},v.setSearch=v.setQuery,v.addSearch=v.addQuery,v.removeSearch=v.removeQuery,v.hasSearch=v.hasQuery,v.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},v.normalizeProtocol=function(e){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!e)),this},v.normalizeHostname=function(n){return this._parts.hostname&&(this.is("IDN")&&e?this._parts.hostname=e.toASCII(this._parts.hostname):this.is("IPv6")&&t&&(this._parts.hostname=t.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!n)),this},v.normalizePort=function(e){return"string"==typeof this._parts.protocol&&this._parts.port===i.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!e)),this},v.normalizePath=function(e){var t=this._parts.path;if(!t)return this;if(this._parts.urn)return this._parts.path=i.recodeUrnPath(this._parts.path),this.build(!e),this;if("/"===this._parts.path)return this;t=i.recodePath(t);var n,r,s,o="";for("/"!==t.charAt(0)&&(n=!0,t="/"+t),"/.."!==t.slice(-3)&&"/."!==t.slice(-2)||(t+="/"),t=t.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),n&&(o=t.substring(1).match(/^(\.\.\/)+/)||"")&&(o=o[0]);;){if(-1===(r=t.search(/\/\.\.(\/|$)/)))break;0!==r?(s=t.substring(0,r).lastIndexOf("/"),-1===s&&(s=r),t=t.substring(0,s)+t.substring(r+3)):t=t.substring(3)}return n&&this.is("relative")&&(t=o+t.substring(1)),this._parts.path=t,this.build(!e),this},v.normalizePathname=v.normalizePath,v.normalizeQuery=function(e){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(i.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!e)),this},v.normalizeFragment=function(e){return this._parts.fragment||(this._parts.fragment=null,this.build(!e)),this},v.normalizeSearch=v.normalizeQuery,v.normalizeHash=v.normalizeFragment,v.iso8859=function(){var e=i.encode,t=i.decode;i.encode=escape,i.decode=decodeURIComponent;try{this.normalize()}finally{i.encode=e,i.decode=t}return this},v.unicode=function(){var e=i.encode,t=i.decode;i.encode=h,i.decode=unescape;try{this.normalize()}finally{i.encode=e,i.decode=t}return this},v.readable=function(){var t=this.clone();t.username("").password("").normalize();var n="";if(t._parts.protocol&&(n+=t._parts.protocol+"://"),t._parts.hostname&&(t.is("punycode")&&e?(n+=e.toUnicode(t._parts.hostname),t._parts.port&&(n+=":"+t._parts.port)):n+=t.host()),t._parts.hostname&&t._parts.path&&"/"!==t._parts.path.charAt(0)&&(n+="/"),n+=t.path(!0),t._parts.query){for(var r="",s=0,o=t._parts.query.split("&"),a=o.length;s<a;s++){var u=(o[s]||"").split("=");r+="&"+i.decodeQuery(u[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),u[1]!==undefined&&(r+="="+i.decodeQuery(u[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}n+="?"+r.substring(1)}return n+=i.decodeQuery(t.hash(),!0)},v.absoluteTo=function(e){var t,n,r,s=this.clone(),o=["protocol","username","password","hostname","port"];if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e instanceof i||(e=new i(e)),s._parts.protocol)return s;if(s._parts.protocol=e._parts.protocol,this._parts.hostname)return s;for(n=0;r=o[n];n++)s._parts[r]=e._parts[r];return s._parts.path?(".."===s._parts.path.substring(-2)&&(s._parts.path+="/"),"/"!==s.path().charAt(0)&&(t=e.directory(),t=t||(0===e.path().indexOf("/")?"/":""),s._parts.path=(t?t+"/":"")+s._parts.path,s.normalizePath())):(s._parts.path=e._parts.path,s._parts.query||(s._parts.query=e._parts.query)),s.build(),s},v.relativeTo=function(e){var t,n,r,s,o,a=this.clone().normalize();if(a._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e=new i(e).normalize(),t=a._parts,n=e._parts,s=a.path(),o=e.path(),"/"!==s.charAt(0))throw new Error("URI is already relative");if("/"!==o.charAt(0))throw new Error("Cannot calculate a URI relative to another relative URI");if(t.protocol===n.protocol&&(t.protocol=null),t.username!==n.username||t.password!==n.password)return a.build();if(null!==t.protocol||null!==t.username||null!==t.password)return a.build();if(t.hostname!==n.hostname||t.port!==n.port)return a.build();if(t.hostname=null,t.port=null,s===o)return t.path="",a.build();if(!(r=i.commonPath(s,o)))return a.build();var u=n.path.substring(r.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return t.path=u+t.path.substring(r.length)||"./",a.build()},v.equals=function(e){var t,n,r,s=this.clone(),o=new i(e),a={},l={},c={};if(s.normalize(),o.normalize(),s.toString()===o.toString())return!0;if(t=s.query(),n=o.query(),s.query(""),o.query(""),s.toString()!==o.toString())return!1;if(t.length!==n.length)return!1;a=i.parseQuery(t,this._parts.escapeQuerySpace),l=i.parseQuery(n,this._parts.escapeQuerySpace);for(r in a)if(x.call(a,r)){if(u(a[r])){if(!f(a[r],l[r]))return!1}else if(a[r]!==l[r])return!1;c[r]=!0}for(r in l)if(x.call(l,r)&&!c[r])return!1;return!0},v.duplicateQueryParameters=function(e){return this._parts.duplicateQueryParameters=!!e,this},v.escapeQuerySpace=function(e){return this._parts.escapeQuerySpace=!!e,this},i}),function(){var e=function(t){var n=new e.Builder;return n.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),n.searchPipeline.add(e.stemmer),t.call(n,n),n.build()};e.version="2.3.5-multilingual-0.0.3",e.utils={},e.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),e.utils.asString=function(e){return void 0===e||null===e?"":e.toString()},e.utils.clone=function(e){if(null===e||void 0===e)return e;for(var t=Object.create(null),n=Object.keys(e),r=0;r<n.length;r++){var i=n[r],s=e[i];if(Array.isArray(s))t[i]=s.slice();else{if("string"!=typeof s&&"number"!=typeof s&&"boolean"!=typeof s)throw new TypeError("clone is not deep and does not support nested objects");t[i]=s}}return t},e.FieldRef=function(e,t,n){this.docRef=e,this.fieldName=t,this._stringValue=n},e.FieldRef.joiner="/",e.FieldRef.fromString=function(t){var n=t.indexOf(e.FieldRef.joiner);if(-1===n)throw"malformed field ref string";var r=t.slice(0,n),i=t.slice(n+1);return new e.FieldRef(i,r,t)},e.FieldRef.prototype.toString=function(){return void 0==this._stringValue&&(this._stringValue=this.fieldName+e.FieldRef.joiner+this.docRef),this._stringValue},e.Set=function(e){if(this.elements=Object.create(null),e){this.length=e.length;for(var t=0;t<this.length;t++)this.elements[e[t]]=!0}else this.length=0},e.Set.complete={intersect:function(e){return e},union:function(e){return e},contains:function(){return!0}},e.Set.empty={intersect:function(){return this},union:function(e){return e},contains:function(){return!1}},e.Set.prototype.contains=function(e){return!!this.elements[e]},e.Set.prototype.intersect=function(t){var n,r,i,s=[];if(t===e.Set.complete)return this;if(t===e.Set.empty)return t;this.length<t.length?(n=this,r=t):(n=t,r=this),i=Object.keys(n.elements);for(var o=0;o<i.length;o++){var a=i[o];a in r.elements&&s.push(a)}return new e.Set(s)},e.Set.prototype.union=function(t){return t===e.Set.complete?e.Set.complete:t===e.Set.empty?this:new e.Set(Object.keys(this.elements).concat(Object.keys(t.elements)))},e.idf=function(e,t){var n=0;for(var r in e)"_index"!=r&&(n+=Object.keys(e[r]).length);var i=(t-n+.5)/(n+.5);return Math.log(1+Math.abs(i))},e.Token=function(e,t){this.str=e||"",this.metadata=t||{}},e.Token.prototype.toString=function(){return this.str},e.Token.prototype.update=function(e){return this.str=e(this.str,this.metadata),this},e.Token.prototype.clone=function(t){return t=t||function(e){return e},new e.Token(t(this.str,this.metadata),this.metadata)},e.tokenizer=function(t,n){if(null==t||void 0==t)return[];if(Array.isArray(t))return t.map(function(t){return new e.Token(e.utils.asString(t).toLowerCase(),e.utils.clone(n))});for(var r=t.toString().trim().toLowerCase(),i=r.length,s=[],o=0,a=0;o<=i;o++){var u=r.charAt(o),l=o-a;if(u.match(e.tokenizer.separator)||o==i){if(l>0){var c=e.utils.clone(n)||{};c.position=[a,l],c.index=s.length,s.push(new e.Token(r.slice(a,o),c))}a=o+1}}return s
43
+ },e.tokenizer.separator=/[\s\-]+/,e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,n){n in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+n),t.label=n,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){t.label&&t.label in this.registeredFunctions||e.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},e.Pipeline.load=function(t){var n=new e.Pipeline;return t.forEach(function(t){var r=e.Pipeline.registeredFunctions[t];if(!r)throw new Error("Cannot load unregistered function: "+t);n.add(r)}),n},e.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach(function(t){e.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},e.Pipeline.prototype.after=function(t,n){e.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(t);if(-1==r)throw new Error("Cannot find existingFn");r+=1,this._stack.splice(r,0,n)},e.Pipeline.prototype.before=function(t,n){e.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(t);if(-1==r)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},e.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},e.Pipeline.prototype.run=function(e){for(var t=this._stack.length,n=0;n<t;n++){for(var r=this._stack[n],i=[],s=0;s<e.length;s++){var o=r(e[s],s,e);if(void 0!==o&&""!==o)if(Array.isArray(o))for(var a=0;a<o.length;a++)i.push(o[a]);else i.push(o)}e=i}return e},e.Pipeline.prototype.runString=function(t,n){var r=new e.Token(t,n);return this.run([r]).map(function(e){return e.toString()})},e.Pipeline.prototype.reset=function(){this._stack=[]},e.Pipeline.prototype.toJSON=function(){return this._stack.map(function(t){return e.Pipeline.warnIfFunctionNotRegistered(t),t.label})},e.Vector=function(e){this._magnitude=0,this.elements=e||[]},e.Vector.prototype.positionForIndex=function(e){if(0==this.elements.length)return 0;for(var t=0,n=this.elements.length/2,r=n-t,i=Math.floor(r/2),s=this.elements[2*i];r>1&&(s<e&&(t=i),s>e&&(n=i),s!=e);)r=n-t,i=t+Math.floor(r/2),s=this.elements[2*i];return s==e?2*i:s>e?2*i:s<e?2*(i+1):void 0},e.Vector.prototype.insert=function(e,t){this.upsert(e,t,function(){throw"duplicate index"})},e.Vector.prototype.upsert=function(e,t,n){this._magnitude=0;var r=this.positionForIndex(e);this.elements[r]==e?this.elements[r+1]=n(this.elements[r+1],t):this.elements.splice(r,0,e,t)},e.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var e=0,t=this.elements.length,n=1;n<t;n+=2){var r=this.elements[n];e+=r*r}return this._magnitude=Math.sqrt(e)},e.Vector.prototype.dot=function(e){for(var t=0,n=this.elements,r=e.elements,i=n.length,s=r.length,o=0,a=0,u=0,l=0;u<i&&l<s;)o=n[u],a=r[l],o<a?u+=2:o>a?l+=2:o==a&&(t+=n[u+1]*r[l+1],u+=2,l+=2);return t},e.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},e.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,n=0;t<this.elements.length;t+=2,n++)e[n]=this.elements[t];return e},e.Vector.prototype.toJSON=function(){return this.elements},e.stemmer=function(){function e(e){return e}function t(e){var t,i,s,o,a,u,l;if(e.length<3)return e;if(s=e.substr(0,1),"y"==s&&(e=s.toUpperCase()+e.substr(1)),o=g,a=y,o.test(e)?e=e.replace(o,"$1$2"):a.test(e)&&(e=e.replace(a,"$1$2")),o=v,a=x,o.test(e)){var c=o.exec(e);o=d,o.test(c[1])&&(o=b,e=e.replace(o,""))}else if(a.test(e)){var c=a.exec(e);t=c[1],a=m,a.test(t)&&(e=t,a=w,u=T,l=S,a.test(e)?e+="e":u.test(e)?(o=b,e=e.replace(o,"")):l.test(e)&&(e+="e"))}if(o=E,o.test(e)){var c=o.exec(e);t=c[1],e=t+"i"}if(o=_,o.test(e)){var c=o.exec(e);t=c[1],i=c[2],o=d,o.test(t)&&(e=t+n[i])}if(o=k,o.test(e)){var c=o.exec(e);t=c[1],i=c[2],o=d,o.test(t)&&(e=t+r[i])}if(o=C,a=A,o.test(e)){var c=o.exec(e);t=c[1],o=p,o.test(t)&&(e=t)}else if(a.test(e)){var c=a.exec(e);t=c[1]+c[2],a=p,a.test(t)&&(e=t)}if(o=P,o.test(e)){var c=o.exec(e);t=c[1],o=p,a=h,u=L,(o.test(t)||a.test(t)&&!u.test(t))&&(e=t)}return o=Q,a=p,o.test(e)&&a.test(e)&&(o=b,e=e.replace(o,"")),"y"==s&&(e=s.toLowerCase()+e.substr(1)),e}var n={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},r={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},i="[^aeiou]",s="[aeiouy]",o=i+"[^aeiouy]*",a=s+"[aeiou]*",u="^("+o+")?"+a+o,l="^("+o+")?"+a+o+"("+a+")?$",c="^("+o+")?"+a+o+a+o,f="^("+o+")?"+s,d=new RegExp(u),p=new RegExp(c),h=new RegExp(l),m=new RegExp(f),g=/^(.+?)(ss|i)es$/,y=/^(.+?)([^s])s$/,v=/^(.+?)eed$/,x=/^(.+?)(ed|ing)$/,b=/.$/,w=/(at|bl|iz)$/,T=new RegExp("([^aeiouylsz])\\1$"),S=new RegExp("^"+o+s+"[^aeiouwxy]$"),E=/^(.+?[^aeiou])y$/,_=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,k=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,C=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,A=/^(.+?)(s|t)(ion)$/,P=/^(.+?)e$/,Q=/ll$/,L=new RegExp("^"+o+s+"[^aeiouwxy]$"),N=function(n){return n=t(n),n=e(n)};return function(e){return e.update(N)}}(),e.Pipeline.registerFunction(e.stemmer,"stemmer"),e.generateStopWordFilter=function(e){var t=e.reduce(function(e,t){return e[t]=t,e},{});return function(e){if(e&&t[e.toString()]!==e.toString())return e}},e.stopWordFilter=e.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),e.Pipeline.registerFunction(e.stopWordFilter,"stopWordFilter"),e.trimmer=function(e){return e.update(function(e){return e.replace(new RegExp("^[^\\w\u0430-\u044f\u0410-\u042f\u0451\u0401]+"),"").replace(new RegExp("[^\\w\u0430-\u044f\u0410-\u042f\u0451\u0401]+$"),"")})},e.Pipeline.registerFunction(e.trimmer,"trimmer"),e.TokenSet=function(){this["final"]=!1,this.edges={},this.id=e.TokenSet._nextId,e.TokenSet._nextId+=1},e.TokenSet._nextId=1,e.TokenSet.fromArray=function(t){for(var n=new e.TokenSet.Builder,r=0,i=t.length;r<i;r++)n.insert(t[r]);return n.finish(),n.root},e.TokenSet.fromClause=function(t){return"editDistance"in t?e.TokenSet.fromFuzzyString(t.term,t.editDistance):e.TokenSet.fromString(t.term)},e.TokenSet.fromFuzzyString=function(t,n){for(var r=new e.TokenSet,i=[{node:r,editsRemaining:n,str:t}];i.length;){var s=i.pop();if(s.str.length>0){var o,a=s.str.charAt(0);a in s.node.edges?o=s.node.edges[a]:(o=new e.TokenSet,s.node.edges[a]=o),1==s.str.length&&(o["final"]=!0),i.push({node:o,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining>0&&s.str.length>1){var u,a=s.str.charAt(1);a in s.node.edges?u=s.node.edges[a]:(u=new e.TokenSet,s.node.edges[a]=u),s.str.length<=2?u["final"]=!0:i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(2)})}if(s.editsRemaining>0&&1==s.str.length&&(s.node["final"]=!0),s.editsRemaining>0&&s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new e.TokenSet;s.node.edges["*"]=l}1==s.str.length?l["final"]=!0:i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.editsRemaining>0){if("*"in s.node.edges)var c=s.node.edges["*"];else{var c=new e.TokenSet;s.node.edges["*"]=c}0==s.str.length?c["final"]=!0:i.push({node:c,editsRemaining:s.editsRemaining-1,str:s.str})}if(s.editsRemaining>0&&s.str.length>1){var f,d=s.str.charAt(0),p=s.str.charAt(1);p in s.node.edges?f=s.node.edges[p]:(f=new e.TokenSet,s.node.edges[p]=f),1==s.str.length?f["final"]=!0:i.push({node:f,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}return r},e.TokenSet.fromString=function(t){for(var n=new e.TokenSet,r=n,i=0,s=t.length;i<s;i++){var o=t[i],a=i==s-1;if("*"==o)n.edges[o]=n,n["final"]=a;else{var u=new e.TokenSet;u["final"]=a,n.edges[o]=u,n=u}}return r},e.TokenSet.prototype.toArray=function(){for(var e=[],t=[{prefix:"",node:this}];t.length;){var n=t.pop(),r=Object.keys(n.node.edges),i=r.length;n.node["final"]&&(n.prefix.charAt(0),e.push(n.prefix));for(var s=0;s<i;s++){var o=r[s];t.push({prefix:n.prefix.concat(o),node:n.node.edges[o]})}}return e},e.TokenSet.prototype.toString=function(){if(this._str)return this._str;for(var e=this["final"]?"1":"0",t=Object.keys(this.edges).sort(),n=t.length,r=0;r<n;r++){var i=t[r];e=e+i+this.edges[i].id}return e},e.TokenSet.prototype.intersect=function(t){for(var n=new e.TokenSet,r=void 0,i=[{qNode:t,output:n,node:this}];i.length;){r=i.pop();for(var s=Object.keys(r.qNode.edges),o=s.length,a=Object.keys(r.node.edges),u=a.length,l=0;l<o;l++)for(var c=s[l],f=0;f<u;f++){var d=a[f];if(d==c||"*"==c){var p=r.node.edges[d],h=r.qNode.edges[c],m=p["final"]&&h["final"],g=void 0;d in r.output.edges?(g=r.output.edges[d],g["final"]=g["final"]||m):(g=new e.TokenSet,g["final"]=m,r.output.edges[d]=g),i.push({qNode:h,output:g,node:p})}}}return n},e.TokenSet.Builder=function(){this.previousWord="",this.root=new e.TokenSet,this.uncheckedNodes=[],this.minimizedNodes={}},e.TokenSet.Builder.prototype.insert=function(t){var n,r=0;if(t<this.previousWord)throw new Error("Out of order word insertion");for(var i=0;i<t.length&&i<this.previousWord.length&&t[i]==this.previousWord[i];i++)r++;this.minimize(r),n=0==this.uncheckedNodes.length?this.root:this.uncheckedNodes[this.uncheckedNodes.length-1].child;for(var i=r;i<t.length;i++){var s=new e.TokenSet,o=t[i];n.edges[o]=s,this.uncheckedNodes.push({parent:n,"char":o,child:s}),n=s}n["final"]=!0,this.previousWord=t},e.TokenSet.Builder.prototype.finish=function(){this.minimize(0)},e.TokenSet.Builder.prototype.minimize=function(e){for(var t=this.uncheckedNodes.length-1;t>=e;t--){var n=this.uncheckedNodes[t],r=n.child.toString();r in this.minimizedNodes?n.parent.edges[n["char"]]=this.minimizedNodes[r]:(n.child._str=r,this.minimizedNodes[r]=n.child),this.uncheckedNodes.pop()}},e.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},e.Index.prototype.search=function(t){return this.query(function(n){new e.QueryParser(t,n).parse()})},e.Index.prototype.query=function(t){for(var n=new e.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),u=0;u<this.fields.length;u++)i[this.fields[u]]=new e.Vector;t.call(n,n);for(var u=0;u<n.clauses.length;u++){var l=n.clauses[u],c=null,f=e.Set.complete;c=l.usePipeline?this.pipeline.runString(l.term,{fields:l.fields}):[l.term];for(var d=0;d<c.length;d++){var p=c[d];l.term=p;var h=e.TokenSet.fromClause(l),m=this.tokenSet.intersect(h).toArray();if(0===m.length&&l.presence===e.Query.presence.REQUIRED){for(var g=0;g<l.fields.length;g++){var y=l.fields[g];o[y]=e.Set.empty}break}for(var v=0;v<m.length;v++)for(var x=m[v],b=this.invertedIndex[x],w=b._index,g=0;g<l.fields.length;g++){var y=l.fields[g],T=b[y],S=Object.keys(T),E=x+"/"+y,_=new e.Set(S);if(l.presence==e.Query.presence.REQUIRED&&(f=f.union(_),void 0===o[y]&&(o[y]=e.Set.complete)),l.presence!=e.Query.presence.PROHIBITED){if(i[y].upsert(w,l.boost,function(e,t){return e+t}),!s[E]){for(var k=0;k<S.length;k++){var C,A=S[k],P=new e.FieldRef(A,y),Q=T[A];void 0===(C=r[P])?r[P]=new e.MatchData(x,y,Q):C.add(x,y,Q)}s[E]=!0}}else void 0===a[y]&&(a[y]=e.Set.empty),a[y]=a[y].union(_)}}if(l.presence===e.Query.presence.REQUIRED)for(var g=0;g<l.fields.length;g++){var y=l.fields[g];o[y]=o[y].intersect(f)}}for(var L=e.Set.complete,N=e.Set.empty,u=0;u<this.fields.length;u++){var y=this.fields[u];o[y]&&(L=L.intersect(o[y])),a[y]&&(N=N.union(a[y]))}var D=Object.keys(r),j=[],R=Object.create(null);if(n.isNegated()){D=Object.keys(this.fieldVectors);for(var u=0;u<D.length;u++){var P=D[u],I=e.FieldRef.fromString(P);r[P]=new e.MatchData}}for(var u=0;u<D.length;u++){var I=e.FieldRef.fromString(D[u]),O=I.docRef;if(L.contains(O)&&!N.contains(O)){var F,q=this.fieldVectors[I],M=i[I.fieldName].similarity(q);if(void 0!==(F=R[O]))F.score+=M,F.matchData.combine(r[I]);else{var H={ref:O,score:M,matchData:r[I]};R[O]=H,j.push(H)}}}return j.sort(function(e,t){return t.score-e.score})},e.Index.prototype.toJSON=function(){var t=Object.keys(this.invertedIndex).sort().map(function(e){return[e,this.invertedIndex[e]]},this),n=Object.keys(this.fieldVectors).map(function(e){return[e,this.fieldVectors[e].toJSON()]},this);return{version:e.version,fields:this.fields,fieldVectors:n,invertedIndex:t,pipeline:this.pipeline.toJSON()}},e.Index.load=function(t){var n={},r={},i=t.fieldVectors,s=Object.create(null),o=t.invertedIndex,a=new e.TokenSet.Builder,u=e.Pipeline.load(t.pipeline);t.version!=e.version&&e.utils.warn("Version mismatch when loading serialised index. Current version of lunr '"+e.version+"' does not match serialized index '"+t.version+"'");for(var l=0;l<i.length;l++){var c=i[l],f=c[0],d=c[1];r[f]=new e.Vector(d)}for(var l=0;l<o.length;l++){var c=o[l],p=c[0],h=c[1];a.insert(p),s[p]=h}return a.finish(),n.fields=t.fields,n.fieldVectors=r,n.invertedIndex=s,n.tokenSet=a.root,n.pipeline=u,new e.Index(n)},e.Builder=function(){this._ref="id",this._fields=Object.create(null),this._documents=Object.create(null),this.invertedIndex=Object.create(null),this.fieldTermFrequencies={},this.fieldLengths={},this.tokenizer=e.tokenizer,this.pipeline=new e.Pipeline,this.searchPipeline=new e.Pipeline,this.documentCount=0,this._b=.75,this._k1=1.2,this.termIndex=0,this.metadataWhitelist=[]},e.Builder.prototype.ref=function(e){this._ref=e},e.Builder.prototype.field=function(e,t){if(/\//.test(e))throw new RangeError("Field '"+e+"' contains illegal character '/'");this._fields[e]=t||{}},e.Builder.prototype.b=function(e){this._b=e<0?0:e>1?1:e},e.Builder.prototype.k1=function(e){this._k1=e},e.Builder.prototype.add=function(t,n){var r=t[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s<i.length;s++){var o=i[s],a=this._fields[o].extractor,u=a?a(t):t[o],l=this.tokenizer(u,{fields:[o]}),c=this.pipeline.run(l),f=new e.FieldRef(r,o),d=Object.create(null);this.fieldTermFrequencies[f]=d,this.fieldLengths[f]=0,this.fieldLengths[f]+=c.length;for(var p=0;p<c.length;p++){var h=c[p];if(void 0==d[h]&&(d[h]=0),d[h]+=1,void 0==this.invertedIndex[h]){var m=Object.create(null);m._index=this.termIndex,this.termIndex+=1;for(var g=0;g<i.length;g++)m[i[g]]=Object.create(null);this.invertedIndex[h]=m}void 0==this.invertedIndex[h][o][r]&&(this.invertedIndex[h][o][r]=Object.create(null));for(var y=0;y<this.metadataWhitelist.length;y++){var v=this.metadataWhitelist[y],x=h.metadata[v];void 0==this.invertedIndex[h][o][r][v]&&(this.invertedIndex[h][o][r][v]=[]),this.invertedIndex[h][o][r][v].push(x)}}}},e.Builder.prototype.calculateAverageFieldLengths=function(){for(var t=Object.keys(this.fieldLengths),n=t.length,r={},i={},s=0;s<n;s++){var o=e.FieldRef.fromString(t[s]),a=o.fieldName;i[a]||(i[a]=0),i[a]+=1,r[a]||(r[a]=0),r[a]+=this.fieldLengths[o]}for(var u=Object.keys(this._fields),s=0;s<u.length;s++){var l=u[s];r[l]=r[l]/i[l]}this.averageFieldLength=r},e.Builder.prototype.createFieldVectors=function(){for(var t={},n=Object.keys(this.fieldTermFrequencies),r=n.length,i=Object.create(null),s=0;s<r;s++){for(var o=e.FieldRef.fromString(n[s]),a=o.fieldName,u=this.fieldLengths[o],l=new e.Vector,c=this.fieldTermFrequencies[o],f=Object.keys(c),d=f.length,p=this._fields[a].boost||1,h=this._documents[o.docRef].boost||1,m=0;m<d;m++){var g,y,v,x=f[m],b=c[x],w=this.invertedIndex[x]._index;void 0===i[x]?(g=e.idf(this.invertedIndex[x],this.documentCount),i[x]=g):g=i[x],y=g*((this._k1+1)*b)/(this._k1*(1-this._b+this._b*(u/this.averageFieldLength[a]))+b),y*=p,y*=h,v=Math.round(1e3*y)/1e3,l.insert(w,v)}t[o]=l}this.fieldVectors=t},e.Builder.prototype.createTokenSet=function(){this.tokenSet=e.TokenSet.fromArray(Object.keys(this.invertedIndex).sort())},e.Builder.prototype.build=function(){return this.calculateAverageFieldLengths(),this.createFieldVectors(),this.createTokenSet(),new e.Index({invertedIndex:this.invertedIndex,fieldVectors:this.fieldVectors,tokenSet:this.tokenSet,fields:Object.keys(this._fields),pipeline:this.searchPipeline})},e.Builder.prototype.use=function(e){var t=Array.prototype.slice.call(arguments,1);t.unshift(this),e.apply(this,t)},e.MatchData=function(e,t,n){for(var r=Object.create(null),i=Object.keys(n||{}),s=0;s<i.length;s++){var o=i[s];r[o]=n[o].slice()}this.metadata=Object.create(null),void 0!==e&&(this.metadata[e]=Object.create(null),this.metadata[e][t]=r)},e.MatchData.prototype.combine=function(e){for(var t=Object.keys(e.metadata),n=0;n<t.length;n++){var r=t[n],i=Object.keys(e.metadata[r]);void 0==this.metadata[r]&&(this.metadata[r]=Object.create(null));for(var s=0;s<i.length;s++){var o=i[s],a=Object.keys(e.metadata[r][o]);void 0==this.metadata[r][o]&&(this.metadata[r][o]=Object.create(null));for(var u=0;u<a.length;u++){var l=a[u];void 0==this.metadata[r][o][l]?this.metadata[r][o][l]=e.metadata[r][o][l]:this.metadata[r][o][l]=this.metadata[r][o][l].concat(e.metadata[r][o][l])}}}},e.MatchData.prototype.add=function(e,t,n){if(!(e in this.metadata))return this.metadata[e]=Object.create(null),void(this.metadata[e][t]=n);if(!(t in this.metadata[e]))return void(this.metadata[e][t]=n);for(var r=Object.keys(n),i=0;i<r.length;i++){var s=r[i];s in this.metadata[e][t]?this.metadata[e][t][s]=this.metadata[e][t][s].concat(n[s]):this.metadata[e][t][s]=n[s]}},e.Query=function(e){this.clauses=[],this.allFields=e},e.Query.wildcard=new String("*"),e.Query.wildcard.NONE=0,e.Query.wildcard.LEADING=1,e.Query.wildcard.TRAILING=2,e.Query.presence={OPTIONAL:1,REQUIRED:2,PROHIBITED:3},e.Query.prototype.clause=function(t){return"fields"in t||(t.fields=this.allFields),"boost"in t||(t.boost=1),"usePipeline"in t||(t.usePipeline=!0),"wildcard"in t||(t.wildcard=e.Query.wildcard.NONE),t.wildcard&e.Query.wildcard.LEADING&&t.term.charAt(0)!=e.Query.wildcard&&(t.term="*"+t.term),t.wildcard&e.Query.wildcard.TRAILING&&t.term.slice(-1)!=e.Query.wildcard&&(t.term=t.term+"*"),"presence"in t||(t.presence=e.Query.presence.OPTIONAL),this.clauses.push(t),this},e.Query.prototype.isNegated=function(){for(var t=0;t<this.clauses.length;t++)if(this.clauses[t].presence!=e.Query.presence.PROHIBITED)return!1;return!0},e.Query.prototype.term=function(t,n){if(Array.isArray(t))return t.forEach(function(t){this.term(t,e.utils.clone(n))},this),this;var r=n||{};return r.term=t.toString(),this.clause(r),this},e.QueryParseError=function(e,t,n){this.name="QueryParseError",this.message=e,this.start=t,this.end=n},e.QueryParseError.prototype=new Error,e.QueryLexer=function(e){this.lexemes=[],this.str=e,this.length=e.length,this.pos=0,this.start=0,this.escapeCharPositions=[]},e.QueryLexer.prototype.run=function(){for(var t=e.QueryLexer.lexText;t;)t=t(this)},e.QueryLexer.prototype.sliceString=function(){for(var e=[],t=this.start,n=this.pos,r=0;r<this.escapeCharPositions.length;r++)n=this.escapeCharPositions[r],e.push(this.str.slice(t,n)),t=n+1;return e.push(this.str.slice(t,this.pos)),this.escapeCharPositions.length=0,e.join("")},e.QueryLexer.prototype.emit=function(e){this.lexemes.push({type:e,str:this.sliceString(),start:this.start,end:this.pos}),this.start=this.pos},e.QueryLexer.prototype.escapeCharacter=function(){this.escapeCharPositions.push(this.pos-1),this.pos+=1},e.QueryLexer.prototype.next=function(){if(this.pos>=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){var t,n;do{t=this.next(),n=t.charCodeAt(0)}while(n>47&&n<58);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos<this.length},e.QueryLexer.EOS="EOS",e.QueryLexer.FIELD="FIELD",e.QueryLexer.TERM="TERM",e.QueryLexer.EDIT_DISTANCE="EDIT_DISTANCE",e.QueryLexer.BOOST="BOOST",e.QueryLexer.PRESENCE="PRESENCE",e.QueryLexer.lexField=function(t){return t.backup(),t.emit(e.QueryLexer.FIELD),t.ignore(),e.QueryLexer.lexText},e.QueryLexer.lexTerm=function(t){if(t.width()>1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more())return e.QueryLexer.lexText},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.termSeparator=e.tokenizer.separator,e.QueryLexer.lexText=function(t){for(;;){var n=t.next();if(n==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(92!=n.charCodeAt(0)){if(":"==n)return e.QueryLexer.lexField;if("~"==n)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if("^"==n)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if("+"==n&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if("-"==n&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if(n.match(e.QueryLexer.termSeparator))return e.QueryLexer.lexTerm}else t.escapeCharacter()}},e.QueryParser=function(t,n){this.lexer=new e.QueryLexer(t),this.query=n,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseClause;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},e.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},e.QueryParser.parseClause=function(t){var n=t.peekLexeme();if(void 0!=n)switch(n.type){case e.QueryLexer.PRESENCE:return e.QueryParser.parsePresence;case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new e.QueryParseError(r,n.start,n.end)}},e.QueryParser.parsePresence=function(t){var n=t.consumeLexeme();if(void 0!=n){switch(n.str){case"-":t.currentClause.presence=e.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=e.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new e.QueryParseError(r,n.start,n.end)}var i=t.peekLexeme();if(void 0==i){var r="expecting term or field, found nothing";throw new e.QueryParseError(r,n.start,n.end)}switch(i.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new e.QueryParseError(r,i.start,i.end)}}},e.QueryParser.parseField=function(t){var n=t.consumeLexeme();if(void 0!=n){if(-1==t.query.allFields.indexOf(n.str)){var r=t.query.allFields.map(function(e){return"'"+e+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new e.QueryParseError(i,n.start,n.end)}t.currentClause.fields=[n.str];var s=t.peekLexeme();if(void 0==s){var i="expecting term, found nothing";throw new e.QueryParseError(i,n.start,n.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new e.QueryParseError(i,s.start,s.end)}}},e.QueryParser.parseTerm=function(t){var n=t.consumeLexeme();if(void 0!=n){t.currentClause.term=n.str.toLowerCase(),-1!=n.str.indexOf("*")&&(t.currentClause.usePipeline=!1);var r=t.peekLexeme();if(void 0==r)return void t.nextClause();switch(r.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new e.QueryParseError(i,r.start,r.end)}}},e.QueryParser.parseEditDistance=function(t){var n=t.consumeLexeme();if(void 0!=n){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new e.QueryParseError(i,n.start,n.end)}t.currentClause.editDistance=r;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(i,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var n=t.consumeLexeme();if(void 0!=n){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new e.QueryParseError(i,n.start,n.end)}t.currentClause.boost=r;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(i,s.start,s.end)}}},function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.lunr=t()}(this,function(){return e})}(),function(e){var t=function(e){var t,n=Array.prototype.slice;return function(){var r=n.call(arguments),i=this;clearTimeout(t),t=setTimeout(function(){e.apply(i,r)},100)}},n=function(e){var t=e.match(/(\d+)/g);return new Date(t[0],t[1]-1,t[2])},r=function(){function r(t,n){this.$elem=t,this.$results=e(n.results),this.indexDataUrl=n.indexUrl,this.template=this.compileTemplate(e(n.template)),this.titleMsg=n.titleMsg,this.emptyMsg=n.emptyMsg,this.onAfterResultShow=n.onAfterResultShow,this.initialize()}return r.prototype.initialize=function(){var t=this;this.loadIndexData(function(n){t.entries=e.map(n.docs,t.createEntry),t.index=lunr.Index.load(n.index),t.populateSearchFromQuery(),t.bindKeypress()})},r.prototype.compileTemplate=function(e){var t=e.text();return Mustache.parse(t),function(e,n){return Mustache.render(t,e,n)}},r.prototype.loadIndexData=function(t){e.getJSON(this.indexDataUrl,t)},r.prototype.createEntry=function(t,r){var i=e.extend({id:r+1},t);return t.date&&e.extend(i,{date:n(t.date),pubdate:function(){return dateFormat(n(t.date),"yyyy-mm-dd")},displaydate:function(){return dateFormat(n(t.date),"mmm dd, yyyy")}}),i},r.prototype.bindKeypress=function(){var e=this,n=this.$elem.val();this.$elem.bind("keyup",t(function(){var t=e.$elem.val();t!==n&&e.search(t),n=t}))},r.prototype.search=function(t){var n=this.entries;if(t.length<3)this.$results.hide().empty();else{var r=e.map(this.index.search(t),function(t){return e.grep(n,function(e){return e.id===parseInt(t.ref,10)})[0]});this.displayResults(r),this.onAfterResultShow()}},r.prototype.displayResults=function(e){var t=this.$results;t.empty(),0===e.length?t.append(this.emptyMsg):(this.titleMsg&&0!==this.titleMsg.length&&t.append(this.titleMsg),t.append(this.template({entries:e}))),t.show()},r.prototype.populateSearchFromQuery=function(){var e=new URI(window.location.search.toString()),t=e.search(!0);t.hasOwnProperty("q")&&(this.$elem.val(t.q),this.search(t.q.toString()))},r}();e.fn.lunrSearch=function(t){return t=e.extend({},e.fn.lunrSearch.defaults,t),new r(this,t),this},e.fn.lunrSearch.defaults={indexUrl:"/js/index.json",results:"#search-results",template:"#search-results-template",titleMsg:"<h1>Search results<h1>",emptyMsg:"<p>Nothing found.</p>",onAfterResultShow:function(){}}}(jQuery);
@@ -0,0 +1,5 @@
1
+ require 'jekyll_lunr_js_search/version'
2
+ require 'jekyll_lunr_js_search/indexer'
3
+ require 'jekyll_lunr_js_search/page_renderer'
4
+ require 'jekyll_lunr_js_search/search_entry'
5
+ require 'jekyll_lunr_js_search/search_index_file'
@@ -0,0 +1,162 @@
1
+ require 'fileutils'
2
+ require 'net/http'
3
+ require 'json'
4
+ require 'uri'
5
+ require 'execjs'
6
+
7
+ module Jekyll
8
+ module LunrJsSearch
9
+ class Indexer < Jekyll::Generator
10
+ def initialize(config = {})
11
+ super(config)
12
+
13
+ @lunr_config = {
14
+ 'excludes' => [],
15
+ 'strip_index_html' => false,
16
+ 'min_length' => 3,
17
+ 'stopwords' => 'stopwords.txt',
18
+ 'fields' => {
19
+ 'title' => 10,
20
+ 'categories' => 20,
21
+ 'tags' => 20,
22
+ 'body' => 1
23
+ },
24
+ 'js_dir' => 'js'
25
+ }.merge!(config['lunr_search'] || {})
26
+
27
+ @js_dir = @lunr_config['js_dir']
28
+ gem_lunr = File.join(File.dirname(__FILE__), "../../build/lunr.min.js")
29
+ @lunr_path = File.exist?(gem_lunr) ? gem_lunr : File.join(@js_dir, File.basename(gem_lunr))
30
+ raise "Could not find #{@lunr_path}" if !File.exist?(@lunr_path)
31
+
32
+ lunr_src = open(@lunr_path).read
33
+ ctx = ExecJS.compile(lunr_src)
34
+ @lunr_version = ctx.eval('lunr.version')
35
+ @docs = {}
36
+ @excludes = @lunr_config['excludes']
37
+
38
+ # if web host supports index.html as default doc, then optionally exclude it from the url
39
+ @strip_index_html = @lunr_config['strip_index_html']
40
+
41
+ # stop word exclusion configuration
42
+ @min_length = @lunr_config['min_length']
43
+ @stopwords_file = @lunr_config['stopwords']
44
+ end
45
+
46
+ # Index all pages except pages matching any value in config['lunr_excludes'] or with date['exclude_from_search']
47
+ # The main content from each page is extracted and saved to disk as json
48
+ def generate(site)
49
+ Jekyll.logger.info "Lunr:", 'Creating search index...'
50
+
51
+ @site = site
52
+ # gather pages and posts
53
+ items = pages_to_index(site)
54
+ content_renderer = PageRenderer.new(site)
55
+ index = []
56
+
57
+ index_js = open(@lunr_path).read
58
+ index_js << "\nvar idx = lunr(function() {\n"
59
+ index_js << "\tthis.ref('id');\n"
60
+ @lunr_config['fields'].each_pair do |name, boost|
61
+ index_js << "\tthis.field('#{name}', {'boost': #{boost}});\n"
62
+ end
63
+
64
+ items.each_with_index do |item, i|
65
+ entry = SearchEntry.create(item, content_renderer)
66
+
67
+ entry.strip_index_suffix_from_url! if @strip_index_html
68
+ entry.strip_stopwords!(stopwords, @min_length) if File.exists?(@stopwords_file)
69
+
70
+ doc = {
71
+ "id" => i,
72
+ "title" => getTitle(entry),
73
+ "url" => entry.url,
74
+ "date" => entry.date,
75
+ "categories" => entry.categories,
76
+ "tags" => entry.tags,
77
+ "is_post" => entry.is_post,
78
+ "body" => entry.body
79
+ }
80
+
81
+ index_js << "\tthis.add(" << ::JSON.generate(doc, quirks_mode: true) << ");\n"
82
+ doc.delete("body")
83
+ @docs[i] = doc
84
+
85
+ Jekyll.logger.debug "Lunr:", (entry.title ? "#{entry.title} (#{entry.url})" : entry.url)
86
+ end
87
+
88
+ index_js << "});"
89
+
90
+ FileUtils.mkdir_p(File.join(site.dest, @js_dir))
91
+ filename = File.join(@js_dir, 'index.json')
92
+
93
+ ctx = ExecJS.compile(index_js)
94
+ index = ctx.eval('JSON.stringify(idx)')
95
+
96
+ total = {
97
+ "docs" => @docs,
98
+ "index" => ::JSON.parse(index)
99
+ }
100
+
101
+ filepath = File.join(site.dest, filename)
102
+ File.open(filepath, "w") { |f| f.write(JSON.dump(total)) }
103
+ Jekyll.logger.info "Lunr:", "Index ready (lunr.js v#{@lunr_version})"
104
+ added_files = [filename]
105
+
106
+ site_js = File.join(site.dest, @js_dir)
107
+ # If we're using the gem, add the lunr and search JS files to the _site
108
+ if File.expand_path(site_js) != File.dirname(@lunr_path)
109
+ extras = Dir.glob(File.join(File.dirname(@lunr_path), "search.min.js"))
110
+ FileUtils.cp(extras, site_js)
111
+ extras.map! { |min| File.join(@js_dir, File.basename(min)) }
112
+ Jekyll.logger.debug "Lunr:", "Added JavaScript to #{@js_dir}"
113
+ added_files.push(*extras)
114
+ end
115
+
116
+ # Keep the written files from being cleaned by Jekyll
117
+ added_files.each do |filename|
118
+ site.static_files << SearchIndexFile.new(site, site.dest, "/", filename)
119
+ end
120
+ end
121
+
122
+ private
123
+
124
+ def getTitle(entry)
125
+ if entry.title
126
+ entry.title
127
+ # elsif entry.url == "/index.html"
128
+ # "Main page"
129
+ else
130
+ entry.url
131
+ end
132
+ end
133
+
134
+ # load the stopwords file
135
+ def stopwords
136
+ @stopwords ||= IO.readlines(@stopwords_file).map { |l| l.strip }
137
+ end
138
+
139
+ def output_ext(doc)
140
+ if doc.is_a?(Jekyll::Document)
141
+ Jekyll::Renderer.new(@site, doc).output_ext
142
+ else
143
+ doc.output_ext
144
+ end
145
+ end
146
+
147
+ def pages_to_index(site)
148
+ items = []
149
+
150
+ # deep copy pages and documents (all collections, including posts)
151
+ site.pages.each {|page| items << page.dup }
152
+ site.documents.each {|document| items << document.dup }
153
+
154
+ # only process files that will be converted to .html and only non excluded files
155
+ items.select! {|i| i.respond_to?(:output_ext) && output_ext(i) == '.html' && ! @excludes.any? {|s| (i.url =~ Regexp.new(s)) != nil } }
156
+ items.reject! {|i| i.data['exclude_from_search'] }
157
+
158
+ items
159
+ end
160
+ end
161
+ end
162
+ end
@@ -0,0 +1,38 @@
1
+ require 'nokogiri'
2
+
3
+ module Jekyll
4
+ module LunrJsSearch
5
+ class PageRenderer
6
+ def initialize(site)
7
+ @site = site
8
+ end
9
+
10
+ # render item, but without using its layout
11
+ def prepare(item)
12
+ layout = item.data["layout"]
13
+ begin
14
+ item.data["layout"] = nil
15
+
16
+ if item.is_a?(Jekyll::Document)
17
+ output = Jekyll::Renderer.new(@site, item).run
18
+ else
19
+ item.render({}, @site.site_payload)
20
+ output = item.output
21
+ end
22
+ ensure
23
+ # restore original layout
24
+ item.data["layout"] = layout
25
+ end
26
+
27
+ output
28
+ end
29
+
30
+ # render the item, parse the output and get all text inside <p> elements
31
+ def render(item)
32
+ layoutless = item.dup
33
+
34
+ Nokogiri::HTML(prepare(layoutless)).text
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,49 @@
1
+ require 'nokogiri'
2
+
3
+ module Jekyll
4
+ module LunrJsSearch
5
+ class SearchEntry
6
+ def self.create(site, renderer)
7
+ if site.is_a?(Jekyll::Page) or site.is_a?(Jekyll::Document)
8
+ if defined?(site.date)
9
+ date = site.date
10
+ else
11
+ date = nil
12
+ end
13
+ categories = site.data['categories']
14
+ tags = site.data['tags']
15
+ title, url = extract_title_and_url(site)
16
+ is_post = site.is_a?(Jekyll::Document)
17
+ body = renderer.render(site)
18
+
19
+ SearchEntry.new(title, url, date, categories, tags, is_post, body, renderer)
20
+ else
21
+ raise 'Not supported'
22
+ end
23
+ end
24
+
25
+ def self.extract_title_and_url(item)
26
+ data = item.to_liquid
27
+ [ data['title'], data['url'] ]
28
+ end
29
+
30
+ attr_reader :title, :url, :date, :categories, :tags, :is_post, :body, :collection
31
+
32
+ def initialize(title, url, date, categories, tags, is_post, body, collection)
33
+ @title, @url, @date, @categories, @tags, @is_post, @body, @collection = title, url, date, categories, tags, is_post, body, collection
34
+ end
35
+
36
+ def strip_index_suffix_from_url!
37
+ @url.gsub!(/index\.html$/, '')
38
+ end
39
+
40
+ # remove anything that is in the stop words list from the text to be indexed
41
+ def strip_stopwords!(stopwords, min_length)
42
+ @body = @body.split.delete_if() do |x|
43
+ t = x.downcase.gsub(/[^a-z]/, '')
44
+ t.length < min_length || stopwords.include?(t)
45
+ end.join(' ')
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,10 @@
1
+ module Jekyll
2
+ module LunrJsSearch
3
+ class SearchIndexFile < Jekyll::StaticFile
4
+ # Override write as the index.json index file has already been created
5
+ def write(dest)
6
+ true
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,5 @@
1
+ module Jekyll
2
+ module LunrJsSearch
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,138 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jekyll-lunr-js-search-multilingual
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Ben Smith
8
+ - Professor Fortran
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2018-12-26 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: nokogiri
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '1.7'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '1.7'
28
+ - !ruby/object:Gem::Dependency
29
+ name: json
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: '2.0'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '2.0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: execjs
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '2.7'
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '2.7'
56
+ - !ruby/object:Gem::Dependency
57
+ name: os
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '1.0'
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '1.0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: rake
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - "~>"
75
+ - !ruby/object:Gem::Version
76
+ version: '12.0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: '12.0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: uglifier
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - "~>"
89
+ - !ruby/object:Gem::Version
90
+ version: '3.0'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: '3.0'
98
+ description: Plugin "jekyll-lunr-js-search-multilingual" is "jekyll-lunr-js-search"
99
+ plugin but with multilingual support and where "therubyracer" is replaced by "execjs"
100
+ for Windows support
101
+ email: prof.fortran@hotmail.com
102
+ executables: []
103
+ extensions: []
104
+ extra_rdoc_files: []
105
+ files:
106
+ - build/lunr.min.js
107
+ - build/search.min.js
108
+ - lib/jekyll-lunr-js-search.rb
109
+ - lib/jekyll_lunr_js_search/indexer.rb
110
+ - lib/jekyll_lunr_js_search/page_renderer.rb
111
+ - lib/jekyll_lunr_js_search/search_entry.rb
112
+ - lib/jekyll_lunr_js_search/search_index_file.rb
113
+ - lib/jekyll_lunr_js_search/version.rb
114
+ homepage: https://github.com/fortran-team/jekyll-lunr-js-search-multilingual
115
+ licenses:
116
+ - MIT
117
+ metadata: {}
118
+ post_install_message:
119
+ rdoc_options: []
120
+ require_paths:
121
+ - lib
122
+ required_ruby_version: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - ">="
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
127
+ required_rubygems_version: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ requirements: []
133
+ rubyforge_project:
134
+ rubygems_version: 2.7.6
135
+ signing_key:
136
+ specification_version: 4
137
+ summary: Jekyll + lunr.js = static websites with powerful full-text search using JavaScript
138
+ test_files: []