"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("chroma-js"),r=require("validate-color");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=t(e),n=t(r);exports.findParentBackground=function(e){for(var r=e;r;){var t=getComputedStyle(r).backgroundColor;if(t&&"transparent"!==t&&"rgba(0, 0, 0, 0)"!==t)return t;r=r.parentElement}},exports.getButtonStrokeColor=function(e,r){if(!r)return"#fff";var t=a.default(r),n=Number(a.default(t).alpha());return 0===n||a.default.mix(e||"#414141",t.alpha(1),n).luminance()>.7?"#00000060":"#fff"},exports.getValidColor=function(e){var r=null==e?void 0:e.trim();return r&&n.default(r)?r:null};
