@qix/elkjs-patched
Version:
Automatic graph layout based on Sugiyama's algorithm. Specialized for data flow diagrams and ports.
1,540 lines (1,413 loc) • 3.86 MB
JavaScript
// Patches for the absolutely broken GWT output...
// Not sure why but this code is written for non-strict ES5 environments.
// Completely unacceptable and nobody seems to want to fix this.
var _xblockexpression;
var document = typeof document === 'undefined' ? null : document;
// -------------- FAKE ELEMENTS GWT ASSUMES EXIST --------------
var $wnd;
if (typeof window !== 'undefined')
$wnd = window
else if (typeof global !== 'undefined')
$wnd = global // nodejs
else if (typeof self !== 'undefined')
$wnd = self // web worker
var $moduleName,
$moduleBase;
// -------------- GENERATED CODE --------------
var $intern_0 = 2147483647, $intern_1 = {3:1}, $intern_2 = {3:1, 4:1, 5:1}, $intern_3 = {178:1, 43:1}, $intern_4 = {178:1, 43:1, 115:1}, $intern_5 = {220:1, 3:1}, $intern_6 = {43:1}, $intern_7 = {85:1}, $intern_8 = {19:1, 24:1, 14:1}, $intern_9 = 1698, $intern_10 = {19:1, 24:1, 14:1, 20:1}, $intern_11 = {85:1, 153:1, 143:1}, $intern_12 = {19:1, 24:1, 14:1, 20:1, 84:1}, $intern_13 = {19:1, 24:1, 14:1, 312:1, 20:1, 84:1}, $intern_14 = {43:1, 115:1}, $intern_15 = {332:1, 37:1}, $intern_16 = {3:1, 6:1, 4:1, 5:1}, $intern_17 = 16384, $intern_18 = {147:1}, $intern_19 = {35:1}, $intern_20 = {l:4194303, m:4194303, h:524287}, $intern_21 = {176:1}, $intern_22 = {219:1, 3:1, 39:1}, $intern_23 = {19:1}, $intern_24 = {19:1, 14:1}, $intern_25 = {3:1, 19:1, 24:1, 14:1}, $intern_26 = {136:1, 3:1, 19:1, 24:1, 14:1, 13:1, 46:1}, $intern_27 = {3:1, 4:1, 5:1, 148:1}, $intern_28 = {3:1, 85:1}, $intern_29 = {19:1, 14:1, 20:1}, $intern_30 = {3:1, 19:1, 24:1, 14:1, 20:1}, $intern_31 = 461845907, $intern_32 = -862048943, $intern_33 = {3:1, 6:1, 4:1, 5:1, 148:1}, $intern_34 = 1073741824, $intern_35 = 1000, $intern_36 = {3:1, 6:1, 4:1, 10:1, 5:1}, $intern_37 = {19:1, 24:1, 44:1, 14:1, 13:1}, $intern_38 = {19:1, 24:1, 44:1, 14:1, 13:1, 46:1}, $intern_39 = {42:1}, $intern_40 = {314:1}, $intern_41 = 1.0E-4, $intern_42 = -2147483648, $intern_43 = {3:1, 91:1, 55:1, 69:1}, $intern_44 = {175:1, 3:1, 4:1}, $intern_45 = 65535, $intern_46 = 1900, $intern_47 = {45:1, 3:1, 4:1}, $intern_48 = {3:1, 4:1, 39:1, 179:1}, $intern_49 = 4194303, $intern_50 = 1048575, $intern_51 = 524288, $intern_52 = 4194304, $intern_53 = 17592186044416, $intern_54 = 1000000000, $intern_55 = -17592186044416, $intern_56 = {3:1, 91:1, 98:1, 55:1, 69:1}, $intern_57 = {3:1, 257:1, 69:1}, $intern_58 = Infinity, $intern_59 = -Infinity, $intern_60 = 4096, $intern_61 = {3:1, 4:1, 501:1}, $intern_62 = 65536, $intern_63 = 55296, $intern_64 = {100:1, 3:1, 4:1}, $intern_65 = 100000, $intern_66 = 0.3010299956639812, $intern_67 = 4294967295, $intern_68 = 4294967296, $intern_69 = {37:1}, $intern_70 = {3:1, 4:1, 19:1, 24:1, 44:1, 12:1, 14:1, 13:1, 46:1}, $intern_71 = {3:1, 19:1, 24:1, 44:1, 14:1, 13:1, 46:1}, $intern_72 = {19:1, 14:1, 13:1}, $intern_73 = {3:1, 64:1}, $intern_74 = {165:1}, $intern_75 = {3:1, 4:1, 85:1}, $intern_76 = {3:1, 4:1, 19:1, 24:1, 14:1, 75:1, 20:1}, $intern_77 = 1.4901161193847656E-8, $intern_78 = 1.1102230246251565E-16, $intern_79 = 15525485, $intern_80 = 5.9604644775390625E-8, $intern_81 = 16777216, $intern_82 = 16777215, $intern_83 = {3:1, 4:1, 19:1, 24:1, 44:1, 14:1, 13:1, 46:1}, $intern_84 = {3:1, 39:1, 27:1, 265:1}, $intern_85 = {3:1, 4:1, 5:1, 717:1}, $intern_86 = {444:1, 572:1}, $intern_87 = {64:1}, $intern_88 = {151:1, 42:1}, $intern_89 = {183:1, 3:1, 4:1}, $intern_90 = {190:1, 290:1}, $intern_91 = {3:1, 4:1, 5:1, 509:1}, $intern_92 = 0.01, $intern_93 = {368:1}, $intern_94 = {3:1, 6:1, 4:1, 10:1, 5:1, 111:1}, $intern_95 = {3:1, 6:1, 4:1, 5:1, 137:1, 128:1, 133:1}, $intern_96 = 0.001, $intern_97 = {59:1}, $intern_98 = {3:1, 6:1, 4:1, 5:1, 402:1, 137:1, 128:1, 133:1}, $intern_99 = {3:1, 6:1, 4:1, 5:1, 137:1, 193:1, 200:1, 128:1, 133:1}, $intern_100 = {3:1, 6:1, 4:1, 5:1, 137:1, 1675:1, 200:1, 128:1, 133:1}, $intern_101 = {3:1, 4:1, 139:1, 187:1, 354:1}, $intern_102 = {3:1, 4:1, 134:1, 187:1, 354:1}, $intern_103 = {210:1}, $intern_104 = {319:1}, $intern_105 = 1.600000023841858, $intern_106 = {3:1, 4:1, 5:1, 507:1}, $intern_107 = {160:1, 59:1}, $intern_108 = {391:1, 210:1}, $intern_109 = {708:1, 3:1, 4:1}, $intern_110 = {3:1, 4:1, 5:1, 718:1}, $intern_111 = {3:1, 4:1, 5:1, 192:1}, $intern_112 = 1.0E-5, $intern_113 = 1.7976931348623157E308, $intern_114 = 1.0E-6, $intern_115 = 0.09999999999999998, $intern_116 = 1.0E-8, $intern_117 = {293:1}, $intern_118 = {256:1}, $intern_119 = 1.2999999523162842, $intern_120 = {81:1, 78:1}, $intern_121 = 32768, $intern_122 = {93:1, 81:1, 78:1, 52:1, 47:1, 83:1}, $intern_123 = {172:1, 3:1, 4:1}, $intern_124 = {3:1, 4:1, 19:1, 24:1, 44:1, 14:1, 13:1, 46:1, 60:1, 57:1, 53:1}, $intern_125 = {3:1, 4:1, 19:1, 24:1, 44:1, 14:1, 43:1, 13:1, 46:1, 60:1, 57:1, 53:1, 502:1}, $intern_126 = {356:1, 574:1}, $intern_127 = {3:1, 4:1, 19:1, 24:1, 44:1, 14:1, 13:1, 60:1, 53:1}, $intern_128 = {315:1, 129:1}, $intern_129 = {3:1, 4:1, 5:1, 114:1}, $intern_130 = {3:1, 4:1, 19:1, 24:1, 44:1, 14:1, 13:1, 46:1, 60:1, 53:1}, $intern_131 = {3:1, 6:1, 4:1, 5:1, 192:1}, $intern_132 = {3:1, 4:1, 5:1, 148:1, 316:1}, $intern_133 = {3:1, 19:1, 14:1, 13:1, 53:1, 503:1, 72:1, 63:1}, $intern_134 = 1024, $intern_135 = 8192, $intern_136 = 2048, $intern_137 = {3:1, 4:1, 5:1, 221:1}, $intern_138 = {3:1, 4:1, 5:1, 575:1}, $intern_139 = {3:1, 4:1, 19:1, 24:1, 44:1, 14:1, 13:1, 46:1, 60:1, 57:1, 53:1, 63:1}, $intern_140 = {3:1, 4:1, 19:1, 24:1, 44:1, 14:1, 13:1, 46:1, 60:1, 57:1, 53:1, 72:1, 63:1}, $intern_141 = {3:1, 4:1, 5:1, 576:1}, $intern_142 = {3:1, 4:1, 19:1, 24:1, 44:1, 14:1, 13:1, 60:1, 53:1, 72:1, 63:1}, $intern_143 = {19:1, 24:1, 44:1, 14:1, 13:1, 53:1, 63:1}, $intern_144 = {43:1, 115:1, 246:1}, $intern_145 = {66:1, 294:1}, $intern_146 = 1089, $intern_147 = -32768, $intern_148 = {49:1}, $intern_149 = {3:1, 4:1, 5:1, 116:1}, $intern_150 = {81:1, 78:1, 505:1, 1667:1}, $intern_151 = 1114111, $intern_152 = {3:1, 109:1}, $intern_153 = {3:1, 4:1, 5:1, 317:1};
var _, prototypesByTypeId_0, initFnList_0, permutationId = -1;
function setGwtProperty(propertyName, propertyValue){
typeof window === 'object' && typeof window['$gwt'] === 'object' && (window['$gwt'][propertyName] = propertyValue);
}
function gwtOnLoad_0(errFn, modName, modBase, softPermutationId){
ensureModuleInit();
var initFnList = initFnList_0;
$moduleName = modName;
$moduleBase = modBase;
permutationId = softPermutationId;
function initializeModules(){
for (var i = 0; i < initFnList.length; i++) {
initFnList[i]();
}
}
if (errFn) {
try {
$entry(initializeModules)();
}
catch (e) {
errFn(modName, e);
}
}
else {
$entry(initializeModules)();
}
}
function ensureModuleInit(){
initFnList_0 == null && (initFnList_0 = []);
}
function addInitFunctions(){
ensureModuleInit();
var initFnList = initFnList_0;
for (var i = 0; i < arguments.length; i++) {
initFnList.push(arguments[i]);
}
}
function typeMarkerFn(){
}
function toString_38(object){
var number;
if (Array.isArray(object) && object.typeMarker === typeMarkerFn) {
return $getName(getClass__Ljava_lang_Class___devirtual$(object)) + '@' + (number = hashCode__I__devirtual$(object) >>> 0 , number.toString(16));
}
return object.toString();
}
function portableObjCreate(obj){
function F(){
}
;
F.prototype = obj || {};
return new F;
}
function makeLambdaFunction(samMethod, ctor, ctorArguments){
var lambda = function(){
return samMethod.apply(lambda, arguments);
}
;
ctor.apply(lambda, ctorArguments);
return lambda;
}
function emptyMethod(){
}
function defineClass(typeId, superTypeIdOrPrototype, castableTypeMap){
var prototypesByTypeId = prototypesByTypeId_0, superPrototype;
var prototype_0 = prototypesByTypeId[typeId];
var clazz = prototype_0 instanceof Array?prototype_0[0]:null;
if (prototype_0 && !clazz) {
_ = prototype_0;
}
else {
_ = (superPrototype = superTypeIdOrPrototype && superTypeIdOrPrototype.prototype , !superPrototype && (superPrototype = prototypesByTypeId_0[superTypeIdOrPrototype]) , portableObjCreate(superPrototype));
_.castableTypeMap = castableTypeMap;
!superTypeIdOrPrototype && (_.typeMarker = typeMarkerFn);
prototypesByTypeId[typeId] = _;
}
for (var i = 3; i < arguments.length; ++i) {
arguments[i].prototype = _;
}
clazz && (_.___clazz = clazz);
}
function bootstrap(){
prototypesByTypeId_0 = {};
!Array.isArray && (Array.isArray = function(vArg){
return Object.prototype.toString.call(vArg) === '[object Array]';
}
);
function now_0(){
return (new Date).getTime();
}
!Date.now && (Date.now = now_0);
}
$wnd.goog = $wnd.goog || {};
$wnd.goog.global = $wnd.goog.global || $wnd;
bootstrap();
function $equals(this$static, other){
return maskUndefined(this$static) === maskUndefined(other);
}
function Object_0(){
}
function equals_Ljava_lang_Object__Z__devirtual$(this$static, other){
return instanceOfString(this$static)?$equals_5(this$static, other):instanceOfDouble(this$static)?$equals_4(this$static, other):instanceOfBoolean(this$static)?(checkCriticalNotNull(this$static) , maskUndefined(this$static) === maskUndefined(other)):hasJavaObjectVirtualDispatch(this$static)?this$static.equals_0(other):isJavaArray(this$static)?$equals(this$static, other):$equals_3(this$static, other);
}
function getClass__Ljava_lang_Class___devirtual$(this$static){
return instanceOfString(this$static)?Ljava_lang_String_2_classLit:instanceOfDouble(this$static)?Ljava_lang_Double_2_classLit:instanceOfBoolean(this$static)?Ljava_lang_Boolean_2_classLit:hasJavaObjectVirtualDispatch(this$static)?this$static.___clazz:isJavaArray(this$static)?this$static.___clazz:this$static.___clazz || Array.isArray(this$static) && getClassLiteralForArray(Lcom_google_gwt_core_client_JavaScriptObject_2_classLit, 1) || Lcom_google_gwt_core_client_JavaScriptObject_2_classLit;
}
function hashCode__I__devirtual$(this$static){
return instanceOfString(this$static)?getHashCode_1(this$static):instanceOfDouble(this$static)?$hashCode_0(this$static):instanceOfBoolean(this$static)?(checkCriticalNotNull(this$static) , this$static)?1231:1237:hasJavaObjectVirtualDispatch(this$static)?this$static.hashCode_1():isJavaArray(this$static)?getHashCode_0(this$static):$hashCode(this$static);
}
defineClass(1, null, {}, Object_0);
_.equals_0 = function equals(other){
return $equals(this, other);
}
;
_.getClass_0 = function getClass_0(){
return this.___clazz;
}
;
_.hashCode_1 = function hashCode_0(){
return getHashCode_0(this);
}
;
_.toString_0 = function toString_1(){
var number;
return $getName(getClass__Ljava_lang_Class___devirtual$(this)) + '@' + (number = hashCode__I__devirtual$(this) >>> 0 , number.toString(16));
}
;
_.equals = function(other){
return this.equals_0(other);
}
;
_.hashCode = function(){
return this.hashCode_1();
}
;
_.toString = function(){
return this.toString_0();
}
;
function canCast(src_0, dstId){
if (instanceOfString(src_0)) {
return !!stringCastMap[dstId];
}
else if (src_0.castableTypeMap) {
return !!src_0.castableTypeMap[dstId];
}
else if (instanceOfDouble(src_0)) {
return !!doubleCastMap[dstId];
}
else if (instanceOfBoolean(src_0)) {
return !!booleanCastMap[dstId];
}
return false;
}
function castTo(src_0, dstId){
checkCriticalType(src_0 == null || canCast(src_0, dstId));
return src_0;
}
function castToArray(src_0){
var elementTypeCategory;
checkCriticalType(src_0 == null || Array.isArray(src_0) && (elementTypeCategory = getElementTypeCategory(src_0) , !(elementTypeCategory >= 14 && elementTypeCategory <= 16)));
return src_0;
}
function castToBoolean(src_0){
checkCriticalType(src_0 == null || instanceOfBoolean(src_0));
return src_0;
}
function castToDouble(src_0){
checkCriticalType(src_0 == null || instanceOfDouble(src_0));
return src_0;
}
function castToJso(src_0){
checkCriticalType(src_0 == null || isJsObjectOrFunction(src_0) && !(src_0.typeMarker === typeMarkerFn));
return src_0;
}
function castToString(src_0){
checkCriticalType(src_0 == null || instanceOfString(src_0));
return src_0;
}
function charToString(x_0){
return String.fromCharCode(x_0);
}
function hasJavaObjectVirtualDispatch(src_0){
return !Array.isArray(src_0) && src_0.typeMarker === typeMarkerFn;
}
function instanceOf(src_0, dstId){
return src_0 != null && canCast(src_0, dstId);
}
function instanceOfBoolean(src_0){
return typeof src_0 === 'boolean';
}
function instanceOfDouble(src_0){
return typeof src_0 === 'number';
}
function instanceOfJso(src_0){
return src_0 != null && isJsObjectOrFunction(src_0) && !(src_0.typeMarker === typeMarkerFn);
}
function instanceOfString(src_0){
return typeof src_0 === 'string';
}
function isJsObjectOrFunction(src_0){
return typeof src_0 === 'object' || typeof src_0 === 'function';
}
function maskUndefined(src_0){
return src_0 == null?null:src_0;
}
function round_int(x_0){
return Math.max(Math.min(x_0, $intern_0), -2147483648) | 0;
}
function throwClassCastExceptionUnlessNull(o){
checkCriticalType(o == null);
return o;
}
var booleanCastMap, doubleCastMap, stringCastMap;
function $ensureNamesAreInitialized(this$static){
if (this$static.typeName != null) {
return;
}
initializeNames(this$static);
}
function $getEnumConstants(this$static){
return this$static.enumConstantsFunc && this$static.enumConstantsFunc();
}
function $getName(this$static){
$ensureNamesAreInitialized(this$static);
return this$static.typeName;
}
function $toString_5(this$static){
return ((this$static.modifiers & 2) != 0?'interface ':(this$static.modifiers & 1) != 0?'':'class ') + ($ensureNamesAreInitialized(this$static) , this$static.typeName);
}
function Class(){
++nextSequentialId;
this.typeName = null;
this.simpleName = null;
this.packageName = null;
this.compoundName = null;
this.canonicalName = null;
this.typeId = null;
this.arrayLiterals = null;
}
function createClassObject(packageName, compoundClassName){
var clazz;
clazz = new Class;
clazz.packageName = packageName;
clazz.compoundName = compoundClassName;
return clazz;
}
function createForClass(packageName, compoundClassName, typeId){
var clazz;
clazz = createClassObject(packageName, compoundClassName);
maybeSetClassLiteral(typeId, clazz);
return clazz;
}
function createForEnum(packageName, compoundClassName, typeId, superclass, enumConstantsFunc, enumValueOfFunc){
var clazz;
clazz = createClassObject(packageName, compoundClassName);
maybeSetClassLiteral(typeId, clazz);
clazz.modifiers = enumConstantsFunc?8:0;
clazz.enumSuperclass = superclass;
clazz.enumConstantsFunc = enumConstantsFunc;
clazz.enumValueOfFunc = enumValueOfFunc;
return clazz;
}
function createForInterface(packageName, compoundClassName){
var clazz;
clazz = createClassObject(packageName, compoundClassName);
clazz.modifiers = 2;
return clazz;
}
function createForPrimitive(className, primitiveTypeId){
var clazz;
clazz = createClassObject('', className);
clazz.typeId = primitiveTypeId;
clazz.modifiers = 1;
return clazz;
}
function getClassLiteralForArray_0(leafClass, dimensions){
var arrayLiterals = leafClass.arrayLiterals = leafClass.arrayLiterals || [];
return arrayLiterals[dimensions] || (arrayLiterals[dimensions] = leafClass.createClassLiteralForArray(dimensions));
}
function getPrototypeForClass(clazz){
if (clazz.isPrimitive()) {
return null;
}
var typeId = clazz.typeId;
return prototypesByTypeId_0[typeId];
}
function initializeNames(clazz){
if (clazz.isArray_1()) {
var componentType = clazz.componentType;
componentType.isPrimitive()?(clazz.typeName = '[' + componentType.typeId):!componentType.isArray_1()?(clazz.typeName = '[L' + componentType.getName() + ';'):(clazz.typeName = '[' + componentType.getName());
clazz.canonicalName = componentType.getCanonicalName() + '[]';
clazz.simpleName = componentType.getSimpleName() + '[]';
return;
}
var packageName = clazz.packageName;
var compoundName = clazz.compoundName;
compoundName = compoundName.split('/');
clazz.typeName = join_0('.', [packageName, join_0('$', compoundName)]);
clazz.canonicalName = join_0('.', [packageName, join_0('.', compoundName)]);
clazz.simpleName = compoundName[compoundName.length - 1];
}
function join_0(separator, strings){
var i = 0;
while (!strings[i] || strings[i] == '') {
i++;
}
var result = strings[i++];
for (; i < strings.length; i++) {
if (!strings[i] || strings[i] == '') {
continue;
}
result += separator + strings[i];
}
return result;
}
function maybeSetClassLiteral(typeId, clazz){
var proto;
if (!typeId) {
return;
}
clazz.typeId = typeId;
var prototype_0 = getPrototypeForClass(clazz);
if (!prototype_0) {
prototypesByTypeId_0[typeId] = [clazz];
return;
}
prototype_0.___clazz = clazz;
}
defineClass(258, 1, {258:1, 1754:1}, Class);
_.createClassLiteralForArray = function createClassLiteralForArray(dimensions){
var clazz;
clazz = new Class;
clazz.modifiers = 4;
dimensions > 1?(clazz.componentType = getClassLiteralForArray_0(this, dimensions - 1)):(clazz.componentType = this);
return clazz;
}
;
_.getCanonicalName = function getCanonicalName(){
$ensureNamesAreInitialized(this);
return this.canonicalName;
}
;
_.getName = function getName(){
return $getName(this);
}
;
_.getSimpleName = function getSimpleName(){
return $ensureNamesAreInitialized(this) , this.simpleName;
}
;
_.isArray_1 = function isArray_1(){
return (this.modifiers & 4) != 0;
}
;
_.isPrimitive = function isPrimitive(){
return (this.modifiers & 1) != 0;
}
;
_.toString_0 = function toString_42(){
return $toString_5(this);
}
;
_.modifiers = 0;
var nextSequentialId = 1;
var Ljava_lang_Object_2_classLit = createForClass('java.lang', 'Object', 1);
var Ljava_lang_Class_2_classLit = createForClass('java.lang', 'Class', 258);
defineClass(1727, 1, $intern_1);
var Lcom_google_common_base_Optional_2_classLit = createForClass('com.google.common.base', 'Optional', 1727);
function $clinit_Absent(){
$clinit_Absent = emptyMethod;
INSTANCE = new Absent;
}
function Absent(){
}
defineClass(989, 1727, $intern_1, Absent);
_.equals_0 = function equals_0(object){
return object === this;
}
;
_.hashCode_1 = function hashCode_1(){
return 2040732332;
}
;
_.toString_0 = function toString_2(){
return 'Optional.absent()';
}
;
_.transform = function transform(function_0){
checkNotNull(function_0);
return $clinit_Absent() , INSTANCE;
}
;
var INSTANCE;
var Lcom_google_common_base_Absent_2_classLit = createForClass('com.google.common.base', 'Absent', 989);
function $appendTo(this$static, appendable, parts){
checkNotNull(appendable);
if (parts.hasNext_0()) {
$append_7(appendable, $toString(parts.next_1()));
while (parts.hasNext_0()) {
$append_7(appendable, this$static.separator);
$append_7(appendable, $toString(parts.next_1()));
}
}
return appendable;
}
function $appendTo_0(this$static, builder, parts){
var impossible;
try {
$appendTo(this$static, builder, parts);
}
catch ($e0) {
$e0 = toJava($e0);
if (instanceOf($e0, 511)) {
impossible = $e0;
throw toJs(new AssertionError_0(impossible));
}
else
throw toJs($e0);
}
return builder;
}
function $join(this$static, parts){
return $appendTo_0(this$static, new StringBuilder, parts).string;
}
function $toString(part){
checkNotNull(part);
return instanceOf(part, 403)?castTo(part, 403):toString_38(part);
}
function Joiner(){
this.separator = castToString(checkNotNull(', '));
}
defineClass(543, 1, {}, Joiner);
var Lcom_google_common_base_Joiner_2_classLit = createForClass('com.google.common.base', 'Joiner', 543);
function equal(a, b){
return maskUndefined(a) === maskUndefined(b) || a != null && equals_Ljava_lang_Object__Z__devirtual$(a, b);
}
function badElementIndex(index_0, size_0){
if (index_0 < 0) {
return lenientFormat('%s (%s) must not be negative', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_2, 1, 5, ['index', valueOf_4(index_0)]));
}
else if (size_0 < 0) {
throw toJs(new IllegalArgumentException_0('negative size: ' + size_0));
}
else {
return lenientFormat('%s (%s) must be less than size (%s)', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_2, 1, 5, ['index', valueOf_4(index_0), valueOf_4(size_0)]));
}
}
function badPositionIndex(index_0, size_0, desc){
if (index_0 < 0) {
return lenientFormat('%s (%s) must not be negative', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_2, 1, 5, [desc, valueOf_4(index_0)]));
}
else if (size_0 < 0) {
throw toJs(new IllegalArgumentException_0('negative size: ' + size_0));
}
else {
return lenientFormat('%s (%s) must not be greater than size (%s)', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_2, 1, 5, [desc, valueOf_4(index_0), valueOf_4(size_0)]));
}
}
function badPositionIndexes(start_0, end, size_0){
if (start_0 < 0 || start_0 > size_0) {
return badPositionIndex(start_0, size_0, 'start index');
}
if (end < 0 || end > size_0) {
return badPositionIndex(end, size_0, 'end index');
}
return lenientFormat('end index (%s) must not be less than start index (%s)', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_2, 1, 5, [valueOf_4(end), valueOf_4(start_0)]));
}
function checkArgument(expression){
if (!expression) {
throw toJs(new IllegalArgumentException);
}
}
function checkArgument_0(expression, errorMessage){
if (!expression) {
throw toJs(new IllegalArgumentException_0(errorMessage));
}
}
function checkArgument_1(b, p1){
if (!b) {
throw toJs(new IllegalArgumentException_0(lenientFormat('value already present: %s', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_2, 1, 5, [p1]))));
}
}
function checkArgument_2(b, errorMessageTemplate, p1, p2){
if (!b) {
throw toJs(new IllegalArgumentException_0(lenientFormat(errorMessageTemplate, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_2, 1, 5, [p1, p2]))));
}
}
function checkElementIndex(index_0, size_0){
if (index_0 < 0 || index_0 >= size_0) {
throw toJs(new IndexOutOfBoundsException_0(badElementIndex(index_0, size_0)));
}
return index_0;
}
function checkNotNull(reference){
if (reference == null) {
throw toJs(new NullPointerException);
}
return reference;
}
function checkNotNull_0(reference, errorMessage){
if (reference == null) {
throw toJs(new NullPointerException_0(errorMessage));
}
return reference;
}
function checkPositionIndex(index_0, size_0){
if (index_0 < 0 || index_0 > size_0) {
throw toJs(new IndexOutOfBoundsException_0(badPositionIndex(index_0, size_0, 'index')));
}
return index_0;
}
function checkPositionIndexes(start_0, end, size_0){
if (start_0 < 0 || end < start_0 || end > size_0) {
throw toJs(new IndexOutOfBoundsException_0(badPositionIndexes(start_0, end, size_0)));
}
}
function checkState(expression){
if (!expression) {
throw toJs(new IllegalStateException);
}
}
function checkState_0(expression){
if (!expression) {
throw toJs(new IllegalStateException_0('no calls to next() since the last call to remove()'));
}
}
var Lcom_google_common_base_Predicate_2_classLit = createForInterface('com.google.common.base', 'Predicate');
function toStringHelper(components){
var builder, first, o, o$iterator;
builder = $append_5($append_11(new StringBuilder_1('Predicates.'), 'and'), 40);
first = true;
for (o$iterator = new AbstractList$IteratorImpl(components); o$iterator.i < o$iterator.this$01_0.size_1();) {
o = (checkCriticalElement(o$iterator.i < o$iterator.this$01_0.size_1()) , o$iterator.this$01_0.get_0(o$iterator.last = o$iterator.i++));
first || (builder.string += ',' , builder);
builder.string += '' + o;
first = false;
}
return (builder.string += ')' , builder).string;
}
function $apply(this$static, t){
var i;
for (i = 0; i < this$static.components.array.length; i++) {
if (!castTo($get_12(this$static.components, i), 151).apply_1(t)) {
return false;
}
}
return true;
}
function Predicates$AndPredicate(components){
this.components = components;
}
defineClass(493, 1, {151:1, 493:1, 3:1, 42:1}, Predicates$AndPredicate);
_.test_0 = function test_0(input_0){
return $apply(this, input_0);
}
;
_.apply_1 = function apply_1(t){
return $apply(this, t);
}
;
_.equals_0 = function equals_1(obj){
var that;
if (instanceOf(obj, 493)) {
that = castTo(obj, 493);
return $equals_2(this.components, that.components);
}
return false;
}
;
_.hashCode_1 = function hashCode_2(){
return hashCode_46(this.components) + 306654252;
}
;
_.toString_0 = function toString_3(){
return toStringHelper(this.components);
}
;
var Lcom_google_common_base_Predicates$AndPredicate_2_classLit = createForClass('com.google.common.base', 'Predicates/AndPredicate', 493);
function Present(reference){
this.reference = reference;
}
defineClass(349, 1727, {349:1, 3:1}, Present);
_.equals_0 = function equals_2(object){
var other;
if (instanceOf(object, 349)) {
other = castTo(object, 349);
return equals_Ljava_lang_Object__Z__devirtual$(this.reference, other.reference);
}
return false;
}
;
_.hashCode_1 = function hashCode_3(){
return 1502476572 + hashCode__I__devirtual$(this.reference);
}
;
_.toString_0 = function toString_4(){
return 'Optional.of(' + this.reference + ')';
}
;
_.transform = function transform_0(function_0){
return new Present(checkNotNull_0(function_0.apply_0(this.reference), 'the Function passed to Optional.transform() must not return null.'));
}
;
var Lcom_google_common_base_Present_2_classLit = createForClass('com.google.common.base', 'Present', 349);
function lenientFormat(template, args){
var builder, i, i0, placeholderStart, templateStart;
template = template == null?'null':(checkCriticalNotNull(template) , template);
for (i0 = 0; i0 < args.length; i0++) {
args[i0] = lenientToString(args[i0]);
}
builder = new StringBuilder_0;
templateStart = 0;
i = 0;
while (i < args.length) {
placeholderStart = template.indexOf('%s', templateStart);
if (placeholderStart == -1) {
break;
}
builder.string += '' + $substring_1(template == null?'null':(checkCriticalNotNull(template) , template), templateStart, placeholderStart);
$append_10(builder, args[i++]);
templateStart = placeholderStart + 2;
}
$append_9(builder, template, templateStart, template.length);
if (i < args.length) {
builder.string += ' [';
$append_10(builder, args[i++]);
while (i < args.length) {
builder.string += ', ';
$append_10(builder, args[i++]);
}
builder.string += ']';
}
return builder.string;
}
function lenientToString(o){
var e, number, objectToString;
try {
return o == null?'null':toString_38(o);
}
catch ($e0) {
$e0 = toJava($e0);
if (instanceOf($e0, 91)) {
e = $e0;
objectToString = $getName(getClass__Ljava_lang_Class___devirtual$(o)) + '@' + (number = ($clinit_System() , getIdentityHashCode(o)) >>> 0 , number.toString(16));
$log(getLogger(), ($clinit_Level() , 'Exception during lenientFormat for ' + objectToString), e);
return '<' + objectToString + ' threw ' + $getName(e.___clazz) + '>';
}
else
throw toJs($e0);
}
}
function $forEachRemaining(this$static, consumer){
checkCriticalNotNull(consumer);
while (this$static.hasNext_0()) {
consumer.accept(this$static.next_1());
}
}
function $remove_21(){
throw toJs(new UnsupportedOperationException);
}
function $remove(){
throw toJs(new UnsupportedOperationException);
}
defineClass(178, 1, $intern_3);
_.forEachRemaining = function forEachRemaining(consumer){
$forEachRemaining(this, consumer);
}
;
_.remove = function remove_0(){
$remove();
}
;
var Lcom_google_common_collect_UnmodifiableIterator_2_classLit = createForClass('com.google.common.collect', 'UnmodifiableIterator', 178);
defineClass(1708, 178, $intern_4);
_.remove = function remove_1(){
$remove();
}
;
_.add_1 = function add_1(e){
throw toJs(new UnsupportedOperationException);
}
;
_.set_1 = function set_1(e){
throw toJs(new UnsupportedOperationException);
}
;
var Lcom_google_common_collect_UnmodifiableListIterator_2_classLit = createForClass('com.google.common.collect', 'UnmodifiableListIterator', 1708);
function AbstractIndexedListIterator(size_0){
AbstractIndexedListIterator_0.call(this, size_0, 0);
}
function AbstractIndexedListIterator_0(size_0, position){
checkPositionIndex(position, size_0);
this.size_0 = size_0;
this.position = position;
}
defineClass(329, 1708, $intern_4);
_.hasNext_0 = function hasNext(){
return this.position < this.size_0;
}
;
_.hasPrevious = function hasPrevious(){
return this.position > 0;
}
;
_.next_1 = function next_0(){
if (this.position >= this.size_0) {
throw toJs(new NoSuchElementException);
}
return this.get_0(this.position++);
}
;
_.nextIndex_0 = function nextIndex_0(){
return this.position;
}
;
_.previous = function previous_0(){
if (this.position <= 0) {
throw toJs(new NoSuchElementException);
}
return this.get_0(--this.position);
}
;
_.previousIndex = function previousIndex(){
return this.position - 1;
}
;
_.position = 0;
_.size_0 = 0;
var Lcom_google_common_collect_AbstractIndexedListIterator_2_classLit = createForClass('com.google.common.collect', 'AbstractIndexedListIterator', 329);
function $hasNext(this$static){
checkState(this$static.state != 3);
switch (this$static.state) {
case 2:
return false;
case 0:
return true;
}
return $tryToComputeNext(this$static);
}
function $next(this$static){
var result;
if (!$hasNext(this$static)) {
throw toJs(new NoSuchElementException);
}
this$static.state = 1;
result = this$static.next_0;
this$static.next_0 = null;
return result;
}
function $tryToComputeNext(this$static){
this$static.state = 3;
this$static.next_0 = this$static.computeNext();
if (this$static.state != 2) {
this$static.state = 0;
return true;
}
return false;
}
defineClass(592, 178, $intern_3);
_.hasNext_0 = function hasNext_0(){
return $hasNext(this);
}
;
_.next_1 = function next_1(){
return $next(this);
}
;
_.state = 1;
var Lcom_google_common_collect_AbstractIterator_2_classLit = createForClass('com.google.common.collect', 'AbstractIterator', 592);
function $containsEntry(this$static, key, value_0){
var collection, result;
collection = (result = this$static.asMap , $get_0(!result?(this$static.asMap = new AbstractMapBasedMultimap$AsMap(this$static, this$static.map_0)):result, key));
return !!collection && ($refreshIfEmpty(collection) , collection.delegate.contains(value_0));
}
function $containsValue(this$static, value_0){
var collection, collection$iterator;
for (collection$iterator = this$static.asMap_0().values_0().iterator_0(); collection$iterator.hasNext_0();) {
collection = castTo(collection$iterator.next_1(), 14);
if (collection.contains(value_0)) {
return true;
}
}
return false;
}
function $keySet(this$static){
var result;
result = this$static.keySet;
return !result?(this$static.keySet = this$static.createKeySet()):result;
}
function $remove_0(this$static, key, value_0){
var collection, result;
collection = (result = this$static.asMap , $get_0(!result?(this$static.asMap = new AbstractMapBasedMultimap$AsMap(this$static, this$static.map_0)):result, key));
return !!collection && $remove_2(collection, value_0);
}
defineClass(1718, 1, {220:1});
_.asMap_0 = function asMap(){
var result;
return result = this.asMap , !result?(this.asMap = this.createAsMap()):result;
}
;
_.equals_0 = function equals_3(object){
return equalsImpl_1(this, object);
}
;
_.hashCode_1 = function hashCode_4(){
return hashCode__I__devirtual$(this.asMap_0());
}
;
_.keySet_0 = function keySet(){
return $keySet(this);
}
;
_.toString_0 = function toString_5(){
return toString_38(this.asMap_0());
}
;
var Lcom_google_common_collect_AbstractMultimap_2_classLit = createForClass('com.google.common.collect', 'AbstractMultimap', 1718);
function $clear(this$static){
var collection, collection$iterator;
for (collection$iterator = this$static.map_0.values_0().iterator_0(); collection$iterator.hasNext_0();) {
collection = castTo(collection$iterator.next_1(), 14);
collection.clear_0();
}
this$static.map_0.clear_0();
this$static.totalSize = 0;
}
function $get(this$static, key){
var collection;
collection = castTo(this$static.map_0.get_2(key), 14);
!collection && (collection = this$static.createCollection_0(key));
return this$static.wrapCollection(key, collection);
}
function $put(this$static, key, value_0){
var collection;
collection = castTo(this$static.map_0.get_2(key), 14);
if (!collection) {
collection = this$static.createCollection_0(key);
if (collection.add_2(value_0)) {
++this$static.totalSize;
this$static.map_0.put(key, collection);
return true;
}
else {
throw toJs(new AssertionError_0('New Collection violated the Collection spec'));
}
}
else if (collection.add_2(value_0)) {
++this$static.totalSize;
return true;
}
else {
return false;
}
}
function $removeValuesForKey(this$static, key){
var collection, count;
collection = castTo(safeRemove_0(this$static.map_0, key), 14);
if (collection) {
count = collection.size_1();
collection.clear_0();
this$static.totalSize -= count;
}
}
function $values(this$static){
var result;
return result = this$static.values , !result?(this$static.values = new AbstractMultimap$Values(this$static)):result;
}
function $wrapList(this$static, key, list, ancestor){
return instanceOf(list, 46)?new AbstractMapBasedMultimap$RandomAccessWrappedList(this$static, key, list, ancestor):new AbstractMapBasedMultimap$WrappedList(this$static, key, list, ancestor);
}
function AbstractMapBasedMultimap(map_0){
checkArgument(map_0.isEmpty());
this.map_0 = map_0;
}
function iteratorOrListIterator(collection){
return instanceOf(collection, 13)?castTo(collection, 13).listIterator_0():collection.iterator_0();
}
defineClass(623, 1718, $intern_5);
_.clear_0 = function clear_0(){
$clear(this);
}
;
_.createAsMap = function createAsMap(){
return new AbstractMapBasedMultimap$AsMap(this, this.map_0);
}
;
_.createCollection_0 = function createCollection(key){
return this.createCollection();
}
;
_.createKeySet = function createKeySet(){
return new AbstractMapBasedMultimap$KeySet(this, this.map_0);
}
;
_.get_1 = function get_0(key){
return $get(this, key);
}
;
_.valueIterator_0 = function valueIterator(){
return new AbstractMapBasedMultimap$1(this);
}
;
_.valueSpliterator = function valueSpliterator(){
return flatMap(this.map_0.values_0().spliterator_0(), new AbstractMapBasedMultimap$1methodref$spliterator$Type, 64, this.totalSize);
}
;
_.wrapCollection = function wrapCollection(key, collection){
return new AbstractMapBasedMultimap$WrappedCollection(this, key, collection, null);
}
;
_.totalSize = 0;
var Lcom_google_common_collect_AbstractMapBasedMultimap_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap', 623);
defineClass(1507, 623, $intern_5);
_.createCollection = function createCollection_0(){
return new ArrayList_0(this.expectedValuesPerKey);
}
;
_.get_1 = function get_1(key){
return castTo($get(this, key), 13);
}
;
_.asMap_0 = function asMap_0(){
var result;
return result = this.asMap , !result?(this.asMap = new AbstractMapBasedMultimap$AsMap(this, this.map_0)):result;
}
;
_.equals_0 = function equals_4(object){
return equalsImpl_1(this, object);
}
;
_.wrapCollection = function wrapCollection_0(key, collection){
return $wrapList(this, key, castTo(collection, 13), null);
}
;
var Lcom_google_common_collect_AbstractListMultimap_2_classLit = createForClass('com.google.common.collect', 'AbstractListMultimap', 1507);
defineClass(938, 1, $intern_6);
_.forEachRemaining = function forEachRemaining_0(consumer){
$forEachRemaining(this, consumer);
}
;
_.hasNext_0 = function hasNext_1(){
return this.keyIterator.hasNext_0() || this.valueIterator.hasNext_0();
}
;
_.next_1 = function next_2(){
var mapEntry;
if (!this.valueIterator.hasNext_0()) {
mapEntry = castTo(this.keyIterator.next_1(), 37);
this.key = mapEntry.getKey();
this.collection = castTo(mapEntry.getValue(), 14);
this.valueIterator = this.collection.iterator_0();
}
return this.output(this.key, this.valueIterator.next_1());
}
;
_.remove = function remove_2(){
this.valueIterator.remove();
this.collection.isEmpty() && this.keyIterator.remove();
--this.this$01.totalSize;
}
;
var Lcom_google_common_collect_AbstractMapBasedMultimap$Itr_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap/Itr', 938);
function AbstractMapBasedMultimap$1(this$0){
this.this$01 = this$0;
this.keyIterator = this$0.map_0.entrySet_0().iterator_0();
this.key = null;
this.collection = null;
this.valueIterator = ($clinit_Iterators$EmptyModifiableIterator() , INSTANCE_2);
}
defineClass(939, 938, $intern_6, AbstractMapBasedMultimap$1);
_.output = function output_0(key, value_0){
return value_0;
}
;
var Lcom_google_common_collect_AbstractMapBasedMultimap$1_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap/1', 939);
function AbstractMapBasedMultimap$1methodref$spliterator$Type(){
}
defineClass(940, 1, {}, AbstractMapBasedMultimap$1methodref$spliterator$Type);
_.apply_0 = function apply_2(arg0){
return castTo(arg0, 14).spliterator_0();
}
;
var Lcom_google_common_collect_AbstractMapBasedMultimap$1methodref$spliterator$Type_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap/1methodref$spliterator$Type', 940);
function $forEach_2(this$static, consumer){
var entry, entry$iterator;
checkCriticalNotNull(consumer);
for (entry$iterator = this$static.entrySet_0().iterator_0(); entry$iterator.hasNext_0();) {
entry = castTo(entry$iterator.next_1(), 37);
consumer.accept_1(entry.getKey(), entry.getValue());
}
}
var Ljava_util_Map_2_classLit = createForInterface('java.util', 'Map');
function $containsEntry_0(this$static, entry){
var key, ourValue, value_0;
key = entry.getKey();
value_0 = entry.getValue();
ourValue = this$static.get_2(key);
if (!(maskUndefined(value_0) === maskUndefined(ourValue) || value_0 != null && equals_Ljava_lang_Object__Z__devirtual$(value_0, ourValue))) {
return false;
}
if (ourValue == null && !this$static.containsKey(key)) {
return false;
}
return true;
}
function $implFindEntry(this$static, key, remove){
var entry, iter, k;
for (iter = this$static.entrySet_0().iterator_0(); iter.hasNext_0();) {
entry = castTo(iter.next_1(), 37);
k = entry.getKey();
if (maskUndefined(key) === maskUndefined(k) || key != null && equals_Ljava_lang_Object__Z__devirtual$(key, k)) {
if (remove) {
entry = new AbstractMap$SimpleEntry(entry.getKey(), entry.getValue());
iter.remove();
}
return entry;
}
}
return null;
}
function $putAll(this$static, map_0){
var e, e$iterator;
checkCriticalNotNull(map_0);
for (e$iterator = map_0.entrySet_0().iterator_0(); e$iterator.hasNext_0();) {
e = castTo(e$iterator.next_1(), 37);
this$static.put(e.getKey(), e.getValue());
}
}
function $toString_0(this$static){
var entry, entry$iterator, joiner;
joiner = new StringJoiner(', ', '{', '}');
for (entry$iterator = this$static.entrySet_0().iterator_0(); entry$iterator.hasNext_0();) {
entry = castTo(entry$iterator.next_1(), 37);
$add_8(joiner, $toString_1(this$static, entry.getKey()) + '=' + $toString_1(this$static, entry.getValue()));
}
return !joiner.builder?joiner.emptyValue:joiner.suffix.length == 0?joiner.builder.string:joiner.builder.string + ('' + joiner.suffix);
}
function $toString_1(this$static, o){
return maskUndefined(o) === maskUndefined(this$static)?'(this Map)':o == null?'null':toString_38(o);
}
function getEntryKeyOrNull(entry){
return !entry?null:entry.key;
}
function getEntryValueOrNull(entry){
return !entry?null:entry.getValue();
}
defineClass(1709, 1, $intern_7);
_.forEach = function forEach(consumer){
$forEach_2(this, consumer);
}
;
_.clear_0 = function clear_1(){
this.entrySet_0().clear_0();
}
;
_.containsEntry = function containsEntry(entry){
return $containsEntry_0(this, entry);
}
;
_.containsKey = function containsKey(key){
return !!$implFindEntry(this, key, false);
}
;
_.containsValue = function containsValue(value_0){
var entry, entry$iterator, v;
for (entry$iterator = this.entrySet_0().iterator_0(); entry$iterator.hasNext_0();) {
entry = castTo(entry$iterator.next_1(), 37);
v = entry.getValue();
if (maskUndefined(value_0) === maskUndefined(v) || value_0 != null && equals_Ljava_lang_Object__Z__devirtual$(value_0, v)) {
return true;
}
}
return false;
}
;
_.equals_0 = function equals_5(obj){
var entry, entry$iterator, otherMap;
if (obj === this) {
return true;
}
if (!instanceOf(obj, 85)) {
return false;
}
otherMap = castTo(obj, 85);
if (this.size_1() != otherMap.size_1()) {
return false;
}
for (entry$iterator = otherMap.entrySet_0().iterator_0(); entry$iterator.hasNext_0();) {
entry = castTo(entry$iterator.next_1(), 37);
if (!this.containsEntry(entry)) {
return false;
}
}
return true;
}
;
_.get_2 = function get_2(key){
return getEntryValueOrNull($implFindEntry(this, key, false));
}
;
_.hashCode_1 = function hashCode_5(){
return hashCode_45(this.entrySet_0());
}
;
_.isEmpty = function isEmpty(){
return this.size_1() == 0;
}
;
_.keySet_0 = function keySet_0(){
return new AbstractMap$1(this);
}
;
_.put = function put(key, value_0){
throw toJs(new UnsupportedOperationException_0('Put not supported on this map'));
}
;
_.putAll = function putAll(map_0){
$putAll(this, map_0);
}
;
_.remove_0 = function remove_3(key){
return getEntryValueOrNull($implFindEntry(this, key, true));
}
;
_.size_1 = function size_1(){
return this.entrySet_0().size_1();
}
;
_.toString_0 = function toString_6(){
return $toString_0(this);
}
;
_.values_0 = function values_0(){
return new AbstractMap$2(this);
}
;
var Ljava_util_AbstractMap_2_classLit = createForClass('java.util', 'AbstractMap', 1709);
defineClass(1719, 1709, $intern_7);
_.createKeySet = function createKeySet_0(){
return new Maps$KeySet(this);
}
;
_.entrySet_0 = function entrySet(){
var result;
result = this.entrySet;
return !result?(this.entrySet = this.createEntrySet()):result;
}
;
_.keySet_0 = function keySet_1(){
var result;
result = this.keySet;
return !result?(this.keySet = this.createKeySet()):result;
}
;
_.values_0 = function values_1(){
var result;
result = this.values;
return !result?(this.values = new Maps$Values(this)):result;
}
;
var Lcom_google_common_collect_Maps$ViewCachingAbstractMap_2_classLit = createForClass('com.google.common.collect', 'Maps/ViewCachingAbstractMap', 1719);
function $get_0(this$static, key){
var collection, k;
collection = castTo(safeGet(this$static.submap, key), 14);
if (!collection) {
return null;
}
k = key;
return this$static.this$01_1.wrapCollection(k, collection);
}
function $remove_1(this$static, key){
var collection, output;
collection = castTo(this$static.submap.remove_0(key), 14);
if (!collection) {
return null;
}
output = this$static.this$01_1.createCollection();
output.addAll(collection);
this$static.this$01_1.totalSize -= collection.size_1();
collection.clear_0();
return output;
}
function $wrapEntry(this$static, entry){
var key;
key = entry.getKey();
return new ImmutableEntry(key, this$static.this$01_1.wrapCollection(key, castTo(entry.getValue(), 14)));
}
function AbstractMapBasedMultimap$AsMap(this$0, submap){
this.this$01_1 = this$0;
this.submap = submap;
}
defineClass(286, 1719, $intern_7, AbstractMapBasedMultimap$AsMap);
_.get_2 = function get_3(key){
return $get_0(this, key);
}
;
_.remove_0 = function remove_4(key){
return $remove_1(this, key);
}
;
_.clear_0 = function clear_2(){
this.submap == this.this$01_1.map_0?this.this$01_1.clear_0():clear_19(new AbstractMapBasedMultimap$AsMap$AsMapIterator(this));
}
;
_.containsKey = function containsKey_0(key){
return safeContainsKey(this.submap, key);
}
;
_.createEntrySet_0 = function createEntrySet(){
return new AbstractMapBasedMultimap$AsMap$AsMapEntries(this);
}
;
_.createEntrySet = function(){
return this.createEntrySet_0();
}
;
_.equals_0 = function equals_6(object){
return this === object || equals_Ljava_lang_Object__Z__devirtual$(this.submap, object);
}
;
_.hashCode_1 = function hashCode_6(){
return hashCode__I__devirtual$(this.submap);
}
;
_.keySet_0 = function keySet_2(){
return this.this$01_1.keySet_0();
}
;
_.size_1 = function size_2(){
return this.submap.size_1();
}
;
_.toString_0 = function toString_7(){
return toString_38(this.submap);
}
;
var Lcom_google_common_collect_AbstractMapBasedMultimap$AsMap_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap/AsMap', 286);
function $forEach_0(this$static, action){
var t, t$iterator;
checkCriticalNotNull(action);
for (t$iterator = this$static.iterator_0(); t$iterator.hasNext_0();) {
t = t$iterator.next_1();
action.accept(t);
}
}
var Ljava_lang_Iterable_2_classLit = createForInterface('java.lang', 'Iterable');
function $addAll(this$static, c){
var changed, e, e$iterator;
checkCriticalNotNull(c);
changed = false;
for (e$iterator = c.iterator_0(); e$iterator.hasNext_0();) {
e = e$iterator.next_1();
changed = changed | this$static.add_2(e);
}
return changed;
}
function $advanceToFind(this$static, o, remove){
var e, iter;
for (iter = this$static.iterator_0(); iter.hasNext_0();) {
e = iter.next_1();
if (maskUndefined(o) === maskUndefined(e) || o != null && equals_Ljava_lang_Object__Z__devirtual$(o, e)) {
remove && iter.remove();
return true;
}
}
return false;
}
function $clear_0(this$static){
var iter;
for (iter = this$static.iterator_0(); iter.hasNext_0();) {
iter.next_1();
iter.remove();
}
}
function $containsAll(this$static, c){
var e, e$iterator;
checkCriticalNotNull(c);
for (e$iterator = c.iterator_0(); e$iterator.hasNext_0();) {
e = e$iterator.next_1();
if (!this$static.contains(e)) {
return false;
}
}
return true;
}
function $toArray(this$static){
return this$static.toArray_0(initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, this$static.size_1(), 5, 1));
}
function $toArray_0(this$static, a){
var i, it, result, size_0;
size_0 = this$static.size_1();
a.length < size_0 && (a = stampJavaTypeInfo_1(new Array(size_0), a));
result = a;
it = this$static.iterator_0();
for (i = 0; i < size_0; ++i) {
setCheck(result, i, it.next_1());
}
a.length > size_0 && setCheck(a, size_0, null);
return a;
}
function $toString_2(this$static){
var e, e$iterator, joiner;
joiner = new StringJoiner(', ', '[', ']');
for (e$iterator = this$static.iterator_0(); e$iterator.hasNext_0();) {
e = e$iterator.next_1();
$add_8(joiner, maskUndefined(e) === maskUndefined(this$static)?'(this Collection)':e == null?'null':toString_38(e));
}
return !joiner.builder?joiner.emptyValue:joiner.suffix.length == 0?joiner.builder.string:joiner.builder.string + ('' + joiner.suffix);
}
defineClass(24, 1, $intern_8);
_.forEach_0 = function forEach_0(action){
$forEach_0(this, action);
}
;
_.spliterator_0 = function spliterator_0(){
return new Spliterators$IteratorSpliterator(this, 0);
}
;
_.stream = function stream_0(){
return new StreamImpl(null, this.spliterator_0());
}
;
_.add_2 = function add_2(o){
throw toJs(new UnsupportedOperationException_0('Add not supported on this collection'));
}
;
_.addAll = function addAll(c){
return $addAll(this, c);
}
;
_.clear_0 = function clear_3(){
$clear_0(this);
}
;
_.contains = function contains(o){
return $advanceToFind(this, o, false);
}
;
_.containsAll = function containsAll(c){
return $containsAll(this, c);
}
;
_.isEmpty = function isEmpty_0(){
return this.size_1() == 0;
}
;
_.remove_1 = function remove_5(o){
return $advanceToFind(this, o, true);
}
;
_.toArray = function toArray(){
return $toArray(this);
}
;
_.toArray_0 = function toArray_0(a){
return $toArray_0(this, a);
}
;
_.toString_0 = function toString_8(){
return $toString_2(this);
}
;
var Ljava_util_AbstractCollection_2_classLit = createForClass('java.util', 'AbstractCollection', 24);
var Ljava_util_Set_2_classLit = createForInterface('java.util', 'Set');
function $equals_0(this$static, o){
var other;
if (maskUndefined(o) === maskUndefined(this$static)) {
return true;
}
if (!instanceOf(o, 20)) {
return false;
}
other = castTo(o, 20);
if (other.size_1() != this$static.size_1()) {
return false;
}
return this$static.containsAll(other);
}
function $removeAll(this$static, c){
var iter, o, o$iterator, size_0;
checkCriticalNotNull(c);
size_0 = this$static.map_0.size_1();
if (size_0 < c.size_1()) {
for (iter = this$static.map_0.keySet_0().iterator_0(); iter.hasNext_0();) {
o = iter.next_1();
c.contains(o) && iter.remove();
}
}
else {
for (o$iterator = c.iterator_0(); o$iterator.cursor != o$iterator.this$01_2.size_1();) {
o = o$iterator.doNext();
this$static.map_0.remove_0(o) != null;
}
}
return