this.primevue = this.primevue || {};
this.primevue.themes = this.primevue.themes || {};
this.primevue.themes.helpers = this.primevue.themes.helpers || {};
this.primevue.themes.helpers.color = (function (exports) {
    'use strict';

    function normalizeColor(color) {
      if (color.length === 4) {
        color = "#".concat(color[1]).concat(color[1]).concat(color[2]).concat(color[2]).concat(color[3]).concat(color[3]);
      }
      return color;
    }
    function hexToRgb(hex) {
      var bigint = parseInt(hex.substring(1), 16);
      var r = bigint >> 16 & 255;
      var g = bigint >> 8 & 255;
      var b = bigint & 255;
      return {
        r: r,
        g: g,
        b: b
      };
    }
    function rgbToHex(r, g, b) {
      return "#".concat(r.toString(16).padStart(2, '0')).concat(g.toString(16).padStart(2, '0')).concat(b.toString(16).padStart(2, '0'));
    }
    var mix = (function (color1, color2, weight) {
      color1 = normalizeColor(color1);
      color2 = normalizeColor(color2);
      var p = weight / 100;
      var w = p * 2 - 1;
      var w1 = (w + 1) / 2.0;
      var w2 = 1 - w1;
      var rgb1 = hexToRgb(color1);
      var rgb2 = hexToRgb(color2);
      var r = Math.round(rgb1.r * w1 + rgb2.r * w2);
      var g = Math.round(rgb1.g * w1 + rgb2.g * w2);
      var b = Math.round(rgb1.b * w1 + rgb2.b * w2);
      return rgbToHex(r, g, b);
    });

    var shade = (function (color, percent) {
      return mix('#000000', color, percent);
    });

    var tint = (function (color, percent) {
      return mix('#ffffff', color, percent);
    });

    var scales = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
    var palette = (function (color) {
      if (/{([^}]*)}/g.test(color)) {
        var token = color.replace(/{|}/g, '');
        return scales.reduce(function (acc, scale) {
          return acc[scale] = "{".concat(token, ".").concat(scale, "}"), acc;
        }, {});
      }
      return typeof color === 'string' ? scales.reduce(function (acc, scale, i) {
        return acc[scale] = i <= 5 ? tint(color, (5 - i) * 19) : shade(color, (i - 5) * 15), acc;
      }, {}) : color;
    });

    exports.mix = mix;
    exports.palette = palette;
    exports.shade = shade;
    exports.tint = tint;

    Object.defineProperty(exports, '__esModule', { value: true });

    return exports;

})({});
