@STATIC1.0;p;9;CPArray.ji;10;CPObject.ji;9;CPRange.ji;14;CPEnumerator.ji;18;CPSortDescriptor.jc;21990;

{var the_class = objj_allocateClassPair(CPEnumerator, "_CPArrayEnumerator"),
meta_class = _class_getMeta(the_class);the_class.ivars.splice(the_class.ivars.length, 0, new objj_ivar("_array"), new objj_ivar("_index"));
objj_registerClassPair(the_class);
objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("initWithArray:"), function(self, _cmd, anArray)
{ with(self)
{
    self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("CPEnumerator") }, "init");

    if (self)
    {
        _array = anArray;
        _index = -1;
    }

    return self;
}
});
instance_methods[1] = new objj_method(sel_registerName("nextObject"), function(self, _cmd)
{ with(self)
{
    if (++_index >= objj_msgSend(_array, "count"))
        return nil;

    return _array[_index];
}
});
class_addMethods(the_class, instance_methods);
}

{var the_class = objj_allocateClassPair(CPEnumerator, "_CPReverseArrayEnumerator"),
meta_class = _class_getMeta(the_class);the_class.ivars.splice(the_class.ivars.length, 0, new objj_ivar("_array"), new objj_ivar("_index"));
objj_registerClassPair(the_class);
objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("initWithArray:"), function(self, _cmd, anArray)
{ with(self)
{
    self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("CPEnumerator") }, "init");

    if (self)
    {
        _array = anArray;
        _index = objj_msgSend(_array, "count");
    }

    return self;
}
});
instance_methods[1] = new objj_method(sel_registerName("nextObject"), function(self, _cmd)
{ with(self)
{
    if (--_index < 0)
        return nil;

    return _array[_index];
}
});
class_addMethods(the_class, instance_methods);
}

{var the_class = objj_allocateClassPair(CPObject, "CPArray"),
meta_class = _class_getMeta(the_class);objj_registerClassPair(the_class);
objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
var class_methods = [];
class_methods[0] = new objj_method(sel_registerName("alloc"), function(self, _cmd)
{ with(self)
{
    return objj_alloc(Array);
}
});
class_methods[1] = new objj_method(sel_registerName("array"), function(self, _cmd)
{ with(self)
{
    return objj_msgSend(objj_msgSend(self, "alloc"), "init");
}
});
class_methods[2] = new objj_method(sel_registerName("arrayWithArrayanArray"), function(self, _cmd)
{ with(self)
{
    return objj_msgSend(objj_msgSend(self, "alloc"), "initWithArray:", anArray);
}
});
class_methods[3] = new objj_method(sel_registerName("arrayWithObject:"), function(self, _cmd, anObject)
{ with(self)
{
    return objj_msgSend(objj_msgSend(self, "alloc"), "initWithObjects:", anObject);
}
});
class_methods[4] = new objj_method(sel_registerName("arrayWithObjects:"), function(self, _cmd, anObject)
{ with(self)
{
    var i = 2,
        array = objj_msgSend(objj_msgSend(self, "alloc"), "init"),
        argument;

    for(; i < arguments.length && (argument = arguments[i]) != nil; ++i)
        array.push(argument);

    return array;
}
});
class_methods[5] = new objj_method(sel_registerName("arrayWithObjects:count:"), function(self, _cmd, objects, aCount)
{ with(self)
{
    return objj_msgSend(objj_msgSend(self, "alloc"), "initWithObjects:count:", objects, aCount);
}
});
var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("init"), function(self, _cmd)
{ with(self)
{
    return self;
}
});
instance_methods[1] = new objj_method(sel_registerName("initWithArray:"), function(self, _cmd, anArray)
{ with(self)
{
    self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("CPObject") }, "init");

    if (self)
        objj_msgSend(self, "setArray:", anArray);

    return self;
}
});
instance_methods[2] = new objj_method(sel_registerName("initWithArray:copyItems:"), function(self, _cmd, anArray, copyItems)
{ with(self)
{
    if (!copyItems)
        return objj_msgSend(self, "initWithArray:", anArray);

    self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("CPObject") }, "init");

    if (self)
    {
        var index = 0,
            count = objj_msgSend(anArray, "count");

        for(; index < count; ++i)
        {
            if (anArray[i].isa)
                self[i] = objj_msgSend(anArray, "copy");

            else
                self[i] = anArray;
        }
    }

    return self;
}
});
instance_methods[3] = new objj_method(sel_registerName("initWithObjects:"), function(self, _cmd, anObject)
{ with(self)
{

    var i = 2,
        argument;

    for(; i < arguments.length && (argument = arguments[i]) != nil; ++i)
        push(argument);

    return self;
}
});
instance_methods[4] = new objj_method(sel_registerName("initWithObjects:count:"), function(self, _cmd, objects, aCount)
{ with(self)
{
    self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("CPObject") }, "init");

    if (self)
    {
        var index = 0;

        for(; index < aCount; ++index)
            push(objects[index]);
    }

    return self;
}
});
instance_methods[5] = new objj_method(sel_registerName("hash"), function(self, _cmd)
{ with(self)
{
    if (self.__address == nil)
        self.__address = _objj_generateObjectHash();

    return self.__address;
}
});
instance_methods[6] = new objj_method(sel_registerName("containsObject:"), function(self, _cmd, anObject)
{ with(self)
{
    return objj_msgSend(self, "indexOfObject:", anObject) != CPNotFound;
}
});
instance_methods[7] = new objj_method(sel_registerName("count"), function(self, _cmd)
{ with(self)
{
    return length;
}
});
instance_methods[8] = new objj_method(sel_registerName("indexOfObject:"), function(self, _cmd, anObject)
{ with(self)
{
    if (anObject === nil)
        return CPNotFound;

    var i = 0,
        count = length;


    if (anObject.isa)
    {
        for(; i < count; ++i)
            if(objj_msgSend(self[i], "isEqual:", anObject))
                return i;
    }


    else if (self.indexOf)
        return indexOf(anObject);

    else
        for(; i < count; ++i)
            if(self[i] == anObject)
                return i;

    return CPNotFound;
}
});
instance_methods[9] = new objj_method(sel_registerName("indexOfObject:inRange:"), function(self, _cmd, anObject, aRange)
{ with(self)
{
    if (anObject === nil)
        return CPNotFound;

    var i = aRange.location,
        count = MIN(CPMaxRange(aRange), length);


    if (anObject.isa)
    {
        for(; i < count; ++i)
            if(objj_msgSend(self[i], "isEqual:", anObject))
                return i;
    }

    else
        for(; i < count; ++i)
            if(self[i] == anObject)
                return i;

    return CPNotFound;
}
});
instance_methods[10] = new objj_method(sel_registerName("indexOfObjectIdenticalTo:"), function(self, _cmd, anObject)
{ with(self)
{
    if (anObject === nil)
        return CPNotFound;



    if (self.indexOf)
        return indexOf(anObject);


    else
    {
        var index = 0,
            count = length;

        for(; index < count; ++index)
            if(self[index] == anObject)
                return index;
    }

    return CPNotFound;
}
});
instance_methods[11] = new objj_method(sel_registerName("indexOfObjectIdenticalTo:inRange:"), function(self, _cmd, anObject, aRange)
{ with(self)
{
    if (anObject === nil)
        return CPNotFound;



    if (self.indexOf)
    {
        var index = indexOf(anObject, aRange.location);

        if (CPLocationInRange(index, aRange))
            return index;
    }


    else
    {
        var index = aRange.location,
            count = MIN(CPMaxRange(aRange), length);

        for(; index < count; ++index)
            if(self[index] == anObject)
                return index;
    }

    return CPNotFound;
}
});
instance_methods[12] = new objj_method(sel_registerName("lastObject"), function(self, _cmd)
{ with(self)
{
    var count = objj_msgSend(self, "count");

    if (!count) return nil;

    return self[count-1];
}
});
instance_methods[13] = new objj_method(sel_registerName("objectAtIndex:"), function(self, _cmd, anIndex)
{ with(self)
{
    return self[anIndex];
}
});
instance_methods[14] = new objj_method(sel_registerName("objectsAtIndexes:"), function(self, _cmd, indexes)
{ with(self)
{
    var index = objj_msgSend(indexes, "firstIndex"),
        objects = [];

    while(index != CPNotFound)
    {
        objj_msgSend(objects, "addObject:", self[index]);
        index = objj_msgSend(indexes, "indexGreaterThanIndex:", index);
    }

    return objects;
}
});
instance_methods[15] = new objj_method(sel_registerName("objectEnumerator"), function(self, _cmd)
{ with(self)
{
    return objj_msgSend(objj_msgSend(_CPArrayEnumerator, "alloc"), "initWithArray:", self);
}
});
instance_methods[16] = new objj_method(sel_registerName("reverseObjectEnumerator"), function(self, _cmd)
{ with(self)
{
    return objj_msgSend(objj_msgSend(_CPReverseArrayEnumerator, "alloc"), "initWithArray:", self);
}
});
instance_methods[17] = new objj_method(sel_registerName("makeObjectsPerformSelector:"), function(self, _cmd, aSelector)
{ with(self)
{
    var index = 0,
        count = length;

    for(; index < count; ++index)
        objj_msgSend(self[index], aSelector);
}
});
instance_methods[18] = new objj_method(sel_registerName("makeObjectsPerformSelector:withObject:"), function(self, _cmd, aSelector, anObject)
{ with(self)
{
    var index = 0,
        count = length;

    for(; index < count; ++index)
        objj_msgSend(self[index], aSelector, anObject);
}
});
instance_methods[19] = new objj_method(sel_registerName("firstObjectCommonWithArray:"), function(self, _cmd, anArray)
{ with(self)
{
    if (!objj_msgSend(anArray, "count") || !objj_msgSend(self, "count"))
        return nil;

    var i = 0,
        count = objj_msgSend(self, "count");

    for(; i < count; ++i)
        if(objj_msgSend(anArray, "containsObject:", self[i]))
            return self[i];

    return nil;
}
});
instance_methods[20] = new objj_method(sel_registerName("isEqualToArray:"), function(self, _cmd, anArray)
{ with(self)
{
    if(length != anArray.length)
        return NO;

    var index = 0,
        count = objj_msgSend(self, "count");

    for(; index < count; ++index)
        if(self[index] != anObject && (!self[index].isa || !anObject.isa || !objj_msgSend(self[index], "isEqual:", anObject)))
            return NO;

    return YES;
}
});
instance_methods[21] = new objj_method(sel_registerName("arrayByAddingObject:"), function(self, _cmd, anObject)
{ with(self)
{
    var array = objj_msgSend(self, "copy");

    array.push(anObject);

    return array;
}
});
instance_methods[22] = new objj_method(sel_registerName("arrayByAddingObjectsFromArray:"), function(self, _cmd, anArray)
{ with(self)
{
    return slice(0).concat(anArray);
}
});
instance_methods[23] = new objj_method(sel_registerName("subarrayWithRange:"), function(self, _cmd, aRange)
{ with(self)
{
    return slice(aRange.location, CPMaxRange(aRange));
}
});
instance_methods[24] = new objj_method(sel_registerName("sortedArrayUsingDescriptors:"), function(self, _cmd, descriptors)
{ with(self)
{
    var sorted = objj_msgSend(self, "copy");
    objj_msgSend(sorted, "sortUsingDescriptors:", descriptors);
    return sorted;
}
});
instance_methods[25] = new objj_method(sel_registerName("sortedArrayUsingFunction:context:"), function(self, _cmd, aFunction, aContext)
{ with(self)
{
    var sorted = objj_msgSend(self, "copy");
    objj_msgSend(sorted, "sortUsingFunction:context:", aFunction, aContext);
    return sorted;
}
});
instance_methods[26] = new objj_method(sel_registerName("sortedArrayUsingSelector:"), function(self, _cmd, aSelector)
{ with(self)
{
    var sorted = objj_msgSend(self, "copy")
    objj_msgSend(sorted, "sortUsingSelector:", aSelector);
    return sorted;
}
});
instance_methods[27] = new objj_method(sel_registerName("componentsJoinedByString:"), function(self, _cmd, aString)
{ with(self)
{
    var index = 0,
        count = objj_msgSend(self, "count"),
        string = "";
    for(; index < count; ++i)
        string += self[index].isa ? objj_msgSend(self[index], "description") : self[index];
    return string;
}
});
instance_methods[28] = new objj_method(sel_registerName("description"), function(self, _cmd)
{ with(self)
{
    var i = 0,
        count = objj_msgSend(self, "count"),
        description = '(';
    for(; i < count; ++i)
    {
        if (self[i].isa) description += objj_msgSend(self[i], "description");
        else description += self[i];
        if (i != count - 1) description += ", ";
    }
    return description + ')';
}
});
instance_methods[29] = new objj_method(sel_registerName("pathsMatchingExtensions:"), function(self, _cmd, filterTypes)
{ with(self)
{
    var index = 0,
        count = objj_msgSend(self, "count"),
        array = [];
    for(; index < count; ++index)
        if (self[index].isa && objj_msgSend(self[index], "isKindOfClass:", objj_msgSend(CPString, "class")) && objj_msgSend(filterTypes, "containsObject:", objj_msgSend(self[index], "pathExtensions")))
            array.push(self[index]);
    return array;
}
});
instance_methods[30] = new objj_method(sel_registerName("setValue:forKey:"), function(self, _cmd, aValue, aKey)
{ with(self)
{
    var i = 0,
        count = objj_msgSend(self, "count");
    for(; i < count; ++i)
        objj_msgSend(self[i], "setValue:forKey:", aValue, aKey);
}
});
instance_methods[31] = new objj_method(sel_registerName("valueForKey:"), function(self, _cmd, aKey)
{ with(self)
{
    var i = 0,
        count = objj_msgSend(self, "count"),
        array = [];
    for(; i < count; ++i)
        array.push(objj_msgSend(self[i], "valueForKey:", aKey));
    return array;
}
});
instance_methods[32] = new objj_method(sel_registerName("copy"), function(self, _cmd)
{ with(self)
{
    return slice(0);
}
});
class_addMethods(the_class, instance_methods);
class_addMethods(meta_class, class_methods);
}
{
var the_class = objj_getClass("CPArray")
if(!the_class) objj_exception_throw(new objj_exception(OBJJClassNotFoundException, "*** Could not find definition for class \"CPArray\""));
var meta_class = _class_getMeta(the_class);var class_methods = [];
class_methods[0] = new objj_method(sel_registerName("arrayWithCapacity:"), function(self, _cmd, aCapacity)
{ with(self)
{
    return objj_msgSend(objj_msgSend(self, "alloc"), "initWithCapacity:", aCapacity);
}
});
var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("initWithCapacity:"), function(self, _cmd, aCapacity)
{ with(self)
{
    return self;
}
});
instance_methods[1] = new objj_method(sel_registerName("addObject:"), function(self, _cmd, anObject)
{ with(self)
{
    push(anObject);
}
});
instance_methods[2] = new objj_method(sel_registerName("addObjectsFromArray:"), function(self, _cmd, anArray)
{ with(self)
{
    splice.apply(self, [length,0].concat(anArray));
}
});
instance_methods[3] = new objj_method(sel_registerName("insertObject:atIndex:"), function(self, _cmd, anObject, anIndex)
{ with(self)
{
    splice(anIndex, 0, anObject);
}
});
instance_methods[4] = new objj_method(sel_registerName("insertObjects:atIndexes:"), function(self, _cmd, objects, anIndexSet)
{ with(self)
{
    var index = 0,
        position = CPNotFound;
    while ((position = objj_msgSend(indexes, "indexGreaterThanIndex:", position)) != CPNotFound)
        objj_msgSend(self, "insertObject:atindex:", objects[index++], position);
}
});
instance_methods[5] = new objj_method(sel_registerName("replaceObjectAtIndex:withObject:"), function(self, _cmd, anIndex, anObject)
{ with(self)
{
    self[anIndex] = anObject;
}
});
instance_methods[6] = new objj_method(sel_registerName("replaceObjectsAtIndexes:withObjects:"), function(self, _cmd, anIndexSet, objects)
{ with(self)
{
    var i = 0,
        index = objj_msgSend(anIndexSet, "firstIndex");
    while(index != CPNotFound)
    {
        objj_msgSend(self, "replaceObjectAtIndex:withObject:", index, objects[i++]);
        index = objj_msgSend(anIndexSet, "indexGreaterThanIndex:", index);
    }
}
});
instance_methods[7] = new objj_method(sel_registerName("replaceObjectsInRange:withObjectsFromArray:range:"), function(self, _cmd, aRange, anArray, otherRange)
{ with(self)
{
    if (!otherRange.location && otherRange.length == objj_msgSend(anArray, "count"))
        objj_msgSend(self, "replaceObjectsInRange:withObjectsFromArray:", aRange, anArray);
    else
        splice.apply(self, [aRange.location,aRange.length].concat(objj_msgSend(anArray, "subarrayWithRange:", otherRange)));
}
});
instance_methods[8] = new objj_method(sel_registerName("replaceObjectsInRange:withObjectsFromArray:"), function(self, _cmd, aRange, anArray)
{ with(self)
{
    splice.apply(self, [aRange.location,aRange.length].concat(anArray));
}
});
instance_methods[9] = new objj_method(sel_registerName("setArray:"), function(self, _cmd, anArray)
{ with(self)
{
    if(self == anArray) return;
    splice.apply(self, [0,length].concat(anArray));
}
});
instance_methods[10] = new objj_method(sel_registerName("removeAllObjects"), function(self, _cmd)
{ with(self)
{
    splice(0, length);
}
});
instance_methods[11] = new objj_method(sel_registerName("removeLastObject"), function(self, _cmd)
{ with(self)
{
    pop();
}
});
instance_methods[12] = new objj_method(sel_registerName("removeObject:"), function(self, _cmd, anObject)
{ with(self)
{
    objj_msgSend(self, "removeObject:inRange:", anObject, CPMakeRange(0,length));
}
});
instance_methods[13] = new objj_method(sel_registerName("removeObject:inRange:"), function(self, _cmd, anObject, aRange)
{ with(self)
{
    var index;
    while ((index = objj_msgSend(self, "indexOfObject:inRange:", anObject, aRange)) != CPNotFound)
    {
        objj_msgSend(self, "removeObjectAtIndex:", index);
        aRange = CPIntersectionRange(CPMakeRange(index, length - index), aRange);
    }
}
});
instance_methods[14] = new objj_method(sel_registerName("removeObjectAtIndex:"), function(self, _cmd, anIndex)
{ with(self)
{
    splice(anIndex, 1);
}
});
instance_methods[15] = new objj_method(sel_registerName("removeObjectsAtIndexes:"), function(self, _cmd, anIndexSet)
{ with(self)
{
    var index = objj_msgSend(anIndexSet, "lastIndex");
    while (index != CPNotFound)
    {
        objj_msgSend(self, "removeObjectAtIndex:", index);
        index = objj_msgSend(anIndexSet, "indexSmallerThanIndex:", index);
    }
}
});
instance_methods[16] = new objj_method(sel_registerName("removeObjectIdenticalTo:"), function(self, _cmd, anObject)
{ with(self)
{
    objj_msgSend(self, "removeObjectIdenticalTo:inRange:", anObject, CPMakeRange(0,length));
}
});
instance_methods[17] = new objj_method(sel_registerName("removeObjectIdenticalTo:inRange:"), function(self, _cmd, anObject, aRange)
{ with(self)
{
    var index;
    while ((index = objj_msgSend(self, "indexOfObjectIdenticalTo:inRange:", anObject, aRange)) != CPNotFound)
    {
        objj_msgSend(self, "removeObjectAtIndex:", index);
        aRange = CPIntersectionRange(CPMakeRange(index, length - index), aRange);
    }
}
});
instance_methods[18] = new objj_method(sel_registerName("removeObjectsInArray:"), function(self, _cmd, anArray)
{ with(self)
{
    var index = 0,
        count = objj_msgSend(anArray, "count");
    for (; index < count; ++index)
        objj_msgSend(self, "removeObject:", anArray[index]);
}
});
instance_methods[19] = new objj_method(sel_registerName("removeObjectsInRange:"), function(self, _cmd, aRange)
{ with(self)
{
    splice(aRange.location, aRange.length);
}
});
instance_methods[20] = new objj_method(sel_registerName("exchangeObjectAtIndex:withObjectAtIndex:"), function(self, _cmd, anIndex, otherIndex)
{ with(self)
{
    var temporary = self[anIndex];
    self[anIndex] = self[otherIndex];
    self[otherIndex] = temporary;
}
});
instance_methods[21] = new objj_method(sel_registerName("sortUsingDescriptors:"), function(self, _cmd, descriptors)
{ with(self)
{
    sort(function(lhs, rhs)
    {
        var i = 0,
            count = objj_msgSend(descriptors, "count"),
            result = CPOrderedSame;
        while(i < count)
            if((result = objj_msgSend(descriptors[i++], "compareObject:withObject:", lhs, rhs)) != CPOrderedSame)
                return result;
        return result;
    });
}
});
instance_methods[22] = new objj_method(sel_registerName("sortUsingFunction:context:"), function(self, _cmd, aFunction, aContext)
{ with(self)
{
    sort(function(lhs, rhs) { return aFunction(lhs, rhs, aContext); });
}
});
instance_methods[23] = new objj_method(sel_registerName("sortUsingSelector:"), function(self, _cmd, aSelector)
{ with(self)
{
    sort(function(lhs, rhs) { return objj_msgSend(lhs, aSelector, rhs); });
}
});
class_addMethods(the_class, instance_methods);
class_addMethods(meta_class, class_methods);
}
{
var the_class = objj_getClass("CPArray")
if(!the_class) objj_exception_throw(new objj_exception(OBJJClassNotFoundException, "*** Could not find definition for class \"CPArray\""));
var meta_class = _class_getMeta(the_class);var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("initWithCoder:"), function(self, _cmd, aCoder)
{ with(self)
{
    return objj_msgSend(aCoder, "_decodeArrayOfObjectsForKey:", "CP.objects");
}
});
instance_methods[1] = new objj_method(sel_registerName("encodeWithCoder:"), function(self, _cmd, aCoder)
{ with(self)
{
    objj_msgSend(aCoder, "_encodeArrayOfObjects:forKey:", self, "CP.objects");
}
});
class_addMethods(the_class, instance_methods);
}
{var the_class = objj_allocateClassPair(CPArray, "CPMutableArray"),
meta_class = _class_getMeta(the_class);objj_registerClassPair(the_class);
objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
}
Array.prototype.isa = CPArray;
objj_msgSend(CPArray, "initialize");

