-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathmain.js
2 lines (2 loc) · 39.7 KB
/
main.js
1
2
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("atom");const t=(e,t)=>e===t;let n=T;const o={},r={owned:null,cleanups:null,context:null,owner:null};d(!1);var i=null,s=null;let a=null,l=null,c=null,u=0;function d(e,n=!0,r){const i={value:e,observers:null,observerSlots:null,pending:o,comparator:n?"function"==typeof n?n:t:void 0};return[h.bind(i),v.bind(i)]}function p(e,t){g(y(e,t,!1))}function f(e){let t,n=s;return s=null,t=e(),s=n,t}function m(e){!function(e,t){n=M;const o=y(e,t,!1);o.user=!0,c&&c.push(o)}((()=>f(e)))}function h(){if(this.state&&this.sources){const e=l;l=null,1===this.state?g(this):A(this),l=e}if(s){const e=this.observers?this.observers.length:0;s.sources?(s.sources.push(this),s.sourceSlots.push(e)):(s.sources=[this],s.sourceSlots=[e]),this.observers?(this.observers.push(s),this.observerSlots.push(s.sources.length-1)):(this.observers=[s],this.observerSlots=[s.sources.length-1])}return this.value}function v(e,t){return this.comparator&&this.comparator(this.value,e)?e:a?(this.pending===o&&a.push(this),this.pending=e,e):(this.value=e,!this.observers||l&&!this.observers.length||w((()=>{for(let e=0;e<this.observers.length;e+=1){const t=this.observers[e];null,t.observers&&2!==t.state&&k(t),t.state=1,t.pure?l.push(t):c.push(t)}if(l.length>1e6)throw l=[],new Error("Potential Infinite Loop Detected.")}),!1),e)}function g(e){if(!e.fn)return;S(e);const t=i,n=s,o=u;s=i=e,function(e,t,n){let o;try{o=e.fn(t)}catch(e){E(e)}(!e.updatedAt||e.updatedAt<=n)&&(e.observers&&e.observers.length?v.call(e,o,!0):e.value=o,e.updatedAt=n)}(e,e.value,o),s=n,i=t}function y(e,t,n){const o={fn:e,state:1,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:i,context:null,pure:n};return null===i||i!==r&&(i.owned?i.owned.push(o):i.owned=[o]),o}function b(e){let t,n=1===e.state&&e;if(e.suspense&&f(e.suspense.inFallback))return e.suspense.effects.push(e);for(;e.fn&&(e=e.owner);)2===e.state?t=e:1===e.state&&(n=e,t=void 0);if(t){const e=l;if(l=null,A(t),l=e,!n||1!==n.state)return}n&&g(n)}function w(e,t){if(l)return e();let r=!1;t||(l=[]),c?r=!0:c=[],u++;try{e()}catch(e){E(e)}finally{!function(e){l&&(T(l),l=null);if(e)return;c.length?function(e){if(a)return e();const t=a=[],n=e();a=null,w((()=>{for(let e=0;e<t.length;e+=1){const n=t[e];if(n.pending!==o){const e=n.pending;n.pending=o,v.call(n,e)}}}),!1)}((()=>{n(c),c=null})):c=null}(r)}}function T(e){for(let t=0;t<e.length;t++)b(e[t])}function M(e){let t,n=0;for(t=0;t<e.length;t++){const o=e[t];o.user?e[n++]=o:b(o)}const o=e.length;for(t=0;t<n;t++)b(e[t]);for(t=o;t<e.length;t++)b(e[t])}function A(e){e.state=0;for(let t=0;t<e.sources.length;t+=1){const n=e.sources[t];n.sources&&(1===n.state?b(n):2===n.state&&A(n))}}function k(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=2,n.observers&&k(n))}}function S(e){let t;if(e.sources)for(;e.sources.length;){const t=e.sources.pop(),n=e.sourceSlots.pop(),o=t.observers;if(o&&o.length){const e=o.pop(),r=t.observerSlots.pop();n<o.length&&(e.sourceSlots[r]=n,o[n]=e,t.observerSlots[n]=r)}}if(e.owned){for(t=0;t<e.owned.length;t++)S(e.owned[t]);e.owned=null}if(e.cleanups){for(t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}e.state=0,e.context=null}function E(e){throw e}const x=Symbol("state-proxy");function D(e,t){return f((()=>e(t)))}function N(){return!0}const C={get:(e,t,n)=>t===x?n:e.get(t),has:(e,t)=>e.has(t),set:N,deleteProperty:N,getOwnPropertyDescriptor:(e,t)=>({configurable:!0,enumerable:!0,get:()=>e.get(t),set:N,deleteProperty:N}),ownKeys:e=>e.keys()};function L(...e){return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){const o=e[n][t];if(void 0!==o)return o}},has(t){for(let n=e.length-1;n>=0;n--)if(t in e[n])return!0;return!1},keys(){const t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(e[n]));return[...new Set(t)]}},C)}const _=new Set(["className","indeterminate","value","allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","truespeed"]),O=new Set(["innerHTML","textContent","innerText","children"]),R={className:"class",htmlFor:"for"},P=new Set(["beforeinput","click","dblclick","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),F={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function $(e,n){return function(e,n,r=!0){const i=y(e,n,!0);return i.pending=o,i.observers=null,i.observerSlots=null,i.state=0,i.comparator=r?"function"==typeof r?r:t:void 0,g(i),h.bind(i)}(e,void 0,n)}function I(e,t,n){let o=n.length,r=t.length,i=o,s=0,a=0,l=t[r-1].nextSibling,c=null;for(;s<r||a<i;)if(r===s){const t=i<o?a?n[a-1].nextSibling:n[i-a]:l;for(;a<i;)e.insertBefore(n[a++],t)}else if(i===a)for(;s<r;)c&&c.has(t[s])||e.removeChild(t[s]),s++;else if(t[s]===n[a])s++,a++;else if(t[r-1]===n[i-1])r--,i--;else if(t[s]===n[i-1]&&n[a]===t[r-1]){const o=t[--r].nextSibling;e.insertBefore(n[a++],t[s++].nextSibling),e.insertBefore(n[--i],o),t[r]=n[i]}else{if(!c){c=new Map;let e=a;for(;e<i;)c.set(n[e],e++)}const o=c.get(t[s]);if(null!=o)if(a<o&&o<i){let l,u=s,d=1;for(;++u<r&&u<i&&null!=(l=c.get(t[u]))&&l===o+d;)d++;if(d>o-a){const r=t[s];for(;a<o;)e.insertBefore(n[a++],r)}else e.replaceChild(n[a++],t[s++])}else s++;else e.removeChild(t[s++])}}const z=Symbol("delegated-events");function H(e,t,n){let o;return function(e,t){t&&(i=t);const n=s,o=i,a=0===e.length?r:{owned:null,cleanups:null,context:null,owner:o,attached:!!t};let l;i=a,s=null;try{w((()=>l=e((()=>S(a)))),!0)}finally{s=n,i=o}}((r=>{o=r,X(t,e(),t.firstChild?null:void 0,n)})),()=>{o(),t.textContent=""}}function j(e,t,n){const o=document.createElement("template");if(o.innerHTML=e,t&&o.innerHTML.split("<").length-1!==t)throw`Template html does not match input:\n${o.innerHTML}\n\n${e}`;let r=o.content.firstChild;return n&&(r=r.firstChild),r}function B(e){const t=document[z]||(document[z]=new Set);for(let n=0,o=e.length;n<o;n++){const o=e[n];t.has(o)||(t.add(o),document.addEventListener(o,Z))}}function U(e,t,n){null==n?e.removeAttribute(t):e.setAttribute(t,n)}function W(e,t,n,o){null==o?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,o)}function G(e,t,n,o){o?Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n:Array.isArray(n)?e.addEventListener(t,(e=>n[0](n[1],e))):e.addEventListener(t,n)}function V(e,t,n={}){const o=Object.keys(t),r=Object.keys(n);let i,s;for(i=0,s=r.length;i<s;i++){const o=r[i];o&&"undefined"!==o&&!(o in t)&&(Y(e,o,!1),delete n[o])}for(i=0,s=o.length;i<s;i++){const r=o[i],s=!!t[r];r&&"undefined"!==r&&n[r]!==s&&(Y(e,r,s),n[r]=s)}return t}function q(e,t,n={}){const o=e.style;if("string"==typeof t)return o.cssText=t;let r,i;for(i in"string"==typeof n&&(n={}),n)null==t[i]&&o.removeProperty(i),delete n[i];for(i in t)r=t[i],r!==n[i]&&(o.setProperty(i,r),n[i]=r);return n}function K(e,t,n,o){"function"==typeof t?p((r=>J(e,t(),r,n,o))):J(e,t,void 0,n,o)}function X(e,t,n,o){if(void 0===n||o||(o=[]),"function"!=typeof t)return Q(e,t,o,n);p((o=>Q(e,t(),o,n)),o)}function Y(e,t,n){const o=t.split(/\s+/);for(let t=0,r=o.length;t<r;t++)e.classList.toggle(o[t],n)}function Z(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get:()=>n});null!==n;){const o=n[t];if(o){const r=n[`${t}Data`];if(void 0!==r?o(r,e):o(e),e.cancelBubble)return}n=n.host&&n.host!==n&&n.host instanceof Node?n.host:n.parentNode}}function J(e,t,n={},o,r){return!r&&"children"in t&&p((()=>n.children=Q(e,t.children,n.children))),p((()=>function(e,t,n,o,r={}){let i,s,a;for(const c in t){if("children"===c){o||Q(e,t.children);continue}const u=t[c];if(u!==r[c]){if("style"===c)q(e,u,r[c]);else if("class"!==c||n)if("classList"===c)V(e,u,r[c]);else if("ref"===c)u(e);else if("on:"===c.slice(0,3))e.addEventListener(c.slice(3),u);else if("oncapture:"===c.slice(0,10))e.addEventListener(c.slice(10),u,!0);else if("on"===c.slice(0,2)){const t=c.slice(2).toLowerCase(),n=P.has(t);G(e,t,u,n),n&&B([t])}else if((a=O.has(c))||!n&&(s=_.has(c))||(i=e.nodeName.includes("-")))!i||s||a?e[c]=u:e[(l=c,l.toLowerCase().replace(/-([a-z])/g,((e,t)=>t.toUpperCase())))]=u;else{const t=n&&c.indexOf(":")>-1&&F[c.split(":")[0]];t?W(e,t,c,u):U(e,R[c]||c,u)}else e.className=u;r[c]=u}}var l}(e,t,o,!0,n))),n}function Q(e,t,n,o,r){for(;"function"==typeof n;)n=n();if(t===n)return n;const i=typeof t,s=void 0!==o;if(e=s&&n[0]&&n[0].parentNode||e,"string"===i||"number"===i)if("number"===i&&(t=t.toString()),s){let r=n[0];r&&3===r.nodeType?r.data=t:r=document.createTextNode(t),n=ne(e,n,o,r)}else n=""!==n&&"string"==typeof n?e.firstChild.data=t:e.textContent=t;else if(null==t||"boolean"===i)n=ne(e,n,o);else{if("function"===i)return p((()=>{let r=t();for(;"function"==typeof r;)r=r();n=Q(e,r,n,o)})),()=>n;if(Array.isArray(t)){const i=[];if(ee(i,t,r))return p((()=>n=Q(e,i,n,o,!0))),()=>n;if(0===i.length){if(n=ne(e,n,o),s)return n}else Array.isArray(n)?0===n.length?te(e,i,o):I(e,n,i):null==n||""===n?te(e,i):I(e,s&&n||[e.firstChild],i);n=i}else if(t instanceof Node){if(Array.isArray(n)){if(s)return n=ne(e,n,o,t);ne(e,n,null,t)}else null!=n&&""!==n&&e.firstChild?e.replaceChild(t,e.firstChild):e.appendChild(t);n=t}else console.warn("Skipped inserting",t)}return n}function ee(e,t,n){let o=!1;for(let r=0,i=t.length;r<i;r++){let i,s=t[r];if(s instanceof Node)e.push(s);else if(null==s||!0===s||!1===s);else if(Array.isArray(s))o=ee(e,s)||o;else if("string"==(i=typeof s))e.push(document.createTextNode(s));else if("function"===i)if(n){for(;"function"==typeof s;)s=s();o=ee(e,Array.isArray(s)?s:[s])||o}else e.push(s),o=!0;else e.push(document.createTextNode(s.toString()))}return o}function te(e,t,n){for(let o=0,r=t.length;o<r;o++)e.insertBefore(t[o],n)}function ne(e,t,n,o){if(void 0===n)return e.textContent="";const r=o||document.createTextNode("");if(t.length){let o=!1;for(let i=t.length-1;i>=0;i--){const s=t[i];if(r!==s){const t=s.parentNode===e;o||i?t&&e.removeChild(s):t?e.replaceChild(r,s):e.insertBefore(r,n)}else o=!0}}else e.insertBefore(r,n);return[r]}var oe=Object.hasOwnProperty,re=Object.setPrototypeOf,ie=Object.isFrozen,se=Object.getPrototypeOf,ae=Object.getOwnPropertyDescriptor,le=Object.freeze,ce=Object.seal,ue=Object.create,de="undefined"!=typeof Reflect&&Reflect,pe=de.apply,fe=de.construct;pe||(pe=function(e,t,n){return e.apply(t,n)}),le||(le=function(e){return e}),ce||(ce=function(e){return e}),fe||(fe=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t))))});var me,he=Se(Array.prototype.forEach),ve=Se(Array.prototype.pop),ge=Se(Array.prototype.push),ye=Se(String.prototype.toLowerCase),be=Se(String.prototype.match),we=Se(String.prototype.replace),Te=Se(String.prototype.indexOf),Me=Se(String.prototype.trim),Ae=Se(RegExp.prototype.test),ke=(me=TypeError,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return fe(me,t)});function Se(e){return function(t){for(var n=arguments.length,o=Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return pe(e,t,o)}}function Ee(e,t){re&&re(e,null);for(var n=t.length;n--;){var o=t[n];if("string"==typeof o){var r=ye(o);r!==o&&(ie(t)||(t[n]=r),o=r)}e[o]=!0}return e}function xe(e){var t=ue(null),n=void 0;for(n in e)pe(oe,e,[n])&&(t[n]=e[n]);return t}function De(e,t){for(;null!==e;){var n=ae(e,t);if(n){if(n.get)return Se(n.get);if("function"==typeof n.value)return Se(n.value)}e=se(e)}return function(e){return console.warn("fallback value for",e),null}}var Ne=le(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ce=le(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Le=le(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),_e=le(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Oe=le(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),Re=le(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Pe=le(["#text"]),Fe=le(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),$e=le(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ie=le(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ze=le(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),He=ce(/\{\{[\s\S]*|[\s\S]*\}\}/gm),je=ce(/<%[\s\S]*|[\s\S]*%>/gm),Be=ce(/^data-[\-\w.\u00B7-\uFFFF]/),Ue=ce(/^aria-[\-\w]+$/),We=ce(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ge=ce(/^(?:\w+script|data):/i),Ve=ce(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function Ke(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var Xe=function(){return"undefined"==typeof window?null:window},Ye=function(e,t){if("object"!==(void 0===e?"undefined":qe(e))||"function"!=typeof e.createPolicy)return null;var n=null,o="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(o)&&(n=t.currentScript.getAttribute(o));var r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}};var Ze=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Xe(),n=function(t){return e(t)};if(n.version="2.2.9",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var o=t.document,r=t.document,i=t.DocumentFragment,s=t.HTMLTemplateElement,a=t.Node,l=t.Element,c=t.NodeFilter,u=t.NamedNodeMap,d=void 0===u?t.NamedNodeMap||t.MozNamedAttrMap:u,p=t.Text,f=t.Comment,m=t.DOMParser,h=t.trustedTypes,v=l.prototype,g=De(v,"cloneNode"),y=De(v,"nextSibling"),b=De(v,"childNodes"),w=De(v,"parentNode");if("function"==typeof s){var T=r.createElement("template");T.content&&T.content.ownerDocument&&(r=T.content.ownerDocument)}var M=Ye(h,o),A=M&&ee?M.createHTML(""):"",k=r,S=k.implementation,E=k.createNodeIterator,x=k.createDocumentFragment,D=o.importNode,N={};try{N=xe(r).documentMode?r.documentMode:{}}catch(e){}var C={};n.isSupported="function"==typeof w&&S&&void 0!==S.createHTMLDocument&&9!==N;var L=He,_=je,O=Be,R=Ue,P=Ge,F=Ve,$=We,I=null,z=Ee({},[].concat(Ke(Ne),Ke(Ce),Ke(Le),Ke(Oe),Ke(Pe))),H=null,j=Ee({},[].concat(Ke(Fe),Ke($e),Ke(Ie),Ke(ze))),B=null,U=null,W=!0,G=!0,V=!1,q=!1,K=!1,X=!1,Y=!1,Z=!1,J=!1,Q=!0,ee=!1,te=!0,ne=!0,oe=!1,re={},ie=Ee({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),se=null,ae=Ee({},["audio","video","img","source","image","track"]),ce=null,ue=Ee({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),de="http://www.w3.org/1998/Math/MathML",pe="http://www.w3.org/2000/svg",fe="http://www.w3.org/1999/xhtml",me=fe,Se=!1,Ze=null,Je=r.createElement("form"),Qe=function(e){Ze&&Ze===e||(e&&"object"===(void 0===e?"undefined":qe(e))||(e={}),e=xe(e),I="ALLOWED_TAGS"in e?Ee({},e.ALLOWED_TAGS):z,H="ALLOWED_ATTR"in e?Ee({},e.ALLOWED_ATTR):j,ce="ADD_URI_SAFE_ATTR"in e?Ee(xe(ue),e.ADD_URI_SAFE_ATTR):ue,se="ADD_DATA_URI_TAGS"in e?Ee(xe(ae),e.ADD_DATA_URI_TAGS):ae,B="FORBID_TAGS"in e?Ee({},e.FORBID_TAGS):{},U="FORBID_ATTR"in e?Ee({},e.FORBID_ATTR):{},re="USE_PROFILES"in e&&e.USE_PROFILES,W=!1!==e.ALLOW_ARIA_ATTR,G=!1!==e.ALLOW_DATA_ATTR,V=e.ALLOW_UNKNOWN_PROTOCOLS||!1,q=e.SAFE_FOR_TEMPLATES||!1,K=e.WHOLE_DOCUMENT||!1,Z=e.RETURN_DOM||!1,J=e.RETURN_DOM_FRAGMENT||!1,Q=!1!==e.RETURN_DOM_IMPORT,ee=e.RETURN_TRUSTED_TYPE||!1,Y=e.FORCE_BODY||!1,te=!1!==e.SANITIZE_DOM,ne=!1!==e.KEEP_CONTENT,oe=e.IN_PLACE||!1,$=e.ALLOWED_URI_REGEXP||$,me=e.NAMESPACE||fe,q&&(G=!1),J&&(Z=!0),re&&(I=Ee({},[].concat(Ke(Pe))),H=[],!0===re.html&&(Ee(I,Ne),Ee(H,Fe)),!0===re.svg&&(Ee(I,Ce),Ee(H,$e),Ee(H,ze)),!0===re.svgFilters&&(Ee(I,Le),Ee(H,$e),Ee(H,ze)),!0===re.mathMl&&(Ee(I,Oe),Ee(H,Ie),Ee(H,ze))),e.ADD_TAGS&&(I===z&&(I=xe(I)),Ee(I,e.ADD_TAGS)),e.ADD_ATTR&&(H===j&&(H=xe(H)),Ee(H,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&Ee(ce,e.ADD_URI_SAFE_ATTR),ne&&(I["#text"]=!0),K&&Ee(I,["html","head","body"]),I.table&&(Ee(I,["tbody"]),delete B.tbody),le&&le(e),Ze=e)},et=Ee({},["mi","mo","mn","ms","mtext"]),tt=Ee({},["foreignobject","desc","title","annotation-xml"]),nt=Ee({},Ce);Ee(nt,Le),Ee(nt,_e);var ot=Ee({},Oe);Ee(ot,Re);var rt=function(e){var t=w(e);t&&t.tagName||(t={namespaceURI:fe,tagName:"template"});var n=ye(e.tagName),o=ye(t.tagName);if(e.namespaceURI===pe)return t.namespaceURI===fe?"svg"===n:t.namespaceURI===de?"svg"===n&&("annotation-xml"===o||et[o]):Boolean(nt[n]);if(e.namespaceURI===de)return t.namespaceURI===fe?"math"===n:t.namespaceURI===pe?"math"===n&&tt[o]:Boolean(ot[n]);if(e.namespaceURI===fe){if(t.namespaceURI===pe&&!tt[o])return!1;if(t.namespaceURI===de&&!et[o])return!1;var r=Ee({},["title","style","font","a","script"]);return!ot[n]&&(r[n]||!nt[n])}return!1},it=function(e){ge(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=A}catch(t){e.remove()}}},st=function(e,t){try{ge(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){ge(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!H[e])if(Z||J)try{it(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},at=function(e){var t=void 0,n=void 0;if(Y)e="<remove></remove>"+e;else{var o=be(e,/^[\r\n\t ]+/);n=o&&o[0]}var i=M?M.createHTML(e):e;if(me===fe)try{t=(new m).parseFromString(i,"text/html")}catch(e){}if(!t||!t.documentElement){t=S.createDocument(me,"template",null);try{t.documentElement.innerHTML=Se?"":i}catch(e){}}var s=t.body||t.documentElement;return e&&n&&s.insertBefore(r.createTextNode(n),s.childNodes[0]||null),K?t.documentElement:s},lt=function(e){return E.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},ct=function(e){return!(e instanceof p||e instanceof f)&&!("string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof d&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore)},ut=function(e){return"object"===(void 0===a?"undefined":qe(a))?e instanceof a:e&&"object"===(void 0===e?"undefined":qe(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},dt=function(e,t,o){C[e]&&he(C[e],(function(e){e.call(n,t,o,Ze)}))},pt=function(e){var t=void 0;if(dt("beforeSanitizeElements",e,null),ct(e))return it(e),!0;if(be(e.nodeName,/[\u0080-\uFFFF]/))return it(e),!0;var o=ye(e.nodeName);if(dt("uponSanitizeElement",e,{tagName:o,allowedTags:I}),!ut(e.firstElementChild)&&(!ut(e.content)||!ut(e.content.firstElementChild))&&Ae(/<[/\w]/g,e.innerHTML)&&Ae(/<[/\w]/g,e.textContent))return it(e),!0;if(!I[o]||B[o]){if(ne&&!ie[o]){var r=w(e)||e.parentNode,i=b(e)||e.childNodes;if(i&&r)for(var s=i.length-1;s>=0;--s)r.insertBefore(g(i[s],!0),y(e))}return it(e),!0}return e instanceof l&&!rt(e)?(it(e),!0):"noscript"!==o&&"noembed"!==o||!Ae(/<\/no(script|embed)/i,e.innerHTML)?(q&&3===e.nodeType&&(t=e.textContent,t=we(t,L," "),t=we(t,_," "),e.textContent!==t&&(ge(n.removed,{element:e.cloneNode()}),e.textContent=t)),dt("afterSanitizeElements",e,null),!1):(it(e),!0)},ft=function(e,t,n){if(te&&("id"===t||"name"===t)&&(n in r||n in Je))return!1;if(G&&Ae(O,t));else if(W&&Ae(R,t));else{if(!H[t]||U[t])return!1;if(ce[t]);else if(Ae($,we(n,F,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Te(n,"data:")||!se[e]){if(V&&!Ae(P,we(n,F,"")));else if(n)return!1}else;}return!0},mt=function(e){var t=void 0,o=void 0,r=void 0,i=void 0;dt("beforeSanitizeAttributes",e,null);var s=e.attributes;if(s){var a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H};for(i=s.length;i--;){var l=t=s[i],c=l.name,u=l.namespaceURI;if(o=Me(t.value),r=ye(c),a.attrName=r,a.attrValue=o,a.keepAttr=!0,a.forceKeepAttr=void 0,dt("uponSanitizeAttribute",e,a),o=a.attrValue,!a.forceKeepAttr&&(st(c,e),a.keepAttr))if(Ae(/\/>/i,o))st(c,e);else{q&&(o=we(o,L," "),o=we(o,_," "));var d=e.nodeName.toLowerCase();if(ft(d,r,o))try{u?e.setAttributeNS(u,c,o):e.setAttribute(c,o),ve(n.removed)}catch(e){}}}dt("afterSanitizeAttributes",e,null)}},ht=function e(t){var n=void 0,o=lt(t);for(dt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)dt("uponSanitizeShadowNode",n,null),pt(n)||(n.content instanceof i&&e(n.content),mt(n));dt("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e,r){var s=void 0,l=void 0,c=void 0,u=void 0,d=void 0;if((Se=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ut(e)){if("function"!=typeof e.toString)throw ke("toString is not a function");if("string"!=typeof(e=e.toString()))throw ke("dirty is not a string, aborting")}if(!n.isSupported){if("object"===qe(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(ut(e))return t.toStaticHTML(e.outerHTML)}return e}if(X||Qe(r),n.removed=[],"string"==typeof e&&(oe=!1),oe);else if(e instanceof a)1===(l=(s=at("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===l.nodeName||"HTML"===l.nodeName?s=l:s.appendChild(l);else{if(!Z&&!q&&!K&&-1===e.indexOf("<"))return M&&ee?M.createHTML(e):e;if(!(s=at(e)))return Z?null:A}s&&Y&&it(s.firstChild);for(var p=lt(oe?e:s);c=p.nextNode();)3===c.nodeType&&c===u||pt(c)||(c.content instanceof i&&ht(c.content),mt(c),u=c);if(u=null,oe)return e;if(Z){if(J)for(d=x.call(s.ownerDocument);s.firstChild;)d.appendChild(s.firstChild);else d=s;return Q&&(d=D.call(o,d,!0)),d}var f=K?s.outerHTML:s.innerHTML;return q&&(f=we(f,L," "),f=we(f,_," ")),M&&ee?M.createHTML(f):f},n.setConfig=function(e){Qe(e),X=!0},n.clearConfig=function(){Ze=null,X=!1},n.isValidAttribute=function(e,t,n){Ze||Qe({});var o=ye(e),r=ye(t);return ft(o,r,n)},n.addHook=function(e,t){"function"==typeof t&&(C[e]=C[e]||[],ge(C[e],t))},n.removeHook=function(e){C[e]&&ve(C[e])},n.removeHooks=function(e){C[e]&&(C[e]=[])},n.removeAllHooks=function(){C={}},n}();let Je;async function Qe(){return Je||(Je=(await Promise.resolve().then((function(){return require("./renderer-24339d41.js")}))).render),Je}const et=j("<div><div></div></div>",4);function tt(e){const[t,n]=d("");return m((async()=>{var t;n(null!==(t=await async function(e,t=(()=>{var e,t;return null===(e=atom.workspace.getActiveTextEditor())||void 0===e||null===(t=e.getGrammar().scopeName)||void 0===t?void 0:t.toLowerCase()})()||"",n){if(void 0===e)return null;let o="";if(Array.isArray(e)){if(0===e.length)return null;o=e.join("\r\n")}else o=e;if(n)return Ze.sanitize(await n.render(o,t));return(await Qe())(o,t)}(e.markdown,e.grammarName,e.renderer))&&void 0!==t?t:"")})),(()=>{const n=et.cloneNode(!0),o=n.firstChild;return n.addEventListener("wheel",nt),p((r=>{const i=e.containerClassName,s=e.contentClassName,a=t();return i!==r._v$&&(n.className=r._v$=i),s!==r._v$2&&(o.className=r._v$2=s),a!==r._v$3&&(o.innerHTML=r._v$3=a),r}),{_v$:void 0,_v$2:void 0,_v$3:void 0}),n})()}function nt(e){return e.stopPropagation()}const ot=j("<div><div></div></div>",4);function rt(e){const[t,n]=d("");return m((async()=>{var t;n(null!==(t=await async function(e,t=(()=>{var e,t;return null===(e=atom.workspace.getActiveTextEditor())||void 0===e||null===(t=e.getGrammar().scopeName)||void 0===t?void 0:t.toLowerCase()})()||"",n){if(void 0===e)return null;let o=e;"string"==typeof o&&(o=[o]);if(Array.isArray(o)){if(0===o.length)return null;const e=o.map((e=>`\`\`\`\n${e.replace(st,"").replace(at,"")}\n\`\`\``)).join("\n");if(n)return Ze.sanitize(await n.render(e,t));return(await Qe())(e,t)}return null}(e.snippet,e.grammarName,e.renderer))&&void 0!==t?t:"")})),(()=>{const n=ot.cloneNode(!0),o=n.firstChild;return n.addEventListener("wheel",it),p((r=>{const i=e.containerClassName,s=e.contentClassName,a=t();return i!==r._v$&&(n.className=r._v$=i),s!==r._v$2&&(o.className=r._v$2=s),a!==r._v$3&&(o.innerHTML=r._v$3=a),r}),{_v$:void 0,_v$2:void 0,_v$3:void 0}),n})()}function it(e){return e.stopPropagation()}const st=/^\s*<([!?])([a-z]+)?\s*/i,at=/^\((method|property|parameter|alias)\)\W/;const lt=j("<div></div>",2);let ct;function ut(e){void 0===ct&&(ct=require("react-dom").render);const t=document.createElement("div");return t.className=e.contentClassName,(()=>{const n=lt.cloneNode(!0);return X(n,(()=>ct(e.component(),t)||void 0)),p((()=>n.className=e.containerClassName)),n})()}const dt=j("<div></div>",2),pt=Object.freeze({PIN:"PIN",CLOSE:"CLOSE"}),ft={[pt.PIN]:"pin",[pt.CLOSE]:"x"};function mt(e){return(()=>{const t=dt.cloneNode(!0);return K(t,(()=>e.onMouseDown),!1,!0),K(t,(()=>e.onClickCapture),!1,!0),X(t,(()=>{const t=$((()=>void 0!==e.component),!0);return()=>t()?D(ut,L(e.component,{})):void 0})(),null),X(t,(()=>{const t=$((()=>void 0!==e.snippet),!0);return()=>t()?D(rt,L(e.snippet,{})):void 0})(),null),X(t,(()=>{const t=$((()=>void 0!==e.markdown),!0);return()=>t()?D(tt,L(e.markdown,{})):void 0})(),null),X(t,(()=>{const t=$((()=>void 0!==e.action),!0);return()=>t()?(()=>{const t=dt.cloneNode(!0);return t.$$click=()=>{var t;null===(t=e.onActionClick)||void 0===t||t.call(e,event)},p((n=>{const o=`datatip-pin-button icon-${ft[e.action]}`,r=e.actionTitle;return o!==n._v$&&(t.className=n._v$=o),r!==n._v$2&&U(t,"title",n._v$2=r),n}),{_v$:void 0,_v$2:void 0}),t})():void 0})(),null),p((()=>{var n;return t.className=null!==(n=e.className)&&void 0!==n?n:"datatip-element"})),t})()}B(["click"]);class ht{constructor(){this.providers=void 0,this.providers=[]}addProvider(t){const n=this.providers.findIndex((e=>t.priority>e.priority));return-1===n?this.providers.push(t):this.providers.splice(n,0,t),new e.Disposable((()=>{this.removeProvider(t)}))}removeProvider(e){const t=this.providers.indexOf(e);-1!==t&&this.providers.splice(t,1)}getProviderForEditor(e){const t=e.getGrammar().scopeName;return this.findProvider(t)}getAllProvidersForEditor(e){const t=e.getGrammar().scopeName;return this.findAllProviders(t)}findProvider(e){for(const t of this.findAllProviders(e))return t;return null}*findAllProviders(e){for(const t of this.providers)null!=t.grammarScopes&&-1===t.grammarScopes.indexOf(e)||(yield t)}}function vt(e,t,n=!0){t.setAttribute("tabindex","-1"),t.style.userSelect&&"none"!==t.style.userSelect||(t.style.userSelect="text"),n&&function(e,t){const n=atom.views.getView(e).getComponent();t.addEventListener("mousedown",(()=>{!function(e){null==e||e.didBlurHiddenInput({relatedTarget:null})}(n),t.addEventListener("mouseleave",(()=>{!function(e){null==e||e.didFocus()}(n)}))}))}(e,t),t.classList.add("native-key-bindings")}class gt{constructor(){this.subscriptions=new e.CompositeDisposable,this.providerRegistry=new ht,this.watchedEditors=new WeakSet,this.editor=null,this.editorView=null,this.editorSubscriptions=null,this.dataTipMarkerDisposables=null,this.showDataTipOnCursorMove=!1,this.showDataTipOnMouseMove=!0,this.currentMarkerRange=null,this.mouseMoveTimer=void 0,this.cursorMoveTimer=void 0,this.hoverTime=atom.config.get("atom-ide-datatip.hoverTime"),this.onMouseMoveEvt=this.onMouseMoveEvt.bind(this),this.onCursorMoveEvt=this.onCursorMoveEvt.bind(this)}initialize(){this.subscriptions.add(atom.workspace.observeTextEditors((e=>{const t=this.watchEditor(e);e.onDidDestroy((()=>null==t?void 0:t.dispose()))})),atom.commands.add("atom-text-editor",{"datatip:toggle":e=>this.onCommandEvt(e)}),atom.config.observe("atom-ide-datatip.showDataTipOnCursorMove",(e=>{this.showDataTipOnCursorMove=e;const t=this.editor;this.editor=null,this.updateCurrentEditor(t)})),atom.config.observe("atom-ide-datatip.showDataTipOnMouseMove",(e=>{this.showDataTipOnMouseMove=e;const t=this.editor;this.editor=null,this.updateCurrentEditor(t)})))}dispose(){this.dataTipMarkerDisposables&&this.dataTipMarkerDisposables.dispose(),this.dataTipMarkerDisposables=null,this.editorSubscriptions&&this.editorSubscriptions.dispose(),this.editorSubscriptions=null,this.subscriptions.dispose()}get datatipService(){return this.providerRegistry}watchEditor(t){if(this.watchedEditors.has(t))return;const n=atom.views.getView(t);n.hasFocus()&&this.updateCurrentEditor(t);const o=()=>this.updateCurrentEditor(t);n.addEventListener("focus",o);const r=()=>this.unmountDataTip();n.addEventListener("blur",r);const i=new e.Disposable((()=>{n.removeEventListener("focus",o),n.removeEventListener("blur",r),this.editor===t&&this.updateCurrentEditor(null)}));return this.watchedEditors.add(t),this.subscriptions.add(i),new e.Disposable((()=>{i.dispose(),this.subscriptions.remove(i),this.watchedEditors.delete(t)}))}updateCurrentEditor(t){t!==this.editor&&(this.editorSubscriptions&&this.editorSubscriptions.dispose(),this.editorSubscriptions=null,this.unmountDataTip(),this.editor=null,this.editorView=null,null!==t&&atom.workspace.isTextEditor(t)&&(this.editor=t,this.editorView=atom.views.getView(this.editor),this.showDataTipOnMouseMove&&this.editorView.addEventListener("mousemove",this.onMouseMoveEvt),this.editorSubscriptions=new e.CompositeDisposable,this.editorSubscriptions.add(this.editor.onDidChangeCursorPosition(this.onCursorMoveEvt),this.editor.getBuffer().onDidChangeText((e=>{0!==e.changes.length&&this.unmountDataTip()})),new e.Disposable((()=>{var e;null===(e=this.editorView)||void 0===e||e.removeEventListener("mousemove",this.onMouseMoveEvt)})))))}onCursorMoveEvt(e){void 0!==this.cursorMoveTimer&&clearTimeout(this.cursorMoveTimer),this.cursorMoveTimer=setTimeout((async e=>{if(e.textChanged||!this.showDataTipOnCursorMove)return;const t=e.cursor.editor,n=e.cursor.getBufferPosition();null!==this.currentMarkerRange&&this.currentMarkerRange.containsPoint(n)||await this.showDataTip(t,n)}),this.hoverTime,e)}onMouseMoveEvt(e){void 0!==this.mouseMoveTimer&&clearTimeout(this.mouseMoveTimer),this.mouseMoveTimer=setTimeout((async e=>{if(null===this.editorView||null===this.editor)return;const t=this.editorView.getComponent(),n=t.screenPositionForMouseEvent(e),o=t.pixelPositionForMouseEvent(e),r=t.pixelPositionForScreenPosition(n);if(Math.abs(o.left-r.left)>=this.editor.getDefaultCharWidth())return this.unmountDataTip();const i=this.editor.bufferPositionForScreenPosition(n);null!==this.currentMarkerRange&&this.currentMarkerRange.containsPoint(i)||await this.showDataTip(this.editor,i)}),this.hoverTime,e)}async onCommandEvt(e){const t=e.currentTarget.getModel();if(atom.workspace.isTextEditor(t)){var n;const o=e.currentTarget.getModel().getCursorBufferPosition();if(!0===(null===(n=this.currentMarkerRange)||void 0===n?void 0:n.containsPoint(o)))return this.unmountDataTip();await this.showDataTip(t,o)}}async showDataTip(e,t){try{let n=null;for(const o of this.providerRegistry.getAllProvidersForEditor(e)){const r=await o.datatip(e,t);if(r){n=r;break}}if(n){if(null!==this.currentMarkerRange&&n.range.intersectsWith(this.currentMarkerRange))return;if(!n.range.containsPoint(t))return;if(this.unmountDataTip(),this.currentMarkerRange=n.range,"component"in n){const o=document.createElement("div");H((()=>D(mt,{get component(){return{component:n.component,containerClassName:"datatip-component-container",contentClassName:"datatip-component"}},className:"datatip-element select-list popover-list"})),o),this.dataTipMarkerDisposables=this.mountDataTipWithMarker(e,n.range,t,o)}else if(n.markedStrings.length>0){const o=e.getGrammar().scopeName.toLowerCase(),r=[],i=[];for(const e of n.markedStrings)"snippet"===e.type?r.push(e.value):"markdown"===e.type&&i.push(e.value);let s,a;r.length>0&&(s={snippet:r,grammarName:o,containerClassName:"datatip-snippet-container",contentClassName:"datatip-snippet"}),i.length>0&&(a={markdown:i,grammarName:o,containerClassName:"datatip-markdown-container",contentClassName:"datatip-markdown"});const l=document.createElement("div");H((()=>D(mt,{snippet:s,markdown:a,className:"datatip-element select-list popover-list"})),l),this.dataTipMarkerDisposables=this.mountDataTipWithMarker(e,n.range,t,l)}}else this.unmountDataTip()}catch(e){this.unmountDataTip(),console.error(e)}}mountDataTipWithMarker(t,n,o,r){const i=new e.CompositeDisposable,s=t.markBufferRange(n,{invalidate:"never"});t.getOverlayDecorations().filter((e=>e.isType("highligh")&&1===e.getMarker().compare(s))).length>0?s.destroy():(i.add(new e.Disposable((()=>s.destroy()))),t.decorateMarker(s,{type:"highlight",class:"datatip-highlight-region"}));const a=t.markBufferRange(new e.Range(o,o),{invalidate:"never"});return vt(t,r),t.decorateMarker(a,{type:"overlay",class:"datatip-overlay",position:"tail",item:r}),i.add(new e.Disposable((()=>a.destroy()))),this.showDataTipOnMouseMove&&(r.addEventListener("mouseenter",(()=>{var e;null===(e=this.editorView)||void 0===e||e.removeEventListener("mousemove",this.onMouseMoveEvt)})),r.addEventListener("mouseleave",(()=>{var e;null===(e=this.editorView)||void 0===e||e.addEventListener("mousemove",this.onMouseMoveEvt)})),i.add(new e.Disposable((()=>{var e;null===(e=this.editorView)||void 0===e||e.addEventListener("mousemove",this.onMouseMoveEvt)})))),r.addEventListener("wheel",yt,{passive:!0}),i}unmountDataTip(){var e;this.currentMarkerRange=null,null===(e=this.dataTipMarkerDisposables)||void 0===e||e.dispose(),this.dataTipMarkerDisposables=null}}function yt(e){e.stopPropagation()}var bt={showDataTipOnCursorMove:{title:"Show datatip automatically on 'cursor' stay",description:"If set to true, the data tip is shown as soon as you move your cursor stays on a word. Otherwise you will have to activate it via keypress.",type:"boolean",default:!1},showDataTipOnMouseMove:{description:"If set to true, the data tip is shown as soon as mouse hovers on a word.",title:"Show datatip automatically on 'mouse' hover",type:"boolean",default:!0},hoverTime:{title:"Hover/Stay Time",description:"The time that the mouse/cursor should hover/stay to show a datatip. Also specifies the time that the datatip is still shown when the mouse/cursor moves [ms].",type:"number",default:100}};const wt=new e.CompositeDisposable;let Tt;exports.activate=function(){void 0===Tt&&(Tt=new gt),wt.add(Tt),async function(){if(!atom.packages.isPackageLoaded("busy-signal")){const e=await Promise.resolve().then((function(){return require("./index-4c99303f.js")})).then((function(e){return e.index}));try{await e.install("atom-ide-datatip",!0)}catch(e){atom.notifications.addError(e)}}}().then((()=>{Tt.initialize()})).catch((e=>{console.error(e)}))},exports.config=bt,exports.deactivate=function(){wt.dispose()},exports.provideDatatipService=function(){return Tt.datatipService};
//# sourceMappingURL=main.js.map