const families = {
  charts: ['图表', 'D3 / d3-sankey / d3-cloud', 'LayoutGrid'],
  type: ['排版', 'opentype.js / Canvas', 'Type'],
  vector: ['矢量', 'DOMPurify / SVGO / Clipper / D3', 'ScanLine'],
  pdf: ['PDF', 'pdf-lib / Canvas', 'FileSearch'],
  motion: ['动画', 'gifuct-js / gifenc / pdf-lib', 'Film'],
  assets: ['素材', 'maxrects-packer / fflate / Canvas', 'Image'],
  creative: ['创作', 'D3 / Canvas / SVG', 'LayoutGrid'],
  data: ['数据', 'D3 / marked / DOMPurify / diff', 'FileSearch'],
  web: ['网页', 'Canvas / CSS / D3', 'Type'],
  image: ['编辑', 'Canvas / culori', 'Image'],
};
const item = (id, name, family, detail, count = 0, extra = {}) => ({ id, name, family, detail, count, category: families[family][0], core: families[family][1], icon: families[family][2], expanded: true, generation: 200, ...extra });
const pdf = { input: 'pdf', inputLabel: 'PDF' };
const svg = { input: 'svg', inputLabel: 'SVG' };
const font = { input: 'font', inputLabel: '字体', extensions: ['ttf', 'otf', 'woff'], accept: '.ttf,.otf,.woff' };
const gif = { input: 'gif', inputLabel: 'GIF' };
export const expansion200 = [
  item('chart-bar', '柱状图', 'charts', '分组数据 · 横向 / 纵向 · SVG'),
  item('chart-line', '折线图', 'charts', '多序列 · 坐标轴 · 数据点'),
  item('chart-area', '堆叠面积图', 'charts', '多组趋势 · 累计数值'),
  item('chart-pie', '饼图与环图', 'charts', '占比 · 标签 · 空心比例'),
  item('chart-scatter', '散点与气泡图', 'charts', 'XY坐标 · 大小映射'),
  item('chart-histogram', '数值分布图', 'charts', '自动分箱 · 频率统计'),
  item('chart-heatmap', '矩阵热力图', 'charts', '行列数据 · 连续色标'),
  item('chart-radar', '雷达图', 'charts', '多项指标 · 多组对照'),
  item('chart-boxplot', '箱线图', 'charts', '四分位数 · 须线 · 离群点'),
  item('chart-sankey', '桑基图', 'charts', '流量关系 · 节点与连线'),
  item('chart-treemap', '矩形树图', 'charts', '层级占比 · 矩形布局'),
  item('chart-sunburst', '旭日图', 'charts', '层级结构 · 环形分区'),
  item('chart-gantt', '甘特图', 'charts', '任务日期 · 时间轴'),
  item('chart-wordcloud', '词云', 'charts', '词频 · 碰撞避让 · SVG'),
  item('font-inspect', '字体信息', 'type', '名称 / 许可 / 字形 · JSON', 1, font),
  item('font-specimen', '字体样张', 'type', '上传字体 · 多字号样张', 1, font),
  item('text-metrics', '文字排版测量', 'type', '行宽 / 字距 / 换行 · 测量表'),
  item('type-scale', '字号阶梯', 'type', '比例字号 · CSS变量 / 样张'),
  item('fluid-type', '响应式字号', 'type', '视口区间 · CSS clamp'),
  item('font-pair', '字体搭配对照', 'type', '两份字体 · 标题与正文比较', 2, font),
  item('text-path', '沿路径排字', 'type', '曲线路径 · 字距 · SVG'),
  item('text-outline', '文字转路径', 'type', '字体字形 · 无字体依赖SVG', 1, font),
  item('font-subset', '字体子集', 'type', '选定字符 · 独立OTF', 1, font),
  item('unicode-inspect', '字符检查', 'type', '码点 / 字素 · 隐形字符'),
  item('svg-viewbox', 'SVG画布调整', 'vector', '边界 / 留白 · 画布尺寸', 1, svg),
  item('svg-colors', 'SVG配色提取', 'vector', '填充 / 描边 / 渐变色统计', 1, svg),
  item('svg-recolor', 'SVG颜色替换', 'vector', '颜色映射 · 保留矢量结构', 1, svg),
  item('svg-transform', 'SVG矩阵变换', 'vector', '缩放 / 平移 / 斜切', 1, svg),
  item('svg-background', 'SVG网页背景', 'vector', '安全矢量 · CSS背景与示例', 1, svg),
  item('svg-accessibility', 'SVG无障碍说明', 'vector', '标题 / 描述 / 装饰图标', 1, svg),
  item('svg-optimize', 'SVG体积优化', 'vector', '安全清理 · SVGO · 大小对比', 1, svg),
  item('bezier-editor', '贝塞尔路径', 'vector', '控制点 · 曲线 / 切线'),
  item('path-morph', '路径形变帧', 'vector', '两条路径 · 重采样 · SVG序列'),
  item('polygon-boolean', '多边形布尔运算', 'vector', '并集 / 交集 / 差集'),
  item('stroke-outline', '线条转轮廓', 'vector', '折线宽度 · 端点 / 连接样式'),
  item('point-diagram', '点集几何图', 'vector', '凸包 / 三角网 / Voronoi'),
  item('polyline-simplify', '折线简化', 'vector', '误差容限 · 顶点压缩'),
  item('polygon-round', '多边形圆角', 'vector', '顶点切角 · 二次曲线路径'),
  item('pdf-split-all', 'PDF逐页拆包', 'pdf', '每页独立PDF · ZIP', 1, pdf),
  item('pdf-booklet', 'PDF骑马订拼版', 'pdf', '页序重排 · 双面书册', 1, pdf),
  item('pdf-nup', 'PDF多合一排版', 'pdf', '行列缩排 · 页面顺序', 1, pdf),
  item('pdf-number', 'PDF添加页码', 'pdf', '起始编号 · 页脚位置', 1, pdf),
  item('pdf-watermark', 'PDF文字水印', 'pdf', '中文水印 · 透明度 / 角度', 1, pdf),
  item('pdf-metadata', 'PDF文档属性', 'pdf', '读取 / 修改 · 属性JSON', 1, pdf),
  item('pdf-page-boxes', 'PDF页面尺寸检查', 'pdf', 'MediaBox / CropBox · 旋转报告', 1, pdf),
  item('pdf-crop', 'PDF裁去页边', 'pdf', '四边裁量 · 可见区域', 1, pdf),
  item('pdf-blank', '空白PDF', 'pdf', '自定纸张 · 页数'),
  item('pdf-interleave', 'PDF交错合并', 'pdf', '两份文件 · 逐页交替', 2, pdf),
  item('pdf-overlay', 'PDF页面叠印', 'pdf', '底稿与覆盖页 · 透明度', 2, pdf),
  item('pdf-poster', 'PDF海报分块', 'pdf', '大页切块 · 重叠边', 1, pdf),
  item('gif-editor', 'GIF时间编辑', 'motion', '裁帧 / 速度 / 反向 / 循环', 1, gif),
  item('gif-sprite', 'GIF帧图集', 'motion', '合成帧 · 图集 / 坐标与延时', 1, gif),
  item('gif-compare', 'GIF动画对比', 'motion', '时间对齐 · 差异帧与统计', 2, gif),
  item('animation-crossfade', '双图渐变动画', 'motion', '淡入淡出 · 帧数 / 时长', 2),
  item('animation-path', '图片轨迹动画', 'motion', '路径运动 · 透明背景合成', 1),
  item('gif-flipbook', 'GIF翻页册', 'motion', '逐帧PDF · 帧号 / 时间', 1, gif),
  item('svg-animation', 'SVG动画制作', 'motion', '旋转 / 位移 / 缩放 · 声明式动画'),
  item('lottie-inspect', 'Lottie文件检查', 'motion', '图层 / 时长 / 资源引用', 1, { input: 'json', inputLabel: 'Lottie JSON' }),
  item('atlas-pack', '紧凑纹理图集', 'assets', '透明边裁切 · 矩形装箱', 8),
  item('atlas-extract', '坐标图集拆包', 'assets', 'JSON矩形坐标 · PNG帧包', 1),
  item('channel-pack', '纹理通道合并', 'assets', '四张灰度图 · RGBA通道', 4),
  item('normal-check', '法线纹理检查', 'assets', '向量长度 · 异常像素图', 1),
  item('obj-uv', 'OBJ纹理展开图', 'assets', 'UV面片 / 接缝 · SVG', 1, { input: 'obj', inputLabel: 'OBJ' }),
  item('glb-inspect', 'GLB资源检查', 'assets', '网格 / 材质 / 纹理 · JSON', 1, { input: 'glb', inputLabel: 'GLB' }),
  item('zip-inspect', '素材ZIP检查', 'assets', '文件目录 / 大小 · 筛选提取', 1, { input: 'zip', inputLabel: 'ZIP' }),
  item('image-ascii', '图片字符画', 'assets', '亮度字符 · TXT / PNG', 1),
  item('maze-art', '迷宫绘图', 'creative', '可复现迷宫 · 路径解答'),
  item('parametric-art', '参数曲线绘图', 'creative', '玫瑰线 / 李萨如 / 旋轮线'),
  item('fractal-art', '分形绘图', 'creative', 'Mandelbrot / Julia · 范围与迭代'),
  item('lsystem-art', 'L系统绘图', 'creative', '替换规则 · 分支 / 角度'),
  item('contour-art', '等值线绘图', 'creative', '数值网格 · 等值区与线'),
  item('package-net', '纸盒展开图', 'creative', '长宽高 · 折线 / 粘贴边'),
  item('jigsaw-template', '拼图刀模', 'creative', '行列 · 可复现咬合曲线'),
  item('low-poly', '低多边形图片', 'creative', '三角剖分 · 采样颜色', 1),
  item('table-image', '表格转图片', 'data', 'CSV表格 · PNG / SVG'),
  item('csv-json', 'CSV与JSON互转', 'data', '列名 / 引号 / Unicode'),
  item('table-transform', '表格行列转换', 'data', '转置 / 翻转 · CSV'),
  item('markdown-table', 'Markdown表格', 'data', 'CSV输入 · 对齐与转义'),
  item('data-clean', '表格数据整理', 'data', '空白 / 重复 / 排序 · 变更统计'),
  item('text-diff', '文本差异', 'data', '逐行差异 · 补丁 / 可视对照'),
  item('markdown-export', 'Markdown静态文档', 'data', '安全HTML · 本地离线文档'),
  item('html-text', 'HTML提取正文', 'data', '移除脚本 · 文字 / 链接清单'),
  item('json-tree', 'JSON结构图', 'data', '层级节点 · SVG / 路径表'),
  item('timeline-chart', '事件时间线', 'data', '日期与说明 · 可视时间轴'),
  item('grid-layout', 'CSS网格布局', 'web', '列宽 / 行距 · HTML与CSS'),
  item('flex-layout', 'Flex布局预览', 'web', '方向 / 对齐 / 间距 · 示例'),
  item('responsive-image', '响应式图片包', 'web', '多宽度图片 · srcset示例', 1),
  item('token-audit', '设计变量检查', 'web', '类型 / 引用 / 循环依赖'),
  item('css-units', 'CSS长度换算', 'web', 'px / rem / em / vw / vh'),
  item('svg-filter', 'SVG滤镜构建', 'web', '模糊 / 阴影 / 颜色矩阵'),
  item('image-map', '图片热点区域', 'web', '矩形链接 · HTML图像映射', 1),
  item('shape-outside', '图片绕排轮廓', 'web', 'Alpha轮廓 · CSS shape-outside', 1),
  item('perspective-correct', '图片透视校正', 'image', '四角映射 · 双线性采样', 1),
  item('image-annotate', '图片图形标注', 'image', '矩形 / 箭头 / 文字', 1),
  item('image-magnifier', '局部放大标注', 'image', '选区放大 · 引线与外框', 1),
  item('image-ruler', '图片刻度标尺', 'image', '像素校准 · 横纵刻度', 1),
  item('image-anaglyph', '红青立体合成', 'image', '左右视图 · 通道合成', 2),
  item('texture-seam', '纹理接缝检查', 'image', '重复平铺 · 两侧像素差', 1),
  item('color-transfer', '图片色彩匹配', 'image', '参考图RGB均值 / 方差匹配', 2),
  item('connected-regions', '连通区域检测', 'image', '阈值分区 · 包围框 / 面积', 1),
];