var a = {}, u = function(l, c, t, n) {
  if (typeof document > "u" && !n)
    return null;
  var e = n ? new n() : document.createElement("canvas");
  e.width = t * 2, e.height = t * 2;
  var r = e.getContext("2d");
  return r ? (r.fillStyle = l, r.fillRect(0, 0, e.width, e.height), r.fillStyle = c, r.fillRect(0, 0, t, t), r.translate(t, t), r.fillRect(0, 0, t, t), e.toDataURL()) : null;
}, d = function(l, c, t, n) {
  var e = l + "-" + c + "-" + t + (n ? "-server" : "");
  if (a[e])
    return a[e];
  var r = u(l, c, t, n);
  return a[e] = r, r;
};
export {
  d as get,
  u as render
};
//# sourceMappingURL=checkboard.js.map
