gnip_api 1.2.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +24 -3
  3. data/README.md +70 -33
  4. data/Rakefile +7 -0
  5. data/doc/rdoc/classes/Gnip/Activity.html +354 -0
  6. data/doc/rdoc/classes/Gnip/Actor.html +300 -0
  7. data/doc/rdoc/classes/Gnip/GnipData.html +154 -0
  8. data/doc/rdoc/classes/Gnip/Message.html +236 -0
  9. data/doc/rdoc/classes/Gnip/SystemMessage.html +190 -0
  10. data/doc/rdoc/classes/Gnip/TwitterComplianceMessage.html +194 -0
  11. data/doc/rdoc/classes/Gnip/UndefinedMessage.html +83 -0
  12. data/doc/rdoc/classes/Gnip/Url.html +194 -0
  13. data/doc/rdoc/classes/Gnip.html +95 -0
  14. data/doc/rdoc/classes/GnipApi/Adapter.html +287 -0
  15. data/doc/rdoc/classes/GnipApi/Configuration.html +194 -0
  16. data/doc/rdoc/classes/GnipApi/Endpoints.html +191 -0
  17. data/doc/rdoc/classes/GnipApi/Errors/Adapter/GnipSoftwareError.html +83 -0
  18. data/doc/rdoc/classes/GnipApi/Errors/Adapter/RateLimitError.html +83 -0
  19. data/doc/rdoc/classes/GnipApi/Errors/Adapter/RequestError.html +56 -0
  20. data/doc/rdoc/classes/GnipApi/Errors/Adapter.html +66 -0
  21. data/doc/rdoc/classes/GnipApi/Errors/Configuration/InvalidOutputFormat.html +83 -0
  22. data/doc/rdoc/classes/GnipApi/Errors/Configuration.html +58 -0
  23. data/doc/rdoc/classes/GnipApi/Errors/JsonParser/ParseError.html +56 -0
  24. data/doc/rdoc/classes/GnipApi/Errors/JsonParser.html +64 -0
  25. data/doc/rdoc/classes/GnipApi/Errors/MissingAdapter.html +83 -0
  26. data/doc/rdoc/classes/GnipApi/Errors/MissingCredentials.html +83 -0
  27. data/doc/rdoc/classes/GnipApi/Errors/PowerTrack/MissingRules.html +83 -0
  28. data/doc/rdoc/classes/GnipApi/Errors/PowerTrack/StreamDown.html +56 -0
  29. data/doc/rdoc/classes/GnipApi/Errors/PowerTrack.html +65 -0
  30. data/doc/rdoc/classes/GnipApi/Errors/Search/MissingParameters.html +83 -0
  31. data/doc/rdoc/classes/GnipApi/Errors/Search.html +64 -0
  32. data/doc/rdoc/classes/GnipApi/Errors.html +79 -0
  33. data/doc/rdoc/classes/GnipApi/JsonParser.html +101 -0
  34. data/doc/rdoc/classes/GnipApi/PowerTrack/Buffer.html +237 -0
  35. data/doc/rdoc/classes/GnipApi/PowerTrack/Rule.html +196 -0
  36. data/doc/rdoc/classes/GnipApi/PowerTrack/Rules.html +188 -0
  37. data/doc/rdoc/classes/GnipApi/PowerTrack/Stream.html +359 -0
  38. data/doc/rdoc/classes/GnipApi/PowerTrack.html +73 -0
  39. data/doc/rdoc/classes/GnipApi/Request.html +216 -0
  40. data/doc/rdoc/classes/GnipApi/Response.html +232 -0
  41. data/doc/rdoc/classes/GnipApi/Search.html +101 -0
  42. data/doc/rdoc/classes/GnipApi.html +252 -0
  43. data/doc/rdoc/created.rid +24 -0
  44. data/doc/rdoc/css/style.css +343 -0
  45. data/doc/rdoc/files/LICENSE_txt.html +73 -0
  46. data/doc/rdoc/files/README_md.html +299 -0
  47. data/doc/rdoc/files/lib/gnip_api/adapter_rb.html +51 -0
  48. data/doc/rdoc/files/lib/gnip_api/configuration_rb.html +51 -0
  49. data/doc/rdoc/files/lib/gnip_api/endpoints_rb.html +51 -0
  50. data/doc/rdoc/files/lib/gnip_api/errors_rb.html +51 -0
  51. data/doc/rdoc/files/lib/gnip_api/gnip/activity_rb.html +51 -0
  52. data/doc/rdoc/files/lib/gnip_api/gnip/actor_rb.html +51 -0
  53. data/doc/rdoc/files/lib/gnip_api/gnip/gnip_data_rb.html +51 -0
  54. data/doc/rdoc/files/lib/gnip_api/gnip/message_rb.html +51 -0
  55. data/doc/rdoc/files/lib/gnip_api/gnip/system_message_rb.html +51 -0
  56. data/doc/rdoc/files/lib/gnip_api/gnip/twitter_compliance_message_rb.html +51 -0
  57. data/doc/rdoc/files/lib/gnip_api/gnip/url_rb.html +51 -0
  58. data/doc/rdoc/files/lib/gnip_api/json_parser_rb.html +51 -0
  59. data/doc/rdoc/files/lib/gnip_api/power_track/buffer_rb.html +51 -0
  60. data/doc/rdoc/files/lib/gnip_api/power_track/rule_rb.html +51 -0
  61. data/doc/rdoc/files/lib/gnip_api/power_track/rules_rb.html +55 -0
  62. data/doc/rdoc/files/lib/gnip_api/power_track/stream_rb.html +51 -0
  63. data/doc/rdoc/files/lib/gnip_api/request_rb.html +51 -0
  64. data/doc/rdoc/files/lib/gnip_api/response_rb.html +51 -0
  65. data/doc/rdoc/files/lib/gnip_api/search_rb.html +55 -0
  66. data/doc/rdoc/files/lib/gnip_api/version_rb.html +51 -0
  67. data/doc/rdoc/files/lib/gnip_api_rb.html +84 -0
  68. data/doc/rdoc/fr_class_index.html +92 -0
  69. data/doc/rdoc/fr_file_index.html +41 -0
  70. data/doc/rdoc/fr_method_index.html +4791 -0
  71. data/doc/rdoc/index.html +15 -0
  72. data/gnip_api.gemspec +3 -1
  73. data/lib/gnip_api/configuration.rb +18 -4
  74. data/lib/gnip_api/errors.rb +0 -1
  75. data/lib/gnip_api/power_track/buffer.rb +60 -14
  76. data/lib/gnip_api/power_track/stream.rb +52 -17
  77. data/lib/gnip_api/response.rb +3 -2
  78. data/lib/gnip_api/version.rb +1 -1
  79. data/spec/gnip_api/power_track/buffer_spec.rb +8 -0
  80. data/spec/gnip_api/response_spec.rb +16 -0
  81. data/spec/spec_helper.rb +1 -0
  82. metadata +97 -2
