"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[186],{2186:function(e,o,t){t.r(o);var n=t(709),i=t.n(n);function r(e,o){const t=e.state.info,n=o.target||o.srcElement;if(!(n instanceof HTMLElement))return;if("SPAN"!==n.nodeName||void 0!==t.hoverTimeout)return;const r=n.getBoundingClientRect(),u=function(){clearTimeout(t.hoverTimeout),t.hoverTimeout=setTimeout(s,f)},m=function(){i().off(document,"mousemove",u),i().off(e.getWrapperElement(),"mouseout",m),clearTimeout(t.hoverTimeout),t.hoverTimeout=void 0},s=function(){i().off(document,"mousemove",u),i().off(e.getWrapperElement(),"mouseout",m),t.hoverTimeout=void 0,function(e,o){const t=e.coordsChar({left:(o.left+o.right)/2,top:(o.top+o.bottom)/2},"window"),n=e.state.info,{options:r}=n,u=r.render||e.getHelper(t,"info");if(u){const n=e.getTokenAt(t,!0);if(n){const m=u(n,r,e,t);m&&function(e,o,t){const n=document.createElement("div");n.className="CodeMirror-info",n.append(t),document.body.append(n);const r=n.getBoundingClientRect(),u=window.getComputedStyle(n),m=r.right-r.left+parseFloat(u.marginLeft)+parseFloat(u.marginRight),s=r.bottom-r.top+parseFloat(u.marginTop)+parseFloat(u.marginBottom);let f=o.bottom;s>window.innerHeight-o.bottom-15&&o.top>window.innerHeight-o.bottom&&(f=o.top-s),f<0&&(f=o.bottom);let a,c=Math.max(0,window.innerWidth-m-15);c>o.left&&(c=o.left),n.style.opacity="1",n.style.top=f+"px",n.style.left=c+"px";const p=function(){clearTimeout(a)},l=function(){clearTimeout(a),a=setTimeout(d,200)},d=function(){i().off(n,"mouseover",p),i().off(n,"mouseout",l),i().off(e.getWrapperElement(),"mouseout",l),n.style.opacity?(n.style.opacity="0",setTimeout((()=>{n.parentNode&&n.remove()}),600)):n.parentNode&&n.remove()};i().on(n,"mouseover",p),i().on(n,"mouseout",l),i().on(e.getWrapperElement(),"mouseout",l)}(e,o,m)}}}(e,r)},f=function(e){const{options:o}=e.state.info;return(null==o?void 0:o.hoverTime)||500}(e);t.hoverTimeout=setTimeout(s,f),i().on(document,"mousemove",u),i().on(e.getWrapperElement(),"mouseout",m)}i().defineOption("info",!1,((e,o,t)=>{if(t&&t!==i().Init){const o=e.state.info.onMouseOver;i().off(e.getWrapperElement(),"mouseover",o),clearTimeout(e.state.info.hoverTimeout),delete e.state.info}if(o){const t=e.state.info=function(e){return{options:e instanceof Function?{render:e}:!0===e?{}:e}}(o);t.onMouseOver=r.bind(null,e),i().on(e.getWrapperElement(),"mouseover",t.onMouseOver)}}))}}]);
//# sourceMappingURL=186.js.map