/* eslint-disable */ 
(function () {
    let source, isMicroSite, activationStatus, enterpriseNumber;
    let secondIframeLoaded = false, onceClickedOnSecFrame = false, windowIframeBody;

    try {
        if (window && window.parent && window.parent.__INITIAL_STATE__ && window.parent.__INITIAL_STATE__.homeReducer && window.parent.__INITIAL_STATE__.homeReducer.data) {
            let homeReducerData = window.parent.__INITIAL_STATE__.homeReducer.data;
            isMicroSite = true; //ask microsite
            enterpriseNumber = homeReducerData.enterpriseInfo ? homeReducerData.enterpriseInfo.businessNumber : homeReducerData.businessNumber;
            source = 6;
            activationStatus = homeReducerData.activationStatus;
            //var businessName = homeReducerData.name;
        }
    } catch (e) {
        log(e);
    }

    if (!document.getElementsByClassName) {
        document.getElementsByClassName = function(className) {
            return this.querySelectorAll("." + className);
        };
        Element.prototype.getElementsByClassName = document.getElementsByClassName;
    }
    let bfi;
    let totalWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
    let totalHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
    let parentTitle = document.title;
    let newTitle = isMicroSite ? document.title : "(1) New Message!";
    let titleChangeInterval;
    let titleFlag = 0;
    let tries = 1;
    let extensionInterval;
    let env;
    let windowIframe;
    window.be_webchat = null;

    function playBubbleSound() {
        let context, source = "https://d3cnqzq0ivprch.cloudfront.net/prod/media/notification-sound.mp3";
        try {
            window.AudioContext = window.AudioContext || window.webkitAudioContext;
            context = new AudioContext();
            let request = new XMLHttpRequest();
            request.open("GET", source, true);
            request.responseType = "arraybuffer";
            request.onload = function() {
                context.decodeAudioData(request.response, function(buffer) {
                    let source = context.createBufferSource();
                    source.buffer = buffer;
                    source.connect(context.destination);
                    source.start(0);
                    context.resume();
                }, function(e) {
                    console.log("error", e);
                });
            };
            request.send();
        } catch (e) {
            if (/Edge\/|Trident\/|MSIE /.test(navigator.userAgent)) {
                let audio = document.createElement("audio");
                audio.autoplay = true;
                audio.src = source;
                audio.play();
            }
        }
    };

    function getGoodBot(type) {
        const goodBots = ["facebookexternalhit", "Facebot", "Googlebot", "Google", "LinkedInBot"];
        const ua = navigator.userAgent;
        let isGoodBots = false;
        let botName = "";

        for (let i = 0; i < goodBots.length; i++) {
            const bot = goodBots[i];
            if (ua.indexOf(bot) > -1) {
                isGoodBots = true;
                botName = bot.toLowerCase();
                break;
            }
        }
        if (type == "isGoodBot") {
            return isGoodBots;
        } else {
            botName = (botName != "") ? botName : "facebook";
            botName = botName.indexOf("face") > -1 ? "facebook" : botName;
            botName = botName.indexOf("linked") > -1 ? "linked-in" : botName;
            return botName;
        }
    }

    function initIframe() {
        
        let bfdiv = document.getElementById("bf-revz-widget-" + window.wid) || document.getElementById("bf-revz-widget-" + "0" + window.wid);
        if (!bfdiv) {
            tries++;
            if (tries > 50) {
                return false;
            }
            setTimeout(initIframe, 500);
            return;
        }

        if (!bfdiv.firstChild) {
            bfdiv.appendChild(bfi);
        } else if (bfdiv.firstChild && bfdiv.firstChild.nodeName != "IFRAME") {
            bfdiv.insertBefore(bfi, bfdiv.firstChild);
        }
    }

    let winHeight = 670;
    let winWidth = '346px'
    if (window.innerHeight < 670) {
        winHeight = window.innerHeight;
    }

    if (window.innerWidth < 500) {
        winWidth = '100%';
    }

    window.addEventListener("resize", function() {
        if (window.innerHeight < 727) {
            winHeight = window.innerHeight;
        } else {
            winHeight = 773;
        }
    });

    const openWebchatFromOutside = (objFromClient) => {
        const firstIframe = document.getElementById("bewebchat");
        const secondIframe = document.getElementById("window-iframe");
        firstIframe.contentWindow.postMessage({type: "post-message-from-outside", clientObj: objFromClient, beWebchatWindowObj: JSON.stringify(window.be_webchat), isWidgetAlignLeft: window.isWidgetAlignLeft }, "*");
        secondIframe.contentWindow.postMessage({type: "post-message-from-outside-chat", clientObj: objFromClient, beWebchatWindowObj: JSON.stringify(window.be_webchat), isWidgetAlignLeft: window.isWidgetAlignLeft, locale: window.locale }, "*");
    }

    window.onmessage = function(e) {
        if (e.data && e.data.split) {
            let dataReceivedSplit = e.data.split("***");
            let dataReceived = dataReceivedSplit[0];
            let widthReceived = dataReceivedSplit[1];
            if (totalWidth < 960) {
                widthReceived = "drawer";
            }

            if (dataReceived == "icon-clicked") {
                if (!secondIframeLoaded) {

                    if (!onceClickedOnSecFrame) {
                        loadNewIframe();
                    }
                }
                document.getElementById("bewebchat").style.height = "80px";
                document.getElementById("bewebchat").style.width = "70px";

                if (widthReceived == "floating") {
                    document.getElementById("window-iframe").setAttribute("style", `-webkit-overflow-scrolling: touch; visibility: visible; opacity: 1; ${window.isWidgetAlignLeft ? "left:20px" : "right:20px" }; bottom:20px; position:fixed; overflow:hidden; width:${winWidth}; z-index:9999998; border: 0; height: ${winHeight + "px"}; `);
                } else {
                    document.getElementById("window-iframe").setAttribute("style", `-webkit-overflow-scrolling: touch; visibility: visible; opacity: 1; z-index: 9999999; ${window.isWidgetAlignLeft ? "left:0px" : "right:0px" }; bottom:0px; position:fixed; overflow:hidden; width:${winWidth}; height: 100%; border: 0;`);
                }

                if (titleChangeInterval) {
                    clearInterval(titleChangeInterval);
                }
                document.title = parentTitle;

                window.be_webchat = {
                    ...window.be_webchat,
                    windowOpened: true
                };

            } else if (dataReceived == "icon-closed") {
                let wid = "20px";
                if (totalWidth < 960) {
                    wid = "20px";
                }

                let element = document.getElementById("window-iframe");
                element.style.height = 0;

                secondIframeLoaded = false;

                window.be_webchat = {
                    ...window.be_webchat,
                    windowOpened: false
                };

            } else if (dataReceived == "getwidth") {
                e.source.postMessage({width: totalWidth, height: totalHeight, src: "birdeye", updateValFromParent: window.update}, "*");
            } else if (dataReceived == "show-bubble") {

                bfi.setAttribute("style", `-webkit-overflow-scrolling: touch; visibility: visible; opacity: 1; z-index: 9999999; ${window.isWidgetAlignLeft ? "left:20px" : "right:20px" }; bottom:20px; position:fixed; overflow:hidden; width:340px; height: 227px; border: 0;`);

                if (!getGoodBot("isGoodBot")) {
                    titleChangeInterval = setInterval(function() {
                        document.title = titleFlag ? parentTitle : newTitle;
                        titleFlag = !titleFlag;
                    }, 2500);
                }
            } else if (dataReceived == "hide-bubble") {
                bfi.setAttribute("style", `-webkit-overflow-scrolling: touch; visibility: visible; opacity: 1; z-index: 9999999; ${window.isWidgetAlignLeft ? "left:20px" : "right:20px" }; bottom:20px; position:fixed; overflow:hidden; width:70px; height: 80px; border: 0;`);

                if (titleChangeInterval) {
                    clearInterval(titleChangeInterval);
                }
                document.title = parentTitle;
            } else if (dataReceived == "get-parent-url") {
                if (!window.be_webchat) {
                    window.be_webchat = {
                        open: openWebchatFromOutside
                    };
                }
                e.source.postMessage({type: "put-parent-url", url: document.location.href,hostname: document.location.hostname, href: document.location.origin, src: "birdeye", isMicroSite: isMicroSite ? isMicroSite : false, frmMicrosite: frmMicrosite ? frmMicrosite : false, isWidgetAlignLeft: window.isWidgetAlignLeft ? window.isWidgetAlignLeft : false, enterpriseNumber: isMicroSite ? enterpriseNumber : null, width: totalWidth, height: totalHeight, src: "birdeye", updateValFromParent: window.update, bizDataResp: window.bizDataResp, beWebchatWindowObj: JSON.stringify(window.be_webchat), updatedBizData: true, locale: window.locale }, "*");
            } else if (dataReceived == "push-datalayer" && window && typeof (window.dataLayer) !== "undefined") {
                window.dataLayer.push(JSON.parse(dataReceivedSplit[1]));
            } else if (dataReceived == "push-avbDatalayer" && window && typeof (window.avbData) !== "undefined") {
                window.avbData.push(JSON.parse(dataReceivedSplit[1]));
            } else if (dataReceived == "push-analytics") {
                try {
                    try {
                        const config = JSON.parse(dataReceivedSplit[1]);

                        switch (config.googleAnalyticsVersion) {
                            case "UA":
                                if (ga && typeof (ga) == "function") {
                                    const nonInteractionObj = config.nonInteraction ? {'nonInteraction': 1} : null;

                                    ga('send', 'event', 'webchat', config.action, config.actionLabel, nonInteractionObj);
                                } else {
                                    console.warn("Webchat Analytics ReferenceError: ga is not defined");
                                }
                                break;
                            case "GST":
                                if (gtag && typeof (gtag) == "function") {
                                    const nonInteractionObj = config.nonInteraction ? {'non_interaction': true} : {};

                                    gtag('event', config.action, {
                                        'event_category': 'webchat',
                                        'event_label': config.actionLabel.trim(),
                                        'value': 1,
                                        ...nonInteractionObj
                                    });
                                } else {
                                    console.warn("Webchat Analytics ReferenceError: gtag is not defined");
                                }
                                break;
                        }
                    } catch (e) {
                        console.warn("Webchat Analytics", e);
                    }
                } catch (e) {
                    console.warn("Webchat Analytics", e);
                }
            } else if (dataReceived == "be-custom-event-fire") {
                const customEventData = JSON.parse(dataReceivedSplit[1]);
                const be_event = new CustomEvent("beWebchatCustomEvent", { detail: customEventData });
                window.parent.document.dispatchEvent(be_event);
            }
            else if(dataReceived == "bubble-icon-sound") {
                playBubbleSound();
            }
        }
    };

    if(document.readyState === "complete") {
        extensionInterval = setInterval(function() {
            env = window.envObj ? window.envObj : {};
            const bizResp = window.bizDataResp ? window.bizDataResp : {};
            const locationListLen = bizResp ? bizResp["businessLocations"] && bizResp["businessLocations"].length : 0;

            if (Object.keys(env).length && locationListLen > 0) {
                getFirstIframeAndInit(env);
            }
        }, 100);

    } else {
        if (window.addEventListener) {
            // DOM2 standard
            window.addEventListener("load", windowOnloadHandler, false);
        }
        else if (window.attachEvent) {
            // Microsoft's precursor to it, IE8 and earlier
            window.attachEvent("onload", windowOnloadHandler);
        }
        else {
            // Some pre-1999 browser
            window.onload = windowOnloadHandler;
        }
        
        function windowOnloadHandler() {
            env = window.envObj ? window.envObj : {};
            const bizResp = window.bizDataResp ? window.bizDataResp : {};
            const locationListLen = bizResp ? bizResp["businessLocations"] && bizResp["businessLocations"].length : 0;

            if (locationListLen > 0) {
                getFirstIframeAndInit(env);
            }
        }
    }

    function getFirstIframeAndInit(env) {
        extensionInterval && clearInterval(extensionInterval);
        bfi = document.createElement("iframe");
        bfi.name = "bfiframe";
        bfi.id = "bewebchat";
        bfi.loading = "lazy";
        bfi.title="Webchat widget";
        bfi.src = env.protocol + env.domain + `/getBubbleContent?update=${window.update}&source=${window.source}&bNum=${window.bNum}&apikey=${window.apikey}&widgetApiVersion=${window.widgetApiVersion}`;
        bfi.setAttribute("style", `-webkit-overflow-scrolling: touch; visibility: visible; opacity: 1; z-index: 9999999; ${window.isWidgetAlignLeft ? "left:20px" : "right:20px" }; bottom:20px; position:fixed; overflow:hidden; width:70px; height: 80px; border:0`);
        initIframe();
        bfi.onload = loadNewIframe.bind(this);
    }

    function appendSecondIframe() {
        secondIframeLoaded = true;
        onceClickedOnSecFrame = true;
        let bfdiv = document.getElementById("bf-revz-widget-" + window.wid) || document.getElementById("bf-revz-widget-" + "0" + window.wid);

        bfdiv.appendChild(windowIframe);

        const bodyEl = document.querySelector("#window-iframe").parentElement.parentElement;
        windowIframeBody = document.querySelector("#window-iframe").contentDocument ?  document.querySelector("#window-iframe").contentDocument.body : null;

        bodyEl.addEventListener("click", function(e){
            let emojiEl = windowIframeBody && windowIframeBody.querySelector(".emoji-wrap");

            if (emojiEl && e.target !== document.querySelector("#window-iframe")) {
                emojiEl.classList.add("hide-emoji");
                emojiEl.style.display= "none";
            }
        });
    }

    function loadNewIframe() {
        windowIframe = document.createElement("iframe");
        windowIframe.name = "wciframe";
        windowIframe.id = "window-iframe";
        windowIframe.loading = "lazy";
        windowIframe.title = "Webchat widget";
        windowIframe.src = env.protocol + env.domain + `/getChatWindowContent?emailRequired=${window.emailRequired}&bNum=${window.bNum}&mobileRequired=${window.mobileRequired}&defaultCountryCode=${window.defaultCountryCode}&apikey=${window.apikey}&widgetApiVersion=${window.widgetApiVersion}&isMicroSite=${window.isMicroSite}&activationStatus=${window.activationStatus}&isWidgetAlignLeft=${window.isWidgetAlignLeft}`;
        windowIframe.setAttribute("style", `-webkit-overflow-scrolling: touch; visibility: visible; opacity: 1; ${window.isWidgetAlignLeft ? "left:20px" : "right:20px" }; bottom:20px; position:fixed; overflow:hidden; width:346px; z-index:9999998; border: 0; height: 0px;`);
        appendSecondIframe();
    }
})();
 
    var wid = 1637479775; 
    var update = 0; 
    var soundOff = 1; 
    var envObj = {"domain":"webchat.birdeye.com","protocol":"https://","isWidgetAlignLeft":false};
    var emailRequired = 0;
    var defaultCountryCode = 0;
    var mobileRequired = 1;
    var apikey = "2a4e20d76f8d17afaf1d1fa8cfdb374e0b90683dd4c6741d";
    var widgetApiVersion = 2;
    var bNum = 77382;
    var update = 0;
    var isMicroSite = false;
    var frmMicrosite = false;
    var isWidgetAlignLeft = false;
    var activationStatus = false;
    var source = false;
    var bizDataResp = {"businessId":164141571164273,"chatTheme":"floating","chatIcon":"twocolored","bannerColor":"#F8F8F8","bannerTextColor":"#212121","btnColor":"#00a7e5","btnTxtColor":"#FFFFFF","enableReplyInBusinessHr":1,"enableReplyPostBusinessHr":1,"autoReplyTxt":"Thank you for contacting [Business Name]! Someone from our team will reach out shortly.","replyTextPostBusinessHr":"Thank you for contacting [Business Name] ! We are currently closed, but we’ll get back to you as soon as we can. You can reach us at [Business Phone] during the following business hours: [Business Hours] , We'll be in touch soon! 🤙","headerHeadline":"Hi there!","headerDescription":"Questions? We are here to help! Send us a message below.","webChatOnlineClosingMessageHeader":"We will text you !","webChatOnlineClosingMessageBody":"We will follow up with you soon. You can always text us at [Business Texting Number] ","smb":false,"popupInterval":15,"microsite":0,"userProfile":[{"userProfileName":"Tommy's","userProfileImage":"https://ddjkm7nmu27lx.cloudfront.net/876180/fileUpload/876180_1657641450659_tommysprofilelogobe2.png"}],"businessLocations":[{"businessId":166022884522955,"location":"Boyne City, MI","businessSMSPhoneNumber":"(231) 489-1295","address":null,"name":"Tommy's at Lake Charlevoix","countryCode":"US","zipcode":"49712","address1":"5035 Lake Shore Rd","address2":null,"chatEnabled":true,"city":"Boyne City","state":"MI","locationName":"Tommy's at Lake Charlevoix","businessAlias":"Lake Charlevoix","businessName":"Tommy's at Lake Charlevoix","primaryName":"Lake Charlevoix","secondaryName":null,"shortBusinessId":944178,"latitude":45.221825,"longitude":-85.07770499,"phone":"(231) 489-1295","emailId":"rentalslc@gettommys.com"},{"businessId":165108690125561,"location":"Castaic, CA","businessSMSPhoneNumber":"(805) 521-9465","address":null,"name":"Tommy's Castaic","countryCode":"US","zipcode":"91384","address1":"31970 Castaic Road","address2":null,"chatEnabled":true,"city":"Castaic","state":"CA","locationName":"Tommy's Castaic","businessAlias":"Castaic/Ventura","businessName":"Tommy's Castaic","primaryName":"Castaic/Ventura","secondaryName":"","shortBusinessId":910291,"latitude":34.50034998,"longitude":-118.6247593,"phone":"(805) 521-9465","emailId":"infoca@gettommys.com"},{"businessId":165108674573911,"location":"Clermont, FL","businessSMSPhoneNumber":"(407) 281-7909","address":null,"name":"Tommy's Florida","countryCode":"US","zipcode":"34711","address1":"16212 FL-50","address2":null,"chatEnabled":true,"city":"Clermont","state":"FL","locationName":"Tommy's Florida","businessAlias":"Florida","businessName":"Tommy's Florida","primaryName":"Florida","secondaryName":null,"shortBusinessId":910282,"latitude":28.545973,"longitude":-81.68709,"phone":"(407) 281-7909","emailId":"infofl@gettommys.com"},{"businessId":165108677922512,"location":"Comstock Park, MI","businessSMSPhoneNumber":"(616) 288-7509","address":null,"name":"Tommy's Grand Rapids","countryCode":"US","zipcode":"49321","address1":"247 Morrissey Dr Northeast","address2":null,"chatEnabled":true,"city":"Comstock Park","state":"MI","locationName":"Tommy's Grand Rapids","businessAlias":"Grand Rapids","businessName":"Tommy's Grand Rapids","primaryName":"Grand Rapids","secondaryName":null,"shortBusinessId":910284,"latitude":43.03769,"longitude":-85.66255799,"phone":"(616) 288-7509","emailId":"infogr@gettommys.com"},{"businessId":165108696994710,"location":"Fort Worth, TX","businessSMSPhoneNumber":"(817) 916-8882","address":null,"name":"Tommy's Fort Worth","countryCode":"US","zipcode":"76116","address1":"9804 Camp Bowie W Blvd","address2":null,"chatEnabled":true,"city":"Fort Worth","state":"TX","locationName":"Tommy's Fort Worth","businessAlias":"Fort Worth","businessName":"Tommy's Fort Worth","primaryName":"Fort Worth","secondaryName":null,"shortBusinessId":910295,"latitude":32.725266,"longitude":-97.4959581,"phone":"(817) 916-8882","emailId":"infotx@gettommys.com"},{"businessId":165108672538900,"location":"Golden, CO","businessSMSPhoneNumber":"(303) 455-3091","address":null,"name":"Tommy's","countryCode":"US","zipcode":"80403","address1":"12900 W 43rd Dr","address2":null,"chatEnabled":true,"city":"Golden","state":"CO","locationName":"Tommy's","businessAlias":"Colorado","businessName":"Tommy's","primaryName":"Colorado","secondaryName":null,"shortBusinessId":910281,"latitude":39.776665,"longitude":-105.144264,"phone":"(303) 455-3091","emailId":"infoco@gettommys.com"},{"businessId":165108691783958,"location":"Harrison, TN","businessSMSPhoneNumber":"(423) 508-8120","address":null,"name":"Tommy's Chattanooga","countryCode":"US","zipcode":"37341","address1":"6200 TN-58","address2":null,"chatEnabled":true,"city":"Harrison","state":"TN","locationName":"Tommy's Chattanooga","businessAlias":"Chattanooga","businessName":"Tommy's Chattanooga","primaryName":"Chattanooga","secondaryName":null,"shortBusinessId":910292,"latitude":35.12071198,"longitude":-85.12399999,"phone":"(423) 508-8120","emailId":"infotn@gettommys.com"},{"businessId":165108681782549,"location":"Henderson, NV","businessSMSPhoneNumber":"(702) 293-1122","address":null,"name":"Tommy's Las Vegas","countryCode":"US","zipcode":"89015","address1":"615 W Lake Mead Pkwy","address2":null,"chatEnabled":true,"city":"Henderson","state":"NV","locationName":"Tommy's Las Vegas","businessAlias":"Las Vegas","businessName":"Tommy's Las Vegas","primaryName":"Las Vegas","secondaryName":null,"shortBusinessId":910286,"latitude":36.03443439,"longitude":-115.0019709,"phone":"(702) 293-1122","emailId":"infolv@gettommys.com"},{"businessId":165108693557357,"location":"Knoxville, TN","businessSMSPhoneNumber":"(865) 671-2890","address":null,"name":"Tommy's Knoxville","countryCode":"US","zipcode":"37932","address1":"11470 Outlet Drive","address2":null,"chatEnabled":true,"city":"Knoxville","state":"TN","locationName":"Tommy's Knoxville","businessAlias":"Knoxville","businessName":"Tommy's Knoxville","primaryName":"Knoxville","secondaryName":null,"shortBusinessId":910293,"latitude":35.902873,"longitude":-84.16660299,"phone":"(865) 671-2890","emailId":"infotn@gettommys.com"},{"businessId":165108695226094,"location":"Lewisville, TX","businessSMSPhoneNumber":"(972) 221-2377","address":null,"name":"Tommy's Lewisville","countryCode":"US","zipcode":"75057","address1":"375 Oakridge Blvd","address2":null,"chatEnabled":true,"city":"Lewisville","state":"TX","locationName":"Tommy's Lewisville","businessAlias":"Lewisville","businessName":"Tommy's Lewisville","primaryName":"Lewisville","secondaryName":null,"shortBusinessId":910294,"latitude":33.07231,"longitude":-97.01737,"phone":"(972) 221-2377","emailId":"infotx@gettommys.com"},{"businessId":165108683447552,"location":"Mesa, AZ","businessSMSPhoneNumber":"(480) 374-4400","address":null,"name":"Tommy’s Phoenix","countryCode":"US","zipcode":"85210","address1":"33 W Broadway Rd","address2":null,"chatEnabled":true,"city":"Mesa","state":"AZ","locationName":"Tommy’s Phoenix","businessAlias":"Phoenix","businessName":"Tommy’s Phoenix","primaryName":"Phoenix","secondaryName":null,"shortBusinessId":910287,"latitude":33.407192,"longitude":-111.83227,"phone":"(480) 374-4400","emailId":"infopx@gettommys.com"},{"businessId":167605141171204,"location":"Rancho Cordova, CA","businessSMSPhoneNumber":"(916) 635-8755","address":null,"name":"Tommy's Sacramento","countryCode":"US","zipcode":"95742","address1":"11361 Folsom Blvd","address2":null,"chatEnabled":true,"city":"Rancho Cordova","state":"CA","locationName":"Tommy's Sacramento","businessAlias":"Sacramento","businessName":"Tommy's Sacramento","primaryName":"Sacramento ","secondaryName":null,"shortBusinessId":1054577,"latitude":38.612724,"longitude":-121.256485,"phone":"(916) 635-8755","emailId":"infosc@gettommys.com"},{"businessId":167605139690598,"location":"Stockton, CA","businessSMSPhoneNumber":"(209) 465-5801","address":null,"name":"Tommy's Stockton","countryCode":"US","zipcode":"95203","address1":"1325 W Fremont St","address2":null,"chatEnabled":true,"city":"Stockton","state":"CA","locationName":"Tommy's Stockton","businessAlias":"Stockton","businessName":"Tommy's Stockton","primaryName":"Stockton","secondaryName":null,"shortBusinessId":1054575,"latitude":37.95477,"longitude":-121.310295,"phone":"(209) 465-5801","emailId":"infost@gettommys.com"},{"businessId":165108687030786,"location":"Ventura, CA","businessSMSPhoneNumber":"(805) 360-4714","address":null,"name":"Tommy's Ventura","countryCode":"US","zipcode":"93001","address1":"935 E Front St","address2":null,"chatEnabled":true,"city":"Ventura","state":"CA","locationName":"Tommy's Ventura","businessAlias":"Ventura","businessName":"Tommy's Ventura","primaryName":"Ventura","secondaryName":null,"shortBusinessId":910290,"latitude":34.27739299,"longitude":-119.286644,"phone":"(805) 223-7852","emailId":"infoca@gettommys.com"},{"businessId":165108676328015,"location":"Walloon Lake, MI","businessSMSPhoneNumber":"(231) 535-6039","address":null,"name":"Tommy's Walloon","countryCode":"US","zipcode":"49796","address1":"4075 M-75","address2":null,"chatEnabled":true,"city":"Walloon Lake","state":"MI","locationName":"Tommy's Walloon","businessAlias":"Walloon","businessName":"Tommy's Walloon","primaryName":"Walloon","secondaryName":null,"shortBusinessId":910283,"latitude":45.2636,"longitude":-84.93342,"phone":"(231) 535-6039","emailId":"infowl@gettommys.com"},{"businessId":165108679545960,"location":"Waterford Twp, MI","businessSMSPhoneNumber":"(248) 674-8800","address":null,"name":"Tommy's of Detroit","countryCode":"US","zipcode":"48328","address1":"495 Summit Dr","address2":null,"chatEnabled":true,"city":"Waterford Twp","state":"MI","locationName":"Tommy's of Detroit","businessAlias":"Detroit","businessName":"Tommy's of Detroit","primaryName":"Detroit","secondaryName":null,"shortBusinessId":910285,"latitude":42.647633,"longitude":-83.33486999,"phone":"(248) 674-8800","emailId":"infodt@gettommys.com"}],"chatBubble":"Have a question? We are here to help!","enableChatBubble":1,"enableChatBubbleSound":1,"chatIconColor":"#000000","chatIconForeColor":"#0499d0","widgetConfigId":77382,"supportedCountryCodes":["US","PR","VI","MX","CA"],"businessName":"Tommy's","enabled":1,"isLiveChatEnabled":false,"isChatbotEnabled":true,"teams":[{"teamId":2802,"name":"Service","count":null,"isWebchatSelected":null},{"teamId":2799,"name":"Sales","count":null,"isWebchatSelected":null},{"teamId":2800,"name":"Rentals","count":null,"isWebchatSelected":null},{"teamId":2801,"name":"Pro Shop","count":null,"isWebchatSelected":null}],"enableGoogleAnalytics":false,"googleAnalyticsVersion":"","googleTrackingId":"","webChatOfflineClosingMessageHeader":"Bummer we're closed, but we'll be in touch!","webChatOfflineClosingMessageBody":"We will reach out when we are open. You can always text or call us at [Business Texting Number]. ","liveChatOfflineClosingMessageHeader":"Text us!","liveChatOfflineClosingMessageBody":"The best way to get ahold of us is to text us [Business Texting Number].","liveChatOnlineClosingMessageHeader":"Text us!","liveChatOnlineClosingMessageBody":"The best way to get ahold of us is to text us [Business Texting Number].","liveChatOfflineWelcomeMessage":"We're closed right now but we got your message. We'll text you on your number when we're back!","liveChatOnlineWelcomeMessage":"Give us a moment while we look for someone available to help you.","installed":1,"websites":["file%3A//","https%3A//www.gettommys.com","https%3A//www.tommysboats.com","https%3A//www.tommyscolorado.com","https%3A//www.tommysflorida.com","https%3A//www.tommysgrandrapids.com","https%3A//www.tommysofdetroit.com","https%3A//www.tommyswalloon.com"],"statusUpdateOn":1717038072000,"emailMandatory":false,"disclaimer":"By sending this message, you expressly consent to receive communications from us. You may opt out at any time.","autoDetectLocationEnabled":true,"accountType":1,"livechatTimeout":60,"businessOpen":false};
    var locale = "en";
    