/* jasmine-fixture - 1.2.2 * Makes injecting HTML snippets into the DOM easy & clean! * https://github.com/searls/jasmine-fixture */ (function(){var a,b=[].slice;!function(c){var d,e,f,g,h,i,j,k;return i=this,h=i.jasmineFixture,g=null!=(k=i.jasmine)?k.fixture:void 0,f=i.affix,j=function(a){return{inject:function(b,c){var d,e,f,g;for(g=[],e=0,f=a.length;f>e;e++)d=a[e],g.push(c=b(c,d));return g}}},i.jasmineFixture=function(b){var c,e,k,l,m;return e=function(a){return k.call(this,a,!0)},k=function(d,e){var f;return f=null,j(d.split(/[ ](?=[^\]]*?(?:\[|$))/)).inject(function(c,d){var g;return">"===d?c:(g=a(b,d),(e||f)&&g.appendTo(c),f||(f=g),g)},c(this)),f},m=function(){var a,b;return a=jasmine.fixture,i.jasmineFixture=h,null!=(b=i.jasmine)&&(b.fixture=g),i.affix=f,a},c=function(a){return null!=a.jquery?a:b("#jasmine_content").length>0?b("#jasmine_content"):b('
').appendTo("body")},l={affix:e,create:k,noConflict:m},d(l),l},d=function(a){var b;return null!=(b=i.jasmine)&&(b.fixture=a),c.fn.affix=i.affix=a.affix,afterEach(function(){return c("#jasmine_content").remove()})},c?e=i.jasmineFixture(c):i.affix=function(){var a;if(a=window.jQuery||window.$,null!=a)return e=i.jasmineFixture(a),affix.call.apply(affix,[this].concat(b.call(arguments)));throw new Error("jasmine-fixture requires jQuery to be defined at window.jQuery or window.$")}}(window.jQuery||window.$),a=function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y;return a=function(j,k,l,n,o){var p,q,r,s,t,v,x,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O;if(j.isPlainObject(k)?p=k.main:(p=k,k={main:p}),J=p,void 0===o&&(o={}),"!"===p.charAt(0)||j.isArray(l)){for(j.isArray(l)?E=p:(I=g(p,"!"),I=I.substring(I.indexOf(":")+1,I.length-1),E=i(p));"@"===E.charAt(0);)E=i("!for:!"+h(E,k));O=k,O.main=E,B=j(),"!for:"===p.substring(0,5)||j.isArray(l)?(!j.isArray(l)&&I.indexOf(":")>0&&(F=I.substring(0,I.indexOf(":")),I=I.substr(I.indexOf(":")+1)),q=j.isArray(l)?l:l[I],N=O.main,(j.isArray(q)||j.isPlainObject(q))&&j.map(q,function(b,c){var d;return O.main=N,void 0!==F&&(o[F]=c),j.isPlainObject(b)||(b={value:b}),d=a(j,O,b,n,o),0!==B.length?j.each(d,function(a,b){return B.push(b)}):void 0}),p=j.isArray(l)?"":p.substr(I.length+6+E.length)):"!if:"===p.substring(0,4)&&(L=f("!"+I+"!",l,o),("undefined"!==L||"false"!==L||""!==L)&&(B=a(j,O,l,n,o)),p=p.substr(I.length+5+E.length)),k.main=p}else if("("===p.charAt(0))K=g(p,"(",")"),G=K.substring(1,K.length-1),p=p.substr(K.length),O=k,O.main=G,B=a(j,O,l,n,o);else{if(A=p.match(y),r=A[0],0===r.length)return"";if(r.indexOf("@")>=0)return p=h(p,k),O=k,O.main=p,a(j,O,l,n,o);r=f(r,l,o),t=e(j,r),u.test(r)&&(x=u.exec(r)[1]),s=d(r,l),z="{"===r.charAt(0)?"span":"div","#"!==p.charAt(0)&&"."!==p.charAt(0)&&"{"!==p.charAt(0)&&(z=w.exec(r)[1]),-1!==r.search(m)&&(v=r.match(m)[1]),s=j.extend(s,{id:x,"class":t,html:v}),B=j("<"+z+">",s),B.attr(s),B=c(r,B,n),B=b(r,B,l),p=p.substr(A[0].length),k.main=p}return p.length>0&&(">"===p.charAt(0)&&("("===p.charAt(1)?(N=g(p.substr(1),"(",")"),p=p.substr(N.length+1)):"!"===p.charAt(1)?(I=g(p.substr(1),"!"),E=i(p.substr(1)),N=I+E,p=p.substr(N.length+1)):(H=Math.max(p.indexOf("+"),p.length),N=p.substring(1,H),p=p.substr(H)),O=k,O.main=N,D=j(a(j,O,l,n,o)),D.appendTo(B)),"+"===p.charAt(0)&&(O=k,O.main=p.substr(1),C=a(j,O,l,n,o),j.each(C,function(a,b){return B.push(b)}))),M=B},b=function(a,b,c){var d,e,f;if(0===a.search(q))return b;if(d=a.match(q),null===d)return b;for(e=0;e0||a.indexOf("!if:")>0?a:("!"!==a.charAt(0)&&(d=a.charAt(0),a=a.substring(2,a.length-1)),e=new Function("data","indexes","var r=undefined;with(data){try{r="+a+";}catch(e){}}with(indexes){try{if(r===undefined)r="+a+";}catch(e){}}return r;"),f=unescape(e(b,c)),d+f)});return d=d.replace(/\\./g,function(a){return a.charAt(1)}),unescape(d)},g=function(a,b,c,d){var e,f;if(void 0===c&&(c=b),e=1,void 0===d&&(d=a.charAt(0)===b?1:0),0!==d){for(;d>0&&e