p;10;CPBundle.ji;10;CPObject.ji;14;CPDictionary.jc;2046;

{var the_class = objj_allocateClassPair(CPObject, "CPBundle"),
meta_class = _class_getMeta(the_class);the_class.ivars.splice(the_class.ivars.length, 0, new objj_ivar("_principalClass"));
objj_registerClassPair(the_class);
objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
var class_methods = [];
class_methods[0] = new objj_method(sel_registerName("alloc"), function(self, _cmd)
{ with(self)
{
    return objj_alloc(objj_bundle);
}
});
class_methods[1] = new objj_method(sel_registerName("bundleWithPath:"), function(self, _cmd, aPath)
{ with(self)
{
    return objj_getBundleWithPath(aPath);
}
});
class_methods[2] = new objj_method(sel_registerName("bundleForClass:"), function(self, _cmd, aClass)
{ with(self)
{
    return objj_bundleForClass(aClass);
}
});
class_methods[3] = new objj_method(sel_registerName("mainBundle"), function(self, _cmd)
{ with(self)
{
    return objj_msgSend(CPBundle, "bundleWithPath:", "Info.plist");
}
});
var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("classNamed:"), function(self, _cmd, aString)
{ with(self)
{}
});
instance_methods[1] = new objj_method(sel_registerName("bundlePath"), function(self, _cmd)
{ with(self)
{
    return objj_msgSend(path, "stringByDeletingLastPathComponent");
}
});
instance_methods[2] = new objj_method(sel_registerName("principalClass"), function(self, _cmd)
{ with(self)
{
    var className = objj_msgSend(objj_msgSend(self, "infoDictionary"), "objectForKey:", "CPPrincipalClass");



    return className ? CPClassFromString(className) : Nil;
}
});
instance_methods[3] = new objj_method(sel_registerName("infoDictionary"), function(self, _cmd)
{ with(self)
{
    return info;
}
});
instance_methods[4] = new objj_method(sel_registerName("objectForInfoDictionaryKey:"), function(self, _cmd, aKey)
{ with(self)
{
    return objj_msgSend(info, "objectForKey:", aKey);
}
});
class_addMethods(the_class, instance_methods);
class_addMethods(meta_class, class_methods);
}

objj_bundle.prototype.isa = CPBundle;

p;9;CPCoder.ji;10;CPObject.ji;13;CPException.jc;2706;

{var the_class = objj_allocateClassPair(CPObject, "CPCoder"),
meta_class = _class_getMeta(the_class);objj_registerClassPair(the_class);
objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("allowsKeyedCoding"), function(self, _cmd)
{ with(self)
{
   return NO;
}
});
instance_methods[1] = new objj_method(sel_registerName("encodeValueOfObjCType:at:"), function(self, _cmd, aType, anObject)
{ with(self)
{
   NSInvalidAbstractInvocation();
}
});
instance_methods[2] = new objj_method(sel_registerName("encodeDataObject:"), function(self, _cmd, aData)
{ with(self)
{
   NSInvalidAbstractInvocation();
}
});
instance_methods[3] = new objj_method(sel_registerName("encodeObject:"), function(self, _cmd, anObject)
{ with(self)
{}
});
instance_methods[4] = new objj_method(sel_registerName("encodePoint:"), function(self, _cmd, aPoint)
{ with(self)
{
    objj_msgSend(self, "encodeNumber:", aPoint.x);
    objj_msgSend(self, "encodeNumber:", aPoint.y);
}
});
instance_methods[5] = new objj_method(sel_registerName("encodeRect:"), function(self, _cmd, aRect)
{ with(self)
{
    objj_msgSend(self, "encodePoint:", aRect.origin);
    objj_msgSend(self, "encodeSize:", aRect.size);
}
});
instance_methods[6] = new objj_method(sel_registerName("encodeSize:"), function(self, _cmd, aSize)
{ with(self)
{
    objj_msgSend(self, "encodeNumber:", aSize.width);
    objj_msgSend(self, "encodeNumber:", aSize.height);
}
});
instance_methods[7] = new objj_method(sel_registerName("encodePropertyList:"), function(self, _cmd, aPropertyList)
{ with(self)
{}
});
instance_methods[8] = new objj_method(sel_registerName("encodeRootObject:"), function(self, _cmd, anObject)
{ with(self)
{
   objj_msgSend(self, "encodeObject:", anObject);
}
});
instance_methods[9] = new objj_method(sel_registerName("encodeBycopyObject:"), function(self, _cmd, anObject)
{ with(self)
{
   objj_msgSend(self, "encodeObject:", object);
}
});
instance_methods[10] = new objj_method(sel_registerName("encodeConditionalObject:"), function(self, _cmd, anObject)
{ with(self)
{
   objj_msgSend(self, "encodeObject:", object);
}
});
class_addMethods(the_class, instance_methods);
}

{
var the_class = objj_getClass("CPObject")
if(!the_class) objj_exception_throw(new objj_exception(OBJJClassNotFoundException, "*** Could not find definition for class \"CPObject\""));
var meta_class = _class_getMeta(the_class);var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("awakeAfterUsingCoder:"), function(self, _cmd, aDecoder)
{ with(self)
{
    return self;
}
});
class_addMethods(the_class, instance_methods);
}

p;10;CPCookie.jI;21;Foundation/CPObject.jI;21;Foundation/CPString.jc;1940;

{var the_class = objj_allocateClassPair(CPObject, "CPCookie"),
meta_class = _class_getMeta(the_class);the_class.ivars.splice(the_class.ivars.length, 0, new objj_ivar("_cookieName"), new objj_ivar("_cookieValue"), new objj_ivar("_expires"));
objj_registerClassPair(the_class);
objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("initWithName:"), function(self, _cmd, aName)
{ with(self)
{
    self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("CPObject") }, "init");

    _cookieName = aName;
    _cookieValue = objj_msgSend(self, "_readCookieValue");

    return self;
}
});
instance_methods[1] = new objj_method(sel_registerName("value"), function(self, _cmd)
{ with(self)
{
    return _cookieValue;
}
});
instance_methods[2] = new objj_method(sel_registerName("name"), function(self, _cmd)
{ with(self)
{
    return _cookieName;
}
});
instance_methods[3] = new objj_method(sel_registerName("expires"), function(self, _cmd)
{ with(self)
{
    return _expires;
}
});
instance_methods[4] = new objj_method(sel_registerName("setValue:expires:domain:"), function(self, _cmd, value, date, domain)
{ with(self)
{
    if(date)
        var expires = "; expires="+date.toGMTString();
    else
        var expires = "";

    if(domain)
        domain = "; domain="+domain;
    else
        domain = "";

 document.cookie = _cookieName+"="+value+expires+"; path=/"+domain;
}
});
instance_methods[5] = new objj_method(sel_registerName("_readCookieValue"), function(self, _cmd)
{ with(self)
{
 var nameEQ = _cookieName + "=";
 var ca = document.cookie.split(';');
 for(var i=0;i < ca.length;i++) {
  var c = ca[i];
  while (c.charAt(0)==' ') c = c.substring(1,c.length);
  if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
 }
 return "";
}
});
class_addMethods(the_class, instance_methods);
}

p;8;CPData.ji;10;CPObject.ji;10;CPString.jc;2936;

{var the_class = objj_allocateClassPair(CPObject, "CPData"),
meta_class = _class_getMeta(the_class);the_class.ivars.splice(the_class.ivars.length, 0, new objj_ivar("_plistObject"));
objj_registerClassPair(the_class);
objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
var class_methods = [];
class_methods[0] = new objj_method(sel_registerName("alloc"), function(self, _cmd)
{ with(self)
{
    return new objj_data();
}
});
class_methods[1] = new objj_method(sel_registerName("dataWithString:"), function(self, _cmd, aString)
{ with(self)
{
    return objj_msgSend(objj_msgSend(self, "alloc"), "initWithString:", aString);
}
});
class_methods[2] = new objj_method(sel_registerName("dataWithPlistObject:"), function(self, _cmd, aPlistObject)
{ with(self)
{
    return objj_msgSend(objj_msgSend(self, "alloc"), "initWithPlistObject:", aPlistObject);
}
});
var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("initWithString:"), function(self, _cmd, aString)
{ with(self)
{
    self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("CPObject") }, "init");

    if (self)
        string = aString;

    return self;
}
});
instance_methods[1] = new objj_method(sel_registerName("initWithPlistObject:"), function(self, _cmd, aPlistObject)
{ with(self)
{
    self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("CPObject") }, "init");

    if (self)
        _plistObject = aPlistObject;

    return self;
}
});
instance_methods[2] = new objj_method(sel_registerName("length"), function(self, _cmd)
{ with(self)
{
    return objj_msgSend(objj_msgSend(self, "string"), "length");
}
});
instance_methods[3] = new objj_method(sel_registerName("description"), function(self, _cmd)
{ with(self)
{
    return string;
}
});
instance_methods[4] = new objj_method(sel_registerName("string"), function(self, _cmd)
{ with(self)
{
    if (!string && _plistObject)
        string = objj_msgSend(objj_msgSend(CPPropertyListSerialization, "dataFromPropertyList:format:errorDescription:", _plistObject, CPPropertyList280NorthFormat_v1_0, NULL), "string");

    return string;
}
});
instance_methods[5] = new objj_method(sel_registerName("setString:"), function(self, _cmd, aString)
{ with(self)
{
    string = aString;
    _plistObject = nil;
}
});
instance_methods[6] = new objj_method(sel_registerName("plistObject"), function(self, _cmd)
{ with(self)
{
    if (string && !_plistObject)

        _plistObject = objj_msgSend(CPPropertyListSerialization, "propertyListFromData:format:errorDescription:", self, 0, NULL);

    return _plistObject;
}
});
instance_methods[7] = new objj_method(sel_registerName("setPlistObject:"), function(self, _cmd, aPlistObject)
{ with(self)
{
    string = nil;
    _plistObject = aPlistObject;
}
});
class_addMethods(the_class, instance_methods);
class_addMethods(meta_class, class_methods);
}

objj_data.prototype.isa = CPData;

p;14;CPDictionary.ji;10;CPObject.ji;14;CPEnumerator.jc;6035;

{var the_class = objj_allocateClassPair(CPEnumerator, "_CPDictionaryValueEnumerator"),
meta_class = _class_getMeta(the_class);the_class.ivars.splice(the_class.ivars.length, 0, new objj_ivar("_keyEnumerator"), new objj_ivar("_dictionary"));
objj_registerClassPair(the_class);
objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("initWithDictionary:"), function(self, _cmd, aDictionary)
{ with(self)
{
    self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("CPEnumerator") }, "init");

    if (self)
    {
        _keyEnumerator = objj_msgSend(aDictionary, "keyEnumerator");
        _dictionary = aDictionary;
    }

    return self;
}
});
instance_methods[1] = new objj_method(sel_registerName("nextObject"), function(self, _cmd)
{ with(self)
{
    var key = objj_msgSend(_keyEnumerator, "nextObject");

    if (!key)
        return nil;

    return objj_msgSend(_dictionary, "objectForKey:", key);
}
});
class_addMethods(the_class, instance_methods);
}

