1import{d as ue,u as ce,a as fe,C as pe,L as de,c as w,M as me,h as d,i as k,s as L,j as i,v as n,n as C,l as ve,N as _e,B as he,x as ge,O as ye,y as we,t as m,F as ke,k as xe,q as be,r as u,K as Ee,_ as Te}from"./Df0YFKD7.js";import{R as j,c as Re}from"./zqCpy5tI.js";const Le=["aria-label","aria-expanded","aria-controls"],Ce=["aria-label"],Pe={class:"rtip-title"},Be={class:"rtip-flags"},Ie={class:"rtip-text"},Me={class:"rtip-text"},Ke=["href","target","rel"];let f=null;const $e=ue({__name:"RouterInfoTip",props:{accent:{default:"teal"}},emits:["toggle"],setup(Y,{emit:J}){const P=J,{t:c,locale:B}=ce(),I=fe(),Q=pe(),M=`rtip-${de()}`,K=j.length,X=w(()=>Re(K,B.value)),x=w(()=>(Q.path.replace(/\/+$/,"")||"/")===I("/")),Z=w(()=>x.value?"#faq-8":`${I("/")}#faq-8`),$=10,v=12,ee=150,b=u(null),p=u(null),_=u(null),o=u(!1),h=u(!1),E=u("top"),s=u({top:0,left:0,arrow:24,ready:!1}),te=w(()=>({top:`${s.value.top}px`,left:`${s.value.left}px`,"--rtip-arrow":`${s.value.arrow}px`}));let g,q=0;function ne(){const e=p.value,t=_.value;if(!e||!t)return;const r=e.getBoundingClientRect(),l=document.documentElement.clientWidth,ie=window.innerHeight;if(r.bottom<0||r.top>ie||r.right<0||r.left>l){a();return}const z=t.offsetWidth,se=t.offsetHeight,le=(b.value?.closest("li, .zx-feat")??b.value?.parentElement??e).getBoundingClientRect().left,T=Math.round(Math.min(Math.max(le,v),Math.max(v,l-v-z))),U=r.top-$-se,R=U>=v?"top":"bottom",W=Math.round(R==="top"?U:r.bottom+$),G=Math.round(Math.min(Math.max(r.left+r.width/2-T,16),z-16)),y=s.value;(!y.ready||y.top!==W||y.left!==T||y.arrow!==G)&&(s.value={top:W,left:T,arrow:G,ready:!0}),E.value!==R&&(E.value=R)}function D(){ne(),o.value&&(q=requestAnimationFrame(D))}function N(){clearTimeout(g),!o.value&&(f&&f!==a&&f(),f=a,s.value={...s.value,ready:!1},o.value=!0,P("toggle",!0),Ee(()=>{o.value&&D()}),document.addEventListener("pointerdown",F,!0),document.addEventListener("keydown",O),document.addEventListener("focusin",H))}function a(){clearTimeout(g),f===a&&(f=null),o.value&&(o.value=!1,h.value=!1,cancelAnimationFrame(q),document.removeEventListener("pointerdown",F,!0),document.removeEventListener("keydown",O),document.removeEventListener("focusin",H),P("toggle",!1))}function A(e){const t=e;return!!t&&(!!p.value?.contains(t)||!!_.value?.contains(t))}function F(e){A(e.target)||a()}function H(e){A(e.target)||a()}function oe(e){if(e.key!=="Tab"||e.shiftKey||!o.value)return;const t=_.value?.querySelector("a");t&&(e.preventDefault(),t.focus())}function ae(e){if(e.key!=="Tab")return;const t=p.value;if(t){if(e.shiftKey){e.preventDefault(),t.focus();return}a(),t.focus()}}function O(e){e.key==="Escape"&&(a(),p.value?.focus())}function re(){if(o.value&&h.value){a();return}h.value=!0,N()}function S(e){e.pointerType==="mouse"&&N()}function V(e){e.pointerType!=="mouse"||h.value||(clearTimeout(g),g=setTimeout(a,ee))}return me(a),(e,t)=>{const r=_e;return d(),k("span",{ref_key:"rootRef",ref:b,class:"rtip"},[t[3]||(t[3]=L("â ",-1)),i("button",{ref_key:"btnRef",ref:p,type:"button",class:C(["rtip-btn",{"is-orange":Y.accent==="orange","is-open":n(o)}]),"aria-label":n(c)("pricing.router_tip_aria"),"aria-haspopup":"dialog","aria-expanded":n(o)?"true":"false","aria-controls":n(o)?M:void 0,onClick:re,onKeydown:oe,onPointerenter:S,onPointerleave:V},[...t[0]||(t[0]=[i("i",{class:"fa-solid fa-circle-info","aria-hidden":"true"},null,-1)])],42,Le),ve(r,null,{default:he(()=>[(d(),ge(ye,{to:"body"},[n(o)?(d(),k("div",{key:0,id:M,ref_key:"popRef",ref:_,class:C(["rtip-pop",`is-${n(E)}`]),role:"dialog","aria-label":n(c)("pricing.router_tip_aria"),style:we(n(te)),onKeydown:ae,onPointerenter:S,onPointerleave:V},[i("p",Pe,m(n(c)("pricing.router_tip_title",{count:n(K),word:n(X)})),1),i("ul",Be,[(d(!0),k(ke,null,xe(n(j),l=>(d(),k("li",{key:l.code},[i("span",{class:C(["fi",`fi-${l.code}`]),"aria-hidden":"true"},null,2),L(m(n(B)==="en"?l.name.en:l.name.ru),1)]))),128))]),t[2]||(t[2]=i("hr",{class:"rtip-sep"},null,-1)),i("p",Ie,m(n(c)("pricing.router_tip_other")),1),i("p",Me,m(n(c)("pricing.router_tip_configs")),1),i("a",{class:"rtip-link",href:n(Z),target:n(x)?void 0:"_blank",rel:n(x)?void 0:"noopener",onClick:a},[L(m(n(c)("pricing.router_tip_link"))+" ",1),t[1]||(t[1]=i("i",{class:"fa-solid fa-arrow-right","aria-hidden":"true"},null,-1))],8,Ke)],46,Ce)):be("",!0)]))]),_:1})],512)}}}),Ae=Te($e,[["__scopeId","data-v-34490e63"]]);export{Ae as _};
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.