# Path: lib/utils/debounce.py
# def debounce(fn, delay=DEFAULT_DEBOUNCE_DELAY, uid=None, *args):
#     uid = uid if uid else fn
# 
#     if uid in debounced_timers:
#         debounced_timers[uid].cancel()
# 
#     timer = threading.Timer(delay, fn, args)
#     timer.start()
# 
#     debounced_timers[uid] = timer


import sublime
from ..utils.debounce import debounce
    messages =[]

    def show(self, message, hide=False, with_panel=True):
        self.messages = []
        self.messages.append(message)

        if with_panel:
            window = sublime.active_window()
            window.run_command("hide_overlay")
            window.show_quick_panel(self.messages, self.hide)
        sublime.status_message(message)

        if hide:
            debounce(self.hide, 1, 'message' + str(id(MESSAGE)))


    def repeat(self, message, with_panel=True):
        self.messages = []
        self.messages.append(message)


        if with_panel:
            window = sublime.active_window()
            window.run_command("hide_overlay")
            window.show_quick_panel(self.messages, self.hide)

        sublime.status_message(message)


    def hide(self,index=None):

# Path: lib/utils/debounce.py
# def debounce(fn, delay=DEFAULT_DEBOUNCE_DELAY, uid=None, *args):
#     uid = uid if uid else fn
# 
#     if uid in debounced_timers:
#         debounced_timers[uid].cancel()
# 
#     timer = threading.Timer(delay, fn, args)
#     timer.start()
# 
#     debounced_timers[uid] = timer


# Path: lib/display/Message.py
import sublime
from ..utils.debounce import debounce

    messages =[]

    def show(self, message, hide=False, with_panel=True):
        self.messages = []
        self.messages.append(message)

        if with_panel:
            window = sublime.active_window()
            window.run_command("hide_overlay")
            window.show_quick_panel(self.messages, self.hide)
        sublime.status_message(message)

        if hide:
            debounce(self.hide, 1, 'message' + str(id(MESSAGE)))


    def repeat(self, message, with_panel=True):
        self.messages = []
        self.messages.append(message)


        if with_panel:
            window = sublime.active_window()
            window.run_command("hide_overlay")
            window.show_quick_panel(self.messages, self.hide)

        sublime.status_message(message)


    def hide(self,index=None):

        sublime.active_window().run_command("hide_overlay")