{var the_class = objj_allocateClassPair(CPObject, "CPDictionary"),
meta_class = _class_getMeta(the_class);objj_registerClassPair(the_class);
objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
var class_methods = [];
class_methods[0] = new objj_method(sel_registerName("alloc"), function(self, _cmd)
{ with(self)
{
    return objj_alloc(objj_dictionary);
}
});
class_methods[1] = new objj_method(sel_registerName("dictionary"), function(self, _cmd)
{ with(self)
{
    return objj_msgSend(objj_msgSend(self, "alloc"), "init");
}
});
class_methods[2] = new objj_method(sel_registerName("dictionaryWithDictionary:"), function(self, _cmd, aDictionary)
{ with(self)
{
    return objj_msgSend(objj_msgSend(self, "alloc"), "initWithDictionary:", aDictionary);
}
});
class_methods[3] = new objj_method(sel_registerName("dictionaryWithObject:forKey:"), function(self, _cmd, anObject, aKey)
{ with(self)
{
    return objj_msgSend(objj_msgSend(self, "alloc"), "initWithObjects:forKeys:", [anObject], [aKey]);
}
});
class_methods[4] = new objj_method(sel_registerName("dictionaryWithObjects:forKeys:"), function(self, _cmd, objects, keys)
{ with(self)
{
    return objj_msgSend(objj_msgSend(self, "alloc"), "initWithObjects:forKeys:", objects, keys);
}
});
var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("initWithDictionary:"), function(self, _cmd, aDictionary)
{ with(self)
{
    var key = "",
        dictionary = objj_msgSend(objj_msgSend(CPDictionary, "alloc"), "init");

    for (key in aDictionary.buckets)
        objj_msgSend(dictionary, "setObject:forKey:", objj_msgSend(aDictionary, "objectForKey:", key), key);

    return dictionary;
}
});
instance_methods[1] = new objj_method(sel_registerName("initWithObjects:forKeys:"), function(self, _cmd, objects, keyArray)
{ with(self)
{
    self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("CPObject") }, "init");

    if (self)
    {
        var i = objj_msgSend(keyArray, "count");

        while (i--)
            objj_msgSend(self, "setObject:forKey:", objects[i], keyArray[i]);
    }

    return self;
}
});
instance_methods[2] = new objj_method(sel_registerName("count"), function(self, _cmd)
{ with(self)
{
    return count;
}
});
instance_methods[3] = new objj_method(sel_registerName("allKeys"), function(self, _cmd)
{ with(self)
{
    return keys;
}
});
instance_methods[4] = new objj_method(sel_registerName("allValues"), function(self, _cmd)
{ with(self)
{
    var index = keys.length,
        values = [];

    while (index--)
        values.push(dictionary_getValue(self, [keys[index]]));

    return values;
}
});
instance_methods[5] = new objj_method(sel_registerName("keyEnumerator"), function(self, _cmd)
{ with(self)
{
    return objj_msgSend(keys, "objectEnumerator");
}
});
instance_methods[6] = new objj_method(sel_registerName("objectEnumerator"), function(self, _cmd)
{ with(self)
{
    return objj_msgSend(objj_msgSend(_CPDictionaryValueEnumerator, "alloc"), "initWithDictionary:", self);
}
});
instance_methods[7] = new objj_method(sel_registerName("objectForKey:"), function(self, _cmd, aKey)
{ with(self)
{
    return buckets[aKey];
}
});
instance_methods[8] = new objj_method(sel_registerName("removeAllObjects"), function(self, _cmd)
{ with(self)
{
    keys = objj_alloc(Array);
    count = 0;
    buckets = objj_alloc(Object);
}
});
instance_methods[9] = new objj_method(sel_registerName("removeObjectForKey:"), function(self, _cmd, aKey)
{ with(self)
{
    dictionary_removeValue(self, aKey);
}
});
instance_methods[10] = new objj_method(sel_registerName("setObject:forKey:"), function(self, _cmd, anObject, aKey)
{ with(self)
{
    dictionary_setValue(self, aKey, anObject);
}
});
instance_methods[11] = new objj_method(sel_registerName("description"), function(self, _cmd)
{ with(self)
{
    var description = "CPDictionary {\n";
    var i = keys.length;
    while (i--)
        description += keys[i] +":"+objj_msgSend(buckets[keys[i]], "description")+"\n";
    description += "}";
    return description;
}
});
class_addMethods(the_class, instance_methods);
class_addMethods(meta_class, class_methods);
}
{
var the_class = objj_getClass("CPDictionary")
if(!the_class) objj_exception_throw(new objj_exception(OBJJClassNotFoundException, "*** Could not find definition for class \"CPDictionary\""));
var meta_class = _class_getMeta(the_class);var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("initWithCoder:"), function(self, _cmd, aCoder)
{ with(self)
{
    return objj_msgSend(aCoder, "_decodeDictionaryOfObjectsForKey:", "CP.objects");
}
});
instance_methods[1] = new objj_method(sel_registerName("encodeWithCoder:"), function(self, _cmd, aCoder)
{ with(self)
{
    objj_msgSend(aCoder, "_encodeDictionaryOfObjects:forKey:", self, "CP.objects");
}
});
class_addMethods(the_class, instance_methods);
}
objj_dictionary.prototype.isa = CPDictionary;

p;14;CPEnumerator.ji;10;CPObject.jc;560;

{var the_class = objj_allocateClassPair(CPObject, "CPEnumerator"),
meta_class = _class_getMeta(the_class);objj_registerClassPair(the_class);
objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("nextObject"), function(self, _cmd)
{ with(self)
{
    return nil;
}
});
instance_methods[1] = new objj_method(sel_registerName("allObjects"), function(self, _cmd)
{ with(self)
{
    return [];
}
});
class_addMethods(the_class, instance_methods);
}

p;13;CPException.ji;9;CPCoder.ji;10;CPObject.ji;10;CPString.jc;4216;


CPInvalidArgumentException = "CPInvalidArgumentException";

{var the_class = objj_allocateClassPair(CPObject, "CPException"),
meta_class = _class_getMeta(the_class);objj_registerClassPair(the_class);
objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
var class_methods = [];
class_methods[0] = new objj_method(sel_registerName("alloc"), function(self, _cmd)
{ with(self)
{
    return new objj_exception();
}
});
class_methods[1] = new objj_method(sel_registerName("raise:reason:"), function(self, _cmd, aName, aReason)
{ with(self)
{
    objj_msgSend(objj_msgSend(self, "exceptionWithName:reason:userInfo:", aName, aReason, nil), "raise");
}
});
class_methods[2] = new objj_method(sel_registerName("exceptionWithName:reason:userInfo:"), function(self, _cmd, aName, aReason, aUserInfo)
{ with(self)
{
    return objj_msgSend(objj_msgSend(self, "alloc"), "initWithName:reason:userInfo:", aName, aReason, aUserInfo);
}
});
var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("initWithName:reason:userInfo:"), function(self, _cmd, aName, aReason, aUserInfo)
{ with(self)
{
    self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("CPObject") }, "init");

    if (self)
    {
        name = aName;
        reason = aReason;
        userInfo = aUserInfo;
    }

    return self;
}
});
instance_methods[1] = new objj_method(sel_registerName("name"), function(self, _cmd)
{ with(self)
{
    return name;
}
});
instance_methods[2] = new objj_method(sel_registerName("reason"), function(self, _cmd)
{ with(self)
{
    return reason;
}
});
instance_methods[3] = new objj_method(sel_registerName("userInfo"), function(self, _cmd)
{ with(self)
{
    return userInfo;
}
});
instance_methods[4] = new objj_method(sel_registerName("description"), function(self, _cmd)
{ with(self)
{
    return reason;
}
});
instance_methods[5] = new objj_method(sel_registerName("raise"), function(self, _cmd)
{ with(self)
{
    objj_exception_throw(self);
}
});
class_addMethods(the_class, instance_methods);
class_addMethods(meta_class, class_methods);
}

{
var the_class = objj_getClass("CPException")
if(!the_class) objj_exception_throw(new objj_exception(OBJJClassNotFoundException, "*** Could not find definition for class \"CPException\""));
var meta_class = _class_getMeta(the_class);var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("copy"), function(self, _cmd)
{ with(self)
{
    return objj_msgSend(objj_msgSend(self, "class"), "exceptionWithName:reason:userInfo:", name, reason, userInfo);
}
});
class_addMethods(the_class, instance_methods);
}

{
var the_class = objj_getClass("CPException")
if(!the_class) objj_exception_throw(new objj_exception(OBJJClassNotFoundException, "*** Could not find definition for class \"CPException\""));
var meta_class = _class_getMeta(the_class);var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("initWithCoder:"), function(self, _cmd, aCoder)
{ with(self)
{
    self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("CPObject") }, "init");

    if (self)
    {
        name = objj_msgSend(aCoder, "decodeObjectForKey:", CPExceptionNameKey);
        reason = objj_msgSend(aCoder, "decodeObjectForKey:", CPExceptionReasonKey);
        userInfo = objj_msgSend(aCoer, "decodeObjectForKey:", CPExceptionUserInfoKey);
    }

    return self;
}
});
instance_methods[1] = new objj_method(sel_registerName("encodeWithCoder:"), function(self, _cmd, aCoder)
{ with(self)
{
    objj_msgSend(aCoder, "encodeObject:forKey:", name, CPExceptionNameKey);
    objj_msgSend(aCoder, "encodeObject:forKey:", reason, CPExceptionReasonKey);
    objj_msgSend(aCoder, "encodeObject:forKey:", userInfo, CPExceptionUserInfoKey);
}
});
class_addMethods(the_class, instance_methods);
}

objj_exception.prototype.isa = CPException;
objj_msgSend(CPException, "initialize");

_CPRaiseInvalidAbstractInvocation= function(anObject, aSelector)
{
    objj_msgSend(CPException, "raise:reason:", CPInvalidArgumentException, "*** -"+sel_getName(aSelector)+" cannot be sent to an abstract object of class "+objj_msgSend(anObject, "className")+": Create a concrete instance!");
}

p;12;CPIndexSet.ji;9;CPRange.ji;10;CPObject.jc;18765;

{var the_class = objj_allocateClassPair(CPObject, "CPIndexSet"),
meta_class = _class_getMeta(the_class);the_class.ivars.splice(the_class.ivars.length, 0, new objj_ivar("_count"), new objj_ivar("_cachedRangeIndex"), new objj_ivar("_ranges"));
objj_registerClassPair(the_class);
objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
var class_methods = [];
class_methods[0] = new objj_method(sel_registerName("indexSet"), function(self, _cmd)
{ with(self)
{
 return objj_msgSend(objj_msgSend(self, "alloc"), "init");
}
});
class_methods[1] = new objj_method(sel_registerName("indexSetWithIndex:"), function(self, _cmd, anIndex)
{ with(self)
{
 return objj_msgSend(objj_msgSend(self, "alloc"), "initWithIndex:", anIndex);
}
});
class_methods[2] = new objj_method(sel_registerName("indexSetWithIndexesInRange:"), function(self, _cmd, aRange)
{ with(self)
{
 return objj_msgSend(objj_msgSend(self, "alloc"), "initWithIndexesInRange:", aRange);
}
});
var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("init"), function(self, _cmd)
{ with(self)
{
    self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("CPObject") }, "init");

    if (self)
    {
        _count = 0;
        _ranges = [];
        _cachedRangeIndex = 0;
    }

    return self;
}
});
instance_methods[1] = new objj_method(sel_registerName("initWithIndex:"), function(self, _cmd, anIndex)
{ with(self)
{
    self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("CPObject") }, "init");

    if (self)
    {
        _count = 1;
        _ranges = objj_msgSend(CPArray, "arrayWithObject:", CPMakeRange(anIndex,1));
        _cachedRangeIndex = 0;
    }

    return self;
}
});
instance_methods[2] = new objj_method(sel_registerName("initWithIndexesInRange:"), function(self, _cmd, aRange)
{ with(self)
{
    self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("CPObject") }, "init");

    if (self)
    {
        _count = aRange.length;
        _ranges = objj_msgSend(CPArray, "arrayWithObject:", aRange);
        _cachedRangeIndex = 0;
    }

    return self;
}
});
instance_methods[3] = new objj_method(sel_registerName("initWithIndexSet:"), function(self, _cmd, anIndexSet)
{ with(self)
{
    self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("CPObject") }, "init");

    if (self)
    {
        _count = objj_msgSend(anIndexSet, "count");
        _ranges = [];
        _cachedRangeIndex = 0;

        var index = 0,
            count = anIndexSet._ranges.length;

        for (; index < count; ++index)
            _ranges.push(CPCopyRange(anIndexSet._ranges[index]));
    }

    return self;
}
});
instance_methods[4] = new objj_method(sel_registerName("isEqualToIndexSet:"), function(self, _cmd, anIndexSet)
{ with(self)
{

 if (self == anIndexSet)
    return YES;

    var i = 0,
        count = _ranges.length;
        otherRanges = anIndexSet._ranges;



 if (count != otherRanges.length || _count != objj_msgSend(anIndexSet, "count"))
    return NO;

 for (; i < count; ++i)
  if (!CPEqualRanges(_ranges[i], otherRanges[i]))
   return NO;

 return YES;
}
});
instance_methods[5] = new objj_method(sel_registerName("containsIndex:"), function(self, _cmd, anIndex)
{ with(self)
{
    return objj_msgSend(self, "containsIndexesInRange:", CPMakeRange(anIndex,1));
}
});
instance_methods[6] = new objj_method(sel_registerName("containsIndexesInRange:"), function(self, _cmd, aRange)
{ with(self)
{
    if(!_count)
        return NO;

    var i = SOERangeIndex(self, aRange.location),
     lower = aRange.location,
     upper = CPMaxRange(aRange),
     count = _ranges.length;



    for(;i < count && _ranges[i].location < upper; ++i)

     if (_ranges[i].location <= lower && CPMaxRange(_ranges[i]) >= upper)
     {
            _cachedRangeIndex = i;
            return YES;
        }



    _cachedRangeIndex = i;

    return NO;
}
});
instance_methods[7] = new objj_method(sel_registerName("containsIndexes:"), function(self, _cmd, anIndexSet)
{ with(self)
{

    if(!objj_msgSend(anIndexSet, "count"))
        return YES;


    if(!_count)
        return NO;

    var i = 0,
        count = _ranges.length;


    for(; i < count; ++i)
        if (!objj_msgSend(anIndexSet, "containsIndexesInRange:", _ranges[i]))
            return NO;

    return YES;
}
});
instance_methods[8] = new objj_method(sel_registerName("intersectsIndexesInRange:"), function(self, _cmd, aRange)
{ with(self)
{

    if(!_count)
        return NO;

    var i = SOERangeIndex(self, aRange.location),
        count = _ranges.length,
        upper = CPMaxRange(aRange);



    for (; i < count && _ranges[i].location < upper; ++i)
        if(CPIntersectionRange(aRange, _ranges[i]).length)
            return YES;

    return NO;
}
});
instance_methods[9] = new objj_method(sel_registerName("count"), function(self, _cmd)
{ with(self)
{
    return _count;
}
});
instance_methods[10] = new objj_method(sel_registerName("firstIndex"), function(self, _cmd)
{ with(self)
{
    return _count ? _ranges[0].location : CPNotFound;
}
});
instance_methods[11] = new objj_method(sel_registerName("lastIndex"), function(self, _cmd)
{ with(self)
{
    return _count ? CPMaxRange(_ranges[_ranges.length-1]) - 1 : CPNotFound;
}
});
instance_methods[12] = new objj_method(sel_registerName("indexGreaterThanIndex:"), function(self, _cmd, anIndex)
{ with(self)
{
    if(!_count)
        return CPNotFound;

    var i = SOERangeIndex(self, anIndex++),
        count = _ranges.length;

    for(; i < count && anIndex >= CPMaxRange(_ranges[i]); ++i) ;

    if (i == count)
        return CPNotFound;

    _cachedRangeIndex = i;

    if (anIndex < _ranges[i].location)
        return _ranges[i].location;

    return anIndex;
}
});
instance_methods[13] = new objj_method(sel_registerName("indexLessThanIndex:"), function(self, _cmd, anIndex)
{ with(self)
{
    if (!_count)
        return CPNotFound;

    var i = GOERangeIndex(self, anIndex--);

    for (; i >= 0 && anIndex < _ranges[i].location; --i) ;

    if(i < 0)
        return CPNotFound;

    _cachedRangeIndex = i;

   if (CPLocationInRange(anIndex, _ranges[i]))
        return anIndex;

    if (CPMaxRange(_ranges[i]) - 1 < anIndex)
        return CPMaxRange(_ranges[i]) - 1;

    return CPNotFound;
}
});
instance_methods[14] = new objj_method(sel_registerName("indexGreaterThanOrEqualToIndex:"), function(self, _cmd, anIndex)
{ with(self)
{
 return objj_msgSend(self, "indexGreaterThanIndex:", anIndex-1);
}
});
instance_methods[15] = new objj_method(sel_registerName("indexLessThanOrEqualToIndex:"), function(self, _cmd, anIndex)
{ with(self)
{
 return objj_msgSend(self, "indexLessThanIndex:", anIndex+1);
}
});
instance_methods[16] = new objj_method(sel_registerName("getIndexes:maxCount:inIndexRange:"), function(self, _cmd, anArray, aMaxCount, aRangePointer)
{ with(self)
{
    if (!_count || aMacCount <= 0 || aRangePointer && !aRangePointer.length)
        return 0;

    var i = SOERangeIndex(self, aRangePointer.location),
        total = 0,
        count = _ranges.length;

    for (; i < count; ++i)
    {

        var intersection = aRangePointer ? CPIntersectionRange(_ranges[i], aRangePointer) : _ranges[i],
            index = intersection.location,
            maximum = CPMaxRange(intersection);

        for (; index < maximum; ++index)
        {
            anArray[total++] = index;

            if (total == aMaxCount)
            {

                if (aRangePointer)
                {
                    var upper = CPMaxRange(aRangePointer);


                    aRangePointer.location = index + 1;
                    aRangePointer.length = upper - index - 1;
                }

                return aMaxCount;
            }
        }
    }


    if (aRangePointer)
    {
        aRangePointer.location = CPNotFound;
        aRangePointer.length = 0;
    }

    return total;
}
});
instance_methods[17] = new objj_method(sel_registerName("description"), function(self, _cmd)
{ with(self)
{
    var desc = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("CPObject") }, "description") + " ";

 if (_count)
 {
  desc += "[number of indexes: " + _count + " (in " + _ranges.length + " ranges), indexes: (";
  for (i = 0; i < _ranges.length; i++)
  {
   desc += _ranges[i].location;
   if (_ranges[i].length > 1) desc += "-" + (CPMaxRange(_ranges[i])-1) + ":"+_ranges[i].length+":";
   if (i+1 < _ranges.length) desc += " ";
  }
  desc += ")]";
 }
 else
  desc += "(no indexes)";
 return desc;
}
});
class_addMethods(the_class, instance_methods);
class_addMethods(meta_class, class_methods);
}

