(function () { "use strict"; function clampByte(value) { return Math.max(0, Math.min(255, Math.round(value))); } function applyCursorTint(root, color) { if (!color) { return; } var r = clampByte(color.r); var g = clampByte(color.g); var b = clampByte(color.b); var svg = '' + ''; var url = 'url("data:image/svg+xml,' + encodeURIComponent(svg) + '") 1 1, default'; root.style.setProperty("--co-cursor", url); } window.applyCoTheme = function (theme) { if (!theme) { return; } var root = document.documentElement; var hud = theme.hud || theme; applyCursorTint(root, hud); if (window.CO_ControllerGlyphs && CO_ControllerGlyphs.onThemeApplied) { CO_ControllerGlyphs.onThemeApplied(); } console.log( "[CO] Applied browser cursor theme rgb(" + clampByte(hud.r) + "," + clampByte(hud.g) + "," + clampByte(hud.b) + ")" ); }; })();