<commit_before>local R, L, P, G = unpack(select(2, ...)) --Import: Engine, Locales, ProfileDB, GlobalDB
local AL = R:GetModule("Alerts")
local S = R:GetModule("Skins")

--Cache global variables
--Lua functions
--WoW API / Variables
local CreateFrame = CreateFrame

function AL:SkinToast(toast, toastType)
    local r, g, b = toast.Border:GetVertexColor()
    -- toast.BG:Kill()
    toast.Border:Kill()
    toast.Icon:SetTexCoord(.08, .92, .08, .92)
    if toast.IconBorder then toast.IconBorder:Kill() end

    if not toast.bg then
        toast.bg = CreateFrame("Frame", nil, toast)
        toast.bg:SetOutside(toast.BG, 1, 1)

        S:CreateBD(toast.bg)
    end

    toast.bg:SetFrameLevel(0)
    toast.BG:SetParent(toast.bg)
    toast.BG:SetDrawLayer("BACKGROUND", 0)
    toast.BG:SetBlendMode("ADD")

    if toastType == "item" then
        if not toast.Icon.b then
            toast.Icon.b = CreateFrame("Frame", nil, toast)
            S:CreateBD(toast.Icon.b)
            toast.Icon.b:SetOutside(toast.Icon)
            toast.Icon.b:SetFrameLevel(toast:GetFrameLevel() - 1)
        end
        toast.Icon.b:SetBackdropBorderColor(r, g, b)
    end
end<commit_msg>update alert skin<commit_after>local R, L, P, G = unpack(select(2, ...)) --Import: Engine, Locales, ProfileDB, GlobalDB
local AL = R:GetModule("Alerts")
local S = R:GetModule("Skins")

--Cache global variables
--Lua functions
--WoW API / Variables
local CreateFrame = CreateFrame

function AL:SkinToast(toast, toastType)
    local r, g, b = toast.Border:GetVertexColor()
    -- toast.BG:Kill()
    toast.Border:Kill()
    toast.Icon:SetTexCoord(.08, .92, .08, .92)
    if toast.IconBorder then toast.IconBorder:Kill() end

    if not toast.bg then
        toast.bg = CreateFrame("Frame", nil, toast)
        toast.bg:SetOutside(toast.BG, 1, 1)

        S:CreateBD(toast.bg)
    end

    toast.bg:SetFrameLevel(0)
    toast.BG:SetParent(toast.bg)
    toast.BG:SetDrawLayer("BACKGROUND", 0)
    toast.BG:SetBlendMode("ADD")

    if toastType == "item" then
        if not toast.Icon.b then
            toast.Icon.b = CreateFrame("Frame", nil, toast)
            toast.Icon.b:SetTemplate()
            toast.Icon.b:SetBackdropColor(0, 0, 0, 1)
            toast.Icon.b:SetOutside(toast.Icon)
            toast.Icon.b:SetFrameLevel(toast:GetFrameLevel() - 1)
        end
        if r + g + b > 2.9 then
            toast.Icon.b:Hide()
        else
            toast.Icon.b:Show()
            toast.Icon.b:SetBackdropBorderColor(r, g, b)
        end
    end
end
{'fraction_non_alphanumeric': 0.1369212504946577, 'fraction_numerical': 0.013454689354966362, 'mean_word_length': 2.658465991316932, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7244188', 'n_tokens_mistral': 910, 'n_tokens_neox': 891, 'n_words': 189}