{
var the_class = objj_getClass("CPIndexSet")
if(!the_class) objj_exception_throw(new objj_exception(OBJJClassNotFoundException, "*** Could not find definition for class \"CPIndexSet\""));
var meta_class = _class_getMeta(the_class);var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("addIndex:"), function(self, _cmd, anIndex)
{ with(self)
{
    objj_msgSend(self, "addIndexesInRange:", CPMakeRange(anIndex,1));
}
});
instance_methods[1] = new objj_method(sel_registerName("addIndexes:"), function(self, _cmd, anIndexSet)
{ with(self)
{
    var i = 0,
        ranges = anIndexSet._ranges,
        count = ranges.length;


    for(; i < count; ++i)
        objj_msgSend(self, "addIndexesInRange:", ranges[i]);
}
});
instance_methods[2] = new objj_method(sel_registerName("addIndexesInRange:"), function(self, _cmd, aRange)
{ with(self)
{
    if (_ranges.length == 0)
    {
        _count = aRange.length;

        return objj_msgSend(_ranges, "addObject:", CPCopyRange(aRange));
    }




    var i = SOERangeIndex(self, aRange.location),
        count = _ranges.length,
        padded = CPMakeRange(aRange.location - 1, aRange.length + 2),
        maximum = CPMaxRange(aRange);


    if (count && CPMaxRange(_ranges[count-1]) < aRange.location)
        objj_msgSend(_ranges, "addObject:", CPCopyRange(aRange));
    else
        for (; i < count; ++i)
        {


            if (maximum < _ranges[i].location)
            {
                _count += aRange.length;


                if (i < _cachedRangeIndex) ++_cachedRangeIndex;

                return objj_msgSend(_ranges, "insertObject:atIndex:", CPCopyRange(aRange), i);
            }

            if (CPIntersectionRange(_ranges[i], padded).length)
            {
                var union = CPUnionRange(_ranges[i], aRange);


                if (union.length == _ranges[i].length)
                    return;


                 ++union.length;





                var j = i;

                for(; j < count; ++j)

                    if(CPIntersectionRange(union, _ranges[j]).length)
                        _count -= _ranges[j].length;
                    else
                        break;





                --union.length;
                _ranges[i] = union;


                if (j - i - 1 > 0)
                {
                    var remove = CPMakeRange(i + 1, j - i - 1);

                    _ranges[i] = CPUnionRange(_ranges[i], _ranges[j-1]);
                    objj_msgSend(_ranges, "removeObjectsInRange:", remove);


                    if (_cachedRangeIndex >= CPMaxRange(remove)) _cachedRangedIndex -= remove.length;
                    else if (CPLocationInRange(_cachedRangeIndex, remove)) _cachedRangeIndex = i;
                }


                _count += _ranges[i].length;

                return;
            }
        }

    _count += aRange.length;
}
});
instance_methods[3] = new objj_method(sel_registerName("removeIndex:"), function(self, _cmd, anIndex)
{ with(self)
{
    objj_msgSend(self, "removeIndexesInRange:", CPMakeRange(anIndex,1));
}
});
instance_methods[4] = new objj_method(sel_registerName("removeIndexes:"), function(self, _cmd, anIndexSet)
{ with(self)
{
    var i = 0,
        ranges = anIndexSet._ranges,
        count = ranges.length;


    for(; i < count; ++i)
        objj_msgSend(self, "removeIndexesInRange:", ranges[i]);
}
});
instance_methods[5] = new objj_method(sel_registerName("removeAllIndexes"), function(self, _cmd)
{ with(self)
{
    _ranges = [];
 _count = 0;
    _cachedRangeIndex = 0;
}
});
instance_methods[6] = new objj_method(sel_registerName("removeIndexesInRange:"), function(self, _cmd, aRange)
{ with(self)
{



    var i = SOERangeIndex(self, aRange.location),
        count = _ranges.length,
        maximum = CPMaxRange(aRange),
        removal = CPMakeRange(CPNotFound, 0);

    for (; i < count; ++i)
    {
        var range = _ranges[i];


        if (maximum < range.location)
            break;

        var intersection = CPIntersectionRange(range, aRange);


        if (!intersection.length)
            continue;



        else if (intersection.length == range.length)
        {
            if (removal.location == CPNotFound)
                removal = CPMakeRange(i, 1);
            else
                ++removal.length;
        }


        else if (intersection.location > range.location && CPMaxRange(intersection) < CPMaxRange(range))
        {
            var insert = CPMakeRange(CPMaxRange(intersection), CPMaxRange(range) - CPMaxRange(intersection));

            range.length = intersection.location - range.location;

            _count -= intersection.length;

            return objj_msgSend(_ranges, "insertObject:atIndex:", insert, i+1);
        }

        else
        {
            range.length -= intersection.length;

            if (intersection.location <= range.location)
                range.location += intersection.length;
        }

        _count -= intersection.length;
    }

    if (removal.length)
        objj_msgSend(_ranges, "removeObjectsInRange:", removal);
}
});
instance_methods[7] = new objj_method(sel_registerName("shiftIndexesStartingAtIndex:by:"), function(self, _cmd, anIndex, aDelta)
{ with(self)
{
 if (!_count || aDelta == 0)
    return;



    var i = _ranges.length - 1,
        shifted = CPMakeRange(CPNotFound, 0);

    for(; i >= 0; --i)
    {
        var range = _ranges[i],
            maximum = CPMaxRange(range);

        if (anIndex > maximum)
            break;



        if (anIndex > range.location && anIndex < maximum)
        {

            shifted = CPMakeRange(anIndex + aDelta, maximum - anIndex);
            range.length = anIndex - range.location;



            if (aDelta > 0)
                objj_msgSend(_ranges, "insertObject:atIndex:", shifted, i+1);

            else if (shifted.location < 0)
            {
                shifted.length = CPMaxRange(shifted);
                shifted.location = 0;
            }


            break;
        }


        if ((range.location += aDelta) < 0)
        {
            range.length = CPMaxRange(range);
            range.location = 0;
        }
    }


    if (aDelta < 0)
    {
        var j = i + 1,
            count = _ranges.length,
            shifts = [];

        for (; j < count; ++j)
            objj_msgSend(shifts, "addObject:", _ranges[j]);

        if ((j = i + 1) < count)
        {
            objj_msgSend(_ranges, "removeObjectsInRange:", CPMakeRange(j,count-j));

            for (j = 0, count = shifts.length; j < count; ++j)
                objj_msgSend(self, "addIndexesInRange:", shifts[j]);
        }

        if (shifted.location != CPNotFound)
            objj_msgSend(self, "addIndexesInRange:", shifted);
    }
}
});
class_addMethods(the_class, instance_methods);
}

var CPIndexSetCountKey = "CPIndexSetCountKey",
    CPIndexSetCachedRangeIndexKey = "CPIndexSetCachedRangeIndexKey",
    CPIndexSetRangeStringsKey = "CPIndexSetRangeStringsKey";

{
var the_class = objj_getClass("CPIndexSet")
if(!the_class) objj_exception_throw(new objj_exception(OBJJClassNotFoundException, "*** Could not find definition for class \"CPIndexSet\""));
var meta_class = _class_getMeta(the_class);var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("initWithCoder:"), function(self, _cmd, aCoder)
{ with(self)
{
    self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("CPObject") }, "init");

    if (self)
    {
        _count = objj_msgSend(aCoder, "decodeIntForKey:", CPIndexSetCountKey);
        _cachedRangeIndex = objj_msgSend(aCoder, "decodeIntForKey:", CPIndexSetCachedRangeIndexKey);
        _ranges = [];

        var rangeStrings = objj_msgSend(aCoder, "decodeObjectForKey:", CPIndexSetRangeStringsKey),
            index = 0,
            count = rangeStrings.length;

        for (; index < count; ++index)
            _ranges.push(CPRangeFromString(rangeStrings[index]));
    }

    return self;
}
});
instance_methods[1] = new objj_method(sel_registerName("encodeWithCoder:"), function(self, _cmd, aCoder)
{ with(self)
{
    objj_msgSend(aCoder, "encodeInt:forKey:", _count, CPIndexSetCountKey);
    objj_msgSend(aCoder, "encodeInt:forKey:", _cachedRangeIndex, CPIndexSetCachedRangeIndexKey);

    var index = 0,
        count = _ranges.length,
        rangeStrings = [];

    for (; index < count; ++index)
        rangeStrings[index] = CPStringFromRange(_ranges[index]);

    objj_msgSend(aCoder, "encodeObject:forKey:", rangeStrings, CPIndexSetRangeStringsKey);
}
});
class_addMethods(the_class, instance_methods);
}

{
var the_class = objj_getClass("CPIndexSet")
if(!the_class) objj_exception_throw(new objj_exception(OBJJClassNotFoundException, "*** Could not find definition for class \"CPIndexSet\""));
var meta_class = _class_getMeta(the_class);var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("copy"), function(self, _cmd)
{ with(self)
{
    return objj_msgSend(objj_msgSend(objj_msgSend(self, "class"), "alloc"), "initWithIndexSet:", self);
}
});
instance_methods[1] = new objj_method(sel_registerName("mutableCopy"), function(self, _cmd)
{ with(self)
{
    return objj_msgSend(objj_msgSend(objj_msgSend(self, "class"), "alloc"), "initWithIndexSet:", self);
}
});
class_addMethods(the_class, instance_methods);
}

{var the_class = objj_allocateClassPair(CPIndexSet, "CPMutableIndexSet"),
meta_class = _class_getMeta(the_class);objj_registerClassPair(the_class);
objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
}

var SOERangeIndex = function(anIndexSet, anIndex)
{
    var ranges = anIndexSet._ranges,
        cachedRangeIndex = 0;

    if(cachedRangeIndex < ranges.length && anIndex >= ranges[cachedRangeIndex].location)
        return cachedRangeIndex;

    return 0;
}

var GOERangeIndex = function(anIndexSet, anIndex)
{
    var ranges = anIndexSet._ranges,
        cachedRangeIndex = anIndexSet._ranges.length;

    if(cachedRangeIndex < ranges.length && anIndex <= ranges[cachedRangeIndex].location)
        return cachedRangeIndex;

    return ranges.length - 1;
}

p;14;CPInvocation.ji;10;CPObject.jc;3907;

{var the_class = objj_allocateClassPair(CPObject, "CPInvocation"),
meta_class = _class_getMeta(the_class);the_class.ivars.splice(the_class.ivars.length, 0, new objj_ivar("_returnValue"), new objj_ivar("_arguments"), new objj_ivar("_methodSignature"));
objj_registerClassPair(the_class);
objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
var class_methods = [];
class_methods[0] = new objj_method(sel_registerName("invocationWithMethodSignature:"), function(self, _cmd, aMethodSignature)
{ with(self)
{
    return objj_msgSend(objj_msgSend(self, "alloc"), "initWithMethodSignature:", aMethodSignature);
}
});
var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("initWithMethodSignature:"), function(self, _cmd, aMethodSignature)
{ with(self)
{
    self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("CPObject") }, "init");

    if (self)
    {
        _arguments = [];
        _methodSignature = aMethodSignature;
    }

    return self;
}
});
instance_methods[1] = new objj_method(sel_registerName("setSelector:"), function(self, _cmd, aSelector)
{ with(self)
{
    _arguments[1] = aSelector;
}
});
instance_methods[2] = new objj_method(sel_registerName("selector"), function(self, _cmd)
{ with(self)
{
    return _arguments[1];
}
});
instance_methods[3] = new objj_method(sel_registerName("setTarget:"), function(self, _cmd, aTarget)
{ with(self)
{
    _arguments[0] = aTarget;
}
});
instance_methods[4] = new objj_method(sel_registerName("target"), function(self, _cmd)
{ with(self)
{
    return _arguments[0];
}
});
instance_methods[5] = new objj_method(sel_registerName("setArgument:atIndex:"), function(self, _cmd, anArgument, anIndex)
{ with(self)
{
    _arguments[anIndex] = anArgument;
}
});
instance_methods[6] = new objj_method(sel_registerName("argumentAtIndex:"), function(self, _cmd, anIndex)
{ with(self)
{
    return _arguments[anIndex];
}
});
instance_methods[7] = new objj_method(sel_registerName("setReturnValue:"), function(self, _cmd, aReturnValue)
{ with(self)
{
    _returnValue = aReturnValue;
}
});
instance_methods[8] = new objj_method(sel_registerName("returnValue"), function(self, _cmd)
{ with(self)
{
    return _returnValue;
}
});
instance_methods[9] = new objj_method(sel_registerName("invoke"), function(self, _cmd)
{ with(self)
{
    _returnValue = objj_msgSend.apply(objj_msgSend, _arguments);
}
});
instance_methods[10] = new objj_method(sel_registerName("invokeWithTarget:"), function(self, _cmd, aTarget)
{ with(self)
{
    _arguments[0] = aTarget;
    _returnValue = objj_msgSend.apply(objj_msgSend, _arguments);
}
});
class_addMethods(the_class, instance_methods);
class_addMethods(meta_class, class_methods);
}

var CPInvocationArguments = "CPInvocationArguments",
    CPInvocationReturnValue = "CPInvocationReturnValue";

{
var the_class = objj_getClass("CPInvocation")
if(!the_class) objj_exception_throw(new objj_exception(OBJJClassNotFoundException, "*** Could not find definition for class \"CPInvocation\""));
var meta_class = _class_getMeta(the_class);var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("initWithCoder:"), function(self, _cmd, aCoder)
{ with(self)
{
    self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("CPObject") }, "init");

    if (self)
    {
        _returnValue = objj_msgSend(aCoder, "decodeObjectForKey:", CPInvocationReturnValue);
        _arguments = objj_msgSend(aCoder, "decodeObjectForKey:", CPInvocationArguments);
    }

    return self;
}
});
instance_methods[1] = new objj_method(sel_registerName("encodeWithCoder:"), function(self, _cmd, aCoder)
{ with(self)
{
    objj_msgSend(aCoder, "encodeObject:forKey:", _returnValue, CPInvocationReturnValue);
    objj_msgSend(aCoder, "encodeObject:forKey:", _arguments, CPInvocationArguments);
}
});
class_addMethods(the_class, instance_methods);
}

p;18;CPKeyValueCoding.ji;10;CPObject.jc;4155;

