Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
48a1152
commit a5640ff
Showing
18 changed files
with
182 additions
and
353 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,102 +1,11 @@ | ||
// This code is used only to make the minified file smaller | ||
// Extraced from http://closure-library.googlecode.com/svn/docs/closure_goog_base.js.source.html | ||
|
||
var goog = window.goog = window.goog || { }; | ||
|
||
/** | ||
* Reference to the global context. In most cases this will be 'window'. | ||
*/ | ||
goog.global = goog.global || this; | ||
|
||
/** | ||
* Returns true if the specified value is not |undefined|. | ||
* WARNING: Do not use this to test if an object has a property. Use the in | ||
* operator instead. Additionally, this function assumes that the global | ||
* undefined variable has not been redefined. | ||
* @param {*} val Variable to test. | ||
* @return {boolean} Whether variable is defined. | ||
*/ | ||
goog.isDef = goog.isDef || function(val) { | ||
return val !== undefined; | ||
// Google Closure Compiler helpers (used only to make the minified file smaller) | ||
ko.exportSymbol = function(publicPath, object) { | ||
var tokens = publicPath.split("."); | ||
var target = window; | ||
for (var i = 0; i < tokens.length - 1; i++) | ||
target = target[tokens[i]]; | ||
target[tokens[tokens.length - 1]] = object; | ||
}; | ||
|
||
/** | ||
* Exposes an unobfuscated global namespace path for the given object. | ||
* Note that fields of the exported object *will* be obfuscated, | ||
* unless they are exported in turn via this function or | ||
* goog.exportProperty | ||
* | ||
* <p>Also handy for making public items that are defined in anonymous | ||
* closures. | ||
* | ||
* ex. goog.exportSymbol('Foo', Foo); | ||
* | ||
* ex. goog.exportSymbol('public.path.Foo.staticFunction', | ||
* Foo.staticFunction); | ||
* public.path.Foo.staticFunction(); | ||
* | ||
* ex. goog.exportSymbol('public.path.Foo.prototype.myMethod', | ||
* Foo.prototype.myMethod); | ||
* new public.path.Foo().myMethod(); | ||
* | ||
* @param {string} publicPath Unobfuscated name to export. | ||
* @param {*} object Object the name should point to. | ||
* @param {Object=} opt_objectToExportTo The object to add the path to; default | ||
* is |goog.global|. | ||
*/ | ||
goog.exportSymbol = goog.exportSymbol || function(publicPath, object, opt_objectToExportTo) { | ||
goog.exportPath_(publicPath, object, opt_objectToExportTo); | ||
}; | ||
|
||
/** | ||
* Exports a property unobfuscated into the object's namespace. | ||
* ex. goog.exportProperty(Foo, 'staticFunction', Foo.staticFunction); | ||
* ex. goog.exportProperty(Foo.prototype, 'myMethod', Foo.prototype.myMethod); | ||
* @param {Object} object Object whose static property is being exported. | ||
* @param {string} publicName Unobfuscated name to export. | ||
* @param {*} symbol Object the name should point to. | ||
*/ | ||
goog.exportProperty = goog.exportProperty || function(object, publicName, symbol) { | ||
object[publicName] = symbol; | ||
}; | ||
|
||
/** | ||
* Builds an object structure for the provided namespace path, | ||
* ensuring that names that already exist are not overwritten. For | ||
* example: | ||
* "a.b.c" -> a = {};a.b={};a.b.c={}; | ||
* Used by goog.provide and goog.exportSymbol. | ||
* @param {string} name name of the object that this file defines. | ||
* @param {*=} opt_object the object to expose at the end of the path. | ||
* @param {Object=} opt_objectToExportTo The object to add the path to; default | ||
* is |goog.global|. | ||
* @private | ||
*/ | ||
goog.exportPath_ = goog.exportPath_ || function(name, opt_object, opt_objectToExportTo) { | ||
var parts = name.split('.'); | ||
var cur = opt_objectToExportTo || goog.global; | ||
|
||
// Internet Explorer exhibits strange behavior when throwing errors from | ||
// methods externed in this manner. See the testExportSymbolExceptions in | ||
// base_test.html for an example. | ||
if (!(parts[0] in cur) && cur.execScript) { | ||
cur.execScript('var ' + parts[0]); | ||
} | ||
|
||
// Certain browsers cannot parse code in the form for((a in b); c;); | ||
// This pattern is produced by the JSCompiler when it collapses the | ||
// statement above into the conditional loop below. To prevent this from | ||
// happening, use a for-loop and reserve the init logic as below. | ||
|
||
// Parentheses added to eliminate strict JS warning in Firefox. | ||
for (var part; parts.length && (part = parts.shift());) { | ||
if (!parts.length && goog.isDef(opt_object)) { | ||
// last part and we have an object; use it | ||
cur[part] = opt_object; | ||
} else if (cur[part]) { | ||
cur = cur[part]; | ||
} else { | ||
cur = cur[part] = {}; | ||
} | ||
} | ||
ko.exportProperty = function(owner, publicName, object) { | ||
owner[publicName] = object; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters