import{d as J,H as ze,o as ie,W as y,f as p,U as k,aV as W,aC as le,d5 as Se,e7 as Me,al as Le,E as Ue,bS as Ve,I as xe,K as ne,r as oe,R as Ee,cp as We,j as Ke,Q as Oe,e8 as we,J as q,a2 as Fe,y as Y,a5 as pe,ax as Xe,ad as fe,am as qe,aO as Z,S as Je,aE as ge,bH as Qe,V as Ge,aI as ee,bC as Ye,bs as Ze}from"./outputWidgets.6e1c5425.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ffb0b521-5499-4627-a1ae-f23bab8ab194",e._sentryDebugIdIdentifier="sentry-dbid-ffb0b521-5499-4627-a1ae-f23bab8ab194")}catch{}})();var et=globalThis&&globalThis.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]]);return n};const tt={border:0,background:"transparent",padding:0,lineHeight:"inherit",display:"inline-block"},nt=J({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:n,emit:o,attrs:i,expose:c}=t;const a=ze(),l=h=>{const{keyCode:x}=h;x===W.ENTER&&h.preventDefault()},m=h=>{const{keyCode:x}=h;x===W.ENTER&&o("click",h)},S=h=>{o("click",h)},f=()=>{a.value&&a.value.focus()},$=()=>{a.value&&a.value.blur()};return ie(()=>{e.autofocus&&f()}),c({focus:f,blur:$}),()=>{var h;const{noStyle:x,disabled:D}=e,I=et(e,["noStyle","disabled"]);let B={};return x||(B=y({},tt)),D&&(B.pointerEvents="none"),p("div",k(k(k({role:"button",tabindex:0,ref:a},I),i),{},{onClick:S,onKeydown:l,onKeyup:m,style:y(y({},B),i.style||{})}),[(h=n.default)===null||h===void 0?void 0:h.call(n)])}}}),ye=nt;var ot={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"};const it=ot;function me(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},o=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),o.forEach(function(i){lt(e,i,n[i])})}return e}function lt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var re=function(t,n){var o=me({},t,n.attrs);return p(le,me({},o,{icon:it}),null)};re.displayName="EnterOutlined";re.inheritAttrs=!1;const rt=re,at=(e,t,n,o)=>{const{sizeMarginHeadingVerticalEnd:i,fontWeightStrong:c}=o;return{marginBottom:i,color:n,fontWeight:c,fontSize:e,lineHeight:t}},st=e=>{const t=[1,2,3,4,5],n={};return t.forEach(o=>{n[`
      h${o}&,
      div&-h${o},
      div&-h${o} > textarea,
      h${o}
    `]=at(e[`fontSizeHeading${o}`],e[`lineHeightHeading${o}`],e.colorTextHeading,e)}),n},ct=e=>{const{componentCls:t}=e;return{"a&, a":y(y({},Se(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"}}})}},dt=()=>({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:Me[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}}),ut=e=>{const{componentCls:t}=e,o=Le(e).inputPaddingVertical+1;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:-e.paddingSM,marginTop:-o,marginBottom:`calc(1em - ${o}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"}}}},pt=e=>({"&-copy-success":{[`
    &,
    &:hover,
    &:focus`]:{color:e.colorSuccess}}}),ft=()=>({[`
  a&-ellipsis,
  span&-ellipsis
  `]:{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"}}),gt=e=>{const{componentCls:t,sizeMarginHeadingVerticalStart:n}=e;return{[t]:y(y(y(y(y(y(y(y(y({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"},[`
        div&,
        p
      `]:{marginBottom:"1em"}},st(e)),{[`
      & + h1${t},
      & + h2${t},
      & + h3${t},
      & + h4${t},
      & + h5${t}
      `]:{marginTop:n},[`
      div,
      ul,
      li,
      p,
      h1,
      h2,
      h3,
      h4,
      h5`]:{[`
        + h1,
        + h2,
        + h3,
        + h4,
        + h5
        `]:{marginTop:n}}}),dt()),ct(e)),{[`
        ${t}-expand,
        ${t}-edit,
        ${t}-copy
      `]:y(y({},Se(e)),{marginInlineStart:e.marginXXS})}),ut(e)),pt(e)),ft()),{"&-rtl":{direction:"rtl"}})}},Te=Ue("Typography",e=>[gt(e)],{sizeMarginHeadingVerticalStart:"1.2em",sizeMarginHeadingVerticalEnd:"0.5em"}),yt=()=>({prefixCls:String,value:String,maxlength:Number,autoSize:{type:[Boolean,Object]},onSave:Function,onCancel:Function,onEnd:Function,onChange:Function,originContent:String,direction:String,component:String}),mt=J({compatConfig:{MODE:3},name:"Editable",inheritAttrs:!1,props:yt(),setup(e,t){let{emit:n,slots:o,attrs:i}=t;const{prefixCls:c}=Ve(e),a=xe({current:e.value||"",lastKeyCode:void 0,inComposition:!1,cancelFlag:!1});ne(()=>e.value,g=>{a.current=g});const l=oe();ie(()=>{var g;if(l.value){const d=(g=l.value)===null||g===void 0?void 0:g.resizableTextArea,v=d==null?void 0:d.textArea;v.focus();const{length:b}=v.value;v.setSelectionRange(b,b)}});function m(g){l.value=g}function S(g){let{target:{value:d}}=g;a.current=d.replace(/[\r\n]/g,""),n("change",a.current)}function f(){a.inComposition=!0}function $(){a.inComposition=!1}function h(g){const{keyCode:d}=g;d===W.ENTER&&g.preventDefault(),!a.inComposition&&(a.lastKeyCode=d)}function x(g){const{keyCode:d,ctrlKey:v,altKey:b,metaKey:w,shiftKey:H}=g;a.lastKeyCode===d&&!a.inComposition&&!v&&!b&&!w&&!H&&(d===W.ENTER?(I(),n("end")):d===W.ESC&&(a.current=e.originContent,n("cancel")))}function D(){I()}function I(){n("save",a.current.trim())}const[B,P]=Te(c);return()=>{const g=Ee({[`${c.value}`]:!0,[`${c.value}-edit-content`]:!0,[`${c.value}-rtl`]:e.direction==="rtl",[e.component?`${c.value}-${e.component}`:""]:!0},i.class,P.value);return B(p("div",k(k({},i),{},{class:g}),[p(We,{ref:m,maxlength:e.maxlength,value:a.current,onChange:S,onKeydown:h,onKeyup:x,onCompositionstart:f,onCompositionend:$,onBlur:D,rows:1,autoSize:e.autoSize===void 0||e.autoSize},null),o.enterIcon?o.enterIcon({className:`${e.prefixCls}-edit-content-confirm`}):p(rt,{class:`${e.prefixCls}-edit-content-confirm`},null)]))}}}),bt=mt,vt=3,ht=8;let O;const te={padding:0,margin:0,display:"inline",lineHeight:"inherit"};function Ct(e){return Array.prototype.slice.apply(e).map(n=>`${n}: ${e.getPropertyValue(n)};`).join("")}function $e(e,t){e.setAttribute("aria-hidden","true");const n=window.getComputedStyle(t),o=Ct(n);e.setAttribute("style",o),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 St(e){const t=document.createElement("div");$e(t,e),t.appendChild(document.createTextNode("text")),document.body.appendChild(t);const n=t.getBoundingClientRect().height;return document.body.removeChild(t),n}const xt=(e,t,n,o,i)=>{O||(O=document.createElement("div"),O.setAttribute("aria-hidden","true"),document.body.appendChild(O));const{rows:c,suffix:a=""}=t,l=St(e),m=Math.round(l*c*100)/100;$e(O,e);const S=Ke({render(){return p("div",{style:te},[p("span",{style:te},[n,a]),p("span",{style:te},[o])])}});S.mount(O);function f(){return Math.round(O.getBoundingClientRect().height*100)/100-.1<=m}if(f())return S.unmount(),{content:n,text:O.innerHTML,ellipsis:!1};const $=Array.prototype.slice.apply(O.childNodes[0].childNodes[0].cloneNode(!0).childNodes).filter(d=>{let{nodeType:v,data:b}=d;return v!==ht&&b!==""}),h=Array.prototype.slice.apply(O.childNodes[0].childNodes[1].cloneNode(!0).childNodes);S.unmount();const x=[];O.innerHTML="";const D=document.createElement("span");O.appendChild(D);const I=document.createTextNode(i+a);D.appendChild(I),h.forEach(d=>{O.appendChild(d)});function B(d){D.insertBefore(d,I)}function P(d,v){let b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,w=arguments.length>3&&arguments[3]!==void 0?arguments[3]:v.length,H=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;const j=Math.floor((b+w)/2),Q=v.slice(0,j);if(d.textContent=Q,b>=w-1)for(let A=w;A>=b;A-=1){const U=v.slice(0,A);if(d.textContent=U,f()||!U)return A===v.length?{finished:!1,vNode:v}:{finished:!0,vNode:U}}return f()?P(d,v,j,w,j):P(d,v,b,j,H)}function g(d){if(d.nodeType===vt){const b=d.textContent||"",w=document.createTextNode(b);return B(w),P(w,b)}return{finished:!1,vNode:null}}return $.some(d=>{const{finished:v,vNode:b}=g(d);return b&&x.push(b),v}),{content:x,text:O.innerHTML,ellipsis:!0}};var Et=globalThis&&globalThis.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]]);return n};const Ot=()=>({prefixCls:String,direction:String,component:String}),wt=J({name:"ATypography",inheritAttrs:!1,props:Ot(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:i,direction:c}=Oe("typography",e),[a,l]=Te(i);return()=>{var m;const S=y(y({},e),o),{prefixCls:f,direction:$,component:h="article"}=S,x=Et(S,["prefixCls","direction","component"]);return a(p(h,k(k({},x),{},{class:Ee(i.value,{[`${i.value}-rtl`]:c.value==="rtl"},o.class,l.value)}),{default:()=>[(m=n.default)===null||m===void 0?void 0:m.call(n)]}))}}}),Tt=wt,$t=()=>{const e=document.getSelection();if(!e.rangeCount)return function(){};let t=document.activeElement;const n=[];for(let o=0;o<e.rangeCount;o++)n.push(e.getRangeAt(o));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||n.forEach(function(o){e.addRange(o)}),t&&t.focus()}},It=$t,be={"text/plain":"Text","text/html":"Url",default:"Text"},Dt="Copy to clipboard: #{key}, Enter";function Bt(e){const t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function Nt(e,t){let n,o,i,c,a,l=!1;t||(t={});const m=t.debug||!1;try{if(o=It(),i=document.createRange(),c=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(f){if(f.stopPropagation(),t.format)if(f.preventDefault(),typeof f.clipboardData>"u"){m&&console.warn("unable to use e.clipboardData"),m&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();const $=be[t.format]||be.default;window.clipboardData.setData($,e)}else f.clipboardData.clearData(),f.clipboardData.setData(t.format,e);t.onCopy&&(f.preventDefault(),t.onCopy(f.clipboardData))}),document.body.appendChild(a),i.selectNodeContents(a),c.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");l=!0}catch(S){m&&console.error("unable to copy using execCommand: ",S),m&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(f){m&&console.error("unable to copy using clipboardData: ",f),m&&console.error("falling back to prompt"),n=Bt("message"in t?t.message:Dt),window.prompt(n,e)}}finally{c&&(typeof c.removeRange=="function"?c.removeRange(i):c.removeAllRanges()),a&&document.body.removeChild(a),o()}return l}var _t={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"};const kt=_t;function ve(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},o=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),o.forEach(function(i){Pt(e,i,n[i])})}return e}function Pt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ae=function(t,n){var o=ve({},t,n.attrs);return p(le,ve({},o,{icon:kt}),null)};ae.displayName="CopyOutlined";ae.inheritAttrs=!1;const Rt=ae;var Ht={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"};const jt=Ht;function he(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},o=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),o.forEach(function(i){At(e,i,n[i])})}return e}function At(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var se=function(t,n){var o=he({},t,n.attrs);return p(le,he({},o,{icon:jt}),null)};se.displayName="EditOutlined";se.inheritAttrs=!1;const zt=se;var Mt=globalThis&&globalThis.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]]);return n};const Lt=we("webkitLineClamp"),Ut=we("textOverflow"),Ce="...",Vt=()=>({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}),Wt=J({compatConfig:{MODE:3},name:"TypographyBase",inheritAttrs:!1,props:Vt(),setup(e,t){let{slots:n,attrs:o,emit:i}=t;const{prefixCls:c,direction:a}=Oe("typography",e),l=xe({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:""}),m=oe(),S=oe(),f=q(()=>{const r=e.ellipsis;return r?y({rows:1,expandable:!1},typeof r=="object"?r:null):{}});ie(()=>{l.clientRendered=!0}),Fe(()=>{clearTimeout(l.copyId),Y.cancel(l.rafId)}),ne([()=>f.value.rows,()=>e.content],()=>{pe(()=>{w()})},{flush:"post",deep:!0,immediate:!0}),Xe(()=>{e.content===void 0&&(fe(!e.editable),fe(!e.ellipsis))});function $(){var r;return e.ellipsis||e.editable?e.content:(r=Z(m.value))===null||r===void 0?void 0:r.innerText}function h(r){const{onExpand:s}=f.value;l.expanded=!0,s==null||s(r)}function x(r){r.preventDefault(),l.originContent=e.content,b(!0)}function D(r){I(r),b(!1)}function I(r){const{onChange:s}=g.value;r!==e.content&&(i("update:content",r),s==null||s(r))}function B(){var r,s;(s=(r=g.value).onCancel)===null||s===void 0||s.call(r),b(!1)}function P(r){r.preventDefault(),r.stopPropagation();const{copyable:s}=e,u=y({},typeof s=="object"?s:null);u.text===void 0&&(u.text=$()),Nt(u.text||""),l.copied=!0,pe(()=>{u.onCopy&&u.onCopy(r),l.copyId=setTimeout(()=>{l.copied=!1},3e3)})}const g=q(()=>{const r=e.editable;return r?y({},typeof r=="object"?r:null):{editing:!1}}),[d,v]=qe(!1,{value:q(()=>g.value.editing)});function b(r){const{onStart:s}=g.value;r&&s&&s(),v(r)}ne(d,r=>{var s;r||(s=S.value)===null||s===void 0||s.focus()},{flush:"post"});function w(){Y.cancel(l.rafId),l.rafId=Y(()=>{j()})}const H=q(()=>{const{rows:r,expandable:s,suffix:u,onEllipsis:C,tooltip:E}=f.value;return u||E||e.editable||e.copyable||s||C?!1:r===1?Ut:Lt}),j=()=>{const{ellipsisText:r,isEllipsis:s}=l,{rows:u,suffix:C,onEllipsis:E}=f.value;if(!u||u<0||!Z(m.value)||l.expanded||e.content===void 0||H.value)return;const{content:N,text:z,ellipsis:R}=xt(Z(m.value),{rows:u,suffix:C},e.content,ce(!0),Ce);(r!==z||l.isEllipsis!==R)&&(l.ellipsisText=z,l.ellipsisContent=N,l.isEllipsis=R,s!==R&&E&&E(R))};function Q(r,s){let{mark:u,code:C,underline:E,delete:N,strong:z,keyboard:R}=r,V=s;function _(K,T){if(!K)return;const F=function(){return V}();V=p(T,null,{default:()=>[F]})}return _(z,"strong"),_(E,"u"),_(N,"del"),_(C,"code"),_(u,"mark"),_(R,"kbd"),V}function A(r){const{expandable:s,symbol:u}=f.value;if(!s||!r&&(l.expanded||!l.isEllipsis))return null;const C=(n.ellipsisSymbol?n.ellipsisSymbol():u)||l.expandStr;return p("a",{key:"expand",class:`${c.value}-expand`,onClick:h,"aria-label":l.expandStr},[C])}function U(){if(!e.editable)return;const{tooltip:r,triggerType:s=["icon"]}=e.editable,u=n.editableIcon?n.editableIcon():p(zt,{role:"button"},null),C=n.editableTooltip?n.editableTooltip():l.editStr,E=typeof C=="string"?C:"";return s.indexOf("icon")!==-1?p(ee,{key:"edit",title:r===!1?"":C},{default:()=>[p(ye,{ref:S,class:`${c.value}-edit`,onClick:x,"aria-label":E},{default:()=>[u]})]}):null}function Ie(){if(!e.copyable)return;const{tooltip:r}=e.copyable,s=l.copied?l.copiedStr:l.copyStr,u=n.copyableTooltip?n.copyableTooltip({copied:l.copied}):s,C=typeof u=="string"?u:"",E=l.copied?p(Ze,null,null):p(Rt,null,null),N=n.copyableIcon?n.copyableIcon({copied:!!l.copied}):E;return p(ee,{key:"copy",title:r===!1?"":u},{default:()=>[p(ye,{class:[`${c.value}-copy`,{[`${c.value}-copy-success`]:l.copied}],onClick:P,"aria-label":C},{default:()=>[N]})]})}function De(){const{class:r,style:s}=o,{maxlength:u,autoSize:C,onEnd:E}=g.value;return p(bt,{class:r,style:s,prefixCls:c.value,value:e.content,originContent:l.originContent,maxlength:u,autoSize:C,onSave:D,onChange:I,onCancel:B,onEnd:E,direction:a.value,component:e.component},{enterIcon:n.editableEnterIcon})}function ce(r){return[A(r),U(),Ie()].filter(s=>s)}return()=>{var r;const{triggerType:s=["icon"]}=g.value,u=e.ellipsis||e.editable?e.content!==void 0?e.content:(r=n.default)===null||r===void 0?void 0:r.call(n):n.default?n.default():e.content;return d.value?De():p(Ye,{componentName:"Text",children:C=>{const E=y(y({},e),o),{type:N,disabled:z,content:R,class:V,style:_}=E,K=Mt(E,["type","disabled","content","class","style"]),{rows:T,suffix:F,tooltip:G}=f.value,{edit:Be,copy:Ne,copied:_e,expand:ke}=C;l.editStr=Be,l.copyStr=Ne,l.copiedStr=_e,l.expandStr=ke;const Pe=Je(K,["prefixCls","editable","copyable","ellipsis","mark","code","delete","underline","strong","keyboard","onUpdate:content"]),X=H.value,Re=T===1&&X,de=T&&T>1&&X;let M=u,He;if(T&&l.isEllipsis&&!l.expanded&&!X){const{title:ue}=K;let L=ue||"";!ue&&(typeof u=="string"||typeof u=="number")&&(L=String(u)),L=L==null?void 0:L.slice(String(l.ellipsisContent||"").length),M=p(ge,null,[Qe(l.ellipsisContent),p("span",{title:L,"aria-hidden":"true"},[Ce]),F])}else M=p(ge,null,[u,F]);M=Q(e,M);const je=G&&T&&l.isEllipsis&&!l.expanded&&!X,Ae=n.ellipsisTooltip?n.ellipsisTooltip():G;return p(Ge,{onResize:w,disabled:!T},{default:()=>[p(Tt,k({ref:m,class:[{[`${c.value}-${N}`]:N,[`${c.value}-disabled`]:z,[`${c.value}-ellipsis`]:T,[`${c.value}-single-line`]:T===1&&!l.isEllipsis,[`${c.value}-ellipsis-single-line`]:Re,[`${c.value}-ellipsis-multiple-line`]:de},V],style:y(y({},_),{WebkitLineClamp:de?T:void 0}),"aria-label":He,direction:a.value,onClick:s.indexOf("text")!==-1?x:()=>{}},Pe),{default:()=>[je?p(ee,{title:G===!0?u:Ae},{default:()=>[p("span",null,[M])]}):M,ce()]})]})}},null)}}}),Ft=Wt;export{Ft as B,jt as E,ye as T,Tt as a,Vt as b};
//# sourceMappingURL=Base.0277cf44.js.map