{
var the_class = objj_getClass("CPObject")
if(!the_class) objj_exception_throw(new objj_exception(OBJJClassNotFoundException, "*** Could not find definition for class \"CPObject\""));
var meta_class = _class_getMeta(the_class);var class_methods = [];
class_methods[0] = new objj_method(sel_registerName("accessInstanceVariablesDirectly"), function(self, _cmd)
{ with(self)
{
    return YES;
}
});
class_methods[1] = new objj_method(sel_registerName("_accessorForKey:"), function(self, _cmd, aKey)
{ with(self)
{
    var capitalizedKey = aKey.charAt(0).toUpperCase() + aKey.substr(1),
        selector = CPSelectorFromString("get" + capitalizedKey);

    if (objj_msgSend(self, "instancesRespondToSelector:", selector) ||
        objj_msgSend(self, "instancesRespondToSelector:", selector=CPSelectorFromString(aKey)) ||
        objj_msgSend(self, "instancesRespondToSelector:", selector=CPSelectorFromString("is"+capitalizedKey)))
        return selector;

    return nil;
}
});
class_methods[2] = new objj_method(sel_registerName("_modifierForKey:"), function(self, _cmd, aKey)
{ with(self)
{
    var selector = CPSelectorFromString("set" + aKey.charAt(0).toUpperCase() + aKey.substr(1) + ':');

    if (objj_msgSend(self, "instancesRespondToSelector:", selector))
        return selector;

    return nil;
}
});
var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("_ivarForKey:"), function(self, _cmd, aKey)
{ with(self)
{
    var ivar,
        isKey = "is" + aKey.charAt(0).toUpperCase() + aKey.substr(1);

    if (self[ivar="_"+aKey] != undefined || self[ivar="_"+isKey] != undefined ||
        self[ivar=aKey] != undefined || self[ivar=isKey] != undefined) ;
        return ivar;

    return nil;
}
});
instance_methods[1] = new objj_method(sel_registerName("valueForKey:"), function(self, _cmd, aKey)
{ with(self)
{
    var ivar,
        theClass = objj_msgSend(self, "class"),
        selector = objj_msgSend(theClass, "_accessorForKey:", aKey)

    if (selector)
        return objj_msgSend(self, "performSelector:", selector);
    else if(objj_msgSend(theClass, "accessInstanceVariablesDirectly") && (ivar = objj_msgSend(self, "_ivarForKey:", aKey)))
        return self[ivar];
    else
        return objj_msgSend(self, "valueForUndefinedKey:", aKey);
}
});
instance_methods[2] = new objj_method(sel_registerName("valueForKeyPath:"), function(self, _cmd, aKeyPath)
{ with(self)
{
    var i = 0,
        keys = aKeyPath.split("."),
        count = keys.length,
        value = self;

    for(; i<count; ++i)
        value = objj_msgSend(value, "valueForKey:", keys[i]);

    return value;
}
});
instance_methods[3] = new objj_method(sel_registerName("valueForUndefinedKey:"), function(self, _cmd, aKey)
{ with(self)
{
    alert("IMPLEMENT EXCEPTIONS, also, valueForKey died.");

}
});
instance_methods[4] = new objj_method(sel_registerName("setValue:forKeyPath:"), function(self, _cmd, aValue, aKeyPath)
{ with(self)
{
    if (!aKeyPath) aKeyPath = "self";

    var i = 0,
        keys = aKeyPath.split("."),
        count = keys.length - 1,
        owner = self;

    for(; i < count; ++i)
        owner = objj_msgSend(owner, "valueForKey:", keys[i]);

    objj_msgSend(owner, "setValue:forKey:", aValue, keys[i]);
}
});
instance_methods[5] = new objj_method(sel_registerName("setValue:forKey:"), function(self, _cmd, aValue, aKey)
{ with(self)
{
    var ivar,
        theClass = objj_msgSend(self, "class"),
        selector = objj_msgSend(theClass, "_modifierForKey:", aKey);

    if (selector)
        objj_msgSend(self, "performSelector:withObject:", selector, aValue);
    else if(objj_msgSend(theClass, "accessInstanceVariablesDirectly") && (ivar = objj_msgSend(self, "_ivarForKey:", aKey)))
        self[ivar] = aValue;
    else
        objj_msgSend(self, "setValue:forUndefinedKey:", aValue, aKey);
}
});
instance_methods[6] = new objj_method(sel_registerName("setValue:forUndefinedKey:"), function(self, _cmd, aValue, aKey)
{ with(self)
{
    alert("IMPLEMENT EXCEPTIONS, also, setValueForKey died.");

}
});
class_addMethods(the_class, instance_methods);
class_addMethods(meta_class, class_methods);
}

p;17;CPKeyedArchiver.ji;8;CPData.ji;9;CPCoder.ji;9;CPArray.ji;10;CPString.ji;10;CPNumber.ji;14;CPDictionary.ji;9;CPValue.jc;15652;

var CPArchiverReplacementClassNames = nil;

var _CPKeyedArchiverDidEncodeObjectSelector = 1,
    _CPKeyedArchiverWillEncodeObjectSelector = 2,
    _CPKeyedArchiverWillReplaceObjectWithObjectSelector = 4,
    _CPKeyedArchiverDidFinishSelector = 8,
    _CPKeyedArchiverWillFinishSelector = 16;

var _CPKeyedArchiverNullString = "$null",
    _CPKeyedArchiverNullReference = nil,

    _CPKeyedArchiverUIDKey = "CP$UID",

    _CPKeyedArchiverTopKey = "$top",
    _CPKeyedArchiverObjectsKey = "$objects",
    _CPKeyedArchiverArchiverKey = "$archiver",
    _CPKeyedArchiverVersionKey = "$version",

    _CPKeyedArchiverClassNameKey = "$classname",
    _CPKeyedArchiverClassesKey = "$classes",
    _CPKeyedArchiverClassKey = "$class";

var _CPKeyedArchiverStringClass = Nil,
    _CPKeyedArchiverNumberClass = Nil;

{var the_class = objj_allocateClassPair(CPValue, "_CPKeyedArchiverValue"),
meta_class = _class_getMeta(the_class);objj_registerClassPair(the_class);
objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
}

{var the_class = objj_allocateClassPair(CPCoder, "CPKeyedArchiver"),
meta_class = _class_getMeta(the_class);the_class.ivars.splice(the_class.ivars.length, 0, new objj_ivar("_delegate"), new objj_ivar("_delegateSelectors"), new objj_ivar("_data"), new objj_ivar("_objects"), new objj_ivar("_UIDs"), new objj_ivar("_conditionalUIDs"), new objj_ivar("_replacementObjects"), new objj_ivar("_replacementClassNames"), new objj_ivar("_plistObject"), new objj_ivar("_plistObjects"));
objj_registerClassPair(the_class);
objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
var class_methods = [];
class_methods[0] = new objj_method(sel_registerName("initialize"), function(self, _cmd)
{ with(self)
{
    if (self != objj_msgSend(CPKeyedArchiver, "class"))
        return;

    _CPKeyedArchiverStringClass = objj_msgSend(CPString, "class");
    _CPKeyedArchiverNumberClass = objj_msgSend(CPNumber, "class");

    _CPKeyedArchiverNullReference = objj_msgSend(CPDictionary, "dictionaryWithObject:forKey:", 0, _CPKeyedArchiverUIDKey);
}
});
class_methods[1] = new objj_method(sel_registerName("allowsKeyedCoding"), function(self, _cmd)
{ with(self)
{
    return YES;
}
});
class_methods[2] = new objj_method(sel_registerName("archivedDataWithRootObject:"), function(self, _cmd, anObject)
{ with(self)
{
    var data = objj_msgSend(CPData, "dataWithPlistObject:", nil),
        archiver = objj_msgSend(objj_msgSend(self, "alloc"), "initForWritingWithMutableData:", data);

    objj_msgSend(archiver, "encodeObject:forKey:", anObject, "root");
    objj_msgSend(archiver, "finishEncoding");

    return data;
}
});
var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("initForWritingWithMutableData:"), function(self, _cmd, data)
{ with(self)
{
    self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("CPCoder") }, "init");

    if (self)
    {
        _data = data;

        _objects = [];

        _UIDs = objj_msgSend(CPDictionary, "dictionary");
        _conditionalUIDs = objj_msgSend(CPDictionary, "dictionary");

        _replacementObjects = objj_msgSend(CPDictionary, "dictionary");

        _data = data;

        _plistObject = objj_msgSend(CPDictionary, "dictionary");
        _plistObjects = objj_msgSend(CPArray, "arrayWithObject:", _CPKeyedArchiverNullString);
    }

    return self;
}
});
instance_methods[1] = new objj_method(sel_registerName("finishEncoding"), function(self, _cmd)
{ with(self)
{
    if (_delegate && _delegateSelectors & _CPKeyedArchiverWillFinishSelector)
        objj_msgSend(_delegate, "archiverWillFinish:", self);

    var i = 0,
        topObject = _plistObject,
        classes = [];

    for (; i < _objects.length; ++i)
    {
        var object = _objects[i],
            theClass = objj_msgSend(object, "classForKeyedArchiver");




        _plistObject = _plistObjects[objj_msgSend(_UIDs, "objectForKey:", objj_msgSend(object, "hash"))];
        objj_msgSend(object, "encodeWithCoder:", self);

        if (_delegate && _delegateSelectors & _CPKeyedArchiverDidEncodeObjectSelector)
            objj_msgSend(_delegate, "archiver:didEncodeObject:", self, object);
    }

    _plistObject = objj_msgSend(CPDictionary, "dictionary");

    objj_msgSend(_plistObject, "setObject:forKey:", topObject, _CPKeyedArchiverTopKey);
    objj_msgSend(_plistObject, "setObject:forKey:", _plistObjects, _CPKeyedArchiverObjectsKey);
    objj_msgSend(_plistObject, "setObject:forKey:", objj_msgSend(self, "className"), _CPKeyedArchiverArchiverKey);
    objj_msgSend(_plistObject, "setObject:forKey:", "100000", _CPKeyedArchiverVersionKey);

    objj_msgSend(_data, "setPlistObject:", _plistObject);

    if (_delegate && _delegateSelectors & _CPKeyedArchiverDidFinishSelector)
        objj_msgSend(_delegate, "archiverDidFinish:", self);
}
});
instance_methods[2] = new objj_method(sel_registerName("encodeBool:forKey:"), function(self, _cmd, aBOOL, aKey)
{ with(self)
{
    objj_msgSend(_plistObject, "setObject:forKey:", _CPKeyedArchiverEncodeObject(self,aBOOL,NO), aKey);
}
});
instance_methods[3] = new objj_method(sel_registerName("encodeFloat:forKey:"), function(self, _cmd, aFloat, aKey)
{ with(self)
{
    objj_msgSend(_plistObject, "setObject:forKey:", _CPKeyedArchiverEncodeObject(self,aFloat,NO), aKey);
}
});
instance_methods[4] = new objj_method(sel_registerName("encodeInt:forKey:"), function(self, _cmd, anInt, aKey)
{ with(self)
{
    objj_msgSend(_plistObject, "setObject:forKey:", _CPKeyedArchiverEncodeObject(self,anInt,NO), aKey);
}
});
instance_methods[5] = new objj_method(sel_registerName("setDelegate:"), function(self, _cmd, aDelegate)
{ with(self)
{
    _delegate = aDelegate;

    if (objj_msgSend(_delegate, "respondsToSelector:", sel_registerName("archiver:didEncodeObject:")))
        _delegateSelectors |= _CPKeyedArchiverDidEncodeObjectSelector;

    if (objj_msgSend(_delegate, "respondsToSelector:", sel_registerName("archiver:willEncodeObject:")))
        _delegateSelectors |= _CPKeyedArchiverWillEncodeObjectSelector;

    if (objj_msgSend(_delegate, "respondsToSelector:", sel_registerName("archiver:willReplaceObject:withObject:")))
        _delegateSelectors |= _CPKeyedArchiverWillReplaceObjectWithObjectSelector;

    if (objj_msgSend(_delegate, "respondsToSelector:", sel_registerName("archiver:didFinishEncoding:")))
        _delegateSelectors |= _CPKeyedArchiverDidFinishEncodingSelector;

    if (objj_msgSend(_delegate, "respondsToSelector:", sel_registerName("archiver:willFinishEncoding:")))
        _delegateSelectors |= _CPKeyedArchiverWillFinishEncodingSelector;

}
});
instance_methods[6] = new objj_method(sel_registerName("delegate"), function(self, _cmd)
{ with(self)
{
    return _delegate;
}
});
instance_methods[7] = new objj_method(sel_registerName("encodePoint:forKey:"), function(self, _cmd, aPoint, aKey)
{ with(self)
{
    objj_msgSend(_plistObject, "setObject:forKey:", _CPKeyedArchiverEncodeObject(self,CPStringFromPoint(aPoint),NO), aKey);
}
});
instance_methods[8] = new objj_method(sel_registerName("encodeRect:forKey:"), function(self, _cmd, aRect, aKey)
{ with(self)
{
    objj_msgSend(_plistObject, "setObject:forKey:", _CPKeyedArchiverEncodeObject(self,CPStringFromRect(aRect),NO), aKey);
}
});
instance_methods[9] = new objj_method(sel_registerName("encodeSize:forKey:"), function(self, _cmd, aSize, aKey)
{ with(self)
{
    objj_msgSend(_plistObject, "setObject:forKey:", _CPKeyedArchiverEncodeObject(self,CPStringFromSize(aSize),NO), aKey);
}
});
instance_methods[10] = new objj_method(sel_registerName("encodeConditionalObject:forKey:"), function(self, _cmd, anObject, aKey)
{ with(self)
{
    objj_msgSend(_plistObject, "setObject:forKey:", _CPKeyedArchiverEncodeObject(self,anObject,YES), aKey);
}
});
instance_methods[11] = new objj_method(sel_registerName("encodeNumber:forKey:"), function(self, _cmd, aNumber, aKey)
{ with(self)
{
    objj_msgSend(_plistObject, "setObject:forKey:", _CPKeyedArchiverEncodeObject(self,aNuumber,NO), aKey);
}
});
instance_methods[12] = new objj_method(sel_registerName("encodeObject:forKey:"), function(self, _cmd, anObject, aKey)
{ with(self)
{
    objj_msgSend(_plistObject, "setObject:forKey:", _CPKeyedArchiverEncodeObject(self,anObject,NO), aKey);
}
});
instance_methods[13] = new objj_method(sel_registerName("_encodeArrayOfObjects:forKey:"), function(self, _cmd, objects, aKey)
{ with(self)
{
    var i = 0,
        count = objects.length,
        references = objj_msgSend(CPArray, "arrayWithCapacity:", count);

    for (; i < count; ++i)
        objj_msgSend(references, "addObject:", _CPKeyedArchiverEncodeObject(self,objects[i],NO));

    objj_msgSend(_plistObject, "setObject:forKey:", references, aKey);
}
});
instance_methods[14] = new objj_method(sel_registerName("_encodeDictionaryOfObjects:forKey:"), function(self, _cmd, aDictionary, aKey)
{ with(self)
{
    var key,
        keys = objj_msgSend(aDictionary, "keyEnumerator"),
        references = objj_msgSend(CPDictionary, "dictionary");

    while (key = objj_msgSend(keys, "nextObject"))
        objj_msgSend(references, "setObject:forKey:", _CPKeyedArchiverEncodeObject(self,objj_msgSend(aDictionary, "objectForKey:", key),NO), key);

    objj_msgSend(_plistObject, "setObject:forKey:", references, aKey);
}
});
class_methods[3] = new objj_method(sel_registerName("setClassName:forClass:"), function(self, _cmd, aClassName, aClass)
{ with(self)
{
    if (!CPArchiverReplacementClassNames)
        CPArchiverReplacementClassNames = objj_msgSend(CPDictionary, "dictionary");

    objj_msgSend(CPArchiverReplacementClassNames, "setObject:forKey:", aClassName, CPStringFromClass(aClass));
}
});
class_methods[4] = new objj_method(sel_registerName("classNameForClass:"), function(self, _cmd, aClass)
{ with(self)
{
    if (!CPArchiverReplacementClassNames)
        return aClass.name;

    var className = objj_msgSend(CPArchiverReplacementClassNames, "objectForKey:", CPStringFromClass(aClassName));

    return className ? className : aClass.name;
}
});
instance_methods[15] = new objj_method(sel_registerName("setClassName:forClass:"), function(self, _cmd, aClassName, aClass)
{ with(self)
{
    if (!_replacementClassNames)
        _replacementClassNames = objj_msgSend(CPDictionary, "dictionary");

    objj_msgSend(_replacementClassNames, "setObject:forKey:", aClassName, CPStringFromClass(aClass));
}
});
instance_methods[16] = new objj_method(sel_registerName("classNameForClass:"), function(self, _cmd, aClass)
{ with(self)
{
    if (!_replacementClassNames)
        return aClass.name;

    var className = objj_msgSend(_replacementClassNames, "objectForKey:", CPStringFromClass(aClassName));

    return className ? className : aClass.name;
}
});
class_addMethods(the_class, instance_methods);
class_addMethods(meta_class, class_methods);
}

