ai-ppt-edit-component 0.0.22 → 0.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/index.mjs CHANGED
@@ -6684,11 +6684,45 @@ var zo = () => {
6684
6684
  }, As = (e) => Ds + ks(new XMLSerializer().serializeToString(e)), js = "/api/proxy", Ms = () => {
6685
6685
  let { slides: e, theme: t, viewportRatio: n, title: i, viewportSize: a } = V(K()), o = r(() => 96 * (a.value / 960)), s = r(() => 96 / 72 * (a.value / 960)), c = C(!1), { t: l } = W(), u = {
6686
6686
  Msyh: "微软雅黑",
6687
- "Microsoft YaHei": "微软雅黑"
6687
+ "Microsoft YaHei": "微软雅黑",
6688
+ "Microsoft YaHei UI": "微软雅黑",
6689
+ SourceHanSans: "微软雅黑",
6690
+ SourceHanSerif: "宋体",
6691
+ FangZhengHeiTi: "黑体",
6692
+ FangZhengKaiTi: "楷体",
6693
+ FangZhengShuSong: "宋体",
6694
+ FangZhengFangSong: "仿宋",
6695
+ AlibabaPuHuiTi: "微软雅黑",
6696
+ ZhuQueFangSong: "仿宋",
6697
+ LXGWWenKai: "楷体",
6698
+ WenDingPLKaiTi: "楷体",
6699
+ DeYiHei: "黑体",
6700
+ MiSans: "微软雅黑",
6701
+ CangerXiaowanzi: "微软雅黑",
6702
+ YousheTitleBlack: "黑体",
6703
+ FengguangMingrui: "黑体",
6704
+ ShetuModernSquare: "黑体",
6705
+ ZcoolHappy: "微软雅黑",
6706
+ ZizhiQuXiMai: "微软雅黑",
6707
+ SucaiJishiKangkang: "微软雅黑",
6708
+ SucaiJishiCoolSquare: "黑体",
6709
+ TuniuRounded: "微软雅黑",
6710
+ RuiziZhenyan: "黑体",
6711
+ "DM-Sans": "Calibri",
6712
+ Arial: "Arial",
6713
+ Calibri: "Calibri",
6714
+ SimSun: "宋体",
6715
+ SimHei: "黑体",
6716
+ FangSong: "仿宋",
6717
+ KaiTi: "楷体"
6688
6718
  }, d = (e) => {
6689
6719
  if (!e || typeof e != "string") return "微软雅黑";
6690
6720
  let t = e.split(",")[0].replace(/^['"]|['"]$/g, "").trim();
6691
- return t ? u[t] || t : "微软雅黑";
6721
+ if (!t) return "微软雅黑";
6722
+ let n = u[t];
6723
+ if (n) return n;
6724
+ let r = t.toLowerCase(), i = Object.keys(u).find((e) => e.toLowerCase() === r);
6725
+ return i ? u[i] : t;
6692
6726
  };
6693
6727
  function f(e) {
6694
6728
  try {
package/lib/index.js CHANGED
@@ -14,7 +14,7 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
14
14
  align-items: center;
15
15
  `,document.body.appendChild(Ne));let r=(0,l.createVNode)(je,n,null),i=document.createElement(`div`);r.appContext=e.ctx||R._context||null,r.props.onClose=e.onClose,r.props.onDestroy=()=>{Ne&&Ne.childNodes.length<=1&&(Ne.remove(),Ne=null),(0,l.render)(null,i)},(0,l.render)(r,i),Ne.appendChild(i.firstElementChild);let a={id:t,close:()=>(r?.component?.exposed)?.close()};return Me.push(a),a};R.success=(e,t)=>R({...t,type:`success`,message:e}),R.info=(e,t)=>R({...t,type:`info`,message:e}),R.warning=(e,t)=>R({...t,type:`warning`,message:e}),R.error=(e,t)=>R({...t,type:`error`,message:e}),R.closeAll=function(){for(let e=Me.length-1;e>=0;e--)Me[e].close()};var Ie=(e,t)=>(0,u.padStart)(``+e,t,`0`),Le=e=>/^(https?:\/\/)([\w-]+\.)+[\w-]{2,}(\/[\w-./?%&=]*)?$/i.test(e),Re=e=>e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase()),ze=e=>typeof e!=`object`||!e?e:Array.isArray(e)?e.map(ze):Object.keys(e).reduce((t,n)=>{let r=Re(n);return t[r]=ze(e[n]),t},{}),Be=e=>e.replace(/([A-Z])/g,`-$1`).toLowerCase(),Ve=e=>typeof e!=`object`||!e?e:Array.isArray(e)?e.map(Ve):Object.keys(e).reduce((t,n)=>{let r=Be(n);return t[r]=Ve(e[n]),t},{}),He={COMMON:{CONFIRM:`确认`,CANCEL:`取消`,DELETE:`删除`,REMOVE:`移除`,INSERT:`插入`,COPY:`复制`,CUT:`剪切`,PASTE:`粘贴`,SELECT_ALL:`全选`,EDIT:`编辑`,CLOSE:`关闭`,APPLY:`应用`,SAVE:`保存`,SEARCH:`查找`,SEARCH_FONT:`搜索字体`,SEARCH_FONT_SIZE:`搜索字号`,REPLACE:`替换`,REPLACE_ALL:`全部替换`,NEXT:`下一个`,PREV:`上一个`,BACK:`返回`,MORE:`更多`,PREVIEW:`预览`,CLEAR:`清空`,SET:`设置`,FORMAT_PAINTER_TIP:`格式刷(双击连续使用)`},EXPORT:{RANGE:`导出范围:`,ALL:`全部`,CURRENT:`当前页`,CUSTOM:`自定义`,CUSTOM_RANGE:`自定义范围:`,FORMAT:`导出格式:`,IMAGE_QUALITY:`图片质量:`,IGNORE_WEBFONT:`忽略在线字体:`,IGNORE_MEDIA:`忽略音频/视频:`,OVERWRITE_MASTER:`覆盖默认母版:`,PER_PAGE_COUNT:`每页数量:`,EDGE_PADDING:`边缘留白:`,BTN_PPTX:`导出 PPTX`,BTN_IMAGE:`导出图片`,BTN_JSON:`导出 JSON`,BTN_PDF:`打印 / 导出 PDF`,BTN_PPTIST:`导出 PPTIST 文件`,IMAGE_FAIL:`导出图片失败`,FAIL:`导出失败`,CLOSE:`关闭`,EXPORTING:`正在导出...`,TIP_MEDIA:`导出时默认忽略音视频,若您的幻灯片中存在音视频元素,且希望将其导出到PPTX文件中,可选择关闭【忽略音视频】选项,但要注意这将会大幅增加导出用时。`,TIP_MEDIA_FORMAT:`提示:1. 支持导出格式:avi、mp4、mov、wmv、mp3、wav;2. 跨域资源无法导出。`,TIP_WEBFONT:`导出时默认忽略在线字体,若您在幻灯片中使用了在线字体,且希望导出后保留相关样式,可选择关闭【忽略在线字体】选项,但要注意这将会增加导出用时。`,TIP_PPTIST:`提示:.pptist 是本应用的特有文件后缀,支持将该类型的文件导入回应用中。`,TIP_PDF:`提示:若打印预览与实际样式不一致,请在弹出的打印窗口中勾选【背景图形】选项。`},EXPORT_TABS:{PPTX:`导出 PPTX`,IMAGE:`导出图片`,JSON:`导出 JSON`,PDF:`打印 / 导出 PDF`,PPTIST:`导出 PPTIST 文件`},SLIDE_THUMBS:{ADD_SLIDE:`添加幻灯片`,PAGE_NUMBER:`幻灯片 {current} / {total}`,SECTION_PLACEHOLDER:`输入节名称`,SECTION_UNTITLED:`无标题节`,SECTION_DEFAULT:`默认节`,SECTION_DELETE:`删除节`,SECTION_DELETE_WITH_SLIDES:`删除节和幻灯片`,SECTION_DELETE_ALL:`删除所有节`,SECTION_RENAME:`重命名节`,SECTION_ADD:`增加节`,PASTE:`粘贴`,SELECT_ALL:`全选`,NEW_SLIDE:`新建页面`,SLIDE_SHOW:`幻灯片放映`,CUT:`剪切`,COPY:`复制`,DUPLICATE_SLIDE:`复制页面`,DELETE_SLIDE:`删除页面`,SLIDE_SHOW_FROM_CURRENT:`从当前放映`},SLIDE_TEMPLATES:{INSERT_ALL:`插入全部`,INSERT_TEMPLATE:`插入模板`,TYPE_ALL:`全部`,TYPE_COVER:`封面`,TYPE_CONTENTS:`目录`,TYPE_TRANSITION:`过渡`,TYPE_CONTENT:`内容`,TYPE_REFERENCE:`引用`,TYPE_END:`结束`},TEMPLATE_LIST:{CMI1:`CMI1`,CMI2:`CMI2`,CMI3:`CMI3`,RED_GENERAL:`红色通用`,BLUE_GENERAL:`蓝色通用`,PURPLE_GENERAL:`紫色通用`,MORANDI:`莫兰迪配色`},COLOR_PICKER:{RECENT_USED:`最近使用`,EYEDROPPER_HINT:`请在画布上点击取色`,EYEDROPPER_INIT_FAIL:`取色失败,请重试`},IMPORT:{FILE_PARSE_FAIL:`无法正确读取/解析该文件`},REQUEST:{UNKNOWN_ERROR:`未知错误`,SERVER_UNKNOWN_ERROR:`服务器异常`,CONNECTION_FAIL:`连接失败`},EDITOR:{GENERATING:`AI 生成中,请耐心等待…`,AIPPT_NO_PPTID:`aippt生成失败,缺少pptId参数`,AIPPT_FETCH_FAIL:`获取AIPPT数据失败`,TEMPLATE_FETCH_FAIL:`获取模板数据失败`},HEADER_BAR:{EXPORT_FILE:`导出文件`,RESET_SLIDES:`重置幻灯片`,MARKUP:`幻灯片类型标注`,HOTKEY:`快捷操作`,SLIDE_SHOW_TOOLTIP:`幻灯片放映(F5)`,SLIDE_SHOW_FROM_START:`从头开始`,SLIDE_SHOW_FROM_CURRENT:`从当前页开始`,EXPORT_TOOLTIP:`导出`,HOTKEY_TITLE:`快捷操作`,AIPPT_DRAWER_TITLE:`渲染 AIPPT`,TEMPLATE_SELECTED:`已选择模板`,TEMPLATE_NOT_SELECTED:`尚未选择`,AIPPT_JSON_LABEL:`AIPPT JSON`,AIPPT_JSON_PLACEHOLDER:`在此粘贴 AIPPT.json 内容(如 {"cover": {...}, "contents":[...], "content":[...], "end":[...]})`,RENDER_AND_LOAD:`渲染并载入`,IMPORTING:`正在导入...`,RENDERING_AIPPT:`正在渲染 AIPPT...`,TEMPLATE_LOADED:`模板已载入,请粘贴 AIPPT JSON`,TEMPLATE_LOAD_FAIL:`模板读取失败:请确认是有效的 JSON`,NEED_TEMPLATE_FILE:`请先选择模板文件`,AIPPT_PARSE_FAIL:`AIPPT JSON 解析失败,请检查格式`,TEMPLATE_SLIDES_MISSING:`模板缺少 slides 字段或为空`,AIPPT_UNKNOWN_TYPES:`以下类型未在当前模板中找到:{unknown};模板支持:{supported}`,AIPPT_UNKNOWN_TYPES_EMPTY:`未探测到`,RENDER_SUCCESS:`渲染完成,已载入到画布`,RENDER_FAIL:`渲染失败:{reason}`,RENDER_FAIL_FALLBACK:`请检查模板类型标注与 AIPPT 结构是否匹配`},QUICK_SEARCH:{SEARCH_PLACEHOLDER:`输入查找内容`,REPLACE_PLACEHOLDER:`输入替换内容`,IGNORE_CASE:`忽略大小写`,PREV:`上一个`,NEXT:`下一个`,NO_MATCH:`未找到匹配结果`,EMPTY_SEARCH:`请输入查找内容`},COMMENT_PANEL:{PLACEHOLDER:`点击输入演讲者备注`},TABLE_GENERATOR:{TITLE:`表格`,CUSTOM:`自定义`,ROW_COUNT:`行数:`,COL_COUNT:`列数:`,COUNT_LIMIT:`行数/列数必须在0~20之间!`},MEDIA_INPUT:{VIDEO:`视频`,AUDIO:`音频`,VIDEO_PLACEHOLDER:`请输入视频地址,e.g. https://xxx.mp4`,AUDIO_PLACEHOLDER:`请输入音频地址,e.g. https://xxx.mp3`,VIDEO_ERROR:`请先输入正确的视频地址`,AUDIO_ERROR:`请先输入正确的音频地址`},CANVAS_TOOL:{UNDO:`撤销(Ctrl + Z)`,REDO:`重做(Ctrl + Y)`,NOTES_PANEL:`批注面板`,SELECTION_PANEL:`选择窗格`,SEARCH_REPLACE:`查找替换`,SEARCH_REPLACE_TOOLTIP:`查找/替换(Ctrl + F)`,INSERT_TEXT:`插入文字`,TEXT_HORIZONTAL:`横向文本框`,TEXT_VERTICAL:`竖向文本框`,INSERT_SHAPE:`插入形状`,FREE_DRAW:`自由绘制`,INSERT_IMAGE:`插入图片`,INSERT_LINE:`插入线条`,INSERT_CHART:`插入图表`,INSERT_TABLE:`插入表格`,INSERT_FORMULA:`插入公式`,INSERT_MEDIA:`插入音视频`,INSERT_SYMBOL:`插入符号`,SCALE_DOWN:`画布缩小(Ctrl + -)`,SCALE_UP:`画布放大(Ctrl + =)`,FIT_SCREEN:`适应屏幕`,FIT_SCREEN_TOOLTIP:`适应屏幕(Ctrl + 0)`},CANVAS_MENU:{RULER:`标尺`,GRID_LINES:`网格线`,GRID_NONE:`无`,GRID_SMALL:`小`,GRID_MEDIUM:`中`,GRID_LARGE:`大`,RESET_SLIDE:`重置当前页`,SLIDE_SHOW:`幻灯片放映`},LINK_DIALOG:{WEB:`网页链接`,SLIDE:`幻灯片页面`,WEB_PLACEHOLDER:`请输入网页链接地址`,PREVIEW:`预览:`,SLIDE_LABEL:`幻灯片 {index}`,SELECT_TARGET:`请选择目标幻灯片`},LINK_HANDLER:{SLIDE_PAGE:`幻灯片页面`,CHANGE:`更换`},EDITABLE_ELEMENT:{UNLOCK:`解锁`,LOCK:`锁定`,ALIGN_HORIZONTAL:`水平居中`,ALIGN_VERTICAL:`垂直居中`,ALIGN_CENTER_BOTH:`水平垂直居中`,ALIGN_LEFT:`左对齐`,ALIGN_RIGHT:`右对齐`,ALIGN_TOP:`顶部对齐`,ALIGN_BOTTOM:`底部对齐`,BRING_TO_FRONT:`置于顶层`,SEND_TO_BACK:`置于底层`,MOVE_UP:`上移一层`,MOVE_DOWN:`下移一层`,SET_LINK:`设置链接`,GROUP:`组合`,UNGROUP:`取消组合`},SELECTION_PANEL:{TITLE:`选择({current}/{total})`,SHOW_ALL:`全部显示`,HIDE_ALL:`全部隐藏`,GROUP:`组合`},SPEAKER_NOTES:{TITLE:`幻灯片{index}的批注`,REPLY:`回复`,REPLY_PLACEHOLDER:`输入回复内容`,EMPTY:`本页暂无批注`,INPUT_PLACEHOLDER:`输入批注(为{target})`,TARGET_ELEMENT:`选中元素`,TARGET_SLIDE:`当前页幻灯片`,CLEAR_TOOLTIP:`清空本页批注`,ADD:`添加批注`,DEFAULT_USER:`测试用户`},MARKUP_PANEL:{TITLE:`幻灯片类型标注`,CURRENT_SLIDE_TYPE:`当前页面类型:`,CURRENT_TEXT_TYPE:`当前文本类型:`,CURRENT_CHART_MARK:`当前图表标记:`,CURRENT_IMAGE_TYPE:`当前图片类型:`,PLACEHOLDER:`选中文本、图表、图片或带文字的形状,进行类型标记`,TYPE_UNMARKED:`未标记类型`,SLIDE_COVER:`封面页`,SLIDE_CONTENTS:`目录页`,SLIDE_TRANSITION:`过渡页`,SLIDE_CONTENT:`内容页`,SLIDE_REFERENCE:`引用页`,SLIDE_END:`结束页`,TEXT_TITLE:`标题`,TEXT_SUBTITLE:`副标题`,TEXT_CONTENT:`正文`,TEXT_ITEM:`列表项目`,TEXT_ITEM_TITLE:`列表项标题`,TEXT_NOTES:`注释`,TEXT_HEADER:`页眉`,TEXT_FOOTER:`页脚`,TEXT_PART_NUMBER:`节编号`,TEXT_ITEM_NUMBER:`项目编号`,TEXT_REFERENCE_NUMBER:`引用编号`,TEXT_PMID:`PMID`,TEXT_URL:`URL`,TEXT_DOI:`DOI`,TEXT_REFERENCE_TITLE:`引用标题`,TEXT_SUMMARY:`简介摘要`,IMAGE_PAGE:`页面插图`,IMAGE_ITEM:`项目插图`,IMAGE_BACKGROUND:`背景图`,CHART_ITEM:`图表(内容项)`},SYMBOL_LIBRARY:{TAB_LETTER:`字母`,TAB_NUMBER:`序号`,TAB_MATH:`数学`,TAB_ARROW:`箭头`,TAB_GRAPH:`图形`,TAB_EMOJI:`Emoji`,EMOJI_FACE:`表情`,EMOJI_ACTION:`动作`,EMOJI_NATURE:`动植物`,EMOJI_FOOD:`食物`,EMOJI_TRAVEL:`旅行`,EMOJI_ACTIVITY:`活动`,EMOJI_OBJECTS:`物品`,EMOJI_SYMBOLS:`符号`},TOOLBAR:{TAB_STYLE:`样式`,TAB_POSITION:`位置`,TAB_ANIMATION:`动画`,TAB_DESIGN:`设计`,TAB_TRANSITION:`切换`,TAB_STYLE_MULTI:`样式(多选)`,TAB_POSITION_MULTI:`位置(多选)`},POSITION_PANEL:{LAYER:`层级:`,BRING_TO_FRONT:`置顶`,SEND_TO_BACK:`置底`,MOVE_UP:`上移`,MOVE_DOWN:`下移`,ALIGN:`对齐:`,ALIGN_LEFT:`左对齐`,ALIGN_RIGHT:`右对齐`,ALIGN_TOP:`上对齐`,ALIGN_BOTTOM:`下对齐`,ALIGN_CENTER_HORIZONTAL:`水平居中`,ALIGN_CENTER_VERTICAL:`垂直居中`,HORIZONTAL:`水平:`,VERTICAL:`垂直:`,WIDTH:`宽度:`,HEIGHT:`高度:`,ROTATE:`旋转:`,LOCK_RATIO:`宽高比锁定`,UNLOCK_RATIO:`解除宽高比锁定`},MULTI_POSITION:{HORIZONTAL_DISTRIBUTE:`水平均匀分布`,VERTICAL_DISTRIBUTE:`垂直均匀分布`},STYLE_PARTS:{OPACITY:`不透明度:`,SHADOW_ENABLE:`启用阴影:`,SHADOW_X:`水平阴影:`,SHADOW_Y:`垂直阴影:`,SHADOW_BLUR:`模糊距离:`,SHADOW_COLOR:`阴影颜色:`,OUTLINE_ENABLE:`启用边框:`,OUTLINE_STYLE:`边框样式:`,OUTLINE_COLOR:`边框颜色:`,OUTLINE_WIDTH:`边框粗细:`,COLOR_MASK:`着色(蒙版):`,MASK_COLOR:`蒙版颜色:`,FILTER_ENABLE:`启用滤镜:`,FLIP_VERTICAL:`垂直翻转`,FLIP_HORIZONTAL:`水平翻转`},FILTERS:{BLUR:`模糊`,BRIGHTNESS:`亮度`,CONTRAST:`对比度`,GRAYSCALE:`灰度`,SATURATION:`饱和度`,HUE:`色相`,SEPIA:`褐色`,INVERT:`反转`,OPACITY:`不透明度`,PRESET_BW:`黑白`,PRESET_RETRO:`复古`,PRESET_SHARPEN:`锐化`,PRESET_SOFT:`柔和`,PRESET_WARM:`暖色`,PRESET_BRIGHT:`明亮`,PRESET_VIVID:`鲜艳`,PRESET_BLUR:`模糊`,PRESET_INVERT:`反转`},TEXT_STYLE:{LINE_HEIGHT:`行高:`,LINE_HEIGHT_OPTION:`{value} 倍`,PARAGRAPH_SPACING:`段间距:`,PX_OPTION:`{value}px`,LETTER_SPACING:`字间距:`,BOX_FILL:`文本框填充:`,PRESET_TITLE_LG:`标题(大)`,PRESET_TITLE_SM:`标题(小)`,PRESET_BODY:`正文`,PRESET_BODY_SM:`正文(小)`,PRESET_NOTE_1:`注释(斜体)`,PRESET_NOTE_2:`注释(下划线)`},MULTI_STYLE:{FILL_COLOR:`填充颜色:`,OUTLINE_STYLE:`边框样式:`,OUTLINE_COLOR:`边框颜色:`,OUTLINE_WIDTH:`边框粗细:`},RICH_TEXT:{TEXT_COLOR:`文字颜色`,TEXT_HIGHLIGHT:`文字高亮`,FONT_SIZE_INCREASE:`增大字号`,FONT_SIZE_DECREASE:`减小字号`,BOLD:`加粗`,ITALIC:`斜体`,UNDERLINE:`下划线`,STRIKETHROUGH:`删除线`,SUPERSCRIPT:`上标`,SUBSCRIPT:`下标`,INLINE_CODE:`行内代码`,BLOCKQUOTE:`引用`,AI_POLISH:`美化`,AI_EXPAND:`扩写`,AI_CONDENSE:`精简`,AI_ASSIST:`AI辅助`,CLEAR_FORMAT:`清除格式`,LINK:`超链接`,LINK_PLACEHOLDER:`请输入超链接`,ALIGN_LEFT:`左对齐`,ALIGN_CENTER:`居中`,ALIGN_RIGHT:`右对齐`,ALIGN_JUSTIFY:`两端对齐`,BULLET_LIST:`项目符号`,ORDERED_LIST:`编号`,INDENT_DECREASE:`减小段落缩进`,INDENT_INCREASE:`增大段落缩进`,TEXT_INDENT_DECREASE:`减小首行缩进`,TEXT_INDENT_INCREASE:`增大首行缩进`,INVALID_LINK:`不是正确的网页链接地址`,NO_TEXT_CONTENT:`没有可以执行的文本内容`,IN_DEVELOPMENT:`功能开发中,敬请期待`},SLIDE_DESIGN:{BACKGROUND_FILL:`背景填充`,FILL_SOLID:`纯色填充`,FILL_IMAGE:`图片填充`,FILL_GRADIENT:`渐变填充`,IMAGE_CONTAIN:`缩放`,IMAGE_REPEAT:`拼贴`,IMAGE_COVER:`缩放铺满`,GRADIENT_LINEAR:`线性渐变`,GRADIENT_RADIAL:`径向渐变`,CURRENT_COLOR:`当前色块:`,GRADIENT_ANGLE:`渐变角度:`,APPLY_BACKGROUND_ALL:`应用背景到全部`,RATIO_WIDE_16_9:`宽屏 16 : 9`,RATIO_WIDE_16_10:`宽屏 16 : 10`,RATIO_STANDARD_4_3:`标准 4 : 3`,RATIO_PAPER_A3_A4:`纸张 A3 / A4`,RATIO_PORTRAIT_A3_A4:`竖向 A3 / A4`,CANVAS_SIZE:`画布尺寸:{width} × {height}`,GLOBAL_THEME:`全局主题`,FONT:`字体:`,FONT_COLOR:`字体颜色:`,BACKGROUND_COLOR:`背景颜色:`,THEME_COLORS:`主题色:`,APPLY_THEME_ALL:`应用主题到全部`,EXTRACT_THEME:`从幻灯片提取主题`,PRESET_THEMES:`预置主题`,TEXT_SAMPLE:`文字 Aa`,SET_AND_APPLY:`设置并应用`},SLIDE_THEME_COLORS:{TITLE:`编辑主题色`,ITEM:`幻灯片主题色{index}:`},THEME_EXTRACT:{FONT:`字体:`,FONT_COLOR:`文字颜色:`,BACKGROUND_COLOR:`背景颜色:`,THEME_COLORS:`主题色:`,TIP:`(点击色块排除不要的颜色)`,SELECT:`选择`,APPLY_TO_THEME:`应用到主题`,SAVE_SELECTED:`将选中配置保存为主题`,FROM_CURRENT:`从当前页中提取`,FROM_ALL:`从全部幻灯片提取`,THEME_COLOR_LIMIT:`主题色超出数量限制,已自动选取前6个`},IMAGE_STYLE:{CROP_IMAGE:`裁剪图片`,CLIP_BY_SHAPE:`按形状:`,CLIP_BY:`按{label}:`,RADIUS:`圆角半径:`,REPLACE_IMAGE:`替换图片`,RESET_STYLE:`重置样式`,SET_BACKGROUND:`设为背景`,RATIO_SQUARE:`纵横比(正方形)`,RATIO_PORTRAIT:`纵横比(纵向)`,RATIO_LANDSCAPE:`纵横比(横向)`},SHAPE_STYLE:{REPLACE_SHAPE:`点击替换形状`,FILL_SOLID:`纯色填充`,FILL_GRADIENT:`渐变填充`,FILL_IMAGE:`图片填充`,GRADIENT_LINEAR:`线性渐变`,GRADIENT_RADIAL:`径向渐变`,CURRENT_COLOR:`当前色块:`,GRADIENT_ANGLE:`渐变角度:`,ALIGN_TOP:`顶对齐`,ALIGN_MIDDLE:`居中`,ALIGN_BOTTOM:`底对齐`,FORMAT_PAINTER:`形状格式刷`},TABLE_STYLE:{CELL_FILL:`单元格填充`,ROW_COUNT:`行数:`,COL_COUNT:`列数:`,ENABLE_THEME:`启用主题表格:`,HEADER_ROW:`标题行`,FOOTER_ROW:`汇总行`,FIRST_COL:`第一列`,LAST_COL:`最后一列`,THEME_COLOR:`主题颜色:`},CHART_STYLE:{EDIT_CHART:`编辑图表`,STACKED:`堆叠样式`,SMOOTH_LINE:`使用平滑曲线`,BACKGROUND_FILL:`背景填充:`,AXIS_TEXT:`坐标与文字:`,GRID_COLOR:`网格颜色:`,THEME_COLORS:`主题配色:`,PRESET_THEMES:`预置图表主题:`,SLIDE_THEME:`幻灯片主题:`,CUSTOM_THEME:`自定义配色`},CHART_THEME_COLORS:{TITLE:`图表主题配色`,ITEM:`主题配色{index}:`,ADD:`添加主题色`},CHART_DATA_EDITOR:{TYPE_LABEL:`图表类型:`,CHANGE_TYPE:`点击更换`,CLEAR_DATA:`清空数据`,DEFAULT_CATEGORY:`类别{index}`,DEFAULT_SERIES:`系列{index}`},AUDIO_STYLE:{ICON_COLOR:`图标颜色:`,AUTOPLAY:`自动播放:`,LOOP:`循环播放:`},VIDEO_STYLE:{PREVIEW_COVER:`视频预览封面`,RESET_COVER:`重置封面`,AUTOPLAY:`自动播放:`},LATEX_STYLE:{EDIT:`编辑 LaTeX`,COLOR:`颜色:`,STROKE_WIDTH:`粗细:`},CANVAS:{CREATE_SHAPE_TIP:`点击绘制任意形状,首尾闭合完成绘制,按 ESC 键或鼠标右键取消,按 ENTER 键提前完成`},FORMULA_EDITOR:{TAB_SYMBOLS:`常用符号`,TAB_PRESETS:`预置公式`,INPUT_PLACEHOLDER:`输入 LaTeX 公式`,PREVIEW_PLACEHOLDER:`公式预览`,EMPTY_ERROR:`公式不能为空`},FORMULA:{SYMBOLS:{MATH:`数学`,GROUP:`组合`,FUNCTION:`函数`,GREEK:`希腊字母`},PRESET:{GAUSS:`高斯公式`,FOURIER:`傅里叶级数`,TAYLOR:`泰勒展开式`,DEFINITE_INTEGRAL:`定积分`,TRIG_IDENTITY_1:`三角恒等式1`,TRIG_IDENTITY_2:`三角恒等式2`,BINOMIAL:`和的展开式`,EULER:`欧拉公式`,BERNOULLI:`贝努利方程`,TOTAL_DIFFERENTIAL:`全微分方程`,NONHOMOGENEOUS:`非齐次方程`,CAUCHY:`柯西中值定理`,LAGRANGE:`拉格朗日中值定理`,DERIVATIVE:`导数公式`,TRIG_INTEGRAL:`三角函数积分`,QUADRIC:`二次曲面`,SECOND_ORDER:`二阶微分`,DIRECTIONAL:`方向导数`}},HOTKEY:{GENERAL:{TITLE:`通用`,CUT:`剪切`,COPY:`复制`,PASTE:`粘贴`,PASTE_PLAIN:`粘贴为纯文本`,DUPLICATE:`快速复制粘贴`,SELECT_ALL:`全选`,UNDO:`撤销`,REDO:`恢复`,DELETE:`删除`,MULTI_SELECT:`多选`,SEARCH_REPLACE:`打开搜索替换`,PRINT:`打印`,CLOSE_DIALOG:`关闭弹窗`},SLIDESHOW:{TITLE:`幻灯片放映`,START:`从头开始放映幻灯片`,START_CURRENT:`从当前开始放映幻灯片`,PREV:`切换上一页`,NEXT:`切换下一页`,NEXT_ENTER:`切换下一页`,EXIT:`退出放映`},EDITOR:{TITLE:`幻灯片编辑`,NEW_SLIDE:`新建幻灯片`,PAN:`移动画布`,ZOOM:`缩放画布`,ZOOM_IN:`放大画布`,ZOOM_OUT:`缩小画布`,FIT_SCREEN:`使画布适应当前屏幕`,PREV_NO_SELECTION:`上一页(未选中元素)`,NEXT_NO_SELECTION:`下一页(未选中元素)`,PREV:`上一页`,NEXT:`下一页`,QUICK_TEXT:`快速创建文本`,QUICK_RECT:`快速创建矩形`,QUICK_ELLIPSE:`快速创建圆形`,QUICK_LINE:`快速创建线条`,EXIT_DRAW:`退出绘制状态`},ELEMENT:{TITLE:`元素操作`,MOVE:`移动`,LOCK:`锁定`,GROUP:`组合`,UNGROUP:`取消组合`,BRING_TO_FRONT:`置顶层`,SEND_TO_BACK:`置底层`,LOCK_RATIO:`锁定宽高比例`,CREATE_LINE:`创建水平 / 垂直线条`,SWITCH_FOCUS:`切换焦点元素`,CONFIRM_CROP:`确认图片裁剪`,FINISH_CUSTOM_SHAPE:`完成自定义形状绘制`},TABLE:{TITLE:`表格编辑`,NEXT_CELL:`聚焦到下一个单元格`,MOVE_CELL:`移动焦点单元格`,INSERT_ROW_ABOVE:`在上方插入一行`,INSERT_ROW_BELOW:`在下方插入一行`,INSERT_COL_LEFT:`在左侧插入一列`,INSERT_COL_RIGHT:`在右侧插入一列`},CHART:{TITLE:`图表数据编辑`,NEXT_ROW:`聚焦到下一行`},TEXT:{TITLE:`文本编辑`,BOLD:`加粗`,ITALIC:`斜体`,UNDERLINE:`下划线`,INLINE_CODE:`行内代码`,SUPERSCRIPT:`上角标`,SUBSCRIPT:`下角标`,SELECT_PARAGRAPH:`选中段落`},OTHER:{TITLE:`其他快捷操作`,ADD_IMAGE_PASTE:`添加图片 - 粘贴来自系统剪贴板的图片`,ADD_IMAGE_DRAG:`添加图片 - 将本地图片拖拽到画布中`,ADD_IMAGE_PASTE_SVG:`添加图片 - 在画布中粘贴SVG代码`,ADD_IMAGE_PEXELS:`添加图片 - 粘贴来自 pexels 的图片链接`,ADD_TEXT_PASTE:`添加文本 - 粘贴来自系统剪贴板的文字`,ADD_TEXT_DRAG:`添加文本 - 将外部选中文字拖拽到画布中`,TEXT_MARKDOWN:`文本编辑 - 支持 markdown 语法创建列表和引用`},VALUE:{HOLD_CTRL_SHIFT:`按住 Ctrl 或 Shift`,SPACE_DRAG:`Space + 鼠标拖拽`,CTRL_SCROLL:`Ctrl + 鼠标滚轮`,MOUSE_SCROLL_UP:`鼠标上滚 / PgUp`,MOUSE_SCROLL_DOWN:`鼠标下滚 / PgDown`,DOUBLE_CLICK_BLANK_T:`双击空白处 / T`,RIGHT_CLICK:`鼠标右键`}},LINES:{STRAIGHT:`直线`,POLY_CURVE:`折线、曲线`},CHART:{TYPE:{BAR:`柱状图`,COLUMN:`条形图`,LINE:`折线图`,AREA:`面积图`,SCATTER:`散点图`,PIE:`饼图`,RING:`环形图`,RADAR:`雷达图`},DEFAULT:{CATEGORY:`类别{index}`,SERIES:`系列{index}`,VALUE:`值`,COORD:`坐标{index}`,X:`X`,Y:`Y`}},FONT:{NAME:{DEFAULT:`默认字体`,SOURCE_HAN_SANS:`思源黑体`,SOURCE_HAN_SERIF:`思源宋体`,FZ_HEITI:`方正黑体`,FZ_KAITI:`方正楷体`,FZ_SONG:`方正宋体`,FZ_FANGSONG:`方正仿宋`,ALIBABA_PUHUI:`阿里巴巴普惠体`,ZHUQUE_FANGSONG:`朱雀仿宋`,LXGW_WENKAI:`霞鹜文楷`,WENDING_PL_KAITI:`文鼎PL楷体`,DEYI_HEI:`得意黑`,MISANS:`MiSans`,MICROSOFT_YAHEI:`微软雅黑`,DM_SANS:`DM-Sans`,CANGER_XIAOWANZI:`仓耳小丸子`,YOUSHE_TITLE_BLACK:`优设标题黑`,FENGGUANG_MINGRUI:`峰广明锐体`,SHETU_MODERN_SQUARE:`摄图摩登小方体`,ZCOOL_HAPPY:`站酷快乐体`,ZIZHI_QU_XIMAI:`字制区喜脉体`,SUCAI_JISHI_KANGKANG:`素材集市康康体`,SUCAI_JISHI_COOL_SQUARE:`素材集市酷方体`,TUNIU_ROUNDED:`途牛类圆体`,RUIZI_ZHENYAN:`锐字真言体`}},ELEMENT:{TYPE:{TEXT:`文本`,IMAGE:`图片`,SHAPE:`形状`,LINE:`线条`,CHART:`图表`,TABLE:`表格`,VIDEO:`视频`,AUDIO:`音频`,LATEX:`公式`}},SHAPE:{CATEGORY:{RECT:`矩形`,COMMON:`常用形状`,ARROW:`箭头`,OTHER:`其他形状`,LINEAR:`线性`}},CLIP:{SHAPE:{RECT:`矩形`,RECT_2:`矩形2`,RECT_3:`矩形3`,ROUND_RECT:`圆角矩形`,ELLIPSE:`圆形`,TRIANGLE:`三角形`,TRIANGLE_2:`三角形2`,TRIANGLE_3:`三角形3`,RHOMBUS:`菱形`,PENTAGON:`五边形`,HEXAGON:`六边形`,HEPTAGON:`七边形`,OCTAGON:`八边形`,CHEVRON:`V形`,POINT:`点`,ARROW:`箭头`,PARALLELOGRAM:`平行四边形`,PARALLELOGRAM_2:`平行四边形2`,TRAPEZOID:`梯形`,TRAPEZOID_2:`梯形2`}},ANIMATION:{ENTER:{BOUNCE:`弹跳`,BOUNCE_IN:`弹入`,BOUNCE_IN_LEFT:`向右弹入`,BOUNCE_IN_RIGHT:`向左弹入`,BOUNCE_IN_UP:`向上弹入`,BOUNCE_IN_DOWN:`向下弹入`,FADE:`浮现`,FADE_IN:`浮入`,FADE_IN_DOWN:`向下浮入`,FADE_IN_DOWN_BIG:`向下长距浮入`,FADE_IN_LEFT:`向右浮入`,FADE_IN_LEFT_BIG:`向右长距浮入`,FADE_IN_RIGHT:`向左浮入`,FADE_IN_RIGHT_BIG:`向左长距浮入`,FADE_IN_UP:`向上浮入`,FADE_IN_UP_BIG:`向上长距浮入`,FADE_IN_TOP_LEFT:`从左上浮入`,FADE_IN_TOP_RIGHT:`从右上浮入`,FADE_IN_BOTTOM_LEFT:`从左下浮入`,FADE_IN_BOTTOM_RIGHT:`从右下浮入`,ROTATE:`旋转`,ROTATE_IN:`旋转进入`,ROTATE_IN_DOWN_LEFT:`绕左下进入`,ROTATE_IN_DOWN_RIGHT:`绕右下进入`,ROTATE_IN_UP_LEFT:`绕左上进入`,ROTATE_IN_UP_RIGHT:`绕右上进入`,ZOOM:`缩放`,ZOOM_IN:`放大进入`,ZOOM_IN_DOWN:`向下放大进入`,ZOOM_IN_LEFT:`从左放大进入`,ZOOM_IN_RIGHT:`从右放大进入`,ZOOM_IN_UP:`向上放大进入`,SLIDE:`滑入`,SLIDE_IN_DOWN:`向下滑入`,SLIDE_IN_LEFT:`从右滑入`,SLIDE_IN_RIGHT:`从左滑入`,SLIDE_IN_UP:`向上滑入`,FLIP:`翻转`,FLIP_IN_X:`X轴翻转进入`,FLIP_IN_Y:`Y轴翻转进入`,BACK:`放大滑入`,BACK_IN_DOWN:`向下放大滑入`,BACK_IN_LEFT:`从左放大滑入`,BACK_IN_RIGHT:`从右放大滑入`,BACK_IN_UP:`向上放大滑入`,LIGHT_SPEED:`飞入`,LIGHT_SPEED_IN_RIGHT:`从右飞入`,LIGHT_SPEED_IN_LEFT:`从左飞入`},EXIT:{BOUNCE:`弹跳`,BOUNCE_OUT:`弹出`,BOUNCE_OUT_LEFT:`向左弹出`,BOUNCE_OUT_RIGHT:`向右弹出`,BOUNCE_OUT_UP:`向上弹出`,BOUNCE_OUT_DOWN:`向下弹出`,FADE:`浮现`,FADE_OUT:`浮出`,FADE_OUT_DOWN:`向下浮出`,FADE_OUT_DOWN_BIG:`向下长距浮出`,FADE_OUT_LEFT:`向左浮出`,FADE_OUT_LEFT_BIG:`向左长距浮出`,FADE_OUT_RIGHT:`向右浮出`,FADE_OUT_RIGHT_BIG:`向右长距浮出`,FADE_OUT_UP:`向上浮出`,FADE_OUT_UP_BIG:`向上长距浮出`,FADE_OUT_TOP_LEFT:`从左上浮出`,FADE_OUT_TOP_RIGHT:`从右上浮出`,FADE_OUT_BOTTOM_LEFT:`从左下浮出`,FADE_OUT_BOTTOM_RIGHT:`从右下浮出`,ROTATE:`旋转`,ROTATE_OUT:`旋转退出`,ROTATE_OUT_DOWN_LEFT:`绕左下退出`,ROTATE_OUT_DOWN_RIGHT:`绕右下退出`,ROTATE_OUT_UP_LEFT:`绕左上退出`,ROTATE_OUT_UP_RIGHT:`绕右上退出`,ZOOM:`缩放`,ZOOM_OUT:`缩小退出`,ZOOM_OUT_DOWN:`向下缩小退出`,ZOOM_OUT_LEFT:`从左缩小退出`,ZOOM_OUT_RIGHT:`从右缩小退出`,ZOOM_OUT_UP:`向上缩小退出`,SLIDE:`滑出`,SLIDE_OUT_DOWN:`向下滑出`,SLIDE_OUT_LEFT:`从左滑出`,SLIDE_OUT_RIGHT:`从右滑出`,SLIDE_OUT_UP:`向上滑出`,FLIP:`翻转`,FLIP_OUT_X:`X轴翻转退出`,FLIP_OUT_Y:`Y轴翻转退出`,BACK:`缩小滑出`,BACK_OUT_DOWN:`向下缩小滑出`,BACK_OUT_LEFT:`从左缩小滑出`,BACK_OUT_RIGHT:`从右缩小滑出`,BACK_OUT_UP:`向上缩小滑出`,LIGHT_SPEED:`飞出`,LIGHT_SPEED_OUT_RIGHT:`从右飞出`,LIGHT_SPEED_OUT_LEFT:`从左飞出`},ATTENTION:{SHAKE:`晃动`,SHAKE_X:`左右摇晃`,SHAKE_Y:`上下摇晃`,HEAD_SHAKE:`摇头`,SWING:`摆动`,WOBBLE:`晃动`,TADA:`惊恐`,JELLO:`果冻`,OTHER:`其他`,BOUNCE:`弹跳`,FLASH:`闪烁`,PULSE:`脉搏`,RUBBER_BAND:`橡皮筋`,HEART_BEAT:`心跳(快)`},SLIDE:{NO:`无`,RANDOM:`随机`,SLIDE_X:`左右推移`,SLIDE_Y:`上下推移`,SLIDE_X_3D:`左右推移(3D)`,SLIDE_Y_3D:`上下推移(3D)`,FADE:`淡入淡出`,ROTATE:`旋转`,SCALE_Y:`上下展开`,SCALE_X:`左右展开`,SCALE:`放大`,SCALE_REVERSE:`缩小`}},SLIDE_ANIMATION:{APPLY_ALL:`应用到全部`,APPLIED_ALL:`已应用到全部`},ELEMENT_ANIMATION:{ADD:`添加动画`,TIP_SELECT:`选中画布中的元素添加动画`,DURATION:`持续时长:`,TRIGGER:`触发方式:`,TRIGGER_CLICK:`主动触发`,TRIGGER_WITH_PREVIOUS:`与上一动画同时`,TRIGGER_AFTER_PREVIOUS:`上一动画之后`,CHANGE:`更换动画`,STOP_PREVIEW:`停止预览`,PREVIEW_ALL:`预览全部`,TAB_IN:`入场`,TAB_OUT:`退场`,TAB_ATTENTION:`强调`},LINE_STYLE:{STYLE:`线条样式:`,COLOR:`线条颜色:`,WIDTH:`线条宽度:`,START:`起点样式:`,END:`终点样式:`,SWAP:`交换方向`},PPT_COMPONENTS:{THUMBNAIL_LOADING:`加载中 ...`,TABLE_DBLCLICK_EDIT:`双击编辑`,VIDEO_LOAD_ERROR:`视频加载失败`,VIDEO_SPEED:`倍速`,VIDEO_LOOP:`循环`,VIDEO_LOOP_ON:`开`,VIDEO_LOOP_OFF:`关`,FONT_LOAD_TIP:`字体需要等待加载下载后生效,请稍等`,TABLE_CONTEXT:{INSERT_COL:`插入列`,INSERT_COL_LEFT:`到左侧`,INSERT_COL_RIGHT:`到右侧`,INSERT_ROW:`插入行`,INSERT_ROW_TOP:`到上方`,INSERT_ROW_BOTTOM:`到下方`,DELETE_COL:`删除列`,DELETE_ROW:`删除行`,MERGE_CELLS:`合并单元格`,SPLIT_CELLS:`取消合并单元格`,SELECT_COL:`选中当前列`,SELECT_ROW:`选中当前行`,SELECT_ALL:`选中全部单元格`}}},Ue={COMMON:{CONFIRM:`Confirm`,CANCEL:`Cancel`,DELETE:`Delete`,REMOVE:`Remove`,INSERT:`Insert`,COPY:`Copy`,CUT:`Cut`,PASTE:`Paste`,SELECT_ALL:`Select all`,EDIT:`Edit`,CLOSE:`Close`,APPLY:`Apply`,SAVE:`Save`,SEARCH:`Search`,SEARCH_FONT:`Search font`,SEARCH_FONT_SIZE:`Search size`,REPLACE:`Replace`,REPLACE_ALL:`Replace all`,NEXT:`Next`,PREV:`Previous`,BACK:`Back`,MORE:`More`,PREVIEW:`Preview`,CLEAR:`Clear`,SET:`Set`,FORMAT_PAINTER_TIP:`Format painter (double-click to keep)`},EXPORT:{RANGE:`Export range:`,ALL:`All`,CURRENT:`Current slide`,CUSTOM:`Custom`,CUSTOM_RANGE:`Custom range:`,FORMAT:`Export format:`,IMAGE_QUALITY:`Image quality:`,IGNORE_WEBFONT:`Ignore web fonts:`,IGNORE_MEDIA:`Ignore audio/video:`,OVERWRITE_MASTER:`Overwrite master:`,PER_PAGE_COUNT:`Slides per page:`,EDGE_PADDING:`Page padding:`,BTN_PPTX:`Export PPTX`,BTN_IMAGE:`Export images`,BTN_JSON:`Export JSON`,BTN_PDF:`Print / Export PDF`,BTN_PPTIST:`Export PPTIST file`,IMAGE_FAIL:`Failed to export image`,FAIL:`Export failed`,CLOSE:`Close`,EXPORTING:`Exporting...`,TIP_MEDIA:`Audio and video are ignored by default. If your slides contain audio/video and you want them included in the PPTX, turn off "Ignore audio/video". This will significantly increase export time.`,TIP_MEDIA_FORMAT:`Note: 1) Supported export formats: avi, mp4, mov, wmv, mp3, wav. 2) Cross-origin resources cannot be exported.`,TIP_WEBFONT:`Web fonts are ignored by default. If you used web fonts and want them preserved, turn off "Ignore web fonts". This will increase export time.`,TIP_PPTIST:`Note: .pptist is the native file format of this app and can be imported back.`,TIP_PDF:`Note: If the print preview differs from the output, enable "Background graphics" in the print dialog.`},EXPORT_TABS:{PPTX:`Export PPTX`,IMAGE:`Export images`,JSON:`Export JSON`,PDF:`Print / Export PDF`,PPTIST:`Export PPTIST file`},SLIDE_THUMBS:{ADD_SLIDE:`Add slide`,PAGE_NUMBER:`Slide {current} / {total}`,SECTION_PLACEHOLDER:`Enter section name`,SECTION_UNTITLED:`Untitled section`,SECTION_DEFAULT:`Default section`,SECTION_DELETE:`Delete section`,SECTION_DELETE_WITH_SLIDES:`Delete section and slides`,SECTION_DELETE_ALL:`Delete all sections`,SECTION_RENAME:`Rename section`,SECTION_ADD:`Add section`,PASTE:`Paste`,SELECT_ALL:`Select all`,NEW_SLIDE:`New slide`,SLIDE_SHOW:`Slide show`,CUT:`Cut`,COPY:`Copy`,DUPLICATE_SLIDE:`Duplicate slide`,DELETE_SLIDE:`Delete slide`,SLIDE_SHOW_FROM_CURRENT:`Start from current`},SLIDE_TEMPLATES:{INSERT_ALL:`Insert all`,INSERT_TEMPLATE:`Insert template`,TYPE_ALL:`All`,TYPE_COVER:`Cover`,TYPE_CONTENTS:`Contents`,TYPE_TRANSITION:`Transition`,TYPE_CONTENT:`Content`,TYPE_REFERENCE:`Reference`,TYPE_END:`End`},TEMPLATE_LIST:{CMI1:`CMI1`,CMI2:`CMI2`,CMI3:`CMI3`,RED_GENERAL:`Red general`,BLUE_GENERAL:`Blue general`,PURPLE_GENERAL:`Purple general`,MORANDI:`Morandi palette`},COLOR_PICKER:{RECENT_USED:`Recently used`,EYEDROPPER_HINT:`Click on the canvas to pick a color`,EYEDROPPER_INIT_FAIL:`Failed to activate eyedropper`},IMPORT:{FILE_PARSE_FAIL:`Failed to read or parse the file`},REQUEST:{UNKNOWN_ERROR:`Unknown error`,SERVER_UNKNOWN_ERROR:`Server error`,CONNECTION_FAIL:`Connection failed`},EDITOR:{GENERATING:`Generating with AI, please wait...`,AIPPT_NO_PPTID:`AIPPT generation failed: missing pptId parameter`,AIPPT_FETCH_FAIL:`Failed to fetch AIPPT data`,TEMPLATE_FETCH_FAIL:`Failed to fetch template data`},HEADER_BAR:{EXPORT_FILE:`Export file`,RESET_SLIDES:`Reset slides`,MARKUP:`Slide type markup`,HOTKEY:`Hotkeys`,SLIDE_SHOW_TOOLTIP:`Slide show (F5)`,SLIDE_SHOW_FROM_START:`Start from beginning`,SLIDE_SHOW_FROM_CURRENT:`Start from current slide`,EXPORT_TOOLTIP:`Export`,HOTKEY_TITLE:`Hotkeys`,AIPPT_DRAWER_TITLE:`Render AIPPT`,TEMPLATE_SELECTED:`Template selected`,TEMPLATE_NOT_SELECTED:`Not selected`,AIPPT_JSON_LABEL:`AIPPT JSON`,AIPPT_JSON_PLACEHOLDER:`Paste AIPPT.json content here (e.g. {"cover": {...}, "contents":[...], "content":[...], "end":[...]})`,RENDER_AND_LOAD:`Render and load`,IMPORTING:`Importing...`,RENDERING_AIPPT:`Rendering AIPPT...`,TEMPLATE_LOADED:`Template loaded. Please paste AIPPT JSON.`,TEMPLATE_LOAD_FAIL:`Template load failed: please ensure valid JSON.`,NEED_TEMPLATE_FILE:`Please select a template file first`,AIPPT_PARSE_FAIL:`AIPPT JSON parse failed. Please check the format.`,TEMPLATE_SLIDES_MISSING:`Template slides field is missing or empty`,AIPPT_UNKNOWN_TYPES:`The following types were not found in the template: {unknown}; supported: {supported}`,AIPPT_UNKNOWN_TYPES_EMPTY:`none detected`,RENDER_SUCCESS:`Rendered and loaded to the canvas`,RENDER_FAIL:`Render failed: {reason}`,RENDER_FAIL_FALLBACK:`Please check template type markup and AIPPT structure`},QUICK_SEARCH:{SEARCH_PLACEHOLDER:`Enter search text`,REPLACE_PLACEHOLDER:`Enter replacement text`,IGNORE_CASE:`Ignore case`,PREV:`Previous`,NEXT:`Next`,NO_MATCH:`No matches found`,EMPTY_SEARCH:`Please enter search text`},COMMENT_PANEL:{PLACEHOLDER:`Click to enter speaker notes`},TABLE_GENERATOR:{TITLE:`Table`,CUSTOM:`Custom`,ROW_COUNT:`Rows:`,COL_COUNT:`Columns:`,COUNT_LIMIT:`Row/column count must be between 0 and 20.`},MEDIA_INPUT:{VIDEO:`Video`,AUDIO:`Audio`,VIDEO_PLACEHOLDER:`Enter video URL, e.g. https://xxx.mp4`,AUDIO_PLACEHOLDER:`Enter audio URL, e.g. https://xxx.mp3`,VIDEO_ERROR:`Please enter a valid video URL first`,AUDIO_ERROR:`Please enter a valid audio URL first`},CANVAS_TOOL:{UNDO:`Undo (Ctrl + Z)`,REDO:`Redo (Ctrl + Y)`,NOTES_PANEL:`Notes panel`,SELECTION_PANEL:`Selection pane`,SEARCH_REPLACE:`Find & replace`,SEARCH_REPLACE_TOOLTIP:`Find/Replace (Ctrl + F)`,INSERT_TEXT:`Insert text`,TEXT_HORIZONTAL:`Horizontal text box`,TEXT_VERTICAL:`Vertical text box`,INSERT_SHAPE:`Insert shape`,FREE_DRAW:`Free draw`,INSERT_IMAGE:`Insert image`,INSERT_LINE:`Insert line`,INSERT_CHART:`Insert chart`,INSERT_TABLE:`Insert table`,INSERT_FORMULA:`Insert formula`,INSERT_MEDIA:`Insert audio/video`,INSERT_SYMBOL:`Insert symbol`,SCALE_DOWN:`Zoom out (Ctrl + -)`,SCALE_UP:`Zoom in (Ctrl + =)`,FIT_SCREEN:`Fit to screen`,FIT_SCREEN_TOOLTIP:`Fit to screen (Ctrl + 0)`},CANVAS_MENU:{RULER:`Ruler`,GRID_LINES:`Grid lines`,GRID_NONE:`None`,GRID_SMALL:`Small`,GRID_MEDIUM:`Medium`,GRID_LARGE:`Large`,RESET_SLIDE:`Reset current slide`,SLIDE_SHOW:`Slide show`},LINK_DIALOG:{WEB:`Web link`,SLIDE:`Slide`,WEB_PLACEHOLDER:`Enter a web URL`,PREVIEW:`Preview:`,SLIDE_LABEL:`Slide {index}`,SELECT_TARGET:`Please select a target slide`},LINK_HANDLER:{SLIDE_PAGE:`Slide page`,CHANGE:`Change`},EDITABLE_ELEMENT:{UNLOCK:`Unlock`,LOCK:`Lock`,ALIGN_HORIZONTAL:`Center horizontally`,ALIGN_VERTICAL:`Center vertically`,ALIGN_CENTER_BOTH:`Center both`,ALIGN_LEFT:`Align left`,ALIGN_RIGHT:`Align right`,ALIGN_TOP:`Align top`,ALIGN_BOTTOM:`Align bottom`,BRING_TO_FRONT:`Bring to front`,SEND_TO_BACK:`Send to back`,MOVE_UP:`Bring forward`,MOVE_DOWN:`Send backward`,SET_LINK:`Set link`,GROUP:`Group`,UNGROUP:`Ungroup`},SELECTION_PANEL:{TITLE:`Selection ({current}/{total})`,SHOW_ALL:`Show all`,HIDE_ALL:`Hide all`,GROUP:`Group`},SPEAKER_NOTES:{TITLE:`Notes for slide {index}`,REPLY:`Reply`,REPLY_PLACEHOLDER:`Enter reply content`,EMPTY:`No notes on this slide`,INPUT_PLACEHOLDER:`Enter notes (for {target})`,TARGET_ELEMENT:`selected element`,TARGET_SLIDE:`current slide`,CLEAR_TOOLTIP:`Clear notes on this slide`,ADD:`Add note`,DEFAULT_USER:`Test user`},MARKUP_PANEL:{TITLE:`Slide type markup`,CURRENT_SLIDE_TYPE:`Current slide type:`,CURRENT_TEXT_TYPE:`Current text type:`,CURRENT_CHART_MARK:`Current chart mark:`,CURRENT_IMAGE_TYPE:`Current image type:`,PLACEHOLDER:`Select text, chart, image, or a shape with text to mark type`,TYPE_UNMARKED:`Unmarked`,SLIDE_COVER:`Cover`,SLIDE_CONTENTS:`Contents`,SLIDE_TRANSITION:`Transition`,SLIDE_CONTENT:`Content`,SLIDE_REFERENCE:`Reference`,SLIDE_END:`End`,TEXT_TITLE:`Title`,TEXT_SUBTITLE:`Subtitle`,TEXT_CONTENT:`Body`,TEXT_ITEM:`List item`,TEXT_ITEM_TITLE:`Item title`,TEXT_NOTES:`Notes`,TEXT_HEADER:`Header`,TEXT_FOOTER:`Footer`,TEXT_PART_NUMBER:`Section number`,TEXT_ITEM_NUMBER:`Item number`,TEXT_REFERENCE_NUMBER:`Reference number`,TEXT_PMID:`PMID`,TEXT_URL:`URL`,TEXT_DOI:`DOI`,TEXT_REFERENCE_TITLE:`Reference title`,TEXT_SUMMARY:`Summary`,IMAGE_PAGE:`Page figure`,IMAGE_ITEM:`Item figure`,IMAGE_BACKGROUND:`Background`,CHART_ITEM:`Chart (content item)`},SYMBOL_LIBRARY:{TAB_LETTER:`Letters`,TAB_NUMBER:`Numbers`,TAB_MATH:`Math`,TAB_ARROW:`Arrows`,TAB_GRAPH:`Shapes`,TAB_EMOJI:`Emoji`,EMOJI_FACE:`Faces`,EMOJI_ACTION:`Actions`,EMOJI_NATURE:`Nature`,EMOJI_FOOD:`Food`,EMOJI_TRAVEL:`Travel`,EMOJI_ACTIVITY:`Activities`,EMOJI_OBJECTS:`Objects`,EMOJI_SYMBOLS:`Symbols`},TOOLBAR:{TAB_STYLE:`Style`,TAB_POSITION:`Position`,TAB_ANIMATION:`Animation`,TAB_DESIGN:`Design`,TAB_TRANSITION:`Transition`,TAB_STYLE_MULTI:`Style (multi)`,TAB_POSITION_MULTI:`Position (multi)`},POSITION_PANEL:{LAYER:`Layer:`,BRING_TO_FRONT:`Bring to front`,SEND_TO_BACK:`Send to back`,MOVE_UP:`Move up`,MOVE_DOWN:`Move down`,ALIGN:`Align:`,ALIGN_LEFT:`Align left`,ALIGN_RIGHT:`Align right`,ALIGN_TOP:`Align top`,ALIGN_BOTTOM:`Align bottom`,ALIGN_CENTER_HORIZONTAL:`Center horizontally`,ALIGN_CENTER_VERTICAL:`Center vertically`,HORIZONTAL:`X:`,VERTICAL:`Y:`,WIDTH:`Width:`,HEIGHT:`Height:`,ROTATE:`Rotate:`,LOCK_RATIO:`Lock aspect ratio`,UNLOCK_RATIO:`Unlock aspect ratio`},MULTI_POSITION:{HORIZONTAL_DISTRIBUTE:`Distribute horizontally`,VERTICAL_DISTRIBUTE:`Distribute vertically`},STYLE_PARTS:{OPACITY:`Opacity:`,SHADOW_ENABLE:`Enable shadow:`,SHADOW_X:`Horizontal shadow:`,SHADOW_Y:`Vertical shadow:`,SHADOW_BLUR:`Blur:`,SHADOW_COLOR:`Shadow color:`,OUTLINE_ENABLE:`Enable outline:`,OUTLINE_STYLE:`Outline style:`,OUTLINE_COLOR:`Outline color:`,OUTLINE_WIDTH:`Outline width:`,COLOR_MASK:`Tint (mask):`,MASK_COLOR:`Mask color:`,FILTER_ENABLE:`Enable filters:`,FLIP_VERTICAL:`Flip vertically`,FLIP_HORIZONTAL:`Flip horizontally`},FILTERS:{BLUR:`Blur`,BRIGHTNESS:`Brightness`,CONTRAST:`Contrast`,GRAYSCALE:`Grayscale`,SATURATION:`Saturation`,HUE:`Hue`,SEPIA:`Sepia`,INVERT:`Invert`,OPACITY:`Opacity`,PRESET_BW:`B&W`,PRESET_RETRO:`Retro`,PRESET_SHARPEN:`Sharpen`,PRESET_SOFT:`Soft`,PRESET_WARM:`Warm`,PRESET_BRIGHT:`Bright`,PRESET_VIVID:`Vivid`,PRESET_BLUR:`Blur`,PRESET_INVERT:`Invert`},TEXT_STYLE:{LINE_HEIGHT:`Line height:`,LINE_HEIGHT_OPTION:`{value}x`,PARAGRAPH_SPACING:`Paragraph spacing:`,PX_OPTION:`{value}px`,LETTER_SPACING:`Letter spacing:`,BOX_FILL:`Text box fill:`,PRESET_TITLE_LG:`Title (large)`,PRESET_TITLE_SM:`Title (small)`,PRESET_BODY:`Body`,PRESET_BODY_SM:`Body (small)`,PRESET_NOTE_1:`Note (italic)`,PRESET_NOTE_2:`Note (underline)`},MULTI_STYLE:{FILL_COLOR:`Fill color:`,OUTLINE_STYLE:`Outline style:`,OUTLINE_COLOR:`Outline color:`,OUTLINE_WIDTH:`Outline width:`},RICH_TEXT:{TEXT_COLOR:`Text color`,TEXT_HIGHLIGHT:`Text highlight`,FONT_SIZE_INCREASE:`Increase font size`,FONT_SIZE_DECREASE:`Decrease font size`,BOLD:`Bold`,ITALIC:`Italic`,UNDERLINE:`Underline`,STRIKETHROUGH:`Strikethrough`,SUPERSCRIPT:`Superscript`,SUBSCRIPT:`Subscript`,INLINE_CODE:`Inline code`,BLOCKQUOTE:`Quote`,AI_POLISH:`Polish`,AI_EXPAND:`Expand`,AI_CONDENSE:`Condense`,AI_ASSIST:`AI assist`,CLEAR_FORMAT:`Clear formatting`,LINK:`Link`,LINK_PLACEHOLDER:`Enter link`,ALIGN_LEFT:`Align left`,ALIGN_CENTER:`Center`,ALIGN_RIGHT:`Align right`,ALIGN_JUSTIFY:`Justify`,BULLET_LIST:`Bulleted list`,ORDERED_LIST:`Numbered list`,INDENT_DECREASE:`Decrease paragraph indent`,INDENT_INCREASE:`Increase paragraph indent`,TEXT_INDENT_DECREASE:`Decrease first-line indent`,TEXT_INDENT_INCREASE:`Increase first-line indent`,INVALID_LINK:`Invalid link address`,NO_TEXT_CONTENT:`No text content to process`,IN_DEVELOPMENT:`In development`},SLIDE_DESIGN:{BACKGROUND_FILL:`Background fill`,FILL_SOLID:`Solid fill`,FILL_IMAGE:`Image fill`,FILL_GRADIENT:`Gradient fill`,IMAGE_CONTAIN:`Contain`,IMAGE_REPEAT:`Tile`,IMAGE_COVER:`Cover`,GRADIENT_LINEAR:`Linear gradient`,GRADIENT_RADIAL:`Radial gradient`,CURRENT_COLOR:`Current color:`,GRADIENT_ANGLE:`Gradient angle:`,APPLY_BACKGROUND_ALL:`Apply background to all`,RATIO_WIDE_16_9:`Widescreen 16:9`,RATIO_WIDE_16_10:`Widescreen 16:10`,RATIO_STANDARD_4_3:`Standard 4:3`,RATIO_PAPER_A3_A4:`Paper A3 / A4`,RATIO_PORTRAIT_A3_A4:`Portrait A3 / A4`,CANVAS_SIZE:`Canvas size: {width} × {height}`,GLOBAL_THEME:`Global theme`,FONT:`Font:`,FONT_COLOR:`Font color:`,BACKGROUND_COLOR:`Background color:`,THEME_COLORS:`Theme colors:`,APPLY_THEME_ALL:`Apply theme to all`,EXTRACT_THEME:`Extract theme from slides`,PRESET_THEMES:`Preset themes`,TEXT_SAMPLE:`Text Aa`,SET_AND_APPLY:`Set and apply`},SLIDE_THEME_COLORS:{TITLE:`Edit theme colors`,ITEM:`Slide theme color {index}:`},THEME_EXTRACT:{FONT:`Font:`,FONT_COLOR:`Text color:`,BACKGROUND_COLOR:`Background color:`,THEME_COLORS:`Theme colors:`,TIP:` (Click a swatch to exclude colors)`,SELECT:`Select`,APPLY_TO_THEME:`Apply to theme`,SAVE_SELECTED:`Save selected settings as theme`,FROM_CURRENT:`Extract from current slide`,FROM_ALL:`Extract from all slides`,THEME_COLOR_LIMIT:`Theme colors exceed the limit. The first 6 were selected automatically.`},IMAGE_STYLE:{CROP_IMAGE:`Crop image`,CLIP_BY_SHAPE:`By shape:`,CLIP_BY:`By {label}:`,RADIUS:`Corner radius:`,REPLACE_IMAGE:`Replace image`,RESET_STYLE:`Reset style`,SET_BACKGROUND:`Set as background`,RATIO_SQUARE:`Aspect ratio (square)`,RATIO_PORTRAIT:`Aspect ratio (portrait)`,RATIO_LANDSCAPE:`Aspect ratio (landscape)`},SHAPE_STYLE:{REPLACE_SHAPE:`Click to replace shape`,FILL_SOLID:`Solid fill`,FILL_GRADIENT:`Gradient fill`,FILL_IMAGE:`Image fill`,GRADIENT_LINEAR:`Linear gradient`,GRADIENT_RADIAL:`Radial gradient`,CURRENT_COLOR:`Current color:`,GRADIENT_ANGLE:`Gradient angle:`,ALIGN_TOP:`Align top`,ALIGN_MIDDLE:`Center`,ALIGN_BOTTOM:`Align bottom`,FORMAT_PAINTER:`Shape format painter`},TABLE_STYLE:{CELL_FILL:`Cell fill`,ROW_COUNT:`Rows:`,COL_COUNT:`Columns:`,ENABLE_THEME:`Enable themed table:`,HEADER_ROW:`Header row`,FOOTER_ROW:`Footer row`,FIRST_COL:`First column`,LAST_COL:`Last column`,THEME_COLOR:`Theme color:`},CHART_STYLE:{EDIT_CHART:`Edit chart`,STACKED:`Stacked`,SMOOTH_LINE:`Smooth line`,BACKGROUND_FILL:`Background fill:`,AXIS_TEXT:`Axes & text:`,GRID_COLOR:`Grid color:`,THEME_COLORS:`Theme colors:`,PRESET_THEMES:`Preset chart themes:`,SLIDE_THEME:`Slide theme:`,CUSTOM_THEME:`Custom colors`},CHART_THEME_COLORS:{TITLE:`Chart theme colors`,ITEM:`Theme color {index}:`,ADD:`Add theme color`},CHART_DATA_EDITOR:{TYPE_LABEL:`Chart type: `,CHANGE_TYPE:`Change`,CLEAR_DATA:`Clear data`,DEFAULT_CATEGORY:`Category {index}`,DEFAULT_SERIES:`Series {index}`},AUDIO_STYLE:{ICON_COLOR:`Icon color:`,AUTOPLAY:`Autoplay:`,LOOP:`Loop:`},VIDEO_STYLE:{PREVIEW_COVER:`Video preview cover`,RESET_COVER:`Reset cover`,AUTOPLAY:`Autoplay:`},LATEX_STYLE:{EDIT:`Edit LaTeX`,COLOR:`Color:`,STROKE_WIDTH:`Stroke width:`},CANVAS:{CREATE_SHAPE_TIP:`Click to draw a custom shape. Close the path to finish. Press ESC or right-click to cancel, or press ENTER to finish early.`},FORMULA_EDITOR:{TAB_SYMBOLS:`Common symbols`,TAB_PRESETS:`Preset formulas`,INPUT_PLACEHOLDER:`Enter LaTeX formula`,PREVIEW_PLACEHOLDER:`Formula preview`,EMPTY_ERROR:`Formula cannot be empty`},FORMULA:{SYMBOLS:{MATH:`Math`,GROUP:`Group`,FUNCTION:`Function`,GREEK:`Greek letters`},PRESET:{GAUSS:`Gauss theorem`,FOURIER:`Fourier series`,TAYLOR:`Taylor expansion`,DEFINITE_INTEGRAL:`Definite integral`,TRIG_IDENTITY_1:`Trig identity 1`,TRIG_IDENTITY_2:`Trig identity 2`,BINOMIAL:`Binomial expansion`,EULER:`Euler's formula`,BERNOULLI:`Bernoulli equation`,TOTAL_DIFFERENTIAL:`Total differential equation`,NONHOMOGENEOUS:`Nonhomogeneous equation`,CAUCHY:`Cauchy mean value theorem`,LAGRANGE:`Lagrange mean value theorem`,DERIVATIVE:`Derivative formula`,TRIG_INTEGRAL:`Trig integral`,QUADRIC:`Quadric surface`,SECOND_ORDER:`Second-order differential equation`,DIRECTIONAL:`Directional derivative`}},HOTKEY:{GENERAL:{TITLE:`General`,CUT:`Cut`,COPY:`Copy`,PASTE:`Paste`,PASTE_PLAIN:`Paste as plain text`,DUPLICATE:`Quick duplicate`,SELECT_ALL:`Select all`,UNDO:`Undo`,REDO:`Redo`,DELETE:`Delete`,MULTI_SELECT:`Multi-select`,SEARCH_REPLACE:`Open search & replace`,PRINT:`Print`,CLOSE_DIALOG:`Close dialog`},SLIDESHOW:{TITLE:`Slide show`,START:`Start from beginning`,START_CURRENT:`Start from current slide`,PREV:`Previous slide`,NEXT:`Next slide`,NEXT_ENTER:`Next slide`,EXIT:`Exit show`},EDITOR:{TITLE:`Slide editing`,NEW_SLIDE:`New slide`,PAN:`Pan canvas`,ZOOM:`Zoom canvas`,ZOOM_IN:`Zoom in canvas`,ZOOM_OUT:`Zoom out canvas`,FIT_SCREEN:`Fit canvas to screen`,PREV_NO_SELECTION:`Previous slide (no selection)`,NEXT_NO_SELECTION:`Next slide (no selection)`,PREV:`Previous slide`,NEXT:`Next slide`,QUICK_TEXT:`Quick text`,QUICK_RECT:`Quick rectangle`,QUICK_ELLIPSE:`Quick ellipse`,QUICK_LINE:`Quick line`,EXIT_DRAW:`Exit drawing mode`},ELEMENT:{TITLE:`Element actions`,MOVE:`Move`,LOCK:`Lock`,GROUP:`Group`,UNGROUP:`Ungroup`,BRING_TO_FRONT:`Bring to front`,SEND_TO_BACK:`Send to back`,LOCK_RATIO:`Lock aspect ratio`,CREATE_LINE:`Create horizontal / vertical lines`,SWITCH_FOCUS:`Switch focus element`,CONFIRM_CROP:`Confirm image crop`,FINISH_CUSTOM_SHAPE:`Finish custom shape drawing`},TABLE:{TITLE:`Table editing`,NEXT_CELL:`Focus next cell`,MOVE_CELL:`Move focused cell`,INSERT_ROW_ABOVE:`Insert row above`,INSERT_ROW_BELOW:`Insert row below`,INSERT_COL_LEFT:`Insert column left`,INSERT_COL_RIGHT:`Insert column right`},CHART:{TITLE:`Chart data editing`,NEXT_ROW:`Focus next row`},TEXT:{TITLE:`Text editing`,BOLD:`Bold`,ITALIC:`Italic`,UNDERLINE:`Underline`,INLINE_CODE:`Inline code`,SUPERSCRIPT:`Superscript`,SUBSCRIPT:`Subscript`,SELECT_PARAGRAPH:`Select paragraph`},OTHER:{TITLE:`Other shortcuts`,ADD_IMAGE_PASTE:`Add image - paste from clipboard`,ADD_IMAGE_DRAG:`Add image - drag local image to canvas`,ADD_IMAGE_PASTE_SVG:`Add image - paste SVG code on canvas`,ADD_IMAGE_PEXELS:`Add image - paste Pexels image link`,ADD_TEXT_PASTE:`Add text - paste from clipboard`,ADD_TEXT_DRAG:`Add text - drag selected text into canvas`,TEXT_MARKDOWN:`Text editing - markdown lists and quotes`},VALUE:{HOLD_CTRL_SHIFT:`Hold Ctrl or Shift`,SPACE_DRAG:`Space + drag mouse`,CTRL_SCROLL:`Ctrl + mouse wheel`,MOUSE_SCROLL_UP:`Mouse wheel up / PgUp`,MOUSE_SCROLL_DOWN:`Mouse wheel down / PgDown`,DOUBLE_CLICK_BLANK_T:`Double-click blank area / T`,RIGHT_CLICK:`Right click`}},LINES:{STRAIGHT:`Straight lines`,POLY_CURVE:`Polylines / curves`},CHART:{TYPE:{BAR:`Column chart`,COLUMN:`Bar chart`,LINE:`Line chart`,AREA:`Area chart`,SCATTER:`Scatter chart`,PIE:`Pie chart`,RING:`Doughnut chart`,RADAR:`Radar chart`},DEFAULT:{CATEGORY:`Category {index}`,SERIES:`Series {index}`,VALUE:`Value`,COORD:`Coordinate {index}`,X:`X`,Y:`Y`}},FONT:{NAME:{DEFAULT:`Default font`,SOURCE_HAN_SANS:`Source Han Sans`,SOURCE_HAN_SERIF:`Source Han Serif`,FZ_HEITI:`FZ Heiti`,FZ_KAITI:`FZ Kaiti`,FZ_SONG:`FZ Song`,FZ_FANGSONG:`FZ Fangsong`,ALIBABA_PUHUI:`Alibaba PuHuiTi`,ZHUQUE_FANGSONG:`Zhuque Fangsong`,LXGW_WENKAI:`LXGW WenKai`,WENDING_PL_KAITI:`WenDing PL Kaiti`,DEYI_HEI:`Deyi Hei`,MISANS:`MiSans`,MICROSOFT_YAHEI:`Microsoft YaHei`,DM_SANS:`DM-Sans`,CANGER_XIAOWANZI:`Canger Xiaowanzi`,YOUSHE_TITLE_BLACK:`Youshe Title Black`,FENGGUANG_MINGRUI:`Fengguang Mingrui`,SHETU_MODERN_SQUARE:`Shetu Modern Square`,ZCOOL_HAPPY:`ZCOOL Happy`,ZIZHI_QU_XIMAI:`Zizhi Qu Ximai`,SUCAI_JISHI_KANGKANG:`Sucai Jishi Kangkang`,SUCAI_JISHI_COOL_SQUARE:`Sucai Jishi Cool Square`,TUNIU_ROUNDED:`Tuniu Rounded`,RUIZI_ZHENYAN:`Ruizi Zhenyan`}},ELEMENT:{TYPE:{TEXT:`Text`,IMAGE:`Image`,SHAPE:`Shape`,LINE:`Line`,CHART:`Chart`,TABLE:`Table`,VIDEO:`Video`,AUDIO:`Audio`,LATEX:`Formula`}},SHAPE:{CATEGORY:{RECT:`Rectangles`,COMMON:`Common shapes`,ARROW:`Arrows`,OTHER:`Other shapes`,LINEAR:`Linear`}},CLIP:{SHAPE:{RECT:`Rectangle`,RECT_2:`Rectangle 2`,RECT_3:`Rectangle 3`,ROUND_RECT:`Rounded rectangle`,ELLIPSE:`Ellipse`,TRIANGLE:`Triangle`,TRIANGLE_2:`Triangle 2`,TRIANGLE_3:`Triangle 3`,RHOMBUS:`Rhombus`,PENTAGON:`Pentagon`,HEXAGON:`Hexagon`,HEPTAGON:`Heptagon`,OCTAGON:`Octagon`,CHEVRON:`Chevron`,POINT:`Point`,ARROW:`Arrow`,PARALLELOGRAM:`Parallelogram`,PARALLELOGRAM_2:`Parallelogram 2`,TRAPEZOID:`Trapezoid`,TRAPEZOID_2:`Trapezoid 2`}},ANIMATION:{ENTER:{BOUNCE:`Bounce`,BOUNCE_IN:`Bounce in`,BOUNCE_IN_LEFT:`Bounce in left`,BOUNCE_IN_RIGHT:`Bounce in right`,BOUNCE_IN_UP:`Bounce in up`,BOUNCE_IN_DOWN:`Bounce in down`,FADE:`Fade`,FADE_IN:`Fade in`,FADE_IN_DOWN:`Fade in down`,FADE_IN_DOWN_BIG:`Fade in down big`,FADE_IN_LEFT:`Fade in left`,FADE_IN_LEFT_BIG:`Fade in left big`,FADE_IN_RIGHT:`Fade in right`,FADE_IN_RIGHT_BIG:`Fade in right big`,FADE_IN_UP:`Fade in up`,FADE_IN_UP_BIG:`Fade in up big`,FADE_IN_TOP_LEFT:`Fade in from top-left`,FADE_IN_TOP_RIGHT:`Fade in from top-right`,FADE_IN_BOTTOM_LEFT:`Fade in from bottom-left`,FADE_IN_BOTTOM_RIGHT:`Fade in from bottom-right`,ROTATE:`Rotate`,ROTATE_IN:`Rotate in`,ROTATE_IN_DOWN_LEFT:`Rotate in down left`,ROTATE_IN_DOWN_RIGHT:`Rotate in down right`,ROTATE_IN_UP_LEFT:`Rotate in up left`,ROTATE_IN_UP_RIGHT:`Rotate in up right`,ZOOM:`Zoom`,ZOOM_IN:`Zoom in`,ZOOM_IN_DOWN:`Zoom in down`,ZOOM_IN_LEFT:`Zoom in left`,ZOOM_IN_RIGHT:`Zoom in right`,ZOOM_IN_UP:`Zoom in up`,SLIDE:`Slide`,SLIDE_IN_DOWN:`Slide in down`,SLIDE_IN_LEFT:`Slide in left`,SLIDE_IN_RIGHT:`Slide in right`,SLIDE_IN_UP:`Slide in up`,FLIP:`Flip`,FLIP_IN_X:`Flip in X`,FLIP_IN_Y:`Flip in Y`,BACK:`Back`,BACK_IN_DOWN:`Back in down`,BACK_IN_LEFT:`Back in left`,BACK_IN_RIGHT:`Back in right`,BACK_IN_UP:`Back in up`,LIGHT_SPEED:`Light speed`,LIGHT_SPEED_IN_RIGHT:`Light speed in right`,LIGHT_SPEED_IN_LEFT:`Light speed in left`},EXIT:{BOUNCE:`Bounce`,BOUNCE_OUT:`Bounce out`,BOUNCE_OUT_LEFT:`Bounce out left`,BOUNCE_OUT_RIGHT:`Bounce out right`,BOUNCE_OUT_UP:`Bounce out up`,BOUNCE_OUT_DOWN:`Bounce out down`,FADE:`Fade`,FADE_OUT:`Fade out`,FADE_OUT_DOWN:`Fade out down`,FADE_OUT_DOWN_BIG:`Fade out down big`,FADE_OUT_LEFT:`Fade out left`,FADE_OUT_LEFT_BIG:`Fade out left big`,FADE_OUT_RIGHT:`Fade out right`,FADE_OUT_RIGHT_BIG:`Fade out right big`,FADE_OUT_UP:`Fade out up`,FADE_OUT_UP_BIG:`Fade out up big`,FADE_OUT_TOP_LEFT:`Fade out top-left`,FADE_OUT_TOP_RIGHT:`Fade out top-right`,FADE_OUT_BOTTOM_LEFT:`Fade out bottom-left`,FADE_OUT_BOTTOM_RIGHT:`Fade out bottom-right`,ROTATE:`Rotate`,ROTATE_OUT:`Rotate out`,ROTATE_OUT_DOWN_LEFT:`Rotate out down left`,ROTATE_OUT_DOWN_RIGHT:`Rotate out down right`,ROTATE_OUT_UP_LEFT:`Rotate out up left`,ROTATE_OUT_UP_RIGHT:`Rotate out up right`,ZOOM:`Zoom`,ZOOM_OUT:`Zoom out`,ZOOM_OUT_DOWN:`Zoom out down`,ZOOM_OUT_LEFT:`Zoom out left`,ZOOM_OUT_RIGHT:`Zoom out right`,ZOOM_OUT_UP:`Zoom out up`,SLIDE:`Slide`,SLIDE_OUT_DOWN:`Slide out down`,SLIDE_OUT_LEFT:`Slide out left`,SLIDE_OUT_RIGHT:`Slide out right`,SLIDE_OUT_UP:`Slide out up`,FLIP:`Flip`,FLIP_OUT_X:`Flip out X`,FLIP_OUT_Y:`Flip out Y`,BACK:`Back`,BACK_OUT_DOWN:`Back out down`,BACK_OUT_LEFT:`Back out left`,BACK_OUT_RIGHT:`Back out right`,BACK_OUT_UP:`Back out up`,LIGHT_SPEED:`Light speed`,LIGHT_SPEED_OUT_RIGHT:`Light speed out right`,LIGHT_SPEED_OUT_LEFT:`Light speed out left`},ATTENTION:{SHAKE:`Shake`,SHAKE_X:`Shake X`,SHAKE_Y:`Shake Y`,HEAD_SHAKE:`Head shake`,SWING:`Swing`,WOBBLE:`Wobble`,TADA:`Tada`,JELLO:`Jello`,OTHER:`Other`,BOUNCE:`Bounce`,FLASH:`Flash`,PULSE:`Pulse`,RUBBER_BAND:`Rubber band`,HEART_BEAT:`Heart beat (fast)`},SLIDE:{NO:`None`,RANDOM:`Random`,SLIDE_X:`Slide X`,SLIDE_Y:`Slide Y`,SLIDE_X_3D:`Slide X (3D)`,SLIDE_Y_3D:`Slide Y (3D)`,FADE:`Fade`,ROTATE:`Rotate`,SCALE_Y:`Expand Y`,SCALE_X:`Expand X`,SCALE:`Scale up`,SCALE_REVERSE:`Scale down`}},SLIDE_ANIMATION:{APPLY_ALL:`Apply to all`,APPLIED_ALL:`Applied to all`},ELEMENT_ANIMATION:{ADD:`Add animation`,TIP_SELECT:`Select an element on the canvas to add animation`,DURATION:`Duration:`,TRIGGER:`Trigger:`,TRIGGER_CLICK:`On click`,TRIGGER_WITH_PREVIOUS:`With previous`,TRIGGER_AFTER_PREVIOUS:`After previous`,CHANGE:`Change animation`,STOP_PREVIEW:`Stop preview`,PREVIEW_ALL:`Preview all`,TAB_IN:`Entrance`,TAB_OUT:`Exit`,TAB_ATTENTION:`Emphasis`},LINE_STYLE:{STYLE:`Line style:`,COLOR:`Line color:`,WIDTH:`Line width:`,START:`Start marker:`,END:`End marker:`,SWAP:`Swap direction`},PPT_COMPONENTS:{THUMBNAIL_LOADING:`Loading...`,TABLE_DBLCLICK_EDIT:`Double-click to edit`,VIDEO_LOAD_ERROR:`Video failed to load`,VIDEO_SPEED:`Speed`,VIDEO_LOOP:`Loop`,VIDEO_LOOP_ON:`On`,VIDEO_LOOP_OFF:`Off`,FONT_LOAD_TIP:`Fonts take time to load. Please wait.`,TABLE_CONTEXT:{INSERT_COL:`Insert column`,INSERT_COL_LEFT:`To left`,INSERT_COL_RIGHT:`To right`,INSERT_ROW:`Insert row`,INSERT_ROW_TOP:`Above`,INSERT_ROW_BOTTOM:`Below`,DELETE_COL:`Delete column`,DELETE_ROW:`Delete row`,MERGE_CELLS:`Merge cells`,SPLIT_CELLS:`Unmerge cells`,SELECT_COL:`Select column`,SELECT_ROW:`Select row`,SELECT_ALL:`Select all cells`}}},We={zhCn:`zh-cn`,en:`en`},Ge=Symbol(`ai-ppt-edit-i18n`),Ke=null,qe={[We.zhCn]:He,[We.en]:Ue},Je=null,Ye=e=>!e||String(e).toLowerCase().startsWith(`zh`)?We.zhCn:We.en,Xe=()=>Ke||(Ke=Ye(typeof navigator>`u`?``:navigator.language||navigator.userLanguage),Ke),Ze=(e,t)=>{if(!e||!t)return;if(Object.prototype.hasOwnProperty.call(e,t))return e[t];let n=String(t).split(`.`),r=e;for(let e of n)if(r&&Object.prototype.hasOwnProperty.call(r,e))r=r[e];else return;return r},Qe=(e,t)=>!t||typeof e!=`string`?e:e.replace(/\{(\w+)\}/g,(e,n)=>Object.prototype.hasOwnProperty.call(t,n)?String(t[n]):`{${n}}`),$e=e=>{let t=qe[Xe()],n=qe[We.zhCn];return Ze(t,e)??Ze(n,e)},et=(e,t={})=>{if(typeof Je==`function`)return Je(e,t);let n=$e(e);return n?Qe(n,t):e},tt=e=>{Ke=Ye(e)},nt=()=>Xe(),rt=()=>nt()===We.en,it=(e={})=>{Object.keys(e).forEach(t=>{let n=Ye(t);qe[n]={...qe[n]||{},...e[t]}})},at=(e={})=>{let{t,locale:n,messages:r}=e;typeof t==`function`&&(Je=t),n&&tt(n),r&&typeof r==`object`&&it(r)},z=()=>{let e=(0,l.inject)(Ge,null);if(e&&typeof e.t==`function`)return e;let t=(0,l.getCurrentInstance)()?.appContext?.config?.globalProperties?.t;return typeof t==`function`?{t}:{t:et}},ot=m.default.create({timeout:1e3*300});ot.interceptors.request.use(e=>(e.kebabToCamel&&e.data&&(e.data=Ve(e.data)),e),e=>Promise.reject(e)),ot.interceptors.response.use(e=>(e.data=e.config.kebabToCamel?ze(e.data):e.data,e.status>=200&&e.status<400?Promise.resolve(e.data):(R.error(et(`REQUEST.UNKNOWN_ERROR`)),Promise.reject(e))),e=>e&&e.response?(e.response.status>=400&&e.response.status<500||e.response.status>=500||R.error(et(`REQUEST.SERVER_UNKNOWN_ERROR`)),Promise.reject(e.message)):(R.error(et(`REQUEST.CONNECTION_FAIL`)),Promise.reject(e)));var st={serverBaseUrl:``,assetsUrl:``},ct=e=>{Object.assign(st,e)},lt=()=>st.serverBaseUrl,ut=()=>st.assetsUrl,dt=`/`,ft=dt.endsWith(`/`)?dt:`${dt}/`,pt=e=>e?`${ft}${e.replace(/^\/+/,``)}`:``,mt=e=>typeof e==`string`&&(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`//`)||e.startsWith(`data:`)),ht=e=>{if(typeof e!=`string`)return e;let t=ut();if(!t)return e;let n=t.endsWith(`/`)?t.slice(0,-1):t,r=[n,`/ai/ppt/ai-ppt-assets`,`/ai-ppt-assets`].find(t=>e.startsWith(t));return r?`${n}${e.slice(r.length)}`:e},gt=e=>{if(typeof e!=`string`||mt(e))return e;let t=e.trim(),n=ht(t);return n===t?(t.startsWith(`../`)&&(t=t.slice(3)),t.startsWith(`./`)&&(t=t.slice(2)),t.startsWith(`/`)&&(t=t.slice(1)),t.startsWith(`template/images/`)?pt(t):e):n},_t={template_6:`jpeg`},vt=e=>e?pt(`template/${e}.${_t[e]||`jpg`}`):``,yt=e=>{if(!e||!Array.isArray(e.slides))return e;let t=e.slides.map(e=>{let t={...e};if(t.background&&typeof t.background==`object`&&t.background.src){let e=gt(t.background.src);e!==t.background.src&&(t.background={...t.background,src:e})}if(t.background&&typeof t.background==`object`&&t.background.image&&typeof t.background.image==`object`&&t.background.image.src){let e=gt(t.background.image.src);e!==t.background.image.src&&(t.background={...t.background,image:{...t.background.image,src:e}})}return Array.isArray(t.elements)&&(t.elements=t.elements.map(e=>{if(e&&e.type===`image`&&e.src){let t=gt(e.src);if(t!==e.src)return{...e,src:t}}return e})),t});return{...e,slides:t}},bt=e=>{if(Array.isArray(e))return e.map(e=>{if(!e||!e.src)return e;let t=gt(e.src);return t===e.src?e:{...e,src:t}});if(e&&typeof e==`object`){let t={};for(let[n,r]of Object.entries(e))t[n]=gt(r);return t}return e},xt=e=>!e||typeof e!=`string`||e.endsWith(`_en`)?e:`${e}_en`,St=e=>!e||typeof e!=`string`||e.includes(`_en_images/`)?e:e.replace(/([^/]+)_images\/images_info\.json$/,`$1_en_images/images_info.json`),Ct=async(e,t,n)=>{try{return n(await ot.get(e))}catch(r){if(!t||t===e)throw r;return n(await ot.get(t))}},wt={getTemplates(e){let t=rt()?xt(e):e;return Ct(`${ut()}/template/${t}.json`,`${ut()}/template/${e}.json`,yt)},getImageList(e){let t=rt()?St(e):e;return Ct(`${ut()}/template/images/${t}`,`${ut()}/template/images/${e}`,bt)},getAIPPTData(e){return ot.get(`${lt()}/api/v1/ppt/data/${e}`,{kebabToCamel:!0})},saveAIPPTData(e){return ot.put(`${lt()}/api/v1/ppt/save`,e,{kebabToCamel:!0})}},Tt=[{name:`CMI1`,nameKey:`TEMPLATE_LIST.CMI1`,id:`template_7`,imageList:`template_7_images/images_info.json`,cover:vt(`template_7`)},{name:`CMI2`,nameKey:`TEMPLATE_LIST.CMI2`,id:`template_5`,imageList:`template_5_images/images_info.json`,cover:vt(`template_5`)},{name:`CMI3`,nameKey:`TEMPLATE_LIST.CMI3`,id:`template_6`,imageList:`template_6_images/images_info.json`,cover:vt(`template_6`)},{name:`红色通用`,nameKey:`TEMPLATE_LIST.RED_GENERAL`,id:`template_1`,imageList:`template_1_images/images_info.json`,cover:vt(`template_1`)},{name:`蓝色通用`,nameKey:`TEMPLATE_LIST.BLUE_GENERAL`,id:`template_2`,imageList:`template_2_images/images_info.json`,cover:vt(`template_2`)},{name:`紫色通用`,nameKey:`TEMPLATE_LIST.PURPLE_GENERAL`,id:`template_3`,imageList:`template_3_images/images_info.json`,cover:vt(`template_3`)},{name:`莫兰迪配色`,nameKey:`TEMPLATE_LIST.MORANDI`,id:`template_4`,imageList:`template_4_images/images_info.json`,cover:vt(`template_4`)}],Et=()=>rt()?`DM-Sans`:`Msyh`,Dt=[{label:`微软雅黑`,value:`Msyh`,labelKey:`FONT.NAME.MICROSOFT_YAHEI`},{label:`DM-Sans`,value:`DM-Sans`,labelKey:`FONT.NAME.DM_SANS`},{label:`思源黑体`,value:`SourceHanSans`,labelKey:`FONT.NAME.SOURCE_HAN_SANS`},{label:`思源宋体`,value:`SourceHanSerif`,labelKey:`FONT.NAME.SOURCE_HAN_SERIF`},{label:`方正黑体`,value:`FangZhengHeiTi`,labelKey:`FONT.NAME.FZ_HEITI`},{label:`方正楷体`,value:`FangZhengKaiTi`,labelKey:`FONT.NAME.FZ_KAITI`},{label:`方正宋体`,value:`FangZhengShuSong`,labelKey:`FONT.NAME.FZ_SONG`},{label:`方正仿宋`,value:`FangZhengFangSong`,labelKey:`FONT.NAME.FZ_FANGSONG`},{label:`阿里巴巴普惠体`,value:`AlibabaPuHuiTi`,labelKey:`FONT.NAME.ALIBABA_PUHUI`},{label:`朱雀仿宋`,value:`ZhuQueFangSong`,labelKey:`FONT.NAME.ZHUQUE_FANGSONG`},{label:`霞鹜文楷`,value:`LXGWWenKai`,labelKey:`FONT.NAME.LXGW_WENKAI`},{label:`文鼎PL楷体`,value:`WenDingPLKaiTi`,labelKey:`FONT.NAME.WENDING_PL_KAITI`},{label:`得意黑`,value:`DeYiHei`,labelKey:`FONT.NAME.DEYI_HEI`},{label:`MiSans`,value:`MiSans`,labelKey:`FONT.NAME.MISANS`},{label:`仓耳小丸子`,value:`CangerXiaowanzi`,labelKey:`FONT.NAME.CANGER_XIAOWANZI`},{label:`优设标题黑`,value:`YousheTitleBlack`,labelKey:`FONT.NAME.YOUSHE_TITLE_BLACK`},{label:`峰广明锐体`,value:`FengguangMingrui`,labelKey:`FONT.NAME.FENGGUANG_MINGRUI`},{label:`摄图摩登小方体`,value:`ShetuModernSquare`,labelKey:`FONT.NAME.SHETU_MODERN_SQUARE`},{label:`站酷快乐体`,value:`ZcoolHappy`,labelKey:`FONT.NAME.ZCOOL_HAPPY`},{label:`字制区喜脉体`,value:`ZizhiQuXiMai`,labelKey:`FONT.NAME.ZIZHI_QU_XIMAI`},{label:`素材集市康康体`,value:`SucaiJishiKangkang`,labelKey:`FONT.NAME.SUCAI_JISHI_KANGKANG`},{label:`素材集市酷方体`,value:`SucaiJishiCoolSquare`,labelKey:`FONT.NAME.SUCAI_JISHI_COOL_SQUARE`},{label:`途牛类圆体`,value:`TuniuRounded`,labelKey:`FONT.NAME.TUNIU_ROUNDED`},{label:`锐字真言体`,value:`RuiziZhenyan`,labelKey:`FONT.NAME.RUIZI_ZHENYAN`}],Ot=e=>Dt.map(t=>({...t,label:e&&t.labelKey?e(t.labelKey):t.label})),kt=(0,f.customAlphabet)(`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,10),At=(0,d.defineStore)(`slides`,{state:()=>({title:`未命名演示文稿`,theme:{themeColors:[`#5b9bd5`,`#ed7d31`,`#a5a5a5`,`#ffc000`,`#4472c4`,`#70ad47`],fontColor:`#333`,fontName:Et(),backgroundColor:`#fff`,shadow:{h:3,v:3,blur:2,color:`#808080`},outline:{width:2,color:`#525252`,style:`solid`}},slides:[{id:kt(),elements:[]}],slideIndex:0,viewportSize:1e3,viewportRatio:.5625,templates:Tt}),getters:{currentSlide(e){return e.slides[e.slideIndex]},currentSlideAnimations(e){let t=e.slides[e.slideIndex];if(!t?.animations)return[];let n=t.elements.map(e=>e.id);return t.animations.filter(e=>n.includes(e.elId))},formatedAnimations(e){let t=e.slides[e.slideIndex];if(!t?.animations)return[];let n=t.elements.map(e=>e.id),r=t.animations.filter(e=>n.includes(e.elId)),i=[];for(let e of r)if(e.trigger===`click`||!i.length)i.push({animations:[e],autoNext:!1});else if(e.trigger===`meantime`){let t=i[i.length-1];t.animations=t.animations.filter(t=>t.elId!==e.elId),t.animations.push(e),i[i.length-1]=t}else if(e.trigger===`auto`){let t=i[i.length-1];t.autoNext=!0,i[i.length-1]=t,i.push({animations:[e],autoNext:!1})}return i}},actions:{setTitle(e){e?(this.title=e,document.title=e):this.title=`未命名演示文稿`},setTheme(e){this.theme={...this.theme,...e}},setViewportSize(e){this.viewportSize=e},setViewportRatio(e){this.viewportRatio=e},setSlides(e){this.slides=e},setTemplates(e){this.templates=e},resetSlides(){this.slides=[{id:kt(),elements:[]}],this.slideIndex=0},addSlide(e){let t=Array.isArray(e)?e:[e];for(let e of t)e.sectionTag&&delete e.sectionTag;if(this.slides.length===1&&this.slides[0].elements.length===0){this.slides=t,this.slideIndex=0;return}let n=this.slideIndex+1;this.slides.splice(n,0,...t),this.slideIndex=n},addSlideToEnd(e){let t=Array.isArray(e)?e:[e];for(let e of t)e.sectionTag&&delete e.sectionTag;if(this.slides.length===1&&this.slides[0].elements.length===0){this.slides=t,this.slideIndex=0;return}this.slides.push(...t),this.slideIndex=this.slides.length-1},updateSlide(e,t){let n=t?this.slides.findIndex(e=>e.id===t):this.slideIndex;this.slides[n]={...this.slides[n],...e}},removeSlideProps(e){let{id:t,propName:n}=e;this.slides=this.slides.map(e=>e.id===t?(0,u.omit)(e,n):e)},deleteSlide(e){let t=Array.isArray(e)?e:[e],n=JSON.parse(JSON.stringify(this.slides)),r=[];for(let e of t){let t=n.findIndex(t=>t.id===e);r.push(t);let i=n[t].sectionTag;if(i){let e=n[t+1];e&&!e.sectionTag&&(delete n[t].sectionTag,n[t+1].sectionTag=i)}n.splice(t,1)}let i=Math.min(...r),a=n.length-1;i>a&&(i=a),this.slideIndex=i,this.slides=n},updateSlideIndex(e){this.slideIndex=e},addElement(e){let t=Array.isArray(e)?e:[e],n=[...this.slides[this.slideIndex].elements,...t];this.slides[this.slideIndex].elements=n},deleteElement(e){let t=Array.isArray(e)?e:[e],n=this.slides[this.slideIndex].elements.filter(e=>!t.includes(e.id));this.slides[this.slideIndex].elements=n},updateElement(e){let{id:t,props:n,slideId:r}=e,i=typeof t==`string`?[t]:t,a=r?this.slides.findIndex(e=>e.id===r):this.slideIndex,o=this.slides[a].elements.map(e=>i.includes(e.id)?{...e,...n}:e);this.slides[a].elements=o},removeElementProps(e){let{id:t,propName:n}=e,r=typeof n==`string`?[n]:n,i=this.slideIndex,a=this.slides[i].elements.map(e=>e.id===t?(0,u.omit)(e,r):e);this.slides[i].elements=a}}}),jt=(0,f.customAlphabet)(`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`),Mt=jt(10),Nt=(0,d.defineStore)(`main`,{state:()=>({activeElementIdList:[],handleElementId:``,activeGroupElementId:``,hiddenElementIdList:[],canvasPercentage:90,canvasScale:1,canvasDragged:!1,thumbnailsFocus:!1,editorAreaFocus:!1,disableHotkeys:!1,gridLineSize:0,showRuler:!1,creatingElement:null,creatingCustomShape:!1,toolbarState:oe.SLIDE_DESIGN,clipingImageElementId:``,richTextAttrs:we,selectedTableCells:[],isScaling:!1,selectedSlidesIndex:[],dialogForExport:``,databaseId:Mt,textFormatPainter:null,shapeFormatPainter:null,showSelectPanel:!1,showSearchPanel:!1,showNotesPanel:!1,showSymbolPanel:!1,showMarkupPanel:!1,showAIPPTDialog:!1,isGenerating:!1,sessionId:jt(),isOutlineFromFile:!1,generateFromUploadedFile:!1,generateFromWebSearch:!1,disabled:!1}),getters:{activeElementList(e){let t=At(ae).currentSlide;return!t||!t.elements?[]:t.elements.filter(t=>e.activeElementIdList.includes(t.id))},handleElement(e){let t=At(ae).currentSlide;return!t||!t.elements?null:t.elements.find(t=>e.handleElementId===t.id)||null}},actions:{setActiveElementIdList(e){e.length===1?this.handleElementId=e[0]:this.handleElementId=``,this.activeElementIdList=e},setHandleElementId(e){this.handleElementId=e},setActiveGroupElementId(e){this.activeGroupElementId=e},setHiddenElementIdList(e){this.hiddenElementIdList=e},setCanvasPercentage(e){this.canvasPercentage=e},setCanvasScale(e){this.canvasScale=e},setCanvasDragged(e){this.canvasDragged=e},setThumbnailsFocus(e){this.thumbnailsFocus=e},setEditorareaFocus(e){this.editorAreaFocus=e},setDisableHotkeysState(e){this.disableHotkeys=e},setGridLineSize(e){this.gridLineSize=e},setRulerState(e){this.showRuler=e},setCreatingElement(e){this.creatingElement=e},setCreatingCustomShapeState(e){this.creatingCustomShape=e},setToolbarState(e){this.toolbarState=e},setClipingImageElementId(e){this.clipingImageElementId=e},setRichtextAttrs(e){this.richTextAttrs=e},setSelectedTableCells(e){this.selectedTableCells=e},setScalingState(e){this.isScaling=e},updateSelectedSlidesIndex(e){this.selectedSlidesIndex=e},setDialogForExport(e){this.dialogForExport=e},setTextFormatPainter(e){this.textFormatPainter=e},setShapeFormatPainter(e){this.shapeFormatPainter=e},setSelectPanelState(e){this.showSelectPanel=e},setSearchPanelState(e){this.showSearchPanel=e},setNotesPanelState(e){this.showNotesPanel=e},setSymbolPanelState(e){this.showSymbolPanel=e},setMarkupPanelState(e){this.showMarkupPanel=e},setAIPPTDialogState(e){this.showAIPPTDialog=e},setGenerating(e){this.isGenerating=e},setOutlineFromFile(e){this.isOutlineFromFile=e},setGenerateFromUploadedFile(e){this.generateFromUploadedFile=e},setGenerateFromWebSearch(e){this.generateFromWebSearch=e},setDisabled(e){this.disabled=e}}}),Pt=new h.default(`PPTist_${Mt}_${new Date().getTime()}`);Pt.version(1).stores({snapshots:`++id`,writingBoardImgs:`id`});var Ft=(0,d.defineStore)(`snapshot`,{state:()=>({snapshotCursor:-1,snapshotLength:0}),getters:{canUndo(e){return e.snapshotCursor>0},canRedo(e){return e.snapshotCursor<e.snapshotLength-1}},actions:{setSnapshotCursor(e){this.snapshotCursor=e},setSnapshotLength(e){this.snapshotLength=e},async initSnapshotDatabase(){let e=At(ae),t={index:e.slideIndex,slides:JSON.parse(JSON.stringify(e.slides))};await Pt.snapshots.add(t),this.setSnapshotCursor(0),this.setSnapshotLength(1)},async addSnapshot(){let e=At(ae),t=await Pt.snapshots.orderBy(`id`).keys(),n=[];this.snapshotCursor>=0&&this.snapshotCursor<t.length-1&&(n=t.slice(this.snapshotCursor+1));let r={index:e.slideIndex,slides:JSON.parse(JSON.stringify(e.slides))};await Pt.snapshots.add(r);let i=t.length-n.length+1;i>20&&(n.push(t[0]),i--),i>=2&&Pt.snapshots.update(t[i-2],{index:e.slideIndex}),await Pt.snapshots.bulkDelete(n),this.setSnapshotCursor(i-1),this.setSnapshotLength(i)},async unDo(){if(this.snapshotCursor<=0)return;let e=At(ae),t=Nt(ae),n=this.snapshotCursor-1,{index:r,slides:i}=(await Pt.snapshots.orderBy(`id`).toArray())[n],a=r>i.length-1?i.length-1:r;e.setSlides(i),e.updateSlideIndex(a),this.setSnapshotCursor(n),t.setActiveElementIdList([])},async reDo(){if(this.snapshotCursor>=this.snapshotLength-1)return;let e=At(ae),t=Nt(ae),n=this.snapshotCursor+1,{index:r,slides:i}=(await Pt.snapshots.orderBy(`id`).toArray())[n],a=r>i.length-1?i.length-1:r;e.setSlides(i),e.updateSlideIndex(a),this.setSnapshotCursor(n),t.setActiveElementIdList([])}}}),It=(0,d.defineStore)(`keyboard`,{state:()=>({ctrlKeyState:!1,shiftKeyState:!1,spaceKeyState:!1}),getters:{ctrlOrShiftKeyActive(e){return e.ctrlKeyState||e.shiftKeyState}},actions:{setCtrlKeyState(e){this.ctrlKeyState=e},setShiftKeyState(e){this.shiftKeyState=e},setSpaceKeyState(e){this.spaceKeyState=e}}}),Lt=(0,d.defineStore)(`screen`,{state:()=>({screening:!1}),actions:{setScreening(e){this.screening=e}}}),B=()=>Nt(ae),V=()=>At(ae),Rt=()=>Ft(ae),zt=()=>It(ae),Bt=()=>Lt(ae),Vt=e=>{let{left:t,top:n,width:r,height:i,rotate:a=0}=e,o=Math.sqrt(r**2+i**2)/2,s=Math.atan(i/r)*180/Math.PI,c=(180-a-s)*Math.PI/180,l=(s-a)*Math.PI/180,u=t+r/2,d=n+i/2,f=[u+o*Math.cos(c),u+o*Math.cos(l),u-o*Math.cos(c),u-o*Math.cos(l)],p=[d-o*Math.sin(c),d-o*Math.sin(l),d+o*Math.sin(c),d+o*Math.sin(l)];return{xRange:[Math.min(...f),Math.max(...f)],yRange:[Math.min(...p),Math.max(...p)]}},Ht=e=>{let{xRange:t,yRange:n}=Vt({left:e.left,top:e.top,width:e.width,height:e.height,rotate:0}),{xRange:r,yRange:i}=Vt({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});return{offsetX:r[0]-t[0],offsetY:i[0]-n[0]}},Ut=e=>{let t,n,r,i;if(e.type===`line`)t=e.left,n=e.left+Math.max(e.start[0],e.end[0]),r=e.top,i=e.top+Math.max(e.start[1],e.end[1]);else if(`rotate`in e&&e.rotate){let{left:a,top:o,width:s,height:c,rotate:l}=e,{xRange:u,yRange:d}=Vt({left:a,top:o,width:s,height:c,rotate:l});t=u[0],n=u[1],r=d[0],i=d[1]}else t=e.left,n=e.left+e.width,r=e.top,i=e.top+e.height;return{minX:t,maxX:n,minY:r,maxY:i}},Wt=e=>{let t=[],n=[],r=[],i=[];return e.forEach(e=>{let{minX:a,maxX:o,minY:s,maxY:c}=Ut(e);t.push(a),n.push(s),r.push(o),i.push(c)}),{minX:Math.min(...t),maxX:Math.max(...r),minY:Math.min(...n),maxY:Math.max(...i)}},Gt=e=>{let t=e.end[0]-e.start[0],n=e.end[1]-e.start[1];return Math.sqrt(t*t+n*n)},Kt=e=>{let t=[];return e.forEach(e=>{let n=t.findIndex(t=>t.value===e.value);if(n===-1)t.push(e);else{let r=t[n],i=[Math.min(r.range[0],e.range[0]),Math.max(r.range[1],e.range[1])];t[n]={value:e.value,range:i}}}),t},qt=e=>{let t={};for(let n of e)t[n.id]=(0,f.nanoid)(10);return t},Jt=e=>{let t={},n={};for(let r of e){let e=r.groupId;e&&!t[e]&&(t[e]=(0,f.nanoid)(10)),n[r.id]=(0,f.nanoid)(10)}return{groupIdMap:t,elIdMap:n}},Yt=(e,t)=>{if(!e||!t)return e;if(e.type===`text`&&!e.defaultFontName&&(e.defaultFontName=t),e.type===`shape`&&e.text&&!e.text.defaultFontName&&(e.text.defaultFontName=t),e.type===`table`&&Array.isArray(e.data))for(let n of e.data)for(let e of n)e.style=e.style||{},e.style.fontname||(e.style.fontname=t);return e},Xt=(e,t)=>{if(!e||!Array.isArray(e.elements)||!t)return e;for(let n of e.elements)Yt(n,t);return e},Zt=(e,t)=>{if(!Array.isArray(e)||!t)return e;for(let n of e)Xt(n,t);return e},Qt=e=>{let t=(0,g.default)(e);return[t.setAlpha(.3).toRgbString(),t.setAlpha(.1).toRgbString()]},$t=e=>{let t=e.start.join(`,`),n=e.end.join(`,`);if(e.broken)return`M${t} L${e.broken.join(`,`)} L${n}`;if(e.broken2){let{minX:r,maxX:i,minY:a,maxY:o}=Ut(e);return i-r>=o-a?`M${t} L${e.broken2[0]},${e.start[1]} L${e.broken2[0]},${e.end[1]} ${n}`:`M${t} L${e.start[0]},${e.broken2[1]} L${e.end[0]},${e.broken2[1]} ${n}`}else if(e.curve)return`M${t} Q${e.curve.join(`,`)} ${n}`;else if(e.cubic){let[r,i]=e.cubic;return`M${t} C${r.join(`,`)} ${i.join(`,`)} ${n}`}return`M${t} L${n}`},en=(e,t)=>{let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return n.top>=r.top&&n.bottom<=r.bottom},tn=()=>{let e=Rt();return{addHistorySnapshot:(0,u.debounce)(function(){e.addSnapshot()},300,{trailing:!0}),redo:(0,u.throttle)(function(){e.reDo()},100,{leading:!0,trailing:!1}),undo:(0,u.throttle)(function(){e.unDo()},100,{leading:!0,trailing:!1})}},nn=()=>{let e=B(),t=V(),{currentSlide:n}=(0,d.storeToRefs)(t),{addHistorySnapshot:r}=tn();return{addElementsFromData:i=>{let{groupIdMap:a,elIdMap:o}=Jt(i),s=i[0],c=0,l;do l=n.value.elements.find(e=>{if(e.type!==s.type)return!1;let{minX:t,maxX:n,minY:r,maxY:i}=Ut(e),{minX:a,maxX:o,minY:l,maxY:u}=Ut({...s,left:s.left+c,top:s.top+c});return t===a&&n===o&&r===l&&i===u}),l&&(c+=10);while(l);for(let e of i)e.id=o[e.id],e.left+=c,e.top+=c,e.groupId&&=a[e.groupId];t.addElement(i),e.setActiveElementIdList(Object.values(o)),r()},addSlidesFromData:e=>{let n=qt(e),i=e.map(e=>{let{groupIdMap:t,elIdMap:r}=Jt(e.elements);for(let i of e.elements)i.id=r[i.id],i.groupId&&=t[i.groupId],i.link&&i.link.type===`slide`&&(n[i.link.target]?i.link.target=n[i.link.target]:delete i.link);if(e.animations)for(let t of e.animations)t.id=(0,f.nanoid)(10),t.elId=r[t.elId];return{...e,id:n[e.id]}});t.addSlide(i),r()},addSlidesFromDataToEnd:e=>{let n=qt(e),i=e.map(e=>{let{groupIdMap:t,elIdMap:r}=Jt(e.elements);for(let i of e.elements)i.id=r[i.id],i.groupId&&=t[i.groupId],i.link&&i.link.type===`slide`&&(n[i.link.target]?i.link.target=n[i.link.target]:delete i.link);if(e.animations)for(let t of e.animations)t.id=(0,f.nanoid)(10),t.elId=r[t.elId];return{...e,id:n[e.id]}});t.addSlideToEnd(i),r()}}},rn=`pptist`,an=e=>v.default.AES.encrypt(e,rn).toString(),on=e=>v.default.AES.decrypt(e,rn).toString(v.default.enc.Utf8),sn=e=>new Promise((t,n)=>{let r=document.createElement(`button`),i=new _.default(r,{text:()=>e,action:()=>`copy`,container:document.body});i.on(`success`,e=>{i.destroy(),t(e)}),i.on(`error`,e=>{i.destroy(),n(e)}),document.body.appendChild(r),r.click(),document.body.removeChild(r)}),cn=()=>new Promise((e,t)=>{navigator.clipboard?.readText?navigator.clipboard.readText().then(n=>(n||t(`剪贴板为空或者不包含文本`),e(n))):t(`浏览器不支持或禁止访问剪贴板,请使用快捷键 Ctrl + V`)}),ln=e=>{let t;try{t=JSON.parse(on(e))}catch{t=e}return t},un=e=>{let t=e.split(`\r
16
16
  `);t[t.length-1]===``&&t.pop();let n=-1,r=[];for(let e in t){if(r[e]=t[e].split(` `),r[e].length===1)return null;if(n===-1)n=r[e].length;else if(n!==r[e].length)return null}return r},dn=e=>{let t=new DOMParser().parseFromString(e,`text/html`).querySelector(`table`),n=[];if(!t)return n;let r=t.querySelectorAll(`tr`);for(let e of r){let t=[],r=e.querySelectorAll(`td, th`);for(let e of r){let n=e.textContent?e.textContent.trim():``,r=parseInt(e.getAttribute(`colspan`)||`1`,10);for(let e=0;e<r;e++)t.push(n)}n.push(t)}return n},H;(function(e){e.C=`C`,e.X=`X`,e.Z=`Z`,e.Y=`Y`,e.A=`A`,e.G=`G`,e.L=`L`,e.F=`F`,e.D=`D`,e.B=`B`,e.P=`P`,e.O=`O`,e.R=`R`,e.T=`T`,e.MINUS=`-`,e.EQUAL=`=`,e.DIGIT_0=`0`,e.DELETE=`DELETE`,e.UP=`ARROWUP`,e.DOWN=`ARROWDOWN`,e.LEFT=`ARROWLEFT`,e.RIGHT=`ARROWRIGHT`,e.ENTER=`ENTER`,e.SPACE=` `,e.TAB=`TAB`,e.BACKSPACE=`BACKSPACE`,e.ESC=`ESCAPE`,e.PAGEUP=`PAGEUP`,e.PAGEDOWN=`PAGEDOWN`,e.F5=`F5`})(H||={});var fn=[{type:`通用`,typeKey:`HOTKEY.GENERAL.TITLE`,children:[{label:`剪切`,labelKey:`HOTKEY.GENERAL.CUT`,value:`Ctrl + X`},{label:`复制`,labelKey:`HOTKEY.GENERAL.COPY`,value:`Ctrl + C`},{label:`粘贴`,labelKey:`HOTKEY.GENERAL.PASTE`,value:`Ctrl + V`},{label:`粘贴为纯文本`,labelKey:`HOTKEY.GENERAL.PASTE_PLAIN`,value:`Ctrl + Shift + V`},{label:`快速复制粘贴`,labelKey:`HOTKEY.GENERAL.DUPLICATE`,value:`Ctrl + D`},{label:`全选`,labelKey:`HOTKEY.GENERAL.SELECT_ALL`,value:`Ctrl + A`},{label:`撤销`,labelKey:`HOTKEY.GENERAL.UNDO`,value:`Ctrl + Z`},{label:`恢复`,labelKey:`HOTKEY.GENERAL.REDO`,value:`Ctrl + Y`},{label:`删除`,labelKey:`HOTKEY.GENERAL.DELETE`,value:`Delete / Backspace`},{label:`多选`,labelKey:`HOTKEY.GENERAL.MULTI_SELECT`,value:`按住 Ctrl 或 Shift`,valueKey:`HOTKEY.VALUE.HOLD_CTRL_SHIFT`},{label:`打开搜索替换`,labelKey:`HOTKEY.GENERAL.SEARCH_REPLACE`,value:`Ctrl + F`},{label:`打印`,labelKey:`HOTKEY.GENERAL.PRINT`,value:`Ctrl + P`},{label:`关闭弹窗`,labelKey:`HOTKEY.GENERAL.CLOSE_DIALOG`,value:`ESC`}]},{type:`幻灯片放映`,typeKey:`HOTKEY.SLIDESHOW.TITLE`,children:[{label:`从头开始放映幻灯片`,labelKey:`HOTKEY.SLIDESHOW.START`,value:`F5`},{label:`从当前开始放映幻灯片`,labelKey:`HOTKEY.SLIDESHOW.START_CURRENT`,value:`Shift + F5`},{label:`切换上一页`,labelKey:`HOTKEY.SLIDESHOW.PREV`,value:`↑ / ← / PgUp`},{label:`切换下一页`,labelKey:`HOTKEY.SLIDESHOW.NEXT`,value:`↓ / → / PgDown`},{label:`切换下一页`,labelKey:`HOTKEY.SLIDESHOW.NEXT_ENTER`,value:`Enter / Space`},{label:`退出放映`,labelKey:`HOTKEY.SLIDESHOW.EXIT`,value:`ESC`}]},{type:`幻灯片编辑`,typeKey:`HOTKEY.EDITOR.TITLE`,children:[{label:`新建幻灯片`,labelKey:`HOTKEY.EDITOR.NEW_SLIDE`,value:`Enter`},{label:`移动画布`,labelKey:`HOTKEY.EDITOR.PAN`,value:`Space + 鼠标拖拽`,valueKey:`HOTKEY.VALUE.SPACE_DRAG`},{label:`缩放画布`,labelKey:`HOTKEY.EDITOR.ZOOM`,value:`Ctrl + 鼠标滚轮`,valueKey:`HOTKEY.VALUE.CTRL_SCROLL`},{label:`放大画布`,labelKey:`HOTKEY.EDITOR.ZOOM_IN`,value:`Ctrl + =`},{label:`缩小画布`,labelKey:`HOTKEY.EDITOR.ZOOM_OUT`,value:`Ctrl + -`},{label:`使画布适应当前屏幕`,labelKey:`HOTKEY.EDITOR.FIT_SCREEN`,value:`Ctrl + 0`},{label:`上一页(未选中元素)`,labelKey:`HOTKEY.EDITOR.PREV_NO_SELECTION`,value:`↑`},{label:`下一页(未选中元素)`,labelKey:`HOTKEY.EDITOR.NEXT_NO_SELECTION`,value:`↓`},{label:`上一页`,labelKey:`HOTKEY.EDITOR.PREV`,value:`鼠标上滚 / PgUp`,valueKey:`HOTKEY.VALUE.MOUSE_SCROLL_UP`},{label:`下一页`,labelKey:`HOTKEY.EDITOR.NEXT`,value:`鼠标下滚 / PgDown`,valueKey:`HOTKEY.VALUE.MOUSE_SCROLL_DOWN`},{label:`快速创建文本`,labelKey:`HOTKEY.EDITOR.QUICK_TEXT`,value:`双击空白处 / T`,valueKey:`HOTKEY.VALUE.DOUBLE_CLICK_BLANK_T`},{label:`快速创建矩形`,labelKey:`HOTKEY.EDITOR.QUICK_RECT`,value:`R`},{label:`快速创建圆形`,labelKey:`HOTKEY.EDITOR.QUICK_ELLIPSE`,value:`O`},{label:`快速创建线条`,labelKey:`HOTKEY.EDITOR.QUICK_LINE`,value:`L`},{label:`退出绘制状态`,labelKey:`HOTKEY.EDITOR.EXIT_DRAW`,value:`鼠标右键`,valueKey:`HOTKEY.VALUE.RIGHT_CLICK`}]},{type:`元素操作`,typeKey:`HOTKEY.ELEMENT.TITLE`,children:[{label:`移动`,labelKey:`HOTKEY.ELEMENT.MOVE`,value:`↑ / ← / ↓ / →`},{label:`锁定`,labelKey:`HOTKEY.ELEMENT.LOCK`,value:`Ctrl + L`},{label:`组合`,labelKey:`HOTKEY.ELEMENT.GROUP`,value:`Ctrl + G`},{label:`取消组合`,labelKey:`HOTKEY.ELEMENT.UNGROUP`,value:`Ctrl + Shift + G`},{label:`置顶层`,labelKey:`HOTKEY.ELEMENT.BRING_TO_FRONT`,value:`Alt + F`},{label:`置底层`,labelKey:`HOTKEY.ELEMENT.SEND_TO_BACK`,value:`Alt + B`},{label:`锁定宽高比例`,labelKey:`HOTKEY.ELEMENT.LOCK_RATIO`,value:`按住 Ctrl 或 Shift`,valueKey:`HOTKEY.VALUE.HOLD_CTRL_SHIFT`},{label:`创建水平 / 垂直线条`,labelKey:`HOTKEY.ELEMENT.CREATE_LINE`,value:`按住 Ctrl 或 Shift`,valueKey:`HOTKEY.VALUE.HOLD_CTRL_SHIFT`},{label:`切换焦点元素`,labelKey:`HOTKEY.ELEMENT.SWITCH_FOCUS`,value:`Tab`},{label:`确认图片裁剪`,labelKey:`HOTKEY.ELEMENT.CONFIRM_CROP`,value:`Enter`},{label:`完成自定义形状绘制`,labelKey:`HOTKEY.ELEMENT.FINISH_CUSTOM_SHAPE`,value:`Enter`}]},{type:`表格编辑`,typeKey:`HOTKEY.TABLE.TITLE`,children:[{label:`聚焦到下一个单元格`,labelKey:`HOTKEY.TABLE.NEXT_CELL`,value:`Tab`},{label:`移动焦点单元格`,labelKey:`HOTKEY.TABLE.MOVE_CELL`,value:`↑ / ← / ↓ / →`},{label:`在上方插入一行`,labelKey:`HOTKEY.TABLE.INSERT_ROW_ABOVE`,value:`Ctrl + ↑`},{label:`在下方插入一行`,labelKey:`HOTKEY.TABLE.INSERT_ROW_BELOW`,value:`Ctrl + ↓`},{label:`在左侧插入一列`,labelKey:`HOTKEY.TABLE.INSERT_COL_LEFT`,value:`Ctrl + ←`},{label:`在右侧插入一列`,labelKey:`HOTKEY.TABLE.INSERT_COL_RIGHT`,value:`Ctrl + →`}]},{type:`图表数据编辑`,typeKey:`HOTKEY.CHART.TITLE`,children:[{label:`聚焦到下一行`,labelKey:`HOTKEY.CHART.NEXT_ROW`,value:`Enter`}]},{type:`文本编辑`,typeKey:`HOTKEY.TEXT.TITLE`,children:[{label:`加粗`,labelKey:`HOTKEY.TEXT.BOLD`,value:`Ctrl + B`},{label:`斜体`,labelKey:`HOTKEY.TEXT.ITALIC`,value:`Ctrl + I`},{label:`下划线`,labelKey:`HOTKEY.TEXT.UNDERLINE`,value:`Ctrl + U`},{label:`行内代码`,labelKey:`HOTKEY.TEXT.INLINE_CODE`,value:`Ctrl + E`},{label:`上角标`,labelKey:`HOTKEY.TEXT.SUPERSCRIPT`,value:`Ctrl + ;`},{label:`下角标`,labelKey:`HOTKEY.TEXT.SUBSCRIPT`,value:`Ctrl + '`},{label:`选中段落`,labelKey:`HOTKEY.TEXT.SELECT_PARAGRAPH`,value:`ESC`}]},{type:`其他快捷操作`,typeKey:`HOTKEY.OTHER.TITLE`,children:[{label:`添加图片 - 粘贴来自系统剪贴板的图片`,labelKey:`HOTKEY.OTHER.ADD_IMAGE_PASTE`},{label:`添加图片 - 将本地图片拖拽到画布中`,labelKey:`HOTKEY.OTHER.ADD_IMAGE_DRAG`},{label:`添加图片 - 在画布中粘贴SVG代码`,labelKey:`HOTKEY.OTHER.ADD_IMAGE_PASTE_SVG`},{label:`添加图片 - 粘贴来自 pexels 的图片链接`,labelKey:`HOTKEY.OTHER.ADD_IMAGE_PEXELS`},{label:`添加文本 - 粘贴来自系统剪贴板的文字`,labelKey:`HOTKEY.OTHER.ADD_TEXT_PASTE`},{label:`添加文本 - 将外部选中文字拖拽到画布中`,labelKey:`HOTKEY.OTHER.ADD_TEXT_DRAG`},{label:`文本编辑 - 支持 markdown 语法创建列表和引用`,labelKey:`HOTKEY.OTHER.TEXT_MARKDOWN`}]}],pn=e=>{let t=e.replace(/[\n\r]+/g,`<br>`).split(`<br>`),n=``;for(let e of t)e&&(n+=`<div>${e}</div>`);return n},mn=e=>new Promise(t=>{let n=document.createElement(`img`);n.src=e,n.style.opacity=`0`,document.body.appendChild(n),n.onload=()=>{let e=n.clientWidth,r=n.clientHeight;n.onload=null,n.onerror=null,document.body.removeChild(n),t({width:e,height:r})},n.onerror=()=>{n.onload=null,n.onerror=null}}),hn=e=>new Promise(t=>{let n=new FileReader;n.addEventListener(`load`,()=>{t(n.result)}),n.readAsDataURL(e)}),gn=e=>{if(!/<svg[\s\S]*?>[\s\S]*?<\/svg>/i.test(e))return!1;try{return new DOMParser().parseFromString(e,`image/svg+xml`).documentElement.nodeName===`svg`}catch{return!1}},_n=e=>{let t=new Blob([e],{type:`image/svg+xml`});return new File([t],`${Date.now()}.svg`,{type:`image/svg+xml`})},vn;(function(e){e.ROUND_RECT=`roundRect`,e.ROUND_RECT_DIAGONAL=`roundRectDiagonal`,e.ROUND_RECT_SINGLE=`roundRectSingle`,e.ROUND_RECT_SAMESIDE=`roundRectSameSide`,e.CUT_RECT_DIAGONAL=`cutRectDiagonal`,e.CUT_RECT_SINGLE=`cutRectSingle`,e.CUT_RECT_SAMESIDE=`cutRectSameSide`,e.CUT_ROUND_RECT=`cutRoundRect`,e.MESSAGE=`message`,e.ROUND_MESSAGE=`roundMessage`,e.L=`L`,e.RING_RECT=`ringRect`,e.PLUS=`plus`,e.TRIANGLE=`triangle`,e.PARALLELOGRAM_LEFT=`parallelogramLeft`,e.PARALLELOGRAM_RIGHT=`parallelogramRight`,e.TRAPEZOID=`trapezoid`,e.BULLET=`bullet`,e.INDICATOR=`indicator`})(vn||={});var yn;(function(e){e.TEXT=`text`,e.IMAGE=`image`,e.SHAPE=`shape`,e.LINE=`line`,e.CHART=`chart`,e.TABLE=`table`,e.LATEX=`latex`,e.VIDEO=`video`,e.AUDIO=`audio`})(yn||={});var bn={[vn.ROUND_RECT]:{editable:!0,defaultValue:[.125],range:[[0,.5]],relative:[`left`],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{let r=Math.min(e,t)*n[0];return`M ${r} 0 L ${e-r} 0 Q ${e} 0 ${e} ${r} L ${e} ${t-r} Q ${e} ${t} ${e-r} ${t} L ${r} ${t} Q 0 ${t} 0 ${t-r} L 0 ${r} Q 0 0 ${r} 0 Z`}},[vn.CUT_RECT_DIAGONAL]:{editable:!0,defaultValue:[.2],range:[[0,.9]],relative:[`right`],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{let r=Math.min(e,t)*n[0];return`M 0 ${t-r} L 0 0 L ${e-r} 0 L ${e} ${r} L ${e} ${t} L ${r} ${t} Z`}},[vn.CUT_RECT_SINGLE]:{editable:!0,defaultValue:[.2],range:[[0,.9]],relative:[`right`],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{let r=Math.min(e,t)*n[0];return`M 0 ${t} L 0 0 L ${e-r} 0 L ${e} ${r} L ${e} ${t} Z`}},[vn.CUT_RECT_SAMESIDE]:{editable:!0,defaultValue:[.2],range:[[0,.5]],relative:[`left`],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{let r=Math.min(e,t)*n[0];return`M 0 ${r} L ${r} 0 L ${e-r} 0 L ${e} ${r} L ${e} ${t} L 0 ${t} Z`}},[vn.ROUND_RECT_DIAGONAL]:{editable:!0,defaultValue:[.125],range:[[0,1]],relative:[`left`],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{let r=Math.min(e,t)*n[0];return`M ${r} 0 L ${e} 0 L ${e} ${t-r} Q ${e} ${t} ${e-r} ${t} L 0 ${t} L 0 ${r} Q 0 0 ${r} 0 Z`}},[vn.ROUND_RECT_SINGLE]:{editable:!0,defaultValue:[.125],range:[[0,1]],relative:[`right`],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{let r=Math.min(e,t)*n[0];return`M 0 0 L ${e-r} 0 Q ${e} 0 ${e} ${r} L ${e} ${t} L 0 ${t} L 0 0 Z`}},[vn.ROUND_RECT_SAMESIDE]:{editable:!0,defaultValue:[.125],range:[[0,.5]],relative:[`left`],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{let r=Math.min(e,t)*n[0];return`M 0 ${r} Q 0 0 ${r} 0 L ${e-r} 0 Q ${e} 0 ${e} ${r} L ${e} ${t} L 0 ${t} Z`}},[vn.CUT_ROUND_RECT]:{editable:!0,defaultValue:[.125],range:[[0,.5]],relative:[`left`],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{let r=Math.min(e,t)*n[0];return`M ${r} 0 L ${e-r} 0 L ${e} ${r} L ${e} ${t} L 0 ${t} L 0 ${r} Q 0 0 ${r} 0 Z`}},[vn.MESSAGE]:{editable:!0,range:[[0,.8],[.1,.3]],defaultValue:[.3,.2],relative:[`left_bottom`,`bottom`],getBaseSize:[e=>e,(e,t)=>t],formula:(e,t,n)=>{let r=e*n[0],i=e*.2,a=t*n[1];return`M 0 0 L ${e} 0 L ${e} ${t-a} L ${r+i} ${t-a} L ${r} ${t} L ${r} ${t-a} L 0 ${t-a} Z`}},[vn.ROUND_MESSAGE]:{formula:(e,t)=>{let n=Math.min(e,t)*.125,r=Math.min(e,t)*.2,i=Math.min(e,t)*.2;return`M 0 ${n} Q 0 0 ${n} 0 L ${e-n} 0 Q ${e} 0 ${e} ${n} L ${e} ${t-n-i} Q ${e} ${t-i} ${e-n} ${t-i} L ${e/2} ${t-i} L ${e/2-r} ${t} L ${e/2-r} ${t-i} L ${n} ${t-i} Q 0 ${t-i} 0 ${t-n-i} L 0 ${n} Z`}},[vn.L]:{editable:!0,defaultValue:[.25],range:[[.1,.9]],relative:[`left`],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{let r=Math.min(e,t)*n[0];return`M 0 0 L 0 ${t} L ${e} ${t} L ${e} ${t-r} L ${r} ${t-r} L ${r} 0 Z`}},[vn.RING_RECT]:{editable:!0,defaultValue:[.25],range:[[.1,.45]],relative:[`left`],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{let r=Math.min(e,t)*n[0];return`M 0 0 ${e} 0 ${e} ${t} L 0 ${t} L 0 0 Z M ${r} ${r} L ${r} ${t-r} L ${e-r} ${t-r} L ${e-r} ${r} Z`}},[vn.PLUS]:{editable:!0,defaultValue:[.25],range:[[.1,.9]],relative:[`center`],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{let r=Math.min(e,t)*n[0];return`M ${e/2-r/2} 0 L ${e/2-r/2} ${t/2-r/2} L 0 ${t/2-r/2} L 0 ${t/2+r/2} L ${e/2-r/2} ${t/2+r/2} L ${e/2-r/2} ${t} L ${e/2+r/2} ${t} L ${e/2+r/2} ${t/2+r/2} L ${e} ${t/2+r/2} L ${e} ${t/2-r/2} L ${e/2+r/2} ${t/2-r/2} L ${e/2+r/2} 0 Z`}},[vn.TRIANGLE]:{editable:!0,defaultValue:[.5],range:[[0,1]],relative:[`left`],getBaseSize:[e=>e],formula:(e,t,n)=>`M ${e*n[0]} 0 L 0 ${t} L ${e} ${t} Z`},[vn.PARALLELOGRAM_LEFT]:{editable:!0,defaultValue:[.25],range:[[0,.9]],relative:[`left`],getBaseSize:[e=>e],formula:(e,t,n)=>{let r=e*n[0];return`M ${r} 0 L ${e} 0 L ${e-r} ${t} L 0 ${t} Z`}},[vn.PARALLELOGRAM_RIGHT]:{editable:!0,defaultValue:[.25],range:[[0,.9]],relative:[`right`],getBaseSize:[e=>e],formula:(e,t,n)=>{let r=e*n[0];return`M 0 0 L ${e-r} 0 L ${e} ${t} L ${r} ${t} Z`}},[vn.TRAPEZOID]:{editable:!0,defaultValue:[.25],range:[[0,.5]],relative:[`left`],getBaseSize:[e=>e],formula:(e,t,n)=>{let r=e*n[0];return`M ${r} 0 L ${e-r} 0 L ${e} ${t} L 0 ${t} Z`}},[vn.BULLET]:{editable:!0,defaultValue:[.2],range:[[0,1]],relative:[`top`],getBaseSize:[(e,t)=>t],formula:(e,t,n)=>{let r=t*n[0];return`M ${e/2} 0 L 0 ${r} L 0 ${t} L ${e} ${t} L ${e} ${r} Z`}},[vn.INDICATOR]:{editable:!0,defaultValue:[.2],range:[[0,.9]],relative:[`right`],getBaseSize:[e=>e],formula:(e,t,n)=>{let r=e*n[0];return`M ${e} ${t/2} L ${e-r} 0 L 0 0 L ${r} ${t/2} L 0 ${t} L ${e-r} ${t} Z`}}},xn=[{type:`矩形`,typeKey:`SHAPE.CATEGORY.RECT`,children:[{viewBox:[200,200],path:`M 0 0 L 200 0 L 200 200 L 0 200 Z`,pptxShapeType:`rect`},{viewBox:[200,200],path:`M 50 0 L 150 0 Q 200 0 200 50 L 200 150 Q 200 200 150 200 L 50 200 Q 0 200 0 150 L 0 50 Q 0 0 50 0 Z`,pathFormula:vn.ROUND_RECT,pptxShapeType:`roundRect`},{viewBox:[200,200],path:`M 0 200 L 0 0 L 150 0 L 200 50 L 200 200 Z`,pathFormula:vn.CUT_RECT_SINGLE,pptxShapeType:`snip1Rect`},{viewBox:[200,200],path:`M 0 50 L 50 0 L 150 0 L 200 50 L 200 200 L 0 200 Z`,pathFormula:vn.CUT_RECT_SAMESIDE,pptxShapeType:`snip2SameRect`},{viewBox:[200,200],path:`M 0 150 L 0 0 L 150 0 L 200 50 L 200 200 L 50 200 Z`,pathFormula:vn.CUT_RECT_DIAGONAL,pptxShapeType:`snip2DiagRect`},{viewBox:[200,200],path:`M 50 0 L 150 0 L 200 50 L 200 200 L 0 200 L 0 50 Q 0 0 50 0 Z`,pathFormula:vn.CUT_ROUND_RECT,pptxShapeType:`snipRoundRect`},{viewBox:[200,200],path:`M 0 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 L 0 0 Z`,pathFormula:vn.ROUND_RECT_SINGLE,pptxShapeType:`round1Rect`},{viewBox:[200,200],path:`M 0 50 Q 0 0 50 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 Z`,pathFormula:vn.ROUND_RECT_SAMESIDE,pptxShapeType:`round2SameRect`},{viewBox:[200,200],path:`M 50 0 L 200 0 L 200 150 Q 200 200 150 200 L 0 200 L 0 50 Q 0 0 50 0 Z`,pathFormula:vn.ROUND_RECT_DIAGONAL,pptxShapeType:`round2DiagRect`}]},{type:`常用形状`,typeKey:`SHAPE.CATEGORY.COMMON`,children:[{viewBox:[200,200],path:`M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z`,pptxShapeType:`ellipse`},{viewBox:[200,200],path:`M 100 0 L 0 200 L 200 200 L 100 0 Z`,pathFormula:vn.TRIANGLE,pptxShapeType:`triangle`},{viewBox:[200,200],path:`M 0 0 L 0 200 L 200 200 Z`},{viewBox:[200,200],path:`M 70 20 L 0 160 Q 0 200 40 200 L 160 200 Q 200 200 200 160 L 130 20 Q 100 -20 70 20 Z`},{viewBox:[200,200],path:`M 50 0 L 200 0 L 150 200 L 0 200 L 50 0 Z`,pathFormula:vn.PARALLELOGRAM_LEFT,pptxShapeType:`parallelogram`},{viewBox:[200,200],path:`M 0 0 L 150 0 L 200 200 L 50 200 L 0 0 Z`,pathFormula:vn.PARALLELOGRAM_RIGHT},{viewBox:[200,200],path:`M 50 0 L 150 0 L 200 200 L 0 200 L 50 0 Z`,pathFormula:vn.TRAPEZOID,pptxShapeType:`trapezoid`},{viewBox:[200,200],path:`M 100 0 L 0 100 L 100 200 L 200 100 L 100 0 Z`,pptxShapeType:`diamond`},{viewBox:[200,200],path:`M 100 0 L 0 50 L 0 200 L 200 200 L 200 50 L 100 0 Z`,pathFormula:vn.BULLET},{viewBox:[200,200],path:`M 200 100 L 150 0 L 0 0 L 50 100 L 0 200 L 150 200 L 200 100 Z`,pathFormula:vn.INDICATOR},{viewBox:[200,200],path:`M 0 0 C 80 20 120 20 200 0 C 180 80 180 120 200 200 C 80 180 120 180 0 200 C 20 120 20 80 0 0 Z`},{viewBox:[200,200],path:`M 10 10 C 60 0 140 0 190 10 C 200 60 200 140 190 190 C 140 200 60 200 10 190 C 0 140 0 60 10 10 Z`},{viewBox:[200,200],path:`M 0 200 A 50 100 0 1 1 200 200 L 0 200 Z`},{viewBox:[200,200],path:`M 40 20 A 100 100 0 1 0 200 100 L 100 100 L 40 20 Z`},{viewBox:[200,200],path:`M 100 0 A 100 100 102 1 0 200 100 L 100 100 L 100 0 Z`,pptxShapeType:`pie`},{viewBox:[200,200],path:`M 160 20 A 100 100 0 1 0 200 100 L 100 100 L 160 20 Z`},{viewBox:[200,200],path:`M 100 0 A 100 100 102 1 0 200 100 L 100 0 Z`,pptxShapeType:`chord`},{viewBox:[200,200],path:`M 100 0 A 100 100 102 1 0 200 100 L 200 0 L 100 0 Z`,pptxShapeType:`teardrop`},{viewBox:[200,200],path:`M 0 0 L 200 0 Q 200 200 0 200 L 0 0 Z`},{viewBox:[200,200],path:`M100,0 L200,76.6 L161.8,200 L38.2,200 L0,76.6 Z`,pptxShapeType:`pentagon`},{viewBox:[200,200],path:`M 40 0 L 160 0 L 200 100 L 160 200 L 40 200 L 0 100 Z`,pptxShapeType:`hexagon`},{viewBox:[200,200],path:`M 100 0 L 0 60 L 0 140 L 100 200 L 200 140 L 200 60 L 100 0 Z`},{viewBox:[200,200],path:`M100,0 L170.71,29.29 L200,100 L170.71,170.71 L100,200 L29.29,170.71 L0,100 L29.29,29.29 Z`},{viewBox:[200,200],path:`M 60 0 L 140 0 L 200 60 L 200 140 L 140 200 L 60 200 L 0 140 L 0 60 L 60 0 Z`,pptxShapeType:`octagon`},{viewBox:[200,200],path:`M 75 0 L 125 0 L 175 25 L 200 75 L 200 125 L 175 175 L 125 200 L 75 200 L 25 175 L 0 125 L 0 75 L 25 25 L 75 0 Z`,pptxShapeType:`dodecagon`},{viewBox:[200,200],path:`M 150 0 A 50 100 0 1 1 150 200 L 0 200 L 0 0 L 150 0 Z`},{viewBox:[200,200],path:`M 50 0 A 25 50 0 1 0 50 200 L 150 200 A 25 50 0 1 0 150 0 L 50 0 Z`},{viewBox:[200,200],path:`M 150 0 A 50 100 0 1 1 150 200 L 0 200 A 50 100 0 0 0 0 0 L 150 0 Z`},{viewBox:[200,200],path:`M 200 0 L 200 200 L 0 200 L 0 100 L 200 0 Z`,pptxShapeType:`flowChartManualInput`},{viewBox:[200,200],path:`M 0 0 L 200 100 L 200 200 L 0 200 L 0 0 Z`},{viewBox:[200,200],path:`M 0 0 L 200 0 L 200 150 C 110 140 110 240 0 180 Z`,pptxShapeType:`flowChartDocument`},{viewBox:[200,200],path:`M 200 0 L 100 0 L 0 100 L 0 200 L 200 0 Z`,pptxShapeType:`diagStripe`},{viewBox:[200,200],path:`M 50 0 L 150 0 L 150 50 L 200 50 L 200 150 L 150 150 L 150 200 L 50 200 L 50 150 L 0 150 L 0 50 L 50 50 L 50 0 Z`},{viewBox:[200,200],path:`M 0 0 L 0 200 L 200 200 L 200 140 L 60 140 L 60 0 L 0 0 Z`,pathFormula:vn.L,pptxShapeType:`corner`},{viewBox:[200,200],path:`M0 0 L200 0 L200 200 L0 200 L0 0 Z M50 50 L50 150 L150 150 L150 50 Z`,pathFormula:vn.RING_RECT,pptxShapeType:`frame`},{viewBox:[200,200],path:`M0 100 A100 100 0 1 1 0 101 Z M150 100 A50 50 0 1 0 150 101 Z`,pptxShapeType:`donut`},{viewBox:[200,200],path:`M 70 0 L 70 70 L 0 70 L 0 130 L 70 130 L 70 200 L 130 200 L 130 130 L 200 130 L 200 70 L 130 70 L 130 0 L 70 0 Z`,pathFormula:vn.PLUS,pptxShapeType:`mathPlus`},{viewBox:[200,200],path:`M 0 70 L 200 70 L 200 130 L 0 130 Z`,pptxShapeType:`mathMinus`},{viewBox:[200,200],path:`M 40 0 L 0 40 L 60 100 L 0 160 L 40 200 L 100 140 L 160 200 L 200 160 L 140 100 L 200 40 L 160 0 L 100 60 L 40 0 Z`,pptxShapeType:`mathMultiply`},{viewBox:[200,200],path:`M 0 80 L 200 80 L 200 120 L 0 120 Z M 100 0 A 25 25 0 1 1 100 50 A 25 25 0 1 1 100 0 M 100 200 A 25 25 0 1 1 100 150 A 25 25 0 1 1 100 200`,pptxShapeType:`mathDivide`},{viewBox:[200,200],path:`M 0 30 L 200 30 L 200 80 L 0 80 Z M 0 120 L 200 120 L 200 170 L 0 170 Z`,pptxShapeType:`mathEqual`},{viewBox:[200,200],path:`M 120 0 L 170 0 L 150 40 L 200 40 L 200 80 L 130 80 L 110 120 L 200 120 L 200 160 L 90 160 L 70 200 L 20 200 L 40 160 L 0 160 L 0 120 L 60 120 L 80 80 L 0 80 L 0 40 L 100 40 Z`,pptxShapeType:`mathNotEqual`},{viewBox:[200,200],path:`M 0 0 L 200 0 L 200 160 L 100 160 L 60 200 L 60 160 L 0 160 Z`,pathFormula:vn.MESSAGE,pptxShapeType:`wedgeRectCallout`},{viewBox:[200,200],path:`M 0 40 Q 0 0 40 0 L 160 0 Q 200 0 200 40 L 200 120 Q 200 160 160 160 L 100 160 L 60 200 L 60 160 L 40 160 Q 0 160 0 120 L 0 40 Z`,pathFormula:vn.ROUND_MESSAGE,pptxShapeType:`wedgeRoundRectCallout`},{viewBox:[200,200],path:`M 180 160 A 100 100 0 1 0 100 200 L 200 200 L 200 160 L 180 160 Z`,pptxShapeType:`flowChartMagneticTape`},{viewBox:[200,200],path:`M 200 0 L 0 0 L 200 200 L 0 200 L 200 0 Z`,pptxShapeType:`flowChartCollate`},{viewBox:[200,200],path:`M 0 20 C 60 60 140 -40 200 20 L 200 180 C 140 140 60 240 0 180 L 0 20 Z`,pptxShapeType:`wave`},{viewBox:[200,200],path:`M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z`,pptxShapeType:`doubleWave`},{viewBox:[200,200],path:`M 100 0 Q 0 50 0 175 Q 100 225 200 175 Q 200 50 100 0 Z`},{viewBox:[200,200],path:`M 0 100 A 50 50 0 1 1 200 100 L 100 200 L 0 100 Z`},{viewBox:[200,200],path:`M 100 0 L 120 80 L 200 100 L 120 120 L 100 200 L 80 120 L 0 100 L 80 80 L 100 0 Z`,pptxShapeType:`star4`},{viewBox:[1024,1024],path:`M1018.67652554 400.05983681l-382.95318779-5.89158658L512 34.78141155 388.27666225 394.16825023l-382.95318779 5.89158658L311.68602415 629.83174977l-117.83174978 365.27842665 312.25413766-223.88032637 312.25413904 223.88032637-117.83175116-365.27842665 318.14572563-229.77191296z`,pptxShapeType:`star5`,special:!0},{viewBox:[200,200],path:`M 100 0 L 60 60 L 0 100 L 60 140 L 100 200 L 140 140 L 200 100 L 140 60 L 100 0 Z`},{viewBox:[200,200],path:`M 100 0 L 140 60 L 200 60 L 160 100 L 200 140 L 140 140 L 100 200 L 60 140 L 0 140 L 40 100 L 0 60 L 60 60 L 100 0 Z`,pptxShapeType:`star6`},{viewBox:[200,200],path:`M 100 0 L 130 30 L 170 30 L 170 70 L 200 100 L 170 130 L 170 170 L 130 170 L 100 200 L 70 170 L 30 170 L 30 130 L 0 100 L 30 70 L 30 30 L 70 30 L 100 0`,pptxShapeType:`star8`},{viewBox:[200,200],path:`M 100 0 A 50 50 0 1 0 200 120 A 100 100 0 1 1 100 0 Z`},{viewBox:[200,200],path:`M 120 0 L 100 80 L 200 80 L 80 200 L 100 120 L 0 120 L 120 0 Z`},{viewBox:[200,200],path:`M 30 50 Q 40 -20 120 10 Q 180 -10 180 40 Q 210 70 190 100 C 210 140 180 170 160 170 Q 140 210 100 180 C 70 210 20 190 30 150 C -10 140 -10 80 30 50`,pptxShapeType:`cloud`},{viewBox:[200,200],path:`M 100 0 L 0 100 L 100 200 L 200 100 L 100 0 Z M 200 100 L 0 100`,withborder:!0,pptxShapeType:`flowChartSort`},{viewBox:[200,200],path:`M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z M 170 30 L 30 170`,withborder:!0},{viewBox:[200,200],path:`M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z M 30 30 L 170 170`,withborder:!0},{viewBox:[200,200],path:`M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z M 170 30 L 30 170 M 30 30 L 170 170`,withborder:!0,pptxShapeType:`flowChartSummingJunction`},{viewBox:[200,200],path:`M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z M 200 100 L 0 100 M 100 0 L 100 200`,withborder:!0,pptxShapeType:`flowChartOr`},{viewBox:[200,200],path:`M 160 0 A 40 100 0 1 1 160 200 L 40 200 A 40 100 0 1 1 40 0 L 160 0 Z M 160 200 A 40 100 0 1 1 160 0`,withborder:!0,pptxShapeType:`flowChartMagneticDrum`},{viewBox:[200,200],path:`M 0 40 A 50 20 0 1 1 200 40 L 200 160 A 50 20 0 1 1 0 160 L 0 40 Z M 200 40 A 50 20 0 1 1 0 40`,withborder:!0,pptxShapeType:`can`},{viewBox:[200,200],path:`M 200 0 L 50 0 L 0 50 L 0 200 L 150 200 L 200 150 L 200 0 Z M 200 0 L 150 50 M 150 50 L 0 50 M 150 50 L 150 200`,withborder:!0,pptxShapeType:`cube`}]},{type:`箭头`,typeKey:`SHAPE.CATEGORY.ARROW`,children:[{viewBox:[200,200],path:`M 100 0 L 0 100 L 50 100 L 50 200 L 150 200 L 150 100 L 200 100 L 100 0 Z`,pptxShapeType:`upArrow`},{viewBox:[200,200],path:`M 100 200 L 200 100 L 150 100 L 150 0 L 50 0 L 50 100 L 0 100 L 100 200 Z`,pptxShapeType:`downArrow`},{viewBox:[200,200],path:`M 0 100 L 100 0 L 100 50 L 200 50 L 200 150 L 100 150 L 100 200 L 0 100 Z`,pptxShapeType:`leftArrow`},{viewBox:[200,200],path:`M 200 100 L 100 0 L 100 50 L 0 50 L 0 150 L 100 150 L 100 200 L 200 100 Z`,pptxShapeType:`rightArrow`},{viewBox:[200,200],path:`M 100 0 L 0 60 L 60 60 L 60 140 L 0 140 L 100 200 L 200 140 L 140 140 L 140 60 L 200 60 L 100 0 Z`,pptxShapeType:`upDownArrow`},{viewBox:[200,200],path:`M 0 100 L 60 0 L 60 60 L 140 60 L 140 0 L 200 100 L 140 200 L 140 140 L 60 140 L 60 200 L 0 100 Z`,pptxShapeType:`leftRightArrow`},{viewBox:[200,200],path:`M 100 0 L 60 40 L 80 40 L 80 80 L 40 80 L 40 60 L 0 100 L 40 140 L 40 120 L 80 120 L 80 160 L 60 160 L 100 200 L 140 160 L 120 160 L 120 120 L 160 120 L 160 140 L 200 100 L 160 60 L 160 80 L 120 80 L 120 40 L 140 40 L 100 0 Z`,pptxShapeType:`quadArrow`},{viewBox:[200,200],path:`M 0 100 L 100 0 L 100 50 L 200 50 L 150 100 L 200 150 L 100 150 L 100 200 L 0 100 Z`},{viewBox:[200,200],path:`M 200 100 L 100 0 L 100 50 L 0 50 L 50 100 L 0 150 L 100 150 L 100 200 L 200 100 Z`,pptxShapeType:`notchedRightArrow`},{viewBox:[200,200],path:`M 0 100 L 80 20 L 80 80 L 120 80 L 120 0 L 200 0 L 200 200 L 120 200 L 120 120 L 80 120 L 80 180 L 0 100 Z`,pptxShapeType:`leftArrowCallout`},{viewBox:[200,200],path:`M 200 100 L 120 20 L 120 80 L 80 80 L 80 0 L 0 0 L 0 200 L 80 200 L 80 120 L 120 120 L 120 180 L 200 100 Z`,pptxShapeType:`rightArrowCallout`},{viewBox:[200,200],path:`M 0 0 L 120 0 L 200 100 L 120 200 L 0 200 L 80 100 L 0 0 Z`,pptxShapeType:`chevron`},{viewBox:[200,200],path:`M 80 0 L 200 0 L 120 100 L 200 200 L 80 200 L 0 100 L 80 0 Z`},{viewBox:[200,200],path:`M 0 0 L 140 0 L 200 100 L 140 200 L 0 200 L 0 100 L 0 0 Z`,pptxShapeType:`homePlate`},{viewBox:[200,200],path:`M 60 0 L 200 0 L 200 100 L 200 200 L 60 200 L 0 100 L 60 0 Z`},{viewBox:[200,200],path:`M 0 0 L 200 100 L 0 200 L 60 100 L 0 0 Z`},{viewBox:[200,200],path:`M 200 0 L 0 100 L 200 200 L 140 100 L 200 0 Z`},{viewBox:[200,200],path:`M 0 0 L 80 0 L 200 100 L 80 200 L 0 200 L 120 100 L 0 0 Z`},{viewBox:[200,200],path:`M 200 0 L 120 0 L 0 100 L 120 200 L 200 200 L 80 100 L 200 0 Z`},{viewBox:[200,200],path:`M 0 200 L 180 200 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 160 L 0 160 L 0 200 Z`,pptxShapeType:`bentUpArrow`},{viewBox:[200,200],path:`M 0 200 L 0 20 L 160 20 L 160 0 L 200 40 L 160 80 L 160 60 L 40 60 L 40 200 L 0 200 Z`},{viewBox:[200,200],path:`M 40 180 L 180 180 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 140 L 40 140 L 40 120 L 0 160 L 40 200 L 40 180 Z`,pptxShapeType:`leftUpArrow`},{viewBox:[1024,1024],path:`M398.208 302.912V64L0 482.112l398.208 418.176V655.36c284.48 0 483.584 95.552 625.792 304.64-56.896-298.688-227.584-597.312-625.792-657.088z`,special:!0},{viewBox:[1024,1024],path:`M625.792 302.912V64L1024 482.112l-398.208 418.176V655.36C341.312 655.36 142.208 750.912 0 960c56.896-298.688 227.584-597.312 625.792-657.088z`,special:!0}]},{type:`其他形状`,typeKey:`SHAPE.CATEGORY.OTHER`,children:[{viewBox:[1024,1024],path:`M995.336 243.4016c-15.7584-36.5736-38.3376-69.26639999-66.91440001-97.37280001-28.5768-27.98879999-61.73999999-49.8624-98.78399999-65.26799998-38.22-15.876-78.6744-23.8728-120.4224-23.87280001-57.97680001 0-114.5424 15.876-163.69919999 45.864-11.76 7.17360001-22.932 15.05279999-33.51600001 23.63760001-10.584-8.5848-21.75600001-16.46400001-33.51600001-23.63760001-49.1568-29.98799999-105.7224-45.86399999-163.69919999-45.864-41.74799999 0-82.2024 7.9968-120.4224 23.87280001-36.9264 15.28799999-70.2072 37.27919999-98.78399999 65.26799998-28.6944 28.10640001-51.156 60.79919999-66.91440001 97.37280001-16.34639999 37.9848-24.696 78.3216-24.696 119.83439999 0 39.1608 7.9968 79.96800001 23.8728 121.48080001 13.28880001 34.692 32.34000001 70.67760001 56.6832 107.016 38.57279999 57.5064 91.61040001 117.4824 157.4664 178.28160001 109.1328 100.78319999 217.2072 170.4024 221.79359999 173.22479998l27.87120001 17.8752c12.348 7.8792 28.224 7.8792 40.572 0l27.87119999-17.8752c4.58639999-2.94 112.54319999-72.44159999 221.79360001-173.22479998 65.85599999-60.79919999 118.89359999-120.7752 157.4664-178.28160001 24.3432-36.33839999 43.512-72.324 56.68319999-107.016 15.876-41.5128 23.8728-82.32 23.87280001-121.48080001 0.1176-41.5128-8.232-81.8496-24.5784-119.83439999z`,special:!0},{viewBox:[1024,1024],path:`M985.20746667 343.50079998l-303.32586667-44.08319999L546.28693333 24.5248c-3.70346666-7.5264-9.79626667-13.6192-17.32266665-17.32266668-18.87573334-9.3184-41.81333333-1.55306667-51.25120001 17.32266668L342.1184 299.41759999l-303.32586667 44.08319999c-8.36266667 1.19466667-16.00853333 5.13706667-21.8624 11.11040001-14.69440001 15.17226667-14.45546667 39.30453334 0.71679999 54.1184l219.46026668 213.9648-51.84853333 302.1312c-1.43359999 8.24320001-0.11946667 16.8448 3.82293333 24.25173333 9.79626667 18.6368 32.9728 25.92426667 51.6096 16.00853334L512 822.44266665l271.3088 142.64320001c7.40693333 3.9424 16.00853333 5.25653333 24.25173333 3.82293333 20.78719999-3.584 34.7648-23.296 31.1808-44.0832l-51.84853333-302.1312 219.46026668-213.9648c5.97333334-5.85386666 9.91573333-13.49973334 11.11039999-21.8624 3.2256-20.90666667-11.34933333-40.26026667-32.256-43.36640001z`,special:!0},{viewBox:[1024,1024],path:`M852.65066667 405.84533333C800.54044445 268.40177778 667.76177778 170.66666667 512.22755555 170.66666667S223.91466667 268.288 171.80444445 405.73155555C74.29688889 431.33155555 2.27555555 520.07822222 2.27555555 625.77777778c0 125.72444445 101.83111111 227.55555555 227.44177778 227.55555555h564.56533334C919.89333333 853.33333333 1021.72444445 751.50222222 1021.72444445 625.77777778c0-105.472-71.79377778-194.21866667-169.07377778-219.93244445z`,special:!0},{viewBox:[1024,1024],path:`M926.25224691 323.7371485H654.6457886L898.88200917 15.14388241c5.05486373-6.53433603 0.49315743-16.02761669-7.76722963-16.02761668H418.30008701c-3.45210206 0-6.78091476 1.84934039-8.50696579 4.93157436L90.35039154 555.76772251c-3.82197013 6.53433603 0.86302552 14.7947231 8.50696578 14.79472311h215.01664245l-110.22068713 440.88274851c-2.34249783 9.61657002 9.24670194 16.39748478 16.39748477 9.49328065L933.03316167 340.62779071c6.41104668-6.0411786 2.09591911-16.8906422-6.78091476-16.89064221z`,special:!0},{viewBox:[1024,1024],path:`M878.47822222 463.30311111c-22.18666667-49.83466667-53.93066667-93.98044445-94.32177777-131.072l-33.10933334-30.37866666c-4.89244445-4.32355555-12.62933333-2.38933333-14.79111111 3.75466666l-14.79111111 42.43911111c-9.216 26.624-26.16888889 53.81688889-50.176 80.55466667-1.59288889 1.70666667-3.41333333 2.16177778-4.66488889 2.27555556-1.25155555 0.11377778-3.18577778-0.11377778-4.89244445-1.70666667-1.59288889-1.36533333-2.38933333-3.41333333-2.27555555-5.46133333 4.20977778-68.49422222-16.27022222-145.74933333-61.09866667-229.83111112C561.26577778 124.01777778 509.72444445 69.51822222 445.32622222 31.51644445l-46.99022222-27.648c-6.144-3.64088889-13.99466667 1.13777778-13.65333333 8.30577777l2.50311111 54.61333333c1.70666667 37.31911111-2.61688889 70.31466667-12.85688889 97.73511112-12.51555555 33.56444445-30.49244445 64.73955555-53.47555556 92.72888888-16.15644445 19.56977778-34.24711111 37.20533333-54.04444444 52.45155556-47.90044445 36.75022222-87.38133333 84.65066667-114.11911111 138.24C125.72444445 502.10133333 111.50222222 562.74488889 111.50222222 623.50222222c0 53.70311111 10.58133333 105.69955555 31.51644445 154.73777778 20.25244445 47.21777778 49.152 89.77066667 85.90222222 126.17955555 36.864 36.40888889 79.64444445 65.08088889 127.31733333 84.992C405.61777778 1010.11911111 457.95555555 1020.58666667 512 1020.58666667s106.38222222-10.46755555 155.76177778-31.06133334c47.67288889-19.91111111 90.56711111-48.46933333 127.31733333-84.992 36.864-36.40888889 65.76355555-78.96177778 85.90222222-126.17955555 20.93511111-49.03822222 31.51644445-101.03466667 31.51644445-154.73777778 0-55.52355555-11.37777778-109.45422222-34.01955556-160.31288889z`,special:!0},{viewBox:[1024,1024],path:`M968.20337778 20.11591112H705.44042667c-22.17301333 0-41.92483556 15.16430222-47.14951111 37.33731555C642.36202666 124.73685332 582.08711111 173.03324444 512 173.03324444s-130.36202666-48.29639112-146.29091556-115.58001777c-5.22467555-22.17301333-24.84906667-37.33731556-47.14951111-37.33731555H55.79662222c-30.96576 0-56.06968889 25.10392889-56.06968888 56.06968888v321.12639999c0 30.96576 25.10392889 56.06968889 56.06968888 56.06968889h95.57333334v494.43271112c0 30.96576 25.10392889 56.06968889 56.06968889 56.06968888h609.1207111c30.96576 0 56.06968889-25.10392889 56.06968889-56.06968888V453.38168888h95.57333334c30.96576 0 56.06968889-25.10392889 56.06968888-56.06968889V76.1856c0-30.96576-25.10392889-56.06968889-56.06968888-56.06968888z`,special:!0},{viewBox:[1024,1024],path:`M980.94648889 239.80714666H523.46880001L373.99210666 96.82944c-1.91146667-1.78403556-4.46008889-2.80348444-7.00871111-2.80348445H43.05351111c-22.55530667 0-40.77795555 18.22264888-40.77795555 40.77795557v754.39217776c0 22.55530667 18.22264888 40.77795555 40.77795555 40.77795557h937.89297778c22.55530667 0 40.77795555-18.22264888 40.77795555-40.77795557V280.58510222c0-22.55530667-18.22264888-40.77795555-40.77795555-40.77795556z`,special:!0},{viewBox:[1024,1024],path:`M972.60904597 164.57058577L841.30587843 33.39070759c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480282-29.3428675-26.75379095 0-51.90482023 10.47959553-70.76809219 29.3428675L558.60337778 174.68031322c-18.86327195 18.86327195-29.34286748 44.1375906-29.34286749 70.64480283 0 26.75379095 10.47959553 51.90482023 29.34286749 70.76809218l103.31648301 103.31648302c-24.28800376 53.50758189-57.69942011 101.59043198-99.24793416 143.13894603-41.42522469 41.67180341-89.63136414 75.08321976-143.13894603 99.61780223L316.21649759 558.84995649c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480283-29.34286747-26.75379095 0-51.90482023 10.47959553-70.76809217 29.34286747L33.39070759 700.01627278c-18.86327195 18.86327195-29.34286748 44.1375906-29.3428675 70.76809217 0 26.75379095 10.47959553 51.90482023 29.3428675 70.76809219l131.05658883 131.05658883c30.08260365 30.205893 71.63111769 47.34311394 114.28923598 47.34311394 9.00012323 0 17.63037836-0.73973616 26.13734414-2.21920846 166.19405621-27.37023774 331.03192945-115.76870829 464.06114804-248.67463751C901.84095379 636.27567408 990.11613498 471.56109018 1017.85624079 304.87387654c8.38367642-50.91850535-8.50696579-103.31648302-45.24719482-140.30329077z`,special:!0},{viewBox:[1024,1024],path:`M910.60451556 640.96028445c-20.38897778-65.49959112-43.83630221-120.54983112-79.89930667-210.64362666C836.31217778 193.67708444 737.93535999 2.27555556 511.36284444 2.27555556 282.24170667 2.27555556 186.03121778 197.50001778 192.14791111 430.31665779c-36.19043555 90.22122667-59.51032888 144.88917333-79.89930667 210.64362666-43.32657778 139.53706668-29.30915556 197.26336001-18.60494222 198.53767111 22.9376 2.80348444 89.32920888-105.00323556 89.32920889-105.00323556 0 62.44124445 32.11264001 143.86972444 101.69002667 202.61546667-33.64181333 10.32192-109.20846222 38.10190221-91.24067556 68.55793777 14.52714667 24.59420444 250.01984 15.67402668 317.94062222 8.02816 67.92078222 7.64586667 303.41347556 16.56604444 317.94062223-8.02816 17.96778667-30.32860444-57.72629333-58.23601779-91.24067555-68.55793777 69.57738667-58.87317334 101.69002667-140.30165333 101.69002667-202.61546667 0 0 66.39160889 107.80672 89.32920888 105.00323556 10.83164445-1.40174222 24.84906667-59.12803556-18.47751111-198.53767111z`,special:!0},{viewBox:[1024,1024],path:`M1016.86992592 199.24764445c-37.13706667 16.01991111-77.55093333 27.54939259-119.17842962 32.03982222 42.96248889-25.60758518 75.60912592-66.02145185 91.02222222-114.08118519-39.68568889 23.66577778-84.58998518 41.02068148-131.31472593 50.00154074C819.53374815 126.79395555 765.76995555 101.79318518 706.18074075 101.79318518c-114.688 0-206.92385185 92.96402963-206.92385186 207.04521482 0 16.01991111 1.94180741 32.03982222 5.09724444 47.45291852-171.72859259-8.98085925-324.88865185-91.02222222-426.71217778-216.63288889-17.96171852 30.82619259-28.15620741 66.02145185-28.1562074 104.49351112 0 71.84687408 36.53025185 135.19834075 92.23585185 172.45677036-33.98162963-1.33499259-66.02145185-10.92266667-93.57084445-26.33576296v2.54862222c0 100.6098963 71.1186963 183.98625185 165.90317037 203.1616-17.3549037 4.49042963-35.92343703 7.03905185-54.49197037 7.03905185-13.47128889 0-26.2144-1.33499259-39.07887407-3.15543704C146.69748148 681.90814815 223.03478518 741.49736297 313.93564445 743.43917037c-71.1186963 55.7056-160.19911111 88.4736-256.9253926 88.4736-17.3549037 0-33.37481482-0.60681482-50.00154074-2.54862222C98.75911111 888.22518518 207.62168889 922.20681482 324.85831111 922.20681482 705.45256297 922.20681482 913.71140741 606.90583703 913.71140741 333.23235555c0-8.98085925 0-17.96171852-0.60681482-26.94257777 40.2925037-29.4912 75.60912592-66.02145185 103.76533333-107.04213333z`,special:!0},{viewBox:[1024,1024],path:`M917.96720197 1.08889505H106.03279803C53.56084718 1.08889505 9.37393998 45.27580225 9.37393998 97.74775309v5.52336372c0 19.33177108 8.28504494 41.42522469 22.0934536 55.23363205l331.40179753 392.15879462v325.87843379c0 16.57008987 8.28504494 30.37849854 22.09345359 35.90186098l209.88780469 104.94390299 2.76168121 2.76168121c27.61681602 11.04672615 55.23363335-8.28504494 55.23363335-38.66354218V550.66354348l331.40179753-392.15879462c35.90186097-41.42522469 30.37849854-102.18222047-11.04672616-135.32240022-11.04672615-13.80840865-33.14017975-22.0934536-55.23363335-22.09345359z`,special:!0},{viewBox:[1024,1024],path:`M491.70164031 97.48884502a25.89076502 25.89076502 0 0 1 40.59671938 0L745.66415762 367.01171317a25.89076502 25.89076502 0 0 0 30.49932208 7.72839349l208.00640948-89.14190458a25.89076502 25.89076502 0 0 1 35.56096592 29.06238339l-115.18801541 554.96855704A103.56306132 103.56306132 0 0 1 803.14165689 952.14301275H220.85834311a103.56306132 103.56306132 0 0 1-101.4011828-82.51387024l-115.18801541-554.96855704a25.89076502 25.89076502 0 0 1 35.54802012-29.06238339l208.01935528 89.14190458a25.89076502 25.89076502 0 0 0 30.49932208-7.72839349l213.36579793-269.52286815z`,special:!0},{viewBox:[1024,1024],path:`M643.02466884 387.7801525c19.85376751-88.69205333 33.718272-152.84087467 41.61900049-192.57389433C704.52292267 95.17283515 652.90057916 2.27555515 550.58614084 2.27555515c-92.26012484 0-138.59407685 45.84971417-165.91530666 137.49816969l-0.70087152 2.67605334c-16.40038399 74.13942085-41.47882668 131.61085116-74.6746315 172.73287031a189.06953915 189.06953915 0 0 1-143.04142182 70.44391902l-26.17434983 0.5606965C77.66380049 387.52529067 27.76177817 438.90551468 27.76177817 501.84374084V881.55022182c0 77.4144 62.25009818 140.17422182 139.05282766 140.17422303h492.82707951c101.23127467 0 191.59267516-63.995904 225.93535999-159.98976l102.37815468-286.22301868c26.04691951-72.82688-11.39234134-153.15945284-83.63303784-179.42300483a138.04612267 138.04612267 0 0 0-47.17499733-8.30850884H643.02466884z`,special:!0},{viewBox:[1024,1024],path:`M512 512c140.82958222 0 254.86222222-114.03264 254.86222222-254.86222222S652.82958222 2.27555555 512 2.27555555a254.78940445 254.78940445 0 0 0-254.86222222 254.86222223C257.13777778 397.96736 371.17041778 512 512 512z m0 72.81777778c-170.10232889 0-509.72444445 97.57582222-509.72444445 291.27111111v145.63555556h1019.4488889v-145.63555556c0-193.69528889-339.62211555-291.27111111-509.72444445-291.27111111z`,special:!0},{viewBox:[1024,1024],path:`M1019.81297778 564.50161779l-138.89991111-472.51456c-8.66531556-25.99594668-29.43658667-43.45400889-57.21656889-43.45400891s-50.33528889 15.67402668-59.00060446 41.66997334l-92.00526221 274.48661334H351.69166222L259.6864 90.33045333c-8.66531556-25.99594668-31.22062222-41.66997333-59.00060444-41.66997332s-50.33528889 17.33063112-57.2165689 43.45400887L4.69674667 564.50161779c-5.22467555 17.33063112 1.78403556 36.44529778 15.67402667 46.89464887l491.11950221 368.27591113 492.77610666-368.27591113c13.76256-10.32192 20.77127111-29.43658667 15.54659557-46.89464887z`,special:!0},{viewBox:[1024,1024],path:`M927.78951111 340.39277037c-12.01493333-47.81700741 12.01493333-124.03294815 89.08041481-150.97552592l-82.40545184-4.36906667s-31.19028148-109.22666667-174.27721483-118.9357037c-143.08693333-9.8304-236.65777778-3.64088889-236.65777777-3.6408889s106.07122963 67.47780741 63.5941926 187.74850371c-31.06891852 63.71555555-79.85682963 116.02299259-132.04290371 175.61220741-1.57771852 1.57771852-3.03407408 3.15543703-4.2477037 4.49042962C278.25493333 624.86755555 7.13007408 934.34311111 7.13007408 934.34311111c298.43152592 78.15774815 498.43768889-7.64586667 616.76657777-110.56165926 24.87940741-0.24272592 43.5693037-0.36408889 56.19105185-0.36408888 164.8109037 0 304.13558518-142.72284445 298.43152593-301.4656-3.88361482-109.1053037-38.71478518-133.74198518-50.72971852-181.5589926z`,special:!0},{viewBox:[1024,1024],path:`M997.8886764 504.17210418L537.2729208 43.89182982c-13.97838539-13.97838539-36.56745619-13.97838539-50.5458416 0L26.1113236 504.17210418c-13.41924998 13.41924998-21.02349164 31.64706454-21.02349163 50.65766867 0 39.47496036 32.09437288 71.56933323 71.56933324 71.56933323h48.53295408V954.83524937c0 19.79339373 15.99127289 35.78466661 35.78466663 35.78466662H440.43066677V740.12724968h125.24633315v250.49266631h297.34821416c19.79339373 0 35.78466661-15.99127289 35.78466663-35.78466662V626.39910608h48.53295408c19.01060414 0 37.23841869-7.49241457 50.65766869-21.02349163 27.84494371-27.95677079 27.84494371-73.24673948-0.11182708-101.20351027z`,special:!0},{viewBox:[1024,1024],path:`M1009.13013121 349.27572283L674.72427717 14.86986879c-8.82158299-8.82158299-20.35749924-13.16451618-31.89341544-13.16451618s-23.07183245 4.34293316-31.89341547 13.16451618L392.29790453 233.6451272c-16.5574327-1.90003326-33.25058207-2.71433322-49.94373146-2.71433324-99.34459624 0-198.68919249 32.70771543-280.25490606 98.12314628-20.90036589 16.69314938-22.52896582 48.04369819-3.66434987 67.04403081l246.59717401 246.59717401-292.33368895 292.06225564c-3.52863319 3.52863319-5.83581644 8.27871636-6.24296642 13.30023282l-4.61436649 50.48659809c-1.22144996 12.75736619 8.95729967 23.6146991 21.57894918 23.6146991 0.6785833 0 1.35716662 0 2.03574992-0.13571666l50.48659809-4.61436649c5.02151649-0.40714999 9.77159962-2.71433322 13.30023282-6.24296643l292.33368896-292.33368896 246.59717402 246.59717401c8.82158299 8.82158299 20.35749924 13.16451618 31.89341544 13.16451618 13.16451618 0 26.19331567-5.70009979 35.15061536-16.82886604 76.40848044-95.40881307 108.16617924-214.83947521 95.27309638-330.33435417l218.63954175-218.63954173c17.50744934-17.37173267 17.50744934-45.8722316 0-63.51539759z`,special:!0},{viewBox:[1024,1024],path:`M976.62005979 160.47737905c-0.39452595-0.39452595-80.35178503 78.64217259-239.47725131 237.50462156l-111.6508437-111.65084369 237.89914752-237.89914752c-125.19623464-75.35445635-286.03131335-56.02268482-390.31767264 48.26367449-81.92988882 81.92988882-112.57140424 200.15616502-83.37648398 310.09739626l2.36715569 8.81107954-372.82702222 372.69551356c-8.15353628 8.15353628-8.15353628 21.56741857 0 29.72095487l185.95323084 185.95323084c8.15353628 8.15353628 21.56741857 8.15353628 29.72095485 0l372.56400493-372.56400493 8.81107953 2.3671557c110.07273989 29.32642892 228.29901608-1.18357785 310.36041356-83.24497533 104.41786795-104.2863593 123.74963948-265.12143802 49.97328693-390.05465535z`,special:!0},{viewBox:[1024,1024],path:`M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m220.16 343.26755556l-239.616 332.23111111c-14.44977778 20.13866667-44.37333333 20.13866667-58.82311111 0L291.84 481.16622222c-4.32355555-6.03022222 0-14.44977778 7.39555555-14.44977777h53.36177778c11.60533333 0 22.64177778 5.57511111 29.46844445 15.13244444l81.00977777 112.41244444 178.85866667-248.03555555c6.82666667-9.44355555 17.74933333-15.13244445 29.46844445-15.13244445H724.76444445c7.39555555 0 11.71911111 8.41955555 7.39555555 14.44977778z`,special:!0},{viewBox:[1024,1024],path:`M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m218.45333333 537.03111112c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222H302.64888889c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222v-54.61333334c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h418.70222222c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v54.61333334z`,special:!0},{viewBox:[1024,1024],path:`M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m188.18844445 703.37422223l-75.09333334-0.34133333L512 570.48177778l-112.98133333 134.71288889-75.20711112 0.34133333c-5.00622222 0-9.10222222-3.98222222-9.10222222-9.10222222 0-2.16177778 0.79644445-4.20977778 2.16177778-5.91644445l148.02488889-176.35555555L316.87111111 337.92c-1.36533333-1.70666667-2.16177778-3.75466667-2.16177778-5.91644445 0-5.00622222 4.096-9.10222222 9.10222222-9.10222222l75.20711112 0.34133334L512 458.06933333l112.98133333-134.71288888 75.09333334-0.34133334c5.00622222 0 9.10222222 3.98222222 9.10222222 9.10222222 0 2.16177778-0.79644445 4.20977778-2.16177778 5.91644445L559.21777778 514.27555555l147.91111111 176.35555556c1.36533333 1.70666667 2.16177778 3.75466667 2.16177778 5.91644444 0 5.00622222-4.096 9.10222222-9.10222222 9.10222223z`,special:!0},{viewBox:[1024,1024],path:`M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m218.45333333 537.03111112c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222H548.40888889v172.94222222c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222h-54.61333334c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222V548.40888889H302.64888889c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222v-54.61333334c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h172.94222222V302.64888889c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h54.61333334c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v172.94222222h172.94222222c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v54.61333334z`,special:!0},{viewBox:[1024,1024],path:`M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m163.95377778 517.57511112L427.46311111 700.64355555c-1.59288889 1.13777778-3.41333333 1.70666667-5.34755556 1.70666667-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222V331.88977778c0-1.93422222 0.56888889-3.75466667 1.70666667-5.34755556 2.95822222-4.096 8.64711111-5.00622222 12.74311111-2.048L675.95377778 505.17333333c0.79644445 0.56888889 1.47911111 1.25155555 2.048 2.048 2.95822222 3.98222222 2.048 9.67111111-2.048 12.62933334z`,special:!0},{viewBox:[1024,1024],path:`M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m200.81777778 666.39644445l-32.54044445 44.37333333c-2.95822222 4.096-8.64711111 4.89244445-12.74311111 1.93422222L479.34577778 577.76355555c-2.38933333-1.70666667-3.75466667-4.43733333-3.75466667-7.39555555V257.13777778c0-5.00622222 4.096-9.10222222 9.10222222-9.10222223h54.72711112c5.00622222 0 9.10222222 4.096 9.10222222 9.10222223v281.6l162.24711111 117.30488889c4.096 2.84444445 5.00622222 8.53333333 2.048 12.62933333z`,special:!0},{viewBox:[1024,1024],path:`M981.10577778 314.48177778c-25.6-61.09866667-62.464-115.93955555-109.34044445-163.04355556-46.87644445-46.99022222-101.60355555-83.968-162.70222222-109.568C646.59911111 15.58755555 580.38044445 2.27555555 512 2.27555555h-2.27555555c-68.83555555 0.34133333-135.39555555 13.99466667-198.08711112 40.84622223-60.52977778 25.94133333-114.80177778 62.80533333-161.22311111 109.79555555-46.42133333 46.99022222-82.83022222 101.60355555-108.08888889 162.47466667C16.27022222 378.42488889 3.072 445.44 3.41333333 514.38933333c0.34133333 78.96177778 19.22844445 157.35466667 54.49955556 227.44177778v172.94222222c0 28.89955555 23.43822222 52.33777778 52.224 52.33777778h172.71466666c69.97333333 35.38488889 148.13866667 54.272 226.98666667 54.61333334h2.38933333c68.03911111 0 133.91644445-13.19822222 196.03911112-39.02577778 60.75733333-25.37244445 115.37066667-61.78133333 162.13333333-108.31644445 46.87644445-46.53511111 83.74044445-100.92088889 109.568-161.56444444 26.73777778-62.80533333 40.39111111-129.59288889 40.73244445-198.54222223 0.22755555-69.29066667-13.19822222-136.53333333-39.59466667-199.79377777zM284.89955555 566.61333333c-30.03733333 0-54.49955555-24.46222222-54.49955555-54.61333333s24.46222222-54.61333333 54.49955555-54.61333333 54.49955555 24.46222222 54.49955556 54.61333333-24.34844445 54.61333333-54.49955556 54.61333333z m227.10044445 0c-30.03733333 0-54.49955555-24.46222222-54.49955555-54.61333333s24.46222222-54.61333333 54.49955555-54.61333333 54.49955555 24.46222222 54.49955555 54.61333333-24.46222222 54.61333333-54.49955555 54.61333333z m227.10044445 0c-30.03733333 0-54.49955555-24.46222222-54.49955556-54.61333333s24.46222222-54.61333333 54.49955556-54.61333333 54.49955555 24.46222222 54.49955555 54.61333333-24.46222222 54.61333333-54.49955555 54.61333333z`,special:!0},{viewBox:[1024,1024],path:`M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM745.4750693 325.8561164l-267.95558363 371.52436096c-16.15876501 22.52048353-49.62140436 22.52048353-65.78016939 0L253.07805667 477.51948567c-4.83490607-6.74342161 0-16.15876501 8.27023406-16.15876499h59.67291961c12.97790576 0 25.31963967 6.23448413 32.95370188 16.92217123l90.59087157 125.70755774 200.01242995-277.37092701c7.63406221-10.56045272 19.84856175-16.92217125 32.95370189-16.92217124H737.20483524c8.27023407 0 13.10514012 9.41534338 8.27023406 16.158765z`,special:!0},{viewBox:[1024,1024],path:`M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM756.28999077 542.53624885c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962H277.88875885c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962v-61.0724977c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h468.2224823c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v61.0724977z`,special:!0},{viewBox:[1024,1024],path:`M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM720.79160148 697.63494611c5.59831228 6.61618726 0.8906406 16.6677025-7.76129658 16.66770249h-74.94104404c-5.98001539 0-11.70556205-2.67192177-15.64982754-7.25235911L512 575.36271635l-110.43943332 131.68757314c-3.81703111 4.58043732-9.54257777 7.25235911-15.64982754 7.25235911H310.9696951c-8.65193717 0-13.35960887-10.05151525-7.76129658-16.66770249L458.81603326 512 303.20839852 326.36505389c-5.59831228-6.61618726-0.8906406-16.6677025 7.76129658-16.66770249h74.94104404c5.98001539 0 11.70556205 2.67192177 15.64982754 7.25235911L512 448.63728365l110.43943332-131.68757314c3.81703111-4.58043732 9.54257777-7.25235911 15.64982754-7.25235911H713.0303049c8.65193717 0 13.35960887 10.05151525 7.76129658 16.66770249L565.18396674 512l155.60763474 185.63494611z`,special:!0},{viewBox:[1024,1024],path:`M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM677.02297814 523.19662459L423.31764398 722.70011704c-9.41534338 7.37959347-23.28388974 0.76340622-23.28388975-11.19662459V312.62374191c0-11.9600308 13.86854636-18.70345241 23.28388975-11.19662457l253.70533416 199.37625807c7.25235911 5.72554666 7.25235911 16.6677025 0 22.39324918z`,special:!0},{viewBox:[1024,1024],path:`M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM756.28999077 542.53624885c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962H552.71499847v193.39624268c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962h-61.0724977c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962V552.71499847H277.88875885c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962v-61.0724977c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h193.39624268V277.88875885c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h61.0724977c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v193.39624268h193.39624268c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v61.0724977z`,special:!0},{viewBox:[1024,1024],path:`M902.67315697 135.41705551L528.62204754 7.94466448C524.10877635 6.40354749 518.05438818 5.63298899 512 5.63298899s-12.10877635 0.7705585-16.62204754 2.31167549L121.32684303 135.41705551c-9.13662215 3.08223399-16.62204754 13.64989334-16.62204753 23.33691443v531.02488283c0 9.68702108 6.27454775 22.45627614 13.87005291 28.51066431L498.0198673 1013.9638196c3.85279247 2.9721542 8.8063828 4.51327118 13.87005291 4.51327118s10.12734022-1.54111698 13.87005291-4.51327118l379.4450189-295.67430252c7.59550517-5.94430839 13.87005291-18.71356345 13.87005291-28.51066431V158.75396994c0.22015956-9.68702108-7.26526581-20.14460066-16.40188796-23.33691443zM712.89560763 323.43332829L478.86598471 645.63685899c-7.04510625 9.68702108-21.57563786 9.68702108-28.6207441 0l-139.14084824-191.5388259c-4.18303182-5.8342286 0-13.9801327 7.15518603-13.9801327h60.76404132c5.61406904 0 11.0079785 2.75199463 14.31037204 7.26526582l71.22162091 97.97100864 166.11039557-228.74579323c3.30239355-4.51327118 8.58622323-7.26526581 14.31037204-7.26526581H705.7404216c7.15518602 0.11007979 11.33821785 8.25598388 7.15518603 14.09021248z`,special:!0},{viewBox:[1024,1024],path:`M959.86498307 186.28001231H797.00498922v-101.78749614c0-44.91373267-36.51626425-81.42999692-81.42999691-81.42999693H308.42500769c-44.91373267 0-81.42999692 36.51626425-81.42999691 81.42999693v101.78749614H64.13501693c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499847v40.71499845c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874962h76.8495596l31.42688945 665.43575611c2.03574992 43.38692024 37.91584233 77.61296581 81.30276254 77.6129658h577.64404066c43.5141546 0 79.26701262-34.09881122 81.30276254-77.6129658l31.42688945-665.43575611H990.40123192c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874962v-40.71499845c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499847z m-254.46874039 0H318.60375732v-91.60874653h386.79248536v91.60874653z`,special:!0},{viewBox:[1024,1024],path:`M980.2224823 248.62485371H654.50249462V104.85001539c0-22.52048353-18.19451494-40.71499847-40.71499847-40.71499846H94.67126578v-50.89374808c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961h-71.25124732c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v997.5174623c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h71.25124732c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961V674.85999383h315.54123807v143.77483833c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h529.29497999c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V289.33985217c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846z`,special:!0},{viewBox:[1024,1024],path:`M804.63905145 265.16532183V94.67126578h109.42155836c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-71.25124732c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961H109.93939019c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v71.25124732c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h109.42155836v170.49405605c0 103.6960117 53.94737296 194.92305513 135.3773699 246.83467817-81.42999692 51.91162303-135.37736988 143.13866646-135.3773699 246.83467817v170.49405605h-109.42155836c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v71.25124732c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h804.12121962c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-71.25124732c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961h-109.42155836V758.83467817c0-103.6960117-53.94737296-194.92305513-135.3773699-246.83467817 81.42999692-51.91162303 135.37736988-143.13866646 135.3773699-246.83467817z`,special:!0},{viewBox:[1024,1024],path:`M1020.928 448.44373333l-35.36213334-373.4528c-1.79200001-19.3536-17.2032-34.64533332-36.55679999-36.55679999L575.55626667 3.072h-0.47786666c-3.82293334 0-6.8096 1.19466667-9.07946669 3.46453333L6.53653333 565.99893332c-4.65919999 4.65919999-4.65919999 12.1856 0 16.84480001l434.61973334 434.61973334c2.26986667 2.26986667 5.25653333 3.46453333 8.48213333 3.46453333s6.21226667-1.19466667 8.48213333-3.46453333l559.46239999-559.46239999c2.38933332-2.5088 3.584-5.97333334 3.34506668-9.55733335zM735.40266668 362.66666667c-42.17173333 0-76.45866667-34.28693333-76.45866667-76.45866667s34.28693333-76.45866667 76.45866667-76.45866667 76.45866667 34.28693333 76.45866665 76.45866667-34.28693333 76.45866667-76.45866665 76.45866667z`,special:!0}]},{type:`线性`,typeKey:`SHAPE.CATEGORY.LINEAR`,children:[{viewBox:[1024,1024],path:`M1009.55537674 75.96950982l-61.38012212-61.38012214c-4.48769762-4.48769762-11.870684-4.48769762-16.3583816 0L14.44462326 931.67210859c-4.48769762 4.48769762-4.48769762 11.870684 0 16.35838159l61.38012212 61.38012214c4.48769762 4.48769762 11.870684 4.48769762 16.3583816 0L1009.41061232 92.18312698c4.63246205-4.34293316 4.63246205-11.72591956 0.14476442-16.21361716zM210.88996692 419.35075905c114.94296453 0 208.46079213-93.51782759 208.46079213-208.46079213s-93.51782759-208.46079213-208.46079213-208.4607921-208.46079213 93.51782759-208.4607921 208.4607921 93.51782759 208.46079213 208.4607921 208.46079213z m0-312.69118816c57.47148228 0 104.23039605 46.75891379 104.23039607 104.23039603s-46.75891379 104.23039605-104.23039607 104.23039607-104.23039605-46.75891379-104.23039603-104.23039607 46.75891379-104.23039605 104.23039603-104.23039603zM813.11003308 604.64924095c-114.94296453 0-208.46079213 93.51782759-208.46079213 208.46079213s93.51782759 208.46079213 208.46079213 208.4607921 208.46079213-93.51782759 208.4607921-208.4607921-93.51782759-208.46079213-208.4607921-208.46079213z m0 312.69118816c-57.47148228 0-104.23039605-46.75891379-104.23039607-104.23039603s46.75891379-104.23039605 104.23039607-104.23039607 104.23039605 46.75891379 104.23039603 104.23039607-46.75891379 104.23039605-104.23039603 104.23039603z`,special:!0,outlined:!0},{viewBox:[1024,1024],path:`M1004.96017383 478.58365209L483.27851088 25.80594621c-4.00443838-3.45210207-9.11354943-5.3852792-14.49882864-5.38527921h-122.20441284c-10.21822208 0-14.91308089 12.70373557-7.18037228 19.33177152l483.57045622 419.77561022H14.8973037c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672657v82.85044938c0 6.07569962 4.97102697 11.04672658 11.04672658 11.04672657h807.92996557L339.25681303 984.24756148c-7.7327086 6.76612003-3.0378498 19.33177153 7.18037229 19.33177152h126.34693531c2.62359757 0 5.24719513-0.96658859 7.18037228-2.76168164L1004.96017383 545.41634791c20.2983601-17.67476253 20.2983601-49.1579333 0-66.83269582z`,special:!0,outlined:!0},{viewBox:[1024,1024],path:`M1011.38217956 558.9924242L545.80649025 22.43713295c-17.81503843-20.62055629-49.79794206-20.62055629-67.75325638 0L12.61782044 558.9924242c-6.31241519 7.29434645-1.12220714 18.51641789 8.41655359 18.51641789h113.62347344c6.45269109 0 12.62483038-2.80551785 16.97338308-7.71517411L458.69516062 215.87758959V1005.77114384c0 6.1721393 5.04993216 11.22207145 11.22207144 11.22207145h84.16553588c6.1721393 0 11.22207145-5.04993216 11.22207144-11.22207145V215.87758959l307.06393007 353.91607839c4.20827679 4.90965626 10.38041608 7.71517413 16.97338308 7.71517411h113.62347344c9.53876074 0 14.72896878-11.22207145 8.41655359-18.51641789z`,special:!0,outlined:!0},{viewBox:[1024,1024],path:`M1009.1026963 459.52804874H201.17273073l483.57045624-419.77561022c7.7327086-6.76612003 3.0378498-19.33177153-7.18037229-19.33177152h-122.20441283c-5.3852792 0-10.49439025 1.93317715-14.49882866 5.38527921L19.03982617 478.58365209c-20.2983601 17.67476253-20.2983601 49.1579333 0 66.69461175L543.89742302 1000.81765136c2.07126124 1.79509307 4.55677472 2.76168163 7.18037228 2.76168164h126.3469353c10.21822208 0 14.91308089-12.70373557 7.18037228-19.33177152L201.17273073 564.47195126H1009.1026963c6.07569962 0 11.04672658-4.97102697 11.04672658-11.04672657v-82.85044938c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672657z`,special:!0,outlined:!0},{viewBox:[1024,1024],path:`M1002.96562597 446.49115791h-113.62347344c-6.45269109 0-12.62483038 2.80551785-16.97338308 7.71517411L565.30483938 808.12241041V18.22885616c0-6.1721393-5.04993216-11.22207145-11.22207144-11.22207145h-84.16553588c-6.1721393 0-11.22207145 5.04993216-11.22207144 11.22207145v789.89355425L151.63123055 454.20633202c-4.20827679-4.90965626-10.38041608-7.71517413-16.97338308-7.71517411h-113.62347344c-9.53876074 0-14.72896878 11.36234735-8.41655359 18.51641789L478.19350975 1001.56286705c17.81503843 20.62055629 49.79794206 20.62055629 67.75325638 0L1011.38217956 465.0075758c6.31241519-7.29434645 1.12220714-18.51641789-8.41655359-18.51641789z`,special:!0,outlined:!0},{viewBox:[1024,1024],path:`M975.82443246 622.46726585H14.8973037c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672658v82.85044937c0 6.07569962 4.97102697 11.04672658 11.04672658 11.04672659h835.6848661L651.32683905 980.10503902c-5.66144737 7.18037229-0.55233633 17.9509307 8.69929718 17.9509307h100.11095967c6.76612003 0 13.11798782-3.0378498 17.39859437-8.42312903l233.08593092-295.63802022c22.78387358-28.99765728 2.20934532-71.52755463-34.79718873-71.52755462zM1009.1026963 296.58883161H173.4178302l199.25533075-252.69387063c5.66144737-7.18037229 0.55233633-17.9509307-8.69929718-17.9509307h-100.11095967c-6.76612003 0-13.11798782 3.0378498-17.39859437 8.42312903L13.37837881 330.00517953c-22.78387358 28.99765728-2.20934532 71.52755463 34.65910466 71.52755462h961.06521283c6.07569962 0 11.04672658-4.97102697 11.04672658-11.04672658v-82.85044937c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672659z`,special:!0,outlined:!0},{viewBox:[1024,1024],path:`M1010.75873115 64.13501693H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v81.42999691c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874964h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874964v-81.42999691c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961zM1010.75873115 858.07748691H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874964v81.42999691c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-81.42999691c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874964zM1010.75873115 461.10625194H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874959v81.42999694c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874959h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874959v-81.42999694c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874959z`,special:!0,outlined:!0},{viewBox:[1024,1024],path:`M591.98717801 512l405.34042913-483.16579151c6.79427767-8.02960089 1.08090782-20.22841761-9.41933951-20.2284176h-123.22349044c-7.25752386 0-14.20621693 3.24272343-18.99309439 8.80167789L511.38233839 415.95362022 177.07299399 17.40746878c-4.63246205-5.55895447-11.58115512-8.80167789-18.99309439-8.80167789H34.85640916c-10.50024731 0-16.21361717 12.19881672-9.41933952 20.2284176L430.77749876 512 25.43706964 995.16579151c-6.79427767 8.02960089-1.08090782 20.22841761 9.41933952 20.2284176h123.22349044c7.25752386 0 14.20621693-3.24272343 18.99309439-8.80167789l334.3093444-398.54615144 334.30934441 398.54615144c4.63246205 5.55895447 11.58115512 8.80167789 18.99309439 8.80167789h123.22349044c10.50024731 0 16.21361717-12.19881672 9.41933951-20.2284176L591.98717801 512z`,special:!0,outlined:!0},{viewBox:[1024,1024],path:`M953.5488 832.61667556c-24.08448-57.08913778-58.74574221-108.31644445-102.70947556-152.28017777-43.96373333-43.96373333-95.19104-78.49756444-152.28017777-102.70947558-0.50972445-0.25486222-1.01944888-0.38229333-1.52917334-0.63715555C776.41955556 519.64586667 828.02915556 426.23886221 828.02915556 320.85333332c0-174.58062221-141.44853334-316.02915556-316.02915556-316.02915554S195.97084444 146.27271111 195.97084444 320.85333332c0 105.38552889 51.6096 198.79253333 130.99918223 256.26396447-0.50972445 0.25486222-1.01944888 0.38229333-1.52917334 0.63715555-57.08913778 24.08448-108.31644445 58.61831112-152.28017777 102.70947554-43.96373333 43.96373333-78.49756444 95.19104-102.70947556 152.28017779C46.74901333 888.55893332 34.13333334 947.8144 32.85902222 1008.72647111c-0.12743111 5.7344 4.46008889 10.44935111 10.19448889 10.44935111h76.45866667c5.60696888 0 10.06705778-4.46008889 10.19448889-9.93962666 2.54862221-98.37681778 42.05226667-190.50951112 111.88451555-260.34176001 72.25344-72.25344 168.20906666-112.01194667 270.40881778-112.01194667s198.15537778 39.75850667 270.40881778 112.01194667C852.24106667 818.72668444 891.74471111 910.85937779 894.29333333 1009.23619556c0.12743111 5.60696888 4.58752 9.93962667 10.19448889 9.93962666h76.45866667c5.7344 0 10.32192-4.71495112 10.19448889-10.44935111-1.27431111-60.91207112-13.88999112-120.16753779-37.59217778-176.10979555zM512 540.03484444c-58.49088 0-113.54112-22.81016889-154.95623111-64.22527999S292.81848888 379.34421333 292.81848888 320.85333332c0-58.49088 22.81016889-113.54112 64.22528001-154.9562311S453.50912 101.67182221 512 101.67182221s113.54112 22.81016889 154.95623111 64.22528001S731.18151112 262.36245333 731.18151112 320.85333332c0 58.49088-22.81016889 113.54112-64.22528001 154.95623113S570.49088 540.03484444 512 540.03484444z`,special:!0,outlined:!0},{viewBox:[1024,1024],path:`M985.31555555 111.50222222H38.68444445c-20.13866667 0-36.40888889 16.27022222-36.4088889 36.40888889v728.17777778c0 20.13866667 16.27022222 36.40888889 36.4088889 36.40888889h946.6311111c20.13866667 0 36.40888889-16.27022222 36.4088889-36.40888889V147.91111111c0-20.13866667-16.27022222-36.40888889-36.4088889-36.40888889z m-45.5111111 126.06577778V830.57777778H84.19555555V237.568l-31.40266666-24.46222222 44.71466666-57.45777778 48.6968889 37.888h731.70488888l48.69688889-37.888 44.71466667 57.45777778-31.51644444 24.46222222z M877.90933333 193.42222222L512 477.86666667 146.09066667 193.42222222l-48.69688889-37.888-44.71466667 57.45777778 31.40266667 24.46222222 388.66488889 302.19377778c22.98311111 17.86311111 55.18222222 17.86311111 78.16533333 0L939.80444445 237.568l31.40266666-24.46222222-44.71466666-57.45777778-48.58311112 37.77422222z`,special:!0,outlined:!0},{viewBox:[1024,1024],path:`M985.31555555 88.74666667H38.68444445c-20.13866667 0-36.40888889 16.27022222-36.4088889 36.40888888v564.33777778c0 20.13866667 16.27022222 36.40888889 36.4088889 36.40888889h432.35555555v127.43111111H275.34222222c-10.01244445 0-18.20444445 8.192-18.20444444 18.20444445v54.61333333c0 5.00622222 4.096 9.10222222 9.10222222 9.10222222h491.52c5.00622222 0 9.10222222-4.096 9.10222222-9.10222222v-54.61333333c0-10.01244445-8.192-18.20444445-18.20444444-18.20444445H552.96V725.90222222h432.35555555c20.13866667 0 36.40888889-16.27022222 36.4088889-36.40888889V125.15555555c0-20.13866667-16.27022222-36.40888889-36.4088889-36.40888888z m-45.5111111 555.23555555H84.19555555V170.66666667h855.6088889v473.31555555z`,special:!0,outlined:!0},{viewBox:[1024,1024],path:`M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m0 932.97777778c-233.69955555 0-423.25333333-189.55377778-423.25333333-423.25333333 0-101.26222222 35.61244445-194.33244445 95.00444444-267.15022222l595.39911111 595.39911111C706.33244445 899.64088889 613.26222222 935.25333333 512 935.25333333z m328.24888889-156.10311111L244.84977778 183.75111111C317.66755555 124.35911111 410.73777778 88.74666667 512 88.74666667c233.69955555 0 423.25333333 189.55377778 423.25333333 423.25333333 0 101.26222222-35.61244445 194.33244445-95.00444444 267.15022222z`,special:!0,outlined:!0},{viewBox:[1024,1024],path:`M901.80266667 257.82044445L656.95288889 12.97066667c-6.82666667-6.82666667-16.04266667-10.69511111-25.71377778-10.69511112H147.91111111c-20.13866667 0-36.40888889 16.27022222-36.40888889 36.4088889v946.6311111c0 20.13866667 16.27022222 36.40888889 36.40888889 36.4088889h728.17777778c20.13866667 0 36.40888889-16.27022222 36.40888889-36.4088889V283.648c0-9.67111111-3.86844445-19.00088889-10.69511111-25.82755555zM828.52977778 300.37333333H614.4V86.24355555L828.52977778 300.37333333z m2.048 639.43111112H193.42222222V84.19555555h343.60888889v245.76c0 26.39644445 21.39022222 47.78666667 47.78666667 47.78666667h245.76v562.06222223z`,special:!0,outlined:!0},{viewBox:[1024,1024],path:`M981.07392 55.79662222H42.92608c-31.22062222 0-50.71758221 34.02410666-35.04355556 61.16693334L304.28728889 620.82616888V927.42542221c0 22.55530667 18.09521779 40.77795555 40.52309333 40.77795557h334.37923556c22.42787556 0 40.52309333-18.22264888 40.52309333-40.77795557V620.82616888L1016.24490667 116.96355556c15.54659555-27.14282666-3.95036444-61.16693333-35.17098667-61.16693334zM628.47203556 876.45297779H395.52796444V677.66044445h233.07150222v198.79253334z m12.23338666-301.50200891l-12.10595556 21.15356445h-233.19893332l-12.10595556-21.15356445L130.59868445 147.54702221h762.8026311L640.70542222 574.95096888z`,special:!0,outlined:!0},{viewBox:[1024,1024],path:`M980.62285431 4.54099753H654.39920987c-4.2719763 0-7.76722963 3.49525333-7.76722962 7.76722964v72.4941432c0 4.2719763 3.49525333 7.76722963 7.76722962 7.76722963h207.64393877L604.04167111 350.57107753c-64.72691358-49.83972347-143.69374815-76.7661195-226.67365136-76.7661195-99.54999309 0-193.27456395 38.83614815-263.5679921 109.25903012S4.54099753 547.08198717 4.54099753 646.63198025s38.83614815 193.27456395 109.25903012 263.5679921C184.09345581 980.62285431 277.81802667 1019.45900247 377.36801975 1019.45900247s193.27456395-38.83614815 263.5679921-109.25903012C711.35889383 839.90654419 750.19504197 746.18197333 750.19504197 646.63198025c0-82.9799032-26.92639605-161.68783013-76.63666567-226.41474372L931.4304 162.34521283V369.60079013c0 4.2719763 3.49525333 7.76722963 7.76722963 7.76722962h72.4941432c4.2719763 0 7.76722963-3.49525333 7.76722964-7.76722962V43.37714569c0-21.35988148-17.47626667-38.83614815-38.83614816-38.83614816zM377.36801975 921.07409383c-151.33152395 0-274.44211358-123.11058963-274.44211358-274.44211358s123.11058963-274.44211358 274.44211358-274.44211358 274.44211358 123.11058963 274.44211358 274.44211358-123.11058963 274.44211358-274.44211358 274.44211358z`,special:!0,outlined:!0}]}],Sn={bar:{label:`柱状图`,labelKey:`CHART.TYPE.BAR`},column:{label:`条形图`,labelKey:`CHART.TYPE.COLUMN`},line:{label:`折线图`,labelKey:`CHART.TYPE.LINE`},area:{label:`面积图`,labelKey:`CHART.TYPE.AREA`},scatter:{label:`散点图`,labelKey:`CHART.TYPE.SCATTER`},pie:{label:`饼图`,labelKey:`CHART.TYPE.PIE`},ring:{label:`环形图`,labelKey:`CHART.TYPE.RING`},radar:{label:`雷达图`,labelKey:`CHART.TYPE.RADAR`}},Cn=(e,t)=>e.replace(/\{(\w+)\}/g,(e,n)=>t&&n in t?String(t[n]):`{${n}}`),wn={"CHART.DEFAULT.CATEGORY":`类别{index}`,"CHART.DEFAULT.SERIES":`系列{index}`,"CHART.DEFAULT.VALUE":`值`,"CHART.DEFAULT.COORD":`坐标{index}`,"CHART.DEFAULT.X":`X`,"CHART.DEFAULT.Y":`Y`},Tn=(e,t)=>Cn(wn[e]||e,t),En=e=>[1,2,3,4,5].map(t=>e(`CHART.DEFAULT.CATEGORY`,{index:t})),Dn=e=>[1,2].map(t=>e(`CHART.DEFAULT.SERIES`,{index:t})),On=e=>[1,2,3,4,5].map(t=>e(`CHART.DEFAULT.COORD`,{index:t})),kn=e=>({bar:{labels:En(e),legends:Dn(e),series:[[12,19,5,2,18],[7,11,13,21,9]]},column:{labels:En(e),legends:Dn(e),series:[[12,19,5,2,18],[7,11,13,21,9]]},line:{labels:En(e),legends:Dn(e),series:[[12,19,5,2,18],[7,11,13,21,9]]},pie:{labels:En(e),legends:[e(`CHART.DEFAULT.VALUE`)],series:[[12,19,5,2,18]]},ring:{labels:En(e),legends:[e(`CHART.DEFAULT.VALUE`)],series:[[12,19,5,2,18]]},area:{labels:En(e),legends:Dn(e),series:[[12,19,5,2,18],[7,11,13,21,9]]},radar:{labels:En(e),legends:Dn(e),series:[[12,19,5,2,18],[7,11,13,21,9]]},scatter:{labels:On(e),legends:[e(`CHART.DEFAULT.X`),e(`CHART.DEFAULT.Y`)],series:[[12,19,5,2,18],[7,11,13,21,9]]}});kn(Tn);var An=[[`#d87c7c`,`#919e8b`,`#d7ab82`,`#6e7074`,`#61a0a8`,`#efa18d`],[`#dd6b66`,`#759aa0`,`#e69d87`,`#8dc1a9`,`#ea7e53`,`#eedd78`],[`#516b91`,`#59c4e6`,`#edafda`,`#93b7e3`,`#a5e7f0`,`#cbb0e3`],[`#893448`,`#d95850`,`#eb8146`,`#ffb248`,`#f2d643`,`#ebdba4`],[`#4ea397`,`#22c3aa`,`#7bd9a5`,`#d0648a`,`#f58db2`,`#f2b3c9`],[`#3fb1e3`,`#6be6c1`,`#626c91`,`#a0a7e6`,`#c4ebad`,`#96dee8`],[`#fc97af`,`#87f7cf`,`#f7f494`,`#72ccff`,`#f7c5a0`,`#d4a4eb`],[`#c1232b`,`#27727b`,`#fcce10`,`#e87c25`,`#b5c334`,`#fe8463`],[`#2ec7c9`,`#b6a2de`,`#5ab1ef`,`#ffb980`,`#d87a80`,`#8d98b3`],[`#e01f54`,`#001852`,`#f5e8c8`,`#b8d2c7`,`#c6b38e`,`#a4d8c2`],[`#c12e34`,`#e6b600`,`#0098d9`,`#2b821d`,`#005eaa`,`#339ca8`],[`#8a7ca8`,`#e098c7`,`#8fd3e8`,`#71669e`,`#cc70af`,`#7cb4cc`]],jn=()=>{let e=B(),t=V(),{creatingElement:n}=(0,d.storeToRefs)(e),{theme:r,viewportRatio:i,viewportSize:a}=(0,d.storeToRefs)(t),{addHistorySnapshot:o}=tn(),{t:s}=z(),c=(r,i)=>{t.addElement(r),e.setActiveElementIdList([r.id]),n.value&&e.setCreatingElement(null),setTimeout(()=>{e.setEditorareaFocus(!0)},0),i&&i(),o()};return{createImageElement:e=>{mn(e).then(({width:t,height:n})=>{let r=n/t;r<i.value&&t>a.value?(t=a.value,n=t*r):n>a.value*i.value&&(n=a.value*i.value,t=n/r),c({type:`image`,id:(0,f.nanoid)(10),src:e,width:t,height:n,left:(a.value-t)/2,top:(a.value*i.value-n)/2,fixedRatio:!0,rotate:0})})},createChartElement:e=>{c({type:`chart`,id:(0,f.nanoid)(10),chartType:e,left:300,top:81.25,width:400,height:400,rotate:0,themeColors:r.value.themeColors,textColor:r.value.fontColor,data:kn(s)[e]})},createTableElement:(e,t)=>{let n=(Array.isArray(r.value.themeColors)?r.value.themeColors:[])[0]||`#5b9bd5`,o={fontname:r.value.fontName,color:r.value.fontColor},s=[];for(let n=0;n<e;n++){let e=[];for(let n=0;n<t;n++)e.push({id:(0,f.nanoid)(10),colspan:1,rowspan:1,text:``,style:o});s.push(e)}let l=Array(t).fill(1/t),u=t*100,d=e*36;c({type:`table`,id:(0,f.nanoid)(10),width:u,height:d,colWidths:l,rotate:0,data:s,left:(a.value-u)/2,top:(a.value*i.value-d)/2,outline:{width:2,style:`solid`,color:r.value.outline?.color||`#eeece1`},theme:{color:n,rowHeader:!0,rowFooter:!1,colHeader:!1,colFooter:!1},cellMinHeight:36})},createTextElement:(e,t)=>{let{left:n,top:i,width:a,height:o}=e,s=t?.content||``,l=t?.vertical||!1,u=(0,f.nanoid)(10);c({type:`text`,id:u,left:n,top:i,width:a,height:o,content:s,rotate:0,defaultFontName:r.value.fontName,defaultColor:r.value.fontColor,vertical:l},()=>{setTimeout(()=>{let e=document.querySelector(`#editable-element-${u} .ProseMirror`);e&&e.focus()},0)})},createShapeElement:(e,t,n={})=>{let{left:i,top:a,width:o,height:s}=e,l={type:`shape`,id:(0,f.nanoid)(10),left:i,top:a,width:o,height:s,viewBox:t.viewBox,path:t.path,fill:r.value.themeColors[0],fixedRatio:!1,rotate:0,...n};if(t.withborder&&(l.outline=r.value.outline),t.special&&(l.special=!0),t.pathFormula){l.pathFormula=t.pathFormula,l.viewBox=[o,s];let e=bn[t.pathFormula];`editable`in e&&e.editable?(l.path=e.formula(o,s,e.defaultValue),l.keypoints=e.defaultValue):l.path=e.formula(o,s)}c(l)},createLineElement:(e,t)=>{let{left:n,top:i,start:a,end:o}=e,s={type:`line`,id:(0,f.nanoid)(10),left:n,top:i,start:a,end:o,points:t.points,color:r.value.themeColors[0],style:t.style,width:2};t.isBroken&&(s.broken=[(a[0]+o[0])/2,(a[1]+o[1])/2]),t.isBroken2&&(s.broken2=[(a[0]+o[0])/2,(a[1]+o[1])/2]),t.isCurve&&(s.curve=[(a[0]+o[0])/2,(a[1]+o[1])/2]),t.isCubic&&(s.cubic=[[(a[0]+o[0])/2,(a[1]+o[1])/2],[(a[0]+o[0])/2,(a[1]+o[1])/2]]),c(s)},createLatexElement:e=>{c({type:`latex`,id:(0,f.nanoid)(10),width:e.w,height:e.h,rotate:0,left:(a.value-e.w)/2,top:(a.value*i.value-e.h)/2,path:e.path,latex:e.latex,color:r.value.fontColor,strokeWidth:2,viewBox:[e.w,e.h],fixedRatio:!0})},createVideoElement:e=>{c({type:`video`,id:(0,f.nanoid)(10),width:500,height:300,rotate:0,left:(a.value-500)/2,top:(a.value*i.value-300)/2,src:e,autoplay:!1})},createAudioElement:e=>{c({type:`audio`,id:(0,f.nanoid)(10),width:50,height:50,rotate:0,left:(a.value-50)/2,top:(a.value*i.value-50)/2,loop:!1,autoplay:!1,fixedRatio:!0,color:r.value.themeColors[0],src:e})}}},Mn=e=>{let t=/^https?:\/\/(?:[a-zA-Z0-9-]+\.)*pexels\.com\/[^\s]+\.(?:jpg|jpeg|png|svg|webp)(?:\?.*)?$/i.test(e),n=/^https?:\/\/(?:[a-zA-Z0-9-]+\.)*pptist\.cn\/[^\s]+\.(?:jpg|jpeg|png|svg|webp)(?:\?.*)?$/i.test(e);return t||n},Nn=()=>{let{shiftKeyState:e}=(0,d.storeToRefs)(zt()),{createTextElement:t,createImageElement:n}=jn(),{addElementsFromData:r,addSlidesFromData:i}=nn(),a=e=>{t({left:0,top:0,width:600,height:50},{content:e})};return{pasteTextClipboardData:(t,o)=>{let s=o?.onlySlide||!1,c=o?.onlyElements||!1,l=ln(t);if(typeof l==`object`){let{type:e,data:t}=l;e===`elements`&&!s?r(t):e===`slides`&&!c&&i(t)}else !c&&!s&&(e.value?a(pn(l)):Mn(l)?n(l):Le(l)?a(`<a href="${l}" title="${l}" target="_blank">${l}</a>`):gn(l)?hn(_n(l)).then(e=>n(e)):a(pn(l)))}}},Pn=()=>{let e=B(),t=V(),{selectedSlidesIndex:n,activeElementIdList:r}=(0,d.storeToRefs)(e),{currentSlide:i,slides:a,theme:o,slideIndex:s}=(0,d.storeToRefs)(t),c=(0,l.computed)(()=>[...n.value,s.value]),u=(0,l.computed)(()=>a.value.filter((e,t)=>c.value.includes(t))),p=(0,l.computed)(()=>u.value.map(e=>e.id)),{pasteTextClipboardData:m}=Nn(),{addSlidesFromData:h}=nn(),{addHistorySnapshot:g}=tn(),_=()=>{let n={id:(0,f.nanoid)(10),elements:[],background:{type:`solid`,color:o.value.backgroundColor}};t.updateSlideIndex(0),e.setActiveElementIdList([]),t.setSlides([n])},v=n=>{n===H.UP&&s.value>0?(r.value.length&&e.setActiveElementIdList([]),t.updateSlideIndex(s.value-1)):n===H.DOWN&&s.value<a.value.length-1&&(r.value.length&&e.setActiveElementIdList([]),t.updateSlideIndex(s.value+1))},y=()=>{sn(an(JSON.stringify({type:`slides`,data:u.value}))).then(()=>{e.setThumbnailsFocus(!0)})},b=()=>{cn().then(e=>{m(e,{onlySlide:!0})}).catch(e=>R.warning(e))},x=()=>{let n={id:(0,f.nanoid)(10),elements:[],background:{type:`solid`,color:o.value.backgroundColor}};e.setActiveElementIdList([]),t.addSlide(n),g()},S=n=>{Xt(n,o.value.fontName);let{groupIdMap:r,elIdMap:i}=Jt(n.elements);for(let e of n.elements)e.id=i[e.id],e.groupId&&=r[e.groupId];let a={...n,id:(0,f.nanoid)(10)};e.setActiveElementIdList([]),t.addSlide(a),g()},C=()=>{h([JSON.parse(JSON.stringify(i.value))])},w=(n=p.value)=>{a.value.length===n.length?_():t.deleteSlide(n),e.updateSelectedSlidesIndex([]),g()};return{resetSlides:_,updateSlideIndex:v,copySlide:y,pasteSlide:b,createSlide:x,createSlideByTemplate:S,copyAndPasteSlide:C,deleteSlide:w,cutSlide:()=>{let e=[...p.value];y(),w(e)},selectAllSlide:()=>{let t=Array.from(Array(a.value.length),(e,t)=>t);e.setActiveElementIdList([]),e.updateSelectedSlidesIndex(t)},sortSlides:(e,n)=>{if(n===e)return;let r=JSON.parse(JSON.stringify(a.value)),i=r[n],o=i.sectionTag;if(o){let e=r[n+1];delete i.sectionTag,e&&!e.sectionTag&&(e.sectionTag=o)}if(e===0){let e=r[0].sectionTag;e&&(delete r[0].sectionTag,i.sectionTag=e)}let s=r[n];r.splice(n,1),r.splice(e,0,s),t.setSlides(r),t.updateSlideIndex(e)},isEmptySlide:(0,l.computed)(()=>!(a.value.length>1||a.value[0].elements.length>0))}},Fn=e=>e&&e.kind===`chart`&&Array.isArray(e.labels)&&Array.isArray(e.series),In=e=>e&&e.kind===`text`&&typeof e.title==`string`&&typeof e.text==`string`,Ln=e=>e&&e.kind===void 0&&typeof e.title==`string`&&typeof e.text==`string`,Rn=e=>e&&e.kind===`image`,zn=()=>{let e=V(),{addSlidesFromData:t,addSlidesFromDataToEnd:n}=nn(),{isEmptySlide:r}=Pn(),{addHistorySnapshot:i}=tn(),a=(0,l.ref)([]),o=(0,l.ref)(0),s=(0,l.ref)(null),c=(e,t)=>e.type===`text`&&e.textType===t||e.type===`shape`&&e.text&&e.text.type===t,u=e=>e.type===`chart`&&e.chartMark===`chartItem`,d=(e,t)=>e.type===`image`&&e.imageType===t,p=e=>e.elements.filter(e=>d(e,`itemFigure`)).length,m=(e,t,n)=>{if(t===1){let t=e.filter(e=>{let t=e.elements.filter(e=>c(e,n)),r=e.elements.filter(e=>c(e,`title`)),i=e.elements.filter(e=>c(e,`content`));return!t.length&&r.length===1&&i.length===1});if(t.length)return t}let r=null,i=e.filter(e=>e.elements.filter(e=>c(e,n)).length>=t);if(i.length===0){let t=e.sort((e,t)=>e.elements.filter(e=>c(e,n)).length-t.elements.filter(e=>c(e,n)).length);r=t[t.length-1]}else r=i.reduce((e,r)=>{let i=r.elements.filter(e=>c(e,n)).length,a=e.elements.filter(e=>c(e,n)).length;return i-t<=a-t?r:e});return e.filter(e=>e.elements.filter(e=>c(e,n)).length===r.elements.filter(e=>c(e,n)).length)},h=e=>{let t=e.elements.filter(e=>e.type===`chart`&&e.chartMark===`chartItem`).length;return t>0?t:e.elements.filter(e=>e.type===`chart`).length},g=e=>e.elements.filter(e=>e.type===`text`&&e.textType===`item`||e.type===`shape`&&e.text?.type===`item`).length,_=(e,t)=>{let n=t.filter(Fn).length,r=t.filter(e=>In(e)||Ln(e)).length,i=t.filter(Rn).length,a=e.filter(e=>h(e)>=n&&g(e)>=r&&(i===0||p(e)>=i));if(a.length===0)if(i>0)a=e.filter(e=>p(e)>0).sort((e,t)=>p(t)-p(e)||h(t)-h(e)||g(t)-g(e));else if(n>0)a=e.filter(e=>h(e)>0).sort((e,t)=>h(t)-h(e)||g(t)-g(e));else return m(e,r,`item`);let o=e=>{let t=Math.max(0,h(e)-n),a=Math.max(0,g(e)-r);return Math.max(0,p(e)-i)*1e4+t*100+a},s=Math.min(...a.map(o));return a.filter(e=>o(e)===s)},v=({text:e,fontSize:t,fontFamily:n,width:r,maxLine:i})=>{let a=document.createElement(`canvas`).getContext(`2d`),o=t;for(;o>=10;){a.font=`${o}px ${n}`;let t=a.measureText(e).width;if(Math.ceil(t/r)<=i)return o;o-=o<=22?1:2}return 10},y=e=>{let t=/font-size:\s*(\d+(?:\.\d+)?)\s*px/i,n=/font-family:\s*['"]?([^'";]+)['"]?\s*(?=;|>|$)/i,r={fontSize:16,fontFamily:Et()},i=e.match(t),a=e.match(n);return{fontSize:i?+i[1].trim():r.fontSize,fontFamily:a?a[1].trim():r.fontFamily,hasFontFamily:!!a}},b=({el:e,text:t,maxLine:n,longestText:r,digitPadding:i})=>{let a=e.width-20-2,o=e.type===`text`?e.content:e.text.content,s=y(o),c=s.hasFontFamily?null:Et(),l=v({text:r||t,fontSize:s.fontSize,fontFamily:s.fontFamily,width:a,maxLine:n}),u=new DOMParser().parseFromString(o,`text/html`),d=document.createTreeWalker(u.body,NodeFilter.SHOW_TEXT),f=[],p;for(;p=d.nextNode();)p.nodeType===Node.TEXT_NODE&&f.push(p);if(f.forEach(e=>{e.textContent=``}),f.length>0){let e=f[0];i&&t.length===1?e.textContent=`0`+t:e.textContent=t}else{let e=u.querySelector(`p`)||u.createElement(`p`);e.parentNode||u.body.appendChild(e),i&&t.length===1?e.textContent=`0`+t:e.textContent=t}if(u.body.innerHTML.indexOf(`font-size`)===-1){let e=u.querySelector(`p`);e&&(e.style.fontSize=`16px`)}return c&&u.body.querySelectorAll(`*`).forEach(e=>{e instanceof HTMLElement&&!e.style.fontFamily&&(e.style.fontFamily=c)}),o=u.body.innerHTML.replace(/font-size:(.+?)px/g,`font-size: ${l}px`),e.type===`text`?{...e,content:o,lineHeight:l<15?1.2:e.lineHeight,...c?{defaultFontName:c}:{}}:{...e,text:{...e.text,content:o,...c?{defaultFontName:c}:{}}}},x=(e,t)=>{let n=t.series.map(e=>e.name??``),r=t.series.map(e=>e.data);return{...e,chartType:t.chartType,data:{labels:t.labels,series:r,legends:n},options:{...e.options||{},...t.options||{}},themeColors:t.themeColors||e.themeColors,textColor:t.textColor||e.textColor}},S=e=>{let t=null,n=[];return n=e.width===e.height?a.value.filter(e=>e.width===e.height):e.width>e.height?a.value.filter(e=>e.width>e.height):a.value.filter(e=>e.width<=e.height),n.length||(n=a.value),t=n[Math.floor(Math.random()*n.length)],a.value=a.value.filter(e=>e.id!==t.id),t},C=e=>{let t=S(e);if(!t)return e;e.width/e.height,t.width/t.height;let n=e.width/t.width,r=e.height/t.height,i=Math.min(n,r),a=t.width*i,o=t.height*i,s=(e.width-a)/2,c=(e.height-o)/2;return{...e,src:t.src,width:a,height:o,left:e.left+s,top:e.top+c,clip:void 0}},w=e=>{let t=e.match(/```markdown([^```]*)```/);return t?t[1].trim():e.replace("```markdown",``).replace("```",``)},T=e=>{let t=e.match(/```json([^```]*)```/);return t?t[1].trim():e.replace("```json",``).replace("```",``)},E=e=>{a.value=e};function*D(e,t,n){n&&(a.value=n);let r=[],i=e.filter(e=>e.type===`contents`).map(e=>e.elements.filter(e=>c(e,`item`)).length),l=i.length?Math.max(...i):0;for(let e of t)if(e.type===`content`){let t=e.data.items;if(t.length===5||t.length===6){let n=t.slice(0,3),i=t.slice(3);r.push({...e,data:{...e.data,items:n}}),r.push({...e,data:{...e.data,items:i},offset:3})}else if(t.length===7||t.length===8){let n=t.slice(0,4),i=t.slice(4);r.push({...e,data:{...e.data,items:n}}),r.push({...e,data:{...e.data,items:i},offset:4})}else if(t.length===9||t.length===10){let n=t.slice(0,3),i=t.slice(3,6),a=t.slice(6);r.push({...e,data:{...e.data,items:n}}),r.push({...e,data:{...e.data,items:i},offset:3}),r.push({...e,data:{...e.data,items:a},offset:6})}else if(t.length>10){let n=t.slice(0,4),i=t.slice(4,8),a=t.slice(8);r.push({...e,data:{...e.data,items:n}}),r.push({...e,data:{...e.data,items:i},offset:4}),r.push({...e,data:{...e.data,items:a},offset:8})}else r.push(e)}else if(e.type===`contents`){let t=e.data.items,n=l>0?l:0;if(n>0&&t.length>n){let i=0;for(;i<t.length;)r.push({...e,data:{...e.data,items:t.slice(i,i+n)},...i>0?{offset:i}:{}}),i+=n}else r.push(e)}else if(e.type===`reference`){let t=e.data.references,n=t.length;if(n<=10)r.push(e);else if(n<=20){let i=Math.ceil(n/2),a=t.slice(0,i),o=t.slice(i);r.push({...e,data:{...e.data,references:a}}),r.push({...e,data:{...e.data,references:o},offset:i})}else if(n<=30){let n=t.slice(0,10),i=t.slice(10,20),a=t.slice(20);r.push({...e,data:{...e.data,references:n}}),r.push({...e,data:{...e.data,references:i},offset:10}),r.push({...e,data:{...e.data,references:a},offset:20})}else{let i=0;for(;i<n;){let n=t.slice(i,i+10);r.push({...e,data:{...e.data,references:n},offset:i}),i+=10}}}else r.push(e);let p=e.filter(e=>e.type===`cover`),h=e.filter(e=>e.type===`contents`),g=e.filter(e=>e.type===`transition`),v=e.filter(e=>e.type===`content`),y=e.filter(e=>e.type===`reference`),S=e.filter(e=>e.type===`end`);s.value||=g[Math.floor(Math.random()*g.length)];for(let e of r)if(e.type===`cover`){let t=p[Math.floor(Math.random()*p.length)],n=t.elements.map(t=>t.type===`image`&&t.imageType&&a.value.length?C(t):t.type!==`text`&&t.type!==`shape`?t:c(t,`title`)&&e.data.title?b({el:t,text:e.data.title,maxLine:1}):c(t,`content`)&&e.data.text?b({el:t,text:e.data.text,maxLine:3}):t);yield{...t,id:(0,f.nanoid)(10),elements:n}}else if(e.type===`contents`){let t=m(h,e.data.items.length,`item`),n=t[Math.floor(Math.random()*t.length)],r=e=>{let t=``;return e.type===`text`&&(t=e.content||``),e.type===`shape`&&(t=e.text&&e.text.content||``),String(t).replace(/<[^>]*>/g,` `).replace(/&nbsp;/g,` `).trim()},i=e=>{let t=r(e).match(/-?\d+/);if(!t)return null;let n=Number(t[0]);return Number.isFinite(n)?n:null},o=e=>e.left+e.top*2,s=n.elements.filter(e=>c(e,`itemNumber`)),l=[...s].sort((e,t)=>{if(s.length>6){let n=i(e),r=i(t);if(n!==null&&r!==null)return n-r}return o(e)-o(t)}),u=l.map(e=>e.id),d=[...s].sort((e,t)=>o(e)-o(t)).map(e=>e.id),p=e=>{if(!l.length)return null;if(e.groupId){let t=l.find(t=>t.groupId&&t.groupId===e.groupId);if(t)return l.indexOf(t)}let t=e.left||0,n=e.top||0,r=e.width||0,i=e.height||0,a=t+r/2,o=n+i/2,s=n+i,c=l.map((e,r)=>{let c=e.left||0,l=e.top||0,u=e.width||0,d=e.height||0,f=c+u,p=l+d,m=c+u/2,h=l+d/2,g=a-m,_=o-h;return{index:r,distance:g*g+_*_,rowAligned:Math.min(s,p)-Math.max(n,l)>=0||Math.abs(o-h)<=Math.max(i,d),isBeforeItem:f<=t+12,verticalDistance:Math.abs(o-h),horizontalGap:Math.abs(t-f)}}),u=c.filter(e=>e.rowAligned&&e.isBeforeItem).sort((e,t)=>e.horizontalGap===t.horizontalGap?e.verticalDistance-t.verticalDistance:e.horizontalGap-t.horizontalGap);if(u.length)return u[0].index;let d=0,f=1/0;for(let e of c)e.distance<f&&(f=e.distance,d=e.index);return d},g=n.elements.filter(e=>c(e,`item`)),_=[...g].sort((e,t)=>{if(g.length>6){let n=p(e),r=p(t);if(n!==null&&r!==null&&n!==r)return n-r}return o(e)-o(t)}).map(e=>e.id),v=[...g].sort((e,t)=>o(e)-o(t)).map(e=>e.id),y=e.data.items.reduce((e,t)=>t.length>e.length?t:e,``),x=[],S=[],w=n.elements.map(t=>{if(t.type===`image`&&t.imageType&&a.value.length)return C(t);if(t.type!==`text`&&t.type!==`shape`)return t;if(c(t,`item`)){let n=_.findIndex(e=>e===t.id),r=e.data.items[n];if(!r){let i=v.findIndex(e=>e===t.id);i!==-1&&(n=i,r=e.data.items[n])}if(r)return b({el:t,text:r,maxLine:1,longestText:y});x.push(t.id),t.groupId&&S.push(t.groupId)}if(c(t,`itemNumber`)){let n=u.findIndex(e=>e===t.id);if(n===-1&&(n=d.findIndex(e=>e===t.id)),n===-1)return t;let r=e.offset||0;return b({el:t,text:n+r+1+``,maxLine:1,digitPadding:!0})}return t}).filter(e=>!x.includes(e.id)&&!(e.groupId&&S.includes(e.groupId)));yield{...n,id:(0,f.nanoid)(10),elements:w}}else if(e.type===`transition`&&s.value){o.value+=1;let t=s.value.elements.map(t=>t.type===`image`&&t.imageType&&a.value.length?C(t):t.type!==`text`&&t.type!==`shape`?t:c(t,`title`)&&e.data.title?b({el:t,text:e.data.title,maxLine:1}):c(t,`content`)&&e.data.text?b({el:t,text:e.data.text,maxLine:3}):c(t,`partNumber`)?b({el:t,text:o.value+``,maxLine:1,digitPadding:!0}):t);yield{...s.value,id:(0,f.nanoid)(10),elements:t}}else if(e.type===`content`){let t=e.data.items,n=_(v,t),r=n[Math.floor(Math.random()*n.length)],i=r.elements.filter(e=>c(e,`itemTitle`)).sort((e,t)=>e.left+e.top*2-(t.left+t.top*2)).map(e=>e.id),o=r.elements.filter(e=>c(e,`subtitle`)).sort((e,t)=>e.left+e.top*2-(t.left+t.top*2)).map(e=>e.id),s=r.elements.filter(e=>d(e,`itemFigure`)).sort((e,t)=>e.left+e.top*2-(t.left+t.top*2)).map(e=>e.id),l=r.elements.filter(e=>c(e,`item`)).sort((e,t)=>e.left+e.top*2-(t.left+t.top*2)).map(e=>e.id),p=r.elements.filter(e=>c(e,`content`)).sort((e,t)=>e.left+e.top*2-(t.left+t.top*2)).map(e=>e.id),m=r.elements.filter(e=>u(e)).sort((e,t)=>e.left+e.top*2-(t.left+t.top*2)).map(e=>e.id);m.length===0&&(m=r.elements.filter(e=>e.type===`chart`).sort((e,t)=>e.left+e.top*2-(t.left+t.top*2)).map(e=>e.id));let h=r.elements.filter(e=>c(e,`itemNumber`)).sort((e,t)=>e.left+e.top*2-(t.left+t.top*2)).map(e=>e.id),g=[],y=[];t.forEach(e=>{(In(e)||Ln(e))&&(e.title&&g.push(e.title),e.text&&y.push(e.text))});let S=g.reduce((e,t)=>t.length>e.length?t:e,``),w=y.reduce((e,t)=>t.length>e.length?t:e,``),T=t.filter(Fn),E=t.filter(Rn),D=E.length>0,O=r.elements.map(n=>{if(D){if(d(n,`itemFigure`)){let e=E[s.findIndex(e=>e===n.id)];return e&&e.src?{...n,src:e.src}:n}if(c(n,`subtitle`)){let e=E[o.findIndex(e=>e===n.id)];return e&&e.title?b({el:n,text:e.title,maxLine:1}):n}if(c(n,`content`)){let e=E[p.findIndex(e=>e===n.id)];if(e&&e.text)return b({el:n,text:e.text,maxLine:6})}}if(n.type===`image`&&n.imageType&&a.value.length)return C(n);if(n.type===`chart`){let e=T[m.findIndex(e=>e===n.id)];return e?x(n,e):n}if(n.type!==`text`&&n.type!==`shape`)return n;if(t.length===1){let e=t[0];if((In(e)||Ln(e))&&c(n,`content`)&&e.text||Fn(e)&&c(n,`content`)&&e.text)return b({el:n,text:e.text,maxLine:6});if((In(e)||Ln(e))&&c(n,`item`)&&e.text)return b({el:n,text:e.text,maxLine:4});if(c(n,`itemTitle`)&&((In(e)||Ln(e))&&e.title||Fn(e)&&e.title))return b({el:n,text:e.title,maxLine:1})}else{if(c(n,`itemTitle`)){let e=t[i.findIndex(e=>e===n.id)];if(e){if(In(e)&&e.title||Ln(e)&&e.title)return b({el:n,text:e.title,longestText:S,maxLine:1});if(Fn(e)&&e.title)return b({el:n,text:e.title,longestText:S||e.title,maxLine:1})}}if(c(n,`item`)){let e=t[l.findIndex(e=>e===n.id)];if(e&&(In(e)&&e.text||Ln(e)&&e.text))return b({el:n,text:e.text,longestText:w,maxLine:4})}if(c(n,`itemNumber`))return b({el:n,text:h.findIndex(e=>e===n.id)+(e.offset||0)+1+``,maxLine:1,digitPadding:!0})}return c(n,`title`)&&e.data.title?b({el:n,text:e.data.title,maxLine:1}):n});yield{...r,id:(0,f.nanoid)(10),elements:O}}else if(e.type===`reference`){let t=e.data.references.length,n=[];n=y.filter(e=>{let n=e.elements.filter(e=>c(e,`referenceNumber`)).length;return n>=t&&n<=10}),n.length===0&&(n=m(y,t,`referenceNumber`));let r=n[Math.floor(Math.random()*n.length)],i=r.elements.filter(e=>c(e,`referenceNumber`)).sort((e,t)=>e.left+e.top*2-(t.left+t.top*2)).map(e=>e.id),o=r.elements.filter(e=>c(e,`pmid`)).sort((e,t)=>e.left+e.top*2-(t.left+t.top*2)).map(e=>e.id),s=r.elements.filter(e=>c(e,`url`)).sort((e,t)=>e.left+e.top*2-(t.left+t.top*2)).map(e=>e.id),l=r.elements.filter(e=>c(e,`doi`)).sort((e,t)=>e.left+e.top*2-(t.left+t.top*2)).map(e=>e.id),u=[],d=[],p=r.elements.map(t=>{if(t.type===`image`&&t.imageType&&a.value.length)return C(t);if(t.type!==`text`&&t.type!==`shape`)return t;if(c(t,`title`)&&e.data.title)return b({el:t,text:e.data.title,maxLine:1});if(c(t,`referenceNumber`)){let n=i.findIndex(e=>e===t.id),r=e.data.references[n];if(r){let i=``;if(r.number!==void 0){let t=e.offset||0;i=typeof r.number==`number`?(r.number+t).toString():r.number}else i=(n+(e.offset||0)+1).toString();return b({el:t,text:`[${i}]`,maxLine:1})}else u.push(t.id),t.groupId&&d.push(t.groupId)}if(c(t,`pmid`)){let n=o.findIndex(e=>e===t.id),r=e.data.references[n];if(r&&r.pmid)return b({el:t,text:`PMID: ${r.pmid}`,maxLine:1});u.push(t.id),t.groupId&&d.push(t.groupId)}if(c(t,`url`)){let n=s.findIndex(e=>e===t.id),r=e.data.references[n];if(r&&r.url)return b({el:t,text:r.url,maxLine:2});u.push(t.id),t.groupId&&d.push(t.groupId)}if(c(t,`doi`)){let n=l.findIndex(e=>e===t.id),r=e.data.references[n];if(r&&r.doi)return b({el:t,text:`DOI: ${r.doi}`,maxLine:1});u.push(t.id),t.groupId&&d.push(t.groupId)}return t}).filter(e=>!u.includes(e.id)&&!(e.groupId&&d.includes(e.groupId)));yield{...r,id:(0,f.nanoid)(10),elements:p}}else if(e.type===`end`){let e=S[Math.floor(Math.random()*S.length)],t=e.elements.map(e=>e.type===`image`&&e.imageType&&a.value.length?C(e):e);yield{...e,id:(0,f.nanoid)(10),elements:t}}}return{presetImgPool:E,AIPPT:(t,i,a)=>{let o=[...D(t,i,a)];r.value?e.setSlides(o):n(o)},AIPPTStream:async(t,n,a,o=50,s)=>{let c=D(t,n,a),l=[];for(let e of c)l.push(e);let u=l.length,d=e=>new Promise(t=>setTimeout(t,e));for(let t=0;t<l.length;t++){let n=l[t],a=qt([n]),{groupIdMap:c,elIdMap:p}=Jt(n.elements),m=n.elements.map(e=>{let t={...e};return t.id=p[e.id],e.groupId&&(t.groupId=c[e.groupId]),t.link&&t.link.type===`slide`&&(a[t.link.target]?t.link.target=a[t.link.target]:delete t.link),t}),h=n.animations?.map(e=>({...e,id:(0,f.nanoid)(10),elId:p[e.elId]})),g={...n,id:a[n.id],elements:[],animations:h};t===0&&r.value?(e.setSlides([g]),e.updateSlideIndex(0)):(e.addSlideToEnd([g]),e.updateSlideIndex(e.slides.length-1));let _=g.id,v=m.length;for(let n=0;n<m.length;n++){let r=m[n],i=e.slides.find(e=>e.id===_);if(i){let t=[...i.elements,r];e.updateSlide({elements:t},_)}s&&s(t+1,u,n+1,v),(n<m.length-1||t<l.length-1)&&await d(o)}i()}},getMdContent:w,getJSONContent:T,AIPPTGenerator:D}},Bn;(function(e){e.UP=`up`,e.DOWN=`down`,e.TOP=`top`,e.BOTTOM=`bottom`})(Bn||={});var Vn;(function(e){e.TOP=`top`,e.BOTTOM=`bottom`,e.LEFT=`left`,e.RIGHT=`right`,e.VERTICAL=`vertical`,e.HORIZONTAL=`horizontal`,e.CENTER=`center`})(Vn||={});var Hn;(function(e){e.T=`top`,e.B=`bottom`,e.L=`left`,e.R=`right`})(Hn||={});var U;(function(e){e.LEFT_TOP=`left-top`,e.TOP=`top`,e.RIGHT_TOP=`right-top`,e.LEFT=`left`,e.RIGHT=`right`,e.LEFT_BOTTOM=`left-bottom`,e.BOTTOM=`bottom`,e.RIGHT_BOTTOM=`right-bottom`})(U||={});var Un;(function(e){e.START=`start`,e.END=`end`,e.C=`ctrl`,e.C1=`ctrl1`,e.C2=`ctrl2`})(Un||={});var Wn=()=>{let e=B(),t=V(),{activeElementIdList:n}=(0,d.storeToRefs)(e),{currentSlide:r}=(0,d.storeToRefs)(t),{addHistorySnapshot:i}=tn();return{lockElement:()=>{let a=JSON.parse(JSON.stringify(r.value.elements));for(let e of a)n.value.includes(e.id)&&(e.lock=!0);t.updateSlide({elements:a}),e.setActiveElementIdList([]),i()},unlockElement:n=>{let a=JSON.parse(JSON.stringify(r.value.elements));if(n.groupId){let r=[];for(let e of a)e.groupId===n.groupId&&(e.lock=!1,r.push(e.id));t.updateSlide({elements:a}),e.setActiveElementIdList(r)}else{for(let e of a)if(e.id===n.id){e.lock=!1;break}t.updateSlide({elements:a}),e.setActiveElementIdList([n.id])}i()}}},Gn=()=>{let e=B(),t=V(),{activeElementIdList:n,activeGroupElementId:r}=(0,d.storeToRefs)(e),{currentSlide:i}=(0,d.storeToRefs)(t),{addHistorySnapshot:a}=tn();return{deleteElement:()=>{if(!n.value.length)return;let o=[];o=r.value?i.value.elements.filter(e=>e.id!==r.value):i.value.elements.filter(e=>!n.value.includes(e.id)),e.setActiveElementIdList([]),t.updateSlide({elements:o}),a()},deleteAllElements:()=>{i.value.elements.length&&(e.setActiveElementIdList([]),t.updateSlide({elements:[]}),a())}}},Kn=()=>{let e=B(),t=V(),{activeElementIdList:n,activeElementList:r,handleElementId:i}=(0,d.storeToRefs)(e),{currentSlide:a}=(0,d.storeToRefs)(t),{addHistorySnapshot:o}=tn();return{canCombine:(0,l.computed)(()=>{if(r.value.length<2)return!1;let e=r.value[0].groupId;return e?!r.value.every(t=>(t.groupId&&t.groupId)===e):!0}),combineElements:()=>{if(!r.value.length)return;let e=JSON.parse(JSON.stringify(a.value.elements)),i=(0,f.nanoid)(10),s=[];for(let t of e)n.value.includes(t.id)&&(t.groupId=i,s.push(t));let c=e.findIndex(e=>e.id===s[s.length-1].id),l=s.map(e=>e.id);e=e.filter(e=>!l.includes(e.id));let u=c-s.length+1;e.splice(u,0,...s),t.updateSlide({elements:e}),o()},uncombineElements:()=>{if(!r.value.length||!r.value.some(e=>e.groupId))return;let s=JSON.parse(JSON.stringify(a.value.elements));for(let e of s)n.value.includes(e.id)&&e.groupId&&delete e.groupId;t.updateSlide({elements:s});let c=i.value?[i.value]:[];e.setActiveElementIdList(c),o()}}},qn=()=>{let e=B(),{activeElementIdList:t,activeElementList:n}=(0,d.storeToRefs)(e),{pasteTextClipboardData:r}=Nn(),{deleteElement:i}=Gn(),a=()=>{t.value.length&&sn(an(JSON.stringify({type:`elements`,data:n.value}))).then(()=>{e.setEditorareaFocus(!0)})},o=()=>{a(),i()},s=()=>{cn().then(e=>{r(e)}).catch(e=>R.warning(e))};return{copyElement:a,cutElement:o,pasteElement:s,quickCopyElement:()=>{a(),s()}}},Jn=()=>{let e=B(),{currentSlide:t}=(0,d.storeToRefs)(V()),{hiddenElementIdList:n,handleElementId:r}=(0,d.storeToRefs)(e);return{selectAllElements:()=>{let r=t.value.elements.filter(e=>!e.lock&&!n.value.includes(e.id)).map(e=>e.id);e.setActiveElementIdList(r)},selectElement:i=>{r.value!==i&&(n.value.includes(i)||t.value.elements.filter(e=>e.lock).some(e=>e.id===i)||e.setActiveElementIdList([i]))}}},Yn=()=>{let e=V(),{activeElementIdList:t,activeGroupElementId:n}=(0,d.storeToRefs)(B()),{currentSlide:r}=(0,d.storeToRefs)(e),{addHistorySnapshot:i}=tn();return{moveElement:(a,o=1)=>{let s=[],c=e=>{let{left:t,top:n}=e;switch(a){case H.LEFT:t-=o;break;case H.RIGHT:t+=o;break;case H.UP:n-=o;break;case H.DOWN:n+=o;break;default:break}return{...e,left:t,top:n}};s=n.value?r.value.elements.map(e=>n.value===e.id?c(e):e):r.value.elements.map(e=>t.value.includes(e.id)?c(e):e),e.updateSlide({elements:s}),i()}}},Xn=()=>{let e=V(),{currentSlide:t}=(0,d.storeToRefs)(e),{addHistorySnapshot:n}=tn(),r=(e,t)=>({minLevel:e.findIndex(e=>e.id===t[0].id),maxLevel:e.findIndex(e=>e.id===t[t.length-1].id)}),i=(e,t)=>{let n=JSON.parse(JSON.stringify(e));if(t.groupId){let i=n.filter(e=>e.groupId===t.groupId),{minLevel:a,maxLevel:o}=r(e,i);if(o===e.length-1)return;let s=n[o+1],c=n.splice(a,i.length);if(s.groupId){let e=n.filter(e=>e.groupId===s.groupId);n.splice(a+e.length,0,...c)}else n.splice(a+1,0,...c)}else{let r=e.findIndex(e=>e.id===t.id);if(r===e.length-1)return;let i=n[r+1],a=n.splice(r,1)[0];if(i.groupId){let e=n.filter(e=>e.groupId===i.groupId);n.splice(r+e.length,0,a)}else n.splice(r+1,0,a)}return n},a=(e,t)=>{let n=JSON.parse(JSON.stringify(e));if(t.groupId){let i=n.filter(e=>e.groupId===t.groupId),{minLevel:a}=r(e,i);if(a===0)return;let o=n[a-1],s=n.splice(a,i.length);if(o.groupId){let e=n.filter(e=>e.groupId===o.groupId);n.splice(a-e.length,0,...s)}else n.splice(a-1,0,...s)}else{let r=e.findIndex(e=>e.id===t.id);if(r===0)return;let i=n[r-1],a=n.splice(r,1)[0];if(i.groupId){let e=n.filter(e=>e.groupId===i.groupId);n.splice(r-e.length,0,a)}else n.splice(r-1,0,a)}return n},o=(e,t)=>{let n=JSON.parse(JSON.stringify(e));if(t.groupId){let i=n.filter(e=>e.groupId===t.groupId),{minLevel:a,maxLevel:o}=r(e,i);if(o===e.length-1)return null;let s=n.splice(a,i.length);n.push(...s)}else{let r=e.findIndex(e=>e.id===t.id);if(r===e.length-1)return null;n.splice(r,1),n.push(t)}return n},s=(e,t)=>{let n=JSON.parse(JSON.stringify(e));if(t.groupId){let i=n.filter(e=>e.groupId===t.groupId),{minLevel:a}=r(e,i);if(a===0)return;let o=n.splice(a,i.length);n.unshift(...o)}else{let r=e.findIndex(e=>e.id===t.id);if(r===0)return;n.splice(r,1),n.unshift(t)}return n};return{orderElement:(r,c)=>{let l;c===Bn.UP?l=i(t.value.elements,r):c===Bn.DOWN?l=a(t.value.elements,r):c===Bn.TOP?l=o(t.value.elements,r):c===Bn.BOTTOM&&(l=s(t.value.elements,r)),l&&(e.updateSlide({elements:l}),n())}}},Zn=(e=document.documentElement)=>{e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen?e.webkitRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()},Qn=()=>{document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},$n=()=>!!(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement),er=()=>{let e=Bt(),t=V(),n=()=>{let t=document.querySelector(`.center-body`);t&&(Zn(t),e.setScreening(!0))};return{enterScreening:n,enterScreeningFromStart:()=>{t.updateSlideIndex(0),n()},exitScreening:()=>{e.setScreening(!1),$n()&&Qn()}}},tr=()=>{let e=B(),{canvasPercentage:t,canvasScale:n,canvasDragged:r}=(0,d.storeToRefs)(e);return{canvasScalePercentage:(0,l.computed)(()=>Math.round(n.value*100)+`%`),setCanvasScalePercentage:r=>{let i=Math.round(r/n.value*t.value)/100;e.setCanvasPercentage(i)},scaleCanvas:n=>{let r=t.value;n===`+`&&r<=200&&(r+=5),n===`-`&&r>=30&&(r-=5),e.setCanvasPercentage(r)},resetCanvas:()=>{e.setCanvasPercentage(90),r&&e.setCanvasDragged(!1)}}},nr=()=>{let e=B(),t=zt(),{activeElementIdList:n,disableHotkeys:r,handleElement:i,handleElementId:a,editorAreaFocus:o,thumbnailsFocus:s,showSearchPanel:c}=(0,d.storeToRefs)(e),{currentSlide:u}=(0,d.storeToRefs)(V()),{ctrlKeyState:f,shiftKeyState:p,spaceKeyState:m}=(0,d.storeToRefs)(t),{updateSlideIndex:h,copySlide:g,createSlide:_,deleteSlide:v,cutSlide:y,copyAndPasteSlide:b,selectAllSlide:x}=Pn(),{combineElements:S,uncombineElements:C}=Kn(),{deleteElement:w}=Gn(),{lockElement:T}=Wn(),{copyElement:E,cutElement:D,quickCopyElement:O}=qn(),{selectAllElements:k}=Jn(),{moveElement:A}=Yn(),{orderElement:j}=Xn(),{redo:M,undo:N}=tn(),{enterScreening:P,enterScreeningFromStart:ee}=er(),{scaleCanvas:te,resetCanvas:ne}=tr(),re=()=>{n.value.length?E():s.value&&g()},F=()=>{n.value.length?D():s.value&&y()},ie=()=>{n.value.length?O():s.value&&b()},ae=()=>{o.value&&k(),s.value&&x()},oe=()=>{o.value&&T()},se=()=>{o.value&&S()},ce=()=>{o.value&&C()},le=()=>{n.value.length?w():s.value&&v()},I=e=>{n.value.length?A(e):(e===H.UP||e===H.DOWN)&&h(e)},ue=e=>{e===H.PAGEUP?h(H.UP):e===H.PAGEDOWN&&h(H.DOWN)},de=e=>{i.value&&j(i.value,e)},fe=()=>{s.value&&_()},pe=()=>{if(!u.value.elements.length)return;if(!a.value){let t=u.value.elements[0];e.setActiveElementIdList([t.id]);return}let t=u.value.elements.findIndex(e=>e.id===a.value),n=t>=u.value.elements.length-1?0:t+1,r=u.value.elements[n].id;e.setActiveElementIdList([r])},me=n=>{let{ctrlKey:i,shiftKey:a,altKey:l,metaKey:u}=n,d=i||u,m=n.key.toUpperCase();if(d&&!f.value&&t.setCtrlKeyState(!0),a&&!p.value&&t.setShiftKeyState(!0),!r.value&&m===H.SPACE&&t.setSpaceKeyState(!0),d&&m===H.P){n.preventDefault(),e.setDialogForExport(`pdf`);return}if(a&&m===H.F5){n.preventDefault(),P(),t.setShiftKeyState(!1);return}if(m===H.F5){n.preventDefault(),ee();return}if(i&&m===H.F){n.preventDefault(),e.setSearchPanelState(!c.value);return}if(i&&m===H.MINUS){n.preventDefault(),te(`-`);return}if(i&&m===H.EQUAL){n.preventDefault(),te(`+`);return}if(i&&m===H.DIGIT_0){n.preventDefault(),ne();return}if(!(!o.value&&!s.value)){if(d&&m===H.C){if(r.value)return;n.preventDefault(),re()}if(d&&m===H.X){if(r.value)return;n.preventDefault(),F()}if(d&&m===H.D){if(r.value)return;n.preventDefault(),ie()}if(d&&m===H.Z){if(r.value)return;n.preventDefault(),N()}if(d&&m===H.Y){if(r.value)return;n.preventDefault(),M()}if(d&&m===H.A){if(r.value)return;n.preventDefault(),ae()}if(d&&m===H.L){if(r.value)return;n.preventDefault(),oe()}if(!a&&d&&m===H.G){if(r.value)return;n.preventDefault(),se()}if(a&&d&&m===H.G){if(r.value)return;n.preventDefault(),ce()}if(l&&m===H.F){if(r.value)return;n.preventDefault(),de(Bn.TOP)}if(l&&m===H.B){if(r.value)return;n.preventDefault(),de(Bn.BOTTOM)}if(m===H.DELETE||m===H.BACKSPACE){if(r.value)return;n.preventDefault(),le()}if(m===H.UP){if(r.value)return;n.preventDefault(),I(H.UP)}if(m===H.DOWN){if(r.value)return;n.preventDefault(),I(H.DOWN)}if(m===H.LEFT){if(r.value)return;n.preventDefault(),I(H.LEFT)}if(m===H.RIGHT){if(r.value)return;n.preventDefault(),I(H.RIGHT)}if(m===H.PAGEUP){if(r.value)return;n.preventDefault(),ue(H.PAGEUP)}if(m===H.PAGEDOWN){if(r.value)return;n.preventDefault(),ue(H.PAGEDOWN)}if(m===H.ENTER){if(r.value)return;n.preventDefault(),fe()}if(m===H.TAB){if(r.value)return;n.preventDefault(),pe()}o.value&&!a&&!d&&!r.value&&(m===H.T?e.setCreatingElement({type:`text`}):m===H.R?e.setCreatingElement({type:`shape`,data:{viewBox:[200,200],path:`M 0 0 L 200 0 L 200 200 L 0 200 Z`}}):m===H.O?e.setCreatingElement({type:`shape`,data:{viewBox:[200,200],path:`M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z`}}):m===H.L&&e.setCreatingElement({type:`line`,data:{path:`M 0 0 L 20 20`,style:`solid`,points:[``,``]}}))}},he=()=>{f.value&&t.setCtrlKeyState(!1),p.value&&t.setShiftKeyState(!1),m.value&&t.setSpaceKeyState(!1)};(0,l.onMounted)(()=>{document.addEventListener(`keydown`,me),document.addEventListener(`keyup`,he),window.addEventListener(`blur`,he)}),(0,l.onUnmounted)(()=>{document.removeEventListener(`keydown`,me),document.removeEventListener(`keyup`,he),window.removeEventListener(`blur`,he)})},rr=()=>{let{editorAreaFocus:e,thumbnailsFocus:t,disableHotkeys:n}=(0,d.storeToRefs)(B()),{pasteTextClipboardData:r}=Nn(),{createImageElement:i}=jn(),a=e=>{hn(e).then(e=>i(e))},o=i=>{if(!e.value&&!t.value||n.value||!i.clipboardData)return;let o=i.clipboardData.items,s=o[0];if(!s)return;let c=!1;for(let e of o)if(e.kind===`file`&&e.type.indexOf(`image`)!==-1){let t=e.getAsFile();t&&a(t),c=!0}c||s.kind===`string`&&s.type===`text/plain`&&s.getAsString(e=>r(e))};(0,l.onMounted)(()=>{document.addEventListener(`paste`,o)}),(0,l.onUnmounted)(()=>{document.removeEventListener(`paste`,o)})},ir=[`style`,`script`,`template`],ar=[`html`,`head`,`body`,`p`,`dt`,`dd`,`li`,`option`,`thead`,`th`,`tbody`,`tr`,`td`,`tfoot`,`colgroup`],or={li:[`ul`,`ol`,`menu`],dt:[`dl`],dd:[`dl`],tbody:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`],td:[`table`]},sr=[`!doctype`,`area`,`base`,`br`,`col`,`command`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],cr=(e,t)=>{lr(e,t-e.position)},lr=(e,t)=>{e.position+=t},ur=(e,t)=>{for(;;){let n=e.indexOf(`<`,t);if(n===-1)return n;let r=e.charAt(n+1);if(r===`/`||r===`!`||/[A-Za-z0-9]/.test(r))return n;t=n+1}return-1},dr=e=>{let{str:t}=e,n=ur(t,e.position);if(n===e.position)return;n===-1&&(n=t.length);let r=t.slice(e.position,n);cr(e,n),e.tokens.push({type:`text`,content:r})},fr=e=>{let{str:t}=e;lr(e,4);let n=t.indexOf(`-->`,e.position),r=n+3;n===-1&&(n=r=t.length);let i=t.slice(e.position,n);cr(e,r),e.tokens.push({type:`comment`,content:i})},pr=e=>{let{str:t}=e,n=t.length,r=e.position;for(;r<n;){let e=t.charAt(r);if(!(/\s/.test(e)||e===`/`||e===`>`))break;r++}let i=r+1;for(;i<n;){let e=t.charAt(i);if(/\s/.test(e)||e===`/`||e===`>`)break;i++}cr(e,i);let a=t.slice(r,i);return e.tokens.push({type:`tag`,content:a}),a},mr=e=>{let{str:t,tokens:n}=e,r=e.position,i=null,a=r,o=[],s=t.length;for(;r<s;){let e=t.charAt(r);if(i){e===i&&(i=null),r++;continue}if(e===`/`||e===`>`){r!==a&&o.push(t.slice(a,r));break}if(/\s/.test(e)){r!==a&&o.push(t.slice(a,r)),a=r+1,r++;continue}if(e===`'`||e===`"`){i=e,r++;continue}r++}cr(e,r);let c=`attribute`;for(let e=0;e<o.length;e++){let t=o[e];if(t.indexOf(`=`)===-1){let r=o[e+1];if(r&&(0,u.startsWith)(r,`=`)){if(r.length>1){let i=t+r;n.push({type:c,content:i}),e+=1;continue}let i=o[e+2];if(e+=1,i){let r=t+`=`+i;n.push({type:c,content:r}),e+=1;continue}}}if((0,u.endsWith)(t,`=`)){let r=o[e+1];if(r&&r.indexOf(`=`)===-1){let i=t+r;n.push({type:c,content:i}),e+=1;continue}let i=t.slice(0,-1);n.push({type:c,content:i});continue}n.push({type:c,content:t})}},hr=(e,t)=>{let{str:n,tokens:r}=t,i=e.toLowerCase(),a=n.length,o=t.position;for(;o<a;){let e=n.indexOf(`</`,o);if(e===-1){dr(t);break}let a={str:n,position:t.position,tokens:[]};if(cr(a,e),i!==gr(a).toLowerCase()){o=a.position;continue}if(e!==t.position){let i=t.position;cr(t,e),r.push({type:`text`,content:n.slice(i,e)})}r.push(...a.tokens),cr(t,a.position);break}},gr=e=>{let{str:t}=e,n=t.charAt(e.position+1)===`/`;lr(e,n?2:1),e.tokens.push({type:`tag-start`,close:n});let r=pr(e);mr(e);let i=t.charAt(e.position)===`/`;return lr(e,i?2:1),e.tokens.push({type:`tag-end`,close:i}),r},_r=e=>{let t=e.str,n=t.length;for(;e.position<n;){let n=e.position;if(dr(e),e.position===n)if((0,u.startsWith)(t,`!--`,n+1))fr(e);else{let t=gr(e),n=t.toLowerCase();ir.includes(n)&&hr(t,e)}}},vr=e=>{let t={str:e,position:0,tokens:[]};return _r(t),t.tokens},yr=e=>{let t={tagName:null,children:[]};return Sr({tokens:e,cursor:0,stack:[t]}),t.children},br=(e,t)=>{let n=or[e];if(n){let r=t.length-1;for(;r>=0;){let i=t[r].tagName;if(i===e)break;if(i&&n.includes(i))return!0;r--}}return!1},xr=(e,t)=>{e.splice(t)},Sr=e=>{let{stack:t,tokens:n}=e,{cursor:r}=e,i=t[t.length-1].children,a=n.length;for(;r<a;){let e=n[r];if(e.type!==`tag-start`){i.push(e),r++;continue}let o=n[++r];r++;let s=o.content.toLowerCase();if(e.close){let e=t.length,i=!1;for(;--e>-1;)if(t[e].tagName===s){i=!0;break}for(;r<a&&n[r].type===`tag-end`;)r++;if(i){xr(t,e);break}else continue}let c=ar.includes(s);if(c&&=!br(s,t),c){let e=t.length-1;for(;e>0;){if(s===t[e].tagName){xr(t,e),i=t[e-1].children;break}--e}}let l=[],u;for(;r<a;){let e=n[r];if(e.type===`tag-end`){u=e;break}l.push(e.content),r++}if(!u)break;r++;let d=[],f={type:`element`,tagName:o.content,attributes:l,children:d};if(i.push(f),!(u.close||sr.includes(s))){t.push({tagName:s,children:d});let e={tokens:n,cursor:r,stack:t};Sr(e),r=e.cursor}}e.cursor=r},Cr=(e,t)=>{let n=e.indexOf(t);return n===-1?[e]:[e.slice(0,n),e.slice(n+t.length)]},wr=e=>{let t=e.charAt(0),n=e.length-1;return(t===`"`||t===`'`)&&t===e.charAt(n)?e.slice(1,n):e},Tr=e=>e.map(e=>{let t=Cr(e.trim(),`=`);return{key:t[0],value:typeof t[1]==`string`?wr(t[1]):null}}),Er=e=>e.map(e=>{if(e.type===`element`){let t=Er(e.children);return{type:`element`,tagName:e.tagName.toLowerCase(),attributes:Tr(e.attributes),children:t}}return{type:e.type,content:e.content}}),Dr=e=>Er(yr(vr(e))),Or={1:`Z`,2:`M`,4:`H`,8:`V`,16:`L`,32:`C`,64:`S`,128:`Q`,256:`T`,512:`A`},kr=e=>{let t=new S.SVGPathData(e),n=[];for(let e of t.commands){let t=Or[e.type];if((e.type===2||e.type===16)&&n.push({x:e.x,y:e.y,relative:e.relative,type:t}),e.type===32)n.push({x:e.x,y:e.y,curve:{type:`cubic`,x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},relative:e.relative,type:t});else if(e.type===128)n.push({x:e.x,y:e.y,curve:{type:`quadratic`,x1:e.x1,y1:e.y1},relative:e.relative,type:t});else if(e.type===512){let t=n[n.length-1];if(![`M`,`L`,`Q`,`C`].includes(t.type))continue;let r=(0,C.default)({px:t.x,py:t.y,cx:e.x,cy:e.y,rx:e.rX,ry:e.rY,xAxisRotation:e.xRot,largeArcFlag:e.lArcFlag,sweepFlag:e.sweepFlag});for(let e of r)n.push({x:e.x,y:e.y,curve:{type:`cubic`,x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},relative:!1,type:`C`})}else if(e.type===1)n.push({close:!0,type:t});else continue}return n},Ar=e=>{try{let t=new S.SVGPathData(e),n=[],r=[];for(let e of t.commands){let t=`x`in e?e.x:0,i=`y`in e?e.y:0;n.push(t),r.push(i)}return{minX:Math.min(...n),minY:Math.min(...r),maxX:Math.max(...n),maxY:Math.max(...r)}}catch{return{minX:0,minY:0,maxX:0,maxY:0}}},jr=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`,Mr=`data:image/svg+xml;base64,`,Nr=e=>{e=e.replace(/\r\n/g,`
17
- `);let t=``;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):r>127&&r<2048?(t+=String.fromCharCode(r>>6|192),t+=String.fromCharCode(r&63|128)):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128),t+=String.fromCharCode(r&63|128))}return t},Pr=e=>{let t=``,n,r,i,a,o,s,c,l=0;for(e=Nr(e);l<e.length;)n=e.charCodeAt(l++),r=e.charCodeAt(l++),i=e.charCodeAt(l++),a=n>>2,o=(n&3)<<4|r>>4,s=(r&15)<<2|i>>6,c=i&63,isNaN(r)?s=c=64:isNaN(i)&&(c=64),t=t+jr.charAt(a)+jr.charAt(o)+jr.charAt(s)+jr.charAt(c);return t},Fr=e=>Mr+Pr(new XMLSerializer().serializeToString(e)),Ir=`/api/proxy`,Lr=()=>{let{slides:e,theme:t,viewportRatio:n,title:r,viewportSize:i}=(0,d.storeToRefs)(V()),a=(0,l.computed)(()=>96*(i.value/960)),o=(0,l.computed)(()=>96/72*(i.value/960)),s=(0,l.ref)(!1),{t:c}=z(),f={Msyh:`微软雅黑`,"Microsoft YaHei":`微软雅黑`},p=e=>{if(!e||typeof e!=`string`)return`微软雅黑`;let t=e.split(`,`)[0].replace(/^['"]|['"]$/g,``).trim();return t?f[t]||t:`微软雅黑`};function m(e){try{return new URL(e),!0}catch{return!1}}function h(e){return m(e)?`${Ir}?url=${encodeURIComponent(e)}`:e}async function _(e){let t=m(e)?h(e):e,n=await fetch(t);if(!n.ok)throw Error(`Fetch failed: ${n.status}`);let r=await n.blob();return await new Promise((e,t)=>{let n=new FileReader;n.onload=()=>e(String(n.result)),n.onerror=t,n.readAsDataURL(r)})}async function v(e){return N(e)||P(e)?e:await _(e)}let S=(e,t,n,i=!0)=>{s.value=!0;let a=t===`png`?x.toPng:x.toJpeg;e.querySelectorAll(`foreignObject [xmlns]`).forEach(e=>e.removeAttribute(`xmlns`)),setTimeout(()=>{let o={quality:n,width:1600};i&&(o.fontEmbedCSS=``),a(e,o).then(e=>{s.value=!1,(0,y.saveAs)(e,`${r.value}.${t}`)}).catch(()=>{s.value=!1,R.error(c(`EXPORT.IMAGE_FAIL`))})},200)},C=e=>{let a={title:r.value,width:i.value,height:i.value*n.value,theme:t.value,slides:e};(0,y.saveAs)(new Blob([an(JSON.stringify(a))],{type:``}),`${r.value}.pptist`)},w=()=>{let a={title:r.value,width:i.value,height:i.value*n.value,theme:t.value,slides:e.value};(0,y.saveAs)(new Blob([JSON.stringify(a)],{type:``}),`${r.value}.json`)},T=()=>{let a={title:r.value,width:i.value,height:i.value*n.value,theme:t.value,slides:e.value};return JSON.stringify(a||``)},E=e=>{if(!e)return{alpha:0,color:`#000000`};let t=(0,g.default)(e),n=t.getAlpha();return{alpha:n,color:n===0?`#ffffff`:t.setAlpha(1).toHexString()}},D=e=>{let t=Dr(e),n=!1,r=0,i=[],a=(e,t={})=>{for(let s of e){if(`tagName`in s&&[`div`,`li`,`p`].includes(s.tagName)&&i.length){let e=i[i.length-1];e.options||={},e.options.breakLine=!0}let e={...t},c=`attributes`in s?s.attributes.find(e=>e.key===`style`):null;if(c&&c.value){let t=c.value.split(`;`);for(let n of t){let[t,r]=n.split(`: `),[i,a]=[(0,u.trim)(t),(0,u.trim)(r)];i&&a&&(e[i]=a)}}if(`tagName`in s&&(s.tagName===`em`&&(e[`font-style`]=`italic`),s.tagName===`strong`&&(e[`font-weight`]=`bold`),s.tagName===`sup`&&(e[`vertical-align`]=`super`),s.tagName===`sub`&&(e[`vertical-align`]=`sub`),s.tagName===`a`&&(e.href=s.attributes.find(e=>e.key===`href`)?.value||``),s.tagName===`ul`&&(e[`list-type`]=`ul`),s.tagName===`ol`&&(e[`list-type`]=`ol`),s.tagName===`li`&&(n=!0),s.tagName===`p`&&`attributes`in s)){let e=s.attributes.find(e=>e.key===`data-indent`);e&&e.value&&(r=+e.value)}if(`tagName`in s&&s.tagName===`br`)i.push({text:``,options:{breakLine:!0}});else if(`content`in s){let t=s.content.replace(/&nbsp;/g,` `).replace(/&gt;/g,`>`).replace(/&lt;/g,`<`).replace(/&amp;/g,`&`).replace(/\n/g,``),a={};e[`font-size`]&&(a.fontSize=parseInt(e[`font-size`])/o.value),e.color&&(a.color=E(e.color).color),e[`background-color`]&&(a.highlight=E(e[`background-color`]).color),e[`text-decoration-line`]&&(e[`text-decoration-line`].indexOf(`underline`)!==-1&&(a.underline={color:a.color||`#000000`,style:`sng`}),e[`text-decoration-line`].indexOf(`line-through`)!==-1&&(a.strike=`sngStrike`)),e[`text-decoration`]&&(e[`text-decoration`].indexOf(`underline`)!==-1&&(a.underline={color:a.color||`#000000`,style:`sng`}),e[`text-decoration`].indexOf(`line-through`)!==-1&&(a.strike=`sngStrike`)),e[`vertical-align`]&&(e[`vertical-align`]===`super`&&(a.superscript=!0),e[`vertical-align`]===`sub`&&(a.subscript=!0)),e[`text-align`]&&(a.align=e[`text-align`]),e[`font-weight`]&&(a.bold=e[`font-weight`]===`bold`),e[`font-style`]&&(a.italic=e[`font-style`]===`italic`),e[`font-family`]&&(a.fontFace=p(e[`font-family`])),e.href&&(a.hyperlink={url:e.href}),n&&e[`list-type`]===`ol`&&(a.bullet={type:`number`,indent:(a.fontSize||16)*1.25},a.paraSpaceBefore=.1,n=!1),n&&e[`list-type`]===`ul`&&(a.bullet={indent:(a.fontSize||16)*1.25},a.paraSpaceBefore=.1,n=!1),r&&=(a.indentLevel=r,0),i.push({text:t,options:a})}else `children`in s&&a(s.children,e)}};return a(t),i},O=(e,t={x:1,y:1})=>e.map(e=>{if(e.close!==void 0)return{close:!0};if(e.type===`M`)return{x:e.x/a.value*t.x,y:e.y/a.value*t.y,moveTo:!0};if(e.curve){if(e.curve.type===`cubic`)return{x:e.x/a.value*t.x,y:e.y/a.value*t.y,curve:{type:`cubic`,x1:e.curve.x1/a.value*t.x,y1:e.curve.y1/a.value*t.y,x2:e.curve.x2/a.value*t.x,y2:e.curve.y2/a.value*t.y}};if(e.curve.type===`quadratic`)return{x:e.x/a.value*t.x,y:e.y/a.value*t.y,curve:{type:`quadratic`,x1:e.curve.x1/a.value*t.x,y1:e.curve.y1/a.value*t.y}}}return{x:e.x/a.value*t.x,y:e.y/a.value*t.y}}),k=e=>{let t=E(e.color),{h:n,v:r}=e,i=4,a=45;return n===0&&r===0?(i=4,a=45):n===0?r>0?(i=r,a=90):(i=-r,a=270):r===0?n>0?(i=n,a=1):(i=-n,a=180):n>0&&r>0?(i=Math.max(n,r),a=45):n>0&&r<0?(i=Math.max(n,-r),a=315):n<0&&r>0?(i=Math.max(-n,r),a=135):n<0&&r<0&&(i=Math.max(-n,-r),a=225),{type:`outer`,color:t.color.replace(`#`,``),opacity:t.alpha,blur:e.blur/o.value,offset:i,angle:a}},A={solid:`solid`,dashed:`dash`,dotted:`sysDot`},j=e=>{let t=E(e?.color||`#000000`);return{color:t.color,transparency:(1-t.alpha)*100,width:(e.width||1)/o.value,dashType:e.style?A[e.style]:`solid`}},M=t=>{let{type:n,target:r}=t;if(n===`web`)return{url:r};if(n===`slide`){let t=e.value.findIndex(e=>e.id===r);if(t!==-1)return{slide:t+1}}return null},N=e=>e.match(/^data:image\/[^;]+;base64,/)!==null,P=e=>{let t=/^data:image\/svg\+xml;base64,/.test(e),n=/\.svg$/.test(e);return t||n};return{exporting:s,exportImage:S,exportJSON:w,exportSpecificFile:C,exportPPTX:async(e,l,u)=>{s.value=!0;let d=new b.default;if(n.value===.625?d.layout=`LAYOUT_16x10`:n.value===.75?d.layout=`LAYOUT_4x3`:n.value===.70710678?(d.defineLayout({name:`A3`,width:10,height:7.0710678}),d.layout=`A3`):n.value===1.41421356?(d.defineLayout({name:`A3_V`,width:10,height:14.1421356}),d.layout=`A3_V`):d.layout=`LAYOUT_16x9`,l){let{color:e,alpha:n}=E(t.value.backgroundColor);d.defineSlideMaster({title:`PPTIST_MASTER`,background:{color:e,transparency:(1-n)*100}})}for(let t of e){let e=d.addSlide();if(t.background){let r=t.background;if(r.type===`image`&&r.image)P(r.image.src)?e.addImage({data:r.image.src,x:0,y:0,w:i.value/a.value,h:i.value*n.value/a.value}):N(r.image.src)?e.background={data:r.image.src}:e.background={data:await v(r.image.src)};else if(r.type===`solid`&&r.color){let t=E(r.color);e.background={color:t.color,transparency:(1-t.alpha)*100}}else if(r.type===`gradient`&&r.gradient){let t=r.gradient.colors,n=t[0].color,i=t[t.length-1].color,a=E(g.default.mix(n,i).toHexString());e.background={color:a.color,transparency:(1-a.alpha)*100}}}if(t.remark){let n=new DOMParser().parseFromString(t.remark,`text/html`).body.querySelectorAll(`p`),r=[];for(let e of n){let t=e.textContent;r.push(t||``)}e.addNotes(r.join(`
17
+ `);let t=``;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):r>127&&r<2048?(t+=String.fromCharCode(r>>6|192),t+=String.fromCharCode(r&63|128)):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128),t+=String.fromCharCode(r&63|128))}return t},Pr=e=>{let t=``,n,r,i,a,o,s,c,l=0;for(e=Nr(e);l<e.length;)n=e.charCodeAt(l++),r=e.charCodeAt(l++),i=e.charCodeAt(l++),a=n>>2,o=(n&3)<<4|r>>4,s=(r&15)<<2|i>>6,c=i&63,isNaN(r)?s=c=64:isNaN(i)&&(c=64),t=t+jr.charAt(a)+jr.charAt(o)+jr.charAt(s)+jr.charAt(c);return t},Fr=e=>Mr+Pr(new XMLSerializer().serializeToString(e)),Ir=`/api/proxy`,Lr=()=>{let{slides:e,theme:t,viewportRatio:n,title:r,viewportSize:i}=(0,d.storeToRefs)(V()),a=(0,l.computed)(()=>96*(i.value/960)),o=(0,l.computed)(()=>96/72*(i.value/960)),s=(0,l.ref)(!1),{t:c}=z(),f={Msyh:`微软雅黑`,"Microsoft YaHei":`微软雅黑`,"Microsoft YaHei UI":`微软雅黑`,SourceHanSans:`微软雅黑`,SourceHanSerif:`宋体`,FangZhengHeiTi:`黑体`,FangZhengKaiTi:`楷体`,FangZhengShuSong:`宋体`,FangZhengFangSong:`仿宋`,AlibabaPuHuiTi:`微软雅黑`,ZhuQueFangSong:`仿宋`,LXGWWenKai:`楷体`,WenDingPLKaiTi:`楷体`,DeYiHei:`黑体`,MiSans:`微软雅黑`,CangerXiaowanzi:`微软雅黑`,YousheTitleBlack:`黑体`,FengguangMingrui:`黑体`,ShetuModernSquare:`黑体`,ZcoolHappy:`微软雅黑`,ZizhiQuXiMai:`微软雅黑`,SucaiJishiKangkang:`微软雅黑`,SucaiJishiCoolSquare:`黑体`,TuniuRounded:`微软雅黑`,RuiziZhenyan:`黑体`,"DM-Sans":`Calibri`,Arial:`Arial`,Calibri:`Calibri`,SimSun:`宋体`,SimHei:`黑体`,FangSong:`仿宋`,KaiTi:`楷体`},p=e=>{if(!e||typeof e!=`string`)return`微软雅黑`;let t=e.split(`,`)[0].replace(/^['"]|['"]$/g,``).trim();if(!t)return`微软雅黑`;let n=f[t];if(n)return n;let r=t.toLowerCase(),i=Object.keys(f).find(e=>e.toLowerCase()===r);return i?f[i]:t};function m(e){try{return new URL(e),!0}catch{return!1}}function h(e){return m(e)?`${Ir}?url=${encodeURIComponent(e)}`:e}async function _(e){let t=m(e)?h(e):e,n=await fetch(t);if(!n.ok)throw Error(`Fetch failed: ${n.status}`);let r=await n.blob();return await new Promise((e,t)=>{let n=new FileReader;n.onload=()=>e(String(n.result)),n.onerror=t,n.readAsDataURL(r)})}async function v(e){return N(e)||P(e)?e:await _(e)}let S=(e,t,n,i=!0)=>{s.value=!0;let a=t===`png`?x.toPng:x.toJpeg;e.querySelectorAll(`foreignObject [xmlns]`).forEach(e=>e.removeAttribute(`xmlns`)),setTimeout(()=>{let o={quality:n,width:1600};i&&(o.fontEmbedCSS=``),a(e,o).then(e=>{s.value=!1,(0,y.saveAs)(e,`${r.value}.${t}`)}).catch(()=>{s.value=!1,R.error(c(`EXPORT.IMAGE_FAIL`))})},200)},C=e=>{let a={title:r.value,width:i.value,height:i.value*n.value,theme:t.value,slides:e};(0,y.saveAs)(new Blob([an(JSON.stringify(a))],{type:``}),`${r.value}.pptist`)},w=()=>{let a={title:r.value,width:i.value,height:i.value*n.value,theme:t.value,slides:e.value};(0,y.saveAs)(new Blob([JSON.stringify(a)],{type:``}),`${r.value}.json`)},T=()=>{let a={title:r.value,width:i.value,height:i.value*n.value,theme:t.value,slides:e.value};return JSON.stringify(a||``)},E=e=>{if(!e)return{alpha:0,color:`#000000`};let t=(0,g.default)(e),n=t.getAlpha();return{alpha:n,color:n===0?`#ffffff`:t.setAlpha(1).toHexString()}},D=e=>{let t=Dr(e),n=!1,r=0,i=[],a=(e,t={})=>{for(let s of e){if(`tagName`in s&&[`div`,`li`,`p`].includes(s.tagName)&&i.length){let e=i[i.length-1];e.options||={},e.options.breakLine=!0}let e={...t},c=`attributes`in s?s.attributes.find(e=>e.key===`style`):null;if(c&&c.value){let t=c.value.split(`;`);for(let n of t){let[t,r]=n.split(`: `),[i,a]=[(0,u.trim)(t),(0,u.trim)(r)];i&&a&&(e[i]=a)}}if(`tagName`in s&&(s.tagName===`em`&&(e[`font-style`]=`italic`),s.tagName===`strong`&&(e[`font-weight`]=`bold`),s.tagName===`sup`&&(e[`vertical-align`]=`super`),s.tagName===`sub`&&(e[`vertical-align`]=`sub`),s.tagName===`a`&&(e.href=s.attributes.find(e=>e.key===`href`)?.value||``),s.tagName===`ul`&&(e[`list-type`]=`ul`),s.tagName===`ol`&&(e[`list-type`]=`ol`),s.tagName===`li`&&(n=!0),s.tagName===`p`&&`attributes`in s)){let e=s.attributes.find(e=>e.key===`data-indent`);e&&e.value&&(r=+e.value)}if(`tagName`in s&&s.tagName===`br`)i.push({text:``,options:{breakLine:!0}});else if(`content`in s){let t=s.content.replace(/&nbsp;/g,` `).replace(/&gt;/g,`>`).replace(/&lt;/g,`<`).replace(/&amp;/g,`&`).replace(/\n/g,``),a={};e[`font-size`]&&(a.fontSize=parseInt(e[`font-size`])/o.value),e.color&&(a.color=E(e.color).color),e[`background-color`]&&(a.highlight=E(e[`background-color`]).color),e[`text-decoration-line`]&&(e[`text-decoration-line`].indexOf(`underline`)!==-1&&(a.underline={color:a.color||`#000000`,style:`sng`}),e[`text-decoration-line`].indexOf(`line-through`)!==-1&&(a.strike=`sngStrike`)),e[`text-decoration`]&&(e[`text-decoration`].indexOf(`underline`)!==-1&&(a.underline={color:a.color||`#000000`,style:`sng`}),e[`text-decoration`].indexOf(`line-through`)!==-1&&(a.strike=`sngStrike`)),e[`vertical-align`]&&(e[`vertical-align`]===`super`&&(a.superscript=!0),e[`vertical-align`]===`sub`&&(a.subscript=!0)),e[`text-align`]&&(a.align=e[`text-align`]),e[`font-weight`]&&(a.bold=e[`font-weight`]===`bold`),e[`font-style`]&&(a.italic=e[`font-style`]===`italic`),e[`font-family`]&&(a.fontFace=p(e[`font-family`])),e.href&&(a.hyperlink={url:e.href}),n&&e[`list-type`]===`ol`&&(a.bullet={type:`number`,indent:(a.fontSize||16)*1.25},a.paraSpaceBefore=.1,n=!1),n&&e[`list-type`]===`ul`&&(a.bullet={indent:(a.fontSize||16)*1.25},a.paraSpaceBefore=.1,n=!1),r&&=(a.indentLevel=r,0),i.push({text:t,options:a})}else `children`in s&&a(s.children,e)}};return a(t),i},O=(e,t={x:1,y:1})=>e.map(e=>{if(e.close!==void 0)return{close:!0};if(e.type===`M`)return{x:e.x/a.value*t.x,y:e.y/a.value*t.y,moveTo:!0};if(e.curve){if(e.curve.type===`cubic`)return{x:e.x/a.value*t.x,y:e.y/a.value*t.y,curve:{type:`cubic`,x1:e.curve.x1/a.value*t.x,y1:e.curve.y1/a.value*t.y,x2:e.curve.x2/a.value*t.x,y2:e.curve.y2/a.value*t.y}};if(e.curve.type===`quadratic`)return{x:e.x/a.value*t.x,y:e.y/a.value*t.y,curve:{type:`quadratic`,x1:e.curve.x1/a.value*t.x,y1:e.curve.y1/a.value*t.y}}}return{x:e.x/a.value*t.x,y:e.y/a.value*t.y}}),k=e=>{let t=E(e.color),{h:n,v:r}=e,i=4,a=45;return n===0&&r===0?(i=4,a=45):n===0?r>0?(i=r,a=90):(i=-r,a=270):r===0?n>0?(i=n,a=1):(i=-n,a=180):n>0&&r>0?(i=Math.max(n,r),a=45):n>0&&r<0?(i=Math.max(n,-r),a=315):n<0&&r>0?(i=Math.max(-n,r),a=135):n<0&&r<0&&(i=Math.max(-n,-r),a=225),{type:`outer`,color:t.color.replace(`#`,``),opacity:t.alpha,blur:e.blur/o.value,offset:i,angle:a}},A={solid:`solid`,dashed:`dash`,dotted:`sysDot`},j=e=>{let t=E(e?.color||`#000000`);return{color:t.color,transparency:(1-t.alpha)*100,width:(e.width||1)/o.value,dashType:e.style?A[e.style]:`solid`}},M=t=>{let{type:n,target:r}=t;if(n===`web`)return{url:r};if(n===`slide`){let t=e.value.findIndex(e=>e.id===r);if(t!==-1)return{slide:t+1}}return null},N=e=>e.match(/^data:image\/[^;]+;base64,/)!==null,P=e=>{let t=/^data:image\/svg\+xml;base64,/.test(e),n=/\.svg$/.test(e);return t||n};return{exporting:s,exportImage:S,exportJSON:w,exportSpecificFile:C,exportPPTX:async(e,l,u)=>{s.value=!0;let d=new b.default;if(n.value===.625?d.layout=`LAYOUT_16x10`:n.value===.75?d.layout=`LAYOUT_4x3`:n.value===.70710678?(d.defineLayout({name:`A3`,width:10,height:7.0710678}),d.layout=`A3`):n.value===1.41421356?(d.defineLayout({name:`A3_V`,width:10,height:14.1421356}),d.layout=`A3_V`):d.layout=`LAYOUT_16x9`,l){let{color:e,alpha:n}=E(t.value.backgroundColor);d.defineSlideMaster({title:`PPTIST_MASTER`,background:{color:e,transparency:(1-n)*100}})}for(let t of e){let e=d.addSlide();if(t.background){let r=t.background;if(r.type===`image`&&r.image)P(r.image.src)?e.addImage({data:r.image.src,x:0,y:0,w:i.value/a.value,h:i.value*n.value/a.value}):N(r.image.src)?e.background={data:r.image.src}:e.background={data:await v(r.image.src)};else if(r.type===`solid`&&r.color){let t=E(r.color);e.background={color:t.color,transparency:(1-t.alpha)*100}}else if(r.type===`gradient`&&r.gradient){let t=r.gradient.colors,n=t[0].color,i=t[t.length-1].color,a=E(g.default.mix(n,i).toHexString());e.background={color:a.color,transparency:(1-a.alpha)*100}}}if(t.remark){let n=new DOMParser().parseFromString(t.remark,`text/html`).body.querySelectorAll(`p`),r=[];for(let e of n){let t=e.textContent;r.push(t||``)}e.addNotes(r.join(`
18
18
  `))}if(t.elements){for(let n of t.elements)if(n.type===`text`){let t=D(n.content),r={x:n.left/a.value,y:n.top/a.value,w:n.width/a.value,h:n.height/a.value,fontSize:16/o.value,fontFace:`微软雅黑`,color:`#000000`,valign:`top`,margin:10/o.value,paraSpaceBefore:5/o.value,lineSpacingMultiple:1.5/1.25,autoFit:!0};if(n.rotate&&(r.rotate=n.rotate),n.wordSpace&&(r.charSpacing=n.wordSpace/o.value),n.lineHeight&&(r.lineSpacingMultiple=n.lineHeight/1.25),n.fill){let e=E(n.fill),t=n.opacity===void 0?1:n.opacity;r.fill={color:e.color,transparency:(1-e.alpha*t)*100}}n.defaultColor&&(r.color=E(n.defaultColor).color),n.defaultFontName&&(r.fontFace=p(n.defaultFontName)),n.shadow&&(r.shadow=k(n.shadow)),n.outline&&n.outline.width&&n.outline.width>0&&(r.line=j(n.outline)),n.opacity!==void 0&&(r.transparency=(1-n.opacity)*100),n.paragraphSpace!==void 0&&(r.paraSpaceBefore=n.paragraphSpace/o.value),n.vertical&&(r.vert=`eaVert`),e.addText(t,r)}else if(n.type===`image`){let t={x:n.left/a.value,y:n.top/a.value,w:n.width/a.value,h:n.height/a.value};if(N(n.src)?t.data=n.src:t.data=await v(n.src),n.flipH&&(t.flipH=n.flipH),n.flipV&&(t.flipV=n.flipV),n.rotate&&(t.rotate=n.rotate),n.link){let e=M(n.link);e&&(t.hyperlink=e)}if(n.filters?.opacity&&(t.transparency=100-parseInt(n.filters?.opacity)),n.clip){n.clip.shape===`ellipse`&&(t.rounding=!0);let[e,r]=n.clip.range,[i,o]=e,[s,c]=r,l=n.width/((s-i)/a.value),u=n.height/((c-o)/a.value);t.w=l/a.value,t.h=u/a.value,t.sizing={type:`crop`,x:i/a.value*l/a.value,y:o/a.value*u/a.value,w:(s-i)/a.value*l/a.value,h:(c-o)/a.value*u/a.value}}e.addImage(t)}else if(n.type===`shape`){let t=!1;if(n.special){let r=document.querySelector(`.thumbnail-list .base-element-${n.id} svg`),i=document.querySelector(`.base-element-${n.id} svg`),o=r||i;if(o&&o.clientWidth>0&&o.clientHeight>0){let r={data:Fr(o),x:n.left/a.value,y:n.top/a.value,w:n.width/a.value,h:n.height/a.value};if(n.rotate&&(r.rotate=n.rotate),n.flipH&&(r.flipH=n.flipH),n.flipV&&(r.flipV=n.flipV),n.fill){let e=E(n.fill),t=n.opacity===void 0?1:n.opacity,i=e.alpha*t;i<1&&(r.transparency=(1-i)*100)}else n.opacity!==void 0&&n.opacity<1&&(r.transparency=(1-n.opacity)*100);if(n.link){let e=M(n.link);e&&(r.hyperlink=e)}e.addImage(r),t=!0}}if(!t){let t={x:n.width/n.viewBox[0],y:n.height/n.viewBox[1]},r=O(kr(n.path),t),i=E(n.fill);if(n.gradient){let e=n.gradient.colors,t=e[0].color,r=e[e.length-1].color;i=E(g.default.mix(t,r).toHexString())}n.pattern&&(i=E(`#00000000`));let o=n.opacity===void 0?1:n.opacity,s={x:n.left/a.value,y:n.top/a.value,w:n.width/a.value,h:n.height/a.value,fill:{color:i.color,transparency:(1-i.alpha*o)*100},points:r};if(n.flipH&&(s.flipH=n.flipH),n.flipV&&(s.flipV=n.flipV),n.shadow&&(s.shadow=k(n.shadow)),n.outline&&n.outline.width&&n.outline.width>0&&(s.line=j(n.outline)),n.rotate&&(s.rotate=n.rotate),n.link){let e=M(n.link);e&&(s.hyperlink=e)}e.addShape(`custGeom`,s)}if(n.text){let t=D(n.text.content),r={x:n.left/a.value,y:n.top/a.value,w:n.width/a.value,h:n.height/a.value,fontSize:16/o.value,fontFace:`微软雅黑`,color:`#000000`,paraSpaceBefore:5/o.value,valign:n.text.align};n.rotate&&(r.rotate=n.rotate),n.text.defaultColor&&(r.color=E(n.text.defaultColor).color),n.text.defaultFontName&&(r.fontFace=p(n.text.defaultFontName)),e.addText(t,r)}if(n.pattern){let t={x:n.left/a.value,y:n.top/a.value,w:n.width/a.value,h:n.height/a.value};if(N(n.pattern)?t.data=n.pattern:t.data=await v(n.pattern),n.flipH&&(t.flipH=n.flipH),n.flipV&&(t.flipV=n.flipV),n.rotate&&(t.rotate=n.rotate),n.link){let e=M(n.link);e&&(t.hyperlink=e)}e.addImage(t)}}else if(n.type===`line`){let t=O(kr($t(n))),{minX:r,maxX:i,minY:s,maxY:c}=Ut(n),l=E(n.color),u={x:n.left/a.value,y:n.top/a.value,w:(i-r)/a.value,h:(c-s)/a.value,line:{color:l.color,transparency:(1-l.alpha)*100,width:n.width/o.value,dashType:A[n.style],beginArrowType:n.points[0]?`arrow`:`none`,endArrowType:n.points[1]?`arrow`:`none`},points:t};n.shadow&&(u.shadow=k(n.shadow)),e.addShape(`custGeom`,u)}else if(n.type===`chart`){let t=[];for(let e=0;e<n.data.series.length;e++){let r=n.data.series[e];t.push({name:c(`CHART.DEFAULT.SERIES`,{index:e+1}),labels:n.data.labels,values:r})}let r=[];if(n.themeColors.length===10)r=n.themeColors.map(e=>E(e).color);else if(n.themeColors.length===1)r=(0,g.default)(n.themeColors[0]).analogous(10).map(e=>E(e.toHexString()).color);else{let e=n.themeColors.length,t=(0,g.default)(n.themeColors[e-1]).analogous(11-e).map(e=>e.toHexString());r=[...n.themeColors.slice(0,e-1),...t].map(e=>E(e).color)}let i={x:n.left/a.value,y:n.top/a.value,w:n.width/a.value,h:n.height/a.value,chartColors:n.chartType===`pie`||n.chartType===`ring`?r:r.slice(0,n.data.series.length)},s=E(n.textColor||`#000000`).color;i.catAxisLabelColor=s,i.valAxisLabelColor=s;let l=14/o.value;if(i.catAxisLabelFontSize=l,i.valAxisLabelFontSize=l,n.fill||n.outline){let e={};n.fill&&(e.fill={color:E(n.fill).color}),n.outline&&(e.border={pt:n.outline.width/o.value,color:E(n.outline.color).color}),i.plotArea=e}(n.data.series.length>1&&n.chartType!==`scatter`||n.chartType===`pie`||n.chartType===`ring`)&&(i.showLegend=!0,i.legendPos=`b`,i.legendColor=s,i.legendFontSize=l);let u=d.ChartType.bar;n.chartType===`bar`?(u=d.ChartType.bar,i.barDir=`col`,n.options?.stack&&(i.barGrouping=`stacked`)):n.chartType===`column`?(u=d.ChartType.bar,i.barDir=`bar`,n.options?.stack&&(i.barGrouping=`stacked`)):n.chartType===`line`?(u=d.ChartType.line,n.options?.lineSmooth&&(i.lineSmooth=!0)):n.chartType===`area`?u=d.ChartType.area:n.chartType===`radar`?u=d.ChartType.radar:n.chartType===`scatter`?(u=d.ChartType.scatter,i.lineSize=0):n.chartType===`pie`?u=d.ChartType.pie:n.chartType===`ring`&&(u=d.ChartType.doughnut,i.holeSize=60),e.addChart(u,t,i)}else if(n.type===`table`){let t=[];for(let e=0;e<n.data.length;e++){let r=n.data[e];for(let n=0;n<r.length;n++){let i=r[n];if(i.colspan>1||i.rowspan>1)for(let r=e;r<e+i.rowspan;r++)for(let a=r===e?n+1:n;a<n+i.colspan;a++)t.push(`${r}_${a}`)}}let r=[],i=n.theme,s=null,c=[];i&&(s=E(i.color),c=Qt(i.color).map(e=>E(e)));for(let e=0;e<n.data.length;e++){let a=n.data[e],l=[];for(let r=0;r<a.length;r++){let u=a[r],d={colspan:u.colspan,rowspan:u.rowspan,bold:u.style?.bold||!1,italic:u.style?.em||!1,underline:{style:u.style?.underline?`sng`:`none`},align:u.style?.align||`left`,valign:`middle`,fontFace:p(u.style?.fontname||`微软雅黑`),fontSize:(u.style?.fontsize?parseInt(u.style?.fontsize):14)/o.value};if(i&&s){let t;t=e%2==0?c[1]:c[0],(i.rowHeader&&e===0||i.rowFooter&&e===n.data.length-1||i.colHeader&&r===0||i.colFooter&&r===a.length-1)&&(t=s),d.fill={color:t.color,transparency:(1-t.alpha)*100}}if(u.style?.backcolor){let e=E(u.style.backcolor);d.fill={color:e.color,transparency:(1-e.alpha)*100}}u.style?.color&&(d.color=E(u.style.color).color),t.includes(`${e}_${r}`)||l.push({text:u.text,options:d})}l.length&&r.push(l)}let l={x:n.left/a.value,y:n.top/a.value,w:n.width/a.value,h:n.height/a.value,colW:n.colWidths.map(e=>n.width*e/a.value)};n.theme&&(l.fill={color:`#ffffff`}),n.outline.width&&n.outline.color&&(l.border={type:n.outline.style===`solid`?`solid`:`dash`,pt:n.outline.width/o.value,color:E(n.outline.color).color}),e.addTable(r,l)}else if(n.type===`latex`){let t={data:Fr(document.querySelector(`.thumbnail-list .base-element-${n.id} svg`)),x:n.left/a.value,y:n.top/a.value,w:n.width/a.value,h:n.height/a.value};if(n.link){let e=M(n.link);e&&(t.hyperlink=e)}e.addImage(t)}else if(!u&&(n.type===`video`||n.type===`audio`)){let t={x:n.left/a.value,y:n.top/a.value,w:n.width/a.value,h:n.height/a.value,path:n.src,type:n.type};n.type===`video`&&n.poster&&(t.cover=await v(n.poster));let r=n.src.match(/\.([a-zA-Z0-9]+)(?:[\?#]|$)/);r&&r[1]?t.extn=r[1]:n.ext&&(t.extn=n.ext);let i=[`avi`,`mp4`,`m4v`,`mov`,`wmv`],o=[`mp3`,`m4a`,`mp4`,`wav`,`wma`];t.extn&&[...i,...o].includes(t.extn)&&e.addMedia(t)}}}setTimeout(()=>{d.writeFile({fileName:`${r.value}.pptx`}).then(()=>s.value=!1).catch(()=>{s.value=!1,R.error(c(`EXPORT.FAIL`))})},200)},getSaveJSON:T}},Rr=(e,t)=>e.replace(/font-size:\s*([\d.]+)pt/g,(e,n)=>`font-size: ${(parseFloat(n)*t).toFixed(1)}px`),zr=()=>{let e=V(),{theme:t}=(0,d.storeToRefs)(V()),{addHistorySnapshot:n}=tn(),{addSlidesFromData:r}=nn(),{isEmptySlide:i}=Pn(),{t:a}=z(),o=(0,l.ref)(!1),s=t=>{try{let{title:a,width:o,height:s,theme:c,slides:l}=JSON.parse(t);a&&e.setTitle(a),o&&e.setViewportSize(o),o&&s&&e.setViewportRatio(s/o),c&&e.setTheme(c),i.value?(e.setSlides(l),n()):r(l)}catch{R.error(a(`IMPORT.FILE_PARSE_FAIL`))}},c=(t,o=!1)=>{let s=t[0],c=new FileReader;c.addEventListener(`load`,()=>{try{let{slides:t}=JSON.parse(c.result);o?(e.updateSlideIndex(0),e.setSlides(t),n()):i.value?(e.setSlides(t),n()):r(t)}catch{R.error(a(`IMPORT.FILE_PARSE_FAIL`))}}),c.readAsText(s)},u=(t,o=!1)=>{let s=t[0],c=new FileReader;c.addEventListener(`load`,()=>{try{let{slides:t}=JSON.parse(on(c.result));o?(e.updateSlideIndex(0),e.setSlides(t),n()):i.value?(e.setSlides(t),n()):r(t)}catch{R.error(a(`IMPORT.FILE_PARSE_FAIL`))}}),c.readAsText(s)},p=(e,t)=>{let{start:n,end:r}=e,i=t*Math.PI/180,a=(n[0]+r[0])/2,o=(n[1]+r[1])/2,s=n[0]-a,c=n[1]-o,l=r[0]-a,u=r[1]-o,d=Math.cos(i),f=Math.sin(i),p=s*d-c*f,m=s*f+c*d,h=l*d-u*f,g=l*f+u*d,_=p+a,v=m+o,y=h+a,b=g+o,x=Math.min(n[0],r[0]),S=Math.min(n[1],r[1]),C=Math.min(_,y),w=Math.min(v,b),T=_-C,E=v-w,D=y-C,O=b-w;return{start:[T,E],end:[D,O],offset:[C-x,w-S]}},m=(e,t)=>{let n=[0,0],r=[0,0];!e.isFlipV&&!e.isFlipH?(n=[0,0],r=[e.width,e.height]):e.isFlipV&&e.isFlipH?(n=[e.width,e.height],r=[0,0]):e.isFlipV&&!e.isFlipH?(n=[0,e.height],r=[e.width,0]):(n=[e.width,0],r=[0,e.height]);let i={type:`line`,id:(0,f.nanoid)(10),width:+((e.borderWidth||1)*t).toFixed(2),left:e.left,top:e.top,start:n,end:r,style:e.borderType,color:e.borderColor,points:[``,/straightConnector/.test(e.shapType)?`arrow`:``]};if(e.rotate){let{start:t,end:n,offset:r}=p(i,e.rotate);i.start=t,i.end=n,i.left+=r[0],i.top+=r[1]}if(/bentConnector/.test(e.shapType)&&(i.broken2=[Math.abs(i.start[0]-i.end[0])/2,Math.abs(i.start[1]-i.end[1])/2]),/curvedConnector/.test(e.shapType)){let e=[Math.abs(i.start[0]-i.end[0])/2,Math.abs(i.start[1]-i.end[1])/2];i.cubic=[e,e]}return i},h=(e,t)=>{let n=Math.min(...e.map(e=>e.left)),r=Math.max(...e.map(e=>e.left+e.width)),i=Math.min(...e.map(e=>e.top)),a=Math.max(...e.map(e=>e.top+e.height)),o=(n+r)/2,s=(i+a)/2;return e.map(e=>{let n={...e};return t===`y`&&(n.left=2*o-e.left-e.width),t===`x`&&(n.top=2*s-e.top-e.height),n})},g=(e,t,n,r,i,a,o)=>{let s=o*(Math.PI/180),c=e+n/2,l=t+r/2,u=i-n/2,d=a-r/2,f=u*Math.cos(s)+d*Math.sin(s),p=-u*Math.sin(s)+d*Math.cos(s);return{x:c+f,y:l+p}};return{importSpecificFile:u,importJSON:c,importPPTXFile:(s,c)=>{let{cover:l,fixedViewport:u}={cover:!1,fixedViewport:!1,...c},d=s[0];if(!d)return;o.value=!0;let p=[];for(let e of xn)p.push(...e.children);let _=new FileReader;_.onload=async s=>{let c=null;try{c=await(0,w.parse)(s.target.result)}catch{o.value=!1,R.error(a(`IMPORT.FILE_PARSE_FAIL`));return}let d=96/72,_=c.size.width;u?d=1e3/_:e.setViewportSize(_*d),e.setTheme({themeColors:c.themeColors});let v=[];for(let e of c.slides){let{type:n,value:r}=e.fill,i;i=n===`image`?{type:`image`,image:{src:r.picBase64,size:`cover`}}:n===`gradient`?{type:`gradient`,gradient:{type:r.path===`line`?`linear`:`radial`,colors:r.colors.map(e=>({...e,pos:parseInt(e.pos)})),rotate:r.rot+90}}:{type:`solid`,color:r||`#fff`};let o={id:(0,f.nanoid)(10),elements:[],background:i,remark:e.note||``},s=e=>{let n=e.sort((e,t)=>e.order-t.order);for(let e of n){let n=e.width||1,r=e.height||1,i=e.left,c=e.top;if(e.width*=d,e.height*=d,e.left*=d,e.top*=d,e.type===`text`){let n={type:`text`,id:(0,f.nanoid)(10),width:e.width,height:e.height,left:e.left,top:e.top,rotate:e.rotate,defaultFontName:t.value.fontName,defaultColor:t.value.fontColor,content:Rr(e.content,d),lineHeight:1,outline:{color:e.borderColor,width:+(e.borderWidth*d).toFixed(2),style:e.borderType},fill:e.fill.type===`color`?e.fill.value:``,vertical:e.isVertical};e.shadow&&(n.shadow={h:e.shadow.h*d,v:e.shadow.v*d,blur:e.shadow.blur*d,color:e.shadow.color}),o.elements.push(n)}else if(e.type===`image`){let t={type:`image`,id:(0,f.nanoid)(10),src:e.src,width:e.width,height:e.height,left:e.left,top:e.top,fixedRatio:!0,rotate:e.rotate,flipH:e.isFlipH,flipV:e.isFlipV};e.borderWidth&&(t.outline={color:e.borderColor,width:+(e.borderWidth*d).toFixed(2),style:e.borderType});let n=[`roundRect`,`ellipse`,`triangle`,`rhombus`,`pentagon`,`hexagon`,`heptagon`,`octagon`,`parallelogram`,`trapezoid`];e.rect?t.clip={shape:e.geom&&n.includes(e.geom)?e.geom:`rect`,range:[[e.rect.l||0,e.rect.t||0],[100-(e.rect.r||0),100-(e.rect.b||0)]]}:e.geom&&n.includes(e.geom)&&(t.clip={shape:e.geom,range:[[0,0],[100,100]]}),o.elements.push(t)}else if(e.type===`math`)o.elements.push({type:`image`,id:(0,f.nanoid)(10),src:e.picBase64,width:e.width,height:e.height,left:e.left,top:e.top,fixedRatio:!0,rotate:0});else if(e.type===`audio`)o.elements.push({type:`audio`,id:(0,f.nanoid)(10),src:e.blob,width:e.width,height:e.height,left:e.left,top:e.top,rotate:0,fixedRatio:!1,color:t.value.themeColors[0],loop:!1,autoplay:!1});else if(e.type===`video`)o.elements.push({type:`video`,id:(0,f.nanoid)(10),src:e.blob||e.src,width:e.width,height:e.height,left:e.left,top:e.top,rotate:0,autoplay:!1});else if(e.type===`shape`)if(e.shapType===`line`||/Connector/.test(e.shapType)){let t=m(e,d);o.elements.push(t)}else{let i=p.find(t=>t.pptxShapeType===e.shapType),a={mid:`middle`,down:`bottom`,up:`top`},s=e.fill?.type===`gradient`?{type:e.fill.value.path===`line`?`linear`:`radial`,colors:e.fill.value.colors.map(e=>({...e,pos:parseInt(e.pos)})),rotate:e.fill.value.rot}:void 0,c=e.fill?.type===`image`?e.fill.value.picBase64:void 0,l=e.fill?.type===`color`?e.fill.value:``,u={type:`shape`,id:(0,f.nanoid)(10),width:e.width,height:e.height,left:e.left,top:e.top,viewBox:[200,200],path:`M 0 0 L 200 0 L 200 200 L 0 200 Z`,fill:l,gradient:s,pattern:c,fixedRatio:!1,rotate:e.rotate,outline:{color:e.borderColor,width:+(e.borderWidth*d).toFixed(2),style:e.borderType},text:{content:Rr(e.content,d),defaultFontName:t.value.fontName,defaultColor:t.value.fontColor,align:a[e.vAlign]||`middle`},flipH:e.isFlipH,flipV:e.isFlipV};if(e.shadow&&(u.shadow={h:e.shadow.h*d,v:e.shadow.v*d,blur:e.shadow.blur*d,color:e.shadow.color}),i){if(u.path=i.path,u.viewBox=i.viewBox,i.pathFormula){u.pathFormula=i.pathFormula,u.viewBox=[e.width,e.height];let t=bn[i.pathFormula];`editable`in t&&t.editable?(u.path=t.formula(e.width,e.height,t.defaultValue),u.keypoints=t.defaultValue):u.path=t.formula(e.width,e.height)}}else if(e.path&&e.path.indexOf(`NaN`)===-1){let{maxX:t,maxY:i}=Ar(e.path);u.path=e.path,t/i>n/r?u.viewBox=[t,t*r/n]:u.viewBox=[i*n/r,i]}if(e.shapType===`custom`){e.path.indexOf(`NaN`)===-1?(u.special=!0,u.path=e.path):(u.width===0&&(u.width=.1),u.height===0&&(u.height=.1),u.path=e.path.replace(/NaN/g,`0`));let{maxX:t,maxY:i}=Ar(u.path);t/i>n/r?u.viewBox=[t,t*r/n]:u.viewBox=[i*n/r,i]}u.path&&o.elements.push(u)}else if(e.type===`table`){let n=e.data.length,r=e.data[0].length,i={fontname:t.value.fontName,color:t.value.fontColor},a=[];for(let t=0;t<n;t++){let n=[];for(let a=0;a<r;a++){let r=e.data[t][a],o=document.createElement(`div`);o.innerHTML=r.text;let s=o.querySelector(`p`)?.style.textAlign||`left`,c=o.querySelector(`span`),l=c?.style.fontSize?(parseInt(c?.style.fontSize)*d).toFixed(1)+`px`:``,u=c?.style.fontFamily||``,p=c?.style.color||r.fontColor;n.push({id:(0,f.nanoid)(10),colspan:r.colSpan||1,rowspan:r.rowSpan||1,text:o.innerText,style:{...i,align:[`left`,`right`,`center`].includes(s)?s:`left`,fontsize:l,fontname:u,color:p,bold:r.fontBold,backcolor:r.fillColor}}),o=null}a.push(n)}let s=e.colWidths.reduce((e,t)=>e+t,0),c=e.colWidths.map(e=>e/s),l=e.data[0][0],u=l.borders.top||l.borders.bottom||e.borders.top||e.borders.bottom||l.borders.left||l.borders.right||e.borders.left||e.borders.right,p=u?.borderWidth||0,m=u?.borderType||`solid`,h=u?.borderColor||`#eeece1`;o.elements.push({type:`table`,id:(0,f.nanoid)(10),width:e.width,height:e.height,left:e.left,top:e.top,colWidths:c,rotate:0,data:a,outline:{width:+(p*d||2).toFixed(2),style:m,color:h},cellMinHeight:e.rowHeights[0]?e.rowHeights[0]*d:36})}else if(e.type===`chart`){let n,r,i;if(e.chartType===`scatterChart`||e.chartType===`bubbleChart`)n=e.data[0].map((e,t)=>a(`CHART.DEFAULT.COORD`,{index:t+1})),r=[`X`,`Y`],i=e.data;else{let t=e.data;n=Object.values(t[0].xlabels),r=t.map(e=>e.key),i=t.map(e=>e.values.map(e=>e.y))}let s={},c=`bar`;switch(e.chartType){case`barChart`:case`bar3DChart`:c=`bar`,e.barDir===`bar`&&(c=`column`),(e.grouping===`stacked`||e.grouping===`percentStacked`)&&(s.stack=!0);break;case`lineChart`:case`line3DChart`:(e.grouping===`stacked`||e.grouping===`percentStacked`)&&(s.stack=!0),c=`line`;break;case`areaChart`:case`area3DChart`:(e.grouping===`stacked`||e.grouping===`percentStacked`)&&(s.stack=!0),c=`area`;break;case`scatterChart`:case`bubbleChart`:c=`scatter`;break;case`pieChart`:case`pie3DChart`:c=`pie`;break;case`radarChart`:c=`radar`;break;case`doughnutChart`:c=`ring`;break;default:}o.elements.push({type:`chart`,id:(0,f.nanoid)(10),chartType:c,width:e.width,height:e.height,left:e.left,top:e.top,rotate:0,themeColors:e.colors.length?e.colors:t.value.themeColors,textColor:t.value.fontColor,data:{labels:n,legends:r,series:i},options:s})}else if(e.type===`group`){let t=e.elements.map(t=>{let a=t.left+i,o=t.top+c;if(e.rotate){let{x:s,y:l}=g(i,c,n,r,t.left,t.top,e.rotate);a=s,o=l}let s={...t,left:a,top:o};return e.isFlipH&&`isFlipH`in s&&(s.isFlipH=!0),e.isFlipV&&`isFlipV`in s&&(s.isFlipV=!0),s});e.isFlipH&&(t=h(t,`y`)),e.isFlipV&&(t=h(t,`x`)),s(t)}else e.type===`diagram`&&s(e.elements.map(e=>({...e,left:e.left+i,top:e.top+c})))}};s([...e.elements,...e.layoutElements]),v.push(o)}l?(e.updateSlideIndex(0),e.setSlides(v),n()):i.value?(e.setSlides(v),n()):r(v),o.value=!1},_.readAsArrayBuffer(d)},importJSONStr:s,importing:o}},Br={class:`hotkey-doc`},Vr={class:`title`},Hr={class:`label ppt-ellipsis-oneline`},Ur={class:`value`},Wr={key:1,class:`row`},Gr=L({__name:`HotkeyDoc`,setup(e){let{t}=z();return(e,n)=>((0,l.openBlock)(),(0,l.createElementBlock)(`div`,Br,[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)((0,l.unref)(fn),e=>((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:e.type},[(0,l.createElementVNode)(`div`,Vr,(0,l.toDisplayString)((0,l.unref)(t)(e.typeKey||e.type)),1),((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(e.children,e=>((0,l.openBlock)(),(0,l.createElementBlock)(`div`,{class:`hotkey-item`,key:e.label},[e.value?((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:0},[(0,l.createElementVNode)(`div`,Hr,(0,l.toDisplayString)((0,l.unref)(t)(e.labelKey||e.label)),1),(0,l.createElementVNode)(`div`,Ur,(0,l.toDisplayString)(e.valueKey?(0,l.unref)(t)(e.valueKey):e.value),1)],64)):((0,l.openBlock)(),(0,l.createElementBlock)(`div`,Wr,(0,l.toDisplayString)((0,l.unref)(t)(e.labelKey||e.label)),1))]))),128))],64))),128))]))}},[[`__scopeId`,`data-v-e0a3f927`]]),Kr=[`accept`],qr=L({__name:`FileInput`,props:{accept:{type:String,default:`image/*`}},emits:[`change`],setup(e,{emit:t}){let n=t,r=(0,l.useTemplateRef)(`inputRef`),i=()=>{r.value&&(r.value.value=``,r.value.click())},a=e=>{let t=e.target.files;t&&n(`change`,t)};return(t,n)=>((0,l.openBlock)(),(0,l.createElementBlock)(`div`,{class:`file-input`,onClick:n[2]||=e=>i()},[(0,l.renderSlot)(t.$slots,`default`,{},void 0,!0),(0,l.createElementVNode)(`input`,{class:`input`,type:`file`,name:`upload`,ref_key:`inputRef`,ref:r,accept:e.accept,onChange:n[0]||=e=>a(e),onClick:n[1]||=(0,l.withModifiers)(()=>{},[`stop`])},null,40,Kr)]))}},[[`__scopeId`,`data-v-be6752db`]]),Jr={class:`spin`},Yr={class:`text`},Xr=L({__name:`FullscreenSpin`,props:{loading:{type:Boolean,default:!1},mask:{type:Boolean,default:!0},tip:{type:String,default:``}},setup(e){return(t,n)=>((0,l.openBlock)(),(0,l.createBlock)(l.Teleport,{to:`body`},[e.loading?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,{key:0,class:(0,l.normalizeClass)([`fullscreen-spin`,{mask:e.mask}])},[(0,l.createElementVNode)(`div`,Jr,[n[0]||=(0,l.createElementVNode)(`div`,{class:`spinner`},null,-1),(0,l.createElementVNode)(`div`,Yr,(0,l.toDisplayString)(e.tip),1)])],2)):(0,l.createCommentVNode)(``,!0)]))}},[[`__scopeId`,`data-v-524caf4e`]]),Zr={class:`header`},Qr=L({__name:`Drawer`,props:{visible:{type:Boolean,required:!0},width:{type:Number,default:320},contentStyle:{type:Object},placement:{type:String,default:`right`}},emits:[`update:visible`],setup(e,{emit:t}){let n=e,r=t,i=(0,l.ref)(!1),a=(0,l.computed)(()=>({width:n.width+`px`,...n.contentStyle||{}}));return(t,o)=>{let s=(0,l.resolveComponent)(`AiPptClose`);return(0,l.openBlock)(),(0,l.createBlock)(l.Teleport,{to:`body`},[(0,l.createVNode)(l.Transition,{name:`drawer-slide-${e.placement}`,onAfterLeave:o[1]||=e=>i.value=!1,onBeforeEnter:o[2]||=e=>i.value=!0},{default:(0,l.withCtx)(()=>[(0,l.withDirectives)((0,l.createElementVNode)(`div`,{class:(0,l.normalizeClass)([`drawer`,e.placement]),style:(0,l.normalizeStyle)({width:n.width+`px`})},[(0,l.createElementVNode)(`div`,Zr,[(0,l.renderSlot)(t.$slots,`title`,{},void 0,!0),(0,l.createElementVNode)(`span`,{class:`close-btn`,onClick:o[0]||=e=>r(`update:visible`,!1)},[(0,l.createVNode)(s)])]),i.value?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,{key:0,class:`content`,style:(0,l.normalizeStyle)(a.value)},[(0,l.renderSlot)(t.$slots,`default`,{},void 0,!0)],4)):(0,l.createCommentVNode)(``,!0)],6),[[l.vShow,e.visible]])]),_:3},8,[`name`])])}}},[[`__scopeId`,`data-v-692bb78b`]]),$r={class:`prefix`},ei=[`disabled`,`value`,`placeholder`,`maxlength`],ti={class:`suffix`},ni=L({__name:`Input`,props:{value:{type:String,required:!0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:``},simple:{type:Boolean,default:!1},maxlength:{type:Number}},emits:[`update:value`,`change`,`enter`,`backspace`,`blur`,`focus`],setup(e,{expose:t,emit:n}){let r=n,i=(0,l.ref)(!1),a=e=>{r(`update:value`,e.target.value)},o=e=>{i.value=!1,r(`blur`,e)},s=e=>{i.value=!0,r(`focus`,e)},c=(0,l.useTemplateRef)(`inputRef`);return t({focus:()=>{c.value&&c.value.focus()}}),(t,n)=>((0,l.openBlock)(),(0,l.createElementBlock)(`div`,{class:(0,l.normalizeClass)([`input`,{disabled:e.disabled,focused:i.value,simple:e.simple}])},[(0,l.createElementVNode)(`span`,$r,[(0,l.renderSlot)(t.$slots,`prefix`,{},void 0,!0)]),(0,l.createElementVNode)(`input`,{type:`text`,ref_key:`inputRef`,ref:c,disabled:e.disabled,value:e.value,placeholder:e.placeholder,maxlength:e.maxlength,onInput:n[0]||=e=>a(e),onFocus:n[1]||=e=>s(e),onBlur:n[2]||=e=>o(e),onChange:n[3]||=e=>r(`change`,e),onKeydown:[n[4]||=(0,l.withKeys)(e=>r(`enter`,e),[`enter`]),n[5]||=(0,l.withKeys)(e=>r(`backspace`,e),[`backspace`])]},null,40,ei),(0,l.createElementVNode)(`span`,ti,[(0,l.renderSlot)(t.$slots,`suffix`,{},void 0,!0)])],2))}},[[`__scopeId`,`data-v-ada0ab8c`]]),W=L({__name:`Popover`,props:{value:{type:Boolean,default:!1},trigger:{type:String,default:`click`},placement:{type:[String,Object],default:`bottom`},appendTo:{type:Object},contentStyle:{type:Object},center:{type:Boolean,default:!1},offset:{type:Number,default:8}},emits:[`update:value`,`show`,`hide`],setup(e,{emit:t}){let n=e,r=t,i=(0,l.ref)(),a=(0,l.ref)(!1),o=(0,l.useTemplateRef)(`triggerRef`),s=(0,l.useTemplateRef)(`contentRef`),c=(0,l.computed)(()=>n.contentStyle||{});return(0,l.watch)(()=>n.value,()=>{i.value&&(n.value?i.value.show():i.value.hide())}),(0,l.onUnmounted)(()=>{i.value&&i.value.destroy()}),(0,l.onMounted)(()=>{i.value=(0,T.default)(o.value,{content:s.value,allowHTML:!0,trigger:n.trigger,placement:n.placement,interactive:!0,appendTo:n.appendTo||document.body,maxWidth:`none`,offset:[0,n.offset],duration:200,animation:`scale`,theme:`popover`,onShow(){a.value=!0},onShown(){n.value||(r(`update:value`,!0),r(`show`))},onHidden(){n.value&&(r(`update:value`,!1),r(`hide`)),a.value=!1}})}),(t,n)=>((0,l.openBlock)(),(0,l.createElementBlock)(`div`,{class:(0,l.normalizeClass)([`popover`,{center:e.center}]),ref_key:`triggerRef`,ref:o},[(0,l.createElementVNode)(`div`,{class:`popover-content`,style:(0,l.normalizeStyle)(c.value),ref_key:`contentRef`,ref:s},[a.value?(0,l.renderSlot)(t.$slots,`content`,{key:0},void 0,!0):(0,l.createCommentVNode)(``,!0)],4),(0,l.renderSlot)(t.$slots,`default`,{},void 0,!0)],2))}},[[`__scopeId`,`data-v-018d8cc0`]]),ri=L({__name:`PopoverMenuItem`,props:{center:{type:Boolean,default:!1}},emits:[`click`],setup(e,{emit:t}){let n=t;return(t,r)=>((0,l.openBlock)(),(0,l.createElementBlock)(`div`,{class:(0,l.normalizeClass)([`popover-menu-item`,{center:e.center}]),onClick:r[0]||=e=>n(`click`)},[(0,l.renderSlot)(t.$slots,`default`,{},void 0,!0)],2))}},[[`__scopeId`,`data-v-1f49f898`]]),ii=L({__name:`Divider`,props:{type:{type:String,default:`horizontal`},margin:{type:Number,default:-1}},setup(e){return(t,n)=>((0,l.openBlock)(),(0,l.createElementBlock)(`div`,{class:(0,l.normalizeClass)([`divider`,e.type]),style:(0,l.normalizeStyle)({margin:e.type===`horizontal`?`${e.margin>=0?e.margin:24}px 0`:`0 ${e.margin>=0?e.margin:8}px`})},null,6))}},[[`__scopeId`,`data-v-038c3fbc`]]),ai={class:`editor-header`},oi={class:`left`},si={class:`import-section`},ci={class:`import-grid`},li={class:`icon`},ui={class:`icon`},di={class:`menu-item`},fi={class:`title`},pi=[`title`],mi={class:`right`},hi={class:`group-menu-item`},gi={class:`arrow-btn`},_i={class:`aippt-form`},vi={class:`tips`},yi={class:`field`},bi={class:`label`},xi=[`placeholder`],Si={class:`btns`},Ci={style:{"margin-left":`6px`}},wi=L({__name:`index`,props:{enableImportFileSection:{type:Boolean,default:!1},enableExportJson:{type:Boolean,default:!1}},setup(e){let t=(0,l.getCurrentInstance)();t&&t.proxy&&t.proxy.$router;let n=B(),r=V(),{title:i}=(0,d.storeToRefs)(r),{t:a}=z(),{enterScreening:o,enterScreeningFromStart:s}=er(),{importSpecificFile:c,importPPTXFile:u,importJSON:f,importing:p}=zr(),{resetSlides:m}=Pn(),{AIPPTGenerator:h}=zn(),{addHistorySnapshot:g}=tn(),_=(0,l.ref)(!1),v=(0,l.ref)(!1),y=(0,l.ref)(!1),b=(0,l.ref)(``),x=(0,l.useTemplateRef)(`titleInputRef`),S=(0,l.useTemplateRef)(`tmplPicker`),C=(0,l.ref)(!1),w=(0,l.ref)(``),T=(0,l.ref)(null),E=(0,l.ref)(``),D=(0,l.ref)(!1),O=e=>{e.length!==0&&(n.setActiveElementIdList([]),r.setSlides(e),r.updateSlideIndex(0),g())},k=()=>{b.value=i.value,y.value=!0,(0,l.nextTick)(()=>x.value?.focus())},A=()=>{r.setTitle(b.value),y.value=!1},{exportPPTX:j,exportJSON:M,exporting:N}=Lr(),P=e=>{if(e===`json`){M(),_.value=!1;return}let{slides:t}=(0,d.storeToRefs)(V());j(t.value,!0,!0),_.value=!1},ee=()=>{n.setMarkupPanelState(!0)},te=async e=>{let t=e.target,n=t.files?.[0];if(n)try{E.value=n.name;let e=await n.text();T.value=JSON.parse(e),w.value=``,C.value=!0,R.success(a(`HEADER_BAR.TEMPLATE_LOADED`))}catch(e){console.error(e),R.error(a(`HEADER_BAR.TEMPLATE_LOAD_FAIL`))}finally{t.value=``}},ne=e=>{let t=new Set,n=e=>{if(e){if(Array.isArray(e))return e.forEach(n);if(typeof e==`object`){typeof e.type==`string`&&t.add(e.type);for(let t in e)n(e[t])}}};return n(e),Array.isArray(e?.slides)&&e.slides.forEach(e=>typeof e?.type==`string`&&t.add(e.type)),Array.from(t)},re=e=>{let t=[];return e.cover&&t.push({type:`cover`,data:{title:e.cover.title||``,text:e.cover.text||``}}),Array.isArray(e.contents)&&e.contents[0]&&t.push({type:`contents`,data:{items:e.contents[0].content||[]}}),Array.isArray(e.content)&&e.content.forEach(e=>{e?.title&&t.push({type:`transition`,data:{title:e.title,text:``}}),Array.isArray(e?.content)&&e.content.length&&t.push({type:`content`,data:{title:e.title||``,items:e.content.map(e=>({title:typeof e==`string`?e:e.title||``,text:typeof e==`string`?``:e.text||e.content||``}))}})}),Array.isArray(e.end)&&e.end.length>0&&t.push({type:`end`}),t},F=(e,t)=>{let n=e=>t.includes(e),r={};return!n(`toc`)&&n(`catalog`)&&(r.toc=`catalog`),!n(`section`)&&n(`title`)&&(r.section=`title`),!n(`bullets`)&&n(`list`)&&(r.bullets=`list`),!n(`end`)&&n(`thankyou`)&&(r.end=`thankyou`),e.map(e=>({...e,type:r[e.type]||e.type}))},ie=()=>{if(!T.value)return R.error(a(`HEADER_BAR.NEED_TEMPLATE_FILE`));let e;try{e=JSON.parse(w.value||`{}`)}catch{return R.error(a(`HEADER_BAR.AIPPT_PARSE_FAIL`))}try{D.value=!0;let t=T.value,n=Array.isArray(t?.slides)?t.slides:[],i=t?.theme;if(!n.length)throw Error(a(`HEADER_BAR.TEMPLATE_SLIDES_MISSING`));i&&typeof r.setTheme==`function`&&r.setTheme({...i,fontName:Et()});let o=ne(t),s;Array.isArray(e)?(s=e,console.log(`使用数组格式的 AIPPT 数据:`,s)):(s=re(e),console.log(`转换对象格式的 AIPPT 数据:`,s));let c=F(s,o),l=Array.from(new Set(c.map(e=>e.type).filter(e=>!o.includes(e))));if(l.length)throw Error(a(`HEADER_BAR.AIPPT_UNKNOWN_TYPES`,{unknown:l.join(`、`),supported:o.join(`、`)||a(`HEADER_BAR.AIPPT_UNKNOWN_TYPES_EMPTY`)}));let u=h(n,c),d=[];for(let e of u)d.push(e);console.log(`Generated slides:`,d),console.log(`First slide structure:`,d[0]),O(d),C.value=!1,R.success(a(`HEADER_BAR.RENDER_SUCCESS`))}catch(e){console.error(e),R.error(a(`HEADER_BAR.RENDER_FAIL`,{reason:e?.message||a(`HEADER_BAR.RENDER_FAIL_FALLBACK`)}))}finally{D.value=!1}};return(t,n)=>{let r=(0,l.resolveComponent)(`AiPptFilePdf`),c=(0,l.resolveComponent)(`AiPptFileJpg`),d=(0,l.resolveComponent)(`AiPptDownload`),h=(0,l.resolveComponent)(`AiPptRefresh`),g=(0,l.resolveComponent)(`AiPptMark`),T=(0,l.resolveComponent)(`AiPptCommand`),O=(0,l.resolveComponent)(`AiPptHamburgerButton`),j=(0,l.resolveComponent)(`AiPptPpt`),M=(0,l.resolveComponent)(`AiPptSlideTwo`),ne=(0,l.resolveComponent)(`AiPptDown`),re=(0,l.resolveDirective)(`tooltip`);return(0,l.openBlock)(),(0,l.createElementBlock)(`div`,ai,[(0,l.createElementVNode)(`div`,oi,[(0,l.createVNode)(W,{trigger:`click`,placement:`bottom-start`,value:_.value,"onUpdate:value":n[7]||=e=>_.value=e},{content:(0,l.withCtx)(()=>[e.enableImportFileSection?((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:0},[(0,l.createElementVNode)(`div`,si,[n[23]||=(0,l.createElementVNode)(`div`,{class:`import-label`},`导入文件`,-1),(0,l.createElementVNode)(`div`,ci,[(0,l.createVNode)(qr,{class:`import-block`,accept:`application/vnd.openxmlformats-officedocument.presentationml.presentation`,onChange:n[0]||=e=>{(0,l.unref)(u)(e),_.value=!1}},{default:(0,l.withCtx)(()=>[(0,l.createElementVNode)(`span`,li,[(0,l.createVNode)(r,{theme:`multi-color`,fill:[`#333`,`#d14424`,`#fff`]})]),n[19]||=(0,l.createElementVNode)(`span`,{class:`label`},`PPTX`,-1),n[20]||=(0,l.createElementVNode)(`span`,{class:`sub-label`},`(测试)`,-1)]),_:1}),(0,l.createVNode)(qr,{class:`import-block`,accept:`.json`,onChange:n[1]||=e=>{(0,l.unref)(f)(e),_.value=!1}},{default:(0,l.withCtx)(()=>[(0,l.createElementVNode)(`span`,ui,[(0,l.createVNode)(c,{theme:`multi-color`,fill:[`#333`,`#d14424`,`#fff`]})]),n[21]||=(0,l.createElementVNode)(`span`,{class:`label`},`JSON`,-1),n[22]||=(0,l.createElementVNode)(`span`,{class:`sub-label`},`(测试)`,-1)]),_:1})])]),(0,l.createVNode)(ii,{margin:10})],64)):(0,l.createCommentVNode)(``,!0),(0,l.createVNode)(ri,{class:`popover-menu-item`,onClick:n[2]||=e=>P(`pptx`)},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(d,{class:`icon`}),(0,l.createTextVNode)(` `+(0,l.toDisplayString)((0,l.unref)(a)(`HEADER_BAR.EXPORT_FILE`)),1)]),_:1}),e.enableExportJson?((0,l.openBlock)(),(0,l.createBlock)(ri,{key:1,class:`popover-menu-item`,onClick:n[3]||=e=>P(`json`)},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(c,{class:`icon`}),(0,l.createTextVNode)(` `+(0,l.toDisplayString)((0,l.unref)(a)(`EXPORT.BTN_JSON`)),1)]),_:1})):(0,l.createCommentVNode)(``,!0),(0,l.createVNode)(ii,{margin:10}),(0,l.createVNode)(ri,{class:`popover-menu-item`,onClick:n[4]||=()=>{(0,l.unref)(m)(),_.value=!1}},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(h,{class:`icon`}),(0,l.createTextVNode)(` `+(0,l.toDisplayString)((0,l.unref)(a)(`HEADER_BAR.RESET_SLIDES`)),1)]),_:1}),(0,l.createVNode)(ri,{class:`popover-menu-item`,onClick:n[5]||=()=>{ee(),_.value=!1}},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(g,{class:`icon`}),(0,l.createTextVNode)(` `+(0,l.toDisplayString)((0,l.unref)(a)(`HEADER_BAR.MARKUP`)),1)]),_:1}),(0,l.createVNode)(ri,{class:`popover-menu-item`,onClick:n[6]||=()=>{_.value=!1,v.value=!0}},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(T,{class:`icon`}),(0,l.createTextVNode)(` `+(0,l.toDisplayString)((0,l.unref)(a)(`HEADER_BAR.HOTKEY`)),1)]),_:1})]),default:(0,l.withCtx)(()=>[(0,l.createElementVNode)(`div`,di,[(0,l.createVNode)(O,{class:`icon`})])]),_:1},8,[`value`]),(0,l.createElementVNode)(`div`,fi,[y.value?((0,l.openBlock)(),(0,l.createBlock)(ni,{key:0,class:`title-input`,ref_key:`titleInputRef`,ref:x,value:b.value,"onUpdate:value":n[8]||=e=>b.value=e,onBlur:n[9]||=e=>A()},null,8,[`value`])):((0,l.openBlock)(),(0,l.createElementBlock)(`div`,{key:1,class:`title-text ppt-ellipsis-oneline`,onClick:n[10]||=e=>k(),title:(0,l.unref)(i)},(0,l.toDisplayString)((0,l.unref)(i)),9,pi))])]),(0,l.createElementVNode)(`div`,mi,[(0,l.createElementVNode)(`div`,hi,[(0,l.withDirectives)(((0,l.openBlock)(),(0,l.createElementBlock)(`div`,{class:`menu-item`,onClick:n[11]||=e=>(0,l.unref)(o)()},[(0,l.createVNode)(j,{class:`icon`})])),[[re,(0,l.unref)(a)(`HEADER_BAR.SLIDE_SHOW_TOOLTIP`)]]),(0,l.createVNode)(W,{trigger:`click`,center:``},{content:(0,l.withCtx)(()=>[(0,l.createVNode)(ri,{class:`popover-menu-item`,onClick:n[12]||=e=>(0,l.unref)(s)()},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(M,{class:`icon`}),(0,l.createTextVNode)(` `+(0,l.toDisplayString)((0,l.unref)(a)(`HEADER_BAR.SLIDE_SHOW_FROM_START`)),1)]),_:1}),(0,l.createVNode)(ri,{class:`popover-menu-item`,onClick:n[13]||=e=>(0,l.unref)(o)()},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(j,{class:`icon`}),(0,l.createTextVNode)(` `+(0,l.toDisplayString)((0,l.unref)(a)(`HEADER_BAR.SLIDE_SHOW_FROM_CURRENT`)),1)]),_:1})]),default:(0,l.withCtx)(()=>[(0,l.createElementVNode)(`div`,gi,[(0,l.createVNode)(ne,{class:`arrow`})])]),_:1})]),(0,l.withDirectives)(((0,l.openBlock)(),(0,l.createElementBlock)(`div`,{class:`menu-item`,onClick:n[14]||=e=>P(`pptx`)},[(0,l.createVNode)(d,{class:`icon`})])),[[re,(0,l.unref)(a)(`HEADER_BAR.EXPORT_TOOLTIP`)]]),e.enableExportJson?(0,l.withDirectives)(((0,l.openBlock)(),(0,l.createElementBlock)(`div`,{key:0,class:`menu-item`,onClick:n[15]||=e=>P(`json`)},[(0,l.createVNode)(c,{class:`icon`})])),[[re,(0,l.unref)(a)(`EXPORT.BTN_JSON`)]]):(0,l.createCommentVNode)(``,!0)]),(0,l.createVNode)(Qr,{width:320,visible:v.value,"onUpdate:visible":n[16]||=e=>v.value=e,placement:`right`},{title:(0,l.withCtx)(()=>[(0,l.createTextVNode)((0,l.toDisplayString)((0,l.unref)(a)(`HEADER_BAR.HOTKEY_TITLE`)),1)]),default:(0,l.withCtx)(()=>[(0,l.createVNode)(Gr)]),_:1},8,[`visible`]),(0,l.createElementVNode)(`input`,{ref_key:`tmplPicker`,ref:S,type:`file`,accept:`.json,.pptist`,style:{display:`none`},onChange:te},null,544),(0,l.createVNode)(Qr,{width:560,visible:C.value,"onUpdate:visible":n[18]||=e=>C.value=e,placement:`right`},{title:(0,l.withCtx)(()=>[(0,l.createTextVNode)((0,l.toDisplayString)((0,l.unref)(a)(`HEADER_BAR.AIPPT_DRAWER_TITLE`)),1)]),default:(0,l.withCtx)(()=>[(0,l.createElementVNode)(`div`,_i,[(0,l.createElementVNode)(`div`,vi,[(0,l.createTextVNode)((0,l.toDisplayString)((0,l.unref)(a)(`HEADER_BAR.TEMPLATE_SELECTED`))+`:`,1),(0,l.createElementVNode)(`strong`,null,(0,l.toDisplayString)(E.value||(0,l.unref)(a)(`HEADER_BAR.TEMPLATE_NOT_SELECTED`)),1)]),(0,l.createElementVNode)(`div`,yi,[(0,l.createElementVNode)(`div`,bi,(0,l.toDisplayString)((0,l.unref)(a)(`HEADER_BAR.AIPPT_JSON_LABEL`)),1),(0,l.withDirectives)((0,l.createElementVNode)(`textarea`,{"onUpdate:modelValue":n[17]||=e=>w.value=e,class:`aippt-textarea`,placeholder:(0,l.unref)(a)(`HEADER_BAR.AIPPT_JSON_PLACEHOLDER`)},null,8,xi),[[l.vModelText,w.value]])]),(0,l.createElementVNode)(`div`,Si,[(0,l.createElementVNode)(`div`,{class:`menu-item`,onClick:ie},[(0,l.createVNode)(j,{class:`icon`}),(0,l.createElementVNode)(`span`,Ci,(0,l.toDisplayString)((0,l.unref)(a)(`HEADER_BAR.RENDER_AND_LOAD`)),1)])])])]),_:1},8,[`visible`]),(0,l.createVNode)(Xr,{loading:(0,l.unref)(p),tip:(0,l.unref)(a)(`HEADER_BAR.IMPORTING`)},null,8,[`loading`,`tip`]),(0,l.createVNode)(Xr,{loading:(0,l.unref)(N),tip:(0,l.unref)(a)(`EXPORT.EXPORTING`)},null,8,[`loading`,`tip`]),(0,l.createVNode)(Xr,{loading:D.value,tip:(0,l.unref)(a)(`HEADER_BAR.RENDERING_AIPPT`)},null,8,[`loading`,`tip`])])}}},[[`__scopeId`,`data-v-82649310`]]),Ti=Symbol(),Ei=Symbol(),Di=()=>{let e=window.getSelection();e&&e.removeAllRanges()},Oi=e=>{let t=(0,l.ref)(0),n=(0,l.ref)(0),r=B(),{canvasPercentage:i,canvasDragged:a}=(0,d.storeToRefs)(r),{viewportRatio:o,viewportSize:s}=(0,d.storeToRefs)(V()),c=()=>{if(!e.value)return;let a=e.value.clientWidth,c=e.value.clientHeight;if(c/a>o.value){let e=a*(i.value/100);r.setCanvasScale(e/s.value),t.value=(a-e)/2,n.value=(c-e*o.value)/2}else{let e=c*(i.value/100);r.setCanvasScale(e/(s.value*o.value)),t.value=(a-e/o.value)/2,n.value=(c-e)/2}};(0,l.watch)(i,(i,a)=>{if(!e.value)return;let c=e.value.clientWidth,l=e.value.clientHeight;if(l/c>o.value){let e=i/100*c,l=a/100*c,u=e*o.value,d=l*o.value;r.setCanvasScale(e/s.value),t.value-=(e-l)/2,n.value-=(u-d)/2}else{let e=i/100*l,c=a/100*l,u=e/o.value,d=c/o.value;r.setCanvasScale(e/(s.value*o.value)),t.value-=(u-d)/2,n.value-=(e-c)/2}}),(0,l.watch)(o,c),(0,l.watch)(s,c),(0,l.watch)(a,()=>{a.value||c()});let u=(0,l.computed)(()=>({width:s.value,height:s.value*o.value,left:t.value,top:n.value})),f=new ResizeObserver(c);return(0,l.onMounted)(()=>{e.value&&f.observe(e.value)}),(0,l.onUnmounted)(()=>{e.value&&f.unobserve(e.value)}),{viewportStyles:u,dragViewport:e=>{let i=!0,a=e.pageX,o=e.pageY,s=t.value,c=n.value;document.onmousemove=e=>{if(!i)return;let r=e.pageX,l=e.pageY;t.value=s+(r-a),n.value=c+(l-o)},document.onmouseup=()=>{i=!1,document.onmousemove=null,document.onmouseup=null,r.setCanvasDragged(!0)}}}},ki=(e,t)=>{let n=B(),{canvasScale:r,hiddenElementIdList:i}=(0,d.storeToRefs)(n),{ctrlOrShiftKeyActive:a}=(0,d.storeToRefs)(zt()),o=(0,l.ref)(!1),s=(0,l.ref)(1),c=(0,l.ref)({top:0,left:0,width:0,height:0});return{mouseSelection:c,mouseSelectionVisible:o,mouseSelectionQuadrant:s,updateMouseSelection:l=>{if(!t.value)return;let u=!0,d=t.value.getBoundingClientRect(),f=l.pageX,p=l.pageY,m=(f-d.x)/r.value;c.value={top:(p-d.y)/r.value,left:m,width:0,height:0},o.value=!1,s.value=4,document.onmousemove=e=>{if(!u)return;let t=e.pageX,n=e.pageY,i=(t-f)/r.value,a=(n-p)/r.value,l=Math.abs(i),d=Math.abs(a);if(l<5||d<5)return;let m=0;i>0&&a>0?m=4:i<0&&a<0?m=2:i>0&&a<0?m=1:i<0&&a>0&&(m=3),c.value={...c.value,width:l,height:d},o.value=!0,s.value=m},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null,u=!1;let t=[];for(let n=0;n<e.value.length;n++){let r=e.value[n],o=c.value.left,l=c.value.top,u=c.value.width,d=c.value.height,{minX:f,maxX:p,minY:m,maxY:h}=Ut(r),g=!1;a.value?s.value===4?g=p>o&&f<o+u&&h>l&&m<l+d:s.value===2?g=p>o-u&&f<o-u+u&&h>l-d&&m<l-d+d:s.value===1?g=p>o&&f<o+u&&h>l-d&&m<l-d+d:s.value===3&&(g=p>o-u&&f<o-u+u&&h>l&&m<l+d):s.value===4?g=f>o&&p<o+u&&m>l&&h<l+d:s.value===2?g=f>o-u&&p<o-u+u&&m>l-d&&h<l-d+d:s.value===1?g=f>o&&p<o+u&&m>l-d&&h<l-d+d:s.value===3&&(g=f>o-u&&p<o-u+u&&m>l&&h<l+d),g&&!r.lock&&!i.value.includes(r.id)&&t.push(r)}t=t.filter(n=>{if(n.groupId){let r=t.map(e=>e.id);return e.value.filter(e=>e.groupId===n.groupId).every(e=>r.includes(e.id))}return!0});let r=t.map(e=>e.id);n.setActiveElementIdList(r),o.value=!1}}}},Ai=e=>{let{disableHotkeys:t}=(0,d.storeToRefs)(B()),{createImageElement:n,createTextElement:r}=jn(),i=e=>{if(!e.dataTransfer||e.dataTransfer.items.length===0)return;let i=e.dataTransfer.items,a=i[0],o=!1;for(let e of i)if(e.kind===`file`&&e.type.indexOf(`image`)!==-1){let t=e.getAsFile();t&&hn(t).then(e=>n(e)),o=!0}o||a.kind===`string`&&a.type===`text/plain`&&a.getAsString(e=>{t.value||r({left:0,top:0,width:600,height:50},{content:pn(e)})})};(0,l.onMounted)(()=>{e.value&&e.value.addEventListener(`drop`,i),document.ondragleave=e=>e.preventDefault(),document.ondrop=e=>e.preventDefault(),document.ondragenter=e=>e.preventDefault(),document.ondragover=e=>e.preventDefault()}),(0,l.onUnmounted)(()=>{e.value&&e.value.removeEventListener(`drop`,i),document.ondragleave=null,document.ondrop=null,document.ondragenter=null,document.ondragover=null})},ji=(e,t)=>{let n=Math.atan2(e,t);return 180/Math.PI*n},Mi=(e,t,n)=>{let r=V(),{addHistorySnapshot:i}=tn();return{rotateElement:(a,o)=>{let s=!(a instanceof MouseEvent);if(s&&(!a.changedTouches||!a.changedTouches[0]))return;let c=!0,l=0,u=o.rotate||0,d=o.left,f=o.top,p=o.width,m=o.height,h=d+p/2,g=f+m/2;if(!t.value)return;let _=t.value.getBoundingClientRect(),v=t=>{if(!c)return;let r=t instanceof MouseEvent?t.pageX:t.changedTouches[0].pageX,i=t instanceof MouseEvent?t.pageY:t.changedTouches[0].pageY,a=(r-_.left)/n.value,s=(i-_.top)/n.value;l=ji(a-h,g-s),Math.abs(l)<=5?l=0:l>0&&Math.abs(l-45)<=5?l-=l-45:l<0&&Math.abs(l+45)<=5?l-=l+45:l>0&&Math.abs(l-90)<=5?l-=l-90:l<0&&Math.abs(l+90)<=5?l-=l+90:l>0&&Math.abs(l-135)<=5?l-=l-135:l<0&&Math.abs(l+135)<=5?l-=l+135:l>0&&Math.abs(l-180)<=5?l-=l-180:l<0&&Math.abs(l+180)<=5&&(l-=l+180),e.value=e.value.map(e=>o.id===e.id?{...e,rotate:l}:e)},y=()=>{c=!1,document.onmousemove=null,document.onmouseup=null,u!==l&&(r.updateSlide({elements:e.value}),i())};s?(document.ontouchmove=v,document.ontouchend=y):(document.onmousemove=v,document.onmouseup=y)}}},Ni={text:{label:`文本`,labelKey:`ELEMENT.TYPE.TEXT`},image:{label:`图片`,labelKey:`ELEMENT.TYPE.IMAGE`},shape:{label:`形状`,labelKey:`ELEMENT.TYPE.SHAPE`},line:{label:`线条`,labelKey:`ELEMENT.TYPE.LINE`},chart:{label:`图表`,labelKey:`ELEMENT.TYPE.CHART`},table:{label:`表格`,labelKey:`ELEMENT.TYPE.TABLE`},video:{label:`视频`,labelKey:`ELEMENT.TYPE.VIDEO`},audio:{label:`音频`,labelKey:`ELEMENT.TYPE.AUDIO`},latex:{label:`公式`,labelKey:`ELEMENT.TYPE.LATEX`}};Object.fromEntries(Object.entries(Ni).map(([e,t])=>[e,t.label]));var Pi=(e,t)=>{let n=Ni[t];return n?e&&n.labelKey?e(n.labelKey):n.label:t||``},Fi={text:40,image:20,shape:20,chart:200,table:30,video:250,audio:20,latex:20},Ii=(e,t)=>{let{left:n,top:r,width:i,height:a}=e,o=Math.sqrt(i**2+a**2)/2,s=Math.atan(a/i)*180/Math.PI,c=(180-t-s)*Math.PI/180,l=(s-t)*Math.PI/180,u=(90-t)*Math.PI/180,d=t*Math.PI/180,f=i/2,p=a/2,m=n+f,h=r+p;return{leftTopPoint:{left:m+o*Math.cos(c),top:h-o*Math.sin(c)},topPoint:{left:m+p*Math.cos(u),top:h-p*Math.sin(u)},rightTopPoint:{left:m+o*Math.cos(l),top:h-o*Math.sin(l)},rightPoint:{left:m+f*Math.cos(d),top:h+f*Math.sin(d)},rightBottomPoint:{left:m-o*Math.cos(c),top:h+o*Math.sin(c)},bottomPoint:{left:m-p*Math.sin(d),top:h+p*Math.cos(d)},leftBottomPoint:{left:m-o*Math.cos(l),top:h+o*Math.sin(l)},leftPoint:{left:m-f*Math.cos(d),top:h-f*Math.sin(d)}}},Li=(e,t)=>({[U.RIGHT_BOTTOM]:t.leftTopPoint,[U.LEFT_BOTTOM]:t.rightTopPoint,[U.LEFT_TOP]:t.rightBottomPoint,[U.RIGHT_TOP]:t.leftBottomPoint,[U.TOP]:t.bottomPoint,[U.BOTTOM]:t.topPoint,[U.LEFT]:t.rightPoint,[U.RIGHT]:t.leftPoint})[e],Ri=(e,t,n)=>{let r=B(),i=V(),{activeElementIdList:a,activeGroupElementId:o}=(0,d.storeToRefs)(r),{viewportRatio:s,viewportSize:c}=(0,d.storeToRefs)(i),{ctrlOrShiftKeyActive:l}=(0,d.storeToRefs)(zt()),{addHistorySnapshot:u}=tn();return{scaleElement:(d,f,p)=>{let m=!(d instanceof MouseEvent);if(m&&(!d.changedTouches||!d.changedTouches[0]))return;let h=!0;r.setScalingState(!0);let g=f.left,_=f.top,v=f.width,y=f.height,b=f.type===`table`?f.cellMinHeight:0,x=`rotate`in f&&f.rotate?f.rotate:0,S=Math.PI*x/180,C=l.value||`fixedRatio`in f&&f.fixedRatio,w=v/y,T=m?d.changedTouches[0].pageX:d.pageX,E=m?d.changedTouches[0].pageY:d.pageY,D=Fi[f.type]||20,O=(e,t)=>{if(!C)return e<D?D:e;let n=D,r=D,i=f.width/f.height;return i<1&&(r=D/i),i>1&&(n=D*i),t===`width`?e<n?n:e:e<r?r:e},k,A=0,j=0,M=[],N=[];if(`rotate`in f&&f.rotate){let{left:e,top:t,width:n,height:r}=f;k=Ii({left:e,top:t,width:n,height:r},x);let i=Li(p,k);A=i.left,j=i.top}else{let t=c.value,n=c.value*s.value,r=f.id===o.value;for(let t of e.value){if(`rotate`in t&&t.rotate||t.type===`line`||r&&t.id===f.id||!r&&a.value.includes(t.id))continue;let e=t.left,n=t.top,i=t.width,o=t.height,s=e+i,c=n+o,l={value:n,range:[e,s]},u={value:c,range:[e,s]},d={value:e,range:[n,c]},p={value:s,range:[n,c]};M.push(l,u),N.push(d,p)}let i={value:0,range:[0,t]},l={value:n,range:[0,t]},u={value:n/2,range:[0,t]},d={value:0,range:[0,n]},p={value:t,range:[0,n]},m={value:t/2,range:[0,n]};M.push(i,l,u),N.push(d,p,m),M=Kt(M),N=Kt(N)}let P=(e,n)=>{let r=[],i=!1,a=!1,o={offsetX:0,offsetY:0};if(n||n===0)for(let t=0;t<M.length;t++){let{value:i,range:s}=M[t],c=Math.min(...s,e||0),l=Math.max(...s,e||0);Math.abs(n-i)<5&&!a&&(o.offsetY=n-i,a=!0,r.push({type:`horizontal`,axis:{x:c-50,y:i},length:l-c+100}))}if(e||e===0)for(let t=0;t<N.length;t++){let{value:a,range:s}=N[t],c=Math.min(...s,n||0),l=Math.max(...s,n||0);Math.abs(e-a)<5&&!i&&(o.offsetX=e-a,i=!0,r.push({type:`vertical`,axis:{x:a,y:c-50},length:l-c+100}))}return t.value=r,o},ee=t=>{if(!h)return;let r=t instanceof MouseEvent?t.pageX:t.changedTouches[0].pageX,i=t instanceof MouseEvent?t.pageY:t.changedTouches[0].pageY,a=r-T,o=i-E,s=v,c=y,l=g,u=_;if(x){let e=(Math.cos(S)*a+Math.sin(S)*o)/n.value,t=(Math.cos(S)*o-Math.sin(S)*a)/n.value;C&&((p===U.RIGHT_BOTTOM||p===U.LEFT_TOP)&&(t=e/w),(p===U.LEFT_BOTTOM||p===U.RIGHT_TOP)&&(t=-e/w)),p===U.RIGHT_BOTTOM?(s=O(v+e,`width`),c=O(y+t,`height`)):p===U.LEFT_BOTTOM?(s=O(v-e,`width`),c=O(y+t,`height`),l=g-(s-v)):p===U.LEFT_TOP?(s=O(v-e,`width`),c=O(y-t,`height`),l=g-(s-v),u=_-(c-y)):p===U.RIGHT_TOP?(s=O(v+e,`width`),c=O(y-t,`height`),u=_-(c-y)):p===U.TOP?(c=O(y-t,`height`),u=_-(c-y)):p===U.BOTTOM?c=O(y+t,`height`):p===U.LEFT?(s=O(v-e,`width`),l=g-(s-v)):p===U.RIGHT&&(s=O(v+e,`width`));let r=Li(p,Ii({width:s,height:c,left:l,top:u},x)),i=r.left,d=r.top,f=i-A,m=d-j;l-=f,u-=m}else{let e=a/n.value,t=o/n.value;if(C&&((p===U.RIGHT_BOTTOM||p===U.LEFT_TOP)&&(t=e/w),(p===U.LEFT_BOTTOM||p===U.RIGHT_TOP)&&(t=-e/w)),p===U.RIGHT_BOTTOM){let{offsetX:n,offsetY:r}=P(g+v+e,_+y+t);e-=n,t-=r,C&&(r?e=t*w:t=e/w),s=O(v+e,`width`),c=O(y+t,`height`)}else if(p===U.LEFT_BOTTOM){let{offsetX:n,offsetY:r}=P(g+e,_+y+t);e-=n,t-=r,C&&(r?e=-t*w:t=-e/w),s=O(v-e,`width`),c=O(y+t,`height`),l=g-(s-v)}else if(p===U.LEFT_TOP){let{offsetX:n,offsetY:r}=P(g+e,_+t);e-=n,t-=r,C&&(r?e=t*w:t=e/w),s=O(v-e,`width`),c=O(y-t,`height`),l=g-(s-v),u=_-(c-y)}else if(p===U.RIGHT_TOP){let{offsetX:n,offsetY:r}=P(g+v+e,_+t);e-=n,t-=r,C&&(r?e=-t*w:t=-e/w),s=O(v+e,`width`),c=O(y-t,`height`),u=_-(c-y)}else if(p===U.LEFT){let{offsetX:t}=P(g+e,null);e-=t,s=O(v-e,`width`),l=g-(s-v)}else if(p===U.RIGHT){let{offsetX:t}=P(g+v+e,null);e-=t,s=O(v+e,`width`)}else if(p===U.TOP){let{offsetY:e}=P(null,_+t);t-=e,c=O(y-t,`height`),u=_-(c-y)}else if(p===U.BOTTOM){let{offsetY:e}=P(null,_+y+t);t-=e,c=O(y+t,`height`)}}e.value=e.value.map(e=>{if(f.id!==e.id)return e;if(e.type===`shape`&&`pathFormula`in e&&e.pathFormula){let t=bn[e.pathFormula],n=``;return n=`editable`in t?t.formula(s,c,e.keypoints):t.formula(s,c),{...e,left:l,top:u,width:s,height:c,viewBox:[s,c],path:n}}if(e.type===`table`){let t=b+(c-y)/e.data.length;return t=t<36?36:t,t===b?{...e,left:l,width:s}:{...e,left:l,top:u,width:s,height:c,cellMinHeight:t<36?36:t}}return{...e,left:l,top:u,width:s,height:c}})},te=n=>{h=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null,t.value=[];let a=n instanceof MouseEvent?n.pageX:n.changedTouches[0].pageX,o=n instanceof MouseEvent?n.pageY:n.changedTouches[0].pageY;T===a&&E===o||(i.updateSlide({elements:e.value}),r.setScalingState(!1),u())};m?(document.ontouchmove=ee,document.ontouchend=te):(document.onmousemove=ee,document.onmouseup=te)},scaleMultiElement:(t,r,o)=>{let s=!0,{minX:c,maxX:d,minY:f,maxY:p}=r,m=d-c,h=p-f,g=m/h,_=t.pageX,v=t.pageY,y=JSON.parse(JSON.stringify(e.value));document.onmousemove=t=>{if(!s)return;let r=t.pageX,i=t.pageY,u=(r-_)/n.value,b=(i-v)/n.value;l.value&&((o===U.RIGHT_BOTTOM||o===U.LEFT_TOP)&&(b=u/g),(o===U.LEFT_BOTTOM||o===U.RIGHT_TOP)&&(b=-u/g));let x=c,S=d,C=f,w=p;o===U.RIGHT_BOTTOM?(S=d+u,w=p+b):o===U.LEFT_BOTTOM?(x=c+u,w=p+b):o===U.LEFT_TOP?(x=c+u,C=f+b):o===U.RIGHT_TOP?(S=d+u,C=f+b):o===U.TOP?C=f+b:o===U.BOTTOM?w=p+b:o===U.LEFT?x=c+u:o===U.RIGHT&&(S=d+u);let T=S-x,E=w-C,D=T/m,O=E/h;D<=0&&(D=0),O<=0&&(O=0),e.value=e.value.map(e=>{if((e.type===`image`||e.type===`shape`)&&a.value.includes(e.id)){let t=y.find(t=>t.id===e.id);return{...e,width:t.width*D,height:t.height*O,left:x+(t.left-c)*D,top:C+(t.top-f)*O}}return e})},document.onmouseup=t=>{s=!1,document.onmousemove=null,document.onmouseup=null,!(_===t.pageX&&v===t.pageY)&&(i.updateSlide({elements:e.value}),u())}}}},zi=(e,t)=>{let n=B(),{activeElementIdList:r,activeGroupElementId:i,handleElementId:a,editorAreaFocus:o}=(0,d.storeToRefs)(n),{ctrlOrShiftKeyActive:s}=(0,d.storeToRefs)(zt());return{selectElement:(c,l,d=!0)=>{if(o.value||n.setEditorareaFocus(!0),!r.value.includes(l.id)){let t=[];if(t=s.value?[...r.value,l.id]:[l.id],l.groupId){let n=[];e.value.forEach(e=>{e.groupId===l.groupId&&n.push(e.id)}),t=[...t,...n]}n.setActiveElementIdList((0,u.uniq)(t)),n.setHandleElementId(l.id)}else if(s.value){let t=[];if(l.groupId){let n=[];e.value.forEach(e=>{e.groupId===l.groupId&&n.push(e.id)}),t=r.value.filter(e=>!n.includes(e))}else t=r.value.filter(e=>e!==l.id);t.length>0&&n.setActiveElementIdList(t)}else if(a.value!==l.id)n.setHandleElementId(l.id);else if(i.value!==l.id){let e=c instanceof MouseEvent?c.pageX:c.changedTouches[0].pageX,t=c instanceof MouseEvent?c.pageY:c.changedTouches[0].pageY;c.target.onmouseup=r=>{let i=r.pageX,a=r.pageY;e===i&&t===a&&(n.setActiveGroupElementId(l.id),r.target.onmouseup=null)}}d&&t(c,l)}}},Bi=(e,t,n)=>{let r=V(),{activeElementIdList:i,activeGroupElementId:a}=(0,d.storeToRefs)(B()),{shiftKeyState:o}=(0,d.storeToRefs)(zt()),{viewportRatio:s,viewportSize:c}=(0,d.storeToRefs)(r),{addHistorySnapshot:l}=tn();return{dragElement:(u,d)=>{let f=!(u instanceof MouseEvent);if(f&&(!u.changedTouches||!u.changedTouches[0])||!i.value.includes(d.id))return;let p=!0,m=c.value,h=c.value*s.value,g=JSON.parse(JSON.stringify(e.value)).filter(e=>i.value.includes(e.id)),_=d.left,v=d.top,y=d.width,b=`height`in d&&d.height?d.height:0,x=`rotate`in d&&d.rotate?d.rotate:0,S=f?u.changedTouches[0].pageX:u.pageX,C=f?u.changedTouches[0].pageY:u.pageY,w=null,T=d.id===a.value,E=[],D=[];for(let t of e.value){if(t.type===`line`||T&&t.id===d.id||!T&&i.value.includes(t.id))continue;let e,n,r,a;if(`rotate`in t&&t.rotate){let{xRange:i,yRange:o}=Vt({left:t.left,top:t.top,width:t.width,height:t.height,rotate:t.rotate});e=i[0],n=o[0],r=i[1]-i[0],a=o[1]-o[0]}else e=t.left,n=t.top,r=t.width,a=t.height;let o=e+r,s=n+a,c=n+a/2,l=e+r/2,u={value:n,range:[e,o]},f={value:s,range:[e,o]},p={value:c,range:[e,o]},m={value:e,range:[n,s]},h={value:o,range:[n,s]},g={value:l,range:[n,s]};E.push(u,f,p),D.push(m,h,g)}let O={value:0,range:[0,m]},k={value:h,range:[0,m]},A={value:h/2,range:[0,m]},j={value:0,range:[0,h]},M={value:m,range:[0,h]},N={value:m/2,range:[0,h]};E.push(O,k,A),D.push(j,M,N),E=Kt(E),D=Kt(D);let P=r=>{let a=r instanceof MouseEvent?r.pageX:r.changedTouches[0].pageX,s=r instanceof MouseEvent?r.pageY:r.changedTouches[0].pageY;if(w!==!1&&(w=Math.abs(S-a)<5&&Math.abs(C-s)<5),!p||w)return;let c=(a-S)/n.value,l=(s-C)/n.value;o.value&&(Math.abs(c)>Math.abs(l)&&(l=0),Math.abs(c)<Math.abs(l)&&(c=0));let u=_+c,f=v+l,m,h,O,k;if(i.value.length===1||T)if(x){let{xRange:e,yRange:t}=Vt({left:u,top:f,width:y,height:b,rotate:x});m=e[0],h=e[1],O=t[0],k=t[1]}else d.type===`line`?(m=u,h=u+Math.max(d.start[0],d.end[0]),O=f,k=f+Math.max(d.start[1],d.end[1])):(m=u,h=u+y,O=f,k=f+b);else{let e=[],t=[],n=[],r=[];for(let i=0;i<g.length;i++){let a=g[i],o=a.left+c,s=a.top+l,u=a.width,d=`height`in a&&a.height?a.height:0,f=`rotate`in a&&a.rotate?a.rotate:0;if(`rotate`in a&&a.rotate){let{xRange:i,yRange:a}=Vt({left:o,top:s,width:u,height:d,rotate:f});e.push(i[0]),t.push(a[0]),n.push(i[1]),r.push(a[1])}else a.type===`line`?(e.push(o),t.push(s),n.push(o+Math.max(a.start[0],a.end[0])),r.push(s+Math.max(a.start[1],a.end[1]))):(e.push(o),t.push(s),n.push(o+u),r.push(s+d))}m=Math.min(...e),h=Math.max(...n),O=Math.min(...t),k=Math.max(...r)}let A=m+(h-m)/2,j=O+(k-O)/2,M=[],N=!1,P=!1;for(let e=0;e<E.length;e++){let{value:t,range:n}=E[e],r=Math.min(...n,m,h),i=Math.max(...n,m,h);Math.abs(O-t)<5&&!P&&(f-=O-t,P=!0,M.push({type:`horizontal`,axis:{x:r-50,y:t},length:i-r+100})),Math.abs(k-t)<5&&!P&&(f-=k-t,P=!0,M.push({type:`horizontal`,axis:{x:r-50,y:t},length:i-r+100})),Math.abs(j-t)<5&&!P&&(f-=j-t,P=!0,M.push({type:`horizontal`,axis:{x:r-50,y:t},length:i-r+100}))}for(let e=0;e<D.length;e++){let{value:t,range:n}=D[e],r=Math.min(...n,O,k),i=Math.max(...n,O,k);Math.abs(m-t)<5&&!N&&(u-=m-t,N=!0,M.push({type:`vertical`,axis:{x:t,y:r-50},length:i-r+100})),Math.abs(h-t)<5&&!N&&(u-=h-t,N=!0,M.push({type:`vertical`,axis:{x:t,y:r-50},length:i-r+100})),Math.abs(A-t)<5&&!N&&(u-=A-t,N=!0,M.push({type:`vertical`,axis:{x:t,y:r-50},length:i-r+100}))}if(t.value=M,i.value.length===1||T)e.value=e.value.map(e=>e.id===d.id?{...e,left:u,top:f}:e);else{let t=e.value.find(e=>e.id===d.id);if(!t)return;e.value=e.value.map(e=>i.value.includes(e.id)?e.id===d.id?{...e,left:u,top:f}:{...e,left:e.left+(u-t.left),top:e.top+(f-t.top)}:e)}},ee=n=>{p=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null,t.value=[];let i=n instanceof MouseEvent?n.pageX:n.changedTouches[0].pageX,a=n instanceof MouseEvent?n.pageY:n.changedTouches[0].pageY;S===i&&C===a||(r.updateSlide({elements:e.value}),l())};f?(document.ontouchmove=P,document.ontouchend=ee):(document.onmousemove=P,document.onmouseup=ee)}}},Vi=e=>{let t=V(),{canvasScale:n}=(0,d.storeToRefs)(B()),{ctrlOrShiftKeyActive:r}=(0,d.storeToRefs)(zt()),{addHistorySnapshot:i}=tn();return{dragLineElement:(a,o,s)=>{let c=!0,l=a.pageX,u=a.pageY,d=[];for(let t=0;t<e.value.length;t++){let n=e.value[t];if(n.type===`line`||n.rotate)continue;let r=n.left,i=n.top,a=n.width,o=n.height,s=r+a,c=i+o,l=i+o/2,u=r+a/2,f={x:u,y:i},p={x:u,y:c},m={x:r,y:l},h={x:s,y:l},g={x:r,y:i},_={x:s,y:i},v={x:r,y:c},y={x:s,y:c};d.push(f,p,m,h,g,_,v,y)}document.onmousemove=t=>{if(!c)return;let i=t.pageX,a=t.pageY,f=(i-l)/n.value,p=(a-u)/n.value,m=o.left+o.start[0],h=o.top+o.start[1],g=o.left+o.end[0],_=o.top+o.end[1],v=o.broken||o.broken2||o.curve||[0,0],y=o.left+v[0],b=o.top+v[1],[x,S]=o.cubic||[[0,0],[0,0]],C=o.left+x[0],w=o.top+x[1],T=o.left+S[0],E=o.top+S[1];if(s===Un.START){m+=f,h+=p,Math.abs(m-g)<8&&(m=g),Math.abs(h-_)<8&&(h=_);for(let e of d){let{x:t,y:n}=e;if(Math.abs(t-m)<8&&Math.abs(n-h)<8){m=t,h=n;break}}}else if(s===Un.END){g+=f,_+=p,Math.abs(m-g)<8&&(g=m),Math.abs(h-_)<8&&(_=h);for(let e of d){let{x:t,y:n}=e;if(Math.abs(t-g)<8&&Math.abs(n-_)<8){g=t,_=n;break}}}else s===Un.C?(y+=f,b+=p,Math.abs(y-m)<8&&(y=m),Math.abs(b-h)<8&&(b=h),Math.abs(y-g)<8&&(y=g),Math.abs(b-_)<8&&(b=_),Math.abs(y-(m+g)/2)<8&&Math.abs(b-(h+_)/2)<8&&(y=(m+g)/2,b=(h+_)/2)):s===Un.C1?(C+=f,w+=p,Math.abs(C-m)<8&&(C=m),Math.abs(w-h)<8&&(w=h),Math.abs(C-g)<8&&(C=g),Math.abs(w-_)<8&&(w=_)):s===Un.C2&&(T+=f,E+=p,Math.abs(T-m)<8&&(T=m),Math.abs(E-h)<8&&(E=h),Math.abs(T-g)<8&&(T=g),Math.abs(E-_)<8&&(E=_));let D=Math.min(m,g),O=Math.min(h,_),k=Math.max(m,g),A=Math.max(h,_),j=[0,0],M=[k-D,A-O];m>g&&(j[0]=k-D,M[0]=0),h>_&&(j[1]=A-O,M[1]=0),e.value=e.value.map(e=>{if(e.id===o.id){let t={...e,left:D,top:O,start:j,end:M};return s===Un.START||s===Un.END?(r.value?(o.broken&&(t.broken=[y-D,b-O]),o.curve&&(t.curve=[y-D,b-O]),o.cubic&&(t.cubic=[[C-D,w-O],[T-D,E-O]])):(o.broken&&(t.broken=[(j[0]+M[0])/2,(j[1]+M[1])/2]),o.curve&&(t.curve=[(j[0]+M[0])/2,(j[1]+M[1])/2]),o.cubic&&(t.cubic=[[(j[0]+M[0])/2,(j[1]+M[1])/2],[(j[0]+M[0])/2,(j[1]+M[1])/2]])),o.broken2&&(t.broken2=[(j[0]+M[0])/2,(j[1]+M[1])/2])):s===Un.C?(o.broken&&(t.broken=[y-D,b-O]),o.curve&&(t.curve=[y-D,b-O]),o.broken2&&(k-D>=A-O?t.broken2=[y-D,t.broken2[1]]:t.broken2=[t.broken2[0],b-O])):o.cubic&&(t.cubic=[[C-D,w-O],[T-D,E-O]]),t}return e})},document.onmouseup=n=>{c=!1,document.onmousemove=null,document.onmouseup=null;let r=n.pageX,a=n.pageY;l===r&&u===a||(t.updateSlide({elements:e.value}),i())}}}},Hi=(e,t)=>{let n=V(),{addHistorySnapshot:r}=tn();return{moveShapeKeypoint:(i,a,o=0)=>{let s=!(i instanceof MouseEvent);if(s&&(!i.changedTouches||!i.changedTouches[0]))return;let c=!0,l=s?i.changedTouches[0].pageX:i.pageX,u=s?i.changedTouches[0].pageY:i.pageY,d=a.keypoints,f=bn[a.pathFormula],p=null;if(`editable`in f&&f.editable){let e=f.getBaseSize[o],t=f.range[o],n=f.relative[o],r=d[o],i=e(a.width,a.height),s=i*r,[c,l]=t;p={baseSize:i,originPos:s,min:c,max:l,relative:n}}let m=n=>{if(!c)return;let r=n instanceof MouseEvent?n.pageX:n.changedTouches[0].pageX,i=n instanceof MouseEvent?n.pageY:n.changedTouches[0].pageY,s=(r-l)/t.value,m=(i-u)/t.value;e.value=e.value.map(e=>{if(e.id===a.id&&p){let{baseSize:t,originPos:n,min:r,max:i,relative:a}=p,c=e,l=0;a===`center`?l=(n-s*2)/t:a===`left`?l=(n+s)/t:a===`right`?l=(n-s)/t:a===`top`?l=(n+m)/t:a===`bottom`?l=(n-m)/t:a===`left_bottom`?l=(n+s)/t:a===`right_bottom`?l=(n-s)/t:a===`top_right`?l=(n+m)/t:a===`bottom_right`&&(l=(n-m)/t),l<r&&(l=r),l>i&&(l=i);let u=[];return Array.isArray(d)?(u=[...d],u[o]=l):u=[l],{...e,keypoints:u,path:f.formula(c.width,c.height,u)}}return e})},h=t=>{c=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null;let i=t instanceof MouseEvent?t.pageX:t.changedTouches[0].pageX,a=t instanceof MouseEvent?t.pageY:t.changedTouches[0].pageY;l===i&&u===a||(n.updateSlide({elements:e.value}),r())};s?(document.ontouchmove=m,document.ontouchend=h):(document.onmousemove=m,document.onmouseup=h)}}},Ui=e=>{let t=B(),{canvasScale:n,creatingElement:r}=(0,d.storeToRefs)(t),i=t=>{let{start:r,end:i}=t;if(!e.value)return;let a=e.value.getBoundingClientRect(),[o,s]=r,[c,l]=i,u=Math.min(o,c),d=Math.max(o,c),f=Math.min(s,l),p=Math.max(s,l);return{left:(u-a.x)/n.value,top:(f-a.y)/n.value,width:(d-u)/n.value,height:(p-f)/n.value}},a=t=>{let{start:r,end:i}=t;if(!e.value)return;let a=e.value.getBoundingClientRect(),[o,s]=r,[c,l]=i,u=Math.min(o,c),d=Math.max(o,c),f=Math.min(s,l),p=Math.max(s,l),m=(u-a.x)/n.value,h=(f-a.y)/n.value,g=(d-u)/n.value,_=(p-f)/n.value;return{left:m,top:h,start:[o===u?0:g,s===f?0:_],end:[c===u?0:g,l===f?0:_]}},{createTextElement:o,createShapeElement:s,createLineElement:c}=jn();return{formatCreateSelection:i,insertElementFromCreateSelection:e=>{if(!r.value)return;let n=r.value.type;if(n===`text`){let t=i(e);t&&o(t,{vertical:r.value.vertical})}else if(n===`shape`){let t=i(e);t&&s(t,r.value.data)}else if(n===`line`){let t=a(e);t&&c(t,r.value.data)}t.setCreatingElement(null)}}},Wi=()=>{let e=V(),{activeElementIdList:t,activeElementList:n}=(0,d.storeToRefs)(B()),{currentSlide:r,viewportRatio:i,viewportSize:a}=(0,d.storeToRefs)(e),{addHistorySnapshot:o}=tn();return{alignElementToCanvas:s=>{let c=a.value,l=a.value*i.value,{minX:u,maxX:d,minY:f,maxY:p}=Wt(n.value),m=JSON.parse(JSON.stringify(r.value.elements));for(let e of m)if(t.value.includes(e.id)){if(s===Vn.CENTER){let t=f+(p-f)/2-l/2,n=u+(d-u)/2-c/2;e.top-=t,e.left-=n}if(s===Vn.TOP){let t=f-0;e.top-=t}else if(s===Vn.VERTICAL){let t=f+(p-f)/2-l/2;e.top-=t}else if(s===Vn.BOTTOM){let t=p-l;e.top-=t}else if(s===Vn.LEFT){let t=u-0;e.left-=t}else if(s===Vn.HORIZONTAL){let t=u+(d-u)/2-c/2;e.left-=t}else if(s===Vn.RIGHT){let t=d-c;e.left-=t}}e.updateSlide({elements:m}),o()}}},Gi=e=>({shadowStyle:(0,l.computed)(()=>{if(e.value){let{h:t,v:n,blur:r,color:i}=e.value;return`${t}px ${n}px ${r}px ${i}`}return``})}),Ki=(e,t)=>({flipStyle:(0,l.computed)(()=>{let n=``;return e.value&&t.value?n=`rotateX(180deg) rotateY(180deg)`:t.value?n=`rotateX(180deg)`:e.value&&(n=`rotateY(180deg)`),n})}),qi;(function(e){e.RECT=`rect`,e.ELLIPSE=`ellipse`,e.POLYGON=`polygon`})(qi||={});var Ji;(function(e){e.RECT=`rect`,e.ROUNDRECT=`roundRect`,e.ELLIPSE=`ellipse`,e.TRIANGLE=`triangle`,e.PENTAGON=`pentagon`,e.RHOMBUS=`rhombus`,e.STAR=`star`})(Ji||={});var Yi={rect:{name:`矩形`,nameKey:`CLIP.SHAPE.RECT`,type:qi.RECT,radius:`0`,style:``},rect2:{name:`矩形2`,nameKey:`CLIP.SHAPE.RECT_2`,type:qi.POLYGON,style:`polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 0 100%)`,createPath:(e,t)=>`M 0 0 L ${e*.8} 0 L ${e} ${t*.2} L ${e} ${t} L 0 ${t} Z`},rect3:{name:`矩形3`,nameKey:`CLIP.SHAPE.RECT_3`,type:qi.POLYGON,style:`polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 20% 100%, 0% 80%)`,createPath:(e,t)=>`M 0 0 L ${e*.8} 0 L ${e} ${t*.2} L ${e} ${t} L ${e*.2} ${t} L 0 ${t*.8} Z`},roundRect:{name:`圆角矩形`,nameKey:`CLIP.SHAPE.ROUND_RECT`,type:qi.RECT,radius:`10px`,style:`inset(0 round 10px)`},ellipse:{name:`圆形`,nameKey:`CLIP.SHAPE.ELLIPSE`,type:qi.ELLIPSE,style:`ellipse(50% 50% at 50% 50%)`},triangle:{name:`三角形`,nameKey:`CLIP.SHAPE.TRIANGLE`,type:qi.POLYGON,style:`polygon(50% 0%, 0% 100%, 100% 100%)`,createPath:(e,t)=>`M ${e*.5} 0 L 0 ${t} L ${e} ${t} Z`},triangle2:{name:`三角形2`,nameKey:`CLIP.SHAPE.TRIANGLE_2`,type:qi.POLYGON,style:`polygon(50% 100%, 0% 0%, 100% 0%)`,createPath:(e,t)=>`M ${e*.5} ${t} L 0 0 L ${e} 0 Z`},triangle3:{name:`三角形3`,nameKey:`CLIP.SHAPE.TRIANGLE_3`,type:qi.POLYGON,style:`polygon(0% 0%, 0% 100%, 100% 100%)`,createPath:(e,t)=>`M 0 0 L 0 ${t} L ${e} ${t} Z`},rhombus:{name:`菱形`,nameKey:`CLIP.SHAPE.RHOMBUS`,type:qi.POLYGON,style:`polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)`,createPath:(e,t)=>`M ${e*.5} 0 L ${e} ${t*.5} L ${e*.5} ${t} L 0 ${t*.5} Z`},pentagon:{name:`五边形`,nameKey:`CLIP.SHAPE.PENTAGON`,type:qi.POLYGON,style:`polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)`,createPath:(e,t)=>`M ${e*.5} 0 L ${e} ${.38*t} L ${.82*e} ${t} L ${.18*e} ${t} L 0 ${.38*t} Z`},hexagon:{name:`六边形`,nameKey:`CLIP.SHAPE.HEXAGON`,type:qi.POLYGON,style:`polygon(20% 0%, 80% 0%, 100% 50%, 80% 100%, 20% 100%, 0% 50%)`,createPath:(e,t)=>`M ${e*.2} 0 L ${e*.8} 0 L ${e} ${t*.5} L ${e*.8} ${t} L ${e*.2} ${t} L 0 ${t*.5} Z`},heptagon:{name:`七边形`,nameKey:`CLIP.SHAPE.HEPTAGON`,type:qi.POLYGON,style:`polygon(50% 0%, 90% 20%, 100% 60%, 75% 100%, 25% 100%, 0% 60%, 10% 20%)`,createPath:(e,t)=>`M ${e*.5} 0 L ${e*.9} ${t*.2} L ${e} ${t*.6} L ${e*.75} ${t} L ${e*.25} ${t} L 0 ${t*.6} L ${e*.1} ${t*.2} Z`},octagon:{name:`八边形`,nameKey:`CLIP.SHAPE.OCTAGON`,type:qi.POLYGON,style:`polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%)`,createPath:(e,t)=>`M ${e*.3} 0 L ${e*.7} 0 L ${e} ${t*.3} L ${e} ${t*.7} L ${e*.7} ${t} L ${e*.3} ${t} L 0 ${t*.7} L 0 ${t*.3} Z`},chevron:{name:`V形`,nameKey:`CLIP.SHAPE.CHEVRON`,type:qi.POLYGON,style:`polygon(75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%, 0% 0%)`,createPath:(e,t)=>`M ${e*.75} 0 L ${e} ${t*.5} L ${e*.75} ${t} L 0 ${t} L ${e*.25} ${t*.5} L 0 0 Z`},point:{name:`点`,nameKey:`CLIP.SHAPE.POINT`,type:qi.POLYGON,style:`polygon(0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%)`,createPath:(e,t)=>`M 0 0 L ${e*.75} 0 L ${e} ${t*.5} L ${e*.75} ${t} L 0 ${t} Z`},arrow:{name:`箭头`,nameKey:`CLIP.SHAPE.ARROW`,type:qi.POLYGON,style:`polygon(0% 20%, 60% 20%, 60% 0%, 100% 50%, 60% 100%, 60% 80%, 0% 80%)`,createPath:(e,t)=>`M 0 ${t*.2} L ${e*.6} ${t*.2} L ${e*.6} 0 L ${e} ${t*.5} L ${e*.6} ${t} L ${e*.6} ${t*.8} L 0 ${t*.8} Z`},parallelogram:{name:`平行四边形`,nameKey:`CLIP.SHAPE.PARALLELOGRAM`,type:qi.POLYGON,style:`polygon(30% 0%, 100% 0%, 70% 100%, 0% 100%)`,createPath:(e,t)=>`M ${e*.3} 0 L ${e} 0 L ${e*.7} ${t} L 0 ${t} Z`},parallelogram2:{name:`平行四边形2`,nameKey:`CLIP.SHAPE.PARALLELOGRAM_2`,type:qi.POLYGON,style:`polygon(30% 100%, 100% 100%, 70% 0%, 0% 0%)`,createPath:(e,t)=>`M ${e*.3} ${t} L ${e} ${t} L ${e*.7} 0 L 0 0 Z`},trapezoid:{name:`梯形`,nameKey:`CLIP.SHAPE.TRAPEZOID`,type:qi.POLYGON,style:`polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%)`,createPath:(e,t)=>`M ${e*.25} 0 L ${e*.75} 0 L ${e} ${t} L 0 ${t} Z`},trapezoid2:{name:`梯形2`,nameKey:`CLIP.SHAPE.TRAPEZOID_2`,type:qi.POLYGON,style:`polygon(0% 0%, 100% 0%, 75% 100%, 25% 100%)`,createPath:(e,t)=>`M 0 0 L ${e} 0 L ${e*.75} ${t} L ${e*.25} ${t} Z`}},Xi=e=>({clipShape:(0,l.computed)(()=>{let t=Yi.rect;return e.value.clip&&(t=Yi[e.value.clip.shape||qi.RECT]),t.radius!==void 0&&e.value.radius&&(t={...t,radius:`${e.value.radius}px`,style:`inset(0 round ${e.value.radius}px)`}),t}),imgPosition:(0,l.computed)(()=>{if(!e.value.clip)return{top:`0`,left:`0`,width:`100%`,height:`100%`};let[t,n]=e.value.clip.range,r=(n[0]-t[0])/100,i=(n[1]-t[1])/100,a=t[0]/r,o=t[1]/i;return{left:-a+`%`,top:-o+`%`,width:100/r+`%`,height:100/i+`%`}})}),Zi=e=>({filter:(0,l.computed)(()=>{if(!e.value)return``;let t=``,n=Object.keys(e.value);for(let r of n)t+=`${r}(${e.value[r]}) `;return t})}),Qi=[`src`],$i=[`src`],ea=[`onMousedown`],ta=[`onMousedown`],na=L({__name:`ImageClipHandler`,props:{src:{type:String,required:!0},clipPath:{type:String,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0},top:{type:Number,required:!0},left:{type:Number,required:!0},rotate:{type:Number,required:!0},clipData:{type:Object}},emits:[`clip`],setup(e,{emit:t}){let n=e,r=t,{canvasScale:i}=(0,d.storeToRefs)(B()),{ctrlOrShiftKeyActive:a}=(0,d.storeToRefs)(zt()),o=(0,l.ref)({top:`0`,left:`0`}),s=(0,l.ref)(!1),c=(0,l.ref)(null),u=()=>{let[e,t]=n.clipData?n.clipData.range:[[0,0],[100,100]],r=(t[0]-e[0])/100,i=(t[1]-e[1])/100;return{widthScale:r,heightScale:i,left:e[0]/r,top:e[1]/i}},f=(0,l.computed)(()=>{let{widthScale:e,heightScale:t,left:n,top:r}=u();return{left:-n,top:-r,width:100/e,height:100/t}}),p=(0,l.computed)(()=>({top:f.value.top+`%`,left:f.value.left+`%`,width:f.value.width+`%`,height:f.value.height+`%`})),m=(0,l.ref)({top:0,left:0,width:0,height:0}),h=(0,l.computed)(()=>{let{top:e,left:t,width:n,height:r}=m.value;return{top:e+`%`,left:t+`%`,width:n+`%`,height:r+`%`}}),g=(0,l.computed)(()=>{let e=f.value.width,t=f.value.height,{top:n,left:r,width:i,height:a}=m.value;return{left:-r*(100/i)+`%`,top:-n*(100/a)+`%`,width:e/i*100+`%`,height:t/a*100+`%`}}),_=()=>{let{left:e,top:t}=u();m.value={left:e,top:t,width:100,height:100},o.value={top:-t+`%`,left:-e+`%`}},v=()=>{if(s.value)return;if(!c.value){r(`clip`,null);return}let{left:e,top:t}=u(),i={left:(m.value.left-e)/100*n.width,top:(m.value.top-t)/100*n.height,width:(m.value.width-100)/100*n.width,height:(m.value.height-100)/100*n.height};r(`clip`,{range:c.value,position:i})},y=e=>{e.key.toUpperCase()===H.ENTER&&v()};(0,l.onMounted)(()=>{_(),document.addEventListener(`keydown`,y)}),(0,l.onUnmounted)(()=>{document.removeEventListener(`keydown`,y)});let b=()=>{let e={left:parseInt(g.value.left),top:parseInt(g.value.top),width:parseInt(g.value.width),height:parseInt(g.value.height)},t=100/e.width,n=100/e.height,r=[-e.left*t,-e.top*n];c.value=[r,[t*100+r[0],n*100+r[1]]]},x=e=>{s.value=!0;let t=!0,r=e.pageX,a=e.pageY,o=f.value,c={...m.value};document.onmousemove=e=>{if(!t)return;let s=e.pageX,l=e.pageY,u=(s-r)/i.value,d=(l-a)/i.value,f=Math.sqrt(u*u+d*d),p=Math.atan2(d,u)-n.rotate/180*Math.PI,h=f*Math.cos(p)/n.width*100,g=f*Math.sin(p)/n.height*100,_=c.left+h,v=c.top+g;_<0?_=0:_+c.width>o.width&&(_=o.width-c.width),v<0?v=0:v+c.height>o.height&&(v=o.height-c.height),m.value={...m.value,left:_,top:v}},document.onmouseup=()=>{t=!1,document.onmousemove=null,document.onmouseup=null,b(),setTimeout(()=>{s.value=!1},0)}},S=(e,t)=>{s.value=!0;let r=!0,o=50/n.width*100,c=50/n.height*100,l=e.pageX,u=e.pageY,d=f.value,p={...m.value},h=m.value.width/m.value.height;document.onmousemove=e=>{if(!r)return;let s=e.pageX,f=e.pageY,g=(s-l)/i.value,_=(f-u)/i.value,v=Math.sqrt(g*g+_*_),y=Math.atan2(_,g)-n.rotate/180*Math.PI,b=v*Math.cos(y)/n.width*100,x=v*Math.sin(y)/n.height*100;a.value&&((t===U.RIGHT_BOTTOM||t===U.LEFT_TOP)&&(x=b/h),(t===U.LEFT_BOTTOM||t===U.RIGHT_TOP)&&(x=-b/h));let S,C,w,T;t===U.LEFT_TOP?(p.left+b<0&&(b=-p.left),p.top+x<0&&(x=-p.top),p.width-b<o&&(b=p.width-o),p.height-x<c&&(x=p.height-c),w=p.width-b,T=p.height-x,S=p.left+b,C=p.top+x):t===U.RIGHT_TOP?(p.left+p.width+b>d.width&&(b=d.width-(p.left+p.width)),p.top+x<0&&(x=-p.top),p.width+b<o&&(b=o-p.width),p.height-x<c&&(x=p.height-c),w=p.width+b,T=p.height-x,S=p.left,C=p.top+x):t===U.LEFT_BOTTOM?(p.left+b<0&&(b=-p.left),p.top+p.height+x>d.height&&(x=d.height-(p.top+p.height)),p.width-b<o&&(b=p.width-o),p.height+x<c&&(x=c-p.height),w=p.width-b,T=p.height+x,S=p.left+b,C=p.top):t===U.RIGHT_BOTTOM?(p.left+p.width+b>d.width&&(b=d.width-(p.left+p.width)),p.top+p.height+x>d.height&&(x=d.height-(p.top+p.height)),p.width+b<o&&(b=o-p.width),p.height+x<c&&(x=c-p.height),w=p.width+b,T=p.height+x,S=p.left,C=p.top):t===U.TOP?(p.top+x<0&&(x=-p.top),p.height-x<c&&(x=p.height-c),w=p.width,T=p.height-x,S=p.left,C=p.top+x):t===U.BOTTOM?(p.top+p.height+x>d.height&&(x=d.height-(p.top+p.height)),p.height+x<c&&(x=c-p.height),w=p.width,T=p.height+x,S=p.left,C=p.top):t===U.LEFT?(p.left+b<0&&(b=-p.left),p.width-b<o&&(b=p.width-o),w=p.width-b,T=p.height,S=p.left+b,C=p.top):(p.left+p.width+b>d.width&&(b=d.width-(p.left+p.width)),p.width+b<o&&(b=o-p.width),T=p.height,w=p.width+b,S=p.left,C=p.top),m.value={left:S,top:C,width:w,height:T}},document.onmouseup=()=>{r=!1,document.onmousemove=null,document.onmouseup=null,b(),setTimeout(()=>s.value=!1,0)}},C=(0,l.computed)(()=>{let e=`rotate-`,t=n.rotate;return t>-22.5&&t<=22.5?e+0:t>22.5&&t<=67.5?e+45:t>67.5&&t<=112.5?e+90:t>112.5&&t<=157.5?e+135:t>157.5||t<=-157.5?e+0:t>-157.5&&t<=-112.5?e+45:t>-112.5&&t<=-67.5?e+90:t>-67.5&&t<=-22.5?e+135:e+0}),w=[U.LEFT_TOP,U.RIGHT_TOP,U.LEFT_BOTTOM,U.RIGHT_BOTTOM],T=[U.TOP,U.BOTTOM,U.LEFT,U.RIGHT];return(t,n)=>{let r=(0,l.resolveDirective)(`click-outside`);return(0,l.withDirectives)(((0,l.openBlock)(),(0,l.createElementBlock)(`div`,{class:`image-clip-handler`,style:(0,l.normalizeStyle)(o.value)},[(0,l.createElementVNode)(`img`,{class:`bottom-img`,src:e.src,draggable:!1,alt:``,style:(0,l.normalizeStyle)(p.value)},null,12,Qi),(0,l.createElementVNode)(`div`,{class:`top-image-content`,style:(0,l.normalizeStyle)({...h.value,clipPath:e.clipPath})},[(0,l.createElementVNode)(`img`,{class:`top-img`,src:e.src,draggable:!1,alt:``,style:(0,l.normalizeStyle)(g.value)},null,12,$i)],4),(0,l.createElementVNode)(`div`,{class:`operate`,style:(0,l.normalizeStyle)(h.value),onMousedown:n[0]||=(0,l.withModifiers)(e=>x(e),[`stop`])},[((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(w,e=>(0,l.createElementVNode)(`div`,{class:(0,l.normalizeClass)([`clip-point`,e,C.value]),key:e,onMousedown:(0,l.withModifiers)(t=>S(t,e),[`stop`])},[...n[1]||=[(0,l.createElementVNode)(`svg`,{width:`16`,height:`16`,fill:`#fff`,stroke:`#333`},[(0,l.createElementVNode)(`path`,{"stroke-width":`0.3`,"shape-rendering":`crispEdges`,d:`M 16 0 L 0 0 L 0 16 L 4 16 L 4 4 L 16 4 L 16 0 Z`})],-1)]],42,ea)),64)),((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(T,e=>(0,l.createElementVNode)(`div`,{class:(0,l.normalizeClass)([`clip-point`,e,C.value]),key:e,onMousedown:(0,l.withModifiers)(t=>S(t,e),[`stop`])},[...n[2]||=[(0,l.createElementVNode)(`svg`,{width:`16`,height:`16`,fill:`#fff`,stroke:`#333`},[(0,l.createElementVNode)(`path`,{"stroke-width":`0.3`,"shape-rendering":`crispEdges`,d:`M 16 0 L 0 0 L 0 4 L 16 4 Z`})],-1)]],42,ta)),64))],36)],4)),[[r,v]])}}},[[`__scopeId`,`data-v-81b5d90a`]]),ra=e=>{let t=(0,l.computed)(()=>e.value?.width??0),n=(0,l.computed)(()=>e.value?.style||`solid`);return{outlineWidth:t,outlineStyle:n,outlineColor:(0,l.computed)(()=>e.value?.color||`#d14424`),strokeDashArray:(0,l.computed)(()=>{let e=t.value;return n.value===`dashed`?e<=6?`${e*4.5} ${e*2}`:`${e*4} ${e*1.5}`:n.value===`dotted`?e<=6?`${e*1.8} ${e*1.6}`:`${e*1.5} ${e*1.2}`:`0 0`})}},ia=[`width`,`height`],aa=[`rx`,`ry`,`width`,`height`,`stroke`,`stroke-width`,`stroke-dasharray`],oa=L({__name:`ImageRectOutline`,props:{width:{type:Number,required:!0},height:{type:Number,required:!0},outline:{type:Object},radius:{type:String,default:`0`}},setup(e){let{outlineWidth:t,outlineColor:n,strokeDashArray:r}=ra((0,l.toRef)(e,`outline`));return(i,a)=>e.outline?((0,l.openBlock)(),(0,l.createElementBlock)(`svg`,{key:0,class:`image-rect-outline`,overflow:`visible`,width:e.width,height:e.height},[(0,l.createElementVNode)(`rect`,{"vector-effect":`non-scaling-stroke`,"stroke-linecap":`butt`,"stroke-miterlimit":`8`,fill:`transparent`,rx:e.radius,ry:e.radius,width:e.width,height:e.height,stroke:(0,l.unref)(n),"stroke-width":(0,l.unref)(t),"stroke-dasharray":(0,l.unref)(r)},null,8,aa)],8,ia)):(0,l.createCommentVNode)(``,!0)}},[[`__scopeId`,`data-v-0f8b574b`]]),sa=[`width`,`height`],ca=[`cx`,`cy`,`rx`,`ry`,`stroke`,`stroke-width`,`stroke-dasharray`],la=L({__name:`ImageEllipseOutline`,props:{width:{type:Number,required:!0},height:{type:Number,required:!0},outline:{type:Object}},setup(e){let{outlineWidth:t,outlineColor:n,strokeDashArray:r}=ra((0,l.toRef)(e,`outline`));return(i,a)=>e.outline?((0,l.openBlock)(),(0,l.createElementBlock)(`svg`,{key:0,class:`image-ellipse-outline`,overflow:`visible`,width:e.width,height:e.height},[(0,l.createElementVNode)(`ellipse`,{"vector-effect":`non-scaling-stroke`,"stroke-linecap":`butt`,"stroke-miterlimit":`8`,fill:`transparent`,cx:e.width/2,cy:e.height/2,rx:e.width/2,ry:e.height/2,stroke:(0,l.unref)(n),"stroke-width":(0,l.unref)(t),"stroke-dasharray":(0,l.unref)(r)},null,8,ca)],8,sa)):(0,l.createCommentVNode)(``,!0)}},[[`__scopeId`,`data-v-bfcecd18`]]),ua=[`width`,`height`],da=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],fa=L({__name:`ImagePolygonOutline`,props:{width:{type:Number,required:!0},height:{type:Number,required:!0},createPath:{type:Function,required:!0},outline:{type:Object}},setup(e){let{outlineWidth:t,outlineColor:n,strokeDashArray:r}=ra((0,l.toRef)(e,`outline`));return(i,a)=>e.outline?((0,l.openBlock)(),(0,l.createElementBlock)(`svg`,{key:0,class:`image-polygon-outline`,overflow:`visible`,width:e.width,height:e.height},[(0,l.createElementVNode)(`path`,{"vector-effect":`non-scaling-stroke`,"stroke-linecap":`butt`,"stroke-miterlimit":`8`,fill:`transparent`,d:e.createPath(e.width,e.height),stroke:(0,l.unref)(n),"stroke-width":(0,l.unref)(t),"stroke-dasharray":(0,l.unref)(r)},null,8,da)],8,ua)):(0,l.createCommentVNode)(``,!0)}},[[`__scopeId`,`data-v-140dc288`]]),pa={class:`image-outline`},ma={__name:`index`,props:{elementInfo:{type:Object,required:!0}},setup(e){let t=e,{clipShape:n}=Xi((0,l.computed)(()=>t.elementInfo));return(t,r)=>((0,l.openBlock)(),(0,l.createElementBlock)(`div`,pa,[(0,l.unref)(n).type===`rect`?((0,l.openBlock)(),(0,l.createBlock)(oa,{key:0,width:e.elementInfo.width,height:e.elementInfo.height,radius:(0,l.unref)(n).radius,outline:e.elementInfo.outline},null,8,[`width`,`height`,`radius`,`outline`])):(0,l.unref)(n).type===`ellipse`?((0,l.openBlock)(),(0,l.createBlock)(la,{key:1,width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,[`width`,`height`,`outline`])):(0,l.unref)(n).type===`polygon`?((0,l.openBlock)(),(0,l.createBlock)(fa,{key:2,width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline,createPath:(0,l.unref)(n).createPath},null,8,[`width`,`height`,`outline`,`createPath`])):(0,l.createCommentVNode)(``,!0)]))}},ha=[`src`],ga=L({__name:`index`,props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function,required:!0}},setup(e){let t=e,n=B(),r=V(),{clipingImageElementId:i}=(0,d.storeToRefs)(n),a=(0,l.computed)(()=>i.value===t.elementInfo.id),{addHistorySnapshot:o}=tn(),{shadowStyle:s}=Gi((0,l.computed)(()=>t.elementInfo.shadow)),{flipStyle:c}=Ki((0,l.computed)(()=>t.elementInfo.flipH),(0,l.computed)(()=>t.elementInfo.flipV)),{clipShape:u,imgPosition:f}=Xi((0,l.computed)(()=>t.elementInfo)),{filter:p}=Zi((0,l.computed)(()=>t.elementInfo.filters)),m=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},h=e=>{if(n.setClipingImageElementId(``),!e)return;let{range:i,position:a}=e,s=t.elementInfo.clip||{shape:`rect`,range:[[0,0],[100,100]]},c=t.elementInfo.left+a.left,l=t.elementInfo.top+a.top,u=t.elementInfo.width+a.width,d=t.elementInfo.height+a.height,f=0,p=0;if(t.elementInfo.rotate){let e=c+u/2-(t.elementInfo.left+t.elementInfo.width/2),n=-(l+d/2-(t.elementInfo.top+t.elementInfo.height/2)),r=-t.elementInfo.rotate*Math.PI/180,i=e*Math.cos(r)-n*Math.sin(r),a=e*Math.sin(r)+n*Math.cos(r);f=i-e,p=-(a-n)}let m={clip:{...s,range:i},left:c+f,top:l+p,width:u,height:d};r.updateElement({id:t.elementInfo.id,props:m}),o()};return(t,n)=>{let r=(0,l.resolveDirective)(`contextmenu`);return(0,l.openBlock)(),(0,l.createElementBlock)(`div`,{class:(0,l.normalizeClass)([`editable-element-image`,{lock:e.elementInfo.lock}]),style:(0,l.normalizeStyle)({top:e.elementInfo.top+`px`,left:e.elementInfo.left+`px`,width:e.elementInfo.width+`px`,height:e.elementInfo.height+`px`})},[(0,l.createElementVNode)(`div`,{class:`rotate-wrapper`,style:(0,l.normalizeStyle)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[a.value?((0,l.openBlock)(),(0,l.createBlock)(na,{key:0,src:e.elementInfo.src,clipData:e.elementInfo.clip,width:e.elementInfo.width,height:e.elementInfo.height,top:e.elementInfo.top,left:e.elementInfo.left,rotate:e.elementInfo.rotate,clipPath:(0,l.unref)(u).style,onClip:n[0]||=e=>h(e)},null,8,[`src`,`clipData`,`width`,`height`,`top`,`left`,`rotate`,`clipPath`])):(0,l.withDirectives)(((0,l.openBlock)(),(0,l.createElementBlock)(`div`,{key:1,class:`element-content`,style:(0,l.normalizeStyle)({filter:(0,l.unref)(s)?`drop-shadow(${(0,l.unref)(s)})`:``,transform:(0,l.unref)(c)}),onMousedown:n[2]||=e=>m(e),onTouchstart:n[3]||=e=>m(e)},[(0,l.createVNode)(ma,{elementInfo:e.elementInfo},null,8,[`elementInfo`]),(0,l.createElementVNode)(`div`,{class:`image-content`,style:(0,l.normalizeStyle)({clipPath:(0,l.unref)(u).style})},[(0,l.createElementVNode)(`img`,{src:e.elementInfo.src,draggable:!1,style:(0,l.normalizeStyle)({top:(0,l.unref)(f).top,left:(0,l.unref)(f).left,width:(0,l.unref)(f).width,height:(0,l.unref)(f).height,filter:(0,l.unref)(p)}),onDragstart:n[1]||=(0,l.withModifiers)(()=>{},[`prevent`]),alt:``},null,44,ha),e.elementInfo.colorMask?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,{key:0,class:`color-mask`,style:(0,l.normalizeStyle)({backgroundColor:e.elementInfo.colorMask})},null,4)):(0,l.createCommentVNode)(``,!0)],4)],36)),[[r,e.contextmenus]])],4)],6)}}},[[`__scopeId`,`data-v-308e6980`]]),_a=[`width`,`height`],va=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],ya=L({__name:`ElementOutline`,props:{width:{type:Number,required:!0},height:{type:Number,required:!0},outline:{type:Object}},setup(e){let{outlineWidth:t,outlineColor:n,strokeDashArray:r}=ra((0,l.toRef)(e,`outline`));return(i,a)=>e.outline?((0,l.openBlock)(),(0,l.createElementBlock)(`svg`,{key:0,class:`element-outline`,overflow:`visible`,width:e.width,height:e.height},[(0,l.createElementVNode)(`path`,{"vector-effect":`non-scaling-stroke`,"stroke-linecap":`butt`,"stroke-miterlimit":`8`,fill:`transparent`,d:`M0,0 L${e.width},0 L${e.width},${e.height} L0,${e.height} Z`,stroke:(0,l.unref)(n),"stroke-width":(0,l.unref)(t),"stroke-dasharray":(0,l.unref)(r)},null,8,va)],8,_a)):(0,l.createCommentVNode)(``,!0)}},[[`__scopeId`,`data-v-a9189103`]]),ba=e=>{let t={},n=(e,n)=>t[e]=n;return n(`Alt-ArrowUp`,p.joinUp),n(`Alt-ArrowDown`,p.joinDown),n(`Mod-z`,A.undo),n(`Mod-y`,A.redo),n(`Backspace`,P.undoInputRule),n(`Escape`,p.selectParentNode),n(`Mod-b`,(0,p.toggleMark)(e.marks.strong)),n(`Mod-i`,(0,p.toggleMark)(e.marks.em)),n(`Mod-u`,(0,p.toggleMark)(e.marks.underline)),n(`Mod-d`,(0,p.toggleMark)(e.marks.strikethrough)),n(`Mod-e`,(0,p.toggleMark)(e.marks.code)),n(`Mod-;`,(0,p.toggleMark)(e.marks.superscript)),n(`Mod-'`,(0,p.toggleMark)(e.marks.subscript)),n(`Enter`,(0,p.chainCommands)((0,N.splitListItem)(e.nodes.list_item),p.newlineInCode,p.createParagraphNear,p.liftEmptyBlock,p.splitBlockKeepMarks)),n(`Mod-[`,(0,N.liftListItem)(e.nodes.list_item)),n(`Mod-]`,(0,N.sinkListItem)(e.nodes.list_item)),n(`Tab`,(0,N.sinkListItem)(e.nodes.list_item)),t},xa=e=>(0,P.wrappingInputRule)(/^\s*>\s$/,e),Sa=e=>(0,P.wrappingInputRule)(/^(\d+)\.\s$/,e,e=>({order:+e[1]}),(e,t)=>t.childCount+t.attrs.order===+e[1]),Ca=e=>(0,P.wrappingInputRule)(/^\s*([-+*])\s$/,e),wa=()=>new P.InputRule(/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,(e,t,n,r)=>{let{schema:i}=e,a=e.tr.insertText(`${t[2]} `,n,r),o=i.marks.code.create();return a.addMark(n,n+t[2].length,o)}),Ta=()=>new P.InputRule(/(?:https?:\/\/)?[\w-]+(?:\.[\w-]+)+\.?(?:\d+)?(?:\/\S*)?$/,(e,t,n,r)=>{let{schema:i}=e,a=e.tr.insertText(t[0],n,r),o=i.marks.link.create({href:t[0],title:t[0]});return a.addMark(n,n+t[0].length,o)}),Ea=e=>{let t=[...P.smartQuotes,P.ellipsis,P.emDash];return t.push(xa(e.nodes.blockquote)),t.push(Sa(e.nodes.ordered_list)),t.push(Ca(e.nodes.bullet_list)),t.push(wa()),t.push(Ta()),(0,P.inputRules)({rules:t})},Da=e=>e.type.name===`paragraph`&&e.nodeSize===2,Oa=e=>new E.Plugin({props:{decorations(t){let{$from:n}=t.selection;if(Da(n.parent)){let r=D.Decoration.node(n.before(),n.after(),{"data-placeholder":e});return D.DecorationSet.create(t.doc,[r])}}}}),ka=(e,t)=>{let n=t?.placeholder,r=[Ea(e),(0,k.keymap)(ba(e)),(0,k.keymap)(p.baseKeymap),(0,j.dropCursor)(),(0,M.gapCursor)(),(0,A.history)()];return n&&r.push(Oa(n)),r},Aa={attrs:{order:{default:1},listStyleType:{default:``},fontsize:{default:``},color:{default:``}},content:`list_item+`,group:`block`,parseDOM:[{tag:`ol`,getAttrs:e=>{let t={order:+((e.hasAttribute(`start`)?e.getAttribute(`start`):1)||1)},{listStyleType:n,fontSize:r,color:i}=e.style;return n&&(t.listStyleType=n),r&&(t.fontsize=r),i&&(t.color=i),t}}],toDOM:e=>{let{order:t,listStyleType:n,fontsize:r,color:i}=e.attrs,a=``;n&&(a+=`list-style-type: ${n};`),r&&(a+=`font-size: ${r};`),i&&(a+=`color: ${i};`);let o={style:a};return t!==1&&(o.start=t),[`ol`,o,0]}},ja={attrs:{listStyleType:{default:``},fontsize:{default:``},color:{default:``}},content:`list_item+`,group:`block`,parseDOM:[{tag:`ul`,getAttrs:e=>{let t={},{listStyleType:n,fontSize:r,color:i}=e.style;return n&&(t.listStyleType=n),r&&(t.fontsize=r),i&&(t.color=i),t}}],toDOM:e=>{let{listStyleType:t,fontsize:n,color:r}=e.attrs,i=``;return t&&(i+=`list-style-type: ${t};`),n&&(i+=`font-size: ${n};`),r&&(i+=`color: ${r};`),[`ul`,{style:i},0]}},Ma={...N.listItem,content:`paragraph block*`,group:`block`},Na={attrs:{align:{default:``},indent:{default:0},textIndent:{default:0}},content:`inline*`,group:`block`,parseDOM:[{tag:`p`,getAttrs:e=>{let{textAlign:t,textIndent:n}=e.style,r=e.getAttribute(`align`)||t||``;r=/(left|right|center|justify)/.test(r)?r:``;let i=0;n&&(/em/.test(n)?i=parseInt(n):/px/.test(n)&&(i=Math.floor(parseInt(n)/16),i||=1));let a=+(e.getAttribute(`data-indent`)||0);return{align:r,indent:a,textIndent:i}}},{tag:`img`,ignore:!0},{tag:`pre`,skip:!0}],toDOM:e=>{let{align:t,indent:n,textIndent:r}=e.attrs,i=``;t&&t!==`left`&&(i+=`text-align: ${t};`),r&&(i+=`text-indent: ${r}em;`);let a={style:i};return n&&(a[`data-indent`]=n),[`p`,a,0]}},{doc:Pa,blockquote:Fa,text:Ia}=ee.nodes,La={doc:Pa,paragraph:Na,blockquote:Fa,text:Ia,ordered_list:Aa,bullet_list:ja,list_item:Ma},Ra={excludes:`subscript`,parseDOM:[{tag:`sub`},{style:`vertical-align`,getAttrs:e=>e===`sub`&&null}],toDOM:()=>[`sub`,0]},za={excludes:`superscript`,parseDOM:[{tag:`sup`},{style:`vertical-align`,getAttrs:e=>e===`super`&&null}],toDOM:()=>[`sup`,0]},Ba={parseDOM:[{tag:`strike`},{style:`text-decoration`,getAttrs:e=>e===`line-through`&&null},{style:`text-decoration-line`,getAttrs:e=>e===`line-through`&&null}],toDOM:()=>[`span`,{style:`text-decoration-line: line-through;`},0]},Va={parseDOM:[{tag:`u`},{style:`text-decoration`,getAttrs:e=>e===`underline`&&null},{style:`text-decoration-line`,getAttrs:e=>e===`underline`&&null}],toDOM:()=>[`span`,{style:`text-decoration: underline;`},0]},Ha={attrs:{color:{}},inline:!0,group:`inline`,parseDOM:[{style:`color`,getAttrs:e=>e?{color:e}:{}}],toDOM:e=>{let{color:t}=e.attrs,n=``;return t&&(n+=`color: ${t};`),[`span`,{style:n},0]}},Ua={attrs:{backcolor:{}},inline:!0,group:`inline`,parseDOM:[{style:`background-color`,getAttrs:e=>e?{backcolor:e}:{}}],toDOM:e=>{let{backcolor:t}=e.attrs,n=``;return t&&(n+=`background-color: ${t};`),[`span`,{style:n},0]}},Wa={attrs:{fontsize:{}},inline:!0,group:`inline`,parseDOM:[{style:`font-size`,getAttrs:e=>e?{fontsize:e}:{}}],toDOM:e=>{let{fontsize:t}=e.attrs,n=``;return t&&(n+=`font-size: ${t};`),[`span`,{style:n},0]}},Ga={attrs:{fontname:{}},inline:!0,group:`inline`,parseDOM:[{style:`font-family`,getAttrs:e=>({fontname:e&&typeof e==`string`?e.replace(/[\"\']/g,``):``})}],toDOM:e=>{let{fontname:t}=e.attrs,n=``;return t&&(n+=`font-family: ${t};`),[`span`,{style:n},0]}},Ka={attrs:{href:{},title:{default:null},target:{default:`_blank`}},inclusive:!1,parseDOM:[{tag:`a[href]`,getAttrs:e=>({href:e.getAttribute(`href`),title:e.getAttribute(`title`)})}],toDOM:e=>[`a`,e.attrs,0]},qa={attrs:{index:{default:null}},parseDOM:[{tag:`mark`,getAttrs:e=>({index:e.dataset.index})}],toDOM:e=>[`mark`,{"data-index":e.attrs.index},0]},{em:Ja,strong:Ya,code:Xa}=ee.marks,Za={em:Ja,strong:Ya,fontsize:Wa,fontname:Ga,code:Xa,forecolor:Ha,backcolor:Ua,subscript:Ra,superscript:za,strikethrough:Ba,underline:Va,link:Ka,mark:qa},Qa=La,$a=Za,eo=new O.Schema({nodes:Qa,marks:$a}),to=e=>{let t=`<div>${e}</div>`,n=new window.DOMParser().parseFromString(t,`text/html`).body.firstElementChild;return O.DOMParser.fromSchema(eo).parse(n)},no=(e,t,n,r)=>new D.EditorView(e,{state:E.EditorState.create({doc:to(t),plugins:ka(eo,r)}),...n}),ro;(function(e){e.RICH_TEXT_COMMAND=`RICH_TEXT_COMMAND`,e.SYNC_RICH_TEXT_ATTRS_TO_STORE=`SYNC_RICH_TEXT_ATTRS_TO_STORE`,e.OPEN_CHART_DATA_EDITOR=`OPEN_CHART_DATA_EDITOR`,e.OPEN_LATEX_EDITOR=`OPEN_LATEX_EDITOR`})(ro||={});var io=(0,te.default)(),ao=(e,t,n)=>{let{selection:r,doc:i}=e;if(!r||!i)return e;let{from:a,to:o}=r,{nodes:s}=t,c=s.blockquote,l=s.list_item,u=s.paragraph,d=[];n||=``;let f=new Set([c,l,u]);return i.nodesBetween(a,o,(e,t)=>{let r=e.type;return(e.attrs.align||``)!==n&&f.has(r)&&d.push({node:e,pos:t,nodeType:r}),!0}),d.length&&d.forEach(t=>{let{node:r,pos:i,nodeType:a}=t,{attrs:o}=r;o=n?{...o,align:n}:{...o,align:null},e=e.setNodeMarkup(i,a,o,r.marks)}),e},oo=(e,t)=>{let{state:n}=e,{schema:r,selection:i}=n,a=ao(n.tr.setSelection(i),r,t);e.dispatch(a)};function so(e,t,n,r){if(!e.doc)return e;let i=e.doc.nodeAt(t);if(!i)return e;let a=(i.attrs[r]||0)+n;if(a<0&&(a=0),a>8&&(a=8),a===i.attrs[r])return e;let o={...i.attrs,[r]:a};return e.setNodeMarkup(t,i.type,o,i.marks)}var co=(e,t,n,r)=>{let{selection:i,doc:a}=e;if(!i||!a||!(i instanceof E.TextSelection||i instanceof E.AllSelection))return e;let{from:o,to:s}=i;return a.nodesBetween(o,s,(i,a)=>{let o=i.type;return o.name===`paragraph`||o.name===`blockquote`?(e=so(e,a,n,r),!1):!se(i,t)}),e},lo=(e,t)=>{let{state:n}=e,{schema:r,selection:i}=n,a=co(n.tr.setSelection(i),r,t,`indent`);return a.docChanged?(e.dispatch(a),!0):!1},uo=(e,t)=>{let{state:n}=e,{schema:r,selection:i}=n,a=co(n.tr.setSelection(i),r,t,`textIndent`);return a.docChanged?(e.dispatch(a),!0):!1},fo=(e,t,n,r={})=>(i,a)=>{let{schema:o,selection:s}=i,{$from:c,$to:l}=s,u=c.blockRange(l);if(!u)return!1;let d=fe(e=>se(e,o))(s);if(u.depth>=1&&d&&u.depth-d.depth<=1){if(d.node.type===e&&!n)return(0,N.liftListItem)(t)(i,a);if(se(d.node,o)&&e.validContent(d.node.content)){let{tr:t}=i,o={...d.node.attrs,...r};return n&&(o.listStyleType=n),t.setNodeMarkup(d.pos,e,o),a&&a(t),!1}}let f={...r};return n&&(f.listStyleType=n),(0,N.wrapInList)(e,f)(i,a)},po=(e,t)=>{let{state:n}=e,{schema:r,selection:i}=n,a=n.tr.setSelection(i),{doc:o}=a;if(!o)return a;let{from:s,to:c}=i;o.nodesBetween(s,c,(e,n)=>{if(se(e,r)&&s-3<=n&&c+3>=n+e.nodeSize){let e=Array.isArray(t)?t:[t];for(let t of e)a.setNodeAttribute(n,t.key,t.value)}return!1}),e.dispatch(a)},mo=(e,t)=>{let{state:n}=e,{schema:r,doc:i}=n,a=[],o=r.nodes.paragraph;if(i.content.size>2){let e=i.resolve(1);a=[...e.marks()],o=e.parent.type}let s=t.split(`
19
19
  `).map(e=>{if(e.trim()===``)return o.create();let t=r.text(e,a);return o.create(null,t)}),c=n.tr;c.replaceWith(0,i.content.size,s),e.dispatch(c)},ho=L({__name:`ProsemirrorEditor`,props:{elementId:{type:String,required:!0},defaultColor:{type:String,required:!0},defaultFontName:{type:String,required:!0},value:{type:String,required:!0},editable:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1}},emits:[`update`,`focus`,`blur`,`mousedown`],setup(e,{expose:t,emit:n}){let r=e,{t:i}=z(),a=n,o=B(),{handleElementId:s,textFormatPainter:c,richTextAttrs:f,activeElementIdList:m}=(0,d.storeToRefs)(o),{ctrlOrShiftKeyActive:h}=(0,d.storeToRefs)(zt()),g=(0,l.useTemplateRef)(`editorViewRef`),_,v=(0,u.debounce)(function(e=!1){r.value.replace(/ style=\"\"/g,``)!==_.dom.innerHTML.replace(/ style=\"\"/g,``)&&a(`update`,{value:_.dom.innerHTML,ignore:e})},300,{trailing:!0}),y=()=>{(!h.value||m.value.length<=1)&&o.setDisableHotkeysState(!0),a(`focus`)},b=()=>{o.setDisableHotkeysState(!1),a(`blur`)},x=(0,u.debounce)(function(){let e=Se(_,{color:r.defaultColor,fontname:r.defaultFontName});o.setRichtextAttrs(e)},30,{trailing:!0}),S=(e,t)=>{let{ctrlKey:n,shiftKey:r,metaKey:i}=t,a=n||r||i,o=t.key.toUpperCase();v(a&&(o===H.Z||o===H.Y)),x()},C=(0,l.computed)(()=>r.value);(0,l.watch)(C,()=>{if(!_||_.hasFocus())return;let{doc:e,tr:t}=_.state;_.dispatch(t.replaceRangeWith(0,e.content.size,to(C.value)))}),(0,l.watch)(()=>r.editable,()=>{_.setProps({editable:()=>r.editable})}),t({focus:()=>_.focus()});let w=({target:e,action:t})=>{if(!e&&s.value!==r.elementId||e&&e!==r.elementId)return;let n=`command`in t?[t]:t;for(let e of n)if(e.command===`fontname`&&e.value!==void 0){let t=_.state.schema.marks.fontname.create({fontname:e.value});ce(_),le(_,t),e.value&&!document.fonts.check(`16px ${e.value}`)&&R.warning(i(`PPT_COMPONENTS.FONT_LOAD_TIP`))}else if(e.command===`fontsize`&&e.value){let t=_.state.schema.marks.fontsize.create({fontsize:e.value});ce(_),le(_,t),po(_,{key:`fontsize`,value:e.value})}else if(e.command===`fontsize-add`){let t=e.value?+e.value:2;ce(_);let n=Ce(_)+t+`px`,r=_.state.schema.marks.fontsize.create({fontsize:n});le(_,r),po(_,{key:`fontsize`,value:n})}else if(e.command===`fontsize-reduce`){let t=e.value?+e.value:2;ce(_);let n=Ce(_)-t;n<12&&(n=12);let r=_.state.schema.marks.fontsize.create({fontsize:n+`px`});le(_,r),po(_,{key:`fontsize`,value:n+`px`})}else if(e.command===`color`&&e.value){let t=_.state.schema.marks.forecolor.create({color:e.value});ce(_),le(_,t),po(_,{key:`color`,value:e.value})}else if(e.command===`backcolor`&&e.value){let t=_.state.schema.marks.backcolor.create({backcolor:e.value});ce(_),le(_,t)}else if(e.command===`bold`)ce(_),(0,p.toggleMark)(_.state.schema.marks.strong)(_.state,_.dispatch);else if(e.command===`em`)ce(_),(0,p.toggleMark)(_.state.schema.marks.em)(_.state,_.dispatch);else if(e.command===`underline`)ce(_),(0,p.toggleMark)(_.state.schema.marks.underline)(_.state,_.dispatch);else if(e.command===`strikethrough`)ce(_),(0,p.toggleMark)(_.state.schema.marks.strikethrough)(_.state,_.dispatch);else if(e.command===`subscript`)(0,p.toggleMark)(_.state.schema.marks.subscript)(_.state,_.dispatch);else if(e.command===`superscript`)(0,p.toggleMark)(_.state.schema.marks.superscript)(_.state,_.dispatch);else if(e.command===`blockquote`)me(`blockquote`,_.state)?(0,p.lift)(_.state,_.dispatch):(0,p.wrapIn)(_.state.schema.nodes.blockquote)(_.state,_.dispatch);else if(e.command===`code`)(0,p.toggleMark)(_.state.schema.marks.code)(_.state,_.dispatch);else if(e.command===`align`&&e.value)oo(_,e.value);else if(e.command===`indent`&&e.value)lo(_,+e.value);else if(e.command===`textIndent`&&e.value)uo(_,+e.value);else if(e.command===`bulletList`){let t=e.value||``,{bullet_list:n,list_item:r}=_.state.schema.nodes;fo(n,r,t,{color:f.value.color,fontsize:f.value.fontsize})(_.state,_.dispatch)}else if(e.command===`orderedList`){let t=e.value||``,{ordered_list:n,list_item:r}=_.state.schema.nodes;fo(n,r,t,{color:f.value.color,fontsize:f.value.fontsize})(_.state,_.dispatch)}else if(e.command===`clear`){ce(_);let{$from:e,$to:t}=_.state.selection;_.dispatch(_.state.tr.removeMark(e.pos,t.pos)),po(_,[{key:`fontsize`,value:``},{key:`color`,value:``}])}else if(e.command===`link`){let t=_.state.schema.marks.link,{from:n,to:r}=_.state.selection,i=I(_.state.doc,n,r,t);if(i)if(e.value){let t=_.state.schema.marks.link.create({href:e.value,title:e.value});le(_,t,{from:i.from.pos,to:i.to.pos+1})}else _.dispatch(_.state.tr.removeMark(i.from.pos,i.to.pos+1,t));else if(ye(_.state,t))if(e.value){let t=_.state.schema.marks.link.create({href:e.value,title:e.value});le(_,t)}else (0,p.toggleMark)(t)(_.state,_.dispatch);else e.value&&(ce(_),(0,p.toggleMark)(t,{href:e.value,title:e.value})(_.state,_.dispatch))}else e.command===`insert`&&e.value?_.dispatch(_.state.tr.insertText(e.value)):e.command===`replace`&&e.value&&mo(_,e.value);_.focus(),v(),x()},T=()=>{if(!c.value)return;let{keep:e,...t}=c.value,n=[{command:`clear`}];for(let e of Object.keys(t)){let t=e,r=c.value[e];r===!0?n.push({command:t}):r&&n.push({command:t,value:r})}w({action:n}),e||o.setTextFormatPainter(null)};(0,l.onMounted)(()=>{_=no(g.value,C.value,{handleDOMEvents:{focus:y,blur:b,keydown:S,click:x,mouseup:T},editable:()=>r.editable}),r.autoFocus&&_.focus()}),(0,l.onUnmounted)(()=>{_&&_.destroy()});let E=()=>{s.value===r.elementId&&x()};return io.on(ro.RICH_TEXT_COMMAND,w),io.on(ro.SYNC_RICH_TEXT_ATTRS_TO_STORE,E),(0,l.onUnmounted)(()=>{io.off(ro.RICH_TEXT_COMMAND,w),io.off(ro.SYNC_RICH_TEXT_ATTRS_TO_STORE,E)}),(e,t)=>((0,l.openBlock)(),(0,l.createElementBlock)(`div`,{class:(0,l.normalizeClass)([`prosemirror-editor`,{"format-painter":(0,l.unref)(c)}]),ref_key:`editorViewRef`,ref:g,onMousedown:t[0]||=e=>a(`mousedown`,e)},null,34))}},[[`__scopeId`,`data-v-f36cff44`]]),go=L({__name:`index`,props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function,required:!0}},setup(e){let t=e,n=B(),r=V(),{handleElementId:i,isScaling:a}=(0,d.storeToRefs)(n),{addHistorySnapshot:o}=tn(),s=(0,l.useTemplateRef)(`elementRef`),{shadowStyle:c}=Gi((0,l.computed)(()=>t.elementInfo.shadow)),f=(e,n=!0)=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo,n))},p=(0,l.ref)(-1),m=(0,l.ref)(-1);(0,l.watch)(a,()=>{i.value===t.elementInfo.id&&(a.value||(!t.elementInfo.vertical&&p.value!==-1&&(r.updateElement({id:t.elementInfo.id,props:{height:p.value}}),p.value=-1),t.elementInfo.vertical&&m.value!==-1&&(r.updateElement({id:t.elementInfo.id,props:{width:m.value}}),m.value=-1)))});let h=new ResizeObserver(e=>{let n=e[0].contentRect;if(!s.value)return;let i=n.height+20,o=n.width+20;!t.elementInfo.vertical&&t.elementInfo.height!==i&&(a.value?p.value=i:r.updateElement({id:t.elementInfo.id,props:{height:i}})),t.elementInfo.vertical&&t.elementInfo.width!==o&&(a.value?m.value=o:r.updateElement({id:t.elementInfo.id,props:{width:o}}))});(0,l.onMounted)(()=>{s.value&&h.observe(s.value)}),(0,l.onUnmounted)(()=>{s.value&&h.unobserve(s.value)});let g=(e,n=!1)=>{r.updateElement({id:t.elementInfo.id,props:{content:e}}),n||o()},_=(0,u.debounce)(function(){t.elementInfo.content.replace(/<[^>]+>/g,``)||r.deleteElement(t.elementInfo.id)},300,{trailing:!0}),v=(0,l.computed)(()=>i.value===t.elementInfo.id);return(0,l.watch)(v,()=>{v.value||_()}),(t,n)=>{let r=(0,l.resolveDirective)(`contextmenu`);return(0,l.openBlock)(),(0,l.createElementBlock)(`div`,{class:(0,l.normalizeClass)([`editable-element-text`,{lock:e.elementInfo.lock}]),style:(0,l.normalizeStyle)({top:e.elementInfo.top+`px`,left:e.elementInfo.left+`px`,width:e.elementInfo.width+`px`,height:e.elementInfo.height+`px`})},[(0,l.createElementVNode)(`div`,{class:`rotate-wrapper`,style:(0,l.normalizeStyle)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,l.withDirectives)(((0,l.openBlock)(),(0,l.createElementBlock)(`div`,{class:`element-content`,ref_key:`elementRef`,ref:s,style:(0,l.normalizeStyle)({width:e.elementInfo.vertical?`auto`:e.elementInfo.width+`px`,height:e.elementInfo.vertical?e.elementInfo.height+`px`:`auto`,backgroundColor:e.elementInfo.fill,opacity:e.elementInfo.opacity,textShadow:(0,l.unref)(c),lineHeight:e.elementInfo.lineHeight,letterSpacing:(e.elementInfo.wordSpace||0)+`px`,color:e.elementInfo.defaultColor,fontFamily:e.elementInfo.defaultFontName,writingMode:e.elementInfo.vertical?`vertical-rl`:`horizontal-tb`}),onMousedown:n[2]||=e=>f(e),onTouchstart:n[3]||=e=>f(e)},[(0,l.createVNode)(ya,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,[`width`,`height`,`outline`]),(0,l.createVNode)(ho,{class:`text`,elementId:e.elementInfo.id,defaultColor:e.elementInfo.defaultColor,defaultFontName:e.elementInfo.defaultFontName,editable:!e.elementInfo.lock,value:e.elementInfo.content,style:(0,l.normalizeStyle)({"--paragraphSpace":`${e.elementInfo.paragraphSpace===void 0?5:e.elementInfo.paragraphSpace}px`}),onUpdate:n[0]||=({value:e,ignore:t})=>g(e,t),onMousedown:n[1]||=e=>f(e,!1)},null,8,[`elementId`,`defaultColor`,`defaultFontName`,`editable`,`value`,`style`]),n[4]||=(0,l.createElementVNode)(`div`,{class:`drag-handler top`},null,-1),n[5]||=(0,l.createElementVNode)(`div`,{class:`drag-handler bottom`},null,-1)],36)),[[r,e.contextmenus]])],4)],6)}}},[[`__scopeId`,`data-v-43e5160d`]]),_o=(e,t)=>({fill:(0,l.computed)(()=>e.value.pattern?`url(#${t}-pattern-${e.value.id})`:e.value.gradient?`url(#${t}-gradient-${e.value.id})`:e.value.fill||`none`)}),vo=[`id`],yo=[`href`],bo={__name:`PatternDefs`,props:{id:{type:String,required:!0},src:{type:String,required:!0}},setup(e){return(t,n)=>((0,l.openBlock)(),(0,l.createElementBlock)(`pattern`,{id:e.id,patternContentUnits:`objectBoundingBox`,patternUnits:`objectBoundingBox`,width:`1`,height:`1`},[(0,l.createElementVNode)(`image`,{href:e.src,width:`1`,height:`1`,preserveAspectRatio:`xMidYMid slice`},null,8,yo)],8,vo))}},xo=[`id`,`gradientTransform`],So=[`offset`,`stop-color`],Co=[`id`],wo=[`offset`,`stop-color`],To={__name:`GradientDefs`,props:{id:{type:String,required:!0},type:{type:Object,required:!0},colors:{type:Array,required:!0},rotate:{type:Number,default:0}},setup(e){return(t,n)=>e.type===`linear`?((0,l.openBlock)(),(0,l.createElementBlock)(`linearGradient`,{key:0,id:e.id,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,gradientTransform:`rotate(${e.rotate},0.5,0.5)`},[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(e.colors,(e,t)=>((0,l.openBlock)(),(0,l.createElementBlock)(`stop`,{key:t,offset:`${e.pos}%`,"stop-color":e.color},null,8,So))),128))],8,xo)):((0,l.openBlock)(),(0,l.createElementBlock)(`radialGradient`,{key:1,id:e.id},[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(e.colors,(e,t)=>((0,l.openBlock)(),(0,l.createElementBlock)(`stop`,{key:t,offset:`${e.pos}%`,"stop-color":e.color},null,8,wo))),128))],8,Co))}},Eo=[`width`,`height`],Do=[`transform`],Oo=[`d`,`fill`,`stroke`,`stroke-width`,`stroke-dasharray`],ko=L({__name:`index`,props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function,required:!0}},setup(e){let t=e,n=B(),r=V(),{theme:i}=(0,d.storeToRefs)(r),{handleElementId:a,shapeFormatPainter:o}=(0,d.storeToRefs)(n),{addHistorySnapshot:s}=tn(),c=(e,n=!0)=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo,n))},u=()=>{if(!o.value)return;let{keep:e,...i}=o.value;r.updateElement({id:t.elementInfo.id,props:i}),s(),e||n.setShapeFormatPainter(null)},{fill:f}=_o((0,l.computed)(()=>t.elementInfo),`editable`),{outlineWidth:p,outlineColor:m,strokeDashArray:h}=ra((0,l.computed)(()=>t.elementInfo.outline)),{shadowStyle:g}=Gi((0,l.computed)(()=>t.elementInfo.shadow)),{flipStyle:_}=Ki((0,l.computed)(()=>t.elementInfo.flipH),(0,l.computed)(()=>t.elementInfo.flipV)),v=(0,l.ref)(!1);(0,l.watch)(a,()=>{a.value!==t.elementInfo.id&&(v.value&&=!1)});let y=(0,l.computed)(()=>{let e={content:``,align:`middle`,defaultFontName:i.value.fontName,defaultColor:i.value.fontColor};return t.elementInfo.text?t.elementInfo.text:e}),b=(e,n=!1)=>{let i={...y.value,content:e};r.updateElement({id:t.elementInfo.id,props:{text:i}}),n||s()},x=()=>{t.elementInfo.text&&(t.elementInfo.text.content.replace(/<[^>]+>/g,``)||(r.removeElementProps({id:t.elementInfo.id,propName:`text`}),s()))},S=(0,l.useTemplateRef)(`prosemirrorEditorRef`),C=()=>{v.value=!0,(0,l.nextTick)(()=>S.value&&S.value.focus())};return(t,n)=>{let r=(0,l.resolveDirective)(`contextmenu`);return(0,l.openBlock)(),(0,l.createElementBlock)(`div`,{class:(0,l.normalizeClass)([`editable-element-shape`,{lock:e.elementInfo.lock,"format-painter":(0,l.unref)(o)}]),style:(0,l.normalizeStyle)({top:e.elementInfo.top+`px`,left:e.elementInfo.left+`px`,width:e.elementInfo.width+`px`,height:e.elementInfo.height+`px`})},[(0,l.createElementVNode)(`div`,{class:`rotate-wrapper`,style:(0,l.normalizeStyle)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,l.withDirectives)(((0,l.openBlock)(),(0,l.createElementBlock)(`div`,{class:`element-content`,style:(0,l.normalizeStyle)({opacity:e.elementInfo.opacity,filter:(0,l.unref)(g)?`drop-shadow(${(0,l.unref)(g)})`:``,transform:(0,l.unref)(_),color:y.value.defaultColor,fontFamily:y.value.defaultFontName}),onMousedown:n[3]||=e=>c(e),onMouseup:n[4]||=e=>u(),onTouchstart:n[5]||=e=>c(e),onDblclick:n[6]||=e=>C()},[((0,l.openBlock)(),(0,l.createElementBlock)(`svg`,{overflow:`visible`,width:e.elementInfo.width,height:e.elementInfo.height},[(0,l.createElementVNode)(`defs`,null,[e.elementInfo.pattern?((0,l.openBlock)(),(0,l.createBlock)(bo,{key:0,id:`editable-pattern-${e.elementInfo.id}`,src:e.elementInfo.pattern},null,8,[`id`,`src`])):e.elementInfo.gradient?((0,l.openBlock)(),(0,l.createBlock)(To,{key:1,id:`editable-gradient-${e.elementInfo.id}`,type:e.elementInfo.gradient.type,colors:e.elementInfo.gradient.colors,rotate:e.elementInfo.gradient.rotate},null,8,[`id`,`type`,`colors`,`rotate`])):(0,l.createCommentVNode)(``,!0)]),(0,l.createElementVNode)(`g`,{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[(0,l.createElementVNode)(`path`,{class:`shape-path`,"vector-effect":`non-scaling-stroke`,"stroke-linecap":`butt`,"stroke-miterlimit":`8`,d:e.elementInfo.path,fill:(0,l.unref)(f),stroke:(0,l.unref)(m),"stroke-width":(0,l.unref)(p),"stroke-dasharray":(0,l.unref)(h)},null,8,Oo)],8,Do)],8,Eo)),(0,l.createElementVNode)(`div`,{class:(0,l.normalizeClass)([`shape-text`,[y.value.align,{editable:v.value||y.value.content}]])},[v.value||y.value.content?((0,l.openBlock)(),(0,l.createBlock)(ho,{key:0,ref_key:`prosemirrorEditorRef`,ref:S,elementId:e.elementInfo.id,defaultColor:y.value.defaultColor,defaultFontName:y.value.defaultFontName,editable:!e.elementInfo.lock,value:y.value.content,onUpdate:n[0]||=({value:e,ignore:t})=>b(e,t),onBlur:n[1]||=e=>x(),onMousedown:n[2]||=e=>c(e,!1)},null,8,[`elementId`,`defaultColor`,`defaultFontName`,`editable`,`value`])):(0,l.createCommentVNode)(``,!0)],2)],36)),[[r,e.contextmenus]])],4)],6)}}},[[`__scopeId`,`data-v-3dd73567`]]),Ao=[`id`,`markerWidth`,`markerHeight`,`refX`,`refY`],jo=[`d`,`fill`,`transform`],Mo={__name:`LinePointMarker`,props:{id:{type:String,required:!0},position:{type:String,required:!0},type:{type:String,required:``},baseSize:{type:Number,required:!0},color:{type:String}},setup(e){let t=e,n={dot:`m0 5a5 5 0 1 0 10 0a5 5 0 1 0 -10 0z`,arrow:`M0,0 L10,5 0,10 Z`},r={"arrow-start":180,"arrow-end":0},i=(0,l.computed)(()=>n[t.type]),a=(0,l.computed)(()=>r[`${t.type}-${t.position}`]||0),o=(0,l.computed)(()=>t.baseSize<2?2:t.baseSize);return(t,n)=>((0,l.openBlock)(),(0,l.createElementBlock)(`marker`,{id:`${e.id}-${e.type}-${e.position}`,markerUnits:`userSpaceOnUse`,orient:`auto`,markerWidth:o.value*3,markerHeight:o.value*3,refX:o.value*1.5,refY:o.value*1.5},[(0,l.createElementVNode)(`path`,{d:i.value,fill:e.color,transform:`scale(${o.value*.3}, ${o.value*.3}) rotate(${a.value}, 5, 5)`},null,8,jo)],8,Ao))}},No=[`width`,`height`],Po=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`,`marker-start`,`marker-end`],Fo=[`d`],Io=L({__name:`index`,props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function,required:!0}},setup(e){let t=e,n=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},{shadowStyle:r}=Gi((0,l.computed)(()=>t.elementInfo.shadow)),i=(0,l.computed)(()=>{let e=Math.abs(t.elementInfo.start[0]-t.elementInfo.end[0]);return e<24?24:e}),a=(0,l.computed)(()=>{let e=Math.abs(t.elementInfo.start[1]-t.elementInfo.end[1]);return e<24?24:e}),o=(0,l.computed)(()=>{let e=t.elementInfo.width;return t.elementInfo.style===`dashed`?e<=8?`${e*5} ${e*2.5}`:`${e*5} ${e*1.5}`:t.elementInfo.style===`dotted`?e<=8?`${e*1.8} ${e*1.6}`:`${e*1.5} ${e*1.2}`:`0 0`}),s=(0,l.computed)(()=>$t(t.elementInfo));return(t,c)=>{let u=(0,l.resolveDirective)(`contextmenu`);return(0,l.openBlock)(),(0,l.createElementBlock)(`div`,{class:(0,l.normalizeClass)([`editable-element-shape`,{lock:e.elementInfo.lock}]),style:(0,l.normalizeStyle)({top:e.elementInfo.top+`px`,left:e.elementInfo.left+`px`})},[(0,l.createElementVNode)(`div`,{class:`element-content`,style:(0,l.normalizeStyle)({filter:(0,l.unref)(r)?`drop-shadow(${(0,l.unref)(r)})`:``}),onMousedown:c[0]||=e=>n(e),onTouchstart:c[1]||=e=>n(e)},[((0,l.openBlock)(),(0,l.createElementBlock)(`svg`,{overflow:`visible`,width:i.value,height:a.value},[(0,l.createElementVNode)(`defs`,null,[e.elementInfo.points[0]?((0,l.openBlock)(),(0,l.createBlock)(Mo,{key:0,id:e.elementInfo.id,position:`start`,type:e.elementInfo.points[0],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,[`id`,`type`,`color`,`baseSize`])):(0,l.createCommentVNode)(``,!0),e.elementInfo.points[1]?((0,l.openBlock)(),(0,l.createBlock)(Mo,{key:1,id:e.elementInfo.id,position:`end`,type:e.elementInfo.points[1],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,[`id`,`type`,`color`,`baseSize`])):(0,l.createCommentVNode)(``,!0)]),(0,l.createElementVNode)(`path`,{class:`line-point`,d:s.value,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.width,"stroke-dasharray":o.value,fill:`none`,"marker-start":e.elementInfo.points[0]?`url(#${e.elementInfo.id}-${e.elementInfo.points[0]}-start)`:``,"marker-end":e.elementInfo.points[1]?`url(#${e.elementInfo.id}-${e.elementInfo.points[1]}-end)`:``},null,8,Po),(0,l.withDirectives)((0,l.createElementVNode)(`path`,{class:`line-path`,d:s.value,stroke:`transparent`,"stroke-width":`20`,fill:`none`},null,8,Fo),[[u,e.contextmenus]])],8,No))],36)],6)}}},[[`__scopeId`,`data-v-e26c4f3e`]]),Lo=({type:e,data:t,themeColors:n,textColor:r,lineColor:i,lineSmooth:a,stack:o})=>{let s=r?{color:r}:{},c=r?{lineStyle:{color:r}}:void 0,l=r?{color:r}:void 0,u=i?{lineStyle:{color:i}}:{},d=t.series.length>1?{top:`bottom`,textStyle:s}:void 0;if(e===`bar`)return{color:n,textStyle:s,legend:d,xAxis:{type:`category`,data:t.labels,axisLine:c,axisLabel:l},yAxis:{type:`value`,axisLine:c,axisLabel:l,splitLine:u},series:t.series.map((e,n)=>{let r={data:e,name:t.legends[n],type:`bar`,label:{show:!0},itemStyle:{borderRadius:[2,2,0,0]}};return o&&(r.stack=`A`),r})};if(e===`column`)return{color:n,textStyle:s,legend:d,yAxis:{type:`category`,data:t.labels,axisLine:c,axisLabel:l},xAxis:{type:`value`,axisLine:c,axisLabel:l,splitLine:u},series:t.series.map((e,n)=>{let r={data:e,name:t.legends[n],type:`bar`,label:{show:!0},itemStyle:{borderRadius:[0,2,2,0]}};return o&&(r.stack=`A`),r})};if(e===`line`)return{color:n,textStyle:s,legend:d,xAxis:{type:`category`,data:t.labels,axisLine:c,axisLabel:l},yAxis:{type:`value`,axisLine:c,axisLabel:l,splitLine:u},series:t.series.map((e,n)=>{let r={data:e,name:t.legends[n],type:`line`,smooth:a,label:{show:!0}};return o&&(r.stack=`A`),r})};if(e===`pie`)return{color:n,textStyle:s,legend:{top:`bottom`,textStyle:s},series:[{data:t.series[0].map((e,n)=>({value:e,name:t.labels[n]})),label:r?{color:r}:{},type:`pie`,radius:`70%`,emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:`rgba(0, 0, 0, 0.5)`},label:{show:!0,fontSize:14,fontWeight:`bold`}}}]};if(e===`ring`)return{color:n,textStyle:s,legend:{top:`bottom`,textStyle:s},series:[{data:t.series[0].map((e,n)=>({value:e,name:t.labels[n]})),label:r?{color:r}:{},type:`pie`,radius:[`40%`,`70%`],padAngle:1,avoidLabelOverlap:!1,itemStyle:{borderRadius:4},emphasis:{label:{show:!0,fontSize:14,fontWeight:`bold`}}}]};if(e===`area`)return{color:n,textStyle:s,legend:d,xAxis:{type:`category`,boundaryGap:!1,data:t.labels,axisLine:c,axisLabel:l},yAxis:{type:`value`,axisLine:c,axisLabel:l,splitLine:u},series:t.series.map((e,n)=>{let r={data:e,name:t.legends[n],type:`line`,areaStyle:{},label:{show:!0}};return o&&(r.stack=`A`),r})};if(e===`radar`)return{color:n,textStyle:s,legend:d,radar:{indicator:t.labels.map(e=>({name:e})),splitLine:u,axisLine:i?{lineStyle:{color:i}}:void 0},series:[{data:t.series.map((e,n)=>({value:e,name:t.legends[n]})),type:`radar`}]};if(e===`scatter`){let e=[];for(let n=0;n<t.series[0].length;n++){let r=t.series[0][n],i=t.series[1]?t.series[1][n]:r;e.push([r,i])}return{color:n,textStyle:s,xAxis:{axisLine:c,axisLabel:l,splitLine:u},yAxis:{axisLine:c,axisLabel:l,splitLine:u},series:[{symbolSize:12,data:e,type:`scatter`}]}}return null},Ro=function(e,t){return Ro=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Ro(e,t)};function G(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);Ro(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var zo=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),Bo=new(function(){function e(){this.browser=new zo,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<`u`}return e}());typeof wx==`object`&&typeof wx.getSystemInfoSync==`function`?(Bo.wxa=!0,Bo.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?Bo.worker=!0:!Bo.hasGlobalWindow||`Deno`in window?(Bo.node=!0,Bo.svgSupported=!0):Vo(navigator.userAgent,Bo);function Vo(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`;var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}var Ho=`12px sans-serif`,Uo=20,Wo=100,Go=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function Ko(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32);t[r]=(e.charCodeAt(n)-Uo)/Wo}return t}var qo=Ko(Go),Jo={createCanvas:function(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){var e,t;return function(n,r){if(!e){var i=Jo.createCanvas();e=i&&i.getContext(`2d`)}if(e)return t!==r&&(t=e.font=r||`12px sans-serif`),e.measureText(n);n||=``,r||=`12px sans-serif`;var a=/((?:\d+)?\.?\d*)px/.exec(r),o=a&&+a[1]||12,s=0;if(r.indexOf(`mono`)>=0)s=o*n.length;else for(var c=0;c<n.length;c++){var l=qo[n[c]];s+=l==null?o:l*o}return{width:s}}})(),loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r}},Yo=gs([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),Xo=gs([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),Zo=Object.prototype.toString,Qo=Array.prototype,$o=Qo.forEach,es=Qo.filter,ts=Qo.slice,ns=Qo.map,rs=function(){}.constructor,is=rs?rs.prototype:null,as=`__proto__`,os=2311;function ss(){return os++}function cs(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];typeof console<`u`&&console.error.apply(console,e)}function ls(e){if(typeof e!=`object`||!e)return e;var t=e,n=Zo.call(e);if(n===`[object Array]`){if(!Bs(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=ls(e[r])}}else if(Xo[n]){if(!Bs(e)){var a=e.constructor;if(a.from)t=a.from(e);else{t=new a(e.length);for(var r=0,i=e.length;r<i;r++)t[r]=e[r]}}}else if(!Yo[n]&&!Bs(e)&&!Os(e))for(var o in t={},e)e.hasOwnProperty(o)&&o!==as&&(t[o]=ls(e[o]));return t}function us(e,t,n){if(!Z(t)||!Z(e))return n?ls(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==as){var i=e[r],a=t[r];Z(a)&&Z(i)&&!Y(a)&&!Y(i)&&!Os(a)&&!Os(i)&&!Es(a)&&!Es(i)&&!Bs(a)&&!Bs(i)?us(i,a,n):(n||!(r in e))&&(e[r]=ls(t[r]))}return e}function K(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==as&&(e[n]=t[n]);return e}function ds(e,t,n){for(var r=ys(t),i=0,a=r.length;i<a;i++){var o=r[i];(n?t[o]!=null:e[o]==null)&&(e[o]=t[o])}return e}Jo.createCanvas;function fs(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function ps(e,t){var n=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}function ms(e,t,n){if(e=`prototype`in e?e.prototype:e,t=`prototype`in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++){var a=r[i];a!==`constructor`&&(n?t[a]!=null:e[a]==null)&&(e[a]=t[a])}else ds(e,t,n)}function hs(e){return!e||typeof e==`string`?!1:typeof e.length==`number`}function q(e,t,n){if(e&&t)if(e.forEach&&e.forEach===$o)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(n,e[a],a,e)}function J(e,t,n){if(!e)return[];if(!t)return Ps(e);if(e.map&&e.map===ns)return e.map(t,n);for(var r=[],i=0,a=e.length;i<a;i++)r.push(t.call(n,e[i],i,e));return r}function gs(e,t,n,r){if(e&&t){for(var i=0,a=e.length;i<a;i++)n=t.call(r,n,e[i],i,e);return n}}function _s(e,t,n){if(!e)return[];if(!t)return Ps(e);if(e.filter&&e.filter===es)return e.filter(t,n);for(var r=[],i=0,a=e.length;i<a;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}function vs(e,t,n){if(e&&t){for(var r=0,i=e.length;r<i;r++)if(t.call(n,e[r],r,e))return e[r]}}function ys(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function bs(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return function(){return e.apply(t,n.concat(ts.call(arguments)))}}var xs=is&&Cs(is.bind)?is.call.bind(is.bind):bs;function Ss(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(ts.call(arguments)))}}function Y(e){return Array.isArray?Array.isArray(e):Zo.call(e)===`[object Array]`}function Cs(e){return typeof e==`function`}function X(e){return typeof e==`string`}function ws(e){return Zo.call(e)===`[object String]`}function Ts(e){return typeof e==`number`}function Z(e){var t=typeof e;return t===`function`||!!e&&t===`object`}function Es(e){return!!Yo[Zo.call(e)]}function Ds(e){return!!Xo[Zo.call(e)]}function Os(e){return typeof e==`object`&&typeof e.nodeType==`number`&&typeof e.ownerDocument==`object`}function ks(e){return e.colorStops!=null}function As(e){return Zo.call(e)===`[object RegExp]`}function js(e){return e!==e}function Ms(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e.length;n<r;n++)if(e[n]!=null)return e[n]}function Q(e,t){return e??t}function Ns(e,t,n){return e??t??n}function Ps(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return ts.apply(e,t)}function Fs(e){if(typeof e==`number`)return[e,e,e,e];var t=e.length;return t===2?[e[0],e[1],e[0],e[1]]:t===3?[e[0],e[1],e[2],e[1]]:e}function Is(e,t){if(!e)throw Error(t)}function Ls(e){return e==null?null:typeof e.trim==`function`?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}var Rs=`__ec_primitive__`;function zs(e){e[Rs]=!0}function Bs(e){return e[Rs]}var Vs=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return ys(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),Hs=typeof Map==`function`;function Us(){return Hs?new Map:new Vs}var Ws=function(){function e(t){var n=Y(t);this.data=Us();var r=this;t instanceof e?t.each(i):t&&q(t,i);function i(e,t){n?r.set(e,t):r.set(t,e)}}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach(function(n,r){e.call(t,n,r)})},e.prototype.keys=function(){var e=this.data.keys();return Hs?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function Gs(e){return new Ws(e)}function Ks(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];for(var i=e.length,r=0;r<t.length;r++)n[r+i]=t[r];return n}function qs(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&K(n,t),n}function Js(e,t){return e.hasOwnProperty(t)}function Ys(){}var Xs=180/Math.PI;function Zs(e,t){return e??=0,t??=0,[e,t]}function Qs(e){return[e[0],e[1]]}function $s(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function ec(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function tc(e){return Math.sqrt(nc(e))}function nc(e){return e[0]*e[0]+e[1]*e[1]}function rc(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function ic(e,t){var n=tc(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function ac(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var oc=ac;function sc(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var cc=sc;function lc(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function uc(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function dc(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function fc(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var pc=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),mc=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new pc(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new pc(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new pc(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new pc(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new pc(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new pc(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),hc=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o<i[e].length;o++)if(i[e][o].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},c=i[e].length-1,l=i[e][c];return l&&l.callAtLast?i[e].splice(c,0,s):i[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var r=[],i=0,a=n[e].length;i<a;i++)n[e][i].h!==t&&r.push(n[e][i]);n[e]=r}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var a=t.length,o=r.length,s=0;s<o;s++){var c=r[s];if(!(i&&i.filter&&c.query!=null&&!i.filter(e,c.query)))switch(a){case 0:c.h.call(c.ctx);break;case 1:c.h.call(c.ctx,t[0]);break;case 2:c.h.call(c.ctx,t[0],t[1]);break;default:c.h.apply(c.ctx,t);break}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var a=t.length,o=t[a-1],s=r.length,c=0;c<s;c++){var l=r[c];if(!(i&&i.filter&&l.query!=null&&!i.filter(e,l.query)))switch(a){case 0:l.h.call(o);break;case 1:l.h.call(o,t[0]);break;case 2:l.h.call(o,t[0],t[1]);break;default:l.h.apply(o,t.slice(1,a-1));break}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e}(),gc=Math.log(2);function _c(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<<s)-1&~i)/gc);return e[n][c]}for(var l=r|1<<n,u=n+1;r&1<<u;)u++;for(var d=0,f=0,p=0;f<s;f++){var m=1<<f;m&i||(d+=(p%2?-1:1)*e[n][f]*_c(e,t-1,u,l,i|m,a),p++)}return a[o]=d,d}function vc(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],r={},i=_c(n,8,0,0,0,r);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]??(a[s]=0),a[s]+=((o+s)%2?-1:1)*_c(n,7,o===0?1:0,1<<o,1<<s,r)/i*t[o];return function(e,t,n){var r=t*a[6]+n*a[7]+1;e[0]=(t*a[0]+n*a[1]+a[2])/r,e[1]=(t*a[3]+n*a[4]+a[5])/r}}}var yc=`___zrEVENTSAVED`;function bc(e,t,n,r,i){if(t.getBoundingClientRect&&Bo.domSupported&&!Cc(t)){var a=t[yc]||(t[yc]={}),o=Sc(xc(t,a),a,i);if(o)return o(e,n,r),!0}return!1}function xc(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=[`left`,`right`],i=[`top`,`bottom`],a=0;a<4;a++){var o=document.createElement(`div`),s=o.style,c=a%2,l=(a>>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return n}function Sc(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?vc(s,o):vc(o,s))}function Cc(e){return e.nodeName.toUpperCase()===`CANVAS`}var wc=/([&<>"'])/g,Tc={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`};function Ec(e){return e==null?``:(e+``).replace(wc,function(e,t){return Tc[t]})}var Dc=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Oc=[],kc=Bo.browser.firefox&&+Bo.browser.version.split(`.`)[0]<39;function Ac(e,t,n,r){return n||={},r?jc(e,t,n):kc&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?jc(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function jc(e,t,n){if(Bo.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(Cc(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}else if(bc(Oc,e,r,i)){n.zrX=Oc[0],n.zrY=Oc[1];return}}n.zrX=n.zrY=0}function Mc(e){return e||window.event}function Nc(e,t,n){if(t=Mc(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&Ac(e,i,t,n)}else{Ac(e,t,t,n);var a=Pc(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&Dc.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function Pc(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=r===0?Math.abs(n):Math.abs(r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function Fc(e,t,n,r){e.addEventListener(t,n,r)}function Ic(e,t,n,r){e.removeEventListener(t,n,r)}var Lc=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0},Rc=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a<o;a++){var s=r[a],c=Ac(n,s,{});i.points.push([c.zrX,c.zrY]),i.touches.push(s)}this._track.push(i)}},e.prototype._recognize=function(e){for(var t in Vc)if(Vc.hasOwnProperty(t)){var n=Vc[t](this._track,e);if(n)return n}},e}();function zc(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function Bc(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var Vc={pinch:function(e,t){var n=e.length;if(n){var r=(e[n-1]||{}).points,i=(e[n-2]||{}).points||r;if(i&&i.length>1&&r&&r.length>1){var a=zc(r)/zc(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=Bc(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}};function Hc(){return[1,0,0,1,0,0]}function Uc(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function Wc(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function Gc(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],c=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=c,e}function Kc(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function qc(e,t,n,r){r===void 0&&(r=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],c=t[3],l=t[5],u=Math.sin(n),d=Math.cos(n);return e[0]=i*d+s*u,e[1]=-i*u+s*d,e[2]=a*d+c*u,e[3]=-a*u+d*c,e[4]=d*(o-r[0])+u*(l-r[1])+r[0],e[5]=d*(l-r[1])-u*(o-r[0])+r[1],e}function Jc(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}function Yc(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],c=n*o-a*r;return c?(c=1/c,e[0]=o*c,e[1]=-a*c,e[2]=-r*c,e[3]=n*c,e[4]=(r*s-o*i)*c,e[5]=(a*i-n*s)*c,e):null}var Xc=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}(),Zc=Math.min,Qc=Math.max,$c=new Xc,el=new Xc,tl=new Xc,nl=new Xc,rl=new Xc,il=new Xc,al=function(){function e(e,t,n,r){n<0&&(e+=n,n=-n),r<0&&(t+=r,r=-r),this.x=e,this.y=t,this.width=n,this.height=r}return e.prototype.union=function(e){var t=Zc(e.x,this.x),n=Zc(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Qc(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Qc(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,r=e.height/t.height,i=Hc();return Kc(i,i,[-t.x,-t.y]),Jc(i,i,[n,r]),Kc(i,i,[e.x,e.y]),i},e.prototype.intersect=function(t,n){if(!t)return!1;t instanceof e||(t=e.create(t));var r=this,i=r.x,a=r.x+r.width,o=r.y,s=r.y+r.height,c=t.x,l=t.x+t.width,u=t.y,d=t.y+t.height,f=!(a<c||l<i||s<u||d<o);if(n){var p=1/0,m=0,h=Math.abs(a-c),g=Math.abs(l-i),_=Math.abs(s-u),v=Math.abs(d-o),y=Math.min(h,g),b=Math.min(_,v);a<c||l<i?y>m&&(m=y,h<g?Xc.set(il,-h,0):Xc.set(il,g,0)):y<p&&(p=y,h<g?Xc.set(rl,h,0):Xc.set(rl,-g,0)),s<u||d<o?b>m&&(m=b,_<v?Xc.set(il,0,-_):Xc.set(il,0,v)):y<p&&(p=y,_<v?Xc.set(rl,0,_):Xc.set(rl,0,-v))}return n&&Xc.copy(n,f?rl:il),f},e.prototype.contain=function(e,t){var n=this;return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},e.applyTransform=function(t,n,r){if(!r){t!==n&&e.copy(t,n);return}if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var i=r[0],a=r[3],o=r[4],s=r[5];t.x=n.x*i+o,t.y=n.y*a+s,t.width=n.width*i,t.height=n.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}$c.x=tl.x=n.x,$c.y=nl.y=n.y,el.x=nl.x=n.x+n.width,el.y=tl.y=n.y+n.height,$c.transform(r),nl.transform(r),el.transform(r),tl.transform(r),t.x=Zc($c.x,el.x,tl.x,nl.x),t.y=Zc($c.y,el.y,tl.y,nl.y);var c=Qc($c.x,el.x,tl.x,nl.x),l=Qc($c.y,el.y,tl.y,nl.y);t.width=c-t.x,t.height=l-t.y},e}(),ol=`silent`;function sl(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:cl}}function cl(){Lc(this.event)}var ll=function(e){G(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(hc),ul=function(){function e(e,t){this.x=e,this.y=t}return e}(),dl=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],fl=new al(0,0,0,0),pl=function(e){G(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new ul(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new ll,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new mc(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(q(dl,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=gl(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new ul(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new ul(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=sl(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new ul(e,t);if(hl(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new al(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(fl.copy(u.getBoundingRect()),u.transform&&fl.applyTransform(u.transform),fl.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m<s;m+=d)for(var h=0;h<p;h+=f)if(hl(a,i,e+m*Math.cos(h),t+m*Math.sin(h),n),i.target)return i}}return i},t.prototype.processGesture=function(e,t){this._gestureMgr||=new Rc;var n=this._gestureMgr;t===`start`&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(t===`end`&&n.clear(),r){var i=r.type;e.gestureEvent=i;var a=new ul;a.target=r.target,this.dispatchToElement(a,i,r.event)}},t}(hc);q([`click`,`mousedown`,`mouseup`,`mousewheel`,`dblclick`,`contextmenu`],function(e){pl.prototype[e]=function(t){var n=t.zrX,r=t.zrY,i=gl(this,n,r),a,o;if((e!==`mouseup`||!i)&&(a=this.findHover(n,r),o=a.target),e===`mousedown`)this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(e===`mouseup`)this._upEl=o;else if(e===`click`){if(this._downEl!==this._upEl||!this._downPoint||oc(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function ml(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0),r=r.__hostTarget||r.parent}return i?ol:!0}return!1}function hl(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=ml(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==ol)){t.target=o;break}}}function gl(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var _l=32,vl=7;function yl(e){for(var t=0;e>=_l;)t|=e&1,e>>=1;return e+t}function bl(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i<n&&r(e[i],e[i-1])<0;)i++;xl(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function xl(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function Sl(e,t,n,r,i){for(r===t&&r++;r<n;r++){for(var a=e[r],o=t,s=r,c;o<s;)c=o+s>>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function Cl(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c<s&&a(e,t[n+i+c])>0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;c<s&&a(e,t[n+i-c])<=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function wl(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;c<s&&a(e,t[n+i-c])<0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c<s&&a(e,t[n+i+c])>=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function Tl(e,t){var n=vl,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]<i[e+1]&&e--;else if(i[e]>i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]<i[e+1]&&e--,u(e)}}function u(n){var o=r[n],s=i[n],c=r[n+1],l=i[n+1];i[n]=s+l,n===a-3&&(r[n+1]=r[n+2],i[n+1]=i[n+2]),a--;var u=wl(e[c],e,o,s,0,t);o+=u,s-=u,s!==0&&(l=Cl(e[o+s-1],e,c,l,l-1,t),l!==0&&(s<=l?d(o,s,c,l):f(o,s,c,l)))}function d(r,i,a,s){var c=0;for(c=0;c<i;c++)o[c]=e[r+c];var l=0,u=a,d=r;if(e[d++]=e[u++],--s===0){for(c=0;c<i;c++)e[d+c]=o[l+c];return}if(i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l];return}for(var f=n,p,m,h;;){p=0,m=0,h=!1;do if(t(e[u],o[l])<0){if(e[d++]=e[u++],m++,p=0,--s===0){h=!0;break}}else if(e[d++]=o[l++],p++,m=0,--i===1){h=!0;break}while((p|m)<f);if(h)break;do{if(p=wl(e[u],o,l,i,0,t),p!==0){for(c=0;c<p;c++)e[d+c]=o[l+c];if(d+=p,l+=p,i-=p,i<=1){h=!0;break}}if(e[d++]=e[u++],--s===0){h=!0;break}if(m=Cl(o[l],e,u,s,0,t),m!==0){for(c=0;c<m;c++)e[d+c]=e[u+c];if(d+=m,u+=m,s-=m,s===0){h=!0;break}}if(e[d++]=o[l++],--i===1){h=!0;break}f--}while(p>=vl||m>=vl);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l]}else if(i===0)throw Error();else for(c=0;c<i;c++)e[d+c]=o[l+c]}function f(r,i,a,s){var c=0;for(c=0;c<s;c++)o[c]=e[a+c];var l=r+i-1,u=s-1,d=a+s-1,f=0,p=0;if(e[d--]=e[l--],--i===0){for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c];return}if(s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)<m);if(_)break;do{if(h=i-wl(o[u],e,r,i,i-1,t),h!==0){for(d-=h,l-=h,i-=h,p=d+1,f=l+1,c=h-1;c>=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-Cl(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c<g;c++)e[p+c]=o[f+c];if(s<=1){_=!0;break}}if(e[d--]=e[l--],--i===0){_=!0;break}m--}while(h>=vl||g>=vl);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c]}return{mergeRuns:c,forceMergeRuns:l,pushRun:s}}function El(e,t,n,r){n||=0,r||=e.length;var i=r-n;if(!(i<2)){var a=0;if(i<_l){a=bl(e,n,r,t),Sl(e,n,r,n+a,t);return}var o=Tl(e,t),s=yl(i);do{if(a=bl(e,n,r,t),a<s){var c=i;c>s&&(c=s),Sl(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var Dl=!1;function Ol(){Dl||(Dl=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function kl(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Al=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=kl}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t||=!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,i=t.length;r<i;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,El(n,kl)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!(e.ignore&&!n)){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath();if(e.ignoreClip)t=null;else if(r){t=t?t.slice():[];for(var i=r,a=e;i;)i.parent=a,i.updateTransform(),t.push(i),a=i,i=i.getClipPath()}if(e.childrenRef){for(var o=e.childrenRef(),s=0;s<o.length;s++){var c=o[s];e.__dirty&&(c.__dirty|=1),this._updateAndAddDisplayable(c,t,n)}e.__dirty=0}else{var l=e;t&&t.length?l.__clipPaths=t:l.__clipPaths&&l.__clipPaths.length>0&&(l.__clipPaths=[]),isNaN(l.z)&&(Ol(),l.z=0),isNaN(l.z2)&&(Ol(),l.z2=0),isNaN(l.zlevel)&&(Ol(),l.zlevel=0),this._displayList[this._displayListLen++]=l}var u=e.getDecalElement&&e.getDecalElement();u&&this._updateAndAddDisplayable(u,t,n);var d=e.getTextGuideLine();d&&this._updateAndAddDisplayable(d,t,n);var f=e.getTextContent();f&&this._updateAndAddDisplayable(f,t,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);return}var r=fs(this._roots,e);r>=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),jl=Bo.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)},Ml={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=1.70158*1.525;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Ml.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Ml.bounceIn(e*2)*.5:Ml.bounceOut(e*2-1)*.5+.5}},Nl=Math.pow,Pl=Math.sqrt,Fl=1e-8,Il=1e-4,Ll=Pl(3),Rl=1/3,zl=Zs(),Bl=Zs(),Vl=Zs();function Hl(e){return e>-Fl&&e<Fl}function Ul(e){return e>Fl||e<-Fl}function Wl(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function Gl(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function Kl(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(Hl(u)&&Hl(d))if(Hl(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}else{var h=d*d-4*u*f;if(Hl(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=Pl(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-Nl(-y,Rl):Nl(y,Rl),b=b<0?-Nl(-b,Rl):Nl(b,Rl);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*Pl(u*u*u)),S=Math.acos(x)/3,C=Pl(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+Ll*Math.sin(S)))/(3*o),T=(-s+C*(w-Ll*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function ql(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(Hl(o)){if(Ul(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(Hl(u))i[0]=-a/(2*o);else if(u>0){var d=Pl(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function Jl(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function Yl(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;zl[0]=c,zl[1]=l;for(var v=0;v<1;v+=.05)Bl[0]=Wl(e,n,i,o,v),Bl[1]=Wl(t,r,a,s,v),g=cc(zl,Bl),g<p&&(d=v,p=g);p=1/0;for(var y=0;y<32&&!(f<Il);y++)m=d-f,h=d+f,Bl[0]=Wl(e,n,i,o,m),Bl[1]=Wl(t,r,a,s,m),g=cc(Bl,zl),m>=0&&g<p?(d=m,p=g):(Vl[0]=Wl(e,n,i,o,h),Vl[1]=Wl(t,r,a,s,h),_=cc(Vl,zl),h<=1&&_<p?(d=h,p=_):f*=.5);return u&&(u[0]=Wl(e,n,i,o,d),u[1]=Wl(t,r,a,s,d)),Pl(p)}function Xl(e,t,n,r,i,a,o,s,c){for(var l=e,u=t,d=0,f=1/c,p=1;p<=c;p++){var m=p*f,h=Wl(e,n,i,o,m),g=Wl(t,r,a,s,m),_=h-l,v=g-u;d+=Math.sqrt(_*_+v*v),l=h,u=g}return d}function Zl(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function Ql(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function $l(e,t,n,r,i){var a=e-2*t+n,o=2*(t-e),s=e-r,c=0;if(Hl(a)){if(Ul(o)){var l=-s/o;l>=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(Hl(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=Pl(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function eu(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function tu(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function nu(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;zl[0]=o,zl[1]=s;for(var f=0;f<1;f+=.05){Bl[0]=Zl(e,n,i,f),Bl[1]=Zl(t,r,a,f);var p=cc(zl,Bl);p<d&&(l=f,d=p)}d=1/0;for(var m=0;m<32&&!(u<Il);m++){var h=l-u,g=l+u;Bl[0]=Zl(e,n,i,h),Bl[1]=Zl(t,r,a,h);var p=cc(Bl,zl);if(h>=0&&p<d)l=h,d=p;else{Vl[0]=Zl(e,n,i,g),Vl[1]=Zl(t,r,a,g);var _=cc(Vl,zl);g<=1&&_<d?(l=g,d=_):u*=.5}}return c&&(c[0]=Zl(e,n,i,l),c[1]=Zl(t,r,a,l)),Pl(d)}function ru(e,t,n,r,i,a,o){for(var s=e,c=t,l=0,u=1/o,d=1;d<=o;d++){var f=d*u,p=Zl(e,n,i,f),m=Zl(t,r,a,f),h=p-s,g=m-c;l+=Math.sqrt(h*h+g*g),s=p,c=m}return l}var iu=/cubic-bezier\(([0-9,\.e ]+)\)/;function au(e){var t=e&&iu.exec(e);if(t){var n=t[1].split(`,`),r=+Ls(n[0]),i=+Ls(n[1]),a=+Ls(n[2]),o=+Ls(n[3]);if(isNaN(r+i+a+o))return;var s=[];return function(e){return e<=0?0:e>=1?1:Kl(0,r,a,1,e,s)&&Wl(0,i,o,1,s[0])}}}var ou=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Ys,this.ondestroy=e.ondestroy||Ys,this.onrestart=e.onrestart||Ys,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1)if(this.loop)this._startTime=e-r%n,this._pausedTime=0,this.onrestart();else return!0;return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=Cs(e)?e:Ml[e]||au(e)},e}(),su=function(){function e(e){this.value=e}return e}(),cu=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new su(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),lu=function(){function e(e){this._list=new cu,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new su(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),uu={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function du(e){return e=Math.round(e),e<0?0:e>255?255:e}function fu(e){return e<0?0:e>1?1:e}function pu(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?du(parseFloat(t)/100*255):du(parseInt(t,10))}function mu(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?fu(parseFloat(t)/100):fu(parseFloat(t))}function hu(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function gu(e,t,n){return e+(t-e)*n}function _u(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function vu(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var yu=new lu(20),bu=null;function xu(e,t){bu&&vu(bu,t),bu=yu.put(e,bu||t.slice())}function Su(e,t){if(e){t||=[];var n=yu.get(e);if(n)return vu(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in uu)return vu(t,uu[r]),xu(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){_u(t,0,0,0,1);return}return _u(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),xu(e,t),t}else if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){_u(t,0,0,0,1);return}return _u(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),xu(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?_u(t,+l[0],+l[1],+l[2],1):_u(t,0,0,0,1);u=mu(l.pop());case`rgb`:if(l.length>=3)return _u(t,pu(l[0]),pu(l[1]),pu(l[2]),l.length===3?u:mu(l[3])),xu(e,t),t;_u(t,0,0,0,1);return;case`hsla`:if(l.length!==4){_u(t,0,0,0,1);return}return l[3]=mu(l[3]),Cu(l,t),xu(e,t),t;case`hsl`:if(l.length!==3){_u(t,0,0,0,1);return}return Cu(l,t),xu(e,t),t;default:return}}_u(t,0,0,0,1)}}function Cu(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=mu(e[1]),i=mu(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],_u(t,du(hu(o,a,n+1/3)*255),du(hu(o,a,n)*255),du(hu(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function wu(e,t){var n=Su(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return Eu(n,n.length===4?`rgba`:`rgb`)}}function Tu(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=Su(t[i]),s=Su(t[a]),c=r-i,l=Eu([du(gu(o[0],s[0],c)),du(gu(o[1],s[1],c)),du(gu(o[2],s[2],c)),fu(gu(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function Eu(e,t){if(!(!e||!e.length)){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function Du(e,t){var n=Su(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var Ou=new lu(100);function ku(e){if(X(e)){var t=Ou.get(e);return t||(t=wu(e,-.1),Ou.put(e,t)),t}else if(ks(e)){var n=K({},e);return n.colorStops=J(e.colorStops,function(e){return{offset:e.offset,color:wu(e.color,-.1)}}),n}return e}var Au=Math.round;function ju(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=Su(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}var Mu=1e-4;function Nu(e){return e<Mu&&e>-Mu}function Pu(e){return Au(e*1e3)/1e3}function Fu(e){return Au(e*1e4)/1e4}function Iu(e){return`matrix(`+Pu(e[0])+`,`+Pu(e[1])+`,`+Pu(e[2])+`,`+Pu(e[3])+`,`+Fu(e[4])+`,`+Fu(e[5])+`)`}var Lu={left:`start`,right:`end`,center:`middle`,middle:`middle`};function Ru(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function zu(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function Bu(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(`,`)}function Vu(e){return e&&!!e.image}function Hu(e){return e&&!!e.svgElement}function Uu(e){return Vu(e)||Hu(e)}function Wu(e){return e.type===`linear`}function Gu(e){return e.type===`radial`}function Ku(e){return e&&(e.type===`linear`||e.type===`radial`)}function qu(e){return`url(#`+e+`)`}function Ju(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function Yu(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*Xs,i=Q(e.scaleX,1),a=Q(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,c=[];return(t||n)&&c.push(`translate(`+t+`px,`+n+`px)`),r&&c.push(`rotate(`+r+`)`),(i!==1||a!==1)&&c.push(`scale(`+i+`,`+a+`)`),(o||s)&&c.push(`skew(`+Au(o*Xs)+`deg, `+Au(s*Xs)+`deg)`),c.join(` `)}var Xu=(function(){return Bo.hasGlobalWindow&&Cs(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:typeof Buffer<`u`?function(e){return Buffer.from(e).toString(`base64`)}:function(e){return process.env.NODE_ENV!==`production`&&cs(`Base64 isn't natively supported in the current environment.`),null}})(),Zu=Array.prototype.slice;function Qu(e,t,n){return(t-e)*n+e}function $u(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=Qu(t[a],n[a],r);return e}function ed(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=Qu(t[o][s],n[o][s],r)}return e}function td(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+n[a]*r;return e}function nd(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=t[o][s]+n[o][s]*r}return e}function rd(e,t){for(var n=e.length,r=t.length,i=n>r?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(n,r);s++)i.push({offset:o.offset,color:o.color.slice()})}function id(e,t,n){var r=e,i=t;if(!(!r.push||!i.push)){var a=r.length,o=i.length;if(a!==o)if(a>o)r.length=o;else for(var s=a;s<o;s++)r.push(n===1?i[s]:Zu.call(i[s]));for(var c=r[0]&&r[0].length,s=0;s<r.length;s++)if(n===1)isNaN(r[s])&&(r[s]=i[s]);else for(var l=0;l<c;l++)isNaN(r[s][l])&&(r[s][l]=i[s][l])}}function ad(e){if(hs(e)){var t=e.length;if(hs(e[0])){for(var n=[],r=0;r<t;r++)n.push(Zu.call(e[r]));return n}return Zu.call(e)}return e}function od(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=e[3]==null?1:e[3],`rgba(`+e.join(`,`)+`)`}function sd(e){return hs(e&&e[0])?2:1}var cd=0,ld=1,ud=2,dd=3,fd=4,pd=5,md=6;function hd(e){return e===fd||e===pd}function gd(e){return e===ld||e===ud}var _d=[0,0,0,0],vd=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=md,s=t;if(hs(t)){var c=sd(t);o=c,(c===1&&!Ts(t[0])||c===2&&!Ts(t[0][0]))&&(a=!0)}else if(Ts(t)&&!js(t))o=cd;else if(X(t))if(!isNaN(+t))o=cd;else{var l=Su(t);l&&(s=l,o=dd)}else if(ks(t)){var u=K({},s);u.colorStops=J(t.colorStops,function(e){return{offset:e.offset,color:Su(e.color)}}),Wu(t)?o=fd:Gu(t)&&(o=pd),s=u}i===0?this.valType=o:(o!==this.valType||o===md)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=Cs(n)?n:Ml[n]||au(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=gd(r),c=hd(r),l=0;l<i;l++){var u=n[l],d=u.value,f=a.value;u.percent=u.time/e,o||(s&&l!==i-1?id(d,f,r):c&&rd(d.colorStops,f.colorStops))}if(!o&&r!==pd&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;for(var p=n[0].value,l=0;l<i;l++)r===cd?n[l].additiveValue=n[l].value-p:r===dd?n[l].additiveValue=td([],n[l].value,p,-1):gd(r)&&(n[l].additiveValue=r===ld?td([],n[l].value,p,-1):nd([],n[l].value,p,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,r=n?`additiveValue`:`value`,i=this.valType,a=this.keyframes,o=a.length,s=this.propName,c=i===dd,l,u=this._lastFr,d=Math.min,f,p;if(o===1)f=p=a[0];else{if(t<0)l=0;else if(t<this._lastFrP){for(l=d(u+1,o-1);l>=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;l<o&&!(a[l].percent>t);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?_d:e[s];if((gd(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(gd(i))i===ld?$u(g,f[r],p[r],h):ed(g,f[r],p[r],h);else if(hd(i)){var _=f[r],v=p[r],y=i===fd;e[s]={type:y?`linear`:`radial`,x:Qu(_.x,v.x,h),y:Qu(_.y,v.y,h),colorStops:J(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:Qu(e.offset,n.offset,h),color:od($u([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=Qu(_.x2,v.x2,h),e[s].y2=Qu(_.y2,v.y2,h)):e[s].r=Qu(_.r,v.r,h)}else if(c)$u(g,f[r],p[r],h),n||(e[s]=od(g));else{var b=Qu(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===cd?e[n]=e[n]+r:t===dd?(Su(e[n],_d),td(_d,_d,r,1),e[n]=od(_d)):t===ld?td(e[n],e[n],r,1):t===ud&&nd(e[n],e[n],r,1)},e}(),yd=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){cs(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,ys(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a<n.length;a++){var o=n[a],s=i[o];if(!s){s=i[o]=new vd(o);var c=void 0,l=this._getAdditiveTrack(o);if(l){var u=l.keyframes,d=u[u.length-1];c=d&&d.value,l.valType===dd&&c&&(c=od(c))}else c=this._target[o];if(c==null)continue;e>0&&s.addKeyframe(0,ad(c),r),this._trackKeys.push(o)}s.addKeyframe(e,ad(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var r=0;r<n.length;r++){var i=n[r].getTrack(e);i&&(t=i)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var a=this._trackKeys[i],o=this._tracks[a],s=this._getAdditiveTrack(a),c=o.keyframes,l=c.length;if(o.prepare(r,s),o.needsAnimate())if(!this._allowDiscrete&&o.discrete){var u=c[l-1];u&&(t._target[o.propName]=u.rawValue),o.setFinished()}else n.push(o)}if(n.length||this._force){var d=new ou({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var i=!1,a=0;a<r.length;a++)if(r[a]._clip){i=!0;break}i||(t._additiveAnimators=null)}for(var a=0;a<n.length;a++)n[a].step(t._target,e);var o=t._onframeCbs;if(o)for(var a=0;a<o.length;a++)o[a](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||=[],this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||=[],this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||=[],this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return J(this._trackKeys,function(t){return e._tracks[t]})},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,i=0;i<e.length;i++){var a=n[e[i]];a&&!a.isFinished()&&(t?a.step(this._target,1):this._started===1&&a.step(this._target,0),a.setFinished())}for(var o=!0,i=0;i<r.length;i++)if(!n[r[i]].isFinished()){o=!1;break}return o&&this._abortedCallback(),o},e.prototype.saveTo=function(e,t,n){if(e){t||=this._trackKeys;for(var r=0;r<t.length;r++){var i=t[r],a=this._tracks[i];if(!(!a||a.isFinished())){var o=a.keyframes,s=o[n?0:o.length-1];s&&(e[i]=ad(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t||=ys(e);for(var n=0;n<t.length;n++){var r=t[n],i=this._tracks[r];if(i){var a=i.keyframes;if(a.length>1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}();function bd(){return new Date().getTime()}var xd=function(e){G(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=bd()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(jl(t),!e._paused&&e.update())}jl(t)},t.prototype.start=function(){this._running||(this._time=bd(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=bd(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=bd()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new yd(e,t.loop);return this.addAnimator(n),n},t}(hc),Sd=300,Cd=Bo.domSupported,wd=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:J(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),Td={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},Ed=!1;function Dd(e){var t=e.pointerType;return t===`pen`||t===`touch`}function Od(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function kd(e){e&&(e.zrByTouch=!0)}function Ad(e,t){return Nc(e.dom,new Md(e,t),!0)}function jd(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var Md=function(){function e(e,t){this.stopPropagation=Ys,this.stopImmediatePropagation=Ys,this.preventDefault=Ys,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),Nd={mousedown:function(e){e=Nc(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=Nc(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=Nc(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=Nc(this.dom,e);var t=e.toElement||e.relatedTarget;jd(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){Ed=!0,e=Nc(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){Ed||(e=Nc(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=Nc(this.dom,e),kd(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),Nd.mousemove.call(this,e),Nd.mousedown.call(this,e)},touchmove:function(e){e=Nc(this.dom,e),kd(e),this.handler.processGesture(e,`change`),Nd.mousemove.call(this,e)},touchend:function(e){e=Nc(this.dom,e),kd(e),this.handler.processGesture(e,`end`),Nd.mouseup.call(this,e),new Date-+this.__lastTouchMoment<Sd&&Nd.click.call(this,e)},pointerdown:function(e){Nd.mousedown.call(this,e)},pointermove:function(e){Dd(e)||Nd.mousemove.call(this,e)},pointerup:function(e){Nd.mouseup.call(this,e)},pointerout:function(e){Dd(e)||Nd.mouseout.call(this,e)}};q([`click`,`dblclick`,`contextmenu`],function(e){Nd[e]=function(t){t=Nc(this.dom,t),this.trigger(e,t)}});var Pd={pointermove:function(e){Dd(e)||Pd.mousemove.call(this,e)},pointerup:function(e){Pd.mouseup.call(this,e)},mousemove:function(e){this.trigger(`mousemove`,e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger(`mouseup`,e),t&&(e.zrEventControl=`only_globalout`,this.trigger(`mouseout`,e))}};function Fd(e,t){var n=t.domHandlers;Bo.pointerEventsSupported?q(wd.pointer,function(r){Ld(t,r,function(t){n[r].call(e,t)})}):(Bo.touchEventsSupported&&q(wd.touch,function(r){Ld(t,r,function(i){n[r].call(e,i),Od(t)})}),q(wd.mouse,function(r){Ld(t,r,function(i){i=Mc(i),t.touching||n[r].call(e,i)})}))}function Id(e,t){Bo.pointerEventsSupported?q(Td.pointer,n):Bo.touchEventsSupported||q(Td.mouse,n);function n(n){function r(r){r=Mc(r),jd(e,r.target)||(r=Ad(e,r),t.domHandlers[n].call(e,r))}Ld(t,n,r,{capture:!0})}}function Ld(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,Fc(e.domTarget,t,n,r)}function Rd(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&Ic(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var zd=function(){function e(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return e}(),Bd=function(e){G(t,e);function t(t,n){var r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new zd(t,Nd),Cd&&(r._globalHandlerScope=new zd(document,Pd)),Fd(r,r._localHandlerScope),r}return t.prototype.dispose=function(){Rd(this._localHandlerScope),Cd&&Rd(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||`default`)},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,Cd&&this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?Id(this,t):Rd(t)}},t}(hc),Vd=1;Bo.hasGlobalWindow&&(Vd=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Hd=Vd,Ud=.4,Wd=`#333`,Gd=`#ccc`,Kd=`#eee`,qd=Uc,Jd=5e-5;function Yd(e){return e>Jd||e<-Jd}var Xd=[],Zd=[],Qd=Hc(),$d=Math.abs,ef=function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return Yd(this.rotation)||Yd(this.x)||Yd(this.y)||Yd(this.scaleX-1)||Yd(this.scaleY-1)||Yd(this.skewX)||Yd(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(qd(n),this.invTransform=null);return}n||=Hc(),t?this.getLocalTransform(n):qd(n),e&&(t?Gc(n,e,n):Wc(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Xd);var n=Xd[0]<0?-1:1,r=Xd[1]<0?-1:1,i=((Xd[0]-n)*t+n)/Xd[0]||0,a=((Xd[1]-r)*t+r)/Xd[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}this.invTransform=this.invTransform||Hc(),Yc(this.invTransform,e)},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||Hc(),Gc(Zd,e.invTransform,t),t=Zd);var n=this.originX,r=this.originY;(n||r)&&(Qd[4]=n,Qd[5]=r,Gc(Zd,t,Qd),Zd[4]-=n,Zd[5]-=r,t=Zd),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&uc(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&uc(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&$d(e[0]-1)>1e-10&&$d(e[3]-1)>1e-10?Math.sqrt($d(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){nf(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&qc(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),tf=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function nf(e,t){for(var n=0;n<tf.length;n++){var r=tf[n];e[r]=t[r]}}var rf={};function af(e,t){t||=`12px sans-serif`;var n=rf[t];n||=rf[t]=new lu(500);var r=n.get(e);return r??(r=Jo.measureText(e,t).width,n.put(e,r)),r}function of(e,t,n,r){var i=af(e,t),a=uf(t);return new al(cf(0,i,n),lf(0,a,r),i,a)}function sf(e,t,n,r){var i=((e||``)+``).split(`
20
20
  `);if(i.length===1)return of(i[0],t,n,r);for(var a=new al(0,0,0,0),o=0;o<i.length;o++){var s=of(i[o],t,n,r);o===0?a.copy(s):a.union(s)}return a}function cf(e,t,n){return n===`right`?e-=t:n===`center`&&(e-=t/2),e}function lf(e,t,n){return n===`middle`?e-=t/2:n===`bottom`&&(e-=t),e}function uf(e){return af(`国`,e)}function df(e,t){return typeof e==`string`?e.lastIndexOf(`%`)>=0?parseFloat(e)/100*t:parseFloat(e):e}function ff(e,t,n){var r=t.position||`inside`,i=t.distance==null?5:t.distance,a=n.height,o=n.width,s=a/2,c=n.x,l=n.y,u=`left`,d=`top`;if(r instanceof Array)c+=df(r[0],n.width),l+=df(r[1],n.height),u=null,d=null;else switch(r){case`left`:c-=i,l+=s,u=`right`,d=`middle`;break;case`right`:c+=i+o,l+=s,d=`middle`;break;case`top`:c+=o/2,l-=i,u=`center`,d=`bottom`;break;case`bottom`:c+=o/2,l+=a+i,u=`center`;break;case`inside`:c+=o/2,l+=s,u=`center`,d=`middle`;break;case`insideLeft`:c+=i,l+=s,d=`middle`;break;case`insideRight`:c+=o-i,l+=s,u=`right`,d=`middle`;break;case`insideTop`:c+=o/2,l+=i,u=`center`;break;case`insideBottom`:c+=o/2,l+=a-i,u=`center`,d=`bottom`;break;case`insideTopLeft`:c+=i,l+=i;break;case`insideTopRight`:c+=o-i,l+=i,u=`right`;break;case`insideBottomLeft`:c+=i,l+=a-i,d=`bottom`;break;case`insideBottomRight`:c+=o-i,l+=a-i,u=`right`,d=`bottom`;break}return e||={},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var pf=`__zr_normal__`,mf=tf.concat([`ignore`]),hf=gs(tf,function(e,t){return e[t]=!0,e},{ignore:!1}),gf={},_f=new al(0,0,0,0),vf=function(){function e(e){this.id=ss(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case`horizontal`:t=0;break;case`vertical`:e=0;break}var r=this.transform;r||=this.transform=[1,0,0,1,0,0],r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||={};var n=this.textConfig,r=n.local,i=t.innerTransformable,a=void 0,o=void 0,s=!1;i.parent=r?this:null;var c=!1;if(i.copyTransform(t),n.position!=null){var l=_f;n.layoutRect?l.copy(n.layoutRect):l.copy(this.getBoundingRect()),r||l.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(gf,n,l):ff(gf,n,l),i.x=gf.x,i.y=gf.y,a=gf.align,o=gf.verticalAlign;var u=n.origin;if(u&&n.rotation!=null){var d=void 0,f=void 0;u===`center`?(d=l.width*.5,f=l.height*.5):(d=df(u[0],l.width),f=df(u[1],l.height)),c=!0,i.originX=-i.x+d+(r?0:l.x),i.originY=-i.y+f+(r?0:l.y)}}n.rotation!=null&&(i.rotation=n.rotation);var p=n.offset;p&&(i.x+=p[0],i.y+=p[1],c||(i.originX=-p[0],i.originY=-p[1]));var m=n.inside==null?typeof n.position==`string`&&n.position.indexOf(`inside`)>=0:n.inside,h=this._innerTextDefaultStyle||={},g=void 0,_=void 0,v=void 0;m&&this.canBeInsideText()?(g=n.insideFill,_=n.insideStroke,(g==null||g===`auto`)&&(g=this.getInsideTextFill()),(_==null||_===`auto`)&&(_=this.getInsideTextStroke(g),v=!0)):(g=n.outsideFill,_=n.outsideStroke,(g==null||g===`auto`)&&(g=this.getOutsideFill()),(_==null||_===`auto`)&&(_=this.getOutsideStroke(g),v=!0)),g||=`#000`,(g!==h.fill||_!==h.stroke||v!==h.autoStroke||a!==h.align||o!==h.verticalAlign)&&(s=!0,h.fill=g,h.stroke=_,h.autoStroke=v,h.align=a,h.verticalAlign=o,t.setDefaultTextStyle(h)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Gd:Wd},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&Su(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,Eu(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},K(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(Z(e))for(var n=ys(e),r=0;r<n.length;r++){var i=n[r];this.attrKV(i,e[i])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var r=this.animators[n],i=r.__fromStateTransition;if(!(r.getLoop()||i&&i!==`__zr_normal__`)){var a=r.targetName,o=a?t[a]:t;r.saveTo(o)}}},e.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||=this._normalState={},e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,mf)},e.prototype._savePrimaryToNormal=function(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];e[i]!=null&&!(i in t)&&(t[i]=this[i])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(pf,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===pf;if(!(!this.hasState()&&i)){var a=this.currentStates,o=this.stateTransition;if(!(fs(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i){cs(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=!!(s&&s.hoverLayer||r);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,s,this._normalState,t,!n&&!this.__inHover&&o&&o.duration>0,o);var l=this._textContent,u=this._textGuide;return l&&l.useState(e,t,n,c),u&&u.useState(e,t,n,c),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),s}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s<a;s++)if(e[s]!==i[s]){o=!1;break}}if(o)return;for(var s=0;s<a;s++){var c=e[s],l=void 0;this.stateProxy&&(l=this.stateProxy(c,e)),l||=this.states[c],l&&r.push(l)}var u=r[a-1],d=!!(u&&u.hoverLayer||n);d&&this._toggleHoverLayerFlag(!0);var f=this._mergeStates(r),p=this.stateTransition;this.saveCurrentToNormalState(f),this._applyStateObj(e.join(`,`),f,this._normalState,!1,!t&&!this.__inHover&&p&&p.duration>0,p);var m=this._textContent,h=this._textGuide;m&&m.useStates(e,t,d),h&&h.useStates(e,t,d),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}},e.prototype.isSilent=function(){for(var e=this.silent,t=this.parent;!e&&t;){if(t.silent){e=!0;break}t=t.parent}return e},e.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},e.prototype.removeState=function(e){var t=fs(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=fs(r,e),a=fs(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r<e.length;r++){var i=e[r];K(t,i),i.textConfig&&(n||={},K(n,i.textConfig))}return n&&(t.textConfig=n),t},e.prototype._applyStateObj=function(e,t,n,r,i,a){var o=!(t&&r);t&&t.textConfig?(this.textConfig=K({},r?this.textConfig:n.textConfig),K(this.textConfig,t.textConfig)):o&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},c=!1,l=0;l<mf.length;l++){var u=mf[l],d=i&&hf[u];t&&t[u]!=null?d?(c=!0,s[u]=t[u]):this[u]=t[u]:o&&n[u]!=null&&(d?(c=!0,s[u]=n[u]):this[u]=n[u])}if(!i)for(var l=0;l<this.animators.length;l++){var f=this.animators[l],p=f.targetName;f.getLoop()||f.__changeFinalValue(p?(t||n)[p]:t||n)}c&&this._transitionState(e,s,a)},e.prototype._attachComponent=function(e){if(e.__zr&&!e.__hostTarget){if(process.env.NODE_ENV!==`production`)throw Error(`Text element has been added to zrender.`);return}if(e===this){if(process.env.NODE_ENV!==`production`)throw Error(`Recursive component attachment.`);return}var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this},e.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},e.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(e){var t=this._textContent;if(t!==e){if(t&&t!==e&&this.removeTextContent(),process.env.NODE_ENV!==`production`&&e.__zr&&!e.__hostTarget)throw Error(`Text element has been added to zrender.`);e.innerTransformable=new ef,this._attachComponent(e),this._textContent=e,this.markRedraw()}},e.prototype.setTextConfig=function(e){this.textConfig||={},K(this.textConfig,e),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=1;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,n=this._textGuide;t&&(t.__inHover=e),n&&(n.__inHover=e)},e.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},e.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},e.prototype.animate=function(e,t,n){var r=e?this[e]:this;if(process.env.NODE_ENV!==`production`&&!r){cs(`Property "`+e+`" is not existed in element `+this.id);return}var i=new yd(r,t,n);return e&&(i.targetName=e),this.addAnimator(i,e),i},e.prototype.addAnimator=function(e,t){var n=this.__zr,r=this;e.during(function(){r.updateDuringAnimation(t)}).done(function(){var t=r.animators,n=fs(t,e);n>=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a<r;a++){var o=n[a];!e||e===o.scope?o.stop(t):i.push(o)}return this.animators=i,this},e.prototype.animateTo=function(e,t,n){yf(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){yf(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var i=yf(this,t,n,r),a=0;a<i.length;a++)i[a].__fromStateTransition=e},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=(function(){var t=e.prototype;t.type=`element`,t.name=``,t.ignore=t.silent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=1;var n={};function r(e,t,r){n[e+t+r]||(console.warn(`DEPRECATED: '`+e+`' has been deprecated. use '`+t+`', '`+r+`' instead`),n[e+t+r]=!0)}function i(e,n,i,a){Object.defineProperty(t,e,{get:function(){if(process.env.NODE_ENV!==`production`&&r(e,i,a),!this[n]){var t=this[n]=[];o(this,t)}return this[n]},set:function(t){process.env.NODE_ENV!==`production`&&r(e,i,a),this[i]=t[0],this[a]=t[1],this[n]=t,o(this,t)}});function o(e,t){Object.defineProperty(t,0,{get:function(){return e[i]},set:function(t){e[i]=t}}),Object.defineProperty(t,1,{get:function(){return e[a]},set:function(t){e[a]=t}})}}Object.defineProperty&&(i(`position`,`_legacyPos`,`x`,`y`),i(`scale`,`_legacyScale`,`scaleX`,`scaleY`),i(`origin`,`_legacyOrigin`,`originX`,`originY`))})(),e}();ms(vf,hc),ms(vf,ef);function yf(e,t,n,r,i){n||={};var a=[];Tf(e,``,e,t,n,r,a,i);var o=a.length,s=!1,c=n.done,l=n.aborted,u=function(){s=!0,o--,o<=0&&(s?c&&c():l&&l())},d=function(){o--,o<=0&&(s?c&&c():l&&l())};o||c&&c(),a.length>0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f<a.length;f++){var p=a[f];u&&p.done(u),d&&p.aborted(d),n.force&&p.duration(n.duration),p.start(n.easing)}return a}function bf(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function xf(e){return hs(e[0])}function Sf(e,t,n){if(hs(t[n]))if(hs(e[n])||(e[n]=[]),Ds(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),bf(e[n],t[n],r))}else{var i=t[n],a=e[n],o=i.length;if(xf(i))for(var s=i[0].length,c=0;c<o;c++)a[c]?bf(a[c],i[c],s):a[c]=Array.prototype.slice.call(i[c]);else bf(a,i,o);a.length=i.length}else e[n]=t[n]}function Cf(e,t){return e===t||hs(e)&&hs(t)&&wf(e,t)}function wf(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function Tf(e,t,n,r,i,a,o,s){for(var c=ys(r),l=i.duration,u=i.delay,d=i.additive,f=i.setToFinal,p=!Z(a),m=e.animators,h=[],g=0;g<c.length;g++){var _=c[g],v=r[_];if(v!=null&&n[_]!=null&&(p||a[_]))if(Z(v)&&!hs(v)&&!ks(v)){if(t){s||(n[_]=v,e.updateDuringAnimation(t));continue}Tf(e,_,n[_],v,i,a&&a[_],o,s)}else h.push(_);else s||(n[_]=v,e.updateDuringAnimation(t),h.push(_))}var y=h.length;if(!d&&y)for(var b=0;b<m.length;b++){var x=m[b];if(x.targetName===t&&x.stopTracks(h)){var S=fs(m,x);m.splice(S,1)}}if(i.force||(h=_s(h,function(e){return!Cf(r[e],n[e])}),y=h.length),y>0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b<y;b++){var _=h[b];w[_]=n[_],f?C[_]=r[_]:n[_]=r[_]}}else if(f){T={};for(var b=0;b<y;b++){var _=h[b];T[_]=ad(n[_]),Sf(n,r,_)}}var x=new yd(n,!1,!1,d?_s(m,function(e){return e.targetName===t}):null);x.targetName=t,i.scope&&(x.scope=i.scope),f&&C&&x.whenWithKeys(0,C,h),T&&x.whenWithKeys(0,T,h),x.whenWithKeys(l??500,s?w:r,h).delay(u||0),e.addAnimator(x,t),o.push(x)}}var Ef=function(e){G(t,e);function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){if(e&&(e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),process.env.NODE_ENV!==`production`&&e.__hostTarget))throw`This elemenet has been used as an attachment`;return this},t.prototype.addBefore=function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,r=n.indexOf(t);r>=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=fs(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=fs(n,e);return r<0?this:(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n<e.length;n++){var r=e[n];t&&r.removeSelfFromZr(t),r.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,t){for(var n=this._children,r=0;r<n.length;r++){var i=n[r];e.call(t,i,r)}return this},t.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var r=this._children[n],i=e.call(t,r);r.isGroup&&!i&&r.traverse(e,t)}return this},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].addSelfToZr(t)},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].removeSelfFromZr(t)},t.prototype.getBoundingRect=function(e){for(var t=new al(0,0,0,0),n=e||this._children,r=[],i=null,a=0;a<n.length;a++){var o=n[a];if(!(o.ignore||o.invisible)){var s=o.getBoundingRect(),c=o.getLocalTransform(r);c?(al.applyTransform(t,s,c),i||=t.clone(),i.union(t)):(i||=s.clone(),i.union(s))}}return i||t},t}(vf);Ef.prototype.type=`group`;var Df={},Of={};function kf(e){delete Of[e]}function Af(e){if(!e)return!1;if(typeof e==`string`)return Du(e,1)<Ud;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=Du(t[i].color,1);return n/=r,n<Ud}return!1}var jf=function(){function e(e,t,n){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n||={},this.dom=t,this.id=e;var i=new Al,a=n.renderer||`canvas`;if(Df[a]||(a=ys(Df)[0]),process.env.NODE_ENV!==`production`&&!Df[a])throw Error(`Renderer '`+a+`' is not imported. Please import it first.`);n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var o=new Df[a](t,i,n,e),s=n.ssr||o.ssrOnly;this.storage=i,this.painter=o;var c=!Bo.node&&!Bo.worker&&!s?new Bd(o.getViewportRoot(),o.root):null,l=n.useCoarsePointer,u=l==null||l===`auto`?Bo.touchEventsSupported:!!l,d=44,f;u&&(f=Q(n.pointerSize,d)),this.handler=new pl(i,o,c,o.root,f),this.animation=new xd({stage:{update:s?null:function(){return r._flush(!0)}}}),s||this.animation.start()}return e.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},e.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=Af(e))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!1)},e.prototype._flush=function(e){var t,n=bd();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var r=bd();t?(this._stillFrameAccum=0,this.trigger(`rendered`,{elapsedTime:r-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()===`canvas`&&this.painter.refreshHover())},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof Ef&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,kf(this.id))},e}();function Mf(e,t){var n=new jf(ss(),e,t);return Of[n.id]=n,n}function Nf(e,t){Df[e]=t}var Pf;function Ff(e){if(typeof Pf==`function`)return Pf(e)}function If(e){Pf=e}var Lf=1e-4,Rf=20;function zf(e){return e.replace(/^\s+|\s+$/g,``)}function Bf(e,t,n,r){var i=t[0],a=t[1],o=n[0],s=n[1],c=a-i,l=s-o;if(c===0)return l===0?o:(o+s)/2;if(r){if(c>0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}function Vf(e,t){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`;break}return X(e)?zf(e).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):e==null?NaN:+e}function Hf(e,t,n){return t??=10,t=Math.min(Math.max(0,t),Rf),e=(+e).toFixed(t),n?e:+e}function Uf(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(Math.round(e*t)/t===e)return n}return Wf(e)}function Wf(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`),o=a<0?0:i-1-a;return Math.max(0,o-r)}function Gf(e,t){var n=Math.log,r=Math.LN10,i=Math.floor(n(e[1]-e[0])/r),a=Math.round(n(Math.abs(t[1]-t[0]))/r),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function Kf(e,t){var n=gs(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(n===0)return[];for(var r=10**t,i=J(e,function(e){return(isNaN(e)?0:e)/n*r*100}),a=r*100,o=J(i,function(e){return Math.floor(e)}),s=gs(o,function(e,t){return e+t},0),c=J(i,function(e,t){return e-o[t]});s<a;){for(var l=-1/0,u=null,d=0,f=c.length;d<f;++d)c[d]>l&&(l=c[d],u=d);++o[u],c[u]=0,++s}return J(o,function(e){return e/r})}function qf(e,t){var n=Math.max(Uf(e),Uf(t)),r=e+t;return n>Rf?r:Hf(r,n)}function Jf(e){var t=Math.PI*2;return(e%t+t)%t}function Yf(e){return e>-Lf&&e<Lf}var Xf=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Zf(e){if(e instanceof Date)return e;if(X(e)){var t=Xf.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return t[8].toUpperCase()!==`Z`&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}else return new Date(+t[1],(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}else if(e==null)return new Date(NaN);return new Date(Math.round(e))}function Qf(e){return 10**$f(e)}function $f(e){if(e===0)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/10**t>=10&&t++,t}function ep(e,t){var n=$f(e),r=10**n,i=e/r;return e=(t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,n>=-20?+e.toFixed(n<0?-n:0):e}function tp(e){var t=parseFloat(e);return t==e&&(t!==0||!X(e)||e.indexOf(`x`)<=0)?t:NaN}function np(e){return!isNaN(tp(e))}function rp(){return Math.round(Math.random()*9)}function ip(e,t){return t===0?e:ip(t,e%t)}function ap(e,t){return e==null?t:t==null?e:e*t/ip(e,t)}var op=`[ECharts] `,sp={},cp=typeof console<`u`&&console.warn&&console.log;function lp(e,t,n){if(cp){if(n){if(sp[t])return;sp[t]=!0}console[e](op+t)}}function up(e,t){lp(`log`,e,t)}function dp(e,t){lp(`warn`,e,t)}function fp(e,t){lp(`error`,e,t)}function pp(e){process.env.NODE_ENV!==`production`&&lp(`warn`,`DEPRECATED: `+e,!0)}function mp(e,t,n){process.env.NODE_ENV!==`production`&&pp((n?`[`+n+`]`:``)+(e+` is deprecated, use `+t+` instead.`))}function hp(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=``;if(process.env.NODE_ENV!==`production`){var r=function(e){return e===void 0?`undefined`:e===1/0?`Infinity`:e===-1/0?`-Infinity`:js(e)?`NaN`:e instanceof Date?`Date(`+e.toISOString()+`)`:Cs(e)?`function () { ... }`:As(e)?e+``:null};n=J(e,function(e){if(X(e))return e;var t=r(e);if(t!=null)return t;if(typeof JSON<`u`&&JSON.stringify)try{return JSON.stringify(e,function(e,t){return r(t)??t})}catch{return`?`}else return`?`}).join(` `)}return n}function gp(e){throw Error(e)}function _p(e,t,n){return(t-e)*n+e}var vp=`series\0`,yp=`\0_ec_\0`;function bp(e){return e instanceof Array?e:e==null?[]:[e]}function xp(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,i=n.length;r<i;r++){var a=n[r];!e.emphasis[t].hasOwnProperty(a)&&e[t].hasOwnProperty(a)&&(e.emphasis[t][a]=e[t][a])}}}var Sp=`fontStyle.fontWeight.fontSize.fontFamily.rich.tag.color.textBorderColor.textBorderWidth.width.height.lineHeight.align.verticalAlign.baseline.shadowColor.shadowBlur.shadowOffsetX.shadowOffsetY.textShadowColor.textShadowBlur.textShadowOffsetX.textShadowOffsetY.backgroundColor.borderColor.borderWidth.borderRadius.padding`.split(`.`);function Cp(e){return Z(e)&&!Y(e)&&!(e instanceof Date)?e.value:e}function wp(e){return Z(e)&&!(e instanceof Array)}function Tp(e,t,n){var r=n===`normalMerge`,i=n===`replaceMerge`,a=n===`replaceAll`;e||=[],t=(t||[]).slice();var o=Gs();q(t,function(e,n){if(!Z(e)){t[n]=null;return}process.env.NODE_ENV!==`production`&&(e.id!=null&&!Ip(e.id)&&Fp(e.id),e.name!=null&&!Ip(e.name)&&Fp(e.name))});var s=Ep(e,o,n);return(r||i)&&Dp(s,e,o,t),r&&Op(s,t),r||i?kp(s,t,i):a&&Ap(s,t),jp(s),s}function Ep(e,t,n){var r=[];if(n===`replaceAll`)return r;for(var i=0;i<e.length;i++){var a=e[i];a&&a.id!=null&&t.set(a.id,i),r.push({existing:n===`replaceMerge`||Rp(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return r}function Dp(e,t,n,r){q(r,function(i,a){if(!(!i||i.id==null)){var o=Np(i.id),s=n.get(o);if(s!=null){var c=e[s];Is(!c.newOption,`Duplicated option on id "`+o+`".`),c.newOption=i,c.existing=t[s],r[a]=null}}})}function Op(e,t){q(t,function(n,r){if(!(!n||n.name==null))for(var i=0;i<e.length;i++){var a=e[i].existing;if(!e[i].newOption&&a&&(a.id==null||n.id==null)&&!Rp(n)&&!Rp(a)&&Mp(`name`,a,n)){e[i].newOption=n,t[r]=null;return}}})}function kp(e,t,n){q(t,function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||Rp(r.existing)||r.existing&&t.id!=null&&!Mp(`id`,t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}})}function Ap(e,t){q(t,function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function jp(e){var t=Gs();q(e,function(e){var n=e.existing;n&&t.set(n.id,e)}),q(e,function(e){var n=e.newOption;Is(!n||n.id==null||!t.get(n.id)||t.get(n.id)===e,`id duplicates: `+(n&&n.id)),n&&n.id!=null&&t.set(n.id,e),!e.keyInfo&&(e.keyInfo={})}),q(e,function(e,n){var r=e.existing,i=e.newOption,a=e.keyInfo;if(Z(i)){if(a.name=i.name==null?r?r.name:vp+n:Np(i.name),r)a.id=Np(r.id);else if(i.id!=null)a.id=Np(i.id);else{var o=0;do a.id=`\0`+a.name+`\0`+ o++;while(t.get(a.id))}t.set(a.id,e)}})}function Mp(e,t,n){var r=Pp(t[e],null),i=Pp(n[e],null);return r!=null&&i!=null&&r===i}function Np(e){if(process.env.NODE_ENV!==`production`&&e==null)throw Error();return Pp(e,``)}function Pp(e,t){return e==null?t:X(e)?e:Ts(e)||ws(e)?e+``:t}function Fp(e){process.env.NODE_ENV!==`production`&&dp("`"+e+"` is invalid id or name. Must be a string or number.")}function Ip(e){return ws(e)||np(e)}function Lp(e){var t=e.name;return!!(t&&t.indexOf(vp))}function Rp(e){return e&&e.id!=null&&Np(e.id).indexOf(yp)===0}function zp(e,t,n){q(e,function(e){var r=e.newOption;Z(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=Bp(t,r,e.existing,n))})}function Bp(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}function Vp(e,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return Y(t.dataIndex)?J(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex);if(t.name!=null)return Y(t.name)?J(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name)}function Hp(){var e=`__ec_inner_`+ Up++;return function(t){return t[e]||(t[e]={})}}var Up=rp();function Wp(e,t,n){var r=Gp(t,n),i=r.mainTypeSpecified,a=r.queryOptionMap,o=r.others,s=n?n.defaultMainType:null;return!i&&s&&a.set(s,{}),a.each(function(t,r){var i=qp(e,r,t,{useDefault:s===r,enableAll:n&&n.enableAll!=null?n.enableAll:!0,enableNone:n&&n.enableNone!=null?n.enableNone:!0});o[r+`Models`]=i.models,o[r+`Model`]=i.models[0]}),o}function Gp(e,t){var n;if(X(e)){var r={};r[e+`Index`]=0,n=r}else n=e;var i=Gs(),a={},o=!1;return q(n,function(e,n){if(n===`dataIndex`||n===`dataIndexInside`){a[n]=e;return}var r=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],c=(r[2]||``).toLowerCase();if(!(!s||!c||t&&t.includeMainTypes&&fs(t.includeMainTypes,s)<0)){o||=!!s;var l=i.get(s)||i.set(s,{});l[c]=e}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var Kp={useDefault:!0,enableAll:!1,enableNone:!1};function qp(e,t,n,r){r||=Kp;var i=n.index,a=n.id,o=n.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var c=void 0;return s.models=r.useDefault&&(c=e.getComponent(t))?[c]:[],s}return i===`none`||i===!1?(Is(r.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):(i===`all`&&(Is(r.enableAll,'`"all"` is not a valid value on index option.'),i=a=o=null),s.models=e.queryComponents({mainType:t,index:i,id:a,name:o}),s)}function Jp(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function Yp(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function Xp(e,t,n,r,i){var a=t==null||t===`auto`;if(r==null)return r;if(Ts(r)){var o=_p(n||0,r,i);return Hf(o,a?Math.max(Uf(n||0),Uf(r)):t)}else if(X(r))return i<1?n:r;else{for(var s=[],c=n,l=r,u=Math.max(c?c.length:0,l.length),d=0;d<u;++d){var f=e.getDimensionInfo(d);if(f&&f.type===`ordinal`)s[d]=(i<1&&c?c:l)[d];else{var p=c&&c[d]?c[d]:0,m=l[d],o=_p(p,m,i);s[d]=Hf(o,a?Math.max(Uf(p),Uf(m)):t)}}return s}}var Zp=`.`,Qp=`___EC__COMPONENT__CONTAINER___`,$p=`___EC__EXTENDED_CLASS___`;function em(e){var t={main:``,sub:``};if(e){var n=e.split(Zp);t.main=n[0]||``,t.sub=n[1]||``}return t}function tm(e){Is(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function nm(e){return!!(e&&e[$p])}function rm(e,t){e.$constructor=e,e.extend=function(e){process.env.NODE_ENV!==`production`&&q(t,function(t){e[t]||console.warn("Method `"+t+"` should be implemented"+(e.type?` in `+e.type:``)+`.`)});var n=this,r;return im(n)?r=function(e){G(t,e);function t(){return e.apply(this,arguments)||this}return t}(n):(r=function(){(e.$constructor||n).apply(this,arguments)},ps(r,this)),K(r.prototype,e),r[$p]=!0,r.extend=this.extend,r.superCall=cm,r.superApply=lm,r.superClass=n,r}}function im(e){return Cs(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function am(e,t){e.extend=t.extend}var om=Math.round(Math.random()*10);function sm(e){var t=[`__\0is_clz`,om++].join(`_`);e.prototype[t]=!0,process.env.NODE_ENV!==`production`&&Is(!e.isInstance,`The method "is" can not be defined.`),e.isInstance=function(e){return!!(e&&e[t])}}function cm(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this.superClass.prototype[t].apply(e,n)}function lm(e,t,n){return this.superClass.prototype[t].apply(e,n)}function um(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){tm(r),e.prototype.type=r;var i=em(r);if(!i.sub)process.env.NODE_ENV!==`production`&&t[i.main]&&console.warn(i.main+` exists.`),t[i.main]=e;else if(i.sub!==Qp){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[Qp]&&(i=n?i[n]:null),r&&!i)throw Error(n?`Component `+e+`.`+(n||``)+` is used but not imported.`:e+`.type should be specified.`);return i},e.getClassesByMainType=function(e){var n=em(e),r=[],i=t[n.main];return i&&i[Qp]?q(i,function(e,t){t!==Qp&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[em(e).main]},e.getAllClassMainTypes=function(){var e=[];return q(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[em(e).main];return n&&n[Qp]};function n(e){var n=t[e.main];return(!n||!n[Qp])&&(n=t[e.main]={},n[Qp]=!0),n}}function dm(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t||=!1,function(n,r,i){for(var a={},o=0;o<e.length;o++){var s=e[o][1];if(!(r&&fs(r,s)>=0||i&&fs(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var fm=dm([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),pm=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return fm(this,e,t)},e}(),mm=new lu(50);function hm(e){if(typeof e==`string`){var t=mm.get(e);return t&&t.image}else return e}function gm(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=mm.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!vm(t)&&a.pending.push(o)):(t=Jo.loadImage(e,_m,_m),t.__zrImageSrc=e,mm.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}else return e}function _m(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function vm(e){return e&&e.width&&e.height}var ym=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function bm(e,t,n,r,i,a){if(!n){e.text=``,e.isTruncated=!1;return}var o=(t+``).split(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-ppt-edit-component",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
4
4
  "keywords": [
5
5
  "ai",
6
6
  "ppt",