Created
January 24, 2017 19:21
-
-
Save ailabs-software/b063e3dd27ac62e5b772accaa7d7b0c9 to your computer and use it in GitHub Desktop.
Cast error from instanceof List tried on number
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
COMPILER OUTPUT WAS: | |
var $wnd = $wnd || window.parent; | |
var __gwtModuleFunction = $wnd.ContentCentral; | |
var $sendStats = __gwtModuleFunction.__sendStats; | |
$sendStats('moduleStartup', 'moduleEvalStart'); | |
var $gwt_version = "2.8.0"; | |
var $strongName = 'F926205317C5C25D0EB7D3E6EDC87BCF'; | |
var $gwt = {}; | |
var $doc = $wnd.document; | |
var $moduleName, $moduleBase; | |
function __gwtStartLoadingFragment(frag) { | |
var fragFile = 'deferredjs/' + $strongName + '/' + frag + '.cache.js'; | |
return __gwtModuleFunction.__startLoadingFragment(fragFile); | |
} | |
function __gwtInstallCode(code) {return __gwtModuleFunction.__installRunAsyncCode(code);} | |
function __gwt_isKnownPropertyValue(propName, propValue) { | |
return __gwtModuleFunction.__gwt_isKnownPropertyValue(propName, propValue); | |
} | |
function __gwt_getMetaProperty(name) { | |
return __gwtModuleFunction.__gwt_getMetaProperty(name); | |
} | |
var $stats = $wnd.__gwtStatsEvent ? function(a) { | |
return $wnd.__gwtStatsEvent && $wnd.__gwtStatsEvent(a); | |
} : null; | |
var $sessionId = $wnd.__gwtStatsSessionId ? $wnd.__gwtStatsSessionId : null; | |
var $intern_0 = {5:1}, $intern_1 = {7:1}, $intern_2 = {5:1, 17:1}, $intern_3 = {3:1}, $intern_4 = {5:1, 4:1}, $intern_5 = {3:1, 6:1}, $intern_6 = {14: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_6(object){ | |
if (Array.isArray(object) && object.typeMarker === typeMarkerFn) { | |
return $getName(getClass__Ljava_lang_Class___devirtual$(object)) + '@' + (hashCode__I__devirtual$(object) >>> 0).toString(16); | |
} | |
return object.toString(); | |
} | |
function portableObjCreate(obj){ | |
function F(){ | |
} | |
; | |
F.prototype = obj || {}; | |
return new F; | |
} | |
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; | |
_.constructor = _; | |
!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]'; | |
} | |
); | |
} | |
bootstrap(); | |
function Object_0(){ | |
} | |
function equals_Ljava_lang_Object__Z__devirtual$(this$static, other){ | |
return instanceOfString(this$static)?$equals(this$static, other):instanceOfBoolean(this$static)?(checkCriticalNotNull(this$static) , this$static === other):hasJavaObjectVirtualDispatch(this$static)?this$static.equals_0(other):isJavaArray(this$static)?this$static === other:!!this$static && !!this$static.equals?this$static.equals(other):maskUndefined(this$static) === maskUndefined(other); | |
} | |
function getClass__Ljava_lang_Class___devirtual$(this$static){ | |
return instanceOfString(this$static)?Ljava_lang_String_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_2(this$static):instanceOfBoolean(this$static)?(checkCriticalNotNull(this$static) , this$static)?1231:1237:hasJavaObjectVirtualDispatch(this$static)?this$static.hashCode_0():isJavaArray(this$static)?getHashCode_1(this$static):!!this$static && !!this$static.hashCode?this$static.hashCode():getHashCode_1(this$static); | |
} | |
defineClass(1, null, {}, Object_0); | |
_.equals_0 = function equals(other){ | |
return this === other; | |
} | |
; | |
_.getClass_0 = function getClass_0(){ | |
return this.___clazz; | |
} | |
; | |
_.hashCode_0 = function hashCode_0(){ | |
return getHashCode_1(this); | |
} | |
; | |
_.toString_0 = function toString_0(){ | |
return $getName(getClass__Ljava_lang_Class___devirtual$(this)) + '@' + (hashCode__I__devirtual$(this) >>> 0).toString(16); | |
} | |
; | |
_.equals = function(other){ | |
return this.equals_0(other); | |
} | |
; | |
_.hashCode = function(){ | |
return this.hashCode_0(); | |
} | |
; | |
_.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 castToBoolean(src_0){ | |
checkCriticalType(src_0 == null || instanceOfBoolean(src_0)); | |
return src_0; | |
} | |
function castToJsObject(src_0){ | |
checkCriticalType(src_0 == null || isJsObject(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 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 isJsObject(src_0){ | |
return typeof src_0 === 'object' || typeof src_0 == 'function'; | |
} | |
function isJsObjectOrFunction(src_0){ | |
return typeof src_0 === 'object' || typeof src_0 === 'function'; | |
} | |
function maskUndefined(src_0){ | |
return src_0 == null?null:src_0; | |
} | |
var booleanCastMap, doubleCastMap, stringCastMap; | |
function $ensureNamesAreInitialized(this$static){ | |
if (this$static.typeName != null) { | |
return; | |
} | |
initializeNames(this$static); | |
} | |
function $getName(this$static){ | |
$ensureNamesAreInitialized(this$static); | |
return 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, enumConstantsFunc){ | |
var clazz; | |
clazz = createClassObject(packageName, compoundClassName); | |
maybeSetClassLiteral(typeId, clazz); | |
clazz.modifiers = enumConstantsFunc?8:0; | |
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; | |
var prototype_0 = prototypesByTypeId_0[typeId]; | |
return prototype_0; | |
} | |
function initializeNames(clazz){ | |
if (clazz.isArray_0()) { | |
var componentType = clazz.componentType; | |
componentType.isPrimitive()?(clazz.typeName = '[' + componentType.typeId):!componentType.isArray_0()?(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(55, 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(){ | |
$ensureNamesAreInitialized(this); | |
return this.simpleName; | |
} | |
; | |
_.isArray_0 = function isArray(){ | |
return (this.modifiers & 4) != 0; | |
} | |
; | |
_.isPrimitive = function isPrimitive(){ | |
return (this.modifiers & 1) != 0; | |
} | |
; | |
_.toString_0 = function toString_8(){ | |
return ((this.modifiers & 2) != 0?'interface ':(this.modifiers & 1) != 0?'':'class ') + ($ensureNamesAreInitialized(this) , this.typeName); | |
} | |
; | |
_.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', 55); | |
function createWrappedNativeCallback(callback){ | |
var callbackFunc = $entry(callback.apply_0.bind(callback)); | |
return callbackFunc; | |
} | |
function log_0(arg1){ | |
$wnd.console.log(arg1); | |
} | |
function $assertNotDisposed(this$static){ | |
if (this$static.disposed_) { | |
throw toJs(new Error_0('Disposable.assertNotDisposed(): Already disposed! There could be a listener leak.')); | |
} | |
} | |
function $dispose(this$static){ | |
if (!this$static.disposed_) { | |
this$static.disposed_ = true; | |
$disposeOwnedDisposables(this$static); | |
this$static.disposeInternal(); | |
} | |
} | |
function $disposeOwnedDisposables(this$static){ | |
var ownedDisposable, ownedDisposable$iterator; | |
if (this$static.ownedDisposables) { | |
for (ownedDisposable$iterator = new ArrayList$1(this$static.ownedDisposables); ownedDisposable$iterator.i < ownedDisposable$iterator.this$01.array.length;) { | |
ownedDisposable = castTo($next_0(ownedDisposable$iterator), 5); | |
ownedDisposable.dispose(); | |
} | |
} | |
} | |
function $registerDisposable(this$static, disposable){ | |
if (this$static.disposed_) { | |
$dispose(disposable); | |
} | |
else { | |
!this$static.ownedDisposables && (this$static.ownedDisposables = new ArrayList); | |
$add(this$static.ownedDisposables, disposable); | |
} | |
} | |
function Disposable(){ | |
} | |
defineClass(52, 1, $intern_0); | |
_.dispose = function dispose(){ | |
$dispose(this); | |
} | |
; | |
_.disposeInternal = function disposeInternal(){ | |
} | |
; | |
_.disposed_ = false; | |
var Lailabs_jclosure_client_disposable_Disposable_2_classLit = createForClass('ailabs.jclosure.client.disposable', 'Disposable', 52); | |
var Lcom_google_gwt_core_client_JavaScriptObject_2_classLit = createForClass('com.google.gwt.core.client', 'JavaScriptObject$', 0); | |
function $enable(this$static, cssName, enabled){ | |
enabled?(this$static.classList.add(cssName) , undefined):(this$static.classList.remove(cssName) , undefined); | |
} | |
function parseFromString(docString, type_0){ | |
return (new DOMParser).parseFromString(docString, type_0); | |
} | |
function $assertIsArray(this$static){ | |
if (!Array.isArray(this$static)) { | |
throw toJs(new Error_0('NativeObject cannot perform this operation because it is not an array.')); | |
} | |
} | |
function $getElement(this$static, index_0){ | |
$assertIsArray(this$static); | |
if (index_0 >= ($assertIsArray(this$static) , this$static['length'])) { | |
throw toJs(new Error_0('NativeObject: Element index out of bounds.')); | |
} | |
return this$static[index_0]; | |
} | |
function $getKeys_(this$static){ | |
return Object.keys(this$static); | |
} | |
function $createElement_(this$static, tagName){ | |
return this$static.createElement(tagName); | |
} | |
function $listen(this$static, eventType, handler, handlerMethod){ | |
var listenerHandle; | |
++listenerCountEstimate_; | |
listenerHandle = new EventTarget$ListenerHandle(this$static, eventType, handlerMethod); | |
$registerDisposable(handler, listenerHandle); | |
this$static.listenImpl(eventType, listenerHandle, false); | |
return listenerHandle; | |
} | |
function EventTarget_0(){ | |
Disposable.call(this); | |
} | |
defineClass(51, 52, $intern_0); | |
var listenerCountEstimate_ = 0; | |
var Lailabs_jclosure_client_events_EventTarget_2_classLit = createForClass('ailabs.jclosure.client.events', 'EventTarget', 51); | |
function $appendChild(this$static, element){ | |
var parentNode = this$static.wrappedDomContext; | |
var childNode = element.wrappedDomContext; | |
parentNode.appendChild(childNode); | |
} | |
function $getAttribute(this$static, name_0){ | |
var wrappedDomContext = this$static.wrappedDomContext; | |
return wrappedDomContext.getAttribute(name_0); | |
} | |
function $listenImpl_(this$static, eventType, nativeCallback, capturing){ | |
var wrappedDomContext = this$static.wrappedDomContext; | |
wrappedDomContext.addEventListener(eventType, nativeCallback, capturing); | |
} | |
function $querySelector_(this$static, query){ | |
var wrappedDomContext = this$static.wrappedDomContext; | |
return wrappedDomContext.querySelector(query); | |
} | |
function $removeChild(this$static, element){ | |
var parentNode = this$static.wrappedDomContext; | |
var childNode = element.wrappedDomContext; | |
parentNode.removeChild(childNode); | |
} | |
function $setAttribute(this$static, name_0, value_0){ | |
var wrappedDomContext = this$static.wrappedDomContext; | |
wrappedDomContext.setAttribute(name_0, value_0); | |
} | |
function $setTextContent(this$static, textContent){ | |
this$static.wrappedDomContext['textContent'] = textContent; | |
} | |
function $unlistenImpl_(this$static, eventType, nativeCallback, capturing){ | |
var wrappedDomContext = this$static.wrappedDomContext; | |
wrappedDomContext.removeEventListener(eventType, nativeCallback, capturing); | |
} | |
function Element_0(){ | |
EventTarget_0.call(this); | |
} | |
defineClass(45, 51, $intern_0, Element_0); | |
_.listenImpl = function listenImpl(eventType, listenerHandle, capturing){ | |
listenerHandle.nativeCallback_ = createWrappedNativeCallback(new Element$0methodref$proxyMethod$Type(listenerHandle)); | |
$listenImpl_(this, $toExternalValue(eventType), listenerHandle.nativeCallback_, capturing); | |
} | |
; | |
_.unlistenImpl = function unlistenImpl(eventType, listenerHandle, capturing){ | |
$unlistenImpl_(this, $toExternalValue(eventType), listenerHandle.nativeCallback_, capturing); | |
} | |
; | |
var Lailabs_jclosure_client_dom_Element_2_classLit = createForClass('ailabs.jclosure.client.dom', 'Element', 45); | |
function Element$0methodref$proxyMethod$Type($$outer_0){ | |
this.$$outer_0 = $$outer_0; | |
} | |
defineClass(82, 1, $intern_1, Element$0methodref$proxyMethod$Type); | |
_.apply_0 = function apply_0(){ | |
$proxyMethod(this.$$outer_0); | |
} | |
; | |
var Lailabs_jclosure_client_dom_Element$0methodref$proxyMethod$Type_2_classLit = createForClass('ailabs.jclosure.client.dom', 'Element/0methodref$proxyMethod$Type', 82); | |
function wrapDomNode(domContext){ | |
var newElement; | |
if (!domContext) { | |
return null; | |
} | |
switch (domContext['tagName']) { | |
case 'TABLE': | |
newElement = new TableElement; | |
break; | |
case 'INPUT': | |
newElement = new InputElement; | |
break; | |
case 'TEXTAREA': | |
newElement = new TextareaElement; | |
break; | |
case 'SELECT': | |
newElement = new SelectElement; | |
break; | |
default:newElement = new Element_0; | |
} | |
newElement.wrappedDomContext = domContext; | |
return newElement; | |
} | |
function $get(this$static, index_0){ | |
var elem, nativeList; | |
if (!(elem = wrapDomNode((nativeList = this$static.nativeList , nativeList[index_0])))) { | |
throw toJs(new ArrayIndexOutOfBoundsException); | |
} | |
return elem; | |
} | |
function $get_(this$static, index_0){ | |
var nativeList = this$static.nativeList; | |
return nativeList[index_0]; | |
} | |
function ElementList(nativeList){ | |
this.nativeList = nativeList; | |
} | |
defineClass(40, 1, {}, ElementList); | |
_.iterator = function iterator_0(){ | |
return new ListIteratorImpl(this); | |
} | |
; | |
var Lailabs_jclosure_client_dom_ElementList_2_classLit = createForClass('ailabs.jclosure.client.dom', 'ElementList', 40); | |
function $alert(this$static, message){ | |
this$static.alert(message); | |
} | |
function $setValue(this$static, value_0){ | |
this$static.wrappedDomContext['value'] = value_0; | |
} | |
function AbstractInputElement(){ | |
Element_0.call(this); | |
} | |
defineClass(17, 45, $intern_2); | |
var Lailabs_jclosure_client_dom_elements_AbstractInputElement_2_classLit = createForClass('ailabs.jclosure.client.dom.elements', 'AbstractInputElement', 17); | |
function $setChecked(this$static, checked){ | |
this$static.wrappedDomContext['checked'] = checked; | |
} | |
function InputElement(){ | |
AbstractInputElement.call(this); | |
} | |
defineClass(19, 17, {5:1, 17:1, 19:1}, InputElement); | |
var Lailabs_jclosure_client_dom_elements_InputElement_2_classLit = createForClass('ailabs.jclosure.client.dom.elements', 'InputElement', 19); | |
function SelectElement(){ | |
AbstractInputElement.call(this); | |
} | |
defineClass(101, 17, $intern_2, SelectElement); | |
var Lailabs_jclosure_client_dom_elements_SelectElement_2_classLit = createForClass('ailabs.jclosure.client.dom.elements', 'SelectElement', 101); | |
function TableElement(){ | |
Element_0.call(this); | |
} | |
defineClass(47, 45, {5:1, 47:1}, TableElement); | |
var Lailabs_jclosure_client_dom_elements_TableElement_2_classLit = createForClass('ailabs.jclosure.client.dom.elements', 'TableElement', 47); | |
function TextareaElement(){ | |
AbstractInputElement.call(this); | |
} | |
defineClass(100, 17, $intern_2, TextareaElement); | |
var Lailabs_jclosure_client_dom_elements_TextareaElement_2_classLit = createForClass('ailabs.jclosure.client.dom.elements', 'TextareaElement', 100); | |
function deserialize(buf, reviveJavaTypes){ | |
var reviverFunc = null; | |
reviveJavaTypes && (reviverFunc = reviverFunc_0); | |
return $wnd.JSON.parse(buf, reviverFunc); | |
} | |
function replacerFunc(key, obj){ | |
log_0('BEFORE ERRR'); | |
log_0(key); | |
log_0(obj); | |
log_0(($clinit_Boolean() , instanceOf(obj, 12)?true:false)); | |
log_0('AFTER ERRR'); | |
return instanceOf(obj, 12)?castTo(obj, 12).toArray():obj; | |
} | |
function reviverFunc_0(key, obj){ | |
var arrayList, i, size_0; | |
if (Array.isArray(obj)) { | |
arrayList = new ArrayList; | |
size_0 = ($assertIsArray(obj) , obj['length']); | |
for (i = 0; i < size_0; i++) { | |
$add(arrayList, $getElement(obj, i)); | |
} | |
return arrayList; | |
} | |
else { | |
return obj; | |
} | |
} | |
function serialize(obj){ | |
return $wnd.JSON.stringify(obj, replacerFunc); | |
} | |
function $proxyMethod(this$static){ | |
var handlerMethod_; | |
$assertNotDisposed(this$static); | |
handlerMethod_ = this$static.handlerMethod; | |
this$static.callOnce && $dispose(this$static); | |
handlerMethod_.apply_0(); | |
} | |
function EventTarget$ListenerHandle(eventTarget, eventType, handlerMethod){ | |
Disposable.call(this); | |
this.eventTarget = eventTarget; | |
this.eventType = eventType; | |
this.handlerMethod = handlerMethod; | |
this.capturing = false; | |
this.callOnce = false; | |
} | |
defineClass(41, 52, {5:1, 41:1}, EventTarget$ListenerHandle); | |
_.disposeInternal = function disposeInternal_0(){ | |
this.eventTarget.unlistenImpl(this.eventType, this, this.capturing); | |
this.handlerMethod = null; | |
--listenerCountEstimate_; | |
} | |
; | |
_.callOnce = false; | |
_.capturing = false; | |
var Lailabs_jclosure_client_events_EventTarget$ListenerHandle_2_classLit = createForClass('ailabs.jclosure.client.events', 'EventTarget/ListenerHandle', 41); | |
function $clinit_EventType(){ | |
$clinit_EventType = emptyMethod; | |
CLICK = new EventType('click'); | |
KEYUP = new EventType('keyup'); | |
BLUR = new EventType('blur'); | |
FOCUS = new EventType('focus'); | |
CHANGE = new EventType('change'); | |
ACTION = new EventType(null); | |
DONE = new EventType(null); | |
COMPLETE = new EventType(null); | |
} | |
function $toExternalValue(this$static){ | |
if (this$static.stringValue == null) { | |
throw toJs(new Error_0('Cannot get external value for a synthetic EventType.')); | |
} | |
return this$static.stringValue; | |
} | |
function EventType(stringValue){ | |
this.stringValue = stringValue; | |
} | |
defineClass(18, 1, {}, EventType); | |
var ACTION, BLUR, CHANGE, CLICK, COMPLETE, DONE, FOCUS, KEYUP; | |
var Lailabs_jclosure_client_events_EventType_2_classLit = createForClass('ailabs.jclosure.client.events', 'EventType', 18); | |
function $acquireListenerSpace(this$static, eventType){ | |
var listenerSpace; | |
if ($containsKey(this$static.eventsMap, eventType)) { | |
listenerSpace = castTo($get_0(this$static.eventsMap, eventType), 12); | |
} | |
else { | |
listenerSpace = new ArrayList; | |
$put(this$static.eventsMap, eventType, listenerSpace); | |
} | |
return listenerSpace; | |
} | |
function $dispatchEvent(this$static, eventType){ | |
var listener, listener$iterator, listenerSpace; | |
listenerSpace = $acquireListenerSpace(this$static, eventType); | |
listenerSpace = new ArrayList_0(listenerSpace); | |
for (listener$iterator = listenerSpace.iterator(); listener$iterator.hasNext_0();) { | |
listener = castTo(listener$iterator.next_0(), 41); | |
$proxyMethod(listener); | |
} | |
} | |
function SyntheticEventTarget(){ | |
EventTarget_0.call(this); | |
this.eventsMap = new HashMap; | |
} | |
defineClass(34, 51, $intern_0); | |
_.listenImpl = function listenImpl_0(eventType, listenerHandle, capturing){ | |
var listenerSpace; | |
listenerSpace = $acquireListenerSpace(this, eventType); | |
listenerSpace.add_0(listenerHandle); | |
} | |
; | |
_.unlistenImpl = function unlistenImpl_0(eventType, listenerHandle, capturing){ | |
var listenerSpace; | |
listenerSpace = $acquireListenerSpace(this, eventType); | |
listenerSpace.remove_1(listenerHandle); | |
listenerSpace.isEmpty() && $remove(this.eventsMap, eventType); | |
} | |
; | |
var Lailabs_jclosure_client_events_SyntheticEventTarget_2_classLit = createForClass('ailabs.jclosure.client.events', 'SyntheticEventTarget', 34); | |
function Enum(name_0, ordinal){ | |
this.name_0 = name_0; | |
this.ordinal = ordinal; | |
} | |
defineClass(16, 1, {3:1, 21:1, 16:1}); | |
_.equals_0 = function equals_0(other){ | |
return this === other; | |
} | |
; | |
_.hashCode_0 = function hashCode_1(){ | |
return getHashCode_1(this); | |
} | |
; | |
_.toString_0 = function toString_1(){ | |
return this.name_0 != null?this.name_0:'' + this.ordinal; | |
} | |
; | |
_.ordinal = 0; | |
var Ljava_lang_Enum_2_classLit = createForClass('java.lang', 'Enum', 16); | |
function $clinit_HttpMethod(){ | |
$clinit_HttpMethod = emptyMethod; | |
GET = new HttpMethod('GET', 0); | |
POST = new HttpMethod('POST', 1); | |
PUT = new HttpMethod('PUT', 2); | |
DELETE = new HttpMethod('DELETE', 3); | |
} | |
function HttpMethod(enum$name, enum$ordinal){ | |
Enum.call(this, enum$name, enum$ordinal); | |
} | |
function values_0(){ | |
$clinit_HttpMethod(); | |
return stampJavaTypeInfo(getClassLiteralForArray(Lailabs_jclosure_client_net_HttpMethod_2_classLit, 1), $intern_3, 25, 0, [GET, POST, PUT, DELETE]); | |
} | |
defineClass(25, 16, {25:1, 3:1, 21:1, 16:1}, HttpMethod); | |
var DELETE, GET, POST, PUT; | |
var Lailabs_jclosure_client_net_HttpMethod_2_classLit = createForEnum('ailabs.jclosure.client.net', 'HttpMethod', 25, values_0); | |
function isSuccess(status_0){ | |
switch (status_0) { | |
case 200: | |
case 201: | |
case 202: | |
case 204: | |
case 206: | |
case 304: | |
case 1223: | |
return true; | |
default:return false; | |
} | |
} | |
function $getResponseText(this$static){ | |
if (this$static.xmlHttpImpl.readyState != READYSTATE_DONE) { | |
throw toJs(new Error_0('getResponseText(): Not ready yet!')); | |
} | |
return this$static.xmlHttpImpl.responseText; | |
} | |
function $handleReadyStateChange(this$static){ | |
if (this$static.xmlHttpImpl.readyState == READYSTATE_DONE) { | |
$dispatchEvent(this$static, ($clinit_EventType() , DONE)); | |
isSuccess(this$static.xmlHttpImpl.status) && $dispatchEvent(this$static, COMPLETE); | |
} | |
} | |
function $open(this$static, method, url_0){ | |
$open_0(this$static.xmlHttpImpl, method.name_0 != null?method.name_0:'' + method.ordinal, url_0); | |
} | |
function $send(this$static, requestBody){ | |
$send_0(this$static.xmlHttpImpl, requestBody); | |
} | |
function XMLHttpRequest_0(){ | |
SyntheticEventTarget.call(this); | |
this.xmlHttpImpl = new $wnd.XMLHttpRequest; | |
$setReadyStateChangeCallback(this.xmlHttpImpl, createWrappedNativeCallback(new XMLHttpRequest$0methodref$handleReadyStateChange$Type(this))); | |
} | |
defineClass(71, 34, $intern_0, XMLHttpRequest_0); | |
var READYSTATE_DONE = 4; | |
var Lailabs_jclosure_client_net_XMLHttpRequest_2_classLit = createForClass('ailabs.jclosure.client.net', 'XMLHttpRequest', 71); | |
function XMLHttpRequest$0methodref$handleReadyStateChange$Type($$outer_0){ | |
this.$$outer_0 = $$outer_0; | |
} | |
defineClass(136, 1, $intern_1, XMLHttpRequest$0methodref$handleReadyStateChange$Type); | |
_.apply_0 = function apply_1(){ | |
$handleReadyStateChange(this.$$outer_0); | |
} | |
; | |
var Lailabs_jclosure_client_net_XMLHttpRequest$0methodref$handleReadyStateChange$Type_2_classLit = createForClass('ailabs.jclosure.client.net', 'XMLHttpRequest/0methodref$handleReadyStateChange$Type', 136); | |
function $open_0(this$static, method, url_0){ | |
this$static.open(method, url_0); | |
} | |
function $send_0(this$static, requestBody){ | |
this$static.send(requestBody); | |
} | |
function $setReadyStateChangeCallback(this$static, callback){ | |
this$static.onreadystatechange = callback; | |
} | |
var DOMAIN = 3, FRAGMENT = 7, PATH = 5, PORT = 4, QUERY_DATA = 6, SCHEME = 1, USER_INFO = 2; | |
function $addValue(this$static, name_0, value_0){ | |
var nspace; | |
this$static.encodedQuery_ = null; | |
value_0 = ($clinit_StringUtil() , value_0 != null && value_0.length != 0?value_0:null); | |
if (value_0 != null) { | |
if ($hasStringValue(this$static.map_0, name_0)) { | |
nspace = castTo($getStringValue(this$static.map_0, name_0), 12); | |
} | |
else { | |
nspace = new ArrayList; | |
$putStringValue(this$static.map_0, name_0, nspace); | |
} | |
nspace.add_0(value_0); | |
} | |
} | |
function $clearValues(this$static){ | |
this$static.encodedQuery_ = null; | |
$removeStringValue(this$static.map_0, 'url'); | |
} | |
function $parseQString(this$static, encodedQuery){ | |
var i, indexOfEquals, name_0, pairs, value_0; | |
pairs = $split(encodedQuery, '&'); | |
for (i = 0; i < pairs.length; i++) { | |
indexOfEquals = pairs[i].indexOf('='); | |
value_0 = null; | |
if (indexOfEquals >= 0) { | |
name_0 = pairs[i].substr(0, indexOfEquals - 0); | |
value_0 = pairs[i].substr(indexOfEquals + 1, pairs[i].length - (indexOfEquals + 1)); | |
} | |
else { | |
name_0 = pairs[i]; | |
} | |
value_0 != null && value_0.length != 0 && $addValue(this$static, name_0, value_0); | |
} | |
} | |
function $toString(this$static){ | |
var encodedKey, entry, j, key, key$iterator, outerIter, param, sj, val; | |
if (this$static.encodedQuery_ != null) { | |
return this$static.encodedQuery_; | |
} | |
sj = new StringJoiner('&'); | |
for (key$iterator = (outerIter = new AbstractHashMap$EntrySetIterator((new AbstractHashMap$EntrySet((new AbstractMap$1(this$static.map_0)).this$01)).this$01) , new AbstractMap$1$1(outerIter)); key$iterator.val$outerIter2.hasNext;) { | |
key = (entry = $next(key$iterator.val$outerIter2) , castToString(entry.getKey())); | |
encodedKey = ($clinit_StringUtil() , key != null?urlEncode_(key):null); | |
val = castTo($getStringValue(this$static.map_0, key), 12); | |
for (j = 0; j < val.size_1(); j++) { | |
param = encodedKey; | |
param += '=' + urlEncode(castToString(val.get_1(j))); | |
!sj.builder?(sj.builder = new StringBuilder_0(sj.prefix)):$append_1(sj.builder, sj.delimiter); | |
$append(sj.builder, param); | |
} | |
} | |
return this$static.encodedQuery_ = !sj.builder?sj.emptyValue:sj.suffix.length == 0?sj.builder.string:sj.builder.string + ('' + sj.suffix); | |
} | |
function QueryData(){ | |
this.map_0 = new HashMap; | |
} | |
defineClass(70, 1, {}, QueryData); | |
_.toString_0 = function toString_2(){ | |
return $toString(this); | |
} | |
; | |
var Lailabs_jclosure_client_net_uri_QueryData_2_classLit = createForClass('ailabs.jclosure.client.net.uri', 'QueryData', 70); | |
function $clinit_URI(){ | |
$clinit_URI = emptyMethod; | |
splitRe_ = new RegExp('^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$'); | |
reDisallowedInSchemeOrUserInfo_ = new RegExp('[#\\/\\?@]', 'g'); | |
reDisallowedInRelativePath_ = new RegExp('[\\#\\?:]', 'g'); | |
reDisallowedInAbsolutePath_ = new RegExp('[\\#\\?]', 'g'); | |
reDisallowedInFragment_ = new RegExp('#', 'g'); | |
} | |
function $decodeComponent(componentPart){ | |
return $clinit_StringUtil() , componentPart != null?decodeURIComponent(componentPart.replace(/\+/g, ' ')):null; | |
} | |
function $enforceReadOnly(this$static){ | |
if (this$static.isReadOnly_) { | |
throw toJs(new Error_0('Tried to modify a read-only Uri')); | |
} | |
} | |
function $parse(this$static, uriString){ | |
var componentParts; | |
componentParts = $exec(splitRe_, uriString); | |
$setScheme(this$static, $decodeComponent(componentParts[SCHEME])); | |
$setUserInfo(this$static, $decodeComponent(componentParts[USER_INFO])); | |
$setDomain(this$static, $decodeComponent(componentParts[DOMAIN])); | |
$setPort_0(this$static, $decodeComponent(componentParts[PORT])); | |
$setPath(this$static, $decodeComponent(componentParts[PATH])); | |
$setQuery(this$static, $decodeComponent(componentParts[QUERY_DATA])); | |
$setFragment(this$static, $decodeComponent(componentParts[FRAGMENT])); | |
} | |
function $resolve(this$static, relativeUri){ | |
var absoluteUri, lastSlashIndex, overridden, path, clonedUri; | |
absoluteUri = (clonedUri = new URI , $setScheme(clonedUri, this$static.scheme_) , $setUserInfo(clonedUri, this$static.userInfo_) , $setDomain(clonedUri, this$static.domain_) , $setPort(clonedUri, this$static.port_) , $setPath(clonedUri, this$static.path_) , $setQuery(clonedUri, !!this$static.queryData_ && $size(this$static.queryData_.map_0) != 0?$toString(this$static.queryData_):null) , $setFragment(clonedUri, this$static.fragment_) , clonedUri); | |
overridden = relativeUri.scheme_ != null; | |
overridden?$setScheme(absoluteUri, relativeUri.scheme_):(overridden = relativeUri.userInfo_ != null); | |
overridden?$setUserInfo(absoluteUri, relativeUri.userInfo_):(overridden = relativeUri.domain_ != null); | |
overridden?$setDomain(absoluteUri, relativeUri.domain_):(overridden = !!relativeUri.port_); | |
path = relativeUri.path_; | |
if (overridden) { | |
$setPort(absoluteUri, relativeUri.port_); | |
} | |
else { | |
overridden = relativeUri.path_ != null; | |
if (overridden) { | |
if (path.charCodeAt(0) != 47) { | |
if (this$static.domain_ != null && this$static.path_ == null) { | |
path = '/' + path; | |
} | |
else { | |
lastSlashIndex = absoluteUri.path_.lastIndexOf('/'); | |
lastSlashIndex != -1 && (path = $substring(absoluteUri.path_, 0, lastSlashIndex + 1) + ('' + path)); | |
} | |
} | |
path = removeDotSegments(path); | |
} | |
} | |
overridden?($enforceReadOnly(absoluteUri) , absoluteUri.path_ = ($clinit_StringUtil() , path != null && path.length != 0?path:null)):(overridden = !!relativeUri.queryData_ && $size(relativeUri.queryData_.map_0) != 0); | |
overridden?$setQuery(absoluteUri, !!relativeUri.queryData_ && $size(relativeUri.queryData_.map_0) != 0?$toString(relativeUri.queryData_):null):(overridden = relativeUri.fragment_ != null); | |
overridden && $setFragment(absoluteUri, relativeUri.fragment_); | |
return absoluteUri; | |
} | |
function $setDomain(this$static, newDomain){ | |
$enforceReadOnly(this$static); | |
this$static.domain_ = ($clinit_StringUtil() , newDomain != null && newDomain.length != 0?newDomain:null); | |
} | |
function $setFragment(this$static, newFragment){ | |
$enforceReadOnly(this$static); | |
this$static.fragment_ = ($clinit_StringUtil() , newFragment != null && newFragment.length != 0?newFragment:null); | |
} | |
function $setPath(this$static, newPath){ | |
$enforceReadOnly(this$static); | |
this$static.path_ = ($clinit_StringUtil() , newPath != null && newPath.length != 0?newPath:null); | |
} | |
function $setPort(this$static, newPort){ | |
$enforceReadOnly(this$static); | |
this$static.port_ = newPort; | |
} | |
function $setPort_0(this$static, newPort){ | |
newPort = ($clinit_StringUtil() , newPort != null && newPort.length != 0?newPort:null); | |
newPort != null?$setPort(this$static, valueOf(__parseAndValidateInt(newPort))):($enforceReadOnly(this$static) , this$static.port_ = null); | |
} | |
function $setQuery(this$static, queryDataStr){ | |
$enforceReadOnly(this$static); | |
queryDataStr = ($clinit_StringUtil() , queryDataStr != null && queryDataStr.length != 0?queryDataStr:null); | |
this$static.queryData_ = null; | |
if (queryDataStr != null) { | |
this$static.queryData_ = new QueryData; | |
$parseQString(this$static.queryData_, queryDataStr); | |
} | |
} | |
function $setScheme(this$static, newScheme){ | |
$enforceReadOnly(this$static); | |
this$static.scheme_ = ($clinit_StringUtil() , newScheme != null && newScheme.length != 0?newScheme:null); | |
} | |
function $setUserInfo(this$static, newUserInfo){ | |
$enforceReadOnly(this$static); | |
this$static.userInfo_ = ($clinit_StringUtil() , newUserInfo != null && newUserInfo.length != 0?newUserInfo:null); | |
} | |
function $toString_0(this$static){ | |
var path, sb; | |
sb = new StringBuilder; | |
if (this$static.scheme_ != null) { | |
$append_1(sb, encodeSpecialChars(this$static.scheme_, reDisallowedInSchemeOrUserInfo_, true)); | |
sb.string += ':'; | |
} | |
if (this$static.domain_ != null || this$static.scheme_ == 'file') { | |
sb.string += '//'; | |
if (this$static.userInfo_ != null) { | |
$append_1(sb, encodeSpecialChars(this$static.userInfo_, reDisallowedInSchemeOrUserInfo_, true)); | |
sb.string += '@'; | |
} | |
$append_1(sb, removeDoubleEncoding_0(urlEncode(this$static.domain_))); | |
if (this$static.port_) { | |
sb.string += ':'; | |
$append_0(sb, this$static.port_); | |
} | |
} | |
if (this$static.path_ != null) { | |
path = this$static.path_; | |
this$static.domain_ != null && path.charCodeAt(0) != 47 && (sb.string += '/' , sb); | |
$append_1(sb, encodeSpecialChars(path, path.charCodeAt(0) == 47?reDisallowedInAbsolutePath_:reDisallowedInRelativePath_, true)); | |
} | |
if (!!this$static.queryData_ && $size(this$static.queryData_.map_0) != 0) { | |
sb.string += '?'; | |
$append_1(sb, !!this$static.queryData_ && $size(this$static.queryData_.map_0) != 0?$toString(this$static.queryData_):null); | |
} | |
if (this$static.fragment_ != null) { | |
sb.string += '#'; | |
$append_1(sb, encodeSpecialChars(this$static.fragment_, reDisallowedInFragment_, false)); | |
} | |
return sb.string; | |
} | |
function URI(){ | |
$clinit_URI(); | |
} | |
function URI_0(uriString){ | |
$clinit_URI(); | |
$parse(this, uriString); | |
} | |
function encodeSpecialChars(unescapedPart, extra, removeDoubleEncoding){ | |
var encoded, regExp; | |
encoded = $replace(extra, ($clinit_StringUtil() , encodeURI(unescapedPart.replace(/\+/g, ' '))), new URI$0methodref$encodeChar$Type); | |
removeDoubleEncoding && (encoded = (regExp = new RegExp('%25([0-9a-fA-F]{2})', 'g') , encoded.replace(regExp, '%$1'))); | |
return encoded; | |
} | |
function removeDotSegments(path){ | |
var leadingSlash, out, pos, segment, segments; | |
if ($equals(path, '..') || $equals(path, '.')) { | |
return ''; | |
} | |
else if (path.indexOf('./') == -1 && path.indexOf('/.') == -1) { | |
return path; | |
} | |
else { | |
leadingSlash = $equals(path.substr(0, 1), '/'); | |
segments = $split(path, '/'); | |
out = new ArrayList; | |
for (pos = 0; pos < segments.length;) { | |
segment = segments[pos++]; | |
if ($equals(segment, '.')) { | |
leadingSlash && pos == segments.length && (out.array[out.array.length] = '' , true); | |
} | |
else if ($equals(segment, '..')) { | |
(out.array.length > 1 || out.array.length == 1 && !$equals((checkCriticalElementIndex(0, out.array.length) , castToString(out.array[0])), '')) && $remove_1(out, out.array.length - 1); | |
leadingSlash && pos == segments.length && (out.array[out.array.length] = '' , true); | |
} | |
else { | |
out.array[out.array.length] = segment; | |
leadingSlash = true; | |
} | |
} | |
return join_1(out); | |
} | |
} | |
function removeDoubleEncoding_0(doubleEncodedString){ | |
var regExp; | |
regExp = new RegExp('%25([0-9a-fA-F]{2})', 'g'); | |
return doubleEncodedString.replace(regExp, '%$1'); | |
} | |
defineClass(33, 1, {}, URI, URI_0); | |
_.toString_0 = function toString_3(){ | |
return $toString_0(this); | |
} | |
; | |
_.isReadOnly_ = false; | |
var reDisallowedInAbsolutePath_, reDisallowedInFragment_, reDisallowedInRelativePath_, reDisallowedInSchemeOrUserInfo_, splitRe_; | |
var Lailabs_jclosure_client_net_uri_URI_2_classLit = createForClass('ailabs.jclosure.client.net.uri', 'URI', 33); | |
function URI$0methodref$encodeChar$Type(){ | |
} | |
defineClass(130, 1, {}, URI$0methodref$encodeChar$Type); | |
var Lailabs_jclosure_client_net_uri_URI$0methodref$encodeChar$Type_2_classLit = createForClass('ailabs.jclosure.client.net.uri', 'URI/0methodref$encodeChar$Type', 130); | |
function $exec(this$static, input_0){ | |
return this$static.exec(input_0); | |
} | |
function $replace(this$static, input_0, replaceCallback){ | |
return input_0.replace(this$static, replaceCallback); | |
} | |
function $clinit_StringUtil(){ | |
$clinit_StringUtil = emptyMethod; | |
new RegExp('[\\x00&<>"\']'); | |
new RegExp('&', 'g'); | |
new RegExp('<', 'g'); | |
new RegExp('>', 'g'); | |
new RegExp('"', 'g'); | |
new RegExp("'", 'g'); | |
new RegExp('\\x00', 'g'); | |
} | |
function urlEncode(str){ | |
$clinit_StringUtil(); | |
return str != null?urlEncode_(str):null; | |
} | |
function urlEncode_(str){ | |
$clinit_StringUtil(); | |
return encodeURIComponent(String(str)); | |
} | |
function $remove_4(){ | |
throw toJs(new UnsupportedOperationException); | |
} | |
function ListIteratorImpl(list){ | |
this.list_0 = list; | |
} | |
defineClass(69, 1, {}, ListIteratorImpl); | |
_.remove_0 = function remove_0(){ | |
$remove_4(); | |
} | |
; | |
_.hasNext_0 = function hasNext(){ | |
var nativeList; | |
return this.index_0 < (nativeList = this.list_0.nativeList , nativeList.length) - 1; | |
} | |
; | |
_.next_0 = function next(){ | |
return $get(this.list_0, this.index_0++); | |
} | |
; | |
_.index_0 = 0; | |
var Lailabs_jclosure_client_structs_ListIteratorImpl_2_classLit = createForClass('ailabs.jclosure.client.structs', 'ListIteratorImpl', 69); | |
function $clinit_LengthUnitType(){ | |
$clinit_LengthUnitType = emptyMethod; | |
PX = new LengthUnitType('PX', 0); | |
PCT = new LengthUnitType('PCT', 1); | |
EM = new LengthUnitType('EM', 2); | |
EX = new LengthUnitType('EX', 3); | |
PT = new LengthUnitType('PT', 4); | |
PC = new LengthUnitType('PC', 5); | |
IN = new LengthUnitType('IN', 6); | |
CM = new LengthUnitType('CM', 7); | |
MM = new LengthUnitType('MM', 8); | |
VH = new LengthUnitType('VH', 9); | |
VW = new LengthUnitType('VW', 10); | |
} | |
function LengthUnitType(enum$name, enum$ordinal){ | |
Enum.call(this, enum$name, enum$ordinal); | |
} | |
function values_1(){ | |
$clinit_LengthUnitType(); | |
return stampJavaTypeInfo(getClassLiteralForArray(Lailabs_jclosure_client_style_LengthUnitType_2_classLit, 1), $intern_3, 11, 0, [PX, PCT, EM, EX, PT, PC, IN, CM, MM, VH, VW]); | |
} | |
defineClass(11, 16, {11:1, 3:1, 21:1, 16:1}, LengthUnitType); | |
var CM, EM, EX, IN, MM, PC, PCT, PT, PX, VH, VW; | |
var Lailabs_jclosure_client_style_LengthUnitType_2_classLit = createForEnum('ailabs.jclosure.client.style', 'LengthUnitType', 11, values_1); | |
function $toString_1(this$static){ | |
if (!this$static.unit_) { | |
return null; | |
} | |
return '' + this$static.value_ + lengthUnitTypeToString(this$static.unit_); | |
} | |
function LengthValue(unit, value_0){ | |
this.unit_ = unit; | |
this.value_ = value_0; | |
} | |
function lengthUnitTypeToString(unit){ | |
switch (unit.ordinal) { | |
case 0: | |
return 'px'; | |
case 1: | |
return '%'; | |
case 2: | |
return 'em'; | |
case 3: | |
return 'ex'; | |
case 4: | |
return 'pt'; | |
case 5: | |
return 'pc'; | |
case 6: | |
return 'in'; | |
case 7: | |
return 'cm'; | |
case 8: | |
return 'mm'; | |
case 9: | |
return 'vh'; | |
case 10: | |
return 'vw'; | |
} | |
throw toJs(new Error_0('Bad value for LengthUnitType.')); | |
} | |
defineClass(31, 1, {}, LengthValue); | |
_.toString_0 = function toString_4(){ | |
return $toString_1(this); | |
} | |
; | |
_.value_ = 0; | |
var Lailabs_jclosure_client_style_LengthValue_2_classLit = createForClass('ailabs.jclosure.client.style', 'LengthValue', 31); | |
function $clinit_PositionType(){ | |
$clinit_PositionType = emptyMethod; | |
STATIC = new PositionType('STATIC', 0); | |
RELATIVE = new PositionType('RELATIVE', 1); | |
ABSOLUTE = new PositionType('ABSOLUTE', 2); | |
FIXED = new PositionType('FIXED', 3); | |
} | |
function PositionType(enum$name, enum$ordinal){ | |
Enum.call(this, enum$name, enum$ordinal); | |
} | |
function values_2(){ | |
$clinit_PositionType(); | |
return stampJavaTypeInfo(getClassLiteralForArray(Lailabs_jclosure_client_style_PositionType_2_classLit, 1), $intern_3, 24, 0, [STATIC, RELATIVE, ABSOLUTE, FIXED]); | |
} | |
defineClass(24, 16, {24:1, 3:1, 21:1, 16:1}, PositionType); | |
var ABSOLUTE, FIXED, RELATIVE, STATIC; | |
var Lailabs_jclosure_client_style_PositionType_2_classLit = createForEnum('ailabs.jclosure.client.style', 'PositionType', 24, values_2); | |
function $clinit_VerticalAlignmentType(){ | |
$clinit_VerticalAlignmentType = emptyMethod; | |
TOP = new VerticalAlignmentType('TOP', 0); | |
MIDDLE = new VerticalAlignmentType('MIDDLE', 1); | |
BOTTOM = new VerticalAlignmentType('BOTTOM', 2); | |
} | |
function VerticalAlignmentType(enum$name, enum$ordinal){ | |
Enum.call(this, enum$name, enum$ordinal); | |
} | |
function values_3(){ | |
$clinit_VerticalAlignmentType(); | |
return stampJavaTypeInfo(getClassLiteralForArray(Lailabs_jclosure_client_style_VerticalAlignmentType_2_classLit, 1), $intern_3, 32, 0, [TOP, MIDDLE, BOTTOM]); | |
} | |
defineClass(32, 16, {32:1, 3:1, 21:1, 16:1}, VerticalAlignmentType); | |
var BOTTOM, MIDDLE, TOP; | |
var Lailabs_jclosure_client_style_VerticalAlignmentType_2_classLit = createForEnum('ailabs.jclosure.client.style', 'VerticalAlignmentType', 32, values_3); | |
function $addChild(this$static, child){ | |
$registerDisposable(this$static, child); | |
$render(child, $getElement_0(this$static)); | |
} | |
function $getElement_0(this$static){ | |
if (this$static.element) { | |
return this$static.element; | |
} | |
else { | |
throw toJs(new Error_0('Can not call getElement() before rendering.')); | |
} | |
} | |
function $render(this$static, parentElement){ | |
if (this$static.inDocument_) { | |
throw toJs(new Error_0('Component already rendered')); | |
} | |
this$static.inDocument_ = true; | |
!this$static.element && this$static.createDom(); | |
$appendChild(parentElement, this$static.element); | |
} | |
function $setCssName(classList){ | |
classList.classList.add('goog-component'); | |
} | |
function $setElementInternal(this$static, element){ | |
this$static.element = element; | |
} | |
function $setTextContent_0(this$static, textContent){ | |
!this$static.element && this$static.createDom(); | |
$setTextContent(this$static.getContentElement(), textContent); | |
} | |
function Component(){ | |
SyntheticEventTarget.call(this); | |
this.document_0 = $wnd.document; | |
} | |
defineClass(4, 34, $intern_4); | |
_.createDom = function createDom(){ | |
$setElementInternal(this, wrapDomNode($createElement_(this.document_0, this.getTagName()))); | |
this.setCssName(this.element.wrappedDomContext); | |
} | |
; | |
_.disposeInternal = function disposeInternal_1(){ | |
!!this.element && !!this.element.wrappedDomContext['parentElement'] && $removeChild(wrapDomNode(this.element.wrappedDomContext['parentElement']), this.element); | |
} | |
; | |
_.getContentElement = function getContentElement(){ | |
return this.element; | |
} | |
; | |
_.getTagName = function getTagName(){ | |
return 'DIV'; | |
} | |
; | |
_.setCssName = function setCssName(classList){ | |
$setCssName(classList); | |
} | |
; | |
_.inDocument_ = false; | |
var Lailabs_jclosure_client_ui_Component_2_classLit = createForClass('ailabs.jclosure.client.ui', 'Component', 4); | |
function $setSrcURL(this$static, imageUrl){ | |
$setAttribute($getElement_0(this$static), 'src', imageUrl); | |
} | |
function Image_0(){ | |
Component.call(this); | |
} | |
defineClass(125, 4, $intern_4, Image_0); | |
_.getTagName = function getTagName_0(){ | |
return 'IMG'; | |
} | |
; | |
_.setCssName = function setCssName_0(classList){ | |
classList.classList.add('goog-image'); | |
} | |
; | |
var Lailabs_jclosure_client_ui_Image_2_classLit = createForClass('ailabs.jclosure.client.ui', 'Image', 125); | |
function $disposeAllChildren(this$static){ | |
var childComponent, childComponent$iterator, entry, outerIter; | |
for (childComponent$iterator = (outerIter = new AbstractHashMap$EntrySetIterator((new AbstractHashMap$EntrySet((new AbstractMap$2(this$static.childMap)).this$01)).this$01) , new AbstractMap$2$1(outerIter)); childComponent$iterator.val$outerIter2.hasNext;) { | |
childComponent = (entry = $next(childComponent$iterator.val$outerIter2) , castTo(entry.getValue(), 4)); | |
$dispose(childComponent); | |
} | |
} | |
function $setCollection(this$static, list){ | |
var model, model$iterator, childInstance; | |
!!this$static.list_0 && $disposeAllChildren(this$static); | |
this$static.list_0 = list; | |
for (model$iterator = list.iterator(); model$iterator.hasNext_0();) { | |
model = model$iterator.next_0(); | |
childInstance = $apply(this$static.factoryFunc, model); | |
$put(this$static.childMap, model, childInstance); | |
$registerDisposable(this$static, childInstance); | |
$render(childInstance, $getElement_0(this$static)); | |
} | |
} | |
function Repeater(factoryFunc){ | |
Component.call(this); | |
this.childMap = new IdentityHashMap; | |
this.factoryFunc = factoryFunc; | |
} | |
defineClass(98, 4, $intern_4, Repeater); | |
_.setCssName = function setCssName_1(classList){ | |
classList.classList.add('goog-repeater'); | |
} | |
; | |
var Lailabs_jclosure_client_ui_Repeater_2_classLit = createForClass('ailabs.jclosure.client.ui', 'Repeater', 98); | |
function $setCssName_0(classList){ | |
classList.classList.add('goog-text-label'); | |
} | |
function TextLabel(){ | |
Component.call(this); | |
} | |
function TextLabel_0(textContent){ | |
Component.call(this); | |
!this.element && ($setElementInternal(this, wrapDomNode(this.document_0.createElement('LABEL'))) , $setCssName_0(this.element.wrappedDomContext)); | |
$setTextContent(this.element, textContent); | |
} | |
defineClass(29, 4, $intern_4, TextLabel, TextLabel_0); | |
_.getTagName = function getTagName_1(){ | |
return 'LABEL'; | |
} | |
; | |
_.setCssName = function setCssName_2(classList){ | |
$setCssName_0(classList); | |
} | |
; | |
var Lailabs_jclosure_client_ui_TextLabel_2_classLit = createForClass('ailabs.jclosure.client.ui', 'TextLabel', 29); | |
function $registerControlDispatchType(this$static, eventType, setupDispatcherCallback){ | |
$put(this$static.controlDispatcherMap, eventType, setupDispatcherCallback); | |
} | |
function $setFocused(this$static, focused){ | |
$enable($getElement_0(this$static).wrappedDomContext, 'has-focus', focused); | |
} | |
function $setupDefaultActionDispatcher(this$static){ | |
$listen($getElement_0(this$static), ($clinit_EventType() , CLICK), this$static, new Control$1methodref$dispatchControlAction$Type(this$static)); | |
} | |
function Control(){ | |
Component.call(this); | |
this.controlDispatcherMap = new HashMap; | |
} | |
defineClass(60, 4, $intern_4); | |
_.listenImpl = function listenImpl_1(eventType, listenerHandle, capturing){ | |
var listenerSpace, setupDispatcherCallback; | |
!this.element && this.createDom(); | |
setupDispatcherCallback = castTo($get_0(this.controlDispatcherMap, eventType), 7); | |
if (setupDispatcherCallback) { | |
setupDispatcherCallback.apply_0(); | |
$put(this.controlDispatcherMap, eventType, new Control$0methodref$noopSetupDispatcherCallback$Type); | |
} | |
else { | |
throw toJs(new Error_0('This ui.Control subclass does not support given eventType, can only to listen to supported events on ui.Control.')); | |
} | |
listenerSpace = $acquireListenerSpace(this, eventType); | |
listenerSpace.add_0(listenerHandle); | |
} | |
; | |
_.setCssName = function setCssName_3(classList){ | |
classList.classList.add('goog-component'); | |
classList.classList.add('goog-control'); | |
} | |
; | |
var Lailabs_jclosure_client_ui_control_Control_2_classLit = createForClass('ailabs.jclosure.client.ui.control', 'Control', 60); | |
function $createDom(this$static){ | |
var inputElement; | |
$setElementInternal(this$static, wrapDomNode($createElement_(this$static.document_0, this$static.getTagName()))); | |
$setCssName_1(this$static.element.wrappedDomContext); | |
if (!this$static.valueWrapper) { | |
throw toJs(new Error_0('AbstractValueControl: Subclass failed to set value wrapper.')); | |
} | |
this$static.lastExternallyKnownValue_ = this$static.valueWrapper.getEmptyValue(); | |
inputElement = this$static.getInputElement(); | |
$listen(inputElement, ($clinit_EventType() , FOCUS), this$static, new AbstractValueControl$1methodref$handleInputFocusChanged$Type(this$static)); | |
$listen(inputElement, BLUR, this$static, new AbstractValueControl$2methodref$handleInputFocusChanged$Type(this$static)); | |
} | |
function $getValue(this$static){ | |
var inputElement; | |
inputElement = this$static.getInputElement(); | |
return this$static.valueWrapper.getElementStateAsT(inputElement); | |
} | |
function $handleChange(this$static){ | |
var currentValue, inputElement; | |
if (!equals_Ljava_lang_Object__Z__devirtual$(currentValue = (inputElement = this$static.getInputElement() , this$static.valueWrapper.getElementStateAsT(inputElement)), this$static.lastExternallyKnownValue_)) { | |
this$static.lastExternallyKnownValue_ = currentValue; | |
$dispatchEvent(this$static, ($clinit_EventType() , CHANGE)); | |
} | |
} | |
function $handleInputFocusChanged(this$static){ | |
var inputElement, wrappedDomContext; | |
$setFocused(this$static, (inputElement = this$static.getInputElement() , wrappedDomContext = inputElement.wrappedDomContext , wrappedDomContext == $wnd.document.activeElement)); | |
} | |
function $setCssName_1(classList){ | |
classList.classList.add('goog-component'); | |
classList.classList.add('goog-control'); | |
classList.classList.add('goog-valuecontrol'); | |
} | |
function $setValue_0(this$static, value_0){ | |
var inputElement; | |
!this$static.element && this$static.createDom(); | |
this$static.lastExternallyKnownValue_ = value_0; | |
inputElement = this$static.getInputElement(); | |
this$static.valueWrapper.applyElementStateFromT(inputElement, value_0); | |
} | |
function $setValueWrapper(this$static, valueWrapper){ | |
this$static.valueWrapper = valueWrapper; | |
} | |
function $setupChangeDispatcher(this$static){ | |
!this$static.element && this$static.createDom(); | |
$listen(this$static.getInputElement(), ($clinit_EventType() , CHANGE), this$static, new AbstractValueControl$3methodref$handleChange$Type(this$static)); | |
$listen(this$static.getInputElement(), KEYUP, this$static, new AbstractValueControl$4methodref$handleChange$Type(this$static)); | |
} | |
function AbstractValueControl(){ | |
Control.call(this); | |
$registerControlDispatchType(this, ($clinit_EventType() , CHANGE), new AbstractValueControl$0methodref$setupChangeDispatcher$Type(this)); | |
} | |
defineClass(30, 60, $intern_4); | |
_.createDom = function createDom_0(){ | |
$createDom(this); | |
} | |
; | |
_.getInputElement = function getInputElement(){ | |
var inputElement; | |
inputElement = castTo($getElement_0(this), 17); | |
return inputElement; | |
} | |
; | |
_.setCssName = function setCssName_4(classList){ | |
$setCssName_1(classList); | |
} | |
; | |
var Lailabs_jclosure_client_ui_control_AbstractValueControl_2_classLit = createForClass('ailabs.jclosure.client.ui.control', 'AbstractValueControl', 30); | |
defineClass(108, 30, $intern_4); | |
_.createDom = function createDom_1(){ | |
var inputElement; | |
$createDom(this); | |
inputElement = castTo($getElement_0(this), 19); | |
inputElement.wrappedDomContext['type'] = 'text'; | |
} | |
; | |
_.getTagName = function getTagName_2(){ | |
return 'INPUT'; | |
} | |
; | |
var Lailabs_jclosure_client_ui_control_AbstractInput_2_classLit = createForClass('ailabs.jclosure.client.ui.control', 'AbstractInput', 108); | |
function AbstractValueControl$0methodref$setupChangeDispatcher$Type($$outer_0){ | |
this.$$outer_0 = $$outer_0; | |
} | |
defineClass(109, 1, $intern_1, AbstractValueControl$0methodref$setupChangeDispatcher$Type); | |
_.apply_0 = function apply_2(){ | |
$setupChangeDispatcher(this.$$outer_0); | |
} | |
; | |
var Lailabs_jclosure_client_ui_control_AbstractValueControl$0methodref$setupChangeDispatcher$Type_2_classLit = createForClass('ailabs.jclosure.client.ui.control', 'AbstractValueControl/0methodref$setupChangeDispatcher$Type', 109); | |
function AbstractValueControl$1methodref$handleInputFocusChanged$Type($$outer_0){ | |
this.$$outer_0 = $$outer_0; | |
} | |
defineClass(110, 1, $intern_1, AbstractValueControl$1methodref$handleInputFocusChanged$Type); | |
_.apply_0 = function apply_3(){ | |
$handleInputFocusChanged(this.$$outer_0); | |
} | |
; | |
var Lailabs_jclosure_client_ui_control_AbstractValueControl$1methodref$handleInputFocusChanged$Type_2_classLit = createForClass('ailabs.jclosure.client.ui.control', 'AbstractValueControl/1methodref$handleInputFocusChanged$Type', 110); | |
function AbstractValueControl$2methodref$handleInputFocusChanged$Type($$outer_0){ | |
this.$$outer_0 = $$outer_0; | |
} | |
defineClass(111, 1, $intern_1, AbstractValueControl$2methodref$handleInputFocusChanged$Type); | |
_.apply_0 = function apply_4(){ | |
$handleInputFocusChanged(this.$$outer_0); | |
} | |
; | |
var Lailabs_jclosure_client_ui_control_AbstractValueControl$2methodref$handleInputFocusChanged$Type_2_classLit = createForClass('ailabs.jclosure.client.ui.control', 'AbstractValueControl/2methodref$handleInputFocusChanged$Type', 111); | |
function AbstractValueControl$3methodref$handleChange$Type($$outer_0){ | |
this.$$outer_0 = $$outer_0; | |
} | |
defineClass(112, 1, $intern_1, AbstractValueControl$3methodref$handleChange$Type); | |
_.apply_0 = function apply_5(){ | |
$handleChange(this.$$outer_0); | |
} | |
; | |
var Lailabs_jclosure_client_ui_control_AbstractValueControl$3methodref$handleChange$Type_2_classLit = createForClass('ailabs.jclosure.client.ui.control', 'AbstractValueControl/3methodref$handleChange$Type', 112); | |
function AbstractValueControl$4methodref$handleChange$Type($$outer_0){ | |
this.$$outer_0 = $$outer_0; | |
} | |
defineClass(113, 1, $intern_1, AbstractValueControl$4methodref$handleChange$Type); | |
_.apply_0 = function apply_6(){ | |
$handleChange(this.$$outer_0); | |
} | |
; | |
var Lailabs_jclosure_client_ui_control_AbstractValueControl$4methodref$handleChange$Type_2_classLit = createForClass('ailabs.jclosure.client.ui.control', 'AbstractValueControl/4methodref$handleChange$Type', 113); | |
defineClass(153, 1, {}); | |
_.applyElementStateFromT = function applyElementStateFromT(inputElement, tValue){ | |
$setValue(inputElement, this.getTAsText(tValue)); | |
} | |
; | |
_.getElementStateAsT = function getElementStateAsT(inputElement){ | |
return this.getTextAsT(inputElement.wrappedDomContext['value']); | |
} | |
; | |
_.getTAsText = function getTAsText(tValue){ | |
throw toJs(new Error_0('AbstractValueWrapper.getTAsText(): Abstract method not overriden')); | |
} | |
; | |
_.getTextAsT = function getTextAsT(inputText){ | |
throw toJs(new Error_0('AbstractValueWrapper.getTextAsT(): Abstract method not overriden')); | |
} | |
; | |
var Lailabs_jclosure_client_ui_control_AbstractValueControl$AbstractValueWrapper_2_classLit = createForClass('ailabs.jclosure.client.ui.control', 'AbstractValueControl/AbstractValueWrapper', 153); | |
function $applyElementStateFromT(inputElement, tValue){ | |
$setChecked(castTo(inputElement, 19), (checkCriticalNotNull(tValue) , tValue)); | |
} | |
function AbstractValueControl$BooleanValueWrapper(){ | |
} | |
defineClass(61, 153, {}, AbstractValueControl$BooleanValueWrapper); | |
_.applyElementStateFromT = function applyElementStateFromT_0(inputElement, tValue){ | |
$applyElementStateFromT(inputElement, castToBoolean(tValue)); | |
} | |
; | |
_.getElementStateAsT = function getElementStateAsT_0(inputElement){ | |
return $clinit_Boolean() , castTo(inputElement, 19).wrappedDomContext['checked']?true:false; | |
} | |
; | |
_.getEmptyValue = function getEmptyValue(){ | |
return $clinit_Boolean() , $clinit_Boolean() , false; | |
} | |
; | |
var Lailabs_jclosure_client_ui_control_AbstractValueControl$BooleanValueWrapper_2_classLit = createForClass('ailabs.jclosure.client.ui.control', 'AbstractValueControl/BooleanValueWrapper', 61); | |
function AbstractValueControl$StringValueWrapper(){ | |
} | |
defineClass(62, 153, {}, AbstractValueControl$StringValueWrapper); | |
_.getEmptyValue = function getEmptyValue_0(){ | |
return ''; | |
} | |
; | |
_.getTAsText = function getTAsText_0(tValue){ | |
return castToString(tValue); | |
} | |
; | |
_.getTextAsT = function getTextAsT_0(inputText){ | |
return inputText; | |
} | |
; | |
var Lailabs_jclosure_client_ui_control_AbstractValueControl$StringValueWrapper_2_classLit = createForClass('ailabs.jclosure.client.ui.control', 'AbstractValueControl/StringValueWrapper', 62); | |
function $setCssName_2(classList){ | |
classList.classList.add('goog-component'); | |
classList.classList.add('goog-control'); | |
classList.classList.add('goog-button'); | |
} | |
function Button(){ | |
Control.call(this); | |
$registerControlDispatchType(this, ($clinit_EventType() , ACTION), new Button$0methodref$setupDefaultActionDispatcher$Type(this)); | |
} | |
defineClass(20, 60, $intern_4, Button); | |
_.getTagName = function getTagName_3(){ | |
return 'BUTTON'; | |
} | |
; | |
_.setCssName = function setCssName_5(classList){ | |
$setCssName_2(classList); | |
} | |
; | |
var Lailabs_jclosure_client_ui_control_Button_2_classLit = createForClass('ailabs.jclosure.client.ui.control', 'Button', 20); | |
function Button$0methodref$setupDefaultActionDispatcher$Type($$outer_0){ | |
this.$$outer_0 = $$outer_0; | |
} | |
defineClass(102, 1, $intern_1, Button$0methodref$setupDefaultActionDispatcher$Type); | |
_.apply_0 = function apply_7(){ | |
$setupDefaultActionDispatcher(this.$$outer_0); | |
} | |
; | |
var Lailabs_jclosure_client_ui_control_Button$0methodref$setupDefaultActionDispatcher$Type_2_classLit = createForClass('ailabs.jclosure.client.ui.control', 'Button/0methodref$setupDefaultActionDispatcher$Type', 102); | |
function CheckboxInput(){ | |
AbstractValueControl.call(this); | |
$setValueWrapper(this, new AbstractValueControl$BooleanValueWrapper); | |
} | |
defineClass(129, 30, $intern_4, CheckboxInput); | |
_.createDom = function createDom_2(){ | |
var inputElement; | |
$createDom(this); | |
inputElement = castTo($getElement_0(this), 19); | |
inputElement.wrappedDomContext['type'] = 'checkbox'; | |
} | |
; | |
_.getTagName = function getTagName_4(){ | |
return 'INPUT'; | |
} | |
; | |
var Lailabs_jclosure_client_ui_control_CheckboxInput_2_classLit = createForClass('ailabs.jclosure.client.ui.control', 'CheckboxInput', 129); | |
function Control$0methodref$noopSetupDispatcherCallback$Type(){ | |
} | |
defineClass(103, 1, $intern_1, Control$0methodref$noopSetupDispatcherCallback$Type); | |
_.apply_0 = function apply_8(){ | |
} | |
; | |
var Lailabs_jclosure_client_ui_control_Control$0methodref$noopSetupDispatcherCallback$Type_2_classLit = createForClass('ailabs.jclosure.client.ui.control', 'Control/0methodref$noopSetupDispatcherCallback$Type', 103); | |
function Control$1methodref$dispatchControlAction$Type($$outer_0){ | |
this.$$outer_0 = $$outer_0; | |
} | |
defineClass(104, 1, $intern_1, Control$1methodref$dispatchControlAction$Type); | |
_.apply_0 = function apply_9(){ | |
$dispatchEvent(this.$$outer_0, ($clinit_EventType() , ACTION)); | |
} | |
; | |
var Lailabs_jclosure_client_ui_control_Control$1methodref$dispatchControlAction$Type_2_classLit = createForClass('ailabs.jclosure.client.ui.control', 'Control/1methodref$dispatchControlAction$Type', 104); | |
function LabeledCheckboxInput(){ | |
AbstractValueControl.call(this); | |
$setValueWrapper(this, new AbstractValueControl$BooleanValueWrapper); | |
} | |
defineClass(114, 30, $intern_4, LabeledCheckboxInput); | |
_.getInputElement = function getInputElement_0(){ | |
return this.inputElement; | |
} | |
; | |
_.createDom = function createDom_3(){ | |
this.inputElement = castTo(wrapDomNode(this.document_0.createElement('INPUT')), 19); | |
this.inputElement.wrappedDomContext['type'] = 'checkbox'; | |
$createDom(this); | |
$appendChild($getElement_0(this), this.inputElement); | |
this.labelTextSpan = wrapDomNode(this.document_0.createElement('SPAN')); | |
$appendChild($getElement_0(this), this.labelTextSpan); | |
} | |
; | |
_.getContentElement = function getContentElement_0(){ | |
return this.labelTextSpan; | |
} | |
; | |
_.getTagName = function getTagName_5(){ | |
return 'LABEL'; | |
} | |
; | |
var Lailabs_jclosure_client_ui_control_LabeledCheckboxInput_2_classLit = createForClass('ailabs.jclosure.client.ui.control', 'LabeledCheckboxInput', 114); | |
function OptionModel(label_0, value_0){ | |
this.label_0 = label_0; | |
this.value_0 = value_0; | |
} | |
defineClass(49, 1, {49:1}, OptionModel); | |
_.hashCode_0 = function hashCode_2(){ | |
return getHashCode_2(this.value_0); | |
} | |
; | |
var Lailabs_jclosure_client_ui_control_OptionModel_2_classLit = createForClass('ailabs.jclosure.client.ui.control', 'OptionModel', 49); | |
function $addOption(this$static, option){ | |
var optionElem; | |
!this$static.element && $createDom(this$static); | |
$putStringValue(this$static.valueMap, '' + getHashCode_2(option.value_0), option); | |
optionElem = wrapDomNode(this$static.document_0.createElement('OPTION')); | |
$setTextContent(optionElem, option.label_0); | |
$setAttribute(optionElem, 'value', '' + getHashCode_2(option.value_0)); | |
$appendChild($getElement_0(this$static), optionElem); | |
} | |
function SelectInput(){ | |
AbstractValueControl.call(this); | |
this.valueMap = new HashMap; | |
$setValueWrapper(this, new SelectInput$SelectValueWrapper(this.valueMap)); | |
} | |
defineClass(115, 30, $intern_4, SelectInput); | |
_.createDom = function createDom_4(){ | |
$createDom(this); | |
} | |
; | |
_.getTagName = function getTagName_6(){ | |
return 'SELECT'; | |
} | |
; | |
var Lailabs_jclosure_client_ui_control_SelectInput_2_classLit = createForClass('ailabs.jclosure.client.ui.control', 'SelectInput', 115); | |
function SelectInput$SelectValueWrapper(valueMap){ | |
this.valueMap = valueMap; | |
} | |
defineClass(116, 153, {}, SelectInput$SelectValueWrapper); | |
_.getEmptyValue = function getEmptyValue_1(){ | |
return null; | |
} | |
; | |
_.getTAsText = function getTAsText_1(tValue){ | |
return tValue != null?'' + hashCode__I__devirtual$(tValue):null; | |
} | |
; | |
_.getTextAsT = function getTextAsT_1(inputText){ | |
return inputText != null?castTo($getStringValue(this.valueMap, inputText), 49).value_0:null; | |
} | |
; | |
var Lailabs_jclosure_client_ui_control_SelectInput$SelectValueWrapper_2_classLit = createForClass('ailabs.jclosure.client.ui.control', 'SelectInput/SelectValueWrapper', 116); | |
function TextInput(){ | |
AbstractValueControl.call(this); | |
$setValueWrapper(this, new AbstractValueControl$StringValueWrapper); | |
} | |
defineClass(48, 108, $intern_4, TextInput); | |
var Lailabs_jclosure_client_ui_control_TextInput_2_classLit = createForClass('ailabs.jclosure.client.ui.control', 'TextInput', 48); | |
function TextareaInput(){ | |
AbstractValueControl.call(this); | |
$setValueWrapper(this, new AbstractValueControl$StringValueWrapper); | |
} | |
defineClass(121, 30, $intern_4, TextareaInput); | |
_.getTagName = function getTagName_7(){ | |
return 'TEXTAREA'; | |
} | |
; | |
var Lailabs_jclosure_client_ui_control_TextareaInput_2_classLit = createForClass('ailabs.jclosure.client.ui.control', 'TextareaInput', 121); | |
function $setHeight(this$static, value_0){ | |
var wrappedDomContext; | |
!this$static.element && this$static.createDom(); | |
(wrappedDomContext = $getElement_0(this$static).wrappedDomContext , wrappedDomContext.style)['height'] = $toString_1(value_0); | |
} | |
function $setWidth(this$static, value_0){ | |
var wrappedDomContext; | |
!this$static.element && $createDom_0(this$static); | |
(wrappedDomContext = $getElement_0(this$static).wrappedDomContext , wrappedDomContext.style)['width'] = $toString_1(value_0); | |
} | |
function AbstractLayout(){ | |
Component.call(this); | |
} | |
defineClass(59, 4, $intern_4); | |
var Lailabs_jclosure_client_ui_layout_AbstractLayout_2_classLit = createForClass('ailabs.jclosure.client.ui.layout', 'AbstractLayout', 59); | |
function $getCell(this$static, x_0, y_0){ | |
var ix, iy, td, tr; | |
tr = null; | |
td = null; | |
for (iy = 0; iy <= y_0; iy++) { | |
if (!(tr = wrapDomNode($get_(new ElementList(this$static.tbody.wrappedDomContext['children']), iy)))) { | |
tr = wrapDomNode(this$static.document_0.createElement('TR')); | |
$appendChild(this$static.tbody, tr); | |
} | |
} | |
for (ix = 0; ix <= x_0; ix++) { | |
if (!(td = wrapDomNode($get_(new ElementList(tr.wrappedDomContext['children']), ix)))) { | |
td = wrapDomNode(this$static.document_0.createElement('TD')); | |
$appendChild(tr, td); | |
} | |
} | |
return td; | |
} | |
function $setCellComponent(this$static, y_0, component){ | |
$registerDisposable(this$static, component); | |
$render(component, $getCell(this$static, 0, y_0)); | |
} | |
function $setCellVAlign(this$static, x_0, alignment){ | |
var wrappedDomContext; | |
(wrappedDomContext = $getCell(this$static, x_0, 0).wrappedDomContext , wrappedDomContext.style)['vertical-align'] = !alignment?'null':alignment.name_0 != null?alignment.name_0:'' + alignment.ordinal; | |
} | |
function $setCellWidth(this$static, value_0){ | |
var cell, wrappedDomContext; | |
cell = $getCell(this$static, 1, 0); | |
(wrappedDomContext = cell.wrappedDomContext , wrappedDomContext.style)['width'] = $toString_1(value_0); | |
} | |
function $setCssName_3(classList){ | |
classList.classList.add('goog-component'); | |
classList.classList.add('goog-layout-grid'); | |
} | |
function GridLayout(){ | |
AbstractLayout.call(this); | |
} | |
defineClass(39, 59, $intern_4, GridLayout); | |
_.createDom = function createDom_5(){ | |
var element, wrappedDomContext, wrappedDomContext_0; | |
$setElementInternal(this, wrapDomNode(this.document_0.createElement('TABLE'))); | |
$setCssName_3(this.element.wrappedDomContext); | |
element = castTo($getElement_0(this), 47); | |
wrappedDomContext = element.wrappedDomContext; | |
wrappedDomContext.cellPadding = 5; | |
(wrappedDomContext_0 = element.wrappedDomContext , wrappedDomContext_0.style)['width'] = $toString_1(new LengthValue(($clinit_LengthUnitType() , PCT), 100)); | |
this.tbody = wrapDomNode(this.document_0.createElement('TBODY')); | |
$appendChild(element, this.tbody); | |
} | |
; | |
_.getTagName = function getTagName_8(){ | |
return 'TABLE'; | |
} | |
; | |
_.setCssName = function setCssName_6(classList){ | |
$setCssName_3(classList); | |
} | |
; | |
var Lailabs_jclosure_client_ui_layout_GridLayout_2_classLit = createForClass('ailabs.jclosure.client.ui.layout', 'GridLayout', 39); | |
function $createDom_0(this$static){ | |
var wrappedDomContext; | |
$setElementInternal(this$static, wrapDomNode(this$static.document_0.createElement('DIV'))); | |
$setCssName_4(this$static.element.wrappedDomContext); | |
(wrappedDomContext = $getElement_0(this$static).wrappedDomContext , wrappedDomContext.style)['position'] = valueOf_0(($clinit_PositionType() , RELATIVE)); | |
} | |
function $getLayer(this$static, z_0){ | |
var elem, iz, layer, layerStyle, wrappedDomContext; | |
elem = $getElement_0(this$static); | |
layer = null; | |
for (iz = 0; iz <= z_0; iz++) { | |
if (!(layer = wrapDomNode($get_(new ElementList(elem.wrappedDomContext['children']), iz)))) { | |
layer = wrapDomNode(this$static.document_0.createElement('DIV')); | |
layerStyle = (wrappedDomContext = layer.wrappedDomContext , wrappedDomContext.style); | |
layerStyle['position'] = valueOf_0(($clinit_PositionType() , ABSOLUTE)); | |
layerStyle['width'] = '100%'; | |
layerStyle['height'] = '100%'; | |
$appendChild(elem, layer); | |
} | |
} | |
return layer; | |
} | |
function $setCssName_4(classList){ | |
classList.classList.add('goog-component'); | |
classList.classList.add('goog-layout-layer'); | |
} | |
function $setLayerComponent(this$static, component){ | |
$registerDisposable(this$static, component); | |
$render(component, $getLayer(this$static, 0)); | |
} | |
function LayeredLayout(){ | |
AbstractLayout.call(this); | |
} | |
defineClass(124, 59, $intern_4, LayeredLayout); | |
_.createDom = function createDom_6(){ | |
$createDom_0(this); | |
} | |
; | |
_.setCssName = function setCssName_7(classList){ | |
$setCssName_4(classList); | |
} | |
; | |
var Lailabs_jclosure_client_ui_layout_LayeredLayout_2_classLit = createForClass('ailabs.jclosure.client.ui.layout', 'LayeredLayout', 124); | |
function $renderState(this$static){ | |
var contentEditor, contentNoncontextual; | |
if (this$static.currentChild) { | |
$dispose(this$static.currentChild); | |
this$static.currentChild = null; | |
} | |
if (this$static.state) { | |
contentEditor = new ContentEditor; | |
$addChild(this$static, this$static.currentChild = contentEditor); | |
$openItem(contentEditor, this$static.contentId); | |
} | |
else { | |
contentNoncontextual = new ContentNoncontextual(this$static); | |
$addChild(this$static, this$static.currentChild = contentNoncontextual); | |
} | |
} | |
function $setState(this$static, contentId){ | |
this$static.state = true; | |
this$static.contentId = contentId; | |
$renderState(this$static); | |
} | |
function ContentCore(){ | |
Component.call(this); | |
} | |
defineClass(74, 4, $intern_4, ContentCore); | |
_.state = false; | |
var Lclient_ContentCore_2_classLit = createForClass('client', 'ContentCore', 74); | |
function $clinit_ContentEditor(){ | |
$clinit_ContentEditor = emptyMethod; | |
TEMPLATES_MANIFEST = deserialize(serialize($wnd['CONTENTBUS_TEMPLATES_MANIFEST']), true); | |
} | |
function $getContentRecord(this$static){ | |
var model, list; | |
model = new $wnd.Object; | |
if (this$static.photoSelector.images) { | |
model.images = this$static.photoSelector.images; | |
model.featured_image = $getValue_1(this$static.photoSelector); | |
} | |
model.url = castToString($getValue(this$static.urlInput)); | |
model.use_sharebar = checkNotNull(castToBoolean($getValue(this$static.useShareBarInput))); | |
model.template_name = castToString($getValue(this$static.templateNameInput)); | |
model.headline = castToString($getValue(this$static.headlineField.fieldInput)); | |
model.subheading = castToString($getValue(this$static.subheadingField.fieldInput)); | |
model.description = castToString($getValue(this$static.descriptionField.fieldInput)); | |
model.active_fields = (list = new ArrayList , checkNotNull(castToBoolean($getValue(this$static.headlineField.activeCheckbox))) && $add(list, this$static.headlineField.fieldId) , checkNotNull(castToBoolean($getValue(this$static.subheadingField.activeCheckbox))) && $add(list, this$static.subheadingField.fieldId) , checkNotNull(castToBoolean($getValue(this$static.descriptionField.activeCheckbox))) && $add(list, this$static.descriptionField.fieldId) , list); | |
return model; | |
} | |
function $handleOpenItem(this$static, model){ | |
var active_fields, templateManifest, supported_fields; | |
this$static.contentId = model.id; | |
if (model.images) { | |
$setImages(this$static.photoSelector, model.images); | |
model.featured_image != null && $setValue_1(this$static.photoSelector, model.featured_image); | |
} | |
$setValue_0(this$static.urlInput, model.url); | |
$setValue_0(this$static.useShareBarInput, ($clinit_Boolean() , model.use_sharebar?true:false)); | |
$setValue_0(this$static.templateNameInput, model.template_name); | |
active_fields = model.active_fields?model.active_fields:new ArrayList; | |
templateManifest = castToJsObject(TEMPLATES_MANIFEST[model.template_name]); | |
supported_fields = templateManifest.supported_fields; | |
$setState_0(this$static.headlineField, model.headline, active_fields.contains(this$static.headlineField.fieldId), supported_fields.contains(this$static.headlineField.fieldId)); | |
$setState_0(this$static.subheadingField, model.subheading, active_fields.contains(this$static.subheadingField.fieldId), supported_fields.contains(this$static.subheadingField.fieldId)); | |
$setState_0(this$static.descriptionField, model.description, active_fields.contains(this$static.descriptionField.fieldId), supported_fields.contains(this$static.descriptionField.fieldId)); | |
} | |
function $handleSave(this$static){ | |
$wnd.CONTENTBUS_RPC_GLOBAL.update(this$static.contentId, deserialize(serialize($getContentRecord(this$static)), false)); | |
} | |
function $handleTemplateChange(this$static){ | |
var model; | |
model = $getContentRecord(this$static); | |
model.id = this$static.contentId; | |
$handleOpenItem(this$static, model); | |
} | |
function $openItem(this$static, contentId){ | |
$then($wnd.CONTENTBUS_RPC_GLOBAL.get(contentId), new ContentEditor$3methodref$handleOpenItem$Type(this$static)); | |
} | |
function $setCssName_5(classList){ | |
classList.classList.add('goog-component'); | |
classList.classList.add('content-editor'); | |
} | |
function $shortenedCallback(this$static){ | |
$alert($wnd, deserialize($getResponseText(this$static.shortyClient.xmlHttp), true)['shorturl']); | |
} | |
function $showShortUrl(this$static){ | |
var model, shareLink, shareLinkUri; | |
model = $getContentRecord(this$static); | |
if (model.url != null) { | |
shareLink = model.url; | |
if (checkNotNull(castToBoolean($getValue(this$static.useShareBarInput)))) { | |
shareLinkUri = new URI; | |
$enforceReadOnly(shareLinkUri); | |
shareLinkUri.scheme_ = ($clinit_StringUtil() , 'http'); | |
$enforceReadOnly(shareLinkUri); | |
shareLinkUri.domain_ = 'modelcave.shopwindow.io'; | |
$enforceReadOnly(shareLinkUri); | |
shareLinkUri.path_ = '/social/sharebar'; | |
$enforceReadOnly(shareLinkUri); | |
!shareLinkUri.queryData_ && (shareLinkUri.queryData_ = new QueryData); | |
$clearValues(shareLinkUri.queryData_); | |
$addValue(shareLinkUri.queryData_, 'url', shareLink); | |
shareLink = $toString_0(shareLinkUri); | |
} | |
this$static.shortyClient = new ShortyClient; | |
$listen(this$static.shortyClient, ($clinit_EventType() , COMPLETE), this$static, new ContentEditor$4methodref$shortenedCallback$Type(this$static)); | |
$shortenUrl(this$static.shortyClient, shareLink); | |
} | |
else { | |
$wnd.alert('Please specify a valid URL'); | |
} | |
} | |
function ContentEditor(){ | |
$clinit_ContentEditor(); | |
Component.call(this); | |
} | |
defineClass(72, 4, $intern_4, ContentEditor); | |
_.createDom = function createDom_7(){ | |
var grid, rgrid, saveButton, showUrlBtn, templateManifest, templateName, templateName$iterator; | |
$setElementInternal(this, wrapDomNode(this.document_0.createElement('DIV'))); | |
$setCssName_5(this.element.wrappedDomContext); | |
grid = new GridLayout; | |
$registerDisposable(this, grid); | |
$render(grid, $getElement_0(this)); | |
this.lgrid = new GridLayout; | |
$setCellComponent(grid, 0, this.lgrid); | |
this.headlineField = new FieldEditor('headline', 'Headline', new TextInput); | |
$setCellComponent(this.lgrid, 0, this.headlineField); | |
this.subheadingField = new FieldEditor('subheading', 'Subheading', new TextInput); | |
$setCellComponent(this.lgrid, 1, this.subheadingField); | |
this.descriptionField = new FieldEditor('description', 'Text', new TextareaInput); | |
$setCellComponent(this.lgrid, 2, this.descriptionField); | |
$setCellComponent(this.lgrid, 6, new TextLabel_0('Images Associated')); | |
this.photoSelector = new PhotoSelector; | |
$setCellComponent(this.lgrid, 7, this.photoSelector); | |
$setCellComponent(this.lgrid, 8, new TextLabel_0('URL')); | |
this.urlInput = new TextInput; | |
$setCellComponent(this.lgrid, 9, this.urlInput); | |
$setCellComponent(this.lgrid, 10, new TextLabel_0('Social Settings')); | |
this.useShareBarInput = new LabeledCheckboxInput; | |
$setTextContent_0(this.useShareBarInput, 'Use share bar'); | |
$setCellComponent(this.lgrid, 11, this.useShareBarInput); | |
showUrlBtn = new Button; | |
$listen(showUrlBtn, ($clinit_EventType() , ACTION), this, new ContentEditor$0methodref$showShortUrl$Type(this)); | |
!showUrlBtn.element && ($setElementInternal(showUrlBtn, wrapDomNode(showUrlBtn.document_0.createElement('BUTTON'))) , $setCssName_2(showUrlBtn.element.wrappedDomContext)); | |
showUrlBtn.element.wrappedDomContext['textContent'] = 'Get Shorty Link'; | |
$setCellComponent(this.lgrid, 12, showUrlBtn); | |
saveButton = new Button; | |
$listen(saveButton, ACTION, this, new ContentEditor$1methodref$handleSave$Type(this)); | |
!saveButton.element && ($setElementInternal(saveButton, wrapDomNode(saveButton.document_0.createElement('BUTTON'))) , $setCssName_2(saveButton.element.wrappedDomContext)); | |
saveButton.element.wrappedDomContext['textContent'] = 'Save'; | |
$setCellComponent(this.lgrid, 13, saveButton); | |
rgrid = new GridLayout; | |
$registerDisposable(grid, rgrid); | |
$render(rgrid, $getCell(grid, 1, 0)); | |
this.templateNameInput = new SelectInput; | |
for (templateName$iterator = new AbstractList$IteratorImpl(new Arrays$ArrayList($getKeys_(TEMPLATES_MANIFEST))); templateName$iterator.i < templateName$iterator.this$01.size_1();) { | |
templateName = (checkCriticalElement(templateName$iterator.i < templateName$iterator.this$01.size_1()) , castToString(templateName$iterator.this$01.get_1(templateName$iterator.last = templateName$iterator.i++))); | |
templateManifest = castToJsObject(TEMPLATES_MANIFEST[templateName]); | |
$addOption(this.templateNameInput, new OptionModel(templateManifest.title, templateName)); | |
} | |
$setCellComponent(rgrid, 0, this.templateNameInput); | |
$listen(this.templateNameInput, CHANGE, this, new ContentEditor$2methodref$handleTemplateChange$Type(this)); | |
} | |
; | |
_.setCssName = function setCssName_8(classList){ | |
$setCssName_5(classList); | |
} | |
; | |
var TEMPLATES_MANIFEST; | |
var Lclient_ContentEditor_2_classLit = createForClass('client', 'ContentEditor', 72); | |
function ContentEditor$0methodref$showShortUrl$Type($$outer_0){ | |
this.$$outer_0 = $$outer_0; | |
} | |
defineClass(86, 1, $intern_1, ContentEditor$0methodref$showShortUrl$Type); | |
_.apply_0 = function apply_10(){ | |
$showShortUrl(this.$$outer_0); | |
} | |
; | |
var Lclient_ContentEditor$0methodref$showShortUrl$Type_2_classLit = createForClass('client', 'ContentEditor/0methodref$showShortUrl$Type', 86); | |
function ContentEditor$1methodref$handleSave$Type($$outer_0){ | |
this.$$outer_0 = $$outer_0; | |
} | |
defineClass(87, 1, $intern_1, ContentEditor$1methodref$handleSave$Type); | |
_.apply_0 = function apply_11(){ | |
$handleSave(this.$$outer_0); | |
} | |
; | |
var Lclient_ContentEditor$1methodref$handleSave$Type_2_classLit = createForClass('client', 'ContentEditor/1methodref$handleSave$Type', 87); | |
function ContentEditor$2methodref$handleTemplateChange$Type($$outer_0){ | |
this.$$outer_0 = $$outer_0; | |
} | |
defineClass(88, 1, $intern_1, ContentEditor$2methodref$handleTemplateChange$Type); | |
_.apply_0 = function apply_12(){ | |
$handleTemplateChange(this.$$outer_0); | |
} | |
; | |
var Lclient_ContentEditor$2methodref$handleTemplateChange$Type_2_classLit = createForClass('client', 'ContentEditor/2methodref$handleTemplateChange$Type', 88); | |
function ContentEditor$3methodref$handleOpenItem$Type($$outer_0){ | |
this.$$outer_0 = $$outer_0; | |
} | |
defineClass(89, 1, {}, ContentEditor$3methodref$handleOpenItem$Type); | |
_.apply_1 = function apply_13(arg0){ | |
$handleOpenItem(this.$$outer_0, castToJsObject(arg0)); | |
} | |
; | |
var Lclient_ContentEditor$3methodref$handleOpenItem$Type_2_classLit = createForClass('client', 'ContentEditor/3methodref$handleOpenItem$Type', 89); | |
function ContentEditor$4methodref$shortenedCallback$Type($$outer_0){ | |
this.$$outer_0 = $$outer_0; | |
} | |
defineClass(90, 1, $intern_1, ContentEditor$4methodref$shortenedCallback$Type); | |
_.apply_0 = function apply_14(){ | |
$shortenedCallback(this.$$outer_0); | |
} | |
; | |
var Lclient_ContentEditor$4methodref$shortenedCallback$Type_2_classLit = createForClass('client', 'ContentEditor/4methodref$shortenedCallback$Type', 90); | |
function $handleDelete(this$static){ | |
var model; | |
model = this$static.model_; | |
if ($wnd.confirm('Really delete this item?')) { | |
$wnd.CONTENTBUS_RPC_GLOBAL.deleteItem(model.id); | |
$wnd.alert('Please refresh.'); | |
} | |
} | |
function $handleEdit(this$static){ | |
$setState(this$static.core, this$static.model_.id); | |
} | |
function ContentItemView(){ | |
Component.call(this); | |
} | |
defineClass(91, 4, $intern_4, ContentItemView); | |
_.createDom = function createDom_8(){ | |
var deleteBtn, editBtn, itemTitle, model; | |
$setElementInternal(this, wrapDomNode(this.document_0.createElement('DIV'))); | |
$setCssName(this.element.wrappedDomContext); | |
model = this.model_; | |
itemTitle = new TextLabel; | |
$setTextContent_0(itemTitle, model.headline); | |
$registerDisposable(this, itemTitle); | |
$render(itemTitle, $getElement_0(this)); | |
editBtn = new Button; | |
!editBtn.element && ($setElementInternal(editBtn, wrapDomNode(editBtn.document_0.createElement('BUTTON'))) , $setCssName_2(editBtn.element.wrappedDomContext)); | |
editBtn.element.wrappedDomContext['textContent'] = 'edit'; | |
$listen(editBtn, ($clinit_EventType() , ACTION), this, new ContentItemView$0methodref$handleEdit$Type(this)); | |
$registerDisposable(this, editBtn); | |
$render(editBtn, $getElement_0(this)); | |
deleteBtn = new Button; | |
!deleteBtn.element && ($setElementInternal(deleteBtn, wrapDomNode(deleteBtn.document_0.createElement('BUTTON'))) , $setCssName_2(deleteBtn.element.wrappedDomContext)); | |
deleteBtn.element.wrappedDomContext['textContent'] = 'delete'; | |
$listen(deleteBtn, ACTION, this, new ContentItemView$1methodref$handleDelete$Type(this)); | |
$registerDisposable(this, deleteBtn); | |
$render(deleteBtn, $getElement_0(this)); | |
} | |
; | |
var Lclient_ContentItemView_2_classLit = createForClass('client', 'ContentItemView', 91); | |
function ContentItemView$0methodref$handleEdit$Type($$outer_0){ | |
this.$$outer_0 = $$outer_0; | |
} | |
defineClass(92, 1, $intern_1, ContentItemView$0methodref$handleEdit$Type); | |
_.apply_0 = function apply_15(){ | |
$handleEdit(this.$$outer_0); | |
} | |
; | |
var Lclient_ContentItemView$0methodref$handleEdit$Type_2_classLit = createForClass('client', 'ContentItemView/0methodref$handleEdit$Type', 92); | |
function ContentItemView$1methodref$handleDelete$Type($$outer_0){ | |
this.$$outer_0 = $$outer_0; | |
} | |
defineClass(93, 1, $intern_1, ContentItemView$1methodref$handleDelete$Type); | |
_.apply_0 = function apply_16(){ | |
$handleDelete(this.$$outer_0); | |
} | |
; | |
var Lclient_ContentItemView$1methodref$handleDelete$Type_2_classLit = createForClass('client', 'ContentItemView/1methodref$handleDelete$Type', 93); | |
function $handleCreate(this$static){ | |
var contentRecord, userInput, uri_0; | |
userInput = $wnd.prompt('Paste content or URL:'); | |
if ($clinit_URI() , uri_0 = new URI , $parse(uri_0, userInput) , uri_0.scheme_ != null && uri_0.domain_ != null) { | |
this$static.pageScraperService = new PageScraperService; | |
$listen(this$static.pageScraperService, ($clinit_EventType() , COMPLETE), this$static, new ContentNoncontextual$4methodref$handleCreateFromPageScraper$Type(this$static)); | |
$loadUrl(this$static.pageScraperService, userInput); | |
} | |
else { | |
contentRecord = new $wnd.Object; | |
contentRecord.headline = userInput; | |
$then($wnd.CONTENTBUS_RPC_GLOBAL.create(deserialize(serialize(contentRecord), false)), new ContentNoncontextual$lambda$0$Type(this$static)); | |
} | |
} | |
function $handleCreateFromPageScraper(this$static){ | |
var contentRecord, docElem, metaElem; | |
contentRecord = new $wnd.Object; | |
contentRecord.headline = this$static.pageScraperService.parsedDoc.title; | |
contentRecord.description = (docElem = wrapDomNode(this$static.pageScraperService.parsedDoc['documentElement']) , (metaElem = wrapDomNode($querySelector_(docElem, 'meta[property="og:description"]')))?$getAttribute(metaElem, 'content'):(metaElem = wrapDomNode($querySelector_(docElem, 'meta[name="description"]')))?$getAttribute(metaElem, 'content'):(metaElem = wrapDomNode($querySelector_(docElem, 'h1, h2, h3, h4, h5, p')))?metaElem.wrappedDomContext['textContent']:null); | |
contentRecord.images = $getImages(this$static.pageScraperService); | |
contentRecord.url = this$static.pageScraperService.pageUrl; | |
$then($wnd.CONTENTBUS_RPC_GLOBAL.create(deserialize(serialize(contentRecord), false)), new ContentNoncontextual$lambda$0$Type(this$static)); | |
} | |
function $handleListLoaded(this$static, records){ | |
$setCollection(this$static.repeater, records); | |
} | |
function $itemViewFactory(this$static, model){ | |
var comp; | |
comp = new ContentItemView; | |
comp.core = this$static.core; | |
comp.model_ = model; | |
return comp; | |
} | |
function $lambda$0(this$static, id_0){ | |
$setState(this$static.core, id_0); | |
} | |
function ContentNoncontextual(core){ | |
Component.call(this); | |
this.core = core; | |
} | |
defineClass(73, 4, $intern_4, ContentNoncontextual); | |
_.createDom = function createDom_9(){ | |
var createBtn; | |
$setElementInternal(this, wrapDomNode(this.document_0.createElement('DIV'))); | |
$setCssName(this.element.wrappedDomContext); | |
createBtn = new Button; | |
!createBtn.element && ($setElementInternal(createBtn, wrapDomNode(createBtn.document_0.createElement('BUTTON'))) , $setCssName_2(createBtn.element.wrappedDomContext)); | |
createBtn.element.wrappedDomContext['textContent'] = 'Create...'; | |
$listen(createBtn, ($clinit_EventType() , ACTION), this, new ContentNoncontextual$2methodref$handleCreate$Type(this)); | |
$registerDisposable(this, createBtn); | |
$render(createBtn, $getElement_0(this)); | |
this.repeater = new Repeater(new ContentNoncontextual$3methodref$itemViewFactory$Type(this)); | |
$addChild(this, this.repeater); | |
$then($wnd.CONTENTBUS_RPC_GLOBAL.list(), new ContentNoncontextual$5methodref$handleListLoaded$Type(this)); | |
} | |
; | |
var Lclient_ContentNoncontextual_2_classLit = createForClass('client', 'ContentNoncontextual', 73); | |
function ContentNoncontextual$2methodref$handleCreate$Type($$outer_0){ | |
this.$$outer_0 = $$outer_0; | |
} | |
defineClass(94, 1, $intern_1, ContentNoncontextual$2methodref$handleCreate$Type); | |
_.apply_0 = function apply_17(){ | |
$handleCreate(this.$$outer_0); | |
} | |
; | |
var Lclient_ContentNoncontextual$2methodref$handleCreate$Type_2_classLit = createForClass('client', 'ContentNoncontextual/2methodref$handleCreate$Type', 94); | |
function $apply(this$static, arg0){ | |
return $itemViewFactory(this$static.$$outer_0, castToJsObject(arg0)); | |
} | |
function ContentNoncontextual$3methodref$itemViewFactory$Type($$outer_0){ | |
this.$$outer_0 = $$outer_0; | |
} | |
defineClass(95, 1, {}, ContentNoncontextual$3methodref$itemViewFactory$Type); | |
var Lclient_ContentNoncontextual$3methodref$itemViewFactory$Type_2_classLit = createForClass('client', 'ContentNoncontextual/3methodref$itemViewFactory$Type', 95); | |
function ContentNoncontextual$4methodref$handleCreateFromPageScraper$Type($$outer_0){ | |
this.$$outer_0 = $$outer_0; | |
} | |
defineClass(96, 1, $intern_1, ContentNoncontextual$4methodref$handleCreateFromPageScraper$Type); | |
_.apply_0 = function apply_18(){ | |
$handleCreateFromPageScraper(this.$$outer_0); | |
} | |
; | |
var Lclient_ContentNoncontextual$4methodref$handleCreateFromPageScraper$Type_2_classLit = createForClass('client', 'ContentNoncontextual/4methodref$handleCreateFromPageScraper$Type', 96); | |
function ContentNoncontextual$5methodref$handleListLoaded$Type($$outer_0){ | |
this.$$outer_0 = $$outer_0; | |
} | |
defineClass(97, 1, {}, ContentNoncontextual$5methodref$handleListLoaded$Type); | |
_.apply_1 = function apply_19(arg0){ | |
$handleListLoaded(this.$$outer_0, castTo(arg0, 12)); | |
} | |
; | |
var Lclient_ContentNoncontextual$5methodref$handleListLoaded$Type_2_classLit = createForClass('client', 'ContentNoncontextual/5methodref$handleListLoaded$Type', 97); | |
function ContentNoncontextual$lambda$0$Type($$outer_0){ | |
this.$$outer_0 = $$outer_0; | |
} | |
defineClass(58, 1, {}, ContentNoncontextual$lambda$0$Type); | |
_.apply_1 = function apply_20(arg0){ | |
$lambda$0(this.$$outer_0, arg0); | |
} | |
; | |
var Lclient_ContentNoncontextual$lambda$0$Type_2_classLit = createForClass('client', 'ContentNoncontextual/lambda$0$Type', 58); | |
function $setCssName_6(classList){ | |
classList.classList.add('goog-component'); | |
classList.classList.add('field-editor'); | |
} | |
function $setState_0(this$static, value_0, active, template_supported){ | |
$setValue_0(this$static.fieldInput, value_0); | |
$setValue_0(this$static.activeCheckbox, ($clinit_Boolean() , active?true:false)); | |
$enable($getElement_0(this$static).wrappedDomContext, 'is-supported', template_supported); | |
} | |
function FieldEditor(fieldId, fieldLabel, fieldInput){ | |
Component.call(this); | |
this.fieldId = fieldId; | |
this.fieldLabel = fieldLabel; | |
this.fieldInput = fieldInput; | |
} | |
defineClass(46, 4, $intern_4, FieldEditor); | |
_.createDom = function createDom_10(){ | |
$setElementInternal(this, wrapDomNode(this.document_0.createElement('DIV'))); | |
$setCssName_6(this.element.wrappedDomContext); | |
this.activeCheckbox = new CheckboxInput; | |
$addChild(this, this.activeCheckbox); | |
$addChild(this, new TextLabel_0(this.fieldLabel)); | |
$addChild(this, this.fieldInput); | |
} | |
; | |
_.setCssName = function setCssName_9(classList){ | |
$setCssName_6(classList); | |
} | |
; | |
var Lclient_FieldEditor_2_classLit = createForClass('client', 'FieldEditor', 46); | |
function $getAssetPathAbsolute(this$static, src_0){ | |
var pageUri, resolvedUri; | |
pageUri = new URI_0(this$static.pageUrl); | |
resolvedUri = $resolve(pageUri, new URI_0(src_0)); | |
return $toString_0(resolvedUri); | |
} | |
function $getImages(this$static){ | |
var docElem, images, imgElement, imgElement$iterator, imgElements, metaElem, wrappedDomContext, nativeList, wrappedDomContext_0; | |
images = new ArrayList; | |
docElem = wrapDomNode(this$static.parsedDoc['documentElement']); | |
!!(metaElem = wrapDomNode($querySelector_(docElem, 'meta[property="og:image"]'))) && $add(images, $getAssetPathAbsolute(this$static, $getAttribute(metaElem, 'content'))); | |
imgElements = new ElementList((wrappedDomContext = docElem.wrappedDomContext , wrappedDomContext.querySelectorAll('img'))); | |
for (imgElement$iterator = new ListIteratorImpl(imgElements); imgElement$iterator.index_0 < (nativeList = imgElement$iterator.list_0.nativeList , nativeList.length) - 1;) { | |
imgElement = $get(imgElement$iterator.list_0, imgElement$iterator.index_0++); | |
(wrappedDomContext_0 = imgElement.wrappedDomContext , wrappedDomContext_0.hasAttribute('src')) && $add(images, $getAssetPathAbsolute(this$static, $getAttribute(imgElement, 'src'))); | |
} | |
return images; | |
} | |
function $handleLoaded(this$static){ | |
this$static.parsedDoc = parseFromString($getResponseText(this$static.xmlHttp), 'text/html'); | |
$dispatchEvent(this$static, ($clinit_EventType() , COMPLETE)); | |
} | |
function $loadUrl(this$static, url_0){ | |
this$static.pageUrl = url_0; | |
this$static.xmlHttp = new XMLHttpRequest_0; | |
$listen(this$static.xmlHttp, ($clinit_EventType() , COMPLETE), this$static, new PageScraperService$0methodref$handleLoaded$Type(this$static)); | |
$open(this$static.xmlHttp, ($clinit_HttpMethod() , GET), 'http://crossorigin.me/' + url_0); | |
this$static.xmlHttp.xmlHttpImpl.send(null); | |
} | |
function PageScraperService(){ | |
SyntheticEventTarget.call(this); | |
} | |
defineClass(133, 34, $intern_0, PageScraperService); | |
var Lclient_PageScraperService_2_classLit = createForClass('client', 'PageScraperService', 133); | |
function PageScraperService$0methodref$handleLoaded$Type($$outer_0){ | |
this.$$outer_0 = $$outer_0; | |
} | |
defineClass(134, 1, $intern_1, PageScraperService$0methodref$handleLoaded$Type); | |
_.apply_0 = function apply_21(){ | |
$handleLoaded(this.$$outer_0); | |
} | |
; | |
var Lclient_PageScraperService$0methodref$handleLoaded$Type_2_classLit = createForClass('client', 'PageScraperService/0methodref$handleLoaded$Type', 134); | |
function $fillInStackTrace(this$static){ | |
this$static.writetableStackTrace && this$static.backingJsObject !== '__noinit__' && this$static.initializeBackingError(); | |
return this$static; | |
} | |
function $setBackingJsObject(this$static, backingJsObject){ | |
this$static.backingJsObject = backingJsObject; | |
backingJsObject != null && setPropertySafe(backingJsObject, '__java$exception', this$static); | |
} | |
function $toString_2(this$static, message){ | |
var className; | |
className = $getName(this$static.___clazz); | |
return message == null?className:className + ': ' + message; | |
} | |
function Throwable(message){ | |
this.detailMessage = message; | |
$fillInStackTrace(this); | |
this.initializeBackingError(); | |
} | |
function fixIE(e){ | |
if (!('stack' in e)) { | |
try { | |
throw e; | |
} | |
catch (ignored) { | |
} | |
} | |
return e; | |
} | |
defineClass(6, 1, $intern_5); | |
_.createError = function createError(msg){ | |
return new $wnd.Error(msg); | |
} | |
; | |
_.getMessage = function getMessage(){ | |
return this.detailMessage; | |
} | |
; | |
_.initializeBackingError = function initializeBackingError(){ | |
var className, errorMessage, message; | |
message = this.detailMessage == null?null:this.detailMessage.replace(new $wnd.RegExp('\n', 'g'), ' '); | |
errorMessage = (className = $getName(this.___clazz) , message == null?className:className + ': ' + message); | |
$setBackingJsObject(this, fixIE(this.createError(errorMessage))); | |
captureStackTrace(this); | |
} | |
; | |
_.toString_0 = function toString_5(){ | |
return $toString_2(this, this.getMessage()); | |
} | |
; | |
_.backingJsObject = '__noinit__'; | |
_.writetableStackTrace = true; | |
var Ljava_lang_Throwable_2_classLit = createForClass('java.lang', 'Throwable', 6); | |
defineClass(43, 6, $intern_5); | |
var Ljava_lang_Exception_2_classLit = createForClass('java.lang', 'Exception', 43); | |
function RuntimeException(){ | |
$fillInStackTrace(this); | |
this.initializeBackingError(); | |
} | |
function RuntimeException_0(message){ | |
Throwable.call(this, message); | |
} | |
defineClass(10, 43, $intern_5); | |
var Ljava_lang_RuntimeException_2_classLit = createForClass('java.lang', 'RuntimeException', 10); | |
defineClass(57, 10, $intern_5); | |
var Ljava_lang_JsException_2_classLit = createForClass('java.lang', 'JsException', 57); | |
defineClass(78, 57, $intern_5); | |
var Lcom_google_gwt_core_client_impl_JavaScriptExceptionBase_2_classLit = createForClass('com.google.gwt.core.client.impl', 'JavaScriptExceptionBase', 78); | |
function $clinit_JavaScriptException(){ | |
$clinit_JavaScriptException = emptyMethod; | |
NOT_SET = new Object_0; | |
} | |
function $ensureInit(this$static){ | |
var exception; | |
if (this$static.message_0 == null) { | |
exception = maskUndefined(this$static.e) === maskUndefined(NOT_SET)?null:this$static.e; | |
this$static.name_0 = exception == null?'null':instanceOfJso(exception)?getExceptionName0(castToJso(exception)):instanceOfString(exception)?'String':$getName(getClass__Ljava_lang_Class___devirtual$(exception)); | |
this$static.description = this$static.description + ': ' + (instanceOfJso(exception)?getExceptionDescription0(castToJso(exception)):exception + ''); | |
this$static.message_0 = '(' + this$static.name_0 + ') ' + this$static.description; | |
} | |
} | |
function JavaScriptException(e){ | |
$clinit_JavaScriptException(); | |
$fillInStackTrace(this); | |
this.backingJsObject = e; | |
e != null && setPropertySafe(e, '__java$exception', this); | |
this.detailMessage = e == null?'null':toString_6(e); | |
this.description = ''; | |
this.e = e; | |
this.description = ''; | |
} | |
function getExceptionDescription0(e){ | |
return e == null?null:e.message; | |
} | |
function getExceptionName0(e){ | |
return e == null?null:e.name; | |
} | |
defineClass(28, 78, {28:1, 3:1, 6:1}, JavaScriptException); | |
_.getMessage = function getMessage_0(){ | |
$ensureInit(this); | |
return this.message_0; | |
} | |
; | |
_.getThrown = function getThrown(){ | |
return maskUndefined(this.e) === maskUndefined(NOT_SET)?null:this.e; | |
} | |
; | |
var NOT_SET; | |
var Lcom_google_gwt_core_client_JavaScriptException_2_classLit = createForClass('com.google.gwt.core.client', 'JavaScriptException', 28); | |
function now_1(){ | |
if (Date.now) { | |
return Date.now(); | |
} | |
return (new Date).getTime(); | |
} | |
defineClass(140, 1, {}); | |
var Lcom_google_gwt_core_client_Scheduler_2_classLit = createForClass('com.google.gwt.core.client', 'Scheduler', 140); | |
function $clinit_Impl(){ | |
$clinit_Impl = emptyMethod; | |
!!($clinit_StackTraceCreator() , collector); | |
} | |
function apply_22(jsFunction, thisObj, args){ | |
return jsFunction.apply(thisObj, args); | |
var __0; | |
} | |
function enter(){ | |
var now_0; | |
if (entryDepth != 0) { | |
now_0 = now_1(); | |
if (now_0 - watchdogEntryDepthLastScheduled > 2000) { | |
watchdogEntryDepthLastScheduled = now_0; | |
watchdogEntryDepthTimerId = $wnd.setTimeout(watchdogEntryDepthRun, 10); | |
} | |
} | |
if (entryDepth++ == 0) { | |
$flushEntryCommands(($clinit_SchedulerImpl() , INSTANCE)); | |
return true; | |
} | |
return false; | |
} | |
function entry_0(jsFunction){ | |
$clinit_Impl(); | |
return function(){ | |
return entry0(jsFunction, this, arguments); | |
var __0; | |
} | |
; | |
} | |
function entry0(jsFunction, thisObj, args){ | |
var initialEntry; | |
initialEntry = enter(); | |
try { | |
return apply_22(jsFunction, thisObj, args); | |
} | |
finally { | |
exit(initialEntry); | |
} | |
} | |
function exit(initialEntry){ | |
initialEntry && $flushFinallyCommands(($clinit_SchedulerImpl() , INSTANCE)); | |
--entryDepth; | |
if (initialEntry) { | |
if (watchdogEntryDepthTimerId != -1) { | |
watchdogEntryDepthCancel(watchdogEntryDepthTimerId); | |
watchdogEntryDepthTimerId = -1; | |
} | |
} | |
} | |
function reportToBrowser(e){ | |
$clinit_Impl(); | |
$wnd.setTimeout(function(){ | |
throw e; | |
} | |
, 0); | |
} | |
function watchdogEntryDepthCancel(timerId){ | |
$wnd.clearTimeout(timerId); | |
} | |
function watchdogEntryDepthRun(){ | |
entryDepth != 0 && (entryDepth = 0); | |
watchdogEntryDepthTimerId = -1; | |
} | |
var entryDepth = 0, watchdogEntryDepthLastScheduled = 0, watchdogEntryDepthTimerId = -1; | |
function $clinit_SchedulerImpl(){ | |
$clinit_SchedulerImpl = emptyMethod; | |
INSTANCE = new SchedulerImpl; | |
} | |
function $flushEntryCommands(this$static){ | |
var oldQueue, rescheduled; | |
if (this$static.entryCommands) { | |
rescheduled = null; | |
do { | |
oldQueue = this$static.entryCommands; | |
this$static.entryCommands = null; | |
rescheduled = runScheduledTasks(oldQueue, rescheduled); | |
} | |
while (this$static.entryCommands); | |
this$static.entryCommands = rescheduled; | |
} | |
} | |
function $flushFinallyCommands(this$static){ | |
var oldQueue, rescheduled; | |
if (this$static.finallyCommands) { | |
rescheduled = null; | |
do { | |
oldQueue = this$static.finallyCommands; | |
this$static.finallyCommands = null; | |
rescheduled = runScheduledTasks(oldQueue, rescheduled); | |
} | |
while (this$static.finallyCommands); | |
this$static.finallyCommands = rescheduled; | |
} | |
} | |
function SchedulerImpl(){ | |
} | |
function push_0(queue, task){ | |
!queue && (queue = []); | |
queue[queue.length] = task; | |
return queue; | |
} | |
function runScheduledTasks(tasks, rescheduled){ | |
var e, i, j, t; | |
for (i = 0 , j = tasks.length; i < j; i++) { | |
t = tasks[i]; | |
try { | |
t[1]?t[0].$_nullMethod() && (rescheduled = push_0(rescheduled, t)):t[0].$_nullMethod(); | |
} | |
catch ($e0) { | |
$e0 = toJava($e0); | |
if (instanceOf($e0, 6)) { | |
e = $e0; | |
$clinit_Impl(); | |
reportToBrowser(instanceOf(e, 28)?castTo(e, 28).getThrown():e); | |
} | |
else | |
throw toJs($e0); | |
} | |
} | |
return rescheduled; | |
} | |
defineClass(99, 140, {}, SchedulerImpl); | |
var INSTANCE; | |
var Lcom_google_gwt_core_client_impl_SchedulerImpl_2_classLit = createForClass('com.google.gwt.core.client.impl', 'SchedulerImpl', 99); | |
function $clinit_StackTraceCreator(){ | |
$clinit_StackTraceCreator = emptyMethod; | |
var c, enforceLegacy; | |
enforceLegacy = !supportsErrorStack(); | |
c = new StackTraceCreator$CollectorModernNoSourceMap; | |
collector = enforceLegacy?new StackTraceCreator$CollectorLegacy:c; | |
} | |
function captureStackTrace(error){ | |
$clinit_StackTraceCreator(); | |
collector.collect(error); | |
} | |
function extractFunctionName(fnName){ | |
var fnRE = /function(?:\s+([\w$]+))?\s*\(/; | |
var match_0 = fnRE.exec(fnName); | |
return match_0 && match_0[1] || 'anonymous'; | |
} | |
function supportsErrorStack(){ | |
if (Error.stackTraceLimit > 0) { | |
$wnd.Error.stackTraceLimit = Error.stackTraceLimit = 64; | |
return true; | |
} | |
return 'stack' in new Error; | |
} | |
var collector; | |
defineClass(151, 1, {}); | |
var Lcom_google_gwt_core_client_impl_StackTraceCreator$Collector_2_classLit = createForClass('com.google.gwt.core.client.impl', 'StackTraceCreator/Collector', 151); | |
function StackTraceCreator$CollectorLegacy(){ | |
} | |
defineClass(79, 151, {}, StackTraceCreator$CollectorLegacy); | |
_.collect = function collect(error){ | |
var seen = {}, name_1; | |
var fnStack = []; | |
error['fnStack'] = fnStack; | |
var callee = arguments.callee.caller; | |
while (callee) { | |
var name_0 = ($clinit_StackTraceCreator() , callee.name || (callee.name = extractFunctionName(callee.toString()))); | |
fnStack.push(name_0); | |
var keyName = ':' + name_0; | |
var withThisName = seen[keyName]; | |
if (withThisName) { | |
var i, j; | |
for (i = 0 , j = withThisName.length; i < j; i++) { | |
if (withThisName[i] === callee) { | |
return; | |
} | |
} | |
} | |
(withThisName || (seen[keyName] = [])).push(callee); | |
callee = callee.caller; | |
} | |
} | |
; | |
var Lcom_google_gwt_core_client_impl_StackTraceCreator$CollectorLegacy_2_classLit = createForClass('com.google.gwt.core.client.impl', 'StackTraceCreator/CollectorLegacy', 79); | |
defineClass(152, 151, {}); | |
_.collect = function collect_0(error){ | |
} | |
; | |
var Lcom_google_gwt_core_client_impl_StackTraceCreator$CollectorModern_2_classLit = createForClass('com.google.gwt.core.client.impl', 'StackTraceCreator/CollectorModern', 152); | |
function StackTraceCreator$CollectorModernNoSourceMap(){ | |
} | |
defineClass(80, 152, {}, StackTraceCreator$CollectorModernNoSourceMap); | |
var Lcom_google_gwt_core_client_impl_StackTraceCreator$CollectorModernNoSourceMap_2_classLit = createForClass('com.google.gwt.core.client.impl', 'StackTraceCreator/CollectorModernNoSourceMap', 80); | |
function canSet(array, value_0){ | |
var elementTypeCategory; | |
switch (getElementTypeCategory(array)) { | |
case 6: | |
return instanceOfString(value_0); | |
case 7: | |
return instanceOfDouble(value_0); | |
case 8: | |
return instanceOfBoolean(value_0); | |
case 3: | |
return Array.isArray(value_0) && (elementTypeCategory = getElementTypeCategory(value_0) , !(elementTypeCategory >= 14 && elementTypeCategory <= 16)); | |
case 11: | |
return value_0 != null && typeof value_0 === 'function'; | |
case 12: | |
return value_0 != null && isJsObject(value_0); | |
case 0: | |
return canCast(value_0, array.__elementTypeId$); | |
case 2: | |
return isJsObjectOrFunction(value_0) && !(value_0.typeMarker === typeMarkerFn); | |
case 1: | |
return isJsObjectOrFunction(value_0) && !(value_0.typeMarker === typeMarkerFn) || canCast(value_0, array.__elementTypeId$); | |
default:return true; | |
} | |
} | |
function getClassLiteralForArray(clazz, dimensions){ | |
return getClassLiteralForArray_0(clazz, dimensions); | |
} | |
function getElementTypeCategory(array){ | |
return array.__elementTypeCategory$ == null?10:array.__elementTypeCategory$; | |
} | |
function initUnidimensionalArray(leafClassLiteral, castableTypeMap, elementTypeId, length_0, elementTypeCategory, dimensions){ | |
var result; | |
result = initializeArrayElementsWithDefaults(elementTypeCategory, length_0); | |
elementTypeCategory != 10 && stampJavaTypeInfo(getClassLiteralForArray(leafClassLiteral, dimensions), castableTypeMap, elementTypeId, elementTypeCategory, result); | |
return result; | |
} | |
function initializeArrayElementsWithDefaults(elementTypeCategory, length_0){ | |
var array = new Array(length_0); | |
var initValue; | |
switch (elementTypeCategory) { | |
case 14: | |
case 15: | |
initValue = 0; | |
break; | |
case 16: | |
initValue = false; | |
break; | |
default:return array; | |
} | |
for (var i = 0; i < length_0; ++i) { | |
array[i] = initValue; | |
} | |
return array; | |
} | |
function isJavaArray(src_0){ | |
return Array.isArray(src_0) && src_0.typeMarker === typeMarkerFn; | |
} | |
function setCheck(array, index_0, value_0){ | |
checkCriticalArrayType(value_0 == null || canSet(array, value_0)); | |
return array[index_0] = value_0; | |
} | |
function stampJavaTypeInfo(arrayClass, castableTypeMap, elementTypeId, elementTypeCategory, array){ | |
array.___clazz = arrayClass; | |
array.castableTypeMap = castableTypeMap; | |
array.typeMarker = typeMarkerFn; | |
array.__elementTypeId$ = elementTypeId; | |
array.__elementTypeCategory$ = elementTypeCategory; | |
return array; | |
} | |
function stampJavaTypeInfo_0(array, referenceType){ | |
getElementTypeCategory(referenceType) != 10 && stampJavaTypeInfo(getClass__Ljava_lang_Class___devirtual$(referenceType), referenceType.castableTypeMap, referenceType.__elementTypeId$, getElementTypeCategory(referenceType), array); | |
return array; | |
} | |
function init(){ | |
var contentCore; | |
contentCore = new ContentCore; | |
$render(contentCore, wrapDomNode($wnd.document.getElementById('apploader-contentcentral'))); | |
$renderState(contentCore); | |
} | |
function toJava(e){ | |
var javaException; | |
if (instanceOf(e, 6)) { | |
return e; | |
} | |
javaException = e && e['__java$exception']; | |
if (!javaException) { | |
javaException = new JavaScriptException(e); | |
captureStackTrace(javaException); | |
} | |
return javaException; | |
} | |
function toJs(t){ | |
return t.backingJsObject; | |
} | |
function AbstractStringBuilder(string){ | |
this.string = string; | |
} | |
defineClass(56, 1, {53:1}); | |
_.toString_0 = function toString_7(){ | |
return this.string; | |
} | |
; | |
var Ljava_lang_AbstractStringBuilder_2_classLit = createForClass('java.lang', 'AbstractStringBuilder', 56); | |
function IndexOutOfBoundsException(message){ | |
RuntimeException_0.call(this, message); | |
} | |
defineClass(44, 10, $intern_5, IndexOutOfBoundsException); | |
var Ljava_lang_IndexOutOfBoundsException_2_classLit = createForClass('java.lang', 'IndexOutOfBoundsException', 44); | |
function ArrayIndexOutOfBoundsException(){ | |
RuntimeException.call(this); | |
} | |
defineClass(135, 44, $intern_5, ArrayIndexOutOfBoundsException); | |
var Ljava_lang_ArrayIndexOutOfBoundsException_2_classLit = createForClass('java.lang', 'ArrayIndexOutOfBoundsException', 135); | |
function ArrayStoreException(){ | |
RuntimeException.call(this); | |
} | |
defineClass(84, 10, $intern_5, ArrayStoreException); | |
var Ljava_lang_ArrayStoreException_2_classLit = createForClass('java.lang', 'ArrayStoreException', 84); | |
function $clinit_Boolean(){ | |
$clinit_Boolean = emptyMethod; | |
$clinit_Boolean(); | |
} | |
booleanCastMap = {3:1, 75:1, 21:1}; | |
var Ljava_lang_Boolean_2_classLit = createForClass('java.lang', 'Boolean', 75); | |
function digit(c){ | |
if (c >= 48 && c < 58) { | |
return c - 48; | |
} | |
if (c >= 97 && c < 97) { | |
return c - 97 + 10; | |
} | |
if (c >= 65 && c < 65) { | |
return c - 65 + 10; | |
} | |
return -1; | |
} | |
function ClassCastException(){ | |
RuntimeException.call(this); | |
} | |
defineClass(76, 10, $intern_5, ClassCastException); | |
var Ljava_lang_ClassCastException_2_classLit = createForClass('java.lang', 'ClassCastException', 76); | |
function Error_0(message){ | |
Throwable.call(this, message); | |
} | |
defineClass(8, 6, $intern_5, Error_0); | |
var Ljava_lang_Error_2_classLit = createForClass('java.lang', 'Error', 8); | |
defineClass(77, 10, $intern_5); | |
var Ljava_lang_IllegalArgumentException_2_classLit = createForClass('java.lang', 'IllegalArgumentException', 77); | |
function IllegalStateException(){ | |
RuntimeException.call(this); | |
} | |
defineClass(81, 10, $intern_5, IllegalStateException); | |
var Ljava_lang_IllegalStateException_2_classLit = createForClass('java.lang', 'IllegalStateException', 81); | |
function __parseAndValidateInt(s){ | |
var i, isTooLow, length_0, startIndex, toReturn; | |
if (s == null) { | |
throw toJs(new NumberFormatException('null')); | |
} | |
length_0 = s.length; | |
startIndex = length_0 > 0 && (s.charCodeAt(0) == 45 || s.charCodeAt(0) == 43)?1:0; | |
for (i = startIndex; i < length_0; i++) { | |
if (digit(s.charCodeAt(i)) == -1) { | |
throw toJs(new NumberFormatException('For input string: "' + s + '"')); | |
} | |
} | |
toReturn = parseInt(s, 10); | |
isTooLow = toReturn < -2147483648; | |
if (isNaN(toReturn)) { | |
throw toJs(new NumberFormatException('For input string: "' + s + '"')); | |
} | |
else if (isTooLow || toReturn > 2147483647) { | |
throw toJs(new NumberFormatException('For input string: "' + s + '"')); | |
} | |
return toReturn; | |
} | |
defineClass(54, 1, {3:1, 54:1}); | |
var Ljava_lang_Number_2_classLit = createForClass('java.lang', 'Number', 54); | |
function Integer(value_0){ | |
this.value_0 = value_0; | |
} | |
function valueOf(i){ | |
var rebase, result; | |
if (i > -129 && i < 128) { | |
rebase = i + 128; | |
result = ($clinit_Integer$BoxedValues() , boxedValues)[rebase]; | |
!result && (result = boxedValues[rebase] = new Integer(i)); | |
return result; | |
} | |
return new Integer(i); | |
} | |
defineClass(22, 54, {3:1, 21:1, 22:1, 54:1}, Integer); | |
_.equals_0 = function equals_1(o){ | |
return instanceOf(o, 22) && castTo(o, 22).value_0 == this.value_0; | |
} | |
; | |
_.hashCode_0 = function hashCode_3(){ | |
return this.value_0; | |
} | |
; | |
_.toString_0 = function toString_9(){ | |
return '' + this.value_0; | |
} | |
; | |
_.value_0 = 0; | |
var Ljava_lang_Integer_2_classLit = createForClass('java.lang', 'Integer', 22); | |
function $clinit_Integer$BoxedValues(){ | |
$clinit_Integer$BoxedValues = emptyMethod; | |
boxedValues = initUnidimensionalArray(Ljava_lang_Integer_2_classLit, $intern_3, 22, 256, 0, 1); | |
} | |
var boxedValues; | |
function NullPointerException(){ | |
RuntimeException.call(this); | |
} | |
defineClass(83, 57, $intern_5, NullPointerException); | |
_.createError = function createError_0(msg){ | |
return new $wnd.TypeError(msg); | |
} | |
; | |
var Ljava_lang_NullPointerException_2_classLit = createForClass('java.lang', 'NullPointerException', 83); | |
function NumberFormatException(message){ | |
RuntimeException_0.call(this, message); | |
} | |
defineClass(38, 77, $intern_5, NumberFormatException); | |
var Ljava_lang_NumberFormatException_2_classLit = createForClass('java.lang', 'NumberFormatException', 38); | |
function $charAt(this$static, index_0){ | |
return this$static.charCodeAt(index_0); | |
} | |
function $equals(this$static, other){ | |
return checkCriticalNotNull(this$static) , this$static === other; | |
} | |
function $split(this$static, regex){ | |
var compiled, count, lastNonEmpty, lastTrail, matchObj, out, trail; | |
compiled = new $wnd.RegExp(regex, 'g'); | |
out = initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_3, 2, 0, 6, 1); | |
count = 0; | |
trail = this$static; | |
lastTrail = null; | |
while (true) { | |
matchObj = compiled.exec(trail); | |
if (matchObj == null || trail == '') { | |
out[count] = trail; | |
break; | |
} | |
else { | |
out[count] = $substring(trail, 0, matchObj.index); | |
trail = $substring(trail, matchObj.index + matchObj[0].length, trail.length); | |
compiled.lastIndex = 0; | |
if (lastTrail == trail) { | |
out[count] = trail.substr(0, 1); | |
trail = trail.substr(1, trail.length - 1); | |
} | |
lastTrail = trail; | |
++count; | |
} | |
} | |
if (this$static.length > 0) { | |
lastNonEmpty = out.length; | |
while (lastNonEmpty > 0 && out[lastNonEmpty - 1] == '') { | |
--lastNonEmpty; | |
} | |
lastNonEmpty < out.length && (out.length = lastNonEmpty , undefined); | |
} | |
return out; | |
} | |
function $substring(this$static, beginIndex, endIndex){ | |
return this$static.substr(beginIndex, endIndex - beginIndex); | |
} | |
function join_1(elements){ | |
var e, e$iterator, joiner; | |
joiner = new StringJoiner('/'); | |
for (e$iterator = new ArrayList$1(elements); e$iterator.i < e$iterator.this$01.array.length;) { | |
e = castTo($next_0(e$iterator), 53); | |
!joiner.builder?(joiner.builder = new StringBuilder_0(joiner.prefix)):$append_1(joiner.builder, joiner.delimiter); | |
$append(joiner.builder, e); | |
} | |
return !joiner.builder?joiner.emptyValue:joiner.suffix.length == 0?joiner.builder.string:joiner.builder.string + ('' + joiner.suffix); | |
} | |
function valueOf_0(x_0){ | |
return !x_0?'null':x_0.name_0 != null?x_0.name_0:'' + x_0.ordinal; | |
} | |
stringCastMap = {3:1, 53:1, 21:1, 2:1}; | |
var Ljava_lang_String_2_classLit = createForClass('java.lang', 'String', 2); | |
function $append(this$static, x_0){ | |
this$static.string += '' + x_0; | |
return this$static; | |
} | |
function $append_0(this$static, x_0){ | |
this$static.string += '' + x_0; | |
return this$static; | |
} | |
function $append_1(this$static, x_0){ | |
this$static.string += '' + x_0; | |
return this$static; | |
} | |
function StringBuilder(){ | |
AbstractStringBuilder.call(this, ''); | |
} | |
function StringBuilder_0(s){ | |
AbstractStringBuilder.call(this, (checkCriticalNotNull(s) , s)); | |
} | |
defineClass(36, 56, {53:1}, StringBuilder, StringBuilder_0); | |
var Ljava_lang_StringBuilder_2_classLit = createForClass('java.lang', 'StringBuilder', 36); | |
defineClass(173, 1, {}); | |
function UnsupportedOperationException(){ | |
RuntimeException.call(this); | |
} | |
function UnsupportedOperationException_0(message){ | |
RuntimeException_0.call(this, message); | |
} | |
defineClass(37, 10, $intern_5, UnsupportedOperationException, UnsupportedOperationException_0); | |
var Ljava_lang_UnsupportedOperationException_2_classLit = createForClass('java.lang', 'UnsupportedOperationException', 37); | |
function $advanceToFind(this$static, o, remove){ | |
var e, iter; | |
for (iter = this$static.iterator(); iter.hasNext_0();) { | |
e = iter.next_0(); | |
if (maskUndefined(o) === maskUndefined(e) || o != null && equals_Ljava_lang_Object__Z__devirtual$(o, e)) { | |
remove && iter.remove_0(); | |
return true; | |
} | |
} | |
return false; | |
} | |
function $containsAll(this$static, c){ | |
var e, e$iterator; | |
checkCriticalNotNull(c); | |
for (e$iterator = c.iterator(); e$iterator.hasNext_0();) { | |
e = e$iterator.next_0(); | |
if (!this$static.contains(e)) { | |
return false; | |
} | |
} | |
return true; | |
} | |
defineClass(154, 1, {}); | |
_.add_0 = function add_0(o){ | |
throw toJs(new UnsupportedOperationException_0('Add not supported on this collection')); | |
} | |
; | |
_.contains = function contains(o){ | |
return $advanceToFind(this, o, false); | |
} | |
; | |
_.isEmpty = function isEmpty(){ | |
return this.size_1() == 0; | |
} | |
; | |
_.remove_1 = function remove_1(o){ | |
return $advanceToFind(this, o, true); | |
} | |
; | |
_.toArray = function toArray(){ | |
return this.toArray_0(initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_3, 1, this.size_1(), 5, 1)); | |
} | |
; | |
_.toArray_0 = function toArray_0(a){ | |
var i, it, result, size_0; | |
size_0 = this.size_1(); | |
a.length < size_0 && (a = (result = new Array(size_0) , stampJavaTypeInfo_0(result, a))); | |
it = this.iterator(); | |
for (i = 0; i < size_0; ++i) { | |
setCheck(a, i, it.next_0()); | |
} | |
a.length > size_0 && setCheck(a, size_0, null); | |
return a; | |
} | |
; | |
_.toString_0 = function toString_10(){ | |
var e, e$iterator, joiner; | |
joiner = new StringJoiner_0(', ', '[', ']'); | |
for (e$iterator = this.iterator(); e$iterator.hasNext_0();) { | |
e = e$iterator.next_0(); | |
$add_0(joiner, e === this?'(this Collection)':e == null?'null':toString_6(e)); | |
} | |
return !joiner.builder?joiner.emptyValue:joiner.suffix.length == 0?joiner.builder.string:joiner.builder.string + ('' + joiner.suffix); | |
} | |
; | |
var Ljava_util_AbstractCollection_2_classLit = createForClass('java.util', 'AbstractCollection', 154); | |
function $containsEntry(this$static, entry){ | |
var key, ourValue, value_0; | |
key = entry.getKey(); | |
value_0 = entry.getValue(); | |
ourValue = this$static.get_0(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){ | |
var entry, iter, k; | |
for (iter = new AbstractHashMap$EntrySetIterator(this$static.entrySet().this$01); iter.hasNext;) { | |
entry = $next(iter); | |
k = entry.getKey(); | |
if (maskUndefined(key) === maskUndefined(k) || key != null && equals_Ljava_lang_Object__Z__devirtual$(key, k)) { | |
return entry; | |
} | |
} | |
return null; | |
} | |
function $toString_3(this$static, o){ | |
return o === this$static?'(this Map)':o == null?'null':toString_6(o); | |
} | |
function getEntryValueOrNull(entry){ | |
return !entry?null:entry.getValue(); | |
} | |
defineClass(156, 1, {26:1}); | |
_.containsKey = function containsKey(key){ | |
return !!$implFindEntry(this, key); | |
} | |
; | |
_.equals_0 = function equals_2(obj){ | |
var entry, entry$iterator, otherMap; | |
if (obj === this) { | |
return true; | |
} | |
if (!instanceOf(obj, 26)) { | |
return false; | |
} | |
otherMap = castTo(obj, 26); | |
if (this.size_1() != otherMap.size_1()) { | |
return false; | |
} | |
for (entry$iterator = new AbstractHashMap$EntrySetIterator(otherMap.entrySet().this$01); entry$iterator.hasNext;) { | |
entry = $next(entry$iterator); | |
if (!$containsEntry(this, entry)) { | |
return false; | |
} | |
} | |
return true; | |
} | |
; | |
_.get_0 = function get_0(key){ | |
return getEntryValueOrNull($implFindEntry(this, key)); | |
} | |
; | |
_.hashCode_0 = function hashCode_4(){ | |
return hashCode_9(this.entrySet()); | |
} | |
; | |
_.size_1 = function size_1(){ | |
return $size(this.entrySet().this$01); | |
} | |
; | |
_.toString_0 = function toString_11(){ | |
var entry, entry$iterator, joiner; | |
joiner = new StringJoiner_0(', ', '{', '}'); | |
for (entry$iterator = new AbstractHashMap$EntrySetIterator(this.entrySet().this$01); entry$iterator.hasNext;) { | |
entry = $next(entry$iterator); | |
$add_0(joiner, $toString_3(this, entry.getKey()) + '=' + $toString_3(this, entry.getValue())); | |
} | |
return !joiner.builder?joiner.emptyValue:joiner.suffix.length == 0?joiner.builder.string:joiner.builder.string + ('' + joiner.suffix); | |
} | |
; | |
var Ljava_util_AbstractMap_2_classLit = createForClass('java.util', 'AbstractMap', 156); | |
function $containsKey(this$static, key){ | |
return instanceOfString(key)?$hasStringValue(this$static, key):!!$getEntry(this$static.hashCodeMap, key); | |
} | |
function $containsValue(this$static, value_0){ | |
return $containsValue_0(this$static, value_0, this$static.stringMap) || $containsValue_0(this$static, value_0, this$static.hashCodeMap); | |
} | |
function $containsValue_0(this$static, value_0, entries){ | |
var entry, entry$iterator; | |
for (entry$iterator = entries.iterator(); entry$iterator.hasNext_0();) { | |
entry = castTo(entry$iterator.next_0(), 14); | |
if (this$static.equals_1(value_0, entry.getValue())) { | |
return true; | |
} | |
} | |
return false; | |
} | |
function $get_0(this$static, key){ | |
return instanceOfString(key)?$getStringValue(this$static, key):getEntryValueOrNull($getEntry(this$static.hashCodeMap, key)); | |
} | |
function $getStringValue(this$static, key){ | |
return key == null?getEntryValueOrNull($getEntry(this$static.hashCodeMap, null)):$get_1(this$static.stringMap, key); | |
} | |
function $hasStringValue(this$static, key){ | |
return key == null?!!$getEntry(this$static.hashCodeMap, null):$contains_0(this$static.stringMap, key); | |
} | |
function $put(this$static, key, value_0){ | |
return instanceOfString(key)?$putStringValue(this$static, key, value_0):$put_0(this$static.hashCodeMap, key, value_0); | |
} | |
function $putStringValue(this$static, key, value_0){ | |
return key == null?$put_0(this$static.hashCodeMap, null, value_0):$put_1(this$static.stringMap, key, value_0); | |
} | |
function $remove(this$static, key){ | |
return instanceOfString(key)?$removeStringValue(this$static, key):$remove_2(this$static.hashCodeMap, key); | |
} | |
function $removeStringValue(this$static, key){ | |
return key == null?$remove_2(this$static.hashCodeMap, null):$remove_3(this$static.stringMap, key); | |
} | |
function $size(this$static){ | |
return this$static.hashCodeMap.size_0 + this$static.stringMap.size_0; | |
} | |
function AbstractHashMap(){ | |
var modCount; | |
this.hashCodeMap = new InternalHashCodeMap(this); | |
this.stringMap = new InternalStringMap(this); | |
modCount = this['_gwt_modCount'] | 0; | |
this['_gwt_modCount'] = modCount + 1; | |
} | |
defineClass(64, 156, {26:1}); | |
_.containsKey = function containsKey_0(key){ | |
return $containsKey(this, key); | |
} | |
; | |
_.entrySet = function entrySet(){ | |
return new AbstractHashMap$EntrySet(this); | |
} | |
; | |
_.get_0 = function get_1(key){ | |
return $get_0(this, key); | |
} | |
; | |
_.size_1 = function size_2(){ | |
return $size(this); | |
} | |
; | |
var Ljava_util_AbstractHashMap_2_classLit = createForClass('java.util', 'AbstractHashMap', 64); | |
defineClass(157, 154, {50:1}); | |
_.equals_0 = function equals_3(o){ | |
var other; | |
if (o === this) { | |
return true; | |
} | |
if (!instanceOf(o, 50)) { | |
return false; | |
} | |
other = castTo(o, 50); | |
if (other.size_1() != this.size_1()) { | |
return false; | |
} | |
return $containsAll(this, other); | |
} | |
; | |
_.hashCode_0 = function hashCode_5(){ | |
return hashCode_9(this); | |
} | |
; | |
var Ljava_util_AbstractSet_2_classLit = createForClass('java.util', 'AbstractSet', 157); | |
function $contains(this$static, o){ | |
if (instanceOf(o, 14)) { | |
return $containsEntry(this$static.this$01, castTo(o, 14)); | |
} | |
return false; | |
} | |
function AbstractHashMap$EntrySet(this$0){ | |
this.this$01 = this$0; | |
} | |
defineClass(23, 157, {50:1}, AbstractHashMap$EntrySet); | |
_.contains = function contains_0(o){ | |
return $contains(this, o); | |
} | |
; | |
_.iterator = function iterator_1(){ | |
return new AbstractHashMap$EntrySetIterator(this.this$01); | |
} | |
; | |
_.remove_1 = function remove_2(entry){ | |
var key; | |
if ($contains(this, entry)) { | |
key = (checkCriticalType(entry == null) , entry).$_nullMethod(); | |
$remove(this.this$01, key); | |
return true; | |
} | |
return false; | |
} | |
; | |
_.size_1 = function size_3(){ | |
return $size(this.this$01); | |
} | |
; | |
var Ljava_util_AbstractHashMap$EntrySet_2_classLit = createForClass('java.util', 'AbstractHashMap/EntrySet', 23); | |
function $computeHasNext(this$static){ | |
if (this$static.current.hasNext_0()) { | |
return true; | |
} | |
if (this$static.current != this$static.stringMapEntries) { | |
return false; | |
} | |
this$static.current = new InternalHashCodeMap$1(this$static.this$01.hashCodeMap); | |
return this$static.current.hasNext_0(); | |
} | |
function $next(this$static){ | |
var rv; | |
checkStructuralChange(this$static.this$01, this$static); | |
checkCriticalElement(this$static.hasNext); | |
this$static.last = this$static.current; | |
rv = castTo(this$static.current.next_0(), 14); | |
this$static.hasNext = $computeHasNext(this$static); | |
return rv; | |
} | |
function $remove_0(this$static){ | |
var modCount; | |
checkCriticalState(!!this$static.last); | |
checkStructuralChange(this$static.this$01, this$static); | |
this$static.last.remove_0(); | |
this$static.last = null; | |
this$static.hasNext = $computeHasNext(this$static); | |
modCount = this$static.this$01['_gwt_modCount']; | |
this$static['_gwt_modCount'] = modCount; | |
} | |
function AbstractHashMap$EntrySetIterator(this$0){ | |
var modCount; | |
this.this$01 = this$0; | |
this.stringMapEntries = new InternalStringMap$1(this.this$01.stringMap); | |
this.current = this.stringMapEntries; | |
this.hasNext = $computeHasNext(this); | |
modCount = this$0['_gwt_modCount']; | |
this['_gwt_modCount'] = modCount; | |
} | |
defineClass(13, 1, {}, AbstractHashMap$EntrySetIterator); | |
_.next_0 = function next_0(){ | |
return $next(this); | |
} | |
; | |
_.hasNext_0 = function hasNext_0(){ | |
return this.hasNext; | |
} | |
; | |
_.remove_0 = function remove_3(){ | |
$remove_0(this); | |
} | |
; | |
_.hasNext = false; | |
var Ljava_util_AbstractHashMap$EntrySetIterator_2_classLit = createForClass('java.util', 'AbstractHashMap/EntrySetIterator', 13); | |
function $indexOf(this$static, toFind){ | |
var i, n; | |
for (i = 0 , n = this$static.size_1(); i < n; ++i) { | |
if (equals_10(toFind, this$static.get_1(i))) { | |
return i; | |
} | |
} | |
return -1; | |
} | |
defineClass(155, 154, {12:1}); | |
_.add_1 = function add_1(index_0, element){ | |
throw toJs(new UnsupportedOperationException_0('Add not supported on this list')); | |
} | |
; | |
_.add_0 = function add_2(obj){ | |
this.add_1(this.size_1(), obj); | |
return true; | |
} | |
; | |
_.equals_0 = function equals_4(o){ | |
var elem, elem$iterator, elemOther, iterOther, other; | |
if (o === this) { | |
return true; | |
} | |
if (!instanceOf(o, 12)) { | |
return false; | |
} | |
other = castTo(o, 12); | |
if (this.size_1() != other.size_1()) { | |
return false; | |
} | |
iterOther = other.iterator(); | |
for (elem$iterator = this.iterator(); elem$iterator.hasNext_0();) { | |
elem = elem$iterator.next_0(); | |
elemOther = iterOther.next_0(); | |
if (!(maskUndefined(elem) === maskUndefined(elemOther) || elem != null && equals_Ljava_lang_Object__Z__devirtual$(elem, elemOther))) { | |
return false; | |
} | |
} | |
return true; | |
} | |
; | |
_.hashCode_0 = function hashCode_6(){ | |
return hashCode_10(this); | |
} | |
; | |
_.indexOf_0 = function indexOf(toFind){ | |
return $indexOf(this, toFind); | |
} | |
; | |
_.iterator = function iterator_2(){ | |
return new AbstractList$IteratorImpl(this); | |
} | |
; | |
_.remove_2 = function remove_4(index_0){ | |
throw toJs(new UnsupportedOperationException_0('Remove not supported on this list')); | |
} | |
; | |
var Ljava_util_AbstractList_2_classLit = createForClass('java.util', 'AbstractList', 155); | |
function AbstractList$IteratorImpl(this$0){ | |
this.this$01 = this$0; | |
} | |
defineClass(63, 1, {}, AbstractList$IteratorImpl); | |
_.hasNext_0 = function hasNext_1(){ | |
return this.i < this.this$01.size_1(); | |
} | |
; | |
_.next_0 = function next_1(){ | |
return checkCriticalElement(this.i < this.this$01.size_1()) , this.this$01.get_1(this.last = this.i++); | |
} | |
; | |
_.remove_0 = function remove_5(){ | |
checkCriticalState(this.last != -1); | |
this.this$01.remove_2(this.last); | |
this.i = this.last; | |
this.last = -1; | |
} | |
; | |
_.i = 0; | |
_.last = -1; | |
var Ljava_util_AbstractList$IteratorImpl_2_classLit = createForClass('java.util', 'AbstractList/IteratorImpl', 63); | |
function AbstractMap$1(this$0){ | |
this.this$01 = this$0; | |
} | |
defineClass(119, 157, {50:1}, AbstractMap$1); | |
_.contains = function contains_1(key){ | |
return $containsKey(this.this$01, key); | |
} | |
; | |
_.iterator = function iterator_3(){ | |
var outerIter; | |
return outerIter = new AbstractHashMap$EntrySetIterator((new AbstractHashMap$EntrySet(this.this$01)).this$01) , new AbstractMap$1$1(outerIter); | |
} | |
; | |
_.remove_1 = function remove_6(key){ | |
if ($containsKey(this.this$01, key)) { | |
$remove(this.this$01, key); | |
return true; | |
} | |
return false; | |
} | |
; | |
_.size_1 = function size_4(){ | |
return $size(this.this$01); | |
} | |
; | |
var Ljava_util_AbstractMap$1_2_classLit = createForClass('java.util', 'AbstractMap/1', 119); | |
function AbstractMap$1$1(val$outerIter){ | |
this.val$outerIter2 = val$outerIter; | |
} | |
defineClass(65, 1, {}, AbstractMap$1$1); | |
_.hasNext_0 = function hasNext_2(){ | |
return this.val$outerIter2.hasNext; | |
} | |
; | |
_.next_0 = function next_2(){ | |
var entry; | |
return entry = $next(this.val$outerIter2) , entry.getKey(); | |
} | |
; | |
_.remove_0 = function remove_7(){ | |
$remove_0(this.val$outerIter2); | |
} | |
; | |
var Ljava_util_AbstractMap$1$1_2_classLit = createForClass('java.util', 'AbstractMap/1/1', 65); | |
function AbstractMap$2(this$0){ | |
this.this$01 = this$0; | |
} | |
defineClass(120, 154, {}, AbstractMap$2); | |
_.contains = function contains_2(value_0){ | |
return $containsValue(this.this$01, value_0); | |
} | |
; | |
_.iterator = function iterator_4(){ | |
var outerIter; | |
return outerIter = new AbstractHashMap$EntrySetIterator((new AbstractHashMap$EntrySet(this.this$01)).this$01) , new AbstractMap$2$1(outerIter); | |
} | |
; | |
_.size_1 = function size_5(){ | |
return $size(this.this$01); | |
} | |
; | |
var Ljava_util_AbstractMap$2_2_classLit = createForClass('java.util', 'AbstractMap/2', 120); | |
function AbstractMap$2$1(val$outerIter){ | |
this.val$outerIter2 = val$outerIter; | |
} | |
defineClass(66, 1, {}, AbstractMap$2$1); | |
_.hasNext_0 = function hasNext_3(){ | |
return this.val$outerIter2.hasNext; | |
} | |
; | |
_.next_0 = function next_3(){ | |
var entry; | |
return entry = $next(this.val$outerIter2) , entry.getValue(); | |
} | |
; | |
_.remove_0 = function remove_8(){ | |
$remove_0(this.val$outerIter2); | |
} | |
; | |
var Ljava_util_AbstractMap$2$1_2_classLit = createForClass('java.util', 'AbstractMap/2/1', 66); | |
defineClass(117, 1, $intern_6); | |
_.equals_0 = function equals_5(other){ | |
var entry; | |
if (!instanceOf(other, 14)) { | |
return false; | |
} | |
entry = castTo(other, 14); | |
return equals_10(this.key, entry.getKey()) && equals_10(this.value_0, entry.getValue()); | |
} | |
; | |
_.getKey = function getKey(){ | |
return this.key; | |
} | |
; | |
_.getValue = function getValue(){ | |
return this.value_0; | |
} | |
; | |
_.hashCode_0 = function hashCode_7(){ | |
return hashCode_12(this.key) ^ hashCode_12(this.value_0); | |
} | |
; | |
_.setValue = function setValue(value_0){ | |
var oldValue; | |
oldValue = this.value_0; | |
this.value_0 = value_0; | |
return oldValue; | |
} | |
; | |
_.toString_0 = function toString_12(){ | |
return this.key + '=' + this.value_0; | |
} | |
; | |
var Ljava_util_AbstractMap$AbstractEntry_2_classLit = createForClass('java.util', 'AbstractMap/AbstractEntry', 117); | |
function AbstractMap$SimpleEntry(key, value_0){ | |
this.key = key; | |
this.value_0 = value_0; | |
} | |
defineClass(118, 117, $intern_6, AbstractMap$SimpleEntry); | |
var Ljava_util_AbstractMap$SimpleEntry_2_classLit = createForClass('java.util', 'AbstractMap/SimpleEntry', 118); | |
defineClass(158, 1, $intern_6); | |
_.equals_0 = function equals_6(other){ | |
var entry; | |
if (!instanceOf(other, 14)) { | |
return false; | |
} | |
entry = castTo(other, 14); | |
return equals_10(this.val$entry2.value[0], entry.getKey()) && equals_10($getValue_0(this), entry.getValue()); | |
} | |
; | |
_.hashCode_0 = function hashCode_8(){ | |
return hashCode_12(this.val$entry2.value[0]) ^ hashCode_12($getValue_0(this)); | |
} | |
; | |
_.toString_0 = function toString_13(){ | |
return this.val$entry2.value[0] + '=' + $getValue_0(this); | |
} | |
; | |
var Ljava_util_AbstractMapEntry_2_classLit = createForClass('java.util', 'AbstractMapEntry', 158); | |
function $$init(this$static){ | |
this$static.array = initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_3, 1, 0, 5, 1); | |
} | |
function $add(this$static, o){ | |
this$static.array[this$static.array.length] = o; | |
return true; | |
} | |
function $indexOf_0(this$static, o, index_0){ | |
for (; index_0 < this$static.array.length; ++index_0) { | |
if (equals_10(o, this$static.array[index_0])) { | |
return index_0; | |
} | |
} | |
return -1; | |
} | |
function $remove_1(this$static, index_0){ | |
var previous; | |
previous = (checkCriticalElementIndex(index_0, this$static.array.length) , this$static.array[index_0]); | |
removeFrom(this$static.array, index_0, 1); | |
return previous; | |
} | |
function ArrayList(){ | |
$$init(this); | |
} | |
function ArrayList_0(c){ | |
$$init(this); | |
insertTo_0(this.array, c.toArray()); | |
} | |
defineClass(15, 155, {3:1, 12:1}, ArrayList, ArrayList_0); | |
_.add_1 = function add_3(index_0, o){ | |
checkCriticalPositionIndex(index_0, this.array.length); | |
insertTo(this.array, index_0, o); | |
} | |
; | |
_.add_0 = function add_4(o){ | |
return $add(this, o); | |
} | |
; | |
_.contains = function contains_3(o){ | |
return $indexOf_0(this, o, 0) != -1; | |
} | |
; | |
_.get_1 = function get_2(index_0){ | |
return checkCriticalElementIndex(index_0, this.array.length) , this.array[index_0]; | |
} | |
; | |
_.indexOf_0 = function indexOf_0(o){ | |
return $indexOf_0(this, o, 0); | |
} | |
; | |
_.isEmpty = function isEmpty_0(){ | |
return this.array.length == 0; | |
} | |
; | |
_.iterator = function iterator_5(){ | |
return new ArrayList$1(this); | |
} | |
; | |
_.remove_2 = function remove_9(index_0){ | |
return $remove_1(this, index_0); | |
} | |
; | |
_.remove_1 = function remove_10(o){ | |
var i; | |
i = $indexOf_0(this, o, 0); | |
if (i == -1) { | |
return false; | |
} | |
checkCriticalElementIndex(i, this.array.length); | |
removeFrom(this.array, i, 1); | |
return true; | |
} | |
; | |
_.size_1 = function size_6(){ | |
return this.array.length; | |
} | |
; | |
_.toArray = function toArray_1(){ | |
return clone(this.array, this.array.length); | |
} | |
; | |
_.toArray_0 = function toArray_2(out){ | |
var i, result, size_0; | |
size_0 = this.array.length; | |
out.length < size_0 && (out = (result = new Array(size_0) , stampJavaTypeInfo_0(result, out))); | |
for (i = 0; i < size_0; ++i) { | |
setCheck(out, i, this.array[i]); | |
} | |
out.length > size_0 && setCheck(out, size_0, null); | |
return out; | |
} | |
; | |
var Ljava_util_ArrayList_2_classLit = createForClass('java.util', 'ArrayList', 15); | |
function $next_0(this$static){ | |
checkCriticalElement(this$static.i < this$static.this$01.array.length); | |
this$static.last = this$static.i++; | |
return this$static.this$01.array[this$static.last]; | |
} | |
function ArrayList$1(this$0){ | |
this.this$01 = this$0; | |
} | |
defineClass(42, 1, {}, ArrayList$1); | |
_.hasNext_0 = function hasNext_4(){ | |
return this.i < this.this$01.array.length; | |
} | |
; | |
_.next_0 = function next_4(){ | |
return $next_0(this); | |
} | |
; | |
_.remove_0 = function remove_11(){ | |
checkCriticalState(this.last != -1); | |
$remove_1(this.this$01, this.i = this.last); | |
this.last = -1; | |
} | |
; | |
_.i = 0; | |
_.last = -1; | |
var Ljava_util_ArrayList$1_2_classLit = createForClass('java.util', 'ArrayList/1', 42); | |
function $toArray(this$static, out){ | |
var i, result, size_0; | |
size_0 = this$static.array.length; | |
out.length < size_0 && (out = (result = new Array(size_0) , stampJavaTypeInfo_0(result, out))); | |
for (i = 0; i < size_0; ++i) { | |
setCheck(out, i, this$static.array[i]); | |
} | |
out.length > size_0 && setCheck(out, size_0, null); | |
return out; | |
} | |
function Arrays$ArrayList(array){ | |
checkCriticalNotNull(array); | |
this.array = array; | |
} | |
defineClass(122, 155, {3:1, 12:1}, Arrays$ArrayList); | |
_.contains = function contains_4(o){ | |
return $indexOf(this, o) != -1; | |
} | |
; | |
_.get_1 = function get_3(index_0){ | |
checkCriticalElementIndex(index_0, this.array.length); | |
return this.array[index_0]; | |
} | |
; | |
_.size_1 = function size_7(){ | |
return this.array.length; | |
} | |
; | |
_.toArray = function toArray_3(){ | |
return $toArray(this, initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_3, 1, this.array.length, 5, 1)); | |
} | |
; | |
_.toArray_0 = function toArray_4(out){ | |
return $toArray(this, out); | |
} | |
; | |
var Ljava_util_Arrays$ArrayList_2_classLit = createForClass('java.util', 'Arrays/ArrayList', 122); | |
function hashCode_9(collection){ | |
var e, e$iterator, hashCode; | |
hashCode = 0; | |
for (e$iterator = collection.iterator(); e$iterator.hasNext_0();) { | |
e = e$iterator.next_0(); | |
hashCode = hashCode + (e != null?hashCode__I__devirtual$(e):0); | |
hashCode = hashCode | 0; | |
} | |
return hashCode; | |
} | |
function hashCode_10(list){ | |
var e, e$iterator, hashCode; | |
hashCode = 1; | |
for (e$iterator = list.iterator(); e$iterator.hasNext_0();) { | |
e = e$iterator.next_0(); | |
hashCode = 31 * hashCode + (e != null?hashCode__I__devirtual$(e):0); | |
hashCode = hashCode | 0; | |
} | |
return hashCode; | |
} | |
function checkStructuralChange(host, iterator){ | |
if (iterator['_gwt_modCount'] != host['_gwt_modCount']) { | |
throw toJs(new ConcurrentModificationException); | |
} | |
} | |
function structureChanged(map_0){ | |
var modCount; | |
modCount = map_0['_gwt_modCount'] | 0; | |
map_0['_gwt_modCount'] = modCount + 1; | |
} | |
function ConcurrentModificationException(){ | |
RuntimeException.call(this); | |
} | |
defineClass(138, 10, $intern_5, ConcurrentModificationException); | |
var Ljava_util_ConcurrentModificationException_2_classLit = createForClass('java.util', 'ConcurrentModificationException', 138); | |
function HashMap(){ | |
AbstractHashMap.call(this); | |
} | |
defineClass(35, 64, {3:1, 26:1}, HashMap); | |
_.equals_1 = function equals_7(value1, value2){ | |
return maskUndefined(value1) === maskUndefined(value2) || value1 != null && equals_Ljava_lang_Object__Z__devirtual$(value1, value2); | |
} | |
; | |
_.getHashCode = function getHashCode(key){ | |
var hashCode; | |
hashCode = hashCode__I__devirtual$(key); | |
return hashCode | 0; | |
} | |
; | |
var Ljava_util_HashMap_2_classLit = createForClass('java.util', 'HashMap', 35); | |
function IdentityHashMap(){ | |
AbstractHashMap.call(this); | |
} | |
defineClass(123, 64, {3:1, 26:1}, IdentityHashMap); | |
_.equals_0 = function equals_8(obj){ | |
var entry, entry$iterator, otherKey, otherMap, otherValue; | |
if (obj === this) { | |
return true; | |
} | |
if (!instanceOf(obj, 26)) { | |
return false; | |
} | |
otherMap = castTo(obj, 26); | |
if (this.hashCodeMap.size_0 + this.stringMap.size_0 != otherMap.size_1()) { | |
return false; | |
} | |
for (entry$iterator = new AbstractHashMap$EntrySetIterator(otherMap.entrySet().this$01); entry$iterator.hasNext;) { | |
entry = $next(entry$iterator); | |
otherKey = entry.getKey(); | |
otherValue = entry.getValue(); | |
if (!(instanceOfString(otherKey)?$hasStringValue(this, otherKey):!!$getEntry(this.hashCodeMap, otherKey))) { | |
return false; | |
} | |
if (maskUndefined(otherValue) !== maskUndefined(instanceOfString(otherKey)?$getStringValue(this, otherKey):getEntryValueOrNull($getEntry(this.hashCodeMap, otherKey)))) { | |
return false; | |
} | |
} | |
return true; | |
} | |
; | |
_.equals_1 = function equals_9(value1, value2){ | |
return maskUndefined(value1) === maskUndefined(value2); | |
} | |
; | |
_.getHashCode = function getHashCode_0(key){ | |
return getHashCode_1(key); | |
} | |
; | |
_.hashCode_0 = function hashCode_11(){ | |
var entry, entry$iterator, hashCode; | |
hashCode = 0; | |
for (entry$iterator = new AbstractHashMap$EntrySetIterator((new AbstractHashMap$EntrySet(this)).this$01); entry$iterator.hasNext;) { | |
entry = $next(entry$iterator); | |
hashCode += getIdentityHashCode(entry.getKey()); | |
hashCode += getIdentityHashCode(entry.getValue()); | |
} | |
return hashCode; | |
} | |
; | |
var Ljava_util_IdentityHashMap_2_classLit = createForClass('java.util', 'IdentityHashMap', 123); | |
function $findEntryInChain(this$static, key, chain){ | |
var entry, entry$index, entry$max; | |
for (entry$index = 0 , entry$max = chain.length; entry$index < entry$max; ++entry$index) { | |
entry = chain[entry$index]; | |
if (this$static.host.equals_1(key, entry.getKey())) { | |
return entry; | |
} | |
} | |
return null; | |
} | |
function $getChainOrEmpty(this$static, hashCode){ | |
var chain; | |
chain = this$static.backingMap.get(hashCode); | |
return chain == null?[]:chain; | |
} | |
function $getEntry(this$static, key){ | |
return $findEntryInChain(this$static, key, $getChainOrEmpty(this$static, key == null?0:this$static.host.getHashCode(key))); | |
} | |
function $put_0(this$static, key, value_0){ | |
var chain, chain0, entry, hashCode; | |
hashCode = key == null?0:this$static.host.getHashCode(key); | |
chain0 = (chain = this$static.backingMap.get(hashCode) , chain == null?[]:chain); | |
if (chain0.length == 0) { | |
this$static.backingMap.set(hashCode, chain0); | |
} | |
else { | |
entry = $findEntryInChain(this$static, key, chain0); | |
if (entry) { | |
return entry.setValue(value_0); | |
} | |
} | |
setCheck(chain0, chain0.length, new AbstractMap$SimpleEntry(key, value_0)); | |
++this$static.size_0; | |
structureChanged(this$static.host); | |
return null; | |
} | |
function $remove_2(this$static, key){ | |
var chain, chain0, entry, hashCode, i; | |
hashCode = key == null?0:this$static.host.getHashCode(key); | |
chain0 = (chain = this$static.backingMap.get(hashCode) , chain == null?[]:chain); | |
for (i = 0; i < chain0.length; i++) { | |
entry = chain0[i]; | |
if (this$static.host.equals_1(key, entry.getKey())) { | |
if (chain0.length == 1) { | |
chain0.length = 0; | |
this$static.backingMap['delete'](hashCode); | |
} | |
else { | |
chain0.splice(i, 1); | |
} | |
--this$static.size_0; | |
structureChanged(this$static.host); | |
return entry.getValue(); | |
} | |
} | |
return null; | |
} | |
function InternalHashCodeMap(host){ | |
this.backingMap = newJsMap(); | |
this.host = host; | |
} | |
defineClass(128, 1, {}, InternalHashCodeMap); | |
_.iterator = function iterator_6(){ | |
return new InternalHashCodeMap$1(this); | |
} | |
; | |
_.size_0 = 0; | |
var Ljava_util_InternalHashCodeMap_2_classLit = createForClass('java.util', 'InternalHashCodeMap', 128); | |
function InternalHashCodeMap$1(this$0){ | |
this.this$01 = this$0; | |
this.chains = this.this$01.backingMap.entries(); | |
this.chain = []; | |
} | |
defineClass(68, 1, {}, InternalHashCodeMap$1); | |
_.next_0 = function next_5(){ | |
return this.lastEntry = this.chain[this.itemIndex++] , this.lastEntry; | |
} | |
; | |
_.hasNext_0 = function hasNext_5(){ | |
var current; | |
if (this.itemIndex < this.chain.length) { | |
return true; | |
} | |
current = this.chains.next(); | |
if (!current.done) { | |
this.chain = current.value[1]; | |
this.itemIndex = 0; | |
return true; | |
} | |
return false; | |
} | |
; | |
_.remove_0 = function remove_12(){ | |
$remove_2(this.this$01, this.lastEntry.getKey()); | |
this.itemIndex != 0 && --this.itemIndex; | |
} | |
; | |
_.itemIndex = 0; | |
_.lastEntry = null; | |
var Ljava_util_InternalHashCodeMap$1_2_classLit = createForClass('java.util', 'InternalHashCodeMap/1', 68); | |
function $clinit_InternalJsMapFactory(){ | |
$clinit_InternalJsMapFactory = emptyMethod; | |
jsMapCtor = getJsMapConstructor(); | |
} | |
function canHandleObjectCreateAndProto(){ | |
if (!Object.create || !Object.getOwnPropertyNames) { | |
return false; | |
} | |
var protoField = '__proto__'; | |
var map_0 = Object.create(null); | |
if (map_0[protoField] !== undefined) { | |
return false; | |
} | |
var keys_0 = Object.getOwnPropertyNames(map_0); | |
if (keys_0.length != 0) { | |
return false; | |
} | |
map_0[protoField] = 42; | |
if (map_0[protoField] !== 42) { | |
return false; | |
} | |
if (Object.getOwnPropertyNames(map_0).length == 0) { | |
return false; | |
} | |
return true; | |
} | |
function getJsMapConstructor(){ | |
function isCorrectIterationProtocol(){ | |
try { | |
return (new Map).entries().next().done; | |
} | |
catch (e) { | |
return false; | |
} | |
} | |
if (typeof Map === 'function' && Map.prototype.entries && isCorrectIterationProtocol()) { | |
return Map; | |
} | |
else { | |
return getJsMapPolyFill(); | |
} | |
} | |
function getJsMapPolyFill(){ | |
function Stringmap(){ | |
this.obj = this.createObject(); | |
} | |
; | |
Stringmap.prototype.createObject = function(key){ | |
return Object.create(null); | |
} | |
; | |
Stringmap.prototype.get = function(key){ | |
return this.obj[key]; | |
} | |
; | |
Stringmap.prototype.set = function(key, value_0){ | |
this.obj[key] = value_0; | |
} | |
; | |
Stringmap.prototype['delete'] = function(key){ | |
delete this.obj[key]; | |
} | |
; | |
Stringmap.prototype.keys = function(){ | |
return Object.getOwnPropertyNames(this.obj); | |
} | |
; | |
Stringmap.prototype.entries = function(){ | |
var keys_0 = this.keys(); | |
var map_0 = this; | |
var nextIndex = 0; | |
return {next:function(){ | |
if (nextIndex >= keys_0.length) | |
return {done:true}; | |
var key = keys_0[nextIndex++]; | |
return {value:[key, map_0.get(key)], done:false}; | |
} | |
}; | |
} | |
; | |
if (!canHandleObjectCreateAndProto()) { | |
Stringmap.prototype.createObject = function(){ | |
return {}; | |
} | |
; | |
Stringmap.prototype.get = function(key){ | |
return this.obj[':' + key]; | |
} | |
; | |
Stringmap.prototype.set = function(key, value_0){ | |
this.obj[':' + key] = value_0; | |
} | |
; | |
Stringmap.prototype['delete'] = function(key){ | |
delete this.obj[':' + key]; | |
} | |
; | |
Stringmap.prototype.keys = function(){ | |
var result = []; | |
for (var key in this.obj) { | |
key.charCodeAt(0) == 58 && result.push(key.substring(1)); | |
} | |
return result; | |
} | |
; | |
} | |
return Stringmap; | |
} | |
function newJsMap(){ | |
$clinit_InternalJsMapFactory(); | |
return new jsMapCtor; | |
} | |
var jsMapCtor; | |
function $contains_0(this$static, key){ | |
return !(this$static.backingMap.get(key) === undefined); | |
} | |
function $get_1(this$static, key){ | |
return this$static.backingMap.get(key); | |
} | |
function $put_1(this$static, key, value_0){ | |
var oldValue; | |
oldValue = this$static.backingMap.get(key); | |
this$static.backingMap.set(key, value_0 === undefined?null:value_0); | |
if (oldValue === undefined) { | |
++this$static.size_0; | |
structureChanged(this$static.host); | |
} | |
else { | |
++this$static.valueMod; | |
} | |
return oldValue; | |
} | |
function $remove_3(this$static, key){ | |
var value_0; | |
value_0 = this$static.backingMap.get(key); | |
if (value_0 === undefined) { | |
++this$static.valueMod; | |
} | |
else { | |
this$static.backingMap['delete'](key); | |
--this$static.size_0; | |
structureChanged(this$static.host); | |
} | |
return value_0; | |
} | |
function InternalStringMap(host){ | |
this.backingMap = newJsMap(); | |
this.host = host; | |
} | |
defineClass(126, 1, {}, InternalStringMap); | |
_.iterator = function iterator_7(){ | |
return new InternalStringMap$1(this); | |
} | |
; | |
_.size_0 = 0; | |
_.valueMod = 0; | |
var Ljava_util_InternalStringMap_2_classLit = createForClass('java.util', 'InternalStringMap', 126); | |
function InternalStringMap$1(this$0){ | |
this.this$01 = this$0; | |
this.entries_0 = this.this$01.backingMap.entries(); | |
this.current = this.entries_0.next(); | |
} | |
defineClass(67, 1, {}, InternalStringMap$1); | |
_.next_0 = function next_6(){ | |
return this.last = this.current , this.current = this.entries_0.next() , new InternalStringMap$2(this.this$01, this.last, this.this$01.valueMod); | |
} | |
; | |
_.hasNext_0 = function hasNext_6(){ | |
return !this.current.done; | |
} | |
; | |
_.remove_0 = function remove_13(){ | |
$remove_3(this.this$01, this.last.value[0]); | |
} | |
; | |
var Ljava_util_InternalStringMap$1_2_classLit = createForClass('java.util', 'InternalStringMap/1', 67); | |
function $getValue_0(this$static){ | |
if (this$static.this$01.valueMod != this$static.val$lastValueMod3) { | |
return $get_1(this$static.this$01, this$static.val$entry2.value[0]); | |
} | |
return this$static.val$entry2.value[1]; | |
} | |
function InternalStringMap$2(this$0, val$entry, val$lastValueMod){ | |
this.this$01 = this$0; | |
this.val$entry2 = val$entry; | |
this.val$lastValueMod3 = val$lastValueMod; | |
} | |
defineClass(127, 158, $intern_6, InternalStringMap$2); | |
_.getKey = function getKey_0(){ | |
return this.val$entry2.value[0]; | |
} | |
; | |
_.getValue = function getValue_0(){ | |
return $getValue_0(this); | |
} | |
; | |
_.setValue = function setValue_0(object){ | |
return $put_1(this.this$01, this.val$entry2.value[0], object); | |
} | |
; | |
_.val$lastValueMod3 = 0; | |
var Ljava_util_InternalStringMap$2_2_classLit = createForClass('java.util', 'InternalStringMap/2', 127); | |
function NoSuchElementException(){ | |
RuntimeException.call(this); | |
} | |
defineClass(137, 10, $intern_5, NoSuchElementException); | |
var Ljava_util_NoSuchElementException_2_classLit = createForClass('java.util', 'NoSuchElementException', 137); | |
function equals_10(a, b){ | |
return maskUndefined(a) === maskUndefined(b) || a != null && equals_Ljava_lang_Object__Z__devirtual$(a, b); | |
} | |
function hashCode_12(o){ | |
return o != null?hashCode__I__devirtual$(o):0; | |
} | |
function $add_0(this$static, newElement){ | |
!this$static.builder?(this$static.builder = new StringBuilder_0(this$static.prefix)):$append_1(this$static.builder, this$static.delimiter); | |
$append(this$static.builder, newElement); | |
return this$static; | |
} | |
function StringJoiner(delimiter){ | |
StringJoiner_0.call(this, delimiter, '', ''); | |
} | |
function StringJoiner_0(delimiter, prefix, suffix){ | |
this.delimiter = delimiter; | |
this.prefix = prefix; | |
this.suffix = suffix; | |
this.emptyValue = this.prefix + ('' + this.suffix); | |
} | |
defineClass(27, 1, {}, StringJoiner, StringJoiner_0); | |
_.toString_0 = function toString_14(){ | |
return !this.builder?this.emptyValue:this.suffix.length == 0?this.builder.string:this.builder.string + ('' + this.suffix); | |
} | |
; | |
var Ljava_util_StringJoiner_2_classLit = createForClass('java.util', 'StringJoiner', 27); | |
function applySplice(array, index_0, deleteCount, arrayToAdd){ | |
Array.prototype.splice.apply(array, [index_0, deleteCount].concat(arrayToAdd)); | |
} | |
function clone(array, toIndex){ | |
var result; | |
result = array.slice(0, toIndex); | |
return stampJavaTypeInfo_0(result, array); | |
} | |
function copy(src_0, srcOfs, dest, destOfs, len){ | |
var batchEnd, batchStart, end; | |
if (src_0 === dest) { | |
src_0 = src_0.slice(srcOfs, srcOfs + len); | |
srcOfs = 0; | |
} | |
for (batchStart = srcOfs , end = srcOfs + len; batchStart < end;) { | |
batchEnd = batchStart + 10000 < end?batchStart + 10000:end; | |
len = batchEnd - batchStart; | |
applySplice(dest, destOfs, 0, src_0.slice(batchStart, batchEnd)); | |
batchStart = batchEnd; | |
destOfs += len; | |
} | |
} | |
function insertTo(array, index_0, value_0){ | |
array.splice(index_0, 0, value_0); | |
} | |
function insertTo_0(array, values){ | |
copy(values, 0, array, 0, values.length); | |
} | |
function removeFrom(array, index_0, deleteCount){ | |
array.splice(index_0, deleteCount); | |
} | |
function getIdentityHashCode(o){ | |
switch (typeof o) { | |
case 'string': | |
return getHashCode_2(o); | |
case 'number': | |
return Math.max(Math.min(o, 2147483647), -2147483648) | 0; | |
case 'boolean': | |
return $clinit_Boolean() , o?1231:1237; | |
default:return o == null?0:getHashCode_1(o); | |
} | |
} | |
function checkCriticalArrayType(expression){ | |
if (!expression) { | |
throw toJs(new ArrayStoreException); | |
} | |
} | |
function checkCriticalElement(expression){ | |
if (!expression) { | |
throw toJs(new NoSuchElementException); | |
} | |
} | |
function checkCriticalElementIndex(index_0, size_0){ | |
if (index_0 < 0 || index_0 >= size_0) { | |
throw toJs(new IndexOutOfBoundsException('Index: ' + index_0 + ', Size: ' + size_0)); | |
} | |
} | |
function checkCriticalNotNull(reference){ | |
if (reference == null) { | |
throw toJs(new NullPointerException); | |
} | |
return reference; | |
} | |
function checkCriticalPositionIndex(index_0, size_0){ | |
if (index_0 < 0 || index_0 > size_0) { | |
throw toJs(new IndexOutOfBoundsException('Index: ' + index_0 + ', Size: ' + size_0)); | |
} | |
} | |
function checkCriticalState(expression){ | |
if (!expression) { | |
throw toJs(new IllegalStateException); | |
} | |
} | |
function checkCriticalType(expression){ | |
if (!expression) { | |
throw toJs(new ClassCastException); | |
} | |
} | |
function checkNotNull(reference){ | |
checkCriticalNotNull(reference); | |
return reference; | |
} | |
function setPropertySafe(map_0, key, value_0){ | |
try { | |
map_0[key] = value_0; | |
} | |
catch (ignored) { | |
} | |
} | |
function getHashCode_1(o){ | |
return o.$H || (o.$H = ++nextHashId); | |
} | |
var nextHashId = 0; | |
function $clinit_StringHashCache(){ | |
$clinit_StringHashCache = emptyMethod; | |
back_0 = {}; | |
front = {}; | |
} | |
function compute(str){ | |
var hashCode, i, n, nBatch; | |
hashCode = 0; | |
n = str.length; | |
nBatch = n - 4; | |
i = 0; | |
while (i < nBatch) { | |
hashCode = str.charCodeAt(i + 3) + 31 * (str.charCodeAt(i + 2) + 31 * (str.charCodeAt(i + 1) + 31 * (str.charCodeAt(i) + 31 * hashCode))); | |
hashCode = hashCode | 0; | |
i += 4; | |
} | |
while (i < n) { | |
hashCode = hashCode * 31 + $charAt(str, i++); | |
} | |
hashCode = hashCode | 0; | |
return hashCode; | |
} | |
function getHashCode_2(str){ | |
$clinit_StringHashCache(); | |
var hashCode, key, result; | |
key = ':' + str; | |
result = front[key]; | |
if (!(result === undefined)) { | |
return result; | |
} | |
result = back_0[key]; | |
hashCode = result === undefined?compute(str):result; | |
increment(); | |
front[key] = hashCode; | |
return hashCode; | |
} | |
function increment(){ | |
if (count_0 == 256) { | |
back_0 = front; | |
front = {}; | |
count_0 = 0; | |
} | |
++count_0; | |
} | |
var back_0, count_0 = 0, front; | |
function $getValue_1(this$static){ | |
return castToString(this$static.images.get_1(this$static.index_0)); | |
} | |
function $handleBackward(this$static){ | |
--this$static.index_0; | |
$renderSelection(this$static); | |
} | |
function $handleForward(this$static){ | |
++this$static.index_0; | |
$renderSelection(this$static); | |
} | |
function $renderSelection(this$static){ | |
if (!this$static.images || this$static.images.size_1() == 0) { | |
return; | |
} | |
this$static.index_0 >= this$static.images.size_1()?(this$static.index_0 = 0):this$static.index_0 < 0 && (this$static.index_0 = this$static.images.size_1() - 1); | |
$setSrcURL(this$static.image, castToString(this$static.images.get_1(this$static.index_0))); | |
} | |
function $setImages(this$static, images){ | |
this$static.images = images; | |
this$static.index_0 = 0; | |
$renderSelection(this$static); | |
} | |
function $setValue_1(this$static, imageUrl){ | |
if (this$static.images.contains(imageUrl)) { | |
this$static.index_0 = this$static.images.indexOf_0(imageUrl); | |
$renderSelection(this$static); | |
} | |
} | |
function PhotoSelector(){ | |
Component.call(this); | |
} | |
defineClass(105, 4, $intern_4, PhotoSelector); | |
_.createDom = function createDom_11(){ | |
var buttonBackward, buttonForward, gridLayout, layeredLayout; | |
$setElementInternal(this, wrapDomNode(this.document_0.createElement('DIV'))); | |
$setCssName(this.element.wrappedDomContext); | |
layeredLayout = new LayeredLayout; | |
$setWidth(layeredLayout, new LengthValue(($clinit_LengthUnitType() , PX), 400)); | |
$setHeight(layeredLayout, new LengthValue(PX, 200)); | |
$registerDisposable(this, layeredLayout); | |
$render(layeredLayout, $getElement_0(this)); | |
this.image = new Image_0; | |
$setLayerComponent(layeredLayout, this.image); | |
gridLayout = new GridLayout; | |
$setHeight(gridLayout, new LengthValue(PCT, 100)); | |
$registerDisposable(layeredLayout, gridLayout); | |
$render(gridLayout, $getLayer(layeredLayout, 1)); | |
buttonBackward = new Button; | |
$setCellVAlign(gridLayout, 0, ($clinit_VerticalAlignmentType() , MIDDLE)); | |
$registerDisposable(gridLayout, buttonBackward); | |
$render(buttonBackward, $getCell(gridLayout, 0, 0)); | |
$setCellWidth(gridLayout, new LengthValue(PCT, 100)); | |
buttonForward = new Button; | |
$setCellVAlign(gridLayout, 2, MIDDLE); | |
$registerDisposable(gridLayout, buttonForward); | |
$render(buttonForward, $getCell(gridLayout, 2, 0)); | |
$listen(buttonBackward, ($clinit_EventType() , ACTION), this, new PhotoSelector$0methodref$handleBackward$Type(this)); | |
$listen(buttonForward, ACTION, this, new PhotoSelector$1methodref$handleForward$Type(this)); | |
} | |
; | |
_.index_0 = 0; | |
var Lshopwindowshared_client_PhotoSelector_2_classLit = createForClass('shopwindowshared.client', 'PhotoSelector', 105); | |
function PhotoSelector$0methodref$handleBackward$Type($$outer_0){ | |
this.$$outer_0 = $$outer_0; | |
} | |
defineClass(106, 1, $intern_1, PhotoSelector$0methodref$handleBackward$Type); | |
_.apply_0 = function apply_23(){ | |
$handleBackward(this.$$outer_0); | |
} | |
; | |
var Lshopwindowshared_client_PhotoSelector$0methodref$handleBackward$Type_2_classLit = createForClass('shopwindowshared.client', 'PhotoSelector/0methodref$handleBackward$Type', 106); | |
function PhotoSelector$1methodref$handleForward$Type($$outer_0){ | |
this.$$outer_0 = $$outer_0; | |
} | |
defineClass(107, 1, $intern_1, PhotoSelector$1methodref$handleForward$Type); | |
_.apply_0 = function apply_24(){ | |
$handleForward(this.$$outer_0); | |
} | |
; | |
var Lshopwindowshared_client_PhotoSelector$1methodref$handleForward$Type_2_classLit = createForClass('shopwindowshared.client', 'PhotoSelector/1methodref$handleForward$Type', 107); | |
function $then(this$static, callback){ | |
var callbackMethod = callback.apply_1; | |
function bridge_function(orig_value){ | |
var value_0 = transformValue(orig_value); | |
callbackMethod.call(callback, value_0); | |
return orig_value; | |
} | |
this$static.then($entry(bridge_function)); | |
} | |
function transformValue(obj){ | |
var e; | |
try { | |
return deserialize(serialize(obj), true); | |
} | |
catch ($e0) { | |
$e0 = toJava($e0); | |
if (instanceOf($e0, 6)) { | |
e = $e0; | |
log_0('CAUGHT THROWABLE'); | |
log_0(e); | |
throw toJs(e); | |
} | |
else | |
throw toJs($e0); | |
} | |
} | |
function $shortenUrl(this$static, longUrl){ | |
this$static.xmlHttp = new XMLHttpRequest_0; | |
$open(this$static.xmlHttp, ($clinit_HttpMethod() , POST), 'http://i-dev.swds.co/shorten'); | |
$listen(this$static.xmlHttp, ($clinit_EventType() , COMPLETE), this$static, new ShortyClient$0methodref$handleComplete$Type(this$static)); | |
this$static.xmlHttp.xmlHttpImpl.setRequestHeader('Content-Type', 'application/json'); | |
$send(this$static.xmlHttp, '{"url": "' + longUrl + '"}'); | |
} | |
function ShortyClient(){ | |
SyntheticEventTarget.call(this); | |
} | |
defineClass(131, 34, $intern_0, ShortyClient); | |
var Lshopwindowshared_client_ShortyClient_2_classLit = createForClass('shopwindowshared.client', 'ShortyClient', 131); | |
function ShortyClient$0methodref$handleComplete$Type($$outer_0){ | |
this.$$outer_0 = $$outer_0; | |
} | |
defineClass(132, 1, $intern_1, ShortyClient$0methodref$handleComplete$Type); | |
_.apply_0 = function apply_25(){ | |
$dispatchEvent(this.$$outer_0, ($clinit_EventType() , COMPLETE)); | |
} | |
; | |
var Lshopwindowshared_client_ShortyClient$0methodref$handleComplete$Type_2_classLit = createForClass('shopwindowshared.client', 'ShortyClient/0methodref$handleComplete$Type', 132); | |
var $entry = ($clinit_Impl() , entry_0); | |
var gwtOnLoad = gwtOnLoad = gwtOnLoad_0; | |
addInitFunctions(init); | |
setGwtProperty('permProps', [[]]); | |
$sendStats('moduleStartup', 'moduleEvalEnd'); | |
gwtOnLoad(__gwtModuleFunction.__errFn, __gwtModuleFunction.__moduleName, __gwtModuleFunction.__moduleBase, __gwtModuleFunction.__softPermutationId,__gwtModuleFunction.__computePropValue); | |
$sendStats('moduleStartup', 'end'); | |
$gwt && $gwt.permProps && __gwtModuleFunction.__moduleStartupDone($gwt.permProps); | |
STACK TRACE WAS: | |
Uncaught TypeError: Cannot read property '12' of undefined | |
at canCast (ContentCentral-0.js:171) | |
at instanceOf (ContentCentral-0.js:209) | |
at Object.replacerFunc (ContentCentral-0.js:653) | |
at JSON.stringify (<anonymous>) | |
at serialize (ContentCentral-0.js:674) | |
at transformValue (ContentCentral-0.js:4640) | |
at bridge_function (ContentCentral-0.js:4629) | |
at apply_22 (ContentCentral-0.js:2621) | |
at entry0 (ContentCentral-0.js:2654) | |
at ContentCentral-0.js:2644 | |
at tryCatcher (bndl-37ce6c8….js?v=1485284191366:78175) | |
at Promise._settlePromiseFromHandler (bndl-37ce6c8….js?v=1485284191366:77336) | |
at Promise._settlePromiseAt (bndl-37ce6c8….js?v=1485284191366:77410) | |
at Promise._settlePromises (bndl-37ce6c8….js?v=1485284191366:77526) | |
at Async._drainQueue (bndl-37ce6c8….js?v=1485284191366:75353) | |
at Async._drainQueues (bndl-37ce6c8….js?v=1485284191366:75363) | |
at Async.drainQueues (bndl-37ce6c8….js?v=1485284191366:75245) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment