1import{d as v,r as s,p as f,u as d,B as m,w as h,C as x,D as y,c as b,E as k,i as C,A as g}from"./app-BQ-43nIL.js";import{_ as w}from"./element-with-tooltip.scss_vue_type_style_index_0_src_true_lang-P7BBrpmz.js";const _=v({__name:"copy-url",props:{url:{},text:{}},setup(t){const l=t,r=s(l.text),i=f(),a=s(!1),o=s("top-end"),n=d(m.MD);n.value&&(o.value=i.value==="ltr"?"right":"left"),h(n,e=>{e?o.value=i.value==="ltr"?"right":"left":o.value="top-end"});function c(e){e.preventDefault(),a.value=!1,r.value=l.text,navigator.clipboard.writeText(l.url).then(()=>{a.value=!0,setTimeout(()=>a.value=!1,3e3)},u=>{r.value=u.message})}return(e,u)=>{const p=x("track-event");return y((b(),k(w,{type:"button",class:"b-copy-url u-reset-button","data-e2e-test-id":"copy-url-button",element:"button",text:t.text,role:"status",visible:a.value,"tooltip-placement":o.value,onClick:c},{default:C(()=>[g(e.$slots,"default")]),_:3},8,["text","visible","tooltip-placement"])),[[p,{category:"Share",action:"Copy URL",name:t.url,dataLayer:{"Share Type":"Copy URL",URL:t.url}},"click"]])}}});export{_ as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.