(function(){if(window.google&&google.gears){return}var b=null;if(typeof GearsFactory!="undefined"){b=new GearsFactory()}else{try{b=new ActiveXObject("Gears.Factory");if(b.getBuildInfo().indexOf("ie_mobile")!=-1){b.privateSetGlobalObject(this)}}catch(c){if((typeof navigator.mimeTypes!="undefined")&&navigator.mimeTypes["application/x-googlegears"]){b=document.createElement("object");b.style.display="none";b.width=0;b.height=0;b.type="application/x-googlegears";document.documentElement.appendChild(b)}}}if(!b){return}if(!window.google){google={}}if(!google.gears){google.gears={factory:b}}})();if(typeof(plt)=="undefined"){plt={}}(function(){plt.types=plt.types||{};var i=0;plt.types.makeEqHashCode=function(){i++;return i};plt.types.getEqHashCode=function(m){if(m&&m._eqHashCode){return m._eqHashCode}if(typeof(m)=="string"){return m}return 0};plt.types.Logic={TRUE:true,FALSE:false};Boolean.prototype.toWrittenString=function(m){if(this.valueOf()){return"true"}return"false"};Boolean.prototype.toDisplayedString=Boolean.prototype.toWrittenString;Boolean.prototype.isEqual=function(m,n){return this==m};plt.types.Char=function(m){this.val=m;this._eqHashCode=plt.types.makeEqHashCode()};plt.types.Char.makeInstance=function(m){return new plt.types.Char(m)};plt.types.Char.prototype.toWrittenString=function(m){return"#\\"+this.val};plt.types.Char.prototype.toDisplayedString=function(m){return this.val};plt.types.Char.prototype.getValue=function(){return this.val};plt.types.Char.prototype.isEqual=function(m,n){return m instanceof plt.types.Char&&this.val==m.val};plt.types.Symbol=function(m){this.val=m;this._eqHashCode=plt.types.makeEqHashCode()};var e={};plt.types.Symbol.makeInstance=function(m){if(!(m in e)){e[m]=new plt.types.Symbol(m)}else{}return e[m]};plt.types.Symbol.prototype.isEqual=function(m,n){return m instanceof plt.types.Symbol&&this.val==m.val};plt.types.Symbol.prototype.toString=function(){return this.val};plt.types.Symbol.prototype.toWrittenString=function(m){return this.val};plt.types.Symbol.prototype.toDisplayedString=function(m){return this.val};plt.types.Empty=function(){this._eqHashCode=plt.types.makeEqHashCode()};plt.types.Empty.EMPTY=new plt.types.Empty();plt.types.Empty.prototype.isEqual=function(m,n){return m instanceof plt.types.Empty};plt.types.Empty.prototype.first=function(){throw new plt.Kernel.MobyRuntimeError("first can't be applied on empty.")};plt.types.Empty.prototype.rest=function(){throw new plt.Kernel.MobyRuntimeError("rest can't be applied on empty.")};plt.types.Empty.prototype.isEmpty=function(){return true};plt.types.Empty.prototype.toWrittenString=function(m){return"empty"};plt.types.Empty.prototype.toDisplayedString=function(m){return"empty"};plt.types.Empty.prototype.append=function(m){return m};plt.types.Cons=function(n,m){this.f=n;this.r=m;this._eqHashCode=plt.types.makeEqHashCode()};plt.types.Cons.makeInstance=function(n,m){return new plt.types.Cons(n,m)};plt.types.Cons.prototype.isEqual=function(m,n){if(!(m instanceof plt.types.Cons)){return plt.types.Logic.FALSE}return(plt.Kernel.isEqual(this.first(),m.first(),n)&&plt.Kernel.isEqual(this.rest(),m.rest(),n))};plt.types.Cons.prototype.first=function(){return this.f};plt.types.Cons.prototype.rest=function(){return this.r};plt.types.Cons.prototype.isEmpty=function(){return false};plt.types.Cons.prototype.append=function(n){if(n.isEmpty()){return this}var o=n;var m=plt.Kernel.reverse(this);while(!m.isEmpty()){o=plt.types.Cons.makeInstance(m.first(),o);m=m.rest()}return o};plt.types.Cons.prototype.toWrittenString=function(m){m.put(this,true);var n=[];var o=this;while(!o.isEmpty()){n.push(plt.Kernel.toWrittenString(o.first(),m));o=o.rest()}return"("+n.join(" ")+")"};plt.types.Cons.prototype.toDisplayedString=function(m){m.put(this,true);var n=[];var o=this;while(!o.isEmpty()){n.push(plt.Kernel.toDisplayedString(o.first(),m));o=o.rest()}return"("+n.join(" ")+")"};var g=function(m,n){m.appendChild(n)};plt.types.Cons.prototype.toDomNode=function(m){m.put(this,true);var n=document.createElement("div");n.appendChild(document.createTextNode("("));var o=this;while(!o.isEmpty()){g(n,plt.Kernel.toDomNode(o.first(),m));o=o.rest();if(!o.isEmpty()){g(n,document.createTextNode(" "))}}n.appendChild(document.createTextNode(")"));return n};plt.types.Vector=function(p,o){this.elts=new Array(p);if(o){for(var m=0;m
this.d*m.n};plt.types.Rational.prototype.greaterThanOrEqual=function(m){return this.n*m.d>=this.d*m.n};plt.types.Rational.prototype.lessThan=function(m){return this.n*m.d=0){var n=Math.sqrt(this.n);var m=Math.sqrt(this.d);if(Math.floor(n)==n&&Math.floor(m)==m){return plt.types.Rational.makeInstance(n,m)}else{return plt.types.FloatPoint.makeInstance(n/m)}}else{var n=Math.sqrt(-this.n);var m=Math.sqrt(this.d);if(Math.floor(n)==n&&Math.floor(m)==m){return plt.types.Complex.makeInstance(plt.types.Rational.ZERO,plt.types.Rational.makeInstance(n,m))}else{return plt.types.Complex.makeInstance(plt.types.Rational.ZERO,plt.types.FloatPoint.makeInstance(n/m))}}};plt.types.Rational.prototype.abs=function(){return plt.types.Rational.makeInstance(Math.abs(this.n),this.d)};plt.types.Rational.prototype.floor=function(){return plt.types.Rational.makeInstance(Math.floor(this.n/this.d),1)};plt.types.Rational.prototype.ceiling=function(){return plt.types.Rational.makeInstance(Math.ceil(this.n/this.d),1)};plt.types.Rational.prototype.conjugate=plt.types.Rational.prototype.abs;plt.types.Rational.prototype.magnitude=plt.types.Rational.prototype.abs;plt.types.Rational.prototype.log=function(){return plt.types.FloatPoint.makeInstance(Math.log(this.n/this.d))};plt.types.Rational.prototype.angle=function(){if(0==this.n){return plt.types.Rational.ZERO}if(this.n>0){return plt.types.Rational.ZERO}else{return plt.Kernel.pi}};plt.types.Rational.prototype.atan=function(){return plt.types.FloatPoint.makeInstance(Math.atan(this.n/this.d))};plt.types.Rational.prototype.cos=function(){return plt.types.FloatPoint.makeInstance(Math.cos(this.n/this.d))};plt.types.Rational.prototype.sin=function(){return plt.types.FloatPoint.makeInstance(Math.sin(this.n/this.d))};plt.types.Rational.prototype.expt=function(m){return plt.types.FloatPoint.makeInstance(Math.pow(this.n/this.d,m.n/m.d))};plt.types.Rational.prototype.exp=function(){return plt.types.FloatPoint.makeInstance(Math.exp(this.n/this.d))};plt.types.Rational.prototype.acos=function(){return plt.types.FloatPoint.makeInstance(Math.acos(this.n/this.d))};plt.types.Rational.prototype.asin=function(){return plt.types.FloatPoint.makeInstance(Math.asin(this.n/this.d))};plt.types.Rational.prototype.imag_dash_part=function(){return plt.types.Rational.ZERO};plt.types.Rational.prototype.real_dash_part=function(){return this};plt.types.Rational.prototype.timesI=function(){return plt.types.Complex.makeInstance(plt.types.Rational.ZERO,this)};plt.types.Rational.prototype.round=function(){if(this.d==2){var m=this.n/this.d;var n=Math.floor(m);var o=Math.ceil(m);if(n%2==0){return plt.types.Rational.makeInstance(n)}else{return plt.types.Rational.makeInstance(o)}}else{return plt.types.Rational.makeInstance(Math.round(this.n/this.d))}};plt.types.Rational.prototype.half=function(){return plt.types.Rational.makeInstance(this.n,this.d*2)};plt.types.Rational.prototype.minus=function(){return plt.types.Rational.makeInstance(0-this.n,this.d)};var h={};plt.types.Rational.makeInstance=function(o,m){if(o==undefined){throw new plt.Kernel.MobyRuntimeError("n undefined")}if(m==undefined){m=1}if(m<0){o=-o;m=-m}if(m==1&&o in h){return h[o]}else{return new plt.types.Rational(o,m)}};h={};(function(){var m;for(m=-500;m<500;m++){h[m]=new plt.types.Rational(m,1)}})();plt.types.Rational.NEGATIVE_ONE=h[-1];plt.types.Rational.ZERO=h[0];plt.types.Rational.ONE=h[1];plt.types.Rational.TWO=h[2];plt.types.FloatPoint=function(m){this.n=m;this._eqHashCode=plt.types.makeEqHashCode()};plt.types.FloatPoint.makeInstance=function(m){return new plt.types.FloatPoint(m)};var k=plt.types.FloatPoint.makeInstance(Number.NaN);var b=plt.types.FloatPoint.makeInstance(Number.POSITIVE_INFINITY);var d=plt.types.FloatPoint.makeInstance(Number.NEGATIVE_INFINITY);plt.types.FloatPoint.prototype.isFinite=function(){return isFinite(this.n)};plt.types.FloatPoint.prototype.toExact=function(){return plt.types.Rational.makeInstance(Math.floor(this.n),1)};plt.types.FloatPoint.prototype.isExact=function(){return false};plt.types.FloatPoint.prototype.level=function(){return 1};plt.types.FloatPoint.prototype.lift=function(m){return plt.types.Complex.makeInstance(this,plt.types.Rational.ZERO)};plt.types.FloatPoint.prototype.toWrittenString=function(m){if(this.n==Number.POSITIVE_INFINITY){return"+inf.0"}else{if(this.n==Number.NEGATIVE_INFINITY){return"-inf.0"}else{if(this.n==Number.NaN){return"+nan.0"}else{return this.n.toString()}}}};plt.types.FloatPoint.prototype.toDisplayedString=plt.types.FloatPoint.prototype.toWrittenString;plt.types.FloatPoint.prototype.isEqual=function(m,n){return this.equals(m)};plt.types.FloatPoint.prototype.equals=function(m){return((m instanceof plt.types.FloatPoint)&&((this.n==m.n)||(isNaN(this.n)&&isNaN(m.n))))};plt.types.FloatPoint.prototype.isRational=function(){return this.isFinite()&&this.n==Math.floor(this.n)};plt.types.FloatPoint.prototype.isInteger=function(){return this.isFinite()&&this.n==Math.floor(this.n)};plt.types.FloatPoint.prototype.isReal=function(){return true};var c=function(m){if(plt.types.NumberTower.lessThan(m,plt.types.Rational.ZERO)){return -1}else{if(plt.types.NumberTower.greaterThan(m,plt.types.Rational.ZERO)){return 1}else{return 0}}};plt.types.FloatPoint.prototype.add=function(m){if(this.isFinite()&&m.isFinite()){return plt.types.FloatPoint.makeInstance(this.n+m.n)}else{if(isNaN(this.n)||isNaN(m.n)){return k}else{if(this.isFinite()&&!m.isFinite()){return m}else{if(!this.isFinite()&&m.isFinite()){return this}else{return((c(this)*c(m)==1)?this:k)}}}}};plt.types.FloatPoint.prototype.subtract=function(m){if(this.isFinite()&&m.isFinite()){return plt.types.FloatPoint.makeInstance(this.n-m.n)}else{if(isNaN(this.n)||isNaN(m.n)){return k}else{if(!this.isFinite()&&!m.isFinite()){if(c(this)==c(m)){return k}else{return this}}else{if(this.isFinite()){return plt.types.NumberTower.multiply(m,plt.types.Rational.NEGATIVE_ONE)}else{return this}}}}};plt.types.FloatPoint.prototype.multiply=function(m){if(this.n==0||m.n==0){return plt.types.Rational.ZERO}if(this.isFinite()&&m.isFinite()){return plt.types.FloatPoint.makeInstance(this.n*m.n)}else{if(isNaN(this.n)||isNaN(m.n)){return k}else{return((c(this)*c(m)==1)?b:d)}}};plt.types.FloatPoint.prototype.divide=function(m){if(this.isFinite()&&m.isFinite()){if(m.n==0){throw new plt.Kernel.MobyRuntimeError("division by zero")}return plt.types.FloatPoint.makeInstance(this.n/m.n)}else{if(isNaN(this.n)||isNaN(m.n)){return k}else{if(!this.isFinite()&&!m.isFinite()){return k}else{if(this.isFinite()&&!m.isFinite()){return plt.types.FloatPoint.makeInstance(0)}else{if(!this.isFinite()&&m.isFinite()){return((c(this)*c(m)==1)?b:d)}}}}}};plt.types.FloatPoint.prototype.toInteger=function(){return Math.floor(this.n)};plt.types.FloatPoint.prototype.numerator=function(){var n=this.n.toString();var m=n.match(/^(.*)\.(.*)$/);if(m){return plt.types.FloatPoint.makeInstance(parseFloat(m[1]+m[2]))}else{return this}};plt.types.FloatPoint.prototype.denominator=function(){var n=this.n.toString();var m=n.match(/^(.*)\.(.*)$/);if(m){return plt.types.FloatPoint.makeInstance(Math.pow(10,m[2].length))}else{return plt.types.FloatPoint.makeInstance(1)}};plt.types.FloatPoint.prototype.toFloat=function(){return this.n};plt.types.FloatPoint.prototype.toComplex=function(){return plt.types.Complex.makeInstance(this,plt.types.Rational.ZERO)};plt.types.FloatPoint.prototype.floor=function(){if(!isFinite(this.n)){return this}return plt.types.Rational.makeInstance(Math.floor(this.n),1)};plt.types.FloatPoint.prototype.ceiling=function(){if(!isFinite(this.n)){return this}return plt.types.Rational.makeInstance(Math.ceil(this.n),1)};plt.types.FloatPoint.prototype.greaterThan=function(m){return this.n>m.n};plt.types.FloatPoint.prototype.greaterThanOrEqual=function(m){return this.n>=m.n};plt.types.FloatPoint.prototype.lessThan=function(m){return this.n0){return plt.types.Rational.ZERO}else{return plt.Kernel.pi}};plt.types.FloatPoint.prototype.atan=function(){return plt.types.FloatPoint.makeInstance(Math.atan(this.n))};plt.types.FloatPoint.prototype.cos=function(){return plt.types.FloatPoint.makeInstance(Math.cos(this.n))};plt.types.FloatPoint.prototype.sin=function(){return plt.types.FloatPoint.makeInstance(Math.sin(this.n))};plt.types.FloatPoint.prototype.expt=function(m){if(this.n==1){if(m.isFinite()){return this}else{if(isNaN(m.n)){return this}else{return this}}}else{return plt.types.FloatPoint.makeInstance(Math.pow(this.n,m.n))}};plt.types.FloatPoint.prototype.exp=function(){return plt.types.FloatPoint.makeInstance(Math.exp(this.n))};plt.types.FloatPoint.prototype.acos=function(){return plt.types.FloatPoint.makeInstance(Math.acos(this.n))};plt.types.FloatPoint.prototype.asin=function(){return plt.types.FloatPoint.makeInstance(Math.asin(this.n))};plt.types.FloatPoint.prototype.imag_dash_part=function(){return plt.types.Rational.ZERO};plt.types.FloatPoint.prototype.real_dash_part=function(){return this};plt.types.FloatPoint.prototype.round=function(){if(isFinite(this.n)){if(Math.abs(Math.floor(this.n)-this.n)==0.5){if(Math.floor(this.n)%2==0){return plt.types.Rational.makeInstance(Math.floor(this.n))}return plt.types.Rational.makeInstance(Math.ceil(this.n))}else{return plt.types.Rational.makeInstance(Math.round(this.n))}}else{return this}};plt.types.FloatPoint.prototype.conjugate=plt.types.FloatPoint.prototype.abs;plt.types.FloatPoint.prototype.magnitude=plt.types.FloatPoint.prototype.abs;plt.types.FloatPoint.prototype.minus=function(){return plt.types.FloatPoint.makeInstance(0-this.n)};plt.types.FloatPoint.prototype.half=function(){return plt.types.FloatPoint.makeInstance(this.n/2)};plt.types.FloatPoint.prototype.timesI=function(){return plt.types.Complex.makeInstance(plt.types.Rational.ZERO,this)};plt.types.Complex=function(n,m){this.r=n;this.i=m;this._eqHashCode=plt.types.makeEqHashCode()};plt.types.Complex.makeInstance=function(o,n){if(typeof(o)=="number"){o=(o==Math.floor(o)?plt.types.Rational.makeInstance(o):plt.types.FloatPoint.makeInstance(o))}if(typeof(n)=="number"){n=(n==Math.floor(n)?plt.types.Rational.makeInstance(n):plt.types.FloatPoint.makeInstance(n))}var m=new plt.types.Complex(o,n);return m};plt.types.Complex.prototype.toWrittenString=function(m){if(plt.types.NumberTower.greaterThanOrEqual(this.i,plt.types.Rational.ZERO)){return plt.Kernel.toWrittenString(this.r)+"+"+plt.Kernel.toWrittenString(this.i)+"i"}else{return plt.Kernel.toWrittenString(this.r)+plt.Kernel.toWrittenString(this.i)+"i"}};plt.types.Complex.prototype.toDisplayedString=plt.types.Complex.prototype.toWrittenString;plt.types.Complex.prototype.isFinite=function(){return this.r.isFinite()&&this.i.isFinite()};plt.types.Complex.prototype.isRational=function(){return this.r.isRational()&&plt.types.NumberTower.equal(this.i,plt.types.Rational.ZERO)};plt.types.Complex.prototype.isInteger=function(){return this.r.isInteger()&&plt.types.NumberTower.equal(this.i,plt.types.Rational.ZERO)};plt.types.Complex.prototype.toExact=function(){if(!this.isReal()){throw new plt.Kernel.MobyRuntimeError("inexact->exact: expects argument of type real number")}return this.r.toExact()};plt.types.Complex.prototype.isExact=function(){return this.r.isExact()&&this.i.isExact()};plt.types.Complex.prototype.level=function(){return 2};plt.types.Complex.prototype.lift=function(m){throw new plt.Kernel.MobyRuntimeError("Don't know how to lift Complex number")};plt.types.Complex.prototype.isEqual=function(m,n){return this.equals(m)};plt.types.Complex.prototype.equals=function(n){var m=((n instanceof plt.types.Complex)&&(plt.types.NumberTower.equal(this.r,n.r))&&(plt.types.NumberTower.equal(this.i,n.i)));return m};plt.types.Complex.prototype.greaterThan=function(m){if(!this.isReal()||!m.isReal()){throw new plt.Kernel.MobyRuntimeError(">: expects argument of type real number")}return plt.types.NumberTower.greaterThan(this.r,m.r)};plt.types.Complex.prototype.greaterThanOrEqual=function(m){if(!this.isReal()||!m.isReal()){throw new plt.Kernel.MobyRuntimeError(">: expects argument of type real number")}return plt.types.NumberTower.greaterThanOrEqual(this.r,m.r)};plt.types.Complex.prototype.lessThan=function(m){if(!this.isReal()||!m.isReal()){throw new plt.Kernel.MobyRuntimeError(">: expects argument of type real number")}return plt.types.NumberTower.lessThan(this.r,m.r)};plt.types.Complex.prototype.lessThanOrEqual=function(m){if(!this.isReal()||!m.isReal()){throw new plt.Kernel.MobyRuntimeError(">: expects argument of type real number")}return plt.types.NumberTower.lessThanOrEqual(this.r,m.r)};plt.types.Complex.prototype.abs=function(){if(!plt.types.NumberTower.equal(this.i,plt.types.Rational.ZERO).valueOf()){throw new plt.Kernel.MobyRuntimeError("abs: expects argument of type real number")}return this.r.abs()};plt.types.Complex.prototype.toInteger=function(){if(!plt.types.NumberTower.equal(this.i,plt.types.Rational.ZERO).valueOf()){throw new plt.Kernel.MobyRuntimeError("toInteger: expects argument of type real number")}return this.r.toInteger()};plt.types.Complex.prototype.numerator=function(){if(!this.isReal()){throw new plt.Kernel.MobyRuntimeError("numerator: can only be applied to real number")}return this.n.numerator()};plt.types.Complex.prototype.denominator=function(){if(!this.isReal()){throw new plt.Kernel.MobyRuntimeError("floor: can only be applied to real number")}return this.n.denominator()};plt.types.Complex.prototype.toFloat=function(){if(!plt.types.NumberTower.equal(this.i,plt.types.Rational.ZERO).valueOf()){throw new plt.Kernel.MobyRuntimeError("toFloat: expects argument of type real number")}return this.r.toFloat()};plt.types.Complex.prototype.toComplex=function(){return this};plt.types.Complex.prototype.add=function(m){return plt.types.Complex.makeInstance(plt.types.NumberTower.add(this.r,m.r),plt.types.NumberTower.add(this.i,m.i))};plt.types.Complex.prototype.subtract=function(m){return plt.types.Complex.makeInstance(plt.types.NumberTower.subtract(this.r,m.r),plt.types.NumberTower.subtract(this.i,m.i))};plt.types.Complex.prototype.multiply=function(m){if(m.isReal()){return plt.types.Complex.makeInstance(plt.types.NumberTower.multiply(this.r,m.r),plt.types.NumberTower.multiply(this.i,m.r))}var o=plt.types.NumberTower.subtract(plt.types.NumberTower.multiply(this.r,m.r),plt.types.NumberTower.multiply(this.i,m.i));var n=plt.types.NumberTower.add(plt.types.NumberTower.multiply(this.r,m.i),plt.types.NumberTower.multiply(this.i,m.r));if(plt.types.NumberTower.equal(n,plt.types.Rational.ZERO)){return o}return plt.types.Complex.makeInstance(o,n)};plt.types.Complex.prototype.divide=function(o){if(o.isReal()){return plt.types.Complex.makeInstance(plt.types.NumberTower.divide(this.r,o.r),plt.types.NumberTower.divide(this.i,o.r))}var p=o.conjugate();var n=plt.types.NumberTower.multiply(this,p).toComplex();var q=plt.types.NumberTower.multiply(o,p);var m=plt.types.Complex.makeInstance(plt.types.NumberTower.divide(n.r,q),plt.types.NumberTower.divide(n.i,q));return m};plt.types.Complex.prototype.conjugate=function(){var m=plt.types.Complex.makeInstance(this.r,plt.types.NumberTower.subtract(plt.types.Rational.ZERO,this.i));return m};plt.types.Complex.prototype.magnitude=function(){var m=plt.types.NumberTower.add(plt.types.NumberTower.multiply(this.r,this.r),plt.types.NumberTower.multiply(this.i,this.i));return m.sqrt()};plt.types.Complex.prototype.isReal=function(){return plt.types.NumberTower.equal(this.i,plt.types.Rational.ZERO)};plt.types.Complex.prototype.sqrt=function(){if(this.isReal()){return this.r.sqrt()}var m=plt.types.NumberTower.add(this.magnitude(),this.r);var o=m.half().sqrt();var n=plt.types.NumberTower.divide(this.i,plt.types.NumberTower.multiply(m,plt.types.FloatPoint.makeInstance(2)).sqrt());return plt.types.Complex.makeInstance(o,n)};plt.types.Complex.prototype.log=function(){var o=this.magnitude();var p=this.angle();var n=plt.types.NumberTower.add(o.log(),p.timesI());return n};plt.types.Complex.prototype.angle=function(){if(this.isReal()){return this.r.angle()}if(plt.types.NumberTower.equal(plt.types.Rational.ZERO,this.r)){var m=plt.Kernel.pi.half();return plt.types.NumberTower.greaterThan(this.i,plt.types.Rational.ZERO)?m:m.minus()}else{var m=plt.types.NumberTower.divide(this.i.abs(),this.r.abs()).atan();if(plt.types.NumberTower.greaterThan(this.r,plt.types.Rational.ZERO)){return plt.types.NumberTower.greaterThan(this.i,plt.types.Rational.ZERO)?m:m.minus()}else{return plt.types.NumberTower.greaterThan(this.i,plt.types.Rational.ZERO)?plt.Kernel.pi.subtract(m):m.subtract(plt.Kernel.pi)}}};var f=plt.types.Complex.makeInstance(plt.types.Rational.ZERO,plt.types.Rational.ONE);var l=plt.types.Complex.makeInstance(plt.types.Rational.ZERO,plt.types.Rational.NEGATIVE_ONE);plt.types.Complex.prototype.atan=function(){if(plt.types.NumberTower.equal(this,f)||plt.types.NumberTower.equal(this,l)){return plt.types.FloatPoint.makeInstance(Number.NEGATIVE_INFINITY)}return plt.types.NumberTower.multiply(f,plt.types.NumberTower.multiply(plt.types.FloatPoint.makeInstance(0.5),(plt.types.NumberTower.divide(plt.types.NumberTower.add(f,this),plt.types.NumberTower.add(f,plt.types.NumberTower.subtract(plt.types.Rational.ZERO,this)))).log()))};plt.types.Complex.prototype.cos=function(){if(this.isReal()){return this.r.cos()}var n=this.timesI();var m=n.minus();return plt.types.NumberTower.add(n.exp(),m.exp()).half()};plt.types.Complex.prototype.sin=function(){if(this.isReal()){return this.r.sin()}var q=this.timesI();var p=q.minus();var o=plt.types.Complex.makeInstance(plt.types.Rational.ZERO,plt.types.Rational.TWO);var n=plt.types.NumberTower.subtract(q.exp(),p.exp());var m=plt.types.NumberTower.divide(n,o);return m};plt.types.Complex.prototype.expt=function(n){var m=plt.types.NumberTower.multiply(n,this.log());return m.exp()};plt.types.Complex.prototype.exp=function(){var o=this.r.exp();var m=this.i.cos();var n=this.i.sin();return plt.types.NumberTower.multiply(o,plt.types.NumberTower.add(m,n.timesI()))};plt.types.Complex.prototype.acos=function(){if(this.isReal()){return this.r.acos()}var o=plt.Kernel.pi.half();var p=this.timesI();var n=plt.types.NumberTower.subtract(plt.types.Rational.ONE,this.multiply(this)).sqrt();var m=plt.types.NumberTower.add(p,n).log().timesI();return plt.types.NumberTower.add(o,m)};plt.types.Complex.prototype.asin=function(){if(this.isReal()){return this.r.asin()}var n=plt.types.NumberTower.subtract(plt.types.Rational.ONE,this.multiply(this));var m=n.sqrt();return plt.types.NumberTower.multiply(plt.types.Rational.TWO,(plt.types.NumberTower.divide(this,plt.types.NumberTower.add(plt.types.Rational.ONE,m))).atan())};plt.types.Complex.prototype.ceiling=function(){if(!this.isReal()){throw new plt.Kernel.MobyRuntimeError("ceiling: can only be applied to real number")}return this.r.ceiling()};plt.types.Complex.prototype.floor=function(){if(!this.isReal()){throw new plt.Kernel.MobyRuntimeError("floor: can only be applied to real number")}return this.r.floor()};plt.types.Complex.prototype.imag_dash_part=function(){return this.i};plt.types.Complex.prototype.real_dash_part=function(){return this.r};plt.types.Complex.prototype.round=function(){return this.r.round()};plt.types.Complex.prototype.timesI=function(){return this.multiply(plt.types.Complex.makeInstance(plt.types.Rational.ZERO,plt.types.Rational.ONE))};plt.types.Complex.prototype.minus=function(){return plt.types.Complex.makeInstance(plt.types.NumberTower.subtract(plt.types.Rational.ZERO,this.r),plt.types.NumberTower.subtract(plt.types.Rational.ZERO,this.i))};plt.types.Complex.prototype.half=function(){return plt.types.Complex.makeInstance(this.r.half(),this.i.half())};plt.types.NumberTower={};plt.types.NumberTower.toInteger=function(m){return m.toInteger()};plt.types.NumberTower.toFloat=function(m){return m.toFloat()};plt.types.NumberTower.abs=function(m){return m.abs()};plt.types.NumberTower.isFinite=function(m){return m.isFinite()};plt.types.NumberTower.toExact=function(m){return m.toExact()};plt.types.NumberTower.add=function(m,n){if(m.level()=0};var w=function(ag){for(var af=0;af="a"&&ag[af]<="z")||(ag[af]>="A"&&ag[af]<="Z"))){return false}}return true};var N=(function(){var af=new RegExp("^\\s*$");return function(ag){return(ag.match(af)?true:false)}}());var c=function(af){return af!=null&&af!=undefined&&(af instanceof plt.types.Vector)};var i=function(af,ah){for(var ag=0;ag as ~a argument, given: ~s",[ai,ag,j(af),ah])};var z=function(ag,aj,ai,ah,af){if(!aj(ag)){throw new J(C(ai,ah,af,ag))}};var K=function(ag,ah,af){if(!b(ag)){throw new J(C(ah,"list",af,ag))}};var V=function(ag,aj,ai,ah,af){if(!b(ag)){throw new J(C(ai,"listof "+ah,af,ag))}while(!ag.isEmpty()){if(!aj(ag.first())){throw new J(C(ai,"listof "+ah,af,ag))}ag=ag.rest()}};var B=function(ai,ag,ah,af){return function(al,aj,ak){z(al,ai,af,ag,1);z(aj,ai,af,ag,2);i(ak,function(am,an){z(am,ai,af,ag,an+3)});return ah(al,aj,ak)}};var p=function(ag,af){return B(ab,"number",function(aj,ah,ai){return L(ag,aj,ah,ai)},af)};var ad=function(ag,af){return B(s,"char",function(aj,ah,ai){return L(ag,aj,ah,ai)},af)};var r=function(ag,af){return B(k,"string",function(aj,ah,ai){return L(ag,aj,ah,ai)},af)};plt.Kernel={_heir:D,pi:plt.types.FloatPoint.makeInstance(Math.PI),e:plt.types.FloatPoint.makeInstance(Math.E),Struct:function(ag,af){this._constructorName=ag;this._fields=af;this._eqHashCode=plt.types.makeEqHashCode()},struct_question_:function(af){return(af!=null&&af!=undefined&&af instanceof plt.Kernel.Struct)},number_question_:function(af){return ab(af)},equal_question_:function(af,ag){return plt.Kernel.isEqual(af,ag,new Z())},equal_tilde__question_:function(af,ah,ag){z(ag,ab,"equal~?","number",3);if(ab(af)&&ab(ah)){if("isEqual" in af){return plt.types.NumberTower.approxEqual(af,ah,ag)}else{if("isEqual" in ah){return plt.types.NumberTower.approxEqual(ah,af,ag)}else{return(af==ah)}}}else{return af.isEqual(ah)}},eq_question_:function(af,ag){return(af==ag)},eqv_question_:function(af,ag){if(ab(af)&&ab(ag)&&af.level()==ag.level()){return plt.types.NumberTower.equal(af,ag)}else{if(s(af)&&s(ag)){return af.getValue()==ag.getValue()}}return af===ag},identity:function(af){return af},cons:function(af,ag){K(ag,"cons",2);return plt.types.Cons.makeInstance(af,ag)},first:function(af){K(af,"first",1);return af.first()},rest:function(af){K(af,"rest",1);return af.rest()},second:function(af){K(af,"second",1);return af.rest().first()},third:function(af){K(af,"third",1);return af.rest().rest().first()},fourth:function(af){K(af,"fourth",1);return af.rest().rest().rest().first()},fifth:function(af){K(af,"fifth",1);return af.rest().rest().rest().rest().first()},random:function(af){z(af,q,"random","integer",1);return plt.types.Rational.makeInstance(Math.floor(plt.types.NumberTower.toInteger(af)*Math.random()),1)},current_dash_seconds:function(){return plt.types.Rational.makeInstance(new Date().getMilliseconds()/1000)},floor:function(af){z(af,ab,"floor","number",1);return af.floor()},ceiling:function(af){z(af,ab,"ceiling","number",1);return af.ceiling()},sqrt:function(af){z(af,ab,"sqrt","number",1);return af.sqrt()},integer_dash_sqrt:function(ag){z(ag,q,"integer-sqrt","integer",1);var af=ag.sqrt();if(G(af)){return plt.types.Rational.makeInstance(af.toInteger())}else{if(Y(af)){return plt.types.Rational.makeInstance(af.toInteger())}else{return plt.types.Complex.makeInstance(plt.types.Rational.makeInstance(plt.Kernel.real_dash_part(af).toInteger()),plt.types.Rational.makeInstance(plt.Kernel.imag_dash_part(af).toInteger()))}}},sqr:function(af){z(af,ab,"sqr","number",1);return plt.types.NumberTower.sqr(af)},sin:function(af){z(af,ab,"sin","number",1);return af.sin()},cos:function(af){z(af,ab,"cos","number",1);return af.cos()},modulo:function(af,ag){z(af,ab,"modulo","number",1);z(ag,ab,"modulo","number",2);return plt.types.NumberTower.modulo(af,ag)},zero_question_:function(af){z(af,ab,"zero?","number",1);return plt.types.NumberTower.equal(af,plt.types.Rational.ZERO)},_equal__tilde_:function(af,ah,ag){z(af,ab,"=~","number",1);z(ah,ab,"=~","number",2);z(ag,ab,"=~","number",3);return plt.types.NumberTower.approxEqual(af,ah,ag)},abs:function(af){z(af,ab,"abs","number",1);return plt.types.NumberTower.abs(af)},add1:function(af){z(af,ab,"add1","number",1);return plt.types.NumberTower.add(af,plt.types.Rational.ONE)},sub1:function(af){z(af,ab,"sub1","number",1);return plt.types.NumberTower.subtract(af,plt.types.Rational.ONE)},_plus_:function(af){i(af,function(ai,aj){z(ai,ab,"+","number",aj+1)});var ag,ah=plt.types.Rational.ZERO;for(ag=0;ag="),_lessthan__equal_:p(plt.types.NumberTower.lessThanOrEqual,"<="),_greaterthan_:p(plt.types.NumberTower.greaterThan,">"),_lessthan_:p(plt.types.NumberTower.lessThan,"<"),min:function(ag,af){z(ag,ab,"min","number",1);i(af,function(ah,ai){z(this,ab,"min","number",ai+2)});return n(plt.types.NumberTower.lessThanOrEqual,ag,af)},max:function(ag,af){z(ag,ab,"max","number",1);i(af,function(ah,ai){z(this,ab,"max","number",ai+2)});return n(plt.types.NumberTower.greaterThanOrEqual,ag,af)},lcm:function(ai,ah){z(ai,q,"lcm","number",1);i(ah,function(aj,ak){z(this,q,"lcm","number",ak+2)});var af=Math.abs(ai.toInteger());if(af==0){return plt.types.Rational.ZERO}for(var ag=0;aginexact","number",1);return plt.types.FloatPoint.makeInstance(af.toFloat())},inexact_dash__greaterthan_exact:function(af){z(af,ab,"inexact->exact","number",1);return plt.types.NumberTower.toExact(af)},exact_question_:function(af){z(af,ab,"exact?","number",1);return af.isExact()},inexact_question_:function(af){z(af,ab,"inexact?","number",1);return !af.isExact()},rational_question_:function(af){return(ab(af)&&af.isRational())},number_dash__greaterthan_string:function(af){z(af,ab,"number->string","number",1);return plt.types.String.makeInstance(plt.Kernel.toWrittenString(af))},conjugate:function(af){z(af,ab,"conjugate","number",1);return af.conjugate()},magnitude:function(af){z(af,ab,"magnitude","number",1);return af.magnitude()},log:function(af){z(af,ab,"log","number",1);return af.log()},angle:function(af){z(af,ab,"angle","number",1);return af.angle()},atan:function(af,ag){if(ag.length==0){z(af,ab,"atan","number",1);return af.atan()}else{if(ag.length==1){z(af,Y,"atan","number",1);z(ag[0],Y,"atan","number",2);return plt.types.FloatPoint.makeInstance(Math.atan2(plt.types.NumberTower.toFloat(af),plt.types.NumberTower.toFloat(ag[0])))}else{throw new F(plt.Kernel.format("atan: expects 1 to 2 arguments, given ~a.",[plt.types.Rational.makeInstance(ag.length)]))}}},expt:function(af,ag){z(af,ab,"expt","number",1);z(ag,ab,"expt","number",2);return plt.types.NumberTower.expt(af,ag)},exp:function(af){z(af,ab,"exp","number",1);return af.exp()},acos:function(af){z(af,ab,"acos","number",1);return af.acos()},asin:function(af){z(af,ab,"asin","number",1);return af.asin()},tan:function(af){z(af,ab,"tan","number",1);return plt.types.NumberTower.divide(af.sin(),af.cos())},complex_question_:function(af){return H(af)},cosh:function(af){z(af,ab,"cosh","number",1);return this._plus_([this.exp(af),this.exp(af.minus())]).half()},sinh:function(af){z(af,ab,"sinh","number",1);return plt.types.NumberTower.subtract(this.exp(af),this.exp(af.minus())).half()},denominator:function(af){z(af,G,"denominator","rational",1);return af.denominator()},numerator:function(af){z(af,G,"numerator","rational",1);return af.numerator()},odd_question_:function(af){z(af,ab,"odd?","number",1);return(Math.abs((af.toInteger()%2))==1)},even_question_:function(af){z(af,ab,"even?","number",1);return(Math.abs((af.toInteger()%2))==0)},positive_question_:function(af){z(af,ab,"positive?","number",1);return this._greaterthan_(af,plt.types.Rational.ZERO,[])},negative_question_:function(af){z(af,ab,"negative?","number",1);return this._lessthan_(af,plt.types.Rational.ZERO,[])},imag_dash_part:function(af){z(af,ab,"imag-part","number",1);return af.imag_dash_part()},real_dash_part:function(af){z(af,ab,"real-part","number",1);return af.real_dash_part()},make_dash_polar:function(ah,ag){if(plt.types.NumberTower.equal(ag,plt.types.Rational.ZERO)){return ah}var af=plt.types.NumberTower.multiply(ah,ag.cos());var ai=plt.types.NumberTower.multiply(ah,ag.sin());return plt.types.Complex.makeInstance(af,ai)},integer_question_:function(af){return(q(af))},make_dash_rectangular:function(af,ag){return plt.types.Complex.makeInstance(af,ag)},quotient:function(af,ah){z(af,q,"quotient","integer",1);z(ah,q,"quotient","integer",2);var ag=plt.types.NumberTower.divide(af,ah);if(plt.Kernel.positive_question_(ag)){return plt.types.Rational.makeInstance(ag.floor().toInteger(),1)}else{return plt.types.Rational.makeInstance(ag.ceiling().toInteger(),1)}},remainder:function(af,ag){z(af,ab,"remainder","number",1);z(ag,ab,"remainder","number",2);return plt.types.Rational.makeInstance(af.toInteger()%ag.toInteger(),1)},real_question_:function(af){return Y(af)},round:function(af){z(af,ab,"round","number",1);return af.round()},sgn:function(af){z(af,ab,"sgn","number",1);if(this.positive_question_(af).valueOf()){return plt.types.Rational.ONE}if(this.negative_question_(af).valueOf()){return plt.types.Rational.NEGATIVE_ONE}else{return plt.types.Rational.ZERO}},boolean_equal__question_:function(af,ag){z(af,I,"boolean=?","boolean",1);z(ag,I,"boolean=?","boolean",2);return af==ag},boolean_question_:function(af){return I(af)},false_question_:function(af){return(af==plt.types.Logic.FALSE)},not:function(af){if(!af||af===plt.types.Logic.FALSE){return plt.types.Logic.TRUE}return plt.types.Logic.FALSE},symbol_dash__greaterthan_string:function(af){z(af,m,"symbol->string","symbol",1);return plt.types.String.makeInstance(af.val)},symbol_equal__question_:function(af,ag){z(af,m,"symbol=?","symbol",1);z(ag,m,"symbol=?","symbol",2);return(af.val==ag.val)},symbol_question_:function(af){return m(af)},append:function(ag){var ah;for(ah=0;ah=0;ah--){ag=plt.types.Cons.makeInstance(af[ah],ag)}return ag},list_star_:function(af,ah){var ag=ah.pop();if(ag==undefined||!ag instanceof plt.types.Cons){throw new J("list*: "+ag+" not a list")}ah.unshift(af);return plt.Kernel.append([plt.Kernel.list(ah),ag])},list_dash_ref:function(ag,af){K(ag,"list-ref",1);z(af,o,"list-ref","natural",2);var ah=plt.types.Rational.ZERO;for(;plt.Kernel._lessthan_(ah,af,[]);ah=plt.Kernel.add1(ah)){if(ag.isEmpty()){throw new F("list-ref: index too small")}else{ag=ag.rest()}}return ag.first()},remove:function(ai,ag){K(ag,"member",2);var ah=ag;var aj=new Z();var af=plt.types.Empty.EMPTY;while(!ag.isEmpty()){if(plt.Kernel.isEqual(ai,ag.first(),aj).valueOf()){return plt.Kernel.append([plt.Kernel.reverse(af),ag.rest()])}else{af=plt.types.Cons.makeInstance(ag.first(),af);ag=ag.rest()}}return ah},member:function(ag,af){K(af,"member",2);var ah=new Z();while(!af.isEmpty()){if(plt.Kernel.isEqual(ag,af.first(),ah).valueOf()){return plt.types.Logic.TRUE}af=af.rest()}return plt.types.Logic.FALSE},memq:function(ag,af){K(af,"memq",2);while(!af.isEmpty()){if(plt.Kernel.eq_question_(ag,af.first()).valueOf()){return af}af=af.rest()}return plt.types.Logic.FALSE},memv:function(ag,af){K(af,"memv",2);while(!af.isEmpty()){if(plt.Kernel.eqv_question_(ag,af.first()).valueOf()){return af}af=af.rest()}return plt.types.Logic.FALSE},memf:function(ag,af){z(ag,u,"memf","function",1);K(af,"memf",2);while(!af.isEmpty()){if(ag([af.first()])){return af}af=af.rest()}return plt.types.Logic.FALSE},compose:function(af){return function(ag){var ai=ag;for(var ah=af.length-1;ah>=0;ah--){ai=[af[ah](ai)]}return ai[0]}},string_dash__greaterthan_number:function(ai){z(ai,k,"string->number","string",1);try{var ag=plt.reader.readSchemeExpressions(ai,"");if(plt.types.NumberTower.equal(plt.Kernel.length(ag),plt.types.Rational.ONE)){var af=stx_dash_e(ag.first());if(ab(af)){return af}else{return plt.types.Logic.FALSE}}else{return plt.types.Logic.FALSE}}catch(ah){return plt.types.Logic.FALSE}},string_dash__greaterthan_symbol:function(af){z(af,k,"string->symbol","string",1);return plt.types.Symbol.makeInstance(af)},string_dash__greaterthan_int:function(af){z(af,k,"string->int","string",1);return plt.types.Rational.makeInstance(af.toString().charCodeAt(0),1)},string_dash_append:function(af){i(af,function(ag,ah){z(ag,k,"string-append","string",ah+1)});return plt.types.String.makeInstance(af.join(""))},replicate:function(ai,ah){z(ai,o,"replicate","natural",1);z(ah,k,"replicate","string",2);var af=[];for(var ag=0;ag=ag},"string>=?"),string_greaterthan__question_:r(function(af,ag){return af>ag},"string>?"),string_dash_ci_equal__question_:r(function(af,ag){return af.toUpperCase()==ag.toUpperCase()},"string-ci=?"),string_dash_ci_lessthan__equal__question_:r(function(af,ag){return af.toUpperCase()<=ag.toUpperCase()},"string-ci<=?"),string_dash_ci_lessthan__question_:r(function(af,ag){return af.toUpperCase()ag.toUpperCase()},"string-ci>?"),string_dash_ci_greaterthan__equal__question_:r(function(af,ag){return af.toUpperCase()>=ag.toUpperCase()},"string-ci>=?"),string_dash_copy:function(af){z(af,k,"string-copy","string",1);return af.substring(0,af.length)},string_dash_length:function(af){z(af,k,"string-length","string",1);return plt.types.Rational.makeInstance(af.length,1)},string_dash_ref:function(ag,af){z(ag,k,"string-ref","string",1);z(af,o,"string-ref","natural",2);if(af.toInteger()>=ag.length){throw new F("string-ref: index >= length")}return plt.types.String.makeInstance(ag.charAt(af.toInteger()))},string_dash_ith:function(ag,af){z(ag,k,"string-ith","string",1);z(af,o,"string-ith","natural",2);if(af.toInteger()>=ag.length){throw new F("string-ith: index >= string length")}return plt.types.String.makeInstance(ag.substring(af.toInteger(),af.toInteger()+1))},int_dash__greaterthan_string:function(af){z(af,q,"int->string","integer",1);return plt.types.String.makeInstance(String.fromCharCode(af.toInteger()))},string_question_:function(af){return k(af)},substring:function(ah,ag,af){z(ah,k,"substring","string",1);z(ag,o,"substring","natural",2);z(af,o,"substring","natural",3);if(ag.toInteger()>af.toInteger()){throw new F("substring: begin > end")}if(af.toInteger()>ah.length){throw new F("substring: end > length")}return String.makeInstance(ah.substring(ag.toInteger(),af.toInteger()))},char_question_:function(af){return s(af)},char_dash__greaterthan_integer:function(af){z(af,s,"char->integer","char",1);var ag=new String(af.val);return plt.types.Rational.makeInstance(ag.charCodeAt(0),1)},integer_dash__greaterthan_char:function(ag){z(ag,q,"integer->char","integer",1);var af=String.fromCharCode(ag.toInteger());return plt.types.Char.makeInstance(af)},char_equal__question_:ad(function(af,ag){return af.val==ag.val},"char=?"),char_lessthan__question_:ad(function(af,ag){return af.valag.val},"char>?"),char_greaterthan__equal__question_:ad(function(af,ag){return af.val>=ag.val},"char>=?"),char_dash_ci_equal__question_:ad(function(af,ag){return af.val.toUpperCase()==ag.val.toUpperCase()},"char-ci=?"),char_dash_ci_lessthan__question_:ad(function(af,ag){return af.val.toUpperCase()ag.val.toUpperCase()},"char-ci>?"),char_dash_ci_greaterthan__equal__question_:ad(function(af,ag){return af.val.toUpperCase()>=ag.val.toUpperCase()},"char-ci>=?"),char_dash_numeric_question_:function(af){z(af,s,"char-numeric?","char",1);var ag=af.val;return(ag>="0"&&ag<="9")},char_dash_alphabetic_question_:function(af){z(af,s,"char-alphabetic?","char",1);var ag=af.val;return w(ag)},char_dash_whitespace_question_:function(af){z(af,s,"char-whitespace?","char",1);var ag=af.val;return N(ag)},char_dash_upper_dash_case_question_:function(af){z(af,s,"char-upper-case?","char",1);return w(af.val)&&af.val.toUpperCase()==af.val},char_dash_lower_dash_case_question_:function(af){z(af,s,"char-lower-case?","char",1);return w(af.val)&&af.val.toLowerCase()==af.val},char_dash_upcase:function(af){z(af,s,"char-upcase","char",1);return plt.types.Char.makeInstance(af.val.toUpperCase())},char_dash_downcase:function(af){z(af,s,"char-downcase","char",1);return plt.types.Char.makeInstance(af.val.toLowerCase())},list_dash__greaterthan_string:function(af){V(af,s,"list->string","char",1);var ag="";while(!af.isEmpty()){ag+=af.first().val;af=af.rest()}return plt.types.String.makeInstance(ag)},implode:function(af){V(af,k,"implode","string",1);var ag=[];while(!af.isEmpty()){ag.push(af.first().toString());af=af.rest()}return plt.types.String.makeInstance(ag.join(""))},string_dash_numeric_question_:function(ag){z(ag,k,"string-numeric?","string",1);for(var af=0;af"9"){return plt.types.Logic.FALSE}}return plt.types.Logic.TRUE},string_dash_alphabetic_question_:function(af){z(af,k,"string-alphabetic?","string",1);return w(af)?plt.types.Logic.TRUE:plt.types.Logic.FALSE},string_dash_whitespace_question_:function(af){z(af,k,"string-whitespace?","string",1);return N(af)?plt.types.Logic.TRUE:plt.types.Logic.FALSE},string_dash_upper_dash_case_question_:function(af){z(af,k,"string-upper-case?","string",1);return w(af)&&af.toUpperCase()==af},string_dash_lower_dash_case_question_:function(af){z(af,k,"string-lower-case?","string",1);return w(af)&&af.toLowerCase()==af},string:function(ah){i(ah,function(ai,aj){z(this,s,"string","char",aj+1)});var af=[];for(var ag=0;aglist","string",1);var ah=ai;var af=plt.types.Empty.EMPTY;for(var ag=ah.length-1;ag>=0;ag--){af=plt.types.Cons.makeInstance(plt.types.Char.makeInstance(ah.charAt(ag)),af)}return af},explode:function(ai){z(ai,k,"explode","string",1);var ah=ai;var af=plt.types.Empty.EMPTY;for(var ag=ah.length-1;ag>=0;ag--){af=plt.types.Cons.makeInstance(plt.types.String.makeInstance(ah.charAt(ag)),af)}return af}};plt.Kernel.isEqual=function(af,ah,ag){if(ab(af)&&ab(ah)){if("isEqual" in af){return plt.types.NumberTower.equal(af,ah)}else{if("isEqual" in ah){return plt.types.NumberTower.equal(ah,af)}else{return(af==ah)}}}if(af==undefined||af==null){return(ah==undefined||ah==null)}if(typeof(af)=="object"&&typeof(ah)=="object"&&ag.find(af)===ag.find(ah)){return true}else{if(typeof(af)=="object"&&typeof(ah)=="object"){ag.merge(af,ah)}return af.isEqual(ah,ag)}};plt.Kernel._dumpKernelSymbols=function(){var af=plt.types.Empty.EMPTY;for(var ag in plt.Kernel){af=plt.types.Cons.makeInstance(plt.types.Symbol.makeInstance(ag),af)}return af};plt.Kernel.openInputStx=function(af){throw new F("open-input-stx currently unsupported")};var g=function(){return new plt._Hashtable(function(af){return plt.types.getEqHashCode(af)},function(af,ag){return af===ag})};var ae=function(af){this.hash=g();this._eqHashCode=plt.types.makeEqHashCode()};ae.prototype.toWrittenString=function(af){return""};ae.prototype.toDisplayedString=function(af){return""};ae.prototype.isEqual=function(af,ai){if(af==undefined||af==null||(!(af instanceof ae))){return false}if(this.hash.keys().length!=af.hash.keys().length){return false}var ah=this.hash.keys();for(var ag=0;ag"};S.prototype.toDisplayedString=function(af){return""};S.prototype.isEqual=function(af,ai){if(af==undefined||af==null||(!(af instanceof S))){return false}if(this.hash.keys().length!=af.hash.keys().length){return false}var ah=this.hash.keys();for(var ag=0;ag0){ah.unshift(af.pop())}ah.unshift(aj)}if(aa(ak,ah.length)){return ak(ah)}else{throw new F(plt.Kernel.format("~a: expects ~a, given ~a: ~s",[ak,f(ak),ah.length,plt.Kernel.list(ah)]))}};plt.Kernel.map=function(ai,aj){z(ai,u,"map","function",1);i(aj,function(ak,al){K(ak,"map",al+2)});var ah=plt.types.Empty.EMPTY;while(!aj[0].isEmpty()){var af=[];for(var ag=0;agaf){ag=aj.first();af=ai}aj=aj.rest()}return ag};plt.Kernel.sort=function(ag,ah){z(ag,b,"sort","list",1);z(ah,u,"sort","function",2);var af=[];while(!ag.isEmpty()){af.push(ag.first());ag=ag.rest()}af.sort(function(ai,aj){return ah([ai,aj])?-1:1});return plt.Kernel.list(af)};plt.Kernel.quicksort=plt.Kernel.sort;plt.Kernel.build_dash_list=function(ai,ah){z(ai,o,"build-list","natural",1);z(ah,u,"build-list","function",2);var af=plt.types.Empty.EMPTY;for(var ag=0;ag0){throw new F("format: More arguments passed than expected")}return af};plt.Kernel.string=function(af){i(af,function(ai,aj){z(ai,s,"string","char",aj+1)});var ah=[];for(var ag=0;ag=af.procedureArity.rest().first().toInteger()}else{return ag==af.procedureArity.toInteger()}};var f=function(af){if(W(af.procedureArity)){return("at least "+(af.procedureArity.rest().first().toInteger()==1)?"one argument":af.procedureArity.rest().first().toInteger()+" arguments")}else{return((af.procedureArity.toInteger()==1)?"one argument":af.procedureArity.toInteger()+" arguments")}};plt.Kernel.xml_dash__greaterthan_s_dash_exp=function(ah){z(ah,k,"xml->s-exp","string",1);if(ah.length==0){return plt.types.String.makeInstance("")}var ai;try{ai=new ActiveXObject("Microsoft.XMLDOM");ai.async="false";ai.loadXML(ah)}catch(aj){var al=new DOMParser();ai=al.parseFromString(ah,"text/xml")}var ag=function(an){var am=plt.types.Empty.EMPTY;for(var ao=0;ao"}if(typeof(af)=="string"){return af.toWrittenString()}if(typeof(af)!="object"&&typeof(af)!="function"){return af.toString()}if("toWrittenString" in af){return af.toWrittenString(ag)}if("toDisplayedString" in af){return af.toDisplayedString(ag)}else{return af.toString()}};plt.Kernel.toDisplayedString=function(af,ag){if(!ag){ag=g()}if(af&&ag.containsKey(af)){return"..."}if(af==undefined||af==null){return""}if(typeof(af)=="string"){return af.toDisplayedString()}if(typeof(af)!="object"&&typeof(af)!="function"){return af.toString()}if("toWrittenString" in af){return af.toWrittenString(ag)}if("toDisplayedString" in af){return af.toDisplayedString(ag)}else{return af.toString()}};plt.Kernel.toDomNode=function(af,ag){if(!ag){ag=g()}if(af&&ag.containsKey(af)){return document.createTextNode("...")}if(af==undefined||af==null){var ah=document.createTextNode("");return ah}if(typeof(af)=="string"){var ah=document.createTextNode(af.toWrittenString());return ah}if(typeof(af)!="object"&&typeof(af)!="function"){var ah=document.createTextNode(af.toString());return ah}if(af.nodeType){return af}if("toDomNode" in af){return af.toDomNode(ag)}if("toWrittenString" in af){var ah=document.createTextNode(plt.Kernel.toWrittenString(af,ag));return ah}if("toDisplayedString" in af){var ah=document.createTextNode(plt.Kernel.toDisplayedString(af,ag));return ah}else{var ah=document.createTextNode(af.toString());return ah}};plt.Kernel.Struct.prototype.toWrittenString=function(ag){ag.put(this,true);var af=[];af.push("(");af.push(this._constructorName);for(var ah=0;ah0){throw new plt.Kernel.MobyParserError("Error while tokenizing: the rest of the stream is: "+l[1],new Loc(y.length-l[1].length,i(y.substring(0,y.length-l[1].length)),l[1].length,C))}var v=plt.types.Symbol.makeInstance("quote");var k=plt.types.Symbol.makeInstance("quasiquote");var A=plt.types.Symbol.makeInstance("unquote");var m=plt.types.Symbol.makeInstance("unquote-splicing");var r=plt.types.Empty.EMPTY;var o=function(s){return(z.length>0&&z[0][0]==s)};var t=function(F){if(z.length==0){if(D){throw new plt.Kernel.MobyParserError("token stream exhausted while trying to eat "+F,D[2])}else{throw new plt.Kernel.MobyParserError("token stream exhausted while trying to eat "+F,new Loc(0,0,y.length,C))}}var s=z.shift();D=s;if(s[0]==F){return s}else{throw new plt.Kernel.MobyParserError("Unexpected token "+s,s[2])}};var q;var w;var n;n=function(F,H){var s=t(F);var G=q();return B(plt.Kernel.cons(E(H,s[2]),plt.Kernel.cons(G,r)),new Loc(s[2].offset,s[2].line,(G.loc.offset-s[2].offset+G.loc.span),""))};var p=function(s){switch(s){case"(":return")";case"[":return"]";case"{":return"}";default:throw new Error()}};var x=function(I,H){var F=I.match(/([+\-]?\d+)\/(\d+)/);if(I=="+inf.0"){return plt.types.FloatPoint.makeInstance(Number.POSITIVE_INFINITY)}else{if(I=="-inf.0"){return plt.types.FloatPoint.makeInstance(Number.NEGATIVE_INFINITY)}else{if(I=="+nan.0"||I=="-nan.0"){return plt.types.FloatPoint.makeInstance(Number.NaN)}else{if(I.match(/[eE]/)){return plt.types.FloatPoint.makeInstance(parseFloat(I))}else{if(I.match(/\./)){if(H){var s=I.match("^(.*)[.](.*)$");var G=plt.types.Rational.makeInstance(parseInt(s[1]||"0"));if(plt.types.NumberTower.lessThan(G,plt.types.Rational.ZERO)){return plt.types.NumberTower.subtract(G,plt.types.Rational.makeInstance(parseInt(s[2]),Math.pow(10,s[2].length)))}else{return plt.types.NumberTower.add(G,plt.types.Rational.makeInstance(parseInt(s[2]),Math.pow(10,s[2].length)))}}else{return plt.types.FloatPoint.makeInstance(parseFloat(I))}}else{if(F){if(H){return plt.types.Rational.makeInstance(parseInt(F[1]),parseInt(F[2]))}else{return plt.types.FloatPoint.makeInstance(parseInt(F[1])/parseInt(F[2]))}}else{if(H){return plt.types.Rational.makeInstance(parseInt(I),1)}else{return plt.types.FloatPoint.makeInstance(parseInt(I))}}}}}}}};q=function(){if(z.length==0){if(D){throw new plt.Kernel.MobyParserError("Parse broke with empty token stream",D[2])}else{throw new plt.Kernel.MobyParserError("Parse broke with empty token stream",new Loc(0,0,y.length,C))}}switch(z[0][0]){case"(":var P=t("(");var L=P[1];var J=p(P[1]);var R=w();if(z.length==0){throw new plt.Kernel.MobyParserError("Expected a "+J+" to close "+L,P[2])}else{if(z[0][1]!=J){throw new plt.Kernel.MobyParserError("Expected a "+J+" to close "+L,z[0][2])}}var N=t(")");return make_dash_stx_colon_list(R,new Loc(P[2].offset,P[2].line,N[2].offset-P[2].offset+1,""));case"#;":var I=t("#;");var H=q();return q();case"'":return n("'",v);case"`":return n("`",k);case",":return n(",",A);case",@":return n(",@",m);case"number":var Q=t("number");var O=Q[1].match(/^(\#[ie])(.+)$/);if(O){if(O[1]=="#i"){return E(x(O[2],false),Q[2])}else{return E(x(O[2],true),Q[2])}}else{return E(x(Q[1],true),Q[2])}case"complex":var Q=t("complex");var G=Q[1].match(/^((?:\#[ei])?)([+\-]?(?:\d+\/\d+|\d+\.\d+|\d+\.|\.\d+|\d+)?)([+\-](?:\d+\/\d+|\d+\.\d+|\d+\.|\.\d+|\d+))i/);var F=(G[1]=="#i"?false:true);var M=(G[2]!=""?x(G[2],F):plt.types.Rational.ZERO);var K=x(G[3],F);var s=E(plt.types.Complex.makeInstance(M,K));return s;case"string":var Q=t("string");return E(plt.types.String.makeInstance(Q[1]),Q[2]);case"char":var Q=t("char");if(Q[1]=="newline"){return E(plt.types.Char.makeInstance("\n"),Q[2])}else{if(Q[1]=="backspace"){return E(plt.types.Char.makeInstance(String.fromCharCode(8)),Q[2])}else{return E(plt.types.Char.makeInstance(Q[1]),Q[2])}}case"symbol":var Q=t("symbol");if(Q[1]=="."){throw new plt.Kernel.MobyParserError("Dotted pairs are not currently accepted by Moby",Q[2])}return E(plt.types.Symbol.makeInstance(Q[1]),Q[2]);default:throw new plt.Kernel.MobyParserError("Parse broke with token stream "+z,z[0][2])}};w=function(){var s=plt.types.Empty.EMPTY;while(true){if(z.length==0||o(")")){break}else{if(o("#;")){t("#;");var F=q()}else{var G=q();s=plt.types.Cons.makeInstance(G,s)}}}return plt.Kernel.reverse(s)};var u=w();if(z.length>0){throw new plt.Kernel.MobyParserError("More elements in the program's token stream than expected: the next unconsumed token is: "+z[0][1],z[0][2])}return u};plt.reader.tokenize=h;plt.reader.readSchemeExpressions=f}());var stx_colon_atom=function(b,c){plt.Kernel.Struct.call(this,"make-stx:atom",[b,c]);this.datum=b;this.loc=c};stx_colon_atom.prototype=new plt.Kernel.Struct();var make_dash_stx_colon_atom=function(d,b){var c=new stx_colon_atom(d,b);return c};var stx_colon_atom_dash_datum=function(b){if(stx_colon_atom_question_(b)){return b.datum}else{throw new plt.Kernel.MobyRuntimeError(plt.Kernel.format("stx_colon_atom_dash_datum: not a stx:atom: ~s",[b]))}};var stx_colon_atom_dash_loc=function(b){if(stx_colon_atom_question_(b)){return b.loc}else{throw new plt.Kernel.MobyRuntimeError(plt.Kernel.format("stx_colon_atom_dash_loc: not a stx:atom: ~s",[b]))}};var set_dash_stx_colon_atom_dash_datum_bang_=function(c,b){if(stx_colon_atom_question_(c)){c.datum=b}else{throw new plt.Kernel.MobyRuntimeError(plt.Kernel.format("set_dash_stx_colon_atom_dash_datum_bang_: not a stx:atom: ~s",[c]))}};var set_dash_stx_colon_atom_dash_loc_bang_=function(c,b){if(stx_colon_atom_question_(c)){c.loc=b}else{throw new plt.Kernel.MobyRuntimeError(plt.Kernel.format("set_dash_stx_colon_atom_dash_loc_bang_: not a stx:atom: ~s",[c]))}};var stx_colon_atom_question_=function(b){return(b!=null&&b!=undefined&&b instanceof stx_colon_atom)};var stx_colon_list=function(b,c){plt.Kernel.Struct.call(this,"make-stx:list",[b,c]);this.elts=b;this.loc=c};stx_colon_list.prototype=new plt.Kernel.Struct();var make_dash_stx_colon_list=function(c,b){return new stx_colon_list(c,b)};var stx_colon_list_dash_elts=function(b){if(stx_colon_list_question_(b)){return b.elts}else{throw new plt.Kernel.MobyRuntimeError(plt.Kernel.format("stx_colon_list_dash_elts: not a stx:list: ~s",[b]))}};var stx_colon_list_dash_loc=function(b){if(stx_colon_list_question_(b)){return b.loc}else{throw new plt.Kernel.MobyRuntimeError(plt.Kernel.format("stx_colon_list_dash_loc: not a stx:list: ~s",[b]))}};var set_dash_stx_colon_list_dash_elts_bang_=function(c,b){if(stx_colon_list_question_(c)){c.elts=b}else{throw new plt.Kernel.MobyRuntimeError(plt.Kernel.format("set_dash_stx_colon_list_dash_elts_bang_: not a stx:list: ~s",[c]))}};var set_dash_stx_colon_list_dash_loc_bang_=function(c,b){if(stx_colon_list_question_(c)){c.loc=b}else{throw new plt.Kernel.MobyRuntimeError(plt.Kernel.format("set_dash_stx_colon_list_dash_loc_bang_: not a stx:list: ~s",[c]))}};var stx_colon_list_question_=function(b){return b!=null&&b!=undefined&&b instanceof stx_colon_list};var Loc=function(d,b,c,e){plt.Kernel.Struct.call(this,"make-Loc",[d,b,c,e]);this.offset=d;this.line=b;this.span=c;this.id=e};Loc.prototype=new plt.Kernel.Struct();var make_dash_Loc=function(e,d,c,b){return new Loc(e,d,c,b)};var Loc_dash_offset=function(b){if(Loc_question_(b)){return b.offset}else{throw new plt.Kernel.MobyRuntimeError(plt.Kernel.format("Loc_dash_offset: not a Loc: ~s",[b]))}};var Loc_dash_line=function(b){if(Loc_question_(b)){return b.line}else{throw new plt.Kernel.MobyRuntimeError(plt.Kernel.format("Loc_dash_line: not a Loc: ~s",[b]))}};var Loc_dash_span=function(b){if(Loc_question_(b)){return b.span}else{throw new plt.Kernel.MobyRuntimeError(plt.Kernel.format("Loc_dash_span: not a Loc: ~s",[b]))}};var Loc_dash_id=function(b){if(Loc_question_(b)){return b.id}else{throw new plt.Kernel.MobyRuntimeError(plt.Kernel.format("Loc_dash_id: not a Loc: ~s",[b]))}};var set_dash_Loc_dash_offset_bang_=function(c,b){if(Loc_question_(c)){c.offset=b}else{throw new plt.Kernel.MobyRuntimeError(plt.Kernel.format("set_dash_Loc_dash_offset_bang_: not a Loc: ~s",[c]))}};var set_dash_Loc_dash_line_bang_=function(c,b){if(Loc_question_(c)){c.line=b}else{throw new plt.Kernel.MobyRuntimeError(plt.Kernel.format("set_dash_Loc_dash_line_bang_: not a Loc: ~s",[c]))}};var set_dash_Loc_dash_span_bang_=function(c,b){if(Loc_question_(c)){c.span=b}else{throw new plt.Kernel.MobyRuntimeError(plt.Kernel.format("set_dash_Loc_dash_span_bang_: not a Loc: ~s",[c]))}};var set_dash_Loc_dash_id_bang_=function(c,b){if(Loc_question_(c)){c.id=b}else{throw new plt.Kernel.MobyRuntimeError(plt.Kernel.format("set_dash_Loc_dash_id_bang_: not a Loc: ~s",[c]))}};var Loc_question_=function(b){return b!=null&&b!=undefined&&b instanceof Loc};var Loc_dash__greaterthan_string=function(b){return(plt.Kernel.setLastLoc('offset=284 line=14 span=154 id="stx.ss"')&&plt.Kernel.format((plt.types.String.makeInstance("offset=~a line=~a span=~a id=~s")),[(plt.Kernel.setLastLoc('offset=337 line=15 span=18 id="stx.ss"')&&Loc_dash_offset(b)),(plt.Kernel.setLastLoc('offset=367 line=16 span=16 id="stx.ss"')&&Loc_dash_line(b)),(plt.Kernel.setLastLoc('offset=395 line=17 span=16 id="stx.ss"')&&Loc_dash_span(b)),(plt.Kernel.setLastLoc('offset=423 line=18 span=14 id="stx.ss"')&&Loc_dash_id(b))]))};var stx_question_=function(b){return((plt.Kernel.setLastLoc('offset=489 line=23 span=13 id="stx.ss"')&&stx_colon_atom_question_(b))||(plt.Kernel.setLastLoc('offset=509 line=24 span=13 id="stx.ss"')&&stx_colon_list_question_(b)))};var stx_dash_e=function(b){return((plt.Kernel.setLastLoc('offset=635 line=31 span=17 id="stx.ss"')&&stx_colon_atom_question_(b))?(plt.Kernel.setLastLoc('offset=658 line=32 span=22 id="stx.ss"')&&stx_colon_atom_dash_datum(b)):((plt.Kernel.setLastLoc('offset=687 line=33 span=17 id="stx.ss"')&&stx_colon_list_question_(b))?(plt.Kernel.setLastLoc('offset=710 line=34 span=21 id="stx.ss"')&&stx_colon_list_dash_elts(b)):(plt.Kernel.setLastLoc('offset=624 line=30 span=109 id="stx.ss"')&&plt.Kernel.error((plt.types.Symbol.makeInstance("cond")),(plt.types.String.makeInstance('cond: fell out of cond around "offset=624 line=30 span=109 id=\\"stx.ss\\""'))))))};var stx_dash_loc=function(b){return((plt.Kernel.setLastLoc('offset=797 line=40 span=17 id="stx.ss"')&&stx_colon_atom_question_(b))?(plt.Kernel.setLastLoc('offset=820 line=41 span=20 id="stx.ss"')&&stx_colon_atom_dash_loc(b)):((plt.Kernel.setLastLoc('offset=847 line=42 span=17 id="stx.ss"')&&stx_colon_list_question_(b))?(plt.Kernel.setLastLoc('offset=870 line=43 span=20 id="stx.ss"')&&stx_colon_list_dash_loc(b)):(plt.Kernel.setLastLoc('offset=786 line=39 span=106 id="stx.ss"')&&plt.Kernel.error((plt.types.Symbol.makeInstance("cond")),(plt.types.String.makeInstance('cond: fell out of cond around "offset=786 line=39 span=106 id=\\"stx.ss\\""'))))))};var stx_dash_begins_dash_with_question_=function(c,b){return((plt.Kernel.setLastLoc('offset=991 line=49 span=17 id="stx.ss"')&&stx_colon_atom_question_(c))?plt.types.Logic.FALSE:((plt.Kernel.setLastLoc('offset=1023 line=51 span=17 id="stx.ss"')&&stx_colon_list_question_(c))?((plt.Kernel.setLastLoc('offset=1051 line=52 span=36 id="stx.ss"')&&plt.Kernel.not((plt.Kernel.setLastLoc('offset=1056 line=52 span=30 id="stx.ss"')&&plt.Kernel.empty_question_((plt.Kernel.setLastLoc('offset=1064 line=52 span=21 id="stx.ss"')&&stx_colon_list_dash_elts(c))))))&&(plt.Kernel.setLastLoc('offset=1098 line=53 span=47 id="stx.ss"')&&plt.Kernel.symbol_question_((plt.Kernel.setLastLoc('offset=1107 line=53 span=37 id="stx.ss"')&&stx_dash_e((plt.Kernel.setLastLoc('offset=1114 line=53 span=29 id="stx.ss"')&&plt.Kernel.first((plt.Kernel.setLastLoc('offset=1121 line=53 span=21 id="stx.ss"')&&stx_colon_list_dash_elts(c))))))))&&(plt.Kernel.setLastLoc('offset=1156 line=54 span=74 id="stx.ss"')&&plt.Kernel.symbol_equal__question_((plt.Kernel.setLastLoc('offset=1166 line=54 span=37 id="stx.ss"')&&stx_dash_e((plt.Kernel.setLastLoc('offset=1173 line=54 span=29 id="stx.ss"')&&plt.Kernel.first((plt.Kernel.setLastLoc('offset=1180 line=54 span=21 id="stx.ss"')&&stx_colon_list_dash_elts(c)))))),b))):(plt.Kernel.setLastLoc('offset=980 line=48 span=253 id="stx.ss"')&&plt.Kernel.error((plt.types.Symbol.makeInstance("cond")),(plt.types.String.makeInstance('cond: fell out of cond around "offset=980 line=48 span=253 id=\\"stx.ss\\""'))))))};var datum_dash__greaterthan_stx=function(b,c){return((plt.Kernel.setLastLoc('offset=1461 line=65 span=14 id="stx.ss"')&&stx_question_(b))?b:(((plt.Kernel.setLastLoc('offset=1499 line=67 span=15 id="stx.ss"')&&plt.Kernel.pair_question_(b))||(plt.Kernel.setLastLoc('offset=1515 line=67 span=16 id="stx.ss"')&&plt.Kernel.empty_question_(b)))?(plt.Kernel.setLastLoc('offset=1538 line=68 span=89 id="stx.ss"')&&make_dash_stx_colon_list((plt.Kernel.setLastLoc('offset=1553 line=68 span=47 id="stx.ss"')&&plt.Kernel.map(((function(){plt.Kernel.setLastLoc('offset=1558 line=68 span=33 id="stx.ss"');var d=(function(f){var e=f[0];return(plt.Kernel.setLastLoc('offset=1570 line=68 span=20 id="stx.ss"')&&datum_dash__greaterthan_stx(e,c))});d.toWrittenString=function(e){return""};d.toDisplayedString=d.toWrittenString;return d})()),[b])),c)):(plt.types.Logic.TRUE?(plt.Kernel.setLastLoc('offset=1644 line=71 span=29 id="stx.ss"')&&make_dash_stx_colon_atom(b,c)):(plt.Kernel.setLastLoc('offset=1450 line=64 span=225 id="stx.ss"')&&plt.Kernel.error((plt.types.Symbol.makeInstance("cond")),(plt.types.String.makeInstance('cond: fell out of cond around "offset=1450 line=64 span=225 id=\\"stx.ss\\""')))))))};var stx_dash__greaterthan_datum=function(b){return((plt.Kernel.setLastLoc('offset=1787 line=84 span=17 id="stx.ss"')&&stx_colon_atom_question_(b))?(plt.Kernel.setLastLoc('offset=1810 line=85 span=22 id="stx.ss"')&&stx_colon_atom_dash_datum(b)):((plt.Kernel.setLastLoc('offset=1839 line=86 span=17 id="stx.ss"')&&stx_colon_list_question_(b))?(plt.Kernel.setLastLoc('offset=1862 line=87 span=38 id="stx.ss"')&&plt.Kernel.map((function(){var c=(function(d){return stx_dash__greaterthan_datum(d[0])});c.toWrittenString=function(d){return"datum>"};c.toDisplayedString=function(d){return"datum>"};return c})(),[(plt.Kernel.setLastLoc('offset=1878 line=87 span=21 id="stx.ss"')&&stx_colon_list_dash_elts(b))])):(plt.Kernel.setLastLoc('offset=1776 line=83 span=126 id="stx.ss"')&&plt.Kernel.error((plt.types.Symbol.makeInstance("cond")),(plt.types.String.makeInstance('cond: fell out of cond around "offset=1776 line=83 span=126 id=\\"stx.ss\\""'))))))};(function(){((function(b){}))(arguments[0]||plt.Kernel.identity)})();if(typeof(plt)=="undefined"){plt={}}plt.world=plt.world||{};plt.world.config=plt.world.config||{};(function(){var e=function(j,h){var g={};for(var i in j){g[i]=j[i]}for(var i in h){g[i]=h[i]}return g};var f=function(){this.vals={changeWorld:false,shutdownWorld:false,initialEffect:false,onRedraw:false,onDraw:false,onDrawCss:false,tickDelay:false,onTick:false,onTickEffect:false,onKey:false,onKeyEffect:false,onTilt:false,onTiltEffect:false,onAcceleration:false,onAccelerationEffect:false,onShake:false,onShakeEffect:false,onLocationChange:false,onLocationChangeEffect:false,onAnnounce:false,onAnnounceEffect:false,stopWhen:false,stopWhenEffect:false,connectToGame:false,onGameStart:false,onOpponentTurn:false,onMyTurn:false,afterMyTurn:false,onGameFinish:false}};f.prototype.lookup=function(g){plt.Kernel.check(g,plt.Kernel.isString,"WorldConfig.lookup","string",1);if(g in this.vals){return this.vals[g]}else{throw Error("Can't find "+g+" in the configuration")}};f.prototype.updateAll=function(h){var g=new f();g.vals=e(this.vals,h);return g};plt.world.config.WorldConfig=f;plt.world.config.CONFIG=new f();var d=function(){return make_dash_effect_colon_none()};var b=function(h,g){h.toWrittenString=function(i){return"("+g+" ...)"};h.toDisplayedString=h.toWrittenString;return h};plt.world.config.Kernel=plt.world.config.Kernel||{};plt.world.config.Kernel.onRedraw=function(g){plt.Kernel.check(g,plt.Kernel.isFunction,"on-redraw","function",1);return b(function(h){return h.updateAll({onRedraw:g})},"on-redraw")};plt.world.config.Kernel.initialEffect=function(g){return b(function(h){return h.updateAll({initialEffect:g})},"initial-effect")};plt.world.config.Kernel.onDraw=function(h,g){plt.Kernel.check(h,plt.Kernel.isFunction,"on-draw","function",1);plt.Kernel.check(g,plt.Kernel.isFunction,"on-draw","function",2);return b(function(i){return i.updateAll({onDraw:h,onDrawCss:g})},"on-draw")};plt.world.config.Kernel.onTick=function(g,h){plt.Kernel.check(g,plt.Kernel.isNumber,"on-tick","number",1);plt.Kernel.check(h,plt.Kernel.isFunction,"on-tick","function",2);return plt.world.config.Kernel.onTick_star_(g,h,function(i){return d()})};plt.world.config.Kernel.onTick_star_=function(g,i,h){plt.Kernel.check(g,plt.Kernel.isNumber,"on-tick!","number",1);plt.Kernel.check(i,plt.Kernel.isFunction,"on-tick!","function",2);plt.Kernel.check(h,plt.Kernel.isFunction,"on-tick!","function",3);return b(function(j){var k={onTick:i,onTickEffect:h,tickDelay:(plt.types.NumberTower.toInteger(plt.types.NumberTower.multiply(plt.types.Rational.makeInstance(1000,1),g)))};return j.updateAll(k)},"on-tick")};plt.world.config.Kernel.onTilt=function(g){plt.Kernel.check(g,plt.Kernel.isFunction,"on-tilt","function",1);return plt.world.config.Kernel.onTilt_star_(g,function(i,h,k,j){return d()})};plt.world.config.Kernel.onTilt_star_=function(h,g){plt.Kernel.check(h,plt.Kernel.isFunction,"on-tilt!","function",1);plt.Kernel.check(g,plt.Kernel.isFunction,"on-tilt!","function",2);return b(function(i){return i.updateAll({onTilt:h,onTiltEffect:g})},"on-tilt")};plt.world.config.Kernel.onAnnounce=function(g){plt.Kernel.check(g,plt.Kernel.isFunction,"on-announce","function",1);return plt.world.config.Kernel.onAnnounce_star_(g,function(h,i,j){return d()})};plt.world.config.Kernel.onAnnounce_star_=function(h,g){plt.Kernel.check(h,plt.Kernel.isFunction,"on-announce!","function",1);plt.Kernel.check(g,plt.Kernel.isFunction,"on-announce!","function",2);return b(function(i){return i.updateAll({onAnnounce:h,onAnnounceEffect:g})},"on-announce")};plt.world.config.Kernel.onAcceleration=function(g){plt.Kernel.check(g,plt.Kernel.isFunction,"on-acceleration","function",1);return plt.world.config.Kernel.onAcceleration_star_(g,function(i,h,k,j){return d()})};plt.world.config.Kernel.onAcceleration_star_=function(h,g){plt.Kernel.check(h,plt.Kernel.isFunction,"on-acceleration!","function",1);plt.Kernel.check(g,plt.Kernel.isFunction,"on-acceleration!","function",2);return b(function(i){return i.updateAll({onAcceleration:h,onAccelerationEffect:g})},"on-acceleration")};plt.world.config.Kernel.onShake=function(g){plt.Kernel.check(g,plt.Kernel.isFunction,"on-shake","function",1);return plt.world.config.Kernel.onShake_star_(g,function(i,h,k,j){return d()})};plt.world.config.Kernel.onShake_star_=function(h,g){plt.Kernel.check(h,plt.Kernel.isFunction,"on-shake!","function",1);plt.Kernel.check(g,plt.Kernel.isFunction,"on-shake!","function",2);return b(function(i){return i.updateAll({onShake:h,onShakeEffect:g})},"on-shake")};plt.world.config.Kernel.onKey=function(g){plt.Kernel.check(g,plt.Kernel.isFunction,"on-key","function",1);return plt.world.config.Kernel.onKey_star_(g,function(h,i){return d()})};plt.world.config.Kernel.onKey_star_=function(h,g){plt.Kernel.check(h,plt.Kernel.isFunction,"on-key!","function",1);plt.Kernel.check(g,plt.Kernel.isFunction,"on-key!","function",2);return b(function(i){return i.updateAll({onKey:h,onKeyEffect:g})},"on-key")};plt.world.config.Kernel.onLocationChange=function(g){plt.Kernel.check(g,plt.Kernel.isFunction,"on-location-change","function",1);return plt.world.config.Kernel.onLocationChange_star_(g,function(h,j,i){return d()})};plt.world.config.Kernel.onLocationChange_star_=function(h,g){plt.Kernel.check(h,plt.Kernel.isFunction,"on-location-change!","function",1);plt.Kernel.check(g,plt.Kernel.isFunction,"on-location-change!","function",2);return b(function(i){return i.updateAll({onLocationChange:h,onLocationChangeEffect:g})},"on-location-change")};plt.world.config.Kernel.stopWhen=function(g){plt.Kernel.check(g,plt.Kernel.isFunction,"stop-when","function",1);return plt.world.config.Kernel.stopWhen_star_(g,function(h){return d()})};plt.world.config.Kernel.stopWhen_star_=function(h,g){plt.Kernel.check(h,plt.Kernel.isFunction,"stop-when!","function",1);plt.Kernel.check(g,plt.Kernel.isFunction,"stop-when!","function",2);return b(function(i){return i.updateAll({stopWhen:h,stopWhenEffect:g})},"stop-when")};var c=function(i,j,h,g){return function(k){plt.Kernel.check(k,j,g,h,1);return b(function(l){return l.updateAll({propertyName:k})},g)}};plt.world.config.Kernel.connect_dash_to_dash_game=c("connectToGame",plt.Kernel.isString,"string","connect-to-game");plt.world.config.Kernel.on_dash_game_dash_start=c("onGameStart",plt.Kernel.isFunction,"function","on-game-start");plt.world.config.Kernel.on_dash_opponent_dash_turn=c("onOpponentTurn",plt.Kernel.isFunction,"function","on-opponent-turn");plt.world.config.Kernel.on_dash_my_dash_turn=c("onMyTurn",plt.Kernel.isFunction,"function","on-my-turn");plt.world.config.Kernel.after_dash_my_dash_turn=c("afterMyTurn",plt.Kernel.isFunction,"function","after-my-turn");plt.world.config.Kernel.on_dash_game_dash_finish=c("onGameFinish",plt.Kernel.isFunction,"function","on-game-finish")})();if(typeof(plt)=="undefined"){plt={}}plt.platform={};(function(){plt.platform.Platform={};var y=false;plt.platform.Platform.getInstance=function(){if(!y){y=new r()}return y};var r=function(){this.tiltService=m;this.shakeService=u();this.locationService=I();this.telephonyService=D();this.networkService=C();this.soundService=G();this.powerService=J();this.smsService=p();this.pickPlaylistService=i()};r.prototype.getTiltService=function(){return this.tiltService};r.prototype.getShakeService=function(){return this.shakeService};r.prototype.getLocationService=function(){return this.locationService};r.prototype.getTelephonyService=function(){return this.telephonyService};r.prototype.getNetworkService=function(){return this.networkService};r.prototype.getSoundService=function(){return this.soundService};r.prototype.getPowerService=function(){return this.powerService};r.prototype.getSmsService=function(){return this.smsService};r.prototype.getPickPlaylistService=function(){return this.pickPlaylistService};var I=function(){if(N()){return new l()}else{if(f()){return new x()}else{if(n()){return new k()}else{return new b()}}}};var N=function(){return(typeof Device!="undefined")};var f=function(){return(window.google&&window.google.gears&&true)};var n=function(){return(typeof(navigator)!="undefined"&&typeof(navigator.geolocation)!="undefined")};var K=function(W,V,U,T){var S=function(X){return X*Math.PI/180};var R=function(X,Y){return Math.pow(Math.sin((S(X)-S(Y))/2),2)};return 6378000*2*Math.asin(Math.min(1,Math.sqrt(R(W,U)+(Math.cos(S(W))*Math.cos(S(U))*R(V,T)))))};var x=function(){this.geo=google.gears.factory.create("beta.geolocation");this.listeners=[];this.currentPosition={latitude:0,longitude:0,altitude:0,bearing:0,speed:0};this.watchId=false};x.prototype.startService=function(){var R=this;function S(T){R.currentPosition.latitude=T.latitude;R.currentPosition.longitude=T.longitude;R.currentPosition.altitude=T.altitude;for(var U=0;U"};z.prototype.toDisplayedString=function(C){return""};plt.world.Kernel.image_question_=function(C){return r(C)};plt.world.Kernel.image_equal__question_=function(D,C){check(D,r,"image=?","image",1);check(C,r,"image=?","image",2);return D==C?plt.types.Logic.TRUE:plt.types.Logic.FALSE};var B=function(C){return((C!=undefined)&&(C!=null)&&(C instanceof c))};var c=function(E,C,D){z.call(this,0,0);this.width=E;this.height=C;this.children=D};c.prototype=q(z.prototype);c.prototype.add=function(D,C,E){return new c(this.width,this.height,this.children.concat([[D,C,E]]))};c.prototype.render=function(F,D,I){var H;var G,E,C;F.clearRect(D-this.pinholeX,I-this.pinholeY,this.width,this.height);for(H=0;H0){var p=ar.pop();if(p){p.pause()}}r()};function G(p){Z.push(p)}function an(aO){var p=Z.indexOf(aO);if(p!=-1){Z.splice(p,1)}}function r(){aA=new L();Z=[]}function N(aQ){var p=aA;try{aA=aQ(aA)}catch(aP){aA=p;throw aP}for(var aO=0;aO0&&aP(aY,aT[0])>=0){var a4=aT.shift();if(aF(a4,aY)){aV=true;p=a4;break}}}else{for(var a0=0;a00){ar[ar.length-1].pause()}var aU=new I(aV,aS,aQ,aO,p);ar.push(aU);function aW(aX,aY){aU.world=aX}G(aW);var aR=new W(function(aX){return false},function(aX){});for(var aP=0;aP0){var aZ=ar.pop();aZ.restart()}}}G(aT);aH(aV,p);N(function(aX){return aS})}ag.big_bang=P;function ah(p,aO){return function(){var aP={watchId:-1,onRegister:function(aQ){aP.watchId=setInterval(function(){N(aO)},p)},onUnregister:function(aQ){clearInterval(aP.watchId)}};return aP}}ag.on_tick=ah;function s(aP,aO){function p(aQ){var aR=aP(aQ);t(aR,aR);return aR}return function(){var aQ={_top:null,_listener:function(aR,aS){A(aR,aS,aQ._top,p,aO)},onRegister:function(aR){aQ._top=aR;G(aQ._listener)},onUnregister:function(aR){an(aQ._listener)}};return aQ}}ag.on_draw=s;function W(aO,p){this.test=aO;this.receiver=p}function ap(aO,p){return function(){if(p==undefined){p=function(aP){}}return new W(aO,p)}}ag.stop_when=ap;function x(aO){var p=function(aQ,aP){aO(aQ)};return function(){return{onRegister:function(aP){G(p)},onUnregister:function(aP){an(p)}}}}ag.on_world_change=x;function T(aP,p,aO){if(aP.addEventListener){aP.addEventListener(p,aO,false)}else{aP.attachEvent("on"+p,aO,false)}}function aE(aO,p,aP){T(aO,p,function(aQ){N(function(aR){return aP(aR,aQ)})})}function aq(aO,p,aP){T(aO,p,function(aQ){setTimeout(function(){N(function(aR){return aP(aR,aQ)})},0)})}function u(p){T(p,"focus",function(aO){f=p});T(p,"blur",function(aO){f=undefined});return p}function D(p){if(p.length==undefined){return{node:p,children:[]}}else{return{node:p[0],children:K(p.slice(1),D)}}}function ai(p){return{attrib:p[0],values:p.slice(1)}}function m(p){var aO=K(p.slice(1),ai);if(typeof p[0]=="string"){return[{id:p[0],attribs:aO}]}else{if("length" in p[0]){return K(p[0],function(aP){return{id:aP,attribs:aO}})}else{return[{node:p[0],attribs:aO}]}}}function F(p){return c(p,m)}function H(p){return(p.nodeType==Node.TEXT_NODE)}function aj(p){return(p.nodeType==Node.ELEMENT_NODE)}var i=function(p,aO){throw new aG(plt.Kernel.format("Expected a non-empty array, received ~s within ~s",[p,aO]),p)};function t(p,aP){if(!p instanceof Array){i(p,aP)}if(p.length==0){i(p,aP)}if(H(p[0])){if(p.length>1){throw new aG(plt.Kernel.format("Text node ~s can not have children",[p]),p)}}else{if(aj(p[0])){for(var aO=1;aO world)",1);var v=b(s);var u=p.input(t,function(x,y){return w([x,y])},v);u.toWrittenString=function(x){return"(js-input ...)"};u.toDisplayedString=u.toWrittenString;u.toDomNode=function(x){return u};return u};e.get_dash_input_dash_value=function(s){plt.Kernel.check(s,function(t){return(plt.Kernel.isString(s)||s.nodeType==Node.ELEMENT_NODE)},"get-input-value","dom-node",1);if(plt.Kernel.isString(s)){return plt.types.String.makeInstance(document.getElementById(s).value||"")}else{return plt.types.String.makeInstance(s.value||"")}};e.img=function(v,s){plt.Kernel.check(v,plt.Kernel.isString,"js-img","string",1);var u=b(s);var t=p.img(v,u);t.toWrittenString=function(w){return"(js-img ...)"};t.toDisplayedString=t.toWrittenString;t.toDomNode=function(w){return t};return t};e.text=function(t){plt.Kernel.check(t,plt.Kernel.isString,"js-text","string",1);var u=p.text(t,[]);u.toWrittenString=function(s){return"(js-text ...)"};u.toDisplayedString=u.toWrittenString;u.toDomNode=function(s){return u};return u};e.select=function(u,x,t){plt.Kernel.checkListof(u,plt.Kernel.isString,"js-select","string",1);plt.Kernel.check(x,plt.Kernel.isFunction,"js-select","function",2);var w=b(t);var s=m(u);var v=p.select(w,s,function(y,z){return x([y,v.value])});v.toWrittenString=function(y){return"(js-select ...)"};v.toDisplayedString=v.toWrittenString;v.toDomNode=function(y){return v};return v};e.rawNode=function(s,t){var v=b(t);var u=p.raw_node(plt.Kernel.toDomNode(s),v);u.toWrittenString=function(w){return"(js-raw-node ...)"};u.toDisplayedString=u.toWrittenString;u.toDomNode=function(w){return u};return u}})();if(typeof(plt)=="undefined"){plt={}}plt.world=plt.world||{};(function(){var c={};plt.world.stimuli=c;var g=function(m,j,h){var l=[];e(function(i){var n=[i].concat(h);if(m){var o=m(n);l=b(o)}if(j){return j(n)}else{return i}});for(var k=0;k"};e.toDisplayedString=e.toWrittenString;e.procedureArity=(plt.types.Rational.makeInstance(1,1));return e})())):((plt.Kernel.setLastLoc('offset=4212 line=105 span=46 id="permission.ss"')&&c((plt.types.String.makeInstance("PERMISSION:UNIVERSE")),b))?(plt.Kernel.setLastLoc('offset=4266 line=106 span=77 id="permission.ss"')&&d((plt.types.String.makeInstance("PERMISSION:UNIVERSE")),b,(function(){var e=(function(f){return make_dash_permission_colon_universe(f[0])});e._eqHashCode=plt.types.makeEqHashCode();e.toWrittenString=function(f){return""};e.toDisplayedString=e.toWrittenString;e.procedureArity=(plt.types.Rational.makeInstance(1,1));return e})())):(plt.Kernel.setLastLoc('offset=3448 line=86 span=897 id="permission.ss"')&&plt.Kernel.error((plt.types.Symbol.makeInstance("cond")),(plt.types.String.makeInstance('cond: fell out of cond around "offset=3448 line=86 span=897 id=\\"permission.ss\\""'))))))))))))))})())};var permission_dash__greaterthan_android_dash_permissions=function(b){return((plt.Kernel.setLastLoc('offset=4584 line=115 span=35 id="permission.ss"')&&permission_colon_location_question_(b))?(plt.Kernel.setLastLoc('offset=4625 line=116 span=103 id="permission.ss"')&&plt.Kernel.list([(plt.types.String.makeInstance("android.permission.ACCESS_COARSE_LOCATION")),(plt.types.String.makeInstance("android.permission.ACCESS_FINE_LOCATION"))])):((plt.Kernel.setLastLoc('offset=4735 line=118 span=35 id="permission.ss"')&&permission_colon_send_dash_sms_question_(b))?(plt.Kernel.setLastLoc('offset=4776 line=119 span=36 id="permission.ss"')&&plt.Kernel.list([(plt.types.String.makeInstance("android.permission.SEND_SMS"))])):((plt.Kernel.setLastLoc('offset=4819 line=120 span=38 id="permission.ss"')&&permission_colon_receive_dash_sms_question_(b))?(plt.Kernel.setLastLoc('offset=4863 line=121 span=39 id="permission.ss"')&&plt.Kernel.list([(plt.types.String.makeInstance("android.permission.RECEIVE_SMS"))])):((plt.Kernel.setLastLoc('offset=4909 line=122 span=31 id="permission.ss"')&&permission_colon_tilt_question_(b))?(plt.Kernel.setLastLoc('offset=4946 line=123 span=6 id="permission.ss"')&&plt.Kernel.list([])):((plt.Kernel.setLastLoc('offset=4959 line=124 span=32 id="permission.ss"')&&permission_colon_shake_question_(b))?(plt.Kernel.setLastLoc('offset=4997 line=125 span=6 id="permission.ss"')&&plt.Kernel.list([])):((plt.Kernel.setLastLoc('offset=5010 line=126 span=35 id="permission.ss"')&&permission_colon_internet_question_(b))?(plt.Kernel.setLastLoc('offset=5051 line=127 span=36 id="permission.ss"')&&plt.Kernel.list([(plt.types.String.makeInstance("android.permission.INTERNET"))])):((plt.Kernel.setLastLoc('offset=5094 line=128 span=36 id="permission.ss"')&&permission_colon_telephony_question_(b))?(plt.Kernel.setLastLoc('offset=5136 line=129 span=49 id="permission.ss"')&&plt.Kernel.list([(plt.types.String.makeInstance("android.permission.ACCESS_COARSE_UPDATES"))])):((plt.Kernel.setLastLoc('offset=5192 line=130 span=36 id="permission.ss"')&&permission_colon_wake_dash_lock_question_(b))?(plt.Kernel.setLastLoc('offset=5234 line=131 span=37 id="permission.ss"')&&plt.Kernel.list([(plt.types.String.makeInstance("android.permission.WAKE_LOCK"))])):((plt.Kernel.setLastLoc('offset=5278 line=132 span=41 id="permission.ss"')&&permission_colon_open_dash_image_dash_url_question_(b))?(plt.Kernel.setLastLoc('offset=5325 line=133 span=6 id="permission.ss"')&&plt.Kernel.list([])):((plt.Kernel.setLastLoc('offset=5338 line=134 span=35 id="permission.ss"')&&permission_colon_universe_question_(b))?(plt.Kernel.setLastLoc('offset=5379 line=135 span=36 id="permission.ss"')&&plt.Kernel.list([(plt.types.String.makeInstance("android.permission.INTERNET"))])):(plt.Kernel.setLastLoc('offset=4573 line=114 span=844 id="permission.ss"')&&plt.Kernel.error((plt.types.Symbol.makeInstance("cond")),(plt.types.String.makeInstance('cond: fell out of cond around "offset=4573 line=114 span=844 id=\\"permission.ss\\""'))))))))))))))};(function(){((function(b){PERMISSION_colon_LOCATION=(plt.Kernel.setLastLoc('offset=934 line=30 span=26 id="permission.ss"')&&make_dash_permission_colon_location());PERMISSION_colon_SEND_dash_SMS=(plt.Kernel.setLastLoc('offset=990 line=31 span=26 id="permission.ss"')&&make_dash_permission_colon_send_dash_sms());PERMISSION_colon_RECEIVE_dash_SMS=(plt.Kernel.setLastLoc('offset=1049 line=32 span=26 id="permission.ss"')&&make_dash_permission_colon_send_dash_sms());PERMISSION_colon_TILT=(plt.Kernel.setLastLoc('offset=1101 line=33 span=22 id="permission.ss"')&&make_dash_permission_colon_tilt());PERMISSION_colon_SHAKE=(plt.Kernel.setLastLoc('offset=1150 line=34 span=23 id="permission.ss"')&&make_dash_permission_colon_shake());PERMISSION_colon_INTERNET=(plt.Kernel.setLastLoc('offset=1203 line=35 span=26 id="permission.ss"')&&make_dash_permission_colon_internet());PERMISSION_colon_TELEPHONY=(plt.Kernel.setLastLoc('offset=1260 line=36 span=27 id="permission.ss"')&&make_dash_permission_colon_telephony());PERMISSION_colon_WAKE_dash_LOCK=(plt.Kernel.setLastLoc('offset=1318 line=37 span=27 id="permission.ss"')&&make_dash_permission_colon_wake_dash_lock())}))(arguments[0]||plt.Kernel.identity)})();if(typeof(plt)=="undefined"){plt={}}(function(){plt.permission={};var j=function(l){return permission_colon_location_question_(l)};var g=function(l){return permission_colon_send_dash_sms_question_(l)};var k=function(l){return permission_colon_receive_dash_sms_question_(l)};var b=function(l){return permission_colon_tilt_question_(l)};var c=function(l){return permission_colon_shake_question_(l)};var i=function(l){return permission_colon_internet_question_(l)};var d=function(l){return permission_colon_telephony_question_(l)};var e=function(l){return permission_colon_wake_dash_lock_question_(l)};var f=function(l){return permission_colon_open_dash_image_dash_url_question_(l)};var h=function(l){return permission_colon_universe_question_(l)};plt.permission.startupAllPermissions=function(l,m){if(l.length>0){var n=l.pop();plt.permission._runStartupCode(n,l,m)}else{m()}};plt.permission._runStartupCode=function(l,q,n){var m=plt.platform.Platform.getInstance();var s=plt.world.stimuli;var o=function(){setTimeout(function(){plt.permission.startupAllPermissions(q,n)},0)};if(j(l)){m.getLocationService().startService();m.getLocationService().addLocationChangeListener(function(v,p){s.onLocation(v,p)});o()}else{if(g(l)){o()}else{if(k(l)){o()}else{if(b(l)){m.getTiltService().startService();m.getTiltService().addOrientationChangeListener(function(v,w,p){s.onTilt(v,w,p)});m.getTiltService().addAccelerationChangeListener(function(p,w,v){s.onAcceleration(p,w,v)});o()}else{if(c(l)){m.getShakeService().startService();m.getShakeService().addListener(function(){s.onShake()});o()}else{if(i(l)){o()}else{if(d(l)){o()}else{if(e(l)){o()}else{if(f(l)){var u=permission_colon_open_dash_image_dash_url_dash_url(l);var r=new Image();var t=function(){plt.Kernel.detachEvent(r,"load",t);plt.world.Kernel.FileImage.installInstance(u,r);o()};plt.Kernel.attachEvent(r,"load",t);plt.Kernel.attachEvent(r,"error",function(){plt.world.Kernel.FileImage.installBrokenImage(u);o()});r.src=u}else{o()}}}}}}}}}};plt.permission.runShutdownCode=function(m){var l=plt.platform.Platform.getInstance();if(j(m)){l.getLocationService().shutdownService()}if(g(m)){}if(k(m)){}if(b(m)){l.getTiltService().shutdownService()}if(c(m)){}if(i(m)){}if(d(m)){}if(e(m)){}if(f(m)){}}})();