rubyjs 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +128 -0
- data/Rakefile +9 -0
- data/bin/rubyjs +140 -0
- data/examples/ex1/Rakefile +7 -0
- data/examples/ex1/ex1.js +771 -0
- data/examples/ex1/ex1.rb +42 -0
- data/examples/ex1/index.html +7 -0
- data/examples/hw/Rakefile +9 -0
- data/examples/hw/hw.js +635 -0
- data/examples/hw/hw.rb +7 -0
- data/examples/hw/index.html +7 -0
- data/patches/parse_tree.rb.diff +34 -0
- data/rubyjs.gemspec +24 -0
- data/src/rubyjs.rb +4 -0
- data/src/rubyjs/code_generator.rb +474 -0
- data/src/rubyjs/compiler.rb +2007 -0
- data/src/rubyjs/debug_name_generator.rb +75 -0
- data/src/rubyjs/encoder.rb +171 -0
- data/src/rubyjs/eval_into.rb +59 -0
- data/src/rubyjs/lib/core.rb +1008 -0
- data/src/rubyjs/lib/json.rb +101 -0
- data/src/rubyjs/model.rb +287 -0
- data/src/rubyjs/name_generator.rb +71 -0
- data/src/rwt/AbsolutePanel.rb +161 -0
- data/src/rwt/DOM.Konqueror.rb +89 -0
- data/src/rwt/DOM.Opera.rb +65 -0
- data/src/rwt/DOM.rb +1044 -0
- data/src/rwt/Event.Opera.rb +35 -0
- data/src/rwt/Event.rb +429 -0
- data/src/rwt/HTTPRequest.IE6.rb +5 -0
- data/src/rwt/HTTPRequest.rb +74 -0
- data/src/rwt/Label.rb +164 -0
- data/src/rwt/Panel.rb +90 -0
- data/src/rwt/RootPanel.rb +16 -0
- data/src/rwt/UIObject.rb +495 -0
- data/src/rwt/Widget.rb +193 -0
- data/src/rwt/ported-from/AbsolutePanel.java +158 -0
- data/src/rwt/ported-from/DOM.java +571 -0
- data/src/rwt/ported-from/DOMImpl.java +426 -0
- data/src/rwt/ported-from/DOMImplOpera.java +82 -0
- data/src/rwt/ported-from/DOMImplStandard.java +234 -0
- data/src/rwt/ported-from/HTTPRequest.java +81 -0
- data/src/rwt/ported-from/HTTPRequestImpl.java +103 -0
- data/src/rwt/ported-from/Label.java +163 -0
- data/src/rwt/ported-from/Panel.java +99 -0
- data/src/rwt/ported-from/UIObject.java +614 -0
- data/src/rwt/ported-from/Widget.java +221 -0
- data/test/benchmark/bm_call_conv1.js +16 -0
- data/test/benchmark/bm_call_conv2.js +14 -0
- data/test/benchmark/bm_var_acc1.js +13 -0
- data/test/benchmark/bm_var_acc2.js +11 -0
- data/test/benchmark/bm_vm1_block.js +15 -0
- data/test/benchmark/bm_vm1_block.rb +15 -0
- data/test/benchmark/bm_vm1_const.js +13 -0
- data/test/benchmark/bm_vm1_const.rb +13 -0
- data/test/benchmark/bm_vm1_ensure.js +17 -0
- data/test/benchmark/bm_vm1_ensure.rb +15 -0
- data/test/benchmark/common.js +4 -0
- data/test/benchmark/common.rb +5 -0
- data/test/benchmark/params.yaml +7 -0
- data/test/browser.test.html +4059 -0
- data/test/browser.test.js +3225 -0
- data/test/common.Browser.rb +13 -0
- data/test/common.rb +8 -0
- data/test/gen_browser_test_suite.rb +129 -0
- data/test/gen_test_suite.rb +41 -0
- data/test/run_benchs.rb +58 -0
- data/test/run_tests.rb +22 -0
- data/test/test_args.rb +24 -0
- data/test/test_array.rb +26 -0
- data/test/test_case.rb +35 -0
- data/test/test_class.rb +55 -0
- data/test/test_eql.rb +9 -0
- data/test/test_exception.rb +61 -0
- data/test/test_expr.rb +12 -0
- data/test/test_hash.rb +29 -0
- data/test/test_if.rb +28 -0
- data/test/test_inspect.rb +10 -0
- data/test/test_lebewesen.rb +39 -0
- data/test/test_massign.rb +66 -0
- data/test/test_new.rb +12 -0
- data/test/test_range.rb +53 -0
- data/test/test_regexp.rb +22 -0
- data/test/test_send.rb +65 -0
- data/test/test_simple_output.rb +5 -0
- data/test/test_splat.rb +21 -0
- data/test/test_string.rb +51 -0
- data/test/test_yield.rb +152 -0
- data/utils/js/Makefile +9 -0
- data/utils/js/RunScript.class +0 -0
- data/utils/js/RunScript.java +73 -0
- data/utils/js/js.jar +0 -0
- data/utils/js/run.sh +3 -0
- data/utils/jsc/Makefile +7 -0
- data/utils/jsc/README +3 -0
- data/utils/jsc/RunScript.c +93 -0
- data/utils/jsc/run.sh +15 -0
- data/utils/yuicompressor/README +1 -0
- data/utils/yuicompressor/yuicompressor-2.2.5.jar +0 -0
- data/vendor/ParseTree-1.7.1-patched/History.txt +217 -0
- data/vendor/ParseTree-1.7.1-patched/Manifest.txt +22 -0
- data/vendor/ParseTree-1.7.1-patched/README.txt +110 -0
- data/vendor/ParseTree-1.7.1-patched/Rakefile +41 -0
- data/vendor/ParseTree-1.7.1-patched/bin/parse_tree_abc +89 -0
- data/vendor/ParseTree-1.7.1-patched/bin/parse_tree_audit +28 -0
- data/vendor/ParseTree-1.7.1-patched/bin/parse_tree_deps +62 -0
- data/vendor/ParseTree-1.7.1-patched/bin/parse_tree_show +49 -0
- data/vendor/ParseTree-1.7.1-patched/demo/printer.rb +20 -0
- data/vendor/ParseTree-1.7.1-patched/lib/composite_sexp_processor.rb +49 -0
- data/vendor/ParseTree-1.7.1-patched/lib/parse_tree.rb +1013 -0
- data/vendor/ParseTree-1.7.1-patched/lib/sexp.rb +235 -0
- data/vendor/ParseTree-1.7.1-patched/lib/sexp_processor.rb +330 -0
- data/vendor/ParseTree-1.7.1-patched/lib/unique.rb +15 -0
- data/vendor/ParseTree-1.7.1-patched/test/pt_testcase.rb +1221 -0
- data/vendor/ParseTree-1.7.1-patched/test/something.rb +53 -0
- data/vendor/ParseTree-1.7.1-patched/test/test_all.rb +13 -0
- data/vendor/ParseTree-1.7.1-patched/test/test_composite_sexp_processor.rb +69 -0
- data/vendor/ParseTree-1.7.1-patched/test/test_parse_tree.rb +216 -0
- data/vendor/ParseTree-1.7.1-patched/test/test_sexp.rb +291 -0
- data/vendor/ParseTree-1.7.1-patched/test/test_sexp_processor.rb +244 -0
- data/vendor/ParseTree-1.7.1-patched/validate.sh +31 -0
- data/vendor/ParseTree-1.7.1/History.txt +217 -0
- data/vendor/ParseTree-1.7.1/Manifest.txt +22 -0
- data/vendor/ParseTree-1.7.1/README.txt +110 -0
- data/vendor/ParseTree-1.7.1/Rakefile +41 -0
- data/vendor/ParseTree-1.7.1/bin/parse_tree_abc +89 -0
- data/vendor/ParseTree-1.7.1/bin/parse_tree_audit +28 -0
- data/vendor/ParseTree-1.7.1/bin/parse_tree_deps +62 -0
- data/vendor/ParseTree-1.7.1/bin/parse_tree_show +49 -0
- data/vendor/ParseTree-1.7.1/demo/printer.rb +20 -0
- data/vendor/ParseTree-1.7.1/lib/composite_sexp_processor.rb +49 -0
- data/vendor/ParseTree-1.7.1/lib/parse_tree.rb +1004 -0
- data/vendor/ParseTree-1.7.1/lib/sexp.rb +235 -0
- data/vendor/ParseTree-1.7.1/lib/sexp_processor.rb +330 -0
- data/vendor/ParseTree-1.7.1/lib/unique.rb +15 -0
- data/vendor/ParseTree-1.7.1/test/pt_testcase.rb +1221 -0
- data/vendor/ParseTree-1.7.1/test/something.rb +53 -0
- data/vendor/ParseTree-1.7.1/test/test_all.rb +13 -0
- data/vendor/ParseTree-1.7.1/test/test_composite_sexp_processor.rb +69 -0
- data/vendor/ParseTree-1.7.1/test/test_parse_tree.rb +216 -0
- data/vendor/ParseTree-1.7.1/test/test_sexp.rb +291 -0
- data/vendor/ParseTree-1.7.1/test/test_sexp_processor.rb +244 -0
- data/vendor/ParseTree-1.7.1/validate.sh +31 -0
- metadata +230 -0
data/examples/ex1/ex1.rb
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'rwt/Event'
|
2
|
+
require 'rwt/DOM'
|
3
|
+
require 'rwt/UIObject'
|
4
|
+
require 'rwt/Widget'
|
5
|
+
require 'rwt/Panel'
|
6
|
+
require 'rwt/AbsolutePanel'
|
7
|
+
require 'rwt/RootPanel'
|
8
|
+
require 'rwt/Label'
|
9
|
+
|
10
|
+
class MyWidget < Widget
|
11
|
+
def initialize
|
12
|
+
setElement(DOM.createDiv)
|
13
|
+
sinkEvents(Event::ONCLICK)
|
14
|
+
setTitle('test')
|
15
|
+
DOM.setInnerText(getElement(), 'click me')
|
16
|
+
end
|
17
|
+
|
18
|
+
def onBrowserEvent(ev)
|
19
|
+
`alert('okay')`
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
class MyEventListener
|
24
|
+
def onClick(widget)
|
25
|
+
widget.setText(widget.getText + "-")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
class Main
|
30
|
+
def self.main
|
31
|
+
Event.__init
|
32
|
+
RootPanel.get.add(MyWidget.new)
|
33
|
+
|
34
|
+
listener = MyEventListener.new
|
35
|
+
|
36
|
+
10.times do
|
37
|
+
label = Label.new('XXX')
|
38
|
+
label.addClickListener(listener)
|
39
|
+
RootPanel.get.add(label)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
RUBYJS_BIN = File.join(File.dirname(__FILE__), "..", "..", "bin", "rubyjs")
|
2
|
+
OPTS=%w(NoMethodMissing NoArgumentArityChecks OptimizeArithOps).map {|o| "--opt #{o}"}.join(" ")
|
3
|
+
#PLATFORM="--platform Konqueror"
|
4
|
+
|
5
|
+
task "hw.js" do
|
6
|
+
sh "#{RUBYJS_BIN} #{OPTS} --main HelloWorld -o hw.js hw.rb"
|
7
|
+
end
|
8
|
+
|
9
|
+
task :default => "hw.js"
|
data/examples/hw/hw.js
ADDED
@@ -0,0 +1,635 @@
|
|
1
|
+
// declare nil
|
2
|
+
function NilClass() {}
|
3
|
+
|
4
|
+
// FIXME: remove
|
5
|
+
NilClass.prototype.toString = function() { return "nil"; };
|
6
|
+
nil = new NilClass();
|
7
|
+
|
8
|
+
//
|
9
|
+
// define a null-function (used by HTTPRequest)
|
10
|
+
//
|
11
|
+
function a$m()
|
12
|
+
{
|
13
|
+
}
|
14
|
+
|
15
|
+
//
|
16
|
+
// r: return value
|
17
|
+
// s: scope (method scope)
|
18
|
+
//
|
19
|
+
function a$c(r,s)
|
20
|
+
{
|
21
|
+
this.a$a = r;
|
22
|
+
this.a$b = s;
|
23
|
+
return this;
|
24
|
+
}
|
25
|
+
|
26
|
+
//
|
27
|
+
// Throw in Javascript is a statement.
|
28
|
+
//
|
29
|
+
// This function can be used to overcome
|
30
|
+
// that limitation.
|
31
|
+
//
|
32
|
+
function a$n(x) { throw(x); }
|
33
|
+
|
34
|
+
function a$b(a)
|
35
|
+
{
|
36
|
+
// TODO
|
37
|
+
return a;
|
38
|
+
}
|
39
|
+
|
40
|
+
//
|
41
|
+
// helper function for multiple assignment in
|
42
|
+
// iterator parameters.
|
43
|
+
//
|
44
|
+
// undefined -> []
|
45
|
+
// 1 -> [1]
|
46
|
+
// [1] -> [[1]]
|
47
|
+
// [] -> [[]]
|
48
|
+
// [1,2] -> [1,2]
|
49
|
+
//
|
50
|
+
function a$j(a)
|
51
|
+
{
|
52
|
+
if (a===undefined) return [];
|
53
|
+
if (a.constructor!=Array || a.length<2) return [a];
|
54
|
+
return a;
|
55
|
+
}
|
56
|
+
|
57
|
+
//
|
58
|
+
// Call the method in the superclass.
|
59
|
+
//
|
60
|
+
// As super is used quite rarely, we dont optimize for it.
|
61
|
+
//
|
62
|
+
// object, method, iterator, arguments
|
63
|
+
//
|
64
|
+
function a$o(o, m, i, a)
|
65
|
+
{
|
66
|
+
var r = o[m]; // method in current class
|
67
|
+
var c = o.a$g.a$e;
|
68
|
+
while (r === c.a$d.prototype[m])
|
69
|
+
c = c.a$e;
|
70
|
+
return c.a$d.prototype[m].apply(o, [i].concat(a));
|
71
|
+
}
|
72
|
+
|
73
|
+
function a$p(o, m, a)
|
74
|
+
{
|
75
|
+
var r = o[m]; // method in current class
|
76
|
+
var c = o.a$g.a$e;
|
77
|
+
while (r === c.a$d.prototype[m])
|
78
|
+
c = c.a$e;
|
79
|
+
return c.a$d.prototype[m].apply(o, a);
|
80
|
+
}
|
81
|
+
|
82
|
+
//
|
83
|
+
// Whether o.kind_of?(c)
|
84
|
+
//
|
85
|
+
function a$i(o, c)
|
86
|
+
{
|
87
|
+
var k,i,m;
|
88
|
+
|
89
|
+
k = o.a$g;
|
90
|
+
|
91
|
+
while (k != nil)
|
92
|
+
{
|
93
|
+
if (k === c) return true;
|
94
|
+
|
95
|
+
// check included modules
|
96
|
+
m = k.a$j;
|
97
|
+
for (i=0; i<m.length; i++)
|
98
|
+
{
|
99
|
+
if (m[i] === c) return true;
|
100
|
+
}
|
101
|
+
|
102
|
+
k = k.a$e;
|
103
|
+
}
|
104
|
+
|
105
|
+
return false;
|
106
|
+
}
|
107
|
+
|
108
|
+
function a$l(c)
|
109
|
+
{
|
110
|
+
for (var i=0; i<c.length; i++)
|
111
|
+
a$e(c[i]);
|
112
|
+
}
|
113
|
+
|
114
|
+
function a$e(c)
|
115
|
+
{
|
116
|
+
var k,i;
|
117
|
+
|
118
|
+
//
|
119
|
+
// include modules
|
120
|
+
//
|
121
|
+
// do that before, because when assigning instance methods of
|
122
|
+
// the super class, a check for === undefined prevents this method
|
123
|
+
// from being overwritten.
|
124
|
+
//
|
125
|
+
for (i=0; i<c.a$j.length; i++)
|
126
|
+
{
|
127
|
+
for (k in c.a$j[i].a$d.prototype)
|
128
|
+
{
|
129
|
+
if (c.a$d.prototype[k]===undefined)
|
130
|
+
{
|
131
|
+
c.a$d.prototype[k] = c.a$j[i].a$d.prototype[k];
|
132
|
+
}
|
133
|
+
}
|
134
|
+
}
|
135
|
+
|
136
|
+
// instance methods
|
137
|
+
if (c.a$e != nil)
|
138
|
+
{
|
139
|
+
for (k in c.a$e.a$d.prototype)
|
140
|
+
{
|
141
|
+
if (c.a$d.prototype[k]===undefined)
|
142
|
+
{
|
143
|
+
c.a$d.prototype[k] = c.a$e.a$d.prototype[k];
|
144
|
+
}
|
145
|
+
}
|
146
|
+
}
|
147
|
+
|
148
|
+
// inherit class methods from superclass
|
149
|
+
if (c.a$e != nil)
|
150
|
+
{
|
151
|
+
for (k in c.a$e)
|
152
|
+
{
|
153
|
+
if (c[k]===undefined)
|
154
|
+
{
|
155
|
+
c[k] = c.a$e[k];
|
156
|
+
}
|
157
|
+
}
|
158
|
+
}
|
159
|
+
|
160
|
+
// set class for instanciated objects
|
161
|
+
c.a$d.prototype.a$g = c;
|
162
|
+
}
|
163
|
+
|
164
|
+
function a$d(h)
|
165
|
+
{
|
166
|
+
var c,k,i;
|
167
|
+
c = h.a$g || $b.$a(nil, h.a$e, h.a$c, h.a$d);
|
168
|
+
|
169
|
+
if (h.a$h)
|
170
|
+
{
|
171
|
+
for (k in h.a$h)
|
172
|
+
{
|
173
|
+
c.a$d.prototype[k] = h.a$h[k];
|
174
|
+
}
|
175
|
+
}
|
176
|
+
|
177
|
+
if (h.a$f)
|
178
|
+
{
|
179
|
+
for (k in h.a$f) c[k] = h.a$f[k];
|
180
|
+
}
|
181
|
+
|
182
|
+
if (h.a$j)
|
183
|
+
{
|
184
|
+
for (i=0; i<h.a$j.length; i++)
|
185
|
+
{
|
186
|
+
c.a$j.push(h.a$j[i]);
|
187
|
+
}
|
188
|
+
}
|
189
|
+
|
190
|
+
return c;
|
191
|
+
}
|
192
|
+
|
193
|
+
function a$a(_a, _b, _c, _d)
|
194
|
+
{
|
195
|
+
this.a$e = _b;
|
196
|
+
this.a$c = _c;
|
197
|
+
this.a$d = _d;
|
198
|
+
this.a$j = [];
|
199
|
+
this.a$g = _a;
|
200
|
+
return this;
|
201
|
+
}
|
202
|
+
|
203
|
+
a$a.$e = function() { return "MetaClass"; };
|
204
|
+
a$a.$z = function() { return this; };
|
205
|
+
$b = a$d({a$e: nil,a$f: {$a: function(_e,_a,_b,_c){var self,_d;self=this;try{if(_c==null)_c=nil;;if((_d=_c,_d===false||_d===nil)){_c=(function() {})};return new self.a$d($b, _a, _b, _c);}catch(_f){if(_f instanceof a$c && (!_f.a$b || _f.a$b==2))return _f.a$a;throw(_f)}}},a$c: "Class",a$g: new a$a(a$a, nil, "Class", a$a),a$h: {$e: function(){var self;self=this;return self.a$c},$a: function(_c){var self,_a,_b,_d,_e,_f;_f=nil;self=this;_d=_c==null?nil:_c;try{_a=[];for(_b=1;_b<arguments.length;_b++)_a.push(arguments[_b]);;_e=self.$b();_e.$d(_d,'$c',a$b(_a));_f=_e;return _f}catch(_g){if(_g instanceof a$c && (!_g.a$b || _g.a$b==0))return _g.a$a;throw(_g)}},$f: function(_d,_a){var self,_b,_c;_c=nil;self=this;try{_c=(_b=self.$g(nil,_a), (_b!==false&&_b!==nil) ? _b : (_a.$h(nil,self)));return _c}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==1))return _e.a$a;throw(_e)}},$b: function(){var self;self=this;return (new self.a$d())},$i: function(){var self;self=this;return self.a$c}}});a$e($b);$i = a$d({a$j: [],a$e: nil,a$c: "Kernel",a$h: {$p: function(_d,_a){var self,_b,_c,_e;self=this;_e=_d==null?nil:_d;try{_b=[];for(_c=2;_c<arguments.length;_c++)_b.push(arguments[_c]);;
|
206
|
+
var m = self[a$f[_a]];
|
207
|
+
if (m)
|
208
|
+
return m.apply(self, [_e].concat(_b));
|
209
|
+
else
|
210
|
+
return self.$n.apply(self, [_e].concat([_a]).concat(_b));}catch(_f){if(_f instanceof a$c && (!_f.a$b || _f.a$b==4))return _f.a$a;throw(_f)}},$n: function(_d,_a){var self,_b,_c,_e,_f;_f=nil;self=this;_e=_d==null?nil:_d;try{_b=[];for(_c=2;_c<arguments.length;_c++)_b.push(arguments[_c]);;_f=self.$j(nil,$g,("undefined method `" + (_a).$o() + ("' for ").$o() + (self.$i()).$o()));return _f}catch(_g){if(_g instanceof a$c && (!_g.a$b || _g.a$b==3))return _g.a$a;throw(_g)}},$j: function(){var self,_a,_b,_c,_d;self=this;_a=[];for(_b=1;_b<arguments.length;_b++)_a.push(arguments[_b]);;_c=((_b=_a.$l(),_b!==false&&_b!==nil)?$c.$a(nil,""):(_d=_a.$k(),((_b=_d.$h(nil,$b),_b!==false&&_b!==nil)?_d.$d(nil,'$a',a$b(_a)):((_b=_d.$m(nil,$f),_b!==false&&_b!==nil)?((_b=_a.$l(),_b!==false&&_b!==nil)?_d:$a.$a(nil,"to many arguments given to raise")):((_b=_d.$m(nil,$e),_b!==false&&_b!==nil)?((_b=_a.$l(),_b!==false&&_b!==nil)?$c.$a(nil,_d):$a.$a(nil,"to many arguments given to raise")):$d.$a(nil,"exception class/object expected"))))));throw(_c)},$q: function(){var self,_a;_a=nil;self=this;_a=false;return _a},$s: function(_a){var self,_b,_c;_c=nil;self=this;_b=_a==null?nil:_a;try{_c=$h.$a(_b);return _c}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==6))return _d.a$a;throw(_d)}},$r: function(_b,_a){var self;self=this;try{
|
211
|
+
var m = a$f[_a];
|
212
|
+
return (m !== undefined && self[m] !== undefined && !self[m].a$i)}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==5))return _c.a$a;throw(_c)}},$t: function(){var self,_a,_b,_f;_f=nil;self=this;_a=[];for(_b=1;_b<arguments.length;_b++)_a.push(arguments[_b]);;_a.$v(function(_c){var _d;var _e=nil;_d=_c==null?nil:_c;_e=self.$u(nil,_d.$i());return _e});_f=nil;return _f},$d: function(_c,_a,_b){var self,_d;self=this;_d=_c==null?nil:_c;try{
|
213
|
+
var m = self[_a];
|
214
|
+
if (m)
|
215
|
+
return m.apply(self, [_d].concat(_b));
|
216
|
+
else
|
217
|
+
return self.$n.apply(self,
|
218
|
+
[_d].concat([a$h[_a]]).concat(_b));}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==7))return _e.a$a;throw(_e)}},$x: function(_a){var self,_b;_b=nil;self=this;try{while(true){_a()};_b=nil;;return _b}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==10))return _c.a$a;throw(_c)}},$u: function(_b,_a){var self;self=this;try{_a=_a.$o();alert(_a); return nil}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==9))return _c.a$a;throw(_c)}},$w: function(_d,_a){var self,_b,_c,_e;self=this;_e=_d==null?nil:_d;try{_b=[];for(_c=2;_c<arguments.length;_c++)_b.push(arguments[_c]);;
|
219
|
+
var m = self[a$f[_a]];
|
220
|
+
if (m)
|
221
|
+
return m.apply(self, [_e].concat(_b));
|
222
|
+
else
|
223
|
+
return self.$n.apply(self, [_e].concat([_a]).concat(_b));}catch(_f){if(_f instanceof a$c && (!_f.a$b || _f.a$b==8))return _f.a$a;throw(_f)}}}});$k = a$d({a$j: [$i],a$e: nil,a$c: "Object",a$h: {$h: function(_b,_a){var self;self=this;try{return a$i(self, _a)}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==11))return _c.a$a;throw(_c)}},$y: function(_b,_a){var self;self=this;try{return a$i(self, _a)}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==12))return _c.a$a;throw(_c)}},$z: function(){var self;self=this;return self.a$g},$g: function(_b,_a){var self;self=this;try{return (self.constructor == _a.constructor && self == _a)}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==13))return _c.a$a;throw(_c)}},$B: function(){var self;self=this;return self.toString()},$A: function(_a){var self,_b;_b=nil;self=this;try{_a(self);_b=self;return _b}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==14))return _c.a$a;throw(_c)}},$o: function(){var self;self=this;return self.toString()},$c: function(){var self,_a;_a=nil;self=this;_a=nil;return _a},$C: function(_c,_a){var self,_b;_b=nil;self=this;try{_b=$j.$a(nil,self,_a);return _b}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==15))return _d.a$a;throw(_d)}},$f: function(_d,_a){var self,_b,_c;_c=nil;self=this;try{_c=(_b=self.$g(nil,_a), (_b!==false&&_b!==nil) ? _b : (self.$h(nil,_a)));return _c}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==16))return _e.a$a;throw(_e)}},$m: function(_b,_a){var self;self=this;try{return (self.a$g === _a)}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==17))return _c.a$a;throw(_c)}},$i: function(){var self;self=this;return self.toString()}}});a$d({a$j: [],a$g: $b});$e = a$d({a$j: [],a$e: $k,a$c: "String",a$d: String,a$h: {$E: function(_b,_a){var self;self=this;try{return(self + _a)}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==19))return _c.a$a;throw(_c)}},$D: function(_c,_a,_b){var self;self=this;try{self.replace(pattern, replacement)}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==18))return _d.a$a;throw(_d)}},$J: function(_b,_a){var self;self=this;try{
|
224
|
+
var i = self.search(_a);
|
225
|
+
return (i == -1 ? nil : i)}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==21))return _c.a$a;throw(_c)}},$G: function(_f,_a,_b){var self,_c,_d,_e;self=this;try{if(_b==null)_b=" ";;if((_c=_b.$l(),_c!==false&&_c!==nil)){self.$j(nil,$a,"zero width padding")};_d=(_a)-(self.$H());if((_c=(_d)<=(0),_c!==false&&_c!==nil)){return self};_e="";while(_e.length < _d) _e += _b;;return (_e.$I(nil,0,_d))+(self)}catch(_g){if(_g instanceof a$c && (!_g.a$b || _g.a$b==20))return _g.a$a;throw(_g)}},$F: function(){var self;self=this;return self.length},$I: function(_d,_a,_b){var self,_c;self=this;try{if(_b==null)_b=nil;;if((_c=_b.$q(),_c!==false&&_c!==nil)){return self.charAt(_a) || nil}else{if((_c=(_b)<(0),_c!==false&&_c!==nil)){return nil};return self.substring(_a, _a+_b)}}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==23))return _e.a$a;throw(_e)}},$K: function(_f,_a,_b){var self,_c,_d,_e;self=this;try{if(_b==null)_b=" ";;if((_c=_b.$l(),_c!==false&&_c!==nil)){self.$j(nil,$a,"zero width padding")};_d=(_a)-(self.$H());if((_c=(_d)<=(0),_c!==false&&_c!==nil)){return self};_e="";while(_e.length < _d) _e += _b;;return (self)+(_e.$I(nil,0,_d))}catch(_g){if(_g instanceof a$c && (!_g.a$b || _g.a$b==22))return _g.a$a;throw(_g)}},$L: function(_b,_a){var self;self=this;try{return self.split(_a)}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==24))return _c.a$a;throw(_c)}},$o: function(){var self,_a;_a=nil;self=this;_a=self;return _a},$H: function(){var self;self=this;return self.length},$M: function(){var self;self=this;return self.replace(/^\s+/, '').replace(/\s+$/, '')},$l: function(){var self;self=this;return(self === "")},$O: function(_g,_a,_b){var self,_c,_d,_e,_f;self=this;try{if(_b==null)_b=nil;;(_c=["",self,nil],_d=_c[0]==null?nil:_c[0],_e=_c[1]==null?nil:_c[1],_f=_c[2]==null?nil:_c[2],_c);while(_e.length > 0) {
|
226
|
+
if (_f = _e.match(_a)) {
|
227
|
+
_d += _e.slice(0, _f.index);;if((_c=_b,_c!==false&&_c!==nil)){_d=(_d)+(_b)}else{_d=(_d)+(_g(_f.$P()).$o())};_e = _e.slice(_f.index + _f[0].length);
|
228
|
+
} else {
|
229
|
+
_d += _e; _e = '';
|
230
|
+
}
|
231
|
+
} return _d}catch(_h){if(_h instanceof a$c && (!_h.a$b || _h.a$b==26))return _h.a$a;throw(_h)}},$N: function(_c,_a,_b){var self;self=this;try{if(_b==null)_b=0;;
|
232
|
+
var i = self.indexOf(_a, _b);
|
233
|
+
return (i == -1) ? nil : i}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==25))return _d.a$a;throw(_d)}},$i: function(){var self,_a,_b;self=this;_a={
|
234
|
+
'\b': '\\b',
|
235
|
+
'\t': '\\t',
|
236
|
+
'\n': '\\n',
|
237
|
+
'\f': '\\f',
|
238
|
+
'\r': '\\r',
|
239
|
+
'\\': '\\\\'
|
240
|
+
};;_b=self.$O(function(_c){var _d,_e;_d=_c==null?nil:_c;_e=_a[_d];return _e ? _e :
|
241
|
+
'\\u00' + ("0" + _d.charCodeAt().toString(16)).substring(0,2);},/[\x00-\x1f\\]/);return ('"' + _b.replace(/"/g, '\\"') + '"');}}});$l = a$d({a$j: [],a$e: nil,a$c: "Enumerable",a$h: {$Q: function(_a){var self,_b,_c,_f,_h;_h=nil;self=this;_b=_a==null?nil:_a;try{_c=[];self.$v(function(_d){var _e;var _g=nil;_e=_d==null?nil:_d;_g=_c.$R(nil,((_f=_b,_f!==false&&_f!==nil)?_b.$S(nil,_e):_e));return _g});_h=_c;return _h}catch(_i){if(_i instanceof a$c && (!_i.a$b || _i.a$b==27))return _i.a$a;throw(_i)}},$T: function(_f){var self,_a,_e,_g;_g=nil;self=this;try{_a=[];self.$v(function(_b){var _c;var _d=nil;_c=_b==null?nil:_b;if((_e=_f(_c),_e!==false&&_e!==nil)){_d=_a.$R(nil,_c)}else{_d=nil};return _d});_g=_a;return _g}catch(_h){if(_h instanceof a$c && (!_h.a$b || _h.a$b==28))return _h.a$a;throw(_h)}},$U: function(_a){var self,_b,_c,_f,_h;_h=nil;self=this;_b=_a==null?nil:_a;try{_c=[];self.$v(function(_d){var _e;var _g=nil;_e=_d==null?nil:_d;_g=_c.$R(nil,((_f=_b,_f!==false&&_f!==nil)?_b.$S(nil,_e):_e));return _g});_h=_c;return _h}catch(_i){if(_i instanceof a$c && (!_i.a$b || _i.a$b==29))return _i.a$a;throw(_i)}},$V: function(){var self,_a,_e;_e=nil;self=this;_a=[];self.$v(function(_b){var _c;var _d=nil;_c=_b==null?nil:_b;_d=_a.$R(nil,_c);return _d});_e=_a;return _e},$W: function(_f){var self,_a,_e,_g;_g=nil;self=this;try{_a=[];self.$v(function(_b){var _c;var _d=nil;_c=_b==null?nil:_b;if((_e=_f(_c),_e===false||_e===nil)){_d=_a.$R(nil,_c)}else{_d=nil};return _d});_g=_a;return _g}catch(_h){if(_h instanceof a$c && (!_h.a$b || _h.a$b==30))return _h.a$a;throw(_h)}},$X: function(_f){var self,_a,_e,_g;_g=nil;self=this;try{_a=[];self.$v(function(_b){var _c;var _d=nil;_c=_b==null?nil:_b;if((_e=_f(_c),_e!==false&&_e!==nil)){_d=_a.$R(nil,_c)}else{_d=nil};return _d});_g=_a;return _g}catch(_h){if(_h instanceof a$c && (!_h.a$b || _h.a$b==31))return _h.a$a;throw(_h)}}}});$m = a$d({a$j: [$l],a$e: $k,a$f: {$a: function(){var self;self=this;return []}},a$c: "Array",a$d: Array,a$h: {$E: function(_b,_a){var self;self=this;try{return self.concat(_a)}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==34))return _c.a$a;throw(_c)}},$R: function(_b,_a){var self;self=this;try{self.push(_a); return self}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==33))return _c.a$a;throw(_c)}},$Y: function(_b,_a){var self;self=this;try{
|
242
|
+
var del = false;
|
243
|
+
for (var i=0; i < self.length; i++)
|
244
|
+
{
|
245
|
+
if (_a.$g(nil, self[i]))
|
246
|
+
{
|
247
|
+
self.splice(i,1);
|
248
|
+
del = true;
|
249
|
+
// stay at the current index unless we are at the last element!
|
250
|
+
if (i < self.length-1) --i;
|
251
|
+
}
|
252
|
+
}
|
253
|
+
return del ? _a : nil}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==32))return _c.a$a;throw(_c)}},$F: function(){var self;self=this;return self.length},$I: function(_b,_a){var self;self=this;try{var v = self[_a]; return (v == null ? nil : v)}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==36))return _c.a$a;throw(_c)}},$0: function(){var self;self=this;self.length=0; return self},$g: function(_b,_a){var self;self=this;try{
|
254
|
+
if (!(_a instanceof Array)) return false;
|
255
|
+
if (self.length != _a.length) return false;
|
256
|
+
|
257
|
+
//
|
258
|
+
// compare element-wise
|
259
|
+
//
|
260
|
+
for (var i = 0; i < self.length; i++)
|
261
|
+
{
|
262
|
+
if (! self[i].$g(nil, _a[i]))
|
263
|
+
{
|
264
|
+
//
|
265
|
+
// at least for one element #eql? holds not true
|
266
|
+
//
|
267
|
+
return false;
|
268
|
+
}
|
269
|
+
}
|
270
|
+
|
271
|
+
return true;
|
272
|
+
}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==35))return _c.a$a;throw(_c)}},$Z: function(){var self;self=this;return self.concat().reverse()},$2: function(){var self;self=this;var v = self[self.length - 1]; return (v == null ? nil : v)},$o: function(){var self,_d;_d=nil;self=this;_d=self.$U(function(_a){var _b;var _c=nil;_b=_a==null?nil:_a;_c=_b.$o();return _c}).$1();return _d},$4: function(_c,_a,_b){var self;self=this;try{return (self[_a] = _b)}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==39))return _d.a$a;throw(_d)}},$v: function(_a){var self;self=this;try{
|
273
|
+
var elem;
|
274
|
+
for (var i=0; i < self.length; i++) {
|
275
|
+
elem = self[i];;_a((elem == null ? nil : elem));}
|
276
|
+
return self}catch(_b){if(_b instanceof a$c && (!_b.a$b || _b.a$b==38))return _b.a$a;throw(_b)}},$3: function(_a){var self;self=this;try{
|
277
|
+
var elem;
|
278
|
+
for (var i=0; i < self.length; i++) {
|
279
|
+
elem = self[i];;_a([(elem == null ? nil : elem),i]);}
|
280
|
+
return self}catch(_b){if(_b instanceof a$c && (!_b.a$b || _b.a$b==37))return _b.a$a;throw(_b)}},$P: function(){var self;self=this;var v = self[0]; return (v == null ? nil : v)},$H: function(){var self;self=this;return self.length},$5: function(){var self;self=this;
|
281
|
+
var elem = self.pop();
|
282
|
+
return (elem == null ? nil : elem)},$k: function(){var self;self=this;
|
283
|
+
var elem = self.shift();
|
284
|
+
return (elem == null ? nil : elem)},$l: function(){var self;self=this;return (self.length == 0)},$V: function(){var self,_a;_a=nil;self=this;_a=self;return _a},$7: function(){var self,_a,_b;self=this;_a=[];for(_b=1;_b<arguments.length;_b++)_a.push(arguments[_b]);;self.push.apply(self, _a); return self},$6: function(){var self,_a;_a=nil;self=this;_a=self;return _a},$_: function(){var self;self=this;return self.concat()},$i: function(){var self,_a,_e;_e=nil;self=this;_a="[";_a=(_a)+(self.$U(function(_b){var _c;var _d=nil;_c=_b==null?nil:_b;_d=_c.$i();return _d}).$1(nil,", "));_a=(_a)+("]");_e=_a;return _e},$9: function(){var self;self=this;self.reverse(); return self},$8: function(){var self,_a,_b;self=this;_a=[];for(_b=1;_b<arguments.length;_b++)_a.push(arguments[_b]);;self.unshift.apply(self, _a); return self},$1: function(_i,_a){var self,_b,_d,_h;_h=nil;self=this;try{if(_a==null)_a="";;_b="";self.$3(function(_c){var _e,_f;var _g=nil;(_d=a$j(_c),_e=_d[0]==null?nil:_d[0],_f=_d[1]==null?nil:_d[1],_d);_b=(_b)+(_e.$o());if((_d=_f.$$(nil,(self.$H())-(1)),_d===false||_d===nil)){_g=_b=(_b)+(_a)}else{_g=nil};return _g});_h=_b;return _h}catch(_j){if(_j instanceof a$c && (!_j.a$b || _j.a$b==40))return _j.a$a;throw(_j)}}}});$n = a$d({a$j: [],a$e: $k,a$f: {$ab: function(_c,_a,_b){var self;self=this;try{if(_b==null)_b="";;
|
285
|
+
_a.innerHTML = _b;
|
286
|
+
return nil}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==43))return _d.a$a;throw(_d)}},$ac: function(_b,_a){var self;self=this;try{return document.getElementById(_a) || nil}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==44))return _c.a$a;throw(_c)}},$aa: function(_d,_a,_b,_c){var self;self=this;try{_a[_b] = _c; return nil}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==42))return _e.a$a;throw(_e)}},$ad: function(_c,_a,_b){var self;self=this;try{
|
287
|
+
var ret = _a.style[_b];
|
288
|
+
return (ret == null) ? nil : ret}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==45))return _d.a$a;throw(_d)}},$o: function(_b,_a){var self;self=this;try{return _a.outerHTML}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==41))return _c.a$a;throw(_c)}},$ae: function(_b,_a){var self;self=this;try{
|
289
|
+
var sib = _a.nextSibling;
|
290
|
+
while (sib && sib.nodeType != 1)
|
291
|
+
sib = sib.nextSibling;
|
292
|
+
return sib || nil}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==46))return _c.a$a;throw(_c)}},$af: function(_d,_a){var self,_b,_c;self=this;if(self.$ag==null)self.$ag=nil;try{if((_b=(_c=self.$ag, (_c!==false&&_c!==nil) ? (self.$ah(nil,_a,self.$ag)) : _c),_b!==false&&_b!==nil)){self.$ag=nil};if (_a == window.a$k) window.a$k = null;;return nil}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==47))return _e.a$a;throw(_e)}},$ai: function(_d,_a,_b){var self,_c;self=this;try{if(_b==null)_b=true;;if((_c=_b,_c!==false&&_c!==nil)){_a.style.display = ''}else{_a.style.display = 'none'};return nil}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==48))return _e.a$a;throw(_e)}},$ah: function(_c,_a,_b){var self;self=this;try{return (_a == _b)}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==49))return _d.a$a;throw(_d)}},$aj: function(){var self,_a;_a=nil;self=this;_a=self.$ak(nil,"colgroup");return _a},$al: function(){var self,_a;_a=nil;self=this;_a=self.$am(nil,"text");return _a},$an: function(_c,_a,_b){var self;self=this;try{
|
293
|
+
var i = parseInt(_a.style[_b]);
|
294
|
+
return ((!i) ? 0 : i)}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==50))return _d.a$a;throw(_d)}},$ao: function(_b,_a){var self;self=this;try{
|
295
|
+
var e = document.createElement("INPUT");
|
296
|
+
e.type = 'radio';
|
297
|
+
e.name = _a;
|
298
|
+
return e}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==51))return _c.a$a;throw(_c)}},$ap: function(_b,_a){var self;self=this;try{
|
299
|
+
// To mimic IEs +innerText+ property in the W3C DOM, we need to recursively
|
300
|
+
// concatenate all child text nodes (depth first).
|
301
|
+
var text = '', child = _a.firstChild;
|
302
|
+
while (child) {
|
303
|
+
// 1 == Element node
|
304
|
+
if (child.nodeType == 1) {
|
305
|
+
text += this.$ap(nil, child);
|
306
|
+
} else if (child.nodeValue) {
|
307
|
+
text += child.nodeValue;
|
308
|
+
}
|
309
|
+
child = child.nextSibling;
|
310
|
+
}
|
311
|
+
return text}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==52))return _c.a$a;throw(_c)}},$aq: function(_b,_a){var self;self=this;try{self.$ag=_a;window.a$k = _a;;return nil}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==53))return _c.a$a;throw(_c)}},$ar: function(_b,_a){var self;self=this;try{
|
312
|
+
var ret = _a.src;
|
313
|
+
return (ret == null) ? nil : ret}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==54))return _c.a$a;throw(_c)}},$as: function(_e,_a,_b,_c){var self,_d;_d=nil;self=this;try{self.$at(nil,_a,"position","absolute");self.$at(nil,_a,"left",(_b)+("px"));_d=self.$at(nil,_a,"top",(_c)+("px"));return _d}catch(_f){if(_f instanceof a$c && (!_f.a$b || _f.a$b==55))return _f.a$a;throw(_f)}},$au: function(){var self,_a;_a=nil;self=this;_a=self.$ak(nil,"tr");return _a},$av: function(_c,_a,_b){var self;self=this;try{
|
314
|
+
var ret = _a[_b];
|
315
|
+
return (ret == null) ? nil : String(ret)}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==56))return _d.a$a;throw(_d)}},$ay: function(){var self,_a;_a=nil;self=this;_a=self.$ak(nil,"caption");return _a},$az: function(_c,_a,_b){var self;self=this;try{
|
316
|
+
var i = parseInt(_a[_b]);
|
317
|
+
return ((!i) ? 0 : i)}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==58))return _d.a$a;throw(_d)}},$ax: function(_c,_a,_b){var self;self=this;try{
|
318
|
+
_a.a$l = _b;
|
319
|
+
|
320
|
+
_a.onclick = (_b & 0x00001) ? window.a$m : null;
|
321
|
+
_a.ondblclick = (_b & 0x00002) ? window.a$m : null;
|
322
|
+
_a.onmousedown = (_b & 0x00004) ? window.a$m : null;
|
323
|
+
_a.onmouseup = (_b & 0x00008) ? window.a$m : null;
|
324
|
+
_a.onmouseover = (_b & 0x00010) ? window.a$m : null;
|
325
|
+
_a.onmouseout = (_b & 0x00020) ? window.a$m : null;
|
326
|
+
_a.onmousemove = (_b & 0x00040) ? window.a$m : null;
|
327
|
+
_a.onkeydown = (_b & 0x00080) ? window.a$m : null;
|
328
|
+
_a.onkeypress = (_b & 0x00100) ? window.a$m : null;
|
329
|
+
_a.onkeyup = (_b & 0x00200) ? window.a$m : null;
|
330
|
+
_a.onchange = (_b & 0x00400) ? window.a$m : null;
|
331
|
+
_a.onfocus = (_b & 0x00800) ? window.a$m : null;
|
332
|
+
_a.onblur = (_b & 0x01000) ? window.a$m : null;
|
333
|
+
_a.onlosecapture = (_b & 0x02000) ? window.a$m : null;
|
334
|
+
_a.onscroll = (_b & 0x04000) ? window.a$m : null;
|
335
|
+
_a.onload = (_b & 0x08000) ? window.a$m : null;
|
336
|
+
_a.onerror = (_b & 0x10000) ? window.a$m : null;
|
337
|
+
_a.onmousewheel = (_b & 0x20000) ? window.a$m : null;
|
338
|
+
|
339
|
+
return nil}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==57))return _d.a$a;throw(_d)}},$aA: function(_d,_a,_b,_c){var self;self=this;try{_a.setAttribute(_b, _c); return nil}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==59))return _e.a$a;throw(_e)}},$aw: function(){var self;self=this;return document.body.clientWidth},$aB: function(_b,_a){var self;self=this;try{return _a.a$l || 0}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==60))return _c.a$a;throw(_c)}},$aD: function(){var self,_a;_a=nil;self=this;_a=self.$ak(nil,"tbody");return _a},$aC: function(_c,_a,_b){var self;self=this;try{_a.src = _b; return nil}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==61))return _d.a$a;throw(_d)}},$am: function(_b,_a){var self;self=this;try{
|
340
|
+
var e = document.createElement("INPUT");
|
341
|
+
e.type = _a;
|
342
|
+
return e}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==62))return _c.a$a;throw(_c)}},$aE: function(_b,_a){var self;self=this;try{
|
343
|
+
var left = _a.offsetLeft, top = _a.offsetTop;
|
344
|
+
var width = _a.offsetWidth, height = _a.offsetHeight;
|
345
|
+
|
346
|
+
if (_a.parentNode != _a.offsetParent) {
|
347
|
+
left -= _a.parentNode.offsetLeft;
|
348
|
+
top -= _a.parentNode.offsetTop;
|
349
|
+
}
|
350
|
+
|
351
|
+
var cur = _a.parentNode;
|
352
|
+
while (cur && (cur.nodeType == 1)) {
|
353
|
+
// body tags are implicitly scrollable
|
354
|
+
if ((cur.style.overflow == 'auto') || (cur.style.overflow == 'scroll') ||
|
355
|
+
(cur.tagName == 'BODY')) {
|
356
|
+
|
357
|
+
if (left < cur.scrollLeft) {
|
358
|
+
cur.scrollLeft = left;
|
359
|
+
}
|
360
|
+
if (left + width > cur.scrollLeft + cur.clientWidth) {
|
361
|
+
cur.scrollLeft = (left + width) - cur.clientWidth;
|
362
|
+
}
|
363
|
+
if (top < cur.scrollTop) {
|
364
|
+
cur.scrollTop = top;
|
365
|
+
}
|
366
|
+
if (top + height > cur.scrollTop + cur.clientHeight) {
|
367
|
+
cur.scrollTop = (top + height) - cur.clientHeight;
|
368
|
+
}
|
369
|
+
}
|
370
|
+
|
371
|
+
var offsetLeft = cur.offsetLeft, offsetTop = cur.offsetTop;
|
372
|
+
if (cur.parentNode != cur.offsetParent) {
|
373
|
+
offsetLeft -= cur.parentNode.offsetLeft;
|
374
|
+
offsetTop -= cur.parentNode.offsetTop;
|
375
|
+
}
|
376
|
+
|
377
|
+
left += offsetLeft - cur.scrollLeft;
|
378
|
+
top += offsetTop - cur.scrollTop;
|
379
|
+
cur = cur.parentNode;
|
380
|
+
}
|
381
|
+
return nil}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==63))return _c.a$a;throw(_c)}},$aF: function(){var self,_a;_a=nil;self=this;_a=self.$ak(nil,"legend");return _a},$aG: function(){var self,_a;_a=nil;self=this;_a=self.$ak(nil,"fieldset");return _a},$ak: function(_b,_a){var self;self=this;try{return document.createElement(_a)}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==64))return _c.a$a;throw(_c)}},$aI: function(){var self,_a;_a=nil;self=this;_a=self.$ak(nil,"div");return _a},$aJ: function(_b,_a){var self;self=this;try{
|
382
|
+
var child = _a.firstChild;
|
383
|
+
while (child && child.nodeType != 1)
|
384
|
+
child = child.nextSibling;
|
385
|
+
return child || nil}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==65))return _c.a$a;throw(_c)}},$aH: function(){var self;self=this;return document.body.clientHeight},$aK: function(_b,_a){var self;self=this;try{
|
386
|
+
var left = 0;
|
387
|
+
var curr = _a;
|
388
|
+
// This intentionally excludes body which has a null offsetParent.
|
389
|
+
while (curr.offsetParent) {
|
390
|
+
left -= curr.scrollLeft;
|
391
|
+
curr = curr.parentNode;
|
392
|
+
}
|
393
|
+
while (_a) {
|
394
|
+
left += _a.offsetLeft;
|
395
|
+
_a = _a.offsetParent;
|
396
|
+
}
|
397
|
+
return left}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==66))return _c.a$a;throw(_c)}},$aL: function(_d,_a,_b,_c){var self;self=this;try{_a.insertBefore(_b, _c); return nil}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==67))return _e.a$a;throw(_e)}},$aM: function(_d,_a,_b,_c){var self;self=this;try{var option = _a.options[_c];
|
398
|
+
option.text = _b;
|
399
|
+
return nil}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==68))return _e.a$a;throw(_e)}},$aN: function(_c,_a,_b){var self;self=this;try{_a.removeChild(_b); return nil}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==69))return _d.a$a;throw(_d)}},$aO: function(_b,_a){var self;self=this;try{
|
400
|
+
var ret = _a.innerHTML;
|
401
|
+
return (ret == null) ? nil : ret}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==70))return _c.a$a;throw(_c)}},$aP: function(){var self,_a;_a=nil;self=this;_a=self.$ak(nil,"td");return _a},$aQ: function(){var self,_a;_a=nil;self=this;_a=self.$am(nil,"password");return _a},$aR: function(){var self,_a;_a=nil;self=this;_a=self.$ak(nil,"textarea");return _a},$aS: function(){var self,_a;_a=nil;self=this;_a=self.$ak(nil,"tfoot");return _a},$aT: function(){var self,_a;_a=nil;self=this;_a=self.$am(nil,"checkbox");return _a},$aV: function(_c,_a,_b){var self;self=this;try{
|
402
|
+
var ret = _a.getAttribute(_b);
|
403
|
+
return (ret == null) ? nil : ret}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==72))return _d.a$a;throw(_d)}},$aW: function(){var self,_a;_a=nil;self=this;_a=self.$ak(nil,"form");return _a},$aX: function(){var self,_a;_a=nil;self=this;_a=self.$ak(nil,"button");return _a},$aY: function(){var self,_a;_a=nil;self=this;_a=self.$ak(nil,"label");return _a},$aU: function(_c,_a,_b){var self;self=this;try{_a.a$n = (_b === nil) ? null : _b; return nil}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==71))return _d.a$a;throw(_d)}},$aZ: function(_b,_a){var self;self=this;try{return (_a.style.display != 'none')}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==73))return _c.a$a;throw(_c)}},$a0: function(){var self,_a;_a=nil;self=this;_a=self.$ak(nil,"th");return _a},$a1: function(_c,_a,_b){var self;self=this;try{
|
404
|
+
var count = 0, child = _a.firstChild;
|
405
|
+
while (child) {
|
406
|
+
if (child == _b)
|
407
|
+
return count;
|
408
|
+
if (child.nodeType == 1)
|
409
|
+
++count;
|
410
|
+
child = child.nextSibling;
|
411
|
+
}
|
412
|
+
|
413
|
+
return nil}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==74))return _d.a$a;throw(_d)}},$a2: function(){var self,_a;_a=nil;self=this;_a=self.$ak(nil,"col");return _a},$a3: function(){var self,_a;_a=nil;self=this;_a=self.$ak(nil,"iframe");return _a},$a4: function(){var self,_a;_a=nil;self=this;_a=self.$ak(nil,"options");return _a},$a5: function(_c,_a,_b){var self;self=this;try{
|
414
|
+
var p = _a.parentNode;
|
415
|
+
if (!p) return;
|
416
|
+
p.insertBefore(_b, _a);
|
417
|
+
p.removeChild(_a);
|
418
|
+
return nil}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==75))return _d.a$a;throw(_d)}},$a7: function(){var self,_a;_a=nil;self=this;_a=self.$ak(nil,"A");return _a},$a8: function(_b,_a){var self;self=this;try{_a.a$n = null; return nil}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==77))return _c.a$a;throw(_c)}},$a6: function(_c,_a,_b){var self;self=this;try{
|
419
|
+
// Remove all children first.
|
420
|
+
while (_a.firstChild) {
|
421
|
+
_a.removeChild(_a.firstChild);
|
422
|
+
}
|
423
|
+
// Add a new text node.
|
424
|
+
if (_b !== nil) {
|
425
|
+
_a.appendChild(document.createTextNode(_b));
|
426
|
+
}
|
427
|
+
return nil}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==76))return _d.a$a;throw(_d)}},$a9: function(){var self,_a;_a=nil;self=this;_a=self.$ak(nil,"img");return _a},$at: function(_d,_a,_b,_c){var self;self=this;try{_a.style[_b] = _c; return nil}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==78))return _e.a$a;throw(_e)}},$a_: function(_c,_a,_b){var self;self=this;try{
|
428
|
+
var count = 0, child = _a.firstChild;
|
429
|
+
while (child) {
|
430
|
+
var next = child.nextSibling;
|
431
|
+
if (child.nodeType == 1) {
|
432
|
+
if (_b == count)
|
433
|
+
return child;
|
434
|
+
++count;
|
435
|
+
}
|
436
|
+
child = next;
|
437
|
+
}
|
438
|
+
|
439
|
+
return nil}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==79))return _d.a$a;throw(_d)}},$a$: function(){var self;self=this;if(self.$ag==null)self.$ag=nil;return self.$ag},$ba: function(_c,_a,_b){var self;self=this;try{
|
440
|
+
while (_b) {
|
441
|
+
if (_a == _b) {
|
442
|
+
return true;
|
443
|
+
}
|
444
|
+
_b = _b.parentNode;
|
445
|
+
if (_b && (_b.nodeType != 1)) {
|
446
|
+
_b = null;
|
447
|
+
}
|
448
|
+
}
|
449
|
+
return false}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==80))return _d.a$a;throw(_d)}},$bb: function(){var self,_a;_a=nil;self=this;_a=self.$ak(nil,"table");return _a},$bc: function(){var self,_a;_a=nil;self=this;_a=self.$ak(nil,"thead");return _a},$be: function(_c,_a,_b){var self;self=this;try{return !!_a[_b]}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==82))return _d.a$a;throw(_d)}},$bd: function(_b,_a){var self;self=this;try{
|
450
|
+
var count = 0, child = _a.firstChild;
|
451
|
+
while (child) {
|
452
|
+
if (child.nodeType == 1)
|
453
|
+
++count;
|
454
|
+
child = child.nextSibling;
|
455
|
+
}
|
456
|
+
return count}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==81))return _c.a$a;throw(_c)}},$bh: function(_c,_a,_b){var self;self=this;try{return !!_a.style[_b]}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==84))return _d.a$a;throw(_d)}},$bg: function(_c,_a,_b){var self;self=this;try{_a.removeAttribute(_b); return nil}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==83))return _d.a$a;throw(_d)}},$bf: function(){var self,_a;_a=nil;self=this;_a=self.$ak(nil,"span");return _a},$bn: function(_b,_a){var self;self=this;try{
|
457
|
+
var top = 0;
|
458
|
+
var curr = _a;
|
459
|
+
// This intentionally excludes body which has a null offsetParent.
|
460
|
+
while (curr.offsetParent) {
|
461
|
+
top -= curr.scrollTop;
|
462
|
+
curr = curr.parentNode;
|
463
|
+
}
|
464
|
+
while (_a) {
|
465
|
+
top += _a.offsetTop;
|
466
|
+
_a = _a.offsetParent;
|
467
|
+
}
|
468
|
+
return top}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==90))return _c.a$a;throw(_c)}},$bm: function(_b,_a){var self;self=this;try{
|
469
|
+
var parent = _a.parentNode;
|
470
|
+
if(parent == null) {
|
471
|
+
return nil;
|
472
|
+
}
|
473
|
+
if (parent.nodeType != 1)
|
474
|
+
parent = null;
|
475
|
+
return parent || nil}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==89))return _c.a$a;throw(_c)}},$bl: function(_c,_a){var self,_b;_b=nil;self=this;try{self.$at(nil,_a,"left","");self.$at(nil,_a,"top","");_b=self.$at(nil,_a,"position","static");return _b}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==88))return _d.a$a;throw(_d)}},$bk: function(_d,_a){var self,_b,_c;self=this;try{if(_a==null)_a=false;;_b=self.$ak(nil,"select");if((_c=_a,_c!==false&&_c!==nil)){self.$aa(nil,_b,"multiple",true)};return _b}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==87))return _e.a$a;throw(_e)}},$bj: function(_c,_a,_b){var self;self=this;try{_a.appendChild(_b); return nil}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==86))return _d.a$a;throw(_d)}},$bi: function(_d,_a,_b,_c){var self;self=this;try{
|
476
|
+
var count = 0, child = _a.firstChild, before = null;
|
477
|
+
while (child) {
|
478
|
+
if (child.nodeType == 1) {
|
479
|
+
if (count == _c) {
|
480
|
+
before = child;
|
481
|
+
break;
|
482
|
+
}
|
483
|
+
++count;
|
484
|
+
}
|
485
|
+
child = child.nextSibling;
|
486
|
+
}
|
487
|
+
|
488
|
+
_a.insertBefore(_b, before);
|
489
|
+
return nil}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==85))return _e.a$a;throw(_e)}}},a$c: "DOM"});$o = a$d({a$j: [],a$e: $k,a$c: "Range",a$h: {$$: function(_e,_a){var self,_b,_c,_d;_d=nil;self=this;if(self.$bo==null)self.$bo=nil;if(self.$bp==null)self.$bp=nil;if(self.$bq==null)self.$bq=nil;try{if (self.constructor != _a.constructor) return false;;_d=(_b=self.$bo.$$(nil,_a.$P()), (_b!==false&&_b!==nil) ? ((_c=self.$bp.$$(nil,_a.$2()), (_c!==false&&_c!==nil) ? (self.$bq.$$(nil,_a.$br())) : _c)) : _b);return _d}catch(_f){if(_f instanceof a$c && (!_f.a$b || _f.a$b==91))return _f.a$a;throw(_f)}},$bs: function(){var self,_a;_a=nil;self=this;if(self.$bo==null)self.$bo=nil;_a=self.$bo;return _a},$g: function(_e,_a){var self,_b,_c,_d;_d=nil;self=this;if(self.$bo==null)self.$bo=nil;if(self.$bp==null)self.$bp=nil;if(self.$bq==null)self.$bq=nil;try{if (self.constructor != _a.constructor) return false;;_d=(_b=self.$bo.$g(nil,_a.$P()), (_b!==false&&_b!==nil) ? ((_c=self.$bp.$g(nil,_a.$2()), (_c!==false&&_c!==nil) ? (self.$bq.$$(nil,_a.$br())) : _c)) : _b);return _d}catch(_f){if(_f instanceof a$c && (!_f.a$b || _f.a$b==92))return _f.a$a;throw(_f)}},$br: function(){var self,_a;_a=nil;self=this;if(self.$bq==null)self.$bq=nil;_a=self.$bq;return _a},$2: function(){var self,_a;_a=nil;self=this;if(self.$bp==null)self.$bp=nil;_a=self.$bp;return _a},$o: function(){var self,_b,_a;_a=nil;self=this;if(self.$bo==null)self.$bo=nil;if(self.$bp==null)self.$bp=nil;if(self.$bq==null)self.$bq=nil;if((_b=self.$bq,_b!==false&&_b!==nil)){_a=("" + (self.$bo).$o() + ("...").$o() + (self.$bp).$o())}else{_a=("" + (self.$bo).$o() + ("..").$o() + (self.$bp).$o())};return _a},$v: function(_c){var self,_a,_b,_d;_d=nil;self=this;if(self.$bo==null)self.$bo=nil;if(self.$bp==null)self.$bp=nil;if(self.$bq==null)self.$bq=nil;try{_a=self.$bo;if((_b=(self.$bo)>(self.$bp),_b!==false&&_b!==nil)){return nil};if((_b=self.$bq,_b!==false&&_b!==nil)){while((_b=(_a)<(self.$bp),_b!==false&&_b!==nil)){_c(_a);_a=_a.$bv()};_d=nil;}else{while((_b=(_a)<=(self.$bp),_b!==false&&_b!==nil)){_c(_a);_a=_a.$bv()};_d=nil;};return _d}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==95))return _e.a$a;throw(_e)}},$bu: function(){var self,_a;_a=nil;self=this;if(self.$bp==null)self.$bp=nil;_a=self.$bp;return _a},$P: function(){var self,_a;_a=nil;self=this;if(self.$bo==null)self.$bo=nil;_a=self.$bo;return _a},$bt: function(_d,_a){var self,_b,_c;_c=nil;self=this;if(self.$bo==null)self.$bo=nil;if(self.$bp==null)self.$bp=nil;if(self.$bq==null)self.$bq=nil;try{if((_b=(_a)<(self.$bo),_b!==false&&_b!==nil)){return false};if((_b=self.$bq,_b!==false&&_b!==nil)){_c=(_a)<(self.$bp)}else{_c=(_a)<=(self.$bp)};return _c}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==94))return _e.a$a;throw(_e)}},$c: function(_f,_a,_b,_c){var self,_d,_e;_e=nil;self=this;try{if(_c==null)_c=false;;(_d=[_a,_b],self.$bo=_d[0]==null?nil:_d[0],self.$bp=_d[1]==null?nil:_d[1],_d);_e=self.$bq=((_d=_c,_d!==false&&_d!==nil)?true:false);return _e}catch(_g){if(_g instanceof a$c && (!_g.a$b || _g.a$b==93))return _g.a$a;throw(_g)}},$f: function(_d,_a){var self,_b,_c;_c=nil;self=this;if(self.$bo==null)self.$bo=nil;if(self.$bp==null)self.$bp=nil;if(self.$bq==null)self.$bq=nil;try{if((_b=(_a)<(self.$bo),_b!==false&&_b!==nil)){return false};if((_b=self.$bq,_b!==false&&_b!==nil)){_c=(_a)<(self.$bp)}else{_c=(_a)<=(self.$bp)};return _c}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==96))return _e.a$a;throw(_e)}},$V: function(){var self,_a,_b,_c;self=this;if(self.$bo==null)self.$bo=nil;if(self.$bp==null)self.$bp=nil;if(self.$bq==null)self.$bq=nil;_a=[];if((_b=(self.$bo)>(self.$bp),_b!==false&&_b!==nil)){return _a};_c=self.$bo;if((_b=self.$bq,_b!==false&&_b!==nil)){while((_b=(_c)<(self.$bp),_b!==false&&_b!==nil)){_a.$R(nil,_c);_c=_c.$bv()}}else{while((_b=(_c)<=(self.$bp),_b!==false&&_b!==nil)){_a.$R(nil,_c);_c=_c.$bv()}};return _a},$i: function(){var self,_b,_a;_a=nil;self=this;if(self.$bo==null)self.$bo=nil;if(self.$bp==null)self.$bp=nil;if(self.$bq==null)self.$bq=nil;if((_b=self.$bq,_b!==false&&_b!==nil)){_a=("" + (self.$bo.$i()).$o() + ("...").$o() + (self.$bp.$i()).$o())}else{_a=("" + (self.$bo.$i()).$o() + ("..").$o() + (self.$bp.$i()).$o())};return _a},$bw: function(_d,_a){var self,_b,_c;_c=nil;self=this;if(self.$bo==null)self.$bo=nil;if(self.$bp==null)self.$bp=nil;if(self.$bq==null)self.$bq=nil;try{if((_b=(_a)<(self.$bo),_b!==false&&_b!==nil)){return false};if((_b=self.$bq,_b!==false&&_b!==nil)){_c=(_a)<(self.$bp)}else{_c=(_a)<=(self.$bp)};return _c}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==97))return _e.a$a;throw(_e)}}}});$f = a$d({a$j: [],a$e: $k,a$c: "Exception",a$h: {$bx: function(){var self,_a;_a=nil;self=this;if(self.$by==null)self.$by=nil;_a=self.$by;return _a},$o: function(){var self,_a;_a=nil;self=this;if(self.$by==null)self.$by=nil;_a=self.$by;return _a},$c: function(_d,_a){var self,_c,_b;_b=nil;self=this;try{if(_a==null)_a=nil;;if((_c=_a.$q(),_c!==false&&_c!==nil)){_b=self.$by=self.$z().$e()}else{_b=self.$by=_a};return _b}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==98))return _e.a$a;throw(_e)}},$i: function(){var self,_a;_a=nil;self=this;if(self.$by==null)self.$by=nil;_a=("#<" + (self.$z().$e()).$o() + (": ").$o() + (self.$by).$o() + (">").$o());return _a}}});$p = a$d({a$j: [],a$e: $f,a$c: "StandardError"});$q = a$d({a$j: [],a$e: $p,a$c: "NameError"});$g = a$d({a$j: [],a$e: $q,a$c: "NoMethodError"});$d = a$d({a$j: [],a$e: $p,a$c: "TypeError"});$r = a$d({a$j: [],a$e: $k,a$c: "Number",a$d: Number,a$h: {$E: function(_b,_a){var self;self=this;try{return self + _a}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==102))return _c.a$a;throw(_c)}},$$: function(_b,_a){var self;self=this;try{return self == _a}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==101))return _c.a$a;throw(_c)}},$bA: function(_d,_a){var self,_b,_c;self=this;try{_b=self;while((_c=(_b)>=(_a),_c!==false&&_c!==nil)){_d(_b);_b=(_b)-(1)};return self}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==100))return _e.a$a;throw(_e)}},$bz: function(_d,_a){var self,_b,_c;self=this;try{_b=self;while((_c=(_b)<=(_a),_c!==false&&_c!==nil)){_d(_b);_b=(_b)+(1)};return self}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==99))return _e.a$a;throw(_e)}},$bB: function(_b,_a){var self;self=this;try{return self <= _a}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==103))return _c.a$a;throw(_c)}},$bC: function(_b,_a){var self;self=this;try{return self - _a}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==104))return _c.a$a;throw(_c)}},$bv: function(){var self;self=this;return self+1},$bD: function(_b,_a){var self;self=this;try{return self / _a}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==106))return _c.a$a;throw(_c)}},$o: function(_b,_a){var self;self=this;try{if(_a==null)_a=10;;return self.toString(_a)}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==105))return _c.a$a;throw(_c)}},$bE: function(_b,_a){var self;self=this;try{return self % _a}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==107))return _c.a$a;throw(_c)}},$bI: function(_b,_a){var self;self=this;try{return self & _a}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==111))return _c.a$a;throw(_c)}},$bH: function(_b,_a){var self;self=this;try{return self < _a}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==110))return _c.a$a;throw(_c)}},$bG: function(_c){var self,_a,_b;self=this;try{_a=0;while((_b=(_a)<(self),_b!==false&&_b!==nil)){_c(_a);_a=(_a)+(1)};return self}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==109))return _d.a$a;throw(_d)}},$bF: function(_b,_a){var self;self=this;try{return self | _a}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==108))return _c.a$a;throw(_c)}},$bM: function(){var self;self=this;return -self},$bL: function(_b,_a){var self;self=this;try{return self > _a}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==113))return _c.a$a;throw(_c)}},$bK: function(_b,_a){var self;self=this;try{return self ^ _a}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==112))return _c.a$a;throw(_c)}},$bJ: function(){var self;self=this;return ~self},$bN: function(_b,_a){var self;self=this;try{return self >= _a}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==114))return _c.a$a;throw(_c)}},$i: function(){var self;self=this;return self.toString()},$bP: function(_b,_a){var self;self=this;try{return self * _a}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==115))return _c.a$a;throw(_c)}},$bO: function(){var self;self=this;return self}}});$s = a$d({a$j: [],a$e: $r,a$c: "Bignum",a$d: Number});$t = a$d({a$j: [$l],a$e: $k,a$f: {$bS: function(){var self,_a,_b,_c;self=this;_a=[];for(_b=1;_b<arguments.length;_b++)_a.push(arguments[_b]);;if((_b=_a.$H().$bE(nil,2).$$(nil,0),_b===false||_b===nil)){self.$j(nil,$a)};_c=self.$b();
|
490
|
+
//
|
491
|
+
// we use an associate array to store the items. But unlike
|
492
|
+
// Javascript, the entries are arrays which contain the collisions.
|
493
|
+
// NOTE that we have to prefix the hash code with a prefix so that
|
494
|
+
// there are no collisions with methods etc.
|
495
|
+
// I prefix it for now with ":".
|
496
|
+
//
|
497
|
+
var items = {};
|
498
|
+
var hashed_key, current_key, current_val;
|
499
|
+
|
500
|
+
for (var i = 0; i < _a.length; i += 2)
|
501
|
+
{
|
502
|
+
current_key = _a[i];
|
503
|
+
current_val = _a[i+1];
|
504
|
+
hashed_key = ":" + current_key.$B();
|
505
|
+
|
506
|
+
// make sure that a bucket exists
|
507
|
+
if (!items[hashed_key]) items[hashed_key] = [];
|
508
|
+
|
509
|
+
items[hashed_key].push(current_key, current_val);
|
510
|
+
}
|
511
|
+
|
512
|
+
_c.a$o = items;
|
513
|
+
_c.a$p = nil;
|
514
|
+
return _c;
|
515
|
+
},$bT: function(_d,_a){var self,_b,_c;_c=nil;self=this;try{_c=_b=self.$a();return _c}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==119))return _e.a$a;throw(_e)}}},a$c: "Hash",a$h: {$I: function(_b,_a){var self;self=this;try{
|
516
|
+
if (!self.a$o)
|
517
|
+
{
|
518
|
+
// this is a Javascript Object, not a RubyJS Hash object.
|
519
|
+
// we directly look the key up. it's fast but not Ruby-like,
|
520
|
+
// so be careful!
|
521
|
+
|
522
|
+
var elem = self[_a];
|
523
|
+
return (elem == null ? nil : elem);
|
524
|
+
}
|
525
|
+
|
526
|
+
var hashed_key = ":" + _a.$B();
|
527
|
+
var bucket = self.a$o[hashed_key];
|
528
|
+
|
529
|
+
if (bucket)
|
530
|
+
{
|
531
|
+
//
|
532
|
+
// find the matching element inside the bucket
|
533
|
+
//
|
534
|
+
|
535
|
+
for (var i = 0; i < bucket.length; i += 2)
|
536
|
+
{
|
537
|
+
if (bucket[i].$g(nil,_a))
|
538
|
+
return bucket[i+1];
|
539
|
+
}
|
540
|
+
}
|
541
|
+
|
542
|
+
// no matching key found -> return default value
|
543
|
+
return self.a$p;
|
544
|
+
}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==116))return _c.a$a;throw(_c)}},$bQ: function(){var self,_b,_f;_b=_f=nil;self=this;_f=self.$U(function(_a){var _c,_d;var _e=nil;(_b=a$j(_a),_c=_b[0]==null?nil:_b[0],_d=_b[1]==null?nil:_b[1],_b);_e=_c;return _e});return _f},$o: function(){var self,_a,_c,_g;_c=_g=nil;self=this;_a=[];self.$v(function(_b){var _d,_e;var _f=nil;(_c=a$j(_b),_d=_c[0]==null?nil:_c[0],_e=_c[1]==null?nil:_c[1],_c);_a.$R(nil,_d);_f=_a.$R(nil,_e);return _f});_g=_a.$1(nil,"");return _g},$4: function(_c,_a,_b){var self;self=this;try{
|
545
|
+
if (!self.a$o)
|
546
|
+
{
|
547
|
+
// this is a Javascript Object, not a RubyJS Hash object.
|
548
|
+
// we directly look the key up. it's fast but not Ruby-like,
|
549
|
+
// so be careful!
|
550
|
+
|
551
|
+
self[_a] = _b;
|
552
|
+
return _b;
|
553
|
+
}
|
554
|
+
|
555
|
+
var hashed_key = ":" + _a.$B();
|
556
|
+
var bucket = self.a$o[hashed_key];
|
557
|
+
|
558
|
+
if (bucket)
|
559
|
+
{
|
560
|
+
//
|
561
|
+
// find the matching element inside the bucket
|
562
|
+
//
|
563
|
+
|
564
|
+
for (var i = 0; i < bucket.length; i += 2)
|
565
|
+
{
|
566
|
+
if (bucket[i].$g(nil,_a))
|
567
|
+
{
|
568
|
+
// overwrite value
|
569
|
+
bucket[i+1] = _b;
|
570
|
+
return _b;
|
571
|
+
}
|
572
|
+
}
|
573
|
+
// key not found in this bucket. append key, value pair to bucket
|
574
|
+
bucket.push(_a, _b);
|
575
|
+
}
|
576
|
+
else
|
577
|
+
{
|
578
|
+
//
|
579
|
+
// create new bucket
|
580
|
+
//
|
581
|
+
self.a$o[hashed_key] = [_a, _b];
|
582
|
+
}
|
583
|
+
return _b;
|
584
|
+
}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==118))return _d.a$a;throw(_d)}},$v: function(_a){var self;self=this;try{
|
585
|
+
if (!self.a$o)
|
586
|
+
{
|
587
|
+
// this is a Javascript Object, not a RubyJS Hash object.
|
588
|
+
// we directly look the key up. it's fast but not Ruby-like,
|
589
|
+
// so be careful!
|
590
|
+
var key, value;
|
591
|
+
for (key in self)
|
592
|
+
{
|
593
|
+
value = self[key];;_a([(key == null ? nil : key),(value == null ? nil : value)]);
|
594
|
+
}
|
595
|
+
|
596
|
+
return nil;
|
597
|
+
}
|
598
|
+
|
599
|
+
var key, bucket, i;
|
600
|
+
for (key in self.a$o)
|
601
|
+
{
|
602
|
+
if (key.charAt(0) == ":")
|
603
|
+
{
|
604
|
+
bucket = self.a$o[key];
|
605
|
+
for (i=0; i<bucket.length; i+=2)
|
606
|
+
{;_a([bucket[i],bucket[i+1]]);
|
607
|
+
}
|
608
|
+
}
|
609
|
+
}
|
610
|
+
return nil;
|
611
|
+
}catch(_b){if(_b instanceof a$c && (!_b.a$b || _b.a$b==117))return _b.a$a;throw(_b)}},$c: function(){var self;self=this;
|
612
|
+
self.a$o = {};
|
613
|
+
self.a$p = nil;
|
614
|
+
return nil},$bR: function(){var self,_b,_f;_b=_f=nil;self=this;_f=self.$U(function(_a){var _c,_d;var _e=nil;(_b=a$j(_a),_c=_b[0]==null?nil:_b[0],_d=_b[1]==null?nil:_b[1],_b);_e=_d;return _e});return _f},$i: function(){var self,_a,_c,_g;_c=_g=nil;self=this;_a="{";_a=(_a)+(self.$U(function(_b){var _d,_e;var _f=nil;(_c=a$j(_b),_d=_c[0]==null?nil:_c[0],_e=_c[1]==null?nil:_c[1],_c);_f=((_d.$i())+("=>"))+(_e.$i());return _f}).$1(nil,", "));_a=(_a)+("}");_g=_a;return _g}}});$u = a$d({a$j: [],a$e: $k,a$c: "Regexp",a$d: RegExp});$c = a$d({a$j: [],a$e: $p,a$c: "RuntimeError"});$v = a$d({a$j: [],a$e: $r,a$c: "Fixnum",a$d: Number});$h = a$d({a$j: [],a$e: $k,a$f: {$a: function(_a){var self,_b,_c;self=this;_b=_a==null?nil:_a;try{if((_c=_b,_c===false||_c===nil)){self.$j(nil,$a,"tried to create Proc object without a block")};return (function() {
|
615
|
+
try {
|
616
|
+
return _b.$S.apply(_b, arguments);
|
617
|
+
} catch(e)
|
618
|
+
{
|
619
|
+
if (e instanceof a$c)
|
620
|
+
{
|
621
|
+
if (e.a$b == null)
|
622
|
+
{;self.$j(nil,$w,"break from proc-closure");}
|
623
|
+
return e.a$a;
|
624
|
+
}
|
625
|
+
else throw(e);
|
626
|
+
}
|
627
|
+
})}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==120))return _d.a$a;throw(_d)}}},a$c: "Proc",a$d: Function,a$h: {$S: function(){var self,_a,_b;self=this;_a=[];for(_b=1;_b<arguments.length;_b++)_a.push(arguments[_b]);;
|
628
|
+
// TODO: use switch/case
|
629
|
+
if (_a.length == 0) return self();
|
630
|
+
else if (_a.length == 1) return self(_a[0]);
|
631
|
+
else return self(_a);}}});$w = a$d({a$j: [],a$e: $p,a$c: "LocalJumpError"});$x = a$d({a$j: [],a$e: $r,a$c: "Float",a$d: Number});$y = a$d({a$j: [],a$e: $k,a$c: "NilClass",a$d: NilClass,a$h: {$bU: function(){var self,_a;_a=nil;self=this;_a=0.0;return _a},$q: function(){var self,_a;_a=nil;self=this;_a=true;return _a},$o: function(){var self,_a;_a=nil;self=this;_a="";return _a},$bV: function(){var self,_a;_a=nil;self=this;_a=0;return _a},$V: function(){var self,_a;_a=nil;self=this;_a=[];return _a},$bW: function(){var self,_a;_a=nil;self=this;_a=[];return _a},$i: function(){var self,_a;_a=nil;self=this;_a="nil";return _a}}});$j = a$d({a$j: [],a$e: $k,a$c: "Method",a$h: {$c: function(_f,_a,_b){var self,_c,_d,_e;_e=nil;self=this;try{(_c=[_a,_b],self.$bX=_c[0]==null?nil:_c[0],self.$bY=_c[1]==null?nil:_c[1],_c);_d=nil;_d = _a[a$f[_b]];
|
632
|
+
if (_d==null) _d = nil;;if((_c=_d,_c!==false&&_c!==nil)){_e=self.$bZ=_d}else{_e=self.$j(nil,$q,("undefined method `" + (_b).$o() + ("' for class `").$o() + (_a.$z().$e()).$o() + ("'").$o()))};return _e}catch(_g){if(_g instanceof a$c && (!_g.a$b || _g.a$b==121))return _g.a$a;throw(_g)}},$S: function(_c){var self,_a,_b,_d;self=this;_d=_c==null?nil:_c;try{_a=[];for(_b=1;_b<arguments.length;_b++)_a.push(arguments[_b]);;return self.$bZ.apply(self.$bX, [_d].concat(_a))}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==122))return _e.a$a;throw(_e)}},$i: function(){var self,_a;_a=nil;self=this;if(self.$bX==null)self.$bX=nil;if(self.$bY==null)self.$bY=nil;_a=("#<Method: " + (self.$bX.$z().$e()).$o() + ("#").$o() + (self.$bY).$o() + (">").$o());return _a}}});$z = a$d({a$j: [],a$e: $k,a$c: "MatchData",a$h: {$c: function(_c,_a){var self,_b;_b=nil;self=this;try{_b=self.$b0=_a;return _b}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==123))return _d.a$a;throw(_d)}}}});$A = a$d({a$j: [],a$e: $k,a$f: {$b1: function(){var self,_a,_b;_b=nil;self=this;_a=$n.$ac(nil,"out");_b=$n.$a6(nil,_a,"hello world");return _b}},a$c: "HelloWorld"});$B = a$d({a$j: [],a$e: $k,a$c: "Boolean",a$d: Boolean,a$h: {$$: function(_b,_a){var self;self=this;try{return (self == _a)}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==124))return _c.a$a;throw(_c)}},$o: function(){var self;self=this;return (self == true ? 'true' : 'false')},$i: function(){var self;self=this;return (self == true ? 'true' : 'false')}}});$a = a$d({a$j: [],a$e: $p,a$c: "ArgumentError"}); $b.a$e = $k;
|
633
|
+
var a$k = [$i,$k,$b,$e,$l,$m,$n,$o,$f,$p,$q,$g,$d,$r,$s,$t,$u,$c,$v,$h,$w,$x,$y,$j,$z,$A,$B,$a];
|
634
|
+
a$l(a$k);
|
635
|
+
function main() { return $A.$b1.apply($A, arguments); }
|