(function() { var CONTAINER_ID = 'crank-toast-container'; var nextToastId = 0; function ensureContainer() { var container = document.getElementById(CONTAINER_ID); if (container) return container; container = document.createElement('div'); container.id = CONTAINER_ID; container.className = 'toast-stack'; document.body.appendChild(container); return container; } function dismiss(toast) { if (!toast || !toast.parentNode) return; toast.classList.add('closing'); window.setTimeout(function() { if (toast.parentNode) toast.parentNode.removeChild(toast); }, 180); } function notify(options) { var config = options || {}; var duration = config.duration === 0 ? 0 : (config.duration || 3600); var toast = document.createElement('div'); toast.id = 'toast_' + (++nextToastId); toast.className = 'toast-card toast-' + (config.type || 'info'); toast.innerHTML = '