michael@0: // Binary: cache/js-dbg-32-30b481fd82f5-linux michael@0: // Flags: -j michael@0: // michael@0: var Native = function(k) { michael@0: var f = k.initialize; michael@0: var d = f; michael@0: var j = function(n, l, o, m) { michael@0: n.prototype[l] = o; michael@0: }; michael@0: d.alias = function(n, l, o) { michael@0: n = this.prototype[n] michael@0: return j(this, l, n, o); michael@0: }; michael@0: d.implement = function(m, l, o) { michael@0: for (var n in m) { michael@0: j(this, n, m[n], l); michael@0: } michael@0: } michael@0: return d; michael@0: }; michael@0: (function() { michael@0: var a = { michael@0: Array: Array, michael@0: Function: Function, michael@0: }; michael@0: for (var h in a) { michael@0: new Native({ michael@0: initialize: a[h], michael@0: }); michael@0: } michael@0: } ()); michael@0: Array.alias("forEach", "each"); michael@0: function $merge() { michael@0: var a = Array.slice(arguments); michael@0: a.unshift({}); michael@0: return $mixin.apply(null, a); michael@0: } michael@0: function $mixin(e) { michael@0: for (var d = 1, a = arguments.length; d < a; d++) { michael@0: var b = arguments[d]; michael@0: for (var c in b) { michael@0: var g = b[c], michael@0: f = e[c]; michael@0: e[c] = f && $type(g) == "object" && $type(f) == "object" ? $mixin(f, g) : $unlink(g); michael@0: } michael@0: } michael@0: } michael@0: function $type(a) { michael@0: if (a == undefined) { michael@0: return false; michael@0: } michael@0: if (a.$family) { michael@0: } michael@0: return typeof a; michael@0: } michael@0: function $unlink(c) { michael@0: if ($type(c) == "object") { michael@0: b = {}; michael@0: } michael@0: return b; michael@0: } michael@0: var Window = new Native({ michael@0: initialize: function(a) {}, michael@0: }); michael@0: Array.implement({ michael@0: extend: function(c) { michael@0: return this; michael@0: } michael@0: }); michael@0: Function.implement({ michael@0: extend: function(a) { michael@0: for (var b in a) { michael@0: this[b] = a[b]; michael@0: } michael@0: return this; michael@0: }, michael@0: run: function(a, b) { michael@0: return this.apply(b, a); michael@0: } michael@0: }); michael@0: function Class(b) { michael@0: var a = function() { michael@0: Object.reset(this); michael@0: var c = this.initialize ? this.initialize.apply(this, arguments) : this; michael@0: }.extend(this); michael@0: a.implement(b); michael@0: return a; michael@0: } michael@0: Object.reset = function(a, c) { michael@0: if (c == null) { michael@0: for (var e in a) { michael@0: Object.reset(a, e); michael@0: } michael@0: } michael@0: switch ($type(a[c])) { michael@0: case "object": michael@0: var d = function() {}; michael@0: d.prototype = a[c]; michael@0: var b = new d; michael@0: a[c] = Object.reset(b); michael@0: } michael@0: return a; michael@0: }; michael@0: (new Native({initialize: Class})).extend({}); michael@0: function wrap(a, b, c) { michael@0: return function() { michael@0: var d = c.apply(this, arguments); michael@0: }.extend({}); michael@0: } michael@0: Class.implement({ michael@0: implement: function(a, d) { michael@0: if ($type(a) == "object") { michael@0: for (var e in a) { michael@0: this.implement(e, a[e]); michael@0: } michael@0: } michael@0: var f = Class.Mutators[a]; michael@0: if (f) { michael@0: d = f.call(this, d); michael@0: } michael@0: var c = this.prototype; michael@0: switch ($type(d)) { michael@0: case "function": michael@0: c[a] = wrap(this, a, d); michael@0: break; michael@0: case "object": michael@0: var b = c[a]; michael@0: if ($type(b) == "object") { michael@0: $mixin(b, d); michael@0: } else { michael@0: c[a] = $unlink(d); michael@0: } michael@0: } michael@0: } michael@0: }); michael@0: Class.Mutators = { michael@0: Extends: function(a) { michael@0: this.prototype = new a; michael@0: }, michael@0: Implements: function(a) { michael@0: a.each(function(b) { michael@0: b = new b; michael@0: this.implement(b); michael@0: }, michael@0: this); michael@0: } michael@0: }; michael@0: var Events = new Class({}); michael@0: var Options = new Class({ michael@0: setOptions: function() { michael@0: this.options = $merge.run([this.options].extend(arguments)); michael@0: } michael@0: }); michael@0: var Autocompleter = {}; michael@0: Autocompleter.Base = new Class({ michael@0: Implements: [Options, Events], michael@0: options: {}, michael@0: }); michael@0: Autocompleter.Ajax = {}; michael@0: Autocompleter.Ajax.Base = new Class({ michael@0: Extends: Autocompleter.Base, michael@0: options: { michael@0: postVar: "value", michael@0: onRequest: function(){}, michael@0: } michael@0: }); michael@0: Autocompleter.Ajax.Json = new Class({ michael@0: Extends: Autocompleter.Ajax.Base, michael@0: }); michael@0: Autocompleter.JsonP = new Class({ michael@0: Extends: Autocompleter.Ajax.Json, michael@0: options: { michael@0: minLength: 1 michael@0: }, michael@0: initialize: function(el, url, options) { michael@0: this.setOptions({}); michael@0: } michael@0: }); michael@0: new Autocompleter.JsonP();