Вход Регистрация
Файл: plugins/google_map_location/static/js/map_hint.js
Строк: 1013
<?php
GoogleMapLocationHint 
= (function() {    
    var 
isShown null;
    var 
CORNER_OFFSET 7;

    var 
_clearTimeout = function( timeOut ) {
        if ( 
timeOut window.clearTimeout(timeOut);
    };

    var 
hintActions = {
        
start:function() {
            
this.show();
        },
        
stop:function() {
            
this.hide();
        },
        
enter:function() {
            
_clearTimeout(this.timeouts.stop);
        },
        
leave:function() {
            
this.stop();
        }
    };

    var 
_setTimeout = function( fnctime ) {
        return 
window.setTimeout(fnctime);
    };

    var 
_bind= function( fncobj ) {
        
fnc fnc || function(){};
        
obj obj || window;

        return function() {
            return 
fnc.apply(objarguments);
        };
    };

    var 
MapHint = function( delegatetarget ) {
        
        
this.hint = $($('#map-hint-template').html()).hide();
        
this.body this.hint.find('.map-hint-body');
        
this.topCornerBody this.hint.find('.map-hint-top-corner-wrap .map-hint-corner');
        
this.bottomCornerBody this.hint.find('.map-hint-bottom-corner-wrap .map-hint-corner');
        
this.rightCornerBody this.hint.find('.map-hint-right-corner-wrap .map-hint-corner');
        
        
this.visible false;
        
this._targetChanged false;

        $(
'body').append(this.hint);

        
this.orientationClass 'map-hint-top-left';

        
this.timeouts = {
            
startnull,
            
stopnull,
            
enternull,
            
leavenull
        
};

        
this.delegate = {};
        
        if ( 
delegate this.setDelegate(delegate);
        if ( 
target this.setTarget(target);

        
this.hint.on('mouseenter.hint'_bind(hintActions.enterthis));
        
this.hint.on('mouseleave.hint'_bind(hintActions.leavethis));

        
_bind(this.delegate.constructthis)(); // Delegate method call
    
};

    
MapHint.prototype.START_TIMEOUT 700;
    
MapHint.prototype.STOP_TIMEOUT 200;
    
MapHint.prototype.SWITCH_TIMEOUT 400;

    
MapHint.prototype.setTarget = function( target ) {
        var 
oldTarget this.target;

        
this.target = $(target);
        
this._targetChanged true;

        
this.target.data("hint"this);

        
_bind(this.delegate.targetChangethis)(oldTarget); // Delegate method call
        
        
if ( this.target.data("map-hint-zindex") ) {
            
this.hint.css("z-index"this.target.data("map-hint-zindex"));
        }

        return 
this;
    };

    
MapHint.prototype.setDelegate = function( delegate ) {
        
this.delegate delegate;

        return 
this;
    };
    
    
MapHint.prototype.getDelegate = function() {
        return 
this.delegate;
    };

    
MapHint.prototype.getSize = function() {
        return {
            
widththis.hint.width(),
            
heightthis.hint.height()
        };
    };

    
MapHint.prototype.getPosition = function( target ) {
        var 
offset$window;

        
target target || this.target;
        
offset target.offset();
        
$window = $(window);

        if ( !
offset )
            return 
null;

        return {
            
topoffset.top $window.scrollTop(),
            
leftoffset.left $window.scrollLeft(),
            
right$window.width() - offset.left $window.scrollLeft(),
            
bottom$window.height() + $window.scrollTop() - offset.top
        
};
    };

    
MapHint.prototype.getOrientation = function( target ) {
        var 
positionsizeorientation;

        
target target || this.target;

        
size this.getSize();
        
position this.getPosition(target);
        if ( !
position 
            return 
null;

        
orientation = {};
        
orientation.top size.height position.top CORNER_OFFSET;
        
orientation.bottom = !orientation.top;
        
orientation.right size.width position.right;
        
orientation.left = !orientation.right;

        return 
orientation;
    };
    
    
MapHint.prototype.refreshOrientation = function() {
        var 
offsetpositiontargetHeighttargetWidthcornerOffsetcornerPositioncurrentCorner,
            
topCornerbottomCornerorientationsizetargetinnerNodes;

        if ( 
_bind(this.delegate.beforeRefreshOrientationthis)() === false // Delegate method call
            
return this;
            
        if ( !
this.target ) return this;

        
target this.target;

        
this.target.addClass('map-hint-target');

        if ( 
this.target.css("display") === "inline" ) {
            
innerNodes this.target.children().filter(function() {
                return $(
this).is('img') || $(this).css("display") !== "inline";
            });

            if ( 
innerNodes.length ) {
                
this.target.addClass('map-hint-target-block');

                
target innerNodes.first();
            }
        }

        
topCorner this.hint.find('.map-hint-top-corner-wrap');
        
bottomCorner this.hint.find('.map-hint-bottom-corner-wrap');

        
this.hint.removeClass(this.orientationClass);

        if ( !
this.delegate.refreshOrientation // Generic behaviour
        
{
            
targetHeight target.outerHeight();
            
targetWidth target.outerWidth();

            
offset _bind(this.delegate.getOffsetthis)(target); // Delegate method call
            
offset offset || target.offset();

            
position = {
                
topoffset.top targetHeight,
                
leftoffset.left
            
};

            
size this.getSize();
            
orientation this.getOrientation(target);
            if (!
orientation)
                return 
this;

            
cornerOffset targetWidth 5;
            
cornerOffset cornerOffset cornerOffset;
            
cornerOffset cornerOffset size.width size.width cornerOffset;

            if ( 
orientation.top && orientation.left ) {
                
this.orientationClass 'map-hint-top-left';
                
position.top offset.top size.height CORNER_OFFSET;
                
position.left offset.left size.width targetWidth;
                
bottomCorner.css('right'cornerOffset);
                
currentCorner bottomCorner;
            } else if ( 
orientation.top && orientation.right ) {
                
this.orientationClass 'map-hint-top-right';
                
position.top offset.top size.height CORNER_OFFSET;
                
bottomCorner.css('left'cornerOffset);
                
currentCorner bottomCorner;
            } else if ( 
orientation.bottom && orientation.left ) {
                
this.orientationClass 'map-hint-bottom-left';
                
position.left offset.left size.width targetWidth;
                
topCorner.css('right'cornerOffset);
                
currentCorner topCorner;
            } else if ( 
orientation.bottom && orientation.right ) {
                
this.orientationClass 'map-hint-bottom-right';
                
topCorner.css('left'cornerOffset);
                
currentCorner topCorner;
            }
            
            
this.hint.css(position);
        }
        else
        {
            
currentCorner _bind(this.delegate.refreshOrientationthis)(target);
        }

        
this.hint.addClass(this.orientationClass);
        
this.hint.removeClass('map-hint-invisible');
        
        if ( 
currentCorner ) {
            
cornerPosition currentCorner.position();
        }

        
this._targetChanged false;

        
_bind(this.delegate.afterRefreshOrientationthis)(orientationpositioncornerPosition, {
            
widthtargetWidthheighttargetHeight
        
}); // Delegate method call

        
return this;
    };
    
    
    
    
MapHint.prototype.show = function() {
        if ( 
this.visible ) {
            
            if ( 
this._targetChanged ) {
                
this.refreshOrientation();
            }

            return 
this;
        }

        if ( 
_bind(this.delegate.beforeShowthis)() === false // Delegate method call
            
return this;
        
        if ( !
this.target ) return this;

        
this.hint.show();
        
this.refreshOrientation();

        
_bind(this.delegate.afterShowthis)(); // Delegate method call
        
isShown this;
        
this.visible true;

        return 
this;
    };

    
MapHint.prototype.hide = function() {
        if ( !
this.visible ) return this;

        if ( 
_bind(this.delegate.beforeHidethis)() === false // Delegate method call
            
return this;
        
        
_clearTimeout(this.timeouts.stop);

        
this.hint.hide();
        
isShown null;
        
this.visible false;

        
_bind(this.delegate.afterHidethis)(); // Delegate method call

        
return this;
    };

    
MapHint.prototype.start = function() {
        
_bind(this.delegate.beforeStartthis)(); // Delegate method call

        
if ( !this.target ) return this;

        
_clearTimeout(this.timeouts.stop);
        
_clearTimeout(this.timeouts.start);

        
this.timeouts.start _setTimeout(_bind(hintActions.startthis), !!isShown this.SWITCH_TIMEOUT this.START_TIMEOUT);

        
_bind(this.delegate.afterStartthis)(); // Delegate method call

        
return this;
    };

    
MapHint.prototype.stop = function() {
        
_bind(this.delegate.beforeStopthis)(); // Delegate method call

        
_clearTimeout(this.timeouts.start);
        
_clearTimeout(this.timeouts.stop);
        
this.timeouts.stop _setTimeout(_bind(hintActions.stopthis), this.STOP_TIMEOUT);

        
_bind(this.delegate.afterStopthis)(); // Delegate method call

        
return this;
    };

    
MapHint.prototype.setContent = function( content ) {
        
this.body.empty().append(content);

        
_bind(this.delegate.contentChangethis)(); // Delegate method

        
this.hint.addClass('map-hint-invisible');
        
_setTimeout(_bind(this.refreshOrientationthis), 0);

        return 
this;
    };

    
MapHint.prototype.setTopCorner = function( content ) {
        
this.topCornerBody.empty().append(content);

        return 
this;
    };

    
MapHint.prototype.setBottomCorner = function( content ) {
        
this.bottomCornerBody.empty().append(content);

        return 
this;
    };
    
    
MapHint.prototype.setRightCorner = function( content ) {
        
this.rightCornerBody.empty().append(content);

        return 
this;
    };

    return {
        
createHint: function( delegatenode ) {
            if ( !
node ) {
                return new 
MapHint(delegate);
            }

            var 
hint this.getHint(node);

            if ( 
hint ) {
                
hint.hide();
            }

            return new 
MapHint(delegate, $(node));
        },

        
getHint: function( node ) {
            var 
target = $(node);

            if ( 
target.data("hint") ) {
                
target.data("hint").setTarget(target);

                return 
target.data("hint");
            }

            return 
null;
        },

        
getHintOrCreate: function( delegatenode ) {
            var 
hint this.getHint(node);
            if ( 
hint ) {
                if ( 
delegate ) {
                    
hint.setDelegate(delegate);
                }

                return 
hint;
            }

            return 
this.createHint(delegatenode);
        },

        
isAnyShown: function() {
            return !!
isShown;
        },

        
getShown: function() {
            return 
isShown;
        },

        
init: function() {

        }
    };
})();


GoogleMapLocationHint.LAUNCHER = function() { 
    
    var 
_cache = {};
    
    var 
displayMap = function(elementId,location) {

        var 
options =  {
            
zoom2,
            
minZoom2,
            
mapTypeIdgoogle.maps.MapTypeId.ROADMAP,
            
scrollwheelfalse,
        };

        if ( !
window.map )
        {
            
window.map = {};
        }
        
        var 
sw = new google.maps.LatLng(location.southWestLat,location.southWestLng);
        var 
ne = new google.maps.LatLng(location.northEastLat,location.northEastLng);

        var 
bounds = new google.maps.LatLngBounds(swne );
        
        if ( !
window.map[elementId] )
        {
            
window.map[elementId] = new window.PEEP_GoogleMap(elementId);
            
window.map[elementId].initialize(options);
            
            
window.map[elementId].fitBounds(bounds); 
            
window.map[elementId].addPoint(location.lat,location.lngnullnullnull_marker_icon_path);

            
window.map[elementId].createMarkerCluster();
        }
        
        return 
bounds;
    }
    
    var 
Delegate = function(location) {
        
this.init(location);
//        this.topCorener(location);
//        this.bottomCorener(location);
    
};

    
Delegate.prototype.init = function(location) {
        
this.resize true;
        
this.hash GoogleMapLocationHint.UTILS.HashCode.value(location);
        
this.elementId "#map_" this.hash ;
        
this.element = $(this.elementId );
        
        if ( $(
this.elementId).size() == )
        {
            
this.element = $("<div id='"+this.elementId+"' style='width:300px;height:300px;'></div>");
        }
        
        
this.location location;
    };
    
//    Delegate.prototype.topCorener = function(location) {
//        this.topCornerId = "#map_top_corner_" + this.hash ;
//        this.topCornerElement = $(this.topCornerId );
//        
//        if ( $(this.topCornerId).size() == 0 )
//        {
//            this.topCornerElement = $("<div id='"+this.topCornerId+"' style='width:300px;height:300px; display:none'></div>");
//            $("body").append(this.topCornerElement);
//        }
//        
//        this.location = location;
//    };
//    
//    Delegate.prototype.bottomCorener = function(location) {
//        this.bottomCornerId = "#map_bottom_corner_" + this.hash ;
//        this.bottomCornerElement = $(this.bottomCornerId );
//        
//        if ( $(this.bottomCornerId).size() == 0 )
//        {
//            this.bottomCornerElement = $("<div id='"+this.bottomCornerId+"' style='width:300px;height:320px; display:none'></div>");
//            $("body").append(this.bottomCornerElement);
//        }
//        
//        this.location = location;
//    };

    
Delegate.prototype.construct = function() {
//        this.setTopCorner(this.delegate.topCornerElement);
//        this.setBottomCorner(this.delegate.bottomCornerElement);
        
this.setContent(this.delegate.element);
        
displayMap(this.delegate.elementIdthis.delegate.location);
//        displayMap(this.delegate.topCornerId , this.delegate.location);
//        displayMap(this.delegate.bottomCornerId , this.delegate.location);
        
    
};

    
Delegate.prototype.afterRefreshOrientation = function( orientationpositioncornerPosition ) {
        if ( 
cornerPosition ) {
            
this.topCornerBody.find(".uhint-corner-cover").css("margin-left", -(cornerPosition.left 0.5));
        }
        
        
window.map[this.delegate.elementId].resize(); 
        
window.map[this.delegate.elementId].resetLastBounds();
        
//        window.map[this.delegate.topCornerId].resize(); 
//        window.map[this.delegate.topCornerId].resetLastBounds();
//        
//        window.map[this.delegate.bottomCornerId].resize(); 
//        window.map[this.delegate.bottomCornerId].resetLastBounds();
    
};

    
Delegate.prototype.beforeShow = function() {
        var 
self this;

//        this.delegate.bottomCornerElement.show();
//        this.delegate.topCornerElement.show();
        
if ( GoogleMapLocationHint.isAnyShown() && GoogleMapLocationHint.getShown() !== this GoogleMapLocationHint.getShown().hide();

        if ( 
PEEP.getActiveFloatBox() ) {
            
this.hint.removeClass("map-hint-from-floatbox").addClass("map-hint-from-floatbox");

            
PEEP.getActiveFloatBox().bind("close", function() {
                
self.hint.removeClass("map-hint-from-floatbox");
                
self.hide();
            });
        }        
    };

    
Delegate.prototype.beforeStart = function() {
        if ( 
GoogleMapLocationHint.isAnyShown() && GoogleMapLocationHint.getShown().timeouts.stop ) {
            
window.clearTimeout(GoogleMapLocationHint.getShown().timeouts.stop);
        }
    };

    
Delegate.prototype.beforeStop = function() {
        
        if ( 
GoogleMapLocationHint.isAnyShown() && GoogleMapLocationHint.getShown() !== this ) {
            
GoogleMapLocationHint.getShown().stop();
            
            
this.delegate.element.hide();
//            this.delegate.bottomCornerElement.hide();
//            this.delegate.topCornerElement.hide();
            
            
$("body").append(this.delegate.element);
//            $("body").append(this.delegate.bottomCornerElement);
//            $("body").append(this.delegate.topCornerElement);
        
}
    };

    return {
        
getHint: function( targeticon_path ) {
            var 
delegateConstructor;
            
            
_marker_icon_path icon_path;
            
            var 
hint GoogleMapLocationHint.getHint(target);

            var 
hash GoogleMapLocationHint.UTILS.HashCode.value(target.location);

            if ( !
hint && _cache[hash] ) {
                
hint _cache[hash];
                
hint.setTarget(target);
            }
            
            if ( 
hint )
            {
                
delegateConstructor Delegate;
                
                
hint.setDelegate(new delegateConstructor(target.location));
            }

            return 
hint;
        },

        
createHint: function( target ) {
            var 
delegateConstructor;
            
            
delegateConstructor Delegate;
            
            var 
hint GoogleMapLocationHint.createHint(new delegateConstructor(target.location), target);
            var 
hash GoogleMapLocationHint.UTILS.HashCode.value(target.location);
            
_cache[hash] = hint;

            return 
hint;
        },

        
init: function(icon_path) {
            
GoogleMapLocationHint.init();

            var 
queryTimeOut;

            $(
document).on('mouseenter.hint''.map-hint-target', function( event ) {
                var 
self this;
                
                if ( !$(
this).data('location') ) return;
                
                
self.location = $(this).data('location');
                
                var 
launcher GoogleMapLocationHint.LAUNCHER();
                var 
hint launcher.getHint(thisicon_path);

                if ( 
hint ) {
                    
hint.start();
                } else {
                    
queryTimeOut window.setTimeout(function() {
                        
launcher.createHint(self).start();
                    }, 
200);//GoogleMapLocationHint.isAnyShown() ? 50 : 150);
                
}

                
// Prevents an appearing of the standard tooltip
                
var target = $(event.target);
                if ( 
target.data().tod ) {
                    
window.clearTimeout(target.data().tod);
                }
            });

            $(
document).on('mouseleave.hint''.map-hint-target', function() {
                if ( !$(
this).data('location')  ) return;

                
window.clearTimeout(queryTimeOut);

                var 
hint GoogleMapLocationHint.getHint(this);
                if ( 
hint hint.stop();
            });

            $(
document).on('click.hint''.map-hint-target', function() {
                if ( !$(
this).data('location')  ) return;

                var 
hint GoogleMapLocationHint.getHint(this);
                if ( 
hint hint.stop();
            });
        }
    };
}

GoogleMapLocationHint.UTILS = {
    
MD5: function (string) {

        function 
RotateLeft(lValueiShiftBits) {
            return (
lValue << iShiftBits) | (lValue >>> (32 iShiftBits));
        }

        function 
AddUnsigned(lXlY) {
            var 
lX4lY4lX8lY8lResult;
            
lX8 = (lX 0x80000000);
            
lY8 = (lY 0x80000000);
            
lX4 = (lX 0x40000000);
            
lY4 = (lY 0x40000000);
            
lResult = (lX 0x3FFFFFFF) + (lY 0x3FFFFFFF);
            if (
lX4 lY4) {
                return (
lResult 0x80000000 lX8 lY8);
            }
            if (
lX4 lY4) {
                if (
lResult 0x40000000) {
                    return (
lResult 0xC0000000 lX8 lY8);
                } else {
                    return (
lResult 0x40000000 lX8 lY8);
                }
            } else {
                return (
lResult lX8 lY8);
            }
        }

        function 
F(xyz) {
            return (
y) | ((~x) & z);
        }
        function 
G(xyz) {
            return (
z) | (& (~z));
        }
        function 
H(xyz) {
            return (
z);
        }
        function 
I(xyz) {
            return (
^ (| (~z)));
        }

        function 
FF(abcdxsac) {
            
AddUnsigned(aAddUnsigned(AddUnsigned(F(bcd), x), ac));
            return 
AddUnsigned(RotateLeft(as), b);
        }
        ;

        function 
GG(abcdxsac) {
            
AddUnsigned(aAddUnsigned(AddUnsigned(G(bcd), x), ac));
            return 
AddUnsigned(RotateLeft(as), b);
        }
        ;

        function 
HH(abcdxsac) {
            
AddUnsigned(aAddUnsigned(AddUnsigned(H(bcd), x), ac));
            return 
AddUnsigned(RotateLeft(as), b);
        }
        ;

        function 
II(abcdxsac) {
            
AddUnsigned(aAddUnsigned(AddUnsigned(I(bcd), x), ac));
            return 
AddUnsigned(RotateLeft(as), b);
        }
        ;

        function 
ConvertToWordArray(string) {
            var 
lWordCount;
            var 
lMessageLength string.length;
            var 
lNumberOfWords_temp1 lMessageLength 8;
            var 
lNumberOfWords_temp2 = (lNumberOfWords_temp1 - (lNumberOfWords_temp1 64)) / 64;
            var 
lNumberOfWords = (lNumberOfWords_temp2 1) * 16;
            var 
lWordArray = Array(lNumberOfWords 1);
            var 
lBytePosition 0;
            var 
lByteCount 0;
            while (
lByteCount lMessageLength) {
                
lWordCount = (lByteCount - (lByteCount 4)) / 4;
                
lBytePosition = (lByteCount 4) * 8;
                
lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount) << lBytePosition));
                
lByteCount++;
            }
            
lWordCount = (lByteCount - (lByteCount 4)) / 4;
            
lBytePosition = (lByteCount 4) * 8;
            
lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition);
            
lWordArray[lNumberOfWords 2] = lMessageLength << 3;
            
lWordArray[lNumberOfWords 1] = lMessageLength >>> 29;
            return 
lWordArray;
        }
        ;

        function 
WordToHex(lValue) {
            var 
WordToHexValue ""WordToHexValue_temp ""lBytelCount;
            for (
lCount 0lCount <= 3lCount++) {
                
lByte = (lValue >>> (lCount 8)) & 255;
                
WordToHexValue_temp "0" lByte.toString(16);
                
WordToHexValue WordToHexValue WordToHexValue_temp.substr(WordToHexValue_temp.length 22);
            }
            return 
WordToHexValue;
        }
        ;

        function 
Utf8Encode(string) {
            
string string.replace(/rn/g"n");
            var 
utftext "";

            for (var 
0string.lengthn++) {

                var 
string.charCodeAt(n);

                if (
128) {
                    
utftext += String.fromCharCode(c);
                }
                else if ((
127) && (2048)) {
                    
utftext += String.fromCharCode((>> 6) | 192);
                    
utftext += String.fromCharCode((63) | 128);
                }
                else {
                    
utftext += String.fromCharCode((>> 12) | 224);
                    
utftext += String.fromCharCode(((>> 6) & 63) | 128);
                    
utftext += String.fromCharCode((63) | 128);
                }

            }

            return 
utftext;
        }
        ;

        var 
= Array();
        var 
kAABBCCDDabcd;
        var 
S11 7S12 12S13 17S14 22;
        var 
S21 5S22 9S23 14S24 20;
        var 
S31 4S32 11S33 16S34 23;
        var 
S41 6S42 10S43 15S44 21;

        
string Utf8Encode(string);

        
ConvertToWordArray(string);

        
0x67452301;
        
0xEFCDAB89;
        
0x98BADCFE;
        
0x10325476;

        for (
0x.length+= 16) {
            
AA a;
            
BB b;
            
CC c;
            
DD d;
            
FF(abcdx[0], S110xD76AA478);
            
FF(dabcx[1], S120xE8C7B756);
            
FF(cdabx[2], S130x242070DB);
            
FF(bcdax[3], S140xC1BDCEEE);
            
FF(abcdx[4], S110xF57C0FAF);
            
FF(dabcx[5], S120x4787C62A);
            
FF(cdabx[6], S130xA8304613);
            
FF(bcdax[7], S140xFD469501);
            
FF(abcdx[8], S110x698098D8);
            
FF(dabcx[9], S120x8B44F7AF);
            
FF(cdabx[10], S130xFFFF5BB1);
            
FF(bcdax[11], S140x895CD7BE);
            
FF(abcdx[12], S110x6B901122);
            
FF(dabcx[13], S120xFD987193);
            
FF(cdabx[14], S130xA679438E);
            
FF(bcdax[15], S140x49B40821);
            
GG(abcdx[1], S210xF61E2562);
            
GG(dabcx[6], S220xC040B340);
            
GG(cdabx[11], S230x265E5A51);
            
GG(bcdax[0], S240xE9B6C7AA);
            
GG(abcdx[5], S210xD62F105D);
            
GG(dabcx[10], S220x2441453);
            
GG(cdabx[15], S230xD8A1E681);
            
GG(bcdax[4], S240xE7D3FBC8);
            
GG(abcdx[9], S210x21E1CDE6);
            
GG(dabcx[14], S220xC33707D6);
            
GG(cdabx[3], S230xF4D50D87);
            
GG(bcdax[8], S240x455A14ED);
            
GG(abcdx[13], S210xA9E3E905);
            
GG(dabcx[2], S220xFCEFA3F8);
            
GG(cdabx[7], S230x676F02D9);
            
GG(bcdax[12], S240x8D2A4C8A);
            
HH(abcdx[5], S310xFFFA3942);
            
HH(dabcx[8], S320x8771F681);
            
HH(cdabx[11], S330x6D9D6122);
            
HH(bcdax[14], S340xFDE5380C);
            
HH(abcdx[1], S310xA4BEEA44);
            
HH(dabcx[4], S320x4BDECFA9);
            
HH(cdabx[7], S330xF6BB4B60);
            
HH(bcdax[10], S340xBEBFBC70);
            
HH(abcdx[13], S310x289B7EC6);
            
HH(dabcx[0], S320xEAA127FA);
            
HH(cdabx[3], S330xD4EF3085);
            
HH(bcdax[6], S340x4881D05);
            
HH(abcdx[9], S310xD9D4D039);
            
HH(dabcx[12], S320xE6DB99E5);
            
HH(cdabx[15], S330x1FA27CF8);
            
HH(bcdax[2], S340xC4AC5665);
            
II(abcdx[0], S410xF4292244);
            
II(dabcx[7], S420x432AFF97);
            
II(cdabx[14], S430xAB9423A7);
            
II(bcdax[5], S440xFC93A039);
            
II(abcdx[12], S410x655B59C3);
            
II(dabcx[3], S420x8F0CCC92);
            
II(cdabx[10], S430xFFEFF47D);
            
II(bcdax[1], S440x85845DD1);
            
II(abcdx[8], S410x6FA87E4F);
            
II(dabcx[15], S420xFE2CE6E0);
            
II(cdabx[6], S430xA3014314);
            
II(bcdax[13], S440x4E0811A1);
            
II(abcdx[4], S410xF7537E82);
            
II(dabcx[11], S420xBD3AF235);
            
II(cdabx[2], S430x2AD7D2BB);
            
II(bcdax[9], S440xEB86D391);
            
AddUnsigned(aAA);
            
AddUnsigned(bBB);
            
AddUnsigned(cCC);
            
AddUnsigned(dDD);
        }

        var 
temp WordToHex(a) + WordToHex(b) + WordToHex(c) + WordToHex(d);

        return 
temp.toLowerCase();
    },
    
HashCode: function () {
        var 
serialize = function (object) {
            
// Private
            
var typeserializedCode "";

            
type typeof object;

            if (
type === 'object') {
                var 
element;

                for (
element in object) {
                    
serializedCode += "[" type ":" element serialize(object[element]) + "]";
                }

            } else if (
type === 'function') {
                
serializedCode += "[" type ":" object.toString() + "]";
            } else {
                
serializedCode += "[" type ":" object "]";
            }

            return 
serializedCode.replace(/s/g"");
        }

        
// Public, API
        
return {
            
value: function (object) {
                return 
GoogleMapLocationHint.UTILS.MD5(serialize(object));
            }
        };
    }()

};
?>
Онлайн: 0
Реклама