WZMIAOMIAO / deep-learning-for-image-processing

deep learning for image processing including classification and object-detection etc.
GNU General Public License v3.0
23.29k stars 8.01k forks source link

marrujojazmyne #811

Closed JMARRUJO91 closed 6 months ago

JMARRUJO91 commented 6 months ago
window.q10805AddESTHover = function (strikedPrice) {
    try {
        if (strikedPrice) {
            let toolTipID = (Math.random() + 1).toString(36).substring(7);
            return '<div class="q10805 strike-through-price">' +
                '    <span class="web-price-label" data-tkey="est.value">Est Value</span>' +
                '    <span class="tool-tip" tabindex="0" role="button" aria-label="tool tip" aria-haspopup="true" data-ready="true">' +
                '        <svg data-name="icon/tool-tip" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14">' +
                '            <clipPath id="' + toolTipID + '">' +
                '                <path' +
                '                    d="M6.3-9.5H7.7v-4.2H6.3v4.2ZM7-20a7.021,7.021,0,0,0-7,7A7.021,7.021,0,0,0,7-6a7.021,7.021,0,0,0,7-7,7.021,7.021,0,0,0-7-7ZM7-7.4A5.616,5.616,0,0,1,1.4-13,5.616,5.616,0,0,1,7-18.6,5.616,5.616,0,0,1,12.6-13,5.616,5.616,0,0,1,7-7.4Zm-.7-7.7H7.7v-1.4H6.3v1.4Z"' +
                '                    transform="translate(0 20)"></path>' +
                '            </clipPath>' +
                '            <g clip-path="url(#' + toolTipID + ')">' +
                '                <rect width="100%" height="100%"></rect>' +
                '            </g>' +
                '        </svg>' +
                '        <div class="popup" aria-hidden="true" style="">' +
                '            <div class="bubble">' +
                '                <section class="stp-title" data-tkey="est.value.title">Est Value (Estimated Value)</section>' +
                '                <section class="stp-des" data-tkey="est.value.des">Estimated value is Lenovo’s estimate of product value based on industry data, including the prices at which Lenovo and/or third-party retailers and e-tailers have offered or valued the same or comparable products. Third-party data may not be based on actual sales.</section>' +
                '            </div>' +
                '        </div>' +
                '    </span>' +
                '    <span class="price" aria-hidden="true">' + strikedPrice + '</span>' +
                '</div>';
        } else {
            return '<div class="q10805 strike-through-price">' +
                '    <span class="price" aria-hidden="true"></span>' +
                '</div>';
        }
    } catch (error) {
        console.log("10805 Template Error", error)
    }

}
window.q10805AddPopuptoToolTip = function () {
    try {
        $(".q10805.strike-through-price .tool-tip").on("mouseover click", function (eve) {
            //stuff to do on mouseover
            eve.preventDefault();
            eve.stopPropagation();
            n = 16 * Math.sqrt(2) / 2
            const e = $(this)
                , a = $(e).parents()
                , i = $(e).find(".popup")
                , c = $(e).width()
                , l = $(e).offset().left
                , d = $(e).offset().top;
            let u = c / 2 + 7
                , h = $(window).scrollTop()
                , p = $(window).scrollLeft()
                , s = true;
            if (s ? i.css({
                position: "fixed",
                top: e.height() + n + 1 + d - h,
                left: u + l - p
            }) : i.css({
                top: e.height() + n + 1,
                left: u
            }), a.length) {
                let t = 0
                    , n = innerWidth;
                const r = e.find(".bubble")
                    , o = i.outerWidth() / 2
                    , s = o - (l + u - t)
                    , d = o - (n - l - u);
                s > 3 ? r.css("transform", "translateX(".concat(Math.min(s + 3, o - c - 2), "px)")) : d > 3 && r.css("transform", "translateX(-".concat(Math.min(d + 3, o - c - 2), "px)"))
            }
            e.addClass("tool-tip-hover");
            i.attr("aria-hidden", !1)
        }).on("blur mouseout focusout", t => {
            const e = $(t.currentTarget);
            e.removeClass("tool-tip-hover"),
                e.find(".popup").css({
                    top: "",
                    left: ""
                }).attr("aria-hidden", !0)
        }
        )
        var isMobile1 = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
        if (!isMobile1) {
            $(window).scroll(function () {
                if ($('.q10805 .tool-tip.tool-tip-hover').length > 0) {
                    $('.q10805 .tool-tip.tool-tip-hover').removeClass("tool-tip-hover")
                }
            })
        }
    } catch (error) {
        console.log("10805 Event Listener Error", error)
    }

}

//Functions to add/fetch/delete custom tracking code in cookies
var Q10805_spath = $('meta[name="siteRoot"]').attr('content');
window.adobeTargetExp = "";
window.targetSetCookie = function(cName, cValue, expDays) {
    document.cookie = cName + "=" + cValue + ";path=" + Q10805_spath;
}
window.targetGetCookie = function(cName) {
    const name = cName + "=";
    const cDecoded = decodeURIComponent(document.cookie); //to be careful
    const cArr = cDecoded .split('; ');
    let res;
    cArr.forEach(val => {
        if (val.indexOf(name) === 0) res = val.substring(name.length);
    })
    return res;
}
window.targetRemoveItem = function(sKey) {
    document.cookie = encodeURIComponent(sKey) + 
                "=; expires=Thu, 01 Jan 1970 00:00:00 GMT" + 
                (Q10805_spath ? "; path=" + Q10805_spath : "");
}
//targetRemoveItem("adobe_target_exp");
//# sourceURL=Q10805supportingActivityv1.js