PageSourceSearch

https://www.itreview.jp/vite-production/js/floating-tooltip-YFbv6WHj.js

js itreview.jp collected 2026-09-24 15:34:52 UTC 15,457 bytes, 1 lines download raw bytes

1(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"1789548566057"}}catch{}})();try{(function(){var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="14b5eac4-f79d-4d8b-a53f-6f6043b25979",t._sentryDebugIdIdentifier="sentry-dbid-14b5eac4-f79d-4d8b-a53f-6f6043b25979")})()}catch{}const X=Math.min,_=Math.max,J=Math.round,k=t=>({x:t,y:t}),Lt={left:"right",right:"left",bottom:"top",top:"bottom"},St={start:"end",end:"start"};function nt(t,e,o){return _(t,X(e,o))}function z(t,e){return typeof t=="function"?t(e):t}function F(t){return t.split("-")[0]}function K(t){return t.split("-")[1]}function gt(t){return t==="x"?"y":"x"}function st(t){return t==="y"?"height":"width"}function Z(t){return["top","bottom"].includes(F(t))?"y":"x"}function rt(t){return gt(Z(t))}function Dt(t,e,o){o===void 0&&(o=!1);const n=K(t),s=rt(t),r=st(s);let i=s==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(i=Q(i)),[i,Q(i)]}function Pt(t){const e=Q(t);return[ot(t),e,ot(e)]}function ot(t){return t.replace(/start|end/g,e=>St[e])}function kt(t,e,o){const n=["left","right"],s=["right","left"],r=["top","bottom"],i=["bottom","top"];switch(t){case"top":case"bottom":return o?e?s:n:e?n:s;case"left":case"right":return e?r:i;default:return[]}}function Nt(t,e,o,n){const s=K(t);let r=kt(F(t),o==="start",n);return s&&(r=r.map(i=>i+"-"+s),e&&(r=r.concat(r.map(ot)))),r}function Q(t){return t.replace(/left|right|bottom|top/g,e=>Lt[e])}function Vt(t){return{top:0,right:0,bottom:0,left:0,...t}}function ht(t){return typeof t!="number"?Vt(t):{top:t,right:t,bottom:t,left:t}}function U(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function ft(t,e,o){let{reference:n,floating:s}=t;const r=Z(e),i=rt(e),c=st(i),l=F(e),f=r==="y",d=n.x+n.width/2-s.width/2,a=n.y+n.height/2-s.height/2,p=n[c]/2-s[c]/2;let u;switch(l){case"top":u={x:d,y:n.y-s.height};break;case"bottom":u={x:d,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:a};break;case"left":u={x:n.x-s.width,y:a};break;default:u={x:n.x,y:n.y}}switch(K(e)){case"start":u[i]-=p*(o&&f?-1:1);break;case"end":u[i]+=p*(o&&f?-1:1);break}return u}const Wt=async(t,e,o)=>{const{placement:n="bottom",strategy:s="absolute",middleware:r=[],platform:i}=o,c=r.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(e));let f=await i.getElementRects({reference:t,floating:e,strategy:s}),{x:d,y:a}=ft(f,n,l),p=n,u={},m=0;for(let g=0;g<c.length;g++){const{name:h,fn:w}=c[g],{x:y,y:x,data:v,reset:b}=await w({x:d,y:a,initialPlacement:n,placement:p,strategy:s,middlewareData:u,rects:f,platform:i,elements:{reference:t,floating:e}});d=y??d,a=x??a,u={...u,[h]:{...u[h],...v}},b&&m<=50&&(m++,typeof b=="object"&&(b.placement&&(p=b.placement),b.rects&&(f=b.rects===!0?await i.getElementRects({reference:t,floating:e,strategy:s}):b.rects),{x:d,y:a}=ft(f,p,l)),g=-1)}return{x:d,y:a,placement:p,strategy:s,middlewareData:u}};async function wt(t,e){var o;e===void 0&&(e={});const{x:n,y:s,platform:r,rects:i,elements:c,strategy:l}=t,{boundary:f="clippingAncestors",rootBoundary:d="viewport",elementContext:a="floating",altBoundary:p=!1,padding:u=0}=z(e,t),m=ht(u),h=c[p?a==="floating"?"reference":"floating":a],w=U(await r.getClippingRect({element:(o=await(r.isElement==null?void 0:r.isElement(h)))==null||o?h:h.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:f,rootBoundary:d,strategy:l})),y=a==="floating"?{...i.floating,x:n,y:s}:i.reference,x=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),v=await(r.isElement==null?void 0:r.isElement(x))?await(r.getScale==null?void 0:r.getScale(x))||{x:1,y:1}:{x:1,y:1},b=U(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:x,strategy:l}):y);
1return{top:(w.top-b.top+m.top)/v.y,bottom:(b.bottom-w.bottom+m.bottom)/v.y,left:(w.left-b.left+m.left)/v.x,right:(b.right-w.right+m.right)/v.x}}const Bt=t=>({name:"arrow",options:t,async fn(e){const{x:o,y:n,placement:s,rects:r,platform:i,elements:c,middlewareData:l}=e,{element:f,padding:d=0}=z(t,e)||{};if(f==null)return{};const a=ht(d),p={x:o,y:n},u=rt(s),m=st(u),g=await i.getDimensions(f),h=u==="y",w=h?"top":"left",y=h?"bottom":"right",x=h?"clientHeight":"clientWidth",v=r.reference[m]+r.reference[u]-p[u]-r.floating[m],b=p[u]-r.reference[u],W=await(i.getOffsetParent==null?void 0:i.getOffsetParent(f));let T=W?W[x]:0;(!T||!await(i.isElement==null?void 0:i.isElement(W)))&&(T=c.floating[x]||r.floating[m]);const B=v/2-b/2,H=T/2-g[m]/2-1,j=X(a[w],H),I=X(a[y],H),E=j,Y=T-g[m]-I,A=T/2-g[m]/2+B,R=nt(E,A,Y),L=!l.arrow&&K(s)!=null&&A!==R&&r.reference[m]/2-(A<E?j:I)-g[m]/2<0,D=L?A<E?A-E:A-Y:0;return{[u]:p[u]+D,data:{[u]:R,centerOffset:A-R-D,...L&&{alignmentOffset:D}},reset:L}}}),Ft=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var o,n;const{placement:s,middlewareData:r,rects:i,initialPlacement:c,platform:l,elements:f}=e,{mainAxis:d=!0,crossAxis:a=!0,fallbackPlacements:p,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...h}=z(t,e);if((o=r.arrow)!=null&&o.alignmentOffset)return{};const w=F(s),y=F(c)===c,x=await(l.isRTL==null?void 0:l.isRTL(f.floating)),v=p||(y||!g?[Q(c)]:Pt(c));!p&&m!=="none"&&v.push(...Nt(c,g,m,x));const b=[c,...v],W=await wt(e,h),T=[];let B=((n=r.flip)==null?void 0:n.overflows)||[];if(d&&T.push(W[w]),a){const E=Dt(s,i,x);T.push(W[E[0]],W[E[1]])}if(B=[...B,{placement:s,overflows:T}],!T.every(E=>E<=0)){var H,j;const E=(((H=r.flip)==null?void 0:H.index)||0)+1,Y=b[E];if(Y)return{data:{index:E,overflows:B},reset:{placement:Y}};let A=(j=B.filter(R=>R.overflows[0]<=0).sort((R,L)=>R.overflows[1]-L.overflows[1])[0])==null?void 0:j.placement;if(!A)switch(u){case"bestFit":{var I;const R=(I=B.map(L=>[L.placement,L.overflows.filter(D=>D>0).reduce((D,Rt)=>D+Rt,0)]).sort((L,D)=>L[1]-D[1])[0])==null?void 0:I[0];R&&(A=R);break}case"initialPlacement":A=c;break}if(s!==A)return{reset:{placement:A}}}return{}}}};async function _t(t,e){const{placement:o,platform:n,elements:s}=t,r=await(n.isRTL==null?void 0:n.isRTL(s.floating)),i=F(o),c=K(o),l=Z(o)==="y",f=["left","top"].includes(i)?-1:1,d=r&&l?-1:1,a=z(e,t);let{mainAxis:p,crossAxis:u,alignmentAxis:m}=typeof a=="number"?{mainAxis:a,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...a};return c&&typeof m=="number"&&(u=c==="end"?m*-1:m),l?{x:u*d,y:p*f}:{x:p*f,y:u*d}}const $t=function(t){return{name:"offset",options:t,async fn(e){var o,n;const{x:s,y:r,placement:i,middlewareData:c}=e,l=await _t(e,t);return i===((o=c.offset)==null?void 0:o.placement)&&(n=c.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:r+l.y,data:{...l,placement:i}}}}},Mt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:n,placement:s}=e,{mainAxis:r=!0,crossAxis:i=!1,limiter:c={fn:h=>{let{x:w,y}=h;return{x:w,y}}},...l}=z(t,e),f={x:o,y:n},d=await wt(e,l),a=Z(F(s)),p=gt(a);let u=f[p],m=f[a];if(r){const h=p==="y"?"top":"left",w=p==="y"?"bottom":"right",y=u+d[h],x=u-d[w];u=nt(y,u,x)}if(i){const h=a==="y"?"top":"left",w=a==="y"?"bottom":"right",y=m+d[h],x=m-d[w];m=nt(y,m,x)}const g=c.fn({...e,[p]:u,[a]:m});return{...g,data:{x:g.x-o,y:g.y-n}}}}};function N(t){return yt(t)?(t.nodeName||"").toLowerCase():"#document"}function C(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function V(t){var e;return(e=(yt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function yt(t){return t instanceof Node||t instanceof C(t).Node}function P(t){return t instanceof Element||t instanceof C(t).Element}function S(t){return t instanceof HTMLElement||t instanceof C(t).HTMLElement}function at(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof C(t).ShadowRoot}function G(t){const{overflow:e,overflowX:o,overflowY:n,display:s}=O(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+o)&&!["inline","contents"].includes(s)}function Ht(t){return["table","td","th"].includes(N(t))}function ct(t){const e=lt(),o=O(t);return o.transform!=="none"||o.perspective!=="none"||(o.containerType?o.containerType!=="normal":!1)||!e&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!e&&(o.filter?o.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(o.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(o.contain||"").includes(n))}function jt(t){let e=M(t);for(;S(e)&&!tt(e);){if(ct(e))return e;e=M(e)}return null}function lt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function tt(t){return["html","body","#document"].includes(N(t))}function O(t){return C(t).getComputedStyle(t)}function et(t){return P(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function M(t){if(N(t)==="html")return t;const e=t.assignedSlot||t.parentNode||at(t)&&t.host||V(t);return at(e)?e.host:e}function xt(t){const e=M(t);return tt(e)?t.ownerDocument?t.ownerDocument.body:t.body:S(e)&&G(e)?e:xt(e)}function it(t,e,o){var n;e===void 0&&(e=[]),o===void 0&&(o=!0);const s=xt(t),r=s===((n=t.ownerDocument)==null?void 0:n.body),i=C(s);
1return r?e.concat(i,i.visualViewport||[],G(s)?s:[],i.frameElement&&o?it(i.frameElement):[]):e.concat(s,it(s,[],o))}function bt(t){const e=O(t);let o=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=S(t),r=s?t.offsetWidth:o,i=s?t.offsetHeight:n,c=J(o)!==r||J(n)!==i;return c&&(o=r,n=i),{width:o,height:n,$:c}}function vt(t){return P(t)?t:t.contextElement}function $(t){const e=vt(t);if(!S(e))return k(1);const o=e.getBoundingClientRect(),{width:n,height:s,$:r}=bt(e);let i=(r?J(o.width):o.width)/n,c=(r?J(o.height):o.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const It=k(0);function At(t){const e=C(t);return!lt()||!e.visualViewport?It:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Yt(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==C(t)?!1:e}function q(t,e,o,n){e===void 0&&(e=!1),o===void 0&&(o=!1);const s=t.getBoundingClientRect(),r=vt(t);let i=k(1);e&&(n?P(n)&&(i=$(n)):i=$(t));const c=Yt(r,o,n)?At(r):k(0);let l=(s.left+c.x)/i.x,f=(s.top+c.y)/i.y,d=s.width/i.x,a=s.height/i.y;if(r){const p=C(r),u=n&&P(n)?C(n):n;let m=p,g=m.frameElement;for(;g&&n&&u!==m;){const h=$(g),w=g.getBoundingClientRect(),y=O(g),x=w.left+(g.clientLeft+parseFloat(y.paddingLeft))*h.x,v=w.top+(g.clientTop+parseFloat(y.paddingTop))*h.y;l*=h.x,f*=h.y,d*=h.x,a*=h.y,l+=x,f+=v,m=C(g),g=m.frameElement}}return U({width:d,height:a,x:l,y:f})}const Xt=[":popover-open",":modal"];function Ct(t){return Xt.some(e=>{try{return t.matches(e)}catch{return!1}})}function qt(t){let{elements:e,rect:o,offsetParent:n,strategy:s}=t;const r=s==="fixed",i=V(n),c=e?Ct(e.floating):!1;if(n===i||c&&r)return o;let l={scrollLeft:0,scrollTop:0},f=k(1);const d=k(0),a=S(n);if((a||!a&&!r)&&((N(n)!=="body"||G(i))&&(l=et(n)),S(n))){const p=q(n);f=$(n),d.x=p.x+n.clientLeft,d.y=p.y+n.clientTop}return{width:o.width*f.x,height:o.height*f.y,x:o.x*f.x-l.scrollLeft*f.x+d.x,y:o.y*f.y-l.scrollTop*f.y+d.y}}function zt(t){return Array.from(t.getClientRects())}function Et(t){return q(V(t)).left+et(t).scrollLeft}function Kt(t){const e=V(t),o=et(t),n=t.ownerDocument.body,s=_(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=_(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let i=-o.scrollLeft+Et(t);const c=-o.scrollTop;return O(n).direction==="rtl"&&(i+=_(e.clientWidth,n.clientWidth)-s),{width:s,height:r,x:i,y:c}}function Gt(t,e){const o=C(t),n=V(t),s=o.visualViewport;let r=n.clientWidth,i=n.clientHeight,c=0,l=0;if(s){r=s.width,i=s.height;const f=lt();(!f||f&&e==="fixed")&&(c=s.offsetLeft,l=s.offsetTop)}return{width:r,height:i,x:c,y:l}}function Jt(t,e){const o=q(t,!0,e==="fixed"),n=o.top+t.clientTop,s=o.left+t.clientLeft,r=S(t)?$(t):k(1),i=t.clientWidth*r.x,c=t.clientHeight*r.y,l=s*r.x,f=n*r.y;return{width:i,height:c,x:l,y:f}}function ut(t,e,o){let n;if(e==="viewport")n=Gt(t,o);else if(e==="document")n=Kt(V(t));else if(P(e))n=Jt(e,o);else{const s=At(t);n={...e,x:e.x-s.x,y:e.y-s.y}}return U(n)}function Ot(t,e){const o=M(t);return o===e||!P(o)||tt(o)?!1:O(o).position==="fixed"||Ot(o,e)}function Qt(t,e){const o=e.get(t);if(o)return o;let n=it(t,[],!1).filter(c=>P(c)&&N(c)!=="body"),s=null;const r=O(t).position==="fixed";let i=r?M(t):t;for(;P(i)&&!tt(i);){const c=O(i),l=ct(i);!l&&c.position==="fixed"&&(s=null),(r?!l&&!s:!l&&c.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||G(i)&&!l&&Ot(t,i))?n=n.filter(d=>d!==i):s=c,i=M(i)}return e.set(t,n),n}function Ut(t){let{element:e,boundary:o,rootBoundary:n,strategy:s}=t;const i=[...o==="clippingAncestors"?Qt(e,this._c):[].concat(o),n],c=i[0],l=i.reduce((f,d)=>{const a=ut(e,d,s);return f.top=_(a.top,f.top),f.right=X(a.right,f.right),f.bottom=X(a.bottom,f.bottom),f.left=_(a.left,f.left),f},ut(e,c,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Zt(t){const{width:e,height:o}=bt(t);return{width:e,height:o}}function te(t,e,o){const n=S(e),s=V(e),r=o==="fixed",i=q(t,!0,r,e);let c={scrollLeft:0,scrollTop:0};const l=k(0);if(n||!n&&!r)if((N(e)!=="body"||G(s))&&(c=et(e)),n){const a=q(e,!0,r,e);l.x=a.x+e.clientLeft,l.y=a.y+e.clientTop}else s&&(l.x=Et(s));const f=i.left+c.scrollLeft-l.x,d=i.top+c.scrollTop-l.y;return{x:f,y:d,width:i.width,height:i.height}}function dt(t,e){return!S(t)||O(t).position==="fixed"?null:e?e(t):t.offsetParent}function Tt(t,e){const o=C(t);if(!S(t)||Ct(t))return o;let n=dt(t,e);for(;n&&Ht(n)&&O(n).position==="static";)n=dt(n,e);return n&&(N(n)==="html"||N(n)==="body"&&O(n).position==="static"&&!ct(n))?o:n||jt(t)||o}const ee=async function(t){const e=this.getOffsetParent||Tt,o=this.getDimensions;return{reference:te(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,...await o(t.floating)}}};function ne(t){return O(t).direction==="rtl"}const oe={convertOffsetParentRelativeRectToViewportRelativeRect:qt,getDocumentElement:V,getClippingRect:Ut,getOffsetParent:Tt,getElementRects:ee,getClientRects:zt,getDimensions:Zt,getScale:$,isElement:P,
1isRTL:ne},ie=Mt,se=Ft,re=Bt,ce=(t,e,o)=>{const n=new Map,s={platform:oe,...o},r={...s.platform,_c:n};return Wt(t,e,{...s,platform:r})};function le(t,e,o,n){ce(t,e,{placement:["top","bottom","left","right"].includes(n)?n:"top",middleware:[$t(6),se(),ie({padding:5}),re({element:o})]}).then(({x:r,y:i,placement:c,middlewareData:l})=>{Object.assign(e.style,{left:`${r}px`,top:`${i}px`});const{x:f,y:d}=l.arrow,a={top:"bottom",right:"left",bottom:"top",left:"right"}[c.split("-")[0]];Object.assign(o.style,{left:f!=null?`${f}px`:"",top:d!=null?`${d}px`:"",right:"",bottom:"",[a]:"-4px"})})}function mt(t,e,o,n){e.style.display="block",le(t,e,o,n)}function pt(t,e,o,n){e.style.display=""}const fe=function(t){const e=document.querySelectorAll(`${t} [data-fl-tooltip-ref]`);e.length>0&&[["mouseenter",mt],["mouseleave",pt],["focus",mt],["blur",pt]].forEach(([o,n])=>{e.forEach((s,r)=>{const i=s.nextElementSibling;if(!i)return;let c=i.dataset.flPosition;c||(c="top");const l=i.querySelector("[data-fl-arrow]");l&&s.addEventListener(o,()=>{n(s,i,l,c)})})})};export{fe as f};

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.