@@ -0,0 +1,4791 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
+ <html lang='en'>
3
+ <head>
4
+ <title></title>
5
+ <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'>
6
+ <link href='css/style.css' media='screen' rel='stylesheet' type='text/css'>
7
+ <base target='docwin'>
8
+ </head>
9
+ <body class='list'>
10
+ <div id='index'><h1>Method Index</h1>
11
+ <script type='text/javascript'>
12
+ /* Prototype JavaScript framework, version 1.6.0.3
13
+ * (c) 2005-2008 Sam Stephenson
14
+ *
15
+ * Prototype is freely distributable under the terms of an MIT-style license.
16
+ * For details, see the Prototype web site: http://www.prototypejs.org/
17
+ *
18
+ *--------------------------------------------------------------------------*/
19
+
20
+ var Prototype = {
21
+ Version: '1.6.0.3',
22
+
23
+ Browser: {
24
+ IE: !!(window.attachEvent &&
25
+ navigator.userAgent.indexOf('Opera') === -1),
26
+ Opera: navigator.userAgent.indexOf('Opera') > -1,
27
+ WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1,
28
+ Gecko: navigator.userAgent.indexOf('Gecko') > -1 &&
29
+ navigator.userAgent.indexOf('KHTML') === -1,
30
+ MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/)
31
+ },
32
+
33
+ BrowserFeatures: {
34
+ XPath: !!document.evaluate,
35
+ SelectorsAPI: !!document.querySelector,
36
+ ElementExtensions: !!window.HTMLElement,
37
+ SpecificElementExtensions:
38
+ document.createElement('div')['__proto__'] &&
39
+ document.createElement('div')['__proto__'] !==
40
+ document.createElement('form')['__proto__']
41
+ },
42
+
43
+ ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>',
44
+ JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/,
45
+
46
+ emptyFunction: function() { },
47
+ K: function(x) { return x }
48
+ };
49
+
50
+ if (Prototype.Browser.MobileSafari)
51
+ Prototype.BrowserFeatures.SpecificElementExtensions = false;
52
+
53
+
54
+ /* Based on Alex Arnell's inheritance implementation. */
55
+ var Class = {
56
+ create: function() {
57
+ var parent = null, properties = $A(arguments);
58
+ if (Object.isFunction(properties[0]))
59
+ parent = properties.shift();
60
+
61
+ function klass() {
62
+ this.initialize.apply(this, arguments);
63
+ }
64
+
65
+ Object.extend(klass, Class.Methods);
66
+ klass.superclass = parent;
67
+ klass.subclasses = [];
68
+
69
+ if (parent) {
70
+ var subclass = function() { };
71
+ subclass.prototype = parent.prototype;
72
+ klass.prototype = new subclass;
73
+ parent.subclasses.push(klass);
74
+ }
75
+
76
+ for (var i = 0; i < properties.length; i++)
77
+ klass.addMethods(properties[i]);
78
+
79
+ if (!klass.prototype.initialize)
80
+ klass.prototype.initialize = Prototype.emptyFunction;
81
+
82
+ klass.prototype.constructor = klass;
83
+
84
+ return klass;
85
+ }
86
+ };
87
+
88
+ Class.Methods = {
89
+ addMethods: function(source) {
90
+ var ancestor = this.superclass && this.superclass.prototype;
91
+ var properties = Object.keys(source);
92
+
93
+ if (!Object.keys({ toString: true }).length)
94
+ properties.push("toString", "valueOf");
95
+
96
+ for (var i = 0, length = properties.length; i < length; i++) {
97
+ var property = properties[i], value = source[property];
98
+ if (ancestor && Object.isFunction(value) &&
99
+ value.argumentNames().first() == "$super") {
100
+ var method = value;
101
+ value = (function(m) {
102
+ return function() { return ancestor[m].apply(this, arguments) };
103
+ })(property).wrap(method);
104
+
105
+ value.valueOf = method.valueOf.bind(method);
106
+ value.toString = method.toString.bind(method);
107
+ }
108
+ this.prototype[property] = value;
109
+ }
110
+
111
+ return this;
112
+ }
113
+ };
114
+
115
+ var Abstract = { };
116
+
117
+ Object.extend = function(destination, source) {
118
+ for (var property in source)
119
+ destination[property] = source[property];
120
+ return destination;
121
+ };
122
+
123
+ Object.extend(Object, {
124
+ inspect: function(object) {
125
+ try {
126
+ if (Object.isUndefined(object)) return 'undefined';
127
+ if (object === null) return 'null';
128
+ return object.inspect ? object.inspect() : String(object);
129
+ } catch (e) {
130
+ if (e instanceof RangeError) return '...';
131
+ throw e;
132
+ }
133
+ },
134
+
135
+ toJSON: function(object) {
136
+ var type = typeof object;
137
+ switch (type) {
138
+ case 'undefined':
139
+ case 'function':
140
+ case 'unknown': return;
141
+ case 'boolean': return object.toString();
142
+ }
143
+
144
+ if (object === null) return 'null';
145
+ if (object.toJSON) return object.toJSON();
146
+ if (Object.isElement(object)) return;
147
+
148
+ var results = [];
149
+ for (var property in object) {
150
+ var value = Object.toJSON(object[property]);
151
+ if (!Object.isUndefined(value))
152
+ results.push(property.toJSON() + ': ' + value);
153
+ }
154
+
155
+ return '{' + results.join(', ') + '}';
156
+ },
157
+
158
+ toQueryString: function(object) {
159
+ return $H(object).toQueryString();
160
+ },
161
+
162
+ toHTML: function(object) {
163
+ return object && object.toHTML ? object.toHTML() : String.interpret(object);
164
+ },
165
+
166
+ keys: function(object) {
167
+ var keys = [];
168
+ for (var property in object)
169
+ keys.push(property);
170
+ return keys;
171
+ },
172
+
173
+ values: function(object) {
174
+ var values = [];
175
+ for (var property in object)
176
+ values.push(object[property]);
177
+ return values;
178
+ },
179
+
180
+ clone: function(object) {
181
+ return Object.extend({ }, object);
182
+ },
183
+
184
+ isElement: function(object) {
185
+ return !!(object && object.nodeType == 1);
186
+ },
187
+
188
+ isArray: function(object) {
189
+ return object != null && typeof object == "object" &&
190
+ 'splice' in object && 'join' in object;
191
+ },
192
+
193
+ isHash: function(object) {
194
+ return object instanceof Hash;
195
+ },
196
+
197
+ isFunction: function(object) {
198
+ return typeof object == "function";
199
+ },
200
+
201
+ isString: function(object) {
202
+ return typeof object == "string";
203
+ },
204
+
205
+ isNumber: function(object) {
206
+ return typeof object == "number";
207
+ },
208
+
209
+ isUndefined: function(object) {
210
+ return typeof object == "undefined";
211
+ }
212
+ });
213
+
214
+ Object.extend(Function.prototype, {
215
+ argumentNames: function() {
216
+ var names = this.toString().match(/^[\s\(]*function[^(]*\(([^\)]*)\)/)[1]
217
+ .replace(/\s+/g, '').split(',');
218
+ return names.length == 1 && !names[0] ? [] : names;
219
+ },
220
+
221
+ bind: function() {
222
+ if (arguments.length < 2 && Object.isUndefined(arguments[0])) return this;
223
+ var __method = this, args = $A(arguments), object = args.shift();
224
+ return function() {
225
+ return __method.apply(object, args.concat($A(arguments)));
226
+ }
227
+ },
228
+
229
+ bindAsEventListener: function() {
230
+ var __method = this, args = $A(arguments), object = args.shift();
231
+ return function(event) {
232
+ return __method.apply(object, [event || window.event].concat(args));
233
+ }
234
+ },
235
+
236
+ curry: function() {
237
+ if (!arguments.length) return this;
238
+ var __method = this, args = $A(arguments);
239
+ return function() {
240
+ return __method.apply(this, args.concat($A(arguments)));
241
+ }
242
+ },
243
+
244
+ delay: function() {
245
+ var __method = this, args = $A(arguments), timeout = args.shift() * 1000;
246
+ return window.setTimeout(function() {
247
+ return __method.apply(__method, args);
248
+ }, timeout);
249
+ },
250
+
251
+ defer: function() {
252
+ var args = [0.01].concat($A(arguments));
253
+ return this.delay.apply(this, args);
254
+ },
255
+
256
+ wrap: function(wrapper) {
257
+ var __method = this;
258
+ return function() {
259
+ return wrapper.apply(this, [__method.bind(this)].concat($A(arguments)));
260
+ }
261
+ },
262
+
263
+ methodize: function() {
264
+ if (this._methodized) return this._methodized;
265
+ var __method = this;
266
+ return this._methodized = function() {
267
+ return __method.apply(null, [this].concat($A(arguments)));
268
+ };
269
+ }
270
+ });
271
+
272
+ Date.prototype.toJSON = function() {
273
+ return '"' + this.getUTCFullYear() + '-' +
274
+ (this.getUTCMonth() + 1).toPaddedString(2) + '-' +
275
+ this.getUTCDate().toPaddedString(2) + 'T' +
276
+ this.getUTCHours().toPaddedString(2) + ':' +
277
+ this.getUTCMinutes().toPaddedString(2) + ':' +
278
+ this.getUTCSeconds().toPaddedString(2) + 'Z"';
279
+ };
280
+
281
+ var Try = {
282
+ these: function() {
283
+ var returnValue;
284
+
285
+ for (var i = 0, length = arguments.length; i < length; i++) {
286
+ var lambda = arguments[i];
287
+ try {
288
+ returnValue = lambda();
289
+ break;
290
+ } catch (e) { }
291
+ }
292
+
293
+ return returnValue;
294
+ }
295
+ };
296
+
297
+ RegExp.prototype.match = RegExp.prototype.test;
298
+
299
+ RegExp.escape = function(str) {
300
+ return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
301
+ };
302
+
303
+ /*--------------------------------------------------------------------------*/
304
+
305
+ var PeriodicalExecuter = Class.create({
306
+ initialize: function(callback, frequency) {
307
+ this.callback = callback;
308
+ this.frequency = frequency;
309
+ this.currentlyExecuting = false;
310
+
311
+ this.registerCallback();
312
+ },
313
+
314
+ registerCallback: function() {
315
+ this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
316
+ },
317
+
318
+ execute: function() {
319
+ this.callback(this);
320
+ },
321
+
322
+ stop: function() {
323
+ if (!this.timer) return;
324
+ clearInterval(this.timer);
325
+ this.timer = null;
326
+ },
327
+
328
+ onTimerEvent: function() {
329
+ if (!this.currentlyExecuting) {
330
+ try {
331
+ this.currentlyExecuting = true;
332
+ this.execute();
333
+ } finally {
334
+ this.currentlyExecuting = false;
335
+ }
336
+ }
337
+ }
338
+ });
339
+ Object.extend(String, {
340
+ interpret: function(value) {
341
+ return value == null ? '' : String(value);
342
+ },
343
+ specialChar: {
344
+ '\b': '\\b',
345
+ '\t': '\\t',
346
+ '\n': '\\n',
347
+ '\f': '\\f',
348
+ '\r': '\\r',
349
+ '\\': '\\\\'
350
+ }
351
+ });
352
+
353
+ Object.extend(String.prototype, {
354
+ gsub: function(pattern, replacement) {
355
+ var result = '', source = this, match;
356
+ replacement = arguments.callee.prepareReplacement(replacement);
357
+
358
+ while (source.length > 0) {
359
+ if (match = source.match(pattern)) {
360
+ result += source.slice(0, match.index);
361
+ result += String.interpret(replacement(match));
362
+ source = source.slice(match.index + match[0].length);
363
+ } else {
364
+ result += source, source = '';
365
+ }
366
+ }
367
+ return result;
368
+ },
369
+
370
+ sub: function(pattern, replacement, count) {
371
+ replacement = this.gsub.prepareReplacement(replacement);
372
+ count = Object.isUndefined(count) ? 1 : count;
373
+
374
+ return this.gsub(pattern, function(match) {
375
+ if (--count < 0) return match[0];
376
+ return replacement(match);
377
+ });
378
+ },
379
+
380
+ scan: function(pattern, iterator) {
381
+ this.gsub(pattern, iterator);
382
+ return String(this);
383
+ },
384
+
385
+ truncate: function(length, truncation) {
386
+ length = length || 30;
387
+ truncation = Object.isUndefined(truncation) ? '...' : truncation;
388
+ return this.length > length ?
389
+ this.slice(0, length - truncation.length) + truncation : String(this);
390
+ },
391
+
392
+ strip: function() {
393
+ return this.replace(/^\s+/, '').replace(/\s+$/, '');
394
+ },
395
+
396
+ stripTags: function() {
397
+ return this.replace(/<\/?[^>]+>/gi, '');
398
+ },
399
+
400
+ stripScripts: function() {
401
+ return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
402
+ },
403
+
404
+ extractScripts: function() {
405
+ var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
406
+ var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
407
+ return (this.match(matchAll) || []).map(function(scriptTag) {
408
+ return (scriptTag.match(matchOne) || ['', ''])[1];
409
+ });
410
+ },
411
+
412
+ evalScripts: function() {
413
+ return this.extractScripts().map(function(script) { return eval(script) });
414
+ },
415
+
416
+ escapeHTML: function() {
417
+ var self = arguments.callee;
418
+ self.text.data = this;
419
+ return self.div.innerHTML;
420
+ },
421
+
422
+ unescapeHTML: function() {
423
+ var div = new Element('div');
424
+ div.innerHTML = this.stripTags();
425
+ return div.childNodes[0] ? (div.childNodes.length > 1 ?
426
+ $A(div.childNodes).inject('', function(memo, node) { return memo+node.nodeValue }) :
427
+ div.childNodes[0].nodeValue) : '';
428
+ },
429
+
430
+ toQueryParams: function(separator) {
431
+ var match = this.strip().match(/([^?#]*)(#.*)?$/);
432
+ if (!match) return { };
433
+
434
+ return match[1].split(separator || '&').inject({ }, function(hash, pair) {
435
+ if ((pair = pair.split('='))[0]) {
436
+ var key = decodeURIComponent(pair.shift());
437
+ var value = pair.length > 1 ? pair.join('=') : pair[0];
438
+ if (value != undefined) value = decodeURIComponent(value);
439
+
440
+ if (key in hash) {
441
+ if (!Object.isArray(hash[key])) hash[key] = [hash[key]];
442
+ hash[key].push(value);
443
+ }
444
+ else hash[key] = value;
445
+ }
446
+ return hash;
447
+ });
448
+ },
449
+
450
+ toArray: function() {
451
+ return this.split('');
452
+ },
453
+
454
+ succ: function() {
455
+ return this.slice(0, this.length - 1) +
456
+ String.fromCharCode(this.charCodeAt(this.length - 1) + 1);
457
+ },
458
+
459
+ times: function(count) {
460
+ return count < 1 ? '' : new Array(count + 1).join(this);
461
+ },
462
+
463
+ camelize: function() {
464
+ var parts = this.split('-'), len = parts.length;
465
+ if (len == 1) return parts[0];
466
+
467
+ var camelized = this.charAt(0) == '-'
468
+ ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)
469
+ : parts[0];
470
+
471
+ for (var i = 1; i < len; i++)
472
+ camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1);
473
+
474
+ return camelized;
475
+ },
476
+
477
+ capitalize: function() {
478
+ return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();
479
+ },
480
+
481
+ underscore: function() {
482
+ return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase();
483
+ },
484
+
485
+ dasherize: function() {
486
+ return this.gsub(/_/,'-');
487
+ },
488
+
489
+ inspect: function(useDoubleQuotes) {
490
+ var escapedString = this.gsub(/[\x00-\x1f\\]/, function(match) {
491
+ var character = String.specialChar[match[0]];
492
+ return character ? character : '\\u00' + match[0].charCodeAt().toPaddedString(2, 16);
493
+ });
494
+ if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"';
495
+ return "'" + escapedString.replace(/'/g, '\\\'') + "'";
496
+ },
497
+
498
+ toJSON: function() {
499
+ return this.inspect(true);
500
+ },
501
+
502
+ unfilterJSON: function(filter) {
503
+ return this.sub(filter || Prototype.JSONFilter, '#{1}');
504
+ },
505
+
506
+ isJSON: function() {
507
+ var str = this;
508
+ if (str.blank()) return false;
509
+ str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, '');
510
+ return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);
511
+ },
512
+
513
+ evalJSON: function(sanitize) {
514
+ var json = this.unfilterJSON();
515
+ try {
516
+ if (!sanitize || json.isJSON()) return eval('(' + json + ')');
517
+ } catch (e) { }
518
+ throw new SyntaxError('Badly formed JSON string: ' + this.inspect());
519
+ },
520
+
521
+ include: function(pattern) {
522
+ return this.indexOf(pattern) > -1;
523
+ },
524
+
525
+ startsWith: function(pattern) {
526
+ return this.indexOf(pattern) === 0;
527
+ },
528
+
529
+ endsWith: function(pattern) {
530
+ var d = this.length - pattern.length;
531
+ return d >= 0 && this.lastIndexOf(pattern) === d;
532
+ },
533
+
534
+ empty: function() {
535
+ return this == '';
536
+ },
537
+
538
+ blank: function() {
539
+ return /^\s*$/.test(this);
540
+ },
541
+
542
+ interpolate: function(object, pattern) {
543
+ return new Template(this, pattern).evaluate(object);
544
+ }
545
+ });
546
+
547
+ if (Prototype.Browser.WebKit || Prototype.Browser.IE) Object.extend(String.prototype, {
548
+ escapeHTML: function() {
549
+ return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
550
+ },
551
+ unescapeHTML: function() {
552
+ return this.stripTags().replace(/&amp;/g,'&').replace(/&lt;/g,'<').replace(/&gt;/g,'>');
553
+ }
554
+ });
555
+
556
+ String.prototype.gsub.prepareReplacement = function(replacement) {
557
+ if (Object.isFunction(replacement)) return replacement;
558
+ var template = new Template(replacement);
559
+ return function(match) { return template.evaluate(match) };
560
+ };
561
+
562
+ String.prototype.parseQuery = String.prototype.toQueryParams;
563
+
564
+ Object.extend(String.prototype.escapeHTML, {
565
+ div: document.createElement('div'),
566
+ text: document.createTextNode('')
567
+ });
568
+
569
+ String.prototype.escapeHTML.div.appendChild(String.prototype.escapeHTML.text);
570
+
571
+ var Template = Class.create({
572
+ initialize: function(template, pattern) {
573
+ this.template = template.toString();
574
+ this.pattern = pattern || Template.Pattern;
575
+ },
576
+
577
+ evaluate: function(object) {
578
+ if (Object.isFunction(object.toTemplateReplacements))
579
+ object = object.toTemplateReplacements();
580
+
581
+ return this.template.gsub(this.pattern, function(match) {
582
+ if (object == null) return '';
583
+
584
+ var before = match[1] || '';
585
+ if (before == '\\') return match[2];
586
+
587
+ var ctx = object, expr = match[3];
588
+ var pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;
589
+ match = pattern.exec(expr);
590
+ if (match == null) return before;
591
+
592
+ while (match != null) {
593
+ var comp = match[1].startsWith('[') ? match[2].gsub('\\\\]', ']') : match[1];
594
+ ctx = ctx[comp];
595
+ if (null == ctx || '' == match[3]) break;
596
+ expr = expr.substring('[' == match[3] ? match[1].length : match[0].length);
597
+ match = pattern.exec(expr);
598
+ }
599
+
600
+ return before + String.interpret(ctx);
601
+ });
602
+ }
603
+ });
604
+ Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/;
605
+
606
+ var $break = { };
607
+
608
+ var Enumerable = {
609
+ each: function(iterator, context) {
610
+ var index = 0;
611
+ try {
612
+ this._each(function(value) {
613
+ iterator.call(context, value, index++);
614
+ });
615
+ } catch (e) {
616
+ if (e != $break) throw e;
617
+ }
618
+ return this;
619
+ },
620
+
621
+ eachSlice: function(number, iterator, context) {
622
+ var index = -number, slices = [], array = this.toArray();
623
+ if (number < 1) return array;
624
+ while ((index += number) < array.length)
625
+ slices.push(array.slice(index, index+number));
626
+ return slices.collect(iterator, context);
627
+ },
628
+
629
+ all: function(iterator, context) {
630
+ iterator = iterator || Prototype.K;
631
+ var result = true;
632
+ this.each(function(value, index) {
633
+ result = result && !!iterator.call(context, value, index);
634
+ if (!result) throw $break;
635
+ });
636
+ return result;
637
+ },
638
+
639
+ any: function(iterator, context) {
640
+ iterator = iterator || Prototype.K;
641
+ var result = false;
642
+ this.each(function(value, index) {
643
+ if (result = !!iterator.call(context, value, index))
644
+ throw $break;
645
+ });
646
+ return result;
647
+ },
648
+
649
+ collect: function(iterator, context) {
650
+ iterator = iterator || Prototype.K;
651
+ var results = [];
652
+ this.each(function(value, index) {
653
+ results.push(iterator.call(context, value, index));
654
+ });
655
+ return results;
656
+ },
657
+
658
+ detect: function(iterator, context) {
659
+ var result;
660
+ this.each(function(value, index) {
661
+ if (iterator.call(context, value, index)) {
662
+ result = value;
663
+ throw $break;
664
+ }
665
+ });
666
+ return result;
667
+ },
668
+
669
+ findAll: function(iterator, context) {
670
+ var results = [];
671
+ this.each(function(value, index) {
672
+ if (iterator.call(context, value, index))
673
+ results.push(value);
674
+ });
675
+ return results;
676
+ },
677
+
678
+ grep: function(filter, iterator, context) {
679
+ iterator = iterator || Prototype.K;
680
+ var results = [];
681
+
682
+ if (Object.isString(filter))
683
+ filter = new RegExp(filter);
684
+
685
+ this.each(function(value, index) {
686
+ if (filter.match(value))
687
+ results.push(iterator.call(context, value, index));
688
+ });
689
+ return results;
690
+ },
691
+
692
+ include: function(object) {
693
+ if (Object.isFunction(this.indexOf))
694
+ if (this.indexOf(object) != -1) return true;
695
+
696
+ var found = false;
697
+ this.each(function(value) {
698
+ if (value == object) {
699
+ found = true;
700
+ throw $break;
701
+ }
702
+ });
703
+ return found;
704
+ },
705
+
706
+ inGroupsOf: function(number, fillWith) {
707
+ fillWith = Object.isUndefined(fillWith) ? null : fillWith;
708
+ return this.eachSlice(number, function(slice) {
709
+ while(slice.length < number) slice.push(fillWith);
710
+ return slice;
711
+ });
712
+ },
713
+
714
+ inject: function(memo, iterator, context) {
715
+ this.each(function(value, index) {
716
+ memo = iterator.call(context, memo, value, index);
717
+ });
718
+ return memo;
719
+ },
720
+
721
+ invoke: function(method) {
722
+ var args = $A(arguments).slice(1);
723
+ return this.map(function(value) {
724
+ return value[method].apply(value, args);
725
+ });
726
+ },
727
+
728
+ max: function(iterator, context) {
729
+ iterator = iterator || Prototype.K;
730
+ var result;
731
+ this.each(function(value, index) {
732
+ value = iterator.call(context, value, index);
733
+ if (result == null || value >= result)
734
+ result = value;
735
+ });
736
+ return result;
737
+ },
738
+
739
+ min: function(iterator, context) {
740
+ iterator = iterator || Prototype.K;
741
+ var result;
742
+ this.each(function(value, index) {
743
+ value = iterator.call(context, value, index);
744
+ if (result == null || value < result)
745
+ result = value;
746
+ });
747
+ return result;
748
+ },
749
+
750
+ partition: function(iterator, context) {
751
+ iterator = iterator || Prototype.K;
752
+ var trues = [], falses = [];
753
+ this.each(function(value, index) {
754
+ (iterator.call(context, value, index) ?
755
+ trues : falses).push(value);
756
+ });
757
+ return [trues, falses];
758
+ },
759
+
760
+ pluck: function(property) {
761
+ var results = [];
762
+ this.each(function(value) {
763
+ results.push(value[property]);
764
+ });
765
+ return results;
766
+ },
767
+
768
+ reject: function(iterator, context) {
769
+ var results = [];
770
+ this.each(function(value, index) {
771
+ if (!iterator.call(context, value, index))
772
+ results.push(value);
773
+ });
774
+ return results;
775
+ },
776
+
777
+ sortBy: function(iterator, context) {
778
+ return this.map(function(value, index) {
779
+ return {
780
+ value: value,
781
+ criteria: iterator.call(context, value, index)
782
+ };
783
+ }).sort(function(left, right) {
784
+ var a = left.criteria, b = right.criteria;
785
+ return a < b ? -1 : a > b ? 1 : 0;
786
+ }).pluck('value');
787
+ },
788
+
789
+ toArray: function() {
790
+ return this.map();
791
+ },
792
+
793
+ zip: function() {
794
+ var iterator = Prototype.K, args = $A(arguments);
795
+ if (Object.isFunction(args.last()))
796
+ iterator = args.pop();
797
+
798
+ var collections = [this].concat(args).map($A);
799
+ return this.map(function(value, index) {
800
+ return iterator(collections.pluck(index));
801
+ });
802
+ },
803
+
804
+ size: function() {
805
+ return this.toArray().length;
806
+ },
807
+
808
+ inspect: function() {
809
+ return '#<Enumerable:' + this.toArray().inspect() + '>';
810
+ }
811
+ };
812
+
813
+ Object.extend(Enumerable, {
814
+ map: Enumerable.collect,
815
+ find: Enumerable.detect,
816
+ select: Enumerable.findAll,
817
+ filter: Enumerable.findAll,
818
+ member: Enumerable.include,
819
+ entries: Enumerable.toArray,
820
+ every: Enumerable.all,
821
+ some: Enumerable.any
822
+ });
823
+ function $A(iterable) {
824
+ if (!iterable) return [];
825
+ if (iterable.toArray) return iterable.toArray();
826
+ var length = iterable.length || 0, results = new Array(length);
827
+ while (length--) results[length] = iterable[length];
828
+ return results;
829
+ }
830
+
831
+ if (Prototype.Browser.WebKit) {
832
+ $A = function(iterable) {
833
+ if (!iterable) return [];
834
+ // In Safari, only use the `toArray` method if it's not a NodeList.
835
+ // A NodeList is a function, has an function `item` property, and a numeric
836
+ // `length` property. Adapted from Google Doctype.
837
+ if (!(typeof iterable === 'function' && typeof iterable.length ===
838
+ 'number' && typeof iterable.item === 'function') && iterable.toArray)
839
+ return iterable.toArray();
840
+ var length = iterable.length || 0, results = new Array(length);
841
+ while (length--) results[length] = iterable[length];
842
+ return results;
843
+ };
844
+ }
845
+
846
+ Array.from = $A;
847
+
848
+ Object.extend(Array.prototype, Enumerable);
849
+
850
+ if (!Array.prototype._reverse) Array.prototype._reverse = Array.prototype.reverse;
851
+
852
+ Object.extend(Array.prototype, {
853
+ _each: function(iterator) {
854
+ for (var i = 0, length = this.length; i < length; i++)
855
+ iterator(this[i]);
856
+ },
857
+
858
+ clear: function() {
859
+ this.length = 0;
860
+ return this;
861
+ },
862
+
863
+ first: function() {
864
+ return this[0];
865
+ },
866
+
867
+ last: function() {
868
+ return this[this.length - 1];
869
+ },
870
+
871
+ compact: function() {
872
+ return this.select(function(value) {
873
+ return value != null;
874
+ });
875
+ },
876
+
877
+ flatten: function() {
878
+ return this.inject([], function(array, value) {
879
+ return array.concat(Object.isArray(value) ?
880
+ value.flatten() : [value]);
881
+ });
882
+ },
883
+
884
+ without: function() {
885
+ var values = $A(arguments);
886
+ return this.select(function(value) {
887
+ return !values.include(value);
888
+ });
889
+ },
890
+
891
+ reverse: function(inline) {
892
+ return (inline !== false ? this : this.toArray())._reverse();
893
+ },
894
+
895
+ reduce: function() {
896
+ return this.length > 1 ? this : this[0];
897
+ },
898
+
899
+ uniq: function(sorted) {
900
+ return this.inject([], function(array, value, index) {
901
+ if (0 == index || (sorted ? array.last() != value : !array.include(value)))
902
+ array.push(value);
903
+ return array;
904
+ });
905
+ },
906
+
907
+ intersect: function(array) {
908
+ return this.uniq().findAll(function(item) {
909
+ return array.detect(function(value) { return item === value });
910
+ });
911
+ },
912
+
913
+ clone: function() {
914
+ return [].concat(this);
915
+ },
916
+
917
+ size: function() {
918
+ return this.length;
919
+ },
920
+
921
+ inspect: function() {
922
+ return '[' + this.map(Object.inspect).join(', ') + ']';
923
+ },
924
+
925
+ toJSON: function() {
926
+ var results = [];
927
+ this.each(function(object) {
928
+ var value = Object.toJSON(object);
929
+ if (!Object.isUndefined(value)) results.push(value);
930
+ });
931
+ return '[' + results.join(', ') + ']';
932
+ }
933
+ });
934
+
935
+ // use native browser JS 1.6 implementation if available
936
+ if (Object.isFunction(Array.prototype.forEach))
937
+ Array.prototype._each = Array.prototype.forEach;
938
+
939
+ if (!Array.prototype.indexOf) Array.prototype.indexOf = function(item, i) {
940
+ i || (i = 0);
941
+ var length = this.length;
942
+ if (i < 0) i = length + i;
943
+ for (; i < length; i++)
944
+ if (this[i] === item) return i;
945
+ return -1;
946
+ };
947
+
948
+ if (!Array.prototype.lastIndexOf) Array.prototype.lastIndexOf = function(item, i) {
949
+ i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1;
950
+ var n = this.slice(0, i).reverse().indexOf(item);
951
+ return (n < 0) ? n : i - n - 1;
952
+ };
953
+
954
+ Array.prototype.toArray = Array.prototype.clone;
955
+
956
+ function $w(string) {
957
+ if (!Object.isString(string)) return [];
958
+ string = string.strip();
959
+ return string ? string.split(/\s+/) : [];
960
+ }
961
+
962
+ if (Prototype.Browser.Opera){
963
+ Array.prototype.concat = function() {
964
+ var array = [];
965
+ for (var i = 0, length = this.length; i < length; i++) array.push(this[i]);
966
+ for (var i = 0, length = arguments.length; i < length; i++) {
967
+ if (Object.isArray(arguments[i])) {
968
+ for (var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++)
969
+ array.push(arguments[i][j]);
970
+ } else {
971
+ array.push(arguments[i]);
972
+ }
973
+ }
974
+ return array;
975
+ };
976
+ }
977
+ Object.extend(Number.prototype, {
978
+ toColorPart: function() {
979
+ return this.toPaddedString(2, 16);
980
+ },
981
+
982
+ succ: function() {
983
+ return this + 1;
984
+ },
985
+
986
+ times: function(iterator, context) {
987
+ $R(0, this, true).each(iterator, context);
988
+ return this;
989
+ },
990
+
991
+ toPaddedString: function(length, radix) {
992
+ var string = this.toString(radix || 10);
993
+ return '0'.times(length - string.length) + string;
994
+ },
995
+
996
+ toJSON: function() {
997
+ return isFinite(this) ? this.toString() : 'null';
998
+ }
999
+ });
1000
+
1001
+ $w('abs round ceil floor').each(function(method){
1002
+ Number.prototype[method] = Math[method].methodize();
1003
+ });
1004
+ function $H(object) {
1005
+ return new Hash(object);
1006
+ };
1007
+
1008
+ var Hash = Class.create(Enumerable, (function() {
1009
+
1010
+ function toQueryPair(key, value) {
1011
+ if (Object.isUndefined(value)) return key;
1012
+ return key + '=' + encodeURIComponent(String.interpret(value));
1013
+ }
1014
+
1015
+ return {
1016
+ initialize: function(object) {
1017
+ this._object = Object.isHash(object) ? object.toObject() : Object.clone(object);
1018
+ },
1019
+
1020
+ _each: function(iterator) {
1021
+ for (var key in this._object) {
1022
+ var value = this._object[key], pair = [key, value];
1023
+ pair.key = key;
1024
+ pair.value = value;
1025
+ iterator(pair);
1026
+ }
1027
+ },
1028
+
1029
+ set: function(key, value) {
1030
+ return this._object[key] = value;
1031
+ },
1032
+
1033
+ get: function(key) {
1034
+ // simulating poorly supported hasOwnProperty
1035
+ if (this._object[key] !== Object.prototype[key])
1036
+ return this._object[key];
1037
+ },
1038
+
1039
+ unset: function(key) {
1040
+ var value = this._object[key];
1041
+ delete this._object[key];
1042
+ return value;
1043
+ },
1044
+
1045
+ toObject: function() {
1046
+ return Object.clone(this._object);
1047
+ },
1048
+
1049
+ keys: function() {
1050
+ return this.pluck('key');
1051
+ },
1052
+
1053
+ values: function() {
1054
+ return this.pluck('value');
1055
+ },
1056
+
1057
+ index: function(value) {
1058
+ var match = this.detect(function(pair) {
1059
+ return pair.value === value;
1060
+ });
1061
+ return match && match.key;
1062
+ },
1063
+
1064
+ merge: function(object) {
1065
+ return this.clone().update(object);
1066
+ },
1067
+
1068
+ update: function(object) {
1069
+ return new Hash(object).inject(this, function(result, pair) {
1070
+ result.set(pair.key, pair.value);
1071
+ return result;
1072
+ });
1073
+ },
1074
+
1075
+ toQueryString: function() {
1076
+ return this.inject([], function(results, pair) {
1077
+ var key = encodeURIComponent(pair.key), values = pair.value;
1078
+
1079
+ if (values && typeof values == 'object') {
1080
+ if (Object.isArray(values))
1081
+ return results.concat(values.map(toQueryPair.curry(key)));
1082
+ } else results.push(toQueryPair(key, values));
1083
+ return results;
1084
+ }).join('&');
1085
+ },
1086
+
1087
+ inspect: function() {
1088
+ return '#<Hash:{' + this.map(function(pair) {
1089
+ return pair.map(Object.inspect).join(': ');
1090
+ }).join(', ') + '}>';
1091
+ },
1092
+
1093
+ toJSON: function() {
1094
+ return Object.toJSON(this.toObject());
1095
+ },
1096
+
1097
+ clone: function() {
1098
+ return new Hash(this);
1099
+ }
1100
+ }
1101
+ })());
1102
+
1103
+ Hash.prototype.toTemplateReplacements = Hash.prototype.toObject;
1104
+ Hash.from = $H;
1105
+ var ObjectRange = Class.create(Enumerable, {
1106
+ initialize: function(start, end, exclusive) {
1107
+ this.start = start;
1108
+ this.end = end;
1109
+ this.exclusive = exclusive;
1110
+ },
1111
+
1112
+ _each: function(iterator) {
1113
+ var value = this.start;
1114
+ while (this.include(value)) {
1115
+ iterator(value);
1116
+ value = value.succ();
1117
+ }
1118
+ },
1119
+
1120
+ include: function(value) {
1121
+ if (value < this.start)
1122
+ return false;
1123
+ if (this.exclusive)
1124
+ return value < this.end;
1125
+ return value <= this.end;
1126
+ }
1127
+ });
1128
+
1129
+ var $R = function(start, end, exclusive) {
1130
+ return new ObjectRange(start, end, exclusive);
1131
+ };
1132
+
1133
+ var Ajax = {
1134
+ getTransport: function() {
1135
+ return Try.these(
1136
+ function() {return new XMLHttpRequest()},
1137
+ function() {return new ActiveXObject('Msxml2.XMLHTTP')},
1138
+ function() {return new ActiveXObject('Microsoft.XMLHTTP')}
1139
+ ) || false;
1140
+ },
1141
+
1142
+ activeRequestCount: 0
1143
+ };
1144
+
1145
+ Ajax.Responders = {
1146
+ responders: [],
1147
+
1148
+ _each: function(iterator) {
1149
+ this.responders._each(iterator);
1150
+ },
1151
+
1152
+ register: function(responder) {
1153
+ if (!this.include(responder))
1154
+ this.responders.push(responder);
1155
+ },
1156
+
1157
+ unregister: function(responder) {
1158
+ this.responders = this.responders.without(responder);
1159
+ },
1160
+
1161
+ dispatch: function(callback, request, transport, json) {
1162
+ this.each(function(responder) {
1163
+ if (Object.isFunction(responder[callback])) {
1164
+ try {
1165
+ responder[callback].apply(responder, [request, transport, json]);
1166
+ } catch (e) { }
1167
+ }
1168
+ });
1169
+ }
1170
+ };
1171
+
1172
+ Object.extend(Ajax.Responders, Enumerable);
1173
+
1174
+ Ajax.Responders.register({
1175
+ onCreate: function() { Ajax.activeRequestCount++ },
1176
+ onComplete: function() { Ajax.activeRequestCount-- }
1177
+ });
1178
+
1179
+ Ajax.Base = Class.create({
1180
+ initialize: function(options) {
1181
+ this.options = {
1182
+ method: 'post',
1183
+ asynchronous: true,
1184
+ contentType: 'application/x-www-form-urlencoded',
1185
+ encoding: 'UTF-8',
1186
+ parameters: '',
1187
+ evalJSON: true,
1188
+ evalJS: true
1189
+ };
1190
+ Object.extend(this.options, options || { });
1191
+
1192
+ this.options.method = this.options.method.toLowerCase();
1193
+
1194
+ if (Object.isString(this.options.parameters))
1195
+ this.options.parameters = this.options.parameters.toQueryParams();
1196
+ else if (Object.isHash(this.options.parameters))
1197
+ this.options.parameters = this.options.parameters.toObject();
1198
+ }
1199
+ });
1200
+
1201
+ Ajax.Request = Class.create(Ajax.Base, {
1202
+ _complete: false,
1203
+
1204
+ initialize: function($super, url, options) {
1205
+ $super(options);
1206
+ this.transport = Ajax.getTransport();
1207
+ this.request(url);
1208
+ },
1209
+
1210
+ request: function(url) {
1211
+ this.url = url;
1212
+ this.method = this.options.method;
1213
+ var params = Object.clone(this.options.parameters);
1214
+
1215
+ if (!['get', 'post'].include(this.method)) {
1216
+ // simulate other verbs over post
1217
+ params['_method'] = this.method;
1218
+ this.method = 'post';
1219
+ }
1220
+
1221
+ this.parameters = params;
1222
+
1223
+ if (params = Object.toQueryString(params)) {
1224
+ // when GET, append parameters to URL
1225
+ if (this.method == 'get')
1226
+ this.url += (this.url.include('?') ? '&' : '?') + params;
1227
+ else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent))
1228
+ params += '&_=';
1229
+ }
1230
+
1231
+ try {
1232
+ var response = new Ajax.Response(this);
1233
+ if (this.options.onCreate) this.options.onCreate(response);
1234
+ Ajax.Responders.dispatch('onCreate', this, response);
1235
+
1236
+ this.transport.open(this.method.toUpperCase(), this.url,
1237
+ this.options.asynchronous);
1238
+
1239
+ if (this.options.asynchronous) this.respondToReadyState.bind(this).defer(1);
1240
+
1241
+ this.transport.onreadystatechange = this.onStateChange.bind(this);
1242
+ this.setRequestHeaders();
1243
+
1244
+ this.body = this.method == 'post' ? (this.options.postBody || params) : null;
1245
+ this.transport.send(this.body);
1246
+
1247
+ /* Force Firefox to handle ready state 4 for synchronous requests */
1248
+ if (!this.options.asynchronous && this.transport.overrideMimeType)
1249
+ this.onStateChange();
1250
+
1251
+ }
1252
+ catch (e) {
1253
+ this.dispatchException(e);
1254
+ }
1255
+ },
1256
+
1257
+ onStateChange: function() {
1258
+ var readyState = this.transport.readyState;
1259
+ if (readyState > 1 && !((readyState == 4) && this._complete))
1260
+ this.respondToReadyState(this.transport.readyState);
1261
+ },
1262
+
1263
+ setRequestHeaders: function() {
1264
+ var headers = {
1265
+ 'X-Requested-With': 'XMLHttpRequest',
1266
+ 'X-Prototype-Version': Prototype.Version,
1267
+ 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
1268
+ };
1269
+
1270
+ if (this.method == 'post') {
1271
+ headers['Content-type'] = this.options.contentType +
1272
+ (this.options.encoding ? '; charset=' + this.options.encoding : '');
1273
+
1274
+ /* Force "Connection: close" for older Mozilla browsers to work
1275
+ * around a bug where XMLHttpRequest sends an incorrect
1276
+ * Content-length header. See Mozilla Bugzilla #246651.
1277
+ */
1278
+ if (this.transport.overrideMimeType &&
1279
+ (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005)
1280
+ headers['Connection'] = 'close';
1281
+ }
1282
+
1283
+ // user-defined headers
1284
+ if (typeof this.options.requestHeaders == 'object') {
1285
+ var extras = this.options.requestHeaders;
1286
+
1287
+ if (Object.isFunction(extras.push))
1288
+ for (var i = 0, length = extras.length; i < length; i += 2)
1289
+ headers[extras[i]] = extras[i+1];
1290
+ else
1291
+ $H(extras).each(function(pair) { headers[pair.key] = pair.value });
1292
+ }
1293
+
1294
+ for (var name in headers)
1295
+ this.transport.setRequestHeader(name, headers[name]);
1296
+ },
1297
+
1298
+ success: function() {
1299
+ var status = this.getStatus();
1300
+ return !status || (status >= 200 && status < 300);
1301
+ },
1302
+
1303
+ getStatus: function() {
1304
+ try {
1305
+ return this.transport.status || 0;
1306
+ } catch (e) { return 0 }
1307
+ },
1308
+
1309
+ respondToReadyState: function(readyState) {
1310
+ var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this);
1311
+
1312
+ if (state == 'Complete') {
1313
+ try {
1314
+ this._complete = true;
1315
+ (this.options['on' + response.status]
1316
+ || this.options['on' + (this.success() ? 'Success' : 'Failure')]
1317
+ || Prototype.emptyFunction)(response, response.headerJSON);
1318
+ } catch (e) {
1319
+ this.dispatchException(e);
1320
+ }
1321
+
1322
+ var contentType = response.getHeader('Content-type');
1323
+ if (this.options.evalJS == 'force'
1324
+ || (this.options.evalJS && this.isSameOrigin() && contentType
1325
+ && contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i)))
1326
+ this.evalResponse();
1327
+ }
1328
+
1329
+ try {
1330
+ (this.options['on' + state] || Prototype.emptyFunction)(response, response.headerJSON);
1331
+ Ajax.Responders.dispatch('on' + state, this, response, response.headerJSON);
1332
+ } catch (e) {
1333
+ this.dispatchException(e);
1334
+ }
1335
+
1336
+ if (state == 'Complete') {
1337
+ // avoid memory leak in MSIE: clean up
1338
+ this.transport.onreadystatechange = Prototype.emptyFunction;
1339
+ }
1340
+ },
1341
+
1342
+ isSameOrigin: function() {
1343
+ var m = this.url.match(/^\s*https?:\/\/[^\/]*/);
1344
+ return !m || (m[0] == '#{protocol}//#{domain}#{port}'.interpolate({
1345
+ protocol: location.protocol,
1346
+ domain: document.domain,
1347
+ port: location.port ? ':' + location.port : ''
1348
+ }));
1349
+ },
1350
+
1351
+ getHeader: function(name) {
1352
+ try {
1353
+ return this.transport.getResponseHeader(name) || null;
1354
+ } catch (e) { return null }
1355
+ },
1356
+
1357
+ evalResponse: function() {
1358
+ try {
1359
+ return eval((this.transport.responseText || '').unfilterJSON());
1360
+ } catch (e) {
1361
+ this.dispatchException(e);
1362
+ }
1363
+ },
1364
+
1365
+ dispatchException: function(exception) {
1366
+ (this.options.onException || Prototype.emptyFunction)(this, exception);
1367
+ Ajax.Responders.dispatch('onException', this, exception);
1368
+ }
1369
+ });
1370
+
1371
+ Ajax.Request.Events =
1372
+ ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
1373
+
1374
+ Ajax.Response = Class.create({
1375
+ initialize: function(request){
1376
+ this.request = request;
1377
+ var transport = this.transport = request.transport,
1378
+ readyState = this.readyState = transport.readyState;
1379
+
1380
+ if((readyState > 2 && !Prototype.Browser.IE) || readyState == 4) {
1381
+ this.status = this.getStatus();
1382
+ this.statusText = this.getStatusText();
1383
+ this.responseText = String.interpret(transport.responseText);
1384
+ this.headerJSON = this._getHeaderJSON();
1385
+ }
1386
+
1387
+ if(readyState == 4) {
1388
+ var xml = transport.responseXML;
1389
+ this.responseXML = Object.isUndefined(xml) ? null : xml;
1390
+ this.responseJSON = this._getResponseJSON();
1391
+ }
1392
+ },
1393
+
1394
+ status: 0,
1395
+ statusText: '',
1396
+
1397
+ getStatus: Ajax.Request.prototype.getStatus,
1398
+
1399
+ getStatusText: function() {
1400
+ try {
1401
+ return this.transport.statusText || '';
1402
+ } catch (e) { return '' }
1403
+ },
1404
+
1405
+ getHeader: Ajax.Request.prototype.getHeader,
1406
+
1407
+ getAllHeaders: function() {
1408
+ try {
1409
+ return this.getAllResponseHeaders();
1410
+ } catch (e) { return null }
1411
+ },
1412
+
1413
+ getResponseHeader: function(name) {
1414
+ return this.transport.getResponseHeader(name);
1415
+ },
1416
+
1417
+ getAllResponseHeaders: function() {
1418
+ return this.transport.getAllResponseHeaders();
1419
+ },
1420
+
1421
+ _getHeaderJSON: function() {
1422
+ var json = this.getHeader('X-JSON');
1423
+ if (!json) return null;
1424
+ json = decodeURIComponent(escape(json));
1425
+ try {
1426
+ return json.evalJSON(this.request.options.sanitizeJSON ||
1427
+ !this.request.isSameOrigin());
1428
+ } catch (e) {
1429
+ this.request.dispatchException(e);
1430
+ }
1431
+ },
1432
+
1433
+ _getResponseJSON: function() {
1434
+ var options = this.request.options;
1435
+ if (!options.evalJSON || (options.evalJSON != 'force' &&
1436
+ !(this.getHeader('Content-type') || '').include('application/json')) ||
1437
+ this.responseText.blank())
1438
+ return null;
1439
+ try {
1440
+ return this.responseText.evalJSON(options.sanitizeJSON ||
1441
+ !this.request.isSameOrigin());
1442
+ } catch (e) {
1443
+ this.request.dispatchException(e);
1444
+ }
1445
+ }
1446
+ });
1447
+
1448
+ Ajax.Updater = Class.create(Ajax.Request, {
1449
+ initialize: function($super, container, url, options) {
1450
+ this.container = {
1451
+ success: (container.success || container),
1452
+ failure: (container.failure || (container.success ? null : container))
1453
+ };
1454
+
1455
+ options = Object.clone(options);
1456
+ var onComplete = options.onComplete;
1457
+ options.onComplete = (function(response, json) {
1458
+ this.updateContent(response.responseText);
1459
+ if (Object.isFunction(onComplete)) onComplete(response, json);
1460
+ }).bind(this);
1461
+
1462
+ $super(url, options);
1463
+ },
1464
+
1465
+ updateContent: function(responseText) {
1466
+ var receiver = this.container[this.success() ? 'success' : 'failure'],
1467
+ options = this.options;
1468
+
1469
+ if (!options.evalScripts) responseText = responseText.stripScripts();
1470
+
1471
+ if (receiver = $(receiver)) {
1472
+ if (options.insertion) {
1473
+ if (Object.isString(options.insertion)) {
1474
+ var insertion = { }; insertion[options.insertion] = responseText;
1475
+ receiver.insert(insertion);
1476
+ }
1477
+ else options.insertion(receiver, responseText);
1478
+ }
1479
+ else receiver.update(responseText);
1480
+ }
1481
+ }
1482
+ });
1483
+
1484
+ Ajax.PeriodicalUpdater = Class.create(Ajax.Base, {
1485
+ initialize: function($super, container, url, options) {
1486
+ $super(options);
1487
+ this.onComplete = this.options.onComplete;
1488
+
1489
+ this.frequency = (this.options.frequency || 2);
1490
+ this.decay = (this.options.decay || 1);
1491
+
1492
+ this.updater = { };
1493
+ this.container = container;
1494
+ this.url = url;
1495
+
1496
+ this.start();
1497
+ },
1498
+
1499
+ start: function() {
1500
+ this.options.onComplete = this.updateComplete.bind(this);
1501
+ this.onTimerEvent();
1502
+ },
1503
+
1504
+ stop: function() {
1505
+ this.updater.options.onComplete = undefined;
1506
+ clearTimeout(this.timer);
1507
+ (this.onComplete || Prototype.emptyFunction).apply(this, arguments);
1508
+ },
1509
+
1510
+ updateComplete: function(response) {
1511
+ if (this.options.decay) {
1512
+ this.decay = (response.responseText == this.lastText ?
1513
+ this.decay * this.options.decay : 1);
1514
+
1515
+ this.lastText = response.responseText;
1516
+ }
1517
+ this.timer = this.onTimerEvent.bind(this).delay(this.decay * this.frequency);
1518
+ },
1519
+
1520
+ onTimerEvent: function() {
1521
+ this.updater = new Ajax.Updater(this.container, this.url, this.options);
1522
+ }
1523
+ });
1524
+ function $(element) {
1525
+ if (arguments.length > 1) {
1526
+ for (var i = 0, elements = [], length = arguments.length; i < length; i++)
1527
+ elements.push($(arguments[i]));
1528
+ return elements;
1529
+ }
1530
+ if (Object.isString(element))
1531
+ element = document.getElementById(element);
1532
+ return Element.extend(element);
1533
+ }
1534
+
1535
+ if (Prototype.BrowserFeatures.XPath) {
1536
+ document._getElementsByXPath = function(expression, parentElement) {
1537
+ var results = [];
1538
+ var query = document.evaluate(expression, $(parentElement) || document,
1539
+ null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
1540
+ for (var i = 0, length = query.snapshotLength; i < length; i++)
1541
+ results.push(Element.extend(query.snapshotItem(i)));
1542
+ return results;
1543
+ };
1544
+ }
1545
+
1546
+ /*--------------------------------------------------------------------------*/
1547
+
1548
+ if (!window.Node) var Node = { };
1549
+
1550
+ if (!Node.ELEMENT_NODE) {
1551
+ // DOM level 2 ECMAScript Language Binding
1552
+ Object.extend(Node, {
1553
+ ELEMENT_NODE: 1,
1554
+ ATTRIBUTE_NODE: 2,
1555
+ TEXT_NODE: 3,
1556
+ CDATA_SECTION_NODE: 4,
1557
+ ENTITY_REFERENCE_NODE: 5,
1558
+ ENTITY_NODE: 6,
1559
+ PROCESSING_INSTRUCTION_NODE: 7,
1560
+ COMMENT_NODE: 8,
1561
+ DOCUMENT_NODE: 9,
1562
+ DOCUMENT_TYPE_NODE: 10,
1563
+ DOCUMENT_FRAGMENT_NODE: 11,
1564
+ NOTATION_NODE: 12
1565
+ });
1566
+ }
1567
+
1568
+ (function() {
1569
+ var element = this.Element;
1570
+ this.Element = function(tagName, attributes) {
1571
+ attributes = attributes || { };
1572
+ tagName = tagName.toLowerCase();
1573
+ var cache = Element.cache;
1574
+ if (Prototype.Browser.IE && attributes.name) {
1575
+ tagName = '<' + tagName + ' name="' + attributes.name + '">';
1576
+ delete attributes.name;
1577
+ return Element.writeAttribute(document.createElement(tagName), attributes);
1578
+ }
1579
+ if (!cache[tagName]) cache[tagName] = Element.extend(document.createElement(tagName));
1580
+ return Element.writeAttribute(cache[tagName].cloneNode(false), attributes);
1581
+ };
1582
+ Object.extend(this.Element, element || { });
1583
+ if (element) this.Element.prototype = element.prototype;
1584
+ }).call(window);
1585
+
1586
+ Element.cache = { };
1587
+
1588
+ Element.Methods = {
1589
+ visible: function(element) {
1590
+ return $(element).style.display != 'none';
1591
+ },
1592
+
1593
+ toggle: function(element) {
1594
+ element = $(element);
1595
+ Element[Element.visible(element) ? 'hide' : 'show'](element);
1596
+ return element;
1597
+ },
1598
+
1599
+ hide: function(element) {
1600
+ element = $(element);
1601
+ element.style.display = 'none';
1602
+ return element;
1603
+ },
1604
+
1605
+ show: function(element) {
1606
+ element = $(element);
1607
+ element.style.display = '';
1608
+ return element;
1609
+ },
1610
+
1611
+ remove: function(element) {
1612
+ element = $(element);
1613
+ element.parentNode.removeChild(element);
1614
+ return element;
1615
+ },
1616
+
1617
+ update: function(element, content) {
1618
+ element = $(element);
1619
+ if (content && content.toElement) content = content.toElement();
1620
+ if (Object.isElement(content)) return element.update().insert(content);
1621
+ content = Object.toHTML(content);
1622
+ element.innerHTML = content.stripScripts();
1623
+ content.evalScripts.bind(content).defer();
1624
+ return element;
1625
+ },
1626
+
1627
+ replace: function(element, content) {
1628
+ element = $(element);
1629
+ if (content && content.toElement) content = content.toElement();
1630
+ else if (!Object.isElement(content)) {
1631
+ content = Object.toHTML(content);
1632
+ var range = element.ownerDocument.createRange();
1633
+ range.selectNode(element);
1634
+ content.evalScripts.bind(content).defer();
1635
+ content = range.createContextualFragment(content.stripScripts());
1636
+ }
1637
+ element.parentNode.replaceChild(content, element);
1638
+ return element;
1639
+ },
1640
+
1641
+ insert: function(element, insertions) {
1642
+ element = $(element);
1643
+
1644
+ if (Object.isString(insertions) || Object.isNumber(insertions) ||
1645
+ Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML)))
1646
+ insertions = {bottom:insertions};
1647
+
1648
+ var content, insert, tagName, childNodes;
1649
+
1650
+ for (var position in insertions) {
1651
+ content = insertions[position];
1652
+ position = position.toLowerCase();
1653
+ insert = Element._insertionTranslations[position];
1654
+
1655
+ if (content && content.toElement) content = content.toElement();
1656
+ if (Object.isElement(content)) {
1657
+ insert(element, content);
1658
+ continue;
1659
+ }
1660
+
1661
+ content = Object.toHTML(content);
1662
+
1663
+ tagName = ((position == 'before' || position == 'after')
1664
+ ? element.parentNode : element).tagName.toUpperCase();
1665
+
1666
+ childNodes = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
1667
+
1668
+ if (position == 'top' || position == 'after') childNodes.reverse();
1669
+ childNodes.each(insert.curry(element));
1670
+
1671
+ content.evalScripts.bind(content).defer();
1672
+ }
1673
+
1674
+ return element;
1675
+ },
1676
+
1677
+ wrap: function(element, wrapper, attributes) {
1678
+ element = $(element);
1679
+ if (Object.isElement(wrapper))
1680
+ $(wrapper).writeAttribute(attributes || { });
1681
+ else if (Object.isString(wrapper)) wrapper = new Element(wrapper, attributes);
1682
+ else wrapper = new Element('div', wrapper);
1683
+ if (element.parentNode)
1684
+ element.parentNode.replaceChild(wrapper, element);
1685
+ wrapper.appendChild(element);
1686
+ return wrapper;
1687
+ },
1688
+
1689
+ inspect: function(element) {
1690
+ element = $(element);
1691
+ var result = '<' + element.tagName.toLowerCase();
1692
+ $H({'id': 'id', 'className': 'class'}).each(function(pair) {
1693
+ var property = pair.first(), attribute = pair.last();
1694
+ var value = (element[property] || '').toString();
1695
+ if (value) result += ' ' + attribute + '=' + value.inspect(true);
1696
+ });
1697
+ return result + '>';
1698
+ },
1699
+
1700
+ recursivelyCollect: function(element, property) {
1701
+ element = $(element);
1702
+ var elements = [];
1703
+ while (element = element[property])
1704
+ if (element.nodeType == 1)
1705
+ elements.push(Element.extend(element));
1706
+ return elements;
1707
+ },
1708
+
1709
+ ancestors: function(element) {
1710
+ return $(element).recursivelyCollect('parentNode');
1711
+ },
1712
+
1713
+ descendants: function(element) {
1714
+ return $(element).select("*");
1715
+ },
1716
+
1717
+ firstDescendant: function(element) {
1718
+ element = $(element).firstChild;
1719
+ while (element && element.nodeType != 1) element = element.nextSibling;
1720
+ return $(element);
1721
+ },
1722
+
1723
+ immediateDescendants: function(element) {
1724
+ if (!(element = $(element).firstChild)) return [];
1725
+ while (element && element.nodeType != 1) element = element.nextSibling;
1726
+ if (element) return [element].concat($(element).nextSiblings());
1727
+ return [];
1728
+ },
1729
+
1730
+ previousSiblings: function(element) {
1731
+ return $(element).recursivelyCollect('previousSibling');
1732
+ },
1733
+
1734
+ nextSiblings: function(element) {
1735
+ return $(element).recursivelyCollect('nextSibling');
1736
+ },
1737
+
1738
+ siblings: function(element) {
1739
+ element = $(element);
1740
+ return element.previousSiblings().reverse().concat(element.nextSiblings());
1741
+ },
1742
+
1743
+ match: function(element, selector) {
1744
+ if (Object.isString(selector))
1745
+ selector = new Selector(selector);
1746
+ return selector.match($(element));
1747
+ },
1748
+
1749
+ up: function(element, expression, index) {
1750
+ element = $(element);
1751
+ if (arguments.length == 1) return $(element.parentNode);
1752
+ var ancestors = element.ancestors();
1753
+ return Object.isNumber(expression) ? ancestors[expression] :
1754
+ Selector.findElement(ancestors, expression, index);
1755
+ },
1756
+
1757
+ down: function(element, expression, index) {
1758
+ element = $(element);
1759
+ if (arguments.length == 1) return element.firstDescendant();
1760
+ return Object.isNumber(expression) ? element.descendants()[expression] :
1761
+ Element.select(element, expression)[index || 0];
1762
+ },
1763
+
1764
+ previous: function(element, expression, index) {
1765
+ element = $(element);
1766
+ if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(element));
1767
+ var previousSiblings = element.previousSiblings();
1768
+ return Object.isNumber(expression) ? previousSiblings[expression] :
1769
+ Selector.findElement(previousSiblings, expression, index);
1770
+ },
1771
+
1772
+ next: function(element, expression, index) {
1773
+ element = $(element);
1774
+ if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(element));
1775
+ var nextSiblings = element.nextSiblings();
1776
+ return Object.isNumber(expression) ? nextSiblings[expression] :
1777
+ Selector.findElement(nextSiblings, expression, index);
1778
+ },
1779
+
1780
+ select: function() {
1781
+ var args = $A(arguments), element = $(args.shift());
1782
+ return Selector.findChildElements(element, args);
1783
+ },
1784
+
1785
+ adjacent: function() {
1786
+ var args = $A(arguments), element = $(args.shift());
1787
+ return Selector.findChildElements(element.parentNode, args).without(element);
1788
+ },
1789
+
1790
+ identify: function(element) {
1791
+ element = $(element);
1792
+ var id = element.readAttribute('id'), self = arguments.callee;
1793
+ if (id) return id;
1794
+ do { id = 'anonymous_element_' + self.counter++ } while ($(id));
1795
+ element.writeAttribute('id', id);
1796
+ return id;
1797
+ },
1798
+
1799
+ readAttribute: function(element, name) {
1800
+ element = $(element);
1801
+ if (Prototype.Browser.IE) {
1802
+ var t = Element._attributeTranslations.read;
1803
+ if (t.values[name]) return t.values[name](element, name);
1804
+ if (t.names[name]) name = t.names[name];
1805
+ if (name.include(':')) {
1806
+ return (!element.attributes || !element.attributes[name]) ? null :
1807
+ element.attributes[name].value;
1808
+ }
1809
+ }
1810
+ return element.getAttribute(name);
1811
+ },
1812
+
1813
+ writeAttribute: function(element, name, value) {
1814
+ element = $(element);
1815
+ var attributes = { }, t = Element._attributeTranslations.write;
1816
+
1817
+ if (typeof name == 'object') attributes = name;
1818
+ else attributes[name] = Object.isUndefined(value) ? true : value;
1819
+
1820
+ for (var attr in attributes) {
1821
+ name = t.names[attr] || attr;
1822
+ value = attributes[attr];
1823
+ if (t.values[attr]) name = t.values[attr](element, value);
1824
+ if (value === false || value === null)
1825
+ element.removeAttribute(name);
1826
+ else if (value === true)
1827
+ element.setAttribute(name, name);
1828
+ else element.setAttribute(name, value);
1829
+ }
1830
+ return element;
1831
+ },
1832
+
1833
+ getHeight: function(element) {
1834
+ return $(element).getDimensions().height;
1835
+ },
1836
+
1837
+ getWidth: function(element) {
1838
+ return $(element).getDimensions().width;
1839
+ },
1840
+
1841
+ classNames: function(element) {
1842
+ return new Element.ClassNames(element);
1843
+ },
1844
+
1845
+ hasClassName: function(element, className) {
1846
+ if (!(element = $(element))) return;
1847
+ var elementClassName = element.className;
1848
+ return (elementClassName.length > 0 && (elementClassName == className ||
1849
+ new RegExp("(^|\\s)" + className + "(\\s|$)").test(elementClassName)));
1850
+ },
1851
+
1852
+ addClassName: function(element, className) {
1853
+ if (!(element = $(element))) return;
1854
+ if (!element.hasClassName(className))
1855
+ element.className += (element.className ? ' ' : '') + className;
1856
+ return element;
1857
+ },
1858
+
1859
+ removeClassName: function(element, className) {
1860
+ if (!(element = $(element))) return;
1861
+ element.className = element.className.replace(
1862
+ new RegExp("(^|\\s+)" + className + "(\\s+|$)"), ' ').strip();
1863
+ return element;
1864
+ },
1865
+
1866
+ toggleClassName: function(element, className) {
1867
+ if (!(element = $(element))) return;
1868
+ return element[element.hasClassName(className) ?
1869
+ 'removeClassName' : 'addClassName'](className);
1870
+ },
1871
+
1872
+ // removes whitespace-only text node children
1873
+ cleanWhitespace: function(element) {
1874
+ element = $(element);
1875
+ var node = element.firstChild;
1876
+ while (node) {
1877
+ var nextNode = node.nextSibling;
1878
+ if (node.nodeType == 3 && !/\S/.test(node.nodeValue))
1879
+ element.removeChild(node);
1880
+ node = nextNode;
1881
+ }
1882
+ return element;
1883
+ },
1884
+
1885
+ empty: function(element) {
1886
+ return $(element).innerHTML.blank();
1887
+ },
1888
+
1889
+ descendantOf: function(element, ancestor) {
1890
+ element = $(element), ancestor = $(ancestor);
1891
+
1892
+ if (element.compareDocumentPosition)
1893
+ return (element.compareDocumentPosition(ancestor) & 8) === 8;
1894
+
1895
+ if (ancestor.contains)
1896
+ return ancestor.contains(element) && ancestor !== element;
1897
+
1898
+ while (element = element.parentNode)
1899
+ if (element == ancestor) return true;
1900
+
1901
+ return false;
1902
+ },
1903
+
1904
+ scrollTo: function(element) {
1905
+ element = $(element);
1906
+ var pos = element.cumulativeOffset();
1907
+ window.scrollTo(pos[0], pos[1]);
1908
+ return element;
1909
+ },
1910
+
1911
+ getStyle: function(element, style) {
1912
+ element = $(element);
1913
+ style = style == 'float' ? 'cssFloat' : style.camelize();
1914
+ var value = element.style[style];
1915
+ if (!value || value == 'auto') {
1916
+ var css = document.defaultView.getComputedStyle(element, null);
1917
+ value = css ? css[style] : null;
1918
+ }
1919
+ if (style == 'opacity') return value ? parseFloat(value) : 1.0;
1920
+ return value == 'auto' ? null : value;
1921
+ },
1922
+
1923
+ getOpacity: function(element) {
1924
+ return $(element).getStyle('opacity');
1925
+ },
1926
+
1927
+ setStyle: function(element, styles) {
1928
+ element = $(element);
1929
+ var elementStyle = element.style, match;
1930
+ if (Object.isString(styles)) {
1931
+ element.style.cssText += ';' + styles;
1932
+ return styles.include('opacity') ?
1933
+ element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : element;
1934
+ }
1935
+ for (var property in styles)
1936
+ if (property == 'opacity') element.setOpacity(styles[property]);
1937
+ else
1938
+ elementStyle[(property == 'float' || property == 'cssFloat') ?
1939
+ (Object.isUndefined(elementStyle.styleFloat) ? 'cssFloat' : 'styleFloat') :
1940
+ property] = styles[property];
1941
+
1942
+ return element;
1943
+ },
1944
+
1945
+ setOpacity: function(element, value) {
1946
+ element = $(element);
1947
+ element.style.opacity = (value == 1 || value === '') ? '' :
1948
+ (value < 0.00001) ? 0 : value;
1949
+ return element;
1950
+ },
1951
+
1952
+ getDimensions: function(element) {
1953
+ element = $(element);
1954
+ var display = element.getStyle('display');
1955
+ if (display != 'none' && display != null) // Safari bug
1956
+ return {width: element.offsetWidth, height: element.offsetHeight};
1957
+
1958
+ // All *Width and *Height properties give 0 on elements with display none,
1959
+ // so enable the element temporarily
1960
+ var els = element.style;
1961
+ var originalVisibility = els.visibility;
1962
+ var originalPosition = els.position;
1963
+ var originalDisplay = els.display;
1964
+ els.visibility = 'hidden';
1965
+ els.position = 'absolute';
1966
+ els.display = 'block';
1967
+ var originalWidth = element.clientWidth;
1968
+ var originalHeight = element.clientHeight;
1969
+ els.display = originalDisplay;
1970
+ els.position = originalPosition;
1971
+ els.visibility = originalVisibility;
1972
+ return {width: originalWidth, height: originalHeight};
1973
+ },
1974
+
1975
+ makePositioned: function(element) {
1976
+ element = $(element);
1977
+ var pos = Element.getStyle(element, 'position');
1978
+ if (pos == 'static' || !pos) {
1979
+ element._madePositioned = true;
1980
+ element.style.position = 'relative';
1981
+ // Opera returns the offset relative to the positioning context, when an
1982
+ // element is position relative but top and left have not been defined
1983
+ if (Prototype.Browser.Opera) {
1984
+ element.style.top = 0;
1985
+ element.style.left = 0;
1986
+ }
1987
+ }
1988
+ return element;
1989
+ },
1990
+
1991
+ undoPositioned: function(element) {
1992
+ element = $(element);
1993
+ if (element._madePositioned) {
1994
+ element._madePositioned = undefined;
1995
+ element.style.position =
1996
+ element.style.top =
1997
+ element.style.left =
1998
+ element.style.bottom =
1999
+ element.style.right = '';
2000
+ }
2001
+ return element;
2002
+ },
2003
+
2004
+ makeClipping: function(element) {
2005
+ element = $(element);
2006
+ if (element._overflow) return element;
2007
+ element._overflow = Element.getStyle(element, 'overflow') || 'auto';
2008
+ if (element._overflow !== 'hidden')
2009
+ element.style.overflow = 'hidden';
2010
+ return element;
2011
+ },
2012
+
2013
+ undoClipping: function(element) {
2014
+ element = $(element);
2015
+ if (!element._overflow) return element;
2016
+ element.style.overflow = element._overflow == 'auto' ? '' : element._overflow;
2017
+ element._overflow = null;
2018
+ return element;
2019
+ },
2020
+
2021
+ cumulativeOffset: function(element) {
2022
+ var valueT = 0, valueL = 0;
2023
+ do {
2024
+ valueT += element.offsetTop || 0;
2025
+ valueL += element.offsetLeft || 0;
2026
+ element = element.offsetParent;
2027
+ } while (element);
2028
+ return Element._returnOffset(valueL, valueT);
2029
+ },
2030
+
2031
+ positionedOffset: function(element) {
2032
+ var valueT = 0, valueL = 0;
2033
+ do {
2034
+ valueT += element.offsetTop || 0;
2035
+ valueL += element.offsetLeft || 0;
2036
+ element = element.offsetParent;
2037
+ if (element) {
2038
+ if (element.tagName.toUpperCase() == 'BODY') break;
2039
+ var p = Element.getStyle(element, 'position');
2040
+ if (p !== 'static') break;
2041
+ }
2042
+ } while (element);
2043
+ return Element._returnOffset(valueL, valueT);
2044
+ },
2045
+
2046
+ absolutize: function(element) {
2047
+ element = $(element);
2048
+ if (element.getStyle('position') == 'absolute') return element;
2049
+ // Position.prepare(); // To be done manually by Scripty when it needs it.
2050
+
2051
+ var offsets = element.positionedOffset();
2052
+ var top = offsets[1];
2053
+ var left = offsets[0];
2054
+ var width = element.clientWidth;
2055
+ var height = element.clientHeight;
2056
+
2057
+ element._originalLeft = left - parseFloat(element.style.left || 0);
2058
+ element._originalTop = top - parseFloat(element.style.top || 0);
2059
+ element._originalWidth = element.style.width;
2060
+ element._originalHeight = element.style.height;
2061
+
2062
+ element.style.position = 'absolute';
2063
+ element.style.top = top + 'px';
2064
+ element.style.left = left + 'px';
2065
+ element.style.width = width + 'px';
2066
+ element.style.height = height + 'px';
2067
+ return element;
2068
+ },
2069
+
2070
+ relativize: function(element) {
2071
+ element = $(element);
2072
+ if (element.getStyle('position') == 'relative') return element;
2073
+ // Position.prepare(); // To be done manually by Scripty when it needs it.
2074
+
2075
+ element.style.position = 'relative';
2076
+ var top = parseFloat(element.style.top || 0) - (element._originalTop || 0);
2077
+ var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);
2078
+
2079
+ element.style.top = top + 'px';
2080
+ element.style.left = left + 'px';
2081
+ element.style.height = element._originalHeight;
2082
+ element.style.width = element._originalWidth;
2083
+ return element;
2084
+ },
2085
+
2086
+ cumulativeScrollOffset: function(element) {
2087
+ var valueT = 0, valueL = 0;
2088
+ do {
2089
+ valueT += element.scrollTop || 0;
2090
+ valueL += element.scrollLeft || 0;
2091
+ element = element.parentNode;
2092
+ } while (element);
2093
+ return Element._returnOffset(valueL, valueT);
2094
+ },
2095
+
2096
+ getOffsetParent: function(element) {
2097
+ if (element.offsetParent) return $(element.offsetParent);
2098
+ if (element == document.body) return $(element);
2099
+
2100
+ while ((element = element.parentNode) && element != document.body)
2101
+ if (Element.getStyle(element, 'position') != 'static')
2102
+ return $(element);
2103
+
2104
+ return $(document.body);
2105
+ },
2106
+
2107
+ viewportOffset: function(forElement) {
2108
+ var valueT = 0, valueL = 0;
2109
+
2110
+ var element = forElement;
2111
+ do {
2112
+ valueT += element.offsetTop || 0;
2113
+ valueL += element.offsetLeft || 0;
2114
+
2115
+ // Safari fix
2116
+ if (element.offsetParent == document.body &&
2117
+ Element.getStyle(element, 'position') == 'absolute') break;
2118
+
2119
+ } while (element = element.offsetParent);
2120
+
2121
+ element = forElement;
2122
+ do {
2123
+ if (!Prototype.Browser.Opera || (element.tagName && (element.tagName.toUpperCase() == 'BODY'))) {
2124
+ valueT -= element.scrollTop || 0;
2125
+ valueL -= element.scrollLeft || 0;
2126
+ }
2127
+ } while (element = element.parentNode);
2128
+
2129
+ return Element._returnOffset(valueL, valueT);
2130
+ },
2131
+
2132
+ clonePosition: function(element, source) {
2133
+ var options = Object.extend({
2134
+ setLeft: true,
2135
+ setTop: true,
2136
+ setWidth: true,
2137
+ setHeight: true,
2138
+ offsetTop: 0,
2139
+ offsetLeft: 0
2140
+ }, arguments[2] || { });
2141
+
2142
+ // find page position of source
2143
+ source = $(source);
2144
+ var p = source.viewportOffset();
2145
+
2146
+ // find coordinate system to use
2147
+ element = $(element);
2148
+ var delta = [0, 0];
2149
+ var parent = null;
2150
+ // delta [0,0] will do fine with position: fixed elements,
2151
+ // position:absolute needs offsetParent deltas
2152
+ if (Element.getStyle(element, 'position') == 'absolute') {
2153
+ parent = element.getOffsetParent();
2154
+ delta = parent.viewportOffset();
2155
+ }
2156
+
2157
+ // correct by body offsets (fixes Safari)
2158
+ if (parent == document.body) {
2159
+ delta[0] -= document.body.offsetLeft;
2160
+ delta[1] -= document.body.offsetTop;
2161
+ }
2162
+
2163
+ // set position
2164
+ if (options.setLeft) element.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px';
2165
+ if (options.setTop) element.style.top = (p[1] - delta[1] + options.offsetTop) + 'px';
2166
+ if (options.setWidth) element.style.width = source.offsetWidth + 'px';
2167
+ if (options.setHeight) element.style.height = source.offsetHeight + 'px';
2168
+ return element;
2169
+ }
2170
+ };
2171
+
2172
+ Element.Methods.identify.counter = 1;
2173
+
2174
+ Object.extend(Element.Methods, {
2175
+ getElementsBySelector: Element.Methods.select,
2176
+ childElements: Element.Methods.immediateDescendants
2177
+ });
2178
+
2179
+ Element._attributeTranslations = {
2180
+ write: {
2181
+ names: {
2182
+ className: 'class',
2183
+ htmlFor: 'for'
2184
+ },
2185
+ values: { }
2186
+ }
2187
+ };
2188
+
2189
+ if (Prototype.Browser.Opera) {
2190
+ Element.Methods.getStyle = Element.Methods.getStyle.wrap(
2191
+ function(proceed, element, style) {
2192
+ switch (style) {
2193
+ case 'left': case 'top': case 'right': case 'bottom':
2194
+ if (proceed(element, 'position') === 'static') return null;
2195
+ case 'height': case 'width':
2196
+ // returns '0px' for hidden elements; we want it to return null
2197
+ if (!Element.visible(element)) return null;
2198
+
2199
+ // returns the border-box dimensions rather than the content-box
2200
+ // dimensions, so we subtract padding and borders from the value
2201
+ var dim = parseInt(proceed(element, style), 10);
2202
+
2203
+ if (dim !== element['offset' + style.capitalize()])
2204
+ return dim + 'px';
2205
+
2206
+ var properties;
2207
+ if (style === 'height') {
2208
+ properties = ['border-top-width', 'padding-top',
2209
+ 'padding-bottom', 'border-bottom-width'];
2210
+ }
2211
+ else {
2212
+ properties = ['border-left-width', 'padding-left',
2213
+ 'padding-right', 'border-right-width'];
2214
+ }
2215
+ return properties.inject(dim, function(memo, property) {
2216
+ var val = proceed(element, property);
2217
+ return val === null ? memo : memo - parseInt(val, 10);
2218
+ }) + 'px';
2219
+ default: return proceed(element, style);
2220
+ }
2221
+ }
2222
+ );
2223
+
2224
+ Element.Methods.readAttribute = Element.Methods.readAttribute.wrap(
2225
+ function(proceed, element, attribute) {
2226
+ if (attribute === 'title') return element.title;
2227
+ return proceed(element, attribute);
2228
+ }
2229
+ );
2230
+ }
2231
+
2232
+ else if (Prototype.Browser.IE) {
2233
+ // IE doesn't report offsets correctly for static elements, so we change them
2234
+ // to "relative" to get the values, then change them back.
2235
+ Element.Methods.getOffsetParent = Element.Methods.getOffsetParent.wrap(
2236
+ function(proceed, element) {
2237
+ element = $(element);
2238
+ // IE throws an error if element is not in document
2239
+ try { element.offsetParent }
2240
+ catch(e) { return $(document.body) }
2241
+ var position = element.getStyle('position');
2242
+ if (position !== 'static') return proceed(element);
2243
+ element.setStyle({ position: 'relative' });
2244
+ var value = proceed(element);
2245
+ element.setStyle({ position: position });
2246
+ return value;
2247
+ }
2248
+ );
2249
+
2250
+ $w('positionedOffset viewportOffset').each(function(method) {
2251
+ Element.Methods[method] = Element.Methods[method].wrap(
2252
+ function(proceed, element) {
2253
+ element = $(element);
2254
+ try { element.offsetParent }
2255
+ catch(e) { return Element._returnOffset(0,0) }
2256
+ var position = element.getStyle('position');
2257
+ if (position !== 'static') return proceed(element);
2258
+ // Trigger hasLayout on the offset parent so that IE6 reports
2259
+ // accurate offsetTop and offsetLeft values for position: fixed.
2260
+ var offsetParent = element.getOffsetParent();
2261
+ if (offsetParent && offsetParent.getStyle('position') === 'fixed')
2262
+ offsetParent.setStyle({ zoom: 1 });
2263
+ element.setStyle({ position: 'relative' });
2264
+ var value = proceed(element);
2265
+ element.setStyle({ position: position });
2266
+ return value;
2267
+ }
2268
+ );
2269
+ });
2270
+
2271
+ Element.Methods.cumulativeOffset = Element.Methods.cumulativeOffset.wrap(
2272
+ function(proceed, element) {
2273
+ try { element.offsetParent }
2274
+ catch(e) { return Element._returnOffset(0,0) }
2275
+ return proceed(element);
2276
+ }
2277
+ );
2278
+
2279
+ Element.Methods.getStyle = function(element, style) {
2280
+ element = $(element);
2281
+ style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize();
2282
+ var value = element.style[style];
2283
+ if (!value && element.currentStyle) value = element.currentStyle[style];
2284
+
2285
+ if (style == 'opacity') {
2286
+ if (value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/))
2287
+ if (value[1]) return parseFloat(value[1]) / 100;
2288
+ return 1.0;
2289
+ }
2290
+
2291
+ if (value == 'auto') {
2292
+ if ((style == 'width' || style == 'height') && (element.getStyle('display') != 'none'))
2293
+ return element['offset' + style.capitalize()] + 'px';
2294
+ return null;
2295
+ }
2296
+ return value;
2297
+ };
2298
+
2299
+ Element.Methods.setOpacity = function(element, value) {
2300
+ function stripAlpha(filter){
2301
+ return filter.replace(/alpha\([^\)]*\)/gi,'');
2302
+ }
2303
+ element = $(element);
2304
+ var currentStyle = element.currentStyle;
2305
+ if ((currentStyle && !currentStyle.hasLayout) ||
2306
+ (!currentStyle && element.style.zoom == 'normal'))
2307
+ element.style.zoom = 1;
2308
+
2309
+ var filter = element.getStyle('filter'), style = element.style;
2310
+ if (value == 1 || value === '') {
2311
+ (filter = stripAlpha(filter)) ?
2312
+ style.filter = filter : style.removeAttribute('filter');
2313
+ return element;
2314
+ } else if (value < 0.00001) value = 0;
2315
+ style.filter = stripAlpha(filter) +
2316
+ 'alpha(opacity=' + (value * 100) + ')';
2317
+ return element;
2318
+ };
2319
+
2320
+ Element._attributeTranslations = {
2321
+ read: {
2322
+ names: {
2323
+ 'class': 'className',
2324
+ 'for': 'htmlFor'
2325
+ },
2326
+ values: {
2327
+ _getAttr: function(element, attribute) {
2328
+ return element.getAttribute(attribute, 2);
2329
+ },
2330
+ _getAttrNode: function(element, attribute) {
2331
+ var node = element.getAttributeNode(attribute);
2332
+ return node ? node.value : "";
2333
+ },
2334
+ _getEv: function(element, attribute) {
2335
+ attribute = element.getAttribute(attribute);
2336
+ return attribute ? attribute.toString().slice(23, -2) : null;
2337
+ },
2338
+ _flag: function(element, attribute) {
2339
+ return $(element).hasAttribute(attribute) ? attribute : null;
2340
+ },
2341
+ style: function(element) {
2342
+ return element.style.cssText.toLowerCase();
2343
+ },
2344
+ title: function(element) {
2345
+ return element.title;
2346
+ }
2347
+ }
2348
+ }
2349
+ };
2350
+
2351
+ Element._attributeTranslations.write = {
2352
+ names: Object.extend({
2353
+ cellpadding: 'cellPadding',
2354
+ cellspacing: 'cellSpacing'
2355
+ }, Element._attributeTranslations.read.names),
2356
+ values: {
2357
+ checked: function(element, value) {
2358
+ element.checked = !!value;
2359
+ },
2360
+
2361
+ style: function(element, value) {
2362
+ element.style.cssText = value ? value : '';
2363
+ }
2364
+ }
2365
+ };
2366
+
2367
+ Element._attributeTranslations.has = {};
2368
+
2369
+ $w('colSpan rowSpan vAlign dateTime accessKey tabIndex ' +
2370
+ 'encType maxLength readOnly longDesc frameBorder').each(function(attr) {
2371
+ Element._attributeTranslations.write.names[attr.toLowerCase()] = attr;
2372
+ Element._attributeTranslations.has[attr.toLowerCase()] = attr;
2373
+ });
2374
+
2375
+ (function(v) {
2376
+ Object.extend(v, {
2377
+ href: v._getAttr,
2378
+ src: v._getAttr,
2379
+ type: v._getAttr,
2380
+ action: v._getAttrNode,
2381
+ disabled: v._flag,
2382
+ checked: v._flag,
2383
+ readonly: v._flag,
2384
+ multiple: v._flag,
2385
+ onload: v._getEv,
2386
+ onunload: v._getEv,
2387
+ onclick: v._getEv,
2388
+ ondblclick: v._getEv,
2389
+ onmousedown: v._getEv,
2390
+ onmouseup: v._getEv,
2391
+ onmouseover: v._getEv,
2392
+ onmousemove: v._getEv,
2393
+ onmouseout: v._getEv,
2394
+ onfocus: v._getEv,
2395
+ onblur: v._getEv,
2396
+ onkeypress: v._getEv,
2397
+ onkeydown: v._getEv,
2398
+ onkeyup: v._getEv,
2399
+ onsubmit: v._getEv,
2400
+ onreset: v._getEv,
2401
+ onselect: v._getEv,
2402
+ onchange: v._getEv
2403
+ });
2404
+ })(Element._attributeTranslations.read.values);
2405
+ }
2406
+
2407
+ else if (Prototype.Browser.Gecko && /rv:1\.8\.0/.test(navigator.userAgent)) {
2408
+ Element.Methods.setOpacity = function(element, value) {
2409
+ element = $(element);
2410
+ element.style.opacity = (value == 1) ? 0.999999 :
2411
+ (value === '') ? '' : (value < 0.00001) ? 0 : value;
2412
+ return element;
2413
+ };
2414
+ }
2415
+
2416
+ else if (Prototype.Browser.WebKit) {
2417
+ Element.Methods.setOpacity = function(element, value) {
2418
+ element = $(element);
2419
+ element.style.opacity = (value == 1 || value === '') ? '' :
2420
+ (value < 0.00001) ? 0 : value;
2421
+
2422
+ if (value == 1)
2423
+ if(element.tagName.toUpperCase() == 'IMG' && element.width) {
2424
+ element.width++; element.width--;
2425
+ } else try {
2426
+ var n = document.createTextNode(' ');
2427
+ element.appendChild(n);
2428
+ element.removeChild(n);
2429
+ } catch (e) { }
2430
+
2431
+ return element;
2432
+ };
2433
+
2434
+ // Safari returns margins on body which is incorrect if the child is absolutely
2435
+ // positioned. For performance reasons, redefine Element#cumulativeOffset for
2436
+ // KHTML/WebKit only.
2437
+ Element.Methods.cumulativeOffset = function(element) {
2438
+ var valueT = 0, valueL = 0;
2439
+ do {
2440
+ valueT += element.offsetTop || 0;
2441
+ valueL += element.offsetLeft || 0;
2442
+ if (element.offsetParent == document.body)
2443
+ if (Element.getStyle(element, 'position') == 'absolute') break;
2444
+
2445
+ element = element.offsetParent;
2446
+ } while (element);
2447
+
2448
+ return Element._returnOffset(valueL, valueT);
2449
+ };
2450
+ }
2451
+
2452
+ if (Prototype.Browser.IE || Prototype.Browser.Opera) {
2453
+ // IE and Opera are missing .innerHTML support for TABLE-related and SELECT elements
2454
+ Element.Methods.update = function(element, content) {
2455
+ element = $(element);
2456
+
2457
+ if (content && content.toElement) content = content.toElement();
2458
+ if (Object.isElement(content)) return element.update().insert(content);
2459
+
2460
+ content = Object.toHTML(content);
2461
+ var tagName = element.tagName.toUpperCase();
2462
+
2463
+ if (tagName in Element._insertionTranslations.tags) {
2464
+ $A(element.childNodes).each(function(node) { element.removeChild(node) });
2465
+ Element._getContentFromAnonymousElement(tagName, content.stripScripts())
2466
+ .each(function(node) { element.appendChild(node) });
2467
+ }
2468
+ else element.innerHTML = content.stripScripts();
2469
+
2470
+ content.evalScripts.bind(content).defer();
2471
+ return element;
2472
+ };
2473
+ }
2474
+
2475
+ if ('outerHTML' in document.createElement('div')) {
2476
+ Element.Methods.replace = function(element, content) {
2477
+ element = $(element);
2478
+
2479
+ if (content && content.toElement) content = content.toElement();
2480
+ if (Object.isElement(content)) {
2481
+ element.parentNode.replaceChild(content, element);
2482
+ return element;
2483
+ }
2484
+
2485
+ content = Object.toHTML(content);
2486
+ var parent = element.parentNode, tagName = parent.tagName.toUpperCase();
2487
+
2488
+ if (Element._insertionTranslations.tags[tagName]) {
2489
+ var nextSibling = element.next();
2490
+ var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
2491
+ parent.removeChild(element);
2492
+ if (nextSibling)
2493
+ fragments.each(function(node) { parent.insertBefore(node, nextSibling) });
2494
+ else
2495
+ fragments.each(function(node) { parent.appendChild(node) });
2496
+ }
2497
+ else element.outerHTML = content.stripScripts();
2498
+
2499
+ content.evalScripts.bind(content).defer();
2500
+ return element;
2501
+ };
2502
+ }
2503
+
2504
+ Element._returnOffset = function(l, t) {
2505
+ var result = [l, t];
2506
+ result.left = l;
2507
+ result.top = t;
2508
+ return result;
2509
+ };
2510
+
2511
+ Element._getContentFromAnonymousElement = function(tagName, html) {
2512
+ var div = new Element('div'), t = Element._insertionTranslations.tags[tagName];
2513
+ if (t) {
2514
+ div.innerHTML = t[0] + html + t[1];
2515
+ t[2].times(function() { div = div.firstChild });
2516
+ } else div.innerHTML = html;
2517
+ return $A(div.childNodes);
2518
+ };
2519
+
2520
+ Element._insertionTranslations = {
2521
+ before: function(element, node) {
2522
+ element.parentNode.insertBefore(node, element);
2523
+ },
2524
+ top: function(element, node) {
2525
+ element.insertBefore(node, element.firstChild);
2526
+ },
2527
+ bottom: function(element, node) {
2528
+ element.appendChild(node);
2529
+ },
2530
+ after: function(element, node) {
2531
+ element.parentNode.insertBefore(node, element.nextSibling);
2532
+ },
2533
+ tags: {
2534
+ TABLE: ['<table>', '</table>', 1],
2535
+ TBODY: ['<table><tbody>', '</tbody></table>', 2],
2536
+ TR: ['<table><tbody><tr>', '</tr></tbody></table>', 3],
2537
+ TD: ['<table><tbody><tr><td>', '</td></tr></tbody></table>', 4],
2538
+ SELECT: ['<select>', '</select>', 1]
2539
+ }
2540
+ };
2541
+
2542
+ (function() {
2543
+ Object.extend(this.tags, {
2544
+ THEAD: this.tags.TBODY,
2545
+ TFOOT: this.tags.TBODY,
2546
+ TH: this.tags.TD
2547
+ });
2548
+ }).call(Element._insertionTranslations);
2549
+
2550
+ Element.Methods.Simulated = {
2551
+ hasAttribute: function(element, attribute) {
2552
+ attribute = Element._attributeTranslations.has[attribute] || attribute;
2553
+ var node = $(element).getAttributeNode(attribute);
2554
+ return !!(node && node.specified);
2555
+ }
2556
+ };
2557
+
2558
+ Element.Methods.ByTag = { };
2559
+
2560
+ Object.extend(Element, Element.Methods);
2561
+
2562
+ if (!Prototype.BrowserFeatures.ElementExtensions &&
2563
+ document.createElement('div')['__proto__']) {
2564
+ window.HTMLElement = { };
2565
+ window.HTMLElement.prototype = document.createElement('div')['__proto__'];
2566
+ Prototype.BrowserFeatures.ElementExtensions = true;
2567
+ }
2568
+
2569
+ Element.extend = (function() {
2570
+ if (Prototype.BrowserFeatures.SpecificElementExtensions)
2571
+ return Prototype.K;
2572
+
2573
+ var Methods = { }, ByTag = Element.Methods.ByTag;
2574
+
2575
+ var extend = Object.extend(function(element) {
2576
+ if (!element || element._extendedByPrototype ||
2577
+ element.nodeType != 1 || element == window) return element;
2578
+
2579
+ var methods = Object.clone(Methods),
2580
+ tagName = element.tagName.toUpperCase(), property, value;
2581
+
2582
+ // extend methods for specific tags
2583
+ if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]);
2584
+
2585
+ for (property in methods) {
2586
+ value = methods[property];
2587
+ if (Object.isFunction(value) && !(property in element))
2588
+ element[property] = value.methodize();
2589
+ }
2590
+
2591
+ element._extendedByPrototype = Prototype.emptyFunction;
2592
+ return element;
2593
+
2594
+ }, {
2595
+ refresh: function() {
2596
+ // extend methods for all tags (Safari doesn't need this)
2597
+ if (!Prototype.BrowserFeatures.ElementExtensions) {
2598
+ Object.extend(Methods, Element.Methods);
2599
+ Object.extend(Methods, Element.Methods.Simulated);
2600
+ }
2601
+ }
2602
+ });
2603
+
2604
+ extend.refresh();
2605
+ return extend;
2606
+ })();
2607
+
2608
+ Element.hasAttribute = function(element, attribute) {
2609
+ if (element.hasAttribute) return element.hasAttribute(attribute);
2610
+ return Element.Methods.Simulated.hasAttribute(element, attribute);
2611
+ };
2612
+
2613
+ Element.addMethods = function(methods) {
2614
+ var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag;
2615
+
2616
+ if (!methods) {
2617
+ Object.extend(Form, Form.Methods);
2618
+ Object.extend(Form.Element, Form.Element.Methods);
2619
+ Object.extend(Element.Methods.ByTag, {
2620
+ "FORM": Object.clone(Form.Methods),
2621
+ "INPUT": Object.clone(Form.Element.Methods),
2622
+ "SELECT": Object.clone(Form.Element.Methods),
2623
+ "TEXTAREA": Object.clone(Form.Element.Methods)
2624
+ });
2625
+ }
2626
+
2627
+ if (arguments.length == 2) {
2628
+ var tagName = methods;
2629
+ methods = arguments[1];
2630
+ }
2631
+
2632
+ if (!tagName) Object.extend(Element.Methods, methods || { });
2633
+ else {
2634
+ if (Object.isArray(tagName)) tagName.each(extend);
2635
+ else extend(tagName);
2636
+ }
2637
+
2638
+ function extend(tagName) {
2639
+ tagName = tagName.toUpperCase();
2640
+ if (!Element.Methods.ByTag[tagName])
2641
+ Element.Methods.ByTag[tagName] = { };
2642
+ Object.extend(Element.Methods.ByTag[tagName], methods);
2643
+ }
2644
+
2645
+ function copy(methods, destination, onlyIfAbsent) {
2646
+ onlyIfAbsent = onlyIfAbsent || false;
2647
+ for (var property in methods) {
2648
+ var value = methods[property];
2649
+ if (!Object.isFunction(value)) continue;
2650
+ if (!onlyIfAbsent || !(property in destination))
2651
+ destination[property] = value.methodize();
2652
+ }
2653
+ }
2654
+
2655
+ function findDOMClass(tagName) {
2656
+ var klass;
2657
+ var trans = {
2658
+ "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph",
2659
+ "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": "DList",
2660
+ "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": "Heading",
2661
+ "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote",
2662
+ "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", "CAPTION":
2663
+ "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD":
2664
+ "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", "TR":
2665
+ "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET":
2666
+ "FrameSet", "IFRAME": "IFrame"
2667
+ };
2668
+ if (trans[tagName]) klass = 'HTML' + trans[tagName] + 'Element';
2669
+ if (window[klass]) return window[klass];
2670
+ klass = 'HTML' + tagName + 'Element';
2671
+ if (window[klass]) return window[klass];
2672
+ klass = 'HTML' + tagName.capitalize() + 'Element';
2673
+ if (window[klass]) return window[klass];
2674
+
2675
+ window[klass] = { };
2676
+ window[klass].prototype = document.createElement(tagName)['__proto__'];
2677
+ return window[klass];
2678
+ }
2679
+
2680
+ if (F.ElementExtensions) {
2681
+ copy(Element.Methods, HTMLElement.prototype);
2682
+ copy(Element.Methods.Simulated, HTMLElement.prototype, true);
2683
+ }
2684
+
2685
+ if (F.SpecificElementExtensions) {
2686
+ for (var tag in Element.Methods.ByTag) {
2687
+ var klass = findDOMClass(tag);
2688
+ if (Object.isUndefined(klass)) continue;
2689
+ copy(T[tag], klass.prototype);
2690
+ }
2691
+ }
2692
+
2693
+ Object.extend(Element, Element.Methods);
2694
+ delete Element.ByTag;
2695
+
2696
+ if (Element.extend.refresh) Element.extend.refresh();
2697
+ Element.cache = { };
2698
+ };
2699
+
2700
+ document.viewport = {
2701
+ getDimensions: function() {
2702
+ var dimensions = { }, B = Prototype.Browser;
2703
+ $w('width height').each(function(d) {
2704
+ var D = d.capitalize();
2705
+ if (B.WebKit && !document.evaluate) {
2706
+ // Safari <3.0 needs self.innerWidth/Height
2707
+ dimensions[d] = self['inner' + D];
2708
+ } else if (B.Opera && parseFloat(window.opera.version()) < 9.5) {
2709
+ // Opera <9.5 needs document.body.clientWidth/Height
2710
+ dimensions[d] = document.body['client' + D]
2711
+ } else {
2712
+ dimensions[d] = document.documentElement['client' + D];
2713
+ }
2714
+ });
2715
+ return dimensions;
2716
+ },
2717
+
2718
+ getWidth: function() {
2719
+ return this.getDimensions().width;
2720
+ },
2721
+
2722
+ getHeight: function() {
2723
+ return this.getDimensions().height;
2724
+ },
2725
+
2726
+ getScrollOffsets: function() {
2727
+ return Element._returnOffset(
2728
+ window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft,
2729
+ window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop);
2730
+ }
2731
+ };
2732
+ /* Portions of the Selector class are derived from Jack Slocum's DomQuery,
2733
+ * part of YUI-Ext version 0.40, distributed under the terms of an MIT-style
2734
+ * license. Please see http://www.yui-ext.com/ for more information. */
2735
+
2736
+ var Selector = Class.create({
2737
+ initialize: function(expression) {
2738
+ this.expression = expression.strip();
2739
+
2740
+ if (this.shouldUseSelectorsAPI()) {
2741
+ this.mode = 'selectorsAPI';
2742
+ } else if (this.shouldUseXPath()) {
2743
+ this.mode = 'xpath';
2744
+ this.compileXPathMatcher();
2745
+ } else {
2746
+ this.mode = "normal";
2747
+ this.compileMatcher();
2748
+ }
2749
+
2750
+ },
2751
+
2752
+ shouldUseXPath: function() {
2753
+ if (!Prototype.BrowserFeatures.XPath) return false;
2754
+
2755
+ var e = this.expression;
2756
+
2757
+ // Safari 3 chokes on :*-of-type and :empty
2758
+ if (Prototype.Browser.WebKit &&
2759
+ (e.include("-of-type") || e.include(":empty")))
2760
+ return false;
2761
+
2762
+ // XPath can't do namespaced attributes, nor can it read
2763
+ // the "checked" property from DOM nodes
2764
+ if ((/(\[[\w-]*?:|:checked)/).test(e))
2765
+ return false;
2766
+
2767
+ return true;
2768
+ },
2769
+
2770
+ shouldUseSelectorsAPI: function() {
2771
+ if (!Prototype.BrowserFeatures.SelectorsAPI) return false;
2772
+
2773
+ if (!Selector._div) Selector._div = new Element('div');
2774
+
2775
+ // Make sure the browser treats the selector as valid. Test on an
2776
+ // isolated element to minimize cost of this check.
2777
+ try {
2778
+ Selector._div.querySelector(this.expression);
2779
+ } catch(e) {
2780
+ return false;
2781
+ }
2782
+
2783
+ return true;
2784
+ },
2785
+
2786
+ compileMatcher: function() {
2787
+ var e = this.expression, ps = Selector.patterns, h = Selector.handlers,
2788
+ c = Selector.criteria, le, p, m;
2789
+
2790
+ if (Selector._cache[e]) {
2791
+ this.matcher = Selector._cache[e];
2792
+ return;
2793
+ }
2794
+
2795
+ this.matcher = ["this.matcher = function(root) {",
2796
+ "var r = root, h = Selector.handlers, c = false, n;"];
2797
+
2798
+ while (e && le != e && (/\S/).test(e)) {
2799
+ le = e;
2800
+ for (var i in ps) {
2801
+ p = ps[i];
2802
+ if (m = e.match(p)) {
2803
+ this.matcher.push(Object.isFunction(c[i]) ? c[i](m) :
2804
+ new Template(c[i]).evaluate(m));
2805
+ e = e.replace(m[0], '');
2806
+ break;
2807
+ }
2808
+ }
2809
+ }
2810
+
2811
+ this.matcher.push("return h.unique(n);\n}");
2812
+ eval(this.matcher.join('\n'));
2813
+ Selector._cache[this.expression] = this.matcher;
2814
+ },
2815
+
2816
+ compileXPathMatcher: function() {
2817
+ var e = this.expression, ps = Selector.patterns,
2818
+ x = Selector.xpath, le, m;
2819
+
2820
+ if (Selector._cache[e]) {
2821
+ this.xpath = Selector._cache[e]; return;
2822
+ }
2823
+
2824
+ this.matcher = ['.//*'];
2825
+ while (e && le != e && (/\S/).test(e)) {
2826
+ le = e;
2827
+ for (var i in ps) {
2828
+ if (m = e.match(ps[i])) {
2829
+ this.matcher.push(Object.isFunction(x[i]) ? x[i](m) :
2830
+ new Template(x[i]).evaluate(m));
2831
+ e = e.replace(m[0], '');
2832
+ break;
2833
+ }
2834
+ }
2835
+ }
2836
+
2837
+ this.xpath = this.matcher.join('');
2838
+ Selector._cache[this.expression] = this.xpath;
2839
+ },
2840
+
2841
+ findElements: function(root) {
2842
+ root = root || document;
2843
+ var e = this.expression, results;
2844
+
2845
+ switch (this.mode) {
2846
+ case 'selectorsAPI':
2847
+ // querySelectorAll queries document-wide, then filters to descendants
2848
+ // of the context element. That's not what we want.
2849
+ // Add an explicit context to the selector if necessary.
2850
+ if (root !== document) {
2851
+ var oldId = root.id, id = $(root).identify();
2852
+ e = "#" + id + " " + e;
2853
+ }
2854
+
2855
+ results = $A(root.querySelectorAll(e)).map(Element.extend);
2856
+ root.id = oldId;
2857
+
2858
+ return results;
2859
+ case 'xpath':
2860
+ return document._getElementsByXPath(this.xpath, root);
2861
+ default:
2862
+ return this.matcher(root);
2863
+ }
2864
+ },
2865
+
2866
+ match: function(element) {
2867
+ this.tokens = [];
2868
+
2869
+ var e = this.expression, ps = Selector.patterns, as = Selector.assertions;
2870
+ var le, p, m;
2871
+
2872
+ while (e && le !== e && (/\S/).test(e)) {
2873
+ le = e;
2874
+ for (var i in ps) {
2875
+ p = ps[i];
2876
+ if (m = e.match(p)) {
2877
+ // use the Selector.assertions methods unless the selector
2878
+ // is too complex.
2879
+ if (as[i]) {
2880
+ this.tokens.push([i, Object.clone(m)]);
2881
+ e = e.replace(m[0], '');
2882
+ } else {
2883
+ // reluctantly do a document-wide search
2884
+ // and look for a match in the array
2885
+ return this.findElements(document).include(element);
2886
+ }
2887
+ }
2888
+ }
2889
+ }
2890
+
2891
+ var match = true, name, matches;
2892
+ for (var i = 0, token; token = this.tokens[i]; i++) {
2893
+ name = token[0], matches = token[1];
2894
+ if (!Selector.assertions[name](element, matches)) {
2895
+ match = false; break;
2896
+ }
2897
+ }
2898
+
2899
+ return match;
2900
+ },
2901
+
2902
+ toString: function() {
2903
+ return this.expression;
2904
+ },
2905
+
2906
+ inspect: function() {
2907
+ return "#<Selector:" + this.expression.inspect() + ">";
2908
+ }
2909
+ });
2910
+
2911
+ Object.extend(Selector, {
2912
+ _cache: { },
2913
+
2914
+ xpath: {
2915
+ descendant: "//*",
2916
+ child: "/*",
2917
+ adjacent: "/following-sibling::*[1]",
2918
+ laterSibling: '/following-sibling::*',
2919
+ tagName: function(m) {
2920
+ if (m[1] == '*') return '';
2921
+ return "[local-name()='" + m[1].toLowerCase() +
2922
+ "' or local-name()='" + m[1].toUpperCase() + "']";
2923
+ },
2924
+ className: "[contains(concat(' ', @class, ' '), ' #{1} ')]",
2925
+ id: "[@id='#{1}']",
2926
+ attrPresence: function(m) {
2927
+ m[1] = m[1].toLowerCase();
2928
+ return new Template("[@#{1}]").evaluate(m);
2929
+ },
2930
+ attr: function(m) {
2931
+ m[1] = m[1].toLowerCase();
2932
+ m[3] = m[5] || m[6];
2933
+ return new Template(Selector.xpath.operators[m[2]]).evaluate(m);
2934
+ },
2935
+ pseudo: function(m) {
2936
+ var h = Selector.xpath.pseudos[m[1]];
2937
+ if (!h) return '';
2938
+ if (Object.isFunction(h)) return h(m);
2939
+ return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m);
2940
+ },
2941
+ operators: {
2942
+ '=': "[@#{1}='#{3}']",
2943
+ '!=': "[@#{1}!='#{3}']",
2944
+ '^=': "[starts-with(@#{1}, '#{3}')]",
2945
+ '$=': "[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']",
2946
+ '*=': "[contains(@#{1}, '#{3}')]",
2947
+ '~=': "[contains(concat(' ', @#{1}, ' '), ' #{3} ')]",
2948
+ '|=': "[contains(concat('-', @#{1}, '-'), '-#{3}-')]"
2949
+ },
2950
+ pseudos: {
2951
+ 'first-child': '[not(preceding-sibling::*)]',
2952
+ 'last-child': '[not(following-sibling::*)]',
2953
+ 'only-child': '[not(preceding-sibling::* or following-sibling::*)]',
2954
+ 'empty': "[count(*) = 0 and (count(text()) = 0)]",
2955
+ 'checked': "[@checked]",
2956
+ 'disabled': "[(@disabled) and (@type!='hidden')]",
2957
+ 'enabled': "[not(@disabled) and (@type!='hidden')]",
2958
+ 'not': function(m) {
2959
+ var e = m[6], p = Selector.patterns,
2960
+ x = Selector.xpath, le, v;
2961
+
2962
+ var exclusion = [];
2963
+ while (e && le != e && (/\S/).test(e)) {
2964
+ le = e;
2965
+ for (var i in p) {
2966
+ if (m = e.match(p[i])) {
2967
+ v = Object.isFunction(x[i]) ? x[i](m) : new Template(x[i]).evaluate(m);
2968
+ exclusion.push("(" + v.substring(1, v.length - 1) + ")");
2969
+ e = e.replace(m[0], '');
2970
+ break;
2971
+ }
2972
+ }
2973
+ }
2974
+ return "[not(" + exclusion.join(" and ") + ")]";
2975
+ },
2976
+ 'nth-child': function(m) {
2977
+ return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ", m);
2978
+ },
2979
+ 'nth-last-child': function(m) {
2980
+ return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ", m);
2981
+ },
2982
+ 'nth-of-type': function(m) {
2983
+ return Selector.xpath.pseudos.nth("position() ", m);
2984
+ },
2985
+ 'nth-last-of-type': function(m) {
2986
+ return Selector.xpath.pseudos.nth("(last() + 1 - position()) ", m);
2987
+ },
2988
+ 'first-of-type': function(m) {
2989
+ m[6] = "1"; return Selector.xpath.pseudos['nth-of-type'](m);
2990
+ },
2991
+ 'last-of-type': function(m) {
2992
+ m[6] = "1"; return Selector.xpath.pseudos['nth-last-of-type'](m);
2993
+ },
2994
+ 'only-of-type': function(m) {
2995
+ var p = Selector.xpath.pseudos; return p['first-of-type'](m) + p['last-of-type'](m);
2996
+ },
2997
+ nth: function(fragment, m) {
2998
+ var mm, formula = m[6], predicate;
2999
+ if (formula == 'even') formula = '2n+0';
3000
+ if (formula == 'odd') formula = '2n+1';
3001
+ if (mm = formula.match(/^(\d+)$/)) // digit only
3002
+ return '[' + fragment + "= " + mm[1] + ']';
3003
+ if (mm = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b
3004
+ if (mm[1] == "-") mm[1] = -1;
3005
+ var a = mm[1] ? Number(mm[1]) : 1;
3006
+ var b = mm[2] ? Number(mm[2]) : 0;
3007
+ predicate = "[((#{fragment} - #{b}) mod #{a} = 0) and " +
3008
+ "((#{fragment} - #{b}) div #{a} >= 0)]";
3009
+ return new Template(predicate).evaluate({
3010
+ fragment: fragment, a: a, b: b });
3011
+ }
3012
+ }
3013
+ }
3014
+ },
3015
+
3016
+ criteria: {
3017
+ tagName: 'n = h.tagName(n, r, "#{1}", c); c = false;',
3018
+ className: 'n = h.className(n, r, "#{1}", c); c = false;',
3019
+ id: 'n = h.id(n, r, "#{1}", c); c = false;',
3020
+ attrPresence: 'n = h.attrPresence(n, r, "#{1}", c); c = false;',
3021
+ attr: function(m) {
3022
+ m[3] = (m[5] || m[6]);
3023
+ return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;').evaluate(m);
3024
+ },
3025
+ pseudo: function(m) {
3026
+ if (m[6]) m[6] = m[6].replace(/"/g, '\\"');
3027
+ return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(m);
3028
+ },
3029
+ descendant: 'c = "descendant";',
3030
+ child: 'c = "child";',
3031
+ adjacent: 'c = "adjacent";',
3032
+ laterSibling: 'c = "laterSibling";'
3033
+ },
3034
+
3035
+ patterns: {
3036
+ // combinators must be listed first
3037
+ // (and descendant needs to be last combinator)
3038
+ laterSibling: /^\s*~\s*/,
3039
+ child: /^\s*>\s*/,
3040
+ adjacent: /^\s*\+\s*/,
3041
+ descendant: /^\s/,
3042
+
3043
+ // selectors follow
3044
+ tagName: /^\s*(\*|[\w\-]+)(\b|$)?/,
3045
+ id: /^#([\w\-\*]+)(\b|$)/,
3046
+ className: /^\.([\w\-\*]+)(\b|$)/,
3047
+ pseudo:
3048
+ /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/,
3049
+ attrPresence: /^\[((?:[\w]+:)?[\w]+)\]/,
3050
+ attr: /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/
3051
+ },
3052
+
3053
+ // for Selector.match and Element#match
3054
+ assertions: {
3055
+ tagName: function(element, matches) {
3056
+ return matches[1].toUpperCase() == element.tagName.toUpperCase();
3057
+ },
3058
+
3059
+ className: function(element, matches) {
3060
+ return Element.hasClassName(element, matches[1]);
3061
+ },
3062
+
3063
+ id: function(element, matches) {
3064
+ return element.id === matches[1];
3065
+ },
3066
+
3067
+ attrPresence: function(element, matches) {
3068
+ return Element.hasAttribute(element, matches[1]);
3069
+ },
3070
+
3071
+ attr: function(element, matches) {
3072
+ var nodeValue = Element.readAttribute(element, matches[1]);
3073
+ return nodeValue && Selector.operators[matches[2]](nodeValue, matches[5] || matches[6]);
3074
+ }
3075
+ },
3076
+
3077
+ handlers: {
3078
+ // UTILITY FUNCTIONS
3079
+ // joins two collections
3080
+ concat: function(a, b) {
3081
+ for (var i = 0, node; node = b[i]; i++)
3082
+ a.push(node);
3083
+ return a;
3084
+ },
3085
+
3086
+ // marks an array of nodes for counting
3087
+ mark: function(nodes) {
3088
+ var _true = Prototype.emptyFunction;
3089
+ for (var i = 0, node; node = nodes[i]; i++)
3090
+ node._countedByPrototype = _true;
3091
+ return nodes;
3092
+ },
3093
+
3094
+ unmark: function(nodes) {
3095
+ for (var i = 0, node; node = nodes[i]; i++)
3096
+ node._countedByPrototype = undefined;
3097
+ return nodes;
3098
+ },
3099
+
3100
+ // mark each child node with its position (for nth calls)
3101
+ // "ofType" flag indicates whether we're indexing for nth-of-type
3102
+ // rather than nth-child
3103
+ index: function(parentNode, reverse, ofType) {
3104
+ parentNode._countedByPrototype = Prototype.emptyFunction;
3105
+ if (reverse) {
3106
+ for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) {
3107
+ var node = nodes[i];
3108
+ if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++;
3109
+ }
3110
+ } else {
3111
+ for (var i = 0, j = 1, nodes = parentNode.childNodes; node = nodes[i]; i++)
3112
+ if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++;
3113
+ }
3114
+ },
3115
+
3116
+ // filters out duplicates and extends all nodes
3117
+ unique: function(nodes) {
3118
+ if (nodes.length == 0) return nodes;
3119
+ var results = [], n;
3120
+ for (var i = 0, l = nodes.length; i < l; i++)
3121
+ if (!(n = nodes[i])._countedByPrototype) {
3122
+ n._countedByPrototype = Prototype.emptyFunction;
3123
+ results.push(Element.extend(n));
3124
+ }
3125
+ return Selector.handlers.unmark(results);
3126
+ },
3127
+
3128
+ // COMBINATOR FUNCTIONS
3129
+ descendant: function(nodes) {
3130
+ var h = Selector.handlers;
3131
+ for (var i = 0, results = [], node; node = nodes[i]; i++)
3132
+ h.concat(results, node.getElementsByTagName('*'));
3133
+ return results;
3134
+ },
3135
+
3136
+ child: function(nodes) {
3137
+ var h = Selector.handlers;
3138
+ for (var i = 0, results = [], node; node = nodes[i]; i++) {
3139
+ for (var j = 0, child; child = node.childNodes[j]; j++)
3140
+ if (child.nodeType == 1 && child.tagName != '!') results.push(child);
3141
+ }
3142
+ return results;
3143
+ },
3144
+
3145
+ adjacent: function(nodes) {
3146
+ for (var i = 0, results = [], node; node = nodes[i]; i++) {
3147
+ var next = this.nextElementSibling(node);
3148
+ if (next) results.push(next);
3149
+ }
3150
+ return results;
3151
+ },
3152
+
3153
+ laterSibling: function(nodes) {
3154
+ var h = Selector.handlers;
3155
+ for (var i = 0, results = [], node; node = nodes[i]; i++)
3156
+ h.concat(results, Element.nextSiblings(node));
3157
+ return results;
3158
+ },
3159
+
3160
+ nextElementSibling: function(node) {
3161
+ while (node = node.nextSibling)
3162
+ if (node.nodeType == 1) return node;
3163
+ return null;
3164
+ },
3165
+
3166
+ previousElementSibling: function(node) {
3167
+ while (node = node.previousSibling)
3168
+ if (node.nodeType == 1) return node;
3169
+ return null;
3170
+ },
3171
+
3172
+ // TOKEN FUNCTIONS
3173
+ tagName: function(nodes, root, tagName, combinator) {
3174
+ var uTagName = tagName.toUpperCase();
3175
+ var results = [], h = Selector.handlers;
3176
+ if (nodes) {
3177
+ if (combinator) {
3178
+ // fastlane for ordinary descendant combinators
3179
+ if (combinator == "descendant") {
3180
+ for (var i = 0, node; node = nodes[i]; i++)
3181
+ h.concat(results, node.getElementsByTagName(tagName));
3182
+ return results;
3183
+ } else nodes = this[combinator](nodes);
3184
+ if (tagName == "*") return nodes;
3185
+ }
3186
+ for (var i = 0, node; node = nodes[i]; i++)
3187
+ if (node.tagName.toUpperCase() === uTagName) results.push(node);
3188
+ return results;
3189
+ } else return root.getElementsByTagName(tagName);
3190
+ },
3191
+
3192
+ id: function(nodes, root, id, combinator) {
3193
+ var targetNode = $(id), h = Selector.handlers;
3194
+ if (!targetNode) return [];
3195
+ if (!nodes && root == document) return [targetNode];
3196
+ if (nodes) {
3197
+ if (combinator) {
3198
+ if (combinator == 'child') {
3199
+ for (var i = 0, node; node = nodes[i]; i++)
3200
+ if (targetNode.parentNode == node) return [targetNode];
3201
+ } else if (combinator == 'descendant') {
3202
+ for (var i = 0, node; node = nodes[i]; i++)
3203
+ if (Element.descendantOf(targetNode, node)) return [targetNode];
3204
+ } else if (combinator == 'adjacent') {
3205
+ for (var i = 0, node; node = nodes[i]; i++)
3206
+ if (Selector.handlers.previousElementSibling(targetNode) == node)
3207
+ return [targetNode];
3208
+ } else nodes = h[combinator](nodes);
3209
+ }
3210
+ for (var i = 0, node; node = nodes[i]; i++)
3211
+ if (node == targetNode) return [targetNode];
3212
+ return [];
3213
+ }
3214
+ return (targetNode && Element.descendantOf(targetNode, root)) ? [targetNode] : [];
3215
+ },
3216
+
3217
+ className: function(nodes, root, className, combinator) {
3218
+ if (nodes && combinator) nodes = this[combinator](nodes);
3219
+ return Selector.handlers.byClassName(nodes, root, className);
3220
+ },
3221
+
3222
+ byClassName: function(nodes, root, className) {
3223
+ if (!nodes) nodes = Selector.handlers.descendant([root]);
3224
+ var needle = ' ' + className + ' ';
3225
+ for (var i = 0, results = [], node, nodeClassName; node = nodes[i]; i++) {
3226
+ nodeClassName = node.className;
3227
+ if (nodeClassName.length == 0) continue;
3228
+ if (nodeClassName == className || (' ' + nodeClassName + ' ').include(needle))
3229
+ results.push(node);
3230
+ }
3231
+ return results;
3232
+ },
3233
+
3234
+ attrPresence: function(nodes, root, attr, combinator) {
3235
+ if (!nodes) nodes = root.getElementsByTagName("*");
3236
+ if (nodes && combinator) nodes = this[combinator](nodes);
3237
+ var results = [];
3238
+ for (var i = 0, node; node = nodes[i]; i++)
3239
+ if (Element.hasAttribute(node, attr)) results.push(node);
3240
+ return results;
3241
+ },
3242
+
3243
+ attr: function(nodes, root, attr, value, operator, combinator) {
3244
+ if (!nodes) nodes = root.getElementsByTagName("*");
3245
+ if (nodes && combinator) nodes = this[combinator](nodes);
3246
+ var handler = Selector.operators[operator], results = [];
3247
+ for (var i = 0, node; node = nodes[i]; i++) {
3248
+ var nodeValue = Element.readAttribute(node, attr);
3249
+ if (nodeValue === null) continue;
3250
+ if (handler(nodeValue, value)) results.push(node);
3251
+ }
3252
+ return results;
3253
+ },
3254
+
3255
+ pseudo: function(nodes, name, value, root, combinator) {
3256
+ if (nodes && combinator) nodes = this[combinator](nodes);
3257
+ if (!nodes) nodes = root.getElementsByTagName("*");
3258
+ return Selector.pseudos[name](nodes, value, root);
3259
+ }
3260
+ },
3261
+
3262
+ pseudos: {
3263
+ 'first-child': function(nodes, value, root) {
3264
+ for (var i = 0, results = [], node; node = nodes[i]; i++) {
3265
+ if (Selector.handlers.previousElementSibling(node)) continue;
3266
+ results.push(node);
3267
+ }
3268
+ return results;
3269
+ },
3270
+ 'last-child': function(nodes, value, root) {
3271
+ for (var i = 0, results = [], node; node = nodes[i]; i++) {
3272
+ if (Selector.handlers.nextElementSibling(node)) continue;
3273
+ results.push(node);
3274
+ }
3275
+ return results;
3276
+ },
3277
+ 'only-child': function(nodes, value, root) {
3278
+ var h = Selector.handlers;
3279
+ for (var i = 0, results = [], node; node = nodes[i]; i++)
3280
+ if (!h.previousElementSibling(node) && !h.nextElementSibling(node))
3281
+ results.push(node);
3282
+ return results;
3283
+ },
3284
+ 'nth-child': function(nodes, formula, root) {
3285
+ return Selector.pseudos.nth(nodes, formula, root);
3286
+ },
3287
+ 'nth-last-child': function(nodes, formula, root) {
3288
+ return Selector.pseudos.nth(nodes, formula, root, true);
3289
+ },
3290
+ 'nth-of-type': function(nodes, formula, root) {
3291
+ return Selector.pseudos.nth(nodes, formula, root, false, true);
3292
+ },
3293
+ 'nth-last-of-type': function(nodes, formula, root) {
3294
+ return Selector.pseudos.nth(nodes, formula, root, true, true);
3295
+ },
3296
+ 'first-of-type': function(nodes, formula, root) {
3297
+ return Selector.pseudos.nth(nodes, "1", root, false, true);
3298
+ },
3299
+ 'last-of-type': function(nodes, formula, root) {
3300
+ return Selector.pseudos.nth(nodes, "1", root, true, true);
3301
+ },
3302
+ 'only-of-type': function(nodes, formula, root) {
3303
+ var p = Selector.pseudos;
3304
+ return p['last-of-type'](p['first-of-type'](nodes, formula, root), formula, root);
3305
+ },
3306
+
3307
+ // handles the an+b logic
3308
+ getIndices: function(a, b, total) {
3309
+ if (a == 0) return b > 0 ? [b] : [];
3310
+ return $R(1, total).inject([], function(memo, i) {
3311
+ if (0 == (i - b) % a && (i - b) / a >= 0) memo.push(i);
3312
+ return memo;
3313
+ });
3314
+ },
3315
+
3316
+ // handles nth(-last)-child, nth(-last)-of-type, and (first|last)-of-type
3317
+ nth: function(nodes, formula, root, reverse, ofType) {
3318
+ if (nodes.length == 0) return [];
3319
+ if (formula == 'even') formula = '2n+0';
3320
+ if (formula == 'odd') formula = '2n+1';
3321
+ var h = Selector.handlers, results = [], indexed = [], m;
3322
+ h.mark(nodes);
3323
+ for (var i = 0, node; node = nodes[i]; i++) {
3324
+ if (!node.parentNode._countedByPrototype) {
3325
+ h.index(node.parentNode, reverse, ofType);
3326
+ indexed.push(node.parentNode);
3327
+ }
3328
+ }
3329
+ if (formula.match(/^\d+$/)) { // just a number
3330
+ formula = Number(formula);
3331
+ for (var i = 0, node; node = nodes[i]; i++)
3332
+ if (node.nodeIndex == formula) results.push(node);
3333
+ } else if (m = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b
3334
+ if (m[1] == "-") m[1] = -1;
3335
+ var a = m[1] ? Number(m[1]) : 1;
3336
+ var b = m[2] ? Number(m[2]) : 0;
3337
+ var indices = Selector.pseudos.getIndices(a, b, nodes.length);
3338
+ for (var i = 0, node, l = indices.length; node = nodes[i]; i++) {
3339
+ for (var j = 0; j < l; j++)
3340
+ if (node.nodeIndex == indices[j]) results.push(node);
3341
+ }
3342
+ }
3343
+ h.unmark(nodes);
3344
+ h.unmark(indexed);
3345
+ return results;
3346
+ },
3347
+
3348
+ 'empty': function(nodes, value, root) {
3349
+ for (var i = 0, results = [], node; node = nodes[i]; i++) {
3350
+ // IE treats comments as element nodes
3351
+ if (node.tagName == '!' || node.firstChild) continue;
3352
+ results.push(node);
3353
+ }
3354
+ return results;
3355
+ },
3356
+
3357
+ 'not': function(nodes, selector, root) {
3358
+ var h = Selector.handlers, selectorType, m;
3359
+ var exclusions = new Selector(selector).findElements(root);
3360
+ h.mark(exclusions);
3361
+ for (var i = 0, results = [], node; node = nodes[i]; i++)
3362
+ if (!node._countedByPrototype) results.push(node);
3363
+ h.unmark(exclusions);
3364
+ return results;
3365
+ },
3366
+
3367
+ 'enabled': function(nodes, value, root) {
3368
+ for (var i = 0, results = [], node; node = nodes[i]; i++)
3369
+ if (!node.disabled && (!node.type || node.type !== 'hidden'))
3370
+ results.push(node);
3371
+ return results;
3372
+ },
3373
+
3374
+ 'disabled': function(nodes, value, root) {
3375
+ for (var i = 0, results = [], node; node = nodes[i]; i++)
3376
+ if (node.disabled) results.push(node);
3377
+ return results;
3378
+ },
3379
+
3380
+ 'checked': function(nodes, value, root) {
3381
+ for (var i = 0, results = [], node; node = nodes[i]; i++)
3382
+ if (node.checked) results.push(node);
3383
+ return results;
3384
+ }
3385
+ },
3386
+
3387
+ operators: {
3388
+ '=': function(nv, v) { return nv == v; },
3389
+ '!=': function(nv, v) { return nv != v; },
3390
+ '^=': function(nv, v) { return nv == v || nv && nv.startsWith(v); },
3391
+ '$=': function(nv, v) { return nv == v || nv && nv.endsWith(v); },
3392
+ '*=': function(nv, v) { return nv == v || nv && nv.include(v); },
3393
+ '$=': function(nv, v) { return nv.endsWith(v); },
3394
+ '*=': function(nv, v) { return nv.include(v); },
3395
+ '~=': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + ' '); },
3396
+ '|=': function(nv, v) { return ('-' + (nv || "").toUpperCase() +
3397
+ '-').include('-' + (v || "").toUpperCase() + '-'); }
3398
+ },
3399
+
3400
+ split: function(expression) {
3401
+ var expressions = [];
3402
+ expression.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m) {
3403
+ expressions.push(m[1].strip());
3404
+ });
3405
+ return expressions;
3406
+ },
3407
+
3408
+ matchElements: function(elements, expression) {
3409
+ var matches = $$(expression), h = Selector.handlers;
3410
+ h.mark(matches);
3411
+ for (var i = 0, results = [], element; element = elements[i]; i++)
3412
+ if (element._countedByPrototype) results.push(element);
3413
+ h.unmark(matches);
3414
+ return results;
3415
+ },
3416
+
3417
+ findElement: function(elements, expression, index) {
3418
+ if (Object.isNumber(expression)) {
3419
+ index = expression; expression = false;
3420
+ }
3421
+ return Selector.matchElements(elements, expression || '*')[index || 0];
3422
+ },
3423
+
3424
+ findChildElements: function(element, expressions) {
3425
+ expressions = Selector.split(expressions.join(','));
3426
+ var results = [], h = Selector.handlers;
3427
+ for (var i = 0, l = expressions.length, selector; i < l; i++) {
3428
+ selector = new Selector(expressions[i].strip());
3429
+ h.concat(results, selector.findElements(element));
3430
+ }
3431
+ return (l > 1) ? h.unique(results) : results;
3432
+ }
3433
+ });
3434
+
3435
+ if (Prototype.Browser.IE) {
3436
+ Object.extend(Selector.handlers, {
3437
+ // IE returns comment nodes on getElementsByTagName("*").
3438
+ // Filter them out.
3439
+ concat: function(a, b) {
3440
+ for (var i = 0, node; node = b[i]; i++)
3441
+ if (node.tagName !== "!") a.push(node);
3442
+ return a;
3443
+ },
3444
+
3445
+ // IE improperly serializes _countedByPrototype in (inner|outer)HTML.
3446
+ unmark: function(nodes) {
3447
+ for (var i = 0, node; node = nodes[i]; i++)
3448
+ node.removeAttribute('_countedByPrototype');
3449
+ return nodes;
3450
+ }
3451
+ });
3452
+ }
3453
+
3454
+ function $$() {
3455
+ return Selector.findChildElements(document, $A(arguments));
3456
+ }
3457
+ var Form = {
3458
+ reset: function(form) {
3459
+ $(form).reset();
3460
+ return form;
3461
+ },
3462
+
3463
+ serializeElements: function(elements, options) {
3464
+ if (typeof options != 'object') options = { hash: !!options };
3465
+ else if (Object.isUndefined(options.hash)) options.hash = true;
3466
+ var key, value, submitted = false, submit = options.submit;
3467
+
3468
+ var data = elements.inject({ }, function(result, element) {
3469
+ if (!element.disabled && element.name) {
3470
+ key = element.name; value = $(element).getValue();
3471
+ if (value != null && element.type != 'file' && (element.type != 'submit' || (!submitted &&
3472
+ submit !== false && (!submit || key == submit) && (submitted = true)))) {
3473
+ if (key in result) {
3474
+ // a key is already present; construct an array of values
3475
+ if (!Object.isArray(result[key])) result[key] = [result[key]];
3476
+ result[key].push(value);
3477
+ }
3478
+ else result[key] = value;
3479
+ }
3480
+ }
3481
+ return result;
3482
+ });
3483
+
3484
+ return options.hash ? data : Object.toQueryString(data);
3485
+ }
3486
+ };
3487
+
3488
+ Form.Methods = {
3489
+ serialize: function(form, options) {
3490
+ return Form.serializeElements(Form.getElements(form), options);
3491
+ },
3492
+
3493
+ getElements: function(form) {
3494
+ return $A($(form).getElementsByTagName('*')).inject([],
3495
+ function(elements, child) {
3496
+ if (Form.Element.Serializers[child.tagName.toLowerCase()])
3497
+ elements.push(Element.extend(child));
3498
+ return elements;
3499
+ }
3500
+ );
3501
+ },
3502
+
3503
+ getInputs: function(form, typeName, name) {
3504
+ form = $(form);
3505
+ var inputs = form.getElementsByTagName('input');
3506
+
3507
+ if (!typeName && !name) return $A(inputs).map(Element.extend);
3508
+
3509
+ for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) {
3510
+ var input = inputs[i];
3511
+ if ((typeName && input.type != typeName) || (name && input.name != name))
3512
+ continue;
3513
+ matchingInputs.push(Element.extend(input));
3514
+ }
3515
+
3516
+ return matchingInputs;
3517
+ },
3518
+
3519
+ disable: function(form) {
3520
+ form = $(form);
3521
+ Form.getElements(form).invoke('disable');
3522
+ return form;
3523
+ },
3524
+
3525
+ enable: function(form) {
3526
+ form = $(form);
3527
+ Form.getElements(form).invoke('enable');
3528
+ return form;
3529
+ },
3530
+
3531
+ findFirstElement: function(form) {
3532
+ var elements = $(form).getElements().findAll(function(element) {
3533
+ return 'hidden' != element.type && !element.disabled;
3534
+ });
3535
+ var firstByIndex = elements.findAll(function(element) {
3536
+ return element.hasAttribute('tabIndex') && element.tabIndex >= 0;
3537
+ }).sortBy(function(element) { return element.tabIndex }).first();
3538
+
3539
+ return firstByIndex ? firstByIndex : elements.find(function(element) {
3540
+ return ['input', 'select', 'textarea'].include(element.tagName.toLowerCase());
3541
+ });
3542
+ },
3543
+
3544
+ focusFirstElement: function(form) {
3545
+ form = $(form);
3546
+ form.findFirstElement().activate();
3547
+ return form;
3548
+ },
3549
+
3550
+ request: function(form, options) {
3551
+ form = $(form), options = Object.clone(options || { });
3552
+
3553
+ var params = options.parameters, action = form.readAttribute('action') || '';
3554
+ if (action.blank()) action = window.location.href;
3555
+ options.parameters = form.serialize(true);
3556
+
3557
+ if (params) {
3558
+ if (Object.isString(params)) params = params.toQueryParams();
3559
+ Object.extend(options.parameters, params);
3560
+ }
3561
+
3562
+ if (form.hasAttribute('method') && !options.method)
3563
+ options.method = form.method;
3564
+
3565
+ return new Ajax.Request(action, options);
3566
+ }
3567
+ };
3568
+
3569
+ /*--------------------------------------------------------------------------*/
3570
+
3571
+ Form.Element = {
3572
+ focus: function(element) {
3573
+ $(element).focus();
3574
+ return element;
3575
+ },
3576
+
3577
+ select: function(element) {
3578
+ $(element).select();
3579
+ return element;
3580
+ }
3581
+ };
3582
+
3583
+ Form.Element.Methods = {
3584
+ serialize: function(element) {
3585
+ element = $(element);
3586
+ if (!element.disabled && element.name) {
3587
+ var value = element.getValue();
3588
+ if (value != undefined) {
3589
+ var pair = { };
3590
+ pair[element.name] = value;
3591
+ return Object.toQueryString(pair);
3592
+ }
3593
+ }
3594
+ return '';
3595
+ },
3596
+
3597
+ getValue: function(element) {
3598
+ element = $(element);
3599
+ var method = element.tagName.toLowerCase();
3600
+ return Form.Element.Serializers[method](element);
3601
+ },
3602
+
3603
+ setValue: function(element, value) {
3604
+ element = $(element);
3605
+ var method = element.tagName.toLowerCase();
3606
+ Form.Element.Serializers[method](element, value);
3607
+ return element;
3608
+ },
3609
+
3610
+ clear: function(element) {
3611
+ $(element).value = '';
3612
+ return element;
3613
+ },
3614
+
3615
+ present: function(element) {
3616
+ return $(element).value != '';
3617
+ },
3618
+
3619
+ activate: function(element) {
3620
+ element = $(element);
3621
+ try {
3622
+ element.focus();
3623
+ if (element.select && (element.tagName.toLowerCase() != 'input' ||
3624
+ !['button', 'reset', 'submit'].include(element.type)))
3625
+ element.select();
3626
+ } catch (e) { }
3627
+ return element;
3628
+ },
3629
+
3630
+ disable: function(element) {
3631
+ element = $(element);
3632
+ element.disabled = true;
3633
+ return element;
3634
+ },
3635
+
3636
+ enable: function(element) {
3637
+ element = $(element);
3638
+ element.disabled = false;
3639
+ return element;
3640
+ }
3641
+ };
3642
+
3643
+ /*--------------------------------------------------------------------------*/
3644
+
3645
+ var Field = Form.Element;
3646
+ var $F = Form.Element.Methods.getValue;
3647
+
3648
+ /*--------------------------------------------------------------------------*/
3649
+
3650
+ Form.Element.Serializers = {
3651
+ input: function(element, value) {
3652
+ switch (element.type.toLowerCase()) {
3653
+ case 'checkbox':
3654
+ case 'radio':
3655
+ return Form.Element.Serializers.inputSelector(element, value);
3656
+ default:
3657
+ return Form.Element.Serializers.textarea(element, value);
3658
+ }
3659
+ },
3660
+
3661
+ inputSelector: function(element, value) {
3662
+ if (Object.isUndefined(value)) return element.checked ? element.value : null;
3663
+ else element.checked = !!value;
3664
+ },
3665
+
3666
+ textarea: function(element, value) {
3667
+ if (Object.isUndefined(value)) return element.value;
3668
+ else element.value = value;
3669
+ },
3670
+
3671
+ select: function(element, value) {
3672
+ if (Object.isUndefined(value))
3673
+ return this[element.type == 'select-one' ?
3674
+ 'selectOne' : 'selectMany'](element);
3675
+ else {
3676
+ var opt, currentValue, single = !Object.isArray(value);
3677
+ for (var i = 0, length = element.length; i < length; i++) {
3678
+ opt = element.options[i];
3679
+ currentValue = this.optionValue(opt);
3680
+ if (single) {
3681
+ if (currentValue == value) {
3682
+ opt.selected = true;
3683
+ return;
3684
+ }
3685
+ }
3686
+ else opt.selected = value.include(currentValue);
3687
+ }
3688
+ }
3689
+ },
3690
+
3691
+ selectOne: function(element) {
3692
+ var index = element.selectedIndex;
3693
+ return index >= 0 ? this.optionValue(element.options[index]) : null;
3694
+ },
3695
+
3696
+ selectMany: function(element) {
3697
+ var values, length = element.length;
3698
+ if (!length) return null;
3699
+
3700
+ for (var i = 0, values = []; i < length; i++) {
3701
+ var opt = element.options[i];
3702
+ if (opt.selected) values.push(this.optionValue(opt));
3703
+ }
3704
+ return values;
3705
+ },
3706
+
3707
+ optionValue: function(opt) {
3708
+ // extend element because hasAttribute may not be native
3709
+ return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text;
3710
+ }
3711
+ };
3712
+
3713
+ /*--------------------------------------------------------------------------*/
3714
+
3715
+ Abstract.TimedObserver = Class.create(PeriodicalExecuter, {
3716
+ initialize: function($super, element, frequency, callback) {
3717
+ $super(callback, frequency);
3718
+ this.element = $(element);
3719
+ this.lastValue = this.getValue();
3720
+ },
3721
+
3722
+ execute: function() {
3723
+ var value = this.getValue();
3724
+ if (Object.isString(this.lastValue) && Object.isString(value) ?
3725
+ this.lastValue != value : String(this.lastValue) != String(value)) {
3726
+ this.callback(this.element, value);
3727
+ this.lastValue = value;
3728
+ }
3729
+ }
3730
+ });
3731
+
3732
+ Form.Element.Observer = Class.create(Abstract.TimedObserver, {
3733
+ getValue: function() {
3734
+ return Form.Element.getValue(this.element);
3735
+ }
3736
+ });
3737
+
3738
+ Form.Observer = Class.create(Abstract.TimedObserver, {
3739
+ getValue: function() {
3740
+ return Form.serialize(this.element);
3741
+ }
3742
+ });
3743
+
3744
+ /*--------------------------------------------------------------------------*/
3745
+
3746
+ Abstract.EventObserver = Class.create({
3747
+ initialize: function(element, callback) {
3748
+ this.element = $(element);
3749
+ this.callback = callback;
3750
+
3751
+ this.lastValue = this.getValue();
3752
+ if (this.element.tagName.toLowerCase() == 'form')
3753
+ this.registerFormCallbacks();
3754
+ else
3755
+ this.registerCallback(this.element);
3756
+ },
3757
+
3758
+ onElementEvent: function() {
3759
+ var value = this.getValue();
3760
+ if (this.lastValue != value) {
3761
+ this.callback(this.element, value);
3762
+ this.lastValue = value;
3763
+ }
3764
+ },
3765
+
3766
+ registerFormCallbacks: function() {
3767
+ Form.getElements(this.element).each(this.registerCallback, this);
3768
+ },
3769
+
3770
+ registerCallback: function(element) {
3771
+ if (element.type) {
3772
+ switch (element.type.toLowerCase()) {
3773
+ case 'checkbox':
3774
+ case 'radio':
3775
+ Event.observe(element, 'click', this.onElementEvent.bind(this));
3776
+ break;
3777
+ default:
3778
+ Event.observe(element, 'change', this.onElementEvent.bind(this));
3779
+ break;
3780
+ }
3781
+ }
3782
+ }
3783
+ });
3784
+
3785
+ Form.Element.EventObserver = Class.create(Abstract.EventObserver, {
3786
+ getValue: function() {
3787
+ return Form.Element.getValue(this.element);
3788
+ }
3789
+ });
3790
+
3791
+ Form.EventObserver = Class.create(Abstract.EventObserver, {
3792
+ getValue: function() {
3793
+ return Form.serialize(this.element);
3794
+ }
3795
+ });
3796
+ if (!window.Event) var Event = { };
3797
+
3798
+ Object.extend(Event, {
3799
+ KEY_BACKSPACE: 8,
3800
+ KEY_TAB: 9,
3801
+ KEY_RETURN: 13,
3802
+ KEY_ESC: 27,
3803
+ KEY_LEFT: 37,
3804
+ KEY_UP: 38,
3805
+ KEY_RIGHT: 39,
3806
+ KEY_DOWN: 40,
3807
+ KEY_DELETE: 46,
3808
+ KEY_HOME: 36,
3809
+ KEY_END: 35,
3810
+ KEY_PAGEUP: 33,
3811
+ KEY_PAGEDOWN: 34,
3812
+ KEY_INSERT: 45,
3813
+
3814
+ cache: { },
3815
+
3816
+ relatedTarget: function(event) {
3817
+ var element;
3818
+ switch(event.type) {
3819
+ case 'mouseover': element = event.fromElement; break;
3820
+ case 'mouseout': element = event.toElement; break;
3821
+ default: return null;
3822
+ }
3823
+ return Element.extend(element);
3824
+ }
3825
+ });
3826
+
3827
+ Event.Methods = (function() {
3828
+ var isButton;
3829
+
3830
+ if (Prototype.Browser.IE) {
3831
+ var buttonMap = { 0: 1, 1: 4, 2: 2 };
3832
+ isButton = function(event, code) {
3833
+ return event.button == buttonMap[code];
3834
+ };
3835
+
3836
+ } else if (Prototype.Browser.WebKit) {
3837
+ isButton = function(event, code) {
3838
+ switch (code) {
3839
+ case 0: return event.which == 1 && !event.metaKey;
3840
+ case 1: return event.which == 1 && event.metaKey;
3841
+ default: return false;
3842
+ }
3843
+ };
3844
+
3845
+ } else {
3846
+ isButton = function(event, code) {
3847
+ return event.which ? (event.which === code + 1) : (event.button === code);
3848
+ };
3849
+ }
3850
+
3851
+ return {
3852
+ isLeftClick: function(event) { return isButton(event, 0) },
3853
+ isMiddleClick: function(event) { return isButton(event, 1) },
3854
+ isRightClick: function(event) { return isButton(event, 2) },
3855
+
3856
+ element: function(event) {
3857
+ event = Event.extend(event);
3858
+
3859
+ var node = event.target,
3860
+ type = event.type,
3861
+ currentTarget = event.currentTarget;
3862
+
3863
+ if (currentTarget && currentTarget.tagName) {
3864
+ // Firefox screws up the "click" event when moving between radio buttons
3865
+ // via arrow keys. It also screws up the "load" and "error" events on images,
3866
+ // reporting the document as the target instead of the original image.
3867
+ if (type === 'load' || type === 'error' ||
3868
+ (type === 'click' && currentTarget.tagName.toLowerCase() === 'input'
3869
+ && currentTarget.type === 'radio'))
3870
+ node = currentTarget;
3871
+ }
3872
+ if (node.nodeType == Node.TEXT_NODE) node = node.parentNode;
3873
+ return Element.extend(node);
3874
+ },
3875
+
3876
+ findElement: function(event, expression) {
3877
+ var element = Event.element(event);
3878
+ if (!expression) return element;
3879
+ var elements = [element].concat(element.ancestors());
3880
+ return Selector.findElement(elements, expression, 0);
3881
+ },
3882
+
3883
+ pointer: function(event) {
3884
+ var docElement = document.documentElement,
3885
+ body = document.body || { scrollLeft: 0, scrollTop: 0 };
3886
+ return {
3887
+ x: event.pageX || (event.clientX +
3888
+ (docElement.scrollLeft || body.scrollLeft) -
3889
+ (docElement.clientLeft || 0)),
3890
+ y: event.pageY || (event.clientY +
3891
+ (docElement.scrollTop || body.scrollTop) -
3892
+ (docElement.clientTop || 0))
3893
+ };
3894
+ },
3895
+
3896
+ pointerX: function(event) { return Event.pointer(event).x },
3897
+ pointerY: function(event) { return Event.pointer(event).y },
3898
+
3899
+ stop: function(event) {
3900
+ Event.extend(event);
3901
+ event.preventDefault();
3902
+ event.stopPropagation();
3903
+ event.stopped = true;
3904
+ }
3905
+ };
3906
+ })();
3907
+
3908
+ Event.extend = (function() {
3909
+ var methods = Object.keys(Event.Methods).inject({ }, function(m, name) {
3910
+ m[name] = Event.Methods[name].methodize();
3911
+ return m;
3912
+ });
3913
+
3914
+ if (Prototype.Browser.IE) {
3915
+ Object.extend(methods, {
3916
+ stopPropagation: function() { this.cancelBubble = true },
3917
+ preventDefault: function() { this.returnValue = false },
3918
+ inspect: function() { return "[object Event]" }
3919
+ });
3920
+
3921
+ return function(event) {
3922
+ if (!event) return false;
3923
+ if (event._extendedByPrototype) return event;
3924
+
3925
+ event._extendedByPrototype = Prototype.emptyFunction;
3926
+ var pointer = Event.pointer(event);
3927
+ Object.extend(event, {
3928
+ target: event.srcElement,
3929
+ relatedTarget: Event.relatedTarget(event),
3930
+ pageX: pointer.x,
3931
+ pageY: pointer.y
3932
+ });
3933
+ return Object.extend(event, methods);
3934
+ };
3935
+
3936
+ } else {
3937
+ Event.prototype = Event.prototype || document.createEvent("HTMLEvents")['__proto__'];
3938
+ Object.extend(Event.prototype, methods);
3939
+ return Prototype.K;
3940
+ }
3941
+ })();
3942
+
3943
+ Object.extend(Event, (function() {
3944
+ var cache = Event.cache;
3945
+
3946
+ function getEventID(element) {
3947
+ if (element._prototypeEventID) return element._prototypeEventID[0];
3948
+ arguments.callee.id = arguments.callee.id || 1;
3949
+ return element._prototypeEventID = [++arguments.callee.id];
3950
+ }
3951
+
3952
+ function getDOMEventName(eventName) {
3953
+ if (eventName && eventName.include(':')) return "dataavailable";
3954
+ return eventName;
3955
+ }
3956
+
3957
+ function getCacheForID(id) {
3958
+ return cache[id] = cache[id] || { };
3959
+ }
3960
+
3961
+ function getWrappersForEventName(id, eventName) {
3962
+ var c = getCacheForID(id);
3963
+ return c[eventName] = c[eventName] || [];
3964
+ }
3965
+
3966
+ function createWrapper(element, eventName, handler) {
3967
+ var id = getEventID(element);
3968
+ var c = getWrappersForEventName(id, eventName);
3969
+ if (c.pluck("handler").include(handler)) return false;
3970
+
3971
+ var wrapper = function(event) {
3972
+ if (!Event || !Event.extend ||
3973
+ (event.eventName && event.eventName != eventName))
3974
+ return false;
3975
+
3976
+ Event.extend(event);
3977
+ handler.call(element, event);
3978
+ };
3979
+
3980
+ wrapper.handler = handler;
3981
+ c.push(wrapper);
3982
+ return wrapper;
3983
+ }
3984
+
3985
+ function findWrapper(id, eventName, handler) {
3986
+ var c = getWrappersForEventName(id, eventName);
3987
+ return c.find(function(wrapper) { return wrapper.handler == handler });
3988
+ }
3989
+
3990
+ function destroyWrapper(id, eventName, handler) {
3991
+ var c = getCacheForID(id);
3992
+ if (!c[eventName]) return false;
3993
+ c[eventName] = c[eventName].without(findWrapper(id, eventName, handler));
3994
+ }
3995
+
3996
+ function destroyCache() {
3997
+ for (var id in cache)
3998
+ for (var eventName in cache[id])
3999
+ cache[id][eventName] = null;
4000
+ }
4001
+
4002
+
4003
+ // Internet Explorer needs to remove event handlers on page unload
4004
+ // in order to avoid memory leaks.
4005
+ if (window.attachEvent) {
4006
+ window.attachEvent("onunload", destroyCache);
4007
+ }
4008
+
4009
+ // Safari has a dummy event handler on page unload so that it won't
4010
+ // use its bfcache. Safari <= 3.1 has an issue with restoring the "document"
4011
+ // object when page is returned to via the back button using its bfcache.
4012
+ if (Prototype.Browser.WebKit) {
4013
+ window.addEventListener('unload', Prototype.emptyFunction, false);
4014
+ }
4015
+
4016
+ return {
4017
+ observe: function(element, eventName, handler) {
4018
+ element = $(element);
4019
+ var name = getDOMEventName(eventName);
4020
+
4021
+ var wrapper = createWrapper(element, eventName, handler);
4022
+ if (!wrapper) return element;
4023
+
4024
+ if (element.addEventListener) {
4025
+ element.addEventListener(name, wrapper, false);
4026
+ } else {
4027
+ element.attachEvent("on" + name, wrapper);
4028
+ }
4029
+
4030
+ return element;
4031
+ },
4032
+
4033
+ stopObserving: function(element, eventName, handler) {
4034
+ element = $(element);
4035
+ var id = getEventID(element), name = getDOMEventName(eventName);
4036
+
4037
+ if (!handler && eventName) {
4038
+ getWrappersForEventName(id, eventName).each(function(wrapper) {
4039
+ element.stopObserving(eventName, wrapper.handler);
4040
+ });
4041
+ return element;
4042
+
4043
+ } else if (!eventName) {
4044
+ Object.keys(getCacheForID(id)).each(function(eventName) {
4045
+ element.stopObserving(eventName);
4046
+ });
4047
+ return element;
4048
+ }
4049
+
4050
+ var wrapper = findWrapper(id, eventName, handler);
4051
+ if (!wrapper) return element;
4052
+
4053
+ if (element.removeEventListener) {
4054
+ element.removeEventListener(name, wrapper, false);
4055
+ } else {
4056
+ element.detachEvent("on" + name, wrapper);
4057
+ }
4058
+
4059
+ destroyWrapper(id, eventName, handler);
4060
+
4061
+ return element;
4062
+ },
4063
+
4064
+ fire: function(element, eventName, memo) {
4065
+ element = $(element);
4066
+ if (element == document && document.createEvent && !element.dispatchEvent)
4067
+ element = document.documentElement;
4068
+
4069
+ var event;
4070
+ if (document.createEvent) {
4071
+ event = document.createEvent("HTMLEvents");
4072
+ event.initEvent("dataavailable", true, true);
4073
+ } else {
4074
+ event = document.createEventObject();
4075
+ event.eventType = "ondataavailable";
4076
+ }
4077
+
4078
+ event.eventName = eventName;
4079
+ event.memo = memo || { };
4080
+
4081
+ if (document.createEvent) {
4082
+ element.dispatchEvent(event);
4083
+ } else {
4084
+ element.fireEvent(event.eventType, event);
4085
+ }
4086
+
4087
+ return Event.extend(event);
4088
+ }
4089
+ };
4090
+ })());
4091
+
4092
+ Object.extend(Event, Event.Methods);
4093
+
4094
+ Element.addMethods({
4095
+ fire: Event.fire,
4096
+ observe: Event.observe,
4097
+ stopObserving: Event.stopObserving
4098
+ });
4099
+
4100
+ Object.extend(document, {
4101
+ fire: Element.Methods.fire.methodize(),
4102
+ observe: Element.Methods.observe.methodize(),
4103
+ stopObserving: Element.Methods.stopObserving.methodize(),
4104
+ loaded: false
4105
+ });
4106
+
4107
+ (function() {
4108
+ /* Support for the DOMContentLoaded event is based on work by Dan Webb,
4109
+ Matthias Miller, Dean Edwards and John Resig. */
4110
+
4111
+ var timer;
4112
+
4113
+ function fireContentLoadedEvent() {
4114
+ if (document.loaded) return;
4115
+ if (timer) window.clearInterval(timer);
4116
+ document.fire("dom:loaded");
4117
+ document.loaded = true;
4118
+ }
4119
+
4120
+ if (document.addEventListener) {
4121
+ if (Prototype.Browser.WebKit) {
4122
+ timer = window.setInterval(function() {
4123
+ if (/loaded|complete/.test(document.readyState))
4124
+ fireContentLoadedEvent();
4125
+ }, 0);
4126
+
4127
+ Event.observe(window, "load", fireContentLoadedEvent);
4128
+
4129
+ } else {
4130
+ document.addEventListener("DOMContentLoaded",
4131
+ fireContentLoadedEvent, false);
4132
+ }
4133
+
4134
+ } else {
4135
+ document.write("<script id=__onDOMContentLoaded defer src=//:><\/script>");
4136
+ $("__onDOMContentLoaded").onreadystatechange = function() {
4137
+ if (this.readyState == "complete") {
4138
+ this.onreadystatechange = null;
4139
+ fireContentLoadedEvent();
4140
+ }
4141
+ };
4142
+ }
4143
+ })();
4144
+ /*------------------------------- DEPRECATED -------------------------------*/
4145
+
4146
+ Hash.toQueryString = Object.toQueryString;
4147
+
4148
+ var Toggle = { display: Element.toggle };
4149
+
4150
+ Element.Methods.childOf = Element.Methods.descendantOf;
4151
+
4152
+ var Insertion = {
4153
+ Before: function(element, content) {
4154
+ return Element.insert(element, {before:content});
4155
+ },
4156
+
4157
+ Top: function(element, content) {
4158
+ return Element.insert(element, {top:content});
4159
+ },
4160
+
4161
+ Bottom: function(element, content) {
4162
+ return Element.insert(element, {bottom:content});
4163
+ },
4164
+
4165
+ After: function(element, content) {
4166
+ return Element.insert(element, {after:content});
4167
+ }
4168
+ };
4169
+
4170
+ var $continue = new Error('"throw $continue" is deprecated, use "return" instead');
4171
+
4172
+ // This should be moved to script.aculo.us; notice the deprecated methods
4173
+ // further below, that map to the newer Element methods.
4174
+ var Position = {
4175
+ // set to true if needed, warning: firefox performance problems
4176
+ // NOT neeeded for page scrolling, only if draggable contained in
4177
+ // scrollable elements
4178
+ includeScrollOffsets: false,
4179
+
4180
+ // must be called before calling withinIncludingScrolloffset, every time the
4181
+ // page is scrolled
4182
+ prepare: function() {
4183
+ this.deltaX = window.pageXOffset
4184
+ || document.documentElement.scrollLeft
4185
+ || document.body.scrollLeft
4186
+ || 0;
4187
+ this.deltaY = window.pageYOffset
4188
+ || document.documentElement.scrollTop
4189
+ || document.body.scrollTop
4190
+ || 0;
4191
+ },
4192
+
4193
+ // caches x/y coordinate pair to use with overlap
4194
+ within: function(element, x, y) {
4195
+ if (this.includeScrollOffsets)
4196
+ return this.withinIncludingScrolloffsets(element, x, y);
4197
+ this.xcomp = x;
4198
+ this.ycomp = y;
4199
+ this.offset = Element.cumulativeOffset(element);
4200
+
4201
+ return (y >= this.offset[1] &&
4202
+ y < this.offset[1] + element.offsetHeight &&
4203
+ x >= this.offset[0] &&
4204
+ x < this.offset[0] + element.offsetWidth);
4205
+ },
4206
+
4207
+ withinIncludingScrolloffsets: function(element, x, y) {
4208
+ var offsetcache = Element.cumulativeScrollOffset(element);
4209
+
4210
+ this.xcomp = x + offsetcache[0] - this.deltaX;
4211
+ this.ycomp = y + offsetcache[1] - this.deltaY;
4212
+ this.offset = Element.cumulativeOffset(element);
4213
+
4214
+ return (this.ycomp >= this.offset[1] &&
4215
+ this.ycomp < this.offset[1] + element.offsetHeight &&
4216
+ this.xcomp >= this.offset[0] &&
4217
+ this.xcomp < this.offset[0] + element.offsetWidth);
4218
+ },
4219
+
4220
+ // within must be called directly before
4221
+ overlap: function(mode, element) {
4222
+ if (!mode) return 0;
4223
+ if (mode == 'vertical')
4224
+ return ((this.offset[1] + element.offsetHeight) - this.ycomp) /
4225
+ element.offsetHeight;
4226
+ if (mode == 'horizontal')
4227
+ return ((this.offset[0] + element.offsetWidth) - this.xcomp) /
4228
+ element.offsetWidth;
4229
+ },
4230
+
4231
+ // Deprecation layer -- use newer Element methods now (1.5.2).
4232
+
4233
+ cumulativeOffset: Element.Methods.cumulativeOffset,
4234
+
4235
+ positionedOffset: Element.Methods.positionedOffset,
4236
+
4237
+ absolutize: function(element) {
4238
+ Position.prepare();
4239
+ return Element.absolutize(element);
4240
+ },
4241
+
4242
+ relativize: function(element) {
4243
+ Position.prepare();
4244
+ return Element.relativize(element);
4245
+ },
4246
+
4247
+ realOffset: Element.Methods.cumulativeScrollOffset,
4248
+
4249
+ offsetParent: Element.Methods.getOffsetParent,
4250
+
4251
+ page: Element.Methods.viewportOffset,
4252
+
4253
+ clone: function(source, target, options) {
4254
+ options = options || { };
4255
+ return Element.clonePosition(target, source, options);
4256
+ }
4257
+ };
4258
+
4259
+ /*--------------------------------------------------------------------------*/
4260
+
4261
+ if (!document.getElementsByClassName) document.getElementsByClassName = function(instanceMethods){
4262
+ function iter(name) {
4263
+ return name.blank() ? null : "[contains(concat(' ', @class, ' '), ' " + name + " ')]";
4264
+ }
4265
+
4266
+ instanceMethods.getElementsByClassName = Prototype.BrowserFeatures.XPath ?
4267
+ function(element, className) {
4268
+ className = className.toString().strip();
4269
+ var cond = /\s/.test(className) ? $w(className).map(iter).join('') : iter(className);
4270
+ return cond ? document._getElementsByXPath('.//*' + cond, element) : [];
4271
+ } : function(element, className) {
4272
+ className = className.toString().strip();
4273
+ var elements = [], classNames = (/\s/.test(className) ? $w(className) : null);
4274
+ if (!classNames && !className) return elements;
4275
+
4276
+ var nodes = $(element).getElementsByTagName('*');
4277
+ className = ' ' + className + ' ';
4278
+
4279
+ for (var i = 0, child, cn; child = nodes[i]; i++) {
4280
+ if (child.className && (cn = ' ' + child.className + ' ') && (cn.include(className) ||
4281
+ (classNames && classNames.all(function(name) {
4282
+ return !name.toString().blank() && cn.include(' ' + name + ' ');
4283
+ }))))
4284
+ elements.push(Element.extend(child));
4285
+ }
4286
+ return elements;
4287
+ };
4288
+
4289
+ return function(className, parentElement) {
4290
+ return $(parentElement || document.body).getElementsByClassName(className);
4291
+ };
4292
+ }(Element.Methods);
4293
+
4294
+ /*--------------------------------------------------------------------------*/
4295
+
4296
+ Element.ClassNames = Class.create();
4297
+ Element.ClassNames.prototype = {
4298
+ initialize: function(element) {
4299
+ this.element = $(element);
4300
+ },
4301
+
4302
+ _each: function(iterator) {
4303
+ this.element.className.split(/\s+/).select(function(name) {
4304
+ return name.length > 0;
4305
+ })._each(iterator);
4306
+ },
4307
+
4308
+ set: function(className) {
4309
+ this.element.className = className;
4310
+ },
4311
+
4312
+ add: function(classNameToAdd) {
4313
+ if (this.include(classNameToAdd)) return;
4314
+ this.set($A(this).concat(classNameToAdd).join(' '));
4315
+ },
4316
+
4317
+ remove: function(classNameToRemove) {
4318
+ if (!this.include(classNameToRemove)) return;
4319
+ this.set($A(this).without(classNameToRemove).join(' '));
4320
+ },
4321
+
4322
+ toString: function() {
4323
+ return $A(this).join(' ');
4324
+ }
4325
+ };
4326
+
4327
+ Object.extend(Element.ClassNames.prototype, Enumerable);
4328
+
4329
+ /*--------------------------------------------------------------------------*/
4330
+
4331
+ Element.addMethods();
4332
+ var search_index = [
4333
+ { method: 'adapter_class?', module: 'gnipapi', html: '<a href="classes/GnipApi.html#method-c-adapter_class-3F"><span class="method_name">::adapter_class?</span> <span class="module_name">(GnipApi)</span></a>' },
4334
+ { method: 'build', module: 'gnip::message', html: '<a href="classes/Gnip/Message.html#method-c-build"><span class="method_name">::build</span> <span class="module_name">(Gnip::Message)</span></a>' },
4335
+ { method: 'config', module: 'gnipapi', html: '<a href="classes/GnipApi.html#method-c-config"><span class="method_name">::config</span> <span class="module_name">(GnipApi)</span></a>' },
4336
+ { method: 'configure', module: 'gnipapi', html: '<a href="classes/GnipApi.html#method-c-configure"><span class="method_name">::configure</span> <span class="module_name">(GnipApi)</span></a>' },
4337
+ { method: 'credentials?', module: 'gnipapi', html: '<a href="classes/GnipApi.html#method-c-credentials-3F"><span class="method_name">::credentials?</span> <span class="module_name">(GnipApi)</span></a>' },
4338
+ { method: 'logger', module: 'gnipapi', html: '<a href="classes/GnipApi.html#method-c-logger"><span class="method_name">::logger</span> <span class="module_name">(GnipApi)</span></a>' },
4339
+ { method: 'new', module: 'gnip::activity', html: '<a href="classes/Gnip/Activity.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Gnip::Activity)</span></a>' },
4340
+ { method: 'new', module: 'gnip::actor', html: '<a href="classes/Gnip/Actor.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Gnip::Actor)</span></a>' },
4341
+ { method: 'new', module: 'gnip::gnipdata', html: '<a href="classes/Gnip/GnipData.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Gnip::GnipData)</span></a>' },
4342
+ { method: 'new', module: 'gnip::systemmessage', html: '<a href="classes/Gnip/SystemMessage.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Gnip::SystemMessage)</span></a>' },
4343
+ { method: 'new', module: 'gnip::twittercompliancemessage', html: '<a href="classes/Gnip/TwitterComplianceMessage.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Gnip::TwitterComplianceMessage)</span></a>' },
4344
+ { method: 'new', module: 'gnip::undefinedmessage', html: '<a href="classes/Gnip/UndefinedMessage.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Gnip::UndefinedMessage)</span></a>' },
4345
+ { method: 'new', module: 'gnip::url', html: '<a href="classes/Gnip/Url.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Gnip::Url)</span></a>' },
4346
+ { method: 'new', module: 'gnipapi::adapter', html: '<a href="classes/GnipApi/Adapter.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(GnipApi::Adapter)</span></a>' },
4347
+ { method: 'new', module: 'gnipapi::configuration', html: '<a href="classes/GnipApi/Configuration.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(GnipApi::Configuration)</span></a>' },
4348
+ { method: 'new', module: 'gnipapi::errors::adapter::gnipsoftwareerror', html: '<a href="classes/GnipApi/Errors/Adapter/GnipSoftwareError.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(GnipApi::Errors::Adapter::GnipSoftwareError)</span></a>' },
4349
+ { method: 'new', module: 'gnipapi::errors::adapter::ratelimiterror', html: '<a href="classes/GnipApi/Errors/Adapter/RateLimitError.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(GnipApi::Errors::Adapter::RateLimitError)</span></a>' },
4350
+ { method: 'new', module: 'gnipapi::errors::configuration::invalidoutputformat', html: '<a href="classes/GnipApi/Errors/Configuration/InvalidOutputFormat.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(GnipApi::Errors::Configuration::InvalidOutputFormat)</span></a>' },
4351
+ { method: 'new', module: 'gnipapi::errors::missingadapter', html: '<a href="classes/GnipApi/Errors/MissingAdapter.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(GnipApi::Errors::MissingAdapter)</span></a>' },
4352
+ { method: 'new', module: 'gnipapi::errors::missingcredentials', html: '<a href="classes/GnipApi/Errors/MissingCredentials.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(GnipApi::Errors::MissingCredentials)</span></a>' },
4353
+ { method: 'new', module: 'gnipapi::errors::powertrack::missingrules', html: '<a href="classes/GnipApi/Errors/PowerTrack/MissingRules.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(GnipApi::Errors::PowerTrack::MissingRules)</span></a>' },
4354
+ { method: 'new', module: 'gnipapi::errors::search::missingparameters', html: '<a href="classes/GnipApi/Errors/Search/MissingParameters.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(GnipApi::Errors::Search::MissingParameters)</span></a>' },
4355
+ { method: 'new', module: 'gnipapi::powertrack::buffer', html: '<a href="classes/GnipApi/PowerTrack/Buffer.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(GnipApi::PowerTrack::Buffer)</span></a>' },
4356
+ { method: 'new', module: 'gnipapi::powertrack::rule', html: '<a href="classes/GnipApi/PowerTrack/Rule.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(GnipApi::PowerTrack::Rule)</span></a>' },
4357
+ { method: 'new', module: 'gnipapi::powertrack::stream', html: '<a href="classes/GnipApi/PowerTrack/Stream.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(GnipApi::PowerTrack::Stream)</span></a>' },
4358
+ { method: 'new', module: 'gnipapi::request', html: '<a href="classes/GnipApi/Request.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(GnipApi::Request)</span></a>' },
4359
+ { method: 'new', module: 'gnipapi::response', html: '<a href="classes/GnipApi/Response.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(GnipApi::Response)</span></a>' },
4360
+ { method: 'new_delete', module: 'gnipapi::request', html: '<a href="classes/GnipApi/Request.html#method-c-new_delete"><span class="method_name">::new_delete</span> <span class="module_name">(GnipApi::Request)</span></a>' },
4361
+ { method: 'new_get', module: 'gnipapi::request', html: '<a href="classes/GnipApi/Request.html#method-c-new_get"><span class="method_name">::new_get</span> <span class="module_name">(GnipApi::Request)</span></a>' },
4362
+ { method: 'new_post', module: 'gnipapi::request', html: '<a href="classes/GnipApi/Request.html#method-c-new_post"><span class="method_name">::new_post</span> <span class="module_name">(GnipApi::Request)</span></a>' },
4363
+ { method: 'powertrack_rule_replay', module: 'gnipapi::endpoints', html: '<a href="classes/GnipApi/Endpoints.html#method-c-powertrack_rule_replay"><span class="method_name">::powertrack_rule_replay</span> <span class="module_name">(GnipApi::Endpoints)</span></a>' },
4364
+ { method: 'powertrack_rule_validator', module: 'gnipapi::endpoints', html: '<a href="classes/GnipApi/Endpoints.html#method-c-powertrack_rule_validator"><span class="method_name">::powertrack_rule_validator</span> <span class="module_name">(GnipApi::Endpoints)</span></a>' },
4365
+ { method: 'powertrack_rules', module: 'gnipapi::endpoints', html: '<a href="classes/GnipApi/Endpoints.html#method-c-powertrack_rules"><span class="method_name">::powertrack_rules</span> <span class="module_name">(GnipApi::Endpoints)</span></a>' },
4366
+ { method: 'powertrack_stream', module: 'gnipapi::endpoints', html: '<a href="classes/GnipApi/Endpoints.html#method-c-powertrack_stream"><span class="method_name">::powertrack_stream</span> <span class="module_name">(GnipApi::Endpoints)</span></a>' },
4367
+ { method: 'powertrack_stream_replay', module: 'gnipapi::endpoints', html: '<a href="classes/GnipApi/Endpoints.html#method-c-powertrack_stream_replay"><span class="method_name">::powertrack_stream_replay</span> <span class="module_name">(GnipApi::Endpoints)</span></a>' },
4368
+ { method: 'search_activities', module: 'gnipapi::endpoints', html: '<a href="classes/GnipApi/Endpoints.html#method-c-search_activities"><span class="method_name">::search_activities</span> <span class="module_name">(GnipApi::Endpoints)</span></a>' },
4369
+ { method: 'search_counts', module: 'gnipapi::endpoints', html: '<a href="classes/GnipApi/Endpoints.html#method-c-search_counts"><span class="method_name">::search_counts</span> <span class="module_name">(GnipApi::Endpoints)</span></a>' },
4370
+ { method: 'activities', module: 'gnipapi::search', html: '<a href="classes/GnipApi/Search.html#method-i-activities"><span class="method_name">#activities</span> <span class="module_name">(GnipApi::Search)</span></a>' },
4371
+ { method: 'activity?', module: 'gnip::message', html: '<a href="classes/Gnip/Message.html#method-i-activity-3F"><span class="method_name">#activity?</span> <span class="module_name">(Gnip::Message)</span></a>' },
4372
+ { method: 'attributes', module: 'gnipapi::powertrack::rule', html: '<a href="classes/GnipApi/PowerTrack/Rule.html#method-i-attributes"><span class="method_name">#attributes</span> <span class="module_name">(GnipApi::PowerTrack::Rule)</span></a>' },
4373
+ { method: 'author', module: 'gnip::activity', html: '<a href="classes/Gnip/Activity.html#method-i-author"><span class="method_name">#author</span> <span class="module_name">(Gnip::Activity)</span></a>' },
4374
+ { method: 'build_message', module: 'gnipapi::powertrack::stream', html: '<a href="classes/GnipApi/PowerTrack/Stream.html#method-i-build_message"><span class="method_name">#build_message</span> <span class="module_name">(GnipApi::PowerTrack::Stream)</span></a>' },
4375
+ { method: 'check_for_errors!', module: 'gnipapi::response', html: '<a href="classes/GnipApi/Response.html#method-i-check_for_errors-21"><span class="method_name">#check_for_errors!</span> <span class="module_name">(GnipApi::Response)</span></a>' },
4376
+ { method: 'compliance_message?', module: 'gnip::message', html: '<a href="classes/Gnip/Message.html#method-i-compliance_message-3F"><span class="method_name">#compliance_message?</span> <span class="module_name">(Gnip::Message)</span></a>' },
4377
+ { method: 'consistent?', module: 'gnipapi::powertrack::rule', html: '<a href="classes/GnipApi/PowerTrack/Rule.html#method-i-consistent-3F"><span class="method_name">#consistent?</span> <span class="module_name">(GnipApi::PowerTrack::Rule)</span></a>' },
4378
+ { method: 'construct_rules', module: 'gnipapi::powertrack::rules', html: '<a href="classes/GnipApi/PowerTrack/Rules.html#method-i-construct_rules"><span class="method_name">#construct_rules</span> <span class="module_name">(GnipApi::PowerTrack::Rules)</span></a>' },
4379
+ { method: 'consume', module: 'gnipapi::powertrack::stream', html: '<a href="classes/GnipApi/PowerTrack/Stream.html#method-i-consume"><span class="method_name">#consume</span> <span class="module_name">(GnipApi::PowerTrack::Stream)</span></a>' },
4380
+ { method: 'consume!', module: 'gnipapi::powertrack::buffer', html: '<a href="classes/GnipApi/PowerTrack/Buffer.html#method-i-consume-21"><span class="method_name">#consume!</span> <span class="module_name">(GnipApi::PowerTrack::Buffer)</span></a>' },
4381
+ { method: 'consume_json', module: 'gnipapi::powertrack::stream', html: '<a href="classes/GnipApi/PowerTrack/Stream.html#method-i-consume_json"><span class="method_name">#consume_json</span> <span class="module_name">(GnipApi::PowerTrack::Stream)</span></a>' },
4382
+ { method: 'consume_raw', module: 'gnipapi::powertrack::stream', html: '<a href="classes/GnipApi/PowerTrack/Stream.html#method-i-consume_raw"><span class="method_name">#consume_raw</span> <span class="module_name">(GnipApi::PowerTrack::Stream)</span></a>' },
4383
+ { method: 'counts', module: 'gnipapi::search', html: '<a href="classes/GnipApi/Search.html#method-i-counts"><span class="method_name">#counts</span> <span class="module_name">(GnipApi::Search)</span></a>' },
4384
+ { method: 'create', module: 'gnipapi::powertrack::rules', html: '<a href="classes/GnipApi/PowerTrack/Rules.html#method-i-create"><span class="method_name">#create</span> <span class="module_name">(GnipApi::PowerTrack::Rules)</span></a>' },
4385
+ { method: 'delete', module: 'gnipapi::adapter', html: '<a href="classes/GnipApi/Adapter.html#method-i-delete"><span class="method_name">#delete</span> <span class="module_name">(GnipApi::Adapter)</span></a>' },
4386
+ { method: 'delete', module: 'gnipapi::powertrack::rules', html: '<a href="classes/GnipApi/PowerTrack/Rules.html#method-i-delete"><span class="method_name">#delete</span> <span class="module_name">(GnipApi::PowerTrack::Rules)</span></a>' },
4387
+ { method: 'encode', module: 'gnipapi::jsonparser', html: '<a href="classes/GnipApi/JsonParser.html#method-i-encode"><span class="method_name">#encode</span> <span class="module_name">(GnipApi::JsonParser)</span></a>' },
4388
+ { method: 'error?', module: 'gnip::message', html: '<a href="classes/Gnip/Message.html#method-i-error-3F"><span class="method_name">#error?</span> <span class="module_name">(Gnip::Message)</span></a>' },
4389
+ { method: 'error_message', module: 'gnipapi::response', html: '<a href="classes/GnipApi/Response.html#method-i-error_message"><span class="method_name">#error_message</span> <span class="module_name">(GnipApi::Response)</span></a>' },
4390
+ { method: 'execute!', module: 'gnipapi::request', html: '<a href="classes/GnipApi/Request.html#method-i-execute-21"><span class="method_name">#execute!</span> <span class="module_name">(GnipApi::Request)</span></a>' },
4391
+ { method: 'generate_json', module: 'gnip::message', html: '<a href="classes/Gnip/Message.html#method-i-generate_json"><span class="method_name">#generate_json</span> <span class="module_name">(Gnip::Message)</span></a>' },
4392
+ { method: 'get', module: 'gnipapi::adapter', html: '<a href="classes/GnipApi/Adapter.html#method-i-get"><span class="method_name">#get</span> <span class="module_name">(GnipApi::Adapter)</span></a>' },
4393
+ { method: 'hidden_data?', module: 'gnip::activity', html: '<a href="classes/Gnip/Activity.html#method-i-hidden_data-3F"><span class="method_name">#hidden_data?</span> <span class="module_name">(Gnip::Activity)</span></a>' },
4394
+ { method: 'info?', module: 'gnip::message', html: '<a href="classes/Gnip/Message.html#method-i-info-3F"><span class="method_name">#info?</span> <span class="module_name">(Gnip::Message)</span></a>' },
4395
+ { method: 'insert!', module: 'gnipapi::powertrack::buffer', html: '<a href="classes/GnipApi/PowerTrack/Buffer.html#method-i-insert-21"><span class="method_name">#insert!</span> <span class="module_name">(GnipApi::PowerTrack::Buffer)</span></a>' },
4396
+ { method: 'io_curl_stream', module: 'gnipapi::adapter', html: '<a href="classes/GnipApi/Adapter.html#method-i-io_curl_stream"><span class="method_name">#io_curl_stream</span> <span class="module_name">(GnipApi::Adapter)</span></a>' },
4397
+ { method: 'list', module: 'gnipapi::powertrack::rules', html: '<a href="classes/GnipApi/PowerTrack/Rules.html#method-i-list"><span class="method_name">#list</span> <span class="module_name">(GnipApi::PowerTrack::Rules)</span></a>' },
4398
+ { method: 'log!', module: 'gnip::systemmessage', html: '<a href="classes/Gnip/SystemMessage.html#method-i-log-21"><span class="method_name">#log!</span> <span class="module_name">(Gnip::SystemMessage)</span></a>' },
4399
+ { method: 'log!', module: 'gnipapi::request', html: '<a href="classes/GnipApi/Request.html#method-i-log-21"><span class="method_name">#log!</span> <span class="module_name">(GnipApi::Request)</span></a>' },
4400
+ { method: 'log_method', module: 'gnip::systemmessage', html: '<a href="classes/Gnip/SystemMessage.html#method-i-log_method"><span class="method_name">#log_method</span> <span class="module_name">(Gnip::SystemMessage)</span></a>' },
4401
+ { method: 'logger', module: 'gnipapi::powertrack::stream', html: '<a href="classes/GnipApi/PowerTrack/Stream.html#method-i-logger"><span class="method_name">#logger</span> <span class="module_name">(GnipApi::PowerTrack::Stream)</span></a>' },
4402
+ { method: 'ok?', module: 'gnipapi::response', html: '<a href="classes/GnipApi/Response.html#method-i-ok-3F"><span class="method_name">#ok?</span> <span class="module_name">(GnipApi::Response)</span></a>' },
4403
+ { method: 'original_attributes', module: 'gnip::actor', html: '<a href="classes/Gnip/Actor.html#method-i-original_attributes"><span class="method_name">#original_attributes</span> <span class="module_name">(Gnip::Actor)</span></a>' },
4404
+ { method: 'original_attributes', module: 'gnip::gnipdata', html: '<a href="classes/Gnip/GnipData.html#method-i-original_attributes"><span class="method_name">#original_attributes</span> <span class="module_name">(Gnip::GnipData)</span></a>' },
4405
+ { method: 'original_attributes', module: 'gnip::systemmessage', html: '<a href="classes/Gnip/SystemMessage.html#method-i-original_attributes"><span class="method_name">#original_attributes</span> <span class="module_name">(Gnip::SystemMessage)</span></a>' },
4406
+ { method: 'parse', module: 'gnipapi::jsonparser', html: '<a href="classes/GnipApi/JsonParser.html#method-i-parse"><span class="method_name">#parse</span> <span class="module_name">(GnipApi::JsonParser)</span></a>' },
4407
+ { method: 'parse_json', module: 'gnipapi::powertrack::stream', html: '<a href="classes/GnipApi/PowerTrack/Stream.html#method-i-parse_json"><span class="method_name">#parse_json</span> <span class="module_name">(GnipApi::PowerTrack::Stream)</span></a>' },
4408
+ { method: 'parse_rules', module: 'gnipapi::powertrack::rules', html: '<a href="classes/GnipApi/PowerTrack/Rules.html#method-i-parse_rules"><span class="method_name">#parse_rules</span> <span class="module_name">(GnipApi::PowerTrack::Rules)</span></a>' },
4409
+ { method: 'post', module: 'gnipapi::adapter', html: '<a href="classes/GnipApi/Adapter.html#method-i-post"><span class="method_name">#post</span> <span class="module_name">(GnipApi::Adapter)</span></a>' },
4410
+ { method: 'process_entries', module: 'gnipapi::powertrack::stream', html: '<a href="classes/GnipApi/PowerTrack/Stream.html#method-i-process_entries"><span class="method_name">#process_entries</span> <span class="module_name">(GnipApi::PowerTrack::Stream)</span></a>' },
4411
+ { method: 'pty_curl_stream', module: 'gnipapi::adapter', html: '<a href="classes/GnipApi/Adapter.html#method-i-pty_curl_stream"><span class="method_name">#pty_curl_stream</span> <span class="module_name">(GnipApi::Adapter)</span></a>' },
4412
+ { method: 'read!', module: 'gnipapi::powertrack::buffer', html: '<a href="classes/GnipApi/PowerTrack/Buffer.html#method-i-read-21"><span class="method_name">#read!</span> <span class="module_name">(GnipApi::PowerTrack::Buffer)</span></a>' },
4413
+ { method: 'read_io_stream', module: 'gnipapi::powertrack::stream', html: '<a href="classes/GnipApi/PowerTrack/Stream.html#method-i-read_io_stream"><span class="method_name">#read_io_stream</span> <span class="module_name">(GnipApi::PowerTrack::Stream)</span></a>' },
4414
+ { method: 'read_pty_stream', module: 'gnipapi::powertrack::stream', html: '<a href="classes/GnipApi/PowerTrack/Stream.html#method-i-read_pty_stream"><span class="method_name">#read_pty_stream</span> <span class="module_name">(GnipApi::PowerTrack::Stream)</span></a>' },
4415
+ { method: 'read_stream', module: 'gnipapi::powertrack::stream', html: '<a href="classes/GnipApi/PowerTrack/Stream.html#method-i-read_stream"><span class="method_name">#read_stream</span> <span class="module_name">(GnipApi::PowerTrack::Stream)</span></a>' },
4416
+ { method: 'request_method', module: 'gnipapi::response', html: '<a href="classes/GnipApi/Response.html#method-i-request_method"><span class="method_name">#request_method</span> <span class="module_name">(GnipApi::Response)</span></a>' },
4417
+ { method: 'request_uri', module: 'gnipapi::response', html: '<a href="classes/GnipApi/Response.html#method-i-request_uri"><span class="method_name">#request_uri</span> <span class="module_name">(GnipApi::Response)</span></a>' },
4418
+ { method: 'retweet?', module: 'gnip::activity', html: '<a href="classes/Gnip/Activity.html#method-i-retweet-3F"><span class="method_name">#retweet?</span> <span class="module_name">(Gnip::Activity)</span></a>' },
4419
+ { method: 'size', module: 'gnipapi::powertrack::buffer', html: '<a href="classes/GnipApi/PowerTrack/Buffer.html#method-i-size"><span class="method_name">#size</span> <span class="module_name">(GnipApi::PowerTrack::Buffer)</span></a>' },
4420
+ { method: 'stream_get', module: 'gnipapi::adapter', html: '<a href="classes/GnipApi/Adapter.html#method-i-stream_get"><span class="method_name">#stream_get</span> <span class="module_name">(GnipApi::Adapter)</span></a>' },
4421
+ { method: 'system_message?', module: 'gnip::message', html: '<a href="classes/Gnip/Message.html#method-i-system_message-3F"><span class="method_name">#system_message?</span> <span class="module_name">(Gnip::Message)</span></a>' },
4422
+ { method: 'thread_consume', module: 'gnipapi::powertrack::stream', html: '<a href="classes/GnipApi/PowerTrack/Stream.html#method-i-thread_consume"><span class="method_name">#thread_consume</span> <span class="module_name">(GnipApi::PowerTrack::Stream)</span></a>' },
4423
+ { method: 'to_h', module: 'gnip::activity', html: '<a href="classes/Gnip/Activity.html#method-i-to_h"><span class="method_name">#to_h</span> <span class="module_name">(Gnip::Activity)</span></a>' },
4424
+ { method: 'to_h', module: 'gnip::twittercompliancemessage', html: '<a href="classes/Gnip/TwitterComplianceMessage.html#method-i-to_h"><span class="method_name">#to_h</span> <span class="module_name">(Gnip::TwitterComplianceMessage)</span></a>' },
4425
+ { method: 'to_h', module: 'gnip::url', html: '<a href="classes/Gnip/Url.html#method-i-to_h"><span class="method_name">#to_h</span> <span class="module_name">(Gnip::Url)</span></a>' },
4426
+ { method: 'to_json', module: 'gnip::activity', html: '<a href="classes/Gnip/Activity.html#method-i-to_json"><span class="method_name">#to_json</span> <span class="module_name">(Gnip::Activity)</span></a>' },
4427
+ { method: 'to_json', module: 'gnip::actor', html: '<a href="classes/Gnip/Actor.html#method-i-to_json"><span class="method_name">#to_json</span> <span class="module_name">(Gnip::Actor)</span></a>' },
4428
+ { method: 'to_json', module: 'gnip::gnipdata', html: '<a href="classes/Gnip/GnipData.html#method-i-to_json"><span class="method_name">#to_json</span> <span class="module_name">(Gnip::GnipData)</span></a>' },
4429
+ { method: 'to_json', module: 'gnip::systemmessage', html: '<a href="classes/Gnip/SystemMessage.html#method-i-to_json"><span class="method_name">#to_json</span> <span class="module_name">(Gnip::SystemMessage)</span></a>' },
4430
+ { method: 'to_json', module: 'gnip::twittercompliancemessage', html: '<a href="classes/Gnip/TwitterComplianceMessage.html#method-i-to_json"><span class="method_name">#to_json</span> <span class="module_name">(Gnip::TwitterComplianceMessage)</span></a>' },
4431
+ { method: 'to_json', module: 'gnip::url', html: '<a href="classes/Gnip/Url.html#method-i-to_json"><span class="method_name">#to_json</span> <span class="module_name">(Gnip::Url)</span></a>' },
4432
+ { method: 'to_json', module: 'gnipapi::powertrack::rule', html: '<a href="classes/GnipApi/PowerTrack/Rule.html#method-i-to_json"><span class="method_name">#to_json</span> <span class="module_name">(GnipApi::PowerTrack::Rule)</span></a>' },
4433
+ { method: 'tweet_id', module: 'gnip::activity', html: '<a href="classes/Gnip/Activity.html#method-i-tweet_id"><span class="method_name">#tweet_id</span> <span class="module_name">(Gnip::Activity)</span></a>' },
4434
+ { method: 'uid', module: 'gnipapi::powertrack::rule', html: '<a href="classes/GnipApi/PowerTrack/Rule.html#method-i-uid"><span class="method_name">#uid</span> <span class="module_name">(GnipApi::PowerTrack::Rule)</span></a>' },
4435
+ { method: 'user_id', module: 'gnip::actor', html: '<a href="classes/Gnip/Actor.html#method-i-user_id"><span class="method_name">#user_id</span> <span class="module_name">(Gnip::Actor)</span></a>' },
4436
+ { method: 'validate', module: 'gnipapi::powertrack::rules', html: '<a href="classes/GnipApi/PowerTrack/Rules.html#method-i-validate"><span class="method_name">#validate</span> <span class="module_name">(GnipApi::PowerTrack::Rules)</span></a>' },
4437
+ { method: 'warn?', module: 'gnip::message', html: '<a href="classes/Gnip/Message.html#method-i-warn-3F"><span class="method_name">#warn?</span> <span class="module_name">(Gnip::Message)</span></a>' },
4438
+ { method: 'configuration', module: 'gnipapi', html: '<a href="classes/GnipApi.html#attribute-c-configuration"><span class="method_name">::configuration</span> <span class="module_name">(GnipApi)</span></a>' },
4439
+ { method: 'account', module: 'gnipapi::configuration', html: '<a href="classes/GnipApi/Configuration.html#attribute-i-account"><span class="method_name">#account</span> <span class="module_name">(GnipApi::Configuration)</span></a>' },
4440
+ { method: 'actor', module: 'gnip::activity', html: '<a href="classes/Gnip/Activity.html#attribute-i-actor"><span class="method_name">#actor</span> <span class="module_name">(Gnip::Activity)</span></a>' },
4441
+ { method: 'actor', module: 'gnip::twittercompliancemessage', html: '<a href="classes/Gnip/TwitterComplianceMessage.html#attribute-i-actor"><span class="method_name">#actor</span> <span class="module_name">(Gnip::TwitterComplianceMessage)</span></a>' },
4442
+ { method: 'body', module: 'gnip::activity', html: '<a href="classes/Gnip/Activity.html#attribute-i-body"><span class="method_name">#body</span> <span class="module_name">(Gnip::Activity)</span></a>' },
4443
+ { method: 'body', module: 'gnipapi::response', html: '<a href="classes/GnipApi/Response.html#attribute-i-body"><span class="method_name">#body</span> <span class="module_name">(GnipApi::Response)</span></a>' },
4444
+ { method: 'data', module: 'gnipapi::powertrack::buffer', html: '<a href="classes/GnipApi/PowerTrack/Buffer.html#attribute-i-data"><span class="method_name">#data</span> <span class="module_name">(GnipApi::PowerTrack::Buffer)</span></a>' },
4445
+ { method: 'debug', module: 'gnipapi::adapter', html: '<a href="classes/GnipApi/Adapter.html#attribute-i-debug"><span class="method_name">#debug</span> <span class="module_name">(GnipApi::Adapter)</span></a>' },
4446
+ { method: 'debug', module: 'gnipapi::configuration', html: '<a href="classes/GnipApi/Configuration.html#attribute-i-debug"><span class="method_name">#debug</span> <span class="module_name">(GnipApi::Configuration)</span></a>' },
4447
+ { method: 'display_name', module: 'gnip::actor', html: '<a href="classes/Gnip/Actor.html#attribute-i-display_name"><span class="method_name">#display_name</span> <span class="module_name">(Gnip::Actor)</span></a>' },
4448
+ { method: 'display_text_range', module: 'gnip::activity', html: '<a href="classes/Gnip/Activity.html#attribute-i-display_text_range"><span class="method_name">#display_text_range</span> <span class="module_name">(Gnip::Activity)</span></a>' },
4449
+ { method: 'display_url', module: 'gnip::url', html: '<a href="classes/Gnip/Url.html#attribute-i-display_url"><span class="method_name">#display_url</span> <span class="module_name">(Gnip::Url)</span></a>' },
4450
+ { method: 'enable_gzip', module: 'gnipapi::configuration', html: '<a href="classes/GnipApi/Configuration.html#attribute-i-enable_gzip"><span class="method_name">#enable_gzip</span> <span class="module_name">(GnipApi::Configuration)</span></a>' },
4451
+ { method: 'expanded_status', module: 'gnip::url', html: '<a href="classes/Gnip/Url.html#attribute-i-expanded_status"><span class="method_name">#expanded_status</span> <span class="module_name">(Gnip::Url)</span></a>' },
4452
+ { method: 'expanded_url', module: 'gnip::url', html: '<a href="classes/Gnip/Url.html#attribute-i-expanded_url"><span class="method_name">#expanded_url</span> <span class="module_name">(Gnip::Url)</span></a>' },
4453
+ { method: 'expanded_url_description', module: 'gnip::url', html: '<a href="classes/Gnip/Url.html#attribute-i-expanded_url_description"><span class="method_name">#expanded_url_description</span> <span class="module_name">(Gnip::Url)</span></a>' },
4454
+ { method: 'expanded_url_title', module: 'gnip::url', html: '<a href="classes/Gnip/Url.html#attribute-i-expanded_url_title"><span class="method_name">#expanded_url_title</span> <span class="module_name">(Gnip::Url)</span></a>' },
4455
+ { method: 'favorites_count', module: 'gnip::activity', html: '<a href="classes/Gnip/Activity.html#attribute-i-favorites_count"><span class="method_name">#favorites_count</span> <span class="module_name">(Gnip::Activity)</span></a>' },
4456
+ { method: 'favorites_count', module: 'gnip::actor', html: '<a href="classes/Gnip/Actor.html#attribute-i-favorites_count"><span class="method_name">#favorites_count</span> <span class="module_name">(Gnip::Actor)</span></a>' },
4457
+ { method: 'followers_count', module: 'gnip::actor', html: '<a href="classes/Gnip/Actor.html#attribute-i-followers_count"><span class="method_name">#followers_count</span> <span class="module_name">(Gnip::Actor)</span></a>' },
4458
+ { method: 'friends_count', module: 'gnip::actor', html: '<a href="classes/Gnip/Actor.html#attribute-i-friends_count"><span class="method_name">#friends_count</span> <span class="module_name">(Gnip::Actor)</span></a>' },
4459
+ { method: 'generator', module: 'gnip::activity', html: '<a href="classes/Gnip/Activity.html#attribute-i-generator"><span class="method_name">#generator</span> <span class="module_name">(Gnip::Activity)</span></a>' },
4460
+ { method: 'gnip', module: 'gnip::activity', html: '<a href="classes/Gnip/Activity.html#attribute-i-gnip"><span class="method_name">#gnip</span> <span class="module_name">(Gnip::Activity)</span></a>' },
4461
+ { method: 'headers', module: 'gnipapi::request', html: '<a href="classes/GnipApi/Request.html#attribute-i-headers"><span class="method_name">#headers</span> <span class="module_name">(GnipApi::Request)</span></a>' },
4462
+ { method: 'headers', module: 'gnipapi::response', html: '<a href="classes/GnipApi/Response.html#attribute-i-headers"><span class="method_name">#headers</span> <span class="module_name">(GnipApi::Response)</span></a>' },
4463
+ { method: 'id', module: 'gnip::activity', html: '<a href="classes/Gnip/Activity.html#attribute-i-id"><span class="method_name">#id</span> <span class="module_name">(Gnip::Activity)</span></a>' },
4464
+ { method: 'id', module: 'gnip::actor', html: '<a href="classes/Gnip/Actor.html#attribute-i-id"><span class="method_name">#id</span> <span class="module_name">(Gnip::Actor)</span></a>' },
4465
+ { method: 'id', module: 'gnipapi::powertrack::rule', html: '<a href="classes/GnipApi/PowerTrack/Rule.html#attribute-i-id"><span class="method_name">#id</span> <span class="module_name">(GnipApi::PowerTrack::Rule)</span></a>' },
4466
+ { method: 'image', module: 'gnip::actor', html: '<a href="classes/Gnip/Actor.html#attribute-i-image"><span class="method_name">#image</span> <span class="module_name">(Gnip::Actor)</span></a>' },
4467
+ { method: 'indices', module: 'gnip::url', html: '<a href="classes/Gnip/Url.html#attribute-i-indices"><span class="method_name">#indices</span> <span class="module_name">(Gnip::Url)</span></a>' },
4468
+ { method: 'label', module: 'gnipapi::configuration', html: '<a href="classes/GnipApi/Configuration.html#attribute-i-label"><span class="method_name">#label</span> <span class="module_name">(GnipApi::Configuration)</span></a>' },
4469
+ { method: 'language', module: 'gnip::gnipdata', html: '<a href="classes/Gnip/GnipData.html#attribute-i-language"><span class="method_name">#language</span> <span class="module_name">(Gnip::GnipData)</span></a>' },
4470
+ { method: 'languages', module: 'gnip::actor', html: '<a href="classes/Gnip/Actor.html#attribute-i-languages"><span class="method_name">#languages</span> <span class="module_name">(Gnip::Actor)</span></a>' },
4471
+ { method: 'link', module: 'gnip::activity', html: '<a href="classes/Gnip/Activity.html#attribute-i-link"><span class="method_name">#link</span> <span class="module_name">(Gnip::Activity)</span></a>' },
4472
+ { method: 'link', module: 'gnip::actor', html: '<a href="classes/Gnip/Actor.html#attribute-i-link"><span class="method_name">#link</span> <span class="module_name">(Gnip::Actor)</span></a>' },
4473
+ { method: 'links', module: 'gnip::actor', html: '<a href="classes/Gnip/Actor.html#attribute-i-links"><span class="method_name">#links</span> <span class="module_name">(Gnip::Actor)</span></a>' },
4474
+ { method: 'location', module: 'gnip::actor', html: '<a href="classes/Gnip/Actor.html#attribute-i-location"><span class="method_name">#location</span> <span class="module_name">(Gnip::Actor)</span></a>' },
4475
+ { method: 'log_level', module: 'gnipapi::configuration', html: '<a href="classes/GnipApi/Configuration.html#attribute-i-log_level"><span class="method_name">#log_level</span> <span class="module_name">(GnipApi::Configuration)</span></a>' },
4476
+ { method: 'logger', module: 'gnipapi::adapter', html: '<a href="classes/GnipApi/Adapter.html#attribute-i-logger"><span class="method_name">#logger</span> <span class="module_name">(GnipApi::Adapter)</span></a>' },
4477
+ { method: 'logger', module: 'gnipapi::configuration', html: '<a href="classes/GnipApi/Configuration.html#attribute-i-logger"><span class="method_name">#logger</span> <span class="module_name">(GnipApi::Configuration)</span></a>' },
4478
+ { method: 'logger', module: 'gnipapi::powertrack::buffer', html: '<a href="classes/GnipApi/PowerTrack/Buffer.html#attribute-i-logger"><span class="method_name">#logger</span> <span class="module_name">(GnipApi::PowerTrack::Buffer)</span></a>' },
4479
+ { method: 'long_object', module: 'gnip::activity', html: '<a href="classes/Gnip/Activity.html#attribute-i-long_object"><span class="method_name">#long_object</span> <span class="module_name">(Gnip::Activity)</span></a>' },
4480
+ { method: 'matching_rules', module: 'gnip::gnipdata', html: '<a href="classes/Gnip/GnipData.html#attribute-i-matching_rules"><span class="method_name">#matching_rules</span> <span class="module_name">(Gnip::GnipData)</span></a>' },
4481
+ { method: 'message', module: 'gnip::systemmessage', html: '<a href="classes/Gnip/SystemMessage.html#attribute-i-message"><span class="method_name">#message</span> <span class="module_name">(Gnip::SystemMessage)</span></a>' },
4482
+ { method: 'message_type', module: 'gnip::systemmessage', html: '<a href="classes/Gnip/SystemMessage.html#attribute-i-message_type"><span class="method_name">#message_type</span> <span class="module_name">(Gnip::SystemMessage)</span></a>' },
4483
+ { method: 'object', module: 'gnip::activity', html: '<a href="classes/Gnip/Activity.html#attribute-i-object"><span class="method_name">#object</span> <span class="module_name">(Gnip::Activity)</span></a>' },
4484
+ { method: 'object', module: 'gnip::twittercompliancemessage', html: '<a href="classes/Gnip/TwitterComplianceMessage.html#attribute-i-object"><span class="method_name">#object</span> <span class="module_name">(Gnip::TwitterComplianceMessage)</span></a>' },
4485
+ { method: 'object_type', module: 'gnip::activity', html: '<a href="classes/Gnip/Activity.html#attribute-i-object_type"><span class="method_name">#object_type</span> <span class="module_name">(Gnip::Activity)</span></a>' },
4486
+ { method: 'object_type', module: 'gnip::actor', html: '<a href="classes/Gnip/Actor.html#attribute-i-object_type"><span class="method_name">#object_type</span> <span class="module_name">(Gnip::Actor)</span></a>' },
4487
+ { method: 'object_type', module: 'gnip::twittercompliancemessage', html: '<a href="classes/Gnip/TwitterComplianceMessage.html#attribute-i-object_type"><span class="method_name">#object_type</span> <span class="module_name">(Gnip::TwitterComplianceMessage)</span></a>' },
4488
+ { method: 'password', module: 'gnipapi::configuration', html: '<a href="classes/GnipApi/Configuration.html#attribute-i-password"><span class="method_name">#password</span> <span class="module_name">(GnipApi::Configuration)</span></a>' },
4489
+ { method: 'payload', module: 'gnipapi::request', html: '<a href="classes/GnipApi/Request.html#attribute-i-payload"><span class="method_name">#payload</span> <span class="module_name">(GnipApi::Request)</span></a>' },
4490
+ { method: 'posted_time', module: 'gnip::activity', html: '<a href="classes/Gnip/Activity.html#attribute-i-posted_time"><span class="method_name">#posted_time</span> <span class="module_name">(Gnip::Activity)</span></a>' },
4491
+ { method: 'posted_time', module: 'gnip::actor', html: '<a href="classes/Gnip/Actor.html#attribute-i-posted_time"><span class="method_name">#posted_time</span> <span class="module_name">(Gnip::Actor)</span></a>' },
4492
+ { method: 'preferred_username', module: 'gnip::actor', html: '<a href="classes/Gnip/Actor.html#attribute-i-preferred_username"><span class="method_name">#preferred_username</span> <span class="module_name">(Gnip::Actor)</span></a>' },
4493
+ { method: 'provider', module: 'gnip::activity', html: '<a href="classes/Gnip/Activity.html#attribute-i-provider"><span class="method_name">#provider</span> <span class="module_name">(Gnip::Activity)</span></a>' },
4494
+ { method: 'raw', module: 'gnip::activity', html: '<a href="classes/Gnip/Activity.html#attribute-i-raw"><span class="method_name">#raw</span> <span class="module_name">(Gnip::Activity)</span></a>' },
4495
+ { method: 'raw', module: 'gnip::actor', html: '<a href="classes/Gnip/Actor.html#attribute-i-raw"><span class="method_name">#raw</span> <span class="module_name">(Gnip::Actor)</span></a>' },
4496
+ { method: 'raw', module: 'gnip::twittercompliancemessage', html: '<a href="classes/Gnip/TwitterComplianceMessage.html#attribute-i-raw"><span class="method_name">#raw</span> <span class="module_name">(Gnip::TwitterComplianceMessage)</span></a>' },
4497
+ { method: 'raw', module: 'gnip::url', html: '<a href="classes/Gnip/Url.html#attribute-i-raw"><span class="method_name">#raw</span> <span class="module_name">(Gnip::Url)</span></a>' },
4498
+ { method: 'request', module: 'gnipapi::response', html: '<a href="classes/GnipApi/Response.html#attribute-i-request"><span class="method_name">#request</span> <span class="module_name">(GnipApi::Response)</span></a>' },
4499
+ { method: 'request_method', module: 'gnipapi::request', html: '<a href="classes/GnipApi/Request.html#attribute-i-request_method"><span class="method_name">#request_method</span> <span class="module_name">(GnipApi::Request)</span></a>' },
4500
+ { method: 'request_timeout', module: 'gnipapi::configuration', html: '<a href="classes/GnipApi/Configuration.html#attribute-i-request_timeout"><span class="method_name">#request_timeout</span> <span class="module_name">(GnipApi::Configuration)</span></a>' },
4501
+ { method: 'retweet_count', module: 'gnip::activity', html: '<a href="classes/Gnip/Activity.html#attribute-i-retweet_count"><span class="method_name">#retweet_count</span> <span class="module_name">(Gnip::Activity)</span></a>' },
4502
+ { method: 'sent', module: 'gnip::systemmessage', html: '<a href="classes/Gnip/SystemMessage.html#attribute-i-sent"><span class="method_name">#sent</span> <span class="module_name">(Gnip::SystemMessage)</span></a>' },
4503
+ { method: 'source', module: 'gnipapi::configuration', html: '<a href="classes/GnipApi/Configuration.html#attribute-i-source"><span class="method_name">#source</span> <span class="module_name">(GnipApi::Configuration)</span></a>' },
4504
+ { method: 'status', module: 'gnipapi::response', html: '<a href="classes/GnipApi/Response.html#attribute-i-status"><span class="method_name">#status</span> <span class="module_name">(GnipApi::Response)</span></a>' },
4505
+ { method: 'statuses_count', module: 'gnip::actor', html: '<a href="classes/Gnip/Actor.html#attribute-i-statuses_count"><span class="method_name">#statuses_count</span> <span class="module_name">(Gnip::Actor)</span></a>' },
4506
+ { method: 'summary', module: 'gnip::actor', html: '<a href="classes/Gnip/Actor.html#attribute-i-summary"><span class="method_name">#summary</span> <span class="module_name">(Gnip::Actor)</span></a>' },
4507
+ { method: 'tag', module: 'gnipapi::powertrack::rule', html: '<a href="classes/GnipApi/PowerTrack/Rule.html#attribute-i-tag"><span class="method_name">#tag</span> <span class="module_name">(GnipApi::PowerTrack::Rule)</span></a>' },
4508
+ { method: 'target', module: 'gnip::twittercompliancemessage', html: '<a href="classes/Gnip/TwitterComplianceMessage.html#attribute-i-target"><span class="method_name">#target</span> <span class="module_name">(Gnip::TwitterComplianceMessage)</span></a>' },
4509
+ { method: 'terminator', module: 'gnipapi::powertrack::buffer', html: '<a href="classes/GnipApi/PowerTrack/Buffer.html#attribute-i-terminator"><span class="method_name">#terminator</span> <span class="module_name">(GnipApi::PowerTrack::Buffer)</span></a>' },
4510
+ { method: 'timestamp_ms', module: 'gnip::twittercompliancemessage', html: '<a href="classes/Gnip/TwitterComplianceMessage.html#attribute-i-timestamp_ms"><span class="method_name">#timestamp_ms</span> <span class="module_name">(Gnip::TwitterComplianceMessage)</span></a>' },
4511
+ { method: 'twitter_entities', module: 'gnip::activity', html: '<a href="classes/Gnip/Activity.html#attribute-i-twitter_entities"><span class="method_name">#twitter_entities</span> <span class="module_name">(Gnip::Activity)</span></a>' },
4512
+ { method: 'twitter_filter_level', module: 'gnip::activity', html: '<a href="classes/Gnip/Activity.html#attribute-i-twitter_filter_level"><span class="method_name">#twitter_filter_level</span> <span class="module_name">(Gnip::Activity)</span></a>' },
4513
+ { method: 'twitter_lang', module: 'gnip::activity', html: '<a href="classes/Gnip/Activity.html#attribute-i-twitter_lang"><span class="method_name">#twitter_lang</span> <span class="module_name">(Gnip::Activity)</span></a>' },
4514
+ { method: 'twitter_time_zone', module: 'gnip::actor', html: '<a href="classes/Gnip/Actor.html#attribute-i-twitter_time_zone"><span class="method_name">#twitter_time_zone</span> <span class="module_name">(Gnip::Actor)</span></a>' },
4515
+ { method: 'uri', module: 'gnipapi::request', html: '<a href="classes/GnipApi/Request.html#attribute-i-uri"><span class="method_name">#uri</span> <span class="module_name">(GnipApi::Request)</span></a>' },
4516
+ { method: 'url', module: 'gnip::url', html: '<a href="classes/Gnip/Url.html#attribute-i-url"><span class="method_name">#url</span> <span class="module_name">(Gnip::Url)</span></a>' },
4517
+ { method: 'urls', module: 'gnip::gnipdata', html: '<a href="classes/Gnip/GnipData.html#attribute-i-urls"><span class="method_name">#urls</span> <span class="module_name">(Gnip::GnipData)</span></a>' },
4518
+ { method: 'user', module: 'gnipapi::configuration', html: '<a href="classes/GnipApi/Configuration.html#attribute-i-user"><span class="method_name">#user</span> <span class="module_name">(GnipApi::Configuration)</span></a>' },
4519
+ { method: 'utc_offset', module: 'gnip::actor', html: '<a href="classes/Gnip/Actor.html#attribute-i-utc_offset"><span class="method_name">#utc_offset</span> <span class="module_name">(Gnip::Actor)</span></a>' },
4520
+ { method: 'value', module: 'gnipapi::powertrack::rule', html: '<a href="classes/GnipApi/PowerTrack/Rule.html#attribute-i-value"><span class="method_name">#value</span> <span class="module_name">(GnipApi::PowerTrack::Rule)</span></a>' },
4521
+ { method: 'verb', module: 'gnip::activity', html: '<a href="classes/Gnip/Activity.html#attribute-i-verb"><span class="method_name">#verb</span> <span class="module_name">(Gnip::Activity)</span></a>' },
4522
+ { method: 'verb', module: 'gnip::twittercompliancemessage', html: '<a href="classes/Gnip/TwitterComplianceMessage.html#attribute-i-verb"><span class="method_name">#verb</span> <span class="module_name">(Gnip::TwitterComplianceMessage)</span></a>' },
4523
+ { method: 'verified', module: 'gnip::actor', html: '<a href="classes/Gnip/Actor.html#attribute-i-verified"><span class="method_name">#verified</span> <span class="module_name">(Gnip::Actor)</span></a>' },
4524
+ { method: 'withheld_in_countries', module: 'gnip::twittercompliancemessage', html: '<a href="classes/Gnip/TwitterComplianceMessage.html#attribute-i-withheld_in_countries"><span class="method_name">#withheld_in_countries</span> <span class="module_name">(Gnip::TwitterComplianceMessage)</span></a>' },
4525
+ ]
4526
+ $(document).observe('dom:loaded', function() {
4527
+ // Setup search-during-typing.
4528
+ new Form.Element.Observer('search', 0.3, function(element, value) {
4529
+ performSearch();
4530
+ });
4531
+
4532
+ // Remove the default search box value when the user puts the focus on
4533
+ // the search box for the first time.
4534
+ var search_box = $('search');
4535
+ if ($F('search') == 'Enter search terms...') {
4536
+ search_box.observe('focus', function() {
4537
+ if (search_box.hasClassName('untouched')) {
4538
+ search_box.removeClassName('untouched');
4539
+ search_box.value = '';
4540
+ }
4541
+ });
4542
+ } else {
4543
+ search_box.removeClassName('untouched');
4544
+ }
4545
+
4546
+ search_box.insert({
4547
+ after: new Element('span', { 'class': 'clear_button' }).update('x').observe('click', function(e) {
4548
+ e.stopPropagation()
4549
+ search_box.setValue('')
4550
+ search_box.focus()
4551
+ })
4552
+ })
4553
+ });
4554
+
4555
+ function searchInIndex(query) {
4556
+ var i;
4557
+ var results = [];
4558
+ query = query.toLowerCase();
4559
+ for (i = 0; i < search_index.length; i++) {
4560
+ if (search_index[i].method.indexOf(query) != -1) {
4561
+ results.push(search_index[i]);
4562
+ }
4563
+ }
4564
+ return results;
4565
+ }
4566
+
4567
+ function buildHtmlForResults(results) {
4568
+ var html = "";
4569
+ var i;
4570
+ for (i = 0; i < results.length; i++) {
4571
+ html += '<li>' + results[i].html + '</li>';
4572
+ }
4573
+ return html;
4574
+ }
4575
+
4576
+ function performSearch() {
4577
+ var query = $F('search');
4578
+ if (query == '') {
4579
+ $('index-entries').show();
4580
+ $('search-results').hide();
4581
+ } else {
4582
+ var results = searchInIndex(query);
4583
+ $('search-results').update(buildHtmlForResults(results));
4584
+ $('index-entries').hide();
4585
+ $('search-results').show();
4586
+ }
4587
+ return false;
4588
+ }
4589
+
4590
+ </script>
4591
+ <form onsubmit='return performSearch()'>
4592
+ <input class='untouched' id='search' type='text' value='Enter search terms...'>
4593
+ </form>
4594
+ <ol class='methods' id='search-results' style='display: none'></ol>
4595
+ <ol class='methods' id='index-entries'>
4596
+ <li><a href="classes/GnipApi.html#attribute-c-configuration"><span class="method_name">::configuration</span> <span class="module_name">(GnipApi)</span></a></li>
4597
+ <li><a href="classes/GnipApi/Configuration.html#attribute-i-account"><span class="method_name">#account</span> <span class="module_name">(GnipApi::Configuration)</span></a></li>
4598
+ <li><a href="classes/Gnip/Activity.html#attribute-i-actor"><span class="method_name">#actor</span> <span class="module_name">(Gnip::Activity)</span></a></li>
4599
+ <li><a href="classes/Gnip/TwitterComplianceMessage.html#attribute-i-actor"><span class="method_name">#actor</span> <span class="module_name">(Gnip::TwitterComplianceMessage)</span></a></li>
4600
+ <li><a href="classes/Gnip/Activity.html#attribute-i-body"><span class="method_name">#body</span> <span class="module_name">(Gnip::Activity)</span></a></li>
4601
+ <li><a href="classes/GnipApi/Response.html#attribute-i-body"><span class="method_name">#body</span> <span class="module_name">(GnipApi::Response)</span></a></li>
4602
+ <li><a href="classes/GnipApi/PowerTrack/Buffer.html#attribute-i-data"><span class="method_name">#data</span> <span class="module_name">(GnipApi::PowerTrack::Buffer)</span></a></li>
4603
+ <li><a href="classes/GnipApi/Adapter.html#attribute-i-debug"><span class="method_name">#debug</span> <span class="module_name">(GnipApi::Adapter)</span></a></li>
4604
+ <li><a href="classes/GnipApi/Configuration.html#attribute-i-debug"><span class="method_name">#debug</span> <span class="module_name">(GnipApi::Configuration)</span></a></li>
4605
+ <li><a href="classes/Gnip/Actor.html#attribute-i-display_name"><span class="method_name">#display_name</span> <span class="module_name">(Gnip::Actor)</span></a></li>
4606
+ <li><a href="classes/Gnip/Activity.html#attribute-i-display_text_range"><span class="method_name">#display_text_range</span> <span class="module_name">(Gnip::Activity)</span></a></li>
4607
+ <li><a href="classes/Gnip/Url.html#attribute-i-display_url"><span class="method_name">#display_url</span> <span class="module_name">(Gnip::Url)</span></a></li>
4608
+ <li><a href="classes/GnipApi/Configuration.html#attribute-i-enable_gzip"><span class="method_name">#enable_gzip</span> <span class="module_name">(GnipApi::Configuration)</span></a></li>
4609
+ <li><a href="classes/Gnip/Url.html#attribute-i-expanded_status"><span class="method_name">#expanded_status</span> <span class="module_name">(Gnip::Url)</span></a></li>
4610
+ <li><a href="classes/Gnip/Url.html#attribute-i-expanded_url"><span class="method_name">#expanded_url</span> <span class="module_name">(Gnip::Url)</span></a></li>
4611
+ <li><a href="classes/Gnip/Url.html#attribute-i-expanded_url_description"><span class="method_name">#expanded_url_description</span> <span class="module_name">(Gnip::Url)</span></a></li>
4612
+ <li><a href="classes/Gnip/Url.html#attribute-i-expanded_url_title"><span class="method_name">#expanded_url_title</span> <span class="module_name">(Gnip::Url)</span></a></li>
4613
+ <li><a href="classes/Gnip/Activity.html#attribute-i-favorites_count"><span class="method_name">#favorites_count</span> <span class="module_name">(Gnip::Activity)</span></a></li>
4614
+ <li><a href="classes/Gnip/Actor.html#attribute-i-favorites_count"><span class="method_name">#favorites_count</span> <span class="module_name">(Gnip::Actor)</span></a></li>
4615
+ <li><a href="classes/Gnip/Actor.html#attribute-i-followers_count"><span class="method_name">#followers_count</span> <span class="module_name">(Gnip::Actor)</span></a></li>
4616
+ <li><a href="classes/Gnip/Actor.html#attribute-i-friends_count"><span class="method_name">#friends_count</span> <span class="module_name">(Gnip::Actor)</span></a></li>
4617
+ <li><a href="classes/Gnip/Activity.html#attribute-i-generator"><span class="method_name">#generator</span> <span class="module_name">(Gnip::Activity)</span></a></li>
4618
+ <li><a href="classes/Gnip/Activity.html#attribute-i-gnip"><span class="method_name">#gnip</span> <span class="module_name">(Gnip::Activity)</span></a></li>
4619
+ <li><a href="classes/GnipApi/Request.html#attribute-i-headers"><span class="method_name">#headers</span> <span class="module_name">(GnipApi::Request)</span></a></li>
4620
+ <li><a href="classes/GnipApi/Response.html#attribute-i-headers"><span class="method_name">#headers</span> <span class="module_name">(GnipApi::Response)</span></a></li>
4621
+ <li><a href="classes/Gnip/Activity.html#attribute-i-id"><span class="method_name">#id</span> <span class="module_name">(Gnip::Activity)</span></a></li>
4622
+ <li><a href="classes/Gnip/Actor.html#attribute-i-id"><span class="method_name">#id</span> <span class="module_name">(Gnip::Actor)</span></a></li>
4623
+ <li><a href="classes/GnipApi/PowerTrack/Rule.html#attribute-i-id"><span class="method_name">#id</span> <span class="module_name">(GnipApi::PowerTrack::Rule)</span></a></li>
4624
+ <li><a href="classes/Gnip/Actor.html#attribute-i-image"><span class="method_name">#image</span> <span class="module_name">(Gnip::Actor)</span></a></li>
4625
+ <li><a href="classes/Gnip/Url.html#attribute-i-indices"><span class="method_name">#indices</span> <span class="module_name">(Gnip::Url)</span></a></li>
4626
+ <li><a href="classes/GnipApi/Configuration.html#attribute-i-label"><span class="method_name">#label</span> <span class="module_name">(GnipApi::Configuration)</span></a></li>
4627
+ <li><a href="classes/Gnip/GnipData.html#attribute-i-language"><span class="method_name">#language</span> <span class="module_name">(Gnip::GnipData)</span></a></li>
4628
+ <li><a href="classes/Gnip/Actor.html#attribute-i-languages"><span class="method_name">#languages</span> <span class="module_name">(Gnip::Actor)</span></a></li>
4629
+ <li><a href="classes/Gnip/Activity.html#attribute-i-link"><span class="method_name">#link</span> <span class="module_name">(Gnip::Activity)</span></a></li>
4630
+ <li><a href="classes/Gnip/Actor.html#attribute-i-link"><span class="method_name">#link</span> <span class="module_name">(Gnip::Actor)</span></a></li>
4631
+ <li><a href="classes/Gnip/Actor.html#attribute-i-links"><span class="method_name">#links</span> <span class="module_name">(Gnip::Actor)</span></a></li>
4632
+ <li><a href="classes/Gnip/Actor.html#attribute-i-location"><span class="method_name">#location</span> <span class="module_name">(Gnip::Actor)</span></a></li>
4633
+ <li><a href="classes/GnipApi/Configuration.html#attribute-i-log_level"><span class="method_name">#log_level</span> <span class="module_name">(GnipApi::Configuration)</span></a></li>
4634
+ <li><a href="classes/GnipApi/Adapter.html#attribute-i-logger"><span class="method_name">#logger</span> <span class="module_name">(GnipApi::Adapter)</span></a></li>
4635
+ <li><a href="classes/GnipApi/Configuration.html#attribute-i-logger"><span class="method_name">#logger</span> <span class="module_name">(GnipApi::Configuration)</span></a></li>
4636
+ <li><a href="classes/GnipApi/PowerTrack/Buffer.html#attribute-i-logger"><span class="method_name">#logger</span> <span class="module_name">(GnipApi::PowerTrack::Buffer)</span></a></li>
4637
+ <li><a href="classes/Gnip/Activity.html#attribute-i-long_object"><span class="method_name">#long_object</span> <span class="module_name">(Gnip::Activity)</span></a></li>
4638
+ <li><a href="classes/Gnip/GnipData.html#attribute-i-matching_rules"><span class="method_name">#matching_rules</span> <span class="module_name">(Gnip::GnipData)</span></a></li>
4639
+ <li><a href="classes/Gnip/SystemMessage.html#attribute-i-message"><span class="method_name">#message</span> <span class="module_name">(Gnip::SystemMessage)</span></a></li>
4640
+ <li><a href="classes/Gnip/SystemMessage.html#attribute-i-message_type"><span class="method_name">#message_type</span> <span class="module_name">(Gnip::SystemMessage)</span></a></li>
4641
+ <li><a href="classes/Gnip/Activity.html#attribute-i-object"><span class="method_name">#object</span> <span class="module_name">(Gnip::Activity)</span></a></li>
4642
+ <li><a href="classes/Gnip/TwitterComplianceMessage.html#attribute-i-object"><span class="method_name">#object</span> <span class="module_name">(Gnip::TwitterComplianceMessage)</span></a></li>
4643
+ <li><a href="classes/Gnip/Activity.html#attribute-i-object_type"><span class="method_name">#object_type</span> <span class="module_name">(Gnip::Activity)</span></a></li>
4644
+ <li><a href="classes/Gnip/Actor.html#attribute-i-object_type"><span class="method_name">#object_type</span> <span class="module_name">(Gnip::Actor)</span></a></li>
4645
+ <li><a href="classes/Gnip/TwitterComplianceMessage.html#attribute-i-object_type"><span class="method_name">#object_type</span> <span class="module_name">(Gnip::TwitterComplianceMessage)</span></a></li>
4646
+ <li><a href="classes/GnipApi/Configuration.html#attribute-i-password"><span class="method_name">#password</span> <span class="module_name">(GnipApi::Configuration)</span></a></li>
4647
+ <li><a href="classes/GnipApi/Request.html#attribute-i-payload"><span class="method_name">#payload</span> <span class="module_name">(GnipApi::Request)</span></a></li>
4648
+ <li><a href="classes/Gnip/Activity.html#attribute-i-posted_time"><span class="method_name">#posted_time</span> <span class="module_name">(Gnip::Activity)</span></a></li>
4649
+ <li><a href="classes/Gnip/Actor.html#attribute-i-posted_time"><span class="method_name">#posted_time</span> <span class="module_name">(Gnip::Actor)</span></a></li>
4650
+ <li><a href="classes/Gnip/Actor.html#attribute-i-preferred_username"><span class="method_name">#preferred_username</span> <span class="module_name">(Gnip::Actor)</span></a></li>
4651
+ <li><a href="classes/Gnip/Activity.html#attribute-i-provider"><span class="method_name">#provider</span> <span class="module_name">(Gnip::Activity)</span></a></li>
4652
+ <li><a href="classes/Gnip/Activity.html#attribute-i-raw"><span class="method_name">#raw</span> <span class="module_name">(Gnip::Activity)</span></a></li>
4653
+ <li><a href="classes/Gnip/Actor.html#attribute-i-raw"><span class="method_name">#raw</span> <span class="module_name">(Gnip::Actor)</span></a></li>
4654
+ <li><a href="classes/Gnip/TwitterComplianceMessage.html#attribute-i-raw"><span class="method_name">#raw</span> <span class="module_name">(Gnip::TwitterComplianceMessage)</span></a></li>
4655
+ <li><a href="classes/Gnip/Url.html#attribute-i-raw"><span class="method_name">#raw</span> <span class="module_name">(Gnip::Url)</span></a></li>
4656
+ <li><a href="classes/GnipApi/Response.html#attribute-i-request"><span class="method_name">#request</span> <span class="module_name">(GnipApi::Response)</span></a></li>
4657
+ <li><a href="classes/GnipApi/Request.html#attribute-i-request_method"><span class="method_name">#request_method</span> <span class="module_name">(GnipApi::Request)</span></a></li>
4658
+ <li><a href="classes/GnipApi/Configuration.html#attribute-i-request_timeout"><span class="method_name">#request_timeout</span> <span class="module_name">(GnipApi::Configuration)</span></a></li>
4659
+ <li><a href="classes/Gnip/Activity.html#attribute-i-retweet_count"><span class="method_name">#retweet_count</span> <span class="module_name">(Gnip::Activity)</span></a></li>
4660
+ <li><a href="classes/Gnip/SystemMessage.html#attribute-i-sent"><span class="method_name">#sent</span> <span class="module_name">(Gnip::SystemMessage)</span></a></li>
4661
+ <li><a href="classes/GnipApi/Configuration.html#attribute-i-source"><span class="method_name">#source</span> <span class="module_name">(GnipApi::Configuration)</span></a></li>
4662
+ <li><a href="classes/GnipApi/Response.html#attribute-i-status"><span class="method_name">#status</span> <span class="module_name">(GnipApi::Response)</span></a></li>
4663
+ <li><a href="classes/Gnip/Actor.html#attribute-i-statuses_count"><span class="method_name">#statuses_count</span> <span class="module_name">(Gnip::Actor)</span></a></li>
4664
+ <li><a href="classes/Gnip/Actor.html#attribute-i-summary"><span class="method_name">#summary</span> <span class="module_name">(Gnip::Actor)</span></a></li>
4665
+ <li><a href="classes/GnipApi/PowerTrack/Rule.html#attribute-i-tag"><span class="method_name">#tag</span> <span class="module_name">(GnipApi::PowerTrack::Rule)</span></a></li>
4666
+ <li><a href="classes/Gnip/TwitterComplianceMessage.html#attribute-i-target"><span class="method_name">#target</span> <span class="module_name">(Gnip::TwitterComplianceMessage)</span></a></li>
4667
+ <li><a href="classes/GnipApi/PowerTrack/Buffer.html#attribute-i-terminator"><span class="method_name">#terminator</span> <span class="module_name">(GnipApi::PowerTrack::Buffer)</span></a></li>
4668
+ <li><a href="classes/Gnip/TwitterComplianceMessage.html#attribute-i-timestamp_ms"><span class="method_name">#timestamp_ms</span> <span class="module_name">(Gnip::TwitterComplianceMessage)</span></a></li>
4669
+ <li><a href="classes/Gnip/Activity.html#attribute-i-twitter_entities"><span class="method_name">#twitter_entities</span> <span class="module_name">(Gnip::Activity)</span></a></li>
4670
+ <li><a href="classes/Gnip/Activity.html#attribute-i-twitter_filter_level"><span class="method_name">#twitter_filter_level</span> <span class="module_name">(Gnip::Activity)</span></a></li>
4671
+ <li><a href="classes/Gnip/Activity.html#attribute-i-twitter_lang"><span class="method_name">#twitter_lang</span> <span class="module_name">(Gnip::Activity)</span></a></li>
4672
+ <li><a href="classes/Gnip/Actor.html#attribute-i-twitter_time_zone"><span class="method_name">#twitter_time_zone</span> <span class="module_name">(Gnip::Actor)</span></a></li>
4673
+ <li><a href="classes/GnipApi/Request.html#attribute-i-uri"><span class="method_name">#uri</span> <span class="module_name">(GnipApi::Request)</span></a></li>
4674
+ <li><a href="classes/Gnip/Url.html#attribute-i-url"><span class="method_name">#url</span> <span class="module_name">(Gnip::Url)</span></a></li>
4675
+ <li><a href="classes/Gnip/GnipData.html#attribute-i-urls"><span class="method_name">#urls</span> <span class="module_name">(Gnip::GnipData)</span></a></li>
4676
+ <li><a href="classes/GnipApi/Configuration.html#attribute-i-user"><span class="method_name">#user</span> <span class="module_name">(GnipApi::Configuration)</span></a></li>
4677
+ <li><a href="classes/Gnip/Actor.html#attribute-i-utc_offset"><span class="method_name">#utc_offset</span> <span class="module_name">(Gnip::Actor)</span></a></li>
4678
+ <li><a href="classes/GnipApi/PowerTrack/Rule.html#attribute-i-value"><span class="method_name">#value</span> <span class="module_name">(GnipApi::PowerTrack::Rule)</span></a></li>
4679
+ <li><a href="classes/Gnip/Activity.html#attribute-i-verb"><span class="method_name">#verb</span> <span class="module_name">(Gnip::Activity)</span></a></li>
4680
+ <li><a href="classes/Gnip/TwitterComplianceMessage.html#attribute-i-verb"><span class="method_name">#verb</span> <span class="module_name">(Gnip::TwitterComplianceMessage)</span></a></li>
4681
+ <li><a href="classes/Gnip/Actor.html#attribute-i-verified"><span class="method_name">#verified</span> <span class="module_name">(Gnip::Actor)</span></a></li>
4682
+ <li><a href="classes/Gnip/TwitterComplianceMessage.html#attribute-i-withheld_in_countries"><span class="method_name">#withheld_in_countries</span> <span class="module_name">(Gnip::TwitterComplianceMessage)</span></a></li>
4683
+ <li><a href="classes/GnipApi.html#method-c-adapter_class-3F"><span class="method_name">::adapter_class?</span> <span class="module_name">(GnipApi)</span></a></li>
4684
+ <li><a href="classes/Gnip/Message.html#method-c-build"><span class="method_name">::build</span> <span class="module_name">(Gnip::Message)</span></a></li>
4685
+ <li><a href="classes/GnipApi.html#method-c-config"><span class="method_name">::config</span> <span class="module_name">(GnipApi)</span></a></li>
4686
+ <li><a href="classes/GnipApi.html#method-c-configure"><span class="method_name">::configure</span> <span class="module_name">(GnipApi)</span></a></li>
4687
+ <li><a href="classes/GnipApi.html#method-c-credentials-3F"><span class="method_name">::credentials?</span> <span class="module_name">(GnipApi)</span></a></li>
4688
+ <li><a href="classes/GnipApi.html#method-c-logger"><span class="method_name">::logger</span> <span class="module_name">(GnipApi)</span></a></li>
4689
+ <li><a href="classes/Gnip/Activity.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Gnip::Activity)</span></a></li>
4690
+ <li><a href="classes/Gnip/Actor.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Gnip::Actor)</span></a></li>
4691
+ <li><a href="classes/Gnip/GnipData.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Gnip::GnipData)</span></a></li>
4692
+ <li><a href="classes/Gnip/SystemMessage.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Gnip::SystemMessage)</span></a></li>
4693
+ <li><a href="classes/Gnip/TwitterComplianceMessage.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Gnip::TwitterComplianceMessage)</span></a></li>
4694
+ <li><a href="classes/Gnip/UndefinedMessage.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Gnip::UndefinedMessage)</span></a></li>
4695
+ <li><a href="classes/Gnip/Url.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Gnip::Url)</span></a></li>
4696
+ <li><a href="classes/GnipApi/Adapter.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(GnipApi::Adapter)</span></a></li>
4697
+ <li><a href="classes/GnipApi/Configuration.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(GnipApi::Configuration)</span></a></li>
4698
+ <li><a href="classes/GnipApi/Errors/Adapter/GnipSoftwareError.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(GnipApi::Errors::Adapter::GnipSoftwareError)</span></a></li>
4699
+ <li><a href="classes/GnipApi/Errors/Adapter/RateLimitError.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(GnipApi::Errors::Adapter::RateLimitError)</span></a></li>
4700
+ <li><a href="classes/GnipApi/Errors/Configuration/InvalidOutputFormat.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(GnipApi::Errors::Configuration::InvalidOutputFormat)</span></a></li>
4701
+ <li><a href="classes/GnipApi/Errors/MissingAdapter.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(GnipApi::Errors::MissingAdapter)</span></a></li>
4702
+ <li><a href="classes/GnipApi/Errors/MissingCredentials.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(GnipApi::Errors::MissingCredentials)</span></a></li>
4703
+ <li><a href="classes/GnipApi/Errors/PowerTrack/MissingRules.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(GnipApi::Errors::PowerTrack::MissingRules)</span></a></li>
4704
+ <li><a href="classes/GnipApi/Errors/Search/MissingParameters.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(GnipApi::Errors::Search::MissingParameters)</span></a></li>
4705
+ <li><a href="classes/GnipApi/PowerTrack/Buffer.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(GnipApi::PowerTrack::Buffer)</span></a></li>
4706
+ <li><a href="classes/GnipApi/PowerTrack/Rule.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(GnipApi::PowerTrack::Rule)</span></a></li>
4707
+ <li><a href="classes/GnipApi/PowerTrack/Stream.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(GnipApi::PowerTrack::Stream)</span></a></li>
4708
+ <li><a href="classes/GnipApi/Request.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(GnipApi::Request)</span></a></li>
4709
+ <li><a href="classes/GnipApi/Response.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(GnipApi::Response)</span></a></li>
4710
+ <li><a href="classes/GnipApi/Request.html#method-c-new_delete"><span class="method_name">::new_delete</span> <span class="module_name">(GnipApi::Request)</span></a></li>
4711
+ <li><a href="classes/GnipApi/Request.html#method-c-new_get"><span class="method_name">::new_get</span> <span class="module_name">(GnipApi::Request)</span></a></li>
4712
+ <li><a href="classes/GnipApi/Request.html#method-c-new_post"><span class="method_name">::new_post</span> <span class="module_name">(GnipApi::Request)</span></a></li>
4713
+ <li><a href="classes/GnipApi/Endpoints.html#method-c-powertrack_rule_replay"><span class="method_name">::powertrack_rule_replay</span> <span class="module_name">(GnipApi::Endpoints)</span></a></li>
4714
+ <li><a href="classes/GnipApi/Endpoints.html#method-c-powertrack_rule_validator"><span class="method_name">::powertrack_rule_validator</span> <span class="module_name">(GnipApi::Endpoints)</span></a></li>
4715
+ <li><a href="classes/GnipApi/Endpoints.html#method-c-powertrack_rules"><span class="method_name">::powertrack_rules</span> <span class="module_name">(GnipApi::Endpoints)</span></a></li>
4716
+ <li><a href="classes/GnipApi/Endpoints.html#method-c-powertrack_stream"><span class="method_name">::powertrack_stream</span> <span class="module_name">(GnipApi::Endpoints)</span></a></li>
4717
+ <li><a href="classes/GnipApi/Endpoints.html#method-c-powertrack_stream_replay"><span class="method_name">::powertrack_stream_replay</span> <span class="module_name">(GnipApi::Endpoints)</span></a></li>
4718
+ <li><a href="classes/GnipApi/Endpoints.html#method-c-search_activities"><span class="method_name">::search_activities</span> <span class="module_name">(GnipApi::Endpoints)</span></a></li>
4719
+ <li><a href="classes/GnipApi/Endpoints.html#method-c-search_counts"><span class="method_name">::search_counts</span> <span class="module_name">(GnipApi::Endpoints)</span></a></li>
4720
+ <li><a href="classes/GnipApi/Search.html#method-i-activities"><span class="method_name">#activities</span> <span class="module_name">(GnipApi::Search)</span></a></li>
4721
+ <li><a href="classes/Gnip/Message.html#method-i-activity-3F"><span class="method_name">#activity?</span> <span class="module_name">(Gnip::Message)</span></a></li>
4722
+ <li><a href="classes/GnipApi/PowerTrack/Rule.html#method-i-attributes"><span class="method_name">#attributes</span> <span class="module_name">(GnipApi::PowerTrack::Rule)</span></a></li>
4723
+ <li><a href="classes/Gnip/Activity.html#method-i-author"><span class="method_name">#author</span> <span class="module_name">(Gnip::Activity)</span></a></li>
4724
+ <li><a href="classes/GnipApi/PowerTrack/Stream.html#method-i-build_message"><span class="method_name">#build_message</span> <span class="module_name">(GnipApi::PowerTrack::Stream)</span></a></li>
4725
+ <li><a href="classes/GnipApi/Response.html#method-i-check_for_errors-21"><span class="method_name">#check_for_errors!</span> <span class="module_name">(GnipApi::Response)</span></a></li>
4726
+ <li><a href="classes/Gnip/Message.html#method-i-compliance_message-3F"><span class="method_name">#compliance_message?</span> <span class="module_name">(Gnip::Message)</span></a></li>
4727
+ <li><a href="classes/GnipApi/PowerTrack/Rule.html#method-i-consistent-3F"><span class="method_name">#consistent?</span> <span class="module_name">(GnipApi::PowerTrack::Rule)</span></a></li>
4728
+ <li><a href="classes/GnipApi/PowerTrack/Rules.html#method-i-construct_rules"><span class="method_name">#construct_rules</span> <span class="module_name">(GnipApi::PowerTrack::Rules)</span></a></li>
4729
+ <li><a href="classes/GnipApi/PowerTrack/Stream.html#method-i-consume"><span class="method_name">#consume</span> <span class="module_name">(GnipApi::PowerTrack::Stream)</span></a></li>
4730
+ <li><a href="classes/GnipApi/PowerTrack/Buffer.html#method-i-consume-21"><span class="method_name">#consume!</span> <span class="module_name">(GnipApi::PowerTrack::Buffer)</span></a></li>
4731
+ <li><a href="classes/GnipApi/PowerTrack/Stream.html#method-i-consume_json"><span class="method_name">#consume_json</span> <span class="module_name">(GnipApi::PowerTrack::Stream)</span></a></li>
4732
+ <li><a href="classes/GnipApi/PowerTrack/Stream.html#method-i-consume_raw"><span class="method_name">#consume_raw</span> <span class="module_name">(GnipApi::PowerTrack::Stream)</span></a></li>
4733
+ <li><a href="classes/GnipApi/Search.html#method-i-counts"><span class="method_name">#counts</span> <span class="module_name">(GnipApi::Search)</span></a></li>
4734
+ <li><a href="classes/GnipApi/PowerTrack/Rules.html#method-i-create"><span class="method_name">#create</span> <span class="module_name">(GnipApi::PowerTrack::Rules)</span></a></li>
4735
+ <li><a href="classes/GnipApi/Adapter.html#method-i-delete"><span class="method_name">#delete</span> <span class="module_name">(GnipApi::Adapter)</span></a></li>
4736
+ <li><a href="classes/GnipApi/PowerTrack/Rules.html#method-i-delete"><span class="method_name">#delete</span> <span class="module_name">(GnipApi::PowerTrack::Rules)</span></a></li>
4737
+ <li><a href="classes/GnipApi/JsonParser.html#method-i-encode"><span class="method_name">#encode</span> <span class="module_name">(GnipApi::JsonParser)</span></a></li>
4738
+ <li><a href="classes/Gnip/Message.html#method-i-error-3F"><span class="method_name">#error?</span> <span class="module_name">(Gnip::Message)</span></a></li>
4739
+ <li><a href="classes/GnipApi/Response.html#method-i-error_message"><span class="method_name">#error_message</span> <span class="module_name">(GnipApi::Response)</span></a></li>
4740
+ <li><a href="classes/GnipApi/Request.html#method-i-execute-21"><span class="method_name">#execute!</span> <span class="module_name">(GnipApi::Request)</span></a></li>
4741
+ <li><a href="classes/Gnip/Message.html#method-i-generate_json"><span class="method_name">#generate_json</span> <span class="module_name">(Gnip::Message)</span></a></li>
4742
+ <li><a href="classes/GnipApi/Adapter.html#method-i-get"><span class="method_name">#get</span> <span class="module_name">(GnipApi::Adapter)</span></a></li>
4743
+ <li><a href="classes/Gnip/Activity.html#method-i-hidden_data-3F"><span class="method_name">#hidden_data?</span> <span class="module_name">(Gnip::Activity)</span></a></li>
4744
+ <li><a href="classes/Gnip/Message.html#method-i-info-3F"><span class="method_name">#info?</span> <span class="module_name">(Gnip::Message)</span></a></li>
4745
+ <li><a href="classes/GnipApi/PowerTrack/Buffer.html#method-i-insert-21"><span class="method_name">#insert!</span> <span class="module_name">(GnipApi::PowerTrack::Buffer)</span></a></li>
4746
+ <li><a href="classes/GnipApi/Adapter.html#method-i-io_curl_stream"><span class="method_name">#io_curl_stream</span> <span class="module_name">(GnipApi::Adapter)</span></a></li>
4747
+ <li><a href="classes/GnipApi/PowerTrack/Rules.html#method-i-list"><span class="method_name">#list</span> <span class="module_name">(GnipApi::PowerTrack::Rules)</span></a></li>
4748
+ <li><a href="classes/Gnip/SystemMessage.html#method-i-log-21"><span class="method_name">#log!</span> <span class="module_name">(Gnip::SystemMessage)</span></a></li>
4749
+ <li><a href="classes/GnipApi/Request.html#method-i-log-21"><span class="method_name">#log!</span> <span class="module_name">(GnipApi::Request)</span></a></li>
4750
+ <li><a href="classes/Gnip/SystemMessage.html#method-i-log_method"><span class="method_name">#log_method</span> <span class="module_name">(Gnip::SystemMessage)</span></a></li>
4751
+ <li><a href="classes/GnipApi/PowerTrack/Stream.html#method-i-logger"><span class="method_name">#logger</span> <span class="module_name">(GnipApi::PowerTrack::Stream)</span></a></li>
4752
+ <li><a href="classes/GnipApi/Response.html#method-i-ok-3F"><span class="method_name">#ok?</span> <span class="module_name">(GnipApi::Response)</span></a></li>
4753
+ <li><a href="classes/Gnip/Actor.html#method-i-original_attributes"><span class="method_name">#original_attributes</span> <span class="module_name">(Gnip::Actor)</span></a></li>
4754
+ <li><a href="classes/Gnip/GnipData.html#method-i-original_attributes"><span class="method_name">#original_attributes</span> <span class="module_name">(Gnip::GnipData)</span></a></li>
4755
+ <li><a href="classes/Gnip/SystemMessage.html#method-i-original_attributes"><span class="method_name">#original_attributes</span> <span class="module_name">(Gnip::SystemMessage)</span></a></li>
4756
+ <li><a href="classes/GnipApi/JsonParser.html#method-i-parse"><span class="method_name">#parse</span> <span class="module_name">(GnipApi::JsonParser)</span></a></li>
4757
+ <li><a href="classes/GnipApi/PowerTrack/Stream.html#method-i-parse_json"><span class="method_name">#parse_json</span> <span class="module_name">(GnipApi::PowerTrack::Stream)</span></a></li>
4758
+ <li><a href="classes/GnipApi/PowerTrack/Rules.html#method-i-parse_rules"><span class="method_name">#parse_rules</span> <span class="module_name">(GnipApi::PowerTrack::Rules)</span></a></li>
4759
+ <li><a href="classes/GnipApi/Adapter.html#method-i-post"><span class="method_name">#post</span> <span class="module_name">(GnipApi::Adapter)</span></a></li>
4760
+ <li><a href="classes/GnipApi/PowerTrack/Stream.html#method-i-process_entries"><span class="method_name">#process_entries</span> <span class="module_name">(GnipApi::PowerTrack::Stream)</span></a></li>
4761
+ <li><a href="classes/GnipApi/Adapter.html#method-i-pty_curl_stream"><span class="method_name">#pty_curl_stream</span> <span class="module_name">(GnipApi::Adapter)</span></a></li>
4762
+ <li><a href="classes/GnipApi/PowerTrack/Buffer.html#method-i-read-21"><span class="method_name">#read!</span> <span class="module_name">(GnipApi::PowerTrack::Buffer)</span></a></li>
4763
+ <li><a href="classes/GnipApi/PowerTrack/Stream.html#method-i-read_io_stream"><span class="method_name">#read_io_stream</span> <span class="module_name">(GnipApi::PowerTrack::Stream)</span></a></li>
4764
+ <li><a href="classes/GnipApi/PowerTrack/Stream.html#method-i-read_pty_stream"><span class="method_name">#read_pty_stream</span> <span class="module_name">(GnipApi::PowerTrack::Stream)</span></a></li>
4765
+ <li><a href="classes/GnipApi/PowerTrack/Stream.html#method-i-read_stream"><span class="method_name">#read_stream</span> <span class="module_name">(GnipApi::PowerTrack::Stream)</span></a></li>
4766
+ <li><a href="classes/GnipApi/Response.html#method-i-request_method"><span class="method_name">#request_method</span> <span class="module_name">(GnipApi::Response)</span></a></li>
4767
+ <li><a href="classes/GnipApi/Response.html#method-i-request_uri"><span class="method_name">#request_uri</span> <span class="module_name">(GnipApi::Response)</span></a></li>
4768
+ <li><a href="classes/Gnip/Activity.html#method-i-retweet-3F"><span class="method_name">#retweet?</span> <span class="module_name">(Gnip::Activity)</span></a></li>
4769
+ <li><a href="classes/GnipApi/PowerTrack/Buffer.html#method-i-size"><span class="method_name">#size</span> <span class="module_name">(GnipApi::PowerTrack::Buffer)</span></a></li>
4770
+ <li><a href="classes/GnipApi/Adapter.html#method-i-stream_get"><span class="method_name">#stream_get</span> <span class="module_name">(GnipApi::Adapter)</span></a></li>
4771
+ <li><a href="classes/Gnip/Message.html#method-i-system_message-3F"><span class="method_name">#system_message?</span> <span class="module_name">(Gnip::Message)</span></a></li>
4772
+ <li><a href="classes/GnipApi/PowerTrack/Stream.html#method-i-thread_consume"><span class="method_name">#thread_consume</span> <span class="module_name">(GnipApi::PowerTrack::Stream)</span></a></li>
4773
+ <li><a href="classes/Gnip/Activity.html#method-i-to_h"><span class="method_name">#to_h</span> <span class="module_name">(Gnip::Activity)</span></a></li>
4774
+ <li><a href="classes/Gnip/TwitterComplianceMessage.html#method-i-to_h"><span class="method_name">#to_h</span> <span class="module_name">(Gnip::TwitterComplianceMessage)</span></a></li>
4775
+ <li><a href="classes/Gnip/Url.html#method-i-to_h"><span class="method_name">#to_h</span> <span class="module_name">(Gnip::Url)</span></a></li>
4776
+ <li><a href="classes/Gnip/Activity.html#method-i-to_json"><span class="method_name">#to_json</span> <span class="module_name">(Gnip::Activity)</span></a></li>
4777
+ <li><a href="classes/Gnip/Actor.html#method-i-to_json"><span class="method_name">#to_json</span> <span class="module_name">(Gnip::Actor)</span></a></li>
4778
+ <li><a href="classes/Gnip/GnipData.html#method-i-to_json"><span class="method_name">#to_json</span> <span class="module_name">(Gnip::GnipData)</span></a></li>
4779
+ <li><a href="classes/Gnip/SystemMessage.html#method-i-to_json"><span class="method_name">#to_json</span> <span class="module_name">(Gnip::SystemMessage)</span></a></li>
4780
+ <li><a href="classes/Gnip/TwitterComplianceMessage.html#method-i-to_json"><span class="method_name">#to_json</span> <span class="module_name">(Gnip::TwitterComplianceMessage)</span></a></li>
4781
+ <li><a href="classes/Gnip/Url.html#method-i-to_json"><span class="method_name">#to_json</span> <span class="module_name">(Gnip::Url)</span></a></li>
4782
+ <li><a href="classes/GnipApi/PowerTrack/Rule.html#method-i-to_json"><span class="method_name">#to_json</span> <span class="module_name">(GnipApi::PowerTrack::Rule)</span></a></li>
4783
+ <li><a href="classes/Gnip/Activity.html#method-i-tweet_id"><span class="method_name">#tweet_id</span> <span class="module_name">(Gnip::Activity)</span></a></li>
4784
+ <li><a href="classes/GnipApi/PowerTrack/Rule.html#method-i-uid"><span class="method_name">#uid</span> <span class="module_name">(GnipApi::PowerTrack::Rule)</span></a></li>
4785
+ <li><a href="classes/Gnip/Actor.html#method-i-user_id"><span class="method_name">#user_id</span> <span class="module_name">(Gnip::Actor)</span></a></li>
4786
+ <li><a href="classes/GnipApi/PowerTrack/Rules.html#method-i-validate"><span class="method_name">#validate</span> <span class="module_name">(GnipApi::PowerTrack::Rules)</span></a></li>
4787
+ <li><a href="classes/Gnip/Message.html#method-i-warn-3F"><span class="method_name">#warn?</span> <span class="module_name">(Gnip::Message)</span></a></li>
4788
+ </ol>
4789
+ </div>
4790
+ </body>
4791
+ </html>