Add hyphenation

This commit is contained in:
Flaviu Tamas 2015-04-27 17:15:48 -04:00
commit 440cba53d3
6 changed files with 141 additions and 37 deletions

5
Rules
View file

@ -23,7 +23,8 @@ compile '*' do
filter :relativize_paths, :type => :html filter :relativize_paths, :type => :html
layout 'default' layout 'default'
elsif item[:extension] == 'css' elsif item[:extension] == 'css'
# don’t filter stylesheets elsif item[:extension] == 'js'
# don’t filter stylesheets, js
elsif item.binary? elsif item.binary?
# don’t filter binary items # don’t filter binary items
else else
@ -36,6 +37,8 @@ route '*' do
if item[:extension] == 'css' if item[:extension] == 'css'
# Write item with identifier /foo/ to /foo.css # Write item with identifier /foo/ to /foo.css
item.identifier.chop + '.css' item.identifier.chop + '.css'
elsif item[:extension] == 'js'
item.identifier.chop + '.js'
elsif item.binary? elsif item.binary?
# Write item with identifier /foo/ to /foo.ext # Write item with identifier /foo/ to /foo.ext
item.identifier.chop + '.' + item[:extension] item.identifier.chop + '.' + item[:extension]

68
content/js/hypth.js Normal file
View file

