!function(a){function b(){y.autorun=!0,y.previousModule&&t("moduleDone",w,{name:y.previousModule,failed:y.moduleStats.bad,passed:y.moduleStats.all-y.moduleStats.bad,total:y.moduleStats.all}),delete y.previousModule;var b,c,d=r("qunit-banner"),e=r("qunit-tests"),f=+new E-y.started,g=y.stats.all-y.stats.bad,h=["Tests completed in ",f," milliseconds.
","",g," assertions of ",y.stats.all," passed, ",y.stats.bad," failed."].join("");if(d&&(d.className=y.stats.bad?"qunit-fail":"qunit-pass"),e&&(r("qunit-testresult").innerHTML=h),y.altertitle&&G.document&&document.title&&(document.title=[y.stats.bad?"✖":"✔",document.title.replace(/^[\u2714\u2716] /i,"")].join(" ")),y.reorder&&G.sessionStorage&&0===y.stats.bad)for(b=0;b&]/g,function(a){switch(a){case"'":return"'";case'"':return""";case"<":return"<";case">":return">";case"&":return"&"}})):""}function g(a,b){y.queue.push(a),y.autorun&&!y.blocking&&h(b)}function h(a){function c(){h(a)}var d=(new E).getTime();for(y.depth=y.depth?y.depth+1:1;y.queue.length&&!y.blocking;){if(!(!G.setTimeout||y.updateRate<=0||(new E).getTime()-d0&&w.pushFailure("Introduced global variable(s): "+a.join(", ")),b=k(c,y.pollution),b.length>0&&w.pushFailure("Deleted global variable(s): "+b.join(", "))}function k(a,b){var c,d,e=a.slice();for(c=0;c-1}function p(a,b){o(a,b)||(a.className+=(a.className?" ":"")+b)}function q(a,b){for(var c=" "+a.className+" ";c.indexOf(" "+b+" ")>-1;)c=c.replace(" "+b+" "," ");a.className="function"==typeof c.trim?c.trim():c.replace(/^\s+|\s+$/g,"")}function r(a){return G.document&&document.getElementById&&document.getElementById(a)}function s(a){return function(b){y[a].push(b)}}function t(a,b,c){var d,e;if(w.hasOwnProperty(a))w[a].call(b,c);else for(e=y[a],d=0;d";2===arguments.length&&(d=b,b=null),y.currentModule&&(i=""+f(y.currentModule)+": "+i),h=new v({nameHtml:i,testName:a,expected:b,async:g,callback:d,module:y.currentModule,moduleTestEnvironment:y.currentModuleTestEnvironment,stack:e(2)}),c(h)&&h.queue()},expect:function(a){if(1!==arguments.length)return y.current.expected;y.current.expected=a},start:function(a){return void 0===y.semaphore?void w.begin(function(){F(function(){w.start(a)})}):(y.semaphore-=a||1,y.semaphore>0?void 0:y.semaphore<0?(y.semaphore=0,void w.pushFailure("Called start() while already started (QUnit.config.semaphore was 0 already)",null,e(2))):void(G.setTimeout?F(function(){y.semaphore>0||(y.timeout&&clearTimeout(y.timeout),y.blocking=!1,h(!0))},13):(y.blocking=!1,h(!0))))},stop:function(a){y.semaphore+=a||1,y.blocking=!0,y.testTimeout&&G.setTimeout&&(clearTimeout(y.timeout),y.timeout=F(function(){w.ok(!1,"Test timed out"),y.semaphore=1,w.start()},y.testTimeout))}},function(){function a(){}a.prototype=w,w=new a,w.constructor=a}(),y={queue:[],blocking:!0,hidepassed:!1,reorder:!0,altertitle:!0,requireExpects:!1,urlConfig:[{id:"noglobals",label:"Check for Globals",tooltip:"Enabling this will test if any test introduces new properties on the `window` object. Stored as query-strings."},{id:"notrycatch",label:"No try-catch",tooltip:"Enabling this will run tests outside of a try-catch block. Makes debugging exceptions in IE reasonable. Stored as query-strings."}],modules:{},begin:[],done:[],log:[],testStart:[],testDone:[],moduleStart:[],moduleDone:[]},function(){var b,c,d=a.location||{search:"",protocol:"file:"},e=d.search.slice(1).split("&"),f=e.length,g={};if(e[0])for(b=0;b"+f(document.title)+"

    "),a=r("qunit-tests"),b=r("qunit-banner"),c=r("qunit-testresult"),a&&(a.innerHTML=""),b&&(b.className=""),c&&c.parentNode.removeChild(c),a&&(c=document.createElement("p"),c.id="qunit-testresult",c.className="result",a.parentNode.insertBefore(c,a),c.innerHTML="Running...
     ")},reset:function(){var a=r("qunit-fixture");a&&(a.innerHTML=y.fixture)},is:function(a,b){return w.objectType(b)===a},objectType:function(a){if(void 0===a)return"undefined";if(null===a)return"null";var b=C.call(a).match(/^\[object\s(.*)\]$/),c=b&&b[1]||"";switch(c){case"Number":return isNaN(a)?"nan":"number";case"String":case"Boolean":case"Array":case"Date":case"RegExp":case"Function":return c.toLowerCase()}return"object"==typeof a?"object":void 0},push:function(a,b,c,d){if(!y.current)throw new Error("assertion outside test context, was "+e());var g,h,i={module:y.current.module,name:y.current.testName,result:a,message:d,actual:b,expected:c};d=f(d)||(a?"okay":"failed"),d=""+d+"",g=d,a||(c=f(w.jsDump.parse(c)),b=f(w.jsDump.parse(b)),g+="",b!==c&&(g+="",g+=""),h=e(),h&&(i.source=h,g+=""),g+="
    Expected:
    "+c+"
    Result:
    "+b+"
    Diff:
    "+w.diff(c,b)+"
    Source:
    "+f(h)+"
    "),t("log",w,i),y.current.assertions.push({result:!!a,message:g})},pushFailure:function(a,b,c){if(!y.current)throw new Error("pushFailure() assertion outside test context, was "+e(2));var d,g={module:y.current.module,name:y.current.testName,result:!1,message:a};a=f(a)||"error",a=""+a+"",d=a,d+="",c&&(d+=""),b&&(g.source=b,d+=""),d+="
    Result:
    "+f(c)+"
    Source:
    "+f(b)+"
    ",t("log",w,g),y.current.assertions.push({result:!1,message:d})},url:function(b){b=l(l({},w.urlParams),b);var c,d="?";for(c in b)D.call(b,c)&&(d+=encodeURIComponent(c)+"="+encodeURIComponent(b[c])+"&");return a.location.protocol+"//"+a.location.host+a.location.pathname+d.slice(0,-1)},extend:l,id:r,addEvent:m,addClass:p,hasClass:o,removeClass:q}),l(w.constructor.prototype,{begin:s("begin"),done:s("done"),log:s("log"),testStart:s("testStart"),testDone:s("testDone"),moduleStart:s("moduleStart"),moduleDone:s("moduleDone")}),G.document&&"complete"!==document.readyState||(y.autorun=!0),w.load=function(){t("begin",w,{});var b,c,d,e,g,h,i,j,k,o,p,q,s,u=0,v=[],x="",z="",A=l({},y);for(w.init(),l(y,A),y.blocking=!1,g=y.urlConfig.length,d=0;d";for(d in y.modules)y.modules.hasOwnProperty(d)&&v.push(d);for(u=v.length,v.sort(function(a,b){return a.localeCompare(b)}),x+="",k=r("qunit-userAgent"),k&&(k.innerHTML=navigator.userAgent),b=r("qunit-header"),b&&(b.innerHTML=""+b.innerHTML+" "),j=r("qunit-testrunner-toolbar"),j&&(c=document.createElement("input"),c.type="checkbox",c.id="qunit-filter-pass",m(c,"click",function(){var a,b=r("qunit-tests");c.checked?b.className=b.className+" hidepass":(a=" "+b.className.replace(/[\n\t\r]/g," ")+" ",b.className=a.replace(/ hidepass /," ")),G.sessionStorage&&(c.checked?sessionStorage.setItem("qunit-filter-passed-tests","true"):sessionStorage.removeItem("qunit-filter-passed-tests"))}),(y.hidepassed||G.sessionStorage&&sessionStorage.getItem("qunit-filter-passed-tests"))&&(c.checked=!0,i=r("qunit-tests"),i.className=i.className+" hidepass"),j.appendChild(c),e=document.createElement("label"),e.setAttribute("for","qunit-filter-pass"),e.setAttribute("title","Only show tests and assertions that fail. Stored in sessionStorage."),e.innerHTML="Hide passed tests",j.appendChild(e),p=document.createElement("span"),p.innerHTML=z,q=p.getElementsByTagName("input"),n(q,"click",function(b){var c={},d=b.target||b.srcElement;c[d.name]=!!d.checked||void 0,a.location=w.url(c)}),j.appendChild(p),u>1&&(s=document.createElement("span"),s.setAttribute("id","qunit-modulefilter-container"),s.innerHTML=x,m(s.lastChild,"change",function(){var b=s.getElementsByTagName("select")[0],c=decodeURIComponent(b.options[b.selectedIndex].value);a.location=w.url({module:""===c?void 0:c,filter:void 0,testNumber:void 0})}),j.appendChild(s))),h=r("qunit-fixture"),h&&(y.fixture=h.innerHTML),y.autostart&&w.start()},G.document&&m(a,"load",w.load),z=a.onerror,a.onerror=function(a,b,d){var e=!1;if(z&&(e=z(a,b,d)),!0!==e){if(w.config.current){if(w.config.current.ignoreGlobalErrors)return!0;w.pushFailure(a,b+":"+d)}else w.test("global failure",l(function(){w.pushFailure(a,b+":"+d)},{validTest:c}));return!1}return e},v.count=0,v.prototype={init:function(){var a,b,c,d=r("qunit-tests");d&&(b=document.createElement("strong"),b.innerHTML=this.nameHtml,a=document.createElement("a"),a.innerHTML="Rerun",a.href=w.url({testNumber:this.testNumber}),c=document.createElement("li"),c.appendChild(b),c.appendChild(a),c.className="running",c.id=this.id="qunit-test-output"+A++,d.appendChild(c))},setup:function(){if(this.module===y.previousModule&&D.call(y,"previousModule")||(D.call(y,"previousModule")&&t("moduleDone",w,{name:y.previousModule,failed:y.moduleStats.bad,passed:y.moduleStats.all-y.moduleStats.bad,total:y.moduleStats.all}),y.previousModule=this.module,y.moduleStats={all:0,bad:0},t("moduleStart",w,{name:this.module})),y.current=this,this.testEnvironment=l({setup:function(){},teardown:function(){}},this.moduleTestEnvironment),this.started=+new E,t("testStart",w,{name:this.testName,module:this.module}),w.current_testEnvironment=this.testEnvironment,y.pollution||i(),y.notrycatch)return void this.testEnvironment.setup.call(this.testEnvironment,w.assert);try{this.testEnvironment.setup.call(this.testEnvironment,w.assert)}catch(a){w.pushFailure("Setup failed on "+this.testName+": "+(a.message||a),d(a,1))}},run:function(){y.current=this;var a=r("qunit-testresult");if(a&&(a.innerHTML="Running:
    "+this.nameHtml),this.async&&w.stop(),this.callbackStarted=+new E,y.notrycatch)return this.callback.call(this.testEnvironment,w.assert),void(this.callbackRuntime=+new E-this.callbackStarted);try{this.callback.call(this.testEnvironment,w.assert),this.callbackRuntime=+new E-this.callbackStarted}catch(a){this.callbackRuntime=+new E-this.callbackStarted,w.pushFailure("Died on test #"+(this.assertions.length+1)+" "+this.stack+": "+(a.message||a),d(a,0)),i(),y.blocking&&w.start()}},teardown:function(){if(y.current=this,y.notrycatch)return void 0===this.callbackRuntime&&(this.callbackRuntime=+new E-this.callbackStarted),void this.testEnvironment.teardown.call(this.testEnvironment,w.assert);try{this.testEnvironment.teardown.call(this.testEnvironment,w.assert)}catch(a){w.pushFailure("Teardown failed on "+this.testName+": "+(a.message||a),d(a,1))}j()},finish:function(){y.current=this,y.requireExpects&&null===this.expected?w.pushFailure("Expected number of assertions to be defined, but expect() was not called.",this.stack):null!==this.expected&&this.expected!==this.assertions.length?w.pushFailure("Expected "+this.expected+" assertions, but "+this.assertions.length+" were run",this.stack):null!==this.expected||this.assertions.length||w.pushFailure("Expected at least one assertion, but none were run - call expect(0) to accept zero assertions.",this.stack);var b,c,d,e,f,g,h,i=this,j=0,k=0,l=r("qunit-tests");if(this.runtime=+new E-this.started,y.stats.all+=this.assertions.length,y.moduleStats.all+=this.assertions.length,l){for(h=document.createElement("ol"),h.className="qunit-assert-list",b=0;b("+k+", "+j+", "+this.assertions.length+")",m(e,"click",function(){var a=e.parentNode.lastChild;(o(a,"qunit-collapsed")?q:p)(a,"qunit-collapsed")}),m(e,"dblclick",function(b){var c=b&&b.target?b.target:a.event.srcElement;"span"!==c.nodeName.toLowerCase()&&"b"!==c.nodeName.toLowerCase()||(c=c.parentNode),a.location&&"strong"===c.nodeName.toLowerCase()&&(a.location=w.url({testNumber:i.testNumber}))}),f=document.createElement("span"),f.className="runtime",f.innerHTML=this.runtime+" ms",g=r(this.id),g.className=k?"fail":"pass",g.removeChild(g.firstChild),d=g.firstChild,g.appendChild(e),g.appendChild(d),g.appendChild(f),g.appendChild(h)}else for(b=0;b"+f(b)+"",a||(c=e(2))&&(d.source=c,b+="
    Source:
    "+f(c)+"
    "),t("log",w,d),y.current.assertions.push({result:a,message:b})},equal:function(a,b,c){w.push(b==a,a,b,c)},notEqual:function(a,b,c){w.push(b!=a,a,b,c)},propEqual:function(a,b,c){a=I(a),b=I(b),w.push(w.equiv(a,b),a,b,c)},notPropEqual:function(a,b,c){a=I(a),b=I(b),w.push(!w.equiv(a,b),a,b,c)},deepEqual:function(a,b,c){w.push(w.equiv(a,b),a,b,c)},notDeepEqual:function(a,b,c){w.push(!w.equiv(a,b),a,b,c)},strictEqual:function(a,b,c){w.push(b===a,a,b,c)},notStrictEqual:function(a,b,c){w.push(b!==a,a,b,c)},throws:function(a,b,c){var d,e=b,f=!1;"string"==typeof b&&(c=b,b=null),y.current.ignoreGlobalErrors=!0;try{a.call(y.current.testEnvironment)}catch(a){d=a}y.current.ignoreGlobalErrors=!1,d?(b?"regexp"===w.objectType(b)?f=b.test(H(d)):d instanceof b?f=!0:!0===b.call({},d)&&(e=null,f=!0):(f=!0,e=null),w.push(f,d,e,c)):w.pushFailure(c,null,"No exception was thrown.")}},l(w.constructor.prototype,x),w.constructor.prototype.raises=function(){w.push(!1,!1,!1,"QUnit.raises has been deprecated since 2012 (fad3c1ea), use QUnit.throws instead")},w.constructor.prototype.equals=function(){w.push(!1,!1,!1,"QUnit.equals has been deprecated since 2009 (e88049a0), use QUnit.equal instead")},w.constructor.prototype.same=function(){w.push(!1,!1,!1,"QUnit.same has been deprecated since 2009 (e88049a0), use QUnit.deepEqual instead")},w.equiv=function(){function a(a,b,c){var d=w.objectType(a);if(d)return"function"===w.objectType(b[d])?b[d].apply(b,c):b[d]}var b,c=[],d=[],e=[],f=Object.getPrototypeOf||function(a){return a.__proto__},g=function(){function a(a,b){return a instanceof b.constructor||b instanceof a.constructor?b==a:b===a}return{string:a,boolean:a,number:a,null:a,undefined:a,nan:function(a){return isNaN(a)},date:function(a,b){return"date"===w.objectType(a)&&b.valueOf()===a.valueOf()},regexp:function(a,b){return"regexp"===w.objectType(a)&&b.source===a.source&&b.global===a.global&&b.ignoreCase===a.ignoreCase&&b.multiline===a.multiline&&b.sticky===a.sticky},function:function(){var a=c[c.length-1];return a!==Object&&void 0!==a},array:function(a,c){var f,g,h,i,j,k;if("array"!==w.objectType(a))return!1;if((h=c.length)!==a.length)return!1;for(d.push(c),e.push(a),f=0;f":"\n":this.HTML?" ":" "},indent:function(a){if(!this.multiline)return"";var b=this.indentChar;return this.HTML&&(b=b.replace(/\t/g," ").replace(/ /g," ")),new Array(this.depth+(a||0)).join(b)},up:function(a){this.depth+=a||1},down:function(a){this.depth-=a||1},setParser:function(a,b){this.parsers[a]=b},quote:a,literal:b,join:c,depth:1,parsers:{window:"[Window]",document:"[Document]",error:function(a){return'Error("'+a.message+'")'},unknown:"[Unknown]",null:"null",undefined:"undefined",function:function(a){var b="function",d="name"in a?a.name:(e.exec(a)||[])[1];return d&&(b+=" "+d),b+="( ",b=[b,w.jsDump.parse(a,"functionArgs"),"){"].join(""),c(b,w.jsDump.parse(a,"functionCode"),"}")},array:d,nodelist:d,arguments:d,object:function(a,b){var d,e,f,g,h=[];w.jsDump.up(),d=[];for(e in a)d.push(e);for(d.sort(),g=0;g",g=a.nodeName.toLowerCase(),h=e+g,i=a.attributes;if(i)for(c=0,b=i.length;c0;c--)null!=b[c].text&&null==b[c-1].text&&b[c].row>0&&null==a[b[c].row-1].text&&b[c-1]==a[b[c].row-1]&&(b[c-1]={text:b[c-1],row:b[c].row-1},a[b[c].row-1]={text:a[b[c].row-1],row:c-1});return{o:a,n:b}}return function(b,c){b=b.replace(/\s+$/,""),c=c.replace(/\s+$/,"");var d,e,f="",g=a(""===b?[]:b.split(/\s+/),""===c?[]:c.split(/\s+/)),h=b.match(/\s+/g),i=c.match(/\s+/g);if(null==h?h=[" "]:h.push(" "),null==i?i=[" "]:i.push(" "),0===g.n.length)for(d=0;d"+g.o[d]+h[d]+"";else{if(null==g.n[0].text)for(c=0;c"+g.o[c]+h[c]+"";for(d=0;d"+g.n[d]+i[d]+"";else{for(e="",c=g.n[d].row+1;c"+g.o[c]+h[c]+"";f+=" "+g.n[d].text+i[d]+e}}return f}}(),void 0!==a&&(l(a,w.constructor.prototype),a.QUnit=w),"undefined"!=typeof module&&module.exports&&(module.exports=w)}(function(){return this}()),function(){this.getInjector=function(){return angular.injector(["ng","sideBySide"])}}.call(this),function(){var a,b,c,d;c={},a={},b={},module("filter",{setup:function(){var b;return b=getInjector(),c=b.get("poems"),a=b.get("filter")}}),d=function(){return b.poe={meta:{Active:!1,Author:"Edgar Allan Poe",Title:"The Raven",Year:"1845",Language:"English",Code:"poe"}},b.vrch={meta:{Active:!1,Author:"Jaroslav Vrchlický",Title:"Havran",Year:"1845",Language:"Czech",Code:"vrch"}},b.muz={meta:{Active:!1,Author:"Augustin Eugen Mužík",Title:"Havran",Year:"1885",Language:"Czech",Code:"muz"}},b.dolu={meta:{Active:!1,Author:"Karel Dostál Lutinov",Title:"Havran",Year:"1918",Language:"Czech",Code:"dolu"}},c.all=[b.poe,b.vrch,b.muz,b.dolu]},test("get filter for poems that share a common property",function(){return d(),b.dolu.meta.Active=!0,b.vrch.meta.Active=!0,b.muz.meta.Active=!0,a.update(),deepEqual(a.getFilter(),{Language:["Czech"]})}),test("get filter for arbitrary poems using shortest key",function(){return d(),b.vrch.meta.Active=!0,b.muz.meta.Active=!0,a.update(),deepEqual(a.getFilter(),{Code:["vrch","muz"]})}),test("set filter",function(){return d(),b.vrch.meta.Active=!0,a.update(),a.setFilter({Language:["English"]}),equal(b.vrch.meta.Active,!1),equal(b.poe.meta.Active,!0),deepEqual(a.getFilter(),{Code:["poe"]})})}.call(this),function(){var a,b;a={},module("poems",{setup:function(){return a=getInjector().get("poems")}}),b=function(){return a.all=[{meta:{Active:!0},content:[{section:"1",text:"one"}]},{meta:{Active:!1},content:[{section:"2",text:"two"}]},{meta:{Active:!0},content:[{section:"3",text:"three"}]},{meta:{},content:[{section:"4",text:"four"}]}]},test("has default content",function(){var b;return b=a.getActive(),equal(b[0].content[0].text,"Please be patient!"),equal(b[0].content[0].section,"Loading...")}),test("gets active",function(){var c;return b(),c=a.getActive(),equal(c[0].content[0].section,"1"),equal(c[1].content[0].section,"3")}),test("gets inactive",function(){var c;return b(),c=a.getInactive(),equal(c[0].content[0].section,"2"),equal(c[1].content[0].section,"4")})}.call(this),function(){var a,b;a={},module("route",{}),b=function(b,c,d){return null==b&&(b="http://example.com"),null==c&&(c="/base:asdf/section:7"),null==d&&(d="#test"),angular.module("sideBySide").service("$location",function(){return this.path=function(){return c},this.url=function(){return c+d},this.absUrl=function(){return b+c+d},this}),a=getInjector().get("route")},test("has app url",function(){return b(),equal(a.appUrl,"http://example.com")}),test("gets parameters",function(){return b(),equal(a.get(),"base:asdf/section:7")}),test("gets base dir",function(){return b(),equal(a.getBaseDir(),"http://example.com/asdf/")}),test("gets more complicated base dir",function(){return b("http://example.com/path/#","/base:test.this",""),equal(a.getBaseDir(),"http://example.com/path/test/this/")}),test("updates parameters",function(){return b(),a.update("base","zxcv"),equal(a.get(),"base:zxcv/section:7")}),test("adds parameter",function(){return b("http://example.com","/base:asdf"),a.update("section","1"),equal(a.get(),"base:asdf/section:1")}),test("processes arrays from url",function(){return b("http://example.com","/display:Language:Czech,English",""),deepEqual(a.params,{base:"",display:{Language:["Czech","English"]}})}),test("adds base before section",function(){return b("http://example.com","/section:7",""),a.update("base","the_raven"),equal(a.get(),"base:the_raven/section:7")}),test("works with hash url",function(){return b("http://example.com/#","/base:asdf",""),deepEqual(a.appUrl,"http://example.com"),deepEqual(a.params,{base:"asdf"})})}.call(this),function(){var a,b,c,d,e;e={},b={},a={},d={},c={},module("transformer",{setup:function(){return e=getInjector().get("transformer"),b={meta:{Title:"Ten Commandments",Author:"God knows"},content:[{section:"1",text:"Thou shalt have no other gods before me"},{section:"2",text:"Thou shalt not take the name of the Lord thy God in vain"},{section:"3",text:"Remember the sabbath day, to keep it holy"}]},a={meta:{Title:"Desatero",Author:"Ví bůh"},content:[{section:"1",text:"V jednoho Boha věřiti budeš."},{section:"2",text:"Nevezmeš jména Božího nadarmo."},{section:"3",text:"Pomni, abys den sváteční světil."}]},d={meta:{Title:"Dekalog",Author:"Bóg wie"},content:[{section:"1",text:"Nie będziesz miał bogów cudzych przede mną."},{section:"2",text:"Nie będziesz wzywał imienia Boga twego nadaremno."},{section:"3",text:"Pamiętaj, abyś dzień święty święcił."}]},c={meta:[{Title:"Ten Commandments",Author:"God knows"},{Title:"Desatero",Author:"Ví bůh"},{Title:"Dekalog",Author:"Bóg wie"}],verses:[[{section:"1",text:"Thou shalt have no other gods before me"},{section:"1",text:"V jednoho Boha věřiti budeš."},{section:"1",text:"Nie będziesz miał bogów cudzych przede mną."}],[{section:"2",text:"Thou shalt not take the name of the Lord thy God in vain"},{section:"2",text:"Nevezmeš jména Božího nadarmo."},{section:"2",text:"Nie będziesz wzywał imienia Boga twego nadaremno."}],[{section:"3",text:"Remember the sabbath day, to keep it holy"},{section:"3",text:"Pomni, abys den sváteční světil."},{section:"3",text:"Pamiętaj, abyś dzień święty święcił."}]]}}}),test("transforms",function(){return deepEqual(e([b,a,d]),c)}),test("transforms with 2 items",function(){return c.meta=c.meta.slice(0,2),c.verses=_.map(c.verses,function(a){return a.slice(0,2)}),deepEqual(e([b,a]),c)}),test("throws error on no param",function(){return throws(function(){return e()},/no poems found/i)}),test("throws error on empty array",function(){return throws(function(){return e([])},/no poems found/i)}),test("throws error on poem being too short",function(){return a.content.pop(),throws(function(){return e([b,a,d])},/missing.*nevezmeš jména/i)}),test("throws error on poem being too long",function(){return a.content.pop(),d.content.pop(),throws(function(){return e([b,a,d])},/superfluous.*sabbath/i)}),test("throws error on poems too short plus different lengths",function(){return a.content.pop(),d.content.pop(),d.content.pop(),throws(function(){return e([b,a,d])},/missing.*bogów cudzych.*nevezmeš/i)})}.call(this),function(){var a;a={},module("reader factory",{setup:function(){return a=getInjector().get("readerFactory")}}),test("reads markdown",function(){return ok(a("somefile.md")),ok(a("otherfile.markdown"))}),test("reads json",function(){return ok(a("fried.json"))}),test("doesn't read doc",function(){return throws(function(){return a("microsoft.doc")},/unknown/i)})}.call(this),function(){var a;a={},module("json reader",{setup:function(){return a=getInjector().get("jsonReader")}}),test("loads poem",function(){ return deepEqual(a('{\n\tmeta: {\n\t\tTitle: "Test leading text"\n\t},\n\tcontent: [\n\t\t"

    This is leading text.

    ",\n\t\t{ section: "I", text: "

    First section.

    " },\n\t\t{ section: "II", text: "

    Second section.

    " },\n\t\t{ text: "

    Another section.

    " },\n\t],\n}'),{meta:{Title:"Test leading text"},content:[{section:"",text:"

    This is leading text.

    "},{section:"I",text:"

    First section.

    "},{section:"II",text:"

    Second section.

    "},{section:"",text:"

    Another section.

    "}]})})}.call(this),function(){var a;a={},module("markdown reader",{setup:function(){return a=getInjector().get("markdownReader")}}),test("loads poem with section numbers, paragraphs, and a list",function(){return deepEqual(a("Title: Universal Declaration of Human Rights\nAuthor: John Peters Humphrey\nDate: 1948\nSource: http://en.wikisource.org/wiki/Universal_Declaration_of_Human_Rights\n\n## 1\nAll human beings are born *free* and equal in dignity and rights...\n\n## 2\nEveryone is entitled to all the rights and freedoms...\n\nFurthermore, no distinction shall be made on the basis of...\n\n## 11.1\nEveryone charged with a penal offence has the right to be presumed...\n\n## 11.2\nNo one shall be held guilty of any penal offence...\n\n## 13\nEveryone is entitled to:\n\n- sex\n- drugs\n- rock & roll"),{meta:{Title:"Universal Declaration of Human Rights",Author:"John Peters Humphrey",Date:"1948",Source:'http://en.wikisource.org/wiki/Universal_Declaration_of_Human_Rights'},content:[{section:"1",text:"

    All human beings are born free and equal in dignity and rights…

    \n"},{section:"2",text:"

    Everyone is entitled to all the rights and freedoms…

    \n

    Furthermore, no distinction shall be made on the basis of…

    \n"},{section:"11.1",text:"

    Everyone charged with a penal offence has the right to be presumed…

    \n"},{section:"11.2",text:"

    No one shall be held guilty of any penal offence…

    \n"},{section:"13",text:"

    Everyone is entitled to:

    \n
      \n
    • sex
    • \n
    • drugs
    • \n
    • rock & roll
    • \n
    \n"}]})}),test("loads poem with leading text and mixed separators",function(){return deepEqual(a("Title: Test leading text and mixed separators\n\n**This** is leading text.\n# I\nFirst section.\n\n---\nSecond section."),{meta:{Title:"Test leading text and mixed separators"},content:[{section:"",text:"

    This is leading text.

    \n"},{section:"I",text:"

    First section.

    \n"},{section:"",text:"

    Second section.

    \n"}]})}),test("loads poem using a custom separator",function(){return deepEqual(a("Title: Separator test\nSeparator: heading\n\n# I\nFirst section.\n\n---\nSecond part.\n\n# II\nSecond section."),{meta:{Title:"Separator test",Separator:"heading"},content:[{section:"I",text:"

    First section.

    \n
    \n

    Second part.

    \n"},{section:"II",text:"

    Second section.

    \n"}]})})}.call(this);