const a = "SEMAPHOR_CALCULATED_FIELD";
function e(Y) {
  return (Y == null ? void 0 : Y.sourceField) || (Y == null ? void 0 : Y.name) || "";
}
const D = [
  // Day granularity formats
  "MM-DD-YYYY",
  "YYYY-MM-DD",
  "MM/DD/YYYY",
  "DD/MM/YYYY",
  "MMMM DD, YYYY",
  "MMM DD, YYYY",
  "DD MMM YYYY",
  "YYYY-MM-DD HH:mm",
  "YYYY-MM-DD HH:mm:ss",
  "YYYY-MM-DD HH:mm Z",
  "YYYY-MM-DD HH:mm:ss Z",
  // Week granularity formats
  "Week of MMM DD, YYYY",
  "Week of MMMM DD, YYYY",
  "YYYY-WW",
  // Month granularity formats
  "MMM YYYY",
  "MMMM YYYY",
  "YYYY-MM",
  "MM/YYYY",
  "YYYY MMM",
  // Quarter granularity formats
  "Q1 YYYY",
  "YYYY Q1",
  "1st Quarter YYYY",
  "YYYY-Q1",
  "Quarter 1, YYYY",
  // Year granularity formats
  "YYYY",
  "YY",
  // Custom format
  "custom"
];
function r(Y) {
  return Y.role === "metric" && "expression" in Y && !!Y.expression;
}
function u(Y) {
  return !!Y.expression;
}
function o(Y) {
  return !!Y.expression;
}
function _(Y) {
  var n, s;
  const M = Y;
  return !!(M != null && M.expression && ((s = (n = M.calculatedFormula) == null ? void 0 : n.inputFields) != null && s.length));
}
function c(Y) {
  return !!(Y && (Y.entityName === a || Y.entityId === a));
}
var t = /* @__PURE__ */ ((Y) => (Y.SUBTOTAL = "__SUBTOTAL__", Y.TOTAL = "__TOTAL__", Y.ALL = "__ALL__", Y))(t || {});
const L = {
  database: null,
  schema: null,
  table: null
}, A = "__card_default__";
export {
  A as C,
  D,
  L as E,
  t as P,
  a,
  u as b,
  o as c,
  c as d,
  e as g,
  _ as h,
  r as i
};
