import{_ as s,b as B,K as V,$ as pe,cO as Xe,k as qe,g as Ne,c as Qe,a as _e,R as le,w as xe,cD as De,ar as ae,o as W,cP as Ge,cQ as Je}from"./bootstrap-Bqxdt4iG.js";import{a1 as oe,a3 as Ye,aa as fe,p as u,W as Ze,P as Ie,U as de,L as ue,E as ne,a8 as et,V as Ce,a6 as tt,F as Se,m as nt}from"../jse/index-index-BUJ_4tQs.js";import{Textarea as ot}from"./index-BfzlM1cI.js";import{i as it}from"./index-BgJpmtO-.js";import{o as ke}from"./operationUnit-vCu2co3e.js";import{b as rt}from"./css-BPcmMxJM.js";import{R as lt}from"./index-BNdxtbnh.js";import{T as se}from"./index-BF1oQ5ik.js";import{C as at}from"./CheckOutlined-CyOADmg7.js";import{u as st}from"./useMergedState-mzgb8Um4.js";var ct=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(o[n[i]]=e[n[i]]);return o};const dt={border:0,background:"transparent",padding:0,lineHeight:"inherit",display:"inline-block"},Oe=oe({compatConfig:{MODE:3},name:"TransButton",inheritAttrs:!1,props:{noStyle:{type:Boolean,default:void 0},onClick:Function,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0}},setup(e,t){let{slots:o,emit:n,attrs:i,expose:d}=t;const a=Ye(),r=v=>{const{keyCode:S}=v;S===V.ENTER&&v.preventDefault()},g=v=>{const{keyCode:S}=v;S===V.ENTER&&n("click",v)},C=v=>{n("click",v)},m=()=>{a.value&&a.value.focus()},$=()=>{a.value&&a.value.blur()};return fe(()=>{e.autofocus&&m()}),d({focus:m,blur:$}),()=>{var v;const{noStyle:S,disabled:_}=e,N=ct(e,["noStyle","disabled"]);let D={};return S||(D=s({},dt)),_&&(D.pointerEvents="none"),u("div",B(B(B({role:"button",tabindex:0,ref:a},N),i),{},{onClick:C,onKeydown:r,onKeyup:g,style:s(s({},D),i.style||{})}),[(v=o.default)===null||v===void 0?void 0:v.call(o)])}}});var ut={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"};function Ee(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(o).filter(function(i){return Object.getOwnPropertyDescriptor(o,i).enumerable}))),n.forEach(function(i){pt(e,i,o[i])})}return e}function pt(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var me=function(t,o){var n=Ee({},t,o.attrs);return u(pe,Ee({},n,{icon:ut}),null)};me.displayName="EnterOutlined";me.inheritAttrs=!1;const ft=(e,t,o,n)=>{const{sizeMarginHeadingVerticalEnd:i,fontWeightStrong:d}=n;return{marginBottom:i,color:o,fontWeight:d,fontSize:e,lineHeight:t}},mt=e=>{const t=[1,2,3,4,5],o={};return t.forEach(n=>{o[`
      h${n}&,
      div&-h${n},
      div&-h${n} > textarea,
      h${n}
    `]=ft(e[`fontSizeHeading${n}`],e[`lineHeightHeading${n}`],e.colorTextHeading,e)}),o},yt=e=>{const{componentCls:t}=e;return{"a&, a":s(s({},ke(e)),{textDecoration:e.linkDecoration,"&:active, &:hover":{textDecoration:e.linkHoverDecoration},[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:"none"}}})}},gt=()=>({code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",background:"rgba(150, 150, 150, 0.06)",border:"1px solid rgba(100, 100, 100, 0.2)",borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:Xe[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:600},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85}}),bt=e=>{const{componentCls:t}=e,n=it(e).inputPaddingVertical+1;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:-e.paddingSM,marginTop:-n,marginBottom:`calc(1em - ${n}px)`},[`${t}-edit-content-confirm`]:{position:"absolute",insetInlineEnd:e.marginXS+2,insetBlockEnd:e.marginXS,color:e.colorTextDescription,fontWeight:"normal",fontSize:e.fontSize,fontStyle:"normal",pointerEvents:"none"},textarea:{margin:"0!important",MozTransition:"none",height:"1em"}}}},ht=e=>({"&-copy-success":{"\n    &,\n    &:hover,\n    &:focus":{color:e.colorSuccess}}}),vt=()=>({"\n  a&-ellipsis,\n  span&-ellipsis\n  ":{display:"inline-block",maxWidth:"100%"},"&-single-line":{whiteSpace:"nowrap"},"&-ellipsis-single-line":{overflow:"hidden",textOverflow:"ellipsis","a&, span&":{verticalAlign:"bottom"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),xt=e=>{const{componentCls:t,sizeMarginHeadingVerticalStart:o}=e;return{[t]:s(s(s(s(s(s(s(s(s({color:e.colorText,wordBreak:"break-word",lineHeight:e.lineHeight,[`&${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success`]:{color:e.colorSuccess},[`&${t}-warning`]:{color:e.colorWarning},[`&${t}-danger`]:{color:e.colorError,"a&:active, a&:focus":{color:e.colorErrorActive},"a&:hover":{color:e.colorErrorHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"\n        div&,\n        p\n      ":{marginBottom:"1em"}},mt(e)),{[`
      & + h1${t},
      & + h2${t},
      & + h3${t},
      & + h4${t},
      & + h5${t}
      `]:{marginTop:o},"\n      div,\n      ul,\n      li,\n      p,\n      h1,\n      h2,\n      h3,\n      h4,\n      h5":{"\n        + h1,\n        + h2,\n        + h3,\n        + h4,\n        + h5\n        ":{marginTop:o}}}),gt()),yt(e)),{[`
        ${t}-expand,
        ${t}-edit,
        ${t}-copy
      `]:s(s({},ke(e)),{marginInlineStart:e.marginXXS})}),bt(e)),ht(e)),vt()),{"&-rtl":{direction:"rtl"}})}},Be=qe("Typography",e=>[xt(e)],{sizeMarginHeadingVerticalStart:"1.2em",sizeMarginHeadingVerticalEnd:"0.5em"}),Ct=()=>({prefixCls:String,value:String,maxlength:Number,autoSize:{type:[Boolean,Object]},onSave:Function,onCancel:Function,onEnd:Function,onChange:Function,originContent:String,direction:String,component:String}),St=oe({compatConfig:{MODE:3},name:"Editable",inheritAttrs:!1,props:Ct(),setup(e,t){let{emit:o,slots:n,attrs:i}=t;const{prefixCls:d}=Ze(e),a=Ie({current:e.value||"",lastKeyCode:void 0,inComposition:!1,cancelFlag:!1});de(()=>e.value,y=>{a.current=y});const r=ue();fe(()=>{var y;if(r.value){const p=(y=r.value)===null||y===void 0?void 0:y.resizableTextArea,h=p==null?void 0:p.textArea;h.focus();const{length:b}=h.value;h.setSelectionRange(b,b)}});function g(y){r.value=y}function C(y){let{target:{value:p}}=y;a.current=p.replace(/[\r\n]/g,""),o("change",a.current)}function m(){a.inComposition=!0}function $(){a.inComposition=!1}function v(y){const{keyCode:p}=y;p===V.ENTER&&y.preventDefault(),!a.inComposition&&(a.lastKeyCode=p)}function S(y){const{keyCode:p,ctrlKey:h,altKey:b,metaKey:w,shiftKey:H}=y;a.lastKeyCode===p&&!a.inComposition&&!h&&!b&&!w&&!H&&(p===V.ENTER?(N(),o("end")):p===V.ESC&&(a.current=e.originContent,o("cancel")))}function _(){N()}function N(){o("save",a.current.trim())}const[D,j]=Be(d);return()=>{const y=Ne({[`${d.value}`]:!0,[`${d.value}-edit-content`]:!0,[`${d.value}-rtl`]:e.direction==="rtl",[e.component?`${d.value}-${e.component}`:""]:!0},i.class,j.value);return D(u("div",B(B({},i),{},{class:y}),[u(ot,{ref:g,maxlength:e.maxlength,value:a.current,onChange:C,onKeydown:v,onKeyup:S,onCompositionstart:m,onCompositionend:$,onBlur:_,rows:1,autoSize:e.autoSize===void 0||e.autoSize},null),n.enterIcon?n.enterIcon({className:`${e.prefixCls}-edit-content-confirm`}):u(me,{class:`${e.prefixCls}-edit-content-confirm`},null)]))}}}),Ot=3,Et=8;let E;const ce={padding:0,margin:0,display:"inline",lineHeight:"inherit"};function je(e,t){e.setAttribute("aria-hidden","true");const o=window.getComputedStyle(t),n=rt(o);e.setAttribute("style",n),e.style.position="fixed",e.style.left="0",e.style.height="auto",e.style.minHeight="auto",e.style.maxHeight="auto",e.style.paddingTop="0",e.style.paddingBottom="0",e.style.borderTopWidth="0",e.style.borderBottomWidth="0",e.style.top="-999999px",e.style.zIndex="-1000",e.style.textOverflow="clip",e.style.whiteSpace="normal",e.style.webkitLineClamp="none"}function Tt(e){const t=document.createElement("div");je(t,e),t.appendChild(document.createTextNode("text")),document.body.appendChild(t);const o=t.getBoundingClientRect().height;return document.body.removeChild(t),o}const wt=(e,t,o,n,i)=>{E||(E=document.createElement("div"),E.setAttribute("aria-hidden","true"),document.body.appendChild(E));const{rows:d,suffix:a=""}=t,r=Tt(e),g=Math.round(r*d*100)/100;je(E,e);const C=Qe({render(){return u("div",{style:ce},[u("span",{style:ce},[o,a]),u("span",{style:ce},[n])])}});C.mount(E);function m(){return Math.round(E.getBoundingClientRect().height*100)/100-.1<=g}if(m())return C.unmount(),{content:o,text:E.innerHTML,ellipsis:!1};const $=Array.prototype.slice.apply(E.childNodes[0].childNodes[0].cloneNode(!0).childNodes).filter(p=>{let{nodeType:h,data:b}=p;return h!==Et&&b!==""}),v=Array.prototype.slice.apply(E.childNodes[0].childNodes[1].cloneNode(!0).childNodes);C.unmount();const S=[];E.innerHTML="";const _=document.createElement("span");E.appendChild(_);const N=document.createTextNode(i+a);_.appendChild(N),v.forEach(p=>{E.appendChild(p)});function D(p){_.insertBefore(p,N)}function j(p,h){let b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,w=arguments.length>3&&arguments[3]!==void 0?arguments[3]:h.length,H=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;const R=Math.floor((b+w)/2),ie=h.slice(0,R);if(p.textContent=ie,b>=w-1)for(let z=w;z>=b;z-=1){const F=h.slice(0,z);if(p.textContent=F,m()||!F)return z===h.length?{finished:!1,vNode:h}:{finished:!0,vNode:F}}return m()?j(p,h,R,w,R):j(p,h,b,R,H)}function y(p){if(p.nodeType===Ot){const b=p.textContent||"",w=document.createTextNode(b);return D(w),j(w,b)}return{finished:!1,vNode:null}}return $.some(p=>{const{finished:h,vNode:b}=y(p);return b&&S.push(b),h}),{content:S,text:E.innerHTML,ellipsis:!0}};var Pt=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(o[n[i]]=e[n[i]]);return o};const $t=()=>({prefixCls:String,direction:String,component:String}),T=oe({name:"ATypography",inheritAttrs:!1,props:$t(),setup(e,t){let{slots:o,attrs:n}=t;const{prefixCls:i,direction:d}=_e("typography",e),[a,r]=Be(i);return()=>{var g;const C=s(s({},e),n),{prefixCls:m,direction:$,component:v="article"}=C,S=Pt(C,["prefixCls","direction","component"]);return a(u(v,B(B({},S),{},{class:Ne(i.value,{[`${i.value}-rtl`]:d.value==="rtl"},n.class,r.value)}),{default:()=>[(g=o.default)===null||g===void 0?void 0:g.call(o)]}))}}}),Nt=()=>{const e=document.getSelection();if(!e.rangeCount)return function(){};let t=document.activeElement;const o=[];for(let n=0;n<e.rangeCount;n++)o.push(e.getRangeAt(n));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||o.forEach(function(n){e.addRange(n)}),t&&t.focus()}},Te={"text/plain":"Text","text/html":"Url",default:"Text"},_t="Copy to clipboard: #{key}, Enter";function Dt(e){const t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function It(e,t){let o,n,i,d,a,r=!1;t||(t={});const g=t.debug||!1;try{if(n=Nt(),i=document.createRange(),d=document.getSelection(),a=document.createElement("span"),a.textContent=e,a.style.all="unset",a.style.position="fixed",a.style.top=0,a.style.clip="rect(0, 0, 0, 0)",a.style.whiteSpace="pre",a.style.webkitUserSelect="text",a.style.MozUserSelect="text",a.style.msUserSelect="text",a.style.userSelect="text",a.addEventListener("copy",function(m){if(m.stopPropagation(),t.format)if(m.preventDefault(),typeof m.clipboardData=="undefined"){g&&console.warn("unable to use e.clipboardData"),g&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();const $=Te[t.format]||Te.default;window.clipboardData.setData($,e)}else m.clipboardData.clearData(),m.clipboardData.setData(t.format,e);t.onCopy&&(m.preventDefault(),t.onCopy(m.clipboardData))}),document.body.appendChild(a),i.selectNodeContents(a),d.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");r=!0}catch(C){g&&console.error("unable to copy using execCommand: ",C),g&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),r=!0}catch(m){g&&console.error("unable to copy using clipboardData: ",m),g&&console.error("falling back to prompt"),o=Dt("message"in t?t.message:_t),window.prompt(o,e)}}finally{d&&(typeof d.removeRange=="function"?d.removeRange(i):d.removeAllRanges()),a&&document.body.removeChild(a),n()}return r}var kt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};function we(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(o).filter(function(i){return Object.getOwnPropertyDescriptor(o,i).enumerable}))),n.forEach(function(i){Bt(e,i,o[i])})}return e}function Bt(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var ye=function(t,o){var n=we({},t,o.attrs);return u(pe,we({},n,{icon:kt}),null)};ye.displayName="CopyOutlined";ye.inheritAttrs=!1;var jt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"};function Pe(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(o).filter(function(i){return Object.getOwnPropertyDescriptor(o,i).enumerable}))),n.forEach(function(i){Rt(e,i,o[i])})}return e}function Rt(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var ge=function(t,o){var n=Pe({},t,o.attrs);return u(pe,Pe({},n,{icon:jt}),null)};ge.displayName="EditOutlined";ge.inheritAttrs=!1;var At=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(o[n[i]]=e[n[i]]);return o};const Ht=De("webkitLineClamp"),zt=De("textOverflow"),$e="...",X=()=>({editable:{type:[Boolean,Object],default:void 0},copyable:{type:[Boolean,Object],default:void 0},prefixCls:String,component:String,type:String,disabled:{type:Boolean,default:void 0},ellipsis:{type:[Boolean,Object],default:void 0},code:{type:Boolean,default:void 0},mark:{type:Boolean,default:void 0},underline:{type:Boolean,default:void 0},delete:{type:Boolean,default:void 0},strong:{type:Boolean,default:void 0},keyboard:{type:Boolean,default:void 0},content:String,"onUpdate:content":Function}),q=oe({compatConfig:{MODE:3},name:"TypographyBase",inheritAttrs:!1,props:X(),setup(e,t){let{slots:o,attrs:n,emit:i}=t;const{prefixCls:d,direction:a}=_e("typography",e),r=Ie({copied:!1,ellipsisText:"",ellipsisContent:null,isEllipsis:!1,expanded:!1,clientRendered:!1,expandStr:"",copyStr:"",copiedStr:"",editStr:"",copyId:void 0,rafId:void 0,prevProps:void 0,originContent:""}),g=ue(),C=ue(),m=ne(()=>{const l=e.ellipsis;return l?s({rows:1,expandable:!1},typeof l=="object"?l:null):{}});fe(()=>{r.clientRendered=!0,R()}),et(()=>{clearTimeout(r.copyId),le.cancel(r.rafId)}),de([()=>m.value.rows,()=>e.content],()=>{Ce(()=>{w()})},{flush:"post",deep:!0}),tt(()=>{e.content===void 0&&(xe(!e.editable),xe(!e.ellipsis))});function $(){var l;return e.ellipsis||e.editable?e.content:(l=ae(g.value))===null||l===void 0?void 0:l.innerText}function v(l){const{onExpand:c}=m.value;r.expanded=!0,c==null||c(l)}function S(l){l.preventDefault(),r.originContent=e.content,b(!0)}function _(l){N(l),b(!1)}function N(l){const{onChange:c}=y.value;l!==e.content&&(i("update:content",l),c==null||c(l))}function D(){var l,c;(c=(l=y.value).onCancel)===null||c===void 0||c.call(l),b(!1)}function j(l){l.preventDefault(),l.stopPropagation();const{copyable:c}=e,f=s({},typeof c=="object"?c:null);f.text===void 0&&(f.text=$()),It(f.text||""),r.copied=!0,Ce(()=>{f.onCopy&&f.onCopy(l),r.copyId=setTimeout(()=>{r.copied=!1},3e3)})}const y=ne(()=>{const l=e.editable;return l?s({},typeof l=="object"?l:null):{editing:!1}}),[p,h]=st(!1,{value:ne(()=>y.value.editing)});function b(l){const{onStart:c}=y.value;l&&c&&c(),h(l)}de(p,l=>{var c;l||(c=C.value)===null||c===void 0||c.focus()},{flush:"post"});function w(l){if(l){const{width:c,height:f}=l;if(!c||!f)return}le.cancel(r.rafId),r.rafId=le(()=>{R()})}const H=ne(()=>{const{rows:l,expandable:c,suffix:f,onEllipsis:x,tooltip:O}=m.value;return f||O||e.editable||e.copyable||c||x?!1:l===1?zt:Ht}),R=()=>{const{ellipsisText:l,isEllipsis:c}=r,{rows:f,suffix:x,onEllipsis:O}=m.value;if(!f||f<0||!ae(g.value)||r.expanded||e.content===void 0||H.value)return;const{content:I,text:L,ellipsis:A}=wt(ae(g.value),{rows:f,suffix:x},e.content,be(!0),$e);(l!==L||r.isEllipsis!==A)&&(r.ellipsisText=L,r.ellipsisContent=I,r.isEllipsis=A,c!==A&&O&&O(A))};function ie(l,c){let{mark:f,code:x,underline:O,delete:I,strong:L,keyboard:A}=l,K=c;function k(Z,P){if(!Z)return;const ee=function(){return K}();K=u(P,null,{default:()=>[ee]})}return k(L,"strong"),k(O,"u"),k(I,"del"),k(x,"code"),k(f,"mark"),k(A,"kbd"),K}function z(l){const{expandable:c,symbol:f}=m.value;if(!c||!l&&(r.expanded||!r.isEllipsis))return null;const x=(o.ellipsisSymbol?o.ellipsisSymbol():f)||r.expandStr;return u("a",{key:"expand",class:`${d.value}-expand`,onClick:v,"aria-label":r.expandStr},[x])}function F(){if(!e.editable)return;const{tooltip:l,triggerType:c=["icon"]}=e.editable,f=o.editableIcon?o.editableIcon():u(ge,{role:"button"},null),x=o.editableTooltip?o.editableTooltip():r.editStr,O=typeof x=="string"?x:"";return c.indexOf("icon")!==-1?u(se,{key:"edit",title:l===!1?"":x},{default:()=>[u(Oe,{ref:C,class:`${d.value}-edit`,onClick:S,"aria-label":O},{default:()=>[f]})]}):null}function Re(){if(!e.copyable)return;const{tooltip:l}=e.copyable,c=r.copied?r.copiedStr:r.copyStr,f=o.copyableTooltip?o.copyableTooltip({copied:r.copied}):c,x=typeof f=="string"?f:"",O=r.copied?u(at,null,null):u(ye,null,null),I=o.copyableIcon?o.copyableIcon({copied:!!r.copied}):O;return u(se,{key:"copy",title:l===!1?"":f},{default:()=>[u(Oe,{class:[`${d.value}-copy`,{[`${d.value}-copy-success`]:r.copied}],onClick:j,"aria-label":x},{default:()=>[I]})]})}function Ae(){const{class:l,style:c}=n,{maxlength:f,autoSize:x,onEnd:O}=y.value;return u(St,{class:l,style:c,prefixCls:d.value,value:e.content,originContent:r.originContent,maxlength:f,autoSize:x,onSave:_,onChange:N,onCancel:D,onEnd:O,direction:a.value,component:e.component},{enterIcon:o.editableEnterIcon})}function be(l){return[z(l),F(),Re()].filter(c=>c)}return()=>{var l;const{triggerType:c=["icon"]}=y.value,f=e.ellipsis||e.editable?e.content!==void 0?e.content:(l=o.default)===null||l===void 0?void 0:l.call(o):o.default?o.default():e.content;return p.value?Ae():u(Ge,{componentName:"Text",children:x=>{const O=s(s({},e),n),{type:I,disabled:L,content:A,class:K,style:k}=O,Z=At(O,["type","disabled","content","class","style"]),{rows:P,suffix:ee,tooltip:re}=m.value,{edit:He,copy:ze,copied:Le,expand:Me}=x;r.editStr=He,r.copyStr=ze,r.copiedStr=Le,r.expandStr=Me;const Ue=W(Z,["prefixCls","editable","copyable","ellipsis","mark","code","delete","underline","strong","keyboard","onUpdate:content"]),te=H.value,We=P===1&&te,he=P&&P>1&&te;let M=f,Fe;if(P&&r.isEllipsis&&!r.expanded&&!te){const{title:ve}=Z;let U=ve||"";!ve&&(typeof f=="string"||typeof f=="number")&&(U=String(f)),U=U==null?void 0:U.slice(String(r.ellipsisContent||"").length),M=u(Se,null,[nt(r.ellipsisContent),u("span",{title:U,"aria-hidden":"true"},[$e]),ee])}else M=u(Se,null,[f,ee]);M=ie(e,M);const Ke=re&&P&&r.isEllipsis&&!r.expanded&&!te,Ve=o.ellipsisTooltip?o.ellipsisTooltip():re;return u(lt,{onResize:w,disabled:!P},{default:()=>[u(T,B({ref:g,class:[{[`${d.value}-${I}`]:I,[`${d.value}-disabled`]:L,[`${d.value}-ellipsis`]:P,[`${d.value}-single-line`]:P===1&&!r.isEllipsis,[`${d.value}-ellipsis-single-line`]:We,[`${d.value}-ellipsis-multiple-line`]:he},K],style:s(s({},k),{WebkitLineClamp:he?P:void 0}),"aria-label":Fe,direction:a.value,onClick:c.indexOf("text")!==-1?S:()=>{}},Ue),{default:()=>[Ke?u(se,{title:re===!0?f:Ve},{default:()=>[u("span",null,[M])]}):M,be()]})]})}},null)}}});var Lt=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(o[n[i]]=e[n[i]]);return o};const Mt=()=>W(s(s({},X()),{ellipsis:{type:Boolean,default:void 0}}),["component"]),Q=(e,t)=>{let{slots:o,attrs:n}=t;const i=s(s({},e),n),{ellipsis:d,rel:a}=i,r=Lt(i,["ellipsis","rel"]),g=s(s({},r),{rel:a===void 0&&r.target==="_blank"?"noopener noreferrer":a,ellipsis:!!d,component:"a"});return delete g.navigate,u(q,g,o)};Q.displayName="ATypographyLink";Q.inheritAttrs=!1;Q.props=Mt();const Ut=()=>W(X(),["component"]),G=(e,t)=>{let{slots:o,attrs:n}=t;const i=s(s(s({},e),{component:"div"}),n);return u(q,i,o)};G.displayName="ATypographyParagraph";G.inheritAttrs=!1;G.props=Ut();const Wt=()=>s(s({},W(X(),["component"])),{ellipsis:{type:[Boolean,Object],default:void 0}}),J=(e,t)=>{let{slots:o,attrs:n}=t;const{ellipsis:i}=e,d=s(s(s({},e),{ellipsis:i&&typeof i=="object"?W(i,["expandable","rows"]):i,component:"span"}),n);return u(q,d,o)};J.displayName="ATypographyText";J.inheritAttrs=!1;J.props=Wt();var Ft=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(o[n[i]]=e[n[i]]);return o};const Kt=Je(1,2,3,4,5),Vt=()=>s(s({},W(X(),["component","strong"])),{level:Number}),Y=(e,t)=>{let{slots:o,attrs:n}=t;const{level:i=1}=e,d=Ft(e,["level"]);let a;Kt.includes(i)?a=`h${i}`:a="h1";const r=s(s(s({},d),{component:a}),n);return u(q,r,o)};Y.displayName="ATypographyTitle";Y.inheritAttrs=!1;Y.props=Vt();T.Text=J;T.Title=Y;T.Paragraph=G;T.Link=Q;T.Base=q;T.install=function(e){return e.component(T.name,T),e.component(T.Text.displayName,J),e.component(T.Title.displayName,Y),e.component(T.Paragraph.displayName,G),e.component(T.Link.displayName,Q),e};export{T};
