diff --git a/QUnit-Tests/js/scorm.bot.min.js b/QUnit-Tests/js/scorm.bot.min.js index 8ade6e5..81de4ff 100644 --- a/QUnit-Tests/js/scorm.bot.min.js +++ b/QUnit-Tests/js/scorm.bot.min.js @@ -1,5 +1,4 @@ - -var SCOBotUtil=function(){"use strict";var version="1.0.4",createDate="07/23/2013 03:23PM",modifiedDate="12/8/2014 02:16PM",isReady=false,types=["Boolean","Number","String","Function","Array","Date","RegExp","Object"],class_types=[],toString=Object.prototype.toString,hasOwn=Object.prototype.hasOwnProperty,h='HTMLEvents',k='KeyboardEvent',m='MouseEvents',eventTypes={load:h,unload:h,abort:h,error:h,select:h,change:h,submit:h,reset:h,focus:h,blur:h,resize:h,scroll:h,input:h,keyup:k,keydown:k,click:m,dblclick:m,mousedown:m,mouseup:m,mouseover:m,mousemove:m,mouseout:m,contextmenu:m},defaults={clientX:0,clientY:0,button:0,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false,bubbles:true,cancelable:true,view:document.defaultView,key:'',location:0,modifiers:'',repeat:0,locale:''},initializers={HTMLEvents:function(el,name,event,o){return event.initEvent(name,o.bubbles,o.cancelable);},CustomEvent:function(el,name,event,o){return event.initCustomEvent(name,o.bubbles,o.cancelable,o.detail);}},eventSplitter=/\s+/,len=types.length,self=this,checkLoaded=function(h){if(isReady){return;} +var SCOBotUtil=function(){"use strict";var version="1.0.4",createDate="07/23/2013 03:23PM",modifiedDate="01/03/2015 12:44PM",isReady=false,types=["Boolean","Number","String","Function","Array","Date","RegExp","Object"],class_types=[],toString=Object.prototype.toString,hasOwn=Object.prototype.hasOwnProperty,h='HTMLEvents',k='KeyboardEvent',m='MouseEvents',eventTypes={load:h,unload:h,abort:h,error:h,select:h,change:h,submit:h,reset:h,focus:h,blur:h,resize:h,scroll:h,input:h,keyup:k,keydown:k,click:m,dblclick:m,mousedown:m,mouseup:m,mouseover:m,mousemove:m,mouseout:m,contextmenu:m},defaults={clientX:0,clientY:0,button:0,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false,bubbles:true,cancelable:true,view:document.defaultView,key:'',location:0,modifiers:'',repeat:0,locale:''},initializers={HTMLEvents:function(el,name,event,o){return event.initEvent(name,o.bubbles,o.cancelable);},CustomEvent:function(el,name,event,o){return event.initCustomEvent(name,o.bubbles,o.cancelable,o.detail);}},eventSplitter=/\s+/,len=types.length,self=this,checkLoaded=function(h){if(isReady){return;} try{document.documentElement.doScroll("left");}catch(e){setTimeout(function(){checkLoaded(h);},0);return;} h();},type=function(o){return o==null?String(o):class_types[toString.call(o)]||"object";},isWindow=function(o){return o!=null&&o===o.window;},isElement=function(o){return(typeof HTMLElement==="object"?o instanceof HTMLElement:o&&typeof o==="object"&&o!==null&&o.nodeType===1&&typeof o.nodeName==="string");},isPlainObject=function(o){if(type(o)!=="object"||o.nodeType||isWindow(o)){return false;} return!(o.constructor&&!hasOwn.call(o.constructor.prototype,"isPrototypeOf"));},isArray=function(o){return(o instanceof Array)||(toString.apply(o)==='[object Array]');},isFunction=function(o){return type(o)==="function";},extend=function(o){var i=1,args=arguments,olen=args.length,key;while(i35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('V 6q=G(){"6A 6p";V 1v="1.0.4",5b="5t/23/bQ bP:8z",4L="12/8/5S bR:bS",7j=L,6R=["7I","bU","4w","bT","69","2J","9v","7Q"],6U=[],1r=7Q.7J.1r,aD=7Q.7J.3n,h=\'a7\',k=\'bN\',m=\'bI\',9A={aM:h,8e:h,bH:h,25:h,bG:h,bJ:h,bL:h,bW:h,c6:h,c9:h,cb:h,ca:h,c5:h,c4:k,bY:k,c0:m,c2:m,bi:m,bh:m,bl:m,bg:m,b9:m,b8:m},33={ba:0,bd:0,bc:0,bn:L,bz:L,bx:L,bD:L,7x:X,7y:X,bC:3W.bw,1b:\'\',20:0,bq:\'\',bp:0,bs:\'\'},9G={a7:G(el,1i,1S,o){x 1S.bt(1i,o.7x,o.7y)},9D:G(el,1i,1S,o){x 1S.cc(1i,o.7x,o.7y,o.cW)}},8f=/\\s+/,1z=6R.R,1l=N,7q=G(h){c(7j){x}4y{3W.aw.ay("cZ")}4j(e){9Z(G(){7q(h)},0);x}h()},1g=G(o){x o==1Q?4w(o):6U[1r.40(o)]||"2e"},4U=G(o){x o!=1Q&&o===o.1U},7P=G(o){x(22 a9==="2e"?o aF a9:o&&22 o==="2e"&&o!==1Q&&o.ap===1&&22 o.cV==="9d")},2M=G(o){c(1g(o)!=="2e"||o.ap||4U(o)){x L}x!(o.aC&&!aD.40(o.aC.7J,"cQ"))},2D=G(o){x(o aF 69)||(1r.4T(o)===\'[2e 69]\')},6V=G(o){x 1g(o)==="G"},46=G(o){V i=1,2i=9x,aA=2i.R,1b;1x(i=0){V 1V=1S.2c(\' \'),7t=1V.R;1x(7t--){3t(2h,1V[7t],3U)}}19{c(2h===1U||7P(2h)){c(2h.aq){c(1S==="87"){1S="de"}2h.aq(1S,3U,L)}19{c(1S==="87"){1S="av";3W.ax(1S,G(){c(3W.dj==="di"){3W.dc("av",2h);7j=X;3U()}});c(3W.aw.ay&&1U===1U.8u){7q(3U)}}19{2h.ax(\'2I\'+1S,3U)}}}19{46(2h,6z);2h.2I(1S,3U)}}},5s=G(7o){V 41=0,i=0,9C=7o.R;1x(i<9C){41+=7o[i].9i;i+=1}41=41/1z;x 41.co(2)},2n=G(2h,1i,2q){V 6d=3W,1S,51,4e;2q=2q||{};1m(4e 1F 33){c(33.3n(4e)){c(!2q.3n(4e)){2q[4e]=33[4e]}}}c(4U(2h)||7P(2h)){c(6d.9E){51=9A[1i]||\'9D\';1S=6d.9E(51);9G[51](2h,1i,1S,2q);4y{2h.cm(1S)}4j(5V){}}19{1S=6d.ch();2h.cj(\'2I\'+51,1S)}}19{4y{2h.7Z(1i,2q)}4j(5V){}}},86=G(1V,2i){V ev,i=-1,l=1V.R,a1=2i[0],a2=2i[1],a3=2i[2],al=2i.R;1o(al){A 0:1x(++i=0}G 8O(v){V 4P=2;x 1Y.4o(v*1Y.93(10,4P))/1Y.93(10,4P)}G 3x(16){V 1i,R=0;1m(1i 1F 16){c(16.3n(1i)){R+=1}}x R}G 95(){c(y.2a==="2L"){y.2H="8i"}}G 8q(){x 8O((y.1D.R/8L)*2w)+"%"}N.82=G(){x u.38===1&&u.3S===0};N.5B=G(){q.C(u.F+": bV...",3);c(u.y!==1Q){y=u.y;95()}19{y=u.8X}u.38=1;u.3S=0;x\'X\'};N.5A=G(1b){u.2f=0;V r="L",k=1b.1r(),13=[];c(N.82()){c(8Y(k)){q.C(u.F+": 4d "+k+" 1P 9g 4t",4);u.2f=4C;x"L"}13=k.6k().2c(".");1o(13[0]){A"y":r=8Z(k);J;A"9p":J;A"7C":J}x r}u.2f=92;x r};N.6T=G(1b,E){q.C(u.F+": 6T: "+1b+" = "+E,4);u.2f=0;V 13=[],k=1b.1r(),v=E.1r(),z=0,1a=0,15=[];c(N.82()){c(91(k)){q.C(u.F+": 4d "+k+" 1P 5D 4t",4);u.2f=4h;x"L"}13=k.2c(".");1o(13[0]){A"y":1o(1b){A"y.20":c(v.R>39){q.C(u.F+": cC 2V\'s cA 9N 2O 6Y as 1N\'aB 3A "+v.R+" 9O 32 cz K",2)}J;A"y.1e":c(1e.2G(\'|\'+v+\'|\')===-1){x 4m(1b,v)}J;A"y.2a":c(2a.2G(\'|\'+v+\'|\')===-1){x 4m(1b,v)}J;1q:1o(13[1]){A"34":u.2f="4h";u.2Y="3y y.34 5f 1P cw 5D 4t.";x\'L\';A"31":c(y.31.2F.2G(13[3])===-1){x 4m(1b,v)}3m(k.2A(4,k.R),v,y);y.31.1t=(3x(y.31)-2).1r();x\'X\';A"1p":c(y.1p.2F.2G(13[3])===-1){x 4m(1b,v)}y.1p.1t=(3x(y.1p)-2).1r();c(4V(1H(13[2],10))){x\'L\'}c(!1f.2M(y.1p[13[2]])){c(13[3]==="18"){y.1p[13[2]]={};3m(k.2A(4,k.R),v,y);y.1p.1t=(3x(y.1p)-2).1r();c(!1f.2M(y.1p[13[2]].1j)){q.C(u.F+": 90 1j 2e 1m 2b 2W",4);y.1p[13[2]].1j={};y.1p[13[2]].1j.1t="-1"}c(!1f.2M(y.1p[13[2]].1M)){q.C(u.F+": 90 5a 8t 2e 1m 2b 2W",4);y.1p[13[2]].1M={};y.1p[13[2]].1M.1t="-1"}x\'X\'}q.C("ce\'t cp 2W ar 4n cM!",3);x\'L\'}c(13[3]===\'1j\'){c(13[5]==="18"){1a=1H(y.1p[13[2]].1j.1t,10);z=1a;1x(z<1a){c(y.1p[13[2]].1j[z].18===v){x 9k(1b,v,z)}z+=1}}19{x 4m(1b,v)}3m(k.2A(4,k.R),v,y);y.1p[13[2]].1j.1t=(3x(y.1p[13[2]].1j)-1).1r();x\'X\'}c(13[3]===\'1M\'){3m(k.2A(4,k.R),v,y);y.1p[13[2]].1M.1t=(3x(y.1p[13[2]].1M)-1).1r()}3m(k.2A(4,k.R),v,y);y.1p.1t=(3x(y.1p)-2).1r();x\'X\';A"1j":c(13[3]==="18"){1a=1H(y.1j.1t,10);1x(z<1a){c(y.1j[z].18===v){u.2f="7a";u.2Y="3y 1j.18 5f 6u be 8H. 3y E \'"+v+"\' 4Y 4F 6s 30 1F 7g #"+z;x\'L\'}z+=1}}c(13[3]!=="18"){15=1H(13[2],10);c(y.1j[15]===2j){u.2f="9a";u.2Y="3y 1j.18 5f 6u be 30 dk 5d br a5 be 30";x\'L\'}}c(4V(1H(13[2],10))){x\'L\'}3m(k.2A(4,k.R),v,y);y.1j.1t=(3x(y.1j)-2).1r();x\'X\'}J}3m(k.2A(4,k.R),v,y);J;A"9p":J;A"7C":J}x"X"}c(u.3S){u.2f=8s}19{u.2f=8o}x"L"};N.3p=G(){q.C(u.F+": 3p 8d.\\bB 2g bA "+8q(),4);1f.2n(1l,\'5Q\',{1i:\'5Q\',bo:y});x\'X\'};N.72=G(){u.3S=1;u.38=0;x\'X\'};N.97=G(7G){c(7G!==""){V 7h=1H(7G,10);c(7f[7h]!==2j){x 7f[7h]}}x""};N.99=G(){x u.2f};N.9n=G(){x u.2Y}}G 8v(2q){"6A 6p";V 1f=6q,33={1v:"4.0.5",5b:"b2/bm/b1 5R:bk",4L:"12/5R/5S aU:8z",C:L,2v:L,9L:L,F:"8v",3F:"2L",1n:"3B",8n:X,aZ:L,1e:"4M",6W:"73",y:1Q,6C:[]},u=1f.46(33,2q),5W=0,25={0:"6h 3X",4h:"7p bE",4C:"bF 2I a 5D 4t c3"},14={3q:L,1v:"c1",1L:"",2u:L,K:{1e:u.1e,1n:u.1n,3F:u.3F},2v:u.2v},1l=N;u.25=25;u.6c={};G 4K(21,4f){1f.2n(1l,C,{21:21,4f:4f})}G C(21,4f){c(u.C){c(!1U.2K){1U.2K={};1U.2K.8w=4K;1U.2K.8a=4K;1U.2K.8y=4K;1U.2K.25=4K;1U.2K.bX=4K}1o(4f){A 1:2K.25(21);J;A 2:2K.8y(21);J;A 4:2K.8w(21);J;A 3:2K.8a(21);J;1q:2K.8a(21);x L}x X}c(4f<3&&u.9L){e5(21)}x L}G 6Q(29){V 89=0,2X=fJ;1x((!29.14&&!29.81)&&(29.5k)&&(29.5k!==29)&&(89<=2X)){89+=1;29=29.5k}c(29.81){14.1v="2N";14.2u=29.81}19 c(29.14){14.1v="1.2";14.2u=29.14}19{x L}x X}G 4c(n,8G){V U="P",1A=1Y.1C(n,0),56=0,3r=0,4l=0,2Z,4v;1A=1Y.4o(1A);c(8G===X){4l=1Y.3c(1A/6r)}19{56=1Y.3c(1A/7n);1A-=56*7n;3r=1Y.3c(1A/7l);1A-=3r*7l;4l=1Y.3c(1A/6r)}1A-=4l*6r;2Z=1Y.3c(1A/5c);1A-=2Z*5c;4v=1Y.3c(1A/58);1A-=4v*58;c(56>0){U+=56+"Y"}c(3r>0){U+=3r+"M"}c(4l>0){U+=4l+"D"}c((2Z>0)||(4v>0)||(1A>0)){U+="T";c(2Z>0){U+=2Z+"H"}c(4v>0){U+=4v+"M"}c(1A>0){U+=(1A/2w)+"S"}}c(U==="P"){U="7X"}x U}G 4b(n){V 2Z=1Y.3c(n/5c),1A=n-2Z*5c,3r=1Y.3c(1A/58),4Z,U;1A=1A-3r*58;4Z=1Y.3c(1A/2w);1A=1Y.3c(1A-4Z*2w);c(2Z>8F){2Z=8F}U="8P"+2Z+":";U=U.2A(U.R-5,5);c(3r<10){U+="0"}U+=3r+":";c(4Z<10){U+="0"}U+=4Z;c(1A>0){U+=".";c(1A<10){U+="0"}U+=1A}x U}G 6j(U){V aV=[0,0,0,0,0,0],3Z=!!((U.2G("P")!==0)),7R=L,aT=["Y","M","D","H","M","S"],p=0,i=0,1z;c(!3Z){U=U.2A(1);1z=aT.R;i=0;1x(i<1z){c(U.2G("T")===0){U=U.2A(1);i=1Y.1C(i,3);7R=X}p=U.2G(aT[i]);c(p>-1){c((i===1)&&(U.2G("T")>-1)&&(U.2G("T")2)&&(!7R)){3Z=X;J}U=U.2A(p+1)}i+=1}3Z=!!(((!3Z)&&(1z!==0)))}c(3Z){x 0}x aV[0]*7n+aV[1]*7l+aV[2]*6r+aV[3]*5c+aV[4]*58+1Y.4o(aV[5]*2w)}G 2t(n){x n<10?\'0\'+n:n}G 6H(n){V 5g=[];5g=n.2c(":");x 1Y.4o(5g[0]*fL)+(5g[1]*7M)+(5g[2]*39)}G 6D(3L){V h=3L.8A(),m=3L.8E(),s=3L.8D();x 2t(h)+":"+2t(m)+":"+2t(s)}G 6F(d){x d.fM()+\'-\'+2t(d.fI()+1)+\'-\'+2t(d.fH())+\'T\'+2t(d.fD())+\':\'+2t(d.fC())+\':\'+2t(d.fE())+"."+1Y.4o((d.fF()/39)%39)+\'Z\'}G 57(d){V 4E=d.7E()>0?\'-\':\'+\';x d.fG()+\'-\'+2t(d.fN()+1)+\'-\'+2t(d.fO())+\'T\'+2t(d.8A())+\':\'+2t(d.8E())+\':\'+2t(d.8D())+"."+1Y.4o((d.fW()/39)%39)+4E+2t(d.7E()/60)+\':8b\'}G 4I(U){V 7K=["fX","fY","fZ","fV","ac","fU","fQ","fP","fR","fS","fT","fB"],d,6v,4E=0,7N=0,dd,7D,m,5w,5M,7z;1o(u.6W){A"6O":7D=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\\.[0-9]*)?)?(?:([+\\-])([0-9]{2})([0-9]{2}))?/;m=7D.b7(U);c(m){5M=2J.6O(1H(m[1],10),1H(m[2],10)-1,1H(m[3],10),1H(m[4],10),1H(m[5],10),((m[6]&&1H(m[6],10))||0),((m[7]&&27(m[7])*39))||0);c(m[9]&&m[10]){7z=1H(m[9],10)*60+1H(m[10],10);5M+=(m[8]===\'+\'?-1:+1)*7z*7M}5w=2b 2J(5M)}19{5w=1Q}x 5w;A"73":d=U.5F(/(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))([\\+|\\-]\\d+:\\d+)/,G($0,$6o,$6g,$6i,$6m,$6n,$6x,$9c,$7w){4E=1H($7w.2o(1,$7w.R),10)*60;7N=$9c;x 7K[$6g-1]+" "+$6i+", "+$6o+" "+$6m+":"+$6n+":"+$6x});dd=2b 2J(d);6v=dd.7E();c(6v!==4E){dd=2b 2J(dd.3K()+(4E-6v)*7M);dd.fk(7N)}x dd;1q:d=U.5F(/(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})/,G($0,$6o,$6g,$6i,$6m,$6n,$6x){x 7K[$6g-1]+" "+$6i+", "+$6o+" "+$6m+":"+$6n+":"+$6x});dd=2b 2J(d);x dd}}G 3T(U){c(U===2j){C(u.F+" : 3T 42 fl 6t 9d, 9T 3l L",2);x L}c(U===X||U===L){x 7I(U)}1o(U.6k()){A"X":A"fm":A"1":x X;A"L":A"7A":A"0":A 1Q:x L;1q:x 7I(U)}}G 4p(n){C(25[n],2);x X}G 64(21){1f.2n(1l,\'6f\',{\'25\':21})}G 4i(){V 1u=14.2u,37=0;c(1u){1o(14.1v){A"1.2":37=1H(1u.fh(),10);J;A"2N":37=1H(1u.99(),10);J;1q:J}}x 37}G 3Q(n){V 1u=14.2u,1k=\'6h 2V 9e\';c(1u){1o(14.1v){A"1.2":1k=1u.fg(n.1r());J;A"2N":1k=1u.97(n.1r());J;1q:J}}x 4w(1k)}G 43(n){V 1u=14.2u,1k=\'6h 2V 9e\';c(1u){1o(14.1v){A"1.2":1k=1u.fc(n.1r());J;A"2N":1k=1u.9n(n.1r());J;1q:J}}x 4w(1k)}N.11=G(n){V v=1Q,1u=14.2u,ec=0,m=\'\',d=\'\',1h=1Q,13=[],2Q=L,4k=2b 2J(),7O;c(14.2v){1o(14.1v){A"1.2":1o(n){A"y.34.1t":A"y.34.2F":A"y.31.1t":A"y.31.2F":A"y.O.1B":A"y.1T":A"y.2U":2Q=X;J;A"y.4Q":1h="y.1G.4Q";J;A"y.20":1h="y.1G.8M";J;A"y.2H":1h="y.1G.2H";J;A"y.1L":1h="y.1G.8h";J;A"y.2a":1h="y.1G.2a";J;A"y.O.1K":1h="y.1G.O.1K";J;A"y.O.1I":1h="y.1G.O.1I";J;A"y.O.1C":1h="y.1G.O.1C";J;A"y.2p":1h="y.6b.8J";J;A"y.35":1h="y.6b.35";J;A"y.4W":1h="y.6b.4W";J;A"y.78":1h="y.1G.fb";J;A"y.7s":1h="y.1G.fd";J;A"y.3E.6B":1h="y.3D.8K";J;A"y.3E.5G":1h="y.3D.8S";J;A"y.3E.4B":1h="y.3D.4B";J;A"y.3E.5I":1h="y.3D.4R";J;A"y.1n":A"y.1e":1h="y.1G.8I";J;A"y.3h":1h="y.1G.3h";J;A"y.4H":1h="y.1G.4H";J;1q:13=n.2c(".");c(13[1]==="1p"){1o(13[2]){A"2F":A"1t":J;1q:c(!4V(1H(13[2],10))){1o(13[3]){A"1j":A"1M":J;1q:q.C(u.F+": fe y.1p."+13.1X(".")+" 1P a 9g-4t E. 9m 7B 2O 37.",2);x\'L\'}}}}c(13[1]==="1j"){1o(13[2]){A"2F":A"1t":J;1q:1o(13[3]){A"18":A"3M":J;A"1n":A"1e":13[3]=\'3M\';J;A"1T":A"28":2Q=X;J;A"O":c(13[4]==="1B"){2Q=X}J;1q:q.C(u.F+": 8U ff 3A 1F \'"+n+"\', 8V 8W 2O 37.",2);J}J}1h=13.1X(".")}19{1h=n}J}c(2Q){x\'L\'}v=1u.8R(1h);J;A"2N":v=1u.5A(n);J;1q:J}ec=4i();m=3Q(ec);d=43(ec);1f.2n(1l,\'11\',{\'n\':n,\'v\':v,\'25\':{\'37\':ec,\'3Y\':m,\'2Y\':d}});7O=2b 2J();u.6C.3g({9i:7O-4k,v:n});c(ec===0||ec===6E){c(v===\'2j\'||v===1Q||v===\'1Q\'){v=""}c(14.1v==="1.2"){c(v==="8P:8b:8b.0"){v=\'\'}}x 4w(v)}C(u.F+": 3X\\3d 5p: "+ec+"\\3d 5h: "+m+"\\5q: "+d,1);x\'L\'}C(u.F+": "+n+" 8Q 4N, 3q 1s 38! "+14.2v,2);x\'L\'};N.1c=G(n,v){V s=\'L\',1u=14.2u,ec=0,m=\'\',d=\'\',13=[],1h=1Q,2Q=L;c(14.2v){1o(14.1v){A"1.2":14.1L=14.1L===""?1u.8R(\'y.1G.8h\'):14.1L;c(14.1L==="3H"){1o(n){A"y.O.1B":A"y.1T":2Q=X;J;A"y.31.3G":c(v.R>8T){C(u.F+": 3V, 2C 3G 1P 53 2C 2X!!",2)}1h="y.aj";J;A"y.20":c(v.R>fn){C(u.F+": 3V, 2O 6Y 1P 53 2C 2X!!",2)}1h="y.1G.8M";J;A"y.1L":1h="y.1G.8h";J;A"y.2a":1h="y.1G.2a";c(v==="3H"){v=""}14.3F=v;J;A"y.O.1K":1h="y.1G.O.1K";J;A"y.O.1I":1h="y.1G.O.1I";J;A"y.O.1C":1h="y.1G.O.1C";J;A"y.1n":A"y.1e":1h="y.1G.8I";c(v==="3B"||v==="1s 5L"){2Q=X}14.K.1e=v;J;A"y.2p":1h="y.6b.8J";J;A"y.3E.6B":1h="y.3D.8K";J;A"y.3E.5G":1h="y.3D.8S";J;A"y.3E.4B":1h="y.3D.4B";J;A"y.3E.5I":1h="y.3D.4R";J;A"y.3h":1h="y.1G.3h";J;A"y.4H":1h="y.1G.4H";J;A"y.1D":c(v.R>8T){C(u.F+": 3V, 2O 2L K 1P 53 2C 2X!!",2)}1h=n;J;1q:13=n.2c(".");1o(13[1]){A"31":1o(13[3]){A"20":A"1E":x\'L\'}J;A"1p":c(13[2]===\'L\'){q.C(u.F+": 1J, 2C 2W 1a 42 \'L\', 9V I\'m fo 1N 3J fw N fx 2C 2V. fy 2C 37 fz 2W 1a.",2);x\'L\'}1o(13[3]){A"1E":13[3]="3s";J;A"3e":13[3]="a8";J;A"1g":c(v==="5e-3b-1F"||v==="5d"){q.C(u.F+": 1J, 70 fv 2O fu 1p. 6N.1Z() 32 \'1.2\' g1 1s fp 1g 32 "+v,2)}J;A"1k":c(v==="fr"){v="ao"}J;1q:J}1h=13.1X(".");J;A"1j":1o(13[3]){A"18":J;A"3M":A"1n":A"1e":13[3]=\'3M\';c(v==="3B"||v==="1s 5L"){2Q=X}J;A"1T":A"28":2Q=X;J;A"O":c(13[4]==="1B"){2Q=X}J;1q:q.C(u.F+": 8U E 3A 1F \'"+n+"\', 8V 8W 2O 37.",2);J}1h=13.1X(".");J;1q:1h=n;J}J}c(2Q){x\'L\'}s=1u.fs(1h,v)}19{C(u.F+": 3V, 1N 83 1s 1F 3H 1L. 8N \'30\' 5Z.",2);x\'L\'}J;A"2N":14.1L=14.1L===""?1u.5A(\'y.1L\'):14.1L;c(14.1L==="3H"){1o(n){A"y.20":c(v.R>39){C(u.F+": 3V, 2O 6Y 1P 53 2C 2X!!",2)}J;A"y.1e":14.K.1e=v;J;A"y.1n":14.K.1n=v;J;A"y.2a":14.K.3F=v;J;A"1D":c(v.R>8L){C(u.F+": 3V, 2O 2L K 1P 53 2C 2X!!",2)}J;1q:J}s=1u.6T(n,v)}19{C(u.F+": 3V, 1N 83 1s 1F 3H 1L. 8N \'30\' 5Z.",2);x\'L\'}J;1q:J}ec=4i();m=3Q(ec);d=43(ec);1f.2n(1l,\'1c\',{\'n\':n,\'v\':v,\'25\':{\'37\':ec,\'3Y\':m,\'2Y\':d}});c(ec===0||ec===6E){x s}C(u.F+": 3X\\3d 5p: "+ec+"\\3d 5h: "+3Q(ec)+" 1m "+n+"\\5q: "+43(ec),1);x s}C(u.F+": "+n+" 61 4N, 3q 1s 38! ft g0 1N 8d aa gc 1N 6K.",2);x\'L\'};N.5N=G(){V s=\'L\',1u=14.2u,ec=0,6e,94=2b 2J();u.6C=[];6e=(94.3K()-u.6c.3K())/39;c(14.2v){C(u.F+": gH K",3);1o(14.1v){A"1.2":1l.1c("y.1G.3h",4b(6e*2w));s=1u.gF("");J;A"2N":1l.1c("y.3h",4c(6e*2w,X));s=1u.3p("");J;1q:J}ec=4i();c(ec===0){x s}C(u.F+": 3X\\3d 5p: "+ec+"\\3d 5h: "+3Q(ec)+" 1m 3p.\\5q: "+43(ec),1);x\'L\'}C(u.F+": 3p 4N, 3q 1s 38!",2);x\'L\'};N.aS=G(){C(u.F+": 5B gt. \\n\\gy: "+u.1v+"\\n\\gA: "+u.4L,3);V s=L,1u=14.2u,ec=0;c(!14.2v){c(1u){1o(14.1v){A"1.2":s=3T(1u.gD(""));J;A"2N":s=3T(1u.5B(""));J;1q:J}ec=4i();C(\'>>>>>>>>>>>>>>>>>>>>>>>>>>\'+s+\'>>>>>>>>>>>>>>>>>>>>>>>>\',4);c(s&&ec===0){14.2v=X;14.K.1e=1l.11(\'y.1e\');u.6c=2b 2J();C(u.F+": 4g 1P 38.",3);1o(14.K.1e){A"1s 5L":A"3B":1l.1c("y.1e","4M");J;1q:c(14.K.1e===\'\'){64("2V gz 5X, 9m gB a gC. gx gu 1P 6t.")}J}x\'X\'}C(u.F+": 3X\\3d 5p: "+ec+"\\3d 5h: "+3Q(ec)+" 1m 5B.\\5q: "+43(ec),1)}19{C(u.F+": 4N, 2V gv 1s be gw!.",2)}}19{C(u.F+": 4N, 3q 4F 38!.",2)}x\'L\'};N.5x=G(){V s=L,1u=14.2u,ec=0;C(u.F+": gE "+14.2v+" "+1u,4);c(14.2v){c(1u){C(u.F+": 1e = "+14.K.1e+"|| 1n = "+14.K.1n,3);1l.5N();1o(14.1v){A"1.2":s=1u.gJ("");J;A"2N":s=1u.72("");J;1q:J}c(3T(s)){C(u.F+": 6K.",3);1f.2n(1l,\'3S\',{});14.2v=L}19{ec=4i();C(u.F+": 3X\\3d 5p: "+ec+"\\3d 5h: "+3Q(ec)+" 1m 3p.\\5q: "+43(ec),1)}}19{C(u.F+": gG 3q 3l 2V",2)}}19{C(u.F+": 72 4N, 3q 1s 38!",2)}x s};N.7k=G(18){V 1a=1l.11("y.1j.1t"),i,3o;q.C(u.F+": 61 4s - gr 48, 4s 1a 1P "+1a,4);c(1a===\'\'||1a===\'L\'||1a===\'-1\'){x\'L\'}1a=1H(1a,10)-1;i=1a;1x(i>=0){3o=1l.11("y.1j."+i+".18");c(18===3o){q.C(u.F+": 4s 4n g9 2I "+i,4);x i}i-=1}x\'L\'};N.5H=G(18){V 1a=1l.11("y.1p.1t"),i,3o;c(1a===""||1a===\'L\'||1a===\'-1\'){x\'L\'}c(14.1v==="1.2"){q.C(u.F+": 1J, 70 71 9b 5Z c 6N.1Z 1P 8x 3l 1.2",2);x 1a}1a=1H(1a,10)-1;q.C(u.F+": 6J 1p 3J 1a "+1a,4);i=1a;1x(i>=0){3o=N.11("y.1p."+i+".18");c(18===3o){q.C(u.F+": 6I 6G 4n 6y "+i);x i}i-=1}x\'L\'};N.aG=G(n,18){V 1a=1l.11("y.1p."+n+".1j.1t"),i,3o;c(1a===""||1a===\'L\'){x\'0\'}c(14.1v==="1.2"){q.C(u.F+": 1J, 70 71 9b 5Z c 6N.1Z 1P 8x 3l 1.2",2);x\'L\'}1a=1H(1a,10)-1;q.C(u.F+": 6J 2W 1j 3J 1a "+1a,4);i=1a;1x(i>=0){3o=1l.11("y.1p."+n+".1j."+i+".18");c(18===3o){q.C(u.F+": 6I 4s 6G 4n 6y "+i);x i}i-=1}x\'L\'};N.aH=G(n,2B){V 1a=1l.11("y.1p."+n+".1M.1t"),i,p;c(1a===""||1a===\'L\'){q.C(u.F+": 7L 7F 2B 42 6t 3P L",4);x\'0\'}1a=1H(1a,10)-1;q.C(u.F+": 6J 2W 5a 8t 3J 1a "+1a,4);i=1a;1x(i>=0){p=1l.11("y.1p."+n+".1M."+i+".2B");c(2B===p){q.C(u.F+": 6I 7L 7F 6G ga 6y "+i);x"59"}i-=1}x\'L\'};N.b3=G(){V 29;4y{29=1U.5k;c(29&&29!==1U){6Q(1U.5k)}}4j(e){C(u.F+" 8B 8C-8r 5X/84 1L (5V).",2)}c(!14.2u){4y{29=1U.8u.gb;6Q(29)}4j(ee){C(u.F+" 8B 8C-8r 5X/84 1L (5V).",2)}}c(14.2u){14.3q=X;x X}C(u.F+": I 42 g8 3l aE an 14 1m g7",2);c(u.8n){C(u.F+": aY 1N g3 g2 I\'g4 g5 2C 2V. aY 1s, aX g6 dl 9P gd.",4);u.aZ=X;14.1v="2N";14.2u=22 5T===\'G\'?2b 5T({y:u.y}):1Q;1f.3t(14.2u,\'5Q\',G(e){1f.2n(1l,\'5Q\',e)});x X}x L};N.ge=G(n){x 25[n]};N.gn=G(){x 14.3q};N.1Z=G(){x 14.1v};N.1R=G(){x 14.2v};N.go=G(){1f.5s(u.6C)};N.30=G(n,v){1o(n){A"1v":A"5b":A"4L":A"F":4p(4C);x L;A"2v":14.2v=v;u[n]=v;J;A"6c":u[n]=2b 2J(v);J;1q:u[n]=v;J}x(5W!==0)};N.3u=G(n){c(u[n]===2j){4p(4h);x L}x u[n]};N.4b=4b;N.4c=4c;N.6j=6j;N.6F=6F;N.57=57;N.4I=4I;N.6H=6H;N.6D=6D;N.3T=3T;N.C=C;N.b3()}G b5(2q){"6A 6p";V 1f=6q,33={1v:"4.0.5",5b:"b2/5t/b1 gq:gm",4L:"12/5R/5S aU:gg",F:"b5",3R:{},az:"gf",9w:"gh",9z:X,6l:X,gj:"gk",5l:"1n",20:"",9r:X,1D:{3O:[]},7V:L,8j:X,1L:"",2p:0.7,2U:0,35:\'\',4u:0,4r:0,7d:0},u=1f.46(33,2q),1d={1n:\'\',1e:\'\',2U:u.2U,1T:0,2p:u.2p,O:{1B:0,1K:0,1I:0,1C:0}},5i=L,5W=L,4q=L,aN=\'|1Q|2j|L|80|| |\',25=q.3u(\'25\'),1l=N;G ag(){5i=q.aS();q.C(u.F+": 4g fq 3J 1U.f9 "+5i,4);c(5i){1l.4k();1f.2n(1l,"aM")}x 5i}G 6w(){q.C(u.F+": 4g 1P dW dV, dX 2a ...",3);c(q.1R()){1f.2n(1l,"8e");1o(q.3u(\'3F\')){A"63":1l.63();J;A"2L":1l.2L();J;A"65":1l.65();J;1q:q.C(u.F+": 3B 2a 1g",2);J}q.C(u.F+": 4g 1P dY fa.",4)}x X}G 4p(n){q.C(25[n],2);x X}G 64(21){1f.2n(1l,\'6f\',{25:21})}G 1w(v){x aN.2G(\'|\'+v+\'|\')>=0}G 9Y(U){V aO=/[^\\f\\r\\n\\t\\v\\0\\s\\S\\w\\W\\d\\D\\b\\\\B\\\\cX\\\\dQ\\\\dR]/gi;x U.5F(aO,\'\')}G 55(v){V 5r;1o(q.3u(\'6W\')){A"6O":5r=/^(\\d{4})-0?(\\d+)-0?(\\d+)[T ]0?(\\d+):0?(\\d+):0?(\\d+)(?:\\.(\\d+))(|Z)$/;J;A"73":5r=/^(\\d{4})-0?(\\d+)-0?(\\d+)[T ]0?(\\d+):0?(\\d+):0?(\\d+)(?:\\.(\\d+))[\\+\\-]\\d{2}:\\d{2}$/;J;1q:5r=/^(\\d{4})-0?(\\d+)-0?(\\d+)[T ]0?(\\d+):0?(\\d+):0?(\\d+)$/;J}x 5r.6L(v)}G 9y(v){V aQ=/^(?:P)([^T]*)(?:T)?(.*)?$/;x aQ.6L(v)}G 1W(){q.C(u.F+": 7H ea\'t 40 \'4k()\' aP, 3P 1N 4F 3S, 71.",2);x\'L\'}G 7e(){x(2b 2J().3K())}G 2z(v,4P){V b4=27(v);x 27(b4.eb(4P))}G 47(1g,U){V 4O=0;1o(1g){A"2l":4O=/^\\{2l=.*?\\}/;J;A"2m":4O=/^\\{2m=.*?\\}/;J;A"2k":4O=/^\\{2k=.*?\\}/;J;1q:q.C(u.F+": 3I, N 1P 1s a ed e8 1g.",1);J}x 4O.b7(U)}G a0(){q.C("e7 e3!");V 6M=q.11(\'y.4W\').2c(\',\'),3Y=!!((6M[1]==="3Y"));c(3Y){1f.2n(1l,\'3Y\',{4R:"e2 e4 e6"})}q.30(\'3F\',"65");c(6M[0]==="2a"){6w()}19{1f.2n(1l,\'b6\')}}G 6a(1g,E){V U=\'\',76=\'\',i=0,15=[],75=[],1z,3z;1o(1g){A\'X-L\':E=E.1r().6k();c(E===\'X\'||E===\'L\'){c(q.1Z()==="1.2"){x E.2o(0,1)}x E}q.C(u.F+": 1J, 1N\'2E 1s 2d X 3P L 1m X-L. I 2x "+E+" 2s",1);x\'\';A\'67\':c(q.1Z()==="1.2"){c(1f.2D(E)){c(E.R>26&&u.6l){q.C(u.F+": 1J, 1N\'2E 2d a 41 32 74 6P aI 6S 2X 32 26 1m N 2B. dM du \'3k\' 2s.",2)}x E.1X(",")}q.C(u.F+": 1J, 1N\'2E 1s 2d a 3i 1g 1m 66/67. I 2x "+22 E+" 2s\\n"+4G.5z(E),1);E=\'\'}A\'66\':c(1f.2D(E)){3z=0;c(E.R>36&&u.6l){q.C(u.F+": 1J, 1N\'2E 2d a 41 32 74 6P aI 6S 2X 32 36 1m N 2B.",2);E=E.dt(0,36)}1m(3z 1F E){c(E.3n(3z)){c(E[3z].R>10&&u.6l){q.C(u.F+": 1J, 1N\'2E 2d 74 6P dw 6S 2X 32 10 9O. dx ds "+E[3z].R+". I 9P 9N N as 1s 3l dr K.",2);E[3z]=E[3z].2o(0,10)}}}U=q.1Z()==="1.2"?E.1X(","):E.1X("[,]");E=U}19{q.C(u.F+": 1J, 1N\'2E 1s 2d a 3i 1g 1m 66/67. I 2x "+22 E+" 2s\\n"+4G.5z(E),1);E=\'\'}x E;A\'3b-1F\':c(1f.2M(E)){c(E.2m!==2j){U+="{2m="+E.2m+"}"}c(E.2l!==2j){U+="{2l="+E.2l+"}"}c(E.2k!==2j){U+="{2k="+E.2k+"}"}c(1f.2D(E.5Y)){U+=E.5Y.1X("[,]")}19{q.C(u.F+": 1J, dn an 3i 32 dm(s) 1m 3b-1F. I 2x "+22 E.5Y+" 2s",1)}E=U}19{q.C(u.F+": 1J, 1N\'2E 1s 2d a 2e 1g 1m 3b 1F. I 2x "+22 E+" 2s",1);E=\'\'}x E;A\'5e-3b-1F\':c(1f.2M(E)){c(E.2m!==2j){U+="{2m="+E.2m+"}"}c(E.2k!==2j){U+="{2k="+E.2k+"}"}U+=E.4R;E=U}19{q.C(u.F+": 1J, 1N\'2E 1s 2d a 2e 1g 1m 5e 3b 1F. I 2x "+22 E+" 2s",1);E=\'\'}x E;A\'5P\':c(1f.2D(E)){1z=E.R;i=0;1x(i<1z){c(1f.2D(E[i])){15.3g(q.1Z()==="1.2"?E[i].1X("."):E[i].1X("[.]"))}19{q.C(u.F+": 1J, 1N\'2E 1s 2d a 3i 1g 1m 5P/3k. I 2x "+22 E+" 2s",1);x\'\'}i+=1}U=q.1Z()==="1.2"?15.1X(","):15.1X("[,]");E=U}19{q.C(u.F+": 1J, 1N\'2E 1s 2d a 3i 1g 1m 5P/3k. I 2x "+22 E+" 2s",1);E=\'\'}x E;A\'3k\':c(!1f.2D(E)){c(E.2l!==2j){U+="{2l="+E.2l+"}"}c(1f.2D(E.2S)){1z=E.2S.R;i=0;1x(i<1z){c(1f.2D(E.2S[i])){c(1f.2M(E.2S[i][1])){75=[2z(E.2S[i][1].1I,7),2z(E.2S[i][1].1C,7)];76=75.1X("[:]");E.2S[i][1]=76}15.3g(E.2S[i].1X("[.]"))}19{q.C(u.F+": 1J, 1N\'2E 1s 2d a 3i 1g 1m 3k 5a 3j. I 2x "+22(E.2S[i])+" 2s 2I "+i,1);q.C(E,1);x\'\'}i+=1}U+=15.1X("[,]")}19{q.C(u.F+": 1J, 1N\'2E 1s 2d a 3i 1g 1m 3k 5a 3j. I 2x "+22 E.2S+" 2s",1);q.C(E,1)}}19{c(1f.2D(E)){1z=E.R;i=0;1x(i<1z){c(1f.2D(E[i])){15.3g(E[i].1X("[.]"))}19{q.C(u.F+": 1J, 1N\'2E 1s 2d a 3i 1g 1m 3k 7m 3j. I 2x "+22 E[i]+" 2s 2I "+i,1);q.C(E,1);x\'\'}i+=1}U=15.1X("[,]")}19{q.C(u.F+": 1J, 1N\'2E 1s 2d a 3i 1g 1m 3k 7m 3j. I 2x "+22 E+" 2s",1);E=\'\'}}E=U;x E;A\'8c\':c(22 E==="9K"){U=E.1r()}19 c(1f.2M(E)){15=[2z(E.1I,7),2z(E.1C,7)];U=15.1X("[:]")}19{U=27(E);c(U==="80"){q.C(u.F+": 1J, 2O 1s 2d a 9K 1m a 8c 2W. I 2x "+E+" 2s",1)}U+=\'\'}x U;A\'9Q\':A\'5d\':x E.1r();1q:q.C(u.F+": 3I, 9R 2W 1g 9X 1m "+1g+" 2I "+E,1);x L}}G 7v(1g,E){V i=0,15=[],16={},1z,59=L;1o(1g){A\'X-L\':c(q.1Z()==="1.2"){x E==="t"?"X":"L"}x E;A\'67\':A\'66\':15=E.2c("[,]");E=15;x E;A\'3b-1F\':15=47(\'2m\',E);c(15!==1Q){c(15[0].48(/^\\{2m=(X|L)\\}$/)!==-1){16.2m=15[0].2o(\'{2m=\'.R,15[0].R-1);E=E.2o(15[0].R,E.R);q.C("=== A 5U"+E,4)}}15=47(\'2l\',E);c(15!==1Q){c(15[0].48(/^\\{2l=(X|L)\\}$/)!==-1){16.2l=15[0].2o(\'{2l=\'.R,15[0].R-1);E=E.2o(15[0].R,E.R);q.C("=== 9q 5U"+E,4)}}15=47(\'2k\',E);c(15!==1Q){c(15[0].48(/^\\{2k=.*?\\}$/)!==-1){16.2k=15[0].2o(\'{2k=\'.R,15[0].R-1);E=E.2o(15[0].R,E.R)}}16.5Y=E.2c("[,]");x 16;A\'5e-3b-1F\':15=47(\'2m\',E);c(15!==1Q){c(15[0].48(/^\\{2m=(X|L)\\}$/)!==-1){16.2m=15[0].2o(\'{2m=\'.R,15[0].R-1);E=E.2o(15[0].R,E.R);q.C("=== A 5U"+E,4)}}15=47(\'2k\',E);c(15!==1Q){c(15[0].48(/^\\{2k=.*?\\}$/)!==-1){16.2k=15[0].2o(\'{2k=\'.R,15[0].R-1);E=E.2o(15[0].R,E.R)}}16.4R=E;x 16;A\'5P\':15=E.2c("[,]");1z=15.R;i=0;1x(i<1z){15[i]=15[i].2c("[.]");i+=1}x 15;A\'3k\':15=47(\'2l\',E);c(15!==1Q){c(15[0].48(/^\\{2l=(X|L)\\}$/)!==-1){59=X;16.2l=15[0].2o(\'{2l=\'.R,15[0].R-1);E=E.2o(15[0].R,E.R);q.C("=== 9q 5U"+E,4)}}15=E.2c("[,]");1z=15.R;i=0;1x(i<1z){15[i]=15[i].2c("[.]");i+=1}c(59){16.2S=15;x 16}x 15;A\'8c\':A\'9Q\':A\'5d\':x E;1q:q.C(u.F+": 3I, 9R 2W 1g 9X 1m "+1g+" 2I "+E,1);x L}}G 7b(){V 1k,8k=9Y(4G.5z(u.1D)),K=u.7V?1U.dp(8k):8k;1k=q.1c(\'y.1D\',K);c(1k===\'X\'){q.C(u.F+": 7c 2g dq",4);q.C(u.1D,4);x\'X\'}x\'L\'}G 7r(){c(q.1R()){V 4X=0,85=0,i=0,1a;1d.1e=q.11(\'y.1e\');1d.1n=q.11(\'y.1n\');1d.O.1K=0;c(u.4u===0||u.4r===0){q.C(u.F+": 3I, I dy dz ad as 2C 4u 9V 3P 9S 83 dH",2);x\'L\'}1a=1H(q.11(\'y.1j.1t\'),10);q.C(u.F+": 9S dJ 1P "+1a);c(1a>0){1a=1a-1;i=1a;1x(i>=0){4X=27(q.11(\'y.1j.\'+i+\'.O.1K\'));q.C(u.F+\': 8g dK: \'+4X);c(!4V(4X)){1d.O.1K+=27(4X)}19{q.C(u.F+": dL 2x a 80 9T 1j."+i+".O.1K. 4d 79 be a dG/84 7g dF 2C dB.dA.",2)}c(q.11(\'y.1j.\'+i+\'.1e\')===\'45\'){85+=1}i-=1}}q.C(u.F+" a4 O "+q.1c(\'y.O.1K\',1d.O.1K.1r()));c((1d.O.1C-1d.O.1I)===0){q.C(u.F+": ai by ah 1m 3v - 3w "+1d.O.1C,2);q.1c(\'y.O.1B\',\'1\')}19{1d.O.1B=((1d.O.1K-1d.O.1I)/(1d.O.1C-1d.O.1I)).1r();q.C(u.F+": 8g af = "+1d.O.1B,3);q.1c(\'y.O.1B\',2z(1d.O.1B,7))}1d.1T=(85/u.4r).1r();q.1c(\'y.1T\',2z(1d.1T,7));1d.1e=(27(1d.1T)>=27(1d.2U))?\'45\':\'4M\';q.1c(\'y.1e\',1d.1e);q.C(u.F+": dC/dD 7B - dE 1B O:"+27(1d.O.1B)+" eg. "+27(1d.2p),3);1d.1n=(27(1d.O.1B)>=27(1d.2p))?\'3A\':\'8m\';q.1c(\'y.1n\',1d.1n);x{eS:1d.O.1B,1n:1d.1n,1T:1d.1T,1e:1d.1e}}x 1W()}G aJ(){c(q.1R()){V Q="y.34.",1a=q.11(Q+\'1t\'),3j=[],16={},i;c(!1w(1a)){x\'L\'}1a-=1;i=0;1x(i<=1a){Q+=i+\'.\';16.3G=q.11(Q+\'3G\');16.20=q.11(Q+\'20\');16.1E=q.11(Q+\'1E\');3j.3g(16);16={};i+=1}x 3j}x 1W()}G 8l(9I){V 7S=\'y.1n\',cs=\'y.1e\',5C=q.3u(\'1n\'),4S=q.3u(\'1e\'),5u=1l.11(7S),5J=1l.11(cs),7Y=L,5K=L;c(5u==="3A"||5u==="8m"){7Y=X}c(5J==="45"||5J==="4M"){5K=X}c(q.3u(\'3F\')===\'63\'||9I){c(5u!==5C&&!7Y){q.C(u.F+": 9H 1q eR 3M 3l "+5C,3);1l.1c(7S,5C)}c(q.1Z()==="1.2"&&u.5l==="1e"&&!5K){1l.1c(cs,4S)}19{c(5J!==4S&&!5K){q.C(u.F+": 9H 1q eU 3M 3l "+4S,3);1l.1c(cs,4S)}}}}N.4k=G(){V 5E=\'\',50=\'\',4z=\'\';q.C(u.F+": I am 9F...",3);c(!4q){4q=X;u.7d=7e();5E=q.11(\'y.3R\');c(u.9w==="eQ"){u.3R=4G.9s(5E)}19{5E.5F(2b 9v("([^?=&]+)(=([^&]*))?","g"),G($0,$1,$2,$3){u.3R[$1]=$3})}q.C(u.F+": eL 2g:",4);q.C(u.3R,4);u.1L=q.11(\'y.1L\');u.2H=q.11(\'y.2H\');c(u.1L==="eK"||u.2H===\'\'||u.2H===\'8i\'){q.C(u.F+": eM...",4);u.20=q.11(\'y.20\');u.1D=u.7V?1U.eN(q.11(\'y.1D\')):q.11(\'y.1D\');c(u.1D.R>0&&!1w(u.1D)){q.C(u.F+": 6y 2L K 2e 3J a eO eX",4);u.1D=u.9r?4G.9s(u.1D):u.1D;q.C(u.1D,4);c(u.2H===""){u.2H="8i"}}19{q.C(u.F+": 9t 2b 2L K 2e",4)}}19{q.C(u.F+": f5 3s f6 N 4g f7 2I 2V 2H E.",4);q.C(u.F+": 9t 2b 2L K 2e",4)}50=q.11(\'y.2U\');c(!1w(50)&&50!=="-1"){1d.2U=50}4z=q.11(\'y.2p\');c(!1w(4z)&&4z!=="-1"){c(27(4z>1)){1d.2p=((27(4z)*10)/39).1r()}u.2p=1d.2p}1d.1e=q.11(\'y.1e\');1d.1n=q.11(\'y.1n\');u.34=aJ();c(u.34!==\'L\'){1f.2n(1l,\'f8\',{K:u.34})}u.35=q.11(\'y.35\');c(9y(u.35)){c(u.9z){q.C(u.F+": 4d 4g 4Y a 30 3s, I am 9F 2C f4 1m "+u.35+"...");1l.9B()}}19{q.C(u.F+": 4d 1P 1s f3 3s eZ. "+u.35)}}19{q.C(u.F+": 7H 4F 8d 4k! I eY\'t f0 f1 f2 1F eJ N eI eq 3N.",2);x L}x X};N.ep=G(K){c(q.1R()){c(!1w(K.4u)){u.4u=K.4u}c(!1w(K.4r)){u.4r=K.4r}c(!1w(K.3w)){1d.O.1I=2z(K.3w,7);q.1c(\'y.O.1I\',1d.O.1I.1r())}c(!1w(K.3v)){1d.O.1C=2z(K.3v,7);q.1c(\'y.O.1C\',1d.O.1C.1r())}x\'X\'}x 1W()};N.9B=G(){V 3s=q.6j(u.35)*10;9Z(a0,3s)};N.C=q.C;N.11=q.11;N.1c=q.1c;N.er=G(){c(q.1R()){x u.1L}x 1W()};N.es=G(){c(q.1R()){x u.2H}x 1W()};N.et=G(v){c(q.1R()){u.20=v.1r();x q.1c(\'y.20\',u.20)}x 1W()};N.eo=G(){c(q.1R()){x u.20}x 1W()};N.en=7r;N.ei=G(18,7i,K){c(q.1R()){V i=0,1z=u.1D.3O.R;1x(i<1z){c(u.1D.3O[i].18===18){u.1D.3O[i].K=K;q.C(u.F+": 7c 2g 61",4);q.C(u.1D,4);x 7b()}i+=1}u.1D.3O.3g({\'18\':18,\'7i\':7i,\'K\':K});q.C(u.F+": 7c 2g 30:",4);q.C(u.1D,4);x 7b()}x 1W()};N.eh=G(18){c(q.1R()){V i=0,1z=u.1D.3O.R;1x(i<1z){c(u.1D.3O[i].18===18){x u.1D.3O[i].K}i+=1}x\'L\'}x 1W()};N.ej=G(){x u.7d-7e()};N.ek=G(K){c(q.1R()){V 1v=q.1Z(),n,m,i,j,p,Q=\'y.1p.\',2R,7u=K.1E||q.4I(q.11(Q+q.5H(K.18)+\'.1E\')),1E,1O,1k,1z,1b;c(!1f.2M(K)){q.C(u.F+": 1J, 2O 1s 2d a {2e} em!! eu "+22 K+" 2s.",1);x\'L\'}c(1w(K.18)){q.C(u.F+": 1J, 2O 2d a 2W ar a 4n\\ew eE:\\n"+K.28,1);1m(1b 1F K){c(K.3n(1b)){q.C("1b: "+1b+"\\n E: "+K[1b])}}x\'L\'}c(1f.1g(K.1E)==="3L"){1E=q.1Z()==="1.2"?q.6D(K.1E):q.57(K.1E)}K.1E=1E;c(1f.1g(K.1O)==="3L"){1O=(K.1O.3K()-7u.3K())*0.au;K.1O=q.1Z()==="1.2"?q.4b(1O*2w):q.4c(1O*2w,X)}19 c(K.3e.R>0&&!1w(K.3e)){K.1O=2b 2J();1O=(K.1O.3K()-7u.3K())*0.au;K.1O=q.1Z()==="1.2"?q.4b(1O*2w):q.4c(1O*2w,X)}2R=\'1t\';c(u.az==="eF"||1v==="1.2"){n=q.11(Q+2R)==="-1"?\'0\':q.11(Q+2R)}19{n=q.5H(K.18);c(1w(n)){n=q.11(Q+2R)==="-1"?\'0\':q.11(Q+2R)}}Q+=n+".";c(!1w(K.18)){1k=q.1c(Q+\'18\',K.18)}c(!1w(K.1g)){c(q.1Z()==="1.2"){1o(K.1g){A"5d":A"5e-3b-1F":K.1g="3b-1F";J;1q:J}}1k=q.1c(Q+\'1g\',K.1g)}2R=\'1j.1t\';c(K.1j!==2j){i=0;1z=K.1j.R;1x(i<1z){m=q.aG(n,K.1j[i].18);c(m===\'L\'){m=q.11(Q+2R)===\'-1\'?\'0\':q.11(Q+2R)}1k=q.1c(Q+\'1j.\'+m+\'.18\',K.1j[i].18);i+=1}}c(K.1E!==2j){c(1v!=="1.2"){1k=q.1c(Q+\'1E\',K.1E)}19{1k=q.1c(Q+\'3s\',K.1E)}}2R=\'1M.1t\';c(1f.2D(K.1M)){j=0;1z=K.1M.R;1x(j<1z){p=q.aH(n,K.1M[j].2B);q.C(u.F+": eG 3l aE 2B "+K.1M[j].2B+" eH 1F "+p,4);c(p===\'L\'){p=q.11(Q+2R)===\'-1\'?0:q.11(Q+2R);q.C(u.F+": p 1P eD "+p,4)}c(p==="59"){q.C(u.F+": 1J, I\'aB 4F eC N 5a 3j 1g \'"+K.1M[j].2B+"\'",2)}19{1k=q.1c(Q+\'1M.\'+p+\'.2B\',6a(K.1g,K.1M[j].2B))}j+=1}}19{q.C(u.F+": ex ez ao eA 7L 7F, aa eB\'t an 69.",1)}c(!1w(K.4D)){1k=q.1c(Q+\'4D\',K.4D)}c(!1w(K.3e)){c(1v!=="1.2"){1k=q.1c(Q+\'3e\',6a(K.1g,K.3e))}19{1k=q.1c(Q+\'a8\',6a(K.1g,K.3e))}}c(!1w(K.1k)){1k=q.1c(Q+\'1k\',K.1k)}c(!1w(K.1O)){1k=q.1c(Q+\'1O\',K.1O)}c(1v!=="1.2"){c(!1w(K.28)){1k=q.1c(Q+\'28\',K.28)}}x 1k}x 1W()};N.ey=G(18){c(q.1R()){V n,Q=\'y.1p.\',m,p,i=0,16={},5n,5o,1E,1O;n=q.5H(18);c(n===\'L\'){x n}Q+=n+\'.\';16.18=18;16.1g=q.11(Q+\'1g\');m=q.11(Q+\'1j.1t\');5n=q.11(Q+\'1E\');5o=q.11(Q+\'1O\');1E=(55(5n))?q.4I(5n):5n;1O=(55(5o))?q.4I(5o):5o;16.1j=[];c(m!==\'L\'){1x(igl){q.C(u.F+": 3I, 3Y 3J 7m 42 6t 3P gp 2C 2X. gs:"+21.R,2)}Q+=n+\'.\';q.1c(Q+\'3G\',21);q.1c(Q+\'20\',ak);x q.1c(Q+\'1E\',q.57(3L))}x 1W()};N.gI=G(){V 4x=1,ae=q.11(\'y.O.1K\'),3w=q.11(\'y.O.1I\'),3v=q.11(\'y.O.1C\');c((3v-3w)===0){q.C(u.F+": ai by ah 1m 3v - 3w "+3v,2);q.1c(\'y.O.1B\',4x)}19{4x=((ae-3w)/(3v-3w)).1r();q.C(u.F+": 8g af = "+4x,3);q.1c(\'y.O.1B\',2z(4x,7))}c(1d.1e!=="45"){1d.1e=(27(1d.1T)>=27(1d.2U))?\'45\':\'4M\';q.1c(\'y.1e\',1d.1e)}c(1d.1n!=="3A"){1d.1n=(27(4x)>=27(1d.2p))?\'3A\':\'8m\'}q.1c(\'y.1n\',1d.1n);x\'X\'};N.8j=G(){c(q.1R()&&u.8j){q.1c(\'y.O.1B\',\'1\');q.1c(\'y.O.1I\',\'0\');q.1c(\'y.O.1C\',\'2w\');q.1c(\'y.O.1K\',\'2w\');q.1c(\'y.1n\',\'3A\');q.1c(\'y.1T\',\'1\');x q.1c(\'y.1e\',\'45\')}x 1W()};N.5N=G(){c(q.1R()){x q.5N(\'\')}x 1W()};N.2L=G(){c(q.1R()){q.C(u.F+": I am fj...",3);q.1c(\'y.2a\',\'2L\');4q=L;x q.5x()}x 1W()};N.63=G(){c(q.1R()){q.C(u.F+": I am fA...",3);q.1c(\'y.2a\',\'3H\');8l(X);4q=L;x q.5x()}x 1W()};N.65=G(){c(q.1R()){q.C(u.F+": I am fK 7T...",3);q.1c(\'y.2a\',\'3s-7T\');8l(X);4q=L;x q.5x()}x 1W()};N.55=55;N.1Z=q.1Z;N.30=G(n,v){1o(n){A"1v":A"5b":A"4L":A"F":A"2p":A"2U":4p(4C);J;1q:u[n]=v;J}x(5W===L)};N.3u=G(n){c(u[n]===2j){4p(4h);x L}x u[n]};1f.3t(1U,\'87\',ag);1f.3t(1U,\'fi\',6w);1f.3t(1U,\'8e\',6w);1f.3t(q,\'6f\',G(e){64(e.25)})}',62,1038,'||||||||||||if||||||||||||||scorm||||settings|||return|cmi||case||debug||value|prefix|function|||break|data|false||this|score||p1|length|||str|var||true||||getvalue||tiers|API|arr|obj||id|else|count|key|setvalue|buffer|completion_status|Utl|type|nn|name|objectives|result|self|for|success_status|switch|interactions|default|toString|not|_count|lms|version|isBadValue|while|callback|len|nCs|scaled|max|suspend_data|timestamp|in|core|parseInt|min|Developer|raw|mode|correct_responses|you|latency|is|null|isConnectionActive|event|progress_measure|window|events|notStartedYet|join|Math|getAPIVersion|location|msg|typeof|||error||parseFloat|description|win|exit|new|split|passing|object|errorCode|Data|target|args|undefined|lang|order_matters|case_matters|triggerEvent|substring|scaled_passing_score|options|context|instead|padTime|path|isActive|100|got|_events|trueRound|substr|pattern|the|isArray|re|_children|indexOf|entry|on|Date|console|suspend|isPlainObject|2004|your|ka|ig|p2|answers|sv|completion_threshold|LMS|interaction|limit|diagnostic|nH|set|comments_from_learner|of|defaults|comments_from_lms|max_time_allowed||code|initialized|1000|def1|fill|floor|nError|learner_response|def2|push|session_time|array|response|performance|to|setData|hasOwnProperty|tID|Commit|connection|nM|time|addEvent|get|scoreMax|scoreMin|getObjLength|The|index|passed|unknown|Model|student_preferences|learner_preferences|exit_type|comment|normal|Sorry|from|getTime|date|status|once|pages|or|getLastErrorMessage|launch_data|terminated|makeBoolean|handler|Warning|document|Error|message|bErr|call|sum|was|getDiagnostic|Termination|completed|extend|findResponseType|search|names|General|centisecsToSCORM12Duration|centisecsToISODuration|This|attr|lvl|SCO|404|getLastErrorCode|catch|start|nD|throwVocabError|ID|round|triggerWarning|isStarted|totalObjectives|Objective|only|totalInteractions|nMin|String|scoreScaled|try|tmpScaledPassingScore|ctx|language|405|weighting|offset|already|JSON|total_time|isoStringToDate|Element|noconsole|modifiedDate|incomplete|Aborted|reg|dec|credit|text|defcs|apply|isWindow|isNaN|time_limit_action|tmpRaw|has|nS|tmpCompletionThreshold|etype|eventsApi|over|listeningTo|isISO8601|nY|isoDateToString|6000|match|correct|createDate|360000|other|long|element|t_arr|Message|lmsconnected|Initialization|parent|scorm_status_persist|Failure|ts|ly|Code|nDiagnostic|iso8601Exp|calcAverage|07|storss|retain|resultDate|terminate|allEvents|stringify|GetValue|Initialize|defss|read|tmpLaunchData|replace|delivery_speed|getInteractionByID|audio_captioning|storcs|isCompletionSet|attempted|utcdate|commit|After|matching|StoreData|08|2014|SCOBot_API_1484_11|matters|ignore|isError|issue|words|requests||Set|Before|finish|triggerException|timeout|sequencing|choice|off|Array|encodeInteractionType|student_data|startDate|doc|session_secs|exception|Month|No|Day|ISODurationToCentisec|toLowerCase|scorm_strict|Hour|Min|Year|strict|SCOBotUtil|8640000|been|empty|must|uoffset|exitSCO|Sec|Returning|Events|use|audio_level|latency_arr|dateToscorm12Time|403|isoDateToStringUTC|By|scorm12toMS|Interaction|Getting|Terminated|test|time_action|SB|UTC|that|findAPI|types|SCORMs|SetValue|class_types|isFunction|time_type|throwUnimplemented|bookmark|getData|consider|ignoring|Terminate|GMT|values|arr2|str2|val|learner_id|may|351|setSuspendData|Suspend|startTime|currentTime|errors|objective|nparam|title|isReady|getObjectiveByID|262980000|learner|3155760000|num_arr|Not|checkLoaded|checkProgress|learner_name|elen|orig_timestamp|decodeInteractionType|Offset|bubbles|cancelable|offsetMinutes|no|check|adl|timebits|getTimezoneOffset|Responses|param|You|Boolean|prototype|MM|Correct|60000|mil|end|isElement|Object|bTFound|ss|out|rest|base64|_|PT0H0M0S|isSuccessSet|trigger|NaN|API_1484_11|isRunning|are|local|totalObjectivesCompleted|triggerEvents|loaded|action|attempts|log|00|numeric|called|unload|eventSplitter|Score|lesson_mode|resume|happyEnding|cleansedData|updateStatus|failed|use_standalone|132|Value|suspendDataUsageStatistic|domain|133|responses|top|SCOBotBase|info|equal|warn|23PM|getHours|Possible|Cross|getSeconds|getMinutes|9999|bPrecise|unique|lesson_status|mastery_score|audio|64000|lesson_location|Ignoring|roundVal|0000|Get|LMSGetValue|speed|4096|Unexpected|please|verify|CMI|isWriteOnly|cmiGetValue|Constructing|isReadOnly|123|pow|saveDate|checkExitType|406|GetErrorString|402|GetLastError|408|these|Ms|string|Connectivity|shift|write|read_only|lat|write_only|throwGeneralSetError|401|Please|GetDiagnostic|Only|ssp|order|useJSONSuspendData|parse|Creating|concat|RegExp|launch_data_type|arguments|isISO8601Duration|initiate_timer|eventTypes|startTimer|nlen|CustomEvent|createEvent|starting|initializers|Overriding|ending|delete|number|throw_alerts|_listeningTo|truncate|characters|will|likert|invalid|Objectives|converting|_callback|and|remove|detected|cleanseData|setTimeout|timesUp||||Setting|can|did|HTMLEvents|student_response|HTMLElement|it||May|Progress|scoreRaw|Scaled|initSCO|Zero|Division|comments|loc||||wrong|nodeType|addEventListener|without|||001|onreadystatechange|documentElement|attachEvent|doScroll|interaction_mode|olen|ve|constructor|hasOwn|locate|instanceof|getInteractionObjectiveByID|getInteractionCorrectResponsesByPattern|exceeds|getCommentsFromLMS|Retrieve|Store|load|badValues|cleanseExp|yet|iso8601Dur|_version|initialize||01||Is|all|If|standalone|Initialized|2011|04|init|num|SCOBot|continue|exec|contextmenu|mouseout|clientX|Out|button|clientY||34PM|mousemove|mouseup|mousedown|Read|56AM|mouseover|05|ctrlKey|runtimedata|repeat|modifiers|elements|locale|initEvent|Undefined|Unimplemented|defaultView|shiftKey||altKey|Usage|nSuspend|view|metaKey|Found|Prevented|select|abort|MouseEvents|change|407|submit|15AM|KeyboardEvent|Mismatch|03|2013|02|16PM|Function|Number|Initializing|reset|trace|keydown|createdate|click|none|dblclick|resource|keyup|input|focus|Write|2010|blur|scroll|resize|initCustomEvent|Of|Can|logout|101|createEventObject|Type|fireEvent|name3|102|dispatchEvent|Content|toFixed|add|104|103||Already|proper|vocabulary|entirely|value3|Simulated|bookmarking|might|stopListening|Some|specified|User|isEmpty|maximum_time_allowed|learner_preference|created|keys|void|Instance|first|moddate|301|name1|isPrototypeOf|Argument|value1|201|Range|nodeName|detail||_listenId|left|Local|391|initio|143|name2|113|value2|Established|diganostic|111|112|122|detachEvent||DOMContentLoaded|142|there|Dependency|complete|readyState|before|calls|word|expected|found|btoa|saved|lose|have|slice|using|Adding|exceed|Yours|cannot|calculate|xml|imsmanifest|Pass|Fail|Calculated|via|global|zero|codes|Count|Raw|We|Consider|pass|getObjective|setCommentFromLearner|xhh|uhhh|receive|returned|Review|unloaded|being|forcing|done|logs|Did|below|Time|Up|Limit|alert|Exceeded|Times|Response|What|didn|toPrecision||valid||proceed|vs|getSuspendDataByPageID|setSuspendDataByPageID|getSecondsFromStart|setInteraction||argument|progress|getBookmark|setTotals|than|getMode|getEntry|setBookmark|Got||nSee|Something|getInteraction|went|with|wasn|added|now|question|journaled|Trying|resulted|more|doing|review|Launch|Resuming|atob|prior|Passed|json|success|score_scaled|ignored|completion|bad|setObjective|session|don|duration|see|much|point|ISO8601|timer|First|running|based|comments_lms|onload|unloading|student_id|LMSGetDiagnostic|student_name|Requesting|namespace|LMSGetErrorString|LMSGetLastError|onbeforeunload|suspending|setMilliseconds|given|yes|255|stopping|support|Loaded|incorrect|LMSSetValue|Locate|recorded|revising|pushing|against|Verify|getting|finishing|December|getUTCMinutes|getUTCHours|getUTCSeconds|getUTCMilliseconds|getFullYear|getUTCDate|getUTCMonth|500|timing|3600000|getUTCFullYear|getMonth|getDate|August|July|September|October|November|June|April|getMilliseconds|January|February|March|where|does|Local_API_1484_11|included|ll|mimic|SCORM|communication|unable|Match|Pattern|opener|after|fail|getLastError|state|24PM|querystring||scorm_edition|3rd|4000|33AM|isLMSConnected|checkLatency|exceeded|09|Begin|Length|Called|Status|could|located|Completion|tversion|compatibility|tModified|notify|administrator|LMSInitialize|Terminating|LMSCommit|Lost|Committing|gradeIt|LMSFinish'.split('|'),0,{})); \ No newline at end of file +/*! SCOBot Content API v4.0.5 (C) 2015 Cybercussion Interactive, LLC */ +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('V 6h=G(){"6j 6g";V 1v="1.0.4",4T="71/23/bu 57:bs",4y="5U/57/7c 12:aU",7C=L,6U=["7v","bp","4g","bv","6n","2F","9w","8f"],6Z=[],1q=8f.7y.1q,aC=8f.7y.3g,h=\'a6\',k=\'bB\',m=\'bD\',9z={aS:h,7k:h,bk:h,24:h,bl:h,bi:h,c1:h,c5:h,bL:h,bZ:h,bN:h,bQ:h,bR:h,bM:k,bG:k,bF:m,bH:m,bK:m,bU:m,c6:m,c7:m,bV:m,bX:m},32={c0:0,bE:0,c8:0,bg:L,bf:L,bj:L,bm:L,7n:X,78:X,bc:48.b8,1b:\'\',21:0,ba:\'\',bn:0,bA:\'\'},9F={a6:G(el,1i,1Q,o){x 1Q.bC(1i,o.7n,o.78)},9C:G(el,1i,1Q,o){x 1Q.bw(1i,o.7n,o.78,o.bq)}},86=/\\s+/,1y=6U.R,1l=N,7e=G(h){c(7C){x}4v{48.av.ax("br")}4F(e){9B(G(){7e(h)},0);x}h()},1g=G(o){x o==1T?4g(o):6Z[1q.42(o)]||"2f"},5d=G(o){x o!=1T&&o===o.1R},7h=G(o){x(1Z a9==="2f"?o aD a9:o&&1Z o==="2f"&&o!==1T&&o.ak===1&&1Z o.bt==="99")},2J=G(o){c(1g(o)!=="2f"||o.ak||5d(o)){x L}x!(o.aB&&!aC.42(o.aB.7y,"cW"))},2x=G(o){x(o aD 6n)||(1q.5o(o)===\'[2f 6n]\')},6O=G(o){x 1g(o)==="G"},3O=G(o){V i=1,2h=9u,aE=2h.R,1b;1w(i=0){V 1W=1Q.2b(\' \'),7z=1W.R;1w(7z--){3s(2e,1W[7z],41)}}19{c(2e===1R||7h(2e)){c(2e.aq){c(1Q==="7N"){1Q="cM"}2e.aq(1Q,41,L)}19{c(1Q==="7N"){1Q="au";48.aw(1Q,G(){c(48.cN==="cQ"){48.cP("au",2e);7C=X;41()}});c(48.av.ax&&1R===1R.8o){7e(41)}}19{2e.aw(\'2E\'+1Q,41)}}}19{3O(2e,5v);2e.2E(1Q,41)}}},6e=G(7f){V 3T=0,i=0,9Z=7f.R;1w(i<9Z){3T+=7f[i].93;i+=1}3T=3T/1y;x 3T.df(2)},2j=G(2e,1i,2u){V 6A=48,1Q,4Y,4b;2u=2u||{};1m(4b 1B 32){c(32.3g(4b)){c(!2u.3g(4b)){2u[4b]=32[4b]}}}c(5d(2e)||7h(2e)){c(6A.9D){4Y=9z[1i]||\'9C\';1Q=6A.9D(4Y);9F[4Y](2e,1i,1Q,2u);4v{2e.d5(1Q)}4F(62){}}19{1Q=6A.d4();2e.d3(\'2E\'+4Y,1Q)}}19{4v{2e.7R(1i,2u)}4F(62){}}},7S=G(1W,2h){V ev,i=-1,l=1W.R,a1=2h[0],a2=2h[1],a3=2h[2],al=2h.R;1o(al){A 0:1w(++i=0}G 9i(v){V 4O=2;x 1X.4u(v*1X.9g(10,4O))/1X.9g(10,4O)}G 3y(16){V 1i,R=0;1m(1i 1B 16){c(16.3g(1i)){R+=1}}x R}G 8N(){c(y.29==="2O"){y.2H="87"}}G 8n(){x 9i((y.1E.R/8J)*2y)+"%"}N.7V=G(){x u.35===1&&u.40===0};N.6r=G(){q.C(u.F+": cv...",3);c(u.y!==1T){y=u.y;8N()}19{y=u.8O}u.35=1;u.40=0;x\'X\'};N.5O=G(1b){u.2c=0;V r="L",k=1b.1q(),13=[];c(N.7V()){c(8W(k)){q.C(u.F+": 4C "+k+" 1S 9f 4d",4);u.2c=4B;x"L"}13=k.6v().2b(".");1o(13[0]){A"y":r=8V(k);J;A"9b":J;A"8h":J}x r}u.2c=8Y;x r};N.6K=G(1b,E){q.C(u.F+": 6K: "+1b+" = "+E,4);u.2c=0;V 13=[],k=1b.1q(),v=E.1q(),z=0,1a=0,15=[];c(N.7V()){c(91(k)){q.C(u.F+": 4C "+k+" 1S 66 4d",4);u.2c=4z;x"L"}13=k.2b(".");1o(13[0]){A"y":1o(1b){A"y.21":c(v.R>33){q.C(u.F+": cf 2V\'s cg 9M 2M 6D as 1O\'aA 3M "+v.R+" 9N 2Z ce K",2)}J;A"y.1e":c(1e.2I(\'|\'+v+\'|\')===-1){x 4i(1b,v)}J;A"y.29":c(29.2I(\'|\'+v+\'|\')===-1){x 4i(1b,v)}J;1s:1o(13[1]){A"3d":u.2c="4z";u.2W="3A y.3d 58 1S cd 66 4d.";x\'L\';A"30":c(y.30.2G.2I(13[3])===-1){x 4i(1b,v)}3k(k.2v(4,k.R),v,y);y.30.1t=(3y(y.30)-2).1q();x\'X\';A"1p":c(y.1p.2G.2I(13[3])===-1){x 4i(1b,v)}y.1p.1t=(3y(y.1p)-2).1q();c(51(1H(13[2],10))){x\'L\'}c(!1f.2J(y.1p[13[2]])){c(13[3]==="18"){y.1p[13[2]]={};3k(k.2v(4,k.R),v,y);y.1p.1t=(3y(y.1p)-2).1q();c(!1f.2J(y.1p[13[2]].1j)){q.C(u.F+": 90 1j 2f 1m 28 2Y",4);y.1p[13[2]].1j={};y.1p[13[2]].1j.1t="-1"}c(!1f.2J(y.1p[13[2]].1M)){q.C(u.F+": 90 5g 8A 2f 1m 28 2Y",4);y.1p[13[2]].1M={};y.1p[13[2]].1M.1t="-1"}x\'X\'}q.C("ca\'t cb 2Y ap 4r cJ!",3);x\'L\'}c(13[3]===\'1j\'){c(13[5]==="18"){1a=1H(y.1p[13[2]].1j.1t,10);z=1a;1w(z<1a){c(y.1p[13[2]].1j[z].18===v){x 9h(1b,v,z)}z+=1}}19{x 4i(1b,v)}3k(k.2v(4,k.R),v,y);y.1p[13[2]].1j.1t=(3y(y.1p[13[2]].1j)-1).1q();x\'X\'}c(13[3]===\'1M\'){3k(k.2v(4,k.R),v,y);y.1p[13[2]].1M.1t=(3y(y.1p[13[2]].1M)-1).1q()}3k(k.2v(4,k.R),v,y);y.1p.1t=(3y(y.1p)-2).1q();x\'X\';A"1j":c(13[3]==="18"){1a=1H(y.1j.1t,10);1w(z<1a){c(y.1j[z].18===v){u.2c="7g";u.2W="3A 1j.18 58 6y be 9m. 3A E \'"+v+"\' 4W 4G 6t 31 1B 7A #"+z;x\'L\'}z+=1}}c(13[3]!=="18"){15=1H(13[2],10);c(y.1j[15]===2d){u.2c="95";u.2W="3A 1j.18 58 6y be 31 cR 5e cU a4 be 31";x\'L\'}}c(51(1H(13[2],10))){x\'L\'}3k(k.2v(4,k.R),v,y);y.1j.1t=(3y(y.1j)-2).1q();x\'X\'}J}3k(k.2v(4,k.R),v,y);J;A"9b":J;A"8h":J}x"X"}c(u.40){u.2c=9o}19{u.2c=8D}x"L"};N.3l=G(){q.C(u.F+": 3l 7j.\\bb 2g b9 "+8n(),4);1f.2j(1l,\'6d\',{1i:\'6d\',bd:y});x\'X\'};N.6P=G(){u.40=1;u.35=0;x\'X\'};N.96=G(7W){c(7W!==""){V 7s=1H(7W,10);c(8g[7s]!==2d){x 8g[7s]}}x""};N.8G=G(){x u.2c};N.9l=G(){x u.2W}}G 8E(2u){"6j 6g";V 1f=6h,32={1v:"4.0.5",4T:"aX/bz/aM 8C:bW",4y:"5U/57/7c 12:c2",C:L,2p:L,9I:L,F:"8E",3u:"2O",1n:"3v",8v:X,aJ:L,1e:"4D",6T:"6R",y:1T,6f:[]},u=1f.3O(32,2u),5x=0,24={0:"6o 3R",4z:"7a c3",4B:"c4 2E a 66 4d bT"},14={3q:L,1v:"bJ",1L:"",2o:L,K:{1e:u.1e,1n:u.1n,3u:u.3u},2p:u.2p},1l=N;u.24=24;u.6k={};G 4A(22,4o){1f.2j(1l,C,{22:22,4o:4o})}G C(22,4o){c(u.C){c(!1R.2L){1R.2L={};1R.2L.8w=4A;1R.2L.8c=4A;1R.2L.8x=4A;1R.2L.24=4A;1R.2L.bI=4A}1o(4o){A 1:2L.24(22);J;A 2:2L.8x(22);J;A 4:2L.8w(22);J;A 3:2L.8c(22);J;1s:2L.8c(22);x L}x X}c(4o<3&&u.9I){dS(22)}x X}G 6N(2a){V 7X=0,2T=fR;1w((!2a.14&&!2a.7P)&&(2a.4Q)&&(2a.4Q!==2a)&&(7X<=2T)){7X+=1;2a=2a.4Q}c(2a.7P){14.1v="2P";14.2o=2a.7P}19 c(2a.14){14.1v="1.2";14.2o=2a.14}19{x L}x X}G 4p(n,8q){V U="P",1A=1X.1F(n,0),4X=0,3m=0,4E=0,2X,4J;1A=1X.4u(1A);c(8q===X){4E=1X.3a(1A/67)}19{4X=1X.3a(1A/7l);1A-=4X*7l;3m=1X.3a(1A/7p);1A-=3m*7p;4E=1X.3a(1A/67)}1A-=4E*67;2X=1X.3a(1A/53);1A-=2X*53;4J=1X.3a(1A/52);1A-=4J*52;c(4X>0){U+=4X+"Y"}c(3m>0){U+=3m+"M"}c(4E>0){U+=4E+"D"}c((2X>0)||(4J>0)||(1A>0)){U+="T";c(2X>0){U+=2X+"H"}c(4J>0){U+=4J+"M"}c(1A>0){U+=(1A/2y)+"S"}}c(U==="P"){U="8m"}x U}G 4f(n){V 2X=1X.3a(n/53),1A=n-2X*53,3m=1X.3a(1A/52),4Z,U;1A=1A-3m*52;4Z=1X.3a(1A/2y);1A=1X.3a(1A-4Z*2y);c(2X>8r){2X=8r}U="8P"+2X+":";U=U.2v(U.R-5,5);c(3m<10){U+="0"}U+=3m+":";c(4Z<10){U+="0"}U+=4Z;c(1A>0){U+=".";c(1A<10){U+="0"}U+=1A}x U}G 6w(U){V aV=[0,0,0,0,0,0],3P=!!((U.2I("P")!==0)),7i=L,aT=["Y","M","D","H","M","S"],p=0,i=0,1y;c(!3P){U=U.2v(1);1y=aT.R;i=0;1w(i<1y){c(U.2I("T")===0){U=U.2v(1);i=1X.1F(i,3);7i=X}p=U.2I(aT[i]);c(p>-1){c((i===1)&&(U.2I("T")>-1)&&(U.2I("T")2)&&(!7i)){3P=X;J}U=U.2v(p+1)}i+=1}3P=!!(((!3P)&&(1y!==0)))}c(3P){x 0}x aV[0]*7l+aV[1]*7p+aV[2]*67+aV[3]*53+aV[4]*52+1X.4u(aV[5]*2y)}G 2q(n){x n<10?\'0\'+n:n}G 6G(n){V 56=[];56=n.2b(":");x 1X.4u(56[0]*fQ)+(56[1]*7w)+(56[2]*33)}G 6q(3E){V h=3E.8B(),m=3E.8y(),s=3E.8z();x 2q(h)+":"+2q(m)+":"+2q(s)}G 6M(d){x d.fS()+\'-\'+2q(d.fT()+1)+\'-\'+2q(d.fU())+\'T\'+2q(d.fP())+\':\'+2q(d.fO())+\':\'+2q(d.fJ())+"."+1X.4u((d.fI()/33)%33)+\'Z\'}G 55(d){V 4K=d.7I()>0?\'-\':\'+\';x d.fK()+\'-\'+2q(d.fL()+1)+\'-\'+2q(d.fN())+\'T\'+2q(d.8B())+\':\'+2q(d.8y())+\':\'+2q(d.8z())+"."+1X.4u((d.fM()/33)%33)+4K+2q(d.7I()/60)+\':8b\'}G 4t(U){V 7x=["fV","fW","g5","g4","aa","g6","g7","g8","g3","g2","fY","fX"],d,5P,4K=0,8d=0,dd,82,m,5Y,5X,8a;1o(u.6T){A"6Q":82=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\\.[0-9]*)?)?(?:([+\\-])([0-9]{2})([0-9]{2}))?/;m=82.b5(U);c(m){5X=2F.6Q(1H(m[1],10),1H(m[2],10)-1,1H(m[3],10),1H(m[4],10),1H(m[5],10),((m[6]&&1H(m[6],10))||0),((m[7]&&25(m[7])*33))||0);c(m[9]&&m[10]){8a=1H(m[9],10)*60+1H(m[10],10);5X+=(m[8]===\'+\'?-1:+1)*8a*7w}5Y=28 2F(5X)}19{5Y=1T}x 5Y;A"6R":d=U.5F(/(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))([\\+|\\-]\\d+:\\d+)/,G($0,$6m,$5Z,$61,$6B,$6z,$6x,$9c,$7d){4K=1H($7d.2s(1,$7d.R),10)*60;8d=$9c;x 7x[$5Z-1]+" "+$61+", "+$6m+" "+$6B+":"+$6z+":"+$6x});dd=28 2F(d);5P=dd.7I();c(5P!==4K){dd=28 2F(dd.3x()+(4K-5P)*7w);dd.fZ(8d)}x dd;1s:d=U.5F(/(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})/,G($0,$6m,$5Z,$61,$6B,$6z,$6x){x 7x[$5Z-1]+" "+$61+", "+$6m+" "+$6B+":"+$6z+":"+$6x});dd=28 2F(d);x dd}}G 3S(U){c(U===2d){C(u.F+" : 3S 3Z g0 6i 99, 9S 3p L",2);x L}c(U===X||U===L){x 7v(U)}1o(U.6v()){A"X":A"g1":A"1":x X;A"L":A"8i":A"0":A 1T:x L;1s:x 7v(U)}}G 4L(n){C(24[n],2);x X}G 5H(22){1f.2j(1l,\'5T\',{\'24\':22})}G 4c(){V 1u=14.2o,3f=0;c(1u){1o(14.1v){A"1.2":3f=1H(1u.fH(),10);J;A"2P":3f=1H(1u.8G(),10);J;1s:J}}x 3f}G 3U(n){V 1u=14.2o,1k=\'6o 2V 97\';c(1u){1o(14.1v){A"1.2":1k=1u.fG(n.1q());J;A"2P":1k=1u.96(n.1q());J;1s:J}}x 4g(1k)}G 3V(n){V 1u=14.2o,1k=\'6o 2V 97\';c(1u){1o(14.1v){A"1.2":1k=1u.fn(n.1q());J;A"2P":1k=1u.9l(n.1q());J;1s:J}}x 4g(1k)}N.11=G(n){V v=1T,1u=14.2o,ec=0,m=\'\',d=\'\',1h=1T,13=[],2K=L,4n=28 2F(),7L;c(14.2p){1o(14.1v){A"1.2":1o(n){A"y.3d.1t":A"y.3d.2G":A"y.30.1t":A"y.30.2G":A"y.O.1D":A"y.1U":A"y.2S":2K=X;J;A"y.4P":1h="y.1I.4P";J;A"y.21":1h="y.1I.8H";J;A"y.2H":1h="y.1I.2H";J;A"y.1L":1h="y.1I.8e";J;A"y.29":1h="y.1I.29";J;A"y.O.1J":1h="y.1I.O.1J";J;A"y.O.1G":1h="y.1I.O.1G";J;A"y.O.1F":1h="y.1I.O.1F";J;A"y.2r":1h="y.5J.8K";J;A"y.3b":1h="y.5J.3b";J;A"y.54":1h="y.5J.54";J;A"y.77":1h="y.1I.fm";J;A"y.79":1h="y.1I.fo";J;A"y.3w.5L":1h="y.3z.8R";J;A"y.3w.5G":1h="y.3z.8S";J;A"y.3w.4k":1h="y.3z.4k";J;A"y.3w.5z":1h="y.3z.50";J;A"y.1n":A"y.1e":1h="y.1I.8I";J;A"y.3r":1h="y.1I.3r";J;A"y.4x":1h="y.1I.4x";J;1s:13=n.2b(".");c(13[1]==="1p"){1o(13[2]){A"2G":A"1t":J;1s:c(!51(1H(13[2],10))){1o(13[3]){A"1j":A"1M":J;1s:q.C(u.F+": fp y.1p."+13.1V(".")+" 1S a 9f-4d E. 9e 7Y 2M 3f.",2);x\'L\'}}}}c(13[1]==="1j"){1o(13[2]){A"2G":A"1t":J;1s:1o(13[3]){A"18":A"3I":J;A"1n":A"1e":13[3]=\'3I\';J;A"1U":A"27":2K=X;J;A"O":c(13[4]==="1D"){2K=X}J;1s:q.C(u.F+": 8X fq 3M 1B \'"+n+"\', 8T 8U 2M 3f.",2);J}J}1h=13.1V(".")}19{1h=n}J}c(2K){x\'L\'}v=1u.8L(1h);J;A"2P":v=1u.5O(n);J;1s:J}ec=4c();m=3U(ec);d=3V(ec);1f.2j(1l,\'11\',{\'n\':n,\'v\':v,\'24\':{\'3f\':ec,\'46\':m,\'2W\':d}});7L=28 2F();u.6f.3c({93:7L-4n,v:n});c(ec===0||ec===6E){c(v===\'2d\'||v===1T||v===\'1T\'){v=""}c(14.1v==="1.2"){c(v==="8P:8b:8b.0"){v=\'\'}}x 4g(v)}C(u.F+": 3R\\39 5i: "+ec+"\\39 5j: "+m+"\\5k: "+d,1);x\'L\'}C(u.F+": "+n+" 8Q 4s, 3q 1r 35! "+14.2p,2);x\'L\'};N.1c=G(n,v){V s=\'L\',1u=14.2o,ec=0,m=\'\',d=\'\',13=[],1h=1T,2K=L;c(14.2p){1o(14.1v){A"1.2":14.1L=14.1L===""?1u.8L(\'y.1I.8e\'):14.1L;c(14.1L==="3K"){1o(n){A"y.O.1D":A"y.1U":2K=X;J;A"y.30.3H":c(v.R>8Z){C(u.F+": 47, 2C 3H 1S 4S 2C 2T!!",2)}1h="y.ai";J;A"y.21":c(v.R>fl){C(u.F+": 47, 2M 6D 1S 4S 2C 2T!!",2)}1h="y.1I.8H";J;A"y.1L":1h="y.1I.8e";J;A"y.29":1h="y.1I.29";c(v==="3K"){v=""}14.3u=v;J;A"y.O.1J":1h="y.1I.O.1J";J;A"y.O.1G":1h="y.1I.O.1G";J;A"y.O.1F":1h="y.1I.O.1F";J;A"y.1n":A"y.1e":1h="y.1I.8I";c(v==="3v"||v==="1r 6u"){2K=X}14.K.1e=v;J;A"y.2r":1h="y.5J.8K";J;A"y.3w.5L":1h="y.3z.8R";J;A"y.3w.5G":1h="y.3z.8S";J;A"y.3w.4k":1h="y.3z.4k";J;A"y.3w.5z":1h="y.3z.50";J;A"y.3r":1h="y.1I.3r";J;A"y.4x":1h="y.1I.4x";J;A"y.1E":c(v.R>8Z){C(u.F+": 47, 2M 2O K 1S 4S 2C 2T!!",2)}1h=n;J;1s:13=n.2b(".");1o(13[1]){A"30":1o(13[3]){A"21":A"1C":x\'L\'}J;A"1p":c(13[2]===\'L\'){q.C(u.F+": 1K, 2C 2Y 1a 3Z \'L\', 9V I\'m fk 1O 3D ff N fe 2C 2V. fg 2C 3f fh 2Y 1a.",2);x\'L\'}1o(13[3]){A"1C":13[3]="3t";J;A"37":13[3]="a7";J;A"1g":c(v==="5f-38-1B"||v==="5e"){q.C(u.F+": 1K, 6X fj 2M fi 1p. 74.20() 2Z \'1.2\' fr 1r fs 1g 2Z "+v,2)}J;A"1k":c(v==="ga"){v="ao"}J;1s:J}1h=13.1V(".");J;A"1j":1o(13[3]){A"18":J;A"3I":A"1n":A"1e":13[3]=\'3I\';c(v==="3v"||v==="1r 6u"){2K=X}J;A"1U":A"27":2K=X;J;A"O":c(13[4]==="1D"){2K=X}J;1s:q.C(u.F+": 8X E 3M 1B \'"+n+"\', 8T 8U 2M 3f.",2);J}1h=13.1V(".");J;1s:1h=n;J}J}c(2K){x\'L\'}s=1u.fB(1h,v)}19{C(u.F+": 47, 1O 7U 1r 1B 3K 1L. 8M \'31\' 5Q.",2);x\'L\'}J;A"2P":14.1L=14.1L===""?1u.5O(\'y.1L\'):14.1L;c(14.1L==="3K"){1o(n){A"y.21":c(v.R>33){C(u.F+": 47, 2M 6D 1S 4S 2C 2T!!",2)}J;A"y.1e":14.K.1e=v;J;A"y.1n":14.K.1n=v;J;A"y.29":14.K.3u=v;J;A"1E":c(v.R>8J){C(u.F+": 47, 2M 2O K 1S 4S 2C 2T!!",2)}J;1s:J}s=1u.6K(n,v)}19{C(u.F+": 47, 1O 7U 1r 1B 3K 1L. 8M \'31\' 5Q.",2);x\'L\'}J;1s:J}ec=4c();m=3U(ec);d=3V(ec);1f.2j(1l,\'1c\',{\'n\':n,\'v\':v,\'24\':{\'3f\':ec,\'46\':m,\'2W\':d}});c(ec===0||ec===6E){x s}C(u.F+": 3R\\39 5i: "+ec+"\\39 5j: "+3U(ec)+" 1m "+n+"\\5k: "+3V(ec),1);x s}C(u.F+": "+n+" 6p 4s, 3q 1r 35! fD fE 1O 7j a8 fF 1O 6V.",2);x\'L\'};N.68=G(){V s=\'L\',1u=14.2o,ec=0,6s,92=28 2F();u.6f=[];6s=(92.3x()-u.6k.3x())/33;c(14.2p){C(u.F+": fA K",3);1o(14.1v){A"1.2":1l.1c("y.1I.3r",4f(6s*2y));s=1u.fz("");J;A"2P":1l.1c("y.3r",4p(6s*2y,X));s=1u.3l("");J;1s:J}ec=4c();c(ec===0){x s}C(u.F+": 3R\\39 5i: "+ec+"\\39 5j: "+3U(ec)+" 1m 3l.\\5k: "+3V(ec),1);x\'L\'}C(u.F+": 3l 4s, 3q 1r 35!",2);x\'L\'};N.b1=G(){C(u.F+": 6r fu. \\n\\ft: "+u.1v+"\\n\\fv: "+u.4y,3);V s=L,1u=14.2o,ec=0;c(!14.2p){c(1u){1o(14.1v){A"1.2":s=3S(1u.fw(""));J;A"2P":s=3S(1u.6r(""));J;1s:J}ec=4c();C(\'>>>>>>>>>>>>>>>>>>>>>>>>>>\'+s+\'>>>>>>>>>>>>>>>>>>>>>>>>\',4);c(s&&ec===0){14.2p=X;14.K.1e=1l.11(\'y.1e\');u.6k=28 2F();C(u.F+": 4e 1S 35.",3);1o(14.K.1e){A"1r 6u":A"3v":1l.1c("y.1e","4D");J;1s:c(14.K.1e===\'\'){5H("2V fy 5W, 9e fx a g9. gn gF 1S 6i.")}J}x\'X\'}C(u.F+": 3R\\39 5i: "+ec+"\\39 5j: "+3U(ec)+" 1m 6r.\\5k: "+3V(ec),1)}19{C(u.F+": 4s, 2V gD 1r be gC!.",2)}}19{C(u.F+": 4s, 3q 4G 35!.",2)}x\'L\'};N.69=G(){V s=L,1u=14.2o,ec=0;C(u.F+": gB "+14.2p+" "+1u,4);c(14.2p){c(1u){C(u.F+": 1e = "+14.K.1e+"|| 1n = "+14.K.1n,3);1l.68();1o(14.1v){A"1.2":s=1u.gz("");J;A"2P":s=1u.6P("");J;1s:J}c(3S(s)){C(u.F+": 6V.",3);1f.2j(1l,\'40\',{});14.2p=L}19{ec=4c();C(u.F+": 3R\\39 5i: "+ec+"\\39 5j: "+3U(ec)+" 1m 3l.\\5k: "+3V(ec),1)}}19{C(u.F+": gA 3q 3p 2V",2)}}19{C(u.F+": 6P 4s, 3q 1r 35!",2)}x s};N.7o=G(18){V 1a=1l.11("y.1j.1t"),i,3j;q.C(u.F+": 6p 4q - gE 3Y, 4q 1a 1S "+1a,4);c(1a===\'\'||1a===\'L\'||1a===\'-1\'){x\'L\'}1a=1H(1a,10)-1;i=1a;1w(i>=0){3j=1l.11("y.1j."+i+".18");c(18===3j){q.C(u.F+": 4q 4r gI 2E "+i,4);x i}i-=1}x\'L\'};N.64=G(18){V 1a=1l.11("y.1p.1t"),i,3j;c(1a===""||1a===\'L\'||1a===\'-1\'){x\'L\'}c(14.1v==="1.2"){q.C(u.F+": 1K, 6X 6C 9a 5Q c 74.20 1S 8F 3p 1.2",2);x 1a}1a=1H(1a,10)-1;q.C(u.F+": 75 1p 3D 1a "+1a,4);i=1a;1w(i>=0){3j=N.11("y.1p."+i+".18");c(18===3j){q.C(u.F+": 73 70 4r 5u "+i);x i}i-=1}x\'L\'};N.az=G(n,18){V 1a=1l.11("y.1p."+n+".1j.1t"),i,3j;c(1a===""||1a===\'L\'){x\'0\'}c(14.1v==="1.2"){q.C(u.F+": 1K, 6X 6C 9a 5Q c 74.20 1S 8F 3p 1.2",2);x\'L\'}1a=1H(1a,10)-1;q.C(u.F+": 75 2Y 1j 3D 1a "+1a,4);i=1a;1w(i>=0){3j=1l.11("y.1p."+n+".1j."+i+".18");c(18===3j){q.C(u.F+": 73 4q 70 4r 5u "+i);x i}i-=1}x\'L\'};N.aF=G(n,2z){V 1a=1l.11("y.1p."+n+".1M.1t"),i,p;c(1a===""||1a===\'L\'){q.C(u.F+": 7B 7H 2z 3Z 6i 3Q L",4);x\'0\'}1a=1H(1a,10)-1;q.C(u.F+": 75 2Y 5g 8A 3D 1a "+1a,4);i=1a;1w(i>=0){p=1l.11("y.1p."+n+".1M."+i+".2z");c(2z===p){q.C(u.F+": 73 7B 7H 70 gH 5u "+i);x"5h"}i-=1}x\'L\'};N.aZ=G(){V 2a;4v{2a=1R.4Q;c(2a&&2a!==1R){6N(1R.4Q)}}4F(e){C(u.F+" 8p 8s-8t 5W/7Q 1L (62).",2)}c(!14.2o){4v{2a=1R.8o.gG;6N(2a)}4F(ee){C(u.F+" 8p 8s-8t 5W/7Q 1L (62).",2)}}c(14.2o){14.3q=X;x X}C(u.F+": I 3Z gx 3p aG an 14 1m gh",2);c(u.8v){C(u.F+": b4 1O gj gk I\'gl gg 2C 2V. b4 1r, b6 gf gb 9O dk.",4);u.aJ=X;14.1v="2P";14.2o=1Z 6c===\'G\'?28 6c({y:u.y}):1T;1f.3s(14.2o,\'6d\',G(e){1f.2j(1l,\'6d\',e)});x X}x L};N.gc=G(n){x 24[n]};N.gd=G(){x 14.3q};N.20=G(){x 14.1v};N.1P=G(){x 14.2p};N.ge=G(){1f.6e(u.6f)};N.31=G(n,v){1o(n){A"1v":A"4T":A"4y":A"F":4L(4B);x L;A"2p":14.2p=v;u[n]=v;J;A"6k":u[n]=28 2F(v);J;1s:u[n]=v;J}x(5x!==0)};N.3i=G(n){c(u[n]===2d){4L(4z);x L}x u[n]};N.4f=4f;N.4p=4p;N.6w=6w;N.6M=6M;N.55=55;N.4t=4t;N.6G=6G;N.6q=6q;N.3S=3S;N.C=C;N.aZ()}G aY(2u){"6j 6g";V 1f=6h,32={1v:"4.0.5",4T:"aX/71/aM gm:gy",4y:"5U/57/gu 12:aU",F:"aY",43:{},ay:"gv",9v:"gw",9y:X,63:X,gt:"gs",4N:"1n",21:"",9q:X,1E:{3L:[]},8j:L,85:X,1L:"",2r:0.7,2S:0,3b:\'\',4l:0,4j:0,7F:0},u=1f.3O(32,2u),1d={1n:\'\',1e:\'\',2S:u.2S,1U:0,2r:u.2r,O:{1D:0,1J:0,1G:0,1F:0}},5l=L,5x=L,4H=L,aL=\'|1T|2d|L|7M|| |\',24=q.3i(\'24\'),1l=N;G af(){5l=q.b1();q.C(u.F+": 4e go 3D 1R.gp "+5l,4);c(5l){1l.4n();1f.2j(1l,"aS")}x 5l}G 6l(){q.C(u.F+": 4e 1S gq gr, fC 29 ...",3);c(q.1P()){1f.2j(1l,"7k");1o(q.3i(\'3u\')){A"6a":1l.6a();J;A"2O":1l.2O();J;A"6b":1l.6b();J;1s:q.C(u.F+": 3v 29 1g",2);J}q.C(u.F+": 4e 1S fc dW.",4)}x X}G 4L(n){q.C(24[n],2);x X}G 5H(22){1f.2j(1l,\'5T\',{24:22})}G 1x(v){x aL.2I(\'|\'+v+\'|\')>=0}G 9Q(U){V b3=/[^\\f\\r\\n\\t\\v\\0\\s\\S\\w\\W\\d\\D\\b\\\\B\\\\cX\\\\dV\\\\dX]/gi;x U.5F(b3,\'\')}G 4U(v){V 5q;1o(q.3i(\'6T\')){A"6Q":5q=/^(\\d{4})-0?(\\d+)-0?(\\d+)[T ]0?(\\d+):0?(\\d+):0?(\\d+)(?:\\.(\\d+))(|Z)$/;J;A"6R":5q=/^(\\d{4})-0?(\\d+)-0?(\\d+)[T ]0?(\\d+):0?(\\d+):0?(\\d+)(?:\\.(\\d+))[\\+\\-]\\d{2}:\\d{2}$/;J;1s:5q=/^(\\d{4})-0?(\\d+)-0?(\\d+)[T ]0?(\\d+):0?(\\d+):0?(\\d+)$/;J}x 5q.72(v)}G 9x(v){V aQ=/^(?:P)([^T]*)(?:T)?(.*)?$/;x aQ.72(v)}G 1Y(){q.C(u.F+": 7r dY\'t 42 \'4n()\' aO, 3Q 1O 4G 40, 6C.",2);x\'L\'}G 7J(){x(28 2F().3x())}G 2w(v,4O){V b2=25(v);x 25(b2.dZ(4O))}G 3X(1g,U){V 4R=0;1o(1g){A"2m":4R=/^\\{2m=.*?\\}/;J;A"2k":4R=/^\\{2k=.*?\\}/;J;A"2l":4R=/^\\{2l=.*?\\}/;J;1s:q.C(u.F+": 3G, N 1S 1r a dU dT 1g.",1);J}x 4R.b5(U)}G 9Y(){q.C("dP dO!");V 6L=q.11(\'y.54\').2b(\',\'),46=!!((6L[1]==="46"));c(46){1f.2j(1l,\'46\',{50:"dQ dR fd"})}q.31(\'3u\',"6b");c(6L[0]==="29"){6l()}19{1f.2j(1l,\'b7\')}}G 65(1g,E){V U=\'\',6S=\'\',i=0,15=[],6W=[],1y,3N;1o(1g){A\'X-L\':E=E.1q().6v();c(E===\'X\'||E===\'L\'){c(q.20()==="1.2"){x E.2s(0,1)}x E}q.C(u.F+": 1K, 1O\'2A 1r 2i X 3Q L 1m X-L. I 2D "+E+" 2n",1);x\'\';A\'5I\':c(q.20()==="1.2"){c(1f.2x(E)){c(E.R>26&&u.63){q.C(u.F+": 1K, 1O\'2A 2i a 3T 2Z 6H 6I aH 6J 2T 2Z 26 1m N 2z. e0 e1 \'3h\' 2n.",2)}x E.1V(",")}q.C(u.F+": 1K, 1O\'2A 1r 2i a 3o 1g 1m 5N/5I. I 2D "+1Z E+" 2n\\n"+4I.5V(E),1);E=\'\'}A\'5N\':c(1f.2x(E)){3N=0;c(E.R>36&&u.63){q.C(u.F+": 1K, 1O\'2A 2i a 3T 2Z 6H 6I aH 6J 2T 2Z 36 1m N 2z.",2);E=E.ea(0,36)}1m(3N 1B E){c(E.3g(3N)){c(E[3N].R>10&&u.63){q.C(u.F+": 1K, 1O\'2A 2i 6H 6I e9 6J 2T 2Z 10 9N. eb ed "+E[3N].R+". I 9O 9M N as 1r 3p ef K.",2);E[3N]=E[3N].2s(0,10)}}}U=q.20()==="1.2"?E.1V(","):E.1V("[,]");E=U}19{q.C(u.F+": 1K, 1O\'2A 1r 2i a 3o 1g 1m 5N/5I. I 2D "+1Z E+" 2n\\n"+4I.5V(E),1);E=\'\'}x E;A\'38-1B\':c(1f.2J(E)){c(E.2k!==2d){U+="{2k="+E.2k+"}"}c(E.2m!==2d){U+="{2m="+E.2m+"}"}c(E.2l!==2d){U+="{2l="+E.2l+"}"}c(1f.2x(E.5M)){U+=E.5M.1V("[,]")}19{q.C(u.F+": 1K, e8 an 3o 2Z e7(s) 1m 38-1B. I 2D "+1Z E.5M+" 2n",1)}E=U}19{q.C(u.F+": 1K, 1O\'2A 1r 2i a 2f 1g 1m 38 1B. I 2D "+1Z E+" 2n",1);E=\'\'}x E;A\'5f-38-1B\':c(1f.2J(E)){c(E.2k!==2d){U+="{2k="+E.2k+"}"}c(E.2l!==2d){U+="{2l="+E.2l+"}"}U+=E.50;E=U}19{q.C(u.F+": 1K, 1O\'2A 1r 2i a 2f 1g 1m 5f 38 1B. I 2D "+1Z E+" 2n",1);E=\'\'}x E;A\'5C\':c(1f.2x(E)){1y=E.R;i=0;1w(i<1y){c(1f.2x(E[i])){15.3c(q.20()==="1.2"?E[i].1V("."):E[i].1V("[.]"))}19{q.C(u.F+": 1K, 1O\'2A 1r 2i a 3o 1g 1m 5C/3h. I 2D "+1Z E+" 2n",1);x\'\'}i+=1}U=q.20()==="1.2"?15.1V(","):15.1V("[,]");E=U}19{q.C(u.F+": 1K, 1O\'2A 1r 2i a 3o 1g 1m 5C/3h. I 2D "+1Z E+" 2n",1);E=\'\'}x E;A\'3h\':c(!1f.2x(E)){c(E.2m!==2d){U+="{2m="+E.2m+"}"}c(1f.2x(E.2U)){1y=E.2U.R;i=0;1w(i<1y){c(1f.2x(E.2U[i])){c(1f.2J(E.2U[i][1])){6W=[2w(E.2U[i][1].1G,7),2w(E.2U[i][1].1F,7)];6S=6W.1V("[:]");E.2U[i][1]=6S}15.3c(E.2U[i].1V("[.]"))}19{q.C(u.F+": 1K, 1O\'2A 1r 2i a 3o 1g 1m 3h 5g 3n. I 2D "+1Z(E.2U[i])+" 2n 2E "+i,1);q.C(E,1);x\'\'}i+=1}U+=15.1V("[,]")}19{q.C(u.F+": 1K, 1O\'2A 1r 2i a 3o 1g 1m 3h 5g 3n. I 2D "+1Z E.2U+" 2n",1);q.C(E,1)}}19{c(1f.2x(E)){1y=E.R;i=0;1w(i<1y){c(1f.2x(E[i])){15.3c(E[i].1V("[.]"))}19{q.C(u.F+": 1K, 1O\'2A 1r 2i a 3o 1g 1m 3h 7m 3n. I 2D "+1Z E[i]+" 2n 2E "+i,1);q.C(E,1);x\'\'}i+=1}U=15.1V("[,]")}19{q.C(u.F+": 1K, 1O\'2A 1r 2i a 3o 1g 1m 3h 7m 3n. I 2D "+1Z E+" 2n",1);E=\'\'}}E=U;x E;A\'7u\':c(1Z E==="9L"){U=E.1q()}19 c(1f.2J(E)){15=[2w(E.1G,7),2w(E.1F,7)];U=15.1V("[:]")}19{U=25(E);c(U==="7M"){q.C(u.F+": 1K, 2M 1r 2i a 9L 1m a 7u 2Y. I 2D "+E+" 2n",1)}U+=\'\'}x U;A\'9J\':A\'5e\':x E.1q();1s:q.C(u.F+": 3G, 9K 2Y 1g 9P 1m "+1g+" 2E "+E,1);x L}}G 7K(1g,E){V i=0,15=[],16={},1y,5h=L;1o(1g){A\'X-L\':c(q.20()==="1.2"){x E==="t"?"X":"L"}x E;A\'5I\':A\'5N\':15=E.2b("[,]");E=15;x E;A\'38-1B\':15=3X(\'2k\',E);c(15!==1T){c(15[0].3Y(/^\\{2k=(X|L)\\}$/)!==-1){16.2k=15[0].2s(\'{2k=\'.R,15[0].R-1);E=E.2s(15[0].R,E.R);q.C("=== A 5A"+E,4)}}15=3X(\'2m\',E);c(15!==1T){c(15[0].3Y(/^\\{2m=(X|L)\\}$/)!==-1){16.2m=15[0].2s(\'{2m=\'.R,15[0].R-1);E=E.2s(15[0].R,E.R);q.C("=== 9p 5A"+E,4)}}15=3X(\'2l\',E);c(15!==1T){c(15[0].3Y(/^\\{2l=.*?\\}$/)!==-1){16.2l=15[0].2s(\'{2l=\'.R,15[0].R-1);E=E.2s(15[0].R,E.R)}}16.5M=E.2b("[,]");x 16;A\'5f-38-1B\':15=3X(\'2k\',E);c(15!==1T){c(15[0].3Y(/^\\{2k=(X|L)\\}$/)!==-1){16.2k=15[0].2s(\'{2k=\'.R,15[0].R-1);E=E.2s(15[0].R,E.R);q.C("=== A 5A"+E,4)}}15=3X(\'2l\',E);c(15!==1T){c(15[0].3Y(/^\\{2l=.*?\\}$/)!==-1){16.2l=15[0].2s(\'{2l=\'.R,15[0].R-1);E=E.2s(15[0].R,E.R)}}16.50=E;x 16;A\'5C\':15=E.2b("[,]");1y=15.R;i=0;1w(i<1y){15[i]=15[i].2b("[.]");i+=1}x 15;A\'3h\':15=3X(\'2m\',E);c(15!==1T){c(15[0].3Y(/^\\{2m=(X|L)\\}$/)!==-1){5h=X;16.2m=15[0].2s(\'{2m=\'.R,15[0].R-1);E=E.2s(15[0].R,E.R);q.C("=== 9p 5A"+E,4)}}15=E.2b("[,]");1y=15.R;i=0;1w(i<1y){15[i]=15[i].2b("[.]");i+=1}c(5h){16.2U=15;x 16}x 15;A\'7u\':A\'9J\':A\'5e\':x E;1s:q.C(u.F+": 3G, 9K 2Y 1g 9P 1m "+1g+" 2E "+E,1);x L}}G 7D(){V 1k,7Z=9Q(4I.5V(u.1E)),K=u.8j?1R.e3(7Z):7Z;1k=q.1c(\'y.1E\',K);c(1k===\'X\'){q.C(u.F+": 7E 2g e2",4);q.C(u.1E,4);x\'X\'}x\'L\'}G 7b(){c(q.1P()){V 5n=0,7T=0,i=0,1a;1d.1e=q.11(\'y.1e\');1d.1n=q.11(\'y.1n\');1d.O.1J=0;c(u.4l===0||u.4j===0){q.C(u.F+": 3G, I e4 e5 ac as 2C 4l 9V 3Q 9R 7U e6",2);x\'L\'}1a=1H(q.11(\'y.1j.1t\'),10);q.C(u.F+": 9R dN 1S "+1a);c(1a>0){1a=1a-1;i=1a;1w(i>=0){5n=25(q.11(\'y.1j.\'+i+\'.O.1J\'));q.C(u.F+\': 89 dM: \'+5n);c(!51(5n)){1d.O.1J+=25(5n)}19{q.C(u.F+": du 2D a 7M 9S 1j."+i+".O.1J. 4C 7G be a dt/7Q 7A dv 2C dw.dx.",2)}c(q.11(\'y.1j.\'+i+\'.1e\')===\'3W\'){7T+=1}i-=1}}q.C(u.F+" a0 O "+q.1c(\'y.O.1J\',1d.O.1J.1q()));c((1d.O.1F-1d.O.1G)===0){q.C(u.F+": ah by ag 1m 3C - 3J "+1d.O.1F,2);q.1c(\'y.O.1D\',\'1\')}19{1d.O.1D=((1d.O.1J-1d.O.1G)/(1d.O.1F-1d.O.1G)).1q();q.C(u.F+": 89 ae = "+1d.O.1D,3);q.1c(\'y.O.1D\',2w(1d.O.1D,7))}1d.1U=(7T/u.4j).1q();q.1c(\'y.1U\',2w(1d.1U,7));1d.1e=(25(1d.1U)>=25(1d.2S))?\'3W\':\'4D\';q.1c(\'y.1e\',1d.1e);q.C(u.F+": ds/dr 7Y - dm 1D O:"+25(1d.O.1D)+" dl. "+25(1d.2r),3);1d.1n=(25(1d.O.1D)>=25(1d.2r))?\'3M\':\'88\';q.1c(\'y.1n\',1d.1n);x{dn:1d.O.1D,1n:1d.1n,1U:1d.1U,1e:1d.1e}}x 1Y()}G 9s(){c(q.1P()){V Q="y.3d.",1a=q.11(Q+\'1t\'),3n=[],16={},i;c(!1x(1a)){x\'L\'}1a-=1;i=0;1w(i<=1a){Q+=i+\'.\';16.3H=q.11(Q+\'3H\');16.21=q.11(Q+\'21\');16.1C=q.11(Q+\'1C\');3n.3c(16);16={};i+=1}x 3n}x 1Y()}G 80(9T){V 84=\'y.1n\',cs=\'y.1e\',5B=q.3i(\'1n\'),5b=q.3i(\'1e\'),5E=1l.11(84),5w=1l.11(cs),83=L,5t=L;c(5E==="3M"||5E==="88"){83=X}c(5w==="3W"||5w==="4D"){5t=X}c(q.3i(\'3u\')===\'6a\'||9T){c(5E!==5B&&!83){q.C(u.F+": 9H 1s do 3I 3p "+5B,3);1l.1c(84,5B)}c(q.20()==="1.2"&&u.4N==="1e"&&!5t){1l.1c(cs,5b)}19{c(5w!==5b&&!5t){q.C(u.F+": 9H 1s dq 3I 3p "+5b,3);1l.1c(cs,5b)}}}}N.4n=G(){V 5K=\'\',4V=\'\',4a=\'\';q.C(u.F+": I am 9E...",3);c(!4H){4H=X;u.7F=7J();5K=q.11(\'y.43\');c(u.9v==="dp"){u.43=4I.aI(5K)}19{5K.5F(28 9w("([^?=&]+)(=([^&]*))?","g"),G($0,$1,$2,$3){u.43[$1]=$3})}q.C(u.F+": dy 2g:",4);q.C(u.43,4);u.1L=q.11(\'y.1L\');u.2H=q.11(\'y.2H\');c(u.1L==="dz"||u.2H===\'\'||u.2H===\'87\'){q.C(u.F+": dI...",4);u.21=q.11(\'y.21\');u.1E=u.8j?1R.dH(q.11(\'y.1E\')):q.11(\'y.1E\');c(u.1E.R>0&&!1x(u.1E)){q.C(u.F+": 5u 2O K 2f 3D a dJ dK",4);u.1E=u.9q?4I.aI(u.1E):u.1E;q.C(u.1E,4);c(u.2H===""){u.2H="87"}}19{q.C(u.F+": 9r 28 2O K 2f",4)}}19{q.C(u.F+": dL 3t dG N 4e dF 2E 2V 2H E.",4);q.C(u.F+": 9r 28 2O K 2f",4)}4V=q.11(\'y.2S\');c(!1x(4V)&&4V!=="-1"){1d.2S=4V}4a=q.11(\'y.2r\');c(!1x(4a)&&4a!=="-1"){c(25(4a>1)){1d.2r=((25(4a)*10)/33).1q()}u.2r=1d.2r}1d.1e=q.11(\'y.1e\');1d.1n=q.11(\'y.1n\');u.3d=9s();c(u.3d!==\'L\'){1f.2j(1l,\'dB\',{K:u.3d})}u.3b=q.11(\'y.3b\');c(9x(u.3b)){c(u.9y){q.C(u.F+": 4C 4e 4W a 31 3t, I am 9E 2C dA 1m "+u.3b+"...");1l.9A()}}19{q.C(u.F+": 4C 1S 1r dC 3t dD. "+u.3b)}}19{q.C(u.F+": 7r 4G 7j 4n! I dE\'t eg eh eU 1B eT N eV eW 3F.",2);x L}x X};N.eX=G(K){c(q.1P()){c(!1x(K.4l)){u.4l=K.4l}c(!1x(K.4j)){u.4j=K.4j}c(!1x(K.3J)){1d.O.1G=2w(K.3J,7);q.1c(\'y.O.1G\',1d.O.1G.1q())}c(!1x(K.3C)){1d.O.1F=2w(K.3C,7);q.1c(\'y.O.1F\',1d.O.1F.1q())}x\'X\'}x 1Y()};N.9A=G(){V 3t=q.6w(u.3b)*10;9B(9Y,3t)};N.C=q.C;N.11=q.11;N.1c=q.1c;N.eS=G(){c(q.1P()){x u.1L}x 1Y()};N.eR=G(){c(q.1P()){x u.2H}x 1Y()};N.eN=G(v){c(q.1P()){u.21=v.1q();x q.1c(\'y.21\',u.21)}x 1Y()};N.eM=G(){c(q.1P()){x u.21}x 1Y()};N.eO=7b;N.eP=G(18,7q,K){c(q.1P()){V i=0,1y=u.1E.3L.R;1w(i<1y){c(u.1E.3L[i].18===18){u.1E.3L[i].K=K;q.C(u.F+": 7E 2g 6p",4);q.C(u.1E,4);x 7D()}i+=1}u.1E.3L.3c({\'18\':18,\'7q\':7q,\'K\':K});q.C(u.F+": 7E 2g 31:",4);q.C(u.1E,4);x 7D()}x 1Y()};N.eQ=G(18){c(q.1P()){V i=0,1y=u.1E.3L.R;1w(i<1y){c(u.1E.3L[i].18===18){x u.1E.3L[i].K}i+=1}x\'L\'}x 1Y()};N.eY=G(){x u.7F-7J()};N.eZ=G(K){c(q.1P()){V 1v=q.20(),n,m,i,j,p,Q=\'y.1p.\',2Q,7t=K.1C||q.4t(q.11(Q+q.64(K.18)+\'.1C\')),1C,1N,1k,1y,1b;c(!1f.2J(K)){q.C(u.F+": 1K, 2M 1r 2i a {2f} f8!! f7 "+1Z K+" 2n.",1);x\'L\'}c(1x(K.18)){q.C(u.F+": 1K, 2M 2i a 2Y ap a 4r\\f9 fa:\\n"+K.27,1);1m(1b 1B K){c(K.3g(1b)){q.C("1b: "+1b+"\\n E: "+K[1b])}}x\'L\'}c(1f.1g(K.1C)==="3E"){1C=q.20()==="1.2"?q.6q(K.1C):q.55(K.1C)}K.1C=1C;c(1f.1g(K.1N)==="3E"){1N=(K.1N.3x()-7t.3x())*0.ar;K.1N=q.20()==="1.2"?q.4f(1N*2y):q.4p(1N*2y,X)}19 c(K.37.R>0&&!1x(K.37)){K.1N=28 2F();1N=(K.1N.3x()-7t.3x())*0.ar;K.1N=q.20()==="1.2"?q.4f(1N*2y):q.4p(1N*2y,X)}2Q=\'1t\';c(u.ay==="fb"||1v==="1.2"){n=q.11(Q+2Q)==="-1"?\'0\':q.11(Q+2Q)}19{n=q.64(K.18);c(1x(n)){n=q.11(Q+2Q)==="-1"?\'0\':q.11(Q+2Q)}}Q+=n+".";c(!1x(K.18)){1k=q.1c(Q+\'18\',K.18)}c(!1x(K.1g)){c(q.20()==="1.2"){1o(K.1g){A"5e":A"5f-38-1B":K.1g="38-1B";J;1s:J}}1k=q.1c(Q+\'1g\',K.1g)}2Q=\'1j.1t\';c(K.1j!==2d){i=0;1y=K.1j.R;1w(i<1y){m=q.az(n,K.1j[i].18);c(m===\'L\'){m=q.11(Q+2Q)===\'-1\'?\'0\':q.11(Q+2Q)}1k=q.1c(Q+\'1j.\'+m+\'.18\',K.1j[i].18);i+=1}}c(K.1C!==2d){c(1v!=="1.2"){1k=q.1c(Q+\'1C\',K.1C)}19{1k=q.1c(Q+\'3t\',K.1C)}}2Q=\'1M.1t\';c(1f.2x(K.1M)){j=0;1y=K.1M.R;1w(j<1y){p=q.aF(n,K.1M[j].2z);q.C(u.F+": f6 3p aG 2z "+K.1M[j].2z+" f5 1B "+p,4);c(p===\'L\'){p=q.11(Q+2Q)===\'-1\'?0:q.11(Q+2Q);q.C(u.F+": p 1S f1 "+p,4)}c(p==="5h"){q.C(u.F+": 1K, I\'aA 4G f0 N 5g 3n 1g \'"+K.1M[j].2z+"\'",2)}19{1k=q.1c(Q+\'1M.\'+p+\'.2z\',65(K.1g,K.1M[j].2z))}j+=1}}19{q.C(u.F+": f2 f3 ao f4 7B 7H, a8 eL\'t an 6n.",1)}c(!1x(K.4w)){1k=q.1c(Q+\'4w\',K.4w)}c(!1x(K.37)){c(1v!=="1.2"){1k=q.1c(Q+\'37\',65(K.1g,K.37))}19{1k=q.1c(Q+\'a7\',65(K.1g,K.37))}}c(!1x(K.1k)){1k=q.1c(Q+\'1k\',K.1k)}c(!1x(K.1N)){1k=q.1c(Q+\'1N\',K.1N)}c(1v!=="1.2"){c(!1x(K.27)){1k=q.1c(Q+\'27\',K.27)}}x 1k}x 1Y()};N.eK=G(18){c(q.1P()){V n,Q=\'y.1p.\',m,p,i=0,16={},5a,5m,1C,1N;n=q.64(18);c(n===\'L\'){x n}Q+=n+\'.\';16.18=18;16.1g=q.11(Q+\'1g\');m=q.11(Q+\'1j.1t\');5a=q.11(Q+\'1C\');5m=q.11(Q+\'1N\');1C=(4U(5a))?q.4t(5a):5a;1N=(4U(5m))?q.4t(5m):5m;16.1j=[];c(m!==\'L\'){1w(ieJ){q.C(u.F+": 3G, 46 3D 7m 3Z 6i 3Q eE 2C 2T. eD:"+22.R,2)}Q+=n+\'.\';q.1c(Q+\'3H\',22);q.1c(Q+\'21\',aj);x q.1c(Q+\'1C\',q.55(3E))}x 1Y()};N.ez=G(){V 4M=1,ad=q.11(\'y.O.1J\'),3J=q.11(\'y.O.1G\'),3C=q.11(\'y.O.1F\');c((3C-3J)===0){q.C(u.F+": ah by ag 1m 3C - 3J "+3C,2);q.1c(\'y.O.1D\',4M)}19{4M=((ad-3J)/(3C-3J)).1q();q.C(u.F+": 89 ae = "+4M,3);q.1c(\'y.O.1D\',2w(4M,7))}c(1d.1e!=="3W"){1d.1e=(25(1d.1U)>=25(1d.2S))?\'3W\':\'4D\';q.1c(\'y.1e\',1d.1e)}c(1d.1n!=="3M"){1d.1n=(25(4M)>=25(1d.2r))?\'3M\':\'88\'}q.1c(\'y.1n\',1d.1n);x\'X\'};N.85=G(){c(q.1P()&&u.85){q.1c(\'y.O.1D\',\'1\');q.1c(\'y.O.1G\',\'0\');q.1c(\'y.O.1F\',\'2y\');q.1c(\'y.O.1J\',\'2y\');q.1c(\'y.1n\',\'3M\');q.1c(\'y.1U\',\'1\');x q.1c(\'y.1e\',\'3W\')}x 1Y()};N.68=G(){c(q.1P()){x q.68(\'\')}x 1Y()};N.2O=G(){c(q.1P()){q.C(u.F+": I am eA...",3);q.1c(\'y.29\',\'2O\');4H=L;x q.69()}x 1Y()};N.6a=G(){c(q.1P()){q.C(u.F+": I am eB...",3);q.1c(\'y.29\',\'3K\');80(X);4H=L;x q.69()}x 1Y()};N.6b=G(){c(q.1P()){q.C(u.F+": I am eC 7O...",3);q.1c(\'y.29\',\'3t-7O\');80(X);4H=L;x q.69()}x 1Y()};N.4U=4U;N.20=q.20;N.31=G(n,v){1o(n){A"1v":A"4T":A"4y":A"F":A"2r":A"2S":4L(4B);J;1s:u[n]=v;J}x(5x===L)};N.3i=G(n){c(u[n]===2d){4L(4z);x L}x u[n]};1f.3s(1R,\'7N\',af);1f.3s(1R,\'ey\',6l);1f.3s(1R,\'7k\',6l);1f.3s(q,\'5T\',G(e){5H(e.24)})}',62,1037,'||||||||||||if||||||||||||||scorm||||settings|||return|cmi||case||debug||value|prefix|function|||break|data|false||this|score||p1|length|||str|var||true||||getvalue||tiers|API|arr|obj||id|else|count|key|setvalue|buffer|completion_status|Utl|type|nn|name|objectives|result|self|for|success_status|switch|interactions|toString|not|default|_count|lms|version|while|isBadValue|len|callback|nCs|in|timestamp|scaled|suspend_data|max|min|parseInt|core|raw|Developer|mode|correct_responses|latency|you|isConnectionActive|event|window|is|null|progress_measure|join|events|Math|notStartedYet|typeof|getAPIVersion|location|msg||error|parseFloat||description|new|exit|win|split|errorCode|undefined|target|object|Data|args|passing|triggerEvent|case_matters|lang|order_matters|instead|path|isActive|padTime|scaled_passing_score|substring|context|options|substr|trueRound|isArray|100|pattern|re|_events|the|got|on|Date|_children|entry|indexOf|isPlainObject|ig|console|your|ka|suspend|2004|p2|sv|completion_threshold|limit|answers|LMS|diagnostic|nH|interaction|of|comments_from_learner|set|defaults|1000|def1|initialized||learner_response|fill|nError|floor|max_time_allowed|push|comments_from_lms|def2|code|hasOwnProperty|performance|get|tID|setData|Commit|nM|response|array|to|connection|session_time|addEvent|time|exit_type|unknown|learner_preferences|getTime|getObjLength|student_preferences|The|Model|scoreMax|from|date|once|Sorry|comment|status|scoreMin|normal|pages|passed|index|extend|bErr|or|Error|makeBoolean|sum|getLastErrorMessage|getDiagnostic|completed|findResponseType|search|was|terminated|handler|call|launch_data|Termination|General|message|Warning|document|names|tmpScaledPassingScore|attr|getLastErrorCode|only|SCO|centisecsToSCORM12Duration|String|ctx|throwVocabError|totalObjectives|language|totalInteractions|Element|start|lvl|centisecsToISODuration|Objective|ID|Aborted|isoStringToDate|round|try|weighting|total_time|modifiedDate|404|noconsole|405|This|incomplete|nD|catch|already|isStarted|JSON|nMin|offset|triggerWarning|scoreScaled|scorm_status_persist|dec|credit|parent|reg|over|createDate|isISO8601|tmpCompletionThreshold|has|nY|etype|nS|text|isNaN|6000|360000|time_limit_action|isoDateToString|t_arr|03|element|eventsApi|ts|defcs|Initialization|isWindow|other|long|correct|match|Code|Message|nDiagnostic|lmsconnected|ly|tmpRaw|apply|listeningTo|iso8601Exp|Failure|retain|isCompletionSet|Returning|Events|storcs|isError|off|audio_captioning|matters|defss|matching|allEvents|storss|replace|delivery_speed|triggerException|choice|student_data|tmpLaunchData|audio_level|words|sequencing|GetValue|uoffset|requests|After|Before|exception|01|stringify|issue|utcdate|resultDate|Month||Day|ignore|scorm_strict|getInteractionByID|encodeInteractionType|read|8640000|commit|terminate|finish|timeout|SCOBot_API_1484_11|StoreData|calcAverage|latency_arr|strict|SCOBotUtil|empty|use|startDate|exitSCO|Year|Array|No|Set|dateToscorm12Time|Initialize|session_secs|been|attempted|toLowerCase|ISODurationToCentisec|Sec|must|Min|doc|Hour|ignoring|bookmark|403|getData|scorm12toMS|values|that|SCORMs|SetValue|time_action|isoDateToStringUTC|findAPI|isFunction|Terminate|UTC|GMT|str2|time_type|types|Terminated|arr2|consider|val|class_types|By|07|test|Interaction|SB|Getting|throwUnimplemented|learner_id|cancelable|learner_name|Not|checkProgress|2015|Offset|checkLoaded|num_arr|351|isElement|bTFound|called|unload|3155760000|learner|bubbles|getObjectiveByID|262980000|title|You|nparam|orig_timestamp|numeric|Boolean|60000|MM|prototype|elen|objective|Correct|isReady|setSuspendData|Suspend|startTime|may|Responses|getTimezoneOffset|currentTime|decodeInteractionType|end|NaN|loaded|out|API_1484_11|local|trigger|triggerEvents|totalObjectivesCompleted|are|isRunning|param|attempts|check|cleansedData|updateStatus|_|timebits|isSuccessSet|ss|happyEnding|eventSplitter|resume|failed|Score|offsetMinutes|00|log|mil|lesson_mode|Object|errors|adl|no|base64|action|rest|PT0H0M0S|suspendDataUsageStatistic|top|Possible|bPrecise|9999|Cross|domain|Value|use_standalone|info|warn|getMinutes|getSeconds|responses|getHours|08|132|SCOBotBase|equal|GetLastError|lesson_location|lesson_status|64000|mastery_score|LMSGetValue|Ignoring|checkExitType|CMI|0000|Get|audio|speed|please|verify|cmiGetValue|isWriteOnly|Unexpected|123|4096|Constructing|isReadOnly|saveDate|lat|402|408|GetErrorString|Connectivity|406|string|these|ssp|Ms|shift|Please|write|pow|throwGeneralSetError|roundVal|write_only|read_only|GetDiagnostic|unique|401|133|order|useJSONSuspendData|Creating|getCommentsFromLMS|concat|arguments|launch_data_type|RegExp|isISO8601Duration|initiate_timer|eventTypes|startTimer|setTimeout|CustomEvent|createEvent|starting|initializers|_callback|Overriding|throw_alerts|likert|invalid|number|truncate|characters|will|detected|cleanseData|Objectives|converting|ending|remove|and|_listeningTo|delete|timesUp|nlen|Setting||||can|did|HTMLEvents|student_response|it|HTMLElement|May||Progress|scoreRaw|Scaled|initSCO|Zero|Division|comments|loc|nodeType||||wrong|without|addEventListener|001|||onreadystatechange|documentElement|attachEvent|doScroll|interaction_mode|getInteractionObjectiveByID|ve|constructor|hasOwn|instanceof|olen|getInteractionCorrectResponsesByPattern|locate|exceeds|parse|standalone|Retrieve|badValues|2011|_version|yet|Only|iso8601Dur|Store|load||44PM||Initialized|04|SCOBot|init|Is|initialize|num|cleanseExp|If|exec|all|continue|defaultView|Usage|modifiers|nSuspend|view|runtimedata||altKey|ctrlKey|Range|change|shiftKey|abort|select|metaKey|repeat|Mismatch|Number|detail|left|23PM|nodeName|2013|Function|initCustomEvent|Read||05|locale|KeyboardEvent|initEvent|MouseEvents|clientY|click|keydown|dblclick|trace|none|mousedown|focus|keyup|resize|Of|Type|scroll|input|Out|resource|mouseup|mouseout|56AM|contextmenu|Write|blur|clientX|submit|43PM|Found|Prevented|reset|mouseover|mousemove|button|391|Can|add|_listenId|entirely|bookmarking|Some|might|stopListening|specified|logout|created|101|void|maximum_time_allowed|learner_preference|keys|User|Simulated||initio|createdate|Initializing|2010|15AM|Local|moddate|name1|value1|there|isEmpty|value3|name3|name2|value2|407|first|Established|143|DOMContentLoaded|readyState|diganostic|detachEvent|complete|before|201|Undefined|elements|Dependency|isPrototypeOf||45PM|Argument|301|142|proper|fireEvent|createEventObject|dispatchEvent|104|Already|102|103|Content|Instance|122||vocabulary|toFixed|113|111|112|Unimplemented|fail|vs|Calculated|score_scaled|success|json|completion|Fail|Pass|global|We|via|imsmanifest|xml|Launch|review|timer|comments_lms|ISO8601|duration|don|based|running|atob|Resuming|prior|session|First|Raw|Count|Up|Times|Time|Limit|alert|Response|valid|xhh|unloading|uhhh|didn|toPrecision|Consider|using|saved|btoa|cannot|calculate|zero|word|expected|exceed|slice|Yours||have||lose|see|much|pass|Adding|What||below|Did|found|codes|Passed|setObjective|bad|ignored|proceed||receive|getObjective|onbeforeunload|gradeIt|suspending|finishing|timing|Length|exceeded|returned|setCommentFromLearner|Review|logs|4000|getInteraction|wasn|getBookmark|setBookmark|progress|setSuspendDataByPageID|getSuspendDataByPageID|getEntry|getMode|doing|point|more|than|setTotals|getSecondsFromStart|setInteraction|added|now|Something|went|with|resulted|Trying|Got|argument|nSee|question|journaled|done|Exceeded|against|pushing|Verify|getting|recorded|revising|stopping|255|student_id|LMSGetDiagnostic|student_name|Requesting|namespace|does|support|tversion|Called|tModified|LMSInitialize|notify|compatibility|LMSCommit|Committing|LMSSetValue|forcing|Locate|where|after|LMSGetErrorString|LMSGetLastError|getUTCMilliseconds|getUTCSeconds|getFullYear|getMonth|getMilliseconds|getDate|getUTCMinutes|getUTCHours|3600000|500|getUTCFullYear|getUTCMonth|getUTCDate|January|February|December|November|setMilliseconds|given|yes|October|September|April|March|June|July|August|administrator|incorrect|calls|getLastError|isLMSConnected|checkLatency|SCORM|mimic|communication||included|Local_API_1484_11|ll|09|Completion|Loaded|onload|being|unloaded|3rd|scorm_edition|2014|state|querystring|unable|33AM|LMSFinish|Lost|Terminating|located|could|Begin|Status|opener|Pattern|Match'.split('|'),0,{})); \ No newline at end of file diff --git a/QUnit-Tests/js/scorm/SCOBot.js b/QUnit-Tests/js/scorm/SCOBot.js index ef5d770..db8299d 100644 --- a/QUnit-Tests/js/scorm/SCOBot.js +++ b/QUnit-Tests/js/scorm/SCOBot.js @@ -34,7 +34,7 @@ * @event exception, load, unload, message, continue, comments_lms * * @author Cybercussion Interactive, LLC - * @license Copyright (c) 2009-2014, Cybercussion Interactive LLC + * @license Copyright (c) 2009-2015, Cybercussion Interactive LLC * As of 3.0.0 this code is under a Creative Commons Attribution-ShareAlike 4.0 International License. * @requires SCOBotBase, SCOBotUtil * @version 4.0.4 @@ -42,8 +42,8 @@ * @constructor */ /*! - * SCOBot, Updated July 23rd, 2014 - * Copyright (c) 2009-2014, Cybercussion Interactive LLC. All rights reserved. + * SCOBot, Updated jan 3rd, 2015 + * Copyright (c) 2009-2015, Cybercussion Interactive LLC. All rights reserved. * As of 3.0.0 this code is under a Creative Commons Attribution-ShareAlike 4.0 International License. */ function SCOBot(options) { @@ -54,7 +54,7 @@ function SCOBot(options) { defaults = { version: "4.0.5", createDate: "04/07/2011 09:33AM", - modifiedDate: "12/08/2014 01:24PM", + modifiedDate: "01/03/2014 14:12PM", prefix: "SCOBot", // SCOBot default parameters launch_data: {}, @@ -361,7 +361,7 @@ function SCOBot(options) { scorm.debug(settings.prefix + ": Developer, you're not passing a array type for sequencing/choice. I got " + typeof value + " instead\n" + JSON.stringify(value), 1); value = ''; } - /* falls through */ + /* falls through */ case 'sequencing': // 2004 a[,]b and in 1.2 this was a alpha numeric string: Diagnosis SCORM 2004 format is fine. if (Utl.isArray(value)) { diff --git a/QUnit-Tests/js/scorm/SCOBotBase.js b/QUnit-Tests/js/scorm/SCOBotBase.js index 7d647d1..c263afe 100644 --- a/QUnit-Tests/js/scorm/SCOBotBase.js +++ b/QUnit-Tests/js/scorm/SCOBotBase.js @@ -35,15 +35,15 @@ * @event debug, getvalue, setvalue, exception, terminated, StoreData * * @author Cybercussion Interactive, LLC - * @license Copyright (c) 2009-2014, Cybercussion Interactive LLC + * @license Copyright (c) 2009-2015, Cybercussion Interactive LLC * As of 3.0.0 this code is under a Creative Commons Attribution-ShareAlike 4.0 International License. * @version 4.0.3 * @param options {Object} override default values * @constructor */ /*! - * SCOBotBase, Updated July 23rd, 2014 - * Copyright (c) 2009-2014, Cybercussion Interactive LLC. + * SCOBotBase, Updated Jan 3rd, 2015 + * Copyright (c) 2009-2015, Cybercussion Interactive LLC. * As of 3.0.0 this code is under a Creative Commons Attribution-ShareAlike 4.0 International License. */ function SCOBotBase(options) { @@ -54,7 +54,7 @@ function SCOBotBase(options) { defaults = { version: "4.0.5", createDate: "04/05/2011 08:56AM", - modifiedDate: "12/08/2014 01:23PM", + modifiedDate: "01/03/2015 14:12PM", debug: false, isActive: false, throw_alerts: false, @@ -152,7 +152,7 @@ function SCOBotBase(options) { if (lvl < 3 && settings.throw_alerts) { alert(msg); } - return false; + return true; // altered Jan 3rd, 2015 - this conflicted with debugging off on setObjective for QUnit test } /** diff --git a/QUnit-Tests/js/scorm/SCOBotUtil.js b/QUnit-Tests/js/scorm/SCOBotUtil.js index cc2e9fa..e5c9bc5 100644 --- a/QUnit-Tests/js/scorm/SCOBotUtil.js +++ b/QUnit-Tests/js/scorm/SCOBotUtil.js @@ -42,14 +42,14 @@ * https://github.com/cybercussion/SCOBot * * @author Cybercussion Interactive, LLC - * @license Copyright (c) 2009-2014, Cybercussion Interactive LLC + * @license Copyright (c) 2009-2015, Cybercussion Interactive LLC * As of 3.0.0 this code is under a Creative Commons Attribution-ShareAlike 4.0 International License. * @version 4.0.5 * @constructor */ /*! - * SCOBot Utility, Updated July 23rd, 2014 - * Copyright (c) 2009-2013, Cybercussion Interactive LLC. All rights reserved. + * SCOBot Utility, Updated Jan 3rd, 2015 + * Copyright (c) 2009-2015, Cybercussion Interactive LLC. All rights reserved. * As of 3.0.0 this code is under a Creative Commons Attribution-ShareAlike 4.0 International License. */ var SCOBotUtil = function () { @@ -57,7 +57,7 @@ var SCOBotUtil = function () { "use strict"; var version = "1.0.4", createDate = "07/23/2013 03:23PM", - modifiedDate = "12/8/2014 02:16PM", + modifiedDate = "01/03/2015 14:12PM", isReady = false, types = ["Boolean", "Number", "String", "Function", "Array", "Date", "RegExp", "Object"], class_types = [], diff --git a/QUnit-Tests/js/scorm/SCOBot_API_1484_11.js b/QUnit-Tests/js/scorm/SCOBot_API_1484_11.js index 2b4dda4..9ebb25e 100644 --- a/QUnit-Tests/js/scorm/SCOBot_API_1484_11.js +++ b/QUnit-Tests/js/scorm/SCOBot_API_1484_11.js @@ -18,7 +18,7 @@ * @event StoreData * * @author Cybercussion Interactive, LLC - * @license Copyright (c) 2009-2014, Cybercussion Interactive LLC + * @license Copyright (c) 2009-2015, Cybercussion Interactive LLC * As of 3.0.0 this code is under a Creative Commons Attribution-ShareAlike 4.0 International License. * @requires SCOBotUtil, SCOBotBase * @version 4.0.0 @@ -26,8 +26,8 @@ * @constructor */ /*! - * Local_API_1484_11, Updated January 3rd, 2014 - * Copyright (c) 2009-2014, Cybercussion Interactive LLC. + * Local_API_1484_11, Updated January 3rd, 2015 + * Copyright (c) 2009-2015, Cybercussion Interactive LLC. * As of 3.0.0 this code is under a Creative Commons Attribution-ShareAlike 4.0 International License. */ function SCOBot_API_1484_11(options) { @@ -35,9 +35,9 @@ function SCOBot_API_1484_11(options) { "use strict"; var Utl = SCOBotUtil, defaults = { - version: "4.0.0", + version: "4.0.5", createdate: "07/17/2010 08:15AM", - moddate: "07/24/2014 10:34PM", + moddate: "01/03/2015 14:12PM", prefix: "SCOBot_API_1484_11", errorCode: 0, diagnostic: '', diff --git a/QUnit-Tests/js/test/scobot-prod.js b/QUnit-Tests/js/test/scobot-prod.js new file mode 100644 index 0000000..c326574 --- /dev/null +++ b/QUnit-Tests/js/test/scobot-prod.js @@ -0,0 +1,1315 @@ +/*global SCOBotUtil, QUnit, ok, module, test, strictEqual, deepEqual, equal, SCOBotBase, SCOBot, debug, enableDebug, learner_name, learner_id */ +/* + * Hi, + * This QUnit test is roughly 233 tests against the SCORM 2004 specification. (There is always room for more) + * There is a lot of conditional tests (first time, resume, scorm versions, local, LMS etc ...) + * You can always adjust these tests to fit your design goals. + * If you are testing for SCORM 1.2, this does some damage control rolling back the calls from 2004. + * Beware however, there are very different namespaces and read/write properties between the specifications. + * In other words "not all tests will pass". You attempt to read something that's write only, it will fail. + * You attempt to validate a status that's not supported, it will fail. It doesn't mean the LMS failed to + * support your call, it just means the tests below are angled towards SCORM 2004 and there may not be a + * fallback option available. Or the 'strictEqual' doesn't match what SCORM 1.2 responds with. + * + * jQuery requirement lifted in 4.0.0 + * Modified to exclude debug log, and modified tests slight to run without debugging. + */ +QUnit.config.reorder = false; +var $ = SCOBotUtil, + scorm = new SCOBotBase({ + debug: false, // edit + throw_alerts: false, // edit + time_type: 'GMT', // edit + exit_type: 'suspend', // edit + success_status: 'unknown' // edit + }), + SB = new SCOBot({ + interaction_mode: 'state', // edit + launch_data_type: 'querystring' // edit + }), + entry = 'ab-initio', + version = '1.0', + local = false, + setvalue_calls = 0, + getvalue_calls = 0, +// These things tend to happen during authoring/creation. We'll use this later to put into suspend data + character_str = "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ˜‌‍‎‏–—―‗‘’‚‛“”„†‡•…‰′″‹›‼‾⁄₣₤₧₪₫€℅ℓ№™Ω℮⅓⅔⅛⅜⅝⅞←↑→↓∂√∞∩∫≠≡■□▲△▼○●♀♂♪"; + +$.addEvent(scorm, "setvalue", function (e) { + "use strict"; + setvalue_calls += 1; +}); +$.addEvent(scorm, "getvalue", function (e) { + "use strict"; + getvalue_calls += 1; +}); +$.addEvent(scorm, "StoreData", function (e) { + "use strict"; + SB.debug("--- Call to Store Data was made. ---\nExample: You could use localStorage to hold the student attempt.\nSee Object below:", 3); + SB.debug(e.runtimedata); +}); +$.addEvent(scorm, "terminated", function (e) { + "use strict"; + SB.debug("SetValue Calls: " + setvalue_calls + "\nGetValue Calls: " + getvalue_calls, 4); +}); + +// Much of SCOBOT is a bit auto-pilot so several SCORM calls may be made on one API reference. +module("SCOBot"); +// Adjusted to only work if SCOBot 'loaded' event fires +$.addEvent(SB, 'load', function (e) { + "use strict"; + SB.debug("------SCOBot Fired Load Event Example: your player can begin. -------"); + // Debug + test("SB.debug", function () { + var sub_method = SB.debug; + ok(sub_method("Error Message", 1), "Valid error message"); + ok(sub_method("Warning Message", 2), "Valid warning message"); + ok(sub_method("General Message", 3), "Valid general message"); + ok(sub_method("Log Message", 4), "Valid log message"); + ok(sub_method("Bogus Message", 5), "Invalid log message"); + }); + + test("ISO 8601 UTC Time", function () { + scorm.set("time_type", "UTC"); + strictEqual(SB.isISO8601('2012-02-12T00:37:29.0Z'), true, 'Checking a UTC example 2012-02-12T00:37:29.0Z'); + strictEqual(SB.isISO8601('2012-02-12T00:37:29'), false, 'Checking a non-UTC example 2012-02-12T00:37:29'); + strictEqual(SB.isISO8601('2012-02-1200:37:29'), false, 'Checking a malformed example 2012-02-1200:37:29'); + var date = scorm.isoStringToDate('2012-03-20T17:47:54.0Z'); // PDT + + // Due to time zones some quick code to adjust + Date.prototype.stdTimezoneOffset = function() { + var fy=this.getFullYear(); + if (!Date.prototype.stdTimezoneOffset.cache.hasOwnProperty(fy)) { + + var maxOffset = new Date(fy, 0, 1).getTimezoneOffset(); + var monthsTestOrder=[6,7,5,8,4,9,3,10,2,11,1]; + + for(var mi=0;mi<12;mi++) { + var offset=new Date(fy, monthsTestOrder[mi], 1).getTimezoneOffset(); + if (offset!=maxOffset) { + maxOffset=Math.max(maxOffset,offset); + break; + } + } + Date.prototype.stdTimezoneOffset.cache[fy]=maxOffset; + } + return Date.prototype.stdTimezoneOffset.cache[fy]; + }; + + Date.prototype.stdTimezoneOffset.cache={}; + + Date.prototype.isDST = function() { + return this.getTimezoneOffset() < this.stdTimezoneOffset(); + }; + var x = new Date(), + PDTOffset = x.stdTimezoneOffset(), //420,// -07:00 * 60 (Doesn't solve daylight savings) + yourOffset = x.getTimezoneOffset(), + newDate = new Date(), + offset = 0; + if (PDTOffset !== yourOffset) { + offset = yourOffset - PDTOffset; + if (x.isDST()) { + alert("dst in effect"); + } + } + newDate.setTime(date.getTime() + (offset * 60000)); // great, sets the time, but not the timezone + // No way I'm aware to tweak the timezone without doing heavier manipulation. + strictEqual(newDate.toString().split("GMT")[0] + "GMT-0700 (PDT)", 'Tue Mar 20 2012 10:47:54 GMT-0700 (PDT)', 'Checking ISO8601 UTC String to Date equals - Tue Mar 20 2012 10:47:54 GMT-0700 (PDT)'); + }); + test("ISO 8601 Time", function () { + // non UTC (This was all I could get to work con cloud.scorm.com) + scorm.set("time_type", ""); + strictEqual(SB.isISO8601('2012-02-27T15:33:08'), true, 'Checking a non-UTC example 2012-02-27T15:33:08'); + strictEqual(SB.isISO8601('2012-02-1200:37:29'), false, 'Checking a malformed example 2012-02-1200:37:29'); + strictEqual(SB.isISO8601('2012-02-12T00:37:29Z'), false, 'Checking a UTC example 2012-02-12T00:37:29Z'); + }); + test("ISO 8601 GMT Time", function () { + // GMT + scorm.set("time_type", "GMT"); + strictEqual(SB.isISO8601('2009-03-24T16:24:32.5+01:00'), true, 'Checking a GMT example 2009-03-24T16:24:32.5+01:00'); + strictEqual(SB.isISO8601('2012-02-27T15:33:08.08:00'), false, 'Checking a GMT example 2012-02-27T15:33:08.08:00'); + // This can be adjusted to your date, but this mainly just checking that a time stamp can be converted back to a date. + var date = scorm.isoStringToDate('2012-03-20T10:47:54.0-07:00'); // PDT + // Due to time zones some quick code to adjust + var x = new Date(), + PDTOffset = x.stdTimezoneOffset(),// -07:00 * 60 (Doesn't solve daylight savings) + yourOffset = x.getTimezoneOffset(), + newDate = new Date(), + offset = 0; + + if (PDTOffset !== yourOffset) { + offset = yourOffset - PDTOffset; + } + newDate.setTime(date.getTime() + (offset * 60000)); // great, sets the time, but not the timezone + // No way I'm aware to tweak the timezone without doing heavier manipulation. + strictEqual(newDate.toString().split("GMT")[0] + "GMT-0700 (PDT)", 'Tue Mar 20 2012 10:47:54 GMT-0700 (PDT)', 'Checking ISO8601 String to Date equals - Tue Mar 20 2012 10:47:54 GMT-0700 (PDT)'); + }); + test("Set Totals", function () { + strictEqual(SB.setTotals({ + totalInteractions: '10', + totalObjectives: '10', + scoreMin: '0', + scoreMax: '16.083' + }), 'true', 'Setting SCO totals'); + // Based on Entry we may be able to tell if we've been ran before. + SB.debug(">>>>>>>>> TOTALS SET <<<<<<<<<"); + version = SB.getvalue('cmi._version'); + local = version === "Local 1.0"; + }); + test("LMS Connected", function () { + if (local) { + strictEqual(scorm.isLMSConnected(), false, 'Local enabled, should not find a LMS.'); + } else { + strictEqual(scorm.isLMSConnected(), true, 'Local disabled, should find a LMS.'); + } + }); + // SB.start is fired onload, nothing to really test here. We could verify settings however. + test("Mode", function () { + strictEqual(SB.getMode(), 'normal', "Checking that Mode is normal"); + }); + + test("Bookmarking", function () { + if (local) { + // There would be no bookmark unless one was manually set + strictEqual(SB.setBookmark(2), 'true', 'Setting Bookmark to 2'); + strictEqual(SB.getBookmark(), '2', 'Getting Bookmark, should be 2'); + } else { + if (SB.getEntry() === "resume") { + strictEqual(SB.getBookmark(), '2', 'Getting Bookmark, should be 2'); + } else { + strictEqual(SB.setBookmark(2), 'true', 'Setting Bookmark to 2'); + strictEqual(SB.getBookmark(), '2', 'Getting Bookmark, should be 2'); + } + } + }); + + test("Max Time Allowed", function () { + var max_time_allowed = SB.getvalue('cmi.max_time_allowed'); + strictEqual(max_time_allowed, '', "Checking max time allowed ('')"); + // Note, if you update the CAM to pass imsss:attemptAbsoluteDurationLimit please update this test! + }); + + test("Comments from LMS", function () { + strictEqual(SB.getvalue('cmi.comments_from_lms._count'), '0', "Getting Comments from LMS count '0'"); + // UPDATE YOUR TESTS HERE IF YOU INTEND TO CHECK FOR COMMENTS + }); + + test("Check Comments from Learner", function () { + var learner_comment_count = SB.getvalue('cmi.comments_from_learner._count'), + bookmarkCount; + if (SB.getEntry() !== "resume") { + // Verify previous comments + strictEqual(learner_comment_count, '0', "Getting Comments from Learner count '0'"); + } else { + scorm.debug(SB.getSuspendDataByPageID(3)); + bookmarkCount = SB.getSuspendDataByPageID(3).fromLearner; // pull last suspended count to compare + strictEqual(learner_comment_count, bookmarkCount, "Getting Comments from Learner count " + bookmarkCount); // this is getting set each visit aka resume attempt. + } + }); + + test("Set Comment from Learner", function () { + var commentTime = new Date(); + strictEqual(SB.setCommentFromLearner("This is a comment from learner", "QUnit Test", commentTime), 'true', "Setting comment from learner."); + // Expand later if you like, but please update the expected count above. + // Increment the stored counter so on resume after several comments it can be evaluated for correctness. + SB.setSuspendDataByPageID(3, 'countTracker', { + fromLearner: SB.getvalue('cmi.comments_from_learner._count') + }); + }); + + test("Objectives", function () { + var objective; + if (SB.getEntry() !== "resume") { + SB.debug(">>>>>>>>> Setting Objective(s) <<<<<<<<<"); + //SB.debug("Get objective count before the fun begins.... " + SB.getvalue('cmi.objectives._count')); + strictEqual(SB.getvalue('cmi.objectives._count'), '0', "Getting objective._count, should be '0'"); + // For True False + strictEqual(SB.setObjective({ + id: '1_1', // {String} + score: { // {Object} + scaled: '0', // {String} + raw: '0', // {String} + min: '0', // {String} + max: '1.5' // {String} + }, + success_status: 'unknown', // {String} passed, failed, unknown + completion_status: 'not attempted', // {String} completed, incomplete, not attempted + progress_measure: '0', // {String} + description: 'They will answer a true false interaction' // {String} + }), 'true', "Setting Objective True False 1_1 unscored"); + // For Multiple Choice + strictEqual(SB.setObjective({ + id: '2_1', + score: { + scaled: '0', + raw: '0', + min: '0', + max: '2' + }, + success_status: 'unknown', + completion_status: 'not attempted', + progress_measure: '0', + description: 'They will answer a multiple choice interaction' + }), 'true', "Setting Objective Multiple Choice 2_1 unscored"); + // For Fill In + strictEqual(SB.setObjective({ + id: '3_1', + score: { + scaled: '0', + raw: '0', + min: '0', + max: '5.25' + }, + success_status: 'unknown', + completion_status: 'not attempted', + progress_measure: '0', + description: 'They will answer a fill in interaction' + }), 'true', "Setting Objective Fill In 3_1 unscored"); + // For Sequencing + strictEqual(SB.setObjective({ + id: '4_1', + score: { + scaled: '0', + raw: '0', + min: '0', + max: '1.333' + }, + success_status: 'unknown', + completion_status: 'not attempted', + progress_measure: '0', + description: 'They will answer a sequencing interaction' + }), 'true', "Setting Objective Sequencing 4_1 unscored"); + // For Long Fill In + strictEqual(SB.setObjective({ + id: '5_1', + score: { + scaled: '0', + raw: '0', + min: '0', + max: '1' + }, + success_status: 'unknown', + completion_status: 'not attempted', + progress_measure: '0', + description: 'They will answer a long fill in interaction' + }), 'true', "Setting Objective Long Fill In 5_1 unscored"); + // For Matching + strictEqual(SB.setObjective({ + id: '6_1', + score: { + scaled: '0', + raw: '0', + min: '0', + max: '1' + }, + success_status: 'unknown', + completion_status: 'not attempted', + progress_measure: '0', + description: 'They will answer a matching interaction' + }), 'true', "Setting Objective Matching 6_1 unscored"); + // For LikeRT + strictEqual(SB.setObjective({ + id: '7_1', + score: { + scaled: '0', + raw: '0', + min: '0', + max: '1' + }, + success_status: 'unknown', + completion_status: 'not attempted', + progress_measure: '0', + description: 'They will answer a likert interaction' + }), 'true', "Setting Objective LikeRT 7_1 unscored"); + // For Other + strictEqual(SB.setObjective({ + id: '8_1', + score: { + scaled: '0', + raw: '0', + min: '0', + max: '1' + }, + success_status: 'unknown', + completion_status: 'not attempted', + progress_measure: '0', + description: 'They will answer a other interaction' + }), 'true', "Setting Objective Other 8_1 unscored"); + // For Performance + strictEqual(SB.setObjective({ + id: '9_1', + score: { + scaled: '0', + raw: '0', + min: '0', + max: '1' + }, + success_status: 'unknown', + completion_status: 'not attempted', + progress_measure: '0', + description: 'They will answer a performance interaction' + }), 'true', "Setting Objective Performance 8_1 unscored"); + // For Numeric + strictEqual(SB.setObjective({ + id: '10_1', + score: { + scaled: '0', + raw: '0', + min: '0', + max: '1' + }, + success_status: 'unknown', + completion_status: 'not attempted', + progress_measure: '0', + description: 'They will answer a numeric interaction' + }), 'true', "Setting Objective Numeric 8_1 unscored"); + strictEqual(SB.getvalue('cmi.objectives._count'), '10', "Getting objective._count, should be '10'"); + SB.debug(">>>>>>>>> End Setting Objective(s) <<<<<<<<<"); + SB.debug(">>>>>>>>> Verify Objective(s) <<<<<<<<<"); + // Verify These + objective = SB.getObjective('1_1'); + strictEqual(objective.id, "1_1", "Verify Objective id is 1_1"); + strictEqual(objective.score.scaled, "0", "Verify Objective score.scaled is 0"); + strictEqual(objective.score.raw, "0", "Verify Objective score raw is '0'"); + strictEqual(objective.score.min, "0", "Verify Objective score min is '0'"); + strictEqual(objective.score.max, "1.5", "Verify Objective score max is '1.5'"); + strictEqual(objective.success_status, "unknown", "Verify Objective success_status is 'unknown'"); + strictEqual(objective.completion_status, "not attempted", "Verify Objective completion_status is 'not attempted'"); + strictEqual(objective.progress_measure, "0", "Verify Objective progress_measure is '0'"); + strictEqual(objective.description, "They will answer a true false interaction", "Verify Objective description is They will answer a true false interaction"); + + objective = SB.getObjective('2_1'); + strictEqual(objective.id, "2_1", "Verify Objective id is 2_1"); + strictEqual(objective.score.scaled, "0", "Verify Objective score.scaled is '0'"); + strictEqual(objective.score.raw, "0", "Verify Objective score raw is '0'"); + strictEqual(objective.score.min, "0", "Verify Objective score min is '0'"); + strictEqual(objective.score.max, "2", "Verify Objective score max is '2'"); + strictEqual(objective.success_status, "unknown", "Verify Objective success_status is 'unknown'"); + strictEqual(objective.completion_status, "not attempted", "Verify Objective completion_status is 'not attempted'"); + strictEqual(objective.progress_measure, "0", "Verify Objective progress_measure is '0'"); + strictEqual(objective.description, "They will answer a multiple choice interaction", "Verify Objective description is They will answer a multiple choice interaction"); + + objective = SB.getObjective('3_1'); + strictEqual(objective.id, "3_1", "Verify Objective id is 3_1"); + strictEqual(objective.score.scaled, "0", "Verify Objective score.scaled is '0'"); + strictEqual(objective.score.raw, "0", "Verify Objective score raw is '0'"); + strictEqual(objective.score.min, "0", "Verify Objective score min is '0'"); + strictEqual(objective.score.max, "5.25", "Verify Objective score max is '5.25'"); + strictEqual(objective.success_status, "unknown", "Verify Objective success_status is 'unknown'"); + strictEqual(objective.completion_status, "not attempted", "Verify Objective completion_status is 'not attempted'"); + strictEqual(objective.progress_measure, "0", "Verify Objective progress_measure is '0'"); + strictEqual(objective.description, "They will answer a fill in interaction", "Verify Objective description is They will answer a fill in interaction"); + + objective = SB.getObjective('4_1'); + strictEqual(objective.id, "4_1", "Verify Objective id is 4_1"); + strictEqual(objective.score.scaled, "0", "Verify Objective score.scaled is '0'"); + strictEqual(objective.score.raw, "0", "Verify Objective score raw is '0'"); + strictEqual(objective.score.min, "0", "Verify Objective score min is '0'"); + strictEqual(objective.score.max, "1.333", "Verify Objective score max is '1.333'"); + strictEqual(objective.success_status, "unknown", "Verify Objective success_status is 'unknown'"); + strictEqual(objective.completion_status, "not attempted", "Verify Objective completion_status is 'not attempted'"); + strictEqual(objective.progress_measure, "0", "Verify Objective progress_measure is '0'"); + strictEqual(objective.description, "They will answer a sequencing interaction", "Verify Objective description is They will answer a sequencing interaction"); + + objective = SB.getObjective('5_1'); + strictEqual(objective.id, "5_1", "Verify Objective id is 5_1"); + strictEqual(objective.score.scaled, "0", "Verify Objective score.scaled is '0'"); + strictEqual(objective.score.raw, "0", "Verify Objective score raw is '0'"); + strictEqual(objective.score.min, "0", "Verify Objective score min is '0'"); + strictEqual(objective.score.max, "1", "Verify Objective score max is '1'"); + strictEqual(objective.success_status, "unknown", "Verify Objective success_status is 'unknown'"); + strictEqual(objective.completion_status, "not attempted", "Verify Objective completion_status is 'not attempted'"); + strictEqual(objective.progress_measure, "0", "Verify Objective progress_measure is '0'"); + strictEqual(objective.description, "They will answer a long fill in interaction", "Verify Objective description is They will answer a long fill in interaction"); + + objective = SB.getObjective('6_1'); + strictEqual(objective.id, "6_1", "Verify Objective id is 6_1"); + strictEqual(objective.score.scaled, "0", "Verify Objective score.scaled is '0'"); + strictEqual(objective.score.raw, "0", "Verify Objective score raw is '0'"); + strictEqual(objective.score.min, "0", "Verify Objective score min is '0'"); + strictEqual(objective.score.max, "1", "Verify Objective score max is '1'"); + strictEqual(objective.success_status, "unknown", "Verify Objective success_status is 'unknown'"); + strictEqual(objective.completion_status, "not attempted", "Verify Objective completion_status is 'not attempted'"); + strictEqual(objective.progress_measure, "0", "Verify Objective progress_measure is '0'"); + strictEqual(objective.description, "They will answer a matching interaction", "Verify Objective description is They will answer a matching interaction"); + + objective = SB.getObjective('7_1'); + strictEqual(objective.id, "7_1", "Verify Objective id is 7_1"); + strictEqual(objective.score.scaled, "0", "Verify Objective score.scaled is '0'"); + strictEqual(objective.score.raw, "0", "Verify Objective score raw is '0'"); + strictEqual(objective.score.min, "0", "Verify Objective score min is '0'"); + strictEqual(objective.score.max, "1", "Verify Objective score max is '1'"); + strictEqual(objective.success_status, "unknown", "Verify Objective success_status is 'unknown'"); + strictEqual(objective.completion_status, "not attempted", "Verify Objective completion_status is 'not attempted'"); + strictEqual(objective.progress_measure, "0", "Verify Objective progress_measure is '0'"); + strictEqual(objective.description, "They will answer a likert interaction", "Verify Objective description is They will answer a likert interaction"); + + objective = SB.getObjective('8_1'); + strictEqual(objective.id, "8_1", "Verify Objective id is 8_1"); + strictEqual(objective.score.scaled, "0", "Verify Objective score.scaled is '0'"); + strictEqual(objective.score.raw, "0", "Verify Objective score raw is '0'"); + strictEqual(objective.score.min, "0", "Verify Objective score min is '0'"); + strictEqual(objective.score.max, "1", "Verify Objective score max is '1'"); + strictEqual(objective.success_status, "unknown", "Verify Objective success_status is 'unknown'"); + strictEqual(objective.completion_status, "not attempted", "Verify Objective completion_status is 'not attempted'"); + strictEqual(objective.progress_measure, "0", "Verify Objective progress_measure is '0'"); + strictEqual(objective.description, "They will answer a other interaction", "Verify Objective description is They will answer a other interaction"); + + objective = SB.getObjective('9_1'); + strictEqual(objective.id, "9_1", "Verify Objective id is 9_1"); + strictEqual(objective.score.scaled, "0", "Verify Objective score.scaled is '0'"); + strictEqual(objective.score.raw, "0", "Verify Objective score raw is '0'"); + strictEqual(objective.score.min, "0", "Verify Objective score min is '0'"); + strictEqual(objective.score.max, "1", "Verify Objective score max is '1'"); + strictEqual(objective.success_status, "unknown", "Verify Objective success_status is 'unknown'"); + strictEqual(objective.completion_status, "not attempted", "Verify Objective completion_status is 'not attempted'"); + strictEqual(objective.progress_measure, "0", "Verify Objective progress_measure is '0'"); + strictEqual(objective.description, "They will answer a performance interaction", "Verify Objective description is They will answer a performance interaction"); + + objective = SB.getObjective('10_1'); + strictEqual(objective.id, "10_1", "Verify Objective id is 10_1"); + strictEqual(objective.score.scaled, "0", "Verify Objective score.scaled is '0'"); + strictEqual(objective.score.raw, "0", "Verify Objective score raw is '0'"); + strictEqual(objective.score.min, "0", "Verify Objective score min is '0'"); + strictEqual(objective.score.max, "1", "Verify Objective score max is '1'"); + strictEqual(objective.success_status, "unknown", "Verify Objective success_status is 'unknown'"); + strictEqual(objective.completion_status, "not attempted", "Verify Objective completion_status is 'not attempted'"); + strictEqual(objective.progress_measure, "0", "Verify Objective progress_measure is '0'"); + strictEqual(objective.description, "They will answer a numeric interaction", "Verify Objective description is They will answer a numeric interaction"); + + strictEqual(SB.getObjective('999_9'), 'false', "Getting bogus objective, should be false"); + + SB.debug(">>>>>>>>> End Verify Objective(s) <<<<<<<<<"); + } else { + // Some scores were set, verify they are still there (LMS Only) + SB.debug(">>>>>>>>> Verify Objective(s) <<<<<<<<<"); + strictEqual(SB.getvalue('cmi.objectives._count'), '10', "Getting objective._count, should be '10'"); + objective = SB.getObjective('1_1'); + strictEqual(objective.id, "1_1", "Verify Objective id is 1_1"); + strictEqual(objective.score.scaled, "1", "Verify Objective score.scaled is 1"); + strictEqual(objective.score.raw, "1.5", "Verify Objective score raw is 1.5"); + strictEqual(objective.score.min, "0", "Verify Objective score min is 0"); + strictEqual(objective.score.max, "1.5", "Verify Objective score max is 1.5"); + strictEqual(objective.success_status, "passed", "Verify Objective success_status is passed"); + strictEqual(objective.completion_status, "completed", "Verify Objective completion_status is completed"); + strictEqual(objective.progress_measure, "1", "Verify Objective progress_measure is 1"); + strictEqual(objective.description, "They will answer a true false interaction", "Verify Objective description is They will answer a true false interaction"); + + objective = SB.getObjective('2_1'); + strictEqual(objective.id, "2_1", "Verify Objective id is 2_1"); + strictEqual(objective.score.scaled, "1", "Verify Objective score.scaled is 1"); + strictEqual(objective.score.raw, "2", "Verify Objective score raw is 2"); + strictEqual(objective.score.min, "0", "Verify Objective score min is 0"); + strictEqual(objective.score.max, "2", "Verify Objective score max is 2"); + strictEqual(objective.success_status, "passed", "Verify Objective success_status is 'passed'"); + strictEqual(objective.completion_status, "completed", "Verify Objective completion_status is 'completed'"); + strictEqual(objective.progress_measure, "1", "Verify Objective progress_measure is '1'"); + strictEqual(objective.description, "They will answer a multiple choice interaction", "Verify Objective description is They will answer a multiple choice interaction"); + + objective = SB.getObjective('3_1'); + strictEqual(objective.id, "3_1", "Verify Objective id is 3_1"); + strictEqual(objective.score.scaled, "1", "Verify Objective score.scaled is '1'"); + strictEqual(objective.score.raw, "5.25", "Verify Objective score raw is '5.25'"); + strictEqual(objective.score.min, "0", "Verify Objective score min is 0"); + strictEqual(objective.score.max, "5.25", "Verify Objective score max is '5.25'"); + strictEqual(objective.success_status, "passed", "Verify Objective success_status is 'passed'"); + strictEqual(objective.completion_status, "completed", "Verify Objective completion_status is 'completed'"); + strictEqual(objective.progress_measure, "1", "Verify Objective progress_measure is '1'"); + strictEqual(objective.description, "They will answer a fill in interaction", "Verify Objective description is They will answer a fill in interaction"); + + objective = SB.getObjective('4_1'); + strictEqual(objective.id, "4_1", "Verify Objective id is 4_1"); + strictEqual(objective.score.scaled, "1", "Verify Objective score.scaled is '0'"); + strictEqual(objective.score.raw, "1.333", "Verify Objective score raw is '1.333'"); + strictEqual(objective.score.min, "0", "Verify Objective score min is '0'"); + strictEqual(objective.score.max, "1.333", "Verify Objective score max is '1.333'"); + strictEqual(objective.success_status, "passed", "Verify Objective success_status is 'passed'"); + strictEqual(objective.completion_status, "completed", "Verify Objective completion_status is 'completed'"); + strictEqual(objective.progress_measure, "1", "Verify Objective progress_measure is '1'"); + strictEqual(objective.description, "They will answer a sequencing interaction", "Verify Objective description is They will answer a sequencing interaction"); + + objective = SB.getObjective('5_1'); + strictEqual(objective.id, "5_1", "Verify Objective id is 5_1"); + strictEqual(objective.score.scaled, "1", "Verify Objective score.scaled is '1'"); + strictEqual(objective.score.raw, "1", "Verify Objective score raw is '1'"); + strictEqual(objective.score.min, "0", "Verify Objective score min is '0'"); + strictEqual(objective.score.max, "1", "Verify Objective score max is '1'"); + strictEqual(objective.success_status, "passed", "Verify Objective success_status is 'passed'"); + strictEqual(objective.completion_status, "completed", "Verify Objective completion_status is 'completed'"); + strictEqual(objective.progress_measure, "1", "Verify Objective progress_measure is '1'"); + strictEqual(objective.description, "They will answer a long fill in interaction", "Verify Objective description is They will answer a long fill in interaction"); + + objective = SB.getObjective('6_1'); + strictEqual(objective.id, "6_1", "Verify Objective id is 6_1"); + strictEqual(objective.score.scaled, "1", "Verify Objective score.scaled is '1'"); + strictEqual(objective.score.raw, "1", "Verify Objective score raw is '1'"); + strictEqual(objective.score.min, "0", "Verify Objective score min is 0"); + strictEqual(objective.score.max, "1", "Verify Objective score max is 1"); + strictEqual(objective.success_status, "passed", "Verify Objective success_status is 'passed'"); + strictEqual(objective.completion_status, "completed", "Verify Objective completion_status is 'completed'"); + strictEqual(objective.progress_measure, "1", "Verify Objective progress_measure is '1'"); + strictEqual(objective.description, "They will answer a matching interaction", "Verify Objective description is They will answer a matching interaction"); + + objective = SB.getObjective('7_1'); + strictEqual(objective.id, "7_1", "Verify Objective id is 7_1"); + strictEqual(objective.score.scaled, "0", "Verify Objective score.scaled is 0"); + strictEqual(objective.score.raw, "0", "Verify Objective score raw is 0"); + strictEqual(objective.score.min, "0", "Verify Objective score min is 0"); + strictEqual(objective.score.max, "1", "Verify Objective score max is 1"); + strictEqual(objective.success_status, "unknown", "Verify Objective success_status is unknown"); + strictEqual(objective.completion_status, "not attempted", "Verify Objective completion_status is not attempted"); + strictEqual(objective.progress_measure, "0", "Verify Objective progress_measure is 0"); + strictEqual(objective.description, "They will answer a likert interaction", "Verify Objective description is They will answer a likert interaction"); + + objective = SB.getObjective('8_1'); + strictEqual(objective.id, "8_1", "Verify Objective id is 8_1"); + strictEqual(objective.score.scaled, "0", "Verify Objective score.scaled is 0"); + strictEqual(objective.score.raw, "0", "Verify Objective score raw is 0"); + strictEqual(objective.score.min, "0", "Verify Objective score min is 0"); + strictEqual(objective.score.max, "1", "Verify Objective score max is 1"); + strictEqual(objective.success_status, "unknown", "Verify Objective success_status is unknown"); + strictEqual(objective.completion_status, "not attempted", "Verify Objective completion_status is not attempted"); + strictEqual(objective.progress_measure, "0", "Verify Objective progress_measure is 0"); + strictEqual(objective.description, "They will answer a other interaction", "Verify Objective description is They will answer a other interaction"); + + objective = SB.getObjective('9_1'); + strictEqual(objective.id, "9_1", "Verify Objective id is 9_1"); + strictEqual(objective.score.scaled, "0", "Verify Objective score.scaled is 0"); + strictEqual(objective.score.raw, "0", "Verify Objective score raw is 0"); + strictEqual(objective.score.min, "0", "Verify Objective score min is 0"); + strictEqual(objective.score.max, "1", "Verify Objective score max is 1"); + strictEqual(objective.success_status, "unknown", "Verify Objective success_status is unknown"); + strictEqual(objective.completion_status, "not attempted", "Verify Objective completion_status is not attempted"); + strictEqual(objective.progress_measure, "0", "Verify Objective progress_measure is 0"); + strictEqual(objective.description, "They will answer a performance interaction", "Verify Objective description is They will answer a performance interaction"); + + objective = SB.getObjective('10_1'); + strictEqual(objective.id, "10_1", "Verify Objective id is 10_1"); + strictEqual(objective.score.scaled, "0", "Verify Objective score.scaled is 0"); + strictEqual(objective.score.raw, "0", "Verify Objective score raw is 0"); + strictEqual(objective.score.min, "0", "Verify Objective score min is 0"); + strictEqual(objective.score.max, "1", "Verify Objective score max is 1"); + strictEqual(objective.success_status, "unknown", "Verify Objective success_status is unknown"); + strictEqual(objective.completion_status, "not attempted", "Verify Objective completion_status is not attempted"); + strictEqual(objective.progress_measure, "0", "Verify Objective progress_measure is 0"); + strictEqual(objective.description, "They will answer a numeric interaction", "Verify Objective description is They will answer a numeric interaction"); + + strictEqual(SB.getObjective('999_9'), 'false', "Getting bogus objective, should be false"); + + SB.debug(">>>>>>>>> End Verify Objective(s) <<<<<<<<<"); + } + }); + + test("Interactions", function () { + var startTime = new Date(), + endTime = new Date(startTime), + intID = '1', + objID = '1_1', + n = '', // for interaction.n Array value (locator) + m = '', // for Interaction.n.objective.m array value (locator) + type = '', // Interaction Type for 3rd or 4th edition + interaction; + //endTime.setMinutes(startTime.getMinutes() + 5); // **Danger, FireFox, IE can't seem to cope with this** + endTime.setMilliseconds(startTime.getMilliseconds() + (60000 * 5)); // Thanks Brandon Bradley + + if (SB.getEntry() !== 'resume') { + strictEqual(SB.getvalue('cmi.interactions._count'), '0', "Getting interactions._count, should be '0'"); + SB.debug(">>>>>>>>> Setting Interaction(s) <<<<<<<<<"); + // True False Interaction + strictEqual(SB.setInteraction({ + id: intID, // {String} + type: 'true-false', // {String} + objectives: [ + // {Array} + { // {Object} + id: objID // {String} + } + ], + timestamp: startTime, // {Object} date start + correct_responses: [ + // {Array} + { // {Object} + pattern: 'true' // {String} true or false + } + ], + weighting: '1', // {String} + learner_response: 'true', // {String} true or false + result: 'correct', // {String} correct, incorrect, neutral + latency: endTime, // {Object} date end + description: 'This is the question?' // {String} question commonly + }), 'true', "Setting true/false Interaction 1"); + + // Verify Data was set properly, I'm using long-hand scorm calls for this + n = scorm.getInteractionByID(intID); + m = scorm.getInteractionObjectiveByID(n, objID); + if (n === 'false' || SB.getAPIVersion() === "1.2") { + // houston we have a problem or we are in SCORM 1.2 + strictEqual(n, n, "SCORM 1.2, Will ignore interaction 'get' tests since these are write-only."); + } else { + strictEqual(SB.getvalue('cmi.interactions.' + n + '.type'), 'true-false', 'Verifying cmi.interactions.' + n + '.type is true-false'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.objectives._count'), '1', 'Verifying cmi.interactions.' + n + '.objectives._count count is 1'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.objectives.' + m + '.id'), '1_1', 'Verifying cmi.interactions.' + n + '.objectives.' + m + '.id id is 1_1'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.learner_response'), 'true', 'Verifying cmi.interactions.' + n + '.learner_response is true'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.result'), 'correct', 'Verifying cmi.interactions.' + n + '.result is correct'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.latency'), 'PT5M', 'Verifying cmi.interactions.' + n + '.latency is PT5M'); + } + // End True False Interaction + + // Multiple Choice Interaction + intID = '2'; + objID = '2_1'; + //endTime.setMinutes(startTime.getMinutes() + 10); // Add 5 minutes for latency, result would be PT10M + strictEqual(SB.setInteraction({ + id: intID, // {String} + type: 'choice', // {String} + objectives: [ + // {Array} + { // {Object} + id: objID // {String} + } + ], + timestamp: startTime, // {Object} date start + correct_responses: [ + // {Array} + { // {Object} + pattern: ["a", "b"] // {Array} + } + ], + weighting: '1', // {String} + learner_response: ["a", "c"], // {Array} + result: 'incorrect', // {String} correct, incorrect, neutral + latency: endTime, // {Object} date end + description: 'Which choices would you pick?' // {String} question commonly + }), 'true', "Setting multiple choice Interaction 2"); + + // Verify Data was set properly, I'm using long-hand scorm calls for this + n = scorm.getInteractionByID(intID); + m = scorm.getInteractionObjectiveByID(n, objID); + if (n === 'false' || SB.getAPIVersion() === "1.2") { + // houston we have a problem or we are in SCORM 1.2 + strictEqual(n, n, "SCORM 1.2, Will ignore interaction 'get' tests since these are write-only."); + } else { + strictEqual(SB.getvalue('cmi.interactions.' + n + '.type'), "choice", 'Verifying cmi.interactions.' + n + '.type is choice'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.objectives._count'), '1', 'Verifying cmi.interactions.' + n + '.objectives._count count is 1'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.objectives.' + m + '.id'), '2_1', 'Verifying cmi.interactions.' + n + '.objectives.' + m + '.id id is 2_1'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.learner_response'), 'a[,]c', 'Verifying cmi.interactions.' + n + '.learner_response is a[,]c'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.result'), 'incorrect', 'Verifying cmi.interactions.' + n + '.result is incorrect'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.latency'), 'PT5M', 'Verifying cmi.interactions.' + n + '.latency is PT5M'); + } + // End Multiple Choice Interaction + + // Fill In Interaction + intID = '3'; + objID = '3_1'; + //endTime.setMinutes(startTime.getMinutes() + 11); // Add 5 minutes for latency, result would be PT10M + strictEqual(SB.setInteraction({ + id: intID, // {String} + type: 'fill-in', // {String} + objectives: [ + // {Array} + { // {Object} + id: objID // {String} + } + ], + timestamp: startTime, // {Object} date start + correct_responses: [ + // {Array} + { // {Object} + pattern: { // {Object} + case_matters: true, // {Boolean} + order_matters: true, // {Boolean} + lang: 'en', // {String} 2 or 3 letter lang code + words: ["car", "automobile"] // {Array} of {String}s + } + } + ], + weighting: '1', // {String} + learner_response: { // {Object} + lang: 'en', // {String} 2 or 3 letter lang code + words: ["car", "automobile"] // {Array} of {String}s + }, + result: 'correct', // {String} correct, incorrect, neutral + latency: endTime, // {Object} date end + description: 'Which choices would you pick?' // {String} question commonly + }), 'true', "Setting Fill In Interaction 3"); + + // Verify Data was set properly, I'm using long-hand scorm calls for this + n = scorm.getInteractionByID(intID); + m = scorm.getInteractionObjectiveByID(n, objID); + if (n === 'false' || SB.getAPIVersion() === "1.2") { + // houston we have a problem or we are in SCORM 1.2 + strictEqual(n, n, "SCORM 1.2, Will ignore interaction 'get' tests since these are write-only."); + } else { + strictEqual(SB.getvalue('cmi.interactions.' + n + '.type'), 'fill-in', 'Verifying cmi.interactions.' + n + '.type is fill-in'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.objectives._count'), '1', 'Verifying cmi.interactions.' + n + '.objectives._count count is 1'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.objectives.' + m + '.id'), '3_1', 'Verifying cmi.interactions.' + n + '.objectives.' + m + '.id id is 3_1'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.learner_response'), '{lang=en}car[,]automobile', 'Verifying cmi.interactions.' + n + '.learner_response is {lang=en}car[,]automobile'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.result'), 'correct', 'Verifying cmi.interactions.' + n + '.result is correct'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.latency'), 'PT5M', 'Verifying cmi.interactions.' + n + '.latency is PT5M'); + } + // End Fill In Interaction + + // Sequencing Interaction + intID = '4'; + objID = '4_1'; + //endTime.setMinutes(startTime.getMinutes() + 15); // Add 5 minutes for latency, result would be PT10M + strictEqual(SB.setInteraction({ + id: intID, // {String} + type: 'sequencing', // {String} + objectives: [ + // {Array} + { // {Object} + id: objID // {String} + } + ], + timestamp: startTime, // {Object} date start + correct_responses: [ + // {Array} + { // {Object} + pattern: ["c", "b", "a"] // {Array} + } + ], + weighting: '1', // {String} + learner_response: ["a", "c", "b"], // {Array} + result: 'incorrect', // {String} correct, incorrect, neutral + latency: endTime, // {Object} date end (optional) + description: 'Place these options in order' // {String} + }), 'true', "Setting sequencing Interaction 4"); + + // Verify Data was set properly, I'm using long-hand scorm calls for this + n = scorm.getInteractionByID(intID); + m = scorm.getInteractionObjectiveByID(n, objID); + if (n === 'false' || SB.getAPIVersion() === "1.2") { + // houston we have a problem or we are in SCORM 1.2 + strictEqual(n, n, "SCORM 1.2, Will ignore interaction 'get' tests since these are write-only."); + } else { + strictEqual(SB.getvalue('cmi.interactions.' + n + '.type'), 'sequencing', 'Verifying cmi.interactions.' + n + '.type is sequencing'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.objectives._count'), '1', 'Verifying cmi.interactions.' + n + '.objectives._count count is 1'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.objectives.' + m + '.id'), '4_1', 'Verifying cmi.interactions.' + n + '.objectives.' + m + '.id id is 4_1'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.learner_response'), 'a[,]c[,]b', 'Verifying cmi.interactions.' + n + '.learner_response is a[,]c[,]b'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.result'), 'incorrect', 'Verifying cmi.interactions.' + n + '.result is incorrect'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.latency'), 'PT5M', 'Verifying cmi.interactions.' + n + '.latency is PT5M'); + } + // End Sequencing Interaction + + // Long Fill In Interaction + intID = '5'; + objID = '5_1'; + //endTime.setMinutes(startTime.getMinutes() + 21); // Add 5 minutes for latency, result would be PT10M + strictEqual(SB.setInteraction({ + id: intID, // {String} + type: 'long-fill-in', // {String} + objectives: [ + // {Array} + { // {Object} + id: objID // {String} + } + ], + timestamp: startTime, // {Object} date start + correct_responses: [ + // {Array} + { // {Object} + pattern: { // {Object} + lang: 'en', // {String} lang code (optional) + case_matters: false, // {Boolean} (optional) + text: "it's been a long day" // {String} + } + } + ], + weighting: '1', // {String} + learner_response: { // {Object} + lang: 'en', // {String} lang code (optional) + text: "There was one once, but it's been a long day." // {String} + }, + result: 'correct', // {String} correct, incorrect, neutral + latency: endTime, // {Object} date end (optional) + description: 'Which choices would you pick?' // {String} + }), 'true', "Setting long fill in Interaction 5"); + + // Verify Data was set properly, I'm using long-hand scorm calls for this + n = scorm.getInteractionByID(intID); + m = scorm.getInteractionObjectiveByID(n, objID); + if (n === 'false' || SB.getAPIVersion() === "1.2") { + // houston we have a problem or we are in SCORM 1.2 + strictEqual(n, n, "SCORM 1.2, Will ignore interaction 'get' tests since these are write-only."); + } else { + strictEqual(SB.getvalue('cmi.interactions.' + n + '.type'), 'long-fill-in', 'Verifying cmi.interactions.' + n + '.type is long-fill-in'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.objectives._count'), '1', 'Verifying cmi.interactions.' + n + '.objectives._count count is 1'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.objectives.' + m + '.id'), '5_1', 'Verifying cmi.interactions.' + n + '.objectives.' + m + '.id id is 5_1'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.learner_response'), "{lang=en}There was one once, but it's been a long day.", "Verifying cmi.interactions." + n + ".learner_response is {lang=en}There was one once, but it's been a long day."); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.result'), 'correct', 'Verifying cmi.interactions.' + n + '.result is correct'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.latency'), 'PT5M', 'Verifying cmi.interactions.' + n + '.latency is PT5M'); + } + // End Long Fill In Choice Interaction + + // Matching Interaction + intID = '6'; + objID = '6_1'; + //endTime.setMinutes(startTime.getMinutes() + 15); // Add 5 minutes for latency, result would be PT10M + strictEqual(SB.setInteraction({ + id: intID, // {String} + type: 'matching', // {String} + objectives: [ + // {Array} + { // {Object} + id: objID // {String} + } + ], + timestamp: startTime, // {Object} date start + correct_responses: [ + // {Array} + { // {Object} + pattern: [ + // {Array} + ["tile_1", "target_2"], + // {Array} of {String}s + ["tile_2", "target_1"], + ["tile_3", "target_3"] + ] + } + ], + weighting: '1', // {String} + learner_response: [ + // {Array} + ["tile_1", "target_2"], + // {Array} of {String}s + ["tile_2", "target_1"], + ["tile_3", "target_3"] + ], + result: 'correct', // {String} correct, incorrect, neutral + latency: endTime, // {Object} date end (optional) + description: "Place these steps over the matching order you'd do them." // {String} question commonly + }), 'true', "Setting matching Interaction 6"); + + // Verify Data was set properly, I'm using long-hand scorm calls for this + n = scorm.getInteractionByID(intID); + m = scorm.getInteractionObjectiveByID(n, objID); + if (n === 'false' || SB.getAPIVersion() === "1.2") { + // houston we have a problem or we are in SCORM 1.2 + strictEqual(n, n, "SCORM 1.2, Will ignore interaction 'get' tests since these are write-only."); + } else { + strictEqual(SB.getvalue('cmi.interactions.' + n + '.type'), 'matching', 'Verifying cmi.interactions.' + n + '.type is matching'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.objectives._count'), '1', 'Verifying cmi.interactions.' + n + '.objectives._count count is 1'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.objectives.' + m + '.id'), '6_1', 'Verifying cmi.interactions.' + n + '.objectives.' + m + '.id id is 6_1'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.learner_response'), 'tile_1[.]target_2[,]tile_2[.]target_1[,]tile_3[.]target_3', 'Verifying cmi.interactions.' + n + '.learner_response is tile_1[.]target_2[,]tile_2[.]target_1[,]tile_3[.]target_3'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.result'), 'correct', 'Verifying cmi.interactions.' + n + '.result is correct'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.latency'), 'PT5M', 'Verifying cmi.interactions.' + n + '.latency is PT5M'); + } + // End Matching Interaction + + // LikeRT Interaction + intID = '7'; + objID = '7_1'; + //endTime.setMinutes(startTime.getMinutes() + 15); // Add 5 minutes for latency, result would be PT10M + strictEqual(SB.setInteraction({ + id: intID, // {String} + type: 'likert', // {String} + objectives: [ + // {Array} + { // {Object} + id: objID // {String} + } + ], + timestamp: startTime, // {Object} date start + correct_responses: [ + { // {Object} + pattern: "strongly_agree" // {String} + }/* + Apparently likert only allows for one response pattern...fun + , + { // {Object} + pattern: "agree" // {String} + }, + { // {Object} + pattern: "disagree" // {String} + }, + { // {Object} + pattern: "strongly_disagree" // {String} + }*/ + ], + weighting: '1', // {String} + learner_response: "strongly_agree", // {String} commonly a unique identifier for the group + result: 'correct', // {String} correct, incorrect, neutral + latency: endTime, // {Object} date end (optional) + description: "Do you like filling in surveys?" // {String} question commonly + }), 'true', "Setting likert Interaction 7"); + + // Verify Data was set properly, I'm using long-hand scorm calls for this + n = scorm.getInteractionByID(intID); + m = scorm.getInteractionObjectiveByID(n, objID); + if (n === 'false' || SB.getAPIVersion() === "1.2") { + // houston we have a problem or we are in SCORM 1.2 + strictEqual(n, n, "SCORM 1.2, Will ignore interaction 'get' tests since these are write-only."); + } else { + strictEqual(SB.getvalue('cmi.interactions.' + n + '.type'), 'likert', 'Verifying cmi.interactions.' + n + '.type is likert'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.objectives._count'), '1', 'Verifying cmi.interactions.' + n + '.objectives._count count is 1'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.objectives.' + m + '.id'), '7_1', 'Verifying cmi.interactions.' + n + '.objectives.' + m + '.id id is 7_1'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.learner_response'), 'strongly_agree', 'Verifying cmi.interactions.' + n + '.learner_response is strongly_agree'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.result'), 'correct', 'Verifying cmi.interactions.' + n + '.result is correct'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.latency'), 'PT5M', 'Verifying cmi.interactions.' + n + '.latency is PT5M'); + } + // End LikeRT Interaction + + // Other Interaction + intID = '8'; + objID = '8_1'; + //endTime.setMinutes(startTime.getMinutes() + 15); // Add 5 minutes for latency, result would be PT10M + strictEqual(SB.setInteraction({ + id: intID, // {String} + type: 'other', // {String} + objectives: [ + // {Array} + { // {Object} + id: objID // {String} + } + ], + timestamp: startTime, // {Object} date start + correct_responses: [ + { // {Object} + pattern: "Anything we want." // {String} + }/* + Apparently you can't have more than one pattern in 'other'. Very odd... whats the point?!?! + , + { + pattern: "Almost anything." // {String} + }, + { + pattern: "Everything." // {String} + }, + { + pattern: "A ton of stuff!" // {String} + }*/ + ], + weighting: '1', // {String} + learner_response: "Anything we want.", // {String} + result: 'correct', // {String} correct, incorrect, neutral + latency: endTime, // {Object} date end (optional) + description: "What can we put in the 'other' interaction type?" // {String} question commonly + }), 'true', "Setting other Interaction 8"); + + // Verify Data was set properly, I'm using long-hand scorm calls for this + n = scorm.getInteractionByID(intID); + m = scorm.getInteractionObjectiveByID(n, objID); + if (n === 'false' || SB.getAPIVersion() === "1.2") { + // houston we have a problem or we are in SCORM 1.2 + strictEqual(n, n, "SCORM 1.2, Will ignore interaction 'get' tests since these are write-only."); + } else { + strictEqual(SB.getvalue('cmi.interactions.' + n + '.type'), 'other', 'Verifying cmi.interactions.' + n + '.type is other'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.objectives._count'), '1', 'Verifying cmi.interactions.' + n + '.objectives._count count is 1'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.objectives.' + m + '.id'), '8_1', 'Verifying cmi.interactions.' + n + '.objectives.' + m + '.id id is 8_1'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.learner_response'), 'Anything we want.', 'Verifying cmi.interactions.' + n + '.learner_response is Anything we want.'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.result'), 'correct', 'Verifying cmi.interactions.' + n + '.result is correct'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.latency'), 'PT5M', 'Verifying cmi.interactions.' + n + '.latency is PT5M'); + } + // End Other Interaction + + // Performance Interaction + intID = '9'; + objID = '9_1'; + //endTime.setMinutes(startTime.getMinutes() + 15); // Add 5 minutes for latency, result would be PT10M + strictEqual(SB.setInteraction({ + id: intID, // {String} + type: 'performance', // {String} + objectives: [ + // {Array} + { // {Object} + id: objID // {String} + } + ], + timestamp: startTime, // {Object} date start + correct_responses: [ + // {Array} + { // {Object} + pattern: { // {Object} + order_matters: false, // {Boolean} (optional) + answers: [ + // {Array} + ["step_1", {min: 5, max: 6}], + // {Array} of {String}s step identifier (optional) + ["step_2", "answer_1"], + ["step_3", "answer_3"] + ] + } + } + ], + weighting: '1', // {String} + learner_response: [ + // {Array} + ["step_1", "5.24"], + // {Array} of {String}s step identifier (optional) + ["step_2", "answer_1"], + ["step_3", "answer_3"] + ], + result: 'correct', // {String} correct, incorrect, neutral + latency: endTime, // {Object} date end (optional) + description: "Arrange the pairs into an order of completion." // {String} question commonly + }), 'true', "Setting matching Interaction 9"); + + // Verify Data was set properly, I'm using long-hand scorm calls for this + n = scorm.getInteractionByID(intID); + m = scorm.getInteractionObjectiveByID(n, objID); + if (n === 'false' || SB.getAPIVersion() === "1.2") { + // houston we have a problem or we are in SCORM 1.2 + strictEqual(n, n, "SCORM 1.2, Will ignore interaction 'get' tests since these are write-only."); + } else { + strictEqual(SB.getvalue('cmi.interactions.' + n + '.type'), 'performance', 'Verifying cmi.interactions.' + n + '.type is performance'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.objectives._count'), '1', 'Verifying cmi.interactions.' + n + '.objectives._count count is 1'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.objectives.' + m + '.id'), '9_1', 'Verifying cmi.interactions.' + n + '.objectives.' + m + '.id id is 9_1'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.correct_responses.0.pattern'), '{order_matters=false}step_1[.]5[:]6[,]step_2[.]answer_1[,]step_3[.]answer_3', 'Verifying cmi.interactions.' + n + '.correct_response.pattern.0 is {order_matters=false}step_1[.]5[:]6[,]step_2[.]answer_1[,]step_3[.]answer_3'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.learner_response'), 'step_1[.]5.24[,]step_2[.]answer_1[,]step_3[.]answer_3', 'Verifying cmi.interactions.' + n + '.learner_response is step_1[.]step_answer_2[,]step_2[.]answer_1[,]step_3[.]answer_3'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.result'), 'correct', 'Verifying cmi.interactions.' + n + '.result is correct'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.latency'), 'PT5M', 'Verifying cmi.interactions.' + n + '.latency is PT5M'); + } + // End Performance Interaction + + // Numeric Interaction + intID = '10'; + objID = '10_1'; + //endTime.setMinutes(startTime.getMinutes() + 15); // Add 5 minutes for latency, result would be PT10M + strictEqual(SB.setInteraction({ + id: intID, // {String} + type: 'numeric', // {String} + objectives: [ + // {Array} + { // {Object} + id: objID // {String} + } + ], + timestamp: startTime, // {Object} date start + correct_responses: [ + // {Array} + { // {Object} + pattern: { // {Object} + min: 9.123456789, + max: 11 + } + } + ], + weighting: '1', // {String} + learner_response: "10.5", // {String} + result: 'correct', // {String} correct, incorrect, neutral + latency: endTime, // {Object} date end (optional) + description: "Just fill in some random decimal that looks like 10.5." // {String} question commonly + }), 'true', "Setting numeric Interaction 10"); + //SB.debug("I AM CHECKIN A SMALL SUBSET WITH A NEW LATENCY +++++++++++++++++++++++++++++++++", 4); + /*strictEqual(SB.setInteraction({ + id: intID, // {String} + latency: endTime, // {Object} date end (optional) + description: "Just fill in some random decimal that looks like 10.5." // {String} question commonly + }), 'true', "Setting numeric Interaction 6");*/ + + // Verify Data was set properly, I'm using long-hand scorm calls for this + n = scorm.getInteractionByID(intID); + m = scorm.getInteractionObjectiveByID(n, objID); + if (n === 'false' || SB.getAPIVersion() === "1.2") { + // houston we have a problem or we are in SCORM 1.2 + strictEqual(n, n, "SCORM 1.2, Will ignore interaction 'get' tests since these are write-only."); + } else { + strictEqual(SB.getvalue('cmi.interactions.' + n + '.type'), 'numeric', 'Verifying cmi.interactions.' + n + '.type is numeric'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.objectives._count'), '1', 'Verifying cmi.interactions.' + n + '.objectives._count count is 1'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.objectives.' + m + '.id'), '10_1', 'Verifying cmi.interactions.' + n + '.objectives.' + m + '.id id is 9_1'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.learner_response'), '10.5', 'Verifying cmi.interactions.' + n + '.learner_response is 10.5'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.result'), 'correct', 'Verifying cmi.interactions.' + n + '.result is correct'); + strictEqual(SB.getvalue('cmi.interactions.' + n + '.latency'), 'PT5M', 'Verifying cmi.interactions.' + n + '.latency is PT5M'); + } + // End Performance Interaction + strictEqual(SB.getvalue('cmi.interactions._count'), '10', "Getting interactions._count, should be '10'"); + SB.debug(">>>>>>>>> End Setting Interaction(s) <<<<<<<<<"); + } + SB.debug('>>>>>> Verify Interaction Block <<<<<<<'); + if (SB.getAPIVersion() === "2004") { // SCORM 1.2 cannot read interaction data: write-only + interaction = SB.getInteraction('1'); // True False + SB.debug(interaction); + strictEqual(interaction.id, '1', 'Verify Interaction ID 1'); + strictEqual(interaction.type, 'true-false', 'Verify Interaction Type true-false'); + strictEqual(interaction.objectives[0].id, '1_1', 'Verify Interaction Objectives 1_1'); + strictEqual(interaction.correct_responses[0].pattern, 'true', 'Verify Interaction Correct Responses true'); + strictEqual(interaction.weighting, '1', 'Verify Interaction weighting 1'); + strictEqual(interaction.learner_response, 'true', 'Verify Interaction learner response true'); + strictEqual(interaction.result, 'correct', 'Verify Interaction result correct'); + strictEqual(interaction.description, 'This is the question?', 'Verify Interaction description "This is the question?"'); + + interaction = SB.getInteraction('2'); // Choice + SB.debug(interaction); + strictEqual(interaction.id, '2', 'Verify Interaction ID 2'); + strictEqual(interaction.type, 'choice', 'Verify Interaction Type choice'); + strictEqual(interaction.objectives[0].id, '2_1', 'Verify Interaction Objectives 2_1'); + SB.debug("Response pattern"); + SB.debug(interaction.correct_responses[0].pattern); + deepEqual(interaction.correct_responses[0].pattern, ["a", "b"], 'Verify Interaction Correct Responses [a,b]'); + strictEqual(interaction.weighting, '1', 'Verify Interaction weighting 1'); + deepEqual(interaction.learner_response, ["a", "c"], 'Verify Interaction learner response [a,c]'); + strictEqual(interaction.result, 'incorrect', 'Verify Interaction result incorrect'); + strictEqual(interaction.description, 'Which choices would you pick?', 'Verify Interaction description "Which choices would you pick?"'); + // TODO Write rest of tests... + } + + SB.debug('>>>>>>>>> End Interaction Verification <<<<<<<<<<'); + }); + + /*test("Get Interaction By ID", function() { + // Verify Interaction 1 + + + // End + // Verify Interaction 2 + interaction = SB.getInteraction('2'); // Multiple Choice + + interaction = SB.getInteraction('3'); // Fill In + + interaction = SB.getInteraction('4'); // Sequencing + + interaction = SB.getInteraction('5'); // Long Fill In + + interaction = SB.getInteraction('6'); // Matching + + interaction = SB.getInteraction('7'); // LikeRT + + interaction = SB.getInteraction('8'); // Other + + strictEqual(SB.getInteraction('999'), 'false', "Getting bogus interaction, should be false"); + + });*/ + + test("Update Objective By ID", function () { + if (SB.getEntry() !== "resume") { + SB.debug(">>>>>>>>> Updating Objective(s) <<<<<<<<<"); + // For True False + strictEqual(SB.setObjective({ + id: '1_1', // {String} + score: { // {Object} + scaled: '1', // {String} + raw: '1.5' // {String} + }, + success_status: 'passed', // {String} passed, failed, unknown + completion_status: 'completed', // {String} completed, incomplete, not attempted + progress_measure: '1' // {String} + }), 'true', "Setting Objective True False 1_1 unscored"); + // For True False + strictEqual(SB.setObjective({ + id: '2_1', // {String} + score: { // {Object} + scaled: '1', // {String} + raw: '2' // {String} + }, + success_status: 'passed', // {String} passed, failed, unknown + completion_status: 'completed', // {String} completed, incomplete, not attempted + progress_measure: '1' // {String} + }), 'true', "Setting Objective True False 1_1 unscored"); + // For True False + strictEqual(SB.setObjective({ + id: '3_1', // {String} + score: { // {Object} + scaled: '1', // {String} + raw: '5.25' // {String} + }, + success_status: 'passed', // {String} passed, failed, unknown + completion_status: 'completed', // {String} completed, incomplete, not attempted + progress_measure: '1' // {String} + }), 'true', "Setting Objective True False 1_1 unscored"); + // For True False + strictEqual(SB.setObjective({ + id: '4_1', // {String} + score: { // {Object} + scaled: '1', // {String} + raw: '1.333' // {String} + }, + success_status: 'passed', // {String} passed, failed, unknown + completion_status: 'completed', // {String} completed, incomplete, not attempted + progress_measure: '1' // {String} + }), 'true', "Setting Objective True False 1_1 unscored"); + // For True False + strictEqual(SB.setObjective({ + id: '5_1', // {String} + score: { // {Object} + scaled: '1', // {String} + raw: '1' // {String} + }, + success_status: 'passed', // {String} passed, failed, unknown + completion_status: 'completed', // {String} completed, incomplete, not attempted + progress_measure: '1' // {String} + }), 'true', "Setting Objective True False 1_1 unscored"); + // For True False + strictEqual(SB.setObjective({ + id: '6_1', // {String} + score: { // {Object} + scaled: '1', // {String} + raw: '1' // {String} + }, + success_status: 'passed', // {String} passed, failed, unknown + completion_status: 'completed', // {String} completed, incomplete, not attempted + progress_measure: '1' // {String} + }), 'true', "Setting Objective True False 1_1 unscored"); + SB.debug(">>>>>>>>> End Updating Objective(s) <<<<<<<<<"); + } else { + // Do something else? With no tests this will cause a assertion error in QUnit. + // Doing any updating to these objectives means needing to manage resumes and verifying. + // This is a little too complicated now to test for how many times this was attempted. + strictEqual(SB.getvalue('cmi.objectives._count'), '10', "Getting objectives._count, should be '10'"); + } + + }); + + test("Set Suspend Data By Page ID", function () { + var result, + answer_arr = ["a", "b", "c", "d"], + images_arr = ["bird.png", "bug.png", "helicopter.png"]; + // Save Suspend Data for Page 1 + strictEqual(SB.setSuspendDataByPageID(1, 'Sample Data 1', { + answers: answer_arr, + characters: character_str, + question: "This is the question?", + numtries: 2 + }), 'true', 'Setting some sample suspend data for page 1'); + // Verify saved Suspend Data for Page 1 + result = SB.getSuspendDataByPageID(1); + strictEqual(result.answers, answer_arr, "Verify answers: ['a','b','c','d']"); + strictEqual(result.characters, character_str, "Verify Character String"); + strictEqual(result.question, 'This is the question?', 'Verify question: This is the question?'); + strictEqual(result.numtries, 2, 'Verify numtries: 2'); + // End Test 1 + // Save Suspend Data for Page 2 + strictEqual(SB.setSuspendDataByPageID(2, 'Sample Data 2', { + short_answer: "This is a short answer with text they typed in.", + characters: character_str, + question: "How did you feel about the question?", + images: images_arr + }), 'true', 'Setting some sample suspend data for page 2'); + // Verify saved Suspend Data for Page 4 + result = SB.getSuspendDataByPageID(2); + strictEqual(result.short_answer, 'This is a short answer with text they typed in.', 'Verify short_answer: This is a short answer with text they typed in.'); + strictEqual(result.characters, character_str, "Verify Character String"); + strictEqual(result.question, 'How did you feel about the question?', 'Verify question: How did you feel about the question?'); + strictEqual(result.images, images_arr, "Verify answers: ['bird.png', 'bug.png', 'helicopter.png']"); + // End Test 2 + }); + + test("Suspend SCO", function () { + SB.debug(">>>>>>>>>>> Suspending <<<<<<<<<<<<<"); + //strictEqual(scorm.commit(), 'true', "Committing to check navigation possibilities."); // Stopped doing this as it will occur in Terminate. + // You could however simulate a student saving, then maybe put in a pause for a number of seconds but right now this was spamming commit. + // This may be a use case if you want to beat up the LMS API. + + // Where you check for nav possibilities is up to you. If you support SCORM 2004 imsmanifest entries to allow this you can enhance your tests. + if (!local || SB.getAPIVersion() === "2004") { // SCORM 2004 support, but technically you need to adjust your imsmanifest.xml for this to succeed. + var canContinue = SB.getvalue('adl.nav.request_valid.continue'); + strictEqual(canContinue, 'true', 'Checking for adl.nav.request_valid.continue. This would allow you to seamlessly move to the next SCO in the progression.'); // Check your imss sequencing flow control!!! + if (canContinue === 'true' || canContinue === 'unknown') { + SB.setvalue('adl.nav.request', 'continue'); // Enable if you want it to cruise past this SCO + } + } + // Optional, either suspend, terminate, or let the SCO's default exit behavior do the work for you "window.unload" which is managed by SCOBot + //strictEqual(SB.suspend(), 'true', 'Suspending SCO'); + }); + + // Optional, comment out if you don't want to terminate. + test("Terminate SCO", function () { + SB.debug(">>>>>>>>>> Terminating <<<<<<<<<<<<<"); + // Validate scoring + strictEqual(SB.getvalue('cmi.score.scaled'), '0.7512902', 'Verifying Score Scaled'); // modify this if you adjust scoring + strictEqual(SB.getvalue('cmi.success_status'), 'passed', "Verify Success Status"); + strictEqual(SB.getvalue('cmi.completion_status'), 'incomplete'); + strictEqual(SB.finish(), 'true', "Terminating SCO."); // Comment this out if you want to leave it up. + + }); +}); diff --git a/QUnit-Tests/qunit_SCOBot_prod_full.html b/QUnit-Tests/qunit_SCOBot_prod_full.html index bbf24db..e88d7fe 100644 --- a/QUnit-Tests/qunit_SCOBot_prod_full.html +++ b/QUnit-Tests/qunit_SCOBot_prod_full.html @@ -18,10 +18,10 @@ - + - +

QUnit for SCOBot (prod-full)