var _CPKeyedArchiverEncodeObject = function(self, anObject, isConditional)
{



    if (anObject != nil && !anObject.isa)
        anObject = objj_msgSend(_CPKeyedArchiverValue, "valueWithJSObject:", anObject);


    var hash = objj_msgSend(anObject, "hash"),
        object = objj_msgSend(self._replacementObjects, "objectForKey:", hash);



    if (object == nil)
    {
        object = objj_msgSend(anObject, "replacementObjectForKeyedArchiver:", self);


        if (self._delegate)
        {
            if (object != anObject && self._delegateSelectors & _CPKeyedArchiverWillReplaceObjectWithObjectSelector)
                objj_msgSend(self._delegate, "archiver:willReplaceObject:withObject:", self, anObject, object);

            if (self._delegateSelectors & _CPKeyedArchiverWillEncodeObjectSelector)
            {
                anObject = objj_msgSend(self._delegate, "archiver:willEncodeObject:", self, object);

                if (anObject != object && self._delegateSelectors & _CPKeyedArchiverWillReplaceObjectWithObjectSelector)
                    objj_msgSend(self._delegate, "archiver:willReplaceObject:withObject:", self, object, anObject);

                object = anObject;
            }
        }

        objj_msgSend(self._replacementObjects, "setObject:forKey:", object, hash);
    }




    if (object == nil)
        return _CPKeyedArchiverNullReference;


    var UID = objj_msgSend(self._UIDs, "objectForKey:", hash=objj_msgSend(object, "hash"));




    if (UID == nil)
    {

        if (isConditional)
        {

            if ((UID = objj_msgSend(self._conditionalUIDs, "objectForKey:", hash)) == nil)
            {

                objj_msgSend(self._conditionalUIDs, "setObject:forKey:", UID=objj_msgSend(self._plistObjects, "count"), hash);
                objj_msgSend(self._plistObjects, "addObject:", _CPKeyedArchiverNullString);
            }
        }
        else
        {
            var theClass = objj_msgSend(anObject, "classForKeyedArchiver"),
                plistObject = nil,
                shouldEncodeObject = NO;

            if (theClass == _CPKeyedArchiverStringClass || theClass == _CPKeyedArchiverNumberClass)
                plistObject = object;
            else
            {
                shouldEncodeObject = YES;
                plistObject = objj_msgSend(CPDictionary, "dictionary");
            }


            if ((UID = objj_msgSend(self._conditionalUIDs, "objectForKey:", hash)) == nil)
            {
                objj_msgSend(self._UIDs, "setObject:forKey:", UID=objj_msgSend(self._plistObjects, "count"), hash);
                objj_msgSend(self._plistObjects, "addObject:", plistObject);


                if (shouldEncodeObject)
                {
                    objj_msgSend(self._objects, "addObject:", object);

                    var className = objj_msgSend(self, "classNameForClass:", theClass);

                    if (!className)
                        className = objj_msgSend(objj_msgSend(self, "class"), "classNameForClass:", theClass);

                    if (!className)
                        className = theClass.name;
                    else
                        theClass = window[className];

                    var classUID = objj_msgSend(self._UIDs, "objectForKey:", className);

                    if (!classUID)
                    {
                        var plistClass = objj_msgSend(CPDictionary, "dictionary"),
                            hierarchy = [];

                        objj_msgSend(plistClass, "setObject:forKey:", className, _CPKeyedArchiverClassNameKey);

                        do
                        {
                            objj_msgSend(hierarchy, "addObject:", CPStringFromClass(theClass));
                        } while (theClass = objj_msgSend(theClass, "superclass"));

                        objj_msgSend(plistClass, "setObject:forKey:", hierarchy, _CPKeyedArchiverClassesKey);

                        classUID = objj_msgSend(self._plistObjects, "count");
                        objj_msgSend(self._plistObjects, "addObject:", plistClass);
                        objj_msgSend(self._UIDs, "setObject:forKey:", classUID, className);
                    }

                    objj_msgSend(plistObject, "setObject:forKey:", objj_msgSend(CPDictionary, "dictionaryWithObject:forKey:", classUID, _CPKeyedArchiverUIDKey), _CPKeyedArchiverClassKey);
                }
            }
            else
            {
                objj_msgSend(self._UIDs, "setObject:forKey:", object, UID);
                objj_msgSend(self._plistObjects, "replaceObjectAtIndex:withObject:", UID, plistObject);
            }
        }
    }

    return objj_msgSend(CPDictionary, "dictionaryWithObject:forKey:", UID, _CPKeyedArchiverUIDKey);
}

p;19;CPKeyedUnarchiver.ji;8;CPNull.ji;9;CPCoder.jc;10920;


var _CPKeyedUnarchiverCannotDecodeObjectOfClassNameOriginalClassSelector = 1,
    _CPKeyedUnarchiverDidDecodeObjectSelector = 1 << 1,
    _CPKeyedUnarchiverWillReplaceObjectWithObjectSelector = 1 << 2,
    _CPKeyedUnarchiverWillFinishSelector = 1 << 3,
    _CPKeyedUnarchiverDidFinishSelector = 1 << 4;

var _CPKeyedArchiverNullString = "$null"

    _CPKeyedArchiverUIDKey = "CP$UID",

    _CPKeyedArchiverTopKey = "$top",
    _CPKeyedArchiverObjectsKey = "$objects",
    _CPKeyedArchiverArchiverKey = "$archiver",
    _CPKeyedArchiverVersionKey = "$version",

    _CPKeyedArchiverClassNameKey = "$classname",
    _CPKeyedArchiverClassesKey = "$classes",
    _CPKeyedArchiverClassKey = "$class";

var _CPKeyedUnarchiverArrayClass = Nil,
    _CPKeyedUnarchiverStringClass = Nil,
    _CPKeyedUnarchiverDictionaryClass = Nil,
    _CPKeyedUnarchiverArchiverValueClass = Nil;

{var the_class = objj_allocateClassPair(CPCoder, "CPKeyedUnarchiver"),
meta_class = _class_getMeta(the_class);the_class.ivars.splice(the_class.ivars.length, 0, new objj_ivar("_delegate"), new objj_ivar("_delegateSelectors"), new objj_ivar("_data"), new objj_ivar("_replacementObjects"), new objj_ivar("_replacementClassNames"), new objj_ivar("_objects"), new objj_ivar("_archive"), new objj_ivar("_plistObject"), new objj_ivar("_plistObjects"));
objj_registerClassPair(the_class);
objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
var class_methods = [];
class_methods[0] = new objj_method(sel_registerName("initialize"), function(self, _cmd)
{ with(self)
{
    if (self != objj_msgSend(CPKeyedUnarchiver, "class"))
        return;

    _CPKeyedUnarchiverArrayClass = objj_msgSend(CPArray, "class");
    _CPKeyedUnarchiverStringClass = objj_msgSend(CPString, "class");
    _CPKeyedUnarchiverDictionaryClass = objj_msgSend(CPDictionary, "class");
    _CPKeyedUnarchiverArchiverValueClass = objj_msgSend(_CPKeyedArchiverValue, "class");
}
});
var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("initForReadingWithData:"), function(self, _cmd, data)
{ with(self)
{
    self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("CPCoder") }, "init");

    if (self)
    {
        _archive = objj_msgSend(data, "plistObject");
        _objects = objj_msgSend(CPArray, "arrayWithObject:", objj_msgSend(CPNull, "null"));

        _plistObject = objj_msgSend(_archive, "objectForKey:", _CPKeyedArchiverTopKey);
        _plistObjects = objj_msgSend(_archive, "objectForKey:", _CPKeyedArchiverObjectsKey);
    }

    return self;
}
});
class_methods[1] = new objj_method(sel_registerName("unarchiveObjectWithData:"), function(self, _cmd, data)
{ with(self)
{
    var unarchiver = objj_msgSend(objj_msgSend(self, "alloc"), "initForReadingWithData:", data),
        object = objj_msgSend(unarchiver, "decodeObjectForKey:", "root");

    objj_msgSend(unarchiver, "finishDecoding");

    return object;
}
});
class_methods[2] = new objj_method(sel_registerName("unarchiveObjectWithFile:"), function(self, _cmd, aFilePath)
{ with(self)
{}
});
class_methods[3] = new objj_method(sel_registerName("unarchiveObjectWithFile:asynchronously:"), function(self, _cmd, aFilePath, aFlag)
{ with(self)
{}
});
instance_methods[1] = new objj_method(sel_registerName("containsValueForKey:"), function(self, _cmd, aKey)
{ with(self)
{
    return objj_msgSend(_plistObject, "objectForKey:", aKey) != nil;
}
});
instance_methods[2] = new objj_method(sel_registerName("_decodeArrayOfObjectsForKey:"), function(self, _cmd, aKey)
{ with(self)
{
    var object = objj_msgSend(_plistObject, "objectForKey:", aKey);

    if (objj_msgSend(object, "isKindOfClass:", _CPKeyedUnarchiverArrayClass))
    {
        var i = 0,
            count = object.length,
            array = objj_msgSend(CPArray, "arrayWithCapacity:", i);

        for (; i < count; ++i)
            objj_msgSend(array, "addObject:", _CPKeyedUnarchiverDecodeObjectAtIndex(self,objj_msgSend(object[i], "objectForKey:", _CPKeyedArchiverUIDKey)));

        return array;
    }

    return nil;
}
});
instance_methods[3] = new objj_method(sel_registerName("_decodeDictionaryOfObjectsForKey:"), function(self, _cmd, aKey)
{ with(self)
{
    var object = objj_msgSend(_plistObject, "objectForKey:", aKey);

    if (objj_msgSend(object, "isKindOfClass:", _CPKeyedUnarchiverDictionaryClass))
    {
        var key,
            keys = objj_msgSend(object, "keyEnumerator"),
            dictionary = objj_msgSend(CPDictionary, "dictionary");

        while (key = objj_msgSend(keys, "nextObject"))
            objj_msgSend(dictionary, "setObject:forKey:", _CPKeyedUnarchiverDecodeObjectAtIndex(self,objj_msgSend(objj_msgSend(object, "objectForKey:", key), "objectForKey:", _CPKeyedArchiverUIDKey)), key);

        return dictionary;
    }

    return nil;
}
});
instance_methods[4] = new objj_method(sel_registerName("decodeBoolForKey:"), function(self, _cmd, aKey)
{ with(self)
{
    return objj_msgSend(self, "decodeObjectForKey:", aKey);
}
});
instance_methods[5] = new objj_method(sel_registerName("decodeFloatForKey:"), function(self, _cmd, aKey)
{ with(self)
{
    return objj_msgSend(self, "decodeObjectForKey:", aKey);
}
});
instance_methods[6] = new objj_method(sel_registerName("decodeIntForKey:"), function(self, _cmd, aKey)
{ with(self)
{
    return objj_msgSend(self, "decodeObjectForKey:", aKey);
}
});
instance_methods[7] = new objj_method(sel_registerName("decodePointForKey:"), function(self, _cmd, aKey)
{ with(self)
{
    return CPPointFromString(objj_msgSend(self, "decodeObjectForKey:", aKey));
}
});
instance_methods[8] = new objj_method(sel_registerName("decodeRectForKey:"), function(self, _cmd, aKey)
{ with(self)
{
    return CPRectFromString(objj_msgSend(self, "decodeObjectForKey:", aKey));
}
});
instance_methods[9] = new objj_method(sel_registerName("decodeSizeForKey:"), function(self, _cmd, aKey)
{ with(self)
{
    return CPSizeFromString(objj_msgSend(self, "decodeObjectForKey:", aKey));
}
});
instance_methods[10] = new objj_method(sel_registerName("decodeObjectForKey:"), function(self, _cmd, aKey)
{ with(self)
{
    var object = objj_msgSend(_plistObject, "objectForKey:", aKey);

    if (objj_msgSend(object, "isKindOfClass:", _CPKeyedUnarchiverDictionaryClass))
        return _CPKeyedUnarchiverDecodeObjectAtIndex(self, objj_msgSend(object, "objectForKey:", _CPKeyedArchiverUIDKey));



    return nil;
}
});
instance_methods[11] = new objj_method(sel_registerName("finishDecoding"), function(self, _cmd)
{ with(self)
{
    if (_delegateSelectors & _CPKeyedUnarchiverWillFinishSelector)
        objj_msgSend(_delegate, "unarchiverWillFinish:", self);

    if (_delegateSelectors & _CPKeyedUnarchiverDidFinishSelector)
        objj_msgSend(_delegate, "unarchiverDidFinish:", self);
}
});
instance_methods[12] = new objj_method(sel_registerName("delegate"), function(self, _cmd)
{ with(self)
{
    return _delegate;
}
});
instance_methods[13] = new objj_method(sel_registerName("setDelegate:"), function(self, _cmd, aDelegate)
{ with(self)
{
    _delegate = aDelegate;

    if (objj_msgSend(_delegate, "respondsToSelector:", sel_registerName("unarchiver:CannotDecodeObjectOfClassName:originalClass:")))
        _delegateSelectors |= _CPKeyedUnarchiverCannotDecodeObjectOfClassNameOriginalClassSelector;

    if (objj_msgSend(_delegate, "respondsToSelector:", sel_registerName("unarchiver:didDecodeObject:")))
        _delegateSelectors |= _CPKeyedUnarchiverDidDecodeObjectSelector;

    if (objj_msgSend(_delegate, "respondsToSelector:", sel_registerName("unarchiver:willReplaceObject:withObject:")))
        _delegateSelectors |= _CPKeyedUnarchiverWillReplaceObjectWithObjectSelector;

    if (objj_msgSend(_delegate, "respondsToSelector:", sel_registerName("unarchiverWillFinish:")))
        _delegateSelectors |= _CPKeyedUnarchiverWilFinishSelector;

    if (objj_msgSend(_delegate, "respondsToSelector:", sel_registerName("unarchiverDidFinish:")))
        _delegateSelectors |= _CPKeyedUnarchiverDidFinishSelector;
}
});
instance_methods[14] = new objj_method(sel_registerName("allowsKeyedCoding"), function(self, _cmd)
{ with(self)
{
    return YES;
}
});
class_addMethods(the_class, instance_methods);
class_addMethods(meta_class, class_methods);
}

var _CPKeyedUnarchiverDecodeObjectAtIndex = function(self, anIndex)
{
    var object = self._objects[anIndex];

    if (object)
        if (object == self._objects[0])
            return nil;
        else
            return object;

    var object,
        plistObject = self._plistObjects[anIndex];

    if (objj_msgSend(plistObject, "isKindOfClass:", _CPKeyedUnarchiverDictionaryClass))
    {
        var plistClass = self._plistObjects[objj_msgSend(objj_msgSend(plistObject, "objectForKey:", _CPKeyedArchiverClassKey), "objectForKey:", _CPKeyedArchiverUIDKey)],
            className = objj_msgSend(plistClass, "objectForKey:", _CPKeyedArchiverClassNameKey),
            classes = objj_msgSend(plistClass, "objectForKey:", _CPKeyedArchiverClassesKey),
            theClass = CPClassFromString(className);

        object = objj_msgSend(theClass, "alloc");


        self._objects[anIndex] = object;

        var savedPlistObject = self._plistObject;

        self._plistObject = plistObject;

        var processedObject = objj_msgSend(object, "initWithCoder:", self);

        self._plistObject = savedPlistObject;

        if (processedObject != object)
        {
            if (self._delegateSelectors & _CPKeyedUnarchiverWillReplaceObjectWithObjectSelector)
                objj_msgSend(self._delegate, "unarchiver:willReplaceObject:withObject:", self, object, processedObject);

            self._objects[anIndex] = object = processedObject;
        }
        if (self._delegate)
        {
            if (self._delegateSelectors & _CPKeyedUnarchiverDidDecodeObjectSelector)
                processedObject = objj_msgSend(self._delegate, "unarchiver:didDecodeObject:", self, object);
            if (processedObject != object)
            {
                if (self._delegateSelectors & _CPKeyedUnarchiverWillReplaceObjectWithObjectSelector)
                    objj_msgSend(self._delegate, "unarchiver:willReplaceObject:withObject:", self, object, processedObject);
                self._objects[anIndex] = object = processedObject;
            }
        }
    }
    else
    {
        self._objects[anIndex] = object = plistObject;
        if (objj_msgSend(object, "class") == _CPKeyedUnarchiverStringClass)
        {
            if (object == _CPKeyedArchiverNullString)
            {
                self._objects[anIndex] = self._objects[0];
                return nil;
            }
            else
                self._objects[anIndex] = object = plistObject;
        }
    }
    if (objj_msgSend(object, "isMemberOfClass:", _CPKeyedUnarchiverArchiverValueClass))
        object = objj_msgSend(object, "JSObject");
    return object;
}

p;7;CPLog.jc;6704;

window.CPLogDisable = false;

var CPLogWindow = nil;

var CPLogLevels = ["fatal","error","warn","info","debug","trace"];
var CPLogTitle = "Cappuccino";

