advanced-ele-ui 0.1.8 → 0.1.9
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/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +15 -11
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Vy=Object.defineProperty,Gy=Object.defineProperties;var zy=Object.getOwnPropertyDescriptors;var Ba=Object.getOwnPropertySymbols;var _m=Object.prototype.hasOwnProperty,gm=Object.prototype.propertyIsEnumerable;var gc=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e);var Ec=(e,t,n)=>t in e?Vy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,T=(e,t)=>{for(var n in t||(t={}))_m.call(t,n)&&Ec(e,n,t[n]);if(Ba)for(var n of Ba(t))gm.call(t,n)&&Ec(e,n,t[n]);return e},H=(e,t)=>Gy(e,zy(t));var co=(e,t)=>{var n={};for(var r in e)_m.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ba)for(var r of Ba(e))t.indexOf(r)<0&&gm.call(e,r)&&(n[r]=e[r]);return n};var xr=(e,t,n)=>Ec(e,typeof t!="symbol"?t+"":t,n);var Lt=(e,t,n)=>new Promise((r,i)=>{var o=l=>{try{s(n.next(l))}catch(c){i(c)}},a=l=>{try{s(n.throw(l))}catch(c){i(c)}},s=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,a);s((n=n.apply(e,t)).next())}),bc=function(e,t){this[0]=e,this[1]=t},Em=(e,t,n)=>{var r=(a,s,l,c)=>{try{var d=n[a](s),u=(s=d.value)instanceof bc,p=d.done;Promise.resolve(u?s[0]:s).then(m=>u?r(a==="return"?a:"next",s[1]?{done:m.done,value:m.value}:m,l,c):l({value:m,done:p})).catch(m=>r("throw",m,l,c))}catch(m){c(m)}},i=a=>o[a]=s=>new Promise((l,c)=>r(a,s,l,c)),o={};return n=n.apply(e,t),o[gc("asyncIterator")]=()=>o,i("next"),i("throw"),i("return"),o};var bm=(e,t,n)=>(t=e[gc("asyncIterator")])?t.call(e):(e=e[gc("iterator")](),t={},n=(r,i)=>(i=e[r])&&(t[r]=o=>new Promise((a,s,l)=>(o=i.call(e,o),l=o.done,Promise.resolve(o.value).then(c=>a({value:c,done:l}),s)))),n("next"),n("return"),t);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("vue"),G=require("element-plus"),We=require("lodash-es"),ct=require("@vueuse/core"),$y=require("@iconify/vue"),Du=require("dayjs"),Sc={border:!0,column:3,direction:"horizontal"},fe={STEP:"Step",CONTAINER:"Container",DECORATOR:"Decorator",INPUTER:"Inputer",CUSTOM:"Custom",DESCRIPTIONS:"Descriptions"},Yy=["Autocomplete","Cascader","DatePicker","Editor","Input","InputNumber","Mention","Select","TimePicker","TimeSelect"],qy=["Select","Radio","Checkbox","Cascader","Transfer","Segmented"],Sg=["RadioButton","CheckboxButton"],jy=["years","months","dates","datetimerange","daterange","monthrange","yearrange"],Wy=["Table"],vg=e=>Array.isArray(e);function Je(e){return e!==void 0&&typeof e=="function"}function Sm(e){return typeof e=="number"}function Hr(e,t){return Reflect.has(e,t)}const yg={name:"简体中文",common:{confirm:"确定",cancel:"取消",save:"保存",delete:"删除",edit:"编辑",view:"查看",search:"搜索",reset:"重置",submit:"提交",close:"关闭",back:"返回",next:"下一步",prev:"上一步",loading:"加载中...",noData:"暂无数据",more:"更多"},table:{copy:{success:"复制成功",failed:"复制失败"},selection:{selected:"当前已选择",items:"条数据"},action:{more:"更多"},empty:"-"},form:{placeholder:{input:"请填写{label}",select:"请选择{label}",date:"选择日期",time:"选择时间",startDate:"开始日期",endDate:"结束日期",startTime:"开始时间",endTime:"结束时间"},validation:{required:"{label}不能为空",requiredArray:"请至少选择一个{label}",noSpace:"{label}不得包含空格",normalText:"{label}只能包含中文、英文、数字",idCard:"请输入正确的身份证号码",mobilePhone:"请输入正确的手机号码",telephone:"请输入正确的电话号码",noChinese:"{label}不能包含中文",creditCode:"请输入正确的统一社会信用代码",onlyNumber:"{label}只能输入数字",onlyLetter:"{label}只能输入字母",email:"请输入正确的邮箱地址",fieldError:"{field} 填写有误",tableError:"{field} 填写有误",checkTable:"请检查表格是否按要求填写"}},upload:{button:"点击上传",drag:"将文件拖到此处",dragTip:"或点击上传",preview:"预览",download:"下载",delete:"删除",uploading:"上传中...",uploadSuccess:"上传成功",uploadFailed:"上传失败",fileSizeExceeded:"文件大小超出限制",fileTypeError:"文件类型不符合要求",fileCountExceeded:"文件数量超出限制",fileCountLimit:"最多只能上传 {limit} 个文件",fileSizeLimit:"文件大小不能超过 {size}",uploadFunctionRequired:"未配置上传函数",previewNotSupported:"该文件不支持预览",downloadNotSupported:"暂不支持下载"},pagination:{total:"共 {total} 条",goto:"前往",page:"页",itemsPerPage:"条/页"},console:{table:{rowKeyRequired:"[AeTable] 启用选择功能时需要设置 rowKey 属性",columnMissingKey:"[AeTable] 列 {label} 缺少 key 属性,请添加 key",unknownColumnType:"[AeTable] 未知的列类型: {type}",dictTypePropsRequired:"[AeTable] 列使用了 dict 类型但未配置 typeProps,无法正常解析字典。请检查列配置",sensitiveTypeRequired:"[AeTable] 列使用了 sensitive 类型,但未设置 sensitiveType 或 sensitiveRegex 属性,请检查列配置",noDesensitizationMethod:"[AeTable] 不存在 {type} 类型的脱敏方法",actionTypeRequired:"[AeTable] 列使用了 action 类型,但未配置 actions 属性,请检查列配置",actionEventError:"[AeTable] 操作按钮事件执行错误",actionNotFound:"[AeTable] dropdownActions 中不存在操作: {command}",componentExists:"[AeTable] 组件 {name} 已存在,将被覆盖",componentNotExist:"[AeTable] 注册组件数组策略失败,因为组件 {name} 不存在",configExists:"[AeTable] 组件配置 {name} 已存在,将被覆盖",componentRegistered:"[AeTable] 通过 imports 属性导入的组件 {name} 已成功注册!",editFieldRequired:"[AeTable] 编辑组件未设置 field 属性,请检查列配置",editComponentError:"[AeTable] 配置错误,请检查 column.editProps.component 是否正确,请检查列配置"},form:{componentNotExist:"[AeForm] {type} 类型组件配置异常,组件 {component} 不存在",componentError:"[AeForm] {type} 类型组件配置异常,请检查组件 {component} 是否正确!",customComponentError:"[AeForm] 自定义组件配置异常,如果您预期使用自定义渲染组件,请使用 render 属性或 slot 编写组件内容",keyRequired:"[AeForm] 组件必须设置 key 属性或 field 属性,无法渲染 schema",nestedStepNotSupported:"[AeForm] 不支持嵌套 Step 类型子组件,无法渲染 schema",nestedDescriptionsNotSupported:"[AeForm] 不支持嵌套 Descriptions 类型子组件,无法渲染 schema",nestedContainerNotSupported:"[AeForm] 不支持嵌套 Container 类型子组件,无法渲染 schema",wrapInDescriptions:"[AeForm] 在 desc 模式下,请将所有组件包裹在 Descriptions 组件内,当前组件未包裹在 Descriptions 内,请检查 schema",expressionCompileError:"表达式编译失败: {code}",expressionExecuteError:"表达式执行失败: {code}",dynamicPropertyError:"动态属性 {key} 设置错误",componentExists:"[AeForm] 组件 {name} 已存在,将被覆盖",configExists:"[AeForm] 组件配置 {name} 已存在,将被覆盖",componentRegistered:"[AeForm] 通过 imports 属性导入的组件 {name} 已成功注册!"},upload:{compressError:"图片压缩失败"},utils:{slotError:"{slot} 不是一个方法函数",styleWidthError:'width 值必须为 百分比 或 以"px"单位为后缀 或 是一个整数'},format:{invalidDate:'无法将输入值 "{value}" 解析为有效日期',dateFormatError:'格式化日期时发生错误。输入值: "{value}", 格式: "{format}"'}}},Cg={name:"English",common:{confirm:"Confirm",cancel:"Cancel",save:"Save",delete:"Delete",edit:"Edit",view:"View",search:"Search",reset:"Reset",submit:"Submit",close:"Close",back:"Back",next:"Next",prev:"Previous",loading:"Loading...",noData:"No Data",more:"More"},table:{copy:{success:"Copied successfully",failed:"Copy failed"},selection:{selected:"Selected",items:"items"},action:{more:"More"},empty:"-"},form:{placeholder:{input:"Please enter {label}",select:"Please select {label}",date:"Select date",time:"Select time",startDate:"Start date",endDate:"End date",startTime:"Start time",endTime:"End time"},validation:{required:"{label} is required",requiredArray:"Please select at least one {label}",noSpace:"{label} cannot contain spaces",normalText:"{label} can only contain Chinese, English, and numbers",idCard:"Please enter a valid ID card number",mobilePhone:"Please enter a valid mobile phone number",telephone:"Please enter a valid telephone number",noChinese:"{label} cannot contain Chinese characters",creditCode:"Please enter a valid unified social credit code",onlyNumber:"{label} can only contain numbers",onlyLetter:"{label} can only contain letters",email:"Please enter a valid email address",fieldError:"{field} is invalid",tableError:"{field} is invalid",checkTable:"Please check if the table is filled in as required"}},upload:{button:"Click to upload",drag:"Drop file here",dragTip:"or click to upload",preview:"Preview",download:"Download",delete:"Delete",uploading:"Uploading...",uploadSuccess:"Upload successful",uploadFailed:"Upload failed",fileSizeExceeded:"File size exceeds limit",fileTypeError:"File type does not meet requirements",fileCountExceeded:"File count exceeds limit",fileCountLimit:"Maximum {limit} files can be uploaded",fileSizeLimit:"File size cannot exceed {size}",uploadFunctionRequired:"Upload function is not configured",previewNotSupported:"This file does not support preview",downloadNotSupported:"Download is not supported yet"},pagination:{total:"Total {total} items",goto:"Go to",page:"",itemsPerPage:"items/page"},console:{table:{rowKeyRequired:"[AeTable] rowKey is required when selection is enabled",columnMissingKey:"[AeTable] column {label} is missing key, please add key to column",unknownColumnType:"[AeTable] Unknown column type: {type}",dictTypePropsRequired:'[AeTable] Column used "dict" type but did not configure "typeProps", unable to parse the dictionary normally. Please check the column',sensitiveTypeRequired:'[AeTable] Column used "sensitive" type, but "sensitiveType" or "sensitiveRegex" attributes were not set, please check the column',noDesensitizationMethod:"[AeTable] There is no desensitization method for type {type}",actionTypeRequired:'[AeTable] The column uses "action" type, but "actions" property is not configured, please check the column',actionEventError:"[AeTable] Action event error",actionNotFound:"[AeTable] dropdownActions does not contain action: {command}",componentExists:"[AeTable] The component {name} already exists and will be overwritten",componentNotExist:"[AeTable] Failed to register component array strategy because the component {name} does not exist",configExists:"[AeTable] The component configuration {name} already exists and will be overwritten",componentRegistered:"[AeTable] The component {name} imported via the imports property has been successfully registered!",editFieldRequired:"[AeTable] The edit component has not set the field property. please check column",editComponentError:'[AeTable] Configuration error, please check if "column.editProps.component" is correct, please check column'},form:{componentNotExist:"[AeForm] The configuration of the {type} type component is abnormal, The component {component} does not exist",componentError:"[AeForm] The configuration of the {type} type component is abnormal, please check if the component {component} is correct!",customComponentError:"[AeForm] Custom component configuration exception, if you expect to use a custom render component, please write the component content using the render property or slot!",keyRequired:"[AeForm] The component must set the key property or the field property, unable to render schema",nestedStepNotSupported:"[AeForm] Unsupported nested Step type child components, unable to render schema",nestedDescriptionsNotSupported:"[AeForm] Nested Descriptions type child components are not supported, unable to render schema",nestedContainerNotSupported:"[AeForm] Nested Container type child components are not supported, cannot render schema",wrapInDescriptions:"[AeForm] In desc mode, please wrap all components within the Descriptions component, the current component is not wrapped within Descriptions, please check schema",expressionCompileError:"Expression compile failed: {code}",expressionExecuteError:"Expression execute failed: {code}",dynamicPropertyError:"Dynamic property {key} error",componentExists:"[AeForm] The component {name} already exists and will be overwritten",configExists:"[AeForm] The component configuration {name} already exists and will be overwritten",componentRegistered:"[AeForm] The component {name} imported via the imports property has been successfully registered!"},upload:{compressError:"Image compression failed"},utils:{slotError:"slot {slot} is not a function",styleWidthError:'The width value must be a percentage, have the "px" unit suffix, or be an integer.'},format:{invalidDate:'Unable to parse input value "{value}" as a valid date',dateFormatError:'Error formatting date. Input value: "{value}", Format: "{format}"'}}};function yo(e,t){return e.replace(/\{(\w+)\}/g,(n,r)=>t[r]!==void 0?String(t[r]):n)}function vm(e,t){return t?yo(e,{label:t}):e}class Qn{static warn(t,n,...r){const i=n?yo(ve(t),n):ve(t);console.warn(i,...r)}static error(t,n,...r){const i=n?yo(ve(t),n):ve(t);console.error(i,...r)}static log(t,n,...r){const i=n?yo(ve(t),n):ve(t);console.log(i,...r)}static success(t,n){const r=n?yo(ve(t),n):ve(t);console.log(`%c✓ ${r}`,"color: #4CAF50;")}}const _e={warn:Qn.warn.bind(Qn),error:Qn.error.bind(Qn),log:Qn.log.bind(Qn),success:Qn.success.bind(Qn)},Zr=h.ref("zh-CN"),Tg={"zh-CN":yg,"en-US":Cg},Ng={};function Ky(){const e=Tg[Zr.value],t=Ng[Zr.value]||{};return Xy(e,t)}const Og=[];function Qy(e){Og.push(e),e(Zr.value)}function Ag(e){if(!Tg[e]){console.warn(`[AdvancedEleUI] Locale "${e}" is not supported. Using "zh-CN" instead.`),Zr.value="zh-CN";return}Zr.value=e,Og.forEach(t=>t(e))}function Zy(){return Zr.value}function Rg(e,t){Ng[e]=t}function ve(e,t,n){typeof t=="string"&&(n=t,t=void 0);const r=Ky(),i=e.split(".");let o=r;for(const s of i)if(o&&typeof o=="object"&&s in o)o=o[s];else return n||e;let a=typeof o=="string"?o:n||e;return t&&typeof t=="object"&&Object.keys(t).forEach(s=>{a=a.replace(new RegExp(`\\{${s}\\}`,"g"),String(t[s]))}),a}function Xy(e,t){return wg(e,t)}function wg(e,t){const n=T({},e);for(const r in t){const i=t[r],o=n[r];i&&typeof i=="object"&&!Array.isArray(i)?o&&typeof o=="object"&&!Array.isArray(o)?n[r]=wg(o,i):n[r]=i:i!==void 0&&(n[r]=i)}return n}const Jy=h.computed(()=>Zr.value),eC=["zh-CN","en-US"];function Ao(e,t,n){return zn(e.hidden,e,t,n,"boolean",!1)}function tC(e,t,n){return zn(e.value,e,t,n,"any",null)}function xg(e,t,n){return zn(e.label,e,t,n,"string","")}function vc(e,t,n){var r;return zn((r=e.formItemProps)==null?void 0:r.subLabel,e,t,n,"string","")}function nC(e,t,n){var r;return zn((r=e.formItemProps)==null?void 0:r.noLabel,e,t,n,"boolean",!1)}function zn(e,t,n,r,i,o){return e!==void 0?typeof e===i&&["boolean","number","string"].includes(i)||i==="array"&&Array.isArray(e)||i==="object"&&typeof e=="object"?e:typeof e=="function"?e(n,t,r.disabled,r.excontext):i==="any"?e:o:o}function Od(e,t,n){if((e==null?void 0:e.type)==="Step")return{};if(e.componentProps&&typeof e.componentProps=="object"){const r=T({},e.componentProps),i=Object.keys(r).filter(o=>o.startsWith("_v_"));if(i.length>0)for(const o in i){const a=i[o];if(a.startsWith("_v_")){const s=a.replace("_v_","");if(s&&Je(r[a]))try{r[s]=r[a](t,e,n.disabled,n.excontext)}catch(l){_e.error("console.form.dynamicPropertyError",{key:a},e,l)}finally{delete r[a]}}}return r}return{}}function rC(e,t,n,r,i,o,a){if(n.componentProps)if(i[e]!==void 0){const s=i[e];return typeof s=="function"?s(r,n,o.disabled,o.excontext):s}else return a;else return a}function iC(e,t,n,r,i){return typeof e=="function"?(...o)=>e(...o,t,n,r,i):()=>{}}function bn(e,t="default",n){if(!e||!Reflect.has(e,t))return null;if(!Je(e[t]))return _e.error("console.utils.slotError",{slot:t}),null;const r=e[t];return r?r(n):null}function Ad(e){if(typeof e=="number")return`${e}px`;if(typeof e=="string")return e.endsWith("%")||e.endsWith("px")?e:(_e.error("console.utils.styleWidthError",void 0,e),"")}function oC(e){for(const t in e)return e[t]}function an(e,t){return(n,r,i)=>{var a;if(r==null||r==="")return i();e(r)?i():i(new Error((a=n==null?void 0:n.message)!=null?a:ve(t)))}}function ku(){return{isRequired:{required:!0,message:ve("form.validation.required"),trigger:"change"},isRequiredArray:{required:!0,message:ve("form.validation.requiredArray"),trigger:"change",validator:an(e=>Array.isArray(e)&&e.length>0,"form.validation.requiredArray")},noSpace:{message:ve("form.validation.noSpace"),trigger:"change",validator:an(e=>typeof e=="string"?!/\s/.test(e):!0,"form.validation.noSpace")},isIdCard:{message:ve("form.validation.idCard"),trigger:"change",validator:an(e=>/^(?:\d{15}|\d{18}|\d{17}[\dX])$/.test(e),"form.validation.idCard")},isMobilePhone:{message:ve("form.validation.mobilePhone"),trigger:"change",validator:an(e=>/^1[3456789]\d{9}/.test(e),"form.validation.mobilePhone")},isTelephone:{message:ve("form.validation.telephone"),trigger:"change",validator:an(e=>/^[0-9+-]+/.test(e)&&/[0-9]/.test(e),"form.validation.telephone")},isCreditCode:{message:ve("form.validation.creditCode"),trigger:"change",validator:an(e=>/^[0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}/.test(e),"form.validation.creditCode")},isEmail:{message:ve("form.validation.email"),trigger:"change",validator:an(e=>/^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(.[a-zA-Z0-9_-]+)+/.test(e),"form.validation.email")},onlyNumber:{message:ve("form.validation.onlyNumber"),trigger:"change",validator:an(e=>/^[0-9]+/.test(e),"form.validation.onlyNumber")},onlyLetter:{message:ve("form.validation.onlyLetter"),trigger:"change",validator:an(e=>/^[a-zA-Z]+$/.test(e),"form.validation.onlyLetter")},normalText:{message:ve("form.validation.normalText"),trigger:"change",validator:an(e=>!/[^a-zA-Z0-9\u4e00-\u9fa5_\-#()()·.]/.test(e),"form.validation.normalText")},noChinese:{message:ve("form.validation.noChinese"),trigger:"change",validator:an(e=>!/[\u4e00-\u9fa5]/.test(e),"form.validation.noChinese")}}}function Zn(e,t,n,r){const i=Od(n,r.value,e),o=h.computed(()=>m()),a=h.computed(()=>_()),s=n.key||n.field;function l(){var C,N,R,O,w,x,I,M,L,B;return T({size:(C=e.size)!=null?C:"default",title:o.value,style:{width:"100%",margin:"10px 0"},direction:(O=(R=(N=e.schemaProps)==null?void 0:N.descriptionsProps)==null?void 0:R.direction)!=null?O:Sc.direction,column:(I=(x=(w=e.schemaProps)==null?void 0:w.descriptionsProps)==null?void 0:x.column)!=null?I:Sc.column,border:(B=(L=(M=e.schemaProps)==null?void 0:M.descriptionsProps)==null?void 0:L.border)!=null?B:Sc.border},Od(n,r.value,e))}function c(){var N,R,O,w,x,I,M,L,B,D,A,k,P,V;const E=n.descriptionsItemProps,C=(N=e.schemaProps)==null?void 0:N.descriptionsItemProps;return{label:o.value,span:(O=(R=E==null?void 0:E.span)!=null?R:C==null?void 0:C.span)!=null?O:1,rowspan:(w=E==null?void 0:E.rowspan)!=null?w:1,width:(I=(x=E==null?void 0:E.width)!=null?x:C==null?void 0:C.width)!=null?I:void 0,minWidth:(L=(M=E==null?void 0:E.minWidth)!=null?M:C==null?void 0:C.minWidth)!=null?L:"150px",labelWidth:(D=(B=E==null?void 0:E.labelWidth)!=null?B:C==null?void 0:C.labelWidth)!=null?D:void 0,align:(k=(A=E==null?void 0:E.align)!=null?A:C==null?void 0:C.align)!=null?k:"left",labelAlign:(V=(P=E==null?void 0:E.labelAlign)!=null?P:C==null?void 0:C.labelAlign)!=null?V:void 0,className:"ae-description-item-content",labelClassName:"ae-description-item-label"+(u()?" is-required":"")}}function d(){return H(T(T({},e.schemaProps.formItemProps||{}),n.formItemProps||{}),{prop:n.field||"",class:["ae-form-item",S(),v(),y(),f()].filter(E=>!!E).join(" "),required:g(),rules:p()})}function u(){var E,C,N,R,O;return(E=n.formItemProps)!=null&&E.required?!0:(N=(C=n.formItemProps)==null?void 0:C.autoRules)!=null&&N.length?n.formItemProps.autoRules.some(w=>w==="isRequired"||w==="isRequiredArray"):(O=(R=n.formItemProps)==null?void 0:R.rules)!=null&&O.length?n.formItemProps.rules.some(w=>w.required):!1}function p(){var E,C,N;if((C=(E=n.formItemProps)==null?void 0:E.autoRules)!=null&&C.length){const R=[],O=ku();if(n.formItemProps.autoRules.forEach(w=>{if(O[w]!==void 0){const x=Object.assign({},O[w]);x.message=x.message.replace("{label}",o.value),R.push(x)}}),R.length)return R}return((N=n.formItemProps)==null?void 0:N.rules)||[]}function m(){return nC(n,r.value,e)?"":xg(n,r.value,e)}function f(){return _()?"ae-form-item-is-disabled":""}function _(){var E,C,N;return e.disabled?!0:rC("disabled",!0,n,r.value,i,e,(N=(C=(E=e.schemaProps)==null?void 0:E.componentProps)==null?void 0:C.disabled)!=null?N:!1)}function g(){var E;if(!a.value)return(E=n.formItemProps)!=null&&E.required?!0:void 0}function S(){return a.value?"no-margin-bottom":""}function v(){var E;return((E=o==null?void 0:o.value)==null?void 0:E.length)===0||e.type==="desc"?"no-label":""}function y(){return!t||!Reflect.has(t,`${n.key||n.field}-error`)?"is-normal-label":""}function b(){var R,O;const E={},C=((R=n==null?void 0:n.insideProps)==null?void 0:R.slots)||{},N=((O=n==null?void 0:n.insideProps)==null?void 0:O.renders)||{};for(const w in N)if(!C.hasOwnProperty(w)){const x=N[w];Je(x)?E[w]=()=>x(r.value,n,e.disabled,e.excontext):typeof x=="string"&&(E[w]=()=>x)}for(const w in C)zn(C[w],n,r.value,e,"boolean",!1)&&(E[w]=()=>bn(t,`${s}--${w}`,r.value));return E}return{trueComponentProps:i,isDisabled:a,getFormItemProps:d,formItemLabel:o,slotKey:s,getDescriptionsProps:l,getDescriptionsSlots:b,getDescriptionItemProps:c}}const Ua=h.defineComponent({name:"SchemaLayout",props:{schema:{type:Object,required:!0},schemaProps:{type:Object,required:!0},itemKey:{type:String,required:!0},designable:{type:Boolean,default:!1},designableColProps:{type:Function,default:()=>{}},isHidden:{type:Boolean,default:!1}},setup(e,{slots:t}){const n=h.computed(()=>{var o,a,s,l,c,d,u,p,m,f,_,g;return{span:(c=(l=(o=e.schema.layoutProps)==null?void 0:o.span)!=null?l:(s=(a=e.schemaProps)==null?void 0:a.layoutProps)==null?void 0:s.span)!=null?c:12,alone:(f=(m=(d=e.schema.layoutProps)==null?void 0:d.alone)!=null?m:(p=(u=e.schemaProps)==null?void 0:u.layoutProps)==null?void 0:p.alone)!=null?f:!1,style:(g=(_=e.schema.layoutProps)==null?void 0:_.colStyle)!=null?g:{}}}),r=h.computed(()=>{var o;return(o=e.schema.type)!=null?o:"Inputer"}),i=["Container","Custom","Inputer","Decorator"];return()=>{var a;const o=e.designable?T({},((a=e.designableColProps)==null?void 0:a.call(e,e.itemKey,e.schema,e.isHidden))||{}):{};return n.value.alone&&i.includes(r.value)?h.createVNode(G.ElCol,H(T({class:"mb-2"},o),{span:24,key:e.itemKey,"data-id":e.itemKey,id:e.itemKey}),{default:()=>{var s;return[h.createVNode(G.ElRow,null,{default:()=>[h.createVNode(G.ElCol,{span:n.value.span,style:n.value.style},{default:()=>{var l;return[(l=t.default)==null?void 0:l.call(t)]}})]}),e.designable?(s=t.design)==null?void 0:s.call(t,e.schema):void 0]}}):h.createVNode(G.ElCol,H(T({class:"mb-2"},o),{span:n.value.span,key:e.itemKey,"data-id":e.itemKey,id:e.itemKey,style:n.value.style}),{default:()=>{var s,l;return[(s=t.default)==null?void 0:s.call(t),e.designable?(l=t.design)==null?void 0:l.call(t,e.schema):void 0]}})}}});function Rd(e,t,n){return!e||!t?!1:t.includes(".")?(We.set(e,t,n),!0):(e[t]=n,!0)}const aC=(e,t,n,r)=>{const i=()=>{if(Reflect.has(t,"options")){if(typeof t.options=="function")return t.options(n,e,r.disabled,r.excontext);if(Array.isArray(t.options))return t.options}return[]};return{renderCheckboxOptions:()=>{var u,p;const a=T(T({value:"value",label:"label"},(t==null?void 0:t.optionKeys)||{}),(t==null?void 0:t.props)||{}),s=(u=a.label)!=null?u:"label",l=(p=a.value)!=null?p:"value",c=e.component==="Checkbox"?G.ElCheckbox:G.ElCheckboxButton;return i().map(m=>{const S=m,{value:f,label:_}=S,g=co(S,["value","label"]);return h.createVNode(c,H(T({},g),{value:m[l]}),{default:()=>[m[s]]})})}}},sC=(e,t,n,r)=>{const i=()=>{if(Reflect.has(t,"options")){if(typeof t.options=="function")return t.options(n,e,r.disabled,r.excontext);if(Array.isArray(t.options))return t.options}return[]};return{renderRadioOptions:()=>{var u,p;const a=T(T({value:"value",label:"label"},(t==null?void 0:t.optionKeys)||{}),(t==null?void 0:t.props)||{}),s=(u=a.label)!=null?u:"label",l=(p=a.value)!=null?p:"value",c=e.component==="Radio"?G.ElRadio:G.ElRadioButton;return i().map(m=>{const S=m,{value:f,label:_}=S,g=co(S,["value","label"]);return h.createVNode(c,H(T({},g),{value:m[l]}),{default:()=>[m[s]]})})}}};function Ha(e,t,n,r,i,o,a,s,l){var b,E,C,N;const c=(b=r.type)!=null?b:fe.INPUTER,d=()=>{if([fe.CONTAINER,fe.INPUTER,fe.DECORATOR].includes(c))return Hr(a,(r==null?void 0:r.component)||"Input")?a[r.component]:void 0},u=[fe.INPUTER,fe.DECORATOR].includes(c)&&(C=(E=r.outsideProps)==null?void 0:E.enable)!=null?C:!1,p=(r.key||r.field).replace(/\./g,"-"),m=`${p}-${((N=r.componentProps)==null?void 0:N.freshKey)||0}`;function f(){var O,w;const R={};if(r.field){const x=Hr(a,r.component)&&((O=s[r.component])==null?void 0:O.modelValueKey)||"modelValue";R[x]=We.get(i.value,r.field),R[`onUpdate:${x}`]=I=>{const M=We.get(i.value,r.field);Rd(i.value,r.field,I),n("change",{value:I,field:r.field,oldValue:M})}}return r.field&&((w=r.componentProps)!=null&&w.vBinds)&&Object.entries(r.componentProps.vBinds).forEach(([x,I])=>{x&&I&&typeof I=="string"&&(R[x]=We.get(i.value,I),R[`onUpdate:${x}`]=M=>{const L=We.get(i.value,I);Rd(i.value,I,M),n("change",{value:M,field:r.field,oldValue:L})})}),R}function _(){var O;let R={};return c===fe.INPUTER?(R=T(T(T(T(T(T({},pC(r,e.schemaProps)),mC(r,e.schemaProps,e)),dC(r,i.value,e,l.value)),o||{}),uC(r,o,i.value,e)),cC(r,o)),lC(R,r),Reflect.has(R,"vBinds")&&delete R.vBinds,Reflect.has(R,"optionKeys")&&delete R.optionKeys):c===fe.CONTAINER?R=T({label:r.label||"",subLabel:((O=r==null?void 0:r.formItemProps)==null?void 0:O.subLabel)||""},o||{}):c===fe.DECORATOR&&(R=T({},o||{})),R}function g(){if(r.componentEvent){const R={};return Object.keys(r.componentEvent).forEach(O=>{const w=r.componentEvent[O];Je(w)&&(R[O]=iC(w,i.value,r,e.disabled,e.excontext))}),R}return{}}function S(){var R;if((R=r==null?void 0:r.outsideProps)!=null&&R.enable){if(r.outsideProps.hasOwnProperty("prependRender")&&Je(r.outsideProps.prependRender)&&!r.outsideProps.hasOwnProperty("prependSlot"))return r.outsideProps.prependRender(i.value,r,e.disabled,e.excontext)||void 0;if(r.outsideProps.hasOwnProperty("prependSlot")&&zn(r.outsideProps.prependSlot,r,i.value,e,"boolean",!1))return bn(t,`${p}--out-prepend`,i.value)}}function v(){var R;if((R=r==null?void 0:r.outsideProps)!=null&&R.enable){if(r.outsideProps.hasOwnProperty("appendRender")&&Je(r.outsideProps.appendRender)&&!r.outsideProps.hasOwnProperty("appendSlot"))return r.outsideProps.appendRender(i.value,r,e.disabled,e.excontext)||void 0;if(r.outsideProps.hasOwnProperty("appendSlot")&&zn(r.outsideProps.appendSlot,r,i.value,e,"boolean",!1))return bn(t,`${p}--out-append`,i.value)}}function y(){var x,I;const R={},O=((x=r==null?void 0:r.insideProps)==null?void 0:x.slots)||{},w=((I=r==null?void 0:r.insideProps)==null?void 0:I.renders)||{};for(const M in w)if(!O.hasOwnProperty(M)){const L=w[M];Je(L)?R[M]=()=>L(i.value,r,e.disabled,e.excontext):typeof L=="string"&&(R[M]=()=>L)}for(const M in O)zn(O[M],r,i.value,e,"boolean",!1)&&(R[M]=()=>bn(t,`${p}--${M}`,i.value));if(r.component&&Sg.includes(r.component))switch(r.component){case"Radio":case"RadioButton":{const{renderRadioOptions:M}=sC(r,o,i.value,e);R.default=()=>M();break}case"Checkbox":case"CheckboxButton":{const{renderCheckboxOptions:M}=aC(r,o,i.value,e);R.default=()=>M();break}}return R}return{getAnyComponent:d,setModelValue:f,setComponentProps:_,setComponentEvent:g,setInsideSlots:y,setOutsidePrepend:S,setOutsideAppend:v,freshKey:m,slotKey:p,enableOutside:u}}function lC(e,t){t.component&&Sg.includes(t.component)&&e.options!==void 0&&delete e.options}function cC(e,t){return e.component==="DatePicker"&&t.type&&jy.includes(t.type)?t.defaultTime?{defaultTime:t.defaultTime}:{defaultTime:[new Date().setHours(0,0,0,0),new Date().setHours(23,59,59,999)]}:{}}function dC(e,t,n,r){return!e.component||e.component!=="Table"?{}:{excontext:n.excontext,form:t,editable:!r,adaptive:!1}}function uC(e,t,n,r){if(!e.component)return{};if(qy.includes(e.component)&&Reflect.has(t,"options")){const i=T(T({disabled:"disabled",children:"children",value:"value",label:"label"},(t==null?void 0:t.optionKeys)||{}),(t==null?void 0:t.props)||{});if(typeof t.options=="function")return{options:t.options(n,e,r.disabled,r.excontext),props:i};if(Array.isArray(t.options))return{options:t.options,props:i}}return{}}function pC(e,t){var r,i,o;return((i=(r=t==null?void 0:t.componentProps)==null?void 0:r.clearable)!=null?i:!0)&&((o=e.type)!=null?o:fe.INPUTER)===fe.INPUTER&&e.component&&Yy.includes(e.component)?{clearable:!0}:{}}function mC(e,t,n){var o,a,s,l;const r=(a=(o=t==null?void 0:t.componentProps)==null?void 0:o.autoPlaceholder)!=null?a:!0,i=(s=t==null?void 0:t.componentProps)==null?void 0:s.setPlaceholderInDisabled;if((r||n.disabled&&i!==void 0)&&((l=e.type)!=null?l:fe.INPUTER)===fe.INPUTER){const d=["Autocomplete","Editor","Input","InputNumber","Mention"],u=["Cascader","DatePicker","Select","TimePicker","TimeSelect"],p=typeof(e==null?void 0:e.label)=="string"?e.label:"";if(d.includes(e.component))return n.disabled&&i!==void 0?{placeholder:i}:{placeholder:p?"请填写"+p:""};if(u.includes(e.component))return n.disabled&&i!==void 0?{startPlaceholder:i,endPlaceholder:i,rangeSeparator:"-",placeholder:i}:{startPlaceholder:p?"选择"+p:"",endPlaceholder:p?"选择"+p:"",rangeSeparator:"-",placeholder:p?"请选择"+p:""}}return{}}function yc(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!h.isVNode(e)}const ym=(e,t)=>{if(!t||Object.keys(t).length===0)return e;const n=Object.entries(t).map(([r,i])=>{const o=r.replace(/^v-/,""),a=h.resolveDirective(o);return a?[a,i]:null}).filter(Boolean);return n.length>0?h.withDirectives(e,n):e};function fC(e,t,n,r,i,o,a,s,l,c,d){function u(E,C,N){if(!E.component||!Hr(c,E.component)){_e.error("console.form.componentNotExist",{type:fe.CONTAINER,component:E.component},E);return}const{getAnyComponent:R,freshKey:O,setComponentProps:w,setInsideSlots:x}=Ha(e,r,t,E,i,C,c,d);return(()=>{const M=R();if(M!==void 0)return h.createVNode(M,H(T({},w()),{key:O}),H(T({},x()),{default:()=>N==null?void 0:N()}));_e.error("console.form.componentError",{type:fe.CONTAINER,component:E.component},E)})()}function p(E,C){if(!E.component||!Hr(c,E.component)){_e.error("console.form.componentNotExist",{type:fe.DECORATOR,component:E.component},E);return}const{enableOutside:N,setOutsideAppend:R,setOutsidePrepend:O,getAnyComponent:w,freshKey:x,setComponentProps:I,setComponentEvent:M,setInsideSlots:L}=Ha(e,r,t,E,i,C,c,d),B=()=>{const A=w();if(A!==void 0)return h.createVNode(A,H(T(T({},I()),M()),{key:x}),T({},L()));_e.error("console.form.componentError",{type:fe.DECORATOR,component:E.component},E)};return N?(()=>{var P,V;const A=((P=E==null?void 0:E.outsideProps)==null?void 0:P.direction)||"row",k=T({display:"flex",flexDirection:A,flexWrap:"wrap",alignItems:A==="row"?"center":"flex-start",width:"100%"},((V=E==null?void 0:E.outsideProps)==null?void 0:V.style)||{});return h.createVNode("div",{class:"ae-form-item-outside",style:k},[O(),B(),R()])})():B()}function m(E,C,N){if(!E.component||!Hr(c,E.component)){_e.error("console.form.componentNotExist",{type:fe.INPUTER,component:E.component},E);return}const{enableOutside:R,setOutsideAppend:O,setOutsidePrepend:w,getAnyComponent:x,freshKey:I,setModelValue:M,setComponentEvent:L,setComponentProps:B,setInsideSlots:D}=Ha(e,r,t,E,i,C,c,d,N),A=V=>{const W=E.key||E.field||"";V&&W&&Wy.includes(E.component)&&(a.value[`${W}Ref`]=V)},k=()=>{const V=x();if(V!==void 0)return h.createVNode(V,H(T(T(T({ref:W=>A(W)},M()),B()),L()),{disabled:N.value,key:I}),T({},D()));_e.error("console.form.componentError",{type:fe.INPUTER,component:E.component},E)};return R?(()=>{var Z,pe;const V=((Z=E==null?void 0:E.outsideProps)==null?void 0:Z.direction)||"row",W=T({display:"flex",flexDirection:V,flexWrap:"wrap",alignItems:V==="row"?"center":"flex-start",width:"100%"},((pe=E==null?void 0:E.outsideProps)==null?void 0:pe.style)||{});return h.createVNode("div",{class:"ae-form-item-outside",style:W},[w(),k(),O()])})():k()}function f(E){if((E==null?void 0:E.type)===fe.CUSTOM){if(Je(E.render))return E.render(i.value,E,e.disabled,e.excontext);const{slotKey:C}=Ha(e,r,t,E,i,{},c,d);if(r[C])return bn(r,C,i.value)}_e.error("console.form.customComponentError",void 0,E)}function _(E,C){const N=vc(C,i.value,e),R={width:"150px"};return N?h.createVNode(G.ElTooltip,{content:N,"popper-class":"ae-form-label-popper","popper-style":R},{default:()=>[h.createVNode("span",{class:"ae-description-item-label__text has-sub-label"},[E])]}):h.createVNode("span",{class:"ae-description-item-label__text"},[E])}function g(E,C){var R,O,w,x,I,M,L,B,D;if(((I=(x=(R=C.formItemProps)==null?void 0:R.labelPosition)!=null?x:(w=(O=e.schemaProps)==null?void 0:O.formItemProps)==null?void 0:w.labelPosition)!=null?I:"right")==="top"){if(Je((M=C.formItemProps)==null?void 0:M.subLabelRender)){const k=C.formItemProps.subLabelRender(i.value,C,e.disabled,e.excontext);return k?h.createVNode("div",{class:"ae-form-item-label"},[h.createVNode("div",{class:"label"},[E]),h.createVNode("div",{class:"sub-label"},[k])]):h.createVNode("div",{class:"ae-form-item-label"},[h.createVNode("div",{class:"label"},[E])])}const A=vc(C,i.value,e);return h.createVNode("div",{class:"ae-form-item-label"},[h.createVNode("div",{class:"label"},[E]),!!A&&h.createVNode("div",{class:"sub-label"},[A])])}else{const A={width:Ad((L=C.formItemProps)==null?void 0:L.labelMaxWidth)||"fit-content",lineHeight:(B=C.formItemProps)!=null&&B.labelMaxWidth?"var(--el-font-size-base, '14px')":"",marginTop:(D=C.formItemProps)!=null&&D.labelMaxWidth?"5px":""},k=vc(C,i.value,e);if(k){const P={width:"150px"};return h.createVNode(G.ElTooltip,{content:k,"popper-class":"ae-form-label-popper","popper-style":P},{default:()=>[h.createVNode("div",{class:"ae-form-item-label inline-flex"},[h.createVNode("span",{class:"label has-sub-label",style:A},[E])])]})}return h.createVNode("div",{class:"ae-form-item-label inline-flex"},[h.createVNode("span",{class:"label",style:A},[E])])}}function S(E){var O,w,x;const C=Ao(E,i.value,e);if(C&&!e.designable)return;const N=(O=E.key)!=null?O:E.field;if(!N){_e.error("console.form.keyRequired",void 0,E);return}switch((w=E.type)!=null?w:fe.INPUTER){case fe.STEP:_e.error("console.form.nestedStepNotSupported",void 0,E);return;case fe.DESCRIPTIONS:_e.error("console.form.nestedDescriptionsNotSupported",void 0,E);return;case fe.CUSTOM:{const{getFormItemProps:A,slotKey:k,formItemLabel:P}=Zn(e,r,E,i);return h.createVNode(Ua,{schema:E,schemaProps:e.schemaProps,"item-key":N,designable:e.designable,designableColProps:e.designableColProps,"is-hidden":C},T({default:()=>h.createVNode(G.ElFormItem,A(),H(T(T({},r[`${k}--label`]?{label:r[`${k}--label`]}:{label:()=>g(P.value,E)}),r[`${k}--error`]?{error:r[`${k}--error`]}:{}),{default:()=>f(E)}))},e.designable&&{design:V=>{var W;return(W=r.design)==null?void 0:W.call(r,V)}}))}case fe.CONTAINER:{const{trueComponentProps:A}=Zn(e,r,E,i),k=e.designable&&e.type!=="desc",P=k?((x=e.designableDirectives)==null?void 0:x.containerRow)||{}:{},V=P&&Object.keys(P).length>0?`container-row-${N}-designable`:`container-row-${N}`,W=()=>h.createVNode(G.ElRow,{class:{"ae-form-main__container_row":!0,"type-form":!0,"is-designable":e.designable},"data-id":`container-row-${N}`,key:V,gutter:10},{default:()=>{var Z;return[E.children?(Z=E.children)==null?void 0:Z.map(pe=>S(pe)):void 0]}});return h.createVNode(Ua,{schema:E,schemaProps:e.schemaProps,"item-key":N,designable:e.designable,designableColProps:e.designableColProps,"is-hidden":C},T({default:()=>u(E,A,()=>k?ym(W(),P):W())},e.designable&&{design:Z=>{var pe;return(pe=r.design)==null?void 0:pe.call(r,Z)}}))}case fe.DECORATOR:{const{trueComponentProps:A}=Zn(e,r,E,i);return h.createVNode(Ua,{schema:E,schemaProps:e.schemaProps,"item-key":N,designable:e.designable,designableColProps:e.designableColProps,"is-hidden":C},T({default:()=>p(E,A)},e.designable&&{design:k=>{var P;return(P=r.design)==null?void 0:P.call(r,k)}}))}case fe.INPUTER:default:const{trueComponentProps:I,isDisabled:M,getFormItemProps:L,slotKey:B,formItemLabel:D}=Zn(e,r,E,i);return h.createVNode(Ua,{schema:E,schemaProps:e.schemaProps,"item-key":N,designable:e.designable,designableColProps:e.designableColProps,"is-hidden":C},T({default:()=>h.createVNode(G.ElFormItem,L(),H(T(T({},r[`${B}--label`]?{label:r[`${B}--label`]}:{label:()=>g(D.value,E)}),r[`${B}--error`]?{error:r[`${B}--error`]}:{}),{default:()=>m(E,I,M)}))},e.designable&&{design:A=>{var k;return(k=r.design)==null?void 0:k.call(r,A)}}))}}function v(E){var w,x,I;if(Ao(E,i.value,e))return;const N=(w=E.key)!=null?w:E.field;if(!N){_e.error("console.form.keyRequired",void 0,E);return}const{getDescriptionsProps:R,getDescriptionsSlots:O}=Zn(e,r,E,i);return h.createVNode(G.ElCol,{span:(I=(x=E.layoutProps)==null?void 0:x.span)!=null?I:24},{default:()=>[h.createVNode(G.ElDescriptions,H(T({},R()),{key:`container-row-${N}`,"data-id":`container-row-${N}`}),H(T({},O()),{default:()=>E.children?E.children.map(M=>y(M)):void 0}))]})}function y(E){var O,w;if(Ao(E,i.value,e))return;const N=(O=E.key)!=null?O:E.field;if(!N){_e.error("console.form.keyRequired",void 0,E);return}switch((w=E.type)!=null?w:fe.INPUTER){case fe.STEP:_e.error("console.form.nestedStepNotSupported",void 0,E);return;case fe.CONTAINER:_e.error("console.form.nestedContainerNotSupported",void 0,E);return;case fe.DESCRIPTIONS:_e.error("console.form.nestedDescriptionsNotSupported",void 0,E);return;case fe.CUSTOM:{const{formItemLabel:x,getFormItemProps:I,getDescriptionItemProps:M}=Zn(e,r,E,i);return h.createVNode(G.ElDescriptionsItem,H(T({},M()),{key:N}),{label:()=>_(x.value,E),default:()=>h.createVNode(G.ElFormItem,I(),{default:()=>f(E)})})}case fe.DECORATOR:{const{formItemLabel:x,trueComponentProps:I,getDescriptionItemProps:M}=Zn(e,r,E,i);return h.createVNode(G.ElDescriptionsItem,H(T({},M()),{key:N}),{label:()=>_(x.value,E),default:()=>p(E,I)})}case fe.INPUTER:default:{const{trueComponentProps:x,isDisabled:I,getFormItemProps:M,formItemLabel:L,getDescriptionItemProps:B}=Zn(e,r,E,i);return h.createVNode(G.ElDescriptionsItem,H(T({},B()),{key:N}),{label:()=>_(L.value,E),default:()=>{let D;return h.createVNode(G.ElFormItem,M(),yc(D=m(E,x,I))?D:{default:()=>[D]})}})}}}function b(){const E=x=>{if(e.stepValue!==null){const I=x.find(M=>(M==null?void 0:M.type)===fe.STEP&&M.step===e.stepValue);return I?I.children||[]:[]}else return x},C=()=>{var A;const x=E(e.schemas),I=k=>{s.value=k},M=e.designable&&e.type!=="desc",L=M?((A=e.designableDirectives)==null?void 0:A.baseRow)||{}:{},B=M&&Object.keys(L).length>0?"base-row-designable":"base-row",D=()=>{let k;return h.createVNode(G.ElRow,{ref:P=>I(P),"data-id":"base-row",key:B,class:{"ae-form-main__base_row":!0,"type-form":!0,"is-designable":e.designable},gutter:10},yc(k=x.map(P=>S(P)))?k:{default:()=>[k]})};return M?ym(D(),L):D()},N=()=>{let x;const M=E(e.schemas).filter(B=>B.type==fe.CONTAINER||B.type===fe.DESCRIPTIONS?!0:(_e.error("console.form.wrapInDescriptions",void 0,B),!1)).map(B=>H(T({},B),{type:fe.DESCRIPTIONS})),L=B=>{s.value=B};return h.createVNode(G.ElRow,{ref:B=>L(B),"data-id":"base-row",key:"base-row",class:"ae-form-main__base_row type-desc",gutter:10},yc(x=M.map(B=>v(B)))?x:{default:()=>[x]})},R=()=>{const x=T(T({},e),n);return["model","schemas","stepValue","disabled","type","designable","designableDirectives","designableColProps","excontext","schemaProps","showErrorNotice","scrollRef","autoInitField","imports","anchor","anchorProps","anchorAffixStyle"].forEach(M=>delete x[M]),x},O=x=>{o.value=x},w={"ae-form-main":!0,"is-designable":e.designable};return h.createVNode(G.ElForm,H(T({class:w,ref:x=>O(x)},R()),{model:i.value}),{default:()=>e.type==="form"?C():N()})}return{renderForm:b}}const Mu=(e,t)=>{const n=Array.isArray(e)?e:[e];for(const r of n){if(t(r))return r;if(r.children&&Array.isArray(r.children)&&r.children.length>0){const i=Mu(r.children,t);if(i)return i}}return null};function Ig(e,t){const n=[];function r(i){for(const o of i)t(o)&&n.push(o),o.children&&o.children.length>0&&r(o.children)}return r(e),n}function hC(e,t,n,r){const i=h.ref(!1),o=h.ref({}),a=h.ref(),s=h.ref(),l=h.ref([]),c=h.ref({});function d(O){o.value=T(T({},u(O)),O),setTimeout(()=>{v()},200)}function u(O){const w=T({},O),x=I=>{var B;const M=(B=I.type)!=null?B:fe.INPUTER;if(!I.field||![fe.CUSTOM,fe.INPUTER].includes(M)){[fe.STEP,fe.CONTAINER,fe.DESCRIPTIONS].includes(M)&&I.children&&Array.isArray(I.children)&&I.children.forEach(D=>{x(D)});return}if(We.get(w,I.field)!==void 0)return;if(I.value!==void 0){We.set(w,I.field,tC(I,w,e));return}const L=I.component;if(L&&r[L]){const D=Od(I,w,e),A=r[L](D);We.set(w,I.field,A?[]:null);return}We.set(w,I.field,null)};return t.forEach(I=>x(I)),w}function p(){return o.value}function m(){return h.unref(a)}function f(O={}){o.value=Object.assign(h.unref(o),O)}function _(O){o.value=T({},u(O)),setTimeout(()=>{v()},200)}function g(O,w){O.includes(".")?We.set(o.value,O,w):o.value[O]=w}function S(O){return We.get(o.value,O)!==void 0?(We.unset(o.value,O),!0):!1}function v(){var w;(w=h.unref(a))==null||w.clearValidate();const O=b();O!=null&&O.length&&O.forEach(x=>{const I=y(x.key||x.field);I&&(I==null||I.resetValidate())})}const y=O=>O?c.value[`${O}Ref`]:void 0,b=()=>{const O=h.toRaw(t);return Ig(O,w=>w.component==="Table"&&!Ao(w,o.value,e))},E=()=>Lt(this,null,function*(){const O=b();if(O!=null&&O.length)for(const w of O){const x=y(w.key||w.field);if(x&&(yield x==null?void 0:x.validate())===!1){const M=(w==null?void 0:w.label)||(w==null?void 0:w.field);return M&&e.showErrorNotice&&G.ElNotification({title:ve("form.validation.tableError",{field:M}),message:ve("form.validation.checkTable"),type:"warning"}),!1}}return!0}),C=(O,w)=>{if(!O){const x=oC(w),I=Mu(e.schemas,M=>M.field===x[0].field);if(e.scrollRef&&I){const M=e.scrollRef,L=I.key||I.field;try{const B=M.querySelector(`[data-id="${CSS.escape(L)}"]`);B&&B.scrollIntoView({behavior:"smooth",block:"center"})}catch(B){console.error("[AeForm] scrollRef is invalid",B)}}if(e.showErrorNotice&&I){const M=(I==null?void 0:I.label)||(I==null?void 0:I.field);M&&G.ElNotification({title:ve("form.validation.fieldError",{field:M}),message:x[0].message,type:"warning"})}}};function N(){return Lt(this,null,function*(){var O;i.value=!0;try{const w=yield(O=h.unref(a))==null?void 0:O.validate(C),x=yield E();return w&&x}finally{i.value=!1}})}function R(O){if(e.scrollRef&&O){const x=e.scrollRef.querySelector(`[data-id="${CSS.escape(O)}"]`);x&&x.scrollIntoView({behavior:"smooth",block:"center"})}}return{isValidating:i,formModel:o,elFormRef:a,baseElRowRef:s,schemasKeys:l,componentRefs:c,initValues:d,getDefaultModel:u,getFormModel:p,getElFormRef:m,setValues:f,clearValues:_,setValue:g,delValue:S,resetValidate:v,validate:N,scrollToKey:R}}function _C(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!h.isVNode(e)}function gC(e,t){const n=o=>{var a,s;if(o.type==="Container"||o.type==="Descriptions"){if(((a=o.anchorLinkProps)==null?void 0:a.enable)===!1)return!1}else if(o.type==="Decorator"){if(((s=o.anchorLinkProps)==null?void 0:s.enable)!==!0)return!1}else return!1;return!Ao(o,t.value,e)},r=o=>o.filter(n).map(a=>{var p,m,f;const s=a.key||a.field,l=((p=a.anchorLinkProps)==null?void 0:p.title)||xg(a,t.value,e)||s,c=((m=a.anchorLinkProps)==null?void 0:m.href)||`#${s}`,u=(a.type==="Container"||a.type==="Descriptions")&&((f=a.children)==null?void 0:f.some(n));return h.createVNode(G.ElAnchorLink,{key:s,title:l,href:c},{default:()=>[u&&r(a.children)]})});return{renderAnchor:()=>{let o;if(!e.schemas||e.schemas.length<1)return;const a=T({position:"fixed",left:"20px",top:"100px",width:"100px",zIndex:20,padding:"10px 10px 10px 0",background:"var(--el-bg-color)",borderRadius:"var(--el-border-radius-base)"},e.anchorAffixStyle);return h.createVNode("div",{class:"ae-form-anchor",style:a},[h.createVNode(G.ElAnchor,e.anchorProps,_C(o=r(e.schemas))?o:{default:()=>[o]})])}}}function EC(e,t,n,r,i){return e.pagination?h.createVNode(G.ElPagination,H(T({pageSize:t.value,"onUpdate:pageSize":o=>t.value=o,currentPage:n.value,"onUpdate:currentPage":o=>n.value=o,class:"ae-table-pagination"},h.unref(r)),{onChange:i}),null):void 0}const Cc="el",bC="is-",Ir=(e,t,n,r,i)=>{let o=`${e}-${t}`;return n&&(o+=`-${n}`),r&&(o+=`__${r}`),i&&(o+=`--${i}`),o},SC=Symbol("namespaceContextKey"),Lu=e=>{const t=h.getCurrentInstance()?h.inject(SC,h.ref(Cc)):h.ref(Cc);return h.computed(()=>h.unref(t)||Cc)},Tr=(e,t)=>{const n=Lu();return{namespace:n,b:(_="")=>Ir(n.value,e,_,"",""),e:_=>_?Ir(n.value,e,"",_,""):"",m:_=>_?Ir(n.value,e,"","",_):"",be:(_,g)=>_&&g?Ir(n.value,e,_,g,""):"",em:(_,g)=>_&&g?Ir(n.value,e,"",_,g):"",bm:(_,g)=>_&&g?Ir(n.value,e,_,"",g):"",bem:(_,g,S)=>_&&g&&S?Ir(n.value,e,_,g,S):"",is:(_,...g)=>{const S=g.length>=1?g[0]:!0;return _&&S?`${bC}${_}`:""},cssVar:_=>{const g={};for(const S in _)_[S]&&(g[`--${n.value}-${S}`]=_[S]);return g},cssVarName:_=>`--${n.value}-${_}`,cssVarBlock:_=>{const g={};for(const S in _)_[S]&&(g[`--${n.value}-${e}-${S}`]=_[S]);return g},cssVarBlockName:_=>`--${n.value}-${e}-${_}`}};/**
|
|
1
|
+
"use strict";var Vy=Object.defineProperty,Gy=Object.defineProperties;var zy=Object.getOwnPropertyDescriptors;var Ba=Object.getOwnPropertySymbols;var _m=Object.prototype.hasOwnProperty,gm=Object.prototype.propertyIsEnumerable;var gc=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e);var Ec=(e,t,n)=>t in e?Vy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,T=(e,t)=>{for(var n in t||(t={}))_m.call(t,n)&&Ec(e,n,t[n]);if(Ba)for(var n of Ba(t))gm.call(t,n)&&Ec(e,n,t[n]);return e},H=(e,t)=>Gy(e,zy(t));var co=(e,t)=>{var n={};for(var r in e)_m.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ba)for(var r of Ba(e))t.indexOf(r)<0&&gm.call(e,r)&&(n[r]=e[r]);return n};var xr=(e,t,n)=>Ec(e,typeof t!="symbol"?t+"":t,n);var Lt=(e,t,n)=>new Promise((r,i)=>{var o=l=>{try{s(n.next(l))}catch(c){i(c)}},a=l=>{try{s(n.throw(l))}catch(c){i(c)}},s=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,a);s((n=n.apply(e,t)).next())}),bc=function(e,t){this[0]=e,this[1]=t},Em=(e,t,n)=>{var r=(a,s,l,c)=>{try{var d=n[a](s),u=(s=d.value)instanceof bc,p=d.done;Promise.resolve(u?s[0]:s).then(m=>u?r(a==="return"?a:"next",s[1]?{done:m.done,value:m.value}:m,l,c):l({value:m,done:p})).catch(m=>r("throw",m,l,c))}catch(m){c(m)}},i=a=>o[a]=s=>new Promise((l,c)=>r(a,s,l,c)),o={};return n=n.apply(e,t),o[gc("asyncIterator")]=()=>o,i("next"),i("throw"),i("return"),o};var bm=(e,t,n)=>(t=e[gc("asyncIterator")])?t.call(e):(e=e[gc("iterator")](),t={},n=(r,i)=>(i=e[r])&&(t[r]=o=>new Promise((a,s,l)=>(o=i.call(e,o),l=o.done,Promise.resolve(o.value).then(c=>a({value:c,done:l}),s)))),n("next"),n("return"),t);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("vue"),G=require("element-plus"),We=require("lodash-es"),ct=require("@vueuse/core"),$y=require("@iconify/vue"),Du=require("dayjs"),Sc={border:!0,column:3,direction:"horizontal"},fe={STEP:"Step",CONTAINER:"Container",DECORATOR:"Decorator",INPUTER:"Inputer",CUSTOM:"Custom",DESCRIPTIONS:"Descriptions"},Yy=["Autocomplete","Cascader","DatePicker","Editor","Input","InputNumber","Mention","Select","TimePicker","TimeSelect"],qy=["Select","Radio","Checkbox","Cascader","Transfer","Segmented"],Sg=["RadioButton","CheckboxButton"],jy=["years","months","dates","datetimerange","daterange","monthrange","yearrange"],Wy=["Table"],vg=e=>Array.isArray(e);function Je(e){return e!==void 0&&typeof e=="function"}function Sm(e){return typeof e=="number"}function Hr(e,t){return Reflect.has(e,t)}const yg={name:"简体中文",common:{confirm:"确定",cancel:"取消",save:"保存",delete:"删除",edit:"编辑",view:"查看",search:"搜索",reset:"重置",submit:"提交",close:"关闭",back:"返回",next:"下一步",prev:"上一步",loading:"加载中...",noData:"暂无数据",more:"更多"},table:{copy:{success:"复制成功",failed:"复制失败"},selection:{selected:"当前已选择",items:"条数据"},action:{more:"更多"},empty:"-"},form:{placeholder:{input:"请填写{label}",select:"请选择{label}",date:"选择日期",time:"选择时间",startDate:"开始日期",endDate:"结束日期",startTime:"开始时间",endTime:"结束时间"},validation:{required:"{label}不能为空",requiredArray:"请至少选择一个{label}",noSpace:"{label}不得包含空格",normalText:"{label}只能包含中文、英文、数字",idCard:"请输入正确的身份证号码",mobilePhone:"请输入正确的手机号码",telephone:"请输入正确的电话号码",noChinese:"{label}不能包含中文",creditCode:"请输入正确的统一社会信用代码",onlyNumber:"{label}只能输入数字",onlyLetter:"{label}只能输入字母",email:"请输入正确的邮箱地址",fieldError:"{field} 填写有误",tableError:"{field} 填写有误",checkTable:"请检查表格是否按要求填写"}},upload:{button:"点击上传",drag:"将文件拖到此处",dragTip:"或点击上传",preview:"预览",download:"下载",delete:"删除",uploading:"上传中...",uploadSuccess:"上传成功",uploadFailed:"上传失败",fileSizeExceeded:"文件大小超出限制",fileTypeError:"文件类型不符合要求",fileCountExceeded:"文件数量超出限制",fileCountLimit:"最多只能上传 {limit} 个文件",fileSizeLimit:"文件大小不能超过 {size}",uploadFunctionRequired:"未配置上传函数",previewNotSupported:"该文件不支持预览",downloadNotSupported:"暂不支持下载"},pagination:{total:"共 {total} 条",goto:"前往",page:"页",itemsPerPage:"条/页"},console:{table:{rowKeyRequired:"[AeTable] 启用选择功能时需要设置 rowKey 属性",columnMissingKey:"[AeTable] 列 {label} 缺少 key 属性,请添加 key",unknownColumnType:"[AeTable] 未知的列类型: {type}",dictTypePropsRequired:"[AeTable] 列使用了 dict 类型但未配置 typeProps,无法正常解析字典。请检查列配置",sensitiveTypeRequired:"[AeTable] 列使用了 sensitive 类型,但未设置 sensitiveType 或 sensitiveRegex 属性,请检查列配置",noDesensitizationMethod:"[AeTable] 不存在 {type} 类型的脱敏方法",actionTypeRequired:"[AeTable] 列使用了 action 类型,但未配置 actions 属性,请检查列配置",actionEventError:"[AeTable] 操作按钮事件执行错误",actionNotFound:"[AeTable] dropdownActions 中不存在操作: {command}",componentExists:"[AeTable] 组件 {name} 已存在,将被覆盖",componentNotExist:"[AeTable] 注册组件数组策略失败,因为组件 {name} 不存在",configExists:"[AeTable] 组件配置 {name} 已存在,将被覆盖",componentRegistered:"[AeTable] 通过 imports 属性导入的组件 {name} 已成功注册!",editFieldRequired:"[AeTable] 编辑组件未设置 field 属性,请检查列配置",editComponentError:"[AeTable] 配置错误,请检查 column.editProps.component 是否正确,请检查列配置"},form:{componentNotExist:"[AeForm] {type} 类型组件配置异常,组件 {component} 不存在",componentError:"[AeForm] {type} 类型组件配置异常,请检查组件 {component} 是否正确!",customComponentError:"[AeForm] 自定义组件配置异常,如果您预期使用自定义渲染组件,请使用 render 属性或 slot 编写组件内容",keyRequired:"[AeForm] 组件必须设置 key 属性或 field 属性,无法渲染 schema",nestedStepNotSupported:"[AeForm] 不支持嵌套 Step 类型子组件,无法渲染 schema",nestedDescriptionsNotSupported:"[AeForm] 不支持嵌套 Descriptions 类型子组件,无法渲染 schema",nestedContainerNotSupported:"[AeForm] 不支持嵌套 Container 类型子组件,无法渲染 schema",wrapInDescriptions:"[AeForm] 在 desc 模式下,请将所有组件包裹在 Descriptions 组件内,当前组件未包裹在 Descriptions 内,请检查 schema",expressionCompileError:"表达式编译失败: {code}",expressionExecuteError:"表达式执行失败: {code}",dynamicPropertyError:"动态属性 {key} 设置错误",componentExists:"[AeForm] 组件 {name} 已存在,将被覆盖",configExists:"[AeForm] 组件配置 {name} 已存在,将被覆盖",componentRegistered:"[AeForm] 通过 imports 属性导入的组件 {name} 已成功注册!"},upload:{compressError:"图片压缩失败"},utils:{slotError:"{slot} 不是一个方法函数",styleWidthError:'width 值必须为 百分比 或 以"px"单位为后缀 或 是一个整数'},format:{invalidDate:'无法将输入值 "{value}" 解析为有效日期',dateFormatError:'格式化日期时发生错误。输入值: "{value}", 格式: "{format}"'}}},Cg={name:"English",common:{confirm:"Confirm",cancel:"Cancel",save:"Save",delete:"Delete",edit:"Edit",view:"View",search:"Search",reset:"Reset",submit:"Submit",close:"Close",back:"Back",next:"Next",prev:"Previous",loading:"Loading...",noData:"No Data",more:"More"},table:{copy:{success:"Copied successfully",failed:"Copy failed"},selection:{selected:"Selected",items:"items"},action:{more:"More"},empty:"-"},form:{placeholder:{input:"Please enter {label}",select:"Please select {label}",date:"Select date",time:"Select time",startDate:"Start date",endDate:"End date",startTime:"Start time",endTime:"End time"},validation:{required:"{label} is required",requiredArray:"Please select at least one {label}",noSpace:"{label} cannot contain spaces",normalText:"{label} can only contain Chinese, English, and numbers",idCard:"Please enter a valid ID card number",mobilePhone:"Please enter a valid mobile phone number",telephone:"Please enter a valid telephone number",noChinese:"{label} cannot contain Chinese characters",creditCode:"Please enter a valid unified social credit code",onlyNumber:"{label} can only contain numbers",onlyLetter:"{label} can only contain letters",email:"Please enter a valid email address",fieldError:"{field} is invalid",tableError:"{field} is invalid",checkTable:"Please check if the table is filled in as required"}},upload:{button:"Click to upload",drag:"Drop file here",dragTip:"or click to upload",preview:"Preview",download:"Download",delete:"Delete",uploading:"Uploading...",uploadSuccess:"Upload successful",uploadFailed:"Upload failed",fileSizeExceeded:"File size exceeds limit",fileTypeError:"File type does not meet requirements",fileCountExceeded:"File count exceeds limit",fileCountLimit:"Maximum {limit} files can be uploaded",fileSizeLimit:"File size cannot exceed {size}",uploadFunctionRequired:"Upload function is not configured",previewNotSupported:"This file does not support preview",downloadNotSupported:"Download is not supported yet"},pagination:{total:"Total {total} items",goto:"Go to",page:"",itemsPerPage:"items/page"},console:{table:{rowKeyRequired:"[AeTable] rowKey is required when selection is enabled",columnMissingKey:"[AeTable] column {label} is missing key, please add key to column",unknownColumnType:"[AeTable] Unknown column type: {type}",dictTypePropsRequired:'[AeTable] Column used "dict" type but did not configure "typeProps", unable to parse the dictionary normally. Please check the column',sensitiveTypeRequired:'[AeTable] Column used "sensitive" type, but "sensitiveType" or "sensitiveRegex" attributes were not set, please check the column',noDesensitizationMethod:"[AeTable] There is no desensitization method for type {type}",actionTypeRequired:'[AeTable] The column uses "action" type, but "actions" property is not configured, please check the column',actionEventError:"[AeTable] Action event error",actionNotFound:"[AeTable] dropdownActions does not contain action: {command}",componentExists:"[AeTable] The component {name} already exists and will be overwritten",componentNotExist:"[AeTable] Failed to register component array strategy because the component {name} does not exist",configExists:"[AeTable] The component configuration {name} already exists and will be overwritten",componentRegistered:"[AeTable] The component {name} imported via the imports property has been successfully registered!",editFieldRequired:"[AeTable] The edit component has not set the field property. please check column",editComponentError:'[AeTable] Configuration error, please check if "column.editProps.component" is correct, please check column'},form:{componentNotExist:"[AeForm] The configuration of the {type} type component is abnormal, The component {component} does not exist",componentError:"[AeForm] The configuration of the {type} type component is abnormal, please check if the component {component} is correct!",customComponentError:"[AeForm] Custom component configuration exception, if you expect to use a custom render component, please write the component content using the render property or slot!",keyRequired:"[AeForm] The component must set the key property or the field property, unable to render schema",nestedStepNotSupported:"[AeForm] Unsupported nested Step type child components, unable to render schema",nestedDescriptionsNotSupported:"[AeForm] Nested Descriptions type child components are not supported, unable to render schema",nestedContainerNotSupported:"[AeForm] Nested Container type child components are not supported, cannot render schema",wrapInDescriptions:"[AeForm] In desc mode, please wrap all components within the Descriptions component, the current component is not wrapped within Descriptions, please check schema",expressionCompileError:"Expression compile failed: {code}",expressionExecuteError:"Expression execute failed: {code}",dynamicPropertyError:"Dynamic property {key} error",componentExists:"[AeForm] The component {name} already exists and will be overwritten",configExists:"[AeForm] The component configuration {name} already exists and will be overwritten",componentRegistered:"[AeForm] The component {name} imported via the imports property has been successfully registered!"},upload:{compressError:"Image compression failed"},utils:{slotError:"slot {slot} is not a function",styleWidthError:'The width value must be a percentage, have the "px" unit suffix, or be an integer.'},format:{invalidDate:'Unable to parse input value "{value}" as a valid date',dateFormatError:'Error formatting date. Input value: "{value}", Format: "{format}"'}}};function yo(e,t){return e.replace(/\{(\w+)\}/g,(n,r)=>t[r]!==void 0?String(t[r]):n)}function vm(e,t){return t?yo(e,{label:t}):e}class Qn{static warn(t,n,...r){const i=n?yo(ve(t),n):ve(t);console.warn(i,...r)}static error(t,n,...r){const i=n?yo(ve(t),n):ve(t);console.error(i,...r)}static log(t,n,...r){const i=n?yo(ve(t),n):ve(t);console.log(i,...r)}static success(t,n){const r=n?yo(ve(t),n):ve(t);console.log(`%c✓ ${r}`,"color: #4CAF50;")}}const _e={warn:Qn.warn.bind(Qn),error:Qn.error.bind(Qn),log:Qn.log.bind(Qn),success:Qn.success.bind(Qn)},Zr=h.ref("zh-CN"),Tg={"zh-CN":yg,"en-US":Cg},Ng={};function Ky(){const e=Tg[Zr.value],t=Ng[Zr.value]||{};return Xy(e,t)}const Og=[];function Qy(e){Og.push(e),e(Zr.value)}function Ag(e){if(!Tg[e]){console.warn(`[AdvancedEleUI] Locale "${e}" is not supported. Using "zh-CN" instead.`),Zr.value="zh-CN";return}Zr.value=e,Og.forEach(t=>t(e))}function Zy(){return Zr.value}function Rg(e,t){Ng[e]=t}function ve(e,t,n){typeof t=="string"&&(n=t,t=void 0);const r=Ky(),i=e.split(".");let o=r;for(const s of i)if(o&&typeof o=="object"&&s in o)o=o[s];else return n||e;let a=typeof o=="string"?o:n||e;return t&&typeof t=="object"&&Object.keys(t).forEach(s=>{a=a.replace(new RegExp(`\\{${s}\\}`,"g"),String(t[s]))}),a}function Xy(e,t){return wg(e,t)}function wg(e,t){const n=T({},e);for(const r in t){const i=t[r],o=n[r];i&&typeof i=="object"&&!Array.isArray(i)?o&&typeof o=="object"&&!Array.isArray(o)?n[r]=wg(o,i):n[r]=i:i!==void 0&&(n[r]=i)}return n}const Jy=h.computed(()=>Zr.value),eC=["zh-CN","en-US"];function Ao(e,t,n){return zn(e.hidden,e,t,n,"boolean",!1)}function tC(e,t,n){return zn(e.value,e,t,n,"any",null)}function xg(e,t,n){return zn(e.label,e,t,n,"string","")}function vc(e,t,n){var r;return zn((r=e.formItemProps)==null?void 0:r.subLabel,e,t,n,"string","")}function nC(e,t,n){var r;return zn((r=e.formItemProps)==null?void 0:r.noLabel,e,t,n,"boolean",!1)}function zn(e,t,n,r,i,o){return e!==void 0?typeof e===i&&["boolean","number","string"].includes(i)||i==="array"&&Array.isArray(e)||i==="object"&&typeof e=="object"?e:typeof e=="function"?e(n,t,r.disabled,r.excontext):i==="any"?e:o:o}function Od(e,t,n){if((e==null?void 0:e.type)==="Step")return{};if(e.componentProps&&typeof e.componentProps=="object"){const r=T({},e.componentProps),i=Object.keys(r).filter(o=>o.startsWith("_v_"));if(i.length>0)for(const o in i){const a=i[o];if(a.startsWith("_v_")){const s=a.replace("_v_","");if(s&&Je(r[a]))try{r[s]=r[a](t,e,n.disabled,n.excontext)}catch(l){_e.error("console.form.dynamicPropertyError",{key:a},e,l)}finally{delete r[a]}}}return r}return{}}function rC(e,t,n,r,i,o,a){if(n.componentProps)if(i[e]!==void 0){const s=i[e];return typeof s=="function"?s(r,n,o.disabled,o.excontext):s}else return a;else return a}function iC(e,t,n,r,i){return typeof e=="function"?o=>e(o,t,n,r,i):()=>{}}function bn(e,t="default",n){if(!e||!Reflect.has(e,t))return null;if(!Je(e[t]))return _e.error("console.utils.slotError",{slot:t}),null;const r=e[t];return r?r(n):null}function Ad(e){if(typeof e=="number")return`${e}px`;if(typeof e=="string")return e.endsWith("%")||e.endsWith("px")?e:(_e.error("console.utils.styleWidthError",void 0,e),"")}function oC(e){for(const t in e)return e[t]}function an(e,t){return(n,r,i)=>{var a;if(r==null||r==="")return i();e(r)?i():i(new Error((a=n==null?void 0:n.message)!=null?a:ve(t)))}}function ku(){return{isRequired:{required:!0,message:ve("form.validation.required"),trigger:"change"},isRequiredArray:{required:!0,message:ve("form.validation.requiredArray"),trigger:"change",validator:an(e=>Array.isArray(e)&&e.length>0,"form.validation.requiredArray")},noSpace:{message:ve("form.validation.noSpace"),trigger:"change",validator:an(e=>typeof e=="string"?!/\s/.test(e):!0,"form.validation.noSpace")},isIdCard:{message:ve("form.validation.idCard"),trigger:"change",validator:an(e=>/^(?:\d{15}|\d{18}|\d{17}[\dX])$/.test(e),"form.validation.idCard")},isMobilePhone:{message:ve("form.validation.mobilePhone"),trigger:"change",validator:an(e=>/^1[3456789]\d{9}/.test(e),"form.validation.mobilePhone")},isTelephone:{message:ve("form.validation.telephone"),trigger:"change",validator:an(e=>/^[0-9+-]+/.test(e)&&/[0-9]/.test(e),"form.validation.telephone")},isCreditCode:{message:ve("form.validation.creditCode"),trigger:"change",validator:an(e=>/^[0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}/.test(e),"form.validation.creditCode")},isEmail:{message:ve("form.validation.email"),trigger:"change",validator:an(e=>/^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(.[a-zA-Z0-9_-]+)+/.test(e),"form.validation.email")},onlyNumber:{message:ve("form.validation.onlyNumber"),trigger:"change",validator:an(e=>/^[0-9]+/.test(e),"form.validation.onlyNumber")},onlyLetter:{message:ve("form.validation.onlyLetter"),trigger:"change",validator:an(e=>/^[a-zA-Z]+$/.test(e),"form.validation.onlyLetter")},normalText:{message:ve("form.validation.normalText"),trigger:"change",validator:an(e=>!/[^a-zA-Z0-9\u4e00-\u9fa5_\-#()()·.]/.test(e),"form.validation.normalText")},noChinese:{message:ve("form.validation.noChinese"),trigger:"change",validator:an(e=>!/[\u4e00-\u9fa5]/.test(e),"form.validation.noChinese")}}}function Zn(e,t,n,r){const i=Od(n,r.value,e),o=h.computed(()=>m()),a=h.computed(()=>_()),s=n.key||n.field;function l(){var C,N,R,O,w,x,I,M,L,B;return T({size:(C=e.size)!=null?C:"default",title:o.value,style:{width:"100%",margin:"10px 0"},direction:(O=(R=(N=e.schemaProps)==null?void 0:N.descriptionsProps)==null?void 0:R.direction)!=null?O:Sc.direction,column:(I=(x=(w=e.schemaProps)==null?void 0:w.descriptionsProps)==null?void 0:x.column)!=null?I:Sc.column,border:(B=(L=(M=e.schemaProps)==null?void 0:M.descriptionsProps)==null?void 0:L.border)!=null?B:Sc.border},Od(n,r.value,e))}function c(){var N,R,O,w,x,I,M,L,B,D,A,k,P,V;const E=n.descriptionsItemProps,C=(N=e.schemaProps)==null?void 0:N.descriptionsItemProps;return{label:o.value,span:(O=(R=E==null?void 0:E.span)!=null?R:C==null?void 0:C.span)!=null?O:1,rowspan:(w=E==null?void 0:E.rowspan)!=null?w:1,width:(I=(x=E==null?void 0:E.width)!=null?x:C==null?void 0:C.width)!=null?I:void 0,minWidth:(L=(M=E==null?void 0:E.minWidth)!=null?M:C==null?void 0:C.minWidth)!=null?L:"150px",labelWidth:(D=(B=E==null?void 0:E.labelWidth)!=null?B:C==null?void 0:C.labelWidth)!=null?D:void 0,align:(k=(A=E==null?void 0:E.align)!=null?A:C==null?void 0:C.align)!=null?k:"left",labelAlign:(V=(P=E==null?void 0:E.labelAlign)!=null?P:C==null?void 0:C.labelAlign)!=null?V:void 0,className:"ae-description-item-content",labelClassName:"ae-description-item-label"+(u()?" is-required":"")}}function d(){return H(T(T({},e.schemaProps.formItemProps||{}),n.formItemProps||{}),{prop:n.field||"",class:["ae-form-item",S(),v(),y(),f()].filter(E=>!!E).join(" "),required:g(),rules:p()})}function u(){var E,C,N,R,O;return(E=n.formItemProps)!=null&&E.required?!0:(N=(C=n.formItemProps)==null?void 0:C.autoRules)!=null&&N.length?n.formItemProps.autoRules.some(w=>w==="isRequired"||w==="isRequiredArray"):(O=(R=n.formItemProps)==null?void 0:R.rules)!=null&&O.length?n.formItemProps.rules.some(w=>w.required):!1}function p(){var E,C,N;if((C=(E=n.formItemProps)==null?void 0:E.autoRules)!=null&&C.length){const R=[],O=ku();if(n.formItemProps.autoRules.forEach(w=>{if(O[w]!==void 0){const x=Object.assign({},O[w]);x.message=x.message.replace("{label}",o.value),R.push(x)}}),R.length)return R}return((N=n.formItemProps)==null?void 0:N.rules)||[]}function m(){return nC(n,r.value,e)?"":xg(n,r.value,e)}function f(){return _()?"ae-form-item-is-disabled":""}function _(){var E,C,N;return e.disabled?!0:rC("disabled",!0,n,r.value,i,e,(N=(C=(E=e.schemaProps)==null?void 0:E.componentProps)==null?void 0:C.disabled)!=null?N:!1)}function g(){var E;if(!a.value)return(E=n.formItemProps)!=null&&E.required?!0:void 0}function S(){return a.value?"no-margin-bottom":""}function v(){var E;return((E=o==null?void 0:o.value)==null?void 0:E.length)===0||e.type==="desc"?"no-label":""}function y(){return!t||!Reflect.has(t,`${n.key||n.field}-error`)?"is-normal-label":""}function b(){var R,O;const E={},C=((R=n==null?void 0:n.insideProps)==null?void 0:R.slots)||{},N=((O=n==null?void 0:n.insideProps)==null?void 0:O.renders)||{};for(const w in N)if(!C.hasOwnProperty(w)){const x=N[w];Je(x)?E[w]=()=>x(r.value,n,e.disabled,e.excontext):typeof x=="string"&&(E[w]=()=>x)}for(const w in C)zn(C[w],n,r.value,e,"boolean",!1)&&(E[w]=()=>bn(t,`${s}--${w}`,r.value));return E}return{trueComponentProps:i,isDisabled:a,getFormItemProps:d,formItemLabel:o,slotKey:s,getDescriptionsProps:l,getDescriptionsSlots:b,getDescriptionItemProps:c}}const Ua=h.defineComponent({name:"SchemaLayout",props:{schema:{type:Object,required:!0},schemaProps:{type:Object,required:!0},itemKey:{type:String,required:!0},designable:{type:Boolean,default:!1},designableColProps:{type:Function,default:()=>{}},isHidden:{type:Boolean,default:!1}},setup(e,{slots:t}){const n=h.computed(()=>{var o,a,s,l,c,d,u,p,m,f,_,g;return{span:(c=(l=(o=e.schema.layoutProps)==null?void 0:o.span)!=null?l:(s=(a=e.schemaProps)==null?void 0:a.layoutProps)==null?void 0:s.span)!=null?c:12,alone:(f=(m=(d=e.schema.layoutProps)==null?void 0:d.alone)!=null?m:(p=(u=e.schemaProps)==null?void 0:u.layoutProps)==null?void 0:p.alone)!=null?f:!1,style:(g=(_=e.schema.layoutProps)==null?void 0:_.colStyle)!=null?g:{}}}),r=h.computed(()=>{var o;return(o=e.schema.type)!=null?o:"Inputer"}),i=["Container","Custom","Inputer","Decorator"];return()=>{var a;const o=e.designable?T({},((a=e.designableColProps)==null?void 0:a.call(e,e.itemKey,e.schema,e.isHidden))||{}):{};return n.value.alone&&i.includes(r.value)?h.createVNode(G.ElCol,H(T({class:"mb-2"},o),{span:24,key:e.itemKey,"data-id":e.itemKey,id:e.itemKey}),{default:()=>{var s;return[h.createVNode(G.ElRow,null,{default:()=>[h.createVNode(G.ElCol,{span:n.value.span,style:n.value.style},{default:()=>{var l;return[(l=t.default)==null?void 0:l.call(t)]}})]}),e.designable?(s=t.design)==null?void 0:s.call(t,e.schema):void 0]}}):h.createVNode(G.ElCol,H(T({class:"mb-2"},o),{span:n.value.span,key:e.itemKey,"data-id":e.itemKey,id:e.itemKey,style:n.value.style}),{default:()=>{var s,l;return[(s=t.default)==null?void 0:s.call(t),e.designable?(l=t.design)==null?void 0:l.call(t,e.schema):void 0]}})}}});function Rd(e,t,n){return!e||!t?!1:t.includes(".")?(We.set(e,t,n),!0):(e[t]=n,!0)}const aC=(e,t,n,r)=>{const i=()=>{if(Reflect.has(t,"options")){if(typeof t.options=="function")return t.options(n,e,r.disabled,r.excontext);if(Array.isArray(t.options))return t.options}return[]};return{renderCheckboxOptions:()=>{var u,p;const a=T(T({value:"value",label:"label"},(t==null?void 0:t.optionKeys)||{}),(t==null?void 0:t.props)||{}),s=(u=a.label)!=null?u:"label",l=(p=a.value)!=null?p:"value",c=e.component==="Checkbox"?G.ElCheckbox:G.ElCheckboxButton;return i().map(m=>{const S=m,{value:f,label:_}=S,g=co(S,["value","label"]);return h.createVNode(c,H(T({},g),{value:m[l]}),{default:()=>[m[s]]})})}}},sC=(e,t,n,r)=>{const i=()=>{if(Reflect.has(t,"options")){if(typeof t.options=="function")return t.options(n,e,r.disabled,r.excontext);if(Array.isArray(t.options))return t.options}return[]};return{renderRadioOptions:()=>{var u,p;const a=T(T({value:"value",label:"label"},(t==null?void 0:t.optionKeys)||{}),(t==null?void 0:t.props)||{}),s=(u=a.label)!=null?u:"label",l=(p=a.value)!=null?p:"value",c=e.component==="Radio"?G.ElRadio:G.ElRadioButton;return i().map(m=>{const S=m,{value:f,label:_}=S,g=co(S,["value","label"]);return h.createVNode(c,H(T({},g),{value:m[l]}),{default:()=>[m[s]]})})}}};function Ha(e,t,n,r,i,o,a,s,l){var b,E,C,N;const c=(b=r.type)!=null?b:fe.INPUTER,d=()=>{if([fe.CONTAINER,fe.INPUTER,fe.DECORATOR].includes(c))return Hr(a,(r==null?void 0:r.component)||"Input")?a[r.component]:void 0},u=[fe.INPUTER,fe.DECORATOR].includes(c)&&(C=(E=r.outsideProps)==null?void 0:E.enable)!=null?C:!1,p=(r.key||r.field).replace(/\./g,"-"),m=`${p}-${((N=r.componentProps)==null?void 0:N.freshKey)||0}`;function f(){var O,w;const R={};if(r.field){const x=Hr(a,r.component)&&((O=s[r.component])==null?void 0:O.modelValueKey)||"modelValue";R[x]=We.get(i.value,r.field),R[`onUpdate:${x}`]=I=>{const M=We.get(i.value,r.field);Rd(i.value,r.field,I),n("change",{value:I,field:r.field,oldValue:M})}}return r.field&&((w=r.componentProps)!=null&&w.vBinds)&&Object.entries(r.componentProps.vBinds).forEach(([x,I])=>{x&&I&&typeof I=="string"&&(R[x]=We.get(i.value,I),R[`onUpdate:${x}`]=M=>{const L=We.get(i.value,I);Rd(i.value,I,M),n("change",{value:M,field:r.field,oldValue:L})})}),R}function _(){var O;let R={};return c===fe.INPUTER?(R=T(T(T(T(T(T({},pC(r,e.schemaProps)),mC(r,e.schemaProps,e)),dC(r,i.value,e,l.value)),o||{}),uC(r,o,i.value,e)),cC(r,o)),lC(R,r),Reflect.has(R,"vBinds")&&delete R.vBinds,Reflect.has(R,"optionKeys")&&delete R.optionKeys):c===fe.CONTAINER?R=T({label:r.label||"",subLabel:((O=r==null?void 0:r.formItemProps)==null?void 0:O.subLabel)||""},o||{}):c===fe.DECORATOR&&(R=T({},o||{})),R}function g(){if(r.componentEvent){const R={};return Object.keys(r.componentEvent).forEach(O=>{const w=r.componentEvent[O];Je(w)&&(R[O]=iC(w,i.value,r,e.disabled,e.excontext))}),R}return{}}function S(){var R;if((R=r==null?void 0:r.outsideProps)!=null&&R.enable){if(r.outsideProps.hasOwnProperty("prependRender")&&Je(r.outsideProps.prependRender)&&!r.outsideProps.hasOwnProperty("prependSlot"))return r.outsideProps.prependRender(i.value,r,e.disabled,e.excontext)||void 0;if(r.outsideProps.hasOwnProperty("prependSlot")&&zn(r.outsideProps.prependSlot,r,i.value,e,"boolean",!1))return bn(t,`${p}--out-prepend`,i.value)}}function v(){var R;if((R=r==null?void 0:r.outsideProps)!=null&&R.enable){if(r.outsideProps.hasOwnProperty("appendRender")&&Je(r.outsideProps.appendRender)&&!r.outsideProps.hasOwnProperty("appendSlot"))return r.outsideProps.appendRender(i.value,r,e.disabled,e.excontext)||void 0;if(r.outsideProps.hasOwnProperty("appendSlot")&&zn(r.outsideProps.appendSlot,r,i.value,e,"boolean",!1))return bn(t,`${p}--out-append`,i.value)}}function y(){var x,I;const R={},O=((x=r==null?void 0:r.insideProps)==null?void 0:x.slots)||{},w=((I=r==null?void 0:r.insideProps)==null?void 0:I.renders)||{};for(const M in w)if(!O.hasOwnProperty(M)){const L=w[M];Je(L)?R[M]=()=>L(i.value,r,e.disabled,e.excontext):typeof L=="string"&&(R[M]=()=>L)}for(const M in O)zn(O[M],r,i.value,e,"boolean",!1)&&(R[M]=()=>bn(t,`${p}--${M}`,i.value));if(r.component&&Sg.includes(r.component))switch(r.component){case"Radio":case"RadioButton":{const{renderRadioOptions:M}=sC(r,o,i.value,e);R.default=()=>M();break}case"Checkbox":case"CheckboxButton":{const{renderCheckboxOptions:M}=aC(r,o,i.value,e);R.default=()=>M();break}}return R}return{getAnyComponent:d,setModelValue:f,setComponentProps:_,setComponentEvent:g,setInsideSlots:y,setOutsidePrepend:S,setOutsideAppend:v,freshKey:m,slotKey:p,enableOutside:u}}function lC(e,t){t.component&&Sg.includes(t.component)&&e.options!==void 0&&delete e.options}function cC(e,t){return e.component==="DatePicker"&&t.type&&jy.includes(t.type)?t.defaultTime?{defaultTime:t.defaultTime}:{defaultTime:[new Date().setHours(0,0,0,0),new Date().setHours(23,59,59,999)]}:{}}function dC(e,t,n,r){return!e.component||e.component!=="Table"?{}:{excontext:n.excontext,form:t,editable:!r,adaptive:!1}}function uC(e,t,n,r){if(!e.component)return{};if(qy.includes(e.component)&&Reflect.has(t,"options")){const i=T(T({disabled:"disabled",children:"children",value:"value",label:"label"},(t==null?void 0:t.optionKeys)||{}),(t==null?void 0:t.props)||{});if(typeof t.options=="function")return{options:t.options(n,e,r.disabled,r.excontext),props:i};if(Array.isArray(t.options))return{options:t.options,props:i}}return{}}function pC(e,t){var r,i,o;return((i=(r=t==null?void 0:t.componentProps)==null?void 0:r.clearable)!=null?i:!0)&&((o=e.type)!=null?o:fe.INPUTER)===fe.INPUTER&&e.component&&Yy.includes(e.component)?{clearable:!0}:{}}function mC(e,t,n){var o,a,s,l;const r=(a=(o=t==null?void 0:t.componentProps)==null?void 0:o.autoPlaceholder)!=null?a:!0,i=(s=t==null?void 0:t.componentProps)==null?void 0:s.setPlaceholderInDisabled;if((r||n.disabled&&i!==void 0)&&((l=e.type)!=null?l:fe.INPUTER)===fe.INPUTER){const d=["Autocomplete","Editor","Input","InputNumber","Mention"],u=["Cascader","DatePicker","Select","TimePicker","TimeSelect"],p=typeof(e==null?void 0:e.label)=="string"?e.label:"";if(d.includes(e.component))return n.disabled&&i!==void 0?{placeholder:i}:{placeholder:p?"请填写"+p:""};if(u.includes(e.component))return n.disabled&&i!==void 0?{startPlaceholder:i,endPlaceholder:i,rangeSeparator:"-",placeholder:i}:{startPlaceholder:p?"选择"+p:"",endPlaceholder:p?"选择"+p:"",rangeSeparator:"-",placeholder:p?"请选择"+p:""}}return{}}function yc(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!h.isVNode(e)}const ym=(e,t)=>{if(!t||Object.keys(t).length===0)return e;const n=Object.entries(t).map(([r,i])=>{const o=r.replace(/^v-/,""),a=h.resolveDirective(o);return a?[a,i]:null}).filter(Boolean);return n.length>0?h.withDirectives(e,n):e};function fC(e,t,n,r,i,o,a,s,l,c,d){function u(E,C,N){if(!E.component||!Hr(c,E.component)){_e.error("console.form.componentNotExist",{type:fe.CONTAINER,component:E.component},E);return}const{getAnyComponent:R,freshKey:O,setComponentProps:w,setInsideSlots:x}=Ha(e,r,t,E,i,C,c,d);return(()=>{const M=R();if(M!==void 0)return h.createVNode(M,H(T({},w()),{key:O}),H(T({},x()),{default:()=>N==null?void 0:N()}));_e.error("console.form.componentError",{type:fe.CONTAINER,component:E.component},E)})()}function p(E,C){if(!E.component||!Hr(c,E.component)){_e.error("console.form.componentNotExist",{type:fe.DECORATOR,component:E.component},E);return}const{enableOutside:N,setOutsideAppend:R,setOutsidePrepend:O,getAnyComponent:w,freshKey:x,setComponentProps:I,setComponentEvent:M,setInsideSlots:L}=Ha(e,r,t,E,i,C,c,d),B=()=>{const A=w();if(A!==void 0)return h.createVNode(A,H(T(T({},I()),M()),{key:x}),T({},L()));_e.error("console.form.componentError",{type:fe.DECORATOR,component:E.component},E)};return N?(()=>{var P,V;const A=((P=E==null?void 0:E.outsideProps)==null?void 0:P.direction)||"row",k=T({display:"flex",flexDirection:A,flexWrap:"wrap",alignItems:A==="row"?"center":"flex-start",width:"100%"},((V=E==null?void 0:E.outsideProps)==null?void 0:V.style)||{});return h.createVNode("div",{class:"ae-form-item-outside",style:k},[O(),B(),R()])})():B()}function m(E,C,N){if(!E.component||!Hr(c,E.component)){_e.error("console.form.componentNotExist",{type:fe.INPUTER,component:E.component},E);return}const{enableOutside:R,setOutsideAppend:O,setOutsidePrepend:w,getAnyComponent:x,freshKey:I,setModelValue:M,setComponentEvent:L,setComponentProps:B,setInsideSlots:D}=Ha(e,r,t,E,i,C,c,d,N),A=V=>{const W=E.key||E.field||"";V&&W&&Wy.includes(E.component)&&(a.value[`${W}Ref`]=V)},k=()=>{const V=x();if(V!==void 0)return h.createVNode(V,H(T(T(T({ref:W=>A(W)},M()),B()),L()),{disabled:N.value,key:I}),T({},D()));_e.error("console.form.componentError",{type:fe.INPUTER,component:E.component},E)};return R?(()=>{var Z,pe;const V=((Z=E==null?void 0:E.outsideProps)==null?void 0:Z.direction)||"row",W=T({display:"flex",flexDirection:V,flexWrap:"wrap",alignItems:V==="row"?"center":"flex-start",width:"100%"},((pe=E==null?void 0:E.outsideProps)==null?void 0:pe.style)||{});return h.createVNode("div",{class:"ae-form-item-outside",style:W},[w(),k(),O()])})():k()}function f(E){if((E==null?void 0:E.type)===fe.CUSTOM){if(Je(E.render))return E.render(i.value,E,e.disabled,e.excontext);const{slotKey:C}=Ha(e,r,t,E,i,{},c,d);if(r[C])return bn(r,C,i.value)}_e.error("console.form.customComponentError",void 0,E)}function _(E,C){const N=vc(C,i.value,e),R={width:"150px"};return N?h.createVNode(G.ElTooltip,{content:N,"popper-class":"ae-form-label-popper","popper-style":R},{default:()=>[h.createVNode("span",{class:"ae-description-item-label__text has-sub-label"},[E])]}):h.createVNode("span",{class:"ae-description-item-label__text"},[E])}function g(E,C){var R,O,w,x,I,M,L,B,D;if(((I=(x=(R=C.formItemProps)==null?void 0:R.labelPosition)!=null?x:(w=(O=e.schemaProps)==null?void 0:O.formItemProps)==null?void 0:w.labelPosition)!=null?I:"right")==="top"){if(Je((M=C.formItemProps)==null?void 0:M.subLabelRender)){const k=C.formItemProps.subLabelRender(i.value,C,e.disabled,e.excontext);return k?h.createVNode("div",{class:"ae-form-item-label"},[h.createVNode("div",{class:"label"},[E]),h.createVNode("div",{class:"sub-label"},[k])]):h.createVNode("div",{class:"ae-form-item-label"},[h.createVNode("div",{class:"label"},[E])])}const A=vc(C,i.value,e);return h.createVNode("div",{class:"ae-form-item-label"},[h.createVNode("div",{class:"label"},[E]),!!A&&h.createVNode("div",{class:"sub-label"},[A])])}else{const A={width:Ad((L=C.formItemProps)==null?void 0:L.labelMaxWidth)||"fit-content",lineHeight:(B=C.formItemProps)!=null&&B.labelMaxWidth?"var(--el-font-size-base, '14px')":"",marginTop:(D=C.formItemProps)!=null&&D.labelMaxWidth?"5px":""},k=vc(C,i.value,e);if(k){const P={width:"150px"};return h.createVNode(G.ElTooltip,{content:k,"popper-class":"ae-form-label-popper","popper-style":P},{default:()=>[h.createVNode("div",{class:"ae-form-item-label inline-flex"},[h.createVNode("span",{class:"label has-sub-label",style:A},[E])])]})}return h.createVNode("div",{class:"ae-form-item-label inline-flex"},[h.createVNode("span",{class:"label",style:A},[E])])}}function S(E){var O,w,x;const C=Ao(E,i.value,e);if(C&&!e.designable)return;const N=(O=E.key)!=null?O:E.field;if(!N){_e.error("console.form.keyRequired",void 0,E);return}switch((w=E.type)!=null?w:fe.INPUTER){case fe.STEP:_e.error("console.form.nestedStepNotSupported",void 0,E);return;case fe.DESCRIPTIONS:_e.error("console.form.nestedDescriptionsNotSupported",void 0,E);return;case fe.CUSTOM:{const{getFormItemProps:A,slotKey:k,formItemLabel:P}=Zn(e,r,E,i);return h.createVNode(Ua,{schema:E,schemaProps:e.schemaProps,"item-key":N,designable:e.designable,designableColProps:e.designableColProps,"is-hidden":C},T({default:()=>h.createVNode(G.ElFormItem,A(),H(T(T({},r[`${k}--label`]?{label:r[`${k}--label`]}:{label:()=>g(P.value,E)}),r[`${k}--error`]?{error:r[`${k}--error`]}:{}),{default:()=>f(E)}))},e.designable&&{design:V=>{var W;return(W=r.design)==null?void 0:W.call(r,V)}}))}case fe.CONTAINER:{const{trueComponentProps:A}=Zn(e,r,E,i),k=e.designable&&e.type!=="desc",P=k?((x=e.designableDirectives)==null?void 0:x.containerRow)||{}:{},V=P&&Object.keys(P).length>0?`container-row-${N}-designable`:`container-row-${N}`,W=()=>h.createVNode(G.ElRow,{class:{"ae-form-main__container_row":!0,"type-form":!0,"is-designable":e.designable},"data-id":`container-row-${N}`,key:V,gutter:10},{default:()=>{var Z;return[E.children?(Z=E.children)==null?void 0:Z.map(pe=>S(pe)):void 0]}});return h.createVNode(Ua,{schema:E,schemaProps:e.schemaProps,"item-key":N,designable:e.designable,designableColProps:e.designableColProps,"is-hidden":C},T({default:()=>u(E,A,()=>k?ym(W(),P):W())},e.designable&&{design:Z=>{var pe;return(pe=r.design)==null?void 0:pe.call(r,Z)}}))}case fe.DECORATOR:{const{trueComponentProps:A}=Zn(e,r,E,i);return h.createVNode(Ua,{schema:E,schemaProps:e.schemaProps,"item-key":N,designable:e.designable,designableColProps:e.designableColProps,"is-hidden":C},T({default:()=>p(E,A)},e.designable&&{design:k=>{var P;return(P=r.design)==null?void 0:P.call(r,k)}}))}case fe.INPUTER:default:const{trueComponentProps:I,isDisabled:M,getFormItemProps:L,slotKey:B,formItemLabel:D}=Zn(e,r,E,i);return h.createVNode(Ua,{schema:E,schemaProps:e.schemaProps,"item-key":N,designable:e.designable,designableColProps:e.designableColProps,"is-hidden":C},T({default:()=>h.createVNode(G.ElFormItem,L(),H(T(T({},r[`${B}--label`]?{label:r[`${B}--label`]}:{label:()=>g(D.value,E)}),r[`${B}--error`]?{error:r[`${B}--error`]}:{}),{default:()=>m(E,I,M)}))},e.designable&&{design:A=>{var k;return(k=r.design)==null?void 0:k.call(r,A)}}))}}function v(E){var w,x,I;if(Ao(E,i.value,e))return;const N=(w=E.key)!=null?w:E.field;if(!N){_e.error("console.form.keyRequired",void 0,E);return}const{getDescriptionsProps:R,getDescriptionsSlots:O}=Zn(e,r,E,i);return h.createVNode(G.ElCol,{span:(I=(x=E.layoutProps)==null?void 0:x.span)!=null?I:24},{default:()=>[h.createVNode(G.ElDescriptions,H(T({},R()),{key:`container-row-${N}`,"data-id":`container-row-${N}`}),H(T({},O()),{default:()=>E.children?E.children.map(M=>y(M)):void 0}))]})}function y(E){var O,w;if(Ao(E,i.value,e))return;const N=(O=E.key)!=null?O:E.field;if(!N){_e.error("console.form.keyRequired",void 0,E);return}switch((w=E.type)!=null?w:fe.INPUTER){case fe.STEP:_e.error("console.form.nestedStepNotSupported",void 0,E);return;case fe.CONTAINER:_e.error("console.form.nestedContainerNotSupported",void 0,E);return;case fe.DESCRIPTIONS:_e.error("console.form.nestedDescriptionsNotSupported",void 0,E);return;case fe.CUSTOM:{const{formItemLabel:x,getFormItemProps:I,getDescriptionItemProps:M}=Zn(e,r,E,i);return h.createVNode(G.ElDescriptionsItem,H(T({},M()),{key:N}),{label:()=>_(x.value,E),default:()=>h.createVNode(G.ElFormItem,I(),{default:()=>f(E)})})}case fe.DECORATOR:{const{formItemLabel:x,trueComponentProps:I,getDescriptionItemProps:M}=Zn(e,r,E,i);return h.createVNode(G.ElDescriptionsItem,H(T({},M()),{key:N}),{label:()=>_(x.value,E),default:()=>p(E,I)})}case fe.INPUTER:default:{const{trueComponentProps:x,isDisabled:I,getFormItemProps:M,formItemLabel:L,getDescriptionItemProps:B}=Zn(e,r,E,i);return h.createVNode(G.ElDescriptionsItem,H(T({},B()),{key:N}),{label:()=>_(L.value,E),default:()=>{let D;return h.createVNode(G.ElFormItem,M(),yc(D=m(E,x,I))?D:{default:()=>[D]})}})}}}function b(){const E=x=>{if(e.stepValue!==null){const I=x.find(M=>(M==null?void 0:M.type)===fe.STEP&&M.step===e.stepValue);return I?I.children||[]:[]}else return x},C=()=>{var A;const x=E(e.schemas),I=k=>{s.value=k},M=e.designable&&e.type!=="desc",L=M?((A=e.designableDirectives)==null?void 0:A.baseRow)||{}:{},B=M&&Object.keys(L).length>0?"base-row-designable":"base-row",D=()=>{let k;return h.createVNode(G.ElRow,{ref:P=>I(P),"data-id":"base-row",key:B,class:{"ae-form-main__base_row":!0,"type-form":!0,"is-designable":e.designable},gutter:10},yc(k=x.map(P=>S(P)))?k:{default:()=>[k]})};return M?ym(D(),L):D()},N=()=>{let x;const M=E(e.schemas).filter(B=>B.type==fe.CONTAINER||B.type===fe.DESCRIPTIONS?!0:(_e.error("console.form.wrapInDescriptions",void 0,B),!1)).map(B=>H(T({},B),{type:fe.DESCRIPTIONS})),L=B=>{s.value=B};return h.createVNode(G.ElRow,{ref:B=>L(B),"data-id":"base-row",key:"base-row",class:"ae-form-main__base_row type-desc",gutter:10},yc(x=M.map(B=>v(B)))?x:{default:()=>[x]})},R=()=>{const x=T(T({},e),n);return["model","schemas","stepValue","disabled","type","designable","designableDirectives","designableColProps","excontext","schemaProps","showErrorNotice","scrollRef","autoInitField","imports","anchor","anchorProps","anchorAffixStyle"].forEach(M=>delete x[M]),x},O=x=>{o.value=x},w={"ae-form-main":!0,"is-designable":e.designable};return h.createVNode(G.ElForm,H(T({class:w,ref:x=>O(x)},R()),{model:i.value}),{default:()=>e.type==="form"?C():N()})}return{renderForm:b}}const Mu=(e,t)=>{const n=Array.isArray(e)?e:[e];for(const r of n){if(t(r))return r;if(r.children&&Array.isArray(r.children)&&r.children.length>0){const i=Mu(r.children,t);if(i)return i}}return null};function Ig(e,t){const n=[];function r(i){for(const o of i)t(o)&&n.push(o),o.children&&o.children.length>0&&r(o.children)}return r(e),n}function hC(e,t,n,r){const i=h.ref(!1),o=h.ref({}),a=h.ref(),s=h.ref(),l=h.ref([]),c=h.ref({});function d(O){o.value=T(T({},u(O)),O),setTimeout(()=>{v()},200)}function u(O){const w=T({},O),x=I=>{var B;const M=(B=I.type)!=null?B:fe.INPUTER;if(!I.field||![fe.CUSTOM,fe.INPUTER].includes(M)){[fe.STEP,fe.CONTAINER,fe.DESCRIPTIONS].includes(M)&&I.children&&Array.isArray(I.children)&&I.children.forEach(D=>{x(D)});return}if(We.get(w,I.field)!==void 0)return;if(I.value!==void 0){We.set(w,I.field,tC(I,w,e));return}const L=I.component;if(L&&r[L]){const D=Od(I,w,e),A=r[L](D);We.set(w,I.field,A?[]:null);return}We.set(w,I.field,null)};return t.forEach(I=>x(I)),w}function p(){return o.value}function m(){return h.unref(a)}function f(O={}){o.value=Object.assign(h.unref(o),O)}function _(O){o.value=T({},u(O)),setTimeout(()=>{v()},200)}function g(O,w){O.includes(".")?We.set(o.value,O,w):o.value[O]=w}function S(O){return We.get(o.value,O)!==void 0?(We.unset(o.value,O),!0):!1}function v(){var w;(w=h.unref(a))==null||w.clearValidate();const O=b();O!=null&&O.length&&O.forEach(x=>{const I=y(x.key||x.field);I&&(I==null||I.resetValidate())})}const y=O=>O?c.value[`${O}Ref`]:void 0,b=()=>{const O=h.toRaw(t);return Ig(O,w=>w.component==="Table"&&!Ao(w,o.value,e))},E=()=>Lt(this,null,function*(){const O=b();if(O!=null&&O.length)for(const w of O){const x=y(w.key||w.field);if(x&&(yield x==null?void 0:x.validate())===!1){const M=(w==null?void 0:w.label)||(w==null?void 0:w.field);return M&&e.showErrorNotice&&G.ElNotification({title:ve("form.validation.tableError",{field:M}),message:ve("form.validation.checkTable"),type:"warning"}),!1}}return!0}),C=(O,w)=>{if(!O){const x=oC(w),I=Mu(e.schemas,M=>M.field===x[0].field);if(e.scrollRef&&I){const M=e.scrollRef,L=I.key||I.field;try{const B=M.querySelector(`[data-id="${CSS.escape(L)}"]`);B&&B.scrollIntoView({behavior:"smooth",block:"center"})}catch(B){console.error("[AeForm] scrollRef is invalid",B)}}if(e.showErrorNotice&&I){const M=(I==null?void 0:I.label)||(I==null?void 0:I.field);M&&G.ElNotification({title:ve("form.validation.fieldError",{field:M}),message:x[0].message,type:"warning"})}}};function N(){return Lt(this,null,function*(){var O;i.value=!0;try{const w=yield(O=h.unref(a))==null?void 0:O.validate(C),x=yield E();return w&&x}finally{i.value=!1}})}function R(O){if(e.scrollRef&&O){const x=e.scrollRef.querySelector(`[data-id="${CSS.escape(O)}"]`);x&&x.scrollIntoView({behavior:"smooth",block:"center"})}}return{isValidating:i,formModel:o,elFormRef:a,baseElRowRef:s,schemasKeys:l,componentRefs:c,initValues:d,getDefaultModel:u,getFormModel:p,getElFormRef:m,setValues:f,clearValues:_,setValue:g,delValue:S,resetValidate:v,validate:N,scrollToKey:R}}function _C(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!h.isVNode(e)}function gC(e,t){const n=o=>{var a,s;if(o.type==="Container"||o.type==="Descriptions"){if(((a=o.anchorLinkProps)==null?void 0:a.enable)===!1)return!1}else if(o.type==="Decorator"){if(((s=o.anchorLinkProps)==null?void 0:s.enable)!==!0)return!1}else return!1;return!Ao(o,t.value,e)},r=o=>o.filter(n).map(a=>{var p,m,f;const s=a.key||a.field,l=((p=a.anchorLinkProps)==null?void 0:p.title)||xg(a,t.value,e)||s,c=((m=a.anchorLinkProps)==null?void 0:m.href)||`#${s}`,u=(a.type==="Container"||a.type==="Descriptions")&&((f=a.children)==null?void 0:f.some(n));return h.createVNode(G.ElAnchorLink,{key:s,title:l,href:c},{default:()=>[u&&r(a.children)]})});return{renderAnchor:()=>{let o;if(!e.schemas||e.schemas.length<1)return;const a=T({position:"fixed",left:"20px",top:"100px",width:"100px",zIndex:20,padding:"10px 10px 10px 0",background:"var(--el-bg-color)",borderRadius:"var(--el-border-radius-base)"},e.anchorAffixStyle);return h.createVNode("div",{class:"ae-form-anchor",style:a},[h.createVNode(G.ElAnchor,e.anchorProps,_C(o=r(e.schemas))?o:{default:()=>[o]})])}}}function EC(e,t,n,r,i){return e.pagination?h.createVNode(G.ElPagination,H(T({pageSize:t.value,"onUpdate:pageSize":o=>t.value=o,currentPage:n.value,"onUpdate:currentPage":o=>n.value=o,class:"ae-table-pagination"},h.unref(r)),{onChange:i}),null):void 0}const Cc="el",bC="is-",Ir=(e,t,n,r,i)=>{let o=`${e}-${t}`;return n&&(o+=`-${n}`),r&&(o+=`__${r}`),i&&(o+=`--${i}`),o},SC=Symbol("namespaceContextKey"),Lu=e=>{const t=h.getCurrentInstance()?h.inject(SC,h.ref(Cc)):h.ref(Cc);return h.computed(()=>h.unref(t)||Cc)},Tr=(e,t)=>{const n=Lu();return{namespace:n,b:(_="")=>Ir(n.value,e,_,"",""),e:_=>_?Ir(n.value,e,"",_,""):"",m:_=>_?Ir(n.value,e,"","",_):"",be:(_,g)=>_&&g?Ir(n.value,e,_,g,""):"",em:(_,g)=>_&&g?Ir(n.value,e,"",_,g):"",bm:(_,g)=>_&&g?Ir(n.value,e,_,"",g):"",bem:(_,g,S)=>_&&g&&S?Ir(n.value,e,_,g,S):"",is:(_,...g)=>{const S=g.length>=1?g[0]:!0;return _&&S?`${bC}${_}`:""},cssVar:_=>{const g={};for(const S in _)_[S]&&(g[`--${n.value}-${S}`]=_[S]);return g},cssVarName:_=>`--${n.value}-${_}`,cssVarBlock:_=>{const g={};for(const S in _)_[S]&&(g[`--${n.value}-${e}-${S}`]=_[S]);return g},cssVarBlockName:_=>`--${n.value}-${e}-${_}`}};/**
|
|
2
2
|
* @vue/shared v3.5.24
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
@@ -7,7 +7,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:r,curr
|
|
|
7
7
|
usage: app.provide(ID_INJECTION_KEY, {
|
|
8
8
|
prefix: number,
|
|
9
9
|
current: number,
|
|
10
|
-
})`);const n=Lu();return ct.computedEager(()=>h.unref(e)||`${n.value}-id-${t.prefix}-${t.current++}`)},rT=Symbol("formContextKey"),Dd=Symbol("formItemContextKey"),iT=e=>{const t=h.getCurrentInstance();return h.computed(()=>{var n,r;return(r=(n=t==null?void 0:t.proxy)==null?void 0:n.$props)==null?void 0:r[e]})},oT=(e,t={})=>{const n=h.ref(void 0),r=t.prop?n:iT("size"),i=t.global?n:xC(),o=t.form?{size:void 0}:h.inject(rT,void 0),a=t.formItem?{size:void 0}:h.inject(Dd,void 0);return h.computed(()=>r.value||h.unref(e)||(a==null?void 0:a.size)||(o==null?void 0:o.size)||i.value||"")},Dm=e=>typeof Element=="undefined"?!1:e instanceof Element,kd=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.tabIndex<0||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true")return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},Fu=(e,t)=>{if(!e||!e.focus)return;let n=!1;Dm(e)&&!kd(e)&&!e.getAttribute("tabindex")&&(e.setAttribute("tabindex","-1"),n=!0),e.focus(t),Dm(e)&&n&&e.removeAttribute("tabindex")},Bu=Symbol("popper"),Bg=Symbol("popperContent"),aT=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],Ug=zt({role:{type:String,values:aT,default:"tooltip"}}),sT=h.defineComponent({name:"ElPopper",inheritAttrs:!1}),lT=h.defineComponent(H(T({},sT),{props:Ug,setup(e,{expose:t}){const n=e,r=h.ref(),i=h.ref(),o=h.ref(),a=h.ref(),s=h.computed(()=>n.role),l={triggerRef:r,popperInstanceRef:i,contentRef:o,referenceRef:a,role:s};return t(l),h.provide(Bu,l),(c,d)=>h.renderSlot(c.$slots,"default")}}));var cT=dn(lT,[["__file","popper.vue"]]);const dT=h.defineComponent({name:"ElPopperArrow",inheritAttrs:!1}),uT=h.defineComponent(H(T({},dT),{setup(e,{expose:t}){const n=Tr("popper"),{arrowRef:r,arrowStyle:i}=h.inject(Bg,void 0);return h.onBeforeUnmount(()=>{r.value=void 0}),t({arrowRef:r}),(o,a)=>(h.openBlock(),h.createElementBlock("span",{ref_key:"arrowRef",ref:r,class:h.normalizeClass(h.unref(n).e("arrow")),style:h.normalizeStyle(h.unref(i)),"data-popper-arrow":""},null,6))}}));var pT=dn(uT,[["__file","arrow.vue"]]);const Hg=zt({virtualRef:{type:Be(Object)},virtualTriggering:Boolean,onMouseenter:{type:Be(Function)},onMouseleave:{type:Be(Function)},onClick:{type:Be(Function)},onKeydown:{type:Be(Function)},onFocus:{type:Be(Function)},onBlur:{type:Be(Function)},onContextmenu:{type:Be(Function)},id:String,open:Boolean}),Vg=Symbol("elForwardRef"),mT=e=>{const t=n=>{e.value=n};h.provide(Vg,{setForwardRef:t})},fT=e=>({mounted(t){e(t)},updated(t){e(t)},unmounted(){e(null)}}),Tc="ElOnlyChild",hT=h.defineComponent({name:Tc,setup(e,{slots:t,attrs:n}){var r;const i=h.inject(Vg),o=fT((r=i==null?void 0:i.setForwardRef)!=null?r:wd);return()=>{var a;const s=(a=t.default)==null?void 0:a.call(t,n);if(!s)return null;const[l,c]=Gg(s);return l?(c>1&&qo(Tc,"requires exact only one valid child."),h.withDirectives(h.cloneVNode(l,n),[[o]])):(qo(Tc,"no valid child node found"),null)}}});function Gg(e){if(!e)return[null,0];const t=e,n=t.filter(r=>r.type!==h.Comment).length;for(const r of t){if(Pu(r))switch(r.type){case h.Comment:continue;case h.Text:case"svg":return[km(r),n];case h.Fragment:return Gg(r.children);default:return[r,n]}return[km(r),n]}return[null,0]}function km(e){const t=Tr("only-child");return h.createVNode("span",{class:t.e("content")},[e])}const _T=h.defineComponent({name:"ElPopperTrigger",inheritAttrs:!1}),gT=h.defineComponent(H(T({},_T),{props:Hg,setup(e,{expose:t}){const n=e,{role:r,triggerRef:i}=h.inject(Bu,void 0);mT(i);const o=h.computed(()=>s.value?n.id:void 0),a=h.computed(()=>{if(r&&r.value==="tooltip")return n.open&&n.id?n.id:void 0}),s=h.computed(()=>{if(r&&r.value!=="tooltip")return r.value}),l=h.computed(()=>s.value?`${n.open}`:void 0);let c;const d=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return h.onMounted(()=>{h.watch(()=>n.virtualRef,u=>{u&&(i.value=ct.unrefElement(u))},{immediate:!0}),h.watch(i,(u,p)=>{c==null||c(),c=void 0,Ri(p)&&d.forEach(m=>{const f=n[m];f&&p.removeEventListener(m.slice(2).toLowerCase(),f,["onFocus","onBlur"].includes(m))}),Ri(u)&&(d.forEach(m=>{const f=n[m];f&&u.addEventListener(m.slice(2).toLowerCase(),f,["onFocus","onBlur"].includes(m))}),kd(u)&&(c=h.watch([o,a,s,l],m=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((f,_)=>{We.isNil(m[_])?u.removeAttribute(f):u.setAttribute(f,m[_])})},{immediate:!0}))),Ri(p)&&kd(p)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(m=>p.removeAttribute(m))},{immediate:!0})}),h.onBeforeUnmount(()=>{if(c==null||c(),c=void 0,i.value&&Ri(i.value)){const u=i.value;d.forEach(p=>{const m=n[p];m&&u.removeEventListener(p.slice(2).toLowerCase(),m,["onFocus","onBlur"].includes(p))}),i.value=void 0}}),t({triggerRef:i}),(u,p)=>u.virtualTriggering?h.createCommentVNode("v-if",!0):(h.openBlock(),h.createBlock(h.unref(hT),h.mergeProps({key:0},u.$attrs,{"aria-controls":h.unref(o),"aria-describedby":h.unref(a),"aria-expanded":h.unref(l),"aria-haspopup":h.unref(s)}),{default:h.withCtx(()=>[h.renderSlot(u.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}}));var ET=dn(gT,[["__file","trigger.vue"]]);const Nc="focus-trap.focus-after-trapped",Oc="focus-trap.focus-after-released",bT="focus-trap.focusout-prevented",Mm={cancelable:!0,bubbles:!1},ST={cancelable:!0,bubbles:!1},Lm="focusAfterTrapped",Pm="focusAfterReleased",vT=Symbol("elFocusTrap"),Uu=h.ref(),Fl=h.ref(0),Hu=h.ref(0);let Ga=0;const zg=e=>{const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0||r===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t},Fm=(e,t)=>{for(const n of e)if(!yT(n,t))return n},yT=(e,t)=>{if(typeof process!="undefined"&&process.env.NODE_ENV==="test")return!1;if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},CT=e=>{const t=zg(e),n=Fm(t,e),r=Fm(t.reverse(),e);return[n,r]},TT=e=>e instanceof HTMLInputElement&&"select"in e,Jn=(e,t)=>{if(e){const n=document.activeElement;Fu(e,{preventScroll:!0}),Hu.value=window.performance.now(),e!==n&&TT(e)&&t&&e.select()}};function Bm(e,t){const n=[...e],r=e.indexOf(t);return r!==-1&&n.splice(r,1),n}const NT=()=>{let e=[];return{push:r=>{const i=e[0];i&&r!==i&&i.pause(),e=Bm(e,r),e.unshift(r)},remove:r=>{var i,o;e=Bm(e,r),(o=(i=e[0])==null?void 0:i.resume)==null||o.call(i)}}},OT=(e,t=!1)=>{const n=document.activeElement;for(const r of e)if(Jn(r,t),document.activeElement!==n)return},Um=NT(),AT=()=>Fl.value>Hu.value,za=()=>{Uu.value="pointer",Fl.value=window.performance.now()},Hm=()=>{Uu.value="keyboard",Fl.value=window.performance.now()},RT=()=>(h.onMounted(()=>{Ga===0&&(document.addEventListener("mousedown",za),document.addEventListener("touchstart",za),document.addEventListener("keydown",Hm)),Ga++}),h.onBeforeUnmount(()=>{Ga--,Ga<=0&&(document.removeEventListener("mousedown",za),document.removeEventListener("touchstart",za),document.removeEventListener("keydown",Hm))}),{focusReason:Uu,lastUserFocusTimestamp:Fl,lastAutomatedFocusTimestamp:Hu}),$a=e=>new CustomEvent(bT,H(T({},ST),{detail:e})),Vr={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},Bn=(e,t,{checkForDefaultPrevented:n=!0}={})=>i=>{const o=e==null?void 0:e(i);if(n===!1||!o)return t==null?void 0:t(i)},Vu=e=>{if(e.code&&e.code!=="Unidentified")return e.code;const t=wT(e);if(t){if(Object.values(Vr).includes(t))return t;switch(t){case" ":return Vr.space;default:return""}}return""},wT=e=>{let t=e.key&&e.key!=="Unidentified"?e.key:"";if(!t&&e.type==="keyup"&&JC()){const n=e.target;t=n.value.charAt(n.selectionStart-1)}return t};let vi=[];const Vm=e=>{Vu(e)===Vr.esc&&vi.forEach(n=>n(e))},xT=e=>{h.onMounted(()=>{vi.length===0&&document.addEventListener("keydown",Vm),ct.isClient&&vi.push(e)}),h.onBeforeUnmount(()=>{vi=vi.filter(t=>t!==e),vi.length===0&&ct.isClient&&document.removeEventListener("keydown",Vm)})},IT=h.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[Lm,Pm,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const n=h.ref();let r,i;const{focusReason:o}=RT();xT(f=>{e.trapped&&!a.paused&&t("release-requested",f)});const a={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},s=f=>{if(!e.loop&&!e.trapped||a.paused)return;const{altKey:_,ctrlKey:g,metaKey:S,currentTarget:v,shiftKey:y}=f,{loop:b}=e,C=Vu(f)===Vr.tab&&!_&&!g&&!S,N=document.activeElement;if(C&&N){const R=v,[O,w]=CT(R);if(O&&w){if(!y&&N===w){const I=$a({focusReason:o.value});t("focusout-prevented",I),I.defaultPrevented||(f.preventDefault(),b&&Jn(O,!0))}else if(y&&[O,R].includes(N)){const I=$a({focusReason:o.value});t("focusout-prevented",I),I.defaultPrevented||(f.preventDefault(),b&&Jn(w,!0))}}else if(N===R){const I=$a({focusReason:o.value});t("focusout-prevented",I),I.defaultPrevented||f.preventDefault()}}};h.provide(vT,{focusTrapRef:n,onKeydown:s}),h.watch(()=>e.focusTrapEl,f=>{f&&(n.value=f)},{immediate:!0}),h.watch([n],([f],[_])=>{f&&(f.addEventListener("keydown",s),f.addEventListener("focusin",d),f.addEventListener("focusout",u)),_&&(_.removeEventListener("keydown",s),_.removeEventListener("focusin",d),_.removeEventListener("focusout",u))});const l=f=>{t(Lm,f)},c=f=>t(Pm,f),d=f=>{const _=h.unref(n);if(!_)return;const g=f.target,S=f.relatedTarget,v=g&&_.contains(g);e.trapped||S&&_.contains(S)||(r=S),v&&t("focusin",f),!a.paused&&e.trapped&&(v?i=g:Jn(i,!0))},u=f=>{const _=h.unref(n);if(!(a.paused||!_))if(e.trapped){const g=f.relatedTarget;!We.isNil(g)&&!_.contains(g)&&setTimeout(()=>{if(!a.paused&&e.trapped){const S=$a({focusReason:o.value});t("focusout-prevented",S),S.defaultPrevented||Jn(i,!0)}},0)}else{const g=f.target;g&&_.contains(g)||t("focusout",f)}};function p(){return Lt(this,null,function*(){yield h.nextTick();const f=h.unref(n);if(f){Um.push(a);const _=f.contains(document.activeElement)?r:document.activeElement;if(r=_,!f.contains(_)){const S=new Event(Nc,Mm);f.addEventListener(Nc,l),f.dispatchEvent(S),S.defaultPrevented||h.nextTick(()=>{let v=e.focusStartEl;Ll(v)||(Jn(v),document.activeElement!==v&&(v="first")),v==="first"&&OT(zg(f),!0),(document.activeElement===_||v==="container")&&Jn(f)})}}})}function m(){const f=h.unref(n);if(f){f.removeEventListener(Nc,l);const _=new CustomEvent(Oc,H(T({},Mm),{detail:{focusReason:o.value}}));f.addEventListener(Oc,c),f.dispatchEvent(_),!_.defaultPrevented&&(o.value=="keyboard"||!AT()||f.contains(document.activeElement))&&Jn(r!=null?r:document.body),f.removeEventListener(Oc,c),Um.remove(a),r=null,i=null}}return h.onMounted(()=>{e.trapped&&p(),h.watch(()=>e.trapped,f=>{f?p():m()})}),h.onBeforeUnmount(()=>{e.trapped&&m(),n.value&&(n.value.removeEventListener("keydown",s),n.value.removeEventListener("focusin",d),n.value.removeEventListener("focusout",u),n.value=void 0)}),{onKeydown:s}}});function DT(e,t,n,r,i,o){return h.renderSlot(e.$slots,"default",{handleKeydown:e.onKeydown})}var kT=dn(IT,[["render",DT],["__file","focus-trap.vue"]]),Ot="top",en="bottom",tn="right",At="left",Gu="auto",ya=[Ot,en,tn,At],Fi="start",jo="end",MT="clippingParents",$g="viewport",uo="popper",LT="reference",Gm=ya.reduce(function(e,t){return e.concat([t+"-"+Fi,t+"-"+jo])},[]),zu=[].concat(ya,[Gu]).reduce(function(e,t){return e.concat([t,t+"-"+Fi,t+"-"+jo])},[]),PT="beforeRead",FT="read",BT="afterRead",UT="beforeMain",HT="main",VT="afterMain",GT="beforeWrite",zT="write",$T="afterWrite",YT=[PT,FT,BT,UT,HT,VT,GT,zT,$T];function On(e){return e?(e.nodeName||"").toLowerCase():null}function un(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Bi(e){var t=un(e).Element;return e instanceof t||e instanceof Element}function Zt(e){var t=un(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function $u(e){if(typeof ShadowRoot=="undefined")return!1;var t=un(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function qT(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Zt(o)||!On(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function jT(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!Zt(i)||!On(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}var Yg={name:"applyStyles",enabled:!0,phase:"write",fn:qT,effect:jT,requires:["computeStyles"]};function Tn(e){return e.split("-")[0]}var Gr=Math.max,Is=Math.min,Ui=Math.round;function Hi(e,t){t===void 0&&(t=!1);var n=e.getBoundingClientRect(),r=1,i=1;if(Zt(e)&&t){var o=e.offsetHeight,a=e.offsetWidth;a>0&&(r=Ui(n.width)/a||1),o>0&&(i=Ui(n.height)/o||1)}return{width:n.width/r,height:n.height/i,top:n.top/i,right:n.right/r,bottom:n.bottom/i,left:n.left/r,x:n.left/r,y:n.top/i}}function Yu(e){var t=Hi(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function qg(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&$u(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function qn(e){return un(e).getComputedStyle(e)}function WT(e){return["table","td","th"].indexOf(On(e))>=0}function Nr(e){return((Bi(e)?e.ownerDocument:e.document)||window.document).documentElement}function Bl(e){return On(e)==="html"?e:e.assignedSlot||e.parentNode||($u(e)?e.host:null)||Nr(e)}function zm(e){return!Zt(e)||qn(e).position==="fixed"?null:e.offsetParent}function KT(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&Zt(e)){var r=qn(e);if(r.position==="fixed")return null}var i=Bl(e);for($u(i)&&(i=i.host);Zt(i)&&["html","body"].indexOf(On(i))<0;){var o=qn(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Ca(e){for(var t=un(e),n=zm(e);n&&WT(n)&&qn(n).position==="static";)n=zm(n);return n&&(On(n)==="html"||On(n)==="body"&&qn(n).position==="static")?t:n||KT(e)||t}function qu(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ro(e,t,n){return Gr(e,Is(t,n))}function QT(e,t,n){var r=Ro(e,t,n);return r>n?n:r}function jg(){return{top:0,right:0,bottom:0,left:0}}function Wg(e){return Object.assign({},jg(),e)}function Kg(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var ZT=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,Wg(typeof e!="number"?e:Kg(e,ya))};function XT(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Tn(n.placement),l=qu(s),c=[At,tn].indexOf(s)>=0,d=c?"height":"width";if(!(!o||!a)){var u=ZT(i.padding,n),p=Yu(o),m=l==="y"?Ot:At,f=l==="y"?en:tn,_=n.rects.reference[d]+n.rects.reference[l]-a[l]-n.rects.popper[d],g=a[l]-n.rects.reference[l],S=Ca(o),v=S?l==="y"?S.clientHeight||0:S.clientWidth||0:0,y=_/2-g/2,b=u[m],E=v-p[d]-u[f],C=v/2-p[d]/2+y,N=Ro(b,C,E),R=l;n.modifiersData[r]=(t={},t[R]=N,t.centerOffset=N-C,t)}}function JT(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!qg(t.elements.popper,i)||(t.elements.arrow=i))}var e1={name:"arrow",enabled:!0,phase:"main",fn:XT,effect:JT,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Vi(e){return e.split("-")[1]}var t1={top:"auto",right:"auto",bottom:"auto",left:"auto"};function n1(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:Ui(t*i)/i||0,y:Ui(n*i)/i||0}}function $m(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,u=e.isFixed,p=a.x,m=p===void 0?0:p,f=a.y,_=f===void 0?0:f,g=typeof d=="function"?d({x:m,y:_}):{x:m,y:_};m=g.x,_=g.y;var S=a.hasOwnProperty("x"),v=a.hasOwnProperty("y"),y=At,b=Ot,E=window;if(c){var C=Ca(n),N="clientHeight",R="clientWidth";if(C===un(n)&&(C=Nr(n),qn(C).position!=="static"&&s==="absolute"&&(N="scrollHeight",R="scrollWidth")),C=C,i===Ot||(i===At||i===tn)&&o===jo){b=en;var O=u&&C===E&&E.visualViewport?E.visualViewport.height:C[N];_-=O-r.height,_*=l?1:-1}if(i===At||(i===Ot||i===en)&&o===jo){y=tn;var w=u&&C===E&&E.visualViewport?E.visualViewport.width:C[R];m-=w-r.width,m*=l?1:-1}}var x=Object.assign({position:s},c&&t1),I=d===!0?n1({x:m,y:_}):{x:m,y:_};if(m=I.x,_=I.y,l){var M;return Object.assign({},x,(M={},M[b]=v?"0":"",M[y]=S?"0":"",M.transform=(E.devicePixelRatio||1)<=1?"translate("+m+"px, "+_+"px)":"translate3d("+m+"px, "+_+"px, 0)",M))}return Object.assign({},x,(t={},t[b]=v?_+"px":"",t[y]=S?m+"px":"",t.transform="",t))}function r1(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:Tn(t.placement),variation:Vi(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,$m(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,$m(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var Qg={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:r1,data:{}},Ya={passive:!0};function i1(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=un(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(d){d.addEventListener("scroll",n.update,Ya)}),s&&l.addEventListener("resize",n.update,Ya),function(){o&&c.forEach(function(d){d.removeEventListener("scroll",n.update,Ya)}),s&&l.removeEventListener("resize",n.update,Ya)}}var Zg={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:i1,data:{}},o1={left:"right",right:"left",bottom:"top",top:"bottom"};function Ss(e){return e.replace(/left|right|bottom|top/g,function(t){return o1[t]})}var a1={start:"end",end:"start"};function Ym(e){return e.replace(/start|end/g,function(t){return a1[t]})}function ju(e){var t=un(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Wu(e){return Hi(Nr(e)).left+ju(e).scrollLeft}function s1(e){var t=un(e),n=Nr(e),r=t.visualViewport,i=n.clientWidth,o=n.clientHeight,a=0,s=0;return r&&(i=r.width,o=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,s=r.offsetTop)),{width:i,height:o,x:a+Wu(e),y:s}}function l1(e){var t,n=Nr(e),r=ju(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Gr(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Gr(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+Wu(e),l=-r.scrollTop;return qn(i||n).direction==="rtl"&&(s+=Gr(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function Ku(e){var t=qn(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Xg(e){return["html","body","#document"].indexOf(On(e))>=0?e.ownerDocument.body:Zt(e)&&Ku(e)?e:Xg(Bl(e))}function wo(e,t){var n;t===void 0&&(t=[]);var r=Xg(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=un(r),a=i?[o].concat(o.visualViewport||[],Ku(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(wo(Bl(a)))}function Md(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function c1(e){var t=Hi(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function qm(e,t){return t===$g?Md(s1(e)):Bi(t)?c1(t):Md(l1(Nr(e)))}function d1(e){var t=wo(Bl(e)),n=["absolute","fixed"].indexOf(qn(e).position)>=0,r=n&&Zt(e)?Ca(e):e;return Bi(r)?t.filter(function(i){return Bi(i)&&qg(i,r)&&On(i)!=="body"}):[]}function u1(e,t,n){var r=t==="clippingParents"?d1(e):[].concat(t),i=[].concat(r,[n]),o=i[0],a=i.reduce(function(s,l){var c=qm(e,l);return s.top=Gr(c.top,s.top),s.right=Is(c.right,s.right),s.bottom=Is(c.bottom,s.bottom),s.left=Gr(c.left,s.left),s},qm(e,o));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Jg(e){var t=e.reference,n=e.element,r=e.placement,i=r?Tn(r):null,o=r?Vi(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Ot:l={x:a,y:t.y-n.height};break;case en:l={x:a,y:t.y+t.height};break;case tn:l={x:t.x+t.width,y:s};break;case At:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=i?qu(i):null;if(c!=null){var d=c==="y"?"height":"width";switch(o){case Fi:l[c]=l[c]-(t[d]/2-n[d]/2);break;case jo:l[c]=l[c]+(t[d]/2-n[d]/2);break}}return l}function Wo(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.boundary,a=o===void 0?MT:o,s=n.rootBoundary,l=s===void 0?$g:s,c=n.elementContext,d=c===void 0?uo:c,u=n.altBoundary,p=u===void 0?!1:u,m=n.padding,f=m===void 0?0:m,_=Wg(typeof f!="number"?f:Kg(f,ya)),g=d===uo?LT:uo,S=e.rects.popper,v=e.elements[p?g:d],y=u1(Bi(v)?v:v.contextElement||Nr(e.elements.popper),a,l),b=Hi(e.elements.reference),E=Jg({reference:b,element:S,placement:i}),C=Md(Object.assign({},S,E)),N=d===uo?C:b,R={top:y.top-N.top+_.top,bottom:N.bottom-y.bottom+_.bottom,left:y.left-N.left+_.left,right:N.right-y.right+_.right},O=e.modifiersData.offset;if(d===uo&&O){var w=O[i];Object.keys(R).forEach(function(x){var I=[tn,en].indexOf(x)>=0?1:-1,M=[Ot,en].indexOf(x)>=0?"y":"x";R[x]+=w[M]*I})}return R}function p1(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?zu:l,d=Vi(r),u=d?s?Gm:Gm.filter(function(f){return Vi(f)===d}):ya,p=u.filter(function(f){return c.indexOf(f)>=0});p.length===0&&(p=u);var m=p.reduce(function(f,_){return f[_]=Wo(e,{placement:_,boundary:i,rootBoundary:o,padding:a})[Tn(_)],f},{});return Object.keys(m).sort(function(f,_){return m[f]-m[_]})}function m1(e){if(Tn(e)===Gu)return[];var t=Ss(e);return[Ym(e),t,Ym(t)]}function f1(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,d=n.boundary,u=n.rootBoundary,p=n.altBoundary,m=n.flipVariations,f=m===void 0?!0:m,_=n.allowedAutoPlacements,g=t.options.placement,S=Tn(g),v=S===g,y=l||(v||!f?[Ss(g)]:m1(g)),b=[g].concat(y).reduce(function(he,oe){return he.concat(Tn(oe)===Gu?p1(t,{placement:oe,boundary:d,rootBoundary:u,padding:c,flipVariations:f,allowedAutoPlacements:_}):oe)},[]),E=t.rects.reference,C=t.rects.popper,N=new Map,R=!0,O=b[0],w=0;w<b.length;w++){var x=b[w],I=Tn(x),M=Vi(x)===Fi,L=[Ot,en].indexOf(I)>=0,B=L?"width":"height",D=Wo(t,{placement:x,boundary:d,rootBoundary:u,altBoundary:p,padding:c}),A=L?M?tn:At:M?en:Ot;E[B]>C[B]&&(A=Ss(A));var k=Ss(A),P=[];if(o&&P.push(D[I]<=0),s&&P.push(D[A]<=0,D[k]<=0),P.every(function(he){return he})){O=x,R=!1;break}N.set(x,P)}if(R)for(var V=f?3:1,W=function(he){var oe=b.find(function(Ne){var qe=N.get(Ne);if(qe)return qe.slice(0,he).every(function(Fe){return Fe})});if(oe)return O=oe,"break"},Z=V;Z>0;Z--){var pe=W(Z);if(pe==="break")break}t.placement!==O&&(t.modifiersData[r]._skip=!0,t.placement=O,t.reset=!0)}}var h1={name:"flip",enabled:!0,phase:"main",fn:f1,requiresIfExists:["offset"],data:{_skip:!1}};function jm(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Wm(e){return[Ot,tn,en,At].some(function(t){return e[t]>=0})}function _1(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Wo(t,{elementContext:"reference"}),s=Wo(t,{altBoundary:!0}),l=jm(a,r),c=jm(s,i,o),d=Wm(l),u=Wm(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}var g1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:_1};function E1(e,t,n){var r=Tn(e),i=[At,Ot].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[At,tn].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function b1(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=zu.reduce(function(d,u){return d[u]=E1(u,t.rects,o),d},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}var S1={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:b1};function v1(e){var t=e.state,n=e.name;t.modifiersData[n]=Jg({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}var eE={name:"popperOffsets",enabled:!0,phase:"read",fn:v1,data:{}};function y1(e){return e==="x"?"y":"x"}function C1(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,d=n.altBoundary,u=n.padding,p=n.tether,m=p===void 0?!0:p,f=n.tetherOffset,_=f===void 0?0:f,g=Wo(t,{boundary:l,rootBoundary:c,padding:u,altBoundary:d}),S=Tn(t.placement),v=Vi(t.placement),y=!v,b=qu(S),E=y1(b),C=t.modifiersData.popperOffsets,N=t.rects.reference,R=t.rects.popper,O=typeof _=="function"?_(Object.assign({},t.rects,{placement:t.placement})):_,w=typeof O=="number"?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),x=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,I={x:0,y:0};if(C){if(o){var M,L=b==="y"?Ot:At,B=b==="y"?en:tn,D=b==="y"?"height":"width",A=C[b],k=A+g[L],P=A-g[B],V=m?-R[D]/2:0,W=v===Fi?N[D]:R[D],Z=v===Fi?-R[D]:-N[D],pe=t.elements.arrow,he=m&&pe?Yu(pe):{width:0,height:0},oe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:jg(),Ne=oe[L],qe=oe[B],Fe=Ro(0,N[D],he[D]),kt=y?N[D]/2-V-Fe-Ne-w.mainAxis:W-Fe-Ne-w.mainAxis,ut=y?-N[D]/2+V+Fe+qe+w.mainAxis:Z+Fe+qe+w.mainAxis,pt=t.elements.arrow&&Ca(t.elements.arrow),$t=pt?b==="y"?pt.clientTop||0:pt.clientLeft||0:0,ot=(M=x==null?void 0:x[b])!=null?M:0,mt=A+kt-ot-$t,ze=A+ut-ot,le=Ro(m?Is(k,mt):k,A,m?Gr(P,ze):P);C[b]=le,I[b]=le-A}if(s){var Ze,ee=b==="x"?Ot:At,re=b==="x"?en:tn,Se=C[E],ne=E==="y"?"height":"width",be=Se+g[ee],Ve=Se-g[re],je=[Ot,At].indexOf(S)!==-1,bt=(Ze=x==null?void 0:x[E])!=null?Ze:0,j=je?be:Se-N[ne]-R[ne]-bt+w.altAxis,F=je?Se+N[ne]+R[ne]-bt-w.altAxis:Ve,Y=m&&je?QT(j,Se,F):Ro(m?j:be,Se,m?F:Ve);C[E]=Y,I[E]=Y-Se}t.modifiersData[r]=I}}var T1={name:"preventOverflow",enabled:!0,phase:"main",fn:C1,requiresIfExists:["offset"]};function N1(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function O1(e){return e===un(e)||!Zt(e)?ju(e):N1(e)}function A1(e){var t=e.getBoundingClientRect(),n=Ui(t.width)/e.offsetWidth||1,r=Ui(t.height)/e.offsetHeight||1;return n!==1||r!==1}function R1(e,t,n){n===void 0&&(n=!1);var r=Zt(t),i=Zt(t)&&A1(t),o=Nr(t),a=Hi(e,i),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((On(t)!=="body"||Ku(o))&&(s=O1(t)),Zt(t)?(l=Hi(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=Wu(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function w1(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function x1(e){var t=w1(e);return YT.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function I1(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function D1(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Km={placement:"bottom",modifiers:[],strategy:"absolute"};function Qm(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function Qu(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?Km:i;return function(a,s,l){l===void 0&&(l=o);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},Km,o),modifiersData:{},elements:{reference:a,popper:s},attributes:{},styles:{}},d=[],u=!1,p={state:c,setOptions:function(_){var g=typeof _=="function"?_(c.options):_;f(),c.options=Object.assign({},o,c.options,g),c.scrollParents={reference:Bi(a)?wo(a):a.contextElement?wo(a.contextElement):[],popper:wo(s)};var S=x1(D1([].concat(r,c.options.modifiers)));return c.orderedModifiers=S.filter(function(v){return v.enabled}),m(),p.update()},forceUpdate:function(){if(!u){var _=c.elements,g=_.reference,S=_.popper;if(Qm(g,S)){c.rects={reference:R1(g,Ca(S),c.options.strategy==="fixed"),popper:Yu(S)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(R){return c.modifiersData[R.name]=Object.assign({},R.data)});for(var v=0;v<c.orderedModifiers.length;v++){if(c.reset===!0){c.reset=!1,v=-1;continue}var y=c.orderedModifiers[v],b=y.fn,E=y.options,C=E===void 0?{}:E,N=y.name;typeof b=="function"&&(c=b({state:c,options:C,name:N,instance:p})||c)}}}},update:I1(function(){return new Promise(function(_){p.forceUpdate(),_(c)})}),destroy:function(){f(),u=!0}};if(!Qm(a,s))return p;p.setOptions(l).then(function(_){!u&&l.onFirstUpdate&&l.onFirstUpdate(_)});function m(){c.orderedModifiers.forEach(function(_){var g=_.name,S=_.options,v=S===void 0?{}:S,y=_.effect;if(typeof y=="function"){var b=y({state:c,name:g,instance:p,options:v}),E=function(){};d.push(b||E)}})}function f(){d.forEach(function(_){return _()}),d=[]}return p}}Qu();var k1=[Zg,eE,Qg,Yg];Qu({defaultModifiers:k1});var M1=[Zg,eE,Qg,Yg,S1,h1,T1,e1,g1],L1=Qu({defaultModifiers:M1});const tE=zt({arrowOffset:{type:Number,default:5}}),P1=["fixed","absolute"],F1=zt({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:Be(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:zu,default:"bottom"},popperOptions:{type:Be(Object),default:()=>({})},strategy:{type:String,values:P1,default:"absolute"}}),nE=zt(H(T(H(T(T({},F1),tE),{id:String,style:{type:Be([String,Array,Object])},className:{type:Be([String,Array,Object])},effect:{type:Be(String),default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:Boolean,trapping:Boolean,popperClass:{type:Be([String,Array,Object])},popperStyle:{type:Be([String,Array,Object])},referenceEl:{type:Be(Object)},triggerTargetEl:{type:Be(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number}),Pg(["ariaLabel"])),{loop:Boolean})),B1={mouseenter:e=>e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},U1=(e,t)=>{const n=h.ref(!1),r=h.ref();return{focusStartRef:r,trapped:n,onFocusAfterReleased:c=>{var d;((d=c.detail)==null?void 0:d.focusReason)!=="pointer"&&(r.value="first",t("blur"))},onFocusAfterTrapped:()=>{t("focus")},onFocusInTrap:c=>{e.visible&&!n.value&&(c.target&&(r.value=c.target),n.value=!0)},onFocusoutPrevented:c=>{e.trapping||(c.detail.focusReason==="pointer"&&c.preventDefault(),n.value=!1)},onReleaseRequested:()=>{n.value=!1,t("close")}}},H1=(e,t=[])=>{const{placement:n,strategy:r,popperOptions:i}=e,o=H(T({placement:n,strategy:r},i),{modifiers:[...G1(e),...t]});return z1(o,i==null?void 0:i.modifiers),o},V1=e=>{if(ct.isClient)return ct.unrefElement(e)};function G1(e){const{offset:t,gpuAcceleration:n,fallbackPlacements:r}=e;return[{name:"offset",options:{offset:[0,t!=null?t:12]}},{name:"preventOverflow",options:{padding:{top:0,bottom:0,left:0,right:0}}},{name:"flip",options:{padding:5,fallbackPlacements:r}},{name:"computeStyles",options:{gpuAcceleration:n}}]}function z1(e,t){t&&(e.modifiers=[...e.modifiers,...t!=null?t:[]])}const $1=(e,t,n={})=>{const r={name:"updateState",enabled:!0,phase:"write",fn:({state:l})=>{const c=Y1(l);Object.assign(a.value,c)},requires:["computeStyles"]},i=h.computed(()=>{const{onFirstUpdate:l,placement:c,strategy:d,modifiers:u}=h.unref(n);return{onFirstUpdate:l,placement:c||"bottom",strategy:d||"absolute",modifiers:[...u||[],r,{name:"applyStyles",enabled:!1}]}}),o=h.shallowRef(),a=h.ref({styles:{popper:{position:h.unref(i).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=()=>{o.value&&(o.value.destroy(),o.value=void 0)};return h.watch(i,l=>{const c=h.unref(o);c&&c.setOptions(l)},{deep:!0}),h.watch([e,t],([l,c])=>{s(),!(!l||!c)&&(o.value=L1(l,c,h.unref(i)))}),h.onBeforeUnmount(()=>{s()}),{state:h.computed(()=>{var l;return T({},((l=h.unref(o))==null?void 0:l.state)||{})}),styles:h.computed(()=>h.unref(a).styles),attributes:h.computed(()=>h.unref(a).attributes),update:()=>{var l;return(l=h.unref(o))==null?void 0:l.update()},forceUpdate:()=>{var l;return(l=h.unref(o))==null?void 0:l.forceUpdate()},instanceRef:h.computed(()=>h.unref(o))}};function Y1(e){const t=Object.keys(e.elements),n=We.fromPairs(t.map(i=>[i,e.styles[i]||{}])),r=We.fromPairs(t.map(i=>[i,e.attributes[i]]));return{styles:n,attributes:r}}const q1=0,j1=e=>{const{popperInstanceRef:t,contentRef:n,triggerRef:r,role:i}=h.inject(Bu,void 0),o=h.ref(),a=h.computed(()=>e.arrowOffset),s=h.computed(()=>({name:"eventListeners",enabled:!!e.visible})),l=h.computed(()=>{var S;const v=h.unref(o),y=(S=h.unref(a))!=null?S:q1;return{name:"arrow",enabled:!We.isUndefined(v),options:{element:v,padding:y}}}),c=h.computed(()=>T({onFirstUpdate:()=>{f()}},H1(e,[h.unref(l),h.unref(s)]))),d=h.computed(()=>V1(e.referenceEl)||h.unref(r)),{attributes:u,state:p,styles:m,update:f,forceUpdate:_,instanceRef:g}=$1(d,n,c);return h.watch(g,S=>t.value=S,{flush:"sync"}),h.onMounted(()=>{h.watch(()=>{var S,v;return(v=(S=h.unref(d))==null?void 0:S.getBoundingClientRect)==null?void 0:v.call(S)},()=>{f()})}),{attributes:u,arrowRef:o,contentRef:n,instanceRef:g,state:p,styles:m,role:i,forceUpdate:_,update:f}},W1=(e,{attributes:t,styles:n,role:r})=>{const{nextZIndex:i}=AC(),o=Tr("popper"),a=h.computed(()=>h.unref(t).popper),s=h.ref(Yo(e.zIndex)?e.zIndex:i()),l=h.computed(()=>[o.b(),o.is("pure",e.pure),o.is(e.effect),e.popperClass]),c=h.computed(()=>[{zIndex:h.unref(s)},h.unref(n).popper,e.popperStyle||{}]),d=h.computed(()=>r.value==="dialog"?"false":void 0),u=h.computed(()=>h.unref(n).arrow||{});return{ariaModal:d,arrowStyle:u,contentAttrs:a,contentClass:l,contentStyle:c,contentZIndex:s,updateZIndex:()=>{s.value=Yo(e.zIndex)?e.zIndex:i()}}},K1=h.defineComponent({name:"ElPopperContent"}),Q1=h.defineComponent(H(T({},K1),{props:nE,emits:B1,setup(e,{expose:t,emit:n}){const r=e,{focusStartRef:i,trapped:o,onFocusAfterReleased:a,onFocusAfterTrapped:s,onFocusInTrap:l,onFocusoutPrevented:c,onReleaseRequested:d}=U1(r,n),{attributes:u,arrowRef:p,contentRef:m,styles:f,instanceRef:_,role:g,update:S}=j1(r),{ariaModal:v,arrowStyle:y,contentAttrs:b,contentClass:E,contentStyle:C,updateZIndex:N}=W1(r,{styles:f,attributes:u,role:g}),R=h.inject(Dd,void 0);h.provide(Bg,{arrowStyle:y,arrowRef:p}),R&&h.provide(Dd,H(T({},R),{addInputId:wd,removeInputId:wd}));let O;const w=(I=!0)=>{S(),I&&N()},x=()=>{w(!1),r.visible&&r.focusOnShow?o.value=!0:r.visible===!1&&(o.value=!1)};return h.onMounted(()=>{h.watch(()=>r.triggerTargetEl,(I,M)=>{O==null||O(),O=void 0;const L=h.unref(I||m.value),B=h.unref(M||m.value);Ri(L)&&(O=h.watch([g,()=>r.ariaLabel,v,()=>r.id],D=>{["role","aria-label","aria-modal","id"].forEach((A,k)=>{We.isNil(D[k])?L.removeAttribute(A):L.setAttribute(A,D[k])})},{immediate:!0})),B!==L&&Ri(B)&&["role","aria-label","aria-modal","id"].forEach(D=>{B.removeAttribute(D)})},{immediate:!0}),h.watch(()=>r.visible,x,{immediate:!0})}),h.onBeforeUnmount(()=>{O==null||O(),O=void 0}),t({popperContentRef:m,popperInstanceRef:_,updatePopper:w,contentStyle:C}),(I,M)=>(h.openBlock(),h.createElementBlock("div",h.mergeProps({ref_key:"contentRef",ref:m},h.unref(b),{style:h.unref(C),class:h.unref(E),tabindex:"-1",onMouseenter:L=>I.$emit("mouseenter",L),onMouseleave:L=>I.$emit("mouseleave",L)}),[h.createVNode(h.unref(kT),{loop:I.loop,trapped:h.unref(o),"trap-on-focus-in":!0,"focus-trap-el":h.unref(m),"focus-start-el":h.unref(i),onFocusAfterTrapped:h.unref(s),onFocusAfterReleased:h.unref(a),onFocusin:h.unref(l),onFocusoutPrevented:h.unref(c),onReleaseRequested:h.unref(d)},{default:h.withCtx(()=>[h.renderSlot(I.$slots,"default")]),_:3},8,["loop","trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16,["onMouseenter","onMouseleave"]))}}));var Z1=dn(Q1,[["__file","content.vue"]]);const X1=va(cT),Zu=Symbol("elTooltip"),rE=zt({to:{type:Be([String,Object]),required:!0},disabled:Boolean}),iE=zt(T(H(T(T({},FC),nE),{appendTo:{type:rE.to.type},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:Be(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean}),Pg(["ariaLabel"]))),oE=zt(H(T({},Hg),{disabled:Boolean,trigger:{type:Be([String,Array]),default:"hover"},triggerKeys:{type:Be(Array),default:()=>[Vr.enter,Vr.numpadEnter,Vr.space]},focusOnTarget:Boolean})),J1=Pl({type:Be(Boolean),default:null}),eN=Pl({type:Be(Function)}),tN=e=>{const t=`update:${e}`,n=`onUpdate:${e}`,r=[t],i={[e]:J1,[n]:eN};return{useModelToggle:({indicator:a,toggleReason:s,shouldHideWhenRouteChanges:l,shouldProceed:c,onShow:d,onHide:u})=>{const p=h.getCurrentInstance(),{emit:m}=p,f=p.props,_=h.computed(()=>Va(f[n])),g=h.computed(()=>f[e]===null),S=N=>{a.value!==!0&&(a.value=!0,s&&(s.value=N),Va(d)&&d(N))},v=N=>{a.value!==!1&&(a.value=!1,s&&(s.value=N),Va(u)&&u(N))},y=N=>{if(f.disabled===!0||Va(c)&&!c())return;const R=_.value&&ct.isClient;R&&m(t,!0),(g.value||!R)&&S(N)},b=N=>{if(f.disabled===!0||!ct.isClient)return;const R=_.value&&ct.isClient;R&&m(t,!1),(g.value||!R)&&v(N)},E=N=>{kg(N)&&(f.disabled&&N?_.value&&m(t,!1):a.value!==N&&(N?S():v()))},C=()=>{a.value?b():y()};return h.watch(()=>f[e],E),l&&p.appContext.config.globalProperties.$route!==void 0&&h.watch(()=>T({},p.proxy.$route),()=>{l.value&&a.value&&b()}),h.onMounted(()=>{E(f[e])}),{hide:b,show:y,toggle:C,hasUpdateHandler:_}},useModelToggleProps:i,useModelToggleEmits:r}},{useModelToggleProps:nN,useModelToggleEmits:rN,useModelToggle:iN}=tN("visible"),oN=zt(H(T(T(T(T(T({},Ug),nN),iE),oE),tE),{showArrow:{type:Boolean,default:!0}})),aN=[...rN,"before-show","before-hide","show","hide","open","close"],Ld=(e,t)=>Dg(e)?e.includes(t):e===t,pi=(e,t,n)=>r=>{Ld(h.unref(e),t)&&n(r)},sN=h.defineComponent({name:"ElTooltipTrigger"}),lN=h.defineComponent(H(T({},sN),{props:oE,setup(e,{expose:t}){const n=e,r=Tr("tooltip"),{controlled:i,id:o,open:a,onOpen:s,onClose:l,onToggle:c}=h.inject(Zu,void 0),d=h.ref(null),u=()=>{if(h.unref(i)||n.disabled)return!0},p=h.toRef(n,"trigger"),m=Bn(u,pi(p,"hover",b=>{s(b),n.focusOnTarget&&b.target&&h.nextTick(()=>{Fu(b.target,{preventScroll:!0})})})),f=Bn(u,pi(p,"hover",l)),_=Bn(u,pi(p,"click",b=>{b.button===0&&c(b)})),g=Bn(u,pi(p,"focus",s)),S=Bn(u,pi(p,"focus",l)),v=Bn(u,pi(p,"contextmenu",b=>{b.preventDefault(),c(b)})),y=Bn(u,b=>{const E=Vu(b);n.triggerKeys.includes(E)&&(b.preventDefault(),c(b))});return t({triggerRef:d}),(b,E)=>(h.openBlock(),h.createBlock(h.unref(ET),{id:h.unref(o),"virtual-ref":b.virtualRef,open:h.unref(a),"virtual-triggering":b.virtualTriggering,class:h.normalizeClass(h.unref(r).e("trigger")),onBlur:h.unref(S),onClick:h.unref(_),onContextmenu:h.unref(v),onFocus:h.unref(g),onMouseenter:h.unref(m),onMouseleave:h.unref(f),onKeydown:h.unref(y)},{default:h.withCtx(()=>[h.renderSlot(b.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}}));var cN=dn(lN,[["__file","trigger.vue"]]);const dN=h.defineComponent({__name:"teleport",props:rE,setup(e){return(t,n)=>t.disabled?h.renderSlot(t.$slots,"default",{key:0}):(h.openBlock(),h.createBlock(h.Teleport,{key:1,to:t.to},[h.renderSlot(t.$slots,"default")],8,["to"]))}});var uN=dn(dN,[["__file","teleport.vue"]]);const pN=va(uN),aE=()=>{const e=Lu(),t=Fg(),n=h.computed(()=>`${e.value}-popper-container-${t.prefix}`),r=h.computed(()=>`#${n.value}`);return{id:n,selector:r}},mN=e=>{const t=document.createElement("div");return t.id=e,document.body.appendChild(t),t},fN=()=>{const{id:e,selector:t}=aE();return h.onBeforeMount(()=>{ct.isClient&&(typeof process!="undefined"&&process.env.NODE_ENV==="test"||!document.body.querySelector(t.value))&&mN(e.value)}),{id:e,selector:t}},hN=e=>!e&&e!==0?[]:Dg(e)?e:[e],_N=h.defineComponent({name:"ElTooltipContent",inheritAttrs:!1}),gN=h.defineComponent(H(T({},_N),{props:iE,setup(e,{expose:t}){const n=e,{selector:r}=aE(),i=Tr("tooltip"),o=h.ref(),a=ct.computedEager(()=>{var k;return(k=o.value)==null?void 0:k.popperContentRef});let s;const{controlled:l,id:c,open:d,trigger:u,onClose:p,onOpen:m,onShow:f,onHide:_,onBeforeShow:g,onBeforeHide:S}=h.inject(Zu,void 0),v=h.computed(()=>n.transition||`${i.namespace.value}-fade-in-linear`),y=h.computed(()=>typeof process!="undefined"&&process.env.NODE_ENV==="test"&&!process.env.RUN_TEST_WITH_PERSISTENT?!0:n.persistent);h.onBeforeUnmount(()=>{s==null||s()});const b=h.computed(()=>h.unref(y)?!0:h.unref(d)),E=h.computed(()=>n.disabled?!1:h.unref(d)),C=h.computed(()=>n.appendTo||r.value),N=h.computed(()=>{var k;return(k=n.style)!=null?k:{}}),R=h.ref(!0),O=()=>{_(),A()&&Fu(document.body,{preventScroll:!0}),R.value=!0},w=()=>{if(h.unref(l))return!0},x=Bn(w,()=>{n.enterable&&Ld(h.unref(u),"hover")&&m()}),I=Bn(w,()=>{Ld(h.unref(u),"hover")&&p()}),M=()=>{var k,P;(P=(k=o.value)==null?void 0:k.updatePopper)==null||P.call(k),g==null||g()},L=()=>{S==null||S()},B=()=>{f()},D=()=>{n.virtualTriggering||p()},A=k=>{var P;const V=(P=o.value)==null?void 0:P.popperContentRef,W=(k==null?void 0:k.relatedTarget)||document.activeElement;return V==null?void 0:V.contains(W)};return h.watch(()=>h.unref(d),k=>{k?(R.value=!1,s=ct.onClickOutside(a,()=>{if(h.unref(l))return;hN(h.unref(u)).every(V=>V!=="hover"&&V!=="focus")&&p()},{detectIframe:!0})):s==null||s()},{flush:"post"}),h.watch(()=>n.content,()=>{var k,P;(P=(k=o.value)==null?void 0:k.updatePopper)==null||P.call(k)}),t({contentRef:o,isFocusInsideContent:A}),(k,P)=>(h.openBlock(),h.createBlock(h.unref(pN),{disabled:!k.teleported,to:h.unref(C)},{default:h.withCtx(()=>[h.unref(b)||!R.value?(h.openBlock(),h.createBlock(h.Transition,{key:0,name:h.unref(v),appear:!h.unref(y),onAfterLeave:O,onBeforeEnter:M,onAfterEnter:B,onBeforeLeave:L,persisted:""},{default:h.withCtx(()=>[h.withDirectives(h.createVNode(h.unref(Z1),h.mergeProps({id:h.unref(c),ref_key:"contentRef",ref:o},k.$attrs,{"aria-label":k.ariaLabel,"aria-hidden":R.value,"boundaries-padding":k.boundariesPadding,"fallback-placements":k.fallbackPlacements,"gpu-acceleration":k.gpuAcceleration,offset:k.offset,placement:k.placement,"popper-options":k.popperOptions,"arrow-offset":k.arrowOffset,strategy:k.strategy,effect:k.effect,enterable:k.enterable,pure:k.pure,"popper-class":k.popperClass,"popper-style":[k.popperStyle,h.unref(N)],"reference-el":k.referenceEl,"trigger-target-el":k.triggerTargetEl,visible:h.unref(E),"z-index":k.zIndex,loop:k.loop,onMouseenter:h.unref(x),onMouseleave:h.unref(I),onBlur:D,onClose:h.unref(p)}),{default:h.withCtx(()=>[h.renderSlot(k.$slots,"default")]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","arrow-offset","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","loop","onMouseenter","onMouseleave","onClose"]),[[h.vShow,h.unref(E)]])]),_:3},8,["name","appear"])):h.createCommentVNode("v-if",!0)]),_:3},8,["disabled","to"]))}}));var EN=dn(gN,[["__file","content.vue"]]);const bN=h.defineComponent({name:"ElTooltip"}),SN=h.defineComponent(H(T({},bN),{props:oN,emits:aN,setup(e,{expose:t,emit:n}){const r=e;fN();const i=Tr("tooltip"),o=nT(),a=h.ref(),s=h.ref(),l=()=>{var y;const b=h.unref(a);b&&((y=b.popperInstanceRef)==null||y.update())},c=h.ref(!1),d=h.ref(),{show:u,hide:p,hasUpdateHandler:m}=iN({indicator:c,toggleReason:d}),{onOpen:f,onClose:_}=BC({showAfter:h.toRef(r,"showAfter"),hideAfter:h.toRef(r,"hideAfter"),autoClose:h.toRef(r,"autoClose"),open:u,close:p}),g=h.computed(()=>kg(r.visible)&&!m.value),S=h.computed(()=>[i.b(),r.popperClass]);h.provide(Zu,{controlled:g,id:o,open:h.readonly(c),trigger:h.toRef(r,"trigger"),onOpen:f,onClose:_,onToggle:y=>{h.unref(c)?_(y):f(y)},onShow:()=>{n("show",d.value)},onHide:()=>{n("hide",d.value)},onBeforeShow:()=>{n("before-show",d.value)},onBeforeHide:()=>{n("before-hide",d.value)},updatePopper:l}),h.watch(()=>r.disabled,y=>{y&&c.value&&(c.value=!1)});const v=y=>{var b;return(b=s.value)==null?void 0:b.isFocusInsideContent(y)};return h.onDeactivated(()=>c.value&&p()),t({popperRef:a,contentRef:s,isFocusInsideContent:v,updatePopper:l,onOpen:f,onClose:_,hide:p}),(y,b)=>(h.openBlock(),h.createBlock(h.unref(X1),{ref_key:"popperRef",ref:a,role:y.role},{default:h.withCtx(()=>[h.createVNode(cN,{disabled:y.disabled,trigger:y.trigger,"trigger-keys":y.triggerKeys,"virtual-ref":y.virtualRef,"virtual-triggering":y.virtualTriggering,"focus-on-target":y.focusOnTarget},{default:h.withCtx(()=>[y.$slots.default?h.renderSlot(y.$slots,"default",{key:0}):h.createCommentVNode("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering","focus-on-target"]),h.createVNode(EN,{ref_key:"contentRef",ref:s,"aria-label":y.ariaLabel,"boundaries-padding":y.boundariesPadding,content:y.content,disabled:y.disabled,effect:y.effect,enterable:y.enterable,"fallback-placements":y.fallbackPlacements,"hide-after":y.hideAfter,"gpu-acceleration":y.gpuAcceleration,offset:y.offset,persistent:y.persistent,"popper-class":h.unref(S),"popper-style":y.popperStyle,placement:y.placement,"popper-options":y.popperOptions,"arrow-offset":y.arrowOffset,pure:y.pure,"raw-content":y.rawContent,"reference-el":y.referenceEl,"trigger-target-el":y.triggerTargetEl,"show-after":y.showAfter,strategy:y.strategy,teleported:y.teleported,transition:y.transition,"virtual-triggering":y.virtualTriggering,"z-index":y.zIndex,"append-to":y.appendTo,loop:y.loop},{default:h.withCtx(()=>[h.renderSlot(y.$slots,"content",{},()=>[y.rawContent?(h.openBlock(),h.createElementBlock("span",{key:0,innerHTML:y.content},null,8,["innerHTML"])):(h.openBlock(),h.createElementBlock("span",{key:1},h.toDisplayString(y.content),1))]),y.showArrow?(h.openBlock(),h.createBlock(h.unref(pT),{key:0})):h.createCommentVNode("v-if",!0)]),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","arrow-offset","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to","loop"])]),_:3},8,["role"]))}}));var vN=dn(SN,[["__file","tooltip.vue"]]);const yN=va(vN);var sE=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};const CN=zt({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:Lg},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),TN={close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},NN=h.defineComponent({name:"ElTag"}),ON=h.defineComponent(H(T({},NN),{props:CN,emits:TN,setup(e,{emit:t}){const n=e,r=oT(),i=Tr("tag"),o=h.computed(()=>{const{type:c,hit:d,effect:u,closable:p,round:m}=n;return[i.b(),i.is("closable",p),i.m(c||"primary"),i.m(r.value),i.m(u),i.is("hit",d),i.is("round",m)]}),a=c=>{t("close",c)},s=c=>{t("click",c)},l=c=>{var d,u,p;(p=(u=(d=c==null?void 0:c.component)==null?void 0:d.subTree)==null?void 0:u.component)!=null&&p.bum&&(c.component.subTree.component.bum=null)};return(c,d)=>c.disableTransitions?(h.openBlock(),h.createElementBlock("span",{key:0,class:h.normalizeClass(h.unref(o)),style:h.normalizeStyle({backgroundColor:c.color}),onClick:s},[h.createElementVNode("span",{class:h.normalizeClass(h.unref(i).e("content"))},[h.renderSlot(c.$slots,"default")],2),c.closable?(h.openBlock(),h.createBlock(h.unref(Am),{key:0,class:h.normalizeClass(h.unref(i).e("close")),onClick:h.withModifiers(a,["stop"])},{default:h.withCtx(()=>[h.createVNode(h.unref(xd))]),_:1},8,["class","onClick"])):h.createCommentVNode("v-if",!0)],6)):(h.openBlock(),h.createBlock(h.Transition,{key:1,name:`${h.unref(i).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:l},{default:h.withCtx(()=>[h.createElementVNode("span",{class:h.normalizeClass(h.unref(o)),style:h.normalizeStyle({backgroundColor:c.color}),onClick:s},[h.createElementVNode("span",{class:h.normalizeClass(h.unref(i).e("content"))},[h.renderSlot(c.$slots,"default")],2),c.closable?(h.openBlock(),h.createBlock(h.unref(Am),{key:0,class:h.normalizeClass(h.unref(i).e("close")),onClick:h.withModifiers(a,["stop"])},{default:h.withCtx(()=>[h.createVNode(h.unref(xd))]),_:1},8,["class","onClick"])):h.createCommentVNode("v-if",!0)],6)]),_:3},8,["name"]))}}));var AN=dn(ON,[["__file","tag.vue"]]);const RN=va(AN),wN={class:"tooltip-header flex flex-col w-full",style:{"line-height":"1"}},xN={class:"tooltip-header-title"},Zm=h.defineComponent({__name:"TooltipHeader",props:{title:{},subtitle:{}},setup(e){const t=e,n=h.ref(),r=h.ref(!1),i=h.ref(!1),o=()=>{if(!n.value||!t.subtitle||i.value)return;const a=n.value;r.value=a.scrollWidth>a.clientWidth,i.value=!0};return h.watch(()=>t.subtitle,()=>{i.value=!1,r.value=!1}),(a,s)=>{const l=yN;return h.openBlock(),h.createElementBlock("div",wN,[h.createElementVNode("span",xN,h.toDisplayString(e.title),1),e.subtitle?(h.openBlock(),h.createBlock(l,{key:0,content:e.subtitle,disabled:!r.value,placement:"top"},{default:h.withCtx(()=>[h.createElementVNode("div",{ref_key:"subtitleRef",ref:n,class:"tooltip-header-subtitle font-400 text-nowrap text-ellipsis overflow-hidden mt-1",style:{"font-size":"clamp(12px, calc(1em - 1px), 16px)"},onMouseenter:o},h.toDisplayString(e.subtitle),545)]),_:1},8,["content","disabled"])):h.createCommentVNode("",!0)])}}}),IN=(e,t,n,r)=>{const i=t+1;return n*(r-1)+i};function Xm(e,t){return t.hidden===void 0?!1:Je(t.hidden)?t.hidden({},null,t,e.form,e.excontext,e.editable):t.hidden}function DN(e,t,n,r,i){return e.hidden===void 0?!1:Je(e.hidden)?e.hidden(t,n,i,r.form,r.excontext,r.editable):e.hidden}function lE(e,t,n,r,i){return e.disabled===void 0?!1:Je(e.disabled)?e.disabled(t,n,i,r.form,r.excontext,r.editable):e.disabled}function kN(e,t,n,r,i){return e.loading===void 0?!1:Je(e.loading)?e.loading(t,n,i,r.form,r.excontext,r.editable):e.loading}function Jm(e,t){return e.editable?t.editable===void 0?!0:Je(t.editable)?t.editable({},null,t,e.form,e.excontext,e.editable):t.editable:!1}function MN(e,t,n,r){var i,o,a,s,l,c,d,u;return((o=(i=t.editProps)==null?void 0:i.componentProps)==null?void 0:o.disabled)===void 0?!1:Je((s=(a=t.editProps)==null?void 0:a.componentProps)==null?void 0:s.disabled)?(c=(l=t.editProps)==null?void 0:l.componentProps)==null?void 0:c.disabled(n,r,t,e.form,e.excontext,e.editable):(u=(d=t.editProps)==null?void 0:d.componentProps)==null?void 0:u.disabled}function LN(e,t,n,r){return t.copyable===void 0?!1:Je(t.copyable)?t.copyable(n,r,t,e.form,e.excontext,e.editable):t.copyable}function PN(e,t,n,r){return t.clickable===void 0?!1:Je(t.clickable)?t.clickable(n,r,t,e.form,e.excontext,e.editable):t.clickable}function FN(e,t){const n=r=>{for(const i of r){if(i.field&&i.field===t)return i;if(i.children&&i.children.length>0)return n(i.children)}return null};return n(e)}function BN(e,t){const n=r=>{for(const i of r){if(i.key&&i.key===t)return i;if(i.children&&i.children.length>0)return n(i.children)}return null};return n(e)}const UN={key:0,"aria-hidden":"true"},HN=["xlink:href"],VN=h.defineComponent({__name:"Icon",props:{icon:{type:String,required:!0},color:{type:String},size:{type:[String,Number],default:16}},setup(e){const t=e,n=h.computed(()=>t.icon.startsWith("svg-icon:")),r=h.computed(()=>h.unref(n)?`#icon-${t.icon.split("svg-icon:")[1]}`:t.icon),i=h.computed(()=>{const{color:o,size:a}=t;return{fontSize:typeof a=="number"?`${a}px`:a,color:o}});return(o,a)=>(h.openBlock(),h.createBlock(h.unref(G.ElIcon),{size:e.size,color:e.color},{default:h.withCtx(()=>[n.value?(h.openBlock(),h.createElementBlock("svg",UN,[h.createElementVNode("use",{"xlink:href":r.value},null,8,HN)])):(h.openBlock(),h.createBlock(h.unref($y.Icon),{key:1,icon:r.value,style:h.normalizeStyle(i.value),class:h.normalizeClass(o.$attrs.class)},null,8,["icon","style","class"]))]),_:1},8,["size","color"]))}}),Wn=(e,t)=>{if(e.install=n=>{for(const r of[e,...Object.values(t!=null?t:{})])n.component(r.name,r)},t)for(const[n,r]of Object.entries(t))e[n]=r;return e},Ut=Wn(VN),GN={class:"dot-tag__text"},zN=h.defineComponent({__name:"DotTag",props:{value:{type:String,default:""},type:{type:String,default:"primary"},color:{type:String,default:""},hit:{type:Boolean,default:!1},effect:{type:String,default:"dark"},round:{type:Boolean,default:!1}},setup(e){return(t,n)=>{const r=RN;return h.openBlock(),h.createBlock(r,{effect:e.effect,hit:e.hit,round:"",class:"dot-tag",type:e.type},{default:h.withCtx(()=>[h.createElementVNode("span",{class:h.normalizeClass(["dot-tag__dot",{[e.type]:!0}])},null,2),h.createElementVNode("span",GN,h.toDisplayString(e.value),1)]),_:1},8,["effect","hit","type"])}}}),ro=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},$N=ro(zN,[["__scopeId","data-v-efa5516b"]]),YN=["aria-label"],qN={key:0,class:"origin-value","aria-hidden":"true"},jN={key:1,class:"crypto-value","aria-hidden":"true"},WN=h.defineComponent({__name:"SensitiveSwitch",props:{originValue:{},cryptoValue:{},enable:{type:Boolean}},setup(e){const t=e,n=h.ref(!1),r=()=>{t.enable&&(n.value=!0)},i=()=>{t.enable&&(n.value=!1)},o=()=>{t.enable&&(n.value=!0)},a=()=>{t.enable&&(n.value=!1)};return(s,l)=>(h.openBlock(),h.createElementBlock("span",{ref:"switchContainer",class:"sensitive-switch",tabindex:"0",role:"button","aria-label":n.value?`原始值: ${e.originValue}`:`已加密值: ${e.cryptoValue}`,onMouseenter:r,onMouseleave:i,onFocusin:o,onFocusout:a},[n.value?(h.openBlock(),h.createElementBlock("span",qN,h.toDisplayString(e.originValue),1)):(h.openBlock(),h.createElementBlock("span",jN,h.toDisplayString(e.cryptoValue),1))],40,YN))}}),KN=ro(WN,[["__scopeId","data-v-2ae8cf25"]]);var QN={exports:{}};(function(e,t){(function(n,r){e.exports=r(Du)})(sE,function(n){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var i=r(n),o={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(a,s){return s==="W"?a+"周":a+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(a,s){var l=100*a+s;return l<600?"凌晨":l<900?"早上":l<1100?"上午":l<1300?"中午":l<1800?"下午":"晚上"}};return i.default.locale(o,null,!0),o})})(QN);var ZN={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(sE,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(n){var r=["th","st","nd","rd"],i=n%100;return"["+n+(r[(i-20)%10]||r[i]||r[0])+"]"}}})})(ZN);const XN={"zh-CN":"zh-cn","en-US":"en"};function JN(e){Du.locale(XN[e]||"zh-cn")}Qy(JN);function Xu(e,t,n){if(!e)return e;let r;typeof t=="string"?r=new RegExp(t,"g"):r=t;const i=r.global?r:new RegExp(r.source,r.flags+"g");return e.replace(i,n)}function cE(e,t){const n=t||"YYYY-MM-DD";try{const r=Du(e);return r.isValid()?r.format(n):(_e.warn("console.format.invalidDate",{value:e}),"")}catch(r){return _e.error("console.format.dateFormatError",{value:e,format:n},r),""}}function Ju(e,t={}){const{amountThousand:n=!0,amountDecimal:r=!0,amountDigits:i=2,amountUnit:o="",amountUnitPosition:a="left",defaultValue:s="0"}=t,l=parseFloat(String(e));if(isNaN(l)||!isFinite(l))return o?a==="left"?`${o}${s}`:`${s}${o}`:s;const c={};if(c.useGrouping=n,r){const p=Math.max(0,Math.floor(i));c.minimumFractionDigits=p,c.maximumFractionDigits=p}else c.minimumFractionDigits=0,c.maximumFractionDigits=0;let u=new Intl.NumberFormat("en-US",c).format(l);return o&&(a==="left"?u=`${o}${u}`:u=`${u}${o}`),u}function eO(e){return Lt(this,null,function*(){if(!e)return!1;if(navigator.clipboard&&typeof navigator.clipboard.writeText=="function")try{return yield navigator.clipboard.writeText(e),!0}catch(t){}try{const t=document.createElement("textarea");t.style.position="fixed",t.style.top="0",t.style.left="0",t.style.width="1px",t.style.height="1px",t.style.padding="0",t.style.border="none",t.style.outline="none",t.style.boxShadow="none",t.style.background="transparent",t.value=e,document.body.appendChild(t),t.select(),t.setSelectionRange(0,t.value.length);const n=document.execCommand("copy");return document.body.removeChild(t),n}catch(t){return!1}})}function tO(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!h.isVNode(e)}function nO(e){var l,c,d;const{column:t,value:n,emptyValue:r,dictTools:i}=e;if(!t.typeProps)return _e.warn("console.table.dictTypePropsRequired",void 0,t),{value:n||r};let o=[];if(t.typeProps.dictOptions!==void 0?o=vg(t.typeProps.dictOptions)?t.typeProps.dictOptions:[]:t.typeProps.dictName&&(o=i.getDictOptions(t.typeProps.dictName)),t.typeProps.dictIsTree){const u=i.getTreeDictItemLabel(o,n,(l=t.typeProps)==null?void 0:l.dictValueIsPath,(c=t.typeProps)==null?void 0:c.dictLabelFullpath,(d=t.typeProps)==null?void 0:d.dictLabelSeparator);return u?{value:u}:r}const a=o.find(u=>u.value===n),s=(a==null?void 0:a.label)||n;return!a&&!n?r:t.typeProps.dictViewRender!==void 0?{value:s,valueRender:t.typeProps.dictViewRender(e.originValue,s,a)}:t.typeProps.dictViewType&&t.typeProps.dictViewType!=="text"?rO(t.typeProps.dictViewType,s,a):{value:s||r}}function rO(e,t,n){const r={color:(n==null?void 0:n.color)||"",type:(n==null?void 0:n.type)||"primary",hit:(n==null?void 0:n.hit)||!1,effect:(n==null?void 0:n.effect)||"light",round:(n==null?void 0:n.round)||!1};if(e==="tag"){const i=n!=null&&n.icon?h.createVNode(G.ElTag,H(T({},r),{class:"flex flex-row items-center gap-1"}),{default:()=>[h.createVNode(Ut,{icon:n.icon,size:14},null),h.createVNode("span",null,[t])]}):h.createVNode(G.ElTag,r,tO(t)?t:{default:()=>[t]});return{value:t,valueRender:i}}return e==="dot-tag"?{value:t,valueRender:h.createVNode($N,H(T({},r),{value:t}),null)}:{value:t}}function iO(e){const{column:t,value:n,emptyValue:r}=e;if(n===""||n===null||n===void 0)return r;const{amountThousand:i=!1,amountDecimal:o=!0,amountDigits:a=2,amountUnit:s="",amountUnitPosition:l="right"}=t.typeProps||{};return{value:Ju(n,{amountThousand:i,amountDecimal:o,amountDigits:a,amountUnit:s,amountUnitPosition:l,defaultValue:r})}}function oO(e){var o;const{column:t,value:n,emptyValue:r}=e;if(!n)return r;const i=((o=t.typeProps)==null?void 0:o.dateFormat)||"YYYY-MM-DD";return{value:cE(n,i)||r}}function aO(e){var o,a,s,l;const{column:t,originValue:n,emptyValue:r}=e;if(!n)return r;const i=(o=t.typeProps)==null?void 0:o.sensitiveRegex;return i&&vg(i)&&i.length===2?{value:Xu(n,i[0],i[1])}:(a=t.typeProps)!=null&&a.sensitiveType?sO(t.typeProps.sensitiveType,n,(l=(s=t.typeProps)==null?void 0:s.sensitiveHover)!=null?l:!1):(_e.warn("console.table.sensitiveTypeRequired",void 0,t),r)}function sO(e,t,n){const i={phone:{regex:/(\d{3})\d{4}(\d{4})/,replacement:"$1****$2"},idCard:{regex:/^(\d{3})(\d{11})([0-9Xx]{4})$/,replacement:"$1********$3"},email:{regex:/(.+)@(.+\..+)/,replacement:"***@$2"}}[e];if(!i)return _e.warn("console.table.noDesensitizationMethod",{type:e}),{value:t};const o=Xu(t,i.regex,i.replacement);return{value:o,valueRender:h.createVNode(KN,{originValue:t,cryptoValue:o,enable:n},null)}}function Ac(e,t){var v,y,b,E;const{props:n,column:r,row:i,index:o,emit:a}=e;if(typeof t=="string"||typeof t=="object"&&"type"in t)return t;const{value:s,valueRender:l}=t,c=LN(n,r,i,o),d=PN(n,r,i,o);if(!c&&!d||!s&&s!==0)return l!==void 0?l:s;const u=(y=(v=r.ellipsis)!=null?v:n.ellipsis)!=null?y:!1,p=(E=(b=r.align)!=null?b:n.align)!=null?E:"left",m=p==="left"?"justify-start":p==="right"?"justify-end":"justify-center",f=u?"text-ellipsis overflow-hidden text-nowrap":"",_=d?"clickable-text":"",g=()=>{if(!c)return;const C=r.copyValueMethod!==void 0?r.copyValueMethod(i,o,r,n.form,n.excontext,n.editable):e.originValue;eO(C).then(N=>{N?G.ElMessage.success(ve("table.copy.success")):G.ElMessage.error(ve("table.copy.failed"))})},S=()=>{if(!d)return;const C=r.key||r.field;a("value-click",C,i),r.clickMethod!==void 0&&r.clickMethod(i,o,r,n.form,n.excontext,n.editable)};return h.createVNode("div",{class:`ae-table-cell-value w-full flex flex-row items-center gap-2.5 ${m}`},[c&&h.createVNode(G.ElIcon,{class:"ae-table-cell-value__icon copyable-icon",onClick:()=>g()},{default:()=>[h.createVNode(zC,null,null)]}),h.createVNode("div",{class:`ae-table-cell-value__text flex-1 ${f} ${_}`,onClick:()=>S()},[l||s])])}function lO(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!h.isVNode(e)}function cO(e){var p,m,f;const{column:t,row:n,index:r,props:i}=e;if(!((p=t.typeProps)!=null&&p.actions)||!Array.isArray(t.typeProps.actions)||t.typeProps.actions.length===0)return _e.warn("console.table.actionTypeRequired",void 0,t),i.emptyValue||"-";const o=t.typeProps.actions.filter(_=>!DN(_,n,r,i,t)),{normalActions:a,dropdownActions:s}=dO(o),l=s.length>1,c=(f=(m=t.align)!=null?m:i.align)!=null?f:"left",d=_O(c),u=uO(e,s);return h.createVNode("div",{class:`ae-table-cell-value w-full flex flex-row items-center gap-2 ${d}`},[a.length>0&&a.map(_=>pO(_,u.handleClick,e)),l&&fO(t,s,u.handleCommand,e)])}function dO(e){const t=e.filter(r=>r.dropdown&&["always","auto"].includes(r.dropdown));return{normalActions:e.filter(r=>!r.dropdown||r.dropdown==="never"),dropdownActions:t}}function uO(e,t){const{row:n,index:r,column:i,props:o,emit:a}=e,s=(c,d)=>{a("action",c,n);try{d==null||d(n,r,i,o.form,o.excontext,o.editable)}catch(u){_e.error("console.table.actionEventError",void 0,u,i)}};return{handleClick:s,handleCommand:c=>{const d=t.find(u=>u.name===c);d?s(d.name,d.event):_e.warn("console.table.actionNotFound",{command:c},i)}}}function pO(e,t,n){const r=mO(e,n);return h.createVNode(G.ElButton,T({onClick:()=>t(e.name,e.event)},r),{default:()=>[!e.noIcon&&e.icon&&h.createVNode(Ut,{icon:e.icon,size:14},null),!e.noLabel&&e.label&&h.createVNode("span",null,[e.label])]})}function mO(e,t){const{row:n,index:r,props:i,column:o}=t,a=H(T({type:"default"},e.buttonAttrs||{}),{disabled:lE(e,n,r,i,o),loading:kN(e,n,r,i,o)});switch(e.type){case"primary":a.type="primary";break;case"second":a.type="primary",a.plain=!0;break;default:a.type="default";break}return a}function fO(e,t,n,r){return h.createVNode(G.ElDropdown,{onCommand:i=>n(i)},{default:()=>{var i,o,a;return h.createVNode(G.ElButton,{type:"default",size:(a=(o=(i=e==null?void 0:e.typeProps)==null?void 0:i.actionDropdown)==null?void 0:o.size)!=null?a:"default"},{default:()=>{var s,l,c,d;return[!((l=(s=e==null?void 0:e.typeProps)==null?void 0:s.actionDropdown)!=null&&l.noIcon)&&h.createVNode(Ut,{icon:"icon-park-outline:more",size:14},null),!((d=(c=e==null?void 0:e.typeProps)==null?void 0:c.actionDropdown)!=null&&d.noLabel)&&h.createVNode("span",null,[ve("table.action.more")])]}})},dropdown:()=>{let i;return h.createVNode(G.ElDropdownMenu,null,lO(i=t.map(o=>hO(o,r)))?i:{default:()=>[i]})}})}function hO(e,t){const{row:n,index:r,props:i,column:o}=t;return h.createVNode(G.ElDropdownItem,{command:e.name,disabled:lE(e,n,r,i,o)},{default:()=>[e.icon&&h.createVNode(Ut,{icon:e.icon,size:14},null),h.createVNode("span",null,[e.label])]})}function _O(e){return{left:"justify-start",center:"justify-center",right:"justify-end"}[e]||"justify-start"}function gO(e,t,n,r,i,o,a,s,l){var y,b,E,C;const c=((y=o==null?void 0:o.editProps)==null?void 0:y.component)||"Input",d=((b=o.editProps)==null?void 0:b.field)||o.field,u=`${o.key||d}-${i}-${((C=(E=o.editProps)==null?void 0:E.componentProps)==null?void 0:C.freshKey)||0}`,p={prop:`${i}.${d}`,rules:_()},m=()=>{if(Hr(s,c))return s[c]};function f(){var N;if(d){const R=Hr(s,c)&&((N=l[c])==null?void 0:N.modelValueKey)||"modelValue";return{[R]:We.get(r,d),[`onUpdate:${R}`]:O=>{Rd(r,d,O)}}}return{}}function _(){var N,R,O,w,x;if((O=(R=(N=o.editProps)==null?void 0:N.formItemProps)==null?void 0:R.autoRules)!=null&&O.length){const I=[],M=ku();if(o.editProps.formItemProps.autoRules.forEach(L=>{if(M[L]!==void 0){const B=Object.assign({},M[L]);B.message=B.message.replace("{label}",o.label||o.field),I.push(B)}}),I.length)return I}return((x=(w=o.editProps)==null?void 0:w.formItemProps)==null?void 0:x.rules)||[]}function g(){var R,O,w;let N={};return N=H(T(T(T(T({style:{width:"100%"}},EO(o)),((R=o.editProps)==null?void 0:R.componentProps)||{}),bO(r,i,o,((O=o.editProps)==null?void 0:O.componentProps)||{},a,e)),vO(o,((w=o.editProps)==null?void 0:w.componentProps)||{})),{disabled:MN(e,o,r,i)}),delete N.optionKeys,N}function S(){var N,R;if((N=o.editProps)!=null&&N.componentEvent){const O={};return Object.keys((R=o.editProps)==null?void 0:R.componentEvent).forEach(w=>{var I;const x=(I=o.editProps)==null?void 0:I.componentEvent[w];Je(x)&&(O[w]=yO(x,r,i,o,a,e.excontext))}),O}return{}}function v(){var O,w;const N={},R=((w=(O=o.editProps)==null?void 0:O.insideProps)==null?void 0:w.renders)||{};for(const x in R){const I=R[x];Je(I)?N[x]=()=>I(r,i,o,a,e.excontext,e.editable):typeof I=="string"&&(N[x]=()=>I)}return N}return{getAnyComponent:m,setModelValue:f,setComponentProps:g,setComponentEvent:S,setInsideRenders:v,field:d,freshKey:u,formItemProps:p,componentName:c}}function EO(e,t){var o;const n=["Autocomplete","Editor","Input","InputNumber","Mention"],r=["Cascader","DatePicker","Select","TimePicker","TimeSelect"],i=((o=e.editProps)==null?void 0:o.component)||"Input";if(n.includes(i))return{placeholder:vm(ve("form.placeholder.input"),(e==null?void 0:e.label)||"")};if(r.includes(i)){const a=vm(ve("form.placeholder.select"),(e==null?void 0:e.label)||"");return{startPlaceholder:ve("form.placeholder.startDate"),endPlaceholder:ve("form.placeholder.endDate"),rangeSeparator:"-",placeholder:a}}return{}}function bO(e,t,n,r,i,o){if(Reflect.has(r,"options")){const a=T(T({disabled:"disabled",children:"children",value:"value",label:"label"},(r==null?void 0:r.optionKeys)||{}),(r==null?void 0:r.props)||{});if(typeof r.options=="function")return{options:r.options(e,t,n,i,o.excontext,o.editable),props:a};if(Array.isArray(r.options))return{options:r.options,props:a}}return{}}const SO=["years","months","dates","datetimerange","daterange","monthrange","yearrange"];function vO(e,t){var r;return(((r=e.editProps)==null?void 0:r.component)||"Input")==="DatePicker"&&t.type&&SO.includes(t.type)?t.defaultTime?{defaultTime:t.defaultTime}:{defaultTime:[new Date().setHours(0,0,0,0),new Date().setHours(23,59,59,999)]}:{}}function yO(e,t,n,r,i,o){return typeof e=="function"?a=>e(a,t,n,r,i,o):()=>{}}function CO(e){const{props:t,slots:n,emit:r,column:i,row:o,index:a,components:s,componentConfigs:l}=e,{field:c,freshKey:d,formItemProps:u,getAnyComponent:p,setModelValue:m,setComponentProps:f,setComponentEvent:_,setInsideRenders:g}=gO(t,n,r,o,a,i,t.form,s,l);c||_e.warn("console.table.editFieldRequired",void 0,i);const S=()=>{const v=p();return v===void 0?(_e.error("console.table.editComponentError",void 0,i),TO(i)):h.createVNode(v,H(T(T(T({},m()),f()),_()),{key:d}),T({},g()))};return h.createVNode(G.ElFormItem,u,{default:()=>S()})}function TO(e){var t;return h.createVNode("div",{class:"ae-table-edit-error",style:"color: #f56c6c; font-size: 12px;"},[h.createTextVNode("组件配置错误: "),((t=e.editProps)==null?void 0:t.component)||"Unknown"])}function NO(e,t,n,r,i,o,a,s,l){if(e.columns&&e.columns.length){const c=e.columns.filter(E=>(E.visible===void 0?!0:E.visible)?!Xm(e,E):!1),d=c.find(E=>E.type==="expand"),u=c.find(E=>E.type==="selection"),p=c.find(E=>E.type==="radio"),m=E=>p?h.createVNode(G.ElTableColumn,{label:E.label||"",align:E.align||e.align||"center",headerAlign:E.headerAlign||e.headerAlign||"center",width:E.width||50,"column-key":E.key||"radio"},{default:C=>{const N=e.rowKey?r.value[e.rowKey]===C.row[e.rowKey]:!1,R=()=>{r.value=C.row};return h.createVNode(G.ElRadio,{"model-value":N,onChange:R},null)}}):void 0,f=E=>{var N;const C=(R,O)=>{var w,x;return((w=E.typeProps)==null?void 0:w.selectable)!==void 0?(x=E.typeProps)==null?void 0:x.selectable(R,O,E,e.form,e.excontext,e.editable):!0};return u?h.createVNode(G.ElTableColumn,{label:E.label||"",type:"selection",reserveSelection:((N=E.typeProps)==null?void 0:N.reserveSelection)||!1,align:E.align||e.align||"center",headerAlign:E.headerAlign||e.headerAlign||"center",width:E.width||50,selectable:C,"column-key":E.key||"selection"},null):void 0},_=E=>d?h.createVNode(G.ElTableColumn,{label:E.label||"",type:"expand",width:E.width||50,align:E.align||e.align||"center",headerAlign:E.headerAlign||e.headerAlign||"center","column-key":E.key||"expand"},{default:C=>bn(t,"expand",C)}):void 0,g=(E,C,N)=>Jm(e,E)?CO({props:e,slots:t,emit:n,column:E,row:C,index:N,components:s,componentConfigs:l}):S(E,C,N),S=(E,C,N)=>{const R=E.emptyValue||e.emptyValue||"",O=E.field?C[E.field]:"",x={props:e,column:E,row:C,index:N,value:O,originValue:O,emptyValue:R,dictTools:a,emit:n};if(E.type==="default"||!E.type){if(E.render!==void 0)return E.render(C,N,E,e.form,e.excontext,e.editable);if(E.formatter!==void 0){const M=E.formatter(C,N,E,e.form,e.excontext,e.editable);return Ac(x,{value:M})}return Ac(x,{value:O||R})}const I=v(x);return Ac(x,I)},v=E=>{const{column:C,emptyValue:N}=E;switch(C.type){case"dict":return nO(E);case"amount":return iO(E);case"date":return oO(E);case"sensitive":return aO(E);case"action":return cO({props:E.props,column:E.column,row:E.row,index:E.index,emit:E.emit});default:return _e.warn("console.table.unknownColumnType",{type:C.type},C),{value:N}}},y=E=>{var N,R,O,w,x,I,M,L,B;const C=E.key||E.field;if(C||_e.warn("console.table.columnMissingKey",{label:E.label||""},E),(E==null?void 0:E.type)==="index"){const D=A=>{var k,P,V;return((k=E.typeProps)==null?void 0:k.index)!==void 0?(P=E.typeProps)==null?void 0:P.index:IN(((V=E.typeProps)==null?void 0:V.reserveIndex)||!0,A,i.value||10,o.value||1)};return h.createVNode(G.ElTableColumn,{type:"index",index:A=>D(A),align:(R=(N=E.align)!=null?N:e.align)!=null?R:"center",headerAlign:(w=(O=E.headerAlign)!=null?O:e.headerAlign)!=null?w:"center",fixed:(x=E.fixed)!=null?x:!1,label:(I=E.label)!=null?I:"",width:(M=E.width)!=null?M:70,minWidth:(L=E.minWidth)!=null?L:70,"column-key":(B=E.key)!=null?B:"index"},null)}if(E.children&&E.children.length>0){const D=E.children.filter(A=>(A.visible===void 0?!0:A.visible)?!Xm(e,A):!1);return h.createVNode(G.ElTableColumn,{align:E.align||e.align||"center",headerAlign:E.headerAlign||e.headerAlign||"center",className:"ae-table-column-parent"},{default:()=>b(D),header:()=>bn(t,`${C}--header`)||h.createVNode(Zm,{title:E.label,subtitle:E.subLabel},null)})}else{const D=H(T({showOverflowTooltip:E.ellipsis||e.ellipsis||!1,align:E.align||e.align||"center",headerAlign:E.headerAlign||e.headerAlign||"center",fixed:E.fixed||!1,width:E.width||"",minWidth:E.minWidth||"",prop:E.field||""},E.columnAttrs||{}),{className:Jm(e,E)?"ae-table-column-editable":"ae-table-column"});return h.createVNode(G.ElTableColumn,D,{default:A=>bn(t,E.field,A)||g(E,A.row,A.$index),header:()=>{var A;return bn(t,`${C}-header`)||((A=E.headerRender)==null?void 0:A.call(E,{},null,E,e.form,e.excontext,e.editable))||h.createVNode(Zm,{title:E.label,subtitle:E.subLabel},null)}})}},b=E=>E.filter(C=>!(C.type&&["expand","selection","radio"].includes(C.type))).map(C=>y(C));return[m(p),f(u),_(d)].concat([b(c)])}else return}function OO(e,t,n,r,i,o,a,s,l,c,d,u,p,m,f){const _=()=>Reflect.has(t,"append")||d.value&&d.value.length>0,g=()=>{if(d.value&&d.value.length>0){const v=ve("table.selection.selected"),y=ve("table.selection.items");return h.createVNode("div",{class:"ae-table-append"},[h.createVNode("div",{class:"ae-table-append-selection"},[v,h.createTextVNode(" "),h.createVNode("span",{class:"total"},[d.value.length]),h.createTextVNode(" "),y])])}else return},S=()=>{const v=`ae-table-main ${_()?"has-append":""}`,y=h.createVNode(G.ElTable,T({ref:a,key:e.freshKey,data:e.modelValue,"onSelection-change":c.handleSelectionChange,"onCurrent-change":c.handleCurrentChange,"onRow-click":c.handleRowClick,"header-row-class-name":"ae-table-header","summary-method":e.showSummary?u:void 0,class:v},h.unref(l)),{default:()=>NO(e,t,n,r,i,o,p,m,f),append:()=>bn(t,"append")||g()});return h.withDirectives(y,[[G.vLoading,e.loading]])};return e.editable?h.createVNode(G.ElForm,{class:"ae-table-form",ref:s,model:e.modelValue},{default:()=>S()}):S()}function AO(e,t){const n=h.ref(e.pageSize),r=h.ref(e.page),i=h.computed(()=>Object.assign({background:!1,layout:"total, sizes, prev, pager, next, jumper",pageSizes:[10,20,30,40,50,100],disabled:!1,hideOnSinglePage:!1,total:10},h.unref(e).pagination));function o(){const a=h.watch(()=>n.value,d=>{t("update:pageSize",d)}),s=h.watch(()=>r.value,d=>{t("update:page",d)}),l=h.watch(()=>h.unref(e).pageSize,d=>{n.value=d}),c=h.watch(()=>h.unref(e).page,d=>{r.value=d});return()=>{a(),s(),l(),c()}}return{pageSizeRef:n,currentPageRef:r,pagination:i,watchPage:o}}function dE(e){function t(s){return s in e}function n(s){return t(s)?e[s]:[]}function r(s,l){return n(s).find(u=>u.value===l)||{label:"",value:l}}function i(s,l){return r(s,l).label||""}function o(s,l,c){return this.getDictItem(s,l)[c]||""}function a(s,l,c=!0,d=!0,u=" / "){const p=typeof s=="string"?n(s):s;if(l==null||l==="")return"";const m=b=>{var E,C;return b&&((C=b.label)!=null?C:String((E=b.value)!=null?E:""))},f=(b,E)=>String(b)===String(E);let _=null;if(Array.isArray(l)?_=l.map(b=>String(b)):c&&(_=String(l).split(",").map(b=>b.trim()).filter(b=>b.length>0)),_){const b=[];let E=p;for(const C of _){if(!E||E.length===0)break;const N=E.find(R=>f(R.value,C));if(!N)break;b.push(m(N)),E=N.children||[]}return b.length===0?"":d?b.join(u):b[b.length-1]}const g=String(l),S=[];let v=!1;const y=b=>{if(!b||b.length===0)return!1;for(const E of b){if(S.push(m(E)),f(E.value,g))return v=!0,!0;if(E.children&&E.children.length>0&&y(E.children))return!0;S.pop()}return!1};return y(p),!v||S.length===0?"":d?S.join(u):S[S.length-1]}return{isExistName:t,getDictOptions:n,getDictItem:r,getDictItemLabel:i,getDictItemProp:o,getTreeDictItemLabel:a}}function ef(){return`${Date.now()}-${Math.random().toString(36).substring(2,9)}`}function uE(e){if(typeof e=="number")return e;const t={B:1,KB:1024,MB:1024*1024,GB:1024*1024*1024},n=e.match(/^(\d+(?:\.\d+)?)(B|KB|MB|GB)?$/i);if(!n)return 0;const r=parseFloat(n[1]),i=(n[2]||"B").toUpperCase();return r*(t[i]||1)}function RO(e){if(e===0)return"0 B";const t=1024,n=["B","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return`${(e/Math.pow(t,r)).toFixed(2)} ${n[r]}`}function Ds(e){const t=e.match(/\.([^./?#]+)(?:[?#]|$)/i);return t?t[1].toLowerCase():""}function Rc(e,t){const n=["jpg","jpeg","png","gif","bmp","webp","svg"];if(t){const i=Ds(t);if(i)return n.includes(i)}const r=Ds(e);return n.includes(r)}function tf(e,t){let n="";return t&&(n=Ds(t)),n||(n=Ds(e)),{pdf:"material-icon-theme:pdf",doc:"material-icon-theme:word",docx:"material-icon-theme:word",xls:"material-icon-theme:table",xlsx:"material-icon-theme:table",csv:"material-icon-theme:table",ppt:"material-icon-theme:powerpoint",pptx:"material-icon-theme:powerpoint",md:"material-icon-theme:markdoc-config",txt:"material-icon-theme:document",yml:"material-icon-theme:yaml",json:"material-icon-theme:json",zip:"material-icon-theme:zip",rar:"solar:winrar-bold-duotone","7z":"hugeicons:7z-02",html:"material-icon-theme:html",htm:"material-icon-theme:html",jsx:"file-icons:jsx-alt",tsx:"file-icons:tsx-alt",vue:"material-icon-theme:vue-config",ts:"material-icon-theme:typescript",js:"material-icon-theme:javascript",py:"devicon:python",java:"devicon:java",go:"devicon:go-wordmark",rs:"devicon:rust",php:"devicon:php",sh:"file-icons:powershell",bash:"file-icons:powershell",sql:"devicon:mysql-wordmark",db:"",git:"devicon:git",css:"devicon:css3",psd:"material-icon-theme:adobe-photoshop-light",ai:"material-icon-theme:adobe-illustrator-light",mp3:"teenyicons:mp3-solid",mp4:"teenyicons:mp4-solid",mov:"teenyicons:mov-solid",avi:"lsicon:file-avi-outline",wav:"hugeicons:wav-01",png:"fluent-color:image-16",jpg:"fluent-color:image-16",jpeg:"fluent-color:image-16",bmp:"fluent-color:image-16",svg:"fluent-color:image-16",gif:"fluent-color:image-16",tiff:"fluent-color:image-16",webp:"fluent-color:image-16",ico:"fluent-color:image-16"}[n]||"material-icon-theme:document"}function nf(e,t,n){return e&&e[t[n]]||""}function wO(e,t){if(!t)return!0;const n=uE(t);return e.size<=n}function pE(e){return e.type.startsWith("image/")}function xO(e,t=.8,n=1920,r=1920){return new Promise((i,o)=>{if(!pE(e)){i(e);return}const a=new FileReader;a.readAsDataURL(e),a.onload=s=>{var c;const l=new Image;l.src=(c=s.target)==null?void 0:c.result,l.onload=()=>{const d=document.createElement("canvas"),u=d.getContext("2d");if(!u){o(new Error("无法获取 canvas context"));return}let{width:p,height:m}=l;if(p>n||m>r){const f=Math.min(n/p,r/m);p=p*f,m=m*f}d.width=p,d.height=m,u.drawImage(l,0,0,p,m),d.toBlob(f=>{if(!f){o(new Error("图片压缩失败"));return}const _=new File([f],e.name,{type:e.type||"image/jpeg",lastModified:Date.now()});_.size>=e.size?i(e):i(_)},e.type||"image/jpeg",t)},l.onerror=()=>{o(new Error("图片加载失败"))}},a.onerror=()=>{o(new Error("文件读取失败"))}})}const IO={key:0,class:"ae-upload__header"},DO={class:"ae-upload__link"},kO={class:"ae-upload__item-content"},MO=["src","onClick","onError"],LO=["onClick"],PO={class:"ae-upload__file-name"},FO={key:2,class:"ae-upload__loading"},BO={key:3,class:"ae-upload__mask"},UO={class:"ae-upload__item-name"},HO={key:1,class:"ae-upload__item-actions"},VO={key:1,class:"ae-upload__tips"},GO=["accept","multiple"],zO=h.defineComponent({name:"AeUpload",__name:"Upload",props:{modelValue:{default:()=>[]},fileKeys:{default:()=>({name:"name",url:"url"})},upload:{},multiple:{type:Boolean,default:!1},accept:{},limit:{},size:{default:"default"},sizeLimit:{},disabled:{type:Boolean,default:!1},listType:{default:"picture"},objectFit:{default:"cover"},examples:{},templates:{},tips:{},autoCompress:{type:Boolean,default:!1},previewable:{type:Boolean,default:!0},downloadable:{type:Boolean,default:!1},preview:{},downloadFile:{},beforeUpload:{},beforeRemove:{},downloadTemplate:{}},emits:["update:modelValue","change","upload","remove","preview"],setup(e,{emit:t}){const n=e,r=t,i=h.ref(),o=h.ref([]),a=h.ref(!1),s=h.ref([]),l=h.ref(0),c=h.computed(()=>n.disabled?!1:n.limit?o.value.filter(w=>w.status==="success").length<n.limit:!0),d=h.computed(()=>({small:16,default:20,large:24})[n.size]),u=h.computed(()=>({small:24,default:48,large:96})[n.size]),p=h.computed(()=>({small:18,default:20,large:22})[n.size]);h.watch(()=>n.modelValue,w=>{w&&(o.value=w.map(x=>({uid:ef(),status:"success",data:x,imageLoadError:!1})))},{immediate:!0,deep:!0});function m(w){return nf(w,n.fileKeys,"name")}function f(w){return nf(w,n.fileKeys,"url")}function _(){var w;(w=i.value)==null||w.click()}function g(w){return Lt(this,null,function*(){const x=w.target,I=Array.from(x.files||[]);if(I.length){if(n.limit){const M=o.value.filter(B=>B.status==="success").length,L=n.limit-M;I.length>L&&(G.ElMessage.warning(ve("upload.fileCountLimit",{limit:n.limit})),I.splice(L))}for(const M of I)yield S(M);x.value=""}})}function S(w){return Lt(this,null,function*(){let x=w;if(x.uid=ef(),n.beforeUpload)try{if((yield n.beforeUpload(x))===!1)return}catch(M){return}if(n.autoCompress&&pE(x))try{const M=yield xO(x),L=x.uid;x=M,x.uid=L}catch(M){_e.error("console.upload.compressError",void 0,M)}if(n.sizeLimit&&!wO(x,n.sizeLimit)){const M=uE(n.sizeLimit);G.ElMessage.error(ve("upload.fileSizeLimit",{size:RO(M)}));return}const I={uid:x.uid,status:"uploading",rawFile:x,data:{},imageLoadError:!1};if(o.value.push(I),!n.upload){G.ElMessage.error(ve("upload.uploadFunctionRequired")),o.value=o.value.filter(M=>M.uid!==I.uid);return}try{const M=yield n.upload(x);M===!1?o.value=o.value.filter(L=>L.uid!==I.uid):(I.status="success",I.data=M,R(),r("upload",M),r("change",N()))}catch(M){console.error("[AeUpload] exception in upload:",M),o.value=o.value.filter(L=>L.uid!==I.uid)}})}function v(w){return Lt(this,null,function*(){if(w.data){if(n.beforeRemove)try{if((yield n.beforeRemove(w.data))===!1)return}catch(x){return}o.value=o.value.filter(x=>x.uid!==w.uid),R(),r("remove",w.data),r("change",N())}})}function y(w){if(n.preview){n.preview(w);return}const x=f(w),I=m(w);if(Rc(x,I)){const M=o.value.filter(L=>L.data&&Rc(f(L.data),m(L.data))).map(L=>f(L.data));s.value=M,l.value=M.indexOf(x),a.value=!0}else G.ElMessage.info(ve("upload.previewNotSupported")),r("preview",w)}function b(){var w;(w=n.examples)!=null&&w.length&&(s.value=n.examples.map(x=>x.url),l.value=0,a.value=!0)}function E(w){n.downloadTemplate?n.downloadTemplate(w):window.open(w.url,"_blank")}function C(w){if(n.downloadFile){n.downloadFile(w);return}const x=f(w);if(!x){G.ElMessage.warning(ve("upload.downloadNotSupported"));return}const I=document.createElement("a");I.href=x,I.download=m(w)||"download",I.target="_blank",document.body.appendChild(I),I.click(),document.body.removeChild(I)}function N(){return o.value.filter(w=>w.status==="success"&&w.data).map(w=>w.data)}function R(){r("update:modelValue",N())}function O(w){w.imageLoadError=!0}return(w,x)=>{var I,M,L,B;return h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["ae-upload",`ae-upload--${e.size}`])},[(I=e.examples)!=null&&I.length||(M=e.templates)!=null&&M.length?(h.openBlock(),h.createElementBlock("div",IO,[(L=e.examples)!=null&&L.length?(h.openBlock(),h.createElementBlock("span",{key:0,class:"ae-upload__link",onClick:b}," 查看示例 ")):h.createCommentVNode("",!0),(B=e.templates)!=null&&B.length?(h.openBlock(),h.createBlock(h.unref(G.ElDropdown),{key:1,onCommand:E},{dropdown:h.withCtx(()=>[h.createVNode(h.unref(G.ElDropdownMenu),null,{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(e.templates,(D,A)=>(h.openBlock(),h.createBlock(h.unref(G.ElDropdownItem),{key:A,command:D},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(D.name),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:h.withCtx(()=>[h.createElementVNode("span",DO,[x[1]||(x[1]=h.createTextVNode(" 下载模板 ",-1)),h.createVNode(h.unref(G.ElIcon),{class:"el-icon--right"},{default:h.withCtx(()=>[h.createVNode(h.unref(HC))]),_:1})])]),_:1})):h.createCommentVNode("",!0)])):h.createCommentVNode("",!0),h.createElementVNode("div",{class:h.normalizeClass(["ae-upload__list",`ae-upload__list--${e.listType}`])},[e.listType==="picture"?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(o.value,D=>(h.openBlock(),h.createElementBlock("div",{key:D.uid,class:"ae-upload__item ae-upload__item--picture"},[h.createElementVNode("div",kO,[D.data&&h.unref(Rc)(f(D.data),m(D.data))&&!D.imageLoadError?(h.openBlock(),h.createElementBlock("img",{key:0,src:f(D.data),alt:"",style:h.normalizeStyle({objectFit:e.objectFit}),class:"ae-upload__image",onClick:A=>y(D.data),onError:A=>O(D)},null,44,MO)):(h.openBlock(),h.createElementBlock("div",{key:1,class:"ae-upload__file-icon",onClick:A=>D.data&&y(D.data)},[h.createVNode(h.unref(Ut),{size:u.value,icon:h.unref(tf)(f(D.data),m(D.data))},null,8,["size","icon"]),h.createElementVNode("div",PO,h.toDisplayString(D.data?m(D.data):""),1)],8,LO)),D.status==="uploading"?(h.openBlock(),h.createElementBlock("div",FO,[h.createVNode(h.unref(G.ElIcon),{class:"is-loading"},{default:h.withCtx(()=>[h.createVNode(h.unref(xm))]),_:1})])):h.createCommentVNode("",!0),D.status==="success"?(h.openBlock(),h.createElementBlock("div",BO,[e.previewable?(h.openBlock(),h.createBlock(h.unref(G.ElIcon),{key:0,onClick:A=>D.data&&y(D.data)},{default:h.withCtx(()=>[h.createVNode(h.unref(Im))]),_:1},8,["onClick"])):h.createCommentVNode("",!0),e.downloadable&&e.disabled?(h.openBlock(),h.createBlock(h.unref(G.ElIcon),{key:1,onClick:A=>D.data&&C(D.data)},{default:h.withCtx(()=>[h.createVNode(h.unref(wm))]),_:1},8,["onClick"])):h.createCommentVNode("",!0),e.disabled?h.createCommentVNode("",!0):(h.openBlock(),h.createBlock(h.unref(G.ElIcon),{key:2,onClick:A=>v(D)},{default:h.withCtx(()=>[h.createVNode(h.unref(YC))]),_:1},8,["onClick"]))])):h.createCommentVNode("",!0)])]))),128)),c.value?(h.openBlock(),h.createElementBlock("div",{key:0,class:"ae-upload__trigger ae-upload__trigger--picture",onClick:_},[h.createVNode(h.unref(G.ElIcon),{size:d.value},{default:h.withCtx(()=>[h.createVNode(h.unref(KC))]),_:1},8,["size"])])):h.createCommentVNode("",!0)],64)):(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(o.value,D=>(h.openBlock(),h.createElementBlock("div",{key:D.uid,class:"ae-upload__item ae-upload__item--text"},[h.createVNode(h.unref(Ut),{class:"ae-upload__item-icon",size:p.value,icon:h.unref(tf)(f(D.data),m(D.data))},null,8,["size","icon"]),h.createElementVNode("span",UO,h.toDisplayString(D.data?m(D.data):""),1),D.status==="uploading"?(h.openBlock(),h.createBlock(h.unref(G.ElIcon),{key:0,class:"ae-upload__item-loading is-loading"},{default:h.withCtx(()=>[h.createVNode(h.unref(xm))]),_:1})):h.createCommentVNode("",!0),D.status==="success"?(h.openBlock(),h.createElementBlock("div",HO,[e.previewable?(h.openBlock(),h.createBlock(h.unref(G.ElIcon),{key:0,class:"ae-upload__item-action",onClick:A=>D.data&&y(D.data)},{default:h.withCtx(()=>[h.createVNode(h.unref(Im))]),_:1},8,["onClick"])):h.createCommentVNode("",!0),e.downloadable&&e.disabled?(h.openBlock(),h.createBlock(h.unref(G.ElIcon),{key:1,class:"ae-upload__item-action",onClick:A=>D.data&&C(D.data)},{default:h.withCtx(()=>[h.createVNode(h.unref(wm))]),_:1},8,["onClick"])):h.createCommentVNode("",!0),e.disabled?h.createCommentVNode("",!0):(h.openBlock(),h.createBlock(h.unref(G.ElIcon),{key:2,class:"ae-upload__item-delete",onClick:A=>v(D)},{default:h.withCtx(()=>[h.createVNode(h.unref(xd))]),_:1},8,["onClick"]))])):h.createCommentVNode("",!0)]))),128)),c.value?(h.openBlock(),h.createElementBlock("div",{key:0,class:"ae-upload__trigger ae-upload__trigger--text",onClick:_},[h.createVNode(h.unref(G.ElIcon),null,{default:h.withCtx(()=>[h.createVNode(h.unref(ZC))]),_:1}),x[2]||(x[2]=h.createElementVNode("span",null,"点击上传",-1))])):h.createCommentVNode("",!0)],64))],2),e.tips||w.$slots.tip?(h.openBlock(),h.createElementBlock("div",VO,[h.renderSlot(w.$slots,"tip",{},()=>[h.createTextVNode(h.toDisplayString(e.tips),1)],!0)])):h.createCommentVNode("",!0),h.createElementVNode("input",{ref_key:"inputRef",ref:i,type:"file",class:"ae-upload__input",accept:e.accept,multiple:e.multiple,onChange:g},null,40,GO),a.value?(h.openBlock(),h.createBlock(h.unref(G.ElImageViewer),{key:2,"url-list":s.value,"initial-index":l.value,onClose:x[0]||(x[0]=D=>a.value=!1)},null,8,["url-list","initial-index"])):h.createCommentVNode("",!0)],2)}}}),$O=ro(zO,[["__scopeId","data-v-a8c32fec"]]),Ul=Wn($O),YO={Autocomplete:G.ElAutocomplete,Cascader:G.ElCascader,Checkbox:G.ElCheckboxGroup,DatePicker:G.ElDatePicker,Input:G.ElInput,InputNumber:G.ElInputNumber,InputTag:G.ElInputTag,Mention:G.ElMention,Radio:G.ElRadioGroup,Select:G.ElSelect,Slider:G.ElSlider,Switch:G.ElSwitch,TimePicker:G.ElTimePicker,TimeSelect:G.ElTimeSelect,TreeSelect:G.ElTreeSelect,Upload:Ul},qO={Checkbox:()=>!0,InputTag:()=>!0,Select:e=>!!e.multiple,TreeSelect:e=>!!e.multiple,TimePicker:e=>!!e.isRange,DatePicker:e=>["years","months","dates","datetimerange","daterange","monthrange","yearrange"].includes(e.type),Cascader:e=>{const t=T({multiple:!1,emitPath:!0},e.props);return!(t.multiple===!1&&t.emitPath===!1)}};class jO{constructor(){xr(this,"components",h.shallowReactive({}));xr(this,"componentConfigs",h.shallowReactive({}));xr(this,"arrayStrategies",h.shallowReactive({}))}registerComponents(t){t.forEach(n=>{this.registerComponent(n.name,n.component,n.config,n.isArrayFn)})}registerComponent(t,n,r,i){this.components[t]&&_e.warn("console.form.componentExists",{name:t}),this.components[t]=n,r&&(this.componentConfigs[t]&&_e.warn("console.form.configExists",{name:t}),this.componentConfigs[t]=r),i&&(this.arrayStrategies[t]=i),_e.success("console.form.componentRegistered",{name:t})}}class WO{constructor(){xr(this,"components",h.shallowReactive({}));xr(this,"componentConfigs",h.shallowReactive({}));xr(this,"arrayStrategies",h.shallowReactive({}))}registerComponents(t){t.forEach(n=>{this.registerComponent(n.name,n.component,n.config,n.isArrayFn)})}registerComponent(t,n,r,i){this.components[t]&&_e.warn("console.table.componentExists",{name:t}),this.components[t]=n,r&&(this.componentConfigs[t]&&_e.warn("console.table.configExists",{name:t}),this.componentConfigs[t]=r),i&&(this.arrayStrategies[t]=i),_e.success("console.table.componentRegistered",{name:t})}}const vs=new jO,ys=new WO;function KO(e=[]){const t=h.shallowReactive(T(T({},YO),ys.components)),n=h.shallowReactive(T({},ys.componentConfigs)),r=h.shallowReactive(T(T({},qO),ys.arrayStrategies));return e.forEach(i=>{t[i.name]&&_e.warn("console.table.componentExists",{name:i.name}),t[i.name]=i.component,i.config&&(n[i.name]=i.config),i.isArrayFn&&(r[i.name]=i.isArrayFn),_e.success("console.table.componentRegistered",{name:i.name})}),{components:t,arrayStrategies:r,componentConfigs:n}}const QO=1,ZO=10,XO="id",JO="-",eA=h.defineComponent({name:"AeTable",props:{modelValue:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]},form:{type:Object,default:()=>({})},excontext:{type:Object,default:()=>({})},dict:{type:Object,default:()=>({})},editable:{type:Boolean,default:!1},page:{type:Number,default:QO},pageSize:{type:Number,default:ZO},ellipsis:{type:Boolean,default:!1},pagination:{type:Object,default:()=>{}},loading:{type:Boolean,default:!1},align:{type:String,default:"left"},headerAlign:{type:String,default:"left"},size:{type:String,default:"default"},rowKey:{type:String,default:XO},emptyValue:{type:String,default:JO},adaptive:{type:Boolean,default:!1},showSummary:{type:Boolean,default:!1},summaryMethod:{type:Function,default:null},freshKey:{type:Number,default:0},imports:{type:Array,default:()=>[]}},emits:["update:modelValue","update:editable","update:page","update:pageSize","register","selection-change","page-change","current-change","row-click","value-click","action"],setup(e,{attrs:t,slots:n,emit:r,expose:i}){const{components:o,componentConfigs:a}=KO(e.imports),s=h.ref(),l=h.ref(),c=h.ref([]),d=h.ref(),u=dE(e.dict),{pageSizeRef:p,currentPageRef:m,pagination:f,watchPage:_}=AO(e,r),g=_(),S=h.computed(()=>{const R=T(T({},t),e);return["modelValue","columns","form","excontext","editable","page","pageSize","ellipsis","pagination","selections","selectionKeys","emptyValue","adaptive","summaryMethod","freshKey","dict","imports"].forEach(w=>{delete R[w]}),R});function v(R){if(e.summaryMethod!==null)return e.summaryMethod(R);const{columns:O,data:w}=R,x=[];return O.forEach((I,M)=>{if(!I.property&&!I.columnKey){x[M]=e.emptyValue;return}const L=I.columnKey?BN(e.columns,I.columnKey):FN(e.columns,I.property);if(L&&L.summable){const B=I.property?w.map(D=>Number(D[I.property])):[];if(L.summaryMethod!==void 0){x[M]=L.summaryMethod(B);return}if(L.type==="amount"){const D=B.reduce((Z,pe)=>{const he=Number(pe);return Number.isNaN(he)?Z:Z+pe},0),{amountThousand:A=!1,amountDecimal:k=!0,amountDigits:P=2,amountUnit:V="",amountUnitPosition:W="right"}=L.typeProps||{};x[M]=Ju(D,{amountThousand:A,amountDecimal:k,amountDigits:P,amountUnit:V,amountUnitPosition:W,defaultValue:e.emptyValue});return}B.every(D=>Number.isNaN(D))?x[M]=e.emptyValue:x[M]=`${B.reduce((D,A)=>{const k=Number(A);return Number.isNaN(k)?D:D+A},0)}`}else{x[M]=e.emptyValue;return}}),x}h.onMounted(()=>{r("register",s.value)}),h.onUnmounted(()=>{g()});const y={handleSelectionChange:R=>{c.value=R,r("selection-change",R)},handleCurrentChange:R=>{d.value=R,r("current-change",R)},handleRowClick:R=>{d.value=R,r("row-click",R)}};function b(R){if(c.value=R,!e.rowKey){_e.warn("console.table.rowKeyRequired");return}R.length?(s.value.clearSelection(),R.forEach(O=>{s.value.toggleRowSelection(O,!0,!0)})):s.value.clearSelection()}function E(R,O){r("page-change",{page:R,pageSize:O})}function C(){return Lt(this,null,function*(){var R;return e.editable?yield(R=l.value)==null?void 0:R.validate():!0})}function N(){var R;(R=h.unref(l))==null||R.clearValidate()}return i({updateSelections:b,validate:C,resetValidate:N}),()=>h.createVNode("div",{class:`ae-table ${e.adaptive?"is-adaptive":""}`,ref:"aeTableRef"},[OO(e,n,r,d,p,m,s,l,S,y,c,v,u,o,a),EC(e,p,m,f,E)])}}),ep=Wn(eA),tA={class:"ae-form-group"},nA={class:"ae-form-group-header__label"},rA={class:"ae-form-group-body__content"},iA=h.defineComponent({__name:"Group",props:{label:{type:String,default:""},subLabel:{type:String,default:""},toggleable:{type:Boolean,default:!0},expand:{type:Boolean,default:!0},headerStyle:{type:[Object,String],default:()=>""},bodyStyle:{type:[Object,String],default:()=>""},labelStyle:{type:[Object,String],default:()=>""},subLabelStyle:{type:[Object,String],default:()=>""}},setup(e){const t=e,n=h.ref(h.unref(t).expand),r=h.ref();function i(){const a=r.value;if(a){if(n.value){const s=a.scrollHeight;a.style.height=s+"px",requestAnimationFrame(()=>{a.style.height="0px",a.style.padding="0px"})}else a.style.height="0px",a.style.padding="0px",requestAnimationFrame(()=>{const s=a.scrollHeight;a.style.height=s+"px",a.style.padding="10px"});n.value=!n.value}}function o(){const a=r.value;a&&n.value&&(a.style.height="auto")}return(a,s)=>(h.openBlock(),h.createElementBlock("div",tA,[h.createElementVNode("div",{class:h.normalizeClass(["ae-form-group-header",{toggleable:e.toggleable,isExpanded:n.value}]),style:h.normalizeStyle(e.headerStyle),onClick:s[0]||(s[0]=l=>e.toggleable?i():void 0)},[h.createElementVNode("div",nA,[h.createElementVNode("span",{class:"title",style:h.normalizeStyle(e.labelStyle)},h.toDisplayString(e.label),5),e.subLabel?(h.openBlock(),h.createElementBlock("span",{key:0,class:"sub-title",style:h.normalizeStyle(e.subLabelStyle)},h.toDisplayString(e.subLabel),5)):h.createCommentVNode("",!0)]),e.toggleable?(h.openBlock(),h.createBlock(h.unref(Ut),{key:0,icon:n.value?"ep:arrow-down-bold":"ep:arrow-up-bold",class:"ae-form-group-header__icon"},null,8,["icon"])):h.createCommentVNode("",!0)],6),h.createElementVNode("div",{ref_key:"bodyRef",ref:r,class:h.normalizeClass(["ae-form-group-body",{expanded:n.value}]),style:h.normalizeStyle(e.bodyStyle),onTransitionend:o},[h.createElementVNode("div",rA,[h.renderSlot(a.$slots,"default",{},void 0,!0)])],38)]))}}),oA=ro(iA,[["__scopeId","data-v-aa54908a"]]),aA={},sA={class:"ae-form-blank"};function lA(e,t){return h.openBlock(),h.createElementBlock("div",sA,[h.renderSlot(e.$slots,"default",{style:"filter: blur()"},void 0,!0)])}const cA=ro(aA,[["render",lA],["__scopeId","data-v-c67668da"]]);var dA=Object.defineProperty,mE=e=>{throw TypeError(e)},uA=(e,t,n)=>t in e?dA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,z=(e,t,n)=>uA(e,typeof t!="symbol"?t+"":t,n),fE=(e,t,n)=>t.has(e)||mE("Cannot "+n),po=(e,t,n)=>(fE(e,t,"read from private field"),t.get(e)),pA=(e,t,n)=>t.has(e)?mE("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),mA=(e,t,n,r)=>(fE(e,t,"write to private field"),t.set(e,n),n);function at(e){this.content=e}at.prototype={constructor:at,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),o=r.content.slice();return i==-1?o.push(n||e,t):(o[i+1]=t,n&&(o[i]=n)),new at(o)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new at(n)},addToStart:function(e,t){return new at([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new at(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),o=r.find(e);return i.splice(o==-1?i.length:o,0,t,n),new at(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=at.from(e),e.size?new at(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=at.from(e),e.size?new at(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=at.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};at.from=function(e){if(e instanceof at)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new at(t)};function hE(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),o=t.child(r);if(i==o){n+=i.nodeSize;continue}if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let a=0;i.text[a]==o.text[a];a++)n++;return n}if(i.content.size||o.content.size){let a=hE(i.content,o.content,n+1);if(a!=null)return a}n+=i.nodeSize}}function _E(e,t,n,r){for(let i=e.childCount,o=t.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let a=e.child(--i),s=t.child(--o),l=a.nodeSize;if(a==s){n-=l,r-=l;continue}if(!a.sameMarkup(s))return{a:n,b:r};if(a.isText&&a.text!=s.text){let c=0,d=Math.min(a.text.length,s.text.length);for(;c<d&&a.text[a.text.length-c-1]==s.text[s.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(a.content.size||s.content.size){let c=_E(a.content,s.content,n-1,r-1);if(c)return c}n-=l,r-=l}}class ${constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,i=0,o){for(let a=0,s=0;s<n;a++){let l=this.content[a],c=s+l.nodeSize;if(c>t&&r(l,i+s,o||null,a)!==!1&&l.content.size){let d=s+1;l.nodesBetween(Math.max(0,t-d),Math.min(l.content.size,n-d),r,i+d)}s=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,i){let o="",a=!0;return this.nodesBetween(t,n,(s,l)=>{let c=s.isText?s.text.slice(Math.max(t,l)-l,n-l):s.isLeaf?i?typeof i=="function"?i(s):i:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&c||s.isTextblock)&&r&&(a?a=!1:o+=r),o+=c},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<t.content.length;o++)i.push(t.content[o]);return new $(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let o=0,a=0;a<n;o++){let s=this.content[o],l=a+s.nodeSize;l>t&&((a<t||l>n)&&(s.isText?s=s.cut(Math.max(0,t-a),Math.min(s.text.length,n-a)):s=s.cut(Math.max(0,t-a-1),Math.min(s.content.size,n-a-1))),r.push(s),i+=s.nodeSize),a=l}return new $(r,i)}cutByIndex(t,n){return t==n?$.empty:t==0&&n==this.content.length?this:new $(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new $(i,o)}addToStart(t){return new $([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new $(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];t(i,r,n),r+=i.nodeSize}}findDiffStart(t,n=0){return hE(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return _E(this,t,n,r)}findIndex(t,n=-1){if(t==0)return qa(0,t);if(t==this.size)return qa(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let r=0,i=0;;r++){let o=this.child(r),a=i+o.nodeSize;if(a>=t)return a==t||n>0?qa(r+1,a):qa(r,i);i=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return $.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new $(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return $.empty;let n,r=0;for(let i=0;i<t.length;i++){let o=t[i];r+=o.nodeSize,i&&o.isText&&t[i-1].sameMarkup(o)?(n||(n=t.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new $(n||t,r)}static from(t){if(!t)return $.empty;if(t instanceof $)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new $([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}$.empty=new $([],0);const wc={index:0,offset:0};function qa(e,t){return wc.index=e,wc.offset=t,wc}function ks(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!ks(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!ks(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}let Me=class Pd{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,r=!1;for(let i=0;i<t.length;i++){let o=t[i];if(this.eq(o))return t;if(this.type.excludes(o.type))n||(n=t.slice(0,i));else{if(o.type.excludes(this.type))return t;!r&&o.type.rank>this.type.rank&&(n||(n=t.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&ks(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return Pd.none;if(t instanceof Pd)return[t];let n=t.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};Me.none=[];class Ms extends Error{}class K{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=EE(this.content,t+this.openStart,n);return r&&new K(r,this.openStart,this.openEnd)}removeBetween(t,n){return new K(gE(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return K.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new K($.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let o=t.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=t.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new K(t,r,i)}}K.empty=new K($.empty,0,0);function gE(e,t,n){let{index:r,offset:i}=e.findIndex(t),o=e.maybeChild(r),{index:a,offset:s}=e.findIndex(n);if(i==t||o.isText){if(s!=n&&!e.child(a).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=a)throw new RangeError("Removing non-flat range");return e.replaceChild(r,o.copy(gE(o.content,t-i-1,n-i-1)))}function EE(e,t,n,r){let{index:i,offset:o}=e.findIndex(t),a=e.maybeChild(i);if(o==t||a.isText)return e.cut(0,t).append(n).append(e.cut(t));let s=EE(a.content,t-o-1,n);return s&&e.replaceChild(i,a.copy(s))}function fA(e,t,n){if(n.openStart>e.depth)throw new Ms("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Ms("Inconsistent open depths");return bE(e,t,n,0)}function bE(e,t,n,r){let i=e.index(r),o=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let a=bE(e,t,n,r+1);return o.copy(o.content.replaceChild(i,a))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let a=e.parent,s=a.content;return $r(a,s.cut(0,e.parentOffset).append(n.content).append(s.cut(t.parentOffset)))}else{let{start:a,end:s}=hA(n,e);return $r(o,vE(e,a,s,t,r))}else return $r(o,Ls(e,t,r))}function SE(e,t){if(!t.type.compatibleContent(e.type))throw new Ms("Cannot join "+t.type.name+" onto "+e.type.name)}function Fd(e,t,n){let r=e.node(n);return SE(r,t.node(n)),r}function zr(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function xo(e,t,n,r){let i=(t||e).node(n),o=0,a=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(zr(e.nodeAfter,r),o++));for(let s=o;s<a;s++)zr(i.child(s),r);t&&t.depth==n&&t.textOffset&&zr(t.nodeBefore,r)}function $r(e,t){return e.type.checkContent(t),e.copy(t)}function vE(e,t,n,r,i){let o=e.depth>i&&Fd(e,t,i+1),a=r.depth>i&&Fd(n,r,i+1),s=[];return xo(null,e,i,s),o&&a&&t.index(i)==n.index(i)?(SE(o,a),zr($r(o,vE(e,t,n,r,i+1)),s)):(o&&zr($r(o,Ls(e,t,i+1)),s),xo(t,n,i,s),a&&zr($r(a,Ls(n,r,i+1)),s)),xo(r,null,i,s),new $(s)}function Ls(e,t,n){let r=[];if(xo(null,e,n,r),e.depth>n){let i=Fd(e,t,n+1);zr($r(i,Ls(e,t,n+1)),r)}return xo(t,null,n,r),new $(r)}function hA(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let i=n-1;i>=0;i--)r=t.node(i).copy($.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}class Ko{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=t.child(n);return r?t.child(n).cut(r):i}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let o=0;o<t;o++)i+=r.child(o).nodeSize;return i}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return Me.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),i=t.maybeChild(n);if(!r){let s=r;r=i,i=s}let o=r.marks;for(var a=0;a<o.length;a++)o[a].type.spec.inclusive===!1&&(!i||!o[a].isInSet(i.marks))&&(o=o[a--].removeFromSet(o));return o}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=t.parent.maybeChild(t.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new Ps(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let a=t;;){let{index:s,offset:l}=a.content.findIndex(o),c=o-l;if(r.push(a,s,i+l),!c||(a=a.child(s),a.isText))break;o=c-1,i+=l+1}return new Ko(n,r,o)}static resolveCached(t,n){let r=rf.get(t);if(r)for(let o=0;o<r.elts.length;o++){let a=r.elts[o];if(a.pos==n)return a}else rf.set(t,r=new _A);let i=r.elts[r.i]=Ko.resolve(t,n);return r.i=(r.i+1)%gA,i}}class _A{constructor(){this.elts=[],this.i=0}}const gA=12,rf=new WeakMap;class Ps{constructor(t,n,r){this.$from=t,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const EA=Object.create(null);let $n=class Bd{constructor(t,n,r,i=Me.none){this.type=t,this.attrs=n,this.marks=i,this.content=r||$.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,r,i=0){this.content.nodesBetween(t,n,r,i,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,r,i){return this.content.textBetween(t,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,r){return this.type==t&&ks(this.attrs,n||t.defaultAttrs||EA)&&Me.sameSet(this.marks,r||Me.none)}copy(t=null){return t==this.content?this:new Bd(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new Bd(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,r=!1){if(t==n)return K.empty;let i=this.resolve(t),o=this.resolve(n),a=r?0:i.sharedDepth(n),s=i.start(a),l=i.node(a).content.cut(i.pos-s,o.pos-s);return new K(l,i.depth-a,o.depth-a)}replace(t,n,r){return fA(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(i==t||n.isText)return n;t-=i+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(t){return Ko.resolveCached(this,t)}resolveNoCache(t){return Ko.resolve(this,t)}rangeHasMark(t,n,r){let i=!1;return n>t&&this.nodesBetween(t,n,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),yE(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=$.empty,i=0,o=r.childCount){let a=this.contentMatchAt(t).matchFragment(r,i,o),s=a&&a.matchFragment(this.content,n);if(!s||!s.validEnd)return!1;for(let l=i;l<o;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(t,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(t).matchType(r),a=o&&o.matchFragment(this.content,n);return a?a.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=Me.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),t=r.addToSet(t)}if(!Me.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let i=$.fromJSON(t,n.content),o=t.nodeType(n.type).create(n.attrs,i,r);return o.type.checkAttrs(o.attrs),o}};$n.prototype.text=void 0;class Fs extends $n{constructor(t,n,r,i){if(super(t,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):yE(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new Fs(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new Fs(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function yE(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Xr{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new bA(t,n);if(r.next==null)return Xr.empty;let i=CE(r);r.next&&r.err("Unexpected trailing text");let o=OA(NA(i));return AA(o,r),o}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,r=t.childCount){let i=this;for(let o=n;i&&o<r;o++)i=i.matchType(t.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let i=[this];function o(a,s){let l=a.matchFragment(t,r);if(l&&(!n||l.validEnd))return $.from(s.map(c=>c.createAndFill()));for(let c=0;c<a.next.length;c++){let{type:d,next:u}=a.next[c];if(!(d.isText||d.hasRequiredAttrs())&&i.indexOf(u)==-1){i.push(u);let p=o(u,s.concat(d));if(p)return p}}return null}return o(this,[])}findWrapping(t){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==t)return this.wrapCache[r+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(t)){let a=[];for(let s=i;s.type;s=s.via)a.push(s.type);return a.reverse()}for(let a=0;a<o.next.length;a++){let{type:s,next:l}=o.next[a];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in n)&&(!i.type||l.validEnd)&&(r.push({match:s.contentMatch,type:s,via:i}),n[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let i=0;i<r.next.length;i++)t.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),t.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let a=0;a<r.next.length;a++)o+=(a?", ":"")+r.next[a].type.name+"->"+t.indexOf(r.next[a].next);return o}).join(`
|
|
10
|
+
})`);const n=Lu();return ct.computedEager(()=>h.unref(e)||`${n.value}-id-${t.prefix}-${t.current++}`)},rT=Symbol("formContextKey"),Dd=Symbol("formItemContextKey"),iT=e=>{const t=h.getCurrentInstance();return h.computed(()=>{var n,r;return(r=(n=t==null?void 0:t.proxy)==null?void 0:n.$props)==null?void 0:r[e]})},oT=(e,t={})=>{const n=h.ref(void 0),r=t.prop?n:iT("size"),i=t.global?n:xC(),o=t.form?{size:void 0}:h.inject(rT,void 0),a=t.formItem?{size:void 0}:h.inject(Dd,void 0);return h.computed(()=>r.value||h.unref(e)||(a==null?void 0:a.size)||(o==null?void 0:o.size)||i.value||"")},Dm=e=>typeof Element=="undefined"?!1:e instanceof Element,kd=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.tabIndex<0||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true")return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},Fu=(e,t)=>{if(!e||!e.focus)return;let n=!1;Dm(e)&&!kd(e)&&!e.getAttribute("tabindex")&&(e.setAttribute("tabindex","-1"),n=!0),e.focus(t),Dm(e)&&n&&e.removeAttribute("tabindex")},Bu=Symbol("popper"),Bg=Symbol("popperContent"),aT=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],Ug=zt({role:{type:String,values:aT,default:"tooltip"}}),sT=h.defineComponent({name:"ElPopper",inheritAttrs:!1}),lT=h.defineComponent(H(T({},sT),{props:Ug,setup(e,{expose:t}){const n=e,r=h.ref(),i=h.ref(),o=h.ref(),a=h.ref(),s=h.computed(()=>n.role),l={triggerRef:r,popperInstanceRef:i,contentRef:o,referenceRef:a,role:s};return t(l),h.provide(Bu,l),(c,d)=>h.renderSlot(c.$slots,"default")}}));var cT=dn(lT,[["__file","popper.vue"]]);const dT=h.defineComponent({name:"ElPopperArrow",inheritAttrs:!1}),uT=h.defineComponent(H(T({},dT),{setup(e,{expose:t}){const n=Tr("popper"),{arrowRef:r,arrowStyle:i}=h.inject(Bg,void 0);return h.onBeforeUnmount(()=>{r.value=void 0}),t({arrowRef:r}),(o,a)=>(h.openBlock(),h.createElementBlock("span",{ref_key:"arrowRef",ref:r,class:h.normalizeClass(h.unref(n).e("arrow")),style:h.normalizeStyle(h.unref(i)),"data-popper-arrow":""},null,6))}}));var pT=dn(uT,[["__file","arrow.vue"]]);const Hg=zt({virtualRef:{type:Be(Object)},virtualTriggering:Boolean,onMouseenter:{type:Be(Function)},onMouseleave:{type:Be(Function)},onClick:{type:Be(Function)},onKeydown:{type:Be(Function)},onFocus:{type:Be(Function)},onBlur:{type:Be(Function)},onContextmenu:{type:Be(Function)},id:String,open:Boolean}),Vg=Symbol("elForwardRef"),mT=e=>{const t=n=>{e.value=n};h.provide(Vg,{setForwardRef:t})},fT=e=>({mounted(t){e(t)},updated(t){e(t)},unmounted(){e(null)}}),Tc="ElOnlyChild",hT=h.defineComponent({name:Tc,setup(e,{slots:t,attrs:n}){var r;const i=h.inject(Vg),o=fT((r=i==null?void 0:i.setForwardRef)!=null?r:wd);return()=>{var a;const s=(a=t.default)==null?void 0:a.call(t,n);if(!s)return null;const[l,c]=Gg(s);return l?(c>1&&qo(Tc,"requires exact only one valid child."),h.withDirectives(h.cloneVNode(l,n),[[o]])):(qo(Tc,"no valid child node found"),null)}}});function Gg(e){if(!e)return[null,0];const t=e,n=t.filter(r=>r.type!==h.Comment).length;for(const r of t){if(Pu(r))switch(r.type){case h.Comment:continue;case h.Text:case"svg":return[km(r),n];case h.Fragment:return Gg(r.children);default:return[r,n]}return[km(r),n]}return[null,0]}function km(e){const t=Tr("only-child");return h.createVNode("span",{class:t.e("content")},[e])}const _T=h.defineComponent({name:"ElPopperTrigger",inheritAttrs:!1}),gT=h.defineComponent(H(T({},_T),{props:Hg,setup(e,{expose:t}){const n=e,{role:r,triggerRef:i}=h.inject(Bu,void 0);mT(i);const o=h.computed(()=>s.value?n.id:void 0),a=h.computed(()=>{if(r&&r.value==="tooltip")return n.open&&n.id?n.id:void 0}),s=h.computed(()=>{if(r&&r.value!=="tooltip")return r.value}),l=h.computed(()=>s.value?`${n.open}`:void 0);let c;const d=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return h.onMounted(()=>{h.watch(()=>n.virtualRef,u=>{u&&(i.value=ct.unrefElement(u))},{immediate:!0}),h.watch(i,(u,p)=>{c==null||c(),c=void 0,Ri(p)&&d.forEach(m=>{const f=n[m];f&&p.removeEventListener(m.slice(2).toLowerCase(),f,["onFocus","onBlur"].includes(m))}),Ri(u)&&(d.forEach(m=>{const f=n[m];f&&u.addEventListener(m.slice(2).toLowerCase(),f,["onFocus","onBlur"].includes(m))}),kd(u)&&(c=h.watch([o,a,s,l],m=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((f,_)=>{We.isNil(m[_])?u.removeAttribute(f):u.setAttribute(f,m[_])})},{immediate:!0}))),Ri(p)&&kd(p)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(m=>p.removeAttribute(m))},{immediate:!0})}),h.onBeforeUnmount(()=>{if(c==null||c(),c=void 0,i.value&&Ri(i.value)){const u=i.value;d.forEach(p=>{const m=n[p];m&&u.removeEventListener(p.slice(2).toLowerCase(),m,["onFocus","onBlur"].includes(p))}),i.value=void 0}}),t({triggerRef:i}),(u,p)=>u.virtualTriggering?h.createCommentVNode("v-if",!0):(h.openBlock(),h.createBlock(h.unref(hT),h.mergeProps({key:0},u.$attrs,{"aria-controls":h.unref(o),"aria-describedby":h.unref(a),"aria-expanded":h.unref(l),"aria-haspopup":h.unref(s)}),{default:h.withCtx(()=>[h.renderSlot(u.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}}));var ET=dn(gT,[["__file","trigger.vue"]]);const Nc="focus-trap.focus-after-trapped",Oc="focus-trap.focus-after-released",bT="focus-trap.focusout-prevented",Mm={cancelable:!0,bubbles:!1},ST={cancelable:!0,bubbles:!1},Lm="focusAfterTrapped",Pm="focusAfterReleased",vT=Symbol("elFocusTrap"),Uu=h.ref(),Fl=h.ref(0),Hu=h.ref(0);let Ga=0;const zg=e=>{const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0||r===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t},Fm=(e,t)=>{for(const n of e)if(!yT(n,t))return n},yT=(e,t)=>{if(typeof process!="undefined"&&process.env.NODE_ENV==="test")return!1;if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},CT=e=>{const t=zg(e),n=Fm(t,e),r=Fm(t.reverse(),e);return[n,r]},TT=e=>e instanceof HTMLInputElement&&"select"in e,Jn=(e,t)=>{if(e){const n=document.activeElement;Fu(e,{preventScroll:!0}),Hu.value=window.performance.now(),e!==n&&TT(e)&&t&&e.select()}};function Bm(e,t){const n=[...e],r=e.indexOf(t);return r!==-1&&n.splice(r,1),n}const NT=()=>{let e=[];return{push:r=>{const i=e[0];i&&r!==i&&i.pause(),e=Bm(e,r),e.unshift(r)},remove:r=>{var i,o;e=Bm(e,r),(o=(i=e[0])==null?void 0:i.resume)==null||o.call(i)}}},OT=(e,t=!1)=>{const n=document.activeElement;for(const r of e)if(Jn(r,t),document.activeElement!==n)return},Um=NT(),AT=()=>Fl.value>Hu.value,za=()=>{Uu.value="pointer",Fl.value=window.performance.now()},Hm=()=>{Uu.value="keyboard",Fl.value=window.performance.now()},RT=()=>(h.onMounted(()=>{Ga===0&&(document.addEventListener("mousedown",za),document.addEventListener("touchstart",za),document.addEventListener("keydown",Hm)),Ga++}),h.onBeforeUnmount(()=>{Ga--,Ga<=0&&(document.removeEventListener("mousedown",za),document.removeEventListener("touchstart",za),document.removeEventListener("keydown",Hm))}),{focusReason:Uu,lastUserFocusTimestamp:Fl,lastAutomatedFocusTimestamp:Hu}),$a=e=>new CustomEvent(bT,H(T({},ST),{detail:e})),Vr={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},Bn=(e,t,{checkForDefaultPrevented:n=!0}={})=>i=>{const o=e==null?void 0:e(i);if(n===!1||!o)return t==null?void 0:t(i)},Vu=e=>{if(e.code&&e.code!=="Unidentified")return e.code;const t=wT(e);if(t){if(Object.values(Vr).includes(t))return t;switch(t){case" ":return Vr.space;default:return""}}return""},wT=e=>{let t=e.key&&e.key!=="Unidentified"?e.key:"";if(!t&&e.type==="keyup"&&JC()){const n=e.target;t=n.value.charAt(n.selectionStart-1)}return t};let vi=[];const Vm=e=>{Vu(e)===Vr.esc&&vi.forEach(n=>n(e))},xT=e=>{h.onMounted(()=>{vi.length===0&&document.addEventListener("keydown",Vm),ct.isClient&&vi.push(e)}),h.onBeforeUnmount(()=>{vi=vi.filter(t=>t!==e),vi.length===0&&ct.isClient&&document.removeEventListener("keydown",Vm)})},IT=h.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[Lm,Pm,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const n=h.ref();let r,i;const{focusReason:o}=RT();xT(f=>{e.trapped&&!a.paused&&t("release-requested",f)});const a={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},s=f=>{if(!e.loop&&!e.trapped||a.paused)return;const{altKey:_,ctrlKey:g,metaKey:S,currentTarget:v,shiftKey:y}=f,{loop:b}=e,C=Vu(f)===Vr.tab&&!_&&!g&&!S,N=document.activeElement;if(C&&N){const R=v,[O,w]=CT(R);if(O&&w){if(!y&&N===w){const I=$a({focusReason:o.value});t("focusout-prevented",I),I.defaultPrevented||(f.preventDefault(),b&&Jn(O,!0))}else if(y&&[O,R].includes(N)){const I=$a({focusReason:o.value});t("focusout-prevented",I),I.defaultPrevented||(f.preventDefault(),b&&Jn(w,!0))}}else if(N===R){const I=$a({focusReason:o.value});t("focusout-prevented",I),I.defaultPrevented||f.preventDefault()}}};h.provide(vT,{focusTrapRef:n,onKeydown:s}),h.watch(()=>e.focusTrapEl,f=>{f&&(n.value=f)},{immediate:!0}),h.watch([n],([f],[_])=>{f&&(f.addEventListener("keydown",s),f.addEventListener("focusin",d),f.addEventListener("focusout",u)),_&&(_.removeEventListener("keydown",s),_.removeEventListener("focusin",d),_.removeEventListener("focusout",u))});const l=f=>{t(Lm,f)},c=f=>t(Pm,f),d=f=>{const _=h.unref(n);if(!_)return;const g=f.target,S=f.relatedTarget,v=g&&_.contains(g);e.trapped||S&&_.contains(S)||(r=S),v&&t("focusin",f),!a.paused&&e.trapped&&(v?i=g:Jn(i,!0))},u=f=>{const _=h.unref(n);if(!(a.paused||!_))if(e.trapped){const g=f.relatedTarget;!We.isNil(g)&&!_.contains(g)&&setTimeout(()=>{if(!a.paused&&e.trapped){const S=$a({focusReason:o.value});t("focusout-prevented",S),S.defaultPrevented||Jn(i,!0)}},0)}else{const g=f.target;g&&_.contains(g)||t("focusout",f)}};function p(){return Lt(this,null,function*(){yield h.nextTick();const f=h.unref(n);if(f){Um.push(a);const _=f.contains(document.activeElement)?r:document.activeElement;if(r=_,!f.contains(_)){const S=new Event(Nc,Mm);f.addEventListener(Nc,l),f.dispatchEvent(S),S.defaultPrevented||h.nextTick(()=>{let v=e.focusStartEl;Ll(v)||(Jn(v),document.activeElement!==v&&(v="first")),v==="first"&&OT(zg(f),!0),(document.activeElement===_||v==="container")&&Jn(f)})}}})}function m(){const f=h.unref(n);if(f){f.removeEventListener(Nc,l);const _=new CustomEvent(Oc,H(T({},Mm),{detail:{focusReason:o.value}}));f.addEventListener(Oc,c),f.dispatchEvent(_),!_.defaultPrevented&&(o.value=="keyboard"||!AT()||f.contains(document.activeElement))&&Jn(r!=null?r:document.body),f.removeEventListener(Oc,c),Um.remove(a),r=null,i=null}}return h.onMounted(()=>{e.trapped&&p(),h.watch(()=>e.trapped,f=>{f?p():m()})}),h.onBeforeUnmount(()=>{e.trapped&&m(),n.value&&(n.value.removeEventListener("keydown",s),n.value.removeEventListener("focusin",d),n.value.removeEventListener("focusout",u),n.value=void 0)}),{onKeydown:s}}});function DT(e,t,n,r,i,o){return h.renderSlot(e.$slots,"default",{handleKeydown:e.onKeydown})}var kT=dn(IT,[["render",DT],["__file","focus-trap.vue"]]),Ot="top",en="bottom",tn="right",At="left",Gu="auto",ya=[Ot,en,tn,At],Fi="start",jo="end",MT="clippingParents",$g="viewport",uo="popper",LT="reference",Gm=ya.reduce(function(e,t){return e.concat([t+"-"+Fi,t+"-"+jo])},[]),zu=[].concat(ya,[Gu]).reduce(function(e,t){return e.concat([t,t+"-"+Fi,t+"-"+jo])},[]),PT="beforeRead",FT="read",BT="afterRead",UT="beforeMain",HT="main",VT="afterMain",GT="beforeWrite",zT="write",$T="afterWrite",YT=[PT,FT,BT,UT,HT,VT,GT,zT,$T];function On(e){return e?(e.nodeName||"").toLowerCase():null}function un(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Bi(e){var t=un(e).Element;return e instanceof t||e instanceof Element}function Zt(e){var t=un(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function $u(e){if(typeof ShadowRoot=="undefined")return!1;var t=un(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function qT(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Zt(o)||!On(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function jT(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!Zt(i)||!On(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}var Yg={name:"applyStyles",enabled:!0,phase:"write",fn:qT,effect:jT,requires:["computeStyles"]};function Tn(e){return e.split("-")[0]}var Gr=Math.max,Is=Math.min,Ui=Math.round;function Hi(e,t){t===void 0&&(t=!1);var n=e.getBoundingClientRect(),r=1,i=1;if(Zt(e)&&t){var o=e.offsetHeight,a=e.offsetWidth;a>0&&(r=Ui(n.width)/a||1),o>0&&(i=Ui(n.height)/o||1)}return{width:n.width/r,height:n.height/i,top:n.top/i,right:n.right/r,bottom:n.bottom/i,left:n.left/r,x:n.left/r,y:n.top/i}}function Yu(e){var t=Hi(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function qg(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&$u(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function qn(e){return un(e).getComputedStyle(e)}function WT(e){return["table","td","th"].indexOf(On(e))>=0}function Nr(e){return((Bi(e)?e.ownerDocument:e.document)||window.document).documentElement}function Bl(e){return On(e)==="html"?e:e.assignedSlot||e.parentNode||($u(e)?e.host:null)||Nr(e)}function zm(e){return!Zt(e)||qn(e).position==="fixed"?null:e.offsetParent}function KT(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&Zt(e)){var r=qn(e);if(r.position==="fixed")return null}var i=Bl(e);for($u(i)&&(i=i.host);Zt(i)&&["html","body"].indexOf(On(i))<0;){var o=qn(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Ca(e){for(var t=un(e),n=zm(e);n&&WT(n)&&qn(n).position==="static";)n=zm(n);return n&&(On(n)==="html"||On(n)==="body"&&qn(n).position==="static")?t:n||KT(e)||t}function qu(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ro(e,t,n){return Gr(e,Is(t,n))}function QT(e,t,n){var r=Ro(e,t,n);return r>n?n:r}function jg(){return{top:0,right:0,bottom:0,left:0}}function Wg(e){return Object.assign({},jg(),e)}function Kg(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var ZT=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,Wg(typeof e!="number"?e:Kg(e,ya))};function XT(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Tn(n.placement),l=qu(s),c=[At,tn].indexOf(s)>=0,d=c?"height":"width";if(!(!o||!a)){var u=ZT(i.padding,n),p=Yu(o),m=l==="y"?Ot:At,f=l==="y"?en:tn,_=n.rects.reference[d]+n.rects.reference[l]-a[l]-n.rects.popper[d],g=a[l]-n.rects.reference[l],S=Ca(o),v=S?l==="y"?S.clientHeight||0:S.clientWidth||0:0,y=_/2-g/2,b=u[m],E=v-p[d]-u[f],C=v/2-p[d]/2+y,N=Ro(b,C,E),R=l;n.modifiersData[r]=(t={},t[R]=N,t.centerOffset=N-C,t)}}function JT(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!qg(t.elements.popper,i)||(t.elements.arrow=i))}var e1={name:"arrow",enabled:!0,phase:"main",fn:XT,effect:JT,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Vi(e){return e.split("-")[1]}var t1={top:"auto",right:"auto",bottom:"auto",left:"auto"};function n1(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:Ui(t*i)/i||0,y:Ui(n*i)/i||0}}function $m(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,u=e.isFixed,p=a.x,m=p===void 0?0:p,f=a.y,_=f===void 0?0:f,g=typeof d=="function"?d({x:m,y:_}):{x:m,y:_};m=g.x,_=g.y;var S=a.hasOwnProperty("x"),v=a.hasOwnProperty("y"),y=At,b=Ot,E=window;if(c){var C=Ca(n),N="clientHeight",R="clientWidth";if(C===un(n)&&(C=Nr(n),qn(C).position!=="static"&&s==="absolute"&&(N="scrollHeight",R="scrollWidth")),C=C,i===Ot||(i===At||i===tn)&&o===jo){b=en;var O=u&&C===E&&E.visualViewport?E.visualViewport.height:C[N];_-=O-r.height,_*=l?1:-1}if(i===At||(i===Ot||i===en)&&o===jo){y=tn;var w=u&&C===E&&E.visualViewport?E.visualViewport.width:C[R];m-=w-r.width,m*=l?1:-1}}var x=Object.assign({position:s},c&&t1),I=d===!0?n1({x:m,y:_}):{x:m,y:_};if(m=I.x,_=I.y,l){var M;return Object.assign({},x,(M={},M[b]=v?"0":"",M[y]=S?"0":"",M.transform=(E.devicePixelRatio||1)<=1?"translate("+m+"px, "+_+"px)":"translate3d("+m+"px, "+_+"px, 0)",M))}return Object.assign({},x,(t={},t[b]=v?_+"px":"",t[y]=S?m+"px":"",t.transform="",t))}function r1(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:Tn(t.placement),variation:Vi(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,$m(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,$m(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var Qg={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:r1,data:{}},Ya={passive:!0};function i1(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=un(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(d){d.addEventListener("scroll",n.update,Ya)}),s&&l.addEventListener("resize",n.update,Ya),function(){o&&c.forEach(function(d){d.removeEventListener("scroll",n.update,Ya)}),s&&l.removeEventListener("resize",n.update,Ya)}}var Zg={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:i1,data:{}},o1={left:"right",right:"left",bottom:"top",top:"bottom"};function Ss(e){return e.replace(/left|right|bottom|top/g,function(t){return o1[t]})}var a1={start:"end",end:"start"};function Ym(e){return e.replace(/start|end/g,function(t){return a1[t]})}function ju(e){var t=un(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Wu(e){return Hi(Nr(e)).left+ju(e).scrollLeft}function s1(e){var t=un(e),n=Nr(e),r=t.visualViewport,i=n.clientWidth,o=n.clientHeight,a=0,s=0;return r&&(i=r.width,o=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,s=r.offsetTop)),{width:i,height:o,x:a+Wu(e),y:s}}function l1(e){var t,n=Nr(e),r=ju(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Gr(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Gr(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+Wu(e),l=-r.scrollTop;return qn(i||n).direction==="rtl"&&(s+=Gr(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function Ku(e){var t=qn(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Xg(e){return["html","body","#document"].indexOf(On(e))>=0?e.ownerDocument.body:Zt(e)&&Ku(e)?e:Xg(Bl(e))}function wo(e,t){var n;t===void 0&&(t=[]);var r=Xg(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=un(r),a=i?[o].concat(o.visualViewport||[],Ku(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(wo(Bl(a)))}function Md(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function c1(e){var t=Hi(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function qm(e,t){return t===$g?Md(s1(e)):Bi(t)?c1(t):Md(l1(Nr(e)))}function d1(e){var t=wo(Bl(e)),n=["absolute","fixed"].indexOf(qn(e).position)>=0,r=n&&Zt(e)?Ca(e):e;return Bi(r)?t.filter(function(i){return Bi(i)&&qg(i,r)&&On(i)!=="body"}):[]}function u1(e,t,n){var r=t==="clippingParents"?d1(e):[].concat(t),i=[].concat(r,[n]),o=i[0],a=i.reduce(function(s,l){var c=qm(e,l);return s.top=Gr(c.top,s.top),s.right=Is(c.right,s.right),s.bottom=Is(c.bottom,s.bottom),s.left=Gr(c.left,s.left),s},qm(e,o));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Jg(e){var t=e.reference,n=e.element,r=e.placement,i=r?Tn(r):null,o=r?Vi(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Ot:l={x:a,y:t.y-n.height};break;case en:l={x:a,y:t.y+t.height};break;case tn:l={x:t.x+t.width,y:s};break;case At:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=i?qu(i):null;if(c!=null){var d=c==="y"?"height":"width";switch(o){case Fi:l[c]=l[c]-(t[d]/2-n[d]/2);break;case jo:l[c]=l[c]+(t[d]/2-n[d]/2);break}}return l}function Wo(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.boundary,a=o===void 0?MT:o,s=n.rootBoundary,l=s===void 0?$g:s,c=n.elementContext,d=c===void 0?uo:c,u=n.altBoundary,p=u===void 0?!1:u,m=n.padding,f=m===void 0?0:m,_=Wg(typeof f!="number"?f:Kg(f,ya)),g=d===uo?LT:uo,S=e.rects.popper,v=e.elements[p?g:d],y=u1(Bi(v)?v:v.contextElement||Nr(e.elements.popper),a,l),b=Hi(e.elements.reference),E=Jg({reference:b,element:S,placement:i}),C=Md(Object.assign({},S,E)),N=d===uo?C:b,R={top:y.top-N.top+_.top,bottom:N.bottom-y.bottom+_.bottom,left:y.left-N.left+_.left,right:N.right-y.right+_.right},O=e.modifiersData.offset;if(d===uo&&O){var w=O[i];Object.keys(R).forEach(function(x){var I=[tn,en].indexOf(x)>=0?1:-1,M=[Ot,en].indexOf(x)>=0?"y":"x";R[x]+=w[M]*I})}return R}function p1(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?zu:l,d=Vi(r),u=d?s?Gm:Gm.filter(function(f){return Vi(f)===d}):ya,p=u.filter(function(f){return c.indexOf(f)>=0});p.length===0&&(p=u);var m=p.reduce(function(f,_){return f[_]=Wo(e,{placement:_,boundary:i,rootBoundary:o,padding:a})[Tn(_)],f},{});return Object.keys(m).sort(function(f,_){return m[f]-m[_]})}function m1(e){if(Tn(e)===Gu)return[];var t=Ss(e);return[Ym(e),t,Ym(t)]}function f1(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,d=n.boundary,u=n.rootBoundary,p=n.altBoundary,m=n.flipVariations,f=m===void 0?!0:m,_=n.allowedAutoPlacements,g=t.options.placement,S=Tn(g),v=S===g,y=l||(v||!f?[Ss(g)]:m1(g)),b=[g].concat(y).reduce(function(he,oe){return he.concat(Tn(oe)===Gu?p1(t,{placement:oe,boundary:d,rootBoundary:u,padding:c,flipVariations:f,allowedAutoPlacements:_}):oe)},[]),E=t.rects.reference,C=t.rects.popper,N=new Map,R=!0,O=b[0],w=0;w<b.length;w++){var x=b[w],I=Tn(x),M=Vi(x)===Fi,L=[Ot,en].indexOf(I)>=0,B=L?"width":"height",D=Wo(t,{placement:x,boundary:d,rootBoundary:u,altBoundary:p,padding:c}),A=L?M?tn:At:M?en:Ot;E[B]>C[B]&&(A=Ss(A));var k=Ss(A),P=[];if(o&&P.push(D[I]<=0),s&&P.push(D[A]<=0,D[k]<=0),P.every(function(he){return he})){O=x,R=!1;break}N.set(x,P)}if(R)for(var V=f?3:1,W=function(he){var oe=b.find(function(Ne){var qe=N.get(Ne);if(qe)return qe.slice(0,he).every(function(Fe){return Fe})});if(oe)return O=oe,"break"},Z=V;Z>0;Z--){var pe=W(Z);if(pe==="break")break}t.placement!==O&&(t.modifiersData[r]._skip=!0,t.placement=O,t.reset=!0)}}var h1={name:"flip",enabled:!0,phase:"main",fn:f1,requiresIfExists:["offset"],data:{_skip:!1}};function jm(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Wm(e){return[Ot,tn,en,At].some(function(t){return e[t]>=0})}function _1(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Wo(t,{elementContext:"reference"}),s=Wo(t,{altBoundary:!0}),l=jm(a,r),c=jm(s,i,o),d=Wm(l),u=Wm(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}var g1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:_1};function E1(e,t,n){var r=Tn(e),i=[At,Ot].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[At,tn].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function b1(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=zu.reduce(function(d,u){return d[u]=E1(u,t.rects,o),d},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}var S1={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:b1};function v1(e){var t=e.state,n=e.name;t.modifiersData[n]=Jg({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}var eE={name:"popperOffsets",enabled:!0,phase:"read",fn:v1,data:{}};function y1(e){return e==="x"?"y":"x"}function C1(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,d=n.altBoundary,u=n.padding,p=n.tether,m=p===void 0?!0:p,f=n.tetherOffset,_=f===void 0?0:f,g=Wo(t,{boundary:l,rootBoundary:c,padding:u,altBoundary:d}),S=Tn(t.placement),v=Vi(t.placement),y=!v,b=qu(S),E=y1(b),C=t.modifiersData.popperOffsets,N=t.rects.reference,R=t.rects.popper,O=typeof _=="function"?_(Object.assign({},t.rects,{placement:t.placement})):_,w=typeof O=="number"?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),x=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,I={x:0,y:0};if(C){if(o){var M,L=b==="y"?Ot:At,B=b==="y"?en:tn,D=b==="y"?"height":"width",A=C[b],k=A+g[L],P=A-g[B],V=m?-R[D]/2:0,W=v===Fi?N[D]:R[D],Z=v===Fi?-R[D]:-N[D],pe=t.elements.arrow,he=m&&pe?Yu(pe):{width:0,height:0},oe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:jg(),Ne=oe[L],qe=oe[B],Fe=Ro(0,N[D],he[D]),kt=y?N[D]/2-V-Fe-Ne-w.mainAxis:W-Fe-Ne-w.mainAxis,ut=y?-N[D]/2+V+Fe+qe+w.mainAxis:Z+Fe+qe+w.mainAxis,pt=t.elements.arrow&&Ca(t.elements.arrow),$t=pt?b==="y"?pt.clientTop||0:pt.clientLeft||0:0,ot=(M=x==null?void 0:x[b])!=null?M:0,mt=A+kt-ot-$t,ze=A+ut-ot,le=Ro(m?Is(k,mt):k,A,m?Gr(P,ze):P);C[b]=le,I[b]=le-A}if(s){var Ze,ee=b==="x"?Ot:At,re=b==="x"?en:tn,Se=C[E],ne=E==="y"?"height":"width",be=Se+g[ee],Ve=Se-g[re],je=[Ot,At].indexOf(S)!==-1,bt=(Ze=x==null?void 0:x[E])!=null?Ze:0,j=je?be:Se-N[ne]-R[ne]-bt+w.altAxis,F=je?Se+N[ne]+R[ne]-bt-w.altAxis:Ve,Y=m&&je?QT(j,Se,F):Ro(m?j:be,Se,m?F:Ve);C[E]=Y,I[E]=Y-Se}t.modifiersData[r]=I}}var T1={name:"preventOverflow",enabled:!0,phase:"main",fn:C1,requiresIfExists:["offset"]};function N1(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function O1(e){return e===un(e)||!Zt(e)?ju(e):N1(e)}function A1(e){var t=e.getBoundingClientRect(),n=Ui(t.width)/e.offsetWidth||1,r=Ui(t.height)/e.offsetHeight||1;return n!==1||r!==1}function R1(e,t,n){n===void 0&&(n=!1);var r=Zt(t),i=Zt(t)&&A1(t),o=Nr(t),a=Hi(e,i),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((On(t)!=="body"||Ku(o))&&(s=O1(t)),Zt(t)?(l=Hi(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=Wu(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function w1(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function x1(e){var t=w1(e);return YT.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function I1(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function D1(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Km={placement:"bottom",modifiers:[],strategy:"absolute"};function Qm(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function Qu(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?Km:i;return function(a,s,l){l===void 0&&(l=o);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},Km,o),modifiersData:{},elements:{reference:a,popper:s},attributes:{},styles:{}},d=[],u=!1,p={state:c,setOptions:function(_){var g=typeof _=="function"?_(c.options):_;f(),c.options=Object.assign({},o,c.options,g),c.scrollParents={reference:Bi(a)?wo(a):a.contextElement?wo(a.contextElement):[],popper:wo(s)};var S=x1(D1([].concat(r,c.options.modifiers)));return c.orderedModifiers=S.filter(function(v){return v.enabled}),m(),p.update()},forceUpdate:function(){if(!u){var _=c.elements,g=_.reference,S=_.popper;if(Qm(g,S)){c.rects={reference:R1(g,Ca(S),c.options.strategy==="fixed"),popper:Yu(S)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(R){return c.modifiersData[R.name]=Object.assign({},R.data)});for(var v=0;v<c.orderedModifiers.length;v++){if(c.reset===!0){c.reset=!1,v=-1;continue}var y=c.orderedModifiers[v],b=y.fn,E=y.options,C=E===void 0?{}:E,N=y.name;typeof b=="function"&&(c=b({state:c,options:C,name:N,instance:p})||c)}}}},update:I1(function(){return new Promise(function(_){p.forceUpdate(),_(c)})}),destroy:function(){f(),u=!0}};if(!Qm(a,s))return p;p.setOptions(l).then(function(_){!u&&l.onFirstUpdate&&l.onFirstUpdate(_)});function m(){c.orderedModifiers.forEach(function(_){var g=_.name,S=_.options,v=S===void 0?{}:S,y=_.effect;if(typeof y=="function"){var b=y({state:c,name:g,instance:p,options:v}),E=function(){};d.push(b||E)}})}function f(){d.forEach(function(_){return _()}),d=[]}return p}}Qu();var k1=[Zg,eE,Qg,Yg];Qu({defaultModifiers:k1});var M1=[Zg,eE,Qg,Yg,S1,h1,T1,e1,g1],L1=Qu({defaultModifiers:M1});const tE=zt({arrowOffset:{type:Number,default:5}}),P1=["fixed","absolute"],F1=zt({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:Be(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:zu,default:"bottom"},popperOptions:{type:Be(Object),default:()=>({})},strategy:{type:String,values:P1,default:"absolute"}}),nE=zt(H(T(H(T(T({},F1),tE),{id:String,style:{type:Be([String,Array,Object])},className:{type:Be([String,Array,Object])},effect:{type:Be(String),default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:Boolean,trapping:Boolean,popperClass:{type:Be([String,Array,Object])},popperStyle:{type:Be([String,Array,Object])},referenceEl:{type:Be(Object)},triggerTargetEl:{type:Be(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number}),Pg(["ariaLabel"])),{loop:Boolean})),B1={mouseenter:e=>e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},U1=(e,t)=>{const n=h.ref(!1),r=h.ref();return{focusStartRef:r,trapped:n,onFocusAfterReleased:c=>{var d;((d=c.detail)==null?void 0:d.focusReason)!=="pointer"&&(r.value="first",t("blur"))},onFocusAfterTrapped:()=>{t("focus")},onFocusInTrap:c=>{e.visible&&!n.value&&(c.target&&(r.value=c.target),n.value=!0)},onFocusoutPrevented:c=>{e.trapping||(c.detail.focusReason==="pointer"&&c.preventDefault(),n.value=!1)},onReleaseRequested:()=>{n.value=!1,t("close")}}},H1=(e,t=[])=>{const{placement:n,strategy:r,popperOptions:i}=e,o=H(T({placement:n,strategy:r},i),{modifiers:[...G1(e),...t]});return z1(o,i==null?void 0:i.modifiers),o},V1=e=>{if(ct.isClient)return ct.unrefElement(e)};function G1(e){const{offset:t,gpuAcceleration:n,fallbackPlacements:r}=e;return[{name:"offset",options:{offset:[0,t!=null?t:12]}},{name:"preventOverflow",options:{padding:{top:0,bottom:0,left:0,right:0}}},{name:"flip",options:{padding:5,fallbackPlacements:r}},{name:"computeStyles",options:{gpuAcceleration:n}}]}function z1(e,t){t&&(e.modifiers=[...e.modifiers,...t!=null?t:[]])}const $1=(e,t,n={})=>{const r={name:"updateState",enabled:!0,phase:"write",fn:({state:l})=>{const c=Y1(l);Object.assign(a.value,c)},requires:["computeStyles"]},i=h.computed(()=>{const{onFirstUpdate:l,placement:c,strategy:d,modifiers:u}=h.unref(n);return{onFirstUpdate:l,placement:c||"bottom",strategy:d||"absolute",modifiers:[...u||[],r,{name:"applyStyles",enabled:!1}]}}),o=h.shallowRef(),a=h.ref({styles:{popper:{position:h.unref(i).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=()=>{o.value&&(o.value.destroy(),o.value=void 0)};return h.watch(i,l=>{const c=h.unref(o);c&&c.setOptions(l)},{deep:!0}),h.watch([e,t],([l,c])=>{s(),!(!l||!c)&&(o.value=L1(l,c,h.unref(i)))}),h.onBeforeUnmount(()=>{s()}),{state:h.computed(()=>{var l;return T({},((l=h.unref(o))==null?void 0:l.state)||{})}),styles:h.computed(()=>h.unref(a).styles),attributes:h.computed(()=>h.unref(a).attributes),update:()=>{var l;return(l=h.unref(o))==null?void 0:l.update()},forceUpdate:()=>{var l;return(l=h.unref(o))==null?void 0:l.forceUpdate()},instanceRef:h.computed(()=>h.unref(o))}};function Y1(e){const t=Object.keys(e.elements),n=We.fromPairs(t.map(i=>[i,e.styles[i]||{}])),r=We.fromPairs(t.map(i=>[i,e.attributes[i]]));return{styles:n,attributes:r}}const q1=0,j1=e=>{const{popperInstanceRef:t,contentRef:n,triggerRef:r,role:i}=h.inject(Bu,void 0),o=h.ref(),a=h.computed(()=>e.arrowOffset),s=h.computed(()=>({name:"eventListeners",enabled:!!e.visible})),l=h.computed(()=>{var S;const v=h.unref(o),y=(S=h.unref(a))!=null?S:q1;return{name:"arrow",enabled:!We.isUndefined(v),options:{element:v,padding:y}}}),c=h.computed(()=>T({onFirstUpdate:()=>{f()}},H1(e,[h.unref(l),h.unref(s)]))),d=h.computed(()=>V1(e.referenceEl)||h.unref(r)),{attributes:u,state:p,styles:m,update:f,forceUpdate:_,instanceRef:g}=$1(d,n,c);return h.watch(g,S=>t.value=S,{flush:"sync"}),h.onMounted(()=>{h.watch(()=>{var S,v;return(v=(S=h.unref(d))==null?void 0:S.getBoundingClientRect)==null?void 0:v.call(S)},()=>{f()})}),{attributes:u,arrowRef:o,contentRef:n,instanceRef:g,state:p,styles:m,role:i,forceUpdate:_,update:f}},W1=(e,{attributes:t,styles:n,role:r})=>{const{nextZIndex:i}=AC(),o=Tr("popper"),a=h.computed(()=>h.unref(t).popper),s=h.ref(Yo(e.zIndex)?e.zIndex:i()),l=h.computed(()=>[o.b(),o.is("pure",e.pure),o.is(e.effect),e.popperClass]),c=h.computed(()=>[{zIndex:h.unref(s)},h.unref(n).popper,e.popperStyle||{}]),d=h.computed(()=>r.value==="dialog"?"false":void 0),u=h.computed(()=>h.unref(n).arrow||{});return{ariaModal:d,arrowStyle:u,contentAttrs:a,contentClass:l,contentStyle:c,contentZIndex:s,updateZIndex:()=>{s.value=Yo(e.zIndex)?e.zIndex:i()}}},K1=h.defineComponent({name:"ElPopperContent"}),Q1=h.defineComponent(H(T({},K1),{props:nE,emits:B1,setup(e,{expose:t,emit:n}){const r=e,{focusStartRef:i,trapped:o,onFocusAfterReleased:a,onFocusAfterTrapped:s,onFocusInTrap:l,onFocusoutPrevented:c,onReleaseRequested:d}=U1(r,n),{attributes:u,arrowRef:p,contentRef:m,styles:f,instanceRef:_,role:g,update:S}=j1(r),{ariaModal:v,arrowStyle:y,contentAttrs:b,contentClass:E,contentStyle:C,updateZIndex:N}=W1(r,{styles:f,attributes:u,role:g}),R=h.inject(Dd,void 0);h.provide(Bg,{arrowStyle:y,arrowRef:p}),R&&h.provide(Dd,H(T({},R),{addInputId:wd,removeInputId:wd}));let O;const w=(I=!0)=>{S(),I&&N()},x=()=>{w(!1),r.visible&&r.focusOnShow?o.value=!0:r.visible===!1&&(o.value=!1)};return h.onMounted(()=>{h.watch(()=>r.triggerTargetEl,(I,M)=>{O==null||O(),O=void 0;const L=h.unref(I||m.value),B=h.unref(M||m.value);Ri(L)&&(O=h.watch([g,()=>r.ariaLabel,v,()=>r.id],D=>{["role","aria-label","aria-modal","id"].forEach((A,k)=>{We.isNil(D[k])?L.removeAttribute(A):L.setAttribute(A,D[k])})},{immediate:!0})),B!==L&&Ri(B)&&["role","aria-label","aria-modal","id"].forEach(D=>{B.removeAttribute(D)})},{immediate:!0}),h.watch(()=>r.visible,x,{immediate:!0})}),h.onBeforeUnmount(()=>{O==null||O(),O=void 0}),t({popperContentRef:m,popperInstanceRef:_,updatePopper:w,contentStyle:C}),(I,M)=>(h.openBlock(),h.createElementBlock("div",h.mergeProps({ref_key:"contentRef",ref:m},h.unref(b),{style:h.unref(C),class:h.unref(E),tabindex:"-1",onMouseenter:L=>I.$emit("mouseenter",L),onMouseleave:L=>I.$emit("mouseleave",L)}),[h.createVNode(h.unref(kT),{loop:I.loop,trapped:h.unref(o),"trap-on-focus-in":!0,"focus-trap-el":h.unref(m),"focus-start-el":h.unref(i),onFocusAfterTrapped:h.unref(s),onFocusAfterReleased:h.unref(a),onFocusin:h.unref(l),onFocusoutPrevented:h.unref(c),onReleaseRequested:h.unref(d)},{default:h.withCtx(()=>[h.renderSlot(I.$slots,"default")]),_:3},8,["loop","trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16,["onMouseenter","onMouseleave"]))}}));var Z1=dn(Q1,[["__file","content.vue"]]);const X1=va(cT),Zu=Symbol("elTooltip"),rE=zt({to:{type:Be([String,Object]),required:!0},disabled:Boolean}),iE=zt(T(H(T(T({},FC),nE),{appendTo:{type:rE.to.type},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:Be(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean}),Pg(["ariaLabel"]))),oE=zt(H(T({},Hg),{disabled:Boolean,trigger:{type:Be([String,Array]),default:"hover"},triggerKeys:{type:Be(Array),default:()=>[Vr.enter,Vr.numpadEnter,Vr.space]},focusOnTarget:Boolean})),J1=Pl({type:Be(Boolean),default:null}),eN=Pl({type:Be(Function)}),tN=e=>{const t=`update:${e}`,n=`onUpdate:${e}`,r=[t],i={[e]:J1,[n]:eN};return{useModelToggle:({indicator:a,toggleReason:s,shouldHideWhenRouteChanges:l,shouldProceed:c,onShow:d,onHide:u})=>{const p=h.getCurrentInstance(),{emit:m}=p,f=p.props,_=h.computed(()=>Va(f[n])),g=h.computed(()=>f[e]===null),S=N=>{a.value!==!0&&(a.value=!0,s&&(s.value=N),Va(d)&&d(N))},v=N=>{a.value!==!1&&(a.value=!1,s&&(s.value=N),Va(u)&&u(N))},y=N=>{if(f.disabled===!0||Va(c)&&!c())return;const R=_.value&&ct.isClient;R&&m(t,!0),(g.value||!R)&&S(N)},b=N=>{if(f.disabled===!0||!ct.isClient)return;const R=_.value&&ct.isClient;R&&m(t,!1),(g.value||!R)&&v(N)},E=N=>{kg(N)&&(f.disabled&&N?_.value&&m(t,!1):a.value!==N&&(N?S():v()))},C=()=>{a.value?b():y()};return h.watch(()=>f[e],E),l&&p.appContext.config.globalProperties.$route!==void 0&&h.watch(()=>T({},p.proxy.$route),()=>{l.value&&a.value&&b()}),h.onMounted(()=>{E(f[e])}),{hide:b,show:y,toggle:C,hasUpdateHandler:_}},useModelToggleProps:i,useModelToggleEmits:r}},{useModelToggleProps:nN,useModelToggleEmits:rN,useModelToggle:iN}=tN("visible"),oN=zt(H(T(T(T(T(T({},Ug),nN),iE),oE),tE),{showArrow:{type:Boolean,default:!0}})),aN=[...rN,"before-show","before-hide","show","hide","open","close"],Ld=(e,t)=>Dg(e)?e.includes(t):e===t,pi=(e,t,n)=>r=>{Ld(h.unref(e),t)&&n(r)},sN=h.defineComponent({name:"ElTooltipTrigger"}),lN=h.defineComponent(H(T({},sN),{props:oE,setup(e,{expose:t}){const n=e,r=Tr("tooltip"),{controlled:i,id:o,open:a,onOpen:s,onClose:l,onToggle:c}=h.inject(Zu,void 0),d=h.ref(null),u=()=>{if(h.unref(i)||n.disabled)return!0},p=h.toRef(n,"trigger"),m=Bn(u,pi(p,"hover",b=>{s(b),n.focusOnTarget&&b.target&&h.nextTick(()=>{Fu(b.target,{preventScroll:!0})})})),f=Bn(u,pi(p,"hover",l)),_=Bn(u,pi(p,"click",b=>{b.button===0&&c(b)})),g=Bn(u,pi(p,"focus",s)),S=Bn(u,pi(p,"focus",l)),v=Bn(u,pi(p,"contextmenu",b=>{b.preventDefault(),c(b)})),y=Bn(u,b=>{const E=Vu(b);n.triggerKeys.includes(E)&&(b.preventDefault(),c(b))});return t({triggerRef:d}),(b,E)=>(h.openBlock(),h.createBlock(h.unref(ET),{id:h.unref(o),"virtual-ref":b.virtualRef,open:h.unref(a),"virtual-triggering":b.virtualTriggering,class:h.normalizeClass(h.unref(r).e("trigger")),onBlur:h.unref(S),onClick:h.unref(_),onContextmenu:h.unref(v),onFocus:h.unref(g),onMouseenter:h.unref(m),onMouseleave:h.unref(f),onKeydown:h.unref(y)},{default:h.withCtx(()=>[h.renderSlot(b.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}}));var cN=dn(lN,[["__file","trigger.vue"]]);const dN=h.defineComponent({__name:"teleport",props:rE,setup(e){return(t,n)=>t.disabled?h.renderSlot(t.$slots,"default",{key:0}):(h.openBlock(),h.createBlock(h.Teleport,{key:1,to:t.to},[h.renderSlot(t.$slots,"default")],8,["to"]))}});var uN=dn(dN,[["__file","teleport.vue"]]);const pN=va(uN),aE=()=>{const e=Lu(),t=Fg(),n=h.computed(()=>`${e.value}-popper-container-${t.prefix}`),r=h.computed(()=>`#${n.value}`);return{id:n,selector:r}},mN=e=>{const t=document.createElement("div");return t.id=e,document.body.appendChild(t),t},fN=()=>{const{id:e,selector:t}=aE();return h.onBeforeMount(()=>{ct.isClient&&(typeof process!="undefined"&&process.env.NODE_ENV==="test"||!document.body.querySelector(t.value))&&mN(e.value)}),{id:e,selector:t}},hN=e=>!e&&e!==0?[]:Dg(e)?e:[e],_N=h.defineComponent({name:"ElTooltipContent",inheritAttrs:!1}),gN=h.defineComponent(H(T({},_N),{props:iE,setup(e,{expose:t}){const n=e,{selector:r}=aE(),i=Tr("tooltip"),o=h.ref(),a=ct.computedEager(()=>{var k;return(k=o.value)==null?void 0:k.popperContentRef});let s;const{controlled:l,id:c,open:d,trigger:u,onClose:p,onOpen:m,onShow:f,onHide:_,onBeforeShow:g,onBeforeHide:S}=h.inject(Zu,void 0),v=h.computed(()=>n.transition||`${i.namespace.value}-fade-in-linear`),y=h.computed(()=>typeof process!="undefined"&&process.env.NODE_ENV==="test"&&!process.env.RUN_TEST_WITH_PERSISTENT?!0:n.persistent);h.onBeforeUnmount(()=>{s==null||s()});const b=h.computed(()=>h.unref(y)?!0:h.unref(d)),E=h.computed(()=>n.disabled?!1:h.unref(d)),C=h.computed(()=>n.appendTo||r.value),N=h.computed(()=>{var k;return(k=n.style)!=null?k:{}}),R=h.ref(!0),O=()=>{_(),A()&&Fu(document.body,{preventScroll:!0}),R.value=!0},w=()=>{if(h.unref(l))return!0},x=Bn(w,()=>{n.enterable&&Ld(h.unref(u),"hover")&&m()}),I=Bn(w,()=>{Ld(h.unref(u),"hover")&&p()}),M=()=>{var k,P;(P=(k=o.value)==null?void 0:k.updatePopper)==null||P.call(k),g==null||g()},L=()=>{S==null||S()},B=()=>{f()},D=()=>{n.virtualTriggering||p()},A=k=>{var P;const V=(P=o.value)==null?void 0:P.popperContentRef,W=(k==null?void 0:k.relatedTarget)||document.activeElement;return V==null?void 0:V.contains(W)};return h.watch(()=>h.unref(d),k=>{k?(R.value=!1,s=ct.onClickOutside(a,()=>{if(h.unref(l))return;hN(h.unref(u)).every(V=>V!=="hover"&&V!=="focus")&&p()},{detectIframe:!0})):s==null||s()},{flush:"post"}),h.watch(()=>n.content,()=>{var k,P;(P=(k=o.value)==null?void 0:k.updatePopper)==null||P.call(k)}),t({contentRef:o,isFocusInsideContent:A}),(k,P)=>(h.openBlock(),h.createBlock(h.unref(pN),{disabled:!k.teleported,to:h.unref(C)},{default:h.withCtx(()=>[h.unref(b)||!R.value?(h.openBlock(),h.createBlock(h.Transition,{key:0,name:h.unref(v),appear:!h.unref(y),onAfterLeave:O,onBeforeEnter:M,onAfterEnter:B,onBeforeLeave:L,persisted:""},{default:h.withCtx(()=>[h.withDirectives(h.createVNode(h.unref(Z1),h.mergeProps({id:h.unref(c),ref_key:"contentRef",ref:o},k.$attrs,{"aria-label":k.ariaLabel,"aria-hidden":R.value,"boundaries-padding":k.boundariesPadding,"fallback-placements":k.fallbackPlacements,"gpu-acceleration":k.gpuAcceleration,offset:k.offset,placement:k.placement,"popper-options":k.popperOptions,"arrow-offset":k.arrowOffset,strategy:k.strategy,effect:k.effect,enterable:k.enterable,pure:k.pure,"popper-class":k.popperClass,"popper-style":[k.popperStyle,h.unref(N)],"reference-el":k.referenceEl,"trigger-target-el":k.triggerTargetEl,visible:h.unref(E),"z-index":k.zIndex,loop:k.loop,onMouseenter:h.unref(x),onMouseleave:h.unref(I),onBlur:D,onClose:h.unref(p)}),{default:h.withCtx(()=>[h.renderSlot(k.$slots,"default")]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","arrow-offset","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","loop","onMouseenter","onMouseleave","onClose"]),[[h.vShow,h.unref(E)]])]),_:3},8,["name","appear"])):h.createCommentVNode("v-if",!0)]),_:3},8,["disabled","to"]))}}));var EN=dn(gN,[["__file","content.vue"]]);const bN=h.defineComponent({name:"ElTooltip"}),SN=h.defineComponent(H(T({},bN),{props:oN,emits:aN,setup(e,{expose:t,emit:n}){const r=e;fN();const i=Tr("tooltip"),o=nT(),a=h.ref(),s=h.ref(),l=()=>{var y;const b=h.unref(a);b&&((y=b.popperInstanceRef)==null||y.update())},c=h.ref(!1),d=h.ref(),{show:u,hide:p,hasUpdateHandler:m}=iN({indicator:c,toggleReason:d}),{onOpen:f,onClose:_}=BC({showAfter:h.toRef(r,"showAfter"),hideAfter:h.toRef(r,"hideAfter"),autoClose:h.toRef(r,"autoClose"),open:u,close:p}),g=h.computed(()=>kg(r.visible)&&!m.value),S=h.computed(()=>[i.b(),r.popperClass]);h.provide(Zu,{controlled:g,id:o,open:h.readonly(c),trigger:h.toRef(r,"trigger"),onOpen:f,onClose:_,onToggle:y=>{h.unref(c)?_(y):f(y)},onShow:()=>{n("show",d.value)},onHide:()=>{n("hide",d.value)},onBeforeShow:()=>{n("before-show",d.value)},onBeforeHide:()=>{n("before-hide",d.value)},updatePopper:l}),h.watch(()=>r.disabled,y=>{y&&c.value&&(c.value=!1)});const v=y=>{var b;return(b=s.value)==null?void 0:b.isFocusInsideContent(y)};return h.onDeactivated(()=>c.value&&p()),t({popperRef:a,contentRef:s,isFocusInsideContent:v,updatePopper:l,onOpen:f,onClose:_,hide:p}),(y,b)=>(h.openBlock(),h.createBlock(h.unref(X1),{ref_key:"popperRef",ref:a,role:y.role},{default:h.withCtx(()=>[h.createVNode(cN,{disabled:y.disabled,trigger:y.trigger,"trigger-keys":y.triggerKeys,"virtual-ref":y.virtualRef,"virtual-triggering":y.virtualTriggering,"focus-on-target":y.focusOnTarget},{default:h.withCtx(()=>[y.$slots.default?h.renderSlot(y.$slots,"default",{key:0}):h.createCommentVNode("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering","focus-on-target"]),h.createVNode(EN,{ref_key:"contentRef",ref:s,"aria-label":y.ariaLabel,"boundaries-padding":y.boundariesPadding,content:y.content,disabled:y.disabled,effect:y.effect,enterable:y.enterable,"fallback-placements":y.fallbackPlacements,"hide-after":y.hideAfter,"gpu-acceleration":y.gpuAcceleration,offset:y.offset,persistent:y.persistent,"popper-class":h.unref(S),"popper-style":y.popperStyle,placement:y.placement,"popper-options":y.popperOptions,"arrow-offset":y.arrowOffset,pure:y.pure,"raw-content":y.rawContent,"reference-el":y.referenceEl,"trigger-target-el":y.triggerTargetEl,"show-after":y.showAfter,strategy:y.strategy,teleported:y.teleported,transition:y.transition,"virtual-triggering":y.virtualTriggering,"z-index":y.zIndex,"append-to":y.appendTo,loop:y.loop},{default:h.withCtx(()=>[h.renderSlot(y.$slots,"content",{},()=>[y.rawContent?(h.openBlock(),h.createElementBlock("span",{key:0,innerHTML:y.content},null,8,["innerHTML"])):(h.openBlock(),h.createElementBlock("span",{key:1},h.toDisplayString(y.content),1))]),y.showArrow?(h.openBlock(),h.createBlock(h.unref(pT),{key:0})):h.createCommentVNode("v-if",!0)]),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","arrow-offset","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to","loop"])]),_:3},8,["role"]))}}));var vN=dn(SN,[["__file","tooltip.vue"]]);const yN=va(vN);var sE=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};const CN=zt({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:Lg},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),TN={close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},NN=h.defineComponent({name:"ElTag"}),ON=h.defineComponent(H(T({},NN),{props:CN,emits:TN,setup(e,{emit:t}){const n=e,r=oT(),i=Tr("tag"),o=h.computed(()=>{const{type:c,hit:d,effect:u,closable:p,round:m}=n;return[i.b(),i.is("closable",p),i.m(c||"primary"),i.m(r.value),i.m(u),i.is("hit",d),i.is("round",m)]}),a=c=>{t("close",c)},s=c=>{t("click",c)},l=c=>{var d,u,p;(p=(u=(d=c==null?void 0:c.component)==null?void 0:d.subTree)==null?void 0:u.component)!=null&&p.bum&&(c.component.subTree.component.bum=null)};return(c,d)=>c.disableTransitions?(h.openBlock(),h.createElementBlock("span",{key:0,class:h.normalizeClass(h.unref(o)),style:h.normalizeStyle({backgroundColor:c.color}),onClick:s},[h.createElementVNode("span",{class:h.normalizeClass(h.unref(i).e("content"))},[h.renderSlot(c.$slots,"default")],2),c.closable?(h.openBlock(),h.createBlock(h.unref(Am),{key:0,class:h.normalizeClass(h.unref(i).e("close")),onClick:h.withModifiers(a,["stop"])},{default:h.withCtx(()=>[h.createVNode(h.unref(xd))]),_:1},8,["class","onClick"])):h.createCommentVNode("v-if",!0)],6)):(h.openBlock(),h.createBlock(h.Transition,{key:1,name:`${h.unref(i).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:l},{default:h.withCtx(()=>[h.createElementVNode("span",{class:h.normalizeClass(h.unref(o)),style:h.normalizeStyle({backgroundColor:c.color}),onClick:s},[h.createElementVNode("span",{class:h.normalizeClass(h.unref(i).e("content"))},[h.renderSlot(c.$slots,"default")],2),c.closable?(h.openBlock(),h.createBlock(h.unref(Am),{key:0,class:h.normalizeClass(h.unref(i).e("close")),onClick:h.withModifiers(a,["stop"])},{default:h.withCtx(()=>[h.createVNode(h.unref(xd))]),_:1},8,["class","onClick"])):h.createCommentVNode("v-if",!0)],6)]),_:3},8,["name"]))}}));var AN=dn(ON,[["__file","tag.vue"]]);const RN=va(AN),wN={class:"tooltip-header flex flex-col w-full",style:{"line-height":"1"}},xN={class:"tooltip-header-title"},Zm=h.defineComponent({__name:"TooltipHeader",props:{title:{},subtitle:{}},setup(e){const t=e,n=h.ref(),r=h.ref(!1),i=h.ref(!1),o=()=>{if(!n.value||!t.subtitle||i.value)return;const a=n.value;r.value=a.scrollWidth>a.clientWidth,i.value=!0};return h.watch(()=>t.subtitle,()=>{i.value=!1,r.value=!1}),(a,s)=>{const l=yN;return h.openBlock(),h.createElementBlock("div",wN,[h.createElementVNode("span",xN,h.toDisplayString(e.title),1),e.subtitle?(h.openBlock(),h.createBlock(l,{key:0,content:e.subtitle,disabled:!r.value,placement:"top"},{default:h.withCtx(()=>[h.createElementVNode("div",{ref_key:"subtitleRef",ref:n,class:"tooltip-header-subtitle font-400 text-nowrap text-ellipsis overflow-hidden mt-1",style:{"font-size":"clamp(12px, calc(1em - 1px), 16px)"},onMouseenter:o},h.toDisplayString(e.subtitle),545)]),_:1},8,["content","disabled"])):h.createCommentVNode("",!0)])}}}),IN=(e,t,n,r)=>{const i=t+1;return n*(r-1)+i};function Xm(e,t){return t.hidden===void 0?!1:Je(t.hidden)?t.hidden({},null,t,e.form,e.excontext,e.editable):t.hidden}function DN(e,t,n,r,i){return e.hidden===void 0?!1:Je(e.hidden)?e.hidden(t,n,i,r.form,r.excontext,r.editable):e.hidden}function lE(e,t,n,r,i){return e.disabled===void 0?!1:Je(e.disabled)?e.disabled(t,n,i,r.form,r.excontext,r.editable):e.disabled}function kN(e,t,n,r,i){return e.loading===void 0?!1:Je(e.loading)?e.loading(t,n,i,r.form,r.excontext,r.editable):e.loading}function Jm(e,t){return e.editable?t.editable===void 0?!0:Je(t.editable)?t.editable({},null,t,e.form,e.excontext,e.editable):t.editable:!1}function MN(e,t,n,r){var i,o,a,s,l,c,d,u;return((o=(i=t.editProps)==null?void 0:i.componentProps)==null?void 0:o.disabled)===void 0?!1:Je((s=(a=t.editProps)==null?void 0:a.componentProps)==null?void 0:s.disabled)?(c=(l=t.editProps)==null?void 0:l.componentProps)==null?void 0:c.disabled(n,r,t,e.form,e.excontext,e.editable):(u=(d=t.editProps)==null?void 0:d.componentProps)==null?void 0:u.disabled}function LN(e,t,n,r){return t.copyable===void 0?!1:Je(t.copyable)?t.copyable(n,r,t,e.form,e.excontext,e.editable):t.copyable}function PN(e,t,n,r){return t.clickable===void 0?!1:Je(t.clickable)?t.clickable(n,r,t,e.form,e.excontext,e.editable):t.clickable}function FN(e,t){const n=r=>{for(const i of r){if(i.field&&i.field===t)return i;if(i.children&&i.children.length>0)return n(i.children)}return null};return n(e)}function BN(e,t){const n=r=>{for(const i of r){if(i.key&&i.key===t)return i;if(i.children&&i.children.length>0)return n(i.children)}return null};return n(e)}const UN={key:0,"aria-hidden":"true"},HN=["xlink:href"],VN=h.defineComponent({__name:"Icon",props:{icon:{type:String,required:!0},color:{type:String},size:{type:[String,Number],default:16}},setup(e){const t=e,n=h.computed(()=>t.icon.startsWith("svg-icon:")),r=h.computed(()=>h.unref(n)?`#icon-${t.icon.split("svg-icon:")[1]}`:t.icon),i=h.computed(()=>{const{color:o,size:a}=t;return{fontSize:typeof a=="number"?`${a}px`:a,color:o}});return(o,a)=>(h.openBlock(),h.createBlock(h.unref(G.ElIcon),{size:e.size,color:e.color},{default:h.withCtx(()=>[n.value?(h.openBlock(),h.createElementBlock("svg",UN,[h.createElementVNode("use",{"xlink:href":r.value},null,8,HN)])):(h.openBlock(),h.createBlock(h.unref($y.Icon),{key:1,icon:r.value,style:h.normalizeStyle(i.value),class:h.normalizeClass(o.$attrs.class)},null,8,["icon","style","class"]))]),_:1},8,["size","color"]))}}),Wn=(e,t)=>{if(e.install=n=>{for(const r of[e,...Object.values(t!=null?t:{})])n.component(r.name,r)},t)for(const[n,r]of Object.entries(t))e[n]=r;return e},Ut=Wn(VN),GN={class:"dot-tag__text"},zN=h.defineComponent({__name:"DotTag",props:{value:{type:String,default:""},type:{type:String,default:"primary"},color:{type:String,default:""},hit:{type:Boolean,default:!1},effect:{type:String,default:"dark"},round:{type:Boolean,default:!1}},setup(e){return(t,n)=>{const r=RN;return h.openBlock(),h.createBlock(r,{effect:e.effect,hit:e.hit,round:"",class:"dot-tag",type:e.type},{default:h.withCtx(()=>[h.createElementVNode("span",{class:h.normalizeClass(["dot-tag__dot",{[e.type]:!0}])},null,2),h.createElementVNode("span",GN,h.toDisplayString(e.value),1)]),_:1},8,["effect","hit","type"])}}}),ro=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},$N=ro(zN,[["__scopeId","data-v-efa5516b"]]),YN=["aria-label"],qN={key:0,class:"origin-value","aria-hidden":"true"},jN={key:1,class:"crypto-value","aria-hidden":"true"},WN=h.defineComponent({__name:"SensitiveSwitch",props:{originValue:{},cryptoValue:{},enable:{type:Boolean}},setup(e){const t=e,n=h.ref(!1),r=()=>{t.enable&&(n.value=!0)},i=()=>{t.enable&&(n.value=!1)},o=()=>{t.enable&&(n.value=!0)},a=()=>{t.enable&&(n.value=!1)};return(s,l)=>(h.openBlock(),h.createElementBlock("span",{ref:"switchContainer",class:"sensitive-switch",tabindex:"0",role:"button","aria-label":n.value?`原始值: ${e.originValue}`:`已加密值: ${e.cryptoValue}`,onMouseenter:r,onMouseleave:i,onFocusin:o,onFocusout:a},[n.value?(h.openBlock(),h.createElementBlock("span",qN,h.toDisplayString(e.originValue),1)):(h.openBlock(),h.createElementBlock("span",jN,h.toDisplayString(e.cryptoValue),1))],40,YN))}}),KN=ro(WN,[["__scopeId","data-v-2ae8cf25"]]);var QN={exports:{}};(function(e,t){(function(n,r){e.exports=r(Du)})(sE,function(n){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var i=r(n),o={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(a,s){return s==="W"?a+"周":a+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(a,s){var l=100*a+s;return l<600?"凌晨":l<900?"早上":l<1100?"上午":l<1300?"中午":l<1800?"下午":"晚上"}};return i.default.locale(o,null,!0),o})})(QN);var ZN={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(sE,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(n){var r=["th","st","nd","rd"],i=n%100;return"["+n+(r[(i-20)%10]||r[i]||r[0])+"]"}}})})(ZN);const XN={"zh-CN":"zh-cn","en-US":"en"};function JN(e){Du.locale(XN[e]||"zh-cn")}Qy(JN);function Xu(e,t,n){if(!e)return e;let r;typeof t=="string"?r=new RegExp(t,"g"):r=t;const i=r.global?r:new RegExp(r.source,r.flags+"g");return e.replace(i,n)}function cE(e,t){const n=t||"YYYY-MM-DD";try{const r=Du(e);return r.isValid()?r.format(n):(_e.warn("console.format.invalidDate",{value:e}),"")}catch(r){return _e.error("console.format.dateFormatError",{value:e,format:n},r),""}}function Ju(e,t={}){const{amountThousand:n=!0,amountDecimal:r=!0,amountDigits:i=2,amountUnit:o="",amountUnitPosition:a="left",defaultValue:s="0"}=t,l=parseFloat(String(e));if(isNaN(l)||!isFinite(l))return o?a==="left"?`${o}${s}`:`${s}${o}`:s;const c={};if(c.useGrouping=n,r){const p=Math.max(0,Math.floor(i));c.minimumFractionDigits=p,c.maximumFractionDigits=p}else c.minimumFractionDigits=0,c.maximumFractionDigits=0;let u=new Intl.NumberFormat("en-US",c).format(l);return o&&(a==="left"?u=`${o}${u}`:u=`${u}${o}`),u}function eO(e){return Lt(this,null,function*(){if(!e)return!1;if(navigator.clipboard&&typeof navigator.clipboard.writeText=="function")try{return yield navigator.clipboard.writeText(e),!0}catch(t){}try{const t=document.createElement("textarea");t.style.position="fixed",t.style.top="0",t.style.left="0",t.style.width="1px",t.style.height="1px",t.style.padding="0",t.style.border="none",t.style.outline="none",t.style.boxShadow="none",t.style.background="transparent",t.value=e,document.body.appendChild(t),t.select(),t.setSelectionRange(0,t.value.length);const n=document.execCommand("copy");return document.body.removeChild(t),n}catch(t){return!1}})}function tO(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!h.isVNode(e)}function nO(e){var l,c,d;const{column:t,value:n,emptyValue:r,dictTools:i}=e;if(!t.typeProps)return _e.warn("console.table.dictTypePropsRequired",void 0,t),{value:n||r};let o=[];if(t.typeProps.dictOptions!==void 0?o=vg(t.typeProps.dictOptions)?t.typeProps.dictOptions:[]:t.typeProps.dictName&&(o=i.getDictOptions(t.typeProps.dictName)),t.typeProps.dictIsTree){const u=i.getTreeDictItemLabel(o,n,(l=t.typeProps)==null?void 0:l.dictValueIsPath,(c=t.typeProps)==null?void 0:c.dictLabelFullpath,(d=t.typeProps)==null?void 0:d.dictLabelSeparator);return u?{value:u}:r}const a=o.find(u=>u.value===n),s=(a==null?void 0:a.label)||n;return!a&&!n?r:t.typeProps.dictViewRender!==void 0?{value:s,valueRender:t.typeProps.dictViewRender(e.originValue,s,a)}:t.typeProps.dictViewType&&t.typeProps.dictViewType!=="text"?rO(t.typeProps.dictViewType,s,a):{value:s||r}}function rO(e,t,n){const r={color:(n==null?void 0:n.color)||"",type:(n==null?void 0:n.type)||"primary",hit:(n==null?void 0:n.hit)||!1,effect:(n==null?void 0:n.effect)||"light",round:(n==null?void 0:n.round)||!1};if(e==="tag"){const i=n!=null&&n.icon?h.createVNode(G.ElTag,H(T({},r),{class:"flex flex-row items-center gap-1"}),{default:()=>[h.createVNode(Ut,{icon:n.icon,size:14},null),h.createVNode("span",null,[t])]}):h.createVNode(G.ElTag,r,tO(t)?t:{default:()=>[t]});return{value:t,valueRender:i}}return e==="dot-tag"?{value:t,valueRender:h.createVNode($N,H(T({},r),{value:t}),null)}:{value:t}}function iO(e){const{column:t,value:n,emptyValue:r}=e;if(n===""||n===null||n===void 0)return r;const{amountThousand:i=!1,amountDecimal:o=!0,amountDigits:a=2,amountUnit:s="",amountUnitPosition:l="right"}=t.typeProps||{};return{value:Ju(n,{amountThousand:i,amountDecimal:o,amountDigits:a,amountUnit:s,amountUnitPosition:l,defaultValue:r})}}function oO(e){var o;const{column:t,value:n,emptyValue:r}=e;if(!n)return r;const i=((o=t.typeProps)==null?void 0:o.dateFormat)||"YYYY-MM-DD";return{value:cE(n,i)||r}}function aO(e){var o,a,s,l;const{column:t,originValue:n,emptyValue:r}=e;if(!n)return r;const i=(o=t.typeProps)==null?void 0:o.sensitiveRegex;return i&&vg(i)&&i.length===2?{value:Xu(n,i[0],i[1])}:(a=t.typeProps)!=null&&a.sensitiveType?sO(t.typeProps.sensitiveType,n,(l=(s=t.typeProps)==null?void 0:s.sensitiveHover)!=null?l:!1):(_e.warn("console.table.sensitiveTypeRequired",void 0,t),r)}function sO(e,t,n){const i={phone:{regex:/(\d{3})\d{4}(\d{4})/,replacement:"$1****$2"},idCard:{regex:/^(\d{3})(\d{11})([0-9Xx]{4})$/,replacement:"$1********$3"},email:{regex:/(.+)@(.+\..+)/,replacement:"***@$2"}}[e];if(!i)return _e.warn("console.table.noDesensitizationMethod",{type:e}),{value:t};const o=Xu(t,i.regex,i.replacement);return{value:o,valueRender:h.createVNode(KN,{originValue:t,cryptoValue:o,enable:n},null)}}function Ac(e,t){var v,y,b,E;const{props:n,column:r,row:i,index:o,emit:a}=e;if(typeof t=="string"||typeof t=="object"&&"type"in t)return t;const{value:s,valueRender:l}=t,c=LN(n,r,i,o),d=PN(n,r,i,o);if(!c&&!d||!s&&s!==0)return l!==void 0?l:s;const u=(y=(v=r.ellipsis)!=null?v:n.ellipsis)!=null?y:!1,p=(E=(b=r.align)!=null?b:n.align)!=null?E:"left",m=p==="left"?"justify-start":p==="right"?"justify-end":"justify-center",f=u?"text-ellipsis overflow-hidden text-nowrap":"",_=d?"clickable-text":"",g=()=>{if(!c)return;const C=r.copyValueMethod!==void 0?r.copyValueMethod(i,o,r,n.form,n.excontext,n.editable):e.originValue;eO(C).then(N=>{N?G.ElMessage.success(ve("table.copy.success")):G.ElMessage.error(ve("table.copy.failed"))})},S=()=>{if(!d)return;const C=r.key||r.field;a("value-click",C,i),r.clickMethod!==void 0&&r.clickMethod(i,o,r,n.form,n.excontext,n.editable)};return h.createVNode("div",{class:`ae-table-cell-value w-full flex flex-row items-center gap-2.5 ${m}`},[c&&h.createVNode(G.ElIcon,{class:"ae-table-cell-value__icon copyable-icon",onClick:()=>g()},{default:()=>[h.createVNode(zC,null,null)]}),h.createVNode("div",{class:`ae-table-cell-value__text flex-1 ${f} ${_}`,onClick:()=>S()},[l||s])])}function lO(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!h.isVNode(e)}function cO(e){var p,m,f;const{column:t,row:n,index:r,props:i}=e;if(!((p=t.typeProps)!=null&&p.actions)||!Array.isArray(t.typeProps.actions)||t.typeProps.actions.length===0)return _e.warn("console.table.actionTypeRequired",void 0,t),i.emptyValue||"-";const o=t.typeProps.actions.filter(_=>!DN(_,n,r,i,t)),{normalActions:a,dropdownActions:s}=dO(o),l=s.length>1,c=(f=(m=t.align)!=null?m:i.align)!=null?f:"left",d=_O(c),u=uO(e,s);return h.createVNode("div",{class:`ae-table-cell-value w-full flex flex-row items-center gap-2 ${d}`},[a.length>0&&a.map(_=>pO(_,u.handleClick,e)),l&&fO(t,s,u.handleCommand,e)])}function dO(e){const t=e.filter(r=>r.dropdown&&["always","auto"].includes(r.dropdown));return{normalActions:e.filter(r=>!r.dropdown||r.dropdown==="never"),dropdownActions:t}}function uO(e,t){const{row:n,index:r,column:i,props:o,emit:a}=e,s=(c,d)=>{a("action",{name:c,row:n,index:r});try{d==null||d(n,r,i,o.form,o.excontext,o.editable)}catch(u){_e.error("console.table.actionEventError",void 0,u,i)}};return{handleClick:s,handleCommand:c=>{const d=t.find(u=>u.name===c);d?s(d.name,d.event):_e.warn("console.table.actionNotFound",{command:c},i)}}}function pO(e,t,n){const r=mO(e,n);return h.createVNode(G.ElButton,T({onClick:()=>t(e.name,e.event)},r),{default:()=>[!e.noIcon&&e.icon&&h.createVNode(Ut,{icon:e.icon,size:14},null),!e.noLabel&&e.label&&h.createVNode("span",null,[e.label])]})}function mO(e,t){const{row:n,index:r,props:i,column:o}=t,a=H(T({type:"default"},e.buttonAttrs||{}),{disabled:lE(e,n,r,i,o),loading:kN(e,n,r,i,o)});switch(e.type){case"primary":a.type="primary";break;case"second":a.type="primary",a.plain=!0;break;default:a.type="default";break}return a}function fO(e,t,n,r){return h.createVNode(G.ElDropdown,{onCommand:i=>n(i)},{default:()=>{var i,o,a;return h.createVNode(G.ElButton,{type:"default",size:(a=(o=(i=e==null?void 0:e.typeProps)==null?void 0:i.actionDropdown)==null?void 0:o.size)!=null?a:"default"},{default:()=>{var s,l,c,d;return[!((l=(s=e==null?void 0:e.typeProps)==null?void 0:s.actionDropdown)!=null&&l.noIcon)&&h.createVNode(Ut,{icon:"icon-park-outline:more",size:14},null),!((d=(c=e==null?void 0:e.typeProps)==null?void 0:c.actionDropdown)!=null&&d.noLabel)&&h.createVNode("span",null,[ve("table.action.more")])]}})},dropdown:()=>{let i;return h.createVNode(G.ElDropdownMenu,null,lO(i=t.map(o=>hO(o,r)))?i:{default:()=>[i]})}})}function hO(e,t){const{row:n,index:r,props:i,column:o}=t;return h.createVNode(G.ElDropdownItem,{command:e.name,disabled:lE(e,n,r,i,o)},{default:()=>[e.icon&&h.createVNode(Ut,{icon:e.icon,size:14},null),h.createVNode("span",null,[e.label])]})}function _O(e){return{left:"justify-start",center:"justify-center",right:"justify-end"}[e]||"justify-start"}function gO(e,t,n,r,i,o,a,s,l){var y,b,E,C;const c=((y=o==null?void 0:o.editProps)==null?void 0:y.component)||"Input",d=((b=o.editProps)==null?void 0:b.field)||o.field,u=`${o.key||d}-${i}-${((C=(E=o.editProps)==null?void 0:E.componentProps)==null?void 0:C.freshKey)||0}`,p={prop:`${i}.${d}`,rules:_()},m=()=>{if(Hr(s,c))return s[c]};function f(){var N;if(d){const R=Hr(s,c)&&((N=l[c])==null?void 0:N.modelValueKey)||"modelValue";return{[R]:We.get(r,d),[`onUpdate:${R}`]:O=>{Rd(r,d,O)}}}return{}}function _(){var N,R,O,w,x;if((O=(R=(N=o.editProps)==null?void 0:N.formItemProps)==null?void 0:R.autoRules)!=null&&O.length){const I=[],M=ku();if(o.editProps.formItemProps.autoRules.forEach(L=>{if(M[L]!==void 0){const B=Object.assign({},M[L]);B.message=B.message.replace("{label}",o.label||o.field),I.push(B)}}),I.length)return I}return((x=(w=o.editProps)==null?void 0:w.formItemProps)==null?void 0:x.rules)||[]}function g(){var R,O,w;let N={};return N=H(T(T(T(T({style:{width:"100%"}},EO(o)),((R=o.editProps)==null?void 0:R.componentProps)||{}),bO(r,i,o,((O=o.editProps)==null?void 0:O.componentProps)||{},a,e)),vO(o,((w=o.editProps)==null?void 0:w.componentProps)||{})),{disabled:MN(e,o,r,i)}),delete N.optionKeys,N}function S(){var N,R;if((N=o.editProps)!=null&&N.componentEvent){const O={};return Object.keys((R=o.editProps)==null?void 0:R.componentEvent).forEach(w=>{var I;const x=(I=o.editProps)==null?void 0:I.componentEvent[w];Je(x)&&(O[w]=yO(x,r,i,o,a,e.excontext))}),O}return{}}function v(){var O,w;const N={},R=((w=(O=o.editProps)==null?void 0:O.insideProps)==null?void 0:w.renders)||{};for(const x in R){const I=R[x];Je(I)?N[x]=()=>I(r,i,o,a,e.excontext,e.editable):typeof I=="string"&&(N[x]=()=>I)}return N}return{getAnyComponent:m,setModelValue:f,setComponentProps:g,setComponentEvent:S,setInsideRenders:v,field:d,freshKey:u,formItemProps:p,componentName:c}}function EO(e,t){var o;const n=["Autocomplete","Editor","Input","InputNumber","Mention"],r=["Cascader","DatePicker","Select","TimePicker","TimeSelect"],i=((o=e.editProps)==null?void 0:o.component)||"Input";if(n.includes(i))return{placeholder:vm(ve("form.placeholder.input"),(e==null?void 0:e.label)||"")};if(r.includes(i)){const a=vm(ve("form.placeholder.select"),(e==null?void 0:e.label)||"");return{startPlaceholder:ve("form.placeholder.startDate"),endPlaceholder:ve("form.placeholder.endDate"),rangeSeparator:"-",placeholder:a}}return{}}function bO(e,t,n,r,i,o){if(Reflect.has(r,"options")){const a=T(T({disabled:"disabled",children:"children",value:"value",label:"label"},(r==null?void 0:r.optionKeys)||{}),(r==null?void 0:r.props)||{});if(typeof r.options=="function")return{options:r.options(e,t,n,i,o.excontext,o.editable),props:a};if(Array.isArray(r.options))return{options:r.options,props:a}}return{}}const SO=["years","months","dates","datetimerange","daterange","monthrange","yearrange"];function vO(e,t){var r;return(((r=e.editProps)==null?void 0:r.component)||"Input")==="DatePicker"&&t.type&&SO.includes(t.type)?t.defaultTime?{defaultTime:t.defaultTime}:{defaultTime:[new Date().setHours(0,0,0,0),new Date().setHours(23,59,59,999)]}:{}}function yO(e,t,n,r,i,o){return typeof e=="function"?a=>e(a,t,n,r,i,o):()=>{}}function CO(e){const{props:t,slots:n,emit:r,column:i,row:o,index:a,components:s,componentConfigs:l}=e,{field:c,freshKey:d,formItemProps:u,getAnyComponent:p,setModelValue:m,setComponentProps:f,setComponentEvent:_,setInsideRenders:g}=gO(t,n,r,o,a,i,t.form,s,l);c||_e.warn("console.table.editFieldRequired",void 0,i);const S=()=>{const v=p();return v===void 0?(_e.error("console.table.editComponentError",void 0,i),TO(i)):h.createVNode(v,H(T(T(T({},m()),f()),_()),{key:d}),T({},g()))};return h.createVNode(G.ElFormItem,u,{default:()=>S()})}function TO(e){var t;return h.createVNode("div",{class:"ae-table-edit-error",style:"color: #f56c6c; font-size: 12px;"},[h.createTextVNode("组件配置错误: "),((t=e.editProps)==null?void 0:t.component)||"Unknown"])}function NO(e,t,n,r,i,o,a,s,l){if(e.columns&&e.columns.length){const c=e.columns.filter(E=>(E.visible===void 0?!0:E.visible)?!Xm(e,E):!1),d=c.find(E=>E.type==="expand"),u=c.find(E=>E.type==="selection"),p=c.find(E=>E.type==="radio"),m=E=>p?h.createVNode(G.ElTableColumn,{label:E.label||"",align:E.align||e.align||"center",headerAlign:E.headerAlign||e.headerAlign||"center",width:E.width||50,"column-key":E.key||"radio"},{default:C=>{const N=e.rowKey?r.value[e.rowKey]===C.row[e.rowKey]:!1,R=()=>{r.value=C.row};return h.createVNode(G.ElRadio,{"model-value":N,onChange:R},null)}}):void 0,f=E=>{var N;const C=(R,O)=>{var w,x;return((w=E.typeProps)==null?void 0:w.selectable)!==void 0?(x=E.typeProps)==null?void 0:x.selectable(R,O,E,e.form,e.excontext,e.editable):!0};return u?h.createVNode(G.ElTableColumn,{label:E.label||"",type:"selection",reserveSelection:((N=E.typeProps)==null?void 0:N.reserveSelection)||!1,align:E.align||e.align||"center",headerAlign:E.headerAlign||e.headerAlign||"center",width:E.width||50,selectable:C,"column-key":E.key||"selection"},null):void 0},_=E=>d?h.createVNode(G.ElTableColumn,{label:E.label||"",type:"expand",width:E.width||50,align:E.align||e.align||"center",headerAlign:E.headerAlign||e.headerAlign||"center","column-key":E.key||"expand"},{default:C=>bn(t,"expand",C)}):void 0,g=(E,C,N)=>Jm(e,E)?CO({props:e,slots:t,emit:n,column:E,row:C,index:N,components:s,componentConfigs:l}):S(E,C,N),S=(E,C,N)=>{const R=E.emptyValue||e.emptyValue||"",O=E.field?C[E.field]:"",x={props:e,column:E,row:C,index:N,value:O,originValue:O,emptyValue:R,dictTools:a,emit:n};if(E.type==="default"||!E.type){if(E.render!==void 0)return E.render(C,N,E,e.form,e.excontext,e.editable);if(E.formatter!==void 0){const M=E.formatter(C,N,E,e.form,e.excontext,e.editable);return Ac(x,{value:M})}return Ac(x,{value:O||R})}const I=v(x);return Ac(x,I)},v=E=>{const{column:C,emptyValue:N}=E;switch(C.type){case"dict":return nO(E);case"amount":return iO(E);case"date":return oO(E);case"sensitive":return aO(E);case"action":return cO({props:E.props,column:E.column,row:E.row,index:E.index,emit:E.emit});default:return _e.warn("console.table.unknownColumnType",{type:C.type},C),{value:N}}},y=E=>{var N,R,O,w,x,I,M,L,B;const C=E.key||E.field;if(C||_e.warn("console.table.columnMissingKey",{label:E.label||""},E),(E==null?void 0:E.type)==="index"){const D=A=>{var k,P,V;return((k=E.typeProps)==null?void 0:k.index)!==void 0?(P=E.typeProps)==null?void 0:P.index:IN(((V=E.typeProps)==null?void 0:V.reserveIndex)||!0,A,i.value||10,o.value||1)};return h.createVNode(G.ElTableColumn,{type:"index",index:A=>D(A),align:(R=(N=E.align)!=null?N:e.align)!=null?R:"center",headerAlign:(w=(O=E.headerAlign)!=null?O:e.headerAlign)!=null?w:"center",fixed:(x=E.fixed)!=null?x:!1,label:(I=E.label)!=null?I:"",width:(M=E.width)!=null?M:70,minWidth:(L=E.minWidth)!=null?L:70,"column-key":(B=E.key)!=null?B:"index"},null)}if(E.children&&E.children.length>0){const D=E.children.filter(A=>(A.visible===void 0?!0:A.visible)?!Xm(e,A):!1);return h.createVNode(G.ElTableColumn,{align:E.align||e.align||"center",headerAlign:E.headerAlign||e.headerAlign||"center",className:"ae-table-column-parent"},{default:()=>b(D),header:()=>bn(t,`${C}--header`)||h.createVNode(Zm,{title:E.label,subtitle:E.subLabel},null)})}else{const D=H(T({showOverflowTooltip:E.ellipsis||e.ellipsis||!1,align:E.align||e.align||"center",headerAlign:E.headerAlign||e.headerAlign||"center",fixed:E.fixed||!1,width:E.width||"",minWidth:E.minWidth||"",prop:E.field||""},E.columnAttrs||{}),{className:Jm(e,E)?"ae-table-column-editable":"ae-table-column"});return h.createVNode(G.ElTableColumn,D,{default:A=>bn(t,E.field,A)||g(E,A.row,A.$index),header:()=>{var A;return bn(t,`${C}-header`)||((A=E.headerRender)==null?void 0:A.call(E,{},null,E,e.form,e.excontext,e.editable))||h.createVNode(Zm,{title:E.label,subtitle:E.subLabel},null)}})}},b=E=>E.filter(C=>!(C.type&&["expand","selection","radio"].includes(C.type))).map(C=>y(C));return[m(p),f(u),_(d)].concat([b(c)])}else return}function OO(e,t,n,r,i,o,a,s,l,c,d,u,p,m,f){const _=()=>Reflect.has(t,"append")||d.value&&d.value.length>0,g=()=>{if(d.value&&d.value.length>0){const v=ve("table.selection.selected"),y=ve("table.selection.items");return h.createVNode("div",{class:"ae-table-append"},[h.createVNode("div",{class:"ae-table-append-selection"},[v,h.createTextVNode(" "),h.createVNode("span",{class:"total"},[d.value.length]),h.createTextVNode(" "),y])])}else return},S=()=>{const v=`ae-table-main ${_()?"has-append":""}`,y=h.createVNode(G.ElTable,T({ref:a,key:e.freshKey,data:e.modelValue,"onSelection-change":c.handleSelectionChange,"onCurrent-change":c.handleCurrentChange,"onRow-click":c.handleRowClick,"header-row-class-name":"ae-table-header","summary-method":e.showSummary?u:void 0,class:v},h.unref(l)),{default:()=>NO(e,t,n,r,i,o,p,m,f),append:()=>bn(t,"append")||g()});return h.withDirectives(y,[[G.vLoading,e.loading]])};return e.editable?h.createVNode(G.ElForm,{class:"ae-table-form",ref:s,model:e.modelValue},{default:()=>S()}):S()}function AO(e,t){const n=h.ref(e.pageSize),r=h.ref(e.page),i=h.computed(()=>Object.assign({background:!1,layout:"total, sizes, prev, pager, next, jumper",pageSizes:[10,20,30,40,50,100],disabled:!1,hideOnSinglePage:!1,total:10},h.unref(e).pagination));function o(){const a=h.watch(()=>n.value,d=>{t("update:pageSize",d)}),s=h.watch(()=>r.value,d=>{t("update:page",d)}),l=h.watch(()=>h.unref(e).pageSize,d=>{n.value=d}),c=h.watch(()=>h.unref(e).page,d=>{r.value=d});return()=>{a(),s(),l(),c()}}return{pageSizeRef:n,currentPageRef:r,pagination:i,watchPage:o}}function dE(e){function t(s){return s in e}function n(s){return t(s)?e[s]:[]}function r(s,l){return n(s).find(u=>u.value===l)||{label:"",value:l}}function i(s,l){return r(s,l).label||""}function o(s,l,c){return this.getDictItem(s,l)[c]||""}function a(s,l,c=!0,d=!0,u=" / "){const p=typeof s=="string"?n(s):s;if(l==null||l==="")return"";const m=b=>{var E,C;return b&&((C=b.label)!=null?C:String((E=b.value)!=null?E:""))},f=(b,E)=>String(b)===String(E);let _=null;if(Array.isArray(l)?_=l.map(b=>String(b)):c&&(_=String(l).split(",").map(b=>b.trim()).filter(b=>b.length>0)),_){const b=[];let E=p;for(const C of _){if(!E||E.length===0)break;const N=E.find(R=>f(R.value,C));if(!N)break;b.push(m(N)),E=N.children||[]}return b.length===0?"":d?b.join(u):b[b.length-1]}const g=String(l),S=[];let v=!1;const y=b=>{if(!b||b.length===0)return!1;for(const E of b){if(S.push(m(E)),f(E.value,g))return v=!0,!0;if(E.children&&E.children.length>0&&y(E.children))return!0;S.pop()}return!1};return y(p),!v||S.length===0?"":d?S.join(u):S[S.length-1]}return{isExistName:t,getDictOptions:n,getDictItem:r,getDictItemLabel:i,getDictItemProp:o,getTreeDictItemLabel:a}}function ef(){return`${Date.now()}-${Math.random().toString(36).substring(2,9)}`}function uE(e){if(typeof e=="number")return e;const t={B:1,KB:1024,MB:1024*1024,GB:1024*1024*1024},n=e.match(/^(\d+(?:\.\d+)?)(B|KB|MB|GB)?$/i);if(!n)return 0;const r=parseFloat(n[1]),i=(n[2]||"B").toUpperCase();return r*(t[i]||1)}function RO(e){if(e===0)return"0 B";const t=1024,n=["B","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return`${(e/Math.pow(t,r)).toFixed(2)} ${n[r]}`}function Ds(e){const t=e.match(/\.([^./?#]+)(?:[?#]|$)/i);return t?t[1].toLowerCase():""}function Rc(e,t){const n=["jpg","jpeg","png","gif","bmp","webp","svg"];if(t){const i=Ds(t);if(i)return n.includes(i)}const r=Ds(e);return n.includes(r)}function tf(e,t){let n="";return t&&(n=Ds(t)),n||(n=Ds(e)),{pdf:"material-icon-theme:pdf",doc:"material-icon-theme:word",docx:"material-icon-theme:word",xls:"material-icon-theme:table",xlsx:"material-icon-theme:table",csv:"material-icon-theme:table",ppt:"material-icon-theme:powerpoint",pptx:"material-icon-theme:powerpoint",md:"material-icon-theme:markdoc-config",txt:"material-icon-theme:document",yml:"material-icon-theme:yaml",json:"material-icon-theme:json",zip:"material-icon-theme:zip",rar:"solar:winrar-bold-duotone","7z":"hugeicons:7z-02",html:"material-icon-theme:html",htm:"material-icon-theme:html",jsx:"file-icons:jsx-alt",tsx:"file-icons:tsx-alt",vue:"material-icon-theme:vue-config",ts:"material-icon-theme:typescript",js:"material-icon-theme:javascript",py:"devicon:python",java:"devicon:java",go:"devicon:go-wordmark",rs:"devicon:rust",php:"devicon:php",sh:"file-icons:powershell",bash:"file-icons:powershell",sql:"devicon:mysql-wordmark",db:"",git:"devicon:git",css:"devicon:css3",psd:"material-icon-theme:adobe-photoshop-light",ai:"material-icon-theme:adobe-illustrator-light",mp3:"teenyicons:mp3-solid",mp4:"teenyicons:mp4-solid",mov:"teenyicons:mov-solid",avi:"lsicon:file-avi-outline",wav:"hugeicons:wav-01",png:"fluent-color:image-16",jpg:"fluent-color:image-16",jpeg:"fluent-color:image-16",bmp:"fluent-color:image-16",svg:"fluent-color:image-16",gif:"fluent-color:image-16",tiff:"fluent-color:image-16",webp:"fluent-color:image-16",ico:"fluent-color:image-16"}[n]||"material-icon-theme:document"}function nf(e,t,n){return e&&e[t[n]]||""}function wO(e,t){if(!t)return!0;const n=uE(t);return e.size<=n}function pE(e){return e.type.startsWith("image/")}function xO(e,t=.8,n=1920,r=1920){return new Promise((i,o)=>{if(!pE(e)){i(e);return}const a=new FileReader;a.readAsDataURL(e),a.onload=s=>{var c;const l=new Image;l.src=(c=s.target)==null?void 0:c.result,l.onload=()=>{const d=document.createElement("canvas"),u=d.getContext("2d");if(!u){o(new Error("无法获取 canvas context"));return}let{width:p,height:m}=l;if(p>n||m>r){const f=Math.min(n/p,r/m);p=p*f,m=m*f}d.width=p,d.height=m,u.drawImage(l,0,0,p,m),d.toBlob(f=>{if(!f){o(new Error("图片压缩失败"));return}const _=new File([f],e.name,{type:e.type||"image/jpeg",lastModified:Date.now()});_.size>=e.size?i(e):i(_)},e.type||"image/jpeg",t)},l.onerror=()=>{o(new Error("图片加载失败"))}},a.onerror=()=>{o(new Error("文件读取失败"))}})}const IO={key:0,class:"ae-upload__header"},DO={class:"ae-upload__link"},kO={class:"ae-upload__item-content"},MO=["src","onClick","onError"],LO=["onClick"],PO={class:"ae-upload__file-name"},FO={key:2,class:"ae-upload__loading"},BO={key:3,class:"ae-upload__mask"},UO={class:"ae-upload__item-name"},HO={key:1,class:"ae-upload__item-actions"},VO={key:1,class:"ae-upload__tips"},GO=["accept","multiple"],zO=h.defineComponent({name:"AeUpload",__name:"Upload",props:{modelValue:{default:()=>[]},fileKeys:{default:()=>({name:"name",url:"url"})},upload:{},multiple:{type:Boolean,default:!1},accept:{},limit:{},size:{default:"default"},sizeLimit:{},disabled:{type:Boolean,default:!1},listType:{default:"picture"},objectFit:{default:"cover"},examples:{},templates:{},tips:{},autoCompress:{type:Boolean,default:!1},previewable:{type:Boolean,default:!0},downloadable:{type:Boolean,default:!1},preview:{},downloadFile:{},beforeUpload:{},beforeRemove:{},downloadTemplate:{}},emits:["update:modelValue","change","upload","remove","preview"],setup(e,{emit:t}){const n=e,r=t,i=h.ref(),o=h.ref([]),a=h.ref(!1),s=h.ref([]),l=h.ref(0),c=h.computed(()=>n.disabled?!1:n.limit?o.value.filter(w=>w.status==="success").length<n.limit:!0),d=h.computed(()=>({small:16,default:20,large:24})[n.size]),u=h.computed(()=>({small:24,default:48,large:96})[n.size]),p=h.computed(()=>({small:18,default:20,large:22})[n.size]);h.watch(()=>n.modelValue,w=>{w&&(o.value=w.map(x=>({uid:ef(),status:"success",data:x,imageLoadError:!1})))},{immediate:!0,deep:!0});function m(w){return nf(w,n.fileKeys,"name")}function f(w){return nf(w,n.fileKeys,"url")}function _(){var w;(w=i.value)==null||w.click()}function g(w){return Lt(this,null,function*(){const x=w.target,I=Array.from(x.files||[]);if(I.length){if(n.limit){const M=o.value.filter(B=>B.status==="success").length,L=n.limit-M;I.length>L&&(G.ElMessage.warning(ve("upload.fileCountLimit",{limit:n.limit})),I.splice(L))}for(const M of I)yield S(M);x.value=""}})}function S(w){return Lt(this,null,function*(){let x=w;if(x.uid=ef(),n.beforeUpload)try{if((yield n.beforeUpload(x))===!1)return}catch(M){return}if(n.autoCompress&&pE(x))try{const M=yield xO(x),L=x.uid;x=M,x.uid=L}catch(M){_e.error("console.upload.compressError",void 0,M)}if(n.sizeLimit&&!wO(x,n.sizeLimit)){const M=uE(n.sizeLimit);G.ElMessage.error(ve("upload.fileSizeLimit",{size:RO(M)}));return}const I={uid:x.uid,status:"uploading",rawFile:x,data:{},imageLoadError:!1};if(o.value.push(I),!n.upload){G.ElMessage.error(ve("upload.uploadFunctionRequired")),o.value=o.value.filter(M=>M.uid!==I.uid);return}try{const M=yield n.upload(x);M===!1?o.value=o.value.filter(L=>L.uid!==I.uid):(I.status="success",I.data=M,R(),r("upload",M),r("change",N()))}catch(M){console.error("[AeUpload] exception in upload:",M),o.value=o.value.filter(L=>L.uid!==I.uid)}})}function v(w){return Lt(this,null,function*(){if(w.data){if(n.beforeRemove)try{if((yield n.beforeRemove(w.data))===!1)return}catch(x){return}o.value=o.value.filter(x=>x.uid!==w.uid),R(),r("remove",w.data),r("change",N())}})}function y(w){if(n.preview){n.preview(w);return}const x=f(w),I=m(w);if(Rc(x,I)){const M=o.value.filter(L=>L.data&&Rc(f(L.data),m(L.data))).map(L=>f(L.data));s.value=M,l.value=M.indexOf(x),a.value=!0}else G.ElMessage.info(ve("upload.previewNotSupported")),r("preview",w)}function b(){var w;(w=n.examples)!=null&&w.length&&(s.value=n.examples.map(x=>x.url),l.value=0,a.value=!0)}function E(w){n.downloadTemplate?n.downloadTemplate(w):window.open(w.url,"_blank")}function C(w){if(n.downloadFile){n.downloadFile(w);return}const x=f(w);if(!x){G.ElMessage.warning(ve("upload.downloadNotSupported"));return}const I=document.createElement("a");I.href=x,I.download=m(w)||"download",I.target="_blank",document.body.appendChild(I),I.click(),document.body.removeChild(I)}function N(){return o.value.filter(w=>w.status==="success"&&w.data).map(w=>w.data)}function R(){r("update:modelValue",N())}function O(w){w.imageLoadError=!0}return(w,x)=>{var I,M,L,B;return h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["ae-upload",`ae-upload--${e.size}`])},[(I=e.examples)!=null&&I.length||(M=e.templates)!=null&&M.length?(h.openBlock(),h.createElementBlock("div",IO,[(L=e.examples)!=null&&L.length?(h.openBlock(),h.createElementBlock("span",{key:0,class:"ae-upload__link",onClick:b}," 查看示例 ")):h.createCommentVNode("",!0),(B=e.templates)!=null&&B.length?(h.openBlock(),h.createBlock(h.unref(G.ElDropdown),{key:1,onCommand:E},{dropdown:h.withCtx(()=>[h.createVNode(h.unref(G.ElDropdownMenu),null,{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(e.templates,(D,A)=>(h.openBlock(),h.createBlock(h.unref(G.ElDropdownItem),{key:A,command:D},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(D.name),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:h.withCtx(()=>[h.createElementVNode("span",DO,[x[1]||(x[1]=h.createTextVNode(" 下载模板 ",-1)),h.createVNode(h.unref(G.ElIcon),{class:"el-icon--right"},{default:h.withCtx(()=>[h.createVNode(h.unref(HC))]),_:1})])]),_:1})):h.createCommentVNode("",!0)])):h.createCommentVNode("",!0),h.createElementVNode("div",{class:h.normalizeClass(["ae-upload__list",`ae-upload__list--${e.listType}`])},[e.listType==="picture"?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(o.value,D=>(h.openBlock(),h.createElementBlock("div",{key:D.uid,class:"ae-upload__item ae-upload__item--picture"},[h.createElementVNode("div",kO,[D.data&&h.unref(Rc)(f(D.data),m(D.data))&&!D.imageLoadError?(h.openBlock(),h.createElementBlock("img",{key:0,src:f(D.data),alt:"",style:h.normalizeStyle({objectFit:e.objectFit}),class:"ae-upload__image",onClick:A=>y(D.data),onError:A=>O(D)},null,44,MO)):(h.openBlock(),h.createElementBlock("div",{key:1,class:"ae-upload__file-icon",onClick:A=>D.data&&y(D.data)},[h.createVNode(h.unref(Ut),{size:u.value,icon:h.unref(tf)(f(D.data),m(D.data))},null,8,["size","icon"]),h.createElementVNode("div",PO,h.toDisplayString(D.data?m(D.data):""),1)],8,LO)),D.status==="uploading"?(h.openBlock(),h.createElementBlock("div",FO,[h.createVNode(h.unref(G.ElIcon),{class:"is-loading"},{default:h.withCtx(()=>[h.createVNode(h.unref(xm))]),_:1})])):h.createCommentVNode("",!0),D.status==="success"?(h.openBlock(),h.createElementBlock("div",BO,[e.previewable?(h.openBlock(),h.createBlock(h.unref(G.ElIcon),{key:0,onClick:A=>D.data&&y(D.data)},{default:h.withCtx(()=>[h.createVNode(h.unref(Im))]),_:1},8,["onClick"])):h.createCommentVNode("",!0),e.downloadable&&e.disabled?(h.openBlock(),h.createBlock(h.unref(G.ElIcon),{key:1,onClick:A=>D.data&&C(D.data)},{default:h.withCtx(()=>[h.createVNode(h.unref(wm))]),_:1},8,["onClick"])):h.createCommentVNode("",!0),e.disabled?h.createCommentVNode("",!0):(h.openBlock(),h.createBlock(h.unref(G.ElIcon),{key:2,onClick:A=>v(D)},{default:h.withCtx(()=>[h.createVNode(h.unref(YC))]),_:1},8,["onClick"]))])):h.createCommentVNode("",!0)])]))),128)),c.value?(h.openBlock(),h.createElementBlock("div",{key:0,class:"ae-upload__trigger ae-upload__trigger--picture",onClick:_},[h.createVNode(h.unref(G.ElIcon),{size:d.value},{default:h.withCtx(()=>[h.createVNode(h.unref(KC))]),_:1},8,["size"])])):h.createCommentVNode("",!0)],64)):(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(o.value,D=>(h.openBlock(),h.createElementBlock("div",{key:D.uid,class:"ae-upload__item ae-upload__item--text"},[h.createVNode(h.unref(Ut),{class:"ae-upload__item-icon",size:p.value,icon:h.unref(tf)(f(D.data),m(D.data))},null,8,["size","icon"]),h.createElementVNode("span",UO,h.toDisplayString(D.data?m(D.data):""),1),D.status==="uploading"?(h.openBlock(),h.createBlock(h.unref(G.ElIcon),{key:0,class:"ae-upload__item-loading is-loading"},{default:h.withCtx(()=>[h.createVNode(h.unref(xm))]),_:1})):h.createCommentVNode("",!0),D.status==="success"?(h.openBlock(),h.createElementBlock("div",HO,[e.previewable?(h.openBlock(),h.createBlock(h.unref(G.ElIcon),{key:0,class:"ae-upload__item-action",onClick:A=>D.data&&y(D.data)},{default:h.withCtx(()=>[h.createVNode(h.unref(Im))]),_:1},8,["onClick"])):h.createCommentVNode("",!0),e.downloadable&&e.disabled?(h.openBlock(),h.createBlock(h.unref(G.ElIcon),{key:1,class:"ae-upload__item-action",onClick:A=>D.data&&C(D.data)},{default:h.withCtx(()=>[h.createVNode(h.unref(wm))]),_:1},8,["onClick"])):h.createCommentVNode("",!0),e.disabled?h.createCommentVNode("",!0):(h.openBlock(),h.createBlock(h.unref(G.ElIcon),{key:2,class:"ae-upload__item-delete",onClick:A=>v(D)},{default:h.withCtx(()=>[h.createVNode(h.unref(xd))]),_:1},8,["onClick"]))])):h.createCommentVNode("",!0)]))),128)),c.value?(h.openBlock(),h.createElementBlock("div",{key:0,class:"ae-upload__trigger ae-upload__trigger--text",onClick:_},[h.createVNode(h.unref(G.ElIcon),null,{default:h.withCtx(()=>[h.createVNode(h.unref(ZC))]),_:1}),x[2]||(x[2]=h.createElementVNode("span",null,"点击上传",-1))])):h.createCommentVNode("",!0)],64))],2),e.tips||w.$slots.tip?(h.openBlock(),h.createElementBlock("div",VO,[h.renderSlot(w.$slots,"tip",{},()=>[h.createTextVNode(h.toDisplayString(e.tips),1)],!0)])):h.createCommentVNode("",!0),h.createElementVNode("input",{ref_key:"inputRef",ref:i,type:"file",class:"ae-upload__input",accept:e.accept,multiple:e.multiple,onChange:g},null,40,GO),a.value?(h.openBlock(),h.createBlock(h.unref(G.ElImageViewer),{key:2,"url-list":s.value,"initial-index":l.value,onClose:x[0]||(x[0]=D=>a.value=!1)},null,8,["url-list","initial-index"])):h.createCommentVNode("",!0)],2)}}}),$O=ro(zO,[["__scopeId","data-v-a8c32fec"]]),Ul=Wn($O),YO={Autocomplete:G.ElAutocomplete,Cascader:G.ElCascader,Checkbox:G.ElCheckboxGroup,DatePicker:G.ElDatePicker,Input:G.ElInput,InputNumber:G.ElInputNumber,InputTag:G.ElInputTag,Mention:G.ElMention,Radio:G.ElRadioGroup,Select:G.ElSelect,Slider:G.ElSlider,Switch:G.ElSwitch,TimePicker:G.ElTimePicker,TimeSelect:G.ElTimeSelect,TreeSelect:G.ElTreeSelect,Upload:Ul},qO={Checkbox:()=>!0,InputTag:()=>!0,Select:e=>!!e.multiple,TreeSelect:e=>!!e.multiple,TimePicker:e=>!!e.isRange,DatePicker:e=>["years","months","dates","datetimerange","daterange","monthrange","yearrange"].includes(e.type),Cascader:e=>{const t=T({multiple:!1,emitPath:!0},e.props);return!(t.multiple===!1&&t.emitPath===!1)}};class jO{constructor(){xr(this,"components",h.shallowReactive({}));xr(this,"componentConfigs",h.shallowReactive({}));xr(this,"arrayStrategies",h.shallowReactive({}))}registerComponents(t){t.forEach(n=>{this.registerComponent(n.name,n.component,n.config,n.isArrayFn)})}registerComponent(t,n,r,i){this.components[t]&&_e.warn("console.form.componentExists",{name:t}),this.components[t]=n,r&&(this.componentConfigs[t]&&_e.warn("console.form.configExists",{name:t}),this.componentConfigs[t]=r),i&&(this.arrayStrategies[t]=i),_e.success("console.form.componentRegistered",{name:t})}}class WO{constructor(){xr(this,"components",h.shallowReactive({}));xr(this,"componentConfigs",h.shallowReactive({}));xr(this,"arrayStrategies",h.shallowReactive({}))}registerComponents(t){t.forEach(n=>{this.registerComponent(n.name,n.component,n.config,n.isArrayFn)})}registerComponent(t,n,r,i){this.components[t]&&_e.warn("console.table.componentExists",{name:t}),this.components[t]=n,r&&(this.componentConfigs[t]&&_e.warn("console.table.configExists",{name:t}),this.componentConfigs[t]=r),i&&(this.arrayStrategies[t]=i),_e.success("console.table.componentRegistered",{name:t})}}const vs=new jO,ys=new WO;function KO(e=[]){const t=h.shallowReactive(T(T({},YO),ys.components)),n=h.shallowReactive(T({},ys.componentConfigs)),r=h.shallowReactive(T(T({},qO),ys.arrayStrategies));return e.forEach(i=>{t[i.name]&&_e.warn("console.table.componentExists",{name:i.name}),t[i.name]=i.component,i.config&&(n[i.name]=i.config),i.isArrayFn&&(r[i.name]=i.isArrayFn),_e.success("console.table.componentRegistered",{name:i.name})}),{components:t,arrayStrategies:r,componentConfigs:n}}const QO=1,ZO=10,XO="id",JO="-",eA=h.defineComponent({name:"AeTable",props:{modelValue:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]},form:{type:Object,default:()=>({})},excontext:{type:Object,default:()=>({})},dict:{type:Object,default:()=>({})},editable:{type:Boolean,default:!1},page:{type:Number,default:QO},pageSize:{type:Number,default:ZO},ellipsis:{type:Boolean,default:!1},pagination:{type:Object,default:()=>{}},loading:{type:Boolean,default:!1},align:{type:String,default:"left"},headerAlign:{type:String,default:"left"},size:{type:String,default:"default"},rowKey:{type:String,default:XO},emptyValue:{type:String,default:JO},adaptive:{type:Boolean,default:!1},showSummary:{type:Boolean,default:!1},summaryMethod:{type:Function,default:null},freshKey:{type:Number,default:0},imports:{type:Array,default:()=>[]}},emits:["update:modelValue","update:editable","update:page","update:pageSize","register","selection-change","page-change","current-change","row-click","value-click","action"],setup(e,{attrs:t,slots:n,emit:r,expose:i}){const{components:o,componentConfigs:a}=KO(e.imports),s=h.ref(),l=h.ref(),c=h.ref([]),d=h.ref(),u=dE(e.dict),{pageSizeRef:p,currentPageRef:m,pagination:f,watchPage:_}=AO(e,r),g=_(),S=h.computed(()=>{const R=T(T({},t),e);return["modelValue","columns","form","excontext","editable","page","pageSize","ellipsis","pagination","selections","selectionKeys","emptyValue","adaptive","summaryMethod","freshKey","dict","imports"].forEach(w=>{delete R[w]}),R});function v(R){if(e.summaryMethod!==null)return e.summaryMethod(R);const{columns:O,data:w}=R,x=[];return O.forEach((I,M)=>{if(!I.property&&!I.columnKey){x[M]=e.emptyValue;return}const L=I.columnKey?BN(e.columns,I.columnKey):FN(e.columns,I.property);if(L&&L.summable){const B=I.property?w.map(D=>Number(D[I.property])):[];if(L.summaryMethod!==void 0){x[M]=L.summaryMethod(B);return}if(L.type==="amount"){const D=B.reduce((Z,pe)=>{const he=Number(pe);return Number.isNaN(he)?Z:Z+pe},0),{amountThousand:A=!1,amountDecimal:k=!0,amountDigits:P=2,amountUnit:V="",amountUnitPosition:W="right"}=L.typeProps||{};x[M]=Ju(D,{amountThousand:A,amountDecimal:k,amountDigits:P,amountUnit:V,amountUnitPosition:W,defaultValue:e.emptyValue});return}B.every(D=>Number.isNaN(D))?x[M]=e.emptyValue:x[M]=`${B.reduce((D,A)=>{const k=Number(A);return Number.isNaN(k)?D:D+A},0)}`}else{x[M]=e.emptyValue;return}}),x}h.onMounted(()=>{r("register",s.value)}),h.onUnmounted(()=>{g()});const y={handleSelectionChange:R=>{c.value=R,r("selection-change",R)},handleCurrentChange:R=>{d.value=R,r("current-change",R)},handleRowClick:R=>{d.value=R,r("row-click",R)}};function b(R){if(c.value=R,!e.rowKey){_e.warn("console.table.rowKeyRequired");return}R.length?(s.value.clearSelection(),R.forEach(O=>{s.value.toggleRowSelection(O,!0,!0)})):s.value.clearSelection()}function E(R,O){r("page-change",{page:R,pageSize:O})}function C(){return Lt(this,null,function*(){var R;return e.editable?yield(R=l.value)==null?void 0:R.validate():!0})}function N(){var R;(R=h.unref(l))==null||R.clearValidate()}return i({updateSelections:b,validate:C,resetValidate:N}),()=>h.createVNode("div",{class:`ae-table ${e.adaptive?"is-adaptive":""}`,ref:"aeTableRef"},[OO(e,n,r,d,p,m,s,l,S,y,c,v,u,o,a),EC(e,p,m,f,E)])}}),ep=Wn(eA),tA={class:"ae-form-group"},nA={class:"ae-form-group-header__label"},rA={class:"ae-form-group-body__content"},iA=h.defineComponent({__name:"Group",props:{label:{type:String,default:""},subLabel:{type:String,default:""},toggleable:{type:Boolean,default:!0},expand:{type:Boolean,default:!0},headerStyle:{type:[Object,String],default:()=>""},bodyStyle:{type:[Object,String],default:()=>""},labelStyle:{type:[Object,String],default:()=>""},subLabelStyle:{type:[Object,String],default:()=>""}},setup(e){const t=e,n=h.ref(h.unref(t).expand),r=h.ref();function i(){const a=r.value;if(a){if(n.value){const s=a.scrollHeight;a.style.height=s+"px",requestAnimationFrame(()=>{a.style.height="0px",a.style.padding="0px"})}else a.style.height="0px",a.style.padding="0px",requestAnimationFrame(()=>{const s=a.scrollHeight;a.style.height=s+"px",a.style.padding="10px"});n.value=!n.value}}function o(){const a=r.value;a&&n.value&&(a.style.height="auto")}return(a,s)=>(h.openBlock(),h.createElementBlock("div",tA,[h.createElementVNode("div",{class:h.normalizeClass(["ae-form-group-header",{toggleable:e.toggleable,isExpanded:n.value}]),style:h.normalizeStyle(e.headerStyle),onClick:s[0]||(s[0]=l=>e.toggleable?i():void 0)},[h.createElementVNode("div",nA,[h.createElementVNode("span",{class:"title",style:h.normalizeStyle(e.labelStyle)},h.toDisplayString(e.label),5),e.subLabel?(h.openBlock(),h.createElementBlock("span",{key:0,class:"sub-title",style:h.normalizeStyle(e.subLabelStyle)},h.toDisplayString(e.subLabel),5)):h.createCommentVNode("",!0)]),e.toggleable?(h.openBlock(),h.createBlock(h.unref(Ut),{key:0,icon:n.value?"ep:arrow-down-bold":"ep:arrow-up-bold",class:"ae-form-group-header__icon"},null,8,["icon"])):h.createCommentVNode("",!0)],6),h.createElementVNode("div",{ref_key:"bodyRef",ref:r,class:h.normalizeClass(["ae-form-group-body",{expanded:n.value}]),style:h.normalizeStyle(e.bodyStyle),onTransitionend:o},[h.createElementVNode("div",rA,[h.renderSlot(a.$slots,"default",{},void 0,!0)])],38)]))}}),oA=ro(iA,[["__scopeId","data-v-aa54908a"]]),aA={},sA={class:"ae-form-blank"};function lA(e,t){return h.openBlock(),h.createElementBlock("div",sA,[h.renderSlot(e.$slots,"default",{style:"filter: blur()"},void 0,!0)])}const cA=ro(aA,[["render",lA],["__scopeId","data-v-c67668da"]]);var dA=Object.defineProperty,mE=e=>{throw TypeError(e)},uA=(e,t,n)=>t in e?dA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,z=(e,t,n)=>uA(e,typeof t!="symbol"?t+"":t,n),fE=(e,t,n)=>t.has(e)||mE("Cannot "+n),po=(e,t,n)=>(fE(e,t,"read from private field"),t.get(e)),pA=(e,t,n)=>t.has(e)?mE("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),mA=(e,t,n,r)=>(fE(e,t,"write to private field"),t.set(e,n),n);function at(e){this.content=e}at.prototype={constructor:at,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),o=r.content.slice();return i==-1?o.push(n||e,t):(o[i+1]=t,n&&(o[i]=n)),new at(o)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new at(n)},addToStart:function(e,t){return new at([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new at(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),o=r.find(e);return i.splice(o==-1?i.length:o,0,t,n),new at(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=at.from(e),e.size?new at(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=at.from(e),e.size?new at(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=at.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};at.from=function(e){if(e instanceof at)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new at(t)};function hE(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),o=t.child(r);if(i==o){n+=i.nodeSize;continue}if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let a=0;i.text[a]==o.text[a];a++)n++;return n}if(i.content.size||o.content.size){let a=hE(i.content,o.content,n+1);if(a!=null)return a}n+=i.nodeSize}}function _E(e,t,n,r){for(let i=e.childCount,o=t.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let a=e.child(--i),s=t.child(--o),l=a.nodeSize;if(a==s){n-=l,r-=l;continue}if(!a.sameMarkup(s))return{a:n,b:r};if(a.isText&&a.text!=s.text){let c=0,d=Math.min(a.text.length,s.text.length);for(;c<d&&a.text[a.text.length-c-1]==s.text[s.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(a.content.size||s.content.size){let c=_E(a.content,s.content,n-1,r-1);if(c)return c}n-=l,r-=l}}class ${constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,i=0,o){for(let a=0,s=0;s<n;a++){let l=this.content[a],c=s+l.nodeSize;if(c>t&&r(l,i+s,o||null,a)!==!1&&l.content.size){let d=s+1;l.nodesBetween(Math.max(0,t-d),Math.min(l.content.size,n-d),r,i+d)}s=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,i){let o="",a=!0;return this.nodesBetween(t,n,(s,l)=>{let c=s.isText?s.text.slice(Math.max(t,l)-l,n-l):s.isLeaf?i?typeof i=="function"?i(s):i:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&c||s.isTextblock)&&r&&(a?a=!1:o+=r),o+=c},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<t.content.length;o++)i.push(t.content[o]);return new $(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let o=0,a=0;a<n;o++){let s=this.content[o],l=a+s.nodeSize;l>t&&((a<t||l>n)&&(s.isText?s=s.cut(Math.max(0,t-a),Math.min(s.text.length,n-a)):s=s.cut(Math.max(0,t-a-1),Math.min(s.content.size,n-a-1))),r.push(s),i+=s.nodeSize),a=l}return new $(r,i)}cutByIndex(t,n){return t==n?$.empty:t==0&&n==this.content.length?this:new $(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new $(i,o)}addToStart(t){return new $([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new $(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];t(i,r,n),r+=i.nodeSize}}findDiffStart(t,n=0){return hE(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return _E(this,t,n,r)}findIndex(t,n=-1){if(t==0)return qa(0,t);if(t==this.size)return qa(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let r=0,i=0;;r++){let o=this.child(r),a=i+o.nodeSize;if(a>=t)return a==t||n>0?qa(r+1,a):qa(r,i);i=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return $.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new $(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return $.empty;let n,r=0;for(let i=0;i<t.length;i++){let o=t[i];r+=o.nodeSize,i&&o.isText&&t[i-1].sameMarkup(o)?(n||(n=t.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new $(n||t,r)}static from(t){if(!t)return $.empty;if(t instanceof $)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new $([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}$.empty=new $([],0);const wc={index:0,offset:0};function qa(e,t){return wc.index=e,wc.offset=t,wc}function ks(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!ks(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!ks(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}let Me=class Pd{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,r=!1;for(let i=0;i<t.length;i++){let o=t[i];if(this.eq(o))return t;if(this.type.excludes(o.type))n||(n=t.slice(0,i));else{if(o.type.excludes(this.type))return t;!r&&o.type.rank>this.type.rank&&(n||(n=t.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&ks(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return Pd.none;if(t instanceof Pd)return[t];let n=t.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};Me.none=[];class Ms extends Error{}class K{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=EE(this.content,t+this.openStart,n);return r&&new K(r,this.openStart,this.openEnd)}removeBetween(t,n){return new K(gE(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return K.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new K($.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let o=t.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=t.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new K(t,r,i)}}K.empty=new K($.empty,0,0);function gE(e,t,n){let{index:r,offset:i}=e.findIndex(t),o=e.maybeChild(r),{index:a,offset:s}=e.findIndex(n);if(i==t||o.isText){if(s!=n&&!e.child(a).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=a)throw new RangeError("Removing non-flat range");return e.replaceChild(r,o.copy(gE(o.content,t-i-1,n-i-1)))}function EE(e,t,n,r){let{index:i,offset:o}=e.findIndex(t),a=e.maybeChild(i);if(o==t||a.isText)return e.cut(0,t).append(n).append(e.cut(t));let s=EE(a.content,t-o-1,n);return s&&e.replaceChild(i,a.copy(s))}function fA(e,t,n){if(n.openStart>e.depth)throw new Ms("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Ms("Inconsistent open depths");return bE(e,t,n,0)}function bE(e,t,n,r){let i=e.index(r),o=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let a=bE(e,t,n,r+1);return o.copy(o.content.replaceChild(i,a))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let a=e.parent,s=a.content;return $r(a,s.cut(0,e.parentOffset).append(n.content).append(s.cut(t.parentOffset)))}else{let{start:a,end:s}=hA(n,e);return $r(o,vE(e,a,s,t,r))}else return $r(o,Ls(e,t,r))}function SE(e,t){if(!t.type.compatibleContent(e.type))throw new Ms("Cannot join "+t.type.name+" onto "+e.type.name)}function Fd(e,t,n){let r=e.node(n);return SE(r,t.node(n)),r}function zr(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function xo(e,t,n,r){let i=(t||e).node(n),o=0,a=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(zr(e.nodeAfter,r),o++));for(let s=o;s<a;s++)zr(i.child(s),r);t&&t.depth==n&&t.textOffset&&zr(t.nodeBefore,r)}function $r(e,t){return e.type.checkContent(t),e.copy(t)}function vE(e,t,n,r,i){let o=e.depth>i&&Fd(e,t,i+1),a=r.depth>i&&Fd(n,r,i+1),s=[];return xo(null,e,i,s),o&&a&&t.index(i)==n.index(i)?(SE(o,a),zr($r(o,vE(e,t,n,r,i+1)),s)):(o&&zr($r(o,Ls(e,t,i+1)),s),xo(t,n,i,s),a&&zr($r(a,Ls(n,r,i+1)),s)),xo(r,null,i,s),new $(s)}function Ls(e,t,n){let r=[];if(xo(null,e,n,r),e.depth>n){let i=Fd(e,t,n+1);zr($r(i,Ls(e,t,n+1)),r)}return xo(t,null,n,r),new $(r)}function hA(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let i=n-1;i>=0;i--)r=t.node(i).copy($.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}class Ko{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=t.child(n);return r?t.child(n).cut(r):i}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let o=0;o<t;o++)i+=r.child(o).nodeSize;return i}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return Me.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),i=t.maybeChild(n);if(!r){let s=r;r=i,i=s}let o=r.marks;for(var a=0;a<o.length;a++)o[a].type.spec.inclusive===!1&&(!i||!o[a].isInSet(i.marks))&&(o=o[a--].removeFromSet(o));return o}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=t.parent.maybeChild(t.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new Ps(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let a=t;;){let{index:s,offset:l}=a.content.findIndex(o),c=o-l;if(r.push(a,s,i+l),!c||(a=a.child(s),a.isText))break;o=c-1,i+=l+1}return new Ko(n,r,o)}static resolveCached(t,n){let r=rf.get(t);if(r)for(let o=0;o<r.elts.length;o++){let a=r.elts[o];if(a.pos==n)return a}else rf.set(t,r=new _A);let i=r.elts[r.i]=Ko.resolve(t,n);return r.i=(r.i+1)%gA,i}}class _A{constructor(){this.elts=[],this.i=0}}const gA=12,rf=new WeakMap;class Ps{constructor(t,n,r){this.$from=t,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const EA=Object.create(null);let $n=class Bd{constructor(t,n,r,i=Me.none){this.type=t,this.attrs=n,this.marks=i,this.content=r||$.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,r,i=0){this.content.nodesBetween(t,n,r,i,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,r,i){return this.content.textBetween(t,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,r){return this.type==t&&ks(this.attrs,n||t.defaultAttrs||EA)&&Me.sameSet(this.marks,r||Me.none)}copy(t=null){return t==this.content?this:new Bd(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new Bd(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,r=!1){if(t==n)return K.empty;let i=this.resolve(t),o=this.resolve(n),a=r?0:i.sharedDepth(n),s=i.start(a),l=i.node(a).content.cut(i.pos-s,o.pos-s);return new K(l,i.depth-a,o.depth-a)}replace(t,n,r){return fA(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(i==t||n.isText)return n;t-=i+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(t){return Ko.resolveCached(this,t)}resolveNoCache(t){return Ko.resolve(this,t)}rangeHasMark(t,n,r){let i=!1;return n>t&&this.nodesBetween(t,n,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),yE(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=$.empty,i=0,o=r.childCount){let a=this.contentMatchAt(t).matchFragment(r,i,o),s=a&&a.matchFragment(this.content,n);if(!s||!s.validEnd)return!1;for(let l=i;l<o;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(t,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(t).matchType(r),a=o&&o.matchFragment(this.content,n);return a?a.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=Me.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),t=r.addToSet(t)}if(!Me.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let i=$.fromJSON(t,n.content),o=t.nodeType(n.type).create(n.attrs,i,r);return o.type.checkAttrs(o.attrs),o}};$n.prototype.text=void 0;class Fs extends $n{constructor(t,n,r,i){if(super(t,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):yE(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new Fs(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new Fs(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function yE(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Xr{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new bA(t,n);if(r.next==null)return Xr.empty;let i=CE(r);r.next&&r.err("Unexpected trailing text");let o=OA(NA(i));return AA(o,r),o}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,r=t.childCount){let i=this;for(let o=n;i&&o<r;o++)i=i.matchType(t.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let i=[this];function o(a,s){let l=a.matchFragment(t,r);if(l&&(!n||l.validEnd))return $.from(s.map(c=>c.createAndFill()));for(let c=0;c<a.next.length;c++){let{type:d,next:u}=a.next[c];if(!(d.isText||d.hasRequiredAttrs())&&i.indexOf(u)==-1){i.push(u);let p=o(u,s.concat(d));if(p)return p}}return null}return o(this,[])}findWrapping(t){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==t)return this.wrapCache[r+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(t)){let a=[];for(let s=i;s.type;s=s.via)a.push(s.type);return a.reverse()}for(let a=0;a<o.next.length;a++){let{type:s,next:l}=o.next[a];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in n)&&(!i.type||l.validEnd)&&(r.push({match:s.contentMatch,type:s,via:i}),n[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let i=0;i<r.next.length;i++)t.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),t.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let a=0;a<r.next.length;a++)o+=(a?", ":"")+r.next[a].type.name+"->"+t.indexOf(r.next[a].next);return o}).join(`
|
|
11
11
|
`)}}Xr.empty=new Xr(!0);class bA{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function CE(e){let t=[];do t.push(SA(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function SA(e){let t=[];do t.push(vA(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function vA(e){let t=TA(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=yA(e,t);else break;return t}function of(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function yA(e,t){let n=of(e),r=n;return e.eat(",")&&(e.next!="}"?r=of(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function CA(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let o in n){let a=n[o];a.isInGroup(t)&&i.push(a)}return i.length==0&&e.err("No node type or group '"+t+"' found"),i}function TA(e){if(e.eat("(")){let t=CE(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=CA(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function NA(e){let t=[[]];return i(o(e,0),n()),t;function n(){return t.push([])-1}function r(a,s,l){let c={term:l,to:s};return t[a].push(c),c}function i(a,s){a.forEach(l=>l.to=s)}function o(a,s){if(a.type=="choice")return a.exprs.reduce((l,c)=>l.concat(o(c,s)),[]);if(a.type=="seq")for(let l=0;;l++){let c=o(a.exprs[l],s);if(l==a.exprs.length-1)return c;i(c,s=n())}else if(a.type=="star"){let l=n();return r(s,l),i(o(a.expr,l),l),[r(l)]}else if(a.type=="plus"){let l=n();return i(o(a.expr,s),l),i(o(a.expr,l),l),[r(l)]}else{if(a.type=="opt")return[r(s)].concat(o(a.expr,s));if(a.type=="range"){let l=s;for(let c=0;c<a.min;c++){let d=n();i(o(a.expr,l),d),l=d}if(a.max==-1)i(o(a.expr,l),l);else for(let c=a.min;c<a.max;c++){let d=n();r(l,d),i(o(a.expr,l),d),l=d}return[r(l)]}else{if(a.type=="name")return[r(s,void 0,a.value)];throw new Error("Unknown expr type")}}}}function TE(e,t){return t-e}function af(e,t){let n=[];return r(t),n.sort(TE);function r(i){let o=e[i];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(i);for(let a=0;a<o.length;a++){let{term:s,to:l}=o[a];!s&&n.indexOf(l)==-1&&r(l)}}}function OA(e){let t=Object.create(null);return n(af(e,0));function n(r){let i=[];r.forEach(a=>{e[a].forEach(({term:s,to:l})=>{if(!s)return;let c;for(let d=0;d<i.length;d++)i[d][0]==s&&(c=i[d][1]);af(e,l).forEach(d=>{c||i.push([s,c=[]]),c.indexOf(d)==-1&&c.push(d)})})});let o=t[r.join(",")]=new Xr(r.indexOf(e.length-1)>-1);for(let a=0;a<i.length;a++){let s=i[a][1].sort(TE);o.next.push({type:i[a][0],next:t[s.join(",")]||n(s)})}return o}}function AA(e,t){for(let n=0,r=[e];n<r.length;n++){let i=r[n],o=!i.validEnd,a=[];for(let s=0;s<i.next.length;s++){let{type:l,next:c}=i.next[s];a.push(l.name),o&&!(l.isText||l.hasRequiredAttrs())&&(o=!1),r.indexOf(c)==-1&&r.push(c)}o&&t.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function NE(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function OE(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let o=e[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function AE(e,t,n,r){for(let i in t)if(!(i in e))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in e){let o=e[i];o.validate&&o.validate(t[i])}}function RE(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new wA(e,r,t[r]);return n}let sf=class wE{constructor(t,n,r){this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=RE(t,r.attrs),this.defaultAttrs=NE(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Xr.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:OE(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new $n(this,this.computeAttrs(t),$.from(n),Me.setFrom(r))}createChecked(t=null,n,r){return n=$.from(n),this.checkContent(n),new $n(this,this.computeAttrs(t),n,Me.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=$.from(n),n.size){let a=this.contentMatch.fillBefore(n);if(!a)return null;n=a.append(n)}let i=this.contentMatch.matchFragment(n),o=i&&i.fillBefore($.empty,!0);return o?new $n(this,t,n.append(o),Me.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r<t.childCount;r++)if(!this.allowsMarks(t.child(r).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){AE(this.attrs,t,"node",this.name)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let r=0;r<t.length;r++)this.allowsMarkType(t[r].type)?n&&n.push(t[r]):n||(n=t.slice(0,r));return n?n.length?n:Me.none:t}static compile(t,n){let r=Object.create(null);t.forEach((o,a)=>r[o]=new wE(o,n,a));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function RA(e,t,n){let r=n.split("|");return i=>{let o=i===null?"null":typeof i;if(r.indexOf(o)<0)throw new RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${o}`)}}class wA{constructor(t,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?RA(t,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Hl{constructor(t,n,r,i){this.name=t,this.rank=n,this.schema=r,this.spec=i,this.attrs=RE(t,i.attrs),this.excluded=null;let o=NE(this.attrs);this.instance=o?new Me(this,o):null}create(t=null){return!t&&this.instance?this.instance:new Me(this,OE(this.attrs,t))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((o,a)=>r[o]=new Hl(o,i++,n,a)),r}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}checkAttrs(t){AE(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}class xE{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in t)n[i]=t[i];n.nodes=at.from(t.nodes),n.marks=at.from(t.marks||{}),this.nodes=sf.compile(this.spec.nodes,this),this.marks=Hl.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let o=this.nodes[i],a=o.spec.content||"",s=o.spec.marks;if(o.contentMatch=r[a]||(r[a]=Xr.parse(a,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=s=="_"?null:s?lf(this,s.split(" ")):s==""||!o.inlineContent?[]:null}for(let i in this.marks){let o=this.marks[i],a=o.spec.excludes;o.excluded=a==null?[o]:a==""?[]:lf(this,a.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,i){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof sf){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,i)}text(t,n){let r=this.nodes.text;return new Fs(r,r.defaultAttrs,t,Me.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeFromJSON(t){return $n.fromJSON(this,t)}markFromJSON(t){return Me.fromJSON(this,t)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}}function lf(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],o=e.marks[i],a=o;if(o)n.push(o);else for(let s in e.marks){let l=e.marks[s];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&n.push(a=l)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}function xA(e){return e.tag!=null}function IA(e){return e.style!=null}let Ii=class Ud{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(xA(i))this.tags.push(i);else if(IA(i)){let o=/[^=]*/.exec(i.style)[0];r.indexOf(o)<0&&r.push(o),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let o=t.nodes[i.node];return o.contentMatch.matchType(o)})}parse(t,n={}){let r=new df(this,n,!1);return r.addAll(t,Me.none,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new df(this,n,!0);return r.addAll(t,Me.none,n.from,n.to),K.maxOpen(r.finish())}matchTag(t,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(MA(t,o.tag)&&(o.namespace===void 0||t.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let a=o.getAttrs(t);if(a===!1)continue;o.attrs=a||void 0}return o}}}matchStyle(t,n,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let a=this.styles[o],s=a.style;if(!(s.indexOf(t)!=0||a.context&&!r.matchesContext(a.context)||s.length>t.length&&(s.charCodeAt(t.length)!=61||s.slice(t.length+1)!=n))){if(a.getAttrs){let l=a.getAttrs(n);if(l===!1)continue;a.attrs=l||void 0}return a}}}static schemaRules(t){let n=[];function r(i){let o=i.priority==null?50:i.priority,a=0;for(;a<n.length;a++){let s=n[a];if((s.priority==null?50:s.priority)<o)break}n.splice(a,0,i)}for(let i in t.marks){let o=t.marks[i].spec.parseDOM;o&&o.forEach(a=>{r(a=uf(a)),a.mark||a.ignore||a.clearMark||(a.mark=i)})}for(let i in t.nodes){let o=t.nodes[i].spec.parseDOM;o&&o.forEach(a=>{r(a=uf(a)),a.node||a.ignore||a.mark||(a.node=i)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new Ud(t,Ud.schemaRules(t)))}};const IE={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},DA={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},DE={ol:!0,ul:!0},Qo=1,Hd=2,Io=4;function cf(e,t,n){return t!=null?(t?Qo:0)|(t==="full"?Hd:0):e&&e.whitespace=="pre"?Qo|Hd:n&~Io}class ja{constructor(t,n,r,i,o,a){this.type=t,this.attrs=n,this.marks=r,this.solid=i,this.options=a,this.content=[],this.activeMarks=Me.none,this.match=o||(a&Io?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore($.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(t.type))?(this.match=r,i):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&Qo)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let o=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-i[0].length))}}let n=$.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore($.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!IE.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class df{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=n.topNode,o,a=cf(null,n.preserveWhitespace,0)|(r?Io:0);i?o=new ja(i.type,i.attrs,Me.none,!0,n.topMatch||i.type.contentMatch,a):r?o=new ja(null,null,Me.none,!0,null,a):o=new ja(t.schema.topNodeType,null,Me.none,!0,null,a),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let r=t.nodeValue,i=this.top,o=i.options&Hd?"full":this.localPreserveWS||(i.options&Qo)>0;if(o==="full"||i.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(o)o!=="full"?r=r.replace(/\r?\n|\r/g," "):r=r.replace(/\r\n?/g,`
|
|
12
12
|
`);else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=i.content[i.content.length-1],s=t.previousSibling;(!a||s&&s.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),n),this.findInText(t)}else this.findInside(t)}addElement(t,n,r){let i=this.localPreserveWS,o=this.top;(t.tagName=="PRE"||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let a=t.nodeName.toLowerCase(),s;DE.hasOwnProperty(a)&&this.parser.normalizeLists&&kA(t);let l=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(s=this.parser.matchTag(t,this,r));e:if(l?l.ignore:DA.hasOwnProperty(a))this.findInside(t),this.ignoreFallback(t,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(t=l.skip);let c,d=this.needsBlock;if(IE.hasOwnProperty(a))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),c=!0,o.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,n);break e}let u=l&&l.skip?n:this.readStyles(t,n);u&&this.addAll(t,u),c&&this.sync(o),this.needsBlock=d}else{let c=this.readStyles(t,n);c&&this.addElementByRule(t,l,c,l.consuming===!1?s:void 0)}this.localPreserveWS=i}leafFallback(t,n){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
|
|
13
13
|
`),n)}ignoreFallback(t,n){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n)}readStyles(t,n){let r=t.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],a=r.getPropertyValue(o);if(a)for(let s=void 0;;){let l=this.parser.matchStyle(o,a,this,s);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(c=>!l.clearMark(c)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)s=l;else break}}return n}addElementByRule(t,n,r,i){let o,a;if(n.node)if(a=this.parser.schema.nodes[n.node],a.isLeaf)this.insertNode(a.create(n.attrs),r)||this.leafFallback(t,r);else{let l=this.enter(a,n.attrs||null,r,n.preserveWhitespace);l&&(o=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let s=this.top;if(a&&a.isLeaf)this.findInside(t);else if(i)this.addElement(t,r,i);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l,r));else{let l=t;typeof n.contentElement=="string"?l=t.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(t):n.contentElement&&(l=n.contentElement),this.findAround(t,l,!0),this.addAll(l,r),this.findAround(t,l,!1)}o&&this.sync(s)&&this.open--}addAll(t,n,r,i){let o=r||0;for(let a=r?t.childNodes[r]:t.firstChild,s=i==null?null:t.childNodes[i];a!=s;a=a.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(a,n);this.findAtPoint(t,o)}findPlace(t,n){let r,i;for(let o=this.open;o>=0;o--){let a=this.nodes[o],s=a.findWrapping(t);if(s&&(!r||r.length>s.length)&&(r=s,i=a,!s.length)||a.solid)break}if(!r)return null;this.sync(i);for(let o=0;o<r.length;o++)n=this.enterInner(r[o],null,n,!1);return n}insertNode(t,n){if(t.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let r=this.findPlace(t,n);if(r){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(t.type));let o=Me.none;for(let a of r.concat(t.marks))(i.type?i.type.allowsMarkType(a.type):pf(a.type,t.type))&&(o=a.addToSet(o));return i.content.push(t.mark(o)),!0}return!1}enter(t,n,r,i){let o=this.findPlace(t.create(n),r);return o&&(o=this.enterInner(t,n,r,!0,i)),o}enterInner(t,n,r,i=!1,o){this.closeExtra();let a=this.top;a.match=a.match&&a.match.matchType(t);let s=cf(t,o,a.options);a.options&Io&&a.content.length==0&&(s|=Io);let l=Me.none;return r=r.filter(c=>(a.type?a.type.allowsMarkType(c.type):pf(c.type,t))?(l=c.addToSet(l),!1):!0),this.nodes.push(new ja(t,n,l,i,null,s)),this.open++,r}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Qo)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)t+=r[i].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,r){if(t!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&t.nodeType==1&&t.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),a=(s,l)=>{for(;s>=0;s--){let c=n[s];if(c==""){if(s==n.length-1||s==0)continue;for(;l>=o;l--)if(a(s-1,l))return!0;return!1}else{let d=l>0||l==0&&i?this.nodes[l].type:r&&l>=o?r.node(l-o).type:null;if(!d||d.name!=c&&!d.isInGroup(c))return!1;l--}}return!0};return a(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function kA(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&DE.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function MA(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function uf(e){let t={};for(let n in e)t[n]=e[n];return t}function pf(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let o=[],a=s=>{o.push(s);for(let l=0;l<s.edgeCount;l++){let{type:c,next:d}=s.edge(l);if(c==t||o.indexOf(d)<0&&a(d))return!0}};if(a(i.contentMatch))return!0}}class ai{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},r){r||(r=xc(n).createDocumentFragment());let i=r,o=[];return t.forEach(a=>{if(o.length||a.marks.length){let s=0,l=0;for(;s<o.length&&l<a.marks.length;){let c=a.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(o[s][0])||c.type.spec.spanning===!1)break;s++,l++}for(;s<o.length;)i=o.pop()[1];for(;l<a.marks.length;){let c=a.marks[l++],d=this.serializeMark(c,a.isInline,n);d&&(o.push([c,i]),i.appendChild(d.dom),i=d.contentDOM||d.dom)}}i.appendChild(this.serializeNodeInner(a,n))}),r}serializeNodeInner(t,n){let{dom:r,contentDOM:i}=Cs(xc(n),this.nodes[t.type.name](t),null,t.attrs);if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,i)}return r}serializeNode(t,n={}){let r=this.serializeNodeInner(t,n);for(let i=t.marks.length-1;i>=0;i--){let o=this.serializeMark(t.marks[i],t.isInline,n);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(t,n,r={}){let i=this.marks[t.type.name];return i&&Cs(xc(r),i(t,n),null,t.attrs)}static renderSpec(t,n,r=null,i){return Cs(t,n,r,i)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new ai(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=mf(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return mf(t.marks)}}function mf(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function xc(e){return e.document||window.document}const ff=new WeakMap;function LA(e){let t=ff.get(e);return t===void 0&&ff.set(e,t=PA(e)),t}function PA(e){let t=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")t||(t=[]),t.push(r);else for(let i=0;i<r.length;i++)n(r[i]);else for(let i in r)n(r[i])}return n(e),t}function Cs(e,t,n,r){if(typeof t=="string")return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let i=t[0],o;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(o=LA(r))&&o.indexOf(t)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let a=i.indexOf(" ");a>0&&(n=i.slice(0,a),i=i.slice(a+1));let s,l=n?e.createElementNS(n,i):e.createElement(i),c=t[1],d=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){d=2;for(let u in c)if(c[u]!=null){let p=u.indexOf(" ");p>0?l.setAttributeNS(u.slice(0,p),u.slice(p+1),c[u]):l.setAttribute(u,c[u])}}for(let u=d;u<t.length;u++){let p=t[u];if(p===0){if(u<t.length-1||u>d)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:m,contentDOM:f}=Cs(e,p,n,r);if(l.appendChild(m),f){if(s)throw new RangeError("Multiple content holes");s=f}}}return{dom:l,contentDOM:s}}const kE=65535,ME=Math.pow(2,16);function FA(e,t){return e+t*ME}function hf(e){return e&kE}function BA(e){return(e-(e&kE))/ME}const LE=1,PE=2,Ts=4,FE=8;class Vd{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&FE)>0}get deletedBefore(){return(this.delInfo&(LE|Ts))>0}get deletedAfter(){return(this.delInfo&(PE|Ts))>0}get deletedAcross(){return(this.delInfo&Ts)>0}}class Pt{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&Pt.empty)return Pt.empty}recover(t){let n=0,r=hf(t);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+BA(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,r){let i=0,o=this.inverted?2:1,a=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?i:0);if(l>t)break;let c=this.ranges[s+o],d=this.ranges[s+a],u=l+c;if(t<=u){let p=c?t==l?-1:t==u?1:n:n,m=l+i+(p<0?0:d);if(r)return m;let f=t==(n<0?l:u)?null:FA(s/3,t-l),_=t==l?PE:t==u?LE:Ts;return(n<0?t!=l:t!=u)&&(_|=FE),new Vd(m,_,f)}i+=d-c}return r?t+i:new Vd(t+i,0,null)}touches(t,n){let r=0,i=hf(n),o=this.inverted?2:1,a=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?r:0);if(l>t)break;let c=this.ranges[s+o],d=l+c;if(t<=d&&s==i*3)return!0;r+=this.ranges[s+a]-c}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let a=this.ranges[i],s=a-(this.inverted?o:0),l=a+(this.inverted?0:o),c=this.ranges[i+n],d=this.ranges[i+r];t(s,s+c,l,l+d),o+=d-c}}invert(){return new Pt(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?Pt.empty:new Pt(t<0?[0,-t,0]:[0,0,t])}}Pt.empty=new Pt([]);class Di{constructor(t=[],n,r=0,i=t.length){this.maps=t,this.mirror=n,this.from=r,this.to=i}slice(t=0,n=this.maps.length){return new Di(this.maps,this.mirror,t,n)}copy(){return new Di(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(t,n){this.to=this.maps.push(t),n!=null&&this.setMirror(this.maps.length-1,n)}appendMapping(t){for(let n=0,r=this.maps.length;n<t.maps.length;n++){let i=t.getMirror(n);this.appendMap(t.maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(t){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==t)return this.mirror[n+(n%2?-1:1)]}}setMirror(t,n){this.mirror||(this.mirror=[]),this.mirror.push(t,n)}appendMappingInverted(t){for(let n=t.maps.length-1,r=this.maps.length+t.maps.length;n>=0;n--){let i=t.getMirror(n);this.appendMap(t.maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let t=new Di;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;r<this.to;r++)t=this.maps[r].map(t,n);return t}mapResult(t,n=1){return this._map(t,n,!1)}_map(t,n,r){let i=0;for(let o=this.from;o<this.to;o++){let a=this.maps[o],s=a.mapResult(t,n);if(s.recover!=null){let l=this.getMirror(o);if(l!=null&&l>o&&l<this.to){o=l,t=this.maps[l].recover(s.recover);continue}}i|=s.delInfo,t=s.pos}return r?t:new Vd(t,i,null)}}const Ic=Object.create(null);class gt{getMap(){return Pt.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Ic[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in Ic)throw new RangeError("Duplicate use of step JSON ID "+t);return Ic[t]=n,n.prototype.jsonID=t,n}}class Qe{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new Qe(t,null)}static fail(t){return new Qe(null,t)}static fromReplace(t,n,r,i){try{return Qe.ok(t.replace(n,r,i))}catch(o){if(o instanceof Ms)return Qe.fail(o.message);throw o}}}function tp(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let o=e.child(i);o.content.size&&(o=o.copy(tp(o.content,t,o))),o.isInline&&(o=t(o,n,i)),r.push(o)}return $.fromArray(r)}class dr extends gt{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=t.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new K(tp(n.content,(a,s)=>!a.isAtom||!s.type.allowsMarkType(this.mark.type)?a:a.mark(this.mark.addToSet(a.marks)),i),n.openStart,n.openEnd);return Qe.fromReplace(t,this.from,this.to,o)}invert(){return new Sn(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new dr(n.pos,r.pos,this.mark)}merge(t){return t instanceof dr&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new dr(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new dr(n.from,n.to,t.markFromJSON(n.mark))}}gt.jsonID("addMark",dr);class Sn extends gt{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new K(tp(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),n.openStart,n.openEnd);return Qe.fromReplace(t,this.from,this.to,r)}invert(){return new dr(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Sn(n.pos,r.pos,this.mark)}merge(t){return t instanceof Sn&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Sn(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Sn(n.from,n.to,t.markFromJSON(n.mark))}}gt.jsonID("removeMark",Sn);class ur extends gt{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Qe.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Qe.fromReplace(t,this.pos,this.pos+1,new K($.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new ur(this.pos,n.marks[i]);return new ur(this.pos,this.mark)}}return new Gi(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new ur(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new ur(n.pos,t.markFromJSON(n.mark))}}gt.jsonID("addNodeMark",ur);class Gi extends gt{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Qe.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Qe.fromReplace(t,this.pos,this.pos+1,new K($.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new ur(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Gi(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Gi(n.pos,t.markFromJSON(n.mark))}}gt.jsonID("removeNodeMark",Gi);class Xe extends gt{constructor(t,n,r,i=!1){super(),this.from=t,this.to=n,this.slice=r,this.structure=i}apply(t){return this.structure&&Gd(t,this.from,this.to)?Qe.fail("Structure replace would overwrite content"):Qe.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new Pt([this.from,this.to-this.from,this.slice.size])}invert(t){return new Xe(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new Xe(n.pos,Math.max(n.pos,r.pos),this.slice)}merge(t){if(!(t instanceof Xe)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?K.empty:new K(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new Xe(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?K.empty:new K(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new Xe(t.from,this.to,n,this.structure)}else return null}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Xe(n.from,n.to,K.fromJSON(t,n.slice),!!n.structure)}}gt.jsonID("replace",Xe);class nt extends gt{constructor(t,n,r,i,o,a,s=!1){super(),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=a,this.structure=s}apply(t){if(this.structure&&(Gd(t,this.from,this.gapFrom)||Gd(t,this.gapTo,this.to)))return Qe.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Qe.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Qe.fromReplace(t,this.from,this.to,r):Qe.fail("Content does not fit in gap")}getMap(){return new Pt([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new nt(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||o>r.pos?null:new nt(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new nt(n.from,n.to,n.gapFrom,n.gapTo,K.fromJSON(t,n.slice),n.insert,!!n.structure)}}gt.jsonID("replaceAround",nt);function Gd(e,t,n){let r=e.resolve(t),i=n-t,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let a=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,i--}}return!1}function UA(e,t,n,r){let i=[],o=[],a,s;e.doc.nodesBetween(t,n,(l,c,d)=>{if(!l.isInline)return;let u=l.marks;if(!r.isInSet(u)&&d.type.allowsMarkType(r.type)){let p=Math.max(c,t),m=Math.min(c+l.nodeSize,n),f=r.addToSet(u);for(let _=0;_<u.length;_++)u[_].isInSet(f)||(a&&a.to==p&&a.mark.eq(u[_])?a.to=m:i.push(a=new Sn(p,m,u[_])));s&&s.to==p?s.to=m:o.push(s=new dr(p,m,r))}}),i.forEach(l=>e.step(l)),o.forEach(l=>e.step(l))}function HA(e,t,n,r){let i=[],o=0;e.doc.nodesBetween(t,n,(a,s)=>{if(!a.isInline)return;o++;let l=null;if(r instanceof Hl){let c=a.marks,d;for(;d=r.isInSet(c);)(l||(l=[])).push(d),c=d.removeFromSet(c)}else r?r.isInSet(a.marks)&&(l=[r]):l=a.marks;if(l&&l.length){let c=Math.min(s+a.nodeSize,n);for(let d=0;d<l.length;d++){let u=l[d],p;for(let m=0;m<i.length;m++){let f=i[m];f.step==o-1&&u.eq(i[m].style)&&(p=f)}p?(p.to=c,p.step=o):i.push({style:u,from:Math.max(s,t),to:c,step:o})}}}),i.forEach(a=>e.step(new Sn(a.from,a.to,a.style)))}function np(e,t,n,r=n.contentMatch,i=!0){let o=e.doc.nodeAt(t),a=[],s=t+1;for(let l=0;l<o.childCount;l++){let c=o.child(l),d=s+c.nodeSize,u=r.matchType(c.type);if(!u)a.push(new Xe(s,d,K.empty));else{r=u;for(let p=0;p<c.marks.length;p++)n.allowsMarkType(c.marks[p].type)||e.step(new Sn(s,d,c.marks[p]));if(i&&c.isText&&n.whitespace!="pre"){let p,m=/\r?\n|\r/g,f;for(;p=m.exec(c.text);)f||(f=new K($.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),a.push(new Xe(s+p.index,s+p.index+p[0].length,f))}}s=d}if(!r.validEnd){let l=r.fillBefore($.empty,!0);e.replace(s,s,new K(l,0,0))}for(let l=a.length-1;l>=0;l--)e.step(a[l])}function VA(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function io(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let r=e.$from.node(n),i=e.$from.index(n),o=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(i,o,t))return n;if(n==0||r.type.spec.isolating||!VA(r,i,o))break}return null}function GA(e,t,n){let{$from:r,$to:i,depth:o}=t,a=r.before(o+1),s=i.after(o+1),l=a,c=s,d=$.empty,u=0;for(let f=o,_=!1;f>n;f--)_||r.index(f)>0?(_=!0,d=$.from(r.node(f).copy(d)),u++):l--;let p=$.empty,m=0;for(let f=o,_=!1;f>n;f--)_||i.after(f+1)<i.end(f)?(_=!0,p=$.from(i.node(f).copy(p)),m++):c++;e.step(new nt(l,c,a,s,new K(d.append(p),u,m),d.size-u,!0))}function rp(e,t,n=null,r=e){let i=zA(e,t),o=i&&$A(r,t);return o?i.map(_f).concat({type:t,attrs:n}).concat(o.map(_f)):null}function _f(e){return{type:e,attrs:null}}function zA(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.contentMatchAt(r).findWrapping(t);if(!o)return null;let a=o.length?o[0]:t;return n.canReplaceWith(r,i,a)?o:null}function $A(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.child(r),a=t.contentMatch.findWrapping(o.type);if(!a)return null;let s=(a.length?a[a.length-1]:t).contentMatch;for(let l=r;s&&l<i;l++)s=s.matchType(n.child(l).type);return!s||!s.validEnd?null:a}function YA(e,t,n){let r=$.empty;for(let a=n.length-1;a>=0;a--){if(r.size){let s=n[a].type.contentMatch.matchFragment(r);if(!s||!s.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=$.from(n[a].type.create(n[a].attrs,r))}let i=t.start,o=t.end;e.step(new nt(i,o,i,o,new K(r,0,0),n.length,!0))}function qA(e,t,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=e.steps.length;e.doc.nodesBetween(t,n,(a,s)=>{let l=typeof i=="function"?i(a):i;if(a.isTextblock&&!a.hasMarkup(r,l)&&jA(e.doc,e.mapping.slice(o).map(s),r)){let c=null;if(r.schema.linebreakReplacement){let m=r.whitespace=="pre",f=!!r.contentMatch.matchType(r.schema.linebreakReplacement);m&&!f?c=!1:!m&&f&&(c=!0)}c===!1&&UE(e,a,s,o),np(e,e.mapping.slice(o).map(s,1),r,void 0,c===null);let d=e.mapping.slice(o),u=d.map(s,1),p=d.map(s+a.nodeSize,1);return e.step(new nt(u,p,u+1,p-1,new K($.from(r.create(l,null,a.marks)),0,0),1,!0)),c===!0&&BE(e,a,s,o),!1}})}function BE(e,t,n,r){t.forEach((i,o)=>{if(i.isText){let a,s=/\r?\n|\r/g;for(;a=s.exec(i.text);){let l=e.mapping.slice(r).map(n+1+o+a.index);e.replaceWith(l,l+1,t.type.schema.linebreakReplacement.create())}}})}function UE(e,t,n,r){t.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let a=e.mapping.slice(r).map(n+1+o);e.replaceWith(a,a+1,t.type.schema.text(`
|
|
@@ -682,5 +682,5 @@ ${ae("ai-append")}</button>
|
|
|
682
682
|
`}};no.tableSection={filter:["thead","tbody","tfoot"],replacement:function(e){return e}};function b8(e){var t=e.parentNode;return t.nodeName==="THEAD"||t.firstChild===e&&(t.nodeName==="TABLE"||S8(t))&&E8.call(e.childNodes,function(n){return n.nodeName==="TH"})}function S8(e){var t=e.previousSibling;return e.nodeName==="TBODY"&&(!t||t.nodeName==="THEAD"&&/^\s*$/i.test(t.textContent))}function Iu(e,t=null,n=null){n===null&&(n=g8.call(t.parentNode.childNodes,t));var r=" ";n===0&&(r="| ");let i=e.trim().replace(/\n\r/g,"<br>").replace(/\n/g,"<br>");for(i=i.replace(/\|+/g,"\\|");i.length<3;)i+=" ";return t&&(i=v8(i,t," ")),r+i+" |"}function Ry(e){if(!e.childNodes)return!1;for(let t=0;t<e.childNodes.length;t++){const n=e.childNodes[t];if(n.nodeName==="TABLE"||Ry(n))return!0}return!1}function mm(e){return!!(!e||!e.rows||e.rows.length===1&&e.rows[0].childNodes.length<=1||Ry(e))}function wy(e){let t=e.parentNode;for(;t.nodeName!=="TABLE";)if(t=t.parentNode,!t)return null;return t}function v8(e,t,n){const r=t.getAttribute("colspan")||1;for(let i=1;i<r;i++)e+=" | "+n.repeat(3);return e}function xy(e){let t=0;for(let n=0;n<e.rows.length;n++){const r=e.rows[n].childNodes.length;r>t&&(t=r)}return t}function Iy(e){e.keep(function(n){return n.nodeName==="TABLE"});for(var t in no)e.addRule(t,no[t])}function y8(e){e.addRule("taskListItems",{filter:function(t){return t.type==="checkbox"&&t.parentNode.nodeName==="LI"},replacement:function(t,n){return(n.checked?"[x]":"[ ]")+" "}})}function C8(e){e.use([h8,_8,Iy,y8])}const fm=on({html:!0,linkify:!0,typographer:!0});fm.use(x6,"container-wrapper",{validate:function(e){return!0},render:function(e,t){return e[t].nesting===1?`<div class="container-wrapper ${e[t].info.trim().split(" ")[0]}">`:"</div>"}});fm.use(z6,{enabled:!0,label:!0});const ci=new kl({headingStyle:"atx",hr:"---",bulletListMarker:"-",codeBlockStyle:"fenced",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",preformattedCode:!1});ci.use(C8);ci.use(Iy);ci.addRule("strikethrough",{filter:["del","s","strike"],replacement:function(e){return"~~"+e+"~~"}});ci.keep(e=>!(e&&e.nodeName==="DIV"));ci.addRule("checkbox",{filter:e=>{var t,n;if(e.tagName==="INPUT"&&e.getAttribute("type")==="checkbox"||e.tagName==="LABEL"&&((t=e.firstElementChild)==null?void 0:t.tagName)==="INPUT"&&((n=e.firstElementChild)==null?void 0:n.getAttribute("type"))==="checkbox")return!0},replacement:function(e,t){var n;return t.type==="checkbox"?t.checked?"[x]":"[ ]":t.tagName==="LABEL"&&((n=t.firstElementChild)==null?void 0:n.type)==="checkbox"?t.firstElementChild.checked?"[x]":"[ ]":null}});ci.addRule("container",{filter:e=>e.tagName==="DIV"&&e.classList.contains("container-wrapper"),replacement:function(e,t){let n="";for(let r of t.classList)if(r!="container-wrapper"){n=r;break}return`:::${n}
|
|
683
683
|
`+e.trim()+`
|
|
684
684
|
:::
|
|
685
|
-
`}});const Ml=e=>{if(!e)return e;const t=fm.render(e).trim();return t?Bo(t.includes("<pre")?t:t.replace(/\n/g,"")):e},T8=e=>{if(!e)return e;const t=new DOMParser().parseFromString(e,"text/html");t.querySelectorAll("colgroup").forEach(r=>r.remove()),t.querySelectorAll("li").forEach(r=>{const i=r.querySelector("div");if(i&&!i.querySelector("img")&&i.firstElementChild){const o=document.createDocumentFragment();o.append(" "),i.firstElementChild.childNodes.forEach(a=>{o.append(a.cloneNode(!0))}),i.replaceWith(o)}});const n=t.body.innerHTML;return ci.turndown(n)};ue("aie-header",CS);ue("aie-footer",TS);const N8={theme:"light",lang:"zh",contentRetentionKey:"ai-editor-content",editable:!0,draggable:!0,placeholder:"",toolbarSize:"small"};class O8 extends uI{constructor(t,n={}){super(n),z(this,"aiEditor"),this.aiEditor=t}parseHtml(t){function n(r){return new window.DOMParser().parseFromString(`<body>${r}</body>`,"text/html").body}return Ii.fromSchema(this.schema).parse(n(t),{}).content}parseMarkdown(t){const n=Ml(t);return this.parseHtml(n)}insertMarkdown(t){this.commands.insertContent(Ml(t))}}class A8{constructor(t){z(this,"customLayout",!1),z(this,"innerEditor"),z(this,"container"),z(this,"header"),z(this,"mainEl"),z(this,"footer"),z(this,"options"),z(this,"eventComponents",[]),this.options=T(T({},N8),t),this.initI18nAndInnerEditor()}initI18nAndInnerEditor(){const t=this.options.i18n||{},n={de:{translation:T(T({},PV),t.de)},en:{translation:T(T({},LV),t.en)},pt:{translation:T(T({},FV),t.pt)},zh:{translation:T(T({},MV),t.zh)},es:{translation:T(T({},BV),t.es)},hi:{translation:T(T({},UV),t.hi)},id:{translation:T(T({},HV),t.id)},ja:{translation:T(T({},VV),t.ja)},ko:{translation:T(T({},GV),t.ko)},th:{translation:T(T({},zV),t.th)},vi:{translation:T(T({},$V),t.vi)}};for(let r of Object.keys(t))r!="de"&&r!="en"&&r!="pt"&&r!="zh"&&(n[r]={translation:T({},t[r])});dt.init({lng:this.options.lang,resources:n},(r,i)=>{this.initInnerEditor()})}initInnerEditor(){const t=typeof this.options.element=="string"?document.querySelector(this.options.element):this.options.element;t.classList.add(`aie-theme-${this.options.theme}`),this.container=t.querySelector(".aie-container"),this.container?this.customLayout=!0:(this.container=document.createElement("div"),this.container.classList.add("aie-container")),t.appendChild(this.container),this.mainEl=document.createElement("div"),this.mainEl.style.flexGrow="1",this.mainEl.style.overflow="auto",this.header=new CS,this.eventComponents.push(this.header),this.footer=new TS,this.footer.initDraggable(this.options.draggable),this.eventComponents.push(this.footer);let n=this.options.content;if(typeof n=="string"&&(this.options.contentIsMarkdown?n=Ml(n):n=Bo(n)),this.options.contentRetention&&this.options.contentRetentionKey){const r=localStorage.getItem(this.options.contentRetentionKey);if(r)try{n=JSON.parse(r)}catch(i){console.error(i,"Can not parse the cache content from localStorage.")}}this.innerEditor=new O8(this,H(T({},this.options),{element:this.mainEl,content:n,editable:this.options.editable,extensions:this.getExtensions(),onCreate:r=>this.onCreate(r),onTransaction:r=>this.onTransaction(r),onFocus:()=>{var r,i;return(i=(r=this.options)==null?void 0:r.onFocus)==null?void 0:i.call(r,this)},onBlur:()=>{var r,i;return(i=(r=this.options)==null?void 0:r.onBlur)==null?void 0:i.call(r,this)},onDestroy:()=>{var r,i;return(i=(r=this.options)==null?void 0:r.onDestroy)==null?void 0:i.call(r,this)},editorProps:{attributes:{class:"aie-content"}}}))}getExtensions(){let t=kV(this,this.options);if(this.options.onCreateBefore){const n=this.options.onCreateBefore(this,t);n&&(t=n)}return t}onCreate(t){this.innerEditor.view.dom.style.height="calc(100% - 20px)",this.eventComponents.forEach(n=>{n.onCreate&&n.onCreate(t,this.options)}),(this.container.querySelector(".aie-container-header")||this.container).appendChild(this.header),(this.container.querySelector(".aie-container-main")||this.container).appendChild(this.mainEl),(this.container.querySelector(".aie-container-footer")||this.container).appendChild(this.footer),this.options.ai&&yr.init(this.innerEditor,this.options.ai),this.options.onCreated&&this.options.onCreated(this)}onTransaction(t){var n,r;if(this.eventComponents.forEach(i=>{i.onTransaction&&i.onTransaction(t)}),!t.transaction.getMeta("ignoreChanged")&&((r=(n=this.options).onTransaction)==null||r.call(n,this,t.transaction),t.transaction.docChanged&&this.options.onChange&&this.options.onChange(this),t.transaction.docChanged&&this.options.contentRetention&&this.options.contentRetentionKey)){const i=t.editor.getHTML();if(i==="<p></p>"||i==="")localStorage.removeItem(this.options.contentRetentionKey);else{const o=t.editor.getJSON();localStorage.setItem(this.options.contentRetentionKey,JSON.stringify(o))}}}getHtml(){return this.innerEditor.getHTML()}getJson(){return this.innerEditor.getJSON()}getText(){return this.innerEditor.getText()}getSelectedText(){const t=this.innerEditor.state.selection;return t.empty?"":Zl(this.innerEditor.state.doc,{from:t.from,to:t.to})}getMarkdown(){return T8(this.getHtml())}getOptions(){return this.options}getAttributes(t){return this.innerEditor.getAttributes(t)}setAttributes(t,n){this.innerEditor.commands.updateAttributes(t,n)}isActive(t,n){return typeof t=="object"||!n?this.innerEditor.isActive(t):this.innerEditor.isActive(t,n)}commands(){return this.innerEditor.commands}commandsChain(){return this.innerEditor.chain()}getOutline(){const t=this.innerEditor.state.doc,n=[];return t.descendants((r,i)=>{if(r.type.name==="heading"){const o=`aie-heading-${n.length+1}`;if(r.attrs.id!==o){const{state:{tr:s},view:{dispatch:l}}=this.innerEditor;l(s.setNodeMarkup(i,void 0,H(T({},r.attrs),{id:o})).setMeta("ignoreChanged",!0))}let a="";r.descendants(s=>{s.text&&(a+=s.text)}),n.push({id:o,text:a,level:r.attrs.level,pos:i,size:r.nodeSize})}}),n}focus(){return this.innerEditor.commands.focus(),this}focusPos(t){return this.innerEditor.commands.focus(t),this}focusStart(){return this.innerEditor.commands.focus("start"),this}focusEnd(){return this.innerEditor.commands.focus("end"),this}isFocused(){return this.innerEditor.isFocused}blur(){return this.innerEditor.commands.blur(),this}insert(t){return typeof t=="string"&&(t=Bo(t)),this.innerEditor.commands.insertContent(t),this}insertMarkdown(t){return this.innerEditor.insertMarkdown(t),this}setEditable(t){return this.options.editable=t,this.innerEditor.setEditable(t,!0),this.eventComponents.forEach(n=>{n.onEditableChange(t)}),this}setContent(t,n){return typeof t=="string"&&(t=Bo(t)),n===!1?this.clear().insert(t):this.focus().clear().insert(t),this}setMarkdownContent(t){const n=Ml(t);return this.setContent(n)}clear(){return this.innerEditor.commands.clearContent(!0),this}isEmpty(){return this.innerEditor.isEmpty}changeLang(t){return this.destroy(),this.options.lang=t,dt.changeLanguage(t),this.initInnerEditor(),this}changeTheme(t){const n=typeof this.options.element=="string"?document.querySelector(this.options.element):this.options.element;t||(t=this.options.theme==="dark"?"light":"dark"),n.classList.remove(`aie-theme-${this.options.theme}`),n.classList.add(`aie-theme-${t}`),this.options.theme=t}removeRetention(){return this.options.contentRetentionKey&&localStorage.removeItem(this.options.contentRetentionKey),this}destroy(){var t,n,r,i;(n=(t=this.options).onDestroy)==null||n.call(t,this),this.innerEditor.destroy(),this.eventComponents=[],this.customLayout?((r=this.header)==null||r.remove(),this.mainEl.remove(),(i=this.footer)==null||i.remove()):this.container.remove()}isDestroyed(){return this.innerEditor.isDestroyed}}const Dy=["undo","redo","brush","eraser","|","heading","font-family","font-size","highlight","font-color","|","bold","italic","underline","strike","link","hr","|","align","line-height","|","bullet-list","ordered-list","indent-decrease","indent-increase","break","|","container","table","|","fullscreen"],ky=["undo","redo","brush","eraser","|","heading","font-family","font-size","|","bold","italic","underline","strike","link","code","subscript","superscript","hr","todo","emoji","|","highlight","font-color","|","align","line-height","|","bullet-list","ordered-list","indent-decrease","indent-increase","break","|","image","video","attachment","quote","container","code-block","table","|","source-code","printer","fullscreen","ai"],R8=h.defineComponent({name:"Editor",props:{modelValue:{type:String,default:""},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:""},editorHeight:{type:[Number,String],default:350},viewHeight:{type:[Number,String],default:"fit-content"},mode:{type:String,default:"simple"},size:{type:String,default:"medium"},toolbarKeys:{type:Array,default:()=>[]},toolbarExcludeKeys:{type:Array,default:()=>[]},addToolbarKeys:{type:Array,default:()=>[]},theme:{type:String,default:"light"},contentIsMarkdown:{type:Boolean,default:!1},contentRetention:{type:Boolean,default:!1},contentRetentionKey:{type:String,default:"ae-ai-editor-content"},resizable:{type:Boolean,default:!0},toolbarTipEnable:{type:Boolean,default:!0},lang:{type:String,default:"zh"},editorOptions:{type:Object,default:()=>({})}},emits:["change","update:modelValue","focus","blur","created","destroy"],setup(e,{emit:t}){let n=!1,r="";const i=h.ref();function o(f){i.value=f}let a=null;function s(){var g;let f;const _=e.toolbarExcludeKeys||[];if(e.mode==="custom")f=e.toolbarKeys||[];else if(e.mode==="simple"){if(f=Dy,(g=e.addToolbarKeys)!=null&&g.length){const S=[...f],v=[];e.addToolbarKeys.forEach(y=>{if(Array.isArray(y)&&y.length===2){const[b,E]=y;let C=-1;if(typeof b=="number")C=b;else if(typeof b=="string"){const N=S.findIndex(R=>R===b);N>-1&&(C=N+1)}C>-1&&v.push({position:C,key:E})}}),v.sort((y,b)=>b.position-y.position).forEach(({position:y,key:b})=>{S.splice(y,0,b)}),f=S}}else f=ky;return H(T({},e.editorOptions),{lang:e.lang||"zh",toolbarSize:e.size||"small",toolbarKeys:f,toolbarExcludeKeys:_,editable:!e.disabled,placeholder:e.placeholder||"",theme:e.theme||"light",content:e.modelValue,contentIsMarkdown:e.contentIsMarkdown||!1,contentRetention:e.contentRetention||!1,contentRetentionKey:e.contentRetentionKey||"ae-ai-editor-content",draggable:e.resizable,toolbarTipEnable:e.toolbarTipEnable||!0})}function l(f){return f?e.contentIsMarkdown?f.getMarkdown():f.getHtml():""}function c(f){a&&(e.contentIsMarkdown?a.setMarkdownContent(f):a.setContent(f))}const d=ct.useDebounceFn(f=>{t("change",f),t("update:modelValue",f)},500);function u(){const f=s();a&&(a.destroy(),a=null),a=new A8(H(T({},f),{element:i.value,onChange:_=>{if(n)return;const g=l(_);g!==r&&(r=g,d(g))},onFocus:()=>{t("focus")},onBlur:()=>{t("blur")},onCreated:()=>{t("created")},onDestroy:()=>{t("destroy")}}))}h.watch(()=>e.modelValue,f=>{if(a){if(l(a)===f)return;n=!0,c(f),h.nextTick(()=>{n=!1})}},{immediate:!1}),h.watch(()=>e.disabled,f=>{f?a&&a.destroy():h.nextTick(()=>{u()})},{immediate:!1}),h.watch(()=>e.mode,()=>{u()},{immediate:!1}),h.onMounted(()=>Lt(this,null,function*(){yield h.nextTick(),u()})),h.onUnmounted(()=>{a&&a.destroy()});const p=h.computed(()=>({height:Ad(e.editorHeight)||"350px"})),m=h.computed(()=>({height:Ad(e.viewHeight)||"fit-content"}));return()=>e.disabled?h.createVNode("div",{class:"ae-ai-editor-view",style:m.value},[h.createVNode("div",{innerHTML:e.modelValue,class:"aie-container"},null)]):h.createVNode("div",{ref:f=>o(f),style:p.value,class:"ae-ai-editor"},null)}}),w8=ro(R8,[["__scopeId","data-v-8881ea87"]]),hm=Wn(w8),x8={Group:oA,Blank:cA,Alert:G.ElAlert,Divider:G.ElDivider,Image:G.ElImage,Result:G.ElResult,Autocomplete:G.ElAutocomplete,Cascader:G.ElCascader,Checkbox:G.ElCheckboxGroup,CheckboxButton:G.ElCheckboxGroup,ColorPicker:G.ElColorPicker,DatePicker:G.ElDatePicker,Editor:hm,Input:G.ElInput,InputNumber:G.ElInputNumber,InputTag:G.ElInputTag,Mention:G.ElMention,Radio:G.ElRadioGroup,RadioButton:G.ElRadioGroup,Rate:G.ElRate,Segmented:G.ElSegmented,Select:G.ElSelect,Slider:G.ElSlider,Switch:G.ElSwitch,Table:ep,TimePicker:G.ElTimePicker,TimeSelect:G.ElTimeSelect,Transfer:G.ElTransfer,TreeSelect:G.ElTreeSelect,Upload:Ul},I8={Checkbox:()=>!0,CheckboxButton:()=>!0,Table:()=>!0,InputTag:()=>!0,Transfer:()=>!0,Select:e=>!!e.multiple,TreeSelect:e=>!!e.multiple,TimePicker:e=>!!e.isRange,DatePicker:e=>["years","months","dates","datetimerange","daterange","monthrange","yearrange"].includes(e.type),Cascader:e=>{const t=T({multiple:!1,emitPath:!0},e.props);return!(t.multiple===!1&&t.emitPath===!1)}};function D8(e=[]){const t=h.shallowReactive(T(T({},x8),vs.components)),n=h.shallowReactive(T({},vs.componentConfigs)),r=h.shallowReactive(T(T({},I8),vs.arrayStrategies));return e.forEach(i=>{t[i.name]&&_e.warn("console.form.componentExists",{name:i.name}),t[i.name]=i.component,i.config&&(n[i.name]=i.config),i.isArrayFn&&(r[i.name]=i.isArrayFn),_e.success("console.form.componentRegistered",{name:i.name})}),{components:t,arrayStrategies:r,componentConfigs:n}}const k8=h.defineComponent({name:"AeForm",props:{model:{type:Object,default:()=>({})},schemas:{type:Array,default:()=>[]},stepValue:{type:[Number,null],default:null},disabled:{type:Boolean,default:!1},type:{type:String,default:"form"},size:{type:String,default:"default"},designable:{type:Boolean,default:!1},designableDirectives:{type:Object,default:()=>{}},designableColProps:{type:Function,default:()=>{}},excontext:{type:Object,default:()=>({})},schemaProps:{type:Object,default:()=>({})},labelWidth:{type:[String,Number],default:"120px"},showErrorNotice:{type:Boolean,default:!0},scrollRef:{type:Object,default:null},autoInitField:{type:Boolean,default:!0},imports:{type:Array,default:()=>[]},anchor:{type:Boolean,default:!1},anchorProps:{type:Object,default:()=>{}},anchorAffixStyle:{type:Object,default:()=>{}}},emits:["register","update:stepValue","init","change"],setup:(e,{emit:t,attrs:n,slots:r,expose:i})=>{const{components:o,arrayStrategies:a,componentConfigs:s}=D8(e.imports),{isValidating:l,formModel:c,elFormRef:d,baseElRowRef:u,componentRefs:p,schemasKeys:m,initValues:f,getDefaultModel:_,getFormModel:g,getElFormRef:S,setValues:v,clearValues:y,setValue:b,delValue:E,resetValidate:C,validate:N,scrollToKey:R}=hC(e,e.schemas,o,a);h.onMounted(()=>{t("register",h.unref(d)),h.unref(e).autoInitField?f(e.model):v(e.model),t("init",c.value)}),h.onBeforeUnmount(()=>{c.value={},d.value=null});const O=h.computed(()=>{const I=h.toRaw(h.unref(e).schemas),M=L=>{const{key:B,field:D,type:A,component:k,value:P,children:V}=L;let W=`${D||B}:${A||"Inputer"}:${k||""}:${P!==void 0?"hasValue":"noValue"}`;return V&&Array.isArray(V)&&(W+=`:children[${V.length}:${V.map(Z=>Z.key||Z.field).join(",")}]`),W};return I.map(M).join("|")});h.watch(O,()=>{l.value||(h.unref(e).autoInitField&&f(h.unref(c)),C())},{immediate:!1}),i({initValues:f,getDefaultModel:_,getFormModel:g,getElFormRef:S,setValues:v,clearValues:y,setValue:b,delValue:E,validate:N,resetValidate:C,scrollToKey:R});const{renderForm:w}=fC(e,t,n,r,c,d,p,u,m,o,s),{renderAnchor:x}=gC(e,c);return()=>h.createVNode("div",{class:"ae-form"},[e.anchor&&x(),w()])}}),My=Wn(k8),M8={class:"flex justify-between items-center h-54px pl-15px pr-15px relative"},L8={class:"flex items-center"},P8={class:"dialog-actions"},F8={key:1,class:"dialog-body-no-scroll"},B8=h.defineComponent({__name:"Dialog",props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:""},fullscreen:{type:Boolean,default:!1},isFullscreen:{type:Boolean,default:!1},maxHeight:{type:[String,Number],default:"400px"},draggable:{type:Boolean,default:!1},scrollable:{type:Boolean,default:!0},beforeClose:{type:Function},noHeader:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=h.useSlots(),r=e,i=t,o=h.computed(()=>{const p=["fullscreen","title","maxHeight","draggable","scrollable","beforeClose","noHeader"],m=h.useAttrs(),f=T(T({},m),r);for(const _ in f)p.indexOf(_)!==-1&&delete f[_];return f}),a=h.ref(r.isFullscreen),s=()=>{a.value=!h.unref(a)},l=h.ref(Sm(r.maxHeight)?`${r.maxHeight}px`:r.maxHeight);h.watch(()=>r.maxHeight,p=>{l.value=Sm(p)?`${p}px`:p});const c=h.computed(()=>({height:h.unref(l),padding:"15px"}));function d(){r.beforeClose!==void 0?r.beforeClose(()=>{i("update:modelValue",!1)}):i("update:modelValue",!1)}function u(){i("update:modelValue",!1)}return(p,m)=>(h.openBlock(),h.createBlock(h.unref(G.ElDialog),h.mergeProps(o.value,{fullscreen:a.value,"destroy-on-close":"","lock-scroll":"",draggable:e.draggable,top:"0","close-on-click-modal":!1,"show-close":!1,class:"ae-dialog"+(e.noHeader?" no-header":""),onClose:u}),h.createSlots({default:h.withCtx(()=>[e.scrollable?(h.openBlock(),h.createBlock(h.unref(G.ElScrollbar),{key:0,style:h.normalizeStyle(c.value)},{default:h.withCtx(()=>[h.renderSlot(p.$slots,"default")]),_:3},8,["style"])):(h.openBlock(),h.createElementBlock("div",F8,[h.renderSlot(p.$slots,"default")]))]),_:2},[e.noHeader?void 0:{name:"header",fn:h.withCtx(()=>[h.createElementVNode("div",M8,[h.createElementVNode("div",L8,[e.draggable?(h.openBlock(),h.createBlock(h.unref(Ut),{key:0,icon:"mdi:drag",class:"draggable-indicator",size:30})):h.createCommentVNode("",!0),h.renderSlot(p.$slots,"title",{},()=>[h.createTextVNode(h.toDisplayString(e.title),1)])]),h.createElementVNode("div",P8,[h.renderSlot(p.$slots,"header-actions"),e.fullscreen?(h.openBlock(),h.createElementBlock("div",{key:0,class:"dialog-action-btn",onClick:s},[h.createVNode(h.unref(Ut),{icon:a.value?"radix-icons:exit-full-screen":"radix-icons:enter-full-screen"},null,8,["icon"])])):h.createCommentVNode("",!0),h.createElementVNode("div",{class:"dialog-action-btn",onClick:m[0]||(m[0]=f=>d())},[h.createVNode(h.unref(Ut),{icon:"ep:close"})])])])]),key:"0"},h.unref(n).footer?{name:"footer",fn:h.withCtx(()=>[h.renderSlot(p.$slots,"footer")]),key:"1"}:void 0]),1040,["fullscreen","draggable","class"]))}}),Ly=Wn(B8),U8={class:"flex justify-between items-center h-54px pl-15px pr-15px"},H8={class:"flex items-center gap-8px"},V8={class:"drawer-actions"},G8=["onClick"],z8={class:"drawer-content"},$8={key:1,class:"drawer-body-no-scroll"},Y8=h.defineComponent({__name:"Drawer",props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:""},direction:{type:String,default:"rtl"},size:{type:[String,Number],default:"30%"},scrollable:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(e,{emit:t}){const n=h.useSlots(),r=e,i=t,o=h.computed(()=>{const s=["title","direction","size","scrollable"],l=h.useAttrs(),c=T(T({},l),r);for(const d in c)s.indexOf(d)!==-1&&delete c[d];return c}),a=()=>{i("update:modelValue",!1)};return(s,l)=>(h.openBlock(),h.createBlock(h.unref(G.ElDrawer),h.mergeProps(o.value,{direction:e.direction,size:e.size,"destroy-on-close":"","close-on-click-modal":!1,"show-close":!1,class:"ae-drawer",onClose:a}),h.createSlots({header:h.withCtx(({close:c})=>[h.createElementVNode("div",U8,[h.createElementVNode("div",H8,[h.renderSlot(s.$slots,"title",{},()=>[h.createTextVNode(h.toDisplayString(e.title),1)])]),h.createElementVNode("div",V8,[h.renderSlot(s.$slots,"header-actions"),h.createElementVNode("div",{class:"drawer-action-btn",onClick:c},[h.createVNode(h.unref(Ut),{icon:"ep:close"})],8,G8)])])]),default:h.withCtx(()=>[e.scrollable?(h.openBlock(),h.createBlock(h.unref(G.ElScrollbar),{key:0,class:"drawer-scrollbar"},{default:h.withCtx(()=>[h.createElementVNode("div",z8,[h.renderSlot(s.$slots,"default")])]),_:3})):(h.openBlock(),h.createElementBlock("div",$8,[h.renderSlot(s.$slots,"default")]))]),_:2},[h.unref(n).footer?{name:"footer",fn:h.withCtx(()=>[h.renderSlot(s.$slots,"footer")]),key:"0"}:void 0]),1040,["direction","size"]))}}),Py=Wn(Y8),q8=h.defineComponent({__name:"Tabs",props:{modelValue:{type:[String,Number],default:""},fillHeight:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},keepAlive:{type:Boolean,default:!0}},emits:["update:modelValue","tab-click","tab-change","tab-remove","tab-add","edit"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=h.computed(()=>{const m=["fillHeight","lazy","keepAlive"],f=h.useAttrs(),_=T(T({},f),r);for(const g in _)m.indexOf(g)!==-1&&delete _[g];return _}),a=m=>r.modelValue===m,s=h.ref(new Set);h.watch(()=>r.modelValue,m=>{m&&s.value.add(m)},{immediate:!0});const l=(m,f)=>{i("tab-click",m,f)},c=m=>{i("update:modelValue",m),i("tab-change",m)},d=m=>{i("tab-remove",m)},u=()=>{i("tab-add")},p=(m,f)=>{i("edit",m,f)};return h.provide("shouldShowTab",a),h.provide("parentLazy",h.computed(()=>r.lazy)),h.provide("parentKeepAlive",h.computed(()=>r.keepAlive)),t({shouldShowTab:a,loadedTabs:s}),(m,f)=>(h.openBlock(),h.createBlock(h.unref(G.ElTabs),h.mergeProps(o.value,{"model-value":e.modelValue,class:[{"ae-tabs-fill-height":e.fillHeight},"ae-tabs"],onTabClick:l,onTabChange:c,onTabRemove:d,onTabAdd:u,onEdit:p}),{default:h.withCtx(()=>[h.renderSlot(m.$slots,"default")]),_:3},16,["model-value","class"]))}}),j8={key:0,class:"ae-tab-pane-content"},Fy=h.defineComponent({__name:"TabPane",props:{label:{type:String,default:""},name:{type:[String,Number],required:!0},disabled:{type:Boolean,default:!1},closable:{type:Boolean,default:!1},lazy:{type:Boolean,default:void 0}},setup(e){const t=e,n=h.computed(()=>{const u=["lazy"],p=h.useAttrs(),m=T(T({},p),t);for(const f in m)u.indexOf(f)!==-1&&delete m[f];return m}),r=h.inject("shouldShowTab",()=>!0),i=h.inject("parentLazy",!1),o=h.inject("parentKeepAlive",!0),a=h.computed(()=>t.lazy!==void 0?t.lazy:i),s=h.ref(!1),l=h.computed(()=>r(t.name));h.watch(l,u=>{u&&a.value&&(s.value=!0)},{immediate:!0}),h.watch(l,u=>{!u&&!o&&a.value&&(s.value=!1)});const c=h.computed(()=>a.value?s.value:!0),d=h.computed(()=>a.value?l.value:!0);return(u,p)=>(h.openBlock(),h.createBlock(h.unref(G.ElTabPane),h.normalizeProps(h.guardReactiveProps(n.value)),{default:h.withCtx(()=>[c.value?h.withDirectives((h.openBlock(),h.createElementBlock("div",j8,[h.renderSlot(u.$slots,"default")],512)),[[h.vShow,d.value]]):h.createCommentVNode("",!0)]),_:3},16))}}),By=Wn(q8,{TabPane:Fy}),Uy=Wn(Fy),Sa={version:"0.1.8",buildVersion:"dev-20260105-1031",buildTime:new Date().toISOString(),env:"production"};function W8(){return Sa}function K8(){console.log("[Advanced-Ele-UI] Version Info:",Sa)}const Q8=(e,t)=>{[My,Ut,ep,hm,Ul,Ly,Py,By,Uy].forEach(r=>{e.use(r)}),t!=null&&t.locale&&Ag(t.locale),t!=null&&t.customLocale&&Object.entries(t.customLocale).forEach(([r,i])=>{Rg(r,i)}),t!=null&&t.formImports&&vs.registerComponents(t.formImports),t!=null&&t.tableImports&&ys.registerComponents(t.tableImports)},Z8={install:Q8,version:"0.1.8",buildVersion:Sa.buildVersion,versionInfo:Sa};exports.AeDialog=Ly;exports.AeDrawer=Py;exports.AeEditor=hm;exports.AeForm=My;exports.AeIcon=Ut;exports.AeTabPane=Uy;exports.AeTable=ep;exports.AeTabs=By;exports.AeUpload=Ul;exports.FULL_TOOLBAR_KEYS=ky;exports.SIMPLE_TOOLBAR_KEYS=Dy;exports.VERSION_INFO=Sa;exports.default=Z8;exports.enUS=Cg;exports.findNode=Mu;exports.findNodes=Ig;exports.formatAmount=Ju;exports.formatDate=cE;exports.formatSensitive=Xu;exports.getAutoRulesMap=ku;exports.getCurrentLocale=Zy;exports.getVersionInfo=W8;exports.locale=Jy;exports.printVersionInfo=K8;exports.setCustomLocale=Rg;exports.setLocale=Ag;exports.supportedLocales=eC;exports.useDict=dE;exports.zhCN=yg;
|
|
685
|
+
`}});const Ml=e=>{if(!e)return e;const t=fm.render(e).trim();return t?Bo(t.includes("<pre")?t:t.replace(/\n/g,"")):e},T8=e=>{if(!e)return e;const t=new DOMParser().parseFromString(e,"text/html");t.querySelectorAll("colgroup").forEach(r=>r.remove()),t.querySelectorAll("li").forEach(r=>{const i=r.querySelector("div");if(i&&!i.querySelector("img")&&i.firstElementChild){const o=document.createDocumentFragment();o.append(" "),i.firstElementChild.childNodes.forEach(a=>{o.append(a.cloneNode(!0))}),i.replaceWith(o)}});const n=t.body.innerHTML;return ci.turndown(n)};ue("aie-header",CS);ue("aie-footer",TS);const N8={theme:"light",lang:"zh",contentRetentionKey:"ai-editor-content",editable:!0,draggable:!0,placeholder:"",toolbarSize:"small"};class O8 extends uI{constructor(t,n={}){super(n),z(this,"aiEditor"),this.aiEditor=t}parseHtml(t){function n(r){return new window.DOMParser().parseFromString(`<body>${r}</body>`,"text/html").body}return Ii.fromSchema(this.schema).parse(n(t),{}).content}parseMarkdown(t){const n=Ml(t);return this.parseHtml(n)}insertMarkdown(t){this.commands.insertContent(Ml(t))}}class A8{constructor(t){z(this,"customLayout",!1),z(this,"innerEditor"),z(this,"container"),z(this,"header"),z(this,"mainEl"),z(this,"footer"),z(this,"options"),z(this,"eventComponents",[]),this.options=T(T({},N8),t),this.initI18nAndInnerEditor()}initI18nAndInnerEditor(){const t=this.options.i18n||{},n={de:{translation:T(T({},PV),t.de)},en:{translation:T(T({},LV),t.en)},pt:{translation:T(T({},FV),t.pt)},zh:{translation:T(T({},MV),t.zh)},es:{translation:T(T({},BV),t.es)},hi:{translation:T(T({},UV),t.hi)},id:{translation:T(T({},HV),t.id)},ja:{translation:T(T({},VV),t.ja)},ko:{translation:T(T({},GV),t.ko)},th:{translation:T(T({},zV),t.th)},vi:{translation:T(T({},$V),t.vi)}};for(let r of Object.keys(t))r!="de"&&r!="en"&&r!="pt"&&r!="zh"&&(n[r]={translation:T({},t[r])});dt.init({lng:this.options.lang,resources:n},(r,i)=>{this.initInnerEditor()})}initInnerEditor(){const t=typeof this.options.element=="string"?document.querySelector(this.options.element):this.options.element;t.classList.add(`aie-theme-${this.options.theme}`),this.container=t.querySelector(".aie-container"),this.container?this.customLayout=!0:(this.container=document.createElement("div"),this.container.classList.add("aie-container")),t.appendChild(this.container),this.mainEl=document.createElement("div"),this.mainEl.style.flexGrow="1",this.mainEl.style.overflow="auto",this.header=new CS,this.eventComponents.push(this.header),this.footer=new TS,this.footer.initDraggable(this.options.draggable),this.eventComponents.push(this.footer);let n=this.options.content;if(typeof n=="string"&&(this.options.contentIsMarkdown?n=Ml(n):n=Bo(n)),this.options.contentRetention&&this.options.contentRetentionKey){const r=localStorage.getItem(this.options.contentRetentionKey);if(r)try{n=JSON.parse(r)}catch(i){console.error(i,"Can not parse the cache content from localStorage.")}}this.innerEditor=new O8(this,H(T({},this.options),{element:this.mainEl,content:n,editable:this.options.editable,extensions:this.getExtensions(),onCreate:r=>this.onCreate(r),onTransaction:r=>this.onTransaction(r),onFocus:()=>{var r,i;return(i=(r=this.options)==null?void 0:r.onFocus)==null?void 0:i.call(r,this)},onBlur:()=>{var r,i;return(i=(r=this.options)==null?void 0:r.onBlur)==null?void 0:i.call(r,this)},onDestroy:()=>{var r,i;return(i=(r=this.options)==null?void 0:r.onDestroy)==null?void 0:i.call(r,this)},editorProps:{attributes:{class:"aie-content"}}}))}getExtensions(){let t=kV(this,this.options);if(this.options.onCreateBefore){const n=this.options.onCreateBefore(this,t);n&&(t=n)}return t}onCreate(t){this.innerEditor.view.dom.style.height="calc(100% - 20px)",this.eventComponents.forEach(n=>{n.onCreate&&n.onCreate(t,this.options)}),(this.container.querySelector(".aie-container-header")||this.container).appendChild(this.header),(this.container.querySelector(".aie-container-main")||this.container).appendChild(this.mainEl),(this.container.querySelector(".aie-container-footer")||this.container).appendChild(this.footer),this.options.ai&&yr.init(this.innerEditor,this.options.ai),this.options.onCreated&&this.options.onCreated(this)}onTransaction(t){var n,r;if(this.eventComponents.forEach(i=>{i.onTransaction&&i.onTransaction(t)}),!t.transaction.getMeta("ignoreChanged")&&((r=(n=this.options).onTransaction)==null||r.call(n,this,t.transaction),t.transaction.docChanged&&this.options.onChange&&this.options.onChange(this),t.transaction.docChanged&&this.options.contentRetention&&this.options.contentRetentionKey)){const i=t.editor.getHTML();if(i==="<p></p>"||i==="")localStorage.removeItem(this.options.contentRetentionKey);else{const o=t.editor.getJSON();localStorage.setItem(this.options.contentRetentionKey,JSON.stringify(o))}}}getHtml(){return this.innerEditor.getHTML()}getJson(){return this.innerEditor.getJSON()}getText(){return this.innerEditor.getText()}getSelectedText(){const t=this.innerEditor.state.selection;return t.empty?"":Zl(this.innerEditor.state.doc,{from:t.from,to:t.to})}getMarkdown(){return T8(this.getHtml())}getOptions(){return this.options}getAttributes(t){return this.innerEditor.getAttributes(t)}setAttributes(t,n){this.innerEditor.commands.updateAttributes(t,n)}isActive(t,n){return typeof t=="object"||!n?this.innerEditor.isActive(t):this.innerEditor.isActive(t,n)}commands(){return this.innerEditor.commands}commandsChain(){return this.innerEditor.chain()}getOutline(){const t=this.innerEditor.state.doc,n=[];return t.descendants((r,i)=>{if(r.type.name==="heading"){const o=`aie-heading-${n.length+1}`;if(r.attrs.id!==o){const{state:{tr:s},view:{dispatch:l}}=this.innerEditor;l(s.setNodeMarkup(i,void 0,H(T({},r.attrs),{id:o})).setMeta("ignoreChanged",!0))}let a="";r.descendants(s=>{s.text&&(a+=s.text)}),n.push({id:o,text:a,level:r.attrs.level,pos:i,size:r.nodeSize})}}),n}focus(){return this.innerEditor.commands.focus(),this}focusPos(t){return this.innerEditor.commands.focus(t),this}focusStart(){return this.innerEditor.commands.focus("start"),this}focusEnd(){return this.innerEditor.commands.focus("end"),this}isFocused(){return this.innerEditor.isFocused}blur(){return this.innerEditor.commands.blur(),this}insert(t){return typeof t=="string"&&(t=Bo(t)),this.innerEditor.commands.insertContent(t),this}insertMarkdown(t){return this.innerEditor.insertMarkdown(t),this}setEditable(t){return this.options.editable=t,this.innerEditor.setEditable(t,!0),this.eventComponents.forEach(n=>{n.onEditableChange(t)}),this}setContent(t,n){return typeof t=="string"&&(t=Bo(t)),n===!1?this.clear().insert(t):this.focus().clear().insert(t),this}setMarkdownContent(t){const n=Ml(t);return this.setContent(n)}clear(){return this.innerEditor.commands.clearContent(!0),this}isEmpty(){return this.innerEditor.isEmpty}changeLang(t){return this.destroy(),this.options.lang=t,dt.changeLanguage(t),this.initInnerEditor(),this}changeTheme(t){const n=typeof this.options.element=="string"?document.querySelector(this.options.element):this.options.element;t||(t=this.options.theme==="dark"?"light":"dark"),n.classList.remove(`aie-theme-${this.options.theme}`),n.classList.add(`aie-theme-${t}`),this.options.theme=t}removeRetention(){return this.options.contentRetentionKey&&localStorage.removeItem(this.options.contentRetentionKey),this}destroy(){var t,n,r,i;(n=(t=this.options).onDestroy)==null||n.call(t,this),this.innerEditor.destroy(),this.eventComponents=[],this.customLayout?((r=this.header)==null||r.remove(),this.mainEl.remove(),(i=this.footer)==null||i.remove()):this.container.remove()}isDestroyed(){return this.innerEditor.isDestroyed}}const Dy=["undo","redo","brush","eraser","|","heading","font-family","font-size","highlight","font-color","|","bold","italic","underline","strike","link","hr","|","align","line-height","|","bullet-list","ordered-list","indent-decrease","indent-increase","break","|","container","table","|","fullscreen"],ky=["undo","redo","brush","eraser","|","heading","font-family","font-size","|","bold","italic","underline","strike","link","code","subscript","superscript","hr","todo","emoji","|","highlight","font-color","|","align","line-height","|","bullet-list","ordered-list","indent-decrease","indent-increase","break","|","image","video","attachment","quote","container","code-block","table","|","source-code","printer","fullscreen","ai"],R8=h.defineComponent({name:"Editor",props:{modelValue:{type:String,default:""},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:""},editorHeight:{type:[Number,String],default:350},viewHeight:{type:[Number,String],default:"fit-content"},mode:{type:String,default:"simple"},size:{type:String,default:"medium"},toolbarKeys:{type:Array,default:()=>[]},toolbarExcludeKeys:{type:Array,default:()=>[]},addToolbarKeys:{type:Array,default:()=>[]},theme:{type:String,default:"light"},contentIsMarkdown:{type:Boolean,default:!1},contentRetention:{type:Boolean,default:!1},contentRetentionKey:{type:String,default:"ae-ai-editor-content"},resizable:{type:Boolean,default:!0},toolbarTipEnable:{type:Boolean,default:!0},lang:{type:String,default:"zh"},editorOptions:{type:Object,default:()=>({})}},emits:["change","update:modelValue","focus","blur","created","destroy"],setup(e,{emit:t}){let n=!1,r="";const i=h.ref();function o(f){i.value=f}let a=null;function s(){var g;let f;const _=e.toolbarExcludeKeys||[];if(e.mode==="custom")f=e.toolbarKeys||[];else if(e.mode==="simple"){if(f=Dy,(g=e.addToolbarKeys)!=null&&g.length){const S=[...f],v=[];e.addToolbarKeys.forEach(y=>{if(Array.isArray(y)&&y.length===2){const[b,E]=y;let C=-1;if(typeof b=="number")C=b;else if(typeof b=="string"){const N=S.findIndex(R=>R===b);N>-1&&(C=N+1)}C>-1&&v.push({position:C,key:E})}}),v.sort((y,b)=>b.position-y.position).forEach(({position:y,key:b})=>{S.splice(y,0,b)}),f=S}}else f=ky;return H(T({},e.editorOptions),{lang:e.lang||"zh",toolbarSize:e.size||"small",toolbarKeys:f,toolbarExcludeKeys:_,editable:!e.disabled,placeholder:e.placeholder||"",theme:e.theme||"light",content:e.modelValue,contentIsMarkdown:e.contentIsMarkdown||!1,contentRetention:e.contentRetention||!1,contentRetentionKey:e.contentRetentionKey||"ae-ai-editor-content",draggable:e.resizable,toolbarTipEnable:e.toolbarTipEnable||!0})}function l(f){return f?e.contentIsMarkdown?f.getMarkdown():f.getHtml():""}function c(f){a&&(e.contentIsMarkdown?a.setMarkdownContent(f):a.setContent(f))}const d=ct.useDebounceFn(f=>{t("change",f),t("update:modelValue",f)},500);function u(){const f=s();a&&(a.destroy(),a=null),a=new A8(H(T({},f),{element:i.value,onChange:_=>{if(n)return;const g=l(_);g!==r&&(r=g,d(g))},onFocus:()=>{t("focus")},onBlur:()=>{t("blur")},onCreated:()=>{t("created")},onDestroy:()=>{t("destroy")}}))}h.watch(()=>e.modelValue,f=>{if(a){if(l(a)===f)return;n=!0,c(f),h.nextTick(()=>{n=!1})}},{immediate:!1}),h.watch(()=>e.disabled,f=>{f?a&&a.destroy():h.nextTick(()=>{u()})},{immediate:!1}),h.watch(()=>e.mode,()=>{u()},{immediate:!1}),h.onMounted(()=>Lt(this,null,function*(){yield h.nextTick(),u()})),h.onUnmounted(()=>{a&&a.destroy()});const p=h.computed(()=>({height:Ad(e.editorHeight)||"350px"})),m=h.computed(()=>({height:Ad(e.viewHeight)||"fit-content"}));return()=>e.disabled?h.createVNode("div",{class:"ae-ai-editor-view",style:m.value},[h.createVNode("div",{innerHTML:e.modelValue,class:"aie-container"},null)]):h.createVNode("div",{ref:f=>o(f),style:p.value,class:"ae-ai-editor"},null)}}),w8=ro(R8,[["__scopeId","data-v-8881ea87"]]),hm=Wn(w8),x8={Group:oA,Blank:cA,Alert:G.ElAlert,Divider:G.ElDivider,Image:G.ElImage,Result:G.ElResult,Autocomplete:G.ElAutocomplete,Cascader:G.ElCascader,Checkbox:G.ElCheckboxGroup,CheckboxButton:G.ElCheckboxGroup,ColorPicker:G.ElColorPicker,DatePicker:G.ElDatePicker,Editor:hm,Input:G.ElInput,InputNumber:G.ElInputNumber,InputTag:G.ElInputTag,Mention:G.ElMention,Radio:G.ElRadioGroup,RadioButton:G.ElRadioGroup,Rate:G.ElRate,Segmented:G.ElSegmented,Select:G.ElSelect,Slider:G.ElSlider,Switch:G.ElSwitch,Table:ep,TimePicker:G.ElTimePicker,TimeSelect:G.ElTimeSelect,Transfer:G.ElTransfer,TreeSelect:G.ElTreeSelect,Upload:Ul},I8={Checkbox:()=>!0,CheckboxButton:()=>!0,Table:()=>!0,InputTag:()=>!0,Transfer:()=>!0,Select:e=>!!e.multiple,TreeSelect:e=>!!e.multiple,TimePicker:e=>!!e.isRange,DatePicker:e=>["years","months","dates","datetimerange","daterange","monthrange","yearrange"].includes(e.type),Cascader:e=>{const t=T({multiple:!1,emitPath:!0},e.props);return!(t.multiple===!1&&t.emitPath===!1)}};function D8(e=[]){const t=h.shallowReactive(T(T({},x8),vs.components)),n=h.shallowReactive(T({},vs.componentConfigs)),r=h.shallowReactive(T(T({},I8),vs.arrayStrategies));return e.forEach(i=>{t[i.name]&&_e.warn("console.form.componentExists",{name:i.name}),t[i.name]=i.component,i.config&&(n[i.name]=i.config),i.isArrayFn&&(r[i.name]=i.isArrayFn),_e.success("console.form.componentRegistered",{name:i.name})}),{components:t,arrayStrategies:r,componentConfigs:n}}const k8=h.defineComponent({name:"AeForm",props:{model:{type:Object,default:()=>({})},schemas:{type:Array,default:()=>[]},stepValue:{type:[Number,null],default:null},disabled:{type:Boolean,default:!1},type:{type:String,default:"form"},size:{type:String,default:"default"},designable:{type:Boolean,default:!1},designableDirectives:{type:Object,default:()=>{}},designableColProps:{type:Function,default:()=>{}},excontext:{type:Object,default:()=>({})},schemaProps:{type:Object,default:()=>({})},labelWidth:{type:[String,Number],default:"120px"},showErrorNotice:{type:Boolean,default:!0},scrollRef:{type:Object,default:null},autoInitField:{type:Boolean,default:!0},imports:{type:Array,default:()=>[]},anchor:{type:Boolean,default:!1},anchorProps:{type:Object,default:()=>{}},anchorAffixStyle:{type:Object,default:()=>{}}},emits:["register","update:stepValue","init","change"],setup:(e,{emit:t,attrs:n,slots:r,expose:i})=>{const{components:o,arrayStrategies:a,componentConfigs:s}=D8(e.imports),{isValidating:l,formModel:c,elFormRef:d,baseElRowRef:u,componentRefs:p,schemasKeys:m,initValues:f,getDefaultModel:_,getFormModel:g,getElFormRef:S,setValues:v,clearValues:y,setValue:b,delValue:E,resetValidate:C,validate:N,scrollToKey:R}=hC(e,e.schemas,o,a);h.onMounted(()=>{t("register",h.unref(d)),h.unref(e).autoInitField?f(e.model):v(e.model),t("init",c.value)}),h.onBeforeUnmount(()=>{c.value={},d.value=null});const O=h.computed(()=>{const I=h.toRaw(h.unref(e).schemas),M=L=>{const{key:B,field:D,type:A,component:k,value:P,children:V}=L;let W=`${D||B}:${A||"Inputer"}:${k||""}:${P!==void 0?"hasValue":"noValue"}`;return V&&Array.isArray(V)&&(W+=`:children[${V.length}:${V.map(Z=>Z.key||Z.field).join(",")}]`),W};return I.map(M).join("|")});h.watch(O,()=>{l.value||(h.unref(e).autoInitField&&f(h.unref(c)),C())},{immediate:!1}),i({initValues:f,getDefaultModel:_,getFormModel:g,getElFormRef:S,setValues:v,clearValues:y,setValue:b,delValue:E,validate:N,resetValidate:C,scrollToKey:R});const{renderForm:w}=fC(e,t,n,r,c,d,p,u,m,o,s),{renderAnchor:x}=gC(e,c);return()=>h.createVNode("div",{class:"ae-form"},[e.anchor&&x(),w()])}}),My=Wn(k8),M8={class:"flex justify-between items-center h-54px pl-15px pr-15px relative"},L8={class:"flex items-center"},P8={class:"dialog-actions"},F8={key:1,class:"dialog-body-no-scroll"},B8=h.defineComponent({__name:"Dialog",props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:""},fullscreen:{type:Boolean,default:!1},isFullscreen:{type:Boolean,default:!1},maxHeight:{type:[String,Number],default:"400px"},draggable:{type:Boolean,default:!1},scrollable:{type:Boolean,default:!0},beforeClose:{type:Function},noHeader:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=h.useSlots(),r=e,i=t,o=h.computed(()=>{const p=["fullscreen","title","maxHeight","draggable","scrollable","beforeClose","noHeader"],m=h.useAttrs(),f=T(T({},m),r);for(const _ in f)p.indexOf(_)!==-1&&delete f[_];return f}),a=h.ref(r.isFullscreen),s=()=>{a.value=!h.unref(a)},l=h.ref(Sm(r.maxHeight)?`${r.maxHeight}px`:r.maxHeight);h.watch(()=>r.maxHeight,p=>{l.value=Sm(p)?`${p}px`:p});const c=h.computed(()=>({height:h.unref(l),padding:"15px"}));function d(){r.beforeClose!==void 0?r.beforeClose(()=>{i("update:modelValue",!1)}):i("update:modelValue",!1)}function u(){i("update:modelValue",!1)}return(p,m)=>(h.openBlock(),h.createBlock(h.unref(G.ElDialog),h.mergeProps(o.value,{fullscreen:a.value,"destroy-on-close":"","lock-scroll":"",draggable:e.draggable,top:"0","close-on-click-modal":!1,"show-close":!1,class:"ae-dialog"+(e.noHeader?" no-header":""),onClose:u}),h.createSlots({default:h.withCtx(()=>[e.scrollable?(h.openBlock(),h.createBlock(h.unref(G.ElScrollbar),{key:0,style:h.normalizeStyle(c.value)},{default:h.withCtx(()=>[h.renderSlot(p.$slots,"default")]),_:3},8,["style"])):(h.openBlock(),h.createElementBlock("div",F8,[h.renderSlot(p.$slots,"default")]))]),_:2},[e.noHeader?void 0:{name:"header",fn:h.withCtx(()=>[h.createElementVNode("div",M8,[h.createElementVNode("div",L8,[e.draggable?(h.openBlock(),h.createBlock(h.unref(Ut),{key:0,icon:"mdi:drag",class:"draggable-indicator",size:30})):h.createCommentVNode("",!0),h.renderSlot(p.$slots,"title",{},()=>[h.createTextVNode(h.toDisplayString(e.title),1)])]),h.createElementVNode("div",P8,[h.renderSlot(p.$slots,"header-actions"),e.fullscreen?(h.openBlock(),h.createElementBlock("div",{key:0,class:"dialog-action-btn",onClick:s},[h.createVNode(h.unref(Ut),{icon:a.value?"radix-icons:exit-full-screen":"radix-icons:enter-full-screen"},null,8,["icon"])])):h.createCommentVNode("",!0),h.createElementVNode("div",{class:"dialog-action-btn",onClick:m[0]||(m[0]=f=>d())},[h.createVNode(h.unref(Ut),{icon:"ep:close"})])])])]),key:"0"},h.unref(n).footer?{name:"footer",fn:h.withCtx(()=>[h.renderSlot(p.$slots,"footer")]),key:"1"}:void 0]),1040,["fullscreen","draggable","class"]))}}),Ly=Wn(B8),U8={class:"flex justify-between items-center h-54px pl-15px pr-15px"},H8={class:"flex items-center gap-8px"},V8={class:"drawer-actions"},G8=["onClick"],z8={class:"drawer-content"},$8={key:1,class:"drawer-body-no-scroll"},Y8=h.defineComponent({__name:"Drawer",props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:""},direction:{type:String,default:"rtl"},size:{type:[String,Number],default:"30%"},scrollable:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(e,{emit:t}){const n=h.useSlots(),r=e,i=t,o=h.computed(()=>{const s=["title","direction","size","scrollable"],l=h.useAttrs(),c=T(T({},l),r);for(const d in c)s.indexOf(d)!==-1&&delete c[d];return c}),a=()=>{i("update:modelValue",!1)};return(s,l)=>(h.openBlock(),h.createBlock(h.unref(G.ElDrawer),h.mergeProps(o.value,{direction:e.direction,size:e.size,"destroy-on-close":"","close-on-click-modal":!1,"show-close":!1,class:"ae-drawer",onClose:a}),h.createSlots({header:h.withCtx(({close:c})=>[h.createElementVNode("div",U8,[h.createElementVNode("div",H8,[h.renderSlot(s.$slots,"title",{},()=>[h.createTextVNode(h.toDisplayString(e.title),1)])]),h.createElementVNode("div",V8,[h.renderSlot(s.$slots,"header-actions"),h.createElementVNode("div",{class:"drawer-action-btn",onClick:c},[h.createVNode(h.unref(Ut),{icon:"ep:close"})],8,G8)])])]),default:h.withCtx(()=>[e.scrollable?(h.openBlock(),h.createBlock(h.unref(G.ElScrollbar),{key:0,class:"drawer-scrollbar"},{default:h.withCtx(()=>[h.createElementVNode("div",z8,[h.renderSlot(s.$slots,"default")])]),_:3})):(h.openBlock(),h.createElementBlock("div",$8,[h.renderSlot(s.$slots,"default")]))]),_:2},[h.unref(n).footer?{name:"footer",fn:h.withCtx(()=>[h.renderSlot(s.$slots,"footer")]),key:"0"}:void 0]),1040,["direction","size"]))}}),Py=Wn(Y8),q8=h.defineComponent({__name:"Tabs",props:{modelValue:{type:[String,Number],default:""},fillHeight:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},keepAlive:{type:Boolean,default:!0}},emits:["update:modelValue","tab-click","tab-change","tab-remove","tab-add","edit"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=h.computed(()=>{const m=["fillHeight","lazy","keepAlive"],f=h.useAttrs(),_=T(T({},f),r);for(const g in _)m.indexOf(g)!==-1&&delete _[g];return _}),a=m=>r.modelValue===m,s=h.ref(new Set);h.watch(()=>r.modelValue,m=>{m&&s.value.add(m)},{immediate:!0});const l=(m,f)=>{i("tab-click",m,f)},c=m=>{i("update:modelValue",m),i("tab-change",m)},d=m=>{i("tab-remove",m)},u=()=>{i("tab-add")},p=(m,f)=>{i("edit",m,f)};return h.provide("shouldShowTab",a),h.provide("parentLazy",h.computed(()=>r.lazy)),h.provide("parentKeepAlive",h.computed(()=>r.keepAlive)),t({shouldShowTab:a,loadedTabs:s}),(m,f)=>(h.openBlock(),h.createBlock(h.unref(G.ElTabs),h.mergeProps(o.value,{"model-value":e.modelValue,class:[{"ae-tabs-fill-height":e.fillHeight},"ae-tabs"],onTabClick:l,onTabChange:c,onTabRemove:d,onTabAdd:u,onEdit:p}),{default:h.withCtx(()=>[h.renderSlot(m.$slots,"default")]),_:3},16,["model-value","class"]))}}),j8={key:0,class:"ae-tab-pane-content"},Fy=h.defineComponent({__name:"TabPane",props:{label:{type:String,default:""},name:{type:[String,Number],required:!0},disabled:{type:Boolean,default:!1},closable:{type:Boolean,default:!1},lazy:{type:Boolean,default:void 0}},setup(e){const t=e,n=h.computed(()=>{const u=["lazy"],p=h.useAttrs(),m=T(T({},p),t);for(const f in m)u.indexOf(f)!==-1&&delete m[f];return m}),r=h.inject("shouldShowTab",()=>!0),i=h.inject("parentLazy",!1),o=h.inject("parentKeepAlive",!0),a=h.computed(()=>t.lazy!==void 0?t.lazy:i),s=h.ref(!1),l=h.computed(()=>r(t.name));h.watch(l,u=>{u&&a.value&&(s.value=!0)},{immediate:!0}),h.watch(l,u=>{!u&&!o&&a.value&&(s.value=!1)});const c=h.computed(()=>a.value?s.value:!0),d=h.computed(()=>a.value?l.value:!0);return(u,p)=>(h.openBlock(),h.createBlock(h.unref(G.ElTabPane),h.normalizeProps(h.guardReactiveProps(n.value)),{default:h.withCtx(()=>[c.value?h.withDirectives((h.openBlock(),h.createElementBlock("div",j8,[h.renderSlot(u.$slots,"default")],512)),[[h.vShow,d.value]]):h.createCommentVNode("",!0)]),_:3},16))}}),By=Wn(q8,{TabPane:Fy}),Uy=Wn(Fy),Sa={version:"0.1.8",buildVersion:"dev-20260105-1629",buildTime:new Date().toISOString(),env:"production"};function W8(){return Sa}function K8(){console.log("[Advanced-Ele-UI] Version Info:",Sa)}const Q8=(e,t)=>{[My,Ut,ep,hm,Ul,Ly,Py,By,Uy].forEach(r=>{e.use(r)}),t!=null&&t.locale&&Ag(t.locale),t!=null&&t.customLocale&&Object.entries(t.customLocale).forEach(([r,i])=>{Rg(r,i)}),t!=null&&t.formImports&&vs.registerComponents(t.formImports),t!=null&&t.tableImports&&ys.registerComponents(t.tableImports)},Z8={install:Q8,version:"0.1.9",buildVersion:Sa.buildVersion,versionInfo:Sa};exports.AeDialog=Ly;exports.AeDrawer=Py;exports.AeEditor=hm;exports.AeForm=My;exports.AeIcon=Ut;exports.AeTabPane=Uy;exports.AeTable=ep;exports.AeTabs=By;exports.AeUpload=Ul;exports.FULL_TOOLBAR_KEYS=ky;exports.SIMPLE_TOOLBAR_KEYS=Dy;exports.VERSION_INFO=Sa;exports.default=Z8;exports.enUS=Cg;exports.findNode=Mu;exports.findNodes=Ig;exports.formatAmount=Ju;exports.formatDate=cE;exports.formatSensitive=Xu;exports.getAutoRulesMap=ku;exports.getCurrentLocale=Zy;exports.getVersionInfo=W8;exports.locale=Jy;exports.printVersionInfo=K8;exports.setCustomLocale=Rg;exports.setLocale=Ag;exports.supportedLocales=eC;exports.useDict=dE;exports.zhCN=yg;
|
|
686
686
|
//# sourceMappingURL=index.cjs.map
|