function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
// 生成组件的value变量
export var genComponentValueVariable = function genComponentValueVariable(componentId, value) {
  if (!value || !componentId) return {};
  return _defineProperty({}, componentId, {
    value: value
  });
};

// 生成组件的函数变量
export var genComponentFunctionVariable = function genComponentFunctionVariable(componentId, value) {
  if (!value || !componentId) return {};
  return _defineProperty({}, componentId, {
    functions: value
  });
};
export var isVariableKey = function isVariableKey(key) {
  var reg = /{{([^}]+)}}/;
  return reg.test(key);
};
export var getVariableKey = function getVariableKey(str) {
  var reg = /{{([^}]+)}}/;
  var match = str.match(reg);
  return match === null || match === void 0 ? void 0 : match[1];
};