@ -0,0 +1,68 @@
/*
Hyphenator 5.0.0 - client side hyphenation for webbrowsers
Copyright (C) 2015 Mathias Nater, Zürich (mathiasnater at gmail dot com)
https://github.com/mnater/Hyphenator
Released under the MIT license
http://mnater.github.io/Hyphenator/LICENSE.txt
*/
var l=function(f){function Ia(){var a;k.test("config")&&(a=f.JSON.parse(k.getItem("config")),l.w(a))}function xa(){k&&k.setItem("config",f.JSON.stringify({STORED:!0,classname:L,urlclassname:U,donthyphenateclassname:H,minwordlength:B,hyphenchar:C,urlhyphenchar:F,togglebox:V,displaytogglebox:ea,remoteloading:fa,enablecache:K,enablereducedpatternset:M,onhyphenationdonecallback:W,onerrorhandler:D,onwarninghandler:ga,intermediatestate:I,selectorfunction:X||ha,safecopy:N,doframes:O,storagetype:P,orphancontrol:Q,
dohyphenation:l.g,persistentconfig:ia,defaultlanguage:Y,useCSS3hyphenation:J,unhide:R,onbeforewordhyphenation:ja,onafterwordhyphenation:ka}))}function ya(){var a;try{if("none"!==P&&void 0!==f.JSON&&void 0!==f.localStorage&&void 0!==f.sessionStorage&&void 0!==f.JSON.stringify&&void 0!==f.JSON.parse){switch(P){case "session":a=f.sessionStorage;break;case "local":a=f.localStorage;break;default:a=void 0}a.setItem("storageTest","1");a.removeItem("storageTest")}}catch(c){a=void 0}k=a?{prefix:"Hyphenator_"+
l.version+"_",D:a,n:{},test:function(a){return this.D.getItem(this.prefix+a)?!0:!1},getItem:function(a){a=this.D.getItem(this.prefix+a);return a=a.replace(/-(\d{2,}|[2-9])/g,function(a,b){var c=parseInt(b,10),h="";if(String.prototype.repeat)h="0,".repeat(c-1);else for(;1<c;)h+="0,",--c;return h+"0"})},setItem:function(a,c){c=c.replace(/((0,){2,})/g,function(a,b){return~(b.length>>1)+1+","});try{this.D.setItem(this.prefix+a,c)}catch(e){D(e)}}}:void 0}function Ja(){t.o(function(a){var c,b=a.length;
for(c=0;c<b;c+=1)Z(a[c].element),N&&za.W(a[c].element),a[c].r=!1})}function Aa(a){function c(a,b,c){return function(){return a(b,c)}}var b,d;if("*"===a)t.o(function(a,b){var d,r=b.length;for(d=0;d<r;d+=1)la(c(Ba,a,b[d]))});else if(t.list.hasOwnProperty(a))for(d=t.list[a].length,b=0;b<d;b+=1)la(c(Ba,a,t.list[a][b]))}function Ba(a,c){var b=c.element,d,e,g,h;if(l.a.hasOwnProperty(a)&&l.g)for(h=l.a[a],d=function(b,c,d,e){return void 0!==d&&""!==d||""!==e&&void 0!==e?na(b):oa(h,a,c)},N&&"body"!==b.tagName.toLowerCase()&&
za.V(b),g=0,e=b.childNodes[g];e;)3===e.nodeType&&/\S/.test(e.data)&&e.data.length>=B&&(e.data=e.data.replace(h.p,d),1!==Q&&(e.data=e.data.replace(/[\S]+ [\S]+[\s]*$/,Ka))),g+=1,e=b.childNodes[g];"hidden"===I&&"wait"===R&&(b.className=b.className.replace(Ca,""),""===b.className&&b.removeAttribute("class"));"hidden"===I&&"progressive"===R&&(b.className=b.className.replace(Ca," "+pa));c.r=!0;t.q+=1;t.count<=t.q&&La()}function Ka(a){var c,b;switch(C){case "|":c="\\|";break;case "+":c="\\+";break;case "*":c=
"\\*";break;default:c=C}a=a.replace(/[\s]*$/,"");2<=Q&&(b=a.split(" "),b[1]=b[1].replace(new RegExp(c,"g"),""),b[1]=b[1].replace(new RegExp(Da,"g"),""),b=b.join(" "));3===Q&&(b=b.replace(/[ ]+/g,String.fromCharCode(160)));return b}function La(){var a=!0,c,b={},d;t.o(function(c){var d,h=c.length;for(d=0;d<h;d+=1)a=a&&c[d].r,b.hasOwnProperty(c[d].element.baseURI)||(b[c[d].element.ownerDocument.location.href]=!0),b[c[d].element.ownerDocument.location.href]=b[c[d].element.ownerDocument.location.href]&&
c[d].r});if(a){"hidden"===I&&"progressive"===R&&t.o(function(a){var b,c=a.length,d;for(b=0;b<c;b+=1)d=a[b].element,d.className=d.className.replace(Ma,""),""===d.className&&d.removeAttribute("class")});for(c=0;c<A.length;c+=1)A[c].I();for(d in b)b.hasOwnProperty(d)&&W(d);k&&k.n.G&&(k.n.G.call(),k.n.G=void 0)}}function Z(a){var c,b,d=0,e;switch(C){case "|":c="\\|";break;case "+":c="\\+";break;case "*":c="\\*";break;default:c=C}switch(F){case "|":b="\\|";break;case "+":b="\\+";break;case "*":b="\\*";
break;default:b=F}for(e=a.childNodes[d];e;)3===e.nodeType?(e.data=e.data.replace(new RegExp(c,"g"),""),e.data=e.data.replace(new RegExp(b,"g"),"")):1===e.nodeType&&Z(e),d+=1,e=a.childNodes[d]}function oa(a,c,b){var d,e,g="",h,r,f,u,m;d=b.length;e="";var g=a.j.k,n,p=0,p=n=0,q,v=a.b,k=a.m.keys;b=ja(b,c);if(""===b)e="";else if(K&&a.cache&&a.cache.hasOwnProperty(b))e=a.cache[b];else if(-1!==b.indexOf(C))e=b;else if(a.c.hasOwnProperty(b))e=a.c[b].replace(/-/g,C);else if(-1!==b.indexOf("-")){d=b.split("-");
for(e=0;e<d.length;e+=1)d[e]=oa(a,c,d[e]);e=d.join("-")}else{h=b.toLowerCase();String().normalize&&(h=h.normalize());if(a.hasOwnProperty("charSubstitution")){n=a.H;for(r in n)n.hasOwnProperty(r)&&(f=h.replace(new RegExp(r,"g"),n[r]));h=f}-1!==b.indexOf("'")&&(h=h.replace(/'/g,"\u2019"));h="_"+h+"_";r=h.length;for(f=0;f<r;f+=1)aa[f]=0,n=h.charCodeAt(f),Ea[f]=g.hasOwnProperty(n)?g[h.charCodeAt(f)]:-1;for(f=0;f<r;f+=1)for(p=0,g="",u=f;u<r;u+=1){m=Ea[u];if(-1===m)break;M&&(g+=h.charAt(u));n=v[p+2*m];
p=v[p+2*m+1];if(0<p){for(m=k[p];m;)--m,k[p+1+m]>aa[f+m]&&(aa[f+m]=k[p+1+m]);if(M){a.u||(a.u={});q=k.subarray?k.subarray(p+1,p+1+k[p]):k.slice(p+1,p+1+k[p]);p=a.u;m=g;for(var w=[],x=g.split(""),t=void 0,t=0;t<=x.length;t+=1)q[t]&&0!==q[t]&&w.push(q[t]),x[t]&&w.push(x[t]);p[m]=w.join("")}}if(0<n)p=n;else break}for(m=0;m<d;m+=1)e=m>=a.K&&m<=d-a.M&&0!==aa[m+1]%2?e+(C+b.charAt(m)):e+b.charAt(m)}e=ka(e,c);K&&(a.cache[b]=e);return e}function V(){var a,c;c=l.g?"Hy-phen-a-tion":"Hyphenation";var b=v.document.getElementById("HyphenatorToggleBox");
b?b.firstChild.data=c:(a=v.document.getElementsByTagName("body")[0],b=ba("div",v),b.setAttribute("id","HyphenatorToggleBox"),b.setAttribute("class",H),c=v.document.createTextNode(c),b.appendChild(c),b.onclick=l.Z,b.style.position="absolute",b.style.top="0px",b.style.right="0px",b.style.margin="0",b.style.backgroundColor="#AAAAAA",b.style.color="#FFFFFF",b.style.font="6pt Arial",b.style.letterSpacing="0.2em",b.style.padding="3px",b.style.cursor="pointer",b.style.WebkitBorderBottomLeftRadius="4px",
b.style.MozBorderRadiusBottomleft="4px",b.style.borderBottomLeftRadius="4px",a.appendChild(b))}function Na(a){function c(){for(var b in E)E.hasOwnProperty(b)&&l.a.hasOwnProperty(b)&&(delete E[b],qa(b),a(b))}var b,d,e;if(fa){for(b in E)if(E.hasOwnProperty(b))if(k&&k.test(b)){l.a[b]=f.JSON.parse(k.getItem(b));Object.prototype.hasOwnProperty.call(f,"Int32Array")&&(l.a[b].b=new f.Int32Array(l.a[b].b),l.a[b].m.keys=new f.Uint8Array(l.a[b].m.keys));if(w.hasOwnProperty("global"))for(e in d=ra(w.global),
d)d.hasOwnProperty(e)&&(l.a[b].c[e]=d[e]);if(w.hasOwnProperty(b)){d=ra(w[b]);for(e in d)d.hasOwnProperty(e)&&(l.a[b].c[e]=d[e]);delete w[b]}d=String().normalize?"[\\w"+l.a[b].h+l.a[b].h.normalize("NFD")+String.fromCharCode(173)+String.fromCharCode(8204)+"-]{"+B+",}":"[\\w"+l.a[b].h+String.fromCharCode(173)+String.fromCharCode(8204)+"-]{"+B+",}";l.a[b].p=new RegExp("("+d+")|((?:\\w*://)?(?:(?:\\w*:)?(?:\\w*)@)?(?:(?:(?:[\\d]{1,3}\\.){3}(?:[\\d]{1,3}))|(?:(?:www\\.|[a-zA-Z]\\.)?[a-zA-Z0-9\\-\\.]+\\.(?:[a-z]{2,4})))(?::\\d*)?(?:/[\\w#!:\\.?\\+=&%@!\\-]*)*)|([\\w-\\.]+@[\\w\\.]+)",
"gi");K&&!l.a[b].cache&&(l.a[b].cache={});delete E[b];a(b)}else Oa(b,c);c()}else{for(b in l.a)l.a.hasOwnProperty(b)&&qa(b);a("*")}}function qa(a){var c=l.a[a],b;c.t||(K&&(c.cache={}),M&&(c.u={}),c.hasOwnProperty("exceptions")&&(l.N(a,c.c),delete c.c),w.hasOwnProperty("global")&&(w[a]=w.hasOwnProperty(a)?w[a]+(", "+w.global):w.global),w.hasOwnProperty(a)?(c.c=ra(w[a]),delete w[a]):c.c={},Pa(c),b=String().normalize?"[\\w"+c.h+c.h.normalize("NFD")+String.fromCharCode(173)+String.fromCharCode(8204)+"-]{"+
B+",}":"[\\w"+c.h+String.fromCharCode(173)+String.fromCharCode(8204)+"-]{"+B+",}",c.p=new RegExp("("+b+")|((?:\\w*://)?(?:(?:\\w*:)?(?:\\w*)@)?(?:(?:(?:[\\d]{1,3}\\.){3}(?:[\\d]{1,3}))|(?:(?:www\\.|[a-zA-Z]\\.)?[a-zA-Z0-9\\-\\.]+\\.(?:[a-z]{2,4})))(?::\\d*)?(?:/[\\w#!:\\.?\\+=&%@!\\-]*)*)|([\\w-\\.]+@[\\w\\.]+)","gi"),c.t=!0);k&&(k.n.G=function(){k.setItem(a,f.JSON.stringify({j:{k:c.j.k},H:c.H,c:c.c,b:Array.prototype.slice.call(c.b),K:c.K,t:c.t,M:c.M,h:c.h,m:{keys:Array.prototype.slice.call(c.m.keys)}}))})}
function Oa(a,c){var b,d,e,g,h=!1;if(y.hasOwnProperty(a)&&!l.a[a]){b=ca+"patterns/"+y[a].file;if(Qa&&!S){d=null;try{d=new f.XMLHttpRequest}catch(r){try{d=new f.ActiveXObject("Microsoft.XMLHTTP")}catch(ma){try{d=new f.ActiveXObject("Msxml2.XMLHTTP")}catch(u){d=null}}}d&&(d.open("HEAD",b,!0),d.setRequestHeader("Cache-Control","no-cache"),d.onreadystatechange=function(){2===d.readyState&&(400<=d.status?(D(Error("Could not load\n"+b)),delete E[a]):d.abort())},d.send(null))}ba&&(e=f.document.getElementsByTagName("head").item(0),
g=ba("script",f),g.src=b,g.type="text/javascript",g.charset="utf8",g.onload=g.onreadystatechange=function(){h||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(h=!0,c(),g.onload=g.onreadystatechange=null,e&&g.parentNode&&e.removeChild(g))},e.appendChild(g))}}function ra(a){a=a.split(", ");var c={},b,d,e;b=0;for(d=a.length;b<d;b+=1)e=a[b].replace(/-/g,""),c.hasOwnProperty(e)||(c[e]=a[b]);return c}function Pa(a){var c=0,b,d,e,g,h;a.j=new Ra;for(b=0;b<a.U.length;b+=1)a.j.add(a.U.charCodeAt(b));
d=a.j.k;a.m=e=new Sa(a.ja);if(Object.prototype.hasOwnProperty.call(f,"Int32Array"))a.b=new f.Int32Array(2*a.T);else for(a.b=[],a.b.length=2*a.T,b=a.b.length-1;0<=b;--b)a.b[b]=0;g=a.b;h=2*a.j.A.length;for(b in a.L)if(a.L.hasOwnProperty(b))for(var r=parseInt(b,10),ma=a.L[b],u=0,m=0,n=0,p=0,q=0,k=!1,u=0;u<ma.length;u+=1)m=ma.charCodeAt(u),0!==(u+1)%r?49<=m&&57>=m?(e.add(m-48),k=!0):(k||e.add(0),k=!1,-1===q&&(c=q=c+h,g[p+2*n]=q),n=d[m],p=q,q=g[p+2*n],0===q&&(q=g[p+2*n]=-1)):(49<=m&&57>=m?e.add(m-48):
(k||e.add(0),e.add(0),-1===q&&(c=q=c+h,g[p+2*n]=q),n=d[m],p=q,0===g[p+2*n]&&(g[p+2*n]=-1)),g[p+2*n+1]=e.O(),q=p=0,k=!1)}function Sa(a){this.keys=function(){var c,b;if(Object.prototype.hasOwnProperty.call(f,"Uint8Array"))return new f.Uint8Array(a);b=[];b.length=a;for(c=b.length-1;0<=c;--c)b[c]=0;return b}();this.C=1;this.B=this.l=2;this.add=function(a){0!==a&&(this.keys[this.l]=a,this.B=this.l);this.l+=1};this.O=function(){var a=this.C;this.keys[a]=this.B-a;this.C=this.B+1;this.l=this.C+1;return a}}
function Ra(){this.A=[];this.k={};this.add=function(a){this.k[a]||(this.A.push(a),this.k[a]=this.A.length-1)}}function Ta(){function a(b){var c,e=0;for(c=b.childNodes[e];c;)1!==c.nodeType||sa[c.nodeName.toLowerCase()]||-1!==c.className.indexOf(H)||-1!==c.className.indexOf(L)||d[c]?3===c.nodeType&&(c.data=na(c.data)):a(c),e+=1,c=b.childNodes[e]}function c(a,d,e){function g(){S&&q!==x||(y.hasOwnProperty(q)?E[q]=!0:y.hasOwnProperty(q.split("-")[0])?(q=q.split("-")[0],E[q]=!0):S||(p=!1,D(Error('Language "'+
q+'" is not yet supported.'))),p&&("hidden"===I&&(a.className=a.className+" "+ta),t.add(a,q)))}function f(){G=new Fa(v);G.e("."+T,z.d+": auto;");G.e("."+H,z.d+": manual;");q!==d&&-1!==z.d.indexOf("webkit")&&G.e("."+T,"-webkit-locale : "+q+";");a.className=a.className+" "+T}e=e||!1;var n=0,p=!0,q;q=a.lang&&"string"===typeof a.lang?a.lang.toLowerCase():d&&""!==d?d.toLowerCase():ua(a,!0);e?q!==d?J&&z.i&&z.f(q)?f():g():J&&z.i&&z.f(q)||g():J&&z.i&&z.f(q)?f():g();for(e=a.childNodes[n];e;)1!==e.nodeType||
sa[e.nodeName.toLowerCase()]||-1!==e.className.indexOf(H)||-1!==e.className.indexOf(U)||b[e]||c(e,q,!0),n+=1,e=a.childNodes[n]}var b,d,e,g=0;J&&Ua();if(S)b=v.document.getElementsByTagName("body")[0],c(b,x,!1);else{J||"hidden"!==I||(A.push(new Fa(v)),A[A.length-1].e("."+L,"visibility: hidden;"),A[A.length-1].e("."+ta,"visibility: hidden;"),A[A.length-1].e("."+pa,"visibility: visible;"));b=Va();for(e=b[g];e;)c(e,"",!1),g+=1,e=b[g];d=ha(U);g=0;for(e=d[g];e;)a(e),g+=1,e=d[g]}if(0===t.count){for(g=0;g<
A.length;g+=1)A[g].I();W(v.location.href)}}function Ga(a){a=a||v;var c=a.document.getElementsByTagName("html")[0],b=a.document.getElementsByTagName("meta"),d;x=ua(c,!1);if(!x)for(d=0;d<b.length;d+=1)b[d].getAttribute("http-equiv")&&"content-language"===b[d].getAttribute("http-equiv").toLowerCase()&&(x=b[d].getAttribute("content").toLowerCase()),b[d].getAttribute("name")&&"dc.language"===b[d].getAttribute("name").toLowerCase()&&(x=b[d].getAttribute("content").toLowerCase()),b[d].getAttribute("name")&&
"language"===b[d].getAttribute("name").toLowerCase()&&(x=b[d].getAttribute("content").toLowerCase());!x&&O&&v.frameElement&&Ga(f.parent);x||""===Y||(x=Y);if(!x){var e;d="";d=Math.floor((a.outerWidth-450)/2)+f.screenX;var g=Math.floor((a.outerHeight-300)/2)+f.screenY,b="";if(f.showModalDialog&&-1!==a.location.href.indexOf(ca))e=f.showModalDialog(ca+"modalLangDialog.html",y,"dialogWidth: 450px; dialogHeight: 300px; dialogtop: "+g+"; dialogleft: "+d+"; center: on; resizable: off; scroll: off;");else{a=
"";for(e in y)y.hasOwnProperty(e)&&(a+=e+", ");a=a.substring(0,a.length-2);b=f.navigator.language||f.navigator.ia;b=b.substring(0,2);d=y[b]&&""!==y[b].prompt?y[b].prompt:y.ca.prompt;d+=" (ISO 639-1)\n\n"+a;e=f.prompt(f.unescape(d),b).toLowerCase()}x=e}c.lang=x}function ua(a,c){try{return a.getAttribute("lang")?a.getAttribute("lang").toLowerCase():a.getAttribute("xml:lang")?a.getAttribute("xml:lang").toLowerCase():"html"!==a.tagName.toLowerCase()?ua(a.parentNode,c):c?x:null}catch(b){}}function Ha(a,
c){function b(d){var g,n;if(!d||"readystatechange"!==d.type||"interactive"===a.document.readyState||"complete"===a.document.readyState)if(a.document[h](r+"DOMContentLoaded",b,!1),a.document[h](r+"readystatechange",b,!1),g=a.frames.length,0===g||!O)a[h](r+"load",b,!1),da=!0,e(a);else if(O&&0<g&&d&&"load"===d.type){a[h](r+"load",b,!1);for(d=0;d<g;d+=1){n=void 0;try{n=f.frames[d].document.toString()}catch(p){n=void 0}n&&Ha(a.frames[d],c)}e(a)}}function d(){try{a.document.documentElement.doScroll("left")}catch(b){f.setTimeout(d,
1);return}va[a.location.href]||(da=!0,e(a))}function e(a){va[a.location.href]&&ga(Error("Warning: multiple execution of Hyphenator.run() \u2013 This may slow down the script!"));v=a||f;c();va[v.location.href]=!0}var g;g=f.document.addEventListener?"addEventListener":"attachEvent";var h=f.document.addEventListener?"removeEventListener":"detachEvent",r=f.document.addEventListener?"":"on";if(da||"complete"===a.document.readyState)da=!0,b({type:"load"});else{a.document[g](r+"DOMContentLoaded",b,!1);a.document[g](r+
"readystatechange",b,!1);a[g](r+"load",b,!1);g=!1;try{g=!f.frameElement}catch(k){}g&&a.document.documentElement.doScroll&&d()}}function na(a){a=a.replace(/([:\/\.\?#&\-_,;!@]+)/gi,"$&"+F).split(F);var c;for(c=0;c<a.length;c+=1)a[c].length>2*B&&(a[c]=a[c].replace(/(\w{3})(\w)/gi,"$1"+F+"$2"));""===a[a.length-1]&&a.pop();return a.join(F)}function Fa(a){function c(a,b){var c;d.insertRule?(c=d.cssRules?d.cssRules.length:0,c=d.insertRule(a+"{"+b+"}",c)):d.addRule&&(c=d.rules?d.rules.length:0,d.addRule(a,
b,c));return c}a=a||f;var b=a.document,d=function(){var a,c=b.styleSheets.length,d,e=!1;for(a=0;a<c;a+=1){d=b.styleSheets[a];try{if(d.cssRules){e=d;break}}catch(f){}}!1===e&&(a=b.createElement("style"),a.type="text/css",b.getElementsByTagName("head")[0].appendChild(a),e=b.styleSheets[b.styleSheets.length-1]);return e}(),e=[];return{e:function(b,f){var r,k,u;r=a.document.styleSheets;var m,n,p=!1;for(m=0;m<r.length;m+=1){u=r[m];try{u.cssRules?k=u.cssRules:u.rules&&(k=u.rules)}catch(q){}if(k&&k.length)for(n=
0;n<k.length;n+=1)u=k[n],u.selectorText===b&&(p={index:n,v:u})}(r=p)?(k=r.v.cssText?r.v.cssText:r.v.style.cssText.toLowerCase(),k!==b+" { "+f+" }"&&(-1!==k.indexOf(f)&&(r.v.style.visibility=""),r=c(b,f),e.push({sheet:d,index:r}))):(r=c(b,f),e.push({sheet:d,index:r}))},I:function(){for(var a=e.pop();a;){var b=a.sheet,a=a.index;b.deleteRule?b.deleteRule(a):b.removeRule(a);a=e.pop()}}}}function Va(){var a;a=X?X():ha(L);if(0!==a.length){var c=[],b=0,d=0,e=!0;c.push(a[0]);for(b=1;b<a.length;b+=1){for(d=
0;d<c.length;d+=1)if(c[d].contains(a[b])){e=!1;break}e&&c.push(a[b]);e=!0}a=c}return a}function ha(a){var c,b=[],d,e;if(f.document.getElementsByClassName)b=v.document.getElementsByClassName(a);else if(f.document.querySelectorAll)b=v.document.querySelectorAll("."+a);else for(c=v.document.getElementsByTagName("*"),e=c.length,d=0;d<e;d+=1)-1!==c[d].className.indexOf(a)&&-1===c[d].className.indexOf(H)&&b.push(c[d]);return b}function W(a){return a}function ka(a){return a}function ja(a){return a}function Ua(){function a(a){var b=
"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz \u0430\u0431\u0432\u0433\u0434\u0435\u0451\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f \u0623\u0628\u062a\u062b\u062c\u062d\u062e\u062f\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063a\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u064a \u0561\u0562\u0563\u0564\u0565\u0566\u0567\u0568\u0569\u056a\u056b\u056c\u056d\u056e\u056f\u0570\u0571\u0572\u0573\u0574\u0575\u0576\u0577\u0578\u0579\u057a\u057b\u057c\u057d\u057e\u057f\u0580\u0581\u0582\u0583\u0584\u0585\u0586 \u0981\u0982\u0983\u0985\u0986\u0987\u0988\u0989\u098a\u098b\u098c\u098f\u0990\u0993\u0994\u0995\u0996\u0997\u0998\u0999\u099a\u099b\u099c\u099d\u099e\u099f\u09a0\u09a1\u09a2\u09a3\u09a4\u09a5\u09a6\u09a7\u09a8\u09aa\u09ab\u09ac\u09ad\u09ae\u09af\u09b0\u09b2\u09b6\u09b7\u09b8\u09b9\u09bc\u09bd\u09be\u09bf\u09c0\u09c1\u09c2\u09c3\u09c4\u09c7\u09c8\u09cb\u09cc\u09cd\u09ce\u09d7\u09dc\u09dd\u09df\u09e0\u09e1\u09e2\u09e3 \u0901\u0902\u0903\u0905\u0906\u0907\u0908\u0909\u090a\u090b\u090c\u090f\u0910\u0913\u0914\u0915\u0916\u0917\u0918\u0919\u091a\u091b\u091c\u091d\u091e\u091f\u0920\u0921\u0922\u0923\u0924\u0925\u0926\u0927\u0928\u092a\u092b\u092c\u092d\u092e\u092f\u0930\u0932\u0933\u0935\u0936\u0937\u0938\u0939\u093d\u093e\u093f\u0940\u0941\u0942\u0943\u0944\u0947\u0948\u094b\u094c\u094d\u0952\u0951\u0960\u0961\u0962\u0963 \u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c3\u03c2\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9 \u0aac\u0ab9\u0a85\u0a86\u0a87\u0a88\u0a89\u0a8a\u0a8b\u0ae0\u0a8f\u0a90\u0a93\u0a94\u0abe\u0abf\u0ac0\u0ac1\u0ac2\u0ac3\u0ac4\u0ae2\u0ae3\u0ac7\u0ac8\u0acb\u0acc\u0a95\u0a96\u0a97\u0a98\u0a99\u0a9a\u0a9b\u0a9c\u0a9d\u0a9e\u0a9f\u0aa0\u0aa1\u0aa2\u0aa3\u0aa4\u0aa5\u0aa6\u0aa7\u0aa8\u0aaa\u0aab\u0ab8\u0aad\u0aae\u0aaf\u0ab0\u0ab2\u0ab3\u0ab5\u0ab6\u0ab7 \u0c82\u0c83\u0c85\u0c86\u0c87\u0c88\u0c89\u0c8a\u0c8b\u0c8c\u0c8e\u0c8f\u0c90\u0c92\u0c93\u0c94\u0c95\u0c96\u0c97\u0c98\u0c99\u0c9a\u0c9b\u0c9c\u0c9d\u0c9e\u0c9f\u0ca0\u0ca1\u0ca2\u0ca3\u0ca4\u0ca5\u0ca6\u0ca7\u0ca8\u0caa\u0cab\u0cac\u0cad\u0cae\u0caf\u0cb0\u0cb1\u0cb2\u0cb3\u0cb5\u0cb6\u0cb7\u0cb8\u0cb9\u0cbd\u0cbe\u0cbf\u0cc0\u0cc1\u0cc2\u0cc3\u0cc4\u0cc6\u0cc7\u0cc8\u0cca\u0ccb\u0ccc\u0ccd\u0cd5\u0cd6\u0cde\u0ce0\u0ce1 \u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94\u0e95\u0e96\u0e97\u0e99\u0e9a\u0e9b\u0e9c\u0e9d\u0e9e\u0e9f\u0ea1\u0ea2\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead\u0eae\u0eb0\u0eb1\u0eb2\u0eb4\u0eb5\u0eb6\u0eb7\u0eb8\u0eb9\u0ebb\u0ebc\u0ec0\u0ec1\u0ec2\u0ec3\u0ec4\u0ec8\u0ec9\u0eca\u0ecb\u0edc\u0edd \u0d02\u0d03\u0d05\u0d06\u0d07\u0d08\u0d09\u0d0a\u0d0b\u0d0c\u0d0e\u0d0f\u0d10\u0d12\u0d13\u0d14\u0d15\u0d16\u0d17\u0d18\u0d19\u0d1a\u0d1b\u0d1c\u0d1d\u0d1e\u0d1f\u0d20\u0d21\u0d22\u0d23\u0d24\u0d25\u0d26\u0d27\u0d28\u0d2a\u0d2b\u0d2c\u0d2d\u0d2e\u0d2f\u0d30\u0d31\u0d32\u0d33\u0d34\u0d35\u0d36\u0d37\u0d38\u0d39\u0d3e\u0d3f\u0d40\u0d41\u0d42\u0d43\u0d46\u0d47\u0d48\u0d4a\u0d4b\u0d4c\u0d4d\u0d57\u0d60\u0d61\u0d7a\u0d7b\u0d7c\u0d7d\u0d7e\u0d7f \u0b01\u0b02\u0b03\u0b05\u0b06\u0b07\u0b08\u0b09\u0b0a\u0b0b\u0b0c\u0b0f\u0b10\u0b13\u0b14\u0b15\u0b16\u0b17\u0b18\u0b19\u0b1a\u0b1b\u0b1c\u0b1d\u0b1e\u0b1f\u0b20\u0b21\u0b22\u0b23\u0b24\u0b25\u0b26\u0b27\u0b28\u0b2a\u0b2b\u0b2c\u0b2d\u0b2e\u0b2f\u0b30\u0b32\u0b33\u0b35\u0b36\u0b37\u0b38\u0b39\u0b3e\u0b3f\u0b40\u0b41\u0b42\u0b43\u0b47\u0b48\u0b4b\u0b4c\u0b4d\u0b57\u0b60\u0b61 \u0623\u0628\u062a\u062b\u062c\u062d\u062e\u062f\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063a\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u064a \u0a01\u0a02\u0a03\u0a05\u0a06\u0a07\u0a08\u0a09\u0a0a\u0a0f\u0a10\u0a13\u0a14\u0a15\u0a16\u0a17\u0a18\u0a19\u0a1a\u0a1b\u0a1c\u0a1d\u0a1e\u0a1f\u0a20\u0a21\u0a22\u0a23\u0a24\u0a25\u0a26\u0a27\u0a28\u0a2a\u0a2b\u0a2c\u0a2d\u0a2e\u0a2f\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3e\u0a3f\u0a40\u0a41\u0a42\u0a47\u0a48\u0a4b\u0a4c\u0a4d\u0a70\u0a71 \u0b83\u0b85\u0b86\u0b87\u0b88\u0b89\u0b8a\u0b8e\u0b8f\u0b90\u0b92\u0b93\u0b94\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8\u0ba9\u0baa\u0bae\u0baf\u0bb0\u0bb1\u0bb2\u0bb3\u0bb4\u0bb5\u0bb7\u0bb8\u0bb9\u0bbe\u0bbf\u0bc0\u0bc1\u0bc2\u0bc6\u0bc7\u0bc8\u0bca\u0bcb\u0bcc\u0bcd\u0bd7 \u0c01\u0c02\u0c03\u0c05\u0c06\u0c07\u0c08\u0c09\u0c0a\u0c0b\u0c0c\u0c0e\u0c0f\u0c10\u0c12\u0c13\u0c14\u0c15\u0c16\u0c17\u0c18\u0c19\u0c1a\u0c1b\u0c1c\u0c1d\u0c1e\u0c1f\u0c20\u0c21\u0c22\u0c23\u0c24\u0c25\u0c26\u0c27\u0c28\u0c2a\u0c2b\u0c2c\u0c2d\u0c2e\u0c2f\u0c30\u0c31\u0c32\u0c33\u0c35\u0c36\u0c37\u0c38\u0c39\u0c3e\u0c3f\u0c40\u0c41\u0c42\u0c43\u0c44\u0c46\u0c47\u0c48\u0c4a\u0c4b\u0c4c\u0c4d\u0c55\u0c56\u0c60\u0c61".split(" ");
return function(c){var h,k,t;h=!1;this.F.hasOwnProperty(c)?h=this.F[c]:y.hasOwnProperty(c)?(t=f.document.getElementsByTagName("body")[0],h=ba("div",f),h.id="Hyphenator_LanguageChecker",h.style.width="5em",h.style[a]="auto",h.style.R="auto",h.style.fontSize="12px",h.style.lineHeight="12px",h.style.visibility="hidden",h.lang=c,h.style["-webkit-locale"]="'"+c+"'",h.innerHTML=b[y[c].ga],t.appendChild(h),k=h.offsetHeight,t.removeChild(h),h=12<k?!0:!1,this.F[c]=h):h=!1;return h}}var c,b={i:!1,F:{},d:"",
f:{}};f.getComputedStyle&&(c=f.getComputedStyle(f.document.getElementsByTagName("body")[0],null),void 0!==c.R?(b.i=!0,b.d="hyphens",b.f=a("hyphens")):void 0!==c["-webkit-hyphens"]?(b.i=!0,b.d="-webkit-hyphens",b.f=a("-webkit-hyphens")):void 0!==c.$?(b.i=!0,b.d="-moz-hyphens",b.f=a("MozHyphens")):void 0!==c["-ms-hyphens"]&&(b.i=!0,b.d="-ms-hyphens",b.f=a("-ms-hyphens")));z=b}function ba(a,c){c=c||v;var b;f.document.createElementNS?b=c.document.createElementNS("http://www.w3.org/1999/xhtml",a):f.document.createElement&&
(b=c.document.createElement(a));return b}function ga(a){f.console.log(a.message)}function D(a){f.alert("Hyphenator.js says:\n\nAn Error occurred:\n"+a.message)}var v=f,y=function(){function a(a,d,e,f){c[a]={file:d,script:e,prompt:f}}var c={};a("be","be.js",1,"\u041c\u043e\u0432\u0430 \u0433\u044d\u0442\u0430\u0433\u0430 \u0441\u0430\u0439\u0442\u0430 \u043d\u0435 \u043c\u043e\u0436\u0430 \u0431\u044b\u0446\u044c \u0432\u044b\u0437\u043d\u0430\u0447\u0430\u043d\u044b \u0430\u045e\u0442\u0430\u043c\u0430\u0442\u044b\u0447\u043d\u0430. \u041a\u0430\u043b\u0456 \u043b\u0430\u0441\u043a\u0430 \u043f\u0430\u043a\u0430\u0436\u044b\u0446\u0435 \u043c\u043e\u0432\u0443:");
a("ca","ca.js",0,"");a("cs","cs.js",0,"Jazyk t\u00e9to internetov\u00e9 str\u00e1nky nebyl automaticky rozpozn\u00e1n. Ur\u010dete pros\u00edm jej\u00ed jazyk:");a("da","da.js",0,"Denne websides sprog kunne ikke bestemmes. Angiv venligst sprog:");a("bn","bn.js",4,"");a("de","de.js",0,"Die Sprache dieser Webseite konnte nicht automatisch bestimmt werden. Bitte Sprache angeben:");a("el","el-monoton.js",6,"");a("el-monoton","el-monoton.js",6,"");a("el-polyton","el-polyton.js",6,"");a("en","en-us.js",
0,"The language of this website could not be determined automatically. Please indicate the main language:");a("en-gb","en-gb.js",0,"The language of this website could not be determined automatically. Please indicate the main language:");a("en-us","en-us.js",0,"The language of this website could not be determined automatically. Please indicate the main language:");a("eo","eo.js",0,"La lingvo de \u0109i tiu retpa\u011do ne rekoneblas a\u016dtomate. Bonvolu indiki \u011dian \u0109eflingvon:");a("es",
"es.js",0,"El idioma del sitio no pudo determinarse autom%E1ticamente. Por favor, indique el idioma principal:");a("et","et.js",0,"Veebilehe keele tuvastamine eba\u00f5nnestus, palun valige kasutatud keel:");a("fi","fi.js",0,"Sivun kielt%E4 ei tunnistettu automaattisesti. M%E4%E4rit%E4 sivun p%E4%E4kieli:");a("fr","fr.js",0,"La langue de ce site n%u2019a pas pu %EAtre d%E9termin%E9e automatiquement. Veuillez indiquer une langue, s.v.p.%A0:");a("grc","grc.js",6,"");a("gu","gu.js",7,"");a("hi","hi.js",
5,"");a("hu","hu.js",0,"A weboldal nyelv\u00e9t nem siker\u00fclt automatikusan meg\u00e1llap\u00edtani. K\u00e9rem adja meg a nyelvet:");a("hy","hy.js",3,"\u0549\u0570\u0561\u057b\u0578\u0572\u057e\u0565\u0581 \u0570\u0561\u0575\u057f\u0576\u0561\u0562\u0565\u0580\u0565\u056c \u0561\u0575\u057d \u056f\u0561\u0575\u0584\u056b \u056c\u0565\u0566\u0578\u0582\u0576\u0589 \u053d\u0576\u0564\u0580\u0578\u0582\u0574 \u0565\u0576\u0584 \u0576\u0577\u0565\u0584 \u0570\u056b\u0574\u0576\u0561\u056f\u0561\u0576 \u056c\u0565\u0566\u0578\u0582\u0576\u055d");
a("it","it.js",0,"Lingua del sito sconosciuta. Indicare una lingua, per favore:");a("kn","kn.js",8,"\u0c9c\u0cbe\u0cb2 \u0ca4\u0cbe\u0ca3\u0ca6 \u0cad\u0cbe\u0cb7\u0cc6\u0caf\u0ca8\u0ccd\u0ca8\u0cc1 \u0ca8\u0cbf\u0cb0\u0ccd\u0ca7\u0cb0\u0cbf\u0cb8\u0cb2\u0cc1 \u0cb8\u0cbe\u0ca7\u0ccd\u0caf\u0cb5\u0cbe\u0c97\u0cc1\u0ca4\u0ccd\u0ca4\u0cbf\u0cb2\u0ccd\u0cb2. \u0ca6\u0caf\u0cb5\u0cbf\u0c9f\u0ccd\u0c9f\u0cc1 \u0cae\u0cc1\u0c96\u0ccd\u0caf \u0cad\u0cbe\u0cb7\u0cc6\u0caf\u0ca8\u0ccd\u0ca8\u0cc1 \u0cb8\u0cc2\u0c9a\u0cbf\u0cb8\u0cbf:");
a("la","la.js",0,"");a("lt","lt.js",0,"Nepavyko automati\u0161kai nustatyti \u0161ios svetain\u0117s kalbos. Pra\u0161ome \u012fvesti kalb\u0105:");a("lv","lv.js",0,"\u0160\u012bs lapas valodu nevar\u0113ja noteikt autom\u0101tiski. L\u016bdzu nor\u0101diet pamata valodu:");a("ml","ml.js",10,"\u0d08 \u0d35\u0d46%u0D2C%u0D4D%u200C\u0d38\u0d48\u0d31\u0d4d\u0d31\u0d3f\u0d28\u0d4d\u0d31\u0d46 \u0d2d\u0d3e\u0d37 \u0d15\u0d23\u0d4d\u0d1f\u0d41\u0d2a\u0d3f\u0d1f\u0d3f\u0d2f\u0d4d\u0d15\u0d4d\u0d15\u0d3e%u0D28%u0D4D%u200D \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d3f\u0d32\u0d4d\u0d32. \u0d2d\u0d3e\u0d37 \u0d0f\u0d24\u0d3e\u0d23\u0d46\u0d28\u0d4d\u0d28\u0d41 \u0d24\u0d3f\u0d30\u0d1e\u0d4d\u0d1e\u0d46\u0d1f\u0d41\u0d15\u0d4d\u0d15\u0d41\u0d15:");
a("nb","nb-no.js",0,"Nettstedets spr\u00e5k kunne ikke finnes automatisk. Vennligst oppgi spr\u00e5k:");a("no","nb-no.js",0,"Nettstedets spr\u00e5k kunne ikke finnes automatisk. Vennligst oppgi spr\u00e5k:");a("nb-no","nb-no.js",0,"Nettstedets spr\u00e5k kunne ikke finnes automatisk. Vennligst oppgi spr\u00e5k:");a("nl","nl.js",0,"De taal van deze website kan niet automatisch worden bepaald. Geef de hoofdtaal op:");a("or","or.js",11,"");a("pa","pa.js",13,"");a("pl","pl.js",0,"J\u0119zyka tej strony nie mo\u017cna ustali\u0107 automatycznie. Prosz\u0119 wskaza\u0107 j\u0119zyk:");
a("pt","pt.js",0,"A l\u00edngua deste site n\u00e3o p\u00f4de ser determinada automaticamente. Por favor indique a l\u00edngua principal:");a("ru","ru.js",1,"\u042f\u0437\u044b\u043a \u044d\u0442\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u044f\u0437\u044b\u043a:");
a("sk","sk.js",0,"");a("sl","sl.js",0,"Jezika te spletne strani ni bilo mogo\u010de samodejno dolo\u010diti. Prosim navedite jezik:");a("sr-cyrl","sr-cyrl.js",1,"\u0408\u0435\u0437\u0438\u043a \u043e\u0432\u043e\u0433 \u0441\u0430\u0458\u0442\u0430 \u043d\u0438\u0458\u0435 \u0434\u0435\u0442\u0435\u043a\u0442\u043e\u0432\u0430\u043d \u0430\u0443\u0442\u043e\u043c\u0430\u0442\u0441\u043a\u0438. \u041c\u043e\u043b\u0438\u043c \u0432\u0430\u0441 \u043d\u0430\u0432\u0435\u0434\u0438\u0442\u0435 \u0458\u0435\u0437\u0438\u043a:");
a("sr-latn","sr-latn.js",0,"Jezika te spletne strani ni bilo mogo\u010de samodejno dolo\u010diti. Prosim navedite jezik:");a("sv","sv.js",0,"Spr%E5ket p%E5 den h%E4r webbplatsen kunde inte avg%F6ras automatiskt. V%E4nligen ange:");a("ta","ta.js",14,"");a("te","te.js",15,"");a("tr","tr.js",0,"Bu web sitesinin dili otomatik olarak tespit edilememi\u015ftir. L\u00fctfen d\u00f6k\u00fcman\u0131n dilini se\u00e7iniz%A0:");a("uk","uk.js",1,"\u041c\u043e\u0432\u0430 \u0446\u044c\u043e\u0433\u043e \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0443 \u043d\u0435 \u043c\u043e\u0436\u0435 \u0431\u0443\u0442\u0438 \u0432\u0438\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e. \u0411\u0443\u0434\u044c \u043b\u0430\u0441\u043a\u0430, \u0432\u043a\u0430\u0436\u0456\u0442\u044c \u0433\u043e\u043b\u043e\u0432\u043d\u0443 \u043c\u043e\u0432\u0443:");
a("ro","ro.js",0,"Limba acestui sit nu a putut fi determinat\u0103 automat. Alege limba principal\u0103:");return c}(),ca=function(){var a=v.document.getElementsByTagName("script"),c=0,b,d;b=a[c];for(var e="";b;)b.src&&(d=b.src,b=d.indexOf("Hyphenator.js"),-1!==b&&(e=d.substring(0,b))),c+=1,b=a[c];return e?e:"//mnater.github.io/Hyphenator/"}(),Qa=function(){var a=!1;-1!==f.location.href.indexOf(ca)&&(a=!0);return a}(),da=!1,ia=!1,O=!1,sa={video:!0,audio:!0,script:!0,code:!0,pre:!0,img:!0,br:!0,samp:!0,
kbd:!0,"var":!0,abbr:!0,acronym:!0,sub:!0,sup:!0,button:!0,option:!0,label:!0,textarea:!0,input:!0,math:!0,svg:!0,style:!0},K=!0,P="local",k,M=!1,fa=!0,ea=!1,J=!1,z,L="hyphenate",U="urlhyphenate",wa="Hyphenator"+Math.round(1E3*Math.random()),ta=wa+"hide",Ca=new RegExp("\\s?\\b"+ta+"\\b","g"),pa=wa+"unhide",Ma=new RegExp("\\s?\\b"+pa+"\\b","g"),T=wa+"css3hyphenate",G,H="donthyphenate",B=6,Q=1,S=function(){for(var a=null,c=!1,b=v.document.getElementsByTagName("script"),d=0,e=b.length;!c&&d<e;)(a=b[d].getAttribute("src"))&&
-1!==a.indexOf("Hyphenator.js?bm=true")&&(c=!0),d+=1;return c}(),x=null,Y="",t=function(){function a(){this.q=this.count=0;this.list={}}function c(a){this.element=a;this.r=!1}a.prototype={add:function(a,d){var e=new c(a);this.list.hasOwnProperty(d)||(this.list[d]=[]);this.list[d].push(e);this.count+=1;return e},remove:function(a){var c,e,f,h;for(c in this.list)if(this.list.hasOwnProperty(c))for(e=0;e<this.list[c].length;e+=1)if(this.list[c][e].element===a){f=e;h=c;break}this.list[h].splice(f,1);--this.count;
--this.q},o:function(a){for(var c in this.list)this.list.hasOwnProperty(c)&&(2===a.length?a(c,this.list[c]):a(this.list[c]))}};return new a}(),w={},E={},Da=function(){var a,c=f.navigator.userAgent.toLowerCase();a=String.fromCharCode(8203);-1!==c.indexOf("msie 6")&&(a="");-1!==c.indexOf("opera")&&-1!==c.indexOf("version/10.00")&&(a="");return a}(),X=!1,I="hidden",R="wait",A=[],C=String.fromCharCode(173),F=Da,N=!0,la=function(){return f.postMessage&&f.addEventListener?function(){var a=[];f.addEventListener("message",
function(c){c.source===f&&"Hyphenator_zeroTimeOut_message"===c.data&&(c.stopPropagation(),0<a.length&&a.shift()())},!0);return function(c){a.push(c);f.postMessage("Hyphenator_zeroTimeOut_message","*")}}():function(a){f.setTimeout(a,0)}}(),va={},Ea=Object.prototype.hasOwnProperty.call(f,"Int32Array")?new f.Int32Array(32):[],aa=Object.prototype.hasOwnProperty.call(f,"Uint8Array")?new f.Uint8Array(32):[],za=function(){return N?new function(){this.s=function(a){a=a||f.event;var c,b,d,e=a.target||a.srcElement,
g=e.ownerDocument,h=g.getElementsByTagName("body")[0],k=g.defaultView||g.parentWindow;e.tagName&&sa[e.tagName.toLowerCase()]||(c=g.createElement("div"),c.style.color=f.getComputedStyle?k.getComputedStyle(h,null).backgroundColor:"#FFFFFF",c.style.fontSize="0px",h.appendChild(c),f.getSelection?(a.stopPropagation(),b=k.getSelection(),d=b.getRangeAt(0),c.appendChild(d.cloneContents()),Z(c),b.selectAllChildren(c),a=function(){c.parentNode.removeChild(c);b.removeAllRanges();b.addRange(d)}):(a.cancelBubble=
!0,b=k.document.selection,d=b.createRange(),c.innerHTML=d.htmlText,Z(c),a=h.createTextRange(),a.moveToElementText(c),a.select(),a=function(){c.parentNode.removeChild(c);""!==d.text&&d.select()}),la(a))};this.W=function(a){var c=a.ownerDocument.getElementsByTagName("body")[0];c&&(a=a||c,f.removeEventListener?a.removeEventListener("copy",this.s,!0):a.detachEvent("oncopy",this.s))};this.V=function(a){var c=a.ownerDocument.getElementsByTagName("body")[0];c&&(a=a||c,f.addEventListener?a.addEventListener("copy",
this.s,!0):a.attachEvent("oncopy",this.s))}}:!1}();return{version:"5.0.0",g:!0,a:{},w:function(a){function c(b,c){var f;typeof a[b]===c?f=!0:(D(Error("Config onError: "+b+" must be of type "+c)),f=!1);return f}var b;a.hasOwnProperty("storagetype")&&(c("storagetype","string")&&(P=a.Y),k||ya());!a.hasOwnProperty("STORED")&&k&&a.hasOwnProperty("persistentconfig")&&!0===a.fa&&Ia();for(b in a)if(a.hasOwnProperty(b))switch(b){case "STORED":break;case "classname":c("classname","string")&&(L=a[b]);break;
case "urlclassname":c("urlclassname","string")&&(U=a[b]);break;case "donthyphenateclassname":c("donthyphenateclassname","string")&&(H=a[b]);break;case "minwordlength":c("minwordlength","number")&&(B=a[b]);break;case "hyphenchar":c("hyphenchar","string")&&("&shy;"===a.Q&&(a.Q=String.fromCharCode(173)),C=a[b]);break;case "urlhyphenchar":a.hasOwnProperty("urlhyphenchar")&&c("urlhyphenchar","string")&&(F=a[b]);break;case "togglebox":c("togglebox","function")&&(V=a[b]);break;case "displaytogglebox":c("displaytogglebox",
"boolean")&&(ea=a[b]);break;case "remoteloading":c("remoteloading","boolean")&&(fa=a[b]);break;case "enablecache":c("enablecache","boolean")&&(K=a[b]);break;case "enablereducedpatternset":c("enablereducedpatternset","boolean")&&(M=a[b]);break;case "onhyphenationdonecallback":c("onhyphenationdonecallback","function")&&(W=a[b]);break;case "onerrorhandler":c("onerrorhandler","function")&&(D=a[b]);break;case "onwarninghandler":c("onwarninghandler","function")&&(ga=a[b]);break;case "intermediatestate":c("intermediatestate",
"string")&&(I=a[b]);break;case "selectorfunction":c("selectorfunction","function")&&(X=a[b]);break;case "safecopy":c("safecopy","boolean")&&(N=a[b]);break;case "doframes":c("doframes","boolean")&&(O=a[b]);break;case "storagetype":c("storagetype","string")&&(P=a[b]);break;case "orphancontrol":c("orphancontrol","number")&&(Q=a[b]);break;case "dohyphenation":c("dohyphenation","boolean")&&(l.g=a[b]);break;case "persistentconfig":c("persistentconfig","boolean")&&(ia=a[b]);break;case "defaultlanguage":c("defaultlanguage",
"string")&&(Y=a[b]);break;case "useCSS3hyphenation":c("useCSS3hyphenation","boolean")&&(J=a[b]);break;case "unhide":c("unhide","string")&&(R=a[b]);break;case "onbeforewordhyphenation":c("onbeforewordhyphenation","function")&&(ja=a[b]);break;case "onafterwordhyphenation":c("onafterwordhyphenation","function")&&(ka=a[b]);break;default:D(Error("Hyphenator.config: property "+b+" not known."))}k&&ia&&xa()},X:function(){k||ya();Ha(f,function(){try{0<v.document.getElementsByTagName("frameset").length||(Ga(void 0),
Ta(),Na(Aa),ea&&V())}catch(a){D(a)}})},N:function(a,c){""===a&&(a="global");w[a]=w.hasOwnProperty(a)?w[a]+(", "+c):c},J:function(a,c){var b,d,e,f;f=l.a[c];if(l.a.hasOwnProperty(c))if(f.t||qa(c),b=function(a,b,d,e){return d||e?na(a):oa(f,c,b)},"object"===typeof a&&"string"!==typeof a&&a.constructor!==String)for(e=0,d=a.childNodes[e];d;)3===d.nodeType&&/\S/.test(d.data)&&d.data.length>=B?d.data=d.data.replace(f.p,b):1===d.nodeType&&(""!==d.lang?l.J(d,d.lang):l.J(d,c)),e+=1,d=a.childNodes[e];else{if("string"===
typeof a||a.constructor===String)return a.replace(f.p,b)}else D(Error('Language "'+c+'" is not loaded.'))},da:function(a){return l.a[a].u},S:function(){return S},P:function(){var a=null,c={},b=v.document.getElementsByTagName("script"),d,e;d=0;for(e=b.length;d<e;d+=1)if(b[d].getAttribute("src")&&(a=b[d].getAttribute("src")),a&&-1!==a.indexOf("Hyphenator.js?")){b=a.indexOf("Hyphenator.js?");b=a.substring(b+14).split("&");for(a=0;a<b.length;a+=1)if(d=b[a].split("="),"bm"!==d[0]){"true"===d[1]?d[1]=!0:
"false"===d[1]?d[1]=!1:isFinite(d[1])&&(d[1]=parseInt(d[1],10));if("togglebox"===d[0]||"onhyphenationdonecallback"===d[0]||"onerrorhandler"===d[0]||"selectorfunction"===d[0]||"onbeforewordhyphenation"===d[0]||"onafterwordhyphenation"===d[0])d[1]=new Function("",d[1]);c[d[0]]=d[1]}break}return c},Z:function(){l.g?(G&&G.e("."+T,z.d+": none;"),Ja(),l.g=!1):(G&&G.e("."+T,z.d+": auto;"),l.g=!0,Aa("*"));xa();V()}}}(window);l.S()&&(l.w({aa:!0,ea:"visible",Y:"local",ba:!0,ha:!0}),l.w(l.P()),l.X());

View file

@ -0,0 +1,13 @@
/*
Hyphenator_Loader 5.0.0 - client side hyphenation for webbrowsers
Copyright (C) 2015 Mathias Nater, Zürich (mathiasnater at gmail dot com)
https://github.com/mnater/Hyphenator
Released under the MIT license
http://mnater.github.io/Hyphenator/LICENSE.txt
*/
var Hyphenator_Loader=function(d){var g,h,k,f=function(a){var b;d.document.createElementNS?b=d.document.createElementNS("http://www.w3.org/1999/xhtml",a):d.document.createElement&&(b=d.document.createElement(a));return b},q=function(a){var b,c,e=function(){void 0!==d.Hyphenator?(Hyphenator.config(a),Hyphenator.run()):d.setTimeout(function(){e()},10)};b=d.document.getElementsByTagName("head").item(0);c=f("script");c.src=k;c.type="text/javascript";b.appendChild(c);e()},r=function(){var a,b,c=[],e,n=
!0,l=d.document.getElementsByTagName("body")[0];a=f("div");a.style.MozHyphens="auto";a.style["-webkit-hyphens"]="auto";a.style["-ms-hyphens"]="auto";a.style.hyphens="auto";a.style.fontSize="12px";a.style.lineHeight="12px";a.style.wordWrap="normal";a.style.visibility="hidden";for(e in g)g.hasOwnProperty(e)&&(b=f("div"),b.style.width="5em",b.lang=e,b.style["-webkit-locale"]="'"+e+"'",b.appendChild(d.document.createTextNode(g[e])),a.appendChild(b),c.push(b));l.appendChild(a);for(b=0;b<c.length;b+=1)n=
12<c[b].offsetHeight&&n;l.removeChild(a);n||q(h)},t=function(a,b){var c,e={},d,l;c=a.document.addEventListener?"addEventListener":"attachEvent";var g=a.document.addEventListener?"removeEventListener":"detachEvent",m=a.document.addEventListener?"":"on",f=function(c){d=c||a;e[d.location.href]||l&&!d.frameElement||(l=!0,b(),e[d.location.href]=!0)},h=function(){try{a.document.documentElement.doScroll("left")}catch(b){a.setTimeout(h,1);return}f(a)},k=function(){f(a)},p=function(b){if("readystatechange"!==
b.type||"complete"===a.document.readyState)a.document[g](m+b.type,p,!1),0===a.frames.length&&f(a)};if("complete"===a.document.readyState||"interactive"===a.document.readyState)a.setTimeout(k,1);else{a.document[c](m+"DOMContentLoaded",p,!1);a.document[c](m+"readystatechange",p,!1);a[c](m+"load",k,!1);c=!1;try{c=!a.frameElement}catch(q){}a.document.documentElement.doScroll&&c&&h()}};return{init:function(a,b,c){g=a;k=b;h=c||{};t(d,r)}}}(window);
Hyphenator_Loader.init({en:"hyphenationalgorithm"},"/js/hypth.js",{useCSS3hyphenation:!0});

30
content/js/main.js Normal file
View file

@ -0,0 +1,30 @@
function setVisibleTags(){
var tocLinks = document.querySelectorAll("#sidebar a:link, a:visited");
for(var i = 0; i < tocLinks.length; i++){
if(localStorage.getItem(tocLinks[i].getAttribute("href")) != null){
tocLinks[i].classList.add("visited");
}
}
}
var starcount_elem = document.getElementById("starcount");
function updateStarCounter(){
if(localStorage.getItem("_watchers") != null){
starcount_elem.innerHTML = localStorage.getItem("_watchers");
}
var request = new XMLHttpRequest();
// horrible hack... but stargazer output is capped at 30 per request.
request.open("GET", "https://api.github.com/search/repositories?q=nim-by-example", true);
request.onload = function (e) {
var searchResults = JSON.parse(request.responseText);
var starcount = searchResults.items[0].stargazers_count;
starcount_elem.innerHTML = starcount;
localStorage.setItem("_watchers", starcount)
};
request.onerror = function (e) {
console.error(request.statusText);
};
request.send(null);
}
updateStarCounter()
localStorage.setItem(window.location.pathname, true);
setVisibleTags()

View file

@ -190,3 +190,11 @@ a:hover {
#sidebar ul { text-indent: -5px; } #sidebar ul { text-indent: -5px; }
#sidebar #toc-list { left: 25px; } #sidebar #toc-list { left: 25px; }
} }
.hyphenate {
text-align:justify;
hyphens: auto;
-webkit-hyphens: auto;
-ms-hyphens: auto;
-moz-hyphens: auto;
}

