jsx
Version:
a faster, safer, easier JavaScript
1,565 lines (1,365 loc) • 1.74 MB
JSX
#!/usr/bin/env node
// generatedy by JSX compiler 0.9.86 (2014-04-18 14:04:03 +0900; c83e8c53332f8cd6df20119c5d1c50c01edbcd09)
var JSX = {};
(function (JSX) {
/**
* extends the class
*/
function $__jsx_extend(derivations, base) {
var ctor = function () {};
ctor.prototype = base.prototype;
var proto = new ctor();
for (var i in derivations) {
derivations[i].prototype = proto;
}
}
/**
* copies the implementations from source interface to target
*/
function $__jsx_merge_interface(target, source) {
for (var k in source.prototype)
if (source.prototype.hasOwnProperty(k))
target.prototype[k] = source.prototype[k];
}
/**
* defers the initialization of the property
*/
function $__jsx_lazy_init(obj, prop, func) {
function reset(obj, prop, value) {
delete obj[prop];
obj[prop] = value;
return value;
}
Object.defineProperty(obj, prop, {
get: function () {
return reset(obj, prop, func());
},
set: function (v) {
reset(obj, prop, v);
},
enumerable: true,
configurable: true
});
}
var $__jsx_imul = Math.imul;
if (typeof $__jsx_imul === "undefined") {
$__jsx_imul = function (a, b) {
var ah = (a >>> 16) & 0xffff;
var al = a & 0xffff;
var bh = (b >>> 16) & 0xffff;
var bl = b & 0xffff;
return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0)|0);
};
}
/**
* fused int-ops with side-effects
*/
function $__jsx_ipadd(o, p, r) {
return o[p] = (o[p] + r) | 0;
}
function $__jsx_ipsub(o, p, r) {
return o[p] = (o[p] - r) | 0;
}
function $__jsx_ipmul(o, p, r) {
return o[p] = $__jsx_imul(o[p], r);
}
function $__jsx_ipdiv(o, p, r) {
return o[p] = (o[p] / r) | 0;
}
function $__jsx_ipmod(o, p, r) {
return o[p] = (o[p] % r) | 0;
}
function $__jsx_ippostinc(o, p) {
var v = o[p];
o[p] = (v + 1) | 0;
return v;
}
function $__jsx_ippostdec(o, p) {
var v = o[p];
o[p] = (v - 1) | 0;
return v;
}
/**
* non-inlined version of Array#each
*/
function $__jsx_forEach(o, f) {
var l = o.length;
for (var i = 0; i < l; ++i)
f(o[i]);
}
/*
* global functions, renamed to avoid conflict with local variable names
*/
var $__jsx_parseInt = parseInt;
var $__jsx_parseFloat = parseFloat;
function $__jsx_isNaN(n) { return n !== n; }
var $__jsx_isFinite = isFinite;
var $__jsx_encodeURIComponent = encodeURIComponent;
var $__jsx_decodeURIComponent = decodeURIComponent;
var $__jsx_encodeURI = encodeURI;
var $__jsx_decodeURI = decodeURI;
var $__jsx_ObjectToString = Object.prototype.toString;
var $__jsx_ObjectHasOwnProperty = Object.prototype.hasOwnProperty;
/*
* profiler object, initialized afterwards
*/
function $__jsx_profiler() {
}
/*
* public interface to JSX code
*/
JSX.require = function (path) {
var m = $__jsx_classMap[path];
return m !== undefined ? m : null;
};
JSX.profilerIsRunning = function () {
return $__jsx_profiler.getResults != null;
};
JSX.getProfileResults = function () {
return ($__jsx_profiler.getResults || function () { return {}; })();
};
JSX.postProfileResults = function (url, cb) {
if ($__jsx_profiler.postResults == null)
throw new Error("profiler has not been turned on");
return $__jsx_profiler.postResults(url, cb);
};
JSX.resetProfileResults = function () {
if ($__jsx_profiler.resetResults == null)
throw new Error("profiler has not been turned on");
return $__jsx_profiler.resetResults();
};
JSX.DEBUG = false;
var GeneratorFunction$0 =
(function () {
try {
return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')();
} catch (e) {
return function GeneratorFunction () {};
}
})();
var __jsx_generator_object$0 =
(function () {
function __jsx_generator_object() {
this.__next = 0;
this.__loop = null;
this.__seed = null;
this.__value = undefined;
this.__status = 0; // SUSPENDED: 0, ACTIVE: 1, DEAD: 2
}
__jsx_generator_object.prototype.next = function (seed) {
switch (this.__status) {
case 0:
this.__status = 1;
this.__seed = seed;
// go next!
this.__loop(this.__next);
var done = false;
if (this.__next != -1) {
this.__status = 0;
} else {
this.__status = 2;
done = true;
}
return { value: this.__value, done: done };
case 1:
throw new Error("Generator is already running");
case 2:
throw new Error("Generator is already finished");
default:
throw new Error("Unexpected generator internal state");
}
};
return __jsx_generator_object;
}());
function _Main() {
};
$__jsx_extend([_Main], Object);
function _Main$main$AS(args) {
var exitCode;
var stdoutIsFlushed;
var stderrIsFlushed;
var exitIfFlushed;
var opts$0;
exitCode = JSXCommand$main$LPlatform$AS(new NodePlatform(), (opts$0 = process.env.JSX_OPTS, ! opts$0 ? [] : opts$0.split(/\s+/)).concat(args));
if (JSX.profilerIsRunning()) {
js$0.global.setTimeout((function () {
JSX.postProfileResults("http://localhost:2012/post-profile", (function (err, result) {
}));
}), 0);
}
if (exitCode === 0) {
return;
}
stdoutIsFlushed = process.stdout.write("");
stderrIsFlushed = process.stderr.write("");
exitIfFlushed = (function (data) {
if (stdoutIsFlushed && stderrIsFlushed) {
process.exit((exitCode | 0));
}
});
if (! stdoutIsFlushed) {
process.stdout.on('drain', exitIfFlushed);
}
if (! stderrIsFlushed) {
process.stderr.on('drain', exitIfFlushed);
}
exitIfFlushed(null);
};
_Main.main = _Main$main$AS;
_Main.main$AS = _Main$main$AS;
var js$0 = (function () {
var global = Function("return this")();
return {
global: global,
eval: global.eval,
invoke: function(invocant, methodName, args) {
return invocant[methodName].apply(invocant, args);
},
newFunction: Function
};
}());
function node() {}
$__jsx_extend([node], Object);
function node$require$S(source) {
var src;
src = 'require(' + JSON.stringify(source) + ')';
return eval(src);
};
node.require$S = node$require$S;
function Timer() {
};
$__jsx_extend([Timer], Object);
function Timer$setTimeout$F$V$N(callback, intervalMS) {
return js$0.global.setTimeout(callback, intervalMS);
};
Timer.setTimeout$F$V$N = Timer$setTimeout$F$V$N;
function Timer$clearTimeout$LTimerHandle$(timer) {
js$0.global.clearTimeout(timer);
};
Timer.clearTimeout$LTimerHandle$ = Timer$clearTimeout$LTimerHandle$;
function Timer$setInterval$F$V$N(callback, intervalMS) {
return js$0.global.setInterval(callback, intervalMS);
};
Timer.setInterval$F$V$N = Timer$setInterval$F$V$N;
function Timer$clearInterval$LTimerHandle$(timer) {
js$0.global.clearInterval(timer);
};
Timer.clearInterval$LTimerHandle$ = Timer$clearInterval$LTimerHandle$;
function Timer$requestAnimationFrame$F$NV$(callback) {
return Timer._requestAnimationFrame(callback);
};
Timer.requestAnimationFrame$F$NV$ = Timer$requestAnimationFrame$F$NV$;
function Timer$cancelAnimationFrame$LTimerHandle$(timer) {
Timer._cancelAnimationFrame(timer);
};
Timer.cancelAnimationFrame$LTimerHandle$ = Timer$cancelAnimationFrame$LTimerHandle$;
function Timer$useNativeRAF$B(enable) {
Timer._requestAnimationFrame = Timer$_getRequestAnimationFrameImpl$B(enable);
Timer._cancelAnimationFrame = Timer$_getCancelAnimationFrameImpl$B(enable);
};
Timer.useNativeRAF$B = Timer$useNativeRAF$B;
function Timer$_getRequestAnimationFrameImpl$B(useNativeImpl) {
var prefixes;
var i;
var name;
var lastTime;
var prefixes$len$0;
if (useNativeImpl) {
prefixes = [ "r", "webkitR", "mozR", "oR", "msR" ];
for ((i = 0, prefixes$len$0 = prefixes.length); i < prefixes$len$0; ++i) {
name = prefixes[i] + "equestAnimationFrame";
if (js$0.global[name] instanceof Function) {
return (function (callback) {
return js$0.global[name](callback);
});
}
}
}
lastTime = 0;
return (function (callback) {
var now;
var timeToCall;
var value2$0;
now = Date.now();
value2$0 = 16 - (now - lastTime);
timeToCall = (0 >= value2$0 ? 0 : value2$0);
lastTime = now + timeToCall;
return js$0.global.setTimeout((function () {
callback(now + timeToCall);
}), timeToCall);
});
};
Timer._getRequestAnimationFrameImpl$B = Timer$_getRequestAnimationFrameImpl$B;
function Timer$_getCancelAnimationFrameImpl$B(useNativeImpl) {
var prefixes;
var i;
var name;
var prefixes$len$0;
if (useNativeImpl) {
prefixes = [ "c", "webkitC", "mozC", "oC", "msC" ];
for ((i = 0, prefixes$len$0 = prefixes.length); i < prefixes$len$0; ++i) {
name = prefixes[i] + "ancelAnimationFrame";
if (js$0.global[name] instanceof Function) {
return (function (timer) {
js$0.global[name](timer);
});
}
}
}
return Timer$clearTimeout$LTimerHandle$;
};
Timer._getCancelAnimationFrameImpl$B = Timer$_getCancelAnimationFrameImpl$B;
function TimerHandle() {}
$__jsx_extend([TimerHandle], Object);
function Util() {
};
$__jsx_extend([Util], Object);
function Util$repeat$SN(c, n) {
var s;
var i;
s = "";
for (i = 0; i < n; ++i) {
s += c;
}
return s;
};
Util.repeat$SN = Util$repeat$SN;
function Util$format$SAS(fmt, args) {
return fmt.replace(/%(\d+|%)/g, (function (m) {
var arg;
if (m === "%%") {
return "%";
} else {
arg = args[(m.substring(1) | 0) - 1];
return (arg == null ? "null" : arg);
}
}));
};
Util.format$SAS = Util$format$SAS;
function Util$ld$SS(a, b) {
var m;
var i;
var j;
var diff;
var x;
m = [];
for (i = 0; i <= a.length; ++i) {
m[i] = [ i ];
}
for (j = 0; j <= b.length; ++j) {
m[0][j] = j;
}
for (i = 1; i <= a.length; ++i) {
for (j = 1; j <= b.length; ++j) {
diff = (a.charCodeAt(i - 1) === b.charCodeAt(j - 1) ? 0 : 1);
m[i][j] = Math.min(m[i - 1][j - 1] + diff, m[i - 1][j] + 1, m[i][j - 1] + 1);
}
}
x = m[m.length - 1];
return x[x.length - 1];
};
Util.ld$SS = Util$ld$SS;
function Util$isBuiltInClass$S(name) {
return $__jsx_ObjectHasOwnProperty.call(Util._builtInClass, name);
};
Util.isBuiltInClass$S = Util$isBuiltInClass$S;
function Util$isBuiltInClass$LType$(type) {
return Util$_isBuiltInObjectType$LType$HB(type, Util._builtInClass);
};
Util.isBuiltInClass$LType$ = Util$isBuiltInClass$LType$;
function Util$isBuiltInContainer$LType$(type) {
return Util$_isBuiltInObjectType$LType$HB(type, Util._builtInContainer);
};
Util.isBuiltInContainer$LType$ = Util$isBuiltInContainer$LType$;
function Util$_isBuiltInObjectType$LType$HB(type, classeSet) {
var classDef;
var className;
var this$0;
var this$0$0;
if (type instanceof ObjectType) {
classDef = type.getClassDef$();
className = (classDef instanceof InstantiatedClassDefinition ? (this$0 = classDef, this$0$0 = this$0._templateClassDef, this$0$0._className) : classDef.className$());
return $__jsx_ObjectHasOwnProperty.call(classeSet, className);
}
return false;
};
Util._isBuiltInObjectType$LType$HB = Util$_isBuiltInObjectType$LType$HB;
function Util$rootIsNativeClass$LType$(type) {
var classDef;
if (type instanceof ObjectType) {
classDef = type.getClassDef$();
return ! ClassDefinition$forEachClassToBase$LClassDefinition$F$LClassDefinition$B$(classDef, (function (classDef) {
return (classDef.className$() === "Object" || (classDef.flags$() & 16) === 0 ? true : false);
}));
}
return false;
};
Util.rootIsNativeClass$LType$ = Util$rootIsNativeClass$LType$;
function Util$instantiateTemplate$LAnalysisContext$LToken$SALType$(context, token, className, typeArguments) {
return Parser$lookupTemplate$LParser$ALCompileError$LTemplateInstantiationRequest$F$LParser$LClassDefinition$LClassDefinition$$(context.parser, context.errors, ({_token: token, _className: className, _typeArgs: typeArguments}), context.postInstantiationCallback);
};
Util.instantiateTemplate$LAnalysisContext$LToken$SALType$ = Util$instantiateTemplate$LAnalysisContext$LToken$SALType$;
function Util$analyzeArgs$LAnalysisContext$ALExpression$LExpression$ALUtil$x2EArgumentTypeRequest$(context, args, parentExpr, expectedTypes) {
var argTypes;
var i;
var funcDef;
var expectedCallbackType;
var j;
var callbackType;
var typeNotContainsParameter;
var k;
var argType;
var arrayExpr;
var expectedArrayType;
var mapExpr;
var expectedMapType;
var this$0;
var this$1;
var this$2;
var this$3;
var this$0$0;
var this$4;
var this$0$1;
var this$5;
argTypes = [ ];
for (i = 0; i < args.length; ++i) {
if (args[i] instanceof FunctionExpression && ! FunctionExpression$argumentTypesAreIdentified$LFunctionExpression$(args[i])) {
this$0 = args[i];
funcDef = this$0._funcDef;
expectedCallbackType = null;
for (j = 0; j < expectedTypes.length; ++j) {
if (Util$x2EArgumentTypeRequest$at$LUtil$x2EArgumentTypeRequest$I(expectedTypes[j], (i | 0)) != null && Util$x2EArgumentTypeRequest$at$LUtil$x2EArgumentTypeRequest$I(expectedTypes[j], (i | 0)) instanceof StaticFunctionType && (this$5 = Util$x2EArgumentTypeRequest$at$LUtil$x2EArgumentTypeRequest$I(expectedTypes[j], (i | 0)), this$5._argTypes).length === funcDef._args.length) {
callbackType = (this$1 = Util$x2EArgumentTypeRequest$at$LUtil$x2EArgumentTypeRequest$I(expectedTypes[j], (i | 0)), new StaticFunctionType(this$1._token, this$1._returnType, this$1._argTypes.concat([ ]), this$1._isAssignable));
function typeNotContainsParameter(type) {
var k;
var this$0;
var this$1;
var this$2;
var this$3;
var this$4;
var this$0$0;
var this$5;
var this$6;
for (k = 0; k < expectedTypes[j].typeArgs.length; ++k) {
if (type instanceof ParsedObjectType && (this$1 = (this$0 = type, this$0._qualifiedName), this$1._import) == null && (this$3 = (this$2 = type, this$2._qualifiedName), this$3._enclosingType) == null && (this$5 = (this$4 = type, this$0$0 = this$4._qualifiedName, this$0$0._token), this$5._value) === (this$6 = expectedTypes[j].typeArgs[k], this$6._value)) {
return false;
}
}
return type.forEachType$F$LType$B$(typeNotContainsParameter);
}
for (k = 0; k < callbackType._argTypes.length; ++k) {
argType = callbackType._argTypes[k];
if (! typeNotContainsParameter(argType)) {
callbackType._argTypes[k] = null;
}
}
if (callbackType._returnType != null && ! typeNotContainsParameter(callbackType._returnType)) {
callbackType._returnType = null;
}
if (expectedCallbackType == null) {
expectedCallbackType = callbackType;
} else if (Util$typesAreEqual$ALType$ALType$(expectedCallbackType._argTypes, callbackType._argTypes) && (expectedCallbackType._returnType == null && callbackType._returnType == null || expectedCallbackType._returnType.equals$LType$(callbackType._returnType))) {
} else {
break;
}
}
}
if (j !== expectedTypes.length) {
} else if (expectedCallbackType != null) {
if (! (this$2 = args[i], ! MemberFunctionDefinition$deductTypeIfUnknown$LMemberFunctionDefinition$LAnalysisContext$LResolvedFunctionType$(this$2._funcDef, context, expectedCallbackType) ? false : true)) {
return null;
}
}
} else if (args[i] instanceof ArrayLiteralExpression) {
arrayExpr = args[i];
expectedArrayType = null;
for (j = 0; j < expectedTypes.length; ++j) {
if (Util$x2EArgumentTypeRequest$at$LUtil$x2EArgumentTypeRequest$I(expectedTypes[j], (i | 0)) != null && Util$x2EArgumentTypeRequest$at$LUtil$x2EArgumentTypeRequest$I(expectedTypes[j], (i | 0)) instanceof ObjectType && Util$x2EArgumentTypeRequest$at$LUtil$x2EArgumentTypeRequest$I(expectedTypes[j], (i | 0)).getClassDef$() instanceof InstantiatedClassDefinition && (this$3 = Util$x2EArgumentTypeRequest$at$LUtil$x2EArgumentTypeRequest$I(expectedTypes[j], (i | 0)).getClassDef$(), this$0$0 = this$3._templateClassDef, this$0$0._className) === 'Array') {
if (expectedArrayType == null) {
expectedArrayType = Util$x2EArgumentTypeRequest$at$LUtil$x2EArgumentTypeRequest$I(expectedTypes[j], (i | 0));
} else if (expectedArrayType.equals$LType$(Util$x2EArgumentTypeRequest$at$LUtil$x2EArgumentTypeRequest$I(expectedTypes[j], (i | 0)))) {
} else {
break;
}
}
}
if (j !== expectedTypes.length) {
} else if (expectedArrayType != null) {
arrayExpr._type = expectedArrayType;
}
} else if (args[i] instanceof MapLiteralExpression) {
mapExpr = args[i];
expectedMapType = null;
for (j = 0; j < expectedTypes.length; ++j) {
if (Util$x2EArgumentTypeRequest$at$LUtil$x2EArgumentTypeRequest$I(expectedTypes[j], (i | 0)) != null && Util$x2EArgumentTypeRequest$at$LUtil$x2EArgumentTypeRequest$I(expectedTypes[j], (i | 0)) instanceof ObjectType && Util$x2EArgumentTypeRequest$at$LUtil$x2EArgumentTypeRequest$I(expectedTypes[j], (i | 0)).getClassDef$() instanceof InstantiatedClassDefinition && (this$4 = Util$x2EArgumentTypeRequest$at$LUtil$x2EArgumentTypeRequest$I(expectedTypes[j], (i | 0)).getClassDef$(), this$0$1 = this$4._templateClassDef, this$0$1._className) === 'Map') {
if (expectedMapType == null) {
expectedMapType = Util$x2EArgumentTypeRequest$at$LUtil$x2EArgumentTypeRequest$I(expectedTypes[j], (i | 0));
} else if (expectedMapType.equals$LType$(Util$x2EArgumentTypeRequest$at$LUtil$x2EArgumentTypeRequest$I(expectedTypes[j], (i | 0)))) {
} else {
break;
}
}
}
if (j !== expectedTypes.length) {
} else if (expectedMapType != null) {
mapExpr._type = expectedMapType;
}
}
if (! args[i].analyze$LAnalysisContext$LExpression$(context, parentExpr)) {
return null;
}
argTypes[i] = args[i].getType$();
}
return argTypes;
};
Util.analyzeArgs$LAnalysisContext$ALExpression$LExpression$ALUtil$x2EArgumentTypeRequest$ = Util$analyzeArgs$LAnalysisContext$ALExpression$LExpression$ALUtil$x2EArgumentTypeRequest$;
function Util$typesAreEqual$ALType$ALType$(x, y) {
var i;
var x$len$0;
if (x.length !== y.length) {
return false;
}
for ((i = 0, x$len$0 = x.length); i < x$len$0; ++i) {
if (x[i] == null || y[i] == null) {
continue;
}
if (! x[i].equals$LType$(y[i])) {
return false;
}
}
return true;
};
Util.typesAreEqual$ALType$ALType$ = Util$typesAreEqual$ALType$ALType$;
function Util$forEachStatement$F$LStatement$B$ALStatement$(cb, statements) {
return Util$forEachStatement$F$LStatement$F$LStatement$V$B$ALStatement$((function (stmt, _) {
return cb(stmt);
}), statements);
};
Util.forEachStatement$F$LStatement$B$ALStatement$ = Util$forEachStatement$F$LStatement$B$ALStatement$;
function Util$forEachStatement$F$LStatement$F$LStatement$V$B$ALStatement$(cb, statements) {
var i;
var statements$len$0;
if (statements != null) {
for ((i = 0, statements$len$0 = statements.length); i < statements$len$0; ++i) {
if (! cb(statements[i], (function (statements, index) {
return (function (stmt) {
statements[index] = stmt;
});
})(statements, i))) {
return false;
}
}
}
return true;
};
Util.forEachStatement$F$LStatement$F$LStatement$V$B$ALStatement$ = Util$forEachStatement$F$LStatement$F$LStatement$V$B$ALStatement$;
function Util$forEachExpression$F$LExpression$B$ALExpression$(cb, exprs) {
return Util$forEachExpression$F$LExpression$F$LExpression$V$B$ALExpression$((function (expr, _) {
return cb(expr);
}), exprs);
};
Util.forEachExpression$F$LExpression$B$ALExpression$ = Util$forEachExpression$F$LExpression$B$ALExpression$;
function Util$forEachExpression$F$LExpression$F$LExpression$V$B$ALExpression$(cb, exprs) {
var i;
var exprs$len$0;
if (exprs != null) {
for ((i = 0, exprs$len$0 = exprs.length); i < exprs$len$0; ++i) {
if (! cb(exprs[i], (function (exprs, index) {
return (function (expr) {
exprs[index] = expr;
});
})(exprs, i))) {
return false;
}
}
}
return true;
};
Util.forEachExpression$F$LExpression$F$LExpression$V$B$ALExpression$ = Util$forEachExpression$F$LExpression$F$LExpression$V$B$ALExpression$;
function Util$findFunctionInClass$LClassDefinition$SALType$B(classDef, funcName, argTypes, isStatic) {
var found;
found = null;
ClassDefinition$forEachMemberFunction$LClassDefinition$F$LMemberFunctionDefinition$B$(classDef, (function (funcDef) {
var this$0$0;
if (isStatic === ((funcDef._flags & 8) !== 0) && (this$0$0 = funcDef._nameToken, this$0$0._value) === funcName && Util$typesAreEqual$ALType$ALType$(MemberFunctionDefinition$getArgumentTypes$LMemberFunctionDefinition$(funcDef), argTypes)) {
found = funcDef;
return false;
}
return true;
}));
return found;
};
Util.findFunctionInClass$LClassDefinition$SALType$B = Util$findFunctionInClass$LClassDefinition$SALType$B;
function Util$findVariableInClass$LClassDefinition$SB(classDef, name, isStatic) {
var found;
found = null;
ClassDefinition$forEachMemberVariable$LClassDefinition$F$LMemberVariableDefinition$B$(classDef, (function (def) {
var this$0$0;
if (isStatic === ((def._flags & 8) !== 0) && (this$0$0 = def._nameToken, this$0$0._value) === name) {
found = def;
return false;
}
return true;
}));
return found;
};
Util.findVariableInClass$LClassDefinition$SB = Util$findVariableInClass$LClassDefinition$SB;
function Util$findMemberInClass$LClassDefinition$SALType$B(classDef, name, argTypes, isStatic) {
return (argTypes != null ? Util$findFunctionInClass$LClassDefinition$SALType$B(classDef, name, argTypes, isStatic) : Util$findVariableInClass$LClassDefinition$SB(classDef, name, isStatic));
};
Util.findMemberInClass$LClassDefinition$SALType$B = Util$findMemberInClass$LClassDefinition$SALType$B;
function Util$memberRootIsNative$LClassDefinition$SALType$B(classDef, name, argTypes, isStatic) {
var rootIsNativeNonStatic;
if (isStatic) {
return (classDef.flags$() & 272) !== 0;
}
function rootIsNativeNonStatic(classDef, name, argTypes) {
var found;
var this$0;
found = (argTypes != null ? Util$findFunctionInClass$LClassDefinition$SALType$B(classDef, name, argTypes, false) : Util$findVariableInClass$LClassDefinition$SB(classDef, name, false));
return (found != null && (found._flags & 32) === 0 ? (classDef.flags$() & 272) !== 0 : classDef._extendType == null ? false : rootIsNativeNonStatic((this$0 = classDef._extendType, this$0._classDef), name, argTypes));
}
return rootIsNativeNonStatic(classDef, name, argTypes);
};
Util.memberRootIsNative$LClassDefinition$SALType$B = Util$memberRootIsNative$LClassDefinition$SALType$B;
function Util$propertyRootIsNative$LPropertyExpression$(expr) {
var baseExpr;
var this$0;
var exprType$0;
var this$1;
baseExpr = expr._expr;
return Util$memberRootIsNative$LClassDefinition$SALType$B(baseExpr.getType$().getClassDef$(), (this$0 = expr._identifierToken, this$0._value), (exprType$0 = expr._type, ! (exprType$0 instanceof FunctionType) ? false : exprType$0.isAssignable$() ? false : true) ? (this$1 = expr._type, this$1._argTypes) : null, baseExpr.isClassSpecifier$());
};
Util.propertyRootIsNative$LPropertyExpression$ = Util$propertyRootIsNative$LPropertyExpression$;
function Util$memberIsExported$LClassDefinition$SALType$B(classDef, name, argTypes, isStatic) {
var found;
var check;
if (isStatic) {
found = (argTypes != null ? Util$findFunctionInClass$LClassDefinition$SALType$B(classDef, name, argTypes, true) : Util$findVariableInClass$LClassDefinition$SB(classDef, name, true));
return (found._flags & 16384) !== 0;
}
function check(classDef) {
var found;
var isExportedInImpl;
var this$0;
if ((classDef.flags$() & 16) !== 0) {
return false;
}
found = (argTypes != null ? Util$findFunctionInClass$LClassDefinition$SALType$B(classDef, name, argTypes, false) : Util$findVariableInClass$LClassDefinition$SB(classDef, name, false));
if (found != null && (found._flags & 16384) !== 0) {
return true;
}
if (classDef._extendType != null) {
if (check((this$0 = classDef._extendType, this$0._classDef))) {
return true;
}
}
isExportedInImpl = false;
classDef._implementTypes.forEach((function (implType) {
if (check(implType.getClassDef$())) {
isExportedInImpl = true;
}
}));
return isExportedInImpl;
}
return check(classDef);
};
Util.memberIsExported$LClassDefinition$SALType$B = Util$memberIsExported$LClassDefinition$SALType$B;
function Util$isReferringToFunctionDefinition$LPropertyExpression$(expr) {
var exprType;
exprType = expr._type;
return (! (exprType instanceof FunctionType) ? false : exprType.isAssignable$() ? false : true);
};
Util.isReferringToFunctionDefinition$LPropertyExpression$ = Util$isReferringToFunctionDefinition$LPropertyExpression$;
function Util$encodeStringLiteral$S(str) {
var escaped;
escaped = str.replace(/[\0-\x19\\'"\u007f-\uffff]/g, (function (ch) {
var t;
if (ch in Util._stringLiteralEncodingMap) {
return Util._stringLiteralEncodingMap[ch];
} else {
t = "000" + ch.charCodeAt(0).toString(16);
t = t.substring(t.length - 4);
return "\\u" + t;
}
}));
return "\"" + escaped + "\"";
};
Util.encodeStringLiteral$S = Util$encodeStringLiteral$S;
function Util$decodeStringLiteral$S(literal) {
var matched;
var src;
var decoded;
var pos;
var backslashAt;
var escapeChar;
literal = Util$_normalizeHeredoc$S(literal);
matched = literal.match(/^([\'\"]).*([\'\"])$/);
if (matched == null || matched[1] !== matched[2]) {
throw new Error("input string is not quoted properly: " + literal);
}
src = literal.substring(1, literal.length - 1);
decoded = "";
pos = 0;
while ((backslashAt = src.indexOf("\\", pos)) !== -1) {
decoded += src.substring(pos, backslashAt);
pos = backslashAt + 1;
if (pos === src.length) {
throw new Error("last character within a string literal cannot be a backslash: " + literal);
}
escapeChar = src.charAt(pos++);
switch (escapeChar) {
case "'":
case "\"":
case "\\":
decoded += escapeChar;
break;
case "b":
decoded += "\b";
break;
case "f":
decoded += "\f";
break;
case "n":
decoded += "\n";
break;
case "r":
decoded += "\r";
break;
case "t":
decoded += "\t";
break;
case "v":
decoded += "\v";
break;
case "u":
matched = src.substring(pos).match(/^([0-9A-Fa-f]{4})/);
if (matched == null) {
throw new Error("expected four hexdigits after \\u: " + literal);
}
decoded += String.fromCharCode($__jsx_parseInt(matched[1], 16));
pos += 4;
break;
case "x":
matched = src.substring(pos).match(/^([0-9A-Fa-f]{2})/);
if (matched == null) {
throw new Error("expected two hexdigits after \\x: " + literal);
}
decoded += String.fromCharCode($__jsx_parseInt(matched[1], 16));
pos += 2;
break;
case "0":
if (pos === src.length || src.charAt(pos).match(/[0-9]/) == null) {
decoded += "\0";
} else {
throw new Error("found a digit after '\\0': " + literal);
}
break;
}
}
decoded += src.substring(pos);
return decoded;
};
Util.decodeStringLiteral$S = Util$decodeStringLiteral$S;
function Util$_normalizeHeredoc$S(literal) {
var body;
if (! literal.match(/^(?:"""|''')/)) {
return literal;
}
body = literal.substring(3, literal.length - 3);
body = body.replace(/\\*['"]/g, (function (matched) {
return (matched.length % 2 === 0 ? matched : matched.replace(/(.)$/, "\\$1"));
}));
body = body.replace(/\n/g, "\\n");
return '"' + body + '"';
};
Util._normalizeHeredoc$S = Util$_normalizeHeredoc$S;
function Util$_resolvedPathParts$S(path) {
var tokens;
var i;
tokens = path.split(/[\\\/]+/);
if (tokens.length === 1) {
return tokens;
}
for (i = 0; i < tokens.length; ) {
if (tokens[i] === ".") {
tokens.splice(i, 1);
} else if (tokens[i] === ".." && i !== 0 && tokens[i - 1] !== "..") {
tokens.splice(i - 1, 2);
i -= 1;
} else {
i++;
}
}
return tokens;
};
Util._resolvedPathParts$S = Util$_resolvedPathParts$S;
function Util$resolvePath$S(path) {
return Util$_resolvedPathParts$S(path).join("/");
};
Util.resolvePath$S = Util$resolvePath$S;
function Util$relativePath$SSB(fromPath, toPath, isFile) {
var f;
var t;
var minLen;
var samePartsIndex;
var i;
var pathParts;
var value1$0;
var value2$0;
f = Util$_resolvedPathParts$S(fromPath);
t = Util$_resolvedPathParts$S(toPath);
if (isFile) {
f.pop();
}
if (f[0] === "") {
f.shift();
}
if (t[0] === "") {
t.shift();
}
value1$0 = f.length;
value2$0 = t.length;
minLen = (value1$0 <= value2$0 ? value1$0 : value2$0);
samePartsIndex = minLen;
for (i = 0; i < minLen; ++i) {
if (f[i] !== t[i]) {
samePartsIndex = i;
break;
}
}
pathParts = [];
for (i = samePartsIndex; i < f.length; ++i) {
pathParts.push("..");
}
return pathParts.concat(t.slice(samePartsIndex)).join("/");
};
Util.relativePath$SSB = Util$relativePath$SSB;
function Util$basename$S(path) {
var parts;
parts = Util$_resolvedPathParts$S(path);
return parts.pop();
};
Util.basename$S = Util$basename$S;
function Util$dirname$S(path) {
var parts;
parts = Util$_resolvedPathParts$S(path);
parts.pop();
return (parts.length !== 0 ? parts.join("/") : ".");
};
Util.dirname$S = Util$dirname$S;
function Util$toOrdinal$N(n) {
if (10 < n && n < 14) {
return (n + "") + 'th';
}
switch (n % 10) {
case 1:
return (n + "") + 'st';
case 2:
return (n + "") + 'nd';
case 3:
return (n + "") + 'rd';
default:
return (n + "") + 'th';
}
};
Util.toOrdinal$N = Util$toOrdinal$N;
function Util$makeErrorMessage$LPlatform$SUSNNN(platform, message, filename, lineNumber, columnNumber, size) {
var content;
var sourceLine;
var TAB_WIDTH;
var tabs;
if (filename == null) {
return message + "\n";
}
content = platform.load$S(filename);
sourceLine = content.split(/\n/)[lineNumber - 1] + "\n";
TAB_WIDTH = 4;
tabs = sourceLine.slice(0, columnNumber).match(/\t/g);
if (tabs != null) {
columnNumber += (TAB_WIDTH - 1) * tabs.length;
}
sourceLine = sourceLine.replace(/\t/g, Util$repeat$SN(" ", TAB_WIDTH));
sourceLine += Util$repeat$SN(" ", columnNumber);
sourceLine += Util$repeat$SN("^", size);
return Util$format$SAS("[%1:%2:%3] %4\n%5\n", [ filename, lineNumber + "", columnNumber + "", message, sourceLine ]);
};
Util.makeErrorMessage$LPlatform$SUSNNN = Util$makeErrorMessage$LPlatform$SUSNNN;
function Util$isArrayOf$LClassDefinition$LType$(classDef, expectedElementType) {
var instantiatedClassDef;
var this$0$0;
if (! (classDef instanceof InstantiatedClassDefinition)) {
return false;
}
instantiatedClassDef = classDef;
return ((this$0$0 = instantiatedClassDef._templateClassDef, this$0$0._className) !== "Array" ? false : ! instantiatedClassDef._typeArguments[0].equals$LType$(expectedElementType) ? false : true);
};
Util.isArrayOf$LClassDefinition$LType$ = Util$isArrayOf$LClassDefinition$LType$;
function Util$asSet$AS(array) {
var set;
var i;
set = {};
for (i = 0; i < array.length; ++i) {
set[array[i]] = true;
}
return set;
};
Util.asSet$AS = Util$asSet$AS;
function Util$rebaseClosures$LMemberFunctionDefinition$LMemberFunctionDefinition$(srcParent, dstParent) {
var closures;
var i;
var funcDef$0;
var j$0;
var funcDef$1;
var classDef$0$0;
closures = [];
Util$forEachStatement$F$LStatement$B$ALStatement$((function (statement) {
var this$0;
if (statement instanceof FunctionStatement) {
closures.push((this$0 = statement, this$0._funcDef));
}
return Statement$forEachExpression$LStatement$F$LExpression$B$(statement, (function onExpr(expr) {
if (expr instanceof FunctionExpression) {
closures.push(FunctionExpression$getFuncDef$LFunctionExpression$(expr));
return true;
}
return Expression$forEachExpression$LExpression$F$LExpression$B$(expr, onExpr);
}));
}), dstParent._statements);
for (i = 0; i < closures.length; ++i) {
funcDef$0 = closures[i];
if ((j$0 = srcParent._closures.indexOf(funcDef$0)) !== -1) {
srcParent._closures.splice(j$0, 1);
}
MemberFunctionDefinition$setParent$LMemberFunctionDefinition$LMemberFunctionDefinition$(funcDef$0, null);
funcDef$1 = closures[i];
dstParent._closures.push(funcDef$1);
funcDef$1._parent = dstParent;
classDef$0$0 = dstParent._classDef;
funcDef$1._classDef = classDef$0$0;
}
};
Util.rebaseClosures$LMemberFunctionDefinition$LMemberFunctionDefinition$ = Util$rebaseClosures$LMemberFunctionDefinition$LMemberFunctionDefinition$;
function Util$unlinkFunction$LMemberFunctionDefinition$LMemberFunctionDefinition$(funcDef, oldParent) {
var j;
if ((j = oldParent._closures.indexOf(funcDef)) !== -1) {
oldParent._closures.splice(j, 1);
}
MemberFunctionDefinition$setParent$LMemberFunctionDefinition$LMemberFunctionDefinition$(funcDef, null);
};
Util.unlinkFunction$LMemberFunctionDefinition$LMemberFunctionDefinition$ = Util$unlinkFunction$LMemberFunctionDefinition$LMemberFunctionDefinition$;
function Util$linkFunction$LMemberFunctionDefinition$LMemberFunctionDefinition$(funcDef, newParent) {
var classDef$0;
newParent._closures.push(funcDef);
funcDef._parent = newParent;
classDef$0 = newParent._classDef;
funcDef._classDef = classDef$0;
};
Util.linkFunction$LMemberFunctionDefinition$LMemberFunctionDefinition$ = Util$linkFunction$LMemberFunctionDefinition$LMemberFunctionDefinition$;
function Util$cloneArray$ALExpression$(a) {
var r;
var i;
r = [ ];
for (i = 0; i < a.length; ++i) {
r[i] = a[i].clone$();
}
return r;
};
Util.cloneArray$ALExpression$ = Util$cloneArray$ALExpression$;
function Util$serializeArray$ALExpression$(a) {
var ret;
var i;
if (a == null) {
return null;
}
ret = [ ];
for (i = 0; i < a.length; ++i) {
ret[i] = a[i].serialize$();
}
return ret;
};
Util.serializeArray$ALExpression$ = Util$serializeArray$ALExpression$;
function Util$serializeNullable$LType$(v) {
return (v == null ? null : v.toString());
};
Util.serializeNullable$LType$ = Util$serializeNullable$LType$;
function Util$serializeArray$ALMapLiteralElement$(a) {
var ret;
var i;
var this$0;
var this$0$0;
if (a == null) {
return null;
}
ret = [ ];
for (i = 0; i < a.length; ++i) {
this$0 = a[i];
ret[i] = [ (this$0$0 = this$0._key, [ this$0$0._value, this$0$0._isIdentifier, this$0$0._filename, this$0$0._lineNumber, this$0$0._columnNumber ]), this$0._expr.serialize$() ];
}
return ret;
};
Util.serializeArray$ALMapLiteralElement$ = Util$serializeArray$ALMapLiteralElement$;
function Util$serializeNullable$LExpression$(v) {
return (v == null ? null : v.serialize$());
};
Util.serializeNullable$LExpression$ = Util$serializeNullable$LExpression$;
function Util$cloneNullable$LExpression$(o) {
return (o == null ? null : o.clone$());
};
Util.cloneNullable$LExpression$ = Util$cloneNullable$LExpression$;
function Util$serializeNullable$LToken$(v) {
return (v == null ? null : [ v._value, v._isIdentifier, v._filename, v._lineNumber, v._columnNumber ]);
};
Util.serializeNullable$LToken$ = Util$serializeNullable$LToken$;
function Util$cloneArray$ALStatement$(a) {
var r;
var i;
r = [ ];
for (i = 0; i < a.length; ++i) {
r[i] = a[i].clone$();
}
return r;
};
Util.cloneArray$ALStatement$ = Util$cloneArray$ALStatement$;
function Util$serializeArray$ALStatement$(a) {
var ret;
var i;
if (a == null) {
return null;
}
ret = [ ];
for (i = 0; i < a.length; ++i) {
ret[i] = a[i].serialize$();
}
return ret;
};
Util.serializeArray$ALStatement$ = Util$serializeArray$ALStatement$;
function Util$cloneArray$ALCatchStatement$(a) {
var r;
var i;
var this$0;
r = [ ];
for (i = 0; i < a.length; ++i) {
r[i] = (this$0 = a[i], new CatchStatement(this$0._token, this$0._local, Util$cloneArray$ALStatement$(this$0._statements)));
}
return r;
};
Util.cloneArray$ALCatchStatement$ = Util$cloneArray$ALCatchStatement$;
function Util$serializeArray$ALCatchStatement$(a) {
var ret;
var i;
if (a == null) {
return null;
}
ret = [ ];
for (i = 0; i < a.length; ++i) {
ret[i] = a[i].serialize$();
}
return ret;
};
Util.serializeArray$ALCatchStatement$ = Util$serializeArray$ALCatchStatement$;
function Util$serializeNullable$LParsedObjectType$(v) {
return (v == null ? null : v.toString());
};
Util.serializeNullable$LParsedObjectType$ = Util$serializeNullable$LParsedObjectType$;
function Util$serializeArray$ALParsedObjectType$(a) {
var ret;
var i;
var this$0;
if (a == null) {
return null;
}
ret = [ ];
for (i = 0; i < a.length; ++i) {
this$0 = a[i];
ret[i] = this$0.toString();
}
return ret;
};
Util.serializeArray$ALParsedObjectType$ = Util$serializeArray$ALParsedObjectType$;
function Util$serializeArray$ALMemberDefinition$(a) {
var ret;
var i;
if (a == null) {
return null;
}
ret = [ ];
for (i = 0; i < a.length; ++i) {
ret[i] = a[i].serialize$();
}
return ret;
};
Util.serializeArray$ALMemberDefinition$ = Util$serializeArray$ALMemberDefinition$;
function Util$serializeArray$ALClassDefinition$(a) {
var ret;
var i;
if (a == null) {
return null;
}
ret = [ ];
for (i = 0; i < a.length; ++i) {
ret[i] = ClassDefinition$serialize$LClassDefinition$(a[i]);
}
return ret;
};
Util.serializeArray$ALClassDefinition$ = Util$serializeArray$ALClassDefinition$;
function Util$serializeArray$ALTemplateClassDefinition$(a) {
var ret;
var i;
if (a == null) {
return null;
}
ret = [ ];
for (i = 0; i < a.length; ++i) {
ret[i] = ClassDefinition$serialize$LClassDefinition$(a[i]);
}
return ret;
};
Util.serializeArray$ALTemplateClassDefinition$ = Util$serializeArray$ALTemplateClassDefinition$;
function Util$serializeArray$ALArgumentDeclaration$(a) {
var ret;
var i;
var this$0;
var v$0$0;
if (a == null) {
return null;
}
ret = [ ];
for (i = 0; i < a.length; ++i) {
this$0 = a[i];
ret[i] = [ this$0._name, (v$0$0 = this$0._type, v$0$0 == null ? null : v$0$0.toString()) ];
}
return ret;
};
Util.serializeArray$ALArgumentDeclaration$ = Util$serializeArray$ALArgumentDeclaration$;
function Util$serializeArray$ALLocalVariable$(a) {
var ret;
var i;
var this$0;
var v$0$0;
if (a == null) {
return null;
}
ret = [ ];
for (i = 0; i < a.length; ++i) {
this$0 = a[i];
ret[i] = [ this$0._name, (v$0$0 = this$0._type, v$0$0 == null ? null : v$0$0.toString()) ];
}
return ret;
};
Util.serializeArray$ALLocalVariable$ = Util$serializeArray$ALLocalVariable$;
function Util$serializeArray$ALToken$(a) {
var ret;
var i;
var this$0;
if (a == null) {
return null;
}
ret = [ ];
for (i = 0; i < a.length; ++i) {
this$0 = a[i];
ret[i] = [ this$0._value, this$0._isIdentifier, this$0._filename, this$0._lineNumber, this$0._columnNumber ];
}
return ret;
};
Util.serializeArray$ALToken$ = Util$serializeArray$ALToken$;
function Util$serializeNullable$LImport$(v) {
return (v == null ? null : Import$serialize$LImport$(v));
};
Util.serializeNullable$LImport$ = Util$serializeNullable$LImport$;
function Util$makePair$LAssignmentExpression$F$LExpression$V$(first, second) {
return ({first: first, second: second});
};
Util.makePair$LAssignmentExpression$F$LExpression$V$ = Util$makePair$LAssignmentExpression$F$LExpression$V$;
function TypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E() {
var $this = this;
this._list = [];
this._equalsCallback = (function (x, y) {
return x == y;
});
};
function TypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$0(equalsCallback) {
this._list = [];
this._equalsCallback = equalsCallback;
};
$__jsx_extend([TypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E, TypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$0], Object);
function TypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$clone$LTypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$($this) {
var x;
x = ({_list: [], _equalsCallback: $this._equalsCallback});
x._list = $this._list.concat([ ]);
return x;
};
TypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E.clone$LTypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$ = TypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$clone$LTypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$;
function TypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$has$LTypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$ALType$($this, key) {
return ! TypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$forEach$LTypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$F$ALType$LMemberFunctionDefinition$B$($this, (function (entryKey, entryValue) {
return ! $this._equalsCallback(key, entryKey);
}));
};
TypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E.has$LTypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$ALType$ = TypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$has$LTypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$ALType$;
function TypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$set$LTypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$ALType$LMemberFunctionDefinition$($this, key, val) {
var i;
for (i = 0; i < $this._list.length; ++i) {
if ($this._equalsCallback($this._list[i].first, key)) {
$this._list[i].second = val;
return;
}
}
$this._list.push(({first: key, second: val}));
};
TypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E.set$LTypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$ALType$LMemberFunctionDefinition$ = TypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$set$LTypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$ALType$LMemberFunctionDefinition$;
function TypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$get$LTypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$ALType$($this, key) {
var i;
for (i = 0; i < $this._list.length; ++i) {
if ($this._equalsCallback($this._list[i].first, key)) {
return $this._list[i].second;
}
}
return null;
};
TypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E.get$LTypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$ALType$ = TypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$get$LTypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$ALType$;
function TypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$delete$LTypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$ALType$($this, key) {
var i;
for (i = 0; i < $this._list.length; ++i) {
if ($this._equalsCallback($this._list[i].first, key)) {
$this._list.splice(i, 1);
return;
}
}
};
TypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E.delete$LTypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$ALType$ = TypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$delete$LTypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$ALType$;
function TypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$clear$LTypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$($this) {
var _list$0;
(_list$0 = $this._list).splice(0, _list$0.length);
};
TypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E.clear$LTypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$ = TypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$clear$LTypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$;
function TypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$forEach$LTypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$F$ALType$LMemberFunctionDefinition$B$($this, cb) {
var i;
var e;
for (i = 0; i < $this._list.length; ++i) {
e = $this._list[i];
if (! cb(e.first, e.second)) {
return false;
}
}
return true;
};
TypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E.forEach$LTypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$F$ALType$LMemberFunctionDefinition$B$ = TypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$forEach$LTypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$F$ALType$LMemberFunctionDefinition$B$;
function TypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$reversedForEach$LTypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$F$ALType$LMemberFunctionDefinition$B$($this, cb) {
var i;
var e;
for (i = $this._list.length - 1; i >= 0; --i) {
e = $this._list[i];
if (! cb(e.first, e.second)) {
return false;
}
}
return true;
};
TypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E.reversedForEach$LTypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$F$ALType$LMemberFunctionDefinition$B$ = TypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$reversedForEach$LTypedMap$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E$F$ALType$LMemberFunctionDefinition$B$;
function Pair$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E(first, second) {
this.first = first;
this.second = second;
};
$__jsx_extend([Pair$x2E$x3CArray$x2E$x3CType$x3E$x2CMemberFunctionDefinition$x3E], Object);
function TypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E() {
var $this = this;
this._list = [];
this._equalsCallback = (function (x, y) {
return x == y;
});
};
function TypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$0(equalsCallback) {
this._list = [];
this._equalsCallback = equalsCallback;
};
$__jsx_extend([TypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E, TypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$0], Object);
function TypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$clone$LTypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$($this) {
var x;
x = ({_list: [], _equalsCallback: $this._equalsCallback});
x._list = $this._list.concat([ ]);
return x;
};
TypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E.clone$LTypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$ = TypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$clone$LTypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$;
function TypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$has$LTypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$LLocalVariable$($this, key) {
return ! TypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$forEach$LTypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$F$LLocalVariable$BB$($this, (function (entryKey, entryValue) {
return ! $this._equalsCallback(key, entryKey);
}));
};
TypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E.has$LTypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$LLocalVariable$ = TypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$has$LTypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$LLocalVariable$;
function TypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$set$LTypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$LLocalVariable$B($this, key, val) {
var i;
for (i = 0; i < $this._list.length; ++i) {
if ($this._equalsCallback($this._list[i].first, key)) {
$this._list[i].second = val;
return;
}
}
$this._list.push(({first: key, second: val}));
};
TypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E.set$LTypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$LLocalVariable$B = TypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$set$LTypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$LLocalVariable$B;
function TypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$get$LTypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$LLocalVariable$($this, key) {
var i;
for (i = 0; i < $this._list.length; ++i) {
if ($this._equalsCallback($this._list[i].first, key)) {
return $this._list[i].second;
}
}
return null;
};
TypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E.get$LTypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$LLocalVariable$ = TypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$get$LTypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$LLocalVariable$;
function TypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$delete$LTypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$LLocalVariable$($this, key) {
var i;
for (i = 0; i < $this._list.length; ++i) {
if ($this._equalsCallback($this._list[i].first, key)) {
$this._list.splice(i, 1);
return;
}
}
};
TypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E.delete$LTypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$LLocalVariable$ = TypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$delete$LTypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$LLocalVariable$;
function TypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$clear$LTypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$($this) {
var _list$0;
(_list$0 = $this._list).splice(0, _list$0.length);
};
TypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E.clear$LTypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$ = TypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$clear$LTypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$;
function TypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$forEach$LTypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$F$LLocalVariable$BB$($this, cb) {
var i;
var e;
for (i = 0; i < $this._list.length; ++i) {
e = $this._list[i];
if (! cb(e.first, e.second)) {
return false;
}
}
return true;
};
TypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E.forEach$LTypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$F$LLocalVariable$BB$ = TypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$forEach$LTypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$F$LLocalVariable$BB$;
function TypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$reversedForEach$LTypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$F$LLocalVariable$BB$($this, cb) {
var i;
var e;
for (i = $this._list.length - 1; i >= 0; --i) {
e = $this._list[i];
if (! cb(e.first, e.second)) {
return false;
}
}
return true;
};
TypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E.reversedForEach$LTypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$F$LLocalVariable$BB$ = TypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$reversedForEach$LTypedMap$x2E$x3CLocalVariable$x2Cboolean$x3E$F$LLocalVariable$BB$;
function Pair$x2E$x3CLocalVariable$x2Cboolean$x3E(first, second) {
this.first = first;
this.second = second;
};
$__jsx_extend([Pair$x2E$x3CLocalVariable$x2Cboolean$x3E], Object);
function TypedMap$x2E$x3CLocalVariable$x2CExpression$x3E() {
var $this = this;
this._list = [];
this._equalsCallback = (function (x, y) {
return x == y;
});
};
function TypedMap$x2E$x3CLocalVariable$x2CExpression$x3E$0(equalsCallback) {
this._list = [];
this._equalsCallback = equalsCallback;
};
$__jsx_extend([TypedMa