CPLogInit= function(logWindow) {
    var doc = logWindow.document;


    doc.writeln("<html><head><title></title></head><body></body></html>");

    doc.title = CPLogTitle + " Run Log";

    var head = doc.getElementsByTagName("head")[0];
    var body = doc.getElementsByTagName("body")[0];

    var loc = String(window.location);
    var base = loc.substring(0,loc.lastIndexOf("/")+1);
    var link = doc.createElement("link");
    link.setAttribute("type", "text/css");
    link.setAttribute("rel", "stylesheet");
    link.setAttribute("href", base+"Frameworks/Foundation/Resources/log.css");
    link.setAttribute("media", "screen");
    head.appendChild(link);

    var div = doc.createElement("div");
    div.setAttribute("id", "header");
    body.appendChild(div);


    var ul = doc.createElement("ul");
    ul.setAttribute("id", "enablers");
    div.appendChild(ul);

    for (var i = 0; i < CPLogLevels.length; i++) {
        var li = doc.createElement("li");
        li.setAttribute("id", "en"+CPLogLevels[i]);
        li.setAttribute("class", CPLogLevels[i]);
        li.setAttribute("onclick", "toggle(this);");
        li.setAttribute("enabled", "yes");
        li.appendChild(doc.createTextNode(CPLogLevels[i]));
        ul.appendChild(li);
    }


    var ul = doc.createElement("ul");
    ul.setAttribute("id", "options");
    div.appendChild(ul);

    var options = {"focus":["Focus",false], "block":["Block",false], "wrap":["Wrap",false], "scroll":["Scroll",true], "close":["Close",true]};
    for (o in options) {
        var li = doc.createElement("li");
        ul.appendChild(li);

        logWindow[o+"Enabled"] = doc.createElement("input");
        logWindow[o+"Enabled"].setAttribute("id", o);
        logWindow[o+"Enabled"].setAttribute("type", "checkbox");
        if (options[o][1])
            logWindow[o+"Enabled"].setAttribute("checked", "checked");
        li.appendChild(logWindow[o+"Enabled"]);

        var label = doc.createElement("label");
        label.setAttribute("for", o);
        label.appendChild(doc.createTextNode(options[o][0]));
        li.appendChild(label);
    }


    logWindow.log = doc.createElement("div");
    logWindow.log.setAttribute("class", "enerror endebug enwarn eninfo enfatal entrace");
    body.appendChild(logWindow.log);

    logWindow.toggle = function(elem) {
        var enabled = (elem.getAttribute("enabled") == "yes") ? "no" : "yes";
        elem.setAttribute("enabled", enabled);

        if (enabled == "yes")
            logWindow.log.className += " " + elem.id
        else
            logWindow.log.className = logWindow.log.className.replace(new RegExp("[\\s]*"+elem.id, "g"), "");
    }


    logWindow.scrollToBottom = function() {
        logWindow.scrollTo(0, body.offsetHeight);
    }


    logWindow.wrapEnabled.addEventListener("click", function() {
        logWindow.log.setAttribute("wrap", logWindow.wrapEnabled.checked ? "yes" : "no");
    }, false);


    logWindow.addEventListener("keydown", function(e) {
        var e = e || logWindow.event;
        if (e.keyCode == 75 && (e.ctrlKey || e.metaKey)) {
            while (logWindow.log.firstChild) {
                logWindow.log.removeChild(logWindow.log.firstChild);
            }
            e.preventDefault();
        }
    }, "false");


    window.addEventListener("unload", function() {
        if (logWindow && logWindow.closeEnabled && logWindow.closeEnabled.checked) {
            window.CPLogDisable = true;
            logWindow.close();
        }
    }, false);


    logWindow.addEventListener("unload", function() {
        if (!window.CPLogDisable) {
            window.CPLogDisable = !confirm("Click cancel to stop logging");
        }
    }, false);
}

CPLog= function(aString, aLevel)
{
    try {
        if (window.CPLogDisable)
            return;

        if (!CPLogWindow || !CPLogWindow.document)
        {
            CPLogWindow = window.open("", "_blank", "width=500,height=400,status=no,resizable=yes,scrollbars=yes");

            if (!CPLogWindow) {
                window.CPLogDisable = !confirm(aString + "\n\n(Disable pop-up blocking for CPLog window; Click cancel to stop alerts)");
                return;
            }

            CPLogInit(CPLogWindow);
        }

        var now = new Date(),
            zero = function(number, zeros)
                    {
                        var digits = number.toString();
                        return zeros.substring(0, zeros.length - digits.length) + digits;
                    }

        var logDiv = CPLogWindow.document.createElement("div");
        logDiv.setAttribute("class", aLevel || "fatal");

        var message =
            now.getFullYear() + "-" + zero(now.getMonth()+1, "00") + "-" + zero(now.getDate(), "00") + " " +
            zero(now.getHours(), "00") + ":" + zero(now.getMinutes(), "00") + ":" + zero(now.getSeconds(), "00") + "." +
            zero(now.getMilliseconds(), "000")+" "+CPLogTitle+": " + aString + "\n";

        logDiv.appendChild(CPLogWindow.document.createTextNode(message));

        CPLogWindow.log.appendChild(logDiv);

        if (CPLogWindow.focusEnabled.checked)
            CPLogWindow.focus();
        if (CPLogWindow.blockEnabled.checked)
            CPLogWindow.blockEnabled.checked = CPLogWindow.confirm(message+"\nContinue blocking?");
        if (CPLogWindow.scrollEnabled.checked)
            CPLogWindow.scrollToBottom();
    } catch(e) {

    }
}

CPLog.fatal = function(message) { CPLog(message, "fatal"); }
CPLog.error = function(message) { CPLog(message, "error"); }
CPLog.warn = function(message) { CPLog(message, "warn"); }
CPLog.info = function(message) { CPLog(message, "info"); }
CPLog.debug = function(message) { CPLog(message, "debug"); }
CPLog.trace = function(message) { CPLog(message, "trace"); }



var lorem = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas fermentum, elit non lobortis cursus, orci velit suscipit est, id mollis turpis mi eget orci. Ut aliquam sollicitudin metus. Mauris at sapien sed sapien congue iaculis. Nulla lorem urna, bibendum id, laoreet iaculis, nonummy eget, massa. Phasellus ullamcorper commodo velit.";

Math.randInt = function(max) { return Math.round(Math.random()*max); }
Array.prototype.random = function() { return this[Math.randInt(this.length)]; }

CPLogTest= function(n) {
    for(var i=0;i<n;i++) {
        var start = Math.randInt(lorem.length);
        var length = Math.randInt(lorem.length-start);
        CPLog(lorem.substring(start, start+length), CPLogLevels.random());
    }
}

p;16;CPNotification.ji;10;CPObject.jc;1875;

{var the_class = objj_allocateClassPair(CPObject, "CPNotification"),
meta_class = _class_getMeta(the_class);the_class.ivars.splice(the_class.ivars.length, 0, new objj_ivar("_name"), new objj_ivar("_object"), new objj_ivar("_userInfo"));
objj_registerClassPair(the_class);
objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
var class_methods = [];
class_methods[0] = new objj_method(sel_registerName("notificationWithName:object:userInfo:"), function(self, _cmd, aNotificationName, anObject, aUserInfo)
{ with(self)
{
    return objj_msgSend(objj_msgSend(self, "alloc"), "initWithName:object:userInfo:", aNotificationName, anObject, aUserInfo);
}
});
class_methods[1] = new objj_method(sel_registerName("notificationWithName:object:"), function(self, _cmd, aNotificationName, anObject)
{ with(self)
{
    return objj_msgSend(objj_msgSend(self, "alloc"), "initWithName:object:userInfo:", aNotificationName, anObject, nil);
}
});
var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("initWithName:object:userInfo:"), function(self, _cmd, aNotificationName, anObject, aUserInfo)
{ with(self)
{
    self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("CPObject") }, "init");

    if (self)
    {
        _name = aNotificationName;
        _object = anObject;
        _userInfo = aUserInfo;
    }

    return self;
}
});
instance_methods[1] = new objj_method(sel_registerName("name"), function(self, _cmd)
{ with(self)
{
    return _name;
}
});
instance_methods[2] = new objj_method(sel_registerName("object"), function(self, _cmd)
{ with(self)
{
    return _object;
}
});
instance_methods[3] = new objj_method(sel_registerName("userInfo"), function(self, _cmd)
{ with(self)
{
    return _userInfo;
}
});
class_addMethods(the_class, instance_methods);
class_addMethods(meta_class, class_methods);
}

p;22;CPNotificationCenter.ji;9;CPArray.ji;14;CPDictionary.ji;16;CPNotification.jc;9855;


var CPNotificationDefaultCenter = nil;

{var the_class = objj_allocateClassPair(CPObject, "CPNotificationCenter"),
meta_class = _class_getMeta(the_class);the_class.ivars.splice(the_class.ivars.length, 0, new objj_ivar("_namedRegistries"), new objj_ivar("_unnamedRegistry"));
objj_registerClassPair(the_class);
objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
var class_methods = [];
class_methods[0] = new objj_method(sel_registerName("defaultCenter"), function(self, _cmd)
{ with(self)
{
    if (!CPNotificationDefaultCenter)
        CPNotificationDefaultCenter = objj_msgSend(objj_msgSend(CPNotificationCenter, "alloc"), "init");

    return CPNotificationDefaultCenter;
}
});
var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("init"), function(self, _cmd)
{ with(self)
{
    self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("CPObject") }, "init");

    if (self)
    {
        _namedRegistries = objj_msgSend(CPDictionary, "dictionary");
        _unnamedRegistry = objj_msgSend(objj_msgSend(_CPNotificationRegistry, "alloc"), "init");
    }
   return self;
}
});
instance_methods[1] = new objj_method(sel_registerName("addObserver:selector:name:object:"), function(self, _cmd, anObserver, aSelector, aNotificationName, anObject)
{ with(self)
{
    var registry,
        observer = objj_msgSend(objj_msgSend(_CPNotificationObserver, "alloc"), "initWithObserver:selector:", anObserver, aSelector);

    if (aNotificationName == nil)
        registry = _unnamedRegistry;

    else if (!(registry = objj_msgSend(_namedRegistries, "objectForKey:", aNotificationName)))
    {
        registry = objj_msgSend(objj_msgSend(_CPNotificationRegistry, "alloc"), "init");
        objj_msgSend(_namedRegistries, "setObject:forKey:", registry, aNotificationName);
    }

    objj_msgSend(registry, "addObserver:object:", observer, anObject);
}
});
instance_methods[2] = new objj_method(sel_registerName("removeObserver:"), function(self, _cmd, anObserver)
{ with(self)
{
    var name = nil,
        names = objj_msgSend(_namedRegistries, "keyEnumerator");

    while (name = objj_msgSend(names, "nextObject"))
        objj_msgSend(objj_msgSend(_namedRegistries, "objectForKey:", name), "removeObserver:object:", anObserver, nil);

    objj_msgSend(_unnamedRegistry, "removeObserver:object:", anObserver, nil);
}
});
instance_methods[3] = new objj_method(sel_registerName("removeObserver:name:object:"), function(self, _cmd, anObserver, aNotificationName, anObject)
{ with(self)
{
    if (aNotificationName == nil)
    {
        var name = nil,
            names = objj_msgSend(_namedRegistries, "keyEnumerator");

        while (name = objj_msgSend(names, "nextObject"))
            objj_msgSend(objj_msgSend(_namedRegistries, "objectForKey:", name), "removeObserver:object:", anObserver, anObject);

        objj_msgSend(_unnamedRegistry, "removeObserver:object:", anObserver, anObject);
    }
    else
        objj_msgSend(objj_msgSend(_namedRegistries, "objectForKey:", aNotificationName), "removeObserver:object:", anObserver, anObject);
}
});
instance_methods[4] = new objj_method(sel_registerName("postNotification:"), function(self, _cmd, aNotification)
{ with(self)
{
    _CPNotificationCenterPostNotification(self, aNotification);
}
});
instance_methods[5] = new objj_method(sel_registerName("postNotificationName:object:userInfo:"), function(self, _cmd, aNotificationName, anObject, aUserInfo)
{ with(self)
{
   _CPNotificationCenterPostNotification(self, objj_msgSend(objj_msgSend(CPNotification, "alloc"), "initWithName:object:userInfo:", aNotificationName, anObject, aUserInfo));
}
});
instance_methods[6] = new objj_method(sel_registerName("postNotificationName:object:"), function(self, _cmd, aNotificationName, anObject)
{ with(self)
{
   _CPNotificationCenterPostNotification(self, objj_msgSend(objj_msgSend(CPNotification, "alloc"), "initWithName:object:userInfo:", aNotificationName, anObject, nil));
}
});
class_addMethods(the_class, instance_methods);
class_addMethods(meta_class, class_methods);
}

var _CPNotificationCenterPostNotification = function( self, aNotification)
{
    objj_msgSend(self._unnamedRegistry, "postNotification:", aNotification);
    objj_msgSend(objj_msgSend(self._namedRegistries, "objectForKey:", objj_msgSend(aNotification, "name")), "postNotification:", aNotification);
}


{var the_class = objj_allocateClassPair(CPObject, "_CPNotificationRegistry"),
meta_class = _class_getMeta(the_class);the_class.ivars.splice(the_class.ivars.length, 0, new objj_ivar("_objectObservers"), new objj_ivar("_observerRemoval"), new objj_ivar("_postingObservers"));
objj_registerClassPair(the_class);
objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("init"), function(self, _cmd)
{ with(self)
{
    if (self)
        _objectObservers = objj_msgSend(CPDictionary, "dictionary");

   return self;
}
});
instance_methods[1] = new objj_method(sel_registerName("addObserver:object:"), function(self, _cmd, anObserver, anObject)
{ with(self)
{


    if (!anObject)
        anObject = objj_msgSend(CPNull, "null");


    var observers = objj_msgSend(_objectObservers, "objectForKey:", objj_msgSend(anObject, "hash"));

    if (!observers)
    {
        observers = [];
        objj_msgSend(_objectObservers, "setObject:forKey:", observers, objj_msgSend(anObject, "hash"));
    }

    if (observers == _postingObservers)
        _postingObservers = objj_msgSend(observers, "copy");


    observers.push(anObserver);
}
});
instance_methods[2] = new objj_method(sel_registerName("removeObserver:object:"), function(self, _cmd, anObserver, anObject)
{ with(self)
{
    var removedKeys = [];


    if (anObject == nil)
    {
        var key = nil,
            keys = objj_msgSend(_objectObservers, "keyEnumerator");


        while (key = objj_msgSend(keys, "nextObject"))
        {
            var observers = objj_msgSend(_objectObservers, "objectForKey:", key),
                count = observers.length;

            while (count--)
                if (objj_msgSend(observers[count], "observer") == anObserver)
                {
                    _observerRemoval = YES;
                    if (observers == _postingObservers)
                        _postingObservers = objj_msgSend(observers, "copy");

                    observers.splice(count, 1);
                }

            if (observers.length == 0)
                removedKeys.push(key);
        }
    }
    else
    {
        var key = objj_msgSend(anObject, "hash"),
            observers = objj_msgSend(_objectObservers, "objectForKey:", key);
            count = observers.length;

        while (count--)
            if (objj_msgSend(observers[count], "observer") == anObserver)
            {
                _observerRemoval = YES;
                if (observers == _postingObservers)
                    _postingObservers = objj_msgSend(observers, "copy");

                observers.splice(count, 1)
            }

        if (observers.length == 0)
            removedKeys.push(key);
    }

    var count = removedKeys.length;

    while (count--)
        objj_msgSend(_objectObservers, "removeObjectForKey:", removedKeys[count]);
}
});
instance_methods[3] = new objj_method(sel_registerName("postNotification:"), function(self, _cmd, aNotification)
{ with(self)
{
    var object = objj_msgSend(aNotification, "object");
    if (object != nil && (_postingObservers = objj_msgSend(_objectObservers, "objectForKey:", objj_msgSend(object, "hash"))))
    {
        var observers = _postingObservers,
            count = observers.length;
        _observerRemoval = NO;
        while (count--)
        {
            var observer = _postingObservers[count];
            if (!_observerRemoval || objj_msgSend(observers, "indexOfObjectIdenticalTo:", observer) != CPNotFound)
                objj_msgSend(observer, "postNotification:", aNotification);
        }
    }
    _postingObservers = objj_msgSend(_objectObservers, "objectForKey:", objj_msgSend(objj_msgSend(CPNull, "null"), "hash"));
    if (!_postingObservers)
        return;
    var observers = _postingObservers,
        count = observers.length;
    _observerRemoval = NO;
    while (count--)
    {
        var observer = _postingObservers[count];
        if (!_observerRemoval || objj_msgSend(observers, "indexOfObjectIdenticalTo:", observer) != CPNotFound)
            objj_msgSend(observer, "postNotification:", aNotification);
    }
    _postingObservers = nil;
}
});
instance_methods[4] = new objj_method(sel_registerName("count"), function(self, _cmd)
{ with(self)
{
    return objj_msgSend(_objectObservers, "count");
}
});
class_addMethods(the_class, instance_methods);
}
{var the_class = objj_allocateClassPair(CPObject, "_CPNotificationObserver"),
meta_class = _class_getMeta(the_class);the_class.ivars.splice(the_class.ivars.length, 0, new objj_ivar("_observer"), new objj_ivar("_selector"));
objj_registerClassPair(the_class);
objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("initWithObserver:selector:"), function(self, _cmd, anObserver, aSelector)
{ with(self)
{
    if (self)
    {
        _observer = anObserver;
        _selector = aSelector;
    }
   return self;
}
});
instance_methods[1] = new objj_method(sel_registerName("observer"), function(self, _cmd)
{ with(self)
{
    return _observer;
}
});
instance_methods[2] = new objj_method(sel_registerName("postNotification:"), function(self, _cmd, aNotification)
{ with(self)
{
    objj_msgSend(_observer, "performSelector:withObject:", _selector, aNotification);
}
});
class_addMethods(the_class, instance_methods);
}

p;8;CPNull.ji;10;CPObject.jc;562;

var CPNullSharedNull = nil;

