@canton-network/example-portfolio 0.18.0 → 0.18.1
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/assets/{Avatar-CeFJWY-s.js → Avatar-D1EkKX0u.js} +1 -1
- package/dist/assets/{copyable-identifier-ItJqhPOL.js → copyable-identifier-UM-Sf42I.js} +1 -1
- package/dist/assets/{index-CYRjFua4.js → index-Bpey2_yE.js} +3 -3
- package/dist/assets/{index-BVJntUDN.js → index-CjLf4G9R.js} +1 -1
- package/dist/assets/{old-DIQM2Q8a.js → old-DGF76adO.js} +1 -1
- package/dist/assets/{settings-BggmN-I1.js → settings-Be8h5Hp2.js} +1 -1
- package/dist/assets/{useWithdrawAllocation-B9p5ztjm.js → useWithdrawAllocation-BUZrRRrq.js} +1 -1
- package/dist/assets/{wallet._walletId-CM-FawSM.js → wallet._walletId-CF1cZHth.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as R,a as A,r as v,u as M,j as g,c as P,b as F,s as y,m as I,ac as $,ad as j,e as K,M as k}from"./index-
|
|
1
|
+
import{g as R,a as A,r as v,u as M,j as g,c as P,b as F,s as y,m as I,ac as $,ad as j,e as K,M as k}from"./index-Bpey2_yE.js";function L(t){return String(t).match(/[\d.\-+]*\s*(.*)/)[1]||""}function W(t){return parseFloat(t)}function H(t){return R("MuiSkeleton",t)}A("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const O=t=>{const{classes:e,variant:a,animation:o,hasChildren:r,width:n,height:i}=t;return F({root:["root",a,o,r&&"withChildren",r&&!n&&"fitContent",r&&!i&&"heightAuto"]},H,e)},w=j`
|
|
2
2
|
0% {
|
|
3
3
|
opacity: 1;
|
|
4
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as qo,a as Jo,r as s,u as Qo,a2 as Zo,ae as _o,a3 as F,a6 as oe,af as ee,ag as yo,ah as te,a4 as re,ai as pe,c as To,M as z,aj as se,j as n,ak as xo,d as vo,b as ne,s as J,m as Q,al as bo,e as Po,B as ae,T as ie,I as le}from"./index-CYRjFua4.js";function ce(e){return qo("MuiTooltip",e)}const r=Jo("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function de(e){return Math.round(e*1e5)/1e5}const ue=e=>{const{classes:o,disableInteractive:p,arrow:a,touch:y,placement:d}=e,$={popper:["popper",!p&&"popperInteractive",a&&"popperArrow"],tooltip:["tooltip",a&&"tooltipArrow",y&&"touch",`tooltipPlacement${vo(d.split("-")[0])}`],arrow:["arrow"]};return ne($,ce,o)},me=J(xo,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,o)=>{const{ownerState:p}=e;return[o.popper,!p.disableInteractive&&o.popperInteractive,p.arrow&&o.popperArrow,!p.open&&o.popperClose]}})(Q(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:o})=>!o.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:o})=>!o,style:{pointerEvents:"none"}},{props:({ownerState:o})=>o.arrow,style:{[`&[data-popper-placement*="bottom"] .${r.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${r.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${r.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${r.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:o})=>o.arrow&&!o.isRtl,style:{[`&[data-popper-placement*="right"] .${r.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:o})=>o.arrow&&!!o.isRtl,style:{[`&[data-popper-placement*="right"] .${r.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:o})=>o.arrow&&!o.isRtl,style:{[`&[data-popper-placement*="left"] .${r.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:o})=>o.arrow&&!!o.isRtl,style:{[`&[data-popper-placement*="left"] .${r.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),fe=J("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,o)=>{const{ownerState:p}=e;return[o.tooltip,p.touch&&o.touch,p.arrow&&o.tooltipArrow,o[`tooltipPlacement${vo(p.placement.split("-")[0])}`]]}})(Q(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${r.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${r.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${r.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${r.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:o})=>o.arrow,style:{position:"relative",margin:0}},{props:({ownerState:o})=>o.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${de(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:o})=>!o.isRtl,style:{[`.${r.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${r.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:o})=>!o.isRtl&&o.touch,style:{[`.${r.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${r.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:o})=>!!o.isRtl,style:{[`.${r.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${r.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:o})=>!!o.isRtl&&o.touch,style:{[`.${r.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${r.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:o})=>o.touch,style:{[`.${r.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:o})=>o.touch,style:{[`.${r.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),he=J("span",{name:"MuiTooltip",slot:"Arrow"})(Q(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let A=!1;const wo=new te;let M={x:0,y:0};function N(e,o){return(p,...a)=>{o&&o(p,...a),e(p,...a)}}const ge=s.forwardRef(function(o,p){const a=Qo({props:o,name:"MuiTooltip"}),{arrow:y=!1,children:d,classes:$,components:x={},componentsProps:T={},describeChild:l=!1,disableFocusListener:h=!1,disableHoverListener:O=!1,disableInteractive:W=!1,disableTouchListener:Ro=!1,enterDelay:Z=100,enterNextDelay:_=0,enterTouchDelay:Co=700,followCursor:D=!1,id:So,leaveDelay:oo=0,leaveTouchDelay:Mo=1500,onClose:eo,onOpen:to,open:$o,placement:ro="bottom",PopperComponent:po,PopperProps:b={},slotProps:u={},slots:Oo={},title:w,TransitionComponent:Io,TransitionProps:Eo,...so}=a,m=s.isValidElement(d)?d:n.jsx("span",{children:d}),no=Zo(),jo=_o(),[v,ao]=s.useState(),[U,Lo]=s.useState(null),I=s.useRef(!1),V=W||D,io=F(),H=F(),E=F(),lo=F(),[ko,co]=oe({controlled:$o,default:!1,name:"Tooltip",state:"open"});let c=ko;const G=ee(So),P=s.useRef(),j=yo(()=>{P.current!==void 0&&(document.body.style.WebkitUserSelect=P.current,P.current=void 0),lo.clear()});s.useEffect(()=>j,[j]);const uo=t=>{wo.clear(),A=!0,co(!0),to&&!c&&to(t)},L=yo(t=>{wo.start(800+oo,()=>{A=!1}),co(!1),eo&&c&&eo(t),io.start(no.transitions.duration.shortest,()=>{I.current=!1})}),k=t=>{I.current&&t.type!=="touchstart"||(v&&v.removeAttribute("title"),H.clear(),E.clear(),Z||A&&_?H.start(A?_:Z,()=>{uo(t)}):uo(t))},K=t=>{H.clear(),E.start(oo,()=>{L(t)})},[,mo]=s.useState(!1),fo=t=>{bo(t.target)||(mo(!1),K(t))},ho=t=>{v||ao(t.currentTarget),bo(t.target)&&(mo(!0),k(t))},go=t=>{I.current=!0;const f=m.props;f.onTouchStart&&f.onTouchStart(t)},Bo=t=>{go(t),E.clear(),io.clear(),j(),P.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",lo.start(Co,()=>{document.body.style.WebkitUserSelect=P.current,k(t)})},Fo=t=>{m.props.onTouchEnd&&m.props.onTouchEnd(t),j(),E.start(Mo,()=>{L(t)})};s.useEffect(()=>{if(!c)return;function t(f){f.key==="Escape"&&L(f)}return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[L,c]);const zo=re(pe(m),ao,p);!w&&w!==0&&(c=!1);const X=s.useRef(),Ao=t=>{const f=m.props;f.onMouseMove&&f.onMouseMove(t),M={x:t.clientX,y:t.clientY},X.current&&X.current.update()},R={},Y=typeof w=="string";l?(R.title=!c&&Y&&!O?w:null,R["aria-describedby"]=c?G:null):(R["aria-label"]=Y?w:null,R["aria-labelledby"]=c&&!Y?G:null);const i={...R,...so,...m.props,className:To(so.className,m.props.className),onTouchStart:go,ref:zo,...D?{onMouseMove:Ao}:{}},C={};Ro||(i.onTouchStart=Bo,i.onTouchEnd=Fo),O||(i.onMouseOver=N(k,i.onMouseOver),i.onMouseLeave=N(K,i.onMouseLeave),V||(C.onMouseOver=k,C.onMouseLeave=K)),h||(i.onFocus=N(ho,i.onFocus),i.onBlur=N(fo,i.onBlur),V||(C.onFocus=ho,C.onBlur=fo));const g={...a,isRtl:jo,arrow:y,disableInteractive:V,placement:ro,PopperComponentProp:po,touch:I.current},S=typeof u.popper=="function"?u.popper(g):u.popper,No=s.useMemo(()=>{let t=[{name:"arrow",enabled:!!U,options:{element:U,padding:4}}];return b.popperOptions?.modifiers&&(t=t.concat(b.popperOptions.modifiers)),S?.popperOptions?.modifiers&&(t=t.concat(S.popperOptions.modifiers)),{...b.popperOptions,...S?.popperOptions,modifiers:t}},[U,b.popperOptions,S?.popperOptions]),q=ue(g),Wo=typeof u.transition=="function"?u.transition(g):u.transition,B={slots:{popper:x.Popper,transition:x.Transition??Io,tooltip:x.Tooltip,arrow:x.Arrow,...Oo},slotProps:{arrow:u.arrow??T.arrow,popper:{...b,...S??T.popper},tooltip:u.tooltip??T.tooltip,transition:{...Eo,...Wo??T.transition}}},[Do,Uo]=z("popper",{elementType:me,externalForwardedProps:B,ownerState:g,className:To(q.popper,b?.className)}),[Vo,Ho]=z("transition",{elementType:se,externalForwardedProps:B,ownerState:g}),[Go,Ko]=z("tooltip",{elementType:fe,className:q.tooltip,externalForwardedProps:B,ownerState:g}),[Xo,Yo]=z("arrow",{elementType:he,className:q.arrow,externalForwardedProps:B,ownerState:g,ref:Lo});return n.jsxs(s.Fragment,{children:[s.cloneElement(m,i),n.jsx(Do,{as:po??xo,placement:ro,anchorEl:D?{getBoundingClientRect:()=>({top:M.y,left:M.x,right:M.x,bottom:M.y,width:0,height:0})}:v,popperRef:X,open:v?c:!1,id:G,transition:!0,...C,...Uo,popperOptions:No,children:({TransitionProps:t})=>n.jsx(Vo,{timeout:no.transitions.duration.shorter,...t,...Ho,children:n.jsxs(Go,{...Ko,children:[w,y?n.jsx(Xo,{...Yo}):null]})})})]})}),ye=Po(n.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"})),Te=Po(n.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})),we=({value:e,maxLength:o=8})=>{const[p,a]=s.useState(!1),y=async()=>{try{await navigator.clipboard.writeText(e),a(!0),setTimeout(()=>a(!1),2e3)}catch(l){console.error("Failed to copy:",l)}},d=(l,h)=>l.length<=h?l:`${l.slice(0,h)}...`,$=l=>{const h=l.split("::"),O=h[0]||"",W=h[1]||"";return`${O}::${d(W,o)}`},T=e.includes("::")?$(e):d(e,o);return n.jsxs(ae,{sx:{display:"flex",alignItems:"center",gap:1},children:[n.jsx(ie,{variant:"body2",component:"span",children:T}),n.jsx(ge,{title:p?"Copied!":"Copy to clipboard",children:n.jsx(le,{size:"small",onClick:y,sx:{p:.5},children:p?n.jsx(Te,{fontSize:"small"}):n.jsx(ye,{fontSize:"small"})})})]})};export{we as C};
|
|
1
|
+
import{g as qo,a as Jo,r as s,u as Qo,a2 as Zo,ae as _o,a3 as F,a6 as oe,af as ee,ag as yo,ah as te,a4 as re,ai as pe,c as To,M as z,aj as se,j as n,ak as xo,d as vo,b as ne,s as J,m as Q,al as bo,e as Po,B as ae,T as ie,I as le}from"./index-Bpey2_yE.js";function ce(e){return qo("MuiTooltip",e)}const r=Jo("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function de(e){return Math.round(e*1e5)/1e5}const ue=e=>{const{classes:o,disableInteractive:p,arrow:a,touch:y,placement:d}=e,$={popper:["popper",!p&&"popperInteractive",a&&"popperArrow"],tooltip:["tooltip",a&&"tooltipArrow",y&&"touch",`tooltipPlacement${vo(d.split("-")[0])}`],arrow:["arrow"]};return ne($,ce,o)},me=J(xo,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,o)=>{const{ownerState:p}=e;return[o.popper,!p.disableInteractive&&o.popperInteractive,p.arrow&&o.popperArrow,!p.open&&o.popperClose]}})(Q(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:o})=>!o.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:o})=>!o,style:{pointerEvents:"none"}},{props:({ownerState:o})=>o.arrow,style:{[`&[data-popper-placement*="bottom"] .${r.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${r.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${r.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${r.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:o})=>o.arrow&&!o.isRtl,style:{[`&[data-popper-placement*="right"] .${r.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:o})=>o.arrow&&!!o.isRtl,style:{[`&[data-popper-placement*="right"] .${r.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:o})=>o.arrow&&!o.isRtl,style:{[`&[data-popper-placement*="left"] .${r.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:o})=>o.arrow&&!!o.isRtl,style:{[`&[data-popper-placement*="left"] .${r.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),fe=J("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,o)=>{const{ownerState:p}=e;return[o.tooltip,p.touch&&o.touch,p.arrow&&o.tooltipArrow,o[`tooltipPlacement${vo(p.placement.split("-")[0])}`]]}})(Q(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${r.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${r.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${r.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${r.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:o})=>o.arrow,style:{position:"relative",margin:0}},{props:({ownerState:o})=>o.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${de(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:o})=>!o.isRtl,style:{[`.${r.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${r.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:o})=>!o.isRtl&&o.touch,style:{[`.${r.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${r.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:o})=>!!o.isRtl,style:{[`.${r.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${r.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:o})=>!!o.isRtl&&o.touch,style:{[`.${r.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${r.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:o})=>o.touch,style:{[`.${r.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:o})=>o.touch,style:{[`.${r.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),he=J("span",{name:"MuiTooltip",slot:"Arrow"})(Q(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let A=!1;const wo=new te;let M={x:0,y:0};function N(e,o){return(p,...a)=>{o&&o(p,...a),e(p,...a)}}const ge=s.forwardRef(function(o,p){const a=Qo({props:o,name:"MuiTooltip"}),{arrow:y=!1,children:d,classes:$,components:x={},componentsProps:T={},describeChild:l=!1,disableFocusListener:h=!1,disableHoverListener:O=!1,disableInteractive:W=!1,disableTouchListener:Ro=!1,enterDelay:Z=100,enterNextDelay:_=0,enterTouchDelay:Co=700,followCursor:D=!1,id:So,leaveDelay:oo=0,leaveTouchDelay:Mo=1500,onClose:eo,onOpen:to,open:$o,placement:ro="bottom",PopperComponent:po,PopperProps:b={},slotProps:u={},slots:Oo={},title:w,TransitionComponent:Io,TransitionProps:Eo,...so}=a,m=s.isValidElement(d)?d:n.jsx("span",{children:d}),no=Zo(),jo=_o(),[v,ao]=s.useState(),[U,Lo]=s.useState(null),I=s.useRef(!1),V=W||D,io=F(),H=F(),E=F(),lo=F(),[ko,co]=oe({controlled:$o,default:!1,name:"Tooltip",state:"open"});let c=ko;const G=ee(So),P=s.useRef(),j=yo(()=>{P.current!==void 0&&(document.body.style.WebkitUserSelect=P.current,P.current=void 0),lo.clear()});s.useEffect(()=>j,[j]);const uo=t=>{wo.clear(),A=!0,co(!0),to&&!c&&to(t)},L=yo(t=>{wo.start(800+oo,()=>{A=!1}),co(!1),eo&&c&&eo(t),io.start(no.transitions.duration.shortest,()=>{I.current=!1})}),k=t=>{I.current&&t.type!=="touchstart"||(v&&v.removeAttribute("title"),H.clear(),E.clear(),Z||A&&_?H.start(A?_:Z,()=>{uo(t)}):uo(t))},K=t=>{H.clear(),E.start(oo,()=>{L(t)})},[,mo]=s.useState(!1),fo=t=>{bo(t.target)||(mo(!1),K(t))},ho=t=>{v||ao(t.currentTarget),bo(t.target)&&(mo(!0),k(t))},go=t=>{I.current=!0;const f=m.props;f.onTouchStart&&f.onTouchStart(t)},Bo=t=>{go(t),E.clear(),io.clear(),j(),P.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",lo.start(Co,()=>{document.body.style.WebkitUserSelect=P.current,k(t)})},Fo=t=>{m.props.onTouchEnd&&m.props.onTouchEnd(t),j(),E.start(Mo,()=>{L(t)})};s.useEffect(()=>{if(!c)return;function t(f){f.key==="Escape"&&L(f)}return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[L,c]);const zo=re(pe(m),ao,p);!w&&w!==0&&(c=!1);const X=s.useRef(),Ao=t=>{const f=m.props;f.onMouseMove&&f.onMouseMove(t),M={x:t.clientX,y:t.clientY},X.current&&X.current.update()},R={},Y=typeof w=="string";l?(R.title=!c&&Y&&!O?w:null,R["aria-describedby"]=c?G:null):(R["aria-label"]=Y?w:null,R["aria-labelledby"]=c&&!Y?G:null);const i={...R,...so,...m.props,className:To(so.className,m.props.className),onTouchStart:go,ref:zo,...D?{onMouseMove:Ao}:{}},C={};Ro||(i.onTouchStart=Bo,i.onTouchEnd=Fo),O||(i.onMouseOver=N(k,i.onMouseOver),i.onMouseLeave=N(K,i.onMouseLeave),V||(C.onMouseOver=k,C.onMouseLeave=K)),h||(i.onFocus=N(ho,i.onFocus),i.onBlur=N(fo,i.onBlur),V||(C.onFocus=ho,C.onBlur=fo));const g={...a,isRtl:jo,arrow:y,disableInteractive:V,placement:ro,PopperComponentProp:po,touch:I.current},S=typeof u.popper=="function"?u.popper(g):u.popper,No=s.useMemo(()=>{let t=[{name:"arrow",enabled:!!U,options:{element:U,padding:4}}];return b.popperOptions?.modifiers&&(t=t.concat(b.popperOptions.modifiers)),S?.popperOptions?.modifiers&&(t=t.concat(S.popperOptions.modifiers)),{...b.popperOptions,...S?.popperOptions,modifiers:t}},[U,b.popperOptions,S?.popperOptions]),q=ue(g),Wo=typeof u.transition=="function"?u.transition(g):u.transition,B={slots:{popper:x.Popper,transition:x.Transition??Io,tooltip:x.Tooltip,arrow:x.Arrow,...Oo},slotProps:{arrow:u.arrow??T.arrow,popper:{...b,...S??T.popper},tooltip:u.tooltip??T.tooltip,transition:{...Eo,...Wo??T.transition}}},[Do,Uo]=z("popper",{elementType:me,externalForwardedProps:B,ownerState:g,className:To(q.popper,b?.className)}),[Vo,Ho]=z("transition",{elementType:se,externalForwardedProps:B,ownerState:g}),[Go,Ko]=z("tooltip",{elementType:fe,className:q.tooltip,externalForwardedProps:B,ownerState:g}),[Xo,Yo]=z("arrow",{elementType:he,className:q.arrow,externalForwardedProps:B,ownerState:g,ref:Lo});return n.jsxs(s.Fragment,{children:[s.cloneElement(m,i),n.jsx(Do,{as:po??xo,placement:ro,anchorEl:D?{getBoundingClientRect:()=>({top:M.y,left:M.x,right:M.x,bottom:M.y,width:0,height:0})}:v,popperRef:X,open:v?c:!1,id:G,transition:!0,...C,...Uo,popperOptions:No,children:({TransitionProps:t})=>n.jsx(Vo,{timeout:no.transitions.duration.shorter,...t,...Ho,children:n.jsxs(Go,{...Ko,children:[w,y?n.jsx(Xo,{...Yo}):null]})})})]})}),ye=Po(n.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"})),Te=Po(n.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})),we=({value:e,maxLength:o=8})=>{const[p,a]=s.useState(!1),y=async()=>{try{await navigator.clipboard.writeText(e),a(!0),setTimeout(()=>a(!1),2e3)}catch(l){console.error("Failed to copy:",l)}},d=(l,h)=>l.length<=h?l:`${l.slice(0,h)}...`,$=l=>{const h=l.split("::"),O=h[0]||"",W=h[1]||"";return`${O}::${d(W,o)}`},T=e.includes("::")?$(e):d(e,o);return n.jsxs(ae,{sx:{display:"flex",alignItems:"center",gap:1},children:[n.jsx(ie,{variant:"body2",component:"span",children:T}),n.jsx(ge,{title:p?"Copied!":"Copy to clipboard",children:n.jsx(le,{size:"small",onClick:y,sx:{p:.5},children:p?n.jsx(Te,{fontSize:"small"}):n.jsx(ye,{fontSize:"small"})})})]})};export{we as C};
|