"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.components = exports.componentList = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _meta = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/accordion-selector/meta"));
var _meta2 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/address-list/meta"));
var _meta3 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/bread-crumb/meta"));
var _meta4 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/button2/meta"));
var _meta5 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/collapse-selector-item/meta"));
var _meta6 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/collapse-selector/meta"));
var _meta7 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/collapse/meta"));
var _meta8 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/custom-drawer/meta"));
var _meta9 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/custom-form/meta"));
var _meta0 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/custom-radio-group-item/meta"));
var _meta1 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/custom-radio-group/meta"));
var _meta10 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/custom-select/meta"));
var _meta11 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/d-c-slider/meta"));
var _meta12 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/drawer/meta"));
var _meta13 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/form/meta"));
var _meta14 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/goods-card-list-common/meta"));
var _meta15 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/goods-card-list/meta"));
var _meta16 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/grid-nav/meta"));
var _meta17 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/image/meta"));
var _meta18 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/input/meta"));
var _meta19 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/integral-task/meta"));
var _meta20 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/item/meta"));
var _meta21 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/member-card/meta"));
var _meta22 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/menu-list/meta"));
var _meta23 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/message-list/meta"));
var _meta24 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/navigation/meta"));
var _meta25 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/notice-bar/meta"));
var _meta26 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/position/meta"));
var _meta27 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/profile/meta"));
var _meta28 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/rating/meta"));
var _meta29 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/review-list/meta"));
var _meta30 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/rich-text/meta"));
var _meta31 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/search-bar/meta"));
var _meta32 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/search-history-list/meta"));
var _meta33 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/shopping-cart/meta"));
var _meta34 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/stream-list/meta"));
var _meta35 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/swiper/meta"));
var _meta36 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/switch/meta"));
var _meta37 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/tab-container-item/meta"));
var _meta38 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/tab-container/meta"));
var _meta39 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/tab-message/meta"));
var _meta40 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/tag-c/meta"));
var _meta41 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/teletext-list/meta"));
var _meta42 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/text-description-detail-list/meta"));
var _meta43 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/title1/meta"));
var _meta44 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/title2/meta"));
var _meta45 = _interopRequireDefault(require("E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/user-card/meta"));
var componentCategorySort = {};
["基础元素", "布局容器类", "表格类", "表单详情类", "帮助类", "对话框类", "业务类", "通用", "引导", "信息输入", "信息展示", "信息反馈"].reverse().forEach(function (item, index) {
  componentCategorySort[item] = ++index;
});
function generateComponentList(components) {
  var componentList = [{
    title: '常用',
    icon: '',
    children: []
  }, {
    title: '容器',
    icon: '',
    children: []
  }, {
    title: '导航',
    icon: '',
    children: []
  }, {
    title: '内容',
    icon: '',
    children: []
  }, {
    title: 'Feedback 反馈',
    icon: '',
    children: []
  }];
  var groupMap = {
    原子组件: true
  };
  var compGroup = {};
  components.forEach(function (comp) {
    var category = comp.category || '其他';
    if (comp.group && !compGroup[comp.componentName]) {
      compGroup[comp.componentName] = comp.group;
    }
    if (comp.group && !groupMap[comp.group]) {
      groupMap[comp.group] = true;
    }
    var target = componentList.find(function (item) {
      return item.title === category;
    });
    if (!target) {
      target = {
        title: category,
        icon: '',
        children: []
      };
      componentList.push(target);
    }
    if (comp.snippets && comp.snippets.length) {
      target.children.push({
        componentName: comp.componentName,
        title: comp.title || comp.componentName,
        sort: {
          category: target.title,
          group: compGroup[comp.componentName] || '原子组件',
          priority: componentCategorySort[target.title] || 0
        },
        icon: '',
        "package": comp.npm.pkg,
        snippets: comp.snippets || []
      });
    }
  });
  return componentList;
}
function fillRealVersion(meta, packageName, version, basicLibraryVersion) {
  if (packageName === void 0) {
    packageName = '@dckj-npm/dc-material';
  }
  if (version === void 0) {
    version = '0.1.381';
  }
  if (basicLibraryVersion === void 0) {
    basicLibraryVersion = {
      "@alifd/next": "1.25.23",
      "@alifd/meet": "2.6.3",
      "antd": "4.17.3"
    };
  }
  if (!meta || !version) {
    return meta;
  }
  var npm = meta.npm;
  if (!npm) {
    return meta;
  }
  if (typeof basicLibraryVersion === 'object' && basicLibraryVersion[npm["package"]]) {
    meta.npm = (0, _extends2["default"])({}, npm, {
      version: basicLibraryVersion[npm["package"]]
    });
  } else if (npm["package"] === packageName) {
    meta.npm = (0, _extends2["default"])({}, npm, {
      version: version
    });
  }
  return meta;
}
var componentMetas = [_meta["default"], _meta2["default"], _meta3["default"], _meta4["default"], _meta5["default"], _meta6["default"], _meta7["default"], _meta8["default"], _meta9["default"], _meta0["default"], _meta1["default"], _meta10["default"], _meta11["default"], _meta12["default"], _meta13["default"], _meta14["default"], _meta15["default"], _meta16["default"], _meta17["default"], _meta18["default"], _meta19["default"], _meta20["default"], _meta21["default"], _meta22["default"], _meta23["default"], _meta24["default"], _meta25["default"], _meta26["default"], _meta27["default"], _meta28["default"], _meta29["default"], _meta30["default"], _meta31["default"], _meta32["default"], _meta33["default"], _meta34["default"], _meta35["default"], _meta36["default"], _meta37["default"], _meta38["default"], _meta39["default"], _meta40["default"], _meta41["default"], _meta42["default"], _meta43["default"], _meta44["default"], _meta45["default"]];
var components = exports.components = [];
var npmInfo = {};
componentMetas.forEach(function (meta) {
  if (Array.isArray(meta)) {
    components.push.apply(components, meta.map(function (item) {
      if (!item.npm) {
        var componentName = item.componentName;
        var names = componentName.split('.');
        var exportName = names[0],
          subName = names[1];
        item.npm = {
          exportName: exportName,
          main: '',
          destructuring: true,
          subName: names.length > 1 ? componentName.slice(componentName.indexOf('.') + 1) : subName
        };
      }
      item.npm = (0, _extends2["default"])({}, npmInfo, item.npm || {});
      return fillRealVersion(item);
    }));
  } else if (meta.components) {
    components.push.apply(components, meta.components.map(function (item) {
      if (!item.npm) {
        var componentName = item.componentName;
        var names = componentName.split('.');
        var exportName = names[0],
          subName = names[1];
        item.npm = {
          exportName: exportName,
          main: '',
          destructuring: true,
          subName: names.length > 1 ? componentName.slice(componentName.indexOf('.') + 1) : subName
        };
      }
      item.npm = (0, _extends2["default"])({}, npmInfo, item.npm || {});
      return fillRealVersion(item);
    }));
  } else {
    if (!meta.npm) {
      var componentName = meta.componentName;
      var names = componentName.split('.');
      var exportName = names[0],
        subName = names[1];
      meta.npm = {
        exportName: exportName,
        main: '',
        destructuring: true,
        subName: names.length > 1 ? componentName.slice(componentName.indexOf('.') + 1) : subName
      };
    }
    meta.npm = (0, _extends2["default"])({}, npmInfo, meta.npm || {});
    components.push(fillRealVersion(meta));
  }
});
var componentList = exports.componentList = generateComponentList(components);
var execCompile = !!true;
if (!execCompile) {
  window.DckjNpmDcMaterialMeta = {
    components: components,
    componentList: componentList
  };
}