{var the_class = objj_allocateClassPair(CPObject, "CPNull"),
meta_class = _class_getMeta(the_class);objj_registerClassPair(the_class);
objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
var class_methods = [];
class_methods[0] = new objj_method(sel_registerName("null"), function(self, _cmd)
{ with(self)
{
    if (!CPNullSharedNull)
        CPNullSharedNull = objj_msgSend(objj_msgSend(CPNull, "alloc"), "init");
    return CPNullSharedNull;
}
});
class_addMethods(meta_class, class_methods);
}

p;10;CPNumber.ji;10;CPObject.ji;15;CPObjJRuntime.jc;9252;

var __placeholder = new Number(),
    _CPNumberHashes = { };

{var the_class = objj_allocateClassPair(CPObject, "CPNumber"),
meta_class = _class_getMeta(the_class);objj_registerClassPair(the_class);
objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
var class_methods = [];
class_methods[0] = new objj_method(sel_registerName("alloc"), function(self, _cmd)
{ with(self)
{
    return __placeholder;
}
});
class_methods[1] = new objj_method(sel_registerName("numberWithBool:"), function(self, _cmd, aBoolean)
{ with(self)
{
    return aBoolean;
}
});
class_methods[2] = new objj_method(sel_registerName("numberWithChar:"), function(self, _cmd, aChar)
{ with(self)
{
    if (aChar.charCodeAt)
        return aChar.charCodeAt(0);

    return aChar;
}
});
class_methods[3] = new objj_method(sel_registerName("numberWithDouble:"), function(self, _cmd, aDouble)
{ with(self)
{
    return aDouble;
}
});
class_methods[4] = new objj_method(sel_registerName("numberWithFloat:"), function(self, _cmd, aFloat)
{ with(self)
{
    return aFloat;
}
});
class_methods[5] = new objj_method(sel_registerName("numberWithInt:"), function(self, _cmd, anInt)
{ with(self)
{
    return anInt;
}
});
class_methods[6] = new objj_method(sel_registerName("numberWithLong:"), function(self, _cmd, aLong)
{ with(self)
{
    return aLong;
}
});
class_methods[7] = new objj_method(sel_registerName("numberWithLongLong:"), function(self, _cmd, aLongLong)
{ with(self)
{
    return aLongLong;
}
});
class_methods[8] = new objj_method(sel_registerName("numberWithShort:"), function(self, _cmd, aShort)
{ with(self)
{
    return aShort;
}
});
class_methods[9] = new objj_method(sel_registerName("numberWithUnsignedChar:"), function(self, _cmd, aChar)
{ with(self)
{
    if (aChar.charCodeAt)
        return aChar.charCodeAt(0);

    return aChar;
}
});
class_methods[10] = new objj_method(sel_registerName("numberWithUnsignedInt:"), function(self, _cmd, anUnsignedInt)
{ with(self)
{
    return anUnsignedInt;
}
});
class_methods[11] = new objj_method(sel_registerName("numberWithUnsignedLong:"), function(self, _cmd, anUnsignedLong)
{ with(self)
{
    return anUnsignedLong;
}
});
class_methods[12] = new objj_method(sel_registerName("numberWithUnsignedLongLong:"), function(self, _cmd, anUnsignedLongLong)
{ with(self)
{
    return anUnsignedLongLong;
}
});
class_methods[13] = new objj_method(sel_registerName("numberWithUnsignedShort:"), function(self, _cmd, anUnsignedShort)
{ with(self)
{
    return anUnsignedShort;
}
});
var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("initWithBool:"), function(self, _cmd, aBoolean)
{ with(self)
{
    return aBoolean;
}
});
instance_methods[1] = new objj_method(sel_registerName("initWithChar:"), function(self, _cmd, aChar)
{ with(self)
{
    if (aChar.charCodeAt)
        return aChar.charCodeAt(0);

    return aChar;
}
});
instance_methods[2] = new objj_method(sel_registerName("initWithDouble:"), function(self, _cmd, aDouble)
{ with(self)
{
    return aDouble;
}
});
instance_methods[3] = new objj_method(sel_registerName("initWithFloat:"), function(self, _cmd, aFloat)
{ with(self)
{
    return aFloat;
}
});
instance_methods[4] = new objj_method(sel_registerName("initWithInt:"), function(self, _cmd, anInt)
{ with(self)
{
    return anInt;
}
});
instance_methods[5] = new objj_method(sel_registerName("initWithLong:"), function(self, _cmd, aLong)
{ with(self)
{
    return aLong;
}
});
instance_methods[6] = new objj_method(sel_registerName("initWithLongLong:"), function(self, _cmd, aLongLong)
{ with(self)
{
    return aLongLong;
}
});
instance_methods[7] = new objj_method(sel_registerName("initWithShort:"), function(self, _cmd, aShort)
{ with(self)
{
    return aShort;
}
});
instance_methods[8] = new objj_method(sel_registerName("initWithUnsignedChar:"), function(self, _cmd, aChar)
{ with(self)
{
    if (aChar.charCodeAt)
        return aChar.charCodeAt(0);

    return aChar;
}
});
instance_methods[9] = new objj_method(sel_registerName("initWithUnsignedInt:"), function(self, _cmd, anUnsignedInt)
{ with(self)
{
    return anUnsignedInt;
}
});
instance_methods[10] = new objj_method(sel_registerName("initWithUnsignedLong:"), function(self, _cmd, anUnsignedLong)
{ with(self)
{
    return anUnsignedLong;
}
});
instance_methods[11] = new objj_method(sel_registerName("initWithUnsignedLongLong:"), function(self, _cmd, anUnsignedLongLong)
{ with(self)
{
    return anUnsignedLongLong;
}
});
instance_methods[12] = new objj_method(sel_registerName("initWithUnsignedShort:"), function(self, _cmd, anUnsignedShort)
{ with(self)
{
    return anUnsignedShort;
}
});
instance_methods[13] = new objj_method(sel_registerName("hash"), function(self, _cmd)
{ with(self)
{
    if (!_CPNumberHashes[self])
        _CPNumberHashes[self] = _objj_generateObjectHash();

    return _CPNumberHashes[self];
}
});
instance_methods[14] = new objj_method(sel_registerName("boolValue"), function(self, _cmd)
{ with(self)
{

    return self ? true : false;
}
});
instance_methods[15] = new objj_method(sel_registerName("charValue"), function(self, _cmd)
{ with(self)
{
    return String.fromCharCode(self);
}
});
instance_methods[16] = new objj_method(sel_registerName("decimalValue"), function(self, _cmd)
{ with(self)
{
    objj_throw_exception("decimalValue: NOT YET IMPLEMENTED");
}
});
instance_methods[17] = new objj_method(sel_registerName("descriptionWithLocale:"), function(self, _cmd, aDictionary)
{ with(self)
{
    if (!aDictionary) return toString();

    objj_throw_exception("descriptionWithLocale: NOT YET IMPLEMENTED");
}
});
instance_methods[18] = new objj_method(sel_registerName("description"), function(self, _cmd)
{ with(self)
{
    return objj_msgSend(self, "descriptionWithLocale:", nil);
}
});
instance_methods[19] = new objj_method(sel_registerName("doubleValue"), function(self, _cmd)
{ with(self)
{
    if (typeof self == "boolean") return self ? 1 : 0;
    return self;
}
});
instance_methods[20] = new objj_method(sel_registerName("floatValue"), function(self, _cmd)
{ with(self)
{
    if (typeof self == "boolean") return self ? 1 : 0;
    return self;
}
});
instance_methods[21] = new objj_method(sel_registerName("intValue"), function(self, _cmd)
{ with(self)
{
    if (typeof self == "boolean") return self ? 1 : 0;
    return self;
}
});
instance_methods[22] = new objj_method(sel_registerName("longLongValue"), function(self, _cmd)
{ with(self)
{
    if (typeof self == "boolean") return self ? 1 : 0;
    return self;
}
});
instance_methods[23] = new objj_method(sel_registerName("longValue"), function(self, _cmd)
{ with(self)
{
    if (typeof self == "boolean") return self ? 1 : 0;
    return self;
}
});
instance_methods[24] = new objj_method(sel_registerName("shortValue"), function(self, _cmd)
{ with(self)
{
    if (typeof self == "boolean") return self ? 1 : 0;
    return self;
}
});
instance_methods[25] = new objj_method(sel_registerName("stringValue"), function(self, _cmd)
{ with(self)
{
    return toString();
}
});
instance_methods[26] = new objj_method(sel_registerName("unsignedCharValue"), function(self, _cmd)
{ with(self)
{
    return String.fromCharCode(self);
}
});
instance_methods[27] = new objj_method(sel_registerName("unsignedIntValue"), function(self, _cmd)
{ with(self)
{
    if (typeof self == "boolean") return self ? 1 : 0;
    return self;
}
});
instance_methods[28] = new objj_method(sel_registerName("unsignedLongLongValue"), function(self, _cmd)
{ with(self)
{
    if (typeof self == "boolean") return self ? 1 : 0;
    return self;
}
});
instance_methods[29] = new objj_method(sel_registerName("unsignedLongValue"), function(self, _cmd)
{ with(self)
{
    if (typeof self == "boolean") return self ? 1 : 0;
    return self;
}
});
instance_methods[30] = new objj_method(sel_registerName("unsignedShortValue"), function(self, _cmd)
{ with(self)
{
    if (typeof self == "boolean") return self ? 1 : 0;
    return self;
}
});
instance_methods[31] = new objj_method(sel_registerName("compare:"), function(self, _cmd, aNumber)
{ with(self)
{
    if (self > aNumber) return CPOrderedDescending;
    else if (self < aNumber) return CPOrderedAscending;

    return CPOrderedSame;
}
});
instance_methods[32] = new objj_method(sel_registerName("isEqualToNumber:"), function(self, _cmd, aNumber)
{ with(self)
{
    return self == aNumber;
}
});
class_addMethods(the_class, instance_methods);
class_addMethods(meta_class, class_methods);
}

{
var the_class = objj_getClass("CPNumber")
if(!the_class) objj_exception_throw(new objj_exception(OBJJClassNotFoundException, "*** Could not find definition for class \"CPNumber\""));
var meta_class = _class_getMeta(the_class);var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("initWithCoder:"), function(self, _cmd, aCoder)
{ with(self)
{
    return objj_msgSend(aCoder, "decodeNumber");
}
});
instance_methods[1] = new objj_method(sel_registerName("encodeWithCoder:"), function(self, _cmd, aCoder)
{ with(self)
{
    objj_msgSend(aCoder, "encodeNumber:forKey:", self, "self");
}
});
class_addMethods(the_class, instance_methods);
}

Number.prototype.isa = CPNumber;
Boolean.prototype.isa = CPNumber;
objj_msgSend(CPNumber, "initialize");

p;15;CPObjJRuntime.ji;7;CPLog.jc;478;

CPStringFromSelector= function(aSelector)
{
    return sel_getName(aSelector);
}

CPSelectorFromString= function(aSelectorName)
{
    return sel_registerName(aSelectorName);
}

CPClassFromString= function(aClassName)
{
    return objj_getClass(aClassName);
}

CPStringFromClass= function(aClass)
{
    return objj_getClassName(aClass);
}

CPOrderedAscending = -1;
CPOrderedSame = 0;
CPOrderedDescending = 1;

CPNotFound = -1;

MIN = Math.min;
MAX = Math.max;
ABS = Math.abs;

p;10;CPObject.jc;8073;


{var the_class = objj_allocateClassPair(Nil, "CPObject"),
meta_class = _class_getMeta(the_class);the_class.ivars.splice(the_class.ivars.length, 0, new objj_ivar("isa"));
objj_registerClassPair(the_class);
objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
var class_methods = [];
class_methods[0] = new objj_method(sel_registerName("load"), function(self, _cmd)
{ with(self)
{}
});
class_methods[1] = new objj_method(sel_registerName("initialize"), function(self, _cmd)
{ with(self)
{}
});
class_methods[2] = new objj_method(sel_registerName("new"), function(self, _cmd)
{ with(self)
{
    return objj_msgSend(objj_msgSend(self, "alloc"), "init");
}
});
class_methods[3] = new objj_method(sel_registerName("alloc"), function(self, _cmd)
{ with(self)
{

    return class_createInstance(self);
}
});
var instance_methods = [];
instance_methods[0] = new objj_method(sel_registerName("init"), function(self, _cmd)
{ with(self)
{
    return self;
}
});
instance_methods[1] = new objj_method(sel_registerName("copy"), function(self, _cmd)
{ with(self)
{
    return self;
}
});
instance_methods[2] = new objj_method(sel_registerName("mutableCopy"), function(self, _cmd)
{ with(self)
{
    return objj_msgSend(self, "copy");
}
});
instance_methods[3] = new objj_method(sel_registerName("dealloc"), function(self, _cmd)
{ with(self)
{}
});
class_methods[4] = new objj_method(sel_registerName("class"), function(self, _cmd)
{ with(self)
{
    return self;
}
});
instance_methods[4] = new objj_method(sel_registerName("class"), function(self, _cmd)
{ with(self)
{
    return isa;
}
});
class_methods[5] = new objj_method(sel_registerName("superclass"), function(self, _cmd)
{ with(self)
{
    return super_class;
}
});
class_methods[6] = new objj_method(sel_registerName("isSubclassOfClass:"), function(self, _cmd, aClass)
{ with(self)
{
    var theClass = self;

    for(; theClass; theClass = theClass.super_class)
        if(theClass == aClass) return YES;

    return NO;
}
});
instance_methods[5] = new objj_method(sel_registerName("isKindOfClass:"), function(self, _cmd, aClass)
{ with(self)
{
    return objj_msgSend(isa, "isSubclassOfClass:", aClass);
}
});
instance_methods[6] = new objj_method(sel_registerName("isMemberOfClass:"), function(self, _cmd, aClass)
{ with(self)
{
    return self.isa == aClass;
}
});
instance_methods[7] = new objj_method(sel_registerName("isProxy"), function(self, _cmd)
{ with(self)
{
    return NO;
}
});
class_methods[7] = new objj_method(sel_registerName("instancesRespondToSelector:"), function(self, _cmd, aSelector)
{ with(self)
{
    return class_getInstanceMethod(self, aSelector);
}
});
instance_methods[8] = new objj_method(sel_registerName("respondsToSelector:"), function(self, _cmd, aSelector)
{ with(self)
{
    return class_getInstanceMethod(isa, aSelector) != nil;
}
});
instance_methods[9] = new objj_method(sel_registerName("methodForSelector:"), function(self, _cmd, aSelector)
{ with(self)
{
    return class_getInstanceMethod(isa, aSelector);
}
});
class_methods[8] = new objj_method(sel_registerName("instanceMethodForSelector:"), function(self, _cmd, aSelector)
{ with(self)
{
    return class_getInstanceMethod(isa, aSelector);
}
});
instance_methods[10] = new objj_method(sel_registerName("methodSignatureForSelector:"), function(self, _cmd, aSelector)
{ with(self)
{

    return nil;
}
});
instance_methods[11] = new objj_method(sel_registerName("description"), function(self, _cmd)
{ with(self)
{
    return "<" + isa.name + " 0x" + objj_msgSend(CPString, "stringWithHash:", objj_msgSend(self, "hash")) + ">";
}
});
instance_methods[12] = new objj_method(sel_registerName("performSelector:"), function(self, _cmd, aSelector)
{ with(self)
{
    return objj_msgSend(self, aSelector);
}
});
instance_methods[13] = new objj_method(sel_registerName("performSelector:withObject:"), function(self, _cmd, aSelector, anObject)
{ with(self)
{
    return objj_msgSend(self, aSelector, anObject);
}
});
instance_methods[14] = new objj_method(sel_registerName("performSelector:withObject:withObject:"), function(self, _cmd, aSelector, anObject, anotherObject)
{ with(self)
{
    return objj_msgSend(self, aSelector, anObject, anotherObject);
}
});
instance_methods[15] = new objj_method(sel_registerName("forwardInvocation:"), function(self, _cmd, anInvocation)
{ with(self)
{
    objj_msgSend(self, "doesNotRecognizeSelector:", objj_msgSend(anInvocation, "selector"));
}
});
instance_methods[16] = new objj_method(sel_registerName("forward::"), function(self, _cmd, aSelector, args)
{ with(self)
{
    var signature = objj_msgSend(self, "methodSignatureForSelector:", _cmd);

    if (signature)
    {
        invocation = objj_msgSend(CPInvocation, "invocationWithMethodSignature:", signature);

        objj_msgSend(invocation, "setTarget:", self);
        objj_msgSend(invocation, "setSelector:", aSelector);

        var index = 2,
            count = args.length;

        for (; index < count; ++index)
            objj_msgSend(invocation, "setArgument:atIndex:", args[index], index);

        objj_msgSend(self, "forwardInvocation:", invocation);

        return objj_msgSend(invocation, "returnValue");
    }

    objj_msgSend(self, "doesNotRecognizeSelector:", aSelector);
}
});
instance_methods[17] = new objj_method(sel_registerName("doesNotRecognizeSelector:"), function(self, _cmd, aSelector)
{ with