View file

@ -1,5 +1,5 @@
<!DOCTYPE HTML> <!DOCTYPE HTML>
<html lang="en"> <html lang="en-US">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Nim by Example - <%= @item[:title] %></title> <title>Nim by Example - <%= @item[:title] %></title>
@ -8,7 +8,6 @@
<link rel="stylesheet" href="<%= @items['/stylesheets/colorful/'].path %>" title="colorful"> <link rel="stylesheet" href="<%= @items['/stylesheets/colorful/'].path %>" title="colorful">
<link rel="stylesheet" href="<%= @items['/stylesheets/fontello/'].path %>"> <link rel="stylesheet" href="<%= @items['/stylesheets/fontello/'].path %>">
<script type="text/x-mathjax-config"> <script type="text/x-mathjax-config">
MathJax.Hub.Config({tex2jax: {inlineMath: [['«', '»']]}}); MathJax.Hub.Config({tex2jax: {inlineMath: [['«', '»']]}});
MathJax.Hub.config.tex2jax.skipTags = ["script", "noscript", "style", "textarea", "annotation", "annotation-xml"]; MathJax.Hub.config.tex2jax.skipTags = ["script", "noscript", "style", "textarea", "annotation", "annotation-xml"];
@ -28,44 +27,27 @@
<meta http-equiv="Default-Style" content="colorful"> <meta http-equiv="Default-Style" content="colorful">
</head> </head>
<body> <body>
<div id="sidebar"> <div id="sidebar">
<%= @items["/toc/"].compiled_content(:snapshot => :last) %> <%= @items["/toc/"].compiled_content(:snapshot => :last) %>
</div> </div>
<div id="main">
<h1 id="gh-buttons"><a class="icon-fork" href="https://github.com/flaviut/nim-by-example/"></a> <a class="icon-star" href="https://github.com/flaviut/nim-by-example/stargazers" /><div id="starcount"></div></a></h1> <div id="main" class="hyphenate">
<script>
function setVisibleTags(){ <h1 id="gh-buttons">
var tocLinks = document.querySelectorAll("#sidebar a:link, a:visited"); <a class="icon-fork" href="https://github.com/flaviut/nim-by-example/"></a>
for(var i = 0; i < tocLinks.length; i++){ <a class="icon-star" href="https://github.com/flaviut/nim-by-example/stargazers">
if(localStorage.getItem(tocLinks[i].getAttribute("href")) != null){ <div id="starcount"></div>
tocLinks[i].classList.add("visited"); </a>
} </h1>
}
}
var starcount_elem = document.getElementById("starcount");
function updateStarCounter(){
if(localStorage.getItem("_watchers") != null){
starcount_elem.innerHTML = localStorage.getItem("_watchers");
}
var request = new XMLHttpRequest();
// horrible hack... but stargazer output is capped at 30 per request.
request.open("GET", "https://api.github.com/search/repositories?q=nim-by-example", true);
request.onload = function (e) {
var searchResults = JSON.parse(request.responseText);
var starcount = searchResults.items[0].stargazers_count;
starcount_elem.innerHTML = starcount;
localStorage.setItem("_watchers", starcount)
};
request.onerror = function (e) {
console.error(request.statusText);
};
request.send(null);
}
updateStarCounter()
localStorage.setItem(window.location.pathname, true);
setVisibleTags()
</script>
<%= yield %> <%= yield %>
</div> </div>
<script src="/js/main.js" type="text/javascript"></script>
<script src="/js/hypth_loader.js" type="text/javascript"></script>
<script> Hyphenator_Loader.init({ "en": "automatically" }, "/js/hypth.js") </script>
</body> </body>
</html> </html>