From 9fcbda4bc1e91affdbdc5b7b0fc469b3c4143e5e Mon Sep 17 00:00:00 2001 From: Marko Zivic Date: Sun, 27 Oct 2024 13:45:13 +0100 Subject: [PATCH 1/3] Fix ignored blank lines --- lib/mixins/canvas-drawer.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/mixins/canvas-drawer.js b/lib/mixins/canvas-drawer.js index 37cb8bd4..acde6ca9 100644 --- a/lib/mixins/canvas-drawer.js +++ b/lib/mixins/canvas-drawer.js @@ -695,17 +695,19 @@ function drawLines( const editorTokensForScreenRow = editor.tokensForScreenRow(line) const numToken = editorTokensForScreenRow.length const numTokenToRender = Math.min(numToken, maxTokensInOneLine) + + if (lastLine !== line) { + x = 0 + y += lineHeight + lastLine = line + context.clearRect(x, y, canvasWidth, lineHeight) + } + for (let iToken = 0; iToken < numTokenToRender; iToken++) { const token = editorTokensForScreenRow[iToken] const tokenText = token.text.replace(invisibleRegExp, " ") const tokenScopes = token.scopes - if (lastLine !== line) { - x = 0 - y += lineHeight - lastLine = line - context.clearRect(x, y, canvasWidth, lineHeight) - } if (x > canvasWidth) { continue } From 52c17214f8d244d8a61493886cfe9cad0ce72162 Mon Sep 17 00:00:00 2001 From: Marko Zivic Date: Mon, 28 Oct 2024 02:29:14 +0100 Subject: [PATCH 2/3] Added dist --- .gitignore | 3 +- dist/main.js | 6944 ++++++++++++++++- dist/main.js.map | 2 +- ...nimap-plugin-generator-element.68264bbd.js | 2 - ...p-plugin-generator-element.68264bbd.js.map | 1 - ...nimap-plugin-generator-element.a1e4649c.js | 200 + ...p-plugin-generator-element.a1e4649c.js.map | 1 + 7 files changed, 7146 insertions(+), 7 deletions(-) delete mode 100644 dist/minimap-plugin-generator-element.68264bbd.js delete mode 100644 dist/minimap-plugin-generator-element.68264bbd.js.map create mode 100644 dist/minimap-plugin-generator-element.a1e4649c.js create mode 100644 dist/minimap-plugin-generator-element.a1e4649c.js.map diff --git a/.gitignore b/.gitignore index 9d639706..02a11a09 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,5 @@ npm-debug.log node_modules .live-archive pages -dist .parcel-cache -package-lock.json \ No newline at end of file +package-lock.json diff --git a/dist/main.js b/dist/main.js index 687ccf1e..2a6e8ec3 100644 --- a/dist/main.js +++ b/dist/main.js @@ -1,2 +1,6944 @@ -function e(e,t,i,n){Object.defineProperty(e,t,{get:i,set:n,enumerable:!0,configurable:!0})}function t(e){return e&&e.__esModule?e.default:e}function i(){var e={},t=0,i=0,n=0;return{add(s,o){o||(o=s,s=0),s>i?i=s:n>s&&(n=s),e[s]||(e[s]=[]),e[s].push(o),t++},process(){for(var t=n;i>=t;t++)for(var s=e[t],o=0;s.length>o;o++)(0,s[o])()},size(){return t}}}function n(e){return e._erd}function s(e){return Array.isArray(e)||void 0!==e.length}function o(e){if(Array.isArray(e))return e;var t=[];return ye(e,(e=>{t.push(e)})),t}function r(e){return e&&1===e.nodeType}function a(e,t,i){var n=e[t];return null==n&&void 0!==i?i:n}function l(e,t,i,n,s,o,r,a){if(e.fillStyle=i,a){const i=t.length*o;return e.fillRect(n,s,i,r),n+i}{let i=0;for(let a=0,l=t.length;l>a;a++)" "===t[a]?(i>0&&e.fillRect(n-i*o,s,i*o,r),i=0):i++,n+=o;return i>0&&e.fillRect(n-i*o,s,i*o,r),n}}function d(e,t,i,n,s,o,r,a,d,h,c,u,p,m){if(e>t)return;let g,f,v=i*n-n;t=Math.min(t,h);for(let i=e;t>i;i++){const e=d.tokensForScreenRow(i),t=Math.min(e.length,m);for(let d=0;t>d;d++){const t=e[d],h=t.text.replace(c," "),m=t.scopes;g!==i&&(f=0,v+=n,g=i,a.clearRect(f,v,r,n)),f>r||(_e.test(h)?f+=h.length*o:f=l(a,h,u(m),f,v,o,s,p))}}a.fill()}function h(e,t,i){const{context:n,lineHeight:s,charWidth:o,canvasWidth:r,screenRow:a,yRow:l}=t,d=e.getMarker().getScreenRange(),h=d.end.row-d.start.row;if(n.fillStyle=i,0===h)n.fillRect(d.start.column*o,l,(d.end.column-d.start.column)*o,s);else if(a===d.start.row){const e=d.start.column*o;n.fillRect(e,l,r-e,s)}else n.fillRect(0,l,a===d.end.row?d.end.column*o:r,s)}function c(e,t,i,n,s){let o=[];i.context.clearRect(0,i.yRow,i.canvasWidth,i.lineHeight);for(const i in n)o=o.concat(null!=t[i]&&t[i][e]||[]);if(o.sort(((e,t)=>(i.orders[e.properties.plugin]||0)-(i.orders[t.properties.plugin]||0))),null!=o?o.length:void 0)for(let e=0,t=o.length;t>e;e++){const t=o[e],r=n[t.properties.type];Oe?(void 0)[r.name.split("$").pop().replace("Lambda","")](t,i,f(t,s)):r(t,i,f(t,s))}}function u(e,t,i,n,s,o,r){if(t>=e){for(let a=e;t>=a;a++)n.row=i+(a-e),n.yRow=n.row*s,n.screenRow=a,c(a,r,n,Fe,o);n.context.fill()}}function p(e,t,i,n,s,o,r){if(t>=e){for(let a=e;t>=a;a++)n.row=i+(a-e),n.yRow=n.row*s,n.screenRow=a,c(a,r,n,Ne,o);n.context.fill()}}function m(e,t){return g(at.retrieveStyleFromDom([".editor"],"color",e,!0),t)}function g(e,t){return`rgba(${e.slice(4,-1)}, ${t})`}function f(e,t){const i=e.getProperties();if(i.color)return i.color;if(i.scope){const e=i.scope.split(/\s+/);return at.retrieveStyleFromDom(e,"background-color",t,!0)}return m(t)}function v(e,t,i,n,s){if(null==n&&null==s)return[];let o=[{start:n,end:s,offscreenRow:0}];for(let e=0,t=i.length;t>e;e++){const t=i[e],n=[];for(let e=0,i=o.length;i>e;e++){const i=o[e];i.start>t.end&&0!==t.screenDelta?n.push({start:i.start+t.screenDelta,end:i.end+t.screenDelta,offscreenRow:i.offscreenRow}):i.start>t.end||t.start>i.end?n.push(i):(t.start>i.start&&n.push({start:i.start,end:t.start-1,offscreenRow:i.offscreenRow}),i.end>t.end&&n.push(0!==t.bufferDelta||0!==t.screenDelta?{start:t.end+t.screenDelta+1,end:i.end+t.screenDelta,offscreenRow:i.offscreenRow+t.end+1-i.start}:{start:t.end+1,end:i.end,offscreenRow:i.offscreenRow+t.end+1-i.start}))}o=n}return((e,t,i)=>{let n=0;for(;e.length>n;){const s=e[n];t>s.start&&(s.offscreenRow+=t-s.start,s.start=t),s.end>i&&(s.end=i),s.end>s.start||e.splice(n--,1),n++}return e.sort(((e,t)=>e.offscreenRow-t.offscreenRow))})(o,e,t)}function b(e,...t){t.forEach((t=>{var i,n;i=e,Object.getOwnPropertyNames(n=t).forEach((e=>{0>["length","name","arguments","caller","prototype","includeInto"].indexOf(e)&&Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(n,e))})),Object.getOwnPropertyNames(n.prototype).forEach((e=>{"constructor"!==e&&Object.defineProperty(i.prototype,e,Object.getOwnPropertyDescriptor(n.prototype,e))}))}))}function y(){const e=document.createElement("atom-text-editor-minimap");return e.createdCallback(),e}function S(e){return{x:e.pageX,y:e.pageY,isLeftMouse:0===e.button,isMiddleMouse:1===e.button}}function w(e){const t=e.changedTouches[0];return{x:t.pageX,y:t.pageY,isLeftMouse:!0,isMiddleMouse:!1}}function x(e,t){if(!e)return;let i="";for(const e in t)i+=`${e}: ${t[e]}; `;e.style.cssText=i}function E(e=0,t=0,i=!1){return i?`translate3d(${e}px, ${t}px, 0)`:`translate(${e}px, ${t}px)`}function C(e=0,t=e,i=!1){return i?`scale3d(${e}, ${t}, 1)`:`scale(${e}, ${t})`}function M({from:e,to:t,duration:i,step:n}){const s=D();let o;const r=()=>{const a=D()-s;o=0===i?1:a/i,o>1&&(o=1);const l=(e=>.5-Math.cos(e*Math.PI)/2)(o);n(e+(t-e)*l,l),1>o&&requestAnimationFrame(r)};r()}function D(){return new Date}function T(e,t){Ke[e]=t,Ye[e]=new le.CompositeDisposable,rt.emit("did-add-plugin",{name:e,plugin:t}),atom.config.get("minimap.displayPluginsControls")&&((e,t)=>{const i="minimap.plugins."+e,n=`minimap.plugins.${e}DecorationsZIndex`,s=j();s.plugins.properties[e]={type:"boolean",title:e,description:`Whether the ${e} plugin is activated and displayed in the Minimap.`,default:!0},s.plugins.properties[e+"DecorationsZIndex"]={type:"integer",title:e+" decorations order",description:`The relative order of the ${e} plugin's decorations in the layer into which they are drawn. Note that this order only apply inside a layer, so highlight-over decorations will always be displayed above line decorations as they are rendered in different layers.`,default:0},void 0===atom.config.get(i)&&atom.config.set(i,!0),void 0===atom.config.get(n)&&atom.config.set(n,0),Ye[e].add(atom.config.observe(i,(()=>{R(e)}))),Ye[e].add(atom.config.observe(n,(i=>{O(e),rt.emit("did-change-plugin-order",{name:e,plugin:t,order:i})}))),Ye[e].add(atom.commands.add("atom-workspace",{["minimap:toggle-"+e](){L(e)}})),O(e)})(e,t),R(e)}function k(e){const t=Ke[e];atom.config.get("minimap.displayPluginsControls")&&(e=>{Ye[e].dispose(),delete Ye[e],delete j().plugins.properties[e]})(e),delete Ke[e],rt.emit("did-remove-plugin",{name:e,plugin:t})}function L(e,t){const i="minimap.plugins."+e;null!=t?atom.config.set(i,t):atom.config.set(i,!atom.config.get(i)),R(e)}function A(){for(const[e,t]of function*(){for(const e in Ke)yield[e,Ke[e]]}())t.deactivatePlugin(),rt.emit("did-deactivate-plugin",{name:e,plugin:t})}function R(e){const t=Ke[e],i=t.isActive(),n=atom.config.get("minimap.plugins."+e);atom.config.get("minimap.displayPluginsControls")?n&&!i?P(e,t):i&&!n&&I(e,t):i?i&&I(e,t):P(e,t)}function P(e,t){const i={name:e,plugin:t};t.activatePlugin(),rt.emit("did-activate-plugin",i)}function I(e,t){const i={name:e,plugin:t};t.deactivatePlugin(),rt.emit("did-deactivate-plugin",i)}function O(e){Xe[e]=atom.config.get(`minimap.plugins.${e}DecorationsZIndex`)}function H(){return Xe}function _(e){return Math.ceil(Math.max(0,Math.min(255,e)))}function N(){tt||(ot=atom.commands.add("atom-workspace",{"minimap:toggle"(){B()},async"minimap:generate-coffee-plugin"(){await q("coffee")},async"minimap:generate-javascript-plugin"(){await q("javascript")},async"minimap:generate-babel-plugin"(){await q("babel")}}),nt=new Map,at=new Je.StyleReader,st=new le.CompositeDisposable,tt=!0,atom.config.get("minimap.autoToggle")&&B())}function F(e){if(e instanceof Qe){let t=e.getMinimapElement();return t||(t=y(),t.setModel(e)),t}}function W(){tt&&(A(),nt&&(nt.forEach((e=>{e.destroy()})),nt.clear()),st.dispose(),ot.dispose(),at.invalidateDOMStylesCache(),it=!1,tt=!1)}function j(){return Ge||atom.packages.getLoadedPackage("minimap").metadata.configSchema}function B(){if(tt){if(it){it=!1,nt&&(nt.forEach((e=>{e.destroy()})),nt.clear()),st.dispose();const e=atom.isMaximized(),{width:t,height:i}=atom.getSize();atom.setSize(t,i),e&&atom.maximize()}else it=!0,(()=>{const e=ke.debounce(ne,300);var t;st.add(atom.workspace.observeTextEditors((e=>{const t=J(e),i=F(t);rt.emit("did-create-minimap",t),i.attach(e.getElement())})),atom.themes.onDidChangeActiveThemes(e),atom.styles.onDidUpdateStyleElement(e),atom.styles.onDidAddStyleElement(e),atom.styles.onDidRemoveStyleElement(e),(t="core.useTreeSitterParsers",atom.config.observe(t,(e=>{if(!0!==e){const e="Minimap."+t,i=new Date,n=window.localStorage.getItem(e);let s=null;if(n&&(s=new Date(Date.parse(n)).getDay()),!s||"number"==typeof s&&s-i.getDay()>=1){window.localStorage.setItem(e,i);const n=atom.notifications.addWarning("Tree-sitter is off (Low Performance Warning).",{description:"You should turn on Atom's tree-sitter parser to experience the best performance Minimap and Atom are designed for.\n Keeping tree-sitter parser off results in sluggish scrolling and lags in the text editor.",dismissable:!0,buttons:[{text:"Set to true and restart Atom",onDidClick(){atom.config.set(t,!0),n.dismiss(),window.localStorage.removeItem(e),setTimeout((()=>{atom.reload()}),1500)}}]})}}}))))})();at.invalidateDOMStylesCache()}}async function q(e){const{createMinimapPluginGeneratorElement:t}=await pe("05azp"),i=t();i.template=e,i.attach()}function z(e){return rt.on("did-activate",e)}function U(e){return rt.on("did-deactivate",e)}function V(e){return rt.on("did-create-minimap",e)}function $(e){return rt.on("did-add-plugin",e)}function Q(e){return rt.on("did-remove-plugin",e)}function G(e){return rt.on("did-activate-plugin",e)}function Z(e){return rt.on("did-deactivate-plugin",e)}function K(e){return rt.on("did-change-plugin-order",e)}function Y(){return Qe}function X(e){if(e)return J(e.getModel())}function J(e){if(!e)return;if(!nt)return;let t=nt.get(e);if(void 0===t||t.destroyed){t=new Qe({textEditor:e}),nt.set(e,t);const i=e.onDidDestroy((()=>{nt&&nt.delete(e),t&&t.destroy(),i.dispose()}));st.add(i)}return t}function ee(e){if(e)return new Qe({textEditor:e,standAlone:!0})}function te(){return J(atom.workspace.getActiveTextEditor())}function ie(e){if(e)return nt&&nt.forEach((t=>{e(t)})),V((t=>{e(t)}))}function ne(){at.invalidateDOMStylesCache(),nt.forEach((e=>{atom.views.getView(e).requestForcedUpdate()}))}function se(){return lt}var oe,re,ae,le=require("atom"),de=require("path"),he="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},ce={},ue={},pe=he.parcelRequire7d67;null==pe&&((pe=e=>{if(e in ce)return ce[e].exports;if(e in ue){let t=ue[e];delete ue[e];let i={id:e,exports:{}};return ce[e]=i,t.call(i.exports,i,i.exports),i.exports}var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}).register=(e,t)=>{ue[e]=t},he.parcelRequire7d67=pe),e(module.exports,"styleReader",(()=>at)),e(module.exports,"emitter",(()=>rt)),e(module.exports,"onDidRemovePlugin",(()=>Q)),e(module.exports,"getActiveMinimap",(()=>te)),e(module.exports,"onDidChangePluginOrder",(()=>K)),e(module.exports,"standAloneMinimapForEditor",(()=>ee)),e(module.exports,"deactivate",(()=>W)),e(module.exports,"onDidCreateMinimap",(()=>V)),e(module.exports,"minimapForEditor",(()=>J)),e(module.exports,"observeMinimaps",(()=>ie)),e(module.exports,"activate",(()=>N)),e(module.exports,"getConfigSchema",(()=>j)),e(module.exports,"provideMinimapServiceV1",(()=>se)),e(module.exports,"toggle",(()=>B)),e(module.exports,"minimapViewProvider",(()=>F)),e(module.exports,"minimapClass",(()=>Y)),e(module.exports,"onDidAddPlugin",(()=>$)),e(module.exports,"onDidActivatePlugin",(()=>G)),e(module.exports,"onDidDeactivatePlugin",(()=>Z)),e(module.exports,"onDidActivate",(()=>z)),e(module.exports,"onDidDeactivate",(()=>U)),e(module.exports,"minimapForEditorElement",(()=>X)),e(module.exports,"editorsMinimaps",(()=>nt)),e(module.exports,"config",(()=>Ge)),e(module.exports,"Minimap",(()=>Qe)),e(module.exports,"createMinimapElement",(()=>y)),pe.register("8VogU",(function(e,t){var i,n,s,o;({deprecate:o}=pe("902gw")),null!=he.__CUSTOM_HTML_ELEMENTS_CLASSES__?(he.__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__=he.__CUSTOM_HTML_ELEMENTS_CLASSES__,delete he.__CUSTOM_HTML_ELEMENTS_CLASSES__):null==he.__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__&&(he.__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__={}),i=["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"],s=function(e,t){return i.forEach((function(t){return Object.defineProperty(e,t,{value(){var e;return null!=(e=this["__"+t])?e.apply(this,arguments):void 0},writable:!0,enumerable:!0,configurable:!0})})),Object.getOwnPropertyNames(t).forEach((n=>{var s;if("constructor"!==n)return s=Object.getOwnPropertyDescriptor(t,n),i.indexOf(n)>-1?Object.defineProperty(e,"__"+n,s):Object.defineProperty(e,n,s)}))},n=(e,t)=>Object.getOwnPropertyNames(t).forEach((i=>{if("length"!==i&&"name"!==i&&"arguments"!==i&&"caller"!==i&&"prototype"!==i)return Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})),e.exports=(e,t)=>{var i,r,a,l,d;return({class:a}=t),(l=null!=a?a.prototype:null!=(d=t.prototype)?d:t)===t&&o("Using the prototype as the second argument is deprecated, use the prototype option instead"),__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__[e]?(i=__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__[e],s(i.prototype,l),null!=a&&n(i,a),i):(r=Object.create(HTMLElement.prototype),s(r,l),i=document.registerElement(e,{prototype:Object.create(r)}),null!=a&&n(i,a),__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__[e]=i)}})),pe.register("902gw",(function(e,t){var i,n,s,o;i=pe("ey8sB"),null==he.__grim__&&(n=pe("5uSdx").Emitter,o=he.__grim__={deprecations:{},emitter:new n,includeDeprecatedAPIs:!0,getDeprecations(){var e,t,i,n,s,r,a;for(n in e=[],a=o.deprecations)for(s in t=a[n])for(r in i=t[s])e.push(i[r]);return e},getDeprecationsLength(){return this.getDeprecations().length},clearDeprecations(){o.deprecations={}},logDeprecations(){var e,t,i,n;for((t=this.getDeprecations()).sort(((e,t)=>t.getCallCount()-e.getCallCount())),console.warn("\nCalls to deprecated functions\n-----------------------------"),i=0,n=t.length;n>i;i++)console.warn("("+(e=t[i]).getCallCount()+") "+e.getOriginName()+" : "+e.getMessage(),e)},deprecate(e,t){var n,r,a,l,d,h,c,u,p,m,g,f,v;h=Error.stackTraceLimit;try{Error.stackTraceLimit=7,u=(u=null!=(f="function"==typeof(a=Error()).getRawStack?a.getRawStack():void 0)?f:s(a)).slice(1)}finally{Error.stackTraceLimit=h}l=(r=u[0]).getFileName(),d=r.getLineNumber(),c=null!=(v=null!=t?t.packageName:void 0)?v:"",null==(p=o.deprecations)[l]&&(p[l]={}),null==(m=o.deprecations[l])[d]&&(m[d]={}),null==(g=o.deprecations[l][d])[c]&&(g[c]=new i(e)),(n=o.deprecations[l][d][c]).addStack(u,t),o.emitter.emit("updated",n)},addSerializedDeprecation(e){var t,n,s,r,a,l,d,h,c,u,p,m,g,f,v;for(r=(t=i.deserialize(e)).getMessage(),n=t.fileName,s=t.lineNumber,a=null!=(g=null!=(f=(d=t.getStacks())[0])&&null!=(v=f.metadata)?v.packageName:void 0)?g:"",null==(h=o.deprecations)[n]&&(h[n]={}),null==(c=o.deprecations[n])[s]&&(c[s]={}),null==(u=o.deprecations[n][s])[a]&&(u[a]=new i(r,n,s)),t=o.deprecations[n][s][a],p=0,m=d.length;m>p;p++)t.addStack(l=d[p],l.metadata);o.emitter.emit("updated",t)},on:(e,t)=>o.emitter.on(e,t)}),s=e=>{var t,i;return t=Error.prepareStackTrace,Error.prepareStackTrace=(e,t)=>t,Error.captureStackTrace(e,s),i=e.stack,Error.prepareStackTrace=t,i},e.exports=he.__grim__})),pe.register("ey8sB",(function(e,t){e.exports=function(){function e(e,t,i){this.message=e,this.fileName=t,this.lineNumber=i,this.callCount=0,this.stackCount=0,this.stacks={},this.stackCallCounts={}}return e.getFunctionNameFromCallsite=e=>{},e.deserialize=t=>{var i,n,s,o,r;for(s=t.stacks,i=new e(t.message,t.fileName,t.lineNumber),o=0,r=s.length;r>o;o++)i.addStack(n=s[o],n.metadata);return i},e.prototype.getFunctionNameFromCallsite=e=>{var t,i,n;return null!=e.functionName?e.functionName:e.isToplevel()?null!=(t=e.getFunctionName())?t:"":e.isConstructor()?"new "+e.getFunctionName():e.getMethodName()&&!e.getFunctionName()?e.getMethodName():e.getTypeName()+"."+(null!=(i=null!=(n=e.getMethodName())?n:e.getFunctionName())?i:"")},e.prototype.getLocationFromCallsite=function(e){return null==e?"unknown":null!=e.location?e.location:e.isNative()?"native":e.isEval()?"eval at "+this.getLocationFromCallsite(e.getEvalOrigin()):e.getFileName()+":"+e.getLineNumber()+":"+e.getColumnNumber()},e.prototype.getFileNameFromCallSite=e=>{var t;return null!=(t=e.fileName)?t:e.getFileName()},e.prototype.getOriginName=function(){return this.originName},e.prototype.getMessage=function(){return this.message},e.prototype.getStacks=function(){var e,t,i,n,s;for(e in i=[],s=this.stacks)(t=this.parseStack(n=s[e])).callCount=this.stackCallCounts[e],t.metadata=n.metadata,i.push(t);return i},e.prototype.getStackCount=function(){return this.stackCount},e.prototype.getCallCount=function(){return this.callCount},e.prototype.addStack=function(e,t){var i,n,s;return null==this.originName&&(this.originName=this.getFunctionNameFromCallsite(e[0])),null==this.fileName&&(this.fileName=this.getFileNameFromCallSite(e[0])),null==this.lineNumber&&(this.lineNumber="function"==typeof(n=e[0]).getLineNumber?n.getLineNumber():void 0),this.callCount++,e.metadata=t,i=this.getLocationFromCallsite(e[1]),null==this.stacks[i]&&(this.stacks[i]=e,this.stackCount++),null==(s=this.stackCallCounts)[i]&&(s[i]=0),this.stackCallCounts[i]++},e.prototype.parseStack=function(e){return e.map((t=this,e=>({functionName:t.getFunctionNameFromCallsite(e),location:t.getLocationFromCallsite(e),fileName:t.getFileNameFromCallSite(e)})));var t},e.prototype.serialize=function(){return{message:this.getMessage(),lineNumber:this.lineNumber,fileName:this.fileName,stacks:this.getStacks()}},e}()})),pe.register("5uSdx",((t,i)=>{var n;e(t.exports,"Emitter",(()=>n),(e=>n=e)),n=pe("1Iy3p"),pe("c7PVU"),pe("kGh8c")})),pe.register("1Iy3p",(function(e,t){"use strict";function i(e,t){for(var i=0;t.length>i;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function n(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}var s=pe("c7PVU"),o=pe("kGh8c"),r=function(){function e(){((e,t)=>{if(!(this instanceof t))throw new TypeError("Cannot call a class as a function")})(0,e),this.disposed=!1,this.clear()}return n(e,null,[{key:"onEventHandlerException",value(e){var t=this;return 0===this.exceptionHandlers.length&&(this.dispatch=this.exceptionHandlingDispatch),this.exceptionHandlers.push(e),new s((()=>{if(t.exceptionHandlers.splice(t.exceptionHandlers.indexOf(e),1),0===t.exceptionHandlers.length)return t.dispatch=t.simpleDispatch}))}},{key:"simpleDispatch",value(e,t){return e(t)}},{key:"exceptionHandlingDispatch",value(e,t){try{return e(t)}catch(e){return this.exceptionHandlers.map((t=>t(e)))}}}]),n(e,[{key:"clear",value(){null!=this.subscriptions&&this.subscriptions.dispose(),this.subscriptions=new o,this.handlersByEventName={}}},{key:"dispose",value(){this.subscriptions.dispose(),this.handlersByEventName=null,this.disposed=!0}},{key:"on",value(e,t,i){var n=this;if(null==i&&(i=!1),this.disposed)throw Error("Emitter has been disposed");if("function"!=typeof t)throw Error("Handler must be a function");this.handlersByEventName[e]?i?this.handlersByEventName[e].unshift(t):this.handlersByEventName[e].push(t):this.handlersByEventName[e]=[t];var o=new s((()=>(n.subscriptions.remove(o),n.off(e,t))));return this.subscriptions.add(o),o}},{key:"once",value(e,t,i){null==i&&(i=!1);var n=this.on(e,(e=>(n.dispose(),t(e))),i);return n}},{key:"preempt",value(e,t){return this.on(e,t,!0)}},{key:"off",value(e,t){if(!this.disposed){var i=this.handlersByEventName[e];if(i){var n=i.indexOf(t);0>n||i.splice(n,1),0===i.length&&delete this.handlersByEventName[e]}}}},{key:"emit",value(e,t){var i=this.handlersByEventName&&this.handlersByEventName[e];if(i)for(var n=i.slice(),s=0;n.length>s;s++)this.constructor.dispatch(n[s],t)}},{key:"emitAsync",value(e,t){var i=this,n=this.handlersByEventName&&this.handlersByEventName[e];if(n){var s=n.map((e=>i.constructor.dispatch(e,t)));return Promise.all(s).then((()=>{}))}return Promise.resolve()}},{key:"getEventNames",value(){return Object.keys(this.handlersByEventName)}},{key:"listenerCountForEventName",value(e){var t=this.handlersByEventName[e];return null==t?0:t.length}},{key:"getTotalListenerCount",value(){for(var e=0,t=Object.keys(this.handlersByEventName),i=0;t.length>i;i++)e+=this.handlersByEventName[t[i]].length;return e}}]),e}();r.dispatch=r.simpleDispatch,r.exceptionHandlers=[],e.exports=r})),pe.register("c7PVU",(function(e,t){"use strict";function i(e,t){for(var i=0;t.length>i;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function n(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}e.exports=function(){function e(t){((e,t)=>{if(!(this instanceof t))throw new TypeError("Cannot call a class as a function")})(0,e),this.disposed=!1,this.disposalAction=t}return n(e,null,[{key:"isDisposable",value(e){return"function"==typeof(null!=e?e.dispose:void 0)}}]),n(e,[{key:"dispose",value(){this.disposed||(this.disposed=!0,"function"==typeof this.disposalAction&&this.disposalAction(),this.disposalAction=null)}}]),e}()})),pe.register("kGh8c",(function(e,t){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e){if(null==s&&(s=pe("c7PVU")),!s.isDisposable(e))throw new TypeError("Arguments to CompositeDisposable.add must have a .dispose() method")}var s;e.exports=function(){function e(){i(this,e),this.disposed=!1,this.disposables=new Set;var t=!0,n=!1,s=void 0;try{for(var o,r=arguments[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var a=o.value;this.add(a)}}catch(e){n=!0,s=e}finally{try{t||null==r.return||r.return()}finally{if(n)throw s}}}var t;return t=[{key:"dispose",value(){this.disposed||(this.disposed=!0,this.disposables.forEach((e=>e.dispose())),this.disposables=null)}},{key:"add",value(){if(!this.disposed){var e=!0,t=!1,i=void 0;try{for(var s,o=arguments[Symbol.iterator]();!(e=(s=o.next()).done);e=!0){var r=s.value;n(r),this.disposables.add(r)}}catch(e){t=!0,i=e}finally{try{e||null==o.return||o.return()}finally{if(t)throw i}}}}},{key:"remove",value(e){this.disposed||this.disposables.delete(e)}},{key:"delete",value(e){this.remove(e)}},{key:"clear",value(){this.disposed||this.disposables.clear()}}],t&&function(e,t){for(var i=0;t.length>i;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),e}()})),pe.register("gvKv3",(function(e,t){var i;i=pe("dd7yt"),e.exports=class e extends i{static parents(e,t="*"){var i;return i=[],this.eachParent(e,(e=>{if("function"==typeof e.matches?e.matches(t):void 0)return i.push(e)})),i}static eachParent(e,t){var i,n;for(null!=(i=e.parentNode)&&t(i),n=[];i=i.parentNode;)n.push(null!=i?t(i):void 0);return n}parents(t="*"){return e.parents(this,t)}queryParentSelectorAll(e){if(null==e)throw Error("::queryParentSelectorAll requires a valid selector as argument");return this.parents(e)}queryParentSelector(e){if(null==e)throw Error("::queryParentSelector requires a valid selector as argument");return this.queryParentSelectorAll(e)[0]}eachParent(t){return e.eachParent(this,t)}}})),pe.register("dd7yt",(function(e,t){!function(){var t,i,n,s;for(s in e.exports=n=function(){function e(){"function"==typeof this.extended&&this.extended()}return e.includeInto=function(e){var i,n,s;for(i in this.extend(e.prototype),this)n=this[i],-1===t.indexOf(i)&&(e.hasOwnProperty(i)||(e[i]=n));return null!=(s=this.included)?s.call(e):void 0},e.extend=function(e){var t,n,s,o,r;for(n=0,s=(o=Object.getOwnPropertyNames(this.prototype)).length;s>n;n++)-1===i.indexOf(t=o[n])&&(e.hasOwnProperty(t)||(e[t]=this.prototype[t]));return null!=(r=this.prototype.extended)?r.call(e):void 0},e}(),t=["__super__"],n)t.push(s);i=["constructor","extended"]}()})),pe.register("sqlNI",((e,t)=>{var i,n;n=pe("dd7yt"),({Disposable:i}=le),e.exports=class extends n{addDisposableEventListener(e,t,n,s){return e.addEventListener(t,n,s),new i((()=>e.removeEventListener(t,n)))}}})),pe.register("7iGCF",(function(e,t){var i,n,s,o,r,a;o=pe("dd7yt"),s=pe("sqlNI"),({Disposable:n,CompositeDisposable:i}=le),a=(e,t)=>{var i,n;for(i in n=[],e)n.push(t(i,e[i]));return n},r="__NONE__",e.exports=function(){class e extends o{subscribeTo(e,t,i,s){var o,l;return e instanceof HTMLElement||([e,t,i,s]=[this,e,t,i]),"object"==typeof t&&([i,t,s]=[t,r,i]),null==this.eventsMap&&(this.eventsMap=new WeakMap),null==this.disposablesMap&&(this.disposablesMap=new WeakMap),null==this.eventsMap.get(e)&&this.eventsMap.set(e,{}),null==this.disposablesMap.get(e)&&this.disposablesMap.set(e,{}),l=this.eventsMap.get(e),o=this.disposablesMap.get(e),a(i,((i,n)=>(null==l[i]&&(l[i]={},o[i]=this.createEventListener(e,i,s)),l[i][t]=n))),new n((()=>this.unsubscribeFrom(e,t,i)))}unsubscribeFrom(e,t,i){var n,s,o;if(e instanceof HTMLElement||([e,t,i]=[this,e,t]),"object"==typeof t&&([i,t]=[t,r]),o=this.eventsMap.get(e)){for(s in i)delete o[s][t],0===Object.keys(o[s]).length&&((n=this.disposablesMap.get(e))[s].dispose(),delete n[s],delete o[s]);return 0===Object.keys(o).length?(this.eventsMap.delete(e),this.disposablesMap.delete(e)):void 0}}createEventListener(e,t,i){return this.addDisposableEventListener(e,t,(i=>{var n,s,o;if(n=null!=(s=this.eventsMap.get(e))?s[t]:void 0)return({target:o}=i),this.decorateEvent(i),this.eachSelectorFromTarget(i,o,n),i.isPropagationStopped||"function"==typeof n.__NONE__&&n.__NONE__(i),!0}),i)}eachSelectorFromTarget(e,t,i){return this.nodeAndItsAncestors(t,(t=>{if(!e.isPropagationStopped)return this.eachSelector(i,((i,n)=>{var s;if(s=this.targetMatch(t,i),!e.isImmediatePropagationStopped&&s)return n(e)}))}))}eachSelector(e,t){var i,n,s,o;for(-1!==(s=Object.keys(e)).indexOf(r)&&s.splice(s.indexOf(r),1),s.sort(((e,t)=>t.split(" ").length-e.split(" ").length)),i=0,o=s.length;o>i;i++)if(t(n=s[i],e[n]))return!0;return!1}targetMatch(e,t){var i;if(e.matches(t))return!0;for(i=e.parentNode;null!=i&&null!=i.matches;){if(i.matches(t))return!0;i=i.parentNode}return!1}nodeAndItsAncestors(e,t){var i,n;for(i=e.parentNode,t(e),n=[];null!=i&&null!=i.matches;)t(i),n.push(i=i.parentNode);return n}decorateEvent(e){var t,i;return t=Event.prototype.stopPropagation,e.stopPropagation=function(){return this.isPropagationStopped=!0,t.apply(this,arguments)},i=Event.prototype.stopImmediatePropagation,e.stopImmediatePropagation=function(){return this.isImmediatePropagationStopped=!0,i.apply(this,arguments)}}}return s.includeInto(e),e}()})),pe.register("gDaEj",(function(e,t){var i,n,s,o,r,a,l;s=pe("dd7yt"),a="a abbr address article aside audio b bdi bdo blockquote body button canvas caption cite code colgroup datalist dd del details dfn dialog div dl dt em fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header html i iframe ins kbd label legend li main map mark menu meter nav noscript object ol optgroup option output p pre progress q rp rt ruby s samp script section select small span strong style sub summary sup table tbody td textarea tfoot th thead time title tr u ul var video area base br col command embed hr img input keygen link meta param source track wbr".split(/\s+/),o={},"area base br col command embed hr img input keygen link meta param source track wbr".split(/\s+/).forEach((e=>o[e]=!0)),i=class extends s{buildContent(){if(null!=this.constructor.content)return r.buildContent(this,this.constructor.content)}},e.exports=r=function(){class e extends s{static includeInto(t){return super.includeInto(t),Object.defineProperty(t,"content",{enumerable:!1,get(){return this.prototype.__content__},set(e){return this.prototype.__content__=e}}),Object.defineProperty(t.prototype,"createdCallback",{enumerable:!0,get(){return this.__create__},set(e){return this.__createdCallback__=e}}),Object.defineProperty(t.prototype,"__create__",{enumerable:!0,value(){if(null!=this.__content__&&e.buildContent(this,this.__content__),null!=this.__createdCallback__)return this.__createdCallback__()}}),t.useShadowRoot=()=>t.prototype.__useShadowRoot__=!0}static buildContent(e,t){var i,n,s;return s=new l,t.call(s),[i]=s.buildHtml(),(n=n=e.__useShadowRoot__?e.shadowRoot=e.createShadowRoot():e).innerHTML=i,this.wireOutlets(e,n)}static wireOutlets(e,t){var i,n,s,o;for(n=0,s=(o=t.querySelectorAll("[outlet]")).length;s>n;n++)e[(i=o[n]).getAttribute("outlet")]=i,i.removeAttribute("outlet")}}return e.Babel=i,e}(),l=function(){class e{constructor(){this.currentBuilder=new n}subview(e,t){return this.currentBuilder.subview(e,t)}text(e){return this.currentBuilder.text(e)}tag(e,...t){return this.currentBuilder.tag(e,...t)}raw(e){return this.currentBuilder.raw(e)}buildHtml(){return this.currentBuilder.buildHtml()}}return a.forEach((function(t){return e.prototype[t]=function(...e){return this.currentBuilder.tag(t,...e)}})),e}(),n=class{constructor(){this.document=[],this.postProcessingSteps=[]}buildHtml(){return[this.document.join(""),this.postProcessingSteps]}tag(e,...t){var i;if(i=this.extractOptions(t),this.openTag(e,i.attributes),!o.hasOwnProperty(e))return"function"==typeof i.content&&i.content(),i.text&&this.text(i.text),this.closeTag(e);if(null!=i.text||null!=i.content)throw Error(`Self-closing tag ${e} cannot have text or content`)}openTag(e,t){var i,n,s;return 0===this.document.length&&null==t&&(t={}),s=(n=(()=>{var e;for(i in e=[],t)e.push(`${i}="${t[i]}"`);return e})()).length?" "+n.join(" "):"",this.document.push(`<${e}${s}>`)}closeTag(e){return this.document.push(``)}text(e){var t;return t=e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">"),this.document.push(t)}raw(e){return this.document.push(e)}subview(e,t){var i;return i="subview-"+ ++idCounter,this.tag("div",{id:i}),this.postProcessingSteps.push((n=>(n[e]=t,t.parentView=n,n.find("div#"+i).replaceWith(t))))}extractOptions(e){var t,i,n,s;for(s={},i=0,n=e.length;n>i;i++)switch(typeof(t=e[i])){case"function":s.content=t;break;case"string":case"number":s.text=""+t;break;default:s.attributes=t}return s}}})),oe={requirePackages:(...e)=>new Promise(((t,i)=>{var n,s,o,r;return o=[],n=[],s=e.length,r=()=>{if(0==--s)return n.length>0?i(n):t(o)},e.forEach(((e,t)=>{var i,s;return i=e=>(n[t]=e,r()),null!=(s=atom.packages.activatePackage(e).then((e=>(o[t]=e.mainModule,r())))).fail?s.fail(i):null!=s.catch?s.catch(i):void 0}))})),registerOrUpdateElement:pe("8VogU"),Ancestors:pe("gvKv3"),AncestorsMethods:pe("gvKv3"),DisposableEvents:pe("sqlNI"),EventsDelegation:pe("7iGCF"),SpacePenDSL:pe("gDaEj")},(ae={}).forEach=(e,t)=>{for(var i=0;e.length>i;i++){var n=t(e[i]);if(n)return n}};var me,ge,fe,ve,be,ye=ae.forEach;me=e=>{var t=e.stateHandler.getState;return{isDetectable(e){var i=t(e);return i&&!!i.isDetectable},markAsDetectable(e){t(e).isDetectable=!0},isBusy(e){return!!t(e).busy},markBusy(e,i){t(e).busy=!!i}}},ge=e=>{function t(t){var n=e.get(t);return void 0===n?[]:i[n]||[]}var i={};return{get:t,add(t,n){var s=e.get(t);i[s]||(i[s]=[]),i[s].push(n)},removeListener(e,i){for(var n=t(e),s=0,o=n.length;o>s;++s)if(n[s]===i){n.splice(s,1);break}},removeAllListeners(e){var i=t(e);i&&(i.length=0)}}},fe=()=>{var e=1;return{generate(){return e++}}},ve=e=>{var t=e.idGenerator,i=e.stateHandler.getState;return{get(e){var t=i(e);return t&&void 0!==t.id?t.id:null},set(e){var n=i(e);if(!n)throw Error("setId required the element to have a resize detection state.");var s=t.generate();return n.id=s,s}}},be=e=>{function t(){}var i={log:t,warn:t,error:t};if(!e&&window.console){var n=(e,t)=>{e[t]=function(){var e=console[t];if(e.apply)e.apply(console,arguments);else for(var i=0;arguments.length>i;i++)e(arguments[i])}};n(i,"log"),n(i,"warn"),n(i,"error")}return i};var Se={},we=Se={};we.isIE=e=>{return!(-1===(t=navigator.userAgent.toLowerCase()).indexOf("msie")&&-1===t.indexOf("trident")&&-1===t.indexOf(" edge/")||e&&e!==(()=>{var e=3,t=document.createElement("div"),i=t.getElementsByTagName("i");do{t.innerHTML="\x3c!--[if gt IE "+ ++e+"]>4?e:void 0})());var t},we.isLegacyOpera=()=>!!window.opera;var xe,Ee={};(Ee={}).getOption=(e,t,i)=>{var n=e[t];return null==n&&void 0!==i?i:n},xe=e=>{function t(){for(d=!0;l.size();){var e=l;l=i(),e.process()}d=!1}function n(){a=setTimeout(t,0)}var s=(e=e||{}).reporter,o=Ee.getOption(e,"async",!0),r=Ee.getOption(e,"auto",!0);r&&!o&&(s&&s.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),o=!0);var a,l=i(),d=!1;return{add(e,t){!d&&r&&o&&0===l.size()&&n(),l.add(e,t)},force(e){d||(void 0===e&&(e=o),a&&(clearTimeout(a),a=null),e?n():t())}}};var Ce,Me={};Me={initState(e){return e._erd={},n(e)},getState:n,cleanState(e){delete e._erd}},Ce=function(e){function t(e){return s(e).object}var i=(e=e||{}).reporter,n=e.batchProcessor,s=e.stateHandler.getState;if(!i)throw Error("Missing required dependency: reporter.");return{makeDetectable(t,o,r){r||(r=o,o=t,t=null),t=t||{},Se.isIE(8)?r(o):function(o,r){function a(){function e(){if("static"===c.position){o.style.setProperty("position","relative",t.important?"important":"");var e=(e,i,n,s)=>{var o=n[s];"auto"!==o&&"0"!==(e=>e.replace(/[^-\d\.]/g,""))(o)&&(e.warn("An element that is positioned static has style."+s+"="+o+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+s+" will be set to 0. Element: ",i),i.style.setProperty(s,"0",t.important?"important":""))};e(i,o,c,"top"),e(i,o,c,"right"),e(i,o,c,"bottom"),e(i,o,c,"left")}}""!==c.position&&(e(),h=!0);var n=document.createElement("object");n.style.cssText=d,n.tabIndex=-1,n.type="text/html",n.setAttribute("aria-hidden","true"),n.onload=function(){h||e(),function e(t,i){if(!t.contentDocument){var n=s(t);return n.checkForObjectDocumentTimeoutId&&window.clearTimeout(n.checkForObjectDocumentTimeoutId),void(n.checkForObjectDocumentTimeoutId=setTimeout((()=>{n.checkForObjectDocumentTimeoutId=0,e(t,i)}),100))}i(t.contentDocument)}(this,(e=>{r(o)}))},Se.isIE()||(n.data="about:blank"),s(o)&&(o.appendChild(n),s(o).object=n,Se.isIE()&&(n.data="about:blank"))}var l,d=(["display: block","position: absolute","top: 0","left: 0","width: 100%","height: 100%","border: none","padding: 0","margin: 0","opacity: 0","z-index: -1000","pointer-events: none"].join(l=e.important?" !important; ":"; ")+l).trim(),h=!1,c=window.getComputedStyle(o),u=o.offsetWidth,p=o.offsetHeight;s(o).startSize={width:u,height:p},n?n.add(a):a()}(o,r)},addListener(e,i){function n(){i(e)}if(Se.isIE(8))s(e).object={proxy:n},e.attachEvent("onresize",n);else{var o=t(e);if(!o)throw Error("Element is not detectable by this strategy.");o.contentDocument.defaultView.addEventListener("resize",n)}},uninstall(e){if(s(e)){var i=t(e);i&&(Se.isIE(8)?e.detachEvent("onresize",i.proxy):e.removeChild(i),s(e).checkForObjectDocumentTimeoutId&&window.clearTimeout(s(e).checkForObjectDocumentTimeoutId),delete s(e).object)}}}};var De,Te=ae.forEach;De=e=>{function t(e){((e,t,n)=>{if(!e.getElementById(t)){var s=n+"_animation",o=n+"_animation_active",r="/* Created by the element-resize-detector library. */\n";r+="."+n+" > div::-webkit-scrollbar { "+i(["display: none"])+" }\n\n",r+="."+o+" { "+i(["-webkit-animation-duration: 0.1s","animation-duration: 0.1s","-webkit-animation-name: "+s,"animation-name: "+s])+" }\n",r+="@-webkit-keyframes "+s+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n",((i,n)=>{n=n||(t=>{e.head.appendChild(t)});var s=e.createElement("style");s.innerHTML=i,s.id=t,n(s)})(r+="@keyframes "+s+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }")}})(e,"erd_scroll_detection_scrollbar_style",u)}function i(t){var i=e.important?" !important; ":"; ";return(t.join(i)+i).trim()}function n(e,t,i){if(e.addEventListener)e.addEventListener(t,i);else{if(!e.attachEvent)return a.error("[scroll] Don't know how to add event listeners.");e.attachEvent("on"+t,i)}}function s(e,t,i){if(e.removeEventListener)e.removeEventListener(t,i);else{if(!e.detachEvent)return a.error("[scroll] Don't know how to remove event listeners.");e.detachEvent("on"+t,i)}}function o(e){return d(e).container.childNodes[0].childNodes[0].childNodes[0]}function r(e){return d(e).container.childNodes[0].childNodes[0].childNodes[1]}var a=(e=e||{}).reporter,l=e.batchProcessor,d=e.stateHandler.getState,h=e.idHandler;if(!l)throw Error("Missing required dependency: batchProcessor");if(!a)throw Error("Missing required dependency: reporter.");var c=(()=>{var e=document.createElement("div");e.style.cssText=i(["position: absolute","width: 1000px","height: 1000px","visibility: hidden","margin: 0","padding: 0"]);var t=document.createElement("div");t.style.cssText=i(["position: absolute","width: 500px","height: 500px","overflow: scroll","visibility: none","top: -1500px","left: -1500px","visibility: hidden","margin: 0","padding: 0"]),t.appendChild(e),document.body.insertBefore(t,document.body.firstChild);var n=500-t.clientWidth,s=500-t.clientHeight;return document.body.removeChild(t),{width:n,height:s}})(),u="erd_scroll_detection_container";return t(window.document),{makeDetectable(e,t,s){function p(){if(e.debug){var i=[].slice.call(arguments);if(i.unshift(h.get(t),"Scroll: "),a.log.apply)a.log.apply(null,i);else for(var n=0;i.length>n;n++)a.log(i[n])}}function m(e){var t=d(e).container.childNodes[0],i=window.getComputedStyle(t);return!i.width||-1===i.width.indexOf("px")}function g(){var e=window.getComputedStyle(t),i={};return i.position=e.position,i.width=t.offsetWidth,i.height=t.offsetHeight,i.top=e.top,i.right=e.right,i.bottom=e.bottom,i.left=e.left,i.widthCSS=e.width,i.heightCSS=e.height,i}function f(){if(p("storeStyle invoked."),d(t)){var e=g();d(t).style=e}else p("Aborting because element has been uninstalled")}function v(e,t,i){d(e).lastWidth=t,d(e).lastHeight=i}function b(){return 2*c.width+1}function y(){return 2*c.height+1}function S(e){return e+10+b()}function w(e){return e+10+y()}function x(e,t,i){var n=o(e),s=r(e),a=S(t),l=w(i),d=(e=>2*e+b())(t),h=(e=>2*e+y())(i);n.scrollLeft=a,n.scrollTop=l,s.scrollLeft=d,s.scrollTop=h}function E(){var e=d(t).container;if(!e){(e=document.createElement("div")).className=u,e.style.cssText=i(["visibility: hidden","display: inline","width: 0px","height: 0px","z-index: -1","overflow: hidden","margin: 0","padding: 0"]),d(t).container=e,(e=>{e.className+=" "+u+"_animation_active"})(e),t.appendChild(e);var s=()=>{d(t).onRendered&&d(t).onRendered()};n(e,"animationstart",s),d(t).onAnimationStart=s}return e}function C(){function s(){var e=d(t);e&&e.onExpand?e.onExpand():p("Aborting expand scroll handler: element has been uninstalled")}function o(){var e=d(t);e&&e.onShrink?e.onShrink():p("Aborting shrink scroll handler: element has been uninstalled")}if(p("Injecting elements"),d(t)){(()=>{var i=d(t).style;if("static"===i.position){t.style.setProperty("position","relative",e.important?"important":"");var n=(e,t,i,n)=>{var s=i[n];"auto"!==s&&"0"!==(e=>e.replace(/[^-\d\.]/g,""))(s)&&(e.warn("An element that is positioned static has style."+n+"="+s+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+n+" will be set to 0. Element: ",t),t.style[n]=0)};n(a,t,i,"top"),n(a,t,i,"right"),n(a,t,i,"bottom"),n(a,t,i,"left")}})();var r=d(t).container;r||(r=E());var l,h,m,g,f=c.width,v=c.height,b=i(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden","width: 100%","height: 100%","left: 0px","top: 0px"]),y=i(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden"].concat(["left: "+(l=(l=-(1+f))?l+"px":"0"),"top: "+(h=(h=-(1+v))?h+"px":"0"),"right: "+(g=(g=-f)?g+"px":"0"),"bottom: "+(m=(m=-v)?m+"px":"0")])),S=i(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),w=i(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),x=i(["position: absolute","left: 0","top: 0"]),C=i(["position: absolute","width: 200%","height: 200%"]),M=document.createElement("div"),D=document.createElement("div"),T=document.createElement("div"),k=document.createElement("div"),L=document.createElement("div"),A=document.createElement("div");M.dir="ltr",M.style.cssText=b,M.className=u,D.className=u,D.style.cssText=y,T.style.cssText=S,k.style.cssText=x,L.style.cssText=w,A.style.cssText=C,T.appendChild(k),L.appendChild(A),D.appendChild(T),D.appendChild(L),M.appendChild(D),r.appendChild(M),n(T,"scroll",s),n(L,"scroll",o),d(t).onExpandScroll=s,d(t).onShrinkScroll=o}else p("Aborting because element has been uninstalled")}function M(){function i(t,i,n){var s=(e=>o(e).childNodes[0])(t),r=S(i),a=w(n);s.style.setProperty("width",r+"px",e.important?"important":""),s.style.setProperty("height",a+"px",e.important?"important":"")}function n(n){var o=t.offsetWidth,r=t.offsetHeight,c=o!==d(t).lastWidth||r!==d(t).lastHeight;p("Storing current size",o,r),v(t,o,r),l.add(0,(()=>{c&&(d(t)?s()?(e.debug&&(t.offsetWidth===o&&t.offsetHeight===r||a.warn(h.get(t),"Scroll: Size changed before updating detector elements.")),i(t,o,r)):p("Aborting because element container has not been initialized"):p("Aborting because element has been uninstalled"))})),l.add(1,(()=>{d(t)?s()?x(t,o,r):p("Aborting because element container has not been initialized"):p("Aborting because element has been uninstalled")})),c&&n&&l.add(2,(()=>{d(t)?s()?n():p("Aborting because element container has not been initialized"):p("Aborting because element has been uninstalled")}))}function s(){return!!d(t).container}function c(){p("notifyListenersIfNeeded invoked");var e=d(t);return void 0===d(t).lastNotifiedWidth&&e.lastWidth===e.startSize.width&&e.lastHeight===e.startSize.height?p("Not notifying: Size is the same as the start size, and there has been no notification yet."):e.lastWidth===e.lastNotifiedWidth&&e.lastHeight===e.lastNotifiedHeight?p("Not notifying: Size already notified"):(p("Current size not notified, notifying..."),e.lastNotifiedWidth=e.lastWidth,e.lastNotifiedHeight=e.lastHeight,void Te(d(t).listeners,(e=>{e(t)})))}function u(){p("Scroll detected."),m(t)?p("Scroll event fired while unrendered. Ignoring..."):n(c)}if(p("registerListenersAndPositionElements invoked."),d(t)){d(t).onRendered=()=>{if(p("startanimation triggered."),m(t))p("Ignoring since element is still unrendered...");else{p("Element rendered.");var e=o(t),i=r(t);0!==e.scrollLeft&&0!==e.scrollTop&&0!==i.scrollLeft&&0!==i.scrollTop||(p("Scrollbars out of sync. Updating detector elements..."),n(c))}},d(t).onExpand=u,d(t).onShrink=u;var g=d(t).style;i(t,g.width,g.height)}else p("Aborting because element has been uninstalled")}function D(){if(p("finalizeDomMutation invoked."),d(t)){var e=d(t).style;v(t,e.width,e.height),x(t,e.width,e.height)}else p("Aborting because element has been uninstalled")}function T(){s(t)}function k(){var e;p("Installing..."),d(t).listeners=[],e=g(),d(t).startSize={width:e.width,height:e.height},p("Element start size",d(t).startSize),l.add(0,f),l.add(1,C),l.add(2,M),l.add(3,D),l.add(4,T)}var L,A,R;s||(s=t,t=e,e=null),e=e||{},p("Making detectable..."),R=(A=L=t).getRootNode&&A.getRootNode().contains(A),A!==A.ownerDocument.body&&!A.ownerDocument.body.contains(A)&&!R||null===window.getComputedStyle(L)?(p("Element is detached"),E(),p("Waiting until element is attached..."),d(t).onRendered=()=>{p("Element is now attached"),k()}):k()},addListener(e,t){if(!d(e).listeners.push)throw Error("Cannot add listener to an element that is not detectable.");d(e).listeners.push(t)},uninstall(e){var t=d(e);t&&(t.onExpandScroll&&s(o(e),"scroll",t.onExpandScroll),t.onShrinkScroll&&s(r(e),"scroll",t.onShrinkScroll),t.onAnimationStart&&s(t.container,"animationstart",t.onAnimationStart),t.container&&e.removeChild(t.container))},initDocument:t}},re=e=>{var t;if((e=e||{}).idHandler)t={get(t){return e.idHandler.get(t,!0)},set:e.idHandler.set};else{var i=fe(),n=ve({idGenerator:i,stateHandler:Me});t=n}var l=e.reporter;l||(l=be(!1===l));var d=a(e,"batchProcessor",xe({reporter:l})),h={};h.callOnAdd=!!a(e,"callOnAdd",!0),h.debug=!!a(e,"debug",!1);var c,u=ge(t),p=me({stateHandler:Me}),m=a(e,"strategy","object"),g=a(e,"important",!1),f={reporter:l,batchProcessor:d,stateHandler:Me,idHandler:t,important:g};if("scroll"===m&&(Se.isLegacyOpera()?(l.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),m="object"):Se.isIE(9)&&(l.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),m="object")),"scroll"===m)c=De(f);else{if("object"!==m)throw Error("Invalid strategy name: "+m);c=Ce(f)}var v={};return{listenTo(e,i,n){function d(e){var t=u.get(e);ye(t,(t=>{t(e)}))}function m(e,t,i){u.add(t,i),e&&i(t)}if(n||(n=i,i=e,e={}),!i)throw Error("At least one element required.");if(!n)throw Error("Listener required.");if(r(i))i=[i];else{if(!s(i))return l.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");i=o(i)}var f=0,b=a(e,"callOnAdd",h.callOnAdd),y=a(e,"onReady",(()=>{})),S=a(e,"debug",h.debug);ye(i,(e=>{Me.getState(e)||(Me.initState(e),t.set(e));var s=t.get(e);if(S&&l.log("Attaching listener to element",s,e),!p.isDetectable(e))return S&&l.log(s,"Not detectable."),p.isBusy(e)?(S&&l.log(s,"System busy making it detectable"),m(b,e,n),v[s]=v[s]||[],void v[s].push((()=>{++f===i.length&&y()}))):(S&&l.log(s,"Making detectable..."),p.markBusy(e,!0),c.makeDetectable({debug:S,important:g},e,(e=>{if(S&&l.log(s,"onElementDetectable"),Me.getState(e)){p.markAsDetectable(e),p.markBusy(e,!1),c.addListener(e,d),m(b,e,n);var t=Me.getState(e);t&&t.startSize&&(t.startSize.width===e.offsetWidth&&t.startSize.height===e.offsetHeight||d(e)),v[s]&&ye(v[s],(e=>{e()}))}else S&&l.log(s,"Element uninstalled before being detectable.");delete v[s],++f===i.length&&y()})));S&&l.log(s,"Already detecable, adding listener."),m(b,e,n),f++})),f===i.length&&y()},removeListener:u.removeListener,removeAllListeners:u.removeAllListeners,uninstall(e){if(!e)return l.error("At least one element is required.");if(r(e))e=[e];else{if(!s(e))return l.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");e=o(e)}ye(e,(e=>{u.removeAllListeners(e),c.uninstall(e),Me.cleanState(e)}))},initDocument(e){c.initDocument&&c.initDocument(e)}}},pe.register("bNORb",((t,i)=>{function n(e){return e?e.replace(/[$()*+./?[\\\]^{|}-]/g,"\\$&"):""}function s(e){return e?(e=`${e[0].toLowerCase()}${e.slice(1)}`).replace(/([A-Z])|(_)/g,((e,t)=>t?"-"+t.toLowerCase():"-")):""}function o(e,t){let i;return(...n)=>{void 0!==i&&clearTimeout(i),i=setTimeout((()=>{e(...n)}),t)}}e(t.exports,"escapeRegExp",(()=>n)),e(t.exports,"debounce",(()=>o)),e(t.exports,"dasherize",(()=>s))}));var ke=pe("bNORb");let Le=0;class Ae{static isType(e,t){return Array.isArray(e.type)?e.type.indexOf(t)>=0:t===e.type}constructor(e,t,i){this.marker=e,this.minimap=t,this.emitter=new le.Emitter,this.id=Le++,this.properties=null,this.setProperties(i),this.properties.id=this.id,this.destroyed=!1,this.markerDestroyDisposable=this.marker.onDidDestroy((()=>{this.destroy()})),this.screenRange=e.getScreenRange()}destroy(){var e,t;this.destroyed||(null===(e=this.markerDestroyDisposable)||void 0===e||null===(t=e.dispose)||void 0===t||t.call(e),this.destroyed=!0,this.emitter.emit("did-destroy"),this.emitter.dispose())}isDestroyed(){return this.destroyed}onDidChangeProperties(e){if(!this.destroyed)return this.emitter.on("did-change-properties",e)}onDidDestroy(e){if(!this.destroyed)return this.emitter.on("did-destroy",e)}getId(){return this.id}getMarker(){return this.marker}isType(e){return Ae.isType(this.properties,e)}getProperties(){return this.properties}setProperties(e){if(this.destroyed)return;const t=this.properties;this.properties=e,this.properties.id=this.id,this.emitter.emit("did-change-properties",{oldProperties:t,newProperties:e})}}class Re{initializeDecorations(e){this.minimap=e,this.emitter=null==this.emitter?new le.Emitter:this.minimap.emitter,this.decorationsById=new Map,this.decorationsByMarkerId=new Map,this.decorationMarkerChangedSubscriptions=new Map,this.decorationMarkerDestroyedSubscriptions=new Map,this.decorationUpdatedSubscriptions=new Map,this.decorationDestroyedSubscriptions=new Map,this.destroyed=!1}getDecorations(){return[...this.decorationsById.values()]}onDidAddDecoration(e){return this.emitter.on("did-add-decoration",e)}onDidRemoveDecoration(e){return this.emitter.on("did-remove-decoration",e)}onDidChangeDecoration(e){return this.emitter.on("did-change-decoration",e)}onDidChangeDecorationRange(e){return this.emitter.on("did-change-decoration-range",e)}onDidUpdateDecoration(e){return this.emitter.on("did-update-decoration",e)}decorationForId(e){return this.decorationsById.get(e)}decorationsForScreenRowRange(e,t){const i={},n=this.findMarkers({intersectsScreenRowRange:[e,t]});for(let e=0,t=n.length;t>e;e++){const t=n[e],s=this.decorationsByMarkerId.get(t.id);void 0!==s&&(i[t.id]=s)}return i}decorationsByTypeThenRows(){if(null!=this.decorationsByTypeThenRowsCache)return this.decorationsByTypeThenRowsCache;const e={},t=this.decorationsById.values();for(const i of t){const t=i.marker.getScreenRange(),n=i.getProperties().type;null==e[n]&&(e[n]={});for(let s=t.start.row,o=t.end.row;o>=s;s++)null==e[n][s]&&(e[n][s]=[]),e[n][s].push(i)}return this.decorationsByTypeThenRowsCache=e,e}invalidateDecorationForScreenRowsCache(){this.decorationsByTypeThenRowsCache=null}decorateMarker(e,i){if(this.destroyed||this.minimap.destroyed||null==e)return;const{id:n}=e;"highlight"===i.type&&(i.type="highlight-over");const{type:s,plugin:o}=i;if(null==o&&(i.plugin=(()=>{const e=Error().stack.split("\n")[3].split("(")[1].replace(")",""),i=RegExp(atom.packages.getPackageDirPaths().join("|")+ke.escapeRegExp(t(de).sep)),n=e.replace(i,"").split(t(de).sep)[0].replace(/minimap-|-minimap/,"");return 0>n.indexOf(t(de).sep)?n:void 0})()),null==i.scope&&null!=i.class){const e=i.class.split(" ").join(".");i.scope=".minimap ."+e}this.decorationMarkerDestroyedSubscriptions.has(n)||this.decorationMarkerDestroyedSubscriptions.set(n,e.onDidDestroy((()=>{this.removeAllDecorationsForMarker(e)}))),this.decorationMarkerChangedSubscriptions.has(n)||this.decorationMarkerChangedSubscriptions.set(n,e.onDidChange((t=>{const i=this.decorationsByMarkerId.get(n),o=e.getScreenRange();if(this.invalidateDecorationForScreenRowsCache(),void 0!==i)for(let n=0,s=i.length;s>n;n++){const s=i[n];this.emitter.emit("did-change-decoration",{marker:e,decoration:s,event:t}),this.emitDecorationChanges(s.type,s),s.screenRange=o}let r=t.oldTailScreenPosition,a=t.oldHeadScreenPosition,l=t.newTailScreenPosition,d=t.newHeadScreenPosition;r.row>a.row&&([r,a]=[a,r]),l.row>d.row&&([l,d]=[d,l]);const h=((e,t,i,n)=>{const s=[];return e.isLessThan(i)?s.push([e,i]):i.isLessThan(e)&&s.push([i,e]),t.isLessThan(n)?s.push([t,n]):n.isLessThan(t)&&s.push([n,t]),s})(r,a,l,d);for(let e=0,t=h.length;t>e;e++){const[t,i]=h[e];this.emitRangeChanges(s,{start:t,end:i},0)}})));const r=new Ae(e,this,i);return this.decorationsByMarkerId.has(n)||this.decorationsByMarkerId.set(n,[]),this.decorationsByMarkerId.get(n).push(r),this.decorationsById.set(r.id,r),this.decorationUpdatedSubscriptions.has(r.id)||this.decorationUpdatedSubscriptions.set(r.id,r.onDidChangeProperties((e=>{this.emitDecorationChanges(s,r)}))),this.decorationDestroyedSubscriptions.set(r.id,r.onDidDestroy((()=>{this.removeDecoration(r)}))),this.emitDecorationChanges(s,r),this.emitter.emit("did-add-decoration",{marker:e,decoration:r}),r}emitDecorationChanges(e,t){if(this.destroyed||this.minimap.editorDestroyed())return;this.invalidateDecorationForScreenRowsCache();const i=t.screenRange;i.start&&i.end&&this.emitRangeChanges(e,i,0)}emitRangeChanges(e,t,i){const n=t.start.row,s=t.end.row,o=this.minimap.getLastVisibleScreenRow(),r=this.minimap.getFirstVisibleScreenRow();null==i&&(i=o-r-(s-n)),this.emitter.emit("did-change-decoration-range",{start:n,end:s,screenDelta:i,type:e})}removeDecoration(e){if(null==e)return;const t=e.marker;let i;this.decorationsById.delete(e.id),i=this.decorationUpdatedSubscriptions.get(e.id),void 0!==i&&i.dispose(),i=this.decorationDestroyedSubscriptions.get(e.id),void 0!==i&&i.dispose(),this.decorationUpdatedSubscriptions.delete(e.id),this.decorationDestroyedSubscriptions.delete(e.id);const n=this.decorationsByMarkerId.get(t.id);if(void 0===n)return;this.emitDecorationChanges(e.getProperties().type,e);const s=n.indexOf(e);s>-1&&(n.splice(s,1),this.emitter.emit("did-remove-decoration",{marker:t,decoration:e}),0===n.length&&this.removedAllMarkerDecorations(t))}removeAllDecorationsForMarker(e){if(null==e)return;const t=this.decorationsByMarkerId.get(e.id);if(void 0!==t){for(let i=0,n=t.length;n>i;i++){const n=t[i];this.destroyed||this.minimap.editorDestroyed()||this.emitDecorationChanges(n.getProperties().type,n),this.emitter.emit("did-remove-decoration",{marker:e,decoration:n})}this.removedAllMarkerDecorations(e)}}removedAllMarkerDecorations(e){null!=e&&(this.decorationMarkerChangedSubscriptions.get(e.id).dispose(),this.decorationMarkerDestroyedSubscriptions.get(e.id).dispose(),this.decorationsByMarkerId.delete(e.id),this.decorationMarkerChangedSubscriptions.delete(e.id),this.decorationMarkerDestroyedSubscriptions.delete(e.id))}removeAllDecorations(){const e=this.decorationMarkerChangedSubscriptions.values();for(const t of e)t.dispose();const t=this.decorationMarkerDestroyedSubscriptions.values();for(const e of t)e.dispose();const i=this.decorationUpdatedSubscriptions.values();for(const e of i)e.dispose();const n=this.decorationDestroyedSubscriptions.values();for(const e of n)e.dispose();const s=this.decorationsById.values();for(const e of s)e.destroy();this.decorationsById.clear(),this.decorationsByMarkerId.clear(),this.decorationMarkerChangedSubscriptions.clear(),this.decorationMarkerDestroyedSubscriptions.clear(),this.decorationUpdatedSubscriptions.clear(),this.decorationDestroyedSubscriptions.clear()}destroy(){this.removeAllDecorations(),this.minimap=void 0,this.emitter=void 0,this.destroyed=!0}}ke=pe("bNORb");var Pe=pe("dd7yt");class Ie{constructor(){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",{desynchronized:!1}),this.canvas.webkitImageSmoothingEnabled=!1,this.context.imageSmoothingEnabled=!1,this.offscreenCanvas=document.createElement("canvas"),this.offscreenContext=this.offscreenCanvas.getContext("2d",{desynchronized:!1}),this.offscreenCanvas.webkitImageSmoothingEnabled=!1,this.offscreenContext.imageSmoothingEnabled=!1}attach(e){this.canvas.parentNode||e.appendChild(this.canvas)}setSize(e=0,t=0){this.canvas.width=e,this.canvas.height=t,this.context.imageSmoothingEnabled=!1,this.resetOffscreenSize()}getSize(){return{width:this.canvas.width,height:this.canvas.height}}resetOffscreenSize(){this.offscreenCanvas.width=this.canvas.width,this.offscreenCanvas.height=this.canvas.height,this.offscreenContext.imageSmoothingEnabled=!1}copyToOffscreen(){this.canvas.width>0&&this.canvas.height>0&&this.offscreenContext.drawImage(this.canvas,0,0)}copyFromOffscreen(){this.offscreenCanvas.width>0&&this.offscreenCanvas.height>0&&this.context.drawImage(this.offscreenCanvas,0,0)}copyPartFromOffscreen(e,t,i){this.offscreenCanvas.width>0&&this.offscreenCanvas.height>0&&this.context.drawImage(this.offscreenCanvas,0,e,this.offscreenCanvas.width,i,0,t,this.offscreenCanvas.width,i)}clearCanvas(){this.context.clearRect(0,0,this.canvas.width,this.canvas.height)}}const Oe=!1;class He extends(t(Pe)){initializeCanvas(){this.tokensLayer=new Ie,this.backLayer=new Ie,this.frontLayer=new Ie,this.pendingChanges||(this.pendingChanges=[]),this.pendingBackDecorationChanges||(this.pendingBackDecorationChanges=[]),this.pendingFrontDecorationChanges||(this.pendingFrontDecorationChanges=[]),this.maxTokensInOneLine=atom.config.get("minimap.maxTokensInOneLine")}getFrontCanvas(){return this.frontLayer.canvas}attachCanvases(e){this.backLayer.attach(e),this.tokensLayer.attach(e),this.frontLayer.attach(e)}setCanvasesSize(e,t){this.backLayer.setSize(e,t),this.tokensLayer.setSize(e,t),this.frontLayer.setSize(e,t)}updateCanvas(){const e=this.minimap.getFirstVisibleScreenRow(),t=this.minimap.getLastVisibleScreenRow(),i=this.minimap.getDevicePixelRatio(),n=this.minimap.getLineHeight()*i,s=this.minimap.getCharHeight()*i,o=this.minimap.getCharWidth()*i,{width:r,height:a}=this.tokensLayer.getSize(),l=this.minimap.getTextEditor(),h=this.minimap.getTextEditorElement(),c=this.displayCodeHighlights?e=>((e,t,i)=>g(at.retrieveStyleFromDom(e,"color",t,!0),i))(e,h,this.textOpacity):()=>m(h,this.textOpacity);((e,t,i,n,s,o,r,a,l,h,c,u,p,m,g,f)=>{const b=v(t,i,o,n,s),y=e.context;if(e.clearCanvas(),0===b.length)d(t,i,0,r,a,l,h,y,c,u,p,m,g,f);else{for(let i=0,n=b.length;n>i;i++){const n=b[i];e.copyPartFromOffscreen(n.offscreenRow*r,(n.start-t)*r,(n.end-n.start)*r)}let n=t;for(let e=0,i=b.length;i>e;e++){const i=b[e];d(n,i.start,n-t,r,a,l,h,y,c,u,p,m,g,f),n=i.end}n>i||d(n,i,n-t,r,a,l,h,y,c,u,p,m,g,f)}e.resetOffscreenSize(),e.copyToOffscreen()})(this.tokensLayer,e,t,this.offscreenFirstRow,this.offscreenLastRow,this.pendingChanges,n,s,o,r,l,l.getScreenLineCount(),(e=>{const t=e.getInvisibles(),i=[];return null!=t.cr&&i.push(t.cr),null!=t.eol&&i.push(t.eol),null!=t.space&&i.push(t.space),null!=t.tab&&i.push(t.tab),0!==i.length?RegExp(i.filter((e=>"string"==typeof e)).map(ke.escapeRegExp).join("|"),"g"):null})(l),c,this.ignoreWhitespacesInTokens,this.maxTokensInOneLine);const f=this.DecorationManagement.decorationsByTypeThenRows(e,t),b={context:this.backLayer.context,canvasWidth:r,canvasHeight:a,lineHeight:n,charWidth:o,charHeight:s,orders:H()},y=(e,t,i)=>((e,t,i,n)=>{const s=e.getProperties().render;s&&(t.color=i,s(e,t,n))})(e,t,i,h);Ne["background-custom"]=y,Fe["foreground-custom"]=y,((e,t,i,n,s,o,r,a,l,d)=>{const h=v(t,i,this.pendingBackDecorationChanges,this.offscreenFirstRow,this.offscreenLastRow);if(e.clearCanvas(),0===h.length)p(t,i,0,r,a,l,d);else{for(let i=0,n=h.length;n>i;i++){const n=h[i];e.copyPartFromOffscreen(n.offscreenRow*a,(n.start-t)*a,(n.end-n.start)*a)}let n=t;for(let e=0,i=h.length;i>e;e++){const i=h[e];p(n,i.start,n-t,r,a,l,d),n=i.end}n>i||p(n,i,n-t,r,a,l,d)}e.resetOffscreenSize(),e.copyToOffscreen()})(this.backLayer,e,t,0,0,0,b,n,h,f),b.context=this.frontLayer.context,((e,t,i,n,s,o,r,a,l,d)=>{const h=v(t,i,this.pendingFrontDecorationChanges,this.offscreenFirstRow,this.offscreenLastRow);if(e.clearCanvas(),0===h.length)u(t,i,0,r,a,l,d);else{for(let i=0,n=h.length;n>i;i++){const n=h[i];e.copyPartFromOffscreen(n.offscreenRow*a,(n.start-t)*a,(n.end-n.start)*a)}let n=t;for(let e=0,i=h.length;i>e;e++){const i=h[e];u(n,i.start,n-t,r,a,l,d),n=i.end}n>i||u(n,i,n-t,r,a,l,d)}e.resetOffscreenSize(),e.copyToOffscreen()})(this.frontLayer,e,t,0,0,0,b,n,h,f),this.pendingChanges=[],this.pendingBackDecorationChanges=[],this.pendingFrontDecorationChanges=[],this.offscreenFirstRow=e,this.offscreenLastRow=t}}const _e=/^\s+$/,Ne={line(e,t,i){const{context:n,lineHeight:s,canvasWidth:o,yRow:r}=t;n.fillStyle=i,n.fillRect(0,r,o,s)},"highlight-under":h},Fe={gutter(e,t,i){const{context:n,lineHeight:s,yRow:o}=t;n.fillStyle=i,n.fillRect(0,o,1,s)},"highlight-over":h,"highlight-outline"(e,t,i){const{context:n,lineHeight:s,charWidth:o,canvasWidth:r,screenRow:a,yRow:l}=t;let d,h,c,u,p,m;const g=e.getMarker().getScreenRange(),f=g.end.row-g.start.row,v=l,b=v+s;n.fillStyle=i,0===f?(h=g.end.column-g.start.column,c=h*o,m=g.start.column*o,p=m+c,n.fillRect(m,v,c,1),n.fillRect(m,b-1,c,1),n.fillRect(m,v,1,s),n.fillRect(p,v,1,s)):1===f?(m=g.start.column*o,p=g.end.column*o,a===g.start.row?(c=r-m,u=Math.max(m,p),d=r-u,n.fillRect(m,v,c,1),n.fillRect(u,b-1,d,1),n.fillRect(m,v,1,s),n.fillRect(r-1,v,1,s)):(c=r-m,d=r-p,n.fillRect(0,v,m,1),n.fillRect(0,b-1,p,1),n.fillRect(0,v,1,s),n.fillRect(p,v,1,s))):(m=g.start.column*o,p=g.end.column*o,a===g.start.row?(c=r-m,n.fillRect(m,v,c,1),n.fillRect(m,v,1,s),n.fillRect(r-1,v,1,s)):a===g.end.row?(c=r-m,n.fillRect(0,b-1,p,1),n.fillRect(0,v,1,s),n.fillRect(p,v,1,s)):(n.fillRect(0,v,1,s),n.fillRect(r-1,v,1,s),a===g.start.row+1&&n.fillRect(0,v,m,1),a===g.end.row-1&&n.fillRect(p,b-1,r-p,1)))}};pe.register("9jcTZ",((t,i)=>{function n(e,t){window.customElements.get(t)||window.customElements.define(t,e)}e(t.exports,"default",(()=>n))}));var We=pe("9jcTZ");We=pe("9jcTZ");class je extends HTMLElement{static initClass(){b(this,oe.EventsDelegation,oe.SpacePenDSL.Babel),We.default(this,"minimap-quick-settings")}static content(){this.div({class:"select-list popover-list minimap-quick-settings"},(()=>{this.input({type:"text",class:"hidden-input",outlet:"hiddenInput"}),this.ol({class:"list-group mark-active",outlet:"list"},(()=>{this.li({class:"separator",outlet:"separator"}),this.li({class:"code-highlights",outlet:"codeHighlights"},"code-highlights"),this.li({class:"absolute-mode",outlet:"absoluteMode"},"absolute-mode"),this.li({class:"adjust-absolute-mode-height",outlet:"adjustAbsoluteModeHeight"},"adjust-absolute-mode-height")})),this.div({class:"btn-group"},(()=>{this.button({class:"btn btn-default",outlet:"onLeftButton"},"On Left"),this.button({class:"btn btn-default",outlet:"onRightButton"},"On Right")}))}))}createdCallback(){this.buildContent()}setModel(e){this.selectedItem=null,this.minimap=e,this.emitter=new le.Emitter,this.subscriptions=new le.CompositeDisposable,this.plugins={},this.itemsActions=new WeakMap,this.codeHighlights.classList.toggle("active",this.minimap.displayCodeHighlights),this.itemsActions.set(this.codeHighlights,(()=>{atom.config.set("minimap.displayCodeHighlights",!this.minimap.displayCodeHighlights)})),this.itemsActions.set(this.absoluteMode,(()=>{atom.config.set("minimap.absoluteMode",!atom.config.get("minimap.absoluteMode"))})),this.itemsActions.set(this.adjustAbsoluteModeHeight,(()=>{atom.config.set("minimap.adjustAbsoluteModeHeight",!atom.config.get("minimap.adjustAbsoluteModeHeight"))})),this.subscriptions.add($((({name:e,plugin:t})=>this.addItemFor(e,t))),Q((({name:e,plugin:t})=>this.removeItemFor(e,t))),G((({name:e,plugin:t})=>this.activateItem(e,t))),Z((({name:e,plugin:t})=>this.deactivateItem(e,t))),atom.commands.add("minimap-quick-settings",{"core:move-up":()=>{this.selectPreviousItem()},"core:move-down":()=>{this.selectNextItem()},"core:move-left"(){atom.config.set("minimap.displayMinimapOnLeft",!0)},"core:move-right"(){atom.config.set("minimap.displayMinimapOnLeft",!1)},"core:cancel":()=>{this.destroy()},"core:confirm":()=>{this.toggleSelectedItem()}}),this.subscribeTo(this.codeHighlights,{mousedown:e=>{e.preventDefault(),atom.config.set("minimap.displayCodeHighlights",!this.minimap.displayCodeHighlights)}}),this.subscribeTo(this.absoluteMode,{mousedown(e){e.preventDefault(),atom.config.set("minimap.absoluteMode",!atom.config.get("minimap.absoluteMode"))}}),this.subscribeTo(this.adjustAbsoluteModeHeight,{mousedown(e){e.preventDefault(),atom.config.set("minimap.adjustAbsoluteModeHeight",!atom.config.get("minimap.adjustAbsoluteModeHeight"))}}),this.subscribeTo(this.hiddenInput,{focusout:e=>{this.destroy()}},{passive:!0}),this.subscribeTo(this.onLeftButton,{mousedown(e){e.preventDefault(),atom.config.set("minimap.displayMinimapOnLeft",!0)}}),this.subscribeTo(this.onRightButton,{mousedown(e){e.preventDefault(),atom.config.set("minimap.displayMinimapOnLeft",!1)}}),atom.config.observe("minimap.displayCodeHighlights",(e=>{this.codeHighlights.classList.toggle("active",e)})),atom.config.observe("minimap.absoluteMode",(e=>{this.absoluteMode.classList.toggle("active",e)})),atom.config.observe("minimap.adjustAbsoluteModeHeight",(e=>{this.adjustAbsoluteModeHeight.classList.toggle("active",e)})),atom.config.observe("minimap.displayMinimapOnLeft",(e=>{this.onLeftButton.classList.toggle("selected",e),this.onRightButton.classList.toggle("selected",!e)}))),this.initList()}onDidDestroy(e){return this.emitter.on("did-destroy",e)}attach(){atom.views.getView(atom.workspace).appendChild(this),this.hiddenInput.focus()}destroy(){this.emitter.emit("did-destroy"),this.subscriptions.dispose(),this.parentNode.removeChild(this)}initList(){this.itemsDisposables=new WeakMap;for(const e in Ke)this.addItemFor(e,Ke[e])}toggleSelectedItem(){const e=this.itemsActions.get(this.selectedItem);"function"==typeof e&&e()}selectNextItem(){this.selectedItem.classList.remove("selected"),null!=this.selectedItem.nextSibling?(this.selectedItem=this.selectedItem.nextSibling,this.selectedItem.matches(".separator")&&(this.selectedItem=this.selectedItem.nextSibling)):this.selectedItem=this.list.firstChild,this.selectedItem.classList.add("selected")}selectPreviousItem(){this.selectedItem.classList.remove("selected"),null!=this.selectedItem.previousSibling?(this.selectedItem=this.selectedItem.previousSibling,this.selectedItem.matches(".separator")&&(this.selectedItem=this.selectedItem.previousSibling)):this.selectedItem=this.list.lastChild,this.selectedItem.classList.add("selected")}addItemFor(e,t){const i=document.createElement("li"),n=()=>{L(e)};t.isActive()&&i.classList.add("active"),i.textContent=e,this.itemsActions.set(i,n),this.itemsDisposables.set(i,this.addDisposableEventListener(i,"mousedown",(e=>{e.preventDefault(),n()}))),this.plugins[e]=i,this.list.insertBefore(i,this.separator),null==this.selectedItem&&(this.selectedItem=i,this.selectedItem.classList.add("selected"))}removeItemFor(e,t){try{this.list.removeChild(this.plugins[e])}catch(e){}delete this.plugins[e]}activateItem(e,t){this.plugins[e].classList.add("active")}deactivateItem(e,t){this.plugins[e].classList.remove("active")}}je.initClass();const Be=t(re)({strategy:"scroll"});class qe extends HTMLElement{static initClass(){b(this,He,oe.EventsDelegation,oe.AncestorsMethods),We.default(this,"atom-text-editor-minimap")}createdCallback(){this.minimap=void 0,this.width=void 0,this.height=void 0,this.subscriptions=new le.CompositeDisposable,this.visibleAreaSubscription=void 0,this.quickSettingsSubscription=void 0,this.dragSubscription=void 0,this.openQuickSettingSubscription=void 0,this.minimapScrollIndicator=void 0,this.displayMinimapOnLeft=void 0,this.displayPluginsControls=void 0,this.textOpacity=void 0,this.displayCodeHighlights=void 0,this.adjustToSoftWrap=void 0,this.useHardwareAcceleration=void 0,this.absoluteMode=void 0,this.visibleArea=void 0,this.controls=void 0,this.scrollIndicator=void 0,this.openQuickSettings=void 0,this.quickSettingsElement=void 0,this.DecorationManagement=new Re,this.attached=void 0,this.attachedToTextEditor=void 0,this.standAlone=void 0,this.wasVisible=void 0,this.offscreenFirstRow=void 0,this.offscreenLastRow=void 0,this.frameRequested=void 0,this.flexBasis=void 0,this.initializeContent(),this.subscriptions.add(atom.config.observe("minimap.displayMinimapOnLeft",(e=>{this.displayMinimapOnLeft=e,this.updateMinimapFlexPosition(),this.measureHeightAndWidth(!0,!0)})),atom.config.observe("minimap.minimapScrollIndicator",(e=>{this.minimapScrollIndicator=e,this.minimapScrollIndicator&&null==this.scrollIndicator&&!this.standAlone?this.initializeScrollIndicator():null!=this.scrollIndicator&&this.disposeScrollIndicator(),this.attached&&this.requestUpdate()})),atom.config.observe("minimap.displayPluginsControls",(e=>{this.displayPluginsControls=e,this.displayPluginsControls&&null==this.openQuickSettings&&!this.standAlone?this.initializeOpenQuickSettings():null!=this.openQuickSettings&&this.disposeOpenQuickSettings()})),atom.config.observe("minimap.textOpacity",(e=>{this.textOpacity=e,this.attached&&this.requestForcedUpdate()})),atom.config.observe("minimap.displayCodeHighlights",(e=>{this.displayCodeHighlights=e,this.attached&&this.requestForcedUpdate()})),atom.config.observe("minimap.smoothScrolling",(e=>{this.smoothScrolling=e,this.attached&&(this.smoothScrolling?this.requestUpdate():(this.backLayer.canvas.style.cssText="",this.tokensLayer.canvas.style.cssText="",this.frontLayer.canvas.style.cssText=""))})),atom.config.observe("minimap.adjustMinimapWidthToSoftWrap",(e=>{this.adjustToSoftWrap=e,this.attached&&this.measureHeightAndWidth()})),atom.config.observe("minimap.adjustMinimapWidthOnlyIfSmaller",(e=>{this.adjustOnlyIfSmaller=e,this.attached&&this.measureHeightAndWidth()})),atom.config.observe("minimap.useHardwareAcceleration",(e=>{this.useHardwareAcceleration=e,this.attached&&this.requestUpdate()})),atom.config.observe("minimap.absoluteMode",(e=>{this.absoluteMode=e,this.classList.toggle("absolute",this.absoluteMode)})),atom.config.observe("minimap.adjustAbsoluteModeHeight",(e=>{this.adjustAbsoluteModeHeight=e,this.classList.toggle("adjust-absolute-height",this.adjustAbsoluteModeHeight),this.attached&&this.measureHeightAndWidth()})),atom.config.observe("minimap.ignoreWhitespacesInTokens",(e=>{this.ignoreWhitespacesInTokens=e,this.attached&&this.requestForcedUpdate()})),atom.config.observe("editor.preferredLineLength",(()=>{this.attached&&this.measureHeightAndWidth()})),atom.config.observe("editor.softWrap",(()=>{this.attached&&this.requestUpdate()})),atom.config.observe("editor.showInvisibles",(()=>{this.attached&&this.requestUpdate()})),atom.config.observe("editor.invisibles",(()=>{this.attached&&this.requestUpdate()})),atom.config.observe("editor.softWrapAtPreferredLineLength",(()=>{this.attached&&this.requestUpdate()})))}connectedCallback(){if("function"==typeof atom.views.pollDocument)this.subscriptions.add(atom.views.pollDocument((()=>{this.pollDOM()})));else{this.intersectionObserver=new IntersectionObserver((e=>{const{intersectionRect:t}=e[e.length-1];(t.width>0||t.height>0)&&this.measureHeightAndWidth(!0,!0)})),this.intersectionObserver.observe(this),this.isVisible()&&this.measureHeightAndWidth(!0,!0);const e=()=>{this.measureHeightAndWidth(!1,!1)};Be.listenTo(this,e),window.addEventListener("resize",e,{passive:!0}),this.subscriptions.add(new le.Disposable((()=>{Be.removeListener(this,e)})),new le.Disposable((()=>{window.removeEventListener("resize",e)})))}this.measureHeightAndWidth(),this.updateMinimapFlexPosition(),this.attached=!0,this.attachedToTextEditor=this.queryParentSelector("atom-text-editor")===this.minimap.getTextEditorElement(),this.attachedToTextEditor&&this.minimap.getTextEditorElement().setAttribute("with-minimap",this.displayMinimapOnLeft?"left":"right"),this.subscriptions.add(this.subscribeToMediaQuery())}disconnectedCallback(){this.minimap.getTextEditorElement().removeAttribute("with-minimap"),this.attached=!1}isVisible(){return this.offsetWidth>0||this.offsetHeight>0}attach(e){if(this.attached)return;const t=e||this.minimap.getTextEditorElement(),i=t.querySelectorAll("atom-text-editor-minimap");i.length&&[].forEach.call(i,(e=>{e.destroy();try{t.removeChild(e)}catch(e){}})),t.appendChild(this)}detach(){this.attached&&null!=this.parentNode&&this.parentNode.removeChild(this)}updateMinimapFlexPosition(){this.classList.toggle("left",this.displayMinimapOnLeft),this.attachedToTextEditor&&this.minimap.getTextEditorElement().setAttribute("with-minimap",this.displayMinimapOnLeft?"left":"right")}destroy(){this.DecorationManagement.destroy(),this.quickSettingsElement&&this.quickSettingsElement.destroy(),this.subscriptions.dispose(),this.detach()}initializeContent(){this.initializeCanvas(),this.attachCanvases(this),this.createVisibleArea(),this.createControls(),this.subscriptions.add(this.subscribeTo(this,{mousewheel:e=>{!this.standAlone&&this.minimap.onMouseWheel&&this.minimap.onMouseWheel(e)}},{passive:!0}),this.subscribeTo(this.getFrontCanvas(),{mousedown:e=>{this.canvasPressed(S(e))},touchstart:e=>{this.canvasPressed(w(e))}},{passive:!0}))}createVisibleArea(){this.visibleArea||(this.visibleArea=document.createElement("div"),this.visibleArea.classList.add("minimap-visible-area"),this.appendChild(this.visibleArea),this.visibleAreaSubscription=this.subscribeTo(this.visibleArea,{mousedown:e=>{this.startDrag(S(e))},touchstart:e=>{this.startDrag(w(e))}},{passive:!0}),this.subscriptions.add(this.visibleAreaSubscription))}removeVisibleArea(){this.visibleArea&&(this.subscriptions.remove(this.visibleAreaSubscription),this.visibleAreaSubscription.dispose(),this.removeChild(this.visibleArea),delete this.visibleArea)}createControls(){this.controls||this.standAlone||(this.controls=document.createElement("div"),this.controls.classList.add("minimap-controls"),this.appendChild(this.controls))}removeControls(){this.controls&&(this.removeChild(this.controls),delete this.controls)}initializeScrollIndicator(){this.scrollIndicator||this.standAlone||(this.scrollIndicator=document.createElement("div"),this.scrollIndicator.classList.add("minimap-scroll-indicator"),this.controls.appendChild(this.scrollIndicator))}disposeScrollIndicator(){this.scrollIndicator&&(this.controls.removeChild(this.scrollIndicator),delete this.scrollIndicator)}initializeOpenQuickSettings(){this.openQuickSettings||this.standAlone||(this.openQuickSettings=document.createElement("div"),this.openQuickSettings.classList.add("open-minimap-quick-settings"),this.controls.appendChild(this.openQuickSettings),this.openQuickSettingSubscription=this.subscribeTo(this.openQuickSettings,{mousedown:e=>{if(e.preventDefault(),e.stopPropagation(),null!=this.quickSettingsElement)this.quickSettingsElement.destroy(),this.quickSettingsSubscription.dispose();else{this.quickSettingsElement=(()=>{const e=document.createElement("minimap-quick-settings");return e.createdCallback(),e})(),this.quickSettingsElement.setModel(this),this.quickSettingsSubscription=this.quickSettingsElement.onDidDestroy((()=>{this.quickSettingsElement=null}));const{top:e,left:t,right:i}=this.getFrontCanvas().getBoundingClientRect();this.quickSettingsElement.style.top=e+"px",this.quickSettingsElement.attach(),this.quickSettingsElement.style.left=this.displayMinimapOnLeft?i+"px":t-this.quickSettingsElement.clientWidth+"px"}}}))}disposeOpenQuickSettings(){this.openQuickSettings&&(this.controls.removeChild(this.openQuickSettings),this.openQuickSettingSubscription.dispose(),delete this.openQuickSettings)}getDecorationManagement(){return this.DecorationManagement}getModel(){return this.minimap}setModel(e){return this.minimap=e,this.minimap.minimapElement=this,this.DecorationManagement.initializeDecorations(this.minimap),this.subscriptions.add(this.minimap.onDidChangeScrollTop((()=>{this.requestUpdate()})),this.minimap.onDidChangeScrollLeft((()=>{this.requestUpdate()})),this.minimap.onDidDestroy((()=>{this.destroy()})),this.minimap.onDidChangeConfig((()=>{if(this.attached)return this.requestForcedUpdate()})),this.minimap.onDidChangeStandAlone((()=>{this.setStandAlone(this.minimap.isStandAlone()),this.requestUpdate()})),this.minimap.onDidChange((e=>{this.pendingChanges.push(e),this.requestUpdate()})),this.DecorationManagement.onDidChangeDecorationRange((e=>{const{type:t}=e;"line"===t||"highlight-under"===t||"background-custom"===t?this.pendingBackDecorationChanges.push(e):this.pendingFrontDecorationChanges.push(e),this.requestUpdate()})),K((()=>{this.requestForcedUpdate()}))),this.setStandAlone(this.minimap.isStandAlone()),null!=this.width&&null!=this.height&&this.minimap.setScreenHeightAndWidth(this.height,this.width),this.minimap}setStandAlone(e){this.standAlone=e,this.standAlone?(this.setAttribute("stand-alone",!0),this.disposeScrollIndicator(),this.disposeOpenQuickSettings(),this.removeControls(),this.removeVisibleArea()):(this.removeAttribute("stand-alone"),this.createVisibleArea(),this.createControls(),this.minimapScrollIndicator&&this.initializeScrollIndicator(),this.displayPluginsControls&&this.initializeOpenQuickSettings())}requestUpdate(){this.frameRequested||(this.frameRequested=!0,requestAnimationFrame((()=>{this.update(),this.frameRequested=!1})))}requestForcedUpdate(){this.offscreenFirstRow=null,this.offscreenLastRow=null,this.requestUpdate()}update(){if(!(this.attached&&this.isVisible()&&this.minimap))return;const e=this.minimap;e.enableCache();const t=this.getFrontCanvas(),i=this.minimap.getDevicePixelRatio(),n=e.getTextEditorScaledScrollLeft(),s=e.getTextEditorScaledScrollTop()-e.getScrollTop(),o=Math.min(t.width/i,this.width),r=o+n;this.adjustToSoftWrap&&this.flexBasis?(this.style.flexBasis=this.flexBasis+"px",this.style.width=this.flexBasis+"px"):(this.style.flexBasis=null,this.style.width=null),x(this.visibleArea,{width:Math.round(r)+"px",height:Math.round(e.getTextEditorScaledHeight())+"px",transform:E(0,s,this.useHardwareAcceleration),"border-left-width":Math.round(n)+"px"}),x(this.controls,{width:Math.round(o)+"px"});const a=e.getFirstVisibleScreenRow()*e.getLineHeight()-e.getScrollTop();if(this.smoothScrolling){let e=E(0,a,this.useHardwareAcceleration);if(1!==i){const t=1/i;e+=" "+C(t,t,this.useHardwareAcceleration)}x(this.backLayer.canvas,{transform:e}),x(this.tokensLayer.canvas,{transform:e}),x(this.frontLayer.canvas,{transform:e})}else{const e=1/i,t=C(e,e,this.useHardwareAcceleration);x(this.backLayer.canvas,{transform:t}),x(this.tokensLayer.canvas,{transform:t}),x(this.frontLayer.canvas,{transform:t})}if(this.minimapScrollIndicator&&!this.scrollIndicator&&e.canScroll()&&this.initializeScrollIndicator(),null!=this.scrollIndicator){const t=e.getScreenHeight(),i=t*(t/e.getHeight()),n=(t-i)*e.getScrollRatio();x(this.scrollIndicator,{height:i+"px",transform:E(0,n,this.useHardwareAcceleration)}),e.canScroll()||this.disposeScrollIndicator()}this.absoluteMode&&this.adjustAbsoluteModeHeight&&this.updateCanvasesSize(),this.updateCanvas(),e.clearCache()}setDisplayCodeHighlights(e){this.displayCodeHighlights=e,this.attached&&this.requestForcedUpdate()}pollDOM(){const e=this.checkForVisibilityChange();this.isVisible()&&(this.wasVisible||this.requestForcedUpdate(),this.measureHeightAndWidth(e,!1))}checkForVisibilityChange(){return this.isVisible()?!this.wasVisible&&(this.wasVisible=!0,this.wasVisible):this.wasVisible?(this.wasVisible=!1,!0):(this.wasVisible=!1,this.wasVisible)}measureHeightAndWidth(e,t=!0){if(!this.minimap)return;const i=this.style.flexBasis;this.style.flexBasis="";const n=this.width!==this.clientWidth||this.height!==this.clientHeight;this.height=this.clientHeight,this.width=this.clientWidth;let s=this.width;if(null!=this.minimap&&this.minimap.setScreenHeightAndWidth(this.height,this.width),(n||e||t)&&this.requestForcedUpdate(),this.isVisible())if(n||t){if(this.adjustToSoftWrap){const e=atom.config.get("editor.preferredLineLength"),t=atom.config.get("editor.softWrap"),i=atom.config.get("editor.softWrapAtPreferredLineLength"),n=e*this.minimap.getCharWidth();!(t&&i&&e)||n>this.width&&this.adjustOnlyIfSmaller?delete this.flexBasis:(this.flexBasis=n,s=n)}else delete this.flexBasis;this.updateCanvasesSize(s)}else this.style.flexBasis=i}updateCanvasesSize(e){const t=this.minimap.getDevicePixelRatio(),i=this.height+this.minimap.getLineHeight(),n=this.absoluteMode&&this.adjustAbsoluteModeHeight?Math.min(this.minimap.getHeight(),i):i,s=this.getFrontCanvas();null==e&&(e=s.width/t),e===s.width&&n===s.height||(this.setCanvasesSize(e*t,n*t),this.absoluteMode&&this.adjustAbsoluteModeHeight&&(this.offscreenFirstRow=null,this.offscreenLastRow=null))}canvasPressed({y:e,isLeftMouse:t,isMiddleMouse:i}){if(!this.minimap.isStandAlone())if(t)this.canvasLeftMousePressed(e);else if(i){this.canvasMiddleMousePressed(e);const{top:t,height:i}=this.visibleArea.getBoundingClientRect();this.startDrag({y:t+i/2,isLeftMouse:!1,isMiddleMouse:!0})}}canvasLeftMousePressed(e){const t=e-this.getBoundingClientRect().top,i=Math.floor(t/this.minimap.getLineHeight())+this.minimap.getFirstVisibleScreenRow(),n=this.minimap.getTextEditor(),s=this.minimap.getTextEditorElement(),o=i*n.getLineHeightInPixels()-this.minimap.getTextEditorHeight()/2,r=s.pixelPositionForScreenPosition([i,0]).top-this.minimap.getTextEditorHeight()/2;if(atom.config.get("minimap.moveCursorOnMinimapClick")&&n.setCursorScreenPosition([i,0]),atom.config.get("minimap.scrollAnimation")){const e=atom.config.get("minimap.scrollAnimationDuration"),t=this.minimap.scrollIndependentlyOnMouseWheel(),i=this.minimap.getTextEditorScrollTop(),n=r;let s;if(t){const t=this.minimap.getScrollTop(),r=Math.min(1,o/(this.minimap.getTextEditorMaxScrollTop()||1))*this.minimap.getMaxScrollTop();s=(e,i)=>{null!==this.minimap&&(this.minimap.setTextEditorScrollTop(e,!0),this.minimap.setScrollTop(t+(r-t)*i))},M({from:i,to:n,duration:e,step:s})}else s=e=>{null!==this.minimap&&this.minimap.setTextEditorScrollTop(e)},M({from:i,to:n,duration:e,step:s})}else this.minimap.setTextEditorScrollTop(r)}canvasMiddleMousePressed(e){const{top:t}=this.getBoundingClientRect(),i=(e-t-this.minimap.getTextEditorScaledHeight()/2)/(this.minimap.getVisibleHeight()-this.minimap.getTextEditorScaledHeight());this.minimap.setTextEditorScrollTop(i*this.minimap.getTextEditorMaxScrollTop())}subscribeToMediaQuery(){const e=window.matchMedia("screen and (-webkit-min-device-pixel-ratio: 1.5)"),t=()=>{this.requestForcedUpdate()};return e.addEventListener("change",t),new le.Disposable((()=>{e.removeEventListener("change",t)}))}startDrag({y:e,isLeftMouse:t,isMiddleMouse:i}){if(!this.minimap)return;if(!t&&!i)return;const n={dragOffset:e-this.visibleArea.getBoundingClientRect().top,offsetTop:this.getBoundingClientRect().top},s=e=>this.drag(S(e),n),o=()=>this.endDrag(),r=e=>this.drag(w(e),n);document.body.addEventListener("mousemove",s,{passive:!0}),document.body.addEventListener("mouseup",o,{passive:!0}),document.body.addEventListener("mouseleave",o,{passive:!0}),document.body.addEventListener("touchmove",r,{passive:!0}),document.body.addEventListener("touchend",o,{passive:!0}),document.body.addEventListener("touchcancel",o,{passive:!0}),this.dragSubscription=new le.Disposable((()=>{document.body.removeEventListener("mousemove",s),document.body.removeEventListener("mouseup",o),document.body.removeEventListener("mouseleave",o),document.body.removeEventListener("touchmove",r),document.body.removeEventListener("touchend",o),document.body.removeEventListener("touchcancel",o)}))}drag({y:e,isLeftMouse:t,isMiddleMouse:i},n){if(!this.minimap)return;if(!t&&!i)return;const s=(e-n.offsetTop-n.dragOffset)/(this.minimap.getVisibleHeight()-this.minimap.getTextEditorScaledHeight());this.minimap.setTextEditorScrollTop(s*this.minimap.getTextEditorMaxScrollTop())}endDrag(){this.minimap&&this.dragSubscription.dispose()}}qe.initClass();class ze{constructor(e){this.textEditor=e,this.textEditorElement=atom.views.getView(this.textEditor)}enableCache(){this.useCache=!0}clearCache(){this.useCache=!1,delete this.heightCache,delete this.scrollTopCache,delete this.scrollLeftCache,delete this.maxScrollTopCache}onDidChangeScrollTop(e){return this.textEditorElement.onDidChangeScrollTop(e)}onDidChangeScrollLeft(e){return this.textEditorElement.onDidChangeScrollLeft(e)}getHeight(){return this.editorDestroyed()?0:this.useCache?(this.heightCache||(this.heightCache=this.textEditorElement.getHeight()),this.heightCache):this.textEditorElement.getHeight()}getScrollTop(){return this.editorDestroyed()?0:this.useCache?(this.scrollTopCache||(this.scrollTopCache=this.computeScrollTop()),this.scrollTopCache):this.computeScrollTop()}computeScrollTop(){if(this.editorDestroyed())return 0;const e=this.textEditorElement.getScrollTop(),t=this.textEditor.getLineHeightInPixels();let i=this.textEditorElement.getFirstVisibleScreenRow();if(Number.isNaN(i))return 0;let n=this.textEditorElement.pixelPositionForScreenPosition([i,0]).top;return n>e&&(i-=1,n=this.textEditorElement.pixelPositionForScreenPosition([i,0]).top),i*t+Math.min(e-n,t)}setScrollTop(e){this.editorDestroyed()||this.textEditorElement.setScrollTop(e)}getScrollLeft(){return this.editorDestroyed()?0:this.useCache?(this.scrollLeftCache||(this.scrollLeftCache=this.textEditorElement.getScrollLeft()),this.scrollLeftCache):this.textEditorElement.getScrollLeft()}getMaxScrollTop(){if(this.editorDestroyed())return 0;if(null!=this.maxScrollTopCache&&this.useCache)return this.maxScrollTopCache;let e;if(this.textEditorElement.getMaxScrollTop){if(e=this.textEditorElement.getMaxScrollTop(),parseFloat(atom.getVersion())>=1.13&&this.scrollPastEnd){const t=this.textEditor.getLineHeightInPixels();e-=this.getHeight()-3*t}}else if(e=this.textEditorElement.getScrollHeight()-this.getHeight(),this.scrollPastEnd){const t=this.textEditor.getLineHeightInPixels();e-=this.getHeight()-3*t}return this.useCache&&(this.maxScrollTopCache=e),e}editorDestroyed(){return!this.textEditor||this.textEditor.isDestroyed()||!this.textEditorElement.component||!this.textEditorElement.getModel()||!this.textEditorElement.parentNode}}let Ue=1;const Ve=new le.Disposable;Ve.dispose();const $e=new Ae({onDidDestroy(){return Ve},getScreenRange(){return new Range}},null,{});class Qe{constructor(e={}){if(!e.textEditor)throw Error("Cannot create a minimap without an editor");this.minimapElement=void 0,this.DecorationManagement=void 0,this.textEditor=e.textEditor,this.editorElement=void 0,this.standAlone=e.standAlone,this.width=e.width,this.height=e.height,this.id=Ue++,this.emitter=new le.Emitter,this.subscriptions=new le.CompositeDisposable,this.adapter=null,this.charHeight=null,this.configCharHeight=null,this.charWidth=null,this.configCharWidth=null,this.interline=null,this.configInterline=null,this.devicePixelRatioRounding=null,this.configDevicePixelRatioRounding=null,this.redrawDelay=0,this.destroyed=!1,this.scrollPastEnd=!1,this.pendingChangeEvents=[],this.flushChangesTimer=null,null!=atom.views.getView(this.textEditor).getScrollTop&&(this.adapter=new ze(this.textEditor)),this.scrollTop=0;let t=this.subscribeToConfig();this.subscriptions.add(t,this.textEditor.onDidChangeGrammar((()=>{this.subscriptions.remove(t),t.dispose(),t=this.subscribeToConfig(),this.subscriptions.add(t)})),this.adapter.onDidChangeScrollTop((()=>{this.standAlone||this.ignoreTextEditorScroll||this.inChangeScrollTop||(this.inChangeScrollTop=!0,this.updateScrollTop(),this.emitter.emit("did-change-scroll-top",this),this.inChangeScrollTop=!1),this.ignoreTextEditorScroll&&(this.ignoreTextEditorScroll=!1)})),this.adapter.onDidChangeScrollLeft((()=>{this.standAlone||this.emitter.emit("did-change-scroll-left",this)})),this.textEditor.onDidChange((e=>{this.scheduleChanges(e)})),this.textEditor.onDidDestroy((()=>{nt&&nt.delete(this.textEditor),this.destroy()})),this.textEditor.onDidTokenize((()=>{this.emitter.emit("did-change-config")})))}destroy(){this.destroyed||(clearTimeout(this.flushChangesTimer),this.pendingChangeEvents=[],this.subscriptions.dispose(),this.emitter.emit("did-destroy"),this.emitter.dispose(),this.destroyed=!0)}isDestroyed(){return this.destroyed}scheduleChanges(e){this.pendingChangeEvents=this.pendingChangeEvents.concat(e),this.redrawDelay||this.requestFlushChanges(),this.flushChangesTimer||(this.flushChangesTimer=setTimeout((()=>{this.requestFlushChanges()}),this.redrawDelay))}flushChanges(){clearTimeout(this.flushChangesTimer),this.flushChangesTimer=null,this.emitChanges(this.pendingChangeEvents),this.pendingChangeEvents=[]}requestFlushChanges(){this.requestedFlushChanges||(this.requestedFlushChanges=requestAnimationFrame((()=>{this.flushChanges(),this.requestedFlushChanges&&(cancelAnimationFrame(this.requestedFlushChanges),this.requestedFlushChanges=null)})))}onDidChange(e){return this.emitter.on("did-change",e)}onDidChangeConfig(e){return this.emitter.on("did-change-config",e)}onDidChangeScrollTop(e){return this.emitter.on("did-change-scroll-top",e)}onDidChangeScrollLeft(e){return this.emitter.on("did-change-scroll-left",e)}onDidChangeStandAlone(e){return this.emitter.on("did-change-stand-alone",e)}onDidDestroy(e){return this.emitter.on("did-destroy",e)}subscribeToConfig(){const e=new le.CompositeDisposable,t={scope:this.textEditor.getRootScopeDescriptor()};return e.add(atom.config.observe("editor.scrollPastEnd",t,(e=>{this.scrollPastEnd=e,this.adapter.scrollPastEnd=this.scrollPastEnd,this.emitter.emit("did-change-config")})),atom.config.observe("minimap.charHeight",t,(e=>{this.configCharHeight=e,this.updateScrollTop(),this.emitter.emit("did-change-config")})),atom.config.observe("minimap.charWidth",t,(e=>{this.configCharWidth=e,this.updateScrollTop(),this.emitter.emit("did-change-config")})),atom.config.observe("minimap.interline",t,(e=>{this.configInterline=e,this.updateScrollTop(),this.emitter.emit("did-change-config")})),atom.config.observe("minimap.independentMinimapScroll",t,(e=>{this.independentMinimapScroll=e,this.updateScrollTop()})),atom.config.observe("minimap.scrollSensitivity",t,(e=>{this.scrollSensitivity=e})),atom.config.observe("minimap.redrawDelay",t,(e=>{this.redrawDelay=e})),atom.config.observe("minimap.devicePixelRatioRounding",t,(e=>{this.configDevicePixelRatioRounding=e,this.updateScrollTop(),this.emitter.emit("did-change-config")}))),e}isStandAlone(){return this.standAlone}setStandAlone(e){e!==this.standAlone&&(this.standAlone=e,this.emitter.emit("did-change-stand-alone",this))}getMinimapElement(){return this.minimapElement}getTextEditor(){return this.textEditor}getTextEditorElement(){return this.editorElement||(this.editorElement=atom.views.getView(this.getTextEditor())),this.editorElement}getTextEditorScaledHeight(){return this.adapter.getHeight()*this.getVerticalScaleFactor()}getTextEditorScaledScrollTop(){return this.adapter.getScrollTop()*this.getVerticalScaleFactor()}getTextEditorScaledScrollLeft(){return this.adapter.getScrollLeft()*this.getHorizontalScaleFactor()}getTextEditorMaxScrollTop(){return this.adapter.getMaxScrollTop()}getTextEditorScrollTop(){return this.adapter.getScrollTop()}setTextEditorScrollTop(e,t=!1){this.ignoreTextEditorScroll=t,this.adapter.setScrollTop(e)}getTextEditorScrollLeft(){return this.adapter.getScrollLeft()}getTextEditorHeight(){return this.adapter.getHeight()}getTextEditorScrollRatio(){return this.adapter.getScrollTop()/(this.getTextEditorMaxScrollTop()||1)}getCapedTextEditorScrollRatio(){return Math.min(1,this.getTextEditorScrollRatio())}getHeight(){return this.textEditor.getScreenLineCount()*this.getLineHeight()}getWidth(){return this.textEditor.getMaxScreenLineLength()*this.getCharWidth()}getVisibleHeight(){return Math.min(this.getScreenHeight(),this.getHeight())}getScreenHeight(){return this.isStandAlone()?null!=this.height?this.height:this.getHeight():this.adapter.getHeight()}getVisibleWidth(){return Math.min(this.getScreenWidth(),this.getWidth())}getScreenWidth(){return this.isStandAlone()&&null!=this.width?this.width:this.getWidth()}setScreenHeightAndWidth(e,t){this.width===t&&this.height===e||(this.height=e,this.width=t,this.updateScrollTop())}getVerticalScaleFactor(){return this.getLineHeight()/this.textEditor.getLineHeightInPixels()}getHorizontalScaleFactor(){return this.getCharWidth()/this.textEditor.getDefaultCharWidth()}getLineHeight(){return this.getCharHeight()+this.getInterline()}getCharWidth(){return null!=this.charWidth?this.charWidth:this.configCharWidth}setCharWidth(e){this.charWidth=Math.floor(e),this.emitter.emit("did-change-config")}getCharHeight(){return null!=this.charHeight?this.charHeight:this.configCharHeight}setCharHeight(e){this.charHeight=Math.floor(e),this.emitter.emit("did-change-config")}getInterline(){return null!=this.interline?this.interline:this.configInterline}setInterline(e){this.interline=Math.floor(e),this.emitter.emit("did-change-config")}getDevicePixelRatioRounding(){return null!=this.devicePixelRatioRounding?this.devicePixelRatioRounding:this.configDevicePixelRatioRounding}setDevicePixelRatioRounding(e){this.devicePixelRatioRounding=e,this.emitter.emit("did-change-config")}getDevicePixelRatio(){return this.getDevicePixelRatioRounding()?1>devicePixelRatio?Math.max(Math.round(10*devicePixelRatio)/10,.1):Math.round(devicePixelRatio):devicePixelRatio}getFirstVisibleScreenRow(){return Math.floor(this.getScrollTop()/this.getLineHeight())}getLastVisibleScreenRow(){return Math.ceil((this.getScrollTop()+this.getScreenHeight())/this.getLineHeight())}scrollIndependentlyOnMouseWheel(){return this.independentMinimapScroll}getScrollTop(){return this.standAlone||this.independentMinimapScroll?this.scrollTop:this.getScrollTopFromEditor()}setScrollTop(e){this.scrollTop=Math.max(0,Math.min(this.getMaxScrollTop(),e)),(this.standAlone||this.independentMinimapScroll)&&this.emitter.emit("did-change-scroll-top",this)}getScrollRatio(){return this.getScrollTop()/this.getMaxScrollTop()}updateScrollTop(){if(this.independentMinimapScroll){try{this.setScrollTop(this.getScrollTopFromEditor())}catch(e){}this.emitter.emit("did-change-scroll-top",this)}}getScrollTopFromEditor(){return Math.abs(this.getCapedTextEditorScrollRatio()*this.getMaxScrollTop())}getMaxScrollTop(){return Math.max(0,this.getHeight()-this.getScreenHeight())}canScroll(){return this.getMaxScrollTop()>0}onMouseWheel(e){if(this.scrollIndependentlyOnMouseWheel()){if(e.stopPropagation(),!this.canScroll())return;const{wheelDeltaY:t}=e,i=this.getScrollTop();this.setScrollTop(i-Math.round(t*this.scrollSensitivity))}}getMarker(e){return this.textEditor.getMarker(e)}findMarkers(e){try{return this.textEditor.findMarkers(e)}catch(e){return[]}}markBufferRange(e){return this.textEditor.markBufferRange(e)}emitChanges(e){this.emitter.emit("did-change",e)}enableCache(){this.adapter.enableCache()}clearCache(){this.adapter.clearCache()}editorDestroyed(){this.adapter.editorDestroyed()}getDecorationManagement(){var e;return this.DecorationManagement||(null===(e=this.minimapElement)||void 0===e?void 0:e.DecorationManagement)&&(this.DecorationManagement=this.minimapElement.DecorationManagement),this.DecorationManagement}getDecorations(){var e,t;return null!==(t=null===(e=this.getDecorationManagement())||void 0===e?void 0:e.getDecorations())&&void 0!==t?t:[]}onDidAddDecoration(...e){var t,i;return null!==(i=null===(t=this.getDecorationManagement())||void 0===t?void 0:t.onDidAddDecoration(...e))&&void 0!==i?i:Ve}onDidRemoveDecoration(...e){var t,i;return null!==(i=null===(t=this.getDecorationManagement())||void 0===t?void 0:t.onDidRemoveDecoration(...e))&&void 0!==i?i:Ve}onDidChangeDecorationRange(...e){var t,i;return null!==(i=null===(t=this.getDecorationManagement())||void 0===t?void 0:t.onDidChangeDecorationRange(...e))&&void 0!==i?i:Ve}onDidUpdateDecoration(...e){var t,i;return null!==(i=null===(t=this.getDecorationManagement())||void 0===t?void 0:t.onDidUpdateDecoration(...e))&&void 0!==i?i:Ve}decorationForId(...e){var t,i;return null!==(i=null===(t=this.getDecorationManagement())||void 0===t?void 0:t.decorationForId(...e))&&void 0!==i?i:$e}decorationsForScreenRowRange(...e){var t,i;return null!==(i=null===(t=this.getDecorationManagement())||void 0===t?void 0:t.decorationsForScreenRowRange(...e))&&void 0!==i?i:$e}decorationsByTypeThenRows(){var e,t;return null!==(t=null===(e=this.getDecorationManagement())||void 0===e?void 0:e.decorationsByTypeThenRows())&&void 0!==t?t:$e}decorateMarker(...e){var t,i;return null!==(i=null===(t=this.getDecorationManagement())||void 0===t?void 0:t.decorateMarker(...e))&&void 0!==i?i:$e}removeDecoration(...e){var t;return null===(t=this.getDecorationManagement())||void 0===t?void 0:t.removeDecoration(...e)}removeAllDecorationsForMarker(...e){var t;return null===(t=this.getDecorationManagement())||void 0===t?void 0:t.removeAllDecorationsForMarker(...e)}removeAllDecorations(){var e;return null===(e=this.getDecorationManagement())||void 0===e?void 0:e.removeAllDecorations()}}var Ge={};Ge=JSON.parse('{"plugins":{"type":"object","properties":{}},"autoToggle":{"title":"Show Minimap On Atom Start","type":"boolean","default":true,"order":1},"displayMinimapOnLeft":{"type":"boolean","default":false,"order":2},"displayCodeHighlights":{"type":"boolean","default":true,"description":"Toggles the render of the buffer tokens in the minimap.","order":3},"displayPluginsControls":{"type":"boolean","default":true,"description":"You need to restart Atom for this setting to be effective.","order":4},"minimapScrollIndicator":{"type":"boolean","default":true,"description":"Toggles the display of a side line showing which part of the buffer is currently displayed by the minimap. This side line will only appear if the minimap is taller than the editor view height.","order":5},"adjustMinimapWidthToSoftWrap":{"type":"boolean","default":true,"description":"If this option is enabled and Soft Wrap is checked then the Minimap max width is set to the Preferred Line Length value.","order":6},"adjustMinimapWidthOnlyIfSmaller":{"type":"boolean","default":true,"description":"If this option and `adjustMinimapWidthToSoftWrap` are enabled the minimap width will never go past the limit sets by CSS. On the other hand, when disabled the minimap will expand to honor the preferred line width.","order":7},"ignoreWhitespacesInTokens":{"type":"boolean","default":false,"description":"When enabled, text editor tokens are rendered as plain blocks, with no regards to the whitespaces they contains.","order":8},"charWidth":{"type":"number","default":1,"minimum":0.5,"order":9},"charHeight":{"type":"number","default":2,"minimum":0.5,"order":10},"interline":{"type":"number","default":1,"minimum":0,"description":"The space between lines in the minimap in pixels.","order":11},"textOpacity":{"type":"number","default":0.6,"minimum":0,"maximum":1,"description":"The opacity used to render the line\'s text in the minimap.","order":12},"moveCursorOnMinimapClick":{"type":"boolean","default":false,"description":"Moves the cursor to the beginning of the target line when clicking on the minimap","order":13},"independentMinimapScroll":{"type":"boolean","title":"Independent Minimap Scroll On Mouse Wheel Events","default":false,"description":"When enabled, using the mouse wheel over the Minimap will make it scroll independently of the text editor. The Minimap will still sync with the editor whenever the editor is scrolled, but it will no longer relay the mouse wheel events to the editor.","order":14},"scrollSensitivity":{"type":"number","default":0.5,"description":"The scrolling speed when the `Independent Minimap Scroll On Mouse Wheel Events` setting is enabled.","order":15},"smoothScrolling":{"type":"boolean","default":false,"description":"Whether to offset the minimap canvas when scrolling to keep the scroll smooth. When `true` the minimap canvas will be offseted, resulting in a smoother scroll, but with the side-effect of a blurry minimap when the canvas is placed between pixels. When `false` the canvas will always stay at the same position, and will never look blurry, but the scroll will appear more jagged.","order":16},"createPluginInDevMode":{"type":"boolean","default":false,"order":17},"absoluteMode":{"type":"boolean","default":false,"description":"When enabled the text editor content will be able to flow below the minimap.","order":18},"adjustAbsoluteModeHeight":{"type":"boolean","default":false,"description":"When enabled and `Absolute Mode` is also enabled, the minimap height will be adjusted to only take the space required by the text editor content, leaving the space below triggering mouse events on the text editor. **Be aware this can have some impact on performances as the minimap canvases will be resized every time a change in the editor make its height change.**","order":19},"redrawDelay":{"type":"number","default":400,"minimum":0,"maximum":2000,"description":"Controls how often (in ms) the minimap should redraw itself after changing the text editor\'s contents. Setting this to 100ms or higher could dramatically improve editor responsiveness when working with large files. A value of 0 will cause the minimap to redraw itself immediately on each change.","order":20},"devicePixelRatioRounding":{"type":"boolean","default":true,"description":"Toggles the rounding of the devicePixelRatio in the minimap.","order":21},"useHardwareAcceleration":{"type":"boolean","default":true,"order":22},"scrollAnimation":{"type":"boolean","default":false,"description":"Enables animations when scrolling by clicking on the minimap.","order":23},"scrollAnimationDuration":{"type":"integer","default":300,"description":"The duration of scrolling animations when clicking on the minimap.","order":24},"maxTokensInOneLine":{"type":"integer","default":160,"description":"The maximum number of tokens that are rendered for each line.","order":25}}');var Ze={};e(Ze,"registerPlugin",(()=>T)),e(Ze,"activatePlugin",(()=>P)),e(Ze,"unregisterPlugin",(()=>k)),e(Ze,"deactivateAllPlugins",(()=>A)),e(Ze,"getPluginsOrder",(()=>H)),e(Ze,"togglePluginActivation",(()=>L)),e(Ze,"deactivatePlugin",(()=>I)),e(Ze,"plugins",(()=>Ke));const Ke={},Ye={},Xe={};var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.StyleReader=void 0,Je.StyleReader=class{constructor(){this.domStylesCache=new Map,this.dummyNode=void 0,this.targetNode=void 0}retrieveStyleFromDom(e,t,i,n=!0){if(0===e.length)return"";const s=e.join(" ");let o=this.domStylesCache.get(s);if(void 0!==o){if(n){const e=o[t];if(void 0!==e)return e}}else o={};this.ensureDummyNodeExistence(i);const r=this.dummyNode;let a=r;for(let t=0,i=e.length;i>t;t++){const i=e[t],n=document.createElement("span");n.className=i.replace(et," "),a.appendChild(n),a=n}const l=window.getComputedStyle(a);let d=l.getPropertyValue(t);const h=l.getPropertyValue("-webkit-filter");return h.includes("hue-rotate")&&(d=((e,t)=>{const i=e.match(/rgb(a?)\((\d+), (\d+), (\d+)(, (\d+(\.\d+)?))?\)/);if(null===i)return"";const[,,n,s,o,,r]=i,a=t.match(/hue-rotate\((-?\d+)deg\)/);if(null===a)return"";const[,l]=a;let[d,h,c,u,p]=[n,s,o,r,l].map(Number);return[d,h,c]=((e,t,i,n)=>{const s=[1,0,0,0,1,0,0,0,1],o=.2126,r=.7152,a=.0722,l=Math.cos(n*Math.PI/180),d=Math.sin(n*Math.PI/180);return s[0]=o+.7874*l-o*d,s[1]=r-r*l-r*d,s[2]=a-a*l+.9278*d,s[3]=o-o*l+.143*d,s[4]=r+(1-r)*l+.14*d,s[5]=a-a*l-.283*d,s[6]=o-o*l-.7874*d,s[7]=r-r*l+r*d,s[8]=a+.9278*l+a*d,[_(s[0]*e+s[1]*t+s[2]*i),_(s[3]*e+s[4]*t+s[5]*i),_(s[6]*e+s[7]*t+s[8]*i)]})(d,h,c,p),isNaN(u)?`rgb(${d}, ${h}, ${c})`:`rgba(${d}, ${h}, ${c}, ${u})`})(d,h)),""!==d&&(o[t]=d,this.domStylesCache.set(s,o)),r.innerHTML="",d}ensureDummyNodeExistence(e){this.targetNode===e&&void 0!==this.dummyNode||(this.dummyNode=document.createElement("span"),this.dummyNode.style.visibility="hidden",e.appendChild(this.dummyNode),this.targetNode=e)}invalidateDOMStylesCache(){this.domStylesCache.clear()}};const et=/\.+/g;ke=pe("bNORb");let tt=!1,it=!1,nt=null,st=null,ot=null;const rt=new le.Emitter;let at=null;pe.register("05azp",((e,t)=>{e.exports=Promise.resolve(require("./minimap-plugin-generator-element.68264bbd.js")).then((()=>pe("7DGKC")))}));const lt={minimapViewProvider:F,getConfigSchema:j,onDidActivate:z,onDidDeactivate:U,onDidCreateMinimap:V,onDidAddPlugin:$,onDidRemovePlugin:Q,onDidActivatePlugin:G,onDidDeactivatePlugin:Z,onDidChangePluginOrder:K,minimapClass:Y,minimapForEditorElement:X,minimapForEditor:J,standAloneMinimapForEditor:ee,getActiveMinimap:te,observeMinimaps:ie,registerPlugin:T,unregisterPlugin:k,togglePluginActivation:L,deactivateAllPlugins:A,activatePlugin:P,deactivatePlugin:I,getPluginsOrder:H};var dt,ht;dt=module.exports,Object.keys(ht=Ze).forEach((e=>{"default"!==e&&"__esModule"!==e&&Object.defineProperty(dt,e,{enumerable:!0,get:()=>ht[e]})})); +var $cz7Pu$atom = require("atom"); +var $cz7Pu$path = require("path"); + + + var $parcel$global = globalThis; + +function $parcel$export(e, n, v, s) { + Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true}); +} + +function $parcel$exportWildcard(dest, source) { + Object.keys(source).forEach(function(key) { + if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) { + return; + } + + Object.defineProperty(dest, key, { + enumerable: true, + get: function get() { + return source[key]; + } + }); + }); + + return dest; +} + +function $parcel$interopDefault(a) { + return a && a.__esModule ? a.default : a; +} + +var $parcel$modules = {}; +var $parcel$inits = {}; + +var parcelRequire = $parcel$global["parcelRequire7d67"]; + +if (parcelRequire == null) { + parcelRequire = function(id) { + if (id in $parcel$modules) { + return $parcel$modules[id].exports; + } + if (id in $parcel$inits) { + var init = $parcel$inits[id]; + delete $parcel$inits[id]; + var module = {id: id, exports: {}}; + $parcel$modules[id] = module; + init.call(module.exports, module, module.exports); + return module.exports; + } + var err = new Error("Cannot find module '" + id + "'"); + err.code = 'MODULE_NOT_FOUND'; + throw err; + }; + + parcelRequire.register = function register(id, init) { + $parcel$inits[id] = init; + }; + + $parcel$global["parcelRequire7d67"] = parcelRequire; +} + +var parcelRegister = parcelRequire.register; +parcelRegister("59Uvr", function(module, exports) { + +// Generated by CoffeeScript 2.5.1 +(function() { + var callbackProperties, decorateElementClass, decorateElementPrototype, deprecate; + ({ deprecate: deprecate } = (parcelRequire("ga2S3"))); + if ($parcel$global.__CUSTOM_HTML_ELEMENTS_CLASSES__ != null) { + $parcel$global.__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__ = $parcel$global.__CUSTOM_HTML_ELEMENTS_CLASSES__; + delete $parcel$global.__CUSTOM_HTML_ELEMENTS_CLASSES__; + } else if ($parcel$global.__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__ == null) $parcel$global.__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__ = {}; + callbackProperties = [ + "createdCallback", + "attachedCallback", + "detachedCallback", + "attributeChangedCallback" + ]; + decorateElementPrototype = function(target, source) { + callbackProperties.forEach(function(k) { + return Object.defineProperty(target, k, { + value: function() { + var ref; + return (ref = this[`__${k}`]) != null ? ref.apply(this, arguments) : void 0; + }, + writable: true, + enumerable: true, + configurable: true + }); + }); + return Object.getOwnPropertyNames(source).forEach(function(k) { + var descriptor; + if (k === "constructor") return; + descriptor = Object.getOwnPropertyDescriptor(source, k); + if (callbackProperties.indexOf(k) > -1) return Object.defineProperty(target, `__${k}`, descriptor); + else return Object.defineProperty(target, k, descriptor); + }); + }; + decorateElementClass = function(target, source) { + return Object.getOwnPropertyNames(source).forEach(function(k) { + var descriptor; + if (k === "length" || k === "name" || k === "arguments" || k === "caller" || k === "prototype") return; + descriptor = Object.getOwnPropertyDescriptor(source, k); + return Object.defineProperty(target, k, descriptor); + }); + }; + module.exports = function(nodeName, options) { + var elementClass, elementPrototype, klass, proto, ref; + ({ class: klass } = options); + if (klass != null) proto = klass.prototype; + else proto = (ref = options.prototype) != null ? ref : options; + if (proto === options) deprecate("Using the prototype as the second argument is deprecated, use the prototype option instead"); + if (__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__[nodeName]) { + elementClass = __ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__[nodeName]; + decorateElementPrototype(elementClass.prototype, proto); + if (klass != null) decorateElementClass(elementClass, klass); + return elementClass; + } else { + elementPrototype = Object.create(HTMLElement.prototype); + decorateElementPrototype(elementPrototype, proto); + elementClass = document.registerElement(nodeName, { + prototype: Object.create(elementPrototype) + }); + if (klass != null) decorateElementClass(elementClass, klass); + return __ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__[nodeName] = elementClass; + } + }; +}).call(module.exports); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVnaXN0ZXItb3ItdXBkYXRlLWVsZW1lbnQuanMiLCJzb3VyY2VSb290IjoiLi4iLCJzb3VyY2VzIjpbImxpYi9yZWdpc3Rlci1vci11cGRhdGUtZWxlbWVudC5jb2ZmZWUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQUEsTUFBQSxrQkFBQSxFQUFBLG9CQUFBLEVBQUEsd0JBQUEsRUFBQTs7RUFBQSxDQUFBLENBQUMsU0FBRCxDQUFBLEdBQWMsT0FBQSxDQUFRLE1BQVIsQ0FBZDs7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BlKVxuICAgIGRlY29yYXRlRWxlbWVudFByb3RvdHlwZShlbGVtZW50UHJvdG90eXBlLCBwcm90bylcblxuICAgIGVsZW1lbnRDbGFzcyA9IGRvY3VtZW50LnJlZ2lzdGVyRWxlbWVudCBub2RlTmFtZSwgcHJvdG90eXBlOiBPYmplY3QuY3JlYXRlKGVsZW1lbnRQcm90b3R5cGUpXG5cbiAgICBkZWNvcmF0ZUVsZW1lbnRDbGFzcyhlbGVtZW50Q2xhc3MsIGtsYXNzKSBpZiBrbGFzcz9cblxuICAgIF9fQVRPTV9VVElMU19DVVNUT01fRUxFTUVOVF9DTEFTU0VTX19bbm9kZU5hbWVdID0gZWxlbWVudENsYXNzXG4iXX0= + //# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/register-or-update-element.coffee + +}); +parcelRegister("ga2S3", function(module, exports) { + + +(function() { + var Deprecation, Emitter, getRawStack, grim; + Deprecation = (parcelRequire("2HutS")); + if ($parcel$global.__grim__ == null) { + Emitter = (parcelRequire("lFipj")).Emitter; + grim = $parcel$global.__grim__ = { + deprecations: {}, + emitter: new Emitter, + includeDeprecatedAPIs: true, + getDeprecations: function() { + var deprecation, deprecations, deprecationsByLineNumber, deprecationsByPackage, fileName, lineNumber, packageName, _ref; + deprecations = []; + _ref = grim.deprecations; + for(fileName in _ref){ + deprecationsByLineNumber = _ref[fileName]; + for(lineNumber in deprecationsByLineNumber){ + deprecationsByPackage = deprecationsByLineNumber[lineNumber]; + for(packageName in deprecationsByPackage){ + deprecation = deprecationsByPackage[packageName]; + deprecations.push(deprecation); + } + } + } + return deprecations; + }, + getDeprecationsLength: function() { + return this.getDeprecations().length; + }, + clearDeprecations: function() { + grim.deprecations = {}; + }, + logDeprecations: function() { + var deprecation, deprecations, _i, _len; + deprecations = this.getDeprecations(); + deprecations.sort(function(a, b) { + return b.getCallCount() - a.getCallCount(); + }); + console.warn("\nCalls to deprecated functions\n-----------------------------"); + for(_i = 0, _len = deprecations.length; _i < _len; _i++){ + deprecation = deprecations[_i]; + console.warn("(" + deprecation.getCallCount() + ") " + deprecation.getOriginName() + " : " + deprecation.getMessage(), deprecation); + } + }, + deprecate: function(message, metadata) { + var deprecation, deprecationSite, error, fileName, lineNumber, originalStackTraceLimit, packageName, stack, _base, _base1, _base2, _ref, _ref1; + originalStackTraceLimit = Error.stackTraceLimit; + try { + Error.stackTraceLimit = 7; + error = new Error; + stack = (_ref = typeof error.getRawStack === "function" ? error.getRawStack() : void 0) != null ? _ref : getRawStack(error); + stack = stack.slice(1); + } finally{ + Error.stackTraceLimit = originalStackTraceLimit; + } + deprecationSite = stack[0]; + fileName = deprecationSite.getFileName(); + lineNumber = deprecationSite.getLineNumber(); + packageName = (_ref1 = metadata != null ? metadata.packageName : void 0) != null ? _ref1 : ""; + if ((_base = grim.deprecations)[fileName] == null) _base[fileName] = {}; + if ((_base1 = grim.deprecations[fileName])[lineNumber] == null) _base1[lineNumber] = {}; + if ((_base2 = grim.deprecations[fileName][lineNumber])[packageName] == null) _base2[packageName] = new Deprecation(message); + deprecation = grim.deprecations[fileName][lineNumber][packageName]; + deprecation.addStack(stack, metadata); + grim.emitter.emit("updated", deprecation); + }, + addSerializedDeprecation: function(serializedDeprecation) { + var deprecation, fileName, lineNumber, message, packageName, stack, stacks, _base, _base1, _base2, _i, _len, _ref, _ref1, _ref2; + deprecation = Deprecation.deserialize(serializedDeprecation); + message = deprecation.getMessage(); + fileName = deprecation.fileName, lineNumber = deprecation.lineNumber; + stacks = deprecation.getStacks(); + packageName = (_ref = (_ref1 = stacks[0]) != null ? (_ref2 = _ref1.metadata) != null ? _ref2.packageName : void 0 : void 0) != null ? _ref : ""; + if ((_base = grim.deprecations)[fileName] == null) _base[fileName] = {}; + if ((_base1 = grim.deprecations[fileName])[lineNumber] == null) _base1[lineNumber] = {}; + if ((_base2 = grim.deprecations[fileName][lineNumber])[packageName] == null) _base2[packageName] = new Deprecation(message, fileName, lineNumber); + deprecation = grim.deprecations[fileName][lineNumber][packageName]; + for(_i = 0, _len = stacks.length; _i < _len; _i++){ + stack = stacks[_i]; + deprecation.addStack(stack, stack.metadata); + } + grim.emitter.emit("updated", deprecation); + }, + on: function(eventName, callback) { + return grim.emitter.on(eventName, callback); + } + }; + } + getRawStack = function(error) { + var originalPrepareStackTrace, result; + originalPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = function(error, stack) { + return stack; + }; + Error.captureStackTrace(error, getRawStack); + result = error.stack; + Error.prepareStackTrace = originalPrepareStackTrace; + return result; + }; + module.exports = $parcel$global.__grim__; +}).call(module.exports); + +}); +parcelRegister("2HutS", function(module, exports) { +(function() { + var Deprecation, SourceMapCache; + SourceMapCache = {}; + module.exports = Deprecation = function() { + Deprecation.getFunctionNameFromCallsite = function(callsite) {}; + Deprecation.deserialize = function(_arg) { + var deprecation, fileName, lineNumber, message, stack, stacks, _i, _len; + message = _arg.message, fileName = _arg.fileName, lineNumber = _arg.lineNumber, stacks = _arg.stacks; + deprecation = new Deprecation(message, fileName, lineNumber); + for(_i = 0, _len = stacks.length; _i < _len; _i++){ + stack = stacks[_i]; + deprecation.addStack(stack, stack.metadata); + } + return deprecation; + }; + function Deprecation(message, fileName, lineNumber) { + this.message = message; + this.fileName = fileName; + this.lineNumber = lineNumber; + this.callCount = 0; + this.stackCount = 0; + this.stacks = {}; + this.stackCallCounts = {}; + } + Deprecation.prototype.getFunctionNameFromCallsite = function(callsite) { + var _ref, _ref1, _ref2; + if (callsite.functionName != null) return callsite.functionName; + if (callsite.isToplevel()) return (_ref = callsite.getFunctionName()) != null ? _ref : ""; + else { + if (callsite.isConstructor()) return "new " + callsite.getFunctionName(); + else if (callsite.getMethodName() && !callsite.getFunctionName()) return callsite.getMethodName(); + else return "" + callsite.getTypeName() + "." + ((_ref1 = (_ref2 = callsite.getMethodName()) != null ? _ref2 : callsite.getFunctionName()) != null ? _ref1 : ""); + } + }; + Deprecation.prototype.getLocationFromCallsite = function(callsite) { + var column, fileName, line; + if (callsite == null) return "unknown"; + if (callsite.location != null) return callsite.location; + if (callsite.isNative()) return "native"; + else if (callsite.isEval()) return "eval at " + this.getLocationFromCallsite(callsite.getEvalOrigin()); + else { + fileName = callsite.getFileName(); + line = callsite.getLineNumber(); + column = callsite.getColumnNumber(); + return "" + fileName + ":" + line + ":" + column; + } + }; + Deprecation.prototype.getFileNameFromCallSite = function(callsite) { + var _ref; + return (_ref = callsite.fileName) != null ? _ref : callsite.getFileName(); + }; + Deprecation.prototype.getOriginName = function() { + return this.originName; + }; + Deprecation.prototype.getMessage = function() { + return this.message; + }; + Deprecation.prototype.getStacks = function() { + var location, parsedStack, parsedStacks, stack, _ref; + parsedStacks = []; + _ref = this.stacks; + for(location in _ref){ + stack = _ref[location]; + parsedStack = this.parseStack(stack); + parsedStack.callCount = this.stackCallCounts[location]; + parsedStack.metadata = stack.metadata; + parsedStacks.push(parsedStack); + } + return parsedStacks; + }; + Deprecation.prototype.getStackCount = function() { + return this.stackCount; + }; + Deprecation.prototype.getCallCount = function() { + return this.callCount; + }; + Deprecation.prototype.addStack = function(stack, metadata) { + var callerLocation, _base, _base1; + if (this.originName == null) this.originName = this.getFunctionNameFromCallsite(stack[0]); + if (this.fileName == null) this.fileName = this.getFileNameFromCallSite(stack[0]); + if (this.lineNumber == null) this.lineNumber = typeof (_base = stack[0]).getLineNumber === "function" ? _base.getLineNumber() : void 0; + this.callCount++; + stack.metadata = metadata; + callerLocation = this.getLocationFromCallsite(stack[1]); + if (this.stacks[callerLocation] == null) { + this.stacks[callerLocation] = stack; + this.stackCount++; + } + if ((_base1 = this.stackCallCounts)[callerLocation] == null) _base1[callerLocation] = 0; + return this.stackCallCounts[callerLocation]++; + }; + Deprecation.prototype.parseStack = function(stack) { + return stack.map(function(_this) { + return function(callsite) { + return { + functionName: _this.getFunctionNameFromCallsite(callsite), + location: _this.getLocationFromCallsite(callsite), + fileName: _this.getFileNameFromCallSite(callsite) + }; + }; + }(this)); + }; + Deprecation.prototype.serialize = function() { + return { + message: this.getMessage(), + lineNumber: this.lineNumber, + fileName: this.fileName, + stacks: this.getStacks() + }; + }; + return Deprecation; + }(); +}).call(module.exports); + +}); + +parcelRegister("lFipj", function(module, exports) { + +$parcel$export(module.exports, "Emitter", () => $fc5bb49a91435824$export$4293555f241ae35a, (v) => $fc5bb49a91435824$export$4293555f241ae35a = v); +var $fc5bb49a91435824$export$4293555f241ae35a; +var $fc5bb49a91435824$export$252720412a173de; +var $fc5bb49a91435824$export$9ad012e5c3534b20; +"use strict"; + +$fc5bb49a91435824$export$4293555f241ae35a = (parcelRequire("huEXU")); + +$fc5bb49a91435824$export$252720412a173de = (parcelRequire("5gm12")); + +$fc5bb49a91435824$export$9ad012e5c3534b20 = (parcelRequire("fd9zj")); + +}); +parcelRegister("huEXU", function(module, exports) { +"use strict"; +function $cbc503dbe0ce1af4$var$_classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); +} +function $cbc503dbe0ce1af4$var$_defineProperties(target, props) { + for(var i = 0; i < props.length; i++){ + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} +function $cbc503dbe0ce1af4$var$_createClass(Constructor, protoProps, staticProps) { + if (protoProps) $cbc503dbe0ce1af4$var$_defineProperties(Constructor.prototype, protoProps); + if (staticProps) $cbc503dbe0ce1af4$var$_defineProperties(Constructor, staticProps); + return Constructor; +} + +var $5gm12 = parcelRequire("5gm12"); + +var $fd9zj = parcelRequire("fd9zj"); +// allows for handlers registered via `::on` to be invoked with calls to +// `::emit`. Instances of this class are intended to be used internally by +// classes that expose an event-based API. +// +// For example: +// +// ```js +// class User { +// constructor() { +// this.emitter = new Emitter() +// } +// +// onDidChangeName(callback) { +// this.emitter.on('did-change-name', callback) +// } +// +// setName(name) { +// if (name !== this.name) { +// this.name = name +// this.emitter.emit('did-change-name', name) +// } +// +// return this.name +// } +// } +// ``` +var $cbc503dbe0ce1af4$var$Emitter = /*#__PURE__*/ function() { + $cbc503dbe0ce1af4$var$_createClass(Emitter, null, [ + { + key: "onEventHandlerException", + value: function onEventHandlerException(exceptionHandler) { + var _this = this; + if (this.exceptionHandlers.length === 0) this.dispatch = this.exceptionHandlingDispatch; + this.exceptionHandlers.push(exceptionHandler); + return new $5gm12(function() { + _this.exceptionHandlers.splice(_this.exceptionHandlers.indexOf(exceptionHandler), 1); + if (_this.exceptionHandlers.length === 0) return _this.dispatch = _this.simpleDispatch; + }); + } + }, + { + key: "simpleDispatch", + value: function simpleDispatch(handler, value) { + return handler(value); + } + }, + { + key: "exceptionHandlingDispatch", + value: function exceptionHandlingDispatch(handler, value) { + try { + return handler(value); + } catch (exception) { + return this.exceptionHandlers.map(function(exceptionHandler) { + return exceptionHandler(exception); + }); + } + } + } + ]); + function Emitter() { + $cbc503dbe0ce1af4$var$_classCallCheck(this, Emitter); + this.disposed = false; + this.clear(); + } // Public: Clear out any existing subscribers. + $cbc503dbe0ce1af4$var$_createClass(Emitter, [ + { + key: "clear", + value: function clear() { + if (this.subscriptions != null) this.subscriptions.dispose(); + this.subscriptions = new $fd9zj(); + this.handlersByEventName = {}; + } // Public: Unsubscribe all handlers. + }, + { + key: "dispose", + value: function dispose() { + this.subscriptions.dispose(); + this.handlersByEventName = null; + this.disposed = true; + } + }, + { + key: "on", + value: function on(eventName, handler, unshift) { + var _this2 = this; + if (unshift == null) unshift = false; + if (this.disposed) throw new Error("Emitter has been disposed"); + if (typeof handler !== "function") throw new Error("Handler must be a function"); + var currentHandlers = this.handlersByEventName[eventName]; + if (currentHandlers) { + if (unshift) this.handlersByEventName[eventName].unshift(handler); + else this.handlersByEventName[eventName].push(handler); + } else this.handlersByEventName[eventName] = [ + handler + ]; + // When the emitter is disposed, we want to dispose of all subscriptions. + // However, we also need to stop tracking disposables when they're disposed + // from outside, otherwise this class will hold references to all the + // disposables it created (instead of just the active ones). + var cleanup = new $5gm12(function() { + _this2.subscriptions.remove(cleanup); + return _this2.off(eventName, handler); + }); + this.subscriptions.add(cleanup); + return cleanup; + } // Public: Register the given handler function to be invoked the next time an + }, + { + key: "once", + value: function once(eventName, handler, unshift) { + if (unshift == null) unshift = false; + var wrapped = function wrapped(value) { + disposable.dispose(); + return handler(value); + }; + var disposable = this.on(eventName, wrapped, unshift); + return disposable; + } // Public: Register the given handler function to be invoked *before* all + }, + { + key: "preempt", + value: function preempt(eventName, handler) { + return this.on(eventName, handler, true); + } // Private: Used by the disposable. + }, + { + key: "off", + value: function off(eventName, handlerToRemove) { + if (this.disposed) return; + var handlers = this.handlersByEventName[eventName]; + if (handlers) { + var handlerIndex = handlers.indexOf(handlerToRemove); + if (handlerIndex >= 0) handlers.splice(handlerIndex, 1); + if (handlers.length === 0) delete this.handlersByEventName[eventName]; + } + } + }, + { + key: "emit", + value: function emit(eventName, value) { + var handlers = this.handlersByEventName && this.handlersByEventName[eventName]; + if (handlers) { + // create a copy of `handlers` so that if any handler mutates `handlers` + // (e.g. by calling `on` on this same emitter), this does not result in + // changing the handlers being called during this same `emit`. + var handlersCopy = handlers.slice(); + for(var i = 0; i < handlersCopy.length; i++)this.constructor.dispatch(handlersCopy[i], value); + } + } + }, + { + key: "emitAsync", + value: function emitAsync(eventName, value) { + var _this3 = this; + var handlers = this.handlersByEventName && this.handlersByEventName[eventName]; + if (handlers) { + var promises = handlers.map(function(handler) { + return _this3.constructor.dispatch(handler, value); + }); + return Promise.all(promises).then(function() {}); + } + return Promise.resolve(); + } + }, + { + key: "getEventNames", + value: function getEventNames() { + return Object.keys(this.handlersByEventName); + } + }, + { + key: "listenerCountForEventName", + value: function listenerCountForEventName(eventName) { + var handlers = this.handlersByEventName[eventName]; + return handlers == null ? 0 : handlers.length; + } + }, + { + key: "getTotalListenerCount", + value: function getTotalListenerCount() { + var result = 0; + var _arr = Object.keys(this.handlersByEventName); + for(var _i = 0; _i < _arr.length; _i++){ + var eventName = _arr[_i]; + result += this.handlersByEventName[eventName].length; + } + return result; + } + } + ]); + return Emitter; +}(); +$cbc503dbe0ce1af4$var$Emitter.dispatch = $cbc503dbe0ce1af4$var$Emitter.simpleDispatch; +$cbc503dbe0ce1af4$var$Emitter.exceptionHandlers = []; +module.exports = $cbc503dbe0ce1af4$var$Emitter; + +}); +parcelRegister("5gm12", function(module, exports) { +"use strict"; +function $3d4f863fe04e8ce9$var$_classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); +} +function $3d4f863fe04e8ce9$var$_defineProperties(target, props) { + for(var i = 0; i < props.length; i++){ + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} +function $3d4f863fe04e8ce9$var$_createClass(Constructor, protoProps, staticProps) { + if (protoProps) $3d4f863fe04e8ce9$var$_defineProperties(Constructor.prototype, protoProps); + if (staticProps) $3d4f863fe04e8ce9$var$_defineProperties(Constructor, staticProps); + return Constructor; +} +// Essential: A handle to a resource that can be disposed. For example, +// {Emitter::on} returns disposables representing subscriptions. +module.exports = /*#__PURE__*/ function() { + $3d4f863fe04e8ce9$var$_createClass(Disposable, null, [ + { + key: "isDisposable", + // Public: Ensure that `object` correctly implements the `Disposable` + // contract. + // + // * `object` An {Object} you want to perform the check against. + // + // Returns a {Boolean} indicating whether `object` is a valid `Disposable`. + value: function isDisposable(object) { + return typeof (object != null ? object.dispose : undefined) === "function"; + } + } + ]); + function Disposable(disposalAction) { + $3d4f863fe04e8ce9$var$_classCallCheck(this, Disposable); + this.disposed = false; + this.disposalAction = disposalAction; + } // Public: Perform the disposal action, indicating that the resource associated + // with this disposable is no longer needed. + // + // You can call this method more than once, but the disposal action will only + // be performed the first time. + $3d4f863fe04e8ce9$var$_createClass(Disposable, [ + { + key: "dispose", + value: function dispose() { + if (!this.disposed) { + this.disposed = true; + if (typeof this.disposalAction === "function") this.disposalAction(); + this.disposalAction = null; + } + } + } + ]); + return Disposable; +}(); + +}); + +parcelRegister("fd9zj", function(module, exports) { +"use strict"; +function $b12f7e07728812cc$var$_classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); +} +function $b12f7e07728812cc$var$_defineProperties(target, props) { + for(var i = 0; i < props.length; i++){ + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} +function $b12f7e07728812cc$var$_createClass(Constructor, protoProps, staticProps) { + if (protoProps) $b12f7e07728812cc$var$_defineProperties(Constructor.prototype, protoProps); + if (staticProps) $b12f7e07728812cc$var$_defineProperties(Constructor, staticProps); + return Constructor; +} +var $b12f7e07728812cc$var$CompositeDisposable; +var $b12f7e07728812cc$var$Disposable; // Essential: An object that aggregates multiple {Disposable} instances together +// into a single disposable, so they can all be disposed as a group. +// +// These are very useful when subscribing to multiple events. +// +// ## Examples +// +// ```js +// const {CompositeDisposable} = require('atom') +// +// class Something { +// constructor() { +// this.disposables = new CompositeDisposable() +// const editor = atom.workspace.getActiveTextEditor() +// this.disposables.add(editor.onDidChange(() => {}) +// this.disposables.add(editor.onDidChangePath(() => {}) +// } +// +// destroy() { +// this.disposables.dispose(); +// } +// } +// ``` +module.exports = /*#__PURE__*/ function() { + /* + Section: Construction and Destruction + */ // Public: Construct an instance, optionally with one or more disposables + function CompositeDisposable() { + $b12f7e07728812cc$var$_classCallCheck(this, CompositeDisposable); + this.disposed = false; + this.disposables = new Set(); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + try { + for(var _iterator = arguments[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){ + var disposable = _step.value; + this.add(disposable); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally{ + try { + if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return(); + } finally{ + if (_didIteratorError) throw _iteratorError; + } + } + } // Public: Dispose all disposables added to this composite disposable. + // + // If this object has already been disposed, this method has no effect. + $b12f7e07728812cc$var$_createClass(CompositeDisposable, [ + { + key: "dispose", + value: function dispose() { + if (!this.disposed) { + this.disposed = true; + this.disposables.forEach(function(disposable) { + return disposable.dispose(); + }); + this.disposables = null; + } + } + }, + { + key: "add", + value: function add() { + if (!this.disposed) { + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + try { + for(var _iterator2 = arguments[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true){ + var disposable = _step2.value; + $b12f7e07728812cc$var$assertDisposable(disposable); + this.disposables.add(disposable); + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally{ + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) _iterator2.return(); + } finally{ + if (_didIteratorError2) throw _iteratorError2; + } + } + } + } // Public: Remove a previously added disposable. + }, + { + key: "remove", + value: function remove(disposable) { + if (!this.disposed) this.disposables.delete(disposable); + } // Public: Alias to {CompositeDisposable::remove} + }, + { + key: "delete", + value: function _delete(disposable) { + this.remove(disposable); + } // Public: Clear all disposables. They will not be disposed by the next call + }, + { + key: "clear", + value: function clear() { + if (!this.disposed) this.disposables.clear(); + } + } + ]); + return CompositeDisposable; +}(); + +function $b12f7e07728812cc$var$assertDisposable(disposable) { + if ($b12f7e07728812cc$var$Disposable == null) $b12f7e07728812cc$var$Disposable = (parcelRequire("5gm12")); + if (!$b12f7e07728812cc$var$Disposable.isDisposable(disposable)) throw new TypeError("Arguments to CompositeDisposable.add must have a .dispose() method"); +} + +}); + + + + + +parcelRegister("8IinJ", function(module, exports) { + +// Generated by CoffeeScript 2.5.1 +(function() { + var Ancestors, Mixin; + Mixin = (parcelRequire("d28sD")); + // Public + module.exports = Ancestors = class Ancestors extends Mixin { + /* Public */ static parents(node, selector = "*") { + var parents; + parents = []; + this.eachParent(node, function(parent) { + if (typeof parent.matches === "function" ? parent.matches(selector) : void 0) return parents.push(parent); + }); + return parents; + } + static eachParent(node, block) { + var parent, results; + parent = node.parentNode; + if (parent != null) block(parent); + results = []; + while(parent = parent.parentNode)if (parent != null) results.push(block(parent)); + else results.push(void 0); + return results; + } + parents(selector = "*") { + return Ancestors.parents(this, selector); + } + queryParentSelectorAll(selector) { + if (selector == null) throw new Error("::queryParentSelectorAll requires a valid selector as argument"); + return this.parents(selector); + } + queryParentSelector(selector) { + if (selector == null) throw new Error("::queryParentSelector requires a valid selector as argument"); + return this.queryParentSelectorAll(selector)[0]; + } + eachParent(block) { + return Ancestors.eachParent(this, block); + } + }; +}).call(module.exports); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5jZXN0b3JzLmpzIiwic291cmNlUm9vdCI6Ii4uLy4uIiwic291cmNlcyI6WyJsaWIvbWl4aW5zL2FuY2VzdG9ycy5jb2ZmZWUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQUEsTUFBQSxTQUFBLEVBQUE7O0VBQUEsS0FBQSxHQUFRLE9BQUEsQ0FBUSxPQUFSLEVBQVI7OztFQUdBLE1BQU0sQ0FBQyxPQUFQLEdBQ00sWUFBTixNQUFBLFVBQUEsUUFBd0IsTUFBeEIsQ0FBQTs7SUFJWSxPQUFULE9BQVMsQ0FBQyxJQUFELEVBQU8sV0FBUyxHQUFoQixDQUFBO0FBQ1osVUFBQTtNQUFJLE9BQUEsR0FBVTtNQUNWLElBQUMsQ0FBQSxVQUFELENBQVksSUFBWixFQUFrQixRQUFBLENBQUMsTUFBRCxDQUFBO1FBQVksMkNBQXdCLE1BQU0sQ0FBQyxRQUFTLGtCQUF4QztpQkFBQSxPQUFPLENBQUMsSUFBUixDQUFhLE1BQWIsRUFBQTs7TUFBWixDQUFsQjthQUNBO0lBSFE7O0lBS0csT0FBWixVQUFZLENBQUMsSUFBRCxFQUFPLE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tPlxuICAgIHBhcmVudHMgPSBbXVxuICAgIEBlYWNoUGFyZW50IG5vZGUsIChwYXJlbnQpIC0+IHBhcmVudHMucHVzaChwYXJlbnQpIGlmIHBhcmVudC5tYXRjaGVzPyhzZWxlY3RvcilcbiAgICBwYXJlbnRzXG5cbiAgQGVhY2hQYXJlbnQ6IChub2RlLCBibG9jaykgLT5cbiAgICBwYXJlbnQgPSBub2RlLnBhcmVudE5vZGVcblxuICAgIGJsb2NrKHBhcmVudCkgaWYgcGFyZW50P1xuICAgIHdoaWxlIHBhcmVudCA9IHBhcmVudC5wYXJlbnROb2RlXG4gICAgICBibG9jayhwYXJlbnQpIGlmIHBhcmVudD9cblxuICBwYXJlbnRzOiAoc2VsZWN0b3I9JyonKSAtPiBBbmNlc3RvcnMucGFyZW50cyh0aGlzLCBzZWxlY3RvcilcblxuICBxdWVyeVBhcmVudFNlbGVjdG9yQWxsOiAoc2VsZWN0b3IpIC0+XG4gICAgdW5sZXNzIHNlbGVjdG9yP1xuICAgICAgdGhyb3cgbmV3IEVycm9yICc6OnF1ZXJ5UGFyZW50U2VsZWN0b3JBbGwgcmVxdWlyZXMgYSB2YWxpZCBzZWxlY3RvciBhcyBhcmd1bWVudCdcbiAgICBAcGFyZW50cyhzZWxlY3RvcilcblxuICBxdWVyeVBhcmVudFNlbGVjdG9yOiAoc2VsZWN0b3IpIC0+XG4gICAgdW5sZXNzIHNlbGVjdG9yP1xuICAgICAgdGhyb3cgbmV3IEVycm9yICc6OnF1ZXJ5UGFyZW50U2VsZWN0b3IgcmVxdWlyZXMgYSB2YWxpZCBzZWxlY3RvciBhcyBhcmd1bWVudCdcbiAgICBAcXVlcnlQYXJlbnRTZWxlY3RvckFsbChzZWxlY3RvcilbMF1cblxuICBlYWNoUGFyZW50OiAoYmxvY2spIC0+IEFuY2VzdG9ycy5lYWNoUGFyZW50KHRoaXMsIGJsb2NrKVxuIl19 + //# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/mixins/ancestors.coffee + +}); +parcelRegister("d28sD", function(module, exports) { +(function() { + var ExcludedClassProperties, ExcludedPrototypeProperties, Mixin, name; + module.exports = Mixin = function() { + Mixin.includeInto = function(constructor) { + var name, value, _ref; + this.extend(constructor.prototype); + for(name in this){ + value = this[name]; + if (ExcludedClassProperties.indexOf(name) === -1) { + if (!constructor.hasOwnProperty(name)) constructor[name] = value; + } + } + return (_ref = this.included) != null ? _ref.call(constructor) : void 0; + }; + Mixin.extend = function(object) { + var name, _i, _len, _ref, _ref1; + _ref = Object.getOwnPropertyNames(this.prototype); + for(_i = 0, _len = _ref.length; _i < _len; _i++){ + name = _ref[_i]; + if (ExcludedPrototypeProperties.indexOf(name) === -1) { + if (!object.hasOwnProperty(name)) object[name] = this.prototype[name]; + } + } + return (_ref1 = this.prototype.extended) != null ? _ref1.call(object) : void 0; + }; + function Mixin() { + if (typeof this.extended === "function") this.extended(); + } + return Mixin; + }(); + ExcludedClassProperties = [ + "__super__" + ]; + for(name in Mixin)ExcludedClassProperties.push(name); + ExcludedPrototypeProperties = [ + "constructor", + "extended" + ]; +}).call(module.exports); + +}); + + +parcelRegister("2CaVZ", function(module, exports) { + + +// Generated by CoffeeScript 2.5.1 +(function() { + var Disposable, DisposableEvents, Mixin; + Mixin = (parcelRequire("d28sD")); + ({ Disposable: Disposable } = $cz7Pu$atom); + module.exports = DisposableEvents = class DisposableEvents extends Mixin { + addDisposableEventListener(object, event, listener, options) { + object.addEventListener(event, listener, options); + return new Disposable(function() { + return object.removeEventListener(event, listener); + }); + } + }; +}).call(module.exports); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlzcG9zYWJsZS1ldmVudHMuanMiLCJzb3VyY2VSb290IjoiLi4vLi4iLCJzb3VyY2VzIjpbImxpYi9taXhpbnMvZGlzcG9zYWJsZS1ldmVudHMuY29mZmVlIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUFBLE1BQUEsVUFBQSxFQUFBLGdCQUFBLEVBQUE7O0VBQUEsS0FBQSxHQUFRLE9BQUEsQ0FBUSxPQUFSOztFQUNSLENBQUEsQ0FBQyxVQUFELENBQUEsR0FBZSxPQUFBLENBQVEsTUFBUixDQUFmOztFQUVBLE1BQU0sQ0FBQyxPQUFQLEdBQ00sbUJBQU4sTUFBQSxpQkFBQSxRQUErQixNQUEvQjtJQUNFLDBCQUE0QixDQUFDLE1BQUQsRUFBUyxLQUFULEVBQWdCLFFBQWhCLEVBQTBCLE9BQTFCLENBQUE7TUFDMUIsTUFBTSxDQUFDLGdCQUFQLENBQXdCLEtBQXhCLEVBQStCLFFBQS9CLEVBQXlDLE9BQXpDO2FBQ0EsSUFBSSxVQUFKLENBQWUsUUFBQSxDQUFBLENBQUE7ZUFBRyxNQUFNLENBQUMsbUJBQVAsQ0FBMkIsS0FBM0IsRUFBa0MsUUFBbEM7TUFBSCxDQUFmO0lBRjBCOztFQUQ5QjtBQUpBIiwic291cmNlc0NvbnRlbnQiOlsiTWl4aW4gPSByZXF1aXJlICdtaXh0bydcbntEaXNwb3NhYmxlfSA9IHJlcXVpcmUgJ2F0b20nXG5cbm1vZHVsZS5leHBvcnRzID1cbmNsYXNzIERpc3Bvc2FibGVFdmVudHMgZXh0ZW5kcyBNaXhpblxuICBhZGREaXNwb3NhYmxlRXZlbnRMaXN0ZW5lcjogKG9iamVjdCwgZXZlbnQsIGxpc3RlbmVyLCBvcHRpb25zKSAtPlxuICAgIG9iamVjdC5hZGRFdmVudExpc3RlbmVyIGV2ZW50LCBsaXN0ZW5lciwgb3B0aW9uc1xuICAgIG5ldyBEaXNwb3NhYmxlIC0+IG9iamVjdC5yZW1vdmVFdmVudExpc3RlbmVyIGV2ZW50LCBsaXN0ZW5lclxuIl19 + //# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/mixins/disposable-events.coffee + +}); + +parcelRegister("hQK5C", function(module, exports) { + + + +// Generated by CoffeeScript 2.5.1 +(function() { + var CompositeDisposable, Disposable, DisposableEvents, EventsDelegation, Mixin, NO_SELECTOR, eachPair; + Mixin = (parcelRequire("d28sD")); + DisposableEvents = (parcelRequire("2CaVZ")); + ({ Disposable: Disposable, CompositeDisposable: CompositeDisposable } = $cz7Pu$atom); + eachPair = function(object, callback) { + var k, results, v; + results = []; + for(k in object){ + v = object[k]; + results.push(callback(k, v)); + } + return results; + }; + NO_SELECTOR = "__NONE__"; + module.exports = EventsDelegation = (function() { + class EventsDelegation extends Mixin { + subscribeTo(object, selector, events, options) { + var disposablesForObject, eventsForObject; + if (!(object instanceof HTMLElement)) [object, selector, events, options] = [ + this, + object, + selector, + events + ]; + if (typeof selector === "object") [events, selector, options] = [ + selector, + NO_SELECTOR, + events + ]; + if (this.eventsMap == null) this.eventsMap = new WeakMap(); + if (this.disposablesMap == null) this.disposablesMap = new WeakMap(); + if (this.eventsMap.get(object) == null) this.eventsMap.set(object, {}); + if (this.disposablesMap.get(object) == null) this.disposablesMap.set(object, {}); + eventsForObject = this.eventsMap.get(object); + disposablesForObject = this.disposablesMap.get(object); + eachPair(events, (event, callback)=>{ + if (eventsForObject[event] == null) { + eventsForObject[event] = {}; + disposablesForObject[event] = this.createEventListener(object, event, options); + } + return eventsForObject[event][selector] = callback; + }); + return new Disposable(()=>{ + return this.unsubscribeFrom(object, selector, events); + }); + } + unsubscribeFrom(object, selector, events) { + var disposablesForObject, event, eventsForObject; + if (!(object instanceof HTMLElement)) [object, selector, events] = [ + this, + object, + selector + ]; + if (typeof selector === "object") [events, selector] = [ + selector, + NO_SELECTOR + ]; + if (!(eventsForObject = this.eventsMap.get(object))) return; + for(event in events){ + delete eventsForObject[event][selector]; + if (Object.keys(eventsForObject[event]).length === 0) { + disposablesForObject = this.disposablesMap.get(object); + disposablesForObject[event].dispose(); + delete disposablesForObject[event]; + delete eventsForObject[event]; + } + } + if (Object.keys(eventsForObject).length === 0) { + this.eventsMap.delete(object); + return this.disposablesMap.delete(object); + } + } + createEventListener(object, event, options) { + var listener; + listener = (e)=>{ + var eventsForObject, ref, target; + if (!(eventsForObject = (ref = this.eventsMap.get(object)) != null ? ref[event] : void 0)) return; + ({ target: target } = e); + this.decorateEvent(e); + this.eachSelectorFromTarget(e, target, eventsForObject); + if (!e.isPropagationStopped) { + if (typeof eventsForObject[NO_SELECTOR] === "function") eventsForObject[NO_SELECTOR](e); + } + return true; + }; + return this.addDisposableEventListener(object, event, listener, options); + } + eachSelectorFromTarget(event, target, eventsForObject) { + return this.nodeAndItsAncestors(target, (node)=>{ + if (event.isPropagationStopped) return; + return this.eachSelector(eventsForObject, (selector, callback)=>{ + var matched; + matched = this.targetMatch(node, selector); + if (event.isImmediatePropagationStopped || !matched) return; + return callback(event); + }); + }); + } + eachSelector(eventsForObject, callback) { + var i, key, keys, len; + keys = Object.keys(eventsForObject); + if (keys.indexOf(NO_SELECTOR) !== -1) keys.splice(keys.indexOf(NO_SELECTOR), 1); + keys.sort(function(a, b) { + return b.split(" ").length - a.split(" ").length; + }); + for(i = 0, len = keys.length; i < len; i++){ + key = keys[i]; + if (callback(key, eventsForObject[key])) return true; + } + return false; + } + targetMatch(target, selector) { + var parent; + if (target.matches(selector)) return true; + parent = target.parentNode; + while(parent != null && parent.matches != null){ + if (parent.matches(selector)) return true; + parent = parent.parentNode; + } + return false; + } + nodeAndItsAncestors(node, callback) { + var parent, results; + parent = node.parentNode; + callback(node); + results = []; + while(parent != null && parent.matches != null){ + callback(parent); + results.push(parent = parent.parentNode); + } + return results; + } + decorateEvent(e) { + var overriddenStop, overriddenStopImmediate; + overriddenStop = Event.prototype.stopPropagation; + e.stopPropagation = function() { + this.isPropagationStopped = true; + return overriddenStop.apply(this, arguments); + }; + overriddenStopImmediate = Event.prototype.stopImmediatePropagation; + return e.stopImmediatePropagation = function() { + this.isImmediatePropagationStopped = true; + return overriddenStopImmediate.apply(this, arguments); + }; + } + } + DisposableEvents.includeInto(EventsDelegation); + return EventsDelegation; + }).call(this); +}).call(module.exports); //# sourceMappingURL=data:application/json;base64,eyJ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lmIHBhcmVudC5tYXRjaGVzKHNlbGVjdG9yKVxuICAgICAgcGFyZW50ID0gcGFyZW50LnBhcmVudE5vZGVcblxuICAgIGZhbHNlXG5cbiAgbm9kZUFuZEl0c0FuY2VzdG9yczogKG5vZGUsIGNhbGxiYWNrKSAtPlxuICAgIHBhcmVudCA9IG5vZGUucGFyZW50Tm9kZVxuXG4gICAgY2FsbGJhY2sobm9kZSlcbiAgICB3aGlsZSBwYXJlbnQ/IGFuZCBwYXJlbnQubWF0Y2hlcz9cbiAgICAgIGNhbGxiYWNrKHBhcmVudClcbiAgICAgIHBhcmVudCA9IHBhcmVudC5wYXJlbnROb2RlXG5cbiAgZGVjb3JhdGVFdmVudDogKGUpIC0+XG4gICAgb3ZlcnJpZGRlblN0b3AgPSAgRXZlbnQ6OnN0b3BQcm9wYWdhdGlvblxuICAgIGUuc3RvcFByb3BhZ2F0aW9uID0gLT5cbiAgICAgIEBpc1Byb3BhZ2F0aW9uU3RvcHBlZCA9IHRydWVcbiAgICAgIG92ZXJyaWRkZW5TdG9wLmFwcGx5KHRoaXMsIGFyZ3VtZW50cylcblxuICAgIG92ZXJyaWRkZW5TdG9wSW1tZWRpYXRlID0gIEV2ZW50OjpzdG9wSW1tZWRpYXRlUHJvcGFnYXRpb25cbiAgICBlLnN0b3BJbW1lZGlhdGVQcm9wYWdhdGlvbiA9IC0+XG4gICAgICBAaXNJbW1lZGlhdGVQcm9wYWdhdGlvblN0b3BwZWQgPSB0cnVlXG4gICAgICBvdmVycmlkZGVuU3RvcEltbWVkaWF0ZS5hcHBseSh0aGlzLCBhcmd1bWVudHMpXG4iXX0= + //# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/mixins/events-delegation.coffee + +}); + +parcelRegister("753wz", function(module, exports) { + +// Generated by CoffeeScript 2.5.1 +(function() { + var BabelSpacePenDSL, Builder, Events, Mixin, SelfClosingTags, SpacePenDSL, Tags, Template; + Mixin = (parcelRequire("d28sD")); + Tags = "a abbr address article aside audio b bdi bdo blockquote body button canvas caption cite code colgroup datalist dd del details dfn dialog div dl dt em fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header html i iframe ins kbd label legend li main map mark menu meter nav noscript object ol optgroup option output p pre progress q rp rt ruby s samp script section select small span strong style sub summary sup table tbody td textarea tfoot th thead time title tr u ul var video area base br col command embed hr img input keygen link meta param source track wbr".split(/\s+/); + SelfClosingTags = {}; + "area base br col command embed hr img input keygen link meta param source track wbr".split(/\s+/).forEach(function(tag) { + return SelfClosingTags[tag] = true; + }); + Events = "blur change click dblclick error focus input keydown keypress keyup load mousedown mousemove mouseout mouseover mouseup resize scroll select submit unload".split(/\s+/); + BabelSpacePenDSL = class BabelSpacePenDSL extends Mixin { + buildContent() { + if (this.constructor.content != null) return SpacePenDSL.buildContent(this, this.constructor.content); + } + }; + module.exports = SpacePenDSL = (function() { + class SpacePenDSL extends Mixin { + static includeInto(klass) { + super.includeInto(klass); + Object.defineProperty(klass, "content", { + enumerable: false, + get: function() { + return this.prototype.__content__; + }, + set: function(value) { + return this.prototype.__content__ = value; + } + }); + Object.defineProperty(klass.prototype, "createdCallback", { + enumerable: true, + get: function() { + return this.__create__; + }, + set: function(value) { + return this.__createdCallback__ = value; + } + }); + Object.defineProperty(klass.prototype, "__create__", { + enumerable: true, + value: function() { + if (this.__content__ != null) SpacePenDSL.buildContent(this, this.__content__); + if (this.__createdCallback__ != null) return this.__createdCallback__(); + } + }); + return klass.useShadowRoot = function() { + return klass.prototype.__useShadowRoot__ = true; + }; + } + static buildContent(element, content) { + var html, root, template; + template = new Template(); + content.call(template); + [html] = template.buildHtml(); + root = element.__useShadowRoot__ ? root = element.shadowRoot = element.createShadowRoot() : root = element; + root.innerHTML = html; + return this.wireOutlets(element, root); + } + static wireOutlets(view, root) { + var element, i, len, outlet, ref; + ref = root.querySelectorAll("[outlet]"); + for(i = 0, len = ref.length; i < len; i++){ + element = ref[i]; + outlet = element.getAttribute("outlet"); + view[outlet] = element; + element.removeAttribute("outlet"); + } + return void 0; + } + } + SpacePenDSL.Babel = BabelSpacePenDSL; + return SpacePenDSL; + }).call(this); + Template = (function() { + class Template { + constructor(){ + this.currentBuilder = new Builder(); + } + subview(name, view) { + return this.currentBuilder.subview(name, view); + } + text(string) { + return this.currentBuilder.text(string); + } + tag(tagName, ...args) { + return this.currentBuilder.tag(tagName, ...args); + } + raw(string) { + return this.currentBuilder.raw(string); + } + buildHtml() { + return this.currentBuilder.buildHtml(); + } + } + Tags.forEach(function(tagName) { + return Template.prototype[tagName] = function(...args) { + return this.currentBuilder.tag(tagName, ...args); + }; + }); + return Template; + }).call(this); + Builder = class Builder { + constructor(){ + this.document = []; + this.postProcessingSteps = []; + } + buildHtml() { + return [ + this.document.join(""), + this.postProcessingSteps + ]; + } + tag(name, ...args) { + var options; + options = this.extractOptions(args); + this.openTag(name, options.attributes); + if (SelfClosingTags.hasOwnProperty(name)) { + if (options.text != null || options.content != null) throw new Error(`Self-closing tag ${name} cannot have text or content`); + } else { + if (typeof options.content === "function") options.content(); + if (options.text) this.text(options.text); + return this.closeTag(name); + } + } + openTag(name, attributes) { + var attributeName, attributePairs, attributesString, value; + if (this.document.length === 0) { + if (attributes == null) attributes = {}; + } + attributePairs = function() { + var results; + results = []; + for(attributeName in attributes){ + value = attributes[attributeName]; + results.push(`${attributeName}=\"${value}\"`); + } + return results; + }(); + attributesString = attributePairs.length ? " " + attributePairs.join(" ") : ""; + return this.document.push(`<${name}${attributesString}>`); + } + closeTag(name) { + return this.document.push(``); + } + text(string) { + var escapedString; + escapedString = string.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(//g, ">"); + return this.document.push(escapedString); + } + raw(string) { + return this.document.push(string); + } + subview(outletName, subview) { + var subviewId; + subviewId = `subview-${++idCounter}`; + this.tag("div", { + id: subviewId + }); + return this.postProcessingSteps.push(function(view) { + view[outletName] = subview; + subview.parentView = view; + return view.find(`div#${subviewId}`).replaceWith(subview); + }); + } + extractOptions(args) { + var arg, i, len, options; + options = {}; + for(i = 0, len = args.length; i < len; i++){ + arg = args[i]; + switch(typeof arg){ + case "function": + options.content = arg; + break; + case "string": + case "number": + options.text = arg.toString(); + break; + default: + options.attributes = arg; + } + } + return options; + } + }; +}).call(module.exports); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BhY2UtcGVuLWRzbC5qcyIsInNvdXJjZVJvb3QiOiIuLi8uLiIsInNvdXJjZXMiOlsibGliL21peGlucy9zcGFjZS1wZW4tZHNsLmNvZmZlZSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7QUFBQSxNQUFBLGdCQUFBLEVBQUEsT0FBQSxFQUFBLE1BQUEsRUFBQSxLQUFBLEVBQUEsZUFBQSxFQUFBLFdBQUEsRUFBQSxJQUFBLEVBQUE7O0VBQUEsS0FBQSxHQUFRLE9BQUEsQ0FBUSxPQUFSOztFQUVSLElBQUEsR0FDRSxra0JBTytDLENBQUMsS0FQaEQsQ0FPc0QsS0FQdEQ7O0VBU0YsZUFBQSxHQUFrQixDQUFBOztFQUNsQixxRkFDa0IsQ0FBQyxLQURuQixDQUN5QixLQUR6QixDQUMrQixDQUFDLE9BRGhDLENBQ3dDLFFBQUEsQ0FBQyxHQUFELENBQUE7V0FBUyxlQUFlLENBQUMsR0FBRCxDQUFmLEdBQXVCO0VBQWhDLENBRHhDOztFQUdBLE1BQUEsR0FDRSw0SkFFNEMsQ0FBQyxLQUY3QyxDQUVtRCxLQUZuRDs7RUFJSSxtQkFBTixNQUFBLGlCQUFBLFFBQStCLE1BQS9CO0lBQ0UsWUFBYyxDQUFBLENBQUE7TUFDWixJQUF3RCxnQ0FBeEQ7ZUFBQSxXQUFXLENBQUMsWUFBWixDQUF5QixJQUF6QixFQUErQixJQUFDLENBQUEsV0FBVyxDQUFDLE9BQTVDLEVBQUE7O0lBRFk7O0VBRGhCOztFQUlBLE1BQU0sQ0FBQyxPQUFQLEdBQ007SUFBTixNQUFBLFlBQUEsUUF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ICAgICAgdmlld1tvdXRsZXROYW1lXSA9IHN1YnZpZXdcbiAgICAgIHN1YnZpZXcucGFyZW50VmlldyA9IHZpZXdcbiAgICAgIHZpZXcuZmluZChcImRpdiMje3N1YnZpZXdJZH1cIikucmVwbGFjZVdpdGgoc3VidmlldylcblxuICBleHRyYWN0T3B0aW9uczogKGFyZ3MpIC0+XG4gICAgb3B0aW9ucyA9IHt9XG4gICAgZm9yIGFyZyBpbiBhcmdzXG4gICAgICBzd2l0Y2ggdHlwZW9mKGFyZylcbiAgICAgICAgd2hlbiAnZnVuY3Rpb24nXG4gICAgICAgICAgb3B0aW9ucy5jb250ZW50ID0gYXJnXG4gICAgICAgIHdoZW4gJ3N0cmluZycsICdudW1iZXInXG4gICAgICAgICAgb3B0aW9ucy50ZXh0ID0gYXJnLnRvU3RyaW5nKClcbiAgICAgICAgZWxzZVxuICAgICAgICAgIG9wdGlvbnMuYXR0cmlidXRlcyA9IGFyZ1xuICAgIG9wdGlvbnNcbiJdfQ== + //# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/mixins/space-pen-dsl.coffee + +}); + +parcelRegister("bN1tE", function(module, exports) { + +$parcel$export(module.exports, "escapeRegExp", () => $89556aa364dbcafa$export$7c57da42ce8e346f); +$parcel$export(module.exports, "dasherize", () => $89556aa364dbcafa$export$7e9152eee80b168f); +$parcel$export(module.exports, "debounce", () => $89556aa364dbcafa$export$61fc7d43ac8f84b0); +const $89556aa364dbcafa$var$regexEscape = /[$()*+./?[\\\]^{|}-]/g; +function $89556aa364dbcafa$export$7c57da42ce8e346f(string) { + if (string) return string.replace($89556aa364dbcafa$var$regexEscape, "\\$&"); + else return ""; +} +const $89556aa364dbcafa$var$regexDaherize = /([A-Z])|(_)/g; +function $89556aa364dbcafa$export$7e9152eee80b168f(string) { + if (!string) return ""; + string = `${string[0].toLowerCase()}${string.slice(1)}`; + return string.replace($89556aa364dbcafa$var$regexDaherize, function(m, letter) { + if (letter) return `-${letter.toLowerCase()}`; + else return "-"; + }); +} +function $89556aa364dbcafa$export$61fc7d43ac8f84b0(callback, wait) { + let timeoutId; + return (...args)=>{ + if (timeoutId !== undefined) clearTimeout(timeoutId); + timeoutId = setTimeout(()=>{ + callback(...args); + }, wait); + }; +} + +}); + +parcelRegister("5yNMJ", function(module, exports) { + +$parcel$export(module.exports, "default", () => $40c6befb85a55db7$export$2e2bcd8739ae039); +"use strict"; +function $40c6befb85a55db7$export$2e2bcd8739ae039(cls, elementName) { + if (!window.customElements.get(elementName)) window.customElements.define(elementName, cls); +} + +}); + +parcelRegister("gQk5Q", function(module, exports) { +module.exports = Promise.resolve(require("./minimap-plugin-generator-element.a1e4649c.js")).then(()=>parcelRequire("1Ozz1")); + +}); + + +$parcel$export(module.exports, "editorsMinimaps", () => $e6ccb2de5b0684dd$export$3542142cf713a624); +$parcel$export(module.exports, "emitter", () => $e6ccb2de5b0684dd$export$bad24218ebd77223); +$parcel$export(module.exports, "styleReader", () => $e6ccb2de5b0684dd$export$4d3d19fa8673fd3e); +$parcel$export(module.exports, "activate", () => $e6ccb2de5b0684dd$export$234c45b355edd85b); +$parcel$export(module.exports, "toggle", () => $e6ccb2de5b0684dd$export$e03c1c3201ee8bb7); +$parcel$export(module.exports, "minimapViewProvider", () => $e6ccb2de5b0684dd$export$e854d79fe60e1faa); +$parcel$export(module.exports, "deactivate", () => $e6ccb2de5b0684dd$export$e96c1edfdaf2d1db); +$parcel$export(module.exports, "getConfigSchema", () => $e6ccb2de5b0684dd$export$9734216cda67175d); +$parcel$export(module.exports, "onDidActivate", () => $e6ccb2de5b0684dd$export$b6f10fd94544e66c); +$parcel$export(module.exports, "onDidDeactivate", () => $e6ccb2de5b0684dd$export$d206d0a3ab46ce53); +$parcel$export(module.exports, "onDidCreateMinimap", () => $e6ccb2de5b0684dd$export$a720fe198b21c58c); +$parcel$export(module.exports, "onDidAddPlugin", () => $e6ccb2de5b0684dd$export$d40fb390be4bd0f); +$parcel$export(module.exports, "onDidRemovePlugin", () => $e6ccb2de5b0684dd$export$9937b73c38ac51f0); +$parcel$export(module.exports, "onDidActivatePlugin", () => $e6ccb2de5b0684dd$export$6f3aaf72a3cac830); +$parcel$export(module.exports, "onDidDeactivatePlugin", () => $e6ccb2de5b0684dd$export$8df1420526313195); +$parcel$export(module.exports, "onDidChangePluginOrder", () => $e6ccb2de5b0684dd$export$4f0668f248b15f12); +$parcel$export(module.exports, "minimapClass", () => $e6ccb2de5b0684dd$export$e3a0d8dffed34b4f); +$parcel$export(module.exports, "minimapForEditorElement", () => $e6ccb2de5b0684dd$export$fbfbb3bd6dc38def); +$parcel$export(module.exports, "minimapForEditor", () => $e6ccb2de5b0684dd$export$58c03b6c0d094c); +$parcel$export(module.exports, "standAloneMinimapForEditor", () => $e6ccb2de5b0684dd$export$bd03fcaa67c354fa); +$parcel$export(module.exports, "getActiveMinimap", () => $e6ccb2de5b0684dd$export$6f8e50201d28743); +$parcel$export(module.exports, "observeMinimaps", () => $e6ccb2de5b0684dd$export$b0030062932c3d3d); +$parcel$export(module.exports, "provideMinimapServiceV1", () => $e6ccb2de5b0684dd$export$b956a56dda08a331); +$parcel$export(module.exports, "config", () => $9d1240d3ca4fda1c$exports); +$parcel$export(module.exports, "Minimap", () => $e85ce81538013d49$export$2e2bcd8739ae039); +$parcel$export(module.exports, "createMinimapElement", () => $0965f8da08ee51eb$export$aa3fab546e9e7454); + + +var $35541aa4e0ecec06$exports = {}; + + + + + + +// Generated by CoffeeScript 2.5.1 +(function() { + $35541aa4e0ecec06$exports = { + requirePackages: function(...packages) { + return new Promise(function(resolve, reject) { + var failures, remains, required, solved; + required = []; + failures = []; + remains = packages.length; + solved = function() { + remains--; + if (remains !== 0) return; + if (failures.length > 0) return reject(failures); + return resolve(required); + }; + return packages.forEach(function(pkg, i) { + var failHandler, promise; + failHandler = function(reason) { + failures[i] = reason; + return solved(); + }; + promise = atom.packages.activatePackage(pkg).then(function(activatedPackage) { + required[i] = activatedPackage.mainModule; + return solved(); + }); + if (promise.fail != null) return promise.fail(failHandler); + else if (promise.catch != null) return promise.catch(failHandler); + }); + }); + }, + registerOrUpdateElement: (parcelRequire("59Uvr")), + Ancestors: (parcelRequire("8IinJ")), + AncestorsMethods: (parcelRequire("8IinJ")), + DisposableEvents: (parcelRequire("2CaVZ")), + EventsDelegation: (parcelRequire("hQK5C")), + SpacePenDSL: (parcelRequire("753wz")) + }; +}).call($35541aa4e0ecec06$exports); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXRvbS11dGlscy5qcyIsInNvdXJjZVJvb3QiOiIuLiIsInNvdXJjZXMiOlsibGliL2F0b20tdXRpbHMuY29mZmVlIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFDQTtFQUFBLE1BQU0sQ0FBQyxPQUFQLEdBQ0U7SUFBQSxlQUFBLEVBQWlCLFFBQUEsQ0FBQSxHQUFDLFFBQUQsQ0FBQTthQUNmLElBQUksT0FBSixDQUFZLFFBQUEsQ0FBQyxPQUFELEVBQVUsTUFBVixDQUFBO0FBQ2hCLFlBQUEsUUFBQSxFQUFBLE9BQUEsRUFBQSxRQUFBLEVBQUE7UUFBTSxRQUFBLEdBQVc7UUFDWCxRQUFBLEdBQVc7UUFDWCxPQUFBLEdBQVUsUUFBUSxDQUFDO1FBRW5CLE1BQUEsR0FBUyxRQUFBLENBQUEsQ0FBQTtVQUNQLE9BQUE7VUFDQSxJQUFjLE9BQUEsS0FBVyxDQUF6QjtBQUFBLG1CQUFBOztVQUNBLElBQTJCLFFBQVEsQ0FBQyxNQUFULEdBQWtCLENBQTdDO0FBQUEsbUJBQU8sTUFBQSxDQUFPLFFBQVAsRUFBUDs7aUJBQ0EsT0FBQSxDQUFRLFFBQVI7UUFKTztlQU1ULFFBQVEsQ0FBQyxPQUFULENBQWlCLFFBQUEsQ0FBQyxHQUFELEVBQU0sQ0FBTixDQUFBO0FBQ3ZCLGNBQUEsV0FBQSxFQUFBO1VBQVEsV0FBQSxHQUFjLFFB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gJy4vbWl4aW5zL2V2ZW50cy1kZWxlZ2F0aW9uJ1xuICBTcGFjZVBlbkRTTDogcmVxdWlyZSAnLi9taXhpbnMvc3BhY2UtcGVuLWRzbCdcbiJdfQ== + //# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/atom-utils.coffee + + +var $9f189d28e7df4568$exports = {}; +"use strict"; +var $84d1fb97071bc6c2$exports = {}; +"use strict"; +var $84d1fb97071bc6c2$var$utils = $84d1fb97071bc6c2$exports = {}; +/** + * Loops through the collection and calls the callback for each element. if the callback returns truthy, the loop is broken and returns the same value. + * @public + * @param {*} collection The collection to loop through. Needs to have a length property set and have indices set from 0 to length - 1. + * @param {function} callback The callback to be called for each element. The element will be given as a parameter to the callback. If this callback returns truthy, the loop is broken and the same value is returned. + * @returns {*} The value that a callback has returned (if truthy). Otherwise nothing. + */ $84d1fb97071bc6c2$var$utils.forEach = function(collection, callback) { + for(var i = 0; i < collection.length; i++){ + var result = callback(collection[i]); + if (result) return result; + } +}; + + +var $9f189d28e7df4568$require$forEach = $84d1fb97071bc6c2$exports.forEach; +var $51a2a8167cce3dd9$exports = {}; +"use strict"; +$51a2a8167cce3dd9$exports = function(options) { + var getState = options.stateHandler.getState; + /** + * Tells if the element has been made detectable and ready to be listened for resize events. + * @public + * @param {element} The element to check. + * @returns {boolean} True or false depending on if the element is detectable or not. + */ function isDetectable(element) { + var state = getState(element); + return state && !!state.isDetectable; + } + /** + * Marks the element that it has been made detectable and ready to be listened for resize events. + * @public + * @param {element} The element to mark. + */ function markAsDetectable(element) { + getState(element).isDetectable = true; + } + /** + * Tells if the element is busy or not. + * @public + * @param {element} The element to check. + * @returns {boolean} True or false depending on if the element is busy or not. + */ function isBusy(element) { + return !!getState(element).busy; + } + /** + * Marks the object is busy and should not be made detectable. + * @public + * @param {element} element The element to mark. + * @param {boolean} busy If the element is busy or not. + */ function markBusy(element, busy) { + getState(element).busy = !!busy; + } + return { + isDetectable: isDetectable, + markAsDetectable: markAsDetectable, + isBusy: isBusy, + markBusy: markBusy + }; +}; + + +var $501709e7730d4dbf$exports = {}; +"use strict"; +$501709e7730d4dbf$exports = function(idHandler) { + var eventListeners = {}; + /** + * Gets all listeners for the given element. + * @public + * @param {element} element The element to get all listeners for. + * @returns All listeners for the given element. + */ function getListeners(element) { + var id = idHandler.get(element); + if (id === undefined) return []; + return eventListeners[id] || []; + } + /** + * Stores the given listener for the given element. Will not actually add the listener to the element. + * @public + * @param {element} element The element that should have the listener added. + * @param {function} listener The callback that the element has added. + */ function addListener(element, listener) { + var id = idHandler.get(element); + if (!eventListeners[id]) eventListeners[id] = []; + eventListeners[id].push(listener); + } + function removeListener(element, listener) { + var listeners = getListeners(element); + for(var i = 0, len = listeners.length; i < len; ++i)if (listeners[i] === listener) { + listeners.splice(i, 1); + break; + } + } + function removeAllListeners(element) { + var listeners = getListeners(element); + if (!listeners) return; + listeners.length = 0; + } + return { + get: getListeners, + add: addListener, + removeListener: removeListener, + removeAllListeners: removeAllListeners + }; +}; + + +var $65f9007b250f3f7b$exports = {}; +"use strict"; +$65f9007b250f3f7b$exports = function() { + var idCount = 1; + /** + * Generates a new unique id in the context. + * @public + * @returns {number} A unique id in the context. + */ function generate() { + return idCount++; + } + return { + generate: generate + }; +}; + + +var $1cf1365bfb4ae3b3$exports = {}; +"use strict"; +$1cf1365bfb4ae3b3$exports = function(options) { + var idGenerator = options.idGenerator; + var getState = options.stateHandler.getState; + /** + * Gets the resize detector id of the element. + * @public + * @param {element} element The target element to get the id of. + * @returns {string|number|null} The id of the element. Null if it has no id. + */ function getId(element) { + var state = getState(element); + if (state && state.id !== undefined) return state.id; + return null; + } + /** + * Sets the resize detector id of the element. Requires the element to have a resize detector state initialized. + * @public + * @param {element} element The target element to set the id of. + * @returns {string|number|null} The id of the element. + */ function setId(element) { + var state = getState(element); + if (!state) throw new Error("setId required the element to have a resize detection state."); + var id = idGenerator.generate(); + state.id = id; + return id; + } + return { + get: getId, + set: setId + }; +}; + + +var $ed44fc4436368bc2$exports = {}; +"use strict"; +/* global console: false */ /** + * Reporter that handles the reporting of logs, warnings and errors. + * @public + * @param {boolean} quiet Tells if the reporter should be quiet or not. + */ $ed44fc4436368bc2$exports = function(quiet) { + function noop() { + //Does nothing. + } + var reporter = { + log: noop, + warn: noop, + error: noop + }; + if (!quiet && window.console) { + var attachFunction = function(reporter, name) { + //The proxy is needed to be able to call the method with the console context, + //since we cannot use bind. + reporter[name] = function reporterProxy() { + var f = console[name]; + if (f.apply) f.apply(console, arguments); + else for(var i = 0; i < arguments.length; i++)f(arguments[i]); + }; + }; + attachFunction(reporter, "log"); + attachFunction(reporter, "warn"); + attachFunction(reporter, "error"); + } + return reporter; +}; + + +var $fa8ae4c8cb8cc789$exports = {}; +"use strict"; +var $fa8ae4c8cb8cc789$var$detector = $fa8ae4c8cb8cc789$exports = {}; +$fa8ae4c8cb8cc789$var$detector.isIE = function(version) { + function isAnyIeVersion() { + var agent = navigator.userAgent.toLowerCase(); + return agent.indexOf("msie") !== -1 || agent.indexOf("trident") !== -1 || agent.indexOf(" edge/") !== -1; + } + if (!isAnyIeVersion()) return false; + if (!version) return true; + //Shamelessly stolen from https://gist.github.com/padolsey/527683 + var ieVersion = function() { + var undef, v = 3, div = document.createElement("div"), all = div.getElementsByTagName("i"); + do div.innerHTML = ""; + while (all[0]); + return v > 4 ? v : undef; + }(); + return version === ieVersion; +}; +$fa8ae4c8cb8cc789$var$detector.isLegacyOpera = function() { + return !!window.opera; +}; + + +var $7bbc4f11c6dd259e$exports = {}; +"use strict"; +var $3a1519b48d703550$exports = {}; +"use strict"; +var $3a1519b48d703550$var$utils = $3a1519b48d703550$exports = {}; +$3a1519b48d703550$var$utils.getOption = $3a1519b48d703550$var$getOption; +function $3a1519b48d703550$var$getOption(options, name, defaultValue) { + var value = options[name]; + if ((value === undefined || value === null) && defaultValue !== undefined) return defaultValue; + return value; +} + + +$7bbc4f11c6dd259e$exports = function batchProcessorMaker(options) { + options = options || {}; + var reporter = options.reporter; + var asyncProcess = $3a1519b48d703550$exports.getOption(options, "async", true); + var autoProcess = $3a1519b48d703550$exports.getOption(options, "auto", true); + if (autoProcess && !asyncProcess) { + reporter && reporter.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."); + asyncProcess = true; + } + var batch = $7bbc4f11c6dd259e$var$Batch(); + var asyncFrameHandler; + var isProcessing = false; + function addFunction(level, fn) { + if (!isProcessing && autoProcess && asyncProcess && batch.size() === 0) // Since this is async, it is guaranteed to be executed after that the fn is added to the batch. + // This needs to be done before, since we're checking the size of the batch to be 0. + processBatchAsync(); + batch.add(level, fn); + } + function processBatch() { + // Save the current batch, and create a new batch so that incoming functions are not added into the currently processing batch. + // Continue processing until the top-level batch is empty (functions may be added to the new batch while processing, and so on). + isProcessing = true; + while(batch.size()){ + var processingBatch = batch; + batch = $7bbc4f11c6dd259e$var$Batch(); + processingBatch.process(); + } + isProcessing = false; + } + function forceProcessBatch(localAsyncProcess) { + if (isProcessing) return; + if (localAsyncProcess === undefined) localAsyncProcess = asyncProcess; + if (asyncFrameHandler) { + cancelFrame(asyncFrameHandler); + asyncFrameHandler = null; + } + if (localAsyncProcess) processBatchAsync(); + else processBatch(); + } + function processBatchAsync() { + asyncFrameHandler = requestFrame(processBatch); + } + function clearBatch() { + batch = {}; + batchSize = 0; + topLevel = 0; + bottomLevel = 0; + } + function cancelFrame(listener) { + // var cancel = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.clearTimeout; + var cancel = clearTimeout; + return cancel(listener); + } + function requestFrame(callback) { + // var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function(fn) { return window.setTimeout(fn, 20); }; + var raf = function(fn) { + return setTimeout(fn, 0); + }; + return raf(callback); + } + return { + add: addFunction, + force: forceProcessBatch + }; +}; +function $7bbc4f11c6dd259e$var$Batch() { + var batch = {}; + var size = 0; + var topLevel1 = 0; + var bottomLevel1 = 0; + function add(level, fn) { + if (!fn) { + fn = level; + level = 0; + } + if (level > topLevel1) topLevel1 = level; + else if (level < bottomLevel1) bottomLevel1 = level; + if (!batch[level]) batch[level] = []; + batch[level].push(fn); + size++; + } + function process() { + for(var level = bottomLevel1; level <= topLevel1; level++){ + var fns = batch[level]; + for(var i = 0; i < fns.length; i++){ + var fn = fns[i]; + fn(); + } + } + } + function getSize() { + return size; + } + return { + add: add, + process: process, + size: getSize + }; +} + + +var $2c1563dabf9a2049$exports = {}; +"use strict"; +var $2c1563dabf9a2049$var$prop = "_erd"; +function $2c1563dabf9a2049$var$initState(element) { + element[$2c1563dabf9a2049$var$prop] = {}; + return $2c1563dabf9a2049$var$getState(element); +} +function $2c1563dabf9a2049$var$getState(element) { + return element[$2c1563dabf9a2049$var$prop]; +} +function $2c1563dabf9a2049$var$cleanState(element) { + delete element[$2c1563dabf9a2049$var$prop]; +} +$2c1563dabf9a2049$exports = { + initState: $2c1563dabf9a2049$var$initState, + getState: $2c1563dabf9a2049$var$getState, + cleanState: $2c1563dabf9a2049$var$cleanState +}; + + +var $1bf73006fbcd52cf$exports = {}; +/** + * Resize detection strategy that injects objects to elements in order to detect resize events. + * Heavily inspired by: http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/ + */ "use strict"; + +$1bf73006fbcd52cf$exports = function(options) { + options = options || {}; + var reporter = options.reporter; + var batchProcessor = options.batchProcessor; + var getState = options.stateHandler.getState; + if (!reporter) throw new Error("Missing required dependency: reporter."); + /** + * Adds a resize event listener to the element. + * @public + * @param {element} element The element that should have the listener added. + * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback. + */ function addListener(element, listener) { + function listenerProxy() { + listener(element); + } + if ($fa8ae4c8cb8cc789$exports.isIE(8)) { + //IE 8 does not support object, but supports the resize event directly on elements. + getState(element).object = { + proxy: listenerProxy + }; + element.attachEvent("onresize", listenerProxy); + } else { + var object = getObject(element); + if (!object) throw new Error("Element is not detectable by this strategy."); + object.contentDocument.defaultView.addEventListener("resize", listenerProxy); + } + } + function buildCssTextString(rules) { + var seperator = options.important ? " !important; " : "; "; + return (rules.join(seperator) + seperator).trim(); + } + /** + * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes. + * @private + * @param {object} options Optional options object. + * @param {element} element The element to make detectable + * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter. + */ function makeDetectable(options, element, callback) { + if (!callback) { + callback = element; + element = options; + options = null; + } + options = options || {}; + var debug = options.debug; + function injectObject(element, callback) { + var OBJECT_STYLE = buildCssTextString([ + "display: block", + "position: absolute", + "top: 0", + "left: 0", + "width: 100%", + "height: 100%", + "border: none", + "padding: 0", + "margin: 0", + "opacity: 0", + "z-index: -1000", + "pointer-events: none" + ]); + //The target element needs to be positioned (everything except static) so the absolute positioned object will be positioned relative to the target element. + // Position altering may be performed directly or on object load, depending on if style resolution is possible directly or not. + var positionCheckPerformed = false; + // The element may not yet be attached to the DOM, and therefore the style object may be empty in some browsers. + // Since the style object is a reference, it will be updated as soon as the element is attached to the DOM. + var style = window.getComputedStyle(element); + var width = element.offsetWidth; + var height = element.offsetHeight; + getState(element).startSize = { + width: width, + height: height + }; + function mutateDom() { + function alterPositionStyles() { + if (style.position === "static") { + element.style.setProperty("position", "relative", options.important ? "important" : ""); + var removeRelativeStyles = function(reporter, element, style, property) { + function getNumericalValue(value) { + return value.replace(/[^-\d\.]/g, ""); + } + var value = style[property]; + if (value !== "auto" && getNumericalValue(value) !== "0") { + reporter.warn("An element that is positioned static has style." + property + "=" + value + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + property + " will be set to 0. Element: ", element); + element.style.setProperty(property, "0", options.important ? "important" : ""); + } + }; + //Check so that there are no accidental styles that will make the element styled differently now that is is relative. + //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway). + removeRelativeStyles(reporter, element, style, "top"); + removeRelativeStyles(reporter, element, style, "right"); + removeRelativeStyles(reporter, element, style, "bottom"); + removeRelativeStyles(reporter, element, style, "left"); + } + } + function onObjectLoad() { + // The object has been loaded, which means that the element now is guaranteed to be attached to the DOM. + if (!positionCheckPerformed) alterPositionStyles(); + /*jshint validthis: true */ function getDocument(element, callback) { + //Opera 12 seem to call the object.onload before the actual document has been created. + //So if it is not present, poll it with an timeout until it is present. + //TODO: Could maybe be handled better with object.onreadystatechange or similar. + if (!element.contentDocument) { + var state = getState(element); + if (state.checkForObjectDocumentTimeoutId) window.clearTimeout(state.checkForObjectDocumentTimeoutId); + state.checkForObjectDocumentTimeoutId = setTimeout(function checkForObjectDocument() { + state.checkForObjectDocumentTimeoutId = 0; + getDocument(element, callback); + }, 100); + return; + } + callback(element.contentDocument); + } + //Mutating the object element here seems to fire another load event. + //Mutating the inner document of the object element is fine though. + var objectElement = this; + //Create the style element to be added to the object. + getDocument(objectElement, function onObjectDocumentReady(objectDocument) { + //Notify that the element is ready to be listened to. + callback(element); + }); + } + // The element may be detached from the DOM, and some browsers does not support style resolving of detached elements. + // The alterPositionStyles needs to be delayed until we know the element has been attached to the DOM (which we are sure of when the onObjectLoad has been fired), if style resolution is not possible. + if (style.position !== "") { + alterPositionStyles(style); + positionCheckPerformed = true; + } + //Add an object element as a child to the target element that will be listened to for resize events. + var object = document.createElement("object"); + object.style.cssText = OBJECT_STYLE; + object.tabIndex = -1; + object.type = "text/html"; + object.setAttribute("aria-hidden", "true"); + object.onload = onObjectLoad; + //Safari: This must occur before adding the object to the DOM. + //IE: Does not like that this happens before, even if it is also added after. + if (!$fa8ae4c8cb8cc789$exports.isIE()) object.data = "about:blank"; + if (!getState(element)) // The element has been uninstalled before the actual loading happened. + return; + element.appendChild(object); + getState(element).object = object; + //IE: This must occur after adding the object to the DOM. + if ($fa8ae4c8cb8cc789$exports.isIE()) object.data = "about:blank"; + } + if (batchProcessor) batchProcessor.add(mutateDom); + else mutateDom(); + } + if ($fa8ae4c8cb8cc789$exports.isIE(8)) //IE 8 does not support objects properly. Luckily they do support the resize event. + //So do not inject the object and notify that the element is already ready to be listened to. + //The event handler for the resize event is attached in the utils.addListener instead. + callback(element); + else injectObject(element, callback); + } + /** + * Returns the child object of the target element. + * @private + * @param {element} element The target element. + * @returns The object element of the target. + */ function getObject(element) { + return getState(element).object; + } + function uninstall(element) { + if (!getState(element)) return; + var object = getObject(element); + if (!object) return; + if ($fa8ae4c8cb8cc789$exports.isIE(8)) element.detachEvent("onresize", object.proxy); + else element.removeChild(object); + if (getState(element).checkForObjectDocumentTimeoutId) window.clearTimeout(getState(element).checkForObjectDocumentTimeoutId); + delete getState(element).object; + } + return { + makeDetectable: makeDetectable, + addListener: addListener, + uninstall: uninstall + }; +}; + + +var $9d869d60b84129a0$exports = {}; +/** + * Resize detection strategy that injects divs to elements in order to detect resize events on scroll events. + * Heavily inspired by: https://github.com/marcj/css-element-queries/blob/master/src/ResizeSensor.js + */ "use strict"; + +var $9d869d60b84129a0$require$forEach = $84d1fb97071bc6c2$exports.forEach; +$9d869d60b84129a0$exports = function(options) { + options = options || {}; + var reporter = options.reporter; + var batchProcessor = options.batchProcessor; + var getState = options.stateHandler.getState; + var hasState = options.stateHandler.hasState; + var idHandler = options.idHandler; + if (!batchProcessor) throw new Error("Missing required dependency: batchProcessor"); + if (!reporter) throw new Error("Missing required dependency: reporter."); + //TODO: Could this perhaps be done at installation time? + var scrollbarSizes = getScrollbarSizes(); + var styleId = "erd_scroll_detection_scrollbar_style"; + var detectionContainerClass = "erd_scroll_detection_container"; + function initDocument(targetDocument) { + // Inject the scrollbar styling that prevents them from appearing sometimes in Chrome. + // The injected container needs to have a class, so that it may be styled with CSS (pseudo elements). + injectScrollStyle(targetDocument, styleId, detectionContainerClass); + } + initDocument(window.document); + function buildCssTextString(rules) { + var seperator = options.important ? " !important; " : "; "; + return (rules.join(seperator) + seperator).trim(); + } + function getScrollbarSizes() { + var width = 500; + var height = 500; + var child = document.createElement("div"); + child.style.cssText = buildCssTextString([ + "position: absolute", + "width: " + width * 2 + "px", + "height: " + height * 2 + "px", + "visibility: hidden", + "margin: 0", + "padding: 0" + ]); + var container = document.createElement("div"); + container.style.cssText = buildCssTextString([ + "position: absolute", + "width: " + width + "px", + "height: " + height + "px", + "overflow: scroll", + "visibility: none", + "top: " + -width * 3 + "px", + "left: " + -height * 3 + "px", + "visibility: hidden", + "margin: 0", + "padding: 0" + ]); + container.appendChild(child); + document.body.insertBefore(container, document.body.firstChild); + var widthSize = width - container.clientWidth; + var heightSize = height - container.clientHeight; + document.body.removeChild(container); + return { + width: widthSize, + height: heightSize + }; + } + function injectScrollStyle(targetDocument, styleId, containerClass) { + function injectStyle(style, method) { + method = method || function(element) { + targetDocument.head.appendChild(element); + }; + var styleElement = targetDocument.createElement("style"); + styleElement.innerHTML = style; + styleElement.id = styleId; + method(styleElement); + return styleElement; + } + if (!targetDocument.getElementById(styleId)) { + var containerAnimationClass = containerClass + "_animation"; + var containerAnimationActiveClass = containerClass + "_animation_active"; + var style = "/* Created by the element-resize-detector library. */\n"; + style += "." + containerClass + " > div::-webkit-scrollbar { " + buildCssTextString([ + "display: none" + ]) + " }\n\n"; + style += "." + containerAnimationActiveClass + " { " + buildCssTextString([ + "-webkit-animation-duration: 0.1s", + "animation-duration: 0.1s", + "-webkit-animation-name: " + containerAnimationClass, + "animation-name: " + containerAnimationClass + ]) + " }\n"; + style += "@-webkit-keyframes " + containerAnimationClass + " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n"; + style += "@keyframes " + containerAnimationClass + " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }"; + injectStyle(style); + } + } + function addAnimationClass(element) { + element.className += " " + detectionContainerClass + "_animation_active"; + } + function addEvent(el, name, cb) { + if (el.addEventListener) el.addEventListener(name, cb); + else if (el.attachEvent) el.attachEvent("on" + name, cb); + else return reporter.error("[scroll] Don't know how to add event listeners."); + } + function removeEvent(el, name, cb) { + if (el.removeEventListener) el.removeEventListener(name, cb); + else if (el.detachEvent) el.detachEvent("on" + name, cb); + else return reporter.error("[scroll] Don't know how to remove event listeners."); + } + function getExpandElement(element) { + return getState(element).container.childNodes[0].childNodes[0].childNodes[0]; + } + function getShrinkElement(element) { + return getState(element).container.childNodes[0].childNodes[0].childNodes[1]; + } + /** + * Adds a resize event listener to the element. + * @public + * @param {element} element The element that should have the listener added. + * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback. + */ function addListener(element, listener) { + var listeners = getState(element).listeners; + if (!listeners.push) throw new Error("Cannot add listener to an element that is not detectable."); + getState(element).listeners.push(listener); + } + /** + * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes. + * @private + * @param {object} options Optional options object. + * @param {element} element The element to make detectable + * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter. + */ function makeDetectable(options, element, callback) { + if (!callback) { + callback = element; + element = options; + options = null; + } + options = options || {}; + function debug() { + if (options.debug) { + var args = Array.prototype.slice.call(arguments); + args.unshift(idHandler.get(element), "Scroll: "); + if (reporter.log.apply) reporter.log.apply(null, args); + else for(var i = 0; i < args.length; i++)reporter.log(args[i]); + } + } + function isDetached(element) { + function isInDocument(element) { + var isInShadowRoot = element.getRootNode && element.getRootNode().contains(element); + return element === element.ownerDocument.body || element.ownerDocument.body.contains(element) || isInShadowRoot; + } + if (!isInDocument(element)) return true; + // FireFox returns null style in hidden iframes. See https://github.com/wnr/element-resize-detector/issues/68 and https://bugzilla.mozilla.org/show_bug.cgi?id=795520 + if (window.getComputedStyle(element) === null) return true; + return false; + } + function isUnrendered(element) { + // Check the absolute positioned container since the top level container is display: inline. + var container = getState(element).container.childNodes[0]; + var style = window.getComputedStyle(container); + return !style.width || style.width.indexOf("px") === -1; //Can only compute pixel value when rendered. + } + function getStyle() { + // Some browsers only force layouts when actually reading the style properties of the style object, so make sure that they are all read here, + // so that the user of the function can be sure that it will perform the layout here, instead of later (important for batching). + var elementStyle = window.getComputedStyle(element); + var style = {}; + style.position = elementStyle.position; + style.width = element.offsetWidth; + style.height = element.offsetHeight; + style.top = elementStyle.top; + style.right = elementStyle.right; + style.bottom = elementStyle.bottom; + style.left = elementStyle.left; + style.widthCSS = elementStyle.width; + style.heightCSS = elementStyle.height; + return style; + } + function storeStartSize() { + var style = getStyle(); + getState(element).startSize = { + width: style.width, + height: style.height + }; + debug("Element start size", getState(element).startSize); + } + function initListeners() { + getState(element).listeners = []; + } + function storeStyle() { + debug("storeStyle invoked."); + if (!getState(element)) { + debug("Aborting because element has been uninstalled"); + return; + } + var style = getStyle(); + getState(element).style = style; + } + function storeCurrentSize(element, width, height) { + getState(element).lastWidth = width; + getState(element).lastHeight = height; + } + function getExpandChildElement(element) { + return getExpandElement(element).childNodes[0]; + } + function getWidthOffset() { + return 2 * scrollbarSizes.width + 1; + } + function getHeightOffset() { + return 2 * scrollbarSizes.height + 1; + } + function getExpandWidth(width) { + return width + 10 + getWidthOffset(); + } + function getExpandHeight(height) { + return height + 10 + getHeightOffset(); + } + function getShrinkWidth(width) { + return width * 2 + getWidthOffset(); + } + function getShrinkHeight(height) { + return height * 2 + getHeightOffset(); + } + function positionScrollbars(element, width, height) { + var expand = getExpandElement(element); + var shrink = getShrinkElement(element); + var expandWidth = getExpandWidth(width); + var expandHeight = getExpandHeight(height); + var shrinkWidth = getShrinkWidth(width); + var shrinkHeight = getShrinkHeight(height); + expand.scrollLeft = expandWidth; + expand.scrollTop = expandHeight; + shrink.scrollLeft = shrinkWidth; + shrink.scrollTop = shrinkHeight; + } + function injectContainerElement() { + var container = getState(element).container; + if (!container) { + container = document.createElement("div"); + container.className = detectionContainerClass; + container.style.cssText = buildCssTextString([ + "visibility: hidden", + "display: inline", + "width: 0px", + "height: 0px", + "z-index: -1", + "overflow: hidden", + "margin: 0", + "padding: 0" + ]); + getState(element).container = container; + addAnimationClass(container); + element.appendChild(container); + var onAnimationStart = function() { + getState(element).onRendered && getState(element).onRendered(); + }; + addEvent(container, "animationstart", onAnimationStart); + // Store the event handler here so that they may be removed when uninstall is called. + // See uninstall function for an explanation why it is needed. + getState(element).onAnimationStart = onAnimationStart; + } + return container; + } + function injectScrollElements() { + function alterPositionStyles() { + var style = getState(element).style; + if (style.position === "static") { + element.style.setProperty("position", "relative", options.important ? "important" : ""); + var removeRelativeStyles = function(reporter, element, style, property) { + function getNumericalValue(value) { + return value.replace(/[^-\d\.]/g, ""); + } + var value = style[property]; + if (value !== "auto" && getNumericalValue(value) !== "0") { + reporter.warn("An element that is positioned static has style." + property + "=" + value + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + property + " will be set to 0. Element: ", element); + element.style[property] = 0; + } + }; + //Check so that there are no accidental styles that will make the element styled differently now that is is relative. + //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway). + removeRelativeStyles(reporter, element, style, "top"); + removeRelativeStyles(reporter, element, style, "right"); + removeRelativeStyles(reporter, element, style, "bottom"); + removeRelativeStyles(reporter, element, style, "left"); + } + } + function getLeftTopBottomRightCssText(left, top, bottom, right) { + left = !left ? "0" : left + "px"; + top = !top ? "0" : top + "px"; + bottom = !bottom ? "0" : bottom + "px"; + right = !right ? "0" : right + "px"; + return [ + "left: " + left, + "top: " + top, + "right: " + right, + "bottom: " + bottom + ]; + } + debug("Injecting elements"); + if (!getState(element)) { + debug("Aborting because element has been uninstalled"); + return; + } + alterPositionStyles(); + var rootContainer = getState(element).container; + if (!rootContainer) rootContainer = injectContainerElement(); + // Due to this WebKit bug https://bugs.webkit.org/show_bug.cgi?id=80808 (currently fixed in Blink, but still present in WebKit browsers such as Safari), + // we need to inject two containers, one that is width/height 100% and another that is left/top -1px so that the final container always is 1x1 pixels bigger than + // the targeted element. + // When the bug is resolved, "containerContainer" may be removed. + // The outer container can occasionally be less wide than the targeted when inside inline elements element in WebKit (see https://bugs.webkit.org/show_bug.cgi?id=152980). + // This should be no problem since the inner container either way makes sure the injected scroll elements are at least 1x1 px. + var scrollbarWidth = scrollbarSizes.width; + var scrollbarHeight = scrollbarSizes.height; + var containerContainerStyle = buildCssTextString([ + "position: absolute", + "flex: none", + "overflow: hidden", + "z-index: -1", + "visibility: hidden", + "width: 100%", + "height: 100%", + "left: 0px", + "top: 0px" + ]); + var containerStyle = buildCssTextString([ + "position: absolute", + "flex: none", + "overflow: hidden", + "z-index: -1", + "visibility: hidden" + ].concat(getLeftTopBottomRightCssText(-(1 + scrollbarWidth), -(1 + scrollbarHeight), -scrollbarHeight, -scrollbarWidth))); + var expandStyle = buildCssTextString([ + "position: absolute", + "flex: none", + "overflow: scroll", + "z-index: -1", + "visibility: hidden", + "width: 100%", + "height: 100%" + ]); + var shrinkStyle = buildCssTextString([ + "position: absolute", + "flex: none", + "overflow: scroll", + "z-index: -1", + "visibility: hidden", + "width: 100%", + "height: 100%" + ]); + var expandChildStyle = buildCssTextString([ + "position: absolute", + "left: 0", + "top: 0" + ]); + var shrinkChildStyle = buildCssTextString([ + "position: absolute", + "width: 200%", + "height: 200%" + ]); + var containerContainer = document.createElement("div"); + var container = document.createElement("div"); + var expand = document.createElement("div"); + var expandChild = document.createElement("div"); + var shrink = document.createElement("div"); + var shrinkChild = document.createElement("div"); + // Some browsers choke on the resize system being rtl, so force it to ltr. https://github.com/wnr/element-resize-detector/issues/56 + // However, dir should not be set on the top level container as it alters the dimensions of the target element in some browsers. + containerContainer.dir = "ltr"; + containerContainer.style.cssText = containerContainerStyle; + containerContainer.className = detectionContainerClass; + container.className = detectionContainerClass; + container.style.cssText = containerStyle; + expand.style.cssText = expandStyle; + expandChild.style.cssText = expandChildStyle; + shrink.style.cssText = shrinkStyle; + shrinkChild.style.cssText = shrinkChildStyle; + expand.appendChild(expandChild); + shrink.appendChild(shrinkChild); + container.appendChild(expand); + container.appendChild(shrink); + containerContainer.appendChild(container); + rootContainer.appendChild(containerContainer); + function onExpandScroll() { + var state = getState(element); + if (state && state.onExpand) state.onExpand(); + else debug("Aborting expand scroll handler: element has been uninstalled"); + } + function onShrinkScroll() { + var state = getState(element); + if (state && state.onShrink) state.onShrink(); + else debug("Aborting shrink scroll handler: element has been uninstalled"); + } + addEvent(expand, "scroll", onExpandScroll); + addEvent(shrink, "scroll", onShrinkScroll); + // Store the event handlers here so that they may be removed when uninstall is called. + // See uninstall function for an explanation why it is needed. + getState(element).onExpandScroll = onExpandScroll; + getState(element).onShrinkScroll = onShrinkScroll; + } + function registerListenersAndPositionElements() { + function updateChildSizes(element, width, height) { + var expandChild = getExpandChildElement(element); + var expandWidth = getExpandWidth(width); + var expandHeight = getExpandHeight(height); + expandChild.style.setProperty("width", expandWidth + "px", options.important ? "important" : ""); + expandChild.style.setProperty("height", expandHeight + "px", options.important ? "important" : ""); + } + function updateDetectorElements(done) { + var width = element.offsetWidth; + var height = element.offsetHeight; + // Check whether the size has actually changed since last time the algorithm ran. If not, some steps may be skipped. + var sizeChanged = width !== getState(element).lastWidth || height !== getState(element).lastHeight; + debug("Storing current size", width, height); + // Store the size of the element sync here, so that multiple scroll events may be ignored in the event listeners. + // Otherwise the if-check in handleScroll is useless. + storeCurrentSize(element, width, height); + // Since we delay the processing of the batch, there is a risk that uninstall has been called before the batch gets to execute. + // Since there is no way to cancel the fn executions, we need to add an uninstall guard to all fns of the batch. + batchProcessor.add(0, function performUpdateChildSizes() { + if (!sizeChanged) return; + if (!getState(element)) { + debug("Aborting because element has been uninstalled"); + return; + } + if (!areElementsInjected()) { + debug("Aborting because element container has not been initialized"); + return; + } + if (options.debug) { + var w = element.offsetWidth; + var h = element.offsetHeight; + if (w !== width || h !== height) reporter.warn(idHandler.get(element), "Scroll: Size changed before updating detector elements."); + } + updateChildSizes(element, width, height); + }); + batchProcessor.add(1, function updateScrollbars() { + // This function needs to be invoked event though the size is unchanged. The element could have been resized very quickly and then + // been restored to the original size, which will have changed the scrollbar positions. + if (!getState(element)) { + debug("Aborting because element has been uninstalled"); + return; + } + if (!areElementsInjected()) { + debug("Aborting because element container has not been initialized"); + return; + } + positionScrollbars(element, width, height); + }); + if (sizeChanged && done) batchProcessor.add(2, function() { + if (!getState(element)) { + debug("Aborting because element has been uninstalled"); + return; + } + if (!areElementsInjected()) { + debug("Aborting because element container has not been initialized"); + return; + } + done(); + }); + } + function areElementsInjected() { + return !!getState(element).container; + } + function notifyListenersIfNeeded() { + function isFirstNotify() { + return getState(element).lastNotifiedWidth === undefined; + } + debug("notifyListenersIfNeeded invoked"); + var state = getState(element); + // Don't notify if the current size is the start size, and this is the first notification. + if (isFirstNotify() && state.lastWidth === state.startSize.width && state.lastHeight === state.startSize.height) return debug("Not notifying: Size is the same as the start size, and there has been no notification yet."); + // Don't notify if the size already has been notified. + if (state.lastWidth === state.lastNotifiedWidth && state.lastHeight === state.lastNotifiedHeight) return debug("Not notifying: Size already notified"); + debug("Current size not notified, notifying..."); + state.lastNotifiedWidth = state.lastWidth; + state.lastNotifiedHeight = state.lastHeight; + $9d869d60b84129a0$require$forEach(getState(element).listeners, function(listener) { + listener(element); + }); + } + function handleRender() { + debug("startanimation triggered."); + if (isUnrendered(element)) { + debug("Ignoring since element is still unrendered..."); + return; + } + debug("Element rendered."); + var expand = getExpandElement(element); + var shrink = getShrinkElement(element); + if (expand.scrollLeft === 0 || expand.scrollTop === 0 || shrink.scrollLeft === 0 || shrink.scrollTop === 0) { + debug("Scrollbars out of sync. Updating detector elements..."); + updateDetectorElements(notifyListenersIfNeeded); + } + } + function handleScroll() { + debug("Scroll detected."); + if (isUnrendered(element)) { + // Element is still unrendered. Skip this scroll event. + debug("Scroll event fired while unrendered. Ignoring..."); + return; + } + updateDetectorElements(notifyListenersIfNeeded); + } + debug("registerListenersAndPositionElements invoked."); + if (!getState(element)) { + debug("Aborting because element has been uninstalled"); + return; + } + getState(element).onRendered = handleRender; + getState(element).onExpand = handleScroll; + getState(element).onShrink = handleScroll; + var style = getState(element).style; + updateChildSizes(element, style.width, style.height); + } + function finalizeDomMutation() { + debug("finalizeDomMutation invoked."); + if (!getState(element)) { + debug("Aborting because element has been uninstalled"); + return; + } + var style = getState(element).style; + storeCurrentSize(element, style.width, style.height); + positionScrollbars(element, style.width, style.height); + } + function ready() { + callback(element); + } + function install() { + debug("Installing..."); + initListeners(); + storeStartSize(); + batchProcessor.add(0, storeStyle); + batchProcessor.add(1, injectScrollElements); + batchProcessor.add(2, registerListenersAndPositionElements); + batchProcessor.add(3, finalizeDomMutation); + batchProcessor.add(4, ready); + } + debug("Making detectable..."); + if (isDetached(element)) { + debug("Element is detached"); + injectContainerElement(); + debug("Waiting until element is attached..."); + getState(element).onRendered = function() { + debug("Element is now attached"); + install(); + }; + } else install(); + } + function uninstall(element) { + var state = getState(element); + if (!state) // Uninstall has been called on a non-erd element. + return; + // Uninstall may have been called in the following scenarios: + // (1) Right between the sync code and async batch (here state.busy = true, but nothing have been registered or injected). + // (2) In the ready callback of the last level of the batch by another element (here, state.busy = true, but all the stuff has been injected). + // (3) After the installation process (here, state.busy = false and all the stuff has been injected). + // So to be on the safe side, let's check for each thing before removing. + // We need to remove the event listeners, because otherwise the event might fire on an uninstall element which results in an error when trying to get the state of the element. + state.onExpandScroll && removeEvent(getExpandElement(element), "scroll", state.onExpandScroll); + state.onShrinkScroll && removeEvent(getShrinkElement(element), "scroll", state.onShrinkScroll); + state.onAnimationStart && removeEvent(state.container, "animationstart", state.onAnimationStart); + state.container && element.removeChild(state.container); + } + return { + makeDetectable: makeDetectable, + addListener: addListener, + uninstall: uninstall, + initDocument: initDocument + }; +}; + + +function $9f189d28e7df4568$var$isCollection(obj) { + return Array.isArray(obj) || obj.length !== undefined; +} +function $9f189d28e7df4568$var$toArray(collection) { + if (!Array.isArray(collection)) { + var array = []; + $9f189d28e7df4568$require$forEach(collection, function(obj) { + array.push(obj); + }); + return array; + } else return collection; +} +function $9f189d28e7df4568$var$isElement(obj) { + return obj && obj.nodeType === 1; +} +/** + * @typedef idHandler + * @type {object} + * @property {function} get Gets the resize detector id of the element. + * @property {function} set Generate and sets the resize detector id of the element. + */ /** + * @typedef Options + * @type {object} + * @property {boolean} callOnAdd Determines if listeners should be called when they are getting added. + Default is true. If true, the listener is guaranteed to be called when it has been added. + If false, the listener will not be guarenteed to be called when it has been added (does not prevent it from being called). + * @property {idHandler} idHandler A custom id handler that is responsible for generating, setting and retrieving id's for elements. + If not provided, a default id handler will be used. + * @property {reporter} reporter A custom reporter that handles reporting logs, warnings and errors. + If not provided, a default id handler will be used. + If set to false, then nothing will be reported. + * @property {boolean} debug If set to true, the the system will report debug messages as default for the listenTo method. + */ /** + * Creates an element resize detector instance. + * @public + * @param {Options?} options Optional global options object that will decide how this instance will work. + */ $9f189d28e7df4568$exports = function(options) { + options = options || {}; + //idHandler is currently not an option to the listenTo function, so it should not be added to globalOptions. + var idHandler; + if (options.idHandler) // To maintain compatability with idHandler.get(element, readonly), make sure to wrap the given idHandler + // so that readonly flag always is true when it's used here. This may be removed next major version bump. + idHandler = { + get: function(element) { + return options.idHandler.get(element, true); + }, + set: options.idHandler.set + }; + else { + var idGenerator = $65f9007b250f3f7b$exports(); + var defaultIdHandler = $1cf1365bfb4ae3b3$exports({ + idGenerator: idGenerator, + stateHandler: $2c1563dabf9a2049$exports + }); + idHandler = defaultIdHandler; + } + //reporter is currently not an option to the listenTo function, so it should not be added to globalOptions. + var reporter = options.reporter; + if (!reporter) { + //If options.reporter is false, then the reporter should be quiet. + var quiet = reporter === false; + reporter = $ed44fc4436368bc2$exports(quiet); + } + //batchProcessor is currently not an option to the listenTo function, so it should not be added to globalOptions. + var batchProcessor = $9f189d28e7df4568$var$getOption(options, "batchProcessor", $7bbc4f11c6dd259e$exports({ + reporter: reporter + })); + //Options to be used as default for the listenTo function. + var globalOptions = {}; + globalOptions.callOnAdd = !!$9f189d28e7df4568$var$getOption(options, "callOnAdd", true); + globalOptions.debug = !!$9f189d28e7df4568$var$getOption(options, "debug", false); + var eventListenerHandler = $501709e7730d4dbf$exports(idHandler); + var elementUtils = $51a2a8167cce3dd9$exports({ + stateHandler: $2c1563dabf9a2049$exports + }); + //The detection strategy to be used. + var detectionStrategy; + var desiredStrategy = $9f189d28e7df4568$var$getOption(options, "strategy", "object"); + var importantCssRules = $9f189d28e7df4568$var$getOption(options, "important", false); + var strategyOptions = { + reporter: reporter, + batchProcessor: batchProcessor, + stateHandler: $2c1563dabf9a2049$exports, + idHandler: idHandler, + important: importantCssRules + }; + if (desiredStrategy === "scroll") { + if ($fa8ae4c8cb8cc789$exports.isLegacyOpera()) { + reporter.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."); + desiredStrategy = "object"; + } else if ($fa8ae4c8cb8cc789$exports.isIE(9)) { + reporter.warn("Scroll strategy is not supported on IE9. Changing to object strategy."); + desiredStrategy = "object"; + } + } + if (desiredStrategy === "scroll") detectionStrategy = $9d869d60b84129a0$exports(strategyOptions); + else if (desiredStrategy === "object") detectionStrategy = $1bf73006fbcd52cf$exports(strategyOptions); + else throw new Error("Invalid strategy name: " + desiredStrategy); + //Calls can be made to listenTo with elements that are still being installed. + //Also, same elements can occur in the elements list in the listenTo function. + //With this map, the ready callbacks can be synchronized between the calls + //so that the ready callback can always be called when an element is ready - even if + //it wasn't installed from the function itself. + var onReadyCallbacks = {}; + /** + * Makes the given elements resize-detectable and starts listening to resize events on the elements. Calls the event callback for each event for each element. + * @public + * @param {Options?} options Optional options object. These options will override the global options. Some options may not be overriden, such as idHandler. + * @param {element[]|element} elements The given array of elements to detect resize events of. Single element is also valid. + * @param {function} listener The callback to be executed for each resize event for each element. + */ function listenTo(options, elements, listener) { + function onResizeCallback(element) { + var listeners = eventListenerHandler.get(element); + $9f189d28e7df4568$require$forEach(listeners, function callListenerProxy(listener) { + listener(element); + }); + } + function addListener(callOnAdd, element, listener) { + eventListenerHandler.add(element, listener); + if (callOnAdd) listener(element); + } + //Options object may be omitted. + if (!listener) { + listener = elements; + elements = options; + options = {}; + } + if (!elements) throw new Error("At least one element required."); + if (!listener) throw new Error("Listener required."); + if ($9f189d28e7df4568$var$isElement(elements)) // A single element has been passed in. + elements = [ + elements + ]; + else if ($9f189d28e7df4568$var$isCollection(elements)) // Convert collection to array for plugins. + // TODO: May want to check so that all the elements in the collection are valid elements. + elements = $9f189d28e7df4568$var$toArray(elements); + else return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements."); + var elementsReady = 0; + var callOnAdd = $9f189d28e7df4568$var$getOption(options, "callOnAdd", globalOptions.callOnAdd); + var onReadyCallback = $9f189d28e7df4568$var$getOption(options, "onReady", function noop() {}); + var debug = $9f189d28e7df4568$var$getOption(options, "debug", globalOptions.debug); + $9f189d28e7df4568$require$forEach(elements, function attachListenerToElement(element) { + if (!$2c1563dabf9a2049$exports.getState(element)) { + $2c1563dabf9a2049$exports.initState(element); + idHandler.set(element); + } + var id = idHandler.get(element); + debug && reporter.log("Attaching listener to element", id, element); + if (!elementUtils.isDetectable(element)) { + debug && reporter.log(id, "Not detectable."); + if (elementUtils.isBusy(element)) { + debug && reporter.log(id, "System busy making it detectable"); + //The element is being prepared to be detectable. Do not make it detectable. + //Just add the listener, because the element will soon be detectable. + addListener(callOnAdd, element, listener); + onReadyCallbacks[id] = onReadyCallbacks[id] || []; + onReadyCallbacks[id].push(function onReady() { + elementsReady++; + if (elementsReady === elements.length) onReadyCallback(); + }); + return; + } + debug && reporter.log(id, "Making detectable..."); + //The element is not prepared to be detectable, so do prepare it and add a listener to it. + elementUtils.markBusy(element, true); + return detectionStrategy.makeDetectable({ + debug: debug, + important: importantCssRules + }, element, function onElementDetectable(element) { + debug && reporter.log(id, "onElementDetectable"); + if ($2c1563dabf9a2049$exports.getState(element)) { + elementUtils.markAsDetectable(element); + elementUtils.markBusy(element, false); + detectionStrategy.addListener(element, onResizeCallback); + addListener(callOnAdd, element, listener); + // Since the element size might have changed since the call to "listenTo", we need to check for this change, + // so that a resize event may be emitted. + // Having the startSize object is optional (since it does not make sense in some cases such as unrendered elements), so check for its existance before. + // Also, check the state existance before since the element may have been uninstalled in the installation process. + var state = $2c1563dabf9a2049$exports.getState(element); + if (state && state.startSize) { + var width = element.offsetWidth; + var height = element.offsetHeight; + if (state.startSize.width !== width || state.startSize.height !== height) onResizeCallback(element); + } + if (onReadyCallbacks[id]) $9f189d28e7df4568$require$forEach(onReadyCallbacks[id], function(callback) { + callback(); + }); + } else // The element has been unisntalled before being detectable. + debug && reporter.log(id, "Element uninstalled before being detectable."); + delete onReadyCallbacks[id]; + elementsReady++; + if (elementsReady === elements.length) onReadyCallback(); + }); + } + debug && reporter.log(id, "Already detecable, adding listener."); + //The element has been prepared to be detectable and is ready to be listened to. + addListener(callOnAdd, element, listener); + elementsReady++; + }); + if (elementsReady === elements.length) onReadyCallback(); + } + function uninstall(elements) { + if (!elements) return reporter.error("At least one element is required."); + if ($9f189d28e7df4568$var$isElement(elements)) // A single element has been passed in. + elements = [ + elements + ]; + else if ($9f189d28e7df4568$var$isCollection(elements)) // Convert collection to array for plugins. + // TODO: May want to check so that all the elements in the collection are valid elements. + elements = $9f189d28e7df4568$var$toArray(elements); + else return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements."); + $9f189d28e7df4568$require$forEach(elements, function(element) { + eventListenerHandler.removeAllListeners(element); + detectionStrategy.uninstall(element); + $2c1563dabf9a2049$exports.cleanState(element); + }); + } + function initDocument(targetDocument) { + detectionStrategy.initDocument && detectionStrategy.initDocument(targetDocument); + } + return { + listenTo: listenTo, + removeListener: eventListenerHandler.removeListener, + removeAllListeners: eventListenerHandler.removeAllListeners, + uninstall: uninstall, + initDocument: initDocument + }; +}; +function $9f189d28e7df4568$var$getOption(options, name, defaultValue) { + var value = options[name]; + if ((value === undefined || value === null) && defaultValue !== undefined) return defaultValue; + return value; +} + + + + +var $bN1tE = parcelRequire("bN1tE"); + + +"use strict"; +let $2946613f0e118ee7$var$idCounter = 0; +const $2946613f0e118ee7$var$nextId = function() { + return $2946613f0e118ee7$var$idCounter++; +}; +class $2946613f0e118ee7$export$2e2bcd8739ae039 { + /** + * Returns `true` if the passed-in decoration properties matches the specified type. + * + * @param {Object} decorationProperties The decoration properties to match + * @param {string} type The decoration type to match + * @returns {boolean} Whether the decoration properties match the type + */ static isType(decorationProperties, type) { + if (Array.isArray(decorationProperties.type)) { + if (decorationProperties.type.indexOf(type) >= 0) return true; + return false; + } else return type === decorationProperties.type; + } + /** + * Creates a new decoration. + * + * @param {Marker} marker The target marker for the decoration + * @param {Minimap} minimap The Minimap where the decoration will be displayed + * @param {Object} properties The decoration's properties + */ constructor(marker, minimap, properties){ + /** @access private */ this.marker = marker; + /** @access private */ this.minimap = minimap; + /** @access private */ this.emitter = new (0, $cz7Pu$atom.Emitter)(); + /** @access private */ this.id = $2946613f0e118ee7$var$nextId(); + /** @access private */ this.properties = null; + this.setProperties(properties); + this.properties.id = this.id; + /** @access private */ this.destroyed = false; + /** @access private */ this.markerDestroyDisposable = this.marker.onDidDestroy(()=>{ + this.destroy(); + }); + this.screenRange = marker.getScreenRange(); + } + /** + * Destroy this marker. + * + * If you own the marker, you should use `Marker#destroy` which will destroy this decoration. + */ destroy() { + var _this_markerDestroyDisposable_dispose, _this_markerDestroyDisposable; + if (this.destroyed) return; + (_this_markerDestroyDisposable = this.markerDestroyDisposable) === null || _this_markerDestroyDisposable === void 0 ? void 0 : (_this_markerDestroyDisposable_dispose = _this_markerDestroyDisposable.dispose) === null || _this_markerDestroyDisposable_dispose === void 0 ? void 0 : _this_markerDestroyDisposable_dispose.call(_this_markerDestroyDisposable); + this.destroyed = true; + this.emitter.emit("did-destroy"); + this.emitter.dispose(); + } + /** + * Returns whether this decoration is destroyed or not. + * + * @returns {boolean} Whether this decoration is destroyed or not + */ isDestroyed() { + return this.destroyed; + } + /** + * Registers an event listener to the `did-change-properties` event. + * + * This event is triggered when the decoration update method is called. + * + * @param {function(change:Object):void} callback A function to call when the event is triggered + * @returns {Disposable} A disposable to stop listening to the event + */ onDidChangeProperties(callback) { + if (this.destroyed) return; + return this.emitter.on("did-change-properties", callback); + } + /** + * Registers an event listener to the `did-destroy` event. + * + * @param {function():void} callback A function to call when the event is triggered + * @returns {Disposable} A disposable to stop listening to the event + */ onDidDestroy(callback) { + if (this.destroyed) return; + return this.emitter.on("did-destroy", callback); + } + /** + * An id unique across all Decoration objects. + * + * @returns {number} The decoration id + */ getId() { + return this.id; + } + /** + * Returns the marker associated with this Decoration. + * + * @returns {Marker} The decoration's marker + */ getMarker() { + return this.marker; + } + /** + * Check if this decoration is of type `type`. + * + * @param {string | Array} type A type like `'line-number'`, `'line'`, etc. `type` can also be an Array of Strings, + * where it will return true if the decoration's type matches any in the array. + * @returns {boolean} Whether this decoration match the passed-in type + */ isType(type) { + return $2946613f0e118ee7$export$2e2bcd8739ae039.isType(this.properties, type); + } + /** + * Returns the Decoration's properties. + * + * @returns {Object} The decoration's properties + */ getProperties() { + return this.properties; + } + /** + * Update the marker with new properties. Allows you to change the decoration's class. + * + * @param {Object} newProperties The new properties for the decoration + */ setProperties(newProperties) { + if (this.destroyed) return; + const oldProperties = this.properties; + this.properties = newProperties; + this.properties.id = this.id; + this.emitter.emit("did-change-properties", { + oldProperties: oldProperties, + newProperties: newProperties + }); + } +} + + +"use strict"; +class $e6882a2a1b829cb4$export$2e2bcd8739ae039 { + /** Initializes the decorations related properties. */ initializeDecorations(minimap) { + this.minimap = minimap; + if (this.emitter == null) /** + * The minimap emitter, lazily created if not created yet. + * + * @type {Emitter} + * @access private + */ this.emitter = new (0, $cz7Pu$atom.Emitter)(); + else this.emitter = this.minimap.emitter; + /** + * A map with the decoration id as key and the decoration as value. + * + * @type {Object} + * @access private + */ this.decorationsById = new Map(); + /** + * The decorations stored in an array indexed with their marker id. + * + * @type {Object} + * @access private + */ this.decorationsByMarkerId = new Map(); + /** + * The subscriptions to the markers `did-change` event indexed using the marker id. + * + * @type {Object} + * @access private + */ this.decorationMarkerChangedSubscriptions = new Map(); + /** + * The subscriptions to the markers `did-destroy` event indexed using the marker id. + * + * @type {Object} + * @access private + */ this.decorationMarkerDestroyedSubscriptions = new Map(); + /** + * The subscriptions to the decorations `did-change-properties` event indexed using the decoration id. + * + * @type {Object} + * @access private + */ this.decorationUpdatedSubscriptions = new Map(); + /** + * The subscriptions to the decorations `did-destroy` event indexed using the decoration id. + * + * @type {Object} + * @access private + */ this.decorationDestroyedSubscriptions = new Map(); + // is set to true when a minimapElement is destroyed + this.destroyed = false; + } + /** + * Returns all the decorations registered in the current `Minimap`. + * + * @returns {Decoration[]} All the decorations in this `Minimap` + */ getDecorations() { + return [ + ...this.decorationsById.values() + ]; + } + /** + * Registers an event listener to the `did-add-decoration` event. + * + * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be + * called with an event object with the following properties: + * + * - Marker: the marker object that was decorated + * - Decoration: the decoration object that was created + * + * @returns {Disposable} A disposable to stop listening to the event + */ onDidAddDecoration(callback) { + return this.emitter.on("did-add-decoration", callback); + } + /** + * Registers an event listener to the `did-remove-decoration` event. + * + * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be + * called with an event object with the following properties: + * + * - Marker: the marker object that was decorated + * - Decoration: the decoration object that was created + * + * @returns {Disposable} A disposable to stop listening to the event + */ onDidRemoveDecoration(callback) { + return this.emitter.on("did-remove-decoration", callback); + } + /** + * Registers an event listener to the `did-change-decoration` event. + * + * This event is triggered when the marker targeted by the decoration was changed. + * + * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be + * called with an event object with the following properties: + * + * - Marker: the marker object that was decorated + * - Decoration: the decoration object that was created + * + * @returns {Disposable} A disposable to stop listening to the event + */ onDidChangeDecoration(callback) { + return this.emitter.on("did-change-decoration", callback); + } + /** + * Registers an event listener to the `did-change-decoration-range` event. + * + * This event is triggered when the marker range targeted by the decoration was changed. + * + * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be + * called with an event object with the following properties: + * + * - Marker: the marker object that was decorated + * - Decoration: the decoration object that was created + * + * @returns {Disposable} A disposable to stop listening to the event + */ onDidChangeDecorationRange(callback) { + return this.emitter.on("did-change-decoration-range", callback); + } + /** + * Registers an event listener to the `did-update-decoration` event. + * + * This event is triggered when the decoration itself is modified. + * + * @param {function(decoration:Decoration):void} callback A function to call when the event is triggered + * @returns {Disposable} A disposable to stop listening to the event + */ onDidUpdateDecoration(callback) { + return this.emitter.on("did-update-decoration", callback); + } + /** + * Returns the decoration with the passed-in id. + * + * @param {number} id The decoration id + * @returns {Decoration} The decoration with the given id + */ decorationForId(id) { + return this.decorationsById.get(id); + } + /** + * Returns all the decorations that intersect the passed-in row range. + * + * @param {number} startScreenRow The first row of the range + * @param {number} endScreenRow The last row of the range + * @returns {Record} The decorations that intersect the passed-in range + */ decorationsForScreenRowRange(startScreenRow, endScreenRow) { + const decorationsByMarkerId = {}; + const markers = this.findMarkers({ + intersectsScreenRowRange: [ + startScreenRow, + endScreenRow + ] + }); + for(let i = 0, len = markers.length; i < len; i++){ + const marker = markers[i]; + const decorations = this.decorationsByMarkerId.get(marker.id); + if (decorations !== undefined) decorationsByMarkerId[marker.id] = decorations; + } + return decorationsByMarkerId; + } + /** + * Returns the decorations that intersects the passed-in row range in a structured way. + * + * At the first level, the keys are the available decoration types. At the second level, the keys are the row index + * for which there are decorations available. The value is an array containing the decorations that intersects with + * the corresponding row. + * + * @property {Object} line All the line decorations by row + * @property {Decoration[]} line[row] All the line decorations at a given row + * @property {Object} highlight-under All the highlight-under decorations by row + * @property {Decoration[]} highlight-under[row] All the highlight-under decorations at a given row + * @property {Object} highlight-over All the highlight-over decorations by row + * @property {Decoration[]} highlight-over[row] All the highlight-over decorations at a given row + * @property {Object} highlight-outine All the highlight-outine decorations by row + * @property {Decoration[]} highlight-outine[row] All the highlight-outine decorations at a given row + * @returns {Object} The decorations grouped by type and then rows + */ decorationsByTypeThenRows() { + if (this.decorationsByTypeThenRowsCache != null) return this.decorationsByTypeThenRowsCache; + const cache = {}; + const decorations = this.decorationsById.values(); + for (const decoration of decorations){ + const range = decoration.marker.getScreenRange(); + const type = decoration.getProperties().type; + if (cache[type] == null) cache[type] = {}; + for(let row = range.start.row, len = range.end.row; row <= len; row++){ + if (cache[type][row] == null) cache[type][row] = []; + cache[type][row].push(decoration); + } + } + /** + * The grouped decorations cache. + * + * @type {Object} + * @access private + */ this.decorationsByTypeThenRowsCache = cache; + return cache; + } + /** Invalidates the decoration by screen rows cache. */ invalidateDecorationForScreenRowsCache() { + this.decorationsByTypeThenRowsCache = null; + } + /** + * Adds a decoration that tracks a `Marker`. When the marker moves, is invalidated, or is destroyed, the decoration + * will be updated to reflect the marker's state. + * + * @fires {did-add-decoration} when The decoration is created successfully + * @fires {did-change} when The decoration is created successfully + * @param {Marker} marker The marker you want this decoration to follow + * @param {Object} decorationParams The decoration properties + * @param {string} decorationParams.type The decoration type in the following list: + * + * - **line**: Fills the line background with the decoration color. + * - **highlight**: Renders a colored rectangle on the minimap. The highlight is rendered above the line's text. + * - **highlight-over**: Same as **highlight**. + * - **highlight-under**: Renders a colored rectangle on the minimap. The highlight is rendered below the line's text. + * - **highlight-outline**: Renders a colored outline on the minimap. The highlight box is rendered above the line's text. + * - **foreground-custom**: A decoration type for which you have the control over the render routine. Note that your + * routine should implement a render on a per-line basis to avoid any side-effect with the offset bitmap cache + * mechanism. These decorations are rendred on the foreground decorations layer. + * - **background-custom**: A decoration type for which you have the control over the render routine. Note that your + * routine should implement a render on a per-line basis to avoid any side-effect with the offset bitmap cache + * mechanism. These decorations are rendred on the background decorations layer. + * + * @param {string} [decorationParams.class] The CSS class to use to retrieve the background color of the decoration by + * building a scop corresponding to `.minimap .editor ` + * @param {string} [decorationParams.scope] The scope to use to retrieve the decoration background. Note that if the + * `scope` property is set, the `class` won't be used. + * @param {string} [decorationParams.color] The CSS color to use to render the decoration. When set, neither `scope` + * nor `class` are used. + * @param {string} [decorationParams.plugin] The name of the plugin that created this decoration. It'll be used to + * order the decorations on the same layer and that are overlapping. If the parameter is omitted the Minimap will + * attempt to infer the plugin origin from the path of the caller function. + * @param {function} [decorationParams.render] The render routine for custom decorations. The function receives the + * decoration and the render data for the current render pass. + * @returns {Decoration} The created decoration + */ decorateMarker(marker, decorationParams) { + if (this.destroyed || this.minimap.destroyed || marker == null) return; + const { id: id } = marker; + if (decorationParams.type === "highlight") decorationParams.type = "highlight-over"; + const { type: type, plugin: plugin } = decorationParams; + if (plugin == null) decorationParams.plugin = $e6882a2a1b829cb4$var$getOriginatorPackageName(); + if (decorationParams.scope == null && decorationParams.class != null) { + const cls = decorationParams.class.split(" ").join("."); + decorationParams.scope = `.minimap .${cls}`; + } + if (!this.decorationMarkerDestroyedSubscriptions.has(id)) this.decorationMarkerDestroyedSubscriptions.set(id, marker.onDidDestroy(()=>{ + this.removeAllDecorationsForMarker(marker); + })); + if (!this.decorationMarkerChangedSubscriptions.has(id)) this.decorationMarkerChangedSubscriptions.set(id, marker.onDidChange((event)=>{ + const decorations = this.decorationsByMarkerId.get(id); + const screenRange = marker.getScreenRange(); + this.invalidateDecorationForScreenRowsCache(); + if (decorations !== undefined) for(let i = 0, len = decorations.length; i < len; i++){ + const decoration = decorations[i]; + this.emitter.emit("did-change-decoration", { + marker: marker, + decoration: decoration, + event: event + }); + this.emitDecorationChanges(decoration.type, decoration); + decoration.screenRange = screenRange; + } + let oldStart = event.oldTailScreenPosition; + let oldEnd = event.oldHeadScreenPosition; + let newStart = event.newTailScreenPosition; + let newEnd = event.newHeadScreenPosition; + if (oldStart.row > oldEnd.row) [oldStart, oldEnd] = [ + oldEnd, + oldStart + ]; + if (newStart.row > newEnd.row) [newStart, newEnd] = [ + newEnd, + newStart + ]; + const rangesDiffs = $e6882a2a1b829cb4$var$computeRangesDiffs(oldStart, oldEnd, newStart, newEnd); + for(let i = 0, len = rangesDiffs.length; i < len; i++){ + const [start, end] = rangesDiffs[i]; + this.emitRangeChanges(type, { + start: start, + end: end + }, 0); + } + })); + const decoration = new (0, $2946613f0e118ee7$export$2e2bcd8739ae039)(marker, this, decorationParams); + if (!this.decorationsByMarkerId.has(id)) this.decorationsByMarkerId.set(id, []); + this.decorationsByMarkerId.get(id).push(decoration); + this.decorationsById.set(decoration.id, decoration); + if (!this.decorationUpdatedSubscriptions.has(decoration.id)) this.decorationUpdatedSubscriptions.set(decoration.id, decoration.onDidChangeProperties((event)=>{ + this.emitDecorationChanges(type, decoration); + })); + this.decorationDestroyedSubscriptions.set(decoration.id, decoration.onDidDestroy(()=>{ + this.removeDecoration(decoration); + })); + this.emitDecorationChanges(type, decoration); + this.emitter.emit("did-add-decoration", { + marker: marker, + decoration: decoration + }); + return decoration; + } + /** + * Emits a change in the `Minimap` corresponding to the passed-in decoration. + * + * @param {string} type The type of decoration that changed + * @param {Decoration} decoration The decoration for which emitting an event + * @access private + */ emitDecorationChanges(type, decoration) { + if (this.destroyed || this.minimap.editorDestroyed()) return; + this.invalidateDecorationForScreenRowsCache(); + const range = decoration.screenRange; + if (!range.start || !range.end) return; + this.emitRangeChanges(type, range, 0); + } + /** + * Emits a change for the specified range. + * + * @param {string} type The type of decoration that changed + * @param {Object} range The range where changes occured + * @param {number} [screenDelta] An optional screen delta for the change object + * @access private + */ emitRangeChanges(type, range, screenDelta) { + const startScreenRow = range.start.row; + const endScreenRow = range.end.row; + const lastRenderedScreenRow = this.minimap.getLastVisibleScreenRow(); + const firstRenderedScreenRow = this.minimap.getFirstVisibleScreenRow(); + if (screenDelta == null) screenDelta = lastRenderedScreenRow - firstRenderedScreenRow - (endScreenRow - startScreenRow); + const changeEvent = { + start: startScreenRow, + end: endScreenRow, + screenDelta: screenDelta, + type: type + }; + this.emitter.emit("did-change-decoration-range", changeEvent); + } + /** + * Removes a `Decoration` from this minimap. + * + * @fires {did-change} when The decoration is removed + * @fires {did-remove-decoration} when The decoration is removed + * @param {Decoration} decoration The decoration to remove + */ removeDecoration(decoration) { + if (decoration == null) return; + const marker = decoration.marker; + let subscription; + this.decorationsById.delete(decoration.id); + subscription = this.decorationUpdatedSubscriptions.get(decoration.id); + if (subscription !== undefined) subscription.dispose(); + subscription = this.decorationDestroyedSubscriptions.get(decoration.id); + if (subscription !== undefined) subscription.dispose(); + this.decorationUpdatedSubscriptions.delete(decoration.id); + this.decorationDestroyedSubscriptions.delete(decoration.id); + const decorations = this.decorationsByMarkerId.get(marker.id); + if (decorations === undefined) return; + this.emitDecorationChanges(decoration.getProperties().type, decoration); + const index = decorations.indexOf(decoration); + if (index > -1) { + decorations.splice(index, 1); + this.emitter.emit("did-remove-decoration", { + marker: marker, + decoration: decoration + }); + if (decorations.length === 0) this.removedAllMarkerDecorations(marker); + } + } + /** + * Removes all the decorations registered for the passed-in marker. + * + * @fires {did-change} when A decoration have been removed + * @fires {did-remove-decoration} when A decoration have been removed + * @param {Marker} marker The marker for which removing its decorations + */ removeAllDecorationsForMarker(marker) { + if (marker == null) return; + const decorations = this.decorationsByMarkerId.get(marker.id); + if (decorations === undefined) return; + for(let i = 0, len = decorations.length; i < len; i++){ + const decoration = decorations[i]; + if (!this.destroyed && !this.minimap.editorDestroyed()) this.emitDecorationChanges(decoration.getProperties().type, decoration); + this.emitter.emit("did-remove-decoration", { + marker: marker, + decoration: decoration + }); + } + this.removedAllMarkerDecorations(marker); + } + /** + * Performs the removal of a decoration for a given marker. + * + * @param {Marker} marker The marker for which removing decorations + * @access private + */ removedAllMarkerDecorations(marker) { + if (marker == null) return; + this.decorationMarkerChangedSubscriptions.get(marker.id).dispose(); + this.decorationMarkerDestroyedSubscriptions.get(marker.id).dispose(); + this.decorationsByMarkerId.delete(marker.id); + this.decorationMarkerChangedSubscriptions.delete(marker.id); + this.decorationMarkerDestroyedSubscriptions.delete(marker.id); + } + /** Removes all the decorations that was created in the current `Minimap`. */ removeAllDecorations() { + const decorationMarkerChangedSubscriptionsValues = this.decorationMarkerChangedSubscriptions.values(); + for (const decoration of decorationMarkerChangedSubscriptionsValues)decoration.dispose(); + const decorationMarkerDestroyedSubscriptionsValues = this.decorationMarkerDestroyedSubscriptions.values(); + for (const decoration of decorationMarkerDestroyedSubscriptionsValues)decoration.dispose(); + const decorationUpdatedSubscriptionsValues = this.decorationUpdatedSubscriptions.values(); + for (const decoration of decorationUpdatedSubscriptionsValues)decoration.dispose(); + const decorationDestroyedSubscriptionsValues = this.decorationDestroyedSubscriptions.values(); + for (const decoration of decorationDestroyedSubscriptionsValues)decoration.dispose(); + const decorationsByIdValues = this.decorationsById.values(); + for (const decoration of decorationsByIdValues)decoration.destroy(); + this.decorationsById.clear(); + this.decorationsByMarkerId.clear(); + this.decorationMarkerChangedSubscriptions.clear(); + this.decorationMarkerDestroyedSubscriptions.clear(); + this.decorationUpdatedSubscriptions.clear(); + this.decorationDestroyedSubscriptions.clear(); + } + destroy() { + this.removeAllDecorations(); + this.minimap = undefined; + this.emitter = undefined; + this.destroyed = true; + } +} +function $e6882a2a1b829cb4$var$getOriginatorPackageName() { + const line = new Error().stack.split("\n")[3]; + const filePath = line.split("(")[1].replace(")", ""); + const re = new RegExp(atom.packages.getPackageDirPaths().join("|") + (0, $bN1tE.escapeRegExp)((0, ($parcel$interopDefault($cz7Pu$path))).sep)); + const plugin = filePath.replace(re, "").split((0, ($parcel$interopDefault($cz7Pu$path))).sep)[0].replace(/minimap-|-minimap/, ""); + return plugin.indexOf((0, ($parcel$interopDefault($cz7Pu$path))).sep) < 0 ? plugin : undefined; +} +/** + * Given two ranges, it returns an array of ranges representing the differences between them. + * + * @param {number} oldStart The row index of the first range start + * @param {number} oldEnd The row index of the first range end + * @param {number} newStart The row index of the second range start + * @param {number} newEnd The row index of the second range end + * @returns {Object[]} The array of diff ranges + * @access private + */ function $e6882a2a1b829cb4$var$computeRangesDiffs(oldStart, oldEnd, newStart, newEnd) { + const diffs = []; + if (oldStart.isLessThan(newStart)) diffs.push([ + oldStart, + newStart + ]); + else if (newStart.isLessThan(oldStart)) diffs.push([ + newStart, + oldStart + ]); + if (oldEnd.isLessThan(newEnd)) diffs.push([ + oldEnd, + newEnd + ]); + else if (newEnd.isLessThan(oldEnd)) diffs.push([ + newEnd, + oldEnd + ]); + return diffs; +} + + + + +var $bN1tE = parcelRequire("bN1tE"); + +var $d28sD = parcelRequire("d28sD"); + +/** @babel */ "use strict"; +class $d134b6b493ace50c$export$2e2bcd8739ae039 { + constructor(){ + /** + * The onscreen canvas. + * + * @type {HTMLCanvasElement} + */ this.canvas = document.createElement("canvas"); + const desynchronized = false // TODO Electron 9 has color issues #786 + ; + /** + * The onscreen canvas context. + * + * @type {CanvasRenderingContext2D} + */ this.context = this.canvas.getContext("2d", { + desynchronized: desynchronized + }); + this.canvas.webkitImageSmoothingEnabled = false; + this.context.imageSmoothingEnabled = false; + /** + * The offscreen canvas. + * + * @type {HTMLCanvasElement} + * @access private + */ this.offscreenCanvas = document.createElement("canvas"); + /** + * The offscreen canvas context. + * + * @type {CanvasRenderingContext2D} + * @access private + */ this.offscreenContext = this.offscreenCanvas.getContext("2d", { + desynchronized: desynchronized + }); + this.offscreenCanvas.webkitImageSmoothingEnabled = false; + this.offscreenContext.imageSmoothingEnabled = false; + } + attach(parent) { + if (this.canvas.parentNode) return; + parent.appendChild(this.canvas); + } + setSize(width = 0, height = 0) { + this.canvas.width = width; + this.canvas.height = height; + this.context.imageSmoothingEnabled = false; + this.resetOffscreenSize(); + } + getSize() { + return { + width: this.canvas.width, + height: this.canvas.height + }; + } + resetOffscreenSize() { + this.offscreenCanvas.width = this.canvas.width; + this.offscreenCanvas.height = this.canvas.height; + this.offscreenContext.imageSmoothingEnabled = false; + } + copyToOffscreen() { + if (this.canvas.width > 0 && this.canvas.height > 0) this.offscreenContext.drawImage(this.canvas, 0, 0); + } + copyFromOffscreen() { + if (this.offscreenCanvas.width > 0 && this.offscreenCanvas.height > 0) this.context.drawImage(this.offscreenCanvas, 0, 0); + } + copyPartFromOffscreen(srcY, destY, height) { + if (this.offscreenCanvas.width > 0 && this.offscreenCanvas.height > 0) this.context.drawImage(this.offscreenCanvas, 0, srcY, this.offscreenCanvas.width, height, 0, destY, this.offscreenCanvas.width, height); + } + clearCanvas() { + this.context.clearRect(0, 0, this.canvas.width, this.canvas.height); + } +} + + +"use strict"; +const $bd9d1375728dda14$var$SPEC_MODE = atom.inSpecMode(); +// an instance of MinimapElement used for testing and calling spies +let $bd9d1375728dda14$var$thisSpec; +class $bd9d1375728dda14$export$2e2bcd8739ae039 extends (0, (/*@__PURE__*/$parcel$interopDefault($d28sD))) { + /** Initializes the canvas elements needed to perform the `Minimap` rendering. */ initializeCanvas() { + if ($bd9d1375728dda14$var$SPEC_MODE) { + // class methods only used for spying the calls + this.drawLines = (firstLine, lastLine)=>{ + console.log({ + firstLine: firstLine, + lastLine: lastLine + }); + }; + this.drawLineDecoration = $bd9d1375728dda14$var$drawLineDecoration; + this.drawGutterDecoration = $bd9d1375728dda14$var$drawGutterDecoration; + this.drawHighlightDecoration = $bd9d1375728dda14$var$drawHighlightDecoration; + this.drawHighlightOutlineDecoration = $bd9d1375728dda14$var$drawHighlightOutlineDecoration; + this.drawCustomDecoration = $bd9d1375728dda14$var$drawCustomDecoration; + this.StyleReader = (0, $e6ccb2de5b0684dd$export$4d3d19fa8673fd3e); + $bd9d1375728dda14$var$thisSpec = this; + } + /** + * The main canvas layer where lines are rendered. + * + * @type {CanvasLayer} + */ this.tokensLayer = new (0, $d134b6b493ace50c$export$2e2bcd8739ae039)(); + /** + * The canvas layer for decorations below the text. + * + * @type {CanvasLayer} + */ this.backLayer = new (0, $d134b6b493ace50c$export$2e2bcd8739ae039)(); + /** + * The canvas layer for decorations above the text. + * + * @type {CanvasLayer} + */ this.frontLayer = new (0, $d134b6b493ace50c$export$2e2bcd8739ae039)(); + if (!this.pendingChanges) /** + * Stores the changes from the text editor. + * + * @type {Object[]} + * @access private + */ this.pendingChanges = []; + if (!this.pendingBackDecorationChanges) /** + * Stores the changes from the minimap back decorations. + * + * @type {Object[]} + * @access private + */ this.pendingBackDecorationChanges = []; + if (!this.pendingFrontDecorationChanges) /** + * Stores the changes from the minimap front decorations. + * + * @type {Object[]} + * @access private + */ this.pendingFrontDecorationChanges = []; + // the maximum number of tokens to render in one line + this.maxTokensInOneLine = atom.config.get("minimap.maxTokensInOneLine"); + } + /** + * Returns the uppermost canvas in the MinimapElement. + * + * @returns {HTMLCanvasElement} The html canvas element + */ getFrontCanvas() { + return this.frontLayer.canvas; + } + /** + * Attaches the canvases into the specified container. + * + * @param {HTMLElement} parent The canvases' container + * @access private + */ attachCanvases(parent) { + this.backLayer.attach(parent); + this.tokensLayer.attach(parent); + this.frontLayer.attach(parent); + } + /** + * Changes the size of all the canvas layers at once. + * + * @param {number} width The new width for the three canvases + * @param {number} height The new height for the three canvases + * @access private + */ setCanvasesSize(width, height) { + this.backLayer.setSize(width, height); + this.tokensLayer.setSize(width, height); + this.frontLayer.setSize(width, height); + } + /** Performs an update of the rendered `Minimap` based on the changes registered in the instance. */ updateCanvas() { + const firstRow = this.minimap.getFirstVisibleScreenRow(); + const lastRow = this.minimap.getLastVisibleScreenRow(); + const devicePixelRatio = this.minimap.getDevicePixelRatio(); + const lineHeight = this.minimap.getLineHeight() * devicePixelRatio; + const charHeight = this.minimap.getCharHeight() * devicePixelRatio; + const charWidth = this.minimap.getCharWidth() * devicePixelRatio; + const { width: canvasWidth, height: canvasHeight } = this.tokensLayer.getSize(); + const editor = this.minimap.getTextEditor(); + const editorElement = this.minimap.getTextEditorElement(); + // TODO avoid closure: https://stackoverflow.com/a/46256398/7910299 + const getTokenColorClosure = this.displayCodeHighlights ? (scopes)=>$bd9d1375728dda14$var$getTokenColor(scopes, editorElement, this.textOpacity) : ()=>$bd9d1375728dda14$var$getDefaultColor(editorElement, this.textOpacity); + $bd9d1375728dda14$var$updateTokensLayer(this.tokensLayer, firstRow, lastRow, this.offscreenFirstRow, this.offscreenLastRow, this.pendingChanges, lineHeight, charHeight, charWidth, canvasWidth, editor, editor.getScreenLineCount(), $bd9d1375728dda14$var$getInvisibleRegExp(editor), getTokenColorClosure, this.ignoreWhitespacesInTokens, this.maxTokensInOneLine); + if ($bd9d1375728dda14$var$SPEC_MODE) // call the spy for drawLines which is used inside updateTokensLayer + this.drawLines(firstRow, lastRow); + const decorations = this.DecorationManagement.decorationsByTypeThenRows(firstRow, lastRow); + const renderData = { + context: this.backLayer.context, + canvasWidth: canvasWidth, + canvasHeight: canvasHeight, + lineHeight: lineHeight, + charWidth: charWidth, + charHeight: charHeight, + orders: $d6bb1451a6029905$export$b9b9891832107981() + }; + const drawCustomDecorationLambda = (decoration, data, decorationColor)=>$bd9d1375728dda14$var$drawCustomDecoration(decoration, data, decorationColor, editorElement); + $bd9d1375728dda14$var$backgroundDecorationDispatcher["background-custom"] = drawCustomDecorationLambda; + $bd9d1375728dda14$var$frontDecorationDispatcher["foreground-custom"] = drawCustomDecorationLambda; + $bd9d1375728dda14$var$updateBackDecorationsLayer(this.backLayer, firstRow, lastRow, this.offscreenFirstRow, this.offscreenLastRow, this.pendingBackDecorationChanges, renderData, lineHeight, editorElement, decorations); + renderData.context = this.frontLayer.context; + $bd9d1375728dda14$var$updateFrontDecorationsLayer(this.frontLayer, firstRow, lastRow, this.offscreenFirstRow, this.offscreenLastRow, this.pendingFrontDecorationChanges, renderData, lineHeight, editorElement, decorations); + this.pendingChanges = []; + this.pendingBackDecorationChanges = []; + this.pendingFrontDecorationChanges = []; + /** + * The first row in the last render of the offscreen canvas. + * + * @type {number} + * @access private + */ this.offscreenFirstRow = firstRow; + /** + * The last row in the last render of the offscreen canvas. + * + * @type {number} + * @access private + */ this.offscreenLastRow = lastRow; + } +} +// ######## ######## ### ## ## +// ## ## ## ## ## ## ## ## ## +// ## ## ## ## ## ## ## ## ## +// ## ## ######## ## ## ## ## ## +// ## ## ## ## ######### ## ## ## +// ## ## ## ## ## ## ## ## ## +// ######## ## ## ## ## ### ### +/** + * Performs an update of the tokens layer using the pending changes array. + * + * @param {CanvasLayer} tokensLayer + * @param {number} firstRow FirstRow the first row of the range to update + * @param {number} lastRow LastRow the last row of the range to update + * @param {number} offscreenFirstRow + * @param {number} offscreenLastRow + * @param {Array<>} pendingChanges + * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio + * @param {number} charHeight This.minimap.getCharHeight() * devicePixelRatio + * @param {number} charWidth This.minimap.getCharWidth() * devicePixelRatio + * @param {number} canvasWidth This.tokensLayer.getSize().width + * @param {TextEditor} editor This.minimap.getTextEditor() + * @param {(t: Token) => string} getTokenColorClosure + * @param {boolean} ignoreWhitespacesInTokens This.ignoreWhitespacesInTokens + * @param {number} maxTokensInOneLine This.maxTokensInOneLine + * @access private + */ function $bd9d1375728dda14$var$updateTokensLayer(tokensLayer, firstRow, lastRow, offscreenFirstRow, offscreenLastRow, pendingChanges, lineHeight, charHeight, charWidth, canvasWidth, editor, editorScreenLineCount, invisibleRegExp, getTokenColorClosure, ignoreWhitespacesInTokens, maxTokensInOneLine) { + // NOTE: this method is the hot function of Minimap. Do not refactor. The code is inlined delibarately. + const intactRanges = $bd9d1375728dda14$var$computeIntactRanges(firstRow, lastRow, pendingChanges, offscreenFirstRow, offscreenLastRow); + // redrawRangesOnLayer + const context = tokensLayer.context; + tokensLayer.clearCanvas(); + if (intactRanges.length === 0) $bd9d1375728dda14$var$drawLines(firstRow, lastRow, 0, lineHeight, charHeight, charWidth, canvasWidth, context, editor, editorScreenLineCount, invisibleRegExp, getTokenColorClosure, ignoreWhitespacesInTokens, maxTokensInOneLine); + else { + for(let j = 0, len = intactRanges.length; j < len; j++){ + const intact = intactRanges[j]; + tokensLayer.copyPartFromOffscreen(intact.offscreenRow * lineHeight, (intact.start - firstRow) * lineHeight, (intact.end - intact.start) * lineHeight); + } + // drawLinesForRanges + let currentRow = firstRow; + for(let i = 0, len = intactRanges.length; i < len; i++){ + const range = intactRanges[i]; + $bd9d1375728dda14$var$drawLines(currentRow, range.start, currentRow - firstRow, lineHeight, charHeight, charWidth, canvasWidth, context, editor, editorScreenLineCount, invisibleRegExp, getTokenColorClosure, ignoreWhitespacesInTokens, maxTokensInOneLine); + currentRow = range.end; + } + if (currentRow <= lastRow) $bd9d1375728dda14$var$drawLines(currentRow, lastRow, currentRow - firstRow, lineHeight, charHeight, charWidth, canvasWidth, context, editor, editorScreenLineCount, invisibleRegExp, getTokenColorClosure, ignoreWhitespacesInTokens, maxTokensInOneLine); + } + tokensLayer.resetOffscreenSize(); + tokensLayer.copyToOffscreen(); +} +/** + * Performs an update of the back decorations layer using the pending back decorations changes arrays. + * + * @param {CanvasLayer} backLayer + * @param {number} firstRow FirstRow the first row of the range to update + * @param {number} lastRow LastRow the last row of the range to update + * @param {number} offscreenFirstRow + * @param {number} offscreenLastRow + * @param {Array<>} pendingBackDecorationChanges + * @param {Object} renderData + * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio + * @param {TextEditorElement} editorElement This.minimap.getTextEditorElement() + * @param {Decoration[]} decorations + * @access private + */ function $bd9d1375728dda14$var$updateBackDecorationsLayer(backLayer, firstRow, lastRow, offscreenFirstRow, offscreenLastRow, pendingBackDecorationChanges, renderData, lineHeight, editorElement, decorations) { + const intactRanges = $bd9d1375728dda14$var$computeIntactRanges(firstRow, lastRow, pendingBackDecorationChanges, offscreenFirstRow, offscreenLastRow); + // NOTE: this method is the hot function of Minimap. Do not refactor. The code is inlined delibarately. + // redrawRangesOnLayer + backLayer.clearCanvas(); + if (intactRanges.length === 0) $bd9d1375728dda14$var$drawBackDecorationsForLines(firstRow, lastRow, 0, renderData, lineHeight, editorElement, decorations); + else { + for(let j = 0, len = intactRanges.length; j < len; j++){ + const intact = intactRanges[j]; + backLayer.copyPartFromOffscreen(intact.offscreenRow * lineHeight, (intact.start - firstRow) * lineHeight, (intact.end - intact.start) * lineHeight); + } + // drawLinesForRanges + let currentRow = firstRow; + for(let i = 0, len = intactRanges.length; i < len; i++){ + const range = intactRanges[i]; + $bd9d1375728dda14$var$drawBackDecorationsForLines(currentRow, range.start, currentRow - firstRow, renderData, lineHeight, editorElement, decorations); + currentRow = range.end; + } + if (currentRow <= lastRow) $bd9d1375728dda14$var$drawBackDecorationsForLines(currentRow, lastRow, currentRow - firstRow, renderData, lineHeight, editorElement, decorations); + } + backLayer.resetOffscreenSize(); + backLayer.copyToOffscreen(); +} +/** + * Performs an update of the front decorations layer using the pending front decorations changes arrays. + * + * @param {CanvasLayer} frontLayer + * @param {number} firstRow FirstRow the first row of the range to update + * @param {number} lastRow LastRow the last row of the range to update + * @param {number} offscreenFirstRow + * @param {number} offscreenLastRow + * @param {Array<>} pendingFrontDecorationChanges + * @param {Object} renderData + * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio + * @param {TextEditorElement} editorElement This.minimap.getTextEditorElement() + * @param {Decoration[]} decorations + * @access private + */ function $bd9d1375728dda14$var$updateFrontDecorationsLayer(frontLayer, firstRow, lastRow, offscreenFirstRow, offscreenLastRow, pendingFrontDecorationChanges, renderData, lineHeight, editorElement, decorations) { + const intactRanges = $bd9d1375728dda14$var$computeIntactRanges(firstRow, lastRow, pendingFrontDecorationChanges, offscreenFirstRow, offscreenLastRow); + // NOTE: this method is the hot function of Minimap. Do not refactor. The code is inlined delibarately. + // redrawRangesOnLayer + frontLayer.clearCanvas(); + if (intactRanges.length === 0) $bd9d1375728dda14$var$drawFrontDecorationsForLines(firstRow, lastRow, 0, renderData, lineHeight, editorElement, decorations); + else { + for(let j = 0, len = intactRanges.length; j < len; j++){ + const intact = intactRanges[j]; + frontLayer.copyPartFromOffscreen(intact.offscreenRow * lineHeight, (intact.start - firstRow) * lineHeight, (intact.end - intact.start) * lineHeight); + } + // drawLinesForRanges + let currentRow = firstRow; + for(let i = 0, len = intactRanges.length; i < len; i++){ + const range = intactRanges[i]; + $bd9d1375728dda14$var$drawFrontDecorationsForLines(currentRow, range.start, currentRow - firstRow, renderData, lineHeight, editorElement, decorations); + currentRow = range.end; + } + if (currentRow <= lastRow) $bd9d1375728dda14$var$drawFrontDecorationsForLines(currentRow, lastRow, currentRow - firstRow, renderData, lineHeight, editorElement, decorations); + } + frontLayer.resetOffscreenSize(); + frontLayer.copyToOffscreen(); +} +const $bd9d1375728dda14$var$whitespaceTokenRegex = /^\s+$/; +const $bd9d1375728dda14$var$oneOrMoreWhiteSpaceRegexp = /\s+/; +/** + * Draws a single token on the given context. + * + * @param {CanvasRenderingContext2D} context The target canvas context + * @param {string} text The token's text content + * @param {string} color The token's CSS color + * @param {number} x The x position of the token in the line + * @param {number} y The y position of the line in the minimap + * @param {number} charWidth The width of a character in the minimap + * @param {number} charHeight The height of a character in the minimap + * @returns {number} The x position at the end of the token + * @access private + */ function $bd9d1375728dda14$var$drawToken(context, text, color, x, y, charWidth, charHeight, ignoreWhitespacesInTokens) { + context.fillStyle = color; + if (ignoreWhitespacesInTokens) { + const length = text.length * charWidth; + context.fillRect(x, y, length, charHeight); + return x + length; + } else { + let chars = 0; + for(let j = 0, len = text.length; j < len; j++){ + const char = text[j]; + if (char === " ") { + if (chars > 0) context.fillRect(x - chars * charWidth, y, chars * charWidth, charHeight); + chars = 0; + } else chars++; + x += charWidth; + } + if (chars > 0) context.fillRect(x - chars * charWidth, y, chars * charWidth, charHeight); + return x; + } +} +/** + * Draws lines on the corresponding layer. + * + * The lines range to draw is specified by the `firstRow` and `lastRow` parameters. + * + * @param {number} firstRow The first row to render + * @param {number} lastRow The last row to render + * @param {number} offsetRow The relative offset to apply to rows when rendering them + * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio + * @param {number} charHeight This.minimap.getCharHeight() * devicePixelRatio + * @param {number} charWidth This.minimap.getCharWidth() * devicePixelRatio + * @param {number} canvasWidth This.tokensLayer.getSize().width + * @param {CanvasRenderingContext2D} context This.tokensLayer.context + * @param {TextEditor} editor This.minimap.getTextEditor() + * @param {number} editorScreenLineCount + * @param {RegExp} invisibleRegExp + * @param {(t: Token) => string} getTokenColorClosure + * @param {boolean} ignoreWhitespacesInTokens This.ignoreWhitespacesInTokens + * @param {number} maxTokensInOneLine This.maxTokensInOneLine + * @access private + */ function $bd9d1375728dda14$var$drawLines(firstRow, lastRow, offsetRow, lineHeight, charHeight, charWidth, canvasWidth, context, editor, editorScreenLineCount, invisibleRegExp, getTokenColorClosure, ignoreWhitespacesInTokens, maxTokensInOneLine) { + // NOTE: this method is the hot function of Minimap. Do not refactor. The code is inlined delibarately. + if (firstRow > lastRow) return; + let lastLine, x; + let y = offsetRow * lineHeight - lineHeight; + // eachTokenForScreenRows + lastRow = Math.min(lastRow, editorScreenLineCount); + for(let line = firstRow; line < lastRow; line++){ + const editorTokensForScreenRow = editor.tokensForScreenRow(line); + const numToken = editorTokensForScreenRow.length; + const numTokenToRender = Math.min(numToken, maxTokensInOneLine); + if (lastLine !== line) { + x = 0; + y += lineHeight; + lastLine = line; + context.clearRect(x, y, canvasWidth, lineHeight); + } + for(let iToken = 0; iToken < numTokenToRender; iToken++){ + const token = editorTokensForScreenRow[iToken]; + const tokenText = token.text.replace(invisibleRegExp, " "); + const tokenScopes = token.scopes; + if (x > canvasWidth) continue; + if ($bd9d1375728dda14$var$whitespaceTokenRegex.test(tokenText)) x += tokenText.length * charWidth; + else x = $bd9d1375728dda14$var$drawToken(context, tokenText, getTokenColorClosure(tokenScopes), x, y, charWidth, charHeight, ignoreWhitespacesInTokens); + } + } + context.fill(); +} +/** + * Returns the regexp to replace invisibles substitution characters in editor lines. + * + * @param {TextEditor} editor + * @returns {RegExp} The regular expression to match invisible characters + * @access private + */ function $bd9d1375728dda14$var$getInvisibleRegExp(editor) { + const invisibles = editor.getInvisibles(); + const regexp = []; + if (invisibles.cr != null) regexp.push(invisibles.cr); + if (invisibles.eol != null) regexp.push(invisibles.eol); + if (invisibles.space != null) regexp.push(invisibles.space); + if (invisibles.tab != null) regexp.push(invisibles.tab); + if (regexp.length !== 0) return RegExp(regexp.filter((s)=>{ + return typeof s === "string"; + }).map((0, $bN1tE.escapeRegExp)).join("|"), "g"); + else return null; +} +/** + * Dispatchers for decoration drawing (custom decoration drawer added dynamically) + * + * @param {Object} backgroundDecorationDispatcher An object with the type to render as key and the render method as value + */ const $bd9d1375728dda14$var$backgroundDecorationDispatcher = { + line: $bd9d1375728dda14$var$drawLineDecoration, + "highlight-under": $bd9d1375728dda14$var$drawHighlightDecoration +}; +/** + * Dispatchers for decoration drawing (custom decoration drawer added dynamically) + * + * @param {Object} frontDecorationDispatcher An object with the type to render as key and the render method as value + */ const $bd9d1375728dda14$var$frontDecorationDispatcher = { + gutter: $bd9d1375728dda14$var$drawGutterDecoration, + "highlight-over": $bd9d1375728dda14$var$drawHighlightDecoration, + "highlight-outline": $bd9d1375728dda14$var$drawHighlightOutlineDecoration +}; +/** + * Draws a line decoration. + * + * @param {Decoration} decoration The decoration to render + * @param {Object} data The data need to perform the render + * @param {string} decorationColor Decoration color + * @access private + */ function $bd9d1375728dda14$var$drawLineDecoration(decoration, data, decorationColor) { + const { context: context, lineHeight: lineHeight, canvasWidth: canvasWidth, yRow: yRow } = data; + context.fillStyle = decorationColor; + context.fillRect(0, yRow, canvasWidth, lineHeight); +} +/** + * Draws a gutter decoration. + * + * @param {Decoration} decoration The decoration to render + * @param {Object} data The data need to perform the render + * @param {string} decorationColor Decoration color + * @access private + */ function $bd9d1375728dda14$var$drawGutterDecoration(decoration, data, decorationColor) { + const { context: context, lineHeight: lineHeight, yRow: yRow } = data; + context.fillStyle = decorationColor; + context.fillRect(0, yRow, 1, lineHeight); +} +/** + * Draws a highlight decoration. + * + * It renders only the part of the highlight corresponding to the specified row. + * + * @param {Decoration} decoration The decoration to render + * @param {Object} data The data need to perform the render + * @param {string} decorationColor Decoration color + * @access private + */ function $bd9d1375728dda14$var$drawHighlightDecoration(decoration, data, decorationColor) { + const { context: context, lineHeight: lineHeight, charWidth: charWidth, canvasWidth: canvasWidth, screenRow: screenRow, yRow: yRow } = data; + const range = decoration.getMarker().getScreenRange(); + const rowSpan = range.end.row - range.start.row; + context.fillStyle = decorationColor; + if (rowSpan === 0) { + const colSpan = range.end.column - range.start.column; + context.fillRect(range.start.column * charWidth, yRow, colSpan * charWidth, lineHeight); + } else if (screenRow === range.start.row) { + const x = range.start.column * charWidth; + context.fillRect(x, yRow, canvasWidth - x, lineHeight); + } else if (screenRow === range.end.row) context.fillRect(0, yRow, range.end.column * charWidth, lineHeight); + else context.fillRect(0, yRow, canvasWidth, lineHeight); +} +/** + * Draws a highlight outline decoration. + * + * It renders only the part of the highlight corresponding to the specified row. + * + * @param {Decoration} decoration The decoration to render + * @param {Object} data The data need to perform the render + * @param {string} decorationColor Decoration color + * @access private + */ function $bd9d1375728dda14$var$drawHighlightOutlineDecoration(decoration, data, decorationColor) { + const { context: context, lineHeight: lineHeight, charWidth: charWidth, canvasWidth: canvasWidth, screenRow: screenRow, yRow: yRow } = data; + let bottomWidth, colSpan, width, xBottomStart, xEnd, xStart; + const range = decoration.getMarker().getScreenRange(); + const rowSpan = range.end.row - range.start.row; + const yStart = yRow; + const yEnd = yStart + lineHeight; + context.fillStyle = decorationColor; + if (rowSpan === 0) { + colSpan = range.end.column - range.start.column; + width = colSpan * charWidth; + xStart = range.start.column * charWidth; + xEnd = xStart + width; + context.fillRect(xStart, yStart, width, 1); + context.fillRect(xStart, yEnd - 1, width, 1); + context.fillRect(xStart, yStart, 1, lineHeight); + context.fillRect(xEnd, yStart, 1, lineHeight); + } else if (rowSpan === 1) { + xStart = range.start.column * charWidth; + xEnd = range.end.column * charWidth; + if (screenRow === range.start.row) { + width = canvasWidth - xStart; + xBottomStart = Math.max(xStart, xEnd); + bottomWidth = canvasWidth - xBottomStart; + context.fillRect(xStart, yStart, width, 1); + context.fillRect(xBottomStart, yEnd - 1, bottomWidth, 1); + context.fillRect(xStart, yStart, 1, lineHeight); + context.fillRect(canvasWidth - 1, yStart, 1, lineHeight); + } else { + width = canvasWidth - xStart; + bottomWidth = canvasWidth - xEnd; + context.fillRect(0, yStart, xStart, 1); + context.fillRect(0, yEnd - 1, xEnd, 1); + context.fillRect(0, yStart, 1, lineHeight); + context.fillRect(xEnd, yStart, 1, lineHeight); + } + } else { + xStart = range.start.column * charWidth; + xEnd = range.end.column * charWidth; + if (screenRow === range.start.row) { + width = canvasWidth - xStart; + context.fillRect(xStart, yStart, width, 1); + context.fillRect(xStart, yStart, 1, lineHeight); + context.fillRect(canvasWidth - 1, yStart, 1, lineHeight); + } else if (screenRow === range.end.row) { + width = canvasWidth - xStart; + context.fillRect(0, yEnd - 1, xEnd, 1); + context.fillRect(0, yStart, 1, lineHeight); + context.fillRect(xEnd, yStart, 1, lineHeight); + } else { + context.fillRect(0, yStart, 1, lineHeight); + context.fillRect(canvasWidth - 1, yStart, 1, lineHeight); + if (screenRow === range.start.row + 1) context.fillRect(0, yStart, xStart, 1); + if (screenRow === range.end.row - 1) context.fillRect(xEnd, yEnd - 1, canvasWidth - xEnd, 1); + } + } +} +/** + * Draws a custom decoration. + * + * It renders only the part of the highlight corresponding to the specified row. + * + * @param {Decoration} decoration The decoration to render + * @param {Object} data The data need to perform the render + * @param {string} decorationColor Decoration color + * @param {TextEditorElement} editorElement + * @access private + */ function $bd9d1375728dda14$var$drawCustomDecoration(decoration, data, decorationColor, editorElement) { + const renderRoutine = decoration.getProperties().render; + if (renderRoutine) { + data.color = decorationColor; + renderRoutine(decoration, data, editorElement); + } +} +/** + * Draws the specified decorations for the current `screenRow`. + * + * The `decorations` object contains all the decorations grouped by type and then rows. + * + * @param {number} screenRow The screen row index for which render decorations + * @param {Object} decorations The object containing all the decorations + * @param {Object} renderData The object containing the render data + * @param {Object} types An object with the type to render as key and the render method as value + * @param {TextEditorElement} editorElement + * @access private + */ function $bd9d1375728dda14$var$drawDecorations(screenRow, decorations, renderData, types, editorElement) { + let decorationsToRender = []; + renderData.context.clearRect(0, renderData.yRow, renderData.canvasWidth, renderData.lineHeight); + for(const i in types)decorationsToRender = decorationsToRender.concat(decorations[i] != null ? decorations[i][screenRow] || [] : []); + decorationsToRender.sort((a, b)=>(renderData.orders[a.properties.plugin] || 0) - (renderData.orders[b.properties.plugin] || 0)); + if (decorationsToRender != null ? decorationsToRender.length : undefined) for(let i = 0, len = decorationsToRender.length; i < len; i++){ + const decoration = decorationsToRender[i]; + const decorationDrawer = types[decoration.properties.type]; + if (!$bd9d1375728dda14$var$SPEC_MODE) decorationDrawer(decoration, renderData, /* decorationColor */ $bd9d1375728dda14$var$getDecorationColor(decoration, editorElement)); + else { + // get the real function name from the mangeld Parcel names + const functionName = decorationDrawer.name.split("$").pop().replace("Lambda", ""); + // call the spy: + $bd9d1375728dda14$var$thisSpec[functionName](decoration, renderData, /* decorationColor */ $bd9d1375728dda14$var$getDecorationColor(decoration, editorElement)); + } + } +} +/** + * Draws front decorations on the corresponding layer. + * + * The lines range to draw is specified by the `firstRow` and `lastRow` parameters. + * + * @param {number} firstRow The first row to render + * @param {number} lastRow The last row to render + * @param {number} offsetRow The relative offset to apply to rows when rendering them + * @param {Object} renderData + * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio + * @param {TextEditorElement} editorElement This.minimap.getTextEditorElement() + * @param {Decoration[]} decorations + * @access private + */ function $bd9d1375728dda14$var$drawFrontDecorationsForLines(firstRow, lastRow, offsetRow, renderData, lineHeight, editorElement, decorations) { + if (firstRow > lastRow) return; + for(let screenRow = firstRow; screenRow <= lastRow; screenRow++){ + renderData.row = offsetRow + (screenRow - firstRow); + renderData.yRow = renderData.row * lineHeight; + renderData.screenRow = screenRow; + $bd9d1375728dda14$var$drawDecorations(screenRow, decorations, renderData, $bd9d1375728dda14$var$frontDecorationDispatcher, editorElement); + } + renderData.context.fill(); +} +/** + * Draws back decorations on the corresponding layer. + * + * The lines range to draw is specified by the `firstRow` and `lastRow` parameters. + * + * @param {number} firstRow The first row to render + * @param {number} lastRow The last row to render + * @param {number} offsetRow The relative offset to apply to rows when rendering them + * @param {Object} renderData + * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio + * @param {TextEditorElement} editorElement This.minimap.getTextEditorElement() + * @param {Decoration[]} decorations + * @access private + */ function $bd9d1375728dda14$var$drawBackDecorationsForLines(firstRow, lastRow, offsetRow, renderData, lineHeight, editorElement, decorations) { + if (firstRow > lastRow) return; + for(let screenRow = firstRow; screenRow <= lastRow; screenRow++){ + renderData.row = offsetRow + (screenRow - firstRow); + renderData.yRow = renderData.row * lineHeight; + renderData.screenRow = screenRow; + $bd9d1375728dda14$var$drawDecorations(screenRow, decorations, renderData, $bd9d1375728dda14$var$backgroundDecorationDispatcher, editorElement); + } + renderData.context.fill(); +} +// ###### ####### ## ####### ######## ###### +// ## ## ## ## ## ## ## ## ## ## ## +// ## ## ## ## ## ## ## ## ## +// ## ## ## ## ## ## ######## ###### +// ## ## ## ## ## ## ## ## ## +// ## ## ## ## ## ## ## ## ## ## ## +// ###### ####### ######## ####### ## ## ###### +/** + * Returns the opacity value to use when rendering the `Minimap` text. + * + * @returns {Number} The text opacity value Unused (inlined) + */ // getTextOpacity () { return this.textOpacity } +/** + * Returns the default text color for an editor content. + * + * The color value is directly read from the `TextEditorView` computed styles. + * + * @param {TextEditorElement} editorElement + * @param {number} textOpacity + * @returns {string} A CSS color + */ function $bd9d1375728dda14$var$getDefaultColor(editorElement, textOpacity) { + const color = (0, $e6ccb2de5b0684dd$export$4d3d19fa8673fd3e).retrieveStyleFromDom([ + ".editor" + ], "color", editorElement, true); + return $bd9d1375728dda14$var$transparentize(color, textOpacity); +} +/** + * Returns the text color for the passed-in scopes + * + * The color value is read from the DOM by creating a node structure that match the token `scope` property. + * + * @param {string[]} scopes An array of scopes for a `TextEditor` token (token.scopeDescriptor || token.scopes) + * @param {TextEditorElement} editorElement + * @param {number} textOpacity + * @returns {string} The CSS color for the provided token + */ function $bd9d1375728dda14$var$getTokenColor(scopes, editorElement, textOpacity) { + const color = (0, $e6ccb2de5b0684dd$export$4d3d19fa8673fd3e).retrieveStyleFromDom(scopes, "color", editorElement, true); + return $bd9d1375728dda14$var$transparentize(color, textOpacity); +} +/** + * Converts a `rgb(...)` color into a `rgba(...)` color with the specified opacity. + * + * @param {string} color The CSS RGB color to transparentize + * @param {number} opacity The opacity amount + * @returns {string} The transparentized CSS color + * @access private + */ function $bd9d1375728dda14$var$transparentize(color, opacity) { + // assumes that color is in form of `rgb(content)` with no spaces around the given value + return `rgba(${color.slice(4, -1)}, ${opacity})`; +} +/** + * Returns the background color for the passed-in `decoration` object. + * + * The color value is read from the DOM by creating a node structure that match the decoration `scope` property unless + * the decoration provides its own `color` property. + * + * @param {Decoration} decoration The decoration to get the color for + * @param {TextEditorElement} editorElement + * @returns {string} The CSS color for the provided decoration + */ function $bd9d1375728dda14$var$getDecorationColor(decoration, editorElement) { + const properties = decoration.getProperties(); + if (properties.color) return properties.color; + if (properties.scope) { + const scopeString = properties.scope.split($bd9d1375728dda14$var$oneOrMoreWhiteSpaceRegexp); + return (0, $e6ccb2de5b0684dd$export$4d3d19fa8673fd3e).retrieveStyleFromDom(scopeString, "background-color", editorElement, true); + } else return $bd9d1375728dda14$var$getDefaultColor(editorElement); +} +// ######## ### ## ## ###### ######## ###### +// ## ## ## ## ### ## ## ## ## ## ## +// ## ## ## ## #### ## ## ## ## +// ######## ## ## ## ## ## ## #### ###### ###### +// ## ## ######### ## #### ## ## ## ## +// ## ## ## ## ## ### ## ## ## ## ## +// ## ## ## ## ## ## ###### ######## ###### +/** + * Computes the ranges that are not affected by the current pending changes. + * + * @param {number} firstRow The first row of the rendered region + * @param {number} lastRow The last row of the rendered region + * @param {number | null} offscreenFirstRow CanvasDrawer.offscreenLastRow + * @param {number | null} offscreenLastRow CanvasDrawer.offscreenLastRow + * @returns {Object[]} The intact ranges in the rendered region + * @access private + */ function $bd9d1375728dda14$var$computeIntactRanges(firstRow, lastRow, changes, offscreenFirstRow, offscreenLastRow) { + // TODO when do they get null? + if (offscreenFirstRow == null && offscreenLastRow == null) return []; + // At first, the whole range is considered intact + let intactRanges = [ + { + start: offscreenFirstRow, + end: offscreenLastRow, + offscreenRow: 0 + } + ]; + for(let i = 0, len = changes.length; i < len; i++){ + const change = changes[i]; + const newIntactRanges = []; + for(let j = 0, intactLen = intactRanges.length; j < intactLen; j++){ + const range = intactRanges[j]; + if (change.end < range.start && change.screenDelta !== 0) // The change is above of the range and lines are either + // added or removed + newIntactRanges.push({ + start: range.start + change.screenDelta, + end: range.end + change.screenDelta, + offscreenRow: range.offscreenRow + }); + else if (change.end < range.start || change.start > range.end) // The change is outside the range but didn't add + // or remove lines + newIntactRanges.push(range); + else { + // The change is within the range, there's one intact range + // from the range start to the change start + if (change.start > range.start) newIntactRanges.push({ + start: range.start, + end: change.start - 1, + offscreenRow: range.offscreenRow + }); + if (change.end < range.end) { + // The change ends within the range + if (change.bufferDelta !== 0) // Lines are added or removed, the intact range starts in the + // next line after the change end plus the screen delta + newIntactRanges.push({ + start: change.end + change.screenDelta + 1, + end: range.end + change.screenDelta, + offscreenRow: range.offscreenRow + change.end + 1 - range.start + }); + else if (change.screenDelta !== 0) // Lines are added or removed in the display buffer, the intact + // range starts in the next line after the change end plus the + // screen delta + newIntactRanges.push({ + start: change.end + change.screenDelta + 1, + end: range.end + change.screenDelta, + offscreenRow: range.offscreenRow + change.end + 1 - range.start + }); + else // No lines are added, the intact range starts on the line after + // the change end + newIntactRanges.push({ + start: change.end + 1, + end: range.end, + offscreenRow: range.offscreenRow + change.end + 1 - range.start + }); + } + } + } + intactRanges = newIntactRanges; + } + return $bd9d1375728dda14$var$truncateIntactRanges(intactRanges, firstRow, lastRow); +} +/** + * Truncates the intact ranges so that they doesn't expand past the visible area of the minimap. + * + * @param {Object[]} intactRanges The initial array of ranges + * @param {number} firstRow The first row of the rendered region + * @param {number} lastRow The last row of the rendered region + * @returns {Object[]} The array of truncated ranges + * @access private + */ function $bd9d1375728dda14$var$truncateIntactRanges(intactRanges, firstRow, lastRow) { + let i = 0; + while(i < intactRanges.length){ + const range = intactRanges[i]; + if (range.start < firstRow) { + range.offscreenRow += firstRow - range.start; + range.start = firstRow; + } + if (range.end > lastRow) range.end = lastRow; + if (range.start >= range.end) intactRanges.splice(i--, 1); + i++; + } + return intactRanges.sort((a, b)=>{ + return a.offscreenRow - b.offscreenRow; + }); +} + + +"use strict"; +function $e29010ecebaeccdf$export$2e2bcd8739ae039(cls, ...mixins) { + mixins.forEach((mixin)=>{ + $e29010ecebaeccdf$var$includeMixin(cls, mixin); + }); +} +function $e29010ecebaeccdf$var$includeMixin(target, source) { + Object.getOwnPropertyNames(source).forEach((k)=>{ + if ([ + "length", + "name", + "arguments", + "caller", + "prototype", + "includeInto" + ].indexOf(k) >= 0) return; + const descriptor = Object.getOwnPropertyDescriptor(source, k); + Object.defineProperty(target, k, descriptor); + }); + Object.getOwnPropertyNames(source.prototype).forEach((k)=>{ + if (k === "constructor") return; + const descriptor = Object.getOwnPropertyDescriptor(source.prototype, k); + Object.defineProperty(target.prototype, k, descriptor); + }); +} + + + +var $5yNMJ = parcelRequire("5yNMJ"); + + + + +var $5yNMJ = parcelRequire("5yNMJ"); + +"use strict"; +const $023c483049ecf4ec$var$TAG_NAME = "minimap-quick-settings"; +/** @access private */ class $023c483049ecf4ec$var$MinimapQuickSettingsElement extends HTMLElement { + static initClass() { + (0, $e29010ecebaeccdf$export$2e2bcd8739ae039)(this, (0, $35541aa4e0ecec06$exports.EventsDelegation), (0, $35541aa4e0ecec06$exports.SpacePenDSL).Babel); + (0, $5yNMJ.default)(this, $023c483049ecf4ec$var$TAG_NAME); + } + static content() { + this.div({ + class: "select-list popover-list minimap-quick-settings" + }, ()=>{ + this.input({ + type: "text", + class: "hidden-input", + outlet: "hiddenInput" + }); + this.ol({ + class: "list-group mark-active", + outlet: "list" + }, ()=>{ + this.li({ + class: "separator", + outlet: "separator" + }); + this.li({ + class: "code-highlights", + outlet: "codeHighlights" + }, "code-highlights"); + this.li({ + class: "absolute-mode", + outlet: "absoluteMode" + }, "absolute-mode"); + this.li({ + class: "adjust-absolute-mode-height", + outlet: "adjustAbsoluteModeHeight" + }, "adjust-absolute-mode-height"); + }); + this.div({ + class: "btn-group" + }, ()=>{ + this.button({ + class: "btn btn-default", + outlet: "onLeftButton" + }, "On Left"); + this.button({ + class: "btn btn-default", + outlet: "onRightButton" + }, "On Right"); + }); + }); + } + createdCallback() { + this.buildContent(); + } + setModel(minimap) { + this.selectedItem = null; + this.minimap = minimap; + this.emitter = new (0, $cz7Pu$atom.Emitter)(); + this.subscriptions = new (0, $cz7Pu$atom.CompositeDisposable)(); + this.plugins = {}; + this.itemsActions = new WeakMap(); + this.codeHighlights.classList.toggle("active", this.minimap.displayCodeHighlights); + this.itemsActions.set(this.codeHighlights, ()=>{ + atom.config.set("minimap.displayCodeHighlights", !this.minimap.displayCodeHighlights); + }); + this.itemsActions.set(this.absoluteMode, ()=>{ + atom.config.set("minimap.absoluteMode", !atom.config.get("minimap.absoluteMode")); + }); + this.itemsActions.set(this.adjustAbsoluteModeHeight, ()=>{ + atom.config.set("minimap.adjustAbsoluteModeHeight", !atom.config.get("minimap.adjustAbsoluteModeHeight")); + }); + this.subscriptions.add($e6ccb2de5b0684dd$export$d40fb390be4bd0f(({ name: name, plugin: plugin })=>{ + return this.addItemFor(name, plugin); + }), $e6ccb2de5b0684dd$export$9937b73c38ac51f0(({ name: name, plugin: plugin })=>{ + return this.removeItemFor(name, plugin); + }), $e6ccb2de5b0684dd$export$6f3aaf72a3cac830(({ name: name, plugin: plugin })=>{ + return this.activateItem(name, plugin); + }), $e6ccb2de5b0684dd$export$8df1420526313195(({ name: name, plugin: plugin })=>{ + return this.deactivateItem(name, plugin); + }), atom.commands.add("minimap-quick-settings", { + "core:move-up": ()=>{ + this.selectPreviousItem(); + }, + "core:move-down": ()=>{ + this.selectNextItem(); + }, + "core:move-left": ()=>{ + atom.config.set("minimap.displayMinimapOnLeft", true); + }, + "core:move-right": ()=>{ + atom.config.set("minimap.displayMinimapOnLeft", false); + }, + "core:cancel": ()=>{ + this.destroy(); + }, + "core:confirm": ()=>{ + this.toggleSelectedItem(); + } + }), this.subscribeTo(this.codeHighlights, { + mousedown: (e)=>{ + e.preventDefault(); + atom.config.set("minimap.displayCodeHighlights", !this.minimap.displayCodeHighlights); + } + }), this.subscribeTo(this.absoluteMode, { + mousedown: (e)=>{ + e.preventDefault(); + atom.config.set("minimap.absoluteMode", !atom.config.get("minimap.absoluteMode")); + } + }), this.subscribeTo(this.adjustAbsoluteModeHeight, { + mousedown: (e)=>{ + e.preventDefault(); + atom.config.set("minimap.adjustAbsoluteModeHeight", !atom.config.get("minimap.adjustAbsoluteModeHeight")); + } + }), this.subscribeTo(this.hiddenInput, { + focusout: (e)=>{ + this.destroy(); + } + }, { + passive: true + }), this.subscribeTo(this.onLeftButton, { + mousedown: (e)=>{ + e.preventDefault(); + atom.config.set("minimap.displayMinimapOnLeft", true); + } + }), this.subscribeTo(this.onRightButton, { + mousedown: (e)=>{ + e.preventDefault(); + atom.config.set("minimap.displayMinimapOnLeft", false); + } + }), atom.config.observe("minimap.displayCodeHighlights", (bool)=>{ + this.codeHighlights.classList.toggle("active", bool); + }), atom.config.observe("minimap.absoluteMode", (bool)=>{ + this.absoluteMode.classList.toggle("active", bool); + }), atom.config.observe("minimap.adjustAbsoluteModeHeight", (bool)=>{ + this.adjustAbsoluteModeHeight.classList.toggle("active", bool); + }), atom.config.observe("minimap.displayMinimapOnLeft", (bool)=>{ + this.onLeftButton.classList.toggle("selected", bool); + this.onRightButton.classList.toggle("selected", !bool); + })); + this.initList(); + } + onDidDestroy(callback) { + return this.emitter.on("did-destroy", callback); + } + attach() { + const workspaceElement = atom.views.getView(atom.workspace); + workspaceElement.appendChild(this); + this.hiddenInput.focus(); + } + destroy() { + this.emitter.emit("did-destroy"); + this.subscriptions.dispose(); + this.parentNode.removeChild(this); + } + initList() { + this.itemsDisposables = new WeakMap(); + for(const name in $d6bb1451a6029905$export$8b3ca321c77fdea6)this.addItemFor(name, $d6bb1451a6029905$export$8b3ca321c77fdea6[name]); + } + toggleSelectedItem() { + const fn = this.itemsActions.get(this.selectedItem); + if (typeof fn === "function") fn(); + } + selectNextItem() { + this.selectedItem.classList.remove("selected"); + if (this.selectedItem.nextSibling != null) { + this.selectedItem = this.selectedItem.nextSibling; + if (this.selectedItem.matches(".separator")) this.selectedItem = this.selectedItem.nextSibling; + } else this.selectedItem = this.list.firstChild; + this.selectedItem.classList.add("selected"); + } + selectPreviousItem() { + this.selectedItem.classList.remove("selected"); + if (this.selectedItem.previousSibling != null) { + this.selectedItem = this.selectedItem.previousSibling; + if (this.selectedItem.matches(".separator")) this.selectedItem = this.selectedItem.previousSibling; + } else this.selectedItem = this.list.lastChild; + this.selectedItem.classList.add("selected"); + } + addItemFor(name, plugin) { + const item = document.createElement("li"); + const action = ()=>{ + $d6bb1451a6029905$export$8cf5509a1f8ee810(name); + }; + if (plugin.isActive()) item.classList.add("active"); + item.textContent = name; + this.itemsActions.set(item, action); + this.itemsDisposables.set(item, this.addDisposableEventListener(item, "mousedown", (e)=>{ + e.preventDefault(); + action(); + })); + this.plugins[name] = item; + this.list.insertBefore(item, this.separator); + if (!(this.selectedItem != null)) { + this.selectedItem = item; + this.selectedItem.classList.add("selected"); + } + } + removeItemFor(name, plugin) { + try { + this.list.removeChild(this.plugins[name]); + } catch (error) {} + delete this.plugins[name]; + } + activateItem(name, plugin) { + this.plugins[name].classList.add("active"); + } + deactivateItem(name, plugin) { + this.plugins[name].classList.remove("active"); + } +} +$023c483049ecf4ec$var$MinimapQuickSettingsElement.initClass(); +function $023c483049ecf4ec$export$97bf619d538586fc() { + const element = document.createElement($023c483049ecf4ec$var$TAG_NAME); + element.createdCallback(); + return element; +} + + +"use strict"; +const $0965f8da08ee51eb$var$elementResizeDetector = (0, (/*@__PURE__*/$parcel$interopDefault($9f189d28e7df4568$exports)))({ + strategy: "scroll" +}); +const $0965f8da08ee51eb$var$SPEC_MODE = atom.inSpecMode(); +const $0965f8da08ee51eb$var$TAG_NAME = "atom-text-editor-minimap"; +/** + * Public: The MinimapElement is the view meant to render a {@link Minimap} instance in the DOM. + * + * You can retrieve the MinimapElement associated to a Minimap using the `atom.views.getView` method. + * + * Note that most interactions with the Minimap package is done through the Minimap model so you should never have to + * access MinimapElement instances. + * + * @example Let minimapElement = atom.views.getView(minimap) + */ class $0965f8da08ee51eb$var$MinimapElement extends HTMLElement { + static initClass() { + (0, $e29010ecebaeccdf$export$2e2bcd8739ae039)(this, (0, $bd9d1375728dda14$export$2e2bcd8739ae039), (0, $35541aa4e0ecec06$exports.EventsDelegation), (0, $35541aa4e0ecec06$exports.AncestorsMethods)); + (0, $5yNMJ.default)(this, $0965f8da08ee51eb$var$TAG_NAME); + } + // ## ## ####### ####### ## ## ###### + // ## ## ## ## ## ## ## ## ## ## + // ## ## ## ## ## ## ## ## ## + // ######### ## ## ## ## ##### ###### + // ## ## ## ## ## ## ## ## ## + // ## ## ## ## ## ## ## ## ## ## + // ## ## ####### ####### ## ## ###### + /** + * DOM callback invoked when a new MinimapElement is created. + * + * @access private + */ createdCallback() { + // Core properties + /** @access private */ this.minimap = undefined; + /** @access private */ this.width = undefined; + /** @access private */ this.height = undefined; + // Subscriptions + /** @access private */ this.subscriptions = new (0, $cz7Pu$atom.CompositeDisposable)(); + /** @access private */ this.visibleAreaSubscription = undefined; + /** @access private */ this.quickSettingsSubscription = undefined; + /** @access private */ this.dragSubscription = undefined; + /** @access private */ this.openQuickSettingSubscription = undefined; + // Configs + /** @access private */ this.minimapScrollIndicator = undefined; + /** @access private */ this.displayMinimapOnLeft = undefined; + /** @access private */ this.displayPluginsControls = undefined; + /** @access private */ this.textOpacity = undefined; + /** @access private */ this.displayCodeHighlights = undefined; + /** @access private */ this.adjustToSoftWrap = undefined; + /** @access private */ this.useHardwareAcceleration = undefined; + /** @access private */ this.absoluteMode = undefined; + // Elements + /** @access private */ this.visibleArea = undefined; + /** @access private */ this.controls = undefined; + /** @access private */ this.scrollIndicator = undefined; + /** @access private */ this.openQuickSettings = undefined; + /** @access private */ this.quickSettingsElement = undefined; + this.DecorationManagement = new (0, $e6882a2a1b829cb4$export$2e2bcd8739ae039)(); + // States + /** @access private */ this.attached = undefined; + /** @access private */ this.attachedToTextEditor = undefined; + /** @access private */ this.standAlone = undefined; + /** @access private */ this.wasVisible = undefined; + // Other + /** @access private */ this.offscreenFirstRow = undefined; + /** @access private */ this.offscreenLastRow = undefined; + /** @access private */ this.frameRequested = undefined; + /** @access private */ this.flexBasis = undefined; + this.initializeContent(); + this.subscriptions.add(atom.config.observe("minimap.displayMinimapOnLeft", (displayMinimapOnLeft)=>{ + this.displayMinimapOnLeft = displayMinimapOnLeft; + this.updateMinimapFlexPosition(); + this.measureHeightAndWidth(true, true); + }), atom.config.observe("minimap.minimapScrollIndicator", (minimapScrollIndicator)=>{ + this.minimapScrollIndicator = minimapScrollIndicator; + if (this.minimapScrollIndicator && !(this.scrollIndicator != null) && !this.standAlone) this.initializeScrollIndicator(); + else if (this.scrollIndicator != null) this.disposeScrollIndicator(); + if (this.attached) this.requestUpdate(); + }), atom.config.observe("minimap.displayPluginsControls", (displayPluginsControls)=>{ + this.displayPluginsControls = displayPluginsControls; + if (this.displayPluginsControls && !(this.openQuickSettings != null) && !this.standAlone) this.initializeOpenQuickSettings(); + else if (this.openQuickSettings != null) this.disposeOpenQuickSettings(); + }), atom.config.observe("minimap.textOpacity", (textOpacity)=>{ + this.textOpacity = textOpacity; + if (this.attached) this.requestForcedUpdate(); + }), atom.config.observe("minimap.displayCodeHighlights", (displayCodeHighlights)=>{ + this.displayCodeHighlights = displayCodeHighlights; + if (this.attached) this.requestForcedUpdate(); + }), atom.config.observe("minimap.smoothScrolling", (smoothScrolling)=>{ + this.smoothScrolling = smoothScrolling; + if (this.attached) { + if (!this.smoothScrolling) { + this.backLayer.canvas.style.cssText = ""; + this.tokensLayer.canvas.style.cssText = ""; + this.frontLayer.canvas.style.cssText = ""; + } else this.requestUpdate(); + } + }), atom.config.observe("minimap.adjustMinimapWidthToSoftWrap", (adjustToSoftWrap)=>{ + this.adjustToSoftWrap = adjustToSoftWrap; + if (this.attached) this.measureHeightAndWidth(); + }), atom.config.observe("minimap.adjustMinimapWidthOnlyIfSmaller", (adjustOnlyIfSmaller)=>{ + this.adjustOnlyIfSmaller = adjustOnlyIfSmaller; + if (this.attached) this.measureHeightAndWidth(); + }), atom.config.observe("minimap.useHardwareAcceleration", (useHardwareAcceleration)=>{ + this.useHardwareAcceleration = useHardwareAcceleration; + if (this.attached) this.requestUpdate(); + }), atom.config.observe("minimap.absoluteMode", (absoluteMode)=>{ + this.absoluteMode = absoluteMode; + this.classList.toggle("absolute", this.absoluteMode); + }), atom.config.observe("minimap.adjustAbsoluteModeHeight", (adjustAbsoluteModeHeight)=>{ + this.adjustAbsoluteModeHeight = adjustAbsoluteModeHeight; + this.classList.toggle("adjust-absolute-height", this.adjustAbsoluteModeHeight); + if (this.attached) this.measureHeightAndWidth(); + }), atom.config.observe("minimap.ignoreWhitespacesInTokens", (ignoreWhitespacesInTokens)=>{ + this.ignoreWhitespacesInTokens = ignoreWhitespacesInTokens; + if (this.attached) this.requestForcedUpdate(); + }), atom.config.observe("editor.preferredLineLength", ()=>{ + if (this.attached) this.measureHeightAndWidth(); + }), atom.config.observe("editor.softWrap", ()=>{ + if (this.attached) this.requestUpdate(); + }), atom.config.observe("editor.showInvisibles", ()=>{ + if (this.attached) this.requestUpdate(); + }), atom.config.observe("editor.invisibles", ()=>{ + if (this.attached) this.requestUpdate(); + }), atom.config.observe("editor.softWrapAtPreferredLineLength", ()=>{ + if (this.attached) this.requestUpdate(); + })); + } + /** + * DOM callback invoked when a new MinimapElement is attached to the DOM. + * + * @access private + */ connectedCallback() { + if (typeof atom.views.pollDocument === "function") this.subscriptions.add(atom.views.pollDocument(()=>{ + this.pollDOM(); + })); + else { + this.intersectionObserver = new IntersectionObserver((entries)=>{ + const { intersectionRect: intersectionRect } = entries[entries.length - 1]; + if (intersectionRect.width > 0 || intersectionRect.height > 0) this.measureHeightAndWidth(true, true); + }); + this.intersectionObserver.observe(this); + if (this.isVisible()) this.measureHeightAndWidth(true, true); + const measureDimensions = ()=>{ + this.measureHeightAndWidth(false, false); + }; + $0965f8da08ee51eb$var$elementResizeDetector.listenTo(this, measureDimensions); + window.addEventListener("resize", measureDimensions, { + passive: true + }); + this.subscriptions.add(new (0, $cz7Pu$atom.Disposable)(()=>{ + $0965f8da08ee51eb$var$elementResizeDetector.removeListener(this, measureDimensions); + }), new (0, $cz7Pu$atom.Disposable)(()=>{ + window.removeEventListener("resize", measureDimensions); + })); + } + this.measureHeightAndWidth(); + this.updateMinimapFlexPosition(); + this.attached = true; + this.attachedToTextEditor = this.queryParentSelector("atom-text-editor") === this.minimap.getTextEditorElement(); + if (this.attachedToTextEditor) this.minimap.getTextEditorElement().setAttribute("with-minimap", this.displayMinimapOnLeft ? "left" : "right"); + this.subscriptions.add(this.subscribeToMediaQuery()); + } + /** + * DOM callback invoked when a new MinimapElement is detached from the DOM. + * + * @access private + */ disconnectedCallback() { + this.minimap.getTextEditorElement().removeAttribute("with-minimap"); + this.attached = false; + } + // ### ######## ######## ### ###### ## ## + // ## ## ## ## ## ## ## ## ## ## + // ## ## ## ## ## ## ## ## ## + // ## ## ## ## ## ## ## ######### + // ######### ## ## ######### ## ## ## + // ## ## ## ## ## ## ## ## ## ## + // ## ## ## ## ## ## ###### ## ## + /** + * Returns whether the MinimapElement is currently visible on screen or not. + * + * The visibility of the minimap is defined by testing the size of the offset width and height of the element. + * + * @returns {boolean} Whether the MinimapElement is currently visible or not + */ isVisible() { + return this.offsetWidth > 0 || this.offsetHeight > 0; + } + /** + * Attaches the MinimapElement to the DOM. + * + * The position at which the element is attached is defined by the `displayMinimapOnLeft` setting. + * + * @param {HTMLElement} [parent] The DOM node where attaching the minimap element + */ attach(parent) { + if (this.attached) return; + const container = parent || this.minimap.getTextEditorElement(); + const minimaps = container.querySelectorAll($0965f8da08ee51eb$var$TAG_NAME); + if (minimaps.length) Array.prototype.forEach.call(minimaps, (el)=>{ + el.destroy(); + try { + container.removeChild(el); + } catch (e) { + // TODO: ignore for now + // https://github.com/atom-minimap/minimap/issues/766#issuecomment-762496374 + } + }); + container.appendChild(this); + } + /** Detaches the MinimapElement from the DOM. */ detach() { + if (!this.attached || this.parentNode == null) return; + this.parentNode.removeChild(this); + } + /** + * Toggles the minimap left/right position based on the value of the `displayMinimapOnLeft` setting. + * + * @access private + */ updateMinimapFlexPosition() { + this.classList.toggle("left", this.displayMinimapOnLeft); + if (this.attachedToTextEditor) this.minimap.getTextEditorElement().setAttribute("with-minimap", this.displayMinimapOnLeft ? "left" : "right"); + } + /** Destroys this MinimapElement */ destroy() { + this.DecorationManagement.destroy(); + if (this.quickSettingsElement) this.quickSettingsElement.destroy(); + this.subscriptions.dispose(); + this.detach(); + } + // ###### ####### ## ## ######## ######## ## ## ######## + // ## ## ## ## ### ## ## ## ### ## ## + // ## ## ## #### ## ## ## #### ## ## + // ## ## ## ## ## ## ## ###### ## ## ## ## + // ## ## ## ## #### ## ## ## #### ## + // ## ## ## ## ## ### ## ## ## ### ## + // ###### ####### ## ## ## ######## ## ## ## + /** + * Creates the content of the MinimapElement and attaches the mouse control event listeners. + * + * @access private + */ initializeContent() { + this.initializeCanvas(); + this.attachCanvases(this); + this.createVisibleArea(); + this.createControls(); + this.subscriptions.add(this.subscribeTo(this, { + mousewheel: (e)=>{ + if (!this.standAlone && this.minimap.onMouseWheel) this.minimap.onMouseWheel(e); + } + }, { + passive: true + }), this.subscribeTo(this.getFrontCanvas(), { + mousedown: (e)=>{ + this.canvasPressed($0965f8da08ee51eb$var$extractMouseEventData(e)); + }, + touchstart: (e)=>{ + this.canvasPressed($0965f8da08ee51eb$var$extractTouchEventData(e)); + } + }, { + passive: true + })); + } + /** + * Initializes the visible area div. + * + * @access private + */ createVisibleArea() { + if (this.visibleArea) return; + this.visibleArea = document.createElement("div"); + this.visibleArea.classList.add("minimap-visible-area"); + this.appendChild(this.visibleArea); + this.visibleAreaSubscription = this.subscribeTo(this.visibleArea, { + mousedown: (e)=>{ + this.startDrag($0965f8da08ee51eb$var$extractMouseEventData(e)); + }, + touchstart: (e)=>{ + this.startDrag($0965f8da08ee51eb$var$extractTouchEventData(e)); + } + }, { + passive: true + }); + this.subscriptions.add(this.visibleAreaSubscription); + } + /** + * Removes the visible area div. + * + * @access private + */ removeVisibleArea() { + if (!this.visibleArea) return; + this.subscriptions.remove(this.visibleAreaSubscription); + this.visibleAreaSubscription.dispose(); + this.removeChild(this.visibleArea); + delete this.visibleArea; + } + /** + * Creates the controls container div. + * + * @access private + */ createControls() { + if (this.controls || this.standAlone) return; + this.controls = document.createElement("div"); + this.controls.classList.add("minimap-controls"); + this.appendChild(this.controls); + } + /** + * Removes the controls container div. + * + * @access private + */ removeControls() { + if (!this.controls) return; + this.removeChild(this.controls); + delete this.controls; + } + /** + * Initializes the scroll indicator div when the `minimapScrollIndicator` settings is enabled. + * + * @access private + */ initializeScrollIndicator() { + if (this.scrollIndicator || this.standAlone) return; + this.scrollIndicator = document.createElement("div"); + this.scrollIndicator.classList.add("minimap-scroll-indicator"); + this.controls.appendChild(this.scrollIndicator); + } + /** + * Disposes the scroll indicator div when the `minimapScrollIndicator` settings is disabled. + * + * @access private + */ disposeScrollIndicator() { + if (!this.scrollIndicator) return; + this.controls.removeChild(this.scrollIndicator); + delete this.scrollIndicator; + } + /** + * Initializes the quick settings openener div when the `displayPluginsControls` setting is enabled. + * + * @access private + */ initializeOpenQuickSettings() { + if (this.openQuickSettings || this.standAlone) return; + this.openQuickSettings = document.createElement("div"); + this.openQuickSettings.classList.add("open-minimap-quick-settings"); + this.controls.appendChild(this.openQuickSettings); + this.openQuickSettingSubscription = this.subscribeTo(this.openQuickSettings, { + mousedown: (e)=>{ + e.preventDefault(); + e.stopPropagation(); + if (this.quickSettingsElement != null) { + this.quickSettingsElement.destroy(); + this.quickSettingsSubscription.dispose(); + } else { + this.quickSettingsElement = (0, $023c483049ecf4ec$export$97bf619d538586fc)(); + this.quickSettingsElement.setModel(this); + this.quickSettingsSubscription = this.quickSettingsElement.onDidDestroy(()=>{ + this.quickSettingsElement = null; + }); + const { top: top, left: left, right: right } = this.getFrontCanvas().getBoundingClientRect(); + this.quickSettingsElement.style.top = `${top}px`; + this.quickSettingsElement.attach(); + if (this.displayMinimapOnLeft) this.quickSettingsElement.style.left = `${right}px`; + else this.quickSettingsElement.style.left = `${left - this.quickSettingsElement.clientWidth}px`; + } + } + }); + } + /** + * Disposes the quick settings openener div when the `displayPluginsControls` setting is disabled. + * + * @access private + */ disposeOpenQuickSettings() { + if (!this.openQuickSettings) return; + this.controls.removeChild(this.openQuickSettings); + this.openQuickSettingSubscription.dispose(); + delete this.openQuickSettings; + } + /** + * Get the DecorationManagement API for minimapElement + * + * @returns {DecorationManagement} + */ getDecorationManagement() { + return this.DecorationManagement; + } + // ## ## ####### ######## ######## ## + // ### ### ## ## ## ## ## ## + // #### #### ## ## ## ## ## ## + // ## ### ## ## ## ## ## ###### ## + // ## ## ## ## ## ## ## ## + // ## ## ## ## ## ## ## ## + // ## ## ####### ######## ######## ######## + /** + * Returns the Minimap for which this MinimapElement was created. + * + * @returns {Minimap} This element's Minimap + */ getModel() { + return this.minimap; + } + /** + * Defines the Minimap model for this MinimapElement instance. + * + * @param {Minimap} minimap The Minimap model for this instance. + * @returns {Minimap} This element's Minimap + */ setModel(minimap) { + this.minimap = minimap; + // set minimapElement for Minimap + this.minimap.minimapElement = this; + this.DecorationManagement.initializeDecorations(this.minimap); + this.subscriptions.add(this.minimap.onDidChangeScrollTop(()=>{ + this.requestUpdate(); + }), this.minimap.onDidChangeScrollLeft(()=>{ + this.requestUpdate(); + }), this.minimap.onDidDestroy(()=>{ + this.destroy(); + }), this.minimap.onDidChangeConfig(()=>{ + if (this.attached) return this.requestForcedUpdate(); + }), this.minimap.onDidChangeStandAlone(()=>{ + this.setStandAlone(this.minimap.isStandAlone()); + this.requestUpdate(); + }), this.minimap.onDidChange((change)=>{ + this.pendingChanges.push(change); + this.requestUpdate(); + }), this.DecorationManagement.onDidChangeDecorationRange((change)=>{ + const { type: type } = change; + if (type === "line" || type === "highlight-under" || type === "background-custom") this.pendingBackDecorationChanges.push(change); + else this.pendingFrontDecorationChanges.push(change); + this.requestUpdate(); + }), $e6ccb2de5b0684dd$export$4f0668f248b15f12(()=>{ + this.requestForcedUpdate(); + })); + this.setStandAlone(this.minimap.isStandAlone()); + if (this.width != null && this.height != null) this.minimap.setScreenHeightAndWidth(this.height, this.width); + return this.minimap; + } + /** + * Sets the stand-alone mode for this MinimapElement. + * + * @param {boolean} standAlone The new mode for this MinimapElement + */ setStandAlone(standAlone) { + this.standAlone = standAlone; + if (this.standAlone) { + this.setAttribute("stand-alone", true); + this.disposeScrollIndicator(); + this.disposeOpenQuickSettings(); + this.removeControls(); + this.removeVisibleArea(); + } else { + this.removeAttribute("stand-alone"); + this.createVisibleArea(); + this.createControls(); + if (this.minimapScrollIndicator) this.initializeScrollIndicator(); + if (this.displayPluginsControls) this.initializeOpenQuickSettings(); + } + } + // ## ## ######## ######## ### ######## ######## + // ## ## ## ## ## ## ## ## ## ## + // ## ## ## ## ## ## ## ## ## ## + // ## ## ######## ## ## ## ## ## ###### + // ## ## ## ## ## ######### ## ## + // ## ## ## ## ## ## ## ## ## + // ####### ## ######## ## ## ## ######## + /** Requests an update to be performed on the next frame. */ requestUpdate() { + if (this.frameRequested) return; + this.frameRequested = true; + requestAnimationFrame(()=>{ + this.update(); + this.frameRequested = false; + }); + } + /** Requests an update to be performed on the next frame that will completely redraw the minimap. */ requestForcedUpdate() { + this.offscreenFirstRow = null; + this.offscreenLastRow = null; + this.requestUpdate(); + } + /** + * Performs the actual MinimapElement update. + * + * @access private + */ update() { + if (!(this.attached && this.isVisible() && this.minimap)) return; + const minimap = this.minimap; + minimap.enableCache(); + const canvas = this.getFrontCanvas(); + const devicePixelRatio = this.minimap.getDevicePixelRatio(); + const visibleAreaLeft = minimap.getTextEditorScaledScrollLeft(); + const visibleAreaTop = minimap.getTextEditorScaledScrollTop() - minimap.getScrollTop(); + const width = Math.min(canvas.width / devicePixelRatio, this.width); + const visibleWidth = width + visibleAreaLeft; + if (this.adjustToSoftWrap && this.flexBasis) { + this.style.flexBasis = `${this.flexBasis}px`; + this.style.width = `${this.flexBasis}px`; + } else { + this.style.flexBasis = null; + this.style.width = null; + } + if ($0965f8da08ee51eb$var$SPEC_MODE) $0965f8da08ee51eb$var$applyStyles(this.visibleArea, { + width: `${Math.round(visibleWidth)}px`, + height: `${Math.round(minimap.getTextEditorScaledHeight())}px`, + top: `${Math.round(visibleAreaTop)}px`, + "border-left-width": `${Math.round(visibleAreaLeft)}px` + }); + else $0965f8da08ee51eb$var$applyStyles(this.visibleArea, { + width: `${Math.round(visibleWidth)}px`, + height: `${Math.round(minimap.getTextEditorScaledHeight())}px`, + transform: $0965f8da08ee51eb$var$makeTranslate(0, visibleAreaTop, this.useHardwareAcceleration), + "border-left-width": `${Math.round(visibleAreaLeft)}px` + }); + $0965f8da08ee51eb$var$applyStyles(this.controls, { + width: `${Math.round(width)}px` + }); + const canvasTop = minimap.getFirstVisibleScreenRow() * minimap.getLineHeight() - minimap.getScrollTop(); + if (this.smoothScrolling) { + if ($0965f8da08ee51eb$var$SPEC_MODE) { + $0965f8da08ee51eb$var$applyStyles(this.backLayer.canvas, { + top: `${canvasTop}px` + }); + $0965f8da08ee51eb$var$applyStyles(this.tokensLayer.canvas, { + top: `${canvasTop}px` + }); + $0965f8da08ee51eb$var$applyStyles(this.frontLayer.canvas, { + top: `${canvasTop}px` + }); + } else { + let canvasTransform = $0965f8da08ee51eb$var$makeTranslate(0, canvasTop, this.useHardwareAcceleration); + if (devicePixelRatio !== 1) { + const scale = 1 / devicePixelRatio; + canvasTransform += ` ${$0965f8da08ee51eb$var$makeScale(scale, scale, this.useHardwareAcceleration)}`; + } + $0965f8da08ee51eb$var$applyStyles(this.backLayer.canvas, { + transform: canvasTransform + }); + $0965f8da08ee51eb$var$applyStyles(this.tokensLayer.canvas, { + transform: canvasTransform + }); + $0965f8da08ee51eb$var$applyStyles(this.frontLayer.canvas, { + transform: canvasTransform + }); + } + } else { + const scale = 1 / devicePixelRatio; + const canvasTransform = $0965f8da08ee51eb$var$makeScale(scale, scale, this.useHardwareAcceleration); + $0965f8da08ee51eb$var$applyStyles(this.backLayer.canvas, { + transform: canvasTransform + }); + $0965f8da08ee51eb$var$applyStyles(this.tokensLayer.canvas, { + transform: canvasTransform + }); + $0965f8da08ee51eb$var$applyStyles(this.frontLayer.canvas, { + transform: canvasTransform + }); + } + if (this.minimapScrollIndicator && !this.scrollIndicator && minimap.canScroll()) this.initializeScrollIndicator(); + if (this.scrollIndicator != null) { + const minimapScreenHeight = minimap.getScreenHeight(); + const indicatorHeight = minimapScreenHeight * (minimapScreenHeight / minimap.getHeight()); + const indicatorScroll = (minimapScreenHeight - indicatorHeight) * minimap.getScrollRatio(); + if ($0965f8da08ee51eb$var$SPEC_MODE) $0965f8da08ee51eb$var$applyStyles(this.scrollIndicator, { + height: `${indicatorHeight}px`, + top: `${indicatorScroll}px` + }); + else $0965f8da08ee51eb$var$applyStyles(this.scrollIndicator, { + height: `${indicatorHeight}px`, + transform: $0965f8da08ee51eb$var$makeTranslate(0, indicatorScroll, this.useHardwareAcceleration) + }); + if (!minimap.canScroll()) this.disposeScrollIndicator(); + } + if (this.absoluteMode && this.adjustAbsoluteModeHeight) this.updateCanvasesSize(); + this.updateCanvas(); + minimap.clearCache(); + } + /** + * Defines whether to render the code highlights or not. + * + * @param {Boolean} displayCodeHighlights Whether to render the code highlights or not + */ setDisplayCodeHighlights(displayCodeHighlights) { + this.displayCodeHighlights = displayCodeHighlights; + if (this.attached) this.requestForcedUpdate(); + } + /** + * Polling callback used to detect visibility and size changes. + * + * @access private + */ pollDOM() { + const visibilityChanged = this.checkForVisibilityChange(); + if (this.isVisible()) { + if (!this.wasVisible) this.requestForcedUpdate(); + this.measureHeightAndWidth(visibilityChanged, false); + } + } + /** + * A method that checks for visibility changes in the MinimapElement. The method returns `true` when the visibility + * changed from visible to hidden or from hidden to visible. + * + * @returns {boolean} Whether the visibility changed or not since the last call + * @access private + */ checkForVisibilityChange() { + if (this.isVisible()) { + if (this.wasVisible) return false; + else { + this.wasVisible = true; + return this.wasVisible; + } + } else if (this.wasVisible) { + this.wasVisible = false; + return true; + } else { + this.wasVisible = false; + return this.wasVisible; + } + } + /** + * A method used to measure the size of the MinimapElement and update internal components based on the new size. + * + * @param {boolean} visibilityChanged Did the visibility changed since last measurement + * @param {[type]} [forceUpdate=true] Forces the update even when no changes were detected. Default is `true` + * @access private + */ measureHeightAndWidth(visibilityChanged, forceUpdate = true) { + if (!this.minimap) return; + const safeFlexBasis = this.style.flexBasis; + this.style.flexBasis = ""; + const wasResized = this.width !== this.clientWidth || this.height !== this.clientHeight; + this.height = this.clientHeight; + this.width = this.clientWidth; + let canvasWidth = this.width; + if (this.minimap != null) this.minimap.setScreenHeightAndWidth(this.height, this.width); + if (wasResized || visibilityChanged || forceUpdate) this.requestForcedUpdate(); + if (!this.isVisible()) return; + if (wasResized || forceUpdate) { + if (this.adjustToSoftWrap) { + const lineLength = atom.config.get("editor.preferredLineLength"); + const softWrap = atom.config.get("editor.softWrap"); + const softWrapAtPreferredLineLength = atom.config.get("editor.softWrapAtPreferredLineLength"); + const width = lineLength * this.minimap.getCharWidth(); + if (softWrap && softWrapAtPreferredLineLength && lineLength && (width <= this.width || !this.adjustOnlyIfSmaller)) { + this.flexBasis = width; + canvasWidth = width; + } else delete this.flexBasis; + } else delete this.flexBasis; + this.updateCanvasesSize(canvasWidth); + } else this.style.flexBasis = safeFlexBasis; + } + updateCanvasesSize(canvasWidth) { + const devicePixelRatio = this.minimap.getDevicePixelRatio(); + const maxCanvasHeight = this.height + this.minimap.getLineHeight(); + const newHeight = this.absoluteMode && this.adjustAbsoluteModeHeight ? Math.min(this.minimap.getHeight(), maxCanvasHeight) : maxCanvasHeight; + const canvas = this.getFrontCanvas(); + if (canvasWidth == null) canvasWidth = canvas.width / devicePixelRatio; + if (canvasWidth !== canvas.width || newHeight !== canvas.height) { + this.setCanvasesSize(canvasWidth * devicePixelRatio, newHeight * devicePixelRatio); + if (this.absoluteMode && this.adjustAbsoluteModeHeight) { + this.offscreenFirstRow = null; + this.offscreenLastRow = null; + } + } + } + // ######## ## ## ######## ## ## ######## ###### + // ## ## ## ## ### ## ## ## ## + // ## ## ## ## #### ## ## ## + // ###### ## ## ###### ## ## ## ## ###### + // ## ## ## ## ## #### ## ## + // ## ## ## ## ## ### ## ## ## + // ######## ### ######## ## ## ## ###### + /** + * Callback triggered when the mouse is pressed on the MinimapElement canvas. + * + * @param {number} y The vertical coordinate of the event + * @param {boolean} isLeftMouse Was the left mouse button pressed? + * @param {boolean} isMiddleMouse Was the middle mouse button pressed? + * @access private + */ canvasPressed({ y: y, isLeftMouse: isLeftMouse, isMiddleMouse: isMiddleMouse }) { + if (this.minimap.isStandAlone()) return; + if (isLeftMouse) this.canvasLeftMousePressed(y); + else if (isMiddleMouse) { + this.canvasMiddleMousePressed(y); + const { top: top, height: height } = this.visibleArea.getBoundingClientRect(); + this.startDrag({ + y: top + height / 2, + isLeftMouse: false, + isMiddleMouse: true + }); + } + } + /** + * Callback triggered when the mouse left button is pressed on the MinimapElement canvas. + * + * @param {MouseEvent} e The mouse event object + * @param {number} e.pageY The mouse y position in page + * @param {HTMLElement} e.target The source of the event + * @access private + */ canvasLeftMousePressed(y) { + const deltaY = y - this.getBoundingClientRect().top; + const row = Math.floor(deltaY / this.minimap.getLineHeight()) + this.minimap.getFirstVisibleScreenRow(); + const textEditor = this.minimap.getTextEditor(); + const textEditorElement = this.minimap.getTextEditorElement(); + const scrollTop = row * textEditor.getLineHeightInPixels() - this.minimap.getTextEditorHeight() / 2; + const textEditorScrollTop = textEditorElement.pixelPositionForScreenPosition([ + row, + 0 + ]).top - this.minimap.getTextEditorHeight() / 2; + if (atom.config.get("minimap.moveCursorOnMinimapClick")) textEditor.setCursorScreenPosition([ + row, + 0 + ]); + if (atom.config.get("minimap.scrollAnimation")) { + const duration = atom.config.get("minimap.scrollAnimationDuration"); + const independentScroll = this.minimap.scrollIndependentlyOnMouseWheel(); + const from = this.minimap.getTextEditorScrollTop(); + const to = textEditorScrollTop; + let step; + if (independentScroll) { + const minimapFrom = this.minimap.getScrollTop(); + const minimapTo = Math.min(1, scrollTop / (this.minimap.getTextEditorMaxScrollTop() || 1)) * this.minimap.getMaxScrollTop(); + step = (now, t)=>{ + if (this.minimap === null) return; + // TODO why this happens in the tests? + this.minimap.setTextEditorScrollTop(now, true); + this.minimap.setScrollTop(minimapFrom + (minimapTo - minimapFrom) * t); + }; + $0965f8da08ee51eb$var$animate({ + from: from, + to: to, + duration: duration, + step: step + }); + } else { + step = (now)=>{ + if (this.minimap === null) return; + // TODO why this happens in the tests? + this.minimap.setTextEditorScrollTop(now); + }; + $0965f8da08ee51eb$var$animate({ + from: from, + to: to, + duration: duration, + step: step + }); + } + } else this.minimap.setTextEditorScrollTop(textEditorScrollTop); + } + /** + * Callback triggered when the mouse middle button is pressed on the MinimapElement canvas. + * + * @param {MouseEvent} e The mouse event object + * @param {number} e.pageY The mouse y position in page + * @access private + */ canvasMiddleMousePressed(y) { + const { top: offsetTop } = this.getBoundingClientRect(); + const deltaY = y - offsetTop - this.minimap.getTextEditorScaledHeight() / 2; + const ratio = deltaY / (this.minimap.getVisibleHeight() - this.minimap.getTextEditorScaledHeight()); + this.minimap.setTextEditorScrollTop(ratio * this.minimap.getTextEditorMaxScrollTop()); + } + /** + * Subscribes to a media query for device pixel ratio changes and forces a repaint when it occurs. + * + * @returns {Disposable} A disposable to remove the media query listener + * @access private + */ subscribeToMediaQuery() { + const mediaQuery = window.matchMedia("screen and (-webkit-min-device-pixel-ratio: 1.5)"); + const mediaListener = ()=>{ + this.requestForcedUpdate(); + }; + mediaQuery.addEventListener("change", mediaListener); + return new (0, $cz7Pu$atom.Disposable)(()=>{ + mediaQuery.removeEventListener("change", mediaListener); + }); + } + // ######## #### ######## + // ## ## ## ## ## ## + // ## ## #### ## ## + // ## ## #### ## ## + // ## ## ## ## ## ## ## + // ## ## ## ## ## ## + // ######## #### ## ######## + /** + * A method triggered when the mouse is pressed over the visible area that starts the dragging gesture. + * + * @param {number} y The vertical coordinate of the event + * @param {boolean} isLeftMouse Was the left mouse button pressed? + * @param {boolean} isMiddleMouse Was the middle mouse button pressed? + * @access private + */ startDrag({ y: y, isLeftMouse: isLeftMouse, isMiddleMouse: isMiddleMouse }) { + if (!this.minimap) return; + if (!isLeftMouse && !isMiddleMouse) return; + const initial = { + dragOffset: y - this.visibleArea.getBoundingClientRect().top, + offsetTop: this.getBoundingClientRect().top + }; + // TODO can we avoid adding and removing the listeners every time? + const mousemoveHandler = (e)=>this.drag($0965f8da08ee51eb$var$extractMouseEventData(e), initial); + const dragendHandler = ()=>this.endDrag(); + const touchmoveHandler = (e)=>this.drag($0965f8da08ee51eb$var$extractTouchEventData(e), initial); + document.body.addEventListener("mousemove", mousemoveHandler, { + passive: true + }); + document.body.addEventListener("mouseup", dragendHandler, { + passive: true + }); + document.body.addEventListener("mouseleave", dragendHandler, { + passive: true + }); + document.body.addEventListener("touchmove", touchmoveHandler, { + passive: true + }); + document.body.addEventListener("touchend", dragendHandler, { + passive: true + }); + document.body.addEventListener("touchcancel", dragendHandler, { + passive: true + }); + this.dragSubscription = new (0, $cz7Pu$atom.Disposable)(function() { + document.body.removeEventListener("mousemove", mousemoveHandler); + document.body.removeEventListener("mouseup", dragendHandler); + document.body.removeEventListener("mouseleave", dragendHandler); + document.body.removeEventListener("touchmove", touchmoveHandler); + document.body.removeEventListener("touchend", dragendHandler); + document.body.removeEventListener("touchcancel", dragendHandler); + }); + } + /** + * The method called during the drag gesture. + * + * @param {number} y The vertical coordinate of the event + * @param {boolean} isLeftMouse Was the left mouse button pressed? + * @param {boolean} isMiddleMouse Was the middle mouse button pressed? + * @param {number} initial.dragOffset The mouse offset within the visible area + * @param {number} initial.offsetTop The MinimapElement offset at the moment of the drag start + * @access private + */ drag({ y: y, isLeftMouse: isLeftMouse, isMiddleMouse: isMiddleMouse }, initial) { + if (!this.minimap) return; + if (!isLeftMouse && !isMiddleMouse) return; + const deltaY = y - initial.offsetTop - initial.dragOffset; + const ratio = deltaY / (this.minimap.getVisibleHeight() - this.minimap.getTextEditorScaledHeight()); + this.minimap.setTextEditorScrollTop(ratio * this.minimap.getTextEditorMaxScrollTop()); + } + /** + * The method that ends the drag gesture. + * + * @access private + */ endDrag() { + if (!this.minimap) return; + this.dragSubscription.dispose(); + } +} +$0965f8da08ee51eb$var$MinimapElement.initClass(); +function $0965f8da08ee51eb$export$aa3fab546e9e7454() { + const element = document.createElement($0965f8da08ee51eb$var$TAG_NAME); + element.createdCallback(); + return element; +} +// ######## ## ## ######## ## ## ######## ###### +// ## ## ## ## ### ## ## ## ## +// ## ## ## ## #### ## ## ## +// ###### ## ## ###### ## ## ## ## ###### +// ## ## ## ## ## #### ## ## +// ## ## ## ## ## ### ## ## ## +// ######## ### ######## ## ## ## ###### +/** + * A method that extracts data from a `MouseEvent` which can then be used to process clicks and drags of the minimap. + * + * Used together with `extractTouchEventData` to provide a unified interface for `MouseEvent`s and `TouchEvent`s. + * + * @param {MouseEvent} mouseEvent The mouse event object + * @access private + */ function $0965f8da08ee51eb$var$extractMouseEventData(mouseEvent) { + return { + x: mouseEvent.pageX, + y: mouseEvent.pageY, + isLeftMouse: mouseEvent.button === 0, + isMiddleMouse: mouseEvent.button === 1 + }; +} +/** + * A method that extracts data from a `TouchEvent` which can then be used to process clicks and drags of the minimap. + * + * Used together with `extractMouseEventData` to provide a unified interface for `MouseEvent`s and `TouchEvent`s. + * + * @param {TouchEvent} touchEvent The touch event object + * @access private + */ function $0965f8da08ee51eb$var$extractTouchEventData(touchEvent) { + // Use the first touch on the target area. Other touches will be ignored in + // case of multi-touch. + const touch = touchEvent.changedTouches[0]; + return { + x: touch.pageX, + y: touch.pageY, + isLeftMouse: true, + isMiddleMouse: false + }; +} +// ###### ###### ###### +// ## ## ## ## ## ## +// ## ## ## +// ## ###### ###### +// ## ## ## +// ## ## ## ## ## ## +// ###### ###### ###### +/** + * Applies the passed-in styles properties to the specified element + * + * @param {HTMLElement} element The element onto which apply the styles + * @param {Object} styles The styles to apply + * @access private + */ function $0965f8da08ee51eb$var$applyStyles(element, styles) { + if (!element) return; + let cssText = ""; + for(const property in styles)cssText += `${property}: ${styles[property]}; `; + element.style.cssText = cssText; +} +/** + * Returns a string with a CSS translation tranform value. + * + * @param {number} [x=0] The x offset of the translation. Default is `0` + * @param {number} [y=0] The y offset of the translation. Default is `0` + * @param {boolean} [useHardwareAcceleration=false] Use hardware acceleration. Default is `false` + * @returns {string} The CSS translation string + * @access private + */ function $0965f8da08ee51eb$var$makeTranslate(x = 0, y = 0, useHardwareAcceleration = false) { + if (useHardwareAcceleration) return `translate3d(${x}px, ${y}px, 0)`; + else return `translate(${x}px, ${y}px)`; +} +/** + * Returns a string with a CSS scaling tranform value. + * + * @param {number} [x=0] The x scaling factor. Default is `0` + * @param {number} [y=0] The y scaling factor. Default is `0` + * @param {boolean} [useHardwareAcceleration=false] Use hardware acceleration. Default is `false` + * @returns {string} The CSS scaling string + * @access private + */ function $0965f8da08ee51eb$var$makeScale(x = 0, y = x, useHardwareAcceleration = false) { + if (useHardwareAcceleration) return `scale3d(${x}, ${y}, 1)`; + else return `scale(${x}, ${y})`; +} +/** + * A method that mimic the jQuery `animate` method and used to animate the scroll when clicking on the MinimapElement canvas. + * + * @param {Object} param The animation data object + * @param {[type]} param.from The start value + * @param {[type]} param.to The end value + * @param {[type]} param.duration The animation duration + * @param {[type]} param.step The easing function for the animation + * @access private + */ function $0965f8da08ee51eb$var$animate({ from: from, to: to, duration: duration, step: step }) { + const start = $0965f8da08ee51eb$var$getTime(); + let progress; + const update = ()=>{ + const passed = $0965f8da08ee51eb$var$getTime() - start; + if (duration === 0) progress = 1; + else progress = passed / duration; + if (progress > 1) progress = 1; + const delta = $0965f8da08ee51eb$var$swing(progress); + const value = from + (to - from) * delta; + step(value, delta); + if (progress < 1) requestAnimationFrame(update); + }; + update(); +} +function $0965f8da08ee51eb$var$swing(progress) { + return 0.5 - Math.cos(progress * Math.PI) / 2; +} +/** + * A method that return the current time as a Date. + * + * That method exist so that we can mock it in tests. + * + * @returns {Date} The current time as Date + * @access private + */ function $0965f8da08ee51eb$var$getTime() { + return new Date(); +} + + + + +"use strict"; +class $248c7ec3a64ef176$export$2e2bcd8739ae039 { + constructor(textEditor){ + this.textEditor = textEditor; + this.textEditorElement = atom.views.getView(this.textEditor); + } + enableCache() { + this.useCache = true; + } + clearCache() { + this.useCache = false; + delete this.heightCache; + delete this.scrollTopCache; + delete this.scrollLeftCache; + delete this.maxScrollTopCache; + } + onDidChangeScrollTop(callback) { + return this.textEditorElement.onDidChangeScrollTop(callback); + } + onDidChangeScrollLeft(callback) { + return this.textEditorElement.onDidChangeScrollLeft(callback); + } + getHeight() { + if (this.editorDestroyed()) return 0; + if (this.useCache) { + if (!this.heightCache) this.heightCache = this.textEditorElement.getHeight(); + return this.heightCache; + } + return this.textEditorElement.getHeight(); + } + getScrollTop() { + if (this.editorDestroyed()) return 0; + if (this.useCache) { + if (!this.scrollTopCache) this.scrollTopCache = this.computeScrollTop(); + return this.scrollTopCache; + } + return this.computeScrollTop(); + } + computeScrollTop() { + if (this.editorDestroyed()) return 0; + const scrollTop = this.textEditorElement.getScrollTop(); + const lineHeight = this.textEditor.getLineHeightInPixels(); + let firstRow = this.textEditorElement.getFirstVisibleScreenRow(); + if (Number.isNaN(firstRow)) // Guard against their being no visible screen row + return 0; + let lineTop = this.textEditorElement.pixelPositionForScreenPosition([ + firstRow, + 0 + ]).top; + if (lineTop > scrollTop) { + firstRow -= 1; + lineTop = this.textEditorElement.pixelPositionForScreenPosition([ + firstRow, + 0 + ]).top; + } + const lineY = firstRow * lineHeight; + const offset = Math.min(scrollTop - lineTop, lineHeight); + return lineY + offset; + } + setScrollTop(scrollTop) { + if (this.editorDestroyed()) return; + this.textEditorElement.setScrollTop(scrollTop); + } + getScrollLeft() { + if (this.editorDestroyed()) return 0; + if (this.useCache) { + if (!this.scrollLeftCache) this.scrollLeftCache = this.textEditorElement.getScrollLeft(); + return this.scrollLeftCache; + } + return this.textEditorElement.getScrollLeft(); + } + getMaxScrollTop() { + if (this.editorDestroyed()) return 0; + if (this.maxScrollTopCache != null && this.useCache) return this.maxScrollTopCache; + let maxScrollTop; + if (this.textEditorElement.getMaxScrollTop) { + maxScrollTop = this.textEditorElement.getMaxScrollTop(); + if (parseFloat(atom.getVersion()) >= 1.13) { + if (this.scrollPastEnd) { + const lineHeight = this.textEditor.getLineHeightInPixels(); + maxScrollTop -= this.getHeight() - 3 * lineHeight; + } + } + } else { + maxScrollTop = this.textEditorElement.getScrollHeight() - this.getHeight(); + if (this.scrollPastEnd) { + const lineHeight = this.textEditor.getLineHeightInPixels(); + maxScrollTop -= this.getHeight() - 3 * lineHeight; + } + } + if (this.useCache) this.maxScrollTopCache = maxScrollTop; + return maxScrollTop; + } + editorDestroyed() { + return !this.textEditor || this.textEditor.isDestroyed() || !this.textEditorElement.component || !this.textEditorElement.getModel() || !this.textEditorElement.parentNode; + } +} + + + +"use strict"; +let $e85ce81538013d49$var$nextModelId = 1; +// returned in the decorations API when minimap is destoryed +const $e85ce81538013d49$var$disposedDisposable = new (0, $cz7Pu$atom.Disposable)(); +$e85ce81538013d49$var$disposedDisposable.dispose(); +const $e85ce81538013d49$var$markerMock = { + onDidDestroy: ()=>$e85ce81538013d49$var$disposedDisposable, + getScreenRange: ()=>new Range() +}; +const $e85ce81538013d49$var$dummyDecoration = new (0, $2946613f0e118ee7$export$2e2bcd8739ae039)($e85ce81538013d49$var$markerMock, null, {}); +class $e85ce81538013d49$export$2e2bcd8739ae039 { + /** + * Creates a new Minimap instance for the given `TextEditor`. + * + * @param {Object} options An object with the new Minimap properties + * @param {TextEditor} options.textEditor The target text editor for the minimap + * @param {boolean} [options.standAlone] Whether this minimap is in stand-alone mode or not + * @param {number} [options.width] The minimap width in pixels + * @param {number} [options.height] The minimap height in pixels + * @throws {Error} Cannot create a minimap without an editor + */ constructor(options = {}){ + if (!options.textEditor) throw new Error("Cannot create a minimap without an editor"); + /** + * The Minimap's minimapElement. + * + * @type {MinimapElement} + * @access private + */ this.minimapElement = undefined; + // local cache of this.minimapElement.DecorationManagement + this.DecorationManagement = undefined; + /** + * The Minimap's text editor. + * + * @type {TextEditor} + * @access private + */ this.textEditor = options.textEditor; + /** + * The Minimap's text editor element. + * + * @access private + */ this.editorElement = undefined; + /** + * The stand-alone state of the current Minimap. + * + * @type {boolean} + * @access private + */ this.standAlone = options.standAlone; + /** + * The width of the current Minimap. + * + * @type {number} + * @access private + */ this.width = options.width; + /** + * The height of the current Minimap. + * + * @type {number} + * @access private + */ this.height = options.height; + /** + * The id of the current Minimap. + * + * @type {Number} + * @access private + */ this.id = $e85ce81538013d49$var$nextModelId++; + /** + * The events emitter of the current Minimap. + * + * @type {Emitter} + * @access private + */ this.emitter = new (0, $cz7Pu$atom.Emitter)(); + /** + * The Minimap's subscriptions. + * + * @type {CompositeDisposable} + * @access private + */ this.subscriptions = new (0, $cz7Pu$atom.CompositeDisposable)(); + /** + * The adapter object leverage the access to several properties from the `TextEditor`/`TextEditorElement` to support + * the different APIs between different version of Atom. + * + * @type {Object} + * @access private + */ this.adapter = null; + /** + * The char height of the current Minimap, will be `undefined` unless `setCharWidth` is called. + * + * @type {number} + * @access private + */ this.charHeight = null; + /** + * The char height from the package's configuration. Will be overriden by the instance value. + * + * @type {number} + * @access private + */ this.configCharHeight = null; + /** + * The char width of the current Minimap, will be `undefined` unless `setCharWidth` is called. + * + * @type {number} + * @access private + */ this.charWidth = null; + /** + * The char width from the package's configuration. Will be overriden by the instance value. + * + * @type {number} + * @access private + */ this.configCharWidth = null; + /** + * The interline of the current Minimap, will be `undefined` unless `setCharWidth` is called. + * + * @type {number} + * @access private + */ this.interline = null; + /** + * The interline from the package's configuration. Will be overriden by the instance value. + * + * @type {number} + * @access private + */ this.configInterline = null; + /** + * The devicePixelRatioRounding of the current Minimap, will be `undefined` unless `setDevicePixelRatioRounding` is called. + * + * @type {boolean} + * @access private + */ this.devicePixelRatioRounding = null; + /** + * The devicePixelRatioRounding from the package's configuration. Will be overriden by the instance value. + * + * @type {boolean} + * @access private + */ this.configDevicePixelRatioRounding = null; + /** + * A number of milliseconds which determines how often the minimap should redraw itself after detecting changes in + * the text editor. A value of 0 will cause the minimap to redraw immediately. + * + * @type {number} + * @access private + */ this.redrawDelay = 0; + /** + * A boolean value to store whether this Minimap have been destroyed or not. + * + * @type {boolean} + * @access private + */ this.destroyed = false; + /** + * A boolean value to store whether the `scrollPastEnd` setting is enabled or not. + * + * @type {boolean} + * @access private + */ this.scrollPastEnd = false; + /** + * An array of changes registered with textEditor.onDidChange() which have not yet been handled + * + * @type {Array} + * @access private + */ this.pendingChangeEvents = []; + /** + * Timer reference which, once fired, will flush all the pending changes stored in this.pendingChangeEvents array. + * + * @type {Timer | null} + * @access private + */ this.flushChangesTimer = null; + if (atom.views.getView(this.textEditor).getScrollTop != null) this.adapter = new (0, $248c7ec3a64ef176$export$2e2bcd8739ae039)(this.textEditor); + /** + * When in stand-alone or independent scrolling mode, this value can be used instead of the computed scroll. + * + * @type {number} + * @access private + */ this.scrollTop = 0; + let configSubscription = this.subscribeToConfig(); + this.subscriptions.add(configSubscription, this.textEditor.onDidChangeGrammar(()=>{ + this.subscriptions.remove(configSubscription); + configSubscription.dispose(); + configSubscription = this.subscribeToConfig(); + this.subscriptions.add(configSubscription); + }), this.adapter.onDidChangeScrollTop(()=>{ + if (!this.standAlone && !this.ignoreTextEditorScroll && !this.inChangeScrollTop) { + this.inChangeScrollTop = true; + this.updateScrollTop(); + this.emitter.emit("did-change-scroll-top", this); + this.inChangeScrollTop = false; + } + if (this.ignoreTextEditorScroll) this.ignoreTextEditorScroll = false; + }), this.adapter.onDidChangeScrollLeft(()=>{ + if (!this.standAlone) this.emitter.emit("did-change-scroll-left", this); + }), this.textEditor.onDidChange((changes)=>{ + this.scheduleChanges(changes); + }), this.textEditor.onDidDestroy(()=>{ + if (0, $e6ccb2de5b0684dd$export$3542142cf713a624) (0, $e6ccb2de5b0684dd$export$3542142cf713a624).delete(this.textEditor); + this.destroy(); + }), /* + FIXME Some changes occuring during the tokenization produces + ranges that deceive the canvas rendering by making some + lines at the end of the buffer intact while they are in fact not, + resulting in extra lines appearing at the end of the minimap. + Forcing a whole repaint to fix that bug is suboptimal but works. + */ this.textEditor.onDidTokenize(()=>{ + this.emitter.emit("did-change-config"); + })); + } + /** Destroys the model. */ destroy() { + if (this.destroyed) return; + clearTimeout(this.flushChangesTimer); + this.pendingChangeEvents = []; + this.subscriptions.dispose(); + this.emitter.emit("did-destroy"); + this.emitter.dispose(); + this.destroyed = true; + } + /** + * Returns `true` when this `Minimap` has benn destroyed. + * + * @returns {boolean} Whether this Minimap has been destroyed or not + */ isDestroyed() { + return this.destroyed; + } + /** + * Schedule changes from textEditor.onDidChange() to be handled at a later time + * + * @param {Array} changes The changes to be scheduled + * @returns Void + * @access private + */ scheduleChanges(changes) { + this.pendingChangeEvents = this.pendingChangeEvents.concat(changes); + // Optimisation: If the redraw delay is set to 0, do not even schedule a timer + if (!this.redrawDelay) this.requestFlushChanges(); + if (!this.flushChangesTimer) // If any changes happened within the timeout's delay, a timeout will already have been + // scheduled -> no need to schedule again + this.flushChangesTimer = setTimeout(()=>{ + this.requestFlushChanges(); + }, this.redrawDelay); + } + /** + * Flush all changes which have been scheduled for later processing by this.scheduleChanges() + * + * @returns Void + * @access private + */ flushChanges() { + clearTimeout(this.flushChangesTimer); + this.flushChangesTimer = null; + this.emitChanges(this.pendingChangeEvents); + this.pendingChangeEvents = []; + } + /** + * Requests flush changes if not already requested + * + * @returns Void + * @access private + */ requestFlushChanges() { + if (!this.requestedFlushChanges) this.requestedFlushChanges = requestAnimationFrame(()=>{ + this.flushChanges(); + if (this.requestedFlushChanges) { + cancelAnimationFrame(this.requestedFlushChanges); + this.requestedFlushChanges = null; + } + }); + } + /** + * Registers an event listener to the `did-change` event. + * + * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be + * called with an event object with the following properties: + * + * - Start: The change's start row number + * - End: The change's end row number + * - ScreenDelta: the delta in buffer rows between the versions before and after the change + * + * @returns {Disposable} A disposable to stop listening to the event + */ onDidChange(callback) { + return this.emitter.on("did-change", callback); + } + /** + * Registers an event listener to the `did-change-config` event. + * + * @param {function():void} callback A function to call when the event is triggered. + * @returns {Disposable} A disposable to stop listening to the event + */ onDidChangeConfig(callback) { + return this.emitter.on("did-change-config", callback); + } + /** + * Registers an event listener to the `did-change-scroll-top` event. + * + * The event is dispatched when the text editor `scrollTop` value have been changed or when the minimap scroll top + * have been changed in stand-alone mode. + * + * @param {function(minimap:Minimap):void} callback A function to call when the event is triggered. The current + * Minimap is passed as argument to the callback. + * @returns {Disposable} A disposable to stop listening to the event + */ onDidChangeScrollTop(callback) { + return this.emitter.on("did-change-scroll-top", callback); + } + /** + * Registers an event listener to the `did-change-scroll-left` event. + * + * @param {function(minimap:Minimap):void} callback A function to call when the event is triggered. The current + * Minimap is passed as argument to the callback. + * @returns {Disposable} A disposable to stop listening to the event + */ onDidChangeScrollLeft(callback) { + return this.emitter.on("did-change-scroll-left", callback); + } + /** + * Registers an event listener to the `did-change-stand-alone` event. + * + * This event is dispatched when the stand-alone of the current Minimap is either enabled or disabled. + * + * @param {function(minimap:Minimap):void} callback A function to call when the event is triggered. The current + * Minimap is passed as argument to the callback. + * @returns {Disposable} A disposable to stop listening to the event + */ onDidChangeStandAlone(callback) { + return this.emitter.on("did-change-stand-alone", callback); + } + /** + * Registers an event listener to the `did-destroy` event. + * + * This event is dispatched when this Minimap have been destroyed. It can occurs either because the {@link destroy} + * method have been called on the Minimap or because the target text editor have been destroyed. + * + * @param {function():void} callback A function to call when the event is triggered. + * @returns {Disposable} A disposable to stop listening to the event + */ onDidDestroy(callback) { + return this.emitter.on("did-destroy", callback); + } + /** + * Registers to the config changes for the current editor scope. + * + * @returns {Disposable} The disposable to dispose all the registered events + * @access private + */ subscribeToConfig() { + const subs = new (0, $cz7Pu$atom.CompositeDisposable)(); + const opts = { + scope: this.textEditor.getRootScopeDescriptor() + }; + subs.add(atom.config.observe("editor.scrollPastEnd", opts, (scrollPastEnd)=>{ + this.scrollPastEnd = scrollPastEnd; + this.adapter.scrollPastEnd = this.scrollPastEnd; + this.emitter.emit("did-change-config"); + }), atom.config.observe("minimap.charHeight", opts, (configCharHeight)=>{ + this.configCharHeight = configCharHeight; + this.updateScrollTop(); + this.emitter.emit("did-change-config"); + }), atom.config.observe("minimap.charWidth", opts, (configCharWidth)=>{ + this.configCharWidth = configCharWidth; + this.updateScrollTop(); + this.emitter.emit("did-change-config"); + }), atom.config.observe("minimap.interline", opts, (configInterline)=>{ + this.configInterline = configInterline; + this.updateScrollTop(); + this.emitter.emit("did-change-config"); + }), atom.config.observe("minimap.independentMinimapScroll", opts, (independentMinimapScroll)=>{ + this.independentMinimapScroll = independentMinimapScroll; + this.updateScrollTop(); + }), atom.config.observe("minimap.scrollSensitivity", opts, (scrollSensitivity)=>{ + this.scrollSensitivity = scrollSensitivity; + }), atom.config.observe("minimap.redrawDelay", opts, (redrawDelay)=>{ + this.redrawDelay = redrawDelay; + }), // cdprr is shorthand for configDevicePixelRatioRounding + atom.config.observe("minimap.devicePixelRatioRounding", opts, (cdprr)=>{ + this.configDevicePixelRatioRounding = cdprr; + this.updateScrollTop(); + this.emitter.emit("did-change-config"); + })); + return subs; + } + /** + * Returns `true` when the current Minimap is a stand-alone minimap. + * + * @returns {boolean} Whether this Minimap is in stand-alone mode or not. + */ isStandAlone() { + return this.standAlone; + } + /** + * Sets the stand-alone mode for this minimap. + * + * @fires {did-change-stand-alone} if The stand-alone mode have been toggled on or off by the call + * @param {boolean} standAlone The new state of the stand-alone mode for this Minimap + */ setStandAlone(standAlone) { + if (standAlone !== this.standAlone) { + this.standAlone = standAlone; + this.emitter.emit("did-change-stand-alone", this); + } + } + /** @returns {MinimapElement} Returns the current minimapElement */ getMinimapElement() { + return this.minimapElement; + } + /** + * Returns the `TextEditor` that this minimap represents. + * + * @returns {TextEditor} This Minimap's text editor + */ getTextEditor() { + return this.textEditor; + } + /** + * Returns the `TextEditorElement` for the Minimap's `TextEditor`. + * + * @returns {TextEditorElement} The minimap's text editor element + */ getTextEditorElement() { + if (this.editorElement) return this.editorElement; + this.editorElement = atom.views.getView(this.getTextEditor()); + return this.editorElement; + } + /** + * Returns the height of the `TextEditor` at the Minimap scale. + * + * @returns {number} The scaled height of the text editor + */ getTextEditorScaledHeight() { + return this.adapter.getHeight() * this.getVerticalScaleFactor(); + } + /** + * Returns the `TextEditor` scroll top value at the Minimap scale. + * + * @returns {number} The scaled scroll top of the text editor + */ getTextEditorScaledScrollTop() { + return this.adapter.getScrollTop() * this.getVerticalScaleFactor(); + } + /** + * Returns the `TextEditor` scroll left value at the Minimap scale. + * + * @returns {number} The scaled scroll left of the text editor + */ getTextEditorScaledScrollLeft() { + return this.adapter.getScrollLeft() * this.getHorizontalScaleFactor(); + } + /** + * Returns the `TextEditor` maximum scroll top value. + * + * When the `scrollPastEnd` setting is enabled, the method compensate the extra scroll by removing the same height as + * added by the editor from the final value. + * + * @returns {number} The maximum scroll top of the text editor + */ getTextEditorMaxScrollTop() { + return this.adapter.getMaxScrollTop(); + } + /** + * Returns the `TextEditor` scroll top value. + * + * @returns {number} The scroll top of the text editor + */ getTextEditorScrollTop() { + return this.adapter.getScrollTop(); + } + /** + * Sets the scroll top of the `TextEditor`. + * + * @param {number} scrollTop The new scroll top value + */ setTextEditorScrollTop(scrollTop, ignoreTextEditorScroll = false) { + this.ignoreTextEditorScroll = ignoreTextEditorScroll; + this.adapter.setScrollTop(scrollTop); + } + /** + * Returns the `TextEditor` scroll left value. + * + * @returns {number} The scroll left of the text editor + */ getTextEditorScrollLeft() { + return this.adapter.getScrollLeft(); + } + /** + * Returns the height of the `TextEditor`. + * + * @returns {number} The height of the text editor + */ getTextEditorHeight() { + return this.adapter.getHeight(); + } + /** + * Returns the `TextEditor` scroll as a value normalized between `0` and `1`. + * + * When the `scrollPastEnd` setting is enabled the value may exceed `1` as the maximum scroll value used to compute + * this ratio compensate for the extra height in the editor. **Use {@link getCapedTextEditorScrollRatio} when you need + * a value that is strictly between `0` and `1`.** + * + * @returns {number} The scroll ratio of the text editor + */ getTextEditorScrollRatio() { + return this.adapter.getScrollTop() / (this.getTextEditorMaxScrollTop() || 1); + } + /** + * Returns the `TextEditor` scroll as a value normalized between `0` and `1`. + * + * The returned value will always be strictly between `0` and `1`. + * + * @returns {number} The scroll ratio of the text editor strictly between 0 and 1 + */ getCapedTextEditorScrollRatio() { + return Math.min(1, this.getTextEditorScrollRatio()); + } + /** + * Returns the height of the whole minimap in pixels based on the `minimap` settings. + * + * @returns {number} The height of the minimap + */ getHeight() { + const additionalHeight = this.scrollPastEnd ? this.textEditor.getRowsPerPage() : 0; + return (this.textEditor.getScreenLineCount() + additionalHeight) * this.getLineHeight(); + } + /** + * Returns the width of the whole minimap in pixels based on the `minimap` settings. + * + * @returns {number} The width of the minimap + */ getWidth() { + return this.textEditor.getMaxScreenLineLength() * this.getCharWidth(); + } + /** + * Returns the height the Minimap content will take on screen. + * + * When the Minimap height is greater than the `TextEditor` height, the `TextEditor` height is returned instead. + * + * @returns {number} The visible height of the Minimap + */ getVisibleHeight() { + return Math.min(this.getScreenHeight(), this.getHeight()); + } + /** + * Returns the height the minimap should take once displayed, it's either the height of the `TextEditor` or the + * provided `height` when in stand-alone mode. + * + * @returns {number} The total height of the Minimap + */ getScreenHeight() { + if (this.isStandAlone()) { + if (this.height != null) return this.height; + else return this.getHeight(); + } else return this.adapter.getHeight(); + } + /** + * Returns the width the whole Minimap will take on screen. + * + * @returns {number} The width of the Minimap when displayed + */ getVisibleWidth() { + return Math.min(this.getScreenWidth(), this.getWidth()); + } + /** + * Returns the width the Minimap should take once displayed, it's either the width of the Minimap content or the + * provided `width` when in standAlone mode. + * + * @returns {number} The Minimap screen width + */ getScreenWidth() { + if (this.isStandAlone() && this.width != null) return this.width; + else return this.getWidth(); + } + /** + * Sets the preferred height and width when in stand-alone mode. + * + * This method is called by the for this Minimap so that the model is kept in sync with the view. + * + * @param {number} height The new height of the Minimap + * @param {number} width The new width of the Minimap + */ setScreenHeightAndWidth(height, width) { + if (this.width !== width || this.height !== height) { + this.height = height; + this.width = width; + this.updateScrollTop(); + } + } + /** + * Returns the vertical scaling factor when converting coordinates from the `TextEditor` to the Minimap. + * + * @returns {number} The Minimap vertical scaling factor + */ getVerticalScaleFactor() { + return this.getLineHeight() / this.textEditor.getLineHeightInPixels(); + } + /** + * Returns the horizontal scaling factor when converting coordinates from the `TextEditor` to the Minimap. + * + * @returns {number} The Minimap horizontal scaling factor + */ getHorizontalScaleFactor() { + return this.getCharWidth() / this.textEditor.getDefaultCharWidth(); + } + /** + * Returns the height of a line in the Minimap in pixels. + * + * @returns {number} A line's height in the Minimap + */ getLineHeight() { + return this.getCharHeight() + this.getInterline(); + } + /** + * Returns the width of a character in the Minimap in pixels. + * + * @returns {number} A character's width in the Minimap + */ getCharWidth() { + if (this.charWidth != null) return this.charWidth; + else return this.configCharWidth; + } + /** + * Sets the char width for this Minimap. This value will override the value from the config for this instance only. A + * `did-change-config` event is dispatched. + * + * @fires {did-change-config} when The value is changed + * @param {number} charWidth The new width of a char in the Minimap + */ setCharWidth(charWidth) { + this.charWidth = Math.floor(charWidth); + this.emitter.emit("did-change-config"); + } + /** + * Returns the height of a character in the Minimap in pixels. + * + * @returns {number} A character's height in the Minimap + */ getCharHeight() { + if (this.charHeight != null) return this.charHeight; + else return this.configCharHeight; + } + /** + * Sets the char height for this Minimap. This value will override the value from the config for this instance only. A + * `did-change-config` event is dispatched. + * + * @fires {did-change-config} when The value is changed + * @param {number} charHeight The new height of a char in the Minimap + */ setCharHeight(charHeight) { + this.charHeight = Math.floor(charHeight); + this.emitter.emit("did-change-config"); + } + /** + * Returns the height of an interline in the Minimap in pixels. + * + * @returns {number} The interline's height in the Minimap + */ getInterline() { + if (this.interline != null) return this.interline; + else return this.configInterline; + } + /** + * Sets the interline height for this Minimap. This value will override the value from the config for this instance + * only. A `did-change-config` event is dispatched. + * + * @fires {did-change-config} when The value is changed + * @param {number} interline The new height of an interline in the Minimap + */ setInterline(interline) { + this.interline = Math.floor(interline); + this.emitter.emit("did-change-config"); + } + /** + * Returns the status of devicePixelRatioRounding in the Minimap. + * + * @returns {boolean} The devicePixelRatioRounding status in the Minimap + */ getDevicePixelRatioRounding() { + if (this.devicePixelRatioRounding != null) return this.devicePixelRatioRounding; + else return this.configDevicePixelRatioRounding; + } + /** + * Sets the devicePixelRatioRounding status for this Minimap. This value will override the value from the config for + * this instance only. A `did-change-config` event is dispatched. + * + * @fires {did-change-config} when The value is changed + * @param {boolean} devicePixelRatioRounding The new status of devicePixelRatioRounding in the Minimap + */ setDevicePixelRatioRounding(devicePixelRatioRounding) { + this.devicePixelRatioRounding = devicePixelRatioRounding; + this.emitter.emit("did-change-config"); + } + /** + * Returns the devicePixelRatio in the Minimap in pixels. + * + * @returns {number} The devicePixelRatio in the Minimap + */ getDevicePixelRatio() { + if (this.getDevicePixelRatioRounding()) { + if (devicePixelRatio >= 1) return Math.round(devicePixelRatio); + else return Math.max(Math.round(devicePixelRatio * 10) / 10, 0.1); + } + return devicePixelRatio; + } + /** + * Returns the index of the first visible row in the Minimap. + * + * @returns {number} The index of the first visible row + */ getFirstVisibleScreenRow() { + return Math.floor(this.getScrollTop() / this.getLineHeight()); + } + /** + * Returns the index of the last visible row in the Minimap. + * + * @returns {number} The index of the last visible row + */ getLastVisibleScreenRow() { + return Math.ceil((this.getScrollTop() + this.getScreenHeight()) / this.getLineHeight()); + } + /** + * Returns true when the `independentMinimapScroll` setting have been enabled. + * + * @returns {boolean} Whether the minimap can scroll independently + */ scrollIndependentlyOnMouseWheel() { + return this.independentMinimapScroll; + } + /** + * Returns the current scroll of the Minimap. + * + * The Minimap can scroll only when its height is greater that the height of its `TextEditor`. + * + * @returns {number} The scroll top of the Minimap + */ getScrollTop() { + return this.standAlone || this.independentMinimapScroll ? this.scrollTop : this.getScrollTopFromEditor(); + } + /** + * Sets the minimap scroll top value when in stand-alone mode. + * + * @fires {did-change-scroll-top} if The Minimap's stand-alone mode is enabled + * @param {number} scrollTop The new scroll top for the Minimap + */ setScrollTop(scrollTop) { + this.scrollTop = Math.max(0, Math.min(this.getMaxScrollTop(), scrollTop)); + if (this.standAlone || this.independentMinimapScroll) this.emitter.emit("did-change-scroll-top", this); + } + /** + * Returns the minimap scroll as a ration between 0 and 1. + * + * @returns {number} The minimap scroll ratio + */ getScrollRatio() { + return this.getScrollTop() / this.getMaxScrollTop(); + } + /** + * Updates the scroll top value with the one computed from the text editor when the minimap is in the independent + * scrolling mode. + * + * @access private + */ updateScrollTop() { + if (this.independentMinimapScroll) { + try { + this.setScrollTop(this.getScrollTopFromEditor()); + } catch (err) {} + this.emitter.emit("did-change-scroll-top", this); + } + } + /** + * Returns the scroll top as computed from the text editor scroll top. + * + * @returns {number} The computed scroll top value + */ getScrollTopFromEditor() { + return Math.abs(this.getCapedTextEditorScrollRatio() * this.getMaxScrollTop()); + } + /** + * Returns the maximum scroll value of the Minimap. + * + * @returns {number} The maximum scroll top for the Minimap + */ getMaxScrollTop() { + return Math.max(0, this.getHeight() - this.getScreenHeight()); + } + /** + * Returns `true` when the Minimap can scroll. + * + * @returns {boolean} Whether this Minimap can scroll or not + */ canScroll() { + return this.getMaxScrollTop() > 0; + } + /** + * Updates the minimap scroll top value using a mouse event when the independent scrolling mode is enabled + * + * @param {MouseEvent} event The mouse wheel event + * @access private + */ onMouseWheel(event) { + if (this.scrollIndependentlyOnMouseWheel()) { + event.stopPropagation(); + if (!this.canScroll()) return; + const { wheelDeltaY: wheelDeltaY } = event; + const previousScrollTop = this.getScrollTop(); + const updatedScrollTop = previousScrollTop - Math.round(wheelDeltaY * this.scrollSensitivity); + this.setScrollTop(updatedScrollTop); + } + } + /** + * Delegates to `TextEditor#getMarker`. + * + * @access private + */ getMarker(id) { + return this.textEditor.getMarker(id); + } + /** + * Delegates to `TextEditor#findMarkers`. + * + * @access private + */ findMarkers(o) { + try { + return this.textEditor.findMarkers(o); + } catch (error) { + return []; + } + } + /** + * Delegates to `TextEditor#markBufferRange`. + * + * @access private + */ markBufferRange(range) { + return this.textEditor.markBufferRange(range); + } + /** + * Emits a change events with the passed-in changes as data. + * + * @param {Object} changes A change to dispatch + * @access private + */ emitChanges(changes) { + this.emitter.emit("did-change", changes); + } + /** + * Enables the cache at the adapter level to avoid consecutive access to the text editor API during a render phase. + * + * @access private + */ enableCache() { + this.adapter.enableCache(); + } + /** + * Disable the adapter cache. + * + * @access private + */ clearCache() { + this.adapter.clearCache(); + } + editorDestroyed() { + this.adapter.editorDestroyed(); + } + /** + * Get the DecorationManagement API for the current minimapElement + * + * @returns {DecorationManagement | undefined} + */ getDecorationManagement() { + var _this_minimapElement; + if (!this.DecorationManagement) { + if ((_this_minimapElement = this.minimapElement) === null || _this_minimapElement === void 0 ? void 0 : _this_minimapElement.DecorationManagement) this.DecorationManagement = this.minimapElement.DecorationManagement; + } + return this.DecorationManagement; + } + // Decoration API duplicated for backward compatibility in the service + getDecorations() { + var _this_getDecorationManagement; + var _this_getDecorationManagement_getDecorations; + return (_this_getDecorationManagement_getDecorations = (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.getDecorations()) !== null && _this_getDecorationManagement_getDecorations !== void 0 ? _this_getDecorationManagement_getDecorations : []; + } + onDidAddDecoration(...args) { + var _this_getDecorationManagement; + var _this_getDecorationManagement_onDidAddDecoration; + return (_this_getDecorationManagement_onDidAddDecoration = (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.onDidAddDecoration(...args)) !== null && _this_getDecorationManagement_onDidAddDecoration !== void 0 ? _this_getDecorationManagement_onDidAddDecoration : $e85ce81538013d49$var$disposedDisposable; + } + onDidRemoveDecoration(...args) { + var _this_getDecorationManagement; + var _this_getDecorationManagement_onDidRemoveDecoration; + return (_this_getDecorationManagement_onDidRemoveDecoration = (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.onDidRemoveDecoration(...args)) !== null && _this_getDecorationManagement_onDidRemoveDecoration !== void 0 ? _this_getDecorationManagement_onDidRemoveDecoration : $e85ce81538013d49$var$disposedDisposable; + } + onDidChangeDecorationRange(...args) { + var _this_getDecorationManagement; + var _this_getDecorationManagement_onDidChangeDecorationRange; + return (_this_getDecorationManagement_onDidChangeDecorationRange = (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.onDidChangeDecorationRange(...args)) !== null && _this_getDecorationManagement_onDidChangeDecorationRange !== void 0 ? _this_getDecorationManagement_onDidChangeDecorationRange : $e85ce81538013d49$var$disposedDisposable; + } + onDidUpdateDecoration(...args) { + var _this_getDecorationManagement; + var _this_getDecorationManagement_onDidUpdateDecoration; + return (_this_getDecorationManagement_onDidUpdateDecoration = (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.onDidUpdateDecoration(...args)) !== null && _this_getDecorationManagement_onDidUpdateDecoration !== void 0 ? _this_getDecorationManagement_onDidUpdateDecoration : $e85ce81538013d49$var$disposedDisposable; + } + decorationForId(...args) { + var _this_getDecorationManagement; + var _this_getDecorationManagement_decorationForId; + return (_this_getDecorationManagement_decorationForId = (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.decorationForId(...args)) !== null && _this_getDecorationManagement_decorationForId !== void 0 ? _this_getDecorationManagement_decorationForId : $e85ce81538013d49$var$dummyDecoration; + } + decorationsForScreenRowRange(...args) { + var _this_getDecorationManagement; + var _this_getDecorationManagement_decorationsForScreenRowRange; + return (_this_getDecorationManagement_decorationsForScreenRowRange = (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.decorationsForScreenRowRange(...args)) !== null && _this_getDecorationManagement_decorationsForScreenRowRange !== void 0 ? _this_getDecorationManagement_decorationsForScreenRowRange : $e85ce81538013d49$var$dummyDecoration; + } + decorationsByTypeThenRows() { + var _this_getDecorationManagement; + var _this_getDecorationManagement_decorationsByTypeThenRows; + return (_this_getDecorationManagement_decorationsByTypeThenRows = (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.decorationsByTypeThenRows()) !== null && _this_getDecorationManagement_decorationsByTypeThenRows !== void 0 ? _this_getDecorationManagement_decorationsByTypeThenRows : $e85ce81538013d49$var$dummyDecoration; + } + decorateMarker(...args) { + var _this_getDecorationManagement; + var _this_getDecorationManagement_decorateMarker; + return (_this_getDecorationManagement_decorateMarker = (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.decorateMarker(...args)) !== null && _this_getDecorationManagement_decorateMarker !== void 0 ? _this_getDecorationManagement_decorateMarker : $e85ce81538013d49$var$dummyDecoration; + } + removeDecoration(...args) { + var _this_getDecorationManagement; + return (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.removeDecoration(...args); + } + removeAllDecorationsForMarker(...args) { + var _this_getDecorationManagement; + return (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.removeAllDecorationsForMarker(...args); + } + removeAllDecorations() { + var _this_getDecorationManagement; + return (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.removeAllDecorations(); + } +} + + +var $9d1240d3ca4fda1c$exports = {}; +$9d1240d3ca4fda1c$exports = JSON.parse('{"plugins":{"type":"object","properties":{}},"autoToggle":{"title":"Show Minimap On Atom Start","type":"boolean","default":true,"order":1},"displayMinimapOnLeft":{"type":"boolean","default":false,"order":2},"displayCodeHighlights":{"type":"boolean","default":true,"description":"Toggles the render of the buffer tokens in the minimap.","order":3},"displayPluginsControls":{"type":"boolean","default":true,"description":"You need to restart Atom for this setting to be effective.","order":4},"minimapScrollIndicator":{"type":"boolean","default":true,"description":"Toggles the display of a side line showing which part of the buffer is currently displayed by the minimap. This side line will only appear if the minimap is taller than the editor view height.","order":5},"adjustMinimapWidthToSoftWrap":{"type":"boolean","default":true,"description":"If this option is enabled and Soft Wrap is checked then the Minimap max width is set to the Preferred Line Length value.","order":6},"adjustMinimapWidthOnlyIfSmaller":{"type":"boolean","default":true,"description":"If this option and `adjustMinimapWidthToSoftWrap` are enabled the minimap width will never go past the limit sets by CSS. On the other hand, when disabled the minimap will expand to honor the preferred line width.","order":7},"ignoreWhitespacesInTokens":{"type":"boolean","default":false,"description":"When enabled, text editor tokens are rendered as plain blocks, with no regards to the whitespaces they contains.","order":8},"charWidth":{"type":"number","default":1,"minimum":0.5,"order":9},"charHeight":{"type":"number","default":2,"minimum":0.5,"order":10},"interline":{"type":"number","default":1,"minimum":0,"description":"The space between lines in the minimap in pixels.","order":11},"textOpacity":{"type":"number","default":0.6,"minimum":0,"maximum":1,"description":"The opacity used to render the line\'s text in the minimap.","order":12},"moveCursorOnMinimapClick":{"type":"boolean","default":false,"description":"Moves the cursor to the beginning of the target line when clicking on the minimap","order":13},"independentMinimapScroll":{"type":"boolean","title":"Independent Minimap Scroll On Mouse Wheel Events","default":false,"description":"When enabled, using the mouse wheel over the Minimap will make it scroll independently of the text editor. The Minimap will still sync with the editor whenever the editor is scrolled, but it will no longer relay the mouse wheel events to the editor.","order":14},"scrollSensitivity":{"type":"number","default":0.5,"description":"The scrolling speed when the `Independent Minimap Scroll On Mouse Wheel Events` setting is enabled.","order":15},"smoothScrolling":{"type":"boolean","default":false,"description":"Whether to offset the minimap canvas when scrolling to keep the scroll smooth. When `true` the minimap canvas will be offseted, resulting in a smoother scroll, but with the side-effect of a blurry minimap when the canvas is placed between pixels. When `false` the canvas will always stay at the same position, and will never look blurry, but the scroll will appear more jagged.","order":16},"createPluginInDevMode":{"type":"boolean","default":false,"order":17},"absoluteMode":{"type":"boolean","default":false,"description":"When enabled the text editor content will be able to flow below the minimap.","order":18},"adjustAbsoluteModeHeight":{"type":"boolean","default":false,"description":"When enabled and `Absolute Mode` is also enabled, the minimap height will be adjusted to only take the space required by the text editor content, leaving the space below triggering mouse events on the text editor. **Be aware this can have some impact on performances as the minimap canvases will be resized every time a change in the editor make its height change.**","order":19},"redrawDelay":{"type":"number","default":400,"minimum":0,"maximum":2000,"description":"Controls how often (in ms) the minimap should redraw itself after changing the text editor\'s contents. Setting this to 100ms or higher could dramatically improve editor responsiveness when working with large files. A value of 0 will cause the minimap to redraw itself immediately on each change.","order":20},"devicePixelRatioRounding":{"type":"boolean","default":true,"description":"Toggles the rounding of the devicePixelRatio in the minimap.","order":21},"useHardwareAcceleration":{"type":"boolean","default":true,"order":22},"scrollAnimation":{"type":"boolean","default":false,"description":"Enables animations when scrolling by clicking on the minimap.","order":23},"scrollAnimationDuration":{"type":"integer","default":300,"description":"The duration of scrolling animations when clicking on the minimap.","order":24},"maxTokensInOneLine":{"type":"integer","default":160,"description":"The maximum number of tokens that are rendered for each line.","order":25}}'); + + +var $d6bb1451a6029905$exports = {}; + +$parcel$export($d6bb1451a6029905$exports, "plugins", () => $d6bb1451a6029905$export$8b3ca321c77fdea6); +$parcel$export($d6bb1451a6029905$exports, "registerPlugin", () => $d6bb1451a6029905$export$7612db19fb8beb1e); +$parcel$export($d6bb1451a6029905$exports, "unregisterPlugin", () => $d6bb1451a6029905$export$48d00697bf0841b0); +$parcel$export($d6bb1451a6029905$exports, "togglePluginActivation", () => $d6bb1451a6029905$export$8cf5509a1f8ee810); +$parcel$export($d6bb1451a6029905$exports, "deactivateAllPlugins", () => $d6bb1451a6029905$export$4751c4964dd9fdd5); +$parcel$export($d6bb1451a6029905$exports, "activatePlugin", () => $d6bb1451a6029905$export$c20a82b9d4db0e25); +$parcel$export($d6bb1451a6029905$exports, "deactivatePlugin", () => $d6bb1451a6029905$export$eca032c13825f076); +$parcel$export($d6bb1451a6029905$exports, "getPluginsOrder", () => $d6bb1451a6029905$export$b9b9891832107981); + + +"use strict"; +const $d6bb1451a6029905$export$8b3ca321c77fdea6 = {}; +/** + * The plugins' subscriptions stored using the plugin names as keys. + * + * @type {Object} + * @access private + */ const $d6bb1451a6029905$var$pluginsSubscriptions = {}; +/** + * A map that stores the display order for each plugin + * + * @type {Object} + * @access private + */ const $d6bb1451a6029905$var$pluginsOrderMap = {}; +function $d6bb1451a6029905$export$7612db19fb8beb1e(name, plugin) { + $d6bb1451a6029905$export$8b3ca321c77fdea6[name] = plugin; + $d6bb1451a6029905$var$pluginsSubscriptions[name] = new (0, $cz7Pu$atom.CompositeDisposable)(); + const event = { + name: name, + plugin: plugin + }; + (0, $e6ccb2de5b0684dd$export$bad24218ebd77223).emit("did-add-plugin", event); + if (atom.config.get("minimap.displayPluginsControls")) $d6bb1451a6029905$var$registerPluginControls(name, plugin); + $d6bb1451a6029905$var$updatesPluginActivationState(name); +} +function $d6bb1451a6029905$export$48d00697bf0841b0(name) { + const plugin = $d6bb1451a6029905$export$8b3ca321c77fdea6[name]; + if (atom.config.get("minimap.displayPluginsControls")) $d6bb1451a6029905$var$unregisterPluginControls(name); + delete $d6bb1451a6029905$export$8b3ca321c77fdea6[name]; + const event = { + name: name, + plugin: plugin + }; + (0, $e6ccb2de5b0684dd$export$bad24218ebd77223).emit("did-remove-plugin", event); +} +function $d6bb1451a6029905$export$8cf5509a1f8ee810(name, boolean) { + const settingsKey = `minimap.plugins.${name}`; + if (boolean !== undefined && boolean !== null) atom.config.set(settingsKey, boolean); + else atom.config.set(settingsKey, !atom.config.get(settingsKey)); + $d6bb1451a6029905$var$updatesPluginActivationState(name); +} +function $d6bb1451a6029905$export$4751c4964dd9fdd5() { + for (const [name, plugin] of $d6bb1451a6029905$var$eachPlugin()){ + plugin.deactivatePlugin(); + (0, $e6ccb2de5b0684dd$export$bad24218ebd77223).emit("did-deactivate-plugin", { + name: name, + plugin: plugin + }); + } +} +/** + * A generator function to iterate over registered plugins. + * + * @returns An iterable that yield the name and reference to every plugin as an array in each iteration. + */ function* $d6bb1451a6029905$var$eachPlugin() { + for(const name in $d6bb1451a6029905$export$8b3ca321c77fdea6)yield [ + name, + $d6bb1451a6029905$export$8b3ca321c77fdea6[name] + ]; +} +/** + * Updates the plugin activation state according to the current config. + * + * @fires {did-activate-plugin} if The plugin was activated by the call. + * @fires {did-deactivate-plugin} if The plugin was deactivated by the call. + * @param {string} name The identifying name of the plugin to update. + * @access private + */ function $d6bb1451a6029905$var$updatesPluginActivationState(name) { + const plugin = $d6bb1451a6029905$export$8b3ca321c77fdea6[name]; + const pluginActive = plugin.isActive(); + const settingActive = atom.config.get(`minimap.plugins.${name}`); + if (atom.config.get("minimap.displayPluginsControls")) { + if (settingActive && !pluginActive) $d6bb1451a6029905$export$c20a82b9d4db0e25(name, plugin); + else if (pluginActive && !settingActive) $d6bb1451a6029905$export$eca032c13825f076(name, plugin); + } else { + if (!pluginActive) $d6bb1451a6029905$export$c20a82b9d4db0e25(name, plugin); + else if (pluginActive) $d6bb1451a6029905$export$eca032c13825f076(name, plugin); + } +} +function $d6bb1451a6029905$export$c20a82b9d4db0e25(name, plugin) { + const event = { + name: name, + plugin: plugin + }; + plugin.activatePlugin(); + (0, $e6ccb2de5b0684dd$export$bad24218ebd77223).emit("did-activate-plugin", event); +} +function $d6bb1451a6029905$export$eca032c13825f076(name, plugin) { + const event = { + name: name, + plugin: plugin + }; + plugin.deactivatePlugin(); + (0, $e6ccb2de5b0684dd$export$bad24218ebd77223).emit("did-deactivate-plugin", event); +} +/** + * When the `minimap.displayPluginsControls` setting is toggled, this function will register the commands and setting to + * manage the plugin activation from the minimap settings. + * + * @param {string} name The identifying name of the plugin. + * @param {MinimapPlugin} plugin The plugin instance to register controls for. + * @listens {minimap.plugins.${name}} listen to the setting to update + * the plugin state accordingly. + * @listens {minimap:toggle-${name}} listen to the command on `atom-workspace` + * to toggle the plugin state. + * @access private + */ function $d6bb1451a6029905$var$registerPluginControls(name, plugin) { + const settingsKey = `minimap.plugins.${name}`; + const orderSettingsKey = `minimap.plugins.${name}DecorationsZIndex`; + const config = (0, $e6ccb2de5b0684dd$export$9734216cda67175d)(); + config.plugins.properties[name] = { + type: "boolean", + title: name, + description: `Whether the ${name} plugin is activated and displayed in the Minimap.`, + default: true + }; + config.plugins.properties[`${name}DecorationsZIndex`] = { + type: "integer", + title: `${name} decorations order`, + description: `The relative order of the ${name} plugin's decorations in the layer into which they are drawn. Note that this order only apply inside a layer, so highlight-over decorations will always be displayed above line decorations as they are rendered in different layers.`, + default: 0 + }; + if (atom.config.get(settingsKey) === undefined) atom.config.set(settingsKey, true); + if (atom.config.get(orderSettingsKey) === undefined) atom.config.set(orderSettingsKey, 0); + $d6bb1451a6029905$var$pluginsSubscriptions[name].add(atom.config.observe(settingsKey, ()=>{ + $d6bb1451a6029905$var$updatesPluginActivationState(name); + })); + $d6bb1451a6029905$var$pluginsSubscriptions[name].add(atom.config.observe(orderSettingsKey, (order)=>{ + $d6bb1451a6029905$var$updatePluginsOrderMap(name); + const event = { + name: name, + plugin: plugin, + order: order + }; + (0, $e6ccb2de5b0684dd$export$bad24218ebd77223).emit("did-change-plugin-order", event); + })); + $d6bb1451a6029905$var$pluginsSubscriptions[name].add(atom.commands.add("atom-workspace", { + [`minimap:toggle-${name}`]: ()=>{ + $d6bb1451a6029905$export$8cf5509a1f8ee810(name); + } + })); + $d6bb1451a6029905$var$updatePluginsOrderMap(name); +} +/** + * Updates the display order in the map for the passed-in plugin name. + * + * @param {string} name The name of the plugin to update + * @access private + */ function $d6bb1451a6029905$var$updatePluginsOrderMap(name) { + const orderSettingsKey = `minimap.plugins.${name}DecorationsZIndex`; + $d6bb1451a6029905$var$pluginsOrderMap[name] = atom.config.get(orderSettingsKey); +} +function $d6bb1451a6029905$export$b9b9891832107981() { + return $d6bb1451a6029905$var$pluginsOrderMap; +} +/** + * When the `minimap.displayPluginsControls` setting is toggled, this function will unregister the commands and setting + * that was created previously. + * + * @param {string} name The identifying name of the plugin. + * @access private + */ function $d6bb1451a6029905$var$unregisterPluginControls(name) { + $d6bb1451a6029905$var$pluginsSubscriptions[name].dispose(); + delete $d6bb1451a6029905$var$pluginsSubscriptions[name]; + delete (0, $e6ccb2de5b0684dd$export$9734216cda67175d)().plugins.properties[name]; +} + + +// Functions used to recommend the configurations required for the best performance of Minimap +function $ca338416b6f9b052$export$fd712e6faf525b2f() { + return $ca338416b6f9b052$var$observeAndWarn("core.useTreeSitterParsers", true, "Tree-sitter is off (Low Performance Warning).", `You should turn on Atom's tree-sitter parser to experience the best performance Minimap and Atom are designed for. + Keeping tree-sitter parser off results in sluggish scrolling and lags in the text editor.`); +} +/* Utility function that observes a config and throws warnings once a day if it is not the recommended value */ function $ca338416b6f9b052$var$observeAndWarn(configName, recommendedValue, warningTitle, warningDescription) { + return atom.config.observe(configName, (value)=>{ + if (value !== recommendedValue) { + const storageName = `Minimap.${configName}`; + const today = new Date(); + const previousWarning = window.localStorage.getItem(storageName); + let previousWarningDay = null; + if (previousWarning) previousWarningDay = new Date(Date.parse(previousWarning)).getDay(); + // throw the warning once a day + if (!previousWarningDay || typeof previousWarningDay === "number" && previousWarningDay - today.getDay() >= 1) { + window.localStorage.setItem(storageName, today); + const notification = atom.notifications.addWarning(warningTitle, { + description: warningDescription, + dismissable: true, + buttons: [ + { + text: `Set to ${recommendedValue} and restart Atom`, + onDidClick () { + atom.config.set(configName, true); + notification.dismiss(); + window.localStorage.removeItem(storageName); + setTimeout(()=>{ + atom.reload(); + }, 1500); + } + } + ] + }); + } + } + }); +} + + +var $8c1802050d82880d$exports = {}; +"use strict"; +/** + * This class is used to read the styles informations (e.g. color and background-color) from the DOM to use when + * rendering canvas. This is used in Minimap and Terminal It attaches a dummyNode to the targetNode, renders them, and + * finds the computed style back. + */ Object.defineProperty($8c1802050d82880d$exports, "__esModule", { + value: true +}); +$8c1802050d82880d$exports.StyleReader = void 0; +class $8c1802050d82880d$var$StyleReader { + constructor(){ + this.domStylesCache = new Map(); + this.dummyNode = void 0; + this.targetNode = void 0; + } + /** Set to true once tokenized */ // private hasTokenizedOnce = false + /** + * Returns the computed values for the given property and scope in the DOM. + * + * This function insert a dummy element in the DOM to compute its style, return the specified property, and clear the + * content of the dummy element. + * + * @param scopes A list of classes reprensenting the scope to build + * @param property The name of the style property to compute + * @param targetNode + * @param getFromCache Whether to cache the computed value or not + * @returns The computed property's value used in CanvasDrawer + */ retrieveStyleFromDom(scopes, property, targetNode, getFromCache = true) { + if (scopes.length === 0) return ""; + // no scopes + const key = scopes.join(" "); + let cachedData = this.domStylesCache.get(key); + if (cachedData !== undefined) { + if (getFromCache) { + // if should get the value from the cache + const value = cachedData[property]; + if (value !== undefined) // value exists + return value; + // value not in the cache - get fresh value + } // don't use cache - get fresh value + } else // key did not exist. create it + cachedData = {}; + this.ensureDummyNodeExistence(targetNode); + const dummyNode = this.dummyNode; + let parent = dummyNode; + for(let i = 0, len = scopes.length; i < len; i++){ + const scope = scopes[i]; + const node = document.createElement("span"); + node.className = scope.replace($8c1802050d82880d$var$dotRegexp, " "); // TODO why replace is needed? + parent.appendChild(node); + parent = node; + } + const style = window.getComputedStyle(parent); + let value = style.getPropertyValue(property); // rotate hue if webkit-filter available + const filter = style.getPropertyValue("-webkit-filter"); + if (filter.includes("hue-rotate")) value = $8c1802050d82880d$var$rotateHue(value, filter); + if (value !== "") { + cachedData[property] = value; + this.domStylesCache.set(key, cachedData); + } + dummyNode.innerHTML = ""; + return value; + } + /** + * Creates a DOM node container for all the operations that need to read styles properties from DOM. + * + * @param targetNode + */ ensureDummyNodeExistence(targetNode) { + if (this.targetNode !== targetNode || this.dummyNode === undefined) { + this.dummyNode = document.createElement("span"); + this.dummyNode.style.visibility = "hidden"; // attach to the target node + targetNode.appendChild(this.dummyNode); + this.targetNode = targetNode; + } + } + /** Invalidates the cache by emptying the cache object. used in MinimapElement */ invalidateDOMStylesCache() { + this.domStylesCache.clear(); + } +} // ## ## ######## ## ######## ######## ######## ###### +// ## ## ## ## ## ## ## ## ## ## ## +// ## ## ## ## ## ## ## ## ## ## +// ######### ###### ## ######## ###### ######## ###### +// ## ## ## ## ## ## ## ## ## +// ## ## ## ## ## ## ## ## ## ## +// ## ## ######## ######## ## ######## ## ## ###### +$8c1802050d82880d$exports.StyleReader = $8c1802050d82880d$var$StyleReader; +const $8c1802050d82880d$var$dotRegexp = /\.+/g; +const $8c1802050d82880d$var$rgbExtractRegexp = /rgb(a?)\((\d+), (\d+), (\d+)(, (\d+(\.\d+)?))?\)/; +const $8c1802050d82880d$var$hueRegexp = /hue-rotate\((-?\d+)deg\)/; +/** + * Computes the output color of `value` with a rotated hue defined in `filter`. + * + * @param value The CSS color to apply the rotation on + * @param filter The CSS hue rotate filter declaration + * @returns The rotated CSS color + */ function $8c1802050d82880d$var$rotateHue(value, filter) { + const match = value.match($8c1802050d82880d$var$rgbExtractRegexp); + if (match === null) return ""; + const [, , rStr, gStr, bStr, , aStr] = match; + const hueMatch = filter.match($8c1802050d82880d$var$hueRegexp); + if (hueMatch === null) return ""; + const [, hueStr] = hueMatch; + let [r, g, b, a, hue] = [ + rStr, + gStr, + bStr, + aStr, + hueStr + ].map(Number); + [r, g, b] = $8c1802050d82880d$var$rotate(r, g, b, hue); + if (isNaN(a)) return `rgb(${r}, ${g}, ${b})`; + else return `rgba(${r}, ${g}, ${b}, ${a})`; +} +/** + * Computes the hue rotation on the provided `r`, `g` and `b` channels by the amount of `angle`. + * + * @param r The red channel of the color to rotate + * @param g The green channel of the color to rotate + * @param b The blue channel of the color to rotate + * @param angle The angle to rotate the hue with + * @returns The rotated color channels + */ function $8c1802050d82880d$var$rotate(r, g, b, angle) { + const matrix = [ + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1 + ]; + const lumR = 0.2126; + const lumG = 0.7152; + const lumB = 0.0722; + const hueRotateR = 0.143; + const hueRotateG = 0.14; + const hueRotateB = 0.283; + const cos = Math.cos(angle * Math.PI / 180); + const sin = Math.sin(angle * Math.PI / 180); + matrix[0] = lumR + (1 - lumR) * cos - lumR * sin; + matrix[1] = lumG - lumG * cos - lumG * sin; + matrix[2] = lumB - lumB * cos + (1 - lumB) * sin; + matrix[3] = lumR - lumR * cos + hueRotateR * sin; + matrix[4] = lumG + (1 - lumG) * cos + hueRotateG * sin; + matrix[5] = lumB - lumB * cos - hueRotateB * sin; + matrix[6] = lumR - lumR * cos - (1 - lumR) * sin; + matrix[7] = lumG - lumG * cos + lumG * sin; + matrix[8] = lumB + (1 - lumB) * cos + lumB * sin; + return [ + $8c1802050d82880d$var$clamp(matrix[0] * r + matrix[1] * g + matrix[2] * b), + $8c1802050d82880d$var$clamp(matrix[3] * r + matrix[4] * g + matrix[5] * b), + $8c1802050d82880d$var$clamp(matrix[6] * r + matrix[7] * g + matrix[8] * b) + ]; +} +function $8c1802050d82880d$var$clamp(num) { + return Math.ceil(Math.max(0, Math.min(255, num))); +} + + + +var $bN1tE = parcelRequire("bN1tE"); +"use strict"; +/** + * The `Minimap` package provides an eagle-eye view of text buffers. + * + * It also provides API for plugin packages that want to interact with the minimap and be available to the user through + * the minimap settings. + */ /** + * The activation state of the package. + * + * @type {boolean} + * @access private + */ let $e6ccb2de5b0684dd$var$active = false; +/** + * The toggle state of the package. + * + * @type {boolean} + * @access private + */ let $e6ccb2de5b0684dd$var$toggled = false; +let $e6ccb2de5b0684dd$export$3542142cf713a624 = null; +/** + * The composite disposable that stores the package's subscriptions. + * + * @type {CompositeDisposable} + * @access private + */ let $e6ccb2de5b0684dd$var$subscriptions = null; +/** + * The disposable that stores the package's commands subscription. + * + * @type {Disposable} + * @access private + */ let $e6ccb2de5b0684dd$var$subscriptionsOfCommands = null; +const $e6ccb2de5b0684dd$export$bad24218ebd77223 = new (0, $cz7Pu$atom.Emitter)(); +let $e6ccb2de5b0684dd$export$4d3d19fa8673fd3e = null; +function $e6ccb2de5b0684dd$export$234c45b355edd85b() { + if ($e6ccb2de5b0684dd$var$active) return; + $e6ccb2de5b0684dd$var$subscriptionsOfCommands = atom.commands.add("atom-workspace", { + "minimap:toggle": ()=>{ + $e6ccb2de5b0684dd$export$e03c1c3201ee8bb7(); + }, + "minimap:generate-coffee-plugin": async ()=>{ + await $e6ccb2de5b0684dd$var$generatePlugin("coffee"); + }, + "minimap:generate-javascript-plugin": async ()=>{ + await $e6ccb2de5b0684dd$var$generatePlugin("javascript"); + }, + "minimap:generate-babel-plugin": async ()=>{ + await $e6ccb2de5b0684dd$var$generatePlugin("babel"); + } + }); + $e6ccb2de5b0684dd$export$3542142cf713a624 = new Map(); + $e6ccb2de5b0684dd$export$4d3d19fa8673fd3e = new (0, $8c1802050d82880d$exports.StyleReader)(); + $e6ccb2de5b0684dd$var$subscriptions = new (0, $cz7Pu$atom.CompositeDisposable)(); + $e6ccb2de5b0684dd$var$active = true; + if (atom.config.get("minimap.autoToggle")) $e6ccb2de5b0684dd$export$e03c1c3201ee8bb7(); +} +function $e6ccb2de5b0684dd$export$e854d79fe60e1faa(model) { + if (model instanceof (0, $e85ce81538013d49$export$2e2bcd8739ae039)) { + let element = model.getMinimapElement(); + if (!element) { + element = (0, $0965f8da08ee51eb$export$aa3fab546e9e7454)(); + element.setModel(model); + } + return element; + } +} +function $e6ccb2de5b0684dd$export$e96c1edfdaf2d1db() { + if (!$e6ccb2de5b0684dd$var$active) return; + $d6bb1451a6029905$export$4751c4964dd9fdd5(); + if ($e6ccb2de5b0684dd$export$3542142cf713a624) { + $e6ccb2de5b0684dd$export$3542142cf713a624.forEach((value)=>{ + value.destroy(); + }); + $e6ccb2de5b0684dd$export$3542142cf713a624.clear(); + } + $e6ccb2de5b0684dd$var$subscriptions.dispose(); + $e6ccb2de5b0684dd$var$subscriptionsOfCommands.dispose(); + $e6ccb2de5b0684dd$export$4d3d19fa8673fd3e.invalidateDOMStylesCache(); + $e6ccb2de5b0684dd$var$toggled = false; + $e6ccb2de5b0684dd$var$active = false; +} +function $e6ccb2de5b0684dd$export$9734216cda67175d() { + return $9d1240d3ca4fda1c$exports || atom.packages.getLoadedPackage("minimap").metadata.configSchema; +} +function $e6ccb2de5b0684dd$export$e03c1c3201ee8bb7() { + if (!$e6ccb2de5b0684dd$var$active) return; + if ($e6ccb2de5b0684dd$var$toggled) { + $e6ccb2de5b0684dd$var$toggled = false; + if ($e6ccb2de5b0684dd$export$3542142cf713a624) { + $e6ccb2de5b0684dd$export$3542142cf713a624.forEach((minimap)=>{ + minimap.destroy(); + }); + $e6ccb2de5b0684dd$export$3542142cf713a624.clear(); + } + $e6ccb2de5b0684dd$var$subscriptions.dispose(); + // HACK: this hack forces rerendering editor size which moves the scrollbar to the right once minimap is removed + const wasMaximized = atom.isMaximized(); + const { width: width, height: height } = atom.getSize(); + atom.setSize(width, height); + if (wasMaximized) atom.maximize(); + } else { + $e6ccb2de5b0684dd$var$toggled = true; + $e6ccb2de5b0684dd$var$initSubscriptions(); + } + $e6ccb2de5b0684dd$export$4d3d19fa8673fd3e.invalidateDOMStylesCache(); +} + +/** + * Opens the plugin generation view. + * + * @param {string} template The name of the template to use + */ async function $e6ccb2de5b0684dd$var$generatePlugin(template) { + const { createMinimapPluginGeneratorElement: createMinimapPluginGeneratorElement } = await (parcelRequire("gQk5Q")); + const view = createMinimapPluginGeneratorElement(); + view.template = template; + view.attach(); +} +function $e6ccb2de5b0684dd$export$b6f10fd94544e66c(callback) { + return $e6ccb2de5b0684dd$export$bad24218ebd77223.on("did-activate", callback); +} +function $e6ccb2de5b0684dd$export$d206d0a3ab46ce53(callback) { + return $e6ccb2de5b0684dd$export$bad24218ebd77223.on("did-deactivate", callback); +} +function $e6ccb2de5b0684dd$export$a720fe198b21c58c(callback) { + return $e6ccb2de5b0684dd$export$bad24218ebd77223.on("did-create-minimap", callback); +} +function $e6ccb2de5b0684dd$export$d40fb390be4bd0f(callback) { + return $e6ccb2de5b0684dd$export$bad24218ebd77223.on("did-add-plugin", callback); +} +function $e6ccb2de5b0684dd$export$9937b73c38ac51f0(callback) { + return $e6ccb2de5b0684dd$export$bad24218ebd77223.on("did-remove-plugin", callback); +} +function $e6ccb2de5b0684dd$export$6f3aaf72a3cac830(callback) { + return $e6ccb2de5b0684dd$export$bad24218ebd77223.on("did-activate-plugin", callback); +} +function $e6ccb2de5b0684dd$export$8df1420526313195(callback) { + return $e6ccb2de5b0684dd$export$bad24218ebd77223.on("did-deactivate-plugin", callback); +} +function $e6ccb2de5b0684dd$export$4f0668f248b15f12(callback) { + return $e6ccb2de5b0684dd$export$bad24218ebd77223.on("did-change-plugin-order", callback); +} +function $e6ccb2de5b0684dd$export$e3a0d8dffed34b4f() { + return 0, $e85ce81538013d49$export$2e2bcd8739ae039; +} +function $e6ccb2de5b0684dd$export$fbfbb3bd6dc38def(editorElement) { + if (!editorElement) return; + return $e6ccb2de5b0684dd$export$58c03b6c0d094c(editorElement.getModel()); +} +function $e6ccb2de5b0684dd$export$58c03b6c0d094c(textEditor) { + if (!textEditor) return; + if (!$e6ccb2de5b0684dd$export$3542142cf713a624) return; + let minimap = $e6ccb2de5b0684dd$export$3542142cf713a624.get(textEditor); + if (minimap === undefined || minimap.destroyed) { + minimap = new (0, $e85ce81538013d49$export$2e2bcd8739ae039)({ + textEditor: textEditor + }); + $e6ccb2de5b0684dd$export$3542142cf713a624.set(textEditor, minimap); + const editorSubscription = textEditor.onDidDestroy(()=>{ + if ($e6ccb2de5b0684dd$export$3542142cf713a624) $e6ccb2de5b0684dd$export$3542142cf713a624.delete(textEditor); + if (minimap) // just in case + minimap.destroy(); + editorSubscription.dispose(); + }); + // dispose the editorSubscription if minimap is deactivated before destroying the editor + $e6ccb2de5b0684dd$var$subscriptions.add(editorSubscription); + } + return minimap; +} +function $e6ccb2de5b0684dd$export$bd03fcaa67c354fa(textEditor) { + if (!textEditor) return; + return new (0, $e85ce81538013d49$export$2e2bcd8739ae039)({ + textEditor: textEditor, + standAlone: true + }); +} +function $e6ccb2de5b0684dd$export$6f8e50201d28743() { + return $e6ccb2de5b0684dd$export$58c03b6c0d094c(atom.workspace.getActiveTextEditor()); +} +function $e6ccb2de5b0684dd$export$b0030062932c3d3d(iterator) { + if (!iterator) return; + if ($e6ccb2de5b0684dd$export$3542142cf713a624) $e6ccb2de5b0684dd$export$3542142cf713a624.forEach((minimap)=>{ + iterator(minimap); + }); + return $e6ccb2de5b0684dd$export$a720fe198b21c58c((minimap)=>{ + iterator(minimap); + }); +} +/** + * Registers to the `observeTextEditors` method. + * + * @access private + */ function $e6ccb2de5b0684dd$var$initSubscriptions() { + const debounceUpdateStyles = (0, $bN1tE.debounce)($e6ccb2de5b0684dd$var$updateStyles, 300); + $e6ccb2de5b0684dd$var$subscriptions.add(atom.workspace.observeTextEditors((textEditor)=>{ + const minimap = $e6ccb2de5b0684dd$export$58c03b6c0d094c(textEditor); + const minimapElement = $e6ccb2de5b0684dd$export$e854d79fe60e1faa(minimap); + $e6ccb2de5b0684dd$export$bad24218ebd77223.emit("did-create-minimap", minimap); + minimapElement.attach(textEditor.getElement()); + }), // empty color cache if the theme changes + atom.themes.onDidChangeActiveThemes(debounceUpdateStyles), atom.styles.onDidUpdateStyleElement(debounceUpdateStyles), atom.styles.onDidAddStyleElement(debounceUpdateStyles), atom.styles.onDidRemoveStyleElement(debounceUpdateStyles), (0, $ca338416b6f9b052$export$fd712e6faf525b2f)()); +} +/** Force update styles of minimap */ function $e6ccb2de5b0684dd$var$updateStyles() { + $e6ccb2de5b0684dd$export$4d3d19fa8673fd3e.invalidateDOMStylesCache(); + $e6ccb2de5b0684dd$export$3542142cf713a624.forEach((minimap)=>{ + atom.views.getView(minimap).requestForcedUpdate(); + }); +} +// The public exports included in the service: +const $e6ccb2de5b0684dd$var$MinimapServiceV1 = { + minimapViewProvider: $e6ccb2de5b0684dd$export$e854d79fe60e1faa, + getConfigSchema: $e6ccb2de5b0684dd$export$9734216cda67175d, + onDidActivate: $e6ccb2de5b0684dd$export$b6f10fd94544e66c, + onDidDeactivate: $e6ccb2de5b0684dd$export$d206d0a3ab46ce53, + onDidCreateMinimap: $e6ccb2de5b0684dd$export$a720fe198b21c58c, + onDidAddPlugin: $e6ccb2de5b0684dd$export$d40fb390be4bd0f, + onDidRemovePlugin: $e6ccb2de5b0684dd$export$9937b73c38ac51f0, + onDidActivatePlugin: $e6ccb2de5b0684dd$export$6f3aaf72a3cac830, + onDidDeactivatePlugin: $e6ccb2de5b0684dd$export$8df1420526313195, + onDidChangePluginOrder: $e6ccb2de5b0684dd$export$4f0668f248b15f12, + minimapClass: $e6ccb2de5b0684dd$export$e3a0d8dffed34b4f, + minimapForEditorElement: $e6ccb2de5b0684dd$export$fbfbb3bd6dc38def, + minimapForEditor: $e6ccb2de5b0684dd$export$58c03b6c0d094c, + standAloneMinimapForEditor: $e6ccb2de5b0684dd$export$bd03fcaa67c354fa, + getActiveMinimap: $e6ccb2de5b0684dd$export$6f8e50201d28743, + observeMinimaps: $e6ccb2de5b0684dd$export$b0030062932c3d3d, + registerPlugin: $d6bb1451a6029905$export$7612db19fb8beb1e, + unregisterPlugin: $d6bb1451a6029905$export$48d00697bf0841b0, + togglePluginActivation: $d6bb1451a6029905$export$8cf5509a1f8ee810, + deactivateAllPlugins: $d6bb1451a6029905$export$4751c4964dd9fdd5, + activatePlugin: $d6bb1451a6029905$export$c20a82b9d4db0e25, + deactivatePlugin: $d6bb1451a6029905$export$eca032c13825f076, + getPluginsOrder: $d6bb1451a6029905$export$b9b9891832107981 +}; +function $e6ccb2de5b0684dd$export$b956a56dda08a331() { + return $e6ccb2de5b0684dd$var$MinimapServiceV1; +} +$parcel$exportWildcard(module.exports, $d6bb1451a6029905$exports); + + //# sourceMappingURL=main.js.map diff --git a/dist/main.js.map b/dist/main.js.map index 8d0b68aa..1ba1b94e 100644 --- a/dist/main.js.map +++ b/dist/main.js.map @@ -1 +1 @@ -{"mappings":"qJA2FSA,IACL,IAAIC,EAAK,GACLC,EAAc,EACdC,EAAc,EACdC,EAAc,SAsCdC,IApCSC,EAAOC,GACZA,IACAA,EAAKD,EACLA,EAAQ,GAGTA,EAAQH,EACPA,EAAWG,EACGF,EAARE,IACNF,EAAcE,GAGdL,EAAMK,KACNL,EAAMK,GAAK,IAGfL,EAAMK,GAAOE,KAAKD,GAClBL,KAoBAO,cAhBI,IAAIH,EAAQF,EAAsBD,GAATG,EAAmBA,QAC5C,IAAII,EAAMT,EAAMK,GAERK,EAAI,EAAOD,EAAIE,OAARD,EAAgBA,KAE3BJ,EADSG,EAAIC,OAarBT,cANOA,aCxHNW,EAASC,UACPA,EAAY,cCMdC,EAAaC,UACXC,MAAMC,QAAQF,SAAuBG,IAAfH,EAAIJ,gBAG5BQ,EAAQC,GACb,GAAKJ,MAA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AAO,GAAKJ,EAAII,EAAO,GAAKH,EAAIG,EAAO,GAAKhsC,GAClDmI,EAAM6jC,EAAO,GAAKJ,EAAII,EAAO,GAAKH,EAAIG,EAAO,GAAKhsC,KA1CvCqsC,CAAOT,EAAGC,EAAG7rC,EAAG8rC,GAEzBvG,MAAMxlC,GAAD,OACO6rC,MAAMC,MAAM7rC,aAEX4rC,MAAMC,MAAM7rC,MAAMD,MApFvBusC,CAAUxwC,EAAOg9B,IAGlB,KAALh9B,IACFkvC,EAAW1mC,GAAYxI,OAClB8uC,eAAejkC,IAAIkP,EAAKm1B,IAG/BH,EAAU/rB,UAAV,GACOhjB,EAQDmvC,yBAAyBH,GAC/Bv7B,KAASu7B,aAAeA,QAAiC1vC,IAArDmU,KAAuCs7B,iBACpCA,UAAYxnC,SAASC,cAAT,aACZunC,UAAUtmC,MAAMgoC,WAArB,SAGAzB,EAAWvjB,YAAXhY,KAA4Bs7B,gBACvBC,WAAaA,GAKtBrhC,gCACOmhC,eAAephC,UAuBxB,MAAM0hC,GAAS,sBCnGf,IAAI1iC,IAAS,EAOTkB,IAAU,EAOHd,GAAkB,KAOzBI,GAAgB,KAOhBP,GAA0B,KAQvB,MAAM1C,GAAU,IAAIF,GAAA6K,QAGpB,IAAIvP,GAAc,kCkCpEzB2O,EAAAC,QAAkBgI,QAAQG,QAAOs0B,QAAA,oEAA+Fv0B,MAAI,IAAOhL,GAAa,clCuZxJ,MAAM6B,GAAgB,qBACpB7F,kBACA3C,gBACA6G,kBACAG,qBACAC,iBACAC,oBACAC,sBACAC,wBACAC,yBACAC,eACAC,0BACAC,mBACA9C,6BACAoD,oBACAE,mBACAE,GACAi+B,eAAgB/mC,EAChBgnC,iBAAkBvlC,EAClBwlC,uBAAwB1lC,EACxB2lC,qBAAsBrlC,EACtBS,eAAgBH,EAChBJ,iBAAkBK,EAClB+kC,gBAAiB3kC","sources":["node_modules/batch-processor/src/batch-processor.js","node_modules/element-resize-detector/src/state-handler.js","node_modules/element-resize-detector/src/element-resize-detector.js","lib/mixins/canvas-drawer.js","lib/decorators/include.js","lib/minimap-element.js","lib/plugin-management.js","node_modules/atom-ide-base/src-commons-ui/dom-style-reader.ts","lib/main.js","lib/performance-monitor.js","node_modules/atom-utils-plus/lib/register-or-update-element.js","node_modules/grim/lib/grim.js","node_modules/grim/lib/deprecation.js","node_modules/event-kit/dist/event-kit.js","node_modules/event-kit/dist/emitter.js","node_modules/event-kit/dist/disposable.js","node_modules/event-kit/dist/composite-disposable.js","node_modules/atom-utils-plus/lib/mixins/ancestors.js","node_modules/mixto/lib/mixin.js","node_modules/atom-utils-plus/lib/mixins/disposable-events.js","node_modules/atom-utils-plus/lib/mixins/events-delegation.js","node_modules/atom-utils-plus/lib/mixins/space-pen-dsl.js","node_modules/atom-utils-plus/lib/atom-utils.js","node_modules/element-resize-detector/src/collection-utils.js","node_modules/element-resize-detector/src/element-utils.js","node_modules/element-resize-detector/src/listener-handler.js","node_modules/element-resize-detector/src/id-generator.js","node_modules/element-resize-detector/src/id-handler.js","node_modules/element-resize-detector/src/reporter.js","node_modules/element-resize-detector/src/browser-detector.js","node_modules/batch-processor/src/utils.js","node_modules/element-resize-detector/src/detection-strategy/object.js","node_modules/element-resize-detector/src/detection-strategy/scroll.js","lib/deps/underscore-plus.js","lib/decoration.js","lib/decoration-management.js","lib/canvas-layer.js","lib/decorators/element.js","lib/minimap-quick-settings-element.js","lib/adapters/stable-adapter.js","lib/minimap.js","lib/config.json","node_modules/@parcel/runtime-js/lib/runtime-7602d076b8c41601.js"],"sourcesContent":["\"use strict\";\n\nvar utils = require(\"./utils\");\n\nmodule.exports = function batchProcessorMaker(options) {\n options = options || {};\n var reporter = options.reporter;\n var asyncProcess = utils.getOption(options, \"async\", true);\n var autoProcess = utils.getOption(options, \"auto\", true);\n\n if(autoProcess && !asyncProcess) {\n reporter && reporter.warn(\"Invalid options combination. auto=true and async=false is invalid. Setting async=true.\");\n asyncProcess = true;\n }\n\n var batch = Batch();\n var asyncFrameHandler;\n var isProcessing = false;\n\n function addFunction(level, fn) {\n if(!isProcessing && autoProcess && asyncProcess && batch.size() === 0) {\n // Since this is async, it is guaranteed to be executed after that the fn is added to the batch.\n // This needs to be done before, since we're checking the size of the batch to be 0.\n processBatchAsync();\n }\n\n batch.add(level, fn);\n }\n\n function processBatch() {\n // Save the current batch, and create a new batch so that incoming functions are not added into the currently processing batch.\n // Continue processing until the top-level batch is empty (functions may be added to the new batch while processing, and so on).\n isProcessing = true;\n while (batch.size()) {\n var processingBatch = batch;\n batch = Batch();\n processingBatch.process();\n }\n isProcessing = false;\n }\n\n function forceProcessBatch(localAsyncProcess) {\n if (isProcessing) {\n return;\n }\n\n if(localAsyncProcess === undefined) {\n localAsyncProcess = asyncProcess;\n }\n\n if(asyncFrameHandler) {\n cancelFrame(asyncFrameHandler);\n asyncFrameHandler = null;\n }\n\n if(localAsyncProcess) {\n processBatchAsync();\n } else {\n processBatch();\n }\n }\n\n function processBatchAsync() {\n asyncFrameHandler = requestFrame(processBatch);\n }\n\n function clearBatch() {\n batch = {};\n batchSize = 0;\n topLevel = 0;\n bottomLevel = 0;\n }\n\n function cancelFrame(listener) {\n // var cancel = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.clearTimeout;\n var cancel = clearTimeout;\n return cancel(listener);\n }\n\n function requestFrame(callback) {\n // var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function(fn) { return window.setTimeout(fn, 20); };\n var raf = function(fn) { return setTimeout(fn, 0); };\n return raf(callback);\n }\n\n return {\n add: addFunction,\n force: forceProcessBatch\n };\n};\n\nfunction Batch() {\n var batch = {};\n var size = 0;\n var topLevel = 0;\n var bottomLevel = 0;\n\n function add(level, fn) {\n if(!fn) {\n fn = level;\n level = 0;\n }\n\n if(level > topLevel) {\n topLevel = level;\n } else if(level < bottomLevel) {\n bottomLevel = level;\n }\n\n if(!batch[level]) {\n batch[level] = [];\n }\n\n batch[level].push(fn);\n size++;\n }\n\n function process() {\n for(var level = bottomLevel; level <= topLevel; level++) {\n var fns = batch[level];\n\n for(var i = 0; i < fns.length; i++) {\n var fn = fns[i];\n fn();\n }\n }\n }\n\n function getSize() {\n return size;\n }\n\n return {\n add: add,\n process: process,\n size: getSize\n };\n}\n","\"use strict\";\n\nvar prop = \"_erd\";\n\nfunction initState(element) {\n element[prop] = {};\n return getState(element);\n}\n\nfunction getState(element) {\n return element[prop];\n}\n\nfunction cleanState(element) {\n delete element[prop];\n}\n\nmodule.exports = {\n initState: initState,\n getState: getState,\n cleanState: cleanState\n};\n","\"use strict\";\n\nvar forEach = require(\"./collection-utils\").forEach;\nvar elementUtilsMaker = require(\"./element-utils\");\nvar listenerHandlerMaker = require(\"./listener-handler\");\nvar idGeneratorMaker = require(\"./id-generator\");\nvar idHandlerMaker = require(\"./id-handler\");\nvar reporterMaker = require(\"./reporter\");\nvar browserDetector = require(\"./browser-detector\");\nvar batchProcessorMaker = require(\"batch-processor\");\nvar stateHandler = require(\"./state-handler\");\n\n//Detection strategies.\nvar objectStrategyMaker = require(\"./detection-strategy/object.js\");\nvar scrollStrategyMaker = require(\"./detection-strategy/scroll.js\");\n\nfunction isCollection(obj) {\n return Array.isArray(obj) || obj.length !== undefined;\n}\n\nfunction toArray(collection) {\n if (!Array.isArray(collection)) {\n var array = [];\n forEach(collection, function (obj) {\n array.push(obj);\n });\n return array;\n } else {\n return collection;\n }\n}\n\nfunction isElement(obj) {\n return obj && obj.nodeType === 1;\n}\n\n/**\n * @typedef idHandler\n * @type {object}\n * @property {function} get Gets the resize detector id of the element.\n * @property {function} set Generate and sets the resize detector id of the element.\n */\n\n/**\n * @typedef Options\n * @type {object}\n * @property {boolean} callOnAdd Determines if listeners should be called when they are getting added.\n Default is true. If true, the listener is guaranteed to be called when it has been added.\n If false, the listener will not be guarenteed to be called when it has been added (does not prevent it from being called).\n * @property {idHandler} idHandler A custom id handler that is responsible for generating, setting and retrieving id's for elements.\n If not provided, a default id handler will be used.\n * @property {reporter} reporter A custom reporter that handles reporting logs, warnings and errors.\n If not provided, a default id handler will be used.\n If set to false, then nothing will be reported.\n * @property {boolean} debug If set to true, the the system will report debug messages as default for the listenTo method.\n */\n\n/**\n * Creates an element resize detector instance.\n * @public\n * @param {Options?} options Optional global options object that will decide how this instance will work.\n */\nmodule.exports = function(options) {\n options = options || {};\n\n //idHandler is currently not an option to the listenTo function, so it should not be added to globalOptions.\n var idHandler;\n\n if (options.idHandler) {\n // To maintain compatability with idHandler.get(element, readonly), make sure to wrap the given idHandler\n // so that readonly flag always is true when it's used here. This may be removed next major version bump.\n idHandler = {\n get: function (element) { return options.idHandler.get(element, true); },\n set: options.idHandler.set\n };\n } else {\n var idGenerator = idGeneratorMaker();\n var defaultIdHandler = idHandlerMaker({\n idGenerator: idGenerator,\n stateHandler: stateHandler\n });\n idHandler = defaultIdHandler;\n }\n\n //reporter is currently not an option to the listenTo function, so it should not be added to globalOptions.\n var reporter = options.reporter;\n\n if(!reporter) {\n //If options.reporter is false, then the reporter should be quiet.\n var quiet = reporter === false;\n reporter = reporterMaker(quiet);\n }\n\n //batchProcessor is currently not an option to the listenTo function, so it should not be added to globalOptions.\n var batchProcessor = getOption(options, \"batchProcessor\", batchProcessorMaker({ reporter: reporter }));\n\n //Options to be used as default for the listenTo function.\n var globalOptions = {};\n globalOptions.callOnAdd = !!getOption(options, \"callOnAdd\", true);\n globalOptions.debug = !!getOption(options, \"debug\", false);\n\n var eventListenerHandler = listenerHandlerMaker(idHandler);\n var elementUtils = elementUtilsMaker({\n stateHandler: stateHandler\n });\n\n //The detection strategy to be used.\n var detectionStrategy;\n var desiredStrategy = getOption(options, \"strategy\", \"object\");\n var importantCssRules = getOption(options, \"important\", false);\n var strategyOptions = {\n reporter: reporter,\n batchProcessor: batchProcessor,\n stateHandler: stateHandler,\n idHandler: idHandler,\n important: importantCssRules\n };\n\n if(desiredStrategy === \"scroll\") {\n if (browserDetector.isLegacyOpera()) {\n reporter.warn(\"Scroll strategy is not supported on legacy Opera. Changing to object strategy.\");\n desiredStrategy = \"object\";\n } else if (browserDetector.isIE(9)) {\n reporter.warn(\"Scroll strategy is not supported on IE9. Changing to object strategy.\");\n desiredStrategy = \"object\";\n }\n }\n\n if(desiredStrategy === \"scroll\") {\n detectionStrategy = scrollStrategyMaker(strategyOptions);\n } else if(desiredStrategy === \"object\") {\n detectionStrategy = objectStrategyMaker(strategyOptions);\n } else {\n throw new Error(\"Invalid strategy name: \" + desiredStrategy);\n }\n\n //Calls can be made to listenTo with elements that are still being installed.\n //Also, same elements can occur in the elements list in the listenTo function.\n //With this map, the ready callbacks can be synchronized between the calls\n //so that the ready callback can always be called when an element is ready - even if\n //it wasn't installed from the function itself.\n var onReadyCallbacks = {};\n\n /**\n * Makes the given elements resize-detectable and starts listening to resize events on the elements. Calls the event callback for each event for each element.\n * @public\n * @param {Options?} options Optional options object. These options will override the global options. Some options may not be overriden, such as idHandler.\n * @param {element[]|element} elements The given array of elements to detect resize events of. Single element is also valid.\n * @param {function} listener The callback to be executed for each resize event for each element.\n */\n function listenTo(options, elements, listener) {\n function onResizeCallback(element) {\n var listeners = eventListenerHandler.get(element);\n forEach(listeners, function callListenerProxy(listener) {\n listener(element);\n });\n }\n\n function addListener(callOnAdd, element, listener) {\n eventListenerHandler.add(element, listener);\n\n if(callOnAdd) {\n listener(element);\n }\n }\n\n //Options object may be omitted.\n if(!listener) {\n listener = elements;\n elements = options;\n options = {};\n }\n\n if(!elements) {\n throw new Error(\"At least one element required.\");\n }\n\n if(!listener) {\n throw new Error(\"Listener required.\");\n }\n\n if (isElement(elements)) {\n // A single element has been passed in.\n elements = [elements];\n } else if (isCollection(elements)) {\n // Convert collection to array for plugins.\n // TODO: May want to check so that all the elements in the collection are valid elements.\n elements = toArray(elements);\n } else {\n return reporter.error(\"Invalid arguments. Must be a DOM element or a collection of DOM elements.\");\n }\n\n var elementsReady = 0;\n\n var callOnAdd = getOption(options, \"callOnAdd\", globalOptions.callOnAdd);\n var onReadyCallback = getOption(options, \"onReady\", function noop() {});\n var debug = getOption(options, \"debug\", globalOptions.debug);\n\n forEach(elements, function attachListenerToElement(element) {\n if (!stateHandler.getState(element)) {\n stateHandler.initState(element);\n idHandler.set(element);\n }\n\n var id = idHandler.get(element);\n\n debug && reporter.log(\"Attaching listener to element\", id, element);\n\n if(!elementUtils.isDetectable(element)) {\n debug && reporter.log(id, \"Not detectable.\");\n if(elementUtils.isBusy(element)) {\n debug && reporter.log(id, \"System busy making it detectable\");\n\n //The element is being prepared to be detectable. Do not make it detectable.\n //Just add the listener, because the element will soon be detectable.\n addListener(callOnAdd, element, listener);\n onReadyCallbacks[id] = onReadyCallbacks[id] || [];\n onReadyCallbacks[id].push(function onReady() {\n elementsReady++;\n\n if(elementsReady === elements.length) {\n onReadyCallback();\n }\n });\n return;\n }\n\n debug && reporter.log(id, \"Making detectable...\");\n //The element is not prepared to be detectable, so do prepare it and add a listener to it.\n elementUtils.markBusy(element, true);\n return detectionStrategy.makeDetectable({ debug: debug, important: importantCssRules }, element, function onElementDetectable(element) {\n debug && reporter.log(id, \"onElementDetectable\");\n\n if (stateHandler.getState(element)) {\n elementUtils.markAsDetectable(element);\n elementUtils.markBusy(element, false);\n detectionStrategy.addListener(element, onResizeCallback);\n addListener(callOnAdd, element, listener);\n\n // Since the element size might have changed since the call to \"listenTo\", we need to check for this change,\n // so that a resize event may be emitted.\n // Having the startSize object is optional (since it does not make sense in some cases such as unrendered elements), so check for its existance before.\n // Also, check the state existance before since the element may have been uninstalled in the installation process.\n var state = stateHandler.getState(element);\n if (state && state.startSize) {\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n if (state.startSize.width !== width || state.startSize.height !== height) {\n onResizeCallback(element);\n }\n }\n\n if(onReadyCallbacks[id]) {\n forEach(onReadyCallbacks[id], function(callback) {\n callback();\n });\n }\n } else {\n // The element has been unisntalled before being detectable.\n debug && reporter.log(id, \"Element uninstalled before being detectable.\");\n }\n\n delete onReadyCallbacks[id];\n\n elementsReady++;\n if(elementsReady === elements.length) {\n onReadyCallback();\n }\n });\n }\n\n debug && reporter.log(id, \"Already detecable, adding listener.\");\n\n //The element has been prepared to be detectable and is ready to be listened to.\n addListener(callOnAdd, element, listener);\n elementsReady++;\n });\n\n if(elementsReady === elements.length) {\n onReadyCallback();\n }\n }\n\n function uninstall(elements) {\n if(!elements) {\n return reporter.error(\"At least one element is required.\");\n }\n\n if (isElement(elements)) {\n // A single element has been passed in.\n elements = [elements];\n } else if (isCollection(elements)) {\n // Convert collection to array for plugins.\n // TODO: May want to check so that all the elements in the collection are valid elements.\n elements = toArray(elements);\n } else {\n return reporter.error(\"Invalid arguments. Must be a DOM element or a collection of DOM elements.\");\n }\n\n forEach(elements, function (element) {\n eventListenerHandler.removeAllListeners(element);\n detectionStrategy.uninstall(element);\n stateHandler.cleanState(element);\n });\n }\n\n function initDocument(targetDocument) {\n detectionStrategy.initDocument && detectionStrategy.initDocument(targetDocument);\n }\n\n return {\n listenTo: listenTo,\n removeListener: eventListenerHandler.removeListener,\n removeAllListeners: eventListenerHandler.removeAllListeners,\n uninstall: uninstall,\n initDocument: initDocument\n };\n};\n\nfunction getOption(options, name, defaultValue) {\n var value = options[name];\n\n if((value === undefined || value === null) && defaultValue !== undefined) {\n return defaultValue;\n }\n\n return value;\n}\n","\"use strict\"\n\nimport { escapeRegExp } from \"../deps/underscore-plus\"\nimport Mixin from \"mixto\"\n\nimport * as Main from \"../main\"\nimport { styleReader } from \"../main\"\nimport CanvasLayer from \"../canvas-layer\"\n\nconst SPEC_MODE = atom.inSpecMode()\n// an instance of MinimapElement used for testing and calling spies\nlet thisSpec\n\n/**\n * The `CanvasDrawer` mixin is responsible for the rendering of a `Minimap` in a `canvas` element.\n *\n * This mixin is injected in the `MinimapElement` prototype, so all these methods are available on any `MinimapElement` instance.\n */\nexport default class CanvasDrawer extends Mixin {\n /** Initializes the canvas elements needed to perform the `Minimap` rendering. */\n initializeCanvas() {\n if (SPEC_MODE) {\n // class methods only used for spying the calls\n this.drawLines = (firstLine, lastLine) => {\n console.log({ firstLine, lastLine })\n }\n this.drawLineDecoration = drawLineDecoration\n this.drawGutterDecoration = drawGutterDecoration\n this.drawHighlightDecoration = drawHighlightDecoration\n this.drawHighlightOutlineDecoration = drawHighlightOutlineDecoration\n this.drawCustomDecoration = drawCustomDecoration\n this.StyleReader = styleReader\n thisSpec = this\n }\n\n /**\n * The main canvas layer where lines are rendered.\n *\n * @type {CanvasLayer}\n */\n this.tokensLayer = new CanvasLayer()\n /**\n * The canvas layer for decorations below the text.\n *\n * @type {CanvasLayer}\n */\n this.backLayer = new CanvasLayer()\n /**\n * The canvas layer for decorations above the text.\n *\n * @type {CanvasLayer}\n */\n this.frontLayer = new CanvasLayer()\n\n if (!this.pendingChanges) {\n /**\n * Stores the changes from the text editor.\n *\n * @type {Object[]}\n * @access private\n */\n this.pendingChanges = []\n }\n\n if (!this.pendingBackDecorationChanges) {\n /**\n * Stores the changes from the minimap back decorations.\n *\n * @type {Object[]}\n * @access private\n */\n this.pendingBackDecorationChanges = []\n }\n\n if (!this.pendingFrontDecorationChanges) {\n /**\n * Stores the changes from the minimap front decorations.\n *\n * @type {Object[]}\n * @access private\n */\n this.pendingFrontDecorationChanges = []\n }\n\n // the maximum number of tokens to render in one line\n this.maxTokensInOneLine = atom.config.get(\"minimap.maxTokensInOneLine\")\n }\n\n /**\n * Returns the uppermost canvas in the MinimapElement.\n *\n * @returns {HTMLCanvasElement} The html canvas element\n */\n getFrontCanvas() {\n return this.frontLayer.canvas\n }\n\n /**\n * Attaches the canvases into the specified container.\n *\n * @param {HTMLElement} parent The canvases' container\n * @access private\n */\n attachCanvases(parent) {\n this.backLayer.attach(parent)\n this.tokensLayer.attach(parent)\n this.frontLayer.attach(parent)\n }\n\n /**\n * Changes the size of all the canvas layers at once.\n *\n * @param {number} width The new width for the three canvases\n * @param {number} height The new height for the three canvases\n * @access private\n */\n setCanvasesSize(width, height) {\n this.backLayer.setSize(width, height)\n this.tokensLayer.setSize(width, height)\n this.frontLayer.setSize(width, height)\n }\n\n /** Performs an update of the rendered `Minimap` based on the changes registered in the instance. */\n updateCanvas() {\n const firstRow = this.minimap.getFirstVisibleScreenRow()\n const lastRow = this.minimap.getLastVisibleScreenRow()\n\n const devicePixelRatio = this.minimap.getDevicePixelRatio()\n const lineHeight = this.minimap.getLineHeight() * devicePixelRatio\n const charHeight = this.minimap.getCharHeight() * devicePixelRatio\n const charWidth = this.minimap.getCharWidth() * devicePixelRatio\n const { width: canvasWidth, height: canvasHeight } = this.tokensLayer.getSize()\n const editor = this.minimap.getTextEditor()\n const editorElement = this.minimap.getTextEditorElement()\n\n // TODO avoid closure: https://stackoverflow.com/a/46256398/7910299\n const getTokenColorClosure = this.displayCodeHighlights\n ? (scopes) => getTokenColor(scopes, editorElement, this.textOpacity)\n : () => getDefaultColor(editorElement, this.textOpacity)\n\n updateTokensLayer(\n this.tokensLayer,\n firstRow,\n lastRow,\n this.offscreenFirstRow,\n this.offscreenLastRow,\n this.pendingChanges,\n lineHeight,\n charHeight,\n charWidth,\n canvasWidth,\n editor,\n editor.getScreenLineCount(),\n getInvisibleRegExp(editor),\n getTokenColorClosure,\n this.ignoreWhitespacesInTokens,\n this.maxTokensInOneLine\n )\n\n if (SPEC_MODE) {\n // call the spy for drawLines which is used inside updateTokensLayer\n this.drawLines(firstRow, lastRow)\n }\n\n const decorations = this.DecorationManagement.decorationsByTypeThenRows(firstRow, lastRow)\n\n const renderData = {\n context: this.backLayer.context,\n canvasWidth,\n canvasHeight,\n lineHeight,\n charWidth,\n charHeight,\n orders: Main.getPluginsOrder(),\n }\n\n const drawCustomDecorationLambda = (decoration, data, decorationColor) =>\n drawCustomDecoration(decoration, data, decorationColor, editorElement)\n backgroundDecorationDispatcher[\"background-custom\"] = drawCustomDecorationLambda\n frontDecorationDispatcher[\"foreground-custom\"] = drawCustomDecorationLambda\n\n updateBackDecorationsLayer(\n this.backLayer,\n firstRow,\n lastRow,\n this.offscreenFirstRow,\n this.offscreenLastRow,\n this.pendingBackDecorationChanges,\n renderData,\n lineHeight,\n editorElement,\n decorations\n )\n\n renderData.context = this.frontLayer.context\n\n updateFrontDecorationsLayer(\n this.frontLayer,\n firstRow,\n lastRow,\n this.offscreenFirstRow,\n this.offscreenLastRow,\n this.pendingFrontDecorationChanges,\n renderData,\n lineHeight,\n editorElement,\n decorations\n )\n\n this.pendingChanges = []\n this.pendingBackDecorationChanges = []\n this.pendingFrontDecorationChanges = []\n\n /**\n * The first row in the last render of the offscreen canvas.\n *\n * @type {number}\n * @access private\n */\n this.offscreenFirstRow = firstRow\n /**\n * The last row in the last render of the offscreen canvas.\n *\n * @type {number}\n * @access private\n */\n this.offscreenLastRow = lastRow\n }\n\n // ######## ######## ### ## ##\n // ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## ## ##\n // ## ## ######## ## ## ## ## ##\n // ## ## ## ## ######### ## ## ##\n // ## ## ## ## ## ## ## ## ##\n // ######## ## ## ## ## ### ###\n\n /**\n * Routine used to render changes in specific ranges for one layer.\n *\n * @param {CanvasLayer} layer The layer to redraw\n * @param {Object[]} intactRanges An array of the ranges to leave intact\n * @param {number} firstRow FirstRow the first row of the range to update\n * @param {number} lastRow LastRow the last row of the range to update\n * @param {Function} method The render method to use for the lines drawing\n * @access private Unused (inlined the code for performance reasons)\n */\n // redrawRangesOnLayer (layer, intactRanges, firstRow, lastRow, method) {\n // const devicePixelRatio = this.minimap.getDevicePixelRatio()\n // const lineHeight = this.minimap.getLineHeight() * devicePixelRatio\n //\n // layer.clearCanvas()\n //\n // if (intactRanges.length === 0) {\n // method.call(this, firstRow, lastRow, 0)\n // } else {\n // for (let j = 0, len = intactRanges.length; j < len; j++) {\n // const intact = intactRanges[j]\n //\n // layer.copyPartFromOffscreen(\n // intact.offscreenRow * lineHeight,\n // (intact.start - firstRow) * lineHeight,\n // (intact.end - intact.start) * lineHeight\n // )\n // }\n // drawLinesForRanges(method, intactRanges, firstRow, lastRow)\n // }\n //\n // layer.resetOffscreenSize()\n // layer.copyToOffscreen()\n // }\n\n /**\n * Renders the lines between the intact ranges when an update has pending changes.\n *\n * @param {Function} method The render method to use for the lines drawing\n * @param {Object[]} intactRanges The intact ranges in the minimap\n * @param {number} firstRow The first row of the rendered region\n * @param {number} lastRow The last row of the rendered region\n * @access private Unused (inlined the code for performance reasons)\n */\n // drawLinesForRanges (method, ranges, firstRow, lastRow) {\n // let currentRow = firstRow\n // for (let i = 0, len = ranges.length; i < len; i++) {\n // const range = ranges[i]\n //\n // method.call(this, currentRow, range.start, currentRow - firstRow)\n //\n // currentRow = range.end\n // }\n // if (currentRow <= lastRow) {\n // method.call(this, currentRow, lastRow, currentRow - firstRow)\n // }\n // }\n}\n\n// ######## ######## ### ## ##\n// ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ##\n// ## ## ######## ## ## ## ## ##\n// ## ## ## ## ######### ## ## ##\n// ## ## ## ## ## ## ## ## ##\n// ######## ## ## ## ## ### ###\n\n/**\n * Performs an update of the tokens layer using the pending changes array.\n *\n * @param {CanvasLayer} tokensLayer\n * @param {number} firstRow FirstRow the first row of the range to update\n * @param {number} lastRow LastRow the last row of the range to update\n * @param {number} offscreenFirstRow\n * @param {number} offscreenLastRow\n * @param {Array<>} pendingChanges\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {number} charHeight This.minimap.getCharHeight() * devicePixelRatio\n * @param {number} charWidth This.minimap.getCharWidth() * devicePixelRatio\n * @param {number} canvasWidth This.tokensLayer.getSize().width\n * @param {TextEditor} editor This.minimap.getTextEditor()\n * @param {(t: Token) => string} getTokenColorClosure\n * @param {boolean} ignoreWhitespacesInTokens This.ignoreWhitespacesInTokens\n * @param {number} maxTokensInOneLine This.maxTokensInOneLine\n * @access private\n */\nfunction updateTokensLayer(\n tokensLayer,\n firstRow,\n lastRow,\n offscreenFirstRow,\n offscreenLastRow,\n pendingChanges,\n lineHeight,\n charHeight,\n charWidth,\n canvasWidth,\n editor,\n editorScreenLineCount,\n invisibleRegExp,\n getTokenColorClosure,\n ignoreWhitespacesInTokens,\n maxTokensInOneLine\n) {\n // NOTE: this method is the hot function of Minimap. Do not refactor. The code is inlined delibarately.\n\n const intactRanges = computeIntactRanges(firstRow, lastRow, pendingChanges, offscreenFirstRow, offscreenLastRow)\n\n // redrawRangesOnLayer\n const context = tokensLayer.context\n\n tokensLayer.clearCanvas()\n\n if (intactRanges.length === 0) {\n drawLines(\n firstRow,\n lastRow,\n 0,\n lineHeight,\n charHeight,\n charWidth,\n canvasWidth,\n context,\n editor,\n editorScreenLineCount,\n invisibleRegExp,\n getTokenColorClosure,\n ignoreWhitespacesInTokens,\n maxTokensInOneLine\n )\n } else {\n for (let j = 0, len = intactRanges.length; j < len; j++) {\n const intact = intactRanges[j]\n\n tokensLayer.copyPartFromOffscreen(\n intact.offscreenRow * lineHeight,\n (intact.start - firstRow) * lineHeight,\n (intact.end - intact.start) * lineHeight\n )\n }\n // drawLinesForRanges\n let currentRow = firstRow\n for (let i = 0, len = intactRanges.length; i < len; i++) {\n const range = intactRanges[i]\n\n drawLines(\n currentRow,\n range.start,\n currentRow - firstRow,\n lineHeight,\n charHeight,\n charWidth,\n canvasWidth,\n context,\n editor,\n editorScreenLineCount,\n invisibleRegExp,\n getTokenColorClosure,\n ignoreWhitespacesInTokens,\n maxTokensInOneLine\n )\n\n currentRow = range.end\n }\n if (currentRow <= lastRow) {\n drawLines(\n currentRow,\n lastRow,\n currentRow - firstRow,\n lineHeight,\n charHeight,\n charWidth,\n canvasWidth,\n context,\n editor,\n editorScreenLineCount,\n invisibleRegExp,\n getTokenColorClosure,\n ignoreWhitespacesInTokens,\n maxTokensInOneLine\n )\n }\n }\n\n tokensLayer.resetOffscreenSize()\n tokensLayer.copyToOffscreen()\n}\n\n/**\n * Performs an update of the back decorations layer using the pending back decorations changes arrays.\n *\n * @param {CanvasLayer} backLayer\n * @param {number} firstRow FirstRow the first row of the range to update\n * @param {number} lastRow LastRow the last row of the range to update\n * @param {number} offscreenFirstRow\n * @param {number} offscreenLastRow\n * @param {Array<>} pendingBackDecorationChanges\n * @param {Object} renderData\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {TextEditorElement} editorElement This.minimap.getTextEditorElement()\n * @param {Decoration[]} decorations\n * @access private\n */\nfunction updateBackDecorationsLayer(\n backLayer,\n firstRow,\n lastRow,\n offscreenFirstRow,\n offscreenLastRow,\n pendingBackDecorationChanges,\n renderData,\n lineHeight,\n editorElement,\n decorations\n) {\n const intactRanges = computeIntactRanges(\n firstRow,\n lastRow,\n pendingBackDecorationChanges,\n offscreenFirstRow,\n offscreenLastRow\n )\n\n // NOTE: this method is the hot function of Minimap. Do not refactor. The code is inlined delibarately.\n\n // redrawRangesOnLayer\n\n backLayer.clearCanvas()\n\n if (intactRanges.length === 0) {\n drawBackDecorationsForLines(firstRow, lastRow, 0, renderData, lineHeight, editorElement, decorations)\n } else {\n for (let j = 0, len = intactRanges.length; j < len; j++) {\n const intact = intactRanges[j]\n\n backLayer.copyPartFromOffscreen(\n intact.offscreenRow * lineHeight,\n (intact.start - firstRow) * lineHeight,\n (intact.end - intact.start) * lineHeight\n )\n }\n // drawLinesForRanges\n let currentRow = firstRow\n for (let i = 0, len = intactRanges.length; i < len; i++) {\n const range = intactRanges[i]\n\n drawBackDecorationsForLines(\n currentRow,\n range.start,\n currentRow - firstRow,\n renderData,\n lineHeight,\n editorElement,\n decorations\n )\n\n currentRow = range.end\n }\n if (currentRow <= lastRow) {\n drawBackDecorationsForLines(\n currentRow,\n lastRow,\n currentRow - firstRow,\n renderData,\n lineHeight,\n editorElement,\n decorations\n )\n }\n }\n\n backLayer.resetOffscreenSize()\n backLayer.copyToOffscreen()\n}\n\n/**\n * Performs an update of the front decorations layer using the pending front decorations changes arrays.\n *\n * @param {CanvasLayer} frontLayer\n * @param {number} firstRow FirstRow the first row of the range to update\n * @param {number} lastRow LastRow the last row of the range to update\n * @param {number} offscreenFirstRow\n * @param {number} offscreenLastRow\n * @param {Array<>} pendingFrontDecorationChanges\n * @param {Object} renderData\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {TextEditorElement} editorElement This.minimap.getTextEditorElement()\n * @param {Decoration[]} decorations\n * @access private\n */\nfunction updateFrontDecorationsLayer(\n frontLayer,\n firstRow,\n lastRow,\n offscreenFirstRow,\n offscreenLastRow,\n pendingFrontDecorationChanges,\n renderData,\n lineHeight,\n editorElement,\n decorations\n) {\n const intactRanges = computeIntactRanges(\n firstRow,\n lastRow,\n pendingFrontDecorationChanges,\n offscreenFirstRow,\n offscreenLastRow\n )\n\n // NOTE: this method is the hot function of Minimap. Do not refactor. The code is inlined delibarately.\n\n // redrawRangesOnLayer\n\n frontLayer.clearCanvas()\n\n if (intactRanges.length === 0) {\n drawFrontDecorationsForLines(firstRow, lastRow, 0, renderData, lineHeight, editorElement, decorations)\n } else {\n for (let j = 0, len = intactRanges.length; j < len; j++) {\n const intact = intactRanges[j]\n\n frontLayer.copyPartFromOffscreen(\n intact.offscreenRow * lineHeight,\n (intact.start - firstRow) * lineHeight,\n (intact.end - intact.start) * lineHeight\n )\n }\n // drawLinesForRanges\n let currentRow = firstRow\n for (let i = 0, len = intactRanges.length; i < len; i++) {\n const range = intactRanges[i]\n\n drawFrontDecorationsForLines(\n currentRow,\n range.start,\n currentRow - firstRow,\n renderData,\n lineHeight,\n editorElement,\n decorations\n )\n\n currentRow = range.end\n }\n if (currentRow <= lastRow) {\n drawFrontDecorationsForLines(\n currentRow,\n lastRow,\n currentRow - firstRow,\n renderData,\n lineHeight,\n editorElement,\n decorations\n )\n }\n }\n\n frontLayer.resetOffscreenSize()\n frontLayer.copyToOffscreen()\n}\n\nconst whitespaceTokenRegex = /^\\s+$/\nconst oneOrMoreWhiteSpaceRegexp = /\\s+/\n\n/**\n * Draws a single token on the given context.\n *\n * @param {CanvasRenderingContext2D} context The target canvas context\n * @param {string} text The token's text content\n * @param {string} color The token's CSS color\n * @param {number} x The x position of the token in the line\n * @param {number} y The y position of the line in the minimap\n * @param {number} charWidth The width of a character in the minimap\n * @param {number} charHeight The height of a character in the minimap\n * @returns {number} The x position at the end of the token\n * @access private\n */\nfunction drawToken(context, text, color, x, y, charWidth, charHeight, ignoreWhitespacesInTokens) {\n context.fillStyle = color\n\n if (ignoreWhitespacesInTokens) {\n const length = text.length * charWidth\n context.fillRect(x, y, length, charHeight)\n\n return x + length\n } else {\n let chars = 0\n for (let j = 0, len = text.length; j < len; j++) {\n const char = text[j]\n if (char === \" \") {\n if (chars > 0) {\n context.fillRect(x - chars * charWidth, y, chars * charWidth, charHeight)\n }\n chars = 0\n } else {\n chars++\n }\n x += charWidth\n }\n if (chars > 0) {\n context.fillRect(x - chars * charWidth, y, chars * charWidth, charHeight)\n }\n return x\n }\n}\n\n/**\n * Draws lines on the corresponding layer.\n *\n * The lines range to draw is specified by the `firstRow` and `lastRow` parameters.\n *\n * @param {number} firstRow The first row to render\n * @param {number} lastRow The last row to render\n * @param {number} offsetRow The relative offset to apply to rows when rendering them\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {number} charHeight This.minimap.getCharHeight() * devicePixelRatio\n * @param {number} charWidth This.minimap.getCharWidth() * devicePixelRatio\n * @param {number} canvasWidth This.tokensLayer.getSize().width\n * @param {CanvasRenderingContext2D} context This.tokensLayer.context\n * @param {TextEditor} editor This.minimap.getTextEditor()\n * @param {number} editorScreenLineCount\n * @param {RegExp} invisibleRegExp\n * @param {(t: Token) => string} getTokenColorClosure\n * @param {boolean} ignoreWhitespacesInTokens This.ignoreWhitespacesInTokens\n * @param {number} maxTokensInOneLine This.maxTokensInOneLine\n * @access private\n */\nfunction drawLines(\n firstRow,\n lastRow,\n offsetRow,\n lineHeight,\n charHeight,\n charWidth,\n canvasWidth,\n context,\n editor,\n editorScreenLineCount,\n invisibleRegExp,\n getTokenColorClosure,\n ignoreWhitespacesInTokens,\n maxTokensInOneLine\n) {\n // NOTE: this method is the hot function of Minimap. Do not refactor. The code is inlined delibarately.\n\n if (firstRow > lastRow) {\n return\n }\n\n let lastLine, x\n let y = offsetRow * lineHeight - lineHeight\n\n // eachTokenForScreenRows\n lastRow = Math.min(lastRow, editorScreenLineCount)\n\n for (let line = firstRow; line < lastRow; line++) {\n const editorTokensForScreenRow = editor.tokensForScreenRow(line)\n const numToken = editorTokensForScreenRow.length\n const numTokenToRender = Math.min(numToken, maxTokensInOneLine)\n for (let iToken = 0; iToken < numTokenToRender; iToken++) {\n const token = editorTokensForScreenRow[iToken]\n const tokenText = token.text.replace(invisibleRegExp, \" \")\n const tokenScopes = token.scopes\n\n if (lastLine !== line) {\n x = 0\n y += lineHeight\n lastLine = line\n context.clearRect(x, y, canvasWidth, lineHeight)\n }\n if (x > canvasWidth) {\n continue\n }\n\n if (whitespaceTokenRegex.test(tokenText)) {\n x += tokenText.length * charWidth\n } else {\n x = drawToken(\n context,\n tokenText,\n getTokenColorClosure(tokenScopes),\n x,\n y,\n charWidth,\n charHeight,\n ignoreWhitespacesInTokens\n )\n }\n }\n }\n\n context.fill()\n}\n\n/**\n * Returns the regexp to replace invisibles substitution characters in editor lines.\n *\n * @param {TextEditor} editor\n * @returns {RegExp} The regular expression to match invisible characters\n * @access private\n */\nfunction getInvisibleRegExp(editor) {\n const invisibles = editor.getInvisibles()\n const regexp = []\n if (invisibles.cr != null) {\n regexp.push(invisibles.cr)\n }\n if (invisibles.eol != null) {\n regexp.push(invisibles.eol)\n }\n if (invisibles.space != null) {\n regexp.push(invisibles.space)\n }\n if (invisibles.tab != null) {\n regexp.push(invisibles.tab)\n }\n\n if (regexp.length !== 0) {\n return RegExp(\n regexp\n .filter((s) => {\n return typeof s === \"string\"\n })\n .map(escapeRegExp)\n .join(\"|\"),\n \"g\"\n )\n } else {\n return null\n }\n}\n\n/**\n * Dispatchers for decoration drawing (custom decoration drawer added dynamically)\n *\n * @param {Object} backgroundDecorationDispatcher An object with the type to render as key and the render method as value\n */\nconst backgroundDecorationDispatcher = {\n line: drawLineDecoration,\n \"highlight-under\": drawHighlightDecoration,\n}\n\n/**\n * Dispatchers for decoration drawing (custom decoration drawer added dynamically)\n *\n * @param {Object} frontDecorationDispatcher An object with the type to render as key and the render method as value\n */\nconst frontDecorationDispatcher = {\n gutter: drawGutterDecoration,\n \"highlight-over\": drawHighlightDecoration,\n \"highlight-outline\": drawHighlightOutlineDecoration,\n}\n\n/**\n * Draws a line decoration.\n *\n * @param {Decoration} decoration The decoration to render\n * @param {Object} data The data need to perform the render\n * @param {string} decorationColor Decoration color\n * @access private\n */\nfunction drawLineDecoration(decoration, data, decorationColor) {\n const { context, lineHeight, canvasWidth, yRow } = data\n\n context.fillStyle = decorationColor\n context.fillRect(0, yRow, canvasWidth, lineHeight)\n}\n\n/**\n * Draws a gutter decoration.\n *\n * @param {Decoration} decoration The decoration to render\n * @param {Object} data The data need to perform the render\n * @param {string} decorationColor Decoration color\n * @access private\n */\nfunction drawGutterDecoration(decoration, data, decorationColor) {\n const { context, lineHeight, yRow } = data\n\n context.fillStyle = decorationColor\n context.fillRect(0, yRow, 1, lineHeight)\n}\n\n/**\n * Draws a highlight decoration.\n *\n * It renders only the part of the highlight corresponding to the specified row.\n *\n * @param {Decoration} decoration The decoration to render\n * @param {Object} data The data need to perform the render\n * @param {string} decorationColor Decoration color\n * @access private\n */\nfunction drawHighlightDecoration(decoration, data, decorationColor) {\n const { context, lineHeight, charWidth, canvasWidth, screenRow, yRow } = data\n\n const range = decoration.getMarker().getScreenRange()\n const rowSpan = range.end.row - range.start.row\n\n context.fillStyle = decorationColor\n\n if (rowSpan === 0) {\n const colSpan = range.end.column - range.start.column\n context.fillRect(range.start.column * charWidth, yRow, colSpan * charWidth, lineHeight)\n } else if (screenRow === range.start.row) {\n const x = range.start.column * charWidth\n context.fillRect(x, yRow, canvasWidth - x, lineHeight)\n } else if (screenRow === range.end.row) {\n context.fillRect(0, yRow, range.end.column * charWidth, lineHeight)\n } else {\n context.fillRect(0, yRow, canvasWidth, lineHeight)\n }\n}\n\n/**\n * Draws a highlight outline decoration.\n *\n * It renders only the part of the highlight corresponding to the specified row.\n *\n * @param {Decoration} decoration The decoration to render\n * @param {Object} data The data need to perform the render\n * @param {string} decorationColor Decoration color\n * @access private\n */\nfunction drawHighlightOutlineDecoration(decoration, data, decorationColor) {\n const { context, lineHeight, charWidth, canvasWidth, screenRow, yRow } = data\n\n let bottomWidth, colSpan, width, xBottomStart, xEnd, xStart\n const range = decoration.getMarker().getScreenRange()\n const rowSpan = range.end.row - range.start.row\n const yStart = yRow\n const yEnd = yStart + lineHeight\n\n context.fillStyle = decorationColor\n\n if (rowSpan === 0) {\n colSpan = range.end.column - range.start.column\n width = colSpan * charWidth\n xStart = range.start.column * charWidth\n xEnd = xStart + width\n\n context.fillRect(xStart, yStart, width, 1)\n context.fillRect(xStart, yEnd - 1, width, 1)\n context.fillRect(xStart, yStart, 1, lineHeight)\n context.fillRect(xEnd, yStart, 1, lineHeight)\n } else if (rowSpan === 1) {\n xStart = range.start.column * charWidth\n xEnd = range.end.column * charWidth\n\n if (screenRow === range.start.row) {\n width = canvasWidth - xStart\n xBottomStart = Math.max(xStart, xEnd)\n bottomWidth = canvasWidth - xBottomStart\n\n context.fillRect(xStart, yStart, width, 1)\n context.fillRect(xBottomStart, yEnd - 1, bottomWidth, 1)\n context.fillRect(xStart, yStart, 1, lineHeight)\n context.fillRect(canvasWidth - 1, yStart, 1, lineHeight)\n } else {\n width = canvasWidth - xStart\n bottomWidth = canvasWidth - xEnd\n\n context.fillRect(0, yStart, xStart, 1)\n context.fillRect(0, yEnd - 1, xEnd, 1)\n context.fillRect(0, yStart, 1, lineHeight)\n context.fillRect(xEnd, yStart, 1, lineHeight)\n }\n } else {\n xStart = range.start.column * charWidth\n xEnd = range.end.column * charWidth\n if (screenRow === range.start.row) {\n width = canvasWidth - xStart\n\n context.fillRect(xStart, yStart, width, 1)\n context.fillRect(xStart, yStart, 1, lineHeight)\n context.fillRect(canvasWidth - 1, yStart, 1, lineHeight)\n } else if (screenRow === range.end.row) {\n width = canvasWidth - xStart\n\n context.fillRect(0, yEnd - 1, xEnd, 1)\n context.fillRect(0, yStart, 1, lineHeight)\n context.fillRect(xEnd, yStart, 1, lineHeight)\n } else {\n context.fillRect(0, yStart, 1, lineHeight)\n context.fillRect(canvasWidth - 1, yStart, 1, lineHeight)\n if (screenRow === range.start.row + 1) {\n context.fillRect(0, yStart, xStart, 1)\n }\n if (screenRow === range.end.row - 1) {\n context.fillRect(xEnd, yEnd - 1, canvasWidth - xEnd, 1)\n }\n }\n }\n}\n\n/**\n * Draws a custom decoration.\n *\n * It renders only the part of the highlight corresponding to the specified row.\n *\n * @param {Decoration} decoration The decoration to render\n * @param {Object} data The data need to perform the render\n * @param {string} decorationColor Decoration color\n * @param {TextEditorElement} editorElement\n * @access private\n */\nfunction drawCustomDecoration(decoration, data, decorationColor, editorElement) {\n const renderRoutine = decoration.getProperties().render\n\n if (renderRoutine) {\n data.color = decorationColor\n renderRoutine(decoration, data, editorElement)\n }\n}\n\n/**\n * Draws the specified decorations for the current `screenRow`.\n *\n * The `decorations` object contains all the decorations grouped by type and then rows.\n *\n * @param {number} screenRow The screen row index for which render decorations\n * @param {Object} decorations The object containing all the decorations\n * @param {Object} renderData The object containing the render data\n * @param {Object} types An object with the type to render as key and the render method as value\n * @param {TextEditorElement} editorElement\n * @access private\n */\nfunction drawDecorations(screenRow, decorations, renderData, types, editorElement) {\n let decorationsToRender = []\n\n renderData.context.clearRect(0, renderData.yRow, renderData.canvasWidth, renderData.lineHeight)\n\n for (const i in types) {\n decorationsToRender = decorationsToRender.concat(decorations[i] != null ? decorations[i][screenRow] || [] : [])\n }\n\n decorationsToRender.sort(\n (a, b) => (renderData.orders[a.properties.plugin] || 0) - (renderData.orders[b.properties.plugin] || 0)\n )\n\n if (decorationsToRender != null ? decorationsToRender.length : undefined) {\n for (let i = 0, len = decorationsToRender.length; i < len; i++) {\n const decoration = decorationsToRender[i]\n const decorationDrawer = types[decoration.properties.type]\n if (!SPEC_MODE) {\n decorationDrawer(decoration, renderData, /* decorationColor */ getDecorationColor(decoration, editorElement))\n } else {\n // get the real function name from the mangeld Parcel names\n const functionName = decorationDrawer.name.split(\"$\").pop().replace(\"Lambda\", \"\")\n // call the spy:\n thisSpec[functionName](\n decoration,\n renderData,\n /* decorationColor */ getDecorationColor(decoration, editorElement)\n )\n }\n }\n }\n}\n\n/**\n * Draws front decorations on the corresponding layer.\n *\n * The lines range to draw is specified by the `firstRow` and `lastRow` parameters.\n *\n * @param {number} firstRow The first row to render\n * @param {number} lastRow The last row to render\n * @param {number} offsetRow The relative offset to apply to rows when rendering them\n * @param {Object} renderData\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {TextEditorElement} editorElement This.minimap.getTextEditorElement()\n * @param {Decoration[]} decorations\n * @access private\n */\nfunction drawFrontDecorationsForLines(\n firstRow,\n lastRow,\n offsetRow,\n renderData,\n lineHeight,\n editorElement,\n decorations\n) {\n if (firstRow > lastRow) {\n return\n }\n\n for (let screenRow = firstRow; screenRow <= lastRow; screenRow++) {\n renderData.row = offsetRow + (screenRow - firstRow)\n renderData.yRow = renderData.row * lineHeight\n renderData.screenRow = screenRow\n\n drawDecorations(screenRow, decorations, renderData, frontDecorationDispatcher, editorElement)\n }\n\n renderData.context.fill()\n}\n\n/**\n * Draws back decorations on the corresponding layer.\n *\n * The lines range to draw is specified by the `firstRow` and `lastRow` parameters.\n *\n * @param {number} firstRow The first row to render\n * @param {number} lastRow The last row to render\n * @param {number} offsetRow The relative offset to apply to rows when rendering them\n * @param {Object} renderData\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {TextEditorElement} editorElement This.minimap.getTextEditorElement()\n * @param {Decoration[]} decorations\n * @access private\n */\nfunction drawBackDecorationsForLines(firstRow, lastRow, offsetRow, renderData, lineHeight, editorElement, decorations) {\n if (firstRow > lastRow) {\n return\n }\n\n for (let screenRow = firstRow; screenRow <= lastRow; screenRow++) {\n renderData.row = offsetRow + (screenRow - firstRow)\n renderData.yRow = renderData.row * lineHeight\n renderData.screenRow = screenRow\n\n drawDecorations(screenRow, decorations, renderData, backgroundDecorationDispatcher, editorElement)\n }\n\n renderData.context.fill()\n}\n\n// ###### ####### ## ####### ######## ######\n// ## ## ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ######## ######\n// ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ## ## ##\n// ###### ####### ######## ####### ## ## ######\n\n/**\n * Returns the opacity value to use when rendering the `Minimap` text.\n *\n * @returns {Number} The text opacity value Unused (inlined)\n */\n// getTextOpacity () { return this.textOpacity }\n\n/**\n * Returns the default text color for an editor content.\n *\n * The color value is directly read from the `TextEditorView` computed styles.\n *\n * @param {TextEditorElement} editorElement\n * @param {number} textOpacity\n * @returns {string} A CSS color\n */\nfunction getDefaultColor(editorElement, textOpacity) {\n const color = styleReader.retrieveStyleFromDom([\".editor\"], \"color\", editorElement, true)\n return transparentize(color, textOpacity)\n}\n\n/**\n * Returns the text color for the passed-in scopes\n *\n * The color value is read from the DOM by creating a node structure that match the token `scope` property.\n *\n * @param {string[]} scopes An array of scopes for a `TextEditor` token (token.scopeDescriptor || token.scopes)\n * @param {TextEditorElement} editorElement\n * @param {number} textOpacity\n * @returns {string} The CSS color for the provided token\n */\nfunction getTokenColor(scopes, editorElement, textOpacity) {\n const color = styleReader.retrieveStyleFromDom(scopes, \"color\", editorElement, true)\n\n return transparentize(color, textOpacity)\n}\n\n/**\n * Converts a `rgb(...)` color into a `rgba(...)` color with the specified opacity.\n *\n * @param {string} color The CSS RGB color to transparentize\n * @param {number} opacity The opacity amount\n * @returns {string} The transparentized CSS color\n * @access private\n */\nfunction transparentize(color, opacity) {\n // assumes that color is in form of `rgb(content)` with no spaces around the given value\n return `rgba(${color.slice(4, -1)}, ${opacity})`\n}\n\n/**\n * Returns the background color for the passed-in `decoration` object.\n *\n * The color value is read from the DOM by creating a node structure that match the decoration `scope` property unless\n * the decoration provides its own `color` property.\n *\n * @param {Decoration} decoration The decoration to get the color for\n * @param {TextEditorElement} editorElement\n * @returns {string} The CSS color for the provided decoration\n */\nfunction getDecorationColor(decoration, editorElement) {\n const properties = decoration.getProperties()\n if (properties.color) {\n return properties.color\n }\n\n if (properties.scope) {\n const scopeString = properties.scope.split(oneOrMoreWhiteSpaceRegexp)\n return styleReader.retrieveStyleFromDom(scopeString, \"background-color\", editorElement, true)\n } else {\n return getDefaultColor(editorElement)\n }\n}\n\n// ######## ### ## ## ###### ######## ######\n// ## ## ## ## ### ## ## ## ## ## ##\n// ## ## ## ## #### ## ## ## ##\n// ######## ## ## ## ## ## ## #### ###### ######\n// ## ## ######### ## #### ## ## ## ##\n// ## ## ## ## ## ### ## ## ## ## ##\n// ## ## ## ## ## ## ###### ######## ######\n\n/**\n * Computes the ranges that are not affected by the current pending changes.\n *\n * @param {number} firstRow The first row of the rendered region\n * @param {number} lastRow The last row of the rendered region\n * @param {number | null} offscreenFirstRow CanvasDrawer.offscreenLastRow\n * @param {number | null} offscreenLastRow CanvasDrawer.offscreenLastRow\n * @returns {Object[]} The intact ranges in the rendered region\n * @access private\n */\nfunction computeIntactRanges(firstRow, lastRow, changes, offscreenFirstRow, offscreenLastRow) {\n // TODO when do they get null?\n if (offscreenFirstRow == null && offscreenLastRow == null) {\n return []\n }\n\n // At first, the whole range is considered intact\n let intactRanges = [\n {\n start: offscreenFirstRow,\n end: offscreenLastRow,\n offscreenRow: 0,\n },\n ]\n\n for (let i = 0, len = changes.length; i < len; i++) {\n const change = changes[i]\n const newIntactRanges = []\n\n for (let j = 0, intactLen = intactRanges.length; j < intactLen; j++) {\n const range = intactRanges[j]\n\n if (change.end < range.start && change.screenDelta !== 0) {\n // The change is above of the range and lines are either\n // added or removed\n newIntactRanges.push({\n start: range.start + change.screenDelta,\n end: range.end + change.screenDelta,\n offscreenRow: range.offscreenRow,\n })\n } else if (change.end < range.start || change.start > range.end) {\n // The change is outside the range but didn't add\n // or remove lines\n newIntactRanges.push(range)\n } else {\n // The change is within the range, there's one intact range\n // from the range start to the change start\n if (change.start > range.start) {\n newIntactRanges.push({\n start: range.start,\n end: change.start - 1,\n offscreenRow: range.offscreenRow,\n })\n }\n if (change.end < range.end) {\n // The change ends within the range\n if (change.bufferDelta !== 0) {\n // Lines are added or removed, the intact range starts in the\n // next line after the change end plus the screen delta\n newIntactRanges.push({\n start: change.end + change.screenDelta + 1,\n end: range.end + change.screenDelta,\n offscreenRow: range.offscreenRow + change.end + 1 - range.start,\n })\n } else if (change.screenDelta !== 0) {\n // Lines are added or removed in the display buffer, the intact\n // range starts in the next line after the change end plus the\n // screen delta\n newIntactRanges.push({\n start: change.end + change.screenDelta + 1,\n end: range.end + change.screenDelta,\n offscreenRow: range.offscreenRow + change.end + 1 - range.start,\n })\n } else {\n // No lines are added, the intact range starts on the line after\n // the change end\n newIntactRanges.push({\n start: change.end + 1,\n end: range.end,\n offscreenRow: range.offscreenRow + change.end + 1 - range.start,\n })\n }\n }\n }\n }\n intactRanges = newIntactRanges\n }\n\n return truncateIntactRanges(intactRanges, firstRow, lastRow)\n}\n\n/**\n * Truncates the intact ranges so that they doesn't expand past the visible area of the minimap.\n *\n * @param {Object[]} intactRanges The initial array of ranges\n * @param {number} firstRow The first row of the rendered region\n * @param {number} lastRow The last row of the rendered region\n * @returns {Object[]} The array of truncated ranges\n * @access private\n */\nfunction truncateIntactRanges(intactRanges, firstRow, lastRow) {\n let i = 0\n while (i < intactRanges.length) {\n const range = intactRanges[i]\n\n if (range.start < firstRow) {\n range.offscreenRow += firstRow - range.start\n range.start = firstRow\n }\n\n if (range.end > lastRow) {\n range.end = lastRow\n }\n\n if (range.start >= range.end) {\n intactRanges.splice(i--, 1)\n }\n\n i++\n }\n\n return intactRanges.sort((a, b) => {\n return a.offscreenRow - b.offscreenRow\n })\n}\n","\"use strict\"\n\n/**\n * Generates a decorator function to includes many `mixto` mixins into a class.\n *\n * @param {...Mixin} mixins The mixins to include in the class\n * @returns {function(cls:Function):Function} The decorator function that will include the specified mixins\n * @include(SomeMixin) export default class SomeClass {\n * // ...\n * }\n */\nexport default function include(cls, ...mixins) {\n mixins.forEach((mixin) => {\n includeMixin(cls, mixin)\n })\n}\n\nfunction includeMixin(target, source) {\n Object.getOwnPropertyNames(source).forEach((k) => {\n if ([\"length\", \"name\", \"arguments\", \"caller\", \"prototype\", \"includeInto\"].indexOf(k) >= 0) {\n return\n }\n\n const descriptor = Object.getOwnPropertyDescriptor(source, k)\n Object.defineProperty(target, k, descriptor)\n })\n\n Object.getOwnPropertyNames(source.prototype).forEach((k) => {\n if (k === \"constructor\") {\n return\n }\n\n const descriptor = Object.getOwnPropertyDescriptor(source.prototype, k)\n Object.defineProperty(target.prototype, k, descriptor)\n })\n}\n","\"use strict\"\n\nimport { CompositeDisposable, Disposable } from \"atom\"\nimport { EventsDelegation, AncestorsMethods } from \"atom-utils-plus\"\nimport elementResizeDetectorImport from \"element-resize-detector\"\nimport DecorationManagement from \"./decoration-management\"\n\nimport * as Main from \"./main\"\nimport CanvasDrawer from \"./mixins/canvas-drawer\"\nimport include from \"./decorators/include\"\nimport element from \"./decorators/element\"\n\nimport { createMinimapQuickSettingsElement } from \"./minimap-quick-settings-element\"\nconst elementResizeDetector = elementResizeDetectorImport({ strategy: \"scroll\" })\n\nconst SPEC_MODE = atom.inSpecMode()\nconst TAG_NAME = \"atom-text-editor-minimap\"\n\n/**\n * Public: The MinimapElement is the view meant to render a {@link Minimap} instance in the DOM.\n *\n * You can retrieve the MinimapElement associated to a Minimap using the `atom.views.getView` method.\n *\n * Note that most interactions with the Minimap package is done through the Minimap model so you should never have to\n * access MinimapElement instances.\n *\n * @example Let minimapElement = atom.views.getView(minimap)\n */\nclass MinimapElement extends HTMLElement {\n static initClass() {\n include(this, CanvasDrawer, EventsDelegation, AncestorsMethods)\n element(this, TAG_NAME)\n }\n\n // ## ## ####### ####### ## ## ######\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## ## ##\n // ######### ## ## ## ## ##### ######\n // ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ####### ####### ## ## ######\n\n /**\n * DOM callback invoked when a new MinimapElement is created.\n *\n * @access private\n */\n createdCallback() {\n // Core properties\n\n /** @access private */\n this.minimap = undefined\n\n /** @access private */\n this.width = undefined\n /** @access private */\n this.height = undefined\n\n // Subscriptions\n\n /** @access private */\n this.subscriptions = new CompositeDisposable()\n /** @access private */\n this.visibleAreaSubscription = undefined\n /** @access private */\n this.quickSettingsSubscription = undefined\n /** @access private */\n this.dragSubscription = undefined\n /** @access private */\n this.openQuickSettingSubscription = undefined\n\n // Configs\n\n /** @access private */\n this.minimapScrollIndicator = undefined\n /** @access private */\n this.displayMinimapOnLeft = undefined\n /** @access private */\n this.displayPluginsControls = undefined\n /** @access private */\n this.textOpacity = undefined\n /** @access private */\n this.displayCodeHighlights = undefined\n /** @access private */\n this.adjustToSoftWrap = undefined\n /** @access private */\n this.useHardwareAcceleration = undefined\n /** @access private */\n this.absoluteMode = undefined\n\n // Elements\n\n /** @access private */\n this.visibleArea = undefined\n /** @access private */\n this.controls = undefined\n /** @access private */\n this.scrollIndicator = undefined\n /** @access private */\n this.openQuickSettings = undefined\n /** @access private */\n this.quickSettingsElement = undefined\n\n this.DecorationManagement = new DecorationManagement()\n\n // States\n\n /** @access private */\n this.attached = undefined\n /** @access private */\n this.attachedToTextEditor = undefined\n /** @access private */\n this.standAlone = undefined\n /** @access private */\n this.wasVisible = undefined\n\n // Other\n\n /** @access private */\n this.offscreenFirstRow = undefined\n /** @access private */\n this.offscreenLastRow = undefined\n /** @access private */\n this.frameRequested = undefined\n /** @access private */\n this.flexBasis = undefined\n\n this.initializeContent()\n\n this.subscriptions.add(\n atom.config.observe(\"minimap.displayMinimapOnLeft\", (displayMinimapOnLeft) => {\n this.displayMinimapOnLeft = displayMinimapOnLeft\n\n this.updateMinimapFlexPosition()\n this.measureHeightAndWidth(true, true)\n }),\n\n atom.config.observe(\"minimap.minimapScrollIndicator\", (minimapScrollIndicator) => {\n this.minimapScrollIndicator = minimapScrollIndicator\n\n if (this.minimapScrollIndicator && !(this.scrollIndicator != null) && !this.standAlone) {\n this.initializeScrollIndicator()\n } else if (this.scrollIndicator != null) {\n this.disposeScrollIndicator()\n }\n\n if (this.attached) {\n this.requestUpdate()\n }\n }),\n\n atom.config.observe(\"minimap.displayPluginsControls\", (displayPluginsControls) => {\n this.displayPluginsControls = displayPluginsControls\n\n if (this.displayPluginsControls && !(this.openQuickSettings != null) && !this.standAlone) {\n this.initializeOpenQuickSettings()\n } else if (this.openQuickSettings != null) {\n this.disposeOpenQuickSettings()\n }\n }),\n\n atom.config.observe(\"minimap.textOpacity\", (textOpacity) => {\n this.textOpacity = textOpacity\n\n if (this.attached) {\n this.requestForcedUpdate()\n }\n }),\n\n atom.config.observe(\"minimap.displayCodeHighlights\", (displayCodeHighlights) => {\n this.displayCodeHighlights = displayCodeHighlights\n\n if (this.attached) {\n this.requestForcedUpdate()\n }\n }),\n\n atom.config.observe(\"minimap.smoothScrolling\", (smoothScrolling) => {\n this.smoothScrolling = smoothScrolling\n\n if (this.attached) {\n if (!this.smoothScrolling) {\n this.backLayer.canvas.style.cssText = \"\"\n this.tokensLayer.canvas.style.cssText = \"\"\n this.frontLayer.canvas.style.cssText = \"\"\n } else {\n this.requestUpdate()\n }\n }\n }),\n\n atom.config.observe(\"minimap.adjustMinimapWidthToSoftWrap\", (adjustToSoftWrap) => {\n this.adjustToSoftWrap = adjustToSoftWrap\n\n if (this.attached) {\n this.measureHeightAndWidth()\n }\n }),\n\n atom.config.observe(\"minimap.adjustMinimapWidthOnlyIfSmaller\", (adjustOnlyIfSmaller) => {\n this.adjustOnlyIfSmaller = adjustOnlyIfSmaller\n\n if (this.attached) {\n this.measureHeightAndWidth()\n }\n }),\n\n atom.config.observe(\"minimap.useHardwareAcceleration\", (useHardwareAcceleration) => {\n this.useHardwareAcceleration = useHardwareAcceleration\n\n if (this.attached) {\n this.requestUpdate()\n }\n }),\n\n atom.config.observe(\"minimap.absoluteMode\", (absoluteMode) => {\n this.absoluteMode = absoluteMode\n\n this.classList.toggle(\"absolute\", this.absoluteMode)\n }),\n\n atom.config.observe(\"minimap.adjustAbsoluteModeHeight\", (adjustAbsoluteModeHeight) => {\n this.adjustAbsoluteModeHeight = adjustAbsoluteModeHeight\n\n this.classList.toggle(\"adjust-absolute-height\", this.adjustAbsoluteModeHeight)\n\n if (this.attached) {\n this.measureHeightAndWidth()\n }\n }),\n\n atom.config.observe(\"minimap.ignoreWhitespacesInTokens\", (ignoreWhitespacesInTokens) => {\n this.ignoreWhitespacesInTokens = ignoreWhitespacesInTokens\n\n if (this.attached) {\n this.requestForcedUpdate()\n }\n }),\n\n atom.config.observe(\"editor.preferredLineLength\", () => {\n if (this.attached) {\n this.measureHeightAndWidth()\n }\n }),\n\n atom.config.observe(\"editor.softWrap\", () => {\n if (this.attached) {\n this.requestUpdate()\n }\n }),\n\n atom.config.observe(\"editor.showInvisibles\", () => {\n if (this.attached) {\n this.requestUpdate()\n }\n }),\n\n atom.config.observe(\"editor.invisibles\", () => {\n if (this.attached) {\n this.requestUpdate()\n }\n }),\n\n atom.config.observe(\"editor.softWrapAtPreferredLineLength\", () => {\n if (this.attached) {\n this.requestUpdate()\n }\n })\n )\n }\n\n /**\n * DOM callback invoked when a new MinimapElement is attached to the DOM.\n *\n * @access private\n */\n connectedCallback() {\n if (typeof atom.views.pollDocument === \"function\") {\n this.subscriptions.add(\n atom.views.pollDocument(() => {\n this.pollDOM()\n })\n )\n } else {\n this.intersectionObserver = new IntersectionObserver((entries) => {\n const { intersectionRect } = entries[entries.length - 1]\n if (intersectionRect.width > 0 || intersectionRect.height > 0) {\n this.measureHeightAndWidth(true, true)\n }\n })\n\n this.intersectionObserver.observe(this)\n if (this.isVisible()) {\n this.measureHeightAndWidth(true, true)\n }\n\n const measureDimensions = () => {\n this.measureHeightAndWidth(false, false)\n }\n elementResizeDetector.listenTo(this, measureDimensions)\n window.addEventListener(\"resize\", measureDimensions, { passive: true })\n\n this.subscriptions.add(\n new Disposable(() => {\n elementResizeDetector.removeListener(this, measureDimensions)\n }),\n new Disposable(() => {\n window.removeEventListener(\"resize\", measureDimensions)\n })\n )\n }\n\n this.measureHeightAndWidth()\n this.updateMinimapFlexPosition()\n this.attached = true\n this.attachedToTextEditor = this.queryParentSelector(\"atom-text-editor\") === this.minimap.getTextEditorElement()\n\n if (this.attachedToTextEditor) {\n this.minimap.getTextEditorElement().setAttribute(\"with-minimap\", this.displayMinimapOnLeft ? \"left\" : \"right\")\n }\n\n this.subscriptions.add(this.subscribeToMediaQuery())\n }\n\n /**\n * DOM callback invoked when a new MinimapElement is detached from the DOM.\n *\n * @access private\n */\n disconnectedCallback() {\n this.minimap.getTextEditorElement().removeAttribute(\"with-minimap\")\n this.attached = false\n }\n\n // ### ######## ######## ### ###### ## ##\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## #########\n // ######### ## ## ######### ## ## ##\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ###### ## ##\n\n /**\n * Returns whether the MinimapElement is currently visible on screen or not.\n *\n * The visibility of the minimap is defined by testing the size of the offset width and height of the element.\n *\n * @returns {boolean} Whether the MinimapElement is currently visible or not\n */\n isVisible() {\n return this.offsetWidth > 0 || this.offsetHeight > 0\n }\n\n /**\n * Attaches the MinimapElement to the DOM.\n *\n * The position at which the element is attached is defined by the `displayMinimapOnLeft` setting.\n *\n * @param {HTMLElement} [parent] The DOM node where attaching the minimap element\n */\n attach(parent) {\n if (this.attached) {\n return\n }\n\n const container = parent || this.minimap.getTextEditorElement()\n const minimaps = container.querySelectorAll(TAG_NAME)\n if (minimaps.length) {\n Array.prototype.forEach.call(minimaps, (el) => {\n el.destroy()\n try {\n container.removeChild(el)\n } catch (e) {\n // TODO: ignore for now\n // https://github.com/atom-minimap/minimap/issues/766#issuecomment-762496374\n }\n })\n }\n container.appendChild(this)\n }\n\n /** Detaches the MinimapElement from the DOM. */\n detach() {\n if (!this.attached || this.parentNode == null) {\n return\n }\n this.parentNode.removeChild(this)\n }\n\n /**\n * Toggles the minimap left/right position based on the value of the `displayMinimapOnLeft` setting.\n *\n * @access private\n */\n updateMinimapFlexPosition() {\n this.classList.toggle(\"left\", this.displayMinimapOnLeft)\n if (this.attachedToTextEditor) {\n this.minimap.getTextEditorElement().setAttribute(\"with-minimap\", this.displayMinimapOnLeft ? \"left\" : \"right\")\n }\n }\n\n /** Destroys this MinimapElement */\n destroy() {\n this.DecorationManagement.destroy()\n if (this.quickSettingsElement) {\n this.quickSettingsElement.destroy()\n }\n this.subscriptions.dispose()\n this.detach()\n }\n\n // ###### ####### ## ## ######## ######## ## ## ########\n // ## ## ## ## ### ## ## ## ### ## ##\n // ## ## ## #### ## ## ## #### ## ##\n // ## ## ## ## ## ## ## ###### ## ## ## ##\n // ## ## ## ## #### ## ## ## #### ##\n // ## ## ## ## ## ### ## ## ## ### ##\n // ###### ####### ## ## ## ######## ## ## ##\n\n /**\n * Creates the content of the MinimapElement and attaches the mouse control event listeners.\n *\n * @access private\n */\n initializeContent() {\n this.initializeCanvas()\n\n this.attachCanvases(this)\n\n this.createVisibleArea()\n this.createControls()\n\n this.subscriptions.add(\n this.subscribeTo(\n this,\n {\n mousewheel: (e) => {\n if (!this.standAlone && this.minimap.onMouseWheel) {\n this.minimap.onMouseWheel(e)\n }\n },\n },\n { passive: true }\n ),\n\n this.subscribeTo(\n this.getFrontCanvas(),\n {\n mousedown: (e) => {\n this.canvasPressed(extractMouseEventData(e))\n },\n touchstart: (e) => {\n this.canvasPressed(extractTouchEventData(e))\n },\n },\n { passive: true }\n )\n )\n }\n\n /**\n * Initializes the visible area div.\n *\n * @access private\n */\n createVisibleArea() {\n if (this.visibleArea) {\n return\n }\n\n this.visibleArea = document.createElement(\"div\")\n this.visibleArea.classList.add(\"minimap-visible-area\")\n this.appendChild(this.visibleArea)\n this.visibleAreaSubscription = this.subscribeTo(\n this.visibleArea,\n {\n mousedown: (e) => {\n this.startDrag(extractMouseEventData(e))\n },\n touchstart: (e) => {\n this.startDrag(extractTouchEventData(e))\n },\n },\n { passive: true }\n )\n\n this.subscriptions.add(this.visibleAreaSubscription)\n }\n\n /**\n * Removes the visible area div.\n *\n * @access private\n */\n removeVisibleArea() {\n if (!this.visibleArea) {\n return\n }\n\n this.subscriptions.remove(this.visibleAreaSubscription)\n this.visibleAreaSubscription.dispose()\n this.removeChild(this.visibleArea)\n delete this.visibleArea\n }\n\n /**\n * Creates the controls container div.\n *\n * @access private\n */\n createControls() {\n if (this.controls || this.standAlone) {\n return\n }\n\n this.controls = document.createElement(\"div\")\n this.controls.classList.add(\"minimap-controls\")\n this.appendChild(this.controls)\n }\n\n /**\n * Removes the controls container div.\n *\n * @access private\n */\n removeControls() {\n if (!this.controls) {\n return\n }\n\n this.removeChild(this.controls)\n delete this.controls\n }\n\n /**\n * Initializes the scroll indicator div when the `minimapScrollIndicator` settings is enabled.\n *\n * @access private\n */\n initializeScrollIndicator() {\n if (this.scrollIndicator || this.standAlone) {\n return\n }\n\n this.scrollIndicator = document.createElement(\"div\")\n this.scrollIndicator.classList.add(\"minimap-scroll-indicator\")\n this.controls.appendChild(this.scrollIndicator)\n }\n\n /**\n * Disposes the scroll indicator div when the `minimapScrollIndicator` settings is disabled.\n *\n * @access private\n */\n disposeScrollIndicator() {\n if (!this.scrollIndicator) {\n return\n }\n\n this.controls.removeChild(this.scrollIndicator)\n delete this.scrollIndicator\n }\n\n /**\n * Initializes the quick settings openener div when the `displayPluginsControls` setting is enabled.\n *\n * @access private\n */\n initializeOpenQuickSettings() {\n if (this.openQuickSettings || this.standAlone) {\n return\n }\n\n this.openQuickSettings = document.createElement(\"div\")\n this.openQuickSettings.classList.add(\"open-minimap-quick-settings\")\n this.controls.appendChild(this.openQuickSettings)\n\n this.openQuickSettingSubscription = this.subscribeTo(this.openQuickSettings, {\n mousedown: (e) => {\n e.preventDefault()\n e.stopPropagation()\n\n if (this.quickSettingsElement != null) {\n this.quickSettingsElement.destroy()\n this.quickSettingsSubscription.dispose()\n } else {\n this.quickSettingsElement = createMinimapQuickSettingsElement()\n this.quickSettingsElement.setModel(this)\n this.quickSettingsSubscription = this.quickSettingsElement.onDidDestroy(() => {\n this.quickSettingsElement = null\n })\n\n const { top, left, right } = this.getFrontCanvas().getBoundingClientRect()\n this.quickSettingsElement.style.top = `${top}px`\n this.quickSettingsElement.attach()\n\n if (this.displayMinimapOnLeft) {\n this.quickSettingsElement.style.left = `${right}px`\n } else {\n this.quickSettingsElement.style.left = `${left - this.quickSettingsElement.clientWidth}px`\n }\n }\n },\n })\n }\n\n /**\n * Disposes the quick settings openener div when the `displayPluginsControls` setting is disabled.\n *\n * @access private\n */\n disposeOpenQuickSettings() {\n if (!this.openQuickSettings) {\n return\n }\n\n this.controls.removeChild(this.openQuickSettings)\n this.openQuickSettingSubscription.dispose()\n delete this.openQuickSettings\n }\n\n /**\n * Get the DecorationManagement API for minimapElement\n *\n * @returns {DecorationManagement}\n */\n getDecorationManagement() {\n return this.DecorationManagement\n }\n\n // ## ## ####### ######## ######## ##\n // ### ### ## ## ## ## ## ##\n // #### #### ## ## ## ## ## ##\n // ## ### ## ## ## ## ## ###### ##\n // ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## ##\n // ## ## ####### ######## ######## ########\n\n /**\n * Returns the Minimap for which this MinimapElement was created.\n *\n * @returns {Minimap} This element's Minimap\n */\n getModel() {\n return this.minimap\n }\n\n /**\n * Defines the Minimap model for this MinimapElement instance.\n *\n * @param {Minimap} minimap The Minimap model for this instance.\n * @returns {Minimap} This element's Minimap\n */\n setModel(minimap) {\n this.minimap = minimap\n\n // set minimapElement for Minimap\n this.minimap.minimapElement = this\n\n this.DecorationManagement.initializeDecorations(this.minimap)\n\n this.subscriptions.add(\n this.minimap.onDidChangeScrollTop(() => {\n this.requestUpdate()\n }),\n\n this.minimap.onDidChangeScrollLeft(() => {\n this.requestUpdate()\n }),\n\n this.minimap.onDidDestroy(() => {\n this.destroy()\n }),\n\n this.minimap.onDidChangeConfig(() => {\n if (this.attached) {\n return this.requestForcedUpdate()\n }\n }),\n\n this.minimap.onDidChangeStandAlone(() => {\n this.setStandAlone(this.minimap.isStandAlone())\n this.requestUpdate()\n }),\n\n this.minimap.onDidChange((change) => {\n this.pendingChanges.push(change)\n this.requestUpdate()\n }),\n\n this.DecorationManagement.onDidChangeDecorationRange((change) => {\n const { type } = change\n if (type === \"line\" || type === \"highlight-under\" || type === \"background-custom\") {\n this.pendingBackDecorationChanges.push(change)\n } else {\n this.pendingFrontDecorationChanges.push(change)\n }\n this.requestUpdate()\n }),\n\n Main.onDidChangePluginOrder(() => {\n this.requestForcedUpdate()\n })\n )\n\n this.setStandAlone(this.minimap.isStandAlone())\n\n if (this.width != null && this.height != null) {\n this.minimap.setScreenHeightAndWidth(this.height, this.width)\n }\n\n return this.minimap\n }\n\n /**\n * Sets the stand-alone mode for this MinimapElement.\n *\n * @param {boolean} standAlone The new mode for this MinimapElement\n */\n setStandAlone(standAlone) {\n this.standAlone = standAlone\n\n if (this.standAlone) {\n this.setAttribute(\"stand-alone\", true)\n this.disposeScrollIndicator()\n this.disposeOpenQuickSettings()\n this.removeControls()\n this.removeVisibleArea()\n } else {\n this.removeAttribute(\"stand-alone\")\n this.createVisibleArea()\n this.createControls()\n if (this.minimapScrollIndicator) {\n this.initializeScrollIndicator()\n }\n if (this.displayPluginsControls) {\n this.initializeOpenQuickSettings()\n }\n }\n }\n\n // ## ## ######## ######## ### ######## ########\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ######## ## ## ## ## ## ######\n // ## ## ## ## ## ######### ## ##\n // ## ## ## ## ## ## ## ## ##\n // ####### ## ######## ## ## ## ########\n\n /** Requests an update to be performed on the next frame. */\n requestUpdate() {\n if (this.frameRequested) {\n return\n }\n\n this.frameRequested = true\n requestAnimationFrame(() => {\n this.update()\n this.frameRequested = false\n })\n }\n\n /** Requests an update to be performed on the next frame that will completely redraw the minimap. */\n requestForcedUpdate() {\n this.offscreenFirstRow = null\n this.offscreenLastRow = null\n this.requestUpdate()\n }\n\n /**\n * Performs the actual MinimapElement update.\n *\n * @access private\n */\n update() {\n if (!(this.attached && this.isVisible() && this.minimap)) {\n return\n }\n const minimap = this.minimap\n minimap.enableCache()\n const canvas = this.getFrontCanvas()\n\n const devicePixelRatio = this.minimap.getDevicePixelRatio()\n const visibleAreaLeft = minimap.getTextEditorScaledScrollLeft()\n const visibleAreaTop = minimap.getTextEditorScaledScrollTop() - minimap.getScrollTop()\n const width = Math.min(canvas.width / devicePixelRatio, this.width)\n const visibleWidth = width + visibleAreaLeft\n\n if (this.adjustToSoftWrap && this.flexBasis) {\n this.style.flexBasis = `${this.flexBasis}px`\n this.style.width = `${this.flexBasis}px`\n } else {\n this.style.flexBasis = null\n this.style.width = null\n }\n\n if (SPEC_MODE) {\n applyStyles(this.visibleArea, {\n width: `${Math.round(visibleWidth)}px`,\n height: `${Math.round(minimap.getTextEditorScaledHeight())}px`,\n top: `${Math.round(visibleAreaTop)}px`,\n \"border-left-width\": `${Math.round(visibleAreaLeft)}px`,\n })\n } else {\n applyStyles(this.visibleArea, {\n width: `${Math.round(visibleWidth)}px`,\n height: `${Math.round(minimap.getTextEditorScaledHeight())}px`,\n transform: makeTranslate(0, visibleAreaTop, this.useHardwareAcceleration),\n \"border-left-width\": `${Math.round(visibleAreaLeft)}px`,\n })\n }\n\n applyStyles(this.controls, { width: `${Math.round(width)}px` })\n\n const canvasTop = minimap.getFirstVisibleScreenRow() * minimap.getLineHeight() - minimap.getScrollTop()\n\n if (this.smoothScrolling) {\n if (SPEC_MODE) {\n applyStyles(this.backLayer.canvas, { top: `${canvasTop}px` })\n applyStyles(this.tokensLayer.canvas, { top: `${canvasTop}px` })\n applyStyles(this.frontLayer.canvas, { top: `${canvasTop}px` })\n } else {\n let canvasTransform = makeTranslate(0, canvasTop, this.useHardwareAcceleration)\n if (devicePixelRatio !== 1) {\n const scale = 1 / devicePixelRatio\n canvasTransform += ` ${makeScale(scale, scale, this.useHardwareAcceleration)}`\n }\n applyStyles(this.backLayer.canvas, { transform: canvasTransform })\n applyStyles(this.tokensLayer.canvas, { transform: canvasTransform })\n applyStyles(this.frontLayer.canvas, { transform: canvasTransform })\n }\n } else {\n const scale = 1 / devicePixelRatio\n const canvasTransform = makeScale(scale, scale, this.useHardwareAcceleration)\n applyStyles(this.backLayer.canvas, { transform: canvasTransform })\n applyStyles(this.tokensLayer.canvas, { transform: canvasTransform })\n applyStyles(this.frontLayer.canvas, { transform: canvasTransform })\n }\n\n if (this.minimapScrollIndicator && !this.scrollIndicator && minimap.canScroll()) {\n this.initializeScrollIndicator()\n }\n\n if (this.scrollIndicator != null) {\n const minimapScreenHeight = minimap.getScreenHeight()\n const indicatorHeight = minimapScreenHeight * (minimapScreenHeight / minimap.getHeight())\n const indicatorScroll = (minimapScreenHeight - indicatorHeight) * minimap.getScrollRatio()\n\n if (SPEC_MODE) {\n applyStyles(this.scrollIndicator, {\n height: `${indicatorHeight}px`,\n top: `${indicatorScroll}px`,\n })\n } else {\n applyStyles(this.scrollIndicator, {\n height: `${indicatorHeight}px`,\n transform: makeTranslate(0, indicatorScroll, this.useHardwareAcceleration),\n })\n }\n\n if (!minimap.canScroll()) {\n this.disposeScrollIndicator()\n }\n }\n\n if (this.absoluteMode && this.adjustAbsoluteModeHeight) {\n this.updateCanvasesSize()\n }\n\n this.updateCanvas()\n minimap.clearCache()\n }\n\n /**\n * Defines whether to render the code highlights or not.\n *\n * @param {Boolean} displayCodeHighlights Whether to render the code highlights or not\n */\n setDisplayCodeHighlights(displayCodeHighlights) {\n this.displayCodeHighlights = displayCodeHighlights\n if (this.attached) {\n this.requestForcedUpdate()\n }\n }\n\n /**\n * Polling callback used to detect visibility and size changes.\n *\n * @access private\n */\n pollDOM() {\n const visibilityChanged = this.checkForVisibilityChange()\n if (this.isVisible()) {\n if (!this.wasVisible) {\n this.requestForcedUpdate()\n }\n\n this.measureHeightAndWidth(visibilityChanged, false)\n }\n }\n\n /**\n * A method that checks for visibility changes in the MinimapElement. The method returns `true` when the visibility\n * changed from visible to hidden or from hidden to visible.\n *\n * @returns {boolean} Whether the visibility changed or not since the last call\n * @access private\n */\n checkForVisibilityChange() {\n if (this.isVisible()) {\n if (this.wasVisible) {\n return false\n } else {\n this.wasVisible = true\n return this.wasVisible\n }\n } else {\n if (this.wasVisible) {\n this.wasVisible = false\n return true\n } else {\n this.wasVisible = false\n return this.wasVisible\n }\n }\n }\n\n /**\n * A method used to measure the size of the MinimapElement and update internal components based on the new size.\n *\n * @param {boolean} visibilityChanged Did the visibility changed since last measurement\n * @param {[type]} [forceUpdate=true] Forces the update even when no changes were detected. Default is `true`\n * @access private\n */\n measureHeightAndWidth(visibilityChanged, forceUpdate = true) {\n if (!this.minimap) {\n return\n }\n\n const safeFlexBasis = this.style.flexBasis\n this.style.flexBasis = \"\"\n\n const wasResized = this.width !== this.clientWidth || this.height !== this.clientHeight\n\n this.height = this.clientHeight\n this.width = this.clientWidth\n let canvasWidth = this.width\n\n if (this.minimap != null) {\n this.minimap.setScreenHeightAndWidth(this.height, this.width)\n }\n\n if (wasResized || visibilityChanged || forceUpdate) {\n this.requestForcedUpdate()\n }\n\n if (!this.isVisible()) {\n return\n }\n\n if (wasResized || forceUpdate) {\n if (this.adjustToSoftWrap) {\n const lineLength = atom.config.get(\"editor.preferredLineLength\")\n const softWrap = atom.config.get(\"editor.softWrap\")\n const softWrapAtPreferredLineLength = atom.config.get(\"editor.softWrapAtPreferredLineLength\")\n const width = lineLength * this.minimap.getCharWidth()\n\n if (\n softWrap &&\n softWrapAtPreferredLineLength &&\n lineLength &&\n (width <= this.width || !this.adjustOnlyIfSmaller)\n ) {\n this.flexBasis = width\n canvasWidth = width\n } else {\n delete this.flexBasis\n }\n } else {\n delete this.flexBasis\n }\n\n this.updateCanvasesSize(canvasWidth)\n } else {\n this.style.flexBasis = safeFlexBasis\n }\n }\n\n updateCanvasesSize(canvasWidth) {\n const devicePixelRatio = this.minimap.getDevicePixelRatio()\n const maxCanvasHeight = this.height + this.minimap.getLineHeight()\n const newHeight =\n this.absoluteMode && this.adjustAbsoluteModeHeight\n ? Math.min(this.minimap.getHeight(), maxCanvasHeight)\n : maxCanvasHeight\n const canvas = this.getFrontCanvas()\n\n if (canvasWidth == null) {\n canvasWidth = canvas.width / devicePixelRatio\n }\n\n if (canvasWidth !== canvas.width || newHeight !== canvas.height) {\n this.setCanvasesSize(canvasWidth * devicePixelRatio, newHeight * devicePixelRatio)\n if (this.absoluteMode && this.adjustAbsoluteModeHeight) {\n this.offscreenFirstRow = null\n this.offscreenLastRow = null\n }\n }\n }\n\n // ######## ## ## ######## ## ## ######## ######\n // ## ## ## ## ### ## ## ## ##\n // ## ## ## ## #### ## ## ##\n // ###### ## ## ###### ## ## ## ## ######\n // ## ## ## ## ## #### ## ##\n // ## ## ## ## ## ### ## ## ##\n // ######## ### ######## ## ## ## ######\n\n /**\n * Callback triggered when the mouse is pressed on the MinimapElement canvas.\n *\n * @param {number} y The vertical coordinate of the event\n * @param {boolean} isLeftMouse Was the left mouse button pressed?\n * @param {boolean} isMiddleMouse Was the middle mouse button pressed?\n * @access private\n */\n canvasPressed({ y, isLeftMouse, isMiddleMouse }) {\n if (this.minimap.isStandAlone()) {\n return\n }\n if (isLeftMouse) {\n this.canvasLeftMousePressed(y)\n } else if (isMiddleMouse) {\n this.canvasMiddleMousePressed(y)\n const { top, height } = this.visibleArea.getBoundingClientRect()\n this.startDrag({ y: top + height / 2, isLeftMouse: false, isMiddleMouse: true })\n }\n }\n\n /**\n * Callback triggered when the mouse left button is pressed on the MinimapElement canvas.\n *\n * @param {MouseEvent} e The mouse event object\n * @param {number} e.pageY The mouse y position in page\n * @param {HTMLElement} e.target The source of the event\n * @access private\n */\n canvasLeftMousePressed(y) {\n const deltaY = y - this.getBoundingClientRect().top\n const row = Math.floor(deltaY / this.minimap.getLineHeight()) + this.minimap.getFirstVisibleScreenRow()\n\n const textEditor = this.minimap.getTextEditor()\n const textEditorElement = this.minimap.getTextEditorElement()\n\n const scrollTop = row * textEditor.getLineHeightInPixels() - this.minimap.getTextEditorHeight() / 2\n const textEditorScrollTop =\n textEditorElement.pixelPositionForScreenPosition([row, 0]).top - this.minimap.getTextEditorHeight() / 2\n\n if (atom.config.get(\"minimap.moveCursorOnMinimapClick\")) {\n textEditor.setCursorScreenPosition([row, 0])\n }\n\n if (atom.config.get(\"minimap.scrollAnimation\")) {\n const duration = atom.config.get(\"minimap.scrollAnimationDuration\")\n const independentScroll = this.minimap.scrollIndependentlyOnMouseWheel()\n\n const from = this.minimap.getTextEditorScrollTop()\n const to = textEditorScrollTop\n let step\n\n if (independentScroll) {\n const minimapFrom = this.minimap.getScrollTop()\n const minimapTo =\n Math.min(1, scrollTop / (this.minimap.getTextEditorMaxScrollTop() || 1)) * this.minimap.getMaxScrollTop()\n\n step = (now, t) => {\n if (this.minimap === null) {\n return\n } // TODO why this happens in the tests?\n this.minimap.setTextEditorScrollTop(now, true)\n this.minimap.setScrollTop(minimapFrom + (minimapTo - minimapFrom) * t)\n }\n animate({ from, to, duration, step })\n } else {\n step = (now) => {\n if (this.minimap === null) {\n return\n } // TODO why this happens in the tests?\n this.minimap.setTextEditorScrollTop(now)\n }\n animate({ from, to, duration, step })\n }\n } else {\n this.minimap.setTextEditorScrollTop(textEditorScrollTop)\n }\n }\n\n /**\n * Callback triggered when the mouse middle button is pressed on the MinimapElement canvas.\n *\n * @param {MouseEvent} e The mouse event object\n * @param {number} e.pageY The mouse y position in page\n * @access private\n */\n canvasMiddleMousePressed(y) {\n const { top: offsetTop } = this.getBoundingClientRect()\n const deltaY = y - offsetTop - this.minimap.getTextEditorScaledHeight() / 2\n\n const ratio = deltaY / (this.minimap.getVisibleHeight() - this.minimap.getTextEditorScaledHeight())\n\n this.minimap.setTextEditorScrollTop(ratio * this.minimap.getTextEditorMaxScrollTop())\n }\n\n /**\n * Subscribes to a media query for device pixel ratio changes and forces a repaint when it occurs.\n *\n * @returns {Disposable} A disposable to remove the media query listener\n * @access private\n */\n subscribeToMediaQuery() {\n const mediaQuery = window.matchMedia(\"screen and (-webkit-min-device-pixel-ratio: 1.5)\")\n const mediaListener = () => {\n this.requestForcedUpdate()\n }\n mediaQuery.addEventListener(\"change\", mediaListener)\n\n return new Disposable(() => {\n mediaQuery.removeEventListener(\"change\", mediaListener)\n })\n }\n\n // ######## #### ########\n // ## ## ## ## ## ##\n // ## ## #### ## ##\n // ## ## #### ## ##\n // ## ## ## ## ## ## ##\n // ## ## ## ## ## ##\n // ######## #### ## ########\n\n /**\n * A method triggered when the mouse is pressed over the visible area that starts the dragging gesture.\n *\n * @param {number} y The vertical coordinate of the event\n * @param {boolean} isLeftMouse Was the left mouse button pressed?\n * @param {boolean} isMiddleMouse Was the middle mouse button pressed?\n * @access private\n */\n startDrag({ y, isLeftMouse, isMiddleMouse }) {\n if (!this.minimap) {\n return\n }\n if (!isLeftMouse && !isMiddleMouse) {\n return\n }\n\n const initial = {\n dragOffset: y - this.visibleArea.getBoundingClientRect().top,\n offsetTop: this.getBoundingClientRect().top,\n }\n\n // TODO can we avoid adding and removing the listeners every time?\n\n const mousemoveHandler = (e) => this.drag(extractMouseEventData(e), initial)\n const dragendHandler = () => this.endDrag()\n\n const touchmoveHandler = (e) => this.drag(extractTouchEventData(e), initial)\n\n document.body.addEventListener(\"mousemove\", mousemoveHandler, { passive: true })\n document.body.addEventListener(\"mouseup\", dragendHandler, { passive: true })\n document.body.addEventListener(\"mouseleave\", dragendHandler, { passive: true })\n\n document.body.addEventListener(\"touchmove\", touchmoveHandler, { passive: true })\n document.body.addEventListener(\"touchend\", dragendHandler, { passive: true })\n document.body.addEventListener(\"touchcancel\", dragendHandler, { passive: true })\n\n this.dragSubscription = new Disposable(function () {\n document.body.removeEventListener(\"mousemove\", mousemoveHandler)\n document.body.removeEventListener(\"mouseup\", dragendHandler)\n document.body.removeEventListener(\"mouseleave\", dragendHandler)\n\n document.body.removeEventListener(\"touchmove\", touchmoveHandler)\n document.body.removeEventListener(\"touchend\", dragendHandler)\n document.body.removeEventListener(\"touchcancel\", dragendHandler)\n })\n }\n\n /**\n * The method called during the drag gesture.\n *\n * @param {number} y The vertical coordinate of the event\n * @param {boolean} isLeftMouse Was the left mouse button pressed?\n * @param {boolean} isMiddleMouse Was the middle mouse button pressed?\n * @param {number} initial.dragOffset The mouse offset within the visible area\n * @param {number} initial.offsetTop The MinimapElement offset at the moment of the drag start\n * @access private\n */\n drag({ y, isLeftMouse, isMiddleMouse }, initial) {\n if (!this.minimap) {\n return\n }\n if (!isLeftMouse && !isMiddleMouse) {\n return\n }\n const deltaY = y - initial.offsetTop - initial.dragOffset\n\n const ratio = deltaY / (this.minimap.getVisibleHeight() - this.minimap.getTextEditorScaledHeight())\n\n this.minimap.setTextEditorScrollTop(ratio * this.minimap.getTextEditorMaxScrollTop())\n }\n\n /**\n * The method that ends the drag gesture.\n *\n * @access private\n */\n endDrag() {\n if (!this.minimap) {\n return\n }\n this.dragSubscription.dispose()\n }\n}\n\nMinimapElement.initClass()\n\nexport function createMinimapElement() {\n const element = document.createElement(TAG_NAME)\n element.createdCallback()\n return element\n}\n\n// ######## ## ## ######## ## ## ######## ######\n// ## ## ## ## ### ## ## ## ##\n// ## ## ## ## #### ## ## ##\n// ###### ## ## ###### ## ## ## ## ######\n// ## ## ## ## ## #### ## ##\n// ## ## ## ## ## ### ## ## ##\n// ######## ### ######## ## ## ## ######\n\n/**\n * A method that extracts data from a `MouseEvent` which can then be used to process clicks and drags of the minimap.\n *\n * Used together with `extractTouchEventData` to provide a unified interface for `MouseEvent`s and `TouchEvent`s.\n *\n * @param {MouseEvent} mouseEvent The mouse event object\n * @access private\n */\nfunction extractMouseEventData(mouseEvent) {\n return {\n x: mouseEvent.pageX,\n y: mouseEvent.pageY,\n isLeftMouse: mouseEvent.button === 0,\n isMiddleMouse: mouseEvent.button === 1,\n }\n}\n\n/**\n * A method that extracts data from a `TouchEvent` which can then be used to process clicks and drags of the minimap.\n *\n * Used together with `extractMouseEventData` to provide a unified interface for `MouseEvent`s and `TouchEvent`s.\n *\n * @param {TouchEvent} touchEvent The touch event object\n * @access private\n */\nfunction extractTouchEventData(touchEvent) {\n // Use the first touch on the target area. Other touches will be ignored in\n // case of multi-touch.\n const touch = touchEvent.changedTouches[0]\n\n return {\n x: touch.pageX,\n y: touch.pageY,\n isLeftMouse: true, // Touch is treated like a left mouse button click\n isMiddleMouse: false,\n }\n}\n\n// ###### ###### ######\n// ## ## ## ## ## ##\n// ## ## ##\n// ## ###### ######\n// ## ## ##\n// ## ## ## ## ## ##\n// ###### ###### ######\n\n/**\n * Applies the passed-in styles properties to the specified element\n *\n * @param {HTMLElement} element The element onto which apply the styles\n * @param {Object} styles The styles to apply\n * @access private\n */\nfunction applyStyles(element, styles) {\n if (!element) {\n return\n }\n\n let cssText = \"\"\n for (const property in styles) {\n cssText += `${property}: ${styles[property]}; `\n }\n\n element.style.cssText = cssText\n}\n\n/**\n * Returns a string with a CSS translation tranform value.\n *\n * @param {number} [x=0] The x offset of the translation. Default is `0`\n * @param {number} [y=0] The y offset of the translation. Default is `0`\n * @param {boolean} [useHardwareAcceleration=false] Use hardware acceleration. Default is `false`\n * @returns {string} The CSS translation string\n * @access private\n */\nfunction makeTranslate(x = 0, y = 0, useHardwareAcceleration = false) {\n if (useHardwareAcceleration) {\n return `translate3d(${x}px, ${y}px, 0)`\n } else {\n return `translate(${x}px, ${y}px)`\n }\n}\n\n/**\n * Returns a string with a CSS scaling tranform value.\n *\n * @param {number} [x=0] The x scaling factor. Default is `0`\n * @param {number} [y=0] The y scaling factor. Default is `0`\n * @param {boolean} [useHardwareAcceleration=false] Use hardware acceleration. Default is `false`\n * @returns {string} The CSS scaling string\n * @access private\n */\nfunction makeScale(x = 0, y = x, useHardwareAcceleration = false) {\n if (useHardwareAcceleration) {\n return `scale3d(${x}, ${y}, 1)`\n } else {\n return `scale(${x}, ${y})`\n }\n}\n\n/**\n * A method that mimic the jQuery `animate` method and used to animate the scroll when clicking on the MinimapElement canvas.\n *\n * @param {Object} param The animation data object\n * @param {[type]} param.from The start value\n * @param {[type]} param.to The end value\n * @param {[type]} param.duration The animation duration\n * @param {[type]} param.step The easing function for the animation\n * @access private\n */\nfunction animate({ from, to, duration, step }) {\n const start = getTime()\n let progress\n\n const update = () => {\n const passed = getTime() - start\n if (duration === 0) {\n progress = 1\n } else {\n progress = passed / duration\n }\n if (progress > 1) {\n progress = 1\n }\n const delta = swing(progress)\n const value = from + (to - from) * delta\n step(value, delta)\n\n if (progress < 1) {\n requestAnimationFrame(update)\n }\n }\n\n update()\n}\n\nfunction swing(progress) {\n return 0.5 - Math.cos(progress * Math.PI) / 2\n}\n\n/**\n * A method that return the current time as a Date.\n *\n * That method exist so that we can mock it in tests.\n *\n * @returns {Date} The current time as Date\n * @access private\n */\nfunction getTime() {\n return new Date()\n}\n","\"use strict\"\n\nimport { CompositeDisposable } from \"atom\"\nimport { emitter, getConfigSchema } from \"./main\"\n\n/**\n * Provides methods to manage minimap plugins. Minimap plugins are Atom packages that will augment the minimap. They\n * have a secondary activation cycle going on constrained by the minimap package activation. A minimap plugin life cycle\n * will generally look like this:\n *\n * 1. The plugin module is activated by Atom through the `activate` method\n * 2. The plugin then register itself as a minimap plugin using `registerPlugin`\n * 3. The plugin is activated/deactivated according to the minimap settings.\n * 4. On the plugin module deactivation, the plugin must unregisters itself from the minimap using the `unregisterPlugin`.\n *\n * @access public\n */\n\n// Initialize the properties for plugin management.\n\n/**\n * The registered Minimap plugins stored using their name as key.\n *\n * @type {Object}\n * @access private\n */\nexport const plugins = {}\n/**\n * The plugins' subscriptions stored using the plugin names as keys.\n *\n * @type {Object}\n * @access private\n */\nconst pluginsSubscriptions = {}\n\n/**\n * A map that stores the display order for each plugin\n *\n * @type {Object}\n * @access private\n */\nconst pluginsOrderMap = {}\n\n/**\n * Registers a minimap `plugin` with the given `name`.\n *\n * @fires {did-add-plugin} with The name and a reference to the added plugin.\n * @fires {did-activate-plugin} if The plugin was activated during the registration.\n * @param {string} name The identifying name of the plugin. It will be used as activation settings name as well as the\n * key to unregister the module.\n * @param {MinimapPlugin} plugin The plugin to register.\n */\nexport function registerPlugin(name, plugin) {\n plugins[name] = plugin\n pluginsSubscriptions[name] = new CompositeDisposable()\n\n const event = { name, plugin }\n emitter.emit(\"did-add-plugin\", event)\n\n if (atom.config.get(\"minimap.displayPluginsControls\")) {\n registerPluginControls(name, plugin)\n }\n\n updatesPluginActivationState(name)\n}\n\n/**\n * Unregisters a plugin from the minimap.\n *\n * @fires {did-remove-plugin} with The name and a reference to the added plugin.\n * @param {string} name The identifying name of the plugin to unregister.\n */\nexport function unregisterPlugin(name) {\n const plugin = plugins[name]\n\n if (atom.config.get(\"minimap.displayPluginsControls\")) {\n unregisterPluginControls(name)\n }\n\n delete plugins[name]\n\n const event = { name, plugin }\n emitter.emit(\"did-remove-plugin\", event)\n}\n\n/**\n * Toggles the specified plugin activation state.\n *\n * @fires {did-activate-plugin} if The plugin was activated by the call.\n * @fires {did-deactivate-plugin} if The plugin was deactivated by the call.\n * @param {string} name The name of the plugin.\n * @param {boolean} boolean An optional boolean to set the activation state of the plugin. If ommitted the new plugin\n * state will be the the inverse of its current state.\n */\nexport function togglePluginActivation(name, boolean) {\n const settingsKey = `minimap.plugins.${name}`\n\n if (boolean !== undefined && boolean !== null) {\n atom.config.set(settingsKey, boolean)\n } else {\n atom.config.set(settingsKey, !atom.config.get(settingsKey))\n }\n\n updatesPluginActivationState(name)\n}\n\n/**\n * Deactivates all the plugins registered in the minimap package so far.\n *\n * @fires {did-deactivate-plugin} for Each plugin deactivated by the call.\n */\nexport function deactivateAllPlugins() {\n for (const [name, plugin] of eachPlugin()) {\n plugin.deactivatePlugin()\n emitter.emit(\"did-deactivate-plugin\", { name, plugin })\n }\n}\n\n/**\n * A generator function to iterate over registered plugins.\n *\n * @returns An iterable that yield the name and reference to every plugin as an array in each iteration.\n */\nfunction* eachPlugin() {\n for (const name in plugins) {\n yield [name, plugins[name]]\n }\n}\n\n/**\n * Updates the plugin activation state according to the current config.\n *\n * @fires {did-activate-plugin} if The plugin was activated by the call.\n * @fires {did-deactivate-plugin} if The plugin was deactivated by the call.\n * @param {string} name The identifying name of the plugin to update.\n * @access private\n */\nfunction updatesPluginActivationState(name) {\n const plugin = plugins[name]\n const pluginActive = plugin.isActive()\n const settingActive = atom.config.get(`minimap.plugins.${name}`)\n\n if (atom.config.get(\"minimap.displayPluginsControls\")) {\n if (settingActive && !pluginActive) {\n activatePlugin(name, plugin)\n } else if (pluginActive && !settingActive) {\n deactivatePlugin(name, plugin)\n }\n } else {\n if (!pluginActive) {\n activatePlugin(name, plugin)\n } else if (pluginActive) {\n deactivatePlugin(name, plugin)\n }\n }\n}\n\nexport function activatePlugin(name, plugin) {\n const event = { name, plugin }\n\n plugin.activatePlugin()\n emitter.emit(\"did-activate-plugin\", event)\n}\n\nexport function deactivatePlugin(name, plugin) {\n const event = { name, plugin }\n\n plugin.deactivatePlugin()\n emitter.emit(\"did-deactivate-plugin\", event)\n}\n\n/**\n * When the `minimap.displayPluginsControls` setting is toggled, this function will register the commands and setting to\n * manage the plugin activation from the minimap settings.\n *\n * @param {string} name The identifying name of the plugin.\n * @param {MinimapPlugin} plugin The plugin instance to register controls for.\n * @listens {minimap.plugins.${name}} listen to the setting to update\n * the plugin state accordingly.\n * @listens {minimap:toggle-${name}} listen to the command on `atom-workspace`\n * to toggle the plugin state.\n * @access private\n */\nfunction registerPluginControls(name, plugin) {\n const settingsKey = `minimap.plugins.${name}`\n const orderSettingsKey = `minimap.plugins.${name}DecorationsZIndex`\n\n const config = getConfigSchema()\n\n config.plugins.properties[name] = {\n type: \"boolean\",\n title: name,\n description: `Whether the ${name} plugin is activated and displayed in the Minimap.`,\n default: true,\n }\n\n config.plugins.properties[`${name}DecorationsZIndex`] = {\n type: \"integer\",\n title: `${name} decorations order`,\n description: `The relative order of the ${name} plugin's decorations in the layer into which they are drawn. Note that this order only apply inside a layer, so highlight-over decorations will always be displayed above line decorations as they are rendered in different layers.`,\n default: 0,\n }\n\n if (atom.config.get(settingsKey) === undefined) {\n atom.config.set(settingsKey, true)\n }\n\n if (atom.config.get(orderSettingsKey) === undefined) {\n atom.config.set(orderSettingsKey, 0)\n }\n\n pluginsSubscriptions[name].add(\n atom.config.observe(settingsKey, () => {\n updatesPluginActivationState(name)\n })\n )\n\n pluginsSubscriptions[name].add(\n atom.config.observe(orderSettingsKey, (order) => {\n updatePluginsOrderMap(name)\n const event = { name, plugin, order }\n emitter.emit(\"did-change-plugin-order\", event)\n })\n )\n\n pluginsSubscriptions[name].add(\n atom.commands.add(\"atom-workspace\", {\n [`minimap:toggle-${name}`]: () => {\n togglePluginActivation(name)\n },\n })\n )\n\n updatePluginsOrderMap(name)\n}\n\n/**\n * Updates the display order in the map for the passed-in plugin name.\n *\n * @param {string} name The name of the plugin to update\n * @access private\n */\nfunction updatePluginsOrderMap(name) {\n const orderSettingsKey = `minimap.plugins.${name}DecorationsZIndex`\n\n pluginsOrderMap[name] = atom.config.get(orderSettingsKey)\n}\n\n/**\n * Returns the plugins display order mapped by name.\n *\n * @returns {Object} The plugins order by name\n */\nexport function getPluginsOrder() {\n return pluginsOrderMap\n}\n\n/**\n * When the `minimap.displayPluginsControls` setting is toggled, this function will unregister the commands and setting\n * that was created previously.\n *\n * @param {string} name The identifying name of the plugin.\n * @access private\n */\nfunction unregisterPluginControls(name) {\n pluginsSubscriptions[name].dispose()\n delete pluginsSubscriptions[name]\n delete getConfigSchema().plugins.properties[name]\n}\n","\"use strict\"\n\n/**\n * This class is used to read the styles informations (e.g. color and background-color) from the DOM to use when\n * rendering canvas. This is used in Minimap and Terminal It attaches a dummyNode to the targetNode, renders them, and\n * finds the computed style back.\n */\nexport class StyleReader {\n /** The cache object */\n private domStylesCache = new Map>()\n\n private dummyNode?: HTMLElement\n\n /** Used to check if the dummyNode is on the current targetNode */\n private targetNode?: HTMLElement\n\n /** Set to true once tokenized */\n // private hasTokenizedOnce = false\n\n /**\n * Returns the computed values for the given property and scope in the DOM.\n *\n * This function insert a dummy element in the DOM to compute its style, return the specified property, and clear the\n * content of the dummy element.\n *\n * @param scopes A list of classes reprensenting the scope to build\n * @param property The name of the style property to compute\n * @param targetNode\n * @param getFromCache Whether to cache the computed value or not\n * @returns The computed property's value used in CanvasDrawer\n */\n retrieveStyleFromDom(\n scopes: string[],\n property: string,\n targetNode: HTMLElement,\n getFromCache: boolean = true\n ): string {\n if (scopes.length === 0) {\n return \"\"\n } // no scopes\n const key = scopes.join(\" \")\n let cachedData = this.domStylesCache.get(key)\n\n if (cachedData !== undefined) {\n if (getFromCache) {\n // if should get the value from the cache\n const value = cachedData[property]\n if (value !== undefined) {\n // value exists\n return value\n } // value not in the cache - get fresh value\n } // don't use cache - get fresh value\n } else {\n // key did not exist. create it\n cachedData = {}\n }\n\n this.ensureDummyNodeExistence(targetNode)\n const dummyNode = this.dummyNode as HTMLElement\n\n let parent = dummyNode\n for (let i = 0, len = scopes.length; i < len; i++) {\n const scope = scopes[i]\n const node = document.createElement(\"span\")\n node.className = scope.replace(dotRegexp, \" \") // TODO why replace is needed?\n parent.appendChild(node)\n parent = node\n }\n\n const style = window.getComputedStyle(parent)\n let value = style.getPropertyValue(property)\n\n // rotate hue if webkit-filter available\n const filter = style.getPropertyValue(\"-webkit-filter\")\n if (filter.includes(\"hue-rotate\")) {\n value = rotateHue(value, filter)\n }\n\n if (value !== \"\") {\n cachedData[property] = value\n this.domStylesCache.set(key, cachedData)\n }\n\n dummyNode.innerHTML = \"\"\n return value\n }\n\n /**\n * Creates a DOM node container for all the operations that need to read styles properties from DOM.\n *\n * @param targetNode\n */\n private ensureDummyNodeExistence(targetNode: HTMLElement) {\n if (this.targetNode !== targetNode || this.dummyNode === undefined) {\n this.dummyNode = document.createElement(\"span\")\n this.dummyNode.style.visibility = \"hidden\"\n\n // attach to the target node\n targetNode.appendChild(this.dummyNode)\n this.targetNode = targetNode\n }\n }\n\n /** Invalidates the cache by emptying the cache object. used in MinimapElement */\n invalidateDOMStylesCache() {\n this.domStylesCache.clear()\n }\n\n /** Invalidates the cache only for the first tokenization event. */\n /*\n private invalidateIfFirstTokenization () {\n if (this.hasTokenizedOnce) {\n return\n }\n this.invalidateDOMStylesCache()\n this.hasTokenizedOnce = true\n }\n */\n}\n\n// ## ## ######## ## ######## ######## ######## ######\n// ## ## ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ## ##\n// ######### ###### ## ######## ###### ######## ######\n// ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ## ##\n// ## ## ######## ######## ## ######## ## ## ######\n\nconst dotRegexp = /\\.+/g\nconst rgbExtractRegexp = /rgb(a?)\\((\\d+), (\\d+), (\\d+)(, (\\d+(\\.\\d+)?))?\\)/\nconst hueRegexp = /hue-rotate\\((-?\\d+)deg\\)/\n\n/**\n * Computes the output color of `value` with a rotated hue defined in `filter`.\n *\n * @param value The CSS color to apply the rotation on\n * @param filter The CSS hue rotate filter declaration\n * @returns The rotated CSS color\n */\nfunction rotateHue(value: string, filter: string): string {\n const match = value.match(rgbExtractRegexp)\n if (match === null) {\n return \"\"\n }\n const [, , rStr, gStr, bStr, , aStr] = match\n\n const hueMatch = filter.match(hueRegexp)\n if (hueMatch === null) {\n return \"\"\n }\n\n const [, hueStr] = hueMatch\n\n let [r, g, b, a, hue] = [rStr, gStr, bStr, aStr, hueStr].map(Number)\n ;[r, g, b] = rotate(r, g, b, hue)\n\n if (isNaN(a)) {\n return `rgb(${r}, ${g}, ${b})`\n } else {\n return `rgba(${r}, ${g}, ${b}, ${a})`\n }\n}\n\n/**\n * Computes the hue rotation on the provided `r`, `g` and `b` channels by the amount of `angle`.\n *\n * @param r The red channel of the color to rotate\n * @param g The green channel of the color to rotate\n * @param b The blue channel of the color to rotate\n * @param angle The angle to rotate the hue with\n * @returns The rotated color channels\n */\nfunction rotate(r: number, g: number, b: number, angle: number): number[] {\n const matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1]\n const lumR = 0.2126\n const lumG = 0.7152\n const lumB = 0.0722\n const hueRotateR = 0.143\n const hueRotateG = 0.14\n const hueRotateB = 0.283\n const cos = Math.cos((angle * Math.PI) / 180)\n const sin = Math.sin((angle * Math.PI) / 180)\n\n matrix[0] = lumR + (1 - lumR) * cos - lumR * sin\n matrix[1] = lumG - lumG * cos - lumG * sin\n matrix[2] = lumB - lumB * cos + (1 - lumB) * sin\n matrix[3] = lumR - lumR * cos + hueRotateR * sin\n matrix[4] = lumG + (1 - lumG) * cos + hueRotateG * sin\n matrix[5] = lumB - lumB * cos - hueRotateB * sin\n matrix[6] = lumR - lumR * cos - (1 - lumR) * sin\n matrix[7] = lumG - lumG * cos + lumG * sin\n matrix[8] = lumB + (1 - lumB) * cos + lumB * sin\n\n return [\n clamp(matrix[0] * r + matrix[1] * g + matrix[2] * b),\n clamp(matrix[3] * r + matrix[4] * g + matrix[5] * b),\n clamp(matrix[6] * r + matrix[7] * g + matrix[8] * b),\n ]\n}\n\nfunction clamp(num: number) {\n return Math.ceil(Math.max(0, Math.min(255, num)))\n}\n","\"use strict\"\n\nimport { Emitter, CompositeDisposable } from \"atom\"\nimport { createMinimapElement } from \"./minimap-element\"\nimport Minimap from \"./minimap\"\nimport * as config from \"./config.json\"\nimport * as PluginManagement from \"./plugin-management\"\nimport { treeSitterWarning } from \"./performance-monitor\"\nimport { StyleReader } from \"atom-ide-base/commons-ui/dom-style-reader\"\nimport { debounce } from \"./deps/underscore-plus\"\n\nexport * as config from \"./config.json\"\nexport * from \"./plugin-management\"\nexport { default as Minimap } from \"./minimap\"\nexport { createMinimapElement } from \"./minimap-element\"\n\n/**\n * The `Minimap` package provides an eagle-eye view of text buffers.\n *\n * It also provides API for plugin packages that want to interact with the minimap and be available to the user through\n * the minimap settings.\n */\n\n/**\n * The activation state of the package.\n *\n * @type {boolean}\n * @access private\n */\nlet active = false\n/**\n * The toggle state of the package.\n *\n * @type {boolean}\n * @access private\n */\nlet toggled = false\n/**\n * The `Map` where Minimap instances are stored with the text editor they target as key.\n *\n * @type {Map}\n * @access private\n */\nexport let editorsMinimaps = null\n/**\n * The composite disposable that stores the package's subscriptions.\n *\n * @type {CompositeDisposable}\n * @access private\n */\nlet subscriptions = null\n/**\n * The disposable that stores the package's commands subscription.\n *\n * @type {Disposable}\n * @access private\n */\nlet subscriptionsOfCommands = null\n\n/**\n * The package's events emitter.\n *\n * @type {Emitter}\n * @access private\n */\nexport const emitter = new Emitter()\n\n/** StyleReader cache used for storing token colors */\nexport let styleReader = null\n\n/** Activates the minimap package. */\nexport function activate() {\n if (active) {\n return\n }\n\n subscriptionsOfCommands = atom.commands.add(\"atom-workspace\", {\n \"minimap:toggle\": () => {\n toggle()\n },\n \"minimap:generate-coffee-plugin\": async () => {\n await generatePlugin(\"coffee\")\n },\n \"minimap:generate-javascript-plugin\": async () => {\n await generatePlugin(\"javascript\")\n },\n \"minimap:generate-babel-plugin\": async () => {\n await generatePlugin(\"babel\")\n },\n })\n\n editorsMinimaps = new Map()\n styleReader = new StyleReader()\n\n subscriptions = new CompositeDisposable()\n active = true\n\n if (atom.config.get(\"minimap.autoToggle\")) {\n toggle()\n }\n}\n\n/**\n * Returns a {MinimapElement} for the passed-in model if it's a {Minimap}.\n *\n * @param {Minimap} model The model for which returning a view\n * @returns {MinimapElement}\n */\nexport function minimapViewProvider(model) {\n if (model instanceof Minimap) {\n let element = model.getMinimapElement()\n if (!element) {\n element = createMinimapElement()\n element.setModel(model)\n }\n return element\n }\n}\n\n/** Deactivates the minimap package. */\nexport function deactivate() {\n if (!active) {\n return\n }\n\n PluginManagement.deactivateAllPlugins()\n\n if (editorsMinimaps) {\n editorsMinimaps.forEach((value) => {\n value.destroy()\n })\n editorsMinimaps.clear()\n }\n\n subscriptions.dispose()\n subscriptionsOfCommands.dispose()\n styleReader.invalidateDOMStylesCache()\n toggled = false\n active = false\n}\n\nexport function getConfigSchema() {\n return config || atom.packages.getLoadedPackage(\"minimap\").metadata.configSchema\n}\n\n/** Toggles the minimap display. */\nexport function toggle() {\n if (!active) {\n return\n }\n\n if (toggled) {\n toggled = false\n\n if (editorsMinimaps) {\n editorsMinimaps.forEach((minimap) => {\n minimap.destroy()\n })\n editorsMinimaps.clear()\n }\n subscriptions.dispose()\n\n // HACK: this hack forces rerendering editor size which moves the scrollbar to the right once minimap is removed\n const wasMaximized = atom.isMaximized()\n const { width, height } = atom.getSize()\n atom.setSize(width, height)\n if (wasMaximized) {\n atom.maximize()\n }\n } else {\n toggled = true\n initSubscriptions()\n }\n styleReader.invalidateDOMStylesCache()\n}\n\n/**\n * Opens the plugin generation view.\n *\n * @param {string} template The name of the template to use\n */\nasync function generatePlugin(template) {\n const { createMinimapPluginGeneratorElement } = await import(\"./minimap-plugin-generator-element\")\n const view = createMinimapPluginGeneratorElement()\n view.template = template\n view.attach()\n}\n\n/**\n * Registers a callback to listen to the `did-activate` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidActivate(callback) {\n return emitter.on(\"did-activate\", callback)\n}\n\n/**\n * Registers a callback to listen to the `did-deactivate` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidDeactivate(callback) {\n return emitter.on(\"did-deactivate\", callback)\n}\n\n/**\n * Registers a callback to listen to the `did-create-minimap` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidCreateMinimap(callback) {\n return emitter.on(\"did-create-minimap\", callback)\n}\n\n/**\n * Registers a callback to listen to the `did-add-plugin` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidAddPlugin(callback) {\n return emitter.on(\"did-add-plugin\", callback)\n}\n\n/**\n * Registers a callback to listen to the `did-remove-plugin` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidRemovePlugin(callback) {\n return emitter.on(\"did-remove-plugin\", callback)\n}\n\n/**\n * Registers a callback to listen to the `did-activate-plugin` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidActivatePlugin(callback) {\n return emitter.on(\"did-activate-plugin\", callback)\n}\n\n/**\n * Registers a callback to listen to the `did-deactivate-plugin` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidDeactivatePlugin(callback) {\n return emitter.on(\"did-deactivate-plugin\", callback)\n}\n\n/**\n * Registers a callback to listen to the `did-change-plugin-order` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidChangePluginOrder(callback) {\n return emitter.on(\"did-change-plugin-order\", callback)\n}\n\n/**\n * Returns the `Minimap` class\n *\n * @returns {Function} The `Minimap` class constructor\n */\nexport function minimapClass() {\n return Minimap\n}\n\n/**\n * Returns the `Minimap` object associated to the passed-in `TextEditorElement`.\n *\n * @param {TextEditorElement} editorElement A text editor element\n * @returns {Minimap} The associated minimap\n */\nexport function minimapForEditorElement(editorElement) {\n if (!editorElement) {\n return\n }\n return minimapForEditor(editorElement.getModel())\n}\n\n/**\n * Returns the `Minimap` object associated to the passed-in `TextEditor`.\n *\n * @param {TextEditor} textEditor A text editor\n * @returns {Minimap} The associated minimap\n */\nexport function minimapForEditor(textEditor) {\n if (!textEditor) {\n return\n }\n if (!editorsMinimaps) {\n return\n }\n\n let minimap = editorsMinimaps.get(textEditor)\n\n if (minimap === undefined || minimap.destroyed) {\n minimap = new Minimap({ textEditor })\n editorsMinimaps.set(textEditor, minimap)\n\n const editorSubscription = textEditor.onDidDestroy(() => {\n if (editorsMinimaps) {\n editorsMinimaps.delete(textEditor)\n }\n if (minimap) {\n // just in case\n minimap.destroy()\n }\n editorSubscription.dispose()\n })\n // dispose the editorSubscription if minimap is deactivated before destroying the editor\n subscriptions.add(editorSubscription)\n }\n\n return minimap\n}\n\n/**\n * Returns a new stand-alone {Minimap} for the passed-in `TextEditor`.\n *\n * @param {TextEditor} textEditor A text editor instance to create a minimap for\n * @returns {Minimap} A new stand-alone Minimap for the passed-in editor\n */\nexport function standAloneMinimapForEditor(textEditor) {\n if (!textEditor) {\n return\n }\n\n return new Minimap({\n textEditor,\n standAlone: true,\n })\n}\n\n/**\n * Returns the `Minimap` associated to the active `TextEditor`.\n *\n * @returns {Minimap} The active Minimap\n */\nexport function getActiveMinimap() {\n return minimapForEditor(atom.workspace.getActiveTextEditor())\n}\n\n/**\n * Calls a function for each present and future minimaps.\n *\n * @param {function(minimap:Minimap):void} iterator A function to call with the existing and future minimaps\n * @returns {Disposable} A disposable to unregister the observer\n */\nexport function observeMinimaps(iterator) {\n if (!iterator) {\n return\n }\n\n if (editorsMinimaps) {\n editorsMinimaps.forEach((minimap) => {\n iterator(minimap)\n })\n }\n return onDidCreateMinimap((minimap) => {\n iterator(minimap)\n })\n}\n\n/**\n * Registers to the `observeTextEditors` method.\n *\n * @access private\n */\nfunction initSubscriptions() {\n const debounceUpdateStyles = debounce(updateStyles, 300)\n subscriptions.add(\n atom.workspace.observeTextEditors((textEditor) => {\n const minimap = minimapForEditor(textEditor)\n const minimapElement = minimapViewProvider(minimap)\n\n emitter.emit(\"did-create-minimap\", minimap)\n minimapElement.attach(textEditor.getElement())\n }),\n // empty color cache if the theme changes\n atom.themes.onDidChangeActiveThemes(debounceUpdateStyles),\n atom.styles.onDidUpdateStyleElement(debounceUpdateStyles),\n atom.styles.onDidAddStyleElement(debounceUpdateStyles),\n atom.styles.onDidRemoveStyleElement(debounceUpdateStyles),\n treeSitterWarning()\n )\n}\n\n/** Force update styles of minimap */\nfunction updateStyles() {\n styleReader.invalidateDOMStylesCache()\n editorsMinimaps.forEach((minimap) => {\n atom.views.getView(minimap).requestForcedUpdate()\n })\n}\n\n// The public exports included in the service:\nconst MinimapServiceV1 = {\n minimapViewProvider,\n getConfigSchema,\n onDidActivate,\n onDidDeactivate,\n onDidCreateMinimap,\n onDidAddPlugin,\n onDidRemovePlugin,\n onDidActivatePlugin,\n onDidDeactivatePlugin,\n onDidChangePluginOrder,\n minimapClass,\n minimapForEditorElement,\n minimapForEditor,\n standAloneMinimapForEditor,\n getActiveMinimap,\n observeMinimaps,\n registerPlugin: PluginManagement.registerPlugin,\n unregisterPlugin: PluginManagement.unregisterPlugin,\n togglePluginActivation: PluginManagement.togglePluginActivation,\n deactivateAllPlugins: PluginManagement.deactivateAllPlugins,\n activatePlugin: PluginManagement.activatePlugin,\n deactivatePlugin: PluginManagement.deactivatePlugin,\n getPluginsOrder: PluginManagement.getPluginsOrder,\n}\n\n/**\n * Returns the Minimap main module instance.\n *\n * @returns {Main} The Minimap main module instance.\n */\nexport function provideMinimapServiceV1() {\n return MinimapServiceV1\n}\n","// Functions used to recommend the configurations required for the best performance of Minimap\n\nexport function treeSitterWarning() {\n return observeAndWarn(\n \"core.useTreeSitterParsers\",\n true,\n \"Tree-sitter is off (Low Performance Warning).\",\n `You should turn on Atom's tree-sitter parser to experience the best performance Minimap and Atom are designed for.\n Keeping tree-sitter parser off results in sluggish scrolling and lags in the text editor.`\n )\n}\n\n/* Utility function that observes a config and throws warnings once a day if it is not the recommended value */\nfunction observeAndWarn(configName, recommendedValue, warningTitle, warningDescription) {\n return atom.config.observe(configName, (value) => {\n if (value !== recommendedValue) {\n const storageName = `Minimap.${configName}`\n const today = new Date()\n const previousWarning = window.localStorage.getItem(storageName)\n let previousWarningDay = null\n if (previousWarning) {\n previousWarningDay = new Date(Date.parse(previousWarning)).getDay()\n }\n // throw the warning once a day\n if (!previousWarningDay || (typeof previousWarningDay === \"number\" && previousWarningDay - today.getDay() >= 1)) {\n window.localStorage.setItem(storageName, today)\n\n const notification = atom.notifications.addWarning(warningTitle, {\n description: warningDescription,\n dismissable: true,\n buttons: [\n {\n text: `Set to ${recommendedValue} and restart Atom`,\n onDidClick() {\n atom.config.set(configName, true)\n notification.dismiss()\n window.localStorage.removeItem(storageName)\n setTimeout(() => {\n atom.reload()\n }, 1500)\n },\n },\n ],\n })\n }\n }\n })\n}\n","// Generated by CoffeeScript 2.5.1\n(function() {\n var callbackProperties, decorateElementClass, decorateElementPrototype, deprecate;\n\n ({deprecate} = require('grim'));\n\n if (global.__CUSTOM_HTML_ELEMENTS_CLASSES__ != null) {\n global.__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__ = global.__CUSTOM_HTML_ELEMENTS_CLASSES__;\n delete global.__CUSTOM_HTML_ELEMENTS_CLASSES__;\n } else {\n if (global.__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__ == null) {\n global.__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__ = {};\n }\n }\n\n callbackProperties = ['createdCallback', 'attachedCallback', 'detachedCallback', 'attributeChangedCallback'];\n\n decorateElementPrototype = function(target, source) {\n callbackProperties.forEach(function(k) {\n return Object.defineProperty(target, k, {\n value: function() {\n var ref;\n return (ref = this[`__${k}`]) != null ? ref.apply(this, arguments) : void 0;\n },\n writable: true,\n enumerable: true,\n configurable: true\n });\n });\n return Object.getOwnPropertyNames(source).forEach(function(k) {\n var descriptor;\n if (k === 'constructor') {\n return;\n }\n descriptor = Object.getOwnPropertyDescriptor(source, k);\n if (callbackProperties.indexOf(k) > -1) {\n return Object.defineProperty(target, `__${k}`, descriptor);\n } else {\n return Object.defineProperty(target, k, descriptor);\n }\n });\n };\n\n decorateElementClass = function(target, source) {\n return Object.getOwnPropertyNames(source).forEach(function(k) {\n var descriptor;\n if (k === 'length' || k === 'name' || k === 'arguments' || k === 'caller' || k === 'prototype') {\n return;\n }\n descriptor = Object.getOwnPropertyDescriptor(source, k);\n return Object.defineProperty(target, k, descriptor);\n });\n };\n\n module.exports = function(nodeName, options) {\n var elementClass, elementPrototype, klass, proto, ref;\n ({\n class: klass\n } = options);\n if (klass != null) {\n proto = klass.prototype;\n } else {\n proto = (ref = options.prototype) != null ? ref : options;\n }\n if (proto === options) {\n deprecate('Using the prototype as the second argument is deprecated, use the prototype option instead');\n }\n if (__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__[nodeName]) {\n elementClass = __ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__[nodeName];\n decorateElementPrototype(elementClass.prototype, proto);\n if (klass != null) {\n decorateElementClass(elementClass, klass);\n }\n return elementClass;\n } else {\n elementPrototype = Object.create(HTMLElement.prototype);\n decorateElementPrototype(elementPrototype, proto);\n elementClass = document.registerElement(nodeName, {\n prototype: Object.create(elementPrototype)\n });\n if (klass != null) {\n decorateElementClass(elementClass, klass);\n }\n return __ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__[nodeName] = elementClass;\n }\n };\n\n}).call(this);\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVnaXN0ZXItb3ItdXBkYXRlLWVsZW1lbnQuanMiLCJzb3VyY2VSb290IjoiLi4iLCJzb3VyY2VzIjpbImxpYi9yZWdpc3Rlci1vci11cGRhdGUtZWxlbWVudC5jb2ZmZWUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQUEsTUFBQSxrQkFBQSxFQUFBLG9CQUFBLEVBQUEsd0JBQUEsRUFBQTs7RUFBQSxDQUFBLENBQUMsU0FBRCxDQUFBLEdBQWMsT0FBQSxDQUFRLE1BQVIsQ0FBZDs7RUFFQSxJQUFHLCtDQUFIO0lBQ0UsTUFBTSxDQUFDLHFDQUFQLEdBQStDLE1BQU0sQ0FBQztJQUN0RCxPQUFPLE1BQU0sQ0FBQyxpQ0FGaEI7R0FBQSxNQUFBOztNQUlFLE1BQU0sQ0FBQyx3Q0FBeUMsQ0FBQTtLQUpsRDs7O0VBTUEsa0JBQUEsR0FBcUIsQ0FDbkIsaUJBRG1CLEVBRW5CLGtCQUZtQixFQUduQixrQkFIbUIsRUFJbkIsME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NzKSBpZiBrbGFzcz9cblxuICAgIF9fQVRPTV9VVElMU19DVVNUT01fRUxFTUVOVF9DTEFTU0VTX19bbm9kZU5hbWVdID0gZWxlbWVudENsYXNzXG4iXX0=\n//# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/register-or-update-element.coffee","(function() {\n var Deprecation, Emitter, getRawStack, grim;\n\n Deprecation = require('./deprecation');\n\n if (global.__grim__ == null) {\n Emitter = require('event-kit').Emitter;\n grim = global.__grim__ = {\n deprecations: {},\n emitter: new Emitter,\n includeDeprecatedAPIs: true,\n getDeprecations: function() {\n var deprecation, deprecations, deprecationsByLineNumber, deprecationsByPackage, fileName, lineNumber, packageName, _ref;\n deprecations = [];\n _ref = grim.deprecations;\n for (fileName in _ref) {\n deprecationsByLineNumber = _ref[fileName];\n for (lineNumber in deprecationsByLineNumber) {\n deprecationsByPackage = deprecationsByLineNumber[lineNumber];\n for (packageName in deprecationsByPackage) {\n deprecation = deprecationsByPackage[packageName];\n deprecations.push(deprecation);\n }\n }\n }\n return deprecations;\n },\n getDeprecationsLength: function() {\n return this.getDeprecations().length;\n },\n clearDeprecations: function() {\n grim.deprecations = {};\n },\n logDeprecations: function() {\n var deprecation, deprecations, _i, _len;\n deprecations = this.getDeprecations();\n deprecations.sort(function(a, b) {\n return b.getCallCount() - a.getCallCount();\n });\n console.warn(\"\\nCalls to deprecated functions\\n-----------------------------\");\n for (_i = 0, _len = deprecations.length; _i < _len; _i++) {\n deprecation = deprecations[_i];\n console.warn(\"(\" + (deprecation.getCallCount()) + \") \" + (deprecation.getOriginName()) + \" : \" + (deprecation.getMessage()), deprecation);\n }\n },\n deprecate: function(message, metadata) {\n var deprecation, deprecationSite, error, fileName, lineNumber, originalStackTraceLimit, packageName, stack, _base, _base1, _base2, _ref, _ref1;\n originalStackTraceLimit = Error.stackTraceLimit;\n try {\n Error.stackTraceLimit = 7;\n error = new Error;\n stack = (_ref = typeof error.getRawStack === \"function\" ? error.getRawStack() : void 0) != null ? _ref : getRawStack(error);\n stack = stack.slice(1);\n } finally {\n Error.stackTraceLimit = originalStackTraceLimit;\n }\n deprecationSite = stack[0];\n fileName = deprecationSite.getFileName();\n lineNumber = deprecationSite.getLineNumber();\n packageName = (_ref1 = metadata != null ? metadata.packageName : void 0) != null ? _ref1 : \"\";\n if ((_base = grim.deprecations)[fileName] == null) {\n _base[fileName] = {};\n }\n if ((_base1 = grim.deprecations[fileName])[lineNumber] == null) {\n _base1[lineNumber] = {};\n }\n if ((_base2 = grim.deprecations[fileName][lineNumber])[packageName] == null) {\n _base2[packageName] = new Deprecation(message);\n }\n deprecation = grim.deprecations[fileName][lineNumber][packageName];\n deprecation.addStack(stack, metadata);\n grim.emitter.emit(\"updated\", deprecation);\n },\n addSerializedDeprecation: function(serializedDeprecation) {\n var deprecation, fileName, lineNumber, message, packageName, stack, stacks, _base, _base1, _base2, _i, _len, _ref, _ref1, _ref2;\n deprecation = Deprecation.deserialize(serializedDeprecation);\n message = deprecation.getMessage();\n fileName = deprecation.fileName, lineNumber = deprecation.lineNumber;\n stacks = deprecation.getStacks();\n packageName = (_ref = (_ref1 = stacks[0]) != null ? (_ref2 = _ref1.metadata) != null ? _ref2.packageName : void 0 : void 0) != null ? _ref : \"\";\n if ((_base = grim.deprecations)[fileName] == null) {\n _base[fileName] = {};\n }\n if ((_base1 = grim.deprecations[fileName])[lineNumber] == null) {\n _base1[lineNumber] = {};\n }\n if ((_base2 = grim.deprecations[fileName][lineNumber])[packageName] == null) {\n _base2[packageName] = new Deprecation(message, fileName, lineNumber);\n }\n deprecation = grim.deprecations[fileName][lineNumber][packageName];\n for (_i = 0, _len = stacks.length; _i < _len; _i++) {\n stack = stacks[_i];\n deprecation.addStack(stack, stack.metadata);\n }\n grim.emitter.emit(\"updated\", deprecation);\n },\n on: function(eventName, callback) {\n return grim.emitter.on(eventName, callback);\n }\n };\n }\n\n getRawStack = function(error) {\n var originalPrepareStackTrace, result;\n originalPrepareStackTrace = Error.prepareStackTrace;\n Error.prepareStackTrace = function(error, stack) {\n return stack;\n };\n Error.captureStackTrace(error, getRawStack);\n result = error.stack;\n Error.prepareStackTrace = originalPrepareStackTrace;\n return result;\n };\n\n module.exports = global.__grim__;\n\n}).call(this);\n","(function() {\n var Deprecation, SourceMapCache;\n\n SourceMapCache = {};\n\n module.exports = Deprecation = (function() {\n Deprecation.getFunctionNameFromCallsite = function(callsite) {};\n\n Deprecation.deserialize = function(_arg) {\n var deprecation, fileName, lineNumber, message, stack, stacks, _i, _len;\n message = _arg.message, fileName = _arg.fileName, lineNumber = _arg.lineNumber, stacks = _arg.stacks;\n deprecation = new Deprecation(message, fileName, lineNumber);\n for (_i = 0, _len = stacks.length; _i < _len; _i++) {\n stack = stacks[_i];\n deprecation.addStack(stack, stack.metadata);\n }\n return deprecation;\n };\n\n function Deprecation(message, fileName, lineNumber) {\n this.message = message;\n this.fileName = fileName;\n this.lineNumber = lineNumber;\n this.callCount = 0;\n this.stackCount = 0;\n this.stacks = {};\n this.stackCallCounts = {};\n }\n\n Deprecation.prototype.getFunctionNameFromCallsite = function(callsite) {\n var _ref, _ref1, _ref2;\n if (callsite.functionName != null) {\n return callsite.functionName;\n }\n if (callsite.isToplevel()) {\n return (_ref = callsite.getFunctionName()) != null ? _ref : '';\n } else {\n if (callsite.isConstructor()) {\n return \"new \" + (callsite.getFunctionName());\n } else if (callsite.getMethodName() && !callsite.getFunctionName()) {\n return callsite.getMethodName();\n } else {\n return \"\" + (callsite.getTypeName()) + \".\" + ((_ref1 = (_ref2 = callsite.getMethodName()) != null ? _ref2 : callsite.getFunctionName()) != null ? _ref1 : '');\n }\n }\n };\n\n Deprecation.prototype.getLocationFromCallsite = function(callsite) {\n var column, fileName, line;\n if (callsite == null) {\n return \"unknown\";\n }\n if (callsite.location != null) {\n return callsite.location;\n }\n if (callsite.isNative()) {\n return \"native\";\n } else if (callsite.isEval()) {\n return \"eval at \" + (this.getLocationFromCallsite(callsite.getEvalOrigin()));\n } else {\n fileName = callsite.getFileName();\n line = callsite.getLineNumber();\n column = callsite.getColumnNumber();\n return \"\" + fileName + \":\" + line + \":\" + column;\n }\n };\n\n Deprecation.prototype.getFileNameFromCallSite = function(callsite) {\n var _ref;\n return (_ref = callsite.fileName) != null ? _ref : callsite.getFileName();\n };\n\n Deprecation.prototype.getOriginName = function() {\n return this.originName;\n };\n\n Deprecation.prototype.getMessage = function() {\n return this.message;\n };\n\n Deprecation.prototype.getStacks = function() {\n var location, parsedStack, parsedStacks, stack, _ref;\n parsedStacks = [];\n _ref = this.stacks;\n for (location in _ref) {\n stack = _ref[location];\n parsedStack = this.parseStack(stack);\n parsedStack.callCount = this.stackCallCounts[location];\n parsedStack.metadata = stack.metadata;\n parsedStacks.push(parsedStack);\n }\n return parsedStacks;\n };\n\n Deprecation.prototype.getStackCount = function() {\n return this.stackCount;\n };\n\n Deprecation.prototype.getCallCount = function() {\n return this.callCount;\n };\n\n Deprecation.prototype.addStack = function(stack, metadata) {\n var callerLocation, _base, _base1;\n if (this.originName == null) {\n this.originName = this.getFunctionNameFromCallsite(stack[0]);\n }\n if (this.fileName == null) {\n this.fileName = this.getFileNameFromCallSite(stack[0]);\n }\n if (this.lineNumber == null) {\n this.lineNumber = typeof (_base = stack[0]).getLineNumber === \"function\" ? _base.getLineNumber() : void 0;\n }\n this.callCount++;\n stack.metadata = metadata;\n callerLocation = this.getLocationFromCallsite(stack[1]);\n if (this.stacks[callerLocation] == null) {\n this.stacks[callerLocation] = stack;\n this.stackCount++;\n }\n if ((_base1 = this.stackCallCounts)[callerLocation] == null) {\n _base1[callerLocation] = 0;\n }\n return this.stackCallCounts[callerLocation]++;\n };\n\n Deprecation.prototype.parseStack = function(stack) {\n return stack.map((function(_this) {\n return function(callsite) {\n return {\n functionName: _this.getFunctionNameFromCallsite(callsite),\n location: _this.getLocationFromCallsite(callsite),\n fileName: _this.getFileNameFromCallSite(callsite)\n };\n };\n })(this));\n };\n\n Deprecation.prototype.serialize = function() {\n return {\n message: this.getMessage(),\n lineNumber: this.lineNumber,\n fileName: this.fileName,\n stacks: this.getStacks()\n };\n };\n\n return Deprecation;\n\n })();\n\n}).call(this);\n","\"use strict\";\n\nexports.Emitter = require(\"./emitter\");\nexports.Disposable = require(\"./disposable\");\nexports.CompositeDisposable = require(\"./composite-disposable\");","\"use strict\";\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar Disposable = require(\"./disposable\");\n\nvar CompositeDisposable = require(\"./composite-disposable\"); // Essential: Utility class to be used when implementing event-based APIs that\n// allows for handlers registered via `::on` to be invoked with calls to\n// `::emit`. Instances of this class are intended to be used internally by\n// classes that expose an event-based API.\n//\n// For example:\n//\n// ```js\n// class User {\n// constructor() {\n// this.emitter = new Emitter()\n// }\n//\n// onDidChangeName(callback) {\n// this.emitter.on('did-change-name', callback)\n// }\n//\n// setName(name) {\n// if (name !== this.name) {\n// this.name = name\n// this.emitter.emit('did-change-name', name)\n// }\n//\n// return this.name\n// }\n// }\n// ```\n\n\nvar Emitter =\n/*#__PURE__*/\nfunction () {\n _createClass(Emitter, null, [{\n key: \"onEventHandlerException\",\n value: function onEventHandlerException(exceptionHandler) {\n var _this = this;\n\n if (this.exceptionHandlers.length === 0) {\n this.dispatch = this.exceptionHandlingDispatch;\n }\n\n this.exceptionHandlers.push(exceptionHandler);\n return new Disposable(function () {\n _this.exceptionHandlers.splice(_this.exceptionHandlers.indexOf(exceptionHandler), 1);\n\n if (_this.exceptionHandlers.length === 0) {\n return _this.dispatch = _this.simpleDispatch;\n }\n });\n }\n }, {\n key: \"simpleDispatch\",\n value: function simpleDispatch(handler, value) {\n return handler(value);\n }\n }, {\n key: \"exceptionHandlingDispatch\",\n value: function exceptionHandlingDispatch(handler, value) {\n try {\n return handler(value);\n } catch (exception) {\n return this.exceptionHandlers.map(function (exceptionHandler) {\n return exceptionHandler(exception);\n });\n }\n }\n /*\n Section: Construction and Destruction\n */\n // Public: Construct an emitter.\n //\n // ```js\n // this.emitter = new Emitter()\n // ```\n\n }]);\n\n function Emitter() {\n _classCallCheck(this, Emitter);\n\n this.disposed = false;\n this.clear();\n } // Public: Clear out any existing subscribers.\n\n\n _createClass(Emitter, [{\n key: \"clear\",\n value: function clear() {\n if (this.subscriptions != null) {\n this.subscriptions.dispose();\n }\n\n this.subscriptions = new CompositeDisposable();\n this.handlersByEventName = {};\n } // Public: Unsubscribe all handlers.\n\n }, {\n key: \"dispose\",\n value: function dispose() {\n this.subscriptions.dispose();\n this.handlersByEventName = null;\n this.disposed = true;\n }\n /*\n Section: Event Subscription\n */\n // Public: Register the given handler function to be invoked whenever events by\n // the given name are emitted via {::emit}.\n //\n // * `eventName` {String} naming the event that you want to invoke the handler\n // when emitted.\n // * `handler` {Function} to invoke when {::emit} is called with the given\n // event name.\n //\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\n\n }, {\n key: \"on\",\n value: function on(eventName, handler, unshift) {\n var _this2 = this;\n\n if (unshift == null) {\n unshift = false;\n }\n\n if (this.disposed) {\n throw new Error(\"Emitter has been disposed\");\n }\n\n if (typeof handler !== \"function\") {\n throw new Error(\"Handler must be a function\");\n }\n\n var currentHandlers = this.handlersByEventName[eventName];\n\n if (currentHandlers) {\n if (unshift) {\n this.handlersByEventName[eventName].unshift(handler);\n } else {\n this.handlersByEventName[eventName].push(handler);\n }\n } else {\n this.handlersByEventName[eventName] = [handler];\n } // When the emitter is disposed, we want to dispose of all subscriptions.\n // However, we also need to stop tracking disposables when they're disposed\n // from outside, otherwise this class will hold references to all the\n // disposables it created (instead of just the active ones).\n\n\n var cleanup = new Disposable(function () {\n _this2.subscriptions.remove(cleanup);\n\n return _this2.off(eventName, handler);\n });\n this.subscriptions.add(cleanup);\n return cleanup;\n } // Public: Register the given handler function to be invoked the next time an\n // events with the given name is emitted via {::emit}.\n //\n // * `eventName` {String} naming the event that you want to invoke the handler\n // when emitted.\n // * `handler` {Function} to invoke when {::emit} is called with the given\n // event name.\n //\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\n\n }, {\n key: \"once\",\n value: function once(eventName, handler, unshift) {\n if (unshift == null) {\n unshift = false;\n }\n\n var wrapped = function wrapped(value) {\n disposable.dispose();\n return handler(value);\n };\n\n var disposable = this.on(eventName, wrapped, unshift);\n return disposable;\n } // Public: Register the given handler function to be invoked *before* all\n // other handlers existing at the time of subscription whenever events by the\n // given name are emitted via {::emit}.\n //\n // Use this method when you need to be the first to handle a given event. This\n // could be required when a data structure in a parent object needs to be\n // updated before third-party event handlers registered on a child object via a\n // public API are invoked. Your handler could itself be preempted via\n // subsequent calls to this method, but this can be controlled by keeping\n // methods based on `::preempt` private.\n //\n // * `eventName` {String} naming the event that you want to invoke the handler\n // when emitted.\n // * `handler` {Function} to invoke when {::emit} is called with the given\n // event name.\n //\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\n\n }, {\n key: \"preempt\",\n value: function preempt(eventName, handler) {\n return this.on(eventName, handler, true);\n } // Private: Used by the disposable.\n\n }, {\n key: \"off\",\n value: function off(eventName, handlerToRemove) {\n if (this.disposed) {\n return;\n }\n\n var handlers = this.handlersByEventName[eventName];\n\n if (handlers) {\n var handlerIndex = handlers.indexOf(handlerToRemove);\n\n if (handlerIndex >= 0) {\n handlers.splice(handlerIndex, 1);\n }\n\n if (handlers.length === 0) {\n delete this.handlersByEventName[eventName];\n }\n }\n }\n /*\n Section: Event Emission\n */\n // Public: Invoke handlers registered via {::on} for the given event name.\n //\n // * `eventName` The name of the event to emit. Handlers registered with {::on}\n // for the same name will be invoked.\n // * `value` Callbacks will be invoked with this value as an argument.\n\n }, {\n key: \"emit\",\n value: function emit(eventName, value) {\n var handlers = this.handlersByEventName && this.handlersByEventName[eventName];\n\n if (handlers) {\n // create a copy of `handlers` so that if any handler mutates `handlers`\n // (e.g. by calling `on` on this same emitter), this does not result in\n // changing the handlers being called during this same `emit`.\n var handlersCopy = handlers.slice();\n\n for (var i = 0; i < handlersCopy.length; i++) {\n this.constructor.dispatch(handlersCopy[i], value);\n }\n }\n }\n }, {\n key: \"emitAsync\",\n value: function emitAsync(eventName, value) {\n var _this3 = this;\n\n var handlers = this.handlersByEventName && this.handlersByEventName[eventName];\n\n if (handlers) {\n var promises = handlers.map(function (handler) {\n return _this3.constructor.dispatch(handler, value);\n });\n return Promise.all(promises).then(function () {});\n }\n\n return Promise.resolve();\n }\n }, {\n key: \"getEventNames\",\n value: function getEventNames() {\n return Object.keys(this.handlersByEventName);\n }\n }, {\n key: \"listenerCountForEventName\",\n value: function listenerCountForEventName(eventName) {\n var handlers = this.handlersByEventName[eventName];\n return handlers == null ? 0 : handlers.length;\n }\n }, {\n key: \"getTotalListenerCount\",\n value: function getTotalListenerCount() {\n var result = 0;\n\n var _arr = Object.keys(this.handlersByEventName);\n\n for (var _i = 0; _i < _arr.length; _i++) {\n var eventName = _arr[_i];\n result += this.handlersByEventName[eventName].length;\n }\n\n return result;\n }\n }]);\n\n return Emitter;\n}();\n\nEmitter.dispatch = Emitter.simpleDispatch;\nEmitter.exceptionHandlers = [];\nmodule.exports = Emitter;","\"use strict\";\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n// Essential: A handle to a resource that can be disposed. For example,\n// {Emitter::on} returns disposables representing subscriptions.\nmodule.exports =\n/*#__PURE__*/\nfunction () {\n _createClass(Disposable, null, [{\n key: \"isDisposable\",\n // Public: Ensure that `object` correctly implements the `Disposable`\n // contract.\n //\n // * `object` An {Object} you want to perform the check against.\n //\n // Returns a {Boolean} indicating whether `object` is a valid `Disposable`.\n value: function isDisposable(object) {\n return typeof (object != null ? object.dispose : undefined) === \"function\";\n }\n /*\n Section: Construction and Destruction\n */\n // Public: Construct a Disposable\n //\n // * `disposalAction` A {Function} to call when {::dispose} is called for the\n // first time.\n\n }]);\n\n function Disposable(disposalAction) {\n _classCallCheck(this, Disposable);\n\n this.disposed = false;\n this.disposalAction = disposalAction;\n } // Public: Perform the disposal action, indicating that the resource associated\n // with this disposable is no longer needed.\n //\n // You can call this method more than once, but the disposal action will only\n // be performed the first time.\n\n\n _createClass(Disposable, [{\n key: \"dispose\",\n value: function dispose() {\n if (!this.disposed) {\n this.disposed = true;\n\n if (typeof this.disposalAction === \"function\") {\n this.disposalAction();\n }\n\n this.disposalAction = null;\n }\n }\n }]);\n\n return Disposable;\n}();","\"use strict\";\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar CompositeDisposable;\nvar Disposable; // Essential: An object that aggregates multiple {Disposable} instances together\n// into a single disposable, so they can all be disposed as a group.\n//\n// These are very useful when subscribing to multiple events.\n//\n// ## Examples\n//\n// ```js\n// const {CompositeDisposable} = require('atom')\n//\n// class Something {\n// constructor() {\n// this.disposables = new CompositeDisposable()\n// const editor = atom.workspace.getActiveTextEditor()\n// this.disposables.add(editor.onDidChange(() => {})\n// this.disposables.add(editor.onDidChangePath(() => {})\n// }\n//\n// destroy() {\n// this.disposables.dispose();\n// }\n// }\n// ```\n\nmodule.exports =\n/*#__PURE__*/\nfunction () {\n /*\n Section: Construction and Destruction\n */\n // Public: Construct an instance, optionally with one or more disposables\n function CompositeDisposable() {\n _classCallCheck(this, CompositeDisposable);\n\n this.disposed = false;\n this.disposables = new Set();\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = arguments[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var disposable = _step.value;\n this.add(disposable);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n } // Public: Dispose all disposables added to this composite disposable.\n //\n // If this object has already been disposed, this method has no effect.\n\n\n _createClass(CompositeDisposable, [{\n key: \"dispose\",\n value: function dispose() {\n if (!this.disposed) {\n this.disposed = true;\n this.disposables.forEach(function (disposable) {\n return disposable.dispose();\n });\n this.disposables = null;\n }\n }\n /*\n Section: Managing Disposables\n */\n // Public: Add disposables to be disposed when the composite is disposed.\n //\n // If this object has already been disposed, this method has no effect.\n //\n // * `...disposables` {Disposable} instances or any objects with `.dispose()`\n // methods.\n\n }, {\n key: \"add\",\n value: function add() {\n if (!this.disposed) {\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n for (var _iterator2 = arguments[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var disposable = _step2.value;\n assertDisposable(disposable);\n this.disposables.add(disposable);\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return != null) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n }\n } // Public: Remove a previously added disposable.\n //\n // * `disposable` {Disposable} instance or any object with a `.dispose()`\n // method.\n\n }, {\n key: \"remove\",\n value: function remove(disposable) {\n if (!this.disposed) {\n this.disposables.delete(disposable);\n }\n } // Public: Alias to {CompositeDisposable::remove}\n\n }, {\n key: \"delete\",\n value: function _delete(disposable) {\n this.remove(disposable);\n } // Public: Clear all disposables. They will not be disposed by the next call\n // to dispose.\n\n }, {\n key: \"clear\",\n value: function clear() {\n if (!this.disposed) {\n this.disposables.clear();\n }\n }\n }]);\n\n return CompositeDisposable;\n}();\n\nfunction assertDisposable(disposable) {\n if (Disposable == null) {\n Disposable = require(\"./disposable\");\n }\n\n if (!Disposable.isDisposable(disposable)) {\n throw new TypeError(\"Arguments to CompositeDisposable.add must have a .dispose() method\");\n }\n}","// Generated by CoffeeScript 2.5.1\n(function() {\n var Ancestors, Mixin;\n\n Mixin = require('mixto');\n\n // Public\n module.exports = Ancestors = class Ancestors extends Mixin {\n /* Public */\n static parents(node, selector = '*') {\n var parents;\n parents = [];\n this.eachParent(node, function(parent) {\n if (typeof parent.matches === \"function\" ? parent.matches(selector) : void 0) {\n return parents.push(parent);\n }\n });\n return parents;\n }\n\n static eachParent(node, block) {\n var parent, results;\n parent = node.parentNode;\n if (parent != null) {\n block(parent);\n }\n results = [];\n while (parent = parent.parentNode) {\n if (parent != null) {\n results.push(block(parent));\n } else {\n results.push(void 0);\n }\n }\n return results;\n }\n\n parents(selector = '*') {\n return Ancestors.parents(this, selector);\n }\n\n queryParentSelectorAll(selector) {\n if (selector == null) {\n throw new Error('::queryParentSelectorAll requires a valid selector as argument');\n }\n return this.parents(selector);\n }\n\n queryParentSelector(selector) {\n if (selector == null) {\n throw new Error('::queryParentSelector requires a valid selector as argument');\n }\n return this.queryParentSelectorAll(selector)[0];\n }\n\n eachParent(block) {\n return Ancestors.eachParent(this, block);\n }\n\n };\n\n}).call(this);\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5jZXN0b3JzLmpzIiwic291cmNlUm9vdCI6Ii4uLy4uIiwic291cmNlcyI6WyJsaWIvbWl4aW5zL2FuY2VzdG9ycy5jb2ZmZWUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQUEsTUFBQSxTQUFBLEVBQUE7O0VBQUEsS0FBQSxHQUFRLE9BQUEsQ0FBUSxPQUFSLEVBQVI7OztFQUdBLE1BQU0sQ0FBQyxPQUFQLEdBQ00sWUFBTixNQUFBLFVBQUEsUUFBd0IsTUFBeEIsQ0FBQTs7SUFJWSxPQUFULE9BQVMsQ0FBQyxJQUFELEVBQU8sV0FBUyxHQUFoQixDQUFBO0FBQ1osVUFBQTtNQUFJLE9BQUEsR0FBVTtNQUNWLElBQUMsQ0FBQSxVQUFELENBQVksSUFBWixFQUFrQixRQUFBLENBQUMsTUFBRCxDQUFBO1FBQVksMkNBQXdCLE1BQU0sQ0FBQyxRQUFTLGtCQUF4QztpQkFBQSxPQUFPLENBQUMsSUFBUixDQUFhLE1BQWIsRUFBQTs7TUFBWixDQUFsQjthQUNBO0lBSFE7O0lBS0csT0FBWixVQUFZLENBQUMsSUFBRCxFQUFPLEtBQVAsQ0FBQTtBQUNmLFVBQUEsTUFBQSxFQUFBO01BQUksTUFBQSxHQUFTLElBQUksQ0FBQztNQUVkLElBQWlCLGNBQWpCO1FBQUEsS0FBQSxDQUFNLE1BQU4sRUFBQTs7QUFDQTthQUFNLE1BQUEsR0FBUyxNQUFNLENBQUMsVUFBdEI7UUFDRSxJQUFpQixjQUFqQjt1QkFBQSxLQUFBLENBQU0sTUFBTixHQUFBO1NBQUEs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gIGJsb2NrKHBhcmVudCkgaWYgcGFyZW50P1xuICAgIHdoaWxlIHBhcmVudCA9IHBhcmVudC5wYXJlbnROb2RlXG4gICAgICBibG9jayhwYXJlbnQpIGlmIHBhcmVudD9cblxuICBwYXJlbnRzOiAoc2VsZWN0b3I9JyonKSAtPiBBbmNlc3RvcnMucGFyZW50cyh0aGlzLCBzZWxlY3RvcilcblxuICBxdWVyeVBhcmVudFNlbGVjdG9yQWxsOiAoc2VsZWN0b3IpIC0+XG4gICAgdW5sZXNzIHNlbGVjdG9yP1xuICAgICAgdGhyb3cgbmV3IEVycm9yICc6OnF1ZXJ5UGFyZW50U2VsZWN0b3JBbGwgcmVxdWlyZXMgYSB2YWxpZCBzZWxlY3RvciBhcyBhcmd1bWVudCdcbiAgICBAcGFyZW50cyhzZWxlY3RvcilcblxuICBxdWVyeVBhcmVudFNlbGVjdG9yOiAoc2VsZWN0b3IpIC0+XG4gICAgdW5sZXNzIHNlbGVjdG9yP1xuICAgICAgdGhyb3cgbmV3IEVycm9yICc6OnF1ZXJ5UGFyZW50U2VsZWN0b3IgcmVxdWlyZXMgYSB2YWxpZCBzZWxlY3RvciBhcyBhcmd1bWVudCdcbiAgICBAcXVlcnlQYXJlbnRTZWxlY3RvckFsbChzZWxlY3RvcilbMF1cblxuICBlYWNoUGFyZW50OiAoYmxvY2spIC0+IEFuY2VzdG9ycy5lYWNoUGFyZW50KHRoaXMsIGJsb2NrKVxuIl19\n//# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/mixins/ancestors.coffee","(function() {\n var ExcludedClassProperties, ExcludedPrototypeProperties, Mixin, name;\n\n module.exports = Mixin = (function() {\n Mixin.includeInto = function(constructor) {\n var name, value, _ref;\n this.extend(constructor.prototype);\n for (name in this) {\n value = this[name];\n if (ExcludedClassProperties.indexOf(name) === -1) {\n if (!constructor.hasOwnProperty(name)) {\n constructor[name] = value;\n }\n }\n }\n return (_ref = this.included) != null ? _ref.call(constructor) : void 0;\n };\n\n Mixin.extend = function(object) {\n var name, _i, _len, _ref, _ref1;\n _ref = Object.getOwnPropertyNames(this.prototype);\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n name = _ref[_i];\n if (ExcludedPrototypeProperties.indexOf(name) === -1) {\n if (!object.hasOwnProperty(name)) {\n object[name] = this.prototype[name];\n }\n }\n }\n return (_ref1 = this.prototype.extended) != null ? _ref1.call(object) : void 0;\n };\n\n function Mixin() {\n if (typeof this.extended === \"function\") {\n this.extended();\n }\n }\n\n return Mixin;\n\n })();\n\n ExcludedClassProperties = ['__super__'];\n\n for (name in Mixin) {\n ExcludedClassProperties.push(name);\n }\n\n ExcludedPrototypeProperties = ['constructor', 'extended'];\n\n}).call(this);\n","// Generated by CoffeeScript 2.5.1\n(function() {\n var Disposable, DisposableEvents, Mixin;\n\n Mixin = require('mixto');\n\n ({Disposable} = require('atom'));\n\n module.exports = DisposableEvents = class DisposableEvents extends Mixin {\n addDisposableEventListener(object, event, listener, options) {\n object.addEventListener(event, listener, options);\n return new Disposable(function() {\n return object.removeEventListener(event, listener);\n });\n }\n\n };\n\n}).call(this);\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlzcG9zYWJsZS1ldmVudHMuanMiLCJzb3VyY2VSb290IjoiLi4vLi4iLCJzb3VyY2VzIjpbImxpYi9taXhpbnMvZGlzcG9zYWJsZS1ldmVudHMuY29mZmVlIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUFBLE1BQUEsVUFBQSxFQUFBLGdCQUFBLEVBQUE7O0VBQUEsS0FBQSxHQUFRLE9BQUEsQ0FBUSxPQUFSOztFQUNSLENBQUEsQ0FBQyxVQUFELENBQUEsR0FBZSxPQUFBLENBQVEsTUFBUixDQUFmOztFQUVBLE1BQU0sQ0FBQyxPQUFQLEdBQ00sbUJBQU4sTUFBQSxpQkFBQSxRQUErQixNQUEvQjtJQUNFLDBCQUE0QixDQUFDLE1BQUQsRUFBUyxLQUFULEVBQWdCLFFBQWhCLEVBQTBCLE9BQTFCLENBQUE7TUFDMUIsTUFBTSxDQUFDLGdCQUFQLENBQXdCLEtBQXhCLEVBQStCLFFBQS9CLEVBQXlDLE9BQXpDO2FBQ0EsSUFBSSxVQUFKLENBQWUsUUFBQSxDQUFBLENBQUE7ZUFBRyxNQUFNLENBQUMsbUJBQVAsQ0FBMkIsS0FBM0IsRUFBa0MsUUFBbEM7TUFBSCxDQUFmO0lBRjBCOztFQUQ5QjtBQUpBIiwic291cmNlc0NvbnRlbnQiOlsiTWl4aW4gPSByZXF1aXJlICdtaXh0bydcbntEaXNwb3NhYmxlfSA9IHJlcXVpcmUgJ2F0b20nXG5cbm1vZHVsZS5leHBvcnRzID1cbmNsYXNzIERpc3Bvc2FibGVFdmVudHMgZXh0ZW5kcyBNaXhpblxuICBhZGREaXNwb3NhYmxlRXZlbnRMaXN0ZW5lcjogKG9iamVjdCwgZXZlbnQsIGxpc3RlbmVyLCBvcHRpb25zKSAtPlxuICAgIG9iamVjdC5hZGRFdmVudExpc3RlbmVyIGV2ZW50LCBsaXN0ZW5lciwgb3B0aW9uc1xuICAgIG5ldyBEaXNwb3NhYmxlIC0+IG9iamVjdC5yZW1vdmVFdmVudExpc3RlbmVyIGV2ZW50LCBsaXN0ZW5lclxuIl19\n//# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/mixins/disposable-events.coffee","// Generated by CoffeeScript 2.5.1\n(function() {\n var CompositeDisposable, Disposable, DisposableEvents, EventsDelegation, Mixin, NO_SELECTOR, eachPair;\n\n Mixin = require('mixto');\n\n DisposableEvents = require('./disposable-events');\n\n ({Disposable, CompositeDisposable} = require('atom'));\n\n eachPair = function(object, callback) {\n var k, results, v;\n results = [];\n for (k in object) {\n v = object[k];\n results.push(callback(k, v));\n }\n return results;\n };\n\n NO_SELECTOR = '__NONE__';\n\n module.exports = EventsDelegation = (function() {\n class EventsDelegation extends Mixin {\n subscribeTo(object, selector, events, options) {\n var disposablesForObject, eventsForObject;\n if (!(object instanceof HTMLElement)) {\n [object, selector, events, options] = [this, object, selector, events];\n }\n if (typeof selector === 'object') {\n [events, selector, options] = [selector, NO_SELECTOR, events];\n }\n if (this.eventsMap == null) {\n this.eventsMap = new WeakMap();\n }\n if (this.disposablesMap == null) {\n this.disposablesMap = new WeakMap();\n }\n if (this.eventsMap.get(object) == null) {\n this.eventsMap.set(object, {});\n }\n if (this.disposablesMap.get(object) == null) {\n this.disposablesMap.set(object, {});\n }\n eventsForObject = this.eventsMap.get(object);\n disposablesForObject = this.disposablesMap.get(object);\n eachPair(events, (event, callback) => {\n if (eventsForObject[event] == null) {\n eventsForObject[event] = {};\n disposablesForObject[event] = this.createEventListener(object, event, options);\n }\n return eventsForObject[event][selector] = callback;\n });\n return new Disposable(() => {\n return this.unsubscribeFrom(object, selector, events);\n });\n }\n\n unsubscribeFrom(object, selector, events) {\n var disposablesForObject, event, eventsForObject;\n if (!(object instanceof HTMLElement)) {\n [object, selector, events] = [this, object, selector];\n }\n if (typeof selector === 'object') {\n [events, selector] = [selector, NO_SELECTOR];\n }\n if (!(eventsForObject = this.eventsMap.get(object))) {\n return;\n }\n for (event in events) {\n delete eventsForObject[event][selector];\n if (Object.keys(eventsForObject[event]).length === 0) {\n disposablesForObject = this.disposablesMap.get(object);\n disposablesForObject[event].dispose();\n delete disposablesForObject[event];\n delete eventsForObject[event];\n }\n }\n if (Object.keys(eventsForObject).length === 0) {\n this.eventsMap.delete(object);\n return this.disposablesMap.delete(object);\n }\n }\n\n createEventListener(object, event, options) {\n var listener;\n listener = (e) => {\n var eventsForObject, ref, target;\n if (!(eventsForObject = (ref = this.eventsMap.get(object)) != null ? ref[event] : void 0)) {\n return;\n }\n ({target} = e);\n this.decorateEvent(e);\n this.eachSelectorFromTarget(e, target, eventsForObject);\n if (!e.isPropagationStopped) {\n if (typeof eventsForObject[NO_SELECTOR] === \"function\") {\n eventsForObject[NO_SELECTOR](e);\n }\n }\n return true;\n };\n return this.addDisposableEventListener(object, event, listener, options);\n }\n\n eachSelectorFromTarget(event, target, eventsForObject) {\n return this.nodeAndItsAncestors(target, (node) => {\n if (event.isPropagationStopped) {\n return;\n }\n return this.eachSelector(eventsForObject, (selector, callback) => {\n var matched;\n matched = this.targetMatch(node, selector);\n if (event.isImmediatePropagationStopped || !matched) {\n return;\n }\n return callback(event);\n });\n });\n }\n\n eachSelector(eventsForObject, callback) {\n var i, key, keys, len;\n keys = Object.keys(eventsForObject);\n if (keys.indexOf(NO_SELECTOR) !== -1) {\n keys.splice(keys.indexOf(NO_SELECTOR), 1);\n }\n keys.sort(function(a, b) {\n return b.split(' ').length - a.split(' ').length;\n });\n for (i = 0, len = keys.length; i < len; i++) {\n key = keys[i];\n if (callback(key, eventsForObject[key])) {\n return true;\n }\n }\n return false;\n }\n\n targetMatch(target, selector) {\n var parent;\n if (target.matches(selector)) {\n return true;\n }\n parent = target.parentNode;\n while ((parent != null) && (parent.matches != null)) {\n if (parent.matches(selector)) {\n return true;\n }\n parent = parent.parentNode;\n }\n return false;\n }\n\n nodeAndItsAncestors(node, callback) {\n var parent, results;\n parent = node.parentNode;\n callback(node);\n results = [];\n while ((parent != null) && (parent.matches != null)) {\n callback(parent);\n results.push(parent = parent.parentNode);\n }\n return results;\n }\n\n decorateEvent(e) {\n var overriddenStop, overriddenStopImmediate;\n overriddenStop = Event.prototype.stopPropagation;\n e.stopPropagation = function() {\n this.isPropagationStopped = true;\n return overriddenStop.apply(this, arguments);\n };\n overriddenStopImmediate = Event.prototype.stopImmediatePropagation;\n return e.stopImmediatePropagation = function() {\n this.isImmediatePropagationStopped = true;\n return overriddenStopImmediate.apply(this, arguments);\n };\n }\n\n };\n\n DisposableEvents.includeInto(EventsDelegation);\n\n return EventsDelegation;\n\n }).call(this);\n\n}).call(this);\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnRzLWRlbGVnYXRpb24uanMiLCJzb3VyY2VSb290IjoiL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5vZGVcblxuICAgIGZhbHNlXG5cbiAgbm9kZUFuZEl0c0FuY2VzdG9yczogKG5vZGUsIGNhbGxiYWNrKSAtPlxuICAgIHBhcmVudCA9IG5vZGUucGFyZW50Tm9kZVxuXG4gICAgY2FsbGJhY2sobm9kZSlcbiAgICB3aGlsZSBwYXJlbnQ/IGFuZCBwYXJlbnQubWF0Y2hlcz9cbiAgICAgIGNhbGxiYWNrKHBhcmVudClcbiAgICAgIHBhcmVudCA9IHBhcmVudC5wYXJlbnROb2RlXG5cbiAgZGVjb3JhdGVFdmVudDogKGUpIC0+XG4gICAgb3ZlcnJpZGRlblN0b3AgPSAgRXZlbnQ6OnN0b3BQcm9wYWdhdGlvblxuICAgIGUuc3RvcFByb3BhZ2F0aW9uID0gLT5cbiAgICAgIEBpc1Byb3BhZ2F0aW9uU3RvcHBlZCA9IHRydWVcbiAgICAgIG92ZXJyaWRkZW5TdG9wLmFwcGx5KHRoaXMsIGFyZ3VtZW50cylcblxuICAgIG92ZXJyaWRkZW5TdG9wSW1tZWRpYXRlID0gIEV2ZW50OjpzdG9wSW1tZWRpYXRlUHJvcGFnYXRpb25cbiAgICBlLnN0b3BJbW1lZGlhdGVQcm9wYWdhdGlvbiA9IC0+XG4gICAgICBAaXNJbW1lZGlhdGVQcm9wYWdhdGlvblN0b3BwZWQgPSB0cnVlXG4gICAgICBvdmVycmlkZGVuU3RvcEltbWVkaWF0ZS5hcHBseSh0aGlzLCBhcmd1bWVudHMpXG4iXX0=\n//# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/mixins/events-delegation.coffee","// Generated by CoffeeScript 2.5.1\n(function() {\n var BabelSpacePenDSL, Builder, Events, Mixin, SelfClosingTags, SpacePenDSL, Tags, Template;\n\n Mixin = require('mixto');\n\n Tags = 'a abbr address article aside audio b bdi bdo blockquote body button canvas caption cite code colgroup datalist dd del details dfn dialog div dl dt em fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header html i iframe ins kbd label legend li main map mark menu meter nav noscript object ol optgroup option output p pre progress q rp rt ruby s samp script section select small span strong style sub summary sup table tbody td textarea tfoot th thead time title tr u ul var video area base br col command embed hr img input keygen link meta param source track wbr'.split(/\\s+/);\n\n SelfClosingTags = {};\n\n 'area base br col command embed hr img input keygen link meta param source track wbr'.split(/\\s+/).forEach(function(tag) {\n return SelfClosingTags[tag] = true;\n });\n\n Events = 'blur change click dblclick error focus input keydown keypress keyup load mousedown mousemove mouseout mouseover mouseup resize scroll select submit unload'.split(/\\s+/);\n\n BabelSpacePenDSL = class BabelSpacePenDSL extends Mixin {\n buildContent() {\n if (this.constructor.content != null) {\n return SpacePenDSL.buildContent(this, this.constructor.content);\n }\n }\n\n };\n\n module.exports = SpacePenDSL = (function() {\n class SpacePenDSL extends Mixin {\n static includeInto(klass) {\n super.includeInto(klass);\n Object.defineProperty(klass, 'content', {\n enumerable: false,\n get: function() {\n return this.prototype.__content__;\n },\n set: function(value) {\n return this.prototype.__content__ = value;\n }\n });\n Object.defineProperty(klass.prototype, 'createdCallback', {\n enumerable: true,\n get: function() {\n return this.__create__;\n },\n set: function(value) {\n return this.__createdCallback__ = value;\n }\n });\n Object.defineProperty(klass.prototype, '__create__', {\n enumerable: true,\n value: function() {\n if (this.__content__ != null) {\n SpacePenDSL.buildContent(this, this.__content__);\n }\n if (this.__createdCallback__ != null) {\n return this.__createdCallback__();\n }\n }\n });\n return klass.useShadowRoot = function() {\n return klass.prototype.__useShadowRoot__ = true;\n };\n }\n\n static buildContent(element, content) {\n var html, root, template;\n template = new Template();\n content.call(template);\n [html] = template.buildHtml();\n root = element.__useShadowRoot__ ? root = element.shadowRoot = element.createShadowRoot() : root = element;\n root.innerHTML = html;\n return this.wireOutlets(element, root);\n }\n\n static wireOutlets(view, root) {\n var element, i, len, outlet, ref;\n ref = root.querySelectorAll('[outlet]');\n for (i = 0, len = ref.length; i < len; i++) {\n element = ref[i];\n outlet = element.getAttribute('outlet');\n view[outlet] = element;\n element.removeAttribute('outlet');\n }\n return void 0;\n }\n\n };\n\n SpacePenDSL.Babel = BabelSpacePenDSL;\n\n return SpacePenDSL;\n\n }).call(this);\n\n Template = (function() {\n class Template {\n constructor() {\n this.currentBuilder = new Builder();\n }\n\n subview(name, view) {\n return this.currentBuilder.subview(name, view);\n }\n\n text(string) {\n return this.currentBuilder.text(string);\n }\n\n tag(tagName, ...args) {\n return this.currentBuilder.tag(tagName, ...args);\n }\n\n raw(string) {\n return this.currentBuilder.raw(string);\n }\n\n buildHtml() {\n return this.currentBuilder.buildHtml();\n }\n\n };\n\n Tags.forEach(function(tagName) {\n return Template.prototype[tagName] = function(...args) {\n return this.currentBuilder.tag(tagName, ...args);\n };\n });\n\n return Template;\n\n }).call(this);\n\n Builder = class Builder {\n constructor() {\n this.document = [];\n this.postProcessingSteps = [];\n }\n\n buildHtml() {\n return [this.document.join(''), this.postProcessingSteps];\n }\n\n tag(name, ...args) {\n var options;\n options = this.extractOptions(args);\n this.openTag(name, options.attributes);\n if (SelfClosingTags.hasOwnProperty(name)) {\n if ((options.text != null) || (options.content != null)) {\n throw new Error(`Self-closing tag ${name} cannot have text or content`);\n }\n } else {\n if (typeof options.content === \"function\") {\n options.content();\n }\n if (options.text) {\n this.text(options.text);\n }\n return this.closeTag(name);\n }\n }\n\n openTag(name, attributes) {\n var attributeName, attributePairs, attributesString, value;\n if (this.document.length === 0) {\n if (attributes == null) {\n attributes = {};\n }\n }\n attributePairs = (function() {\n var results;\n results = [];\n for (attributeName in attributes) {\n value = attributes[attributeName];\n results.push(`${attributeName}=\\\"${value}\\\"`);\n }\n return results;\n })();\n attributesString = attributePairs.length ? \" \" + attributePairs.join(\" \") : \"\";\n return this.document.push(`<${name}${attributesString}>`);\n }\n\n closeTag(name) {\n return this.document.push(``);\n }\n\n text(string) {\n var escapedString;\n escapedString = string.replace(/&/g, '&').replace(/\"/g, '"').replace(/'/g, ''').replace(//g, '>');\n return this.document.push(escapedString);\n }\n\n raw(string) {\n return this.document.push(string);\n }\n\n subview(outletName, subview) {\n var subviewId;\n subviewId = `subview-${++idCounter}`;\n this.tag('div', {\n id: subviewId\n });\n return this.postProcessingSteps.push(function(view) {\n view[outletName] = subview;\n subview.parentView = view;\n return view.find(`div#${subviewId}`).replaceWith(subview);\n });\n }\n\n extractOptions(args) {\n var arg, i, len, options;\n options = {};\n for (i = 0, len = args.length; i < len; i++) {\n arg = args[i];\n switch (typeof arg) {\n case 'function':\n options.content = arg;\n break;\n case 'string':\n case 'number':\n options.text = arg.toString();\n break;\n default:\n options.attributes = arg;\n }\n }\n return options;\n }\n\n };\n\n}).call(this);\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BhY2UtcGVuLWRzbC5qcyIsInNvdXJjZVJvb3QiOiIuLi8uLiIsInNvdXJjZXMiOlsibGliL21peGlucy9zcGFjZS1wZW4tZHNsLmNvZmZlZSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7QUFBQSxNQUFBLGdCQUFBLEVBQUEsT0FBQSxFQUFBLE1BQUEsRUFBQSxLQUFBLEVBQUEsZUFBQSxFQUFBLFdBQUEsRUFBQSxJQUFBLEVBQUE7O0VBQUEsS0FBQSxHQUFRLE9BQUEsQ0FBUSxPQUFSOztFQUVSLElBQUEsR0FDRSxra0JBTytDLENBQUMsS0FQaEQsQ0FPc0QsS0FQdEQ7O0VBU0YsZUFBQSxHQUFrQixDQUFBOztFQUNsQixxRkFDa0IsQ0FBQyxLQURuQixDQUN5QixLQUR6QixDQUMrQixDQUFDLE9BRGhDLENBQ3dDLFFBQUEsQ0FBQyxHQUFELENBQUE7V0FBUyxlQUFlLENBQUMsR0FBRCxDQUFmLEdBQXVCO0VBQWhDLENBRHhDOztFQUdBLE1BQUEsR0FDRSw0SkFFNEMsQ0FBQyxLQUY3QyxDQUVtRCxLQUZuRDs7RUFJSSxtQkFBTixNQUFBLGlCQUFBLFFBQStCLE1BQS9CO0lBQ0UsWUFBYyxDQUFBLENBQUE7TUF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iAob3V0bGV0TmFtZSwgc3VidmlldykgLT5cbiAgICBzdWJ2aWV3SWQgPSBcInN1YnZpZXctI3srK2lkQ291bnRlcn1cIlxuICAgIEB0YWcgJ2RpdicsIGlkOiBzdWJ2aWV3SWRcbiAgICBAcG9zdFByb2Nlc3NpbmdTdGVwcy5wdXNoICh2aWV3KSAtPlxuICAgICAgdmlld1tvdXRsZXROYW1lXSA9IHN1YnZpZXdcbiAgICAgIHN1YnZpZXcucGFyZW50VmlldyA9IHZpZXdcbiAgICAgIHZpZXcuZmluZChcImRpdiMje3N1YnZpZXdJZH1cIikucmVwbGFjZVdpdGgoc3VidmlldylcblxuICBleHRyYWN0T3B0aW9uczogKGFyZ3MpIC0+XG4gICAgb3B0aW9ucyA9IHt9XG4gICAgZm9yIGFyZyBpbiBhcmdzXG4gICAgICBzd2l0Y2ggdHlwZW9mKGFyZylcbiAgICAgICAgd2hlbiAnZnVuY3Rpb24nXG4gICAgICAgICAgb3B0aW9ucy5jb250ZW50ID0gYXJnXG4gICAgICAgIHdoZW4gJ3N0cmluZycsICdudW1iZXInXG4gICAgICAgICAgb3B0aW9ucy50ZXh0ID0gYXJnLnRvU3RyaW5nKClcbiAgICAgICAgZWxzZVxuICAgICAgICAgIG9wdGlvbnMuYXR0cmlidXRlcyA9IGFyZ1xuICAgIG9wdGlvbnNcbiJdfQ==\n//# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/mixins/space-pen-dsl.coffee","// Generated by CoffeeScript 2.5.1\n(function() {\n module.exports = {\n requirePackages: function(...packages) {\n return new Promise(function(resolve, reject) {\n var failures, remains, required, solved;\n required = [];\n failures = [];\n remains = packages.length;\n solved = function() {\n remains--;\n if (remains !== 0) {\n return;\n }\n if (failures.length > 0) {\n return reject(failures);\n }\n return resolve(required);\n };\n return packages.forEach(function(pkg, i) {\n var failHandler, promise;\n failHandler = function(reason) {\n failures[i] = reason;\n return solved();\n };\n promise = atom.packages.activatePackage(pkg).then(function(activatedPackage) {\n required[i] = activatedPackage.mainModule;\n return solved();\n });\n if (promise.fail != null) {\n return promise.fail(failHandler);\n } else if (promise.catch != null) {\n return promise.catch(failHandler);\n }\n });\n });\n },\n registerOrUpdateElement: require('./register-or-update-element'),\n Ancestors: require('./mixins/ancestors'),\n AncestorsMethods: require('./mixins/ancestors'),\n DisposableEvents: require('./mixins/disposable-events'),\n EventsDelegation: require('./mixins/events-delegation'),\n SpacePenDSL: require('./mixins/space-pen-dsl')\n };\n\n}).call(this);\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXRvbS11dGlscy5qcyIsInNvdXJjZVJvb3QiOiIuLiIsInNvdXJjZXMiOlsibGliL2F0b20tdXRpbHMuY29mZmVlIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFDQTtFQUFBLE1BQU0sQ0FBQyxPQUFQLEdBQ0U7SUFBQSxlQUFBLEVBQWlCLFFBQUEsQ0FBQSxHQUFDLFFBQUQsQ0FBQTthQUNmLElBQUksT0FBSixDQUFZLFFBQUEsQ0FBQyxPQUFELEVBQVUsTUFBVixDQUFBO0FBQ2hCLFlBQUEsUUFBQSxFQUFBLE9BQUEsRUFBQSxRQUFBLEVBQUE7UUFBTSxRQUFBLEdBQVc7UUFDWCxRQUFBLEdBQVc7UUFDWCxPQUFBLEdBQVUsUUFBUSxDQUFDO1FBRW5CLE1BQUEsR0FBUyxRQUFBLENBQUEsQ0FBQTtVQUNQLE9BQUE7VUFDQSxJQUFjLE9BQUEsS0FBVyxDQUF6QjtBQUFBLG1CQUFBOztVQUNBLElBQTJCLFFBQVEsQ0FBQyxNQUFULEdBQWtCLENBQTdDO0FBQUEsbUJBQU8sTUFBQSxDQUFPLFFBQVAsRUFBUDs7aUJBQ0EsT0FBQSxDQUFRLFFBQVI7UUFKTztlQU1ULFFBQVEsQ0FBQyxPQUFULENBQWlCLFFBQUEsQ0FBQyxHQUFELEVBQU0sQ0FBTixDQUFBO0FBQ3ZCLGNB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HMnXG4gIEV2ZW50c0RlbGVnYXRpb246IHJlcXVpcmUgJy4vbWl4aW5zL2V2ZW50cy1kZWxlZ2F0aW9uJ1xuICBTcGFjZVBlbkRTTDogcmVxdWlyZSAnLi9taXhpbnMvc3BhY2UtcGVuLWRzbCdcbiJdfQ==\n//# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/atom-utils.coffee","\"use strict\";\n\nvar utils = module.exports = {};\n\n/**\n * Loops through the collection and calls the callback for each element. if the callback returns truthy, the loop is broken and returns the same value.\n * @public\n * @param {*} collection The collection to loop through. Needs to have a length property set and have indices set from 0 to length - 1.\n * @param {function} callback The callback to be called for each element. The element will be given as a parameter to the callback. If this callback returns truthy, the loop is broken and the same value is returned.\n * @returns {*} The value that a callback has returned (if truthy). Otherwise nothing.\n */\nutils.forEach = function(collection, callback) {\n for(var i = 0; i < collection.length; i++) {\n var result = callback(collection[i]);\n if(result) {\n return result;\n }\n }\n};\n","\"use strict\";\n\nmodule.exports = function(options) {\n var getState = options.stateHandler.getState;\n\n /**\n * Tells if the element has been made detectable and ready to be listened for resize events.\n * @public\n * @param {element} The element to check.\n * @returns {boolean} True or false depending on if the element is detectable or not.\n */\n function isDetectable(element) {\n var state = getState(element);\n return state && !!state.isDetectable;\n }\n\n /**\n * Marks the element that it has been made detectable and ready to be listened for resize events.\n * @public\n * @param {element} The element to mark.\n */\n function markAsDetectable(element) {\n getState(element).isDetectable = true;\n }\n\n /**\n * Tells if the element is busy or not.\n * @public\n * @param {element} The element to check.\n * @returns {boolean} True or false depending on if the element is busy or not.\n */\n function isBusy(element) {\n return !!getState(element).busy;\n }\n\n /**\n * Marks the object is busy and should not be made detectable.\n * @public\n * @param {element} element The element to mark.\n * @param {boolean} busy If the element is busy or not.\n */\n function markBusy(element, busy) {\n getState(element).busy = !!busy;\n }\n\n return {\n isDetectable: isDetectable,\n markAsDetectable: markAsDetectable,\n isBusy: isBusy,\n markBusy: markBusy\n };\n};\n","\"use strict\";\n\nmodule.exports = function(idHandler) {\n var eventListeners = {};\n\n /**\n * Gets all listeners for the given element.\n * @public\n * @param {element} element The element to get all listeners for.\n * @returns All listeners for the given element.\n */\n function getListeners(element) {\n var id = idHandler.get(element);\n\n if (id === undefined) {\n return [];\n }\n\n return eventListeners[id] || [];\n }\n\n /**\n * Stores the given listener for the given element. Will not actually add the listener to the element.\n * @public\n * @param {element} element The element that should have the listener added.\n * @param {function} listener The callback that the element has added.\n */\n function addListener(element, listener) {\n var id = idHandler.get(element);\n\n if(!eventListeners[id]) {\n eventListeners[id] = [];\n }\n\n eventListeners[id].push(listener);\n }\n\n function removeListener(element, listener) {\n var listeners = getListeners(element);\n for (var i = 0, len = listeners.length; i < len; ++i) {\n if (listeners[i] === listener) {\n listeners.splice(i, 1);\n break;\n }\n }\n }\n\n function removeAllListeners(element) {\n var listeners = getListeners(element);\n if (!listeners) { return; }\n listeners.length = 0;\n }\n\n return {\n get: getListeners,\n add: addListener,\n removeListener: removeListener,\n removeAllListeners: removeAllListeners\n };\n};\n","\"use strict\";\n\nmodule.exports = function() {\n var idCount = 1;\n\n /**\n * Generates a new unique id in the context.\n * @public\n * @returns {number} A unique id in the context.\n */\n function generate() {\n return idCount++;\n }\n\n return {\n generate: generate\n };\n};\n","\"use strict\";\n\nmodule.exports = function(options) {\n var idGenerator = options.idGenerator;\n var getState = options.stateHandler.getState;\n\n /**\n * Gets the resize detector id of the element.\n * @public\n * @param {element} element The target element to get the id of.\n * @returns {string|number|null} The id of the element. Null if it has no id.\n */\n function getId(element) {\n var state = getState(element);\n\n if (state && state.id !== undefined) {\n return state.id;\n }\n\n return null;\n }\n\n /**\n * Sets the resize detector id of the element. Requires the element to have a resize detector state initialized.\n * @public\n * @param {element} element The target element to set the id of.\n * @returns {string|number|null} The id of the element.\n */\n function setId(element) {\n var state = getState(element);\n\n if (!state) {\n throw new Error(\"setId required the element to have a resize detection state.\");\n }\n\n var id = idGenerator.generate();\n\n state.id = id;\n\n return id;\n }\n\n return {\n get: getId,\n set: setId\n };\n};\n","\"use strict\";\n\n/* global console: false */\n\n/**\n * Reporter that handles the reporting of logs, warnings and errors.\n * @public\n * @param {boolean} quiet Tells if the reporter should be quiet or not.\n */\nmodule.exports = function(quiet) {\n function noop() {\n //Does nothing.\n }\n\n var reporter = {\n log: noop,\n warn: noop,\n error: noop\n };\n\n if(!quiet && window.console) {\n var attachFunction = function(reporter, name) {\n //The proxy is needed to be able to call the method with the console context,\n //since we cannot use bind.\n reporter[name] = function reporterProxy() {\n var f = console[name];\n if (f.apply) { //IE9 does not support console.log.apply :)\n f.apply(console, arguments);\n } else {\n for (var i = 0; i < arguments.length; i++) {\n f(arguments[i]);\n }\n }\n };\n };\n\n attachFunction(reporter, \"log\");\n attachFunction(reporter, \"warn\");\n attachFunction(reporter, \"error\");\n }\n\n return reporter;\n};","\"use strict\";\n\nvar detector = module.exports = {};\n\ndetector.isIE = function(version) {\n function isAnyIeVersion() {\n var agent = navigator.userAgent.toLowerCase();\n return agent.indexOf(\"msie\") !== -1 || agent.indexOf(\"trident\") !== -1 || agent.indexOf(\" edge/\") !== -1;\n }\n\n if(!isAnyIeVersion()) {\n return false;\n }\n\n if(!version) {\n return true;\n }\n\n //Shamelessly stolen from https://gist.github.com/padolsey/527683\n var ieVersion = (function(){\n var undef,\n v = 3,\n div = document.createElement(\"div\"),\n all = div.getElementsByTagName(\"i\");\n\n do {\n div.innerHTML = \"\";\n }\n while (all[0]);\n\n return v > 4 ? v : undef;\n }());\n\n return version === ieVersion;\n};\n\ndetector.isLegacyOpera = function() {\n return !!window.opera;\n};\n","\"use strict\";\n\nvar utils = module.exports = {};\n\nutils.getOption = getOption;\n\nfunction getOption(options, name, defaultValue) {\n var value = options[name];\n\n if((value === undefined || value === null) && defaultValue !== undefined) {\n return defaultValue;\n }\n\n return value;\n}\n","/**\n * Resize detection strategy that injects objects to elements in order to detect resize events.\n * Heavily inspired by: http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/\n */\n\n\"use strict\";\n\nvar browserDetector = require(\"../browser-detector\");\n\nmodule.exports = function(options) {\n options = options || {};\n var reporter = options.reporter;\n var batchProcessor = options.batchProcessor;\n var getState = options.stateHandler.getState;\n\n if(!reporter) {\n throw new Error(\"Missing required dependency: reporter.\");\n }\n\n /**\n * Adds a resize event listener to the element.\n * @public\n * @param {element} element The element that should have the listener added.\n * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback.\n */\n function addListener(element, listener) {\n function listenerProxy() {\n listener(element);\n }\n\n if(browserDetector.isIE(8)) {\n //IE 8 does not support object, but supports the resize event directly on elements.\n getState(element).object = {\n proxy: listenerProxy\n };\n element.attachEvent(\"onresize\", listenerProxy);\n } else {\n var object = getObject(element);\n\n if(!object) {\n throw new Error(\"Element is not detectable by this strategy.\");\n }\n\n object.contentDocument.defaultView.addEventListener(\"resize\", listenerProxy);\n }\n }\n\n function buildCssTextString(rules) {\n var seperator = options.important ? \" !important; \" : \"; \";\n\n return (rules.join(seperator) + seperator).trim();\n }\n\n /**\n * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes.\n * @private\n * @param {object} options Optional options object.\n * @param {element} element The element to make detectable\n * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter.\n */\n function makeDetectable(options, element, callback) {\n if (!callback) {\n callback = element;\n element = options;\n options = null;\n }\n\n options = options || {};\n var debug = options.debug;\n\n function injectObject(element, callback) {\n var OBJECT_STYLE = buildCssTextString([\"display: block\", \"position: absolute\", \"top: 0\", \"left: 0\", \"width: 100%\", \"height: 100%\", \"border: none\", \"padding: 0\", \"margin: 0\", \"opacity: 0\", \"z-index: -1000\", \"pointer-events: none\"]);\n\n //The target element needs to be positioned (everything except static) so the absolute positioned object will be positioned relative to the target element.\n\n // Position altering may be performed directly or on object load, depending on if style resolution is possible directly or not.\n var positionCheckPerformed = false;\n\n // The element may not yet be attached to the DOM, and therefore the style object may be empty in some browsers.\n // Since the style object is a reference, it will be updated as soon as the element is attached to the DOM.\n var style = window.getComputedStyle(element);\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n getState(element).startSize = {\n width: width,\n height: height\n };\n\n function mutateDom() {\n function alterPositionStyles() {\n if(style.position === \"static\") {\n element.style.setProperty(\"position\", \"relative\", options.important ? \"important\" : \"\");\n\n var removeRelativeStyles = function(reporter, element, style, property) {\n function getNumericalValue(value) {\n return value.replace(/[^-\\d\\.]/g, \"\");\n }\n\n var value = style[property];\n\n if(value !== \"auto\" && getNumericalValue(value) !== \"0\") {\n reporter.warn(\"An element that is positioned static has style.\" + property + \"=\" + value + \" which is ignored due to the static positioning. The element will need to be positioned relative, so the style.\" + property + \" will be set to 0. Element: \", element);\n element.style.setProperty(property, \"0\", options.important ? \"important\" : \"\");\n }\n };\n\n //Check so that there are no accidental styles that will make the element styled differently now that is is relative.\n //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway).\n removeRelativeStyles(reporter, element, style, \"top\");\n removeRelativeStyles(reporter, element, style, \"right\");\n removeRelativeStyles(reporter, element, style, \"bottom\");\n removeRelativeStyles(reporter, element, style, \"left\");\n }\n }\n\n function onObjectLoad() {\n // The object has been loaded, which means that the element now is guaranteed to be attached to the DOM.\n if (!positionCheckPerformed) {\n alterPositionStyles();\n }\n\n /*jshint validthis: true */\n\n function getDocument(element, callback) {\n //Opera 12 seem to call the object.onload before the actual document has been created.\n //So if it is not present, poll it with an timeout until it is present.\n //TODO: Could maybe be handled better with object.onreadystatechange or similar.\n if(!element.contentDocument) {\n var state = getState(element);\n if (state.checkForObjectDocumentTimeoutId) {\n window.clearTimeout(state.checkForObjectDocumentTimeoutId);\n }\n state.checkForObjectDocumentTimeoutId = setTimeout(function checkForObjectDocument() {\n state.checkForObjectDocumentTimeoutId = 0;\n getDocument(element, callback);\n }, 100);\n\n return;\n }\n\n callback(element.contentDocument);\n }\n\n //Mutating the object element here seems to fire another load event.\n //Mutating the inner document of the object element is fine though.\n var objectElement = this;\n\n //Create the style element to be added to the object.\n getDocument(objectElement, function onObjectDocumentReady(objectDocument) {\n //Notify that the element is ready to be listened to.\n callback(element);\n });\n }\n\n // The element may be detached from the DOM, and some browsers does not support style resolving of detached elements.\n // The alterPositionStyles needs to be delayed until we know the element has been attached to the DOM (which we are sure of when the onObjectLoad has been fired), if style resolution is not possible.\n if (style.position !== \"\") {\n alterPositionStyles(style);\n positionCheckPerformed = true;\n }\n\n //Add an object element as a child to the target element that will be listened to for resize events.\n var object = document.createElement(\"object\");\n object.style.cssText = OBJECT_STYLE;\n object.tabIndex = -1;\n object.type = \"text/html\";\n object.setAttribute(\"aria-hidden\", \"true\");\n object.onload = onObjectLoad;\n\n //Safari: This must occur before adding the object to the DOM.\n //IE: Does not like that this happens before, even if it is also added after.\n if(!browserDetector.isIE()) {\n object.data = \"about:blank\";\n }\n\n if (!getState(element)) {\n // The element has been uninstalled before the actual loading happened.\n return;\n }\n\n element.appendChild(object);\n getState(element).object = object;\n\n //IE: This must occur after adding the object to the DOM.\n if(browserDetector.isIE()) {\n object.data = \"about:blank\";\n }\n }\n\n if(batchProcessor) {\n batchProcessor.add(mutateDom);\n } else {\n mutateDom();\n }\n }\n\n if(browserDetector.isIE(8)) {\n //IE 8 does not support objects properly. Luckily they do support the resize event.\n //So do not inject the object and notify that the element is already ready to be listened to.\n //The event handler for the resize event is attached in the utils.addListener instead.\n callback(element);\n } else {\n injectObject(element, callback);\n }\n }\n\n /**\n * Returns the child object of the target element.\n * @private\n * @param {element} element The target element.\n * @returns The object element of the target.\n */\n function getObject(element) {\n return getState(element).object;\n }\n\n function uninstall(element) {\n if (!getState(element)) {\n return;\n }\n\n var object = getObject(element);\n\n if (!object) {\n return;\n }\n\n if (browserDetector.isIE(8)) {\n element.detachEvent(\"onresize\", object.proxy);\n } else {\n element.removeChild(object);\n }\n\n if (getState(element).checkForObjectDocumentTimeoutId) {\n window.clearTimeout(getState(element).checkForObjectDocumentTimeoutId);\n }\n\n delete getState(element).object;\n }\n\n return {\n makeDetectable: makeDetectable,\n addListener: addListener,\n uninstall: uninstall\n };\n};\n","/**\n * Resize detection strategy that injects divs to elements in order to detect resize events on scroll events.\n * Heavily inspired by: https://github.com/marcj/css-element-queries/blob/master/src/ResizeSensor.js\n */\n\n\"use strict\";\n\nvar forEach = require(\"../collection-utils\").forEach;\n\nmodule.exports = function(options) {\n options = options || {};\n var reporter = options.reporter;\n var batchProcessor = options.batchProcessor;\n var getState = options.stateHandler.getState;\n var hasState = options.stateHandler.hasState;\n var idHandler = options.idHandler;\n\n if (!batchProcessor) {\n throw new Error(\"Missing required dependency: batchProcessor\");\n }\n\n if (!reporter) {\n throw new Error(\"Missing required dependency: reporter.\");\n }\n\n //TODO: Could this perhaps be done at installation time?\n var scrollbarSizes = getScrollbarSizes();\n\n var styleId = \"erd_scroll_detection_scrollbar_style\";\n var detectionContainerClass = \"erd_scroll_detection_container\";\n\n function initDocument(targetDocument) {\n // Inject the scrollbar styling that prevents them from appearing sometimes in Chrome.\n // The injected container needs to have a class, so that it may be styled with CSS (pseudo elements).\n injectScrollStyle(targetDocument, styleId, detectionContainerClass);\n }\n\n initDocument(window.document);\n\n function buildCssTextString(rules) {\n var seperator = options.important ? \" !important; \" : \"; \";\n\n return (rules.join(seperator) + seperator).trim();\n }\n\n function getScrollbarSizes() {\n var width = 500;\n var height = 500;\n\n var child = document.createElement(\"div\");\n child.style.cssText = buildCssTextString([\"position: absolute\", \"width: \" + width*2 + \"px\", \"height: \" + height*2 + \"px\", \"visibility: hidden\", \"margin: 0\", \"padding: 0\"]);\n\n var container = document.createElement(\"div\");\n container.style.cssText = buildCssTextString([\"position: absolute\", \"width: \" + width + \"px\", \"height: \" + height + \"px\", \"overflow: scroll\", \"visibility: none\", \"top: \" + -width*3 + \"px\", \"left: \" + -height*3 + \"px\", \"visibility: hidden\", \"margin: 0\", \"padding: 0\"]);\n\n container.appendChild(child);\n\n document.body.insertBefore(container, document.body.firstChild);\n\n var widthSize = width - container.clientWidth;\n var heightSize = height - container.clientHeight;\n\n document.body.removeChild(container);\n\n return {\n width: widthSize,\n height: heightSize\n };\n }\n\n function injectScrollStyle(targetDocument, styleId, containerClass) {\n function injectStyle(style, method) {\n method = method || function (element) {\n targetDocument.head.appendChild(element);\n };\n\n var styleElement = targetDocument.createElement(\"style\");\n styleElement.innerHTML = style;\n styleElement.id = styleId;\n method(styleElement);\n return styleElement;\n }\n\n if (!targetDocument.getElementById(styleId)) {\n var containerAnimationClass = containerClass + \"_animation\";\n var containerAnimationActiveClass = containerClass + \"_animation_active\";\n var style = \"/* Created by the element-resize-detector library. */\\n\";\n style += \".\" + containerClass + \" > div::-webkit-scrollbar { \" + buildCssTextString([\"display: none\"]) + \" }\\n\\n\";\n style += \".\" + containerAnimationActiveClass + \" { \" + buildCssTextString([\"-webkit-animation-duration: 0.1s\", \"animation-duration: 0.1s\", \"-webkit-animation-name: \" + containerAnimationClass, \"animation-name: \" + containerAnimationClass]) + \" }\\n\";\n style += \"@-webkit-keyframes \" + containerAnimationClass + \" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\\n\";\n style += \"@keyframes \" + containerAnimationClass + \" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\";\n injectStyle(style);\n }\n }\n\n function addAnimationClass(element) {\n element.className += \" \" + detectionContainerClass + \"_animation_active\";\n }\n\n function addEvent(el, name, cb) {\n if (el.addEventListener) {\n el.addEventListener(name, cb);\n } else if(el.attachEvent) {\n el.attachEvent(\"on\" + name, cb);\n } else {\n return reporter.error(\"[scroll] Don't know how to add event listeners.\");\n }\n }\n\n function removeEvent(el, name, cb) {\n if (el.removeEventListener) {\n el.removeEventListener(name, cb);\n } else if(el.detachEvent) {\n el.detachEvent(\"on\" + name, cb);\n } else {\n return reporter.error(\"[scroll] Don't know how to remove event listeners.\");\n }\n }\n\n function getExpandElement(element) {\n return getState(element).container.childNodes[0].childNodes[0].childNodes[0];\n }\n\n function getShrinkElement(element) {\n return getState(element).container.childNodes[0].childNodes[0].childNodes[1];\n }\n\n /**\n * Adds a resize event listener to the element.\n * @public\n * @param {element} element The element that should have the listener added.\n * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback.\n */\n function addListener(element, listener) {\n var listeners = getState(element).listeners;\n\n if (!listeners.push) {\n throw new Error(\"Cannot add listener to an element that is not detectable.\");\n }\n\n getState(element).listeners.push(listener);\n }\n\n /**\n * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes.\n * @private\n * @param {object} options Optional options object.\n * @param {element} element The element to make detectable\n * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter.\n */\n function makeDetectable(options, element, callback) {\n if (!callback) {\n callback = element;\n element = options;\n options = null;\n }\n\n options = options || {};\n\n function debug() {\n if (options.debug) {\n var args = Array.prototype.slice.call(arguments);\n args.unshift(idHandler.get(element), \"Scroll: \");\n if (reporter.log.apply) {\n reporter.log.apply(null, args);\n } else {\n for (var i = 0; i < args.length; i++) {\n reporter.log(args[i]);\n }\n }\n }\n }\n\n function isDetached(element) {\n function isInDocument(element) {\n var isInShadowRoot = element.getRootNode && element.getRootNode().contains(element);\n return element === element.ownerDocument.body || element.ownerDocument.body.contains(element) || isInShadowRoot;\n }\n\n if (!isInDocument(element)) {\n return true;\n }\n\n // FireFox returns null style in hidden iframes. See https://github.com/wnr/element-resize-detector/issues/68 and https://bugzilla.mozilla.org/show_bug.cgi?id=795520\n if (window.getComputedStyle(element) === null) {\n return true;\n }\n\n return false;\n }\n\n function isUnrendered(element) {\n // Check the absolute positioned container since the top level container is display: inline.\n var container = getState(element).container.childNodes[0];\n var style = window.getComputedStyle(container);\n return !style.width || style.width.indexOf(\"px\") === -1; //Can only compute pixel value when rendered.\n }\n\n function getStyle() {\n // Some browsers only force layouts when actually reading the style properties of the style object, so make sure that they are all read here,\n // so that the user of the function can be sure that it will perform the layout here, instead of later (important for batching).\n var elementStyle = window.getComputedStyle(element);\n var style = {};\n style.position = elementStyle.position;\n style.width = element.offsetWidth;\n style.height = element.offsetHeight;\n style.top = elementStyle.top;\n style.right = elementStyle.right;\n style.bottom = elementStyle.bottom;\n style.left = elementStyle.left;\n style.widthCSS = elementStyle.width;\n style.heightCSS = elementStyle.height;\n return style;\n }\n\n function storeStartSize() {\n var style = getStyle();\n getState(element).startSize = {\n width: style.width,\n height: style.height\n };\n debug(\"Element start size\", getState(element).startSize);\n }\n\n function initListeners() {\n getState(element).listeners = [];\n }\n\n function storeStyle() {\n debug(\"storeStyle invoked.\");\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n\n var style = getStyle();\n getState(element).style = style;\n }\n\n function storeCurrentSize(element, width, height) {\n getState(element).lastWidth = width;\n getState(element).lastHeight = height;\n }\n\n function getExpandChildElement(element) {\n return getExpandElement(element).childNodes[0];\n }\n\n function getWidthOffset() {\n return 2 * scrollbarSizes.width + 1;\n }\n\n function getHeightOffset() {\n return 2 * scrollbarSizes.height + 1;\n }\n\n function getExpandWidth(width) {\n return width + 10 + getWidthOffset();\n }\n\n function getExpandHeight(height) {\n return height + 10 + getHeightOffset();\n }\n\n function getShrinkWidth(width) {\n return width * 2 + getWidthOffset();\n }\n\n function getShrinkHeight(height) {\n return height * 2 + getHeightOffset();\n }\n\n function positionScrollbars(element, width, height) {\n var expand = getExpandElement(element);\n var shrink = getShrinkElement(element);\n var expandWidth = getExpandWidth(width);\n var expandHeight = getExpandHeight(height);\n var shrinkWidth = getShrinkWidth(width);\n var shrinkHeight = getShrinkHeight(height);\n expand.scrollLeft = expandWidth;\n expand.scrollTop = expandHeight;\n shrink.scrollLeft = shrinkWidth;\n shrink.scrollTop = shrinkHeight;\n }\n\n function injectContainerElement() {\n var container = getState(element).container;\n\n if (!container) {\n container = document.createElement(\"div\");\n container.className = detectionContainerClass;\n container.style.cssText = buildCssTextString([\"visibility: hidden\", \"display: inline\", \"width: 0px\", \"height: 0px\", \"z-index: -1\", \"overflow: hidden\", \"margin: 0\", \"padding: 0\"]);\n getState(element).container = container;\n addAnimationClass(container);\n element.appendChild(container);\n\n var onAnimationStart = function () {\n getState(element).onRendered && getState(element).onRendered();\n };\n\n addEvent(container, \"animationstart\", onAnimationStart);\n\n // Store the event handler here so that they may be removed when uninstall is called.\n // See uninstall function for an explanation why it is needed.\n getState(element).onAnimationStart = onAnimationStart;\n }\n\n return container;\n }\n\n function injectScrollElements() {\n function alterPositionStyles() {\n var style = getState(element).style;\n\n if(style.position === \"static\") {\n element.style.setProperty(\"position\", \"relative\",options.important ? \"important\" : \"\");\n\n var removeRelativeStyles = function(reporter, element, style, property) {\n function getNumericalValue(value) {\n return value.replace(/[^-\\d\\.]/g, \"\");\n }\n\n var value = style[property];\n\n if(value !== \"auto\" && getNumericalValue(value) !== \"0\") {\n reporter.warn(\"An element that is positioned static has style.\" + property + \"=\" + value + \" which is ignored due to the static positioning. The element will need to be positioned relative, so the style.\" + property + \" will be set to 0. Element: \", element);\n element.style[property] = 0;\n }\n };\n\n //Check so that there are no accidental styles that will make the element styled differently now that is is relative.\n //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway).\n removeRelativeStyles(reporter, element, style, \"top\");\n removeRelativeStyles(reporter, element, style, \"right\");\n removeRelativeStyles(reporter, element, style, \"bottom\");\n removeRelativeStyles(reporter, element, style, \"left\");\n }\n }\n\n function getLeftTopBottomRightCssText(left, top, bottom, right) {\n left = (!left ? \"0\" : (left + \"px\"));\n top = (!top ? \"0\" : (top + \"px\"));\n bottom = (!bottom ? \"0\" : (bottom + \"px\"));\n right = (!right ? \"0\" : (right + \"px\"));\n\n return [\"left: \" + left, \"top: \" + top, \"right: \" + right, \"bottom: \" + bottom];\n }\n\n debug(\"Injecting elements\");\n\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n\n alterPositionStyles();\n\n var rootContainer = getState(element).container;\n\n if (!rootContainer) {\n rootContainer = injectContainerElement();\n }\n\n // Due to this WebKit bug https://bugs.webkit.org/show_bug.cgi?id=80808 (currently fixed in Blink, but still present in WebKit browsers such as Safari),\n // we need to inject two containers, one that is width/height 100% and another that is left/top -1px so that the final container always is 1x1 pixels bigger than\n // the targeted element.\n // When the bug is resolved, \"containerContainer\" may be removed.\n\n // The outer container can occasionally be less wide than the targeted when inside inline elements element in WebKit (see https://bugs.webkit.org/show_bug.cgi?id=152980).\n // This should be no problem since the inner container either way makes sure the injected scroll elements are at least 1x1 px.\n\n var scrollbarWidth = scrollbarSizes.width;\n var scrollbarHeight = scrollbarSizes.height;\n var containerContainerStyle = buildCssTextString([\"position: absolute\", \"flex: none\", \"overflow: hidden\", \"z-index: -1\", \"visibility: hidden\", \"width: 100%\", \"height: 100%\", \"left: 0px\", \"top: 0px\"]);\n var containerStyle = buildCssTextString([\"position: absolute\", \"flex: none\", \"overflow: hidden\", \"z-index: -1\", \"visibility: hidden\"].concat(getLeftTopBottomRightCssText(-(1 + scrollbarWidth), -(1 + scrollbarHeight), -scrollbarHeight, -scrollbarWidth)));\n var expandStyle = buildCssTextString([\"position: absolute\", \"flex: none\", \"overflow: scroll\", \"z-index: -1\", \"visibility: hidden\", \"width: 100%\", \"height: 100%\"]);\n var shrinkStyle = buildCssTextString([\"position: absolute\", \"flex: none\", \"overflow: scroll\", \"z-index: -1\", \"visibility: hidden\", \"width: 100%\", \"height: 100%\"]);\n var expandChildStyle = buildCssTextString([\"position: absolute\", \"left: 0\", \"top: 0\"]);\n var shrinkChildStyle = buildCssTextString([\"position: absolute\", \"width: 200%\", \"height: 200%\"]);\n\n var containerContainer = document.createElement(\"div\");\n var container = document.createElement(\"div\");\n var expand = document.createElement(\"div\");\n var expandChild = document.createElement(\"div\");\n var shrink = document.createElement(\"div\");\n var shrinkChild = document.createElement(\"div\");\n\n // Some browsers choke on the resize system being rtl, so force it to ltr. https://github.com/wnr/element-resize-detector/issues/56\n // However, dir should not be set on the top level container as it alters the dimensions of the target element in some browsers.\n containerContainer.dir = \"ltr\";\n\n containerContainer.style.cssText = containerContainerStyle;\n containerContainer.className = detectionContainerClass;\n container.className = detectionContainerClass;\n container.style.cssText = containerStyle;\n expand.style.cssText = expandStyle;\n expandChild.style.cssText = expandChildStyle;\n shrink.style.cssText = shrinkStyle;\n shrinkChild.style.cssText = shrinkChildStyle;\n\n expand.appendChild(expandChild);\n shrink.appendChild(shrinkChild);\n container.appendChild(expand);\n container.appendChild(shrink);\n containerContainer.appendChild(container);\n rootContainer.appendChild(containerContainer);\n\n function onExpandScroll() {\n var state = getState(element);\n if (state && state.onExpand) {\n state.onExpand();\n } else {\n debug(\"Aborting expand scroll handler: element has been uninstalled\");\n }\n }\n\n function onShrinkScroll() {\n var state = getState(element);\n if (state && state.onShrink) {\n state.onShrink();\n } else {\n debug(\"Aborting shrink scroll handler: element has been uninstalled\");\n }\n }\n\n addEvent(expand, \"scroll\", onExpandScroll);\n addEvent(shrink, \"scroll\", onShrinkScroll);\n\n // Store the event handlers here so that they may be removed when uninstall is called.\n // See uninstall function for an explanation why it is needed.\n getState(element).onExpandScroll = onExpandScroll;\n getState(element).onShrinkScroll = onShrinkScroll;\n }\n\n function registerListenersAndPositionElements() {\n function updateChildSizes(element, width, height) {\n var expandChild = getExpandChildElement(element);\n var expandWidth = getExpandWidth(width);\n var expandHeight = getExpandHeight(height);\n expandChild.style.setProperty(\"width\", expandWidth + \"px\", options.important ? \"important\" : \"\");\n expandChild.style.setProperty(\"height\", expandHeight + \"px\", options.important ? \"important\" : \"\");\n }\n\n function updateDetectorElements(done) {\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n // Check whether the size has actually changed since last time the algorithm ran. If not, some steps may be skipped.\n var sizeChanged = width !== getState(element).lastWidth || height !== getState(element).lastHeight;\n\n debug(\"Storing current size\", width, height);\n\n // Store the size of the element sync here, so that multiple scroll events may be ignored in the event listeners.\n // Otherwise the if-check in handleScroll is useless.\n storeCurrentSize(element, width, height);\n\n // Since we delay the processing of the batch, there is a risk that uninstall has been called before the batch gets to execute.\n // Since there is no way to cancel the fn executions, we need to add an uninstall guard to all fns of the batch.\n\n batchProcessor.add(0, function performUpdateChildSizes() {\n if (!sizeChanged) {\n return;\n }\n\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n\n if (!areElementsInjected()) {\n debug(\"Aborting because element container has not been initialized\");\n return;\n }\n\n if (options.debug) {\n var w = element.offsetWidth;\n var h = element.offsetHeight;\n\n if (w !== width || h !== height) {\n reporter.warn(idHandler.get(element), \"Scroll: Size changed before updating detector elements.\");\n }\n }\n\n updateChildSizes(element, width, height);\n });\n\n batchProcessor.add(1, function updateScrollbars() {\n // This function needs to be invoked event though the size is unchanged. The element could have been resized very quickly and then\n // been restored to the original size, which will have changed the scrollbar positions.\n\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n\n if (!areElementsInjected()) {\n debug(\"Aborting because element container has not been initialized\");\n return;\n }\n\n positionScrollbars(element, width, height);\n });\n\n if (sizeChanged && done) {\n batchProcessor.add(2, function () {\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n\n if (!areElementsInjected()) {\n debug(\"Aborting because element container has not been initialized\");\n return;\n }\n\n done();\n });\n }\n }\n\n function areElementsInjected() {\n return !!getState(element).container;\n }\n\n function notifyListenersIfNeeded() {\n function isFirstNotify() {\n return getState(element).lastNotifiedWidth === undefined;\n }\n\n debug(\"notifyListenersIfNeeded invoked\");\n\n var state = getState(element);\n\n // Don't notify if the current size is the start size, and this is the first notification.\n if (isFirstNotify() && state.lastWidth === state.startSize.width && state.lastHeight === state.startSize.height) {\n return debug(\"Not notifying: Size is the same as the start size, and there has been no notification yet.\");\n }\n\n // Don't notify if the size already has been notified.\n if (state.lastWidth === state.lastNotifiedWidth && state.lastHeight === state.lastNotifiedHeight) {\n return debug(\"Not notifying: Size already notified\");\n }\n\n\n debug(\"Current size not notified, notifying...\");\n state.lastNotifiedWidth = state.lastWidth;\n state.lastNotifiedHeight = state.lastHeight;\n forEach(getState(element).listeners, function (listener) {\n listener(element);\n });\n }\n\n function handleRender() {\n debug(\"startanimation triggered.\");\n\n if (isUnrendered(element)) {\n debug(\"Ignoring since element is still unrendered...\");\n return;\n }\n\n debug(\"Element rendered.\");\n var expand = getExpandElement(element);\n var shrink = getShrinkElement(element);\n if (expand.scrollLeft === 0 || expand.scrollTop === 0 || shrink.scrollLeft === 0 || shrink.scrollTop === 0) {\n debug(\"Scrollbars out of sync. Updating detector elements...\");\n updateDetectorElements(notifyListenersIfNeeded);\n }\n }\n\n function handleScroll() {\n debug(\"Scroll detected.\");\n\n if (isUnrendered(element)) {\n // Element is still unrendered. Skip this scroll event.\n debug(\"Scroll event fired while unrendered. Ignoring...\");\n return;\n }\n\n updateDetectorElements(notifyListenersIfNeeded);\n }\n\n debug(\"registerListenersAndPositionElements invoked.\");\n\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n\n getState(element).onRendered = handleRender;\n getState(element).onExpand = handleScroll;\n getState(element).onShrink = handleScroll;\n\n var style = getState(element).style;\n updateChildSizes(element, style.width, style.height);\n }\n\n function finalizeDomMutation() {\n debug(\"finalizeDomMutation invoked.\");\n\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n\n var style = getState(element).style;\n storeCurrentSize(element, style.width, style.height);\n positionScrollbars(element, style.width, style.height);\n }\n\n function ready() {\n callback(element);\n }\n\n function install() {\n debug(\"Installing...\");\n initListeners();\n storeStartSize();\n\n batchProcessor.add(0, storeStyle);\n batchProcessor.add(1, injectScrollElements);\n batchProcessor.add(2, registerListenersAndPositionElements);\n batchProcessor.add(3, finalizeDomMutation);\n batchProcessor.add(4, ready);\n }\n\n debug(\"Making detectable...\");\n\n if (isDetached(element)) {\n debug(\"Element is detached\");\n\n injectContainerElement();\n\n debug(\"Waiting until element is attached...\");\n\n getState(element).onRendered = function () {\n debug(\"Element is now attached\");\n install();\n };\n } else {\n install();\n }\n }\n\n function uninstall(element) {\n var state = getState(element);\n\n if (!state) {\n // Uninstall has been called on a non-erd element.\n return;\n }\n\n // Uninstall may have been called in the following scenarios:\n // (1) Right between the sync code and async batch (here state.busy = true, but nothing have been registered or injected).\n // (2) In the ready callback of the last level of the batch by another element (here, state.busy = true, but all the stuff has been injected).\n // (3) After the installation process (here, state.busy = false and all the stuff has been injected).\n // So to be on the safe side, let's check for each thing before removing.\n\n // We need to remove the event listeners, because otherwise the event might fire on an uninstall element which results in an error when trying to get the state of the element.\n state.onExpandScroll && removeEvent(getExpandElement(element), \"scroll\", state.onExpandScroll);\n state.onShrinkScroll && removeEvent(getShrinkElement(element), \"scroll\", state.onShrinkScroll);\n state.onAnimationStart && removeEvent(state.container, \"animationstart\", state.onAnimationStart);\n\n state.container && element.removeChild(state.container);\n }\n\n return {\n makeDetectable: makeDetectable,\n addListener: addListener,\n uninstall: uninstall,\n initDocument: initDocument\n };\n};\n","const regexEscape = /[$()*+./?[\\\\\\]^{|}-]/g\nexport function escapeRegExp(string) {\n if (string) {\n return string.replace(regexEscape, \"\\\\$&\")\n } else {\n return \"\"\n }\n}\n\nconst regexDaherize = /([A-Z])|(_)/g\nexport function dasherize(string) {\n if (!string) {\n return \"\"\n }\n\n string = `${string[0].toLowerCase()}${string.slice(1)}`\n return string.replace(regexDaherize, function (m, letter) {\n if (letter) {\n return `-${letter.toLowerCase()}`\n } else {\n return \"-\"\n }\n })\n}\n\nexport function debounce(callback, wait) {\n let timeoutId\n return (...args) => {\n if (timeoutId !== undefined) {\n clearTimeout(timeoutId)\n }\n timeoutId = setTimeout(() => {\n callback(...args)\n }, wait)\n }\n}\n","\"use strict\"\n\nimport { Emitter } from \"atom\"\n\nlet idCounter = 0\nconst nextId = function () {\n return idCounter++\n}\n\n/**\n * The `Decoration` class represents a decoration in the Minimap.\n *\n * It has the same API than the `Decoration` class of a text editor.\n */\nexport default class Decoration {\n /**\n * Returns `true` if the passed-in decoration properties matches the specified type.\n *\n * @param {Object} decorationProperties The decoration properties to match\n * @param {string} type The decoration type to match\n * @returns {boolean} Whether the decoration properties match the type\n */\n static isType(decorationProperties, type) {\n if (Array.isArray(decorationProperties.type)) {\n if (decorationProperties.type.indexOf(type) >= 0) {\n return true\n }\n return false\n } else {\n return type === decorationProperties.type\n }\n }\n\n /**\n * Creates a new decoration.\n *\n * @param {Marker} marker The target marker for the decoration\n * @param {Minimap} minimap The Minimap where the decoration will be displayed\n * @param {Object} properties The decoration's properties\n */\n constructor(marker, minimap, properties) {\n /** @access private */\n this.marker = marker\n /** @access private */\n this.minimap = minimap\n /** @access private */\n this.emitter = new Emitter()\n /** @access private */\n this.id = nextId()\n /** @access private */\n this.properties = null\n this.setProperties(properties)\n this.properties.id = this.id\n /** @access private */\n this.destroyed = false\n /** @access private */\n this.markerDestroyDisposable = this.marker.onDidDestroy(() => {\n this.destroy()\n })\n\n this.screenRange = marker.getScreenRange()\n }\n\n /**\n * Destroy this marker.\n *\n * If you own the marker, you should use `Marker#destroy` which will destroy this decoration.\n */\n destroy() {\n if (this.destroyed) {\n return\n }\n\n this.markerDestroyDisposable?.dispose?.()\n this.destroyed = true\n this.emitter.emit(\"did-destroy\")\n this.emitter.dispose()\n }\n\n /**\n * Returns whether this decoration is destroyed or not.\n *\n * @returns {boolean} Whether this decoration is destroyed or not\n */\n isDestroyed() {\n return this.destroyed\n }\n\n /**\n * Registers an event listener to the `did-change-properties` event.\n *\n * This event is triggered when the decoration update method is called.\n *\n * @param {function(change:Object):void} callback A function to call when the event is triggered\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChangeProperties(callback) {\n if (this.destroyed) {\n return\n }\n return this.emitter.on(\"did-change-properties\", callback)\n }\n\n /**\n * Registers an event listener to the `did-destroy` event.\n *\n * @param {function():void} callback A function to call when the event is triggered\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidDestroy(callback) {\n if (this.destroyed) {\n return\n }\n return this.emitter.on(\"did-destroy\", callback)\n }\n\n /**\n * An id unique across all Decoration objects.\n *\n * @returns {number} The decoration id\n */\n getId() {\n return this.id\n }\n\n /**\n * Returns the marker associated with this Decoration.\n *\n * @returns {Marker} The decoration's marker\n */\n getMarker() {\n return this.marker\n }\n\n /**\n * Check if this decoration is of type `type`.\n *\n * @param {string | Array} type A type like `'line-number'`, `'line'`, etc. `type` can also be an Array of Strings,\n * where it will return true if the decoration's type matches any in the array.\n * @returns {boolean} Whether this decoration match the passed-in type\n */\n isType(type) {\n return Decoration.isType(this.properties, type)\n }\n\n /**\n * Returns the Decoration's properties.\n *\n * @returns {Object} The decoration's properties\n */\n getProperties() {\n return this.properties\n }\n\n /**\n * Update the marker with new properties. Allows you to change the decoration's class.\n *\n * @param {Object} newProperties The new properties for the decoration\n */\n setProperties(newProperties) {\n if (this.destroyed) {\n return\n }\n\n const oldProperties = this.properties\n this.properties = newProperties\n this.properties.id = this.id\n\n this.emitter.emit(\"did-change-properties\", { oldProperties, newProperties })\n }\n}\n","\"use strict\"\n\nimport { Emitter } from \"atom\"\nimport { escapeRegExp } from \"./deps/underscore-plus\"\nimport path from \"path\"\nimport Decoration from \"./decoration\"\n\n/**\n * The mixin that provides the decorations API to the minimap editor view.\n *\n * This mixin is injected into the `Minimap` prototype, so every methods defined in this file will be available on any\n * `Minimap` instance.\n */\nexport default class DecorationManagement {\n /** Initializes the decorations related properties. */\n initializeDecorations(minimap) {\n this.minimap = minimap\n\n if (this.emitter == null) {\n /**\n * The minimap emitter, lazily created if not created yet.\n *\n * @type {Emitter}\n * @access private\n */\n this.emitter = new Emitter()\n } else {\n this.emitter = this.minimap.emitter\n }\n\n /**\n * A map with the decoration id as key and the decoration as value.\n *\n * @type {Object}\n * @access private\n */\n this.decorationsById = new Map()\n /**\n * The decorations stored in an array indexed with their marker id.\n *\n * @type {Object}\n * @access private\n */\n this.decorationsByMarkerId = new Map()\n /**\n * The subscriptions to the markers `did-change` event indexed using the marker id.\n *\n * @type {Object}\n * @access private\n */\n this.decorationMarkerChangedSubscriptions = new Map()\n /**\n * The subscriptions to the markers `did-destroy` event indexed using the marker id.\n *\n * @type {Object}\n * @access private\n */\n this.decorationMarkerDestroyedSubscriptions = new Map()\n /**\n * The subscriptions to the decorations `did-change-properties` event indexed using the decoration id.\n *\n * @type {Object}\n * @access private\n */\n this.decorationUpdatedSubscriptions = new Map()\n /**\n * The subscriptions to the decorations `did-destroy` event indexed using the decoration id.\n *\n * @type {Object}\n * @access private\n */\n this.decorationDestroyedSubscriptions = new Map()\n\n // is set to true when a minimapElement is destroyed\n this.destroyed = false\n }\n\n /**\n * Returns all the decorations registered in the current `Minimap`.\n *\n * @returns {Decoration[]} All the decorations in this `Minimap`\n */\n getDecorations() {\n return [...this.decorationsById.values()]\n }\n\n /**\n * Registers an event listener to the `did-add-decoration` event.\n *\n * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be\n * called with an event object with the following properties:\n *\n * - Marker: the marker object that was decorated\n * - Decoration: the decoration object that was created\n *\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidAddDecoration(callback) {\n return this.emitter.on(\"did-add-decoration\", callback)\n }\n\n /**\n * Registers an event listener to the `did-remove-decoration` event.\n *\n * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be\n * called with an event object with the following properties:\n *\n * - Marker: the marker object that was decorated\n * - Decoration: the decoration object that was created\n *\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidRemoveDecoration(callback) {\n return this.emitter.on(\"did-remove-decoration\", callback)\n }\n\n /**\n * Registers an event listener to the `did-change-decoration` event.\n *\n * This event is triggered when the marker targeted by the decoration was changed.\n *\n * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be\n * called with an event object with the following properties:\n *\n * - Marker: the marker object that was decorated\n * - Decoration: the decoration object that was created\n *\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChangeDecoration(callback) {\n return this.emitter.on(\"did-change-decoration\", callback)\n }\n\n /**\n * Registers an event listener to the `did-change-decoration-range` event.\n *\n * This event is triggered when the marker range targeted by the decoration was changed.\n *\n * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be\n * called with an event object with the following properties:\n *\n * - Marker: the marker object that was decorated\n * - Decoration: the decoration object that was created\n *\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChangeDecorationRange(callback) {\n return this.emitter.on(\"did-change-decoration-range\", callback)\n }\n\n /**\n * Registers an event listener to the `did-update-decoration` event.\n *\n * This event is triggered when the decoration itself is modified.\n *\n * @param {function(decoration:Decoration):void} callback A function to call when the event is triggered\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidUpdateDecoration(callback) {\n return this.emitter.on(\"did-update-decoration\", callback)\n }\n\n /**\n * Returns the decoration with the passed-in id.\n *\n * @param {number} id The decoration id\n * @returns {Decoration} The decoration with the given id\n */\n decorationForId(id) {\n return this.decorationsById.get(id)\n }\n\n /**\n * Returns all the decorations that intersect the passed-in row range.\n *\n * @param {number} startScreenRow The first row of the range\n * @param {number} endScreenRow The last row of the range\n * @returns {Record} The decorations that intersect the passed-in range\n */\n decorationsForScreenRowRange(startScreenRow, endScreenRow) {\n const decorationsByMarkerId = {}\n const markers = this.findMarkers({\n intersectsScreenRowRange: [startScreenRow, endScreenRow],\n })\n\n for (let i = 0, len = markers.length; i < len; i++) {\n const marker = markers[i]\n const decorations = this.decorationsByMarkerId.get(marker.id)\n\n if (decorations !== undefined) {\n decorationsByMarkerId[marker.id] = decorations\n }\n }\n\n return decorationsByMarkerId\n }\n\n /**\n * Returns the decorations that intersects the passed-in row range in a structured way.\n *\n * At the first level, the keys are the available decoration types. At the second level, the keys are the row index\n * for which there are decorations available. The value is an array containing the decorations that intersects with\n * the corresponding row.\n *\n * @property {Object} line All the line decorations by row\n * @property {Decoration[]} line[row] All the line decorations at a given row\n * @property {Object} highlight-under All the highlight-under decorations by row\n * @property {Decoration[]} highlight-under[row] All the highlight-under decorations at a given row\n * @property {Object} highlight-over All the highlight-over decorations by row\n * @property {Decoration[]} highlight-over[row] All the highlight-over decorations at a given row\n * @property {Object} highlight-outine All the highlight-outine decorations by row\n * @property {Decoration[]} highlight-outine[row] All the highlight-outine decorations at a given row\n * @returns {Object} The decorations grouped by type and then rows\n */\n decorationsByTypeThenRows() {\n if (this.decorationsByTypeThenRowsCache != null) {\n return this.decorationsByTypeThenRowsCache\n }\n\n const cache = {}\n\n const decorations = this.decorationsById.values()\n for (const decoration of decorations) {\n const range = decoration.marker.getScreenRange()\n const type = decoration.getProperties().type\n\n if (cache[type] == null) {\n cache[type] = {}\n }\n\n for (let row = range.start.row, len = range.end.row; row <= len; row++) {\n if (cache[type][row] == null) {\n cache[type][row] = []\n }\n\n cache[type][row].push(decoration)\n }\n }\n\n /**\n * The grouped decorations cache.\n *\n * @type {Object}\n * @access private\n */\n this.decorationsByTypeThenRowsCache = cache\n return cache\n }\n\n /** Invalidates the decoration by screen rows cache. */\n invalidateDecorationForScreenRowsCache() {\n this.decorationsByTypeThenRowsCache = null\n }\n\n /**\n * Adds a decoration that tracks a `Marker`. When the marker moves, is invalidated, or is destroyed, the decoration\n * will be updated to reflect the marker's state.\n *\n * @fires {did-add-decoration} when The decoration is created successfully\n * @fires {did-change} when The decoration is created successfully\n * @param {Marker} marker The marker you want this decoration to follow\n * @param {Object} decorationParams The decoration properties\n * @param {string} decorationParams.type The decoration type in the following list:\n *\n * - **line**: Fills the line background with the decoration color.\n * - **highlight**: Renders a colored rectangle on the minimap. The highlight is rendered above the line's text.\n * - **highlight-over**: Same as **highlight**.\n * - **highlight-under**: Renders a colored rectangle on the minimap. The highlight is rendered below the line's text.\n * - **highlight-outline**: Renders a colored outline on the minimap. The highlight box is rendered above the line's text.\n * - **foreground-custom**: A decoration type for which you have the control over the render routine. Note that your\n * routine should implement a render on a per-line basis to avoid any side-effect with the offset bitmap cache\n * mechanism. These decorations are rendred on the foreground decorations layer.\n * - **background-custom**: A decoration type for which you have the control over the render routine. Note that your\n * routine should implement a render on a per-line basis to avoid any side-effect with the offset bitmap cache\n * mechanism. These decorations are rendred on the background decorations layer.\n *\n * @param {string} [decorationParams.class] The CSS class to use to retrieve the background color of the decoration by\n * building a scop corresponding to `.minimap .editor `\n * @param {string} [decorationParams.scope] The scope to use to retrieve the decoration background. Note that if the\n * `scope` property is set, the `class` won't be used.\n * @param {string} [decorationParams.color] The CSS color to use to render the decoration. When set, neither `scope`\n * nor `class` are used.\n * @param {string} [decorationParams.plugin] The name of the plugin that created this decoration. It'll be used to\n * order the decorations on the same layer and that are overlapping. If the parameter is omitted the Minimap will\n * attempt to infer the plugin origin from the path of the caller function.\n * @param {function} [decorationParams.render] The render routine for custom decorations. The function receives the\n * decoration and the render data for the current render pass.\n * @returns {Decoration} The created decoration\n */\n decorateMarker(marker, decorationParams) {\n if (this.destroyed || this.minimap.destroyed || marker == null) {\n return\n }\n\n const { id } = marker\n\n if (decorationParams.type === \"highlight\") {\n decorationParams.type = \"highlight-over\"\n }\n\n const { type, plugin } = decorationParams\n\n if (plugin == null) {\n decorationParams.plugin = getOriginatorPackageName()\n }\n\n if (decorationParams.scope == null && decorationParams.class != null) {\n const cls = decorationParams.class.split(\" \").join(\".\")\n decorationParams.scope = `.minimap .${cls}`\n }\n\n if (!this.decorationMarkerDestroyedSubscriptions.has(id)) {\n this.decorationMarkerDestroyedSubscriptions.set(\n id,\n marker.onDidDestroy(() => {\n this.removeAllDecorationsForMarker(marker)\n })\n )\n }\n\n if (!this.decorationMarkerChangedSubscriptions.has(id)) {\n this.decorationMarkerChangedSubscriptions.set(\n id,\n marker.onDidChange((event) => {\n const decorations = this.decorationsByMarkerId.get(id)\n const screenRange = marker.getScreenRange()\n\n this.invalidateDecorationForScreenRowsCache()\n\n if (decorations !== undefined) {\n for (let i = 0, len = decorations.length; i < len; i++) {\n const decoration = decorations[i]\n this.emitter.emit(\"did-change-decoration\", {\n marker,\n decoration,\n event,\n })\n this.emitDecorationChanges(decoration.type, decoration)\n\n decoration.screenRange = screenRange\n }\n }\n let oldStart = event.oldTailScreenPosition\n let oldEnd = event.oldHeadScreenPosition\n let newStart = event.newTailScreenPosition\n let newEnd = event.newHeadScreenPosition\n\n if (oldStart.row > oldEnd.row) {\n ;[oldStart, oldEnd] = [oldEnd, oldStart]\n }\n if (newStart.row > newEnd.row) {\n ;[newStart, newEnd] = [newEnd, newStart]\n }\n\n const rangesDiffs = computeRangesDiffs(oldStart, oldEnd, newStart, newEnd)\n\n for (let i = 0, len = rangesDiffs.length; i < len; i++) {\n const [start, end] = rangesDiffs[i]\n this.emitRangeChanges(\n type,\n {\n start,\n end,\n },\n 0\n )\n }\n })\n )\n }\n\n const decoration = new Decoration(marker, this, decorationParams)\n\n if (!this.decorationsByMarkerId.has(id)) {\n this.decorationsByMarkerId.set(id, [])\n }\n\n this.decorationsByMarkerId.get(id).push(decoration)\n this.decorationsById.set(decoration.id, decoration)\n\n if (!this.decorationUpdatedSubscriptions.has(decoration.id)) {\n this.decorationUpdatedSubscriptions.set(\n decoration.id,\n decoration.onDidChangeProperties((event) => {\n this.emitDecorationChanges(type, decoration)\n })\n )\n }\n\n this.decorationDestroyedSubscriptions.set(\n decoration.id,\n decoration.onDidDestroy(() => {\n this.removeDecoration(decoration)\n })\n )\n\n this.emitDecorationChanges(type, decoration)\n this.emitter.emit(\"did-add-decoration\", {\n marker,\n decoration,\n })\n\n return decoration\n }\n\n /**\n * Emits a change in the `Minimap` corresponding to the passed-in decoration.\n *\n * @param {string} type The type of decoration that changed\n * @param {Decoration} decoration The decoration for which emitting an event\n * @access private\n */\n emitDecorationChanges(type, decoration) {\n if (this.destroyed || this.minimap.editorDestroyed()) {\n return\n }\n\n this.invalidateDecorationForScreenRowsCache()\n\n const range = decoration.screenRange\n if (!range.start || !range.end) {\n return\n }\n\n this.emitRangeChanges(type, range, 0)\n }\n\n /**\n * Emits a change for the specified range.\n *\n * @param {string} type The type of decoration that changed\n * @param {Object} range The range where changes occured\n * @param {number} [screenDelta] An optional screen delta for the change object\n * @access private\n */\n emitRangeChanges(type, range, screenDelta) {\n const startScreenRow = range.start.row\n const endScreenRow = range.end.row\n const lastRenderedScreenRow = this.minimap.getLastVisibleScreenRow()\n const firstRenderedScreenRow = this.minimap.getFirstVisibleScreenRow()\n\n if (screenDelta == null) {\n screenDelta = lastRenderedScreenRow - firstRenderedScreenRow - (endScreenRow - startScreenRow)\n }\n\n const changeEvent = {\n start: startScreenRow,\n end: endScreenRow,\n screenDelta,\n type,\n }\n\n this.emitter.emit(\"did-change-decoration-range\", changeEvent)\n }\n\n /**\n * Removes a `Decoration` from this minimap.\n *\n * @fires {did-change} when The decoration is removed\n * @fires {did-remove-decoration} when The decoration is removed\n * @param {Decoration} decoration The decoration to remove\n */\n removeDecoration(decoration) {\n if (decoration == null) {\n return\n }\n\n const marker = decoration.marker\n let subscription\n\n this.decorationsById.delete(decoration.id)\n\n subscription = this.decorationUpdatedSubscriptions.get(decoration.id)\n if (subscription !== undefined) {\n subscription.dispose()\n }\n\n subscription = this.decorationDestroyedSubscriptions.get(decoration.id)\n if (subscription !== undefined) {\n subscription.dispose()\n }\n\n this.decorationUpdatedSubscriptions.delete(decoration.id)\n this.decorationDestroyedSubscriptions.delete(decoration.id)\n\n const decorations = this.decorationsByMarkerId.get(marker.id)\n if (decorations === undefined) {\n return\n }\n\n this.emitDecorationChanges(decoration.getProperties().type, decoration)\n\n const index = decorations.indexOf(decoration)\n if (index > -1) {\n decorations.splice(index, 1)\n\n this.emitter.emit(\"did-remove-decoration\", {\n marker,\n decoration,\n })\n\n if (decorations.length === 0) {\n this.removedAllMarkerDecorations(marker)\n }\n }\n }\n\n /**\n * Removes all the decorations registered for the passed-in marker.\n *\n * @fires {did-change} when A decoration have been removed\n * @fires {did-remove-decoration} when A decoration have been removed\n * @param {Marker} marker The marker for which removing its decorations\n */\n removeAllDecorationsForMarker(marker) {\n if (marker == null) {\n return\n }\n\n const decorations = this.decorationsByMarkerId.get(marker.id)\n if (decorations === undefined) {\n return\n }\n\n for (let i = 0, len = decorations.length; i < len; i++) {\n const decoration = decorations[i]\n\n if (!this.destroyed && !this.minimap.editorDestroyed()) {\n this.emitDecorationChanges(decoration.getProperties().type, decoration)\n }\n this.emitter.emit(\"did-remove-decoration\", {\n marker,\n decoration,\n })\n }\n\n this.removedAllMarkerDecorations(marker)\n }\n\n /**\n * Performs the removal of a decoration for a given marker.\n *\n * @param {Marker} marker The marker for which removing decorations\n * @access private\n */\n removedAllMarkerDecorations(marker) {\n if (marker == null) {\n return\n }\n\n this.decorationMarkerChangedSubscriptions.get(marker.id).dispose()\n this.decorationMarkerDestroyedSubscriptions.get(marker.id).dispose()\n\n this.decorationsByMarkerId.delete(marker.id)\n this.decorationMarkerChangedSubscriptions.delete(marker.id)\n this.decorationMarkerDestroyedSubscriptions.delete(marker.id)\n }\n\n /** Removes all the decorations that was created in the current `Minimap`. */\n removeAllDecorations() {\n const decorationMarkerChangedSubscriptionsValues = this.decorationMarkerChangedSubscriptions.values()\n for (const decoration of decorationMarkerChangedSubscriptionsValues) {\n decoration.dispose()\n }\n\n const decorationMarkerDestroyedSubscriptionsValues = this.decorationMarkerDestroyedSubscriptions.values()\n for (const decoration of decorationMarkerDestroyedSubscriptionsValues) {\n decoration.dispose()\n }\n\n const decorationUpdatedSubscriptionsValues = this.decorationUpdatedSubscriptions.values()\n for (const decoration of decorationUpdatedSubscriptionsValues) {\n decoration.dispose()\n }\n\n const decorationDestroyedSubscriptionsValues = this.decorationDestroyedSubscriptions.values()\n for (const decoration of decorationDestroyedSubscriptionsValues) {\n decoration.dispose()\n }\n\n const decorationsByIdValues = this.decorationsById.values()\n for (const decoration of decorationsByIdValues) {\n decoration.destroy()\n }\n\n this.decorationsById.clear()\n this.decorationsByMarkerId.clear()\n this.decorationMarkerChangedSubscriptions.clear()\n this.decorationMarkerDestroyedSubscriptions.clear()\n this.decorationUpdatedSubscriptions.clear()\n this.decorationDestroyedSubscriptions.clear()\n }\n\n destroy() {\n this.removeAllDecorations()\n this.minimap = undefined\n this.emitter = undefined\n this.destroyed = true\n }\n}\n\nfunction getOriginatorPackageName() {\n const line = new Error().stack.split(\"\\n\")[3]\n const filePath = line.split(\"(\")[1].replace(\")\", \"\")\n const re = new RegExp(atom.packages.getPackageDirPaths().join(\"|\") + escapeRegExp(path.sep))\n const plugin = filePath\n .replace(re, \"\")\n .split(path.sep)[0]\n .replace(/minimap-|-minimap/, \"\")\n return plugin.indexOf(path.sep) < 0 ? plugin : undefined\n}\n\n/**\n * Given two ranges, it returns an array of ranges representing the differences between them.\n *\n * @param {number} oldStart The row index of the first range start\n * @param {number} oldEnd The row index of the first range end\n * @param {number} newStart The row index of the second range start\n * @param {number} newEnd The row index of the second range end\n * @returns {Object[]} The array of diff ranges\n * @access private\n */\nfunction computeRangesDiffs(oldStart, oldEnd, newStart, newEnd) {\n const diffs = []\n\n if (oldStart.isLessThan(newStart)) {\n diffs.push([oldStart, newStart])\n } else if (newStart.isLessThan(oldStart)) {\n diffs.push([newStart, oldStart])\n }\n\n if (oldEnd.isLessThan(newEnd)) {\n diffs.push([oldEnd, newEnd])\n } else if (newEnd.isLessThan(oldEnd)) {\n diffs.push([newEnd, oldEnd])\n }\n\n return diffs\n}\n","/** @babel */\n\"use strict\"\n\n/** @access private */\nexport default class CanvasLayer {\n constructor() {\n /**\n * The onscreen canvas.\n *\n * @type {HTMLCanvasElement}\n */\n this.canvas = document.createElement(\"canvas\")\n\n const desynchronized = false // TODO Electron 9 has color issues #786\n\n /**\n * The onscreen canvas context.\n *\n * @type {CanvasRenderingContext2D}\n */\n this.context = this.canvas.getContext(\"2d\", { desynchronized })\n this.canvas.webkitImageSmoothingEnabled = false\n this.context.imageSmoothingEnabled = false\n\n /**\n * The offscreen canvas.\n *\n * @type {HTMLCanvasElement}\n * @access private\n */\n this.offscreenCanvas = document.createElement(\"canvas\")\n /**\n * The offscreen canvas context.\n *\n * @type {CanvasRenderingContext2D}\n * @access private\n */\n this.offscreenContext = this.offscreenCanvas.getContext(\"2d\", { desynchronized })\n this.offscreenCanvas.webkitImageSmoothingEnabled = false\n this.offscreenContext.imageSmoothingEnabled = false\n }\n\n attach(parent) {\n if (this.canvas.parentNode) {\n return\n }\n\n parent.appendChild(this.canvas)\n }\n\n setSize(width = 0, height = 0) {\n this.canvas.width = width\n this.canvas.height = height\n this.context.imageSmoothingEnabled = false\n this.resetOffscreenSize()\n }\n\n getSize() {\n return {\n width: this.canvas.width,\n height: this.canvas.height,\n }\n }\n\n resetOffscreenSize() {\n this.offscreenCanvas.width = this.canvas.width\n this.offscreenCanvas.height = this.canvas.height\n this.offscreenContext.imageSmoothingEnabled = false\n }\n\n copyToOffscreen() {\n if (this.canvas.width > 0 && this.canvas.height > 0) {\n this.offscreenContext.drawImage(this.canvas, 0, 0)\n }\n }\n\n copyFromOffscreen() {\n if (this.offscreenCanvas.width > 0 && this.offscreenCanvas.height > 0) {\n this.context.drawImage(this.offscreenCanvas, 0, 0)\n }\n }\n\n copyPartFromOffscreen(srcY, destY, height) {\n if (this.offscreenCanvas.width > 0 && this.offscreenCanvas.height > 0) {\n this.context.drawImage(\n this.offscreenCanvas,\n 0,\n srcY,\n this.offscreenCanvas.width,\n height,\n 0,\n destY,\n this.offscreenCanvas.width,\n height\n )\n }\n }\n\n clearCanvas() {\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height)\n }\n}\n","\"use strict\"\n\n/**\n * Generates a decorator function to convert a class into a custom element through the `registerOrUpdateElement` method\n * from `atom-utils-plus`.\n *\n * The decorator will take care to return the generated element class so that you can just export it directly as\n * demonstrated below.\n *\n * As supported by the `registerOrUpdateElement` method, static member will be available on the new class.\n *\n * **Note: As there's some limitations when modifying the prototype of a custom element, if you need to inject element\n * callbacks (like `createdCallback`) through a mixin, the mixins should be included before converting the class as a\n * custom element. You'll be able to achieve that by placing the `include` decorator after the `element` one as shown in\n * the second example.**\n *\n * @param {string} elementName The node name of the element to register\n * @returns {void}\n * @element('dummy-element-name') export default class SomeClass {\n * // ...\n * }\n * @element('dummy-element-with-mixin')\n * @include(SomeMixin) export default class SomeClass {\n * // ...\n * }\n */\nexport default function element(cls, elementName) {\n if (!window.customElements.get(elementName)) {\n window.customElements.define(elementName, cls)\n }\n}\n","\"use strict\"\n\nimport { CompositeDisposable, Emitter } from \"atom\"\nimport { EventsDelegation, SpacePenDSL } from \"atom-utils-plus\"\n\nimport * as Main from \"./main\"\nimport element from \"./decorators/element\"\nimport include from \"./decorators/include\"\n\nconst TAG_NAME = \"minimap-quick-settings\"\n\n/** @access private */\nclass MinimapQuickSettingsElement extends HTMLElement {\n static initClass() {\n include(this, EventsDelegation, SpacePenDSL.Babel)\n element(this, TAG_NAME)\n }\n\n static content() {\n this.div({ class: \"select-list popover-list minimap-quick-settings\" }, () => {\n this.input({ type: \"text\", class: \"hidden-input\", outlet: \"hiddenInput\" })\n this.ol({ class: \"list-group mark-active\", outlet: \"list\" }, () => {\n this.li({ class: \"separator\", outlet: \"separator\" })\n this.li({ class: \"code-highlights\", outlet: \"codeHighlights\" }, \"code-highlights\")\n this.li({ class: \"absolute-mode\", outlet: \"absoluteMode\" }, \"absolute-mode\")\n this.li(\n { class: \"adjust-absolute-mode-height\", outlet: \"adjustAbsoluteModeHeight\" },\n \"adjust-absolute-mode-height\"\n )\n })\n this.div({ class: \"btn-group\" }, () => {\n this.button({ class: \"btn btn-default\", outlet: \"onLeftButton\" }, \"On Left\")\n this.button({ class: \"btn btn-default\", outlet: \"onRightButton\" }, \"On Right\")\n })\n })\n }\n\n createdCallback() {\n this.buildContent()\n }\n\n setModel(minimap) {\n this.selectedItem = null\n this.minimap = minimap\n this.emitter = new Emitter()\n this.subscriptions = new CompositeDisposable()\n this.plugins = {}\n this.itemsActions = new WeakMap()\n\n this.codeHighlights.classList.toggle(\"active\", this.minimap.displayCodeHighlights)\n\n this.itemsActions.set(this.codeHighlights, () => {\n atom.config.set(\"minimap.displayCodeHighlights\", !this.minimap.displayCodeHighlights)\n })\n\n this.itemsActions.set(this.absoluteMode, () => {\n atom.config.set(\"minimap.absoluteMode\", !atom.config.get(\"minimap.absoluteMode\"))\n })\n\n this.itemsActions.set(this.adjustAbsoluteModeHeight, () => {\n atom.config.set(\"minimap.adjustAbsoluteModeHeight\", !atom.config.get(\"minimap.adjustAbsoluteModeHeight\"))\n })\n\n this.subscriptions.add(\n Main.onDidAddPlugin(({ name, plugin }) => {\n return this.addItemFor(name, plugin)\n }),\n Main.onDidRemovePlugin(({ name, plugin }) => {\n return this.removeItemFor(name, plugin)\n }),\n Main.onDidActivatePlugin(({ name, plugin }) => {\n return this.activateItem(name, plugin)\n }),\n Main.onDidDeactivatePlugin(({ name, plugin }) => {\n return this.deactivateItem(name, plugin)\n }),\n\n atom.commands.add(\"minimap-quick-settings\", {\n \"core:move-up\": () => {\n this.selectPreviousItem()\n },\n \"core:move-down\": () => {\n this.selectNextItem()\n },\n \"core:move-left\": () => {\n atom.config.set(\"minimap.displayMinimapOnLeft\", true)\n },\n \"core:move-right\": () => {\n atom.config.set(\"minimap.displayMinimapOnLeft\", false)\n },\n \"core:cancel\": () => {\n this.destroy()\n },\n \"core:confirm\": () => {\n this.toggleSelectedItem()\n },\n }),\n\n this.subscribeTo(this.codeHighlights, {\n mousedown: (e) => {\n e.preventDefault()\n atom.config.set(\"minimap.displayCodeHighlights\", !this.minimap.displayCodeHighlights)\n },\n }),\n\n this.subscribeTo(this.absoluteMode, {\n mousedown: (e) => {\n e.preventDefault()\n atom.config.set(\"minimap.absoluteMode\", !atom.config.get(\"minimap.absoluteMode\"))\n },\n }),\n\n this.subscribeTo(this.adjustAbsoluteModeHeight, {\n mousedown: (e) => {\n e.preventDefault()\n atom.config.set(\"minimap.adjustAbsoluteModeHeight\", !atom.config.get(\"minimap.adjustAbsoluteModeHeight\"))\n },\n }),\n\n this.subscribeTo(\n this.hiddenInput,\n {\n focusout: (e) => {\n this.destroy()\n },\n },\n { passive: true }\n ),\n\n this.subscribeTo(this.onLeftButton, {\n mousedown: (e) => {\n e.preventDefault()\n atom.config.set(\"minimap.displayMinimapOnLeft\", true)\n },\n }),\n\n this.subscribeTo(this.onRightButton, {\n mousedown: (e) => {\n e.preventDefault()\n atom.config.set(\"minimap.displayMinimapOnLeft\", false)\n },\n }),\n\n atom.config.observe(\"minimap.displayCodeHighlights\", (bool) => {\n this.codeHighlights.classList.toggle(\"active\", bool)\n }),\n\n atom.config.observe(\"minimap.absoluteMode\", (bool) => {\n this.absoluteMode.classList.toggle(\"active\", bool)\n }),\n\n atom.config.observe(\"minimap.adjustAbsoluteModeHeight\", (bool) => {\n this.adjustAbsoluteModeHeight.classList.toggle(\"active\", bool)\n }),\n\n atom.config.observe(\"minimap.displayMinimapOnLeft\", (bool) => {\n this.onLeftButton.classList.toggle(\"selected\", bool)\n this.onRightButton.classList.toggle(\"selected\", !bool)\n })\n )\n\n this.initList()\n }\n\n onDidDestroy(callback) {\n return this.emitter.on(\"did-destroy\", callback)\n }\n\n attach() {\n const workspaceElement = atom.views.getView(atom.workspace)\n workspaceElement.appendChild(this)\n this.hiddenInput.focus()\n }\n\n destroy() {\n this.emitter.emit(\"did-destroy\")\n this.subscriptions.dispose()\n this.parentNode.removeChild(this)\n }\n\n initList() {\n this.itemsDisposables = new WeakMap()\n for (const name in Main.plugins) {\n this.addItemFor(name, Main.plugins[name])\n }\n }\n\n toggleSelectedItem() {\n const fn = this.itemsActions.get(this.selectedItem)\n if (typeof fn === \"function\") {\n fn()\n }\n }\n\n selectNextItem() {\n this.selectedItem.classList.remove(\"selected\")\n if (this.selectedItem.nextSibling != null) {\n this.selectedItem = this.selectedItem.nextSibling\n if (this.selectedItem.matches(\".separator\")) {\n this.selectedItem = this.selectedItem.nextSibling\n }\n } else {\n this.selectedItem = this.list.firstChild\n }\n this.selectedItem.classList.add(\"selected\")\n }\n\n selectPreviousItem() {\n this.selectedItem.classList.remove(\"selected\")\n if (this.selectedItem.previousSibling != null) {\n this.selectedItem = this.selectedItem.previousSibling\n if (this.selectedItem.matches(\".separator\")) {\n this.selectedItem = this.selectedItem.previousSibling\n }\n } else {\n this.selectedItem = this.list.lastChild\n }\n this.selectedItem.classList.add(\"selected\")\n }\n\n addItemFor(name, plugin) {\n const item = document.createElement(\"li\")\n const action = () => {\n Main.togglePluginActivation(name)\n }\n\n if (plugin.isActive()) {\n item.classList.add(\"active\")\n }\n\n item.textContent = name\n\n this.itemsActions.set(item, action)\n this.itemsDisposables.set(\n item,\n this.addDisposableEventListener(item, \"mousedown\", (e) => {\n e.preventDefault()\n action()\n })\n )\n\n this.plugins[name] = item\n this.list.insertBefore(item, this.separator)\n\n if (!(this.selectedItem != null)) {\n this.selectedItem = item\n this.selectedItem.classList.add(\"selected\")\n }\n }\n\n removeItemFor(name, plugin) {\n try {\n this.list.removeChild(this.plugins[name])\n } catch (error) {}\n\n delete this.plugins[name]\n }\n\n activateItem(name, plugin) {\n this.plugins[name].classList.add(\"active\")\n }\n\n deactivateItem(name, plugin) {\n this.plugins[name].classList.remove(\"active\")\n }\n}\n\nMinimapQuickSettingsElement.initClass()\n\nexport function createMinimapQuickSettingsElement() {\n const element = document.createElement(TAG_NAME)\n element.createdCallback()\n return element\n}\n","\"use strict\"\n\n/** @access private */\nexport default class StableAdapter {\n constructor(textEditor) {\n this.textEditor = textEditor\n this.textEditorElement = atom.views.getView(this.textEditor)\n }\n\n enableCache() {\n this.useCache = true\n }\n\n clearCache() {\n this.useCache = false\n delete this.heightCache\n delete this.scrollTopCache\n delete this.scrollLeftCache\n delete this.maxScrollTopCache\n }\n\n onDidChangeScrollTop(callback) {\n return this.textEditorElement.onDidChangeScrollTop(callback)\n }\n\n onDidChangeScrollLeft(callback) {\n return this.textEditorElement.onDidChangeScrollLeft(callback)\n }\n\n getHeight() {\n if (this.editorDestroyed()) {\n return 0\n }\n\n if (this.useCache) {\n if (!this.heightCache) {\n this.heightCache = this.textEditorElement.getHeight()\n }\n return this.heightCache\n }\n return this.textEditorElement.getHeight()\n }\n\n getScrollTop() {\n if (this.editorDestroyed()) {\n return 0\n }\n\n if (this.useCache) {\n if (!this.scrollTopCache) {\n this.scrollTopCache = this.computeScrollTop()\n }\n return this.scrollTopCache\n }\n return this.computeScrollTop()\n }\n\n computeScrollTop() {\n if (this.editorDestroyed()) {\n return 0\n }\n\n const scrollTop = this.textEditorElement.getScrollTop()\n const lineHeight = this.textEditor.getLineHeightInPixels()\n let firstRow = this.textEditorElement.getFirstVisibleScreenRow()\n\n if (Number.isNaN(firstRow)) {\n // Guard against their being no visible screen row\n return 0\n }\n\n let lineTop = this.textEditorElement.pixelPositionForScreenPosition([firstRow, 0]).top\n\n if (lineTop > scrollTop) {\n firstRow -= 1\n lineTop = this.textEditorElement.pixelPositionForScreenPosition([firstRow, 0]).top\n }\n\n const lineY = firstRow * lineHeight\n const offset = Math.min(scrollTop - lineTop, lineHeight)\n return lineY + offset\n }\n\n setScrollTop(scrollTop) {\n if (this.editorDestroyed()) {\n return\n }\n\n this.textEditorElement.setScrollTop(scrollTop)\n }\n\n getScrollLeft() {\n if (this.editorDestroyed()) {\n return 0\n }\n\n if (this.useCache) {\n if (!this.scrollLeftCache) {\n this.scrollLeftCache = this.textEditorElement.getScrollLeft()\n }\n return this.scrollLeftCache\n }\n return this.textEditorElement.getScrollLeft()\n }\n\n getMaxScrollTop() {\n if (this.editorDestroyed()) {\n return 0\n }\n\n if (this.maxScrollTopCache != null && this.useCache) {\n return this.maxScrollTopCache\n }\n\n let maxScrollTop\n if (this.textEditorElement.getMaxScrollTop) {\n maxScrollTop = this.textEditorElement.getMaxScrollTop()\n\n if (parseFloat(atom.getVersion()) >= 1.13) {\n if (this.scrollPastEnd) {\n const lineHeight = this.textEditor.getLineHeightInPixels()\n maxScrollTop -= this.getHeight() - 3 * lineHeight\n }\n }\n } else {\n maxScrollTop = this.textEditorElement.getScrollHeight() - this.getHeight()\n\n if (this.scrollPastEnd) {\n const lineHeight = this.textEditor.getLineHeightInPixels()\n maxScrollTop -= this.getHeight() - 3 * lineHeight\n }\n }\n\n if (this.useCache) {\n this.maxScrollTopCache = maxScrollTop\n }\n\n return maxScrollTop\n }\n\n editorDestroyed() {\n return (\n !this.textEditor ||\n this.textEditor.isDestroyed() ||\n !this.textEditorElement.component ||\n !this.textEditorElement.getModel() ||\n !this.textEditorElement.parentNode\n )\n }\n}\n","\"use strict\"\n\nimport { Emitter, CompositeDisposable, Disposable } from \"atom\"\nimport Decoration from \"./decoration\"\nimport StableAdapter from \"./adapters/stable-adapter\"\nimport { editorsMinimaps } from \"./main\"\n\nlet nextModelId = 1\n\n// returned in the decorations API when minimap is destoryed\nconst disposedDisposable = new Disposable()\ndisposedDisposable.dispose()\nconst markerMock = {\n onDidDestroy: () => disposedDisposable,\n getScreenRange: () => new Range(),\n}\nconst dummyDecoration = new Decoration(markerMock, null, {})\n\n/**\n * The Minimap class is the underlying model of a . Most manipulations of the minimap is done through the model.\n *\n * Any Minimap instance is tied to a `TextEditor`. Their lifecycle follow the one of their target `TextEditor`, so they\n * are destroyed whenever their `TextEditor` is destroyed.\n */\nexport default class Minimap {\n /**\n * Creates a new Minimap instance for the given `TextEditor`.\n *\n * @param {Object} options An object with the new Minimap properties\n * @param {TextEditor} options.textEditor The target text editor for the minimap\n * @param {boolean} [options.standAlone] Whether this minimap is in stand-alone mode or not\n * @param {number} [options.width] The minimap width in pixels\n * @param {number} [options.height] The minimap height in pixels\n * @throws {Error} Cannot create a minimap without an editor\n */\n constructor(options = {}) {\n if (!options.textEditor) {\n throw new Error(\"Cannot create a minimap without an editor\")\n }\n\n /**\n * The Minimap's minimapElement.\n *\n * @type {MinimapElement}\n * @access private\n */\n this.minimapElement = undefined\n\n // local cache of this.minimapElement.DecorationManagement\n this.DecorationManagement = undefined\n\n /**\n * The Minimap's text editor.\n *\n * @type {TextEditor}\n * @access private\n */\n this.textEditor = options.textEditor\n\n /**\n * The Minimap's text editor element.\n *\n * @access private\n */\n this.editorElement = undefined\n\n /**\n * The stand-alone state of the current Minimap.\n *\n * @type {boolean}\n * @access private\n */\n this.standAlone = options.standAlone\n /**\n * The width of the current Minimap.\n *\n * @type {number}\n * @access private\n */\n this.width = options.width\n /**\n * The height of the current Minimap.\n *\n * @type {number}\n * @access private\n */\n this.height = options.height\n /**\n * The id of the current Minimap.\n *\n * @type {Number}\n * @access private\n */\n this.id = nextModelId++\n /**\n * The events emitter of the current Minimap.\n *\n * @type {Emitter}\n * @access private\n */\n this.emitter = new Emitter()\n /**\n * The Minimap's subscriptions.\n *\n * @type {CompositeDisposable}\n * @access private\n */\n this.subscriptions = new CompositeDisposable()\n /**\n * The adapter object leverage the access to several properties from the `TextEditor`/`TextEditorElement` to support\n * the different APIs between different version of Atom.\n *\n * @type {Object}\n * @access private\n */\n this.adapter = null\n /**\n * The char height of the current Minimap, will be `undefined` unless `setCharWidth` is called.\n *\n * @type {number}\n * @access private\n */\n this.charHeight = null\n /**\n * The char height from the package's configuration. Will be overriden by the instance value.\n *\n * @type {number}\n * @access private\n */\n this.configCharHeight = null\n /**\n * The char width of the current Minimap, will be `undefined` unless `setCharWidth` is called.\n *\n * @type {number}\n * @access private\n */\n this.charWidth = null\n /**\n * The char width from the package's configuration. Will be overriden by the instance value.\n *\n * @type {number}\n * @access private\n */\n this.configCharWidth = null\n /**\n * The interline of the current Minimap, will be `undefined` unless `setCharWidth` is called.\n *\n * @type {number}\n * @access private\n */\n this.interline = null\n /**\n * The interline from the package's configuration. Will be overriden by the instance value.\n *\n * @type {number}\n * @access private\n */\n this.configInterline = null\n /**\n * The devicePixelRatioRounding of the current Minimap, will be `undefined` unless `setDevicePixelRatioRounding` is called.\n *\n * @type {boolean}\n * @access private\n */\n this.devicePixelRatioRounding = null\n /**\n * The devicePixelRatioRounding from the package's configuration. Will be overriden by the instance value.\n *\n * @type {boolean}\n * @access private\n */\n this.configDevicePixelRatioRounding = null\n /**\n * A number of milliseconds which determines how often the minimap should redraw itself after detecting changes in\n * the text editor. A value of 0 will cause the minimap to redraw immediately.\n *\n * @type {number}\n * @access private\n */\n this.redrawDelay = 0\n /**\n * A boolean value to store whether this Minimap have been destroyed or not.\n *\n * @type {boolean}\n * @access private\n */\n this.destroyed = false\n /**\n * A boolean value to store whether the `scrollPastEnd` setting is enabled or not.\n *\n * @type {boolean}\n * @access private\n */\n this.scrollPastEnd = false\n\n /**\n * An array of changes registered with textEditor.onDidChange() which have not yet been handled\n *\n * @type {Array}\n * @access private\n */\n this.pendingChangeEvents = []\n\n /**\n * Timer reference which, once fired, will flush all the pending changes stored in this.pendingChangeEvents array.\n *\n * @type {Timer | null}\n * @access private\n */\n this.flushChangesTimer = null\n\n if (atom.views.getView(this.textEditor).getScrollTop != null) {\n this.adapter = new StableAdapter(this.textEditor)\n }\n\n /**\n * When in stand-alone or independent scrolling mode, this value can be used instead of the computed scroll.\n *\n * @type {number}\n * @access private\n */\n this.scrollTop = 0\n\n let configSubscription = this.subscribeToConfig()\n\n this.subscriptions.add(\n configSubscription,\n\n this.textEditor.onDidChangeGrammar(() => {\n this.subscriptions.remove(configSubscription)\n configSubscription.dispose()\n\n configSubscription = this.subscribeToConfig()\n this.subscriptions.add(configSubscription)\n }),\n\n this.adapter.onDidChangeScrollTop(() => {\n if (!this.standAlone && !this.ignoreTextEditorScroll && !this.inChangeScrollTop) {\n this.inChangeScrollTop = true\n this.updateScrollTop()\n this.emitter.emit(\"did-change-scroll-top\", this)\n this.inChangeScrollTop = false\n }\n\n if (this.ignoreTextEditorScroll) {\n this.ignoreTextEditorScroll = false\n }\n }),\n\n this.adapter.onDidChangeScrollLeft(() => {\n if (!this.standAlone) {\n this.emitter.emit(\"did-change-scroll-left\", this)\n }\n }),\n\n this.textEditor.onDidChange((changes) => {\n this.scheduleChanges(changes)\n }),\n\n this.textEditor.onDidDestroy(() => {\n if (editorsMinimaps) {\n editorsMinimaps.delete(this.textEditor)\n }\n this.destroy()\n }),\n\n /*\n FIXME Some changes occuring during the tokenization produces\n ranges that deceive the canvas rendering by making some\n lines at the end of the buffer intact while they are in fact not,\n resulting in extra lines appearing at the end of the minimap.\n Forcing a whole repaint to fix that bug is suboptimal but works.\n */\n this.textEditor.onDidTokenize(() => {\n this.emitter.emit(\"did-change-config\")\n })\n )\n }\n\n /** Destroys the model. */\n destroy() {\n if (this.destroyed) {\n return\n }\n\n clearTimeout(this.flushChangesTimer)\n this.pendingChangeEvents = []\n this.subscriptions.dispose()\n this.emitter.emit(\"did-destroy\")\n this.emitter.dispose()\n this.destroyed = true\n }\n\n /**\n * Returns `true` when this `Minimap` has benn destroyed.\n *\n * @returns {boolean} Whether this Minimap has been destroyed or not\n */\n isDestroyed() {\n return this.destroyed\n }\n\n /**\n * Schedule changes from textEditor.onDidChange() to be handled at a later time\n *\n * @param {Array} changes The changes to be scheduled\n * @returns Void\n * @access private\n */\n scheduleChanges(changes) {\n this.pendingChangeEvents = this.pendingChangeEvents.concat(changes)\n\n // Optimisation: If the redraw delay is set to 0, do not even schedule a timer\n if (!this.redrawDelay) {\n this.requestFlushChanges()\n }\n\n if (!this.flushChangesTimer) {\n // If any changes happened within the timeout's delay, a timeout will already have been\n // scheduled -> no need to schedule again\n this.flushChangesTimer = setTimeout(() => {\n this.requestFlushChanges()\n }, this.redrawDelay)\n }\n }\n\n /**\n * Flush all changes which have been scheduled for later processing by this.scheduleChanges()\n *\n * @returns Void\n * @access private\n */\n flushChanges() {\n clearTimeout(this.flushChangesTimer)\n this.flushChangesTimer = null\n this.emitChanges(this.pendingChangeEvents)\n this.pendingChangeEvents = []\n }\n\n /**\n * Requests flush changes if not already requested\n *\n * @returns Void\n * @access private\n */\n requestFlushChanges() {\n if (!this.requestedFlushChanges) {\n this.requestedFlushChanges = requestAnimationFrame(() => {\n this.flushChanges()\n if (this.requestedFlushChanges) {\n cancelAnimationFrame(this.requestedFlushChanges)\n this.requestedFlushChanges = null\n }\n })\n }\n }\n\n /**\n * Registers an event listener to the `did-change` event.\n *\n * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be\n * called with an event object with the following properties:\n *\n * - Start: The change's start row number\n * - End: The change's end row number\n * - ScreenDelta: the delta in buffer rows between the versions before and after the change\n *\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChange(callback) {\n return this.emitter.on(\"did-change\", callback)\n }\n\n /**\n * Registers an event listener to the `did-change-config` event.\n *\n * @param {function():void} callback A function to call when the event is triggered.\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChangeConfig(callback) {\n return this.emitter.on(\"did-change-config\", callback)\n }\n\n /**\n * Registers an event listener to the `did-change-scroll-top` event.\n *\n * The event is dispatched when the text editor `scrollTop` value have been changed or when the minimap scroll top\n * have been changed in stand-alone mode.\n *\n * @param {function(minimap:Minimap):void} callback A function to call when the event is triggered. The current\n * Minimap is passed as argument to the callback.\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChangeScrollTop(callback) {\n return this.emitter.on(\"did-change-scroll-top\", callback)\n }\n\n /**\n * Registers an event listener to the `did-change-scroll-left` event.\n *\n * @param {function(minimap:Minimap):void} callback A function to call when the event is triggered. The current\n * Minimap is passed as argument to the callback.\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChangeScrollLeft(callback) {\n return this.emitter.on(\"did-change-scroll-left\", callback)\n }\n\n /**\n * Registers an event listener to the `did-change-stand-alone` event.\n *\n * This event is dispatched when the stand-alone of the current Minimap is either enabled or disabled.\n *\n * @param {function(minimap:Minimap):void} callback A function to call when the event is triggered. The current\n * Minimap is passed as argument to the callback.\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChangeStandAlone(callback) {\n return this.emitter.on(\"did-change-stand-alone\", callback)\n }\n\n /**\n * Registers an event listener to the `did-destroy` event.\n *\n * This event is dispatched when this Minimap have been destroyed. It can occurs either because the {@link destroy}\n * method have been called on the Minimap or because the target text editor have been destroyed.\n *\n * @param {function():void} callback A function to call when the event is triggered.\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidDestroy(callback) {\n return this.emitter.on(\"did-destroy\", callback)\n }\n\n /**\n * Registers to the config changes for the current editor scope.\n *\n * @returns {Disposable} The disposable to dispose all the registered events\n * @access private\n */\n subscribeToConfig() {\n const subs = new CompositeDisposable()\n const opts = { scope: this.textEditor.getRootScopeDescriptor() }\n\n subs.add(\n atom.config.observe(\"editor.scrollPastEnd\", opts, (scrollPastEnd) => {\n this.scrollPastEnd = scrollPastEnd\n this.adapter.scrollPastEnd = this.scrollPastEnd\n this.emitter.emit(\"did-change-config\")\n }),\n\n atom.config.observe(\"minimap.charHeight\", opts, (configCharHeight) => {\n this.configCharHeight = configCharHeight\n this.updateScrollTop()\n this.emitter.emit(\"did-change-config\")\n }),\n\n atom.config.observe(\"minimap.charWidth\", opts, (configCharWidth) => {\n this.configCharWidth = configCharWidth\n this.updateScrollTop()\n this.emitter.emit(\"did-change-config\")\n }),\n\n atom.config.observe(\"minimap.interline\", opts, (configInterline) => {\n this.configInterline = configInterline\n this.updateScrollTop()\n this.emitter.emit(\"did-change-config\")\n }),\n\n atom.config.observe(\"minimap.independentMinimapScroll\", opts, (independentMinimapScroll) => {\n this.independentMinimapScroll = independentMinimapScroll\n this.updateScrollTop()\n }),\n\n atom.config.observe(\"minimap.scrollSensitivity\", opts, (scrollSensitivity) => {\n this.scrollSensitivity = scrollSensitivity\n }),\n\n atom.config.observe(\"minimap.redrawDelay\", opts, (redrawDelay) => {\n this.redrawDelay = redrawDelay\n }),\n // cdprr is shorthand for configDevicePixelRatioRounding\n\n atom.config.observe(\"minimap.devicePixelRatioRounding\", opts, (cdprr) => {\n this.configDevicePixelRatioRounding = cdprr\n this.updateScrollTop()\n this.emitter.emit(\"did-change-config\")\n })\n )\n\n return subs\n }\n\n /**\n * Returns `true` when the current Minimap is a stand-alone minimap.\n *\n * @returns {boolean} Whether this Minimap is in stand-alone mode or not.\n */\n isStandAlone() {\n return this.standAlone\n }\n\n /**\n * Sets the stand-alone mode for this minimap.\n *\n * @fires {did-change-stand-alone} if The stand-alone mode have been toggled on or off by the call\n * @param {boolean} standAlone The new state of the stand-alone mode for this Minimap\n */\n setStandAlone(standAlone) {\n if (standAlone !== this.standAlone) {\n this.standAlone = standAlone\n this.emitter.emit(\"did-change-stand-alone\", this)\n }\n }\n\n /** @returns {MinimapElement} Returns the current minimapElement */\n getMinimapElement() {\n return this.minimapElement\n }\n\n /**\n * Returns the `TextEditor` that this minimap represents.\n *\n * @returns {TextEditor} This Minimap's text editor\n */\n getTextEditor() {\n return this.textEditor\n }\n\n /**\n * Returns the `TextEditorElement` for the Minimap's `TextEditor`.\n *\n * @returns {TextEditorElement} The minimap's text editor element\n */\n getTextEditorElement() {\n if (this.editorElement) {\n return this.editorElement\n }\n\n this.editorElement = atom.views.getView(this.getTextEditor())\n return this.editorElement\n }\n\n /**\n * Returns the height of the `TextEditor` at the Minimap scale.\n *\n * @returns {number} The scaled height of the text editor\n */\n getTextEditorScaledHeight() {\n return this.adapter.getHeight() * this.getVerticalScaleFactor()\n }\n\n /**\n * Returns the `TextEditor` scroll top value at the Minimap scale.\n *\n * @returns {number} The scaled scroll top of the text editor\n */\n getTextEditorScaledScrollTop() {\n return this.adapter.getScrollTop() * this.getVerticalScaleFactor()\n }\n\n /**\n * Returns the `TextEditor` scroll left value at the Minimap scale.\n *\n * @returns {number} The scaled scroll left of the text editor\n */\n getTextEditorScaledScrollLeft() {\n return this.adapter.getScrollLeft() * this.getHorizontalScaleFactor()\n }\n\n /**\n * Returns the `TextEditor` maximum scroll top value.\n *\n * When the `scrollPastEnd` setting is enabled, the method compensate the extra scroll by removing the same height as\n * added by the editor from the final value.\n *\n * @returns {number} The maximum scroll top of the text editor\n */\n getTextEditorMaxScrollTop() {\n return this.adapter.getMaxScrollTop()\n }\n\n /**\n * Returns the `TextEditor` scroll top value.\n *\n * @returns {number} The scroll top of the text editor\n */\n getTextEditorScrollTop() {\n return this.adapter.getScrollTop()\n }\n\n /**\n * Sets the scroll top of the `TextEditor`.\n *\n * @param {number} scrollTop The new scroll top value\n */\n setTextEditorScrollTop(scrollTop, ignoreTextEditorScroll = false) {\n this.ignoreTextEditorScroll = ignoreTextEditorScroll\n this.adapter.setScrollTop(scrollTop)\n }\n\n /**\n * Returns the `TextEditor` scroll left value.\n *\n * @returns {number} The scroll left of the text editor\n */\n getTextEditorScrollLeft() {\n return this.adapter.getScrollLeft()\n }\n\n /**\n * Returns the height of the `TextEditor`.\n *\n * @returns {number} The height of the text editor\n */\n getTextEditorHeight() {\n return this.adapter.getHeight()\n }\n\n /**\n * Returns the `TextEditor` scroll as a value normalized between `0` and `1`.\n *\n * When the `scrollPastEnd` setting is enabled the value may exceed `1` as the maximum scroll value used to compute\n * this ratio compensate for the extra height in the editor. **Use {@link getCapedTextEditorScrollRatio} when you need\n * a value that is strictly between `0` and `1`.**\n *\n * @returns {number} The scroll ratio of the text editor\n */\n getTextEditorScrollRatio() {\n return this.adapter.getScrollTop() / (this.getTextEditorMaxScrollTop() || 1)\n }\n\n /**\n * Returns the `TextEditor` scroll as a value normalized between `0` and `1`.\n *\n * The returned value will always be strictly between `0` and `1`.\n *\n * @returns {number} The scroll ratio of the text editor strictly between 0 and 1\n */\n getCapedTextEditorScrollRatio() {\n return Math.min(1, this.getTextEditorScrollRatio())\n }\n\n /**\n * Returns the height of the whole minimap in pixels based on the `minimap` settings.\n *\n * @returns {number} The height of the minimap\n */\n getHeight() {\n return this.textEditor.getScreenLineCount() * this.getLineHeight()\n }\n\n /**\n * Returns the width of the whole minimap in pixels based on the `minimap` settings.\n *\n * @returns {number} The width of the minimap\n */\n getWidth() {\n return this.textEditor.getMaxScreenLineLength() * this.getCharWidth()\n }\n\n /**\n * Returns the height the Minimap content will take on screen.\n *\n * When the Minimap height is greater than the `TextEditor` height, the `TextEditor` height is returned instead.\n *\n * @returns {number} The visible height of the Minimap\n */\n getVisibleHeight() {\n return Math.min(this.getScreenHeight(), this.getHeight())\n }\n\n /**\n * Returns the height the minimap should take once displayed, it's either the height of the `TextEditor` or the\n * provided `height` when in stand-alone mode.\n *\n * @returns {number} The total height of the Minimap\n */\n getScreenHeight() {\n if (this.isStandAlone()) {\n if (this.height != null) {\n return this.height\n } else {\n return this.getHeight()\n }\n } else {\n return this.adapter.getHeight()\n }\n }\n\n /**\n * Returns the width the whole Minimap will take on screen.\n *\n * @returns {number} The width of the Minimap when displayed\n */\n getVisibleWidth() {\n return Math.min(this.getScreenWidth(), this.getWidth())\n }\n\n /**\n * Returns the width the Minimap should take once displayed, it's either the width of the Minimap content or the\n * provided `width` when in standAlone mode.\n *\n * @returns {number} The Minimap screen width\n */\n getScreenWidth() {\n if (this.isStandAlone() && this.width != null) {\n return this.width\n } else {\n return this.getWidth()\n }\n }\n\n /**\n * Sets the preferred height and width when in stand-alone mode.\n *\n * This method is called by the for this Minimap so that the model is kept in sync with the view.\n *\n * @param {number} height The new height of the Minimap\n * @param {number} width The new width of the Minimap\n */\n setScreenHeightAndWidth(height, width) {\n if (this.width !== width || this.height !== height) {\n this.height = height\n this.width = width\n this.updateScrollTop()\n }\n }\n\n /**\n * Returns the vertical scaling factor when converting coordinates from the `TextEditor` to the Minimap.\n *\n * @returns {number} The Minimap vertical scaling factor\n */\n getVerticalScaleFactor() {\n return this.getLineHeight() / this.textEditor.getLineHeightInPixels()\n }\n\n /**\n * Returns the horizontal scaling factor when converting coordinates from the `TextEditor` to the Minimap.\n *\n * @returns {number} The Minimap horizontal scaling factor\n */\n getHorizontalScaleFactor() {\n return this.getCharWidth() / this.textEditor.getDefaultCharWidth()\n }\n\n /**\n * Returns the height of a line in the Minimap in pixels.\n *\n * @returns {number} A line's height in the Minimap\n */\n getLineHeight() {\n return this.getCharHeight() + this.getInterline()\n }\n\n /**\n * Returns the width of a character in the Minimap in pixels.\n *\n * @returns {number} A character's width in the Minimap\n */\n getCharWidth() {\n if (this.charWidth != null) {\n return this.charWidth\n } else {\n return this.configCharWidth\n }\n }\n\n /**\n * Sets the char width for this Minimap. This value will override the value from the config for this instance only. A\n * `did-change-config` event is dispatched.\n *\n * @fires {did-change-config} when The value is changed\n * @param {number} charWidth The new width of a char in the Minimap\n */\n setCharWidth(charWidth) {\n this.charWidth = Math.floor(charWidth)\n this.emitter.emit(\"did-change-config\")\n }\n\n /**\n * Returns the height of a character in the Minimap in pixels.\n *\n * @returns {number} A character's height in the Minimap\n */\n getCharHeight() {\n if (this.charHeight != null) {\n return this.charHeight\n } else {\n return this.configCharHeight\n }\n }\n\n /**\n * Sets the char height for this Minimap. This value will override the value from the config for this instance only. A\n * `did-change-config` event is dispatched.\n *\n * @fires {did-change-config} when The value is changed\n * @param {number} charHeight The new height of a char in the Minimap\n */\n setCharHeight(charHeight) {\n this.charHeight = Math.floor(charHeight)\n this.emitter.emit(\"did-change-config\")\n }\n\n /**\n * Returns the height of an interline in the Minimap in pixels.\n *\n * @returns {number} The interline's height in the Minimap\n */\n getInterline() {\n if (this.interline != null) {\n return this.interline\n } else {\n return this.configInterline\n }\n }\n\n /**\n * Sets the interline height for this Minimap. This value will override the value from the config for this instance\n * only. A `did-change-config` event is dispatched.\n *\n * @fires {did-change-config} when The value is changed\n * @param {number} interline The new height of an interline in the Minimap\n */\n setInterline(interline) {\n this.interline = Math.floor(interline)\n this.emitter.emit(\"did-change-config\")\n }\n\n /**\n * Returns the status of devicePixelRatioRounding in the Minimap.\n *\n * @returns {boolean} The devicePixelRatioRounding status in the Minimap\n */\n getDevicePixelRatioRounding() {\n if (this.devicePixelRatioRounding != null) {\n return this.devicePixelRatioRounding\n } else {\n return this.configDevicePixelRatioRounding\n }\n }\n\n /**\n * Sets the devicePixelRatioRounding status for this Minimap. This value will override the value from the config for\n * this instance only. A `did-change-config` event is dispatched.\n *\n * @fires {did-change-config} when The value is changed\n * @param {boolean} devicePixelRatioRounding The new status of devicePixelRatioRounding in the Minimap\n */\n setDevicePixelRatioRounding(devicePixelRatioRounding) {\n this.devicePixelRatioRounding = devicePixelRatioRounding\n this.emitter.emit(\"did-change-config\")\n }\n\n /**\n * Returns the devicePixelRatio in the Minimap in pixels.\n *\n * @returns {number} The devicePixelRatio in the Minimap\n */\n getDevicePixelRatio() {\n if (this.getDevicePixelRatioRounding()) {\n if (devicePixelRatio >= 1) {\n return Math.round(devicePixelRatio)\n } else {\n return Math.max(Math.round(devicePixelRatio * 10) / 10, 0.1)\n }\n }\n return devicePixelRatio\n }\n\n /**\n * Returns the index of the first visible row in the Minimap.\n *\n * @returns {number} The index of the first visible row\n */\n getFirstVisibleScreenRow() {\n return Math.floor(this.getScrollTop() / this.getLineHeight())\n }\n\n /**\n * Returns the index of the last visible row in the Minimap.\n *\n * @returns {number} The index of the last visible row\n */\n getLastVisibleScreenRow() {\n return Math.ceil((this.getScrollTop() + this.getScreenHeight()) / this.getLineHeight())\n }\n\n /**\n * Returns true when the `independentMinimapScroll` setting have been enabled.\n *\n * @returns {boolean} Whether the minimap can scroll independently\n */\n scrollIndependentlyOnMouseWheel() {\n return this.independentMinimapScroll\n }\n\n /**\n * Returns the current scroll of the Minimap.\n *\n * The Minimap can scroll only when its height is greater that the height of its `TextEditor`.\n *\n * @returns {number} The scroll top of the Minimap\n */\n getScrollTop() {\n return this.standAlone || this.independentMinimapScroll ? this.scrollTop : this.getScrollTopFromEditor()\n }\n\n /**\n * Sets the minimap scroll top value when in stand-alone mode.\n *\n * @fires {did-change-scroll-top} if The Minimap's stand-alone mode is enabled\n * @param {number} scrollTop The new scroll top for the Minimap\n */\n setScrollTop(scrollTop) {\n this.scrollTop = Math.max(0, Math.min(this.getMaxScrollTop(), scrollTop))\n\n if (this.standAlone || this.independentMinimapScroll) {\n this.emitter.emit(\"did-change-scroll-top\", this)\n }\n }\n\n /**\n * Returns the minimap scroll as a ration between 0 and 1.\n *\n * @returns {number} The minimap scroll ratio\n */\n getScrollRatio() {\n return this.getScrollTop() / this.getMaxScrollTop()\n }\n\n /**\n * Updates the scroll top value with the one computed from the text editor when the minimap is in the independent\n * scrolling mode.\n *\n * @access private\n */\n updateScrollTop() {\n if (this.independentMinimapScroll) {\n try {\n this.setScrollTop(this.getScrollTopFromEditor())\n } catch (err) {}\n this.emitter.emit(\"did-change-scroll-top\", this)\n }\n }\n\n /**\n * Returns the scroll top as computed from the text editor scroll top.\n *\n * @returns {number} The computed scroll top value\n */\n getScrollTopFromEditor() {\n return Math.abs(this.getCapedTextEditorScrollRatio() * this.getMaxScrollTop())\n }\n\n /**\n * Returns the maximum scroll value of the Minimap.\n *\n * @returns {number} The maximum scroll top for the Minimap\n */\n getMaxScrollTop() {\n return Math.max(0, this.getHeight() - this.getScreenHeight())\n }\n\n /**\n * Returns `true` when the Minimap can scroll.\n *\n * @returns {boolean} Whether this Minimap can scroll or not\n */\n canScroll() {\n return this.getMaxScrollTop() > 0\n }\n\n /**\n * Updates the minimap scroll top value using a mouse event when the independent scrolling mode is enabled\n *\n * @param {MouseEvent} event The mouse wheel event\n * @access private\n */\n onMouseWheel(event) {\n if (this.scrollIndependentlyOnMouseWheel()) {\n event.stopPropagation()\n\n if (!this.canScroll()) {\n return\n }\n\n const { wheelDeltaY } = event\n const previousScrollTop = this.getScrollTop()\n const updatedScrollTop = previousScrollTop - Math.round(wheelDeltaY * this.scrollSensitivity)\n\n this.setScrollTop(updatedScrollTop)\n }\n }\n\n /**\n * Delegates to `TextEditor#getMarker`.\n *\n * @access private\n */\n getMarker(id) {\n return this.textEditor.getMarker(id)\n }\n\n /**\n * Delegates to `TextEditor#findMarkers`.\n *\n * @access private\n */\n findMarkers(o) {\n try {\n return this.textEditor.findMarkers(o)\n } catch (error) {\n return []\n }\n }\n\n /**\n * Delegates to `TextEditor#markBufferRange`.\n *\n * @access private\n */\n markBufferRange(range) {\n return this.textEditor.markBufferRange(range)\n }\n\n /**\n * Emits a change events with the passed-in changes as data.\n *\n * @param {Object} changes A change to dispatch\n * @access private\n */\n emitChanges(changes) {\n this.emitter.emit(\"did-change\", changes)\n }\n\n /**\n * Enables the cache at the adapter level to avoid consecutive access to the text editor API during a render phase.\n *\n * @access private\n */\n enableCache() {\n this.adapter.enableCache()\n }\n\n /**\n * Disable the adapter cache.\n *\n * @access private\n */\n clearCache() {\n this.adapter.clearCache()\n }\n\n editorDestroyed() {\n this.adapter.editorDestroyed()\n }\n\n /**\n * Get the DecorationManagement API for the current minimapElement\n *\n * @returns {DecorationManagement | undefined}\n */\n getDecorationManagement() {\n if (!this.DecorationManagement) {\n if (this.minimapElement?.DecorationManagement) {\n this.DecorationManagement = this.minimapElement.DecorationManagement\n }\n }\n return this.DecorationManagement\n }\n\n // Decoration API duplicated for backward compatibility in the service\n getDecorations() {\n return this.getDecorationManagement()?.getDecorations() ?? []\n }\n onDidAddDecoration(...args) {\n return this.getDecorationManagement()?.onDidAddDecoration(...args) ?? disposedDisposable\n }\n onDidRemoveDecoration(...args) {\n return this.getDecorationManagement()?.onDidRemoveDecoration(...args) ?? disposedDisposable\n }\n onDidChangeDecorationRange(...args) {\n return this.getDecorationManagement()?.onDidChangeDecorationRange(...args) ?? disposedDisposable\n }\n onDidUpdateDecoration(...args) {\n return this.getDecorationManagement()?.onDidUpdateDecoration(...args) ?? disposedDisposable\n }\n decorationForId(...args) {\n return this.getDecorationManagement()?.decorationForId(...args) ?? dummyDecoration\n }\n decorationsForScreenRowRange(...args) {\n return this.getDecorationManagement()?.decorationsForScreenRowRange(...args) ?? dummyDecoration\n }\n decorationsByTypeThenRows() {\n return this.getDecorationManagement()?.decorationsByTypeThenRows() ?? dummyDecoration\n }\n decorateMarker(...args) {\n return this.getDecorationManagement()?.decorateMarker(...args) ?? dummyDecoration\n }\n removeDecoration(...args) {\n return this.getDecorationManagement()?.removeDecoration(...args)\n }\n removeAllDecorationsForMarker(...args) {\n return this.getDecorationManagement()?.removeAllDecorationsForMarker(...args)\n }\n removeAllDecorations() {\n return this.getDecorationManagement()?.removeAllDecorations()\n }\n}\n","{\n \"plugins\": {\n \"type\": \"object\",\n \"properties\": {}\n },\n \"autoToggle\": {\n \"title\": \"Show Minimap On Atom Start\",\n \"type\": \"boolean\",\n \"default\": true,\n \"order\": 1\n },\n \"displayMinimapOnLeft\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"order\": 2\n },\n \"displayCodeHighlights\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"description\": \"Toggles the render of the buffer tokens in the minimap.\",\n \"order\": 3\n },\n \"displayPluginsControls\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"description\": \"You need to restart Atom for this setting to be effective.\",\n \"order\": 4\n },\n \"minimapScrollIndicator\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"description\": \"Toggles the display of a side line showing which part of the buffer is currently displayed by the minimap. This side line will only appear if the minimap is taller than the editor view height.\",\n \"order\": 5\n },\n \"adjustMinimapWidthToSoftWrap\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"description\": \"If this option is enabled and Soft Wrap is checked then the Minimap max width is set to the Preferred Line Length value.\",\n \"order\": 6\n },\n \"adjustMinimapWidthOnlyIfSmaller\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"description\": \"If this option and `adjustMinimapWidthToSoftWrap` are enabled the minimap width will never go past the limit sets by CSS. On the other hand, when disabled the minimap will expand to honor the preferred line width.\",\n \"order\": 7\n },\n \"ignoreWhitespacesInTokens\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"When enabled, text editor tokens are rendered as plain blocks, with no regards to the whitespaces they contains.\",\n \"order\": 8\n },\n \"charWidth\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0.5,\n \"order\": 9\n },\n \"charHeight\": {\n \"type\": \"number\",\n \"default\": 2,\n \"minimum\": 0.5,\n \"order\": 10\n },\n \"interline\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0,\n \"description\": \"The space between lines in the minimap in pixels.\",\n \"order\": 11\n },\n \"textOpacity\": {\n \"type\": \"number\",\n \"default\": 0.6,\n \"minimum\": 0,\n \"maximum\": 1,\n \"description\": \"The opacity used to render the line's text in the minimap.\",\n \"order\": 12\n },\n \"moveCursorOnMinimapClick\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"Moves the cursor to the beginning of the target line when clicking on the minimap\",\n \"order\": 13\n },\n \"independentMinimapScroll\": {\n \"type\": \"boolean\",\n \"title\": \"Independent Minimap Scroll On Mouse Wheel Events\",\n \"default\": false,\n \"description\": \"When enabled, using the mouse wheel over the Minimap will make it scroll independently of the text editor. The Minimap will still sync with the editor whenever the editor is scrolled, but it will no longer relay the mouse wheel events to the editor.\",\n \"order\": 14\n },\n \"scrollSensitivity\": {\n \"type\": \"number\",\n \"default\": 0.5,\n \"description\": \"The scrolling speed when the `Independent Minimap Scroll On Mouse Wheel Events` setting is enabled.\",\n \"order\": 15\n },\n \"smoothScrolling\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"Whether to offset the minimap canvas when scrolling to keep the scroll smooth. When `true` the minimap canvas will be offseted, resulting in a smoother scroll, but with the side-effect of a blurry minimap when the canvas is placed between pixels. When `false` the canvas will always stay at the same position, and will never look blurry, but the scroll will appear more jagged.\",\n \"order\": 16\n },\n \"createPluginInDevMode\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"order\": 17\n },\n \"absoluteMode\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"When enabled the text editor content will be able to flow below the minimap.\",\n \"order\": 18\n },\n \"adjustAbsoluteModeHeight\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"When enabled and `Absolute Mode` is also enabled, the minimap height will be adjusted to only take the space required by the text editor content, leaving the space below triggering mouse events on the text editor. **Be aware this can have some impact on performances as the minimap canvases will be resized every time a change in the editor make its height change.**\",\n \"order\": 19\n },\n \"redrawDelay\": {\n \"type\": \"number\",\n \"default\": 400,\n \"minimum\": 0,\n \"maximum\": 2000,\n \"description\": \"Controls how often (in ms) the minimap should redraw itself after changing the text editor's contents. Setting this to 100ms or higher could dramatically improve editor responsiveness when working with large files. A value of 0 will cause the minimap to redraw itself immediately on each change.\",\n \"order\": 20\n },\n \"devicePixelRatioRounding\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"description\": \"Toggles the rounding of the devicePixelRatio in the minimap.\",\n \"order\": 21\n },\n \"useHardwareAcceleration\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"order\": 22\n },\n \"scrollAnimation\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"Enables animations when scrolling by clicking on the minimap.\",\n \"order\": 23\n },\n \"scrollAnimationDuration\": {\n \"type\": \"integer\",\n \"default\": 300,\n \"description\": \"The duration of scrolling animations when clicking on the minimap.\",\n \"order\": 24\n },\n \"maxTokensInOneLine\": {\n \"type\": \"integer\",\n \"default\": 160,\n \"description\": \"The maximum number of tokens that are rendered for each line.\",\n \"order\": 25\n }\n}\n","module.exports = (Promise.resolve(__parcel__require__(\"./\" + \"minimap-plugin-generator-element.68264bbd.js\"))).then(() => parcelRequire('7DGKC'));"],"names":["$c115884e0d22db92$var$Batch","batch","size","topLevel","bottomLevel","add","level","fn","push","process","fns","i","length","$fa32758ee88faccf$var$getState","element","$6d18bad59564be96$var$isCollection","obj","Array","isArray","undefined","$6d18bad59564be96$var$toArray","collection","array","$6d18bad59564be96$var$isElement","nodeType","$6d18bad59564be96$var$getOption","options","name","defaultValue","value","$b8e4747dd2643008$var$drawToken","context","text","color","x","y","charWidth","charHeight","ignoreWhitespacesInTokens","fillStyle","fillRect","chars","j","len","$b8e4747dd2643008$var$drawLines","firstRow","lastRow","offsetRow","lineHeight","canvasWidth","editor","editorScreenLineCount","invisibleRegExp","getTokenColorClosure","maxTokensInOneLine","lastLine","Math","min","line","editorTokensForScreenRow","tokensForScreenRow","numTokenToRender","iToken","token","tokenText","replace","tokenScopes","scopes","clearRect","$b8e4747dd2643008$var$whitespaceTokenRegex","test","fill","$b8e4747dd2643008$var$drawHighlightDecoration","decoration","data","decorationColor","screenRow","yRow","range","getMarker","getScreenRange","rowSpan","end","row","start","column","$b8e4747dd2643008$var$drawDecorations","decorations","renderData","types","editorElement","decorationsToRender","concat","sort","a","b","orders","properties","plugin","i1","decorationDrawer","type","$b8e4747dd2643008$var$SPEC_MODE","$b8e4747dd2643008$var$thisSpec","split","pop","$b8e4747dd2643008$var$getDecorationColor","$b8e4747dd2643008$var$drawFrontDecorationsForLines","$b8e4747dd2643008$var$frontDecorationDispatcher","$b8e4747dd2643008$var$drawBackDecorationsForLines","$b8e4747dd2643008$var$backgroundDecorationDispatcher","$b8e4747dd2643008$var$getDefaultColor","textOpacity","$b8e4747dd2643008$var$transparentize","$f5d5169cf3665b3c$export$5a1b9b4471514194","retrieveStyleFromDom","opacity","slice","getProperties","scope","scopeString","$b8e4747dd2643008$var$computeIntactRanges","changes","offscreenFirstRow","offscreenLastRow","intactRanges","offscreenRow","change","newIntactRanges","intactLen","screenDelta","bufferDelta","splice","$b8e4747dd2643008$var$truncateIntactRanges","cls","mixins","forEach","mixin","target","source","Object","getOwnPropertyNames","k","indexOf","defineProperty","getOwnPropertyDescriptor","prototype","$53cad2f38dc94dfa$export$d5444027a5300500","document","createElement","createdCallback","$53cad2f38dc94dfa$var$extractMouseEventData","mouseEvent","pageX","pageY","isLeftMouse","button","isMiddleMouse","$53cad2f38dc94dfa$var$extractTouchEventData","touchEvent","touch","changedTouches","$53cad2f38dc94dfa$var$applyStyles","styles","cssText","property","style","$53cad2f38dc94dfa$var$makeTranslate","useHardwareAcceleration","$53cad2f38dc94dfa$var$makeScale","$53cad2f38dc94dfa$var$animate","from","to","duration","step","$53cad2f38dc94dfa$var$getTime","progress","update","passed","delta","cos","PI","$53cad2f38dc94dfa$var$swing","requestAnimationFrame","Date","$a2bdb9a40833a06c$export$ebfbbb668019d7d","$a2bdb9a40833a06c$export$3876a6d417bf565a","$a2bdb9a40833a06c$var$pluginsSubscriptions","$8oVWm$atom","CompositeDisposable","$f5d5169cf3665b3c$export$90754302e1771725","emit","atom","config","get","settingsKey","orderSettingsKey","$f5d5169cf3665b3c$export$72d60d6787dec2a1","plugins","title","description","default","set","observe","$a2bdb9a40833a06c$var$updatesPluginActivationState","order","$a2bdb9a40833a06c$var$updatePluginsOrderMap","commands","$a2bdb9a40833a06c$export$9dae37e811f49bac","$a2bdb9a40833a06c$var$registerPluginControls","$a2bdb9a40833a06c$export$33e397fa54e0ba78","dispose","$a2bdb9a40833a06c$var$unregisterPluginControls","boolean","$a2bdb9a40833a06c$export$414507dea83c9b8a","$a2bdb9a40833a06c$var$eachPlugin","deactivatePlugin","pluginActive","isActive","settingActive","$a2bdb9a40833a06c$export$f1b9a1ef9f3900b2","$a2bdb9a40833a06c$export$be4b8b58d47c32de","event","activatePlugin","$a2bdb9a40833a06c$var$pluginsOrderMap","$a2bdb9a40833a06c$export$c71e31a2e5cf863c","clamp","num","ceil","max","$f5d5169cf3665b3c$export$248d2ae871ff5519","$f5d5169cf3665b3c$var$active","$f5d5169cf3665b3c$var$subscriptionsOfCommands","$f5d5169cf3665b3c$export$bcfa2676ba9ce1bd","$f5d5169cf3665b3c$var$generatePlugin","$f5d5169cf3665b3c$export$688bdc66f19848c","Map","$3a0a68024c2561d0$exports","StyleReader","$f5d5169cf3665b3c$var$subscriptions","$f5d5169cf3665b3c$export$309cef9e90601bb4","model","$3fca545a8a4431b7$export$9099ad97b570f7c","getMinimapElement","setModel","$f5d5169cf3665b3c$export$16107cdecf94da4","destroy","clear","invalidateDOMStylesCache","$f5d5169cf3665b3c$var$toggled","$fb6c1701b1beaf1e$exports","packages","getLoadedPackage","metadata","configSchema","minimap","wasMaximized","isMaximized","width","height","getSize","setSize","maximize","debounceUpdateStyles","$bNORb","debounce","$f5d5169cf3665b3c$var$updateStyles","configName","workspace","observeTextEditors","textEditor","$f5d5169cf3665b3c$export$48529c32ca7d17e","minimapElement","attach","getElement","themes","onDidChangeActiveThemes","onDidUpdateStyleElement","onDidAddStyleElement","onDidRemoveStyleElement","storageName","today","previousWarning","window","localStorage","getItem","previousWarningDay","parse","getDay","setItem","notification","notifications","addWarning","dismissable","buttons","onDidClick","dismiss","removeItem","setTimeout","reload","$f5d5169cf3665b3c$var$initSubscriptions","async","template","createMinimapPluginGeneratorElement","parcelRequire","view","$f5d5169cf3665b3c$export$8d5685c7e2f510ea","callback","on","$f5d5169cf3665b3c$export$e61d22c84e4330d2","$f5d5169cf3665b3c$export$6c6787e55e6f9877","$f5d5169cf3665b3c$export$ac8ee1523216b301","$f5d5169cf3665b3c$export$bcafd5b6ea2ed821","$f5d5169cf3665b3c$export$564ff43b21a0c613","$f5d5169cf3665b3c$export$7d3323cef76e69b4","$f5d5169cf3665b3c$export$f6c60b821eda0ae1","$f5d5169cf3665b3c$export$e8c972a8462046c9","$f5d5169cf3665b3c$export$6219293574ffa87c","getModel","destroyed","editorSubscription","onDidDestroy","delete","$f5d5169cf3665b3c$export$22c0cf806cb9f138","standAlone","$f5d5169cf3665b3c$export$9cdb19f17572226a","getActiveTextEditor","$f5d5169cf3665b3c$export$5f3057d14f22e81","iterator","views","getView","requestForcedUpdate","$f5d5169cf3665b3c$export$ac630b8c2e0ab172","$f5d5169cf3665b3c$var$MinimapServiceV1","callbackProperties","decorateElementClass","decorateElementPrototype","deprecate","$parcel$global","__CUSTOM_HTML_ELEMENTS_CLASSES__","__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__","ref","this","apply","arguments","writable","enumerable","configurable","descriptor","module","exports","nodeName","elementClass","elementPrototype","klass","proto","class","create","HTMLElement","registerElement","Deprecation","Emitter","getRawStack","grim","__grim__","deprecations","emitter","includeDeprecatedAPIs","getDeprecations","deprecationsByLineNumber","deprecationsByPackage","fileName","lineNumber","packageName","_ref","getDeprecationsLength","clearDeprecations","logDeprecations","deprecation","_i","_len","getCallCount","console","warn","getOriginName","getMessage","message","deprecationSite","error","originalStackTraceLimit","stack","_base","_base1","_base2","_ref1","Error","stackTraceLimit","getFileName","getLineNumber","addStack","addSerializedDeprecation","serializedDeprecation","stacks","_ref2","deserialize","getStacks","eventName","originalPrepareStackTrace","result","prepareStackTrace","error1","captureStackTrace","Deprecation2","callCount","stackCount","stackCallCounts","getFunctionNameFromCallsite","callsite","_arg","functionName","isToplevel","getFunctionName","isConstructor","getMethodName","getTypeName","getLocationFromCallsite","location","isNative","isEval","getEvalOrigin","getColumnNumber","getFileNameFromCallSite","originName","parsedStack","parsedStacks","parseStack","getStackCount","callerLocation","map","_this","serialize","$4009cf857b1a0db5$export$f8a64eca85eddba3","$140450e4d3b90794$var$_defineProperties","props","key","$140450e4d3b90794$var$_createClass","Constructor","protoProps","staticProps","$140450e4d3b90794$var$Emitter","instance","TypeError","$140450e4d3b90794$var$_classCallCheck","disposed","exceptionHandler","exceptionHandlers","dispatch","exceptionHandlingDispatch","$c7PVU","simpleDispatch","handler","exception","subscriptions","$kGh8c","handlersByEventName","unshift","_this2","cleanup","remove","off","disposable","handlerToRemove","handlers","handlerIndex","handlersCopy","constructor","_this3","promises","Promise","all","then","resolve","keys","_arr","$8d3e6c4d8ebef6b7$var$_defineProperties","$8d3e6c4d8ebef6b7$var$_createClass","Disposable","disposalAction","$8d3e6c4d8ebef6b7$var$_classCallCheck","object","$f0e504c9129bac26$var$_classCallCheck","$f0e504c9129bac26$var$assertDisposable","$f0e504c9129bac26$var$Disposable","isDisposable","disposables","Set","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_step","_iterator","Symbol","next","done","err","return","_iteratorNormalCompletion2","_didIteratorError2","_iteratorError2","_step2","_iterator2","$f0e504c9129bac26$var$_defineProperties","Mixin","Ancestors1","static","node","selector","parents","eachParent","parent","matches","block","results","parentNode","queryParentSelectorAll","queryParentSelector","ExcludedClassProperties","ExcludedPrototypeProperties","Mixin1","Mixin2","extended","includeInto","name1","extend","hasOwnProperty","included","call","addDisposableEventListener","listener","addEventListener","removeEventListener","DisposableEvents","NO_SELECTOR","eachPair","EventsDelegation1","subscribeTo","events","disposablesForObject","eventsForObject","eventsMap","WeakMap","disposablesMap","createEventListener","unsubscribeFrom","e","decorateEvent","eachSelectorFromTarget","isPropagationStopped","nodeAndItsAncestors","eachSelector","matched","targetMatch","isImmediatePropagationStopped","overriddenStop","overriddenStopImmediate","Event","stopPropagation","stopImmediatePropagation","BabelSpacePenDSL","Builder","SelfClosingTags","SpacePenDSL","Tags","Template","tag","buildContent","content","SpacePenDSL1","super","__content__","__create__","__createdCallback__","useShadowRoot","__useShadowRoot__","html","root","buildHtml","shadowRoot","createShadowRoot","innerHTML","wireOutlets","querySelectorAll","getAttribute","removeAttribute","Babel","Template1","currentBuilder","subview","string","tagName","args","raw","postProcessingSteps","join","extractOptions","openTag","attributes","closeTag","attributeName","attributePairs","attributesString","escapedString","outletName","subviewId","idCounter","id","parentView","find","replaceWith","arg","$7b1d0d22ae907739$exports","requirePackages","reject","failures","remains","required","solved","pkg","failHandler","promise","reason","activatePackage","activatedPackage","mainModule","fail","catch","registerOrUpdateElement","Ancestors","AncestorsMethods","EventsDelegation","$e27756e80d3456aa$exports","$4126a37b7b890012$exports","getState","stateHandler","isDetectable","state","markAsDetectable","isBusy","busy","markBusy","$14907467737eb623$exports","idHandler","getListeners","eventListeners","removeListener","listeners","removeAllListeners","$dc17486e3f73c268$exports","idCount","generate","$314d20c68b0060ec$exports","idGenerator","$f756ef273b08d868$exports","quiet","noop","reporter","log","attachFunction","reporter1","f","$bba79ae1fbe8af4a$var$detector","$bba79ae1fbe8af4a$exports","isIE","version","agent","navigator","userAgent","toLowerCase","v","div","getElementsByTagName","undef","isLegacyOpera","opera","$a8a1ed366ee66f33$exports","getOption","$c115884e0d22db92$exports","processBatch","isProcessing","processingBatch","processBatchAsync","asyncFrameHandler","asyncProcess","autoProcess","force","localAsyncProcess","clearTimeout","$fa32758ee88faccf$exports","initState","cleanState","$87a38d28681eb947$exports","getObject","batchProcessor","makeDetectable","options1","element1","callback1","mutateDom","alterPositionStyles","position","setProperty","important","removeRelativeStyles","element2","style1","getNumericalValue","positionCheckPerformed","OBJECT_STYLE","tabIndex","setAttribute","onload","getDocument","callback2","contentDocument","checkForObjectDocumentTimeoutId","objectDocument","appendChild","seperator","trim","getComputedStyle","offsetWidth","offsetHeight","startSize","injectObject","addListener","listenerProxy","proxy","attachEvent","defaultView","uninstall","detachEvent","removeChild","$56acba7756bb2d7f$exports","initDocument","targetDocument","styleId1","containerClass","getElementById","containerAnimationClass","containerAnimationActiveClass","buildCssTextString","method","head","styleElement","injectStyle","injectScrollStyle","detectionContainerClass","rules","addEvent","el","cb","removeEvent","getExpandElement","container","childNodes","getShrinkElement","scrollbarSizes","child","body","insertBefore","firstChild","widthSize","clientWidth","heightSize","clientHeight","getScrollbarSizes","debug","isUnrendered","getStyle","elementStyle","top","right","bottom","left","widthCSS","heightCSS","storeStyle","storeCurrentSize","lastWidth","lastHeight","getWidthOffset","getHeightOffset","getExpandWidth","getExpandHeight","positionScrollbars","expand","shrink","expandWidth","expandHeight","shrinkWidth","getShrinkWidth","shrinkHeight","getShrinkHeight","scrollLeft","scrollTop","injectContainerElement","className","addAnimationClass","onAnimationStart","onRendered","injectScrollElements","onExpandScroll","onExpand","onShrinkScroll","onShrink","rootContainer","scrollbarWidth","scrollbarHeight","containerContainerStyle","containerStyle","expandStyle","shrinkStyle","expandChildStyle","shrinkChildStyle","containerContainer","expandChild","shrinkChild","dir","registerListenersAndPositionElements","updateChildSizes","getExpandChildElement","updateDetectorElements","sizeChanged","areElementsInjected","notifyListenersIfNeeded","lastNotifiedWidth","lastNotifiedHeight","handleScroll","finalizeDomMutation","ready","install","isInShadowRoot","getRootNode","contains","ownerDocument","$6d18bad59564be96$exports","defaultIdHandler","globalOptions","callOnAdd","detectionStrategy","eventListenerHandler","elementUtils","desiredStrategy","importantCssRules","strategyOptions","onReadyCallbacks","listenTo","elements","onResizeCallback","listener1","elementsReady","onReadyCallback","$6d18bad59564be96$require$forEach","$897bb86f9a1e9a48$export$65fceae9bba6a8b","$897bb86f9a1e9a48$export$9bb7a5221b670886","m","letter","$897bb86f9a1e9a48$export$a5dc91fc2243086a","wait","timeoutId","$be441a0e72726fcf$var$idCounter","decorationProperties","marker","setProperties","markerDestroyDisposable","screenRange","ref1","isDestroyed","onDidChangeProperties","getId","isType","$be441a0e72726fcf$export$9099ad97b570f7c","newProperties","oldProperties","initializeDecorations","decorationsById","decorationsByMarkerId","decorationMarkerChangedSubscriptions","decorationMarkerDestroyedSubscriptions","decorationUpdatedSubscriptions","decorationDestroyedSubscriptions","getDecorations","values","onDidAddDecoration","onDidRemoveDecoration","onDidChangeDecoration","onDidChangeDecorationRange","onDidUpdateDecoration","decorationForId","decorationsForScreenRowRange","startScreenRow","endScreenRow","markers","findMarkers","intersectsScreenRowRange","decorationsByTypeThenRows","decorationsByTypeThenRowsCache","cache","invalidateDecorationForScreenRowsCache","decorateMarker","decorationParams","filePath","re","RegExp","getPackageDirPaths","escapeRegExp","$parcel$interopDefault","$8oVWm$path","sep","$fb4cdef50b178155$var$getOriginatorPackageName","has","removeAllDecorationsForMarker","onDidChange","emitDecorationChanges","oldStart","oldTailScreenPosition","oldEnd","oldHeadScreenPosition","newStart","newTailScreenPosition","newEnd","newHeadScreenPosition","rangesDiffs","diffs","isLessThan","$fb4cdef50b178155$var$computeRangesDiffs","len1","emitRangeChanges","removeDecoration","editorDestroyed","lastRenderedScreenRow","getLastVisibleScreenRow","firstRenderedScreenRow","getFirstVisibleScreenRow","subscription","index","removedAllMarkerDecorations","removeAllDecorations","decorationMarkerChangedSubscriptionsValues","decorationMarkerDestroyedSubscriptionsValues","decoration1","decorationUpdatedSubscriptionsValues","decoration2","decorationDestroyedSubscriptionsValues","decoration3","decorationsByIdValues","decoration4","canvas","getContext","webkitImageSmoothingEnabled","imageSmoothingEnabled","offscreenCanvas","offscreenContext","resetOffscreenSize","copyToOffscreen","drawImage","copyFromOffscreen","copyPartFromOffscreen","srcY","destY","clearCanvas","$dd7yt","initializeCanvas","tokensLayer","$5b4cdfb0fb71ea54$export$9099ad97b570f7c","backLayer","frontLayer","pendingChanges","pendingBackDecorationChanges","pendingFrontDecorationChanges","getFrontCanvas","attachCanvases","setCanvasesSize","updateCanvas","devicePixelRatio","getDevicePixelRatio","getLineHeight","getCharHeight","getCharWidth","canvasHeight","getTextEditor","getTextEditorElement","displayCodeHighlights","$b8e4747dd2643008$var$getTokenColor","intact","currentRow","$b8e4747dd2643008$var$updateTokensLayer","getScreenLineCount","invisibles","getInvisibles","regexp","cr","eol","space","tab","filter","s","$b8e4747dd2643008$var$getInvisibleRegExp","DecorationManagement","drawCustomDecorationLambda","renderRoutine","render","$b8e4747dd2643008$var$drawCustomDecoration","$b8e4747dd2643008$var$updateBackDecorationsLayer","$b8e4747dd2643008$var$updateFrontDecorationsLayer","gutter","bottomWidth","colSpan","xBottomStart","xEnd","xStart","yStart","yEnd","elementName","customElements","define","$fed13eceec8038ca$var$MinimapQuickSettingsElement","$2b7cf8aaaa8b8e6d$export$9099ad97b570f7c","$9jcTZ","input","outlet","ol","li","selectedItem","itemsActions","codeHighlights","classList","toggle","absoluteMode","adjustAbsoluteModeHeight","addItemFor","removeItemFor","activateItem","deactivateItem","selectPreviousItem","selectNextItem","toggleSelectedItem","mousedown","preventDefault","hiddenInput","focusout","passive","onLeftButton","onRightButton","bool","initList","focus","itemsDisposables","nextSibling","list","previousSibling","lastChild","item","action","textContent","separator","initClass","$53cad2f38dc94dfa$var$elementResizeDetector","strategy","$53cad2f38dc94dfa$var$MinimapElement","$b8e4747dd2643008$export$9099ad97b570f7c","visibleAreaSubscription","quickSettingsSubscription","dragSubscription","openQuickSettingSubscription","minimapScrollIndicator","displayMinimapOnLeft","displayPluginsControls","adjustToSoftWrap","visibleArea","controls","scrollIndicator","openQuickSettings","quickSettingsElement","$fb4cdef50b178155$export$9099ad97b570f7c","attached","attachedToTextEditor","wasVisible","frameRequested","flexBasis","initializeContent","updateMinimapFlexPosition","measureHeightAndWidth","initializeScrollIndicator","disposeScrollIndicator","requestUpdate","initializeOpenQuickSettings","disposeOpenQuickSettings","smoothScrolling","adjustOnlyIfSmaller","connectedCallback","pollDocument","pollDOM","intersectionObserver","IntersectionObserver","entries","intersectionRect","isVisible","measureDimensions","subscribeToMediaQuery","disconnectedCallback","minimaps","detach","createVisibleArea","createControls","mousewheel","onMouseWheel","canvasPressed","touchstart","startDrag","removeVisibleArea","removeControls","$fed13eceec8038ca$export$d036fd3679135b51","getBoundingClientRect","getDecorationManagement","onDidChangeScrollTop","onDidChangeScrollLeft","onDidChangeConfig","onDidChangeStandAlone","setStandAlone","isStandAlone","setScreenHeightAndWidth","enableCache","visibleAreaLeft","getTextEditorScaledScrollLeft","visibleAreaTop","getTextEditorScaledScrollTop","getScrollTop","visibleWidth","round","getTextEditorScaledHeight","transform","canvasTop","canvasTransform","scale","canScroll","minimapScreenHeight","getScreenHeight","indicatorHeight","getHeight","indicatorScroll","getScrollRatio","updateCanvasesSize","clearCache","setDisplayCodeHighlights","visibilityChanged","checkForVisibilityChange","forceUpdate","safeFlexBasis","wasResized","lineLength","softWrap","softWrapAtPreferredLineLength","maxCanvasHeight","newHeight","canvasLeftMousePressed","canvasMiddleMousePressed","deltaY","floor","textEditorElement","getLineHeightInPixels","getTextEditorHeight","textEditorScrollTop","pixelPositionForScreenPosition","setCursorScreenPosition","independentScroll","scrollIndependentlyOnMouseWheel","getTextEditorScrollTop","minimapFrom","minimapTo","getTextEditorMaxScrollTop","getMaxScrollTop","now","t","setTextEditorScrollTop","setScrollTop","offsetTop","ratio","getVisibleHeight","mediaQuery","matchMedia","mediaListener","initial","dragOffset","mousemoveHandler","drag","dragendHandler","endDrag","touchmoveHandler","useCache","heightCache","scrollTopCache","scrollLeftCache","maxScrollTopCache","computeScrollTop","Number","isNaN","lineTop","getScrollLeft","maxScrollTop","parseFloat","getVersion","scrollPastEnd","getScrollHeight","component","$3fca545a8a4431b7$var$nextModelId","$3fca545a8a4431b7$var$disposedDisposable","$3fca545a8a4431b7$var$dummyDecoration","Range","adapter","configCharHeight","configCharWidth","interline","configInterline","devicePixelRatioRounding","configDevicePixelRatioRounding","redrawDelay","pendingChangeEvents","flushChangesTimer","$8ef502dd0e8fe6c2$export$9099ad97b570f7c","configSubscription","subscribeToConfig","onDidChangeGrammar","ignoreTextEditorScroll","inChangeScrollTop","updateScrollTop","scheduleChanges","onDidTokenize","requestFlushChanges","flushChanges","emitChanges","requestedFlushChanges","cancelAnimationFrame","subs","opts","getRootScopeDescriptor","independentMinimapScroll","scrollSensitivity","cdprr","getVerticalScaleFactor","getHorizontalScaleFactor","getTextEditorScrollLeft","getTextEditorScrollRatio","getCapedTextEditorScrollRatio","getWidth","getMaxScreenLineLength","getVisibleWidth","getScreenWidth","getDefaultCharWidth","getInterline","setCharWidth","setCharHeight","setInterline","getDevicePixelRatioRounding","setDevicePixelRatioRounding","getScrollTopFromEditor","abs","wheelDeltaY","previousScrollTop","o","markBufferRange","ref5","ref6","ref7","ref8","ref9","ref10","ref11","ref12","ref13","ref14","ref15","ref16","ref17","ref18","ref19","ref20","ref21","ref22","ref23","JSON","domStylesCache","dummyNode","targetNode","getFromCache","cachedData","ensureDummyNodeExistence","dotRegexp","getPropertyValue","includes","match","rStr","gStr","bStr","aStr","hueMatch","hueStr","r","g","hue","angle","matrix","lumR","lumG","lumB","sin","rotate","rotateHue","visibility","require","registerPlugin","unregisterPlugin","togglePluginActivation","deactivateAllPlugins","getPluginsOrder"],"version":3,"file":"main.js.map"} \ No newline at end of file +{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kCAAkC;AACjC,CAAA;IACC,IAAI,oBAAoB,sBAAsB,0BAA0B;IAEvE,CAAA,aAAC,SAAS,EAAC,GAAG,wBAAc;IAE7B,IAAI,eAAO,gCAAgC,IAAI,MAAM;QACnD,eAAO,qCAAqC,GAAG,eAAO,gCAAgC;QACtF,OAAO,eAAO,gCAAgC;IAChD,OACE,IAAI,eAAO,qCAAqC,IAAI,MAClD,eAAO,qCAAqC,GAAG,CAAC;IAIpD,qBAAqB;QAAC;QAAmB;QAAoB;QAAoB;KAA2B;IAE5G,2BAA2B,SAAS,MAAM,EAAE,MAAM;QAChD,mBAAmB,OAAO,CAAC,SAAS,CAAC;YACnC,OAAO,OAAO,cAAc,CAAC,QAAQ,GAAG;gBACtC,OAAO;oBACL,IAAI;oBACJ,OAAO,AAAC,CAAA,MAAM,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,AAAD,KAAM,OAAO,IAAI,KAAK,CAAC,IAAI,EAAE,aAAa,KAAK;gBAC5E;gBACA,UAAU;gBACV,YAAY;gBACZ,cAAc;YAChB;QACF;QACA,OAAO,OAAO,mBAA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CAAC;QACvB,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,mBAAmB;IACjD;AACF;AAEA,8CAA8C;AAC9C,MAAM,yCAAmB;yBACvB;qBACA;mBACA;qBACA;wBACA;oBACA;uBACA;yBACA;2BACA;4BACA;kBACA;6BACA;sBACA;gCACA;sBACA;qBACA;IACA,gBAAgB;IAChB,kBAAkB;IAClB,wBAAwB;IACxB,sBAAsB;IACtB,gBAAgB;IAChB,kBAAkB;IAClB,iBAAiB;AACnB;AAOO,SAAS;IACd,OAAO;AACT","sources":["node_modules/atom-utils-plus/lib/register-or-update-element.js","node_modules/grim/lib/grim.js","node_modules/grim/lib/deprecation.js","node_modules/event-kit/dist/event-kit.js","node_modules/event-kit/dist/emitter.js","node_modules/event-kit/dist/disposable.js","node_modules/event-kit/dist/composite-disposable.js","node_modules/atom-utils-plus/lib/mixins/ancestors.js","node_modules/mixto/lib/mixin.js","node_modules/atom-utils-plus/lib/mixins/disposable-events.js","node_modules/atom-utils-plus/lib/mixins/events-delegation.js","node_modules/atom-utils-plus/lib/mixins/space-pen-dsl.js","lib/deps/underscore-plus.js","lib/decorators/element.js","../../../../usr/lib/node_modules/parcel/node_modules/@parcel/runtime-js/lib/runtime-019a0d232f6b0f32.js","lib/main.js","lib/minimap-element.js","node_modules/atom-utils-plus/lib/atom-utils.js","node_modules/element-resize-detector/src/element-resize-detector.js","node_modules/element-resize-detector/src/collection-utils.js","node_modules/element-resize-detector/src/element-utils.js","node_modules/element-resize-detector/src/listener-handler.js","node_modules/element-resize-detector/src/id-generator.js","node_modules/element-resize-detector/src/id-handler.js","node_modules/element-resize-detector/src/reporter.js","node_modules/element-resize-detector/src/browser-detector.js","node_modules/batch-processor/src/batch-processor.js","node_modules/batch-processor/src/utils.js","node_modules/element-resize-detector/src/state-handler.js","node_modules/element-resize-detector/src/detection-strategy/object.js","node_modules/element-resize-detector/src/detection-strategy/scroll.js","lib/decoration-management.js","lib/decoration.js","lib/mixins/canvas-drawer.js","lib/canvas-layer.js","lib/decorators/include.js","lib/minimap-quick-settings-element.js","lib/minimap.js","lib/adapters/stable-adapter.js","lib/config.json","lib/plugin-management.js","lib/performance-monitor.js","node_modules/atom-ide-base/commons-ui/dom-style-reader.js","node_modules/atom-ide-base/src-commons-ui/dom-style-reader.ts"],"sourcesContent":["// Generated by CoffeeScript 2.5.1\n(function() {\n var callbackProperties, decorateElementClass, decorateElementPrototype, deprecate;\n\n ({deprecate} = require('grim'));\n\n if (global.__CUSTOM_HTML_ELEMENTS_CLASSES__ != null) {\n global.__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__ = global.__CUSTOM_HTML_ELEMENTS_CLASSES__;\n delete global.__CUSTOM_HTML_ELEMENTS_CLASSES__;\n } else {\n if (global.__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__ == null) {\n global.__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__ = {};\n }\n }\n\n callbackProperties = ['createdCallback', 'attachedCallback', 'detachedCallback', 'attributeChangedCallback'];\n\n decorateElementPrototype = function(target, source) {\n callbackProperties.forEach(function(k) {\n return Object.defineProperty(target, k, {\n value: function() {\n var ref;\n return (ref = this[`__${k}`]) != null ? ref.apply(this, arguments) : void 0;\n },\n writable: true,\n enumerable: true,\n configurable: true\n });\n });\n return Object.getOwnPropertyNames(source).forEach(function(k) {\n var descriptor;\n if (k === 'constructor') {\n return;\n }\n descriptor = Object.getOwnPropertyDescriptor(source, k);\n if (callbackProperties.indexOf(k) > -1) {\n return Object.defineProperty(target, `__${k}`, descriptor);\n } else {\n return Object.defineProperty(target, k, descriptor);\n }\n });\n };\n\n decorateElementClass = function(target, source) {\n return Object.getOwnPropertyNames(source).forEach(function(k) {\n var descriptor;\n if (k === 'length' || k === 'name' || k === 'arguments' || k === 'caller' || k === 'prototype') {\n return;\n }\n descriptor = Object.getOwnPropertyDescriptor(source, k);\n return Object.defineProperty(target, k, descriptor);\n });\n };\n\n module.exports = function(nodeName, options) {\n var elementClass, elementPrototype, klass, proto, ref;\n ({\n class: klass\n } = options);\n if (klass != null) {\n proto = klass.prototype;\n } else {\n proto = (ref = options.prototype) != null ? ref : options;\n }\n if (proto === options) {\n deprecate('Using the prototype as the second argument is deprecated, use the prototype option instead');\n }\n if (__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__[nodeName]) {\n elementClass = __ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__[nodeName];\n decorateElementPrototype(elementClass.prototype, proto);\n if (klass != null) {\n decorateElementClass(elementClass, klass);\n }\n return elementClass;\n } else {\n elementPrototype = Object.create(HTMLElement.prototype);\n decorateElementPrototype(elementPrototype, proto);\n elementClass = document.registerElement(nodeName, {\n prototype: Object.create(elementPrototype)\n });\n if (klass != null) {\n decorateElementClass(elementClass, klass);\n }\n return __ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__[nodeName] = elementClass;\n }\n };\n\n}).call(this);\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVnaXN0ZXItb3ItdXBkYXRlLWVsZW1lbnQuanMiLCJzb3VyY2VSb290IjoiLi4iLCJzb3VyY2VzIjpbImxpYi9yZWdpc3Rlci1vci11cGRhdGUtZWxlbWVudC5jb2ZmZWUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQUEsTUFBQSxrQkFBQSxFQUFBLG9CQUFBLEVBQUEsd0JBQUEsRUFBQTs7RUFBQSxDQUFBLENBQUMsU0FBRCxDQUFBLEdBQWMsT0FBQSxDQUFRLE1BQVIsQ0FBZDs7RUFFQSxJQUFHLCtDQUFIO0lBQ0UsTUFBTSxDQUFDLHFDQUFQLEdBQStDLE1BQU0sQ0FBQztJQUN0RCxPQUFPLE1BQU0sQ0FBQyxpQ0FGaEI7R0FBQSxNQUFBOztNQUlFLE1BQU0sQ0FBQyx3Q0FBeUMsQ0FBQTtLQUpsRDs7O0VBTUEsa0JBQUEsR0FBcUIsQ0FDbkIsaUJBRG1CLEVBRW5CLGtCQU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GFzcyhlbGVtZW50Q2xhc3MsIGtsYXNzKSBpZiBrbGFzcz9cblxuICAgIF9fQVRPTV9VVElMU19DVVNUT01fRUxFTUVOVF9DTEFTU0VTX19bbm9kZU5hbWVdID0gZWxlbWVudENsYXNzXG4iXX0=\n//# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/register-or-update-element.coffee","(function() {\n var Deprecation, Emitter, getRawStack, grim;\n\n Deprecation = require('./deprecation');\n\n if (global.__grim__ == null) {\n Emitter = require('event-kit').Emitter;\n grim = global.__grim__ = {\n deprecations: {},\n emitter: new Emitter,\n includeDeprecatedAPIs: true,\n getDeprecations: function() {\n var deprecation, deprecations, deprecationsByLineNumber, deprecationsByPackage, fileName, lineNumber, packageName, _ref;\n deprecations = [];\n _ref = grim.deprecations;\n for (fileName in _ref) {\n deprecationsByLineNumber = _ref[fileName];\n for (lineNumber in deprecationsByLineNumber) {\n deprecationsByPackage = deprecationsByLineNumber[lineNumber];\n for (packageName in deprecationsByPackage) {\n deprecation = deprecationsByPackage[packageName];\n deprecations.push(deprecation);\n }\n }\n }\n return deprecations;\n },\n getDeprecationsLength: function() {\n return this.getDeprecations().length;\n },\n clearDeprecations: function() {\n grim.deprecations = {};\n },\n logDeprecations: function() {\n var deprecation, deprecations, _i, _len;\n deprecations = this.getDeprecations();\n deprecations.sort(function(a, b) {\n return b.getCallCount() - a.getCallCount();\n });\n console.warn(\"\\nCalls to deprecated functions\\n-----------------------------\");\n for (_i = 0, _len = deprecations.length; _i < _len; _i++) {\n deprecation = deprecations[_i];\n console.warn(\"(\" + (deprecation.getCallCount()) + \") \" + (deprecation.getOriginName()) + \" : \" + (deprecation.getMessage()), deprecation);\n }\n },\n deprecate: function(message, metadata) {\n var deprecation, deprecationSite, error, fileName, lineNumber, originalStackTraceLimit, packageName, stack, _base, _base1, _base2, _ref, _ref1;\n originalStackTraceLimit = Error.stackTraceLimit;\n try {\n Error.stackTraceLimit = 7;\n error = new Error;\n stack = (_ref = typeof error.getRawStack === \"function\" ? error.getRawStack() : void 0) != null ? _ref : getRawStack(error);\n stack = stack.slice(1);\n } finally {\n Error.stackTraceLimit = originalStackTraceLimit;\n }\n deprecationSite = stack[0];\n fileName = deprecationSite.getFileName();\n lineNumber = deprecationSite.getLineNumber();\n packageName = (_ref1 = metadata != null ? metadata.packageName : void 0) != null ? _ref1 : \"\";\n if ((_base = grim.deprecations)[fileName] == null) {\n _base[fileName] = {};\n }\n if ((_base1 = grim.deprecations[fileName])[lineNumber] == null) {\n _base1[lineNumber] = {};\n }\n if ((_base2 = grim.deprecations[fileName][lineNumber])[packageName] == null) {\n _base2[packageName] = new Deprecation(message);\n }\n deprecation = grim.deprecations[fileName][lineNumber][packageName];\n deprecation.addStack(stack, metadata);\n grim.emitter.emit(\"updated\", deprecation);\n },\n addSerializedDeprecation: function(serializedDeprecation) {\n var deprecation, fileName, lineNumber, message, packageName, stack, stacks, _base, _base1, _base2, _i, _len, _ref, _ref1, _ref2;\n deprecation = Deprecation.deserialize(serializedDeprecation);\n message = deprecation.getMessage();\n fileName = deprecation.fileName, lineNumber = deprecation.lineNumber;\n stacks = deprecation.getStacks();\n packageName = (_ref = (_ref1 = stacks[0]) != null ? (_ref2 = _ref1.metadata) != null ? _ref2.packageName : void 0 : void 0) != null ? _ref : \"\";\n if ((_base = grim.deprecations)[fileName] == null) {\n _base[fileName] = {};\n }\n if ((_base1 = grim.deprecations[fileName])[lineNumber] == null) {\n _base1[lineNumber] = {};\n }\n if ((_base2 = grim.deprecations[fileName][lineNumber])[packageName] == null) {\n _base2[packageName] = new Deprecation(message, fileName, lineNumber);\n }\n deprecation = grim.deprecations[fileName][lineNumber][packageName];\n for (_i = 0, _len = stacks.length; _i < _len; _i++) {\n stack = stacks[_i];\n deprecation.addStack(stack, stack.metadata);\n }\n grim.emitter.emit(\"updated\", deprecation);\n },\n on: function(eventName, callback) {\n return grim.emitter.on(eventName, callback);\n }\n };\n }\n\n getRawStack = function(error) {\n var originalPrepareStackTrace, result;\n originalPrepareStackTrace = Error.prepareStackTrace;\n Error.prepareStackTrace = function(error, stack) {\n return stack;\n };\n Error.captureStackTrace(error, getRawStack);\n result = error.stack;\n Error.prepareStackTrace = originalPrepareStackTrace;\n return result;\n };\n\n module.exports = global.__grim__;\n\n}).call(this);\n","(function() {\n var Deprecation, SourceMapCache;\n\n SourceMapCache = {};\n\n module.exports = Deprecation = (function() {\n Deprecation.getFunctionNameFromCallsite = function(callsite) {};\n\n Deprecation.deserialize = function(_arg) {\n var deprecation, fileName, lineNumber, message, stack, stacks, _i, _len;\n message = _arg.message, fileName = _arg.fileName, lineNumber = _arg.lineNumber, stacks = _arg.stacks;\n deprecation = new Deprecation(message, fileName, lineNumber);\n for (_i = 0, _len = stacks.length; _i < _len; _i++) {\n stack = stacks[_i];\n deprecation.addStack(stack, stack.metadata);\n }\n return deprecation;\n };\n\n function Deprecation(message, fileName, lineNumber) {\n this.message = message;\n this.fileName = fileName;\n this.lineNumber = lineNumber;\n this.callCount = 0;\n this.stackCount = 0;\n this.stacks = {};\n this.stackCallCounts = {};\n }\n\n Deprecation.prototype.getFunctionNameFromCallsite = function(callsite) {\n var _ref, _ref1, _ref2;\n if (callsite.functionName != null) {\n return callsite.functionName;\n }\n if (callsite.isToplevel()) {\n return (_ref = callsite.getFunctionName()) != null ? _ref : '';\n } else {\n if (callsite.isConstructor()) {\n return \"new \" + (callsite.getFunctionName());\n } else if (callsite.getMethodName() && !callsite.getFunctionName()) {\n return callsite.getMethodName();\n } else {\n return \"\" + (callsite.getTypeName()) + \".\" + ((_ref1 = (_ref2 = callsite.getMethodName()) != null ? _ref2 : callsite.getFunctionName()) != null ? _ref1 : '');\n }\n }\n };\n\n Deprecation.prototype.getLocationFromCallsite = function(callsite) {\n var column, fileName, line;\n if (callsite == null) {\n return \"unknown\";\n }\n if (callsite.location != null) {\n return callsite.location;\n }\n if (callsite.isNative()) {\n return \"native\";\n } else if (callsite.isEval()) {\n return \"eval at \" + (this.getLocationFromCallsite(callsite.getEvalOrigin()));\n } else {\n fileName = callsite.getFileName();\n line = callsite.getLineNumber();\n column = callsite.getColumnNumber();\n return \"\" + fileName + \":\" + line + \":\" + column;\n }\n };\n\n Deprecation.prototype.getFileNameFromCallSite = function(callsite) {\n var _ref;\n return (_ref = callsite.fileName) != null ? _ref : callsite.getFileName();\n };\n\n Deprecation.prototype.getOriginName = function() {\n return this.originName;\n };\n\n Deprecation.prototype.getMessage = function() {\n return this.message;\n };\n\n Deprecation.prototype.getStacks = function() {\n var location, parsedStack, parsedStacks, stack, _ref;\n parsedStacks = [];\n _ref = this.stacks;\n for (location in _ref) {\n stack = _ref[location];\n parsedStack = this.parseStack(stack);\n parsedStack.callCount = this.stackCallCounts[location];\n parsedStack.metadata = stack.metadata;\n parsedStacks.push(parsedStack);\n }\n return parsedStacks;\n };\n\n Deprecation.prototype.getStackCount = function() {\n return this.stackCount;\n };\n\n Deprecation.prototype.getCallCount = function() {\n return this.callCount;\n };\n\n Deprecation.prototype.addStack = function(stack, metadata) {\n var callerLocation, _base, _base1;\n if (this.originName == null) {\n this.originName = this.getFunctionNameFromCallsite(stack[0]);\n }\n if (this.fileName == null) {\n this.fileName = this.getFileNameFromCallSite(stack[0]);\n }\n if (this.lineNumber == null) {\n this.lineNumber = typeof (_base = stack[0]).getLineNumber === \"function\" ? _base.getLineNumber() : void 0;\n }\n this.callCount++;\n stack.metadata = metadata;\n callerLocation = this.getLocationFromCallsite(stack[1]);\n if (this.stacks[callerLocation] == null) {\n this.stacks[callerLocation] = stack;\n this.stackCount++;\n }\n if ((_base1 = this.stackCallCounts)[callerLocation] == null) {\n _base1[callerLocation] = 0;\n }\n return this.stackCallCounts[callerLocation]++;\n };\n\n Deprecation.prototype.parseStack = function(stack) {\n return stack.map((function(_this) {\n return function(callsite) {\n return {\n functionName: _this.getFunctionNameFromCallsite(callsite),\n location: _this.getLocationFromCallsite(callsite),\n fileName: _this.getFileNameFromCallSite(callsite)\n };\n };\n })(this));\n };\n\n Deprecation.prototype.serialize = function() {\n return {\n message: this.getMessage(),\n lineNumber: this.lineNumber,\n fileName: this.fileName,\n stacks: this.getStacks()\n };\n };\n\n return Deprecation;\n\n })();\n\n}).call(this);\n","\"use strict\";\n\nexports.Emitter = require(\"./emitter\");\nexports.Disposable = require(\"./disposable\");\nexports.CompositeDisposable = require(\"./composite-disposable\");","\"use strict\";\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar Disposable = require(\"./disposable\");\n\nvar CompositeDisposable = require(\"./composite-disposable\"); // Essential: Utility class to be used when implementing event-based APIs that\n// allows for handlers registered via `::on` to be invoked with calls to\n// `::emit`. Instances of this class are intended to be used internally by\n// classes that expose an event-based API.\n//\n// For example:\n//\n// ```js\n// class User {\n// constructor() {\n// this.emitter = new Emitter()\n// }\n//\n// onDidChangeName(callback) {\n// this.emitter.on('did-change-name', callback)\n// }\n//\n// setName(name) {\n// if (name !== this.name) {\n// this.name = name\n// this.emitter.emit('did-change-name', name)\n// }\n//\n// return this.name\n// }\n// }\n// ```\n\n\nvar Emitter =\n/*#__PURE__*/\nfunction () {\n _createClass(Emitter, null, [{\n key: \"onEventHandlerException\",\n value: function onEventHandlerException(exceptionHandler) {\n var _this = this;\n\n if (this.exceptionHandlers.length === 0) {\n this.dispatch = this.exceptionHandlingDispatch;\n }\n\n this.exceptionHandlers.push(exceptionHandler);\n return new Disposable(function () {\n _this.exceptionHandlers.splice(_this.exceptionHandlers.indexOf(exceptionHandler), 1);\n\n if (_this.exceptionHandlers.length === 0) {\n return _this.dispatch = _this.simpleDispatch;\n }\n });\n }\n }, {\n key: \"simpleDispatch\",\n value: function simpleDispatch(handler, value) {\n return handler(value);\n }\n }, {\n key: \"exceptionHandlingDispatch\",\n value: function exceptionHandlingDispatch(handler, value) {\n try {\n return handler(value);\n } catch (exception) {\n return this.exceptionHandlers.map(function (exceptionHandler) {\n return exceptionHandler(exception);\n });\n }\n }\n /*\n Section: Construction and Destruction\n */\n // Public: Construct an emitter.\n //\n // ```js\n // this.emitter = new Emitter()\n // ```\n\n }]);\n\n function Emitter() {\n _classCallCheck(this, Emitter);\n\n this.disposed = false;\n this.clear();\n } // Public: Clear out any existing subscribers.\n\n\n _createClass(Emitter, [{\n key: \"clear\",\n value: function clear() {\n if (this.subscriptions != null) {\n this.subscriptions.dispose();\n }\n\n this.subscriptions = new CompositeDisposable();\n this.handlersByEventName = {};\n } // Public: Unsubscribe all handlers.\n\n }, {\n key: \"dispose\",\n value: function dispose() {\n this.subscriptions.dispose();\n this.handlersByEventName = null;\n this.disposed = true;\n }\n /*\n Section: Event Subscription\n */\n // Public: Register the given handler function to be invoked whenever events by\n // the given name are emitted via {::emit}.\n //\n // * `eventName` {String} naming the event that you want to invoke the handler\n // when emitted.\n // * `handler` {Function} to invoke when {::emit} is called with the given\n // event name.\n //\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\n\n }, {\n key: \"on\",\n value: function on(eventName, handler, unshift) {\n var _this2 = this;\n\n if (unshift == null) {\n unshift = false;\n }\n\n if (this.disposed) {\n throw new Error(\"Emitter has been disposed\");\n }\n\n if (typeof handler !== \"function\") {\n throw new Error(\"Handler must be a function\");\n }\n\n var currentHandlers = this.handlersByEventName[eventName];\n\n if (currentHandlers) {\n if (unshift) {\n this.handlersByEventName[eventName].unshift(handler);\n } else {\n this.handlersByEventName[eventName].push(handler);\n }\n } else {\n this.handlersByEventName[eventName] = [handler];\n } // When the emitter is disposed, we want to dispose of all subscriptions.\n // However, we also need to stop tracking disposables when they're disposed\n // from outside, otherwise this class will hold references to all the\n // disposables it created (instead of just the active ones).\n\n\n var cleanup = new Disposable(function () {\n _this2.subscriptions.remove(cleanup);\n\n return _this2.off(eventName, handler);\n });\n this.subscriptions.add(cleanup);\n return cleanup;\n } // Public: Register the given handler function to be invoked the next time an\n // events with the given name is emitted via {::emit}.\n //\n // * `eventName` {String} naming the event that you want to invoke the handler\n // when emitted.\n // * `handler` {Function} to invoke when {::emit} is called with the given\n // event name.\n //\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\n\n }, {\n key: \"once\",\n value: function once(eventName, handler, unshift) {\n if (unshift == null) {\n unshift = false;\n }\n\n var wrapped = function wrapped(value) {\n disposable.dispose();\n return handler(value);\n };\n\n var disposable = this.on(eventName, wrapped, unshift);\n return disposable;\n } // Public: Register the given handler function to be invoked *before* all\n // other handlers existing at the time of subscription whenever events by the\n // given name are emitted via {::emit}.\n //\n // Use this method when you need to be the first to handle a given event. This\n // could be required when a data structure in a parent object needs to be\n // updated before third-party event handlers registered on a child object via a\n // public API are invoked. Your handler could itself be preempted via\n // subsequent calls to this method, but this can be controlled by keeping\n // methods based on `::preempt` private.\n //\n // * `eventName` {String} naming the event that you want to invoke the handler\n // when emitted.\n // * `handler` {Function} to invoke when {::emit} is called with the given\n // event name.\n //\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\n\n }, {\n key: \"preempt\",\n value: function preempt(eventName, handler) {\n return this.on(eventName, handler, true);\n } // Private: Used by the disposable.\n\n }, {\n key: \"off\",\n value: function off(eventName, handlerToRemove) {\n if (this.disposed) {\n return;\n }\n\n var handlers = this.handlersByEventName[eventName];\n\n if (handlers) {\n var handlerIndex = handlers.indexOf(handlerToRemove);\n\n if (handlerIndex >= 0) {\n handlers.splice(handlerIndex, 1);\n }\n\n if (handlers.length === 0) {\n delete this.handlersByEventName[eventName];\n }\n }\n }\n /*\n Section: Event Emission\n */\n // Public: Invoke handlers registered via {::on} for the given event name.\n //\n // * `eventName` The name of the event to emit. Handlers registered with {::on}\n // for the same name will be invoked.\n // * `value` Callbacks will be invoked with this value as an argument.\n\n }, {\n key: \"emit\",\n value: function emit(eventName, value) {\n var handlers = this.handlersByEventName && this.handlersByEventName[eventName];\n\n if (handlers) {\n // create a copy of `handlers` so that if any handler mutates `handlers`\n // (e.g. by calling `on` on this same emitter), this does not result in\n // changing the handlers being called during this same `emit`.\n var handlersCopy = handlers.slice();\n\n for (var i = 0; i < handlersCopy.length; i++) {\n this.constructor.dispatch(handlersCopy[i], value);\n }\n }\n }\n }, {\n key: \"emitAsync\",\n value: function emitAsync(eventName, value) {\n var _this3 = this;\n\n var handlers = this.handlersByEventName && this.handlersByEventName[eventName];\n\n if (handlers) {\n var promises = handlers.map(function (handler) {\n return _this3.constructor.dispatch(handler, value);\n });\n return Promise.all(promises).then(function () {});\n }\n\n return Promise.resolve();\n }\n }, {\n key: \"getEventNames\",\n value: function getEventNames() {\n return Object.keys(this.handlersByEventName);\n }\n }, {\n key: \"listenerCountForEventName\",\n value: function listenerCountForEventName(eventName) {\n var handlers = this.handlersByEventName[eventName];\n return handlers == null ? 0 : handlers.length;\n }\n }, {\n key: \"getTotalListenerCount\",\n value: function getTotalListenerCount() {\n var result = 0;\n\n var _arr = Object.keys(this.handlersByEventName);\n\n for (var _i = 0; _i < _arr.length; _i++) {\n var eventName = _arr[_i];\n result += this.handlersByEventName[eventName].length;\n }\n\n return result;\n }\n }]);\n\n return Emitter;\n}();\n\nEmitter.dispatch = Emitter.simpleDispatch;\nEmitter.exceptionHandlers = [];\nmodule.exports = Emitter;","\"use strict\";\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n// Essential: A handle to a resource that can be disposed. For example,\n// {Emitter::on} returns disposables representing subscriptions.\nmodule.exports =\n/*#__PURE__*/\nfunction () {\n _createClass(Disposable, null, [{\n key: \"isDisposable\",\n // Public: Ensure that `object` correctly implements the `Disposable`\n // contract.\n //\n // * `object` An {Object} you want to perform the check against.\n //\n // Returns a {Boolean} indicating whether `object` is a valid `Disposable`.\n value: function isDisposable(object) {\n return typeof (object != null ? object.dispose : undefined) === \"function\";\n }\n /*\n Section: Construction and Destruction\n */\n // Public: Construct a Disposable\n //\n // * `disposalAction` A {Function} to call when {::dispose} is called for the\n // first time.\n\n }]);\n\n function Disposable(disposalAction) {\n _classCallCheck(this, Disposable);\n\n this.disposed = false;\n this.disposalAction = disposalAction;\n } // Public: Perform the disposal action, indicating that the resource associated\n // with this disposable is no longer needed.\n //\n // You can call this method more than once, but the disposal action will only\n // be performed the first time.\n\n\n _createClass(Disposable, [{\n key: \"dispose\",\n value: function dispose() {\n if (!this.disposed) {\n this.disposed = true;\n\n if (typeof this.disposalAction === \"function\") {\n this.disposalAction();\n }\n\n this.disposalAction = null;\n }\n }\n }]);\n\n return Disposable;\n}();","\"use strict\";\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar CompositeDisposable;\nvar Disposable; // Essential: An object that aggregates multiple {Disposable} instances together\n// into a single disposable, so they can all be disposed as a group.\n//\n// These are very useful when subscribing to multiple events.\n//\n// ## Examples\n//\n// ```js\n// const {CompositeDisposable} = require('atom')\n//\n// class Something {\n// constructor() {\n// this.disposables = new CompositeDisposable()\n// const editor = atom.workspace.getActiveTextEditor()\n// this.disposables.add(editor.onDidChange(() => {})\n// this.disposables.add(editor.onDidChangePath(() => {})\n// }\n//\n// destroy() {\n// this.disposables.dispose();\n// }\n// }\n// ```\n\nmodule.exports =\n/*#__PURE__*/\nfunction () {\n /*\n Section: Construction and Destruction\n */\n // Public: Construct an instance, optionally with one or more disposables\n function CompositeDisposable() {\n _classCallCheck(this, CompositeDisposable);\n\n this.disposed = false;\n this.disposables = new Set();\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = arguments[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var disposable = _step.value;\n this.add(disposable);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n } // Public: Dispose all disposables added to this composite disposable.\n //\n // If this object has already been disposed, this method has no effect.\n\n\n _createClass(CompositeDisposable, [{\n key: \"dispose\",\n value: function dispose() {\n if (!this.disposed) {\n this.disposed = true;\n this.disposables.forEach(function (disposable) {\n return disposable.dispose();\n });\n this.disposables = null;\n }\n }\n /*\n Section: Managing Disposables\n */\n // Public: Add disposables to be disposed when the composite is disposed.\n //\n // If this object has already been disposed, this method has no effect.\n //\n // * `...disposables` {Disposable} instances or any objects with `.dispose()`\n // methods.\n\n }, {\n key: \"add\",\n value: function add() {\n if (!this.disposed) {\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n for (var _iterator2 = arguments[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var disposable = _step2.value;\n assertDisposable(disposable);\n this.disposables.add(disposable);\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return != null) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n }\n } // Public: Remove a previously added disposable.\n //\n // * `disposable` {Disposable} instance or any object with a `.dispose()`\n // method.\n\n }, {\n key: \"remove\",\n value: function remove(disposable) {\n if (!this.disposed) {\n this.disposables.delete(disposable);\n }\n } // Public: Alias to {CompositeDisposable::remove}\n\n }, {\n key: \"delete\",\n value: function _delete(disposable) {\n this.remove(disposable);\n } // Public: Clear all disposables. They will not be disposed by the next call\n // to dispose.\n\n }, {\n key: \"clear\",\n value: function clear() {\n if (!this.disposed) {\n this.disposables.clear();\n }\n }\n }]);\n\n return CompositeDisposable;\n}();\n\nfunction assertDisposable(disposable) {\n if (Disposable == null) {\n Disposable = require(\"./disposable\");\n }\n\n if (!Disposable.isDisposable(disposable)) {\n throw new TypeError(\"Arguments to CompositeDisposable.add must have a .dispose() method\");\n }\n}","// Generated by CoffeeScript 2.5.1\n(function() {\n var Ancestors, Mixin;\n\n Mixin = require('mixto');\n\n // Public\n module.exports = Ancestors = class Ancestors extends Mixin {\n /* Public */\n static parents(node, selector = '*') {\n var parents;\n parents = [];\n this.eachParent(node, function(parent) {\n if (typeof parent.matches === \"function\" ? parent.matches(selector) : void 0) {\n return parents.push(parent);\n }\n });\n return parents;\n }\n\n static eachParent(node, block) {\n var parent, results;\n parent = node.parentNode;\n if (parent != null) {\n block(parent);\n }\n results = [];\n while (parent = parent.parentNode) {\n if (parent != null) {\n results.push(block(parent));\n } else {\n results.push(void 0);\n }\n }\n return results;\n }\n\n parents(selector = '*') {\n return Ancestors.parents(this, selector);\n }\n\n queryParentSelectorAll(selector) {\n if (selector == null) {\n throw new Error('::queryParentSelectorAll requires a valid selector as argument');\n }\n return this.parents(selector);\n }\n\n queryParentSelector(selector) {\n if (selector == null) {\n throw new Error('::queryParentSelector requires a valid selector as argument');\n }\n return this.queryParentSelectorAll(selector)[0];\n }\n\n eachParent(block) {\n return Ancestors.eachParent(this, block);\n }\n\n };\n\n}).call(this);\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5jZXN0b3JzLmpzIiwic291cmNlUm9vdCI6Ii4uLy4uIiwic291cmNlcyI6WyJsaWIvbWl4aW5zL2FuY2VzdG9ycy5jb2ZmZWUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQUEsTUFBQSxTQUFBLEVBQUE7O0VBQUEsS0FBQSxHQUFRLE9BQUEsQ0FBUSxPQUFSLEVBQVI7OztFQUdBLE1BQU0sQ0FBQyxPQUFQLEdBQ00sWUFBTixNQUFBLFVBQUEsUUFBd0IsTUFBeEIsQ0FBQTs7SUFJWSxPQUFULE9BQVMsQ0FBQyxJQUFELEVBQU8sV0FBUyxHQUFoQixDQUFBO0FBQ1osVUFBQTtNQUFJLE9BQUEsR0FBVTtNQUNWLElBQUMsQ0FBQSxVQUFELENBQVksSUFBWixFQUFrQixRQUFBLENBQUMsTUFBRCxDQUFBO1FBQVksMkNBQXdCLE1BQU0sQ0FBQyxRQUFTLGtCQUF4QztpQkFBQSxPQUFPLENBQUMsSUFBUixDQUFhLE1BQWIsRUFBQTs7TUFBWixDQUFsQjthQUNBO0lBSFE7O0lBS0csT0FBWixVQUFZLENBQUMsSUFBRCxFQUFPLEtBQVAsQ0FBQTtBQUNmLFVBQUEsTUFBQSxFQUFBO01BQUksTUFBQSxHQUFTLElBQUksQ0FBQztNQUVkLElBQWlCLGNBQWpCO1FBQUEsS0FBQSxDQUFNLE1BQU4sRUFBQTs7QUFDQTthQUFNLE1BQUEsR0FBUyxNQUFNLENBQUMsVUFBdEI7UUFDRSxJQUFpQixjQUFqQjt1QkFBQSxLQ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QgPSBub2RlLnBhcmVudE5vZGVcblxuICAgIGJsb2NrKHBhcmVudCkgaWYgcGFyZW50P1xuICAgIHdoaWxlIHBhcmVudCA9IHBhcmVudC5wYXJlbnROb2RlXG4gICAgICBibG9jayhwYXJlbnQpIGlmIHBhcmVudD9cblxuICBwYXJlbnRzOiAoc2VsZWN0b3I9JyonKSAtPiBBbmNlc3RvcnMucGFyZW50cyh0aGlzLCBzZWxlY3RvcilcblxuICBxdWVyeVBhcmVudFNlbGVjdG9yQWxsOiAoc2VsZWN0b3IpIC0+XG4gICAgdW5sZXNzIHNlbGVjdG9yP1xuICAgICAgdGhyb3cgbmV3IEVycm9yICc6OnF1ZXJ5UGFyZW50U2VsZWN0b3JBbGwgcmVxdWlyZXMgYSB2YWxpZCBzZWxlY3RvciBhcyBhcmd1bWVudCdcbiAgICBAcGFyZW50cyhzZWxlY3RvcilcblxuICBxdWVyeVBhcmVudFNlbGVjdG9yOiAoc2VsZWN0b3IpIC0+XG4gICAgdW5sZXNzIHNlbGVjdG9yP1xuICAgICAgdGhyb3cgbmV3IEVycm9yICc6OnF1ZXJ5UGFyZW50U2VsZWN0b3IgcmVxdWlyZXMgYSB2YWxpZCBzZWxlY3RvciBhcyBhcmd1bWVudCdcbiAgICBAcXVlcnlQYXJlbnRTZWxlY3RvckFsbChzZWxlY3RvcilbMF1cblxuICBlYWNoUGFyZW50OiAoYmxvY2spIC0+IEFuY2VzdG9ycy5lYWNoUGFyZW50KHRoaXMsIGJsb2NrKVxuIl19\n//# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/mixins/ancestors.coffee","(function() {\n var ExcludedClassProperties, ExcludedPrototypeProperties, Mixin, name;\n\n module.exports = Mixin = (function() {\n Mixin.includeInto = function(constructor) {\n var name, value, _ref;\n this.extend(constructor.prototype);\n for (name in this) {\n value = this[name];\n if (ExcludedClassProperties.indexOf(name) === -1) {\n if (!constructor.hasOwnProperty(name)) {\n constructor[name] = value;\n }\n }\n }\n return (_ref = this.included) != null ? _ref.call(constructor) : void 0;\n };\n\n Mixin.extend = function(object) {\n var name, _i, _len, _ref, _ref1;\n _ref = Object.getOwnPropertyNames(this.prototype);\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n name = _ref[_i];\n if (ExcludedPrototypeProperties.indexOf(name) === -1) {\n if (!object.hasOwnProperty(name)) {\n object[name] = this.prototype[name];\n }\n }\n }\n return (_ref1 = this.prototype.extended) != null ? _ref1.call(object) : void 0;\n };\n\n function Mixin() {\n if (typeof this.extended === \"function\") {\n this.extended();\n }\n }\n\n return Mixin;\n\n })();\n\n ExcludedClassProperties = ['__super__'];\n\n for (name in Mixin) {\n ExcludedClassProperties.push(name);\n }\n\n ExcludedPrototypeProperties = ['constructor', 'extended'];\n\n}).call(this);\n","// Generated by CoffeeScript 2.5.1\n(function() {\n var Disposable, DisposableEvents, Mixin;\n\n Mixin = require('mixto');\n\n ({Disposable} = require('atom'));\n\n module.exports = DisposableEvents = class DisposableEvents extends Mixin {\n addDisposableEventListener(object, event, listener, options) {\n object.addEventListener(event, listener, options);\n return new Disposable(function() {\n return object.removeEventListener(event, listener);\n });\n }\n\n };\n\n}).call(this);\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlzcG9zYWJsZS1ldmVudHMuanMiLCJzb3VyY2VSb290IjoiLi4vLi4iLCJzb3VyY2VzIjpbImxpYi9taXhpbnMvZGlzcG9zYWJsZS1ldmVudHMuY29mZmVlIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUFBLE1BQUEsVUFBQSxFQUFBLGdCQUFBLEVBQUE7O0VBQUEsS0FBQSxHQUFRLE9BQUEsQ0FBUSxPQUFSOztFQUNSLENBQUEsQ0FBQyxVQUFELENBQUEsR0FBZSxPQUFBLENBQVEsTUFBUixDQUFmOztFQUVBLE1BQU0sQ0FBQyxPQUFQLEdBQ00sbUJBQU4sTUFBQSxpQkFBQSxRQUErQixNQUEvQjtJQUNFLDBCQUE0QixDQUFDLE1BQUQsRUFBUyxLQUFULEVBQWdCLFFBQWhCLEVBQTBCLE9BQTFCLENBQUE7TUFDMUIsTUFBTSxDQUFDLGdCQUFQLENBQXdCLEtBQXhCLEVBQStCLFFBQS9CLEVBQXlDLE9BQXpDO2FBQ0EsSUFBSSxVQUFKLENBQWUsUUFBQSxDQUFBLENBQUE7ZUFBRyxNQUFNLENBQUMsbUJBQVAsQ0FBMkIsS0FBM0IsRUFBa0MsUUFBbEM7TUFBSCxDQUFmO0lBRjBCOztFQUQ5QjtBQUpBIiwic291cmNlc0NvbnRlbnQiOlsiTWl4aW4gPSByZXF1aXJlICdtaXh0bydcbntEaXNwb3NhYmxlfSA9IHJlcXVpcmUgJ2F0b20nXG5cbm1vZHVsZS5leHBvcnRzID1cbmNsYXNzIERpc3Bvc2FibGVFdmVudHMgZXh0ZW5kcyBNaXhpblxuICBhZGREaXNwb3NhYmxlRXZlbnRMaXN0ZW5lcjogKG9iamVjdCwgZXZlbnQsIGxpc3RlbmVyLCBvcHRpb25zKSAtPlxuICAgIG9iamVjdC5hZGRFdmVudExpc3RlbmVyIGV2ZW50LCBsaXN0ZW5lciwgb3B0aW9uc1xuICAgIG5ldyBEaXNwb3NhYmxlIC0+IG9iamVjdC5yZW1vdmVFdmVudExpc3RlbmVyIGV2ZW50LCBsaXN0ZW5lclxuIl19\n//# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/mixins/disposable-events.coffee","// Generated by CoffeeScript 2.5.1\n(function() {\n var CompositeDisposable, Disposable, DisposableEvents, EventsDelegation, Mixin, NO_SELECTOR, eachPair;\n\n Mixin = require('mixto');\n\n DisposableEvents = require('./disposable-events');\n\n ({Disposable, CompositeDisposable} = require('atom'));\n\n eachPair = function(object, callback) {\n var k, results, v;\n results = [];\n for (k in object) {\n v = object[k];\n results.push(callback(k, v));\n }\n return results;\n };\n\n NO_SELECTOR = '__NONE__';\n\n module.exports = EventsDelegation = (function() {\n class EventsDelegation extends Mixin {\n subscribeTo(object, selector, events, options) {\n var disposablesForObject, eventsForObject;\n if (!(object instanceof HTMLElement)) {\n [object, selector, events, options] = [this, object, selector, events];\n }\n if (typeof selector === 'object') {\n [events, selector, options] = [selector, NO_SELECTOR, events];\n }\n if (this.eventsMap == null) {\n this.eventsMap = new WeakMap();\n }\n if (this.disposablesMap == null) {\n this.disposablesMap = new WeakMap();\n }\n if (this.eventsMap.get(object) == null) {\n this.eventsMap.set(object, {});\n }\n if (this.disposablesMap.get(object) == null) {\n this.disposablesMap.set(object, {});\n }\n eventsForObject = this.eventsMap.get(object);\n disposablesForObject = this.disposablesMap.get(object);\n eachPair(events, (event, callback) => {\n if (eventsForObject[event] == null) {\n eventsForObject[event] = {};\n disposablesForObject[event] = this.createEventListener(object, event, options);\n }\n return eventsForObject[event][selector] = callback;\n });\n return new Disposable(() => {\n return this.unsubscribeFrom(object, selector, events);\n });\n }\n\n unsubscribeFrom(object, selector, events) {\n var disposablesForObject, event, eventsForObject;\n if (!(object instanceof HTMLElement)) {\n [object, selector, events] = [this, object, selector];\n }\n if (typeof selector === 'object') {\n [events, selector] = [selector, NO_SELECTOR];\n }\n if (!(eventsForObject = this.eventsMap.get(object))) {\n return;\n }\n for (event in events) {\n delete eventsForObject[event][selector];\n if (Object.keys(eventsForObject[event]).length === 0) {\n disposablesForObject = this.disposablesMap.get(object);\n disposablesForObject[event].dispose();\n delete disposablesForObject[event];\n delete eventsForObject[event];\n }\n }\n if (Object.keys(eventsForObject).length === 0) {\n this.eventsMap.delete(object);\n return this.disposablesMap.delete(object);\n }\n }\n\n createEventListener(object, event, options) {\n var listener;\n listener = (e) => {\n var eventsForObject, ref, target;\n if (!(eventsForObject = (ref = this.eventsMap.get(object)) != null ? ref[event] : void 0)) {\n return;\n }\n ({target} = e);\n this.decorateEvent(e);\n this.eachSelectorFromTarget(e, target, eventsForObject);\n if (!e.isPropagationStopped) {\n if (typeof eventsForObject[NO_SELECTOR] === \"function\") {\n eventsForObject[NO_SELECTOR](e);\n }\n }\n return true;\n };\n return this.addDisposableEventListener(object, event, listener, options);\n }\n\n eachSelectorFromTarget(event, target, eventsForObject) {\n return this.nodeAndItsAncestors(target, (node) => {\n if (event.isPropagationStopped) {\n return;\n }\n return this.eachSelector(eventsForObject, (selector, callback) => {\n var matched;\n matched = this.targetMatch(node, selector);\n if (event.isImmediatePropagationStopped || !matched) {\n return;\n }\n return callback(event);\n });\n });\n }\n\n eachSelector(eventsForObject, callback) {\n var i, key, keys, len;\n keys = Object.keys(eventsForObject);\n if (keys.indexOf(NO_SELECTOR) !== -1) {\n keys.splice(keys.indexOf(NO_SELECTOR), 1);\n }\n keys.sort(function(a, b) {\n return b.split(' ').length - a.split(' ').length;\n });\n for (i = 0, len = keys.length; i < len; i++) {\n key = keys[i];\n if (callback(key, eventsForObject[key])) {\n return true;\n }\n }\n return false;\n }\n\n targetMatch(target, selector) {\n var parent;\n if (target.matches(selector)) {\n return true;\n }\n parent = target.parentNode;\n while ((parent != null) && (parent.matches != null)) {\n if (parent.matches(selector)) {\n return true;\n }\n parent = parent.parentNode;\n }\n return false;\n }\n\n nodeAndItsAncestors(node, callback) {\n var parent, results;\n parent = node.parentNode;\n callback(node);\n results = [];\n while ((parent != null) && (parent.matches != null)) {\n callback(parent);\n results.push(parent = parent.parentNode);\n }\n return results;\n }\n\n decorateEvent(e) {\n var overriddenStop, overriddenStopImmediate;\n overriddenStop = Event.prototype.stopPropagation;\n e.stopPropagation = function() {\n this.isPropagationStopped = true;\n return overriddenStop.apply(this, arguments);\n };\n overriddenStopImmediate = Event.prototype.stopImmediatePropagation;\n return e.stopImmediatePropagation = function() {\n this.isImmediatePropagationStopped = true;\n return overriddenStopImmediate.apply(this, arguments);\n };\n }\n\n };\n\n DisposableEvents.includeInto(EventsDelegation);\n\n return EventsDelegation;\n\n }).call(this);\n\n}).call(this);\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnRzLWRlbGVn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AgcGFyZW50ID0gcGFyZW50LnBhcmVudE5vZGVcblxuICAgIGZhbHNlXG5cbiAgbm9kZUFuZEl0c0FuY2VzdG9yczogKG5vZGUsIGNhbGxiYWNrKSAtPlxuICAgIHBhcmVudCA9IG5vZGUucGFyZW50Tm9kZVxuXG4gICAgY2FsbGJhY2sobm9kZSlcbiAgICB3aGlsZSBwYXJlbnQ/IGFuZCBwYXJlbnQubWF0Y2hlcz9cbiAgICAgIGNhbGxiYWNrKHBhcmVudClcbiAgICAgIHBhcmVudCA9IHBhcmVudC5wYXJlbnROb2RlXG5cbiAgZGVjb3JhdGVFdmVudDogKGUpIC0+XG4gICAgb3ZlcnJpZGRlblN0b3AgPSAgRXZlbnQ6OnN0b3BQcm9wYWdhdGlvblxuICAgIGUuc3RvcFByb3BhZ2F0aW9uID0gLT5cbiAgICAgIEBpc1Byb3BhZ2F0aW9uU3RvcHBlZCA9IHRydWVcbiAgICAgIG92ZXJyaWRkZW5TdG9wLmFwcGx5KHRoaXMsIGFyZ3VtZW50cylcblxuICAgIG92ZXJyaWRkZW5TdG9wSW1tZWRpYXRlID0gIEV2ZW50OjpzdG9wSW1tZWRpYXRlUHJvcGFnYXRpb25cbiAgICBlLnN0b3BJbW1lZGlhdGVQcm9wYWdhdGlvbiA9IC0+XG4gICAgICBAaXNJbW1lZGlhdGVQcm9wYWdhdGlvblN0b3BwZWQgPSB0cnVlXG4gICAgICBvdmVycmlkZGVuU3RvcEltbWVkaWF0ZS5hcHBseSh0aGlzLCBhcmd1bWVudHMpXG4iXX0=\n//# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/mixins/events-delegation.coffee","// Generated by CoffeeScript 2.5.1\n(function() {\n var BabelSpacePenDSL, Builder, Events, Mixin, SelfClosingTags, SpacePenDSL, Tags, Template;\n\n Mixin = require('mixto');\n\n Tags = 'a abbr address article aside audio b bdi bdo blockquote body button canvas caption cite code colgroup datalist dd del details dfn dialog div dl dt em fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header html i iframe ins kbd label legend li main map mark menu meter nav noscript object ol optgroup option output p pre progress q rp rt ruby s samp script section select small span strong style sub summary sup table tbody td textarea tfoot th thead time title tr u ul var video area base br col command embed hr img input keygen link meta param source track wbr'.split(/\\s+/);\n\n SelfClosingTags = {};\n\n 'area base br col command embed hr img input keygen link meta param source track wbr'.split(/\\s+/).forEach(function(tag) {\n return SelfClosingTags[tag] = true;\n });\n\n Events = 'blur change click dblclick error focus input keydown keypress keyup load mousedown mousemove mouseout mouseover mouseup resize scroll select submit unload'.split(/\\s+/);\n\n BabelSpacePenDSL = class BabelSpacePenDSL extends Mixin {\n buildContent() {\n if (this.constructor.content != null) {\n return SpacePenDSL.buildContent(this, this.constructor.content);\n }\n }\n\n };\n\n module.exports = SpacePenDSL = (function() {\n class SpacePenDSL extends Mixin {\n static includeInto(klass) {\n super.includeInto(klass);\n Object.defineProperty(klass, 'content', {\n enumerable: false,\n get: function() {\n return this.prototype.__content__;\n },\n set: function(value) {\n return this.prototype.__content__ = value;\n }\n });\n Object.defineProperty(klass.prototype, 'createdCallback', {\n enumerable: true,\n get: function() {\n return this.__create__;\n },\n set: function(value) {\n return this.__createdCallback__ = value;\n }\n });\n Object.defineProperty(klass.prototype, '__create__', {\n enumerable: true,\n value: function() {\n if (this.__content__ != null) {\n SpacePenDSL.buildContent(this, this.__content__);\n }\n if (this.__createdCallback__ != null) {\n return this.__createdCallback__();\n }\n }\n });\n return klass.useShadowRoot = function() {\n return klass.prototype.__useShadowRoot__ = true;\n };\n }\n\n static buildContent(element, content) {\n var html, root, template;\n template = new Template();\n content.call(template);\n [html] = template.buildHtml();\n root = element.__useShadowRoot__ ? root = element.shadowRoot = element.createShadowRoot() : root = element;\n root.innerHTML = html;\n return this.wireOutlets(element, root);\n }\n\n static wireOutlets(view, root) {\n var element, i, len, outlet, ref;\n ref = root.querySelectorAll('[outlet]');\n for (i = 0, len = ref.length; i < len; i++) {\n element = ref[i];\n outlet = element.getAttribute('outlet');\n view[outlet] = element;\n element.removeAttribute('outlet');\n }\n return void 0;\n }\n\n };\n\n SpacePenDSL.Babel = BabelSpacePenDSL;\n\n return SpacePenDSL;\n\n }).call(this);\n\n Template = (function() {\n class Template {\n constructor() {\n this.currentBuilder = new Builder();\n }\n\n subview(name, view) {\n return this.currentBuilder.subview(name, view);\n }\n\n text(string) {\n return this.currentBuilder.text(string);\n }\n\n tag(tagName, ...args) {\n return this.currentBuilder.tag(tagName, ...args);\n }\n\n raw(string) {\n return this.currentBuilder.raw(string);\n }\n\n buildHtml() {\n return this.currentBuilder.buildHtml();\n }\n\n };\n\n Tags.forEach(function(tagName) {\n return Template.prototype[tagName] = function(...args) {\n return this.currentBuilder.tag(tagName, ...args);\n };\n });\n\n return Template;\n\n }).call(this);\n\n Builder = class Builder {\n constructor() {\n this.document = [];\n this.postProcessingSteps = [];\n }\n\n buildHtml() {\n return [this.document.join(''), this.postProcessingSteps];\n }\n\n tag(name, ...args) {\n var options;\n options = this.extractOptions(args);\n this.openTag(name, options.attributes);\n if (SelfClosingTags.hasOwnProperty(name)) {\n if ((options.text != null) || (options.content != null)) {\n throw new Error(`Self-closing tag ${name} cannot have text or content`);\n }\n } else {\n if (typeof options.content === \"function\") {\n options.content();\n }\n if (options.text) {\n this.text(options.text);\n }\n return this.closeTag(name);\n }\n }\n\n openTag(name, attributes) {\n var attributeName, attributePairs, attributesString, value;\n if (this.document.length === 0) {\n if (attributes == null) {\n attributes = {};\n }\n }\n attributePairs = (function() {\n var results;\n results = [];\n for (attributeName in attributes) {\n value = attributes[attributeName];\n results.push(`${attributeName}=\\\"${value}\\\"`);\n }\n return results;\n })();\n attributesString = attributePairs.length ? \" \" + attributePairs.join(\" \") : \"\";\n return this.document.push(`<${name}${attributesString}>`);\n }\n\n closeTag(name) {\n return this.document.push(``);\n }\n\n text(string) {\n var escapedString;\n escapedString = string.replace(/&/g, '&').replace(/\"/g, '"').replace(/'/g, ''').replace(//g, '>');\n return this.document.push(escapedString);\n }\n\n raw(string) {\n return this.document.push(string);\n }\n\n subview(outletName, subview) {\n var subviewId;\n subviewId = `subview-${++idCounter}`;\n this.tag('div', {\n id: subviewId\n });\n return this.postProcessingSteps.push(function(view) {\n view[outletName] = subview;\n subview.parentView = view;\n return view.find(`div#${subviewId}`).replaceWith(subview);\n });\n }\n\n extractOptions(args) {\n var arg, i, len, options;\n options = {};\n for (i = 0, len = args.length; i < len; i++) {\n arg = args[i];\n switch (typeof arg) {\n case 'function':\n options.content = arg;\n break;\n case 'string':\n case 'number':\n options.text = arg.toString();\n break;\n default:\n options.attributes = arg;\n }\n }\n return options;\n }\n\n };\n\n}).call(this);\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BhY2UtcGVuLWRzbC5qcyIsInNvdXJjZVJvb3QiOiIuLi8uLiIsInNvdXJjZXMiOlsibGliL21peGlucy9zcGFjZS1wZW4tZHNsLmNvZmZlZSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7QUFBQSxNQUFBLGdCQUFBLEVBQUEsT0FBQSxFQUFBLE1BQUEsRUFBQSxLQUFBLEVBQUEsZUFBQSxFQUFBLFdBQUEsRUFBQSxJQUFBLEVBQUE7O0VBQUEsS0FBQSxHQUFRLE9BQUEsQ0FBUSxPQUFSOztFQUVSLElBQUEsR0FDRSxra0JBTytDLENBQUMsS0FQaEQsQ0FPc0QsS0FQdEQ7O0VBU0YsZUFBQSxHQUFrQixDQUFBOztFQUNsQixxRkFDa0IsQ0FBQyxLQURuQixDQUN5QixLQUR6QixDQUMrQixDQUFDLE9BRGhDLENBQ3dDLFFBQUEsQ0FBQyxHQUFELENBQUE7V0FBUyxlQUFlLENBQUMsR0FBRCxDQUFmLEdBQXVCO0VBQWhDLENBRHhDOztFQUdBLE1BQUEsR0FDRSw0SkFFNEMsQ0FBQyxLQUY3QyxDQUVtRCxLQUZuRDs7RUFJSSxtQkFBTixNQUFBLGlCQUFBLFFBQStCLE1BQS9CO0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zaCBzdHJpbmdcblxuICBzdWJ2aWV3OiAob3V0bGV0TmFtZSwgc3VidmlldykgLT5cbiAgICBzdWJ2aWV3SWQgPSBcInN1YnZpZXctI3srK2lkQ291bnRlcn1cIlxuICAgIEB0YWcgJ2RpdicsIGlkOiBzdWJ2aWV3SWRcbiAgICBAcG9zdFByb2Nlc3NpbmdTdGVwcy5wdXNoICh2aWV3KSAtPlxuICAgICAgdmlld1tvdXRsZXROYW1lXSA9IHN1YnZpZXdcbiAgICAgIHN1YnZpZXcucGFyZW50VmlldyA9IHZpZXdcbiAgICAgIHZpZXcuZmluZChcImRpdiMje3N1YnZpZXdJZH1cIikucmVwbGFjZVdpdGgoc3VidmlldylcblxuICBleHRyYWN0T3B0aW9uczogKGFyZ3MpIC0+XG4gICAgb3B0aW9ucyA9IHt9XG4gICAgZm9yIGFyZyBpbiBhcmdzXG4gICAgICBzd2l0Y2ggdHlwZW9mKGFyZylcbiAgICAgICAgd2hlbiAnZnVuY3Rpb24nXG4gICAgICAgICAgb3B0aW9ucy5jb250ZW50ID0gYXJnXG4gICAgICAgIHdoZW4gJ3N0cmluZycsICdudW1iZXInXG4gICAgICAgICAgb3B0aW9ucy50ZXh0ID0gYXJnLnRvU3RyaW5nKClcbiAgICAgICAgZWxzZVxuICAgICAgICAgIG9wdGlvbnMuYXR0cmlidXRlcyA9IGFyZ1xuICAgIG9wdGlvbnNcbiJdfQ==\n//# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/mixins/space-pen-dsl.coffee","const regexEscape = /[$()*+./?[\\\\\\]^{|}-]/g\nexport function escapeRegExp(string) {\n if (string) {\n return string.replace(regexEscape, \"\\\\$&\")\n } else {\n return \"\"\n }\n}\n\nconst regexDaherize = /([A-Z])|(_)/g\nexport function dasherize(string) {\n if (!string) {\n return \"\"\n }\n\n string = `${string[0].toLowerCase()}${string.slice(1)}`\n return string.replace(regexDaherize, function (m, letter) {\n if (letter) {\n return `-${letter.toLowerCase()}`\n } else {\n return \"-\"\n }\n })\n}\n\nexport function debounce(callback, wait) {\n let timeoutId\n return (...args) => {\n if (timeoutId !== undefined) {\n clearTimeout(timeoutId)\n }\n timeoutId = setTimeout(() => {\n callback(...args)\n }, wait)\n }\n}\n","\"use strict\"\n\n/**\n * Generates a decorator function to convert a class into a custom element through the `registerOrUpdateElement` method\n * from `atom-utils-plus`.\n *\n * The decorator will take care to return the generated element class so that you can just export it directly as\n * demonstrated below.\n *\n * As supported by the `registerOrUpdateElement` method, static member will be available on the new class.\n *\n * **Note: As there's some limitations when modifying the prototype of a custom element, if you need to inject element\n * callbacks (like `createdCallback`) through a mixin, the mixins should be included before converting the class as a\n * custom element. You'll be able to achieve that by placing the `include` decorator after the `element` one as shown in\n * the second example.**\n *\n * @param {string} elementName The node name of the element to register\n * @returns {void}\n * @element('dummy-element-name') export default class SomeClass {\n * // ...\n * }\n * @element('dummy-element-with-mixin')\n * @include(SomeMixin) export default class SomeClass {\n * // ...\n * }\n */\nexport default function element(cls, elementName) {\n if (!window.customElements.get(elementName)) {\n window.customElements.define(elementName, cls)\n }\n}\n","module.exports = (Promise.resolve(__parcel__require__(\"./\" + \"minimap-plugin-generator-element.a1e4649c.js\"))).then(() => parcelRequire('1Ozz1'));","\"use strict\"\n\nimport { Emitter, CompositeDisposable } from \"atom\"\nimport { createMinimapElement } from \"./minimap-element\"\nimport Minimap from \"./minimap\"\nimport * as config from \"./config.json\"\nimport * as PluginManagement from \"./plugin-management\"\nimport { treeSitterWarning } from \"./performance-monitor\"\nimport { StyleReader } from \"atom-ide-base/commons-ui/dom-style-reader\"\nimport { debounce } from \"./deps/underscore-plus\"\n\nexport * as config from \"./config.json\"\nexport * from \"./plugin-management\"\nexport { default as Minimap } from \"./minimap\"\nexport { createMinimapElement } from \"./minimap-element\"\n\n/**\n * The `Minimap` package provides an eagle-eye view of text buffers.\n *\n * It also provides API for plugin packages that want to interact with the minimap and be available to the user through\n * the minimap settings.\n */\n\n/**\n * The activation state of the package.\n *\n * @type {boolean}\n * @access private\n */\nlet active = false\n/**\n * The toggle state of the package.\n *\n * @type {boolean}\n * @access private\n */\nlet toggled = false\n/**\n * The `Map` where Minimap instances are stored with the text editor they target as key.\n *\n * @type {Map}\n * @access private\n */\nexport let editorsMinimaps = null\n/**\n * The composite disposable that stores the package's subscriptions.\n *\n * @type {CompositeDisposable}\n * @access private\n */\nlet subscriptions = null\n/**\n * The disposable that stores the package's commands subscription.\n *\n * @type {Disposable}\n * @access private\n */\nlet subscriptionsOfCommands = null\n\n/**\n * The package's events emitter.\n *\n * @type {Emitter}\n * @access private\n */\nexport const emitter = new Emitter()\n\n/** StyleReader cache used for storing token colors */\nexport let styleReader = null\n\n/** Activates the minimap package. */\nexport function activate() {\n if (active) {\n return\n }\n\n subscriptionsOfCommands = atom.commands.add(\"atom-workspace\", {\n \"minimap:toggle\": () => {\n toggle()\n },\n \"minimap:generate-coffee-plugin\": async () => {\n await generatePlugin(\"coffee\")\n },\n \"minimap:generate-javascript-plugin\": async () => {\n await generatePlugin(\"javascript\")\n },\n \"minimap:generate-babel-plugin\": async () => {\n await generatePlugin(\"babel\")\n },\n })\n\n editorsMinimaps = new Map()\n styleReader = new StyleReader()\n\n subscriptions = new CompositeDisposable()\n active = true\n\n if (atom.config.get(\"minimap.autoToggle\")) {\n toggle()\n }\n}\n\n/**\n * Returns a {MinimapElement} for the passed-in model if it's a {Minimap}.\n *\n * @param {Minimap} model The model for which returning a view\n * @returns {MinimapElement}\n */\nexport function minimapViewProvider(model) {\n if (model instanceof Minimap) {\n let element = model.getMinimapElement()\n if (!element) {\n element = createMinimapElement()\n element.setModel(model)\n }\n return element\n }\n}\n\n/** Deactivates the minimap package. */\nexport function deactivate() {\n if (!active) {\n return\n }\n\n PluginManagement.deactivateAllPlugins()\n\n if (editorsMinimaps) {\n editorsMinimaps.forEach((value) => {\n value.destroy()\n })\n editorsMinimaps.clear()\n }\n\n subscriptions.dispose()\n subscriptionsOfCommands.dispose()\n styleReader.invalidateDOMStylesCache()\n toggled = false\n active = false\n}\n\nexport function getConfigSchema() {\n return config || atom.packages.getLoadedPackage(\"minimap\").metadata.configSchema\n}\n\n/** Toggles the minimap display. */\nexport function toggle() {\n if (!active) {\n return\n }\n\n if (toggled) {\n toggled = false\n\n if (editorsMinimaps) {\n editorsMinimaps.forEach((minimap) => {\n minimap.destroy()\n })\n editorsMinimaps.clear()\n }\n subscriptions.dispose()\n\n // HACK: this hack forces rerendering editor size which moves the scrollbar to the right once minimap is removed\n const wasMaximized = atom.isMaximized()\n const { width, height } = atom.getSize()\n atom.setSize(width, height)\n if (wasMaximized) {\n atom.maximize()\n }\n } else {\n toggled = true\n initSubscriptions()\n }\n styleReader.invalidateDOMStylesCache()\n}\n\n/**\n * Opens the plugin generation view.\n *\n * @param {string} template The name of the template to use\n */\nasync function generatePlugin(template) {\n const { createMinimapPluginGeneratorElement } = await import(\"./minimap-plugin-generator-element\")\n const view = createMinimapPluginGeneratorElement()\n view.template = template\n view.attach()\n}\n\n/**\n * Registers a callback to listen to the `did-activate` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidActivate(callback) {\n return emitter.on(\"did-activate\", callback)\n}\n\n/**\n * Registers a callback to listen to the `did-deactivate` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidDeactivate(callback) {\n return emitter.on(\"did-deactivate\", callback)\n}\n\n/**\n * Registers a callback to listen to the `did-create-minimap` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidCreateMinimap(callback) {\n return emitter.on(\"did-create-minimap\", callback)\n}\n\n/**\n * Registers a callback to listen to the `did-add-plugin` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidAddPlugin(callback) {\n return emitter.on(\"did-add-plugin\", callback)\n}\n\n/**\n * Registers a callback to listen to the `did-remove-plugin` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidRemovePlugin(callback) {\n return emitter.on(\"did-remove-plugin\", callback)\n}\n\n/**\n * Registers a callback to listen to the `did-activate-plugin` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidActivatePlugin(callback) {\n return emitter.on(\"did-activate-plugin\", callback)\n}\n\n/**\n * Registers a callback to listen to the `did-deactivate-plugin` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidDeactivatePlugin(callback) {\n return emitter.on(\"did-deactivate-plugin\", callback)\n}\n\n/**\n * Registers a callback to listen to the `did-change-plugin-order` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidChangePluginOrder(callback) {\n return emitter.on(\"did-change-plugin-order\", callback)\n}\n\n/**\n * Returns the `Minimap` class\n *\n * @returns {Function} The `Minimap` class constructor\n */\nexport function minimapClass() {\n return Minimap\n}\n\n/**\n * Returns the `Minimap` object associated to the passed-in `TextEditorElement`.\n *\n * @param {TextEditorElement} editorElement A text editor element\n * @returns {Minimap} The associated minimap\n */\nexport function minimapForEditorElement(editorElement) {\n if (!editorElement) {\n return\n }\n return minimapForEditor(editorElement.getModel())\n}\n\n/**\n * Returns the `Minimap` object associated to the passed-in `TextEditor`.\n *\n * @param {TextEditor} textEditor A text editor\n * @returns {Minimap} The associated minimap\n */\nexport function minimapForEditor(textEditor) {\n if (!textEditor) {\n return\n }\n if (!editorsMinimaps) {\n return\n }\n\n let minimap = editorsMinimaps.get(textEditor)\n\n if (minimap === undefined || minimap.destroyed) {\n minimap = new Minimap({ textEditor })\n editorsMinimaps.set(textEditor, minimap)\n\n const editorSubscription = textEditor.onDidDestroy(() => {\n if (editorsMinimaps) {\n editorsMinimaps.delete(textEditor)\n }\n if (minimap) {\n // just in case\n minimap.destroy()\n }\n editorSubscription.dispose()\n })\n // dispose the editorSubscription if minimap is deactivated before destroying the editor\n subscriptions.add(editorSubscription)\n }\n\n return minimap\n}\n\n/**\n * Returns a new stand-alone {Minimap} for the passed-in `TextEditor`.\n *\n * @param {TextEditor} textEditor A text editor instance to create a minimap for\n * @returns {Minimap} A new stand-alone Minimap for the passed-in editor\n */\nexport function standAloneMinimapForEditor(textEditor) {\n if (!textEditor) {\n return\n }\n\n return new Minimap({\n textEditor,\n standAlone: true,\n })\n}\n\n/**\n * Returns the `Minimap` associated to the active `TextEditor`.\n *\n * @returns {Minimap} The active Minimap\n */\nexport function getActiveMinimap() {\n return minimapForEditor(atom.workspace.getActiveTextEditor())\n}\n\n/**\n * Calls a function for each present and future minimaps.\n *\n * @param {function(minimap:Minimap):void} iterator A function to call with the existing and future minimaps\n * @returns {Disposable} A disposable to unregister the observer\n */\nexport function observeMinimaps(iterator) {\n if (!iterator) {\n return\n }\n\n if (editorsMinimaps) {\n editorsMinimaps.forEach((minimap) => {\n iterator(minimap)\n })\n }\n return onDidCreateMinimap((minimap) => {\n iterator(minimap)\n })\n}\n\n/**\n * Registers to the `observeTextEditors` method.\n *\n * @access private\n */\nfunction initSubscriptions() {\n const debounceUpdateStyles = debounce(updateStyles, 300)\n subscriptions.add(\n atom.workspace.observeTextEditors((textEditor) => {\n const minimap = minimapForEditor(textEditor)\n const minimapElement = minimapViewProvider(minimap)\n\n emitter.emit(\"did-create-minimap\", minimap)\n minimapElement.attach(textEditor.getElement())\n }),\n // empty color cache if the theme changes\n atom.themes.onDidChangeActiveThemes(debounceUpdateStyles),\n atom.styles.onDidUpdateStyleElement(debounceUpdateStyles),\n atom.styles.onDidAddStyleElement(debounceUpdateStyles),\n atom.styles.onDidRemoveStyleElement(debounceUpdateStyles),\n treeSitterWarning()\n )\n}\n\n/** Force update styles of minimap */\nfunction updateStyles() {\n styleReader.invalidateDOMStylesCache()\n editorsMinimaps.forEach((minimap) => {\n atom.views.getView(minimap).requestForcedUpdate()\n })\n}\n\n// The public exports included in the service:\nconst MinimapServiceV1 = {\n minimapViewProvider,\n getConfigSchema,\n onDidActivate,\n onDidDeactivate,\n onDidCreateMinimap,\n onDidAddPlugin,\n onDidRemovePlugin,\n onDidActivatePlugin,\n onDidDeactivatePlugin,\n onDidChangePluginOrder,\n minimapClass,\n minimapForEditorElement,\n minimapForEditor,\n standAloneMinimapForEditor,\n getActiveMinimap,\n observeMinimaps,\n registerPlugin: PluginManagement.registerPlugin,\n unregisterPlugin: PluginManagement.unregisterPlugin,\n togglePluginActivation: PluginManagement.togglePluginActivation,\n deactivateAllPlugins: PluginManagement.deactivateAllPlugins,\n activatePlugin: PluginManagement.activatePlugin,\n deactivatePlugin: PluginManagement.deactivatePlugin,\n getPluginsOrder: PluginManagement.getPluginsOrder,\n}\n\n/**\n * Returns the Minimap main module instance.\n *\n * @returns {Main} The Minimap main module instance.\n */\nexport function provideMinimapServiceV1() {\n return MinimapServiceV1\n}\n","\"use strict\"\n\nimport { CompositeDisposable, Disposable } from \"atom\"\nimport { EventsDelegation, AncestorsMethods } from \"atom-utils-plus\"\nimport elementResizeDetectorImport from \"element-resize-detector\"\nimport DecorationManagement from \"./decoration-management\"\n\nimport * as Main from \"./main\"\nimport CanvasDrawer from \"./mixins/canvas-drawer\"\nimport include from \"./decorators/include\"\nimport element from \"./decorators/element\"\n\nimport { createMinimapQuickSettingsElement } from \"./minimap-quick-settings-element\"\nconst elementResizeDetector = elementResizeDetectorImport({ strategy: \"scroll\" })\n\nconst SPEC_MODE = atom.inSpecMode()\nconst TAG_NAME = \"atom-text-editor-minimap\"\n\n/**\n * Public: The MinimapElement is the view meant to render a {@link Minimap} instance in the DOM.\n *\n * You can retrieve the MinimapElement associated to a Minimap using the `atom.views.getView` method.\n *\n * Note that most interactions with the Minimap package is done through the Minimap model so you should never have to\n * access MinimapElement instances.\n *\n * @example Let minimapElement = atom.views.getView(minimap)\n */\nclass MinimapElement extends HTMLElement {\n static initClass() {\n include(this, CanvasDrawer, EventsDelegation, AncestorsMethods)\n element(this, TAG_NAME)\n }\n\n // ## ## ####### ####### ## ## ######\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## ## ##\n // ######### ## ## ## ## ##### ######\n // ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ####### ####### ## ## ######\n\n /**\n * DOM callback invoked when a new MinimapElement is created.\n *\n * @access private\n */\n createdCallback() {\n // Core properties\n\n /** @access private */\n this.minimap = undefined\n\n /** @access private */\n this.width = undefined\n /** @access private */\n this.height = undefined\n\n // Subscriptions\n\n /** @access private */\n this.subscriptions = new CompositeDisposable()\n /** @access private */\n this.visibleAreaSubscription = undefined\n /** @access private */\n this.quickSettingsSubscription = undefined\n /** @access private */\n this.dragSubscription = undefined\n /** @access private */\n this.openQuickSettingSubscription = undefined\n\n // Configs\n\n /** @access private */\n this.minimapScrollIndicator = undefined\n /** @access private */\n this.displayMinimapOnLeft = undefined\n /** @access private */\n this.displayPluginsControls = undefined\n /** @access private */\n this.textOpacity = undefined\n /** @access private */\n this.displayCodeHighlights = undefined\n /** @access private */\n this.adjustToSoftWrap = undefined\n /** @access private */\n this.useHardwareAcceleration = undefined\n /** @access private */\n this.absoluteMode = undefined\n\n // Elements\n\n /** @access private */\n this.visibleArea = undefined\n /** @access private */\n this.controls = undefined\n /** @access private */\n this.scrollIndicator = undefined\n /** @access private */\n this.openQuickSettings = undefined\n /** @access private */\n this.quickSettingsElement = undefined\n\n this.DecorationManagement = new DecorationManagement()\n\n // States\n\n /** @access private */\n this.attached = undefined\n /** @access private */\n this.attachedToTextEditor = undefined\n /** @access private */\n this.standAlone = undefined\n /** @access private */\n this.wasVisible = undefined\n\n // Other\n\n /** @access private */\n this.offscreenFirstRow = undefined\n /** @access private */\n this.offscreenLastRow = undefined\n /** @access private */\n this.frameRequested = undefined\n /** @access private */\n this.flexBasis = undefined\n\n this.initializeContent()\n\n this.subscriptions.add(\n atom.config.observe(\"minimap.displayMinimapOnLeft\", (displayMinimapOnLeft) => {\n this.displayMinimapOnLeft = displayMinimapOnLeft\n\n this.updateMinimapFlexPosition()\n this.measureHeightAndWidth(true, true)\n }),\n\n atom.config.observe(\"minimap.minimapScrollIndicator\", (minimapScrollIndicator) => {\n this.minimapScrollIndicator = minimapScrollIndicator\n\n if (this.minimapScrollIndicator && !(this.scrollIndicator != null) && !this.standAlone) {\n this.initializeScrollIndicator()\n } else if (this.scrollIndicator != null) {\n this.disposeScrollIndicator()\n }\n\n if (this.attached) {\n this.requestUpdate()\n }\n }),\n\n atom.config.observe(\"minimap.displayPluginsControls\", (displayPluginsControls) => {\n this.displayPluginsControls = displayPluginsControls\n\n if (this.displayPluginsControls && !(this.openQuickSettings != null) && !this.standAlone) {\n this.initializeOpenQuickSettings()\n } else if (this.openQuickSettings != null) {\n this.disposeOpenQuickSettings()\n }\n }),\n\n atom.config.observe(\"minimap.textOpacity\", (textOpacity) => {\n this.textOpacity = textOpacity\n\n if (this.attached) {\n this.requestForcedUpdate()\n }\n }),\n\n atom.config.observe(\"minimap.displayCodeHighlights\", (displayCodeHighlights) => {\n this.displayCodeHighlights = displayCodeHighlights\n\n if (this.attached) {\n this.requestForcedUpdate()\n }\n }),\n\n atom.config.observe(\"minimap.smoothScrolling\", (smoothScrolling) => {\n this.smoothScrolling = smoothScrolling\n\n if (this.attached) {\n if (!this.smoothScrolling) {\n this.backLayer.canvas.style.cssText = \"\"\n this.tokensLayer.canvas.style.cssText = \"\"\n this.frontLayer.canvas.style.cssText = \"\"\n } else {\n this.requestUpdate()\n }\n }\n }),\n\n atom.config.observe(\"minimap.adjustMinimapWidthToSoftWrap\", (adjustToSoftWrap) => {\n this.adjustToSoftWrap = adjustToSoftWrap\n\n if (this.attached) {\n this.measureHeightAndWidth()\n }\n }),\n\n atom.config.observe(\"minimap.adjustMinimapWidthOnlyIfSmaller\", (adjustOnlyIfSmaller) => {\n this.adjustOnlyIfSmaller = adjustOnlyIfSmaller\n\n if (this.attached) {\n this.measureHeightAndWidth()\n }\n }),\n\n atom.config.observe(\"minimap.useHardwareAcceleration\", (useHardwareAcceleration) => {\n this.useHardwareAcceleration = useHardwareAcceleration\n\n if (this.attached) {\n this.requestUpdate()\n }\n }),\n\n atom.config.observe(\"minimap.absoluteMode\", (absoluteMode) => {\n this.absoluteMode = absoluteMode\n\n this.classList.toggle(\"absolute\", this.absoluteMode)\n }),\n\n atom.config.observe(\"minimap.adjustAbsoluteModeHeight\", (adjustAbsoluteModeHeight) => {\n this.adjustAbsoluteModeHeight = adjustAbsoluteModeHeight\n\n this.classList.toggle(\"adjust-absolute-height\", this.adjustAbsoluteModeHeight)\n\n if (this.attached) {\n this.measureHeightAndWidth()\n }\n }),\n\n atom.config.observe(\"minimap.ignoreWhitespacesInTokens\", (ignoreWhitespacesInTokens) => {\n this.ignoreWhitespacesInTokens = ignoreWhitespacesInTokens\n\n if (this.attached) {\n this.requestForcedUpdate()\n }\n }),\n\n atom.config.observe(\"editor.preferredLineLength\", () => {\n if (this.attached) {\n this.measureHeightAndWidth()\n }\n }),\n\n atom.config.observe(\"editor.softWrap\", () => {\n if (this.attached) {\n this.requestUpdate()\n }\n }),\n\n atom.config.observe(\"editor.showInvisibles\", () => {\n if (this.attached) {\n this.requestUpdate()\n }\n }),\n\n atom.config.observe(\"editor.invisibles\", () => {\n if (this.attached) {\n this.requestUpdate()\n }\n }),\n\n atom.config.observe(\"editor.softWrapAtPreferredLineLength\", () => {\n if (this.attached) {\n this.requestUpdate()\n }\n })\n )\n }\n\n /**\n * DOM callback invoked when a new MinimapElement is attached to the DOM.\n *\n * @access private\n */\n connectedCallback() {\n if (typeof atom.views.pollDocument === \"function\") {\n this.subscriptions.add(\n atom.views.pollDocument(() => {\n this.pollDOM()\n })\n )\n } else {\n this.intersectionObserver = new IntersectionObserver((entries) => {\n const { intersectionRect } = entries[entries.length - 1]\n if (intersectionRect.width > 0 || intersectionRect.height > 0) {\n this.measureHeightAndWidth(true, true)\n }\n })\n\n this.intersectionObserver.observe(this)\n if (this.isVisible()) {\n this.measureHeightAndWidth(true, true)\n }\n\n const measureDimensions = () => {\n this.measureHeightAndWidth(false, false)\n }\n elementResizeDetector.listenTo(this, measureDimensions)\n window.addEventListener(\"resize\", measureDimensions, { passive: true })\n\n this.subscriptions.add(\n new Disposable(() => {\n elementResizeDetector.removeListener(this, measureDimensions)\n }),\n new Disposable(() => {\n window.removeEventListener(\"resize\", measureDimensions)\n })\n )\n }\n\n this.measureHeightAndWidth()\n this.updateMinimapFlexPosition()\n this.attached = true\n this.attachedToTextEditor = this.queryParentSelector(\"atom-text-editor\") === this.minimap.getTextEditorElement()\n\n if (this.attachedToTextEditor) {\n this.minimap.getTextEditorElement().setAttribute(\"with-minimap\", this.displayMinimapOnLeft ? \"left\" : \"right\")\n }\n\n this.subscriptions.add(this.subscribeToMediaQuery())\n }\n\n /**\n * DOM callback invoked when a new MinimapElement is detached from the DOM.\n *\n * @access private\n */\n disconnectedCallback() {\n this.minimap.getTextEditorElement().removeAttribute(\"with-minimap\")\n this.attached = false\n }\n\n // ### ######## ######## ### ###### ## ##\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## #########\n // ######### ## ## ######### ## ## ##\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ###### ## ##\n\n /**\n * Returns whether the MinimapElement is currently visible on screen or not.\n *\n * The visibility of the minimap is defined by testing the size of the offset width and height of the element.\n *\n * @returns {boolean} Whether the MinimapElement is currently visible or not\n */\n isVisible() {\n return this.offsetWidth > 0 || this.offsetHeight > 0\n }\n\n /**\n * Attaches the MinimapElement to the DOM.\n *\n * The position at which the element is attached is defined by the `displayMinimapOnLeft` setting.\n *\n * @param {HTMLElement} [parent] The DOM node where attaching the minimap element\n */\n attach(parent) {\n if (this.attached) {\n return\n }\n\n const container = parent || this.minimap.getTextEditorElement()\n const minimaps = container.querySelectorAll(TAG_NAME)\n if (minimaps.length) {\n Array.prototype.forEach.call(minimaps, (el) => {\n el.destroy()\n try {\n container.removeChild(el)\n } catch (e) {\n // TODO: ignore for now\n // https://github.com/atom-minimap/minimap/issues/766#issuecomment-762496374\n }\n })\n }\n container.appendChild(this)\n }\n\n /** Detaches the MinimapElement from the DOM. */\n detach() {\n if (!this.attached || this.parentNode == null) {\n return\n }\n this.parentNode.removeChild(this)\n }\n\n /**\n * Toggles the minimap left/right position based on the value of the `displayMinimapOnLeft` setting.\n *\n * @access private\n */\n updateMinimapFlexPosition() {\n this.classList.toggle(\"left\", this.displayMinimapOnLeft)\n if (this.attachedToTextEditor) {\n this.minimap.getTextEditorElement().setAttribute(\"with-minimap\", this.displayMinimapOnLeft ? \"left\" : \"right\")\n }\n }\n\n /** Destroys this MinimapElement */\n destroy() {\n this.DecorationManagement.destroy()\n if (this.quickSettingsElement) {\n this.quickSettingsElement.destroy()\n }\n this.subscriptions.dispose()\n this.detach()\n }\n\n // ###### ####### ## ## ######## ######## ## ## ########\n // ## ## ## ## ### ## ## ## ### ## ##\n // ## ## ## #### ## ## ## #### ## ##\n // ## ## ## ## ## ## ## ###### ## ## ## ##\n // ## ## ## ## #### ## ## ## #### ##\n // ## ## ## ## ## ### ## ## ## ### ##\n // ###### ####### ## ## ## ######## ## ## ##\n\n /**\n * Creates the content of the MinimapElement and attaches the mouse control event listeners.\n *\n * @access private\n */\n initializeContent() {\n this.initializeCanvas()\n\n this.attachCanvases(this)\n\n this.createVisibleArea()\n this.createControls()\n\n this.subscriptions.add(\n this.subscribeTo(\n this,\n {\n mousewheel: (e) => {\n if (!this.standAlone && this.minimap.onMouseWheel) {\n this.minimap.onMouseWheel(e)\n }\n },\n },\n { passive: true }\n ),\n\n this.subscribeTo(\n this.getFrontCanvas(),\n {\n mousedown: (e) => {\n this.canvasPressed(extractMouseEventData(e))\n },\n touchstart: (e) => {\n this.canvasPressed(extractTouchEventData(e))\n },\n },\n { passive: true }\n )\n )\n }\n\n /**\n * Initializes the visible area div.\n *\n * @access private\n */\n createVisibleArea() {\n if (this.visibleArea) {\n return\n }\n\n this.visibleArea = document.createElement(\"div\")\n this.visibleArea.classList.add(\"minimap-visible-area\")\n this.appendChild(this.visibleArea)\n this.visibleAreaSubscription = this.subscribeTo(\n this.visibleArea,\n {\n mousedown: (e) => {\n this.startDrag(extractMouseEventData(e))\n },\n touchstart: (e) => {\n this.startDrag(extractTouchEventData(e))\n },\n },\n { passive: true }\n )\n\n this.subscriptions.add(this.visibleAreaSubscription)\n }\n\n /**\n * Removes the visible area div.\n *\n * @access private\n */\n removeVisibleArea() {\n if (!this.visibleArea) {\n return\n }\n\n this.subscriptions.remove(this.visibleAreaSubscription)\n this.visibleAreaSubscription.dispose()\n this.removeChild(this.visibleArea)\n delete this.visibleArea\n }\n\n /**\n * Creates the controls container div.\n *\n * @access private\n */\n createControls() {\n if (this.controls || this.standAlone) {\n return\n }\n\n this.controls = document.createElement(\"div\")\n this.controls.classList.add(\"minimap-controls\")\n this.appendChild(this.controls)\n }\n\n /**\n * Removes the controls container div.\n *\n * @access private\n */\n removeControls() {\n if (!this.controls) {\n return\n }\n\n this.removeChild(this.controls)\n delete this.controls\n }\n\n /**\n * Initializes the scroll indicator div when the `minimapScrollIndicator` settings is enabled.\n *\n * @access private\n */\n initializeScrollIndicator() {\n if (this.scrollIndicator || this.standAlone) {\n return\n }\n\n this.scrollIndicator = document.createElement(\"div\")\n this.scrollIndicator.classList.add(\"minimap-scroll-indicator\")\n this.controls.appendChild(this.scrollIndicator)\n }\n\n /**\n * Disposes the scroll indicator div when the `minimapScrollIndicator` settings is disabled.\n *\n * @access private\n */\n disposeScrollIndicator() {\n if (!this.scrollIndicator) {\n return\n }\n\n this.controls.removeChild(this.scrollIndicator)\n delete this.scrollIndicator\n }\n\n /**\n * Initializes the quick settings openener div when the `displayPluginsControls` setting is enabled.\n *\n * @access private\n */\n initializeOpenQuickSettings() {\n if (this.openQuickSettings || this.standAlone) {\n return\n }\n\n this.openQuickSettings = document.createElement(\"div\")\n this.openQuickSettings.classList.add(\"open-minimap-quick-settings\")\n this.controls.appendChild(this.openQuickSettings)\n\n this.openQuickSettingSubscription = this.subscribeTo(this.openQuickSettings, {\n mousedown: (e) => {\n e.preventDefault()\n e.stopPropagation()\n\n if (this.quickSettingsElement != null) {\n this.quickSettingsElement.destroy()\n this.quickSettingsSubscription.dispose()\n } else {\n this.quickSettingsElement = createMinimapQuickSettingsElement()\n this.quickSettingsElement.setModel(this)\n this.quickSettingsSubscription = this.quickSettingsElement.onDidDestroy(() => {\n this.quickSettingsElement = null\n })\n\n const { top, left, right } = this.getFrontCanvas().getBoundingClientRect()\n this.quickSettingsElement.style.top = `${top}px`\n this.quickSettingsElement.attach()\n\n if (this.displayMinimapOnLeft) {\n this.quickSettingsElement.style.left = `${right}px`\n } else {\n this.quickSettingsElement.style.left = `${left - this.quickSettingsElement.clientWidth}px`\n }\n }\n },\n })\n }\n\n /**\n * Disposes the quick settings openener div when the `displayPluginsControls` setting is disabled.\n *\n * @access private\n */\n disposeOpenQuickSettings() {\n if (!this.openQuickSettings) {\n return\n }\n\n this.controls.removeChild(this.openQuickSettings)\n this.openQuickSettingSubscription.dispose()\n delete this.openQuickSettings\n }\n\n /**\n * Get the DecorationManagement API for minimapElement\n *\n * @returns {DecorationManagement}\n */\n getDecorationManagement() {\n return this.DecorationManagement\n }\n\n // ## ## ####### ######## ######## ##\n // ### ### ## ## ## ## ## ##\n // #### #### ## ## ## ## ## ##\n // ## ### ## ## ## ## ## ###### ##\n // ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## ##\n // ## ## ####### ######## ######## ########\n\n /**\n * Returns the Minimap for which this MinimapElement was created.\n *\n * @returns {Minimap} This element's Minimap\n */\n getModel() {\n return this.minimap\n }\n\n /**\n * Defines the Minimap model for this MinimapElement instance.\n *\n * @param {Minimap} minimap The Minimap model for this instance.\n * @returns {Minimap} This element's Minimap\n */\n setModel(minimap) {\n this.minimap = minimap\n\n // set minimapElement for Minimap\n this.minimap.minimapElement = this\n\n this.DecorationManagement.initializeDecorations(this.minimap)\n\n this.subscriptions.add(\n this.minimap.onDidChangeScrollTop(() => {\n this.requestUpdate()\n }),\n\n this.minimap.onDidChangeScrollLeft(() => {\n this.requestUpdate()\n }),\n\n this.minimap.onDidDestroy(() => {\n this.destroy()\n }),\n\n this.minimap.onDidChangeConfig(() => {\n if (this.attached) {\n return this.requestForcedUpdate()\n }\n }),\n\n this.minimap.onDidChangeStandAlone(() => {\n this.setStandAlone(this.minimap.isStandAlone())\n this.requestUpdate()\n }),\n\n this.minimap.onDidChange((change) => {\n this.pendingChanges.push(change)\n this.requestUpdate()\n }),\n\n this.DecorationManagement.onDidChangeDecorationRange((change) => {\n const { type } = change\n if (type === \"line\" || type === \"highlight-under\" || type === \"background-custom\") {\n this.pendingBackDecorationChanges.push(change)\n } else {\n this.pendingFrontDecorationChanges.push(change)\n }\n this.requestUpdate()\n }),\n\n Main.onDidChangePluginOrder(() => {\n this.requestForcedUpdate()\n })\n )\n\n this.setStandAlone(this.minimap.isStandAlone())\n\n if (this.width != null && this.height != null) {\n this.minimap.setScreenHeightAndWidth(this.height, this.width)\n }\n\n return this.minimap\n }\n\n /**\n * Sets the stand-alone mode for this MinimapElement.\n *\n * @param {boolean} standAlone The new mode for this MinimapElement\n */\n setStandAlone(standAlone) {\n this.standAlone = standAlone\n\n if (this.standAlone) {\n this.setAttribute(\"stand-alone\", true)\n this.disposeScrollIndicator()\n this.disposeOpenQuickSettings()\n this.removeControls()\n this.removeVisibleArea()\n } else {\n this.removeAttribute(\"stand-alone\")\n this.createVisibleArea()\n this.createControls()\n if (this.minimapScrollIndicator) {\n this.initializeScrollIndicator()\n }\n if (this.displayPluginsControls) {\n this.initializeOpenQuickSettings()\n }\n }\n }\n\n // ## ## ######## ######## ### ######## ########\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ######## ## ## ## ## ## ######\n // ## ## ## ## ## ######### ## ##\n // ## ## ## ## ## ## ## ## ##\n // ####### ## ######## ## ## ## ########\n\n /** Requests an update to be performed on the next frame. */\n requestUpdate() {\n if (this.frameRequested) {\n return\n }\n\n this.frameRequested = true\n requestAnimationFrame(() => {\n this.update()\n this.frameRequested = false\n })\n }\n\n /** Requests an update to be performed on the next frame that will completely redraw the minimap. */\n requestForcedUpdate() {\n this.offscreenFirstRow = null\n this.offscreenLastRow = null\n this.requestUpdate()\n }\n\n /**\n * Performs the actual MinimapElement update.\n *\n * @access private\n */\n update() {\n if (!(this.attached && this.isVisible() && this.minimap)) {\n return\n }\n const minimap = this.minimap\n minimap.enableCache()\n const canvas = this.getFrontCanvas()\n\n const devicePixelRatio = this.minimap.getDevicePixelRatio()\n const visibleAreaLeft = minimap.getTextEditorScaledScrollLeft()\n const visibleAreaTop = minimap.getTextEditorScaledScrollTop() - minimap.getScrollTop()\n const width = Math.min(canvas.width / devicePixelRatio, this.width)\n const visibleWidth = width + visibleAreaLeft\n\n if (this.adjustToSoftWrap && this.flexBasis) {\n this.style.flexBasis = `${this.flexBasis}px`\n this.style.width = `${this.flexBasis}px`\n } else {\n this.style.flexBasis = null\n this.style.width = null\n }\n\n if (SPEC_MODE) {\n applyStyles(this.visibleArea, {\n width: `${Math.round(visibleWidth)}px`,\n height: `${Math.round(minimap.getTextEditorScaledHeight())}px`,\n top: `${Math.round(visibleAreaTop)}px`,\n \"border-left-width\": `${Math.round(visibleAreaLeft)}px`,\n })\n } else {\n applyStyles(this.visibleArea, {\n width: `${Math.round(visibleWidth)}px`,\n height: `${Math.round(minimap.getTextEditorScaledHeight())}px`,\n transform: makeTranslate(0, visibleAreaTop, this.useHardwareAcceleration),\n \"border-left-width\": `${Math.round(visibleAreaLeft)}px`,\n })\n }\n\n applyStyles(this.controls, { width: `${Math.round(width)}px` })\n\n const canvasTop = minimap.getFirstVisibleScreenRow() * minimap.getLineHeight() - minimap.getScrollTop()\n\n if (this.smoothScrolling) {\n if (SPEC_MODE) {\n applyStyles(this.backLayer.canvas, { top: `${canvasTop}px` })\n applyStyles(this.tokensLayer.canvas, { top: `${canvasTop}px` })\n applyStyles(this.frontLayer.canvas, { top: `${canvasTop}px` })\n } else {\n let canvasTransform = makeTranslate(0, canvasTop, this.useHardwareAcceleration)\n if (devicePixelRatio !== 1) {\n const scale = 1 / devicePixelRatio\n canvasTransform += ` ${makeScale(scale, scale, this.useHardwareAcceleration)}`\n }\n applyStyles(this.backLayer.canvas, { transform: canvasTransform })\n applyStyles(this.tokensLayer.canvas, { transform: canvasTransform })\n applyStyles(this.frontLayer.canvas, { transform: canvasTransform })\n }\n } else {\n const scale = 1 / devicePixelRatio\n const canvasTransform = makeScale(scale, scale, this.useHardwareAcceleration)\n applyStyles(this.backLayer.canvas, { transform: canvasTransform })\n applyStyles(this.tokensLayer.canvas, { transform: canvasTransform })\n applyStyles(this.frontLayer.canvas, { transform: canvasTransform })\n }\n\n if (this.minimapScrollIndicator && !this.scrollIndicator && minimap.canScroll()) {\n this.initializeScrollIndicator()\n }\n\n if (this.scrollIndicator != null) {\n const minimapScreenHeight = minimap.getScreenHeight()\n const indicatorHeight = minimapScreenHeight * (minimapScreenHeight / minimap.getHeight())\n const indicatorScroll = (minimapScreenHeight - indicatorHeight) * minimap.getScrollRatio()\n\n if (SPEC_MODE) {\n applyStyles(this.scrollIndicator, {\n height: `${indicatorHeight}px`,\n top: `${indicatorScroll}px`,\n })\n } else {\n applyStyles(this.scrollIndicator, {\n height: `${indicatorHeight}px`,\n transform: makeTranslate(0, indicatorScroll, this.useHardwareAcceleration),\n })\n }\n\n if (!minimap.canScroll()) {\n this.disposeScrollIndicator()\n }\n }\n\n if (this.absoluteMode && this.adjustAbsoluteModeHeight) {\n this.updateCanvasesSize()\n }\n\n this.updateCanvas()\n minimap.clearCache()\n }\n\n /**\n * Defines whether to render the code highlights or not.\n *\n * @param {Boolean} displayCodeHighlights Whether to render the code highlights or not\n */\n setDisplayCodeHighlights(displayCodeHighlights) {\n this.displayCodeHighlights = displayCodeHighlights\n if (this.attached) {\n this.requestForcedUpdate()\n }\n }\n\n /**\n * Polling callback used to detect visibility and size changes.\n *\n * @access private\n */\n pollDOM() {\n const visibilityChanged = this.checkForVisibilityChange()\n if (this.isVisible()) {\n if (!this.wasVisible) {\n this.requestForcedUpdate()\n }\n\n this.measureHeightAndWidth(visibilityChanged, false)\n }\n }\n\n /**\n * A method that checks for visibility changes in the MinimapElement. The method returns `true` when the visibility\n * changed from visible to hidden or from hidden to visible.\n *\n * @returns {boolean} Whether the visibility changed or not since the last call\n * @access private\n */\n checkForVisibilityChange() {\n if (this.isVisible()) {\n if (this.wasVisible) {\n return false\n } else {\n this.wasVisible = true\n return this.wasVisible\n }\n } else {\n if (this.wasVisible) {\n this.wasVisible = false\n return true\n } else {\n this.wasVisible = false\n return this.wasVisible\n }\n }\n }\n\n /**\n * A method used to measure the size of the MinimapElement and update internal components based on the new size.\n *\n * @param {boolean} visibilityChanged Did the visibility changed since last measurement\n * @param {[type]} [forceUpdate=true] Forces the update even when no changes were detected. Default is `true`\n * @access private\n */\n measureHeightAndWidth(visibilityChanged, forceUpdate = true) {\n if (!this.minimap) {\n return\n }\n\n const safeFlexBasis = this.style.flexBasis\n this.style.flexBasis = \"\"\n\n const wasResized = this.width !== this.clientWidth || this.height !== this.clientHeight\n\n this.height = this.clientHeight\n this.width = this.clientWidth\n let canvasWidth = this.width\n\n if (this.minimap != null) {\n this.minimap.setScreenHeightAndWidth(this.height, this.width)\n }\n\n if (wasResized || visibilityChanged || forceUpdate) {\n this.requestForcedUpdate()\n }\n\n if (!this.isVisible()) {\n return\n }\n\n if (wasResized || forceUpdate) {\n if (this.adjustToSoftWrap) {\n const lineLength = atom.config.get(\"editor.preferredLineLength\")\n const softWrap = atom.config.get(\"editor.softWrap\")\n const softWrapAtPreferredLineLength = atom.config.get(\"editor.softWrapAtPreferredLineLength\")\n const width = lineLength * this.minimap.getCharWidth()\n\n if (\n softWrap &&\n softWrapAtPreferredLineLength &&\n lineLength &&\n (width <= this.width || !this.adjustOnlyIfSmaller)\n ) {\n this.flexBasis = width\n canvasWidth = width\n } else {\n delete this.flexBasis\n }\n } else {\n delete this.flexBasis\n }\n\n this.updateCanvasesSize(canvasWidth)\n } else {\n this.style.flexBasis = safeFlexBasis\n }\n }\n\n updateCanvasesSize(canvasWidth) {\n const devicePixelRatio = this.minimap.getDevicePixelRatio()\n const maxCanvasHeight = this.height + this.minimap.getLineHeight()\n const newHeight =\n this.absoluteMode && this.adjustAbsoluteModeHeight\n ? Math.min(this.minimap.getHeight(), maxCanvasHeight)\n : maxCanvasHeight\n const canvas = this.getFrontCanvas()\n\n if (canvasWidth == null) {\n canvasWidth = canvas.width / devicePixelRatio\n }\n\n if (canvasWidth !== canvas.width || newHeight !== canvas.height) {\n this.setCanvasesSize(canvasWidth * devicePixelRatio, newHeight * devicePixelRatio)\n if (this.absoluteMode && this.adjustAbsoluteModeHeight) {\n this.offscreenFirstRow = null\n this.offscreenLastRow = null\n }\n }\n }\n\n // ######## ## ## ######## ## ## ######## ######\n // ## ## ## ## ### ## ## ## ##\n // ## ## ## ## #### ## ## ##\n // ###### ## ## ###### ## ## ## ## ######\n // ## ## ## ## ## #### ## ##\n // ## ## ## ## ## ### ## ## ##\n // ######## ### ######## ## ## ## ######\n\n /**\n * Callback triggered when the mouse is pressed on the MinimapElement canvas.\n *\n * @param {number} y The vertical coordinate of the event\n * @param {boolean} isLeftMouse Was the left mouse button pressed?\n * @param {boolean} isMiddleMouse Was the middle mouse button pressed?\n * @access private\n */\n canvasPressed({ y, isLeftMouse, isMiddleMouse }) {\n if (this.minimap.isStandAlone()) {\n return\n }\n if (isLeftMouse) {\n this.canvasLeftMousePressed(y)\n } else if (isMiddleMouse) {\n this.canvasMiddleMousePressed(y)\n const { top, height } = this.visibleArea.getBoundingClientRect()\n this.startDrag({ y: top + height / 2, isLeftMouse: false, isMiddleMouse: true })\n }\n }\n\n /**\n * Callback triggered when the mouse left button is pressed on the MinimapElement canvas.\n *\n * @param {MouseEvent} e The mouse event object\n * @param {number} e.pageY The mouse y position in page\n * @param {HTMLElement} e.target The source of the event\n * @access private\n */\n canvasLeftMousePressed(y) {\n const deltaY = y - this.getBoundingClientRect().top\n const row = Math.floor(deltaY / this.minimap.getLineHeight()) + this.minimap.getFirstVisibleScreenRow()\n\n const textEditor = this.minimap.getTextEditor()\n const textEditorElement = this.minimap.getTextEditorElement()\n\n const scrollTop = row * textEditor.getLineHeightInPixels() - this.minimap.getTextEditorHeight() / 2\n const textEditorScrollTop =\n textEditorElement.pixelPositionForScreenPosition([row, 0]).top - this.minimap.getTextEditorHeight() / 2\n\n if (atom.config.get(\"minimap.moveCursorOnMinimapClick\")) {\n textEditor.setCursorScreenPosition([row, 0])\n }\n\n if (atom.config.get(\"minimap.scrollAnimation\")) {\n const duration = atom.config.get(\"minimap.scrollAnimationDuration\")\n const independentScroll = this.minimap.scrollIndependentlyOnMouseWheel()\n\n const from = this.minimap.getTextEditorScrollTop()\n const to = textEditorScrollTop\n let step\n\n if (independentScroll) {\n const minimapFrom = this.minimap.getScrollTop()\n const minimapTo =\n Math.min(1, scrollTop / (this.minimap.getTextEditorMaxScrollTop() || 1)) * this.minimap.getMaxScrollTop()\n\n step = (now, t) => {\n if (this.minimap === null) {\n return\n } // TODO why this happens in the tests?\n this.minimap.setTextEditorScrollTop(now, true)\n this.minimap.setScrollTop(minimapFrom + (minimapTo - minimapFrom) * t)\n }\n animate({ from, to, duration, step })\n } else {\n step = (now) => {\n if (this.minimap === null) {\n return\n } // TODO why this happens in the tests?\n this.minimap.setTextEditorScrollTop(now)\n }\n animate({ from, to, duration, step })\n }\n } else {\n this.minimap.setTextEditorScrollTop(textEditorScrollTop)\n }\n }\n\n /**\n * Callback triggered when the mouse middle button is pressed on the MinimapElement canvas.\n *\n * @param {MouseEvent} e The mouse event object\n * @param {number} e.pageY The mouse y position in page\n * @access private\n */\n canvasMiddleMousePressed(y) {\n const { top: offsetTop } = this.getBoundingClientRect()\n const deltaY = y - offsetTop - this.minimap.getTextEditorScaledHeight() / 2\n\n const ratio = deltaY / (this.minimap.getVisibleHeight() - this.minimap.getTextEditorScaledHeight())\n\n this.minimap.setTextEditorScrollTop(ratio * this.minimap.getTextEditorMaxScrollTop())\n }\n\n /**\n * Subscribes to a media query for device pixel ratio changes and forces a repaint when it occurs.\n *\n * @returns {Disposable} A disposable to remove the media query listener\n * @access private\n */\n subscribeToMediaQuery() {\n const mediaQuery = window.matchMedia(\"screen and (-webkit-min-device-pixel-ratio: 1.5)\")\n const mediaListener = () => {\n this.requestForcedUpdate()\n }\n mediaQuery.addEventListener(\"change\", mediaListener)\n\n return new Disposable(() => {\n mediaQuery.removeEventListener(\"change\", mediaListener)\n })\n }\n\n // ######## #### ########\n // ## ## ## ## ## ##\n // ## ## #### ## ##\n // ## ## #### ## ##\n // ## ## ## ## ## ## ##\n // ## ## ## ## ## ##\n // ######## #### ## ########\n\n /**\n * A method triggered when the mouse is pressed over the visible area that starts the dragging gesture.\n *\n * @param {number} y The vertical coordinate of the event\n * @param {boolean} isLeftMouse Was the left mouse button pressed?\n * @param {boolean} isMiddleMouse Was the middle mouse button pressed?\n * @access private\n */\n startDrag({ y, isLeftMouse, isMiddleMouse }) {\n if (!this.minimap) {\n return\n }\n if (!isLeftMouse && !isMiddleMouse) {\n return\n }\n\n const initial = {\n dragOffset: y - this.visibleArea.getBoundingClientRect().top,\n offsetTop: this.getBoundingClientRect().top,\n }\n\n // TODO can we avoid adding and removing the listeners every time?\n\n const mousemoveHandler = (e) => this.drag(extractMouseEventData(e), initial)\n const dragendHandler = () => this.endDrag()\n\n const touchmoveHandler = (e) => this.drag(extractTouchEventData(e), initial)\n\n document.body.addEventListener(\"mousemove\", mousemoveHandler, { passive: true })\n document.body.addEventListener(\"mouseup\", dragendHandler, { passive: true })\n document.body.addEventListener(\"mouseleave\", dragendHandler, { passive: true })\n\n document.body.addEventListener(\"touchmove\", touchmoveHandler, { passive: true })\n document.body.addEventListener(\"touchend\", dragendHandler, { passive: true })\n document.body.addEventListener(\"touchcancel\", dragendHandler, { passive: true })\n\n this.dragSubscription = new Disposable(function () {\n document.body.removeEventListener(\"mousemove\", mousemoveHandler)\n document.body.removeEventListener(\"mouseup\", dragendHandler)\n document.body.removeEventListener(\"mouseleave\", dragendHandler)\n\n document.body.removeEventListener(\"touchmove\", touchmoveHandler)\n document.body.removeEventListener(\"touchend\", dragendHandler)\n document.body.removeEventListener(\"touchcancel\", dragendHandler)\n })\n }\n\n /**\n * The method called during the drag gesture.\n *\n * @param {number} y The vertical coordinate of the event\n * @param {boolean} isLeftMouse Was the left mouse button pressed?\n * @param {boolean} isMiddleMouse Was the middle mouse button pressed?\n * @param {number} initial.dragOffset The mouse offset within the visible area\n * @param {number} initial.offsetTop The MinimapElement offset at the moment of the drag start\n * @access private\n */\n drag({ y, isLeftMouse, isMiddleMouse }, initial) {\n if (!this.minimap) {\n return\n }\n if (!isLeftMouse && !isMiddleMouse) {\n return\n }\n const deltaY = y - initial.offsetTop - initial.dragOffset\n\n const ratio = deltaY / (this.minimap.getVisibleHeight() - this.minimap.getTextEditorScaledHeight())\n\n this.minimap.setTextEditorScrollTop(ratio * this.minimap.getTextEditorMaxScrollTop())\n }\n\n /**\n * The method that ends the drag gesture.\n *\n * @access private\n */\n endDrag() {\n if (!this.minimap) {\n return\n }\n this.dragSubscription.dispose()\n }\n}\n\nMinimapElement.initClass()\n\nexport function createMinimapElement() {\n const element = document.createElement(TAG_NAME)\n element.createdCallback()\n return element\n}\n\n// ######## ## ## ######## ## ## ######## ######\n// ## ## ## ## ### ## ## ## ##\n// ## ## ## ## #### ## ## ##\n// ###### ## ## ###### ## ## ## ## ######\n// ## ## ## ## ## #### ## ##\n// ## ## ## ## ## ### ## ## ##\n// ######## ### ######## ## ## ## ######\n\n/**\n * A method that extracts data from a `MouseEvent` which can then be used to process clicks and drags of the minimap.\n *\n * Used together with `extractTouchEventData` to provide a unified interface for `MouseEvent`s and `TouchEvent`s.\n *\n * @param {MouseEvent} mouseEvent The mouse event object\n * @access private\n */\nfunction extractMouseEventData(mouseEvent) {\n return {\n x: mouseEvent.pageX,\n y: mouseEvent.pageY,\n isLeftMouse: mouseEvent.button === 0,\n isMiddleMouse: mouseEvent.button === 1,\n }\n}\n\n/**\n * A method that extracts data from a `TouchEvent` which can then be used to process clicks and drags of the minimap.\n *\n * Used together with `extractMouseEventData` to provide a unified interface for `MouseEvent`s and `TouchEvent`s.\n *\n * @param {TouchEvent} touchEvent The touch event object\n * @access private\n */\nfunction extractTouchEventData(touchEvent) {\n // Use the first touch on the target area. Other touches will be ignored in\n // case of multi-touch.\n const touch = touchEvent.changedTouches[0]\n\n return {\n x: touch.pageX,\n y: touch.pageY,\n isLeftMouse: true, // Touch is treated like a left mouse button click\n isMiddleMouse: false,\n }\n}\n\n// ###### ###### ######\n// ## ## ## ## ## ##\n// ## ## ##\n// ## ###### ######\n// ## ## ##\n// ## ## ## ## ## ##\n// ###### ###### ######\n\n/**\n * Applies the passed-in styles properties to the specified element\n *\n * @param {HTMLElement} element The element onto which apply the styles\n * @param {Object} styles The styles to apply\n * @access private\n */\nfunction applyStyles(element, styles) {\n if (!element) {\n return\n }\n\n let cssText = \"\"\n for (const property in styles) {\n cssText += `${property}: ${styles[property]}; `\n }\n\n element.style.cssText = cssText\n}\n\n/**\n * Returns a string with a CSS translation tranform value.\n *\n * @param {number} [x=0] The x offset of the translation. Default is `0`\n * @param {number} [y=0] The y offset of the translation. Default is `0`\n * @param {boolean} [useHardwareAcceleration=false] Use hardware acceleration. Default is `false`\n * @returns {string} The CSS translation string\n * @access private\n */\nfunction makeTranslate(x = 0, y = 0, useHardwareAcceleration = false) {\n if (useHardwareAcceleration) {\n return `translate3d(${x}px, ${y}px, 0)`\n } else {\n return `translate(${x}px, ${y}px)`\n }\n}\n\n/**\n * Returns a string with a CSS scaling tranform value.\n *\n * @param {number} [x=0] The x scaling factor. Default is `0`\n * @param {number} [y=0] The y scaling factor. Default is `0`\n * @param {boolean} [useHardwareAcceleration=false] Use hardware acceleration. Default is `false`\n * @returns {string} The CSS scaling string\n * @access private\n */\nfunction makeScale(x = 0, y = x, useHardwareAcceleration = false) {\n if (useHardwareAcceleration) {\n return `scale3d(${x}, ${y}, 1)`\n } else {\n return `scale(${x}, ${y})`\n }\n}\n\n/**\n * A method that mimic the jQuery `animate` method and used to animate the scroll when clicking on the MinimapElement canvas.\n *\n * @param {Object} param The animation data object\n * @param {[type]} param.from The start value\n * @param {[type]} param.to The end value\n * @param {[type]} param.duration The animation duration\n * @param {[type]} param.step The easing function for the animation\n * @access private\n */\nfunction animate({ from, to, duration, step }) {\n const start = getTime()\n let progress\n\n const update = () => {\n const passed = getTime() - start\n if (duration === 0) {\n progress = 1\n } else {\n progress = passed / duration\n }\n if (progress > 1) {\n progress = 1\n }\n const delta = swing(progress)\n const value = from + (to - from) * delta\n step(value, delta)\n\n if (progress < 1) {\n requestAnimationFrame(update)\n }\n }\n\n update()\n}\n\nfunction swing(progress) {\n return 0.5 - Math.cos(progress * Math.PI) / 2\n}\n\n/**\n * A method that return the current time as a Date.\n *\n * That method exist so that we can mock it in tests.\n *\n * @returns {Date} The current time as Date\n * @access private\n */\nfunction getTime() {\n return new Date()\n}\n","// Generated by CoffeeScript 2.5.1\n(function() {\n module.exports = {\n requirePackages: function(...packages) {\n return new Promise(function(resolve, reject) {\n var failures, remains, required, solved;\n required = [];\n failures = [];\n remains = packages.length;\n solved = function() {\n remains--;\n if (remains !== 0) {\n return;\n }\n if (failures.length > 0) {\n return reject(failures);\n }\n return resolve(required);\n };\n return packages.forEach(function(pkg, i) {\n var failHandler, promise;\n failHandler = function(reason) {\n failures[i] = reason;\n return solved();\n };\n promise = atom.packages.activatePackage(pkg).then(function(activatedPackage) {\n required[i] = activatedPackage.mainModule;\n return solved();\n });\n if (promise.fail != null) {\n return promise.fail(failHandler);\n } else if (promise.catch != null) {\n return promise.catch(failHandler);\n }\n });\n });\n },\n registerOrUpdateElement: require('./register-or-update-element'),\n Ancestors: require('./mixins/ancestors'),\n AncestorsMethods: require('./mixins/ancestors'),\n DisposableEvents: require('./mixins/disposable-events'),\n EventsDelegation: require('./mixins/events-delegation'),\n SpacePenDSL: require('./mixins/space-pen-dsl')\n };\n\n}).call(this);\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXRvbS11dGlscy5qcyIsInNvdXJjZVJvb3QiOiIuLiIsInNvdXJjZXMiOlsibGliL2F0b20tdXRpbHMuY29mZmVlIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFDQTtFQUFBLE1BQU0sQ0FBQyxPQUFQLEdBQ0U7SUFBQSxlQUFBLEVBQWlCLFFBQUEsQ0FBQSxHQUFDLFFBQUQsQ0FBQTthQUNmLElBQUksT0FBSixDQUFZLFFBQUEsQ0FBQyxPQUFELEVBQVUsTUFBVixDQUFBO0FBQ2hCLFlBQUEsUUFBQSxFQUFBLE9BQUEsRUFBQSxRQUFBLEVBQUE7UUFBTSxRQUFBLEdBQVc7UUFDWCxRQUFBLEdBQVc7UUFDWCxPQUFBLEdBQVUsUUFBUSxDQUFDO1FBRW5CLE1BQUEsR0FBUyxRQUFBLENBQUEsQ0FBQTtVQUNQLE9BQUE7VUFDQSxJQUFjLE9BQUEsS0FBVyxDQUF6QjtBQUFBLG1CQUFBOztVQUNBLElBQTJCLFFBQVEsQ0FBQyxNQUFULEdBQWtCLENBQTdDO0FBQUEsbUJBQU8sTUFBQSxDQUFPLFFBQVAsRUFBUDs7aUJBQ0EsT0FBQSxDQUFRLFFBQVI7UUFKTztlQU1ULFFBQVEsQ0FBQyxPQUFULENBQWlCLFFBQUEsQ0FBQyxHQUFELEVBQU0sQ0FBTixDQUFBO0FBQ3ZCLGNBQUEsV0FBQSxFQUFBO1VBQVEsV0FBQSxHQUFjLFFBQUEsQ0FBQyxNQUFELENBQUE7WUFDWixRQUFRLENBQUMsQ0FBRCxDQUFSLEdBQWM7bUJBQ2QsTUFBQSxDQUFBO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c3BhY2UtcGVuLWRzbCdcbiJdfQ==\n//# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/atom-utils.coffee","\"use strict\";\n\nvar forEach = require(\"./collection-utils\").forEach;\nvar elementUtilsMaker = require(\"./element-utils\");\nvar listenerHandlerMaker = require(\"./listener-handler\");\nvar idGeneratorMaker = require(\"./id-generator\");\nvar idHandlerMaker = require(\"./id-handler\");\nvar reporterMaker = require(\"./reporter\");\nvar browserDetector = require(\"./browser-detector\");\nvar batchProcessorMaker = require(\"batch-processor\");\nvar stateHandler = require(\"./state-handler\");\n\n//Detection strategies.\nvar objectStrategyMaker = require(\"./detection-strategy/object.js\");\nvar scrollStrategyMaker = require(\"./detection-strategy/scroll.js\");\n\nfunction isCollection(obj) {\n return Array.isArray(obj) || obj.length !== undefined;\n}\n\nfunction toArray(collection) {\n if (!Array.isArray(collection)) {\n var array = [];\n forEach(collection, function (obj) {\n array.push(obj);\n });\n return array;\n } else {\n return collection;\n }\n}\n\nfunction isElement(obj) {\n return obj && obj.nodeType === 1;\n}\n\n/**\n * @typedef idHandler\n * @type {object}\n * @property {function} get Gets the resize detector id of the element.\n * @property {function} set Generate and sets the resize detector id of the element.\n */\n\n/**\n * @typedef Options\n * @type {object}\n * @property {boolean} callOnAdd Determines if listeners should be called when they are getting added.\n Default is true. If true, the listener is guaranteed to be called when it has been added.\n If false, the listener will not be guarenteed to be called when it has been added (does not prevent it from being called).\n * @property {idHandler} idHandler A custom id handler that is responsible for generating, setting and retrieving id's for elements.\n If not provided, a default id handler will be used.\n * @property {reporter} reporter A custom reporter that handles reporting logs, warnings and errors.\n If not provided, a default id handler will be used.\n If set to false, then nothing will be reported.\n * @property {boolean} debug If set to true, the the system will report debug messages as default for the listenTo method.\n */\n\n/**\n * Creates an element resize detector instance.\n * @public\n * @param {Options?} options Optional global options object that will decide how this instance will work.\n */\nmodule.exports = function(options) {\n options = options || {};\n\n //idHandler is currently not an option to the listenTo function, so it should not be added to globalOptions.\n var idHandler;\n\n if (options.idHandler) {\n // To maintain compatability with idHandler.get(element, readonly), make sure to wrap the given idHandler\n // so that readonly flag always is true when it's used here. This may be removed next major version bump.\n idHandler = {\n get: function (element) { return options.idHandler.get(element, true); },\n set: options.idHandler.set\n };\n } else {\n var idGenerator = idGeneratorMaker();\n var defaultIdHandler = idHandlerMaker({\n idGenerator: idGenerator,\n stateHandler: stateHandler\n });\n idHandler = defaultIdHandler;\n }\n\n //reporter is currently not an option to the listenTo function, so it should not be added to globalOptions.\n var reporter = options.reporter;\n\n if(!reporter) {\n //If options.reporter is false, then the reporter should be quiet.\n var quiet = reporter === false;\n reporter = reporterMaker(quiet);\n }\n\n //batchProcessor is currently not an option to the listenTo function, so it should not be added to globalOptions.\n var batchProcessor = getOption(options, \"batchProcessor\", batchProcessorMaker({ reporter: reporter }));\n\n //Options to be used as default for the listenTo function.\n var globalOptions = {};\n globalOptions.callOnAdd = !!getOption(options, \"callOnAdd\", true);\n globalOptions.debug = !!getOption(options, \"debug\", false);\n\n var eventListenerHandler = listenerHandlerMaker(idHandler);\n var elementUtils = elementUtilsMaker({\n stateHandler: stateHandler\n });\n\n //The detection strategy to be used.\n var detectionStrategy;\n var desiredStrategy = getOption(options, \"strategy\", \"object\");\n var importantCssRules = getOption(options, \"important\", false);\n var strategyOptions = {\n reporter: reporter,\n batchProcessor: batchProcessor,\n stateHandler: stateHandler,\n idHandler: idHandler,\n important: importantCssRules\n };\n\n if(desiredStrategy === \"scroll\") {\n if (browserDetector.isLegacyOpera()) {\n reporter.warn(\"Scroll strategy is not supported on legacy Opera. Changing to object strategy.\");\n desiredStrategy = \"object\";\n } else if (browserDetector.isIE(9)) {\n reporter.warn(\"Scroll strategy is not supported on IE9. Changing to object strategy.\");\n desiredStrategy = \"object\";\n }\n }\n\n if(desiredStrategy === \"scroll\") {\n detectionStrategy = scrollStrategyMaker(strategyOptions);\n } else if(desiredStrategy === \"object\") {\n detectionStrategy = objectStrategyMaker(strategyOptions);\n } else {\n throw new Error(\"Invalid strategy name: \" + desiredStrategy);\n }\n\n //Calls can be made to listenTo with elements that are still being installed.\n //Also, same elements can occur in the elements list in the listenTo function.\n //With this map, the ready callbacks can be synchronized between the calls\n //so that the ready callback can always be called when an element is ready - even if\n //it wasn't installed from the function itself.\n var onReadyCallbacks = {};\n\n /**\n * Makes the given elements resize-detectable and starts listening to resize events on the elements. Calls the event callback for each event for each element.\n * @public\n * @param {Options?} options Optional options object. These options will override the global options. Some options may not be overriden, such as idHandler.\n * @param {element[]|element} elements The given array of elements to detect resize events of. Single element is also valid.\n * @param {function} listener The callback to be executed for each resize event for each element.\n */\n function listenTo(options, elements, listener) {\n function onResizeCallback(element) {\n var listeners = eventListenerHandler.get(element);\n forEach(listeners, function callListenerProxy(listener) {\n listener(element);\n });\n }\n\n function addListener(callOnAdd, element, listener) {\n eventListenerHandler.add(element, listener);\n\n if(callOnAdd) {\n listener(element);\n }\n }\n\n //Options object may be omitted.\n if(!listener) {\n listener = elements;\n elements = options;\n options = {};\n }\n\n if(!elements) {\n throw new Error(\"At least one element required.\");\n }\n\n if(!listener) {\n throw new Error(\"Listener required.\");\n }\n\n if (isElement(elements)) {\n // A single element has been passed in.\n elements = [elements];\n } else if (isCollection(elements)) {\n // Convert collection to array for plugins.\n // TODO: May want to check so that all the elements in the collection are valid elements.\n elements = toArray(elements);\n } else {\n return reporter.error(\"Invalid arguments. Must be a DOM element or a collection of DOM elements.\");\n }\n\n var elementsReady = 0;\n\n var callOnAdd = getOption(options, \"callOnAdd\", globalOptions.callOnAdd);\n var onReadyCallback = getOption(options, \"onReady\", function noop() {});\n var debug = getOption(options, \"debug\", globalOptions.debug);\n\n forEach(elements, function attachListenerToElement(element) {\n if (!stateHandler.getState(element)) {\n stateHandler.initState(element);\n idHandler.set(element);\n }\n\n var id = idHandler.get(element);\n\n debug && reporter.log(\"Attaching listener to element\", id, element);\n\n if(!elementUtils.isDetectable(element)) {\n debug && reporter.log(id, \"Not detectable.\");\n if(elementUtils.isBusy(element)) {\n debug && reporter.log(id, \"System busy making it detectable\");\n\n //The element is being prepared to be detectable. Do not make it detectable.\n //Just add the listener, because the element will soon be detectable.\n addListener(callOnAdd, element, listener);\n onReadyCallbacks[id] = onReadyCallbacks[id] || [];\n onReadyCallbacks[id].push(function onReady() {\n elementsReady++;\n\n if(elementsReady === elements.length) {\n onReadyCallback();\n }\n });\n return;\n }\n\n debug && reporter.log(id, \"Making detectable...\");\n //The element is not prepared to be detectable, so do prepare it and add a listener to it.\n elementUtils.markBusy(element, true);\n return detectionStrategy.makeDetectable({ debug: debug, important: importantCssRules }, element, function onElementDetectable(element) {\n debug && reporter.log(id, \"onElementDetectable\");\n\n if (stateHandler.getState(element)) {\n elementUtils.markAsDetectable(element);\n elementUtils.markBusy(element, false);\n detectionStrategy.addListener(element, onResizeCallback);\n addListener(callOnAdd, element, listener);\n\n // Since the element size might have changed since the call to \"listenTo\", we need to check for this change,\n // so that a resize event may be emitted.\n // Having the startSize object is optional (since it does not make sense in some cases such as unrendered elements), so check for its existance before.\n // Also, check the state existance before since the element may have been uninstalled in the installation process.\n var state = stateHandler.getState(element);\n if (state && state.startSize) {\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n if (state.startSize.width !== width || state.startSize.height !== height) {\n onResizeCallback(element);\n }\n }\n\n if(onReadyCallbacks[id]) {\n forEach(onReadyCallbacks[id], function(callback) {\n callback();\n });\n }\n } else {\n // The element has been unisntalled before being detectable.\n debug && reporter.log(id, \"Element uninstalled before being detectable.\");\n }\n\n delete onReadyCallbacks[id];\n\n elementsReady++;\n if(elementsReady === elements.length) {\n onReadyCallback();\n }\n });\n }\n\n debug && reporter.log(id, \"Already detecable, adding listener.\");\n\n //The element has been prepared to be detectable and is ready to be listened to.\n addListener(callOnAdd, element, listener);\n elementsReady++;\n });\n\n if(elementsReady === elements.length) {\n onReadyCallback();\n }\n }\n\n function uninstall(elements) {\n if(!elements) {\n return reporter.error(\"At least one element is required.\");\n }\n\n if (isElement(elements)) {\n // A single element has been passed in.\n elements = [elements];\n } else if (isCollection(elements)) {\n // Convert collection to array for plugins.\n // TODO: May want to check so that all the elements in the collection are valid elements.\n elements = toArray(elements);\n } else {\n return reporter.error(\"Invalid arguments. Must be a DOM element or a collection of DOM elements.\");\n }\n\n forEach(elements, function (element) {\n eventListenerHandler.removeAllListeners(element);\n detectionStrategy.uninstall(element);\n stateHandler.cleanState(element);\n });\n }\n\n function initDocument(targetDocument) {\n detectionStrategy.initDocument && detectionStrategy.initDocument(targetDocument);\n }\n\n return {\n listenTo: listenTo,\n removeListener: eventListenerHandler.removeListener,\n removeAllListeners: eventListenerHandler.removeAllListeners,\n uninstall: uninstall,\n initDocument: initDocument\n };\n};\n\nfunction getOption(options, name, defaultValue) {\n var value = options[name];\n\n if((value === undefined || value === null) && defaultValue !== undefined) {\n return defaultValue;\n }\n\n return value;\n}\n","\"use strict\";\n\nvar utils = module.exports = {};\n\n/**\n * Loops through the collection and calls the callback for each element. if the callback returns truthy, the loop is broken and returns the same value.\n * @public\n * @param {*} collection The collection to loop through. Needs to have a length property set and have indices set from 0 to length - 1.\n * @param {function} callback The callback to be called for each element. The element will be given as a parameter to the callback. If this callback returns truthy, the loop is broken and the same value is returned.\n * @returns {*} The value that a callback has returned (if truthy). Otherwise nothing.\n */\nutils.forEach = function(collection, callback) {\n for(var i = 0; i < collection.length; i++) {\n var result = callback(collection[i]);\n if(result) {\n return result;\n }\n }\n};\n","\"use strict\";\n\nmodule.exports = function(options) {\n var getState = options.stateHandler.getState;\n\n /**\n * Tells if the element has been made detectable and ready to be listened for resize events.\n * @public\n * @param {element} The element to check.\n * @returns {boolean} True or false depending on if the element is detectable or not.\n */\n function isDetectable(element) {\n var state = getState(element);\n return state && !!state.isDetectable;\n }\n\n /**\n * Marks the element that it has been made detectable and ready to be listened for resize events.\n * @public\n * @param {element} The element to mark.\n */\n function markAsDetectable(element) {\n getState(element).isDetectable = true;\n }\n\n /**\n * Tells if the element is busy or not.\n * @public\n * @param {element} The element to check.\n * @returns {boolean} True or false depending on if the element is busy or not.\n */\n function isBusy(element) {\n return !!getState(element).busy;\n }\n\n /**\n * Marks the object is busy and should not be made detectable.\n * @public\n * @param {element} element The element to mark.\n * @param {boolean} busy If the element is busy or not.\n */\n function markBusy(element, busy) {\n getState(element).busy = !!busy;\n }\n\n return {\n isDetectable: isDetectable,\n markAsDetectable: markAsDetectable,\n isBusy: isBusy,\n markBusy: markBusy\n };\n};\n","\"use strict\";\n\nmodule.exports = function(idHandler) {\n var eventListeners = {};\n\n /**\n * Gets all listeners for the given element.\n * @public\n * @param {element} element The element to get all listeners for.\n * @returns All listeners for the given element.\n */\n function getListeners(element) {\n var id = idHandler.get(element);\n\n if (id === undefined) {\n return [];\n }\n\n return eventListeners[id] || [];\n }\n\n /**\n * Stores the given listener for the given element. Will not actually add the listener to the element.\n * @public\n * @param {element} element The element that should have the listener added.\n * @param {function} listener The callback that the element has added.\n */\n function addListener(element, listener) {\n var id = idHandler.get(element);\n\n if(!eventListeners[id]) {\n eventListeners[id] = [];\n }\n\n eventListeners[id].push(listener);\n }\n\n function removeListener(element, listener) {\n var listeners = getListeners(element);\n for (var i = 0, len = listeners.length; i < len; ++i) {\n if (listeners[i] === listener) {\n listeners.splice(i, 1);\n break;\n }\n }\n }\n\n function removeAllListeners(element) {\n var listeners = getListeners(element);\n if (!listeners) { return; }\n listeners.length = 0;\n }\n\n return {\n get: getListeners,\n add: addListener,\n removeListener: removeListener,\n removeAllListeners: removeAllListeners\n };\n};\n","\"use strict\";\n\nmodule.exports = function() {\n var idCount = 1;\n\n /**\n * Generates a new unique id in the context.\n * @public\n * @returns {number} A unique id in the context.\n */\n function generate() {\n return idCount++;\n }\n\n return {\n generate: generate\n };\n};\n","\"use strict\";\n\nmodule.exports = function(options) {\n var idGenerator = options.idGenerator;\n var getState = options.stateHandler.getState;\n\n /**\n * Gets the resize detector id of the element.\n * @public\n * @param {element} element The target element to get the id of.\n * @returns {string|number|null} The id of the element. Null if it has no id.\n */\n function getId(element) {\n var state = getState(element);\n\n if (state && state.id !== undefined) {\n return state.id;\n }\n\n return null;\n }\n\n /**\n * Sets the resize detector id of the element. Requires the element to have a resize detector state initialized.\n * @public\n * @param {element} element The target element to set the id of.\n * @returns {string|number|null} The id of the element.\n */\n function setId(element) {\n var state = getState(element);\n\n if (!state) {\n throw new Error(\"setId required the element to have a resize detection state.\");\n }\n\n var id = idGenerator.generate();\n\n state.id = id;\n\n return id;\n }\n\n return {\n get: getId,\n set: setId\n };\n};\n","\"use strict\";\n\n/* global console: false */\n\n/**\n * Reporter that handles the reporting of logs, warnings and errors.\n * @public\n * @param {boolean} quiet Tells if the reporter should be quiet or not.\n */\nmodule.exports = function(quiet) {\n function noop() {\n //Does nothing.\n }\n\n var reporter = {\n log: noop,\n warn: noop,\n error: noop\n };\n\n if(!quiet && window.console) {\n var attachFunction = function(reporter, name) {\n //The proxy is needed to be able to call the method with the console context,\n //since we cannot use bind.\n reporter[name] = function reporterProxy() {\n var f = console[name];\n if (f.apply) { //IE9 does not support console.log.apply :)\n f.apply(console, arguments);\n } else {\n for (var i = 0; i < arguments.length; i++) {\n f(arguments[i]);\n }\n }\n };\n };\n\n attachFunction(reporter, \"log\");\n attachFunction(reporter, \"warn\");\n attachFunction(reporter, \"error\");\n }\n\n return reporter;\n};","\"use strict\";\n\nvar detector = module.exports = {};\n\ndetector.isIE = function(version) {\n function isAnyIeVersion() {\n var agent = navigator.userAgent.toLowerCase();\n return agent.indexOf(\"msie\") !== -1 || agent.indexOf(\"trident\") !== -1 || agent.indexOf(\" edge/\") !== -1;\n }\n\n if(!isAnyIeVersion()) {\n return false;\n }\n\n if(!version) {\n return true;\n }\n\n //Shamelessly stolen from https://gist.github.com/padolsey/527683\n var ieVersion = (function(){\n var undef,\n v = 3,\n div = document.createElement(\"div\"),\n all = div.getElementsByTagName(\"i\");\n\n do {\n div.innerHTML = \"\";\n }\n while (all[0]);\n\n return v > 4 ? v : undef;\n }());\n\n return version === ieVersion;\n};\n\ndetector.isLegacyOpera = function() {\n return !!window.opera;\n};\n","\"use strict\";\n\nvar utils = require(\"./utils\");\n\nmodule.exports = function batchProcessorMaker(options) {\n options = options || {};\n var reporter = options.reporter;\n var asyncProcess = utils.getOption(options, \"async\", true);\n var autoProcess = utils.getOption(options, \"auto\", true);\n\n if(autoProcess && !asyncProcess) {\n reporter && reporter.warn(\"Invalid options combination. auto=true and async=false is invalid. Setting async=true.\");\n asyncProcess = true;\n }\n\n var batch = Batch();\n var asyncFrameHandler;\n var isProcessing = false;\n\n function addFunction(level, fn) {\n if(!isProcessing && autoProcess && asyncProcess && batch.size() === 0) {\n // Since this is async, it is guaranteed to be executed after that the fn is added to the batch.\n // This needs to be done before, since we're checking the size of the batch to be 0.\n processBatchAsync();\n }\n\n batch.add(level, fn);\n }\n\n function processBatch() {\n // Save the current batch, and create a new batch so that incoming functions are not added into the currently processing batch.\n // Continue processing until the top-level batch is empty (functions may be added to the new batch while processing, and so on).\n isProcessing = true;\n while (batch.size()) {\n var processingBatch = batch;\n batch = Batch();\n processingBatch.process();\n }\n isProcessing = false;\n }\n\n function forceProcessBatch(localAsyncProcess) {\n if (isProcessing) {\n return;\n }\n\n if(localAsyncProcess === undefined) {\n localAsyncProcess = asyncProcess;\n }\n\n if(asyncFrameHandler) {\n cancelFrame(asyncFrameHandler);\n asyncFrameHandler = null;\n }\n\n if(localAsyncProcess) {\n processBatchAsync();\n } else {\n processBatch();\n }\n }\n\n function processBatchAsync() {\n asyncFrameHandler = requestFrame(processBatch);\n }\n\n function clearBatch() {\n batch = {};\n batchSize = 0;\n topLevel = 0;\n bottomLevel = 0;\n }\n\n function cancelFrame(listener) {\n // var cancel = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.clearTimeout;\n var cancel = clearTimeout;\n return cancel(listener);\n }\n\n function requestFrame(callback) {\n // var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function(fn) { return window.setTimeout(fn, 20); };\n var raf = function(fn) { return setTimeout(fn, 0); };\n return raf(callback);\n }\n\n return {\n add: addFunction,\n force: forceProcessBatch\n };\n};\n\nfunction Batch() {\n var batch = {};\n var size = 0;\n var topLevel = 0;\n var bottomLevel = 0;\n\n function add(level, fn) {\n if(!fn) {\n fn = level;\n level = 0;\n }\n\n if(level > topLevel) {\n topLevel = level;\n } else if(level < bottomLevel) {\n bottomLevel = level;\n }\n\n if(!batch[level]) {\n batch[level] = [];\n }\n\n batch[level].push(fn);\n size++;\n }\n\n function process() {\n for(var level = bottomLevel; level <= topLevel; level++) {\n var fns = batch[level];\n\n for(var i = 0; i < fns.length; i++) {\n var fn = fns[i];\n fn();\n }\n }\n }\n\n function getSize() {\n return size;\n }\n\n return {\n add: add,\n process: process,\n size: getSize\n };\n}\n","\"use strict\";\n\nvar utils = module.exports = {};\n\nutils.getOption = getOption;\n\nfunction getOption(options, name, defaultValue) {\n var value = options[name];\n\n if((value === undefined || value === null) && defaultValue !== undefined) {\n return defaultValue;\n }\n\n return value;\n}\n","\"use strict\";\n\nvar prop = \"_erd\";\n\nfunction initState(element) {\n element[prop] = {};\n return getState(element);\n}\n\nfunction getState(element) {\n return element[prop];\n}\n\nfunction cleanState(element) {\n delete element[prop];\n}\n\nmodule.exports = {\n initState: initState,\n getState: getState,\n cleanState: cleanState\n};\n","/**\n * Resize detection strategy that injects objects to elements in order to detect resize events.\n * Heavily inspired by: http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/\n */\n\n\"use strict\";\n\nvar browserDetector = require(\"../browser-detector\");\n\nmodule.exports = function(options) {\n options = options || {};\n var reporter = options.reporter;\n var batchProcessor = options.batchProcessor;\n var getState = options.stateHandler.getState;\n\n if(!reporter) {\n throw new Error(\"Missing required dependency: reporter.\");\n }\n\n /**\n * Adds a resize event listener to the element.\n * @public\n * @param {element} element The element that should have the listener added.\n * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback.\n */\n function addListener(element, listener) {\n function listenerProxy() {\n listener(element);\n }\n\n if(browserDetector.isIE(8)) {\n //IE 8 does not support object, but supports the resize event directly on elements.\n getState(element).object = {\n proxy: listenerProxy\n };\n element.attachEvent(\"onresize\", listenerProxy);\n } else {\n var object = getObject(element);\n\n if(!object) {\n throw new Error(\"Element is not detectable by this strategy.\");\n }\n\n object.contentDocument.defaultView.addEventListener(\"resize\", listenerProxy);\n }\n }\n\n function buildCssTextString(rules) {\n var seperator = options.important ? \" !important; \" : \"; \";\n\n return (rules.join(seperator) + seperator).trim();\n }\n\n /**\n * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes.\n * @private\n * @param {object} options Optional options object.\n * @param {element} element The element to make detectable\n * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter.\n */\n function makeDetectable(options, element, callback) {\n if (!callback) {\n callback = element;\n element = options;\n options = null;\n }\n\n options = options || {};\n var debug = options.debug;\n\n function injectObject(element, callback) {\n var OBJECT_STYLE = buildCssTextString([\"display: block\", \"position: absolute\", \"top: 0\", \"left: 0\", \"width: 100%\", \"height: 100%\", \"border: none\", \"padding: 0\", \"margin: 0\", \"opacity: 0\", \"z-index: -1000\", \"pointer-events: none\"]);\n\n //The target element needs to be positioned (everything except static) so the absolute positioned object will be positioned relative to the target element.\n\n // Position altering may be performed directly or on object load, depending on if style resolution is possible directly or not.\n var positionCheckPerformed = false;\n\n // The element may not yet be attached to the DOM, and therefore the style object may be empty in some browsers.\n // Since the style object is a reference, it will be updated as soon as the element is attached to the DOM.\n var style = window.getComputedStyle(element);\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n getState(element).startSize = {\n width: width,\n height: height\n };\n\n function mutateDom() {\n function alterPositionStyles() {\n if(style.position === \"static\") {\n element.style.setProperty(\"position\", \"relative\", options.important ? \"important\" : \"\");\n\n var removeRelativeStyles = function(reporter, element, style, property) {\n function getNumericalValue(value) {\n return value.replace(/[^-\\d\\.]/g, \"\");\n }\n\n var value = style[property];\n\n if(value !== \"auto\" && getNumericalValue(value) !== \"0\") {\n reporter.warn(\"An element that is positioned static has style.\" + property + \"=\" + value + \" which is ignored due to the static positioning. The element will need to be positioned relative, so the style.\" + property + \" will be set to 0. Element: \", element);\n element.style.setProperty(property, \"0\", options.important ? \"important\" : \"\");\n }\n };\n\n //Check so that there are no accidental styles that will make the element styled differently now that is is relative.\n //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway).\n removeRelativeStyles(reporter, element, style, \"top\");\n removeRelativeStyles(reporter, element, style, \"right\");\n removeRelativeStyles(reporter, element, style, \"bottom\");\n removeRelativeStyles(reporter, element, style, \"left\");\n }\n }\n\n function onObjectLoad() {\n // The object has been loaded, which means that the element now is guaranteed to be attached to the DOM.\n if (!positionCheckPerformed) {\n alterPositionStyles();\n }\n\n /*jshint validthis: true */\n\n function getDocument(element, callback) {\n //Opera 12 seem to call the object.onload before the actual document has been created.\n //So if it is not present, poll it with an timeout until it is present.\n //TODO: Could maybe be handled better with object.onreadystatechange or similar.\n if(!element.contentDocument) {\n var state = getState(element);\n if (state.checkForObjectDocumentTimeoutId) {\n window.clearTimeout(state.checkForObjectDocumentTimeoutId);\n }\n state.checkForObjectDocumentTimeoutId = setTimeout(function checkForObjectDocument() {\n state.checkForObjectDocumentTimeoutId = 0;\n getDocument(element, callback);\n }, 100);\n\n return;\n }\n\n callback(element.contentDocument);\n }\n\n //Mutating the object element here seems to fire another load event.\n //Mutating the inner document of the object element is fine though.\n var objectElement = this;\n\n //Create the style element to be added to the object.\n getDocument(objectElement, function onObjectDocumentReady(objectDocument) {\n //Notify that the element is ready to be listened to.\n callback(element);\n });\n }\n\n // The element may be detached from the DOM, and some browsers does not support style resolving of detached elements.\n // The alterPositionStyles needs to be delayed until we know the element has been attached to the DOM (which we are sure of when the onObjectLoad has been fired), if style resolution is not possible.\n if (style.position !== \"\") {\n alterPositionStyles(style);\n positionCheckPerformed = true;\n }\n\n //Add an object element as a child to the target element that will be listened to for resize events.\n var object = document.createElement(\"object\");\n object.style.cssText = OBJECT_STYLE;\n object.tabIndex = -1;\n object.type = \"text/html\";\n object.setAttribute(\"aria-hidden\", \"true\");\n object.onload = onObjectLoad;\n\n //Safari: This must occur before adding the object to the DOM.\n //IE: Does not like that this happens before, even if it is also added after.\n if(!browserDetector.isIE()) {\n object.data = \"about:blank\";\n }\n\n if (!getState(element)) {\n // The element has been uninstalled before the actual loading happened.\n return;\n }\n\n element.appendChild(object);\n getState(element).object = object;\n\n //IE: This must occur after adding the object to the DOM.\n if(browserDetector.isIE()) {\n object.data = \"about:blank\";\n }\n }\n\n if(batchProcessor) {\n batchProcessor.add(mutateDom);\n } else {\n mutateDom();\n }\n }\n\n if(browserDetector.isIE(8)) {\n //IE 8 does not support objects properly. Luckily they do support the resize event.\n //So do not inject the object and notify that the element is already ready to be listened to.\n //The event handler for the resize event is attached in the utils.addListener instead.\n callback(element);\n } else {\n injectObject(element, callback);\n }\n }\n\n /**\n * Returns the child object of the target element.\n * @private\n * @param {element} element The target element.\n * @returns The object element of the target.\n */\n function getObject(element) {\n return getState(element).object;\n }\n\n function uninstall(element) {\n if (!getState(element)) {\n return;\n }\n\n var object = getObject(element);\n\n if (!object) {\n return;\n }\n\n if (browserDetector.isIE(8)) {\n element.detachEvent(\"onresize\", object.proxy);\n } else {\n element.removeChild(object);\n }\n\n if (getState(element).checkForObjectDocumentTimeoutId) {\n window.clearTimeout(getState(element).checkForObjectDocumentTimeoutId);\n }\n\n delete getState(element).object;\n }\n\n return {\n makeDetectable: makeDetectable,\n addListener: addListener,\n uninstall: uninstall\n };\n};\n","/**\n * Resize detection strategy that injects divs to elements in order to detect resize events on scroll events.\n * Heavily inspired by: https://github.com/marcj/css-element-queries/blob/master/src/ResizeSensor.js\n */\n\n\"use strict\";\n\nvar forEach = require(\"../collection-utils\").forEach;\n\nmodule.exports = function(options) {\n options = options || {};\n var reporter = options.reporter;\n var batchProcessor = options.batchProcessor;\n var getState = options.stateHandler.getState;\n var hasState = options.stateHandler.hasState;\n var idHandler = options.idHandler;\n\n if (!batchProcessor) {\n throw new Error(\"Missing required dependency: batchProcessor\");\n }\n\n if (!reporter) {\n throw new Error(\"Missing required dependency: reporter.\");\n }\n\n //TODO: Could this perhaps be done at installation time?\n var scrollbarSizes = getScrollbarSizes();\n\n var styleId = \"erd_scroll_detection_scrollbar_style\";\n var detectionContainerClass = \"erd_scroll_detection_container\";\n\n function initDocument(targetDocument) {\n // Inject the scrollbar styling that prevents them from appearing sometimes in Chrome.\n // The injected container needs to have a class, so that it may be styled with CSS (pseudo elements).\n injectScrollStyle(targetDocument, styleId, detectionContainerClass);\n }\n\n initDocument(window.document);\n\n function buildCssTextString(rules) {\n var seperator = options.important ? \" !important; \" : \"; \";\n\n return (rules.join(seperator) + seperator).trim();\n }\n\n function getScrollbarSizes() {\n var width = 500;\n var height = 500;\n\n var child = document.createElement(\"div\");\n child.style.cssText = buildCssTextString([\"position: absolute\", \"width: \" + width*2 + \"px\", \"height: \" + height*2 + \"px\", \"visibility: hidden\", \"margin: 0\", \"padding: 0\"]);\n\n var container = document.createElement(\"div\");\n container.style.cssText = buildCssTextString([\"position: absolute\", \"width: \" + width + \"px\", \"height: \" + height + \"px\", \"overflow: scroll\", \"visibility: none\", \"top: \" + -width*3 + \"px\", \"left: \" + -height*3 + \"px\", \"visibility: hidden\", \"margin: 0\", \"padding: 0\"]);\n\n container.appendChild(child);\n\n document.body.insertBefore(container, document.body.firstChild);\n\n var widthSize = width - container.clientWidth;\n var heightSize = height - container.clientHeight;\n\n document.body.removeChild(container);\n\n return {\n width: widthSize,\n height: heightSize\n };\n }\n\n function injectScrollStyle(targetDocument, styleId, containerClass) {\n function injectStyle(style, method) {\n method = method || function (element) {\n targetDocument.head.appendChild(element);\n };\n\n var styleElement = targetDocument.createElement(\"style\");\n styleElement.innerHTML = style;\n styleElement.id = styleId;\n method(styleElement);\n return styleElement;\n }\n\n if (!targetDocument.getElementById(styleId)) {\n var containerAnimationClass = containerClass + \"_animation\";\n var containerAnimationActiveClass = containerClass + \"_animation_active\";\n var style = \"/* Created by the element-resize-detector library. */\\n\";\n style += \".\" + containerClass + \" > div::-webkit-scrollbar { \" + buildCssTextString([\"display: none\"]) + \" }\\n\\n\";\n style += \".\" + containerAnimationActiveClass + \" { \" + buildCssTextString([\"-webkit-animation-duration: 0.1s\", \"animation-duration: 0.1s\", \"-webkit-animation-name: \" + containerAnimationClass, \"animation-name: \" + containerAnimationClass]) + \" }\\n\";\n style += \"@-webkit-keyframes \" + containerAnimationClass + \" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\\n\";\n style += \"@keyframes \" + containerAnimationClass + \" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\";\n injectStyle(style);\n }\n }\n\n function addAnimationClass(element) {\n element.className += \" \" + detectionContainerClass + \"_animation_active\";\n }\n\n function addEvent(el, name, cb) {\n if (el.addEventListener) {\n el.addEventListener(name, cb);\n } else if(el.attachEvent) {\n el.attachEvent(\"on\" + name, cb);\n } else {\n return reporter.error(\"[scroll] Don't know how to add event listeners.\");\n }\n }\n\n function removeEvent(el, name, cb) {\n if (el.removeEventListener) {\n el.removeEventListener(name, cb);\n } else if(el.detachEvent) {\n el.detachEvent(\"on\" + name, cb);\n } else {\n return reporter.error(\"[scroll] Don't know how to remove event listeners.\");\n }\n }\n\n function getExpandElement(element) {\n return getState(element).container.childNodes[0].childNodes[0].childNodes[0];\n }\n\n function getShrinkElement(element) {\n return getState(element).container.childNodes[0].childNodes[0].childNodes[1];\n }\n\n /**\n * Adds a resize event listener to the element.\n * @public\n * @param {element} element The element that should have the listener added.\n * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback.\n */\n function addListener(element, listener) {\n var listeners = getState(element).listeners;\n\n if (!listeners.push) {\n throw new Error(\"Cannot add listener to an element that is not detectable.\");\n }\n\n getState(element).listeners.push(listener);\n }\n\n /**\n * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes.\n * @private\n * @param {object} options Optional options object.\n * @param {element} element The element to make detectable\n * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter.\n */\n function makeDetectable(options, element, callback) {\n if (!callback) {\n callback = element;\n element = options;\n options = null;\n }\n\n options = options || {};\n\n function debug() {\n if (options.debug) {\n var args = Array.prototype.slice.call(arguments);\n args.unshift(idHandler.get(element), \"Scroll: \");\n if (reporter.log.apply) {\n reporter.log.apply(null, args);\n } else {\n for (var i = 0; i < args.length; i++) {\n reporter.log(args[i]);\n }\n }\n }\n }\n\n function isDetached(element) {\n function isInDocument(element) {\n var isInShadowRoot = element.getRootNode && element.getRootNode().contains(element);\n return element === element.ownerDocument.body || element.ownerDocument.body.contains(element) || isInShadowRoot;\n }\n\n if (!isInDocument(element)) {\n return true;\n }\n\n // FireFox returns null style in hidden iframes. See https://github.com/wnr/element-resize-detector/issues/68 and https://bugzilla.mozilla.org/show_bug.cgi?id=795520\n if (window.getComputedStyle(element) === null) {\n return true;\n }\n\n return false;\n }\n\n function isUnrendered(element) {\n // Check the absolute positioned container since the top level container is display: inline.\n var container = getState(element).container.childNodes[0];\n var style = window.getComputedStyle(container);\n return !style.width || style.width.indexOf(\"px\") === -1; //Can only compute pixel value when rendered.\n }\n\n function getStyle() {\n // Some browsers only force layouts when actually reading the style properties of the style object, so make sure that they are all read here,\n // so that the user of the function can be sure that it will perform the layout here, instead of later (important for batching).\n var elementStyle = window.getComputedStyle(element);\n var style = {};\n style.position = elementStyle.position;\n style.width = element.offsetWidth;\n style.height = element.offsetHeight;\n style.top = elementStyle.top;\n style.right = elementStyle.right;\n style.bottom = elementStyle.bottom;\n style.left = elementStyle.left;\n style.widthCSS = elementStyle.width;\n style.heightCSS = elementStyle.height;\n return style;\n }\n\n function storeStartSize() {\n var style = getStyle();\n getState(element).startSize = {\n width: style.width,\n height: style.height\n };\n debug(\"Element start size\", getState(element).startSize);\n }\n\n function initListeners() {\n getState(element).listeners = [];\n }\n\n function storeStyle() {\n debug(\"storeStyle invoked.\");\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n\n var style = getStyle();\n getState(element).style = style;\n }\n\n function storeCurrentSize(element, width, height) {\n getState(element).lastWidth = width;\n getState(element).lastHeight = height;\n }\n\n function getExpandChildElement(element) {\n return getExpandElement(element).childNodes[0];\n }\n\n function getWidthOffset() {\n return 2 * scrollbarSizes.width + 1;\n }\n\n function getHeightOffset() {\n return 2 * scrollbarSizes.height + 1;\n }\n\n function getExpandWidth(width) {\n return width + 10 + getWidthOffset();\n }\n\n function getExpandHeight(height) {\n return height + 10 + getHeightOffset();\n }\n\n function getShrinkWidth(width) {\n return width * 2 + getWidthOffset();\n }\n\n function getShrinkHeight(height) {\n return height * 2 + getHeightOffset();\n }\n\n function positionScrollbars(element, width, height) {\n var expand = getExpandElement(element);\n var shrink = getShrinkElement(element);\n var expandWidth = getExpandWidth(width);\n var expandHeight = getExpandHeight(height);\n var shrinkWidth = getShrinkWidth(width);\n var shrinkHeight = getShrinkHeight(height);\n expand.scrollLeft = expandWidth;\n expand.scrollTop = expandHeight;\n shrink.scrollLeft = shrinkWidth;\n shrink.scrollTop = shrinkHeight;\n }\n\n function injectContainerElement() {\n var container = getState(element).container;\n\n if (!container) {\n container = document.createElement(\"div\");\n container.className = detectionContainerClass;\n container.style.cssText = buildCssTextString([\"visibility: hidden\", \"display: inline\", \"width: 0px\", \"height: 0px\", \"z-index: -1\", \"overflow: hidden\", \"margin: 0\", \"padding: 0\"]);\n getState(element).container = container;\n addAnimationClass(container);\n element.appendChild(container);\n\n var onAnimationStart = function () {\n getState(element).onRendered && getState(element).onRendered();\n };\n\n addEvent(container, \"animationstart\", onAnimationStart);\n\n // Store the event handler here so that they may be removed when uninstall is called.\n // See uninstall function for an explanation why it is needed.\n getState(element).onAnimationStart = onAnimationStart;\n }\n\n return container;\n }\n\n function injectScrollElements() {\n function alterPositionStyles() {\n var style = getState(element).style;\n\n if(style.position === \"static\") {\n element.style.setProperty(\"position\", \"relative\",options.important ? \"important\" : \"\");\n\n var removeRelativeStyles = function(reporter, element, style, property) {\n function getNumericalValue(value) {\n return value.replace(/[^-\\d\\.]/g, \"\");\n }\n\n var value = style[property];\n\n if(value !== \"auto\" && getNumericalValue(value) !== \"0\") {\n reporter.warn(\"An element that is positioned static has style.\" + property + \"=\" + value + \" which is ignored due to the static positioning. The element will need to be positioned relative, so the style.\" + property + \" will be set to 0. Element: \", element);\n element.style[property] = 0;\n }\n };\n\n //Check so that there are no accidental styles that will make the element styled differently now that is is relative.\n //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway).\n removeRelativeStyles(reporter, element, style, \"top\");\n removeRelativeStyles(reporter, element, style, \"right\");\n removeRelativeStyles(reporter, element, style, \"bottom\");\n removeRelativeStyles(reporter, element, style, \"left\");\n }\n }\n\n function getLeftTopBottomRightCssText(left, top, bottom, right) {\n left = (!left ? \"0\" : (left + \"px\"));\n top = (!top ? \"0\" : (top + \"px\"));\n bottom = (!bottom ? \"0\" : (bottom + \"px\"));\n right = (!right ? \"0\" : (right + \"px\"));\n\n return [\"left: \" + left, \"top: \" + top, \"right: \" + right, \"bottom: \" + bottom];\n }\n\n debug(\"Injecting elements\");\n\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n\n alterPositionStyles();\n\n var rootContainer = getState(element).container;\n\n if (!rootContainer) {\n rootContainer = injectContainerElement();\n }\n\n // Due to this WebKit bug https://bugs.webkit.org/show_bug.cgi?id=80808 (currently fixed in Blink, but still present in WebKit browsers such as Safari),\n // we need to inject two containers, one that is width/height 100% and another that is left/top -1px so that the final container always is 1x1 pixels bigger than\n // the targeted element.\n // When the bug is resolved, \"containerContainer\" may be removed.\n\n // The outer container can occasionally be less wide than the targeted when inside inline elements element in WebKit (see https://bugs.webkit.org/show_bug.cgi?id=152980).\n // This should be no problem since the inner container either way makes sure the injected scroll elements are at least 1x1 px.\n\n var scrollbarWidth = scrollbarSizes.width;\n var scrollbarHeight = scrollbarSizes.height;\n var containerContainerStyle = buildCssTextString([\"position: absolute\", \"flex: none\", \"overflow: hidden\", \"z-index: -1\", \"visibility: hidden\", \"width: 100%\", \"height: 100%\", \"left: 0px\", \"top: 0px\"]);\n var containerStyle = buildCssTextString([\"position: absolute\", \"flex: none\", \"overflow: hidden\", \"z-index: -1\", \"visibility: hidden\"].concat(getLeftTopBottomRightCssText(-(1 + scrollbarWidth), -(1 + scrollbarHeight), -scrollbarHeight, -scrollbarWidth)));\n var expandStyle = buildCssTextString([\"position: absolute\", \"flex: none\", \"overflow: scroll\", \"z-index: -1\", \"visibility: hidden\", \"width: 100%\", \"height: 100%\"]);\n var shrinkStyle = buildCssTextString([\"position: absolute\", \"flex: none\", \"overflow: scroll\", \"z-index: -1\", \"visibility: hidden\", \"width: 100%\", \"height: 100%\"]);\n var expandChildStyle = buildCssTextString([\"position: absolute\", \"left: 0\", \"top: 0\"]);\n var shrinkChildStyle = buildCssTextString([\"position: absolute\", \"width: 200%\", \"height: 200%\"]);\n\n var containerContainer = document.createElement(\"div\");\n var container = document.createElement(\"div\");\n var expand = document.createElement(\"div\");\n var expandChild = document.createElement(\"div\");\n var shrink = document.createElement(\"div\");\n var shrinkChild = document.createElement(\"div\");\n\n // Some browsers choke on the resize system being rtl, so force it to ltr. https://github.com/wnr/element-resize-detector/issues/56\n // However, dir should not be set on the top level container as it alters the dimensions of the target element in some browsers.\n containerContainer.dir = \"ltr\";\n\n containerContainer.style.cssText = containerContainerStyle;\n containerContainer.className = detectionContainerClass;\n container.className = detectionContainerClass;\n container.style.cssText = containerStyle;\n expand.style.cssText = expandStyle;\n expandChild.style.cssText = expandChildStyle;\n shrink.style.cssText = shrinkStyle;\n shrinkChild.style.cssText = shrinkChildStyle;\n\n expand.appendChild(expandChild);\n shrink.appendChild(shrinkChild);\n container.appendChild(expand);\n container.appendChild(shrink);\n containerContainer.appendChild(container);\n rootContainer.appendChild(containerContainer);\n\n function onExpandScroll() {\n var state = getState(element);\n if (state && state.onExpand) {\n state.onExpand();\n } else {\n debug(\"Aborting expand scroll handler: element has been uninstalled\");\n }\n }\n\n function onShrinkScroll() {\n var state = getState(element);\n if (state && state.onShrink) {\n state.onShrink();\n } else {\n debug(\"Aborting shrink scroll handler: element has been uninstalled\");\n }\n }\n\n addEvent(expand, \"scroll\", onExpandScroll);\n addEvent(shrink, \"scroll\", onShrinkScroll);\n\n // Store the event handlers here so that they may be removed when uninstall is called.\n // See uninstall function for an explanation why it is needed.\n getState(element).onExpandScroll = onExpandScroll;\n getState(element).onShrinkScroll = onShrinkScroll;\n }\n\n function registerListenersAndPositionElements() {\n function updateChildSizes(element, width, height) {\n var expandChild = getExpandChildElement(element);\n var expandWidth = getExpandWidth(width);\n var expandHeight = getExpandHeight(height);\n expandChild.style.setProperty(\"width\", expandWidth + \"px\", options.important ? \"important\" : \"\");\n expandChild.style.setProperty(\"height\", expandHeight + \"px\", options.important ? \"important\" : \"\");\n }\n\n function updateDetectorElements(done) {\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n // Check whether the size has actually changed since last time the algorithm ran. If not, some steps may be skipped.\n var sizeChanged = width !== getState(element).lastWidth || height !== getState(element).lastHeight;\n\n debug(\"Storing current size\", width, height);\n\n // Store the size of the element sync here, so that multiple scroll events may be ignored in the event listeners.\n // Otherwise the if-check in handleScroll is useless.\n storeCurrentSize(element, width, height);\n\n // Since we delay the processing of the batch, there is a risk that uninstall has been called before the batch gets to execute.\n // Since there is no way to cancel the fn executions, we need to add an uninstall guard to all fns of the batch.\n\n batchProcessor.add(0, function performUpdateChildSizes() {\n if (!sizeChanged) {\n return;\n }\n\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n\n if (!areElementsInjected()) {\n debug(\"Aborting because element container has not been initialized\");\n return;\n }\n\n if (options.debug) {\n var w = element.offsetWidth;\n var h = element.offsetHeight;\n\n if (w !== width || h !== height) {\n reporter.warn(idHandler.get(element), \"Scroll: Size changed before updating detector elements.\");\n }\n }\n\n updateChildSizes(element, width, height);\n });\n\n batchProcessor.add(1, function updateScrollbars() {\n // This function needs to be invoked event though the size is unchanged. The element could have been resized very quickly and then\n // been restored to the original size, which will have changed the scrollbar positions.\n\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n\n if (!areElementsInjected()) {\n debug(\"Aborting because element container has not been initialized\");\n return;\n }\n\n positionScrollbars(element, width, height);\n });\n\n if (sizeChanged && done) {\n batchProcessor.add(2, function () {\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n\n if (!areElementsInjected()) {\n debug(\"Aborting because element container has not been initialized\");\n return;\n }\n\n done();\n });\n }\n }\n\n function areElementsInjected() {\n return !!getState(element).container;\n }\n\n function notifyListenersIfNeeded() {\n function isFirstNotify() {\n return getState(element).lastNotifiedWidth === undefined;\n }\n\n debug(\"notifyListenersIfNeeded invoked\");\n\n var state = getState(element);\n\n // Don't notify if the current size is the start size, and this is the first notification.\n if (isFirstNotify() && state.lastWidth === state.startSize.width && state.lastHeight === state.startSize.height) {\n return debug(\"Not notifying: Size is the same as the start size, and there has been no notification yet.\");\n }\n\n // Don't notify if the size already has been notified.\n if (state.lastWidth === state.lastNotifiedWidth && state.lastHeight === state.lastNotifiedHeight) {\n return debug(\"Not notifying: Size already notified\");\n }\n\n\n debug(\"Current size not notified, notifying...\");\n state.lastNotifiedWidth = state.lastWidth;\n state.lastNotifiedHeight = state.lastHeight;\n forEach(getState(element).listeners, function (listener) {\n listener(element);\n });\n }\n\n function handleRender() {\n debug(\"startanimation triggered.\");\n\n if (isUnrendered(element)) {\n debug(\"Ignoring since element is still unrendered...\");\n return;\n }\n\n debug(\"Element rendered.\");\n var expand = getExpandElement(element);\n var shrink = getShrinkElement(element);\n if (expand.scrollLeft === 0 || expand.scrollTop === 0 || shrink.scrollLeft === 0 || shrink.scrollTop === 0) {\n debug(\"Scrollbars out of sync. Updating detector elements...\");\n updateDetectorElements(notifyListenersIfNeeded);\n }\n }\n\n function handleScroll() {\n debug(\"Scroll detected.\");\n\n if (isUnrendered(element)) {\n // Element is still unrendered. Skip this scroll event.\n debug(\"Scroll event fired while unrendered. Ignoring...\");\n return;\n }\n\n updateDetectorElements(notifyListenersIfNeeded);\n }\n\n debug(\"registerListenersAndPositionElements invoked.\");\n\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n\n getState(element).onRendered = handleRender;\n getState(element).onExpand = handleScroll;\n getState(element).onShrink = handleScroll;\n\n var style = getState(element).style;\n updateChildSizes(element, style.width, style.height);\n }\n\n function finalizeDomMutation() {\n debug(\"finalizeDomMutation invoked.\");\n\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n\n var style = getState(element).style;\n storeCurrentSize(element, style.width, style.height);\n positionScrollbars(element, style.width, style.height);\n }\n\n function ready() {\n callback(element);\n }\n\n function install() {\n debug(\"Installing...\");\n initListeners();\n storeStartSize();\n\n batchProcessor.add(0, storeStyle);\n batchProcessor.add(1, injectScrollElements);\n batchProcessor.add(2, registerListenersAndPositionElements);\n batchProcessor.add(3, finalizeDomMutation);\n batchProcessor.add(4, ready);\n }\n\n debug(\"Making detectable...\");\n\n if (isDetached(element)) {\n debug(\"Element is detached\");\n\n injectContainerElement();\n\n debug(\"Waiting until element is attached...\");\n\n getState(element).onRendered = function () {\n debug(\"Element is now attached\");\n install();\n };\n } else {\n install();\n }\n }\n\n function uninstall(element) {\n var state = getState(element);\n\n if (!state) {\n // Uninstall has been called on a non-erd element.\n return;\n }\n\n // Uninstall may have been called in the following scenarios:\n // (1) Right between the sync code and async batch (here state.busy = true, but nothing have been registered or injected).\n // (2) In the ready callback of the last level of the batch by another element (here, state.busy = true, but all the stuff has been injected).\n // (3) After the installation process (here, state.busy = false and all the stuff has been injected).\n // So to be on the safe side, let's check for each thing before removing.\n\n // We need to remove the event listeners, because otherwise the event might fire on an uninstall element which results in an error when trying to get the state of the element.\n state.onExpandScroll && removeEvent(getExpandElement(element), \"scroll\", state.onExpandScroll);\n state.onShrinkScroll && removeEvent(getShrinkElement(element), \"scroll\", state.onShrinkScroll);\n state.onAnimationStart && removeEvent(state.container, \"animationstart\", state.onAnimationStart);\n\n state.container && element.removeChild(state.container);\n }\n\n return {\n makeDetectable: makeDetectable,\n addListener: addListener,\n uninstall: uninstall,\n initDocument: initDocument\n };\n};\n","\"use strict\"\n\nimport { Emitter } from \"atom\"\nimport { escapeRegExp } from \"./deps/underscore-plus\"\nimport path from \"path\"\nimport Decoration from \"./decoration\"\n\n/**\n * The mixin that provides the decorations API to the minimap editor view.\n *\n * This mixin is injected into the `Minimap` prototype, so every methods defined in this file will be available on any\n * `Minimap` instance.\n */\nexport default class DecorationManagement {\n /** Initializes the decorations related properties. */\n initializeDecorations(minimap) {\n this.minimap = minimap\n\n if (this.emitter == null) {\n /**\n * The minimap emitter, lazily created if not created yet.\n *\n * @type {Emitter}\n * @access private\n */\n this.emitter = new Emitter()\n } else {\n this.emitter = this.minimap.emitter\n }\n\n /**\n * A map with the decoration id as key and the decoration as value.\n *\n * @type {Object}\n * @access private\n */\n this.decorationsById = new Map()\n /**\n * The decorations stored in an array indexed with their marker id.\n *\n * @type {Object}\n * @access private\n */\n this.decorationsByMarkerId = new Map()\n /**\n * The subscriptions to the markers `did-change` event indexed using the marker id.\n *\n * @type {Object}\n * @access private\n */\n this.decorationMarkerChangedSubscriptions = new Map()\n /**\n * The subscriptions to the markers `did-destroy` event indexed using the marker id.\n *\n * @type {Object}\n * @access private\n */\n this.decorationMarkerDestroyedSubscriptions = new Map()\n /**\n * The subscriptions to the decorations `did-change-properties` event indexed using the decoration id.\n *\n * @type {Object}\n * @access private\n */\n this.decorationUpdatedSubscriptions = new Map()\n /**\n * The subscriptions to the decorations `did-destroy` event indexed using the decoration id.\n *\n * @type {Object}\n * @access private\n */\n this.decorationDestroyedSubscriptions = new Map()\n\n // is set to true when a minimapElement is destroyed\n this.destroyed = false\n }\n\n /**\n * Returns all the decorations registered in the current `Minimap`.\n *\n * @returns {Decoration[]} All the decorations in this `Minimap`\n */\n getDecorations() {\n return [...this.decorationsById.values()]\n }\n\n /**\n * Registers an event listener to the `did-add-decoration` event.\n *\n * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be\n * called with an event object with the following properties:\n *\n * - Marker: the marker object that was decorated\n * - Decoration: the decoration object that was created\n *\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidAddDecoration(callback) {\n return this.emitter.on(\"did-add-decoration\", callback)\n }\n\n /**\n * Registers an event listener to the `did-remove-decoration` event.\n *\n * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be\n * called with an event object with the following properties:\n *\n * - Marker: the marker object that was decorated\n * - Decoration: the decoration object that was created\n *\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidRemoveDecoration(callback) {\n return this.emitter.on(\"did-remove-decoration\", callback)\n }\n\n /**\n * Registers an event listener to the `did-change-decoration` event.\n *\n * This event is triggered when the marker targeted by the decoration was changed.\n *\n * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be\n * called with an event object with the following properties:\n *\n * - Marker: the marker object that was decorated\n * - Decoration: the decoration object that was created\n *\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChangeDecoration(callback) {\n return this.emitter.on(\"did-change-decoration\", callback)\n }\n\n /**\n * Registers an event listener to the `did-change-decoration-range` event.\n *\n * This event is triggered when the marker range targeted by the decoration was changed.\n *\n * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be\n * called with an event object with the following properties:\n *\n * - Marker: the marker object that was decorated\n * - Decoration: the decoration object that was created\n *\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChangeDecorationRange(callback) {\n return this.emitter.on(\"did-change-decoration-range\", callback)\n }\n\n /**\n * Registers an event listener to the `did-update-decoration` event.\n *\n * This event is triggered when the decoration itself is modified.\n *\n * @param {function(decoration:Decoration):void} callback A function to call when the event is triggered\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidUpdateDecoration(callback) {\n return this.emitter.on(\"did-update-decoration\", callback)\n }\n\n /**\n * Returns the decoration with the passed-in id.\n *\n * @param {number} id The decoration id\n * @returns {Decoration} The decoration with the given id\n */\n decorationForId(id) {\n return this.decorationsById.get(id)\n }\n\n /**\n * Returns all the decorations that intersect the passed-in row range.\n *\n * @param {number} startScreenRow The first row of the range\n * @param {number} endScreenRow The last row of the range\n * @returns {Record} The decorations that intersect the passed-in range\n */\n decorationsForScreenRowRange(startScreenRow, endScreenRow) {\n const decorationsByMarkerId = {}\n const markers = this.findMarkers({\n intersectsScreenRowRange: [startScreenRow, endScreenRow],\n })\n\n for (let i = 0, len = markers.length; i < len; i++) {\n const marker = markers[i]\n const decorations = this.decorationsByMarkerId.get(marker.id)\n\n if (decorations !== undefined) {\n decorationsByMarkerId[marker.id] = decorations\n }\n }\n\n return decorationsByMarkerId\n }\n\n /**\n * Returns the decorations that intersects the passed-in row range in a structured way.\n *\n * At the first level, the keys are the available decoration types. At the second level, the keys are the row index\n * for which there are decorations available. The value is an array containing the decorations that intersects with\n * the corresponding row.\n *\n * @property {Object} line All the line decorations by row\n * @property {Decoration[]} line[row] All the line decorations at a given row\n * @property {Object} highlight-under All the highlight-under decorations by row\n * @property {Decoration[]} highlight-under[row] All the highlight-under decorations at a given row\n * @property {Object} highlight-over All the highlight-over decorations by row\n * @property {Decoration[]} highlight-over[row] All the highlight-over decorations at a given row\n * @property {Object} highlight-outine All the highlight-outine decorations by row\n * @property {Decoration[]} highlight-outine[row] All the highlight-outine decorations at a given row\n * @returns {Object} The decorations grouped by type and then rows\n */\n decorationsByTypeThenRows() {\n if (this.decorationsByTypeThenRowsCache != null) {\n return this.decorationsByTypeThenRowsCache\n }\n\n const cache = {}\n\n const decorations = this.decorationsById.values()\n for (const decoration of decorations) {\n const range = decoration.marker.getScreenRange()\n const type = decoration.getProperties().type\n\n if (cache[type] == null) {\n cache[type] = {}\n }\n\n for (let row = range.start.row, len = range.end.row; row <= len; row++) {\n if (cache[type][row] == null) {\n cache[type][row] = []\n }\n\n cache[type][row].push(decoration)\n }\n }\n\n /**\n * The grouped decorations cache.\n *\n * @type {Object}\n * @access private\n */\n this.decorationsByTypeThenRowsCache = cache\n return cache\n }\n\n /** Invalidates the decoration by screen rows cache. */\n invalidateDecorationForScreenRowsCache() {\n this.decorationsByTypeThenRowsCache = null\n }\n\n /**\n * Adds a decoration that tracks a `Marker`. When the marker moves, is invalidated, or is destroyed, the decoration\n * will be updated to reflect the marker's state.\n *\n * @fires {did-add-decoration} when The decoration is created successfully\n * @fires {did-change} when The decoration is created successfully\n * @param {Marker} marker The marker you want this decoration to follow\n * @param {Object} decorationParams The decoration properties\n * @param {string} decorationParams.type The decoration type in the following list:\n *\n * - **line**: Fills the line background with the decoration color.\n * - **highlight**: Renders a colored rectangle on the minimap. The highlight is rendered above the line's text.\n * - **highlight-over**: Same as **highlight**.\n * - **highlight-under**: Renders a colored rectangle on the minimap. The highlight is rendered below the line's text.\n * - **highlight-outline**: Renders a colored outline on the minimap. The highlight box is rendered above the line's text.\n * - **foreground-custom**: A decoration type for which you have the control over the render routine. Note that your\n * routine should implement a render on a per-line basis to avoid any side-effect with the offset bitmap cache\n * mechanism. These decorations are rendred on the foreground decorations layer.\n * - **background-custom**: A decoration type for which you have the control over the render routine. Note that your\n * routine should implement a render on a per-line basis to avoid any side-effect with the offset bitmap cache\n * mechanism. These decorations are rendred on the background decorations layer.\n *\n * @param {string} [decorationParams.class] The CSS class to use to retrieve the background color of the decoration by\n * building a scop corresponding to `.minimap .editor `\n * @param {string} [decorationParams.scope] The scope to use to retrieve the decoration background. Note that if the\n * `scope` property is set, the `class` won't be used.\n * @param {string} [decorationParams.color] The CSS color to use to render the decoration. When set, neither `scope`\n * nor `class` are used.\n * @param {string} [decorationParams.plugin] The name of the plugin that created this decoration. It'll be used to\n * order the decorations on the same layer and that are overlapping. If the parameter is omitted the Minimap will\n * attempt to infer the plugin origin from the path of the caller function.\n * @param {function} [decorationParams.render] The render routine for custom decorations. The function receives the\n * decoration and the render data for the current render pass.\n * @returns {Decoration} The created decoration\n */\n decorateMarker(marker, decorationParams) {\n if (this.destroyed || this.minimap.destroyed || marker == null) {\n return\n }\n\n const { id } = marker\n\n if (decorationParams.type === \"highlight\") {\n decorationParams.type = \"highlight-over\"\n }\n\n const { type, plugin } = decorationParams\n\n if (plugin == null) {\n decorationParams.plugin = getOriginatorPackageName()\n }\n\n if (decorationParams.scope == null && decorationParams.class != null) {\n const cls = decorationParams.class.split(\" \").join(\".\")\n decorationParams.scope = `.minimap .${cls}`\n }\n\n if (!this.decorationMarkerDestroyedSubscriptions.has(id)) {\n this.decorationMarkerDestroyedSubscriptions.set(\n id,\n marker.onDidDestroy(() => {\n this.removeAllDecorationsForMarker(marker)\n })\n )\n }\n\n if (!this.decorationMarkerChangedSubscriptions.has(id)) {\n this.decorationMarkerChangedSubscriptions.set(\n id,\n marker.onDidChange((event) => {\n const decorations = this.decorationsByMarkerId.get(id)\n const screenRange = marker.getScreenRange()\n\n this.invalidateDecorationForScreenRowsCache()\n\n if (decorations !== undefined) {\n for (let i = 0, len = decorations.length; i < len; i++) {\n const decoration = decorations[i]\n this.emitter.emit(\"did-change-decoration\", {\n marker,\n decoration,\n event,\n })\n this.emitDecorationChanges(decoration.type, decoration)\n\n decoration.screenRange = screenRange\n }\n }\n let oldStart = event.oldTailScreenPosition\n let oldEnd = event.oldHeadScreenPosition\n let newStart = event.newTailScreenPosition\n let newEnd = event.newHeadScreenPosition\n\n if (oldStart.row > oldEnd.row) {\n ;[oldStart, oldEnd] = [oldEnd, oldStart]\n }\n if (newStart.row > newEnd.row) {\n ;[newStart, newEnd] = [newEnd, newStart]\n }\n\n const rangesDiffs = computeRangesDiffs(oldStart, oldEnd, newStart, newEnd)\n\n for (let i = 0, len = rangesDiffs.length; i < len; i++) {\n const [start, end] = rangesDiffs[i]\n this.emitRangeChanges(\n type,\n {\n start,\n end,\n },\n 0\n )\n }\n })\n )\n }\n\n const decoration = new Decoration(marker, this, decorationParams)\n\n if (!this.decorationsByMarkerId.has(id)) {\n this.decorationsByMarkerId.set(id, [])\n }\n\n this.decorationsByMarkerId.get(id).push(decoration)\n this.decorationsById.set(decoration.id, decoration)\n\n if (!this.decorationUpdatedSubscriptions.has(decoration.id)) {\n this.decorationUpdatedSubscriptions.set(\n decoration.id,\n decoration.onDidChangeProperties((event) => {\n this.emitDecorationChanges(type, decoration)\n })\n )\n }\n\n this.decorationDestroyedSubscriptions.set(\n decoration.id,\n decoration.onDidDestroy(() => {\n this.removeDecoration(decoration)\n })\n )\n\n this.emitDecorationChanges(type, decoration)\n this.emitter.emit(\"did-add-decoration\", {\n marker,\n decoration,\n })\n\n return decoration\n }\n\n /**\n * Emits a change in the `Minimap` corresponding to the passed-in decoration.\n *\n * @param {string} type The type of decoration that changed\n * @param {Decoration} decoration The decoration for which emitting an event\n * @access private\n */\n emitDecorationChanges(type, decoration) {\n if (this.destroyed || this.minimap.editorDestroyed()) {\n return\n }\n\n this.invalidateDecorationForScreenRowsCache()\n\n const range = decoration.screenRange\n if (!range.start || !range.end) {\n return\n }\n\n this.emitRangeChanges(type, range, 0)\n }\n\n /**\n * Emits a change for the specified range.\n *\n * @param {string} type The type of decoration that changed\n * @param {Object} range The range where changes occured\n * @param {number} [screenDelta] An optional screen delta for the change object\n * @access private\n */\n emitRangeChanges(type, range, screenDelta) {\n const startScreenRow = range.start.row\n const endScreenRow = range.end.row\n const lastRenderedScreenRow = this.minimap.getLastVisibleScreenRow()\n const firstRenderedScreenRow = this.minimap.getFirstVisibleScreenRow()\n\n if (screenDelta == null) {\n screenDelta = lastRenderedScreenRow - firstRenderedScreenRow - (endScreenRow - startScreenRow)\n }\n\n const changeEvent = {\n start: startScreenRow,\n end: endScreenRow,\n screenDelta,\n type,\n }\n\n this.emitter.emit(\"did-change-decoration-range\", changeEvent)\n }\n\n /**\n * Removes a `Decoration` from this minimap.\n *\n * @fires {did-change} when The decoration is removed\n * @fires {did-remove-decoration} when The decoration is removed\n * @param {Decoration} decoration The decoration to remove\n */\n removeDecoration(decoration) {\n if (decoration == null) {\n return\n }\n\n const marker = decoration.marker\n let subscription\n\n this.decorationsById.delete(decoration.id)\n\n subscription = this.decorationUpdatedSubscriptions.get(decoration.id)\n if (subscription !== undefined) {\n subscription.dispose()\n }\n\n subscription = this.decorationDestroyedSubscriptions.get(decoration.id)\n if (subscription !== undefined) {\n subscription.dispose()\n }\n\n this.decorationUpdatedSubscriptions.delete(decoration.id)\n this.decorationDestroyedSubscriptions.delete(decoration.id)\n\n const decorations = this.decorationsByMarkerId.get(marker.id)\n if (decorations === undefined) {\n return\n }\n\n this.emitDecorationChanges(decoration.getProperties().type, decoration)\n\n const index = decorations.indexOf(decoration)\n if (index > -1) {\n decorations.splice(index, 1)\n\n this.emitter.emit(\"did-remove-decoration\", {\n marker,\n decoration,\n })\n\n if (decorations.length === 0) {\n this.removedAllMarkerDecorations(marker)\n }\n }\n }\n\n /**\n * Removes all the decorations registered for the passed-in marker.\n *\n * @fires {did-change} when A decoration have been removed\n * @fires {did-remove-decoration} when A decoration have been removed\n * @param {Marker} marker The marker for which removing its decorations\n */\n removeAllDecorationsForMarker(marker) {\n if (marker == null) {\n return\n }\n\n const decorations = this.decorationsByMarkerId.get(marker.id)\n if (decorations === undefined) {\n return\n }\n\n for (let i = 0, len = decorations.length; i < len; i++) {\n const decoration = decorations[i]\n\n if (!this.destroyed && !this.minimap.editorDestroyed()) {\n this.emitDecorationChanges(decoration.getProperties().type, decoration)\n }\n this.emitter.emit(\"did-remove-decoration\", {\n marker,\n decoration,\n })\n }\n\n this.removedAllMarkerDecorations(marker)\n }\n\n /**\n * Performs the removal of a decoration for a given marker.\n *\n * @param {Marker} marker The marker for which removing decorations\n * @access private\n */\n removedAllMarkerDecorations(marker) {\n if (marker == null) {\n return\n }\n\n this.decorationMarkerChangedSubscriptions.get(marker.id).dispose()\n this.decorationMarkerDestroyedSubscriptions.get(marker.id).dispose()\n\n this.decorationsByMarkerId.delete(marker.id)\n this.decorationMarkerChangedSubscriptions.delete(marker.id)\n this.decorationMarkerDestroyedSubscriptions.delete(marker.id)\n }\n\n /** Removes all the decorations that was created in the current `Minimap`. */\n removeAllDecorations() {\n const decorationMarkerChangedSubscriptionsValues = this.decorationMarkerChangedSubscriptions.values()\n for (const decoration of decorationMarkerChangedSubscriptionsValues) {\n decoration.dispose()\n }\n\n const decorationMarkerDestroyedSubscriptionsValues = this.decorationMarkerDestroyedSubscriptions.values()\n for (const decoration of decorationMarkerDestroyedSubscriptionsValues) {\n decoration.dispose()\n }\n\n const decorationUpdatedSubscriptionsValues = this.decorationUpdatedSubscriptions.values()\n for (const decoration of decorationUpdatedSubscriptionsValues) {\n decoration.dispose()\n }\n\n const decorationDestroyedSubscriptionsValues = this.decorationDestroyedSubscriptions.values()\n for (const decoration of decorationDestroyedSubscriptionsValues) {\n decoration.dispose()\n }\n\n const decorationsByIdValues = this.decorationsById.values()\n for (const decoration of decorationsByIdValues) {\n decoration.destroy()\n }\n\n this.decorationsById.clear()\n this.decorationsByMarkerId.clear()\n this.decorationMarkerChangedSubscriptions.clear()\n this.decorationMarkerDestroyedSubscriptions.clear()\n this.decorationUpdatedSubscriptions.clear()\n this.decorationDestroyedSubscriptions.clear()\n }\n\n destroy() {\n this.removeAllDecorations()\n this.minimap = undefined\n this.emitter = undefined\n this.destroyed = true\n }\n}\n\nfunction getOriginatorPackageName() {\n const line = new Error().stack.split(\"\\n\")[3]\n const filePath = line.split(\"(\")[1].replace(\")\", \"\")\n const re = new RegExp(atom.packages.getPackageDirPaths().join(\"|\") + escapeRegExp(path.sep))\n const plugin = filePath\n .replace(re, \"\")\n .split(path.sep)[0]\n .replace(/minimap-|-minimap/, \"\")\n return plugin.indexOf(path.sep) < 0 ? plugin : undefined\n}\n\n/**\n * Given two ranges, it returns an array of ranges representing the differences between them.\n *\n * @param {number} oldStart The row index of the first range start\n * @param {number} oldEnd The row index of the first range end\n * @param {number} newStart The row index of the second range start\n * @param {number} newEnd The row index of the second range end\n * @returns {Object[]} The array of diff ranges\n * @access private\n */\nfunction computeRangesDiffs(oldStart, oldEnd, newStart, newEnd) {\n const diffs = []\n\n if (oldStart.isLessThan(newStart)) {\n diffs.push([oldStart, newStart])\n } else if (newStart.isLessThan(oldStart)) {\n diffs.push([newStart, oldStart])\n }\n\n if (oldEnd.isLessThan(newEnd)) {\n diffs.push([oldEnd, newEnd])\n } else if (newEnd.isLessThan(oldEnd)) {\n diffs.push([newEnd, oldEnd])\n }\n\n return diffs\n}\n","\"use strict\"\n\nimport { Emitter } from \"atom\"\n\nlet idCounter = 0\nconst nextId = function () {\n return idCounter++\n}\n\n/**\n * The `Decoration` class represents a decoration in the Minimap.\n *\n * It has the same API than the `Decoration` class of a text editor.\n */\nexport default class Decoration {\n /**\n * Returns `true` if the passed-in decoration properties matches the specified type.\n *\n * @param {Object} decorationProperties The decoration properties to match\n * @param {string} type The decoration type to match\n * @returns {boolean} Whether the decoration properties match the type\n */\n static isType(decorationProperties, type) {\n if (Array.isArray(decorationProperties.type)) {\n if (decorationProperties.type.indexOf(type) >= 0) {\n return true\n }\n return false\n } else {\n return type === decorationProperties.type\n }\n }\n\n /**\n * Creates a new decoration.\n *\n * @param {Marker} marker The target marker for the decoration\n * @param {Minimap} minimap The Minimap where the decoration will be displayed\n * @param {Object} properties The decoration's properties\n */\n constructor(marker, minimap, properties) {\n /** @access private */\n this.marker = marker\n /** @access private */\n this.minimap = minimap\n /** @access private */\n this.emitter = new Emitter()\n /** @access private */\n this.id = nextId()\n /** @access private */\n this.properties = null\n this.setProperties(properties)\n this.properties.id = this.id\n /** @access private */\n this.destroyed = false\n /** @access private */\n this.markerDestroyDisposable = this.marker.onDidDestroy(() => {\n this.destroy()\n })\n\n this.screenRange = marker.getScreenRange()\n }\n\n /**\n * Destroy this marker.\n *\n * If you own the marker, you should use `Marker#destroy` which will destroy this decoration.\n */\n destroy() {\n if (this.destroyed) {\n return\n }\n\n this.markerDestroyDisposable?.dispose?.()\n this.destroyed = true\n this.emitter.emit(\"did-destroy\")\n this.emitter.dispose()\n }\n\n /**\n * Returns whether this decoration is destroyed or not.\n *\n * @returns {boolean} Whether this decoration is destroyed or not\n */\n isDestroyed() {\n return this.destroyed\n }\n\n /**\n * Registers an event listener to the `did-change-properties` event.\n *\n * This event is triggered when the decoration update method is called.\n *\n * @param {function(change:Object):void} callback A function to call when the event is triggered\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChangeProperties(callback) {\n if (this.destroyed) {\n return\n }\n return this.emitter.on(\"did-change-properties\", callback)\n }\n\n /**\n * Registers an event listener to the `did-destroy` event.\n *\n * @param {function():void} callback A function to call when the event is triggered\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidDestroy(callback) {\n if (this.destroyed) {\n return\n }\n return this.emitter.on(\"did-destroy\", callback)\n }\n\n /**\n * An id unique across all Decoration objects.\n *\n * @returns {number} The decoration id\n */\n getId() {\n return this.id\n }\n\n /**\n * Returns the marker associated with this Decoration.\n *\n * @returns {Marker} The decoration's marker\n */\n getMarker() {\n return this.marker\n }\n\n /**\n * Check if this decoration is of type `type`.\n *\n * @param {string | Array} type A type like `'line-number'`, `'line'`, etc. `type` can also be an Array of Strings,\n * where it will return true if the decoration's type matches any in the array.\n * @returns {boolean} Whether this decoration match the passed-in type\n */\n isType(type) {\n return Decoration.isType(this.properties, type)\n }\n\n /**\n * Returns the Decoration's properties.\n *\n * @returns {Object} The decoration's properties\n */\n getProperties() {\n return this.properties\n }\n\n /**\n * Update the marker with new properties. Allows you to change the decoration's class.\n *\n * @param {Object} newProperties The new properties for the decoration\n */\n setProperties(newProperties) {\n if (this.destroyed) {\n return\n }\n\n const oldProperties = this.properties\n this.properties = newProperties\n this.properties.id = this.id\n\n this.emitter.emit(\"did-change-properties\", { oldProperties, newProperties })\n }\n}\n","\"use strict\"\n\nimport { escapeRegExp } from \"../deps/underscore-plus\"\nimport Mixin from \"mixto\"\n\nimport * as Main from \"../main\"\nimport { styleReader } from \"../main\"\nimport CanvasLayer from \"../canvas-layer\"\n\nconst SPEC_MODE = atom.inSpecMode()\n// an instance of MinimapElement used for testing and calling spies\nlet thisSpec\n\n/**\n * The `CanvasDrawer` mixin is responsible for the rendering of a `Minimap` in a `canvas` element.\n *\n * This mixin is injected in the `MinimapElement` prototype, so all these methods are available on any `MinimapElement` instance.\n */\nexport default class CanvasDrawer extends Mixin {\n /** Initializes the canvas elements needed to perform the `Minimap` rendering. */\n initializeCanvas() {\n if (SPEC_MODE) {\n // class methods only used for spying the calls\n this.drawLines = (firstLine, lastLine) => {\n console.log({ firstLine, lastLine })\n }\n this.drawLineDecoration = drawLineDecoration\n this.drawGutterDecoration = drawGutterDecoration\n this.drawHighlightDecoration = drawHighlightDecoration\n this.drawHighlightOutlineDecoration = drawHighlightOutlineDecoration\n this.drawCustomDecoration = drawCustomDecoration\n this.StyleReader = styleReader\n thisSpec = this\n }\n\n /**\n * The main canvas layer where lines are rendered.\n *\n * @type {CanvasLayer}\n */\n this.tokensLayer = new CanvasLayer()\n /**\n * The canvas layer for decorations below the text.\n *\n * @type {CanvasLayer}\n */\n this.backLayer = new CanvasLayer()\n /**\n * The canvas layer for decorations above the text.\n *\n * @type {CanvasLayer}\n */\n this.frontLayer = new CanvasLayer()\n\n if (!this.pendingChanges) {\n /**\n * Stores the changes from the text editor.\n *\n * @type {Object[]}\n * @access private\n */\n this.pendingChanges = []\n }\n\n if (!this.pendingBackDecorationChanges) {\n /**\n * Stores the changes from the minimap back decorations.\n *\n * @type {Object[]}\n * @access private\n */\n this.pendingBackDecorationChanges = []\n }\n\n if (!this.pendingFrontDecorationChanges) {\n /**\n * Stores the changes from the minimap front decorations.\n *\n * @type {Object[]}\n * @access private\n */\n this.pendingFrontDecorationChanges = []\n }\n\n // the maximum number of tokens to render in one line\n this.maxTokensInOneLine = atom.config.get(\"minimap.maxTokensInOneLine\")\n }\n\n /**\n * Returns the uppermost canvas in the MinimapElement.\n *\n * @returns {HTMLCanvasElement} The html canvas element\n */\n getFrontCanvas() {\n return this.frontLayer.canvas\n }\n\n /**\n * Attaches the canvases into the specified container.\n *\n * @param {HTMLElement} parent The canvases' container\n * @access private\n */\n attachCanvases(parent) {\n this.backLayer.attach(parent)\n this.tokensLayer.attach(parent)\n this.frontLayer.attach(parent)\n }\n\n /**\n * Changes the size of all the canvas layers at once.\n *\n * @param {number} width The new width for the three canvases\n * @param {number} height The new height for the three canvases\n * @access private\n */\n setCanvasesSize(width, height) {\n this.backLayer.setSize(width, height)\n this.tokensLayer.setSize(width, height)\n this.frontLayer.setSize(width, height)\n }\n\n /** Performs an update of the rendered `Minimap` based on the changes registered in the instance. */\n updateCanvas() {\n const firstRow = this.minimap.getFirstVisibleScreenRow()\n const lastRow = this.minimap.getLastVisibleScreenRow()\n\n const devicePixelRatio = this.minimap.getDevicePixelRatio()\n const lineHeight = this.minimap.getLineHeight() * devicePixelRatio\n const charHeight = this.minimap.getCharHeight() * devicePixelRatio\n const charWidth = this.minimap.getCharWidth() * devicePixelRatio\n const { width: canvasWidth, height: canvasHeight } = this.tokensLayer.getSize()\n const editor = this.minimap.getTextEditor()\n const editorElement = this.minimap.getTextEditorElement()\n\n // TODO avoid closure: https://stackoverflow.com/a/46256398/7910299\n const getTokenColorClosure = this.displayCodeHighlights\n ? (scopes) => getTokenColor(scopes, editorElement, this.textOpacity)\n : () => getDefaultColor(editorElement, this.textOpacity)\n\n updateTokensLayer(\n this.tokensLayer,\n firstRow,\n lastRow,\n this.offscreenFirstRow,\n this.offscreenLastRow,\n this.pendingChanges,\n lineHeight,\n charHeight,\n charWidth,\n canvasWidth,\n editor,\n editor.getScreenLineCount(),\n getInvisibleRegExp(editor),\n getTokenColorClosure,\n this.ignoreWhitespacesInTokens,\n this.maxTokensInOneLine\n )\n\n if (SPEC_MODE) {\n // call the spy for drawLines which is used inside updateTokensLayer\n this.drawLines(firstRow, lastRow)\n }\n\n const decorations = this.DecorationManagement.decorationsByTypeThenRows(firstRow, lastRow)\n\n const renderData = {\n context: this.backLayer.context,\n canvasWidth,\n canvasHeight,\n lineHeight,\n charWidth,\n charHeight,\n orders: Main.getPluginsOrder(),\n }\n\n const drawCustomDecorationLambda = (decoration, data, decorationColor) =>\n drawCustomDecoration(decoration, data, decorationColor, editorElement)\n backgroundDecorationDispatcher[\"background-custom\"] = drawCustomDecorationLambda\n frontDecorationDispatcher[\"foreground-custom\"] = drawCustomDecorationLambda\n\n updateBackDecorationsLayer(\n this.backLayer,\n firstRow,\n lastRow,\n this.offscreenFirstRow,\n this.offscreenLastRow,\n this.pendingBackDecorationChanges,\n renderData,\n lineHeight,\n editorElement,\n decorations\n )\n\n renderData.context = this.frontLayer.context\n\n updateFrontDecorationsLayer(\n this.frontLayer,\n firstRow,\n lastRow,\n this.offscreenFirstRow,\n this.offscreenLastRow,\n this.pendingFrontDecorationChanges,\n renderData,\n lineHeight,\n editorElement,\n decorations\n )\n\n this.pendingChanges = []\n this.pendingBackDecorationChanges = []\n this.pendingFrontDecorationChanges = []\n\n /**\n * The first row in the last render of the offscreen canvas.\n *\n * @type {number}\n * @access private\n */\n this.offscreenFirstRow = firstRow\n /**\n * The last row in the last render of the offscreen canvas.\n *\n * @type {number}\n * @access private\n */\n this.offscreenLastRow = lastRow\n }\n\n // ######## ######## ### ## ##\n // ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## ## ##\n // ## ## ######## ## ## ## ## ##\n // ## ## ## ## ######### ## ## ##\n // ## ## ## ## ## ## ## ## ##\n // ######## ## ## ## ## ### ###\n\n /**\n * Routine used to render changes in specific ranges for one layer.\n *\n * @param {CanvasLayer} layer The layer to redraw\n * @param {Object[]} intactRanges An array of the ranges to leave intact\n * @param {number} firstRow FirstRow the first row of the range to update\n * @param {number} lastRow LastRow the last row of the range to update\n * @param {Function} method The render method to use for the lines drawing\n * @access private Unused (inlined the code for performance reasons)\n */\n // redrawRangesOnLayer (layer, intactRanges, firstRow, lastRow, method) {\n // const devicePixelRatio = this.minimap.getDevicePixelRatio()\n // const lineHeight = this.minimap.getLineHeight() * devicePixelRatio\n //\n // layer.clearCanvas()\n //\n // if (intactRanges.length === 0) {\n // method.call(this, firstRow, lastRow, 0)\n // } else {\n // for (let j = 0, len = intactRanges.length; j < len; j++) {\n // const intact = intactRanges[j]\n //\n // layer.copyPartFromOffscreen(\n // intact.offscreenRow * lineHeight,\n // (intact.start - firstRow) * lineHeight,\n // (intact.end - intact.start) * lineHeight\n // )\n // }\n // drawLinesForRanges(method, intactRanges, firstRow, lastRow)\n // }\n //\n // layer.resetOffscreenSize()\n // layer.copyToOffscreen()\n // }\n\n /**\n * Renders the lines between the intact ranges when an update has pending changes.\n *\n * @param {Function} method The render method to use for the lines drawing\n * @param {Object[]} intactRanges The intact ranges in the minimap\n * @param {number} firstRow The first row of the rendered region\n * @param {number} lastRow The last row of the rendered region\n * @access private Unused (inlined the code for performance reasons)\n */\n // drawLinesForRanges (method, ranges, firstRow, lastRow) {\n // let currentRow = firstRow\n // for (let i = 0, len = ranges.length; i < len; i++) {\n // const range = ranges[i]\n //\n // method.call(this, currentRow, range.start, currentRow - firstRow)\n //\n // currentRow = range.end\n // }\n // if (currentRow <= lastRow) {\n // method.call(this, currentRow, lastRow, currentRow - firstRow)\n // }\n // }\n}\n\n// ######## ######## ### ## ##\n// ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ##\n// ## ## ######## ## ## ## ## ##\n// ## ## ## ## ######### ## ## ##\n// ## ## ## ## ## ## ## ## ##\n// ######## ## ## ## ## ### ###\n\n/**\n * Performs an update of the tokens layer using the pending changes array.\n *\n * @param {CanvasLayer} tokensLayer\n * @param {number} firstRow FirstRow the first row of the range to update\n * @param {number} lastRow LastRow the last row of the range to update\n * @param {number} offscreenFirstRow\n * @param {number} offscreenLastRow\n * @param {Array<>} pendingChanges\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {number} charHeight This.minimap.getCharHeight() * devicePixelRatio\n * @param {number} charWidth This.minimap.getCharWidth() * devicePixelRatio\n * @param {number} canvasWidth This.tokensLayer.getSize().width\n * @param {TextEditor} editor This.minimap.getTextEditor()\n * @param {(t: Token) => string} getTokenColorClosure\n * @param {boolean} ignoreWhitespacesInTokens This.ignoreWhitespacesInTokens\n * @param {number} maxTokensInOneLine This.maxTokensInOneLine\n * @access private\n */\nfunction updateTokensLayer(\n tokensLayer,\n firstRow,\n lastRow,\n offscreenFirstRow,\n offscreenLastRow,\n pendingChanges,\n lineHeight,\n charHeight,\n charWidth,\n canvasWidth,\n editor,\n editorScreenLineCount,\n invisibleRegExp,\n getTokenColorClosure,\n ignoreWhitespacesInTokens,\n maxTokensInOneLine\n) {\n // NOTE: this method is the hot function of Minimap. Do not refactor. The code is inlined delibarately.\n\n const intactRanges = computeIntactRanges(firstRow, lastRow, pendingChanges, offscreenFirstRow, offscreenLastRow)\n\n // redrawRangesOnLayer\n const context = tokensLayer.context\n\n tokensLayer.clearCanvas()\n\n if (intactRanges.length === 0) {\n drawLines(\n firstRow,\n lastRow,\n 0,\n lineHeight,\n charHeight,\n charWidth,\n canvasWidth,\n context,\n editor,\n editorScreenLineCount,\n invisibleRegExp,\n getTokenColorClosure,\n ignoreWhitespacesInTokens,\n maxTokensInOneLine\n )\n } else {\n for (let j = 0, len = intactRanges.length; j < len; j++) {\n const intact = intactRanges[j]\n\n tokensLayer.copyPartFromOffscreen(\n intact.offscreenRow * lineHeight,\n (intact.start - firstRow) * lineHeight,\n (intact.end - intact.start) * lineHeight\n )\n }\n // drawLinesForRanges\n let currentRow = firstRow\n for (let i = 0, len = intactRanges.length; i < len; i++) {\n const range = intactRanges[i]\n\n drawLines(\n currentRow,\n range.start,\n currentRow - firstRow,\n lineHeight,\n charHeight,\n charWidth,\n canvasWidth,\n context,\n editor,\n editorScreenLineCount,\n invisibleRegExp,\n getTokenColorClosure,\n ignoreWhitespacesInTokens,\n maxTokensInOneLine\n )\n\n currentRow = range.end\n }\n if (currentRow <= lastRow) {\n drawLines(\n currentRow,\n lastRow,\n currentRow - firstRow,\n lineHeight,\n charHeight,\n charWidth,\n canvasWidth,\n context,\n editor,\n editorScreenLineCount,\n invisibleRegExp,\n getTokenColorClosure,\n ignoreWhitespacesInTokens,\n maxTokensInOneLine\n )\n }\n }\n\n tokensLayer.resetOffscreenSize()\n tokensLayer.copyToOffscreen()\n}\n\n/**\n * Performs an update of the back decorations layer using the pending back decorations changes arrays.\n *\n * @param {CanvasLayer} backLayer\n * @param {number} firstRow FirstRow the first row of the range to update\n * @param {number} lastRow LastRow the last row of the range to update\n * @param {number} offscreenFirstRow\n * @param {number} offscreenLastRow\n * @param {Array<>} pendingBackDecorationChanges\n * @param {Object} renderData\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {TextEditorElement} editorElement This.minimap.getTextEditorElement()\n * @param {Decoration[]} decorations\n * @access private\n */\nfunction updateBackDecorationsLayer(\n backLayer,\n firstRow,\n lastRow,\n offscreenFirstRow,\n offscreenLastRow,\n pendingBackDecorationChanges,\n renderData,\n lineHeight,\n editorElement,\n decorations\n) {\n const intactRanges = computeIntactRanges(\n firstRow,\n lastRow,\n pendingBackDecorationChanges,\n offscreenFirstRow,\n offscreenLastRow\n )\n\n // NOTE: this method is the hot function of Minimap. Do not refactor. The code is inlined delibarately.\n\n // redrawRangesOnLayer\n\n backLayer.clearCanvas()\n\n if (intactRanges.length === 0) {\n drawBackDecorationsForLines(firstRow, lastRow, 0, renderData, lineHeight, editorElement, decorations)\n } else {\n for (let j = 0, len = intactRanges.length; j < len; j++) {\n const intact = intactRanges[j]\n\n backLayer.copyPartFromOffscreen(\n intact.offscreenRow * lineHeight,\n (intact.start - firstRow) * lineHeight,\n (intact.end - intact.start) * lineHeight\n )\n }\n // drawLinesForRanges\n let currentRow = firstRow\n for (let i = 0, len = intactRanges.length; i < len; i++) {\n const range = intactRanges[i]\n\n drawBackDecorationsForLines(\n currentRow,\n range.start,\n currentRow - firstRow,\n renderData,\n lineHeight,\n editorElement,\n decorations\n )\n\n currentRow = range.end\n }\n if (currentRow <= lastRow) {\n drawBackDecorationsForLines(\n currentRow,\n lastRow,\n currentRow - firstRow,\n renderData,\n lineHeight,\n editorElement,\n decorations\n )\n }\n }\n\n backLayer.resetOffscreenSize()\n backLayer.copyToOffscreen()\n}\n\n/**\n * Performs an update of the front decorations layer using the pending front decorations changes arrays.\n *\n * @param {CanvasLayer} frontLayer\n * @param {number} firstRow FirstRow the first row of the range to update\n * @param {number} lastRow LastRow the last row of the range to update\n * @param {number} offscreenFirstRow\n * @param {number} offscreenLastRow\n * @param {Array<>} pendingFrontDecorationChanges\n * @param {Object} renderData\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {TextEditorElement} editorElement This.minimap.getTextEditorElement()\n * @param {Decoration[]} decorations\n * @access private\n */\nfunction updateFrontDecorationsLayer(\n frontLayer,\n firstRow,\n lastRow,\n offscreenFirstRow,\n offscreenLastRow,\n pendingFrontDecorationChanges,\n renderData,\n lineHeight,\n editorElement,\n decorations\n) {\n const intactRanges = computeIntactRanges(\n firstRow,\n lastRow,\n pendingFrontDecorationChanges,\n offscreenFirstRow,\n offscreenLastRow\n )\n\n // NOTE: this method is the hot function of Minimap. Do not refactor. The code is inlined delibarately.\n\n // redrawRangesOnLayer\n\n frontLayer.clearCanvas()\n\n if (intactRanges.length === 0) {\n drawFrontDecorationsForLines(firstRow, lastRow, 0, renderData, lineHeight, editorElement, decorations)\n } else {\n for (let j = 0, len = intactRanges.length; j < len; j++) {\n const intact = intactRanges[j]\n\n frontLayer.copyPartFromOffscreen(\n intact.offscreenRow * lineHeight,\n (intact.start - firstRow) * lineHeight,\n (intact.end - intact.start) * lineHeight\n )\n }\n // drawLinesForRanges\n let currentRow = firstRow\n for (let i = 0, len = intactRanges.length; i < len; i++) {\n const range = intactRanges[i]\n\n drawFrontDecorationsForLines(\n currentRow,\n range.start,\n currentRow - firstRow,\n renderData,\n lineHeight,\n editorElement,\n decorations\n )\n\n currentRow = range.end\n }\n if (currentRow <= lastRow) {\n drawFrontDecorationsForLines(\n currentRow,\n lastRow,\n currentRow - firstRow,\n renderData,\n lineHeight,\n editorElement,\n decorations\n )\n }\n }\n\n frontLayer.resetOffscreenSize()\n frontLayer.copyToOffscreen()\n}\n\nconst whitespaceTokenRegex = /^\\s+$/\nconst oneOrMoreWhiteSpaceRegexp = /\\s+/\n\n/**\n * Draws a single token on the given context.\n *\n * @param {CanvasRenderingContext2D} context The target canvas context\n * @param {string} text The token's text content\n * @param {string} color The token's CSS color\n * @param {number} x The x position of the token in the line\n * @param {number} y The y position of the line in the minimap\n * @param {number} charWidth The width of a character in the minimap\n * @param {number} charHeight The height of a character in the minimap\n * @returns {number} The x position at the end of the token\n * @access private\n */\nfunction drawToken(context, text, color, x, y, charWidth, charHeight, ignoreWhitespacesInTokens) {\n context.fillStyle = color\n\n if (ignoreWhitespacesInTokens) {\n const length = text.length * charWidth\n context.fillRect(x, y, length, charHeight)\n\n return x + length\n } else {\n let chars = 0\n for (let j = 0, len = text.length; j < len; j++) {\n const char = text[j]\n if (char === \" \") {\n if (chars > 0) {\n context.fillRect(x - chars * charWidth, y, chars * charWidth, charHeight)\n }\n chars = 0\n } else {\n chars++\n }\n x += charWidth\n }\n if (chars > 0) {\n context.fillRect(x - chars * charWidth, y, chars * charWidth, charHeight)\n }\n return x\n }\n}\n\n/**\n * Draws lines on the corresponding layer.\n *\n * The lines range to draw is specified by the `firstRow` and `lastRow` parameters.\n *\n * @param {number} firstRow The first row to render\n * @param {number} lastRow The last row to render\n * @param {number} offsetRow The relative offset to apply to rows when rendering them\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {number} charHeight This.minimap.getCharHeight() * devicePixelRatio\n * @param {number} charWidth This.minimap.getCharWidth() * devicePixelRatio\n * @param {number} canvasWidth This.tokensLayer.getSize().width\n * @param {CanvasRenderingContext2D} context This.tokensLayer.context\n * @param {TextEditor} editor This.minimap.getTextEditor()\n * @param {number} editorScreenLineCount\n * @param {RegExp} invisibleRegExp\n * @param {(t: Token) => string} getTokenColorClosure\n * @param {boolean} ignoreWhitespacesInTokens This.ignoreWhitespacesInTokens\n * @param {number} maxTokensInOneLine This.maxTokensInOneLine\n * @access private\n */\nfunction drawLines(\n firstRow,\n lastRow,\n offsetRow,\n lineHeight,\n charHeight,\n charWidth,\n canvasWidth,\n context,\n editor,\n editorScreenLineCount,\n invisibleRegExp,\n getTokenColorClosure,\n ignoreWhitespacesInTokens,\n maxTokensInOneLine\n) {\n // NOTE: this method is the hot function of Minimap. Do not refactor. The code is inlined delibarately.\n\n if (firstRow > lastRow) {\n return\n }\n\n let lastLine, x\n let y = offsetRow * lineHeight - lineHeight\n\n // eachTokenForScreenRows\n lastRow = Math.min(lastRow, editorScreenLineCount)\n\n for (let line = firstRow; line < lastRow; line++) {\n const editorTokensForScreenRow = editor.tokensForScreenRow(line)\n const numToken = editorTokensForScreenRow.length\n const numTokenToRender = Math.min(numToken, maxTokensInOneLine)\n\n if (lastLine !== line) {\n x = 0\n y += lineHeight\n lastLine = line\n context.clearRect(x, y, canvasWidth, lineHeight)\n }\n\n for (let iToken = 0; iToken < numTokenToRender; iToken++) {\n const token = editorTokensForScreenRow[iToken]\n const tokenText = token.text.replace(invisibleRegExp, \" \")\n const tokenScopes = token.scopes\n\n if (x > canvasWidth) {\n continue\n }\n\n if (whitespaceTokenRegex.test(tokenText)) {\n x += tokenText.length * charWidth\n } else {\n x = drawToken(\n context,\n tokenText,\n getTokenColorClosure(tokenScopes),\n x,\n y,\n charWidth,\n charHeight,\n ignoreWhitespacesInTokens\n )\n }\n }\n }\n\n context.fill()\n}\n\n/**\n * Returns the regexp to replace invisibles substitution characters in editor lines.\n *\n * @param {TextEditor} editor\n * @returns {RegExp} The regular expression to match invisible characters\n * @access private\n */\nfunction getInvisibleRegExp(editor) {\n const invisibles = editor.getInvisibles()\n const regexp = []\n if (invisibles.cr != null) {\n regexp.push(invisibles.cr)\n }\n if (invisibles.eol != null) {\n regexp.push(invisibles.eol)\n }\n if (invisibles.space != null) {\n regexp.push(invisibles.space)\n }\n if (invisibles.tab != null) {\n regexp.push(invisibles.tab)\n }\n\n if (regexp.length !== 0) {\n return RegExp(\n regexp\n .filter((s) => {\n return typeof s === \"string\"\n })\n .map(escapeRegExp)\n .join(\"|\"),\n \"g\"\n )\n } else {\n return null\n }\n}\n\n/**\n * Dispatchers for decoration drawing (custom decoration drawer added dynamically)\n *\n * @param {Object} backgroundDecorationDispatcher An object with the type to render as key and the render method as value\n */\nconst backgroundDecorationDispatcher = {\n line: drawLineDecoration,\n \"highlight-under\": drawHighlightDecoration,\n}\n\n/**\n * Dispatchers for decoration drawing (custom decoration drawer added dynamically)\n *\n * @param {Object} frontDecorationDispatcher An object with the type to render as key and the render method as value\n */\nconst frontDecorationDispatcher = {\n gutter: drawGutterDecoration,\n \"highlight-over\": drawHighlightDecoration,\n \"highlight-outline\": drawHighlightOutlineDecoration,\n}\n\n/**\n * Draws a line decoration.\n *\n * @param {Decoration} decoration The decoration to render\n * @param {Object} data The data need to perform the render\n * @param {string} decorationColor Decoration color\n * @access private\n */\nfunction drawLineDecoration(decoration, data, decorationColor) {\n const { context, lineHeight, canvasWidth, yRow } = data\n\n context.fillStyle = decorationColor\n context.fillRect(0, yRow, canvasWidth, lineHeight)\n}\n\n/**\n * Draws a gutter decoration.\n *\n * @param {Decoration} decoration The decoration to render\n * @param {Object} data The data need to perform the render\n * @param {string} decorationColor Decoration color\n * @access private\n */\nfunction drawGutterDecoration(decoration, data, decorationColor) {\n const { context, lineHeight, yRow } = data\n\n context.fillStyle = decorationColor\n context.fillRect(0, yRow, 1, lineHeight)\n}\n\n/**\n * Draws a highlight decoration.\n *\n * It renders only the part of the highlight corresponding to the specified row.\n *\n * @param {Decoration} decoration The decoration to render\n * @param {Object} data The data need to perform the render\n * @param {string} decorationColor Decoration color\n * @access private\n */\nfunction drawHighlightDecoration(decoration, data, decorationColor) {\n const { context, lineHeight, charWidth, canvasWidth, screenRow, yRow } = data\n\n const range = decoration.getMarker().getScreenRange()\n const rowSpan = range.end.row - range.start.row\n\n context.fillStyle = decorationColor\n\n if (rowSpan === 0) {\n const colSpan = range.end.column - range.start.column\n context.fillRect(range.start.column * charWidth, yRow, colSpan * charWidth, lineHeight)\n } else if (screenRow === range.start.row) {\n const x = range.start.column * charWidth\n context.fillRect(x, yRow, canvasWidth - x, lineHeight)\n } else if (screenRow === range.end.row) {\n context.fillRect(0, yRow, range.end.column * charWidth, lineHeight)\n } else {\n context.fillRect(0, yRow, canvasWidth, lineHeight)\n }\n}\n\n/**\n * Draws a highlight outline decoration.\n *\n * It renders only the part of the highlight corresponding to the specified row.\n *\n * @param {Decoration} decoration The decoration to render\n * @param {Object} data The data need to perform the render\n * @param {string} decorationColor Decoration color\n * @access private\n */\nfunction drawHighlightOutlineDecoration(decoration, data, decorationColor) {\n const { context, lineHeight, charWidth, canvasWidth, screenRow, yRow } = data\n\n let bottomWidth, colSpan, width, xBottomStart, xEnd, xStart\n const range = decoration.getMarker().getScreenRange()\n const rowSpan = range.end.row - range.start.row\n const yStart = yRow\n const yEnd = yStart + lineHeight\n\n context.fillStyle = decorationColor\n\n if (rowSpan === 0) {\n colSpan = range.end.column - range.start.column\n width = colSpan * charWidth\n xStart = range.start.column * charWidth\n xEnd = xStart + width\n\n context.fillRect(xStart, yStart, width, 1)\n context.fillRect(xStart, yEnd - 1, width, 1)\n context.fillRect(xStart, yStart, 1, lineHeight)\n context.fillRect(xEnd, yStart, 1, lineHeight)\n } else if (rowSpan === 1) {\n xStart = range.start.column * charWidth\n xEnd = range.end.column * charWidth\n\n if (screenRow === range.start.row) {\n width = canvasWidth - xStart\n xBottomStart = Math.max(xStart, xEnd)\n bottomWidth = canvasWidth - xBottomStart\n\n context.fillRect(xStart, yStart, width, 1)\n context.fillRect(xBottomStart, yEnd - 1, bottomWidth, 1)\n context.fillRect(xStart, yStart, 1, lineHeight)\n context.fillRect(canvasWidth - 1, yStart, 1, lineHeight)\n } else {\n width = canvasWidth - xStart\n bottomWidth = canvasWidth - xEnd\n\n context.fillRect(0, yStart, xStart, 1)\n context.fillRect(0, yEnd - 1, xEnd, 1)\n context.fillRect(0, yStart, 1, lineHeight)\n context.fillRect(xEnd, yStart, 1, lineHeight)\n }\n } else {\n xStart = range.start.column * charWidth\n xEnd = range.end.column * charWidth\n if (screenRow === range.start.row) {\n width = canvasWidth - xStart\n\n context.fillRect(xStart, yStart, width, 1)\n context.fillRect(xStart, yStart, 1, lineHeight)\n context.fillRect(canvasWidth - 1, yStart, 1, lineHeight)\n } else if (screenRow === range.end.row) {\n width = canvasWidth - xStart\n\n context.fillRect(0, yEnd - 1, xEnd, 1)\n context.fillRect(0, yStart, 1, lineHeight)\n context.fillRect(xEnd, yStart, 1, lineHeight)\n } else {\n context.fillRect(0, yStart, 1, lineHeight)\n context.fillRect(canvasWidth - 1, yStart, 1, lineHeight)\n if (screenRow === range.start.row + 1) {\n context.fillRect(0, yStart, xStart, 1)\n }\n if (screenRow === range.end.row - 1) {\n context.fillRect(xEnd, yEnd - 1, canvasWidth - xEnd, 1)\n }\n }\n }\n}\n\n/**\n * Draws a custom decoration.\n *\n * It renders only the part of the highlight corresponding to the specified row.\n *\n * @param {Decoration} decoration The decoration to render\n * @param {Object} data The data need to perform the render\n * @param {string} decorationColor Decoration color\n * @param {TextEditorElement} editorElement\n * @access private\n */\nfunction drawCustomDecoration(decoration, data, decorationColor, editorElement) {\n const renderRoutine = decoration.getProperties().render\n\n if (renderRoutine) {\n data.color = decorationColor\n renderRoutine(decoration, data, editorElement)\n }\n}\n\n/**\n * Draws the specified decorations for the current `screenRow`.\n *\n * The `decorations` object contains all the decorations grouped by type and then rows.\n *\n * @param {number} screenRow The screen row index for which render decorations\n * @param {Object} decorations The object containing all the decorations\n * @param {Object} renderData The object containing the render data\n * @param {Object} types An object with the type to render as key and the render method as value\n * @param {TextEditorElement} editorElement\n * @access private\n */\nfunction drawDecorations(screenRow, decorations, renderData, types, editorElement) {\n let decorationsToRender = []\n\n renderData.context.clearRect(0, renderData.yRow, renderData.canvasWidth, renderData.lineHeight)\n\n for (const i in types) {\n decorationsToRender = decorationsToRender.concat(decorations[i] != null ? decorations[i][screenRow] || [] : [])\n }\n\n decorationsToRender.sort(\n (a, b) => (renderData.orders[a.properties.plugin] || 0) - (renderData.orders[b.properties.plugin] || 0)\n )\n\n if (decorationsToRender != null ? decorationsToRender.length : undefined) {\n for (let i = 0, len = decorationsToRender.length; i < len; i++) {\n const decoration = decorationsToRender[i]\n const decorationDrawer = types[decoration.properties.type]\n if (!SPEC_MODE) {\n decorationDrawer(decoration, renderData, /* decorationColor */ getDecorationColor(decoration, editorElement))\n } else {\n // get the real function name from the mangeld Parcel names\n const functionName = decorationDrawer.name.split(\"$\").pop().replace(\"Lambda\", \"\")\n // call the spy:\n thisSpec[functionName](\n decoration,\n renderData,\n /* decorationColor */ getDecorationColor(decoration, editorElement)\n )\n }\n }\n }\n}\n\n/**\n * Draws front decorations on the corresponding layer.\n *\n * The lines range to draw is specified by the `firstRow` and `lastRow` parameters.\n *\n * @param {number} firstRow The first row to render\n * @param {number} lastRow The last row to render\n * @param {number} offsetRow The relative offset to apply to rows when rendering them\n * @param {Object} renderData\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {TextEditorElement} editorElement This.minimap.getTextEditorElement()\n * @param {Decoration[]} decorations\n * @access private\n */\nfunction drawFrontDecorationsForLines(\n firstRow,\n lastRow,\n offsetRow,\n renderData,\n lineHeight,\n editorElement,\n decorations\n) {\n if (firstRow > lastRow) {\n return\n }\n\n for (let screenRow = firstRow; screenRow <= lastRow; screenRow++) {\n renderData.row = offsetRow + (screenRow - firstRow)\n renderData.yRow = renderData.row * lineHeight\n renderData.screenRow = screenRow\n\n drawDecorations(screenRow, decorations, renderData, frontDecorationDispatcher, editorElement)\n }\n\n renderData.context.fill()\n}\n\n/**\n * Draws back decorations on the corresponding layer.\n *\n * The lines range to draw is specified by the `firstRow` and `lastRow` parameters.\n *\n * @param {number} firstRow The first row to render\n * @param {number} lastRow The last row to render\n * @param {number} offsetRow The relative offset to apply to rows when rendering them\n * @param {Object} renderData\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {TextEditorElement} editorElement This.minimap.getTextEditorElement()\n * @param {Decoration[]} decorations\n * @access private\n */\nfunction drawBackDecorationsForLines(firstRow, lastRow, offsetRow, renderData, lineHeight, editorElement, decorations) {\n if (firstRow > lastRow) {\n return\n }\n\n for (let screenRow = firstRow; screenRow <= lastRow; screenRow++) {\n renderData.row = offsetRow + (screenRow - firstRow)\n renderData.yRow = renderData.row * lineHeight\n renderData.screenRow = screenRow\n\n drawDecorations(screenRow, decorations, renderData, backgroundDecorationDispatcher, editorElement)\n }\n\n renderData.context.fill()\n}\n\n// ###### ####### ## ####### ######## ######\n// ## ## ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ######## ######\n// ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ## ## ##\n// ###### ####### ######## ####### ## ## ######\n\n/**\n * Returns the opacity value to use when rendering the `Minimap` text.\n *\n * @returns {Number} The text opacity value Unused (inlined)\n */\n// getTextOpacity () { return this.textOpacity }\n\n/**\n * Returns the default text color for an editor content.\n *\n * The color value is directly read from the `TextEditorView` computed styles.\n *\n * @param {TextEditorElement} editorElement\n * @param {number} textOpacity\n * @returns {string} A CSS color\n */\nfunction getDefaultColor(editorElement, textOpacity) {\n const color = styleReader.retrieveStyleFromDom([\".editor\"], \"color\", editorElement, true)\n return transparentize(color, textOpacity)\n}\n\n/**\n * Returns the text color for the passed-in scopes\n *\n * The color value is read from the DOM by creating a node structure that match the token `scope` property.\n *\n * @param {string[]} scopes An array of scopes for a `TextEditor` token (token.scopeDescriptor || token.scopes)\n * @param {TextEditorElement} editorElement\n * @param {number} textOpacity\n * @returns {string} The CSS color for the provided token\n */\nfunction getTokenColor(scopes, editorElement, textOpacity) {\n const color = styleReader.retrieveStyleFromDom(scopes, \"color\", editorElement, true)\n\n return transparentize(color, textOpacity)\n}\n\n/**\n * Converts a `rgb(...)` color into a `rgba(...)` color with the specified opacity.\n *\n * @param {string} color The CSS RGB color to transparentize\n * @param {number} opacity The opacity amount\n * @returns {string} The transparentized CSS color\n * @access private\n */\nfunction transparentize(color, opacity) {\n // assumes that color is in form of `rgb(content)` with no spaces around the given value\n return `rgba(${color.slice(4, -1)}, ${opacity})`\n}\n\n/**\n * Returns the background color for the passed-in `decoration` object.\n *\n * The color value is read from the DOM by creating a node structure that match the decoration `scope` property unless\n * the decoration provides its own `color` property.\n *\n * @param {Decoration} decoration The decoration to get the color for\n * @param {TextEditorElement} editorElement\n * @returns {string} The CSS color for the provided decoration\n */\nfunction getDecorationColor(decoration, editorElement) {\n const properties = decoration.getProperties()\n if (properties.color) {\n return properties.color\n }\n\n if (properties.scope) {\n const scopeString = properties.scope.split(oneOrMoreWhiteSpaceRegexp)\n return styleReader.retrieveStyleFromDom(scopeString, \"background-color\", editorElement, true)\n } else {\n return getDefaultColor(editorElement)\n }\n}\n\n// ######## ### ## ## ###### ######## ######\n// ## ## ## ## ### ## ## ## ## ## ##\n// ## ## ## ## #### ## ## ## ##\n// ######## ## ## ## ## ## ## #### ###### ######\n// ## ## ######### ## #### ## ## ## ##\n// ## ## ## ## ## ### ## ## ## ## ##\n// ## ## ## ## ## ## ###### ######## ######\n\n/**\n * Computes the ranges that are not affected by the current pending changes.\n *\n * @param {number} firstRow The first row of the rendered region\n * @param {number} lastRow The last row of the rendered region\n * @param {number | null} offscreenFirstRow CanvasDrawer.offscreenLastRow\n * @param {number | null} offscreenLastRow CanvasDrawer.offscreenLastRow\n * @returns {Object[]} The intact ranges in the rendered region\n * @access private\n */\nfunction computeIntactRanges(firstRow, lastRow, changes, offscreenFirstRow, offscreenLastRow) {\n // TODO when do they get null?\n if (offscreenFirstRow == null && offscreenLastRow == null) {\n return []\n }\n\n // At first, the whole range is considered intact\n let intactRanges = [\n {\n start: offscreenFirstRow,\n end: offscreenLastRow,\n offscreenRow: 0,\n },\n ]\n\n for (let i = 0, len = changes.length; i < len; i++) {\n const change = changes[i]\n const newIntactRanges = []\n\n for (let j = 0, intactLen = intactRanges.length; j < intactLen; j++) {\n const range = intactRanges[j]\n\n if (change.end < range.start && change.screenDelta !== 0) {\n // The change is above of the range and lines are either\n // added or removed\n newIntactRanges.push({\n start: range.start + change.screenDelta,\n end: range.end + change.screenDelta,\n offscreenRow: range.offscreenRow,\n })\n } else if (change.end < range.start || change.start > range.end) {\n // The change is outside the range but didn't add\n // or remove lines\n newIntactRanges.push(range)\n } else {\n // The change is within the range, there's one intact range\n // from the range start to the change start\n if (change.start > range.start) {\n newIntactRanges.push({\n start: range.start,\n end: change.start - 1,\n offscreenRow: range.offscreenRow,\n })\n }\n if (change.end < range.end) {\n // The change ends within the range\n if (change.bufferDelta !== 0) {\n // Lines are added or removed, the intact range starts in the\n // next line after the change end plus the screen delta\n newIntactRanges.push({\n start: change.end + change.screenDelta + 1,\n end: range.end + change.screenDelta,\n offscreenRow: range.offscreenRow + change.end + 1 - range.start,\n })\n } else if (change.screenDelta !== 0) {\n // Lines are added or removed in the display buffer, the intact\n // range starts in the next line after the change end plus the\n // screen delta\n newIntactRanges.push({\n start: change.end + change.screenDelta + 1,\n end: range.end + change.screenDelta,\n offscreenRow: range.offscreenRow + change.end + 1 - range.start,\n })\n } else {\n // No lines are added, the intact range starts on the line after\n // the change end\n newIntactRanges.push({\n start: change.end + 1,\n end: range.end,\n offscreenRow: range.offscreenRow + change.end + 1 - range.start,\n })\n }\n }\n }\n }\n intactRanges = newIntactRanges\n }\n\n return truncateIntactRanges(intactRanges, firstRow, lastRow)\n}\n\n/**\n * Truncates the intact ranges so that they doesn't expand past the visible area of the minimap.\n *\n * @param {Object[]} intactRanges The initial array of ranges\n * @param {number} firstRow The first row of the rendered region\n * @param {number} lastRow The last row of the rendered region\n * @returns {Object[]} The array of truncated ranges\n * @access private\n */\nfunction truncateIntactRanges(intactRanges, firstRow, lastRow) {\n let i = 0\n while (i < intactRanges.length) {\n const range = intactRanges[i]\n\n if (range.start < firstRow) {\n range.offscreenRow += firstRow - range.start\n range.start = firstRow\n }\n\n if (range.end > lastRow) {\n range.end = lastRow\n }\n\n if (range.start >= range.end) {\n intactRanges.splice(i--, 1)\n }\n\n i++\n }\n\n return intactRanges.sort((a, b) => {\n return a.offscreenRow - b.offscreenRow\n })\n}\n","/** @babel */\n\"use strict\"\n\n/** @access private */\nexport default class CanvasLayer {\n constructor() {\n /**\n * The onscreen canvas.\n *\n * @type {HTMLCanvasElement}\n */\n this.canvas = document.createElement(\"canvas\")\n\n const desynchronized = false // TODO Electron 9 has color issues #786\n\n /**\n * The onscreen canvas context.\n *\n * @type {CanvasRenderingContext2D}\n */\n this.context = this.canvas.getContext(\"2d\", { desynchronized })\n this.canvas.webkitImageSmoothingEnabled = false\n this.context.imageSmoothingEnabled = false\n\n /**\n * The offscreen canvas.\n *\n * @type {HTMLCanvasElement}\n * @access private\n */\n this.offscreenCanvas = document.createElement(\"canvas\")\n /**\n * The offscreen canvas context.\n *\n * @type {CanvasRenderingContext2D}\n * @access private\n */\n this.offscreenContext = this.offscreenCanvas.getContext(\"2d\", { desynchronized })\n this.offscreenCanvas.webkitImageSmoothingEnabled = false\n this.offscreenContext.imageSmoothingEnabled = false\n }\n\n attach(parent) {\n if (this.canvas.parentNode) {\n return\n }\n\n parent.appendChild(this.canvas)\n }\n\n setSize(width = 0, height = 0) {\n this.canvas.width = width\n this.canvas.height = height\n this.context.imageSmoothingEnabled = false\n this.resetOffscreenSize()\n }\n\n getSize() {\n return {\n width: this.canvas.width,\n height: this.canvas.height,\n }\n }\n\n resetOffscreenSize() {\n this.offscreenCanvas.width = this.canvas.width\n this.offscreenCanvas.height = this.canvas.height\n this.offscreenContext.imageSmoothingEnabled = false\n }\n\n copyToOffscreen() {\n if (this.canvas.width > 0 && this.canvas.height > 0) {\n this.offscreenContext.drawImage(this.canvas, 0, 0)\n }\n }\n\n copyFromOffscreen() {\n if (this.offscreenCanvas.width > 0 && this.offscreenCanvas.height > 0) {\n this.context.drawImage(this.offscreenCanvas, 0, 0)\n }\n }\n\n copyPartFromOffscreen(srcY, destY, height) {\n if (this.offscreenCanvas.width > 0 && this.offscreenCanvas.height > 0) {\n this.context.drawImage(\n this.offscreenCanvas,\n 0,\n srcY,\n this.offscreenCanvas.width,\n height,\n 0,\n destY,\n this.offscreenCanvas.width,\n height\n )\n }\n }\n\n clearCanvas() {\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height)\n }\n}\n","\"use strict\"\n\n/**\n * Generates a decorator function to includes many `mixto` mixins into a class.\n *\n * @param {...Mixin} mixins The mixins to include in the class\n * @returns {function(cls:Function):Function} The decorator function that will include the specified mixins\n * @include(SomeMixin) export default class SomeClass {\n * // ...\n * }\n */\nexport default function include(cls, ...mixins) {\n mixins.forEach((mixin) => {\n includeMixin(cls, mixin)\n })\n}\n\nfunction includeMixin(target, source) {\n Object.getOwnPropertyNames(source).forEach((k) => {\n if ([\"length\", \"name\", \"arguments\", \"caller\", \"prototype\", \"includeInto\"].indexOf(k) >= 0) {\n return\n }\n\n const descriptor = Object.getOwnPropertyDescriptor(source, k)\n Object.defineProperty(target, k, descriptor)\n })\n\n Object.getOwnPropertyNames(source.prototype).forEach((k) => {\n if (k === \"constructor\") {\n return\n }\n\n const descriptor = Object.getOwnPropertyDescriptor(source.prototype, k)\n Object.defineProperty(target.prototype, k, descriptor)\n })\n}\n","\"use strict\"\n\nimport { CompositeDisposable, Emitter } from \"atom\"\nimport { EventsDelegation, SpacePenDSL } from \"atom-utils-plus\"\n\nimport * as Main from \"./main\"\nimport element from \"./decorators/element\"\nimport include from \"./decorators/include\"\n\nconst TAG_NAME = \"minimap-quick-settings\"\n\n/** @access private */\nclass MinimapQuickSettingsElement extends HTMLElement {\n static initClass() {\n include(this, EventsDelegation, SpacePenDSL.Babel)\n element(this, TAG_NAME)\n }\n\n static content() {\n this.div({ class: \"select-list popover-list minimap-quick-settings\" }, () => {\n this.input({ type: \"text\", class: \"hidden-input\", outlet: \"hiddenInput\" })\n this.ol({ class: \"list-group mark-active\", outlet: \"list\" }, () => {\n this.li({ class: \"separator\", outlet: \"separator\" })\n this.li({ class: \"code-highlights\", outlet: \"codeHighlights\" }, \"code-highlights\")\n this.li({ class: \"absolute-mode\", outlet: \"absoluteMode\" }, \"absolute-mode\")\n this.li(\n { class: \"adjust-absolute-mode-height\", outlet: \"adjustAbsoluteModeHeight\" },\n \"adjust-absolute-mode-height\"\n )\n })\n this.div({ class: \"btn-group\" }, () => {\n this.button({ class: \"btn btn-default\", outlet: \"onLeftButton\" }, \"On Left\")\n this.button({ class: \"btn btn-default\", outlet: \"onRightButton\" }, \"On Right\")\n })\n })\n }\n\n createdCallback() {\n this.buildContent()\n }\n\n setModel(minimap) {\n this.selectedItem = null\n this.minimap = minimap\n this.emitter = new Emitter()\n this.subscriptions = new CompositeDisposable()\n this.plugins = {}\n this.itemsActions = new WeakMap()\n\n this.codeHighlights.classList.toggle(\"active\", this.minimap.displayCodeHighlights)\n\n this.itemsActions.set(this.codeHighlights, () => {\n atom.config.set(\"minimap.displayCodeHighlights\", !this.minimap.displayCodeHighlights)\n })\n\n this.itemsActions.set(this.absoluteMode, () => {\n atom.config.set(\"minimap.absoluteMode\", !atom.config.get(\"minimap.absoluteMode\"))\n })\n\n this.itemsActions.set(this.adjustAbsoluteModeHeight, () => {\n atom.config.set(\"minimap.adjustAbsoluteModeHeight\", !atom.config.get(\"minimap.adjustAbsoluteModeHeight\"))\n })\n\n this.subscriptions.add(\n Main.onDidAddPlugin(({ name, plugin }) => {\n return this.addItemFor(name, plugin)\n }),\n Main.onDidRemovePlugin(({ name, plugin }) => {\n return this.removeItemFor(name, plugin)\n }),\n Main.onDidActivatePlugin(({ name, plugin }) => {\n return this.activateItem(name, plugin)\n }),\n Main.onDidDeactivatePlugin(({ name, plugin }) => {\n return this.deactivateItem(name, plugin)\n }),\n\n atom.commands.add(\"minimap-quick-settings\", {\n \"core:move-up\": () => {\n this.selectPreviousItem()\n },\n \"core:move-down\": () => {\n this.selectNextItem()\n },\n \"core:move-left\": () => {\n atom.config.set(\"minimap.displayMinimapOnLeft\", true)\n },\n \"core:move-right\": () => {\n atom.config.set(\"minimap.displayMinimapOnLeft\", false)\n },\n \"core:cancel\": () => {\n this.destroy()\n },\n \"core:confirm\": () => {\n this.toggleSelectedItem()\n },\n }),\n\n this.subscribeTo(this.codeHighlights, {\n mousedown: (e) => {\n e.preventDefault()\n atom.config.set(\"minimap.displayCodeHighlights\", !this.minimap.displayCodeHighlights)\n },\n }),\n\n this.subscribeTo(this.absoluteMode, {\n mousedown: (e) => {\n e.preventDefault()\n atom.config.set(\"minimap.absoluteMode\", !atom.config.get(\"minimap.absoluteMode\"))\n },\n }),\n\n this.subscribeTo(this.adjustAbsoluteModeHeight, {\n mousedown: (e) => {\n e.preventDefault()\n atom.config.set(\"minimap.adjustAbsoluteModeHeight\", !atom.config.get(\"minimap.adjustAbsoluteModeHeight\"))\n },\n }),\n\n this.subscribeTo(\n this.hiddenInput,\n {\n focusout: (e) => {\n this.destroy()\n },\n },\n { passive: true }\n ),\n\n this.subscribeTo(this.onLeftButton, {\n mousedown: (e) => {\n e.preventDefault()\n atom.config.set(\"minimap.displayMinimapOnLeft\", true)\n },\n }),\n\n this.subscribeTo(this.onRightButton, {\n mousedown: (e) => {\n e.preventDefault()\n atom.config.set(\"minimap.displayMinimapOnLeft\", false)\n },\n }),\n\n atom.config.observe(\"minimap.displayCodeHighlights\", (bool) => {\n this.codeHighlights.classList.toggle(\"active\", bool)\n }),\n\n atom.config.observe(\"minimap.absoluteMode\", (bool) => {\n this.absoluteMode.classList.toggle(\"active\", bool)\n }),\n\n atom.config.observe(\"minimap.adjustAbsoluteModeHeight\", (bool) => {\n this.adjustAbsoluteModeHeight.classList.toggle(\"active\", bool)\n }),\n\n atom.config.observe(\"minimap.displayMinimapOnLeft\", (bool) => {\n this.onLeftButton.classList.toggle(\"selected\", bool)\n this.onRightButton.classList.toggle(\"selected\", !bool)\n })\n )\n\n this.initList()\n }\n\n onDidDestroy(callback) {\n return this.emitter.on(\"did-destroy\", callback)\n }\n\n attach() {\n const workspaceElement = atom.views.getView(atom.workspace)\n workspaceElement.appendChild(this)\n this.hiddenInput.focus()\n }\n\n destroy() {\n this.emitter.emit(\"did-destroy\")\n this.subscriptions.dispose()\n this.parentNode.removeChild(this)\n }\n\n initList() {\n this.itemsDisposables = new WeakMap()\n for (const name in Main.plugins) {\n this.addItemFor(name, Main.plugins[name])\n }\n }\n\n toggleSelectedItem() {\n const fn = this.itemsActions.get(this.selectedItem)\n if (typeof fn === \"function\") {\n fn()\n }\n }\n\n selectNextItem() {\n this.selectedItem.classList.remove(\"selected\")\n if (this.selectedItem.nextSibling != null) {\n this.selectedItem = this.selectedItem.nextSibling\n if (this.selectedItem.matches(\".separator\")) {\n this.selectedItem = this.selectedItem.nextSibling\n }\n } else {\n this.selectedItem = this.list.firstChild\n }\n this.selectedItem.classList.add(\"selected\")\n }\n\n selectPreviousItem() {\n this.selectedItem.classList.remove(\"selected\")\n if (this.selectedItem.previousSibling != null) {\n this.selectedItem = this.selectedItem.previousSibling\n if (this.selectedItem.matches(\".separator\")) {\n this.selectedItem = this.selectedItem.previousSibling\n }\n } else {\n this.selectedItem = this.list.lastChild\n }\n this.selectedItem.classList.add(\"selected\")\n }\n\n addItemFor(name, plugin) {\n const item = document.createElement(\"li\")\n const action = () => {\n Main.togglePluginActivation(name)\n }\n\n if (plugin.isActive()) {\n item.classList.add(\"active\")\n }\n\n item.textContent = name\n\n this.itemsActions.set(item, action)\n this.itemsDisposables.set(\n item,\n this.addDisposableEventListener(item, \"mousedown\", (e) => {\n e.preventDefault()\n action()\n })\n )\n\n this.plugins[name] = item\n this.list.insertBefore(item, this.separator)\n\n if (!(this.selectedItem != null)) {\n this.selectedItem = item\n this.selectedItem.classList.add(\"selected\")\n }\n }\n\n removeItemFor(name, plugin) {\n try {\n this.list.removeChild(this.plugins[name])\n } catch (error) {}\n\n delete this.plugins[name]\n }\n\n activateItem(name, plugin) {\n this.plugins[name].classList.add(\"active\")\n }\n\n deactivateItem(name, plugin) {\n this.plugins[name].classList.remove(\"active\")\n }\n}\n\nMinimapQuickSettingsElement.initClass()\n\nexport function createMinimapQuickSettingsElement() {\n const element = document.createElement(TAG_NAME)\n element.createdCallback()\n return element\n}\n","\"use strict\"\n\nimport { Emitter, CompositeDisposable, Disposable } from \"atom\"\nimport Decoration from \"./decoration\"\nimport StableAdapter from \"./adapters/stable-adapter\"\nimport { editorsMinimaps } from \"./main\"\n\nlet nextModelId = 1\n\n// returned in the decorations API when minimap is destoryed\nconst disposedDisposable = new Disposable()\ndisposedDisposable.dispose()\nconst markerMock = {\n onDidDestroy: () => disposedDisposable,\n getScreenRange: () => new Range(),\n}\nconst dummyDecoration = new Decoration(markerMock, null, {})\n\n/**\n * The Minimap class is the underlying model of a . Most manipulations of the minimap is done through the model.\n *\n * Any Minimap instance is tied to a `TextEditor`. Their lifecycle follow the one of their target `TextEditor`, so they\n * are destroyed whenever their `TextEditor` is destroyed.\n */\nexport default class Minimap {\n /**\n * Creates a new Minimap instance for the given `TextEditor`.\n *\n * @param {Object} options An object with the new Minimap properties\n * @param {TextEditor} options.textEditor The target text editor for the minimap\n * @param {boolean} [options.standAlone] Whether this minimap is in stand-alone mode or not\n * @param {number} [options.width] The minimap width in pixels\n * @param {number} [options.height] The minimap height in pixels\n * @throws {Error} Cannot create a minimap without an editor\n */\n constructor(options = {}) {\n if (!options.textEditor) {\n throw new Error(\"Cannot create a minimap without an editor\")\n }\n\n /**\n * The Minimap's minimapElement.\n *\n * @type {MinimapElement}\n * @access private\n */\n this.minimapElement = undefined\n\n // local cache of this.minimapElement.DecorationManagement\n this.DecorationManagement = undefined\n\n /**\n * The Minimap's text editor.\n *\n * @type {TextEditor}\n * @access private\n */\n this.textEditor = options.textEditor\n\n /**\n * The Minimap's text editor element.\n *\n * @access private\n */\n this.editorElement = undefined\n\n /**\n * The stand-alone state of the current Minimap.\n *\n * @type {boolean}\n * @access private\n */\n this.standAlone = options.standAlone\n /**\n * The width of the current Minimap.\n *\n * @type {number}\n * @access private\n */\n this.width = options.width\n /**\n * The height of the current Minimap.\n *\n * @type {number}\n * @access private\n */\n this.height = options.height\n /**\n * The id of the current Minimap.\n *\n * @type {Number}\n * @access private\n */\n this.id = nextModelId++\n /**\n * The events emitter of the current Minimap.\n *\n * @type {Emitter}\n * @access private\n */\n this.emitter = new Emitter()\n /**\n * The Minimap's subscriptions.\n *\n * @type {CompositeDisposable}\n * @access private\n */\n this.subscriptions = new CompositeDisposable()\n /**\n * The adapter object leverage the access to several properties from the `TextEditor`/`TextEditorElement` to support\n * the different APIs between different version of Atom.\n *\n * @type {Object}\n * @access private\n */\n this.adapter = null\n /**\n * The char height of the current Minimap, will be `undefined` unless `setCharWidth` is called.\n *\n * @type {number}\n * @access private\n */\n this.charHeight = null\n /**\n * The char height from the package's configuration. Will be overriden by the instance value.\n *\n * @type {number}\n * @access private\n */\n this.configCharHeight = null\n /**\n * The char width of the current Minimap, will be `undefined` unless `setCharWidth` is called.\n *\n * @type {number}\n * @access private\n */\n this.charWidth = null\n /**\n * The char width from the package's configuration. Will be overriden by the instance value.\n *\n * @type {number}\n * @access private\n */\n this.configCharWidth = null\n /**\n * The interline of the current Minimap, will be `undefined` unless `setCharWidth` is called.\n *\n * @type {number}\n * @access private\n */\n this.interline = null\n /**\n * The interline from the package's configuration. Will be overriden by the instance value.\n *\n * @type {number}\n * @access private\n */\n this.configInterline = null\n /**\n * The devicePixelRatioRounding of the current Minimap, will be `undefined` unless `setDevicePixelRatioRounding` is called.\n *\n * @type {boolean}\n * @access private\n */\n this.devicePixelRatioRounding = null\n /**\n * The devicePixelRatioRounding from the package's configuration. Will be overriden by the instance value.\n *\n * @type {boolean}\n * @access private\n */\n this.configDevicePixelRatioRounding = null\n /**\n * A number of milliseconds which determines how often the minimap should redraw itself after detecting changes in\n * the text editor. A value of 0 will cause the minimap to redraw immediately.\n *\n * @type {number}\n * @access private\n */\n this.redrawDelay = 0\n /**\n * A boolean value to store whether this Minimap have been destroyed or not.\n *\n * @type {boolean}\n * @access private\n */\n this.destroyed = false\n /**\n * A boolean value to store whether the `scrollPastEnd` setting is enabled or not.\n *\n * @type {boolean}\n * @access private\n */\n this.scrollPastEnd = false\n\n /**\n * An array of changes registered with textEditor.onDidChange() which have not yet been handled\n *\n * @type {Array}\n * @access private\n */\n this.pendingChangeEvents = []\n\n /**\n * Timer reference which, once fired, will flush all the pending changes stored in this.pendingChangeEvents array.\n *\n * @type {Timer | null}\n * @access private\n */\n this.flushChangesTimer = null\n\n if (atom.views.getView(this.textEditor).getScrollTop != null) {\n this.adapter = new StableAdapter(this.textEditor)\n }\n\n /**\n * When in stand-alone or independent scrolling mode, this value can be used instead of the computed scroll.\n *\n * @type {number}\n * @access private\n */\n this.scrollTop = 0\n\n let configSubscription = this.subscribeToConfig()\n\n this.subscriptions.add(\n configSubscription,\n\n this.textEditor.onDidChangeGrammar(() => {\n this.subscriptions.remove(configSubscription)\n configSubscription.dispose()\n\n configSubscription = this.subscribeToConfig()\n this.subscriptions.add(configSubscription)\n }),\n\n this.adapter.onDidChangeScrollTop(() => {\n if (!this.standAlone && !this.ignoreTextEditorScroll && !this.inChangeScrollTop) {\n this.inChangeScrollTop = true\n this.updateScrollTop()\n this.emitter.emit(\"did-change-scroll-top\", this)\n this.inChangeScrollTop = false\n }\n\n if (this.ignoreTextEditorScroll) {\n this.ignoreTextEditorScroll = false\n }\n }),\n\n this.adapter.onDidChangeScrollLeft(() => {\n if (!this.standAlone) {\n this.emitter.emit(\"did-change-scroll-left\", this)\n }\n }),\n\n this.textEditor.onDidChange((changes) => {\n this.scheduleChanges(changes)\n }),\n\n this.textEditor.onDidDestroy(() => {\n if (editorsMinimaps) {\n editorsMinimaps.delete(this.textEditor)\n }\n this.destroy()\n }),\n\n /*\n FIXME Some changes occuring during the tokenization produces\n ranges that deceive the canvas rendering by making some\n lines at the end of the buffer intact while they are in fact not,\n resulting in extra lines appearing at the end of the minimap.\n Forcing a whole repaint to fix that bug is suboptimal but works.\n */\n this.textEditor.onDidTokenize(() => {\n this.emitter.emit(\"did-change-config\")\n })\n )\n }\n\n /** Destroys the model. */\n destroy() {\n if (this.destroyed) {\n return\n }\n\n clearTimeout(this.flushChangesTimer)\n this.pendingChangeEvents = []\n this.subscriptions.dispose()\n this.emitter.emit(\"did-destroy\")\n this.emitter.dispose()\n this.destroyed = true\n }\n\n /**\n * Returns `true` when this `Minimap` has benn destroyed.\n *\n * @returns {boolean} Whether this Minimap has been destroyed or not\n */\n isDestroyed() {\n return this.destroyed\n }\n\n /**\n * Schedule changes from textEditor.onDidChange() to be handled at a later time\n *\n * @param {Array} changes The changes to be scheduled\n * @returns Void\n * @access private\n */\n scheduleChanges(changes) {\n this.pendingChangeEvents = this.pendingChangeEvents.concat(changes)\n\n // Optimisation: If the redraw delay is set to 0, do not even schedule a timer\n if (!this.redrawDelay) {\n this.requestFlushChanges()\n }\n\n if (!this.flushChangesTimer) {\n // If any changes happened within the timeout's delay, a timeout will already have been\n // scheduled -> no need to schedule again\n this.flushChangesTimer = setTimeout(() => {\n this.requestFlushChanges()\n }, this.redrawDelay)\n }\n }\n\n /**\n * Flush all changes which have been scheduled for later processing by this.scheduleChanges()\n *\n * @returns Void\n * @access private\n */\n flushChanges() {\n clearTimeout(this.flushChangesTimer)\n this.flushChangesTimer = null\n this.emitChanges(this.pendingChangeEvents)\n this.pendingChangeEvents = []\n }\n\n /**\n * Requests flush changes if not already requested\n *\n * @returns Void\n * @access private\n */\n requestFlushChanges() {\n if (!this.requestedFlushChanges) {\n this.requestedFlushChanges = requestAnimationFrame(() => {\n this.flushChanges()\n if (this.requestedFlushChanges) {\n cancelAnimationFrame(this.requestedFlushChanges)\n this.requestedFlushChanges = null\n }\n })\n }\n }\n\n /**\n * Registers an event listener to the `did-change` event.\n *\n * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be\n * called with an event object with the following properties:\n *\n * - Start: The change's start row number\n * - End: The change's end row number\n * - ScreenDelta: the delta in buffer rows between the versions before and after the change\n *\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChange(callback) {\n return this.emitter.on(\"did-change\", callback)\n }\n\n /**\n * Registers an event listener to the `did-change-config` event.\n *\n * @param {function():void} callback A function to call when the event is triggered.\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChangeConfig(callback) {\n return this.emitter.on(\"did-change-config\", callback)\n }\n\n /**\n * Registers an event listener to the `did-change-scroll-top` event.\n *\n * The event is dispatched when the text editor `scrollTop` value have been changed or when the minimap scroll top\n * have been changed in stand-alone mode.\n *\n * @param {function(minimap:Minimap):void} callback A function to call when the event is triggered. The current\n * Minimap is passed as argument to the callback.\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChangeScrollTop(callback) {\n return this.emitter.on(\"did-change-scroll-top\", callback)\n }\n\n /**\n * Registers an event listener to the `did-change-scroll-left` event.\n *\n * @param {function(minimap:Minimap):void} callback A function to call when the event is triggered. The current\n * Minimap is passed as argument to the callback.\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChangeScrollLeft(callback) {\n return this.emitter.on(\"did-change-scroll-left\", callback)\n }\n\n /**\n * Registers an event listener to the `did-change-stand-alone` event.\n *\n * This event is dispatched when the stand-alone of the current Minimap is either enabled or disabled.\n *\n * @param {function(minimap:Minimap):void} callback A function to call when the event is triggered. The current\n * Minimap is passed as argument to the callback.\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChangeStandAlone(callback) {\n return this.emitter.on(\"did-change-stand-alone\", callback)\n }\n\n /**\n * Registers an event listener to the `did-destroy` event.\n *\n * This event is dispatched when this Minimap have been destroyed. It can occurs either because the {@link destroy}\n * method have been called on the Minimap or because the target text editor have been destroyed.\n *\n * @param {function():void} callback A function to call when the event is triggered.\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidDestroy(callback) {\n return this.emitter.on(\"did-destroy\", callback)\n }\n\n /**\n * Registers to the config changes for the current editor scope.\n *\n * @returns {Disposable} The disposable to dispose all the registered events\n * @access private\n */\n subscribeToConfig() {\n const subs = new CompositeDisposable()\n const opts = { scope: this.textEditor.getRootScopeDescriptor() }\n\n subs.add(\n atom.config.observe(\"editor.scrollPastEnd\", opts, (scrollPastEnd) => {\n this.scrollPastEnd = scrollPastEnd\n this.adapter.scrollPastEnd = this.scrollPastEnd\n this.emitter.emit(\"did-change-config\")\n }),\n\n atom.config.observe(\"minimap.charHeight\", opts, (configCharHeight) => {\n this.configCharHeight = configCharHeight\n this.updateScrollTop()\n this.emitter.emit(\"did-change-config\")\n }),\n\n atom.config.observe(\"minimap.charWidth\", opts, (configCharWidth) => {\n this.configCharWidth = configCharWidth\n this.updateScrollTop()\n this.emitter.emit(\"did-change-config\")\n }),\n\n atom.config.observe(\"minimap.interline\", opts, (configInterline) => {\n this.configInterline = configInterline\n this.updateScrollTop()\n this.emitter.emit(\"did-change-config\")\n }),\n\n atom.config.observe(\"minimap.independentMinimapScroll\", opts, (independentMinimapScroll) => {\n this.independentMinimapScroll = independentMinimapScroll\n this.updateScrollTop()\n }),\n\n atom.config.observe(\"minimap.scrollSensitivity\", opts, (scrollSensitivity) => {\n this.scrollSensitivity = scrollSensitivity\n }),\n\n atom.config.observe(\"minimap.redrawDelay\", opts, (redrawDelay) => {\n this.redrawDelay = redrawDelay\n }),\n // cdprr is shorthand for configDevicePixelRatioRounding\n\n atom.config.observe(\"minimap.devicePixelRatioRounding\", opts, (cdprr) => {\n this.configDevicePixelRatioRounding = cdprr\n this.updateScrollTop()\n this.emitter.emit(\"did-change-config\")\n })\n )\n\n return subs\n }\n\n /**\n * Returns `true` when the current Minimap is a stand-alone minimap.\n *\n * @returns {boolean} Whether this Minimap is in stand-alone mode or not.\n */\n isStandAlone() {\n return this.standAlone\n }\n\n /**\n * Sets the stand-alone mode for this minimap.\n *\n * @fires {did-change-stand-alone} if The stand-alone mode have been toggled on or off by the call\n * @param {boolean} standAlone The new state of the stand-alone mode for this Minimap\n */\n setStandAlone(standAlone) {\n if (standAlone !== this.standAlone) {\n this.standAlone = standAlone\n this.emitter.emit(\"did-change-stand-alone\", this)\n }\n }\n\n /** @returns {MinimapElement} Returns the current minimapElement */\n getMinimapElement() {\n return this.minimapElement\n }\n\n /**\n * Returns the `TextEditor` that this minimap represents.\n *\n * @returns {TextEditor} This Minimap's text editor\n */\n getTextEditor() {\n return this.textEditor\n }\n\n /**\n * Returns the `TextEditorElement` for the Minimap's `TextEditor`.\n *\n * @returns {TextEditorElement} The minimap's text editor element\n */\n getTextEditorElement() {\n if (this.editorElement) {\n return this.editorElement\n }\n\n this.editorElement = atom.views.getView(this.getTextEditor())\n return this.editorElement\n }\n\n /**\n * Returns the height of the `TextEditor` at the Minimap scale.\n *\n * @returns {number} The scaled height of the text editor\n */\n getTextEditorScaledHeight() {\n return this.adapter.getHeight() * this.getVerticalScaleFactor()\n }\n\n /**\n * Returns the `TextEditor` scroll top value at the Minimap scale.\n *\n * @returns {number} The scaled scroll top of the text editor\n */\n getTextEditorScaledScrollTop() {\n return this.adapter.getScrollTop() * this.getVerticalScaleFactor()\n }\n\n /**\n * Returns the `TextEditor` scroll left value at the Minimap scale.\n *\n * @returns {number} The scaled scroll left of the text editor\n */\n getTextEditorScaledScrollLeft() {\n return this.adapter.getScrollLeft() * this.getHorizontalScaleFactor()\n }\n\n /**\n * Returns the `TextEditor` maximum scroll top value.\n *\n * When the `scrollPastEnd` setting is enabled, the method compensate the extra scroll by removing the same height as\n * added by the editor from the final value.\n *\n * @returns {number} The maximum scroll top of the text editor\n */\n getTextEditorMaxScrollTop() {\n return this.adapter.getMaxScrollTop()\n }\n\n /**\n * Returns the `TextEditor` scroll top value.\n *\n * @returns {number} The scroll top of the text editor\n */\n getTextEditorScrollTop() {\n return this.adapter.getScrollTop()\n }\n\n /**\n * Sets the scroll top of the `TextEditor`.\n *\n * @param {number} scrollTop The new scroll top value\n */\n setTextEditorScrollTop(scrollTop, ignoreTextEditorScroll = false) {\n this.ignoreTextEditorScroll = ignoreTextEditorScroll\n this.adapter.setScrollTop(scrollTop)\n }\n\n /**\n * Returns the `TextEditor` scroll left value.\n *\n * @returns {number} The scroll left of the text editor\n */\n getTextEditorScrollLeft() {\n return this.adapter.getScrollLeft()\n }\n\n /**\n * Returns the height of the `TextEditor`.\n *\n * @returns {number} The height of the text editor\n */\n getTextEditorHeight() {\n return this.adapter.getHeight()\n }\n\n /**\n * Returns the `TextEditor` scroll as a value normalized between `0` and `1`.\n *\n * When the `scrollPastEnd` setting is enabled the value may exceed `1` as the maximum scroll value used to compute\n * this ratio compensate for the extra height in the editor. **Use {@link getCapedTextEditorScrollRatio} when you need\n * a value that is strictly between `0` and `1`.**\n *\n * @returns {number} The scroll ratio of the text editor\n */\n getTextEditorScrollRatio() {\n return this.adapter.getScrollTop() / (this.getTextEditorMaxScrollTop() || 1)\n }\n\n /**\n * Returns the `TextEditor` scroll as a value normalized between `0` and `1`.\n *\n * The returned value will always be strictly between `0` and `1`.\n *\n * @returns {number} The scroll ratio of the text editor strictly between 0 and 1\n */\n getCapedTextEditorScrollRatio() {\n return Math.min(1, this.getTextEditorScrollRatio())\n }\n\n /**\n * Returns the height of the whole minimap in pixels based on the `minimap` settings.\n *\n * @returns {number} The height of the minimap\n */\n getHeight() {\n const additionalHeight = this.scrollPastEnd ? this.textEditor.getRowsPerPage() : 0\n return (this.textEditor.getScreenLineCount() + additionalHeight) * this.getLineHeight()\n }\n\n /**\n * Returns the width of the whole minimap in pixels based on the `minimap` settings.\n *\n * @returns {number} The width of the minimap\n */\n getWidth() {\n return this.textEditor.getMaxScreenLineLength() * this.getCharWidth()\n }\n\n /**\n * Returns the height the Minimap content will take on screen.\n *\n * When the Minimap height is greater than the `TextEditor` height, the `TextEditor` height is returned instead.\n *\n * @returns {number} The visible height of the Minimap\n */\n getVisibleHeight() {\n return Math.min(this.getScreenHeight(), this.getHeight())\n }\n\n /**\n * Returns the height the minimap should take once displayed, it's either the height of the `TextEditor` or the\n * provided `height` when in stand-alone mode.\n *\n * @returns {number} The total height of the Minimap\n */\n getScreenHeight() {\n if (this.isStandAlone()) {\n if (this.height != null) {\n return this.height\n } else {\n return this.getHeight()\n }\n } else {\n return this.adapter.getHeight()\n }\n }\n\n /**\n * Returns the width the whole Minimap will take on screen.\n *\n * @returns {number} The width of the Minimap when displayed\n */\n getVisibleWidth() {\n return Math.min(this.getScreenWidth(), this.getWidth())\n }\n\n /**\n * Returns the width the Minimap should take once displayed, it's either the width of the Minimap content or the\n * provided `width` when in standAlone mode.\n *\n * @returns {number} The Minimap screen width\n */\n getScreenWidth() {\n if (this.isStandAlone() && this.width != null) {\n return this.width\n } else {\n return this.getWidth()\n }\n }\n\n /**\n * Sets the preferred height and width when in stand-alone mode.\n *\n * This method is called by the for this Minimap so that the model is kept in sync with the view.\n *\n * @param {number} height The new height of the Minimap\n * @param {number} width The new width of the Minimap\n */\n setScreenHeightAndWidth(height, width) {\n if (this.width !== width || this.height !== height) {\n this.height = height\n this.width = width\n this.updateScrollTop()\n }\n }\n\n /**\n * Returns the vertical scaling factor when converting coordinates from the `TextEditor` to the Minimap.\n *\n * @returns {number} The Minimap vertical scaling factor\n */\n getVerticalScaleFactor() {\n return this.getLineHeight() / this.textEditor.getLineHeightInPixels()\n }\n\n /**\n * Returns the horizontal scaling factor when converting coordinates from the `TextEditor` to the Minimap.\n *\n * @returns {number} The Minimap horizontal scaling factor\n */\n getHorizontalScaleFactor() {\n return this.getCharWidth() / this.textEditor.getDefaultCharWidth()\n }\n\n /**\n * Returns the height of a line in the Minimap in pixels.\n *\n * @returns {number} A line's height in the Minimap\n */\n getLineHeight() {\n return this.getCharHeight() + this.getInterline()\n }\n\n /**\n * Returns the width of a character in the Minimap in pixels.\n *\n * @returns {number} A character's width in the Minimap\n */\n getCharWidth() {\n if (this.charWidth != null) {\n return this.charWidth\n } else {\n return this.configCharWidth\n }\n }\n\n /**\n * Sets the char width for this Minimap. This value will override the value from the config for this instance only. A\n * `did-change-config` event is dispatched.\n *\n * @fires {did-change-config} when The value is changed\n * @param {number} charWidth The new width of a char in the Minimap\n */\n setCharWidth(charWidth) {\n this.charWidth = Math.floor(charWidth)\n this.emitter.emit(\"did-change-config\")\n }\n\n /**\n * Returns the height of a character in the Minimap in pixels.\n *\n * @returns {number} A character's height in the Minimap\n */\n getCharHeight() {\n if (this.charHeight != null) {\n return this.charHeight\n } else {\n return this.configCharHeight\n }\n }\n\n /**\n * Sets the char height for this Minimap. This value will override the value from the config for this instance only. A\n * `did-change-config` event is dispatched.\n *\n * @fires {did-change-config} when The value is changed\n * @param {number} charHeight The new height of a char in the Minimap\n */\n setCharHeight(charHeight) {\n this.charHeight = Math.floor(charHeight)\n this.emitter.emit(\"did-change-config\")\n }\n\n /**\n * Returns the height of an interline in the Minimap in pixels.\n *\n * @returns {number} The interline's height in the Minimap\n */\n getInterline() {\n if (this.interline != null) {\n return this.interline\n } else {\n return this.configInterline\n }\n }\n\n /**\n * Sets the interline height for this Minimap. This value will override the value from the config for this instance\n * only. A `did-change-config` event is dispatched.\n *\n * @fires {did-change-config} when The value is changed\n * @param {number} interline The new height of an interline in the Minimap\n */\n setInterline(interline) {\n this.interline = Math.floor(interline)\n this.emitter.emit(\"did-change-config\")\n }\n\n /**\n * Returns the status of devicePixelRatioRounding in the Minimap.\n *\n * @returns {boolean} The devicePixelRatioRounding status in the Minimap\n */\n getDevicePixelRatioRounding() {\n if (this.devicePixelRatioRounding != null) {\n return this.devicePixelRatioRounding\n } else {\n return this.configDevicePixelRatioRounding\n }\n }\n\n /**\n * Sets the devicePixelRatioRounding status for this Minimap. This value will override the value from the config for\n * this instance only. A `did-change-config` event is dispatched.\n *\n * @fires {did-change-config} when The value is changed\n * @param {boolean} devicePixelRatioRounding The new status of devicePixelRatioRounding in the Minimap\n */\n setDevicePixelRatioRounding(devicePixelRatioRounding) {\n this.devicePixelRatioRounding = devicePixelRatioRounding\n this.emitter.emit(\"did-change-config\")\n }\n\n /**\n * Returns the devicePixelRatio in the Minimap in pixels.\n *\n * @returns {number} The devicePixelRatio in the Minimap\n */\n getDevicePixelRatio() {\n if (this.getDevicePixelRatioRounding()) {\n if (devicePixelRatio >= 1) {\n return Math.round(devicePixelRatio)\n } else {\n return Math.max(Math.round(devicePixelRatio * 10) / 10, 0.1)\n }\n }\n return devicePixelRatio\n }\n\n /**\n * Returns the index of the first visible row in the Minimap.\n *\n * @returns {number} The index of the first visible row\n */\n getFirstVisibleScreenRow() {\n return Math.floor(this.getScrollTop() / this.getLineHeight())\n }\n\n /**\n * Returns the index of the last visible row in the Minimap.\n *\n * @returns {number} The index of the last visible row\n */\n getLastVisibleScreenRow() {\n return Math.ceil((this.getScrollTop() + this.getScreenHeight()) / this.getLineHeight())\n }\n\n /**\n * Returns true when the `independentMinimapScroll` setting have been enabled.\n *\n * @returns {boolean} Whether the minimap can scroll independently\n */\n scrollIndependentlyOnMouseWheel() {\n return this.independentMinimapScroll\n }\n\n /**\n * Returns the current scroll of the Minimap.\n *\n * The Minimap can scroll only when its height is greater that the height of its `TextEditor`.\n *\n * @returns {number} The scroll top of the Minimap\n */\n getScrollTop() {\n return this.standAlone || this.independentMinimapScroll ? this.scrollTop : this.getScrollTopFromEditor()\n }\n\n /**\n * Sets the minimap scroll top value when in stand-alone mode.\n *\n * @fires {did-change-scroll-top} if The Minimap's stand-alone mode is enabled\n * @param {number} scrollTop The new scroll top for the Minimap\n */\n setScrollTop(scrollTop) {\n this.scrollTop = Math.max(0, Math.min(this.getMaxScrollTop(), scrollTop))\n\n if (this.standAlone || this.independentMinimapScroll) {\n this.emitter.emit(\"did-change-scroll-top\", this)\n }\n }\n\n /**\n * Returns the minimap scroll as a ration between 0 and 1.\n *\n * @returns {number} The minimap scroll ratio\n */\n getScrollRatio() {\n return this.getScrollTop() / this.getMaxScrollTop()\n }\n\n /**\n * Updates the scroll top value with the one computed from the text editor when the minimap is in the independent\n * scrolling mode.\n *\n * @access private\n */\n updateScrollTop() {\n if (this.independentMinimapScroll) {\n try {\n this.setScrollTop(this.getScrollTopFromEditor())\n } catch (err) {}\n this.emitter.emit(\"did-change-scroll-top\", this)\n }\n }\n\n /**\n * Returns the scroll top as computed from the text editor scroll top.\n *\n * @returns {number} The computed scroll top value\n */\n getScrollTopFromEditor() {\n return Math.abs(this.getCapedTextEditorScrollRatio() * this.getMaxScrollTop())\n }\n\n /**\n * Returns the maximum scroll value of the Minimap.\n *\n * @returns {number} The maximum scroll top for the Minimap\n */\n getMaxScrollTop() {\n return Math.max(0, this.getHeight() - this.getScreenHeight())\n }\n\n /**\n * Returns `true` when the Minimap can scroll.\n *\n * @returns {boolean} Whether this Minimap can scroll or not\n */\n canScroll() {\n return this.getMaxScrollTop() > 0\n }\n\n /**\n * Updates the minimap scroll top value using a mouse event when the independent scrolling mode is enabled\n *\n * @param {MouseEvent} event The mouse wheel event\n * @access private\n */\n onMouseWheel(event) {\n if (this.scrollIndependentlyOnMouseWheel()) {\n event.stopPropagation()\n\n if (!this.canScroll()) {\n return\n }\n\n const { wheelDeltaY } = event\n const previousScrollTop = this.getScrollTop()\n const updatedScrollTop = previousScrollTop - Math.round(wheelDeltaY * this.scrollSensitivity)\n\n this.setScrollTop(updatedScrollTop)\n }\n }\n\n /**\n * Delegates to `TextEditor#getMarker`.\n *\n * @access private\n */\n getMarker(id) {\n return this.textEditor.getMarker(id)\n }\n\n /**\n * Delegates to `TextEditor#findMarkers`.\n *\n * @access private\n */\n findMarkers(o) {\n try {\n return this.textEditor.findMarkers(o)\n } catch (error) {\n return []\n }\n }\n\n /**\n * Delegates to `TextEditor#markBufferRange`.\n *\n * @access private\n */\n markBufferRange(range) {\n return this.textEditor.markBufferRange(range)\n }\n\n /**\n * Emits a change events with the passed-in changes as data.\n *\n * @param {Object} changes A change to dispatch\n * @access private\n */\n emitChanges(changes) {\n this.emitter.emit(\"did-change\", changes)\n }\n\n /**\n * Enables the cache at the adapter level to avoid consecutive access to the text editor API during a render phase.\n *\n * @access private\n */\n enableCache() {\n this.adapter.enableCache()\n }\n\n /**\n * Disable the adapter cache.\n *\n * @access private\n */\n clearCache() {\n this.adapter.clearCache()\n }\n\n editorDestroyed() {\n this.adapter.editorDestroyed()\n }\n\n /**\n * Get the DecorationManagement API for the current minimapElement\n *\n * @returns {DecorationManagement | undefined}\n */\n getDecorationManagement() {\n if (!this.DecorationManagement) {\n if (this.minimapElement?.DecorationManagement) {\n this.DecorationManagement = this.minimapElement.DecorationManagement\n }\n }\n return this.DecorationManagement\n }\n\n // Decoration API duplicated for backward compatibility in the service\n getDecorations() {\n return this.getDecorationManagement()?.getDecorations() ?? []\n }\n onDidAddDecoration(...args) {\n return this.getDecorationManagement()?.onDidAddDecoration(...args) ?? disposedDisposable\n }\n onDidRemoveDecoration(...args) {\n return this.getDecorationManagement()?.onDidRemoveDecoration(...args) ?? disposedDisposable\n }\n onDidChangeDecorationRange(...args) {\n return this.getDecorationManagement()?.onDidChangeDecorationRange(...args) ?? disposedDisposable\n }\n onDidUpdateDecoration(...args) {\n return this.getDecorationManagement()?.onDidUpdateDecoration(...args) ?? disposedDisposable\n }\n decorationForId(...args) {\n return this.getDecorationManagement()?.decorationForId(...args) ?? dummyDecoration\n }\n decorationsForScreenRowRange(...args) {\n return this.getDecorationManagement()?.decorationsForScreenRowRange(...args) ?? dummyDecoration\n }\n decorationsByTypeThenRows() {\n return this.getDecorationManagement()?.decorationsByTypeThenRows() ?? dummyDecoration\n }\n decorateMarker(...args) {\n return this.getDecorationManagement()?.decorateMarker(...args) ?? dummyDecoration\n }\n removeDecoration(...args) {\n return this.getDecorationManagement()?.removeDecoration(...args)\n }\n removeAllDecorationsForMarker(...args) {\n return this.getDecorationManagement()?.removeAllDecorationsForMarker(...args)\n }\n removeAllDecorations() {\n return this.getDecorationManagement()?.removeAllDecorations()\n }\n}\n","\"use strict\"\n\n/** @access private */\nexport default class StableAdapter {\n constructor(textEditor) {\n this.textEditor = textEditor\n this.textEditorElement = atom.views.getView(this.textEditor)\n }\n\n enableCache() {\n this.useCache = true\n }\n\n clearCache() {\n this.useCache = false\n delete this.heightCache\n delete this.scrollTopCache\n delete this.scrollLeftCache\n delete this.maxScrollTopCache\n }\n\n onDidChangeScrollTop(callback) {\n return this.textEditorElement.onDidChangeScrollTop(callback)\n }\n\n onDidChangeScrollLeft(callback) {\n return this.textEditorElement.onDidChangeScrollLeft(callback)\n }\n\n getHeight() {\n if (this.editorDestroyed()) {\n return 0\n }\n\n if (this.useCache) {\n if (!this.heightCache) {\n this.heightCache = this.textEditorElement.getHeight()\n }\n return this.heightCache\n }\n return this.textEditorElement.getHeight()\n }\n\n getScrollTop() {\n if (this.editorDestroyed()) {\n return 0\n }\n\n if (this.useCache) {\n if (!this.scrollTopCache) {\n this.scrollTopCache = this.computeScrollTop()\n }\n return this.scrollTopCache\n }\n return this.computeScrollTop()\n }\n\n computeScrollTop() {\n if (this.editorDestroyed()) {\n return 0\n }\n\n const scrollTop = this.textEditorElement.getScrollTop()\n const lineHeight = this.textEditor.getLineHeightInPixels()\n let firstRow = this.textEditorElement.getFirstVisibleScreenRow()\n\n if (Number.isNaN(firstRow)) {\n // Guard against their being no visible screen row\n return 0\n }\n\n let lineTop = this.textEditorElement.pixelPositionForScreenPosition([firstRow, 0]).top\n\n if (lineTop > scrollTop) {\n firstRow -= 1\n lineTop = this.textEditorElement.pixelPositionForScreenPosition([firstRow, 0]).top\n }\n\n const lineY = firstRow * lineHeight\n const offset = Math.min(scrollTop - lineTop, lineHeight)\n return lineY + offset\n }\n\n setScrollTop(scrollTop) {\n if (this.editorDestroyed()) {\n return\n }\n\n this.textEditorElement.setScrollTop(scrollTop)\n }\n\n getScrollLeft() {\n if (this.editorDestroyed()) {\n return 0\n }\n\n if (this.useCache) {\n if (!this.scrollLeftCache) {\n this.scrollLeftCache = this.textEditorElement.getScrollLeft()\n }\n return this.scrollLeftCache\n }\n return this.textEditorElement.getScrollLeft()\n }\n\n getMaxScrollTop() {\n if (this.editorDestroyed()) {\n return 0\n }\n\n if (this.maxScrollTopCache != null && this.useCache) {\n return this.maxScrollTopCache\n }\n\n let maxScrollTop\n if (this.textEditorElement.getMaxScrollTop) {\n maxScrollTop = this.textEditorElement.getMaxScrollTop()\n\n if (parseFloat(atom.getVersion()) >= 1.13) {\n if (this.scrollPastEnd) {\n const lineHeight = this.textEditor.getLineHeightInPixels()\n maxScrollTop -= this.getHeight() - 3 * lineHeight\n }\n }\n } else {\n maxScrollTop = this.textEditorElement.getScrollHeight() - this.getHeight()\n\n if (this.scrollPastEnd) {\n const lineHeight = this.textEditor.getLineHeightInPixels()\n maxScrollTop -= this.getHeight() - 3 * lineHeight\n }\n }\n\n if (this.useCache) {\n this.maxScrollTopCache = maxScrollTop\n }\n\n return maxScrollTop\n }\n\n editorDestroyed() {\n return (\n !this.textEditor ||\n this.textEditor.isDestroyed() ||\n !this.textEditorElement.component ||\n !this.textEditorElement.getModel() ||\n !this.textEditorElement.parentNode\n )\n }\n}\n","{\n \"plugins\": {\n \"type\": \"object\",\n \"properties\": {}\n },\n \"autoToggle\": {\n \"title\": \"Show Minimap On Atom Start\",\n \"type\": \"boolean\",\n \"default\": true,\n \"order\": 1\n },\n \"displayMinimapOnLeft\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"order\": 2\n },\n \"displayCodeHighlights\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"description\": \"Toggles the render of the buffer tokens in the minimap.\",\n \"order\": 3\n },\n \"displayPluginsControls\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"description\": \"You need to restart Atom for this setting to be effective.\",\n \"order\": 4\n },\n \"minimapScrollIndicator\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"description\": \"Toggles the display of a side line showing which part of the buffer is currently displayed by the minimap. This side line will only appear if the minimap is taller than the editor view height.\",\n \"order\": 5\n },\n \"adjustMinimapWidthToSoftWrap\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"description\": \"If this option is enabled and Soft Wrap is checked then the Minimap max width is set to the Preferred Line Length value.\",\n \"order\": 6\n },\n \"adjustMinimapWidthOnlyIfSmaller\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"description\": \"If this option and `adjustMinimapWidthToSoftWrap` are enabled the minimap width will never go past the limit sets by CSS. On the other hand, when disabled the minimap will expand to honor the preferred line width.\",\n \"order\": 7\n },\n \"ignoreWhitespacesInTokens\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"When enabled, text editor tokens are rendered as plain blocks, with no regards to the whitespaces they contains.\",\n \"order\": 8\n },\n \"charWidth\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0.5,\n \"order\": 9\n },\n \"charHeight\": {\n \"type\": \"number\",\n \"default\": 2,\n \"minimum\": 0.5,\n \"order\": 10\n },\n \"interline\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0,\n \"description\": \"The space between lines in the minimap in pixels.\",\n \"order\": 11\n },\n \"textOpacity\": {\n \"type\": \"number\",\n \"default\": 0.6,\n \"minimum\": 0,\n \"maximum\": 1,\n \"description\": \"The opacity used to render the line's text in the minimap.\",\n \"order\": 12\n },\n \"moveCursorOnMinimapClick\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"Moves the cursor to the beginning of the target line when clicking on the minimap\",\n \"order\": 13\n },\n \"independentMinimapScroll\": {\n \"type\": \"boolean\",\n \"title\": \"Independent Minimap Scroll On Mouse Wheel Events\",\n \"default\": false,\n \"description\": \"When enabled, using the mouse wheel over the Minimap will make it scroll independently of the text editor. The Minimap will still sync with the editor whenever the editor is scrolled, but it will no longer relay the mouse wheel events to the editor.\",\n \"order\": 14\n },\n \"scrollSensitivity\": {\n \"type\": \"number\",\n \"default\": 0.5,\n \"description\": \"The scrolling speed when the `Independent Minimap Scroll On Mouse Wheel Events` setting is enabled.\",\n \"order\": 15\n },\n \"smoothScrolling\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"Whether to offset the minimap canvas when scrolling to keep the scroll smooth. When `true` the minimap canvas will be offseted, resulting in a smoother scroll, but with the side-effect of a blurry minimap when the canvas is placed between pixels. When `false` the canvas will always stay at the same position, and will never look blurry, but the scroll will appear more jagged.\",\n \"order\": 16\n },\n \"createPluginInDevMode\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"order\": 17\n },\n \"absoluteMode\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"When enabled the text editor content will be able to flow below the minimap.\",\n \"order\": 18\n },\n \"adjustAbsoluteModeHeight\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"When enabled and `Absolute Mode` is also enabled, the minimap height will be adjusted to only take the space required by the text editor content, leaving the space below triggering mouse events on the text editor. **Be aware this can have some impact on performances as the minimap canvases will be resized every time a change in the editor make its height change.**\",\n \"order\": 19\n },\n \"redrawDelay\": {\n \"type\": \"number\",\n \"default\": 400,\n \"minimum\": 0,\n \"maximum\": 2000,\n \"description\": \"Controls how often (in ms) the minimap should redraw itself after changing the text editor's contents. Setting this to 100ms or higher could dramatically improve editor responsiveness when working with large files. A value of 0 will cause the minimap to redraw itself immediately on each change.\",\n \"order\": 20\n },\n \"devicePixelRatioRounding\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"description\": \"Toggles the rounding of the devicePixelRatio in the minimap.\",\n \"order\": 21\n },\n \"useHardwareAcceleration\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"order\": 22\n },\n \"scrollAnimation\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"Enables animations when scrolling by clicking on the minimap.\",\n \"order\": 23\n },\n \"scrollAnimationDuration\": {\n \"type\": \"integer\",\n \"default\": 300,\n \"description\": \"The duration of scrolling animations when clicking on the minimap.\",\n \"order\": 24\n },\n \"maxTokensInOneLine\": {\n \"type\": \"integer\",\n \"default\": 160,\n \"description\": \"The maximum number of tokens that are rendered for each line.\",\n \"order\": 25\n }\n}\n","\"use strict\"\n\nimport { CompositeDisposable } from \"atom\"\nimport { emitter, getConfigSchema } from \"./main\"\n\n/**\n * Provides methods to manage minimap plugins. Minimap plugins are Atom packages that will augment the minimap. They\n * have a secondary activation cycle going on constrained by the minimap package activation. A minimap plugin life cycle\n * will generally look like this:\n *\n * 1. The plugin module is activated by Atom through the `activate` method\n * 2. The plugin then register itself as a minimap plugin using `registerPlugin`\n * 3. The plugin is activated/deactivated according to the minimap settings.\n * 4. On the plugin module deactivation, the plugin must unregisters itself from the minimap using the `unregisterPlugin`.\n *\n * @access public\n */\n\n// Initialize the properties for plugin management.\n\n/**\n * The registered Minimap plugins stored using their name as key.\n *\n * @type {Object}\n * @access private\n */\nexport const plugins = {}\n/**\n * The plugins' subscriptions stored using the plugin names as keys.\n *\n * @type {Object}\n * @access private\n */\nconst pluginsSubscriptions = {}\n\n/**\n * A map that stores the display order for each plugin\n *\n * @type {Object}\n * @access private\n */\nconst pluginsOrderMap = {}\n\n/**\n * Registers a minimap `plugin` with the given `name`.\n *\n * @fires {did-add-plugin} with The name and a reference to the added plugin.\n * @fires {did-activate-plugin} if The plugin was activated during the registration.\n * @param {string} name The identifying name of the plugin. It will be used as activation settings name as well as the\n * key to unregister the module.\n * @param {MinimapPlugin} plugin The plugin to register.\n */\nexport function registerPlugin(name, plugin) {\n plugins[name] = plugin\n pluginsSubscriptions[name] = new CompositeDisposable()\n\n const event = { name, plugin }\n emitter.emit(\"did-add-plugin\", event)\n\n if (atom.config.get(\"minimap.displayPluginsControls\")) {\n registerPluginControls(name, plugin)\n }\n\n updatesPluginActivationState(name)\n}\n\n/**\n * Unregisters a plugin from the minimap.\n *\n * @fires {did-remove-plugin} with The name and a reference to the added plugin.\n * @param {string} name The identifying name of the plugin to unregister.\n */\nexport function unregisterPlugin(name) {\n const plugin = plugins[name]\n\n if (atom.config.get(\"minimap.displayPluginsControls\")) {\n unregisterPluginControls(name)\n }\n\n delete plugins[name]\n\n const event = { name, plugin }\n emitter.emit(\"did-remove-plugin\", event)\n}\n\n/**\n * Toggles the specified plugin activation state.\n *\n * @fires {did-activate-plugin} if The plugin was activated by the call.\n * @fires {did-deactivate-plugin} if The plugin was deactivated by the call.\n * @param {string} name The name of the plugin.\n * @param {boolean} boolean An optional boolean to set the activation state of the plugin. If ommitted the new plugin\n * state will be the the inverse of its current state.\n */\nexport function togglePluginActivation(name, boolean) {\n const settingsKey = `minimap.plugins.${name}`\n\n if (boolean !== undefined && boolean !== null) {\n atom.config.set(settingsKey, boolean)\n } else {\n atom.config.set(settingsKey, !atom.config.get(settingsKey))\n }\n\n updatesPluginActivationState(name)\n}\n\n/**\n * Deactivates all the plugins registered in the minimap package so far.\n *\n * @fires {did-deactivate-plugin} for Each plugin deactivated by the call.\n */\nexport function deactivateAllPlugins() {\n for (const [name, plugin] of eachPlugin()) {\n plugin.deactivatePlugin()\n emitter.emit(\"did-deactivate-plugin\", { name, plugin })\n }\n}\n\n/**\n * A generator function to iterate over registered plugins.\n *\n * @returns An iterable that yield the name and reference to every plugin as an array in each iteration.\n */\nfunction* eachPlugin() {\n for (const name in plugins) {\n yield [name, plugins[name]]\n }\n}\n\n/**\n * Updates the plugin activation state according to the current config.\n *\n * @fires {did-activate-plugin} if The plugin was activated by the call.\n * @fires {did-deactivate-plugin} if The plugin was deactivated by the call.\n * @param {string} name The identifying name of the plugin to update.\n * @access private\n */\nfunction updatesPluginActivationState(name) {\n const plugin = plugins[name]\n const pluginActive = plugin.isActive()\n const settingActive = atom.config.get(`minimap.plugins.${name}`)\n\n if (atom.config.get(\"minimap.displayPluginsControls\")) {\n if (settingActive && !pluginActive) {\n activatePlugin(name, plugin)\n } else if (pluginActive && !settingActive) {\n deactivatePlugin(name, plugin)\n }\n } else {\n if (!pluginActive) {\n activatePlugin(name, plugin)\n } else if (pluginActive) {\n deactivatePlugin(name, plugin)\n }\n }\n}\n\nexport function activatePlugin(name, plugin) {\n const event = { name, plugin }\n\n plugin.activatePlugin()\n emitter.emit(\"did-activate-plugin\", event)\n}\n\nexport function deactivatePlugin(name, plugin) {\n const event = { name, plugin }\n\n plugin.deactivatePlugin()\n emitter.emit(\"did-deactivate-plugin\", event)\n}\n\n/**\n * When the `minimap.displayPluginsControls` setting is toggled, this function will register the commands and setting to\n * manage the plugin activation from the minimap settings.\n *\n * @param {string} name The identifying name of the plugin.\n * @param {MinimapPlugin} plugin The plugin instance to register controls for.\n * @listens {minimap.plugins.${name}} listen to the setting to update\n * the plugin state accordingly.\n * @listens {minimap:toggle-${name}} listen to the command on `atom-workspace`\n * to toggle the plugin state.\n * @access private\n */\nfunction registerPluginControls(name, plugin) {\n const settingsKey = `minimap.plugins.${name}`\n const orderSettingsKey = `minimap.plugins.${name}DecorationsZIndex`\n\n const config = getConfigSchema()\n\n config.plugins.properties[name] = {\n type: \"boolean\",\n title: name,\n description: `Whether the ${name} plugin is activated and displayed in the Minimap.`,\n default: true,\n }\n\n config.plugins.properties[`${name}DecorationsZIndex`] = {\n type: \"integer\",\n title: `${name} decorations order`,\n description: `The relative order of the ${name} plugin's decorations in the layer into which they are drawn. Note that this order only apply inside a layer, so highlight-over decorations will always be displayed above line decorations as they are rendered in different layers.`,\n default: 0,\n }\n\n if (atom.config.get(settingsKey) === undefined) {\n atom.config.set(settingsKey, true)\n }\n\n if (atom.config.get(orderSettingsKey) === undefined) {\n atom.config.set(orderSettingsKey, 0)\n }\n\n pluginsSubscriptions[name].add(\n atom.config.observe(settingsKey, () => {\n updatesPluginActivationState(name)\n })\n )\n\n pluginsSubscriptions[name].add(\n atom.config.observe(orderSettingsKey, (order) => {\n updatePluginsOrderMap(name)\n const event = { name, plugin, order }\n emitter.emit(\"did-change-plugin-order\", event)\n })\n )\n\n pluginsSubscriptions[name].add(\n atom.commands.add(\"atom-workspace\", {\n [`minimap:toggle-${name}`]: () => {\n togglePluginActivation(name)\n },\n })\n )\n\n updatePluginsOrderMap(name)\n}\n\n/**\n * Updates the display order in the map for the passed-in plugin name.\n *\n * @param {string} name The name of the plugin to update\n * @access private\n */\nfunction updatePluginsOrderMap(name) {\n const orderSettingsKey = `minimap.plugins.${name}DecorationsZIndex`\n\n pluginsOrderMap[name] = atom.config.get(orderSettingsKey)\n}\n\n/**\n * Returns the plugins display order mapped by name.\n *\n * @returns {Object} The plugins order by name\n */\nexport function getPluginsOrder() {\n return pluginsOrderMap\n}\n\n/**\n * When the `minimap.displayPluginsControls` setting is toggled, this function will unregister the commands and setting\n * that was created previously.\n *\n * @param {string} name The identifying name of the plugin.\n * @access private\n */\nfunction unregisterPluginControls(name) {\n pluginsSubscriptions[name].dispose()\n delete pluginsSubscriptions[name]\n delete getConfigSchema().plugins.properties[name]\n}\n","// Functions used to recommend the configurations required for the best performance of Minimap\n\nexport function treeSitterWarning() {\n return observeAndWarn(\n \"core.useTreeSitterParsers\",\n true,\n \"Tree-sitter is off (Low Performance Warning).\",\n `You should turn on Atom's tree-sitter parser to experience the best performance Minimap and Atom are designed for.\n Keeping tree-sitter parser off results in sluggish scrolling and lags in the text editor.`\n )\n}\n\n/* Utility function that observes a config and throws warnings once a day if it is not the recommended value */\nfunction observeAndWarn(configName, recommendedValue, warningTitle, warningDescription) {\n return atom.config.observe(configName, (value) => {\n if (value !== recommendedValue) {\n const storageName = `Minimap.${configName}`\n const today = new Date()\n const previousWarning = window.localStorage.getItem(storageName)\n let previousWarningDay = null\n if (previousWarning) {\n previousWarningDay = new Date(Date.parse(previousWarning)).getDay()\n }\n // throw the warning once a day\n if (!previousWarningDay || (typeof previousWarningDay === \"number\" && previousWarningDay - today.getDay() >= 1)) {\n window.localStorage.setItem(storageName, today)\n\n const notification = atom.notifications.addWarning(warningTitle, {\n description: warningDescription,\n dismissable: true,\n buttons: [\n {\n text: `Set to ${recommendedValue} and restart Atom`,\n onDidClick() {\n atom.config.set(configName, true)\n notification.dismiss()\n window.localStorage.removeItem(storageName)\n setTimeout(() => {\n atom.reload()\n }, 1500)\n },\n },\n ],\n })\n }\n }\n })\n}\n","\"use strict\";\n/**\n * This class is used to read the styles informations (e.g. color and background-color) from the DOM to use when\n * rendering canvas. This is used in Minimap and Terminal It attaches a dummyNode to the targetNode, renders them, and\n * finds the computed style back.\n */\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.StyleReader = void 0;\n\nclass StyleReader {\n constructor() {\n this.domStylesCache = new Map();\n this.dummyNode = void 0;\n this.targetNode = void 0;\n }\n\n /** Set to true once tokenized */\n // private hasTokenizedOnce = false\n\n /**\n * Returns the computed values for the given property and scope in the DOM.\n *\n * This function insert a dummy element in the DOM to compute its style, return the specified property, and clear the\n * content of the dummy element.\n *\n * @param scopes A list of classes reprensenting the scope to build\n * @param property The name of the style property to compute\n * @param targetNode\n * @param getFromCache Whether to cache the computed value or not\n * @returns The computed property's value used in CanvasDrawer\n */\n retrieveStyleFromDom(scopes, property, targetNode, getFromCache = true) {\n if (scopes.length === 0) {\n return \"\";\n } // no scopes\n\n\n const key = scopes.join(\" \");\n let cachedData = this.domStylesCache.get(key);\n\n if (cachedData !== undefined) {\n if (getFromCache) {\n // if should get the value from the cache\n const value = cachedData[property];\n\n if (value !== undefined) {\n // value exists\n return value;\n } // value not in the cache - get fresh value\n\n } // don't use cache - get fresh value\n\n } else {\n // key did not exist. create it\n cachedData = {};\n }\n\n this.ensureDummyNodeExistence(targetNode);\n const dummyNode = this.dummyNode;\n let parent = dummyNode;\n\n for (let i = 0, len = scopes.length; i < len; i++) {\n const scope = scopes[i];\n const node = document.createElement(\"span\");\n node.className = scope.replace(dotRegexp, \" \"); // TODO why replace is needed?\n\n parent.appendChild(node);\n parent = node;\n }\n\n const style = window.getComputedStyle(parent);\n let value = style.getPropertyValue(property); // rotate hue if webkit-filter available\n\n const filter = style.getPropertyValue(\"-webkit-filter\");\n\n if (filter.includes(\"hue-rotate\")) {\n value = rotateHue(value, filter);\n }\n\n if (value !== \"\") {\n cachedData[property] = value;\n this.domStylesCache.set(key, cachedData);\n }\n\n dummyNode.innerHTML = \"\";\n return value;\n }\n /**\n * Creates a DOM node container for all the operations that need to read styles properties from DOM.\n *\n * @param targetNode\n */\n\n\n ensureDummyNodeExistence(targetNode) {\n if (this.targetNode !== targetNode || this.dummyNode === undefined) {\n this.dummyNode = document.createElement(\"span\");\n this.dummyNode.style.visibility = \"hidden\"; // attach to the target node\n\n targetNode.appendChild(this.dummyNode);\n this.targetNode = targetNode;\n }\n }\n /** Invalidates the cache by emptying the cache object. used in MinimapElement */\n\n\n invalidateDOMStylesCache() {\n this.domStylesCache.clear();\n }\n /** Invalidates the cache only for the first tokenization event. */\n\n /*\n private invalidateIfFirstTokenization () {\n if (this.hasTokenizedOnce) {\n return\n }\n this.invalidateDOMStylesCache()\n this.hasTokenizedOnce = true\n }\n */\n\n\n} // ## ## ######## ## ######## ######## ######## ######\n// ## ## ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ## ##\n// ######### ###### ## ######## ###### ######## ######\n// ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ## ##\n// ## ## ######## ######## ## ######## ## ## ######\n\n\nexports.StyleReader = StyleReader;\nconst dotRegexp = /\\.+/g;\nconst rgbExtractRegexp = /rgb(a?)\\((\\d+), (\\d+), (\\d+)(, (\\d+(\\.\\d+)?))?\\)/;\nconst hueRegexp = /hue-rotate\\((-?\\d+)deg\\)/;\n/**\n * Computes the output color of `value` with a rotated hue defined in `filter`.\n *\n * @param value The CSS color to apply the rotation on\n * @param filter The CSS hue rotate filter declaration\n * @returns The rotated CSS color\n */\n\nfunction rotateHue(value, filter) {\n const match = value.match(rgbExtractRegexp);\n\n if (match === null) {\n return \"\";\n }\n\n const [,, rStr, gStr, bStr,, aStr] = match;\n const hueMatch = filter.match(hueRegexp);\n\n if (hueMatch === null) {\n return \"\";\n }\n\n const [, hueStr] = hueMatch;\n let [r, g, b, a, hue] = [rStr, gStr, bStr, aStr, hueStr].map(Number);\n [r, g, b] = rotate(r, g, b, hue);\n\n if (isNaN(a)) {\n return `rgb(${r}, ${g}, ${b})`;\n } else {\n return `rgba(${r}, ${g}, ${b}, ${a})`;\n }\n}\n/**\n * Computes the hue rotation on the provided `r`, `g` and `b` channels by the amount of `angle`.\n *\n * @param r The red channel of the color to rotate\n * @param g The green channel of the color to rotate\n * @param b The blue channel of the color to rotate\n * @param angle The angle to rotate the hue with\n * @returns The rotated color channels\n */\n\n\nfunction rotate(r, g, b, angle) {\n const matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n const lumR = 0.2126;\n const lumG = 0.7152;\n const lumB = 0.0722;\n const hueRotateR = 0.143;\n const hueRotateG = 0.14;\n const hueRotateB = 0.283;\n const cos = Math.cos(angle * Math.PI / 180);\n const sin = Math.sin(angle * Math.PI / 180);\n matrix[0] = lumR + (1 - lumR) * cos - lumR * sin;\n matrix[1] = lumG - lumG * cos - lumG * sin;\n matrix[2] = lumB - lumB * cos + (1 - lumB) * sin;\n matrix[3] = lumR - lumR * cos + hueRotateR * sin;\n matrix[4] = lumG + (1 - lumG) * cos + hueRotateG * sin;\n matrix[5] = lumB - lumB * cos - hueRotateB * sin;\n matrix[6] = lumR - lumR * cos - (1 - lumR) * sin;\n matrix[7] = lumG - lumG * cos + lumG * sin;\n matrix[8] = lumB + (1 - lumB) * cos + lumB * sin;\n return [clamp(matrix[0] * r + matrix[1] * g + matrix[2] * b), clamp(matrix[3] * r + matrix[4] * g + matrix[5] * b), clamp(matrix[6] * r + matrix[7] * g + matrix[8] * b)];\n}\n\nfunction clamp(num) {\n return Math.ceil(Math.max(0, Math.min(255, num)));\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy1jb21tb25zLXVpL2RvbS1zdHlsZS1yZWFkZXIudHMiXSwibmFtZXMiOlsiU3R5bGVSZWFkZXIiLCJkb21TdHlsZXNDYWNoZSIsIk1hcCIsImR1bW15Tm9kZSIsInRhcmdldE5vZGUiLCJyZXRyaWV2ZVN0eWxlRnJvbURvbSIsInNjb3BlcyIsInByb3BlcnR5IiwiZ2V0RnJvbUNhY2hlIiwibGVuZ3RoIiwia2V5Iiwiam9pbiIsImNhY2hlZERhdGEiLCJnZXQiLCJ1bmRlZmluZWQiLCJ2YWx1ZSIsImV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hc1Rva2VuaXplZE9uY2UpIHtcbiAgICAgIHJldHVyblxuICAgIH1cbiAgICB0aGlzLmludmFsaWRhdGVET01TdHlsZXNDYWNoZSgpXG4gICAgdGhpcy5oYXNUb2tlbml6ZWRPbmNlID0gdHJ1ZVxuICB9XG4gICovXG59XG5cbi8vICAgICMjICAgICAjIyAjIyMjIyMjIyAjIyAgICAgICAjIyMjIyMjIyAgIyMjIyMjIyMgIyMjIyMjIyMgICAjIyMjIyNcbi8vICAgICMjICAgICAjIyAjIyAgICAgICAjIyAgICAgICAjIyAgICAgIyMgIyMgICAgICAgIyMgICAgICMjICMjICAgICMjXG4vLyAgICAjIyAgICAgIyMgIyMgICAgICAgIyMgICAgICAgIyMgICAgICMjICMjICAgICAgICMjICAgICAjIyAjI1xuLy8gICAgIyMjIyMjIyMjICMjIyMjIyAgICMjICAgICAgICMjIyMjIyMjICAjIyMjIyMgICAjIyMjIyMjIyAgICMjIyMjI1xuLy8gICAgIyMgICAgICMjICMjICAgICAgICMjICAgICAgICMjICAgICAgICAjIyAgICAgICAjIyAgICMjICAgICAgICAgIyNcbi8vICAgICMjICAgICAjIyAjIyAgICAgICAjIyAgICAgICAjIyAgICAgICAgIyMgICAgICAgIyMgICAgIyMgICMjICAgICMjXG4vLyAgICAjIyAgICAgIyMgIyMjIyMjIyMgIyMjIyMjIyMgIyMgICAgICAgICMjIyMjIyMjICMjICAgICAjIyAgIyMjIyMjXG5cbmNvbnN0IGRvdFJlZ2V4cCA9IC9cXC4rL2dcbmNvbnN0IHJnYkV4dHJhY3RSZWdleHAgPSAvcmdiKGE/KVxcKChcXGQrKSwgKFxcZCspLCAoXFxkKykoLCAoXFxkKyhcXC5cXGQrKT8pKT9cXCkvXG5jb25zdCBodWVSZWdleHAgPSAvaHVlLXJvdGF0ZVxcKCgtP1xcZCspZGVnXFwpL1xuXG4vKipcbiAqIENvbXB1dGVzIHRoZSBvdXRwdXQgY29sb3Igb2YgYHZhbHVlYCB3aXRoIGEgcm90YXRl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SBsdW1CKSAqIHNpblxuICBtYXRyaXhbM10gPSBsdW1SIC0gbHVtUiAqIGNvcyArIGh1ZVJvdGF0ZVIgKiBzaW5cbiAgbWF0cml4WzRdID0gbHVtRyArICgxIC0gbHVtRykgKiBjb3MgKyBodWVSb3RhdGVHICogc2luXG4gIG1hdHJpeFs1XSA9IGx1bUIgLSBsdW1CICogY29zIC0gaHVlUm90YXRlQiAqIHNpblxuICBtYXRyaXhbNl0gPSBsdW1SIC0gbHVtUiAqIGNvcyAtICgxIC0gbHVtUikgKiBzaW5cbiAgbWF0cml4WzddID0gbHVtRyAtIGx1bUcgKiBjb3MgKyBsdW1HICogc2luXG4gIG1hdHJpeFs4XSA9IGx1bUIgKyAoMSAtIGx1bUIpICogY29zICsgbHVtQiAqIHNpblxuXG4gIHJldHVybiBbXG4gICAgY2xhbXAobWF0cml4WzBdICogciArIG1hdHJpeFsxXSAqIGcgKyBtYXRyaXhbMl0gKiBiKSxcbiAgICBjbGFtcChtYXRyaXhbM10gKiByICsgbWF0cml4WzRdICogZyArIG1hdHJpeFs1XSAqIGIpLFxuICAgIGNsYW1wKG1hdHJpeFs2XSAqIHIgKyBtYXRyaXhbN10gKiBnICsgbWF0cml4WzhdICogYiksXG4gIF1cbn1cblxuZnVuY3Rpb24gY2xhbXAobnVtOiBudW1iZXIpIHtcbiAgcmV0dXJuIE1hdGguY2VpbChNYXRoLm1heCgwLCBNYXRoLm1pbigyNTUsIG51bSkpKVxufVxuIl19","\"use strict\"\n\n/**\n * This class is used to read the styles informations (e.g. color and background-color) from the DOM to use when\n * rendering canvas. This is used in Minimap and Terminal It attaches a dummyNode to the targetNode, renders them, and\n * finds the computed style back.\n */\nexport class StyleReader {\n /** The cache object */\n private domStylesCache = new Map>()\n\n private dummyNode?: HTMLElement\n\n /** Used to check if the dummyNode is on the current targetNode */\n private targetNode?: HTMLElement\n\n /** Set to true once tokenized */\n // private hasTokenizedOnce = false\n\n /**\n * Returns the computed values for the given property and scope in the DOM.\n *\n * This function insert a dummy element in the DOM to compute its style, return the specified property, and clear the\n * content of the dummy element.\n *\n * @param scopes A list of classes reprensenting the scope to build\n * @param property The name of the style property to compute\n * @param targetNode\n * @param getFromCache Whether to cache the computed value or not\n * @returns The computed property's value used in CanvasDrawer\n */\n retrieveStyleFromDom(\n scopes: string[],\n property: string,\n targetNode: HTMLElement,\n getFromCache: boolean = true\n ): string {\n if (scopes.length === 0) {\n return \"\"\n } // no scopes\n const key = scopes.join(\" \")\n let cachedData = this.domStylesCache.get(key)\n\n if (cachedData !== undefined) {\n if (getFromCache) {\n // if should get the value from the cache\n const value = cachedData[property]\n if (value !== undefined) {\n // value exists\n return value\n } // value not in the cache - get fresh value\n } // don't use cache - get fresh value\n } else {\n // key did not exist. create it\n cachedData = {}\n }\n\n this.ensureDummyNodeExistence(targetNode)\n const dummyNode = this.dummyNode as HTMLElement\n\n let parent = dummyNode\n for (let i = 0, len = scopes.length; i < len; i++) {\n const scope = scopes[i]\n const node = document.createElement(\"span\")\n node.className = scope.replace(dotRegexp, \" \") // TODO why replace is needed?\n parent.appendChild(node)\n parent = node\n }\n\n const style = window.getComputedStyle(parent)\n let value = style.getPropertyValue(property)\n\n // rotate hue if webkit-filter available\n const filter = style.getPropertyValue(\"-webkit-filter\")\n if (filter.includes(\"hue-rotate\")) {\n value = rotateHue(value, filter)\n }\n\n if (value !== \"\") {\n cachedData[property] = value\n this.domStylesCache.set(key, cachedData)\n }\n\n dummyNode.innerHTML = \"\"\n return value\n }\n\n /**\n * Creates a DOM node container for all the operations that need to read styles properties from DOM.\n *\n * @param targetNode\n */\n private ensureDummyNodeExistence(targetNode: HTMLElement) {\n if (this.targetNode !== targetNode || this.dummyNode === undefined) {\n this.dummyNode = document.createElement(\"span\")\n this.dummyNode.style.visibility = \"hidden\"\n\n // attach to the target node\n targetNode.appendChild(this.dummyNode)\n this.targetNode = targetNode\n }\n }\n\n /** Invalidates the cache by emptying the cache object. used in MinimapElement */\n invalidateDOMStylesCache() {\n this.domStylesCache.clear()\n }\n\n /** Invalidates the cache only for the first tokenization event. */\n /*\n private invalidateIfFirstTokenization () {\n if (this.hasTokenizedOnce) {\n return\n }\n this.invalidateDOMStylesCache()\n this.hasTokenizedOnce = true\n }\n */\n}\n\n// ## ## ######## ## ######## ######## ######## ######\n// ## ## ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ## ##\n// ######### ###### ## ######## ###### ######## ######\n// ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ## ##\n// ## ## ######## ######## ## ######## ## ## ######\n\nconst dotRegexp = /\\.+/g\nconst rgbExtractRegexp = /rgb(a?)\\((\\d+), (\\d+), (\\d+)(, (\\d+(\\.\\d+)?))?\\)/\nconst hueRegexp = /hue-rotate\\((-?\\d+)deg\\)/\n\n/**\n * Computes the output color of `value` with a rotated hue defined in `filter`.\n *\n * @param value The CSS color to apply the rotation on\n * @param filter The CSS hue rotate filter declaration\n * @returns The rotated CSS color\n */\nfunction rotateHue(value: string, filter: string): string {\n const match = value.match(rgbExtractRegexp)\n if (match === null) {\n return \"\"\n }\n const [, , rStr, gStr, bStr, , aStr] = match\n\n const hueMatch = filter.match(hueRegexp)\n if (hueMatch === null) {\n return \"\"\n }\n\n const [, hueStr] = hueMatch\n\n let [r, g, b, a, hue] = [rStr, gStr, bStr, aStr, hueStr].map(Number)\n ;[r, g, b] = rotate(r, g, b, hue)\n\n if (isNaN(a)) {\n return `rgb(${r}, ${g}, ${b})`\n } else {\n return `rgba(${r}, ${g}, ${b}, ${a})`\n }\n}\n\n/**\n * Computes the hue rotation on the provided `r`, `g` and `b` channels by the amount of `angle`.\n *\n * @param r The red channel of the color to rotate\n * @param g The green channel of the color to rotate\n * @param b The blue channel of the color to rotate\n * @param angle The angle to rotate the hue with\n * @returns The rotated color channels\n */\nfunction rotate(r: number, g: number, b: number, angle: number): number[] {\n const matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1]\n const lumR = 0.2126\n const lumG = 0.7152\n const lumB = 0.0722\n const hueRotateR = 0.143\n const hueRotateG = 0.14\n const hueRotateB = 0.283\n const cos = Math.cos((angle * Math.PI) / 180)\n const sin = Math.sin((angle * Math.PI) / 180)\n\n matrix[0] = lumR + (1 - lumR) * cos - lumR * sin\n matrix[1] = lumG - lumG * cos - lumG * sin\n matrix[2] = lumB - lumB * cos + (1 - lumB) * sin\n matrix[3] = lumR - lumR * cos + hueRotateR * sin\n matrix[4] = lumG + (1 - lumG) * cos + hueRotateG * sin\n matrix[5] = lumB - lumB * cos - hueRotateB * sin\n matrix[6] = lumR - lumR * cos - (1 - lumR) * sin\n matrix[7] = lumG - lumG * cos + lumG * sin\n matrix[8] = lumB + (1 - lumB) * cos + lumB * sin\n\n return [\n clamp(matrix[0] * r + matrix[1] * g + matrix[2] * b),\n clamp(matrix[3] * r + matrix[4] * g + matrix[5] * b),\n clamp(matrix[6] * r + matrix[7] * g + matrix[8] * b),\n ]\n}\n\nfunction clamp(num: number) {\n return Math.ceil(Math.max(0, Math.min(255, num)))\n}\n"],"names":["StyleReader","domStylesCache","Map","dummyNode","targetNode","retrieveStyleFromDom","scopes","property","getFromCache","length","key","join","cachedData","get","undefined","value","ensureDummyNodeExistence","parent","i","len","scope","node","document","createElement","className","replace","dotRegexp","appendChild","style","window","getComputedStyle","getPropertyValue","filter","includes","rotateHue","set","innerHTML","visibility","invalidateDOMStylesCache","clear","rgbExtractRegexp","hueRegexp","match","rStr","gStr","bStr","aStr","hueMatch","hueStr","r","g","b","a","hue","map","Number","rotate","isNaN","angle","matrix","lumR","lumG","lumB","hueRotateR","hueRotateG","hueRotateB","cos","Math","PI","sin","clamp","num","ceil","max","min"],"version":3,"file":"main.js.map"} \ No newline at end of file diff --git a/dist/minimap-plugin-generator-element.68264bbd.js b/dist/minimap-plugin-generator-element.68264bbd.js deleted file mode 100644 index 9a5b1e93..00000000 --- a/dist/minimap-plugin-generator-element.68264bbd.js +++ /dev/null @@ -1,2 +0,0 @@ -function e(e){return e&&e.__esModule?e.default:e}var t=require("fs-plus"),i=require("path"),a=require("atom"),s=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}).parcelRequire7d67;s.register("7DGKC",(function(n,o){function r(){const e=document.createElement(h);return e.createdCallback(),e}function l(e,t){c(atom.packages.getApmPath(),["install"],t,{cwd:e})}function c(e,t,i,s={}){return new a.BufferedProcess({command:e,args:t,exit:i,options:s})}Object.defineProperty(n.exports,"createMinimapPluginGeneratorElement",{get:()=>r,set:void 0,enumerable:!0,configurable:!0});var d=s("bNORb"),m=s("9jcTZ");const h="minimap-plugin-generator";class g extends HTMLElement{static initClass(){this.registerCommands(),m.default(this,h)}static registerCommands(){atom.commands.add("minimap-plugin-generator",{"core:confirm"(){this.confirm()},"core:cancel"(){this.detach()}})}createdCallback(){this.previouslyFocusedElement=null,this.mode=null,this.modal=document.createElement("atom-panel"),this.modal.classList.add("minimap-plugin-generator"),this.modal.classList.add("modal"),this.modal.classList.add("overlay"),this.modal.classList.add("from-top"),this.editor=atom.workspace.buildTextEditor({mini:!0}),this.editorElement=atom.views.getView(this.editor),this.error=document.createElement("div"),this.error.classList.add("error"),this.message=document.createElement("div"),this.message.classList.add("message"),this.modal.appendChild(this.editorElement),this.modal.appendChild(this.error),this.modal.appendChild(this.message),this.appendChild(this.modal)}connectedCallback(){this.previouslyFocusedElement=document.activeElement,this.message.textContent="Enter plugin path",this.setPathText("my-minimap-plugin"),this.editorElement.focus()}attach(){atom.views.getView(atom.workspace).appendChild(this)}setPathText(a,s){s||(s=[0,a.length]);const n=atom.config.get("core.projectHome")||process.env.ATOM_REPOS_HOME||e(i).join(t.getHomeDirectory(),"github");this.editor.setText(e(i).join(n,a));const o=this.editor.getText().length-a.length;this.editor.setSelectedBufferRange([[0,o+s[0]],[0,o+s[1]]])}detach(){this.parentNode&&(this.previouslyFocusedElement&&this.previouslyFocusedElement.focus(),this.parentNode.removeChild(this))}confirm(){this.validPackagePath()&&(this.removeChild(this.modal),this.message.innerHTML=`\n \n Generate plugin at ${this.getPackagePath()}\n `,this.createPackageFiles((()=>{const e=this.getPackagePath();atom.open({pathsToOpen:[e],devMode:atom.config.get("minimap.createPluginInDevMode")}),this.message.innerHTML='Plugin successfully generated, opening it now...',setTimeout((()=>{this.detach()}),2e3)})))}getPackagePath(){const t=this.editor.getText(),a=d.dasherize(e(i).basename(t));return e(i).join(e(i).dirname(t),a)}validPackagePath(){return!t.existsSync(this.getPackagePath())||(this.error.textContent=`Path already exists at '${this.getPackagePath()}'`,this.error.style.display="block",!1)}initPackage(t,a){const s=e(i).resolve(__dirname,e(i).join("..","templates","plugin-"+this.template));c(atom.packages.getApmPath(),["init","-p",""+t,"--template",s],a)}createPackageFiles(t){const a=this.getPackagePath();(t=>{const a=e(i).join(atom.getConfigDirPath(),"packages",e(i).sep);if(0===t.indexOf(a))return!0;const s=e(i).join(atom.getConfigDirPath(),"dev","packages",e(i).sep);return 0===t.indexOf(s)})(a)?this.initPackage(a,(()=>{l(a,t)})):this.initPackage(a,(()=>{((e,t)=>{const i=["link"];atom.config.get("minimap.createPluginInDevMode")&&i.push("--dev"),i.push(""+e),c(atom.packages.getApmPath(),i,t)})(a,(()=>{l(a,t)}))}))}}g.initClass()})); -//# sourceMappingURL=minimap-plugin-generator-element.68264bbd.js.map diff --git a/dist/minimap-plugin-generator-element.68264bbd.js.map b/dist/minimap-plugin-generator-element.68264bbd.js.map deleted file mode 100644 index d6cf2839..00000000 --- a/dist/minimap-plugin-generator-element.68264bbd.js.map +++ /dev/null @@ -1 +0,0 @@ -{"mappings":"8TA8JgBA,IACd,MAAMC,EAAUC,SAASC,cAAcC,UACvCH,EAAQI,kBACDJ,WAaAK,EAAeC,EAAaC,GAGnCC,EAAWC,KAAKC,SAASC,aAFf,YAEmCJ,EAAQ,CAAIK,IAAKN,aAkBvDE,EAAWK,EAASC,EAAMC,EAAMC,EAAO,WACvC,IAAIC,EAAAC,gBAAe,SAAGL,OAASC,OAAMC,UAAM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Y/E,GAAW,OAiBbA,EAAaC,KAChC,MAAMO,EAAI,SACNL,KAAK4C,OAAOC,IAAG,kCACjBxC,EAAKkF,KAAI,SAEXlF,EAAKkF,KAAK1F,GAAAA,GAEVE,EAAWC,KAAKC,SAASC,aAAcG,EAAMP,IAvBvC0F,CAAY3F,GAAW,KACrBD,EAAeC,EAAaC,UAOtCY,EAA8B+E","sources":["lib/minimap-plugin-generator-element.js"],"sourcesContent":["\"use strict\"\n\nimport { dasherize } from \"./deps/underscore-plus\"\nimport { getHomeDirectory, existsSync } from \"fs-plus\"\nimport path from \"path\"\nimport { BufferedProcess } from \"atom\"\nimport element from \"./decorators/element\"\n\nconst TAG_NAME = \"minimap-plugin-generator\"\n\n/** @access private */\nclass MinimapPluginGeneratorElement extends HTMLElement {\n static initClass() {\n this.registerCommands()\n element(this, TAG_NAME)\n }\n\n static registerCommands() {\n atom.commands.add(\"minimap-plugin-generator\", {\n \"core:confirm\"() {\n this.confirm()\n },\n \"core:cancel\"() {\n this.detach()\n },\n })\n }\n\n createdCallback() {\n this.previouslyFocusedElement = null\n this.mode = null\n\n this.modal = document.createElement(\"atom-panel\")\n\n this.modal.classList.add(\"minimap-plugin-generator\")\n this.modal.classList.add(\"modal\")\n this.modal.classList.add(\"overlay\")\n this.modal.classList.add(\"from-top\")\n\n this.editor = atom.workspace.buildTextEditor({ mini: true })\n this.editorElement = atom.views.getView(this.editor)\n\n this.error = document.createElement(\"div\")\n this.error.classList.add(\"error\")\n\n this.message = document.createElement(\"div\")\n this.message.classList.add(\"message\")\n\n this.modal.appendChild(this.editorElement)\n this.modal.appendChild(this.error)\n this.modal.appendChild(this.message)\n\n this.appendChild(this.modal)\n }\n\n connectedCallback() {\n this.previouslyFocusedElement = document.activeElement\n this.message.textContent = \"Enter plugin path\"\n this.setPathText(\"my-minimap-plugin\")\n this.editorElement.focus()\n }\n\n attach() {\n atom.views.getView(atom.workspace).appendChild(this)\n }\n\n setPathText(placeholderName, rangeToSelect) {\n if (!rangeToSelect) {\n rangeToSelect = [0, placeholderName.length]\n }\n\n const packagesDirectory = getPackagesDirectory()\n\n this.editor.setText(path.join(packagesDirectory, placeholderName))\n\n const pathLength = this.editor.getText().length\n const endOfDirectoryIndex = pathLength - placeholderName.length\n\n this.editor.setSelectedBufferRange([\n [0, endOfDirectoryIndex + rangeToSelect[0]],\n [0, endOfDirectoryIndex + rangeToSelect[1]],\n ])\n }\n\n detach() {\n if (!this.parentNode) {\n return\n }\n\n if (this.previouslyFocusedElement) {\n this.previouslyFocusedElement.focus()\n }\n\n this.parentNode.removeChild(this)\n }\n\n confirm() {\n if (this.validPackagePath()) {\n this.removeChild(this.modal)\n this.message.innerHTML = `\n \n Generate plugin at ${this.getPackagePath()}\n `\n\n this.createPackageFiles(() => {\n const packagePath = this.getPackagePath()\n atom.open({ pathsToOpen: [packagePath], devMode: atom.config.get(\"minimap.createPluginInDevMode\") })\n\n this.message.innerHTML = 'Plugin successfully generated, opening it now...'\n\n setTimeout(() => {\n this.detach()\n }, 2000)\n })\n }\n }\n\n getPackagePath() {\n const packagePath = this.editor.getText()\n const packageName = dasherize(path.basename(packagePath))\n\n return path.join(path.dirname(packagePath), packageName)\n }\n\n validPackagePath() {\n if (existsSync(this.getPackagePath())) {\n this.error.textContent = `Path already exists at '${this.getPackagePath()}'`\n this.error.style.display = \"block\"\n return false\n } else {\n return true\n }\n }\n\n initPackage(packagePath, callback) {\n const templatePath = path.resolve(__dirname, path.join(\"..\", \"templates\", `plugin-${this.template}`))\n runCommand(atom.packages.getApmPath(), [\"init\", \"-p\", `${packagePath}`, \"--template\", templatePath], callback)\n }\n\n createPackageFiles(callback) {\n const packagePath = this.getPackagePath()\n\n if (isStoredInDotAtom(packagePath)) {\n this.initPackage(packagePath, () => {\n installPackage(packagePath, callback)\n })\n } else {\n this.initPackage(packagePath, () => {\n linkPackage(packagePath, () => {\n installPackage(packagePath, callback)\n })\n })\n }\n }\n}\n\nMinimapPluginGeneratorElement.initClass()\n\nexport function createMinimapPluginGeneratorElement() {\n const element = document.createElement(TAG_NAME)\n element.createdCallback()\n return element\n}\n\nfunction linkPackage(packagePath, callback) {\n const args = [\"link\"]\n if (atom.config.get(\"minimap.createPluginInDevMode\")) {\n args.push(\"--dev\")\n }\n args.push(packagePath.toString())\n\n runCommand(atom.packages.getApmPath(), args, callback)\n}\n\nfunction installPackage(packagePath, callback) {\n const args = [\"install\"]\n\n runCommand(atom.packages.getApmPath(), args, callback, { cwd: packagePath })\n}\n\nfunction getPackagesDirectory() {\n return atom.config.get(\"core.projectHome\") || process.env.ATOM_REPOS_HOME || path.join(getHomeDirectory(), \"github\")\n}\n\nfunction isStoredInDotAtom(packagePath) {\n const packagesPath = path.join(atom.getConfigDirPath(), \"packages\", path.sep)\n if (packagePath.indexOf(packagesPath) === 0) {\n return true\n }\n\n const devPackagesPath = path.join(atom.getConfigDirPath(), \"dev\", \"packages\", path.sep)\n\n return packagePath.indexOf(devPackagesPath) === 0\n}\n\nfunction runCommand(command, args, exit, options = {}) {\n return new BufferedProcess({ command, args, exit, options })\n}\n"],"names":["$58fd565a3165499b$export$f3256239933044e7","element","document","createElement","$58fd565a3165499b$var$TAG_NAME","createdCallback","$58fd565a3165499b$var$installPackage","packagePath","callback","$58fd565a3165499b$var$runCommand","atom","packages","getApmPath","cwd","command","args","exit","options","$7Y3am$atom","BufferedProcess","$58fd565a3165499b$var$MinimapPluginGeneratorElement","HTMLElement","registerCommands","$9jcTZ","default","this","commands","add","confirm","detach","previouslyFocusedElement","mode","modal","classList","editor","workspace","buildTextEditor","mini","editorElement","views","getView","error","message","appendChild","connectedCallback","activeElement","textContent","setPathText","focus","attach","placeholderName","rangeToSelect","length","packagesDirectory","config","get","process","env","ATOM_REPOS_HOME","$parcel$interopDefault","$7Y3am$path","join","$7Y3am$fsplus","getHomeDirectory","setText","endOfDirectoryIndex","getText","setSelectedBufferRange","parentNode","removeChild","validPackagePath","innerHTML","getPackagePath","createPackageFiles","open","pathsToOpen","devMode","setTimeout","packageName","$bNORb","dasherize","basename","dirname","existsSync","style","display","initPackage","templatePath","resolve","__dirname","template","packagesPath","getConfigDirPath","sep","indexOf","devPackagesPath","$58fd565a3165499b$var$isStoredInDotAtom","push","$58fd565a3165499b$var$linkPackage","initClass"],"version":3,"file":"minimap-plugin-generator-element.68264bbd.js.map"} \ No newline at end of file diff --git a/dist/minimap-plugin-generator-element.a1e4649c.js b/dist/minimap-plugin-generator-element.a1e4649c.js new file mode 100644 index 00000000..e4048446 --- /dev/null +++ b/dist/minimap-plugin-generator-element.a1e4649c.js @@ -0,0 +1,200 @@ +var $5Xi1e$path = require("path"); +var $5Xi1e$fsplus = require("fs-plus"); +var $5Xi1e$atom = require("atom"); + + +function $parcel$interopDefault(a) { + return a && a.__esModule ? a.default : a; +} + +function $parcel$export(e, n, v, s) { + Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true}); +} + + var $parcel$global = globalThis; + var parcelRequire = $parcel$global["parcelRequire7d67"]; +var parcelRegister = parcelRequire.register; +parcelRegister("1Ozz1", function(module, exports) { + +$parcel$export(module.exports, "createMinimapPluginGeneratorElement", () => $15260c33b8bdf1f4$export$95d70a3925bf2f0c); + +var $bN1tE = parcelRequire("bN1tE"); + + + + +var $5yNMJ = parcelRequire("5yNMJ"); + +var $15260c33b8bdf1f4$var$$parcel$__dirname = $5Xi1e$path.resolve(__dirname, "../lib"); +"use strict"; +const $15260c33b8bdf1f4$var$TAG_NAME = "minimap-plugin-generator"; +/** @access private */ class $15260c33b8bdf1f4$var$MinimapPluginGeneratorElement extends HTMLElement { + static initClass() { + this.registerCommands(); + (0, $5yNMJ.default)(this, $15260c33b8bdf1f4$var$TAG_NAME); + } + static registerCommands() { + atom.commands.add("minimap-plugin-generator", { + "core:confirm" () { + this.confirm(); + }, + "core:cancel" () { + this.detach(); + } + }); + } + createdCallback() { + this.previouslyFocusedElement = null; + this.mode = null; + this.modal = document.createElement("atom-panel"); + this.modal.classList.add("minimap-plugin-generator"); + this.modal.classList.add("modal"); + this.modal.classList.add("overlay"); + this.modal.classList.add("from-top"); + this.editor = atom.workspace.buildTextEditor({ + mini: true + }); + this.editorElement = atom.views.getView(this.editor); + this.error = document.createElement("div"); + this.error.classList.add("error"); + this.message = document.createElement("div"); + this.message.classList.add("message"); + this.modal.appendChild(this.editorElement); + this.modal.appendChild(this.error); + this.modal.appendChild(this.message); + this.appendChild(this.modal); + } + connectedCallback() { + this.previouslyFocusedElement = document.activeElement; + this.message.textContent = "Enter plugin path"; + this.setPathText("my-minimap-plugin"); + this.editorElement.focus(); + } + attach() { + atom.views.getView(atom.workspace).appendChild(this); + } + setPathText(placeholderName, rangeToSelect) { + if (!rangeToSelect) rangeToSelect = [ + 0, + placeholderName.length + ]; + const packagesDirectory = $15260c33b8bdf1f4$var$getPackagesDirectory(); + this.editor.setText((0, ($parcel$interopDefault($5Xi1e$path))).join(packagesDirectory, placeholderName)); + const pathLength = this.editor.getText().length; + const endOfDirectoryIndex = pathLength - placeholderName.length; + this.editor.setSelectedBufferRange([ + [ + 0, + endOfDirectoryIndex + rangeToSelect[0] + ], + [ + 0, + endOfDirectoryIndex + rangeToSelect[1] + ] + ]); + } + detach() { + if (!this.parentNode) return; + if (this.previouslyFocusedElement) this.previouslyFocusedElement.focus(); + this.parentNode.removeChild(this); + } + confirm() { + if (this.validPackagePath()) { + this.removeChild(this.modal); + this.message.innerHTML = ` + + Generate plugin at ${this.getPackagePath()} + `; + this.createPackageFiles(()=>{ + const packagePath = this.getPackagePath(); + atom.open({ + pathsToOpen: [ + packagePath + ], + devMode: atom.config.get("minimap.createPluginInDevMode") + }); + this.message.innerHTML = 'Plugin successfully generated, opening it now...'; + setTimeout(()=>{ + this.detach(); + }, 2000); + }); + } + } + getPackagePath() { + const packagePath = this.editor.getText(); + const packageName = (0, $bN1tE.dasherize)((0, ($parcel$interopDefault($5Xi1e$path))).basename(packagePath)); + return (0, ($parcel$interopDefault($5Xi1e$path))).join((0, ($parcel$interopDefault($5Xi1e$path))).dirname(packagePath), packageName); + } + validPackagePath() { + if ((0, $5Xi1e$fsplus.existsSync)(this.getPackagePath())) { + this.error.textContent = `Path already exists at '${this.getPackagePath()}'`; + this.error.style.display = "block"; + return false; + } else return true; + } + initPackage(packagePath, callback) { + const templatePath = (0, ($parcel$interopDefault($5Xi1e$path))).resolve($15260c33b8bdf1f4$var$$parcel$__dirname, (0, ($parcel$interopDefault($5Xi1e$path))).join("..", "templates", `plugin-${this.template}`)); + $15260c33b8bdf1f4$var$runCommand(atom.packages.getApmPath(), [ + "init", + "-p", + `${packagePath}`, + "--template", + templatePath + ], callback); + } + createPackageFiles(callback) { + const packagePath = this.getPackagePath(); + if ($15260c33b8bdf1f4$var$isStoredInDotAtom(packagePath)) this.initPackage(packagePath, ()=>{ + $15260c33b8bdf1f4$var$installPackage(packagePath, callback); + }); + else this.initPackage(packagePath, ()=>{ + $15260c33b8bdf1f4$var$linkPackage(packagePath, ()=>{ + $15260c33b8bdf1f4$var$installPackage(packagePath, callback); + }); + }); + } +} +$15260c33b8bdf1f4$var$MinimapPluginGeneratorElement.initClass(); +function $15260c33b8bdf1f4$export$95d70a3925bf2f0c() { + const element = document.createElement($15260c33b8bdf1f4$var$TAG_NAME); + element.createdCallback(); + return element; +} +function $15260c33b8bdf1f4$var$linkPackage(packagePath, callback) { + const args = [ + "link" + ]; + if (atom.config.get("minimap.createPluginInDevMode")) args.push("--dev"); + args.push(packagePath.toString()); + $15260c33b8bdf1f4$var$runCommand(atom.packages.getApmPath(), args, callback); +} +function $15260c33b8bdf1f4$var$installPackage(packagePath, callback) { + const args = [ + "install" + ]; + $15260c33b8bdf1f4$var$runCommand(atom.packages.getApmPath(), args, callback, { + cwd: packagePath + }); +} +function $15260c33b8bdf1f4$var$getPackagesDirectory() { + return atom.config.get("core.projectHome") || process.env.ATOM_REPOS_HOME || (0, ($parcel$interopDefault($5Xi1e$path))).join((0, $5Xi1e$fsplus.getHomeDirectory)(), "github"); +} +function $15260c33b8bdf1f4$var$isStoredInDotAtom(packagePath) { + const packagesPath = (0, ($parcel$interopDefault($5Xi1e$path))).join(atom.getConfigDirPath(), "packages", (0, ($parcel$interopDefault($5Xi1e$path))).sep); + if (packagePath.indexOf(packagesPath) === 0) return true; + const devPackagesPath = (0, ($parcel$interopDefault($5Xi1e$path))).join(atom.getConfigDirPath(), "dev", "packages", (0, ($parcel$interopDefault($5Xi1e$path))).sep); + return packagePath.indexOf(devPackagesPath) === 0; +} +function $15260c33b8bdf1f4$var$runCommand(command, args, exit, options = {}) { + return new (0, $5Xi1e$atom.BufferedProcess)({ + command: command, + args: args, + exit: exit, + options: options + }); +} + +}); + + +//# sourceMappingURL=minimap-plugin-generator-element.a1e4649c.js.map diff --git a/dist/minimap-plugin-generator-element.a1e4649c.js.map b/dist/minimap-plugin-generator-element.a1e4649c.js.map new file mode 100644 index 00000000..5827eeb5 --- /dev/null +++ b/dist/minimap-plugin-generator-element.a1e4649c.js.map @@ -0,0 +1 @@ +{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAQA,MAAM,iCAAW;AAEjB,oBAAoB,GACpB,MAAM,4DAAsC;IAC1C,OAAO,YAAY;QACjB,IAAI,CAAC,gBAAgB;QACrB,CAAA,GAAA,cAAM,EAAE,IAAI,EAAE;IAChB;IAEA,OAAO,mBAAmB;QACxB,KAAK,QAAQ,CAAC,GAAG,CAAC,4BAA4B;YAC5C;gBACE,IAAI,CAAC,OAAO;YACd;YACA;gBACE,IAAI,CAAC,MAAM;YACb;QACF;IACF;IAEA,kBAAkB;QAChB,IAAI,CAAC,wBAAwB,GAAG;QAChC,IAAI,CAAC,IAAI,GAAG;QAEZ,IAAI,CAAC,KAAK,GAAG,SAAS,aAAa,CAAC;QAEpC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC;QACzB,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC;QACzB,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC;QACzB,IAAI,CAAC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eAAe,IAAI,CAAA,GAAA,qCAAG,EAAE,IAAI,CAAC,CAAA,GAAA,8BAAe,KAAK;AAC7G;AAEA,SAAS,wCAAkB,WAAW;IACpC,MAAM,eAAe,CAAA,GAAA,qCAAG,EAAE,IAAI,CAAC,KAAK,gBAAgB,IAAI,YAAY,CAAA,GAAA,qCAAG,EAAE,GAAG;IAC5E,IAAI,YAAY,OAAO,CAAC,kBAAkB,GACxC,OAAO;IAGT,MAAM,kBAAkB,CAAA,GAAA,qCAAG,EAAE,IAAI,CAAC,KAAK,gBAAgB,IAAI,OAAO,YAAY,CAAA,GAAA,qCAAG,EAAE,GAAG;IAEtF,OAAO,YAAY,OAAO,CAAC,qBAAqB;AAClD;AAEA,SAAS,iCAAW,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;IACnD,OAAO,IAAI,CAAA,GAAA,2BAAc,EAAE;iBAAE;cAAS;cAAM;iBAAM;IAAQ;AAC5D","sources":["lib/minimap-plugin-generator-element.js"],"sourcesContent":["\"use strict\"\n\nimport { dasherize } from \"./deps/underscore-plus\"\nimport { getHomeDirectory, existsSync } from \"fs-plus\"\nimport path from \"path\"\nimport { BufferedProcess } from \"atom\"\nimport element from \"./decorators/element\"\n\nconst TAG_NAME = \"minimap-plugin-generator\"\n\n/** @access private */\nclass MinimapPluginGeneratorElement extends HTMLElement {\n static initClass() {\n this.registerCommands()\n element(this, TAG_NAME)\n }\n\n static registerCommands() {\n atom.commands.add(\"minimap-plugin-generator\", {\n \"core:confirm\"() {\n this.confirm()\n },\n \"core:cancel\"() {\n this.detach()\n },\n })\n }\n\n createdCallback() {\n this.previouslyFocusedElement = null\n this.mode = null\n\n this.modal = document.createElement(\"atom-panel\")\n\n this.modal.classList.add(\"minimap-plugin-generator\")\n this.modal.classList.add(\"modal\")\n this.modal.classList.add(\"overlay\")\n this.modal.classList.add(\"from-top\")\n\n this.editor = atom.workspace.buildTextEditor({ mini: true })\n this.editorElement = atom.views.getView(this.editor)\n\n this.error = document.createElement(\"div\")\n this.error.classList.add(\"error\")\n\n this.message = document.createElement(\"div\")\n this.message.classList.add(\"message\")\n\n this.modal.appendChild(this.editorElement)\n this.modal.appendChild(this.error)\n this.modal.appendChild(this.message)\n\n this.appendChild(this.modal)\n }\n\n connectedCallback() {\n this.previouslyFocusedElement = document.activeElement\n this.message.textContent = \"Enter plugin path\"\n this.setPathText(\"my-minimap-plugin\")\n this.editorElement.focus()\n }\n\n attach() {\n atom.views.getView(atom.workspace).appendChild(this)\n }\n\n setPathText(placeholderName, rangeToSelect) {\n if (!rangeToSelect) {\n rangeToSelect = [0, placeholderName.length]\n }\n\n const packagesDirectory = getPackagesDirectory()\n\n this.editor.setText(path.join(packagesDirectory, placeholderName))\n\n const pathLength = this.editor.getText().length\n const endOfDirectoryIndex = pathLength - placeholderName.length\n\n this.editor.setSelectedBufferRange([\n [0, endOfDirectoryIndex + rangeToSelect[0]],\n [0, endOfDirectoryIndex + rangeToSelect[1]],\n ])\n }\n\n detach() {\n if (!this.parentNode) {\n return\n }\n\n if (this.previouslyFocusedElement) {\n this.previouslyFocusedElement.focus()\n }\n\n this.parentNode.removeChild(this)\n }\n\n confirm() {\n if (this.validPackagePath()) {\n this.removeChild(this.modal)\n this.message.innerHTML = `\n \n Generate plugin at ${this.getPackagePath()}\n `\n\n this.createPackageFiles(() => {\n const packagePath = this.getPackagePath()\n atom.open({ pathsToOpen: [packagePath], devMode: atom.config.get(\"minimap.createPluginInDevMode\") })\n\n this.message.innerHTML = 'Plugin successfully generated, opening it now...'\n\n setTimeout(() => {\n this.detach()\n }, 2000)\n })\n }\n }\n\n getPackagePath() {\n const packagePath = this.editor.getText()\n const packageName = dasherize(path.basename(packagePath))\n\n return path.join(path.dirname(packagePath), packageName)\n }\n\n validPackagePath() {\n if (existsSync(this.getPackagePath())) {\n this.error.textContent = `Path already exists at '${this.getPackagePath()}'`\n this.error.style.display = \"block\"\n return false\n } else {\n return true\n }\n }\n\n initPackage(packagePath, callback) {\n const templatePath = path.resolve(__dirname, path.join(\"..\", \"templates\", `plugin-${this.template}`))\n runCommand(atom.packages.getApmPath(), [\"init\", \"-p\", `${packagePath}`, \"--template\", templatePath], callback)\n }\n\n createPackageFiles(callback) {\n const packagePath = this.getPackagePath()\n\n if (isStoredInDotAtom(packagePath)) {\n this.initPackage(packagePath, () => {\n installPackage(packagePath, callback)\n })\n } else {\n this.initPackage(packagePath, () => {\n linkPackage(packagePath, () => {\n installPackage(packagePath, callback)\n })\n })\n }\n }\n}\n\nMinimapPluginGeneratorElement.initClass()\n\nexport function createMinimapPluginGeneratorElement() {\n const element = document.createElement(TAG_NAME)\n element.createdCallback()\n return element\n}\n\nfunction linkPackage(packagePath, callback) {\n const args = [\"link\"]\n if (atom.config.get(\"minimap.createPluginInDevMode\")) {\n args.push(\"--dev\")\n }\n args.push(packagePath.toString())\n\n runCommand(atom.packages.getApmPath(), args, callback)\n}\n\nfunction installPackage(packagePath, callback) {\n const args = [\"install\"]\n\n runCommand(atom.packages.getApmPath(), args, callback, { cwd: packagePath })\n}\n\nfunction getPackagesDirectory() {\n return atom.config.get(\"core.projectHome\") || process.env.ATOM_REPOS_HOME || path.join(getHomeDirectory(), \"github\")\n}\n\nfunction isStoredInDotAtom(packagePath) {\n const packagesPath = path.join(atom.getConfigDirPath(), \"packages\", path.sep)\n if (packagePath.indexOf(packagesPath) === 0) {\n return true\n }\n\n const devPackagesPath = path.join(atom.getConfigDirPath(), \"dev\", \"packages\", path.sep)\n\n return packagePath.indexOf(devPackagesPath) === 0\n}\n\nfunction runCommand(command, args, exit, options = {}) {\n return new BufferedProcess({ command, args, exit, options })\n}\n"],"names":[],"version":3,"file":"minimap-plugin-generator-element.a1e4649c.js.map"} \ No newline at end of file From 56f16874d9a9b0d129fce36080a7c7d4ed47b013 Mon Sep 17 00:00:00 2001 From: Marko Zivic Date: Mon, 28 Oct 2024 03:08:33 +0100 Subject: [PATCH 3/3] Minified dist --- dist/main.js | 6945 +---------------- dist/main.js.map | 2 +- ...nimap-plugin-generator-element.a1e4649c.js | 200 - ...p-plugin-generator-element.a1e4649c.js.map | 1 - ...nimap-plugin-generator-element.f5282bf9.js | 5 + ...p-plugin-generator-element.f5282bf9.js.map | 1 + package.json | 3 +- 7 files changed, 11 insertions(+), 7146 deletions(-) delete mode 100644 dist/minimap-plugin-generator-element.a1e4649c.js delete mode 100644 dist/minimap-plugin-generator-element.a1e4649c.js.map create mode 100644 dist/minimap-plugin-generator-element.f5282bf9.js create mode 100644 dist/minimap-plugin-generator-element.f5282bf9.js.map diff --git a/dist/main.js b/dist/main.js index 2a6e8ec3..2603f7fb 100644 --- a/dist/main.js +++ b/dist/main.js @@ -1,6944 +1,3 @@ -var $cz7Pu$atom = require("atom"); -var $cz7Pu$path = require("path"); - - - var $parcel$global = globalThis; - -function $parcel$export(e, n, v, s) { - Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true}); -} - -function $parcel$exportWildcard(dest, source) { - Object.keys(source).forEach(function(key) { - if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) { - return; - } - - Object.defineProperty(dest, key, { - enumerable: true, - get: function get() { - return source[key]; - } - }); - }); - - return dest; -} - -function $parcel$interopDefault(a) { - return a && a.__esModule ? a.default : a; -} - -var $parcel$modules = {}; -var $parcel$inits = {}; - -var parcelRequire = $parcel$global["parcelRequire7d67"]; - -if (parcelRequire == null) { - parcelRequire = function(id) { - if (id in $parcel$modules) { - return $parcel$modules[id].exports; - } - if (id in $parcel$inits) { - var init = $parcel$inits[id]; - delete $parcel$inits[id]; - var module = {id: id, exports: {}}; - $parcel$modules[id] = module; - init.call(module.exports, module, module.exports); - return module.exports; - } - var err = new Error("Cannot find module '" + id + "'"); - err.code = 'MODULE_NOT_FOUND'; - throw err; - }; - - parcelRequire.register = function register(id, init) { - $parcel$inits[id] = init; - }; - - $parcel$global["parcelRequire7d67"] = parcelRequire; -} - -var parcelRegister = parcelRequire.register; -parcelRegister("59Uvr", function(module, exports) { - -// Generated by CoffeeScript 2.5.1 -(function() { - var callbackProperties, decorateElementClass, decorateElementPrototype, deprecate; - ({ deprecate: deprecate } = (parcelRequire("ga2S3"))); - if ($parcel$global.__CUSTOM_HTML_ELEMENTS_CLASSES__ != null) { - $parcel$global.__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__ = $parcel$global.__CUSTOM_HTML_ELEMENTS_CLASSES__; - delete $parcel$global.__CUSTOM_HTML_ELEMENTS_CLASSES__; - } else if ($parcel$global.__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__ == null) $parcel$global.__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__ = {}; - callbackProperties = [ - "createdCallback", - "attachedCallback", - "detachedCallback", - "attributeChangedCallback" - ]; - decorateElementPrototype = function(target, source) { - callbackProperties.forEach(function(k) { - return Object.defineProperty(target, k, { - value: function() { - var ref; - return (ref = this[`__${k}`]) != null ? ref.apply(this, arguments) : void 0; - }, - writable: true, - enumerable: true, - configurable: true - }); - }); - return Object.getOwnPropertyNames(source).forEach(function(k) { - var descriptor; - if (k === "constructor") return; - descriptor = Object.getOwnPropertyDescriptor(source, k); - if (callbackProperties.indexOf(k) > -1) return Object.defineProperty(target, `__${k}`, descriptor); - else return Object.defineProperty(target, k, descriptor); - }); - }; - decorateElementClass = function(target, source) { - return Object.getOwnPropertyNames(source).forEach(function(k) { - var descriptor; - if (k === "length" || k === "name" || k === "arguments" || k === "caller" || k === "prototype") return; - descriptor = Object.getOwnPropertyDescriptor(source, k); - return Object.defineProperty(target, k, descriptor); - }); - }; - module.exports = function(nodeName, options) { - var elementClass, elementPrototype, klass, proto, ref; - ({ class: klass } = options); - if (klass != null) proto = klass.prototype; - else proto = (ref = options.prototype) != null ? ref : options; - if (proto === options) deprecate("Using the prototype as the second argument is deprecated, use the prototype option instead"); - if (__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__[nodeName]) { - elementClass = __ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__[nodeName]; - decorateElementPrototype(elementClass.prototype, proto); - if (klass != null) decorateElementClass(elementClass, klass); - return elementClass; - } else { - elementPrototype = Object.create(HTMLElement.prototype); - decorateElementPrototype(elementPrototype, proto); - elementClass = document.registerElement(nodeName, { - prototype: Object.create(elementPrototype) - }); - if (klass != null) decorateElementClass(elementClass, klass); - return __ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__[nodeName] = elementClass; - } - }; -}).call(module.exports); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVnaXN0ZXItb3ItdXBkYXRlLWVsZW1lbnQuanMiLCJzb3VyY2VSb290IjoiLi4iLCJzb3VyY2VzIjpbImxpYi9yZWdpc3Rlci1vci11cGRhdGUtZWxlbWVudC5jb2ZmZWUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQUEsTUFBQSxrQkFBQSxFQUFBLG9CQUFBLEVBQUEsd0JBQUEsRUFBQTs7RUFBQSxDQUFBLENBQUMsU0FBRCxDQUFBLEdBQWMsT0FBQSxDQUFRLE1BQVIsQ0FBZDs7RUFFQSxJQUFHLCtDQUFIO0lBQ0UsTUFBTSxDQUFDLHFDQUFQLEdBQStDLE1BQU0sQ0FBQztJQUN0RCxPQUFPLE1BQU0sQ0FBQyxpQ0FGaEI7R0FBQSxNQUFBOztNQUlFLE1BQU0sQ0FBQyx3Q0FBeUMsQ0FBQTtLQUpsRDs7O0VBTUEsa0JBQUEsR0FBcUIsQ0FDbkIsaUJBRG1CLEVBRW5CLGtCQUZtQixFQUduQixrQkFIbUIsRUFJbkIsMEJBSm1COztFQU9yQix3QkFBQSxHQUEyQixRQUFBLENBQUMsTUFBRCxFQUFTLE1BQVQsQ0FBQTtJQUN6QixrQkFBa0IsQ0FBQyxPQUFuQixDQUEyQixRQUFBLENBQUMsQ0FBRCxDQUFBO2FBQ3pCLE1BQU0sQ0FBQyxjQUFQLENBQXNCLE1BQXRCLEVBQThCLENBQTlCLEVBQWlDO1FBQy9CL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uc1xuICAgIGRlcHJlY2F0ZSgnVXNpbmcgdGhlIHByb3RvdHlwZSBhcyB0aGUgc2Vjb25kIGFyZ3VtZW50IGlzIGRlcHJlY2F0ZWQsIHVzZSB0aGUgcHJvdG90eXBlIG9wdGlvbiBpbnN0ZWFkJylcblxuXG4gIGlmIF9fQVRPTV9VVElMU19DVVNUT01fRUxFTUVOVF9DTEFTU0VTX19bbm9kZU5hbWVdXG4gICAgZWxlbWVudENsYXNzID0gX19BVE9NX1VUSUxTX0NVU1RPTV9FTEVNRU5UX0NMQVNTRVNfX1tub2RlTmFtZV1cblxuICAgIGRlY29yYXRlRWxlbWVudFByb3RvdHlwZShlbGVtZW50Q2xhc3MucHJvdG90eXBlLCBwcm90bylcbiAgICBkZWNvcmF0ZUVsZW1lbnRDbGFzcyhlbGVtZW50Q2xhc3MsIGtsYXNzKSBpZiBrbGFzcz9cblxuICAgIGVsZW1lbnRDbGFzc1xuICBlbHNlXG4gICAgZWxlbWVudFByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUoSFRNTEVsZW1lbnQucHJvdG90eXBlKVxuICAgIGRlY29yYXRlRWxlbWVudFByb3RvdHlwZShlbGVtZW50UHJvdG90eXBlLCBwcm90bylcblxuICAgIGVsZW1lbnRDbGFzcyA9IGRvY3VtZW50LnJlZ2lzdGVyRWxlbWVudCBub2RlTmFtZSwgcHJvdG90eXBlOiBPYmplY3QuY3JlYXRlKGVsZW1lbnRQcm90b3R5cGUpXG5cbiAgICBkZWNvcmF0ZUVsZW1lbnRDbGFzcyhlbGVtZW50Q2xhc3MsIGtsYXNzKSBpZiBrbGFzcz9cblxuICAgIF9fQVRPTV9VVElMU19DVVNUT01fRUxFTUVOVF9DTEFTU0VTX19bbm9kZU5hbWVdID0gZWxlbWVudENsYXNzXG4iXX0= - //# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/register-or-update-element.coffee - -}); -parcelRegister("ga2S3", function(module, exports) { - - -(function() { - var Deprecation, Emitter, getRawStack, grim; - Deprecation = (parcelRequire("2HutS")); - if ($parcel$global.__grim__ == null) { - Emitter = (parcelRequire("lFipj")).Emitter; - grim = $parcel$global.__grim__ = { - deprecations: {}, - emitter: new Emitter, - includeDeprecatedAPIs: true, - getDeprecations: function() { - var deprecation, deprecations, deprecationsByLineNumber, deprecationsByPackage, fileName, lineNumber, packageName, _ref; - deprecations = []; - _ref = grim.deprecations; - for(fileName in _ref){ - deprecationsByLineNumber = _ref[fileName]; - for(lineNumber in deprecationsByLineNumber){ - deprecationsByPackage = deprecationsByLineNumber[lineNumber]; - for(packageName in deprecationsByPackage){ - deprecation = deprecationsByPackage[packageName]; - deprecations.push(deprecation); - } - } - } - return deprecations; - }, - getDeprecationsLength: function() { - return this.getDeprecations().length; - }, - clearDeprecations: function() { - grim.deprecations = {}; - }, - logDeprecations: function() { - var deprecation, deprecations, _i, _len; - deprecations = this.getDeprecations(); - deprecations.sort(function(a, b) { - return b.getCallCount() - a.getCallCount(); - }); - console.warn("\nCalls to deprecated functions\n-----------------------------"); - for(_i = 0, _len = deprecations.length; _i < _len; _i++){ - deprecation = deprecations[_i]; - console.warn("(" + deprecation.getCallCount() + ") " + deprecation.getOriginName() + " : " + deprecation.getMessage(), deprecation); - } - }, - deprecate: function(message, metadata) { - var deprecation, deprecationSite, error, fileName, lineNumber, originalStackTraceLimit, packageName, stack, _base, _base1, _base2, _ref, _ref1; - originalStackTraceLimit = Error.stackTraceLimit; - try { - Error.stackTraceLimit = 7; - error = new Error; - stack = (_ref = typeof error.getRawStack === "function" ? error.getRawStack() : void 0) != null ? _ref : getRawStack(error); - stack = stack.slice(1); - } finally{ - Error.stackTraceLimit = originalStackTraceLimit; - } - deprecationSite = stack[0]; - fileName = deprecationSite.getFileName(); - lineNumber = deprecationSite.getLineNumber(); - packageName = (_ref1 = metadata != null ? metadata.packageName : void 0) != null ? _ref1 : ""; - if ((_base = grim.deprecations)[fileName] == null) _base[fileName] = {}; - if ((_base1 = grim.deprecations[fileName])[lineNumber] == null) _base1[lineNumber] = {}; - if ((_base2 = grim.deprecations[fileName][lineNumber])[packageName] == null) _base2[packageName] = new Deprecation(message); - deprecation = grim.deprecations[fileName][lineNumber][packageName]; - deprecation.addStack(stack, metadata); - grim.emitter.emit("updated", deprecation); - }, - addSerializedDeprecation: function(serializedDeprecation) { - var deprecation, fileName, lineNumber, message, packageName, stack, stacks, _base, _base1, _base2, _i, _len, _ref, _ref1, _ref2; - deprecation = Deprecation.deserialize(serializedDeprecation); - message = deprecation.getMessage(); - fileName = deprecation.fileName, lineNumber = deprecation.lineNumber; - stacks = deprecation.getStacks(); - packageName = (_ref = (_ref1 = stacks[0]) != null ? (_ref2 = _ref1.metadata) != null ? _ref2.packageName : void 0 : void 0) != null ? _ref : ""; - if ((_base = grim.deprecations)[fileName] == null) _base[fileName] = {}; - if ((_base1 = grim.deprecations[fileName])[lineNumber] == null) _base1[lineNumber] = {}; - if ((_base2 = grim.deprecations[fileName][lineNumber])[packageName] == null) _base2[packageName] = new Deprecation(message, fileName, lineNumber); - deprecation = grim.deprecations[fileName][lineNumber][packageName]; - for(_i = 0, _len = stacks.length; _i < _len; _i++){ - stack = stacks[_i]; - deprecation.addStack(stack, stack.metadata); - } - grim.emitter.emit("updated", deprecation); - }, - on: function(eventName, callback) { - return grim.emitter.on(eventName, callback); - } - }; - } - getRawStack = function(error) { - var originalPrepareStackTrace, result; - originalPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = function(error, stack) { - return stack; - }; - Error.captureStackTrace(error, getRawStack); - result = error.stack; - Error.prepareStackTrace = originalPrepareStackTrace; - return result; - }; - module.exports = $parcel$global.__grim__; -}).call(module.exports); - -}); -parcelRegister("2HutS", function(module, exports) { -(function() { - var Deprecation, SourceMapCache; - SourceMapCache = {}; - module.exports = Deprecation = function() { - Deprecation.getFunctionNameFromCallsite = function(callsite) {}; - Deprecation.deserialize = function(_arg) { - var deprecation, fileName, lineNumber, message, stack, stacks, _i, _len; - message = _arg.message, fileName = _arg.fileName, lineNumber = _arg.lineNumber, stacks = _arg.stacks; - deprecation = new Deprecation(message, fileName, lineNumber); - for(_i = 0, _len = stacks.length; _i < _len; _i++){ - stack = stacks[_i]; - deprecation.addStack(stack, stack.metadata); - } - return deprecation; - }; - function Deprecation(message, fileName, lineNumber) { - this.message = message; - this.fileName = fileName; - this.lineNumber = lineNumber; - this.callCount = 0; - this.stackCount = 0; - this.stacks = {}; - this.stackCallCounts = {}; - } - Deprecation.prototype.getFunctionNameFromCallsite = function(callsite) { - var _ref, _ref1, _ref2; - if (callsite.functionName != null) return callsite.functionName; - if (callsite.isToplevel()) return (_ref = callsite.getFunctionName()) != null ? _ref : ""; - else { - if (callsite.isConstructor()) return "new " + callsite.getFunctionName(); - else if (callsite.getMethodName() && !callsite.getFunctionName()) return callsite.getMethodName(); - else return "" + callsite.getTypeName() + "." + ((_ref1 = (_ref2 = callsite.getMethodName()) != null ? _ref2 : callsite.getFunctionName()) != null ? _ref1 : ""); - } - }; - Deprecation.prototype.getLocationFromCallsite = function(callsite) { - var column, fileName, line; - if (callsite == null) return "unknown"; - if (callsite.location != null) return callsite.location; - if (callsite.isNative()) return "native"; - else if (callsite.isEval()) return "eval at " + this.getLocationFromCallsite(callsite.getEvalOrigin()); - else { - fileName = callsite.getFileName(); - line = callsite.getLineNumber(); - column = callsite.getColumnNumber(); - return "" + fileName + ":" + line + ":" + column; - } - }; - Deprecation.prototype.getFileNameFromCallSite = function(callsite) { - var _ref; - return (_ref = callsite.fileName) != null ? _ref : callsite.getFileName(); - }; - Deprecation.prototype.getOriginName = function() { - return this.originName; - }; - Deprecation.prototype.getMessage = function() { - return this.message; - }; - Deprecation.prototype.getStacks = function() { - var location, parsedStack, parsedStacks, stack, _ref; - parsedStacks = []; - _ref = this.stacks; - for(location in _ref){ - stack = _ref[location]; - parsedStack = this.parseStack(stack); - parsedStack.callCount = this.stackCallCounts[location]; - parsedStack.metadata = stack.metadata; - parsedStacks.push(parsedStack); - } - return parsedStacks; - }; - Deprecation.prototype.getStackCount = function() { - return this.stackCount; - }; - Deprecation.prototype.getCallCount = function() { - return this.callCount; - }; - Deprecation.prototype.addStack = function(stack, metadata) { - var callerLocation, _base, _base1; - if (this.originName == null) this.originName = this.getFunctionNameFromCallsite(stack[0]); - if (this.fileName == null) this.fileName = this.getFileNameFromCallSite(stack[0]); - if (this.lineNumber == null) this.lineNumber = typeof (_base = stack[0]).getLineNumber === "function" ? _base.getLineNumber() : void 0; - this.callCount++; - stack.metadata = metadata; - callerLocation = this.getLocationFromCallsite(stack[1]); - if (this.stacks[callerLocation] == null) { - this.stacks[callerLocation] = stack; - this.stackCount++; - } - if ((_base1 = this.stackCallCounts)[callerLocation] == null) _base1[callerLocation] = 0; - return this.stackCallCounts[callerLocation]++; - }; - Deprecation.prototype.parseStack = function(stack) { - return stack.map(function(_this) { - return function(callsite) { - return { - functionName: _this.getFunctionNameFromCallsite(callsite), - location: _this.getLocationFromCallsite(callsite), - fileName: _this.getFileNameFromCallSite(callsite) - }; - }; - }(this)); - }; - Deprecation.prototype.serialize = function() { - return { - message: this.getMessage(), - lineNumber: this.lineNumber, - fileName: this.fileName, - stacks: this.getStacks() - }; - }; - return Deprecation; - }(); -}).call(module.exports); - -}); - -parcelRegister("lFipj", function(module, exports) { - -$parcel$export(module.exports, "Emitter", () => $fc5bb49a91435824$export$4293555f241ae35a, (v) => $fc5bb49a91435824$export$4293555f241ae35a = v); -var $fc5bb49a91435824$export$4293555f241ae35a; -var $fc5bb49a91435824$export$252720412a173de; -var $fc5bb49a91435824$export$9ad012e5c3534b20; -"use strict"; - -$fc5bb49a91435824$export$4293555f241ae35a = (parcelRequire("huEXU")); - -$fc5bb49a91435824$export$252720412a173de = (parcelRequire("5gm12")); - -$fc5bb49a91435824$export$9ad012e5c3534b20 = (parcelRequire("fd9zj")); - -}); -parcelRegister("huEXU", function(module, exports) { -"use strict"; -function $cbc503dbe0ce1af4$var$_classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); -} -function $cbc503dbe0ce1af4$var$_defineProperties(target, props) { - for(var i = 0; i < props.length; i++){ - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } -} -function $cbc503dbe0ce1af4$var$_createClass(Constructor, protoProps, staticProps) { - if (protoProps) $cbc503dbe0ce1af4$var$_defineProperties(Constructor.prototype, protoProps); - if (staticProps) $cbc503dbe0ce1af4$var$_defineProperties(Constructor, staticProps); - return Constructor; -} - -var $5gm12 = parcelRequire("5gm12"); - -var $fd9zj = parcelRequire("fd9zj"); -// allows for handlers registered via `::on` to be invoked with calls to -// `::emit`. Instances of this class are intended to be used internally by -// classes that expose an event-based API. -// -// For example: -// -// ```js -// class User { -// constructor() { -// this.emitter = new Emitter() -// } -// -// onDidChangeName(callback) { -// this.emitter.on('did-change-name', callback) -// } -// -// setName(name) { -// if (name !== this.name) { -// this.name = name -// this.emitter.emit('did-change-name', name) -// } -// -// return this.name -// } -// } -// ``` -var $cbc503dbe0ce1af4$var$Emitter = /*#__PURE__*/ function() { - $cbc503dbe0ce1af4$var$_createClass(Emitter, null, [ - { - key: "onEventHandlerException", - value: function onEventHandlerException(exceptionHandler) { - var _this = this; - if (this.exceptionHandlers.length === 0) this.dispatch = this.exceptionHandlingDispatch; - this.exceptionHandlers.push(exceptionHandler); - return new $5gm12(function() { - _this.exceptionHandlers.splice(_this.exceptionHandlers.indexOf(exceptionHandler), 1); - if (_this.exceptionHandlers.length === 0) return _this.dispatch = _this.simpleDispatch; - }); - } - }, - { - key: "simpleDispatch", - value: function simpleDispatch(handler, value) { - return handler(value); - } - }, - { - key: "exceptionHandlingDispatch", - value: function exceptionHandlingDispatch(handler, value) { - try { - return handler(value); - } catch (exception) { - return this.exceptionHandlers.map(function(exceptionHandler) { - return exceptionHandler(exception); - }); - } - } - } - ]); - function Emitter() { - $cbc503dbe0ce1af4$var$_classCallCheck(this, Emitter); - this.disposed = false; - this.clear(); - } // Public: Clear out any existing subscribers. - $cbc503dbe0ce1af4$var$_createClass(Emitter, [ - { - key: "clear", - value: function clear() { - if (this.subscriptions != null) this.subscriptions.dispose(); - this.subscriptions = new $fd9zj(); - this.handlersByEventName = {}; - } // Public: Unsubscribe all handlers. - }, - { - key: "dispose", - value: function dispose() { - this.subscriptions.dispose(); - this.handlersByEventName = null; - this.disposed = true; - } - }, - { - key: "on", - value: function on(eventName, handler, unshift) { - var _this2 = this; - if (unshift == null) unshift = false; - if (this.disposed) throw new Error("Emitter has been disposed"); - if (typeof handler !== "function") throw new Error("Handler must be a function"); - var currentHandlers = this.handlersByEventName[eventName]; - if (currentHandlers) { - if (unshift) this.handlersByEventName[eventName].unshift(handler); - else this.handlersByEventName[eventName].push(handler); - } else this.handlersByEventName[eventName] = [ - handler - ]; - // When the emitter is disposed, we want to dispose of all subscriptions. - // However, we also need to stop tracking disposables when they're disposed - // from outside, otherwise this class will hold references to all the - // disposables it created (instead of just the active ones). - var cleanup = new $5gm12(function() { - _this2.subscriptions.remove(cleanup); - return _this2.off(eventName, handler); - }); - this.subscriptions.add(cleanup); - return cleanup; - } // Public: Register the given handler function to be invoked the next time an - }, - { - key: "once", - value: function once(eventName, handler, unshift) { - if (unshift == null) unshift = false; - var wrapped = function wrapped(value) { - disposable.dispose(); - return handler(value); - }; - var disposable = this.on(eventName, wrapped, unshift); - return disposable; - } // Public: Register the given handler function to be invoked *before* all - }, - { - key: "preempt", - value: function preempt(eventName, handler) { - return this.on(eventName, handler, true); - } // Private: Used by the disposable. - }, - { - key: "off", - value: function off(eventName, handlerToRemove) { - if (this.disposed) return; - var handlers = this.handlersByEventName[eventName]; - if (handlers) { - var handlerIndex = handlers.indexOf(handlerToRemove); - if (handlerIndex >= 0) handlers.splice(handlerIndex, 1); - if (handlers.length === 0) delete this.handlersByEventName[eventName]; - } - } - }, - { - key: "emit", - value: function emit(eventName, value) { - var handlers = this.handlersByEventName && this.handlersByEventName[eventName]; - if (handlers) { - // create a copy of `handlers` so that if any handler mutates `handlers` - // (e.g. by calling `on` on this same emitter), this does not result in - // changing the handlers being called during this same `emit`. - var handlersCopy = handlers.slice(); - for(var i = 0; i < handlersCopy.length; i++)this.constructor.dispatch(handlersCopy[i], value); - } - } - }, - { - key: "emitAsync", - value: function emitAsync(eventName, value) { - var _this3 = this; - var handlers = this.handlersByEventName && this.handlersByEventName[eventName]; - if (handlers) { - var promises = handlers.map(function(handler) { - return _this3.constructor.dispatch(handler, value); - }); - return Promise.all(promises).then(function() {}); - } - return Promise.resolve(); - } - }, - { - key: "getEventNames", - value: function getEventNames() { - return Object.keys(this.handlersByEventName); - } - }, - { - key: "listenerCountForEventName", - value: function listenerCountForEventName(eventName) { - var handlers = this.handlersByEventName[eventName]; - return handlers == null ? 0 : handlers.length; - } - }, - { - key: "getTotalListenerCount", - value: function getTotalListenerCount() { - var result = 0; - var _arr = Object.keys(this.handlersByEventName); - for(var _i = 0; _i < _arr.length; _i++){ - var eventName = _arr[_i]; - result += this.handlersByEventName[eventName].length; - } - return result; - } - } - ]); - return Emitter; -}(); -$cbc503dbe0ce1af4$var$Emitter.dispatch = $cbc503dbe0ce1af4$var$Emitter.simpleDispatch; -$cbc503dbe0ce1af4$var$Emitter.exceptionHandlers = []; -module.exports = $cbc503dbe0ce1af4$var$Emitter; - -}); -parcelRegister("5gm12", function(module, exports) { -"use strict"; -function $3d4f863fe04e8ce9$var$_classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); -} -function $3d4f863fe04e8ce9$var$_defineProperties(target, props) { - for(var i = 0; i < props.length; i++){ - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } -} -function $3d4f863fe04e8ce9$var$_createClass(Constructor, protoProps, staticProps) { - if (protoProps) $3d4f863fe04e8ce9$var$_defineProperties(Constructor.prototype, protoProps); - if (staticProps) $3d4f863fe04e8ce9$var$_defineProperties(Constructor, staticProps); - return Constructor; -} -// Essential: A handle to a resource that can be disposed. For example, -// {Emitter::on} returns disposables representing subscriptions. -module.exports = /*#__PURE__*/ function() { - $3d4f863fe04e8ce9$var$_createClass(Disposable, null, [ - { - key: "isDisposable", - // Public: Ensure that `object` correctly implements the `Disposable` - // contract. - // - // * `object` An {Object} you want to perform the check against. - // - // Returns a {Boolean} indicating whether `object` is a valid `Disposable`. - value: function isDisposable(object) { - return typeof (object != null ? object.dispose : undefined) === "function"; - } - } - ]); - function Disposable(disposalAction) { - $3d4f863fe04e8ce9$var$_classCallCheck(this, Disposable); - this.disposed = false; - this.disposalAction = disposalAction; - } // Public: Perform the disposal action, indicating that the resource associated - // with this disposable is no longer needed. - // - // You can call this method more than once, but the disposal action will only - // be performed the first time. - $3d4f863fe04e8ce9$var$_createClass(Disposable, [ - { - key: "dispose", - value: function dispose() { - if (!this.disposed) { - this.disposed = true; - if (typeof this.disposalAction === "function") this.disposalAction(); - this.disposalAction = null; - } - } - } - ]); - return Disposable; -}(); - -}); - -parcelRegister("fd9zj", function(module, exports) { -"use strict"; -function $b12f7e07728812cc$var$_classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); -} -function $b12f7e07728812cc$var$_defineProperties(target, props) { - for(var i = 0; i < props.length; i++){ - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } -} -function $b12f7e07728812cc$var$_createClass(Constructor, protoProps, staticProps) { - if (protoProps) $b12f7e07728812cc$var$_defineProperties(Constructor.prototype, protoProps); - if (staticProps) $b12f7e07728812cc$var$_defineProperties(Constructor, staticProps); - return Constructor; -} -var $b12f7e07728812cc$var$CompositeDisposable; -var $b12f7e07728812cc$var$Disposable; // Essential: An object that aggregates multiple {Disposable} instances together -// into a single disposable, so they can all be disposed as a group. -// -// These are very useful when subscribing to multiple events. -// -// ## Examples -// -// ```js -// const {CompositeDisposable} = require('atom') -// -// class Something { -// constructor() { -// this.disposables = new CompositeDisposable() -// const editor = atom.workspace.getActiveTextEditor() -// this.disposables.add(editor.onDidChange(() => {}) -// this.disposables.add(editor.onDidChangePath(() => {}) -// } -// -// destroy() { -// this.disposables.dispose(); -// } -// } -// ``` -module.exports = /*#__PURE__*/ function() { - /* - Section: Construction and Destruction - */ // Public: Construct an instance, optionally with one or more disposables - function CompositeDisposable() { - $b12f7e07728812cc$var$_classCallCheck(this, CompositeDisposable); - this.disposed = false; - this.disposables = new Set(); - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - try { - for(var _iterator = arguments[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){ - var disposable = _step.value; - this.add(disposable); - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally{ - try { - if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return(); - } finally{ - if (_didIteratorError) throw _iteratorError; - } - } - } // Public: Dispose all disposables added to this composite disposable. - // - // If this object has already been disposed, this method has no effect. - $b12f7e07728812cc$var$_createClass(CompositeDisposable, [ - { - key: "dispose", - value: function dispose() { - if (!this.disposed) { - this.disposed = true; - this.disposables.forEach(function(disposable) { - return disposable.dispose(); - }); - this.disposables = null; - } - } - }, - { - key: "add", - value: function add() { - if (!this.disposed) { - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - try { - for(var _iterator2 = arguments[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true){ - var disposable = _step2.value; - $b12f7e07728812cc$var$assertDisposable(disposable); - this.disposables.add(disposable); - } - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally{ - try { - if (!_iteratorNormalCompletion2 && _iterator2.return != null) _iterator2.return(); - } finally{ - if (_didIteratorError2) throw _iteratorError2; - } - } - } - } // Public: Remove a previously added disposable. - }, - { - key: "remove", - value: function remove(disposable) { - if (!this.disposed) this.disposables.delete(disposable); - } // Public: Alias to {CompositeDisposable::remove} - }, - { - key: "delete", - value: function _delete(disposable) { - this.remove(disposable); - } // Public: Clear all disposables. They will not be disposed by the next call - }, - { - key: "clear", - value: function clear() { - if (!this.disposed) this.disposables.clear(); - } - } - ]); - return CompositeDisposable; -}(); - -function $b12f7e07728812cc$var$assertDisposable(disposable) { - if ($b12f7e07728812cc$var$Disposable == null) $b12f7e07728812cc$var$Disposable = (parcelRequire("5gm12")); - if (!$b12f7e07728812cc$var$Disposable.isDisposable(disposable)) throw new TypeError("Arguments to CompositeDisposable.add must have a .dispose() method"); -} - -}); - - - - - -parcelRegister("8IinJ", function(module, exports) { - -// Generated by CoffeeScript 2.5.1 -(function() { - var Ancestors, Mixin; - Mixin = (parcelRequire("d28sD")); - // Public - module.exports = Ancestors = class Ancestors extends Mixin { - /* Public */ static parents(node, selector = "*") { - var parents; - parents = []; - this.eachParent(node, function(parent) { - if (typeof parent.matches === "function" ? parent.matches(selector) : void 0) return parents.push(parent); - }); - return parents; - } - static eachParent(node, block) { - var parent, results; - parent = node.parentNode; - if (parent != null) block(parent); - results = []; - while(parent = parent.parentNode)if (parent != null) results.push(block(parent)); - else results.push(void 0); - return results; - } - parents(selector = "*") { - return Ancestors.parents(this, selector); - } - queryParentSelectorAll(selector) { - if (selector == null) throw new Error("::queryParentSelectorAll requires a valid selector as argument"); - return this.parents(selector); - } - queryParentSelector(selector) { - if (selector == null) throw new Error("::queryParentSelector requires a valid selector as argument"); - return this.queryParentSelectorAll(selector)[0]; - } - eachParent(block) { - return Ancestors.eachParent(this, block); - } - }; -}).call(module.exports); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5jZXN0b3JzLmpzIiwic291cmNlUm9vdCI6Ii4uLy4uIiwic291cm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xsOiAoc2VsZWN0b3IpIC0+XG4gICAgdW5sZXNzIHNlbGVjdG9yP1xuICAgICAgdGhyb3cgbmV3IEVycm9yICc6OnF1ZXJ5UGFyZW50U2VsZWN0b3JBbGwgcmVxdWlyZXMgYSB2YWxpZCBzZWxlY3RvciBhcyBhcmd1bWVudCdcbiAgICBAcGFyZW50cyhzZWxlY3RvcilcblxuICBxdWVyeVBhcmVudFNlbGVjdG9yOiAoc2VsZWN0b3IpIC0+XG4gICAgdW5sZXNzIHNlbGVjdG9yP1xuICAgICAgdGhyb3cgbmV3IEVycm9yICc6OnF1ZXJ5UGFyZW50U2VsZWN0b3IgcmVxdWlyZXMgYSB2YWxpZCBzZWxlY3RvciBhcyBhcmd1bWVudCdcbiAgICBAcXVlcnlQYXJlbnRTZWxlY3RvckFsbChzZWxlY3RvcilbMF1cblxuICBlYWNoUGFyZW50OiAoYmxvY2spIC0+IEFuY2VzdG9ycy5lYWNoUGFyZW50KHRoaXMsIGJsb2NrKVxuIl19 - //# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/mixins/ancestors.coffee - -}); -parcelRegister("d28sD", function(module, exports) { -(function() { - var ExcludedClassProperties, ExcludedPrototypeProperties, Mixin, name; - module.exports = Mixin = function() { - Mixin.includeInto = function(constructor) { - var name, value, _ref; - this.extend(constructor.prototype); - for(name in this){ - value = this[name]; - if (ExcludedClassProperties.indexOf(name) === -1) { - if (!constructor.hasOwnProperty(name)) constructor[name] = value; - } - } - return (_ref = this.included) != null ? _ref.call(constructor) : void 0; - }; - Mixin.extend = function(object) { - var name, _i, _len, _ref, _ref1; - _ref = Object.getOwnPropertyNames(this.prototype); - for(_i = 0, _len = _ref.length; _i < _len; _i++){ - name = _ref[_i]; - if (ExcludedPrototypeProperties.indexOf(name) === -1) { - if (!object.hasOwnProperty(name)) object[name] = this.prototype[name]; - } - } - return (_ref1 = this.prototype.extended) != null ? _ref1.call(object) : void 0; - }; - function Mixin() { - if (typeof this.extended === "function") this.extended(); - } - return Mixin; - }(); - ExcludedClassProperties = [ - "__super__" - ]; - for(name in Mixin)ExcludedClassProperties.push(name); - ExcludedPrototypeProperties = [ - "constructor", - "extended" - ]; -}).call(module.exports); - -}); - - -parcelRegister("2CaVZ", function(module, exports) { - - -// Generated by CoffeeScript 2.5.1 -(function() { - var Disposable, DisposableEvents, Mixin; - Mixin = (parcelRequire("d28sD")); - ({ Disposable: Disposable } = $cz7Pu$atom); - module.exports = DisposableEvents = class DisposableEvents extends Mixin { - addDisposableEventListener(object, event, listener, options) { - object.addEventListener(event, listener, options); - return new Disposable(function() { - return object.removeEventListener(event, listener); - }); - } - }; -}).call(module.exports); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlzcG9zYWJsZS1ldmVudHMuanMiLCJzb3VyY2VSb290IjoiLi4vLi4iLCJzb3VyY2VzIjpbImxpYi9taXhpbnMvZGlzcG9zYWJsZS1ldmVudHMuY29mZmVlIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUFBLE1BQUEsVUFBQSxFQUFBLGdCQUFBLEVBQUE7O0VBQUEsS0FBQSxHQUFRLE9BQUEsQ0FBUSxPQUFSOztFQUNSLENBQUEsQ0FBQyxVQUFELENBQUEsR0FBZSxPQUFBLENBQVEsTUFBUixDQUFmOztFQUVBLE1BQU0sQ0FBQyxPQUFQLEdBQ00sbUJBQU4sTUFBQSxpQkFBQSxRQUErQixNQUEvQjtJQUNFLDBCQUE0QixDQUFDLE1BQUQsRUFBUyxLQUFULEVBQWdCLFFBQWhCLEVBQTBCLE9BQTFCLENBQUE7TUFDMUIsTUFBTSxDQUFDLGdCQUFQLENBQXdCLEtBQXhCLEVBQStCLFFBQS9CLEVBQXlDLE9BQXpDO2FBQ0EsSUFBSSxVQUFKLENBQWUsUUFBQSxDQUFBLENBQUE7ZUFBRyxNQUFNLENBQUMsbUJBQVAsQ0FBMkIsS0FBM0IsRUFBa0MsUUFBbEM7TUFBSCxDQUFmO0lBRjBCOztFQUQ5QjtBQUpBIiwic291cmNlc0NvbnRlbnQiOlsiTWl4aW4gPSByZXF1aXJlICdtaXh0bydcbntEaXNwb3NhYmxlfSA9IHJlcXVpcmUgJ2F0b20nXG5cbm1vZHVsZS5leHBvcnRzID1cbmNsYXNzIERpc3Bvc2FibGVFdmVudHMgZXh0ZW5kcyBNaXhpblxuICBhZGREaXNwb3NhYmxlRXZlbnRMaXN0ZW5lcjogKG9iamVjdCwgZXZlbnQsIGxpc3RlbmVyLCBvcHRpb25zKSAtPlxuICAgIG9iamVjdC5hZGRFdmVudExpc3RlbmVyIGV2ZW50LCBsaXN0ZW5lciwgb3B0aW9uc1xuICAgIG5ldyBEaXNwb3NhYmxlIC0+IG9iamVjdC5yZW1vdmVFdmVudExpc3RlbmVyIGV2ZW50LCBsaXN0ZW5lclxuIl19 - //# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/mixins/disposable-events.coffee - -}); - -parcelRegister("hQK5C", function(module, exports) { - - - -// Generated by CoffeeScript 2.5.1 -(function() { - var CompositeDisposable, Disposable, DisposableEvents, EventsDelegation, Mixin, NO_SELECTOR, eachPair; - Mixin = (parcelRequire("d28sD")); - DisposableEvents = (parcelRequire("2CaVZ")); - ({ Disposable: Disposable, CompositeDisposable: CompositeDisposable } = $cz7Pu$atom); - eachPair = function(object, callback) { - var k, results, v; - results = []; - for(k in object){ - v = object[k]; - results.push(callback(k, v)); - } - return results; - }; - NO_SELECTOR = "__NONE__"; - module.exports = EventsDelegation = (function() { - class EventsDelegation extends Mixin { - subscribeTo(object, selector, events, options) { - var disposablesForObject, eventsForObject; - if (!(object instanceof HTMLElement)) [object, selector, events, options] = [ - this, - object, - selector, - events - ]; - if (typeof selector === "object") [events, selector, options] = [ - selector, - NO_SELECTOR, - events - ]; - if (this.eventsMap == null) this.eventsMap = new WeakMap(); - if (this.disposablesMap == null) this.disposablesMap = new WeakMap(); - if (this.eventsMap.get(object) == null) this.eventsMap.set(object, {}); - if (this.disposablesMap.get(object) == null) this.disposablesMap.set(object, {}); - eventsForObject = this.eventsMap.get(object); - disposablesForObject = this.disposablesMap.get(object); - eachPair(events, (event, callback)=>{ - if (eventsForObject[event] == null) { - eventsForObject[event] = {}; - disposablesForObject[event] = this.createEventListener(object, event, options); - } - return eventsForObject[event][selector] = callback; - }); - return new Disposable(()=>{ - return this.unsubscribeFrom(object, selector, events); - }); - } - unsubscribeFrom(object, selector, events) { - var disposablesForObject, event, eventsForObject; - if (!(object instanceof HTMLElement)) [object, selector, events] = [ - this, - object, - selector - ]; - if (typeof selector === "object") [events, selector] = [ - selector, - NO_SELECTOR - ]; - if (!(eventsForObject = this.eventsMap.get(object))) return; - for(event in events){ - delete eventsForObject[event][selector]; - if (Object.keys(eventsForObject[event]).length === 0) { - disposablesForObject = this.disposablesMap.get(object); - disposablesForObject[event].dispose(); - delete disposablesForObject[event]; - delete eventsForObject[event]; - } - } - if (Object.keys(eventsForObject).length === 0) { - this.eventsMap.delete(object); - return this.disposablesMap.delete(object); - } - } - createEventListener(object, event, options) { - var listener; - listener = (e)=>{ - var eventsForObject, ref, target; - if (!(eventsForObject = (ref = this.eventsMap.get(object)) != null ? ref[event] : void 0)) return; - ({ target: target } = e); - this.decorateEvent(e); - this.eachSelectorFromTarget(e, target, eventsForObject); - if (!e.isPropagationStopped) { - if (typeof eventsForObject[NO_SELECTOR] === "function") eventsForObject[NO_SELECTOR](e); - } - return true; - }; - return this.addDisposableEventListener(object, event, listener, options); - } - eachSelectorFromTarget(event, target, eventsForObject) { - return this.nodeAndItsAncestors(target, (node)=>{ - if (event.isPropagationStopped) return; - return this.eachSelector(eventsForObject, (selector, callback)=>{ - var matched; - matched = this.targetMatch(node, selector); - if (event.isImmediatePropagationStopped || !matched) return; - return callback(event); - }); - }); - } - eachSelector(eventsForObject, callback) { - var i, key, keys, len; - keys = Object.keys(eventsForObject); - if (keys.indexOf(NO_SELECTOR) !== -1) keys.splice(keys.indexOf(NO_SELECTOR), 1); - keys.sort(function(a, b) { - return b.split(" ").length - a.split(" ").length; - }); - for(i = 0, len = keys.length; i < len; i++){ - key = keys[i]; - if (callback(key, eventsForObject[key])) return true; - } - return false; - } - targetMatch(target, selector) { - var parent; - if (target.matches(selector)) return true; - parent = target.parentNode; - while(parent != null && parent.matches != null){ - if (parent.matches(selector)) return true; - parent = parent.parentNode; - } - return false; - } - nodeAndItsAncestors(node, callback) { - var parent, results; - parent = node.parentNode; - callback(node); - results = []; - while(parent != null && parent.matches != null){ - callback(parent); - results.push(parent = parent.parentNode); - } - return results; - } - decorateEvent(e) { - var overriddenStop, overriddenStopImmediate; - overriddenStop = Event.prototype.stopPropagation; - e.stopPropagation = function() { - this.isPropagationStopped = true; - return overriddenStop.apply(this, arguments); - }; - overriddenStopImmediate = Event.prototype.stopImmediatePropagation; - return e.stopImmediatePropagation = function() { - this.isImmediatePropagationStopped = true; - return overriddenStopImmediate.apply(this, arguments); - }; - } - } - DisposableEvents.includeInto(EventsDelegation); - return EventsDelegation; - }).call(this); -}).call(module.exports); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnRzLWRlbGVnYXRpb24uanMiLCJzb3VyY2VSb290IjoiLi4vLi4iLCJzb3VyY2VzIjpbImxpYi9taXhpbnMvZXZlbnRzLWRlbGVnYXRpb24uY29mZmVlIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUFBLE1BQUEsbUJBQUEsRUFBQSxVQUFBLEVBQUEsZ0JBQUEsRUFBQSxnQkFBQSxFQUFBLEtBQUEsRUFBQSxXQUFBLEVBQUE7O0VBQUEsS0FBQSxHQUFRLE9BQUEsQ0FBUSxPQUFSOztFQUNSLGdCQUFBLEdBQW1CLE9BQUEsQ0FBUSxxQkFBUjs7RUFDbkIsQ0FBQSxDQUFDLFVBQUQsRUFBYSxtQkFBYixDQUFBLEdBQW9DLE9BQUEsQ0FBUSxNQUFSLENBQXBDOztFQUNBLFFBQUE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T5cbiAgICAgIEBpc1Byb3BhZ2F0aW9uU3RvcHBlZCA9IHRydWVcbiAgICAgIG92ZXJyaWRkZW5TdG9wLmFwcGx5KHRoaXMsIGFyZ3VtZW50cylcblxuICAgIG92ZXJyaWRkZW5TdG9wSW1tZWRpYXRlID0gIEV2ZW50OjpzdG9wSW1tZWRpYXRlUHJvcGFnYXRpb25cbiAgICBlLnN0b3BJbW1lZGlhdGVQcm9wYWdhdGlvbiA9IC0+XG4gICAgICBAaXNJbW1lZGlhdGVQcm9wYWdhdGlvblN0b3BwZWQgPSB0cnVlXG4gICAgICBvdmVycmlkZGVuU3RvcEltbWVkaWF0ZS5hcHBseSh0aGlzLCBhcmd1bWVudHMpXG4iXX0= - //# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/mixins/events-delegation.coffee - -}); - -parcelRegister("753wz", function(module, exports) { - -// Generated by CoffeeScript 2.5.1 -(function() { - var BabelSpacePenDSL, Builder, Events, Mixin, SelfClosingTags, SpacePenDSL, Tags, Template; - Mixin = (parcelRequire("d28sD")); - Tags = "a abbr address article aside audio b bdi bdo blockquote body button canvas caption cite code colgroup datalist dd del details dfn dialog div dl dt em fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header html i iframe ins kbd label legend li main map mark menu meter nav noscript object ol optgroup option output p pre progress q rp rt ruby s samp script section select small span strong style sub summary sup table tbody td textarea tfoot th thead time title tr u ul var video area base br col command embed hr img input keygen link meta param source track wbr".split(/\s+/); - SelfClosingTags = {}; - "area base br col command embed hr img input keygen link meta param source track wbr".split(/\s+/).forEach(function(tag) { - return SelfClosingTags[tag] = true; - }); - Events = "blur change click dblclick error focus input keydown keypress keyup load mousedown mousemove mouseout mouseover mouseup resize scroll select submit unload".split(/\s+/); - BabelSpacePenDSL = class BabelSpacePenDSL extends Mixin { - buildContent() { - if (this.constructor.content != null) return SpacePenDSL.buildContent(this, this.constructor.content); - } - }; - module.exports = SpacePenDSL = (function() { - class SpacePenDSL extends Mixin { - static includeInto(klass) { - super.includeInto(klass); - Object.defineProperty(klass, "content", { - enumerable: false, - get: function() { - return this.prototype.__content__; - }, - set: function(value) { - return this.prototype.__content__ = value; - } - }); - Object.defineProperty(klass.prototype, "createdCallback", { - enumerable: true, - get: function() { - return this.__create__; - }, - set: function(value) { - return this.__createdCallback__ = value; - } - }); - Object.defineProperty(klass.prototype, "__create__", { - enumerable: true, - value: function() { - if (this.__content__ != null) SpacePenDSL.buildContent(this, this.__content__); - if (this.__createdCallback__ != null) return this.__createdCallback__(); - } - }); - return klass.useShadowRoot = function() { - return klass.prototype.__useShadowRoot__ = true; - }; - } - static buildContent(element, content) { - var html, root, template; - template = new Template(); - content.call(template); - [html] = template.buildHtml(); - root = element.__useShadowRoot__ ? root = element.shadowRoot = element.createShadowRoot() : root = element; - root.innerHTML = html; - return this.wireOutlets(element, root); - } - static wireOutlets(view, root) { - var element, i, len, outlet, ref; - ref = root.querySelectorAll("[outlet]"); - for(i = 0, len = ref.length; i < len; i++){ - element = ref[i]; - outlet = element.getAttribute("outlet"); - view[outlet] = element; - element.removeAttribute("outlet"); - } - return void 0; - } - } - SpacePenDSL.Babel = BabelSpacePenDSL; - return SpacePenDSL; - }).call(this); - Template = (function() { - class Template { - constructor(){ - this.currentBuilder = new Builder(); - } - subview(name, view) { - return this.currentBuilder.subview(name, view); - } - text(string) { - return this.currentBuilder.text(string); - } - tag(tagName, ...args) { - return this.currentBuilder.tag(tagName, ...args); - } - raw(string) { - return this.currentBuilder.raw(string); - } - buildHtml() { - return this.currentBuilder.buildHtml(); - } - } - Tags.forEach(function(tagName) { - return Template.prototype[tagName] = function(...args) { - return this.currentBuilder.tag(tagName, ...args); - }; - }); - return Template; - }).call(this); - Builder = class Builder { - constructor(){ - this.document = []; - this.postProcessingSteps = []; - } - buildHtml() { - return [ - this.document.join(""), - this.postProcessingSteps - ]; - } - tag(name, ...args) { - var options; - options = this.extractOptions(args); - this.openTag(name, options.attributes); - if (SelfClosingTags.hasOwnProperty(name)) { - if (options.text != null || options.content != null) throw new Error(`Self-closing tag ${name} cannot have text or content`); - } else { - if (typeof options.content === "function") options.content(); - if (options.text) this.text(options.text); - return this.closeTag(name); - } - } - openTag(name, attributes) { - var attributeName, attributePairs, attributesString, value; - if (this.document.length === 0) { - if (attributes == null) attributes = {}; - } - attributePairs = function() { - var results; - results = []; - for(attributeName in attributes){ - value = attributes[attributeName]; - results.push(`${attributeName}=\"${value}\"`); - } - return results; - }(); - attributesString = attributePairs.length ? " " + attributePairs.join(" ") : ""; - return this.document.push(`<${name}${attributesString}>`); - } - closeTag(name) { - return this.document.push(``); - } - text(string) { - var escapedString; - escapedString = string.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(//g, ">"); - return this.document.push(escapedString); - } - raw(string) { - return this.document.push(string); - } - subview(outletName, subview) { - var subviewId; - subviewId = `subview-${++idCounter}`; - this.tag("div", { - id: subviewId - }); - return this.postProcessingSteps.push(function(view) { - view[outletName] = subview; - subview.parentView = view; - return view.find(`div#${subviewId}`).replaceWith(subview); - }); - } - extractOptions(args) { - var arg, i, len, options; - options = {}; - for(i = 0, len = args.length; i < len; i++){ - arg = args[i]; - switch(typeof arg){ - case "function": - options.content = arg; - break; - case "string": - case "number": - options.text = arg.toString(); - break; - default: - options.attributes = arg; - } - } - return options; - } - }; -}).call(module.exports); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BhY2UtcGVuLWRzbC5qcyIsInNvdXJjZVJvb3QiOiIuLi8uLiIsInNvdXJjZXMiOlsibGliL21peGlucy9zcGFjZS1wZW4tZHNsLmNvZmZlZSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7QUFBQSxNQUFBLGdCQUFBLEVBQUEsT0FBQSxFQUFBLE1BQUEsRUFBQSxLQUFBLEVBQUEsZUFBQSxFQUFBLFdBQUEsRUFBQSxJQUFBLEVBQUE7O0VBQUEsS0FBQSxHQUFRLE9BQUEsQ0FBUSxPQUFSO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bnMuYXR0cmlidXRlcyA9IGFyZ1xuICAgIG9wdGlvbnNcbiJdfQ== - //# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/mixins/space-pen-dsl.coffee - -}); - -parcelRegister("bN1tE", function(module, exports) { - -$parcel$export(module.exports, "escapeRegExp", () => $89556aa364dbcafa$export$7c57da42ce8e346f); -$parcel$export(module.exports, "dasherize", () => $89556aa364dbcafa$export$7e9152eee80b168f); -$parcel$export(module.exports, "debounce", () => $89556aa364dbcafa$export$61fc7d43ac8f84b0); -const $89556aa364dbcafa$var$regexEscape = /[$()*+./?[\\\]^{|}-]/g; -function $89556aa364dbcafa$export$7c57da42ce8e346f(string) { - if (string) return string.replace($89556aa364dbcafa$var$regexEscape, "\\$&"); - else return ""; -} -const $89556aa364dbcafa$var$regexDaherize = /([A-Z])|(_)/g; -function $89556aa364dbcafa$export$7e9152eee80b168f(string) { - if (!string) return ""; - string = `${string[0].toLowerCase()}${string.slice(1)}`; - return string.replace($89556aa364dbcafa$var$regexDaherize, function(m, letter) { - if (letter) return `-${letter.toLowerCase()}`; - else return "-"; - }); -} -function $89556aa364dbcafa$export$61fc7d43ac8f84b0(callback, wait) { - let timeoutId; - return (...args)=>{ - if (timeoutId !== undefined) clearTimeout(timeoutId); - timeoutId = setTimeout(()=>{ - callback(...args); - }, wait); - }; -} - -}); - -parcelRegister("5yNMJ", function(module, exports) { - -$parcel$export(module.exports, "default", () => $40c6befb85a55db7$export$2e2bcd8739ae039); -"use strict"; -function $40c6befb85a55db7$export$2e2bcd8739ae039(cls, elementName) { - if (!window.customElements.get(elementName)) window.customElements.define(elementName, cls); -} - -}); - -parcelRegister("gQk5Q", function(module, exports) { -module.exports = Promise.resolve(require("./minimap-plugin-generator-element.a1e4649c.js")).then(()=>parcelRequire("1Ozz1")); - -}); - - -$parcel$export(module.exports, "editorsMinimaps", () => $e6ccb2de5b0684dd$export$3542142cf713a624); -$parcel$export(module.exports, "emitter", () => $e6ccb2de5b0684dd$export$bad24218ebd77223); -$parcel$export(module.exports, "styleReader", () => $e6ccb2de5b0684dd$export$4d3d19fa8673fd3e); -$parcel$export(module.exports, "activate", () => $e6ccb2de5b0684dd$export$234c45b355edd85b); -$parcel$export(module.exports, "toggle", () => $e6ccb2de5b0684dd$export$e03c1c3201ee8bb7); -$parcel$export(module.exports, "minimapViewProvider", () => $e6ccb2de5b0684dd$export$e854d79fe60e1faa); -$parcel$export(module.exports, "deactivate", () => $e6ccb2de5b0684dd$export$e96c1edfdaf2d1db); -$parcel$export(module.exports, "getConfigSchema", () => $e6ccb2de5b0684dd$export$9734216cda67175d); -$parcel$export(module.exports, "onDidActivate", () => $e6ccb2de5b0684dd$export$b6f10fd94544e66c); -$parcel$export(module.exports, "onDidDeactivate", () => $e6ccb2de5b0684dd$export$d206d0a3ab46ce53); -$parcel$export(module.exports, "onDidCreateMinimap", () => $e6ccb2de5b0684dd$export$a720fe198b21c58c); -$parcel$export(module.exports, "onDidAddPlugin", () => $e6ccb2de5b0684dd$export$d40fb390be4bd0f); -$parcel$export(module.exports, "onDidRemovePlugin", () => $e6ccb2de5b0684dd$export$9937b73c38ac51f0); -$parcel$export(module.exports, "onDidActivatePlugin", () => $e6ccb2de5b0684dd$export$6f3aaf72a3cac830); -$parcel$export(module.exports, "onDidDeactivatePlugin", () => $e6ccb2de5b0684dd$export$8df1420526313195); -$parcel$export(module.exports, "onDidChangePluginOrder", () => $e6ccb2de5b0684dd$export$4f0668f248b15f12); -$parcel$export(module.exports, "minimapClass", () => $e6ccb2de5b0684dd$export$e3a0d8dffed34b4f); -$parcel$export(module.exports, "minimapForEditorElement", () => $e6ccb2de5b0684dd$export$fbfbb3bd6dc38def); -$parcel$export(module.exports, "minimapForEditor", () => $e6ccb2de5b0684dd$export$58c03b6c0d094c); -$parcel$export(module.exports, "standAloneMinimapForEditor", () => $e6ccb2de5b0684dd$export$bd03fcaa67c354fa); -$parcel$export(module.exports, "getActiveMinimap", () => $e6ccb2de5b0684dd$export$6f8e50201d28743); -$parcel$export(module.exports, "observeMinimaps", () => $e6ccb2de5b0684dd$export$b0030062932c3d3d); -$parcel$export(module.exports, "provideMinimapServiceV1", () => $e6ccb2de5b0684dd$export$b956a56dda08a331); -$parcel$export(module.exports, "config", () => $9d1240d3ca4fda1c$exports); -$parcel$export(module.exports, "Minimap", () => $e85ce81538013d49$export$2e2bcd8739ae039); -$parcel$export(module.exports, "createMinimapElement", () => $0965f8da08ee51eb$export$aa3fab546e9e7454); - - -var $35541aa4e0ecec06$exports = {}; - - - - - - -// Generated by CoffeeScript 2.5.1 -(function() { - $35541aa4e0ecec06$exports = { - requirePackages: function(...packages) { - return new Promise(function(resolve, reject) { - var failures, remains, required, solved; - required = []; - failures = []; - remains = packages.length; - solved = function() { - remains--; - if (remains !== 0) return; - if (failures.length > 0) return reject(failures); - return resolve(required); - }; - return packages.forEach(function(pkg, i) { - var failHandler, promise; - failHandler = function(reason) { - failures[i] = reason; - return solved(); - }; - promise = atom.packages.activatePackage(pkg).then(function(activatedPackage) { - required[i] = activatedPackage.mainModule; - return solved(); - }); - if (promise.fail != null) return promise.fail(failHandler); - else if (promise.catch != null) return promise.catch(failHandler); - }); - }); - }, - registerOrUpdateElement: (parcelRequire("59Uvr")), - Ancestors: (parcelRequire("8IinJ")), - AncestorsMethods: (parcelRequire("8IinJ")), - DisposableEvents: (parcelRequire("2CaVZ")), - EventsDelegation: (parcelRequire("hQK5C")), - SpacePenDSL: (parcelRequire("753wz")) - }; -}).call($35541aa4e0ecec06$exports); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXRvbS11dGlscy5qcyIsInNvdXJjZVJvb3QiOiIuLiIsInNvdXJjZXMiOlsibGliL2F0b20tdXRpbHMuY29mZmVlIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFDQTtFQUFBLE1BQU0sQ0FBQyxPQUFQLEdBQ0U7SUFBQSxlQUFBLEVBQWlCLFFBQUEsQ0FBQSxHQUFDLFF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xuICAgICAgICAgIHJlcXVpcmVkW2ldID0gYWN0aXZhdGVkUGFja2FnZS5tYWluTW9kdWxlXG4gICAgICAgICAgc29sdmVkKClcblxuICAgICAgICBpZiBwcm9taXNlLmZhaWw/XG4gICAgICAgICAgcHJvbWlzZS5mYWlsKGZhaWxIYW5kbGVyKVxuICAgICAgICBlbHNlIGlmIHByb21pc2UuY2F0Y2g/XG4gICAgICAgICAgcHJvbWlzZS5jYXRjaChmYWlsSGFuZGxlcilcblxuICByZWdpc3Rlck9yVXBkYXRlRWxlbWVudDogcmVxdWlyZSAnLi9yZWdpc3Rlci1vci11cGRhdGUtZWxlbWVudCdcbiAgQW5jZXN0b3JzOiByZXF1aXJlICcuL21peGlucy9hbmNlc3RvcnMnXG4gIEFuY2VzdG9yc01ldGhvZHM6IHJlcXVpcmUgJy4vbWl4aW5zL2FuY2VzdG9ycydcbiAgRGlzcG9zYWJsZUV2ZW50czogcmVxdWlyZSAnLi9taXhpbnMvZGlzcG9zYWJsZS1ldmVudHMnXG4gIEV2ZW50c0RlbGVnYXRpb246IHJlcXVpcmUgJy4vbWl4aW5zL2V2ZW50cy1kZWxlZ2F0aW9uJ1xuICBTcGFjZVBlbkRTTDogcmVxdWlyZSAnLi9taXhpbnMvc3BhY2UtcGVuLWRzbCdcbiJdfQ== - //# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/atom-utils.coffee - - -var $9f189d28e7df4568$exports = {}; -"use strict"; -var $84d1fb97071bc6c2$exports = {}; -"use strict"; -var $84d1fb97071bc6c2$var$utils = $84d1fb97071bc6c2$exports = {}; -/** - * Loops through the collection and calls the callback for each element. if the callback returns truthy, the loop is broken and returns the same value. - * @public - * @param {*} collection The collection to loop through. Needs to have a length property set and have indices set from 0 to length - 1. - * @param {function} callback The callback to be called for each element. The element will be given as a parameter to the callback. If this callback returns truthy, the loop is broken and the same value is returned. - * @returns {*} The value that a callback has returned (if truthy). Otherwise nothing. - */ $84d1fb97071bc6c2$var$utils.forEach = function(collection, callback) { - for(var i = 0; i < collection.length; i++){ - var result = callback(collection[i]); - if (result) return result; - } -}; - - -var $9f189d28e7df4568$require$forEach = $84d1fb97071bc6c2$exports.forEach; -var $51a2a8167cce3dd9$exports = {}; -"use strict"; -$51a2a8167cce3dd9$exports = function(options) { - var getState = options.stateHandler.getState; - /** - * Tells if the element has been made detectable and ready to be listened for resize events. - * @public - * @param {element} The element to check. - * @returns {boolean} True or false depending on if the element is detectable or not. - */ function isDetectable(element) { - var state = getState(element); - return state && !!state.isDetectable; - } - /** - * Marks the element that it has been made detectable and ready to be listened for resize events. - * @public - * @param {element} The element to mark. - */ function markAsDetectable(element) { - getState(element).isDetectable = true; - } - /** - * Tells if the element is busy or not. - * @public - * @param {element} The element to check. - * @returns {boolean} True or false depending on if the element is busy or not. - */ function isBusy(element) { - return !!getState(element).busy; - } - /** - * Marks the object is busy and should not be made detectable. - * @public - * @param {element} element The element to mark. - * @param {boolean} busy If the element is busy or not. - */ function markBusy(element, busy) { - getState(element).busy = !!busy; - } - return { - isDetectable: isDetectable, - markAsDetectable: markAsDetectable, - isBusy: isBusy, - markBusy: markBusy - }; -}; - - -var $501709e7730d4dbf$exports = {}; -"use strict"; -$501709e7730d4dbf$exports = function(idHandler) { - var eventListeners = {}; - /** - * Gets all listeners for the given element. - * @public - * @param {element} element The element to get all listeners for. - * @returns All listeners for the given element. - */ function getListeners(element) { - var id = idHandler.get(element); - if (id === undefined) return []; - return eventListeners[id] || []; - } - /** - * Stores the given listener for the given element. Will not actually add the listener to the element. - * @public - * @param {element} element The element that should have the listener added. - * @param {function} listener The callback that the element has added. - */ function addListener(element, listener) { - var id = idHandler.get(element); - if (!eventListeners[id]) eventListeners[id] = []; - eventListeners[id].push(listener); - } - function removeListener(element, listener) { - var listeners = getListeners(element); - for(var i = 0, len = listeners.length; i < len; ++i)if (listeners[i] === listener) { - listeners.splice(i, 1); - break; - } - } - function removeAllListeners(element) { - var listeners = getListeners(element); - if (!listeners) return; - listeners.length = 0; - } - return { - get: getListeners, - add: addListener, - removeListener: removeListener, - removeAllListeners: removeAllListeners - }; -}; - - -var $65f9007b250f3f7b$exports = {}; -"use strict"; -$65f9007b250f3f7b$exports = function() { - var idCount = 1; - /** - * Generates a new unique id in the context. - * @public - * @returns {number} A unique id in the context. - */ function generate() { - return idCount++; - } - return { - generate: generate - }; -}; - - -var $1cf1365bfb4ae3b3$exports = {}; -"use strict"; -$1cf1365bfb4ae3b3$exports = function(options) { - var idGenerator = options.idGenerator; - var getState = options.stateHandler.getState; - /** - * Gets the resize detector id of the element. - * @public - * @param {element} element The target element to get the id of. - * @returns {string|number|null} The id of the element. Null if it has no id. - */ function getId(element) { - var state = getState(element); - if (state && state.id !== undefined) return state.id; - return null; - } - /** - * Sets the resize detector id of the element. Requires the element to have a resize detector state initialized. - * @public - * @param {element} element The target element to set the id of. - * @returns {string|number|null} The id of the element. - */ function setId(element) { - var state = getState(element); - if (!state) throw new Error("setId required the element to have a resize detection state."); - var id = idGenerator.generate(); - state.id = id; - return id; - } - return { - get: getId, - set: setId - }; -}; - - -var $ed44fc4436368bc2$exports = {}; -"use strict"; -/* global console: false */ /** - * Reporter that handles the reporting of logs, warnings and errors. - * @public - * @param {boolean} quiet Tells if the reporter should be quiet or not. - */ $ed44fc4436368bc2$exports = function(quiet) { - function noop() { - //Does nothing. - } - var reporter = { - log: noop, - warn: noop, - error: noop - }; - if (!quiet && window.console) { - var attachFunction = function(reporter, name) { - //The proxy is needed to be able to call the method with the console context, - //since we cannot use bind. - reporter[name] = function reporterProxy() { - var f = console[name]; - if (f.apply) f.apply(console, arguments); - else for(var i = 0; i < arguments.length; i++)f(arguments[i]); - }; - }; - attachFunction(reporter, "log"); - attachFunction(reporter, "warn"); - attachFunction(reporter, "error"); - } - return reporter; -}; - - -var $fa8ae4c8cb8cc789$exports = {}; -"use strict"; -var $fa8ae4c8cb8cc789$var$detector = $fa8ae4c8cb8cc789$exports = {}; -$fa8ae4c8cb8cc789$var$detector.isIE = function(version) { - function isAnyIeVersion() { - var agent = navigator.userAgent.toLowerCase(); - return agent.indexOf("msie") !== -1 || agent.indexOf("trident") !== -1 || agent.indexOf(" edge/") !== -1; - } - if (!isAnyIeVersion()) return false; - if (!version) return true; - //Shamelessly stolen from https://gist.github.com/padolsey/527683 - var ieVersion = function() { - var undef, v = 3, div = document.createElement("div"), all = div.getElementsByTagName("i"); - do div.innerHTML = ""; - while (all[0]); - return v > 4 ? v : undef; - }(); - return version === ieVersion; -}; -$fa8ae4c8cb8cc789$var$detector.isLegacyOpera = function() { - return !!window.opera; -}; - - -var $7bbc4f11c6dd259e$exports = {}; -"use strict"; -var $3a1519b48d703550$exports = {}; -"use strict"; -var $3a1519b48d703550$var$utils = $3a1519b48d703550$exports = {}; -$3a1519b48d703550$var$utils.getOption = $3a1519b48d703550$var$getOption; -function $3a1519b48d703550$var$getOption(options, name, defaultValue) { - var value = options[name]; - if ((value === undefined || value === null) && defaultValue !== undefined) return defaultValue; - return value; -} - - -$7bbc4f11c6dd259e$exports = function batchProcessorMaker(options) { - options = options || {}; - var reporter = options.reporter; - var asyncProcess = $3a1519b48d703550$exports.getOption(options, "async", true); - var autoProcess = $3a1519b48d703550$exports.getOption(options, "auto", true); - if (autoProcess && !asyncProcess) { - reporter && reporter.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."); - asyncProcess = true; - } - var batch = $7bbc4f11c6dd259e$var$Batch(); - var asyncFrameHandler; - var isProcessing = false; - function addFunction(level, fn) { - if (!isProcessing && autoProcess && asyncProcess && batch.size() === 0) // Since this is async, it is guaranteed to be executed after that the fn is added to the batch. - // This needs to be done before, since we're checking the size of the batch to be 0. - processBatchAsync(); - batch.add(level, fn); - } - function processBatch() { - // Save the current batch, and create a new batch so that incoming functions are not added into the currently processing batch. - // Continue processing until the top-level batch is empty (functions may be added to the new batch while processing, and so on). - isProcessing = true; - while(batch.size()){ - var processingBatch = batch; - batch = $7bbc4f11c6dd259e$var$Batch(); - processingBatch.process(); - } - isProcessing = false; - } - function forceProcessBatch(localAsyncProcess) { - if (isProcessing) return; - if (localAsyncProcess === undefined) localAsyncProcess = asyncProcess; - if (asyncFrameHandler) { - cancelFrame(asyncFrameHandler); - asyncFrameHandler = null; - } - if (localAsyncProcess) processBatchAsync(); - else processBatch(); - } - function processBatchAsync() { - asyncFrameHandler = requestFrame(processBatch); - } - function clearBatch() { - batch = {}; - batchSize = 0; - topLevel = 0; - bottomLevel = 0; - } - function cancelFrame(listener) { - // var cancel = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.clearTimeout; - var cancel = clearTimeout; - return cancel(listener); - } - function requestFrame(callback) { - // var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function(fn) { return window.setTimeout(fn, 20); }; - var raf = function(fn) { - return setTimeout(fn, 0); - }; - return raf(callback); - } - return { - add: addFunction, - force: forceProcessBatch - }; -}; -function $7bbc4f11c6dd259e$var$Batch() { - var batch = {}; - var size = 0; - var topLevel1 = 0; - var bottomLevel1 = 0; - function add(level, fn) { - if (!fn) { - fn = level; - level = 0; - } - if (level > topLevel1) topLevel1 = level; - else if (level < bottomLevel1) bottomLevel1 = level; - if (!batch[level]) batch[level] = []; - batch[level].push(fn); - size++; - } - function process() { - for(var level = bottomLevel1; level <= topLevel1; level++){ - var fns = batch[level]; - for(var i = 0; i < fns.length; i++){ - var fn = fns[i]; - fn(); - } - } - } - function getSize() { - return size; - } - return { - add: add, - process: process, - size: getSize - }; -} - - -var $2c1563dabf9a2049$exports = {}; -"use strict"; -var $2c1563dabf9a2049$var$prop = "_erd"; -function $2c1563dabf9a2049$var$initState(element) { - element[$2c1563dabf9a2049$var$prop] = {}; - return $2c1563dabf9a2049$var$getState(element); -} -function $2c1563dabf9a2049$var$getState(element) { - return element[$2c1563dabf9a2049$var$prop]; -} -function $2c1563dabf9a2049$var$cleanState(element) { - delete element[$2c1563dabf9a2049$var$prop]; -} -$2c1563dabf9a2049$exports = { - initState: $2c1563dabf9a2049$var$initState, - getState: $2c1563dabf9a2049$var$getState, - cleanState: $2c1563dabf9a2049$var$cleanState -}; - - -var $1bf73006fbcd52cf$exports = {}; -/** - * Resize detection strategy that injects objects to elements in order to detect resize events. - * Heavily inspired by: http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/ - */ "use strict"; - -$1bf73006fbcd52cf$exports = function(options) { - options = options || {}; - var reporter = options.reporter; - var batchProcessor = options.batchProcessor; - var getState = options.stateHandler.getState; - if (!reporter) throw new Error("Missing required dependency: reporter."); - /** - * Adds a resize event listener to the element. - * @public - * @param {element} element The element that should have the listener added. - * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback. - */ function addListener(element, listener) { - function listenerProxy() { - listener(element); - } - if ($fa8ae4c8cb8cc789$exports.isIE(8)) { - //IE 8 does not support object, but supports the resize event directly on elements. - getState(element).object = { - proxy: listenerProxy - }; - element.attachEvent("onresize", listenerProxy); - } else { - var object = getObject(element); - if (!object) throw new Error("Element is not detectable by this strategy."); - object.contentDocument.defaultView.addEventListener("resize", listenerProxy); - } - } - function buildCssTextString(rules) { - var seperator = options.important ? " !important; " : "; "; - return (rules.join(seperator) + seperator).trim(); - } - /** - * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes. - * @private - * @param {object} options Optional options object. - * @param {element} element The element to make detectable - * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter. - */ function makeDetectable(options, element, callback) { - if (!callback) { - callback = element; - element = options; - options = null; - } - options = options || {}; - var debug = options.debug; - function injectObject(element, callback) { - var OBJECT_STYLE = buildCssTextString([ - "display: block", - "position: absolute", - "top: 0", - "left: 0", - "width: 100%", - "height: 100%", - "border: none", - "padding: 0", - "margin: 0", - "opacity: 0", - "z-index: -1000", - "pointer-events: none" - ]); - //The target element needs to be positioned (everything except static) so the absolute positioned object will be positioned relative to the target element. - // Position altering may be performed directly or on object load, depending on if style resolution is possible directly or not. - var positionCheckPerformed = false; - // The element may not yet be attached to the DOM, and therefore the style object may be empty in some browsers. - // Since the style object is a reference, it will be updated as soon as the element is attached to the DOM. - var style = window.getComputedStyle(element); - var width = element.offsetWidth; - var height = element.offsetHeight; - getState(element).startSize = { - width: width, - height: height - }; - function mutateDom() { - function alterPositionStyles() { - if (style.position === "static") { - element.style.setProperty("position", "relative", options.important ? "important" : ""); - var removeRelativeStyles = function(reporter, element, style, property) { - function getNumericalValue(value) { - return value.replace(/[^-\d\.]/g, ""); - } - var value = style[property]; - if (value !== "auto" && getNumericalValue(value) !== "0") { - reporter.warn("An element that is positioned static has style." + property + "=" + value + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + property + " will be set to 0. Element: ", element); - element.style.setProperty(property, "0", options.important ? "important" : ""); - } - }; - //Check so that there are no accidental styles that will make the element styled differently now that is is relative. - //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway). - removeRelativeStyles(reporter, element, style, "top"); - removeRelativeStyles(reporter, element, style, "right"); - removeRelativeStyles(reporter, element, style, "bottom"); - removeRelativeStyles(reporter, element, style, "left"); - } - } - function onObjectLoad() { - // The object has been loaded, which means that the element now is guaranteed to be attached to the DOM. - if (!positionCheckPerformed) alterPositionStyles(); - /*jshint validthis: true */ function getDocument(element, callback) { - //Opera 12 seem to call the object.onload before the actual document has been created. - //So if it is not present, poll it with an timeout until it is present. - //TODO: Could maybe be handled better with object.onreadystatechange or similar. - if (!element.contentDocument) { - var state = getState(element); - if (state.checkForObjectDocumentTimeoutId) window.clearTimeout(state.checkForObjectDocumentTimeoutId); - state.checkForObjectDocumentTimeoutId = setTimeout(function checkForObjectDocument() { - state.checkForObjectDocumentTimeoutId = 0; - getDocument(element, callback); - }, 100); - return; - } - callback(element.contentDocument); - } - //Mutating the object element here seems to fire another load event. - //Mutating the inner document of the object element is fine though. - var objectElement = this; - //Create the style element to be added to the object. - getDocument(objectElement, function onObjectDocumentReady(objectDocument) { - //Notify that the element is ready to be listened to. - callback(element); - }); - } - // The element may be detached from the DOM, and some browsers does not support style resolving of detached elements. - // The alterPositionStyles needs to be delayed until we know the element has been attached to the DOM (which we are sure of when the onObjectLoad has been fired), if style resolution is not possible. - if (style.position !== "") { - alterPositionStyles(style); - positionCheckPerformed = true; - } - //Add an object element as a child to the target element that will be listened to for resize events. - var object = document.createElement("object"); - object.style.cssText = OBJECT_STYLE; - object.tabIndex = -1; - object.type = "text/html"; - object.setAttribute("aria-hidden", "true"); - object.onload = onObjectLoad; - //Safari: This must occur before adding the object to the DOM. - //IE: Does not like that this happens before, even if it is also added after. - if (!$fa8ae4c8cb8cc789$exports.isIE()) object.data = "about:blank"; - if (!getState(element)) // The element has been uninstalled before the actual loading happened. - return; - element.appendChild(object); - getState(element).object = object; - //IE: This must occur after adding the object to the DOM. - if ($fa8ae4c8cb8cc789$exports.isIE()) object.data = "about:blank"; - } - if (batchProcessor) batchProcessor.add(mutateDom); - else mutateDom(); - } - if ($fa8ae4c8cb8cc789$exports.isIE(8)) //IE 8 does not support objects properly. Luckily they do support the resize event. - //So do not inject the object and notify that the element is already ready to be listened to. - //The event handler for the resize event is attached in the utils.addListener instead. - callback(element); - else injectObject(element, callback); - } - /** - * Returns the child object of the target element. - * @private - * @param {element} element The target element. - * @returns The object element of the target. - */ function getObject(element) { - return getState(element).object; - } - function uninstall(element) { - if (!getState(element)) return; - var object = getObject(element); - if (!object) return; - if ($fa8ae4c8cb8cc789$exports.isIE(8)) element.detachEvent("onresize", object.proxy); - else element.removeChild(object); - if (getState(element).checkForObjectDocumentTimeoutId) window.clearTimeout(getState(element).checkForObjectDocumentTimeoutId); - delete getState(element).object; - } - return { - makeDetectable: makeDetectable, - addListener: addListener, - uninstall: uninstall - }; -}; - - -var $9d869d60b84129a0$exports = {}; -/** - * Resize detection strategy that injects divs to elements in order to detect resize events on scroll events. - * Heavily inspired by: https://github.com/marcj/css-element-queries/blob/master/src/ResizeSensor.js - */ "use strict"; - -var $9d869d60b84129a0$require$forEach = $84d1fb97071bc6c2$exports.forEach; -$9d869d60b84129a0$exports = function(options) { - options = options || {}; - var reporter = options.reporter; - var batchProcessor = options.batchProcessor; - var getState = options.stateHandler.getState; - var hasState = options.stateHandler.hasState; - var idHandler = options.idHandler; - if (!batchProcessor) throw new Error("Missing required dependency: batchProcessor"); - if (!reporter) throw new Error("Missing required dependency: reporter."); - //TODO: Could this perhaps be done at installation time? - var scrollbarSizes = getScrollbarSizes(); - var styleId = "erd_scroll_detection_scrollbar_style"; - var detectionContainerClass = "erd_scroll_detection_container"; - function initDocument(targetDocument) { - // Inject the scrollbar styling that prevents them from appearing sometimes in Chrome. - // The injected container needs to have a class, so that it may be styled with CSS (pseudo elements). - injectScrollStyle(targetDocument, styleId, detectionContainerClass); - } - initDocument(window.document); - function buildCssTextString(rules) { - var seperator = options.important ? " !important; " : "; "; - return (rules.join(seperator) + seperator).trim(); - } - function getScrollbarSizes() { - var width = 500; - var height = 500; - var child = document.createElement("div"); - child.style.cssText = buildCssTextString([ - "position: absolute", - "width: " + width * 2 + "px", - "height: " + height * 2 + "px", - "visibility: hidden", - "margin: 0", - "padding: 0" - ]); - var container = document.createElement("div"); - container.style.cssText = buildCssTextString([ - "position: absolute", - "width: " + width + "px", - "height: " + height + "px", - "overflow: scroll", - "visibility: none", - "top: " + -width * 3 + "px", - "left: " + -height * 3 + "px", - "visibility: hidden", - "margin: 0", - "padding: 0" - ]); - container.appendChild(child); - document.body.insertBefore(container, document.body.firstChild); - var widthSize = width - container.clientWidth; - var heightSize = height - container.clientHeight; - document.body.removeChild(container); - return { - width: widthSize, - height: heightSize - }; - } - function injectScrollStyle(targetDocument, styleId, containerClass) { - function injectStyle(style, method) { - method = method || function(element) { - targetDocument.head.appendChild(element); - }; - var styleElement = targetDocument.createElement("style"); - styleElement.innerHTML = style; - styleElement.id = styleId; - method(styleElement); - return styleElement; - } - if (!targetDocument.getElementById(styleId)) { - var containerAnimationClass = containerClass + "_animation"; - var containerAnimationActiveClass = containerClass + "_animation_active"; - var style = "/* Created by the element-resize-detector library. */\n"; - style += "." + containerClass + " > div::-webkit-scrollbar { " + buildCssTextString([ - "display: none" - ]) + " }\n\n"; - style += "." + containerAnimationActiveClass + " { " + buildCssTextString([ - "-webkit-animation-duration: 0.1s", - "animation-duration: 0.1s", - "-webkit-animation-name: " + containerAnimationClass, - "animation-name: " + containerAnimationClass - ]) + " }\n"; - style += "@-webkit-keyframes " + containerAnimationClass + " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n"; - style += "@keyframes " + containerAnimationClass + " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }"; - injectStyle(style); - } - } - function addAnimationClass(element) { - element.className += " " + detectionContainerClass + "_animation_active"; - } - function addEvent(el, name, cb) { - if (el.addEventListener) el.addEventListener(name, cb); - else if (el.attachEvent) el.attachEvent("on" + name, cb); - else return reporter.error("[scroll] Don't know how to add event listeners."); - } - function removeEvent(el, name, cb) { - if (el.removeEventListener) el.removeEventListener(name, cb); - else if (el.detachEvent) el.detachEvent("on" + name, cb); - else return reporter.error("[scroll] Don't know how to remove event listeners."); - } - function getExpandElement(element) { - return getState(element).container.childNodes[0].childNodes[0].childNodes[0]; - } - function getShrinkElement(element) { - return getState(element).container.childNodes[0].childNodes[0].childNodes[1]; - } - /** - * Adds a resize event listener to the element. - * @public - * @param {element} element The element that should have the listener added. - * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback. - */ function addListener(element, listener) { - var listeners = getState(element).listeners; - if (!listeners.push) throw new Error("Cannot add listener to an element that is not detectable."); - getState(element).listeners.push(listener); - } - /** - * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes. - * @private - * @param {object} options Optional options object. - * @param {element} element The element to make detectable - * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter. - */ function makeDetectable(options, element, callback) { - if (!callback) { - callback = element; - element = options; - options = null; - } - options = options || {}; - function debug() { - if (options.debug) { - var args = Array.prototype.slice.call(arguments); - args.unshift(idHandler.get(element), "Scroll: "); - if (reporter.log.apply) reporter.log.apply(null, args); - else for(var i = 0; i < args.length; i++)reporter.log(args[i]); - } - } - function isDetached(element) { - function isInDocument(element) { - var isInShadowRoot = element.getRootNode && element.getRootNode().contains(element); - return element === element.ownerDocument.body || element.ownerDocument.body.contains(element) || isInShadowRoot; - } - if (!isInDocument(element)) return true; - // FireFox returns null style in hidden iframes. See https://github.com/wnr/element-resize-detector/issues/68 and https://bugzilla.mozilla.org/show_bug.cgi?id=795520 - if (window.getComputedStyle(element) === null) return true; - return false; - } - function isUnrendered(element) { - // Check the absolute positioned container since the top level container is display: inline. - var container = getState(element).container.childNodes[0]; - var style = window.getComputedStyle(container); - return !style.width || style.width.indexOf("px") === -1; //Can only compute pixel value when rendered. - } - function getStyle() { - // Some browsers only force layouts when actually reading the style properties of the style object, so make sure that they are all read here, - // so that the user of the function can be sure that it will perform the layout here, instead of later (important for batching). - var elementStyle = window.getComputedStyle(element); - var style = {}; - style.position = elementStyle.position; - style.width = element.offsetWidth; - style.height = element.offsetHeight; - style.top = elementStyle.top; - style.right = elementStyle.right; - style.bottom = elementStyle.bottom; - style.left = elementStyle.left; - style.widthCSS = elementStyle.width; - style.heightCSS = elementStyle.height; - return style; - } - function storeStartSize() { - var style = getStyle(); - getState(element).startSize = { - width: style.width, - height: style.height - }; - debug("Element start size", getState(element).startSize); - } - function initListeners() { - getState(element).listeners = []; - } - function storeStyle() { - debug("storeStyle invoked."); - if (!getState(element)) { - debug("Aborting because element has been uninstalled"); - return; - } - var style = getStyle(); - getState(element).style = style; - } - function storeCurrentSize(element, width, height) { - getState(element).lastWidth = width; - getState(element).lastHeight = height; - } - function getExpandChildElement(element) { - return getExpandElement(element).childNodes[0]; - } - function getWidthOffset() { - return 2 * scrollbarSizes.width + 1; - } - function getHeightOffset() { - return 2 * scrollbarSizes.height + 1; - } - function getExpandWidth(width) { - return width + 10 + getWidthOffset(); - } - function getExpandHeight(height) { - return height + 10 + getHeightOffset(); - } - function getShrinkWidth(width) { - return width * 2 + getWidthOffset(); - } - function getShrinkHeight(height) { - return height * 2 + getHeightOffset(); - } - function positionScrollbars(element, width, height) { - var expand = getExpandElement(element); - var shrink = getShrinkElement(element); - var expandWidth = getExpandWidth(width); - var expandHeight = getExpandHeight(height); - var shrinkWidth = getShrinkWidth(width); - var shrinkHeight = getShrinkHeight(height); - expand.scrollLeft = expandWidth; - expand.scrollTop = expandHeight; - shrink.scrollLeft = shrinkWidth; - shrink.scrollTop = shrinkHeight; - } - function injectContainerElement() { - var container = getState(element).container; - if (!container) { - container = document.createElement("div"); - container.className = detectionContainerClass; - container.style.cssText = buildCssTextString([ - "visibility: hidden", - "display: inline", - "width: 0px", - "height: 0px", - "z-index: -1", - "overflow: hidden", - "margin: 0", - "padding: 0" - ]); - getState(element).container = container; - addAnimationClass(container); - element.appendChild(container); - var onAnimationStart = function() { - getState(element).onRendered && getState(element).onRendered(); - }; - addEvent(container, "animationstart", onAnimationStart); - // Store the event handler here so that they may be removed when uninstall is called. - // See uninstall function for an explanation why it is needed. - getState(element).onAnimationStart = onAnimationStart; - } - return container; - } - function injectScrollElements() { - function alterPositionStyles() { - var style = getState(element).style; - if (style.position === "static") { - element.style.setProperty("position", "relative", options.important ? "important" : ""); - var removeRelativeStyles = function(reporter, element, style, property) { - function getNumericalValue(value) { - return value.replace(/[^-\d\.]/g, ""); - } - var value = style[property]; - if (value !== "auto" && getNumericalValue(value) !== "0") { - reporter.warn("An element that is positioned static has style." + property + "=" + value + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + property + " will be set to 0. Element: ", element); - element.style[property] = 0; - } - }; - //Check so that there are no accidental styles that will make the element styled differently now that is is relative. - //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway). - removeRelativeStyles(reporter, element, style, "top"); - removeRelativeStyles(reporter, element, style, "right"); - removeRelativeStyles(reporter, element, style, "bottom"); - removeRelativeStyles(reporter, element, style, "left"); - } - } - function getLeftTopBottomRightCssText(left, top, bottom, right) { - left = !left ? "0" : left + "px"; - top = !top ? "0" : top + "px"; - bottom = !bottom ? "0" : bottom + "px"; - right = !right ? "0" : right + "px"; - return [ - "left: " + left, - "top: " + top, - "right: " + right, - "bottom: " + bottom - ]; - } - debug("Injecting elements"); - if (!getState(element)) { - debug("Aborting because element has been uninstalled"); - return; - } - alterPositionStyles(); - var rootContainer = getState(element).container; - if (!rootContainer) rootContainer = injectContainerElement(); - // Due to this WebKit bug https://bugs.webkit.org/show_bug.cgi?id=80808 (currently fixed in Blink, but still present in WebKit browsers such as Safari), - // we need to inject two containers, one that is width/height 100% and another that is left/top -1px so that the final container always is 1x1 pixels bigger than - // the targeted element. - // When the bug is resolved, "containerContainer" may be removed. - // The outer container can occasionally be less wide than the targeted when inside inline elements element in WebKit (see https://bugs.webkit.org/show_bug.cgi?id=152980). - // This should be no problem since the inner container either way makes sure the injected scroll elements are at least 1x1 px. - var scrollbarWidth = scrollbarSizes.width; - var scrollbarHeight = scrollbarSizes.height; - var containerContainerStyle = buildCssTextString([ - "position: absolute", - "flex: none", - "overflow: hidden", - "z-index: -1", - "visibility: hidden", - "width: 100%", - "height: 100%", - "left: 0px", - "top: 0px" - ]); - var containerStyle = buildCssTextString([ - "position: absolute", - "flex: none", - "overflow: hidden", - "z-index: -1", - "visibility: hidden" - ].concat(getLeftTopBottomRightCssText(-(1 + scrollbarWidth), -(1 + scrollbarHeight), -scrollbarHeight, -scrollbarWidth))); - var expandStyle = buildCssTextString([ - "position: absolute", - "flex: none", - "overflow: scroll", - "z-index: -1", - "visibility: hidden", - "width: 100%", - "height: 100%" - ]); - var shrinkStyle = buildCssTextString([ - "position: absolute", - "flex: none", - "overflow: scroll", - "z-index: -1", - "visibility: hidden", - "width: 100%", - "height: 100%" - ]); - var expandChildStyle = buildCssTextString([ - "position: absolute", - "left: 0", - "top: 0" - ]); - var shrinkChildStyle = buildCssTextString([ - "position: absolute", - "width: 200%", - "height: 200%" - ]); - var containerContainer = document.createElement("div"); - var container = document.createElement("div"); - var expand = document.createElement("div"); - var expandChild = document.createElement("div"); - var shrink = document.createElement("div"); - var shrinkChild = document.createElement("div"); - // Some browsers choke on the resize system being rtl, so force it to ltr. https://github.com/wnr/element-resize-detector/issues/56 - // However, dir should not be set on the top level container as it alters the dimensions of the target element in some browsers. - containerContainer.dir = "ltr"; - containerContainer.style.cssText = containerContainerStyle; - containerContainer.className = detectionContainerClass; - container.className = detectionContainerClass; - container.style.cssText = containerStyle; - expand.style.cssText = expandStyle; - expandChild.style.cssText = expandChildStyle; - shrink.style.cssText = shrinkStyle; - shrinkChild.style.cssText = shrinkChildStyle; - expand.appendChild(expandChild); - shrink.appendChild(shrinkChild); - container.appendChild(expand); - container.appendChild(shrink); - containerContainer.appendChild(container); - rootContainer.appendChild(containerContainer); - function onExpandScroll() { - var state = getState(element); - if (state && state.onExpand) state.onExpand(); - else debug("Aborting expand scroll handler: element has been uninstalled"); - } - function onShrinkScroll() { - var state = getState(element); - if (state && state.onShrink) state.onShrink(); - else debug("Aborting shrink scroll handler: element has been uninstalled"); - } - addEvent(expand, "scroll", onExpandScroll); - addEvent(shrink, "scroll", onShrinkScroll); - // Store the event handlers here so that they may be removed when uninstall is called. - // See uninstall function for an explanation why it is needed. - getState(element).onExpandScroll = onExpandScroll; - getState(element).onShrinkScroll = onShrinkScroll; - } - function registerListenersAndPositionElements() { - function updateChildSizes(element, width, height) { - var expandChild = getExpandChildElement(element); - var expandWidth = getExpandWidth(width); - var expandHeight = getExpandHeight(height); - expandChild.style.setProperty("width", expandWidth + "px", options.important ? "important" : ""); - expandChild.style.setProperty("height", expandHeight + "px", options.important ? "important" : ""); - } - function updateDetectorElements(done) { - var width = element.offsetWidth; - var height = element.offsetHeight; - // Check whether the size has actually changed since last time the algorithm ran. If not, some steps may be skipped. - var sizeChanged = width !== getState(element).lastWidth || height !== getState(element).lastHeight; - debug("Storing current size", width, height); - // Store the size of the element sync here, so that multiple scroll events may be ignored in the event listeners. - // Otherwise the if-check in handleScroll is useless. - storeCurrentSize(element, width, height); - // Since we delay the processing of the batch, there is a risk that uninstall has been called before the batch gets to execute. - // Since there is no way to cancel the fn executions, we need to add an uninstall guard to all fns of the batch. - batchProcessor.add(0, function performUpdateChildSizes() { - if (!sizeChanged) return; - if (!getState(element)) { - debug("Aborting because element has been uninstalled"); - return; - } - if (!areElementsInjected()) { - debug("Aborting because element container has not been initialized"); - return; - } - if (options.debug) { - var w = element.offsetWidth; - var h = element.offsetHeight; - if (w !== width || h !== height) reporter.warn(idHandler.get(element), "Scroll: Size changed before updating detector elements."); - } - updateChildSizes(element, width, height); - }); - batchProcessor.add(1, function updateScrollbars() { - // This function needs to be invoked event though the size is unchanged. The element could have been resized very quickly and then - // been restored to the original size, which will have changed the scrollbar positions. - if (!getState(element)) { - debug("Aborting because element has been uninstalled"); - return; - } - if (!areElementsInjected()) { - debug("Aborting because element container has not been initialized"); - return; - } - positionScrollbars(element, width, height); - }); - if (sizeChanged && done) batchProcessor.add(2, function() { - if (!getState(element)) { - debug("Aborting because element has been uninstalled"); - return; - } - if (!areElementsInjected()) { - debug("Aborting because element container has not been initialized"); - return; - } - done(); - }); - } - function areElementsInjected() { - return !!getState(element).container; - } - function notifyListenersIfNeeded() { - function isFirstNotify() { - return getState(element).lastNotifiedWidth === undefined; - } - debug("notifyListenersIfNeeded invoked"); - var state = getState(element); - // Don't notify if the current size is the start size, and this is the first notification. - if (isFirstNotify() && state.lastWidth === state.startSize.width && state.lastHeight === state.startSize.height) return debug("Not notifying: Size is the same as the start size, and there has been no notification yet."); - // Don't notify if the size already has been notified. - if (state.lastWidth === state.lastNotifiedWidth && state.lastHeight === state.lastNotifiedHeight) return debug("Not notifying: Size already notified"); - debug("Current size not notified, notifying..."); - state.lastNotifiedWidth = state.lastWidth; - state.lastNotifiedHeight = state.lastHeight; - $9d869d60b84129a0$require$forEach(getState(element).listeners, function(listener) { - listener(element); - }); - } - function handleRender() { - debug("startanimation triggered."); - if (isUnrendered(element)) { - debug("Ignoring since element is still unrendered..."); - return; - } - debug("Element rendered."); - var expand = getExpandElement(element); - var shrink = getShrinkElement(element); - if (expand.scrollLeft === 0 || expand.scrollTop === 0 || shrink.scrollLeft === 0 || shrink.scrollTop === 0) { - debug("Scrollbars out of sync. Updating detector elements..."); - updateDetectorElements(notifyListenersIfNeeded); - } - } - function handleScroll() { - debug("Scroll detected."); - if (isUnrendered(element)) { - // Element is still unrendered. Skip this scroll event. - debug("Scroll event fired while unrendered. Ignoring..."); - return; - } - updateDetectorElements(notifyListenersIfNeeded); - } - debug("registerListenersAndPositionElements invoked."); - if (!getState(element)) { - debug("Aborting because element has been uninstalled"); - return; - } - getState(element).onRendered = handleRender; - getState(element).onExpand = handleScroll; - getState(element).onShrink = handleScroll; - var style = getState(element).style; - updateChildSizes(element, style.width, style.height); - } - function finalizeDomMutation() { - debug("finalizeDomMutation invoked."); - if (!getState(element)) { - debug("Aborting because element has been uninstalled"); - return; - } - var style = getState(element).style; - storeCurrentSize(element, style.width, style.height); - positionScrollbars(element, style.width, style.height); - } - function ready() { - callback(element); - } - function install() { - debug("Installing..."); - initListeners(); - storeStartSize(); - batchProcessor.add(0, storeStyle); - batchProcessor.add(1, injectScrollElements); - batchProcessor.add(2, registerListenersAndPositionElements); - batchProcessor.add(3, finalizeDomMutation); - batchProcessor.add(4, ready); - } - debug("Making detectable..."); - if (isDetached(element)) { - debug("Element is detached"); - injectContainerElement(); - debug("Waiting until element is attached..."); - getState(element).onRendered = function() { - debug("Element is now attached"); - install(); - }; - } else install(); - } - function uninstall(element) { - var state = getState(element); - if (!state) // Uninstall has been called on a non-erd element. - return; - // Uninstall may have been called in the following scenarios: - // (1) Right between the sync code and async batch (here state.busy = true, but nothing have been registered or injected). - // (2) In the ready callback of the last level of the batch by another element (here, state.busy = true, but all the stuff has been injected). - // (3) After the installation process (here, state.busy = false and all the stuff has been injected). - // So to be on the safe side, let's check for each thing before removing. - // We need to remove the event listeners, because otherwise the event might fire on an uninstall element which results in an error when trying to get the state of the element. - state.onExpandScroll && removeEvent(getExpandElement(element), "scroll", state.onExpandScroll); - state.onShrinkScroll && removeEvent(getShrinkElement(element), "scroll", state.onShrinkScroll); - state.onAnimationStart && removeEvent(state.container, "animationstart", state.onAnimationStart); - state.container && element.removeChild(state.container); - } - return { - makeDetectable: makeDetectable, - addListener: addListener, - uninstall: uninstall, - initDocument: initDocument - }; -}; - - -function $9f189d28e7df4568$var$isCollection(obj) { - return Array.isArray(obj) || obj.length !== undefined; -} -function $9f189d28e7df4568$var$toArray(collection) { - if (!Array.isArray(collection)) { - var array = []; - $9f189d28e7df4568$require$forEach(collection, function(obj) { - array.push(obj); - }); - return array; - } else return collection; -} -function $9f189d28e7df4568$var$isElement(obj) { - return obj && obj.nodeType === 1; -} -/** - * @typedef idHandler - * @type {object} - * @property {function} get Gets the resize detector id of the element. - * @property {function} set Generate and sets the resize detector id of the element. - */ /** - * @typedef Options - * @type {object} - * @property {boolean} callOnAdd Determines if listeners should be called when they are getting added. - Default is true. If true, the listener is guaranteed to be called when it has been added. - If false, the listener will not be guarenteed to be called when it has been added (does not prevent it from being called). - * @property {idHandler} idHandler A custom id handler that is responsible for generating, setting and retrieving id's for elements. - If not provided, a default id handler will be used. - * @property {reporter} reporter A custom reporter that handles reporting logs, warnings and errors. - If not provided, a default id handler will be used. - If set to false, then nothing will be reported. - * @property {boolean} debug If set to true, the the system will report debug messages as default for the listenTo method. - */ /** - * Creates an element resize detector instance. - * @public - * @param {Options?} options Optional global options object that will decide how this instance will work. - */ $9f189d28e7df4568$exports = function(options) { - options = options || {}; - //idHandler is currently not an option to the listenTo function, so it should not be added to globalOptions. - var idHandler; - if (options.idHandler) // To maintain compatability with idHandler.get(element, readonly), make sure to wrap the given idHandler - // so that readonly flag always is true when it's used here. This may be removed next major version bump. - idHandler = { - get: function(element) { - return options.idHandler.get(element, true); - }, - set: options.idHandler.set - }; - else { - var idGenerator = $65f9007b250f3f7b$exports(); - var defaultIdHandler = $1cf1365bfb4ae3b3$exports({ - idGenerator: idGenerator, - stateHandler: $2c1563dabf9a2049$exports - }); - idHandler = defaultIdHandler; - } - //reporter is currently not an option to the listenTo function, so it should not be added to globalOptions. - var reporter = options.reporter; - if (!reporter) { - //If options.reporter is false, then the reporter should be quiet. - var quiet = reporter === false; - reporter = $ed44fc4436368bc2$exports(quiet); - } - //batchProcessor is currently not an option to the listenTo function, so it should not be added to globalOptions. - var batchProcessor = $9f189d28e7df4568$var$getOption(options, "batchProcessor", $7bbc4f11c6dd259e$exports({ - reporter: reporter - })); - //Options to be used as default for the listenTo function. - var globalOptions = {}; - globalOptions.callOnAdd = !!$9f189d28e7df4568$var$getOption(options, "callOnAdd", true); - globalOptions.debug = !!$9f189d28e7df4568$var$getOption(options, "debug", false); - var eventListenerHandler = $501709e7730d4dbf$exports(idHandler); - var elementUtils = $51a2a8167cce3dd9$exports({ - stateHandler: $2c1563dabf9a2049$exports - }); - //The detection strategy to be used. - var detectionStrategy; - var desiredStrategy = $9f189d28e7df4568$var$getOption(options, "strategy", "object"); - var importantCssRules = $9f189d28e7df4568$var$getOption(options, "important", false); - var strategyOptions = { - reporter: reporter, - batchProcessor: batchProcessor, - stateHandler: $2c1563dabf9a2049$exports, - idHandler: idHandler, - important: importantCssRules - }; - if (desiredStrategy === "scroll") { - if ($fa8ae4c8cb8cc789$exports.isLegacyOpera()) { - reporter.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."); - desiredStrategy = "object"; - } else if ($fa8ae4c8cb8cc789$exports.isIE(9)) { - reporter.warn("Scroll strategy is not supported on IE9. Changing to object strategy."); - desiredStrategy = "object"; - } - } - if (desiredStrategy === "scroll") detectionStrategy = $9d869d60b84129a0$exports(strategyOptions); - else if (desiredStrategy === "object") detectionStrategy = $1bf73006fbcd52cf$exports(strategyOptions); - else throw new Error("Invalid strategy name: " + desiredStrategy); - //Calls can be made to listenTo with elements that are still being installed. - //Also, same elements can occur in the elements list in the listenTo function. - //With this map, the ready callbacks can be synchronized between the calls - //so that the ready callback can always be called when an element is ready - even if - //it wasn't installed from the function itself. - var onReadyCallbacks = {}; - /** - * Makes the given elements resize-detectable and starts listening to resize events on the elements. Calls the event callback for each event for each element. - * @public - * @param {Options?} options Optional options object. These options will override the global options. Some options may not be overriden, such as idHandler. - * @param {element[]|element} elements The given array of elements to detect resize events of. Single element is also valid. - * @param {function} listener The callback to be executed for each resize event for each element. - */ function listenTo(options, elements, listener) { - function onResizeCallback(element) { - var listeners = eventListenerHandler.get(element); - $9f189d28e7df4568$require$forEach(listeners, function callListenerProxy(listener) { - listener(element); - }); - } - function addListener(callOnAdd, element, listener) { - eventListenerHandler.add(element, listener); - if (callOnAdd) listener(element); - } - //Options object may be omitted. - if (!listener) { - listener = elements; - elements = options; - options = {}; - } - if (!elements) throw new Error("At least one element required."); - if (!listener) throw new Error("Listener required."); - if ($9f189d28e7df4568$var$isElement(elements)) // A single element has been passed in. - elements = [ - elements - ]; - else if ($9f189d28e7df4568$var$isCollection(elements)) // Convert collection to array for plugins. - // TODO: May want to check so that all the elements in the collection are valid elements. - elements = $9f189d28e7df4568$var$toArray(elements); - else return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements."); - var elementsReady = 0; - var callOnAdd = $9f189d28e7df4568$var$getOption(options, "callOnAdd", globalOptions.callOnAdd); - var onReadyCallback = $9f189d28e7df4568$var$getOption(options, "onReady", function noop() {}); - var debug = $9f189d28e7df4568$var$getOption(options, "debug", globalOptions.debug); - $9f189d28e7df4568$require$forEach(elements, function attachListenerToElement(element) { - if (!$2c1563dabf9a2049$exports.getState(element)) { - $2c1563dabf9a2049$exports.initState(element); - idHandler.set(element); - } - var id = idHandler.get(element); - debug && reporter.log("Attaching listener to element", id, element); - if (!elementUtils.isDetectable(element)) { - debug && reporter.log(id, "Not detectable."); - if (elementUtils.isBusy(element)) { - debug && reporter.log(id, "System busy making it detectable"); - //The element is being prepared to be detectable. Do not make it detectable. - //Just add the listener, because the element will soon be detectable. - addListener(callOnAdd, element, listener); - onReadyCallbacks[id] = onReadyCallbacks[id] || []; - onReadyCallbacks[id].push(function onReady() { - elementsReady++; - if (elementsReady === elements.length) onReadyCallback(); - }); - return; - } - debug && reporter.log(id, "Making detectable..."); - //The element is not prepared to be detectable, so do prepare it and add a listener to it. - elementUtils.markBusy(element, true); - return detectionStrategy.makeDetectable({ - debug: debug, - important: importantCssRules - }, element, function onElementDetectable(element) { - debug && reporter.log(id, "onElementDetectable"); - if ($2c1563dabf9a2049$exports.getState(element)) { - elementUtils.markAsDetectable(element); - elementUtils.markBusy(element, false); - detectionStrategy.addListener(element, onResizeCallback); - addListener(callOnAdd, element, listener); - // Since the element size might have changed since the call to "listenTo", we need to check for this change, - // so that a resize event may be emitted. - // Having the startSize object is optional (since it does not make sense in some cases such as unrendered elements), so check for its existance before. - // Also, check the state existance before since the element may have been uninstalled in the installation process. - var state = $2c1563dabf9a2049$exports.getState(element); - if (state && state.startSize) { - var width = element.offsetWidth; - var height = element.offsetHeight; - if (state.startSize.width !== width || state.startSize.height !== height) onResizeCallback(element); - } - if (onReadyCallbacks[id]) $9f189d28e7df4568$require$forEach(onReadyCallbacks[id], function(callback) { - callback(); - }); - } else // The element has been unisntalled before being detectable. - debug && reporter.log(id, "Element uninstalled before being detectable."); - delete onReadyCallbacks[id]; - elementsReady++; - if (elementsReady === elements.length) onReadyCallback(); - }); - } - debug && reporter.log(id, "Already detecable, adding listener."); - //The element has been prepared to be detectable and is ready to be listened to. - addListener(callOnAdd, element, listener); - elementsReady++; - }); - if (elementsReady === elements.length) onReadyCallback(); - } - function uninstall(elements) { - if (!elements) return reporter.error("At least one element is required."); - if ($9f189d28e7df4568$var$isElement(elements)) // A single element has been passed in. - elements = [ - elements - ]; - else if ($9f189d28e7df4568$var$isCollection(elements)) // Convert collection to array for plugins. - // TODO: May want to check so that all the elements in the collection are valid elements. - elements = $9f189d28e7df4568$var$toArray(elements); - else return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements."); - $9f189d28e7df4568$require$forEach(elements, function(element) { - eventListenerHandler.removeAllListeners(element); - detectionStrategy.uninstall(element); - $2c1563dabf9a2049$exports.cleanState(element); - }); - } - function initDocument(targetDocument) { - detectionStrategy.initDocument && detectionStrategy.initDocument(targetDocument); - } - return { - listenTo: listenTo, - removeListener: eventListenerHandler.removeListener, - removeAllListeners: eventListenerHandler.removeAllListeners, - uninstall: uninstall, - initDocument: initDocument - }; -}; -function $9f189d28e7df4568$var$getOption(options, name, defaultValue) { - var value = options[name]; - if ((value === undefined || value === null) && defaultValue !== undefined) return defaultValue; - return value; -} - - - - -var $bN1tE = parcelRequire("bN1tE"); - - -"use strict"; -let $2946613f0e118ee7$var$idCounter = 0; -const $2946613f0e118ee7$var$nextId = function() { - return $2946613f0e118ee7$var$idCounter++; -}; -class $2946613f0e118ee7$export$2e2bcd8739ae039 { - /** - * Returns `true` if the passed-in decoration properties matches the specified type. - * - * @param {Object} decorationProperties The decoration properties to match - * @param {string} type The decoration type to match - * @returns {boolean} Whether the decoration properties match the type - */ static isType(decorationProperties, type) { - if (Array.isArray(decorationProperties.type)) { - if (decorationProperties.type.indexOf(type) >= 0) return true; - return false; - } else return type === decorationProperties.type; - } - /** - * Creates a new decoration. - * - * @param {Marker} marker The target marker for the decoration - * @param {Minimap} minimap The Minimap where the decoration will be displayed - * @param {Object} properties The decoration's properties - */ constructor(marker, minimap, properties){ - /** @access private */ this.marker = marker; - /** @access private */ this.minimap = minimap; - /** @access private */ this.emitter = new (0, $cz7Pu$atom.Emitter)(); - /** @access private */ this.id = $2946613f0e118ee7$var$nextId(); - /** @access private */ this.properties = null; - this.setProperties(properties); - this.properties.id = this.id; - /** @access private */ this.destroyed = false; - /** @access private */ this.markerDestroyDisposable = this.marker.onDidDestroy(()=>{ - this.destroy(); - }); - this.screenRange = marker.getScreenRange(); - } - /** - * Destroy this marker. - * - * If you own the marker, you should use `Marker#destroy` which will destroy this decoration. - */ destroy() { - var _this_markerDestroyDisposable_dispose, _this_markerDestroyDisposable; - if (this.destroyed) return; - (_this_markerDestroyDisposable = this.markerDestroyDisposable) === null || _this_markerDestroyDisposable === void 0 ? void 0 : (_this_markerDestroyDisposable_dispose = _this_markerDestroyDisposable.dispose) === null || _this_markerDestroyDisposable_dispose === void 0 ? void 0 : _this_markerDestroyDisposable_dispose.call(_this_markerDestroyDisposable); - this.destroyed = true; - this.emitter.emit("did-destroy"); - this.emitter.dispose(); - } - /** - * Returns whether this decoration is destroyed or not. - * - * @returns {boolean} Whether this decoration is destroyed or not - */ isDestroyed() { - return this.destroyed; - } - /** - * Registers an event listener to the `did-change-properties` event. - * - * This event is triggered when the decoration update method is called. - * - * @param {function(change:Object):void} callback A function to call when the event is triggered - * @returns {Disposable} A disposable to stop listening to the event - */ onDidChangeProperties(callback) { - if (this.destroyed) return; - return this.emitter.on("did-change-properties", callback); - } - /** - * Registers an event listener to the `did-destroy` event. - * - * @param {function():void} callback A function to call when the event is triggered - * @returns {Disposable} A disposable to stop listening to the event - */ onDidDestroy(callback) { - if (this.destroyed) return; - return this.emitter.on("did-destroy", callback); - } - /** - * An id unique across all Decoration objects. - * - * @returns {number} The decoration id - */ getId() { - return this.id; - } - /** - * Returns the marker associated with this Decoration. - * - * @returns {Marker} The decoration's marker - */ getMarker() { - return this.marker; - } - /** - * Check if this decoration is of type `type`. - * - * @param {string | Array} type A type like `'line-number'`, `'line'`, etc. `type` can also be an Array of Strings, - * where it will return true if the decoration's type matches any in the array. - * @returns {boolean} Whether this decoration match the passed-in type - */ isType(type) { - return $2946613f0e118ee7$export$2e2bcd8739ae039.isType(this.properties, type); - } - /** - * Returns the Decoration's properties. - * - * @returns {Object} The decoration's properties - */ getProperties() { - return this.properties; - } - /** - * Update the marker with new properties. Allows you to change the decoration's class. - * - * @param {Object} newProperties The new properties for the decoration - */ setProperties(newProperties) { - if (this.destroyed) return; - const oldProperties = this.properties; - this.properties = newProperties; - this.properties.id = this.id; - this.emitter.emit("did-change-properties", { - oldProperties: oldProperties, - newProperties: newProperties - }); - } -} - - -"use strict"; -class $e6882a2a1b829cb4$export$2e2bcd8739ae039 { - /** Initializes the decorations related properties. */ initializeDecorations(minimap) { - this.minimap = minimap; - if (this.emitter == null) /** - * The minimap emitter, lazily created if not created yet. - * - * @type {Emitter} - * @access private - */ this.emitter = new (0, $cz7Pu$atom.Emitter)(); - else this.emitter = this.minimap.emitter; - /** - * A map with the decoration id as key and the decoration as value. - * - * @type {Object} - * @access private - */ this.decorationsById = new Map(); - /** - * The decorations stored in an array indexed with their marker id. - * - * @type {Object} - * @access private - */ this.decorationsByMarkerId = new Map(); - /** - * The subscriptions to the markers `did-change` event indexed using the marker id. - * - * @type {Object} - * @access private - */ this.decorationMarkerChangedSubscriptions = new Map(); - /** - * The subscriptions to the markers `did-destroy` event indexed using the marker id. - * - * @type {Object} - * @access private - */ this.decorationMarkerDestroyedSubscriptions = new Map(); - /** - * The subscriptions to the decorations `did-change-properties` event indexed using the decoration id. - * - * @type {Object} - * @access private - */ this.decorationUpdatedSubscriptions = new Map(); - /** - * The subscriptions to the decorations `did-destroy` event indexed using the decoration id. - * - * @type {Object} - * @access private - */ this.decorationDestroyedSubscriptions = new Map(); - // is set to true when a minimapElement is destroyed - this.destroyed = false; - } - /** - * Returns all the decorations registered in the current `Minimap`. - * - * @returns {Decoration[]} All the decorations in this `Minimap` - */ getDecorations() { - return [ - ...this.decorationsById.values() - ]; - } - /** - * Registers an event listener to the `did-add-decoration` event. - * - * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be - * called with an event object with the following properties: - * - * - Marker: the marker object that was decorated - * - Decoration: the decoration object that was created - * - * @returns {Disposable} A disposable to stop listening to the event - */ onDidAddDecoration(callback) { - return this.emitter.on("did-add-decoration", callback); - } - /** - * Registers an event listener to the `did-remove-decoration` event. - * - * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be - * called with an event object with the following properties: - * - * - Marker: the marker object that was decorated - * - Decoration: the decoration object that was created - * - * @returns {Disposable} A disposable to stop listening to the event - */ onDidRemoveDecoration(callback) { - return this.emitter.on("did-remove-decoration", callback); - } - /** - * Registers an event listener to the `did-change-decoration` event. - * - * This event is triggered when the marker targeted by the decoration was changed. - * - * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be - * called with an event object with the following properties: - * - * - Marker: the marker object that was decorated - * - Decoration: the decoration object that was created - * - * @returns {Disposable} A disposable to stop listening to the event - */ onDidChangeDecoration(callback) { - return this.emitter.on("did-change-decoration", callback); - } - /** - * Registers an event listener to the `did-change-decoration-range` event. - * - * This event is triggered when the marker range targeted by the decoration was changed. - * - * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be - * called with an event object with the following properties: - * - * - Marker: the marker object that was decorated - * - Decoration: the decoration object that was created - * - * @returns {Disposable} A disposable to stop listening to the event - */ onDidChangeDecorationRange(callback) { - return this.emitter.on("did-change-decoration-range", callback); - } - /** - * Registers an event listener to the `did-update-decoration` event. - * - * This event is triggered when the decoration itself is modified. - * - * @param {function(decoration:Decoration):void} callback A function to call when the event is triggered - * @returns {Disposable} A disposable to stop listening to the event - */ onDidUpdateDecoration(callback) { - return this.emitter.on("did-update-decoration", callback); - } - /** - * Returns the decoration with the passed-in id. - * - * @param {number} id The decoration id - * @returns {Decoration} The decoration with the given id - */ decorationForId(id) { - return this.decorationsById.get(id); - } - /** - * Returns all the decorations that intersect the passed-in row range. - * - * @param {number} startScreenRow The first row of the range - * @param {number} endScreenRow The last row of the range - * @returns {Record} The decorations that intersect the passed-in range - */ decorationsForScreenRowRange(startScreenRow, endScreenRow) { - const decorationsByMarkerId = {}; - const markers = this.findMarkers({ - intersectsScreenRowRange: [ - startScreenRow, - endScreenRow - ] - }); - for(let i = 0, len = markers.length; i < len; i++){ - const marker = markers[i]; - const decorations = this.decorationsByMarkerId.get(marker.id); - if (decorations !== undefined) decorationsByMarkerId[marker.id] = decorations; - } - return decorationsByMarkerId; - } - /** - * Returns the decorations that intersects the passed-in row range in a structured way. - * - * At the first level, the keys are the available decoration types. At the second level, the keys are the row index - * for which there are decorations available. The value is an array containing the decorations that intersects with - * the corresponding row. - * - * @property {Object} line All the line decorations by row - * @property {Decoration[]} line[row] All the line decorations at a given row - * @property {Object} highlight-under All the highlight-under decorations by row - * @property {Decoration[]} highlight-under[row] All the highlight-under decorations at a given row - * @property {Object} highlight-over All the highlight-over decorations by row - * @property {Decoration[]} highlight-over[row] All the highlight-over decorations at a given row - * @property {Object} highlight-outine All the highlight-outine decorations by row - * @property {Decoration[]} highlight-outine[row] All the highlight-outine decorations at a given row - * @returns {Object} The decorations grouped by type and then rows - */ decorationsByTypeThenRows() { - if (this.decorationsByTypeThenRowsCache != null) return this.decorationsByTypeThenRowsCache; - const cache = {}; - const decorations = this.decorationsById.values(); - for (const decoration of decorations){ - const range = decoration.marker.getScreenRange(); - const type = decoration.getProperties().type; - if (cache[type] == null) cache[type] = {}; - for(let row = range.start.row, len = range.end.row; row <= len; row++){ - if (cache[type][row] == null) cache[type][row] = []; - cache[type][row].push(decoration); - } - } - /** - * The grouped decorations cache. - * - * @type {Object} - * @access private - */ this.decorationsByTypeThenRowsCache = cache; - return cache; - } - /** Invalidates the decoration by screen rows cache. */ invalidateDecorationForScreenRowsCache() { - this.decorationsByTypeThenRowsCache = null; - } - /** - * Adds a decoration that tracks a `Marker`. When the marker moves, is invalidated, or is destroyed, the decoration - * will be updated to reflect the marker's state. - * - * @fires {did-add-decoration} when The decoration is created successfully - * @fires {did-change} when The decoration is created successfully - * @param {Marker} marker The marker you want this decoration to follow - * @param {Object} decorationParams The decoration properties - * @param {string} decorationParams.type The decoration type in the following list: - * - * - **line**: Fills the line background with the decoration color. - * - **highlight**: Renders a colored rectangle on the minimap. The highlight is rendered above the line's text. - * - **highlight-over**: Same as **highlight**. - * - **highlight-under**: Renders a colored rectangle on the minimap. The highlight is rendered below the line's text. - * - **highlight-outline**: Renders a colored outline on the minimap. The highlight box is rendered above the line's text. - * - **foreground-custom**: A decoration type for which you have the control over the render routine. Note that your - * routine should implement a render on a per-line basis to avoid any side-effect with the offset bitmap cache - * mechanism. These decorations are rendred on the foreground decorations layer. - * - **background-custom**: A decoration type for which you have the control over the render routine. Note that your - * routine should implement a render on a per-line basis to avoid any side-effect with the offset bitmap cache - * mechanism. These decorations are rendred on the background decorations layer. - * - * @param {string} [decorationParams.class] The CSS class to use to retrieve the background color of the decoration by - * building a scop corresponding to `.minimap .editor ` - * @param {string} [decorationParams.scope] The scope to use to retrieve the decoration background. Note that if the - * `scope` property is set, the `class` won't be used. - * @param {string} [decorationParams.color] The CSS color to use to render the decoration. When set, neither `scope` - * nor `class` are used. - * @param {string} [decorationParams.plugin] The name of the plugin that created this decoration. It'll be used to - * order the decorations on the same layer and that are overlapping. If the parameter is omitted the Minimap will - * attempt to infer the plugin origin from the path of the caller function. - * @param {function} [decorationParams.render] The render routine for custom decorations. The function receives the - * decoration and the render data for the current render pass. - * @returns {Decoration} The created decoration - */ decorateMarker(marker, decorationParams) { - if (this.destroyed || this.minimap.destroyed || marker == null) return; - const { id: id } = marker; - if (decorationParams.type === "highlight") decorationParams.type = "highlight-over"; - const { type: type, plugin: plugin } = decorationParams; - if (plugin == null) decorationParams.plugin = $e6882a2a1b829cb4$var$getOriginatorPackageName(); - if (decorationParams.scope == null && decorationParams.class != null) { - const cls = decorationParams.class.split(" ").join("."); - decorationParams.scope = `.minimap .${cls}`; - } - if (!this.decorationMarkerDestroyedSubscriptions.has(id)) this.decorationMarkerDestroyedSubscriptions.set(id, marker.onDidDestroy(()=>{ - this.removeAllDecorationsForMarker(marker); - })); - if (!this.decorationMarkerChangedSubscriptions.has(id)) this.decorationMarkerChangedSubscriptions.set(id, marker.onDidChange((event)=>{ - const decorations = this.decorationsByMarkerId.get(id); - const screenRange = marker.getScreenRange(); - this.invalidateDecorationForScreenRowsCache(); - if (decorations !== undefined) for(let i = 0, len = decorations.length; i < len; i++){ - const decoration = decorations[i]; - this.emitter.emit("did-change-decoration", { - marker: marker, - decoration: decoration, - event: event - }); - this.emitDecorationChanges(decoration.type, decoration); - decoration.screenRange = screenRange; - } - let oldStart = event.oldTailScreenPosition; - let oldEnd = event.oldHeadScreenPosition; - let newStart = event.newTailScreenPosition; - let newEnd = event.newHeadScreenPosition; - if (oldStart.row > oldEnd.row) [oldStart, oldEnd] = [ - oldEnd, - oldStart - ]; - if (newStart.row > newEnd.row) [newStart, newEnd] = [ - newEnd, - newStart - ]; - const rangesDiffs = $e6882a2a1b829cb4$var$computeRangesDiffs(oldStart, oldEnd, newStart, newEnd); - for(let i = 0, len = rangesDiffs.length; i < len; i++){ - const [start, end] = rangesDiffs[i]; - this.emitRangeChanges(type, { - start: start, - end: end - }, 0); - } - })); - const decoration = new (0, $2946613f0e118ee7$export$2e2bcd8739ae039)(marker, this, decorationParams); - if (!this.decorationsByMarkerId.has(id)) this.decorationsByMarkerId.set(id, []); - this.decorationsByMarkerId.get(id).push(decoration); - this.decorationsById.set(decoration.id, decoration); - if (!this.decorationUpdatedSubscriptions.has(decoration.id)) this.decorationUpdatedSubscriptions.set(decoration.id, decoration.onDidChangeProperties((event)=>{ - this.emitDecorationChanges(type, decoration); - })); - this.decorationDestroyedSubscriptions.set(decoration.id, decoration.onDidDestroy(()=>{ - this.removeDecoration(decoration); - })); - this.emitDecorationChanges(type, decoration); - this.emitter.emit("did-add-decoration", { - marker: marker, - decoration: decoration - }); - return decoration; - } - /** - * Emits a change in the `Minimap` corresponding to the passed-in decoration. - * - * @param {string} type The type of decoration that changed - * @param {Decoration} decoration The decoration for which emitting an event - * @access private - */ emitDecorationChanges(type, decoration) { - if (this.destroyed || this.minimap.editorDestroyed()) return; - this.invalidateDecorationForScreenRowsCache(); - const range = decoration.screenRange; - if (!range.start || !range.end) return; - this.emitRangeChanges(type, range, 0); - } - /** - * Emits a change for the specified range. - * - * @param {string} type The type of decoration that changed - * @param {Object} range The range where changes occured - * @param {number} [screenDelta] An optional screen delta for the change object - * @access private - */ emitRangeChanges(type, range, screenDelta) { - const startScreenRow = range.start.row; - const endScreenRow = range.end.row; - const lastRenderedScreenRow = this.minimap.getLastVisibleScreenRow(); - const firstRenderedScreenRow = this.minimap.getFirstVisibleScreenRow(); - if (screenDelta == null) screenDelta = lastRenderedScreenRow - firstRenderedScreenRow - (endScreenRow - startScreenRow); - const changeEvent = { - start: startScreenRow, - end: endScreenRow, - screenDelta: screenDelta, - type: type - }; - this.emitter.emit("did-change-decoration-range", changeEvent); - } - /** - * Removes a `Decoration` from this minimap. - * - * @fires {did-change} when The decoration is removed - * @fires {did-remove-decoration} when The decoration is removed - * @param {Decoration} decoration The decoration to remove - */ removeDecoration(decoration) { - if (decoration == null) return; - const marker = decoration.marker; - let subscription; - this.decorationsById.delete(decoration.id); - subscription = this.decorationUpdatedSubscriptions.get(decoration.id); - if (subscription !== undefined) subscription.dispose(); - subscription = this.decorationDestroyedSubscriptions.get(decoration.id); - if (subscription !== undefined) subscription.dispose(); - this.decorationUpdatedSubscriptions.delete(decoration.id); - this.decorationDestroyedSubscriptions.delete(decoration.id); - const decorations = this.decorationsByMarkerId.get(marker.id); - if (decorations === undefined) return; - this.emitDecorationChanges(decoration.getProperties().type, decoration); - const index = decorations.indexOf(decoration); - if (index > -1) { - decorations.splice(index, 1); - this.emitter.emit("did-remove-decoration", { - marker: marker, - decoration: decoration - }); - if (decorations.length === 0) this.removedAllMarkerDecorations(marker); - } - } - /** - * Removes all the decorations registered for the passed-in marker. - * - * @fires {did-change} when A decoration have been removed - * @fires {did-remove-decoration} when A decoration have been removed - * @param {Marker} marker The marker for which removing its decorations - */ removeAllDecorationsForMarker(marker) { - if (marker == null) return; - const decorations = this.decorationsByMarkerId.get(marker.id); - if (decorations === undefined) return; - for(let i = 0, len = decorations.length; i < len; i++){ - const decoration = decorations[i]; - if (!this.destroyed && !this.minimap.editorDestroyed()) this.emitDecorationChanges(decoration.getProperties().type, decoration); - this.emitter.emit("did-remove-decoration", { - marker: marker, - decoration: decoration - }); - } - this.removedAllMarkerDecorations(marker); - } - /** - * Performs the removal of a decoration for a given marker. - * - * @param {Marker} marker The marker for which removing decorations - * @access private - */ removedAllMarkerDecorations(marker) { - if (marker == null) return; - this.decorationMarkerChangedSubscriptions.get(marker.id).dispose(); - this.decorationMarkerDestroyedSubscriptions.get(marker.id).dispose(); - this.decorationsByMarkerId.delete(marker.id); - this.decorationMarkerChangedSubscriptions.delete(marker.id); - this.decorationMarkerDestroyedSubscriptions.delete(marker.id); - } - /** Removes all the decorations that was created in the current `Minimap`. */ removeAllDecorations() { - const decorationMarkerChangedSubscriptionsValues = this.decorationMarkerChangedSubscriptions.values(); - for (const decoration of decorationMarkerChangedSubscriptionsValues)decoration.dispose(); - const decorationMarkerDestroyedSubscriptionsValues = this.decorationMarkerDestroyedSubscriptions.values(); - for (const decoration of decorationMarkerDestroyedSubscriptionsValues)decoration.dispose(); - const decorationUpdatedSubscriptionsValues = this.decorationUpdatedSubscriptions.values(); - for (const decoration of decorationUpdatedSubscriptionsValues)decoration.dispose(); - const decorationDestroyedSubscriptionsValues = this.decorationDestroyedSubscriptions.values(); - for (const decoration of decorationDestroyedSubscriptionsValues)decoration.dispose(); - const decorationsByIdValues = this.decorationsById.values(); - for (const decoration of decorationsByIdValues)decoration.destroy(); - this.decorationsById.clear(); - this.decorationsByMarkerId.clear(); - this.decorationMarkerChangedSubscriptions.clear(); - this.decorationMarkerDestroyedSubscriptions.clear(); - this.decorationUpdatedSubscriptions.clear(); - this.decorationDestroyedSubscriptions.clear(); - } - destroy() { - this.removeAllDecorations(); - this.minimap = undefined; - this.emitter = undefined; - this.destroyed = true; - } -} -function $e6882a2a1b829cb4$var$getOriginatorPackageName() { - const line = new Error().stack.split("\n")[3]; - const filePath = line.split("(")[1].replace(")", ""); - const re = new RegExp(atom.packages.getPackageDirPaths().join("|") + (0, $bN1tE.escapeRegExp)((0, ($parcel$interopDefault($cz7Pu$path))).sep)); - const plugin = filePath.replace(re, "").split((0, ($parcel$interopDefault($cz7Pu$path))).sep)[0].replace(/minimap-|-minimap/, ""); - return plugin.indexOf((0, ($parcel$interopDefault($cz7Pu$path))).sep) < 0 ? plugin : undefined; -} -/** - * Given two ranges, it returns an array of ranges representing the differences between them. - * - * @param {number} oldStart The row index of the first range start - * @param {number} oldEnd The row index of the first range end - * @param {number} newStart The row index of the second range start - * @param {number} newEnd The row index of the second range end - * @returns {Object[]} The array of diff ranges - * @access private - */ function $e6882a2a1b829cb4$var$computeRangesDiffs(oldStart, oldEnd, newStart, newEnd) { - const diffs = []; - if (oldStart.isLessThan(newStart)) diffs.push([ - oldStart, - newStart - ]); - else if (newStart.isLessThan(oldStart)) diffs.push([ - newStart, - oldStart - ]); - if (oldEnd.isLessThan(newEnd)) diffs.push([ - oldEnd, - newEnd - ]); - else if (newEnd.isLessThan(oldEnd)) diffs.push([ - newEnd, - oldEnd - ]); - return diffs; -} - - - - -var $bN1tE = parcelRequire("bN1tE"); - -var $d28sD = parcelRequire("d28sD"); - -/** @babel */ "use strict"; -class $d134b6b493ace50c$export$2e2bcd8739ae039 { - constructor(){ - /** - * The onscreen canvas. - * - * @type {HTMLCanvasElement} - */ this.canvas = document.createElement("canvas"); - const desynchronized = false // TODO Electron 9 has color issues #786 - ; - /** - * The onscreen canvas context. - * - * @type {CanvasRenderingContext2D} - */ this.context = this.canvas.getContext("2d", { - desynchronized: desynchronized - }); - this.canvas.webkitImageSmoothingEnabled = false; - this.context.imageSmoothingEnabled = false; - /** - * The offscreen canvas. - * - * @type {HTMLCanvasElement} - * @access private - */ this.offscreenCanvas = document.createElement("canvas"); - /** - * The offscreen canvas context. - * - * @type {CanvasRenderingContext2D} - * @access private - */ this.offscreenContext = this.offscreenCanvas.getContext("2d", { - desynchronized: desynchronized - }); - this.offscreenCanvas.webkitImageSmoothingEnabled = false; - this.offscreenContext.imageSmoothingEnabled = false; - } - attach(parent) { - if (this.canvas.parentNode) return; - parent.appendChild(this.canvas); - } - setSize(width = 0, height = 0) { - this.canvas.width = width; - this.canvas.height = height; - this.context.imageSmoothingEnabled = false; - this.resetOffscreenSize(); - } - getSize() { - return { - width: this.canvas.width, - height: this.canvas.height - }; - } - resetOffscreenSize() { - this.offscreenCanvas.width = this.canvas.width; - this.offscreenCanvas.height = this.canvas.height; - this.offscreenContext.imageSmoothingEnabled = false; - } - copyToOffscreen() { - if (this.canvas.width > 0 && this.canvas.height > 0) this.offscreenContext.drawImage(this.canvas, 0, 0); - } - copyFromOffscreen() { - if (this.offscreenCanvas.width > 0 && this.offscreenCanvas.height > 0) this.context.drawImage(this.offscreenCanvas, 0, 0); - } - copyPartFromOffscreen(srcY, destY, height) { - if (this.offscreenCanvas.width > 0 && this.offscreenCanvas.height > 0) this.context.drawImage(this.offscreenCanvas, 0, srcY, this.offscreenCanvas.width, height, 0, destY, this.offscreenCanvas.width, height); - } - clearCanvas() { - this.context.clearRect(0, 0, this.canvas.width, this.canvas.height); - } -} - - -"use strict"; -const $bd9d1375728dda14$var$SPEC_MODE = atom.inSpecMode(); -// an instance of MinimapElement used for testing and calling spies -let $bd9d1375728dda14$var$thisSpec; -class $bd9d1375728dda14$export$2e2bcd8739ae039 extends (0, (/*@__PURE__*/$parcel$interopDefault($d28sD))) { - /** Initializes the canvas elements needed to perform the `Minimap` rendering. */ initializeCanvas() { - if ($bd9d1375728dda14$var$SPEC_MODE) { - // class methods only used for spying the calls - this.drawLines = (firstLine, lastLine)=>{ - console.log({ - firstLine: firstLine, - lastLine: lastLine - }); - }; - this.drawLineDecoration = $bd9d1375728dda14$var$drawLineDecoration; - this.drawGutterDecoration = $bd9d1375728dda14$var$drawGutterDecoration; - this.drawHighlightDecoration = $bd9d1375728dda14$var$drawHighlightDecoration; - this.drawHighlightOutlineDecoration = $bd9d1375728dda14$var$drawHighlightOutlineDecoration; - this.drawCustomDecoration = $bd9d1375728dda14$var$drawCustomDecoration; - this.StyleReader = (0, $e6ccb2de5b0684dd$export$4d3d19fa8673fd3e); - $bd9d1375728dda14$var$thisSpec = this; - } - /** - * The main canvas layer where lines are rendered. - * - * @type {CanvasLayer} - */ this.tokensLayer = new (0, $d134b6b493ace50c$export$2e2bcd8739ae039)(); - /** - * The canvas layer for decorations below the text. - * - * @type {CanvasLayer} - */ this.backLayer = new (0, $d134b6b493ace50c$export$2e2bcd8739ae039)(); - /** - * The canvas layer for decorations above the text. - * - * @type {CanvasLayer} - */ this.frontLayer = new (0, $d134b6b493ace50c$export$2e2bcd8739ae039)(); - if (!this.pendingChanges) /** - * Stores the changes from the text editor. - * - * @type {Object[]} - * @access private - */ this.pendingChanges = []; - if (!this.pendingBackDecorationChanges) /** - * Stores the changes from the minimap back decorations. - * - * @type {Object[]} - * @access private - */ this.pendingBackDecorationChanges = []; - if (!this.pendingFrontDecorationChanges) /** - * Stores the changes from the minimap front decorations. - * - * @type {Object[]} - * @access private - */ this.pendingFrontDecorationChanges = []; - // the maximum number of tokens to render in one line - this.maxTokensInOneLine = atom.config.get("minimap.maxTokensInOneLine"); - } - /** - * Returns the uppermost canvas in the MinimapElement. - * - * @returns {HTMLCanvasElement} The html canvas element - */ getFrontCanvas() { - return this.frontLayer.canvas; - } - /** - * Attaches the canvases into the specified container. - * - * @param {HTMLElement} parent The canvases' container - * @access private - */ attachCanvases(parent) { - this.backLayer.attach(parent); - this.tokensLayer.attach(parent); - this.frontLayer.attach(parent); - } - /** - * Changes the size of all the canvas layers at once. - * - * @param {number} width The new width for the three canvases - * @param {number} height The new height for the three canvases - * @access private - */ setCanvasesSize(width, height) { - this.backLayer.setSize(width, height); - this.tokensLayer.setSize(width, height); - this.frontLayer.setSize(width, height); - } - /** Performs an update of the rendered `Minimap` based on the changes registered in the instance. */ updateCanvas() { - const firstRow = this.minimap.getFirstVisibleScreenRow(); - const lastRow = this.minimap.getLastVisibleScreenRow(); - const devicePixelRatio = this.minimap.getDevicePixelRatio(); - const lineHeight = this.minimap.getLineHeight() * devicePixelRatio; - const charHeight = this.minimap.getCharHeight() * devicePixelRatio; - const charWidth = this.minimap.getCharWidth() * devicePixelRatio; - const { width: canvasWidth, height: canvasHeight } = this.tokensLayer.getSize(); - const editor = this.minimap.getTextEditor(); - const editorElement = this.minimap.getTextEditorElement(); - // TODO avoid closure: https://stackoverflow.com/a/46256398/7910299 - const getTokenColorClosure = this.displayCodeHighlights ? (scopes)=>$bd9d1375728dda14$var$getTokenColor(scopes, editorElement, this.textOpacity) : ()=>$bd9d1375728dda14$var$getDefaultColor(editorElement, this.textOpacity); - $bd9d1375728dda14$var$updateTokensLayer(this.tokensLayer, firstRow, lastRow, this.offscreenFirstRow, this.offscreenLastRow, this.pendingChanges, lineHeight, charHeight, charWidth, canvasWidth, editor, editor.getScreenLineCount(), $bd9d1375728dda14$var$getInvisibleRegExp(editor), getTokenColorClosure, this.ignoreWhitespacesInTokens, this.maxTokensInOneLine); - if ($bd9d1375728dda14$var$SPEC_MODE) // call the spy for drawLines which is used inside updateTokensLayer - this.drawLines(firstRow, lastRow); - const decorations = this.DecorationManagement.decorationsByTypeThenRows(firstRow, lastRow); - const renderData = { - context: this.backLayer.context, - canvasWidth: canvasWidth, - canvasHeight: canvasHeight, - lineHeight: lineHeight, - charWidth: charWidth, - charHeight: charHeight, - orders: $d6bb1451a6029905$export$b9b9891832107981() - }; - const drawCustomDecorationLambda = (decoration, data, decorationColor)=>$bd9d1375728dda14$var$drawCustomDecoration(decoration, data, decorationColor, editorElement); - $bd9d1375728dda14$var$backgroundDecorationDispatcher["background-custom"] = drawCustomDecorationLambda; - $bd9d1375728dda14$var$frontDecorationDispatcher["foreground-custom"] = drawCustomDecorationLambda; - $bd9d1375728dda14$var$updateBackDecorationsLayer(this.backLayer, firstRow, lastRow, this.offscreenFirstRow, this.offscreenLastRow, this.pendingBackDecorationChanges, renderData, lineHeight, editorElement, decorations); - renderData.context = this.frontLayer.context; - $bd9d1375728dda14$var$updateFrontDecorationsLayer(this.frontLayer, firstRow, lastRow, this.offscreenFirstRow, this.offscreenLastRow, this.pendingFrontDecorationChanges, renderData, lineHeight, editorElement, decorations); - this.pendingChanges = []; - this.pendingBackDecorationChanges = []; - this.pendingFrontDecorationChanges = []; - /** - * The first row in the last render of the offscreen canvas. - * - * @type {number} - * @access private - */ this.offscreenFirstRow = firstRow; - /** - * The last row in the last render of the offscreen canvas. - * - * @type {number} - * @access private - */ this.offscreenLastRow = lastRow; - } -} -// ######## ######## ### ## ## -// ## ## ## ## ## ## ## ## ## -// ## ## ## ## ## ## ## ## ## -// ## ## ######## ## ## ## ## ## -// ## ## ## ## ######### ## ## ## -// ## ## ## ## ## ## ## ## ## -// ######## ## ## ## ## ### ### -/** - * Performs an update of the tokens layer using the pending changes array. - * - * @param {CanvasLayer} tokensLayer - * @param {number} firstRow FirstRow the first row of the range to update - * @param {number} lastRow LastRow the last row of the range to update - * @param {number} offscreenFirstRow - * @param {number} offscreenLastRow - * @param {Array<>} pendingChanges - * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio - * @param {number} charHeight This.minimap.getCharHeight() * devicePixelRatio - * @param {number} charWidth This.minimap.getCharWidth() * devicePixelRatio - * @param {number} canvasWidth This.tokensLayer.getSize().width - * @param {TextEditor} editor This.minimap.getTextEditor() - * @param {(t: Token) => string} getTokenColorClosure - * @param {boolean} ignoreWhitespacesInTokens This.ignoreWhitespacesInTokens - * @param {number} maxTokensInOneLine This.maxTokensInOneLine - * @access private - */ function $bd9d1375728dda14$var$updateTokensLayer(tokensLayer, firstRow, lastRow, offscreenFirstRow, offscreenLastRow, pendingChanges, lineHeight, charHeight, charWidth, canvasWidth, editor, editorScreenLineCount, invisibleRegExp, getTokenColorClosure, ignoreWhitespacesInTokens, maxTokensInOneLine) { - // NOTE: this method is the hot function of Minimap. Do not refactor. The code is inlined delibarately. - const intactRanges = $bd9d1375728dda14$var$computeIntactRanges(firstRow, lastRow, pendingChanges, offscreenFirstRow, offscreenLastRow); - // redrawRangesOnLayer - const context = tokensLayer.context; - tokensLayer.clearCanvas(); - if (intactRanges.length === 0) $bd9d1375728dda14$var$drawLines(firstRow, lastRow, 0, lineHeight, charHeight, charWidth, canvasWidth, context, editor, editorScreenLineCount, invisibleRegExp, getTokenColorClosure, ignoreWhitespacesInTokens, maxTokensInOneLine); - else { - for(let j = 0, len = intactRanges.length; j < len; j++){ - const intact = intactRanges[j]; - tokensLayer.copyPartFromOffscreen(intact.offscreenRow * lineHeight, (intact.start - firstRow) * lineHeight, (intact.end - intact.start) * lineHeight); - } - // drawLinesForRanges - let currentRow = firstRow; - for(let i = 0, len = intactRanges.length; i < len; i++){ - const range = intactRanges[i]; - $bd9d1375728dda14$var$drawLines(currentRow, range.start, currentRow - firstRow, lineHeight, charHeight, charWidth, canvasWidth, context, editor, editorScreenLineCount, invisibleRegExp, getTokenColorClosure, ignoreWhitespacesInTokens, maxTokensInOneLine); - currentRow = range.end; - } - if (currentRow <= lastRow) $bd9d1375728dda14$var$drawLines(currentRow, lastRow, currentRow - firstRow, lineHeight, charHeight, charWidth, canvasWidth, context, editor, editorScreenLineCount, invisibleRegExp, getTokenColorClosure, ignoreWhitespacesInTokens, maxTokensInOneLine); - } - tokensLayer.resetOffscreenSize(); - tokensLayer.copyToOffscreen(); -} -/** - * Performs an update of the back decorations layer using the pending back decorations changes arrays. - * - * @param {CanvasLayer} backLayer - * @param {number} firstRow FirstRow the first row of the range to update - * @param {number} lastRow LastRow the last row of the range to update - * @param {number} offscreenFirstRow - * @param {number} offscreenLastRow - * @param {Array<>} pendingBackDecorationChanges - * @param {Object} renderData - * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio - * @param {TextEditorElement} editorElement This.minimap.getTextEditorElement() - * @param {Decoration[]} decorations - * @access private - */ function $bd9d1375728dda14$var$updateBackDecorationsLayer(backLayer, firstRow, lastRow, offscreenFirstRow, offscreenLastRow, pendingBackDecorationChanges, renderData, lineHeight, editorElement, decorations) { - const intactRanges = $bd9d1375728dda14$var$computeIntactRanges(firstRow, lastRow, pendingBackDecorationChanges, offscreenFirstRow, offscreenLastRow); - // NOTE: this method is the hot function of Minimap. Do not refactor. The code is inlined delibarately. - // redrawRangesOnLayer - backLayer.clearCanvas(); - if (intactRanges.length === 0) $bd9d1375728dda14$var$drawBackDecorationsForLines(firstRow, lastRow, 0, renderData, lineHeight, editorElement, decorations); - else { - for(let j = 0, len = intactRanges.length; j < len; j++){ - const intact = intactRanges[j]; - backLayer.copyPartFromOffscreen(intact.offscreenRow * lineHeight, (intact.start - firstRow) * lineHeight, (intact.end - intact.start) * lineHeight); - } - // drawLinesForRanges - let currentRow = firstRow; - for(let i = 0, len = intactRanges.length; i < len; i++){ - const range = intactRanges[i]; - $bd9d1375728dda14$var$drawBackDecorationsForLines(currentRow, range.start, currentRow - firstRow, renderData, lineHeight, editorElement, decorations); - currentRow = range.end; - } - if (currentRow <= lastRow) $bd9d1375728dda14$var$drawBackDecorationsForLines(currentRow, lastRow, currentRow - firstRow, renderData, lineHeight, editorElement, decorations); - } - backLayer.resetOffscreenSize(); - backLayer.copyToOffscreen(); -} -/** - * Performs an update of the front decorations layer using the pending front decorations changes arrays. - * - * @param {CanvasLayer} frontLayer - * @param {number} firstRow FirstRow the first row of the range to update - * @param {number} lastRow LastRow the last row of the range to update - * @param {number} offscreenFirstRow - * @param {number} offscreenLastRow - * @param {Array<>} pendingFrontDecorationChanges - * @param {Object} renderData - * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio - * @param {TextEditorElement} editorElement This.minimap.getTextEditorElement() - * @param {Decoration[]} decorations - * @access private - */ function $bd9d1375728dda14$var$updateFrontDecorationsLayer(frontLayer, firstRow, lastRow, offscreenFirstRow, offscreenLastRow, pendingFrontDecorationChanges, renderData, lineHeight, editorElement, decorations) { - const intactRanges = $bd9d1375728dda14$var$computeIntactRanges(firstRow, lastRow, pendingFrontDecorationChanges, offscreenFirstRow, offscreenLastRow); - // NOTE: this method is the hot function of Minimap. Do not refactor. The code is inlined delibarately. - // redrawRangesOnLayer - frontLayer.clearCanvas(); - if (intactRanges.length === 0) $bd9d1375728dda14$var$drawFrontDecorationsForLines(firstRow, lastRow, 0, renderData, lineHeight, editorElement, decorations); - else { - for(let j = 0, len = intactRanges.length; j < len; j++){ - const intact = intactRanges[j]; - frontLayer.copyPartFromOffscreen(intact.offscreenRow * lineHeight, (intact.start - firstRow) * lineHeight, (intact.end - intact.start) * lineHeight); - } - // drawLinesForRanges - let currentRow = firstRow; - for(let i = 0, len = intactRanges.length; i < len; i++){ - const range = intactRanges[i]; - $bd9d1375728dda14$var$drawFrontDecorationsForLines(currentRow, range.start, currentRow - firstRow, renderData, lineHeight, editorElement, decorations); - currentRow = range.end; - } - if (currentRow <= lastRow) $bd9d1375728dda14$var$drawFrontDecorationsForLines(currentRow, lastRow, currentRow - firstRow, renderData, lineHeight, editorElement, decorations); - } - frontLayer.resetOffscreenSize(); - frontLayer.copyToOffscreen(); -} -const $bd9d1375728dda14$var$whitespaceTokenRegex = /^\s+$/; -const $bd9d1375728dda14$var$oneOrMoreWhiteSpaceRegexp = /\s+/; -/** - * Draws a single token on the given context. - * - * @param {CanvasRenderingContext2D} context The target canvas context - * @param {string} text The token's text content - * @param {string} color The token's CSS color - * @param {number} x The x position of the token in the line - * @param {number} y The y position of the line in the minimap - * @param {number} charWidth The width of a character in the minimap - * @param {number} charHeight The height of a character in the minimap - * @returns {number} The x position at the end of the token - * @access private - */ function $bd9d1375728dda14$var$drawToken(context, text, color, x, y, charWidth, charHeight, ignoreWhitespacesInTokens) { - context.fillStyle = color; - if (ignoreWhitespacesInTokens) { - const length = text.length * charWidth; - context.fillRect(x, y, length, charHeight); - return x + length; - } else { - let chars = 0; - for(let j = 0, len = text.length; j < len; j++){ - const char = text[j]; - if (char === " ") { - if (chars > 0) context.fillRect(x - chars * charWidth, y, chars * charWidth, charHeight); - chars = 0; - } else chars++; - x += charWidth; - } - if (chars > 0) context.fillRect(x - chars * charWidth, y, chars * charWidth, charHeight); - return x; - } -} -/** - * Draws lines on the corresponding layer. - * - * The lines range to draw is specified by the `firstRow` and `lastRow` parameters. - * - * @param {number} firstRow The first row to render - * @param {number} lastRow The last row to render - * @param {number} offsetRow The relative offset to apply to rows when rendering them - * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio - * @param {number} charHeight This.minimap.getCharHeight() * devicePixelRatio - * @param {number} charWidth This.minimap.getCharWidth() * devicePixelRatio - * @param {number} canvasWidth This.tokensLayer.getSize().width - * @param {CanvasRenderingContext2D} context This.tokensLayer.context - * @param {TextEditor} editor This.minimap.getTextEditor() - * @param {number} editorScreenLineCount - * @param {RegExp} invisibleRegExp - * @param {(t: Token) => string} getTokenColorClosure - * @param {boolean} ignoreWhitespacesInTokens This.ignoreWhitespacesInTokens - * @param {number} maxTokensInOneLine This.maxTokensInOneLine - * @access private - */ function $bd9d1375728dda14$var$drawLines(firstRow, lastRow, offsetRow, lineHeight, charHeight, charWidth, canvasWidth, context, editor, editorScreenLineCount, invisibleRegExp, getTokenColorClosure, ignoreWhitespacesInTokens, maxTokensInOneLine) { - // NOTE: this method is the hot function of Minimap. Do not refactor. The code is inlined delibarately. - if (firstRow > lastRow) return; - let lastLine, x; - let y = offsetRow * lineHeight - lineHeight; - // eachTokenForScreenRows - lastRow = Math.min(lastRow, editorScreenLineCount); - for(let line = firstRow; line < lastRow; line++){ - const editorTokensForScreenRow = editor.tokensForScreenRow(line); - const numToken = editorTokensForScreenRow.length; - const numTokenToRender = Math.min(numToken, maxTokensInOneLine); - if (lastLine !== line) { - x = 0; - y += lineHeight; - lastLine = line; - context.clearRect(x, y, canvasWidth, lineHeight); - } - for(let iToken = 0; iToken < numTokenToRender; iToken++){ - const token = editorTokensForScreenRow[iToken]; - const tokenText = token.text.replace(invisibleRegExp, " "); - const tokenScopes = token.scopes; - if (x > canvasWidth) continue; - if ($bd9d1375728dda14$var$whitespaceTokenRegex.test(tokenText)) x += tokenText.length * charWidth; - else x = $bd9d1375728dda14$var$drawToken(context, tokenText, getTokenColorClosure(tokenScopes), x, y, charWidth, charHeight, ignoreWhitespacesInTokens); - } - } - context.fill(); -} -/** - * Returns the regexp to replace invisibles substitution characters in editor lines. - * - * @param {TextEditor} editor - * @returns {RegExp} The regular expression to match invisible characters - * @access private - */ function $bd9d1375728dda14$var$getInvisibleRegExp(editor) { - const invisibles = editor.getInvisibles(); - const regexp = []; - if (invisibles.cr != null) regexp.push(invisibles.cr); - if (invisibles.eol != null) regexp.push(invisibles.eol); - if (invisibles.space != null) regexp.push(invisibles.space); - if (invisibles.tab != null) regexp.push(invisibles.tab); - if (regexp.length !== 0) return RegExp(regexp.filter((s)=>{ - return typeof s === "string"; - }).map((0, $bN1tE.escapeRegExp)).join("|"), "g"); - else return null; -} -/** - * Dispatchers for decoration drawing (custom decoration drawer added dynamically) - * - * @param {Object} backgroundDecorationDispatcher An object with the type to render as key and the render method as value - */ const $bd9d1375728dda14$var$backgroundDecorationDispatcher = { - line: $bd9d1375728dda14$var$drawLineDecoration, - "highlight-under": $bd9d1375728dda14$var$drawHighlightDecoration -}; -/** - * Dispatchers for decoration drawing (custom decoration drawer added dynamically) - * - * @param {Object} frontDecorationDispatcher An object with the type to render as key and the render method as value - */ const $bd9d1375728dda14$var$frontDecorationDispatcher = { - gutter: $bd9d1375728dda14$var$drawGutterDecoration, - "highlight-over": $bd9d1375728dda14$var$drawHighlightDecoration, - "highlight-outline": $bd9d1375728dda14$var$drawHighlightOutlineDecoration -}; -/** - * Draws a line decoration. - * - * @param {Decoration} decoration The decoration to render - * @param {Object} data The data need to perform the render - * @param {string} decorationColor Decoration color - * @access private - */ function $bd9d1375728dda14$var$drawLineDecoration(decoration, data, decorationColor) { - const { context: context, lineHeight: lineHeight, canvasWidth: canvasWidth, yRow: yRow } = data; - context.fillStyle = decorationColor; - context.fillRect(0, yRow, canvasWidth, lineHeight); -} -/** - * Draws a gutter decoration. - * - * @param {Decoration} decoration The decoration to render - * @param {Object} data The data need to perform the render - * @param {string} decorationColor Decoration color - * @access private - */ function $bd9d1375728dda14$var$drawGutterDecoration(decoration, data, decorationColor) { - const { context: context, lineHeight: lineHeight, yRow: yRow } = data; - context.fillStyle = decorationColor; - context.fillRect(0, yRow, 1, lineHeight); -} -/** - * Draws a highlight decoration. - * - * It renders only the part of the highlight corresponding to the specified row. - * - * @param {Decoration} decoration The decoration to render - * @param {Object} data The data need to perform the render - * @param {string} decorationColor Decoration color - * @access private - */ function $bd9d1375728dda14$var$drawHighlightDecoration(decoration, data, decorationColor) { - const { context: context, lineHeight: lineHeight, charWidth: charWidth, canvasWidth: canvasWidth, screenRow: screenRow, yRow: yRow } = data; - const range = decoration.getMarker().getScreenRange(); - const rowSpan = range.end.row - range.start.row; - context.fillStyle = decorationColor; - if (rowSpan === 0) { - const colSpan = range.end.column - range.start.column; - context.fillRect(range.start.column * charWidth, yRow, colSpan * charWidth, lineHeight); - } else if (screenRow === range.start.row) { - const x = range.start.column * charWidth; - context.fillRect(x, yRow, canvasWidth - x, lineHeight); - } else if (screenRow === range.end.row) context.fillRect(0, yRow, range.end.column * charWidth, lineHeight); - else context.fillRect(0, yRow, canvasWidth, lineHeight); -} -/** - * Draws a highlight outline decoration. - * - * It renders only the part of the highlight corresponding to the specified row. - * - * @param {Decoration} decoration The decoration to render - * @param {Object} data The data need to perform the render - * @param {string} decorationColor Decoration color - * @access private - */ function $bd9d1375728dda14$var$drawHighlightOutlineDecoration(decoration, data, decorationColor) { - const { context: context, lineHeight: lineHeight, charWidth: charWidth, canvasWidth: canvasWidth, screenRow: screenRow, yRow: yRow } = data; - let bottomWidth, colSpan, width, xBottomStart, xEnd, xStart; - const range = decoration.getMarker().getScreenRange(); - const rowSpan = range.end.row - range.start.row; - const yStart = yRow; - const yEnd = yStart + lineHeight; - context.fillStyle = decorationColor; - if (rowSpan === 0) { - colSpan = range.end.column - range.start.column; - width = colSpan * charWidth; - xStart = range.start.column * charWidth; - xEnd = xStart + width; - context.fillRect(xStart, yStart, width, 1); - context.fillRect(xStart, yEnd - 1, width, 1); - context.fillRect(xStart, yStart, 1, lineHeight); - context.fillRect(xEnd, yStart, 1, lineHeight); - } else if (rowSpan === 1) { - xStart = range.start.column * charWidth; - xEnd = range.end.column * charWidth; - if (screenRow === range.start.row) { - width = canvasWidth - xStart; - xBottomStart = Math.max(xStart, xEnd); - bottomWidth = canvasWidth - xBottomStart; - context.fillRect(xStart, yStart, width, 1); - context.fillRect(xBottomStart, yEnd - 1, bottomWidth, 1); - context.fillRect(xStart, yStart, 1, lineHeight); - context.fillRect(canvasWidth - 1, yStart, 1, lineHeight); - } else { - width = canvasWidth - xStart; - bottomWidth = canvasWidth - xEnd; - context.fillRect(0, yStart, xStart, 1); - context.fillRect(0, yEnd - 1, xEnd, 1); - context.fillRect(0, yStart, 1, lineHeight); - context.fillRect(xEnd, yStart, 1, lineHeight); - } - } else { - xStart = range.start.column * charWidth; - xEnd = range.end.column * charWidth; - if (screenRow === range.start.row) { - width = canvasWidth - xStart; - context.fillRect(xStart, yStart, width, 1); - context.fillRect(xStart, yStart, 1, lineHeight); - context.fillRect(canvasWidth - 1, yStart, 1, lineHeight); - } else if (screenRow === range.end.row) { - width = canvasWidth - xStart; - context.fillRect(0, yEnd - 1, xEnd, 1); - context.fillRect(0, yStart, 1, lineHeight); - context.fillRect(xEnd, yStart, 1, lineHeight); - } else { - context.fillRect(0, yStart, 1, lineHeight); - context.fillRect(canvasWidth - 1, yStart, 1, lineHeight); - if (screenRow === range.start.row + 1) context.fillRect(0, yStart, xStart, 1); - if (screenRow === range.end.row - 1) context.fillRect(xEnd, yEnd - 1, canvasWidth - xEnd, 1); - } - } -} -/** - * Draws a custom decoration. - * - * It renders only the part of the highlight corresponding to the specified row. - * - * @param {Decoration} decoration The decoration to render - * @param {Object} data The data need to perform the render - * @param {string} decorationColor Decoration color - * @param {TextEditorElement} editorElement - * @access private - */ function $bd9d1375728dda14$var$drawCustomDecoration(decoration, data, decorationColor, editorElement) { - const renderRoutine = decoration.getProperties().render; - if (renderRoutine) { - data.color = decorationColor; - renderRoutine(decoration, data, editorElement); - } -} -/** - * Draws the specified decorations for the current `screenRow`. - * - * The `decorations` object contains all the decorations grouped by type and then rows. - * - * @param {number} screenRow The screen row index for which render decorations - * @param {Object} decorations The object containing all the decorations - * @param {Object} renderData The object containing the render data - * @param {Object} types An object with the type to render as key and the render method as value - * @param {TextEditorElement} editorElement - * @access private - */ function $bd9d1375728dda14$var$drawDecorations(screenRow, decorations, renderData, types, editorElement) { - let decorationsToRender = []; - renderData.context.clearRect(0, renderData.yRow, renderData.canvasWidth, renderData.lineHeight); - for(const i in types)decorationsToRender = decorationsToRender.concat(decorations[i] != null ? decorations[i][screenRow] || [] : []); - decorationsToRender.sort((a, b)=>(renderData.orders[a.properties.plugin] || 0) - (renderData.orders[b.properties.plugin] || 0)); - if (decorationsToRender != null ? decorationsToRender.length : undefined) for(let i = 0, len = decorationsToRender.length; i < len; i++){ - const decoration = decorationsToRender[i]; - const decorationDrawer = types[decoration.properties.type]; - if (!$bd9d1375728dda14$var$SPEC_MODE) decorationDrawer(decoration, renderData, /* decorationColor */ $bd9d1375728dda14$var$getDecorationColor(decoration, editorElement)); - else { - // get the real function name from the mangeld Parcel names - const functionName = decorationDrawer.name.split("$").pop().replace("Lambda", ""); - // call the spy: - $bd9d1375728dda14$var$thisSpec[functionName](decoration, renderData, /* decorationColor */ $bd9d1375728dda14$var$getDecorationColor(decoration, editorElement)); - } - } -} -/** - * Draws front decorations on the corresponding layer. - * - * The lines range to draw is specified by the `firstRow` and `lastRow` parameters. - * - * @param {number} firstRow The first row to render - * @param {number} lastRow The last row to render - * @param {number} offsetRow The relative offset to apply to rows when rendering them - * @param {Object} renderData - * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio - * @param {TextEditorElement} editorElement This.minimap.getTextEditorElement() - * @param {Decoration[]} decorations - * @access private - */ function $bd9d1375728dda14$var$drawFrontDecorationsForLines(firstRow, lastRow, offsetRow, renderData, lineHeight, editorElement, decorations) { - if (firstRow > lastRow) return; - for(let screenRow = firstRow; screenRow <= lastRow; screenRow++){ - renderData.row = offsetRow + (screenRow - firstRow); - renderData.yRow = renderData.row * lineHeight; - renderData.screenRow = screenRow; - $bd9d1375728dda14$var$drawDecorations(screenRow, decorations, renderData, $bd9d1375728dda14$var$frontDecorationDispatcher, editorElement); - } - renderData.context.fill(); -} -/** - * Draws back decorations on the corresponding layer. - * - * The lines range to draw is specified by the `firstRow` and `lastRow` parameters. - * - * @param {number} firstRow The first row to render - * @param {number} lastRow The last row to render - * @param {number} offsetRow The relative offset to apply to rows when rendering them - * @param {Object} renderData - * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio - * @param {TextEditorElement} editorElement This.minimap.getTextEditorElement() - * @param {Decoration[]} decorations - * @access private - */ function $bd9d1375728dda14$var$drawBackDecorationsForLines(firstRow, lastRow, offsetRow, renderData, lineHeight, editorElement, decorations) { - if (firstRow > lastRow) return; - for(let screenRow = firstRow; screenRow <= lastRow; screenRow++){ - renderData.row = offsetRow + (screenRow - firstRow); - renderData.yRow = renderData.row * lineHeight; - renderData.screenRow = screenRow; - $bd9d1375728dda14$var$drawDecorations(screenRow, decorations, renderData, $bd9d1375728dda14$var$backgroundDecorationDispatcher, editorElement); - } - renderData.context.fill(); -} -// ###### ####### ## ####### ######## ###### -// ## ## ## ## ## ## ## ## ## ## ## -// ## ## ## ## ## ## ## ## ## -// ## ## ## ## ## ## ######## ###### -// ## ## ## ## ## ## ## ## ## -// ## ## ## ## ## ## ## ## ## ## ## -// ###### ####### ######## ####### ## ## ###### -/** - * Returns the opacity value to use when rendering the `Minimap` text. - * - * @returns {Number} The text opacity value Unused (inlined) - */ // getTextOpacity () { return this.textOpacity } -/** - * Returns the default text color for an editor content. - * - * The color value is directly read from the `TextEditorView` computed styles. - * - * @param {TextEditorElement} editorElement - * @param {number} textOpacity - * @returns {string} A CSS color - */ function $bd9d1375728dda14$var$getDefaultColor(editorElement, textOpacity) { - const color = (0, $e6ccb2de5b0684dd$export$4d3d19fa8673fd3e).retrieveStyleFromDom([ - ".editor" - ], "color", editorElement, true); - return $bd9d1375728dda14$var$transparentize(color, textOpacity); -} -/** - * Returns the text color for the passed-in scopes - * - * The color value is read from the DOM by creating a node structure that match the token `scope` property. - * - * @param {string[]} scopes An array of scopes for a `TextEditor` token (token.scopeDescriptor || token.scopes) - * @param {TextEditorElement} editorElement - * @param {number} textOpacity - * @returns {string} The CSS color for the provided token - */ function $bd9d1375728dda14$var$getTokenColor(scopes, editorElement, textOpacity) { - const color = (0, $e6ccb2de5b0684dd$export$4d3d19fa8673fd3e).retrieveStyleFromDom(scopes, "color", editorElement, true); - return $bd9d1375728dda14$var$transparentize(color, textOpacity); -} -/** - * Converts a `rgb(...)` color into a `rgba(...)` color with the specified opacity. - * - * @param {string} color The CSS RGB color to transparentize - * @param {number} opacity The opacity amount - * @returns {string} The transparentized CSS color - * @access private - */ function $bd9d1375728dda14$var$transparentize(color, opacity) { - // assumes that color is in form of `rgb(content)` with no spaces around the given value - return `rgba(${color.slice(4, -1)}, ${opacity})`; -} -/** - * Returns the background color for the passed-in `decoration` object. - * - * The color value is read from the DOM by creating a node structure that match the decoration `scope` property unless - * the decoration provides its own `color` property. - * - * @param {Decoration} decoration The decoration to get the color for - * @param {TextEditorElement} editorElement - * @returns {string} The CSS color for the provided decoration - */ function $bd9d1375728dda14$var$getDecorationColor(decoration, editorElement) { - const properties = decoration.getProperties(); - if (properties.color) return properties.color; - if (properties.scope) { - const scopeString = properties.scope.split($bd9d1375728dda14$var$oneOrMoreWhiteSpaceRegexp); - return (0, $e6ccb2de5b0684dd$export$4d3d19fa8673fd3e).retrieveStyleFromDom(scopeString, "background-color", editorElement, true); - } else return $bd9d1375728dda14$var$getDefaultColor(editorElement); -} -// ######## ### ## ## ###### ######## ###### -// ## ## ## ## ### ## ## ## ## ## ## -// ## ## ## ## #### ## ## ## ## -// ######## ## ## ## ## ## ## #### ###### ###### -// ## ## ######### ## #### ## ## ## ## -// ## ## ## ## ## ### ## ## ## ## ## -// ## ## ## ## ## ## ###### ######## ###### -/** - * Computes the ranges that are not affected by the current pending changes. - * - * @param {number} firstRow The first row of the rendered region - * @param {number} lastRow The last row of the rendered region - * @param {number | null} offscreenFirstRow CanvasDrawer.offscreenLastRow - * @param {number | null} offscreenLastRow CanvasDrawer.offscreenLastRow - * @returns {Object[]} The intact ranges in the rendered region - * @access private - */ function $bd9d1375728dda14$var$computeIntactRanges(firstRow, lastRow, changes, offscreenFirstRow, offscreenLastRow) { - // TODO when do they get null? - if (offscreenFirstRow == null && offscreenLastRow == null) return []; - // At first, the whole range is considered intact - let intactRanges = [ - { - start: offscreenFirstRow, - end: offscreenLastRow, - offscreenRow: 0 - } - ]; - for(let i = 0, len = changes.length; i < len; i++){ - const change = changes[i]; - const newIntactRanges = []; - for(let j = 0, intactLen = intactRanges.length; j < intactLen; j++){ - const range = intactRanges[j]; - if (change.end < range.start && change.screenDelta !== 0) // The change is above of the range and lines are either - // added or removed - newIntactRanges.push({ - start: range.start + change.screenDelta, - end: range.end + change.screenDelta, - offscreenRow: range.offscreenRow - }); - else if (change.end < range.start || change.start > range.end) // The change is outside the range but didn't add - // or remove lines - newIntactRanges.push(range); - else { - // The change is within the range, there's one intact range - // from the range start to the change start - if (change.start > range.start) newIntactRanges.push({ - start: range.start, - end: change.start - 1, - offscreenRow: range.offscreenRow - }); - if (change.end < range.end) { - // The change ends within the range - if (change.bufferDelta !== 0) // Lines are added or removed, the intact range starts in the - // next line after the change end plus the screen delta - newIntactRanges.push({ - start: change.end + change.screenDelta + 1, - end: range.end + change.screenDelta, - offscreenRow: range.offscreenRow + change.end + 1 - range.start - }); - else if (change.screenDelta !== 0) // Lines are added or removed in the display buffer, the intact - // range starts in the next line after the change end plus the - // screen delta - newIntactRanges.push({ - start: change.end + change.screenDelta + 1, - end: range.end + change.screenDelta, - offscreenRow: range.offscreenRow + change.end + 1 - range.start - }); - else // No lines are added, the intact range starts on the line after - // the change end - newIntactRanges.push({ - start: change.end + 1, - end: range.end, - offscreenRow: range.offscreenRow + change.end + 1 - range.start - }); - } - } - } - intactRanges = newIntactRanges; - } - return $bd9d1375728dda14$var$truncateIntactRanges(intactRanges, firstRow, lastRow); -} -/** - * Truncates the intact ranges so that they doesn't expand past the visible area of the minimap. - * - * @param {Object[]} intactRanges The initial array of ranges - * @param {number} firstRow The first row of the rendered region - * @param {number} lastRow The last row of the rendered region - * @returns {Object[]} The array of truncated ranges - * @access private - */ function $bd9d1375728dda14$var$truncateIntactRanges(intactRanges, firstRow, lastRow) { - let i = 0; - while(i < intactRanges.length){ - const range = intactRanges[i]; - if (range.start < firstRow) { - range.offscreenRow += firstRow - range.start; - range.start = firstRow; - } - if (range.end > lastRow) range.end = lastRow; - if (range.start >= range.end) intactRanges.splice(i--, 1); - i++; - } - return intactRanges.sort((a, b)=>{ - return a.offscreenRow - b.offscreenRow; - }); -} - - -"use strict"; -function $e29010ecebaeccdf$export$2e2bcd8739ae039(cls, ...mixins) { - mixins.forEach((mixin)=>{ - $e29010ecebaeccdf$var$includeMixin(cls, mixin); - }); -} -function $e29010ecebaeccdf$var$includeMixin(target, source) { - Object.getOwnPropertyNames(source).forEach((k)=>{ - if ([ - "length", - "name", - "arguments", - "caller", - "prototype", - "includeInto" - ].indexOf(k) >= 0) return; - const descriptor = Object.getOwnPropertyDescriptor(source, k); - Object.defineProperty(target, k, descriptor); - }); - Object.getOwnPropertyNames(source.prototype).forEach((k)=>{ - if (k === "constructor") return; - const descriptor = Object.getOwnPropertyDescriptor(source.prototype, k); - Object.defineProperty(target.prototype, k, descriptor); - }); -} - - - -var $5yNMJ = parcelRequire("5yNMJ"); - - - - -var $5yNMJ = parcelRequire("5yNMJ"); - -"use strict"; -const $023c483049ecf4ec$var$TAG_NAME = "minimap-quick-settings"; -/** @access private */ class $023c483049ecf4ec$var$MinimapQuickSettingsElement extends HTMLElement { - static initClass() { - (0, $e29010ecebaeccdf$export$2e2bcd8739ae039)(this, (0, $35541aa4e0ecec06$exports.EventsDelegation), (0, $35541aa4e0ecec06$exports.SpacePenDSL).Babel); - (0, $5yNMJ.default)(this, $023c483049ecf4ec$var$TAG_NAME); - } - static content() { - this.div({ - class: "select-list popover-list minimap-quick-settings" - }, ()=>{ - this.input({ - type: "text", - class: "hidden-input", - outlet: "hiddenInput" - }); - this.ol({ - class: "list-group mark-active", - outlet: "list" - }, ()=>{ - this.li({ - class: "separator", - outlet: "separator" - }); - this.li({ - class: "code-highlights", - outlet: "codeHighlights" - }, "code-highlights"); - this.li({ - class: "absolute-mode", - outlet: "absoluteMode" - }, "absolute-mode"); - this.li({ - class: "adjust-absolute-mode-height", - outlet: "adjustAbsoluteModeHeight" - }, "adjust-absolute-mode-height"); - }); - this.div({ - class: "btn-group" - }, ()=>{ - this.button({ - class: "btn btn-default", - outlet: "onLeftButton" - }, "On Left"); - this.button({ - class: "btn btn-default", - outlet: "onRightButton" - }, "On Right"); - }); - }); - } - createdCallback() { - this.buildContent(); - } - setModel(minimap) { - this.selectedItem = null; - this.minimap = minimap; - this.emitter = new (0, $cz7Pu$atom.Emitter)(); - this.subscriptions = new (0, $cz7Pu$atom.CompositeDisposable)(); - this.plugins = {}; - this.itemsActions = new WeakMap(); - this.codeHighlights.classList.toggle("active", this.minimap.displayCodeHighlights); - this.itemsActions.set(this.codeHighlights, ()=>{ - atom.config.set("minimap.displayCodeHighlights", !this.minimap.displayCodeHighlights); - }); - this.itemsActions.set(this.absoluteMode, ()=>{ - atom.config.set("minimap.absoluteMode", !atom.config.get("minimap.absoluteMode")); - }); - this.itemsActions.set(this.adjustAbsoluteModeHeight, ()=>{ - atom.config.set("minimap.adjustAbsoluteModeHeight", !atom.config.get("minimap.adjustAbsoluteModeHeight")); - }); - this.subscriptions.add($e6ccb2de5b0684dd$export$d40fb390be4bd0f(({ name: name, plugin: plugin })=>{ - return this.addItemFor(name, plugin); - }), $e6ccb2de5b0684dd$export$9937b73c38ac51f0(({ name: name, plugin: plugin })=>{ - return this.removeItemFor(name, plugin); - }), $e6ccb2de5b0684dd$export$6f3aaf72a3cac830(({ name: name, plugin: plugin })=>{ - return this.activateItem(name, plugin); - }), $e6ccb2de5b0684dd$export$8df1420526313195(({ name: name, plugin: plugin })=>{ - return this.deactivateItem(name, plugin); - }), atom.commands.add("minimap-quick-settings", { - "core:move-up": ()=>{ - this.selectPreviousItem(); - }, - "core:move-down": ()=>{ - this.selectNextItem(); - }, - "core:move-left": ()=>{ - atom.config.set("minimap.displayMinimapOnLeft", true); - }, - "core:move-right": ()=>{ - atom.config.set("minimap.displayMinimapOnLeft", false); - }, - "core:cancel": ()=>{ - this.destroy(); - }, - "core:confirm": ()=>{ - this.toggleSelectedItem(); - } - }), this.subscribeTo(this.codeHighlights, { - mousedown: (e)=>{ - e.preventDefault(); - atom.config.set("minimap.displayCodeHighlights", !this.minimap.displayCodeHighlights); - } - }), this.subscribeTo(this.absoluteMode, { - mousedown: (e)=>{ - e.preventDefault(); - atom.config.set("minimap.absoluteMode", !atom.config.get("minimap.absoluteMode")); - } - }), this.subscribeTo(this.adjustAbsoluteModeHeight, { - mousedown: (e)=>{ - e.preventDefault(); - atom.config.set("minimap.adjustAbsoluteModeHeight", !atom.config.get("minimap.adjustAbsoluteModeHeight")); - } - }), this.subscribeTo(this.hiddenInput, { - focusout: (e)=>{ - this.destroy(); - } - }, { - passive: true - }), this.subscribeTo(this.onLeftButton, { - mousedown: (e)=>{ - e.preventDefault(); - atom.config.set("minimap.displayMinimapOnLeft", true); - } - }), this.subscribeTo(this.onRightButton, { - mousedown: (e)=>{ - e.preventDefault(); - atom.config.set("minimap.displayMinimapOnLeft", false); - } - }), atom.config.observe("minimap.displayCodeHighlights", (bool)=>{ - this.codeHighlights.classList.toggle("active", bool); - }), atom.config.observe("minimap.absoluteMode", (bool)=>{ - this.absoluteMode.classList.toggle("active", bool); - }), atom.config.observe("minimap.adjustAbsoluteModeHeight", (bool)=>{ - this.adjustAbsoluteModeHeight.classList.toggle("active", bool); - }), atom.config.observe("minimap.displayMinimapOnLeft", (bool)=>{ - this.onLeftButton.classList.toggle("selected", bool); - this.onRightButton.classList.toggle("selected", !bool); - })); - this.initList(); - } - onDidDestroy(callback) { - return this.emitter.on("did-destroy", callback); - } - attach() { - const workspaceElement = atom.views.getView(atom.workspace); - workspaceElement.appendChild(this); - this.hiddenInput.focus(); - } - destroy() { - this.emitter.emit("did-destroy"); - this.subscriptions.dispose(); - this.parentNode.removeChild(this); - } - initList() { - this.itemsDisposables = new WeakMap(); - for(const name in $d6bb1451a6029905$export$8b3ca321c77fdea6)this.addItemFor(name, $d6bb1451a6029905$export$8b3ca321c77fdea6[name]); - } - toggleSelectedItem() { - const fn = this.itemsActions.get(this.selectedItem); - if (typeof fn === "function") fn(); - } - selectNextItem() { - this.selectedItem.classList.remove("selected"); - if (this.selectedItem.nextSibling != null) { - this.selectedItem = this.selectedItem.nextSibling; - if (this.selectedItem.matches(".separator")) this.selectedItem = this.selectedItem.nextSibling; - } else this.selectedItem = this.list.firstChild; - this.selectedItem.classList.add("selected"); - } - selectPreviousItem() { - this.selectedItem.classList.remove("selected"); - if (this.selectedItem.previousSibling != null) { - this.selectedItem = this.selectedItem.previousSibling; - if (this.selectedItem.matches(".separator")) this.selectedItem = this.selectedItem.previousSibling; - } else this.selectedItem = this.list.lastChild; - this.selectedItem.classList.add("selected"); - } - addItemFor(name, plugin) { - const item = document.createElement("li"); - const action = ()=>{ - $d6bb1451a6029905$export$8cf5509a1f8ee810(name); - }; - if (plugin.isActive()) item.classList.add("active"); - item.textContent = name; - this.itemsActions.set(item, action); - this.itemsDisposables.set(item, this.addDisposableEventListener(item, "mousedown", (e)=>{ - e.preventDefault(); - action(); - })); - this.plugins[name] = item; - this.list.insertBefore(item, this.separator); - if (!(this.selectedItem != null)) { - this.selectedItem = item; - this.selectedItem.classList.add("selected"); - } - } - removeItemFor(name, plugin) { - try { - this.list.removeChild(this.plugins[name]); - } catch (error) {} - delete this.plugins[name]; - } - activateItem(name, plugin) { - this.plugins[name].classList.add("active"); - } - deactivateItem(name, plugin) { - this.plugins[name].classList.remove("active"); - } -} -$023c483049ecf4ec$var$MinimapQuickSettingsElement.initClass(); -function $023c483049ecf4ec$export$97bf619d538586fc() { - const element = document.createElement($023c483049ecf4ec$var$TAG_NAME); - element.createdCallback(); - return element; -} - - -"use strict"; -const $0965f8da08ee51eb$var$elementResizeDetector = (0, (/*@__PURE__*/$parcel$interopDefault($9f189d28e7df4568$exports)))({ - strategy: "scroll" -}); -const $0965f8da08ee51eb$var$SPEC_MODE = atom.inSpecMode(); -const $0965f8da08ee51eb$var$TAG_NAME = "atom-text-editor-minimap"; -/** - * Public: The MinimapElement is the view meant to render a {@link Minimap} instance in the DOM. - * - * You can retrieve the MinimapElement associated to a Minimap using the `atom.views.getView` method. - * - * Note that most interactions with the Minimap package is done through the Minimap model so you should never have to - * access MinimapElement instances. - * - * @example Let minimapElement = atom.views.getView(minimap) - */ class $0965f8da08ee51eb$var$MinimapElement extends HTMLElement { - static initClass() { - (0, $e29010ecebaeccdf$export$2e2bcd8739ae039)(this, (0, $bd9d1375728dda14$export$2e2bcd8739ae039), (0, $35541aa4e0ecec06$exports.EventsDelegation), (0, $35541aa4e0ecec06$exports.AncestorsMethods)); - (0, $5yNMJ.default)(this, $0965f8da08ee51eb$var$TAG_NAME); - } - // ## ## ####### ####### ## ## ###### - // ## ## ## ## ## ## ## ## ## ## - // ## ## ## ## ## ## ## ## ## - // ######### ## ## ## ## ##### ###### - // ## ## ## ## ## ## ## ## ## - // ## ## ## ## ## ## ## ## ## ## - // ## ## ####### ####### ## ## ###### - /** - * DOM callback invoked when a new MinimapElement is created. - * - * @access private - */ createdCallback() { - // Core properties - /** @access private */ this.minimap = undefined; - /** @access private */ this.width = undefined; - /** @access private */ this.height = undefined; - // Subscriptions - /** @access private */ this.subscriptions = new (0, $cz7Pu$atom.CompositeDisposable)(); - /** @access private */ this.visibleAreaSubscription = undefined; - /** @access private */ this.quickSettingsSubscription = undefined; - /** @access private */ this.dragSubscription = undefined; - /** @access private */ this.openQuickSettingSubscription = undefined; - // Configs - /** @access private */ this.minimapScrollIndicator = undefined; - /** @access private */ this.displayMinimapOnLeft = undefined; - /** @access private */ this.displayPluginsControls = undefined; - /** @access private */ this.textOpacity = undefined; - /** @access private */ this.displayCodeHighlights = undefined; - /** @access private */ this.adjustToSoftWrap = undefined; - /** @access private */ this.useHardwareAcceleration = undefined; - /** @access private */ this.absoluteMode = undefined; - // Elements - /** @access private */ this.visibleArea = undefined; - /** @access private */ this.controls = undefined; - /** @access private */ this.scrollIndicator = undefined; - /** @access private */ this.openQuickSettings = undefined; - /** @access private */ this.quickSettingsElement = undefined; - this.DecorationManagement = new (0, $e6882a2a1b829cb4$export$2e2bcd8739ae039)(); - // States - /** @access private */ this.attached = undefined; - /** @access private */ this.attachedToTextEditor = undefined; - /** @access private */ this.standAlone = undefined; - /** @access private */ this.wasVisible = undefined; - // Other - /** @access private */ this.offscreenFirstRow = undefined; - /** @access private */ this.offscreenLastRow = undefined; - /** @access private */ this.frameRequested = undefined; - /** @access private */ this.flexBasis = undefined; - this.initializeContent(); - this.subscriptions.add(atom.config.observe("minimap.displayMinimapOnLeft", (displayMinimapOnLeft)=>{ - this.displayMinimapOnLeft = displayMinimapOnLeft; - this.updateMinimapFlexPosition(); - this.measureHeightAndWidth(true, true); - }), atom.config.observe("minimap.minimapScrollIndicator", (minimapScrollIndicator)=>{ - this.minimapScrollIndicator = minimapScrollIndicator; - if (this.minimapScrollIndicator && !(this.scrollIndicator != null) && !this.standAlone) this.initializeScrollIndicator(); - else if (this.scrollIndicator != null) this.disposeScrollIndicator(); - if (this.attached) this.requestUpdate(); - }), atom.config.observe("minimap.displayPluginsControls", (displayPluginsControls)=>{ - this.displayPluginsControls = displayPluginsControls; - if (this.displayPluginsControls && !(this.openQuickSettings != null) && !this.standAlone) this.initializeOpenQuickSettings(); - else if (this.openQuickSettings != null) this.disposeOpenQuickSettings(); - }), atom.config.observe("minimap.textOpacity", (textOpacity)=>{ - this.textOpacity = textOpacity; - if (this.attached) this.requestForcedUpdate(); - }), atom.config.observe("minimap.displayCodeHighlights", (displayCodeHighlights)=>{ - this.displayCodeHighlights = displayCodeHighlights; - if (this.attached) this.requestForcedUpdate(); - }), atom.config.observe("minimap.smoothScrolling", (smoothScrolling)=>{ - this.smoothScrolling = smoothScrolling; - if (this.attached) { - if (!this.smoothScrolling) { - this.backLayer.canvas.style.cssText = ""; - this.tokensLayer.canvas.style.cssText = ""; - this.frontLayer.canvas.style.cssText = ""; - } else this.requestUpdate(); - } - }), atom.config.observe("minimap.adjustMinimapWidthToSoftWrap", (adjustToSoftWrap)=>{ - this.adjustToSoftWrap = adjustToSoftWrap; - if (this.attached) this.measureHeightAndWidth(); - }), atom.config.observe("minimap.adjustMinimapWidthOnlyIfSmaller", (adjustOnlyIfSmaller)=>{ - this.adjustOnlyIfSmaller = adjustOnlyIfSmaller; - if (this.attached) this.measureHeightAndWidth(); - }), atom.config.observe("minimap.useHardwareAcceleration", (useHardwareAcceleration)=>{ - this.useHardwareAcceleration = useHardwareAcceleration; - if (this.attached) this.requestUpdate(); - }), atom.config.observe("minimap.absoluteMode", (absoluteMode)=>{ - this.absoluteMode = absoluteMode; - this.classList.toggle("absolute", this.absoluteMode); - }), atom.config.observe("minimap.adjustAbsoluteModeHeight", (adjustAbsoluteModeHeight)=>{ - this.adjustAbsoluteModeHeight = adjustAbsoluteModeHeight; - this.classList.toggle("adjust-absolute-height", this.adjustAbsoluteModeHeight); - if (this.attached) this.measureHeightAndWidth(); - }), atom.config.observe("minimap.ignoreWhitespacesInTokens", (ignoreWhitespacesInTokens)=>{ - this.ignoreWhitespacesInTokens = ignoreWhitespacesInTokens; - if (this.attached) this.requestForcedUpdate(); - }), atom.config.observe("editor.preferredLineLength", ()=>{ - if (this.attached) this.measureHeightAndWidth(); - }), atom.config.observe("editor.softWrap", ()=>{ - if (this.attached) this.requestUpdate(); - }), atom.config.observe("editor.showInvisibles", ()=>{ - if (this.attached) this.requestUpdate(); - }), atom.config.observe("editor.invisibles", ()=>{ - if (this.attached) this.requestUpdate(); - }), atom.config.observe("editor.softWrapAtPreferredLineLength", ()=>{ - if (this.attached) this.requestUpdate(); - })); - } - /** - * DOM callback invoked when a new MinimapElement is attached to the DOM. - * - * @access private - */ connectedCallback() { - if (typeof atom.views.pollDocument === "function") this.subscriptions.add(atom.views.pollDocument(()=>{ - this.pollDOM(); - })); - else { - this.intersectionObserver = new IntersectionObserver((entries)=>{ - const { intersectionRect: intersectionRect } = entries[entries.length - 1]; - if (intersectionRect.width > 0 || intersectionRect.height > 0) this.measureHeightAndWidth(true, true); - }); - this.intersectionObserver.observe(this); - if (this.isVisible()) this.measureHeightAndWidth(true, true); - const measureDimensions = ()=>{ - this.measureHeightAndWidth(false, false); - }; - $0965f8da08ee51eb$var$elementResizeDetector.listenTo(this, measureDimensions); - window.addEventListener("resize", measureDimensions, { - passive: true - }); - this.subscriptions.add(new (0, $cz7Pu$atom.Disposable)(()=>{ - $0965f8da08ee51eb$var$elementResizeDetector.removeListener(this, measureDimensions); - }), new (0, $cz7Pu$atom.Disposable)(()=>{ - window.removeEventListener("resize", measureDimensions); - })); - } - this.measureHeightAndWidth(); - this.updateMinimapFlexPosition(); - this.attached = true; - this.attachedToTextEditor = this.queryParentSelector("atom-text-editor") === this.minimap.getTextEditorElement(); - if (this.attachedToTextEditor) this.minimap.getTextEditorElement().setAttribute("with-minimap", this.displayMinimapOnLeft ? "left" : "right"); - this.subscriptions.add(this.subscribeToMediaQuery()); - } - /** - * DOM callback invoked when a new MinimapElement is detached from the DOM. - * - * @access private - */ disconnectedCallback() { - this.minimap.getTextEditorElement().removeAttribute("with-minimap"); - this.attached = false; - } - // ### ######## ######## ### ###### ## ## - // ## ## ## ## ## ## ## ## ## ## - // ## ## ## ## ## ## ## ## ## - // ## ## ## ## ## ## ## ######### - // ######### ## ## ######### ## ## ## - // ## ## ## ## ## ## ## ## ## ## - // ## ## ## ## ## ## ###### ## ## - /** - * Returns whether the MinimapElement is currently visible on screen or not. - * - * The visibility of the minimap is defined by testing the size of the offset width and height of the element. - * - * @returns {boolean} Whether the MinimapElement is currently visible or not - */ isVisible() { - return this.offsetWidth > 0 || this.offsetHeight > 0; - } - /** - * Attaches the MinimapElement to the DOM. - * - * The position at which the element is attached is defined by the `displayMinimapOnLeft` setting. - * - * @param {HTMLElement} [parent] The DOM node where attaching the minimap element - */ attach(parent) { - if (this.attached) return; - const container = parent || this.minimap.getTextEditorElement(); - const minimaps = container.querySelectorAll($0965f8da08ee51eb$var$TAG_NAME); - if (minimaps.length) Array.prototype.forEach.call(minimaps, (el)=>{ - el.destroy(); - try { - container.removeChild(el); - } catch (e) { - // TODO: ignore for now - // https://github.com/atom-minimap/minimap/issues/766#issuecomment-762496374 - } - }); - container.appendChild(this); - } - /** Detaches the MinimapElement from the DOM. */ detach() { - if (!this.attached || this.parentNode == null) return; - this.parentNode.removeChild(this); - } - /** - * Toggles the minimap left/right position based on the value of the `displayMinimapOnLeft` setting. - * - * @access private - */ updateMinimapFlexPosition() { - this.classList.toggle("left", this.displayMinimapOnLeft); - if (this.attachedToTextEditor) this.minimap.getTextEditorElement().setAttribute("with-minimap", this.displayMinimapOnLeft ? "left" : "right"); - } - /** Destroys this MinimapElement */ destroy() { - this.DecorationManagement.destroy(); - if (this.quickSettingsElement) this.quickSettingsElement.destroy(); - this.subscriptions.dispose(); - this.detach(); - } - // ###### ####### ## ## ######## ######## ## ## ######## - // ## ## ## ## ### ## ## ## ### ## ## - // ## ## ## #### ## ## ## #### ## ## - // ## ## ## ## ## ## ## ###### ## ## ## ## - // ## ## ## ## #### ## ## ## #### ## - // ## ## ## ## ## ### ## ## ## ### ## - // ###### ####### ## ## ## ######## ## ## ## - /** - * Creates the content of the MinimapElement and attaches the mouse control event listeners. - * - * @access private - */ initializeContent() { - this.initializeCanvas(); - this.attachCanvases(this); - this.createVisibleArea(); - this.createControls(); - this.subscriptions.add(this.subscribeTo(this, { - mousewheel: (e)=>{ - if (!this.standAlone && this.minimap.onMouseWheel) this.minimap.onMouseWheel(e); - } - }, { - passive: true - }), this.subscribeTo(this.getFrontCanvas(), { - mousedown: (e)=>{ - this.canvasPressed($0965f8da08ee51eb$var$extractMouseEventData(e)); - }, - touchstart: (e)=>{ - this.canvasPressed($0965f8da08ee51eb$var$extractTouchEventData(e)); - } - }, { - passive: true - })); - } - /** - * Initializes the visible area div. - * - * @access private - */ createVisibleArea() { - if (this.visibleArea) return; - this.visibleArea = document.createElement("div"); - this.visibleArea.classList.add("minimap-visible-area"); - this.appendChild(this.visibleArea); - this.visibleAreaSubscription = this.subscribeTo(this.visibleArea, { - mousedown: (e)=>{ - this.startDrag($0965f8da08ee51eb$var$extractMouseEventData(e)); - }, - touchstart: (e)=>{ - this.startDrag($0965f8da08ee51eb$var$extractTouchEventData(e)); - } - }, { - passive: true - }); - this.subscriptions.add(this.visibleAreaSubscription); - } - /** - * Removes the visible area div. - * - * @access private - */ removeVisibleArea() { - if (!this.visibleArea) return; - this.subscriptions.remove(this.visibleAreaSubscription); - this.visibleAreaSubscription.dispose(); - this.removeChild(this.visibleArea); - delete this.visibleArea; - } - /** - * Creates the controls container div. - * - * @access private - */ createControls() { - if (this.controls || this.standAlone) return; - this.controls = document.createElement("div"); - this.controls.classList.add("minimap-controls"); - this.appendChild(this.controls); - } - /** - * Removes the controls container div. - * - * @access private - */ removeControls() { - if (!this.controls) return; - this.removeChild(this.controls); - delete this.controls; - } - /** - * Initializes the scroll indicator div when the `minimapScrollIndicator` settings is enabled. - * - * @access private - */ initializeScrollIndicator() { - if (this.scrollIndicator || this.standAlone) return; - this.scrollIndicator = document.createElement("div"); - this.scrollIndicator.classList.add("minimap-scroll-indicator"); - this.controls.appendChild(this.scrollIndicator); - } - /** - * Disposes the scroll indicator div when the `minimapScrollIndicator` settings is disabled. - * - * @access private - */ disposeScrollIndicator() { - if (!this.scrollIndicator) return; - this.controls.removeChild(this.scrollIndicator); - delete this.scrollIndicator; - } - /** - * Initializes the quick settings openener div when the `displayPluginsControls` setting is enabled. - * - * @access private - */ initializeOpenQuickSettings() { - if (this.openQuickSettings || this.standAlone) return; - this.openQuickSettings = document.createElement("div"); - this.openQuickSettings.classList.add("open-minimap-quick-settings"); - this.controls.appendChild(this.openQuickSettings); - this.openQuickSettingSubscription = this.subscribeTo(this.openQuickSettings, { - mousedown: (e)=>{ - e.preventDefault(); - e.stopPropagation(); - if (this.quickSettingsElement != null) { - this.quickSettingsElement.destroy(); - this.quickSettingsSubscription.dispose(); - } else { - this.quickSettingsElement = (0, $023c483049ecf4ec$export$97bf619d538586fc)(); - this.quickSettingsElement.setModel(this); - this.quickSettingsSubscription = this.quickSettingsElement.onDidDestroy(()=>{ - this.quickSettingsElement = null; - }); - const { top: top, left: left, right: right } = this.getFrontCanvas().getBoundingClientRect(); - this.quickSettingsElement.style.top = `${top}px`; - this.quickSettingsElement.attach(); - if (this.displayMinimapOnLeft) this.quickSettingsElement.style.left = `${right}px`; - else this.quickSettingsElement.style.left = `${left - this.quickSettingsElement.clientWidth}px`; - } - } - }); - } - /** - * Disposes the quick settings openener div when the `displayPluginsControls` setting is disabled. - * - * @access private - */ disposeOpenQuickSettings() { - if (!this.openQuickSettings) return; - this.controls.removeChild(this.openQuickSettings); - this.openQuickSettingSubscription.dispose(); - delete this.openQuickSettings; - } - /** - * Get the DecorationManagement API for minimapElement - * - * @returns {DecorationManagement} - */ getDecorationManagement() { - return this.DecorationManagement; - } - // ## ## ####### ######## ######## ## - // ### ### ## ## ## ## ## ## - // #### #### ## ## ## ## ## ## - // ## ### ## ## ## ## ## ###### ## - // ## ## ## ## ## ## ## ## - // ## ## ## ## ## ## ## ## - // ## ## ####### ######## ######## ######## - /** - * Returns the Minimap for which this MinimapElement was created. - * - * @returns {Minimap} This element's Minimap - */ getModel() { - return this.minimap; - } - /** - * Defines the Minimap model for this MinimapElement instance. - * - * @param {Minimap} minimap The Minimap model for this instance. - * @returns {Minimap} This element's Minimap - */ setModel(minimap) { - this.minimap = minimap; - // set minimapElement for Minimap - this.minimap.minimapElement = this; - this.DecorationManagement.initializeDecorations(this.minimap); - this.subscriptions.add(this.minimap.onDidChangeScrollTop(()=>{ - this.requestUpdate(); - }), this.minimap.onDidChangeScrollLeft(()=>{ - this.requestUpdate(); - }), this.minimap.onDidDestroy(()=>{ - this.destroy(); - }), this.minimap.onDidChangeConfig(()=>{ - if (this.attached) return this.requestForcedUpdate(); - }), this.minimap.onDidChangeStandAlone(()=>{ - this.setStandAlone(this.minimap.isStandAlone()); - this.requestUpdate(); - }), this.minimap.onDidChange((change)=>{ - this.pendingChanges.push(change); - this.requestUpdate(); - }), this.DecorationManagement.onDidChangeDecorationRange((change)=>{ - const { type: type } = change; - if (type === "line" || type === "highlight-under" || type === "background-custom") this.pendingBackDecorationChanges.push(change); - else this.pendingFrontDecorationChanges.push(change); - this.requestUpdate(); - }), $e6ccb2de5b0684dd$export$4f0668f248b15f12(()=>{ - this.requestForcedUpdate(); - })); - this.setStandAlone(this.minimap.isStandAlone()); - if (this.width != null && this.height != null) this.minimap.setScreenHeightAndWidth(this.height, this.width); - return this.minimap; - } - /** - * Sets the stand-alone mode for this MinimapElement. - * - * @param {boolean} standAlone The new mode for this MinimapElement - */ setStandAlone(standAlone) { - this.standAlone = standAlone; - if (this.standAlone) { - this.setAttribute("stand-alone", true); - this.disposeScrollIndicator(); - this.disposeOpenQuickSettings(); - this.removeControls(); - this.removeVisibleArea(); - } else { - this.removeAttribute("stand-alone"); - this.createVisibleArea(); - this.createControls(); - if (this.minimapScrollIndicator) this.initializeScrollIndicator(); - if (this.displayPluginsControls) this.initializeOpenQuickSettings(); - } - } - // ## ## ######## ######## ### ######## ######## - // ## ## ## ## ## ## ## ## ## ## - // ## ## ## ## ## ## ## ## ## ## - // ## ## ######## ## ## ## ## ## ###### - // ## ## ## ## ## ######### ## ## - // ## ## ## ## ## ## ## ## ## - // ####### ## ######## ## ## ## ######## - /** Requests an update to be performed on the next frame. */ requestUpdate() { - if (this.frameRequested) return; - this.frameRequested = true; - requestAnimationFrame(()=>{ - this.update(); - this.frameRequested = false; - }); - } - /** Requests an update to be performed on the next frame that will completely redraw the minimap. */ requestForcedUpdate() { - this.offscreenFirstRow = null; - this.offscreenLastRow = null; - this.requestUpdate(); - } - /** - * Performs the actual MinimapElement update. - * - * @access private - */ update() { - if (!(this.attached && this.isVisible() && this.minimap)) return; - const minimap = this.minimap; - minimap.enableCache(); - const canvas = this.getFrontCanvas(); - const devicePixelRatio = this.minimap.getDevicePixelRatio(); - const visibleAreaLeft = minimap.getTextEditorScaledScrollLeft(); - const visibleAreaTop = minimap.getTextEditorScaledScrollTop() - minimap.getScrollTop(); - const width = Math.min(canvas.width / devicePixelRatio, this.width); - const visibleWidth = width + visibleAreaLeft; - if (this.adjustToSoftWrap && this.flexBasis) { - this.style.flexBasis = `${this.flexBasis}px`; - this.style.width = `${this.flexBasis}px`; - } else { - this.style.flexBasis = null; - this.style.width = null; - } - if ($0965f8da08ee51eb$var$SPEC_MODE) $0965f8da08ee51eb$var$applyStyles(this.visibleArea, { - width: `${Math.round(visibleWidth)}px`, - height: `${Math.round(minimap.getTextEditorScaledHeight())}px`, - top: `${Math.round(visibleAreaTop)}px`, - "border-left-width": `${Math.round(visibleAreaLeft)}px` - }); - else $0965f8da08ee51eb$var$applyStyles(this.visibleArea, { - width: `${Math.round(visibleWidth)}px`, - height: `${Math.round(minimap.getTextEditorScaledHeight())}px`, - transform: $0965f8da08ee51eb$var$makeTranslate(0, visibleAreaTop, this.useHardwareAcceleration), - "border-left-width": `${Math.round(visibleAreaLeft)}px` - }); - $0965f8da08ee51eb$var$applyStyles(this.controls, { - width: `${Math.round(width)}px` - }); - const canvasTop = minimap.getFirstVisibleScreenRow() * minimap.getLineHeight() - minimap.getScrollTop(); - if (this.smoothScrolling) { - if ($0965f8da08ee51eb$var$SPEC_MODE) { - $0965f8da08ee51eb$var$applyStyles(this.backLayer.canvas, { - top: `${canvasTop}px` - }); - $0965f8da08ee51eb$var$applyStyles(this.tokensLayer.canvas, { - top: `${canvasTop}px` - }); - $0965f8da08ee51eb$var$applyStyles(this.frontLayer.canvas, { - top: `${canvasTop}px` - }); - } else { - let canvasTransform = $0965f8da08ee51eb$var$makeTranslate(0, canvasTop, this.useHardwareAcceleration); - if (devicePixelRatio !== 1) { - const scale = 1 / devicePixelRatio; - canvasTransform += ` ${$0965f8da08ee51eb$var$makeScale(scale, scale, this.useHardwareAcceleration)}`; - } - $0965f8da08ee51eb$var$applyStyles(this.backLayer.canvas, { - transform: canvasTransform - }); - $0965f8da08ee51eb$var$applyStyles(this.tokensLayer.canvas, { - transform: canvasTransform - }); - $0965f8da08ee51eb$var$applyStyles(this.frontLayer.canvas, { - transform: canvasTransform - }); - } - } else { - const scale = 1 / devicePixelRatio; - const canvasTransform = $0965f8da08ee51eb$var$makeScale(scale, scale, this.useHardwareAcceleration); - $0965f8da08ee51eb$var$applyStyles(this.backLayer.canvas, { - transform: canvasTransform - }); - $0965f8da08ee51eb$var$applyStyles(this.tokensLayer.canvas, { - transform: canvasTransform - }); - $0965f8da08ee51eb$var$applyStyles(this.frontLayer.canvas, { - transform: canvasTransform - }); - } - if (this.minimapScrollIndicator && !this.scrollIndicator && minimap.canScroll()) this.initializeScrollIndicator(); - if (this.scrollIndicator != null) { - const minimapScreenHeight = minimap.getScreenHeight(); - const indicatorHeight = minimapScreenHeight * (minimapScreenHeight / minimap.getHeight()); - const indicatorScroll = (minimapScreenHeight - indicatorHeight) * minimap.getScrollRatio(); - if ($0965f8da08ee51eb$var$SPEC_MODE) $0965f8da08ee51eb$var$applyStyles(this.scrollIndicator, { - height: `${indicatorHeight}px`, - top: `${indicatorScroll}px` - }); - else $0965f8da08ee51eb$var$applyStyles(this.scrollIndicator, { - height: `${indicatorHeight}px`, - transform: $0965f8da08ee51eb$var$makeTranslate(0, indicatorScroll, this.useHardwareAcceleration) - }); - if (!minimap.canScroll()) this.disposeScrollIndicator(); - } - if (this.absoluteMode && this.adjustAbsoluteModeHeight) this.updateCanvasesSize(); - this.updateCanvas(); - minimap.clearCache(); - } - /** - * Defines whether to render the code highlights or not. - * - * @param {Boolean} displayCodeHighlights Whether to render the code highlights or not - */ setDisplayCodeHighlights(displayCodeHighlights) { - this.displayCodeHighlights = displayCodeHighlights; - if (this.attached) this.requestForcedUpdate(); - } - /** - * Polling callback used to detect visibility and size changes. - * - * @access private - */ pollDOM() { - const visibilityChanged = this.checkForVisibilityChange(); - if (this.isVisible()) { - if (!this.wasVisible) this.requestForcedUpdate(); - this.measureHeightAndWidth(visibilityChanged, false); - } - } - /** - * A method that checks for visibility changes in the MinimapElement. The method returns `true` when the visibility - * changed from visible to hidden or from hidden to visible. - * - * @returns {boolean} Whether the visibility changed or not since the last call - * @access private - */ checkForVisibilityChange() { - if (this.isVisible()) { - if (this.wasVisible) return false; - else { - this.wasVisible = true; - return this.wasVisible; - } - } else if (this.wasVisible) { - this.wasVisible = false; - return true; - } else { - this.wasVisible = false; - return this.wasVisible; - } - } - /** - * A method used to measure the size of the MinimapElement and update internal components based on the new size. - * - * @param {boolean} visibilityChanged Did the visibility changed since last measurement - * @param {[type]} [forceUpdate=true] Forces the update even when no changes were detected. Default is `true` - * @access private - */ measureHeightAndWidth(visibilityChanged, forceUpdate = true) { - if (!this.minimap) return; - const safeFlexBasis = this.style.flexBasis; - this.style.flexBasis = ""; - const wasResized = this.width !== this.clientWidth || this.height !== this.clientHeight; - this.height = this.clientHeight; - this.width = this.clientWidth; - let canvasWidth = this.width; - if (this.minimap != null) this.minimap.setScreenHeightAndWidth(this.height, this.width); - if (wasResized || visibilityChanged || forceUpdate) this.requestForcedUpdate(); - if (!this.isVisible()) return; - if (wasResized || forceUpdate) { - if (this.adjustToSoftWrap) { - const lineLength = atom.config.get("editor.preferredLineLength"); - const softWrap = atom.config.get("editor.softWrap"); - const softWrapAtPreferredLineLength = atom.config.get("editor.softWrapAtPreferredLineLength"); - const width = lineLength * this.minimap.getCharWidth(); - if (softWrap && softWrapAtPreferredLineLength && lineLength && (width <= this.width || !this.adjustOnlyIfSmaller)) { - this.flexBasis = width; - canvasWidth = width; - } else delete this.flexBasis; - } else delete this.flexBasis; - this.updateCanvasesSize(canvasWidth); - } else this.style.flexBasis = safeFlexBasis; - } - updateCanvasesSize(canvasWidth) { - const devicePixelRatio = this.minimap.getDevicePixelRatio(); - const maxCanvasHeight = this.height + this.minimap.getLineHeight(); - const newHeight = this.absoluteMode && this.adjustAbsoluteModeHeight ? Math.min(this.minimap.getHeight(), maxCanvasHeight) : maxCanvasHeight; - const canvas = this.getFrontCanvas(); - if (canvasWidth == null) canvasWidth = canvas.width / devicePixelRatio; - if (canvasWidth !== canvas.width || newHeight !== canvas.height) { - this.setCanvasesSize(canvasWidth * devicePixelRatio, newHeight * devicePixelRatio); - if (this.absoluteMode && this.adjustAbsoluteModeHeight) { - this.offscreenFirstRow = null; - this.offscreenLastRow = null; - } - } - } - // ######## ## ## ######## ## ## ######## ###### - // ## ## ## ## ### ## ## ## ## - // ## ## ## ## #### ## ## ## - // ###### ## ## ###### ## ## ## ## ###### - // ## ## ## ## ## #### ## ## - // ## ## ## ## ## ### ## ## ## - // ######## ### ######## ## ## ## ###### - /** - * Callback triggered when the mouse is pressed on the MinimapElement canvas. - * - * @param {number} y The vertical coordinate of the event - * @param {boolean} isLeftMouse Was the left mouse button pressed? - * @param {boolean} isMiddleMouse Was the middle mouse button pressed? - * @access private - */ canvasPressed({ y: y, isLeftMouse: isLeftMouse, isMiddleMouse: isMiddleMouse }) { - if (this.minimap.isStandAlone()) return; - if (isLeftMouse) this.canvasLeftMousePressed(y); - else if (isMiddleMouse) { - this.canvasMiddleMousePressed(y); - const { top: top, height: height } = this.visibleArea.getBoundingClientRect(); - this.startDrag({ - y: top + height / 2, - isLeftMouse: false, - isMiddleMouse: true - }); - } - } - /** - * Callback triggered when the mouse left button is pressed on the MinimapElement canvas. - * - * @param {MouseEvent} e The mouse event object - * @param {number} e.pageY The mouse y position in page - * @param {HTMLElement} e.target The source of the event - * @access private - */ canvasLeftMousePressed(y) { - const deltaY = y - this.getBoundingClientRect().top; - const row = Math.floor(deltaY / this.minimap.getLineHeight()) + this.minimap.getFirstVisibleScreenRow(); - const textEditor = this.minimap.getTextEditor(); - const textEditorElement = this.minimap.getTextEditorElement(); - const scrollTop = row * textEditor.getLineHeightInPixels() - this.minimap.getTextEditorHeight() / 2; - const textEditorScrollTop = textEditorElement.pixelPositionForScreenPosition([ - row, - 0 - ]).top - this.minimap.getTextEditorHeight() / 2; - if (atom.config.get("minimap.moveCursorOnMinimapClick")) textEditor.setCursorScreenPosition([ - row, - 0 - ]); - if (atom.config.get("minimap.scrollAnimation")) { - const duration = atom.config.get("minimap.scrollAnimationDuration"); - const independentScroll = this.minimap.scrollIndependentlyOnMouseWheel(); - const from = this.minimap.getTextEditorScrollTop(); - const to = textEditorScrollTop; - let step; - if (independentScroll) { - const minimapFrom = this.minimap.getScrollTop(); - const minimapTo = Math.min(1, scrollTop / (this.minimap.getTextEditorMaxScrollTop() || 1)) * this.minimap.getMaxScrollTop(); - step = (now, t)=>{ - if (this.minimap === null) return; - // TODO why this happens in the tests? - this.minimap.setTextEditorScrollTop(now, true); - this.minimap.setScrollTop(minimapFrom + (minimapTo - minimapFrom) * t); - }; - $0965f8da08ee51eb$var$animate({ - from: from, - to: to, - duration: duration, - step: step - }); - } else { - step = (now)=>{ - if (this.minimap === null) return; - // TODO why this happens in the tests? - this.minimap.setTextEditorScrollTop(now); - }; - $0965f8da08ee51eb$var$animate({ - from: from, - to: to, - duration: duration, - step: step - }); - } - } else this.minimap.setTextEditorScrollTop(textEditorScrollTop); - } - /** - * Callback triggered when the mouse middle button is pressed on the MinimapElement canvas. - * - * @param {MouseEvent} e The mouse event object - * @param {number} e.pageY The mouse y position in page - * @access private - */ canvasMiddleMousePressed(y) { - const { top: offsetTop } = this.getBoundingClientRect(); - const deltaY = y - offsetTop - this.minimap.getTextEditorScaledHeight() / 2; - const ratio = deltaY / (this.minimap.getVisibleHeight() - this.minimap.getTextEditorScaledHeight()); - this.minimap.setTextEditorScrollTop(ratio * this.minimap.getTextEditorMaxScrollTop()); - } - /** - * Subscribes to a media query for device pixel ratio changes and forces a repaint when it occurs. - * - * @returns {Disposable} A disposable to remove the media query listener - * @access private - */ subscribeToMediaQuery() { - const mediaQuery = window.matchMedia("screen and (-webkit-min-device-pixel-ratio: 1.5)"); - const mediaListener = ()=>{ - this.requestForcedUpdate(); - }; - mediaQuery.addEventListener("change", mediaListener); - return new (0, $cz7Pu$atom.Disposable)(()=>{ - mediaQuery.removeEventListener("change", mediaListener); - }); - } - // ######## #### ######## - // ## ## ## ## ## ## - // ## ## #### ## ## - // ## ## #### ## ## - // ## ## ## ## ## ## ## - // ## ## ## ## ## ## - // ######## #### ## ######## - /** - * A method triggered when the mouse is pressed over the visible area that starts the dragging gesture. - * - * @param {number} y The vertical coordinate of the event - * @param {boolean} isLeftMouse Was the left mouse button pressed? - * @param {boolean} isMiddleMouse Was the middle mouse button pressed? - * @access private - */ startDrag({ y: y, isLeftMouse: isLeftMouse, isMiddleMouse: isMiddleMouse }) { - if (!this.minimap) return; - if (!isLeftMouse && !isMiddleMouse) return; - const initial = { - dragOffset: y - this.visibleArea.getBoundingClientRect().top, - offsetTop: this.getBoundingClientRect().top - }; - // TODO can we avoid adding and removing the listeners every time? - const mousemoveHandler = (e)=>this.drag($0965f8da08ee51eb$var$extractMouseEventData(e), initial); - const dragendHandler = ()=>this.endDrag(); - const touchmoveHandler = (e)=>this.drag($0965f8da08ee51eb$var$extractTouchEventData(e), initial); - document.body.addEventListener("mousemove", mousemoveHandler, { - passive: true - }); - document.body.addEventListener("mouseup", dragendHandler, { - passive: true - }); - document.body.addEventListener("mouseleave", dragendHandler, { - passive: true - }); - document.body.addEventListener("touchmove", touchmoveHandler, { - passive: true - }); - document.body.addEventListener("touchend", dragendHandler, { - passive: true - }); - document.body.addEventListener("touchcancel", dragendHandler, { - passive: true - }); - this.dragSubscription = new (0, $cz7Pu$atom.Disposable)(function() { - document.body.removeEventListener("mousemove", mousemoveHandler); - document.body.removeEventListener("mouseup", dragendHandler); - document.body.removeEventListener("mouseleave", dragendHandler); - document.body.removeEventListener("touchmove", touchmoveHandler); - document.body.removeEventListener("touchend", dragendHandler); - document.body.removeEventListener("touchcancel", dragendHandler); - }); - } - /** - * The method called during the drag gesture. - * - * @param {number} y The vertical coordinate of the event - * @param {boolean} isLeftMouse Was the left mouse button pressed? - * @param {boolean} isMiddleMouse Was the middle mouse button pressed? - * @param {number} initial.dragOffset The mouse offset within the visible area - * @param {number} initial.offsetTop The MinimapElement offset at the moment of the drag start - * @access private - */ drag({ y: y, isLeftMouse: isLeftMouse, isMiddleMouse: isMiddleMouse }, initial) { - if (!this.minimap) return; - if (!isLeftMouse && !isMiddleMouse) return; - const deltaY = y - initial.offsetTop - initial.dragOffset; - const ratio = deltaY / (this.minimap.getVisibleHeight() - this.minimap.getTextEditorScaledHeight()); - this.minimap.setTextEditorScrollTop(ratio * this.minimap.getTextEditorMaxScrollTop()); - } - /** - * The method that ends the drag gesture. - * - * @access private - */ endDrag() { - if (!this.minimap) return; - this.dragSubscription.dispose(); - } -} -$0965f8da08ee51eb$var$MinimapElement.initClass(); -function $0965f8da08ee51eb$export$aa3fab546e9e7454() { - const element = document.createElement($0965f8da08ee51eb$var$TAG_NAME); - element.createdCallback(); - return element; -} -// ######## ## ## ######## ## ## ######## ###### -// ## ## ## ## ### ## ## ## ## -// ## ## ## ## #### ## ## ## -// ###### ## ## ###### ## ## ## ## ###### -// ## ## ## ## ## #### ## ## -// ## ## ## ## ## ### ## ## ## -// ######## ### ######## ## ## ## ###### -/** - * A method that extracts data from a `MouseEvent` which can then be used to process clicks and drags of the minimap. - * - * Used together with `extractTouchEventData` to provide a unified interface for `MouseEvent`s and `TouchEvent`s. - * - * @param {MouseEvent} mouseEvent The mouse event object - * @access private - */ function $0965f8da08ee51eb$var$extractMouseEventData(mouseEvent) { - return { - x: mouseEvent.pageX, - y: mouseEvent.pageY, - isLeftMouse: mouseEvent.button === 0, - isMiddleMouse: mouseEvent.button === 1 - }; -} -/** - * A method that extracts data from a `TouchEvent` which can then be used to process clicks and drags of the minimap. - * - * Used together with `extractMouseEventData` to provide a unified interface for `MouseEvent`s and `TouchEvent`s. - * - * @param {TouchEvent} touchEvent The touch event object - * @access private - */ function $0965f8da08ee51eb$var$extractTouchEventData(touchEvent) { - // Use the first touch on the target area. Other touches will be ignored in - // case of multi-touch. - const touch = touchEvent.changedTouches[0]; - return { - x: touch.pageX, - y: touch.pageY, - isLeftMouse: true, - isMiddleMouse: false - }; -} -// ###### ###### ###### -// ## ## ## ## ## ## -// ## ## ## -// ## ###### ###### -// ## ## ## -// ## ## ## ## ## ## -// ###### ###### ###### -/** - * Applies the passed-in styles properties to the specified element - * - * @param {HTMLElement} element The element onto which apply the styles - * @param {Object} styles The styles to apply - * @access private - */ function $0965f8da08ee51eb$var$applyStyles(element, styles) { - if (!element) return; - let cssText = ""; - for(const property in styles)cssText += `${property}: ${styles[property]}; `; - element.style.cssText = cssText; -} -/** - * Returns a string with a CSS translation tranform value. - * - * @param {number} [x=0] The x offset of the translation. Default is `0` - * @param {number} [y=0] The y offset of the translation. Default is `0` - * @param {boolean} [useHardwareAcceleration=false] Use hardware acceleration. Default is `false` - * @returns {string} The CSS translation string - * @access private - */ function $0965f8da08ee51eb$var$makeTranslate(x = 0, y = 0, useHardwareAcceleration = false) { - if (useHardwareAcceleration) return `translate3d(${x}px, ${y}px, 0)`; - else return `translate(${x}px, ${y}px)`; -} -/** - * Returns a string with a CSS scaling tranform value. - * - * @param {number} [x=0] The x scaling factor. Default is `0` - * @param {number} [y=0] The y scaling factor. Default is `0` - * @param {boolean} [useHardwareAcceleration=false] Use hardware acceleration. Default is `false` - * @returns {string} The CSS scaling string - * @access private - */ function $0965f8da08ee51eb$var$makeScale(x = 0, y = x, useHardwareAcceleration = false) { - if (useHardwareAcceleration) return `scale3d(${x}, ${y}, 1)`; - else return `scale(${x}, ${y})`; -} -/** - * A method that mimic the jQuery `animate` method and used to animate the scroll when clicking on the MinimapElement canvas. - * - * @param {Object} param The animation data object - * @param {[type]} param.from The start value - * @param {[type]} param.to The end value - * @param {[type]} param.duration The animation duration - * @param {[type]} param.step The easing function for the animation - * @access private - */ function $0965f8da08ee51eb$var$animate({ from: from, to: to, duration: duration, step: step }) { - const start = $0965f8da08ee51eb$var$getTime(); - let progress; - const update = ()=>{ - const passed = $0965f8da08ee51eb$var$getTime() - start; - if (duration === 0) progress = 1; - else progress = passed / duration; - if (progress > 1) progress = 1; - const delta = $0965f8da08ee51eb$var$swing(progress); - const value = from + (to - from) * delta; - step(value, delta); - if (progress < 1) requestAnimationFrame(update); - }; - update(); -} -function $0965f8da08ee51eb$var$swing(progress) { - return 0.5 - Math.cos(progress * Math.PI) / 2; -} -/** - * A method that return the current time as a Date. - * - * That method exist so that we can mock it in tests. - * - * @returns {Date} The current time as Date - * @access private - */ function $0965f8da08ee51eb$var$getTime() { - return new Date(); -} - - - - -"use strict"; -class $248c7ec3a64ef176$export$2e2bcd8739ae039 { - constructor(textEditor){ - this.textEditor = textEditor; - this.textEditorElement = atom.views.getView(this.textEditor); - } - enableCache() { - this.useCache = true; - } - clearCache() { - this.useCache = false; - delete this.heightCache; - delete this.scrollTopCache; - delete this.scrollLeftCache; - delete this.maxScrollTopCache; - } - onDidChangeScrollTop(callback) { - return this.textEditorElement.onDidChangeScrollTop(callback); - } - onDidChangeScrollLeft(callback) { - return this.textEditorElement.onDidChangeScrollLeft(callback); - } - getHeight() { - if (this.editorDestroyed()) return 0; - if (this.useCache) { - if (!this.heightCache) this.heightCache = this.textEditorElement.getHeight(); - return this.heightCache; - } - return this.textEditorElement.getHeight(); - } - getScrollTop() { - if (this.editorDestroyed()) return 0; - if (this.useCache) { - if (!this.scrollTopCache) this.scrollTopCache = this.computeScrollTop(); - return this.scrollTopCache; - } - return this.computeScrollTop(); - } - computeScrollTop() { - if (this.editorDestroyed()) return 0; - const scrollTop = this.textEditorElement.getScrollTop(); - const lineHeight = this.textEditor.getLineHeightInPixels(); - let firstRow = this.textEditorElement.getFirstVisibleScreenRow(); - if (Number.isNaN(firstRow)) // Guard against their being no visible screen row - return 0; - let lineTop = this.textEditorElement.pixelPositionForScreenPosition([ - firstRow, - 0 - ]).top; - if (lineTop > scrollTop) { - firstRow -= 1; - lineTop = this.textEditorElement.pixelPositionForScreenPosition([ - firstRow, - 0 - ]).top; - } - const lineY = firstRow * lineHeight; - const offset = Math.min(scrollTop - lineTop, lineHeight); - return lineY + offset; - } - setScrollTop(scrollTop) { - if (this.editorDestroyed()) return; - this.textEditorElement.setScrollTop(scrollTop); - } - getScrollLeft() { - if (this.editorDestroyed()) return 0; - if (this.useCache) { - if (!this.scrollLeftCache) this.scrollLeftCache = this.textEditorElement.getScrollLeft(); - return this.scrollLeftCache; - } - return this.textEditorElement.getScrollLeft(); - } - getMaxScrollTop() { - if (this.editorDestroyed()) return 0; - if (this.maxScrollTopCache != null && this.useCache) return this.maxScrollTopCache; - let maxScrollTop; - if (this.textEditorElement.getMaxScrollTop) { - maxScrollTop = this.textEditorElement.getMaxScrollTop(); - if (parseFloat(atom.getVersion()) >= 1.13) { - if (this.scrollPastEnd) { - const lineHeight = this.textEditor.getLineHeightInPixels(); - maxScrollTop -= this.getHeight() - 3 * lineHeight; - } - } - } else { - maxScrollTop = this.textEditorElement.getScrollHeight() - this.getHeight(); - if (this.scrollPastEnd) { - const lineHeight = this.textEditor.getLineHeightInPixels(); - maxScrollTop -= this.getHeight() - 3 * lineHeight; - } - } - if (this.useCache) this.maxScrollTopCache = maxScrollTop; - return maxScrollTop; - } - editorDestroyed() { - return !this.textEditor || this.textEditor.isDestroyed() || !this.textEditorElement.component || !this.textEditorElement.getModel() || !this.textEditorElement.parentNode; - } -} - - - -"use strict"; -let $e85ce81538013d49$var$nextModelId = 1; -// returned in the decorations API when minimap is destoryed -const $e85ce81538013d49$var$disposedDisposable = new (0, $cz7Pu$atom.Disposable)(); -$e85ce81538013d49$var$disposedDisposable.dispose(); -const $e85ce81538013d49$var$markerMock = { - onDidDestroy: ()=>$e85ce81538013d49$var$disposedDisposable, - getScreenRange: ()=>new Range() -}; -const $e85ce81538013d49$var$dummyDecoration = new (0, $2946613f0e118ee7$export$2e2bcd8739ae039)($e85ce81538013d49$var$markerMock, null, {}); -class $e85ce81538013d49$export$2e2bcd8739ae039 { - /** - * Creates a new Minimap instance for the given `TextEditor`. - * - * @param {Object} options An object with the new Minimap properties - * @param {TextEditor} options.textEditor The target text editor for the minimap - * @param {boolean} [options.standAlone] Whether this minimap is in stand-alone mode or not - * @param {number} [options.width] The minimap width in pixels - * @param {number} [options.height] The minimap height in pixels - * @throws {Error} Cannot create a minimap without an editor - */ constructor(options = {}){ - if (!options.textEditor) throw new Error("Cannot create a minimap without an editor"); - /** - * The Minimap's minimapElement. - * - * @type {MinimapElement} - * @access private - */ this.minimapElement = undefined; - // local cache of this.minimapElement.DecorationManagement - this.DecorationManagement = undefined; - /** - * The Minimap's text editor. - * - * @type {TextEditor} - * @access private - */ this.textEditor = options.textEditor; - /** - * The Minimap's text editor element. - * - * @access private - */ this.editorElement = undefined; - /** - * The stand-alone state of the current Minimap. - * - * @type {boolean} - * @access private - */ this.standAlone = options.standAlone; - /** - * The width of the current Minimap. - * - * @type {number} - * @access private - */ this.width = options.width; - /** - * The height of the current Minimap. - * - * @type {number} - * @access private - */ this.height = options.height; - /** - * The id of the current Minimap. - * - * @type {Number} - * @access private - */ this.id = $e85ce81538013d49$var$nextModelId++; - /** - * The events emitter of the current Minimap. - * - * @type {Emitter} - * @access private - */ this.emitter = new (0, $cz7Pu$atom.Emitter)(); - /** - * The Minimap's subscriptions. - * - * @type {CompositeDisposable} - * @access private - */ this.subscriptions = new (0, $cz7Pu$atom.CompositeDisposable)(); - /** - * The adapter object leverage the access to several properties from the `TextEditor`/`TextEditorElement` to support - * the different APIs between different version of Atom. - * - * @type {Object} - * @access private - */ this.adapter = null; - /** - * The char height of the current Minimap, will be `undefined` unless `setCharWidth` is called. - * - * @type {number} - * @access private - */ this.charHeight = null; - /** - * The char height from the package's configuration. Will be overriden by the instance value. - * - * @type {number} - * @access private - */ this.configCharHeight = null; - /** - * The char width of the current Minimap, will be `undefined` unless `setCharWidth` is called. - * - * @type {number} - * @access private - */ this.charWidth = null; - /** - * The char width from the package's configuration. Will be overriden by the instance value. - * - * @type {number} - * @access private - */ this.configCharWidth = null; - /** - * The interline of the current Minimap, will be `undefined` unless `setCharWidth` is called. - * - * @type {number} - * @access private - */ this.interline = null; - /** - * The interline from the package's configuration. Will be overriden by the instance value. - * - * @type {number} - * @access private - */ this.configInterline = null; - /** - * The devicePixelRatioRounding of the current Minimap, will be `undefined` unless `setDevicePixelRatioRounding` is called. - * - * @type {boolean} - * @access private - */ this.devicePixelRatioRounding = null; - /** - * The devicePixelRatioRounding from the package's configuration. Will be overriden by the instance value. - * - * @type {boolean} - * @access private - */ this.configDevicePixelRatioRounding = null; - /** - * A number of milliseconds which determines how often the minimap should redraw itself after detecting changes in - * the text editor. A value of 0 will cause the minimap to redraw immediately. - * - * @type {number} - * @access private - */ this.redrawDelay = 0; - /** - * A boolean value to store whether this Minimap have been destroyed or not. - * - * @type {boolean} - * @access private - */ this.destroyed = false; - /** - * A boolean value to store whether the `scrollPastEnd` setting is enabled or not. - * - * @type {boolean} - * @access private - */ this.scrollPastEnd = false; - /** - * An array of changes registered with textEditor.onDidChange() which have not yet been handled - * - * @type {Array} - * @access private - */ this.pendingChangeEvents = []; - /** - * Timer reference which, once fired, will flush all the pending changes stored in this.pendingChangeEvents array. - * - * @type {Timer | null} - * @access private - */ this.flushChangesTimer = null; - if (atom.views.getView(this.textEditor).getScrollTop != null) this.adapter = new (0, $248c7ec3a64ef176$export$2e2bcd8739ae039)(this.textEditor); - /** - * When in stand-alone or independent scrolling mode, this value can be used instead of the computed scroll. - * - * @type {number} - * @access private - */ this.scrollTop = 0; - let configSubscription = this.subscribeToConfig(); - this.subscriptions.add(configSubscription, this.textEditor.onDidChangeGrammar(()=>{ - this.subscriptions.remove(configSubscription); - configSubscription.dispose(); - configSubscription = this.subscribeToConfig(); - this.subscriptions.add(configSubscription); - }), this.adapter.onDidChangeScrollTop(()=>{ - if (!this.standAlone && !this.ignoreTextEditorScroll && !this.inChangeScrollTop) { - this.inChangeScrollTop = true; - this.updateScrollTop(); - this.emitter.emit("did-change-scroll-top", this); - this.inChangeScrollTop = false; - } - if (this.ignoreTextEditorScroll) this.ignoreTextEditorScroll = false; - }), this.adapter.onDidChangeScrollLeft(()=>{ - if (!this.standAlone) this.emitter.emit("did-change-scroll-left", this); - }), this.textEditor.onDidChange((changes)=>{ - this.scheduleChanges(changes); - }), this.textEditor.onDidDestroy(()=>{ - if (0, $e6ccb2de5b0684dd$export$3542142cf713a624) (0, $e6ccb2de5b0684dd$export$3542142cf713a624).delete(this.textEditor); - this.destroy(); - }), /* - FIXME Some changes occuring during the tokenization produces - ranges that deceive the canvas rendering by making some - lines at the end of the buffer intact while they are in fact not, - resulting in extra lines appearing at the end of the minimap. - Forcing a whole repaint to fix that bug is suboptimal but works. - */ this.textEditor.onDidTokenize(()=>{ - this.emitter.emit("did-change-config"); - })); - } - /** Destroys the model. */ destroy() { - if (this.destroyed) return; - clearTimeout(this.flushChangesTimer); - this.pendingChangeEvents = []; - this.subscriptions.dispose(); - this.emitter.emit("did-destroy"); - this.emitter.dispose(); - this.destroyed = true; - } - /** - * Returns `true` when this `Minimap` has benn destroyed. - * - * @returns {boolean} Whether this Minimap has been destroyed or not - */ isDestroyed() { - return this.destroyed; - } - /** - * Schedule changes from textEditor.onDidChange() to be handled at a later time - * - * @param {Array} changes The changes to be scheduled - * @returns Void - * @access private - */ scheduleChanges(changes) { - this.pendingChangeEvents = this.pendingChangeEvents.concat(changes); - // Optimisation: If the redraw delay is set to 0, do not even schedule a timer - if (!this.redrawDelay) this.requestFlushChanges(); - if (!this.flushChangesTimer) // If any changes happened within the timeout's delay, a timeout will already have been - // scheduled -> no need to schedule again - this.flushChangesTimer = setTimeout(()=>{ - this.requestFlushChanges(); - }, this.redrawDelay); - } - /** - * Flush all changes which have been scheduled for later processing by this.scheduleChanges() - * - * @returns Void - * @access private - */ flushChanges() { - clearTimeout(this.flushChangesTimer); - this.flushChangesTimer = null; - this.emitChanges(this.pendingChangeEvents); - this.pendingChangeEvents = []; - } - /** - * Requests flush changes if not already requested - * - * @returns Void - * @access private - */ requestFlushChanges() { - if (!this.requestedFlushChanges) this.requestedFlushChanges = requestAnimationFrame(()=>{ - this.flushChanges(); - if (this.requestedFlushChanges) { - cancelAnimationFrame(this.requestedFlushChanges); - this.requestedFlushChanges = null; - } - }); - } - /** - * Registers an event listener to the `did-change` event. - * - * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be - * called with an event object with the following properties: - * - * - Start: The change's start row number - * - End: The change's end row number - * - ScreenDelta: the delta in buffer rows between the versions before and after the change - * - * @returns {Disposable} A disposable to stop listening to the event - */ onDidChange(callback) { - return this.emitter.on("did-change", callback); - } - /** - * Registers an event listener to the `did-change-config` event. - * - * @param {function():void} callback A function to call when the event is triggered. - * @returns {Disposable} A disposable to stop listening to the event - */ onDidChangeConfig(callback) { - return this.emitter.on("did-change-config", callback); - } - /** - * Registers an event listener to the `did-change-scroll-top` event. - * - * The event is dispatched when the text editor `scrollTop` value have been changed or when the minimap scroll top - * have been changed in stand-alone mode. - * - * @param {function(minimap:Minimap):void} callback A function to call when the event is triggered. The current - * Minimap is passed as argument to the callback. - * @returns {Disposable} A disposable to stop listening to the event - */ onDidChangeScrollTop(callback) { - return this.emitter.on("did-change-scroll-top", callback); - } - /** - * Registers an event listener to the `did-change-scroll-left` event. - * - * @param {function(minimap:Minimap):void} callback A function to call when the event is triggered. The current - * Minimap is passed as argument to the callback. - * @returns {Disposable} A disposable to stop listening to the event - */ onDidChangeScrollLeft(callback) { - return this.emitter.on("did-change-scroll-left", callback); - } - /** - * Registers an event listener to the `did-change-stand-alone` event. - * - * This event is dispatched when the stand-alone of the current Minimap is either enabled or disabled. - * - * @param {function(minimap:Minimap):void} callback A function to call when the event is triggered. The current - * Minimap is passed as argument to the callback. - * @returns {Disposable} A disposable to stop listening to the event - */ onDidChangeStandAlone(callback) { - return this.emitter.on("did-change-stand-alone", callback); - } - /** - * Registers an event listener to the `did-destroy` event. - * - * This event is dispatched when this Minimap have been destroyed. It can occurs either because the {@link destroy} - * method have been called on the Minimap or because the target text editor have been destroyed. - * - * @param {function():void} callback A function to call when the event is triggered. - * @returns {Disposable} A disposable to stop listening to the event - */ onDidDestroy(callback) { - return this.emitter.on("did-destroy", callback); - } - /** - * Registers to the config changes for the current editor scope. - * - * @returns {Disposable} The disposable to dispose all the registered events - * @access private - */ subscribeToConfig() { - const subs = new (0, $cz7Pu$atom.CompositeDisposable)(); - const opts = { - scope: this.textEditor.getRootScopeDescriptor() - }; - subs.add(atom.config.observe("editor.scrollPastEnd", opts, (scrollPastEnd)=>{ - this.scrollPastEnd = scrollPastEnd; - this.adapter.scrollPastEnd = this.scrollPastEnd; - this.emitter.emit("did-change-config"); - }), atom.config.observe("minimap.charHeight", opts, (configCharHeight)=>{ - this.configCharHeight = configCharHeight; - this.updateScrollTop(); - this.emitter.emit("did-change-config"); - }), atom.config.observe("minimap.charWidth", opts, (configCharWidth)=>{ - this.configCharWidth = configCharWidth; - this.updateScrollTop(); - this.emitter.emit("did-change-config"); - }), atom.config.observe("minimap.interline", opts, (configInterline)=>{ - this.configInterline = configInterline; - this.updateScrollTop(); - this.emitter.emit("did-change-config"); - }), atom.config.observe("minimap.independentMinimapScroll", opts, (independentMinimapScroll)=>{ - this.independentMinimapScroll = independentMinimapScroll; - this.updateScrollTop(); - }), atom.config.observe("minimap.scrollSensitivity", opts, (scrollSensitivity)=>{ - this.scrollSensitivity = scrollSensitivity; - }), atom.config.observe("minimap.redrawDelay", opts, (redrawDelay)=>{ - this.redrawDelay = redrawDelay; - }), // cdprr is shorthand for configDevicePixelRatioRounding - atom.config.observe("minimap.devicePixelRatioRounding", opts, (cdprr)=>{ - this.configDevicePixelRatioRounding = cdprr; - this.updateScrollTop(); - this.emitter.emit("did-change-config"); - })); - return subs; - } - /** - * Returns `true` when the current Minimap is a stand-alone minimap. - * - * @returns {boolean} Whether this Minimap is in stand-alone mode or not. - */ isStandAlone() { - return this.standAlone; - } - /** - * Sets the stand-alone mode for this minimap. - * - * @fires {did-change-stand-alone} if The stand-alone mode have been toggled on or off by the call - * @param {boolean} standAlone The new state of the stand-alone mode for this Minimap - */ setStandAlone(standAlone) { - if (standAlone !== this.standAlone) { - this.standAlone = standAlone; - this.emitter.emit("did-change-stand-alone", this); - } - } - /** @returns {MinimapElement} Returns the current minimapElement */ getMinimapElement() { - return this.minimapElement; - } - /** - * Returns the `TextEditor` that this minimap represents. - * - * @returns {TextEditor} This Minimap's text editor - */ getTextEditor() { - return this.textEditor; - } - /** - * Returns the `TextEditorElement` for the Minimap's `TextEditor`. - * - * @returns {TextEditorElement} The minimap's text editor element - */ getTextEditorElement() { - if (this.editorElement) return this.editorElement; - this.editorElement = atom.views.getView(this.getTextEditor()); - return this.editorElement; - } - /** - * Returns the height of the `TextEditor` at the Minimap scale. - * - * @returns {number} The scaled height of the text editor - */ getTextEditorScaledHeight() { - return this.adapter.getHeight() * this.getVerticalScaleFactor(); - } - /** - * Returns the `TextEditor` scroll top value at the Minimap scale. - * - * @returns {number} The scaled scroll top of the text editor - */ getTextEditorScaledScrollTop() { - return this.adapter.getScrollTop() * this.getVerticalScaleFactor(); - } - /** - * Returns the `TextEditor` scroll left value at the Minimap scale. - * - * @returns {number} The scaled scroll left of the text editor - */ getTextEditorScaledScrollLeft() { - return this.adapter.getScrollLeft() * this.getHorizontalScaleFactor(); - } - /** - * Returns the `TextEditor` maximum scroll top value. - * - * When the `scrollPastEnd` setting is enabled, the method compensate the extra scroll by removing the same height as - * added by the editor from the final value. - * - * @returns {number} The maximum scroll top of the text editor - */ getTextEditorMaxScrollTop() { - return this.adapter.getMaxScrollTop(); - } - /** - * Returns the `TextEditor` scroll top value. - * - * @returns {number} The scroll top of the text editor - */ getTextEditorScrollTop() { - return this.adapter.getScrollTop(); - } - /** - * Sets the scroll top of the `TextEditor`. - * - * @param {number} scrollTop The new scroll top value - */ setTextEditorScrollTop(scrollTop, ignoreTextEditorScroll = false) { - this.ignoreTextEditorScroll = ignoreTextEditorScroll; - this.adapter.setScrollTop(scrollTop); - } - /** - * Returns the `TextEditor` scroll left value. - * - * @returns {number} The scroll left of the text editor - */ getTextEditorScrollLeft() { - return this.adapter.getScrollLeft(); - } - /** - * Returns the height of the `TextEditor`. - * - * @returns {number} The height of the text editor - */ getTextEditorHeight() { - return this.adapter.getHeight(); - } - /** - * Returns the `TextEditor` scroll as a value normalized between `0` and `1`. - * - * When the `scrollPastEnd` setting is enabled the value may exceed `1` as the maximum scroll value used to compute - * this ratio compensate for the extra height in the editor. **Use {@link getCapedTextEditorScrollRatio} when you need - * a value that is strictly between `0` and `1`.** - * - * @returns {number} The scroll ratio of the text editor - */ getTextEditorScrollRatio() { - return this.adapter.getScrollTop() / (this.getTextEditorMaxScrollTop() || 1); - } - /** - * Returns the `TextEditor` scroll as a value normalized between `0` and `1`. - * - * The returned value will always be strictly between `0` and `1`. - * - * @returns {number} The scroll ratio of the text editor strictly between 0 and 1 - */ getCapedTextEditorScrollRatio() { - return Math.min(1, this.getTextEditorScrollRatio()); - } - /** - * Returns the height of the whole minimap in pixels based on the `minimap` settings. - * - * @returns {number} The height of the minimap - */ getHeight() { - const additionalHeight = this.scrollPastEnd ? this.textEditor.getRowsPerPage() : 0; - return (this.textEditor.getScreenLineCount() + additionalHeight) * this.getLineHeight(); - } - /** - * Returns the width of the whole minimap in pixels based on the `minimap` settings. - * - * @returns {number} The width of the minimap - */ getWidth() { - return this.textEditor.getMaxScreenLineLength() * this.getCharWidth(); - } - /** - * Returns the height the Minimap content will take on screen. - * - * When the Minimap height is greater than the `TextEditor` height, the `TextEditor` height is returned instead. - * - * @returns {number} The visible height of the Minimap - */ getVisibleHeight() { - return Math.min(this.getScreenHeight(), this.getHeight()); - } - /** - * Returns the height the minimap should take once displayed, it's either the height of the `TextEditor` or the - * provided `height` when in stand-alone mode. - * - * @returns {number} The total height of the Minimap - */ getScreenHeight() { - if (this.isStandAlone()) { - if (this.height != null) return this.height; - else return this.getHeight(); - } else return this.adapter.getHeight(); - } - /** - * Returns the width the whole Minimap will take on screen. - * - * @returns {number} The width of the Minimap when displayed - */ getVisibleWidth() { - return Math.min(this.getScreenWidth(), this.getWidth()); - } - /** - * Returns the width the Minimap should take once displayed, it's either the width of the Minimap content or the - * provided `width` when in standAlone mode. - * - * @returns {number} The Minimap screen width - */ getScreenWidth() { - if (this.isStandAlone() && this.width != null) return this.width; - else return this.getWidth(); - } - /** - * Sets the preferred height and width when in stand-alone mode. - * - * This method is called by the for this Minimap so that the model is kept in sync with the view. - * - * @param {number} height The new height of the Minimap - * @param {number} width The new width of the Minimap - */ setScreenHeightAndWidth(height, width) { - if (this.width !== width || this.height !== height) { - this.height = height; - this.width = width; - this.updateScrollTop(); - } - } - /** - * Returns the vertical scaling factor when converting coordinates from the `TextEditor` to the Minimap. - * - * @returns {number} The Minimap vertical scaling factor - */ getVerticalScaleFactor() { - return this.getLineHeight() / this.textEditor.getLineHeightInPixels(); - } - /** - * Returns the horizontal scaling factor when converting coordinates from the `TextEditor` to the Minimap. - * - * @returns {number} The Minimap horizontal scaling factor - */ getHorizontalScaleFactor() { - return this.getCharWidth() / this.textEditor.getDefaultCharWidth(); - } - /** - * Returns the height of a line in the Minimap in pixels. - * - * @returns {number} A line's height in the Minimap - */ getLineHeight() { - return this.getCharHeight() + this.getInterline(); - } - /** - * Returns the width of a character in the Minimap in pixels. - * - * @returns {number} A character's width in the Minimap - */ getCharWidth() { - if (this.charWidth != null) return this.charWidth; - else return this.configCharWidth; - } - /** - * Sets the char width for this Minimap. This value will override the value from the config for this instance only. A - * `did-change-config` event is dispatched. - * - * @fires {did-change-config} when The value is changed - * @param {number} charWidth The new width of a char in the Minimap - */ setCharWidth(charWidth) { - this.charWidth = Math.floor(charWidth); - this.emitter.emit("did-change-config"); - } - /** - * Returns the height of a character in the Minimap in pixels. - * - * @returns {number} A character's height in the Minimap - */ getCharHeight() { - if (this.charHeight != null) return this.charHeight; - else return this.configCharHeight; - } - /** - * Sets the char height for this Minimap. This value will override the value from the config for this instance only. A - * `did-change-config` event is dispatched. - * - * @fires {did-change-config} when The value is changed - * @param {number} charHeight The new height of a char in the Minimap - */ setCharHeight(charHeight) { - this.charHeight = Math.floor(charHeight); - this.emitter.emit("did-change-config"); - } - /** - * Returns the height of an interline in the Minimap in pixels. - * - * @returns {number} The interline's height in the Minimap - */ getInterline() { - if (this.interline != null) return this.interline; - else return this.configInterline; - } - /** - * Sets the interline height for this Minimap. This value will override the value from the config for this instance - * only. A `did-change-config` event is dispatched. - * - * @fires {did-change-config} when The value is changed - * @param {number} interline The new height of an interline in the Minimap - */ setInterline(interline) { - this.interline = Math.floor(interline); - this.emitter.emit("did-change-config"); - } - /** - * Returns the status of devicePixelRatioRounding in the Minimap. - * - * @returns {boolean} The devicePixelRatioRounding status in the Minimap - */ getDevicePixelRatioRounding() { - if (this.devicePixelRatioRounding != null) return this.devicePixelRatioRounding; - else return this.configDevicePixelRatioRounding; - } - /** - * Sets the devicePixelRatioRounding status for this Minimap. This value will override the value from the config for - * this instance only. A `did-change-config` event is dispatched. - * - * @fires {did-change-config} when The value is changed - * @param {boolean} devicePixelRatioRounding The new status of devicePixelRatioRounding in the Minimap - */ setDevicePixelRatioRounding(devicePixelRatioRounding) { - this.devicePixelRatioRounding = devicePixelRatioRounding; - this.emitter.emit("did-change-config"); - } - /** - * Returns the devicePixelRatio in the Minimap in pixels. - * - * @returns {number} The devicePixelRatio in the Minimap - */ getDevicePixelRatio() { - if (this.getDevicePixelRatioRounding()) { - if (devicePixelRatio >= 1) return Math.round(devicePixelRatio); - else return Math.max(Math.round(devicePixelRatio * 10) / 10, 0.1); - } - return devicePixelRatio; - } - /** - * Returns the index of the first visible row in the Minimap. - * - * @returns {number} The index of the first visible row - */ getFirstVisibleScreenRow() { - return Math.floor(this.getScrollTop() / this.getLineHeight()); - } - /** - * Returns the index of the last visible row in the Minimap. - * - * @returns {number} The index of the last visible row - */ getLastVisibleScreenRow() { - return Math.ceil((this.getScrollTop() + this.getScreenHeight()) / this.getLineHeight()); - } - /** - * Returns true when the `independentMinimapScroll` setting have been enabled. - * - * @returns {boolean} Whether the minimap can scroll independently - */ scrollIndependentlyOnMouseWheel() { - return this.independentMinimapScroll; - } - /** - * Returns the current scroll of the Minimap. - * - * The Minimap can scroll only when its height is greater that the height of its `TextEditor`. - * - * @returns {number} The scroll top of the Minimap - */ getScrollTop() { - return this.standAlone || this.independentMinimapScroll ? this.scrollTop : this.getScrollTopFromEditor(); - } - /** - * Sets the minimap scroll top value when in stand-alone mode. - * - * @fires {did-change-scroll-top} if The Minimap's stand-alone mode is enabled - * @param {number} scrollTop The new scroll top for the Minimap - */ setScrollTop(scrollTop) { - this.scrollTop = Math.max(0, Math.min(this.getMaxScrollTop(), scrollTop)); - if (this.standAlone || this.independentMinimapScroll) this.emitter.emit("did-change-scroll-top", this); - } - /** - * Returns the minimap scroll as a ration between 0 and 1. - * - * @returns {number} The minimap scroll ratio - */ getScrollRatio() { - return this.getScrollTop() / this.getMaxScrollTop(); - } - /** - * Updates the scroll top value with the one computed from the text editor when the minimap is in the independent - * scrolling mode. - * - * @access private - */ updateScrollTop() { - if (this.independentMinimapScroll) { - try { - this.setScrollTop(this.getScrollTopFromEditor()); - } catch (err) {} - this.emitter.emit("did-change-scroll-top", this); - } - } - /** - * Returns the scroll top as computed from the text editor scroll top. - * - * @returns {number} The computed scroll top value - */ getScrollTopFromEditor() { - return Math.abs(this.getCapedTextEditorScrollRatio() * this.getMaxScrollTop()); - } - /** - * Returns the maximum scroll value of the Minimap. - * - * @returns {number} The maximum scroll top for the Minimap - */ getMaxScrollTop() { - return Math.max(0, this.getHeight() - this.getScreenHeight()); - } - /** - * Returns `true` when the Minimap can scroll. - * - * @returns {boolean} Whether this Minimap can scroll or not - */ canScroll() { - return this.getMaxScrollTop() > 0; - } - /** - * Updates the minimap scroll top value using a mouse event when the independent scrolling mode is enabled - * - * @param {MouseEvent} event The mouse wheel event - * @access private - */ onMouseWheel(event) { - if (this.scrollIndependentlyOnMouseWheel()) { - event.stopPropagation(); - if (!this.canScroll()) return; - const { wheelDeltaY: wheelDeltaY } = event; - const previousScrollTop = this.getScrollTop(); - const updatedScrollTop = previousScrollTop - Math.round(wheelDeltaY * this.scrollSensitivity); - this.setScrollTop(updatedScrollTop); - } - } - /** - * Delegates to `TextEditor#getMarker`. - * - * @access private - */ getMarker(id) { - return this.textEditor.getMarker(id); - } - /** - * Delegates to `TextEditor#findMarkers`. - * - * @access private - */ findMarkers(o) { - try { - return this.textEditor.findMarkers(o); - } catch (error) { - return []; - } - } - /** - * Delegates to `TextEditor#markBufferRange`. - * - * @access private - */ markBufferRange(range) { - return this.textEditor.markBufferRange(range); - } - /** - * Emits a change events with the passed-in changes as data. - * - * @param {Object} changes A change to dispatch - * @access private - */ emitChanges(changes) { - this.emitter.emit("did-change", changes); - } - /** - * Enables the cache at the adapter level to avoid consecutive access to the text editor API during a render phase. - * - * @access private - */ enableCache() { - this.adapter.enableCache(); - } - /** - * Disable the adapter cache. - * - * @access private - */ clearCache() { - this.adapter.clearCache(); - } - editorDestroyed() { - this.adapter.editorDestroyed(); - } - /** - * Get the DecorationManagement API for the current minimapElement - * - * @returns {DecorationManagement | undefined} - */ getDecorationManagement() { - var _this_minimapElement; - if (!this.DecorationManagement) { - if ((_this_minimapElement = this.minimapElement) === null || _this_minimapElement === void 0 ? void 0 : _this_minimapElement.DecorationManagement) this.DecorationManagement = this.minimapElement.DecorationManagement; - } - return this.DecorationManagement; - } - // Decoration API duplicated for backward compatibility in the service - getDecorations() { - var _this_getDecorationManagement; - var _this_getDecorationManagement_getDecorations; - return (_this_getDecorationManagement_getDecorations = (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.getDecorations()) !== null && _this_getDecorationManagement_getDecorations !== void 0 ? _this_getDecorationManagement_getDecorations : []; - } - onDidAddDecoration(...args) { - var _this_getDecorationManagement; - var _this_getDecorationManagement_onDidAddDecoration; - return (_this_getDecorationManagement_onDidAddDecoration = (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.onDidAddDecoration(...args)) !== null && _this_getDecorationManagement_onDidAddDecoration !== void 0 ? _this_getDecorationManagement_onDidAddDecoration : $e85ce81538013d49$var$disposedDisposable; - } - onDidRemoveDecoration(...args) { - var _this_getDecorationManagement; - var _this_getDecorationManagement_onDidRemoveDecoration; - return (_this_getDecorationManagement_onDidRemoveDecoration = (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.onDidRemoveDecoration(...args)) !== null && _this_getDecorationManagement_onDidRemoveDecoration !== void 0 ? _this_getDecorationManagement_onDidRemoveDecoration : $e85ce81538013d49$var$disposedDisposable; - } - onDidChangeDecorationRange(...args) { - var _this_getDecorationManagement; - var _this_getDecorationManagement_onDidChangeDecorationRange; - return (_this_getDecorationManagement_onDidChangeDecorationRange = (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.onDidChangeDecorationRange(...args)) !== null && _this_getDecorationManagement_onDidChangeDecorationRange !== void 0 ? _this_getDecorationManagement_onDidChangeDecorationRange : $e85ce81538013d49$var$disposedDisposable; - } - onDidUpdateDecoration(...args) { - var _this_getDecorationManagement; - var _this_getDecorationManagement_onDidUpdateDecoration; - return (_this_getDecorationManagement_onDidUpdateDecoration = (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.onDidUpdateDecoration(...args)) !== null && _this_getDecorationManagement_onDidUpdateDecoration !== void 0 ? _this_getDecorationManagement_onDidUpdateDecoration : $e85ce81538013d49$var$disposedDisposable; - } - decorationForId(...args) { - var _this_getDecorationManagement; - var _this_getDecorationManagement_decorationForId; - return (_this_getDecorationManagement_decorationForId = (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.decorationForId(...args)) !== null && _this_getDecorationManagement_decorationForId !== void 0 ? _this_getDecorationManagement_decorationForId : $e85ce81538013d49$var$dummyDecoration; - } - decorationsForScreenRowRange(...args) { - var _this_getDecorationManagement; - var _this_getDecorationManagement_decorationsForScreenRowRange; - return (_this_getDecorationManagement_decorationsForScreenRowRange = (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.decorationsForScreenRowRange(...args)) !== null && _this_getDecorationManagement_decorationsForScreenRowRange !== void 0 ? _this_getDecorationManagement_decorationsForScreenRowRange : $e85ce81538013d49$var$dummyDecoration; - } - decorationsByTypeThenRows() { - var _this_getDecorationManagement; - var _this_getDecorationManagement_decorationsByTypeThenRows; - return (_this_getDecorationManagement_decorationsByTypeThenRows = (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.decorationsByTypeThenRows()) !== null && _this_getDecorationManagement_decorationsByTypeThenRows !== void 0 ? _this_getDecorationManagement_decorationsByTypeThenRows : $e85ce81538013d49$var$dummyDecoration; - } - decorateMarker(...args) { - var _this_getDecorationManagement; - var _this_getDecorationManagement_decorateMarker; - return (_this_getDecorationManagement_decorateMarker = (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.decorateMarker(...args)) !== null && _this_getDecorationManagement_decorateMarker !== void 0 ? _this_getDecorationManagement_decorateMarker : $e85ce81538013d49$var$dummyDecoration; - } - removeDecoration(...args) { - var _this_getDecorationManagement; - return (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.removeDecoration(...args); - } - removeAllDecorationsForMarker(...args) { - var _this_getDecorationManagement; - return (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.removeAllDecorationsForMarker(...args); - } - removeAllDecorations() { - var _this_getDecorationManagement; - return (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.removeAllDecorations(); - } -} - - -var $9d1240d3ca4fda1c$exports = {}; -$9d1240d3ca4fda1c$exports = JSON.parse('{"plugins":{"type":"object","properties":{}},"autoToggle":{"title":"Show Minimap On Atom Start","type":"boolean","default":true,"order":1},"displayMinimapOnLeft":{"type":"boolean","default":false,"order":2},"displayCodeHighlights":{"type":"boolean","default":true,"description":"Toggles the render of the buffer tokens in the minimap.","order":3},"displayPluginsControls":{"type":"boolean","default":true,"description":"You need to restart Atom for this setting to be effective.","order":4},"minimapScrollIndicator":{"type":"boolean","default":true,"description":"Toggles the display of a side line showing which part of the buffer is currently displayed by the minimap. This side line will only appear if the minimap is taller than the editor view height.","order":5},"adjustMinimapWidthToSoftWrap":{"type":"boolean","default":true,"description":"If this option is enabled and Soft Wrap is checked then the Minimap max width is set to the Preferred Line Length value.","order":6},"adjustMinimapWidthOnlyIfSmaller":{"type":"boolean","default":true,"description":"If this option and `adjustMinimapWidthToSoftWrap` are enabled the minimap width will never go past the limit sets by CSS. On the other hand, when disabled the minimap will expand to honor the preferred line width.","order":7},"ignoreWhitespacesInTokens":{"type":"boolean","default":false,"description":"When enabled, text editor tokens are rendered as plain blocks, with no regards to the whitespaces they contains.","order":8},"charWidth":{"type":"number","default":1,"minimum":0.5,"order":9},"charHeight":{"type":"number","default":2,"minimum":0.5,"order":10},"interline":{"type":"number","default":1,"minimum":0,"description":"The space between lines in the minimap in pixels.","order":11},"textOpacity":{"type":"number","default":0.6,"minimum":0,"maximum":1,"description":"The opacity used to render the line\'s text in the minimap.","order":12},"moveCursorOnMinimapClick":{"type":"boolean","default":false,"description":"Moves the cursor to the beginning of the target line when clicking on the minimap","order":13},"independentMinimapScroll":{"type":"boolean","title":"Independent Minimap Scroll On Mouse Wheel Events","default":false,"description":"When enabled, using the mouse wheel over the Minimap will make it scroll independently of the text editor. The Minimap will still sync with the editor whenever the editor is scrolled, but it will no longer relay the mouse wheel events to the editor.","order":14},"scrollSensitivity":{"type":"number","default":0.5,"description":"The scrolling speed when the `Independent Minimap Scroll On Mouse Wheel Events` setting is enabled.","order":15},"smoothScrolling":{"type":"boolean","default":false,"description":"Whether to offset the minimap canvas when scrolling to keep the scroll smooth. When `true` the minimap canvas will be offseted, resulting in a smoother scroll, but with the side-effect of a blurry minimap when the canvas is placed between pixels. When `false` the canvas will always stay at the same position, and will never look blurry, but the scroll will appear more jagged.","order":16},"createPluginInDevMode":{"type":"boolean","default":false,"order":17},"absoluteMode":{"type":"boolean","default":false,"description":"When enabled the text editor content will be able to flow below the minimap.","order":18},"adjustAbsoluteModeHeight":{"type":"boolean","default":false,"description":"When enabled and `Absolute Mode` is also enabled, the minimap height will be adjusted to only take the space required by the text editor content, leaving the space below triggering mouse events on the text editor. **Be aware this can have some impact on performances as the minimap canvases will be resized every time a change in the editor make its height change.**","order":19},"redrawDelay":{"type":"number","default":400,"minimum":0,"maximum":2000,"description":"Controls how often (in ms) the minimap should redraw itself after changing the text editor\'s contents. Setting this to 100ms or higher could dramatically improve editor responsiveness when working with large files. A value of 0 will cause the minimap to redraw itself immediately on each change.","order":20},"devicePixelRatioRounding":{"type":"boolean","default":true,"description":"Toggles the rounding of the devicePixelRatio in the minimap.","order":21},"useHardwareAcceleration":{"type":"boolean","default":true,"order":22},"scrollAnimation":{"type":"boolean","default":false,"description":"Enables animations when scrolling by clicking on the minimap.","order":23},"scrollAnimationDuration":{"type":"integer","default":300,"description":"The duration of scrolling animations when clicking on the minimap.","order":24},"maxTokensInOneLine":{"type":"integer","default":160,"description":"The maximum number of tokens that are rendered for each line.","order":25}}'); - - -var $d6bb1451a6029905$exports = {}; - -$parcel$export($d6bb1451a6029905$exports, "plugins", () => $d6bb1451a6029905$export$8b3ca321c77fdea6); -$parcel$export($d6bb1451a6029905$exports, "registerPlugin", () => $d6bb1451a6029905$export$7612db19fb8beb1e); -$parcel$export($d6bb1451a6029905$exports, "unregisterPlugin", () => $d6bb1451a6029905$export$48d00697bf0841b0); -$parcel$export($d6bb1451a6029905$exports, "togglePluginActivation", () => $d6bb1451a6029905$export$8cf5509a1f8ee810); -$parcel$export($d6bb1451a6029905$exports, "deactivateAllPlugins", () => $d6bb1451a6029905$export$4751c4964dd9fdd5); -$parcel$export($d6bb1451a6029905$exports, "activatePlugin", () => $d6bb1451a6029905$export$c20a82b9d4db0e25); -$parcel$export($d6bb1451a6029905$exports, "deactivatePlugin", () => $d6bb1451a6029905$export$eca032c13825f076); -$parcel$export($d6bb1451a6029905$exports, "getPluginsOrder", () => $d6bb1451a6029905$export$b9b9891832107981); - - -"use strict"; -const $d6bb1451a6029905$export$8b3ca321c77fdea6 = {}; -/** - * The plugins' subscriptions stored using the plugin names as keys. - * - * @type {Object} - * @access private - */ const $d6bb1451a6029905$var$pluginsSubscriptions = {}; -/** - * A map that stores the display order for each plugin - * - * @type {Object} - * @access private - */ const $d6bb1451a6029905$var$pluginsOrderMap = {}; -function $d6bb1451a6029905$export$7612db19fb8beb1e(name, plugin) { - $d6bb1451a6029905$export$8b3ca321c77fdea6[name] = plugin; - $d6bb1451a6029905$var$pluginsSubscriptions[name] = new (0, $cz7Pu$atom.CompositeDisposable)(); - const event = { - name: name, - plugin: plugin - }; - (0, $e6ccb2de5b0684dd$export$bad24218ebd77223).emit("did-add-plugin", event); - if (atom.config.get("minimap.displayPluginsControls")) $d6bb1451a6029905$var$registerPluginControls(name, plugin); - $d6bb1451a6029905$var$updatesPluginActivationState(name); -} -function $d6bb1451a6029905$export$48d00697bf0841b0(name) { - const plugin = $d6bb1451a6029905$export$8b3ca321c77fdea6[name]; - if (atom.config.get("minimap.displayPluginsControls")) $d6bb1451a6029905$var$unregisterPluginControls(name); - delete $d6bb1451a6029905$export$8b3ca321c77fdea6[name]; - const event = { - name: name, - plugin: plugin - }; - (0, $e6ccb2de5b0684dd$export$bad24218ebd77223).emit("did-remove-plugin", event); -} -function $d6bb1451a6029905$export$8cf5509a1f8ee810(name, boolean) { - const settingsKey = `minimap.plugins.${name}`; - if (boolean !== undefined && boolean !== null) atom.config.set(settingsKey, boolean); - else atom.config.set(settingsKey, !atom.config.get(settingsKey)); - $d6bb1451a6029905$var$updatesPluginActivationState(name); -} -function $d6bb1451a6029905$export$4751c4964dd9fdd5() { - for (const [name, plugin] of $d6bb1451a6029905$var$eachPlugin()){ - plugin.deactivatePlugin(); - (0, $e6ccb2de5b0684dd$export$bad24218ebd77223).emit("did-deactivate-plugin", { - name: name, - plugin: plugin - }); - } -} -/** - * A generator function to iterate over registered plugins. - * - * @returns An iterable that yield the name and reference to every plugin as an array in each iteration. - */ function* $d6bb1451a6029905$var$eachPlugin() { - for(const name in $d6bb1451a6029905$export$8b3ca321c77fdea6)yield [ - name, - $d6bb1451a6029905$export$8b3ca321c77fdea6[name] - ]; -} -/** - * Updates the plugin activation state according to the current config. - * - * @fires {did-activate-plugin} if The plugin was activated by the call. - * @fires {did-deactivate-plugin} if The plugin was deactivated by the call. - * @param {string} name The identifying name of the plugin to update. - * @access private - */ function $d6bb1451a6029905$var$updatesPluginActivationState(name) { - const plugin = $d6bb1451a6029905$export$8b3ca321c77fdea6[name]; - const pluginActive = plugin.isActive(); - const settingActive = atom.config.get(`minimap.plugins.${name}`); - if (atom.config.get("minimap.displayPluginsControls")) { - if (settingActive && !pluginActive) $d6bb1451a6029905$export$c20a82b9d4db0e25(name, plugin); - else if (pluginActive && !settingActive) $d6bb1451a6029905$export$eca032c13825f076(name, plugin); - } else { - if (!pluginActive) $d6bb1451a6029905$export$c20a82b9d4db0e25(name, plugin); - else if (pluginActive) $d6bb1451a6029905$export$eca032c13825f076(name, plugin); - } -} -function $d6bb1451a6029905$export$c20a82b9d4db0e25(name, plugin) { - const event = { - name: name, - plugin: plugin - }; - plugin.activatePlugin(); - (0, $e6ccb2de5b0684dd$export$bad24218ebd77223).emit("did-activate-plugin", event); -} -function $d6bb1451a6029905$export$eca032c13825f076(name, plugin) { - const event = { - name: name, - plugin: plugin - }; - plugin.deactivatePlugin(); - (0, $e6ccb2de5b0684dd$export$bad24218ebd77223).emit("did-deactivate-plugin", event); -} -/** - * When the `minimap.displayPluginsControls` setting is toggled, this function will register the commands and setting to - * manage the plugin activation from the minimap settings. - * - * @param {string} name The identifying name of the plugin. - * @param {MinimapPlugin} plugin The plugin instance to register controls for. - * @listens {minimap.plugins.${name}} listen to the setting to update - * the plugin state accordingly. - * @listens {minimap:toggle-${name}} listen to the command on `atom-workspace` - * to toggle the plugin state. - * @access private - */ function $d6bb1451a6029905$var$registerPluginControls(name, plugin) { - const settingsKey = `minimap.plugins.${name}`; - const orderSettingsKey = `minimap.plugins.${name}DecorationsZIndex`; - const config = (0, $e6ccb2de5b0684dd$export$9734216cda67175d)(); - config.plugins.properties[name] = { - type: "boolean", - title: name, - description: `Whether the ${name} plugin is activated and displayed in the Minimap.`, - default: true - }; - config.plugins.properties[`${name}DecorationsZIndex`] = { - type: "integer", - title: `${name} decorations order`, - description: `The relative order of the ${name} plugin's decorations in the layer into which they are drawn. Note that this order only apply inside a layer, so highlight-over decorations will always be displayed above line decorations as they are rendered in different layers.`, - default: 0 - }; - if (atom.config.get(settingsKey) === undefined) atom.config.set(settingsKey, true); - if (atom.config.get(orderSettingsKey) === undefined) atom.config.set(orderSettingsKey, 0); - $d6bb1451a6029905$var$pluginsSubscriptions[name].add(atom.config.observe(settingsKey, ()=>{ - $d6bb1451a6029905$var$updatesPluginActivationState(name); - })); - $d6bb1451a6029905$var$pluginsSubscriptions[name].add(atom.config.observe(orderSettingsKey, (order)=>{ - $d6bb1451a6029905$var$updatePluginsOrderMap(name); - const event = { - name: name, - plugin: plugin, - order: order - }; - (0, $e6ccb2de5b0684dd$export$bad24218ebd77223).emit("did-change-plugin-order", event); - })); - $d6bb1451a6029905$var$pluginsSubscriptions[name].add(atom.commands.add("atom-workspace", { - [`minimap:toggle-${name}`]: ()=>{ - $d6bb1451a6029905$export$8cf5509a1f8ee810(name); - } - })); - $d6bb1451a6029905$var$updatePluginsOrderMap(name); -} -/** - * Updates the display order in the map for the passed-in plugin name. - * - * @param {string} name The name of the plugin to update - * @access private - */ function $d6bb1451a6029905$var$updatePluginsOrderMap(name) { - const orderSettingsKey = `minimap.plugins.${name}DecorationsZIndex`; - $d6bb1451a6029905$var$pluginsOrderMap[name] = atom.config.get(orderSettingsKey); -} -function $d6bb1451a6029905$export$b9b9891832107981() { - return $d6bb1451a6029905$var$pluginsOrderMap; -} -/** - * When the `minimap.displayPluginsControls` setting is toggled, this function will unregister the commands and setting - * that was created previously. - * - * @param {string} name The identifying name of the plugin. - * @access private - */ function $d6bb1451a6029905$var$unregisterPluginControls(name) { - $d6bb1451a6029905$var$pluginsSubscriptions[name].dispose(); - delete $d6bb1451a6029905$var$pluginsSubscriptions[name]; - delete (0, $e6ccb2de5b0684dd$export$9734216cda67175d)().plugins.properties[name]; -} - - -// Functions used to recommend the configurations required for the best performance of Minimap -function $ca338416b6f9b052$export$fd712e6faf525b2f() { - return $ca338416b6f9b052$var$observeAndWarn("core.useTreeSitterParsers", true, "Tree-sitter is off (Low Performance Warning).", `You should turn on Atom's tree-sitter parser to experience the best performance Minimap and Atom are designed for. - Keeping tree-sitter parser off results in sluggish scrolling and lags in the text editor.`); -} -/* Utility function that observes a config and throws warnings once a day if it is not the recommended value */ function $ca338416b6f9b052$var$observeAndWarn(configName, recommendedValue, warningTitle, warningDescription) { - return atom.config.observe(configName, (value)=>{ - if (value !== recommendedValue) { - const storageName = `Minimap.${configName}`; - const today = new Date(); - const previousWarning = window.localStorage.getItem(storageName); - let previousWarningDay = null; - if (previousWarning) previousWarningDay = new Date(Date.parse(previousWarning)).getDay(); - // throw the warning once a day - if (!previousWarningDay || typeof previousWarningDay === "number" && previousWarningDay - today.getDay() >= 1) { - window.localStorage.setItem(storageName, today); - const notification = atom.notifications.addWarning(warningTitle, { - description: warningDescription, - dismissable: true, - buttons: [ - { - text: `Set to ${recommendedValue} and restart Atom`, - onDidClick () { - atom.config.set(configName, true); - notification.dismiss(); - window.localStorage.removeItem(storageName); - setTimeout(()=>{ - atom.reload(); - }, 1500); - } - } - ] - }); - } - } - }); -} - - -var $8c1802050d82880d$exports = {}; -"use strict"; -/** - * This class is used to read the styles informations (e.g. color and background-color) from the DOM to use when - * rendering canvas. This is used in Minimap and Terminal It attaches a dummyNode to the targetNode, renders them, and - * finds the computed style back. - */ Object.defineProperty($8c1802050d82880d$exports, "__esModule", { - value: true -}); -$8c1802050d82880d$exports.StyleReader = void 0; -class $8c1802050d82880d$var$StyleReader { - constructor(){ - this.domStylesCache = new Map(); - this.dummyNode = void 0; - this.targetNode = void 0; - } - /** Set to true once tokenized */ // private hasTokenizedOnce = false - /** - * Returns the computed values for the given property and scope in the DOM. - * - * This function insert a dummy element in the DOM to compute its style, return the specified property, and clear the - * content of the dummy element. - * - * @param scopes A list of classes reprensenting the scope to build - * @param property The name of the style property to compute - * @param targetNode - * @param getFromCache Whether to cache the computed value or not - * @returns The computed property's value used in CanvasDrawer - */ retrieveStyleFromDom(scopes, property, targetNode, getFromCache = true) { - if (scopes.length === 0) return ""; - // no scopes - const key = scopes.join(" "); - let cachedData = this.domStylesCache.get(key); - if (cachedData !== undefined) { - if (getFromCache) { - // if should get the value from the cache - const value = cachedData[property]; - if (value !== undefined) // value exists - return value; - // value not in the cache - get fresh value - } // don't use cache - get fresh value - } else // key did not exist. create it - cachedData = {}; - this.ensureDummyNodeExistence(targetNode); - const dummyNode = this.dummyNode; - let parent = dummyNode; - for(let i = 0, len = scopes.length; i < len; i++){ - const scope = scopes[i]; - const node = document.createElement("span"); - node.className = scope.replace($8c1802050d82880d$var$dotRegexp, " "); // TODO why replace is needed? - parent.appendChild(node); - parent = node; - } - const style = window.getComputedStyle(parent); - let value = style.getPropertyValue(property); // rotate hue if webkit-filter available - const filter = style.getPropertyValue("-webkit-filter"); - if (filter.includes("hue-rotate")) value = $8c1802050d82880d$var$rotateHue(value, filter); - if (value !== "") { - cachedData[property] = value; - this.domStylesCache.set(key, cachedData); - } - dummyNode.innerHTML = ""; - return value; - } - /** - * Creates a DOM node container for all the operations that need to read styles properties from DOM. - * - * @param targetNode - */ ensureDummyNodeExistence(targetNode) { - if (this.targetNode !== targetNode || this.dummyNode === undefined) { - this.dummyNode = document.createElement("span"); - this.dummyNode.style.visibility = "hidden"; // attach to the target node - targetNode.appendChild(this.dummyNode); - this.targetNode = targetNode; - } - } - /** Invalidates the cache by emptying the cache object. used in MinimapElement */ invalidateDOMStylesCache() { - this.domStylesCache.clear(); - } -} // ## ## ######## ## ######## ######## ######## ###### -// ## ## ## ## ## ## ## ## ## ## ## -// ## ## ## ## ## ## ## ## ## ## -// ######### ###### ## ######## ###### ######## ###### -// ## ## ## ## ## ## ## ## ## -// ## ## ## ## ## ## ## ## ## ## -// ## ## ######## ######## ## ######## ## ## ###### -$8c1802050d82880d$exports.StyleReader = $8c1802050d82880d$var$StyleReader; -const $8c1802050d82880d$var$dotRegexp = /\.+/g; -const $8c1802050d82880d$var$rgbExtractRegexp = /rgb(a?)\((\d+), (\d+), (\d+)(, (\d+(\.\d+)?))?\)/; -const $8c1802050d82880d$var$hueRegexp = /hue-rotate\((-?\d+)deg\)/; -/** - * Computes the output color of `value` with a rotated hue defined in `filter`. - * - * @param value The CSS color to apply the rotation on - * @param filter The CSS hue rotate filter declaration - * @returns The rotated CSS color - */ function $8c1802050d82880d$var$rotateHue(value, filter) { - const match = value.match($8c1802050d82880d$var$rgbExtractRegexp); - if (match === null) return ""; - const [, , rStr, gStr, bStr, , aStr] = match; - const hueMatch = filter.match($8c1802050d82880d$var$hueRegexp); - if (hueMatch === null) return ""; - const [, hueStr] = hueMatch; - let [r, g, b, a, hue] = [ - rStr, - gStr, - bStr, - aStr, - hueStr - ].map(Number); - [r, g, b] = $8c1802050d82880d$var$rotate(r, g, b, hue); - if (isNaN(a)) return `rgb(${r}, ${g}, ${b})`; - else return `rgba(${r}, ${g}, ${b}, ${a})`; -} -/** - * Computes the hue rotation on the provided `r`, `g` and `b` channels by the amount of `angle`. - * - * @param r The red channel of the color to rotate - * @param g The green channel of the color to rotate - * @param b The blue channel of the color to rotate - * @param angle The angle to rotate the hue with - * @returns The rotated color channels - */ function $8c1802050d82880d$var$rotate(r, g, b, angle) { - const matrix = [ - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ]; - const lumR = 0.2126; - const lumG = 0.7152; - const lumB = 0.0722; - const hueRotateR = 0.143; - const hueRotateG = 0.14; - const hueRotateB = 0.283; - const cos = Math.cos(angle * Math.PI / 180); - const sin = Math.sin(angle * Math.PI / 180); - matrix[0] = lumR + (1 - lumR) * cos - lumR * sin; - matrix[1] = lumG - lumG * cos - lumG * sin; - matrix[2] = lumB - lumB * cos + (1 - lumB) * sin; - matrix[3] = lumR - lumR * cos + hueRotateR * sin; - matrix[4] = lumG + (1 - lumG) * cos + hueRotateG * sin; - matrix[5] = lumB - lumB * cos - hueRotateB * sin; - matrix[6] = lumR - lumR * cos - (1 - lumR) * sin; - matrix[7] = lumG - lumG * cos + lumG * sin; - matrix[8] = lumB + (1 - lumB) * cos + lumB * sin; - return [ - $8c1802050d82880d$var$clamp(matrix[0] * r + matrix[1] * g + matrix[2] * b), - $8c1802050d82880d$var$clamp(matrix[3] * r + matrix[4] * g + matrix[5] * b), - $8c1802050d82880d$var$clamp(matrix[6] * r + matrix[7] * g + matrix[8] * b) - ]; -} -function $8c1802050d82880d$var$clamp(num) { - return Math.ceil(Math.max(0, Math.min(255, num))); -} - - - -var $bN1tE = parcelRequire("bN1tE"); -"use strict"; -/** - * The `Minimap` package provides an eagle-eye view of text buffers. - * - * It also provides API for plugin packages that want to interact with the minimap and be available to the user through - * the minimap settings. - */ /** - * The activation state of the package. - * - * @type {boolean} - * @access private - */ let $e6ccb2de5b0684dd$var$active = false; -/** - * The toggle state of the package. - * - * @type {boolean} - * @access private - */ let $e6ccb2de5b0684dd$var$toggled = false; -let $e6ccb2de5b0684dd$export$3542142cf713a624 = null; -/** - * The composite disposable that stores the package's subscriptions. - * - * @type {CompositeDisposable} - * @access private - */ let $e6ccb2de5b0684dd$var$subscriptions = null; -/** - * The disposable that stores the package's commands subscription. - * - * @type {Disposable} - * @access private - */ let $e6ccb2de5b0684dd$var$subscriptionsOfCommands = null; -const $e6ccb2de5b0684dd$export$bad24218ebd77223 = new (0, $cz7Pu$atom.Emitter)(); -let $e6ccb2de5b0684dd$export$4d3d19fa8673fd3e = null; -function $e6ccb2de5b0684dd$export$234c45b355edd85b() { - if ($e6ccb2de5b0684dd$var$active) return; - $e6ccb2de5b0684dd$var$subscriptionsOfCommands = atom.commands.add("atom-workspace", { - "minimap:toggle": ()=>{ - $e6ccb2de5b0684dd$export$e03c1c3201ee8bb7(); - }, - "minimap:generate-coffee-plugin": async ()=>{ - await $e6ccb2de5b0684dd$var$generatePlugin("coffee"); - }, - "minimap:generate-javascript-plugin": async ()=>{ - await $e6ccb2de5b0684dd$var$generatePlugin("javascript"); - }, - "minimap:generate-babel-plugin": async ()=>{ - await $e6ccb2de5b0684dd$var$generatePlugin("babel"); - } - }); - $e6ccb2de5b0684dd$export$3542142cf713a624 = new Map(); - $e6ccb2de5b0684dd$export$4d3d19fa8673fd3e = new (0, $8c1802050d82880d$exports.StyleReader)(); - $e6ccb2de5b0684dd$var$subscriptions = new (0, $cz7Pu$atom.CompositeDisposable)(); - $e6ccb2de5b0684dd$var$active = true; - if (atom.config.get("minimap.autoToggle")) $e6ccb2de5b0684dd$export$e03c1c3201ee8bb7(); -} -function $e6ccb2de5b0684dd$export$e854d79fe60e1faa(model) { - if (model instanceof (0, $e85ce81538013d49$export$2e2bcd8739ae039)) { - let element = model.getMinimapElement(); - if (!element) { - element = (0, $0965f8da08ee51eb$export$aa3fab546e9e7454)(); - element.setModel(model); - } - return element; - } -} -function $e6ccb2de5b0684dd$export$e96c1edfdaf2d1db() { - if (!$e6ccb2de5b0684dd$var$active) return; - $d6bb1451a6029905$export$4751c4964dd9fdd5(); - if ($e6ccb2de5b0684dd$export$3542142cf713a624) { - $e6ccb2de5b0684dd$export$3542142cf713a624.forEach((value)=>{ - value.destroy(); - }); - $e6ccb2de5b0684dd$export$3542142cf713a624.clear(); - } - $e6ccb2de5b0684dd$var$subscriptions.dispose(); - $e6ccb2de5b0684dd$var$subscriptionsOfCommands.dispose(); - $e6ccb2de5b0684dd$export$4d3d19fa8673fd3e.invalidateDOMStylesCache(); - $e6ccb2de5b0684dd$var$toggled = false; - $e6ccb2de5b0684dd$var$active = false; -} -function $e6ccb2de5b0684dd$export$9734216cda67175d() { - return $9d1240d3ca4fda1c$exports || atom.packages.getLoadedPackage("minimap").metadata.configSchema; -} -function $e6ccb2de5b0684dd$export$e03c1c3201ee8bb7() { - if (!$e6ccb2de5b0684dd$var$active) return; - if ($e6ccb2de5b0684dd$var$toggled) { - $e6ccb2de5b0684dd$var$toggled = false; - if ($e6ccb2de5b0684dd$export$3542142cf713a624) { - $e6ccb2de5b0684dd$export$3542142cf713a624.forEach((minimap)=>{ - minimap.destroy(); - }); - $e6ccb2de5b0684dd$export$3542142cf713a624.clear(); - } - $e6ccb2de5b0684dd$var$subscriptions.dispose(); - // HACK: this hack forces rerendering editor size which moves the scrollbar to the right once minimap is removed - const wasMaximized = atom.isMaximized(); - const { width: width, height: height } = atom.getSize(); - atom.setSize(width, height); - if (wasMaximized) atom.maximize(); - } else { - $e6ccb2de5b0684dd$var$toggled = true; - $e6ccb2de5b0684dd$var$initSubscriptions(); - } - $e6ccb2de5b0684dd$export$4d3d19fa8673fd3e.invalidateDOMStylesCache(); -} - -/** - * Opens the plugin generation view. - * - * @param {string} template The name of the template to use - */ async function $e6ccb2de5b0684dd$var$generatePlugin(template) { - const { createMinimapPluginGeneratorElement: createMinimapPluginGeneratorElement } = await (parcelRequire("gQk5Q")); - const view = createMinimapPluginGeneratorElement(); - view.template = template; - view.attach(); -} -function $e6ccb2de5b0684dd$export$b6f10fd94544e66c(callback) { - return $e6ccb2de5b0684dd$export$bad24218ebd77223.on("did-activate", callback); -} -function $e6ccb2de5b0684dd$export$d206d0a3ab46ce53(callback) { - return $e6ccb2de5b0684dd$export$bad24218ebd77223.on("did-deactivate", callback); -} -function $e6ccb2de5b0684dd$export$a720fe198b21c58c(callback) { - return $e6ccb2de5b0684dd$export$bad24218ebd77223.on("did-create-minimap", callback); -} -function $e6ccb2de5b0684dd$export$d40fb390be4bd0f(callback) { - return $e6ccb2de5b0684dd$export$bad24218ebd77223.on("did-add-plugin", callback); -} -function $e6ccb2de5b0684dd$export$9937b73c38ac51f0(callback) { - return $e6ccb2de5b0684dd$export$bad24218ebd77223.on("did-remove-plugin", callback); -} -function $e6ccb2de5b0684dd$export$6f3aaf72a3cac830(callback) { - return $e6ccb2de5b0684dd$export$bad24218ebd77223.on("did-activate-plugin", callback); -} -function $e6ccb2de5b0684dd$export$8df1420526313195(callback) { - return $e6ccb2de5b0684dd$export$bad24218ebd77223.on("did-deactivate-plugin", callback); -} -function $e6ccb2de5b0684dd$export$4f0668f248b15f12(callback) { - return $e6ccb2de5b0684dd$export$bad24218ebd77223.on("did-change-plugin-order", callback); -} -function $e6ccb2de5b0684dd$export$e3a0d8dffed34b4f() { - return 0, $e85ce81538013d49$export$2e2bcd8739ae039; -} -function $e6ccb2de5b0684dd$export$fbfbb3bd6dc38def(editorElement) { - if (!editorElement) return; - return $e6ccb2de5b0684dd$export$58c03b6c0d094c(editorElement.getModel()); -} -function $e6ccb2de5b0684dd$export$58c03b6c0d094c(textEditor) { - if (!textEditor) return; - if (!$e6ccb2de5b0684dd$export$3542142cf713a624) return; - let minimap = $e6ccb2de5b0684dd$export$3542142cf713a624.get(textEditor); - if (minimap === undefined || minimap.destroyed) { - minimap = new (0, $e85ce81538013d49$export$2e2bcd8739ae039)({ - textEditor: textEditor - }); - $e6ccb2de5b0684dd$export$3542142cf713a624.set(textEditor, minimap); - const editorSubscription = textEditor.onDidDestroy(()=>{ - if ($e6ccb2de5b0684dd$export$3542142cf713a624) $e6ccb2de5b0684dd$export$3542142cf713a624.delete(textEditor); - if (minimap) // just in case - minimap.destroy(); - editorSubscription.dispose(); - }); - // dispose the editorSubscription if minimap is deactivated before destroying the editor - $e6ccb2de5b0684dd$var$subscriptions.add(editorSubscription); - } - return minimap; -} -function $e6ccb2de5b0684dd$export$bd03fcaa67c354fa(textEditor) { - if (!textEditor) return; - return new (0, $e85ce81538013d49$export$2e2bcd8739ae039)({ - textEditor: textEditor, - standAlone: true - }); -} -function $e6ccb2de5b0684dd$export$6f8e50201d28743() { - return $e6ccb2de5b0684dd$export$58c03b6c0d094c(atom.workspace.getActiveTextEditor()); -} -function $e6ccb2de5b0684dd$export$b0030062932c3d3d(iterator) { - if (!iterator) return; - if ($e6ccb2de5b0684dd$export$3542142cf713a624) $e6ccb2de5b0684dd$export$3542142cf713a624.forEach((minimap)=>{ - iterator(minimap); - }); - return $e6ccb2de5b0684dd$export$a720fe198b21c58c((minimap)=>{ - iterator(minimap); - }); -} -/** - * Registers to the `observeTextEditors` method. - * - * @access private - */ function $e6ccb2de5b0684dd$var$initSubscriptions() { - const debounceUpdateStyles = (0, $bN1tE.debounce)($e6ccb2de5b0684dd$var$updateStyles, 300); - $e6ccb2de5b0684dd$var$subscriptions.add(atom.workspace.observeTextEditors((textEditor)=>{ - const minimap = $e6ccb2de5b0684dd$export$58c03b6c0d094c(textEditor); - const minimapElement = $e6ccb2de5b0684dd$export$e854d79fe60e1faa(minimap); - $e6ccb2de5b0684dd$export$bad24218ebd77223.emit("did-create-minimap", minimap); - minimapElement.attach(textEditor.getElement()); - }), // empty color cache if the theme changes - atom.themes.onDidChangeActiveThemes(debounceUpdateStyles), atom.styles.onDidUpdateStyleElement(debounceUpdateStyles), atom.styles.onDidAddStyleElement(debounceUpdateStyles), atom.styles.onDidRemoveStyleElement(debounceUpdateStyles), (0, $ca338416b6f9b052$export$fd712e6faf525b2f)()); -} -/** Force update styles of minimap */ function $e6ccb2de5b0684dd$var$updateStyles() { - $e6ccb2de5b0684dd$export$4d3d19fa8673fd3e.invalidateDOMStylesCache(); - $e6ccb2de5b0684dd$export$3542142cf713a624.forEach((minimap)=>{ - atom.views.getView(minimap).requestForcedUpdate(); - }); -} -// The public exports included in the service: -const $e6ccb2de5b0684dd$var$MinimapServiceV1 = { - minimapViewProvider: $e6ccb2de5b0684dd$export$e854d79fe60e1faa, - getConfigSchema: $e6ccb2de5b0684dd$export$9734216cda67175d, - onDidActivate: $e6ccb2de5b0684dd$export$b6f10fd94544e66c, - onDidDeactivate: $e6ccb2de5b0684dd$export$d206d0a3ab46ce53, - onDidCreateMinimap: $e6ccb2de5b0684dd$export$a720fe198b21c58c, - onDidAddPlugin: $e6ccb2de5b0684dd$export$d40fb390be4bd0f, - onDidRemovePlugin: $e6ccb2de5b0684dd$export$9937b73c38ac51f0, - onDidActivatePlugin: $e6ccb2de5b0684dd$export$6f3aaf72a3cac830, - onDidDeactivatePlugin: $e6ccb2de5b0684dd$export$8df1420526313195, - onDidChangePluginOrder: $e6ccb2de5b0684dd$export$4f0668f248b15f12, - minimapClass: $e6ccb2de5b0684dd$export$e3a0d8dffed34b4f, - minimapForEditorElement: $e6ccb2de5b0684dd$export$fbfbb3bd6dc38def, - minimapForEditor: $e6ccb2de5b0684dd$export$58c03b6c0d094c, - standAloneMinimapForEditor: $e6ccb2de5b0684dd$export$bd03fcaa67c354fa, - getActiveMinimap: $e6ccb2de5b0684dd$export$6f8e50201d28743, - observeMinimaps: $e6ccb2de5b0684dd$export$b0030062932c3d3d, - registerPlugin: $d6bb1451a6029905$export$7612db19fb8beb1e, - unregisterPlugin: $d6bb1451a6029905$export$48d00697bf0841b0, - togglePluginActivation: $d6bb1451a6029905$export$8cf5509a1f8ee810, - deactivateAllPlugins: $d6bb1451a6029905$export$4751c4964dd9fdd5, - activatePlugin: $d6bb1451a6029905$export$c20a82b9d4db0e25, - deactivatePlugin: $d6bb1451a6029905$export$eca032c13825f076, - getPluginsOrder: $d6bb1451a6029905$export$b9b9891832107981 -}; -function $e6ccb2de5b0684dd$export$b956a56dda08a331() { - return $e6ccb2de5b0684dd$var$MinimapServiceV1; -} -$parcel$exportWildcard(module.exports, $d6bb1451a6029905$exports); - - +let e;var t,i=require("atom"),n=require("path"),o=globalThis;function s(e,t,i,n){Object.defineProperty(e,t,{get:i,set:n,enumerable:!0,configurable:!0})}function r(e){return e&&e.__esModule?e.default:e}var a={},l={},d=o.parcelRequire7d67;null==d&&((d=function(e){if(e in a)return a[e].exports;if(e in l){var t=l[e];delete l[e];var i={id:e,exports:{}};return a[e]=i,t.call(i.exports,i,i.exports),i.exports}var n=Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}).register=function(e,t){l[e]=t},o.parcelRequire7d67=d);var h=d.register;h("kAKcv",function(e,t){(function(){var t,i,n,s;({deprecate:s}=d("gx0jg")),null!=o.__CUSTOM_HTML_ELEMENTS_CLASSES__?(o.__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__=o.__CUSTOM_HTML_ELEMENTS_CLASSES__,delete o.__CUSTOM_HTML_ELEMENTS_CLASSES__):null==o.__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__&&(o.__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__={}),t=["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"],n=function(e,i){return t.forEach(function(t){return Object.defineProperty(e,t,{value:function(){var e;return null!=(e=this[`__${t}`])?e.apply(this,arguments):void 0},writable:!0,enumerable:!0,configurable:!0})}),Object.getOwnPropertyNames(i).forEach(function(n){var o;if("constructor"!==n)return(o=Object.getOwnPropertyDescriptor(i,n),t.indexOf(n)>-1)?Object.defineProperty(e,`__${n}`,o):Object.defineProperty(e,n,o)})},i=function(e,t){return Object.getOwnPropertyNames(t).forEach(function(i){var n;if("length"!==i&&"name"!==i&&"arguments"!==i&&"caller"!==i&&"prototype"!==i)return n=Object.getOwnPropertyDescriptor(t,i),Object.defineProperty(e,i,n)})},e.exports=function(e,t){var o,r,a,l,d;return({class:a}=t,(l=null!=a?a.prototype:null!=(d=t.prototype)?d:t)===t&&s("Using the prototype as the second argument is deprecated, use the prototype option instead"),__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__[e])?(n((o=__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__[e]).prototype,l),null!=a&&i(o,a),o):(n(r=Object.create(HTMLElement.prototype),l),o=document.registerElement(e,{prototype:Object.create(r)}),null!=a&&i(o,a),__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__[e]=o)}}).call(e.exports)}),h("gx0jg",function(e,t){(function(){var t,i,n,s;t=d("1884a"),null==o.__grim__&&(i=d("bgcdg").Emitter,s=o.__grim__={deprecations:{},emitter:new i,includeDeprecatedAPIs:!0,getDeprecations:function(){var e,t,i,n,o,r,a,l;for(o in t=[],l=s.deprecations)for(r in i=l[o])for(a in n=i[r])e=n[a],t.push(e);return t},getDeprecationsLength:function(){return this.getDeprecations().length},clearDeprecations:function(){s.deprecations={}},logDeprecations:function(){var e,t,i,n;for((t=this.getDeprecations()).sort(function(e,t){return t.getCallCount()-e.getCallCount()}),console.warn("\nCalls to deprecated functions\n-----------------------------"),i=0,n=t.length;i":e.isConstructor()?"new "+e.getFunctionName():e.getMethodName()&&!e.getFunctionName()?e.getMethodName():""+e.getTypeName()+"."+(null!=(i=null!=(n=e.getMethodName())?n:e.getFunctionName())?i:"")},e.prototype.getLocationFromCallsite=function(e){return null==e?"unknown":null!=e.location?e.location:e.isNative()?"native":e.isEval()?"eval at "+this.getLocationFromCallsite(e.getEvalOrigin()):""+e.getFileName()+":"+e.getLineNumber()+":"+e.getColumnNumber()},e.prototype.getFileNameFromCallSite=function(e){var t;return null!=(t=e.fileName)?t:e.getFileName()},e.prototype.getOriginName=function(){return this.originName},e.prototype.getMessage=function(){return this.message},e.prototype.getStacks=function(){var e,t,i,n,o;for(e in i=[],o=this.stacks)n=o[e],(t=this.parseStack(n)).callCount=this.stackCallCounts[e],t.metadata=n.metadata,i.push(t);return i},e.prototype.getStackCount=function(){return this.stackCount},e.prototype.getCallCount=function(){return this.callCount},e.prototype.addStack=function(e,t){var i,n,o;return null==this.originName&&(this.originName=this.getFunctionNameFromCallsite(e[0])),null==this.fileName&&(this.fileName=this.getFileNameFromCallSite(e[0])),null==this.lineNumber&&(this.lineNumber="function"==typeof(n=e[0]).getLineNumber?n.getLineNumber():void 0),this.callCount++,e.metadata=t,i=this.getLocationFromCallsite(e[1]),null==this.stacks[i]&&(this.stacks[i]=e,this.stackCount++),null==(o=this.stackCallCounts)[i]&&(o[i]=0),this.stackCallCounts[i]++},e.prototype.parseStack=function(e){var t;return e.map((t=this,function(e){return{functionName:t.getFunctionNameFromCallsite(e),location:t.getLocationFromCallsite(e),fileName:t.getFileNameFromCallSite(e)}}))},e.prototype.serialize=function(){return{message:this.getMessage(),lineNumber:this.lineNumber,fileName:this.fileName,stacks:this.getStacks()}},e}()}).call(e.exports)}),h("bgcdg",function(e,t){var i;s(e.exports,"Emitter",()=>i,e=>i=e),i=d("8OfnK"),d("dFpUX"),d("b22hF")}),h("8OfnK",function(e,t){function i(e,t){for(var i=0;i=0&&i.splice(n,1),0===i.length&&delete this.handlersByEventName[e]}}}},{key:"emit",value:function(e,t){var i=this.handlersByEventName&&this.handlersByEventName[e];if(i)for(var n=i.slice(),o=0;o(null==l[i]&&(l[i]={},s[i]=this.createEventListener(e,i,o)),l[i][t]=n)),new n(()=>this.unsubscribeFrom(e,t,i))}unsubscribeFrom(e,t,i){var n,o,s;if(e instanceof HTMLElement||([e,t,i]=[this,e,t]),"object"==typeof t&&([i,t]=[t,r]),s=this.eventsMap.get(e)){for(o in i)delete s[o][t],0===Object.keys(s[o]).length&&((n=this.disposablesMap.get(e))[o].dispose(),delete n[o],delete s[o]);if(0===Object.keys(s).length)return this.eventsMap.delete(e),this.disposablesMap.delete(e)}}createEventListener(e,t,i){var n;return n=i=>{var n,o,s;if(n=null!=(o=this.eventsMap.get(e))?o[t]:void 0)return{target:s}=i,this.decorateEvent(i),this.eachSelectorFromTarget(i,s,n),i.isPropagationStopped||"function"!=typeof n[r]||n[r](i),!0},this.addDisposableEventListener(e,t,n,i)}eachSelectorFromTarget(e,t,i){return this.nodeAndItsAncestors(t,t=>{if(!e.isPropagationStopped)return this.eachSelector(i,(i,n)=>{var o;if(o=this.targetMatch(t,i),!e.isImmediatePropagationStopped&&o)return n(e)})})}eachSelector(e,t){var i,n,o,s;for(-1!==(o=Object.keys(e)).indexOf(r)&&o.splice(o.indexOf(r),1),o.sort(function(e,t){return t.split(" ").length-e.split(" ").length}),i=0,s=o.length;i`)}closeTag(e){return this.document.push(``)}text(e){var t;return t=e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">"),this.document.push(t)}raw(e){return this.document.push(e)}subview(e,t){var i;return i=`subview-${++idCounter}`,this.tag("div",{id:i}),this.postProcessingSteps.push(function(n){return n[e]=t,t.parentView=n,n.find(`div#${i}`).replaceWith(t)})}extractOptions(e){var t,i,n,o;for(i=0,o={},n=e.length;in),s(e.exports,"dasherize",()=>r),s(e.exports,"debounce",()=>a);let i=/[$()*+./?[\\\]^{|}-]/g;function n(e){return e?e.replace(i,"\\$&"):""}let o=/([A-Z])|(_)/g;function r(e){return e?(e=`${e[0].toLowerCase()}${e.slice(1)}`).replace(o,function(e,t){return t?`-${t.toLowerCase()}`:"-"}):""}function a(e,t){let i;return(...n)=>{void 0!==i&&clearTimeout(i),i=setTimeout(()=>{e(...n)},t)}}}),h("4r3v7",function(e,t){s(e.exports,"default",()=>i);function i(e,t){window.customElements.get(t)||window.customElements.define(t,e)}}),h("dGrXD",function(e,t){e.exports=Promise.resolve(require("./minimap-plugin-generator-element.f5282bf9.js")).then(()=>d("L6JvT"))}),s(module.exports,"editorsMinimaps",()=>eQ),s(module.exports,"emitter",()=>eK),s(module.exports,"styleReader",()=>eX),s(module.exports,"activate",()=>eY),s(module.exports,"toggle",()=>e2),s(module.exports,"minimapViewProvider",()=>eJ),s(module.exports,"deactivate",()=>e0),s(module.exports,"getConfigSchema",()=>e1),s(module.exports,"onDidActivate",()=>e7),s(module.exports,"onDidDeactivate",()=>e3),s(module.exports,"onDidCreateMinimap",()=>e6),s(module.exports,"onDidAddPlugin",()=>e8),s(module.exports,"onDidRemovePlugin",()=>e4),s(module.exports,"onDidActivatePlugin",()=>e9),s(module.exports,"onDidDeactivatePlugin",()=>te),s(module.exports,"onDidChangePluginOrder",()=>tt),s(module.exports,"minimapClass",()=>ti),s(module.exports,"minimapForEditorElement",()=>tn),s(module.exports,"minimapForEditor",()=>to),s(module.exports,"standAloneMinimapForEditor",()=>ts),s(module.exports,"getActiveMinimap",()=>tr),s(module.exports,"observeMinimaps",()=>ta),s(module.exports,"provideMinimapServiceV1",()=>th),s(module.exports,"config",()=>eD),s(module.exports,"Minimap",()=>eM),s(module.exports,"createMinimapElement",()=>ep);var c={};(function(){c={requirePackages:function(...e){return new Promise(function(t,i){var n,o,s,r;return s=[],n=[],o=e.length,r=function(){if(0==--o)return n.length>0?i(n):t(s)},e.forEach(function(e,t){var i,o;return(i=function(e){return n[t]=e,r()},null!=(o=atom.packages.activatePackage(e).then(function(e){return s[t]=e.mainModule,r()})).fail)?o.fail(i):null!=o.catch?o.catch(i):void 0})})},registerOrUpdateElement:d("kAKcv"),Ancestors:d("j6K6M"),AncestorsMethods:d("j6K6M"),DisposableEvents:d("15iMG"),EventsDelegation:d("cZmpt"),SpacePenDSL:d("acNiL")}}).call(c);var u={},p={};(p={}).forEach=function(e,t){for(var i=0;i";while(n[0])return t>4?t:e}())},w.isLegacyOpera=function(){return!!window.opera};var x={},E={};function C(){var e={},t=0,i=0,n=0;return{add:function(o,s){s||(s=o,o=0),o>i?i=o:o div::-webkit-scrollbar { "+u(["display: none"])+" }\n\n"+("."+i+"_animation_active { ")+u(["-webkit-animation-duration: 0.1s","animation-duration: 0.1s","-webkit-animation-name: "+r,"animation-name: "+r])+" }\n@-webkit-keyframes "+r+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n@keyframes "+r+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }",n=a,o=o||function(t){e.head.appendChild(t)},(s=e.createElement("style")).innerHTML=n,s.id=t,o(s)}})(e,"erd_scroll_detection_scrollbar_style",h)}function u(t){var i=e.important?" !important; ":"; ";return(t.join(i)+i).trim()}function p(e,t,i){if(e.addEventListener)e.addEventListener(t,i);else{if(!e.attachEvent)return s.error("[scroll] Don't know how to add event listeners.");e.attachEvent("on"+t,i)}}function m(e,t,i){if(e.removeEventListener)e.removeEventListener(t,i);else{if(!e.detachEvent)return s.error("[scroll] Don't know how to remove event listeners.");e.detachEvent("on"+t,i)}}function g(e){return a(e).container.childNodes[0].childNodes[0].childNodes[0]}function f(e){return a(e).container.childNodes[0].childNodes[0].childNodes[1]}return c(window.document),{makeDetectable:function(e,t,i){var n,o,c;function m(){if(e.debug){var i=Array.prototype.slice.call(arguments);if(i.unshift(l.get(t),"Scroll: "),s.log.apply)s.log.apply(null,i);else for(var n=0;n=0:t===e.type}constructor(e,t,n){this.marker=e,this.minimap=t,this.emitter=new i.Emitter,this.id=O++,this.properties=null,this.setProperties(n),this.properties.id=this.id,this.destroyed=!1,this.markerDestroyDisposable=this.marker.onDidDestroy(()=>{this.destroy()}),this.screenRange=e.getScreenRange()}destroy(){var e,t;this.destroyed||(null===(t=this.markerDestroyDisposable)||void 0===t||null===(e=t.dispose)||void 0===e||e.call(t),this.destroyed=!0,this.emitter.emit("did-destroy"),this.emitter.dispose())}isDestroyed(){return this.destroyed}onDidChangeProperties(e){if(!this.destroyed)return this.emitter.on("did-change-properties",e)}onDidDestroy(e){if(!this.destroyed)return this.emitter.on("did-destroy",e)}getId(){return this.id}getMarker(){return this.marker}isType(e){return _.isType(this.properties,e)}getProperties(){return this.properties}setProperties(e){if(this.destroyed)return;let t=this.properties;this.properties=e,this.properties.id=this.id,this.emitter.emit("did-change-properties",{oldProperties:t,newProperties:e})}}class N{initializeDecorations(e){this.minimap=e,null==this.emitter?this.emitter=new i.Emitter:this.emitter=this.minimap.emitter,this.decorationsById=new Map,this.decorationsByMarkerId=new Map,this.decorationMarkerChangedSubscriptions=new Map,this.decorationMarkerDestroyedSubscriptions=new Map,this.decorationUpdatedSubscriptions=new Map,this.decorationDestroyedSubscriptions=new Map,this.destroyed=!1}getDecorations(){return[...this.decorationsById.values()]}onDidAddDecoration(e){return this.emitter.on("did-add-decoration",e)}onDidRemoveDecoration(e){return this.emitter.on("did-remove-decoration",e)}onDidChangeDecoration(e){return this.emitter.on("did-change-decoration",e)}onDidChangeDecorationRange(e){return this.emitter.on("did-change-decoration-range",e)}onDidUpdateDecoration(e){return this.emitter.on("did-update-decoration",e)}decorationForId(e){return this.decorationsById.get(e)}decorationsForScreenRowRange(e,t){let i={},n=this.findMarkers({intersectsScreenRowRange:[e,t]});for(let e=0,t=n.length;ei.indexOf(r(n).sep)?i:void 0}()),null==t.scope&&null!=t.class){let e=t.class.split(" ").join(".");t.scope=`.minimap .${e}`}this.decorationMarkerDestroyedSubscriptions.has(i)||this.decorationMarkerDestroyedSubscriptions.set(i,e.onDidDestroy(()=>{this.removeAllDecorationsForMarker(e)})),this.decorationMarkerChangedSubscriptions.has(i)||this.decorationMarkerChangedSubscriptions.set(i,e.onDidChange(t=>{let n=this.decorationsByMarkerId.get(i),s=e.getScreenRange();if(this.invalidateDecorationForScreenRowsCache(),void 0!==n)for(let i=0,o=n.length;ia.row&&([r,a]=[a,r]),l.row>d.row&&([l,d]=[d,l]);let h=function(e,t,i,n){let o=[];return e.isLessThan(i)?o.push([e,i]):i.isLessThan(e)&&o.push([i,e]),t.isLessThan(n)?o.push([t,n]):n.isLessThan(t)&&o.push([n,t]),o}(r,a,l,d);for(let e=0,t=h.length;e{this.emitDecorationChanges(o,a)})),this.decorationDestroyedSubscriptions.set(a.id,a.onDidDestroy(()=>{this.removeDecoration(a)})),this.emitDecorationChanges(o,a),this.emitter.emit("did-add-decoration",{marker:e,decoration:a}),a}emitDecorationChanges(e,t){if(this.destroyed||this.minimap.editorDestroyed())return;this.invalidateDecorationForScreenRowsCache();let i=t.screenRange;i.start&&i.end&&this.emitRangeChanges(e,i,0)}emitRangeChanges(e,t,i){let n=t.start.row,o=t.end.row,s=this.minimap.getLastVisibleScreenRow(),r=this.minimap.getFirstVisibleScreenRow();null==i&&(i=s-r-(o-n));let a={start:n,end:o,screenDelta:i,type:e};this.emitter.emit("did-change-decoration-range",a)}removeDecoration(e){let t;if(null==e)return;let i=e.marker;this.decorationsById.delete(e.id),void 0!==(t=this.decorationUpdatedSubscriptions.get(e.id))&&t.dispose(),void 0!==(t=this.decorationDestroyedSubscriptions.get(e.id))&&t.dispose(),this.decorationUpdatedSubscriptions.delete(e.id),this.decorationDestroyedSubscriptions.delete(e.id);let n=this.decorationsByMarkerId.get(i.id);if(void 0===n)return;this.emitDecorationChanges(e.getProperties().type,e);let o=n.indexOf(e);o>-1&&(n.splice(o,1),this.emitter.emit("did-remove-decoration",{marker:i,decoration:e}),0===n.length&&this.removedAllMarkerDecorations(i))}removeAllDecorationsForMarker(e){if(null==e)return;let t=this.decorationsByMarkerId.get(e.id);if(void 0!==t){for(let i=0,n=t.length;i0&&this.canvas.height>0&&this.offscreenContext.drawImage(this.canvas,0,0)}copyFromOffscreen(){this.offscreenCanvas.width>0&&this.offscreenCanvas.height>0&&this.context.drawImage(this.offscreenCanvas,0,0)}copyPartFromOffscreen(e,t,i){this.offscreenCanvas.width>0&&this.offscreenCanvas.height>0&&this.context.drawImage(this.offscreenCanvas,0,e,this.offscreenCanvas.width,i,0,t,this.offscreenCanvas.width,i)}clearCanvas(){this.context.clearRect(0,0,this.canvas.width,this.canvas.height)}}const W=atom.inSpecMode();class B extends /*@__PURE__*/r(F){initializeCanvas(){W&&(this.drawLines=(e,t)=>{console.log({firstLine:e,lastLine:t})},this.drawLineDecoration=Q,this.drawGutterDecoration=G,this.drawHighlightDecoration=Z,this.drawHighlightOutlineDecoration=K,this.drawCustomDecoration=X,this.StyleReader=eX,e=this),this.tokensLayer=new j,this.backLayer=new j,this.frontLayer=new j,this.pendingChanges||(this.pendingChanges=[]),this.pendingBackDecorationChanges||(this.pendingBackDecorationChanges=[]),this.pendingFrontDecorationChanges||(this.pendingFrontDecorationChanges=[]),this.maxTokensInOneLine=atom.config.get("minimap.maxTokensInOneLine")}getFrontCanvas(){return this.frontLayer.canvas}attachCanvases(e){this.backLayer.attach(e),this.tokensLayer.attach(e),this.frontLayer.attach(e)}setCanvasesSize(e,t){this.backLayer.setSize(e,t),this.tokensLayer.setSize(e,t),this.frontLayer.setSize(e,t)}updateCanvas(){let e=this.minimap.getFirstVisibleScreenRow(),t=this.minimap.getLastVisibleScreenRow(),i=this.minimap.getDevicePixelRatio(),n=this.minimap.getLineHeight()*i,o=this.minimap.getCharHeight()*i,s=this.minimap.getCharWidth()*i,{width:r,height:a}=this.tokensLayer.getSize(),l=this.minimap.getTextEditor(),d=this.minimap.getTextEditorElement(),h=this.displayCodeHighlights?e=>{var t;return t=this.textOpacity,ei(eX.retrieveStyleFromDom(e,"color",d,!0),t)}:()=>et(d,this.textOpacity);(function(e,t,i,n,o,s,r,a,l,d,h,c,u,p,m,g){let f=eo(t,i,s,n,o),v=e.context;if(e.clearCanvas(),0===f.length)$(t,i,0,r,a,l,d,v,h,c,u,p,m,g);else{for(let i=0,n=f.length;i"string"==typeof e).map(I.escapeRegExp).join("|"),"g"):null}(l),h,this.ignoreWhitespacesInTokens,this.maxTokensInOneLine),W&&this.drawLines(e,t);let c=this.DecorationManagement.decorationsByTypeThenRows(e,t),u={context:this.backLayer.context,canvasWidth:r,canvasHeight:a,lineHeight:n,charWidth:s,charHeight:o,orders:eA},p=(e,t,i)=>X(e,t,i,d);U["background-custom"]=p,V["foreground-custom"]=p,function(e,t,i,n,o,s,r,a,l,d){let h=eo(t,i,s,n,o);if(e.clearCanvas(),0===h.length)ee(t,i,0,r,a,l,d);else{for(let i=0,n=h.length;it)return;let f=i*n-n;t=Math.min(t,d);for(let i=e;ir||(q.test(n)?g+=n.length*s:g=function(e,t,i,n,o,s,r,a){if(e.fillStyle=i,a){let i=t.length*s;return e.fillRect(n,o,i,r),n+i}{let i=0;for(let a=0,l=t.length;a0&&e.fillRect(n-i*s,o,i*s,r),i=0):i++,n+=s;return i>0&&e.fillRect(n-i*s,o,i*s,r),n}}(a,n,c(l),g,f,s,o,u))}}a.fill()}const U={line:Q,"highlight-under":Z},V={gutter:G,"highlight-over":Z,"highlight-outline":K};function Q(e,t,i){let{context:n,lineHeight:o,canvasWidth:s,yRow:r}=t;n.fillStyle=i,n.fillRect(0,r,s,o)}function G(e,t,i){let{context:n,lineHeight:o,yRow:s}=t;n.fillStyle=i,n.fillRect(0,s,1,o)}function Z(e,t,i){let{context:n,lineHeight:o,charWidth:s,canvasWidth:r,screenRow:a,yRow:l}=t,d=e.getMarker().getScreenRange(),h=d.end.row-d.start.row;if(n.fillStyle=i,0===h){let e=d.end.column-d.start.column;n.fillRect(d.start.column*s,l,e*s,o)}else if(a===d.start.row){let e=d.start.column*s;n.fillRect(e,l,r-e,o)}else a===d.end.row?n.fillRect(0,l,d.end.column*s,o):n.fillRect(0,l,r,o)}function K(e,t,i){let n,o,s,r,a;let{context:l,lineHeight:d,charWidth:h,canvasWidth:c,screenRow:u,yRow:p}=t,m=e.getMarker().getScreenRange(),g=m.end.row-m.start.row,f=p+d;l.fillStyle=i,0===g?(o=(m.end.column-m.start.column)*h,r=(a=m.start.column*h)+o,l.fillRect(a,p,o,1),l.fillRect(a,f-1,o,1),l.fillRect(a,p,1,d),l.fillRect(r,p,1,d)):1===g?(a=m.start.column*h,r=m.end.column*h,u===m.start.row?(o=c-a,n=c-(s=Math.max(a,r)),l.fillRect(a,p,o,1),l.fillRect(s,f-1,n,1),l.fillRect(a,p,1,d),l.fillRect(c-1,p,1,d)):(o=c-a,n=c-r,l.fillRect(0,p,a,1),l.fillRect(0,f-1,r,1),l.fillRect(0,p,1,d),l.fillRect(r,p,1,d))):(a=m.start.column*h,r=m.end.column*h,u===m.start.row?(o=c-a,l.fillRect(a,p,o,1),l.fillRect(a,p,1,d),l.fillRect(c-1,p,1,d)):u===m.end.row?(o=c-a,l.fillRect(0,f-1,r,1),l.fillRect(0,p,1,d),l.fillRect(r,p,1,d)):(l.fillRect(0,p,1,d),l.fillRect(c-1,p,1,d),u===m.start.row+1&&l.fillRect(0,p,a,1),u===m.end.row-1&&l.fillRect(r,f-1,c-r,1)))}function X(e,t,i,n){let o=e.getProperties().render;o&&(t.color=i,o(e,t,n))}function Y(t,i,n,o,s){let r=[];for(let e in n.context.clearRect(0,n.yRow,n.canvasWidth,n.lineHeight),o)r=r.concat(null!=i[e]&&i[e][t]||[]);if(r.sort((e,t)=>(n.orders[e.properties.plugin]||0)-(n.orders[t.properties.plugin]||0)),null!=r?r.length:void 0)for(let t=0,i=r.length;tt)){for(let a=e;a<=t;a++)n.row=i+(a-e),n.yRow=n.row*o,n.screenRow=a,Y(a,r,n,V,s);n.context.fill()}}function ee(e,t,i,n,o,s,r){if(!(e>t)){for(let a=e;a<=t;a++)n.row=i+(a-e),n.yRow=n.row*o,n.screenRow=a,Y(a,r,n,U,s);n.context.fill()}}function et(e,t){return ei(eX.retrieveStyleFromDom([".editor"],"color",e,!0),t)}function ei(e,t){return`rgba(${e.slice(4,-1)}, ${t})`}function en(e,t){let i=e.getProperties();if(i.color)return i.color;if(!i.scope)return et(t);{let e=i.scope.split(z);return eX.retrieveStyleFromDom(e,"background-color",t,!0)}}function eo(e,t,i,n,o){if(null==n&&null==o)return[];let s=[{start:n,end:o,offscreenRow:0}];for(let e=0,t=i.length;ei.end?n.push(i):(t.start>i.start&&n.push({start:i.start,end:t.start-1,offscreenRow:i.offscreenRow}),t.endi&&(o.end=i),o.start>=o.end&&e.splice(n--,1),n++}return e.sort((e,t)=>e.offscreenRow-t.offscreenRow)}(s,e,t)}function es(e,...t){t.forEach(t=>{Object.getOwnPropertyNames(t).forEach(i=>{if(["length","name","arguments","caller","prototype","includeInto"].indexOf(i)>=0)return;let n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,n)}),Object.getOwnPropertyNames(t.prototype).forEach(i=>{if("constructor"===i)return;let n=Object.getOwnPropertyDescriptor(t.prototype,i);Object.defineProperty(e.prototype,i,n)})})}var er=(d("4r3v7"),d("4r3v7"));const ea="minimap-quick-settings";class el extends HTMLElement{static initClass(){es(this,c.EventsDelegation,c.SpacePenDSL.Babel),(0,er.default)(this,ea)}static content(){this.div({class:"select-list popover-list minimap-quick-settings"},()=>{this.input({type:"text",class:"hidden-input",outlet:"hiddenInput"}),this.ol({class:"list-group mark-active",outlet:"list"},()=>{this.li({class:"separator",outlet:"separator"}),this.li({class:"code-highlights",outlet:"codeHighlights"},"code-highlights"),this.li({class:"absolute-mode",outlet:"absoluteMode"},"absolute-mode"),this.li({class:"adjust-absolute-mode-height",outlet:"adjustAbsoluteModeHeight"},"adjust-absolute-mode-height")}),this.div({class:"btn-group"},()=>{this.button({class:"btn btn-default",outlet:"onLeftButton"},"On Left"),this.button({class:"btn btn-default",outlet:"onRightButton"},"On Right")})})}createdCallback(){this.buildContent()}setModel(e){this.selectedItem=null,this.minimap=e,this.emitter=new i.Emitter,this.subscriptions=new i.CompositeDisposable,this.plugins={},this.itemsActions=new WeakMap,this.codeHighlights.classList.toggle("active",this.minimap.displayCodeHighlights),this.itemsActions.set(this.codeHighlights,()=>{atom.config.set("minimap.displayCodeHighlights",!this.minimap.displayCodeHighlights)}),this.itemsActions.set(this.absoluteMode,()=>{atom.config.set("minimap.absoluteMode",!atom.config.get("minimap.absoluteMode"))}),this.itemsActions.set(this.adjustAbsoluteModeHeight,()=>{atom.config.set("minimap.adjustAbsoluteModeHeight",!atom.config.get("minimap.adjustAbsoluteModeHeight"))}),this.subscriptions.add(e8(({name:e,plugin:t})=>this.addItemFor(e,t)),e4(({name:e,plugin:t})=>this.removeItemFor(e,t)),e9(({name:e,plugin:t})=>this.activateItem(e,t)),te(({name:e,plugin:t})=>this.deactivateItem(e,t)),atom.commands.add("minimap-quick-settings",{"core:move-up":()=>{this.selectPreviousItem()},"core:move-down":()=>{this.selectNextItem()},"core:move-left":()=>{atom.config.set("minimap.displayMinimapOnLeft",!0)},"core:move-right":()=>{atom.config.set("minimap.displayMinimapOnLeft",!1)},"core:cancel":()=>{this.destroy()},"core:confirm":()=>{this.toggleSelectedItem()}}),this.subscribeTo(this.codeHighlights,{mousedown:e=>{e.preventDefault(),atom.config.set("minimap.displayCodeHighlights",!this.minimap.displayCodeHighlights)}}),this.subscribeTo(this.absoluteMode,{mousedown:e=>{e.preventDefault(),atom.config.set("minimap.absoluteMode",!atom.config.get("minimap.absoluteMode"))}}),this.subscribeTo(this.adjustAbsoluteModeHeight,{mousedown:e=>{e.preventDefault(),atom.config.set("minimap.adjustAbsoluteModeHeight",!atom.config.get("minimap.adjustAbsoluteModeHeight"))}}),this.subscribeTo(this.hiddenInput,{focusout:e=>{this.destroy()}},{passive:!0}),this.subscribeTo(this.onLeftButton,{mousedown:e=>{e.preventDefault(),atom.config.set("minimap.displayMinimapOnLeft",!0)}}),this.subscribeTo(this.onRightButton,{mousedown:e=>{e.preventDefault(),atom.config.set("minimap.displayMinimapOnLeft",!1)}}),atom.config.observe("minimap.displayCodeHighlights",e=>{this.codeHighlights.classList.toggle("active",e)}),atom.config.observe("minimap.absoluteMode",e=>{this.absoluteMode.classList.toggle("active",e)}),atom.config.observe("minimap.adjustAbsoluteModeHeight",e=>{this.adjustAbsoluteModeHeight.classList.toggle("active",e)}),atom.config.observe("minimap.displayMinimapOnLeft",e=>{this.onLeftButton.classList.toggle("selected",e),this.onRightButton.classList.toggle("selected",!e)})),this.initList()}onDidDestroy(e){return this.emitter.on("did-destroy",e)}attach(){atom.views.getView(atom.workspace).appendChild(this),this.hiddenInput.focus()}destroy(){this.emitter.emit("did-destroy"),this.subscriptions.dispose(),this.parentNode.removeChild(this)}initList(){for(let e in this.itemsDisposables=new WeakMap,ek)this.addItemFor(e,ek[e])}toggleSelectedItem(){let e=this.itemsActions.get(this.selectedItem);"function"==typeof e&&e()}selectNextItem(){this.selectedItem.classList.remove("selected"),null!=this.selectedItem.nextSibling?(this.selectedItem=this.selectedItem.nextSibling,this.selectedItem.matches(".separator")&&(this.selectedItem=this.selectedItem.nextSibling)):this.selectedItem=this.list.firstChild,this.selectedItem.classList.add("selected")}selectPreviousItem(){this.selectedItem.classList.remove("selected"),null!=this.selectedItem.previousSibling?(this.selectedItem=this.selectedItem.previousSibling,this.selectedItem.matches(".separator")&&(this.selectedItem=this.selectedItem.previousSibling)):this.selectedItem=this.list.lastChild,this.selectedItem.classList.add("selected")}addItemFor(e,t){let i=document.createElement("li"),n=()=>{eH(e)};t.isActive()&&i.classList.add("active"),i.textContent=e,this.itemsActions.set(i,n),this.itemsDisposables.set(i,this.addDisposableEventListener(i,"mousedown",e=>{e.preventDefault(),n()})),this.plugins[e]=i,this.list.insertBefore(i,this.separator),null!=this.selectedItem||(this.selectedItem=i,this.selectedItem.classList.add("selected"))}removeItemFor(e,t){try{this.list.removeChild(this.plugins[e])}catch(e){}delete this.plugins[e]}activateItem(e,t){this.plugins[e].classList.add("active")}deactivateItem(e,t){this.plugins[e].classList.remove("active")}}el.initClass();const ed=/*@__PURE__*/r(u)({strategy:"scroll"}),eh=atom.inSpecMode(),ec="atom-text-editor-minimap";class eu extends HTMLElement{static initClass(){es(this,B,c.EventsDelegation,c.AncestorsMethods),(0,er.default)(this,ec)}createdCallback(){this.minimap=void 0,this.width=void 0,this.height=void 0,this.subscriptions=new i.CompositeDisposable,this.visibleAreaSubscription=void 0,this.quickSettingsSubscription=void 0,this.dragSubscription=void 0,this.openQuickSettingSubscription=void 0,this.minimapScrollIndicator=void 0,this.displayMinimapOnLeft=void 0,this.displayPluginsControls=void 0,this.textOpacity=void 0,this.displayCodeHighlights=void 0,this.adjustToSoftWrap=void 0,this.useHardwareAcceleration=void 0,this.absoluteMode=void 0,this.visibleArea=void 0,this.controls=void 0,this.scrollIndicator=void 0,this.openQuickSettings=void 0,this.quickSettingsElement=void 0,this.DecorationManagement=new N,this.attached=void 0,this.attachedToTextEditor=void 0,this.standAlone=void 0,this.wasVisible=void 0,this.offscreenFirstRow=void 0,this.offscreenLastRow=void 0,this.frameRequested=void 0,this.flexBasis=void 0,this.initializeContent(),this.subscriptions.add(atom.config.observe("minimap.displayMinimapOnLeft",e=>{this.displayMinimapOnLeft=e,this.updateMinimapFlexPosition(),this.measureHeightAndWidth(!0,!0)}),atom.config.observe("minimap.minimapScrollIndicator",e=>{this.minimapScrollIndicator=e,!this.minimapScrollIndicator||null!=this.scrollIndicator||this.standAlone?null!=this.scrollIndicator&&this.disposeScrollIndicator():this.initializeScrollIndicator(),this.attached&&this.requestUpdate()}),atom.config.observe("minimap.displayPluginsControls",e=>{this.displayPluginsControls=e,!this.displayPluginsControls||null!=this.openQuickSettings||this.standAlone?null!=this.openQuickSettings&&this.disposeOpenQuickSettings():this.initializeOpenQuickSettings()}),atom.config.observe("minimap.textOpacity",e=>{this.textOpacity=e,this.attached&&this.requestForcedUpdate()}),atom.config.observe("minimap.displayCodeHighlights",e=>{this.displayCodeHighlights=e,this.attached&&this.requestForcedUpdate()}),atom.config.observe("minimap.smoothScrolling",e=>{this.smoothScrolling=e,this.attached&&(this.smoothScrolling?this.requestUpdate():(this.backLayer.canvas.style.cssText="",this.tokensLayer.canvas.style.cssText="",this.frontLayer.canvas.style.cssText=""))}),atom.config.observe("minimap.adjustMinimapWidthToSoftWrap",e=>{this.adjustToSoftWrap=e,this.attached&&this.measureHeightAndWidth()}),atom.config.observe("minimap.adjustMinimapWidthOnlyIfSmaller",e=>{this.adjustOnlyIfSmaller=e,this.attached&&this.measureHeightAndWidth()}),atom.config.observe("minimap.useHardwareAcceleration",e=>{this.useHardwareAcceleration=e,this.attached&&this.requestUpdate()}),atom.config.observe("minimap.absoluteMode",e=>{this.absoluteMode=e,this.classList.toggle("absolute",this.absoluteMode)}),atom.config.observe("minimap.adjustAbsoluteModeHeight",e=>{this.adjustAbsoluteModeHeight=e,this.classList.toggle("adjust-absolute-height",this.adjustAbsoluteModeHeight),this.attached&&this.measureHeightAndWidth()}),atom.config.observe("minimap.ignoreWhitespacesInTokens",e=>{this.ignoreWhitespacesInTokens=e,this.attached&&this.requestForcedUpdate()}),atom.config.observe("editor.preferredLineLength",()=>{this.attached&&this.measureHeightAndWidth()}),atom.config.observe("editor.softWrap",()=>{this.attached&&this.requestUpdate()}),atom.config.observe("editor.showInvisibles",()=>{this.attached&&this.requestUpdate()}),atom.config.observe("editor.invisibles",()=>{this.attached&&this.requestUpdate()}),atom.config.observe("editor.softWrapAtPreferredLineLength",()=>{this.attached&&this.requestUpdate()}))}connectedCallback(){if("function"==typeof atom.views.pollDocument)this.subscriptions.add(atom.views.pollDocument(()=>{this.pollDOM()}));else{this.intersectionObserver=new IntersectionObserver(e=>{let{intersectionRect:t}=e[e.length-1];(t.width>0||t.height>0)&&this.measureHeightAndWidth(!0,!0)}),this.intersectionObserver.observe(this),this.isVisible()&&this.measureHeightAndWidth(!0,!0);let e=()=>{this.measureHeightAndWidth(!1,!1)};ed.listenTo(this,e),window.addEventListener("resize",e,{passive:!0}),this.subscriptions.add(new i.Disposable(()=>{ed.removeListener(this,e)}),new i.Disposable(()=>{window.removeEventListener("resize",e)}))}this.measureHeightAndWidth(),this.updateMinimapFlexPosition(),this.attached=!0,this.attachedToTextEditor=this.queryParentSelector("atom-text-editor")===this.minimap.getTextEditorElement(),this.attachedToTextEditor&&this.minimap.getTextEditorElement().setAttribute("with-minimap",this.displayMinimapOnLeft?"left":"right"),this.subscriptions.add(this.subscribeToMediaQuery())}disconnectedCallback(){this.minimap.getTextEditorElement().removeAttribute("with-minimap"),this.attached=!1}isVisible(){return this.offsetWidth>0||this.offsetHeight>0}attach(e){if(this.attached)return;let t=e||this.minimap.getTextEditorElement(),i=t.querySelectorAll(ec);i.length&&Array.prototype.forEach.call(i,e=>{e.destroy();try{t.removeChild(e)}catch(e){}}),t.appendChild(this)}detach(){this.attached&&null!=this.parentNode&&this.parentNode.removeChild(this)}updateMinimapFlexPosition(){this.classList.toggle("left",this.displayMinimapOnLeft),this.attachedToTextEditor&&this.minimap.getTextEditorElement().setAttribute("with-minimap",this.displayMinimapOnLeft?"left":"right")}destroy(){this.DecorationManagement.destroy(),this.quickSettingsElement&&this.quickSettingsElement.destroy(),this.subscriptions.dispose(),this.detach()}initializeContent(){this.initializeCanvas(),this.attachCanvases(this),this.createVisibleArea(),this.createControls(),this.subscriptions.add(this.subscribeTo(this,{mousewheel:e=>{!this.standAlone&&this.minimap.onMouseWheel&&this.minimap.onMouseWheel(e)}},{passive:!0}),this.subscribeTo(this.getFrontCanvas(),{mousedown:e=>{this.canvasPressed(em(e))},touchstart:e=>{this.canvasPressed(eg(e))}},{passive:!0}))}createVisibleArea(){this.visibleArea||(this.visibleArea=document.createElement("div"),this.visibleArea.classList.add("minimap-visible-area"),this.appendChild(this.visibleArea),this.visibleAreaSubscription=this.subscribeTo(this.visibleArea,{mousedown:e=>{this.startDrag(em(e))},touchstart:e=>{this.startDrag(eg(e))}},{passive:!0}),this.subscriptions.add(this.visibleAreaSubscription))}removeVisibleArea(){this.visibleArea&&(this.subscriptions.remove(this.visibleAreaSubscription),this.visibleAreaSubscription.dispose(),this.removeChild(this.visibleArea),delete this.visibleArea)}createControls(){this.controls||this.standAlone||(this.controls=document.createElement("div"),this.controls.classList.add("minimap-controls"),this.appendChild(this.controls))}removeControls(){this.controls&&(this.removeChild(this.controls),delete this.controls)}initializeScrollIndicator(){this.scrollIndicator||this.standAlone||(this.scrollIndicator=document.createElement("div"),this.scrollIndicator.classList.add("minimap-scroll-indicator"),this.controls.appendChild(this.scrollIndicator))}disposeScrollIndicator(){this.scrollIndicator&&(this.controls.removeChild(this.scrollIndicator),delete this.scrollIndicator)}initializeOpenQuickSettings(){this.openQuickSettings||this.standAlone||(this.openQuickSettings=document.createElement("div"),this.openQuickSettings.classList.add("open-minimap-quick-settings"),this.controls.appendChild(this.openQuickSettings),this.openQuickSettingSubscription=this.subscribeTo(this.openQuickSettings,{mousedown:e=>{if(e.preventDefault(),e.stopPropagation(),null!=this.quickSettingsElement)this.quickSettingsElement.destroy(),this.quickSettingsSubscription.dispose();else{this.quickSettingsElement=function(){let e=document.createElement(ea);return e.createdCallback(),e}(),this.quickSettingsElement.setModel(this),this.quickSettingsSubscription=this.quickSettingsElement.onDidDestroy(()=>{this.quickSettingsElement=null});let{top:e,left:t,right:i}=this.getFrontCanvas().getBoundingClientRect();this.quickSettingsElement.style.top=`${e}px`,this.quickSettingsElement.attach(),this.displayMinimapOnLeft?this.quickSettingsElement.style.left=`${i}px`:this.quickSettingsElement.style.left=`${t-this.quickSettingsElement.clientWidth}px`}}}))}disposeOpenQuickSettings(){this.openQuickSettings&&(this.controls.removeChild(this.openQuickSettings),this.openQuickSettingSubscription.dispose(),delete this.openQuickSettings)}getDecorationManagement(){return this.DecorationManagement}getModel(){return this.minimap}setModel(e){return this.minimap=e,this.minimap.minimapElement=this,this.DecorationManagement.initializeDecorations(this.minimap),this.subscriptions.add(this.minimap.onDidChangeScrollTop(()=>{this.requestUpdate()}),this.minimap.onDidChangeScrollLeft(()=>{this.requestUpdate()}),this.minimap.onDidDestroy(()=>{this.destroy()}),this.minimap.onDidChangeConfig(()=>{if(this.attached)return this.requestForcedUpdate()}),this.minimap.onDidChangeStandAlone(()=>{this.setStandAlone(this.minimap.isStandAlone()),this.requestUpdate()}),this.minimap.onDidChange(e=>{this.pendingChanges.push(e),this.requestUpdate()}),this.DecorationManagement.onDidChangeDecorationRange(e=>{let{type:t}=e;"line"===t||"highlight-under"===t||"background-custom"===t?this.pendingBackDecorationChanges.push(e):this.pendingFrontDecorationChanges.push(e),this.requestUpdate()}),tt(()=>{this.requestForcedUpdate()})),this.setStandAlone(this.minimap.isStandAlone()),null!=this.width&&null!=this.height&&this.minimap.setScreenHeightAndWidth(this.height,this.width),this.minimap}setStandAlone(e){this.standAlone=e,this.standAlone?(this.setAttribute("stand-alone",!0),this.disposeScrollIndicator(),this.disposeOpenQuickSettings(),this.removeControls(),this.removeVisibleArea()):(this.removeAttribute("stand-alone"),this.createVisibleArea(),this.createControls(),this.minimapScrollIndicator&&this.initializeScrollIndicator(),this.displayPluginsControls&&this.initializeOpenQuickSettings())}requestUpdate(){this.frameRequested||(this.frameRequested=!0,requestAnimationFrame(()=>{this.update(),this.frameRequested=!1}))}requestForcedUpdate(){this.offscreenFirstRow=null,this.offscreenLastRow=null,this.requestUpdate()}update(){if(!(this.attached&&this.isVisible()&&this.minimap))return;let e=this.minimap;e.enableCache();let t=this.getFrontCanvas(),i=this.minimap.getDevicePixelRatio(),n=e.getTextEditorScaledScrollLeft(),o=e.getTextEditorScaledScrollTop()-e.getScrollTop(),s=Math.min(t.width/i,this.width),r=s+n;this.adjustToSoftWrap&&this.flexBasis?(this.style.flexBasis=`${this.flexBasis}px`,this.style.width=`${this.flexBasis}px`):(this.style.flexBasis=null,this.style.width=null),eh?ef(this.visibleArea,{width:`${Math.round(r)}px`,height:`${Math.round(e.getTextEditorScaledHeight())}px`,top:`${Math.round(o)}px`,"border-left-width":`${Math.round(n)}px`}):ef(this.visibleArea,{width:`${Math.round(r)}px`,height:`${Math.round(e.getTextEditorScaledHeight())}px`,transform:ev(0,o,this.useHardwareAcceleration),"border-left-width":`${Math.round(n)}px`}),ef(this.controls,{width:`${Math.round(s)}px`});let a=e.getFirstVisibleScreenRow()*e.getLineHeight()-e.getScrollTop();if(this.smoothScrolling){if(eh)ef(this.backLayer.canvas,{top:`${a}px`}),ef(this.tokensLayer.canvas,{top:`${a}px`}),ef(this.frontLayer.canvas,{top:`${a}px`});else{let e=ev(0,a,this.useHardwareAcceleration);if(1!==i){let t=1/i;e+=` ${eb(t,t,this.useHardwareAcceleration)}`}ef(this.backLayer.canvas,{transform:e}),ef(this.tokensLayer.canvas,{transform:e}),ef(this.frontLayer.canvas,{transform:e})}}else{let e=1/i,t=eb(e,e,this.useHardwareAcceleration);ef(this.backLayer.canvas,{transform:t}),ef(this.tokensLayer.canvas,{transform:t}),ef(this.frontLayer.canvas,{transform:t})}if(this.minimapScrollIndicator&&!this.scrollIndicator&&e.canScroll()&&this.initializeScrollIndicator(),null!=this.scrollIndicator){let t=e.getScreenHeight(),i=t*(t/e.getHeight()),n=(t-i)*e.getScrollRatio();eh?ef(this.scrollIndicator,{height:`${i}px`,top:`${n}px`}):ef(this.scrollIndicator,{height:`${i}px`,transform:ev(0,n,this.useHardwareAcceleration)}),e.canScroll()||this.disposeScrollIndicator()}this.absoluteMode&&this.adjustAbsoluteModeHeight&&this.updateCanvasesSize(),this.updateCanvas(),e.clearCache()}setDisplayCodeHighlights(e){this.displayCodeHighlights=e,this.attached&&this.requestForcedUpdate()}pollDOM(){let e=this.checkForVisibilityChange();this.isVisible()&&(this.wasVisible||this.requestForcedUpdate(),this.measureHeightAndWidth(e,!1))}checkForVisibilityChange(){return this.isVisible()?!this.wasVisible&&(this.wasVisible=!0,this.wasVisible):this.wasVisible?(this.wasVisible=!1,!0):(this.wasVisible=!1,this.wasVisible)}measureHeightAndWidth(e,t=!0){if(!this.minimap)return;let i=this.style.flexBasis;this.style.flexBasis="";let n=this.width!==this.clientWidth||this.height!==this.clientHeight;this.height=this.clientHeight,this.width=this.clientWidth;let o=this.width;if(null!=this.minimap&&this.minimap.setScreenHeightAndWidth(this.height,this.width),(n||e||t)&&this.requestForcedUpdate(),this.isVisible()){if(n||t){if(this.adjustToSoftWrap){let e=atom.config.get("editor.preferredLineLength"),t=atom.config.get("editor.softWrap"),i=atom.config.get("editor.softWrapAtPreferredLineLength"),n=e*this.minimap.getCharWidth();t&&i&&e&&(n<=this.width||!this.adjustOnlyIfSmaller)?(this.flexBasis=n,o=n):delete this.flexBasis}else delete this.flexBasis;this.updateCanvasesSize(o)}else this.style.flexBasis=i}}updateCanvasesSize(e){let t=this.minimap.getDevicePixelRatio(),i=this.height+this.minimap.getLineHeight(),n=this.absoluteMode&&this.adjustAbsoluteModeHeight?Math.min(this.minimap.getHeight(),i):i,o=this.getFrontCanvas();null==e&&(e=o.width/t),(e!==o.width||n!==o.height)&&(this.setCanvasesSize(e*t,n*t),this.absoluteMode&&this.adjustAbsoluteModeHeight&&(this.offscreenFirstRow=null,this.offscreenLastRow=null))}canvasPressed({y:e,isLeftMouse:t,isMiddleMouse:i}){if(!this.minimap.isStandAlone()){if(t)this.canvasLeftMousePressed(e);else if(i){this.canvasMiddleMousePressed(e);let{top:t,height:i}=this.visibleArea.getBoundingClientRect();this.startDrag({y:t+i/2,isLeftMouse:!1,isMiddleMouse:!0})}}}canvasLeftMousePressed(e){let t=Math.floor((e-this.getBoundingClientRect().top)/this.minimap.getLineHeight())+this.minimap.getFirstVisibleScreenRow(),i=this.minimap.getTextEditor(),n=this.minimap.getTextEditorElement(),o=t*i.getLineHeightInPixels()-this.minimap.getTextEditorHeight()/2,s=n.pixelPositionForScreenPosition([t,0]).top-this.minimap.getTextEditorHeight()/2;if(atom.config.get("minimap.moveCursorOnMinimapClick")&&i.setCursorScreenPosition([t,0]),atom.config.get("minimap.scrollAnimation")){let e=atom.config.get("minimap.scrollAnimationDuration"),t=this.minimap.scrollIndependentlyOnMouseWheel(),i=this.minimap.getTextEditorScrollTop();if(t){let t=this.minimap.getScrollTop(),n=Math.min(1,o/(this.minimap.getTextEditorMaxScrollTop()||1))*this.minimap.getMaxScrollTop();ey({from:i,to:s,duration:e,step:(e,i)=>{null!==this.minimap&&(this.minimap.setTextEditorScrollTop(e,!0),this.minimap.setScrollTop(t+(n-t)*i))}})}else ey({from:i,to:s,duration:e,step:e=>{null!==this.minimap&&this.minimap.setTextEditorScrollTop(e)}})}else this.minimap.setTextEditorScrollTop(s)}canvasMiddleMousePressed(e){let{top:t}=this.getBoundingClientRect(),i=(e-t-this.minimap.getTextEditorScaledHeight()/2)/(this.minimap.getVisibleHeight()-this.minimap.getTextEditorScaledHeight());this.minimap.setTextEditorScrollTop(i*this.minimap.getTextEditorMaxScrollTop())}subscribeToMediaQuery(){let e=window.matchMedia("screen and (-webkit-min-device-pixel-ratio: 1.5)"),t=()=>{this.requestForcedUpdate()};return e.addEventListener("change",t),new i.Disposable(()=>{e.removeEventListener("change",t)})}startDrag({y:e,isLeftMouse:t,isMiddleMouse:n}){if(!this.minimap||!t&&!n)return;let o={dragOffset:e-this.visibleArea.getBoundingClientRect().top,offsetTop:this.getBoundingClientRect().top},s=e=>this.drag(em(e),o),r=()=>this.endDrag(),a=e=>this.drag(eg(e),o);document.body.addEventListener("mousemove",s,{passive:!0}),document.body.addEventListener("mouseup",r,{passive:!0}),document.body.addEventListener("mouseleave",r,{passive:!0}),document.body.addEventListener("touchmove",a,{passive:!0}),document.body.addEventListener("touchend",r,{passive:!0}),document.body.addEventListener("touchcancel",r,{passive:!0}),this.dragSubscription=new i.Disposable(function(){document.body.removeEventListener("mousemove",s),document.body.removeEventListener("mouseup",r),document.body.removeEventListener("mouseleave",r),document.body.removeEventListener("touchmove",a),document.body.removeEventListener("touchend",r),document.body.removeEventListener("touchcancel",r)})}drag({y:e,isLeftMouse:t,isMiddleMouse:i},n){if(!this.minimap||!t&&!i)return;let o=(e-n.offsetTop-n.dragOffset)/(this.minimap.getVisibleHeight()-this.minimap.getTextEditorScaledHeight());this.minimap.setTextEditorScrollTop(o*this.minimap.getTextEditorMaxScrollTop())}endDrag(){this.minimap&&this.dragSubscription.dispose()}}function ep(){let e=document.createElement(ec);return e.createdCallback(),e}function em(e){return{x:e.pageX,y:e.pageY,isLeftMouse:0===e.button,isMiddleMouse:1===e.button}}function eg(e){let t=e.changedTouches[0];return{x:t.pageX,y:t.pageY,isLeftMouse:!0,isMiddleMouse:!1}}function ef(e,t){if(!e)return;let i="";for(let e in t)i+=`${e}: ${t[e]}; `;e.style.cssText=i}function ev(e=0,t=0,i=!1){return i?`translate3d(${e}px, ${t}px, 0)`:`translate(${e}px, ${t}px)`}function eb(e=0,t=e,i=!1){return i?`scale3d(${e}, ${t}, 1)`:`scale(${e}, ${t})`}function ey({from:e,to:t,duration:i,step:n}){let o;let s=eS(),r=()=>{let a=eS()-s;(o=0===i?1:a/i)>1&&(o=1);let l=.5-Math.cos(o*Math.PI)/2;n(e+(t-e)*l,l),o<1&&requestAnimationFrame(r)};r()}function eS(){return new Date}eu.initClass();class ew{constructor(e){this.textEditor=e,this.textEditorElement=atom.views.getView(this.textEditor)}enableCache(){this.useCache=!0}clearCache(){this.useCache=!1,delete this.heightCache,delete this.scrollTopCache,delete this.scrollLeftCache,delete this.maxScrollTopCache}onDidChangeScrollTop(e){return this.textEditorElement.onDidChangeScrollTop(e)}onDidChangeScrollLeft(e){return this.textEditorElement.onDidChangeScrollLeft(e)}getHeight(){return this.editorDestroyed()?0:this.useCache?(this.heightCache||(this.heightCache=this.textEditorElement.getHeight()),this.heightCache):this.textEditorElement.getHeight()}getScrollTop(){return this.editorDestroyed()?0:this.useCache?(this.scrollTopCache||(this.scrollTopCache=this.computeScrollTop()),this.scrollTopCache):this.computeScrollTop()}computeScrollTop(){if(this.editorDestroyed())return 0;let e=this.textEditorElement.getScrollTop(),t=this.textEditor.getLineHeightInPixels(),i=this.textEditorElement.getFirstVisibleScreenRow();if(Number.isNaN(i))return 0;let n=this.textEditorElement.pixelPositionForScreenPosition([i,0]).top;return n>e&&(i-=1,n=this.textEditorElement.pixelPositionForScreenPosition([i,0]).top),i*t+Math.min(e-n,t)}setScrollTop(e){this.editorDestroyed()||this.textEditorElement.setScrollTop(e)}getScrollLeft(){return this.editorDestroyed()?0:this.useCache?(this.scrollLeftCache||(this.scrollLeftCache=this.textEditorElement.getScrollLeft()),this.scrollLeftCache):this.textEditorElement.getScrollLeft()}getMaxScrollTop(){let e;if(this.editorDestroyed())return 0;if(null!=this.maxScrollTopCache&&this.useCache)return this.maxScrollTopCache;if(this.textEditorElement.getMaxScrollTop){if(e=this.textEditorElement.getMaxScrollTop(),parseFloat(atom.getVersion())>=1.13&&this.scrollPastEnd){let t=this.textEditor.getLineHeightInPixels();e-=this.getHeight()-3*t}}else if(e=this.textEditorElement.getScrollHeight()-this.getHeight(),this.scrollPastEnd){let t=this.textEditor.getLineHeightInPixels();e-=this.getHeight()-3*t}return this.useCache&&(this.maxScrollTopCache=e),e}editorDestroyed(){return!this.textEditor||this.textEditor.isDestroyed()||!this.textEditorElement.component||!this.textEditorElement.getModel()||!this.textEditorElement.parentNode}}let ex=1;const eE=new i.Disposable;eE.dispose();const eC=new _({onDidDestroy:()=>eE,getScreenRange:()=>new Range},null,{});class eM{constructor(e={}){if(!e.textEditor)throw Error("Cannot create a minimap without an editor");this.minimapElement=void 0,this.DecorationManagement=void 0,this.textEditor=e.textEditor,this.editorElement=void 0,this.standAlone=e.standAlone,this.width=e.width,this.height=e.height,this.id=ex++,this.emitter=new i.Emitter,this.subscriptions=new i.CompositeDisposable,this.adapter=null,this.charHeight=null,this.configCharHeight=null,this.charWidth=null,this.configCharWidth=null,this.interline=null,this.configInterline=null,this.devicePixelRatioRounding=null,this.configDevicePixelRatioRounding=null,this.redrawDelay=0,this.destroyed=!1,this.scrollPastEnd=!1,this.pendingChangeEvents=[],this.flushChangesTimer=null,null!=atom.views.getView(this.textEditor).getScrollTop&&(this.adapter=new ew(this.textEditor)),this.scrollTop=0;let t=this.subscribeToConfig();this.subscriptions.add(t,this.textEditor.onDidChangeGrammar(()=>{this.subscriptions.remove(t),t.dispose(),t=this.subscribeToConfig(),this.subscriptions.add(t)}),this.adapter.onDidChangeScrollTop(()=>{this.standAlone||this.ignoreTextEditorScroll||this.inChangeScrollTop||(this.inChangeScrollTop=!0,this.updateScrollTop(),this.emitter.emit("did-change-scroll-top",this),this.inChangeScrollTop=!1),this.ignoreTextEditorScroll&&(this.ignoreTextEditorScroll=!1)}),this.adapter.onDidChangeScrollLeft(()=>{this.standAlone||this.emitter.emit("did-change-scroll-left",this)}),this.textEditor.onDidChange(e=>{this.scheduleChanges(e)}),this.textEditor.onDidDestroy(()=>{eQ&&eQ.delete(this.textEditor),this.destroy()}),this.textEditor.onDidTokenize(()=>{this.emitter.emit("did-change-config")}))}destroy(){this.destroyed||(clearTimeout(this.flushChangesTimer),this.pendingChangeEvents=[],this.subscriptions.dispose(),this.emitter.emit("did-destroy"),this.emitter.dispose(),this.destroyed=!0)}isDestroyed(){return this.destroyed}scheduleChanges(e){this.pendingChangeEvents=this.pendingChangeEvents.concat(e),this.redrawDelay||this.requestFlushChanges(),this.flushChangesTimer||(this.flushChangesTimer=setTimeout(()=>{this.requestFlushChanges()},this.redrawDelay))}flushChanges(){clearTimeout(this.flushChangesTimer),this.flushChangesTimer=null,this.emitChanges(this.pendingChangeEvents),this.pendingChangeEvents=[]}requestFlushChanges(){this.requestedFlushChanges||(this.requestedFlushChanges=requestAnimationFrame(()=>{this.flushChanges(),this.requestedFlushChanges&&(cancelAnimationFrame(this.requestedFlushChanges),this.requestedFlushChanges=null)}))}onDidChange(e){return this.emitter.on("did-change",e)}onDidChangeConfig(e){return this.emitter.on("did-change-config",e)}onDidChangeScrollTop(e){return this.emitter.on("did-change-scroll-top",e)}onDidChangeScrollLeft(e){return this.emitter.on("did-change-scroll-left",e)}onDidChangeStandAlone(e){return this.emitter.on("did-change-stand-alone",e)}onDidDestroy(e){return this.emitter.on("did-destroy",e)}subscribeToConfig(){let e=new i.CompositeDisposable,t={scope:this.textEditor.getRootScopeDescriptor()};return e.add(atom.config.observe("editor.scrollPastEnd",t,e=>{this.scrollPastEnd=e,this.adapter.scrollPastEnd=this.scrollPastEnd,this.emitter.emit("did-change-config")}),atom.config.observe("minimap.charHeight",t,e=>{this.configCharHeight=e,this.updateScrollTop(),this.emitter.emit("did-change-config")}),atom.config.observe("minimap.charWidth",t,e=>{this.configCharWidth=e,this.updateScrollTop(),this.emitter.emit("did-change-config")}),atom.config.observe("minimap.interline",t,e=>{this.configInterline=e,this.updateScrollTop(),this.emitter.emit("did-change-config")}),atom.config.observe("minimap.independentMinimapScroll",t,e=>{this.independentMinimapScroll=e,this.updateScrollTop()}),atom.config.observe("minimap.scrollSensitivity",t,e=>{this.scrollSensitivity=e}),atom.config.observe("minimap.redrawDelay",t,e=>{this.redrawDelay=e}),atom.config.observe("minimap.devicePixelRatioRounding",t,e=>{this.configDevicePixelRatioRounding=e,this.updateScrollTop(),this.emitter.emit("did-change-config")})),e}isStandAlone(){return this.standAlone}setStandAlone(e){e!==this.standAlone&&(this.standAlone=e,this.emitter.emit("did-change-stand-alone",this))}getMinimapElement(){return this.minimapElement}getTextEditor(){return this.textEditor}getTextEditorElement(){return this.editorElement||(this.editorElement=atom.views.getView(this.getTextEditor())),this.editorElement}getTextEditorScaledHeight(){return this.adapter.getHeight()*this.getVerticalScaleFactor()}getTextEditorScaledScrollTop(){return this.adapter.getScrollTop()*this.getVerticalScaleFactor()}getTextEditorScaledScrollLeft(){return this.adapter.getScrollLeft()*this.getHorizontalScaleFactor()}getTextEditorMaxScrollTop(){return this.adapter.getMaxScrollTop()}getTextEditorScrollTop(){return this.adapter.getScrollTop()}setTextEditorScrollTop(e,t=!1){this.ignoreTextEditorScroll=t,this.adapter.setScrollTop(e)}getTextEditorScrollLeft(){return this.adapter.getScrollLeft()}getTextEditorHeight(){return this.adapter.getHeight()}getTextEditorScrollRatio(){return this.adapter.getScrollTop()/(this.getTextEditorMaxScrollTop()||1)}getCapedTextEditorScrollRatio(){return Math.min(1,this.getTextEditorScrollRatio())}getHeight(){let e=this.scrollPastEnd?this.textEditor.getRowsPerPage():0;return(this.textEditor.getScreenLineCount()+e)*this.getLineHeight()}getWidth(){return this.textEditor.getMaxScreenLineLength()*this.getCharWidth()}getVisibleHeight(){return Math.min(this.getScreenHeight(),this.getHeight())}getScreenHeight(){return this.isStandAlone()?null!=this.height?this.height:this.getHeight():this.adapter.getHeight()}getVisibleWidth(){return Math.min(this.getScreenWidth(),this.getWidth())}getScreenWidth(){return this.isStandAlone()&&null!=this.width?this.width:this.getWidth()}setScreenHeightAndWidth(e,t){(this.width!==t||this.height!==e)&&(this.height=e,this.width=t,this.updateScrollTop())}getVerticalScaleFactor(){return this.getLineHeight()/this.textEditor.getLineHeightInPixels()}getHorizontalScaleFactor(){return this.getCharWidth()/this.textEditor.getDefaultCharWidth()}getLineHeight(){return this.getCharHeight()+this.getInterline()}getCharWidth(){return null!=this.charWidth?this.charWidth:this.configCharWidth}setCharWidth(e){this.charWidth=Math.floor(e),this.emitter.emit("did-change-config")}getCharHeight(){return null!=this.charHeight?this.charHeight:this.configCharHeight}setCharHeight(e){this.charHeight=Math.floor(e),this.emitter.emit("did-change-config")}getInterline(){return null!=this.interline?this.interline:this.configInterline}setInterline(e){this.interline=Math.floor(e),this.emitter.emit("did-change-config")}getDevicePixelRatioRounding(){return null!=this.devicePixelRatioRounding?this.devicePixelRatioRounding:this.configDevicePixelRatioRounding}setDevicePixelRatioRounding(e){this.devicePixelRatioRounding=e,this.emitter.emit("did-change-config")}getDevicePixelRatio(){return this.getDevicePixelRatioRounding()?devicePixelRatio>=1?Math.round(devicePixelRatio):Math.max(Math.round(10*devicePixelRatio)/10,.1):devicePixelRatio}getFirstVisibleScreenRow(){return Math.floor(this.getScrollTop()/this.getLineHeight())}getLastVisibleScreenRow(){return Math.ceil((this.getScrollTop()+this.getScreenHeight())/this.getLineHeight())}scrollIndependentlyOnMouseWheel(){return this.independentMinimapScroll}getScrollTop(){return this.standAlone||this.independentMinimapScroll?this.scrollTop:this.getScrollTopFromEditor()}setScrollTop(e){this.scrollTop=Math.max(0,Math.min(this.getMaxScrollTop(),e)),(this.standAlone||this.independentMinimapScroll)&&this.emitter.emit("did-change-scroll-top",this)}getScrollRatio(){return this.getScrollTop()/this.getMaxScrollTop()}updateScrollTop(){if(this.independentMinimapScroll){try{this.setScrollTop(this.getScrollTopFromEditor())}catch(e){}this.emitter.emit("did-change-scroll-top",this)}}getScrollTopFromEditor(){return Math.abs(this.getCapedTextEditorScrollRatio()*this.getMaxScrollTop())}getMaxScrollTop(){return Math.max(0,this.getHeight()-this.getScreenHeight())}canScroll(){return this.getMaxScrollTop()>0}onMouseWheel(e){if(this.scrollIndependentlyOnMouseWheel()){if(e.stopPropagation(),!this.canScroll())return;let{wheelDeltaY:t}=e,i=this.getScrollTop()-Math.round(t*this.scrollSensitivity);this.setScrollTop(i)}}getMarker(e){return this.textEditor.getMarker(e)}findMarkers(e){try{return this.textEditor.findMarkers(e)}catch(e){return[]}}markBufferRange(e){return this.textEditor.markBufferRange(e)}emitChanges(e){this.emitter.emit("did-change",e)}enableCache(){this.adapter.enableCache()}clearCache(){this.adapter.clearCache()}editorDestroyed(){this.adapter.editorDestroyed()}getDecorationManagement(){var e;return!this.DecorationManagement&&(null===(e=this.minimapElement)||void 0===e?void 0:e.DecorationManagement)&&(this.DecorationManagement=this.minimapElement.DecorationManagement),this.DecorationManagement}getDecorations(){var e,t;return null!==(t=null===(e=this.getDecorationManagement())||void 0===e?void 0:e.getDecorations())&&void 0!==t?t:[]}onDidAddDecoration(...e){var t,i;return null!==(i=null===(t=this.getDecorationManagement())||void 0===t?void 0:t.onDidAddDecoration(...e))&&void 0!==i?i:eE}onDidRemoveDecoration(...e){var t,i;return null!==(i=null===(t=this.getDecorationManagement())||void 0===t?void 0:t.onDidRemoveDecoration(...e))&&void 0!==i?i:eE}onDidChangeDecorationRange(...e){var t,i;return null!==(i=null===(t=this.getDecorationManagement())||void 0===t?void 0:t.onDidChangeDecorationRange(...e))&&void 0!==i?i:eE}onDidUpdateDecoration(...e){var t,i;return null!==(i=null===(t=this.getDecorationManagement())||void 0===t?void 0:t.onDidUpdateDecoration(...e))&&void 0!==i?i:eE}decorationForId(...e){var t,i;return null!==(i=null===(t=this.getDecorationManagement())||void 0===t?void 0:t.decorationForId(...e))&&void 0!==i?i:eC}decorationsForScreenRowRange(...e){var t,i;return null!==(i=null===(t=this.getDecorationManagement())||void 0===t?void 0:t.decorationsForScreenRowRange(...e))&&void 0!==i?i:eC}decorationsByTypeThenRows(){var e,t;return null!==(t=null===(e=this.getDecorationManagement())||void 0===e?void 0:e.decorationsByTypeThenRows())&&void 0!==t?t:eC}decorateMarker(...e){var t,i;return null!==(i=null===(t=this.getDecorationManagement())||void 0===t?void 0:t.decorateMarker(...e))&&void 0!==i?i:eC}removeDecoration(...e){var t;return null===(t=this.getDecorationManagement())||void 0===t?void 0:t.removeDecoration(...e)}removeAllDecorationsForMarker(...e){var t;return null===(t=this.getDecorationManagement())||void 0===t?void 0:t.removeAllDecorationsForMarker(...e)}removeAllDecorations(){var e;return null===(e=this.getDecorationManagement())||void 0===e?void 0:e.removeAllDecorations()}}var eD={};eD=JSON.parse('{"plugins":{"type":"object","properties":{}},"autoToggle":{"title":"Show Minimap On Atom Start","type":"boolean","default":true,"order":1},"displayMinimapOnLeft":{"type":"boolean","default":false,"order":2},"displayCodeHighlights":{"type":"boolean","default":true,"description":"Toggles the render of the buffer tokens in the minimap.","order":3},"displayPluginsControls":{"type":"boolean","default":true,"description":"You need to restart Atom for this setting to be effective.","order":4},"minimapScrollIndicator":{"type":"boolean","default":true,"description":"Toggles the display of a side line showing which part of the buffer is currently displayed by the minimap. This side line will only appear if the minimap is taller than the editor view height.","order":5},"adjustMinimapWidthToSoftWrap":{"type":"boolean","default":true,"description":"If this option is enabled and Soft Wrap is checked then the Minimap max width is set to the Preferred Line Length value.","order":6},"adjustMinimapWidthOnlyIfSmaller":{"type":"boolean","default":true,"description":"If this option and `adjustMinimapWidthToSoftWrap` are enabled the minimap width will never go past the limit sets by CSS. On the other hand, when disabled the minimap will expand to honor the preferred line width.","order":7},"ignoreWhitespacesInTokens":{"type":"boolean","default":false,"description":"When enabled, text editor tokens are rendered as plain blocks, with no regards to the whitespaces they contains.","order":8},"charWidth":{"type":"number","default":1,"minimum":0.5,"order":9},"charHeight":{"type":"number","default":2,"minimum":0.5,"order":10},"interline":{"type":"number","default":1,"minimum":0,"description":"The space between lines in the minimap in pixels.","order":11},"textOpacity":{"type":"number","default":0.6,"minimum":0,"maximum":1,"description":"The opacity used to render the line\'s text in the minimap.","order":12},"moveCursorOnMinimapClick":{"type":"boolean","default":false,"description":"Moves the cursor to the beginning of the target line when clicking on the minimap","order":13},"independentMinimapScroll":{"type":"boolean","title":"Independent Minimap Scroll On Mouse Wheel Events","default":false,"description":"When enabled, using the mouse wheel over the Minimap will make it scroll independently of the text editor. The Minimap will still sync with the editor whenever the editor is scrolled, but it will no longer relay the mouse wheel events to the editor.","order":14},"scrollSensitivity":{"type":"number","default":0.5,"description":"The scrolling speed when the `Independent Minimap Scroll On Mouse Wheel Events` setting is enabled.","order":15},"smoothScrolling":{"type":"boolean","default":false,"description":"Whether to offset the minimap canvas when scrolling to keep the scroll smooth. When `true` the minimap canvas will be offseted, resulting in a smoother scroll, but with the side-effect of a blurry minimap when the canvas is placed between pixels. When `false` the canvas will always stay at the same position, and will never look blurry, but the scroll will appear more jagged.","order":16},"createPluginInDevMode":{"type":"boolean","default":false,"order":17},"absoluteMode":{"type":"boolean","default":false,"description":"When enabled the text editor content will be able to flow below the minimap.","order":18},"adjustAbsoluteModeHeight":{"type":"boolean","default":false,"description":"When enabled and `Absolute Mode` is also enabled, the minimap height will be adjusted to only take the space required by the text editor content, leaving the space below triggering mouse events on the text editor. **Be aware this can have some impact on performances as the minimap canvases will be resized every time a change in the editor make its height change.**","order":19},"redrawDelay":{"type":"number","default":400,"minimum":0,"maximum":2000,"description":"Controls how often (in ms) the minimap should redraw itself after changing the text editor\'s contents. Setting this to 100ms or higher could dramatically improve editor responsiveness when working with large files. A value of 0 will cause the minimap to redraw itself immediately on each change.","order":20},"devicePixelRatioRounding":{"type":"boolean","default":true,"description":"Toggles the rounding of the devicePixelRatio in the minimap.","order":21},"useHardwareAcceleration":{"type":"boolean","default":true,"order":22},"scrollAnimation":{"type":"boolean","default":false,"description":"Enables animations when scrolling by clicking on the minimap.","order":23},"scrollAnimationDuration":{"type":"integer","default":300,"description":"The duration of scrolling animations when clicking on the minimap.","order":24},"maxTokensInOneLine":{"type":"integer","default":160,"description":"The maximum number of tokens that are rendered for each line.","order":25}}');var eT={};s(eT,"plugins",()=>ek),s(eT,"registerPlugin",()=>eR),s(eT,"unregisterPlugin",()=>eP),s(eT,"togglePluginActivation",()=>eH),s(eT,"deactivateAllPlugins",()=>eI),s(eT,"activatePlugin",()=>e_),s(eT,"deactivatePlugin",()=>eN),s(eT,"getPluginsOrder",()=>ej);const ek={},eL={},eA={};function eR(e,t){ek[e]=t,eL[e]=new i.CompositeDisposable,eK.emit("did-add-plugin",{name:e,plugin:t}),atom.config.get("minimap.displayPluginsControls")&&function(e,t){let i=`minimap.plugins.${e}`,n=`minimap.plugins.${e}DecorationsZIndex`,o=e1();o.plugins.properties[e]={type:"boolean",title:e,description:`Whether the ${e} plugin is activated and displayed in the Minimap.`,default:!0},o.plugins.properties[`${e}DecorationsZIndex`]={type:"integer",title:`${e} decorations order`,description:`The relative order of the ${e} plugin's decorations in the layer into which they are drawn. Note that this order only apply inside a layer, so highlight-over decorations will always be displayed above line decorations as they are rendered in different layers.`,default:0},void 0===atom.config.get(i)&&atom.config.set(i,!0),void 0===atom.config.get(n)&&atom.config.set(n,0),eL[e].add(atom.config.observe(i,()=>{eO(e)})),eL[e].add(atom.config.observe(n,i=>{eF(e),eK.emit("did-change-plugin-order",{name:e,plugin:t,order:i})})),eL[e].add(atom.commands.add("atom-workspace",{[`minimap:toggle-${e}`]:()=>{eH(e)}})),eF(e)}(e,t),eO(e)}function eP(e){let t=ek[e];atom.config.get("minimap.displayPluginsControls")&&(eL[e].dispose(),delete eL[e],delete e1().plugins.properties[e]),delete ek[e],eK.emit("did-remove-plugin",{name:e,plugin:t})}function eH(e,t){let i=`minimap.plugins.${e}`;null!=t?atom.config.set(i,t):atom.config.set(i,!atom.config.get(i)),eO(e)}function eI(){for(let[e,t]of function*(){for(let e in ek)yield[e,ek[e]]}())t.deactivatePlugin(),eK.emit("did-deactivate-plugin",{name:e,plugin:t})}function eO(e){let t=ek[e],i=t.isActive(),n=atom.config.get(`minimap.plugins.${e}`);atom.config.get("minimap.displayPluginsControls")?n&&!i?e_(e,t):i&&!n&&eN(e,t):i?i&&eN(e,t):e_(e,t)}function e_(e,t){t.activatePlugin(),eK.emit("did-activate-plugin",{name:e,plugin:t})}function eN(e,t){t.deactivatePlugin(),eK.emit("did-deactivate-plugin",{name:e,plugin:t})}function eF(e){let t=`minimap.plugins.${e}DecorationsZIndex`;eA[e]=atom.config.get(t)}function ej(){return eA}var eW={};Object.defineProperty(eW,"__esModule",{value:!0}),eW.StyleReader=void 0,eW.StyleReader=class{constructor(){this.domStylesCache=new Map,this.dummyNode=void 0,this.targetNode=void 0}retrieveStyleFromDom(e,t,i,n=!0){if(0===e.length)return"";let o=e.join(" "),s=this.domStylesCache.get(o);if(void 0!==s){if(n){let e=s[t];if(void 0!==e)return e}}else s={};this.ensureDummyNodeExistence(i);let r=this.dummyNode,a=r;for(let t=0,i=e.length;t{e2()},"minimap:generate-coffee-plugin":async()=>{await e5("coffee")},"minimap:generate-javascript-plugin":async()=>{await e5("javascript")},"minimap:generate-babel-plugin":async()=>{await e5("babel")}}),eQ=new Map,eX=new eW.StyleReader,eG=new i.CompositeDisposable,eU=!0,atom.config.get("minimap.autoToggle")&&e2())}function eJ(e){if(e instanceof eM){let t=e.getMinimapElement();return t||(t=ep()).setModel(e),t}}function e0(){eU&&(eI(),eQ&&(eQ.forEach(e=>{e.destroy()}),eQ.clear()),eG.dispose(),eZ.dispose(),eX.invalidateDOMStylesCache(),eV=!1,eU=!1)}function e1(){return eD||atom.packages.getLoadedPackage("minimap").metadata.configSchema}function e2(){if(eU){if(eV){eV=!1,eQ&&(eQ.forEach(e=>{e.destroy()}),eQ.clear()),eG.dispose();let e=atom.isMaximized(),{width:t,height:i}=atom.getSize();atom.setSize(t,i),e&&atom.maximize()}else eV=!0,function(){var e,t,i;let n=(0,I.debounce)(tl,300);eG.add(atom.workspace.observeTextEditors(e=>{let t=to(e),i=eJ(t);eK.emit("did-create-minimap",t),i.attach(e.getElement())}),atom.themes.onDidChangeActiveThemes(n),atom.styles.onDidUpdateStyleElement(n),atom.styles.onDidAddStyleElement(n),atom.styles.onDidRemoveStyleElement(n),(e="core.useTreeSitterParsers",t="Tree-sitter is off (Low Performance Warning).",i=`You should turn on Atom's tree-sitter parser to experience the best performance Minimap and Atom are designed for. + Keeping tree-sitter parser off results in sluggish scrolling and lags in the text editor.`,atom.config.observe(e,n=>{if(!0!==n){let n=`Minimap.${e}`,o=new Date,s=window.localStorage.getItem(n),r=null;if(s&&(r=new Date(Date.parse(s)).getDay()),!r||"number"==typeof r&&r-o.getDay()>=1){window.localStorage.setItem(n,o);let s=atom.notifications.addWarning(t,{description:i,dismissable:!0,buttons:[{text:"Set to true and restart Atom",onDidClick(){atom.config.set(e,!0),s.dismiss(),window.localStorage.removeItem(n),setTimeout(()=>{atom.reload()},1500)}}]})}}})))}();eX.invalidateDOMStylesCache()}}async function e5(e){let{createMinimapPluginGeneratorElement:t}=await d("dGrXD"),i=t();i.template=e,i.attach()}function e7(e){return eK.on("did-activate",e)}function e3(e){return eK.on("did-deactivate",e)}function e6(e){return eK.on("did-create-minimap",e)}function e8(e){return eK.on("did-add-plugin",e)}function e4(e){return eK.on("did-remove-plugin",e)}function e9(e){return eK.on("did-activate-plugin",e)}function te(e){return eK.on("did-deactivate-plugin",e)}function tt(e){return eK.on("did-change-plugin-order",e)}function ti(){return eM}function tn(e){if(e)return to(e.getModel())}function to(e){if(!e||!eQ)return;let t=eQ.get(e);if(void 0===t||t.destroyed){t=new eM({textEditor:e}),eQ.set(e,t);let i=e.onDidDestroy(()=>{eQ&&eQ.delete(e),t&&t.destroy(),i.dispose()});eG.add(i)}return t}function ts(e){if(e)return new eM({textEditor:e,standAlone:!0})}function tr(){return to(atom.workspace.getActiveTextEditor())}function ta(e){if(e)return eQ&&eQ.forEach(t=>{e(t)}),e6(t=>{e(t)})}function tl(){eX.invalidateDOMStylesCache(),eQ.forEach(e=>{atom.views.getView(e).requestForcedUpdate()})}const td={minimapViewProvider:eJ,getConfigSchema:e1,onDidActivate:e7,onDidDeactivate:e3,onDidCreateMinimap:e6,onDidAddPlugin:e8,onDidRemovePlugin:e4,onDidActivatePlugin:e9,onDidDeactivatePlugin:te,onDidChangePluginOrder:tt,minimapClass:ti,minimapForEditorElement:tn,minimapForEditor:to,standAloneMinimapForEditor:ts,getActiveMinimap:tr,observeMinimaps:ta,registerPlugin:eR,unregisterPlugin:eP,togglePluginActivation:eH,deactivateAllPlugins:eI,activatePlugin:e_,deactivatePlugin:eN,getPluginsOrder:ej};function th(){return td}t=module.exports,Object.keys(eT).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return eT[e]}})}); //# sourceMappingURL=main.js.map diff --git a/dist/main.js.map b/dist/main.js.map index 1ba1b94e..2456adcb 100644 --- a/dist/main.js.map +++ b/dist/main.js.map @@ -1 +1 @@ -{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kCAAkC;AACjC,CAAA;IACC,IAAI,oBAAoB,sBAAsB,0BAA0B;IAEvE,CAAA,aAAC,SAAS,EAAC,GAAG,wBAAc;IAE7B,IAAI,eAAO,gCAAgC,IAAI,MAAM;QACnD,eAAO,qCAAqC,GAAG,eAAO,gCAAgC;QACtF,OAAO,eAAO,gCAAgC;IAChD,OACE,IAAI,eAAO,qCAAqC,IAAI,MAClD,eAAO,qCAAqC,GAAG,CAAC;IAIpD,qBAAqB;QAAC;QAAmB;QAAoB;QAAoB;KAA2B;IAE5G,2BAA2B,SAAS,MAAM,EAAE,MAAM;QAChD,mBAAmB,OAAO,CAAC,SAAS,CAAC;YACnC,OAAO,OAAO,cAAc,CAAC,QAAQ,GAAG;gBACtC,OAAO;oBACL,IAAI;oBACJ,OAAO,AAAC,CAAA,MAAM,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,AAAD,KAAM,OAAO,IAAI,KAAK,CAAC,IAAI,EAAE,aAAa,KAAK;gBAC5E;gBACA,UAAU;gBACV,YAAY;gBACZ,cAAc;YAChB;QACF;QACA,OAAO,OAAO,mBAAmB,CAAC,QAAQ,OAAO,CAAC,SAAS,CAAC;YAC1D,IAAI;YACJ,IAAI,MAAM,eACR;YAEF,aAAa,OAAO,wBAAwB,CAAC,QAAQ;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mBACA;qBACA;wBACA;oBACA;uBACA;yBACA;2BACA;4BACA;kBACA;6BACA;sBACA;gCACA;sBACA;qBACA;IACA,gBAAgB;IAChB,kBAAkB;IAClB,wBAAwB;IACxB,sBAAsB;IACtB,gBAAgB;IAChB,kBAAkB;IAClB,iBAAiB;AACnB;AAOO,SAAS;IACd,OAAO;AACT","sources":["node_modules/atom-utils-plus/lib/register-or-update-element.js","node_modules/grim/lib/grim.js","node_modules/grim/lib/deprecation.js","node_modules/event-kit/dist/event-kit.js","node_modules/event-kit/dist/emitter.js","node_modules/event-kit/dist/disposable.js","node_modules/event-kit/dist/composite-disposable.js","node_modules/atom-utils-plus/lib/mixins/ancestors.js","node_modules/mixto/lib/mixin.js","node_modules/atom-utils-plus/lib/mixins/disposable-events.js","node_modules/atom-utils-plus/lib/mixins/events-delegation.js","node_modules/atom-utils-plus/lib/mixins/space-pen-dsl.js","lib/deps/underscore-plus.js","lib/decorators/element.js","../../../../usr/lib/node_modules/parcel/node_modules/@parcel/runtime-js/lib/runtime-019a0d232f6b0f32.js","lib/main.js","lib/minimap-element.js","node_modules/atom-utils-plus/lib/atom-utils.js","node_modules/element-resize-detector/src/element-resize-detector.js","node_modules/element-resize-detector/src/collection-utils.js","node_modules/element-resize-detector/src/element-utils.js","node_modules/element-resize-detector/src/listener-handler.js","node_modules/element-resize-detector/src/id-generator.js","node_modules/element-resize-detector/src/id-handler.js","node_modules/element-resize-detector/src/reporter.js","node_modules/element-resize-detector/src/browser-detector.js","node_modules/batch-processor/src/batch-processor.js","node_modules/batch-processor/src/utils.js","node_modules/element-resize-detector/src/state-handler.js","node_modules/element-resize-detector/src/detection-strategy/object.js","node_modules/element-resize-detector/src/detection-strategy/scroll.js","lib/decoration-management.js","lib/decoration.js","lib/mixins/canvas-drawer.js","lib/canvas-layer.js","lib/decorators/include.js","lib/minimap-quick-settings-element.js","lib/minimap.js","lib/adapters/stable-adapter.js","lib/config.json","lib/plugin-management.js","lib/performance-monitor.js","node_modules/atom-ide-base/commons-ui/dom-style-reader.js","node_modules/atom-ide-base/src-commons-ui/dom-style-reader.ts"],"sourcesContent":["// Generated by CoffeeScript 2.5.1\n(function() {\n var callbackProperties, decorateElementClass, decorateElementPrototype, deprecate;\n\n ({deprecate} = require('grim'));\n\n if (global.__CUSTOM_HTML_ELEMENTS_CLASSES__ != null) {\n global.__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__ = global.__CUSTOM_HTML_ELEMENTS_CLASSES__;\n delete global.__CUSTOM_HTML_ELEMENTS_CLASSES__;\n } else {\n if (global.__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__ == null) {\n global.__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__ = {};\n }\n }\n\n callbackProperties = ['createdCallback', 'attachedCallback', 'detachedCallback', 'attributeChangedCallback'];\n\n decorateElementPrototype = function(target, source) {\n callbackProperties.forEach(function(k) {\n return Object.defineProperty(target, k, {\n value: function() {\n var ref;\n return (ref = this[`__${k}`]) != null ? ref.apply(this, arguments) : void 0;\n },\n writable: true,\n enumerable: true,\n configurable: true\n });\n });\n return Object.getOwnPropertyNames(source).forEach(function(k) {\n var descriptor;\n if (k === 'constructor') {\n return;\n }\n descriptor = Object.getOwnPropertyDescriptor(source, k);\n if (callbackProperties.indexOf(k) > -1) {\n return Object.defineProperty(target, `__${k}`, descriptor);\n } else {\n return Object.defineProperty(target, k, descriptor);\n }\n });\n };\n\n decorateElementClass = function(target, source) {\n return Object.getOwnPropertyNames(source).forEach(function(k) {\n var descriptor;\n if (k === 'length' || k === 'name' || k === 'arguments' || k === 'caller' || k === 'prototype') {\n return;\n }\n descriptor = Object.getOwnPropertyDescriptor(source, k);\n return Object.defineProperty(target, k, descriptor);\n });\n };\n\n module.exports = function(nodeName, options) {\n var elementClass, elementPrototype, klass, proto, ref;\n ({\n class: klass\n } = options);\n if (klass != null) {\n proto = klass.prototype;\n } else {\n proto = (ref = options.prototype) != null ? ref : options;\n }\n if (proto === options) {\n deprecate('Using the prototype as the second argument is deprecated, use the prototype option instead');\n }\n if (__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__[nodeName]) {\n elementClass = __ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__[nodeName];\n decorateElementPrototype(elementClass.prototype, proto);\n if (klass != null) {\n decorateElementClass(elementClass, klass);\n }\n return elementClass;\n } else {\n elementPrototype = Object.create(HTMLElement.prototype);\n decorateElementPrototype(elementPrototype, proto);\n elementClass = document.registerElement(nodeName, {\n prototype: Object.create(elementPrototype)\n });\n if (klass != null) {\n decorateElementClass(elementClass, klass);\n }\n return __ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__[nodeName] = elementClass;\n }\n };\n\n}).call(this);\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVnaXN0ZXItb3ItdXBkYXRlLWVsZW1lbnQuanMiLCJzb3VyY2VSb290IjoiLi4iLCJzb3VyY2VzIjpbImxpYi9yZWdpc3Rlci1vci11cGRhdGUtZWxlbWVudC5jb2ZmZWUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQUEsTUFBQSxrQkFBQSxFQUFBLG9CQUFBLEVBQUEsd0JBQUEsRUFBQTs7RUFBQSxDQUFBLENBQUMsU0FBRCxDQUFBLEdBQWMsT0FBQSxDQUFRLE1BQVIsQ0FBZDs7RUFFQSxJQUFHLCtDQUFIO0lBQ0UsTUFBTSxDQUFDLHFDQUFQLEdBQStDLE1BQU0sQ0FBQztJQUN0RCxPQUFPLE1BQU0sQ0FBQyxpQ0FGaEI7R0FBQSxNQUFBOztNQUlFLE1BQU0sQ0FBQyx3Q0FBeUMsQ0FBQTtLQUpsRDs7O0VBTUEsa0JBQUEsR0FBcUIsQ0FDbkIsaUJBRG1CLEVBRW5CLGtCQUZtQixFQUduQixrQkFIbUIsRUFJbkIsMEJBSm1COztFQU9yQix3QkFBQSxHQUEyQixRQUFBLENBQUMsTUFBRCxFQUFTLE1BQVQsQ0FBQT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TX19bbm9kZU5hbWVdID0gZWxlbWVudENsYXNzXG4iXX0=\n//# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/register-or-update-element.coffee","(function() {\n var Deprecation, Emitter, getRawStack, grim;\n\n Deprecation = require('./deprecation');\n\n if (global.__grim__ == null) {\n Emitter = require('event-kit').Emitter;\n grim = global.__grim__ = {\n deprecations: {},\n emitter: new Emitter,\n includeDeprecatedAPIs: true,\n getDeprecations: function() {\n var deprecation, deprecations, deprecationsByLineNumber, deprecationsByPackage, fileName, lineNumber, packageName, _ref;\n deprecations = [];\n _ref = grim.deprecations;\n for (fileName in _ref) {\n deprecationsByLineNumber = _ref[fileName];\n for (lineNumber in deprecationsByLineNumber) {\n deprecationsByPackage = deprecationsByLineNumber[lineNumber];\n for (packageName in deprecationsByPackage) {\n deprecation = deprecationsByPackage[packageName];\n deprecations.push(deprecation);\n }\n }\n }\n return deprecations;\n },\n getDeprecationsLength: function() {\n return this.getDeprecations().length;\n },\n clearDeprecations: function() {\n grim.deprecations = {};\n },\n logDeprecations: function() {\n var deprecation, deprecations, _i, _len;\n deprecations = this.getDeprecations();\n deprecations.sort(function(a, b) {\n return b.getCallCount() - a.getCallCount();\n });\n console.warn(\"\\nCalls to deprecated functions\\n-----------------------------\");\n for (_i = 0, _len = deprecations.length; _i < _len; _i++) {\n deprecation = deprecations[_i];\n console.warn(\"(\" + (deprecation.getCallCount()) + \") \" + (deprecation.getOriginName()) + \" : \" + (deprecation.getMessage()), deprecation);\n }\n },\n deprecate: function(message, metadata) {\n var deprecation, deprecationSite, error, fileName, lineNumber, originalStackTraceLimit, packageName, stack, _base, _base1, _base2, _ref, _ref1;\n originalStackTraceLimit = Error.stackTraceLimit;\n try {\n Error.stackTraceLimit = 7;\n error = new Error;\n stack = (_ref = typeof error.getRawStack === \"function\" ? error.getRawStack() : void 0) != null ? _ref : getRawStack(error);\n stack = stack.slice(1);\n } finally {\n Error.stackTraceLimit = originalStackTraceLimit;\n }\n deprecationSite = stack[0];\n fileName = deprecationSite.getFileName();\n lineNumber = deprecationSite.getLineNumber();\n packageName = (_ref1 = metadata != null ? metadata.packageName : void 0) != null ? _ref1 : \"\";\n if ((_base = grim.deprecations)[fileName] == null) {\n _base[fileName] = {};\n }\n if ((_base1 = grim.deprecations[fileName])[lineNumber] == null) {\n _base1[lineNumber] = {};\n }\n if ((_base2 = grim.deprecations[fileName][lineNumber])[packageName] == null) {\n _base2[packageName] = new Deprecation(message);\n }\n deprecation = grim.deprecations[fileName][lineNumber][packageName];\n deprecation.addStack(stack, metadata);\n grim.emitter.emit(\"updated\", deprecation);\n },\n addSerializedDeprecation: function(serializedDeprecation) {\n var deprecation, fileName, lineNumber, message, packageName, stack, stacks, _base, _base1, _base2, _i, _len, _ref, _ref1, _ref2;\n deprecation = Deprecation.deserialize(serializedDeprecation);\n message = deprecation.getMessage();\n fileName = deprecation.fileName, lineNumber = deprecation.lineNumber;\n stacks = deprecation.getStacks();\n packageName = (_ref = (_ref1 = stacks[0]) != null ? (_ref2 = _ref1.metadata) != null ? _ref2.packageName : void 0 : void 0) != null ? _ref : \"\";\n if ((_base = grim.deprecations)[fileName] == null) {\n _base[fileName] = {};\n }\n if ((_base1 = grim.deprecations[fileName])[lineNumber] == null) {\n _base1[lineNumber] = {};\n }\n if ((_base2 = grim.deprecations[fileName][lineNumber])[packageName] == null) {\n _base2[packageName] = new Deprecation(message, fileName, lineNumber);\n }\n deprecation = grim.deprecations[fileName][lineNumber][packageName];\n for (_i = 0, _len = stacks.length; _i < _len; _i++) {\n stack = stacks[_i];\n deprecation.addStack(stack, stack.metadata);\n }\n grim.emitter.emit(\"updated\", deprecation);\n },\n on: function(eventName, callback) {\n return grim.emitter.on(eventName, callback);\n }\n };\n }\n\n getRawStack = function(error) {\n var originalPrepareStackTrace, result;\n originalPrepareStackTrace = Error.prepareStackTrace;\n Error.prepareStackTrace = function(error, stack) {\n return stack;\n };\n Error.captureStackTrace(error, getRawStack);\n result = error.stack;\n Error.prepareStackTrace = originalPrepareStackTrace;\n return result;\n };\n\n module.exports = global.__grim__;\n\n}).call(this);\n","(function() {\n var Deprecation, SourceMapCache;\n\n SourceMapCache = {};\n\n module.exports = Deprecation = (function() {\n Deprecation.getFunctionNameFromCallsite = function(callsite) {};\n\n Deprecation.deserialize = function(_arg) {\n var deprecation, fileName, lineNumber, message, stack, stacks, _i, _len;\n message = _arg.message, fileName = _arg.fileName, lineNumber = _arg.lineNumber, stacks = _arg.stacks;\n deprecation = new Deprecation(message, fileName, lineNumber);\n for (_i = 0, _len = stacks.length; _i < _len; _i++) {\n stack = stacks[_i];\n deprecation.addStack(stack, stack.metadata);\n }\n return deprecation;\n };\n\n function Deprecation(message, fileName, lineNumber) {\n this.message = message;\n this.fileName = fileName;\n this.lineNumber = lineNumber;\n this.callCount = 0;\n this.stackCount = 0;\n this.stacks = {};\n this.stackCallCounts = {};\n }\n\n Deprecation.prototype.getFunctionNameFromCallsite = function(callsite) {\n var _ref, _ref1, _ref2;\n if (callsite.functionName != null) {\n return callsite.functionName;\n }\n if (callsite.isToplevel()) {\n return (_ref = callsite.getFunctionName()) != null ? _ref : '';\n } else {\n if (callsite.isConstructor()) {\n return \"new \" + (callsite.getFunctionName());\n } else if (callsite.getMethodName() && !callsite.getFunctionName()) {\n return callsite.getMethodName();\n } else {\n return \"\" + (callsite.getTypeName()) + \".\" + ((_ref1 = (_ref2 = callsite.getMethodName()) != null ? _ref2 : callsite.getFunctionName()) != null ? _ref1 : '');\n }\n }\n };\n\n Deprecation.prototype.getLocationFromCallsite = function(callsite) {\n var column, fileName, line;\n if (callsite == null) {\n return \"unknown\";\n }\n if (callsite.location != null) {\n return callsite.location;\n }\n if (callsite.isNative()) {\n return \"native\";\n } else if (callsite.isEval()) {\n return \"eval at \" + (this.getLocationFromCallsite(callsite.getEvalOrigin()));\n } else {\n fileName = callsite.getFileName();\n line = callsite.getLineNumber();\n column = callsite.getColumnNumber();\n return \"\" + fileName + \":\" + line + \":\" + column;\n }\n };\n\n Deprecation.prototype.getFileNameFromCallSite = function(callsite) {\n var _ref;\n return (_ref = callsite.fileName) != null ? _ref : callsite.getFileName();\n };\n\n Deprecation.prototype.getOriginName = function() {\n return this.originName;\n };\n\n Deprecation.prototype.getMessage = function() {\n return this.message;\n };\n\n Deprecation.prototype.getStacks = function() {\n var location, parsedStack, parsedStacks, stack, _ref;\n parsedStacks = [];\n _ref = this.stacks;\n for (location in _ref) {\n stack = _ref[location];\n parsedStack = this.parseStack(stack);\n parsedStack.callCount = this.stackCallCounts[location];\n parsedStack.metadata = stack.metadata;\n parsedStacks.push(parsedStack);\n }\n return parsedStacks;\n };\n\n Deprecation.prototype.getStackCount = function() {\n return this.stackCount;\n };\n\n Deprecation.prototype.getCallCount = function() {\n return this.callCount;\n };\n\n Deprecation.prototype.addStack = function(stack, metadata) {\n var callerLocation, _base, _base1;\n if (this.originName == null) {\n this.originName = this.getFunctionNameFromCallsite(stack[0]);\n }\n if (this.fileName == null) {\n this.fileName = this.getFileNameFromCallSite(stack[0]);\n }\n if (this.lineNumber == null) {\n this.lineNumber = typeof (_base = stack[0]).getLineNumber === \"function\" ? _base.getLineNumber() : void 0;\n }\n this.callCount++;\n stack.metadata = metadata;\n callerLocation = this.getLocationFromCallsite(stack[1]);\n if (this.stacks[callerLocation] == null) {\n this.stacks[callerLocation] = stack;\n this.stackCount++;\n }\n if ((_base1 = this.stackCallCounts)[callerLocation] == null) {\n _base1[callerLocation] = 0;\n }\n return this.stackCallCounts[callerLocation]++;\n };\n\n Deprecation.prototype.parseStack = function(stack) {\n return stack.map((function(_this) {\n return function(callsite) {\n return {\n functionName: _this.getFunctionNameFromCallsite(callsite),\n location: _this.getLocationFromCallsite(callsite),\n fileName: _this.getFileNameFromCallSite(callsite)\n };\n };\n })(this));\n };\n\n Deprecation.prototype.serialize = function() {\n return {\n message: this.getMessage(),\n lineNumber: this.lineNumber,\n fileName: this.fileName,\n stacks: this.getStacks()\n };\n };\n\n return Deprecation;\n\n })();\n\n}).call(this);\n","\"use strict\";\n\nexports.Emitter = require(\"./emitter\");\nexports.Disposable = require(\"./disposable\");\nexports.CompositeDisposable = require(\"./composite-disposable\");","\"use strict\";\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar Disposable = require(\"./disposable\");\n\nvar CompositeDisposable = require(\"./composite-disposable\"); // Essential: Utility class to be used when implementing event-based APIs that\n// allows for handlers registered via `::on` to be invoked with calls to\n// `::emit`. Instances of this class are intended to be used internally by\n// classes that expose an event-based API.\n//\n// For example:\n//\n// ```js\n// class User {\n// constructor() {\n// this.emitter = new Emitter()\n// }\n//\n// onDidChangeName(callback) {\n// this.emitter.on('did-change-name', callback)\n// }\n//\n// setName(name) {\n// if (name !== this.name) {\n// this.name = name\n// this.emitter.emit('did-change-name', name)\n// }\n//\n// return this.name\n// }\n// }\n// ```\n\n\nvar Emitter =\n/*#__PURE__*/\nfunction () {\n _createClass(Emitter, null, [{\n key: \"onEventHandlerException\",\n value: function onEventHandlerException(exceptionHandler) {\n var _this = this;\n\n if (this.exceptionHandlers.length === 0) {\n this.dispatch = this.exceptionHandlingDispatch;\n }\n\n this.exceptionHandlers.push(exceptionHandler);\n return new Disposable(function () {\n _this.exceptionHandlers.splice(_this.exceptionHandlers.indexOf(exceptionHandler), 1);\n\n if (_this.exceptionHandlers.length === 0) {\n return _this.dispatch = _this.simpleDispatch;\n }\n });\n }\n }, {\n key: \"simpleDispatch\",\n value: function simpleDispatch(handler, value) {\n return handler(value);\n }\n }, {\n key: \"exceptionHandlingDispatch\",\n value: function exceptionHandlingDispatch(handler, value) {\n try {\n return handler(value);\n } catch (exception) {\n return this.exceptionHandlers.map(function (exceptionHandler) {\n return exceptionHandler(exception);\n });\n }\n }\n /*\n Section: Construction and Destruction\n */\n // Public: Construct an emitter.\n //\n // ```js\n // this.emitter = new Emitter()\n // ```\n\n }]);\n\n function Emitter() {\n _classCallCheck(this, Emitter);\n\n this.disposed = false;\n this.clear();\n } // Public: Clear out any existing subscribers.\n\n\n _createClass(Emitter, [{\n key: \"clear\",\n value: function clear() {\n if (this.subscriptions != null) {\n this.subscriptions.dispose();\n }\n\n this.subscriptions = new CompositeDisposable();\n this.handlersByEventName = {};\n } // Public: Unsubscribe all handlers.\n\n }, {\n key: \"dispose\",\n value: function dispose() {\n this.subscriptions.dispose();\n this.handlersByEventName = null;\n this.disposed = true;\n }\n /*\n Section: Event Subscription\n */\n // Public: Register the given handler function to be invoked whenever events by\n // the given name are emitted via {::emit}.\n //\n // * `eventName` {String} naming the event that you want to invoke the handler\n // when emitted.\n // * `handler` {Function} to invoke when {::emit} is called with the given\n // event name.\n //\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\n\n }, {\n key: \"on\",\n value: function on(eventName, handler, unshift) {\n var _this2 = this;\n\n if (unshift == null) {\n unshift = false;\n }\n\n if (this.disposed) {\n throw new Error(\"Emitter has been disposed\");\n }\n\n if (typeof handler !== \"function\") {\n throw new Error(\"Handler must be a function\");\n }\n\n var currentHandlers = this.handlersByEventName[eventName];\n\n if (currentHandlers) {\n if (unshift) {\n this.handlersByEventName[eventName].unshift(handler);\n } else {\n this.handlersByEventName[eventName].push(handler);\n }\n } else {\n this.handlersByEventName[eventName] = [handler];\n } // When the emitter is disposed, we want to dispose of all subscriptions.\n // However, we also need to stop tracking disposables when they're disposed\n // from outside, otherwise this class will hold references to all the\n // disposables it created (instead of just the active ones).\n\n\n var cleanup = new Disposable(function () {\n _this2.subscriptions.remove(cleanup);\n\n return _this2.off(eventName, handler);\n });\n this.subscriptions.add(cleanup);\n return cleanup;\n } // Public: Register the given handler function to be invoked the next time an\n // events with the given name is emitted via {::emit}.\n //\n // * `eventName` {String} naming the event that you want to invoke the handler\n // when emitted.\n // * `handler` {Function} to invoke when {::emit} is called with the given\n // event name.\n //\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\n\n }, {\n key: \"once\",\n value: function once(eventName, handler, unshift) {\n if (unshift == null) {\n unshift = false;\n }\n\n var wrapped = function wrapped(value) {\n disposable.dispose();\n return handler(value);\n };\n\n var disposable = this.on(eventName, wrapped, unshift);\n return disposable;\n } // Public: Register the given handler function to be invoked *before* all\n // other handlers existing at the time of subscription whenever events by the\n // given name are emitted via {::emit}.\n //\n // Use this method when you need to be the first to handle a given event. This\n // could be required when a data structure in a parent object needs to be\n // updated before third-party event handlers registered on a child object via a\n // public API are invoked. Your handler could itself be preempted via\n // subsequent calls to this method, but this can be controlled by keeping\n // methods based on `::preempt` private.\n //\n // * `eventName` {String} naming the event that you want to invoke the handler\n // when emitted.\n // * `handler` {Function} to invoke when {::emit} is called with the given\n // event name.\n //\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\n\n }, {\n key: \"preempt\",\n value: function preempt(eventName, handler) {\n return this.on(eventName, handler, true);\n } // Private: Used by the disposable.\n\n }, {\n key: \"off\",\n value: function off(eventName, handlerToRemove) {\n if (this.disposed) {\n return;\n }\n\n var handlers = this.handlersByEventName[eventName];\n\n if (handlers) {\n var handlerIndex = handlers.indexOf(handlerToRemove);\n\n if (handlerIndex >= 0) {\n handlers.splice(handlerIndex, 1);\n }\n\n if (handlers.length === 0) {\n delete this.handlersByEventName[eventName];\n }\n }\n }\n /*\n Section: Event Emission\n */\n // Public: Invoke handlers registered via {::on} for the given event name.\n //\n // * `eventName` The name of the event to emit. Handlers registered with {::on}\n // for the same name will be invoked.\n // * `value` Callbacks will be invoked with this value as an argument.\n\n }, {\n key: \"emit\",\n value: function emit(eventName, value) {\n var handlers = this.handlersByEventName && this.handlersByEventName[eventName];\n\n if (handlers) {\n // create a copy of `handlers` so that if any handler mutates `handlers`\n // (e.g. by calling `on` on this same emitter), this does not result in\n // changing the handlers being called during this same `emit`.\n var handlersCopy = handlers.slice();\n\n for (var i = 0; i < handlersCopy.length; i++) {\n this.constructor.dispatch(handlersCopy[i], value);\n }\n }\n }\n }, {\n key: \"emitAsync\",\n value: function emitAsync(eventName, value) {\n var _this3 = this;\n\n var handlers = this.handlersByEventName && this.handlersByEventName[eventName];\n\n if (handlers) {\n var promises = handlers.map(function (handler) {\n return _this3.constructor.dispatch(handler, value);\n });\n return Promise.all(promises).then(function () {});\n }\n\n return Promise.resolve();\n }\n }, {\n key: \"getEventNames\",\n value: function getEventNames() {\n return Object.keys(this.handlersByEventName);\n }\n }, {\n key: \"listenerCountForEventName\",\n value: function listenerCountForEventName(eventName) {\n var handlers = this.handlersByEventName[eventName];\n return handlers == null ? 0 : handlers.length;\n }\n }, {\n key: \"getTotalListenerCount\",\n value: function getTotalListenerCount() {\n var result = 0;\n\n var _arr = Object.keys(this.handlersByEventName);\n\n for (var _i = 0; _i < _arr.length; _i++) {\n var eventName = _arr[_i];\n result += this.handlersByEventName[eventName].length;\n }\n\n return result;\n }\n }]);\n\n return Emitter;\n}();\n\nEmitter.dispatch = Emitter.simpleDispatch;\nEmitter.exceptionHandlers = [];\nmodule.exports = Emitter;","\"use strict\";\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n// Essential: A handle to a resource that can be disposed. For example,\n// {Emitter::on} returns disposables representing subscriptions.\nmodule.exports =\n/*#__PURE__*/\nfunction () {\n _createClass(Disposable, null, [{\n key: \"isDisposable\",\n // Public: Ensure that `object` correctly implements the `Disposable`\n // contract.\n //\n // * `object` An {Object} you want to perform the check against.\n //\n // Returns a {Boolean} indicating whether `object` is a valid `Disposable`.\n value: function isDisposable(object) {\n return typeof (object != null ? object.dispose : undefined) === \"function\";\n }\n /*\n Section: Construction and Destruction\n */\n // Public: Construct a Disposable\n //\n // * `disposalAction` A {Function} to call when {::dispose} is called for the\n // first time.\n\n }]);\n\n function Disposable(disposalAction) {\n _classCallCheck(this, Disposable);\n\n this.disposed = false;\n this.disposalAction = disposalAction;\n } // Public: Perform the disposal action, indicating that the resource associated\n // with this disposable is no longer needed.\n //\n // You can call this method more than once, but the disposal action will only\n // be performed the first time.\n\n\n _createClass(Disposable, [{\n key: \"dispose\",\n value: function dispose() {\n if (!this.disposed) {\n this.disposed = true;\n\n if (typeof this.disposalAction === \"function\") {\n this.disposalAction();\n }\n\n this.disposalAction = null;\n }\n }\n }]);\n\n return Disposable;\n}();","\"use strict\";\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar CompositeDisposable;\nvar Disposable; // Essential: An object that aggregates multiple {Disposable} instances together\n// into a single disposable, so they can all be disposed as a group.\n//\n// These are very useful when subscribing to multiple events.\n//\n// ## Examples\n//\n// ```js\n// const {CompositeDisposable} = require('atom')\n//\n// class Something {\n// constructor() {\n// this.disposables = new CompositeDisposable()\n// const editor = atom.workspace.getActiveTextEditor()\n// this.disposables.add(editor.onDidChange(() => {})\n// this.disposables.add(editor.onDidChangePath(() => {})\n// }\n//\n// destroy() {\n// this.disposables.dispose();\n// }\n// }\n// ```\n\nmodule.exports =\n/*#__PURE__*/\nfunction () {\n /*\n Section: Construction and Destruction\n */\n // Public: Construct an instance, optionally with one or more disposables\n function CompositeDisposable() {\n _classCallCheck(this, CompositeDisposable);\n\n this.disposed = false;\n this.disposables = new Set();\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = arguments[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var disposable = _step.value;\n this.add(disposable);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n } // Public: Dispose all disposables added to this composite disposable.\n //\n // If this object has already been disposed, this method has no effect.\n\n\n _createClass(CompositeDisposable, [{\n key: \"dispose\",\n value: function dispose() {\n if (!this.disposed) {\n this.disposed = true;\n this.disposables.forEach(function (disposable) {\n return disposable.dispose();\n });\n this.disposables = null;\n }\n }\n /*\n Section: Managing Disposables\n */\n // Public: Add disposables to be disposed when the composite is disposed.\n //\n // If this object has already been disposed, this method has no effect.\n //\n // * `...disposables` {Disposable} instances or any objects with `.dispose()`\n // methods.\n\n }, {\n key: \"add\",\n value: function add() {\n if (!this.disposed) {\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n for (var _iterator2 = arguments[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var disposable = _step2.value;\n assertDisposable(disposable);\n this.disposables.add(disposable);\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return != null) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n }\n } // Public: Remove a previously added disposable.\n //\n // * `disposable` {Disposable} instance or any object with a `.dispose()`\n // method.\n\n }, {\n key: \"remove\",\n value: function remove(disposable) {\n if (!this.disposed) {\n this.disposables.delete(disposable);\n }\n } // Public: Alias to {CompositeDisposable::remove}\n\n }, {\n key: \"delete\",\n value: function _delete(disposable) {\n this.remove(disposable);\n } // Public: Clear all disposables. They will not be disposed by the next call\n // to dispose.\n\n }, {\n key: \"clear\",\n value: function clear() {\n if (!this.disposed) {\n this.disposables.clear();\n }\n }\n }]);\n\n return CompositeDisposable;\n}();\n\nfunction assertDisposable(disposable) {\n if (Disposable == null) {\n Disposable = require(\"./disposable\");\n }\n\n if (!Disposable.isDisposable(disposable)) {\n throw new TypeError(\"Arguments to CompositeDisposable.add must have a .dispose() method\");\n }\n}","// Generated by CoffeeScript 2.5.1\n(function() {\n var Ancestors, Mixin;\n\n Mixin = require('mixto');\n\n // Public\n module.exports = Ancestors = class Ancestors extends Mixin {\n /* Public */\n static parents(node, selector = '*') {\n var parents;\n parents = [];\n this.eachParent(node, function(parent) {\n if (typeof parent.matches === \"function\" ? parent.matches(selector) : void 0) {\n return parents.push(parent);\n }\n });\n return parents;\n }\n\n static eachParent(node, block) {\n var parent, results;\n parent = node.parentNode;\n if (parent != null) {\n block(parent);\n }\n results = [];\n while (parent = parent.parentNode) {\n if (parent != null) {\n results.push(block(parent));\n } else {\n results.push(void 0);\n }\n }\n return results;\n }\n\n parents(selector = '*') {\n return Ancestors.parents(this, selector);\n }\n\n queryParentSelectorAll(selector) {\n if (selector == null) {\n throw new Error('::queryParentSelectorAll requires a valid selector as argument');\n }\n return this.parents(selector);\n }\n\n queryParentSelector(selector) {\n if (selector == null) {\n throw new Error('::queryParentSelector requires a valid selector as argument');\n }\n return this.queryParentSelectorAll(selector)[0];\n }\n\n eachParent(block) {\n return Ancestors.eachParent(this, block);\n }\n\n };\n\n}).call(this);\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5jZXN0b3JzLmpzIiwic291cmNlUm9vdCI6Ii4uLy4uIiwic291cmNlcyI6WyJsaWIvbWl4aW5zL2FuY2VzdG9ycy5jb2ZmZWUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQUEsTUFBQSxTQUFBLEVBQUE7O0VBQUEsS0FBQSxHQUFRLE9BQUEsQ0FBUSxPQUFSLEVBQVI7OztFQUdBLE1BQU0sQ0FBQyxPQUFQLEdBQ00sWUFBTixNQUFBLFVBQUEsUUFBd0IsTUFBeEIsQ0FBQTs7SUFJWSxPQUFULE9BQVMsQ0FBQyxJQUFELEVBQU8sV0FBUyxHQUFoQixDQUFBO0FBQ1osVUFBQTtNQUFJLE9BQUEsR0FBVTtNQUNWLElBQUMsQ0FBQSxVQUFELENBQVksSUFBWixFQUFrQixRQUFBLENBQUMsTUFBRCxDQUFBO1FBQVksMkNBQXdCLE1BQU0sQ0FBQyxRQUFTLGtCQUF4QztpQkFBQSxPQUFPLENBQUMsSUFBUixDQUFhLE1BQWIsRUFBQTs7TUFBWixDQUFsQjthQUNBO0lBSFE7O0lBS0csT0FBWixVQUFZLENBQUMsSUFBRCxFQUFPLEtBQVAsQ0FBQTtBQUNmLFVBQUEsTUFBQSxFQUFBO01BQUksTUFBQSxHQUFTLElBQUksQ0FBQztNQUVkLElBQWlCLGNBQWpCO1FBQUEsS0FBQSxDQUFNLE1BQU4sRUFBQTs7QUFDQTthQUFNLE1BQUEsR0FBUyxNQUFNLENBQUMsVUFBdEI7UUFDRSxJQUFpQixjQUFqQjt1QkFBQSxLQUFBLENBQU0sTUFBTixHQUFBO1NBQUEsTUFBQTsrQkFBQTs7TUFERixDQUFBOztJQUpXOztJQU9iLE9BQVMsQ0FBQyxXQUFTLEdBQVY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YXJlbnROb2RlXG4gICAgICBibG9jayhwYXJlbnQpIGlmIHBhcmVudD9cblxuICBwYXJlbnRzOiAoc2VsZWN0b3I9JyonKSAtPiBBbmNlc3RvcnMucGFyZW50cyh0aGlzLCBzZWxlY3RvcilcblxuICBxdWVyeVBhcmVudFNlbGVjdG9yQWxsOiAoc2VsZWN0b3IpIC0+XG4gICAgdW5sZXNzIHNlbGVjdG9yP1xuICAgICAgdGhyb3cgbmV3IEVycm9yICc6OnF1ZXJ5UGFyZW50U2VsZWN0b3JBbGwgcmVxdWlyZXMgYSB2YWxpZCBzZWxlY3RvciBhcyBhcmd1bWVudCdcbiAgICBAcGFyZW50cyhzZWxlY3RvcilcblxuICBxdWVyeVBhcmVudFNlbGVjdG9yOiAoc2VsZWN0b3IpIC0+XG4gICAgdW5sZXNzIHNlbGVjdG9yP1xuICAgICAgdGhyb3cgbmV3IEVycm9yICc6OnF1ZXJ5UGFyZW50U2VsZWN0b3IgcmVxdWlyZXMgYSB2YWxpZCBzZWxlY3RvciBhcyBhcmd1bWVudCdcbiAgICBAcXVlcnlQYXJlbnRTZWxlY3RvckFsbChzZWxlY3RvcilbMF1cblxuICBlYWNoUGFyZW50OiAoYmxvY2spIC0+IEFuY2VzdG9ycy5lYWNoUGFyZW50KHRoaXMsIGJsb2NrKVxuIl19\n//# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/mixins/ancestors.coffee","(function() {\n var ExcludedClassProperties, ExcludedPrototypeProperties, Mixin, name;\n\n module.exports = Mixin = (function() {\n Mixin.includeInto = function(constructor) {\n var name, value, _ref;\n this.extend(constructor.prototype);\n for (name in this) {\n value = this[name];\n if (ExcludedClassProperties.indexOf(name) === -1) {\n if (!constructor.hasOwnProperty(name)) {\n constructor[name] = value;\n }\n }\n }\n return (_ref = this.included) != null ? _ref.call(constructor) : void 0;\n };\n\n Mixin.extend = function(object) {\n var name, _i, _len, _ref, _ref1;\n _ref = Object.getOwnPropertyNames(this.prototype);\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n name = _ref[_i];\n if (ExcludedPrototypeProperties.indexOf(name) === -1) {\n if (!object.hasOwnProperty(name)) {\n object[name] = this.prototype[name];\n }\n }\n }\n return (_ref1 = this.prototype.extended) != null ? _ref1.call(object) : void 0;\n };\n\n function Mixin() {\n if (typeof this.extended === \"function\") {\n this.extended();\n }\n }\n\n return Mixin;\n\n })();\n\n ExcludedClassProperties = ['__super__'];\n\n for (name in Mixin) {\n ExcludedClassProperties.push(name);\n }\n\n ExcludedPrototypeProperties = ['constructor', 'extended'];\n\n}).call(this);\n","// Generated by CoffeeScript 2.5.1\n(function() {\n var Disposable, DisposableEvents, Mixin;\n\n Mixin = require('mixto');\n\n ({Disposable} = require('atom'));\n\n module.exports = DisposableEvents = class DisposableEvents extends Mixin {\n addDisposableEventListener(object, event, listener, options) {\n object.addEventListener(event, listener, options);\n return new Disposable(function() {\n return object.removeEventListener(event, listener);\n });\n }\n\n };\n\n}).call(this);\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlzcG9zYWJsZS1ldmVudHMuanMiLCJzb3VyY2VSb290IjoiLi4vLi4iLCJzb3VyY2VzIjpbImxpYi9taXhpbnMvZGlzcG9zYWJsZS1ldmVudHMuY29mZmVlIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUFBLE1BQUEsVUFBQSxFQUFBLGdCQUFBLEVBQUE7O0VBQUEsS0FBQSxHQUFRLE9BQUEsQ0FBUSxPQUFSOztFQUNSLENBQUEsQ0FBQyxVQUFELENBQUEsR0FBZSxPQUFBLENBQVEsTUFBUixDQUFmOztFQUVBLE1BQU0sQ0FBQyxPQUFQLEdBQ00sbUJBQU4sTUFBQSxpQkFBQSxRQUErQixNQUEvQjtJQUNFLDBCQUE0QixDQUFDLE1BQUQsRUFBUyxLQUFULEVBQWdCLFFBQWhCLEVBQTBCLE9BQTFCLENBQUE7TUFDMUIsTUFBTSxDQUFDLGdCQUFQLENBQXdCLEtBQXhCLEVBQStCLFFBQS9CLEVBQXlDLE9BQXpDO2FBQ0EsSUFBSSxVQUFKLENBQWUsUUFBQSxDQUFBLENBQUE7ZUFBRyxNQUFNLENBQUMsbUJBQVAsQ0FBMkIsS0FBM0IsRUFBa0MsUUFBbEM7TUFBSCxDQUFmO0lBRjBCOztFQUQ5QjtBQUpBIiwic291cmNlc0NvbnRlbnQiOlsiTWl4aW4gPSByZXF1aXJlICdtaXh0bydcbntEaXNwb3NhYmxlfSA9IHJlcXVpcmUgJ2F0b20nXG5cbm1vZHVsZS5leHBvcnRzID1cbmNsYXNzIERpc3Bvc2FibGVFdmVudHMgZXh0ZW5kcyBNaXhpblxuICBhZGREaXNwb3NhYmxlRXZlbnRMaXN0ZW5lcjogKG9iamVjdCwgZXZlbnQsIGxpc3RlbmVyLCBvcHRpb25zKSAtPlxuICAgIG9iamVjdC5hZGRFdmVudExpc3RlbmVyIGV2ZW50LCBsaXN0ZW5lciwgb3B0aW9uc1xuICAgIG5ldyBEaXNwb3NhYmxlIC0+IG9iamVjdC5yZW1vdmVFdmVudExpc3RlbmVyIGV2ZW50LCBsaXN0ZW5lclxuIl19\n//# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/mixins/disposable-events.coffee","// Generated by CoffeeScript 2.5.1\n(function() {\n var CompositeDisposable, Disposable, DisposableEvents, EventsDelegation, Mixin, NO_SELECTOR, eachPair;\n\n Mixin = require('mixto');\n\n DisposableEvents = require('./disposable-events');\n\n ({Disposable, CompositeDisposable} = require('atom'));\n\n eachPair = function(object, callback) {\n var k, results, v;\n results = [];\n for (k in object) {\n v = object[k];\n results.push(callback(k, v));\n }\n return results;\n };\n\n NO_SELECTOR = '__NONE__';\n\n module.exports = EventsDelegation = (function() {\n class EventsDelegation extends Mixin {\n subscribeTo(object, selector, events, options) {\n var disposablesForObject, eventsForObject;\n if (!(object instanceof HTMLElement)) {\n [object, selector, events, options] = [this, object, selector, events];\n }\n if (typeof selector === 'object') {\n [events, selector, options] = [selector, NO_SELECTOR, events];\n }\n if (this.eventsMap == null) {\n this.eventsMap = new WeakMap();\n }\n if (this.disposablesMap == null) {\n this.disposablesMap = new WeakMap();\n }\n if (this.eventsMap.get(object) == null) {\n this.eventsMap.set(object, {});\n }\n if (this.disposablesMap.get(object) == null) {\n this.disposablesMap.set(object, {});\n }\n eventsForObject = this.eventsMap.get(object);\n disposablesForObject = this.disposablesMap.get(object);\n eachPair(events, (event, callback) => {\n if (eventsForObject[event] == null) {\n eventsForObject[event] = {};\n disposablesForObject[event] = this.createEventListener(object, event, options);\n }\n return eventsForObject[event][selector] = callback;\n });\n return new Disposable(() => {\n return this.unsubscribeFrom(object, selector, events);\n });\n }\n\n unsubscribeFrom(object, selector, events) {\n var disposablesForObject, event, eventsForObject;\n if (!(object instanceof HTMLElement)) {\n [object, selector, events] = [this, object, selector];\n }\n if (typeof selector === 'object') {\n [events, selector] = [selector, NO_SELECTOR];\n }\n if (!(eventsForObject = this.eventsMap.get(object))) {\n return;\n }\n for (event in events) {\n delete eventsForObject[event][selector];\n if (Object.keys(eventsForObject[event]).length === 0) {\n disposablesForObject = this.disposablesMap.get(object);\n disposablesForObject[event].dispose();\n delete disposablesForObject[event];\n delete eventsForObject[event];\n }\n }\n if (Object.keys(eventsForObject).length === 0) {\n this.eventsMap.delete(object);\n return this.disposablesMap.delete(object);\n }\n }\n\n createEventListener(object, event, options) {\n var listener;\n listener = (e) => {\n var eventsForObject, ref, target;\n if (!(eventsForObject = (ref = this.eventsMap.get(object)) != null ? ref[event] : void 0)) {\n return;\n }\n ({target} = e);\n this.decorateEvent(e);\n this.eachSelectorFromTarget(e, target, eventsForObject);\n if (!e.isPropagationStopped) {\n if (typeof eventsForObject[NO_SELECTOR] === \"function\") {\n eventsForObject[NO_SELECTOR](e);\n }\n }\n return true;\n };\n return this.addDisposableEventListener(object, event, listener, options);\n }\n\n eachSelectorFromTarget(event, target, eventsForObject) {\n return this.nodeAndItsAncestors(target, (node) => {\n if (event.isPropagationStopped) {\n return;\n }\n return this.eachSelector(eventsForObject, (selector, callback) => {\n var matched;\n matched = this.targetMatch(node, selector);\n if (event.isImmediatePropagationStopped || !matched) {\n return;\n }\n return callback(event);\n });\n });\n }\n\n eachSelector(eventsForObject, callback) {\n var i, key, keys, len;\n keys = Object.keys(eventsForObject);\n if (keys.indexOf(NO_SELECTOR) !== -1) {\n keys.splice(keys.indexOf(NO_SELECTOR), 1);\n }\n keys.sort(function(a, b) {\n return b.split(' ').length - a.split(' ').length;\n });\n for (i = 0, len = keys.length; i < len; i++) {\n key = keys[i];\n if (callback(key, eventsForObject[key])) {\n return true;\n }\n }\n return false;\n }\n\n targetMatch(target, selector) {\n var parent;\n if (target.matches(selector)) {\n return true;\n }\n parent = target.parentNode;\n while ((parent != null) && (parent.matches != null)) {\n if (parent.matches(selector)) {\n return true;\n }\n parent = parent.parentNode;\n }\n return false;\n }\n\n nodeAndItsAncestors(node, callback) {\n var parent, results;\n parent = node.parentNode;\n callback(node);\n results = [];\n while ((parent != null) && (parent.matches != null)) {\n callback(parent);\n results.push(parent = parent.parentNode);\n }\n return results;\n }\n\n decorateEvent(e) {\n var overriddenStop, overriddenStopImmediate;\n overriddenStop = Event.prototype.stopPropagation;\n e.stopPropagation = function() {\n this.isPropagationStopped = true;\n return overriddenStop.apply(this, arguments);\n };\n overriddenStopImmediate = Event.prototype.stopImmediatePropagation;\n return e.stopImmediatePropagation = function() {\n this.isImmediatePropagationStopped = true;\n return overriddenStopImmediate.apply(this, arguments);\n };\n }\n\n };\n\n DisposableEvents.includeInto(EventsDelegation);\n\n return EventsDelegation;\n\n }).call(this);\n\n}).call(this);\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnRzLWRlbGVnYXRpb24uanMiLCJzb3VyY2VSb290IjoiLi4vLi4iLCJzb3VyY2VzIjpbImxpYi9taXhpbnMvZXZlbnRzLWRlbGVnYXRpb24uY29mZmVlI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xiYWNrKSAtPlxuICAgIHBhcmVudCA9IG5vZGUucGFyZW50Tm9kZVxuXG4gICAgY2FsbGJhY2sobm9kZSlcbiAgICB3aGlsZSBwYXJlbnQ/IGFuZCBwYXJlbnQubWF0Y2hlcz9cbiAgICAgIGNhbGxiYWNrKHBhcmVudClcbiAgICAgIHBhcmVudCA9IHBhcmVudC5wYXJlbnROb2RlXG5cbiAgZGVjb3JhdGVFdmVudDogKGUpIC0+XG4gICAgb3ZlcnJpZGRlblN0b3AgPSAgRXZlbnQ6OnN0b3BQcm9wYWdhdGlvblxuICAgIGUuc3RvcFByb3BhZ2F0aW9uID0gLT5cbiAgICAgIEBpc1Byb3BhZ2F0aW9uU3RvcHBlZCA9IHRydWVcbiAgICAgIG92ZXJyaWRkZW5TdG9wLmFwcGx5KHRoaXMsIGFyZ3VtZW50cylcblxuICAgIG92ZXJyaWRkZW5TdG9wSW1tZWRpYXRlID0gIEV2ZW50OjpzdG9wSW1tZWRpYXRlUHJvcGFnYXRpb25cbiAgICBlLnN0b3BJbW1lZGlhdGVQcm9wYWdhdGlvbiA9IC0+XG4gICAgICBAaXNJbW1lZGlhdGVQcm9wYWdhdGlvblN0b3BwZWQgPSB0cnVlXG4gICAgICBvdmVycmlkZGVuU3RvcEltbWVkaWF0ZS5hcHBseSh0aGlzLCBhcmd1bWVudHMpXG4iXX0=\n//# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/mixins/events-delegation.coffee","// Generated by CoffeeScript 2.5.1\n(function() {\n var BabelSpacePenDSL, Builder, Events, Mixin, SelfClosingTags, SpacePenDSL, Tags, Template;\n\n Mixin = require('mixto');\n\n Tags = 'a abbr address article aside audio b bdi bdo blockquote body button canvas caption cite code colgroup datalist dd del details dfn dialog div dl dt em fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header html i iframe ins kbd label legend li main map mark menu meter nav noscript object ol optgroup option output p pre progress q rp rt ruby s samp script section select small span strong style sub summary sup table tbody td textarea tfoot th thead time title tr u ul var video area base br col command embed hr img input keygen link meta param source track wbr'.split(/\\s+/);\n\n SelfClosingTags = {};\n\n 'area base br col command embed hr img input keygen link meta param source track wbr'.split(/\\s+/).forEach(function(tag) {\n return SelfClosingTags[tag] = true;\n });\n\n Events = 'blur change click dblclick error focus input keydown keypress keyup load mousedown mousemove mouseout mouseover mouseup resize scroll select submit unload'.split(/\\s+/);\n\n BabelSpacePenDSL = class BabelSpacePenDSL extends Mixin {\n buildContent() {\n if (this.constructor.content != null) {\n return SpacePenDSL.buildContent(this, this.constructor.content);\n }\n }\n\n };\n\n module.exports = SpacePenDSL = (function() {\n class SpacePenDSL extends Mixin {\n static includeInto(klass) {\n super.includeInto(klass);\n Object.defineProperty(klass, 'content', {\n enumerable: false,\n get: function() {\n return this.prototype.__content__;\n },\n set: function(value) {\n return this.prototype.__content__ = value;\n }\n });\n Object.defineProperty(klass.prototype, 'createdCallback', {\n enumerable: true,\n get: function() {\n return this.__create__;\n },\n set: function(value) {\n return this.__createdCallback__ = value;\n }\n });\n Object.defineProperty(klass.prototype, '__create__', {\n enumerable: true,\n value: function() {\n if (this.__content__ != null) {\n SpacePenDSL.buildContent(this, this.__content__);\n }\n if (this.__createdCallback__ != null) {\n return this.__createdCallback__();\n }\n }\n });\n return klass.useShadowRoot = function() {\n return klass.prototype.__useShadowRoot__ = true;\n };\n }\n\n static buildContent(element, content) {\n var html, root, template;\n template = new Template();\n content.call(template);\n [html] = template.buildHtml();\n root = element.__useShadowRoot__ ? root = element.shadowRoot = element.createShadowRoot() : root = element;\n root.innerHTML = html;\n return this.wireOutlets(element, root);\n }\n\n static wireOutlets(view, root) {\n var element, i, len, outlet, ref;\n ref = root.querySelectorAll('[outlet]');\n for (i = 0, len = ref.length; i < len; i++) {\n element = ref[i];\n outlet = element.getAttribute('outlet');\n view[outlet] = element;\n element.removeAttribute('outlet');\n }\n return void 0;\n }\n\n };\n\n SpacePenDSL.Babel = BabelSpacePenDSL;\n\n return SpacePenDSL;\n\n }).call(this);\n\n Template = (function() {\n class Template {\n constructor() {\n this.currentBuilder = new Builder();\n }\n\n subview(name, view) {\n return this.currentBuilder.subview(name, view);\n }\n\n text(string) {\n return this.currentBuilder.text(string);\n }\n\n tag(tagName, ...args) {\n return this.currentBuilder.tag(tagName, ...args);\n }\n\n raw(string) {\n return this.currentBuilder.raw(string);\n }\n\n buildHtml() {\n return this.currentBuilder.buildHtml();\n }\n\n };\n\n Tags.forEach(function(tagName) {\n return Template.prototype[tagName] = function(...args) {\n return this.currentBuilder.tag(tagName, ...args);\n };\n });\n\n return Template;\n\n }).call(this);\n\n Builder = class Builder {\n constructor() {\n this.document = [];\n this.postProcessingSteps = [];\n }\n\n buildHtml() {\n return [this.document.join(''), this.postProcessingSteps];\n }\n\n tag(name, ...args) {\n var options;\n options = this.extractOptions(args);\n this.openTag(name, options.attributes);\n if (SelfClosingTags.hasOwnProperty(name)) {\n if ((options.text != null) || (options.content != null)) {\n throw new Error(`Self-closing tag ${name} cannot have text or content`);\n }\n } else {\n if (typeof options.content === \"function\") {\n options.content();\n }\n if (options.text) {\n this.text(options.text);\n }\n return this.closeTag(name);\n }\n }\n\n openTag(name, attributes) {\n var attributeName, attributePairs, attributesString, value;\n if (this.document.length === 0) {\n if (attributes == null) {\n attributes = {};\n }\n }\n attributePairs = (function() {\n var results;\n results = [];\n for (attributeName in attributes) {\n value = attributes[attributeName];\n results.push(`${attributeName}=\\\"${value}\\\"`);\n }\n return results;\n })();\n attributesString = attributePairs.length ? \" \" + attributePairs.join(\" \") : \"\";\n return this.document.push(`<${name}${attributesString}>`);\n }\n\n closeTag(name) {\n return this.document.push(``);\n }\n\n text(string) {\n var escapedString;\n escapedString = string.replace(/&/g, '&').replace(/\"/g, '"').replace(/'/g, ''').replace(//g, '>');\n return this.document.push(escapedString);\n }\n\n raw(string) {\n return this.document.push(string);\n }\n\n subview(outletName, subview) {\n var subviewId;\n subviewId = `subview-${++idCounter}`;\n this.tag('div', {\n id: subviewId\n });\n return this.postProcessingSteps.push(function(view) {\n view[outletName] = subview;\n subview.parentView = view;\n return view.find(`div#${subviewId}`).replaceWith(subview);\n });\n }\n\n extractOptions(args) {\n var arg, i, len, options;\n options = {};\n for (i = 0, len = args.length; i < len; i++) {\n arg = args[i];\n switch (typeof arg) {\n case 'function':\n options.content = arg;\n break;\n case 'string':\n case 'number':\n options.text = arg.toString();\n break;\n default:\n options.attributes = arg;\n }\n }\n return options;\n }\n\n };\n\n}).call(this);\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BhY2UtcGVuLWRzbC5qcyIsInNvdXJjZVJvb3QiOiIuLi8uLiIsInNvdXJjZXMiOlsibGliL21peGlucy9zcGFjZS1wZW4tZHNsLmNvZmZlZSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7QUFBQSxNQUFBLGdCQUFBLEVBQUEsT0FBQSxFQUFBLE1BQUEsRUFBQSxLQUFBLEVBQUEsZUFBQSxFQUFBLFdBQUEsRUFBQSxJQUFBLEVBQUE7O0VBQUEsS0FBQSxHQUFRLE9BQUEsQ0FBUSxPQUFSOztFQUVSLElBQUEsR0FDRSxra0JBTytDLENBQUMsS0FQaEQsQ0FPc0QsS0FQdEQ7O0VBU0YsZUFBQSxHQUFrQixDQUFBOztFQUNsQixxRkFDa0IsQ0FBQyxLQURuQixDQUN5QixLQUR6QixDQUMrQixDQUFDLE9BRGhDLENBQ3dDLFFBQUEsQ0FBQyxHQUFELENBQUE7V0FBUyxlQUFlLENBQUMsR0FBRCxDQUFmLEdBQXVCO0VBQWhDLENBRHhDOztFQUdBLE1BQUEsR0FDRSw0SkFFNEMsQ0FBQyxLQUY3QyxDQUVtRCxLQUZuRDs7RUFJSSxtQkFBTixNQUFBLGlCQUFBLFFBQStCLE1BQS9CO0lBQ0UsWUFBYyxDQUFBLENBQUE7TUFDWixJQUF3RCxnQ0FBeEQ7ZUFBQSxXQUFXLENBQUMsWUFBWixDQUF5QixJQUF6QixFQUErQix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K2lkQ291bnRlcn1cIlxuICAgIEB0YWcgJ2RpdicsIGlkOiBzdWJ2aWV3SWRcbiAgICBAcG9zdFByb2Nlc3NpbmdTdGVwcy5wdXNoICh2aWV3KSAtPlxuICAgICAgdmlld1tvdXRsZXROYW1lXSA9IHN1YnZpZXdcbiAgICAgIHN1YnZpZXcucGFyZW50VmlldyA9IHZpZXdcbiAgICAgIHZpZXcuZmluZChcImRpdiMje3N1YnZpZXdJZH1cIikucmVwbGFjZVdpdGgoc3VidmlldylcblxuICBleHRyYWN0T3B0aW9uczogKGFyZ3MpIC0+XG4gICAgb3B0aW9ucyA9IHt9XG4gICAgZm9yIGFyZyBpbiBhcmdzXG4gICAgICBzd2l0Y2ggdHlwZW9mKGFyZylcbiAgICAgICAgd2hlbiAnZnVuY3Rpb24nXG4gICAgICAgICAgb3B0aW9ucy5jb250ZW50ID0gYXJnXG4gICAgICAgIHdoZW4gJ3N0cmluZycsICdudW1iZXInXG4gICAgICAgICAgb3B0aW9ucy50ZXh0ID0gYXJnLnRvU3RyaW5nKClcbiAgICAgICAgZWxzZVxuICAgICAgICAgIG9wdGlvbnMuYXR0cmlidXRlcyA9IGFyZ1xuICAgIG9wdGlvbnNcbiJdfQ==\n//# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/mixins/space-pen-dsl.coffee","const regexEscape = /[$()*+./?[\\\\\\]^{|}-]/g\nexport function escapeRegExp(string) {\n if (string) {\n return string.replace(regexEscape, \"\\\\$&\")\n } else {\n return \"\"\n }\n}\n\nconst regexDaherize = /([A-Z])|(_)/g\nexport function dasherize(string) {\n if (!string) {\n return \"\"\n }\n\n string = `${string[0].toLowerCase()}${string.slice(1)}`\n return string.replace(regexDaherize, function (m, letter) {\n if (letter) {\n return `-${letter.toLowerCase()}`\n } else {\n return \"-\"\n }\n })\n}\n\nexport function debounce(callback, wait) {\n let timeoutId\n return (...args) => {\n if (timeoutId !== undefined) {\n clearTimeout(timeoutId)\n }\n timeoutId = setTimeout(() => {\n callback(...args)\n }, wait)\n }\n}\n","\"use strict\"\n\n/**\n * Generates a decorator function to convert a class into a custom element through the `registerOrUpdateElement` method\n * from `atom-utils-plus`.\n *\n * The decorator will take care to return the generated element class so that you can just export it directly as\n * demonstrated below.\n *\n * As supported by the `registerOrUpdateElement` method, static member will be available on the new class.\n *\n * **Note: As there's some limitations when modifying the prototype of a custom element, if you need to inject element\n * callbacks (like `createdCallback`) through a mixin, the mixins should be included before converting the class as a\n * custom element. You'll be able to achieve that by placing the `include` decorator after the `element` one as shown in\n * the second example.**\n *\n * @param {string} elementName The node name of the element to register\n * @returns {void}\n * @element('dummy-element-name') export default class SomeClass {\n * // ...\n * }\n * @element('dummy-element-with-mixin')\n * @include(SomeMixin) export default class SomeClass {\n * // ...\n * }\n */\nexport default function element(cls, elementName) {\n if (!window.customElements.get(elementName)) {\n window.customElements.define(elementName, cls)\n }\n}\n","module.exports = (Promise.resolve(__parcel__require__(\"./\" + \"minimap-plugin-generator-element.a1e4649c.js\"))).then(() => parcelRequire('1Ozz1'));","\"use strict\"\n\nimport { Emitter, CompositeDisposable } from \"atom\"\nimport { createMinimapElement } from \"./minimap-element\"\nimport Minimap from \"./minimap\"\nimport * as config from \"./config.json\"\nimport * as PluginManagement from \"./plugin-management\"\nimport { treeSitterWarning } from \"./performance-monitor\"\nimport { StyleReader } from \"atom-ide-base/commons-ui/dom-style-reader\"\nimport { debounce } from \"./deps/underscore-plus\"\n\nexport * as config from \"./config.json\"\nexport * from \"./plugin-management\"\nexport { default as Minimap } from \"./minimap\"\nexport { createMinimapElement } from \"./minimap-element\"\n\n/**\n * The `Minimap` package provides an eagle-eye view of text buffers.\n *\n * It also provides API for plugin packages that want to interact with the minimap and be available to the user through\n * the minimap settings.\n */\n\n/**\n * The activation state of the package.\n *\n * @type {boolean}\n * @access private\n */\nlet active = false\n/**\n * The toggle state of the package.\n *\n * @type {boolean}\n * @access private\n */\nlet toggled = false\n/**\n * The `Map` where Minimap instances are stored with the text editor they target as key.\n *\n * @type {Map}\n * @access private\n */\nexport let editorsMinimaps = null\n/**\n * The composite disposable that stores the package's subscriptions.\n *\n * @type {CompositeDisposable}\n * @access private\n */\nlet subscriptions = null\n/**\n * The disposable that stores the package's commands subscription.\n *\n * @type {Disposable}\n * @access private\n */\nlet subscriptionsOfCommands = null\n\n/**\n * The package's events emitter.\n *\n * @type {Emitter}\n * @access private\n */\nexport const emitter = new Emitter()\n\n/** StyleReader cache used for storing token colors */\nexport let styleReader = null\n\n/** Activates the minimap package. */\nexport function activate() {\n if (active) {\n return\n }\n\n subscriptionsOfCommands = atom.commands.add(\"atom-workspace\", {\n \"minimap:toggle\": () => {\n toggle()\n },\n \"minimap:generate-coffee-plugin\": async () => {\n await generatePlugin(\"coffee\")\n },\n \"minimap:generate-javascript-plugin\": async () => {\n await generatePlugin(\"javascript\")\n },\n \"minimap:generate-babel-plugin\": async () => {\n await generatePlugin(\"babel\")\n },\n })\n\n editorsMinimaps = new Map()\n styleReader = new StyleReader()\n\n subscriptions = new CompositeDisposable()\n active = true\n\n if (atom.config.get(\"minimap.autoToggle\")) {\n toggle()\n }\n}\n\n/**\n * Returns a {MinimapElement} for the passed-in model if it's a {Minimap}.\n *\n * @param {Minimap} model The model for which returning a view\n * @returns {MinimapElement}\n */\nexport function minimapViewProvider(model) {\n if (model instanceof Minimap) {\n let element = model.getMinimapElement()\n if (!element) {\n element = createMinimapElement()\n element.setModel(model)\n }\n return element\n }\n}\n\n/** Deactivates the minimap package. */\nexport function deactivate() {\n if (!active) {\n return\n }\n\n PluginManagement.deactivateAllPlugins()\n\n if (editorsMinimaps) {\n editorsMinimaps.forEach((value) => {\n value.destroy()\n })\n editorsMinimaps.clear()\n }\n\n subscriptions.dispose()\n subscriptionsOfCommands.dispose()\n styleReader.invalidateDOMStylesCache()\n toggled = false\n active = false\n}\n\nexport function getConfigSchema() {\n return config || atom.packages.getLoadedPackage(\"minimap\").metadata.configSchema\n}\n\n/** Toggles the minimap display. */\nexport function toggle() {\n if (!active) {\n return\n }\n\n if (toggled) {\n toggled = false\n\n if (editorsMinimaps) {\n editorsMinimaps.forEach((minimap) => {\n minimap.destroy()\n })\n editorsMinimaps.clear()\n }\n subscriptions.dispose()\n\n // HACK: this hack forces rerendering editor size which moves the scrollbar to the right once minimap is removed\n const wasMaximized = atom.isMaximized()\n const { width, height } = atom.getSize()\n atom.setSize(width, height)\n if (wasMaximized) {\n atom.maximize()\n }\n } else {\n toggled = true\n initSubscriptions()\n }\n styleReader.invalidateDOMStylesCache()\n}\n\n/**\n * Opens the plugin generation view.\n *\n * @param {string} template The name of the template to use\n */\nasync function generatePlugin(template) {\n const { createMinimapPluginGeneratorElement } = await import(\"./minimap-plugin-generator-element\")\n const view = createMinimapPluginGeneratorElement()\n view.template = template\n view.attach()\n}\n\n/**\n * Registers a callback to listen to the `did-activate` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidActivate(callback) {\n return emitter.on(\"did-activate\", callback)\n}\n\n/**\n * Registers a callback to listen to the `did-deactivate` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidDeactivate(callback) {\n return emitter.on(\"did-deactivate\", callback)\n}\n\n/**\n * Registers a callback to listen to the `did-create-minimap` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidCreateMinimap(callback) {\n return emitter.on(\"did-create-minimap\", callback)\n}\n\n/**\n * Registers a callback to listen to the `did-add-plugin` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidAddPlugin(callback) {\n return emitter.on(\"did-add-plugin\", callback)\n}\n\n/**\n * Registers a callback to listen to the `did-remove-plugin` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidRemovePlugin(callback) {\n return emitter.on(\"did-remove-plugin\", callback)\n}\n\n/**\n * Registers a callback to listen to the `did-activate-plugin` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidActivatePlugin(callback) {\n return emitter.on(\"did-activate-plugin\", callback)\n}\n\n/**\n * Registers a callback to listen to the `did-deactivate-plugin` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidDeactivatePlugin(callback) {\n return emitter.on(\"did-deactivate-plugin\", callback)\n}\n\n/**\n * Registers a callback to listen to the `did-change-plugin-order` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidChangePluginOrder(callback) {\n return emitter.on(\"did-change-plugin-order\", callback)\n}\n\n/**\n * Returns the `Minimap` class\n *\n * @returns {Function} The `Minimap` class constructor\n */\nexport function minimapClass() {\n return Minimap\n}\n\n/**\n * Returns the `Minimap` object associated to the passed-in `TextEditorElement`.\n *\n * @param {TextEditorElement} editorElement A text editor element\n * @returns {Minimap} The associated minimap\n */\nexport function minimapForEditorElement(editorElement) {\n if (!editorElement) {\n return\n }\n return minimapForEditor(editorElement.getModel())\n}\n\n/**\n * Returns the `Minimap` object associated to the passed-in `TextEditor`.\n *\n * @param {TextEditor} textEditor A text editor\n * @returns {Minimap} The associated minimap\n */\nexport function minimapForEditor(textEditor) {\n if (!textEditor) {\n return\n }\n if (!editorsMinimaps) {\n return\n }\n\n let minimap = editorsMinimaps.get(textEditor)\n\n if (minimap === undefined || minimap.destroyed) {\n minimap = new Minimap({ textEditor })\n editorsMinimaps.set(textEditor, minimap)\n\n const editorSubscription = textEditor.onDidDestroy(() => {\n if (editorsMinimaps) {\n editorsMinimaps.delete(textEditor)\n }\n if (minimap) {\n // just in case\n minimap.destroy()\n }\n editorSubscription.dispose()\n })\n // dispose the editorSubscription if minimap is deactivated before destroying the editor\n subscriptions.add(editorSubscription)\n }\n\n return minimap\n}\n\n/**\n * Returns a new stand-alone {Minimap} for the passed-in `TextEditor`.\n *\n * @param {TextEditor} textEditor A text editor instance to create a minimap for\n * @returns {Minimap} A new stand-alone Minimap for the passed-in editor\n */\nexport function standAloneMinimapForEditor(textEditor) {\n if (!textEditor) {\n return\n }\n\n return new Minimap({\n textEditor,\n standAlone: true,\n })\n}\n\n/**\n * Returns the `Minimap` associated to the active `TextEditor`.\n *\n * @returns {Minimap} The active Minimap\n */\nexport function getActiveMinimap() {\n return minimapForEditor(atom.workspace.getActiveTextEditor())\n}\n\n/**\n * Calls a function for each present and future minimaps.\n *\n * @param {function(minimap:Minimap):void} iterator A function to call with the existing and future minimaps\n * @returns {Disposable} A disposable to unregister the observer\n */\nexport function observeMinimaps(iterator) {\n if (!iterator) {\n return\n }\n\n if (editorsMinimaps) {\n editorsMinimaps.forEach((minimap) => {\n iterator(minimap)\n })\n }\n return onDidCreateMinimap((minimap) => {\n iterator(minimap)\n })\n}\n\n/**\n * Registers to the `observeTextEditors` method.\n *\n * @access private\n */\nfunction initSubscriptions() {\n const debounceUpdateStyles = debounce(updateStyles, 300)\n subscriptions.add(\n atom.workspace.observeTextEditors((textEditor) => {\n const minimap = minimapForEditor(textEditor)\n const minimapElement = minimapViewProvider(minimap)\n\n emitter.emit(\"did-create-minimap\", minimap)\n minimapElement.attach(textEditor.getElement())\n }),\n // empty color cache if the theme changes\n atom.themes.onDidChangeActiveThemes(debounceUpdateStyles),\n atom.styles.onDidUpdateStyleElement(debounceUpdateStyles),\n atom.styles.onDidAddStyleElement(debounceUpdateStyles),\n atom.styles.onDidRemoveStyleElement(debounceUpdateStyles),\n treeSitterWarning()\n )\n}\n\n/** Force update styles of minimap */\nfunction updateStyles() {\n styleReader.invalidateDOMStylesCache()\n editorsMinimaps.forEach((minimap) => {\n atom.views.getView(minimap).requestForcedUpdate()\n })\n}\n\n// The public exports included in the service:\nconst MinimapServiceV1 = {\n minimapViewProvider,\n getConfigSchema,\n onDidActivate,\n onDidDeactivate,\n onDidCreateMinimap,\n onDidAddPlugin,\n onDidRemovePlugin,\n onDidActivatePlugin,\n onDidDeactivatePlugin,\n onDidChangePluginOrder,\n minimapClass,\n minimapForEditorElement,\n minimapForEditor,\n standAloneMinimapForEditor,\n getActiveMinimap,\n observeMinimaps,\n registerPlugin: PluginManagement.registerPlugin,\n unregisterPlugin: PluginManagement.unregisterPlugin,\n togglePluginActivation: PluginManagement.togglePluginActivation,\n deactivateAllPlugins: PluginManagement.deactivateAllPlugins,\n activatePlugin: PluginManagement.activatePlugin,\n deactivatePlugin: PluginManagement.deactivatePlugin,\n getPluginsOrder: PluginManagement.getPluginsOrder,\n}\n\n/**\n * Returns the Minimap main module instance.\n *\n * @returns {Main} The Minimap main module instance.\n */\nexport function provideMinimapServiceV1() {\n return MinimapServiceV1\n}\n","\"use strict\"\n\nimport { CompositeDisposable, Disposable } from \"atom\"\nimport { EventsDelegation, AncestorsMethods } from \"atom-utils-plus\"\nimport elementResizeDetectorImport from \"element-resize-detector\"\nimport DecorationManagement from \"./decoration-management\"\n\nimport * as Main from \"./main\"\nimport CanvasDrawer from \"./mixins/canvas-drawer\"\nimport include from \"./decorators/include\"\nimport element from \"./decorators/element\"\n\nimport { createMinimapQuickSettingsElement } from \"./minimap-quick-settings-element\"\nconst elementResizeDetector = elementResizeDetectorImport({ strategy: \"scroll\" })\n\nconst SPEC_MODE = atom.inSpecMode()\nconst TAG_NAME = \"atom-text-editor-minimap\"\n\n/**\n * Public: The MinimapElement is the view meant to render a {@link Minimap} instance in the DOM.\n *\n * You can retrieve the MinimapElement associated to a Minimap using the `atom.views.getView` method.\n *\n * Note that most interactions with the Minimap package is done through the Minimap model so you should never have to\n * access MinimapElement instances.\n *\n * @example Let minimapElement = atom.views.getView(minimap)\n */\nclass MinimapElement extends HTMLElement {\n static initClass() {\n include(this, CanvasDrawer, EventsDelegation, AncestorsMethods)\n element(this, TAG_NAME)\n }\n\n // ## ## ####### ####### ## ## ######\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## ## ##\n // ######### ## ## ## ## ##### ######\n // ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ####### ####### ## ## ######\n\n /**\n * DOM callback invoked when a new MinimapElement is created.\n *\n * @access private\n */\n createdCallback() {\n // Core properties\n\n /** @access private */\n this.minimap = undefined\n\n /** @access private */\n this.width = undefined\n /** @access private */\n this.height = undefined\n\n // Subscriptions\n\n /** @access private */\n this.subscriptions = new CompositeDisposable()\n /** @access private */\n this.visibleAreaSubscription = undefined\n /** @access private */\n this.quickSettingsSubscription = undefined\n /** @access private */\n this.dragSubscription = undefined\n /** @access private */\n this.openQuickSettingSubscription = undefined\n\n // Configs\n\n /** @access private */\n this.minimapScrollIndicator = undefined\n /** @access private */\n this.displayMinimapOnLeft = undefined\n /** @access private */\n this.displayPluginsControls = undefined\n /** @access private */\n this.textOpacity = undefined\n /** @access private */\n this.displayCodeHighlights = undefined\n /** @access private */\n this.adjustToSoftWrap = undefined\n /** @access private */\n this.useHardwareAcceleration = undefined\n /** @access private */\n this.absoluteMode = undefined\n\n // Elements\n\n /** @access private */\n this.visibleArea = undefined\n /** @access private */\n this.controls = undefined\n /** @access private */\n this.scrollIndicator = undefined\n /** @access private */\n this.openQuickSettings = undefined\n /** @access private */\n this.quickSettingsElement = undefined\n\n this.DecorationManagement = new DecorationManagement()\n\n // States\n\n /** @access private */\n this.attached = undefined\n /** @access private */\n this.attachedToTextEditor = undefined\n /** @access private */\n this.standAlone = undefined\n /** @access private */\n this.wasVisible = undefined\n\n // Other\n\n /** @access private */\n this.offscreenFirstRow = undefined\n /** @access private */\n this.offscreenLastRow = undefined\n /** @access private */\n this.frameRequested = undefined\n /** @access private */\n this.flexBasis = undefined\n\n this.initializeContent()\n\n this.subscriptions.add(\n atom.config.observe(\"minimap.displayMinimapOnLeft\", (displayMinimapOnLeft) => {\n this.displayMinimapOnLeft = displayMinimapOnLeft\n\n this.updateMinimapFlexPosition()\n this.measureHeightAndWidth(true, true)\n }),\n\n atom.config.observe(\"minimap.minimapScrollIndicator\", (minimapScrollIndicator) => {\n this.minimapScrollIndicator = minimapScrollIndicator\n\n if (this.minimapScrollIndicator && !(this.scrollIndicator != null) && !this.standAlone) {\n this.initializeScrollIndicator()\n } else if (this.scrollIndicator != null) {\n this.disposeScrollIndicator()\n }\n\n if (this.attached) {\n this.requestUpdate()\n }\n }),\n\n atom.config.observe(\"minimap.displayPluginsControls\", (displayPluginsControls) => {\n this.displayPluginsControls = displayPluginsControls\n\n if (this.displayPluginsControls && !(this.openQuickSettings != null) && !this.standAlone) {\n this.initializeOpenQuickSettings()\n } else if (this.openQuickSettings != null) {\n this.disposeOpenQuickSettings()\n }\n }),\n\n atom.config.observe(\"minimap.textOpacity\", (textOpacity) => {\n this.textOpacity = textOpacity\n\n if (this.attached) {\n this.requestForcedUpdate()\n }\n }),\n\n atom.config.observe(\"minimap.displayCodeHighlights\", (displayCodeHighlights) => {\n this.displayCodeHighlights = displayCodeHighlights\n\n if (this.attached) {\n this.requestForcedUpdate()\n }\n }),\n\n atom.config.observe(\"minimap.smoothScrolling\", (smoothScrolling) => {\n this.smoothScrolling = smoothScrolling\n\n if (this.attached) {\n if (!this.smoothScrolling) {\n this.backLayer.canvas.style.cssText = \"\"\n this.tokensLayer.canvas.style.cssText = \"\"\n this.frontLayer.canvas.style.cssText = \"\"\n } else {\n this.requestUpdate()\n }\n }\n }),\n\n atom.config.observe(\"minimap.adjustMinimapWidthToSoftWrap\", (adjustToSoftWrap) => {\n this.adjustToSoftWrap = adjustToSoftWrap\n\n if (this.attached) {\n this.measureHeightAndWidth()\n }\n }),\n\n atom.config.observe(\"minimap.adjustMinimapWidthOnlyIfSmaller\", (adjustOnlyIfSmaller) => {\n this.adjustOnlyIfSmaller = adjustOnlyIfSmaller\n\n if (this.attached) {\n this.measureHeightAndWidth()\n }\n }),\n\n atom.config.observe(\"minimap.useHardwareAcceleration\", (useHardwareAcceleration) => {\n this.useHardwareAcceleration = useHardwareAcceleration\n\n if (this.attached) {\n this.requestUpdate()\n }\n }),\n\n atom.config.observe(\"minimap.absoluteMode\", (absoluteMode) => {\n this.absoluteMode = absoluteMode\n\n this.classList.toggle(\"absolute\", this.absoluteMode)\n }),\n\n atom.config.observe(\"minimap.adjustAbsoluteModeHeight\", (adjustAbsoluteModeHeight) => {\n this.adjustAbsoluteModeHeight = adjustAbsoluteModeHeight\n\n this.classList.toggle(\"adjust-absolute-height\", this.adjustAbsoluteModeHeight)\n\n if (this.attached) {\n this.measureHeightAndWidth()\n }\n }),\n\n atom.config.observe(\"minimap.ignoreWhitespacesInTokens\", (ignoreWhitespacesInTokens) => {\n this.ignoreWhitespacesInTokens = ignoreWhitespacesInTokens\n\n if (this.attached) {\n this.requestForcedUpdate()\n }\n }),\n\n atom.config.observe(\"editor.preferredLineLength\", () => {\n if (this.attached) {\n this.measureHeightAndWidth()\n }\n }),\n\n atom.config.observe(\"editor.softWrap\", () => {\n if (this.attached) {\n this.requestUpdate()\n }\n }),\n\n atom.config.observe(\"editor.showInvisibles\", () => {\n if (this.attached) {\n this.requestUpdate()\n }\n }),\n\n atom.config.observe(\"editor.invisibles\", () => {\n if (this.attached) {\n this.requestUpdate()\n }\n }),\n\n atom.config.observe(\"editor.softWrapAtPreferredLineLength\", () => {\n if (this.attached) {\n this.requestUpdate()\n }\n })\n )\n }\n\n /**\n * DOM callback invoked when a new MinimapElement is attached to the DOM.\n *\n * @access private\n */\n connectedCallback() {\n if (typeof atom.views.pollDocument === \"function\") {\n this.subscriptions.add(\n atom.views.pollDocument(() => {\n this.pollDOM()\n })\n )\n } else {\n this.intersectionObserver = new IntersectionObserver((entries) => {\n const { intersectionRect } = entries[entries.length - 1]\n if (intersectionRect.width > 0 || intersectionRect.height > 0) {\n this.measureHeightAndWidth(true, true)\n }\n })\n\n this.intersectionObserver.observe(this)\n if (this.isVisible()) {\n this.measureHeightAndWidth(true, true)\n }\n\n const measureDimensions = () => {\n this.measureHeightAndWidth(false, false)\n }\n elementResizeDetector.listenTo(this, measureDimensions)\n window.addEventListener(\"resize\", measureDimensions, { passive: true })\n\n this.subscriptions.add(\n new Disposable(() => {\n elementResizeDetector.removeListener(this, measureDimensions)\n }),\n new Disposable(() => {\n window.removeEventListener(\"resize\", measureDimensions)\n })\n )\n }\n\n this.measureHeightAndWidth()\n this.updateMinimapFlexPosition()\n this.attached = true\n this.attachedToTextEditor = this.queryParentSelector(\"atom-text-editor\") === this.minimap.getTextEditorElement()\n\n if (this.attachedToTextEditor) {\n this.minimap.getTextEditorElement().setAttribute(\"with-minimap\", this.displayMinimapOnLeft ? \"left\" : \"right\")\n }\n\n this.subscriptions.add(this.subscribeToMediaQuery())\n }\n\n /**\n * DOM callback invoked when a new MinimapElement is detached from the DOM.\n *\n * @access private\n */\n disconnectedCallback() {\n this.minimap.getTextEditorElement().removeAttribute(\"with-minimap\")\n this.attached = false\n }\n\n // ### ######## ######## ### ###### ## ##\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## #########\n // ######### ## ## ######### ## ## ##\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ###### ## ##\n\n /**\n * Returns whether the MinimapElement is currently visible on screen or not.\n *\n * The visibility of the minimap is defined by testing the size of the offset width and height of the element.\n *\n * @returns {boolean} Whether the MinimapElement is currently visible or not\n */\n isVisible() {\n return this.offsetWidth > 0 || this.offsetHeight > 0\n }\n\n /**\n * Attaches the MinimapElement to the DOM.\n *\n * The position at which the element is attached is defined by the `displayMinimapOnLeft` setting.\n *\n * @param {HTMLElement} [parent] The DOM node where attaching the minimap element\n */\n attach(parent) {\n if (this.attached) {\n return\n }\n\n const container = parent || this.minimap.getTextEditorElement()\n const minimaps = container.querySelectorAll(TAG_NAME)\n if (minimaps.length) {\n Array.prototype.forEach.call(minimaps, (el) => {\n el.destroy()\n try {\n container.removeChild(el)\n } catch (e) {\n // TODO: ignore for now\n // https://github.com/atom-minimap/minimap/issues/766#issuecomment-762496374\n }\n })\n }\n container.appendChild(this)\n }\n\n /** Detaches the MinimapElement from the DOM. */\n detach() {\n if (!this.attached || this.parentNode == null) {\n return\n }\n this.parentNode.removeChild(this)\n }\n\n /**\n * Toggles the minimap left/right position based on the value of the `displayMinimapOnLeft` setting.\n *\n * @access private\n */\n updateMinimapFlexPosition() {\n this.classList.toggle(\"left\", this.displayMinimapOnLeft)\n if (this.attachedToTextEditor) {\n this.minimap.getTextEditorElement().setAttribute(\"with-minimap\", this.displayMinimapOnLeft ? \"left\" : \"right\")\n }\n }\n\n /** Destroys this MinimapElement */\n destroy() {\n this.DecorationManagement.destroy()\n if (this.quickSettingsElement) {\n this.quickSettingsElement.destroy()\n }\n this.subscriptions.dispose()\n this.detach()\n }\n\n // ###### ####### ## ## ######## ######## ## ## ########\n // ## ## ## ## ### ## ## ## ### ## ##\n // ## ## ## #### ## ## ## #### ## ##\n // ## ## ## ## ## ## ## ###### ## ## ## ##\n // ## ## ## ## #### ## ## ## #### ##\n // ## ## ## ## ## ### ## ## ## ### ##\n // ###### ####### ## ## ## ######## ## ## ##\n\n /**\n * Creates the content of the MinimapElement and attaches the mouse control event listeners.\n *\n * @access private\n */\n initializeContent() {\n this.initializeCanvas()\n\n this.attachCanvases(this)\n\n this.createVisibleArea()\n this.createControls()\n\n this.subscriptions.add(\n this.subscribeTo(\n this,\n {\n mousewheel: (e) => {\n if (!this.standAlone && this.minimap.onMouseWheel) {\n this.minimap.onMouseWheel(e)\n }\n },\n },\n { passive: true }\n ),\n\n this.subscribeTo(\n this.getFrontCanvas(),\n {\n mousedown: (e) => {\n this.canvasPressed(extractMouseEventData(e))\n },\n touchstart: (e) => {\n this.canvasPressed(extractTouchEventData(e))\n },\n },\n { passive: true }\n )\n )\n }\n\n /**\n * Initializes the visible area div.\n *\n * @access private\n */\n createVisibleArea() {\n if (this.visibleArea) {\n return\n }\n\n this.visibleArea = document.createElement(\"div\")\n this.visibleArea.classList.add(\"minimap-visible-area\")\n this.appendChild(this.visibleArea)\n this.visibleAreaSubscription = this.subscribeTo(\n this.visibleArea,\n {\n mousedown: (e) => {\n this.startDrag(extractMouseEventData(e))\n },\n touchstart: (e) => {\n this.startDrag(extractTouchEventData(e))\n },\n },\n { passive: true }\n )\n\n this.subscriptions.add(this.visibleAreaSubscription)\n }\n\n /**\n * Removes the visible area div.\n *\n * @access private\n */\n removeVisibleArea() {\n if (!this.visibleArea) {\n return\n }\n\n this.subscriptions.remove(this.visibleAreaSubscription)\n this.visibleAreaSubscription.dispose()\n this.removeChild(this.visibleArea)\n delete this.visibleArea\n }\n\n /**\n * Creates the controls container div.\n *\n * @access private\n */\n createControls() {\n if (this.controls || this.standAlone) {\n return\n }\n\n this.controls = document.createElement(\"div\")\n this.controls.classList.add(\"minimap-controls\")\n this.appendChild(this.controls)\n }\n\n /**\n * Removes the controls container div.\n *\n * @access private\n */\n removeControls() {\n if (!this.controls) {\n return\n }\n\n this.removeChild(this.controls)\n delete this.controls\n }\n\n /**\n * Initializes the scroll indicator div when the `minimapScrollIndicator` settings is enabled.\n *\n * @access private\n */\n initializeScrollIndicator() {\n if (this.scrollIndicator || this.standAlone) {\n return\n }\n\n this.scrollIndicator = document.createElement(\"div\")\n this.scrollIndicator.classList.add(\"minimap-scroll-indicator\")\n this.controls.appendChild(this.scrollIndicator)\n }\n\n /**\n * Disposes the scroll indicator div when the `minimapScrollIndicator` settings is disabled.\n *\n * @access private\n */\n disposeScrollIndicator() {\n if (!this.scrollIndicator) {\n return\n }\n\n this.controls.removeChild(this.scrollIndicator)\n delete this.scrollIndicator\n }\n\n /**\n * Initializes the quick settings openener div when the `displayPluginsControls` setting is enabled.\n *\n * @access private\n */\n initializeOpenQuickSettings() {\n if (this.openQuickSettings || this.standAlone) {\n return\n }\n\n this.openQuickSettings = document.createElement(\"div\")\n this.openQuickSettings.classList.add(\"open-minimap-quick-settings\")\n this.controls.appendChild(this.openQuickSettings)\n\n this.openQuickSettingSubscription = this.subscribeTo(this.openQuickSettings, {\n mousedown: (e) => {\n e.preventDefault()\n e.stopPropagation()\n\n if (this.quickSettingsElement != null) {\n this.quickSettingsElement.destroy()\n this.quickSettingsSubscription.dispose()\n } else {\n this.quickSettingsElement = createMinimapQuickSettingsElement()\n this.quickSettingsElement.setModel(this)\n this.quickSettingsSubscription = this.quickSettingsElement.onDidDestroy(() => {\n this.quickSettingsElement = null\n })\n\n const { top, left, right } = this.getFrontCanvas().getBoundingClientRect()\n this.quickSettingsElement.style.top = `${top}px`\n this.quickSettingsElement.attach()\n\n if (this.displayMinimapOnLeft) {\n this.quickSettingsElement.style.left = `${right}px`\n } else {\n this.quickSettingsElement.style.left = `${left - this.quickSettingsElement.clientWidth}px`\n }\n }\n },\n })\n }\n\n /**\n * Disposes the quick settings openener div when the `displayPluginsControls` setting is disabled.\n *\n * @access private\n */\n disposeOpenQuickSettings() {\n if (!this.openQuickSettings) {\n return\n }\n\n this.controls.removeChild(this.openQuickSettings)\n this.openQuickSettingSubscription.dispose()\n delete this.openQuickSettings\n }\n\n /**\n * Get the DecorationManagement API for minimapElement\n *\n * @returns {DecorationManagement}\n */\n getDecorationManagement() {\n return this.DecorationManagement\n }\n\n // ## ## ####### ######## ######## ##\n // ### ### ## ## ## ## ## ##\n // #### #### ## ## ## ## ## ##\n // ## ### ## ## ## ## ## ###### ##\n // ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## ##\n // ## ## ####### ######## ######## ########\n\n /**\n * Returns the Minimap for which this MinimapElement was created.\n *\n * @returns {Minimap} This element's Minimap\n */\n getModel() {\n return this.minimap\n }\n\n /**\n * Defines the Minimap model for this MinimapElement instance.\n *\n * @param {Minimap} minimap The Minimap model for this instance.\n * @returns {Minimap} This element's Minimap\n */\n setModel(minimap) {\n this.minimap = minimap\n\n // set minimapElement for Minimap\n this.minimap.minimapElement = this\n\n this.DecorationManagement.initializeDecorations(this.minimap)\n\n this.subscriptions.add(\n this.minimap.onDidChangeScrollTop(() => {\n this.requestUpdate()\n }),\n\n this.minimap.onDidChangeScrollLeft(() => {\n this.requestUpdate()\n }),\n\n this.minimap.onDidDestroy(() => {\n this.destroy()\n }),\n\n this.minimap.onDidChangeConfig(() => {\n if (this.attached) {\n return this.requestForcedUpdate()\n }\n }),\n\n this.minimap.onDidChangeStandAlone(() => {\n this.setStandAlone(this.minimap.isStandAlone())\n this.requestUpdate()\n }),\n\n this.minimap.onDidChange((change) => {\n this.pendingChanges.push(change)\n this.requestUpdate()\n }),\n\n this.DecorationManagement.onDidChangeDecorationRange((change) => {\n const { type } = change\n if (type === \"line\" || type === \"highlight-under\" || type === \"background-custom\") {\n this.pendingBackDecorationChanges.push(change)\n } else {\n this.pendingFrontDecorationChanges.push(change)\n }\n this.requestUpdate()\n }),\n\n Main.onDidChangePluginOrder(() => {\n this.requestForcedUpdate()\n })\n )\n\n this.setStandAlone(this.minimap.isStandAlone())\n\n if (this.width != null && this.height != null) {\n this.minimap.setScreenHeightAndWidth(this.height, this.width)\n }\n\n return this.minimap\n }\n\n /**\n * Sets the stand-alone mode for this MinimapElement.\n *\n * @param {boolean} standAlone The new mode for this MinimapElement\n */\n setStandAlone(standAlone) {\n this.standAlone = standAlone\n\n if (this.standAlone) {\n this.setAttribute(\"stand-alone\", true)\n this.disposeScrollIndicator()\n this.disposeOpenQuickSettings()\n this.removeControls()\n this.removeVisibleArea()\n } else {\n this.removeAttribute(\"stand-alone\")\n this.createVisibleArea()\n this.createControls()\n if (this.minimapScrollIndicator) {\n this.initializeScrollIndicator()\n }\n if (this.displayPluginsControls) {\n this.initializeOpenQuickSettings()\n }\n }\n }\n\n // ## ## ######## ######## ### ######## ########\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ######## ## ## ## ## ## ######\n // ## ## ## ## ## ######### ## ##\n // ## ## ## ## ## ## ## ## ##\n // ####### ## ######## ## ## ## ########\n\n /** Requests an update to be performed on the next frame. */\n requestUpdate() {\n if (this.frameRequested) {\n return\n }\n\n this.frameRequested = true\n requestAnimationFrame(() => {\n this.update()\n this.frameRequested = false\n })\n }\n\n /** Requests an update to be performed on the next frame that will completely redraw the minimap. */\n requestForcedUpdate() {\n this.offscreenFirstRow = null\n this.offscreenLastRow = null\n this.requestUpdate()\n }\n\n /**\n * Performs the actual MinimapElement update.\n *\n * @access private\n */\n update() {\n if (!(this.attached && this.isVisible() && this.minimap)) {\n return\n }\n const minimap = this.minimap\n minimap.enableCache()\n const canvas = this.getFrontCanvas()\n\n const devicePixelRatio = this.minimap.getDevicePixelRatio()\n const visibleAreaLeft = minimap.getTextEditorScaledScrollLeft()\n const visibleAreaTop = minimap.getTextEditorScaledScrollTop() - minimap.getScrollTop()\n const width = Math.min(canvas.width / devicePixelRatio, this.width)\n const visibleWidth = width + visibleAreaLeft\n\n if (this.adjustToSoftWrap && this.flexBasis) {\n this.style.flexBasis = `${this.flexBasis}px`\n this.style.width = `${this.flexBasis}px`\n } else {\n this.style.flexBasis = null\n this.style.width = null\n }\n\n if (SPEC_MODE) {\n applyStyles(this.visibleArea, {\n width: `${Math.round(visibleWidth)}px`,\n height: `${Math.round(minimap.getTextEditorScaledHeight())}px`,\n top: `${Math.round(visibleAreaTop)}px`,\n \"border-left-width\": `${Math.round(visibleAreaLeft)}px`,\n })\n } else {\n applyStyles(this.visibleArea, {\n width: `${Math.round(visibleWidth)}px`,\n height: `${Math.round(minimap.getTextEditorScaledHeight())}px`,\n transform: makeTranslate(0, visibleAreaTop, this.useHardwareAcceleration),\n \"border-left-width\": `${Math.round(visibleAreaLeft)}px`,\n })\n }\n\n applyStyles(this.controls, { width: `${Math.round(width)}px` })\n\n const canvasTop = minimap.getFirstVisibleScreenRow() * minimap.getLineHeight() - minimap.getScrollTop()\n\n if (this.smoothScrolling) {\n if (SPEC_MODE) {\n applyStyles(this.backLayer.canvas, { top: `${canvasTop}px` })\n applyStyles(this.tokensLayer.canvas, { top: `${canvasTop}px` })\n applyStyles(this.frontLayer.canvas, { top: `${canvasTop}px` })\n } else {\n let canvasTransform = makeTranslate(0, canvasTop, this.useHardwareAcceleration)\n if (devicePixelRatio !== 1) {\n const scale = 1 / devicePixelRatio\n canvasTransform += ` ${makeScale(scale, scale, this.useHardwareAcceleration)}`\n }\n applyStyles(this.backLayer.canvas, { transform: canvasTransform })\n applyStyles(this.tokensLayer.canvas, { transform: canvasTransform })\n applyStyles(this.frontLayer.canvas, { transform: canvasTransform })\n }\n } else {\n const scale = 1 / devicePixelRatio\n const canvasTransform = makeScale(scale, scale, this.useHardwareAcceleration)\n applyStyles(this.backLayer.canvas, { transform: canvasTransform })\n applyStyles(this.tokensLayer.canvas, { transform: canvasTransform })\n applyStyles(this.frontLayer.canvas, { transform: canvasTransform })\n }\n\n if (this.minimapScrollIndicator && !this.scrollIndicator && minimap.canScroll()) {\n this.initializeScrollIndicator()\n }\n\n if (this.scrollIndicator != null) {\n const minimapScreenHeight = minimap.getScreenHeight()\n const indicatorHeight = minimapScreenHeight * (minimapScreenHeight / minimap.getHeight())\n const indicatorScroll = (minimapScreenHeight - indicatorHeight) * minimap.getScrollRatio()\n\n if (SPEC_MODE) {\n applyStyles(this.scrollIndicator, {\n height: `${indicatorHeight}px`,\n top: `${indicatorScroll}px`,\n })\n } else {\n applyStyles(this.scrollIndicator, {\n height: `${indicatorHeight}px`,\n transform: makeTranslate(0, indicatorScroll, this.useHardwareAcceleration),\n })\n }\n\n if (!minimap.canScroll()) {\n this.disposeScrollIndicator()\n }\n }\n\n if (this.absoluteMode && this.adjustAbsoluteModeHeight) {\n this.updateCanvasesSize()\n }\n\n this.updateCanvas()\n minimap.clearCache()\n }\n\n /**\n * Defines whether to render the code highlights or not.\n *\n * @param {Boolean} displayCodeHighlights Whether to render the code highlights or not\n */\n setDisplayCodeHighlights(displayCodeHighlights) {\n this.displayCodeHighlights = displayCodeHighlights\n if (this.attached) {\n this.requestForcedUpdate()\n }\n }\n\n /**\n * Polling callback used to detect visibility and size changes.\n *\n * @access private\n */\n pollDOM() {\n const visibilityChanged = this.checkForVisibilityChange()\n if (this.isVisible()) {\n if (!this.wasVisible) {\n this.requestForcedUpdate()\n }\n\n this.measureHeightAndWidth(visibilityChanged, false)\n }\n }\n\n /**\n * A method that checks for visibility changes in the MinimapElement. The method returns `true` when the visibility\n * changed from visible to hidden or from hidden to visible.\n *\n * @returns {boolean} Whether the visibility changed or not since the last call\n * @access private\n */\n checkForVisibilityChange() {\n if (this.isVisible()) {\n if (this.wasVisible) {\n return false\n } else {\n this.wasVisible = true\n return this.wasVisible\n }\n } else {\n if (this.wasVisible) {\n this.wasVisible = false\n return true\n } else {\n this.wasVisible = false\n return this.wasVisible\n }\n }\n }\n\n /**\n * A method used to measure the size of the MinimapElement and update internal components based on the new size.\n *\n * @param {boolean} visibilityChanged Did the visibility changed since last measurement\n * @param {[type]} [forceUpdate=true] Forces the update even when no changes were detected. Default is `true`\n * @access private\n */\n measureHeightAndWidth(visibilityChanged, forceUpdate = true) {\n if (!this.minimap) {\n return\n }\n\n const safeFlexBasis = this.style.flexBasis\n this.style.flexBasis = \"\"\n\n const wasResized = this.width !== this.clientWidth || this.height !== this.clientHeight\n\n this.height = this.clientHeight\n this.width = this.clientWidth\n let canvasWidth = this.width\n\n if (this.minimap != null) {\n this.minimap.setScreenHeightAndWidth(this.height, this.width)\n }\n\n if (wasResized || visibilityChanged || forceUpdate) {\n this.requestForcedUpdate()\n }\n\n if (!this.isVisible()) {\n return\n }\n\n if (wasResized || forceUpdate) {\n if (this.adjustToSoftWrap) {\n const lineLength = atom.config.get(\"editor.preferredLineLength\")\n const softWrap = atom.config.get(\"editor.softWrap\")\n const softWrapAtPreferredLineLength = atom.config.get(\"editor.softWrapAtPreferredLineLength\")\n const width = lineLength * this.minimap.getCharWidth()\n\n if (\n softWrap &&\n softWrapAtPreferredLineLength &&\n lineLength &&\n (width <= this.width || !this.adjustOnlyIfSmaller)\n ) {\n this.flexBasis = width\n canvasWidth = width\n } else {\n delete this.flexBasis\n }\n } else {\n delete this.flexBasis\n }\n\n this.updateCanvasesSize(canvasWidth)\n } else {\n this.style.flexBasis = safeFlexBasis\n }\n }\n\n updateCanvasesSize(canvasWidth) {\n const devicePixelRatio = this.minimap.getDevicePixelRatio()\n const maxCanvasHeight = this.height + this.minimap.getLineHeight()\n const newHeight =\n this.absoluteMode && this.adjustAbsoluteModeHeight\n ? Math.min(this.minimap.getHeight(), maxCanvasHeight)\n : maxCanvasHeight\n const canvas = this.getFrontCanvas()\n\n if (canvasWidth == null) {\n canvasWidth = canvas.width / devicePixelRatio\n }\n\n if (canvasWidth !== canvas.width || newHeight !== canvas.height) {\n this.setCanvasesSize(canvasWidth * devicePixelRatio, newHeight * devicePixelRatio)\n if (this.absoluteMode && this.adjustAbsoluteModeHeight) {\n this.offscreenFirstRow = null\n this.offscreenLastRow = null\n }\n }\n }\n\n // ######## ## ## ######## ## ## ######## ######\n // ## ## ## ## ### ## ## ## ##\n // ## ## ## ## #### ## ## ##\n // ###### ## ## ###### ## ## ## ## ######\n // ## ## ## ## ## #### ## ##\n // ## ## ## ## ## ### ## ## ##\n // ######## ### ######## ## ## ## ######\n\n /**\n * Callback triggered when the mouse is pressed on the MinimapElement canvas.\n *\n * @param {number} y The vertical coordinate of the event\n * @param {boolean} isLeftMouse Was the left mouse button pressed?\n * @param {boolean} isMiddleMouse Was the middle mouse button pressed?\n * @access private\n */\n canvasPressed({ y, isLeftMouse, isMiddleMouse }) {\n if (this.minimap.isStandAlone()) {\n return\n }\n if (isLeftMouse) {\n this.canvasLeftMousePressed(y)\n } else if (isMiddleMouse) {\n this.canvasMiddleMousePressed(y)\n const { top, height } = this.visibleArea.getBoundingClientRect()\n this.startDrag({ y: top + height / 2, isLeftMouse: false, isMiddleMouse: true })\n }\n }\n\n /**\n * Callback triggered when the mouse left button is pressed on the MinimapElement canvas.\n *\n * @param {MouseEvent} e The mouse event object\n * @param {number} e.pageY The mouse y position in page\n * @param {HTMLElement} e.target The source of the event\n * @access private\n */\n canvasLeftMousePressed(y) {\n const deltaY = y - this.getBoundingClientRect().top\n const row = Math.floor(deltaY / this.minimap.getLineHeight()) + this.minimap.getFirstVisibleScreenRow()\n\n const textEditor = this.minimap.getTextEditor()\n const textEditorElement = this.minimap.getTextEditorElement()\n\n const scrollTop = row * textEditor.getLineHeightInPixels() - this.minimap.getTextEditorHeight() / 2\n const textEditorScrollTop =\n textEditorElement.pixelPositionForScreenPosition([row, 0]).top - this.minimap.getTextEditorHeight() / 2\n\n if (atom.config.get(\"minimap.moveCursorOnMinimapClick\")) {\n textEditor.setCursorScreenPosition([row, 0])\n }\n\n if (atom.config.get(\"minimap.scrollAnimation\")) {\n const duration = atom.config.get(\"minimap.scrollAnimationDuration\")\n const independentScroll = this.minimap.scrollIndependentlyOnMouseWheel()\n\n const from = this.minimap.getTextEditorScrollTop()\n const to = textEditorScrollTop\n let step\n\n if (independentScroll) {\n const minimapFrom = this.minimap.getScrollTop()\n const minimapTo =\n Math.min(1, scrollTop / (this.minimap.getTextEditorMaxScrollTop() || 1)) * this.minimap.getMaxScrollTop()\n\n step = (now, t) => {\n if (this.minimap === null) {\n return\n } // TODO why this happens in the tests?\n this.minimap.setTextEditorScrollTop(now, true)\n this.minimap.setScrollTop(minimapFrom + (minimapTo - minimapFrom) * t)\n }\n animate({ from, to, duration, step })\n } else {\n step = (now) => {\n if (this.minimap === null) {\n return\n } // TODO why this happens in the tests?\n this.minimap.setTextEditorScrollTop(now)\n }\n animate({ from, to, duration, step })\n }\n } else {\n this.minimap.setTextEditorScrollTop(textEditorScrollTop)\n }\n }\n\n /**\n * Callback triggered when the mouse middle button is pressed on the MinimapElement canvas.\n *\n * @param {MouseEvent} e The mouse event object\n * @param {number} e.pageY The mouse y position in page\n * @access private\n */\n canvasMiddleMousePressed(y) {\n const { top: offsetTop } = this.getBoundingClientRect()\n const deltaY = y - offsetTop - this.minimap.getTextEditorScaledHeight() / 2\n\n const ratio = deltaY / (this.minimap.getVisibleHeight() - this.minimap.getTextEditorScaledHeight())\n\n this.minimap.setTextEditorScrollTop(ratio * this.minimap.getTextEditorMaxScrollTop())\n }\n\n /**\n * Subscribes to a media query for device pixel ratio changes and forces a repaint when it occurs.\n *\n * @returns {Disposable} A disposable to remove the media query listener\n * @access private\n */\n subscribeToMediaQuery() {\n const mediaQuery = window.matchMedia(\"screen and (-webkit-min-device-pixel-ratio: 1.5)\")\n const mediaListener = () => {\n this.requestForcedUpdate()\n }\n mediaQuery.addEventListener(\"change\", mediaListener)\n\n return new Disposable(() => {\n mediaQuery.removeEventListener(\"change\", mediaListener)\n })\n }\n\n // ######## #### ########\n // ## ## ## ## ## ##\n // ## ## #### ## ##\n // ## ## #### ## ##\n // ## ## ## ## ## ## ##\n // ## ## ## ## ## ##\n // ######## #### ## ########\n\n /**\n * A method triggered when the mouse is pressed over the visible area that starts the dragging gesture.\n *\n * @param {number} y The vertical coordinate of the event\n * @param {boolean} isLeftMouse Was the left mouse button pressed?\n * @param {boolean} isMiddleMouse Was the middle mouse button pressed?\n * @access private\n */\n startDrag({ y, isLeftMouse, isMiddleMouse }) {\n if (!this.minimap) {\n return\n }\n if (!isLeftMouse && !isMiddleMouse) {\n return\n }\n\n const initial = {\n dragOffset: y - this.visibleArea.getBoundingClientRect().top,\n offsetTop: this.getBoundingClientRect().top,\n }\n\n // TODO can we avoid adding and removing the listeners every time?\n\n const mousemoveHandler = (e) => this.drag(extractMouseEventData(e), initial)\n const dragendHandler = () => this.endDrag()\n\n const touchmoveHandler = (e) => this.drag(extractTouchEventData(e), initial)\n\n document.body.addEventListener(\"mousemove\", mousemoveHandler, { passive: true })\n document.body.addEventListener(\"mouseup\", dragendHandler, { passive: true })\n document.body.addEventListener(\"mouseleave\", dragendHandler, { passive: true })\n\n document.body.addEventListener(\"touchmove\", touchmoveHandler, { passive: true })\n document.body.addEventListener(\"touchend\", dragendHandler, { passive: true })\n document.body.addEventListener(\"touchcancel\", dragendHandler, { passive: true })\n\n this.dragSubscription = new Disposable(function () {\n document.body.removeEventListener(\"mousemove\", mousemoveHandler)\n document.body.removeEventListener(\"mouseup\", dragendHandler)\n document.body.removeEventListener(\"mouseleave\", dragendHandler)\n\n document.body.removeEventListener(\"touchmove\", touchmoveHandler)\n document.body.removeEventListener(\"touchend\", dragendHandler)\n document.body.removeEventListener(\"touchcancel\", dragendHandler)\n })\n }\n\n /**\n * The method called during the drag gesture.\n *\n * @param {number} y The vertical coordinate of the event\n * @param {boolean} isLeftMouse Was the left mouse button pressed?\n * @param {boolean} isMiddleMouse Was the middle mouse button pressed?\n * @param {number} initial.dragOffset The mouse offset within the visible area\n * @param {number} initial.offsetTop The MinimapElement offset at the moment of the drag start\n * @access private\n */\n drag({ y, isLeftMouse, isMiddleMouse }, initial) {\n if (!this.minimap) {\n return\n }\n if (!isLeftMouse && !isMiddleMouse) {\n return\n }\n const deltaY = y - initial.offsetTop - initial.dragOffset\n\n const ratio = deltaY / (this.minimap.getVisibleHeight() - this.minimap.getTextEditorScaledHeight())\n\n this.minimap.setTextEditorScrollTop(ratio * this.minimap.getTextEditorMaxScrollTop())\n }\n\n /**\n * The method that ends the drag gesture.\n *\n * @access private\n */\n endDrag() {\n if (!this.minimap) {\n return\n }\n this.dragSubscription.dispose()\n }\n}\n\nMinimapElement.initClass()\n\nexport function createMinimapElement() {\n const element = document.createElement(TAG_NAME)\n element.createdCallback()\n return element\n}\n\n// ######## ## ## ######## ## ## ######## ######\n// ## ## ## ## ### ## ## ## ##\n// ## ## ## ## #### ## ## ##\n// ###### ## ## ###### ## ## ## ## ######\n// ## ## ## ## ## #### ## ##\n// ## ## ## ## ## ### ## ## ##\n// ######## ### ######## ## ## ## ######\n\n/**\n * A method that extracts data from a `MouseEvent` which can then be used to process clicks and drags of the minimap.\n *\n * Used together with `extractTouchEventData` to provide a unified interface for `MouseEvent`s and `TouchEvent`s.\n *\n * @param {MouseEvent} mouseEvent The mouse event object\n * @access private\n */\nfunction extractMouseEventData(mouseEvent) {\n return {\n x: mouseEvent.pageX,\n y: mouseEvent.pageY,\n isLeftMouse: mouseEvent.button === 0,\n isMiddleMouse: mouseEvent.button === 1,\n }\n}\n\n/**\n * A method that extracts data from a `TouchEvent` which can then be used to process clicks and drags of the minimap.\n *\n * Used together with `extractMouseEventData` to provide a unified interface for `MouseEvent`s and `TouchEvent`s.\n *\n * @param {TouchEvent} touchEvent The touch event object\n * @access private\n */\nfunction extractTouchEventData(touchEvent) {\n // Use the first touch on the target area. Other touches will be ignored in\n // case of multi-touch.\n const touch = touchEvent.changedTouches[0]\n\n return {\n x: touch.pageX,\n y: touch.pageY,\n isLeftMouse: true, // Touch is treated like a left mouse button click\n isMiddleMouse: false,\n }\n}\n\n// ###### ###### ######\n// ## ## ## ## ## ##\n// ## ## ##\n// ## ###### ######\n// ## ## ##\n// ## ## ## ## ## ##\n// ###### ###### ######\n\n/**\n * Applies the passed-in styles properties to the specified element\n *\n * @param {HTMLElement} element The element onto which apply the styles\n * @param {Object} styles The styles to apply\n * @access private\n */\nfunction applyStyles(element, styles) {\n if (!element) {\n return\n }\n\n let cssText = \"\"\n for (const property in styles) {\n cssText += `${property}: ${styles[property]}; `\n }\n\n element.style.cssText = cssText\n}\n\n/**\n * Returns a string with a CSS translation tranform value.\n *\n * @param {number} [x=0] The x offset of the translation. Default is `0`\n * @param {number} [y=0] The y offset of the translation. Default is `0`\n * @param {boolean} [useHardwareAcceleration=false] Use hardware acceleration. Default is `false`\n * @returns {string} The CSS translation string\n * @access private\n */\nfunction makeTranslate(x = 0, y = 0, useHardwareAcceleration = false) {\n if (useHardwareAcceleration) {\n return `translate3d(${x}px, ${y}px, 0)`\n } else {\n return `translate(${x}px, ${y}px)`\n }\n}\n\n/**\n * Returns a string with a CSS scaling tranform value.\n *\n * @param {number} [x=0] The x scaling factor. Default is `0`\n * @param {number} [y=0] The y scaling factor. Default is `0`\n * @param {boolean} [useHardwareAcceleration=false] Use hardware acceleration. Default is `false`\n * @returns {string} The CSS scaling string\n * @access private\n */\nfunction makeScale(x = 0, y = x, useHardwareAcceleration = false) {\n if (useHardwareAcceleration) {\n return `scale3d(${x}, ${y}, 1)`\n } else {\n return `scale(${x}, ${y})`\n }\n}\n\n/**\n * A method that mimic the jQuery `animate` method and used to animate the scroll when clicking on the MinimapElement canvas.\n *\n * @param {Object} param The animation data object\n * @param {[type]} param.from The start value\n * @param {[type]} param.to The end value\n * @param {[type]} param.duration The animation duration\n * @param {[type]} param.step The easing function for the animation\n * @access private\n */\nfunction animate({ from, to, duration, step }) {\n const start = getTime()\n let progress\n\n const update = () => {\n const passed = getTime() - start\n if (duration === 0) {\n progress = 1\n } else {\n progress = passed / duration\n }\n if (progress > 1) {\n progress = 1\n }\n const delta = swing(progress)\n const value = from + (to - from) * delta\n step(value, delta)\n\n if (progress < 1) {\n requestAnimationFrame(update)\n }\n }\n\n update()\n}\n\nfunction swing(progress) {\n return 0.5 - Math.cos(progress * Math.PI) / 2\n}\n\n/**\n * A method that return the current time as a Date.\n *\n * That method exist so that we can mock it in tests.\n *\n * @returns {Date} The current time as Date\n * @access private\n */\nfunction getTime() {\n return new Date()\n}\n","// Generated by CoffeeScript 2.5.1\n(function() {\n module.exports = {\n requirePackages: function(...packages) {\n return new Promise(function(resolve, reject) {\n var failures, remains, required, solved;\n required = [];\n failures = [];\n remains = packages.length;\n solved = function() {\n remains--;\n if (remains !== 0) {\n return;\n }\n if (failures.length > 0) {\n return reject(failures);\n }\n return resolve(required);\n };\n return packages.forEach(function(pkg, i) {\n var failHandler, promise;\n failHandler = function(reason) {\n failures[i] = reason;\n return solved();\n };\n promise = atom.packages.activatePackage(pkg).then(function(activatedPackage) {\n required[i] = activatedPackage.mainModule;\n return solved();\n });\n if (promise.fail != null) {\n return promise.fail(failHandler);\n } else if (promise.catch != null) {\n return promise.catch(failHandler);\n }\n });\n });\n },\n registerOrUpdateElement: require('./register-or-update-element'),\n Ancestors: require('./mixins/ancestors'),\n AncestorsMethods: require('./mixins/ancestors'),\n DisposableEvents: require('./mixins/disposable-events'),\n EventsDelegation: require('./mixins/events-delegation'),\n SpacePenDSL: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zb2x2ZShyZXF1aXJlZClcblxuICAgICAgcGFja2FnZXMuZm9yRWFjaCAocGtnLCBpKSAtPlxuICAgICAgICBmYWlsSGFuZGxlciA9IChyZWFzb24pIC0+XG4gICAgICAgICAgZmFpbHVyZXNbaV0gPSByZWFzb25cbiAgICAgICAgICBzb2x2ZWQoKVxuXG4gICAgICAgIHByb21pc2UgPSBhdG9tLnBhY2thZ2VzLmFjdGl2YXRlUGFja2FnZShwa2cpXG4gICAgICAgIC50aGVuIChhY3RpdmF0ZWRQYWNrYWdlKSAtPlxuICAgICAgICAgIHJlcXVpcmVkW2ldID0gYWN0aXZhdGVkUGFja2FnZS5tYWluTW9kdWxlXG4gICAgICAgICAgc29sdmVkKClcblxuICAgICAgICBpZiBwcm9taXNlLmZhaWw/XG4gICAgICAgICAgcHJvbWlzZS5mYWlsKGZhaWxIYW5kbGVyKVxuICAgICAgICBlbHNlIGlmIHByb21pc2UuY2F0Y2g/XG4gICAgICAgICAgcHJvbWlzZS5jYXRjaChmYWlsSGFuZGxlcilcblxuICByZWdpc3Rlck9yVXBkYXRlRWxlbWVudDogcmVxdWlyZSAnLi9yZWdpc3Rlci1vci11cGRhdGUtZWxlbWVudCdcbiAgQW5jZXN0b3JzOiByZXF1aXJlICcuL21peGlucy9hbmNlc3RvcnMnXG4gIEFuY2VzdG9yc01ldGhvZHM6IHJlcXVpcmUgJy4vbWl4aW5zL2FuY2VzdG9ycydcbiAgRGlzcG9zYWJsZUV2ZW50czogcmVxdWlyZSAnLi9taXhpbnMvZGlzcG9zYWJsZS1ldmVudHMnXG4gIEV2ZW50c0RlbGVnYXRpb246IHJlcXVpcmUgJy4vbWl4aW5zL2V2ZW50cy1kZWxlZ2F0aW9uJ1xuICBTcGFjZVBlbkRTTDogcmVxdWlyZSAnLi9taXhpbnMvc3BhY2UtcGVuLWRzbCdcbiJdfQ==\n//# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/atom-utils.coffee","\"use strict\";\n\nvar forEach = require(\"./collection-utils\").forEach;\nvar elementUtilsMaker = require(\"./element-utils\");\nvar listenerHandlerMaker = require(\"./listener-handler\");\nvar idGeneratorMaker = require(\"./id-generator\");\nvar idHandlerMaker = require(\"./id-handler\");\nvar reporterMaker = require(\"./reporter\");\nvar browserDetector = require(\"./browser-detector\");\nvar batchProcessorMaker = require(\"batch-processor\");\nvar stateHandler = require(\"./state-handler\");\n\n//Detection strategies.\nvar objectStrategyMaker = require(\"./detection-strategy/object.js\");\nvar scrollStrategyMaker = require(\"./detection-strategy/scroll.js\");\n\nfunction isCollection(obj) {\n return Array.isArray(obj) || obj.length !== undefined;\n}\n\nfunction toArray(collection) {\n if (!Array.isArray(collection)) {\n var array = [];\n forEach(collection, function (obj) {\n array.push(obj);\n });\n return array;\n } else {\n return collection;\n }\n}\n\nfunction isElement(obj) {\n return obj && obj.nodeType === 1;\n}\n\n/**\n * @typedef idHandler\n * @type {object}\n * @property {function} get Gets the resize detector id of the element.\n * @property {function} set Generate and sets the resize detector id of the element.\n */\n\n/**\n * @typedef Options\n * @type {object}\n * @property {boolean} callOnAdd Determines if listeners should be called when they are getting added.\n Default is true. If true, the listener is guaranteed to be called when it has been added.\n If false, the listener will not be guarenteed to be called when it has been added (does not prevent it from being called).\n * @property {idHandler} idHandler A custom id handler that is responsible for generating, setting and retrieving id's for elements.\n If not provided, a default id handler will be used.\n * @property {reporter} reporter A custom reporter that handles reporting logs, warnings and errors.\n If not provided, a default id handler will be used.\n If set to false, then nothing will be reported.\n * @property {boolean} debug If set to true, the the system will report debug messages as default for the listenTo method.\n */\n\n/**\n * Creates an element resize detector instance.\n * @public\n * @param {Options?} options Optional global options object that will decide how this instance will work.\n */\nmodule.exports = function(options) {\n options = options || {};\n\n //idHandler is currently not an option to the listenTo function, so it should not be added to globalOptions.\n var idHandler;\n\n if (options.idHandler) {\n // To maintain compatability with idHandler.get(element, readonly), make sure to wrap the given idHandler\n // so that readonly flag always is true when it's used here. This may be removed next major version bump.\n idHandler = {\n get: function (element) { return options.idHandler.get(element, true); },\n set: options.idHandler.set\n };\n } else {\n var idGenerator = idGeneratorMaker();\n var defaultIdHandler = idHandlerMaker({\n idGenerator: idGenerator,\n stateHandler: stateHandler\n });\n idHandler = defaultIdHandler;\n }\n\n //reporter is currently not an option to the listenTo function, so it should not be added to globalOptions.\n var reporter = options.reporter;\n\n if(!reporter) {\n //If options.reporter is false, then the reporter should be quiet.\n var quiet = reporter === false;\n reporter = reporterMaker(quiet);\n }\n\n //batchProcessor is currently not an option to the listenTo function, so it should not be added to globalOptions.\n var batchProcessor = getOption(options, \"batchProcessor\", batchProcessorMaker({ reporter: reporter }));\n\n //Options to be used as default for the listenTo function.\n var globalOptions = {};\n globalOptions.callOnAdd = !!getOption(options, \"callOnAdd\", true);\n globalOptions.debug = !!getOption(options, \"debug\", false);\n\n var eventListenerHandler = listenerHandlerMaker(idHandler);\n var elementUtils = elementUtilsMaker({\n stateHandler: stateHandler\n });\n\n //The detection strategy to be used.\n var detectionStrategy;\n var desiredStrategy = getOption(options, \"strategy\", \"object\");\n var importantCssRules = getOption(options, \"important\", false);\n var strategyOptions = {\n reporter: reporter,\n batchProcessor: batchProcessor,\n stateHandler: stateHandler,\n idHandler: idHandler,\n important: importantCssRules\n };\n\n if(desiredStrategy === \"scroll\") {\n if (browserDetector.isLegacyOpera()) {\n reporter.warn(\"Scroll strategy is not supported on legacy Opera. Changing to object strategy.\");\n desiredStrategy = \"object\";\n } else if (browserDetector.isIE(9)) {\n reporter.warn(\"Scroll strategy is not supported on IE9. Changing to object strategy.\");\n desiredStrategy = \"object\";\n }\n }\n\n if(desiredStrategy === \"scroll\") {\n detectionStrategy = scrollStrategyMaker(strategyOptions);\n } else if(desiredStrategy === \"object\") {\n detectionStrategy = objectStrategyMaker(strategyOptions);\n } else {\n throw new Error(\"Invalid strategy name: \" + desiredStrategy);\n }\n\n //Calls can be made to listenTo with elements that are still being installed.\n //Also, same elements can occur in the elements list in the listenTo function.\n //With this map, the ready callbacks can be synchronized between the calls\n //so that the ready callback can always be called when an element is ready - even if\n //it wasn't installed from the function itself.\n var onReadyCallbacks = {};\n\n /**\n * Makes the given elements resize-detectable and starts listening to resize events on the elements. Calls the event callback for each event for each element.\n * @public\n * @param {Options?} options Optional options object. These options will override the global options. Some options may not be overriden, such as idHandler.\n * @param {element[]|element} elements The given array of elements to detect resize events of. Single element is also valid.\n * @param {function} listener The callback to be executed for each resize event for each element.\n */\n function listenTo(options, elements, listener) {\n function onResizeCallback(element) {\n var listeners = eventListenerHandler.get(element);\n forEach(listeners, function callListenerProxy(listener) {\n listener(element);\n });\n }\n\n function addListener(callOnAdd, element, listener) {\n eventListenerHandler.add(element, listener);\n\n if(callOnAdd) {\n listener(element);\n }\n }\n\n //Options object may be omitted.\n if(!listener) {\n listener = elements;\n elements = options;\n options = {};\n }\n\n if(!elements) {\n throw new Error(\"At least one element required.\");\n }\n\n if(!listener) {\n throw new Error(\"Listener required.\");\n }\n\n if (isElement(elements)) {\n // A single element has been passed in.\n elements = [elements];\n } else if (isCollection(elements)) {\n // Convert collection to array for plugins.\n // TODO: May want to check so that all the elements in the collection are valid elements.\n elements = toArray(elements);\n } else {\n return reporter.error(\"Invalid arguments. Must be a DOM element or a collection of DOM elements.\");\n }\n\n var elementsReady = 0;\n\n var callOnAdd = getOption(options, \"callOnAdd\", globalOptions.callOnAdd);\n var onReadyCallback = getOption(options, \"onReady\", function noop() {});\n var debug = getOption(options, \"debug\", globalOptions.debug);\n\n forEach(elements, function attachListenerToElement(element) {\n if (!stateHandler.getState(element)) {\n stateHandler.initState(element);\n idHandler.set(element);\n }\n\n var id = idHandler.get(element);\n\n debug && reporter.log(\"Attaching listener to element\", id, element);\n\n if(!elementUtils.isDetectable(element)) {\n debug && reporter.log(id, \"Not detectable.\");\n if(elementUtils.isBusy(element)) {\n debug && reporter.log(id, \"System busy making it detectable\");\n\n //The element is being prepared to be detectable. Do not make it detectable.\n //Just add the listener, because the element will soon be detectable.\n addListener(callOnAdd, element, listener);\n onReadyCallbacks[id] = onReadyCallbacks[id] || [];\n onReadyCallbacks[id].push(function onReady() {\n elementsReady++;\n\n if(elementsReady === elements.length) {\n onReadyCallback();\n }\n });\n return;\n }\n\n debug && reporter.log(id, \"Making detectable...\");\n //The element is not prepared to be detectable, so do prepare it and add a listener to it.\n elementUtils.markBusy(element, true);\n return detectionStrategy.makeDetectable({ debug: debug, important: importantCssRules }, element, function onElementDetectable(element) {\n debug && reporter.log(id, \"onElementDetectable\");\n\n if (stateHandler.getState(element)) {\n elementUtils.markAsDetectable(element);\n elementUtils.markBusy(element, false);\n detectionStrategy.addListener(element, onResizeCallback);\n addListener(callOnAdd, element, listener);\n\n // Since the element size might have changed since the call to \"listenTo\", we need to check for this change,\n // so that a resize event may be emitted.\n // Having the startSize object is optional (since it does not make sense in some cases such as unrendered elements), so check for its existance before.\n // Also, check the state existance before since the element may have been uninstalled in the installation process.\n var state = stateHandler.getState(element);\n if (state && state.startSize) {\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n if (state.startSize.width !== width || state.startSize.height !== height) {\n onResizeCallback(element);\n }\n }\n\n if(onReadyCallbacks[id]) {\n forEach(onReadyCallbacks[id], function(callback) {\n callback();\n });\n }\n } else {\n // The element has been unisntalled before being detectable.\n debug && reporter.log(id, \"Element uninstalled before being detectable.\");\n }\n\n delete onReadyCallbacks[id];\n\n elementsReady++;\n if(elementsReady === elements.length) {\n onReadyCallback();\n }\n });\n }\n\n debug && reporter.log(id, \"Already detecable, adding listener.\");\n\n //The element has been prepared to be detectable and is ready to be listened to.\n addListener(callOnAdd, element, listener);\n elementsReady++;\n });\n\n if(elementsReady === elements.length) {\n onReadyCallback();\n }\n }\n\n function uninstall(elements) {\n if(!elements) {\n return reporter.error(\"At least one element is required.\");\n }\n\n if (isElement(elements)) {\n // A single element has been passed in.\n elements = [elements];\n } else if (isCollection(elements)) {\n // Convert collection to array for plugins.\n // TODO: May want to check so that all the elements in the collection are valid elements.\n elements = toArray(elements);\n } else {\n return reporter.error(\"Invalid arguments. Must be a DOM element or a collection of DOM elements.\");\n }\n\n forEach(elements, function (element) {\n eventListenerHandler.removeAllListeners(element);\n detectionStrategy.uninstall(element);\n stateHandler.cleanState(element);\n });\n }\n\n function initDocument(targetDocument) {\n detectionStrategy.initDocument && detectionStrategy.initDocument(targetDocument);\n }\n\n return {\n listenTo: listenTo,\n removeListener: eventListenerHandler.removeListener,\n removeAllListeners: eventListenerHandler.removeAllListeners,\n uninstall: uninstall,\n initDocument: initDocument\n };\n};\n\nfunction getOption(options, name, defaultValue) {\n var value = options[name];\n\n if((value === undefined || value === null) && defaultValue !== undefined) {\n return defaultValue;\n }\n\n return value;\n}\n","\"use strict\";\n\nvar utils = module.exports = {};\n\n/**\n * Loops through the collection and calls the callback for each element. if the callback returns truthy, the loop is broken and returns the same value.\n * @public\n * @param {*} collection The collection to loop through. Needs to have a length property set and have indices set from 0 to length - 1.\n * @param {function} callback The callback to be called for each element. The element will be given as a parameter to the callback. If this callback returns truthy, the loop is broken and the same value is returned.\n * @returns {*} The value that a callback has returned (if truthy). Otherwise nothing.\n */\nutils.forEach = function(collection, callback) {\n for(var i = 0; i < collection.length; i++) {\n var result = callback(collection[i]);\n if(result) {\n return result;\n }\n }\n};\n","\"use strict\";\n\nmodule.exports = function(options) {\n var getState = options.stateHandler.getState;\n\n /**\n * Tells if the element has been made detectable and ready to be listened for resize events.\n * @public\n * @param {element} The element to check.\n * @returns {boolean} True or false depending on if the element is detectable or not.\n */\n function isDetectable(element) {\n var state = getState(element);\n return state && !!state.isDetectable;\n }\n\n /**\n * Marks the element that it has been made detectable and ready to be listened for resize events.\n * @public\n * @param {element} The element to mark.\n */\n function markAsDetectable(element) {\n getState(element).isDetectable = true;\n }\n\n /**\n * Tells if the element is busy or not.\n * @public\n * @param {element} The element to check.\n * @returns {boolean} True or false depending on if the element is busy or not.\n */\n function isBusy(element) {\n return !!getState(element).busy;\n }\n\n /**\n * Marks the object is busy and should not be made detectable.\n * @public\n * @param {element} element The element to mark.\n * @param {boolean} busy If the element is busy or not.\n */\n function markBusy(element, busy) {\n getState(element).busy = !!busy;\n }\n\n return {\n isDetectable: isDetectable,\n markAsDetectable: markAsDetectable,\n isBusy: isBusy,\n markBusy: markBusy\n };\n};\n","\"use strict\";\n\nmodule.exports = function(idHandler) {\n var eventListeners = {};\n\n /**\n * Gets all listeners for the given element.\n * @public\n * @param {element} element The element to get all listeners for.\n * @returns All listeners for the given element.\n */\n function getListeners(element) {\n var id = idHandler.get(element);\n\n if (id === undefined) {\n return [];\n }\n\n return eventListeners[id] || [];\n }\n\n /**\n * Stores the given listener for the given element. Will not actually add the listener to the element.\n * @public\n * @param {element} element The element that should have the listener added.\n * @param {function} listener The callback that the element has added.\n */\n function addListener(element, listener) {\n var id = idHandler.get(element);\n\n if(!eventListeners[id]) {\n eventListeners[id] = [];\n }\n\n eventListeners[id].push(listener);\n }\n\n function removeListener(element, listener) {\n var listeners = getListeners(element);\n for (var i = 0, len = listeners.length; i < len; ++i) {\n if (listeners[i] === listener) {\n listeners.splice(i, 1);\n break;\n }\n }\n }\n\n function removeAllListeners(element) {\n var listeners = getListeners(element);\n if (!listeners) { return; }\n listeners.length = 0;\n }\n\n return {\n get: getListeners,\n add: addListener,\n removeListener: removeListener,\n removeAllListeners: removeAllListeners\n };\n};\n","\"use strict\";\n\nmodule.exports = function() {\n var idCount = 1;\n\n /**\n * Generates a new unique id in the context.\n * @public\n * @returns {number} A unique id in the context.\n */\n function generate() {\n return idCount++;\n }\n\n return {\n generate: generate\n };\n};\n","\"use strict\";\n\nmodule.exports = function(options) {\n var idGenerator = options.idGenerator;\n var getState = options.stateHandler.getState;\n\n /**\n * Gets the resize detector id of the element.\n * @public\n * @param {element} element The target element to get the id of.\n * @returns {string|number|null} The id of the element. Null if it has no id.\n */\n function getId(element) {\n var state = getState(element);\n\n if (state && state.id !== undefined) {\n return state.id;\n }\n\n return null;\n }\n\n /**\n * Sets the resize detector id of the element. Requires the element to have a resize detector state initialized.\n * @public\n * @param {element} element The target element to set the id of.\n * @returns {string|number|null} The id of the element.\n */\n function setId(element) {\n var state = getState(element);\n\n if (!state) {\n throw new Error(\"setId required the element to have a resize detection state.\");\n }\n\n var id = idGenerator.generate();\n\n state.id = id;\n\n return id;\n }\n\n return {\n get: getId,\n set: setId\n };\n};\n","\"use strict\";\n\n/* global console: false */\n\n/**\n * Reporter that handles the reporting of logs, warnings and errors.\n * @public\n * @param {boolean} quiet Tells if the reporter should be quiet or not.\n */\nmodule.exports = function(quiet) {\n function noop() {\n //Does nothing.\n }\n\n var reporter = {\n log: noop,\n warn: noop,\n error: noop\n };\n\n if(!quiet && window.console) {\n var attachFunction = function(reporter, name) {\n //The proxy is needed to be able to call the method with the console context,\n //since we cannot use bind.\n reporter[name] = function reporterProxy() {\n var f = console[name];\n if (f.apply) { //IE9 does not support console.log.apply :)\n f.apply(console, arguments);\n } else {\n for (var i = 0; i < arguments.length; i++) {\n f(arguments[i]);\n }\n }\n };\n };\n\n attachFunction(reporter, \"log\");\n attachFunction(reporter, \"warn\");\n attachFunction(reporter, \"error\");\n }\n\n return reporter;\n};","\"use strict\";\n\nvar detector = module.exports = {};\n\ndetector.isIE = function(version) {\n function isAnyIeVersion() {\n var agent = navigator.userAgent.toLowerCase();\n return agent.indexOf(\"msie\") !== -1 || agent.indexOf(\"trident\") !== -1 || agent.indexOf(\" edge/\") !== -1;\n }\n\n if(!isAnyIeVersion()) {\n return false;\n }\n\n if(!version) {\n return true;\n }\n\n //Shamelessly stolen from https://gist.github.com/padolsey/527683\n var ieVersion = (function(){\n var undef,\n v = 3,\n div = document.createElement(\"div\"),\n all = div.getElementsByTagName(\"i\");\n\n do {\n div.innerHTML = \"\";\n }\n while (all[0]);\n\n return v > 4 ? v : undef;\n }());\n\n return version === ieVersion;\n};\n\ndetector.isLegacyOpera = function() {\n return !!window.opera;\n};\n","\"use strict\";\n\nvar utils = require(\"./utils\");\n\nmodule.exports = function batchProcessorMaker(options) {\n options = options || {};\n var reporter = options.reporter;\n var asyncProcess = utils.getOption(options, \"async\", true);\n var autoProcess = utils.getOption(options, \"auto\", true);\n\n if(autoProcess && !asyncProcess) {\n reporter && reporter.warn(\"Invalid options combination. auto=true and async=false is invalid. Setting async=true.\");\n asyncProcess = true;\n }\n\n var batch = Batch();\n var asyncFrameHandler;\n var isProcessing = false;\n\n function addFunction(level, fn) {\n if(!isProcessing && autoProcess && asyncProcess && batch.size() === 0) {\n // Since this is async, it is guaranteed to be executed after that the fn is added to the batch.\n // This needs to be done before, since we're checking the size of the batch to be 0.\n processBatchAsync();\n }\n\n batch.add(level, fn);\n }\n\n function processBatch() {\n // Save the current batch, and create a new batch so that incoming functions are not added into the currently processing batch.\n // Continue processing until the top-level batch is empty (functions may be added to the new batch while processing, and so on).\n isProcessing = true;\n while (batch.size()) {\n var processingBatch = batch;\n batch = Batch();\n processingBatch.process();\n }\n isProcessing = false;\n }\n\n function forceProcessBatch(localAsyncProcess) {\n if (isProcessing) {\n return;\n }\n\n if(localAsyncProcess === undefined) {\n localAsyncProcess = asyncProcess;\n }\n\n if(asyncFrameHandler) {\n cancelFrame(asyncFrameHandler);\n asyncFrameHandler = null;\n }\n\n if(localAsyncProcess) {\n processBatchAsync();\n } else {\n processBatch();\n }\n }\n\n function processBatchAsync() {\n asyncFrameHandler = requestFrame(processBatch);\n }\n\n function clearBatch() {\n batch = {};\n batchSize = 0;\n topLevel = 0;\n bottomLevel = 0;\n }\n\n function cancelFrame(listener) {\n // var cancel = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.clearTimeout;\n var cancel = clearTimeout;\n return cancel(listener);\n }\n\n function requestFrame(callback) {\n // var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function(fn) { return window.setTimeout(fn, 20); };\n var raf = function(fn) { return setTimeout(fn, 0); };\n return raf(callback);\n }\n\n return {\n add: addFunction,\n force: forceProcessBatch\n };\n};\n\nfunction Batch() {\n var batch = {};\n var size = 0;\n var topLevel = 0;\n var bottomLevel = 0;\n\n function add(level, fn) {\n if(!fn) {\n fn = level;\n level = 0;\n }\n\n if(level > topLevel) {\n topLevel = level;\n } else if(level < bottomLevel) {\n bottomLevel = level;\n }\n\n if(!batch[level]) {\n batch[level] = [];\n }\n\n batch[level].push(fn);\n size++;\n }\n\n function process() {\n for(var level = bottomLevel; level <= topLevel; level++) {\n var fns = batch[level];\n\n for(var i = 0; i < fns.length; i++) {\n var fn = fns[i];\n fn();\n }\n }\n }\n\n function getSize() {\n return size;\n }\n\n return {\n add: add,\n process: process,\n size: getSize\n };\n}\n","\"use strict\";\n\nvar utils = module.exports = {};\n\nutils.getOption = getOption;\n\nfunction getOption(options, name, defaultValue) {\n var value = options[name];\n\n if((value === undefined || value === null) && defaultValue !== undefined) {\n return defaultValue;\n }\n\n return value;\n}\n","\"use strict\";\n\nvar prop = \"_erd\";\n\nfunction initState(element) {\n element[prop] = {};\n return getState(element);\n}\n\nfunction getState(element) {\n return element[prop];\n}\n\nfunction cleanState(element) {\n delete element[prop];\n}\n\nmodule.exports = {\n initState: initState,\n getState: getState,\n cleanState: cleanState\n};\n","/**\n * Resize detection strategy that injects objects to elements in order to detect resize events.\n * Heavily inspired by: http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/\n */\n\n\"use strict\";\n\nvar browserDetector = require(\"../browser-detector\");\n\nmodule.exports = function(options) {\n options = options || {};\n var reporter = options.reporter;\n var batchProcessor = options.batchProcessor;\n var getState = options.stateHandler.getState;\n\n if(!reporter) {\n throw new Error(\"Missing required dependency: reporter.\");\n }\n\n /**\n * Adds a resize event listener to the element.\n * @public\n * @param {element} element The element that should have the listener added.\n * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback.\n */\n function addListener(element, listener) {\n function listenerProxy() {\n listener(element);\n }\n\n if(browserDetector.isIE(8)) {\n //IE 8 does not support object, but supports the resize event directly on elements.\n getState(element).object = {\n proxy: listenerProxy\n };\n element.attachEvent(\"onresize\", listenerProxy);\n } else {\n var object = getObject(element);\n\n if(!object) {\n throw new Error(\"Element is not detectable by this strategy.\");\n }\n\n object.contentDocument.defaultView.addEventListener(\"resize\", listenerProxy);\n }\n }\n\n function buildCssTextString(rules) {\n var seperator = options.important ? \" !important; \" : \"; \";\n\n return (rules.join(seperator) + seperator).trim();\n }\n\n /**\n * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes.\n * @private\n * @param {object} options Optional options object.\n * @param {element} element The element to make detectable\n * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter.\n */\n function makeDetectable(options, element, callback) {\n if (!callback) {\n callback = element;\n element = options;\n options = null;\n }\n\n options = options || {};\n var debug = options.debug;\n\n function injectObject(element, callback) {\n var OBJECT_STYLE = buildCssTextString([\"display: block\", \"position: absolute\", \"top: 0\", \"left: 0\", \"width: 100%\", \"height: 100%\", \"border: none\", \"padding: 0\", \"margin: 0\", \"opacity: 0\", \"z-index: -1000\", \"pointer-events: none\"]);\n\n //The target element needs to be positioned (everything except static) so the absolute positioned object will be positioned relative to the target element.\n\n // Position altering may be performed directly or on object load, depending on if style resolution is possible directly or not.\n var positionCheckPerformed = false;\n\n // The element may not yet be attached to the DOM, and therefore the style object may be empty in some browsers.\n // Since the style object is a reference, it will be updated as soon as the element is attached to the DOM.\n var style = window.getComputedStyle(element);\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n getState(element).startSize = {\n width: width,\n height: height\n };\n\n function mutateDom() {\n function alterPositionStyles() {\n if(style.position === \"static\") {\n element.style.setProperty(\"position\", \"relative\", options.important ? \"important\" : \"\");\n\n var removeRelativeStyles = function(reporter, element, style, property) {\n function getNumericalValue(value) {\n return value.replace(/[^-\\d\\.]/g, \"\");\n }\n\n var value = style[property];\n\n if(value !== \"auto\" && getNumericalValue(value) !== \"0\") {\n reporter.warn(\"An element that is positioned static has style.\" + property + \"=\" + value + \" which is ignored due to the static positioning. The element will need to be positioned relative, so the style.\" + property + \" will be set to 0. Element: \", element);\n element.style.setProperty(property, \"0\", options.important ? \"important\" : \"\");\n }\n };\n\n //Check so that there are no accidental styles that will make the element styled differently now that is is relative.\n //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway).\n removeRelativeStyles(reporter, element, style, \"top\");\n removeRelativeStyles(reporter, element, style, \"right\");\n removeRelativeStyles(reporter, element, style, \"bottom\");\n removeRelativeStyles(reporter, element, style, \"left\");\n }\n }\n\n function onObjectLoad() {\n // The object has been loaded, which means that the element now is guaranteed to be attached to the DOM.\n if (!positionCheckPerformed) {\n alterPositionStyles();\n }\n\n /*jshint validthis: true */\n\n function getDocument(element, callback) {\n //Opera 12 seem to call the object.onload before the actual document has been created.\n //So if it is not present, poll it with an timeout until it is present.\n //TODO: Could maybe be handled better with object.onreadystatechange or similar.\n if(!element.contentDocument) {\n var state = getState(element);\n if (state.checkForObjectDocumentTimeoutId) {\n window.clearTimeout(state.checkForObjectDocumentTimeoutId);\n }\n state.checkForObjectDocumentTimeoutId = setTimeout(function checkForObjectDocument() {\n state.checkForObjectDocumentTimeoutId = 0;\n getDocument(element, callback);\n }, 100);\n\n return;\n }\n\n callback(element.contentDocument);\n }\n\n //Mutating the object element here seems to fire another load event.\n //Mutating the inner document of the object element is fine though.\n var objectElement = this;\n\n //Create the style element to be added to the object.\n getDocument(objectElement, function onObjectDocumentReady(objectDocument) {\n //Notify that the element is ready to be listened to.\n callback(element);\n });\n }\n\n // The element may be detached from the DOM, and some browsers does not support style resolving of detached elements.\n // The alterPositionStyles needs to be delayed until we know the element has been attached to the DOM (which we are sure of when the onObjectLoad has been fired), if style resolution is not possible.\n if (style.position !== \"\") {\n alterPositionStyles(style);\n positionCheckPerformed = true;\n }\n\n //Add an object element as a child to the target element that will be listened to for resize events.\n var object = document.createElement(\"object\");\n object.style.cssText = OBJECT_STYLE;\n object.tabIndex = -1;\n object.type = \"text/html\";\n object.setAttribute(\"aria-hidden\", \"true\");\n object.onload = onObjectLoad;\n\n //Safari: This must occur before adding the object to the DOM.\n //IE: Does not like that this happens before, even if it is also added after.\n if(!browserDetector.isIE()) {\n object.data = \"about:blank\";\n }\n\n if (!getState(element)) {\n // The element has been uninstalled before the actual loading happened.\n return;\n }\n\n element.appendChild(object);\n getState(element).object = object;\n\n //IE: This must occur after adding the object to the DOM.\n if(browserDetector.isIE()) {\n object.data = \"about:blank\";\n }\n }\n\n if(batchProcessor) {\n batchProcessor.add(mutateDom);\n } else {\n mutateDom();\n }\n }\n\n if(browserDetector.isIE(8)) {\n //IE 8 does not support objects properly. Luckily they do support the resize event.\n //So do not inject the object and notify that the element is already ready to be listened to.\n //The event handler for the resize event is attached in the utils.addListener instead.\n callback(element);\n } else {\n injectObject(element, callback);\n }\n }\n\n /**\n * Returns the child object of the target element.\n * @private\n * @param {element} element The target element.\n * @returns The object element of the target.\n */\n function getObject(element) {\n return getState(element).object;\n }\n\n function uninstall(element) {\n if (!getState(element)) {\n return;\n }\n\n var object = getObject(element);\n\n if (!object) {\n return;\n }\n\n if (browserDetector.isIE(8)) {\n element.detachEvent(\"onresize\", object.proxy);\n } else {\n element.removeChild(object);\n }\n\n if (getState(element).checkForObjectDocumentTimeoutId) {\n window.clearTimeout(getState(element).checkForObjectDocumentTimeoutId);\n }\n\n delete getState(element).object;\n }\n\n return {\n makeDetectable: makeDetectable,\n addListener: addListener,\n uninstall: uninstall\n };\n};\n","/**\n * Resize detection strategy that injects divs to elements in order to detect resize events on scroll events.\n * Heavily inspired by: https://github.com/marcj/css-element-queries/blob/master/src/ResizeSensor.js\n */\n\n\"use strict\";\n\nvar forEach = require(\"../collection-utils\").forEach;\n\nmodule.exports = function(options) {\n options = options || {};\n var reporter = options.reporter;\n var batchProcessor = options.batchProcessor;\n var getState = options.stateHandler.getState;\n var hasState = options.stateHandler.hasState;\n var idHandler = options.idHandler;\n\n if (!batchProcessor) {\n throw new Error(\"Missing required dependency: batchProcessor\");\n }\n\n if (!reporter) {\n throw new Error(\"Missing required dependency: reporter.\");\n }\n\n //TODO: Could this perhaps be done at installation time?\n var scrollbarSizes = getScrollbarSizes();\n\n var styleId = \"erd_scroll_detection_scrollbar_style\";\n var detectionContainerClass = \"erd_scroll_detection_container\";\n\n function initDocument(targetDocument) {\n // Inject the scrollbar styling that prevents them from appearing sometimes in Chrome.\n // The injected container needs to have a class, so that it may be styled with CSS (pseudo elements).\n injectScrollStyle(targetDocument, styleId, detectionContainerClass);\n }\n\n initDocument(window.document);\n\n function buildCssTextString(rules) {\n var seperator = options.important ? \" !important; \" : \"; \";\n\n return (rules.join(seperator) + seperator).trim();\n }\n\n function getScrollbarSizes() {\n var width = 500;\n var height = 500;\n\n var child = document.createElement(\"div\");\n child.style.cssText = buildCssTextString([\"position: absolute\", \"width: \" + width*2 + \"px\", \"height: \" + height*2 + \"px\", \"visibility: hidden\", \"margin: 0\", \"padding: 0\"]);\n\n var container = document.createElement(\"div\");\n container.style.cssText = buildCssTextString([\"position: absolute\", \"width: \" + width + \"px\", \"height: \" + height + \"px\", \"overflow: scroll\", \"visibility: none\", \"top: \" + -width*3 + \"px\", \"left: \" + -height*3 + \"px\", \"visibility: hidden\", \"margin: 0\", \"padding: 0\"]);\n\n container.appendChild(child);\n\n document.body.insertBefore(container, document.body.firstChild);\n\n var widthSize = width - container.clientWidth;\n var heightSize = height - container.clientHeight;\n\n document.body.removeChild(container);\n\n return {\n width: widthSize,\n height: heightSize\n };\n }\n\n function injectScrollStyle(targetDocument, styleId, containerClass) {\n function injectStyle(style, method) {\n method = method || function (element) {\n targetDocument.head.appendChild(element);\n };\n\n var styleElement = targetDocument.createElement(\"style\");\n styleElement.innerHTML = style;\n styleElement.id = styleId;\n method(styleElement);\n return styleElement;\n }\n\n if (!targetDocument.getElementById(styleId)) {\n var containerAnimationClass = containerClass + \"_animation\";\n var containerAnimationActiveClass = containerClass + \"_animation_active\";\n var style = \"/* Created by the element-resize-detector library. */\\n\";\n style += \".\" + containerClass + \" > div::-webkit-scrollbar { \" + buildCssTextString([\"display: none\"]) + \" }\\n\\n\";\n style += \".\" + containerAnimationActiveClass + \" { \" + buildCssTextString([\"-webkit-animation-duration: 0.1s\", \"animation-duration: 0.1s\", \"-webkit-animation-name: \" + containerAnimationClass, \"animation-name: \" + containerAnimationClass]) + \" }\\n\";\n style += \"@-webkit-keyframes \" + containerAnimationClass + \" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\\n\";\n style += \"@keyframes \" + containerAnimationClass + \" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\";\n injectStyle(style);\n }\n }\n\n function addAnimationClass(element) {\n element.className += \" \" + detectionContainerClass + \"_animation_active\";\n }\n\n function addEvent(el, name, cb) {\n if (el.addEventListener) {\n el.addEventListener(name, cb);\n } else if(el.attachEvent) {\n el.attachEvent(\"on\" + name, cb);\n } else {\n return reporter.error(\"[scroll] Don't know how to add event listeners.\");\n }\n }\n\n function removeEvent(el, name, cb) {\n if (el.removeEventListener) {\n el.removeEventListener(name, cb);\n } else if(el.detachEvent) {\n el.detachEvent(\"on\" + name, cb);\n } else {\n return reporter.error(\"[scroll] Don't know how to remove event listeners.\");\n }\n }\n\n function getExpandElement(element) {\n return getState(element).container.childNodes[0].childNodes[0].childNodes[0];\n }\n\n function getShrinkElement(element) {\n return getState(element).container.childNodes[0].childNodes[0].childNodes[1];\n }\n\n /**\n * Adds a resize event listener to the element.\n * @public\n * @param {element} element The element that should have the listener added.\n * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback.\n */\n function addListener(element, listener) {\n var listeners = getState(element).listeners;\n\n if (!listeners.push) {\n throw new Error(\"Cannot add listener to an element that is not detectable.\");\n }\n\n getState(element).listeners.push(listener);\n }\n\n /**\n * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes.\n * @private\n * @param {object} options Optional options object.\n * @param {element} element The element to make detectable\n * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter.\n */\n function makeDetectable(options, element, callback) {\n if (!callback) {\n callback = element;\n element = options;\n options = null;\n }\n\n options = options || {};\n\n function debug() {\n if (options.debug) {\n var args = Array.prototype.slice.call(arguments);\n args.unshift(idHandler.get(element), \"Scroll: \");\n if (reporter.log.apply) {\n reporter.log.apply(null, args);\n } else {\n for (var i = 0; i < args.length; i++) {\n reporter.log(args[i]);\n }\n }\n }\n }\n\n function isDetached(element) {\n function isInDocument(element) {\n var isInShadowRoot = element.getRootNode && element.getRootNode().contains(element);\n return element === element.ownerDocument.body || element.ownerDocument.body.contains(element) || isInShadowRoot;\n }\n\n if (!isInDocument(element)) {\n return true;\n }\n\n // FireFox returns null style in hidden iframes. See https://github.com/wnr/element-resize-detector/issues/68 and https://bugzilla.mozilla.org/show_bug.cgi?id=795520\n if (window.getComputedStyle(element) === null) {\n return true;\n }\n\n return false;\n }\n\n function isUnrendered(element) {\n // Check the absolute positioned container since the top level container is display: inline.\n var container = getState(element).container.childNodes[0];\n var style = window.getComputedStyle(container);\n return !style.width || style.width.indexOf(\"px\") === -1; //Can only compute pixel value when rendered.\n }\n\n function getStyle() {\n // Some browsers only force layouts when actually reading the style properties of the style object, so make sure that they are all read here,\n // so that the user of the function can be sure that it will perform the layout here, instead of later (important for batching).\n var elementStyle = window.getComputedStyle(element);\n var style = {};\n style.position = elementStyle.position;\n style.width = element.offsetWidth;\n style.height = element.offsetHeight;\n style.top = elementStyle.top;\n style.right = elementStyle.right;\n style.bottom = elementStyle.bottom;\n style.left = elementStyle.left;\n style.widthCSS = elementStyle.width;\n style.heightCSS = elementStyle.height;\n return style;\n }\n\n function storeStartSize() {\n var style = getStyle();\n getState(element).startSize = {\n width: style.width,\n height: style.height\n };\n debug(\"Element start size\", getState(element).startSize);\n }\n\n function initListeners() {\n getState(element).listeners = [];\n }\n\n function storeStyle() {\n debug(\"storeStyle invoked.\");\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n\n var style = getStyle();\n getState(element).style = style;\n }\n\n function storeCurrentSize(element, width, height) {\n getState(element).lastWidth = width;\n getState(element).lastHeight = height;\n }\n\n function getExpandChildElement(element) {\n return getExpandElement(element).childNodes[0];\n }\n\n function getWidthOffset() {\n return 2 * scrollbarSizes.width + 1;\n }\n\n function getHeightOffset() {\n return 2 * scrollbarSizes.height + 1;\n }\n\n function getExpandWidth(width) {\n return width + 10 + getWidthOffset();\n }\n\n function getExpandHeight(height) {\n return height + 10 + getHeightOffset();\n }\n\n function getShrinkWidth(width) {\n return width * 2 + getWidthOffset();\n }\n\n function getShrinkHeight(height) {\n return height * 2 + getHeightOffset();\n }\n\n function positionScrollbars(element, width, height) {\n var expand = getExpandElement(element);\n var shrink = getShrinkElement(element);\n var expandWidth = getExpandWidth(width);\n var expandHeight = getExpandHeight(height);\n var shrinkWidth = getShrinkWidth(width);\n var shrinkHeight = getShrinkHeight(height);\n expand.scrollLeft = expandWidth;\n expand.scrollTop = expandHeight;\n shrink.scrollLeft = shrinkWidth;\n shrink.scrollTop = shrinkHeight;\n }\n\n function injectContainerElement() {\n var container = getState(element).container;\n\n if (!container) {\n container = document.createElement(\"div\");\n container.className = detectionContainerClass;\n container.style.cssText = buildCssTextString([\"visibility: hidden\", \"display: inline\", \"width: 0px\", \"height: 0px\", \"z-index: -1\", \"overflow: hidden\", \"margin: 0\", \"padding: 0\"]);\n getState(element).container = container;\n addAnimationClass(container);\n element.appendChild(container);\n\n var onAnimationStart = function () {\n getState(element).onRendered && getState(element).onRendered();\n };\n\n addEvent(container, \"animationstart\", onAnimationStart);\n\n // Store the event handler here so that they may be removed when uninstall is called.\n // See uninstall function for an explanation why it is needed.\n getState(element).onAnimationStart = onAnimationStart;\n }\n\n return container;\n }\n\n function injectScrollElements() {\n function alterPositionStyles() {\n var style = getState(element).style;\n\n if(style.position === \"static\") {\n element.style.setProperty(\"position\", \"relative\",options.important ? \"important\" : \"\");\n\n var removeRelativeStyles = function(reporter, element, style, property) {\n function getNumericalValue(value) {\n return value.replace(/[^-\\d\\.]/g, \"\");\n }\n\n var value = style[property];\n\n if(value !== \"auto\" && getNumericalValue(value) !== \"0\") {\n reporter.warn(\"An element that is positioned static has style.\" + property + \"=\" + value + \" which is ignored due to the static positioning. The element will need to be positioned relative, so the style.\" + property + \" will be set to 0. Element: \", element);\n element.style[property] = 0;\n }\n };\n\n //Check so that there are no accidental styles that will make the element styled differently now that is is relative.\n //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway).\n removeRelativeStyles(reporter, element, style, \"top\");\n removeRelativeStyles(reporter, element, style, \"right\");\n removeRelativeStyles(reporter, element, style, \"bottom\");\n removeRelativeStyles(reporter, element, style, \"left\");\n }\n }\n\n function getLeftTopBottomRightCssText(left, top, bottom, right) {\n left = (!left ? \"0\" : (left + \"px\"));\n top = (!top ? \"0\" : (top + \"px\"));\n bottom = (!bottom ? \"0\" : (bottom + \"px\"));\n right = (!right ? \"0\" : (right + \"px\"));\n\n return [\"left: \" + left, \"top: \" + top, \"right: \" + right, \"bottom: \" + bottom];\n }\n\n debug(\"Injecting elements\");\n\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n\n alterPositionStyles();\n\n var rootContainer = getState(element).container;\n\n if (!rootContainer) {\n rootContainer = injectContainerElement();\n }\n\n // Due to this WebKit bug https://bugs.webkit.org/show_bug.cgi?id=80808 (currently fixed in Blink, but still present in WebKit browsers such as Safari),\n // we need to inject two containers, one that is width/height 100% and another that is left/top -1px so that the final container always is 1x1 pixels bigger than\n // the targeted element.\n // When the bug is resolved, \"containerContainer\" may be removed.\n\n // The outer container can occasionally be less wide than the targeted when inside inline elements element in WebKit (see https://bugs.webkit.org/show_bug.cgi?id=152980).\n // This should be no problem since the inner container either way makes sure the injected scroll elements are at least 1x1 px.\n\n var scrollbarWidth = scrollbarSizes.width;\n var scrollbarHeight = scrollbarSizes.height;\n var containerContainerStyle = buildCssTextString([\"position: absolute\", \"flex: none\", \"overflow: hidden\", \"z-index: -1\", \"visibility: hidden\", \"width: 100%\", \"height: 100%\", \"left: 0px\", \"top: 0px\"]);\n var containerStyle = buildCssTextString([\"position: absolute\", \"flex: none\", \"overflow: hidden\", \"z-index: -1\", \"visibility: hidden\"].concat(getLeftTopBottomRightCssText(-(1 + scrollbarWidth), -(1 + scrollbarHeight), -scrollbarHeight, -scrollbarWidth)));\n var expandStyle = buildCssTextString([\"position: absolute\", \"flex: none\", \"overflow: scroll\", \"z-index: -1\", \"visibility: hidden\", \"width: 100%\", \"height: 100%\"]);\n var shrinkStyle = buildCssTextString([\"position: absolute\", \"flex: none\", \"overflow: scroll\", \"z-index: -1\", \"visibility: hidden\", \"width: 100%\", \"height: 100%\"]);\n var expandChildStyle = buildCssTextString([\"position: absolute\", \"left: 0\", \"top: 0\"]);\n var shrinkChildStyle = buildCssTextString([\"position: absolute\", \"width: 200%\", \"height: 200%\"]);\n\n var containerContainer = document.createElement(\"div\");\n var container = document.createElement(\"div\");\n var expand = document.createElement(\"div\");\n var expandChild = document.createElement(\"div\");\n var shrink = document.createElement(\"div\");\n var shrinkChild = document.createElement(\"div\");\n\n // Some browsers choke on the resize system being rtl, so force it to ltr. https://github.com/wnr/element-resize-detector/issues/56\n // However, dir should not be set on the top level container as it alters the dimensions of the target element in some browsers.\n containerContainer.dir = \"ltr\";\n\n containerContainer.style.cssText = containerContainerStyle;\n containerContainer.className = detectionContainerClass;\n container.className = detectionContainerClass;\n container.style.cssText = containerStyle;\n expand.style.cssText = expandStyle;\n expandChild.style.cssText = expandChildStyle;\n shrink.style.cssText = shrinkStyle;\n shrinkChild.style.cssText = shrinkChildStyle;\n\n expand.appendChild(expandChild);\n shrink.appendChild(shrinkChild);\n container.appendChild(expand);\n container.appendChild(shrink);\n containerContainer.appendChild(container);\n rootContainer.appendChild(containerContainer);\n\n function onExpandScroll() {\n var state = getState(element);\n if (state && state.onExpand) {\n state.onExpand();\n } else {\n debug(\"Aborting expand scroll handler: element has been uninstalled\");\n }\n }\n\n function onShrinkScroll() {\n var state = getState(element);\n if (state && state.onShrink) {\n state.onShrink();\n } else {\n debug(\"Aborting shrink scroll handler: element has been uninstalled\");\n }\n }\n\n addEvent(expand, \"scroll\", onExpandScroll);\n addEvent(shrink, \"scroll\", onShrinkScroll);\n\n // Store the event handlers here so that they may be removed when uninstall is called.\n // See uninstall function for an explanation why it is needed.\n getState(element).onExpandScroll = onExpandScroll;\n getState(element).onShrinkScroll = onShrinkScroll;\n }\n\n function registerListenersAndPositionElements() {\n function updateChildSizes(element, width, height) {\n var expandChild = getExpandChildElement(element);\n var expandWidth = getExpandWidth(width);\n var expandHeight = getExpandHeight(height);\n expandChild.style.setProperty(\"width\", expandWidth + \"px\", options.important ? \"important\" : \"\");\n expandChild.style.setProperty(\"height\", expandHeight + \"px\", options.important ? \"important\" : \"\");\n }\n\n function updateDetectorElements(done) {\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n // Check whether the size has actually changed since last time the algorithm ran. If not, some steps may be skipped.\n var sizeChanged = width !== getState(element).lastWidth || height !== getState(element).lastHeight;\n\n debug(\"Storing current size\", width, height);\n\n // Store the size of the element sync here, so that multiple scroll events may be ignored in the event listeners.\n // Otherwise the if-check in handleScroll is useless.\n storeCurrentSize(element, width, height);\n\n // Since we delay the processing of the batch, there is a risk that uninstall has been called before the batch gets to execute.\n // Since there is no way to cancel the fn executions, we need to add an uninstall guard to all fns of the batch.\n\n batchProcessor.add(0, function performUpdateChildSizes() {\n if (!sizeChanged) {\n return;\n }\n\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n\n if (!areElementsInjected()) {\n debug(\"Aborting because element container has not been initialized\");\n return;\n }\n\n if (options.debug) {\n var w = element.offsetWidth;\n var h = element.offsetHeight;\n\n if (w !== width || h !== height) {\n reporter.warn(idHandler.get(element), \"Scroll: Size changed before updating detector elements.\");\n }\n }\n\n updateChildSizes(element, width, height);\n });\n\n batchProcessor.add(1, function updateScrollbars() {\n // This function needs to be invoked event though the size is unchanged. The element could have been resized very quickly and then\n // been restored to the original size, which will have changed the scrollbar positions.\n\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n\n if (!areElementsInjected()) {\n debug(\"Aborting because element container has not been initialized\");\n return;\n }\n\n positionScrollbars(element, width, height);\n });\n\n if (sizeChanged && done) {\n batchProcessor.add(2, function () {\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n\n if (!areElementsInjected()) {\n debug(\"Aborting because element container has not been initialized\");\n return;\n }\n\n done();\n });\n }\n }\n\n function areElementsInjected() {\n return !!getState(element).container;\n }\n\n function notifyListenersIfNeeded() {\n function isFirstNotify() {\n return getState(element).lastNotifiedWidth === undefined;\n }\n\n debug(\"notifyListenersIfNeeded invoked\");\n\n var state = getState(element);\n\n // Don't notify if the current size is the start size, and this is the first notification.\n if (isFirstNotify() && state.lastWidth === state.startSize.width && state.lastHeight === state.startSize.height) {\n return debug(\"Not notifying: Size is the same as the start size, and there has been no notification yet.\");\n }\n\n // Don't notify if the size already has been notified.\n if (state.lastWidth === state.lastNotifiedWidth && state.lastHeight === state.lastNotifiedHeight) {\n return debug(\"Not notifying: Size already notified\");\n }\n\n\n debug(\"Current size not notified, notifying...\");\n state.lastNotifiedWidth = state.lastWidth;\n state.lastNotifiedHeight = state.lastHeight;\n forEach(getState(element).listeners, function (listener) {\n listener(element);\n });\n }\n\n function handleRender() {\n debug(\"startanimation triggered.\");\n\n if (isUnrendered(element)) {\n debug(\"Ignoring since element is still unrendered...\");\n return;\n }\n\n debug(\"Element rendered.\");\n var expand = getExpandElement(element);\n var shrink = getShrinkElement(element);\n if (expand.scrollLeft === 0 || expand.scrollTop === 0 || shrink.scrollLeft === 0 || shrink.scrollTop === 0) {\n debug(\"Scrollbars out of sync. Updating detector elements...\");\n updateDetectorElements(notifyListenersIfNeeded);\n }\n }\n\n function handleScroll() {\n debug(\"Scroll detected.\");\n\n if (isUnrendered(element)) {\n // Element is still unrendered. Skip this scroll event.\n debug(\"Scroll event fired while unrendered. Ignoring...\");\n return;\n }\n\n updateDetectorElements(notifyListenersIfNeeded);\n }\n\n debug(\"registerListenersAndPositionElements invoked.\");\n\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n\n getState(element).onRendered = handleRender;\n getState(element).onExpand = handleScroll;\n getState(element).onShrink = handleScroll;\n\n var style = getState(element).style;\n updateChildSizes(element, style.width, style.height);\n }\n\n function finalizeDomMutation() {\n debug(\"finalizeDomMutation invoked.\");\n\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n\n var style = getState(element).style;\n storeCurrentSize(element, style.width, style.height);\n positionScrollbars(element, style.width, style.height);\n }\n\n function ready() {\n callback(element);\n }\n\n function install() {\n debug(\"Installing...\");\n initListeners();\n storeStartSize();\n\n batchProcessor.add(0, storeStyle);\n batchProcessor.add(1, injectScrollElements);\n batchProcessor.add(2, registerListenersAndPositionElements);\n batchProcessor.add(3, finalizeDomMutation);\n batchProcessor.add(4, ready);\n }\n\n debug(\"Making detectable...\");\n\n if (isDetached(element)) {\n debug(\"Element is detached\");\n\n injectContainerElement();\n\n debug(\"Waiting until element is attached...\");\n\n getState(element).onRendered = function () {\n debug(\"Element is now attached\");\n install();\n };\n } else {\n install();\n }\n }\n\n function uninstall(element) {\n var state = getState(element);\n\n if (!state) {\n // Uninstall has been called on a non-erd element.\n return;\n }\n\n // Uninstall may have been called in the following scenarios:\n // (1) Right between the sync code and async batch (here state.busy = true, but nothing have been registered or injected).\n // (2) In the ready callback of the last level of the batch by another element (here, state.busy = true, but all the stuff has been injected).\n // (3) After the installation process (here, state.busy = false and all the stuff has been injected).\n // So to be on the safe side, let's check for each thing before removing.\n\n // We need to remove the event listeners, because otherwise the event might fire on an uninstall element which results in an error when trying to get the state of the element.\n state.onExpandScroll && removeEvent(getExpandElement(element), \"scroll\", state.onExpandScroll);\n state.onShrinkScroll && removeEvent(getShrinkElement(element), \"scroll\", state.onShrinkScroll);\n state.onAnimationStart && removeEvent(state.container, \"animationstart\", state.onAnimationStart);\n\n state.container && element.removeChild(state.container);\n }\n\n return {\n makeDetectable: makeDetectable,\n addListener: addListener,\n uninstall: uninstall,\n initDocument: initDocument\n };\n};\n","\"use strict\"\n\nimport { Emitter } from \"atom\"\nimport { escapeRegExp } from \"./deps/underscore-plus\"\nimport path from \"path\"\nimport Decoration from \"./decoration\"\n\n/**\n * The mixin that provides the decorations API to the minimap editor view.\n *\n * This mixin is injected into the `Minimap` prototype, so every methods defined in this file will be available on any\n * `Minimap` instance.\n */\nexport default class DecorationManagement {\n /** Initializes the decorations related properties. */\n initializeDecorations(minimap) {\n this.minimap = minimap\n\n if (this.emitter == null) {\n /**\n * The minimap emitter, lazily created if not created yet.\n *\n * @type {Emitter}\n * @access private\n */\n this.emitter = new Emitter()\n } else {\n this.emitter = this.minimap.emitter\n }\n\n /**\n * A map with the decoration id as key and the decoration as value.\n *\n * @type {Object}\n * @access private\n */\n this.decorationsById = new Map()\n /**\n * The decorations stored in an array indexed with their marker id.\n *\n * @type {Object}\n * @access private\n */\n this.decorationsByMarkerId = new Map()\n /**\n * The subscriptions to the markers `did-change` event indexed using the marker id.\n *\n * @type {Object}\n * @access private\n */\n this.decorationMarkerChangedSubscriptions = new Map()\n /**\n * The subscriptions to the markers `did-destroy` event indexed using the marker id.\n *\n * @type {Object}\n * @access private\n */\n this.decorationMarkerDestroyedSubscriptions = new Map()\n /**\n * The subscriptions to the decorations `did-change-properties` event indexed using the decoration id.\n *\n * @type {Object}\n * @access private\n */\n this.decorationUpdatedSubscriptions = new Map()\n /**\n * The subscriptions to the decorations `did-destroy` event indexed using the decoration id.\n *\n * @type {Object}\n * @access private\n */\n this.decorationDestroyedSubscriptions = new Map()\n\n // is set to true when a minimapElement is destroyed\n this.destroyed = false\n }\n\n /**\n * Returns all the decorations registered in the current `Minimap`.\n *\n * @returns {Decoration[]} All the decorations in this `Minimap`\n */\n getDecorations() {\n return [...this.decorationsById.values()]\n }\n\n /**\n * Registers an event listener to the `did-add-decoration` event.\n *\n * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be\n * called with an event object with the following properties:\n *\n * - Marker: the marker object that was decorated\n * - Decoration: the decoration object that was created\n *\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidAddDecoration(callback) {\n return this.emitter.on(\"did-add-decoration\", callback)\n }\n\n /**\n * Registers an event listener to the `did-remove-decoration` event.\n *\n * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be\n * called with an event object with the following properties:\n *\n * - Marker: the marker object that was decorated\n * - Decoration: the decoration object that was created\n *\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidRemoveDecoration(callback) {\n return this.emitter.on(\"did-remove-decoration\", callback)\n }\n\n /**\n * Registers an event listener to the `did-change-decoration` event.\n *\n * This event is triggered when the marker targeted by the decoration was changed.\n *\n * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be\n * called with an event object with the following properties:\n *\n * - Marker: the marker object that was decorated\n * - Decoration: the decoration object that was created\n *\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChangeDecoration(callback) {\n return this.emitter.on(\"did-change-decoration\", callback)\n }\n\n /**\n * Registers an event listener to the `did-change-decoration-range` event.\n *\n * This event is triggered when the marker range targeted by the decoration was changed.\n *\n * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be\n * called with an event object with the following properties:\n *\n * - Marker: the marker object that was decorated\n * - Decoration: the decoration object that was created\n *\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChangeDecorationRange(callback) {\n return this.emitter.on(\"did-change-decoration-range\", callback)\n }\n\n /**\n * Registers an event listener to the `did-update-decoration` event.\n *\n * This event is triggered when the decoration itself is modified.\n *\n * @param {function(decoration:Decoration):void} callback A function to call when the event is triggered\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidUpdateDecoration(callback) {\n return this.emitter.on(\"did-update-decoration\", callback)\n }\n\n /**\n * Returns the decoration with the passed-in id.\n *\n * @param {number} id The decoration id\n * @returns {Decoration} The decoration with the given id\n */\n decorationForId(id) {\n return this.decorationsById.get(id)\n }\n\n /**\n * Returns all the decorations that intersect the passed-in row range.\n *\n * @param {number} startScreenRow The first row of the range\n * @param {number} endScreenRow The last row of the range\n * @returns {Record} The decorations that intersect the passed-in range\n */\n decorationsForScreenRowRange(startScreenRow, endScreenRow) {\n const decorationsByMarkerId = {}\n const markers = this.findMarkers({\n intersectsScreenRowRange: [startScreenRow, endScreenRow],\n })\n\n for (let i = 0, len = markers.length; i < len; i++) {\n const marker = markers[i]\n const decorations = this.decorationsByMarkerId.get(marker.id)\n\n if (decorations !== undefined) {\n decorationsByMarkerId[marker.id] = decorations\n }\n }\n\n return decorationsByMarkerId\n }\n\n /**\n * Returns the decorations that intersects the passed-in row range in a structured way.\n *\n * At the first level, the keys are the available decoration types. At the second level, the keys are the row index\n * for which there are decorations available. The value is an array containing the decorations that intersects with\n * the corresponding row.\n *\n * @property {Object} line All the line decorations by row\n * @property {Decoration[]} line[row] All the line decorations at a given row\n * @property {Object} highlight-under All the highlight-under decorations by row\n * @property {Decoration[]} highlight-under[row] All the highlight-under decorations at a given row\n * @property {Object} highlight-over All the highlight-over decorations by row\n * @property {Decoration[]} highlight-over[row] All the highlight-over decorations at a given row\n * @property {Object} highlight-outine All the highlight-outine decorations by row\n * @property {Decoration[]} highlight-outine[row] All the highlight-outine decorations at a given row\n * @returns {Object} The decorations grouped by type and then rows\n */\n decorationsByTypeThenRows() {\n if (this.decorationsByTypeThenRowsCache != null) {\n return this.decorationsByTypeThenRowsCache\n }\n\n const cache = {}\n\n const decorations = this.decorationsById.values()\n for (const decoration of decorations) {\n const range = decoration.marker.getScreenRange()\n const type = decoration.getProperties().type\n\n if (cache[type] == null) {\n cache[type] = {}\n }\n\n for (let row = range.start.row, len = range.end.row; row <= len; row++) {\n if (cache[type][row] == null) {\n cache[type][row] = []\n }\n\n cache[type][row].push(decoration)\n }\n }\n\n /**\n * The grouped decorations cache.\n *\n * @type {Object}\n * @access private\n */\n this.decorationsByTypeThenRowsCache = cache\n return cache\n }\n\n /** Invalidates the decoration by screen rows cache. */\n invalidateDecorationForScreenRowsCache() {\n this.decorationsByTypeThenRowsCache = null\n }\n\n /**\n * Adds a decoration that tracks a `Marker`. When the marker moves, is invalidated, or is destroyed, the decoration\n * will be updated to reflect the marker's state.\n *\n * @fires {did-add-decoration} when The decoration is created successfully\n * @fires {did-change} when The decoration is created successfully\n * @param {Marker} marker The marker you want this decoration to follow\n * @param {Object} decorationParams The decoration properties\n * @param {string} decorationParams.type The decoration type in the following list:\n *\n * - **line**: Fills the line background with the decoration color.\n * - **highlight**: Renders a colored rectangle on the minimap. The highlight is rendered above the line's text.\n * - **highlight-over**: Same as **highlight**.\n * - **highlight-under**: Renders a colored rectangle on the minimap. The highlight is rendered below the line's text.\n * - **highlight-outline**: Renders a colored outline on the minimap. The highlight box is rendered above the line's text.\n * - **foreground-custom**: A decoration type for which you have the control over the render routine. Note that your\n * routine should implement a render on a per-line basis to avoid any side-effect with the offset bitmap cache\n * mechanism. These decorations are rendred on the foreground decorations layer.\n * - **background-custom**: A decoration type for which you have the control over the render routine. Note that your\n * routine should implement a render on a per-line basis to avoid any side-effect with the offset bitmap cache\n * mechanism. These decorations are rendred on the background decorations layer.\n *\n * @param {string} [decorationParams.class] The CSS class to use to retrieve the background color of the decoration by\n * building a scop corresponding to `.minimap .editor `\n * @param {string} [decorationParams.scope] The scope to use to retrieve the decoration background. Note that if the\n * `scope` property is set, the `class` won't be used.\n * @param {string} [decorationParams.color] The CSS color to use to render the decoration. When set, neither `scope`\n * nor `class` are used.\n * @param {string} [decorationParams.plugin] The name of the plugin that created this decoration. It'll be used to\n * order the decorations on the same layer and that are overlapping. If the parameter is omitted the Minimap will\n * attempt to infer the plugin origin from the path of the caller function.\n * @param {function} [decorationParams.render] The render routine for custom decorations. The function receives the\n * decoration and the render data for the current render pass.\n * @returns {Decoration} The created decoration\n */\n decorateMarker(marker, decorationParams) {\n if (this.destroyed || this.minimap.destroyed || marker == null) {\n return\n }\n\n const { id } = marker\n\n if (decorationParams.type === \"highlight\") {\n decorationParams.type = \"highlight-over\"\n }\n\n const { type, plugin } = decorationParams\n\n if (plugin == null) {\n decorationParams.plugin = getOriginatorPackageName()\n }\n\n if (decorationParams.scope == null && decorationParams.class != null) {\n const cls = decorationParams.class.split(\" \").join(\".\")\n decorationParams.scope = `.minimap .${cls}`\n }\n\n if (!this.decorationMarkerDestroyedSubscriptions.has(id)) {\n this.decorationMarkerDestroyedSubscriptions.set(\n id,\n marker.onDidDestroy(() => {\n this.removeAllDecorationsForMarker(marker)\n })\n )\n }\n\n if (!this.decorationMarkerChangedSubscriptions.has(id)) {\n this.decorationMarkerChangedSubscriptions.set(\n id,\n marker.onDidChange((event) => {\n const decorations = this.decorationsByMarkerId.get(id)\n const screenRange = marker.getScreenRange()\n\n this.invalidateDecorationForScreenRowsCache()\n\n if (decorations !== undefined) {\n for (let i = 0, len = decorations.length; i < len; i++) {\n const decoration = decorations[i]\n this.emitter.emit(\"did-change-decoration\", {\n marker,\n decoration,\n event,\n })\n this.emitDecorationChanges(decoration.type, decoration)\n\n decoration.screenRange = screenRange\n }\n }\n let oldStart = event.oldTailScreenPosition\n let oldEnd = event.oldHeadScreenPosition\n let newStart = event.newTailScreenPosition\n let newEnd = event.newHeadScreenPosition\n\n if (oldStart.row > oldEnd.row) {\n ;[oldStart, oldEnd] = [oldEnd, oldStart]\n }\n if (newStart.row > newEnd.row) {\n ;[newStart, newEnd] = [newEnd, newStart]\n }\n\n const rangesDiffs = computeRangesDiffs(oldStart, oldEnd, newStart, newEnd)\n\n for (let i = 0, len = rangesDiffs.length; i < len; i++) {\n const [start, end] = rangesDiffs[i]\n this.emitRangeChanges(\n type,\n {\n start,\n end,\n },\n 0\n )\n }\n })\n )\n }\n\n const decoration = new Decoration(marker, this, decorationParams)\n\n if (!this.decorationsByMarkerId.has(id)) {\n this.decorationsByMarkerId.set(id, [])\n }\n\n this.decorationsByMarkerId.get(id).push(decoration)\n this.decorationsById.set(decoration.id, decoration)\n\n if (!this.decorationUpdatedSubscriptions.has(decoration.id)) {\n this.decorationUpdatedSubscriptions.set(\n decoration.id,\n decoration.onDidChangeProperties((event) => {\n this.emitDecorationChanges(type, decoration)\n })\n )\n }\n\n this.decorationDestroyedSubscriptions.set(\n decoration.id,\n decoration.onDidDestroy(() => {\n this.removeDecoration(decoration)\n })\n )\n\n this.emitDecorationChanges(type, decoration)\n this.emitter.emit(\"did-add-decoration\", {\n marker,\n decoration,\n })\n\n return decoration\n }\n\n /**\n * Emits a change in the `Minimap` corresponding to the passed-in decoration.\n *\n * @param {string} type The type of decoration that changed\n * @param {Decoration} decoration The decoration for which emitting an event\n * @access private\n */\n emitDecorationChanges(type, decoration) {\n if (this.destroyed || this.minimap.editorDestroyed()) {\n return\n }\n\n this.invalidateDecorationForScreenRowsCache()\n\n const range = decoration.screenRange\n if (!range.start || !range.end) {\n return\n }\n\n this.emitRangeChanges(type, range, 0)\n }\n\n /**\n * Emits a change for the specified range.\n *\n * @param {string} type The type of decoration that changed\n * @param {Object} range The range where changes occured\n * @param {number} [screenDelta] An optional screen delta for the change object\n * @access private\n */\n emitRangeChanges(type, range, screenDelta) {\n const startScreenRow = range.start.row\n const endScreenRow = range.end.row\n const lastRenderedScreenRow = this.minimap.getLastVisibleScreenRow()\n const firstRenderedScreenRow = this.minimap.getFirstVisibleScreenRow()\n\n if (screenDelta == null) {\n screenDelta = lastRenderedScreenRow - firstRenderedScreenRow - (endScreenRow - startScreenRow)\n }\n\n const changeEvent = {\n start: startScreenRow,\n end: endScreenRow,\n screenDelta,\n type,\n }\n\n this.emitter.emit(\"did-change-decoration-range\", changeEvent)\n }\n\n /**\n * Removes a `Decoration` from this minimap.\n *\n * @fires {did-change} when The decoration is removed\n * @fires {did-remove-decoration} when The decoration is removed\n * @param {Decoration} decoration The decoration to remove\n */\n removeDecoration(decoration) {\n if (decoration == null) {\n return\n }\n\n const marker = decoration.marker\n let subscription\n\n this.decorationsById.delete(decoration.id)\n\n subscription = this.decorationUpdatedSubscriptions.get(decoration.id)\n if (subscription !== undefined) {\n subscription.dispose()\n }\n\n subscription = this.decorationDestroyedSubscriptions.get(decoration.id)\n if (subscription !== undefined) {\n subscription.dispose()\n }\n\n this.decorationUpdatedSubscriptions.delete(decoration.id)\n this.decorationDestroyedSubscriptions.delete(decoration.id)\n\n const decorations = this.decorationsByMarkerId.get(marker.id)\n if (decorations === undefined) {\n return\n }\n\n this.emitDecorationChanges(decoration.getProperties().type, decoration)\n\n const index = decorations.indexOf(decoration)\n if (index > -1) {\n decorations.splice(index, 1)\n\n this.emitter.emit(\"did-remove-decoration\", {\n marker,\n decoration,\n })\n\n if (decorations.length === 0) {\n this.removedAllMarkerDecorations(marker)\n }\n }\n }\n\n /**\n * Removes all the decorations registered for the passed-in marker.\n *\n * @fires {did-change} when A decoration have been removed\n * @fires {did-remove-decoration} when A decoration have been removed\n * @param {Marker} marker The marker for which removing its decorations\n */\n removeAllDecorationsForMarker(marker) {\n if (marker == null) {\n return\n }\n\n const decorations = this.decorationsByMarkerId.get(marker.id)\n if (decorations === undefined) {\n return\n }\n\n for (let i = 0, len = decorations.length; i < len; i++) {\n const decoration = decorations[i]\n\n if (!this.destroyed && !this.minimap.editorDestroyed()) {\n this.emitDecorationChanges(decoration.getProperties().type, decoration)\n }\n this.emitter.emit(\"did-remove-decoration\", {\n marker,\n decoration,\n })\n }\n\n this.removedAllMarkerDecorations(marker)\n }\n\n /**\n * Performs the removal of a decoration for a given marker.\n *\n * @param {Marker} marker The marker for which removing decorations\n * @access private\n */\n removedAllMarkerDecorations(marker) {\n if (marker == null) {\n return\n }\n\n this.decorationMarkerChangedSubscriptions.get(marker.id).dispose()\n this.decorationMarkerDestroyedSubscriptions.get(marker.id).dispose()\n\n this.decorationsByMarkerId.delete(marker.id)\n this.decorationMarkerChangedSubscriptions.delete(marker.id)\n this.decorationMarkerDestroyedSubscriptions.delete(marker.id)\n }\n\n /** Removes all the decorations that was created in the current `Minimap`. */\n removeAllDecorations() {\n const decorationMarkerChangedSubscriptionsValues = this.decorationMarkerChangedSubscriptions.values()\n for (const decoration of decorationMarkerChangedSubscriptionsValues) {\n decoration.dispose()\n }\n\n const decorationMarkerDestroyedSubscriptionsValues = this.decorationMarkerDestroyedSubscriptions.values()\n for (const decoration of decorationMarkerDestroyedSubscriptionsValues) {\n decoration.dispose()\n }\n\n const decorationUpdatedSubscriptionsValues = this.decorationUpdatedSubscriptions.values()\n for (const decoration of decorationUpdatedSubscriptionsValues) {\n decoration.dispose()\n }\n\n const decorationDestroyedSubscriptionsValues = this.decorationDestroyedSubscriptions.values()\n for (const decoration of decorationDestroyedSubscriptionsValues) {\n decoration.dispose()\n }\n\n const decorationsByIdValues = this.decorationsById.values()\n for (const decoration of decorationsByIdValues) {\n decoration.destroy()\n }\n\n this.decorationsById.clear()\n this.decorationsByMarkerId.clear()\n this.decorationMarkerChangedSubscriptions.clear()\n this.decorationMarkerDestroyedSubscriptions.clear()\n this.decorationUpdatedSubscriptions.clear()\n this.decorationDestroyedSubscriptions.clear()\n }\n\n destroy() {\n this.removeAllDecorations()\n this.minimap = undefined\n this.emitter = undefined\n this.destroyed = true\n }\n}\n\nfunction getOriginatorPackageName() {\n const line = new Error().stack.split(\"\\n\")[3]\n const filePath = line.split(\"(\")[1].replace(\")\", \"\")\n const re = new RegExp(atom.packages.getPackageDirPaths().join(\"|\") + escapeRegExp(path.sep))\n const plugin = filePath\n .replace(re, \"\")\n .split(path.sep)[0]\n .replace(/minimap-|-minimap/, \"\")\n return plugin.indexOf(path.sep) < 0 ? plugin : undefined\n}\n\n/**\n * Given two ranges, it returns an array of ranges representing the differences between them.\n *\n * @param {number} oldStart The row index of the first range start\n * @param {number} oldEnd The row index of the first range end\n * @param {number} newStart The row index of the second range start\n * @param {number} newEnd The row index of the second range end\n * @returns {Object[]} The array of diff ranges\n * @access private\n */\nfunction computeRangesDiffs(oldStart, oldEnd, newStart, newEnd) {\n const diffs = []\n\n if (oldStart.isLessThan(newStart)) {\n diffs.push([oldStart, newStart])\n } else if (newStart.isLessThan(oldStart)) {\n diffs.push([newStart, oldStart])\n }\n\n if (oldEnd.isLessThan(newEnd)) {\n diffs.push([oldEnd, newEnd])\n } else if (newEnd.isLessThan(oldEnd)) {\n diffs.push([newEnd, oldEnd])\n }\n\n return diffs\n}\n","\"use strict\"\n\nimport { Emitter } from \"atom\"\n\nlet idCounter = 0\nconst nextId = function () {\n return idCounter++\n}\n\n/**\n * The `Decoration` class represents a decoration in the Minimap.\n *\n * It has the same API than the `Decoration` class of a text editor.\n */\nexport default class Decoration {\n /**\n * Returns `true` if the passed-in decoration properties matches the specified type.\n *\n * @param {Object} decorationProperties The decoration properties to match\n * @param {string} type The decoration type to match\n * @returns {boolean} Whether the decoration properties match the type\n */\n static isType(decorationProperties, type) {\n if (Array.isArray(decorationProperties.type)) {\n if (decorationProperties.type.indexOf(type) >= 0) {\n return true\n }\n return false\n } else {\n return type === decorationProperties.type\n }\n }\n\n /**\n * Creates a new decoration.\n *\n * @param {Marker} marker The target marker for the decoration\n * @param {Minimap} minimap The Minimap where the decoration will be displayed\n * @param {Object} properties The decoration's properties\n */\n constructor(marker, minimap, properties) {\n /** @access private */\n this.marker = marker\n /** @access private */\n this.minimap = minimap\n /** @access private */\n this.emitter = new Emitter()\n /** @access private */\n this.id = nextId()\n /** @access private */\n this.properties = null\n this.setProperties(properties)\n this.properties.id = this.id\n /** @access private */\n this.destroyed = false\n /** @access private */\n this.markerDestroyDisposable = this.marker.onDidDestroy(() => {\n this.destroy()\n })\n\n this.screenRange = marker.getScreenRange()\n }\n\n /**\n * Destroy this marker.\n *\n * If you own the marker, you should use `Marker#destroy` which will destroy this decoration.\n */\n destroy() {\n if (this.destroyed) {\n return\n }\n\n this.markerDestroyDisposable?.dispose?.()\n this.destroyed = true\n this.emitter.emit(\"did-destroy\")\n this.emitter.dispose()\n }\n\n /**\n * Returns whether this decoration is destroyed or not.\n *\n * @returns {boolean} Whether this decoration is destroyed or not\n */\n isDestroyed() {\n return this.destroyed\n }\n\n /**\n * Registers an event listener to the `did-change-properties` event.\n *\n * This event is triggered when the decoration update method is called.\n *\n * @param {function(change:Object):void} callback A function to call when the event is triggered\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChangeProperties(callback) {\n if (this.destroyed) {\n return\n }\n return this.emitter.on(\"did-change-properties\", callback)\n }\n\n /**\n * Registers an event listener to the `did-destroy` event.\n *\n * @param {function():void} callback A function to call when the event is triggered\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidDestroy(callback) {\n if (this.destroyed) {\n return\n }\n return this.emitter.on(\"did-destroy\", callback)\n }\n\n /**\n * An id unique across all Decoration objects.\n *\n * @returns {number} The decoration id\n */\n getId() {\n return this.id\n }\n\n /**\n * Returns the marker associated with this Decoration.\n *\n * @returns {Marker} The decoration's marker\n */\n getMarker() {\n return this.marker\n }\n\n /**\n * Check if this decoration is of type `type`.\n *\n * @param {string | Array} type A type like `'line-number'`, `'line'`, etc. `type` can also be an Array of Strings,\n * where it will return true if the decoration's type matches any in the array.\n * @returns {boolean} Whether this decoration match the passed-in type\n */\n isType(type) {\n return Decoration.isType(this.properties, type)\n }\n\n /**\n * Returns the Decoration's properties.\n *\n * @returns {Object} The decoration's properties\n */\n getProperties() {\n return this.properties\n }\n\n /**\n * Update the marker with new properties. Allows you to change the decoration's class.\n *\n * @param {Object} newProperties The new properties for the decoration\n */\n setProperties(newProperties) {\n if (this.destroyed) {\n return\n }\n\n const oldProperties = this.properties\n this.properties = newProperties\n this.properties.id = this.id\n\n this.emitter.emit(\"did-change-properties\", { oldProperties, newProperties })\n }\n}\n","\"use strict\"\n\nimport { escapeRegExp } from \"../deps/underscore-plus\"\nimport Mixin from \"mixto\"\n\nimport * as Main from \"../main\"\nimport { styleReader } from \"../main\"\nimport CanvasLayer from \"../canvas-layer\"\n\nconst SPEC_MODE = atom.inSpecMode()\n// an instance of MinimapElement used for testing and calling spies\nlet thisSpec\n\n/**\n * The `CanvasDrawer` mixin is responsible for the rendering of a `Minimap` in a `canvas` element.\n *\n * This mixin is injected in the `MinimapElement` prototype, so all these methods are available on any `MinimapElement` instance.\n */\nexport default class CanvasDrawer extends Mixin {\n /** Initializes the canvas elements needed to perform the `Minimap` rendering. */\n initializeCanvas() {\n if (SPEC_MODE) {\n // class methods only used for spying the calls\n this.drawLines = (firstLine, lastLine) => {\n console.log({ firstLine, lastLine })\n }\n this.drawLineDecoration = drawLineDecoration\n this.drawGutterDecoration = drawGutterDecoration\n this.drawHighlightDecoration = drawHighlightDecoration\n this.drawHighlightOutlineDecoration = drawHighlightOutlineDecoration\n this.drawCustomDecoration = drawCustomDecoration\n this.StyleReader = styleReader\n thisSpec = this\n }\n\n /**\n * The main canvas layer where lines are rendered.\n *\n * @type {CanvasLayer}\n */\n this.tokensLayer = new CanvasLayer()\n /**\n * The canvas layer for decorations below the text.\n *\n * @type {CanvasLayer}\n */\n this.backLayer = new CanvasLayer()\n /**\n * The canvas layer for decorations above the text.\n *\n * @type {CanvasLayer}\n */\n this.frontLayer = new CanvasLayer()\n\n if (!this.pendingChanges) {\n /**\n * Stores the changes from the text editor.\n *\n * @type {Object[]}\n * @access private\n */\n this.pendingChanges = []\n }\n\n if (!this.pendingBackDecorationChanges) {\n /**\n * Stores the changes from the minimap back decorations.\n *\n * @type {Object[]}\n * @access private\n */\n this.pendingBackDecorationChanges = []\n }\n\n if (!this.pendingFrontDecorationChanges) {\n /**\n * Stores the changes from the minimap front decorations.\n *\n * @type {Object[]}\n * @access private\n */\n this.pendingFrontDecorationChanges = []\n }\n\n // the maximum number of tokens to render in one line\n this.maxTokensInOneLine = atom.config.get(\"minimap.maxTokensInOneLine\")\n }\n\n /**\n * Returns the uppermost canvas in the MinimapElement.\n *\n * @returns {HTMLCanvasElement} The html canvas element\n */\n getFrontCanvas() {\n return this.frontLayer.canvas\n }\n\n /**\n * Attaches the canvases into the specified container.\n *\n * @param {HTMLElement} parent The canvases' container\n * @access private\n */\n attachCanvases(parent) {\n this.backLayer.attach(parent)\n this.tokensLayer.attach(parent)\n this.frontLayer.attach(parent)\n }\n\n /**\n * Changes the size of all the canvas layers at once.\n *\n * @param {number} width The new width for the three canvases\n * @param {number} height The new height for the three canvases\n * @access private\n */\n setCanvasesSize(width, height) {\n this.backLayer.setSize(width, height)\n this.tokensLayer.setSize(width, height)\n this.frontLayer.setSize(width, height)\n }\n\n /** Performs an update of the rendered `Minimap` based on the changes registered in the instance. */\n updateCanvas() {\n const firstRow = this.minimap.getFirstVisibleScreenRow()\n const lastRow = this.minimap.getLastVisibleScreenRow()\n\n const devicePixelRatio = this.minimap.getDevicePixelRatio()\n const lineHeight = this.minimap.getLineHeight() * devicePixelRatio\n const charHeight = this.minimap.getCharHeight() * devicePixelRatio\n const charWidth = this.minimap.getCharWidth() * devicePixelRatio\n const { width: canvasWidth, height: canvasHeight } = this.tokensLayer.getSize()\n const editor = this.minimap.getTextEditor()\n const editorElement = this.minimap.getTextEditorElement()\n\n // TODO avoid closure: https://stackoverflow.com/a/46256398/7910299\n const getTokenColorClosure = this.displayCodeHighlights\n ? (scopes) => getTokenColor(scopes, editorElement, this.textOpacity)\n : () => getDefaultColor(editorElement, this.textOpacity)\n\n updateTokensLayer(\n this.tokensLayer,\n firstRow,\n lastRow,\n this.offscreenFirstRow,\n this.offscreenLastRow,\n this.pendingChanges,\n lineHeight,\n charHeight,\n charWidth,\n canvasWidth,\n editor,\n editor.getScreenLineCount(),\n getInvisibleRegExp(editor),\n getTokenColorClosure,\n this.ignoreWhitespacesInTokens,\n this.maxTokensInOneLine\n )\n\n if (SPEC_MODE) {\n // call the spy for drawLines which is used inside updateTokensLayer\n this.drawLines(firstRow, lastRow)\n }\n\n const decorations = this.DecorationManagement.decorationsByTypeThenRows(firstRow, lastRow)\n\n const renderData = {\n context: this.backLayer.context,\n canvasWidth,\n canvasHeight,\n lineHeight,\n charWidth,\n charHeight,\n orders: Main.getPluginsOrder(),\n }\n\n const drawCustomDecorationLambda = (decoration, data, decorationColor) =>\n drawCustomDecoration(decoration, data, decorationColor, editorElement)\n backgroundDecorationDispatcher[\"background-custom\"] = drawCustomDecorationLambda\n frontDecorationDispatcher[\"foreground-custom\"] = drawCustomDecorationLambda\n\n updateBackDecorationsLayer(\n this.backLayer,\n firstRow,\n lastRow,\n this.offscreenFirstRow,\n this.offscreenLastRow,\n this.pendingBackDecorationChanges,\n renderData,\n lineHeight,\n editorElement,\n decorations\n )\n\n renderData.context = this.frontLayer.context\n\n updateFrontDecorationsLayer(\n this.frontLayer,\n firstRow,\n lastRow,\n this.offscreenFirstRow,\n this.offscreenLastRow,\n this.pendingFrontDecorationChanges,\n renderData,\n lineHeight,\n editorElement,\n decorations\n )\n\n this.pendingChanges = []\n this.pendingBackDecorationChanges = []\n this.pendingFrontDecorationChanges = []\n\n /**\n * The first row in the last render of the offscreen canvas.\n *\n * @type {number}\n * @access private\n */\n this.offscreenFirstRow = firstRow\n /**\n * The last row in the last render of the offscreen canvas.\n *\n * @type {number}\n * @access private\n */\n this.offscreenLastRow = lastRow\n }\n\n // ######## ######## ### ## ##\n // ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## ## ##\n // ## ## ######## ## ## ## ## ##\n // ## ## ## ## ######### ## ## ##\n // ## ## ## ## ## ## ## ## ##\n // ######## ## ## ## ## ### ###\n\n /**\n * Routine used to render changes in specific ranges for one layer.\n *\n * @param {CanvasLayer} layer The layer to redraw\n * @param {Object[]} intactRanges An array of the ranges to leave intact\n * @param {number} firstRow FirstRow the first row of the range to update\n * @param {number} lastRow LastRow the last row of the range to update\n * @param {Function} method The render method to use for the lines drawing\n * @access private Unused (inlined the code for performance reasons)\n */\n // redrawRangesOnLayer (layer, intactRanges, firstRow, lastRow, method) {\n // const devicePixelRatio = this.minimap.getDevicePixelRatio()\n // const lineHeight = this.minimap.getLineHeight() * devicePixelRatio\n //\n // layer.clearCanvas()\n //\n // if (intactRanges.length === 0) {\n // method.call(this, firstRow, lastRow, 0)\n // } else {\n // for (let j = 0, len = intactRanges.length; j < len; j++) {\n // const intact = intactRanges[j]\n //\n // layer.copyPartFromOffscreen(\n // intact.offscreenRow * lineHeight,\n // (intact.start - firstRow) * lineHeight,\n // (intact.end - intact.start) * lineHeight\n // )\n // }\n // drawLinesForRanges(method, intactRanges, firstRow, lastRow)\n // }\n //\n // layer.resetOffscreenSize()\n // layer.copyToOffscreen()\n // }\n\n /**\n * Renders the lines between the intact ranges when an update has pending changes.\n *\n * @param {Function} method The render method to use for the lines drawing\n * @param {Object[]} intactRanges The intact ranges in the minimap\n * @param {number} firstRow The first row of the rendered region\n * @param {number} lastRow The last row of the rendered region\n * @access private Unused (inlined the code for performance reasons)\n */\n // drawLinesForRanges (method, ranges, firstRow, lastRow) {\n // let currentRow = firstRow\n // for (let i = 0, len = ranges.length; i < len; i++) {\n // const range = ranges[i]\n //\n // method.call(this, currentRow, range.start, currentRow - firstRow)\n //\n // currentRow = range.end\n // }\n // if (currentRow <= lastRow) {\n // method.call(this, currentRow, lastRow, currentRow - firstRow)\n // }\n // }\n}\n\n// ######## ######## ### ## ##\n// ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ##\n// ## ## ######## ## ## ## ## ##\n// ## ## ## ## ######### ## ## ##\n// ## ## ## ## ## ## ## ## ##\n// ######## ## ## ## ## ### ###\n\n/**\n * Performs an update of the tokens layer using the pending changes array.\n *\n * @param {CanvasLayer} tokensLayer\n * @param {number} firstRow FirstRow the first row of the range to update\n * @param {number} lastRow LastRow the last row of the range to update\n * @param {number} offscreenFirstRow\n * @param {number} offscreenLastRow\n * @param {Array<>} pendingChanges\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {number} charHeight This.minimap.getCharHeight() * devicePixelRatio\n * @param {number} charWidth This.minimap.getCharWidth() * devicePixelRatio\n * @param {number} canvasWidth This.tokensLayer.getSize().width\n * @param {TextEditor} editor This.minimap.getTextEditor()\n * @param {(t: Token) => string} getTokenColorClosure\n * @param {boolean} ignoreWhitespacesInTokens This.ignoreWhitespacesInTokens\n * @param {number} maxTokensInOneLine This.maxTokensInOneLine\n * @access private\n */\nfunction updateTokensLayer(\n tokensLayer,\n firstRow,\n lastRow,\n offscreenFirstRow,\n offscreenLastRow,\n pendingChanges,\n lineHeight,\n charHeight,\n charWidth,\n canvasWidth,\n editor,\n editorScreenLineCount,\n invisibleRegExp,\n getTokenColorClosure,\n ignoreWhitespacesInTokens,\n maxTokensInOneLine\n) {\n // NOTE: this method is the hot function of Minimap. Do not refactor. The code is inlined delibarately.\n\n const intactRanges = computeIntactRanges(firstRow, lastRow, pendingChanges, offscreenFirstRow, offscreenLastRow)\n\n // redrawRangesOnLayer\n const context = tokensLayer.context\n\n tokensLayer.clearCanvas()\n\n if (intactRanges.length === 0) {\n drawLines(\n firstRow,\n lastRow,\n 0,\n lineHeight,\n charHeight,\n charWidth,\n canvasWidth,\n context,\n editor,\n editorScreenLineCount,\n invisibleRegExp,\n getTokenColorClosure,\n ignoreWhitespacesInTokens,\n maxTokensInOneLine\n )\n } else {\n for (let j = 0, len = intactRanges.length; j < len; j++) {\n const intact = intactRanges[j]\n\n tokensLayer.copyPartFromOffscreen(\n intact.offscreenRow * lineHeight,\n (intact.start - firstRow) * lineHeight,\n (intact.end - intact.start) * lineHeight\n )\n }\n // drawLinesForRanges\n let currentRow = firstRow\n for (let i = 0, len = intactRanges.length; i < len; i++) {\n const range = intactRanges[i]\n\n drawLines(\n currentRow,\n range.start,\n currentRow - firstRow,\n lineHeight,\n charHeight,\n charWidth,\n canvasWidth,\n context,\n editor,\n editorScreenLineCount,\n invisibleRegExp,\n getTokenColorClosure,\n ignoreWhitespacesInTokens,\n maxTokensInOneLine\n )\n\n currentRow = range.end\n }\n if (currentRow <= lastRow) {\n drawLines(\n currentRow,\n lastRow,\n currentRow - firstRow,\n lineHeight,\n charHeight,\n charWidth,\n canvasWidth,\n context,\n editor,\n editorScreenLineCount,\n invisibleRegExp,\n getTokenColorClosure,\n ignoreWhitespacesInTokens,\n maxTokensInOneLine\n )\n }\n }\n\n tokensLayer.resetOffscreenSize()\n tokensLayer.copyToOffscreen()\n}\n\n/**\n * Performs an update of the back decorations layer using the pending back decorations changes arrays.\n *\n * @param {CanvasLayer} backLayer\n * @param {number} firstRow FirstRow the first row of the range to update\n * @param {number} lastRow LastRow the last row of the range to update\n * @param {number} offscreenFirstRow\n * @param {number} offscreenLastRow\n * @param {Array<>} pendingBackDecorationChanges\n * @param {Object} renderData\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {TextEditorElement} editorElement This.minimap.getTextEditorElement()\n * @param {Decoration[]} decorations\n * @access private\n */\nfunction updateBackDecorationsLayer(\n backLayer,\n firstRow,\n lastRow,\n offscreenFirstRow,\n offscreenLastRow,\n pendingBackDecorationChanges,\n renderData,\n lineHeight,\n editorElement,\n decorations\n) {\n const intactRanges = computeIntactRanges(\n firstRow,\n lastRow,\n pendingBackDecorationChanges,\n offscreenFirstRow,\n offscreenLastRow\n )\n\n // NOTE: this method is the hot function of Minimap. Do not refactor. The code is inlined delibarately.\n\n // redrawRangesOnLayer\n\n backLayer.clearCanvas()\n\n if (intactRanges.length === 0) {\n drawBackDecorationsForLines(firstRow, lastRow, 0, renderData, lineHeight, editorElement, decorations)\n } else {\n for (let j = 0, len = intactRanges.length; j < len; j++) {\n const intact = intactRanges[j]\n\n backLayer.copyPartFromOffscreen(\n intact.offscreenRow * lineHeight,\n (intact.start - firstRow) * lineHeight,\n (intact.end - intact.start) * lineHeight\n )\n }\n // drawLinesForRanges\n let currentRow = firstRow\n for (let i = 0, len = intactRanges.length; i < len; i++) {\n const range = intactRanges[i]\n\n drawBackDecorationsForLines(\n currentRow,\n range.start,\n currentRow - firstRow,\n renderData,\n lineHeight,\n editorElement,\n decorations\n )\n\n currentRow = range.end\n }\n if (currentRow <= lastRow) {\n drawBackDecorationsForLines(\n currentRow,\n lastRow,\n currentRow - firstRow,\n renderData,\n lineHeight,\n editorElement,\n decorations\n )\n }\n }\n\n backLayer.resetOffscreenSize()\n backLayer.copyToOffscreen()\n}\n\n/**\n * Performs an update of the front decorations layer using the pending front decorations changes arrays.\n *\n * @param {CanvasLayer} frontLayer\n * @param {number} firstRow FirstRow the first row of the range to update\n * @param {number} lastRow LastRow the last row of the range to update\n * @param {number} offscreenFirstRow\n * @param {number} offscreenLastRow\n * @param {Array<>} pendingFrontDecorationChanges\n * @param {Object} renderData\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {TextEditorElement} editorElement This.minimap.getTextEditorElement()\n * @param {Decoration[]} decorations\n * @access private\n */\nfunction updateFrontDecorationsLayer(\n frontLayer,\n firstRow,\n lastRow,\n offscreenFirstRow,\n offscreenLastRow,\n pendingFrontDecorationChanges,\n renderData,\n lineHeight,\n editorElement,\n decorations\n) {\n const intactRanges = computeIntactRanges(\n firstRow,\n lastRow,\n pendingFrontDecorationChanges,\n offscreenFirstRow,\n offscreenLastRow\n )\n\n // NOTE: this method is the hot function of Minimap. Do not refactor. The code is inlined delibarately.\n\n // redrawRangesOnLayer\n\n frontLayer.clearCanvas()\n\n if (intactRanges.length === 0) {\n drawFrontDecorationsForLines(firstRow, lastRow, 0, renderData, lineHeight, editorElement, decorations)\n } else {\n for (let j = 0, len = intactRanges.length; j < len; j++) {\n const intact = intactRanges[j]\n\n frontLayer.copyPartFromOffscreen(\n intact.offscreenRow * lineHeight,\n (intact.start - firstRow) * lineHeight,\n (intact.end - intact.start) * lineHeight\n )\n }\n // drawLinesForRanges\n let currentRow = firstRow\n for (let i = 0, len = intactRanges.length; i < len; i++) {\n const range = intactRanges[i]\n\n drawFrontDecorationsForLines(\n currentRow,\n range.start,\n currentRow - firstRow,\n renderData,\n lineHeight,\n editorElement,\n decorations\n )\n\n currentRow = range.end\n }\n if (currentRow <= lastRow) {\n drawFrontDecorationsForLines(\n currentRow,\n lastRow,\n currentRow - firstRow,\n renderData,\n lineHeight,\n editorElement,\n decorations\n )\n }\n }\n\n frontLayer.resetOffscreenSize()\n frontLayer.copyToOffscreen()\n}\n\nconst whitespaceTokenRegex = /^\\s+$/\nconst oneOrMoreWhiteSpaceRegexp = /\\s+/\n\n/**\n * Draws a single token on the given context.\n *\n * @param {CanvasRenderingContext2D} context The target canvas context\n * @param {string} text The token's text content\n * @param {string} color The token's CSS color\n * @param {number} x The x position of the token in the line\n * @param {number} y The y position of the line in the minimap\n * @param {number} charWidth The width of a character in the minimap\n * @param {number} charHeight The height of a character in the minimap\n * @returns {number} The x position at the end of the token\n * @access private\n */\nfunction drawToken(context, text, color, x, y, charWidth, charHeight, ignoreWhitespacesInTokens) {\n context.fillStyle = color\n\n if (ignoreWhitespacesInTokens) {\n const length = text.length * charWidth\n context.fillRect(x, y, length, charHeight)\n\n return x + length\n } else {\n let chars = 0\n for (let j = 0, len = text.length; j < len; j++) {\n const char = text[j]\n if (char === \" \") {\n if (chars > 0) {\n context.fillRect(x - chars * charWidth, y, chars * charWidth, charHeight)\n }\n chars = 0\n } else {\n chars++\n }\n x += charWidth\n }\n if (chars > 0) {\n context.fillRect(x - chars * charWidth, y, chars * charWidth, charHeight)\n }\n return x\n }\n}\n\n/**\n * Draws lines on the corresponding layer.\n *\n * The lines range to draw is specified by the `firstRow` and `lastRow` parameters.\n *\n * @param {number} firstRow The first row to render\n * @param {number} lastRow The last row to render\n * @param {number} offsetRow The relative offset to apply to rows when rendering them\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {number} charHeight This.minimap.getCharHeight() * devicePixelRatio\n * @param {number} charWidth This.minimap.getCharWidth() * devicePixelRatio\n * @param {number} canvasWidth This.tokensLayer.getSize().width\n * @param {CanvasRenderingContext2D} context This.tokensLayer.context\n * @param {TextEditor} editor This.minimap.getTextEditor()\n * @param {number} editorScreenLineCount\n * @param {RegExp} invisibleRegExp\n * @param {(t: Token) => string} getTokenColorClosure\n * @param {boolean} ignoreWhitespacesInTokens This.ignoreWhitespacesInTokens\n * @param {number} maxTokensInOneLine This.maxTokensInOneLine\n * @access private\n */\nfunction drawLines(\n firstRow,\n lastRow,\n offsetRow,\n lineHeight,\n charHeight,\n charWidth,\n canvasWidth,\n context,\n editor,\n editorScreenLineCount,\n invisibleRegExp,\n getTokenColorClosure,\n ignoreWhitespacesInTokens,\n maxTokensInOneLine\n) {\n // NOTE: this method is the hot function of Minimap. Do not refactor. The code is inlined delibarately.\n\n if (firstRow > lastRow) {\n return\n }\n\n let lastLine, x\n let y = offsetRow * lineHeight - lineHeight\n\n // eachTokenForScreenRows\n lastRow = Math.min(lastRow, editorScreenLineCount)\n\n for (let line = firstRow; line < lastRow; line++) {\n const editorTokensForScreenRow = editor.tokensForScreenRow(line)\n const numToken = editorTokensForScreenRow.length\n const numTokenToRender = Math.min(numToken, maxTokensInOneLine)\n\n if (lastLine !== line) {\n x = 0\n y += lineHeight\n lastLine = line\n context.clearRect(x, y, canvasWidth, lineHeight)\n }\n\n for (let iToken = 0; iToken < numTokenToRender; iToken++) {\n const token = editorTokensForScreenRow[iToken]\n const tokenText = token.text.replace(invisibleRegExp, \" \")\n const tokenScopes = token.scopes\n\n if (x > canvasWidth) {\n continue\n }\n\n if (whitespaceTokenRegex.test(tokenText)) {\n x += tokenText.length * charWidth\n } else {\n x = drawToken(\n context,\n tokenText,\n getTokenColorClosure(tokenScopes),\n x,\n y,\n charWidth,\n charHeight,\n ignoreWhitespacesInTokens\n )\n }\n }\n }\n\n context.fill()\n}\n\n/**\n * Returns the regexp to replace invisibles substitution characters in editor lines.\n *\n * @param {TextEditor} editor\n * @returns {RegExp} The regular expression to match invisible characters\n * @access private\n */\nfunction getInvisibleRegExp(editor) {\n const invisibles = editor.getInvisibles()\n const regexp = []\n if (invisibles.cr != null) {\n regexp.push(invisibles.cr)\n }\n if (invisibles.eol != null) {\n regexp.push(invisibles.eol)\n }\n if (invisibles.space != null) {\n regexp.push(invisibles.space)\n }\n if (invisibles.tab != null) {\n regexp.push(invisibles.tab)\n }\n\n if (regexp.length !== 0) {\n return RegExp(\n regexp\n .filter((s) => {\n return typeof s === \"string\"\n })\n .map(escapeRegExp)\n .join(\"|\"),\n \"g\"\n )\n } else {\n return null\n }\n}\n\n/**\n * Dispatchers for decoration drawing (custom decoration drawer added dynamically)\n *\n * @param {Object} backgroundDecorationDispatcher An object with the type to render as key and the render method as value\n */\nconst backgroundDecorationDispatcher = {\n line: drawLineDecoration,\n \"highlight-under\": drawHighlightDecoration,\n}\n\n/**\n * Dispatchers for decoration drawing (custom decoration drawer added dynamically)\n *\n * @param {Object} frontDecorationDispatcher An object with the type to render as key and the render method as value\n */\nconst frontDecorationDispatcher = {\n gutter: drawGutterDecoration,\n \"highlight-over\": drawHighlightDecoration,\n \"highlight-outline\": drawHighlightOutlineDecoration,\n}\n\n/**\n * Draws a line decoration.\n *\n * @param {Decoration} decoration The decoration to render\n * @param {Object} data The data need to perform the render\n * @param {string} decorationColor Decoration color\n * @access private\n */\nfunction drawLineDecoration(decoration, data, decorationColor) {\n const { context, lineHeight, canvasWidth, yRow } = data\n\n context.fillStyle = decorationColor\n context.fillRect(0, yRow, canvasWidth, lineHeight)\n}\n\n/**\n * Draws a gutter decoration.\n *\n * @param {Decoration} decoration The decoration to render\n * @param {Object} data The data need to perform the render\n * @param {string} decorationColor Decoration color\n * @access private\n */\nfunction drawGutterDecoration(decoration, data, decorationColor) {\n const { context, lineHeight, yRow } = data\n\n context.fillStyle = decorationColor\n context.fillRect(0, yRow, 1, lineHeight)\n}\n\n/**\n * Draws a highlight decoration.\n *\n * It renders only the part of the highlight corresponding to the specified row.\n *\n * @param {Decoration} decoration The decoration to render\n * @param {Object} data The data need to perform the render\n * @param {string} decorationColor Decoration color\n * @access private\n */\nfunction drawHighlightDecoration(decoration, data, decorationColor) {\n const { context, lineHeight, charWidth, canvasWidth, screenRow, yRow } = data\n\n const range = decoration.getMarker().getScreenRange()\n const rowSpan = range.end.row - range.start.row\n\n context.fillStyle = decorationColor\n\n if (rowSpan === 0) {\n const colSpan = range.end.column - range.start.column\n context.fillRect(range.start.column * charWidth, yRow, colSpan * charWidth, lineHeight)\n } else if (screenRow === range.start.row) {\n const x = range.start.column * charWidth\n context.fillRect(x, yRow, canvasWidth - x, lineHeight)\n } else if (screenRow === range.end.row) {\n context.fillRect(0, yRow, range.end.column * charWidth, lineHeight)\n } else {\n context.fillRect(0, yRow, canvasWidth, lineHeight)\n }\n}\n\n/**\n * Draws a highlight outline decoration.\n *\n * It renders only the part of the highlight corresponding to the specified row.\n *\n * @param {Decoration} decoration The decoration to render\n * @param {Object} data The data need to perform the render\n * @param {string} decorationColor Decoration color\n * @access private\n */\nfunction drawHighlightOutlineDecoration(decoration, data, decorationColor) {\n const { context, lineHeight, charWidth, canvasWidth, screenRow, yRow } = data\n\n let bottomWidth, colSpan, width, xBottomStart, xEnd, xStart\n const range = decoration.getMarker().getScreenRange()\n const rowSpan = range.end.row - range.start.row\n const yStart = yRow\n const yEnd = yStart + lineHeight\n\n context.fillStyle = decorationColor\n\n if (rowSpan === 0) {\n colSpan = range.end.column - range.start.column\n width = colSpan * charWidth\n xStart = range.start.column * charWidth\n xEnd = xStart + width\n\n context.fillRect(xStart, yStart, width, 1)\n context.fillRect(xStart, yEnd - 1, width, 1)\n context.fillRect(xStart, yStart, 1, lineHeight)\n context.fillRect(xEnd, yStart, 1, lineHeight)\n } else if (rowSpan === 1) {\n xStart = range.start.column * charWidth\n xEnd = range.end.column * charWidth\n\n if (screenRow === range.start.row) {\n width = canvasWidth - xStart\n xBottomStart = Math.max(xStart, xEnd)\n bottomWidth = canvasWidth - xBottomStart\n\n context.fillRect(xStart, yStart, width, 1)\n context.fillRect(xBottomStart, yEnd - 1, bottomWidth, 1)\n context.fillRect(xStart, yStart, 1, lineHeight)\n context.fillRect(canvasWidth - 1, yStart, 1, lineHeight)\n } else {\n width = canvasWidth - xStart\n bottomWidth = canvasWidth - xEnd\n\n context.fillRect(0, yStart, xStart, 1)\n context.fillRect(0, yEnd - 1, xEnd, 1)\n context.fillRect(0, yStart, 1, lineHeight)\n context.fillRect(xEnd, yStart, 1, lineHeight)\n }\n } else {\n xStart = range.start.column * charWidth\n xEnd = range.end.column * charWidth\n if (screenRow === range.start.row) {\n width = canvasWidth - xStart\n\n context.fillRect(xStart, yStart, width, 1)\n context.fillRect(xStart, yStart, 1, lineHeight)\n context.fillRect(canvasWidth - 1, yStart, 1, lineHeight)\n } else if (screenRow === range.end.row) {\n width = canvasWidth - xStart\n\n context.fillRect(0, yEnd - 1, xEnd, 1)\n context.fillRect(0, yStart, 1, lineHeight)\n context.fillRect(xEnd, yStart, 1, lineHeight)\n } else {\n context.fillRect(0, yStart, 1, lineHeight)\n context.fillRect(canvasWidth - 1, yStart, 1, lineHeight)\n if (screenRow === range.start.row + 1) {\n context.fillRect(0, yStart, xStart, 1)\n }\n if (screenRow === range.end.row - 1) {\n context.fillRect(xEnd, yEnd - 1, canvasWidth - xEnd, 1)\n }\n }\n }\n}\n\n/**\n * Draws a custom decoration.\n *\n * It renders only the part of the highlight corresponding to the specified row.\n *\n * @param {Decoration} decoration The decoration to render\n * @param {Object} data The data need to perform the render\n * @param {string} decorationColor Decoration color\n * @param {TextEditorElement} editorElement\n * @access private\n */\nfunction drawCustomDecoration(decoration, data, decorationColor, editorElement) {\n const renderRoutine = decoration.getProperties().render\n\n if (renderRoutine) {\n data.color = decorationColor\n renderRoutine(decoration, data, editorElement)\n }\n}\n\n/**\n * Draws the specified decorations for the current `screenRow`.\n *\n * The `decorations` object contains all the decorations grouped by type and then rows.\n *\n * @param {number} screenRow The screen row index for which render decorations\n * @param {Object} decorations The object containing all the decorations\n * @param {Object} renderData The object containing the render data\n * @param {Object} types An object with the type to render as key and the render method as value\n * @param {TextEditorElement} editorElement\n * @access private\n */\nfunction drawDecorations(screenRow, decorations, renderData, types, editorElement) {\n let decorationsToRender = []\n\n renderData.context.clearRect(0, renderData.yRow, renderData.canvasWidth, renderData.lineHeight)\n\n for (const i in types) {\n decorationsToRender = decorationsToRender.concat(decorations[i] != null ? decorations[i][screenRow] || [] : [])\n }\n\n decorationsToRender.sort(\n (a, b) => (renderData.orders[a.properties.plugin] || 0) - (renderData.orders[b.properties.plugin] || 0)\n )\n\n if (decorationsToRender != null ? decorationsToRender.length : undefined) {\n for (let i = 0, len = decorationsToRender.length; i < len; i++) {\n const decoration = decorationsToRender[i]\n const decorationDrawer = types[decoration.properties.type]\n if (!SPEC_MODE) {\n decorationDrawer(decoration, renderData, /* decorationColor */ getDecorationColor(decoration, editorElement))\n } else {\n // get the real function name from the mangeld Parcel names\n const functionName = decorationDrawer.name.split(\"$\").pop().replace(\"Lambda\", \"\")\n // call the spy:\n thisSpec[functionName](\n decoration,\n renderData,\n /* decorationColor */ getDecorationColor(decoration, editorElement)\n )\n }\n }\n }\n}\n\n/**\n * Draws front decorations on the corresponding layer.\n *\n * The lines range to draw is specified by the `firstRow` and `lastRow` parameters.\n *\n * @param {number} firstRow The first row to render\n * @param {number} lastRow The last row to render\n * @param {number} offsetRow The relative offset to apply to rows when rendering them\n * @param {Object} renderData\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {TextEditorElement} editorElement This.minimap.getTextEditorElement()\n * @param {Decoration[]} decorations\n * @access private\n */\nfunction drawFrontDecorationsForLines(\n firstRow,\n lastRow,\n offsetRow,\n renderData,\n lineHeight,\n editorElement,\n decorations\n) {\n if (firstRow > lastRow) {\n return\n }\n\n for (let screenRow = firstRow; screenRow <= lastRow; screenRow++) {\n renderData.row = offsetRow + (screenRow - firstRow)\n renderData.yRow = renderData.row * lineHeight\n renderData.screenRow = screenRow\n\n drawDecorations(screenRow, decorations, renderData, frontDecorationDispatcher, editorElement)\n }\n\n renderData.context.fill()\n}\n\n/**\n * Draws back decorations on the corresponding layer.\n *\n * The lines range to draw is specified by the `firstRow` and `lastRow` parameters.\n *\n * @param {number} firstRow The first row to render\n * @param {number} lastRow The last row to render\n * @param {number} offsetRow The relative offset to apply to rows when rendering them\n * @param {Object} renderData\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {TextEditorElement} editorElement This.minimap.getTextEditorElement()\n * @param {Decoration[]} decorations\n * @access private\n */\nfunction drawBackDecorationsForLines(firstRow, lastRow, offsetRow, renderData, lineHeight, editorElement, decorations) {\n if (firstRow > lastRow) {\n return\n }\n\n for (let screenRow = firstRow; screenRow <= lastRow; screenRow++) {\n renderData.row = offsetRow + (screenRow - firstRow)\n renderData.yRow = renderData.row * lineHeight\n renderData.screenRow = screenRow\n\n drawDecorations(screenRow, decorations, renderData, backgroundDecorationDispatcher, editorElement)\n }\n\n renderData.context.fill()\n}\n\n// ###### ####### ## ####### ######## ######\n// ## ## ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ######## ######\n// ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ## ## ##\n// ###### ####### ######## ####### ## ## ######\n\n/**\n * Returns the opacity value to use when rendering the `Minimap` text.\n *\n * @returns {Number} The text opacity value Unused (inlined)\n */\n// getTextOpacity () { return this.textOpacity }\n\n/**\n * Returns the default text color for an editor content.\n *\n * The color value is directly read from the `TextEditorView` computed styles.\n *\n * @param {TextEditorElement} editorElement\n * @param {number} textOpacity\n * @returns {string} A CSS color\n */\nfunction getDefaultColor(editorElement, textOpacity) {\n const color = styleReader.retrieveStyleFromDom([\".editor\"], \"color\", editorElement, true)\n return transparentize(color, textOpacity)\n}\n\n/**\n * Returns the text color for the passed-in scopes\n *\n * The color value is read from the DOM by creating a node structure that match the token `scope` property.\n *\n * @param {string[]} scopes An array of scopes for a `TextEditor` token (token.scopeDescriptor || token.scopes)\n * @param {TextEditorElement} editorElement\n * @param {number} textOpacity\n * @returns {string} The CSS color for the provided token\n */\nfunction getTokenColor(scopes, editorElement, textOpacity) {\n const color = styleReader.retrieveStyleFromDom(scopes, \"color\", editorElement, true)\n\n return transparentize(color, textOpacity)\n}\n\n/**\n * Converts a `rgb(...)` color into a `rgba(...)` color with the specified opacity.\n *\n * @param {string} color The CSS RGB color to transparentize\n * @param {number} opacity The opacity amount\n * @returns {string} The transparentized CSS color\n * @access private\n */\nfunction transparentize(color, opacity) {\n // assumes that color is in form of `rgb(content)` with no spaces around the given value\n return `rgba(${color.slice(4, -1)}, ${opacity})`\n}\n\n/**\n * Returns the background color for the passed-in `decoration` object.\n *\n * The color value is read from the DOM by creating a node structure that match the decoration `scope` property unless\n * the decoration provides its own `color` property.\n *\n * @param {Decoration} decoration The decoration to get the color for\n * @param {TextEditorElement} editorElement\n * @returns {string} The CSS color for the provided decoration\n */\nfunction getDecorationColor(decoration, editorElement) {\n const properties = decoration.getProperties()\n if (properties.color) {\n return properties.color\n }\n\n if (properties.scope) {\n const scopeString = properties.scope.split(oneOrMoreWhiteSpaceRegexp)\n return styleReader.retrieveStyleFromDom(scopeString, \"background-color\", editorElement, true)\n } else {\n return getDefaultColor(editorElement)\n }\n}\n\n// ######## ### ## ## ###### ######## ######\n// ## ## ## ## ### ## ## ## ## ## ##\n// ## ## ## ## #### ## ## ## ##\n// ######## ## ## ## ## ## ## #### ###### ######\n// ## ## ######### ## #### ## ## ## ##\n// ## ## ## ## ## ### ## ## ## ## ##\n// ## ## ## ## ## ## ###### ######## ######\n\n/**\n * Computes the ranges that are not affected by the current pending changes.\n *\n * @param {number} firstRow The first row of the rendered region\n * @param {number} lastRow The last row of the rendered region\n * @param {number | null} offscreenFirstRow CanvasDrawer.offscreenLastRow\n * @param {number | null} offscreenLastRow CanvasDrawer.offscreenLastRow\n * @returns {Object[]} The intact ranges in the rendered region\n * @access private\n */\nfunction computeIntactRanges(firstRow, lastRow, changes, offscreenFirstRow, offscreenLastRow) {\n // TODO when do they get null?\n if (offscreenFirstRow == null && offscreenLastRow == null) {\n return []\n }\n\n // At first, the whole range is considered intact\n let intactRanges = [\n {\n start: offscreenFirstRow,\n end: offscreenLastRow,\n offscreenRow: 0,\n },\n ]\n\n for (let i = 0, len = changes.length; i < len; i++) {\n const change = changes[i]\n const newIntactRanges = []\n\n for (let j = 0, intactLen = intactRanges.length; j < intactLen; j++) {\n const range = intactRanges[j]\n\n if (change.end < range.start && change.screenDelta !== 0) {\n // The change is above of the range and lines are either\n // added or removed\n newIntactRanges.push({\n start: range.start + change.screenDelta,\n end: range.end + change.screenDelta,\n offscreenRow: range.offscreenRow,\n })\n } else if (change.end < range.start || change.start > range.end) {\n // The change is outside the range but didn't add\n // or remove lines\n newIntactRanges.push(range)\n } else {\n // The change is within the range, there's one intact range\n // from the range start to the change start\n if (change.start > range.start) {\n newIntactRanges.push({\n start: range.start,\n end: change.start - 1,\n offscreenRow: range.offscreenRow,\n })\n }\n if (change.end < range.end) {\n // The change ends within the range\n if (change.bufferDelta !== 0) {\n // Lines are added or removed, the intact range starts in the\n // next line after the change end plus the screen delta\n newIntactRanges.push({\n start: change.end + change.screenDelta + 1,\n end: range.end + change.screenDelta,\n offscreenRow: range.offscreenRow + change.end + 1 - range.start,\n })\n } else if (change.screenDelta !== 0) {\n // Lines are added or removed in the display buffer, the intact\n // range starts in the next line after the change end plus the\n // screen delta\n newIntactRanges.push({\n start: change.end + change.screenDelta + 1,\n end: range.end + change.screenDelta,\n offscreenRow: range.offscreenRow + change.end + 1 - range.start,\n })\n } else {\n // No lines are added, the intact range starts on the line after\n // the change end\n newIntactRanges.push({\n start: change.end + 1,\n end: range.end,\n offscreenRow: range.offscreenRow + change.end + 1 - range.start,\n })\n }\n }\n }\n }\n intactRanges = newIntactRanges\n }\n\n return truncateIntactRanges(intactRanges, firstRow, lastRow)\n}\n\n/**\n * Truncates the intact ranges so that they doesn't expand past the visible area of the minimap.\n *\n * @param {Object[]} intactRanges The initial array of ranges\n * @param {number} firstRow The first row of the rendered region\n * @param {number} lastRow The last row of the rendered region\n * @returns {Object[]} The array of truncated ranges\n * @access private\n */\nfunction truncateIntactRanges(intactRanges, firstRow, lastRow) {\n let i = 0\n while (i < intactRanges.length) {\n const range = intactRanges[i]\n\n if (range.start < firstRow) {\n range.offscreenRow += firstRow - range.start\n range.start = firstRow\n }\n\n if (range.end > lastRow) {\n range.end = lastRow\n }\n\n if (range.start >= range.end) {\n intactRanges.splice(i--, 1)\n }\n\n i++\n }\n\n return intactRanges.sort((a, b) => {\n return a.offscreenRow - b.offscreenRow\n })\n}\n","/** @babel */\n\"use strict\"\n\n/** @access private */\nexport default class CanvasLayer {\n constructor() {\n /**\n * The onscreen canvas.\n *\n * @type {HTMLCanvasElement}\n */\n this.canvas = document.createElement(\"canvas\")\n\n const desynchronized = false // TODO Electron 9 has color issues #786\n\n /**\n * The onscreen canvas context.\n *\n * @type {CanvasRenderingContext2D}\n */\n this.context = this.canvas.getContext(\"2d\", { desynchronized })\n this.canvas.webkitImageSmoothingEnabled = false\n this.context.imageSmoothingEnabled = false\n\n /**\n * The offscreen canvas.\n *\n * @type {HTMLCanvasElement}\n * @access private\n */\n this.offscreenCanvas = document.createElement(\"canvas\")\n /**\n * The offscreen canvas context.\n *\n * @type {CanvasRenderingContext2D}\n * @access private\n */\n this.offscreenContext = this.offscreenCanvas.getContext(\"2d\", { desynchronized })\n this.offscreenCanvas.webkitImageSmoothingEnabled = false\n this.offscreenContext.imageSmoothingEnabled = false\n }\n\n attach(parent) {\n if (this.canvas.parentNode) {\n return\n }\n\n parent.appendChild(this.canvas)\n }\n\n setSize(width = 0, height = 0) {\n this.canvas.width = width\n this.canvas.height = height\n this.context.imageSmoothingEnabled = false\n this.resetOffscreenSize()\n }\n\n getSize() {\n return {\n width: this.canvas.width,\n height: this.canvas.height,\n }\n }\n\n resetOffscreenSize() {\n this.offscreenCanvas.width = this.canvas.width\n this.offscreenCanvas.height = this.canvas.height\n this.offscreenContext.imageSmoothingEnabled = false\n }\n\n copyToOffscreen() {\n if (this.canvas.width > 0 && this.canvas.height > 0) {\n this.offscreenContext.drawImage(this.canvas, 0, 0)\n }\n }\n\n copyFromOffscreen() {\n if (this.offscreenCanvas.width > 0 && this.offscreenCanvas.height > 0) {\n this.context.drawImage(this.offscreenCanvas, 0, 0)\n }\n }\n\n copyPartFromOffscreen(srcY, destY, height) {\n if (this.offscreenCanvas.width > 0 && this.offscreenCanvas.height > 0) {\n this.context.drawImage(\n this.offscreenCanvas,\n 0,\n srcY,\n this.offscreenCanvas.width,\n height,\n 0,\n destY,\n this.offscreenCanvas.width,\n height\n )\n }\n }\n\n clearCanvas() {\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height)\n }\n}\n","\"use strict\"\n\n/**\n * Generates a decorator function to includes many `mixto` mixins into a class.\n *\n * @param {...Mixin} mixins The mixins to include in the class\n * @returns {function(cls:Function):Function} The decorator function that will include the specified mixins\n * @include(SomeMixin) export default class SomeClass {\n * // ...\n * }\n */\nexport default function include(cls, ...mixins) {\n mixins.forEach((mixin) => {\n includeMixin(cls, mixin)\n })\n}\n\nfunction includeMixin(target, source) {\n Object.getOwnPropertyNames(source).forEach((k) => {\n if ([\"length\", \"name\", \"arguments\", \"caller\", \"prototype\", \"includeInto\"].indexOf(k) >= 0) {\n return\n }\n\n const descriptor = Object.getOwnPropertyDescriptor(source, k)\n Object.defineProperty(target, k, descriptor)\n })\n\n Object.getOwnPropertyNames(source.prototype).forEach((k) => {\n if (k === \"constructor\") {\n return\n }\n\n const descriptor = Object.getOwnPropertyDescriptor(source.prototype, k)\n Object.defineProperty(target.prototype, k, descriptor)\n })\n}\n","\"use strict\"\n\nimport { CompositeDisposable, Emitter } from \"atom\"\nimport { EventsDelegation, SpacePenDSL } from \"atom-utils-plus\"\n\nimport * as Main from \"./main\"\nimport element from \"./decorators/element\"\nimport include from \"./decorators/include\"\n\nconst TAG_NAME = \"minimap-quick-settings\"\n\n/** @access private */\nclass MinimapQuickSettingsElement extends HTMLElement {\n static initClass() {\n include(this, EventsDelegation, SpacePenDSL.Babel)\n element(this, TAG_NAME)\n }\n\n static content() {\n this.div({ class: \"select-list popover-list minimap-quick-settings\" }, () => {\n this.input({ type: \"text\", class: \"hidden-input\", outlet: \"hiddenInput\" })\n this.ol({ class: \"list-group mark-active\", outlet: \"list\" }, () => {\n this.li({ class: \"separator\", outlet: \"separator\" })\n this.li({ class: \"code-highlights\", outlet: \"codeHighlights\" }, \"code-highlights\")\n this.li({ class: \"absolute-mode\", outlet: \"absoluteMode\" }, \"absolute-mode\")\n this.li(\n { class: \"adjust-absolute-mode-height\", outlet: \"adjustAbsoluteModeHeight\" },\n \"adjust-absolute-mode-height\"\n )\n })\n this.div({ class: \"btn-group\" }, () => {\n this.button({ class: \"btn btn-default\", outlet: \"onLeftButton\" }, \"On Left\")\n this.button({ class: \"btn btn-default\", outlet: \"onRightButton\" }, \"On Right\")\n })\n })\n }\n\n createdCallback() {\n this.buildContent()\n }\n\n setModel(minimap) {\n this.selectedItem = null\n this.minimap = minimap\n this.emitter = new Emitter()\n this.subscriptions = new CompositeDisposable()\n this.plugins = {}\n this.itemsActions = new WeakMap()\n\n this.codeHighlights.classList.toggle(\"active\", this.minimap.displayCodeHighlights)\n\n this.itemsActions.set(this.codeHighlights, () => {\n atom.config.set(\"minimap.displayCodeHighlights\", !this.minimap.displayCodeHighlights)\n })\n\n this.itemsActions.set(this.absoluteMode, () => {\n atom.config.set(\"minimap.absoluteMode\", !atom.config.get(\"minimap.absoluteMode\"))\n })\n\n this.itemsActions.set(this.adjustAbsoluteModeHeight, () => {\n atom.config.set(\"minimap.adjustAbsoluteModeHeight\", !atom.config.get(\"minimap.adjustAbsoluteModeHeight\"))\n })\n\n this.subscriptions.add(\n Main.onDidAddPlugin(({ name, plugin }) => {\n return this.addItemFor(name, plugin)\n }),\n Main.onDidRemovePlugin(({ name, plugin }) => {\n return this.removeItemFor(name, plugin)\n }),\n Main.onDidActivatePlugin(({ name, plugin }) => {\n return this.activateItem(name, plugin)\n }),\n Main.onDidDeactivatePlugin(({ name, plugin }) => {\n return this.deactivateItem(name, plugin)\n }),\n\n atom.commands.add(\"minimap-quick-settings\", {\n \"core:move-up\": () => {\n this.selectPreviousItem()\n },\n \"core:move-down\": () => {\n this.selectNextItem()\n },\n \"core:move-left\": () => {\n atom.config.set(\"minimap.displayMinimapOnLeft\", true)\n },\n \"core:move-right\": () => {\n atom.config.set(\"minimap.displayMinimapOnLeft\", false)\n },\n \"core:cancel\": () => {\n this.destroy()\n },\n \"core:confirm\": () => {\n this.toggleSelectedItem()\n },\n }),\n\n this.subscribeTo(this.codeHighlights, {\n mousedown: (e) => {\n e.preventDefault()\n atom.config.set(\"minimap.displayCodeHighlights\", !this.minimap.displayCodeHighlights)\n },\n }),\n\n this.subscribeTo(this.absoluteMode, {\n mousedown: (e) => {\n e.preventDefault()\n atom.config.set(\"minimap.absoluteMode\", !atom.config.get(\"minimap.absoluteMode\"))\n },\n }),\n\n this.subscribeTo(this.adjustAbsoluteModeHeight, {\n mousedown: (e) => {\n e.preventDefault()\n atom.config.set(\"minimap.adjustAbsoluteModeHeight\", !atom.config.get(\"minimap.adjustAbsoluteModeHeight\"))\n },\n }),\n\n this.subscribeTo(\n this.hiddenInput,\n {\n focusout: (e) => {\n this.destroy()\n },\n },\n { passive: true }\n ),\n\n this.subscribeTo(this.onLeftButton, {\n mousedown: (e) => {\n e.preventDefault()\n atom.config.set(\"minimap.displayMinimapOnLeft\", true)\n },\n }),\n\n this.subscribeTo(this.onRightButton, {\n mousedown: (e) => {\n e.preventDefault()\n atom.config.set(\"minimap.displayMinimapOnLeft\", false)\n },\n }),\n\n atom.config.observe(\"minimap.displayCodeHighlights\", (bool) => {\n this.codeHighlights.classList.toggle(\"active\", bool)\n }),\n\n atom.config.observe(\"minimap.absoluteMode\", (bool) => {\n this.absoluteMode.classList.toggle(\"active\", bool)\n }),\n\n atom.config.observe(\"minimap.adjustAbsoluteModeHeight\", (bool) => {\n this.adjustAbsoluteModeHeight.classList.toggle(\"active\", bool)\n }),\n\n atom.config.observe(\"minimap.displayMinimapOnLeft\", (bool) => {\n this.onLeftButton.classList.toggle(\"selected\", bool)\n this.onRightButton.classList.toggle(\"selected\", !bool)\n })\n )\n\n this.initList()\n }\n\n onDidDestroy(callback) {\n return this.emitter.on(\"did-destroy\", callback)\n }\n\n attach() {\n const workspaceElement = atom.views.getView(atom.workspace)\n workspaceElement.appendChild(this)\n this.hiddenInput.focus()\n }\n\n destroy() {\n this.emitter.emit(\"did-destroy\")\n this.subscriptions.dispose()\n this.parentNode.removeChild(this)\n }\n\n initList() {\n this.itemsDisposables = new WeakMap()\n for (const name in Main.plugins) {\n this.addItemFor(name, Main.plugins[name])\n }\n }\n\n toggleSelectedItem() {\n const fn = this.itemsActions.get(this.selectedItem)\n if (typeof fn === \"function\") {\n fn()\n }\n }\n\n selectNextItem() {\n this.selectedItem.classList.remove(\"selected\")\n if (this.selectedItem.nextSibling != null) {\n this.selectedItem = this.selectedItem.nextSibling\n if (this.selectedItem.matches(\".separator\")) {\n this.selectedItem = this.selectedItem.nextSibling\n }\n } else {\n this.selectedItem = this.list.firstChild\n }\n this.selectedItem.classList.add(\"selected\")\n }\n\n selectPreviousItem() {\n this.selectedItem.classList.remove(\"selected\")\n if (this.selectedItem.previousSibling != null) {\n this.selectedItem = this.selectedItem.previousSibling\n if (this.selectedItem.matches(\".separator\")) {\n this.selectedItem = this.selectedItem.previousSibling\n }\n } else {\n this.selectedItem = this.list.lastChild\n }\n this.selectedItem.classList.add(\"selected\")\n }\n\n addItemFor(name, plugin) {\n const item = document.createElement(\"li\")\n const action = () => {\n Main.togglePluginActivation(name)\n }\n\n if (plugin.isActive()) {\n item.classList.add(\"active\")\n }\n\n item.textContent = name\n\n this.itemsActions.set(item, action)\n this.itemsDisposables.set(\n item,\n this.addDisposableEventListener(item, \"mousedown\", (e) => {\n e.preventDefault()\n action()\n })\n )\n\n this.plugins[name] = item\n this.list.insertBefore(item, this.separator)\n\n if (!(this.selectedItem != null)) {\n this.selectedItem = item\n this.selectedItem.classList.add(\"selected\")\n }\n }\n\n removeItemFor(name, plugin) {\n try {\n this.list.removeChild(this.plugins[name])\n } catch (error) {}\n\n delete this.plugins[name]\n }\n\n activateItem(name, plugin) {\n this.plugins[name].classList.add(\"active\")\n }\n\n deactivateItem(name, plugin) {\n this.plugins[name].classList.remove(\"active\")\n }\n}\n\nMinimapQuickSettingsElement.initClass()\n\nexport function createMinimapQuickSettingsElement() {\n const element = document.createElement(TAG_NAME)\n element.createdCallback()\n return element\n}\n","\"use strict\"\n\nimport { Emitter, CompositeDisposable, Disposable } from \"atom\"\nimport Decoration from \"./decoration\"\nimport StableAdapter from \"./adapters/stable-adapter\"\nimport { editorsMinimaps } from \"./main\"\n\nlet nextModelId = 1\n\n// returned in the decorations API when minimap is destoryed\nconst disposedDisposable = new Disposable()\ndisposedDisposable.dispose()\nconst markerMock = {\n onDidDestroy: () => disposedDisposable,\n getScreenRange: () => new Range(),\n}\nconst dummyDecoration = new Decoration(markerMock, null, {})\n\n/**\n * The Minimap class is the underlying model of a . Most manipulations of the minimap is done through the model.\n *\n * Any Minimap instance is tied to a `TextEditor`. Their lifecycle follow the one of their target `TextEditor`, so they\n * are destroyed whenever their `TextEditor` is destroyed.\n */\nexport default class Minimap {\n /**\n * Creates a new Minimap instance for the given `TextEditor`.\n *\n * @param {Object} options An object with the new Minimap properties\n * @param {TextEditor} options.textEditor The target text editor for the minimap\n * @param {boolean} [options.standAlone] Whether this minimap is in stand-alone mode or not\n * @param {number} [options.width] The minimap width in pixels\n * @param {number} [options.height] The minimap height in pixels\n * @throws {Error} Cannot create a minimap without an editor\n */\n constructor(options = {}) {\n if (!options.textEditor) {\n throw new Error(\"Cannot create a minimap without an editor\")\n }\n\n /**\n * The Minimap's minimapElement.\n *\n * @type {MinimapElement}\n * @access private\n */\n this.minimapElement = undefined\n\n // local cache of this.minimapElement.DecorationManagement\n this.DecorationManagement = undefined\n\n /**\n * The Minimap's text editor.\n *\n * @type {TextEditor}\n * @access private\n */\n this.textEditor = options.textEditor\n\n /**\n * The Minimap's text editor element.\n *\n * @access private\n */\n this.editorElement = undefined\n\n /**\n * The stand-alone state of the current Minimap.\n *\n * @type {boolean}\n * @access private\n */\n this.standAlone = options.standAlone\n /**\n * The width of the current Minimap.\n *\n * @type {number}\n * @access private\n */\n this.width = options.width\n /**\n * The height of the current Minimap.\n *\n * @type {number}\n * @access private\n */\n this.height = options.height\n /**\n * The id of the current Minimap.\n *\n * @type {Number}\n * @access private\n */\n this.id = nextModelId++\n /**\n * The events emitter of the current Minimap.\n *\n * @type {Emitter}\n * @access private\n */\n this.emitter = new Emitter()\n /**\n * The Minimap's subscriptions.\n *\n * @type {CompositeDisposable}\n * @access private\n */\n this.subscriptions = new CompositeDisposable()\n /**\n * The adapter object leverage the access to several properties from the `TextEditor`/`TextEditorElement` to support\n * the different APIs between different version of Atom.\n *\n * @type {Object}\n * @access private\n */\n this.adapter = null\n /**\n * The char height of the current Minimap, will be `undefined` unless `setCharWidth` is called.\n *\n * @type {number}\n * @access private\n */\n this.charHeight = null\n /**\n * The char height from the package's configuration. Will be overriden by the instance value.\n *\n * @type {number}\n * @access private\n */\n this.configCharHeight = null\n /**\n * The char width of the current Minimap, will be `undefined` unless `setCharWidth` is called.\n *\n * @type {number}\n * @access private\n */\n this.charWidth = null\n /**\n * The char width from the package's configuration. Will be overriden by the instance value.\n *\n * @type {number}\n * @access private\n */\n this.configCharWidth = null\n /**\n * The interline of the current Minimap, will be `undefined` unless `setCharWidth` is called.\n *\n * @type {number}\n * @access private\n */\n this.interline = null\n /**\n * The interline from the package's configuration. Will be overriden by the instance value.\n *\n * @type {number}\n * @access private\n */\n this.configInterline = null\n /**\n * The devicePixelRatioRounding of the current Minimap, will be `undefined` unless `setDevicePixelRatioRounding` is called.\n *\n * @type {boolean}\n * @access private\n */\n this.devicePixelRatioRounding = null\n /**\n * The devicePixelRatioRounding from the package's configuration. Will be overriden by the instance value.\n *\n * @type {boolean}\n * @access private\n */\n this.configDevicePixelRatioRounding = null\n /**\n * A number of milliseconds which determines how often the minimap should redraw itself after detecting changes in\n * the text editor. A value of 0 will cause the minimap to redraw immediately.\n *\n * @type {number}\n * @access private\n */\n this.redrawDelay = 0\n /**\n * A boolean value to store whether this Minimap have been destroyed or not.\n *\n * @type {boolean}\n * @access private\n */\n this.destroyed = false\n /**\n * A boolean value to store whether the `scrollPastEnd` setting is enabled or not.\n *\n * @type {boolean}\n * @access private\n */\n this.scrollPastEnd = false\n\n /**\n * An array of changes registered with textEditor.onDidChange() which have not yet been handled\n *\n * @type {Array}\n * @access private\n */\n this.pendingChangeEvents = []\n\n /**\n * Timer reference which, once fired, will flush all the pending changes stored in this.pendingChangeEvents array.\n *\n * @type {Timer | null}\n * @access private\n */\n this.flushChangesTimer = null\n\n if (atom.views.getView(this.textEditor).getScrollTop != null) {\n this.adapter = new StableAdapter(this.textEditor)\n }\n\n /**\n * When in stand-alone or independent scrolling mode, this value can be used instead of the computed scroll.\n *\n * @type {number}\n * @access private\n */\n this.scrollTop = 0\n\n let configSubscription = this.subscribeToConfig()\n\n this.subscriptions.add(\n configSubscription,\n\n this.textEditor.onDidChangeGrammar(() => {\n this.subscriptions.remove(configSubscription)\n configSubscription.dispose()\n\n configSubscription = this.subscribeToConfig()\n this.subscriptions.add(configSubscription)\n }),\n\n this.adapter.onDidChangeScrollTop(() => {\n if (!this.standAlone && !this.ignoreTextEditorScroll && !this.inChangeScrollTop) {\n this.inChangeScrollTop = true\n this.updateScrollTop()\n this.emitter.emit(\"did-change-scroll-top\", this)\n this.inChangeScrollTop = false\n }\n\n if (this.ignoreTextEditorScroll) {\n this.ignoreTextEditorScroll = false\n }\n }),\n\n this.adapter.onDidChangeScrollLeft(() => {\n if (!this.standAlone) {\n this.emitter.emit(\"did-change-scroll-left\", this)\n }\n }),\n\n this.textEditor.onDidChange((changes) => {\n this.scheduleChanges(changes)\n }),\n\n this.textEditor.onDidDestroy(() => {\n if (editorsMinimaps) {\n editorsMinimaps.delete(this.textEditor)\n }\n this.destroy()\n }),\n\n /*\n FIXME Some changes occuring during the tokenization produces\n ranges that deceive the canvas rendering by making some\n lines at the end of the buffer intact while they are in fact not,\n resulting in extra lines appearing at the end of the minimap.\n Forcing a whole repaint to fix that bug is suboptimal but works.\n */\n this.textEditor.onDidTokenize(() => {\n this.emitter.emit(\"did-change-config\")\n })\n )\n }\n\n /** Destroys the model. */\n destroy() {\n if (this.destroyed) {\n return\n }\n\n clearTimeout(this.flushChangesTimer)\n this.pendingChangeEvents = []\n this.subscriptions.dispose()\n this.emitter.emit(\"did-destroy\")\n this.emitter.dispose()\n this.destroyed = true\n }\n\n /**\n * Returns `true` when this `Minimap` has benn destroyed.\n *\n * @returns {boolean} Whether this Minimap has been destroyed or not\n */\n isDestroyed() {\n return this.destroyed\n }\n\n /**\n * Schedule changes from textEditor.onDidChange() to be handled at a later time\n *\n * @param {Array} changes The changes to be scheduled\n * @returns Void\n * @access private\n */\n scheduleChanges(changes) {\n this.pendingChangeEvents = this.pendingChangeEvents.concat(changes)\n\n // Optimisation: If the redraw delay is set to 0, do not even schedule a timer\n if (!this.redrawDelay) {\n this.requestFlushChanges()\n }\n\n if (!this.flushChangesTimer) {\n // If any changes happened within the timeout's delay, a timeout will already have been\n // scheduled -> no need to schedule again\n this.flushChangesTimer = setTimeout(() => {\n this.requestFlushChanges()\n }, this.redrawDelay)\n }\n }\n\n /**\n * Flush all changes which have been scheduled for later processing by this.scheduleChanges()\n *\n * @returns Void\n * @access private\n */\n flushChanges() {\n clearTimeout(this.flushChangesTimer)\n this.flushChangesTimer = null\n this.emitChanges(this.pendingChangeEvents)\n this.pendingChangeEvents = []\n }\n\n /**\n * Requests flush changes if not already requested\n *\n * @returns Void\n * @access private\n */\n requestFlushChanges() {\n if (!this.requestedFlushChanges) {\n this.requestedFlushChanges = requestAnimationFrame(() => {\n this.flushChanges()\n if (this.requestedFlushChanges) {\n cancelAnimationFrame(this.requestedFlushChanges)\n this.requestedFlushChanges = null\n }\n })\n }\n }\n\n /**\n * Registers an event listener to the `did-change` event.\n *\n * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be\n * called with an event object with the following properties:\n *\n * - Start: The change's start row number\n * - End: The change's end row number\n * - ScreenDelta: the delta in buffer rows between the versions before and after the change\n *\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChange(callback) {\n return this.emitter.on(\"did-change\", callback)\n }\n\n /**\n * Registers an event listener to the `did-change-config` event.\n *\n * @param {function():void} callback A function to call when the event is triggered.\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChangeConfig(callback) {\n return this.emitter.on(\"did-change-config\", callback)\n }\n\n /**\n * Registers an event listener to the `did-change-scroll-top` event.\n *\n * The event is dispatched when the text editor `scrollTop` value have been changed or when the minimap scroll top\n * have been changed in stand-alone mode.\n *\n * @param {function(minimap:Minimap):void} callback A function to call when the event is triggered. The current\n * Minimap is passed as argument to the callback.\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChangeScrollTop(callback) {\n return this.emitter.on(\"did-change-scroll-top\", callback)\n }\n\n /**\n * Registers an event listener to the `did-change-scroll-left` event.\n *\n * @param {function(minimap:Minimap):void} callback A function to call when the event is triggered. The current\n * Minimap is passed as argument to the callback.\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChangeScrollLeft(callback) {\n return this.emitter.on(\"did-change-scroll-left\", callback)\n }\n\n /**\n * Registers an event listener to the `did-change-stand-alone` event.\n *\n * This event is dispatched when the stand-alone of the current Minimap is either enabled or disabled.\n *\n * @param {function(minimap:Minimap):void} callback A function to call when the event is triggered. The current\n * Minimap is passed as argument to the callback.\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChangeStandAlone(callback) {\n return this.emitter.on(\"did-change-stand-alone\", callback)\n }\n\n /**\n * Registers an event listener to the `did-destroy` event.\n *\n * This event is dispatched when this Minimap have been destroyed. It can occurs either because the {@link destroy}\n * method have been called on the Minimap or because the target text editor have been destroyed.\n *\n * @param {function():void} callback A function to call when the event is triggered.\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidDestroy(callback) {\n return this.emitter.on(\"did-destroy\", callback)\n }\n\n /**\n * Registers to the config changes for the current editor scope.\n *\n * @returns {Disposable} The disposable to dispose all the registered events\n * @access private\n */\n subscribeToConfig() {\n const subs = new CompositeDisposable()\n const opts = { scope: this.textEditor.getRootScopeDescriptor() }\n\n subs.add(\n atom.config.observe(\"editor.scrollPastEnd\", opts, (scrollPastEnd) => {\n this.scrollPastEnd = scrollPastEnd\n this.adapter.scrollPastEnd = this.scrollPastEnd\n this.emitter.emit(\"did-change-config\")\n }),\n\n atom.config.observe(\"minimap.charHeight\", opts, (configCharHeight) => {\n this.configCharHeight = configCharHeight\n this.updateScrollTop()\n this.emitter.emit(\"did-change-config\")\n }),\n\n atom.config.observe(\"minimap.charWidth\", opts, (configCharWidth) => {\n this.configCharWidth = configCharWidth\n this.updateScrollTop()\n this.emitter.emit(\"did-change-config\")\n }),\n\n atom.config.observe(\"minimap.interline\", opts, (configInterline) => {\n this.configInterline = configInterline\n this.updateScrollTop()\n this.emitter.emit(\"did-change-config\")\n }),\n\n atom.config.observe(\"minimap.independentMinimapScroll\", opts, (independentMinimapScroll) => {\n this.independentMinimapScroll = independentMinimapScroll\n this.updateScrollTop()\n }),\n\n atom.config.observe(\"minimap.scrollSensitivity\", opts, (scrollSensitivity) => {\n this.scrollSensitivity = scrollSensitivity\n }),\n\n atom.config.observe(\"minimap.redrawDelay\", opts, (redrawDelay) => {\n this.redrawDelay = redrawDelay\n }),\n // cdprr is shorthand for configDevicePixelRatioRounding\n\n atom.config.observe(\"minimap.devicePixelRatioRounding\", opts, (cdprr) => {\n this.configDevicePixelRatioRounding = cdprr\n this.updateScrollTop()\n this.emitter.emit(\"did-change-config\")\n })\n )\n\n return subs\n }\n\n /**\n * Returns `true` when the current Minimap is a stand-alone minimap.\n *\n * @returns {boolean} Whether this Minimap is in stand-alone mode or not.\n */\n isStandAlone() {\n return this.standAlone\n }\n\n /**\n * Sets the stand-alone mode for this minimap.\n *\n * @fires {did-change-stand-alone} if The stand-alone mode have been toggled on or off by the call\n * @param {boolean} standAlone The new state of the stand-alone mode for this Minimap\n */\n setStandAlone(standAlone) {\n if (standAlone !== this.standAlone) {\n this.standAlone = standAlone\n this.emitter.emit(\"did-change-stand-alone\", this)\n }\n }\n\n /** @returns {MinimapElement} Returns the current minimapElement */\n getMinimapElement() {\n return this.minimapElement\n }\n\n /**\n * Returns the `TextEditor` that this minimap represents.\n *\n * @returns {TextEditor} This Minimap's text editor\n */\n getTextEditor() {\n return this.textEditor\n }\n\n /**\n * Returns the `TextEditorElement` for the Minimap's `TextEditor`.\n *\n * @returns {TextEditorElement} The minimap's text editor element\n */\n getTextEditorElement() {\n if (this.editorElement) {\n return this.editorElement\n }\n\n this.editorElement = atom.views.getView(this.getTextEditor())\n return this.editorElement\n }\n\n /**\n * Returns the height of the `TextEditor` at the Minimap scale.\n *\n * @returns {number} The scaled height of the text editor\n */\n getTextEditorScaledHeight() {\n return this.adapter.getHeight() * this.getVerticalScaleFactor()\n }\n\n /**\n * Returns the `TextEditor` scroll top value at the Minimap scale.\n *\n * @returns {number} The scaled scroll top of the text editor\n */\n getTextEditorScaledScrollTop() {\n return this.adapter.getScrollTop() * this.getVerticalScaleFactor()\n }\n\n /**\n * Returns the `TextEditor` scroll left value at the Minimap scale.\n *\n * @returns {number} The scaled scroll left of the text editor\n */\n getTextEditorScaledScrollLeft() {\n return this.adapter.getScrollLeft() * this.getHorizontalScaleFactor()\n }\n\n /**\n * Returns the `TextEditor` maximum scroll top value.\n *\n * When the `scrollPastEnd` setting is enabled, the method compensate the extra scroll by removing the same height as\n * added by the editor from the final value.\n *\n * @returns {number} The maximum scroll top of the text editor\n */\n getTextEditorMaxScrollTop() {\n return this.adapter.getMaxScrollTop()\n }\n\n /**\n * Returns the `TextEditor` scroll top value.\n *\n * @returns {number} The scroll top of the text editor\n */\n getTextEditorScrollTop() {\n return this.adapter.getScrollTop()\n }\n\n /**\n * Sets the scroll top of the `TextEditor`.\n *\n * @param {number} scrollTop The new scroll top value\n */\n setTextEditorScrollTop(scrollTop, ignoreTextEditorScroll = false) {\n this.ignoreTextEditorScroll = ignoreTextEditorScroll\n this.adapter.setScrollTop(scrollTop)\n }\n\n /**\n * Returns the `TextEditor` scroll left value.\n *\n * @returns {number} The scroll left of the text editor\n */\n getTextEditorScrollLeft() {\n return this.adapter.getScrollLeft()\n }\n\n /**\n * Returns the height of the `TextEditor`.\n *\n * @returns {number} The height of the text editor\n */\n getTextEditorHeight() {\n return this.adapter.getHeight()\n }\n\n /**\n * Returns the `TextEditor` scroll as a value normalized between `0` and `1`.\n *\n * When the `scrollPastEnd` setting is enabled the value may exceed `1` as the maximum scroll value used to compute\n * this ratio compensate for the extra height in the editor. **Use {@link getCapedTextEditorScrollRatio} when you need\n * a value that is strictly between `0` and `1`.**\n *\n * @returns {number} The scroll ratio of the text editor\n */\n getTextEditorScrollRatio() {\n return this.adapter.getScrollTop() / (this.getTextEditorMaxScrollTop() || 1)\n }\n\n /**\n * Returns the `TextEditor` scroll as a value normalized between `0` and `1`.\n *\n * The returned value will always be strictly between `0` and `1`.\n *\n * @returns {number} The scroll ratio of the text editor strictly between 0 and 1\n */\n getCapedTextEditorScrollRatio() {\n return Math.min(1, this.getTextEditorScrollRatio())\n }\n\n /**\n * Returns the height of the whole minimap in pixels based on the `minimap` settings.\n *\n * @returns {number} The height of the minimap\n */\n getHeight() {\n const additionalHeight = this.scrollPastEnd ? this.textEditor.getRowsPerPage() : 0\n return (this.textEditor.getScreenLineCount() + additionalHeight) * this.getLineHeight()\n }\n\n /**\n * Returns the width of the whole minimap in pixels based on the `minimap` settings.\n *\n * @returns {number} The width of the minimap\n */\n getWidth() {\n return this.textEditor.getMaxScreenLineLength() * this.getCharWidth()\n }\n\n /**\n * Returns the height the Minimap content will take on screen.\n *\n * When the Minimap height is greater than the `TextEditor` height, the `TextEditor` height is returned instead.\n *\n * @returns {number} The visible height of the Minimap\n */\n getVisibleHeight() {\n return Math.min(this.getScreenHeight(), this.getHeight())\n }\n\n /**\n * Returns the height the minimap should take once displayed, it's either the height of the `TextEditor` or the\n * provided `height` when in stand-alone mode.\n *\n * @returns {number} The total height of the Minimap\n */\n getScreenHeight() {\n if (this.isStandAlone()) {\n if (this.height != null) {\n return this.height\n } else {\n return this.getHeight()\n }\n } else {\n return this.adapter.getHeight()\n }\n }\n\n /**\n * Returns the width the whole Minimap will take on screen.\n *\n * @returns {number} The width of the Minimap when displayed\n */\n getVisibleWidth() {\n return Math.min(this.getScreenWidth(), this.getWidth())\n }\n\n /**\n * Returns the width the Minimap should take once displayed, it's either the width of the Minimap content or the\n * provided `width` when in standAlone mode.\n *\n * @returns {number} The Minimap screen width\n */\n getScreenWidth() {\n if (this.isStandAlone() && this.width != null) {\n return this.width\n } else {\n return this.getWidth()\n }\n }\n\n /**\n * Sets the preferred height and width when in stand-alone mode.\n *\n * This method is called by the for this Minimap so that the model is kept in sync with the view.\n *\n * @param {number} height The new height of the Minimap\n * @param {number} width The new width of the Minimap\n */\n setScreenHeightAndWidth(height, width) {\n if (this.width !== width || this.height !== height) {\n this.height = height\n this.width = width\n this.updateScrollTop()\n }\n }\n\n /**\n * Returns the vertical scaling factor when converting coordinates from the `TextEditor` to the Minimap.\n *\n * @returns {number} The Minimap vertical scaling factor\n */\n getVerticalScaleFactor() {\n return this.getLineHeight() / this.textEditor.getLineHeightInPixels()\n }\n\n /**\n * Returns the horizontal scaling factor when converting coordinates from the `TextEditor` to the Minimap.\n *\n * @returns {number} The Minimap horizontal scaling factor\n */\n getHorizontalScaleFactor() {\n return this.getCharWidth() / this.textEditor.getDefaultCharWidth()\n }\n\n /**\n * Returns the height of a line in the Minimap in pixels.\n *\n * @returns {number} A line's height in the Minimap\n */\n getLineHeight() {\n return this.getCharHeight() + this.getInterline()\n }\n\n /**\n * Returns the width of a character in the Minimap in pixels.\n *\n * @returns {number} A character's width in the Minimap\n */\n getCharWidth() {\n if (this.charWidth != null) {\n return this.charWidth\n } else {\n return this.configCharWidth\n }\n }\n\n /**\n * Sets the char width for this Minimap. This value will override the value from the config for this instance only. A\n * `did-change-config` event is dispatched.\n *\n * @fires {did-change-config} when The value is changed\n * @param {number} charWidth The new width of a char in the Minimap\n */\n setCharWidth(charWidth) {\n this.charWidth = Math.floor(charWidth)\n this.emitter.emit(\"did-change-config\")\n }\n\n /**\n * Returns the height of a character in the Minimap in pixels.\n *\n * @returns {number} A character's height in the Minimap\n */\n getCharHeight() {\n if (this.charHeight != null) {\n return this.charHeight\n } else {\n return this.configCharHeight\n }\n }\n\n /**\n * Sets the char height for this Minimap. This value will override the value from the config for this instance only. A\n * `did-change-config` event is dispatched.\n *\n * @fires {did-change-config} when The value is changed\n * @param {number} charHeight The new height of a char in the Minimap\n */\n setCharHeight(charHeight) {\n this.charHeight = Math.floor(charHeight)\n this.emitter.emit(\"did-change-config\")\n }\n\n /**\n * Returns the height of an interline in the Minimap in pixels.\n *\n * @returns {number} The interline's height in the Minimap\n */\n getInterline() {\n if (this.interline != null) {\n return this.interline\n } else {\n return this.configInterline\n }\n }\n\n /**\n * Sets the interline height for this Minimap. This value will override the value from the config for this instance\n * only. A `did-change-config` event is dispatched.\n *\n * @fires {did-change-config} when The value is changed\n * @param {number} interline The new height of an interline in the Minimap\n */\n setInterline(interline) {\n this.interline = Math.floor(interline)\n this.emitter.emit(\"did-change-config\")\n }\n\n /**\n * Returns the status of devicePixelRatioRounding in the Minimap.\n *\n * @returns {boolean} The devicePixelRatioRounding status in the Minimap\n */\n getDevicePixelRatioRounding() {\n if (this.devicePixelRatioRounding != null) {\n return this.devicePixelRatioRounding\n } else {\n return this.configDevicePixelRatioRounding\n }\n }\n\n /**\n * Sets the devicePixelRatioRounding status for this Minimap. This value will override the value from the config for\n * this instance only. A `did-change-config` event is dispatched.\n *\n * @fires {did-change-config} when The value is changed\n * @param {boolean} devicePixelRatioRounding The new status of devicePixelRatioRounding in the Minimap\n */\n setDevicePixelRatioRounding(devicePixelRatioRounding) {\n this.devicePixelRatioRounding = devicePixelRatioRounding\n this.emitter.emit(\"did-change-config\")\n }\n\n /**\n * Returns the devicePixelRatio in the Minimap in pixels.\n *\n * @returns {number} The devicePixelRatio in the Minimap\n */\n getDevicePixelRatio() {\n if (this.getDevicePixelRatioRounding()) {\n if (devicePixelRatio >= 1) {\n return Math.round(devicePixelRatio)\n } else {\n return Math.max(Math.round(devicePixelRatio * 10) / 10, 0.1)\n }\n }\n return devicePixelRatio\n }\n\n /**\n * Returns the index of the first visible row in the Minimap.\n *\n * @returns {number} The index of the first visible row\n */\n getFirstVisibleScreenRow() {\n return Math.floor(this.getScrollTop() / this.getLineHeight())\n }\n\n /**\n * Returns the index of the last visible row in the Minimap.\n *\n * @returns {number} The index of the last visible row\n */\n getLastVisibleScreenRow() {\n return Math.ceil((this.getScrollTop() + this.getScreenHeight()) / this.getLineHeight())\n }\n\n /**\n * Returns true when the `independentMinimapScroll` setting have been enabled.\n *\n * @returns {boolean} Whether the minimap can scroll independently\n */\n scrollIndependentlyOnMouseWheel() {\n return this.independentMinimapScroll\n }\n\n /**\n * Returns the current scroll of the Minimap.\n *\n * The Minimap can scroll only when its height is greater that the height of its `TextEditor`.\n *\n * @returns {number} The scroll top of the Minimap\n */\n getScrollTop() {\n return this.standAlone || this.independentMinimapScroll ? this.scrollTop : this.getScrollTopFromEditor()\n }\n\n /**\n * Sets the minimap scroll top value when in stand-alone mode.\n *\n * @fires {did-change-scroll-top} if The Minimap's stand-alone mode is enabled\n * @param {number} scrollTop The new scroll top for the Minimap\n */\n setScrollTop(scrollTop) {\n this.scrollTop = Math.max(0, Math.min(this.getMaxScrollTop(), scrollTop))\n\n if (this.standAlone || this.independentMinimapScroll) {\n this.emitter.emit(\"did-change-scroll-top\", this)\n }\n }\n\n /**\n * Returns the minimap scroll as a ration between 0 and 1.\n *\n * @returns {number} The minimap scroll ratio\n */\n getScrollRatio() {\n return this.getScrollTop() / this.getMaxScrollTop()\n }\n\n /**\n * Updates the scroll top value with the one computed from the text editor when the minimap is in the independent\n * scrolling mode.\n *\n * @access private\n */\n updateScrollTop() {\n if (this.independentMinimapScroll) {\n try {\n this.setScrollTop(this.getScrollTopFromEditor())\n } catch (err) {}\n this.emitter.emit(\"did-change-scroll-top\", this)\n }\n }\n\n /**\n * Returns the scroll top as computed from the text editor scroll top.\n *\n * @returns {number} The computed scroll top value\n */\n getScrollTopFromEditor() {\n return Math.abs(this.getCapedTextEditorScrollRatio() * this.getMaxScrollTop())\n }\n\n /**\n * Returns the maximum scroll value of the Minimap.\n *\n * @returns {number} The maximum scroll top for the Minimap\n */\n getMaxScrollTop() {\n return Math.max(0, this.getHeight() - this.getScreenHeight())\n }\n\n /**\n * Returns `true` when the Minimap can scroll.\n *\n * @returns {boolean} Whether this Minimap can scroll or not\n */\n canScroll() {\n return this.getMaxScrollTop() > 0\n }\n\n /**\n * Updates the minimap scroll top value using a mouse event when the independent scrolling mode is enabled\n *\n * @param {MouseEvent} event The mouse wheel event\n * @access private\n */\n onMouseWheel(event) {\n if (this.scrollIndependentlyOnMouseWheel()) {\n event.stopPropagation()\n\n if (!this.canScroll()) {\n return\n }\n\n const { wheelDeltaY } = event\n const previousScrollTop = this.getScrollTop()\n const updatedScrollTop = previousScrollTop - Math.round(wheelDeltaY * this.scrollSensitivity)\n\n this.setScrollTop(updatedScrollTop)\n }\n }\n\n /**\n * Delegates to `TextEditor#getMarker`.\n *\n * @access private\n */\n getMarker(id) {\n return this.textEditor.getMarker(id)\n }\n\n /**\n * Delegates to `TextEditor#findMarkers`.\n *\n * @access private\n */\n findMarkers(o) {\n try {\n return this.textEditor.findMarkers(o)\n } catch (error) {\n return []\n }\n }\n\n /**\n * Delegates to `TextEditor#markBufferRange`.\n *\n * @access private\n */\n markBufferRange(range) {\n return this.textEditor.markBufferRange(range)\n }\n\n /**\n * Emits a change events with the passed-in changes as data.\n *\n * @param {Object} changes A change to dispatch\n * @access private\n */\n emitChanges(changes) {\n this.emitter.emit(\"did-change\", changes)\n }\n\n /**\n * Enables the cache at the adapter level to avoid consecutive access to the text editor API during a render phase.\n *\n * @access private\n */\n enableCache() {\n this.adapter.enableCache()\n }\n\n /**\n * Disable the adapter cache.\n *\n * @access private\n */\n clearCache() {\n this.adapter.clearCache()\n }\n\n editorDestroyed() {\n this.adapter.editorDestroyed()\n }\n\n /**\n * Get the DecorationManagement API for the current minimapElement\n *\n * @returns {DecorationManagement | undefined}\n */\n getDecorationManagement() {\n if (!this.DecorationManagement) {\n if (this.minimapElement?.DecorationManagement) {\n this.DecorationManagement = this.minimapElement.DecorationManagement\n }\n }\n return this.DecorationManagement\n }\n\n // Decoration API duplicated for backward compatibility in the service\n getDecorations() {\n return this.getDecorationManagement()?.getDecorations() ?? []\n }\n onDidAddDecoration(...args) {\n return this.getDecorationManagement()?.onDidAddDecoration(...args) ?? disposedDisposable\n }\n onDidRemoveDecoration(...args) {\n return this.getDecorationManagement()?.onDidRemoveDecoration(...args) ?? disposedDisposable\n }\n onDidChangeDecorationRange(...args) {\n return this.getDecorationManagement()?.onDidChangeDecorationRange(...args) ?? disposedDisposable\n }\n onDidUpdateDecoration(...args) {\n return this.getDecorationManagement()?.onDidUpdateDecoration(...args) ?? disposedDisposable\n }\n decorationForId(...args) {\n return this.getDecorationManagement()?.decorationForId(...args) ?? dummyDecoration\n }\n decorationsForScreenRowRange(...args) {\n return this.getDecorationManagement()?.decorationsForScreenRowRange(...args) ?? dummyDecoration\n }\n decorationsByTypeThenRows() {\n return this.getDecorationManagement()?.decorationsByTypeThenRows() ?? dummyDecoration\n }\n decorateMarker(...args) {\n return this.getDecorationManagement()?.decorateMarker(...args) ?? dummyDecoration\n }\n removeDecoration(...args) {\n return this.getDecorationManagement()?.removeDecoration(...args)\n }\n removeAllDecorationsForMarker(...args) {\n return this.getDecorationManagement()?.removeAllDecorationsForMarker(...args)\n }\n removeAllDecorations() {\n return this.getDecorationManagement()?.removeAllDecorations()\n }\n}\n","\"use strict\"\n\n/** @access private */\nexport default class StableAdapter {\n constructor(textEditor) {\n this.textEditor = textEditor\n this.textEditorElement = atom.views.getView(this.textEditor)\n }\n\n enableCache() {\n this.useCache = true\n }\n\n clearCache() {\n this.useCache = false\n delete this.heightCache\n delete this.scrollTopCache\n delete this.scrollLeftCache\n delete this.maxScrollTopCache\n }\n\n onDidChangeScrollTop(callback) {\n return this.textEditorElement.onDidChangeScrollTop(callback)\n }\n\n onDidChangeScrollLeft(callback) {\n return this.textEditorElement.onDidChangeScrollLeft(callback)\n }\n\n getHeight() {\n if (this.editorDestroyed()) {\n return 0\n }\n\n if (this.useCache) {\n if (!this.heightCache) {\n this.heightCache = this.textEditorElement.getHeight()\n }\n return this.heightCache\n }\n return this.textEditorElement.getHeight()\n }\n\n getScrollTop() {\n if (this.editorDestroyed()) {\n return 0\n }\n\n if (this.useCache) {\n if (!this.scrollTopCache) {\n this.scrollTopCache = this.computeScrollTop()\n }\n return this.scrollTopCache\n }\n return this.computeScrollTop()\n }\n\n computeScrollTop() {\n if (this.editorDestroyed()) {\n return 0\n }\n\n const scrollTop = this.textEditorElement.getScrollTop()\n const lineHeight = this.textEditor.getLineHeightInPixels()\n let firstRow = this.textEditorElement.getFirstVisibleScreenRow()\n\n if (Number.isNaN(firstRow)) {\n // Guard against their being no visible screen row\n return 0\n }\n\n let lineTop = this.textEditorElement.pixelPositionForScreenPosition([firstRow, 0]).top\n\n if (lineTop > scrollTop) {\n firstRow -= 1\n lineTop = this.textEditorElement.pixelPositionForScreenPosition([firstRow, 0]).top\n }\n\n const lineY = firstRow * lineHeight\n const offset = Math.min(scrollTop - lineTop, lineHeight)\n return lineY + offset\n }\n\n setScrollTop(scrollTop) {\n if (this.editorDestroyed()) {\n return\n }\n\n this.textEditorElement.setScrollTop(scrollTop)\n }\n\n getScrollLeft() {\n if (this.editorDestroyed()) {\n return 0\n }\n\n if (this.useCache) {\n if (!this.scrollLeftCache) {\n this.scrollLeftCache = this.textEditorElement.getScrollLeft()\n }\n return this.scrollLeftCache\n }\n return this.textEditorElement.getScrollLeft()\n }\n\n getMaxScrollTop() {\n if (this.editorDestroyed()) {\n return 0\n }\n\n if (this.maxScrollTopCache != null && this.useCache) {\n return this.maxScrollTopCache\n }\n\n let maxScrollTop\n if (this.textEditorElement.getMaxScrollTop) {\n maxScrollTop = this.textEditorElement.getMaxScrollTop()\n\n if (parseFloat(atom.getVersion()) >= 1.13) {\n if (this.scrollPastEnd) {\n const lineHeight = this.textEditor.getLineHeightInPixels()\n maxScrollTop -= this.getHeight() - 3 * lineHeight\n }\n }\n } else {\n maxScrollTop = this.textEditorElement.getScrollHeight() - this.getHeight()\n\n if (this.scrollPastEnd) {\n const lineHeight = this.textEditor.getLineHeightInPixels()\n maxScrollTop -= this.getHeight() - 3 * lineHeight\n }\n }\n\n if (this.useCache) {\n this.maxScrollTopCache = maxScrollTop\n }\n\n return maxScrollTop\n }\n\n editorDestroyed() {\n return (\n !this.textEditor ||\n this.textEditor.isDestroyed() ||\n !this.textEditorElement.component ||\n !this.textEditorElement.getModel() ||\n !this.textEditorElement.parentNode\n )\n }\n}\n","{\n \"plugins\": {\n \"type\": \"object\",\n \"properties\": {}\n },\n \"autoToggle\": {\n \"title\": \"Show Minimap On Atom Start\",\n \"type\": \"boolean\",\n \"default\": true,\n \"order\": 1\n },\n \"displayMinimapOnLeft\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"order\": 2\n },\n \"displayCodeHighlights\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"description\": \"Toggles the render of the buffer tokens in the minimap.\",\n \"order\": 3\n },\n \"displayPluginsControls\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"description\": \"You need to restart Atom for this setting to be effective.\",\n \"order\": 4\n },\n \"minimapScrollIndicator\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"description\": \"Toggles the display of a side line showing which part of the buffer is currently displayed by the minimap. This side line will only appear if the minimap is taller than the editor view height.\",\n \"order\": 5\n },\n \"adjustMinimapWidthToSoftWrap\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"description\": \"If this option is enabled and Soft Wrap is checked then the Minimap max width is set to the Preferred Line Length value.\",\n \"order\": 6\n },\n \"adjustMinimapWidthOnlyIfSmaller\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"description\": \"If this option and `adjustMinimapWidthToSoftWrap` are enabled the minimap width will never go past the limit sets by CSS. On the other hand, when disabled the minimap will expand to honor the preferred line width.\",\n \"order\": 7\n },\n \"ignoreWhitespacesInTokens\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"When enabled, text editor tokens are rendered as plain blocks, with no regards to the whitespaces they contains.\",\n \"order\": 8\n },\n \"charWidth\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0.5,\n \"order\": 9\n },\n \"charHeight\": {\n \"type\": \"number\",\n \"default\": 2,\n \"minimum\": 0.5,\n \"order\": 10\n },\n \"interline\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0,\n \"description\": \"The space between lines in the minimap in pixels.\",\n \"order\": 11\n },\n \"textOpacity\": {\n \"type\": \"number\",\n \"default\": 0.6,\n \"minimum\": 0,\n \"maximum\": 1,\n \"description\": \"The opacity used to render the line's text in the minimap.\",\n \"order\": 12\n },\n \"moveCursorOnMinimapClick\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"Moves the cursor to the beginning of the target line when clicking on the minimap\",\n \"order\": 13\n },\n \"independentMinimapScroll\": {\n \"type\": \"boolean\",\n \"title\": \"Independent Minimap Scroll On Mouse Wheel Events\",\n \"default\": false,\n \"description\": \"When enabled, using the mouse wheel over the Minimap will make it scroll independently of the text editor. The Minimap will still sync with the editor whenever the editor is scrolled, but it will no longer relay the mouse wheel events to the editor.\",\n \"order\": 14\n },\n \"scrollSensitivity\": {\n \"type\": \"number\",\n \"default\": 0.5,\n \"description\": \"The scrolling speed when the `Independent Minimap Scroll On Mouse Wheel Events` setting is enabled.\",\n \"order\": 15\n },\n \"smoothScrolling\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"Whether to offset the minimap canvas when scrolling to keep the scroll smooth. When `true` the minimap canvas will be offseted, resulting in a smoother scroll, but with the side-effect of a blurry minimap when the canvas is placed between pixels. When `false` the canvas will always stay at the same position, and will never look blurry, but the scroll will appear more jagged.\",\n \"order\": 16\n },\n \"createPluginInDevMode\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"order\": 17\n },\n \"absoluteMode\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"When enabled the text editor content will be able to flow below the minimap.\",\n \"order\": 18\n },\n \"adjustAbsoluteModeHeight\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"When enabled and `Absolute Mode` is also enabled, the minimap height will be adjusted to only take the space required by the text editor content, leaving the space below triggering mouse events on the text editor. **Be aware this can have some impact on performances as the minimap canvases will be resized every time a change in the editor make its height change.**\",\n \"order\": 19\n },\n \"redrawDelay\": {\n \"type\": \"number\",\n \"default\": 400,\n \"minimum\": 0,\n \"maximum\": 2000,\n \"description\": \"Controls how often (in ms) the minimap should redraw itself after changing the text editor's contents. Setting this to 100ms or higher could dramatically improve editor responsiveness when working with large files. A value of 0 will cause the minimap to redraw itself immediately on each change.\",\n \"order\": 20\n },\n \"devicePixelRatioRounding\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"description\": \"Toggles the rounding of the devicePixelRatio in the minimap.\",\n \"order\": 21\n },\n \"useHardwareAcceleration\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"order\": 22\n },\n \"scrollAnimation\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"Enables animations when scrolling by clicking on the minimap.\",\n \"order\": 23\n },\n \"scrollAnimationDuration\": {\n \"type\": \"integer\",\n \"default\": 300,\n \"description\": \"The duration of scrolling animations when clicking on the minimap.\",\n \"order\": 24\n },\n \"maxTokensInOneLine\": {\n \"type\": \"integer\",\n \"default\": 160,\n \"description\": \"The maximum number of tokens that are rendered for each line.\",\n \"order\": 25\n }\n}\n","\"use strict\"\n\nimport { CompositeDisposable } from \"atom\"\nimport { emitter, getConfigSchema } from \"./main\"\n\n/**\n * Provides methods to manage minimap plugins. Minimap plugins are Atom packages that will augment the minimap. They\n * have a secondary activation cycle going on constrained by the minimap package activation. A minimap plugin life cycle\n * will generally look like this:\n *\n * 1. The plugin module is activated by Atom through the `activate` method\n * 2. The plugin then register itself as a minimap plugin using `registerPlugin`\n * 3. The plugin is activated/deactivated according to the minimap settings.\n * 4. On the plugin module deactivation, the plugin must unregisters itself from the minimap using the `unregisterPlugin`.\n *\n * @access public\n */\n\n// Initialize the properties for plugin management.\n\n/**\n * The registered Minimap plugins stored using their name as key.\n *\n * @type {Object}\n * @access private\n */\nexport const plugins = {}\n/**\n * The plugins' subscriptions stored using the plugin names as keys.\n *\n * @type {Object}\n * @access private\n */\nconst pluginsSubscriptions = {}\n\n/**\n * A map that stores the display order for each plugin\n *\n * @type {Object}\n * @access private\n */\nconst pluginsOrderMap = {}\n\n/**\n * Registers a minimap `plugin` with the given `name`.\n *\n * @fires {did-add-plugin} with The name and a reference to the added plugin.\n * @fires {did-activate-plugin} if The plugin was activated during the registration.\n * @param {string} name The identifying name of the plugin. It will be used as activation settings name as well as the\n * key to unregister the module.\n * @param {MinimapPlugin} plugin The plugin to register.\n */\nexport function registerPlugin(name, plugin) {\n plugins[name] = plugin\n pluginsSubscriptions[name] = new CompositeDisposable()\n\n const event = { name, plugin }\n emitter.emit(\"did-add-plugin\", event)\n\n if (atom.config.get(\"minimap.displayPluginsControls\")) {\n registerPluginControls(name, plugin)\n }\n\n updatesPluginActivationState(name)\n}\n\n/**\n * Unregisters a plugin from the minimap.\n *\n * @fires {did-remove-plugin} with The name and a reference to the added plugin.\n * @param {string} name The identifying name of the plugin to unregister.\n */\nexport function unregisterPlugin(name) {\n const plugin = plugins[name]\n\n if (atom.config.get(\"minimap.displayPluginsControls\")) {\n unregisterPluginControls(name)\n }\n\n delete plugins[name]\n\n const event = { name, plugin }\n emitter.emit(\"did-remove-plugin\", event)\n}\n\n/**\n * Toggles the specified plugin activation state.\n *\n * @fires {did-activate-plugin} if The plugin was activated by the call.\n * @fires {did-deactivate-plugin} if The plugin was deactivated by the call.\n * @param {string} name The name of the plugin.\n * @param {boolean} boolean An optional boolean to set the activation state of the plugin. If ommitted the new plugin\n * state will be the the inverse of its current state.\n */\nexport function togglePluginActivation(name, boolean) {\n const settingsKey = `minimap.plugins.${name}`\n\n if (boolean !== undefined && boolean !== null) {\n atom.config.set(settingsKey, boolean)\n } else {\n atom.config.set(settingsKey, !atom.config.get(settingsKey))\n }\n\n updatesPluginActivationState(name)\n}\n\n/**\n * Deactivates all the plugins registered in the minimap package so far.\n *\n * @fires {did-deactivate-plugin} for Each plugin deactivated by the call.\n */\nexport function deactivateAllPlugins() {\n for (const [name, plugin] of eachPlugin()) {\n plugin.deactivatePlugin()\n emitter.emit(\"did-deactivate-plugin\", { name, plugin })\n }\n}\n\n/**\n * A generator function to iterate over registered plugins.\n *\n * @returns An iterable that yield the name and reference to every plugin as an array in each iteration.\n */\nfunction* eachPlugin() {\n for (const name in plugins) {\n yield [name, plugins[name]]\n }\n}\n\n/**\n * Updates the plugin activation state according to the current config.\n *\n * @fires {did-activate-plugin} if The plugin was activated by the call.\n * @fires {did-deactivate-plugin} if The plugin was deactivated by the call.\n * @param {string} name The identifying name of the plugin to update.\n * @access private\n */\nfunction updatesPluginActivationState(name) {\n const plugin = plugins[name]\n const pluginActive = plugin.isActive()\n const settingActive = atom.config.get(`minimap.plugins.${name}`)\n\n if (atom.config.get(\"minimap.displayPluginsControls\")) {\n if (settingActive && !pluginActive) {\n activatePlugin(name, plugin)\n } else if (pluginActive && !settingActive) {\n deactivatePlugin(name, plugin)\n }\n } else {\n if (!pluginActive) {\n activatePlugin(name, plugin)\n } else if (pluginActive) {\n deactivatePlugin(name, plugin)\n }\n }\n}\n\nexport function activatePlugin(name, plugin) {\n const event = { name, plugin }\n\n plugin.activatePlugin()\n emitter.emit(\"did-activate-plugin\", event)\n}\n\nexport function deactivatePlugin(name, plugin) {\n const event = { name, plugin }\n\n plugin.deactivatePlugin()\n emitter.emit(\"did-deactivate-plugin\", event)\n}\n\n/**\n * When the `minimap.displayPluginsControls` setting is toggled, this function will register the commands and setting to\n * manage the plugin activation from the minimap settings.\n *\n * @param {string} name The identifying name of the plugin.\n * @param {MinimapPlugin} plugin The plugin instance to register controls for.\n * @listens {minimap.plugins.${name}} listen to the setting to update\n * the plugin state accordingly.\n * @listens {minimap:toggle-${name}} listen to the command on `atom-workspace`\n * to toggle the plugin state.\n * @access private\n */\nfunction registerPluginControls(name, plugin) {\n const settingsKey = `minimap.plugins.${name}`\n const orderSettingsKey = `minimap.plugins.${name}DecorationsZIndex`\n\n const config = getConfigSchema()\n\n config.plugins.properties[name] = {\n type: \"boolean\",\n title: name,\n description: `Whether the ${name} plugin is activated and displayed in the Minimap.`,\n default: true,\n }\n\n config.plugins.properties[`${name}DecorationsZIndex`] = {\n type: \"integer\",\n title: `${name} decorations order`,\n description: `The relative order of the ${name} plugin's decorations in the layer into which they are drawn. Note that this order only apply inside a layer, so highlight-over decorations will always be displayed above line decorations as they are rendered in different layers.`,\n default: 0,\n }\n\n if (atom.config.get(settingsKey) === undefined) {\n atom.config.set(settingsKey, true)\n }\n\n if (atom.config.get(orderSettingsKey) === undefined) {\n atom.config.set(orderSettingsKey, 0)\n }\n\n pluginsSubscriptions[name].add(\n atom.config.observe(settingsKey, () => {\n updatesPluginActivationState(name)\n })\n )\n\n pluginsSubscriptions[name].add(\n atom.config.observe(orderSettingsKey, (order) => {\n updatePluginsOrderMap(name)\n const event = { name, plugin, order }\n emitter.emit(\"did-change-plugin-order\", event)\n })\n )\n\n pluginsSubscriptions[name].add(\n atom.commands.add(\"atom-workspace\", {\n [`minimap:toggle-${name}`]: () => {\n togglePluginActivation(name)\n },\n })\n )\n\n updatePluginsOrderMap(name)\n}\n\n/**\n * Updates the display order in the map for the passed-in plugin name.\n *\n * @param {string} name The name of the plugin to update\n * @access private\n */\nfunction updatePluginsOrderMap(name) {\n const orderSettingsKey = `minimap.plugins.${name}DecorationsZIndex`\n\n pluginsOrderMap[name] = atom.config.get(orderSettingsKey)\n}\n\n/**\n * Returns the plugins display order mapped by name.\n *\n * @returns {Object} The plugins order by name\n */\nexport function getPluginsOrder() {\n return pluginsOrderMap\n}\n\n/**\n * When the `minimap.displayPluginsControls` setting is toggled, this function will unregister the commands and setting\n * that was created previously.\n *\n * @param {string} name The identifying name of the plugin.\n * @access private\n */\nfunction unregisterPluginControls(name) {\n pluginsSubscriptions[name].dispose()\n delete pluginsSubscriptions[name]\n delete getConfigSchema().plugins.properties[name]\n}\n","// Functions used to recommend the configurations required for the best performance of Minimap\n\nexport function treeSitterWarning() {\n return observeAndWarn(\n \"core.useTreeSitterParsers\",\n true,\n \"Tree-sitter is off (Low Performance Warning).\",\n `You should turn on Atom's tree-sitter parser to experience the best performance Minimap and Atom are designed for.\n Keeping tree-sitter parser off results in sluggish scrolling and lags in the text editor.`\n )\n}\n\n/* Utility function that observes a config and throws warnings once a day if it is not the recommended value */\nfunction observeAndWarn(configName, recommendedValue, warningTitle, warningDescription) {\n return atom.config.observe(configName, (value) => {\n if (value !== recommendedValue) {\n const storageName = `Minimap.${configName}`\n const today = new Date()\n const previousWarning = window.localStorage.getItem(storageName)\n let previousWarningDay = null\n if (previousWarning) {\n previousWarningDay = new Date(Date.parse(previousWarning)).getDay()\n }\n // throw the warning once a day\n if (!previousWarningDay || (typeof previousWarningDay === \"number\" && previousWarningDay - today.getDay() >= 1)) {\n window.localStorage.setItem(storageName, today)\n\n const notification = atom.notifications.addWarning(warningTitle, {\n description: warningDescription,\n dismissable: true,\n buttons: [\n {\n text: `Set to ${recommendedValue} and restart Atom`,\n onDidClick() {\n atom.config.set(configName, true)\n notification.dismiss()\n window.localStorage.removeItem(storageName)\n setTimeout(() => {\n atom.reload()\n }, 1500)\n },\n },\n ],\n })\n }\n }\n })\n}\n","\"use strict\";\n/**\n * This class is used to read the styles informations (e.g. color and background-color) from the DOM to use when\n * rendering canvas. This is used in Minimap and Terminal It attaches a dummyNode to the targetNode, renders them, and\n * finds the computed style back.\n */\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.StyleReader = void 0;\n\nclass StyleReader {\n constructor() {\n this.domStylesCache = new Map();\n this.dummyNode = void 0;\n this.targetNode = void 0;\n }\n\n /** Set to true once tokenized */\n // private hasTokenizedOnce = false\n\n /**\n * Returns the computed values for the given property and scope in the DOM.\n *\n * This function insert a dummy element in the DOM to compute its style, return the specified property, and clear the\n * content of the dummy element.\n *\n * @param scopes A list of classes reprensenting the scope to build\n * @param property The name of the style property to compute\n * @param targetNode\n * @param getFromCache Whether to cache the computed value or not\n * @returns The computed property's value used in CanvasDrawer\n */\n retrieveStyleFromDom(scopes, property, targetNode, getFromCache = true) {\n if (scopes.length === 0) {\n return \"\";\n } // no scopes\n\n\n const key = scopes.join(\" \");\n let cachedData = this.domStylesCache.get(key);\n\n if (cachedData !== undefined) {\n if (getFromCache) {\n // if should get the value from the cache\n const value = cachedData[property];\n\n if (value !== undefined) {\n // value exists\n return value;\n } // value not in the cache - get fresh value\n\n } // don't use cache - get fresh value\n\n } else {\n // key did not exist. create it\n cachedData = {};\n }\n\n this.ensureDummyNodeExistence(targetNode);\n const dummyNode = this.dummyNode;\n let parent = dummyNode;\n\n for (let i = 0, len = scopes.length; i < len; i++) {\n const scope = scopes[i];\n const node = document.createElement(\"span\");\n node.className = scope.replace(dotRegexp, \" \"); // TODO why replace is needed?\n\n parent.appendChild(node);\n parent = node;\n }\n\n const style = window.getComputedStyle(parent);\n let value = style.getPropertyValue(property); // rotate hue if webkit-filter available\n\n const filter = style.getPropertyValue(\"-webkit-filter\");\n\n if (filter.includes(\"hue-rotate\")) {\n value = rotateHue(value, filter);\n }\n\n if (value !== \"\") {\n cachedData[property] = value;\n this.domStylesCache.set(key, cachedData);\n }\n\n dummyNode.innerHTML = \"\";\n return value;\n }\n /**\n * Creates a DOM node container for all the operations that need to read styles properties from DOM.\n *\n * @param targetNode\n */\n\n\n ensureDummyNodeExistence(targetNode) {\n if (this.targetNode !== targetNode || this.dummyNode === undefined) {\n this.dummyNode = document.createElement(\"span\");\n this.dummyNode.style.visibility = \"hidden\"; // attach to the target node\n\n targetNode.appendChild(this.dummyNode);\n this.targetNode = targetNode;\n }\n }\n /** Invalidates the cache by emptying the cache object. used in MinimapElement */\n\n\n invalidateDOMStylesCache() {\n this.domStylesCache.clear();\n }\n /** Invalidates the cache only for the first tokenization event. */\n\n /*\n private invalidateIfFirstTokenization () {\n if (this.hasTokenizedOnce) {\n return\n }\n this.invalidateDOMStylesCache()\n this.hasTokenizedOnce = true\n }\n */\n\n\n} // ## ## ######## ## ######## ######## ######## ######\n// ## ## ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ## ##\n// ######### ###### ## ######## ###### ######## ######\n// ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ## ##\n// ## ## ######## ######## ## ######## ## ## ######\n\n\nexports.StyleReader = StyleReader;\nconst dotRegexp = /\\.+/g;\nconst rgbExtractRegexp = /rgb(a?)\\((\\d+), (\\d+), (\\d+)(, (\\d+(\\.\\d+)?))?\\)/;\nconst hueRegexp = /hue-rotate\\((-?\\d+)deg\\)/;\n/**\n * Computes the output color of `value` with a rotated hue defined in `filter`.\n *\n * @param value The CSS color to apply the rotation on\n * @param filter The CSS hue rotate filter declaration\n * @returns The rotated CSS color\n */\n\nfunction rotateHue(value, filter) {\n const match = value.match(rgbExtractRegexp);\n\n if (match === null) {\n return \"\";\n }\n\n const [,, rStr, gStr, bStr,, aStr] = match;\n const hueMatch = filter.match(hueRegexp);\n\n if (hueMatch === null) {\n return \"\";\n }\n\n const [, hueStr] = hueMatch;\n let [r, g, b, a, hue] = [rStr, gStr, bStr, aStr, hueStr].map(Number);\n [r, g, b] = rotate(r, g, b, hue);\n\n if (isNaN(a)) {\n return `rgb(${r}, ${g}, ${b})`;\n } else {\n return `rgba(${r}, ${g}, ${b}, ${a})`;\n }\n}\n/**\n * Computes the hue rotation on the provided `r`, `g` and `b` channels by the amount of `angle`.\n *\n * @param r The red channel of the color to rotate\n * @param g The green channel of the color to rotate\n * @param b The blue channel of the color to rotate\n * @param angle The angle to rotate the hue with\n * @returns The rotated color channels\n */\n\n\nfunction rotate(r, g, b, angle) {\n const matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n const lumR = 0.2126;\n const lumG = 0.7152;\n const lumB = 0.0722;\n const hueRotateR = 0.143;\n const hueRotateG = 0.14;\n const hueRotateB = 0.283;\n const cos = Math.cos(angle * Math.PI / 180);\n const sin = Math.sin(angle * Math.PI / 180);\n matrix[0] = lumR + (1 - lumR) * cos - lumR * sin;\n matrix[1] = lumG - lumG * cos - lumG * sin;\n matrix[2] = lumB - lumB * cos + (1 - lumB) * sin;\n matrix[3] = lumR - lumR * cos + hueRotateR * sin;\n matrix[4] = lumG + (1 - lumG) * cos + hueRotateG * sin;\n matrix[5] = lumB - lumB * cos - hueRotateB * sin;\n matrix[6] = lumR - lumR * cos - (1 - lumR) * sin;\n matrix[7] = lumG - lumG * cos + lumG * sin;\n matrix[8] = lumB + (1 - lumB) * cos + lumB * sin;\n return [clamp(matrix[0] * r + matrix[1] * g + matrix[2] * b), clamp(matrix[3] * r + matrix[4] * g + matrix[5] * b), clamp(matrix[6] * r + matrix[7] * g + matrix[8] * b)];\n}\n\nfunction clamp(num) {\n return Math.ceil(Math.max(0, Math.min(255, num)));\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy1jb21tb25zLXVpL2RvbS1zdHlsZS1yZWFkZXIudHMiXSwibmFtZXMiOlsiU3R5bGVSZWFkZXIiLCJkb21TdHlsZXNDYWNoZSIsIk1hcCIsImR1bW15Tm9kZSIsInRhcmdldE5vZGUiLCJyZXRyaWV2ZVN0eWxlRnJvbURvbSIsInNjb3BlcyIsInByb3BlcnR5IiwiZ2V0RnJvbUNhY2hlIiwibGVuZ3RoIiwia2V5Iiwiam9pbiIsImNhY2hlZERhdGEiLCJnZXQiLCJ1bmRlZmluZWQiLCJ2YWx1ZSIsImVuc3VyZUR1bW15Tm9kZUV4aXN0ZW5jZSIsInBhcmVudCIsImkiLCJsZW4iLCJzY29wZSIsIm5vZGUiLCJkb2N1bWVudCIsImNyZWF0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gdGhpcy5oYXNUb2tlbml6ZWRPbmNlID0gdHJ1ZVxuICB9XG4gICovXG59XG5cbi8vICAgICMjICAgICAjIyAjIyMjIyMjIyAjIyAgICAgICAjIyMjIyMjIyAgIyMjIyMjIyMgIyMjIyMjIyMgICAjIyMjIyNcbi8vICAgICMjICAgICAjIyAjIyAgICAgICAjIyAgICAgICAjIyAgICAgIyMgIyMgICAgICAgIyMgICAgICMjICMjICAgICMjXG4vLyAgICAjIyAgICAgIyMgIyMgICAgICAgIyMgICAgICAgIyMgICAgICMjICMjICAgICAgICMjICAgICAjIyAjI1xuLy8gICAgIyMjIyMjIyMjICMjIyMjIyAgICMjICAgICAgICMjIyMjIyMjICAjIyMjIyMgICAjIyMjIyMjIyAgICMjIyMjI1xuLy8gICAgIyMgICAgICMjICMjICAgICAgICMjICAgICAgICMjICAgICAgICAjIyAgICAgICAjIyAgICMjICAgICAgICAgIyNcbi8vICAgICMjICAgICAjIyAjIyAgICAgICAjIyAgICAgICAjIyAgICAgICAgIyMgICAgICAgIyMgICAgIyMgICMjICAgICMjXG4vLyAgICAjIyAgICAgIyMgIyMjIyMjIyMgIyMjIyMjIyMgIyMgICAgICAgICMjIyMjIyMjICMjICAgICAjIyAgIyMjIyMjXG5cbmNvbnN0IGRvdFJlZ2V4cCA9IC9cXC4rL2dcbmNvbnN0IHJnYkV4dHJhY3RSZWdleHAgPSAvcmdiKGE/KVxcKChcXGQrKSwgKFxcZCspLCAoXFxkKykoLCAoXFxkKyhcXC5cXGQrKT8pKT9cXCkvXG5jb25zdCBodWVSZWdleHAgPSAvaHVlLXJvdGF0ZVxcKCgtP1xcZCspZGVnXFwpL1xuXG4vKipcbiAqIENvbXB1dGVzIHRoZSBvdXRwdXQgY29sb3Igb2YgYHZhbHVlYCB3aXRoIGEgcm90YXRlZCBodWUgZGVmaW5lZCBpbiBgZmlsdGVyYC5cbiAqXG4gKiBAcGFyYW0gdmFsdWUgVGhlIENTUyBjb2xvciB0byBhcHBseSB0aGUgcm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zRdID0gbHVtRyArICgxIC0gbHVtRykgKiBjb3MgKyBodWVSb3RhdGVHICogc2luXG4gIG1hdHJpeFs1XSA9IGx1bUIgLSBsdW1CICogY29zIC0gaHVlUm90YXRlQiAqIHNpblxuICBtYXRyaXhbNl0gPSBsdW1SIC0gbHVtUiAqIGNvcyAtICgxIC0gbHVtUikgKiBzaW5cbiAgbWF0cml4WzddID0gbHVtRyAtIGx1bUcgKiBjb3MgKyBsdW1HICogc2luXG4gIG1hdHJpeFs4XSA9IGx1bUIgKyAoMSAtIGx1bUIpICogY29zICsgbHVtQiAqIHNpblxuXG4gIHJldHVybiBbXG4gICAgY2xhbXAobWF0cml4WzBdICogciArIG1hdHJpeFsxXSAqIGcgKyBtYXRyaXhbMl0gKiBiKSxcbiAgICBjbGFtcChtYXRyaXhbM10gKiByICsgbWF0cml4WzRdICogZyArIG1hdHJpeFs1XSAqIGIpLFxuICAgIGNsYW1wKG1hdHJpeFs2XSAqIHIgKyBtYXRyaXhbN10gKiBnICsgbWF0cml4WzhdICogYiksXG4gIF1cbn1cblxuZnVuY3Rpb24gY2xhbXAobnVtOiBudW1iZXIpIHtcbiAgcmV0dXJuIE1hdGguY2VpbChNYXRoLm1heCgwLCBNYXRoLm1pbigyNTUsIG51bSkpKVxufVxuIl19","\"use strict\"\n\n/**\n * This class is used to read the styles informations (e.g. color and background-color) from the DOM to use when\n * rendering canvas. This is used in Minimap and Terminal It attaches a dummyNode to the targetNode, renders them, and\n * finds the computed style back.\n */\nexport class StyleReader {\n /** The cache object */\n private domStylesCache = new Map>()\n\n private dummyNode?: HTMLElement\n\n /** Used to check if the dummyNode is on the current targetNode */\n private targetNode?: HTMLElement\n\n /** Set to true once tokenized */\n // private hasTokenizedOnce = false\n\n /**\n * Returns the computed values for the given property and scope in the DOM.\n *\n * This function insert a dummy element in the DOM to compute its style, return the specified property, and clear the\n * content of the dummy element.\n *\n * @param scopes A list of classes reprensenting the scope to build\n * @param property The name of the style property to compute\n * @param targetNode\n * @param getFromCache Whether to cache the computed value or not\n * @returns The computed property's value used in CanvasDrawer\n */\n retrieveStyleFromDom(\n scopes: string[],\n property: string,\n targetNode: HTMLElement,\n getFromCache: boolean = true\n ): string {\n if (scopes.length === 0) {\n return \"\"\n } // no scopes\n const key = scopes.join(\" \")\n let cachedData = this.domStylesCache.get(key)\n\n if (cachedData !== undefined) {\n if (getFromCache) {\n // if should get the value from the cache\n const value = cachedData[property]\n if (value !== undefined) {\n // value exists\n return value\n } // value not in the cache - get fresh value\n } // don't use cache - get fresh value\n } else {\n // key did not exist. create it\n cachedData = {}\n }\n\n this.ensureDummyNodeExistence(targetNode)\n const dummyNode = this.dummyNode as HTMLElement\n\n let parent = dummyNode\n for (let i = 0, len = scopes.length; i < len; i++) {\n const scope = scopes[i]\n const node = document.createElement(\"span\")\n node.className = scope.replace(dotRegexp, \" \") // TODO why replace is needed?\n parent.appendChild(node)\n parent = node\n }\n\n const style = window.getComputedStyle(parent)\n let value = style.getPropertyValue(property)\n\n // rotate hue if webkit-filter available\n const filter = style.getPropertyValue(\"-webkit-filter\")\n if (filter.includes(\"hue-rotate\")) {\n value = rotateHue(value, filter)\n }\n\n if (value !== \"\") {\n cachedData[property] = value\n this.domStylesCache.set(key, cachedData)\n }\n\n dummyNode.innerHTML = \"\"\n return value\n }\n\n /**\n * Creates a DOM node container for all the operations that need to read styles properties from DOM.\n *\n * @param targetNode\n */\n private ensureDummyNodeExistence(targetNode: HTMLElement) {\n if (this.targetNode !== targetNode || this.dummyNode === undefined) {\n this.dummyNode = document.createElement(\"span\")\n this.dummyNode.style.visibility = \"hidden\"\n\n // attach to the target node\n targetNode.appendChild(this.dummyNode)\n this.targetNode = targetNode\n }\n }\n\n /** Invalidates the cache by emptying the cache object. used in MinimapElement */\n invalidateDOMStylesCache() {\n this.domStylesCache.clear()\n }\n\n /** Invalidates the cache only for the first tokenization event. */\n /*\n private invalidateIfFirstTokenization () {\n if (this.hasTokenizedOnce) {\n return\n }\n this.invalidateDOMStylesCache()\n this.hasTokenizedOnce = true\n }\n */\n}\n\n// ## ## ######## ## ######## ######## ######## ######\n// ## ## ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ## ##\n// ######### ###### ## ######## ###### ######## ######\n// ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ## ##\n// ## ## ######## ######## ## ######## ## ## ######\n\nconst dotRegexp = /\\.+/g\nconst rgbExtractRegexp = /rgb(a?)\\((\\d+), (\\d+), (\\d+)(, (\\d+(\\.\\d+)?))?\\)/\nconst hueRegexp = /hue-rotate\\((-?\\d+)deg\\)/\n\n/**\n * Computes the output color of `value` with a rotated hue defined in `filter`.\n *\n * @param value The CSS color to apply the rotation on\n * @param filter The CSS hue rotate filter declaration\n * @returns The rotated CSS color\n */\nfunction rotateHue(value: string, filter: string): string {\n const match = value.match(rgbExtractRegexp)\n if (match === null) {\n return \"\"\n }\n const [, , rStr, gStr, bStr, , aStr] = match\n\n const hueMatch = filter.match(hueRegexp)\n if (hueMatch === null) {\n return \"\"\n }\n\n const [, hueStr] = hueMatch\n\n let [r, g, b, a, hue] = [rStr, gStr, bStr, aStr, hueStr].map(Number)\n ;[r, g, b] = rotate(r, g, b, hue)\n\n if (isNaN(a)) {\n return `rgb(${r}, ${g}, ${b})`\n } else {\n return `rgba(${r}, ${g}, ${b}, ${a})`\n }\n}\n\n/**\n * Computes the hue rotation on the provided `r`, `g` and `b` channels by the amount of `angle`.\n *\n * @param r The red channel of the color to rotate\n * @param g The green channel of the color to rotate\n * @param b The blue channel of the color to rotate\n * @param angle The angle to rotate the hue with\n * @returns The rotated color channels\n */\nfunction rotate(r: number, g: number, b: number, angle: number): number[] {\n const matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1]\n const lumR = 0.2126\n const lumG = 0.7152\n const lumB = 0.0722\n const hueRotateR = 0.143\n const hueRotateG = 0.14\n const hueRotateB = 0.283\n const cos = Math.cos((angle * Math.PI) / 180)\n const sin = Math.sin((angle * Math.PI) / 180)\n\n matrix[0] = lumR + (1 - lumR) * cos - lumR * sin\n matrix[1] = lumG - lumG * cos - lumG * sin\n matrix[2] = lumB - lumB * cos + (1 - lumB) * sin\n matrix[3] = lumR - lumR * cos + hueRotateR * sin\n matrix[4] = lumG + (1 - lumG) * cos + hueRotateG * sin\n matrix[5] = lumB - lumB * cos - hueRotateB * sin\n matrix[6] = lumR - lumR * cos - (1 - lumR) * sin\n matrix[7] = lumG - lumG * cos + lumG * sin\n matrix[8] = lumB + (1 - lumB) * cos + lumB * sin\n\n return [\n clamp(matrix[0] * r + matrix[1] * g + matrix[2] * b),\n clamp(matrix[3] * r + matrix[4] * g + matrix[5] * b),\n clamp(matrix[6] * r + matrix[7] * g + matrix[8] * b),\n ]\n}\n\nfunction clamp(num: number) {\n return Math.ceil(Math.max(0, Math.min(255, num)))\n}\n"],"names":["StyleReader","domStylesCache","Map","dummyNode","targetNode","retrieveStyleFromDom","scopes","property","getFromCache","length","key","join","cachedData","get","undefined","value","ensureDummyNodeExistence","parent","i","len","scope","node","document","createElement","className","replace","dotRegexp","appendChild","style","window","getComputedStyle","getPropertyValue","filter","includes","rotateHue","set","innerHTML","visibility","invalidateDOMStylesCache","clear","rgbExtractRegexp","hueRegexp","match","rStr","gStr","bStr","aStr","hueMatch","hueStr","r","g","b","a","hue","map","Number","rotate","isNaN","angle","matrix","lumR","lumG","lumB","hueRotateR","hueRotateG","hueRotateB","cos","Math","PI","sin","clamp","num","ceil","max","min"],"version":3,"file":"main.js.map"} \ No newline at end of file +{"mappings":"IkCWI,E,I,E,E,Q,Q,E,Q,Q,E,W,S,E,C,C,C,C,C,C,C,E,O,c,C,E,E,C,I,E,I,E,W,C,E,a,C,C,E,C,S,E,C,E,O,G,E,U,C,E,O,C,C,C,I,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E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ACvB,oBAAA,GACA,gBAAA,GACA,cAAA,GACA,gBAAA,GACA,mBAAA,GACA,eAAA,GACA,kBAAA,GACA,oBAAA,GACA,sBAAA,GACA,uBAAA,GACA,aAAA,GACA,wBAAA,GACA,iBAAA,GACA,2BAAA,GACA,iBAAA,GACA,gBAAA,GACA,eAAgB,GAChB,iBAAkB,GAClB,uBAAwB,GACxB,qBAAsB,GACtB,eAAgB,GAChB,iBAAkB,GAClB,gBAAiB,EACnB,EAOO,SAAS,KACd,OAAO,EACT,C,E,O,O,C,O,I,C,I,O,C,S,C,E,Y,G,A,e,G,O,S,C,c,C,I,C,E,I,O,c,C,E,E,C,W,C,E,I,W,O,A,E,C,E,A,C,E","sources":["","node_modules/atom-utils-plus/lib/register-or-update-element.js","node_modules/grim/lib/grim.js","node_modules/grim/lib/deprecation.js","node_modules/event-kit/dist/event-kit.js","node_modules/event-kit/dist/emitter.js","node_modules/event-kit/dist/disposable.js","node_modules/event-kit/dist/composite-disposable.js","node_modules/atom-utils-plus/lib/mixins/ancestors.js","node_modules/mixto/lib/mixin.js","node_modules/atom-utils-plus/lib/mixins/disposable-events.js","node_modules/atom-utils-plus/lib/mixins/events-delegation.js","node_modules/atom-utils-plus/lib/mixins/space-pen-dsl.js","lib/deps/underscore-plus.js","lib/decorators/element.js","../../../../usr/lib/node_modules/parcel/node_modules/@parcel/runtime-js/lib/runtime-f053cdc83b65deee.js","lib/main.js","lib/minimap-element.js","node_modules/atom-utils-plus/lib/atom-utils.js","node_modules/element-resize-detector/src/element-resize-detector.js","node_modules/element-resize-detector/src/collection-utils.js","node_modules/element-resize-detector/src/element-utils.js","node_modules/element-resize-detector/src/listener-handler.js","node_modules/element-resize-detector/src/id-generator.js","node_modules/element-resize-detector/src/id-handler.js","node_modules/element-resize-detector/src/reporter.js","node_modules/element-resize-detector/src/browser-detector.js","node_modules/batch-processor/src/batch-processor.js","node_modules/batch-processor/src/utils.js","node_modules/element-resize-detector/src/state-handler.js","node_modules/element-resize-detector/src/detection-strategy/object.js","node_modules/element-resize-detector/src/detection-strategy/scroll.js","lib/decoration-management.js","lib/decoration.js","lib/mixins/canvas-drawer.js","lib/canvas-layer.js","lib/decorators/include.js","lib/minimap-quick-settings-element.js","lib/minimap.js","lib/adapters/stable-adapter.js","lib/config.json","lib/plugin-management.js","lib/performance-monitor.js","node_modules/atom-ide-base/commons-ui/dom-style-reader.js","node_modules/atom-ide-base/src-commons-ui/dom-style-reader.ts"],"sourcesContent":["var $2INr1$atom = require(\"atom\");\nvar $2INr1$path = require(\"path\");\n\n\n var $parcel$global = globalThis;\n \nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n }\n });\n });\n\n return dest;\n}\n\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequire7d67\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequire7d67\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nparcelRegister(\"kAKcv\", function(module, exports) {\n\n// Generated by CoffeeScript 2.5.1\n(function() {\n var callbackProperties, decorateElementClass, decorateElementPrototype, deprecate;\n ({ deprecate: deprecate } = (parcelRequire(\"gx0jg\")));\n if ($parcel$global.__CUSTOM_HTML_ELEMENTS_CLASSES__ != null) {\n $parcel$global.__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__ = $parcel$global.__CUSTOM_HTML_ELEMENTS_CLASSES__;\n delete $parcel$global.__CUSTOM_HTML_ELEMENTS_CLASSES__;\n } else if ($parcel$global.__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__ == null) $parcel$global.__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__ = {};\n callbackProperties = [\n \"createdCallback\",\n \"attachedCallback\",\n \"detachedCallback\",\n \"attributeChangedCallback\"\n ];\n decorateElementPrototype = function(target, source) {\n callbackProperties.forEach(function(k) {\n return Object.defineProperty(target, k, {\n value: function() {\n var ref;\n return (ref = this[`__${k}`]) != null ? ref.apply(this, arguments) : void 0;\n },\n writable: true,\n enumerable: true,\n configurable: true\n });\n });\n return Object.getOwnPropertyNames(source).forEach(function(k) {\n var descriptor;\n if (k === \"constructor\") return;\n descriptor = Object.getOwnPropertyDescriptor(source, k);\n if (callbackProperties.indexOf(k) > -1) return Object.defineProperty(target, `__${k}`, descriptor);\n else return Object.defineProperty(target, k, descriptor);\n });\n };\n decorateElementClass = function(target, source) {\n return Object.getOwnPropertyNames(source).forEach(function(k) {\n var descriptor;\n if (k === \"length\" || k === \"name\" || k === \"arguments\" || k === \"caller\" || k === \"prototype\") return;\n descriptor = Object.getOwnPropertyDescriptor(source, k);\n return Object.defineProperty(target, k, descriptor);\n });\n };\n module.exports = function(nodeName, options) {\n var elementClass, elementPrototype, klass, proto, ref;\n ({ class: klass } = options);\n if (klass != null) proto = klass.prototype;\n else proto = (ref = options.prototype) != null ? ref : options;\n if (proto === options) deprecate(\"Using the prototype as the second argument is deprecated, use the prototype option instead\");\n if (__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__[nodeName]) {\n elementClass = __ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__[nodeName];\n decorateElementPrototype(elementClass.prototype, proto);\n if (klass != null) decorateElementClass(elementClass, klass);\n return elementClass;\n } else {\n elementPrototype = Object.create(HTMLElement.prototype);\n decorateElementPrototype(elementPrototype, proto);\n elementClass = document.registerElement(nodeName, {\n prototype: Object.create(elementPrototype)\n });\n if (klass != null) decorateElementClass(elementClass, klass);\n return __ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__[nodeName] = elementClass;\n }\n };\n}).call(module.exports); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVnaXN0ZXItb3ItdXBkYXRlLWVsZW1lbnQuanMiLCJzb3VyY2VSb290IjoiLi4iLCJzb3VyY2VzIjpbImxpYi9yZWdpc3Rlci1vci11cGRhdGUtZWxlbWVudC5jb2ZmZWUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQUEsTUFBQSxrQkFBQSxFQUFBLG9CQUFBLEVBQUEsd0JBQUEsRUFBQTs7RUFBQSxDQUFBLENBQUMsU0FBRCxDQUFBLEdBQWMsT0FBQSxDQUFRLE1BQVIsQ0FBZDs7RUFFQSxJQUFHLCtDQUFIO0lBQ0UsTUFBTSxDQUFDLHFDQUFQLEdBQStDLE1BQU0sQ0FBQztJQUN0RCxPQUFPLE1BQU0sQ0FBQyxpQ0FGaEI7R0FBQSxNQUFBOztNQUlFLE1BQU0sQ0FBQyx3Q0FBeUMsQ0FBQTtLQUpsRDs7O0VBTUEsa0JBQUEsR0FBcUIsQ0FDbkIsaUJBRG1CLEVBRW5CLGtCQUZtQixFQUduQixrQkFIbUIsRUFJbkIsMEJBSm1COztFQU9yQix3QkFBQSxHQUEyQixRQUFBLENBQUMsTUFBRCxFQUFTLE1BQVQsQ0FBQTtJQUN6QixrQkFBa0IsQ0FBQyxPQUFuQixDQUEyQixRQUFBLENBQUMsQ0FBRCxDQUFBO2FBQ3pCLE1BQU0sQ0FBQyxjQUFQLENBQXNCLE1BQXRCLEV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cbiAgaWYgcHJvdG8gaXMgb3B0aW9uc1xuICAgIGRlcHJlY2F0ZSgnVXNpbmcgdGhlIHByb3RvdHlwZSBhcyB0aGUgc2Vjb25kIGFyZ3VtZW50IGlzIGRlcHJlY2F0ZWQsIHVzZSB0aGUgcHJvdG90eXBlIG9wdGlvbiBpbnN0ZWFkJylcblxuXG4gIGlmIF9fQVRPTV9VVElMU19DVVNUT01fRUxFTUVOVF9DTEFTU0VTX19bbm9kZU5hbWVdXG4gICAgZWxlbWVudENsYXNzID0gX19BVE9NX1VUSUxTX0NVU1RPTV9FTEVNRU5UX0NMQVNTRVNfX1tub2RlTmFtZV1cblxuICAgIGRlY29yYXRlRWxlbWVudFByb3RvdHlwZShlbGVtZW50Q2xhc3MucHJvdG90eXBlLCBwcm90bylcbiAgICBkZWNvcmF0ZUVsZW1lbnRDbGFzcyhlbGVtZW50Q2xhc3MsIGtsYXNzKSBpZiBrbGFzcz9cblxuICAgIGVsZW1lbnRDbGFzc1xuICBlbHNlXG4gICAgZWxlbWVudFByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUoSFRNTEVsZW1lbnQucHJvdG90eXBlKVxuICAgIGRlY29yYXRlRWxlbWVudFByb3RvdHlwZShlbGVtZW50UHJvdG90eXBlLCBwcm90bylcblxuICAgIGVsZW1lbnRDbGFzcyA9IGRvY3VtZW50LnJlZ2lzdGVyRWxlbWVudCBub2RlTmFtZSwgcHJvdG90eXBlOiBPYmplY3QuY3JlYXRlKGVsZW1lbnRQcm90b3R5cGUpXG5cbiAgICBkZWNvcmF0ZUVsZW1lbnRDbGFzcyhlbGVtZW50Q2xhc3MsIGtsYXNzKSBpZiBrbGFzcz9cblxuICAgIF9fQVRPTV9VVElMU19DVVNUT01fRUxFTUVOVF9DTEFTU0VTX19bbm9kZU5hbWVdID0gZWxlbWVudENsYXNzXG4iXX0=\n //# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/register-or-update-element.coffee\n\n});\nparcelRegister(\"gx0jg\", function(module, exports) {\n\n\n(function() {\n var Deprecation, Emitter, getRawStack, grim;\n Deprecation = (parcelRequire(\"1884a\"));\n if ($parcel$global.__grim__ == null) {\n Emitter = (parcelRequire(\"bgcdg\")).Emitter;\n grim = $parcel$global.__grim__ = {\n deprecations: {},\n emitter: new Emitter,\n includeDeprecatedAPIs: true,\n getDeprecations: function() {\n var deprecation, deprecations, deprecationsByLineNumber, deprecationsByPackage, fileName, lineNumber, packageName, _ref;\n deprecations = [];\n _ref = grim.deprecations;\n for(fileName in _ref){\n deprecationsByLineNumber = _ref[fileName];\n for(lineNumber in deprecationsByLineNumber){\n deprecationsByPackage = deprecationsByLineNumber[lineNumber];\n for(packageName in deprecationsByPackage){\n deprecation = deprecationsByPackage[packageName];\n deprecations.push(deprecation);\n }\n }\n }\n return deprecations;\n },\n getDeprecationsLength: function() {\n return this.getDeprecations().length;\n },\n clearDeprecations: function() {\n grim.deprecations = {};\n },\n logDeprecations: function() {\n var deprecation, deprecations, _i, _len;\n deprecations = this.getDeprecations();\n deprecations.sort(function(a, b) {\n return b.getCallCount() - a.getCallCount();\n });\n console.warn(\"\\nCalls to deprecated functions\\n-----------------------------\");\n for(_i = 0, _len = deprecations.length; _i < _len; _i++){\n deprecation = deprecations[_i];\n console.warn(\"(\" + deprecation.getCallCount() + \") \" + deprecation.getOriginName() + \" : \" + deprecation.getMessage(), deprecation);\n }\n },\n deprecate: function(message, metadata) {\n var deprecation, deprecationSite, error, fileName, lineNumber, originalStackTraceLimit, packageName, stack, _base, _base1, _base2, _ref, _ref1;\n originalStackTraceLimit = Error.stackTraceLimit;\n try {\n Error.stackTraceLimit = 7;\n error = new Error;\n stack = (_ref = typeof error.getRawStack === \"function\" ? error.getRawStack() : void 0) != null ? _ref : getRawStack(error);\n stack = stack.slice(1);\n } finally{\n Error.stackTraceLimit = originalStackTraceLimit;\n }\n deprecationSite = stack[0];\n fileName = deprecationSite.getFileName();\n lineNumber = deprecationSite.getLineNumber();\n packageName = (_ref1 = metadata != null ? metadata.packageName : void 0) != null ? _ref1 : \"\";\n if ((_base = grim.deprecations)[fileName] == null) _base[fileName] = {};\n if ((_base1 = grim.deprecations[fileName])[lineNumber] == null) _base1[lineNumber] = {};\n if ((_base2 = grim.deprecations[fileName][lineNumber])[packageName] == null) _base2[packageName] = new Deprecation(message);\n deprecation = grim.deprecations[fileName][lineNumber][packageName];\n deprecation.addStack(stack, metadata);\n grim.emitter.emit(\"updated\", deprecation);\n },\n addSerializedDeprecation: function(serializedDeprecation) {\n var deprecation, fileName, lineNumber, message, packageName, stack, stacks, _base, _base1, _base2, _i, _len, _ref, _ref1, _ref2;\n deprecation = Deprecation.deserialize(serializedDeprecation);\n message = deprecation.getMessage();\n fileName = deprecation.fileName, lineNumber = deprecation.lineNumber;\n stacks = deprecation.getStacks();\n packageName = (_ref = (_ref1 = stacks[0]) != null ? (_ref2 = _ref1.metadata) != null ? _ref2.packageName : void 0 : void 0) != null ? _ref : \"\";\n if ((_base = grim.deprecations)[fileName] == null) _base[fileName] = {};\n if ((_base1 = grim.deprecations[fileName])[lineNumber] == null) _base1[lineNumber] = {};\n if ((_base2 = grim.deprecations[fileName][lineNumber])[packageName] == null) _base2[packageName] = new Deprecation(message, fileName, lineNumber);\n deprecation = grim.deprecations[fileName][lineNumber][packageName];\n for(_i = 0, _len = stacks.length; _i < _len; _i++){\n stack = stacks[_i];\n deprecation.addStack(stack, stack.metadata);\n }\n grim.emitter.emit(\"updated\", deprecation);\n },\n on: function(eventName, callback) {\n return grim.emitter.on(eventName, callback);\n }\n };\n }\n getRawStack = function(error) {\n var originalPrepareStackTrace, result;\n originalPrepareStackTrace = Error.prepareStackTrace;\n Error.prepareStackTrace = function(error, stack) {\n return stack;\n };\n Error.captureStackTrace(error, getRawStack);\n result = error.stack;\n Error.prepareStackTrace = originalPrepareStackTrace;\n return result;\n };\n module.exports = $parcel$global.__grim__;\n}).call(module.exports);\n\n});\nparcelRegister(\"1884a\", function(module, exports) {\n(function() {\n var Deprecation, SourceMapCache;\n SourceMapCache = {};\n module.exports = Deprecation = function() {\n Deprecation.getFunctionNameFromCallsite = function(callsite) {};\n Deprecation.deserialize = function(_arg) {\n var deprecation, fileName, lineNumber, message, stack, stacks, _i, _len;\n message = _arg.message, fileName = _arg.fileName, lineNumber = _arg.lineNumber, stacks = _arg.stacks;\n deprecation = new Deprecation(message, fileName, lineNumber);\n for(_i = 0, _len = stacks.length; _i < _len; _i++){\n stack = stacks[_i];\n deprecation.addStack(stack, stack.metadata);\n }\n return deprecation;\n };\n function Deprecation(message, fileName, lineNumber) {\n this.message = message;\n this.fileName = fileName;\n this.lineNumber = lineNumber;\n this.callCount = 0;\n this.stackCount = 0;\n this.stacks = {};\n this.stackCallCounts = {};\n }\n Deprecation.prototype.getFunctionNameFromCallsite = function(callsite) {\n var _ref, _ref1, _ref2;\n if (callsite.functionName != null) return callsite.functionName;\n if (callsite.isToplevel()) return (_ref = callsite.getFunctionName()) != null ? _ref : \"\";\n else {\n if (callsite.isConstructor()) return \"new \" + callsite.getFunctionName();\n else if (callsite.getMethodName() && !callsite.getFunctionName()) return callsite.getMethodName();\n else return \"\" + callsite.getTypeName() + \".\" + ((_ref1 = (_ref2 = callsite.getMethodName()) != null ? _ref2 : callsite.getFunctionName()) != null ? _ref1 : \"\");\n }\n };\n Deprecation.prototype.getLocationFromCallsite = function(callsite) {\n var column, fileName, line;\n if (callsite == null) return \"unknown\";\n if (callsite.location != null) return callsite.location;\n if (callsite.isNative()) return \"native\";\n else if (callsite.isEval()) return \"eval at \" + this.getLocationFromCallsite(callsite.getEvalOrigin());\n else {\n fileName = callsite.getFileName();\n line = callsite.getLineNumber();\n column = callsite.getColumnNumber();\n return \"\" + fileName + \":\" + line + \":\" + column;\n }\n };\n Deprecation.prototype.getFileNameFromCallSite = function(callsite) {\n var _ref;\n return (_ref = callsite.fileName) != null ? _ref : callsite.getFileName();\n };\n Deprecation.prototype.getOriginName = function() {\n return this.originName;\n };\n Deprecation.prototype.getMessage = function() {\n return this.message;\n };\n Deprecation.prototype.getStacks = function() {\n var location, parsedStack, parsedStacks, stack, _ref;\n parsedStacks = [];\n _ref = this.stacks;\n for(location in _ref){\n stack = _ref[location];\n parsedStack = this.parseStack(stack);\n parsedStack.callCount = this.stackCallCounts[location];\n parsedStack.metadata = stack.metadata;\n parsedStacks.push(parsedStack);\n }\n return parsedStacks;\n };\n Deprecation.prototype.getStackCount = function() {\n return this.stackCount;\n };\n Deprecation.prototype.getCallCount = function() {\n return this.callCount;\n };\n Deprecation.prototype.addStack = function(stack, metadata) {\n var callerLocation, _base, _base1;\n if (this.originName == null) this.originName = this.getFunctionNameFromCallsite(stack[0]);\n if (this.fileName == null) this.fileName = this.getFileNameFromCallSite(stack[0]);\n if (this.lineNumber == null) this.lineNumber = typeof (_base = stack[0]).getLineNumber === \"function\" ? _base.getLineNumber() : void 0;\n this.callCount++;\n stack.metadata = metadata;\n callerLocation = this.getLocationFromCallsite(stack[1]);\n if (this.stacks[callerLocation] == null) {\n this.stacks[callerLocation] = stack;\n this.stackCount++;\n }\n if ((_base1 = this.stackCallCounts)[callerLocation] == null) _base1[callerLocation] = 0;\n return this.stackCallCounts[callerLocation]++;\n };\n Deprecation.prototype.parseStack = function(stack) {\n return stack.map(function(_this) {\n return function(callsite) {\n return {\n functionName: _this.getFunctionNameFromCallsite(callsite),\n location: _this.getLocationFromCallsite(callsite),\n fileName: _this.getFileNameFromCallSite(callsite)\n };\n };\n }(this));\n };\n Deprecation.prototype.serialize = function() {\n return {\n message: this.getMessage(),\n lineNumber: this.lineNumber,\n fileName: this.fileName,\n stacks: this.getStacks()\n };\n };\n return Deprecation;\n }();\n}).call(module.exports);\n\n});\n\nparcelRegister(\"bgcdg\", function(module, exports) {\n\n$parcel$export(module.exports, \"Emitter\", () => $832aa9935fe47a17$export$4293555f241ae35a, (v) => $832aa9935fe47a17$export$4293555f241ae35a = v);\nvar $832aa9935fe47a17$export$4293555f241ae35a;\nvar $832aa9935fe47a17$export$252720412a173de;\nvar $832aa9935fe47a17$export$9ad012e5c3534b20;\n\"use strict\";\n\n$832aa9935fe47a17$export$4293555f241ae35a = (parcelRequire(\"8OfnK\"));\n\n$832aa9935fe47a17$export$252720412a173de = (parcelRequire(\"dFpUX\"));\n\n$832aa9935fe47a17$export$9ad012e5c3534b20 = (parcelRequire(\"b22hF\"));\n\n});\nparcelRegister(\"8OfnK\", function(module, exports) {\n\"use strict\";\nfunction $669eecca7e16861b$var$_classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) throw new TypeError(\"Cannot call a class as a function\");\n}\nfunction $669eecca7e16861b$var$_defineProperties(target, props) {\n for(var i = 0; i < props.length; i++){\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction $669eecca7e16861b$var$_createClass(Constructor, protoProps, staticProps) {\n if (protoProps) $669eecca7e16861b$var$_defineProperties(Constructor.prototype, protoProps);\n if (staticProps) $669eecca7e16861b$var$_defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nvar $dFpUX = parcelRequire(\"dFpUX\");\n\nvar $b22hF = parcelRequire(\"b22hF\");\n// allows for handlers registered via `::on` to be invoked with calls to\n// `::emit`. Instances of this class are intended to be used internally by\n// classes that expose an event-based API.\n//\n// For example:\n//\n// ```js\n// class User {\n// constructor() {\n// this.emitter = new Emitter()\n// }\n//\n// onDidChangeName(callback) {\n// this.emitter.on('did-change-name', callback)\n// }\n//\n// setName(name) {\n// if (name !== this.name) {\n// this.name = name\n// this.emitter.emit('did-change-name', name)\n// }\n//\n// return this.name\n// }\n// }\n// ```\nvar $669eecca7e16861b$var$Emitter = /*#__PURE__*/ function() {\n $669eecca7e16861b$var$_createClass(Emitter, null, [\n {\n key: \"onEventHandlerException\",\n value: function onEventHandlerException(exceptionHandler) {\n var _this = this;\n if (this.exceptionHandlers.length === 0) this.dispatch = this.exceptionHandlingDispatch;\n this.exceptionHandlers.push(exceptionHandler);\n return new $dFpUX(function() {\n _this.exceptionHandlers.splice(_this.exceptionHandlers.indexOf(exceptionHandler), 1);\n if (_this.exceptionHandlers.length === 0) return _this.dispatch = _this.simpleDispatch;\n });\n }\n },\n {\n key: \"simpleDispatch\",\n value: function simpleDispatch(handler, value) {\n return handler(value);\n }\n },\n {\n key: \"exceptionHandlingDispatch\",\n value: function exceptionHandlingDispatch(handler, value) {\n try {\n return handler(value);\n } catch (exception) {\n return this.exceptionHandlers.map(function(exceptionHandler) {\n return exceptionHandler(exception);\n });\n }\n }\n }\n ]);\n function Emitter() {\n $669eecca7e16861b$var$_classCallCheck(this, Emitter);\n this.disposed = false;\n this.clear();\n } // Public: Clear out any existing subscribers.\n $669eecca7e16861b$var$_createClass(Emitter, [\n {\n key: \"clear\",\n value: function clear() {\n if (this.subscriptions != null) this.subscriptions.dispose();\n this.subscriptions = new $b22hF();\n this.handlersByEventName = {};\n } // Public: Unsubscribe all handlers.\n },\n {\n key: \"dispose\",\n value: function dispose() {\n this.subscriptions.dispose();\n this.handlersByEventName = null;\n this.disposed = true;\n }\n },\n {\n key: \"on\",\n value: function on(eventName, handler, unshift) {\n var _this2 = this;\n if (unshift == null) unshift = false;\n if (this.disposed) throw new Error(\"Emitter has been disposed\");\n if (typeof handler !== \"function\") throw new Error(\"Handler must be a function\");\n var currentHandlers = this.handlersByEventName[eventName];\n if (currentHandlers) {\n if (unshift) this.handlersByEventName[eventName].unshift(handler);\n else this.handlersByEventName[eventName].push(handler);\n } else this.handlersByEventName[eventName] = [\n handler\n ];\n // When the emitter is disposed, we want to dispose of all subscriptions.\n // However, we also need to stop tracking disposables when they're disposed\n // from outside, otherwise this class will hold references to all the\n // disposables it created (instead of just the active ones).\n var cleanup = new $dFpUX(function() {\n _this2.subscriptions.remove(cleanup);\n return _this2.off(eventName, handler);\n });\n this.subscriptions.add(cleanup);\n return cleanup;\n } // Public: Register the given handler function to be invoked the next time an\n },\n {\n key: \"once\",\n value: function once(eventName, handler, unshift) {\n if (unshift == null) unshift = false;\n var wrapped = function wrapped(value) {\n disposable.dispose();\n return handler(value);\n };\n var disposable = this.on(eventName, wrapped, unshift);\n return disposable;\n } // Public: Register the given handler function to be invoked *before* all\n },\n {\n key: \"preempt\",\n value: function preempt(eventName, handler) {\n return this.on(eventName, handler, true);\n } // Private: Used by the disposable.\n },\n {\n key: \"off\",\n value: function off(eventName, handlerToRemove) {\n if (this.disposed) return;\n var handlers = this.handlersByEventName[eventName];\n if (handlers) {\n var handlerIndex = handlers.indexOf(handlerToRemove);\n if (handlerIndex >= 0) handlers.splice(handlerIndex, 1);\n if (handlers.length === 0) delete this.handlersByEventName[eventName];\n }\n }\n },\n {\n key: \"emit\",\n value: function emit(eventName, value) {\n var handlers = this.handlersByEventName && this.handlersByEventName[eventName];\n if (handlers) {\n // create a copy of `handlers` so that if any handler mutates `handlers`\n // (e.g. by calling `on` on this same emitter), this does not result in\n // changing the handlers being called during this same `emit`.\n var handlersCopy = handlers.slice();\n for(var i = 0; i < handlersCopy.length; i++)this.constructor.dispatch(handlersCopy[i], value);\n }\n }\n },\n {\n key: \"emitAsync\",\n value: function emitAsync(eventName, value) {\n var _this3 = this;\n var handlers = this.handlersByEventName && this.handlersByEventName[eventName];\n if (handlers) {\n var promises = handlers.map(function(handler) {\n return _this3.constructor.dispatch(handler, value);\n });\n return Promise.all(promises).then(function() {});\n }\n return Promise.resolve();\n }\n },\n {\n key: \"getEventNames\",\n value: function getEventNames() {\n return Object.keys(this.handlersByEventName);\n }\n },\n {\n key: \"listenerCountForEventName\",\n value: function listenerCountForEventName(eventName) {\n var handlers = this.handlersByEventName[eventName];\n return handlers == null ? 0 : handlers.length;\n }\n },\n {\n key: \"getTotalListenerCount\",\n value: function getTotalListenerCount() {\n var result = 0;\n var _arr = Object.keys(this.handlersByEventName);\n for(var _i = 0; _i < _arr.length; _i++){\n var eventName = _arr[_i];\n result += this.handlersByEventName[eventName].length;\n }\n return result;\n }\n }\n ]);\n return Emitter;\n}();\n$669eecca7e16861b$var$Emitter.dispatch = $669eecca7e16861b$var$Emitter.simpleDispatch;\n$669eecca7e16861b$var$Emitter.exceptionHandlers = [];\nmodule.exports = $669eecca7e16861b$var$Emitter;\n\n});\nparcelRegister(\"dFpUX\", function(module, exports) {\n\"use strict\";\nfunction $9f33356e3055d3d4$var$_classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) throw new TypeError(\"Cannot call a class as a function\");\n}\nfunction $9f33356e3055d3d4$var$_defineProperties(target, props) {\n for(var i = 0; i < props.length; i++){\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction $9f33356e3055d3d4$var$_createClass(Constructor, protoProps, staticProps) {\n if (protoProps) $9f33356e3055d3d4$var$_defineProperties(Constructor.prototype, protoProps);\n if (staticProps) $9f33356e3055d3d4$var$_defineProperties(Constructor, staticProps);\n return Constructor;\n}\n// Essential: A handle to a resource that can be disposed. For example,\n// {Emitter::on} returns disposables representing subscriptions.\nmodule.exports = /*#__PURE__*/ function() {\n $9f33356e3055d3d4$var$_createClass(Disposable, null, [\n {\n key: \"isDisposable\",\n // Public: Ensure that `object` correctly implements the `Disposable`\n // contract.\n //\n // * `object` An {Object} you want to perform the check against.\n //\n // Returns a {Boolean} indicating whether `object` is a valid `Disposable`.\n value: function isDisposable(object) {\n return typeof (object != null ? object.dispose : undefined) === \"function\";\n }\n }\n ]);\n function Disposable(disposalAction) {\n $9f33356e3055d3d4$var$_classCallCheck(this, Disposable);\n this.disposed = false;\n this.disposalAction = disposalAction;\n } // Public: Perform the disposal action, indicating that the resource associated\n // with this disposable is no longer needed.\n //\n // You can call this method more than once, but the disposal action will only\n // be performed the first time.\n $9f33356e3055d3d4$var$_createClass(Disposable, [\n {\n key: \"dispose\",\n value: function dispose() {\n if (!this.disposed) {\n this.disposed = true;\n if (typeof this.disposalAction === \"function\") this.disposalAction();\n this.disposalAction = null;\n }\n }\n }\n ]);\n return Disposable;\n}();\n\n});\n\nparcelRegister(\"b22hF\", function(module, exports) {\n\"use strict\";\nfunction $8081a7265ead1389$var$_classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) throw new TypeError(\"Cannot call a class as a function\");\n}\nfunction $8081a7265ead1389$var$_defineProperties(target, props) {\n for(var i = 0; i < props.length; i++){\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction $8081a7265ead1389$var$_createClass(Constructor, protoProps, staticProps) {\n if (protoProps) $8081a7265ead1389$var$_defineProperties(Constructor.prototype, protoProps);\n if (staticProps) $8081a7265ead1389$var$_defineProperties(Constructor, staticProps);\n return Constructor;\n}\nvar $8081a7265ead1389$var$CompositeDisposable;\nvar $8081a7265ead1389$var$Disposable; // Essential: An object that aggregates multiple {Disposable} instances together\n// into a single disposable, so they can all be disposed as a group.\n//\n// These are very useful when subscribing to multiple events.\n//\n// ## Examples\n//\n// ```js\n// const {CompositeDisposable} = require('atom')\n//\n// class Something {\n// constructor() {\n// this.disposables = new CompositeDisposable()\n// const editor = atom.workspace.getActiveTextEditor()\n// this.disposables.add(editor.onDidChange(() => {})\n// this.disposables.add(editor.onDidChangePath(() => {})\n// }\n//\n// destroy() {\n// this.disposables.dispose();\n// }\n// }\n// ```\nmodule.exports = /*#__PURE__*/ function() {\n /*\n Section: Construction and Destruction\n */ // Public: Construct an instance, optionally with one or more disposables\n function CompositeDisposable() {\n $8081a7265ead1389$var$_classCallCheck(this, CompositeDisposable);\n this.disposed = false;\n this.disposables = new Set();\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n try {\n for(var _iterator = arguments[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){\n var disposable = _step.value;\n this.add(disposable);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally{\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n } finally{\n if (_didIteratorError) throw _iteratorError;\n }\n }\n } // Public: Dispose all disposables added to this composite disposable.\n //\n // If this object has already been disposed, this method has no effect.\n $8081a7265ead1389$var$_createClass(CompositeDisposable, [\n {\n key: \"dispose\",\n value: function dispose() {\n if (!this.disposed) {\n this.disposed = true;\n this.disposables.forEach(function(disposable) {\n return disposable.dispose();\n });\n this.disposables = null;\n }\n }\n },\n {\n key: \"add\",\n value: function add() {\n if (!this.disposed) {\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n try {\n for(var _iterator2 = arguments[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true){\n var disposable = _step2.value;\n $8081a7265ead1389$var$assertDisposable(disposable);\n this.disposables.add(disposable);\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally{\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return != null) _iterator2.return();\n } finally{\n if (_didIteratorError2) throw _iteratorError2;\n }\n }\n }\n } // Public: Remove a previously added disposable.\n },\n {\n key: \"remove\",\n value: function remove(disposable) {\n if (!this.disposed) this.disposables.delete(disposable);\n } // Public: Alias to {CompositeDisposable::remove}\n },\n {\n key: \"delete\",\n value: function _delete(disposable) {\n this.remove(disposable);\n } // Public: Clear all disposables. They will not be disposed by the next call\n },\n {\n key: \"clear\",\n value: function clear() {\n if (!this.disposed) this.disposables.clear();\n }\n }\n ]);\n return CompositeDisposable;\n}();\n\nfunction $8081a7265ead1389$var$assertDisposable(disposable) {\n if ($8081a7265ead1389$var$Disposable == null) $8081a7265ead1389$var$Disposable = (parcelRequire(\"dFpUX\"));\n if (!$8081a7265ead1389$var$Disposable.isDisposable(disposable)) throw new TypeError(\"Arguments to CompositeDisposable.add must have a .dispose() method\");\n}\n\n});\n\n\n\n\n\nparcelRegister(\"j6K6M\", function(module, exports) {\n\n// Generated by CoffeeScript 2.5.1\n(function() {\n var Ancestors, Mixin;\n Mixin = (parcelRequire(\"jCvCU\"));\n // Public\n module.exports = Ancestors = class Ancestors extends Mixin {\n /* Public */ static parents(node, selector = \"*\") {\n var parents;\n parents = [];\n this.eachParent(node, function(parent) {\n if (typeof parent.matches === \"function\" ? parent.matches(selector) : void 0) return parents.push(parent);\n });\n return parents;\n }\n static eachParent(node, block) {\n var parent, results;\n parent = node.parentNode;\n if (parent != null) block(parent);\n results = [];\n while(parent = parent.parentNode)if (parent != null) results.push(block(parent));\n else results.push(void 0);\n return results;\n }\n parents(selector = \"*\") {\n return Ancestors.parents(this, selector);\n }\n queryParentSelectorAll(selector) {\n if (selector == null) throw new Error(\"::queryParentSelectorAll requires a valid selector as argument\");\n return this.parents(selector);\n }\n queryParentSelector(selector) {\n if (selector == null) throw new Error(\"::queryParentSelector requires a valid selector as argument\");\n return this.queryParentSelectorAll(selector)[0];\n }\n eachParent(block) {\n return Ancestors.eachParent(this, block);\n }\n };\n}).call(module.exports); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5jZXN0b3JzLmpzIiwic291cmNlUm9vdCI6Ii4uLy4uIiwic291cmNlcyI6WyJsaWIvbWl4aW5zL2FuY2VzdG9ycy5jb2ZmZWUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQUEsTUFBQSxTQUFBLEVBQUE7O0VBQUEsS0FBQSxHQUFRLE9BQUEsQ0FBUSxPQUFSLEVBQVI7OztFQUdBLE1BQU0sQ0FBQyxPQUFQLEdBQ00sWUFBTixNQUFBLFVBQUEsUUFBd0IsTUFBeEIsQ0FBQTs7SUFJWSxPQUFULE9BQVMsQ0FBQyxJQUFELEVBQU8sV0FBUyxHQUFoQixDQUFBO0FBQ1osVUFBQTtNQUFJL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sZWN0b3IgcmVxdWlyZXMgYSB2YWxpZCBzZWxlY3RvciBhcyBhcmd1bWVudCdcbiAgICBAcXVlcnlQYXJlbnRTZWxlY3RvckFsbChzZWxlY3RvcilbMF1cblxuICBlYWNoUGFyZW50OiAoYmxvY2spIC0+IEFuY2VzdG9ycy5lYWNoUGFyZW50KHRoaXMsIGJsb2NrKVxuIl19\n //# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/mixins/ancestors.coffee\n\n});\nparcelRegister(\"jCvCU\", function(module, exports) {\n(function() {\n var ExcludedClassProperties, ExcludedPrototypeProperties, Mixin, name;\n module.exports = Mixin = function() {\n Mixin.includeInto = function(constructor) {\n var name, value, _ref;\n this.extend(constructor.prototype);\n for(name in this){\n value = this[name];\n if (ExcludedClassProperties.indexOf(name) === -1) {\n if (!constructor.hasOwnProperty(name)) constructor[name] = value;\n }\n }\n return (_ref = this.included) != null ? _ref.call(constructor) : void 0;\n };\n Mixin.extend = function(object) {\n var name, _i, _len, _ref, _ref1;\n _ref = Object.getOwnPropertyNames(this.prototype);\n for(_i = 0, _len = _ref.length; _i < _len; _i++){\n name = _ref[_i];\n if (ExcludedPrototypeProperties.indexOf(name) === -1) {\n if (!object.hasOwnProperty(name)) object[name] = this.prototype[name];\n }\n }\n return (_ref1 = this.prototype.extended) != null ? _ref1.call(object) : void 0;\n };\n function Mixin() {\n if (typeof this.extended === \"function\") this.extended();\n }\n return Mixin;\n }();\n ExcludedClassProperties = [\n \"__super__\"\n ];\n for(name in Mixin)ExcludedClassProperties.push(name);\n ExcludedPrototypeProperties = [\n \"constructor\",\n \"extended\"\n ];\n}).call(module.exports);\n\n});\n\n\nparcelRegister(\"15iMG\", function(module, exports) {\n\n\n// Generated by CoffeeScript 2.5.1\n(function() {\n var Disposable, DisposableEvents, Mixin;\n Mixin = (parcelRequire(\"jCvCU\"));\n ({ Disposable: Disposable } = $2INr1$atom);\n module.exports = DisposableEvents = class DisposableEvents extends Mixin {\n addDisposableEventListener(object, event, listener, options) {\n object.addEventListener(event, listener, options);\n return new Disposable(function() {\n return object.removeEventListener(event, listener);\n });\n }\n };\n}).call(module.exports); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlzcG9zYWJsZS1ldmVudHMuanMiLCJzb3VyY2VSb290IjoiLi4vLi4iLCJzb3VyY2VzIjpbImxpYi9taXhpbnMvZGlzcG9zYWJsZS1ldmVudHMuY29mZmVlIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUFBLE1BQUEsVUFBQSxFQUFBLGdCQUFBLEVBQUE7O0VBQUEsS0FBQSxHQUFRLE9BQUEsQ0FBUSxPQUFSOztFQUNSLENBQUEsQ0FBQyxVQUFELENBQUEsR0FBZSxPQUFBLENBQVEsTUFBUixDQUFmOztFQUVBLE1BQU0sQ0FBQyxPQUFQLEdBQ00sbUJBQU4sTUFBQSxpQkFBQSxRQUErQixNQUEvQjtJQUNFLDBCQUE0QixDQUFDLE1BQUQsRUFBUyxLQUFULEVBQWdCLFFBQWhCLEVBQTBCLE9BQTFCLENBQUE7TUFDMUIsTUFBTSxDQUFDLGdCQUFQLENBQXdCLEtBQXhCLEVBQStCLFFBQS9CLEVBQXlDLE9BQXpDO2FBQ0EsSUFBSSxVQUFKLENBQWUsUUFBQSxDQUFBLENBQUE7ZUFBRyxNQUFNLENBQUMsbUJBQVAsQ0FBMkIsS0FBM0IsRUFBa0MsUUFBbEM7TUFBSCxDQUFmO0lBRjBCOztFQUQ5QjtBQUpBIiwic291cmNlc0NvbnRlbnQiOlsiTWl4aW4gPSByZXF1aXJlICdtaXh0bydcbntEaXNwb3NhYmxlfSA9IHJlcXVpcmUgJ2F0b20nXG5cbm1vZHVsZS5leHBvcnRzID1cbmNsYXNzIERpc3Bvc2FibGVFdmVudHMgZXh0ZW5kcyBNaXhpblxuICBhZGREaXNwb3NhYmxlRXZlbnRMaXN0ZW5lcjogKG9iamVjdCwgZXZlbnQsIGxpc3RlbmVyLCBvcHRpb25zKSAtPlxuICAgIG9iamVjdC5hZGRFdmVudExpc3RlbmVyIGV2ZW50LCBsaXN0ZW5lciwgb3B0aW9uc1xuICAgIG5ldyBEaXNwb3NhYmxlIC0+IG9iamVjdC5yZW1vdmVFdmVudExpc3RlbmVyIGV2ZW50LCBsaXN0ZW5lclxuIl19\n //# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/mixins/disposable-events.coffee\n\n});\n\nparcelRegister(\"cZmpt\", function(module, exports) {\n\n\n\n// Generated by CoffeeScript 2.5.1\n(function() {\n var CompositeDisposable, Disposable, DisposableEvents, EventsDelegation, Mixin, NO_SELECTOR, eachPair;\n Mixin = (parcelRequire(\"jCvCU\"));\n DisposableEvents = (parcelRequire(\"15iMG\"));\n ({ Disposable: Disposable, CompositeDisposable: CompositeDisposable } = $2INr1$atom);\n eachPair = function(object, callback) {\n var k, results, v;\n results = [];\n for(k in object){\n v = object[k];\n results.push(callback(k, v));\n }\n return results;\n };\n NO_SELECTOR = \"__NONE__\";\n module.exports = EventsDelegation = (function() {\n class EventsDelegation extends Mixin {\n subscribeTo(object, selector, events, options) {\n var disposablesForObject, eventsForObject;\n if (!(object instanceof HTMLElement)) [object, selector, events, options] = [\n this,\n object,\n selector,\n events\n ];\n if (typeof selector === \"object\") [events, selector, options] = [\n selector,\n NO_SELECTOR,\n events\n ];\n if (this.eventsMap == null) this.eventsMap = new WeakMap();\n if (this.disposablesMap == null) this.disposablesMap = new WeakMap();\n if (this.eventsMap.get(object) == null) this.eventsMap.set(object, {});\n if (this.disposablesMap.get(object) == null) this.disposablesMap.set(object, {});\n eventsForObject = this.eventsMap.get(object);\n disposablesForObject = this.disposablesMap.get(object);\n eachPair(events, (event, callback)=>{\n if (eventsForObject[event] == null) {\n eventsForObject[event] = {};\n disposablesForObject[event] = this.createEventListener(object, event, options);\n }\n return eventsForObject[event][selector] = callback;\n });\n return new Disposable(()=>{\n return this.unsubscribeFrom(object, selector, events);\n });\n }\n unsubscribeFrom(object, selector, events) {\n var disposablesForObject, event, eventsForObject;\n if (!(object instanceof HTMLElement)) [object, selector, events] = [\n this,\n object,\n selector\n ];\n if (typeof selector === \"object\") [events, selector] = [\n selector,\n NO_SELECTOR\n ];\n if (!(eventsForObject = this.eventsMap.get(object))) return;\n for(event in events){\n delete eventsForObject[event][selector];\n if (Object.keys(eventsForObject[event]).length === 0) {\n disposablesForObject = this.disposablesMap.get(object);\n disposablesForObject[event].dispose();\n delete disposablesForObject[event];\n delete eventsForObject[event];\n }\n }\n if (Object.keys(eventsForObject).length === 0) {\n this.eventsMap.delete(object);\n return this.disposablesMap.delete(object);\n }\n }\n createEventListener(object, event, options) {\n var listener;\n listener = (e)=>{\n var eventsForObject, ref, target;\n if (!(eventsForObject = (ref = this.eventsMap.get(object)) != null ? ref[event] : void 0)) return;\n ({ target: target } = e);\n this.decorateEvent(e);\n this.eachSelectorFromTarget(e, target, eventsForObject);\n if (!e.isPropagationStopped) {\n if (typeof eventsForObject[NO_SELECTOR] === \"function\") eventsForObject[NO_SELECTOR](e);\n }\n return true;\n };\n return this.addDisposableEventListener(object, event, listener, options);\n }\n eachSelectorFromTarget(event, target, eventsForObject) {\n return this.nodeAndItsAncestors(target, (node)=>{\n if (event.isPropagationStopped) return;\n return this.eachSelector(eventsForObject, (selector, callback)=>{\n var matched;\n matched = this.targetMatch(node, selector);\n if (event.isImmediatePropagationStopped || !matched) return;\n return callback(event);\n });\n });\n }\n eachSelector(eventsForObject, callback) {\n var i, key, keys, len;\n keys = Object.keys(eventsForObject);\n if (keys.indexOf(NO_SELECTOR) !== -1) keys.splice(keys.indexOf(NO_SELECTOR), 1);\n keys.sort(function(a, b) {\n return b.split(\" \").length - a.split(\" \").length;\n });\n for(i = 0, len = keys.length; i < len; i++){\n key = keys[i];\n if (callback(key, eventsForObject[key])) return true;\n }\n return false;\n }\n targetMatch(target, selector) {\n var parent;\n if (target.matches(selector)) return true;\n parent = target.parentNode;\n while(parent != null && parent.matches != null){\n if (parent.matches(selector)) return true;\n parent = parent.parentNode;\n }\n return false;\n }\n nodeAndItsAncestors(node, callback) {\n var parent, results;\n parent = node.parentNode;\n callback(node);\n results = [];\n while(parent != null && parent.matches != null){\n callback(parent);\n results.push(parent = parent.parentNode);\n }\n return results;\n }\n decorateEvent(e) {\n var overriddenStop, overriddenStopImmediate;\n overriddenStop = Event.prototype.stopPropagation;\n e.stopPropagation = function() {\n this.isPropagationStopped = true;\n return overriddenStop.apply(this, arguments);\n };\n overriddenStopImmediate = Event.prototype.stopImmediatePropagation;\n return e.stopImmediatePropagation = function() {\n this.isImmediatePropagationStopped = true;\n return overriddenStopImmediate.apply(this, arguments);\n };\n }\n }\n DisposableEvents.includeInto(EventsDelegation);\n return EventsDelegation;\n }).call(this);\n}).call(module.exports); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnRzLWRlbGVnYXRpb24uanMiLCJzb3VyY2VSb290IjoiLi4vLi4iLCJzb3VyY2VzIjpbImxpYi9taXhpbnMvZXZlbnRzLWRlbGVnYXRpb24uY29mZmVlIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUFBLE1BQUEsbUJBQUEsRUFBQSxVQUFBLEVBQUEsZ0JBQUEsRUFBQSxnQkFBQSxFQUFBLEtBQUEsRUFBQSxXQUFBLEVBQUE7O0VBQUEsS0FBQSxHQUFRLE9BQUEsQ0FBUSxPQUFSOztFQUNSLGdCQUFBLEdBQW1CLE9BQUEsQ0FBUSxxQkFBUjs7RUFDbkIsQ0FBQSxDQUFDLFVBQUQsRUFBYSxtQkFBYixDQUFBLEdBQW9DLE9BQUEsQ0FBUSxNQUFSLENBQXBDOztFQUNBLFFBQUEsR0FBVyxRQUFBLENBQUMsTUFBRCxFQUFTLFFBQVQsQ0FBQTtBQUFxQixRQUFBLENBQUEsRUFBQSxPQUFBLEVBQUE7QUFBQztJQUFBLEtBQUEsV0FBQTs7bUJBQUEsUUFBQS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5TdG9wSW1tZWRpYXRlID0gIEV2ZW50OjpzdG9wSW1tZWRpYXRlUHJvcGFnYXRpb25cbiAgICBlLnN0b3BJbW1lZGlhdGVQcm9wYWdhdGlvbiA9IC0+XG4gICAgICBAaXNJbW1lZGlhdGVQcm9wYWdhdGlvblN0b3BwZWQgPSB0cnVlXG4gICAgICBvdmVycmlkZGVuU3RvcEltbWVkaWF0ZS5hcHBseSh0aGlzLCBhcmd1bWVudHMpXG4iXX0=\n //# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/mixins/events-delegation.coffee\n\n});\n\nparcelRegister(\"acNiL\", function(module, exports) {\n\n// Generated by CoffeeScript 2.5.1\n(function() {\n var BabelSpacePenDSL, Builder, Events, Mixin, SelfClosingTags, SpacePenDSL, Tags, Template;\n Mixin = (parcelRequire(\"jCvCU\"));\n Tags = \"a abbr address article aside audio b bdi bdo blockquote body button canvas caption cite code colgroup datalist dd del details dfn dialog div dl dt em fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header html i iframe ins kbd label legend li main map mark menu meter nav noscript object ol optgroup option output p pre progress q rp rt ruby s samp script section select small span strong style sub summary sup table tbody td textarea tfoot th thead time title tr u ul var video area base br col command embed hr img input keygen link meta param source track wbr\".split(/\\s+/);\n SelfClosingTags = {};\n \"area base br col command embed hr img input keygen link meta param source track wbr\".split(/\\s+/).forEach(function(tag) {\n return SelfClosingTags[tag] = true;\n });\n Events = \"blur change click dblclick error focus input keydown keypress keyup load mousedown mousemove mouseout mouseover mouseup resize scroll select submit unload\".split(/\\s+/);\n BabelSpacePenDSL = class BabelSpacePenDSL extends Mixin {\n buildContent() {\n if (this.constructor.content != null) return SpacePenDSL.buildContent(this, this.constructor.content);\n }\n };\n module.exports = SpacePenDSL = (function() {\n class SpacePenDSL extends Mixin {\n static includeInto(klass) {\n super.includeInto(klass);\n Object.defineProperty(klass, \"content\", {\n enumerable: false,\n get: function() {\n return this.prototype.__content__;\n },\n set: function(value) {\n return this.prototype.__content__ = value;\n }\n });\n Object.defineProperty(klass.prototype, \"createdCallback\", {\n enumerable: true,\n get: function() {\n return this.__create__;\n },\n set: function(value) {\n return this.__createdCallback__ = value;\n }\n });\n Object.defineProperty(klass.prototype, \"__create__\", {\n enumerable: true,\n value: function() {\n if (this.__content__ != null) SpacePenDSL.buildContent(this, this.__content__);\n if (this.__createdCallback__ != null) return this.__createdCallback__();\n }\n });\n return klass.useShadowRoot = function() {\n return klass.prototype.__useShadowRoot__ = true;\n };\n }\n static buildContent(element, content) {\n var html, root, template;\n template = new Template();\n content.call(template);\n [html] = template.buildHtml();\n root = element.__useShadowRoot__ ? root = element.shadowRoot = element.createShadowRoot() : root = element;\n root.innerHTML = html;\n return this.wireOutlets(element, root);\n }\n static wireOutlets(view, root) {\n var element, i, len, outlet, ref;\n ref = root.querySelectorAll(\"[outlet]\");\n for(i = 0, len = ref.length; i < len; i++){\n element = ref[i];\n outlet = element.getAttribute(\"outlet\");\n view[outlet] = element;\n element.removeAttribute(\"outlet\");\n }\n return void 0;\n }\n }\n SpacePenDSL.Babel = BabelSpacePenDSL;\n return SpacePenDSL;\n }).call(this);\n Template = (function() {\n class Template {\n constructor(){\n this.currentBuilder = new Builder();\n }\n subview(name, view) {\n return this.currentBuilder.subview(name, view);\n }\n text(string) {\n return this.currentBuilder.text(string);\n }\n tag(tagName, ...args) {\n return this.currentBuilder.tag(tagName, ...args);\n }\n raw(string) {\n return this.currentBuilder.raw(string);\n }\n buildHtml() {\n return this.currentBuilder.buildHtml();\n }\n }\n Tags.forEach(function(tagName) {\n return Template.prototype[tagName] = function(...args) {\n return this.currentBuilder.tag(tagName, ...args);\n };\n });\n return Template;\n }).call(this);\n Builder = class Builder {\n constructor(){\n this.document = [];\n this.postProcessingSteps = [];\n }\n buildHtml() {\n return [\n this.document.join(\"\"),\n this.postProcessingSteps\n ];\n }\n tag(name, ...args) {\n var options;\n options = this.extractOptions(args);\n this.openTag(name, options.attributes);\n if (SelfClosingTags.hasOwnProperty(name)) {\n if (options.text != null || options.content != null) throw new Error(`Self-closing tag ${name} cannot have text or content`);\n } else {\n if (typeof options.content === \"function\") options.content();\n if (options.text) this.text(options.text);\n return this.closeTag(name);\n }\n }\n openTag(name, attributes) {\n var attributeName, attributePairs, attributesString, value;\n if (this.document.length === 0) {\n if (attributes == null) attributes = {};\n }\n attributePairs = function() {\n var results;\n results = [];\n for(attributeName in attributes){\n value = attributes[attributeName];\n results.push(`${attributeName}=\\\"${value}\\\"`);\n }\n return results;\n }();\n attributesString = attributePairs.length ? \" \" + attributePairs.join(\" \") : \"\";\n return this.document.push(`<${name}${attributesString}>`);\n }\n closeTag(name) {\n return this.document.push(``);\n }\n text(string) {\n var escapedString;\n escapedString = string.replace(/&/g, \"&\").replace(/\"/g, \""\").replace(/'/g, \"'\").replace(//g, \">\");\n return this.document.push(escapedString);\n }\n raw(string) {\n return this.document.push(string);\n }\n subview(outletName, subview) {\n var subviewId;\n subviewId = `subview-${++idCounter}`;\n this.tag(\"div\", {\n id: subviewId\n });\n return this.postProcessingSteps.push(function(view) {\n view[outletName] = subview;\n subview.parentView = view;\n return view.find(`div#${subviewId}`).replaceWith(subview);\n });\n }\n extractOptions(args) {\n var arg, i, len, options;\n options = {};\n for(i = 0, len = args.length; i < len; i++){\n arg = args[i];\n switch(typeof arg){\n case \"function\":\n options.content = arg;\n break;\n case \"string\":\n case \"number\":\n options.text = arg.toString();\n break;\n default:\n options.attributes = arg;\n }\n }\n return options;\n }\n };\n}).call(module.exports); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BhY2UtcGVuLWRzbC5qcyIsInNvdXJjZVJvb3QiOiIuLi8uLiIsInNvdXJjZXMiOlsibGliL21peGlucy9zcGFjZS1wZW4tZHNsLmNvZmZlZSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7QUFBQSxNQUFBLGdCQUFBLEVBQUEsT0FBQSxFQUFBLE1BQUEsRUFBQSxLQUFBLEVBQUE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ICAgICAgICAgb3B0aW9ucy50ZXh0ID0gYXJnLnRvU3RyaW5nKClcbiAgICAgICAgZWxzZVxuICAgICAgICAgIG9wdGlvbnMuYXR0cmlidXRlcyA9IGFyZ1xuICAgIG9wdGlvbnNcbiJdfQ==\n //# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/mixins/space-pen-dsl.coffee\n\n});\n\nparcelRegister(\"3HMiZ\", function(module, exports) {\n\n$parcel$export(module.exports, \"escapeRegExp\", () => $2b2adba80112f001$export$7c57da42ce8e346f);\n$parcel$export(module.exports, \"dasherize\", () => $2b2adba80112f001$export$7e9152eee80b168f);\n$parcel$export(module.exports, \"debounce\", () => $2b2adba80112f001$export$61fc7d43ac8f84b0);\nconst $2b2adba80112f001$var$regexEscape = /[$()*+./?[\\\\\\]^{|}-]/g;\nfunction $2b2adba80112f001$export$7c57da42ce8e346f(string) {\n if (string) return string.replace($2b2adba80112f001$var$regexEscape, \"\\\\$&\");\n else return \"\";\n}\nconst $2b2adba80112f001$var$regexDaherize = /([A-Z])|(_)/g;\nfunction $2b2adba80112f001$export$7e9152eee80b168f(string) {\n if (!string) return \"\";\n string = `${string[0].toLowerCase()}${string.slice(1)}`;\n return string.replace($2b2adba80112f001$var$regexDaherize, function(m, letter) {\n if (letter) return `-${letter.toLowerCase()}`;\n else return \"-\";\n });\n}\nfunction $2b2adba80112f001$export$61fc7d43ac8f84b0(callback, wait) {\n let timeoutId;\n return (...args)=>{\n if (timeoutId !== undefined) clearTimeout(timeoutId);\n timeoutId = setTimeout(()=>{\n callback(...args);\n }, wait);\n };\n}\n\n});\n\nparcelRegister(\"4r3v7\", function(module, exports) {\n\n$parcel$export(module.exports, \"default\", () => $33ac66407e721072$export$2e2bcd8739ae039);\n\"use strict\";\nfunction $33ac66407e721072$export$2e2bcd8739ae039(cls, elementName) {\n if (!window.customElements.get(elementName)) window.customElements.define(elementName, cls);\n}\n\n});\n\nparcelRegister(\"dGrXD\", function(module, exports) {\nmodule.exports = Promise.resolve(require(\"./minimap-plugin-generator-element.f5282bf9.js\")).then(()=>parcelRequire(\"L6JvT\"));\n\n});\n\n\n$parcel$export(module.exports, \"editorsMinimaps\", () => $23c406735d46bb37$export$3542142cf713a624);\n$parcel$export(module.exports, \"emitter\", () => $23c406735d46bb37$export$bad24218ebd77223);\n$parcel$export(module.exports, \"styleReader\", () => $23c406735d46bb37$export$4d3d19fa8673fd3e);\n$parcel$export(module.exports, \"activate\", () => $23c406735d46bb37$export$234c45b355edd85b);\n$parcel$export(module.exports, \"toggle\", () => $23c406735d46bb37$export$e03c1c3201ee8bb7);\n$parcel$export(module.exports, \"minimapViewProvider\", () => $23c406735d46bb37$export$e854d79fe60e1faa);\n$parcel$export(module.exports, \"deactivate\", () => $23c406735d46bb37$export$e96c1edfdaf2d1db);\n$parcel$export(module.exports, \"getConfigSchema\", () => $23c406735d46bb37$export$9734216cda67175d);\n$parcel$export(module.exports, \"onDidActivate\", () => $23c406735d46bb37$export$b6f10fd94544e66c);\n$parcel$export(module.exports, \"onDidDeactivate\", () => $23c406735d46bb37$export$d206d0a3ab46ce53);\n$parcel$export(module.exports, \"onDidCreateMinimap\", () => $23c406735d46bb37$export$a720fe198b21c58c);\n$parcel$export(module.exports, \"onDidAddPlugin\", () => $23c406735d46bb37$export$d40fb390be4bd0f);\n$parcel$export(module.exports, \"onDidRemovePlugin\", () => $23c406735d46bb37$export$9937b73c38ac51f0);\n$parcel$export(module.exports, \"onDidActivatePlugin\", () => $23c406735d46bb37$export$6f3aaf72a3cac830);\n$parcel$export(module.exports, \"onDidDeactivatePlugin\", () => $23c406735d46bb37$export$8df1420526313195);\n$parcel$export(module.exports, \"onDidChangePluginOrder\", () => $23c406735d46bb37$export$4f0668f248b15f12);\n$parcel$export(module.exports, \"minimapClass\", () => $23c406735d46bb37$export$e3a0d8dffed34b4f);\n$parcel$export(module.exports, \"minimapForEditorElement\", () => $23c406735d46bb37$export$fbfbb3bd6dc38def);\n$parcel$export(module.exports, \"minimapForEditor\", () => $23c406735d46bb37$export$58c03b6c0d094c);\n$parcel$export(module.exports, \"standAloneMinimapForEditor\", () => $23c406735d46bb37$export$bd03fcaa67c354fa);\n$parcel$export(module.exports, \"getActiveMinimap\", () => $23c406735d46bb37$export$6f8e50201d28743);\n$parcel$export(module.exports, \"observeMinimaps\", () => $23c406735d46bb37$export$b0030062932c3d3d);\n$parcel$export(module.exports, \"provideMinimapServiceV1\", () => $23c406735d46bb37$export$b956a56dda08a331);\n$parcel$export(module.exports, \"config\", () => $186b450f929b5c94$exports);\n$parcel$export(module.exports, \"Minimap\", () => $148b4ac34d9435d4$export$2e2bcd8739ae039);\n$parcel$export(module.exports, \"createMinimapElement\", () => $fcbed2d4b7084ed8$export$aa3fab546e9e7454);\n\n\nvar $51078990c74c1d06$exports = {};\n\n\n\n\n\n\n// Generated by CoffeeScript 2.5.1\n(function() {\n $51078990c74c1d06$exports = {\n requirePackages: function(...packages) {\n return new Promise(function(resolve, reject) {\n var failures, remains, required, solved;\n required = [];\n failures = [];\n remains = packages.length;\n solved = function() {\n remains--;\n if (remains !== 0) return;\n if (failures.length > 0) return reject(failures);\n return resolve(required);\n };\n return packages.forEach(function(pkg, i) {\n var failHandler, promise;\n failHandler = function(reason) {\n failures[i] = reason;\n return solved();\n };\n promise = atom.packages.activatePackage(pkg).then(function(activatedPackage) {\n required[i] = activatedPackage.mainModule;\n return solved();\n });\n if (promise.fail != null) return promise.fail(failHandler);\n else if (promise.catch != null) return promise.catch(failHandler);\n });\n });\n },\n registerOrUpdateElement: (parcelRequire(\"kAKcv\")),\n Ancestors: (parcelRequire(\"j6K6M\")),\n AncestorsMethods: (parcelRequire(\"j6K6M\")),\n DisposableEvents: (parcelRequire(\"15iMG\")),\n EventsDelegation: (parcelRequire(\"cZmpt\")),\n SpacePenDSL: (parcelRequire(\"acNiL\"))\n };\n}).call($51078990c74c1d06$exports); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXRvbS11dGlscy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ZWFzb24pIC0+XG4gICAgICAgICAgZmFpbHVyZXNbaV0gPSByZWFzb25cbiAgICAgICAgICBzb2x2ZWQoKVxuXG4gICAgICAgIHByb21pc2UgPSBhdG9tLnBhY2thZ2VzLmFjdGl2YXRlUGFja2FnZShwa2cpXG4gICAgICAgIC50aGVuIChhY3RpdmF0ZWRQYWNrYWdlKSAtPlxuICAgICAgICAgIHJlcXVpcmVkW2ldID0gYWN0aXZhdGVkUGFja2FnZS5tYWluTW9kdWxlXG4gICAgICAgICAgc29sdmVkKClcblxuICAgICAgICBpZiBwcm9taXNlLmZhaWw/XG4gICAgICAgICAgcHJvbWlzZS5mYWlsKGZhaWxIYW5kbGVyKVxuICAgICAgICBlbHNlIGlmIHByb21pc2UuY2F0Y2g/XG4gICAgICAgICAgcHJvbWlzZS5jYXRjaChmYWlsSGFuZGxlcilcblxuICByZWdpc3Rlck9yVXBkYXRlRWxlbWVudDogcmVxdWlyZSAnLi9yZWdpc3Rlci1vci11cGRhdGUtZWxlbWVudCdcbiAgQW5jZXN0b3JzOiByZXF1aXJlICcuL21peGlucy9hbmNlc3RvcnMnXG4gIEFuY2VzdG9yc01ldGhvZHM6IHJlcXVpcmUgJy4vbWl4aW5zL2FuY2VzdG9ycydcbiAgRGlzcG9zYWJsZUV2ZW50czogcmVxdWlyZSAnLi9taXhpbnMvZGlzcG9zYWJsZS1ldmVudHMnXG4gIEV2ZW50c0RlbGVnYXRpb246IHJlcXVpcmUgJy4vbWl4aW5zL2V2ZW50cy1kZWxlZ2F0aW9uJ1xuICBTcGFjZVBlbkRTTDogcmVxdWlyZSAnLi9taXhpbnMvc3BhY2UtcGVuLWRzbCdcbiJdfQ==\n //# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/atom-utils.coffee\n\n\nvar $128a095f646fb776$exports = {};\n\"use strict\";\nvar $56d3531c4a98a45b$exports = {};\n\"use strict\";\nvar $56d3531c4a98a45b$var$utils = $56d3531c4a98a45b$exports = {};\n/**\n * Loops through the collection and calls the callback for each element. if the callback returns truthy, the loop is broken and returns the same value.\n * @public\n * @param {*} collection The collection to loop through. Needs to have a length property set and have indices set from 0 to length - 1.\n * @param {function} callback The callback to be called for each element. The element will be given as a parameter to the callback. If this callback returns truthy, the loop is broken and the same value is returned.\n * @returns {*} The value that a callback has returned (if truthy). Otherwise nothing.\n */ $56d3531c4a98a45b$var$utils.forEach = function(collection, callback) {\n for(var i = 0; i < collection.length; i++){\n var result = callback(collection[i]);\n if (result) return result;\n }\n};\n\n\nvar $128a095f646fb776$require$forEach = $56d3531c4a98a45b$exports.forEach;\nvar $44963ebbe2541692$exports = {};\n\"use strict\";\n$44963ebbe2541692$exports = function(options) {\n var getState = options.stateHandler.getState;\n /**\n * Tells if the element has been made detectable and ready to be listened for resize events.\n * @public\n * @param {element} The element to check.\n * @returns {boolean} True or false depending on if the element is detectable or not.\n */ function isDetectable(element) {\n var state = getState(element);\n return state && !!state.isDetectable;\n }\n /**\n * Marks the element that it has been made detectable and ready to be listened for resize events.\n * @public\n * @param {element} The element to mark.\n */ function markAsDetectable(element) {\n getState(element).isDetectable = true;\n }\n /**\n * Tells if the element is busy or not.\n * @public\n * @param {element} The element to check.\n * @returns {boolean} True or false depending on if the element is busy or not.\n */ function isBusy(element) {\n return !!getState(element).busy;\n }\n /**\n * Marks the object is busy and should not be made detectable.\n * @public\n * @param {element} element The element to mark.\n * @param {boolean} busy If the element is busy or not.\n */ function markBusy(element, busy) {\n getState(element).busy = !!busy;\n }\n return {\n isDetectable: isDetectable,\n markAsDetectable: markAsDetectable,\n isBusy: isBusy,\n markBusy: markBusy\n };\n};\n\n\nvar $c9746ed2e67d03e3$exports = {};\n\"use strict\";\n$c9746ed2e67d03e3$exports = function(idHandler) {\n var eventListeners = {};\n /**\n * Gets all listeners for the given element.\n * @public\n * @param {element} element The element to get all listeners for.\n * @returns All listeners for the given element.\n */ function getListeners(element) {\n var id = idHandler.get(element);\n if (id === undefined) return [];\n return eventListeners[id] || [];\n }\n /**\n * Stores the given listener for the given element. Will not actually add the listener to the element.\n * @public\n * @param {element} element The element that should have the listener added.\n * @param {function} listener The callback that the element has added.\n */ function addListener(element, listener) {\n var id = idHandler.get(element);\n if (!eventListeners[id]) eventListeners[id] = [];\n eventListeners[id].push(listener);\n }\n function removeListener(element, listener) {\n var listeners = getListeners(element);\n for(var i = 0, len = listeners.length; i < len; ++i)if (listeners[i] === listener) {\n listeners.splice(i, 1);\n break;\n }\n }\n function removeAllListeners(element) {\n var listeners = getListeners(element);\n if (!listeners) return;\n listeners.length = 0;\n }\n return {\n get: getListeners,\n add: addListener,\n removeListener: removeListener,\n removeAllListeners: removeAllListeners\n };\n};\n\n\nvar $83778aa56f77c0e4$exports = {};\n\"use strict\";\n$83778aa56f77c0e4$exports = function() {\n var idCount = 1;\n /**\n * Generates a new unique id in the context.\n * @public\n * @returns {number} A unique id in the context.\n */ function generate() {\n return idCount++;\n }\n return {\n generate: generate\n };\n};\n\n\nvar $92b86b0b760da170$exports = {};\n\"use strict\";\n$92b86b0b760da170$exports = function(options) {\n var idGenerator = options.idGenerator;\n var getState = options.stateHandler.getState;\n /**\n * Gets the resize detector id of the element.\n * @public\n * @param {element} element The target element to get the id of.\n * @returns {string|number|null} The id of the element. Null if it has no id.\n */ function getId(element) {\n var state = getState(element);\n if (state && state.id !== undefined) return state.id;\n return null;\n }\n /**\n * Sets the resize detector id of the element. Requires the element to have a resize detector state initialized.\n * @public\n * @param {element} element The target element to set the id of.\n * @returns {string|number|null} The id of the element.\n */ function setId(element) {\n var state = getState(element);\n if (!state) throw new Error(\"setId required the element to have a resize detection state.\");\n var id = idGenerator.generate();\n state.id = id;\n return id;\n }\n return {\n get: getId,\n set: setId\n };\n};\n\n\nvar $9412d0a18aec0f5e$exports = {};\n\"use strict\";\n/* global console: false */ /**\n * Reporter that handles the reporting of logs, warnings and errors.\n * @public\n * @param {boolean} quiet Tells if the reporter should be quiet or not.\n */ $9412d0a18aec0f5e$exports = function(quiet) {\n function noop() {\n //Does nothing.\n }\n var reporter = {\n log: noop,\n warn: noop,\n error: noop\n };\n if (!quiet && window.console) {\n var attachFunction = function(reporter, name) {\n //The proxy is needed to be able to call the method with the console context,\n //since we cannot use bind.\n reporter[name] = function reporterProxy() {\n var f = console[name];\n if (f.apply) f.apply(console, arguments);\n else for(var i = 0; i < arguments.length; i++)f(arguments[i]);\n };\n };\n attachFunction(reporter, \"log\");\n attachFunction(reporter, \"warn\");\n attachFunction(reporter, \"error\");\n }\n return reporter;\n};\n\n\nvar $462deb81cd9473bb$exports = {};\n\"use strict\";\nvar $462deb81cd9473bb$var$detector = $462deb81cd9473bb$exports = {};\n$462deb81cd9473bb$var$detector.isIE = function(version) {\n function isAnyIeVersion() {\n var agent = navigator.userAgent.toLowerCase();\n return agent.indexOf(\"msie\") !== -1 || agent.indexOf(\"trident\") !== -1 || agent.indexOf(\" edge/\") !== -1;\n }\n if (!isAnyIeVersion()) return false;\n if (!version) return true;\n //Shamelessly stolen from https://gist.github.com/padolsey/527683\n var ieVersion = function() {\n var undef, v = 3, div = document.createElement(\"div\"), all = div.getElementsByTagName(\"i\");\n do div.innerHTML = \"\";\n while (all[0]);\n return v > 4 ? v : undef;\n }();\n return version === ieVersion;\n};\n$462deb81cd9473bb$var$detector.isLegacyOpera = function() {\n return !!window.opera;\n};\n\n\nvar $bb2986b147359ff8$exports = {};\n\"use strict\";\nvar $25da9962935de12f$exports = {};\n\"use strict\";\nvar $25da9962935de12f$var$utils = $25da9962935de12f$exports = {};\n$25da9962935de12f$var$utils.getOption = $25da9962935de12f$var$getOption;\nfunction $25da9962935de12f$var$getOption(options, name, defaultValue) {\n var value = options[name];\n if ((value === undefined || value === null) && defaultValue !== undefined) return defaultValue;\n return value;\n}\n\n\n$bb2986b147359ff8$exports = function batchProcessorMaker(options) {\n options = options || {};\n var reporter = options.reporter;\n var asyncProcess = $25da9962935de12f$exports.getOption(options, \"async\", true);\n var autoProcess = $25da9962935de12f$exports.getOption(options, \"auto\", true);\n if (autoProcess && !asyncProcess) {\n reporter && reporter.warn(\"Invalid options combination. auto=true and async=false is invalid. Setting async=true.\");\n asyncProcess = true;\n }\n var batch = $bb2986b147359ff8$var$Batch();\n var asyncFrameHandler;\n var isProcessing = false;\n function addFunction(level, fn) {\n if (!isProcessing && autoProcess && asyncProcess && batch.size() === 0) // Since this is async, it is guaranteed to be executed after that the fn is added to the batch.\n // This needs to be done before, since we're checking the size of the batch to be 0.\n processBatchAsync();\n batch.add(level, fn);\n }\n function processBatch() {\n // Save the current batch, and create a new batch so that incoming functions are not added into the currently processing batch.\n // Continue processing until the top-level batch is empty (functions may be added to the new batch while processing, and so on).\n isProcessing = true;\n while(batch.size()){\n var processingBatch = batch;\n batch = $bb2986b147359ff8$var$Batch();\n processingBatch.process();\n }\n isProcessing = false;\n }\n function forceProcessBatch(localAsyncProcess) {\n if (isProcessing) return;\n if (localAsyncProcess === undefined) localAsyncProcess = asyncProcess;\n if (asyncFrameHandler) {\n cancelFrame(asyncFrameHandler);\n asyncFrameHandler = null;\n }\n if (localAsyncProcess) processBatchAsync();\n else processBatch();\n }\n function processBatchAsync() {\n asyncFrameHandler = requestFrame(processBatch);\n }\n function clearBatch() {\n batch = {};\n batchSize = 0;\n topLevel = 0;\n bottomLevel = 0;\n }\n function cancelFrame(listener) {\n // var cancel = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.clearTimeout;\n var cancel = clearTimeout;\n return cancel(listener);\n }\n function requestFrame(callback) {\n // var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function(fn) { return window.setTimeout(fn, 20); };\n var raf = function(fn) {\n return setTimeout(fn, 0);\n };\n return raf(callback);\n }\n return {\n add: addFunction,\n force: forceProcessBatch\n };\n};\nfunction $bb2986b147359ff8$var$Batch() {\n var batch = {};\n var size = 0;\n var topLevel1 = 0;\n var bottomLevel1 = 0;\n function add(level, fn) {\n if (!fn) {\n fn = level;\n level = 0;\n }\n if (level > topLevel1) topLevel1 = level;\n else if (level < bottomLevel1) bottomLevel1 = level;\n if (!batch[level]) batch[level] = [];\n batch[level].push(fn);\n size++;\n }\n function process() {\n for(var level = bottomLevel1; level <= topLevel1; level++){\n var fns = batch[level];\n for(var i = 0; i < fns.length; i++){\n var fn = fns[i];\n fn();\n }\n }\n }\n function getSize() {\n return size;\n }\n return {\n add: add,\n process: process,\n size: getSize\n };\n}\n\n\nvar $240efa097ecf7047$exports = {};\n\"use strict\";\nvar $240efa097ecf7047$var$prop = \"_erd\";\nfunction $240efa097ecf7047$var$initState(element) {\n element[$240efa097ecf7047$var$prop] = {};\n return $240efa097ecf7047$var$getState(element);\n}\nfunction $240efa097ecf7047$var$getState(element) {\n return element[$240efa097ecf7047$var$prop];\n}\nfunction $240efa097ecf7047$var$cleanState(element) {\n delete element[$240efa097ecf7047$var$prop];\n}\n$240efa097ecf7047$exports = {\n initState: $240efa097ecf7047$var$initState,\n getState: $240efa097ecf7047$var$getState,\n cleanState: $240efa097ecf7047$var$cleanState\n};\n\n\nvar $4405e31f3fc7d231$exports = {};\n/**\n * Resize detection strategy that injects objects to elements in order to detect resize events.\n * Heavily inspired by: http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/\n */ \"use strict\";\n\n$4405e31f3fc7d231$exports = function(options) {\n options = options || {};\n var reporter = options.reporter;\n var batchProcessor = options.batchProcessor;\n var getState = options.stateHandler.getState;\n if (!reporter) throw new Error(\"Missing required dependency: reporter.\");\n /**\n * Adds a resize event listener to the element.\n * @public\n * @param {element} element The element that should have the listener added.\n * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback.\n */ function addListener(element, listener) {\n function listenerProxy() {\n listener(element);\n }\n if ($462deb81cd9473bb$exports.isIE(8)) {\n //IE 8 does not support object, but supports the resize event directly on elements.\n getState(element).object = {\n proxy: listenerProxy\n };\n element.attachEvent(\"onresize\", listenerProxy);\n } else {\n var object = getObject(element);\n if (!object) throw new Error(\"Element is not detectable by this strategy.\");\n object.contentDocument.defaultView.addEventListener(\"resize\", listenerProxy);\n }\n }\n function buildCssTextString(rules) {\n var seperator = options.important ? \" !important; \" : \"; \";\n return (rules.join(seperator) + seperator).trim();\n }\n /**\n * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes.\n * @private\n * @param {object} options Optional options object.\n * @param {element} element The element to make detectable\n * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter.\n */ function makeDetectable(options, element, callback) {\n if (!callback) {\n callback = element;\n element = options;\n options = null;\n }\n options = options || {};\n var debug = options.debug;\n function injectObject(element, callback) {\n var OBJECT_STYLE = buildCssTextString([\n \"display: block\",\n \"position: absolute\",\n \"top: 0\",\n \"left: 0\",\n \"width: 100%\",\n \"height: 100%\",\n \"border: none\",\n \"padding: 0\",\n \"margin: 0\",\n \"opacity: 0\",\n \"z-index: -1000\",\n \"pointer-events: none\"\n ]);\n //The target element needs to be positioned (everything except static) so the absolute positioned object will be positioned relative to the target element.\n // Position altering may be performed directly or on object load, depending on if style resolution is possible directly or not.\n var positionCheckPerformed = false;\n // The element may not yet be attached to the DOM, and therefore the style object may be empty in some browsers.\n // Since the style object is a reference, it will be updated as soon as the element is attached to the DOM.\n var style = window.getComputedStyle(element);\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n getState(element).startSize = {\n width: width,\n height: height\n };\n function mutateDom() {\n function alterPositionStyles() {\n if (style.position === \"static\") {\n element.style.setProperty(\"position\", \"relative\", options.important ? \"important\" : \"\");\n var removeRelativeStyles = function(reporter, element, style, property) {\n function getNumericalValue(value) {\n return value.replace(/[^-\\d\\.]/g, \"\");\n }\n var value = style[property];\n if (value !== \"auto\" && getNumericalValue(value) !== \"0\") {\n reporter.warn(\"An element that is positioned static has style.\" + property + \"=\" + value + \" which is ignored due to the static positioning. The element will need to be positioned relative, so the style.\" + property + \" will be set to 0. Element: \", element);\n element.style.setProperty(property, \"0\", options.important ? \"important\" : \"\");\n }\n };\n //Check so that there are no accidental styles that will make the element styled differently now that is is relative.\n //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway).\n removeRelativeStyles(reporter, element, style, \"top\");\n removeRelativeStyles(reporter, element, style, \"right\");\n removeRelativeStyles(reporter, element, style, \"bottom\");\n removeRelativeStyles(reporter, element, style, \"left\");\n }\n }\n function onObjectLoad() {\n // The object has been loaded, which means that the element now is guaranteed to be attached to the DOM.\n if (!positionCheckPerformed) alterPositionStyles();\n /*jshint validthis: true */ function getDocument(element, callback) {\n //Opera 12 seem to call the object.onload before the actual document has been created.\n //So if it is not present, poll it with an timeout until it is present.\n //TODO: Could maybe be handled better with object.onreadystatechange or similar.\n if (!element.contentDocument) {\n var state = getState(element);\n if (state.checkForObjectDocumentTimeoutId) window.clearTimeout(state.checkForObjectDocumentTimeoutId);\n state.checkForObjectDocumentTimeoutId = setTimeout(function checkForObjectDocument() {\n state.checkForObjectDocumentTimeoutId = 0;\n getDocument(element, callback);\n }, 100);\n return;\n }\n callback(element.contentDocument);\n }\n //Mutating the object element here seems to fire another load event.\n //Mutating the inner document of the object element is fine though.\n var objectElement = this;\n //Create the style element to be added to the object.\n getDocument(objectElement, function onObjectDocumentReady(objectDocument) {\n //Notify that the element is ready to be listened to.\n callback(element);\n });\n }\n // The element may be detached from the DOM, and some browsers does not support style resolving of detached elements.\n // The alterPositionStyles needs to be delayed until we know the element has been attached to the DOM (which we are sure of when the onObjectLoad has been fired), if style resolution is not possible.\n if (style.position !== \"\") {\n alterPositionStyles(style);\n positionCheckPerformed = true;\n }\n //Add an object element as a child to the target element that will be listened to for resize events.\n var object = document.createElement(\"object\");\n object.style.cssText = OBJECT_STYLE;\n object.tabIndex = -1;\n object.type = \"text/html\";\n object.setAttribute(\"aria-hidden\", \"true\");\n object.onload = onObjectLoad;\n //Safari: This must occur before adding the object to the DOM.\n //IE: Does not like that this happens before, even if it is also added after.\n if (!$462deb81cd9473bb$exports.isIE()) object.data = \"about:blank\";\n if (!getState(element)) // The element has been uninstalled before the actual loading happened.\n return;\n element.appendChild(object);\n getState(element).object = object;\n //IE: This must occur after adding the object to the DOM.\n if ($462deb81cd9473bb$exports.isIE()) object.data = \"about:blank\";\n }\n if (batchProcessor) batchProcessor.add(mutateDom);\n else mutateDom();\n }\n if ($462deb81cd9473bb$exports.isIE(8)) //IE 8 does not support objects properly. Luckily they do support the resize event.\n //So do not inject the object and notify that the element is already ready to be listened to.\n //The event handler for the resize event is attached in the utils.addListener instead.\n callback(element);\n else injectObject(element, callback);\n }\n /**\n * Returns the child object of the target element.\n * @private\n * @param {element} element The target element.\n * @returns The object element of the target.\n */ function getObject(element) {\n return getState(element).object;\n }\n function uninstall(element) {\n if (!getState(element)) return;\n var object = getObject(element);\n if (!object) return;\n if ($462deb81cd9473bb$exports.isIE(8)) element.detachEvent(\"onresize\", object.proxy);\n else element.removeChild(object);\n if (getState(element).checkForObjectDocumentTimeoutId) window.clearTimeout(getState(element).checkForObjectDocumentTimeoutId);\n delete getState(element).object;\n }\n return {\n makeDetectable: makeDetectable,\n addListener: addListener,\n uninstall: uninstall\n };\n};\n\n\nvar $7871830003078117$exports = {};\n/**\n * Resize detection strategy that injects divs to elements in order to detect resize events on scroll events.\n * Heavily inspired by: https://github.com/marcj/css-element-queries/blob/master/src/ResizeSensor.js\n */ \"use strict\";\n\nvar $7871830003078117$require$forEach = $56d3531c4a98a45b$exports.forEach;\n$7871830003078117$exports = function(options) {\n options = options || {};\n var reporter = options.reporter;\n var batchProcessor = options.batchProcessor;\n var getState = options.stateHandler.getState;\n var hasState = options.stateHandler.hasState;\n var idHandler = options.idHandler;\n if (!batchProcessor) throw new Error(\"Missing required dependency: batchProcessor\");\n if (!reporter) throw new Error(\"Missing required dependency: reporter.\");\n //TODO: Could this perhaps be done at installation time?\n var scrollbarSizes = getScrollbarSizes();\n var styleId = \"erd_scroll_detection_scrollbar_style\";\n var detectionContainerClass = \"erd_scroll_detection_container\";\n function initDocument(targetDocument) {\n // Inject the scrollbar styling that prevents them from appearing sometimes in Chrome.\n // The injected container needs to have a class, so that it may be styled with CSS (pseudo elements).\n injectScrollStyle(targetDocument, styleId, detectionContainerClass);\n }\n initDocument(window.document);\n function buildCssTextString(rules) {\n var seperator = options.important ? \" !important; \" : \"; \";\n return (rules.join(seperator) + seperator).trim();\n }\n function getScrollbarSizes() {\n var width = 500;\n var height = 500;\n var child = document.createElement(\"div\");\n child.style.cssText = buildCssTextString([\n \"position: absolute\",\n \"width: \" + width * 2 + \"px\",\n \"height: \" + height * 2 + \"px\",\n \"visibility: hidden\",\n \"margin: 0\",\n \"padding: 0\"\n ]);\n var container = document.createElement(\"div\");\n container.style.cssText = buildCssTextString([\n \"position: absolute\",\n \"width: \" + width + \"px\",\n \"height: \" + height + \"px\",\n \"overflow: scroll\",\n \"visibility: none\",\n \"top: \" + -width * 3 + \"px\",\n \"left: \" + -height * 3 + \"px\",\n \"visibility: hidden\",\n \"margin: 0\",\n \"padding: 0\"\n ]);\n container.appendChild(child);\n document.body.insertBefore(container, document.body.firstChild);\n var widthSize = width - container.clientWidth;\n var heightSize = height - container.clientHeight;\n document.body.removeChild(container);\n return {\n width: widthSize,\n height: heightSize\n };\n }\n function injectScrollStyle(targetDocument, styleId, containerClass) {\n function injectStyle(style, method) {\n method = method || function(element) {\n targetDocument.head.appendChild(element);\n };\n var styleElement = targetDocument.createElement(\"style\");\n styleElement.innerHTML = style;\n styleElement.id = styleId;\n method(styleElement);\n return styleElement;\n }\n if (!targetDocument.getElementById(styleId)) {\n var containerAnimationClass = containerClass + \"_animation\";\n var containerAnimationActiveClass = containerClass + \"_animation_active\";\n var style = \"/* Created by the element-resize-detector library. */\\n\";\n style += \".\" + containerClass + \" > div::-webkit-scrollbar { \" + buildCssTextString([\n \"display: none\"\n ]) + \" }\\n\\n\";\n style += \".\" + containerAnimationActiveClass + \" { \" + buildCssTextString([\n \"-webkit-animation-duration: 0.1s\",\n \"animation-duration: 0.1s\",\n \"-webkit-animation-name: \" + containerAnimationClass,\n \"animation-name: \" + containerAnimationClass\n ]) + \" }\\n\";\n style += \"@-webkit-keyframes \" + containerAnimationClass + \" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\\n\";\n style += \"@keyframes \" + containerAnimationClass + \" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\";\n injectStyle(style);\n }\n }\n function addAnimationClass(element) {\n element.className += \" \" + detectionContainerClass + \"_animation_active\";\n }\n function addEvent(el, name, cb) {\n if (el.addEventListener) el.addEventListener(name, cb);\n else if (el.attachEvent) el.attachEvent(\"on\" + name, cb);\n else return reporter.error(\"[scroll] Don't know how to add event listeners.\");\n }\n function removeEvent(el, name, cb) {\n if (el.removeEventListener) el.removeEventListener(name, cb);\n else if (el.detachEvent) el.detachEvent(\"on\" + name, cb);\n else return reporter.error(\"[scroll] Don't know how to remove event listeners.\");\n }\n function getExpandElement(element) {\n return getState(element).container.childNodes[0].childNodes[0].childNodes[0];\n }\n function getShrinkElement(element) {\n return getState(element).container.childNodes[0].childNodes[0].childNodes[1];\n }\n /**\n * Adds a resize event listener to the element.\n * @public\n * @param {element} element The element that should have the listener added.\n * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback.\n */ function addListener(element, listener) {\n var listeners = getState(element).listeners;\n if (!listeners.push) throw new Error(\"Cannot add listener to an element that is not detectable.\");\n getState(element).listeners.push(listener);\n }\n /**\n * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes.\n * @private\n * @param {object} options Optional options object.\n * @param {element} element The element to make detectable\n * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter.\n */ function makeDetectable(options, element, callback) {\n if (!callback) {\n callback = element;\n element = options;\n options = null;\n }\n options = options || {};\n function debug() {\n if (options.debug) {\n var args = Array.prototype.slice.call(arguments);\n args.unshift(idHandler.get(element), \"Scroll: \");\n if (reporter.log.apply) reporter.log.apply(null, args);\n else for(var i = 0; i < args.length; i++)reporter.log(args[i]);\n }\n }\n function isDetached(element) {\n function isInDocument(element) {\n var isInShadowRoot = element.getRootNode && element.getRootNode().contains(element);\n return element === element.ownerDocument.body || element.ownerDocument.body.contains(element) || isInShadowRoot;\n }\n if (!isInDocument(element)) return true;\n // FireFox returns null style in hidden iframes. See https://github.com/wnr/element-resize-detector/issues/68 and https://bugzilla.mozilla.org/show_bug.cgi?id=795520\n if (window.getComputedStyle(element) === null) return true;\n return false;\n }\n function isUnrendered(element) {\n // Check the absolute positioned container since the top level container is display: inline.\n var container = getState(element).container.childNodes[0];\n var style = window.getComputedStyle(container);\n return !style.width || style.width.indexOf(\"px\") === -1; //Can only compute pixel value when rendered.\n }\n function getStyle() {\n // Some browsers only force layouts when actually reading the style properties of the style object, so make sure that they are all read here,\n // so that the user of the function can be sure that it will perform the layout here, instead of later (important for batching).\n var elementStyle = window.getComputedStyle(element);\n var style = {};\n style.position = elementStyle.position;\n style.width = element.offsetWidth;\n style.height = element.offsetHeight;\n style.top = elementStyle.top;\n style.right = elementStyle.right;\n style.bottom = elementStyle.bottom;\n style.left = elementStyle.left;\n style.widthCSS = elementStyle.width;\n style.heightCSS = elementStyle.height;\n return style;\n }\n function storeStartSize() {\n var style = getStyle();\n getState(element).startSize = {\n width: style.width,\n height: style.height\n };\n debug(\"Element start size\", getState(element).startSize);\n }\n function initListeners() {\n getState(element).listeners = [];\n }\n function storeStyle() {\n debug(\"storeStyle invoked.\");\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n var style = getStyle();\n getState(element).style = style;\n }\n function storeCurrentSize(element, width, height) {\n getState(element).lastWidth = width;\n getState(element).lastHeight = height;\n }\n function getExpandChildElement(element) {\n return getExpandElement(element).childNodes[0];\n }\n function getWidthOffset() {\n return 2 * scrollbarSizes.width + 1;\n }\n function getHeightOffset() {\n return 2 * scrollbarSizes.height + 1;\n }\n function getExpandWidth(width) {\n return width + 10 + getWidthOffset();\n }\n function getExpandHeight(height) {\n return height + 10 + getHeightOffset();\n }\n function getShrinkWidth(width) {\n return width * 2 + getWidthOffset();\n }\n function getShrinkHeight(height) {\n return height * 2 + getHeightOffset();\n }\n function positionScrollbars(element, width, height) {\n var expand = getExpandElement(element);\n var shrink = getShrinkElement(element);\n var expandWidth = getExpandWidth(width);\n var expandHeight = getExpandHeight(height);\n var shrinkWidth = getShrinkWidth(width);\n var shrinkHeight = getShrinkHeight(height);\n expand.scrollLeft = expandWidth;\n expand.scrollTop = expandHeight;\n shrink.scrollLeft = shrinkWidth;\n shrink.scrollTop = shrinkHeight;\n }\n function injectContainerElement() {\n var container = getState(element).container;\n if (!container) {\n container = document.createElement(\"div\");\n container.className = detectionContainerClass;\n container.style.cssText = buildCssTextString([\n \"visibility: hidden\",\n \"display: inline\",\n \"width: 0px\",\n \"height: 0px\",\n \"z-index: -1\",\n \"overflow: hidden\",\n \"margin: 0\",\n \"padding: 0\"\n ]);\n getState(element).container = container;\n addAnimationClass(container);\n element.appendChild(container);\n var onAnimationStart = function() {\n getState(element).onRendered && getState(element).onRendered();\n };\n addEvent(container, \"animationstart\", onAnimationStart);\n // Store the event handler here so that they may be removed when uninstall is called.\n // See uninstall function for an explanation why it is needed.\n getState(element).onAnimationStart = onAnimationStart;\n }\n return container;\n }\n function injectScrollElements() {\n function alterPositionStyles() {\n var style = getState(element).style;\n if (style.position === \"static\") {\n element.style.setProperty(\"position\", \"relative\", options.important ? \"important\" : \"\");\n var removeRelativeStyles = function(reporter, element, style, property) {\n function getNumericalValue(value) {\n return value.replace(/[^-\\d\\.]/g, \"\");\n }\n var value = style[property];\n if (value !== \"auto\" && getNumericalValue(value) !== \"0\") {\n reporter.warn(\"An element that is positioned static has style.\" + property + \"=\" + value + \" which is ignored due to the static positioning. The element will need to be positioned relative, so the style.\" + property + \" will be set to 0. Element: \", element);\n element.style[property] = 0;\n }\n };\n //Check so that there are no accidental styles that will make the element styled differently now that is is relative.\n //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway).\n removeRelativeStyles(reporter, element, style, \"top\");\n removeRelativeStyles(reporter, element, style, \"right\");\n removeRelativeStyles(reporter, element, style, \"bottom\");\n removeRelativeStyles(reporter, element, style, \"left\");\n }\n }\n function getLeftTopBottomRightCssText(left, top, bottom, right) {\n left = !left ? \"0\" : left + \"px\";\n top = !top ? \"0\" : top + \"px\";\n bottom = !bottom ? \"0\" : bottom + \"px\";\n right = !right ? \"0\" : right + \"px\";\n return [\n \"left: \" + left,\n \"top: \" + top,\n \"right: \" + right,\n \"bottom: \" + bottom\n ];\n }\n debug(\"Injecting elements\");\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n alterPositionStyles();\n var rootContainer = getState(element).container;\n if (!rootContainer) rootContainer = injectContainerElement();\n // Due to this WebKit bug https://bugs.webkit.org/show_bug.cgi?id=80808 (currently fixed in Blink, but still present in WebKit browsers such as Safari),\n // we need to inject two containers, one that is width/height 100% and another that is left/top -1px so that the final container always is 1x1 pixels bigger than\n // the targeted element.\n // When the bug is resolved, \"containerContainer\" may be removed.\n // The outer container can occasionally be less wide than the targeted when inside inline elements element in WebKit (see https://bugs.webkit.org/show_bug.cgi?id=152980).\n // This should be no problem since the inner container either way makes sure the injected scroll elements are at least 1x1 px.\n var scrollbarWidth = scrollbarSizes.width;\n var scrollbarHeight = scrollbarSizes.height;\n var containerContainerStyle = buildCssTextString([\n \"position: absolute\",\n \"flex: none\",\n \"overflow: hidden\",\n \"z-index: -1\",\n \"visibility: hidden\",\n \"width: 100%\",\n \"height: 100%\",\n \"left: 0px\",\n \"top: 0px\"\n ]);\n var containerStyle = buildCssTextString([\n \"position: absolute\",\n \"flex: none\",\n \"overflow: hidden\",\n \"z-index: -1\",\n \"visibility: hidden\"\n ].concat(getLeftTopBottomRightCssText(-(1 + scrollbarWidth), -(1 + scrollbarHeight), -scrollbarHeight, -scrollbarWidth)));\n var expandStyle = buildCssTextString([\n \"position: absolute\",\n \"flex: none\",\n \"overflow: scroll\",\n \"z-index: -1\",\n \"visibility: hidden\",\n \"width: 100%\",\n \"height: 100%\"\n ]);\n var shrinkStyle = buildCssTextString([\n \"position: absolute\",\n \"flex: none\",\n \"overflow: scroll\",\n \"z-index: -1\",\n \"visibility: hidden\",\n \"width: 100%\",\n \"height: 100%\"\n ]);\n var expandChildStyle = buildCssTextString([\n \"position: absolute\",\n \"left: 0\",\n \"top: 0\"\n ]);\n var shrinkChildStyle = buildCssTextString([\n \"position: absolute\",\n \"width: 200%\",\n \"height: 200%\"\n ]);\n var containerContainer = document.createElement(\"div\");\n var container = document.createElement(\"div\");\n var expand = document.createElement(\"div\");\n var expandChild = document.createElement(\"div\");\n var shrink = document.createElement(\"div\");\n var shrinkChild = document.createElement(\"div\");\n // Some browsers choke on the resize system being rtl, so force it to ltr. https://github.com/wnr/element-resize-detector/issues/56\n // However, dir should not be set on the top level container as it alters the dimensions of the target element in some browsers.\n containerContainer.dir = \"ltr\";\n containerContainer.style.cssText = containerContainerStyle;\n containerContainer.className = detectionContainerClass;\n container.className = detectionContainerClass;\n container.style.cssText = containerStyle;\n expand.style.cssText = expandStyle;\n expandChild.style.cssText = expandChildStyle;\n shrink.style.cssText = shrinkStyle;\n shrinkChild.style.cssText = shrinkChildStyle;\n expand.appendChild(expandChild);\n shrink.appendChild(shrinkChild);\n container.appendChild(expand);\n container.appendChild(shrink);\n containerContainer.appendChild(container);\n rootContainer.appendChild(containerContainer);\n function onExpandScroll() {\n var state = getState(element);\n if (state && state.onExpand) state.onExpand();\n else debug(\"Aborting expand scroll handler: element has been uninstalled\");\n }\n function onShrinkScroll() {\n var state = getState(element);\n if (state && state.onShrink) state.onShrink();\n else debug(\"Aborting shrink scroll handler: element has been uninstalled\");\n }\n addEvent(expand, \"scroll\", onExpandScroll);\n addEvent(shrink, \"scroll\", onShrinkScroll);\n // Store the event handlers here so that they may be removed when uninstall is called.\n // See uninstall function for an explanation why it is needed.\n getState(element).onExpandScroll = onExpandScroll;\n getState(element).onShrinkScroll = onShrinkScroll;\n }\n function registerListenersAndPositionElements() {\n function updateChildSizes(element, width, height) {\n var expandChild = getExpandChildElement(element);\n var expandWidth = getExpandWidth(width);\n var expandHeight = getExpandHeight(height);\n expandChild.style.setProperty(\"width\", expandWidth + \"px\", options.important ? \"important\" : \"\");\n expandChild.style.setProperty(\"height\", expandHeight + \"px\", options.important ? \"important\" : \"\");\n }\n function updateDetectorElements(done) {\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n // Check whether the size has actually changed since last time the algorithm ran. If not, some steps may be skipped.\n var sizeChanged = width !== getState(element).lastWidth || height !== getState(element).lastHeight;\n debug(\"Storing current size\", width, height);\n // Store the size of the element sync here, so that multiple scroll events may be ignored in the event listeners.\n // Otherwise the if-check in handleScroll is useless.\n storeCurrentSize(element, width, height);\n // Since we delay the processing of the batch, there is a risk that uninstall has been called before the batch gets to execute.\n // Since there is no way to cancel the fn executions, we need to add an uninstall guard to all fns of the batch.\n batchProcessor.add(0, function performUpdateChildSizes() {\n if (!sizeChanged) return;\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n if (!areElementsInjected()) {\n debug(\"Aborting because element container has not been initialized\");\n return;\n }\n if (options.debug) {\n var w = element.offsetWidth;\n var h = element.offsetHeight;\n if (w !== width || h !== height) reporter.warn(idHandler.get(element), \"Scroll: Size changed before updating detector elements.\");\n }\n updateChildSizes(element, width, height);\n });\n batchProcessor.add(1, function updateScrollbars() {\n // This function needs to be invoked event though the size is unchanged. The element could have been resized very quickly and then\n // been restored to the original size, which will have changed the scrollbar positions.\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n if (!areElementsInjected()) {\n debug(\"Aborting because element container has not been initialized\");\n return;\n }\n positionScrollbars(element, width, height);\n });\n if (sizeChanged && done) batchProcessor.add(2, function() {\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n if (!areElementsInjected()) {\n debug(\"Aborting because element container has not been initialized\");\n return;\n }\n done();\n });\n }\n function areElementsInjected() {\n return !!getState(element).container;\n }\n function notifyListenersIfNeeded() {\n function isFirstNotify() {\n return getState(element).lastNotifiedWidth === undefined;\n }\n debug(\"notifyListenersIfNeeded invoked\");\n var state = getState(element);\n // Don't notify if the current size is the start size, and this is the first notification.\n if (isFirstNotify() && state.lastWidth === state.startSize.width && state.lastHeight === state.startSize.height) return debug(\"Not notifying: Size is the same as the start size, and there has been no notification yet.\");\n // Don't notify if the size already has been notified.\n if (state.lastWidth === state.lastNotifiedWidth && state.lastHeight === state.lastNotifiedHeight) return debug(\"Not notifying: Size already notified\");\n debug(\"Current size not notified, notifying...\");\n state.lastNotifiedWidth = state.lastWidth;\n state.lastNotifiedHeight = state.lastHeight;\n $7871830003078117$require$forEach(getState(element).listeners, function(listener) {\n listener(element);\n });\n }\n function handleRender() {\n debug(\"startanimation triggered.\");\n if (isUnrendered(element)) {\n debug(\"Ignoring since element is still unrendered...\");\n return;\n }\n debug(\"Element rendered.\");\n var expand = getExpandElement(element);\n var shrink = getShrinkElement(element);\n if (expand.scrollLeft === 0 || expand.scrollTop === 0 || shrink.scrollLeft === 0 || shrink.scrollTop === 0) {\n debug(\"Scrollbars out of sync. Updating detector elements...\");\n updateDetectorElements(notifyListenersIfNeeded);\n }\n }\n function handleScroll() {\n debug(\"Scroll detected.\");\n if (isUnrendered(element)) {\n // Element is still unrendered. Skip this scroll event.\n debug(\"Scroll event fired while unrendered. Ignoring...\");\n return;\n }\n updateDetectorElements(notifyListenersIfNeeded);\n }\n debug(\"registerListenersAndPositionElements invoked.\");\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n getState(element).onRendered = handleRender;\n getState(element).onExpand = handleScroll;\n getState(element).onShrink = handleScroll;\n var style = getState(element).style;\n updateChildSizes(element, style.width, style.height);\n }\n function finalizeDomMutation() {\n debug(\"finalizeDomMutation invoked.\");\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n var style = getState(element).style;\n storeCurrentSize(element, style.width, style.height);\n positionScrollbars(element, style.width, style.height);\n }\n function ready() {\n callback(element);\n }\n function install() {\n debug(\"Installing...\");\n initListeners();\n storeStartSize();\n batchProcessor.add(0, storeStyle);\n batchProcessor.add(1, injectScrollElements);\n batchProcessor.add(2, registerListenersAndPositionElements);\n batchProcessor.add(3, finalizeDomMutation);\n batchProcessor.add(4, ready);\n }\n debug(\"Making detectable...\");\n if (isDetached(element)) {\n debug(\"Element is detached\");\n injectContainerElement();\n debug(\"Waiting until element is attached...\");\n getState(element).onRendered = function() {\n debug(\"Element is now attached\");\n install();\n };\n } else install();\n }\n function uninstall(element) {\n var state = getState(element);\n if (!state) // Uninstall has been called on a non-erd element.\n return;\n // Uninstall may have been called in the following scenarios:\n // (1) Right between the sync code and async batch (here state.busy = true, but nothing have been registered or injected).\n // (2) In the ready callback of the last level of the batch by another element (here, state.busy = true, but all the stuff has been injected).\n // (3) After the installation process (here, state.busy = false and all the stuff has been injected).\n // So to be on the safe side, let's check for each thing before removing.\n // We need to remove the event listeners, because otherwise the event might fire on an uninstall element which results in an error when trying to get the state of the element.\n state.onExpandScroll && removeEvent(getExpandElement(element), \"scroll\", state.onExpandScroll);\n state.onShrinkScroll && removeEvent(getShrinkElement(element), \"scroll\", state.onShrinkScroll);\n state.onAnimationStart && removeEvent(state.container, \"animationstart\", state.onAnimationStart);\n state.container && element.removeChild(state.container);\n }\n return {\n makeDetectable: makeDetectable,\n addListener: addListener,\n uninstall: uninstall,\n initDocument: initDocument\n };\n};\n\n\nfunction $128a095f646fb776$var$isCollection(obj) {\n return Array.isArray(obj) || obj.length !== undefined;\n}\nfunction $128a095f646fb776$var$toArray(collection) {\n if (!Array.isArray(collection)) {\n var array = [];\n $128a095f646fb776$require$forEach(collection, function(obj) {\n array.push(obj);\n });\n return array;\n } else return collection;\n}\nfunction $128a095f646fb776$var$isElement(obj) {\n return obj && obj.nodeType === 1;\n}\n/**\n * @typedef idHandler\n * @type {object}\n * @property {function} get Gets the resize detector id of the element.\n * @property {function} set Generate and sets the resize detector id of the element.\n */ /**\n * @typedef Options\n * @type {object}\n * @property {boolean} callOnAdd Determines if listeners should be called when they are getting added.\n Default is true. If true, the listener is guaranteed to be called when it has been added.\n If false, the listener will not be guarenteed to be called when it has been added (does not prevent it from being called).\n * @property {idHandler} idHandler A custom id handler that is responsible for generating, setting and retrieving id's for elements.\n If not provided, a default id handler will be used.\n * @property {reporter} reporter A custom reporter that handles reporting logs, warnings and errors.\n If not provided, a default id handler will be used.\n If set to false, then nothing will be reported.\n * @property {boolean} debug If set to true, the the system will report debug messages as default for the listenTo method.\n */ /**\n * Creates an element resize detector instance.\n * @public\n * @param {Options?} options Optional global options object that will decide how this instance will work.\n */ $128a095f646fb776$exports = function(options) {\n options = options || {};\n //idHandler is currently not an option to the listenTo function, so it should not be added to globalOptions.\n var idHandler;\n if (options.idHandler) // To maintain compatability with idHandler.get(element, readonly), make sure to wrap the given idHandler\n // so that readonly flag always is true when it's used here. This may be removed next major version bump.\n idHandler = {\n get: function(element) {\n return options.idHandler.get(element, true);\n },\n set: options.idHandler.set\n };\n else {\n var idGenerator = $83778aa56f77c0e4$exports();\n var defaultIdHandler = $92b86b0b760da170$exports({\n idGenerator: idGenerator,\n stateHandler: $240efa097ecf7047$exports\n });\n idHandler = defaultIdHandler;\n }\n //reporter is currently not an option to the listenTo function, so it should not be added to globalOptions.\n var reporter = options.reporter;\n if (!reporter) {\n //If options.reporter is false, then the reporter should be quiet.\n var quiet = reporter === false;\n reporter = $9412d0a18aec0f5e$exports(quiet);\n }\n //batchProcessor is currently not an option to the listenTo function, so it should not be added to globalOptions.\n var batchProcessor = $128a095f646fb776$var$getOption(options, \"batchProcessor\", $bb2986b147359ff8$exports({\n reporter: reporter\n }));\n //Options to be used as default for the listenTo function.\n var globalOptions = {};\n globalOptions.callOnAdd = !!$128a095f646fb776$var$getOption(options, \"callOnAdd\", true);\n globalOptions.debug = !!$128a095f646fb776$var$getOption(options, \"debug\", false);\n var eventListenerHandler = $c9746ed2e67d03e3$exports(idHandler);\n var elementUtils = $44963ebbe2541692$exports({\n stateHandler: $240efa097ecf7047$exports\n });\n //The detection strategy to be used.\n var detectionStrategy;\n var desiredStrategy = $128a095f646fb776$var$getOption(options, \"strategy\", \"object\");\n var importantCssRules = $128a095f646fb776$var$getOption(options, \"important\", false);\n var strategyOptions = {\n reporter: reporter,\n batchProcessor: batchProcessor,\n stateHandler: $240efa097ecf7047$exports,\n idHandler: idHandler,\n important: importantCssRules\n };\n if (desiredStrategy === \"scroll\") {\n if ($462deb81cd9473bb$exports.isLegacyOpera()) {\n reporter.warn(\"Scroll strategy is not supported on legacy Opera. Changing to object strategy.\");\n desiredStrategy = \"object\";\n } else if ($462deb81cd9473bb$exports.isIE(9)) {\n reporter.warn(\"Scroll strategy is not supported on IE9. Changing to object strategy.\");\n desiredStrategy = \"object\";\n }\n }\n if (desiredStrategy === \"scroll\") detectionStrategy = $7871830003078117$exports(strategyOptions);\n else if (desiredStrategy === \"object\") detectionStrategy = $4405e31f3fc7d231$exports(strategyOptions);\n else throw new Error(\"Invalid strategy name: \" + desiredStrategy);\n //Calls can be made to listenTo with elements that are still being installed.\n //Also, same elements can occur in the elements list in the listenTo function.\n //With this map, the ready callbacks can be synchronized between the calls\n //so that the ready callback can always be called when an element is ready - even if\n //it wasn't installed from the function itself.\n var onReadyCallbacks = {};\n /**\n * Makes the given elements resize-detectable and starts listening to resize events on the elements. Calls the event callback for each event for each element.\n * @public\n * @param {Options?} options Optional options object. These options will override the global options. Some options may not be overriden, such as idHandler.\n * @param {element[]|element} elements The given array of elements to detect resize events of. Single element is also valid.\n * @param {function} listener The callback to be executed for each resize event for each element.\n */ function listenTo(options, elements, listener) {\n function onResizeCallback(element) {\n var listeners = eventListenerHandler.get(element);\n $128a095f646fb776$require$forEach(listeners, function callListenerProxy(listener) {\n listener(element);\n });\n }\n function addListener(callOnAdd, element, listener) {\n eventListenerHandler.add(element, listener);\n if (callOnAdd) listener(element);\n }\n //Options object may be omitted.\n if (!listener) {\n listener = elements;\n elements = options;\n options = {};\n }\n if (!elements) throw new Error(\"At least one element required.\");\n if (!listener) throw new Error(\"Listener required.\");\n if ($128a095f646fb776$var$isElement(elements)) // A single element has been passed in.\n elements = [\n elements\n ];\n else if ($128a095f646fb776$var$isCollection(elements)) // Convert collection to array for plugins.\n // TODO: May want to check so that all the elements in the collection are valid elements.\n elements = $128a095f646fb776$var$toArray(elements);\n else return reporter.error(\"Invalid arguments. Must be a DOM element or a collection of DOM elements.\");\n var elementsReady = 0;\n var callOnAdd = $128a095f646fb776$var$getOption(options, \"callOnAdd\", globalOptions.callOnAdd);\n var onReadyCallback = $128a095f646fb776$var$getOption(options, \"onReady\", function noop() {});\n var debug = $128a095f646fb776$var$getOption(options, \"debug\", globalOptions.debug);\n $128a095f646fb776$require$forEach(elements, function attachListenerToElement(element) {\n if (!$240efa097ecf7047$exports.getState(element)) {\n $240efa097ecf7047$exports.initState(element);\n idHandler.set(element);\n }\n var id = idHandler.get(element);\n debug && reporter.log(\"Attaching listener to element\", id, element);\n if (!elementUtils.isDetectable(element)) {\n debug && reporter.log(id, \"Not detectable.\");\n if (elementUtils.isBusy(element)) {\n debug && reporter.log(id, \"System busy making it detectable\");\n //The element is being prepared to be detectable. Do not make it detectable.\n //Just add the listener, because the element will soon be detectable.\n addListener(callOnAdd, element, listener);\n onReadyCallbacks[id] = onReadyCallbacks[id] || [];\n onReadyCallbacks[id].push(function onReady() {\n elementsReady++;\n if (elementsReady === elements.length) onReadyCallback();\n });\n return;\n }\n debug && reporter.log(id, \"Making detectable...\");\n //The element is not prepared to be detectable, so do prepare it and add a listener to it.\n elementUtils.markBusy(element, true);\n return detectionStrategy.makeDetectable({\n debug: debug,\n important: importantCssRules\n }, element, function onElementDetectable(element) {\n debug && reporter.log(id, \"onElementDetectable\");\n if ($240efa097ecf7047$exports.getState(element)) {\n elementUtils.markAsDetectable(element);\n elementUtils.markBusy(element, false);\n detectionStrategy.addListener(element, onResizeCallback);\n addListener(callOnAdd, element, listener);\n // Since the element size might have changed since the call to \"listenTo\", we need to check for this change,\n // so that a resize event may be emitted.\n // Having the startSize object is optional (since it does not make sense in some cases such as unrendered elements), so check for its existance before.\n // Also, check the state existance before since the element may have been uninstalled in the installation process.\n var state = $240efa097ecf7047$exports.getState(element);\n if (state && state.startSize) {\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n if (state.startSize.width !== width || state.startSize.height !== height) onResizeCallback(element);\n }\n if (onReadyCallbacks[id]) $128a095f646fb776$require$forEach(onReadyCallbacks[id], function(callback) {\n callback();\n });\n } else // The element has been unisntalled before being detectable.\n debug && reporter.log(id, \"Element uninstalled before being detectable.\");\n delete onReadyCallbacks[id];\n elementsReady++;\n if (elementsReady === elements.length) onReadyCallback();\n });\n }\n debug && reporter.log(id, \"Already detecable, adding listener.\");\n //The element has been prepared to be detectable and is ready to be listened to.\n addListener(callOnAdd, element, listener);\n elementsReady++;\n });\n if (elementsReady === elements.length) onReadyCallback();\n }\n function uninstall(elements) {\n if (!elements) return reporter.error(\"At least one element is required.\");\n if ($128a095f646fb776$var$isElement(elements)) // A single element has been passed in.\n elements = [\n elements\n ];\n else if ($128a095f646fb776$var$isCollection(elements)) // Convert collection to array for plugins.\n // TODO: May want to check so that all the elements in the collection are valid elements.\n elements = $128a095f646fb776$var$toArray(elements);\n else return reporter.error(\"Invalid arguments. Must be a DOM element or a collection of DOM elements.\");\n $128a095f646fb776$require$forEach(elements, function(element) {\n eventListenerHandler.removeAllListeners(element);\n detectionStrategy.uninstall(element);\n $240efa097ecf7047$exports.cleanState(element);\n });\n }\n function initDocument(targetDocument) {\n detectionStrategy.initDocument && detectionStrategy.initDocument(targetDocument);\n }\n return {\n listenTo: listenTo,\n removeListener: eventListenerHandler.removeListener,\n removeAllListeners: eventListenerHandler.removeAllListeners,\n uninstall: uninstall,\n initDocument: initDocument\n };\n};\nfunction $128a095f646fb776$var$getOption(options, name, defaultValue) {\n var value = options[name];\n if ((value === undefined || value === null) && defaultValue !== undefined) return defaultValue;\n return value;\n}\n\n\n\n\nvar $3HMiZ = parcelRequire(\"3HMiZ\");\n\n\n\"use strict\";\nlet $9cc35ac360344988$var$idCounter = 0;\nconst $9cc35ac360344988$var$nextId = function() {\n return $9cc35ac360344988$var$idCounter++;\n};\nclass $9cc35ac360344988$export$2e2bcd8739ae039 {\n /**\n * Returns `true` if the passed-in decoration properties matches the specified type.\n *\n * @param {Object} decorationProperties The decoration properties to match\n * @param {string} type The decoration type to match\n * @returns {boolean} Whether the decoration properties match the type\n */ static isType(decorationProperties, type) {\n if (Array.isArray(decorationProperties.type)) {\n if (decorationProperties.type.indexOf(type) >= 0) return true;\n return false;\n } else return type === decorationProperties.type;\n }\n /**\n * Creates a new decoration.\n *\n * @param {Marker} marker The target marker for the decoration\n * @param {Minimap} minimap The Minimap where the decoration will be displayed\n * @param {Object} properties The decoration's properties\n */ constructor(marker, minimap, properties){\n /** @access private */ this.marker = marker;\n /** @access private */ this.minimap = minimap;\n /** @access private */ this.emitter = new (0, $2INr1$atom.Emitter)();\n /** @access private */ this.id = $9cc35ac360344988$var$nextId();\n /** @access private */ this.properties = null;\n this.setProperties(properties);\n this.properties.id = this.id;\n /** @access private */ this.destroyed = false;\n /** @access private */ this.markerDestroyDisposable = this.marker.onDidDestroy(()=>{\n this.destroy();\n });\n this.screenRange = marker.getScreenRange();\n }\n /**\n * Destroy this marker.\n *\n * If you own the marker, you should use `Marker#destroy` which will destroy this decoration.\n */ destroy() {\n var _this_markerDestroyDisposable_dispose, _this_markerDestroyDisposable;\n if (this.destroyed) return;\n (_this_markerDestroyDisposable = this.markerDestroyDisposable) === null || _this_markerDestroyDisposable === void 0 ? void 0 : (_this_markerDestroyDisposable_dispose = _this_markerDestroyDisposable.dispose) === null || _this_markerDestroyDisposable_dispose === void 0 ? void 0 : _this_markerDestroyDisposable_dispose.call(_this_markerDestroyDisposable);\n this.destroyed = true;\n this.emitter.emit(\"did-destroy\");\n this.emitter.dispose();\n }\n /**\n * Returns whether this decoration is destroyed or not.\n *\n * @returns {boolean} Whether this decoration is destroyed or not\n */ isDestroyed() {\n return this.destroyed;\n }\n /**\n * Registers an event listener to the `did-change-properties` event.\n *\n * This event is triggered when the decoration update method is called.\n *\n * @param {function(change:Object):void} callback A function to call when the event is triggered\n * @returns {Disposable} A disposable to stop listening to the event\n */ onDidChangeProperties(callback) {\n if (this.destroyed) return;\n return this.emitter.on(\"did-change-properties\", callback);\n }\n /**\n * Registers an event listener to the `did-destroy` event.\n *\n * @param {function():void} callback A function to call when the event is triggered\n * @returns {Disposable} A disposable to stop listening to the event\n */ onDidDestroy(callback) {\n if (this.destroyed) return;\n return this.emitter.on(\"did-destroy\", callback);\n }\n /**\n * An id unique across all Decoration objects.\n *\n * @returns {number} The decoration id\n */ getId() {\n return this.id;\n }\n /**\n * Returns the marker associated with this Decoration.\n *\n * @returns {Marker} The decoration's marker\n */ getMarker() {\n return this.marker;\n }\n /**\n * Check if this decoration is of type `type`.\n *\n * @param {string | Array} type A type like `'line-number'`, `'line'`, etc. `type` can also be an Array of Strings,\n * where it will return true if the decoration's type matches any in the array.\n * @returns {boolean} Whether this decoration match the passed-in type\n */ isType(type) {\n return $9cc35ac360344988$export$2e2bcd8739ae039.isType(this.properties, type);\n }\n /**\n * Returns the Decoration's properties.\n *\n * @returns {Object} The decoration's properties\n */ getProperties() {\n return this.properties;\n }\n /**\n * Update the marker with new properties. Allows you to change the decoration's class.\n *\n * @param {Object} newProperties The new properties for the decoration\n */ setProperties(newProperties) {\n if (this.destroyed) return;\n const oldProperties = this.properties;\n this.properties = newProperties;\n this.properties.id = this.id;\n this.emitter.emit(\"did-change-properties\", {\n oldProperties: oldProperties,\n newProperties: newProperties\n });\n }\n}\n\n\n\"use strict\";\nclass $9af3f5cca724bf65$export$2e2bcd8739ae039 {\n /** Initializes the decorations related properties. */ initializeDecorations(minimap) {\n this.minimap = minimap;\n if (this.emitter == null) /**\n * The minimap emitter, lazily created if not created yet.\n *\n * @type {Emitter}\n * @access private\n */ this.emitter = new (0, $2INr1$atom.Emitter)();\n else this.emitter = this.minimap.emitter;\n /**\n * A map with the decoration id as key and the decoration as value.\n *\n * @type {Object}\n * @access private\n */ this.decorationsById = new Map();\n /**\n * The decorations stored in an array indexed with their marker id.\n *\n * @type {Object}\n * @access private\n */ this.decorationsByMarkerId = new Map();\n /**\n * The subscriptions to the markers `did-change` event indexed using the marker id.\n *\n * @type {Object}\n * @access private\n */ this.decorationMarkerChangedSubscriptions = new Map();\n /**\n * The subscriptions to the markers `did-destroy` event indexed using the marker id.\n *\n * @type {Object}\n * @access private\n */ this.decorationMarkerDestroyedSubscriptions = new Map();\n /**\n * The subscriptions to the decorations `did-change-properties` event indexed using the decoration id.\n *\n * @type {Object}\n * @access private\n */ this.decorationUpdatedSubscriptions = new Map();\n /**\n * The subscriptions to the decorations `did-destroy` event indexed using the decoration id.\n *\n * @type {Object}\n * @access private\n */ this.decorationDestroyedSubscriptions = new Map();\n // is set to true when a minimapElement is destroyed\n this.destroyed = false;\n }\n /**\n * Returns all the decorations registered in the current `Minimap`.\n *\n * @returns {Decoration[]} All the decorations in this `Minimap`\n */ getDecorations() {\n return [\n ...this.decorationsById.values()\n ];\n }\n /**\n * Registers an event listener to the `did-add-decoration` event.\n *\n * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be\n * called with an event object with the following properties:\n *\n * - Marker: the marker object that was decorated\n * - Decoration: the decoration object that was created\n *\n * @returns {Disposable} A disposable to stop listening to the event\n */ onDidAddDecoration(callback) {\n return this.emitter.on(\"did-add-decoration\", callback);\n }\n /**\n * Registers an event listener to the `did-remove-decoration` event.\n *\n * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be\n * called with an event object with the following properties:\n *\n * - Marker: the marker object that was decorated\n * - Decoration: the decoration object that was created\n *\n * @returns {Disposable} A disposable to stop listening to the event\n */ onDidRemoveDecoration(callback) {\n return this.emitter.on(\"did-remove-decoration\", callback);\n }\n /**\n * Registers an event listener to the `did-change-decoration` event.\n *\n * This event is triggered when the marker targeted by the decoration was changed.\n *\n * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be\n * called with an event object with the following properties:\n *\n * - Marker: the marker object that was decorated\n * - Decoration: the decoration object that was created\n *\n * @returns {Disposable} A disposable to stop listening to the event\n */ onDidChangeDecoration(callback) {\n return this.emitter.on(\"did-change-decoration\", callback);\n }\n /**\n * Registers an event listener to the `did-change-decoration-range` event.\n *\n * This event is triggered when the marker range targeted by the decoration was changed.\n *\n * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be\n * called with an event object with the following properties:\n *\n * - Marker: the marker object that was decorated\n * - Decoration: the decoration object that was created\n *\n * @returns {Disposable} A disposable to stop listening to the event\n */ onDidChangeDecorationRange(callback) {\n return this.emitter.on(\"did-change-decoration-range\", callback);\n }\n /**\n * Registers an event listener to the `did-update-decoration` event.\n *\n * This event is triggered when the decoration itself is modified.\n *\n * @param {function(decoration:Decoration):void} callback A function to call when the event is triggered\n * @returns {Disposable} A disposable to stop listening to the event\n */ onDidUpdateDecoration(callback) {\n return this.emitter.on(\"did-update-decoration\", callback);\n }\n /**\n * Returns the decoration with the passed-in id.\n *\n * @param {number} id The decoration id\n * @returns {Decoration} The decoration with the given id\n */ decorationForId(id) {\n return this.decorationsById.get(id);\n }\n /**\n * Returns all the decorations that intersect the passed-in row range.\n *\n * @param {number} startScreenRow The first row of the range\n * @param {number} endScreenRow The last row of the range\n * @returns {Record} The decorations that intersect the passed-in range\n */ decorationsForScreenRowRange(startScreenRow, endScreenRow) {\n const decorationsByMarkerId = {};\n const markers = this.findMarkers({\n intersectsScreenRowRange: [\n startScreenRow,\n endScreenRow\n ]\n });\n for(let i = 0, len = markers.length; i < len; i++){\n const marker = markers[i];\n const decorations = this.decorationsByMarkerId.get(marker.id);\n if (decorations !== undefined) decorationsByMarkerId[marker.id] = decorations;\n }\n return decorationsByMarkerId;\n }\n /**\n * Returns the decorations that intersects the passed-in row range in a structured way.\n *\n * At the first level, the keys are the available decoration types. At the second level, the keys are the row index\n * for which there are decorations available. The value is an array containing the decorations that intersects with\n * the corresponding row.\n *\n * @property {Object} line All the line decorations by row\n * @property {Decoration[]} line[row] All the line decorations at a given row\n * @property {Object} highlight-under All the highlight-under decorations by row\n * @property {Decoration[]} highlight-under[row] All the highlight-under decorations at a given row\n * @property {Object} highlight-over All the highlight-over decorations by row\n * @property {Decoration[]} highlight-over[row] All the highlight-over decorations at a given row\n * @property {Object} highlight-outine All the highlight-outine decorations by row\n * @property {Decoration[]} highlight-outine[row] All the highlight-outine decorations at a given row\n * @returns {Object} The decorations grouped by type and then rows\n */ decorationsByTypeThenRows() {\n if (this.decorationsByTypeThenRowsCache != null) return this.decorationsByTypeThenRowsCache;\n const cache = {};\n const decorations = this.decorationsById.values();\n for (const decoration of decorations){\n const range = decoration.marker.getScreenRange();\n const type = decoration.getProperties().type;\n if (cache[type] == null) cache[type] = {};\n for(let row = range.start.row, len = range.end.row; row <= len; row++){\n if (cache[type][row] == null) cache[type][row] = [];\n cache[type][row].push(decoration);\n }\n }\n /**\n * The grouped decorations cache.\n *\n * @type {Object}\n * @access private\n */ this.decorationsByTypeThenRowsCache = cache;\n return cache;\n }\n /** Invalidates the decoration by screen rows cache. */ invalidateDecorationForScreenRowsCache() {\n this.decorationsByTypeThenRowsCache = null;\n }\n /**\n * Adds a decoration that tracks a `Marker`. When the marker moves, is invalidated, or is destroyed, the decoration\n * will be updated to reflect the marker's state.\n *\n * @fires {did-add-decoration} when The decoration is created successfully\n * @fires {did-change} when The decoration is created successfully\n * @param {Marker} marker The marker you want this decoration to follow\n * @param {Object} decorationParams The decoration properties\n * @param {string} decorationParams.type The decoration type in the following list:\n *\n * - **line**: Fills the line background with the decoration color.\n * - **highlight**: Renders a colored rectangle on the minimap. The highlight is rendered above the line's text.\n * - **highlight-over**: Same as **highlight**.\n * - **highlight-under**: Renders a colored rectangle on the minimap. The highlight is rendered below the line's text.\n * - **highlight-outline**: Renders a colored outline on the minimap. The highlight box is rendered above the line's text.\n * - **foreground-custom**: A decoration type for which you have the control over the render routine. Note that your\n * routine should implement a render on a per-line basis to avoid any side-effect with the offset bitmap cache\n * mechanism. These decorations are rendred on the foreground decorations layer.\n * - **background-custom**: A decoration type for which you have the control over the render routine. Note that your\n * routine should implement a render on a per-line basis to avoid any side-effect with the offset bitmap cache\n * mechanism. These decorations are rendred on the background decorations layer.\n *\n * @param {string} [decorationParams.class] The CSS class to use to retrieve the background color of the decoration by\n * building a scop corresponding to `.minimap .editor `\n * @param {string} [decorationParams.scope] The scope to use to retrieve the decoration background. Note that if the\n * `scope` property is set, the `class` won't be used.\n * @param {string} [decorationParams.color] The CSS color to use to render the decoration. When set, neither `scope`\n * nor `class` are used.\n * @param {string} [decorationParams.plugin] The name of the plugin that created this decoration. It'll be used to\n * order the decorations on the same layer and that are overlapping. If the parameter is omitted the Minimap will\n * attempt to infer the plugin origin from the path of the caller function.\n * @param {function} [decorationParams.render] The render routine for custom decorations. The function receives the\n * decoration and the render data for the current render pass.\n * @returns {Decoration} The created decoration\n */ decorateMarker(marker, decorationParams) {\n if (this.destroyed || this.minimap.destroyed || marker == null) return;\n const { id: id } = marker;\n if (decorationParams.type === \"highlight\") decorationParams.type = \"highlight-over\";\n const { type: type, plugin: plugin } = decorationParams;\n if (plugin == null) decorationParams.plugin = $9af3f5cca724bf65$var$getOriginatorPackageName();\n if (decorationParams.scope == null && decorationParams.class != null) {\n const cls = decorationParams.class.split(\" \").join(\".\");\n decorationParams.scope = `.minimap .${cls}`;\n }\n if (!this.decorationMarkerDestroyedSubscriptions.has(id)) this.decorationMarkerDestroyedSubscriptions.set(id, marker.onDidDestroy(()=>{\n this.removeAllDecorationsForMarker(marker);\n }));\n if (!this.decorationMarkerChangedSubscriptions.has(id)) this.decorationMarkerChangedSubscriptions.set(id, marker.onDidChange((event)=>{\n const decorations = this.decorationsByMarkerId.get(id);\n const screenRange = marker.getScreenRange();\n this.invalidateDecorationForScreenRowsCache();\n if (decorations !== undefined) for(let i = 0, len = decorations.length; i < len; i++){\n const decoration = decorations[i];\n this.emitter.emit(\"did-change-decoration\", {\n marker: marker,\n decoration: decoration,\n event: event\n });\n this.emitDecorationChanges(decoration.type, decoration);\n decoration.screenRange = screenRange;\n }\n let oldStart = event.oldTailScreenPosition;\n let oldEnd = event.oldHeadScreenPosition;\n let newStart = event.newTailScreenPosition;\n let newEnd = event.newHeadScreenPosition;\n if (oldStart.row > oldEnd.row) [oldStart, oldEnd] = [\n oldEnd,\n oldStart\n ];\n if (newStart.row > newEnd.row) [newStart, newEnd] = [\n newEnd,\n newStart\n ];\n const rangesDiffs = $9af3f5cca724bf65$var$computeRangesDiffs(oldStart, oldEnd, newStart, newEnd);\n for(let i = 0, len = rangesDiffs.length; i < len; i++){\n const [start, end] = rangesDiffs[i];\n this.emitRangeChanges(type, {\n start: start,\n end: end\n }, 0);\n }\n }));\n const decoration = new (0, $9cc35ac360344988$export$2e2bcd8739ae039)(marker, this, decorationParams);\n if (!this.decorationsByMarkerId.has(id)) this.decorationsByMarkerId.set(id, []);\n this.decorationsByMarkerId.get(id).push(decoration);\n this.decorationsById.set(decoration.id, decoration);\n if (!this.decorationUpdatedSubscriptions.has(decoration.id)) this.decorationUpdatedSubscriptions.set(decoration.id, decoration.onDidChangeProperties((event)=>{\n this.emitDecorationChanges(type, decoration);\n }));\n this.decorationDestroyedSubscriptions.set(decoration.id, decoration.onDidDestroy(()=>{\n this.removeDecoration(decoration);\n }));\n this.emitDecorationChanges(type, decoration);\n this.emitter.emit(\"did-add-decoration\", {\n marker: marker,\n decoration: decoration\n });\n return decoration;\n }\n /**\n * Emits a change in the `Minimap` corresponding to the passed-in decoration.\n *\n * @param {string} type The type of decoration that changed\n * @param {Decoration} decoration The decoration for which emitting an event\n * @access private\n */ emitDecorationChanges(type, decoration) {\n if (this.destroyed || this.minimap.editorDestroyed()) return;\n this.invalidateDecorationForScreenRowsCache();\n const range = decoration.screenRange;\n if (!range.start || !range.end) return;\n this.emitRangeChanges(type, range, 0);\n }\n /**\n * Emits a change for the specified range.\n *\n * @param {string} type The type of decoration that changed\n * @param {Object} range The range where changes occured\n * @param {number} [screenDelta] An optional screen delta for the change object\n * @access private\n */ emitRangeChanges(type, range, screenDelta) {\n const startScreenRow = range.start.row;\n const endScreenRow = range.end.row;\n const lastRenderedScreenRow = this.minimap.getLastVisibleScreenRow();\n const firstRenderedScreenRow = this.minimap.getFirstVisibleScreenRow();\n if (screenDelta == null) screenDelta = lastRenderedScreenRow - firstRenderedScreenRow - (endScreenRow - startScreenRow);\n const changeEvent = {\n start: startScreenRow,\n end: endScreenRow,\n screenDelta: screenDelta,\n type: type\n };\n this.emitter.emit(\"did-change-decoration-range\", changeEvent);\n }\n /**\n * Removes a `Decoration` from this minimap.\n *\n * @fires {did-change} when The decoration is removed\n * @fires {did-remove-decoration} when The decoration is removed\n * @param {Decoration} decoration The decoration to remove\n */ removeDecoration(decoration) {\n if (decoration == null) return;\n const marker = decoration.marker;\n let subscription;\n this.decorationsById.delete(decoration.id);\n subscription = this.decorationUpdatedSubscriptions.get(decoration.id);\n if (subscription !== undefined) subscription.dispose();\n subscription = this.decorationDestroyedSubscriptions.get(decoration.id);\n if (subscription !== undefined) subscription.dispose();\n this.decorationUpdatedSubscriptions.delete(decoration.id);\n this.decorationDestroyedSubscriptions.delete(decoration.id);\n const decorations = this.decorationsByMarkerId.get(marker.id);\n if (decorations === undefined) return;\n this.emitDecorationChanges(decoration.getProperties().type, decoration);\n const index = decorations.indexOf(decoration);\n if (index > -1) {\n decorations.splice(index, 1);\n this.emitter.emit(\"did-remove-decoration\", {\n marker: marker,\n decoration: decoration\n });\n if (decorations.length === 0) this.removedAllMarkerDecorations(marker);\n }\n }\n /**\n * Removes all the decorations registered for the passed-in marker.\n *\n * @fires {did-change} when A decoration have been removed\n * @fires {did-remove-decoration} when A decoration have been removed\n * @param {Marker} marker The marker for which removing its decorations\n */ removeAllDecorationsForMarker(marker) {\n if (marker == null) return;\n const decorations = this.decorationsByMarkerId.get(marker.id);\n if (decorations === undefined) return;\n for(let i = 0, len = decorations.length; i < len; i++){\n const decoration = decorations[i];\n if (!this.destroyed && !this.minimap.editorDestroyed()) this.emitDecorationChanges(decoration.getProperties().type, decoration);\n this.emitter.emit(\"did-remove-decoration\", {\n marker: marker,\n decoration: decoration\n });\n }\n this.removedAllMarkerDecorations(marker);\n }\n /**\n * Performs the removal of a decoration for a given marker.\n *\n * @param {Marker} marker The marker for which removing decorations\n * @access private\n */ removedAllMarkerDecorations(marker) {\n if (marker == null) return;\n this.decorationMarkerChangedSubscriptions.get(marker.id).dispose();\n this.decorationMarkerDestroyedSubscriptions.get(marker.id).dispose();\n this.decorationsByMarkerId.delete(marker.id);\n this.decorationMarkerChangedSubscriptions.delete(marker.id);\n this.decorationMarkerDestroyedSubscriptions.delete(marker.id);\n }\n /** Removes all the decorations that was created in the current `Minimap`. */ removeAllDecorations() {\n const decorationMarkerChangedSubscriptionsValues = this.decorationMarkerChangedSubscriptions.values();\n for (const decoration of decorationMarkerChangedSubscriptionsValues)decoration.dispose();\n const decorationMarkerDestroyedSubscriptionsValues = this.decorationMarkerDestroyedSubscriptions.values();\n for (const decoration of decorationMarkerDestroyedSubscriptionsValues)decoration.dispose();\n const decorationUpdatedSubscriptionsValues = this.decorationUpdatedSubscriptions.values();\n for (const decoration of decorationUpdatedSubscriptionsValues)decoration.dispose();\n const decorationDestroyedSubscriptionsValues = this.decorationDestroyedSubscriptions.values();\n for (const decoration of decorationDestroyedSubscriptionsValues)decoration.dispose();\n const decorationsByIdValues = this.decorationsById.values();\n for (const decoration of decorationsByIdValues)decoration.destroy();\n this.decorationsById.clear();\n this.decorationsByMarkerId.clear();\n this.decorationMarkerChangedSubscriptions.clear();\n this.decorationMarkerDestroyedSubscriptions.clear();\n this.decorationUpdatedSubscriptions.clear();\n this.decorationDestroyedSubscriptions.clear();\n }\n destroy() {\n this.removeAllDecorations();\n this.minimap = undefined;\n this.emitter = undefined;\n this.destroyed = true;\n }\n}\nfunction $9af3f5cca724bf65$var$getOriginatorPackageName() {\n const line = new Error().stack.split(\"\\n\")[3];\n const filePath = line.split(\"(\")[1].replace(\")\", \"\");\n const re = new RegExp(atom.packages.getPackageDirPaths().join(\"|\") + (0, $3HMiZ.escapeRegExp)((0, ($parcel$interopDefault($2INr1$path))).sep));\n const plugin = filePath.replace(re, \"\").split((0, ($parcel$interopDefault($2INr1$path))).sep)[0].replace(/minimap-|-minimap/, \"\");\n return plugin.indexOf((0, ($parcel$interopDefault($2INr1$path))).sep) < 0 ? plugin : undefined;\n}\n/**\n * Given two ranges, it returns an array of ranges representing the differences between them.\n *\n * @param {number} oldStart The row index of the first range start\n * @param {number} oldEnd The row index of the first range end\n * @param {number} newStart The row index of the second range start\n * @param {number} newEnd The row index of the second range end\n * @returns {Object[]} The array of diff ranges\n * @access private\n */ function $9af3f5cca724bf65$var$computeRangesDiffs(oldStart, oldEnd, newStart, newEnd) {\n const diffs = [];\n if (oldStart.isLessThan(newStart)) diffs.push([\n oldStart,\n newStart\n ]);\n else if (newStart.isLessThan(oldStart)) diffs.push([\n newStart,\n oldStart\n ]);\n if (oldEnd.isLessThan(newEnd)) diffs.push([\n oldEnd,\n newEnd\n ]);\n else if (newEnd.isLessThan(oldEnd)) diffs.push([\n newEnd,\n oldEnd\n ]);\n return diffs;\n}\n\n\n\n\nvar $3HMiZ = parcelRequire(\"3HMiZ\");\n\nvar $jCvCU = parcelRequire(\"jCvCU\");\n\n/** @babel */ \"use strict\";\nclass $fad6c03909bb3604$export$2e2bcd8739ae039 {\n constructor(){\n /**\n * The onscreen canvas.\n *\n * @type {HTMLCanvasElement}\n */ this.canvas = document.createElement(\"canvas\");\n const desynchronized = false // TODO Electron 9 has color issues #786\n ;\n /**\n * The onscreen canvas context.\n *\n * @type {CanvasRenderingContext2D}\n */ this.context = this.canvas.getContext(\"2d\", {\n desynchronized: desynchronized\n });\n this.canvas.webkitImageSmoothingEnabled = false;\n this.context.imageSmoothingEnabled = false;\n /**\n * The offscreen canvas.\n *\n * @type {HTMLCanvasElement}\n * @access private\n */ this.offscreenCanvas = document.createElement(\"canvas\");\n /**\n * The offscreen canvas context.\n *\n * @type {CanvasRenderingContext2D}\n * @access private\n */ this.offscreenContext = this.offscreenCanvas.getContext(\"2d\", {\n desynchronized: desynchronized\n });\n this.offscreenCanvas.webkitImageSmoothingEnabled = false;\n this.offscreenContext.imageSmoothingEnabled = false;\n }\n attach(parent) {\n if (this.canvas.parentNode) return;\n parent.appendChild(this.canvas);\n }\n setSize(width = 0, height = 0) {\n this.canvas.width = width;\n this.canvas.height = height;\n this.context.imageSmoothingEnabled = false;\n this.resetOffscreenSize();\n }\n getSize() {\n return {\n width: this.canvas.width,\n height: this.canvas.height\n };\n }\n resetOffscreenSize() {\n this.offscreenCanvas.width = this.canvas.width;\n this.offscreenCanvas.height = this.canvas.height;\n this.offscreenContext.imageSmoothingEnabled = false;\n }\n copyToOffscreen() {\n if (this.canvas.width > 0 && this.canvas.height > 0) this.offscreenContext.drawImage(this.canvas, 0, 0);\n }\n copyFromOffscreen() {\n if (this.offscreenCanvas.width > 0 && this.offscreenCanvas.height > 0) this.context.drawImage(this.offscreenCanvas, 0, 0);\n }\n copyPartFromOffscreen(srcY, destY, height) {\n if (this.offscreenCanvas.width > 0 && this.offscreenCanvas.height > 0) this.context.drawImage(this.offscreenCanvas, 0, srcY, this.offscreenCanvas.width, height, 0, destY, this.offscreenCanvas.width, height);\n }\n clearCanvas() {\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }\n}\n\n\n\"use strict\";\nconst $cfbc6087bb3b2166$var$SPEC_MODE = atom.inSpecMode();\n// an instance of MinimapElement used for testing and calling spies\nlet $cfbc6087bb3b2166$var$thisSpec;\nclass $cfbc6087bb3b2166$export$2e2bcd8739ae039 extends (0, (/*@__PURE__*/$parcel$interopDefault($jCvCU))) {\n /** Initializes the canvas elements needed to perform the `Minimap` rendering. */ initializeCanvas() {\n if ($cfbc6087bb3b2166$var$SPEC_MODE) {\n // class methods only used for spying the calls\n this.drawLines = (firstLine, lastLine)=>{\n console.log({\n firstLine: firstLine,\n lastLine: lastLine\n });\n };\n this.drawLineDecoration = $cfbc6087bb3b2166$var$drawLineDecoration;\n this.drawGutterDecoration = $cfbc6087bb3b2166$var$drawGutterDecoration;\n this.drawHighlightDecoration = $cfbc6087bb3b2166$var$drawHighlightDecoration;\n this.drawHighlightOutlineDecoration = $cfbc6087bb3b2166$var$drawHighlightOutlineDecoration;\n this.drawCustomDecoration = $cfbc6087bb3b2166$var$drawCustomDecoration;\n this.StyleReader = (0, $23c406735d46bb37$export$4d3d19fa8673fd3e);\n $cfbc6087bb3b2166$var$thisSpec = this;\n }\n /**\n * The main canvas layer where lines are rendered.\n *\n * @type {CanvasLayer}\n */ this.tokensLayer = new (0, $fad6c03909bb3604$export$2e2bcd8739ae039)();\n /**\n * The canvas layer for decorations below the text.\n *\n * @type {CanvasLayer}\n */ this.backLayer = new (0, $fad6c03909bb3604$export$2e2bcd8739ae039)();\n /**\n * The canvas layer for decorations above the text.\n *\n * @type {CanvasLayer}\n */ this.frontLayer = new (0, $fad6c03909bb3604$export$2e2bcd8739ae039)();\n if (!this.pendingChanges) /**\n * Stores the changes from the text editor.\n *\n * @type {Object[]}\n * @access private\n */ this.pendingChanges = [];\n if (!this.pendingBackDecorationChanges) /**\n * Stores the changes from the minimap back decorations.\n *\n * @type {Object[]}\n * @access private\n */ this.pendingBackDecorationChanges = [];\n if (!this.pendingFrontDecorationChanges) /**\n * Stores the changes from the minimap front decorations.\n *\n * @type {Object[]}\n * @access private\n */ this.pendingFrontDecorationChanges = [];\n // the maximum number of tokens to render in one line\n this.maxTokensInOneLine = atom.config.get(\"minimap.maxTokensInOneLine\");\n }\n /**\n * Returns the uppermost canvas in the MinimapElement.\n *\n * @returns {HTMLCanvasElement} The html canvas element\n */ getFrontCanvas() {\n return this.frontLayer.canvas;\n }\n /**\n * Attaches the canvases into the specified container.\n *\n * @param {HTMLElement} parent The canvases' container\n * @access private\n */ attachCanvases(parent) {\n this.backLayer.attach(parent);\n this.tokensLayer.attach(parent);\n this.frontLayer.attach(parent);\n }\n /**\n * Changes the size of all the canvas layers at once.\n *\n * @param {number} width The new width for the three canvases\n * @param {number} height The new height for the three canvases\n * @access private\n */ setCanvasesSize(width, height) {\n this.backLayer.setSize(width, height);\n this.tokensLayer.setSize(width, height);\n this.frontLayer.setSize(width, height);\n }\n /** Performs an update of the rendered `Minimap` based on the changes registered in the instance. */ updateCanvas() {\n const firstRow = this.minimap.getFirstVisibleScreenRow();\n const lastRow = this.minimap.getLastVisibleScreenRow();\n const devicePixelRatio = this.minimap.getDevicePixelRatio();\n const lineHeight = this.minimap.getLineHeight() * devicePixelRatio;\n const charHeight = this.minimap.getCharHeight() * devicePixelRatio;\n const charWidth = this.minimap.getCharWidth() * devicePixelRatio;\n const { width: canvasWidth, height: canvasHeight } = this.tokensLayer.getSize();\n const editor = this.minimap.getTextEditor();\n const editorElement = this.minimap.getTextEditorElement();\n // TODO avoid closure: https://stackoverflow.com/a/46256398/7910299\n const getTokenColorClosure = this.displayCodeHighlights ? (scopes)=>$cfbc6087bb3b2166$var$getTokenColor(scopes, editorElement, this.textOpacity) : ()=>$cfbc6087bb3b2166$var$getDefaultColor(editorElement, this.textOpacity);\n $cfbc6087bb3b2166$var$updateTokensLayer(this.tokensLayer, firstRow, lastRow, this.offscreenFirstRow, this.offscreenLastRow, this.pendingChanges, lineHeight, charHeight, charWidth, canvasWidth, editor, editor.getScreenLineCount(), $cfbc6087bb3b2166$var$getInvisibleRegExp(editor), getTokenColorClosure, this.ignoreWhitespacesInTokens, this.maxTokensInOneLine);\n if ($cfbc6087bb3b2166$var$SPEC_MODE) // call the spy for drawLines which is used inside updateTokensLayer\n this.drawLines(firstRow, lastRow);\n const decorations = this.DecorationManagement.decorationsByTypeThenRows(firstRow, lastRow);\n const renderData = {\n context: this.backLayer.context,\n canvasWidth: canvasWidth,\n canvasHeight: canvasHeight,\n lineHeight: lineHeight,\n charWidth: charWidth,\n charHeight: charHeight,\n orders: $43704eddd45f8975$export$b9b9891832107981()\n };\n const drawCustomDecorationLambda = (decoration, data, decorationColor)=>$cfbc6087bb3b2166$var$drawCustomDecoration(decoration, data, decorationColor, editorElement);\n $cfbc6087bb3b2166$var$backgroundDecorationDispatcher[\"background-custom\"] = drawCustomDecorationLambda;\n $cfbc6087bb3b2166$var$frontDecorationDispatcher[\"foreground-custom\"] = drawCustomDecorationLambda;\n $cfbc6087bb3b2166$var$updateBackDecorationsLayer(this.backLayer, firstRow, lastRow, this.offscreenFirstRow, this.offscreenLastRow, this.pendingBackDecorationChanges, renderData, lineHeight, editorElement, decorations);\n renderData.context = this.frontLayer.context;\n $cfbc6087bb3b2166$var$updateFrontDecorationsLayer(this.frontLayer, firstRow, lastRow, this.offscreenFirstRow, this.offscreenLastRow, this.pendingFrontDecorationChanges, renderData, lineHeight, editorElement, decorations);\n this.pendingChanges = [];\n this.pendingBackDecorationChanges = [];\n this.pendingFrontDecorationChanges = [];\n /**\n * The first row in the last render of the offscreen canvas.\n *\n * @type {number}\n * @access private\n */ this.offscreenFirstRow = firstRow;\n /**\n * The last row in the last render of the offscreen canvas.\n *\n * @type {number}\n * @access private\n */ this.offscreenLastRow = lastRow;\n }\n}\n// ######## ######## ### ## ##\n// ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ##\n// ## ## ######## ## ## ## ## ##\n// ## ## ## ## ######### ## ## ##\n// ## ## ## ## ## ## ## ## ##\n// ######## ## ## ## ## ### ###\n/**\n * Performs an update of the tokens layer using the pending changes array.\n *\n * @param {CanvasLayer} tokensLayer\n * @param {number} firstRow FirstRow the first row of the range to update\n * @param {number} lastRow LastRow the last row of the range to update\n * @param {number} offscreenFirstRow\n * @param {number} offscreenLastRow\n * @param {Array<>} pendingChanges\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {number} charHeight This.minimap.getCharHeight() * devicePixelRatio\n * @param {number} charWidth This.minimap.getCharWidth() * devicePixelRatio\n * @param {number} canvasWidth This.tokensLayer.getSize().width\n * @param {TextEditor} editor This.minimap.getTextEditor()\n * @param {(t: Token) => string} getTokenColorClosure\n * @param {boolean} ignoreWhitespacesInTokens This.ignoreWhitespacesInTokens\n * @param {number} maxTokensInOneLine This.maxTokensInOneLine\n * @access private\n */ function $cfbc6087bb3b2166$var$updateTokensLayer(tokensLayer, firstRow, lastRow, offscreenFirstRow, offscreenLastRow, pendingChanges, lineHeight, charHeight, charWidth, canvasWidth, editor, editorScreenLineCount, invisibleRegExp, getTokenColorClosure, ignoreWhitespacesInTokens, maxTokensInOneLine) {\n // NOTE: this method is the hot function of Minimap. Do not refactor. The code is inlined delibarately.\n const intactRanges = $cfbc6087bb3b2166$var$computeIntactRanges(firstRow, lastRow, pendingChanges, offscreenFirstRow, offscreenLastRow);\n // redrawRangesOnLayer\n const context = tokensLayer.context;\n tokensLayer.clearCanvas();\n if (intactRanges.length === 0) $cfbc6087bb3b2166$var$drawLines(firstRow, lastRow, 0, lineHeight, charHeight, charWidth, canvasWidth, context, editor, editorScreenLineCount, invisibleRegExp, getTokenColorClosure, ignoreWhitespacesInTokens, maxTokensInOneLine);\n else {\n for(let j = 0, len = intactRanges.length; j < len; j++){\n const intact = intactRanges[j];\n tokensLayer.copyPartFromOffscreen(intact.offscreenRow * lineHeight, (intact.start - firstRow) * lineHeight, (intact.end - intact.start) * lineHeight);\n }\n // drawLinesForRanges\n let currentRow = firstRow;\n for(let i = 0, len = intactRanges.length; i < len; i++){\n const range = intactRanges[i];\n $cfbc6087bb3b2166$var$drawLines(currentRow, range.start, currentRow - firstRow, lineHeight, charHeight, charWidth, canvasWidth, context, editor, editorScreenLineCount, invisibleRegExp, getTokenColorClosure, ignoreWhitespacesInTokens, maxTokensInOneLine);\n currentRow = range.end;\n }\n if (currentRow <= lastRow) $cfbc6087bb3b2166$var$drawLines(currentRow, lastRow, currentRow - firstRow, lineHeight, charHeight, charWidth, canvasWidth, context, editor, editorScreenLineCount, invisibleRegExp, getTokenColorClosure, ignoreWhitespacesInTokens, maxTokensInOneLine);\n }\n tokensLayer.resetOffscreenSize();\n tokensLayer.copyToOffscreen();\n}\n/**\n * Performs an update of the back decorations layer using the pending back decorations changes arrays.\n *\n * @param {CanvasLayer} backLayer\n * @param {number} firstRow FirstRow the first row of the range to update\n * @param {number} lastRow LastRow the last row of the range to update\n * @param {number} offscreenFirstRow\n * @param {number} offscreenLastRow\n * @param {Array<>} pendingBackDecorationChanges\n * @param {Object} renderData\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {TextEditorElement} editorElement This.minimap.getTextEditorElement()\n * @param {Decoration[]} decorations\n * @access private\n */ function $cfbc6087bb3b2166$var$updateBackDecorationsLayer(backLayer, firstRow, lastRow, offscreenFirstRow, offscreenLastRow, pendingBackDecorationChanges, renderData, lineHeight, editorElement, decorations) {\n const intactRanges = $cfbc6087bb3b2166$var$computeIntactRanges(firstRow, lastRow, pendingBackDecorationChanges, offscreenFirstRow, offscreenLastRow);\n // NOTE: this method is the hot function of Minimap. Do not refactor. The code is inlined delibarately.\n // redrawRangesOnLayer\n backLayer.clearCanvas();\n if (intactRanges.length === 0) $cfbc6087bb3b2166$var$drawBackDecorationsForLines(firstRow, lastRow, 0, renderData, lineHeight, editorElement, decorations);\n else {\n for(let j = 0, len = intactRanges.length; j < len; j++){\n const intact = intactRanges[j];\n backLayer.copyPartFromOffscreen(intact.offscreenRow * lineHeight, (intact.start - firstRow) * lineHeight, (intact.end - intact.start) * lineHeight);\n }\n // drawLinesForRanges\n let currentRow = firstRow;\n for(let i = 0, len = intactRanges.length; i < len; i++){\n const range = intactRanges[i];\n $cfbc6087bb3b2166$var$drawBackDecorationsForLines(currentRow, range.start, currentRow - firstRow, renderData, lineHeight, editorElement, decorations);\n currentRow = range.end;\n }\n if (currentRow <= lastRow) $cfbc6087bb3b2166$var$drawBackDecorationsForLines(currentRow, lastRow, currentRow - firstRow, renderData, lineHeight, editorElement, decorations);\n }\n backLayer.resetOffscreenSize();\n backLayer.copyToOffscreen();\n}\n/**\n * Performs an update of the front decorations layer using the pending front decorations changes arrays.\n *\n * @param {CanvasLayer} frontLayer\n * @param {number} firstRow FirstRow the first row of the range to update\n * @param {number} lastRow LastRow the last row of the range to update\n * @param {number} offscreenFirstRow\n * @param {number} offscreenLastRow\n * @param {Array<>} pendingFrontDecorationChanges\n * @param {Object} renderData\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {TextEditorElement} editorElement This.minimap.getTextEditorElement()\n * @param {Decoration[]} decorations\n * @access private\n */ function $cfbc6087bb3b2166$var$updateFrontDecorationsLayer(frontLayer, firstRow, lastRow, offscreenFirstRow, offscreenLastRow, pendingFrontDecorationChanges, renderData, lineHeight, editorElement, decorations) {\n const intactRanges = $cfbc6087bb3b2166$var$computeIntactRanges(firstRow, lastRow, pendingFrontDecorationChanges, offscreenFirstRow, offscreenLastRow);\n // NOTE: this method is the hot function of Minimap. Do not refactor. The code is inlined delibarately.\n // redrawRangesOnLayer\n frontLayer.clearCanvas();\n if (intactRanges.length === 0) $cfbc6087bb3b2166$var$drawFrontDecorationsForLines(firstRow, lastRow, 0, renderData, lineHeight, editorElement, decorations);\n else {\n for(let j = 0, len = intactRanges.length; j < len; j++){\n const intact = intactRanges[j];\n frontLayer.copyPartFromOffscreen(intact.offscreenRow * lineHeight, (intact.start - firstRow) * lineHeight, (intact.end - intact.start) * lineHeight);\n }\n // drawLinesForRanges\n let currentRow = firstRow;\n for(let i = 0, len = intactRanges.length; i < len; i++){\n const range = intactRanges[i];\n $cfbc6087bb3b2166$var$drawFrontDecorationsForLines(currentRow, range.start, currentRow - firstRow, renderData, lineHeight, editorElement, decorations);\n currentRow = range.end;\n }\n if (currentRow <= lastRow) $cfbc6087bb3b2166$var$drawFrontDecorationsForLines(currentRow, lastRow, currentRow - firstRow, renderData, lineHeight, editorElement, decorations);\n }\n frontLayer.resetOffscreenSize();\n frontLayer.copyToOffscreen();\n}\nconst $cfbc6087bb3b2166$var$whitespaceTokenRegex = /^\\s+$/;\nconst $cfbc6087bb3b2166$var$oneOrMoreWhiteSpaceRegexp = /\\s+/;\n/**\n * Draws a single token on the given context.\n *\n * @param {CanvasRenderingContext2D} context The target canvas context\n * @param {string} text The token's text content\n * @param {string} color The token's CSS color\n * @param {number} x The x position of the token in the line\n * @param {number} y The y position of the line in the minimap\n * @param {number} charWidth The width of a character in the minimap\n * @param {number} charHeight The height of a character in the minimap\n * @returns {number} The x position at the end of the token\n * @access private\n */ function $cfbc6087bb3b2166$var$drawToken(context, text, color, x, y, charWidth, charHeight, ignoreWhitespacesInTokens) {\n context.fillStyle = color;\n if (ignoreWhitespacesInTokens) {\n const length = text.length * charWidth;\n context.fillRect(x, y, length, charHeight);\n return x + length;\n } else {\n let chars = 0;\n for(let j = 0, len = text.length; j < len; j++){\n const char = text[j];\n if (char === \" \") {\n if (chars > 0) context.fillRect(x - chars * charWidth, y, chars * charWidth, charHeight);\n chars = 0;\n } else chars++;\n x += charWidth;\n }\n if (chars > 0) context.fillRect(x - chars * charWidth, y, chars * charWidth, charHeight);\n return x;\n }\n}\n/**\n * Draws lines on the corresponding layer.\n *\n * The lines range to draw is specified by the `firstRow` and `lastRow` parameters.\n *\n * @param {number} firstRow The first row to render\n * @param {number} lastRow The last row to render\n * @param {number} offsetRow The relative offset to apply to rows when rendering them\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {number} charHeight This.minimap.getCharHeight() * devicePixelRatio\n * @param {number} charWidth This.minimap.getCharWidth() * devicePixelRatio\n * @param {number} canvasWidth This.tokensLayer.getSize().width\n * @param {CanvasRenderingContext2D} context This.tokensLayer.context\n * @param {TextEditor} editor This.minimap.getTextEditor()\n * @param {number} editorScreenLineCount\n * @param {RegExp} invisibleRegExp\n * @param {(t: Token) => string} getTokenColorClosure\n * @param {boolean} ignoreWhitespacesInTokens This.ignoreWhitespacesInTokens\n * @param {number} maxTokensInOneLine This.maxTokensInOneLine\n * @access private\n */ function $cfbc6087bb3b2166$var$drawLines(firstRow, lastRow, offsetRow, lineHeight, charHeight, charWidth, canvasWidth, context, editor, editorScreenLineCount, invisibleRegExp, getTokenColorClosure, ignoreWhitespacesInTokens, maxTokensInOneLine) {\n // NOTE: this method is the hot function of Minimap. Do not refactor. The code is inlined delibarately.\n if (firstRow > lastRow) return;\n let lastLine, x;\n let y = offsetRow * lineHeight - lineHeight;\n // eachTokenForScreenRows\n lastRow = Math.min(lastRow, editorScreenLineCount);\n for(let line = firstRow; line < lastRow; line++){\n const editorTokensForScreenRow = editor.tokensForScreenRow(line);\n const numToken = editorTokensForScreenRow.length;\n const numTokenToRender = Math.min(numToken, maxTokensInOneLine);\n if (lastLine !== line) {\n x = 0;\n y += lineHeight;\n lastLine = line;\n context.clearRect(x, y, canvasWidth, lineHeight);\n }\n for(let iToken = 0; iToken < numTokenToRender; iToken++){\n const token = editorTokensForScreenRow[iToken];\n const tokenText = token.text.replace(invisibleRegExp, \" \");\n const tokenScopes = token.scopes;\n if (x > canvasWidth) continue;\n if ($cfbc6087bb3b2166$var$whitespaceTokenRegex.test(tokenText)) x += tokenText.length * charWidth;\n else x = $cfbc6087bb3b2166$var$drawToken(context, tokenText, getTokenColorClosure(tokenScopes), x, y, charWidth, charHeight, ignoreWhitespacesInTokens);\n }\n }\n context.fill();\n}\n/**\n * Returns the regexp to replace invisibles substitution characters in editor lines.\n *\n * @param {TextEditor} editor\n * @returns {RegExp} The regular expression to match invisible characters\n * @access private\n */ function $cfbc6087bb3b2166$var$getInvisibleRegExp(editor) {\n const invisibles = editor.getInvisibles();\n const regexp = [];\n if (invisibles.cr != null) regexp.push(invisibles.cr);\n if (invisibles.eol != null) regexp.push(invisibles.eol);\n if (invisibles.space != null) regexp.push(invisibles.space);\n if (invisibles.tab != null) regexp.push(invisibles.tab);\n if (regexp.length !== 0) return RegExp(regexp.filter((s)=>{\n return typeof s === \"string\";\n }).map((0, $3HMiZ.escapeRegExp)).join(\"|\"), \"g\");\n else return null;\n}\n/**\n * Dispatchers for decoration drawing (custom decoration drawer added dynamically)\n *\n * @param {Object} backgroundDecorationDispatcher An object with the type to render as key and the render method as value\n */ const $cfbc6087bb3b2166$var$backgroundDecorationDispatcher = {\n line: $cfbc6087bb3b2166$var$drawLineDecoration,\n \"highlight-under\": $cfbc6087bb3b2166$var$drawHighlightDecoration\n};\n/**\n * Dispatchers for decoration drawing (custom decoration drawer added dynamically)\n *\n * @param {Object} frontDecorationDispatcher An object with the type to render as key and the render method as value\n */ const $cfbc6087bb3b2166$var$frontDecorationDispatcher = {\n gutter: $cfbc6087bb3b2166$var$drawGutterDecoration,\n \"highlight-over\": $cfbc6087bb3b2166$var$drawHighlightDecoration,\n \"highlight-outline\": $cfbc6087bb3b2166$var$drawHighlightOutlineDecoration\n};\n/**\n * Draws a line decoration.\n *\n * @param {Decoration} decoration The decoration to render\n * @param {Object} data The data need to perform the render\n * @param {string} decorationColor Decoration color\n * @access private\n */ function $cfbc6087bb3b2166$var$drawLineDecoration(decoration, data, decorationColor) {\n const { context: context, lineHeight: lineHeight, canvasWidth: canvasWidth, yRow: yRow } = data;\n context.fillStyle = decorationColor;\n context.fillRect(0, yRow, canvasWidth, lineHeight);\n}\n/**\n * Draws a gutter decoration.\n *\n * @param {Decoration} decoration The decoration to render\n * @param {Object} data The data need to perform the render\n * @param {string} decorationColor Decoration color\n * @access private\n */ function $cfbc6087bb3b2166$var$drawGutterDecoration(decoration, data, decorationColor) {\n const { context: context, lineHeight: lineHeight, yRow: yRow } = data;\n context.fillStyle = decorationColor;\n context.fillRect(0, yRow, 1, lineHeight);\n}\n/**\n * Draws a highlight decoration.\n *\n * It renders only the part of the highlight corresponding to the specified row.\n *\n * @param {Decoration} decoration The decoration to render\n * @param {Object} data The data need to perform the render\n * @param {string} decorationColor Decoration color\n * @access private\n */ function $cfbc6087bb3b2166$var$drawHighlightDecoration(decoration, data, decorationColor) {\n const { context: context, lineHeight: lineHeight, charWidth: charWidth, canvasWidth: canvasWidth, screenRow: screenRow, yRow: yRow } = data;\n const range = decoration.getMarker().getScreenRange();\n const rowSpan = range.end.row - range.start.row;\n context.fillStyle = decorationColor;\n if (rowSpan === 0) {\n const colSpan = range.end.column - range.start.column;\n context.fillRect(range.start.column * charWidth, yRow, colSpan * charWidth, lineHeight);\n } else if (screenRow === range.start.row) {\n const x = range.start.column * charWidth;\n context.fillRect(x, yRow, canvasWidth - x, lineHeight);\n } else if (screenRow === range.end.row) context.fillRect(0, yRow, range.end.column * charWidth, lineHeight);\n else context.fillRect(0, yRow, canvasWidth, lineHeight);\n}\n/**\n * Draws a highlight outline decoration.\n *\n * It renders only the part of the highlight corresponding to the specified row.\n *\n * @param {Decoration} decoration The decoration to render\n * @param {Object} data The data need to perform the render\n * @param {string} decorationColor Decoration color\n * @access private\n */ function $cfbc6087bb3b2166$var$drawHighlightOutlineDecoration(decoration, data, decorationColor) {\n const { context: context, lineHeight: lineHeight, charWidth: charWidth, canvasWidth: canvasWidth, screenRow: screenRow, yRow: yRow } = data;\n let bottomWidth, colSpan, width, xBottomStart, xEnd, xStart;\n const range = decoration.getMarker().getScreenRange();\n const rowSpan = range.end.row - range.start.row;\n const yStart = yRow;\n const yEnd = yStart + lineHeight;\n context.fillStyle = decorationColor;\n if (rowSpan === 0) {\n colSpan = range.end.column - range.start.column;\n width = colSpan * charWidth;\n xStart = range.start.column * charWidth;\n xEnd = xStart + width;\n context.fillRect(xStart, yStart, width, 1);\n context.fillRect(xStart, yEnd - 1, width, 1);\n context.fillRect(xStart, yStart, 1, lineHeight);\n context.fillRect(xEnd, yStart, 1, lineHeight);\n } else if (rowSpan === 1) {\n xStart = range.start.column * charWidth;\n xEnd = range.end.column * charWidth;\n if (screenRow === range.start.row) {\n width = canvasWidth - xStart;\n xBottomStart = Math.max(xStart, xEnd);\n bottomWidth = canvasWidth - xBottomStart;\n context.fillRect(xStart, yStart, width, 1);\n context.fillRect(xBottomStart, yEnd - 1, bottomWidth, 1);\n context.fillRect(xStart, yStart, 1, lineHeight);\n context.fillRect(canvasWidth - 1, yStart, 1, lineHeight);\n } else {\n width = canvasWidth - xStart;\n bottomWidth = canvasWidth - xEnd;\n context.fillRect(0, yStart, xStart, 1);\n context.fillRect(0, yEnd - 1, xEnd, 1);\n context.fillRect(0, yStart, 1, lineHeight);\n context.fillRect(xEnd, yStart, 1, lineHeight);\n }\n } else {\n xStart = range.start.column * charWidth;\n xEnd = range.end.column * charWidth;\n if (screenRow === range.start.row) {\n width = canvasWidth - xStart;\n context.fillRect(xStart, yStart, width, 1);\n context.fillRect(xStart, yStart, 1, lineHeight);\n context.fillRect(canvasWidth - 1, yStart, 1, lineHeight);\n } else if (screenRow === range.end.row) {\n width = canvasWidth - xStart;\n context.fillRect(0, yEnd - 1, xEnd, 1);\n context.fillRect(0, yStart, 1, lineHeight);\n context.fillRect(xEnd, yStart, 1, lineHeight);\n } else {\n context.fillRect(0, yStart, 1, lineHeight);\n context.fillRect(canvasWidth - 1, yStart, 1, lineHeight);\n if (screenRow === range.start.row + 1) context.fillRect(0, yStart, xStart, 1);\n if (screenRow === range.end.row - 1) context.fillRect(xEnd, yEnd - 1, canvasWidth - xEnd, 1);\n }\n }\n}\n/**\n * Draws a custom decoration.\n *\n * It renders only the part of the highlight corresponding to the specified row.\n *\n * @param {Decoration} decoration The decoration to render\n * @param {Object} data The data need to perform the render\n * @param {string} decorationColor Decoration color\n * @param {TextEditorElement} editorElement\n * @access private\n */ function $cfbc6087bb3b2166$var$drawCustomDecoration(decoration, data, decorationColor, editorElement) {\n const renderRoutine = decoration.getProperties().render;\n if (renderRoutine) {\n data.color = decorationColor;\n renderRoutine(decoration, data, editorElement);\n }\n}\n/**\n * Draws the specified decorations for the current `screenRow`.\n *\n * The `decorations` object contains all the decorations grouped by type and then rows.\n *\n * @param {number} screenRow The screen row index for which render decorations\n * @param {Object} decorations The object containing all the decorations\n * @param {Object} renderData The object containing the render data\n * @param {Object} types An object with the type to render as key and the render method as value\n * @param {TextEditorElement} editorElement\n * @access private\n */ function $cfbc6087bb3b2166$var$drawDecorations(screenRow, decorations, renderData, types, editorElement) {\n let decorationsToRender = [];\n renderData.context.clearRect(0, renderData.yRow, renderData.canvasWidth, renderData.lineHeight);\n for(const i in types)decorationsToRender = decorationsToRender.concat(decorations[i] != null ? decorations[i][screenRow] || [] : []);\n decorationsToRender.sort((a, b)=>(renderData.orders[a.properties.plugin] || 0) - (renderData.orders[b.properties.plugin] || 0));\n if (decorationsToRender != null ? decorationsToRender.length : undefined) for(let i = 0, len = decorationsToRender.length; i < len; i++){\n const decoration = decorationsToRender[i];\n const decorationDrawer = types[decoration.properties.type];\n if (!$cfbc6087bb3b2166$var$SPEC_MODE) decorationDrawer(decoration, renderData, /* decorationColor */ $cfbc6087bb3b2166$var$getDecorationColor(decoration, editorElement));\n else {\n // get the real function name from the mangeld Parcel names\n const functionName = decorationDrawer.name.split(\"$\").pop().replace(\"Lambda\", \"\");\n // call the spy:\n $cfbc6087bb3b2166$var$thisSpec[functionName](decoration, renderData, /* decorationColor */ $cfbc6087bb3b2166$var$getDecorationColor(decoration, editorElement));\n }\n }\n}\n/**\n * Draws front decorations on the corresponding layer.\n *\n * The lines range to draw is specified by the `firstRow` and `lastRow` parameters.\n *\n * @param {number} firstRow The first row to render\n * @param {number} lastRow The last row to render\n * @param {number} offsetRow The relative offset to apply to rows when rendering them\n * @param {Object} renderData\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {TextEditorElement} editorElement This.minimap.getTextEditorElement()\n * @param {Decoration[]} decorations\n * @access private\n */ function $cfbc6087bb3b2166$var$drawFrontDecorationsForLines(firstRow, lastRow, offsetRow, renderData, lineHeight, editorElement, decorations) {\n if (firstRow > lastRow) return;\n for(let screenRow = firstRow; screenRow <= lastRow; screenRow++){\n renderData.row = offsetRow + (screenRow - firstRow);\n renderData.yRow = renderData.row * lineHeight;\n renderData.screenRow = screenRow;\n $cfbc6087bb3b2166$var$drawDecorations(screenRow, decorations, renderData, $cfbc6087bb3b2166$var$frontDecorationDispatcher, editorElement);\n }\n renderData.context.fill();\n}\n/**\n * Draws back decorations on the corresponding layer.\n *\n * The lines range to draw is specified by the `firstRow` and `lastRow` parameters.\n *\n * @param {number} firstRow The first row to render\n * @param {number} lastRow The last row to render\n * @param {number} offsetRow The relative offset to apply to rows when rendering them\n * @param {Object} renderData\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {TextEditorElement} editorElement This.minimap.getTextEditorElement()\n * @param {Decoration[]} decorations\n * @access private\n */ function $cfbc6087bb3b2166$var$drawBackDecorationsForLines(firstRow, lastRow, offsetRow, renderData, lineHeight, editorElement, decorations) {\n if (firstRow > lastRow) return;\n for(let screenRow = firstRow; screenRow <= lastRow; screenRow++){\n renderData.row = offsetRow + (screenRow - firstRow);\n renderData.yRow = renderData.row * lineHeight;\n renderData.screenRow = screenRow;\n $cfbc6087bb3b2166$var$drawDecorations(screenRow, decorations, renderData, $cfbc6087bb3b2166$var$backgroundDecorationDispatcher, editorElement);\n }\n renderData.context.fill();\n}\n// ###### ####### ## ####### ######## ######\n// ## ## ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ######## ######\n// ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ## ## ##\n// ###### ####### ######## ####### ## ## ######\n/**\n * Returns the opacity value to use when rendering the `Minimap` text.\n *\n * @returns {Number} The text opacity value Unused (inlined)\n */ // getTextOpacity () { return this.textOpacity }\n/**\n * Returns the default text color for an editor content.\n *\n * The color value is directly read from the `TextEditorView` computed styles.\n *\n * @param {TextEditorElement} editorElement\n * @param {number} textOpacity\n * @returns {string} A CSS color\n */ function $cfbc6087bb3b2166$var$getDefaultColor(editorElement, textOpacity) {\n const color = (0, $23c406735d46bb37$export$4d3d19fa8673fd3e).retrieveStyleFromDom([\n \".editor\"\n ], \"color\", editorElement, true);\n return $cfbc6087bb3b2166$var$transparentize(color, textOpacity);\n}\n/**\n * Returns the text color for the passed-in scopes\n *\n * The color value is read from the DOM by creating a node structure that match the token `scope` property.\n *\n * @param {string[]} scopes An array of scopes for a `TextEditor` token (token.scopeDescriptor || token.scopes)\n * @param {TextEditorElement} editorElement\n * @param {number} textOpacity\n * @returns {string} The CSS color for the provided token\n */ function $cfbc6087bb3b2166$var$getTokenColor(scopes, editorElement, textOpacity) {\n const color = (0, $23c406735d46bb37$export$4d3d19fa8673fd3e).retrieveStyleFromDom(scopes, \"color\", editorElement, true);\n return $cfbc6087bb3b2166$var$transparentize(color, textOpacity);\n}\n/**\n * Converts a `rgb(...)` color into a `rgba(...)` color with the specified opacity.\n *\n * @param {string} color The CSS RGB color to transparentize\n * @param {number} opacity The opacity amount\n * @returns {string} The transparentized CSS color\n * @access private\n */ function $cfbc6087bb3b2166$var$transparentize(color, opacity) {\n // assumes that color is in form of `rgb(content)` with no spaces around the given value\n return `rgba(${color.slice(4, -1)}, ${opacity})`;\n}\n/**\n * Returns the background color for the passed-in `decoration` object.\n *\n * The color value is read from the DOM by creating a node structure that match the decoration `scope` property unless\n * the decoration provides its own `color` property.\n *\n * @param {Decoration} decoration The decoration to get the color for\n * @param {TextEditorElement} editorElement\n * @returns {string} The CSS color for the provided decoration\n */ function $cfbc6087bb3b2166$var$getDecorationColor(decoration, editorElement) {\n const properties = decoration.getProperties();\n if (properties.color) return properties.color;\n if (properties.scope) {\n const scopeString = properties.scope.split($cfbc6087bb3b2166$var$oneOrMoreWhiteSpaceRegexp);\n return (0, $23c406735d46bb37$export$4d3d19fa8673fd3e).retrieveStyleFromDom(scopeString, \"background-color\", editorElement, true);\n } else return $cfbc6087bb3b2166$var$getDefaultColor(editorElement);\n}\n// ######## ### ## ## ###### ######## ######\n// ## ## ## ## ### ## ## ## ## ## ##\n// ## ## ## ## #### ## ## ## ##\n// ######## ## ## ## ## ## ## #### ###### ######\n// ## ## ######### ## #### ## ## ## ##\n// ## ## ## ## ## ### ## ## ## ## ##\n// ## ## ## ## ## ## ###### ######## ######\n/**\n * Computes the ranges that are not affected by the current pending changes.\n *\n * @param {number} firstRow The first row of the rendered region\n * @param {number} lastRow The last row of the rendered region\n * @param {number | null} offscreenFirstRow CanvasDrawer.offscreenLastRow\n * @param {number | null} offscreenLastRow CanvasDrawer.offscreenLastRow\n * @returns {Object[]} The intact ranges in the rendered region\n * @access private\n */ function $cfbc6087bb3b2166$var$computeIntactRanges(firstRow, lastRow, changes, offscreenFirstRow, offscreenLastRow) {\n // TODO when do they get null?\n if (offscreenFirstRow == null && offscreenLastRow == null) return [];\n // At first, the whole range is considered intact\n let intactRanges = [\n {\n start: offscreenFirstRow,\n end: offscreenLastRow,\n offscreenRow: 0\n }\n ];\n for(let i = 0, len = changes.length; i < len; i++){\n const change = changes[i];\n const newIntactRanges = [];\n for(let j = 0, intactLen = intactRanges.length; j < intactLen; j++){\n const range = intactRanges[j];\n if (change.end < range.start && change.screenDelta !== 0) // The change is above of the range and lines are either\n // added or removed\n newIntactRanges.push({\n start: range.start + change.screenDelta,\n end: range.end + change.screenDelta,\n offscreenRow: range.offscreenRow\n });\n else if (change.end < range.start || change.start > range.end) // The change is outside the range but didn't add\n // or remove lines\n newIntactRanges.push(range);\n else {\n // The change is within the range, there's one intact range\n // from the range start to the change start\n if (change.start > range.start) newIntactRanges.push({\n start: range.start,\n end: change.start - 1,\n offscreenRow: range.offscreenRow\n });\n if (change.end < range.end) {\n // The change ends within the range\n if (change.bufferDelta !== 0) // Lines are added or removed, the intact range starts in the\n // next line after the change end plus the screen delta\n newIntactRanges.push({\n start: change.end + change.screenDelta + 1,\n end: range.end + change.screenDelta,\n offscreenRow: range.offscreenRow + change.end + 1 - range.start\n });\n else if (change.screenDelta !== 0) // Lines are added or removed in the display buffer, the intact\n // range starts in the next line after the change end plus the\n // screen delta\n newIntactRanges.push({\n start: change.end + change.screenDelta + 1,\n end: range.end + change.screenDelta,\n offscreenRow: range.offscreenRow + change.end + 1 - range.start\n });\n else // No lines are added, the intact range starts on the line after\n // the change end\n newIntactRanges.push({\n start: change.end + 1,\n end: range.end,\n offscreenRow: range.offscreenRow + change.end + 1 - range.start\n });\n }\n }\n }\n intactRanges = newIntactRanges;\n }\n return $cfbc6087bb3b2166$var$truncateIntactRanges(intactRanges, firstRow, lastRow);\n}\n/**\n * Truncates the intact ranges so that they doesn't expand past the visible area of the minimap.\n *\n * @param {Object[]} intactRanges The initial array of ranges\n * @param {number} firstRow The first row of the rendered region\n * @param {number} lastRow The last row of the rendered region\n * @returns {Object[]} The array of truncated ranges\n * @access private\n */ function $cfbc6087bb3b2166$var$truncateIntactRanges(intactRanges, firstRow, lastRow) {\n let i = 0;\n while(i < intactRanges.length){\n const range = intactRanges[i];\n if (range.start < firstRow) {\n range.offscreenRow += firstRow - range.start;\n range.start = firstRow;\n }\n if (range.end > lastRow) range.end = lastRow;\n if (range.start >= range.end) intactRanges.splice(i--, 1);\n i++;\n }\n return intactRanges.sort((a, b)=>{\n return a.offscreenRow - b.offscreenRow;\n });\n}\n\n\n\"use strict\";\nfunction $b93c954f18e23f84$export$2e2bcd8739ae039(cls, ...mixins) {\n mixins.forEach((mixin)=>{\n $b93c954f18e23f84$var$includeMixin(cls, mixin);\n });\n}\nfunction $b93c954f18e23f84$var$includeMixin(target, source) {\n Object.getOwnPropertyNames(source).forEach((k)=>{\n if ([\n \"length\",\n \"name\",\n \"arguments\",\n \"caller\",\n \"prototype\",\n \"includeInto\"\n ].indexOf(k) >= 0) return;\n const descriptor = Object.getOwnPropertyDescriptor(source, k);\n Object.defineProperty(target, k, descriptor);\n });\n Object.getOwnPropertyNames(source.prototype).forEach((k)=>{\n if (k === \"constructor\") return;\n const descriptor = Object.getOwnPropertyDescriptor(source.prototype, k);\n Object.defineProperty(target.prototype, k, descriptor);\n });\n}\n\n\n\nvar $4r3v7 = parcelRequire(\"4r3v7\");\n\n\n\n\nvar $4r3v7 = parcelRequire(\"4r3v7\");\n\n\"use strict\";\nconst $f4a489e3d34ef458$var$TAG_NAME = \"minimap-quick-settings\";\n/** @access private */ class $f4a489e3d34ef458$var$MinimapQuickSettingsElement extends HTMLElement {\n static initClass() {\n (0, $b93c954f18e23f84$export$2e2bcd8739ae039)(this, (0, $51078990c74c1d06$exports.EventsDelegation), (0, $51078990c74c1d06$exports.SpacePenDSL).Babel);\n (0, $4r3v7.default)(this, $f4a489e3d34ef458$var$TAG_NAME);\n }\n static content() {\n this.div({\n class: \"select-list popover-list minimap-quick-settings\"\n }, ()=>{\n this.input({\n type: \"text\",\n class: \"hidden-input\",\n outlet: \"hiddenInput\"\n });\n this.ol({\n class: \"list-group mark-active\",\n outlet: \"list\"\n }, ()=>{\n this.li({\n class: \"separator\",\n outlet: \"separator\"\n });\n this.li({\n class: \"code-highlights\",\n outlet: \"codeHighlights\"\n }, \"code-highlights\");\n this.li({\n class: \"absolute-mode\",\n outlet: \"absoluteMode\"\n }, \"absolute-mode\");\n this.li({\n class: \"adjust-absolute-mode-height\",\n outlet: \"adjustAbsoluteModeHeight\"\n }, \"adjust-absolute-mode-height\");\n });\n this.div({\n class: \"btn-group\"\n }, ()=>{\n this.button({\n class: \"btn btn-default\",\n outlet: \"onLeftButton\"\n }, \"On Left\");\n this.button({\n class: \"btn btn-default\",\n outlet: \"onRightButton\"\n }, \"On Right\");\n });\n });\n }\n createdCallback() {\n this.buildContent();\n }\n setModel(minimap) {\n this.selectedItem = null;\n this.minimap = minimap;\n this.emitter = new (0, $2INr1$atom.Emitter)();\n this.subscriptions = new (0, $2INr1$atom.CompositeDisposable)();\n this.plugins = {};\n this.itemsActions = new WeakMap();\n this.codeHighlights.classList.toggle(\"active\", this.minimap.displayCodeHighlights);\n this.itemsActions.set(this.codeHighlights, ()=>{\n atom.config.set(\"minimap.displayCodeHighlights\", !this.minimap.displayCodeHighlights);\n });\n this.itemsActions.set(this.absoluteMode, ()=>{\n atom.config.set(\"minimap.absoluteMode\", !atom.config.get(\"minimap.absoluteMode\"));\n });\n this.itemsActions.set(this.adjustAbsoluteModeHeight, ()=>{\n atom.config.set(\"minimap.adjustAbsoluteModeHeight\", !atom.config.get(\"minimap.adjustAbsoluteModeHeight\"));\n });\n this.subscriptions.add($23c406735d46bb37$export$d40fb390be4bd0f(({ name: name, plugin: plugin })=>{\n return this.addItemFor(name, plugin);\n }), $23c406735d46bb37$export$9937b73c38ac51f0(({ name: name, plugin: plugin })=>{\n return this.removeItemFor(name, plugin);\n }), $23c406735d46bb37$export$6f3aaf72a3cac830(({ name: name, plugin: plugin })=>{\n return this.activateItem(name, plugin);\n }), $23c406735d46bb37$export$8df1420526313195(({ name: name, plugin: plugin })=>{\n return this.deactivateItem(name, plugin);\n }), atom.commands.add(\"minimap-quick-settings\", {\n \"core:move-up\": ()=>{\n this.selectPreviousItem();\n },\n \"core:move-down\": ()=>{\n this.selectNextItem();\n },\n \"core:move-left\": ()=>{\n atom.config.set(\"minimap.displayMinimapOnLeft\", true);\n },\n \"core:move-right\": ()=>{\n atom.config.set(\"minimap.displayMinimapOnLeft\", false);\n },\n \"core:cancel\": ()=>{\n this.destroy();\n },\n \"core:confirm\": ()=>{\n this.toggleSelectedItem();\n }\n }), this.subscribeTo(this.codeHighlights, {\n mousedown: (e)=>{\n e.preventDefault();\n atom.config.set(\"minimap.displayCodeHighlights\", !this.minimap.displayCodeHighlights);\n }\n }), this.subscribeTo(this.absoluteMode, {\n mousedown: (e)=>{\n e.preventDefault();\n atom.config.set(\"minimap.absoluteMode\", !atom.config.get(\"minimap.absoluteMode\"));\n }\n }), this.subscribeTo(this.adjustAbsoluteModeHeight, {\n mousedown: (e)=>{\n e.preventDefault();\n atom.config.set(\"minimap.adjustAbsoluteModeHeight\", !atom.config.get(\"minimap.adjustAbsoluteModeHeight\"));\n }\n }), this.subscribeTo(this.hiddenInput, {\n focusout: (e)=>{\n this.destroy();\n }\n }, {\n passive: true\n }), this.subscribeTo(this.onLeftButton, {\n mousedown: (e)=>{\n e.preventDefault();\n atom.config.set(\"minimap.displayMinimapOnLeft\", true);\n }\n }), this.subscribeTo(this.onRightButton, {\n mousedown: (e)=>{\n e.preventDefault();\n atom.config.set(\"minimap.displayMinimapOnLeft\", false);\n }\n }), atom.config.observe(\"minimap.displayCodeHighlights\", (bool)=>{\n this.codeHighlights.classList.toggle(\"active\", bool);\n }), atom.config.observe(\"minimap.absoluteMode\", (bool)=>{\n this.absoluteMode.classList.toggle(\"active\", bool);\n }), atom.config.observe(\"minimap.adjustAbsoluteModeHeight\", (bool)=>{\n this.adjustAbsoluteModeHeight.classList.toggle(\"active\", bool);\n }), atom.config.observe(\"minimap.displayMinimapOnLeft\", (bool)=>{\n this.onLeftButton.classList.toggle(\"selected\", bool);\n this.onRightButton.classList.toggle(\"selected\", !bool);\n }));\n this.initList();\n }\n onDidDestroy(callback) {\n return this.emitter.on(\"did-destroy\", callback);\n }\n attach() {\n const workspaceElement = atom.views.getView(atom.workspace);\n workspaceElement.appendChild(this);\n this.hiddenInput.focus();\n }\n destroy() {\n this.emitter.emit(\"did-destroy\");\n this.subscriptions.dispose();\n this.parentNode.removeChild(this);\n }\n initList() {\n this.itemsDisposables = new WeakMap();\n for(const name in $43704eddd45f8975$export$8b3ca321c77fdea6)this.addItemFor(name, $43704eddd45f8975$export$8b3ca321c77fdea6[name]);\n }\n toggleSelectedItem() {\n const fn = this.itemsActions.get(this.selectedItem);\n if (typeof fn === \"function\") fn();\n }\n selectNextItem() {\n this.selectedItem.classList.remove(\"selected\");\n if (this.selectedItem.nextSibling != null) {\n this.selectedItem = this.selectedItem.nextSibling;\n if (this.selectedItem.matches(\".separator\")) this.selectedItem = this.selectedItem.nextSibling;\n } else this.selectedItem = this.list.firstChild;\n this.selectedItem.classList.add(\"selected\");\n }\n selectPreviousItem() {\n this.selectedItem.classList.remove(\"selected\");\n if (this.selectedItem.previousSibling != null) {\n this.selectedItem = this.selectedItem.previousSibling;\n if (this.selectedItem.matches(\".separator\")) this.selectedItem = this.selectedItem.previousSibling;\n } else this.selectedItem = this.list.lastChild;\n this.selectedItem.classList.add(\"selected\");\n }\n addItemFor(name, plugin) {\n const item = document.createElement(\"li\");\n const action = ()=>{\n $43704eddd45f8975$export$8cf5509a1f8ee810(name);\n };\n if (plugin.isActive()) item.classList.add(\"active\");\n item.textContent = name;\n this.itemsActions.set(item, action);\n this.itemsDisposables.set(item, this.addDisposableEventListener(item, \"mousedown\", (e)=>{\n e.preventDefault();\n action();\n }));\n this.plugins[name] = item;\n this.list.insertBefore(item, this.separator);\n if (!(this.selectedItem != null)) {\n this.selectedItem = item;\n this.selectedItem.classList.add(\"selected\");\n }\n }\n removeItemFor(name, plugin) {\n try {\n this.list.removeChild(this.plugins[name]);\n } catch (error) {}\n delete this.plugins[name];\n }\n activateItem(name, plugin) {\n this.plugins[name].classList.add(\"active\");\n }\n deactivateItem(name, plugin) {\n this.plugins[name].classList.remove(\"active\");\n }\n}\n$f4a489e3d34ef458$var$MinimapQuickSettingsElement.initClass();\nfunction $f4a489e3d34ef458$export$97bf619d538586fc() {\n const element = document.createElement($f4a489e3d34ef458$var$TAG_NAME);\n element.createdCallback();\n return element;\n}\n\n\n\"use strict\";\nconst $fcbed2d4b7084ed8$var$elementResizeDetector = (0, (/*@__PURE__*/$parcel$interopDefault($128a095f646fb776$exports)))({\n strategy: \"scroll\"\n});\nconst $fcbed2d4b7084ed8$var$SPEC_MODE = atom.inSpecMode();\nconst $fcbed2d4b7084ed8$var$TAG_NAME = \"atom-text-editor-minimap\";\n/**\n * Public: The MinimapElement is the view meant to render a {@link Minimap} instance in the DOM.\n *\n * You can retrieve the MinimapElement associated to a Minimap using the `atom.views.getView` method.\n *\n * Note that most interactions with the Minimap package is done through the Minimap model so you should never have to\n * access MinimapElement instances.\n *\n * @example Let minimapElement = atom.views.getView(minimap)\n */ class $fcbed2d4b7084ed8$var$MinimapElement extends HTMLElement {\n static initClass() {\n (0, $b93c954f18e23f84$export$2e2bcd8739ae039)(this, (0, $cfbc6087bb3b2166$export$2e2bcd8739ae039), (0, $51078990c74c1d06$exports.EventsDelegation), (0, $51078990c74c1d06$exports.AncestorsMethods));\n (0, $4r3v7.default)(this, $fcbed2d4b7084ed8$var$TAG_NAME);\n }\n // ## ## ####### ####### ## ## ######\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## ## ##\n // ######### ## ## ## ## ##### ######\n // ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ####### ####### ## ## ######\n /**\n * DOM callback invoked when a new MinimapElement is created.\n *\n * @access private\n */ createdCallback() {\n // Core properties\n /** @access private */ this.minimap = undefined;\n /** @access private */ this.width = undefined;\n /** @access private */ this.height = undefined;\n // Subscriptions\n /** @access private */ this.subscriptions = new (0, $2INr1$atom.CompositeDisposable)();\n /** @access private */ this.visibleAreaSubscription = undefined;\n /** @access private */ this.quickSettingsSubscription = undefined;\n /** @access private */ this.dragSubscription = undefined;\n /** @access private */ this.openQuickSettingSubscription = undefined;\n // Configs\n /** @access private */ this.minimapScrollIndicator = undefined;\n /** @access private */ this.displayMinimapOnLeft = undefined;\n /** @access private */ this.displayPluginsControls = undefined;\n /** @access private */ this.textOpacity = undefined;\n /** @access private */ this.displayCodeHighlights = undefined;\n /** @access private */ this.adjustToSoftWrap = undefined;\n /** @access private */ this.useHardwareAcceleration = undefined;\n /** @access private */ this.absoluteMode = undefined;\n // Elements\n /** @access private */ this.visibleArea = undefined;\n /** @access private */ this.controls = undefined;\n /** @access private */ this.scrollIndicator = undefined;\n /** @access private */ this.openQuickSettings = undefined;\n /** @access private */ this.quickSettingsElement = undefined;\n this.DecorationManagement = new (0, $9af3f5cca724bf65$export$2e2bcd8739ae039)();\n // States\n /** @access private */ this.attached = undefined;\n /** @access private */ this.attachedToTextEditor = undefined;\n /** @access private */ this.standAlone = undefined;\n /** @access private */ this.wasVisible = undefined;\n // Other\n /** @access private */ this.offscreenFirstRow = undefined;\n /** @access private */ this.offscreenLastRow = undefined;\n /** @access private */ this.frameRequested = undefined;\n /** @access private */ this.flexBasis = undefined;\n this.initializeContent();\n this.subscriptions.add(atom.config.observe(\"minimap.displayMinimapOnLeft\", (displayMinimapOnLeft)=>{\n this.displayMinimapOnLeft = displayMinimapOnLeft;\n this.updateMinimapFlexPosition();\n this.measureHeightAndWidth(true, true);\n }), atom.config.observe(\"minimap.minimapScrollIndicator\", (minimapScrollIndicator)=>{\n this.minimapScrollIndicator = minimapScrollIndicator;\n if (this.minimapScrollIndicator && !(this.scrollIndicator != null) && !this.standAlone) this.initializeScrollIndicator();\n else if (this.scrollIndicator != null) this.disposeScrollIndicator();\n if (this.attached) this.requestUpdate();\n }), atom.config.observe(\"minimap.displayPluginsControls\", (displayPluginsControls)=>{\n this.displayPluginsControls = displayPluginsControls;\n if (this.displayPluginsControls && !(this.openQuickSettings != null) && !this.standAlone) this.initializeOpenQuickSettings();\n else if (this.openQuickSettings != null) this.disposeOpenQuickSettings();\n }), atom.config.observe(\"minimap.textOpacity\", (textOpacity)=>{\n this.textOpacity = textOpacity;\n if (this.attached) this.requestForcedUpdate();\n }), atom.config.observe(\"minimap.displayCodeHighlights\", (displayCodeHighlights)=>{\n this.displayCodeHighlights = displayCodeHighlights;\n if (this.attached) this.requestForcedUpdate();\n }), atom.config.observe(\"minimap.smoothScrolling\", (smoothScrolling)=>{\n this.smoothScrolling = smoothScrolling;\n if (this.attached) {\n if (!this.smoothScrolling) {\n this.backLayer.canvas.style.cssText = \"\";\n this.tokensLayer.canvas.style.cssText = \"\";\n this.frontLayer.canvas.style.cssText = \"\";\n } else this.requestUpdate();\n }\n }), atom.config.observe(\"minimap.adjustMinimapWidthToSoftWrap\", (adjustToSoftWrap)=>{\n this.adjustToSoftWrap = adjustToSoftWrap;\n if (this.attached) this.measureHeightAndWidth();\n }), atom.config.observe(\"minimap.adjustMinimapWidthOnlyIfSmaller\", (adjustOnlyIfSmaller)=>{\n this.adjustOnlyIfSmaller = adjustOnlyIfSmaller;\n if (this.attached) this.measureHeightAndWidth();\n }), atom.config.observe(\"minimap.useHardwareAcceleration\", (useHardwareAcceleration)=>{\n this.useHardwareAcceleration = useHardwareAcceleration;\n if (this.attached) this.requestUpdate();\n }), atom.config.observe(\"minimap.absoluteMode\", (absoluteMode)=>{\n this.absoluteMode = absoluteMode;\n this.classList.toggle(\"absolute\", this.absoluteMode);\n }), atom.config.observe(\"minimap.adjustAbsoluteModeHeight\", (adjustAbsoluteModeHeight)=>{\n this.adjustAbsoluteModeHeight = adjustAbsoluteModeHeight;\n this.classList.toggle(\"adjust-absolute-height\", this.adjustAbsoluteModeHeight);\n if (this.attached) this.measureHeightAndWidth();\n }), atom.config.observe(\"minimap.ignoreWhitespacesInTokens\", (ignoreWhitespacesInTokens)=>{\n this.ignoreWhitespacesInTokens = ignoreWhitespacesInTokens;\n if (this.attached) this.requestForcedUpdate();\n }), atom.config.observe(\"editor.preferredLineLength\", ()=>{\n if (this.attached) this.measureHeightAndWidth();\n }), atom.config.observe(\"editor.softWrap\", ()=>{\n if (this.attached) this.requestUpdate();\n }), atom.config.observe(\"editor.showInvisibles\", ()=>{\n if (this.attached) this.requestUpdate();\n }), atom.config.observe(\"editor.invisibles\", ()=>{\n if (this.attached) this.requestUpdate();\n }), atom.config.observe(\"editor.softWrapAtPreferredLineLength\", ()=>{\n if (this.attached) this.requestUpdate();\n }));\n }\n /**\n * DOM callback invoked when a new MinimapElement is attached to the DOM.\n *\n * @access private\n */ connectedCallback() {\n if (typeof atom.views.pollDocument === \"function\") this.subscriptions.add(atom.views.pollDocument(()=>{\n this.pollDOM();\n }));\n else {\n this.intersectionObserver = new IntersectionObserver((entries)=>{\n const { intersectionRect: intersectionRect } = entries[entries.length - 1];\n if (intersectionRect.width > 0 || intersectionRect.height > 0) this.measureHeightAndWidth(true, true);\n });\n this.intersectionObserver.observe(this);\n if (this.isVisible()) this.measureHeightAndWidth(true, true);\n const measureDimensions = ()=>{\n this.measureHeightAndWidth(false, false);\n };\n $fcbed2d4b7084ed8$var$elementResizeDetector.listenTo(this, measureDimensions);\n window.addEventListener(\"resize\", measureDimensions, {\n passive: true\n });\n this.subscriptions.add(new (0, $2INr1$atom.Disposable)(()=>{\n $fcbed2d4b7084ed8$var$elementResizeDetector.removeListener(this, measureDimensions);\n }), new (0, $2INr1$atom.Disposable)(()=>{\n window.removeEventListener(\"resize\", measureDimensions);\n }));\n }\n this.measureHeightAndWidth();\n this.updateMinimapFlexPosition();\n this.attached = true;\n this.attachedToTextEditor = this.queryParentSelector(\"atom-text-editor\") === this.minimap.getTextEditorElement();\n if (this.attachedToTextEditor) this.minimap.getTextEditorElement().setAttribute(\"with-minimap\", this.displayMinimapOnLeft ? \"left\" : \"right\");\n this.subscriptions.add(this.subscribeToMediaQuery());\n }\n /**\n * DOM callback invoked when a new MinimapElement is detached from the DOM.\n *\n * @access private\n */ disconnectedCallback() {\n this.minimap.getTextEditorElement().removeAttribute(\"with-minimap\");\n this.attached = false;\n }\n // ### ######## ######## ### ###### ## ##\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## #########\n // ######### ## ## ######### ## ## ##\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ###### ## ##\n /**\n * Returns whether the MinimapElement is currently visible on screen or not.\n *\n * The visibility of the minimap is defined by testing the size of the offset width and height of the element.\n *\n * @returns {boolean} Whether the MinimapElement is currently visible or not\n */ isVisible() {\n return this.offsetWidth > 0 || this.offsetHeight > 0;\n }\n /**\n * Attaches the MinimapElement to the DOM.\n *\n * The position at which the element is attached is defined by the `displayMinimapOnLeft` setting.\n *\n * @param {HTMLElement} [parent] The DOM node where attaching the minimap element\n */ attach(parent) {\n if (this.attached) return;\n const container = parent || this.minimap.getTextEditorElement();\n const minimaps = container.querySelectorAll($fcbed2d4b7084ed8$var$TAG_NAME);\n if (minimaps.length) Array.prototype.forEach.call(minimaps, (el)=>{\n el.destroy();\n try {\n container.removeChild(el);\n } catch (e) {\n // TODO: ignore for now\n // https://github.com/atom-minimap/minimap/issues/766#issuecomment-762496374\n }\n });\n container.appendChild(this);\n }\n /** Detaches the MinimapElement from the DOM. */ detach() {\n if (!this.attached || this.parentNode == null) return;\n this.parentNode.removeChild(this);\n }\n /**\n * Toggles the minimap left/right position based on the value of the `displayMinimapOnLeft` setting.\n *\n * @access private\n */ updateMinimapFlexPosition() {\n this.classList.toggle(\"left\", this.displayMinimapOnLeft);\n if (this.attachedToTextEditor) this.minimap.getTextEditorElement().setAttribute(\"with-minimap\", this.displayMinimapOnLeft ? \"left\" : \"right\");\n }\n /** Destroys this MinimapElement */ destroy() {\n this.DecorationManagement.destroy();\n if (this.quickSettingsElement) this.quickSettingsElement.destroy();\n this.subscriptions.dispose();\n this.detach();\n }\n // ###### ####### ## ## ######## ######## ## ## ########\n // ## ## ## ## ### ## ## ## ### ## ##\n // ## ## ## #### ## ## ## #### ## ##\n // ## ## ## ## ## ## ## ###### ## ## ## ##\n // ## ## ## ## #### ## ## ## #### ##\n // ## ## ## ## ## ### ## ## ## ### ##\n // ###### ####### ## ## ## ######## ## ## ##\n /**\n * Creates the content of the MinimapElement and attaches the mouse control event listeners.\n *\n * @access private\n */ initializeContent() {\n this.initializeCanvas();\n this.attachCanvases(this);\n this.createVisibleArea();\n this.createControls();\n this.subscriptions.add(this.subscribeTo(this, {\n mousewheel: (e)=>{\n if (!this.standAlone && this.minimap.onMouseWheel) this.minimap.onMouseWheel(e);\n }\n }, {\n passive: true\n }), this.subscribeTo(this.getFrontCanvas(), {\n mousedown: (e)=>{\n this.canvasPressed($fcbed2d4b7084ed8$var$extractMouseEventData(e));\n },\n touchstart: (e)=>{\n this.canvasPressed($fcbed2d4b7084ed8$var$extractTouchEventData(e));\n }\n }, {\n passive: true\n }));\n }\n /**\n * Initializes the visible area div.\n *\n * @access private\n */ createVisibleArea() {\n if (this.visibleArea) return;\n this.visibleArea = document.createElement(\"div\");\n this.visibleArea.classList.add(\"minimap-visible-area\");\n this.appendChild(this.visibleArea);\n this.visibleAreaSubscription = this.subscribeTo(this.visibleArea, {\n mousedown: (e)=>{\n this.startDrag($fcbed2d4b7084ed8$var$extractMouseEventData(e));\n },\n touchstart: (e)=>{\n this.startDrag($fcbed2d4b7084ed8$var$extractTouchEventData(e));\n }\n }, {\n passive: true\n });\n this.subscriptions.add(this.visibleAreaSubscription);\n }\n /**\n * Removes the visible area div.\n *\n * @access private\n */ removeVisibleArea() {\n if (!this.visibleArea) return;\n this.subscriptions.remove(this.visibleAreaSubscription);\n this.visibleAreaSubscription.dispose();\n this.removeChild(this.visibleArea);\n delete this.visibleArea;\n }\n /**\n * Creates the controls container div.\n *\n * @access private\n */ createControls() {\n if (this.controls || this.standAlone) return;\n this.controls = document.createElement(\"div\");\n this.controls.classList.add(\"minimap-controls\");\n this.appendChild(this.controls);\n }\n /**\n * Removes the controls container div.\n *\n * @access private\n */ removeControls() {\n if (!this.controls) return;\n this.removeChild(this.controls);\n delete this.controls;\n }\n /**\n * Initializes the scroll indicator div when the `minimapScrollIndicator` settings is enabled.\n *\n * @access private\n */ initializeScrollIndicator() {\n if (this.scrollIndicator || this.standAlone) return;\n this.scrollIndicator = document.createElement(\"div\");\n this.scrollIndicator.classList.add(\"minimap-scroll-indicator\");\n this.controls.appendChild(this.scrollIndicator);\n }\n /**\n * Disposes the scroll indicator div when the `minimapScrollIndicator` settings is disabled.\n *\n * @access private\n */ disposeScrollIndicator() {\n if (!this.scrollIndicator) return;\n this.controls.removeChild(this.scrollIndicator);\n delete this.scrollIndicator;\n }\n /**\n * Initializes the quick settings openener div when the `displayPluginsControls` setting is enabled.\n *\n * @access private\n */ initializeOpenQuickSettings() {\n if (this.openQuickSettings || this.standAlone) return;\n this.openQuickSettings = document.createElement(\"div\");\n this.openQuickSettings.classList.add(\"open-minimap-quick-settings\");\n this.controls.appendChild(this.openQuickSettings);\n this.openQuickSettingSubscription = this.subscribeTo(this.openQuickSettings, {\n mousedown: (e)=>{\n e.preventDefault();\n e.stopPropagation();\n if (this.quickSettingsElement != null) {\n this.quickSettingsElement.destroy();\n this.quickSettingsSubscription.dispose();\n } else {\n this.quickSettingsElement = (0, $f4a489e3d34ef458$export$97bf619d538586fc)();\n this.quickSettingsElement.setModel(this);\n this.quickSettingsSubscription = this.quickSettingsElement.onDidDestroy(()=>{\n this.quickSettingsElement = null;\n });\n const { top: top, left: left, right: right } = this.getFrontCanvas().getBoundingClientRect();\n this.quickSettingsElement.style.top = `${top}px`;\n this.quickSettingsElement.attach();\n if (this.displayMinimapOnLeft) this.quickSettingsElement.style.left = `${right}px`;\n else this.quickSettingsElement.style.left = `${left - this.quickSettingsElement.clientWidth}px`;\n }\n }\n });\n }\n /**\n * Disposes the quick settings openener div when the `displayPluginsControls` setting is disabled.\n *\n * @access private\n */ disposeOpenQuickSettings() {\n if (!this.openQuickSettings) return;\n this.controls.removeChild(this.openQuickSettings);\n this.openQuickSettingSubscription.dispose();\n delete this.openQuickSettings;\n }\n /**\n * Get the DecorationManagement API for minimapElement\n *\n * @returns {DecorationManagement}\n */ getDecorationManagement() {\n return this.DecorationManagement;\n }\n // ## ## ####### ######## ######## ##\n // ### ### ## ## ## ## ## ##\n // #### #### ## ## ## ## ## ##\n // ## ### ## ## ## ## ## ###### ##\n // ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## ##\n // ## ## ####### ######## ######## ########\n /**\n * Returns the Minimap for which this MinimapElement was created.\n *\n * @returns {Minimap} This element's Minimap\n */ getModel() {\n return this.minimap;\n }\n /**\n * Defines the Minimap model for this MinimapElement instance.\n *\n * @param {Minimap} minimap The Minimap model for this instance.\n * @returns {Minimap} This element's Minimap\n */ setModel(minimap) {\n this.minimap = minimap;\n // set minimapElement for Minimap\n this.minimap.minimapElement = this;\n this.DecorationManagement.initializeDecorations(this.minimap);\n this.subscriptions.add(this.minimap.onDidChangeScrollTop(()=>{\n this.requestUpdate();\n }), this.minimap.onDidChangeScrollLeft(()=>{\n this.requestUpdate();\n }), this.minimap.onDidDestroy(()=>{\n this.destroy();\n }), this.minimap.onDidChangeConfig(()=>{\n if (this.attached) return this.requestForcedUpdate();\n }), this.minimap.onDidChangeStandAlone(()=>{\n this.setStandAlone(this.minimap.isStandAlone());\n this.requestUpdate();\n }), this.minimap.onDidChange((change)=>{\n this.pendingChanges.push(change);\n this.requestUpdate();\n }), this.DecorationManagement.onDidChangeDecorationRange((change)=>{\n const { type: type } = change;\n if (type === \"line\" || type === \"highlight-under\" || type === \"background-custom\") this.pendingBackDecorationChanges.push(change);\n else this.pendingFrontDecorationChanges.push(change);\n this.requestUpdate();\n }), $23c406735d46bb37$export$4f0668f248b15f12(()=>{\n this.requestForcedUpdate();\n }));\n this.setStandAlone(this.minimap.isStandAlone());\n if (this.width != null && this.height != null) this.minimap.setScreenHeightAndWidth(this.height, this.width);\n return this.minimap;\n }\n /**\n * Sets the stand-alone mode for this MinimapElement.\n *\n * @param {boolean} standAlone The new mode for this MinimapElement\n */ setStandAlone(standAlone) {\n this.standAlone = standAlone;\n if (this.standAlone) {\n this.setAttribute(\"stand-alone\", true);\n this.disposeScrollIndicator();\n this.disposeOpenQuickSettings();\n this.removeControls();\n this.removeVisibleArea();\n } else {\n this.removeAttribute(\"stand-alone\");\n this.createVisibleArea();\n this.createControls();\n if (this.minimapScrollIndicator) this.initializeScrollIndicator();\n if (this.displayPluginsControls) this.initializeOpenQuickSettings();\n }\n }\n // ## ## ######## ######## ### ######## ########\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ######## ## ## ## ## ## ######\n // ## ## ## ## ## ######### ## ##\n // ## ## ## ## ## ## ## ## ##\n // ####### ## ######## ## ## ## ########\n /** Requests an update to be performed on the next frame. */ requestUpdate() {\n if (this.frameRequested) return;\n this.frameRequested = true;\n requestAnimationFrame(()=>{\n this.update();\n this.frameRequested = false;\n });\n }\n /** Requests an update to be performed on the next frame that will completely redraw the minimap. */ requestForcedUpdate() {\n this.offscreenFirstRow = null;\n this.offscreenLastRow = null;\n this.requestUpdate();\n }\n /**\n * Performs the actual MinimapElement update.\n *\n * @access private\n */ update() {\n if (!(this.attached && this.isVisible() && this.minimap)) return;\n const minimap = this.minimap;\n minimap.enableCache();\n const canvas = this.getFrontCanvas();\n const devicePixelRatio = this.minimap.getDevicePixelRatio();\n const visibleAreaLeft = minimap.getTextEditorScaledScrollLeft();\n const visibleAreaTop = minimap.getTextEditorScaledScrollTop() - minimap.getScrollTop();\n const width = Math.min(canvas.width / devicePixelRatio, this.width);\n const visibleWidth = width + visibleAreaLeft;\n if (this.adjustToSoftWrap && this.flexBasis) {\n this.style.flexBasis = `${this.flexBasis}px`;\n this.style.width = `${this.flexBasis}px`;\n } else {\n this.style.flexBasis = null;\n this.style.width = null;\n }\n if ($fcbed2d4b7084ed8$var$SPEC_MODE) $fcbed2d4b7084ed8$var$applyStyles(this.visibleArea, {\n width: `${Math.round(visibleWidth)}px`,\n height: `${Math.round(minimap.getTextEditorScaledHeight())}px`,\n top: `${Math.round(visibleAreaTop)}px`,\n \"border-left-width\": `${Math.round(visibleAreaLeft)}px`\n });\n else $fcbed2d4b7084ed8$var$applyStyles(this.visibleArea, {\n width: `${Math.round(visibleWidth)}px`,\n height: `${Math.round(minimap.getTextEditorScaledHeight())}px`,\n transform: $fcbed2d4b7084ed8$var$makeTranslate(0, visibleAreaTop, this.useHardwareAcceleration),\n \"border-left-width\": `${Math.round(visibleAreaLeft)}px`\n });\n $fcbed2d4b7084ed8$var$applyStyles(this.controls, {\n width: `${Math.round(width)}px`\n });\n const canvasTop = minimap.getFirstVisibleScreenRow() * minimap.getLineHeight() - minimap.getScrollTop();\n if (this.smoothScrolling) {\n if ($fcbed2d4b7084ed8$var$SPEC_MODE) {\n $fcbed2d4b7084ed8$var$applyStyles(this.backLayer.canvas, {\n top: `${canvasTop}px`\n });\n $fcbed2d4b7084ed8$var$applyStyles(this.tokensLayer.canvas, {\n top: `${canvasTop}px`\n });\n $fcbed2d4b7084ed8$var$applyStyles(this.frontLayer.canvas, {\n top: `${canvasTop}px`\n });\n } else {\n let canvasTransform = $fcbed2d4b7084ed8$var$makeTranslate(0, canvasTop, this.useHardwareAcceleration);\n if (devicePixelRatio !== 1) {\n const scale = 1 / devicePixelRatio;\n canvasTransform += ` ${$fcbed2d4b7084ed8$var$makeScale(scale, scale, this.useHardwareAcceleration)}`;\n }\n $fcbed2d4b7084ed8$var$applyStyles(this.backLayer.canvas, {\n transform: canvasTransform\n });\n $fcbed2d4b7084ed8$var$applyStyles(this.tokensLayer.canvas, {\n transform: canvasTransform\n });\n $fcbed2d4b7084ed8$var$applyStyles(this.frontLayer.canvas, {\n transform: canvasTransform\n });\n }\n } else {\n const scale = 1 / devicePixelRatio;\n const canvasTransform = $fcbed2d4b7084ed8$var$makeScale(scale, scale, this.useHardwareAcceleration);\n $fcbed2d4b7084ed8$var$applyStyles(this.backLayer.canvas, {\n transform: canvasTransform\n });\n $fcbed2d4b7084ed8$var$applyStyles(this.tokensLayer.canvas, {\n transform: canvasTransform\n });\n $fcbed2d4b7084ed8$var$applyStyles(this.frontLayer.canvas, {\n transform: canvasTransform\n });\n }\n if (this.minimapScrollIndicator && !this.scrollIndicator && minimap.canScroll()) this.initializeScrollIndicator();\n if (this.scrollIndicator != null) {\n const minimapScreenHeight = minimap.getScreenHeight();\n const indicatorHeight = minimapScreenHeight * (minimapScreenHeight / minimap.getHeight());\n const indicatorScroll = (minimapScreenHeight - indicatorHeight) * minimap.getScrollRatio();\n if ($fcbed2d4b7084ed8$var$SPEC_MODE) $fcbed2d4b7084ed8$var$applyStyles(this.scrollIndicator, {\n height: `${indicatorHeight}px`,\n top: `${indicatorScroll}px`\n });\n else $fcbed2d4b7084ed8$var$applyStyles(this.scrollIndicator, {\n height: `${indicatorHeight}px`,\n transform: $fcbed2d4b7084ed8$var$makeTranslate(0, indicatorScroll, this.useHardwareAcceleration)\n });\n if (!minimap.canScroll()) this.disposeScrollIndicator();\n }\n if (this.absoluteMode && this.adjustAbsoluteModeHeight) this.updateCanvasesSize();\n this.updateCanvas();\n minimap.clearCache();\n }\n /**\n * Defines whether to render the code highlights or not.\n *\n * @param {Boolean} displayCodeHighlights Whether to render the code highlights or not\n */ setDisplayCodeHighlights(displayCodeHighlights) {\n this.displayCodeHighlights = displayCodeHighlights;\n if (this.attached) this.requestForcedUpdate();\n }\n /**\n * Polling callback used to detect visibility and size changes.\n *\n * @access private\n */ pollDOM() {\n const visibilityChanged = this.checkForVisibilityChange();\n if (this.isVisible()) {\n if (!this.wasVisible) this.requestForcedUpdate();\n this.measureHeightAndWidth(visibilityChanged, false);\n }\n }\n /**\n * A method that checks for visibility changes in the MinimapElement. The method returns `true` when the visibility\n * changed from visible to hidden or from hidden to visible.\n *\n * @returns {boolean} Whether the visibility changed or not since the last call\n * @access private\n */ checkForVisibilityChange() {\n if (this.isVisible()) {\n if (this.wasVisible) return false;\n else {\n this.wasVisible = true;\n return this.wasVisible;\n }\n } else if (this.wasVisible) {\n this.wasVisible = false;\n return true;\n } else {\n this.wasVisible = false;\n return this.wasVisible;\n }\n }\n /**\n * A method used to measure the size of the MinimapElement and update internal components based on the new size.\n *\n * @param {boolean} visibilityChanged Did the visibility changed since last measurement\n * @param {[type]} [forceUpdate=true] Forces the update even when no changes were detected. Default is `true`\n * @access private\n */ measureHeightAndWidth(visibilityChanged, forceUpdate = true) {\n if (!this.minimap) return;\n const safeFlexBasis = this.style.flexBasis;\n this.style.flexBasis = \"\";\n const wasResized = this.width !== this.clientWidth || this.height !== this.clientHeight;\n this.height = this.clientHeight;\n this.width = this.clientWidth;\n let canvasWidth = this.width;\n if (this.minimap != null) this.minimap.setScreenHeightAndWidth(this.height, this.width);\n if (wasResized || visibilityChanged || forceUpdate) this.requestForcedUpdate();\n if (!this.isVisible()) return;\n if (wasResized || forceUpdate) {\n if (this.adjustToSoftWrap) {\n const lineLength = atom.config.get(\"editor.preferredLineLength\");\n const softWrap = atom.config.get(\"editor.softWrap\");\n const softWrapAtPreferredLineLength = atom.config.get(\"editor.softWrapAtPreferredLineLength\");\n const width = lineLength * this.minimap.getCharWidth();\n if (softWrap && softWrapAtPreferredLineLength && lineLength && (width <= this.width || !this.adjustOnlyIfSmaller)) {\n this.flexBasis = width;\n canvasWidth = width;\n } else delete this.flexBasis;\n } else delete this.flexBasis;\n this.updateCanvasesSize(canvasWidth);\n } else this.style.flexBasis = safeFlexBasis;\n }\n updateCanvasesSize(canvasWidth) {\n const devicePixelRatio = this.minimap.getDevicePixelRatio();\n const maxCanvasHeight = this.height + this.minimap.getLineHeight();\n const newHeight = this.absoluteMode && this.adjustAbsoluteModeHeight ? Math.min(this.minimap.getHeight(), maxCanvasHeight) : maxCanvasHeight;\n const canvas = this.getFrontCanvas();\n if (canvasWidth == null) canvasWidth = canvas.width / devicePixelRatio;\n if (canvasWidth !== canvas.width || newHeight !== canvas.height) {\n this.setCanvasesSize(canvasWidth * devicePixelRatio, newHeight * devicePixelRatio);\n if (this.absoluteMode && this.adjustAbsoluteModeHeight) {\n this.offscreenFirstRow = null;\n this.offscreenLastRow = null;\n }\n }\n }\n // ######## ## ## ######## ## ## ######## ######\n // ## ## ## ## ### ## ## ## ##\n // ## ## ## ## #### ## ## ##\n // ###### ## ## ###### ## ## ## ## ######\n // ## ## ## ## ## #### ## ##\n // ## ## ## ## ## ### ## ## ##\n // ######## ### ######## ## ## ## ######\n /**\n * Callback triggered when the mouse is pressed on the MinimapElement canvas.\n *\n * @param {number} y The vertical coordinate of the event\n * @param {boolean} isLeftMouse Was the left mouse button pressed?\n * @param {boolean} isMiddleMouse Was the middle mouse button pressed?\n * @access private\n */ canvasPressed({ y: y, isLeftMouse: isLeftMouse, isMiddleMouse: isMiddleMouse }) {\n if (this.minimap.isStandAlone()) return;\n if (isLeftMouse) this.canvasLeftMousePressed(y);\n else if (isMiddleMouse) {\n this.canvasMiddleMousePressed(y);\n const { top: top, height: height } = this.visibleArea.getBoundingClientRect();\n this.startDrag({\n y: top + height / 2,\n isLeftMouse: false,\n isMiddleMouse: true\n });\n }\n }\n /**\n * Callback triggered when the mouse left button is pressed on the MinimapElement canvas.\n *\n * @param {MouseEvent} e The mouse event object\n * @param {number} e.pageY The mouse y position in page\n * @param {HTMLElement} e.target The source of the event\n * @access private\n */ canvasLeftMousePressed(y) {\n const deltaY = y - this.getBoundingClientRect().top;\n const row = Math.floor(deltaY / this.minimap.getLineHeight()) + this.minimap.getFirstVisibleScreenRow();\n const textEditor = this.minimap.getTextEditor();\n const textEditorElement = this.minimap.getTextEditorElement();\n const scrollTop = row * textEditor.getLineHeightInPixels() - this.minimap.getTextEditorHeight() / 2;\n const textEditorScrollTop = textEditorElement.pixelPositionForScreenPosition([\n row,\n 0\n ]).top - this.minimap.getTextEditorHeight() / 2;\n if (atom.config.get(\"minimap.moveCursorOnMinimapClick\")) textEditor.setCursorScreenPosition([\n row,\n 0\n ]);\n if (atom.config.get(\"minimap.scrollAnimation\")) {\n const duration = atom.config.get(\"minimap.scrollAnimationDuration\");\n const independentScroll = this.minimap.scrollIndependentlyOnMouseWheel();\n const from = this.minimap.getTextEditorScrollTop();\n const to = textEditorScrollTop;\n let step;\n if (independentScroll) {\n const minimapFrom = this.minimap.getScrollTop();\n const minimapTo = Math.min(1, scrollTop / (this.minimap.getTextEditorMaxScrollTop() || 1)) * this.minimap.getMaxScrollTop();\n step = (now, t)=>{\n if (this.minimap === null) return;\n // TODO why this happens in the tests?\n this.minimap.setTextEditorScrollTop(now, true);\n this.minimap.setScrollTop(minimapFrom + (minimapTo - minimapFrom) * t);\n };\n $fcbed2d4b7084ed8$var$animate({\n from: from,\n to: to,\n duration: duration,\n step: step\n });\n } else {\n step = (now)=>{\n if (this.minimap === null) return;\n // TODO why this happens in the tests?\n this.minimap.setTextEditorScrollTop(now);\n };\n $fcbed2d4b7084ed8$var$animate({\n from: from,\n to: to,\n duration: duration,\n step: step\n });\n }\n } else this.minimap.setTextEditorScrollTop(textEditorScrollTop);\n }\n /**\n * Callback triggered when the mouse middle button is pressed on the MinimapElement canvas.\n *\n * @param {MouseEvent} e The mouse event object\n * @param {number} e.pageY The mouse y position in page\n * @access private\n */ canvasMiddleMousePressed(y) {\n const { top: offsetTop } = this.getBoundingClientRect();\n const deltaY = y - offsetTop - this.minimap.getTextEditorScaledHeight() / 2;\n const ratio = deltaY / (this.minimap.getVisibleHeight() - this.minimap.getTextEditorScaledHeight());\n this.minimap.setTextEditorScrollTop(ratio * this.minimap.getTextEditorMaxScrollTop());\n }\n /**\n * Subscribes to a media query for device pixel ratio changes and forces a repaint when it occurs.\n *\n * @returns {Disposable} A disposable to remove the media query listener\n * @access private\n */ subscribeToMediaQuery() {\n const mediaQuery = window.matchMedia(\"screen and (-webkit-min-device-pixel-ratio: 1.5)\");\n const mediaListener = ()=>{\n this.requestForcedUpdate();\n };\n mediaQuery.addEventListener(\"change\", mediaListener);\n return new (0, $2INr1$atom.Disposable)(()=>{\n mediaQuery.removeEventListener(\"change\", mediaListener);\n });\n }\n // ######## #### ########\n // ## ## ## ## ## ##\n // ## ## #### ## ##\n // ## ## #### ## ##\n // ## ## ## ## ## ## ##\n // ## ## ## ## ## ##\n // ######## #### ## ########\n /**\n * A method triggered when the mouse is pressed over the visible area that starts the dragging gesture.\n *\n * @param {number} y The vertical coordinate of the event\n * @param {boolean} isLeftMouse Was the left mouse button pressed?\n * @param {boolean} isMiddleMouse Was the middle mouse button pressed?\n * @access private\n */ startDrag({ y: y, isLeftMouse: isLeftMouse, isMiddleMouse: isMiddleMouse }) {\n if (!this.minimap) return;\n if (!isLeftMouse && !isMiddleMouse) return;\n const initial = {\n dragOffset: y - this.visibleArea.getBoundingClientRect().top,\n offsetTop: this.getBoundingClientRect().top\n };\n // TODO can we avoid adding and removing the listeners every time?\n const mousemoveHandler = (e)=>this.drag($fcbed2d4b7084ed8$var$extractMouseEventData(e), initial);\n const dragendHandler = ()=>this.endDrag();\n const touchmoveHandler = (e)=>this.drag($fcbed2d4b7084ed8$var$extractTouchEventData(e), initial);\n document.body.addEventListener(\"mousemove\", mousemoveHandler, {\n passive: true\n });\n document.body.addEventListener(\"mouseup\", dragendHandler, {\n passive: true\n });\n document.body.addEventListener(\"mouseleave\", dragendHandler, {\n passive: true\n });\n document.body.addEventListener(\"touchmove\", touchmoveHandler, {\n passive: true\n });\n document.body.addEventListener(\"touchend\", dragendHandler, {\n passive: true\n });\n document.body.addEventListener(\"touchcancel\", dragendHandler, {\n passive: true\n });\n this.dragSubscription = new (0, $2INr1$atom.Disposable)(function() {\n document.body.removeEventListener(\"mousemove\", mousemoveHandler);\n document.body.removeEventListener(\"mouseup\", dragendHandler);\n document.body.removeEventListener(\"mouseleave\", dragendHandler);\n document.body.removeEventListener(\"touchmove\", touchmoveHandler);\n document.body.removeEventListener(\"touchend\", dragendHandler);\n document.body.removeEventListener(\"touchcancel\", dragendHandler);\n });\n }\n /**\n * The method called during the drag gesture.\n *\n * @param {number} y The vertical coordinate of the event\n * @param {boolean} isLeftMouse Was the left mouse button pressed?\n * @param {boolean} isMiddleMouse Was the middle mouse button pressed?\n * @param {number} initial.dragOffset The mouse offset within the visible area\n * @param {number} initial.offsetTop The MinimapElement offset at the moment of the drag start\n * @access private\n */ drag({ y: y, isLeftMouse: isLeftMouse, isMiddleMouse: isMiddleMouse }, initial) {\n if (!this.minimap) return;\n if (!isLeftMouse && !isMiddleMouse) return;\n const deltaY = y - initial.offsetTop - initial.dragOffset;\n const ratio = deltaY / (this.minimap.getVisibleHeight() - this.minimap.getTextEditorScaledHeight());\n this.minimap.setTextEditorScrollTop(ratio * this.minimap.getTextEditorMaxScrollTop());\n }\n /**\n * The method that ends the drag gesture.\n *\n * @access private\n */ endDrag() {\n if (!this.minimap) return;\n this.dragSubscription.dispose();\n }\n}\n$fcbed2d4b7084ed8$var$MinimapElement.initClass();\nfunction $fcbed2d4b7084ed8$export$aa3fab546e9e7454() {\n const element = document.createElement($fcbed2d4b7084ed8$var$TAG_NAME);\n element.createdCallback();\n return element;\n}\n// ######## ## ## ######## ## ## ######## ######\n// ## ## ## ## ### ## ## ## ##\n// ## ## ## ## #### ## ## ##\n// ###### ## ## ###### ## ## ## ## ######\n// ## ## ## ## ## #### ## ##\n// ## ## ## ## ## ### ## ## ##\n// ######## ### ######## ## ## ## ######\n/**\n * A method that extracts data from a `MouseEvent` which can then be used to process clicks and drags of the minimap.\n *\n * Used together with `extractTouchEventData` to provide a unified interface for `MouseEvent`s and `TouchEvent`s.\n *\n * @param {MouseEvent} mouseEvent The mouse event object\n * @access private\n */ function $fcbed2d4b7084ed8$var$extractMouseEventData(mouseEvent) {\n return {\n x: mouseEvent.pageX,\n y: mouseEvent.pageY,\n isLeftMouse: mouseEvent.button === 0,\n isMiddleMouse: mouseEvent.button === 1\n };\n}\n/**\n * A method that extracts data from a `TouchEvent` which can then be used to process clicks and drags of the minimap.\n *\n * Used together with `extractMouseEventData` to provide a unified interface for `MouseEvent`s and `TouchEvent`s.\n *\n * @param {TouchEvent} touchEvent The touch event object\n * @access private\n */ function $fcbed2d4b7084ed8$var$extractTouchEventData(touchEvent) {\n // Use the first touch on the target area. Other touches will be ignored in\n // case of multi-touch.\n const touch = touchEvent.changedTouches[0];\n return {\n x: touch.pageX,\n y: touch.pageY,\n isLeftMouse: true,\n isMiddleMouse: false\n };\n}\n// ###### ###### ######\n// ## ## ## ## ## ##\n// ## ## ##\n// ## ###### ######\n// ## ## ##\n// ## ## ## ## ## ##\n// ###### ###### ######\n/**\n * Applies the passed-in styles properties to the specified element\n *\n * @param {HTMLElement} element The element onto which apply the styles\n * @param {Object} styles The styles to apply\n * @access private\n */ function $fcbed2d4b7084ed8$var$applyStyles(element, styles) {\n if (!element) return;\n let cssText = \"\";\n for(const property in styles)cssText += `${property}: ${styles[property]}; `;\n element.style.cssText = cssText;\n}\n/**\n * Returns a string with a CSS translation tranform value.\n *\n * @param {number} [x=0] The x offset of the translation. Default is `0`\n * @param {number} [y=0] The y offset of the translation. Default is `0`\n * @param {boolean} [useHardwareAcceleration=false] Use hardware acceleration. Default is `false`\n * @returns {string} The CSS translation string\n * @access private\n */ function $fcbed2d4b7084ed8$var$makeTranslate(x = 0, y = 0, useHardwareAcceleration = false) {\n if (useHardwareAcceleration) return `translate3d(${x}px, ${y}px, 0)`;\n else return `translate(${x}px, ${y}px)`;\n}\n/**\n * Returns a string with a CSS scaling tranform value.\n *\n * @param {number} [x=0] The x scaling factor. Default is `0`\n * @param {number} [y=0] The y scaling factor. Default is `0`\n * @param {boolean} [useHardwareAcceleration=false] Use hardware acceleration. Default is `false`\n * @returns {string} The CSS scaling string\n * @access private\n */ function $fcbed2d4b7084ed8$var$makeScale(x = 0, y = x, useHardwareAcceleration = false) {\n if (useHardwareAcceleration) return `scale3d(${x}, ${y}, 1)`;\n else return `scale(${x}, ${y})`;\n}\n/**\n * A method that mimic the jQuery `animate` method and used to animate the scroll when clicking on the MinimapElement canvas.\n *\n * @param {Object} param The animation data object\n * @param {[type]} param.from The start value\n * @param {[type]} param.to The end value\n * @param {[type]} param.duration The animation duration\n * @param {[type]} param.step The easing function for the animation\n * @access private\n */ function $fcbed2d4b7084ed8$var$animate({ from: from, to: to, duration: duration, step: step }) {\n const start = $fcbed2d4b7084ed8$var$getTime();\n let progress;\n const update = ()=>{\n const passed = $fcbed2d4b7084ed8$var$getTime() - start;\n if (duration === 0) progress = 1;\n else progress = passed / duration;\n if (progress > 1) progress = 1;\n const delta = $fcbed2d4b7084ed8$var$swing(progress);\n const value = from + (to - from) * delta;\n step(value, delta);\n if (progress < 1) requestAnimationFrame(update);\n };\n update();\n}\nfunction $fcbed2d4b7084ed8$var$swing(progress) {\n return 0.5 - Math.cos(progress * Math.PI) / 2;\n}\n/**\n * A method that return the current time as a Date.\n *\n * That method exist so that we can mock it in tests.\n *\n * @returns {Date} The current time as Date\n * @access private\n */ function $fcbed2d4b7084ed8$var$getTime() {\n return new Date();\n}\n\n\n\n\n\"use strict\";\nclass $82126bfc16059e0c$export$2e2bcd8739ae039 {\n constructor(textEditor){\n this.textEditor = textEditor;\n this.textEditorElement = atom.views.getView(this.textEditor);\n }\n enableCache() {\n this.useCache = true;\n }\n clearCache() {\n this.useCache = false;\n delete this.heightCache;\n delete this.scrollTopCache;\n delete this.scrollLeftCache;\n delete this.maxScrollTopCache;\n }\n onDidChangeScrollTop(callback) {\n return this.textEditorElement.onDidChangeScrollTop(callback);\n }\n onDidChangeScrollLeft(callback) {\n return this.textEditorElement.onDidChangeScrollLeft(callback);\n }\n getHeight() {\n if (this.editorDestroyed()) return 0;\n if (this.useCache) {\n if (!this.heightCache) this.heightCache = this.textEditorElement.getHeight();\n return this.heightCache;\n }\n return this.textEditorElement.getHeight();\n }\n getScrollTop() {\n if (this.editorDestroyed()) return 0;\n if (this.useCache) {\n if (!this.scrollTopCache) this.scrollTopCache = this.computeScrollTop();\n return this.scrollTopCache;\n }\n return this.computeScrollTop();\n }\n computeScrollTop() {\n if (this.editorDestroyed()) return 0;\n const scrollTop = this.textEditorElement.getScrollTop();\n const lineHeight = this.textEditor.getLineHeightInPixels();\n let firstRow = this.textEditorElement.getFirstVisibleScreenRow();\n if (Number.isNaN(firstRow)) // Guard against their being no visible screen row\n return 0;\n let lineTop = this.textEditorElement.pixelPositionForScreenPosition([\n firstRow,\n 0\n ]).top;\n if (lineTop > scrollTop) {\n firstRow -= 1;\n lineTop = this.textEditorElement.pixelPositionForScreenPosition([\n firstRow,\n 0\n ]).top;\n }\n const lineY = firstRow * lineHeight;\n const offset = Math.min(scrollTop - lineTop, lineHeight);\n return lineY + offset;\n }\n setScrollTop(scrollTop) {\n if (this.editorDestroyed()) return;\n this.textEditorElement.setScrollTop(scrollTop);\n }\n getScrollLeft() {\n if (this.editorDestroyed()) return 0;\n if (this.useCache) {\n if (!this.scrollLeftCache) this.scrollLeftCache = this.textEditorElement.getScrollLeft();\n return this.scrollLeftCache;\n }\n return this.textEditorElement.getScrollLeft();\n }\n getMaxScrollTop() {\n if (this.editorDestroyed()) return 0;\n if (this.maxScrollTopCache != null && this.useCache) return this.maxScrollTopCache;\n let maxScrollTop;\n if (this.textEditorElement.getMaxScrollTop) {\n maxScrollTop = this.textEditorElement.getMaxScrollTop();\n if (parseFloat(atom.getVersion()) >= 1.13) {\n if (this.scrollPastEnd) {\n const lineHeight = this.textEditor.getLineHeightInPixels();\n maxScrollTop -= this.getHeight() - 3 * lineHeight;\n }\n }\n } else {\n maxScrollTop = this.textEditorElement.getScrollHeight() - this.getHeight();\n if (this.scrollPastEnd) {\n const lineHeight = this.textEditor.getLineHeightInPixels();\n maxScrollTop -= this.getHeight() - 3 * lineHeight;\n }\n }\n if (this.useCache) this.maxScrollTopCache = maxScrollTop;\n return maxScrollTop;\n }\n editorDestroyed() {\n return !this.textEditor || this.textEditor.isDestroyed() || !this.textEditorElement.component || !this.textEditorElement.getModel() || !this.textEditorElement.parentNode;\n }\n}\n\n\n\n\"use strict\";\nlet $148b4ac34d9435d4$var$nextModelId = 1;\n// returned in the decorations API when minimap is destoryed\nconst $148b4ac34d9435d4$var$disposedDisposable = new (0, $2INr1$atom.Disposable)();\n$148b4ac34d9435d4$var$disposedDisposable.dispose();\nconst $148b4ac34d9435d4$var$markerMock = {\n onDidDestroy: ()=>$148b4ac34d9435d4$var$disposedDisposable,\n getScreenRange: ()=>new Range()\n};\nconst $148b4ac34d9435d4$var$dummyDecoration = new (0, $9cc35ac360344988$export$2e2bcd8739ae039)($148b4ac34d9435d4$var$markerMock, null, {});\nclass $148b4ac34d9435d4$export$2e2bcd8739ae039 {\n /**\n * Creates a new Minimap instance for the given `TextEditor`.\n *\n * @param {Object} options An object with the new Minimap properties\n * @param {TextEditor} options.textEditor The target text editor for the minimap\n * @param {boolean} [options.standAlone] Whether this minimap is in stand-alone mode or not\n * @param {number} [options.width] The minimap width in pixels\n * @param {number} [options.height] The minimap height in pixels\n * @throws {Error} Cannot create a minimap without an editor\n */ constructor(options = {}){\n if (!options.textEditor) throw new Error(\"Cannot create a minimap without an editor\");\n /**\n * The Minimap's minimapElement.\n *\n * @type {MinimapElement}\n * @access private\n */ this.minimapElement = undefined;\n // local cache of this.minimapElement.DecorationManagement\n this.DecorationManagement = undefined;\n /**\n * The Minimap's text editor.\n *\n * @type {TextEditor}\n * @access private\n */ this.textEditor = options.textEditor;\n /**\n * The Minimap's text editor element.\n *\n * @access private\n */ this.editorElement = undefined;\n /**\n * The stand-alone state of the current Minimap.\n *\n * @type {boolean}\n * @access private\n */ this.standAlone = options.standAlone;\n /**\n * The width of the current Minimap.\n *\n * @type {number}\n * @access private\n */ this.width = options.width;\n /**\n * The height of the current Minimap.\n *\n * @type {number}\n * @access private\n */ this.height = options.height;\n /**\n * The id of the current Minimap.\n *\n * @type {Number}\n * @access private\n */ this.id = $148b4ac34d9435d4$var$nextModelId++;\n /**\n * The events emitter of the current Minimap.\n *\n * @type {Emitter}\n * @access private\n */ this.emitter = new (0, $2INr1$atom.Emitter)();\n /**\n * The Minimap's subscriptions.\n *\n * @type {CompositeDisposable}\n * @access private\n */ this.subscriptions = new (0, $2INr1$atom.CompositeDisposable)();\n /**\n * The adapter object leverage the access to several properties from the `TextEditor`/`TextEditorElement` to support\n * the different APIs between different version of Atom.\n *\n * @type {Object}\n * @access private\n */ this.adapter = null;\n /**\n * The char height of the current Minimap, will be `undefined` unless `setCharWidth` is called.\n *\n * @type {number}\n * @access private\n */ this.charHeight = null;\n /**\n * The char height from the package's configuration. Will be overriden by the instance value.\n *\n * @type {number}\n * @access private\n */ this.configCharHeight = null;\n /**\n * The char width of the current Minimap, will be `undefined` unless `setCharWidth` is called.\n *\n * @type {number}\n * @access private\n */ this.charWidth = null;\n /**\n * The char width from the package's configuration. Will be overriden by the instance value.\n *\n * @type {number}\n * @access private\n */ this.configCharWidth = null;\n /**\n * The interline of the current Minimap, will be `undefined` unless `setCharWidth` is called.\n *\n * @type {number}\n * @access private\n */ this.interline = null;\n /**\n * The interline from the package's configuration. Will be overriden by the instance value.\n *\n * @type {number}\n * @access private\n */ this.configInterline = null;\n /**\n * The devicePixelRatioRounding of the current Minimap, will be `undefined` unless `setDevicePixelRatioRounding` is called.\n *\n * @type {boolean}\n * @access private\n */ this.devicePixelRatioRounding = null;\n /**\n * The devicePixelRatioRounding from the package's configuration. Will be overriden by the instance value.\n *\n * @type {boolean}\n * @access private\n */ this.configDevicePixelRatioRounding = null;\n /**\n * A number of milliseconds which determines how often the minimap should redraw itself after detecting changes in\n * the text editor. A value of 0 will cause the minimap to redraw immediately.\n *\n * @type {number}\n * @access private\n */ this.redrawDelay = 0;\n /**\n * A boolean value to store whether this Minimap have been destroyed or not.\n *\n * @type {boolean}\n * @access private\n */ this.destroyed = false;\n /**\n * A boolean value to store whether the `scrollPastEnd` setting is enabled or not.\n *\n * @type {boolean}\n * @access private\n */ this.scrollPastEnd = false;\n /**\n * An array of changes registered with textEditor.onDidChange() which have not yet been handled\n *\n * @type {Array}\n * @access private\n */ this.pendingChangeEvents = [];\n /**\n * Timer reference which, once fired, will flush all the pending changes stored in this.pendingChangeEvents array.\n *\n * @type {Timer | null}\n * @access private\n */ this.flushChangesTimer = null;\n if (atom.views.getView(this.textEditor).getScrollTop != null) this.adapter = new (0, $82126bfc16059e0c$export$2e2bcd8739ae039)(this.textEditor);\n /**\n * When in stand-alone or independent scrolling mode, this value can be used instead of the computed scroll.\n *\n * @type {number}\n * @access private\n */ this.scrollTop = 0;\n let configSubscription = this.subscribeToConfig();\n this.subscriptions.add(configSubscription, this.textEditor.onDidChangeGrammar(()=>{\n this.subscriptions.remove(configSubscription);\n configSubscription.dispose();\n configSubscription = this.subscribeToConfig();\n this.subscriptions.add(configSubscription);\n }), this.adapter.onDidChangeScrollTop(()=>{\n if (!this.standAlone && !this.ignoreTextEditorScroll && !this.inChangeScrollTop) {\n this.inChangeScrollTop = true;\n this.updateScrollTop();\n this.emitter.emit(\"did-change-scroll-top\", this);\n this.inChangeScrollTop = false;\n }\n if (this.ignoreTextEditorScroll) this.ignoreTextEditorScroll = false;\n }), this.adapter.onDidChangeScrollLeft(()=>{\n if (!this.standAlone) this.emitter.emit(\"did-change-scroll-left\", this);\n }), this.textEditor.onDidChange((changes)=>{\n this.scheduleChanges(changes);\n }), this.textEditor.onDidDestroy(()=>{\n if (0, $23c406735d46bb37$export$3542142cf713a624) (0, $23c406735d46bb37$export$3542142cf713a624).delete(this.textEditor);\n this.destroy();\n }), /*\n FIXME Some changes occuring during the tokenization produces\n ranges that deceive the canvas rendering by making some\n lines at the end of the buffer intact while they are in fact not,\n resulting in extra lines appearing at the end of the minimap.\n Forcing a whole repaint to fix that bug is suboptimal but works.\n */ this.textEditor.onDidTokenize(()=>{\n this.emitter.emit(\"did-change-config\");\n }));\n }\n /** Destroys the model. */ destroy() {\n if (this.destroyed) return;\n clearTimeout(this.flushChangesTimer);\n this.pendingChangeEvents = [];\n this.subscriptions.dispose();\n this.emitter.emit(\"did-destroy\");\n this.emitter.dispose();\n this.destroyed = true;\n }\n /**\n * Returns `true` when this `Minimap` has benn destroyed.\n *\n * @returns {boolean} Whether this Minimap has been destroyed or not\n */ isDestroyed() {\n return this.destroyed;\n }\n /**\n * Schedule changes from textEditor.onDidChange() to be handled at a later time\n *\n * @param {Array} changes The changes to be scheduled\n * @returns Void\n * @access private\n */ scheduleChanges(changes) {\n this.pendingChangeEvents = this.pendingChangeEvents.concat(changes);\n // Optimisation: If the redraw delay is set to 0, do not even schedule a timer\n if (!this.redrawDelay) this.requestFlushChanges();\n if (!this.flushChangesTimer) // If any changes happened within the timeout's delay, a timeout will already have been\n // scheduled -> no need to schedule again\n this.flushChangesTimer = setTimeout(()=>{\n this.requestFlushChanges();\n }, this.redrawDelay);\n }\n /**\n * Flush all changes which have been scheduled for later processing by this.scheduleChanges()\n *\n * @returns Void\n * @access private\n */ flushChanges() {\n clearTimeout(this.flushChangesTimer);\n this.flushChangesTimer = null;\n this.emitChanges(this.pendingChangeEvents);\n this.pendingChangeEvents = [];\n }\n /**\n * Requests flush changes if not already requested\n *\n * @returns Void\n * @access private\n */ requestFlushChanges() {\n if (!this.requestedFlushChanges) this.requestedFlushChanges = requestAnimationFrame(()=>{\n this.flushChanges();\n if (this.requestedFlushChanges) {\n cancelAnimationFrame(this.requestedFlushChanges);\n this.requestedFlushChanges = null;\n }\n });\n }\n /**\n * Registers an event listener to the `did-change` event.\n *\n * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be\n * called with an event object with the following properties:\n *\n * - Start: The change's start row number\n * - End: The change's end row number\n * - ScreenDelta: the delta in buffer rows between the versions before and after the change\n *\n * @returns {Disposable} A disposable to stop listening to the event\n */ onDidChange(callback) {\n return this.emitter.on(\"did-change\", callback);\n }\n /**\n * Registers an event listener to the `did-change-config` event.\n *\n * @param {function():void} callback A function to call when the event is triggered.\n * @returns {Disposable} A disposable to stop listening to the event\n */ onDidChangeConfig(callback) {\n return this.emitter.on(\"did-change-config\", callback);\n }\n /**\n * Registers an event listener to the `did-change-scroll-top` event.\n *\n * The event is dispatched when the text editor `scrollTop` value have been changed or when the minimap scroll top\n * have been changed in stand-alone mode.\n *\n * @param {function(minimap:Minimap):void} callback A function to call when the event is triggered. The current\n * Minimap is passed as argument to the callback.\n * @returns {Disposable} A disposable to stop listening to the event\n */ onDidChangeScrollTop(callback) {\n return this.emitter.on(\"did-change-scroll-top\", callback);\n }\n /**\n * Registers an event listener to the `did-change-scroll-left` event.\n *\n * @param {function(minimap:Minimap):void} callback A function to call when the event is triggered. The current\n * Minimap is passed as argument to the callback.\n * @returns {Disposable} A disposable to stop listening to the event\n */ onDidChangeScrollLeft(callback) {\n return this.emitter.on(\"did-change-scroll-left\", callback);\n }\n /**\n * Registers an event listener to the `did-change-stand-alone` event.\n *\n * This event is dispatched when the stand-alone of the current Minimap is either enabled or disabled.\n *\n * @param {function(minimap:Minimap):void} callback A function to call when the event is triggered. The current\n * Minimap is passed as argument to the callback.\n * @returns {Disposable} A disposable to stop listening to the event\n */ onDidChangeStandAlone(callback) {\n return this.emitter.on(\"did-change-stand-alone\", callback);\n }\n /**\n * Registers an event listener to the `did-destroy` event.\n *\n * This event is dispatched when this Minimap have been destroyed. It can occurs either because the {@link destroy}\n * method have been called on the Minimap or because the target text editor have been destroyed.\n *\n * @param {function():void} callback A function to call when the event is triggered.\n * @returns {Disposable} A disposable to stop listening to the event\n */ onDidDestroy(callback) {\n return this.emitter.on(\"did-destroy\", callback);\n }\n /**\n * Registers to the config changes for the current editor scope.\n *\n * @returns {Disposable} The disposable to dispose all the registered events\n * @access private\n */ subscribeToConfig() {\n const subs = new (0, $2INr1$atom.CompositeDisposable)();\n const opts = {\n scope: this.textEditor.getRootScopeDescriptor()\n };\n subs.add(atom.config.observe(\"editor.scrollPastEnd\", opts, (scrollPastEnd)=>{\n this.scrollPastEnd = scrollPastEnd;\n this.adapter.scrollPastEnd = this.scrollPastEnd;\n this.emitter.emit(\"did-change-config\");\n }), atom.config.observe(\"minimap.charHeight\", opts, (configCharHeight)=>{\n this.configCharHeight = configCharHeight;\n this.updateScrollTop();\n this.emitter.emit(\"did-change-config\");\n }), atom.config.observe(\"minimap.charWidth\", opts, (configCharWidth)=>{\n this.configCharWidth = configCharWidth;\n this.updateScrollTop();\n this.emitter.emit(\"did-change-config\");\n }), atom.config.observe(\"minimap.interline\", opts, (configInterline)=>{\n this.configInterline = configInterline;\n this.updateScrollTop();\n this.emitter.emit(\"did-change-config\");\n }), atom.config.observe(\"minimap.independentMinimapScroll\", opts, (independentMinimapScroll)=>{\n this.independentMinimapScroll = independentMinimapScroll;\n this.updateScrollTop();\n }), atom.config.observe(\"minimap.scrollSensitivity\", opts, (scrollSensitivity)=>{\n this.scrollSensitivity = scrollSensitivity;\n }), atom.config.observe(\"minimap.redrawDelay\", opts, (redrawDelay)=>{\n this.redrawDelay = redrawDelay;\n }), // cdprr is shorthand for configDevicePixelRatioRounding\n atom.config.observe(\"minimap.devicePixelRatioRounding\", opts, (cdprr)=>{\n this.configDevicePixelRatioRounding = cdprr;\n this.updateScrollTop();\n this.emitter.emit(\"did-change-config\");\n }));\n return subs;\n }\n /**\n * Returns `true` when the current Minimap is a stand-alone minimap.\n *\n * @returns {boolean} Whether this Minimap is in stand-alone mode or not.\n */ isStandAlone() {\n return this.standAlone;\n }\n /**\n * Sets the stand-alone mode for this minimap.\n *\n * @fires {did-change-stand-alone} if The stand-alone mode have been toggled on or off by the call\n * @param {boolean} standAlone The new state of the stand-alone mode for this Minimap\n */ setStandAlone(standAlone) {\n if (standAlone !== this.standAlone) {\n this.standAlone = standAlone;\n this.emitter.emit(\"did-change-stand-alone\", this);\n }\n }\n /** @returns {MinimapElement} Returns the current minimapElement */ getMinimapElement() {\n return this.minimapElement;\n }\n /**\n * Returns the `TextEditor` that this minimap represents.\n *\n * @returns {TextEditor} This Minimap's text editor\n */ getTextEditor() {\n return this.textEditor;\n }\n /**\n * Returns the `TextEditorElement` for the Minimap's `TextEditor`.\n *\n * @returns {TextEditorElement} The minimap's text editor element\n */ getTextEditorElement() {\n if (this.editorElement) return this.editorElement;\n this.editorElement = atom.views.getView(this.getTextEditor());\n return this.editorElement;\n }\n /**\n * Returns the height of the `TextEditor` at the Minimap scale.\n *\n * @returns {number} The scaled height of the text editor\n */ getTextEditorScaledHeight() {\n return this.adapter.getHeight() * this.getVerticalScaleFactor();\n }\n /**\n * Returns the `TextEditor` scroll top value at the Minimap scale.\n *\n * @returns {number} The scaled scroll top of the text editor\n */ getTextEditorScaledScrollTop() {\n return this.adapter.getScrollTop() * this.getVerticalScaleFactor();\n }\n /**\n * Returns the `TextEditor` scroll left value at the Minimap scale.\n *\n * @returns {number} The scaled scroll left of the text editor\n */ getTextEditorScaledScrollLeft() {\n return this.adapter.getScrollLeft() * this.getHorizontalScaleFactor();\n }\n /**\n * Returns the `TextEditor` maximum scroll top value.\n *\n * When the `scrollPastEnd` setting is enabled, the method compensate the extra scroll by removing the same height as\n * added by the editor from the final value.\n *\n * @returns {number} The maximum scroll top of the text editor\n */ getTextEditorMaxScrollTop() {\n return this.adapter.getMaxScrollTop();\n }\n /**\n * Returns the `TextEditor` scroll top value.\n *\n * @returns {number} The scroll top of the text editor\n */ getTextEditorScrollTop() {\n return this.adapter.getScrollTop();\n }\n /**\n * Sets the scroll top of the `TextEditor`.\n *\n * @param {number} scrollTop The new scroll top value\n */ setTextEditorScrollTop(scrollTop, ignoreTextEditorScroll = false) {\n this.ignoreTextEditorScroll = ignoreTextEditorScroll;\n this.adapter.setScrollTop(scrollTop);\n }\n /**\n * Returns the `TextEditor` scroll left value.\n *\n * @returns {number} The scroll left of the text editor\n */ getTextEditorScrollLeft() {\n return this.adapter.getScrollLeft();\n }\n /**\n * Returns the height of the `TextEditor`.\n *\n * @returns {number} The height of the text editor\n */ getTextEditorHeight() {\n return this.adapter.getHeight();\n }\n /**\n * Returns the `TextEditor` scroll as a value normalized between `0` and `1`.\n *\n * When the `scrollPastEnd` setting is enabled the value may exceed `1` as the maximum scroll value used to compute\n * this ratio compensate for the extra height in the editor. **Use {@link getCapedTextEditorScrollRatio} when you need\n * a value that is strictly between `0` and `1`.**\n *\n * @returns {number} The scroll ratio of the text editor\n */ getTextEditorScrollRatio() {\n return this.adapter.getScrollTop() / (this.getTextEditorMaxScrollTop() || 1);\n }\n /**\n * Returns the `TextEditor` scroll as a value normalized between `0` and `1`.\n *\n * The returned value will always be strictly between `0` and `1`.\n *\n * @returns {number} The scroll ratio of the text editor strictly between 0 and 1\n */ getCapedTextEditorScrollRatio() {\n return Math.min(1, this.getTextEditorScrollRatio());\n }\n /**\n * Returns the height of the whole minimap in pixels based on the `minimap` settings.\n *\n * @returns {number} The height of the minimap\n */ getHeight() {\n const additionalHeight = this.scrollPastEnd ? this.textEditor.getRowsPerPage() : 0;\n return (this.textEditor.getScreenLineCount() + additionalHeight) * this.getLineHeight();\n }\n /**\n * Returns the width of the whole minimap in pixels based on the `minimap` settings.\n *\n * @returns {number} The width of the minimap\n */ getWidth() {\n return this.textEditor.getMaxScreenLineLength() * this.getCharWidth();\n }\n /**\n * Returns the height the Minimap content will take on screen.\n *\n * When the Minimap height is greater than the `TextEditor` height, the `TextEditor` height is returned instead.\n *\n * @returns {number} The visible height of the Minimap\n */ getVisibleHeight() {\n return Math.min(this.getScreenHeight(), this.getHeight());\n }\n /**\n * Returns the height the minimap should take once displayed, it's either the height of the `TextEditor` or the\n * provided `height` when in stand-alone mode.\n *\n * @returns {number} The total height of the Minimap\n */ getScreenHeight() {\n if (this.isStandAlone()) {\n if (this.height != null) return this.height;\n else return this.getHeight();\n } else return this.adapter.getHeight();\n }\n /**\n * Returns the width the whole Minimap will take on screen.\n *\n * @returns {number} The width of the Minimap when displayed\n */ getVisibleWidth() {\n return Math.min(this.getScreenWidth(), this.getWidth());\n }\n /**\n * Returns the width the Minimap should take once displayed, it's either the width of the Minimap content or the\n * provided `width` when in standAlone mode.\n *\n * @returns {number} The Minimap screen width\n */ getScreenWidth() {\n if (this.isStandAlone() && this.width != null) return this.width;\n else return this.getWidth();\n }\n /**\n * Sets the preferred height and width when in stand-alone mode.\n *\n * This method is called by the for this Minimap so that the model is kept in sync with the view.\n *\n * @param {number} height The new height of the Minimap\n * @param {number} width The new width of the Minimap\n */ setScreenHeightAndWidth(height, width) {\n if (this.width !== width || this.height !== height) {\n this.height = height;\n this.width = width;\n this.updateScrollTop();\n }\n }\n /**\n * Returns the vertical scaling factor when converting coordinates from the `TextEditor` to the Minimap.\n *\n * @returns {number} The Minimap vertical scaling factor\n */ getVerticalScaleFactor() {\n return this.getLineHeight() / this.textEditor.getLineHeightInPixels();\n }\n /**\n * Returns the horizontal scaling factor when converting coordinates from the `TextEditor` to the Minimap.\n *\n * @returns {number} The Minimap horizontal scaling factor\n */ getHorizontalScaleFactor() {\n return this.getCharWidth() / this.textEditor.getDefaultCharWidth();\n }\n /**\n * Returns the height of a line in the Minimap in pixels.\n *\n * @returns {number} A line's height in the Minimap\n */ getLineHeight() {\n return this.getCharHeight() + this.getInterline();\n }\n /**\n * Returns the width of a character in the Minimap in pixels.\n *\n * @returns {number} A character's width in the Minimap\n */ getCharWidth() {\n if (this.charWidth != null) return this.charWidth;\n else return this.configCharWidth;\n }\n /**\n * Sets the char width for this Minimap. This value will override the value from the config for this instance only. A\n * `did-change-config` event is dispatched.\n *\n * @fires {did-change-config} when The value is changed\n * @param {number} charWidth The new width of a char in the Minimap\n */ setCharWidth(charWidth) {\n this.charWidth = Math.floor(charWidth);\n this.emitter.emit(\"did-change-config\");\n }\n /**\n * Returns the height of a character in the Minimap in pixels.\n *\n * @returns {number} A character's height in the Minimap\n */ getCharHeight() {\n if (this.charHeight != null) return this.charHeight;\n else return this.configCharHeight;\n }\n /**\n * Sets the char height for this Minimap. This value will override the value from the config for this instance only. A\n * `did-change-config` event is dispatched.\n *\n * @fires {did-change-config} when The value is changed\n * @param {number} charHeight The new height of a char in the Minimap\n */ setCharHeight(charHeight) {\n this.charHeight = Math.floor(charHeight);\n this.emitter.emit(\"did-change-config\");\n }\n /**\n * Returns the height of an interline in the Minimap in pixels.\n *\n * @returns {number} The interline's height in the Minimap\n */ getInterline() {\n if (this.interline != null) return this.interline;\n else return this.configInterline;\n }\n /**\n * Sets the interline height for this Minimap. This value will override the value from the config for this instance\n * only. A `did-change-config` event is dispatched.\n *\n * @fires {did-change-config} when The value is changed\n * @param {number} interline The new height of an interline in the Minimap\n */ setInterline(interline) {\n this.interline = Math.floor(interline);\n this.emitter.emit(\"did-change-config\");\n }\n /**\n * Returns the status of devicePixelRatioRounding in the Minimap.\n *\n * @returns {boolean} The devicePixelRatioRounding status in the Minimap\n */ getDevicePixelRatioRounding() {\n if (this.devicePixelRatioRounding != null) return this.devicePixelRatioRounding;\n else return this.configDevicePixelRatioRounding;\n }\n /**\n * Sets the devicePixelRatioRounding status for this Minimap. This value will override the value from the config for\n * this instance only. A `did-change-config` event is dispatched.\n *\n * @fires {did-change-config} when The value is changed\n * @param {boolean} devicePixelRatioRounding The new status of devicePixelRatioRounding in the Minimap\n */ setDevicePixelRatioRounding(devicePixelRatioRounding) {\n this.devicePixelRatioRounding = devicePixelRatioRounding;\n this.emitter.emit(\"did-change-config\");\n }\n /**\n * Returns the devicePixelRatio in the Minimap in pixels.\n *\n * @returns {number} The devicePixelRatio in the Minimap\n */ getDevicePixelRatio() {\n if (this.getDevicePixelRatioRounding()) {\n if (devicePixelRatio >= 1) return Math.round(devicePixelRatio);\n else return Math.max(Math.round(devicePixelRatio * 10) / 10, 0.1);\n }\n return devicePixelRatio;\n }\n /**\n * Returns the index of the first visible row in the Minimap.\n *\n * @returns {number} The index of the first visible row\n */ getFirstVisibleScreenRow() {\n return Math.floor(this.getScrollTop() / this.getLineHeight());\n }\n /**\n * Returns the index of the last visible row in the Minimap.\n *\n * @returns {number} The index of the last visible row\n */ getLastVisibleScreenRow() {\n return Math.ceil((this.getScrollTop() + this.getScreenHeight()) / this.getLineHeight());\n }\n /**\n * Returns true when the `independentMinimapScroll` setting have been enabled.\n *\n * @returns {boolean} Whether the minimap can scroll independently\n */ scrollIndependentlyOnMouseWheel() {\n return this.independentMinimapScroll;\n }\n /**\n * Returns the current scroll of the Minimap.\n *\n * The Minimap can scroll only when its height is greater that the height of its `TextEditor`.\n *\n * @returns {number} The scroll top of the Minimap\n */ getScrollTop() {\n return this.standAlone || this.independentMinimapScroll ? this.scrollTop : this.getScrollTopFromEditor();\n }\n /**\n * Sets the minimap scroll top value when in stand-alone mode.\n *\n * @fires {did-change-scroll-top} if The Minimap's stand-alone mode is enabled\n * @param {number} scrollTop The new scroll top for the Minimap\n */ setScrollTop(scrollTop) {\n this.scrollTop = Math.max(0, Math.min(this.getMaxScrollTop(), scrollTop));\n if (this.standAlone || this.independentMinimapScroll) this.emitter.emit(\"did-change-scroll-top\", this);\n }\n /**\n * Returns the minimap scroll as a ration between 0 and 1.\n *\n * @returns {number} The minimap scroll ratio\n */ getScrollRatio() {\n return this.getScrollTop() / this.getMaxScrollTop();\n }\n /**\n * Updates the scroll top value with the one computed from the text editor when the minimap is in the independent\n * scrolling mode.\n *\n * @access private\n */ updateScrollTop() {\n if (this.independentMinimapScroll) {\n try {\n this.setScrollTop(this.getScrollTopFromEditor());\n } catch (err) {}\n this.emitter.emit(\"did-change-scroll-top\", this);\n }\n }\n /**\n * Returns the scroll top as computed from the text editor scroll top.\n *\n * @returns {number} The computed scroll top value\n */ getScrollTopFromEditor() {\n return Math.abs(this.getCapedTextEditorScrollRatio() * this.getMaxScrollTop());\n }\n /**\n * Returns the maximum scroll value of the Minimap.\n *\n * @returns {number} The maximum scroll top for the Minimap\n */ getMaxScrollTop() {\n return Math.max(0, this.getHeight() - this.getScreenHeight());\n }\n /**\n * Returns `true` when the Minimap can scroll.\n *\n * @returns {boolean} Whether this Minimap can scroll or not\n */ canScroll() {\n return this.getMaxScrollTop() > 0;\n }\n /**\n * Updates the minimap scroll top value using a mouse event when the independent scrolling mode is enabled\n *\n * @param {MouseEvent} event The mouse wheel event\n * @access private\n */ onMouseWheel(event) {\n if (this.scrollIndependentlyOnMouseWheel()) {\n event.stopPropagation();\n if (!this.canScroll()) return;\n const { wheelDeltaY: wheelDeltaY } = event;\n const previousScrollTop = this.getScrollTop();\n const updatedScrollTop = previousScrollTop - Math.round(wheelDeltaY * this.scrollSensitivity);\n this.setScrollTop(updatedScrollTop);\n }\n }\n /**\n * Delegates to `TextEditor#getMarker`.\n *\n * @access private\n */ getMarker(id) {\n return this.textEditor.getMarker(id);\n }\n /**\n * Delegates to `TextEditor#findMarkers`.\n *\n * @access private\n */ findMarkers(o) {\n try {\n return this.textEditor.findMarkers(o);\n } catch (error) {\n return [];\n }\n }\n /**\n * Delegates to `TextEditor#markBufferRange`.\n *\n * @access private\n */ markBufferRange(range) {\n return this.textEditor.markBufferRange(range);\n }\n /**\n * Emits a change events with the passed-in changes as data.\n *\n * @param {Object} changes A change to dispatch\n * @access private\n */ emitChanges(changes) {\n this.emitter.emit(\"did-change\", changes);\n }\n /**\n * Enables the cache at the adapter level to avoid consecutive access to the text editor API during a render phase.\n *\n * @access private\n */ enableCache() {\n this.adapter.enableCache();\n }\n /**\n * Disable the adapter cache.\n *\n * @access private\n */ clearCache() {\n this.adapter.clearCache();\n }\n editorDestroyed() {\n this.adapter.editorDestroyed();\n }\n /**\n * Get the DecorationManagement API for the current minimapElement\n *\n * @returns {DecorationManagement | undefined}\n */ getDecorationManagement() {\n var _this_minimapElement;\n if (!this.DecorationManagement) {\n if ((_this_minimapElement = this.minimapElement) === null || _this_minimapElement === void 0 ? void 0 : _this_minimapElement.DecorationManagement) this.DecorationManagement = this.minimapElement.DecorationManagement;\n }\n return this.DecorationManagement;\n }\n // Decoration API duplicated for backward compatibility in the service\n getDecorations() {\n var _this_getDecorationManagement;\n var _this_getDecorationManagement_getDecorations;\n return (_this_getDecorationManagement_getDecorations = (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.getDecorations()) !== null && _this_getDecorationManagement_getDecorations !== void 0 ? _this_getDecorationManagement_getDecorations : [];\n }\n onDidAddDecoration(...args) {\n var _this_getDecorationManagement;\n var _this_getDecorationManagement_onDidAddDecoration;\n return (_this_getDecorationManagement_onDidAddDecoration = (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.onDidAddDecoration(...args)) !== null && _this_getDecorationManagement_onDidAddDecoration !== void 0 ? _this_getDecorationManagement_onDidAddDecoration : $148b4ac34d9435d4$var$disposedDisposable;\n }\n onDidRemoveDecoration(...args) {\n var _this_getDecorationManagement;\n var _this_getDecorationManagement_onDidRemoveDecoration;\n return (_this_getDecorationManagement_onDidRemoveDecoration = (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.onDidRemoveDecoration(...args)) !== null && _this_getDecorationManagement_onDidRemoveDecoration !== void 0 ? _this_getDecorationManagement_onDidRemoveDecoration : $148b4ac34d9435d4$var$disposedDisposable;\n }\n onDidChangeDecorationRange(...args) {\n var _this_getDecorationManagement;\n var _this_getDecorationManagement_onDidChangeDecorationRange;\n return (_this_getDecorationManagement_onDidChangeDecorationRange = (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.onDidChangeDecorationRange(...args)) !== null && _this_getDecorationManagement_onDidChangeDecorationRange !== void 0 ? _this_getDecorationManagement_onDidChangeDecorationRange : $148b4ac34d9435d4$var$disposedDisposable;\n }\n onDidUpdateDecoration(...args) {\n var _this_getDecorationManagement;\n var _this_getDecorationManagement_onDidUpdateDecoration;\n return (_this_getDecorationManagement_onDidUpdateDecoration = (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.onDidUpdateDecoration(...args)) !== null && _this_getDecorationManagement_onDidUpdateDecoration !== void 0 ? _this_getDecorationManagement_onDidUpdateDecoration : $148b4ac34d9435d4$var$disposedDisposable;\n }\n decorationForId(...args) {\n var _this_getDecorationManagement;\n var _this_getDecorationManagement_decorationForId;\n return (_this_getDecorationManagement_decorationForId = (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.decorationForId(...args)) !== null && _this_getDecorationManagement_decorationForId !== void 0 ? _this_getDecorationManagement_decorationForId : $148b4ac34d9435d4$var$dummyDecoration;\n }\n decorationsForScreenRowRange(...args) {\n var _this_getDecorationManagement;\n var _this_getDecorationManagement_decorationsForScreenRowRange;\n return (_this_getDecorationManagement_decorationsForScreenRowRange = (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.decorationsForScreenRowRange(...args)) !== null && _this_getDecorationManagement_decorationsForScreenRowRange !== void 0 ? _this_getDecorationManagement_decorationsForScreenRowRange : $148b4ac34d9435d4$var$dummyDecoration;\n }\n decorationsByTypeThenRows() {\n var _this_getDecorationManagement;\n var _this_getDecorationManagement_decorationsByTypeThenRows;\n return (_this_getDecorationManagement_decorationsByTypeThenRows = (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.decorationsByTypeThenRows()) !== null && _this_getDecorationManagement_decorationsByTypeThenRows !== void 0 ? _this_getDecorationManagement_decorationsByTypeThenRows : $148b4ac34d9435d4$var$dummyDecoration;\n }\n decorateMarker(...args) {\n var _this_getDecorationManagement;\n var _this_getDecorationManagement_decorateMarker;\n return (_this_getDecorationManagement_decorateMarker = (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.decorateMarker(...args)) !== null && _this_getDecorationManagement_decorateMarker !== void 0 ? _this_getDecorationManagement_decorateMarker : $148b4ac34d9435d4$var$dummyDecoration;\n }\n removeDecoration(...args) {\n var _this_getDecorationManagement;\n return (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.removeDecoration(...args);\n }\n removeAllDecorationsForMarker(...args) {\n var _this_getDecorationManagement;\n return (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.removeAllDecorationsForMarker(...args);\n }\n removeAllDecorations() {\n var _this_getDecorationManagement;\n return (_this_getDecorationManagement = this.getDecorationManagement()) === null || _this_getDecorationManagement === void 0 ? void 0 : _this_getDecorationManagement.removeAllDecorations();\n }\n}\n\n\nvar $186b450f929b5c94$exports = {};\n$186b450f929b5c94$exports = JSON.parse('{\"plugins\":{\"type\":\"object\",\"properties\":{}},\"autoToggle\":{\"title\":\"Show Minimap On Atom Start\",\"type\":\"boolean\",\"default\":true,\"order\":1},\"displayMinimapOnLeft\":{\"type\":\"boolean\",\"default\":false,\"order\":2},\"displayCodeHighlights\":{\"type\":\"boolean\",\"default\":true,\"description\":\"Toggles the render of the buffer tokens in the minimap.\",\"order\":3},\"displayPluginsControls\":{\"type\":\"boolean\",\"default\":true,\"description\":\"You need to restart Atom for this setting to be effective.\",\"order\":4},\"minimapScrollIndicator\":{\"type\":\"boolean\",\"default\":true,\"description\":\"Toggles the display of a side line showing which part of the buffer is currently displayed by the minimap. This side line will only appear if the minimap is taller than the editor view height.\",\"order\":5},\"adjustMinimapWidthToSoftWrap\":{\"type\":\"boolean\",\"default\":true,\"description\":\"If this option is enabled and Soft Wrap is checked then the Minimap max width is set to the Preferred Line Length value.\",\"order\":6},\"adjustMinimapWidthOnlyIfSmaller\":{\"type\":\"boolean\",\"default\":true,\"description\":\"If this option and `adjustMinimapWidthToSoftWrap` are enabled the minimap width will never go past the limit sets by CSS. On the other hand, when disabled the minimap will expand to honor the preferred line width.\",\"order\":7},\"ignoreWhitespacesInTokens\":{\"type\":\"boolean\",\"default\":false,\"description\":\"When enabled, text editor tokens are rendered as plain blocks, with no regards to the whitespaces they contains.\",\"order\":8},\"charWidth\":{\"type\":\"number\",\"default\":1,\"minimum\":0.5,\"order\":9},\"charHeight\":{\"type\":\"number\",\"default\":2,\"minimum\":0.5,\"order\":10},\"interline\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"description\":\"The space between lines in the minimap in pixels.\",\"order\":11},\"textOpacity\":{\"type\":\"number\",\"default\":0.6,\"minimum\":0,\"maximum\":1,\"description\":\"The opacity used to render the line\\'s text in the minimap.\",\"order\":12},\"moveCursorOnMinimapClick\":{\"type\":\"boolean\",\"default\":false,\"description\":\"Moves the cursor to the beginning of the target line when clicking on the minimap\",\"order\":13},\"independentMinimapScroll\":{\"type\":\"boolean\",\"title\":\"Independent Minimap Scroll On Mouse Wheel Events\",\"default\":false,\"description\":\"When enabled, using the mouse wheel over the Minimap will make it scroll independently of the text editor. The Minimap will still sync with the editor whenever the editor is scrolled, but it will no longer relay the mouse wheel events to the editor.\",\"order\":14},\"scrollSensitivity\":{\"type\":\"number\",\"default\":0.5,\"description\":\"The scrolling speed when the `Independent Minimap Scroll On Mouse Wheel Events` setting is enabled.\",\"order\":15},\"smoothScrolling\":{\"type\":\"boolean\",\"default\":false,\"description\":\"Whether to offset the minimap canvas when scrolling to keep the scroll smooth. When `true` the minimap canvas will be offseted, resulting in a smoother scroll, but with the side-effect of a blurry minimap when the canvas is placed between pixels. When `false` the canvas will always stay at the same position, and will never look blurry, but the scroll will appear more jagged.\",\"order\":16},\"createPluginInDevMode\":{\"type\":\"boolean\",\"default\":false,\"order\":17},\"absoluteMode\":{\"type\":\"boolean\",\"default\":false,\"description\":\"When enabled the text editor content will be able to flow below the minimap.\",\"order\":18},\"adjustAbsoluteModeHeight\":{\"type\":\"boolean\",\"default\":false,\"description\":\"When enabled and `Absolute Mode` is also enabled, the minimap height will be adjusted to only take the space required by the text editor content, leaving the space below triggering mouse events on the text editor. **Be aware this can have some impact on performances as the minimap canvases will be resized every time a change in the editor make its height change.**\",\"order\":19},\"redrawDelay\":{\"type\":\"number\",\"default\":400,\"minimum\":0,\"maximum\":2000,\"description\":\"Controls how often (in ms) the minimap should redraw itself after changing the text editor\\'s contents. Setting this to 100ms or higher could dramatically improve editor responsiveness when working with large files. A value of 0 will cause the minimap to redraw itself immediately on each change.\",\"order\":20},\"devicePixelRatioRounding\":{\"type\":\"boolean\",\"default\":true,\"description\":\"Toggles the rounding of the devicePixelRatio in the minimap.\",\"order\":21},\"useHardwareAcceleration\":{\"type\":\"boolean\",\"default\":true,\"order\":22},\"scrollAnimation\":{\"type\":\"boolean\",\"default\":false,\"description\":\"Enables animations when scrolling by clicking on the minimap.\",\"order\":23},\"scrollAnimationDuration\":{\"type\":\"integer\",\"default\":300,\"description\":\"The duration of scrolling animations when clicking on the minimap.\",\"order\":24},\"maxTokensInOneLine\":{\"type\":\"integer\",\"default\":160,\"description\":\"The maximum number of tokens that are rendered for each line.\",\"order\":25}}');\n\n\nvar $43704eddd45f8975$exports = {};\n\n$parcel$export($43704eddd45f8975$exports, \"plugins\", () => $43704eddd45f8975$export$8b3ca321c77fdea6);\n$parcel$export($43704eddd45f8975$exports, \"registerPlugin\", () => $43704eddd45f8975$export$7612db19fb8beb1e);\n$parcel$export($43704eddd45f8975$exports, \"unregisterPlugin\", () => $43704eddd45f8975$export$48d00697bf0841b0);\n$parcel$export($43704eddd45f8975$exports, \"togglePluginActivation\", () => $43704eddd45f8975$export$8cf5509a1f8ee810);\n$parcel$export($43704eddd45f8975$exports, \"deactivateAllPlugins\", () => $43704eddd45f8975$export$4751c4964dd9fdd5);\n$parcel$export($43704eddd45f8975$exports, \"activatePlugin\", () => $43704eddd45f8975$export$c20a82b9d4db0e25);\n$parcel$export($43704eddd45f8975$exports, \"deactivatePlugin\", () => $43704eddd45f8975$export$eca032c13825f076);\n$parcel$export($43704eddd45f8975$exports, \"getPluginsOrder\", () => $43704eddd45f8975$export$b9b9891832107981);\n\n\n\"use strict\";\nconst $43704eddd45f8975$export$8b3ca321c77fdea6 = {};\n/**\n * The plugins' subscriptions stored using the plugin names as keys.\n *\n * @type {Object}\n * @access private\n */ const $43704eddd45f8975$var$pluginsSubscriptions = {};\n/**\n * A map that stores the display order for each plugin\n *\n * @type {Object}\n * @access private\n */ const $43704eddd45f8975$var$pluginsOrderMap = {};\nfunction $43704eddd45f8975$export$7612db19fb8beb1e(name, plugin) {\n $43704eddd45f8975$export$8b3ca321c77fdea6[name] = plugin;\n $43704eddd45f8975$var$pluginsSubscriptions[name] = new (0, $2INr1$atom.CompositeDisposable)();\n const event = {\n name: name,\n plugin: plugin\n };\n (0, $23c406735d46bb37$export$bad24218ebd77223).emit(\"did-add-plugin\", event);\n if (atom.config.get(\"minimap.displayPluginsControls\")) $43704eddd45f8975$var$registerPluginControls(name, plugin);\n $43704eddd45f8975$var$updatesPluginActivationState(name);\n}\nfunction $43704eddd45f8975$export$48d00697bf0841b0(name) {\n const plugin = $43704eddd45f8975$export$8b3ca321c77fdea6[name];\n if (atom.config.get(\"minimap.displayPluginsControls\")) $43704eddd45f8975$var$unregisterPluginControls(name);\n delete $43704eddd45f8975$export$8b3ca321c77fdea6[name];\n const event = {\n name: name,\n plugin: plugin\n };\n (0, $23c406735d46bb37$export$bad24218ebd77223).emit(\"did-remove-plugin\", event);\n}\nfunction $43704eddd45f8975$export$8cf5509a1f8ee810(name, boolean) {\n const settingsKey = `minimap.plugins.${name}`;\n if (boolean !== undefined && boolean !== null) atom.config.set(settingsKey, boolean);\n else atom.config.set(settingsKey, !atom.config.get(settingsKey));\n $43704eddd45f8975$var$updatesPluginActivationState(name);\n}\nfunction $43704eddd45f8975$export$4751c4964dd9fdd5() {\n for (const [name, plugin] of $43704eddd45f8975$var$eachPlugin()){\n plugin.deactivatePlugin();\n (0, $23c406735d46bb37$export$bad24218ebd77223).emit(\"did-deactivate-plugin\", {\n name: name,\n plugin: plugin\n });\n }\n}\n/**\n * A generator function to iterate over registered plugins.\n *\n * @returns An iterable that yield the name and reference to every plugin as an array in each iteration.\n */ function* $43704eddd45f8975$var$eachPlugin() {\n for(const name in $43704eddd45f8975$export$8b3ca321c77fdea6)yield [\n name,\n $43704eddd45f8975$export$8b3ca321c77fdea6[name]\n ];\n}\n/**\n * Updates the plugin activation state according to the current config.\n *\n * @fires {did-activate-plugin} if The plugin was activated by the call.\n * @fires {did-deactivate-plugin} if The plugin was deactivated by the call.\n * @param {string} name The identifying name of the plugin to update.\n * @access private\n */ function $43704eddd45f8975$var$updatesPluginActivationState(name) {\n const plugin = $43704eddd45f8975$export$8b3ca321c77fdea6[name];\n const pluginActive = plugin.isActive();\n const settingActive = atom.config.get(`minimap.plugins.${name}`);\n if (atom.config.get(\"minimap.displayPluginsControls\")) {\n if (settingActive && !pluginActive) $43704eddd45f8975$export$c20a82b9d4db0e25(name, plugin);\n else if (pluginActive && !settingActive) $43704eddd45f8975$export$eca032c13825f076(name, plugin);\n } else {\n if (!pluginActive) $43704eddd45f8975$export$c20a82b9d4db0e25(name, plugin);\n else if (pluginActive) $43704eddd45f8975$export$eca032c13825f076(name, plugin);\n }\n}\nfunction $43704eddd45f8975$export$c20a82b9d4db0e25(name, plugin) {\n const event = {\n name: name,\n plugin: plugin\n };\n plugin.activatePlugin();\n (0, $23c406735d46bb37$export$bad24218ebd77223).emit(\"did-activate-plugin\", event);\n}\nfunction $43704eddd45f8975$export$eca032c13825f076(name, plugin) {\n const event = {\n name: name,\n plugin: plugin\n };\n plugin.deactivatePlugin();\n (0, $23c406735d46bb37$export$bad24218ebd77223).emit(\"did-deactivate-plugin\", event);\n}\n/**\n * When the `minimap.displayPluginsControls` setting is toggled, this function will register the commands and setting to\n * manage the plugin activation from the minimap settings.\n *\n * @param {string} name The identifying name of the plugin.\n * @param {MinimapPlugin} plugin The plugin instance to register controls for.\n * @listens {minimap.plugins.${name}} listen to the setting to update\n * the plugin state accordingly.\n * @listens {minimap:toggle-${name}} listen to the command on `atom-workspace`\n * to toggle the plugin state.\n * @access private\n */ function $43704eddd45f8975$var$registerPluginControls(name, plugin) {\n const settingsKey = `minimap.plugins.${name}`;\n const orderSettingsKey = `minimap.plugins.${name}DecorationsZIndex`;\n const config = (0, $23c406735d46bb37$export$9734216cda67175d)();\n config.plugins.properties[name] = {\n type: \"boolean\",\n title: name,\n description: `Whether the ${name} plugin is activated and displayed in the Minimap.`,\n default: true\n };\n config.plugins.properties[`${name}DecorationsZIndex`] = {\n type: \"integer\",\n title: `${name} decorations order`,\n description: `The relative order of the ${name} plugin's decorations in the layer into which they are drawn. Note that this order only apply inside a layer, so highlight-over decorations will always be displayed above line decorations as they are rendered in different layers.`,\n default: 0\n };\n if (atom.config.get(settingsKey) === undefined) atom.config.set(settingsKey, true);\n if (atom.config.get(orderSettingsKey) === undefined) atom.config.set(orderSettingsKey, 0);\n $43704eddd45f8975$var$pluginsSubscriptions[name].add(atom.config.observe(settingsKey, ()=>{\n $43704eddd45f8975$var$updatesPluginActivationState(name);\n }));\n $43704eddd45f8975$var$pluginsSubscriptions[name].add(atom.config.observe(orderSettingsKey, (order)=>{\n $43704eddd45f8975$var$updatePluginsOrderMap(name);\n const event = {\n name: name,\n plugin: plugin,\n order: order\n };\n (0, $23c406735d46bb37$export$bad24218ebd77223).emit(\"did-change-plugin-order\", event);\n }));\n $43704eddd45f8975$var$pluginsSubscriptions[name].add(atom.commands.add(\"atom-workspace\", {\n [`minimap:toggle-${name}`]: ()=>{\n $43704eddd45f8975$export$8cf5509a1f8ee810(name);\n }\n }));\n $43704eddd45f8975$var$updatePluginsOrderMap(name);\n}\n/**\n * Updates the display order in the map for the passed-in plugin name.\n *\n * @param {string} name The name of the plugin to update\n * @access private\n */ function $43704eddd45f8975$var$updatePluginsOrderMap(name) {\n const orderSettingsKey = `minimap.plugins.${name}DecorationsZIndex`;\n $43704eddd45f8975$var$pluginsOrderMap[name] = atom.config.get(orderSettingsKey);\n}\nfunction $43704eddd45f8975$export$b9b9891832107981() {\n return $43704eddd45f8975$var$pluginsOrderMap;\n}\n/**\n * When the `minimap.displayPluginsControls` setting is toggled, this function will unregister the commands and setting\n * that was created previously.\n *\n * @param {string} name The identifying name of the plugin.\n * @access private\n */ function $43704eddd45f8975$var$unregisterPluginControls(name) {\n $43704eddd45f8975$var$pluginsSubscriptions[name].dispose();\n delete $43704eddd45f8975$var$pluginsSubscriptions[name];\n delete (0, $23c406735d46bb37$export$9734216cda67175d)().plugins.properties[name];\n}\n\n\n// Functions used to recommend the configurations required for the best performance of Minimap\nfunction $debc9e4fdd63188c$export$fd712e6faf525b2f() {\n return $debc9e4fdd63188c$var$observeAndWarn(\"core.useTreeSitterParsers\", true, \"Tree-sitter is off (Low Performance Warning).\", `You should turn on Atom's tree-sitter parser to experience the best performance Minimap and Atom are designed for.\n Keeping tree-sitter parser off results in sluggish scrolling and lags in the text editor.`);\n}\n/* Utility function that observes a config and throws warnings once a day if it is not the recommended value */ function $debc9e4fdd63188c$var$observeAndWarn(configName, recommendedValue, warningTitle, warningDescription) {\n return atom.config.observe(configName, (value)=>{\n if (value !== recommendedValue) {\n const storageName = `Minimap.${configName}`;\n const today = new Date();\n const previousWarning = window.localStorage.getItem(storageName);\n let previousWarningDay = null;\n if (previousWarning) previousWarningDay = new Date(Date.parse(previousWarning)).getDay();\n // throw the warning once a day\n if (!previousWarningDay || typeof previousWarningDay === \"number\" && previousWarningDay - today.getDay() >= 1) {\n window.localStorage.setItem(storageName, today);\n const notification = atom.notifications.addWarning(warningTitle, {\n description: warningDescription,\n dismissable: true,\n buttons: [\n {\n text: `Set to ${recommendedValue} and restart Atom`,\n onDidClick () {\n atom.config.set(configName, true);\n notification.dismiss();\n window.localStorage.removeItem(storageName);\n setTimeout(()=>{\n atom.reload();\n }, 1500);\n }\n }\n ]\n });\n }\n }\n });\n}\n\n\nvar $cfdfe6b80618a69d$exports = {};\n\"use strict\";\n/**\n * This class is used to read the styles informations (e.g. color and background-color) from the DOM to use when\n * rendering canvas. This is used in Minimap and Terminal It attaches a dummyNode to the targetNode, renders them, and\n * finds the computed style back.\n */ Object.defineProperty($cfdfe6b80618a69d$exports, \"__esModule\", {\n value: true\n});\n$cfdfe6b80618a69d$exports.StyleReader = void 0;\nclass $cfdfe6b80618a69d$var$StyleReader {\n constructor(){\n this.domStylesCache = new Map();\n this.dummyNode = void 0;\n this.targetNode = void 0;\n }\n /** Set to true once tokenized */ // private hasTokenizedOnce = false\n /**\n * Returns the computed values for the given property and scope in the DOM.\n *\n * This function insert a dummy element in the DOM to compute its style, return the specified property, and clear the\n * content of the dummy element.\n *\n * @param scopes A list of classes reprensenting the scope to build\n * @param property The name of the style property to compute\n * @param targetNode\n * @param getFromCache Whether to cache the computed value or not\n * @returns The computed property's value used in CanvasDrawer\n */ retrieveStyleFromDom(scopes, property, targetNode, getFromCache = true) {\n if (scopes.length === 0) return \"\";\n // no scopes\n const key = scopes.join(\" \");\n let cachedData = this.domStylesCache.get(key);\n if (cachedData !== undefined) {\n if (getFromCache) {\n // if should get the value from the cache\n const value = cachedData[property];\n if (value !== undefined) // value exists\n return value;\n // value not in the cache - get fresh value\n } // don't use cache - get fresh value\n } else // key did not exist. create it\n cachedData = {};\n this.ensureDummyNodeExistence(targetNode);\n const dummyNode = this.dummyNode;\n let parent = dummyNode;\n for(let i = 0, len = scopes.length; i < len; i++){\n const scope = scopes[i];\n const node = document.createElement(\"span\");\n node.className = scope.replace($cfdfe6b80618a69d$var$dotRegexp, \" \"); // TODO why replace is needed?\n parent.appendChild(node);\n parent = node;\n }\n const style = window.getComputedStyle(parent);\n let value = style.getPropertyValue(property); // rotate hue if webkit-filter available\n const filter = style.getPropertyValue(\"-webkit-filter\");\n if (filter.includes(\"hue-rotate\")) value = $cfdfe6b80618a69d$var$rotateHue(value, filter);\n if (value !== \"\") {\n cachedData[property] = value;\n this.domStylesCache.set(key, cachedData);\n }\n dummyNode.innerHTML = \"\";\n return value;\n }\n /**\n * Creates a DOM node container for all the operations that need to read styles properties from DOM.\n *\n * @param targetNode\n */ ensureDummyNodeExistence(targetNode) {\n if (this.targetNode !== targetNode || this.dummyNode === undefined) {\n this.dummyNode = document.createElement(\"span\");\n this.dummyNode.style.visibility = \"hidden\"; // attach to the target node\n targetNode.appendChild(this.dummyNode);\n this.targetNode = targetNode;\n }\n }\n /** Invalidates the cache by emptying the cache object. used in MinimapElement */ invalidateDOMStylesCache() {\n this.domStylesCache.clear();\n }\n} // ## ## ######## ## ######## ######## ######## ######\n// ## ## ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ## ##\n// ######### ###### ## ######## ###### ######## ######\n// ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ## ##\n// ## ## ######## ######## ## ######## ## ## ######\n$cfdfe6b80618a69d$exports.StyleReader = $cfdfe6b80618a69d$var$StyleReader;\nconst $cfdfe6b80618a69d$var$dotRegexp = /\\.+/g;\nconst $cfdfe6b80618a69d$var$rgbExtractRegexp = /rgb(a?)\\((\\d+), (\\d+), (\\d+)(, (\\d+(\\.\\d+)?))?\\)/;\nconst $cfdfe6b80618a69d$var$hueRegexp = /hue-rotate\\((-?\\d+)deg\\)/;\n/**\n * Computes the output color of `value` with a rotated hue defined in `filter`.\n *\n * @param value The CSS color to apply the rotation on\n * @param filter The CSS hue rotate filter declaration\n * @returns The rotated CSS color\n */ function $cfdfe6b80618a69d$var$rotateHue(value, filter) {\n const match = value.match($cfdfe6b80618a69d$var$rgbExtractRegexp);\n if (match === null) return \"\";\n const [, , rStr, gStr, bStr, , aStr] = match;\n const hueMatch = filter.match($cfdfe6b80618a69d$var$hueRegexp);\n if (hueMatch === null) return \"\";\n const [, hueStr] = hueMatch;\n let [r, g, b, a, hue] = [\n rStr,\n gStr,\n bStr,\n aStr,\n hueStr\n ].map(Number);\n [r, g, b] = $cfdfe6b80618a69d$var$rotate(r, g, b, hue);\n if (isNaN(a)) return `rgb(${r}, ${g}, ${b})`;\n else return `rgba(${r}, ${g}, ${b}, ${a})`;\n}\n/**\n * Computes the hue rotation on the provided `r`, `g` and `b` channels by the amount of `angle`.\n *\n * @param r The red channel of the color to rotate\n * @param g The green channel of the color to rotate\n * @param b The blue channel of the color to rotate\n * @param angle The angle to rotate the hue with\n * @returns The rotated color channels\n */ function $cfdfe6b80618a69d$var$rotate(r, g, b, angle) {\n const matrix = [\n 1,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n 1\n ];\n const lumR = 0.2126;\n const lumG = 0.7152;\n const lumB = 0.0722;\n const hueRotateR = 0.143;\n const hueRotateG = 0.14;\n const hueRotateB = 0.283;\n const cos = Math.cos(angle * Math.PI / 180);\n const sin = Math.sin(angle * Math.PI / 180);\n matrix[0] = lumR + (1 - lumR) * cos - lumR * sin;\n matrix[1] = lumG - lumG * cos - lumG * sin;\n matrix[2] = lumB - lumB * cos + (1 - lumB) * sin;\n matrix[3] = lumR - lumR * cos + hueRotateR * sin;\n matrix[4] = lumG + (1 - lumG) * cos + hueRotateG * sin;\n matrix[5] = lumB - lumB * cos - hueRotateB * sin;\n matrix[6] = lumR - lumR * cos - (1 - lumR) * sin;\n matrix[7] = lumG - lumG * cos + lumG * sin;\n matrix[8] = lumB + (1 - lumB) * cos + lumB * sin;\n return [\n $cfdfe6b80618a69d$var$clamp(matrix[0] * r + matrix[1] * g + matrix[2] * b),\n $cfdfe6b80618a69d$var$clamp(matrix[3] * r + matrix[4] * g + matrix[5] * b),\n $cfdfe6b80618a69d$var$clamp(matrix[6] * r + matrix[7] * g + matrix[8] * b)\n ];\n}\nfunction $cfdfe6b80618a69d$var$clamp(num) {\n return Math.ceil(Math.max(0, Math.min(255, num)));\n}\n\n\n\nvar $3HMiZ = parcelRequire(\"3HMiZ\");\n\"use strict\";\n/**\n * The `Minimap` package provides an eagle-eye view of text buffers.\n *\n * It also provides API for plugin packages that want to interact with the minimap and be available to the user through\n * the minimap settings.\n */ /**\n * The activation state of the package.\n *\n * @type {boolean}\n * @access private\n */ let $23c406735d46bb37$var$active = false;\n/**\n * The toggle state of the package.\n *\n * @type {boolean}\n * @access private\n */ let $23c406735d46bb37$var$toggled = false;\nlet $23c406735d46bb37$export$3542142cf713a624 = null;\n/**\n * The composite disposable that stores the package's subscriptions.\n *\n * @type {CompositeDisposable}\n * @access private\n */ let $23c406735d46bb37$var$subscriptions = null;\n/**\n * The disposable that stores the package's commands subscription.\n *\n * @type {Disposable}\n * @access private\n */ let $23c406735d46bb37$var$subscriptionsOfCommands = null;\nconst $23c406735d46bb37$export$bad24218ebd77223 = new (0, $2INr1$atom.Emitter)();\nlet $23c406735d46bb37$export$4d3d19fa8673fd3e = null;\nfunction $23c406735d46bb37$export$234c45b355edd85b() {\n if ($23c406735d46bb37$var$active) return;\n $23c406735d46bb37$var$subscriptionsOfCommands = atom.commands.add(\"atom-workspace\", {\n \"minimap:toggle\": ()=>{\n $23c406735d46bb37$export$e03c1c3201ee8bb7();\n },\n \"minimap:generate-coffee-plugin\": async ()=>{\n await $23c406735d46bb37$var$generatePlugin(\"coffee\");\n },\n \"minimap:generate-javascript-plugin\": async ()=>{\n await $23c406735d46bb37$var$generatePlugin(\"javascript\");\n },\n \"minimap:generate-babel-plugin\": async ()=>{\n await $23c406735d46bb37$var$generatePlugin(\"babel\");\n }\n });\n $23c406735d46bb37$export$3542142cf713a624 = new Map();\n $23c406735d46bb37$export$4d3d19fa8673fd3e = new (0, $cfdfe6b80618a69d$exports.StyleReader)();\n $23c406735d46bb37$var$subscriptions = new (0, $2INr1$atom.CompositeDisposable)();\n $23c406735d46bb37$var$active = true;\n if (atom.config.get(\"minimap.autoToggle\")) $23c406735d46bb37$export$e03c1c3201ee8bb7();\n}\nfunction $23c406735d46bb37$export$e854d79fe60e1faa(model) {\n if (model instanceof (0, $148b4ac34d9435d4$export$2e2bcd8739ae039)) {\n let element = model.getMinimapElement();\n if (!element) {\n element = (0, $fcbed2d4b7084ed8$export$aa3fab546e9e7454)();\n element.setModel(model);\n }\n return element;\n }\n}\nfunction $23c406735d46bb37$export$e96c1edfdaf2d1db() {\n if (!$23c406735d46bb37$var$active) return;\n $43704eddd45f8975$export$4751c4964dd9fdd5();\n if ($23c406735d46bb37$export$3542142cf713a624) {\n $23c406735d46bb37$export$3542142cf713a624.forEach((value)=>{\n value.destroy();\n });\n $23c406735d46bb37$export$3542142cf713a624.clear();\n }\n $23c406735d46bb37$var$subscriptions.dispose();\n $23c406735d46bb37$var$subscriptionsOfCommands.dispose();\n $23c406735d46bb37$export$4d3d19fa8673fd3e.invalidateDOMStylesCache();\n $23c406735d46bb37$var$toggled = false;\n $23c406735d46bb37$var$active = false;\n}\nfunction $23c406735d46bb37$export$9734216cda67175d() {\n return $186b450f929b5c94$exports || atom.packages.getLoadedPackage(\"minimap\").metadata.configSchema;\n}\nfunction $23c406735d46bb37$export$e03c1c3201ee8bb7() {\n if (!$23c406735d46bb37$var$active) return;\n if ($23c406735d46bb37$var$toggled) {\n $23c406735d46bb37$var$toggled = false;\n if ($23c406735d46bb37$export$3542142cf713a624) {\n $23c406735d46bb37$export$3542142cf713a624.forEach((minimap)=>{\n minimap.destroy();\n });\n $23c406735d46bb37$export$3542142cf713a624.clear();\n }\n $23c406735d46bb37$var$subscriptions.dispose();\n // HACK: this hack forces rerendering editor size which moves the scrollbar to the right once minimap is removed\n const wasMaximized = atom.isMaximized();\n const { width: width, height: height } = atom.getSize();\n atom.setSize(width, height);\n if (wasMaximized) atom.maximize();\n } else {\n $23c406735d46bb37$var$toggled = true;\n $23c406735d46bb37$var$initSubscriptions();\n }\n $23c406735d46bb37$export$4d3d19fa8673fd3e.invalidateDOMStylesCache();\n}\n\n/**\n * Opens the plugin generation view.\n *\n * @param {string} template The name of the template to use\n */ async function $23c406735d46bb37$var$generatePlugin(template) {\n const { createMinimapPluginGeneratorElement: createMinimapPluginGeneratorElement } = await (parcelRequire(\"dGrXD\"));\n const view = createMinimapPluginGeneratorElement();\n view.template = template;\n view.attach();\n}\nfunction $23c406735d46bb37$export$b6f10fd94544e66c(callback) {\n return $23c406735d46bb37$export$bad24218ebd77223.on(\"did-activate\", callback);\n}\nfunction $23c406735d46bb37$export$d206d0a3ab46ce53(callback) {\n return $23c406735d46bb37$export$bad24218ebd77223.on(\"did-deactivate\", callback);\n}\nfunction $23c406735d46bb37$export$a720fe198b21c58c(callback) {\n return $23c406735d46bb37$export$bad24218ebd77223.on(\"did-create-minimap\", callback);\n}\nfunction $23c406735d46bb37$export$d40fb390be4bd0f(callback) {\n return $23c406735d46bb37$export$bad24218ebd77223.on(\"did-add-plugin\", callback);\n}\nfunction $23c406735d46bb37$export$9937b73c38ac51f0(callback) {\n return $23c406735d46bb37$export$bad24218ebd77223.on(\"did-remove-plugin\", callback);\n}\nfunction $23c406735d46bb37$export$6f3aaf72a3cac830(callback) {\n return $23c406735d46bb37$export$bad24218ebd77223.on(\"did-activate-plugin\", callback);\n}\nfunction $23c406735d46bb37$export$8df1420526313195(callback) {\n return $23c406735d46bb37$export$bad24218ebd77223.on(\"did-deactivate-plugin\", callback);\n}\nfunction $23c406735d46bb37$export$4f0668f248b15f12(callback) {\n return $23c406735d46bb37$export$bad24218ebd77223.on(\"did-change-plugin-order\", callback);\n}\nfunction $23c406735d46bb37$export$e3a0d8dffed34b4f() {\n return 0, $148b4ac34d9435d4$export$2e2bcd8739ae039;\n}\nfunction $23c406735d46bb37$export$fbfbb3bd6dc38def(editorElement) {\n if (!editorElement) return;\n return $23c406735d46bb37$export$58c03b6c0d094c(editorElement.getModel());\n}\nfunction $23c406735d46bb37$export$58c03b6c0d094c(textEditor) {\n if (!textEditor) return;\n if (!$23c406735d46bb37$export$3542142cf713a624) return;\n let minimap = $23c406735d46bb37$export$3542142cf713a624.get(textEditor);\n if (minimap === undefined || minimap.destroyed) {\n minimap = new (0, $148b4ac34d9435d4$export$2e2bcd8739ae039)({\n textEditor: textEditor\n });\n $23c406735d46bb37$export$3542142cf713a624.set(textEditor, minimap);\n const editorSubscription = textEditor.onDidDestroy(()=>{\n if ($23c406735d46bb37$export$3542142cf713a624) $23c406735d46bb37$export$3542142cf713a624.delete(textEditor);\n if (minimap) // just in case\n minimap.destroy();\n editorSubscription.dispose();\n });\n // dispose the editorSubscription if minimap is deactivated before destroying the editor\n $23c406735d46bb37$var$subscriptions.add(editorSubscription);\n }\n return minimap;\n}\nfunction $23c406735d46bb37$export$bd03fcaa67c354fa(textEditor) {\n if (!textEditor) return;\n return new (0, $148b4ac34d9435d4$export$2e2bcd8739ae039)({\n textEditor: textEditor,\n standAlone: true\n });\n}\nfunction $23c406735d46bb37$export$6f8e50201d28743() {\n return $23c406735d46bb37$export$58c03b6c0d094c(atom.workspace.getActiveTextEditor());\n}\nfunction $23c406735d46bb37$export$b0030062932c3d3d(iterator) {\n if (!iterator) return;\n if ($23c406735d46bb37$export$3542142cf713a624) $23c406735d46bb37$export$3542142cf713a624.forEach((minimap)=>{\n iterator(minimap);\n });\n return $23c406735d46bb37$export$a720fe198b21c58c((minimap)=>{\n iterator(minimap);\n });\n}\n/**\n * Registers to the `observeTextEditors` method.\n *\n * @access private\n */ function $23c406735d46bb37$var$initSubscriptions() {\n const debounceUpdateStyles = (0, $3HMiZ.debounce)($23c406735d46bb37$var$updateStyles, 300);\n $23c406735d46bb37$var$subscriptions.add(atom.workspace.observeTextEditors((textEditor)=>{\n const minimap = $23c406735d46bb37$export$58c03b6c0d094c(textEditor);\n const minimapElement = $23c406735d46bb37$export$e854d79fe60e1faa(minimap);\n $23c406735d46bb37$export$bad24218ebd77223.emit(\"did-create-minimap\", minimap);\n minimapElement.attach(textEditor.getElement());\n }), // empty color cache if the theme changes\n atom.themes.onDidChangeActiveThemes(debounceUpdateStyles), atom.styles.onDidUpdateStyleElement(debounceUpdateStyles), atom.styles.onDidAddStyleElement(debounceUpdateStyles), atom.styles.onDidRemoveStyleElement(debounceUpdateStyles), (0, $debc9e4fdd63188c$export$fd712e6faf525b2f)());\n}\n/** Force update styles of minimap */ function $23c406735d46bb37$var$updateStyles() {\n $23c406735d46bb37$export$4d3d19fa8673fd3e.invalidateDOMStylesCache();\n $23c406735d46bb37$export$3542142cf713a624.forEach((minimap)=>{\n atom.views.getView(minimap).requestForcedUpdate();\n });\n}\n// The public exports included in the service:\nconst $23c406735d46bb37$var$MinimapServiceV1 = {\n minimapViewProvider: $23c406735d46bb37$export$e854d79fe60e1faa,\n getConfigSchema: $23c406735d46bb37$export$9734216cda67175d,\n onDidActivate: $23c406735d46bb37$export$b6f10fd94544e66c,\n onDidDeactivate: $23c406735d46bb37$export$d206d0a3ab46ce53,\n onDidCreateMinimap: $23c406735d46bb37$export$a720fe198b21c58c,\n onDidAddPlugin: $23c406735d46bb37$export$d40fb390be4bd0f,\n onDidRemovePlugin: $23c406735d46bb37$export$9937b73c38ac51f0,\n onDidActivatePlugin: $23c406735d46bb37$export$6f3aaf72a3cac830,\n onDidDeactivatePlugin: $23c406735d46bb37$export$8df1420526313195,\n onDidChangePluginOrder: $23c406735d46bb37$export$4f0668f248b15f12,\n minimapClass: $23c406735d46bb37$export$e3a0d8dffed34b4f,\n minimapForEditorElement: $23c406735d46bb37$export$fbfbb3bd6dc38def,\n minimapForEditor: $23c406735d46bb37$export$58c03b6c0d094c,\n standAloneMinimapForEditor: $23c406735d46bb37$export$bd03fcaa67c354fa,\n getActiveMinimap: $23c406735d46bb37$export$6f8e50201d28743,\n observeMinimaps: $23c406735d46bb37$export$b0030062932c3d3d,\n registerPlugin: $43704eddd45f8975$export$7612db19fb8beb1e,\n unregisterPlugin: $43704eddd45f8975$export$48d00697bf0841b0,\n togglePluginActivation: $43704eddd45f8975$export$8cf5509a1f8ee810,\n deactivateAllPlugins: $43704eddd45f8975$export$4751c4964dd9fdd5,\n activatePlugin: $43704eddd45f8975$export$c20a82b9d4db0e25,\n deactivatePlugin: $43704eddd45f8975$export$eca032c13825f076,\n getPluginsOrder: $43704eddd45f8975$export$b9b9891832107981\n};\nfunction $23c406735d46bb37$export$b956a56dda08a331() {\n return $23c406735d46bb37$var$MinimapServiceV1;\n}\n$parcel$exportWildcard(module.exports, $43704eddd45f8975$exports);\n\n\n//# sourceMappingURL=main.js.map\n","// Generated by CoffeeScript 2.5.1\n(function() {\n var callbackProperties, decorateElementClass, decorateElementPrototype, deprecate;\n\n ({deprecate} = require('grim'));\n\n if (global.__CUSTOM_HTML_ELEMENTS_CLASSES__ != null) {\n global.__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__ = global.__CUSTOM_HTML_ELEMENTS_CLASSES__;\n delete global.__CUSTOM_HTML_ELEMENTS_CLASSES__;\n } else {\n if (global.__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__ == null) {\n global.__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__ = {};\n }\n }\n\n callbackProperties = ['createdCallback', 'attachedCallback', 'detachedCallback', 'attributeChangedCallback'];\n\n decorateElementPrototype = function(target, source) {\n callbackProperties.forEach(function(k) {\n return Object.defineProperty(target, k, {\n value: function() {\n var ref;\n return (ref = this[`__${k}`]) != null ? ref.apply(this, arguments) : void 0;\n },\n writable: true,\n enumerable: true,\n configurable: true\n });\n });\n return Object.getOwnPropertyNames(source).forEach(function(k) {\n var descriptor;\n if (k === 'constructor') {\n return;\n }\n descriptor = Object.getOwnPropertyDescriptor(source, k);\n if (callbackProperties.indexOf(k) > -1) {\n return Object.defineProperty(target, `__${k}`, descriptor);\n } else {\n return Object.defineProperty(target, k, descriptor);\n }\n });\n };\n\n decorateElementClass = function(target, source) {\n return Object.getOwnPropertyNames(source).forEach(function(k) {\n var descriptor;\n if (k === 'length' || k === 'name' || k === 'arguments' || k === 'caller' || k === 'prototype') {\n return;\n }\n descriptor = Object.getOwnPropertyDescriptor(source, k);\n return Object.defineProperty(target, k, descriptor);\n });\n };\n\n module.exports = function(nodeName, options) {\n var elementClass, elementPrototype, klass, proto, ref;\n ({\n class: klass\n } = options);\n if (klass != null) {\n proto = klass.prototype;\n } else {\n proto = (ref = options.prototype) != null ? ref : options;\n }\n if (proto === options) {\n deprecate('Using the prototype as the second argument is deprecated, use the prototype option instead');\n }\n if (__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__[nodeName]) {\n elementClass = __ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__[nodeName];\n decorateElementPrototype(elementClass.prototype, proto);\n if (klass != null) {\n decorateElementClass(elementClass, klass);\n }\n return elementClass;\n } else {\n elementPrototype = Object.create(HTMLElement.prototype);\n decorateElementPrototype(elementPrototype, proto);\n elementClass = document.registerElement(nodeName, {\n prototype: Object.create(elementPrototype)\n });\n if (klass != null) {\n decorateElementClass(elementClass, klass);\n }\n return __ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__[nodeName] = elementClass;\n }\n };\n\n}).call(this);\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVnaXN0ZXItb3ItdXBkYXRlLWVsZW1lbnQuanMiLCJzb3VyY2VSb290IjoiLi4iLCJzb3VyY2VzIjpbImxpYi9yZWdpc3Rlci1vci11cGRhdGUtZWxlbWVudC5jb2ZmZWUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQUEsTUFBQSxrQkFBQSxFQUFBLG9CQUFBLEVBQUEsd0JBQUEsRUFBQTs7RUFBQSxDQUFBLENBQUMsU0FBRCxDQUFBLEdBQWMsT0FBQSxDQUFRLE1BQVIsQ0FBZDs7RUFFQSxJQUFHLCtDQUFIO0lBQ0UsTUFBTSxDQUFDLHFDQUFQLEdBQStDLE1BQU0sQ0FBQztJQUN0RCxPQUFPLE1BQU0sQ0FBQyxpQ0FGaEI7R0FBQSxNQUFBOztNQUlFLE1BQU0sQ0FBQyx3Q0FBeUMsQ0FBQTtLQUpsRDs7O0VBTUEsa0JBQUEsR0FBcUIsQ0FDbkIsaUJBRG1CLEVBRW5CLGtCQUZtQixFQUduQixrQk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50Q2xhc3MsIGtsYXNzKSBpZiBrbGFzcz9cblxuICAgIF9fQVRPTV9VVElMU19DVVNUT01fRUxFTUVOVF9DTEFTU0VTX19bbm9kZU5hbWVdID0gZWxlbWVudENsYXNzXG4iXX0=\n//# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/register-or-update-element.coffee","(function() {\n var Deprecation, Emitter, getRawStack, grim;\n\n Deprecation = require('./deprecation');\n\n if (global.__grim__ == null) {\n Emitter = require('event-kit').Emitter;\n grim = global.__grim__ = {\n deprecations: {},\n emitter: new Emitter,\n includeDeprecatedAPIs: true,\n getDeprecations: function() {\n var deprecation, deprecations, deprecationsByLineNumber, deprecationsByPackage, fileName, lineNumber, packageName, _ref;\n deprecations = [];\n _ref = grim.deprecations;\n for (fileName in _ref) {\n deprecationsByLineNumber = _ref[fileName];\n for (lineNumber in deprecationsByLineNumber) {\n deprecationsByPackage = deprecationsByLineNumber[lineNumber];\n for (packageName in deprecationsByPackage) {\n deprecation = deprecationsByPackage[packageName];\n deprecations.push(deprecation);\n }\n }\n }\n return deprecations;\n },\n getDeprecationsLength: function() {\n return this.getDeprecations().length;\n },\n clearDeprecations: function() {\n grim.deprecations = {};\n },\n logDeprecations: function() {\n var deprecation, deprecations, _i, _len;\n deprecations = this.getDeprecations();\n deprecations.sort(function(a, b) {\n return b.getCallCount() - a.getCallCount();\n });\n console.warn(\"\\nCalls to deprecated functions\\n-----------------------------\");\n for (_i = 0, _len = deprecations.length; _i < _len; _i++) {\n deprecation = deprecations[_i];\n console.warn(\"(\" + (deprecation.getCallCount()) + \") \" + (deprecation.getOriginName()) + \" : \" + (deprecation.getMessage()), deprecation);\n }\n },\n deprecate: function(message, metadata) {\n var deprecation, deprecationSite, error, fileName, lineNumber, originalStackTraceLimit, packageName, stack, _base, _base1, _base2, _ref, _ref1;\n originalStackTraceLimit = Error.stackTraceLimit;\n try {\n Error.stackTraceLimit = 7;\n error = new Error;\n stack = (_ref = typeof error.getRawStack === \"function\" ? error.getRawStack() : void 0) != null ? _ref : getRawStack(error);\n stack = stack.slice(1);\n } finally {\n Error.stackTraceLimit = originalStackTraceLimit;\n }\n deprecationSite = stack[0];\n fileName = deprecationSite.getFileName();\n lineNumber = deprecationSite.getLineNumber();\n packageName = (_ref1 = metadata != null ? metadata.packageName : void 0) != null ? _ref1 : \"\";\n if ((_base = grim.deprecations)[fileName] == null) {\n _base[fileName] = {};\n }\n if ((_base1 = grim.deprecations[fileName])[lineNumber] == null) {\n _base1[lineNumber] = {};\n }\n if ((_base2 = grim.deprecations[fileName][lineNumber])[packageName] == null) {\n _base2[packageName] = new Deprecation(message);\n }\n deprecation = grim.deprecations[fileName][lineNumber][packageName];\n deprecation.addStack(stack, metadata);\n grim.emitter.emit(\"updated\", deprecation);\n },\n addSerializedDeprecation: function(serializedDeprecation) {\n var deprecation, fileName, lineNumber, message, packageName, stack, stacks, _base, _base1, _base2, _i, _len, _ref, _ref1, _ref2;\n deprecation = Deprecation.deserialize(serializedDeprecation);\n message = deprecation.getMessage();\n fileName = deprecation.fileName, lineNumber = deprecation.lineNumber;\n stacks = deprecation.getStacks();\n packageName = (_ref = (_ref1 = stacks[0]) != null ? (_ref2 = _ref1.metadata) != null ? _ref2.packageName : void 0 : void 0) != null ? _ref : \"\";\n if ((_base = grim.deprecations)[fileName] == null) {\n _base[fileName] = {};\n }\n if ((_base1 = grim.deprecations[fileName])[lineNumber] == null) {\n _base1[lineNumber] = {};\n }\n if ((_base2 = grim.deprecations[fileName][lineNumber])[packageName] == null) {\n _base2[packageName] = new Deprecation(message, fileName, lineNumber);\n }\n deprecation = grim.deprecations[fileName][lineNumber][packageName];\n for (_i = 0, _len = stacks.length; _i < _len; _i++) {\n stack = stacks[_i];\n deprecation.addStack(stack, stack.metadata);\n }\n grim.emitter.emit(\"updated\", deprecation);\n },\n on: function(eventName, callback) {\n return grim.emitter.on(eventName, callback);\n }\n };\n }\n\n getRawStack = function(error) {\n var originalPrepareStackTrace, result;\n originalPrepareStackTrace = Error.prepareStackTrace;\n Error.prepareStackTrace = function(error, stack) {\n return stack;\n };\n Error.captureStackTrace(error, getRawStack);\n result = error.stack;\n Error.prepareStackTrace = originalPrepareStackTrace;\n return result;\n };\n\n module.exports = global.__grim__;\n\n}).call(this);\n","(function() {\n var Deprecation, SourceMapCache;\n\n SourceMapCache = {};\n\n module.exports = Deprecation = (function() {\n Deprecation.getFunctionNameFromCallsite = function(callsite) {};\n\n Deprecation.deserialize = function(_arg) {\n var deprecation, fileName, lineNumber, message, stack, stacks, _i, _len;\n message = _arg.message, fileName = _arg.fileName, lineNumber = _arg.lineNumber, stacks = _arg.stacks;\n deprecation = new Deprecation(message, fileName, lineNumber);\n for (_i = 0, _len = stacks.length; _i < _len; _i++) {\n stack = stacks[_i];\n deprecation.addStack(stack, stack.metadata);\n }\n return deprecation;\n };\n\n function Deprecation(message, fileName, lineNumber) {\n this.message = message;\n this.fileName = fileName;\n this.lineNumber = lineNumber;\n this.callCount = 0;\n this.stackCount = 0;\n this.stacks = {};\n this.stackCallCounts = {};\n }\n\n Deprecation.prototype.getFunctionNameFromCallsite = function(callsite) {\n var _ref, _ref1, _ref2;\n if (callsite.functionName != null) {\n return callsite.functionName;\n }\n if (callsite.isToplevel()) {\n return (_ref = callsite.getFunctionName()) != null ? _ref : '';\n } else {\n if (callsite.isConstructor()) {\n return \"new \" + (callsite.getFunctionName());\n } else if (callsite.getMethodName() && !callsite.getFunctionName()) {\n return callsite.getMethodName();\n } else {\n return \"\" + (callsite.getTypeName()) + \".\" + ((_ref1 = (_ref2 = callsite.getMethodName()) != null ? _ref2 : callsite.getFunctionName()) != null ? _ref1 : '');\n }\n }\n };\n\n Deprecation.prototype.getLocationFromCallsite = function(callsite) {\n var column, fileName, line;\n if (callsite == null) {\n return \"unknown\";\n }\n if (callsite.location != null) {\n return callsite.location;\n }\n if (callsite.isNative()) {\n return \"native\";\n } else if (callsite.isEval()) {\n return \"eval at \" + (this.getLocationFromCallsite(callsite.getEvalOrigin()));\n } else {\n fileName = callsite.getFileName();\n line = callsite.getLineNumber();\n column = callsite.getColumnNumber();\n return \"\" + fileName + \":\" + line + \":\" + column;\n }\n };\n\n Deprecation.prototype.getFileNameFromCallSite = function(callsite) {\n var _ref;\n return (_ref = callsite.fileName) != null ? _ref : callsite.getFileName();\n };\n\n Deprecation.prototype.getOriginName = function() {\n return this.originName;\n };\n\n Deprecation.prototype.getMessage = function() {\n return this.message;\n };\n\n Deprecation.prototype.getStacks = function() {\n var location, parsedStack, parsedStacks, stack, _ref;\n parsedStacks = [];\n _ref = this.stacks;\n for (location in _ref) {\n stack = _ref[location];\n parsedStack = this.parseStack(stack);\n parsedStack.callCount = this.stackCallCounts[location];\n parsedStack.metadata = stack.metadata;\n parsedStacks.push(parsedStack);\n }\n return parsedStacks;\n };\n\n Deprecation.prototype.getStackCount = function() {\n return this.stackCount;\n };\n\n Deprecation.prototype.getCallCount = function() {\n return this.callCount;\n };\n\n Deprecation.prototype.addStack = function(stack, metadata) {\n var callerLocation, _base, _base1;\n if (this.originName == null) {\n this.originName = this.getFunctionNameFromCallsite(stack[0]);\n }\n if (this.fileName == null) {\n this.fileName = this.getFileNameFromCallSite(stack[0]);\n }\n if (this.lineNumber == null) {\n this.lineNumber = typeof (_base = stack[0]).getLineNumber === \"function\" ? _base.getLineNumber() : void 0;\n }\n this.callCount++;\n stack.metadata = metadata;\n callerLocation = this.getLocationFromCallsite(stack[1]);\n if (this.stacks[callerLocation] == null) {\n this.stacks[callerLocation] = stack;\n this.stackCount++;\n }\n if ((_base1 = this.stackCallCounts)[callerLocation] == null) {\n _base1[callerLocation] = 0;\n }\n return this.stackCallCounts[callerLocation]++;\n };\n\n Deprecation.prototype.parseStack = function(stack) {\n return stack.map((function(_this) {\n return function(callsite) {\n return {\n functionName: _this.getFunctionNameFromCallsite(callsite),\n location: _this.getLocationFromCallsite(callsite),\n fileName: _this.getFileNameFromCallSite(callsite)\n };\n };\n })(this));\n };\n\n Deprecation.prototype.serialize = function() {\n return {\n message: this.getMessage(),\n lineNumber: this.lineNumber,\n fileName: this.fileName,\n stacks: this.getStacks()\n };\n };\n\n return Deprecation;\n\n })();\n\n}).call(this);\n","\"use strict\";\n\nexports.Emitter = require(\"./emitter\");\nexports.Disposable = require(\"./disposable\");\nexports.CompositeDisposable = require(\"./composite-disposable\");","\"use strict\";\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar Disposable = require(\"./disposable\");\n\nvar CompositeDisposable = require(\"./composite-disposable\"); // Essential: Utility class to be used when implementing event-based APIs that\n// allows for handlers registered via `::on` to be invoked with calls to\n// `::emit`. Instances of this class are intended to be used internally by\n// classes that expose an event-based API.\n//\n// For example:\n//\n// ```js\n// class User {\n// constructor() {\n// this.emitter = new Emitter()\n// }\n//\n// onDidChangeName(callback) {\n// this.emitter.on('did-change-name', callback)\n// }\n//\n// setName(name) {\n// if (name !== this.name) {\n// this.name = name\n// this.emitter.emit('did-change-name', name)\n// }\n//\n// return this.name\n// }\n// }\n// ```\n\n\nvar Emitter =\n/*#__PURE__*/\nfunction () {\n _createClass(Emitter, null, [{\n key: \"onEventHandlerException\",\n value: function onEventHandlerException(exceptionHandler) {\n var _this = this;\n\n if (this.exceptionHandlers.length === 0) {\n this.dispatch = this.exceptionHandlingDispatch;\n }\n\n this.exceptionHandlers.push(exceptionHandler);\n return new Disposable(function () {\n _this.exceptionHandlers.splice(_this.exceptionHandlers.indexOf(exceptionHandler), 1);\n\n if (_this.exceptionHandlers.length === 0) {\n return _this.dispatch = _this.simpleDispatch;\n }\n });\n }\n }, {\n key: \"simpleDispatch\",\n value: function simpleDispatch(handler, value) {\n return handler(value);\n }\n }, {\n key: \"exceptionHandlingDispatch\",\n value: function exceptionHandlingDispatch(handler, value) {\n try {\n return handler(value);\n } catch (exception) {\n return this.exceptionHandlers.map(function (exceptionHandler) {\n return exceptionHandler(exception);\n });\n }\n }\n /*\n Section: Construction and Destruction\n */\n // Public: Construct an emitter.\n //\n // ```js\n // this.emitter = new Emitter()\n // ```\n\n }]);\n\n function Emitter() {\n _classCallCheck(this, Emitter);\n\n this.disposed = false;\n this.clear();\n } // Public: Clear out any existing subscribers.\n\n\n _createClass(Emitter, [{\n key: \"clear\",\n value: function clear() {\n if (this.subscriptions != null) {\n this.subscriptions.dispose();\n }\n\n this.subscriptions = new CompositeDisposable();\n this.handlersByEventName = {};\n } // Public: Unsubscribe all handlers.\n\n }, {\n key: \"dispose\",\n value: function dispose() {\n this.subscriptions.dispose();\n this.handlersByEventName = null;\n this.disposed = true;\n }\n /*\n Section: Event Subscription\n */\n // Public: Register the given handler function to be invoked whenever events by\n // the given name are emitted via {::emit}.\n //\n // * `eventName` {String} naming the event that you want to invoke the handler\n // when emitted.\n // * `handler` {Function} to invoke when {::emit} is called with the given\n // event name.\n //\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\n\n }, {\n key: \"on\",\n value: function on(eventName, handler, unshift) {\n var _this2 = this;\n\n if (unshift == null) {\n unshift = false;\n }\n\n if (this.disposed) {\n throw new Error(\"Emitter has been disposed\");\n }\n\n if (typeof handler !== \"function\") {\n throw new Error(\"Handler must be a function\");\n }\n\n var currentHandlers = this.handlersByEventName[eventName];\n\n if (currentHandlers) {\n if (unshift) {\n this.handlersByEventName[eventName].unshift(handler);\n } else {\n this.handlersByEventName[eventName].push(handler);\n }\n } else {\n this.handlersByEventName[eventName] = [handler];\n } // When the emitter is disposed, we want to dispose of all subscriptions.\n // However, we also need to stop tracking disposables when they're disposed\n // from outside, otherwise this class will hold references to all the\n // disposables it created (instead of just the active ones).\n\n\n var cleanup = new Disposable(function () {\n _this2.subscriptions.remove(cleanup);\n\n return _this2.off(eventName, handler);\n });\n this.subscriptions.add(cleanup);\n return cleanup;\n } // Public: Register the given handler function to be invoked the next time an\n // events with the given name is emitted via {::emit}.\n //\n // * `eventName` {String} naming the event that you want to invoke the handler\n // when emitted.\n // * `handler` {Function} to invoke when {::emit} is called with the given\n // event name.\n //\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\n\n }, {\n key: \"once\",\n value: function once(eventName, handler, unshift) {\n if (unshift == null) {\n unshift = false;\n }\n\n var wrapped = function wrapped(value) {\n disposable.dispose();\n return handler(value);\n };\n\n var disposable = this.on(eventName, wrapped, unshift);\n return disposable;\n } // Public: Register the given handler function to be invoked *before* all\n // other handlers existing at the time of subscription whenever events by the\n // given name are emitted via {::emit}.\n //\n // Use this method when you need to be the first to handle a given event. This\n // could be required when a data structure in a parent object needs to be\n // updated before third-party event handlers registered on a child object via a\n // public API are invoked. Your handler could itself be preempted via\n // subsequent calls to this method, but this can be controlled by keeping\n // methods based on `::preempt` private.\n //\n // * `eventName` {String} naming the event that you want to invoke the handler\n // when emitted.\n // * `handler` {Function} to invoke when {::emit} is called with the given\n // event name.\n //\n // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.\n\n }, {\n key: \"preempt\",\n value: function preempt(eventName, handler) {\n return this.on(eventName, handler, true);\n } // Private: Used by the disposable.\n\n }, {\n key: \"off\",\n value: function off(eventName, handlerToRemove) {\n if (this.disposed) {\n return;\n }\n\n var handlers = this.handlersByEventName[eventName];\n\n if (handlers) {\n var handlerIndex = handlers.indexOf(handlerToRemove);\n\n if (handlerIndex >= 0) {\n handlers.splice(handlerIndex, 1);\n }\n\n if (handlers.length === 0) {\n delete this.handlersByEventName[eventName];\n }\n }\n }\n /*\n Section: Event Emission\n */\n // Public: Invoke handlers registered via {::on} for the given event name.\n //\n // * `eventName` The name of the event to emit. Handlers registered with {::on}\n // for the same name will be invoked.\n // * `value` Callbacks will be invoked with this value as an argument.\n\n }, {\n key: \"emit\",\n value: function emit(eventName, value) {\n var handlers = this.handlersByEventName && this.handlersByEventName[eventName];\n\n if (handlers) {\n // create a copy of `handlers` so that if any handler mutates `handlers`\n // (e.g. by calling `on` on this same emitter), this does not result in\n // changing the handlers being called during this same `emit`.\n var handlersCopy = handlers.slice();\n\n for (var i = 0; i < handlersCopy.length; i++) {\n this.constructor.dispatch(handlersCopy[i], value);\n }\n }\n }\n }, {\n key: \"emitAsync\",\n value: function emitAsync(eventName, value) {\n var _this3 = this;\n\n var handlers = this.handlersByEventName && this.handlersByEventName[eventName];\n\n if (handlers) {\n var promises = handlers.map(function (handler) {\n return _this3.constructor.dispatch(handler, value);\n });\n return Promise.all(promises).then(function () {});\n }\n\n return Promise.resolve();\n }\n }, {\n key: \"getEventNames\",\n value: function getEventNames() {\n return Object.keys(this.handlersByEventName);\n }\n }, {\n key: \"listenerCountForEventName\",\n value: function listenerCountForEventName(eventName) {\n var handlers = this.handlersByEventName[eventName];\n return handlers == null ? 0 : handlers.length;\n }\n }, {\n key: \"getTotalListenerCount\",\n value: function getTotalListenerCount() {\n var result = 0;\n\n var _arr = Object.keys(this.handlersByEventName);\n\n for (var _i = 0; _i < _arr.length; _i++) {\n var eventName = _arr[_i];\n result += this.handlersByEventName[eventName].length;\n }\n\n return result;\n }\n }]);\n\n return Emitter;\n}();\n\nEmitter.dispatch = Emitter.simpleDispatch;\nEmitter.exceptionHandlers = [];\nmodule.exports = Emitter;","\"use strict\";\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n// Essential: A handle to a resource that can be disposed. For example,\n// {Emitter::on} returns disposables representing subscriptions.\nmodule.exports =\n/*#__PURE__*/\nfunction () {\n _createClass(Disposable, null, [{\n key: \"isDisposable\",\n // Public: Ensure that `object` correctly implements the `Disposable`\n // contract.\n //\n // * `object` An {Object} you want to perform the check against.\n //\n // Returns a {Boolean} indicating whether `object` is a valid `Disposable`.\n value: function isDisposable(object) {\n return typeof (object != null ? object.dispose : undefined) === \"function\";\n }\n /*\n Section: Construction and Destruction\n */\n // Public: Construct a Disposable\n //\n // * `disposalAction` A {Function} to call when {::dispose} is called for the\n // first time.\n\n }]);\n\n function Disposable(disposalAction) {\n _classCallCheck(this, Disposable);\n\n this.disposed = false;\n this.disposalAction = disposalAction;\n } // Public: Perform the disposal action, indicating that the resource associated\n // with this disposable is no longer needed.\n //\n // You can call this method more than once, but the disposal action will only\n // be performed the first time.\n\n\n _createClass(Disposable, [{\n key: \"dispose\",\n value: function dispose() {\n if (!this.disposed) {\n this.disposed = true;\n\n if (typeof this.disposalAction === \"function\") {\n this.disposalAction();\n }\n\n this.disposalAction = null;\n }\n }\n }]);\n\n return Disposable;\n}();","\"use strict\";\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar CompositeDisposable;\nvar Disposable; // Essential: An object that aggregates multiple {Disposable} instances together\n// into a single disposable, so they can all be disposed as a group.\n//\n// These are very useful when subscribing to multiple events.\n//\n// ## Examples\n//\n// ```js\n// const {CompositeDisposable} = require('atom')\n//\n// class Something {\n// constructor() {\n// this.disposables = new CompositeDisposable()\n// const editor = atom.workspace.getActiveTextEditor()\n// this.disposables.add(editor.onDidChange(() => {})\n// this.disposables.add(editor.onDidChangePath(() => {})\n// }\n//\n// destroy() {\n// this.disposables.dispose();\n// }\n// }\n// ```\n\nmodule.exports =\n/*#__PURE__*/\nfunction () {\n /*\n Section: Construction and Destruction\n */\n // Public: Construct an instance, optionally with one or more disposables\n function CompositeDisposable() {\n _classCallCheck(this, CompositeDisposable);\n\n this.disposed = false;\n this.disposables = new Set();\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = arguments[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var disposable = _step.value;\n this.add(disposable);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n } // Public: Dispose all disposables added to this composite disposable.\n //\n // If this object has already been disposed, this method has no effect.\n\n\n _createClass(CompositeDisposable, [{\n key: \"dispose\",\n value: function dispose() {\n if (!this.disposed) {\n this.disposed = true;\n this.disposables.forEach(function (disposable) {\n return disposable.dispose();\n });\n this.disposables = null;\n }\n }\n /*\n Section: Managing Disposables\n */\n // Public: Add disposables to be disposed when the composite is disposed.\n //\n // If this object has already been disposed, this method has no effect.\n //\n // * `...disposables` {Disposable} instances or any objects with `.dispose()`\n // methods.\n\n }, {\n key: \"add\",\n value: function add() {\n if (!this.disposed) {\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n for (var _iterator2 = arguments[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var disposable = _step2.value;\n assertDisposable(disposable);\n this.disposables.add(disposable);\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return != null) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n }\n } // Public: Remove a previously added disposable.\n //\n // * `disposable` {Disposable} instance or any object with a `.dispose()`\n // method.\n\n }, {\n key: \"remove\",\n value: function remove(disposable) {\n if (!this.disposed) {\n this.disposables.delete(disposable);\n }\n } // Public: Alias to {CompositeDisposable::remove}\n\n }, {\n key: \"delete\",\n value: function _delete(disposable) {\n this.remove(disposable);\n } // Public: Clear all disposables. They will not be disposed by the next call\n // to dispose.\n\n }, {\n key: \"clear\",\n value: function clear() {\n if (!this.disposed) {\n this.disposables.clear();\n }\n }\n }]);\n\n return CompositeDisposable;\n}();\n\nfunction assertDisposable(disposable) {\n if (Disposable == null) {\n Disposable = require(\"./disposable\");\n }\n\n if (!Disposable.isDisposable(disposable)) {\n throw new TypeError(\"Arguments to CompositeDisposable.add must have a .dispose() method\");\n }\n}","// Generated by CoffeeScript 2.5.1\n(function() {\n var Ancestors, Mixin;\n\n Mixin = require('mixto');\n\n // Public\n module.exports = Ancestors = class Ancestors extends Mixin {\n /* Public */\n static parents(node, selector = '*') {\n var parents;\n parents = [];\n this.eachParent(node, function(parent) {\n if (typeof parent.matches === \"function\" ? parent.matches(selector) : void 0) {\n return parents.push(parent);\n }\n });\n return parents;\n }\n\n static eachParent(node, block) {\n var parent, results;\n parent = node.parentNode;\n if (parent != null) {\n block(parent);\n }\n results = [];\n while (parent = parent.parentNode) {\n if (parent != null) {\n results.push(block(parent));\n } else {\n results.push(void 0);\n }\n }\n return results;\n }\n\n parents(selector = '*') {\n return Ancestors.parents(this, selector);\n }\n\n queryParentSelectorAll(selector) {\n if (selector == null) {\n throw new Error('::queryParentSelectorAll requires a valid selector as argument');\n }\n return this.parents(selector);\n }\n\n queryParentSelector(selector) {\n if (selector == null) {\n throw new Error('::queryParentSelector requires a valid selector as argument');\n }\n return this.queryParentSelectorAll(selector)[0];\n }\n\n eachParent(block) {\n return Ancestors.eachParent(this, block);\n }\n\n };\n\n}).call(this);\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5jZXN0b3JzLmpzIiwic291cmNlUm9vdCI6Ii4uLy4uIiwic291cmNlcyI6WyJsaWIvbWl4aW5zL2FuY2VzdG9ycy5jb2ZmZWUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQUEsTUFBQSxTQUFBLEVBQUE7O0VBQUEsS0FBQSxHQUFRLE9BQUEsQ0FBUSxPQUFSLEVBQVI7OztFQUdBLE1BQU0sQ0FBQyxPQUFQLEdBQ00sWUFBTixNQUFBLFVBQUEsUUFBd0IsTUFBeEIsQ0FBQTs7SUFJWSxPQUFULE9BQVMsQ0FBQyxJQUFELEVBQU8sV0FBUyxHQUFoQixDQUFBO0FBQ1osVUFBQTtNQUFJLE9BQUEsR0FBVTtNQUNWLElBQUMsQ0FBQSxVQUFELENBQVksSUFBWixFQUFrQixRQUFBLENBQUMsTUFBRCxDQUFBO1FBQVksMkNBQXdCLE1BQU0sQ0FBQyxRQUFTLGtCQUF4QztpQkFBQSxPQUFPLENBQUMsSUFBUixDQUFhLE1BQWIsRUFBQTs7TUFBWixDQUFsQjthQUNBO0lBSFE7O0lBS0csT0FBWixVQUFZLENBQUMsSUFBRCxFQUFPLEtBQVAsQ0FBQTtBQUNmLFVBQUEsTUFBQSxFQUFBO01BQUksTUFBQSxHQUFTLElBQUksQ0FBQztNQUVkLElBQWlCLGNBQWpCO1FBQUEsS0FBQSxDQUFNLE1BQU4sRUFBQTs7QUFDQTthQUFNLE1BQUEsR0FBUyxNQUFNLENBQUMsVUFBdEI7UUFDRSxJQUFpQixjQUFqQjt1QkFBQSxLQUFBLENBQU0sTUF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cmVudE5vZGVcblxuICAgIGJsb2NrKHBhcmVudCkgaWYgcGFyZW50P1xuICAgIHdoaWxlIHBhcmVudCA9IHBhcmVudC5wYXJlbnROb2RlXG4gICAgICBibG9jayhwYXJlbnQpIGlmIHBhcmVudD9cblxuICBwYXJlbnRzOiAoc2VsZWN0b3I9JyonKSAtPiBBbmNlc3RvcnMucGFyZW50cyh0aGlzLCBzZWxlY3RvcilcblxuICBxdWVyeVBhcmVudFNlbGVjdG9yQWxsOiAoc2VsZWN0b3IpIC0+XG4gICAgdW5sZXNzIHNlbGVjdG9yP1xuICAgICAgdGhyb3cgbmV3IEVycm9yICc6OnF1ZXJ5UGFyZW50U2VsZWN0b3JBbGwgcmVxdWlyZXMgYSB2YWxpZCBzZWxlY3RvciBhcyBhcmd1bWVudCdcbiAgICBAcGFyZW50cyhzZWxlY3RvcilcblxuICBxdWVyeVBhcmVudFNlbGVjdG9yOiAoc2VsZWN0b3IpIC0+XG4gICAgdW5sZXNzIHNlbGVjdG9yP1xuICAgICAgdGhyb3cgbmV3IEVycm9yICc6OnF1ZXJ5UGFyZW50U2VsZWN0b3IgcmVxdWlyZXMgYSB2YWxpZCBzZWxlY3RvciBhcyBhcmd1bWVudCdcbiAgICBAcXVlcnlQYXJlbnRTZWxlY3RvckFsbChzZWxlY3RvcilbMF1cblxuICBlYWNoUGFyZW50OiAoYmxvY2spIC0+IEFuY2VzdG9ycy5lYWNoUGFyZW50KHRoaXMsIGJsb2NrKVxuIl19\n//# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/mixins/ancestors.coffee","(function() {\n var ExcludedClassProperties, ExcludedPrototypeProperties, Mixin, name;\n\n module.exports = Mixin = (function() {\n Mixin.includeInto = function(constructor) {\n var name, value, _ref;\n this.extend(constructor.prototype);\n for (name in this) {\n value = this[name];\n if (ExcludedClassProperties.indexOf(name) === -1) {\n if (!constructor.hasOwnProperty(name)) {\n constructor[name] = value;\n }\n }\n }\n return (_ref = this.included) != null ? _ref.call(constructor) : void 0;\n };\n\n Mixin.extend = function(object) {\n var name, _i, _len, _ref, _ref1;\n _ref = Object.getOwnPropertyNames(this.prototype);\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n name = _ref[_i];\n if (ExcludedPrototypeProperties.indexOf(name) === -1) {\n if (!object.hasOwnProperty(name)) {\n object[name] = this.prototype[name];\n }\n }\n }\n return (_ref1 = this.prototype.extended) != null ? _ref1.call(object) : void 0;\n };\n\n function Mixin() {\n if (typeof this.extended === \"function\") {\n this.extended();\n }\n }\n\n return Mixin;\n\n })();\n\n ExcludedClassProperties = ['__super__'];\n\n for (name in Mixin) {\n ExcludedClassProperties.push(name);\n }\n\n ExcludedPrototypeProperties = ['constructor', 'extended'];\n\n}).call(this);\n","// Generated by CoffeeScript 2.5.1\n(function() {\n var Disposable, DisposableEvents, Mixin;\n\n Mixin = require('mixto');\n\n ({Disposable} = require('atom'));\n\n module.exports = DisposableEvents = class DisposableEvents extends Mixin {\n addDisposableEventListener(object, event, listener, options) {\n object.addEventListener(event, listener, options);\n return new Disposable(function() {\n return object.removeEventListener(event, listener);\n });\n }\n\n };\n\n}).call(this);\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlzcG9zYWJsZS1ldmVudHMuanMiLCJzb3VyY2VSb290IjoiLi4vLi4iLCJzb3VyY2VzIjpbImxpYi9taXhpbnMvZGlzcG9zYWJsZS1ldmVudHMuY29mZmVlIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUFBLE1BQUEsVUFBQSxFQUFBLGdCQUFBLEVBQUE7O0VBQUEsS0FBQSxHQUFRLE9BQUEsQ0FBUSxPQUFSOztFQUNSLENBQUEsQ0FBQyxVQUFELENBQUEsR0FBZSxPQUFBLENBQVEsTUFBUixDQUFmOztFQUVBLE1BQU0sQ0FBQyxPQUFQLEdBQ00sbUJBQU4sTUFBQSxpQkFBQSxRQUErQixNQUEvQjtJQUNFLDBCQUE0QixDQUFDLE1BQUQsRUFBUyxLQUFULEVBQWdCLFFBQWhCLEVBQTBCLE9BQTFCLENBQUE7TUFDMUIsTUFBTSxDQUFDLGdCQUFQLENBQXdCLEtBQXhCLEVBQStCLFFBQS9CLEVBQXlDLE9BQXpDO2FBQ0EsSUFBSSxVQUFKLENBQWUsUUFBQSxDQUFBLENBQUE7ZUFBRyxNQUFNLENBQUMsbUJBQVAsQ0FBMkIsS0FBM0IsRUFBa0MsUUFBbEM7TUFBSCxDQUFmO0lBRjBCOztFQUQ5QjtBQUpBIiwic291cmNlc0NvbnRlbnQiOlsiTWl4aW4gPSByZXF1aXJlICdtaXh0bydcbntEaXNwb3NhYmxlfSA9IHJlcXVpcmUgJ2F0b20nXG5cbm1vZHVsZS5leHBvcnRzID1cbmNsYXNzIERpc3Bvc2FibGVFdmVudHMgZXh0ZW5kcyBNaXhpblxuICBhZGREaXNwb3NhYmxlRXZlbnRMaXN0ZW5lcjogKG9iamVjdCwgZXZlbnQsIGxpc3RlbmVyLCBvcHRpb25zKSAtPlxuICAgIG9iamVjdC5hZGRFdmVudExpc3RlbmVyIGV2ZW50LCBsaXN0ZW5lciwgb3B0aW9uc1xuICAgIG5ldyBEaXNwb3NhYmxlIC0+IG9iamVjdC5yZW1vdmVFdmVudExpc3RlbmVyIGV2ZW50LCBsaXN0ZW5lclxuIl19\n//# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/mixins/disposable-events.coffee","// Generated by CoffeeScript 2.5.1\n(function() {\n var CompositeDisposable, Disposable, DisposableEvents, EventsDelegation, Mixin, NO_SELECTOR, eachPair;\n\n Mixin = require('mixto');\n\n DisposableEvents = require('./disposable-events');\n\n ({Disposable, CompositeDisposable} = require('atom'));\n\n eachPair = function(object, callback) {\n var k, results, v;\n results = [];\n for (k in object) {\n v = object[k];\n results.push(callback(k, v));\n }\n return results;\n };\n\n NO_SELECTOR = '__NONE__';\n\n module.exports = EventsDelegation = (function() {\n class EventsDelegation extends Mixin {\n subscribeTo(object, selector, events, options) {\n var disposablesForObject, eventsForObject;\n if (!(object instanceof HTMLElement)) {\n [object, selector, events, options] = [this, object, selector, events];\n }\n if (typeof selector === 'object') {\n [events, selector, options] = [selector, NO_SELECTOR, events];\n }\n if (this.eventsMap == null) {\n this.eventsMap = new WeakMap();\n }\n if (this.disposablesMap == null) {\n this.disposablesMap = new WeakMap();\n }\n if (this.eventsMap.get(object) == null) {\n this.eventsMap.set(object, {});\n }\n if (this.disposablesMap.get(object) == null) {\n this.disposablesMap.set(object, {});\n }\n eventsForObject = this.eventsMap.get(object);\n disposablesForObject = this.disposablesMap.get(object);\n eachPair(events, (event, callback) => {\n if (eventsForObject[event] == null) {\n eventsForObject[event] = {};\n disposablesForObject[event] = this.createEventListener(object, event, options);\n }\n return eventsForObject[event][selector] = callback;\n });\n return new Disposable(() => {\n return this.unsubscribeFrom(object, selector, events);\n });\n }\n\n unsubscribeFrom(object, selector, events) {\n var disposablesForObject, event, eventsForObject;\n if (!(object instanceof HTMLElement)) {\n [object, selector, events] = [this, object, selector];\n }\n if (typeof selector === 'object') {\n [events, selector] = [selector, NO_SELECTOR];\n }\n if (!(eventsForObject = this.eventsMap.get(object))) {\n return;\n }\n for (event in events) {\n delete eventsForObject[event][selector];\n if (Object.keys(eventsForObject[event]).length === 0) {\n disposablesForObject = this.disposablesMap.get(object);\n disposablesForObject[event].dispose();\n delete disposablesForObject[event];\n delete eventsForObject[event];\n }\n }\n if (Object.keys(eventsForObject).length === 0) {\n this.eventsMap.delete(object);\n return this.disposablesMap.delete(object);\n }\n }\n\n createEventListener(object, event, options) {\n var listener;\n listener = (e) => {\n var eventsForObject, ref, target;\n if (!(eventsForObject = (ref = this.eventsMap.get(object)) != null ? ref[event] : void 0)) {\n return;\n }\n ({target} = e);\n this.decorateEvent(e);\n this.eachSelectorFromTarget(e, target, eventsForObject);\n if (!e.isPropagationStopped) {\n if (typeof eventsForObject[NO_SELECTOR] === \"function\") {\n eventsForObject[NO_SELECTOR](e);\n }\n }\n return true;\n };\n return this.addDisposableEventListener(object, event, listener, options);\n }\n\n eachSelectorFromTarget(event, target, eventsForObject) {\n return this.nodeAndItsAncestors(target, (node) => {\n if (event.isPropagationStopped) {\n return;\n }\n return this.eachSelector(eventsForObject, (selector, callback) => {\n var matched;\n matched = this.targetMatch(node, selector);\n if (event.isImmediatePropagationStopped || !matched) {\n return;\n }\n return callback(event);\n });\n });\n }\n\n eachSelector(eventsForObject, callback) {\n var i, key, keys, len;\n keys = Object.keys(eventsForObject);\n if (keys.indexOf(NO_SELECTOR) !== -1) {\n keys.splice(keys.indexOf(NO_SELECTOR), 1);\n }\n keys.sort(function(a, b) {\n return b.split(' ').length - a.split(' ').length;\n });\n for (i = 0, len = keys.length; i < len; i++) {\n key = keys[i];\n if (callback(key, eventsForObject[key])) {\n return true;\n }\n }\n return false;\n }\n\n targetMatch(target, selector) {\n var parent;\n if (target.matches(selector)) {\n return true;\n }\n parent = target.parentNode;\n while ((parent != null) && (parent.matches != null)) {\n if (parent.matches(selector)) {\n return true;\n }\n parent = parent.parentNode;\n }\n return false;\n }\n\n nodeAndItsAncestors(node, callback) {\n var parent, results;\n parent = node.parentNode;\n callback(node);\n results = [];\n while ((parent != null) && (parent.matches != null)) {\n callback(parent);\n results.push(parent = parent.parentNode);\n }\n return results;\n }\n\n decorateEvent(e) {\n var overriddenStop, overriddenStopImmediate;\n overriddenStop = Event.prototype.stopPropagation;\n e.stopPropagation = function() {\n this.isPropagationStopped = true;\n return overriddenStop.apply(this, arguments);\n };\n overriddenStopImmediate = Event.prototype.stopImmediatePropagation;\n return e.stopImmediatePropagation = function() {\n this.isImmediatePropagationStopped = true;\n return overriddenStopImmediate.apply(this, arguments);\n };\n }\n\n };\n\n DisposableEvents.includeInto(EventsDelegation);\n\n return EventsDelegation;\n\n }).call(this);\n\n}).call(this);\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnRzLWRlbGVnYXRpb24uanMiLCJ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cGFyZW50LnBhcmVudE5vZGVcblxuICAgIGZhbHNlXG5cbiAgbm9kZUFuZEl0c0FuY2VzdG9yczogKG5vZGUsIGNhbGxiYWNrKSAtPlxuICAgIHBhcmVudCA9IG5vZGUucGFyZW50Tm9kZVxuXG4gICAgY2FsbGJhY2sobm9kZSlcbiAgICB3aGlsZSBwYXJlbnQ/IGFuZCBwYXJlbnQubWF0Y2hlcz9cbiAgICAgIGNhbGxiYWNrKHBhcmVudClcbiAgICAgIHBhcmVudCA9IHBhcmVudC5wYXJlbnROb2RlXG5cbiAgZGVjb3JhdGVFdmVudDogKGUpIC0+XG4gICAgb3ZlcnJpZGRlblN0b3AgPSAgRXZlbnQ6OnN0b3BQcm9wYWdhdGlvblxuICAgIGUuc3RvcFByb3BhZ2F0aW9uID0gLT5cbiAgICAgIEBpc1Byb3BhZ2F0aW9uU3RvcHBlZCA9IHRydWVcbiAgICAgIG92ZXJyaWRkZW5TdG9wLmFwcGx5KHRoaXMsIGFyZ3VtZW50cylcblxuICAgIG92ZXJyaWRkZW5TdG9wSW1tZWRpYXRlID0gIEV2ZW50OjpzdG9wSW1tZWRpYXRlUHJvcGFnYXRpb25cbiAgICBlLnN0b3BJbW1lZGlhdGVQcm9wYWdhdGlvbiA9IC0+XG4gICAgICBAaXNJbW1lZGlhdGVQcm9wYWdhdGlvblN0b3BwZWQgPSB0cnVlXG4gICAgICBvdmVycmlkZGVuU3RvcEltbWVkaWF0ZS5hcHBseSh0aGlzLCBhcmd1bWVudHMpXG4iXX0=\n//# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/mixins/events-delegation.coffee","// Generated by CoffeeScript 2.5.1\n(function() {\n var BabelSpacePenDSL, Builder, Events, Mixin, SelfClosingTags, SpacePenDSL, Tags, Template;\n\n Mixin = require('mixto');\n\n Tags = 'a abbr address article aside audio b bdi bdo blockquote body button canvas caption cite code colgroup datalist dd del details dfn dialog div dl dt em fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header html i iframe ins kbd label legend li main map mark menu meter nav noscript object ol optgroup option output p pre progress q rp rt ruby s samp script section select small span strong style sub summary sup table tbody td textarea tfoot th thead time title tr u ul var video area base br col command embed hr img input keygen link meta param source track wbr'.split(/\\s+/);\n\n SelfClosingTags = {};\n\n 'area base br col command embed hr img input keygen link meta param source track wbr'.split(/\\s+/).forEach(function(tag) {\n return SelfClosingTags[tag] = true;\n });\n\n Events = 'blur change click dblclick error focus input keydown keypress keyup load mousedown mousemove mouseout mouseover mouseup resize scroll select submit unload'.split(/\\s+/);\n\n BabelSpacePenDSL = class BabelSpacePenDSL extends Mixin {\n buildContent() {\n if (this.constructor.content != null) {\n return SpacePenDSL.buildContent(this, this.constructor.content);\n }\n }\n\n };\n\n module.exports = SpacePenDSL = (function() {\n class SpacePenDSL extends Mixin {\n static includeInto(klass) {\n super.includeInto(klass);\n Object.defineProperty(klass, 'content', {\n enumerable: false,\n get: function() {\n return this.prototype.__content__;\n },\n set: function(value) {\n return this.prototype.__content__ = value;\n }\n });\n Object.defineProperty(klass.prototype, 'createdCallback', {\n enumerable: true,\n get: function() {\n return this.__create__;\n },\n set: function(value) {\n return this.__createdCallback__ = value;\n }\n });\n Object.defineProperty(klass.prototype, '__create__', {\n enumerable: true,\n value: function() {\n if (this.__content__ != null) {\n SpacePenDSL.buildContent(this, this.__content__);\n }\n if (this.__createdCallback__ != null) {\n return this.__createdCallback__();\n }\n }\n });\n return klass.useShadowRoot = function() {\n return klass.prototype.__useShadowRoot__ = true;\n };\n }\n\n static buildContent(element, content) {\n var html, root, template;\n template = new Template();\n content.call(template);\n [html] = template.buildHtml();\n root = element.__useShadowRoot__ ? root = element.shadowRoot = element.createShadowRoot() : root = element;\n root.innerHTML = html;\n return this.wireOutlets(element, root);\n }\n\n static wireOutlets(view, root) {\n var element, i, len, outlet, ref;\n ref = root.querySelectorAll('[outlet]');\n for (i = 0, len = ref.length; i < len; i++) {\n element = ref[i];\n outlet = element.getAttribute('outlet');\n view[outlet] = element;\n element.removeAttribute('outlet');\n }\n return void 0;\n }\n\n };\n\n SpacePenDSL.Babel = BabelSpacePenDSL;\n\n return SpacePenDSL;\n\n }).call(this);\n\n Template = (function() {\n class Template {\n constructor() {\n this.currentBuilder = new Builder();\n }\n\n subview(name, view) {\n return this.currentBuilder.subview(name, view);\n }\n\n text(string) {\n return this.currentBuilder.text(string);\n }\n\n tag(tagName, ...args) {\n return this.currentBuilder.tag(tagName, ...args);\n }\n\n raw(string) {\n return this.currentBuilder.raw(string);\n }\n\n buildHtml() {\n return this.currentBuilder.buildHtml();\n }\n\n };\n\n Tags.forEach(function(tagName) {\n return Template.prototype[tagName] = function(...args) {\n return this.currentBuilder.tag(tagName, ...args);\n };\n });\n\n return Template;\n\n }).call(this);\n\n Builder = class Builder {\n constructor() {\n this.document = [];\n this.postProcessingSteps = [];\n }\n\n buildHtml() {\n return [this.document.join(''), this.postProcessingSteps];\n }\n\n tag(name, ...args) {\n var options;\n options = this.extractOptions(args);\n this.openTag(name, options.attributes);\n if (SelfClosingTags.hasOwnProperty(name)) {\n if ((options.text != null) || (options.content != null)) {\n throw new Error(`Self-closing tag ${name} cannot have text or content`);\n }\n } else {\n if (typeof options.content === \"function\") {\n options.content();\n }\n if (options.text) {\n this.text(options.text);\n }\n return this.closeTag(name);\n }\n }\n\n openTag(name, attributes) {\n var attributeName, attributePairs, attributesString, value;\n if (this.document.length === 0) {\n if (attributes == null) {\n attributes = {};\n }\n }\n attributePairs = (function() {\n var results;\n results = [];\n for (attributeName in attributes) {\n value = attributes[attributeName];\n results.push(`${attributeName}=\\\"${value}\\\"`);\n }\n return results;\n })();\n attributesString = attributePairs.length ? \" \" + attributePairs.join(\" \") : \"\";\n return this.document.push(`<${name}${attributesString}>`);\n }\n\n closeTag(name) {\n return this.document.push(``);\n }\n\n text(string) {\n var escapedString;\n escapedString = string.replace(/&/g, '&').replace(/\"/g, '"').replace(/'/g, ''').replace(//g, '>');\n return this.document.push(escapedString);\n }\n\n raw(string) {\n return this.document.push(string);\n }\n\n subview(outletName, subview) {\n var subviewId;\n subviewId = `subview-${++idCounter}`;\n this.tag('div', {\n id: subviewId\n });\n return this.postProcessingSteps.push(function(view) {\n view[outletName] = subview;\n subview.parentView = view;\n return view.find(`div#${subviewId}`).replaceWith(subview);\n });\n }\n\n extractOptions(args) {\n var arg, i, len, options;\n options = {};\n for (i = 0, len = args.length; i < len; i++) {\n arg = args[i];\n switch (typeof arg) {\n case 'function':\n options.content = arg;\n break;\n case 'string':\n case 'number':\n options.text = arg.toString();\n break;\n default:\n options.attributes = arg;\n }\n }\n return options;\n }\n\n };\n\n}).call(this);\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BhY2UtcGVuLWRzbC5qcyIsInNvdXJjZVJvb3QiOiIuLi8uLiIsInNvdXJjZXMiOlsibGliL21peGlucy9zcGFjZS1wZW4tZHNsLmNvZmZlZSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7QUFBQSxNQUFBLGdCQUFBLEVBQUEsT0FBQSxFQUFBLE1BQUEsRUFBQSxLQUFBLEVBQUEsZUFBQSxFQUFBLFdBQUEsRUFBQSxJQUFBLEVBQUE7O0VBQUEsS0FBQSxHQUFRLE9BQUEsQ0FBUSxPQUFSOztFQUVSLElBQUEsR0FDRSxra0JBTytDLENBQUMsS0FQaEQsQ0FPc0QsS0FQdEQ7O0VBU0YsZUFBQSxHQUFrQixDQUFBOztFQUNsQixxRkFDa0IsQ0FBQyxLQURuQixDQUN5QixLQUR6QixDQUMrQixDQUFDLE9BRGhDLENBQ3dDLFFBQUEsQ0FBQyxHQUFELENBQUE7V0FBUyxlQUFlLENBQUMsR0FBRCxDQUFmLEdBQXVCO0VBQWhDLENBRHhDOztFQUdBLE1BQUEsR0FDRSw0SkFFNEMsQ0FBQyxLQUY3QyxDQUVtRCxLQUZuRDs7RUFJSSxtQkFBTixNQUFBLGlCQUFBLFFBQStCLE1BQS9CO0lBQ0UsWUFBYy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blxuICBzdWJ2aWV3OiAob3V0bGV0TmFtZSwgc3VidmlldykgLT5cbiAgICBzdWJ2aWV3SWQgPSBcInN1YnZpZXctI3srK2lkQ291bnRlcn1cIlxuICAgIEB0YWcgJ2RpdicsIGlkOiBzdWJ2aWV3SWRcbiAgICBAcG9zdFByb2Nlc3NpbmdTdGVwcy5wdXNoICh2aWV3KSAtPlxuICAgICAgdmlld1tvdXRsZXROYW1lXSA9IHN1YnZpZXdcbiAgICAgIHN1YnZpZXcucGFyZW50VmlldyA9IHZpZXdcbiAgICAgIHZpZXcuZmluZChcImRpdiMje3N1YnZpZXdJZH1cIikucmVwbGFjZVdpdGgoc3VidmlldylcblxuICBleHRyYWN0T3B0aW9uczogKGFyZ3MpIC0+XG4gICAgb3B0aW9ucyA9IHt9XG4gICAgZm9yIGFyZyBpbiBhcmdzXG4gICAgICBzd2l0Y2ggdHlwZW9mKGFyZylcbiAgICAgICAgd2hlbiAnZnVuY3Rpb24nXG4gICAgICAgICAgb3B0aW9ucy5jb250ZW50ID0gYXJnXG4gICAgICAgIHdoZW4gJ3N0cmluZycsICdudW1iZXInXG4gICAgICAgICAgb3B0aW9ucy50ZXh0ID0gYXJnLnRvU3RyaW5nKClcbiAgICAgICAgZWxzZVxuICAgICAgICAgIG9wdGlvbnMuYXR0cmlidXRlcyA9IGFyZ1xuICAgIG9wdGlvbnNcbiJdfQ==\n//# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/mixins/space-pen-dsl.coffee","const regexEscape = /[$()*+./?[\\\\\\]^{|}-]/g\nexport function escapeRegExp(string) {\n if (string) {\n return string.replace(regexEscape, \"\\\\$&\")\n } else {\n return \"\"\n }\n}\n\nconst regexDaherize = /([A-Z])|(_)/g\nexport function dasherize(string) {\n if (!string) {\n return \"\"\n }\n\n string = `${string[0].toLowerCase()}${string.slice(1)}`\n return string.replace(regexDaherize, function (m, letter) {\n if (letter) {\n return `-${letter.toLowerCase()}`\n } else {\n return \"-\"\n }\n })\n}\n\nexport function debounce(callback, wait) {\n let timeoutId\n return (...args) => {\n if (timeoutId !== undefined) {\n clearTimeout(timeoutId)\n }\n timeoutId = setTimeout(() => {\n callback(...args)\n }, wait)\n }\n}\n","\"use strict\"\n\n/**\n * Generates a decorator function to convert a class into a custom element through the `registerOrUpdateElement` method\n * from `atom-utils-plus`.\n *\n * The decorator will take care to return the generated element class so that you can just export it directly as\n * demonstrated below.\n *\n * As supported by the `registerOrUpdateElement` method, static member will be available on the new class.\n *\n * **Note: As there's some limitations when modifying the prototype of a custom element, if you need to inject element\n * callbacks (like `createdCallback`) through a mixin, the mixins should be included before converting the class as a\n * custom element. You'll be able to achieve that by placing the `include` decorator after the `element` one as shown in\n * the second example.**\n *\n * @param {string} elementName The node name of the element to register\n * @returns {void}\n * @element('dummy-element-name') export default class SomeClass {\n * // ...\n * }\n * @element('dummy-element-with-mixin')\n * @include(SomeMixin) export default class SomeClass {\n * // ...\n * }\n */\nexport default function element(cls, elementName) {\n if (!window.customElements.get(elementName)) {\n window.customElements.define(elementName, cls)\n }\n}\n","module.exports = (Promise.resolve(__parcel__require__(\"./\" + \"minimap-plugin-generator-element.f5282bf9.js\"))).then(() => parcelRequire('L6JvT'));","\"use strict\"\n\nimport { Emitter, CompositeDisposable } from \"atom\"\nimport { createMinimapElement } from \"./minimap-element\"\nimport Minimap from \"./minimap\"\nimport * as config from \"./config.json\"\nimport * as PluginManagement from \"./plugin-management\"\nimport { treeSitterWarning } from \"./performance-monitor\"\nimport { StyleReader } from \"atom-ide-base/commons-ui/dom-style-reader\"\nimport { debounce } from \"./deps/underscore-plus\"\n\nexport * as config from \"./config.json\"\nexport * from \"./plugin-management\"\nexport { default as Minimap } from \"./minimap\"\nexport { createMinimapElement } from \"./minimap-element\"\n\n/**\n * The `Minimap` package provides an eagle-eye view of text buffers.\n *\n * It also provides API for plugin packages that want to interact with the minimap and be available to the user through\n * the minimap settings.\n */\n\n/**\n * The activation state of the package.\n *\n * @type {boolean}\n * @access private\n */\nlet active = false\n/**\n * The toggle state of the package.\n *\n * @type {boolean}\n * @access private\n */\nlet toggled = false\n/**\n * The `Map` where Minimap instances are stored with the text editor they target as key.\n *\n * @type {Map}\n * @access private\n */\nexport let editorsMinimaps = null\n/**\n * The composite disposable that stores the package's subscriptions.\n *\n * @type {CompositeDisposable}\n * @access private\n */\nlet subscriptions = null\n/**\n * The disposable that stores the package's commands subscription.\n *\n * @type {Disposable}\n * @access private\n */\nlet subscriptionsOfCommands = null\n\n/**\n * The package's events emitter.\n *\n * @type {Emitter}\n * @access private\n */\nexport const emitter = new Emitter()\n\n/** StyleReader cache used for storing token colors */\nexport let styleReader = null\n\n/** Activates the minimap package. */\nexport function activate() {\n if (active) {\n return\n }\n\n subscriptionsOfCommands = atom.commands.add(\"atom-workspace\", {\n \"minimap:toggle\": () => {\n toggle()\n },\n \"minimap:generate-coffee-plugin\": async () => {\n await generatePlugin(\"coffee\")\n },\n \"minimap:generate-javascript-plugin\": async () => {\n await generatePlugin(\"javascript\")\n },\n \"minimap:generate-babel-plugin\": async () => {\n await generatePlugin(\"babel\")\n },\n })\n\n editorsMinimaps = new Map()\n styleReader = new StyleReader()\n\n subscriptions = new CompositeDisposable()\n active = true\n\n if (atom.config.get(\"minimap.autoToggle\")) {\n toggle()\n }\n}\n\n/**\n * Returns a {MinimapElement} for the passed-in model if it's a {Minimap}.\n *\n * @param {Minimap} model The model for which returning a view\n * @returns {MinimapElement}\n */\nexport function minimapViewProvider(model) {\n if (model instanceof Minimap) {\n let element = model.getMinimapElement()\n if (!element) {\n element = createMinimapElement()\n element.setModel(model)\n }\n return element\n }\n}\n\n/** Deactivates the minimap package. */\nexport function deactivate() {\n if (!active) {\n return\n }\n\n PluginManagement.deactivateAllPlugins()\n\n if (editorsMinimaps) {\n editorsMinimaps.forEach((value) => {\n value.destroy()\n })\n editorsMinimaps.clear()\n }\n\n subscriptions.dispose()\n subscriptionsOfCommands.dispose()\n styleReader.invalidateDOMStylesCache()\n toggled = false\n active = false\n}\n\nexport function getConfigSchema() {\n return config || atom.packages.getLoadedPackage(\"minimap\").metadata.configSchema\n}\n\n/** Toggles the minimap display. */\nexport function toggle() {\n if (!active) {\n return\n }\n\n if (toggled) {\n toggled = false\n\n if (editorsMinimaps) {\n editorsMinimaps.forEach((minimap) => {\n minimap.destroy()\n })\n editorsMinimaps.clear()\n }\n subscriptions.dispose()\n\n // HACK: this hack forces rerendering editor size which moves the scrollbar to the right once minimap is removed\n const wasMaximized = atom.isMaximized()\n const { width, height } = atom.getSize()\n atom.setSize(width, height)\n if (wasMaximized) {\n atom.maximize()\n }\n } else {\n toggled = true\n initSubscriptions()\n }\n styleReader.invalidateDOMStylesCache()\n}\n\n/**\n * Opens the plugin generation view.\n *\n * @param {string} template The name of the template to use\n */\nasync function generatePlugin(template) {\n const { createMinimapPluginGeneratorElement } = await import(\"./minimap-plugin-generator-element\")\n const view = createMinimapPluginGeneratorElement()\n view.template = template\n view.attach()\n}\n\n/**\n * Registers a callback to listen to the `did-activate` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidActivate(callback) {\n return emitter.on(\"did-activate\", callback)\n}\n\n/**\n * Registers a callback to listen to the `did-deactivate` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidDeactivate(callback) {\n return emitter.on(\"did-deactivate\", callback)\n}\n\n/**\n * Registers a callback to listen to the `did-create-minimap` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidCreateMinimap(callback) {\n return emitter.on(\"did-create-minimap\", callback)\n}\n\n/**\n * Registers a callback to listen to the `did-add-plugin` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidAddPlugin(callback) {\n return emitter.on(\"did-add-plugin\", callback)\n}\n\n/**\n * Registers a callback to listen to the `did-remove-plugin` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidRemovePlugin(callback) {\n return emitter.on(\"did-remove-plugin\", callback)\n}\n\n/**\n * Registers a callback to listen to the `did-activate-plugin` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidActivatePlugin(callback) {\n return emitter.on(\"did-activate-plugin\", callback)\n}\n\n/**\n * Registers a callback to listen to the `did-deactivate-plugin` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidDeactivatePlugin(callback) {\n return emitter.on(\"did-deactivate-plugin\", callback)\n}\n\n/**\n * Registers a callback to listen to the `did-change-plugin-order` event of the package.\n *\n * @param {function(event:Object):void} callback The callback function\n * @returns {Disposable} A disposable to stop listening to the event\n */\nexport function onDidChangePluginOrder(callback) {\n return emitter.on(\"did-change-plugin-order\", callback)\n}\n\n/**\n * Returns the `Minimap` class\n *\n * @returns {Function} The `Minimap` class constructor\n */\nexport function minimapClass() {\n return Minimap\n}\n\n/**\n * Returns the `Minimap` object associated to the passed-in `TextEditorElement`.\n *\n * @param {TextEditorElement} editorElement A text editor element\n * @returns {Minimap} The associated minimap\n */\nexport function minimapForEditorElement(editorElement) {\n if (!editorElement) {\n return\n }\n return minimapForEditor(editorElement.getModel())\n}\n\n/**\n * Returns the `Minimap` object associated to the passed-in `TextEditor`.\n *\n * @param {TextEditor} textEditor A text editor\n * @returns {Minimap} The associated minimap\n */\nexport function minimapForEditor(textEditor) {\n if (!textEditor) {\n return\n }\n if (!editorsMinimaps) {\n return\n }\n\n let minimap = editorsMinimaps.get(textEditor)\n\n if (minimap === undefined || minimap.destroyed) {\n minimap = new Minimap({ textEditor })\n editorsMinimaps.set(textEditor, minimap)\n\n const editorSubscription = textEditor.onDidDestroy(() => {\n if (editorsMinimaps) {\n editorsMinimaps.delete(textEditor)\n }\n if (minimap) {\n // just in case\n minimap.destroy()\n }\n editorSubscription.dispose()\n })\n // dispose the editorSubscription if minimap is deactivated before destroying the editor\n subscriptions.add(editorSubscription)\n }\n\n return minimap\n}\n\n/**\n * Returns a new stand-alone {Minimap} for the passed-in `TextEditor`.\n *\n * @param {TextEditor} textEditor A text editor instance to create a minimap for\n * @returns {Minimap} A new stand-alone Minimap for the passed-in editor\n */\nexport function standAloneMinimapForEditor(textEditor) {\n if (!textEditor) {\n return\n }\n\n return new Minimap({\n textEditor,\n standAlone: true,\n })\n}\n\n/**\n * Returns the `Minimap` associated to the active `TextEditor`.\n *\n * @returns {Minimap} The active Minimap\n */\nexport function getActiveMinimap() {\n return minimapForEditor(atom.workspace.getActiveTextEditor())\n}\n\n/**\n * Calls a function for each present and future minimaps.\n *\n * @param {function(minimap:Minimap):void} iterator A function to call with the existing and future minimaps\n * @returns {Disposable} A disposable to unregister the observer\n */\nexport function observeMinimaps(iterator) {\n if (!iterator) {\n return\n }\n\n if (editorsMinimaps) {\n editorsMinimaps.forEach((minimap) => {\n iterator(minimap)\n })\n }\n return onDidCreateMinimap((minimap) => {\n iterator(minimap)\n })\n}\n\n/**\n * Registers to the `observeTextEditors` method.\n *\n * @access private\n */\nfunction initSubscriptions() {\n const debounceUpdateStyles = debounce(updateStyles, 300)\n subscriptions.add(\n atom.workspace.observeTextEditors((textEditor) => {\n const minimap = minimapForEditor(textEditor)\n const minimapElement = minimapViewProvider(minimap)\n\n emitter.emit(\"did-create-minimap\", minimap)\n minimapElement.attach(textEditor.getElement())\n }),\n // empty color cache if the theme changes\n atom.themes.onDidChangeActiveThemes(debounceUpdateStyles),\n atom.styles.onDidUpdateStyleElement(debounceUpdateStyles),\n atom.styles.onDidAddStyleElement(debounceUpdateStyles),\n atom.styles.onDidRemoveStyleElement(debounceUpdateStyles),\n treeSitterWarning()\n )\n}\n\n/** Force update styles of minimap */\nfunction updateStyles() {\n styleReader.invalidateDOMStylesCache()\n editorsMinimaps.forEach((minimap) => {\n atom.views.getView(minimap).requestForcedUpdate()\n })\n}\n\n// The public exports included in the service:\nconst MinimapServiceV1 = {\n minimapViewProvider,\n getConfigSchema,\n onDidActivate,\n onDidDeactivate,\n onDidCreateMinimap,\n onDidAddPlugin,\n onDidRemovePlugin,\n onDidActivatePlugin,\n onDidDeactivatePlugin,\n onDidChangePluginOrder,\n minimapClass,\n minimapForEditorElement,\n minimapForEditor,\n standAloneMinimapForEditor,\n getActiveMinimap,\n observeMinimaps,\n registerPlugin: PluginManagement.registerPlugin,\n unregisterPlugin: PluginManagement.unregisterPlugin,\n togglePluginActivation: PluginManagement.togglePluginActivation,\n deactivateAllPlugins: PluginManagement.deactivateAllPlugins,\n activatePlugin: PluginManagement.activatePlugin,\n deactivatePlugin: PluginManagement.deactivatePlugin,\n getPluginsOrder: PluginManagement.getPluginsOrder,\n}\n\n/**\n * Returns the Minimap main module instance.\n *\n * @returns {Main} The Minimap main module instance.\n */\nexport function provideMinimapServiceV1() {\n return MinimapServiceV1\n}\n","\"use strict\"\n\nimport { CompositeDisposable, Disposable } from \"atom\"\nimport { EventsDelegation, AncestorsMethods } from \"atom-utils-plus\"\nimport elementResizeDetectorImport from \"element-resize-detector\"\nimport DecorationManagement from \"./decoration-management\"\n\nimport * as Main from \"./main\"\nimport CanvasDrawer from \"./mixins/canvas-drawer\"\nimport include from \"./decorators/include\"\nimport element from \"./decorators/element\"\n\nimport { createMinimapQuickSettingsElement } from \"./minimap-quick-settings-element\"\nconst elementResizeDetector = elementResizeDetectorImport({ strategy: \"scroll\" })\n\nconst SPEC_MODE = atom.inSpecMode()\nconst TAG_NAME = \"atom-text-editor-minimap\"\n\n/**\n * Public: The MinimapElement is the view meant to render a {@link Minimap} instance in the DOM.\n *\n * You can retrieve the MinimapElement associated to a Minimap using the `atom.views.getView` method.\n *\n * Note that most interactions with the Minimap package is done through the Minimap model so you should never have to\n * access MinimapElement instances.\n *\n * @example Let minimapElement = atom.views.getView(minimap)\n */\nclass MinimapElement extends HTMLElement {\n static initClass() {\n include(this, CanvasDrawer, EventsDelegation, AncestorsMethods)\n element(this, TAG_NAME)\n }\n\n // ## ## ####### ####### ## ## ######\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## ## ##\n // ######### ## ## ## ## ##### ######\n // ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ####### ####### ## ## ######\n\n /**\n * DOM callback invoked when a new MinimapElement is created.\n *\n * @access private\n */\n createdCallback() {\n // Core properties\n\n /** @access private */\n this.minimap = undefined\n\n /** @access private */\n this.width = undefined\n /** @access private */\n this.height = undefined\n\n // Subscriptions\n\n /** @access private */\n this.subscriptions = new CompositeDisposable()\n /** @access private */\n this.visibleAreaSubscription = undefined\n /** @access private */\n this.quickSettingsSubscription = undefined\n /** @access private */\n this.dragSubscription = undefined\n /** @access private */\n this.openQuickSettingSubscription = undefined\n\n // Configs\n\n /** @access private */\n this.minimapScrollIndicator = undefined\n /** @access private */\n this.displayMinimapOnLeft = undefined\n /** @access private */\n this.displayPluginsControls = undefined\n /** @access private */\n this.textOpacity = undefined\n /** @access private */\n this.displayCodeHighlights = undefined\n /** @access private */\n this.adjustToSoftWrap = undefined\n /** @access private */\n this.useHardwareAcceleration = undefined\n /** @access private */\n this.absoluteMode = undefined\n\n // Elements\n\n /** @access private */\n this.visibleArea = undefined\n /** @access private */\n this.controls = undefined\n /** @access private */\n this.scrollIndicator = undefined\n /** @access private */\n this.openQuickSettings = undefined\n /** @access private */\n this.quickSettingsElement = undefined\n\n this.DecorationManagement = new DecorationManagement()\n\n // States\n\n /** @access private */\n this.attached = undefined\n /** @access private */\n this.attachedToTextEditor = undefined\n /** @access private */\n this.standAlone = undefined\n /** @access private */\n this.wasVisible = undefined\n\n // Other\n\n /** @access private */\n this.offscreenFirstRow = undefined\n /** @access private */\n this.offscreenLastRow = undefined\n /** @access private */\n this.frameRequested = undefined\n /** @access private */\n this.flexBasis = undefined\n\n this.initializeContent()\n\n this.subscriptions.add(\n atom.config.observe(\"minimap.displayMinimapOnLeft\", (displayMinimapOnLeft) => {\n this.displayMinimapOnLeft = displayMinimapOnLeft\n\n this.updateMinimapFlexPosition()\n this.measureHeightAndWidth(true, true)\n }),\n\n atom.config.observe(\"minimap.minimapScrollIndicator\", (minimapScrollIndicator) => {\n this.minimapScrollIndicator = minimapScrollIndicator\n\n if (this.minimapScrollIndicator && !(this.scrollIndicator != null) && !this.standAlone) {\n this.initializeScrollIndicator()\n } else if (this.scrollIndicator != null) {\n this.disposeScrollIndicator()\n }\n\n if (this.attached) {\n this.requestUpdate()\n }\n }),\n\n atom.config.observe(\"minimap.displayPluginsControls\", (displayPluginsControls) => {\n this.displayPluginsControls = displayPluginsControls\n\n if (this.displayPluginsControls && !(this.openQuickSettings != null) && !this.standAlone) {\n this.initializeOpenQuickSettings()\n } else if (this.openQuickSettings != null) {\n this.disposeOpenQuickSettings()\n }\n }),\n\n atom.config.observe(\"minimap.textOpacity\", (textOpacity) => {\n this.textOpacity = textOpacity\n\n if (this.attached) {\n this.requestForcedUpdate()\n }\n }),\n\n atom.config.observe(\"minimap.displayCodeHighlights\", (displayCodeHighlights) => {\n this.displayCodeHighlights = displayCodeHighlights\n\n if (this.attached) {\n this.requestForcedUpdate()\n }\n }),\n\n atom.config.observe(\"minimap.smoothScrolling\", (smoothScrolling) => {\n this.smoothScrolling = smoothScrolling\n\n if (this.attached) {\n if (!this.smoothScrolling) {\n this.backLayer.canvas.style.cssText = \"\"\n this.tokensLayer.canvas.style.cssText = \"\"\n this.frontLayer.canvas.style.cssText = \"\"\n } else {\n this.requestUpdate()\n }\n }\n }),\n\n atom.config.observe(\"minimap.adjustMinimapWidthToSoftWrap\", (adjustToSoftWrap) => {\n this.adjustToSoftWrap = adjustToSoftWrap\n\n if (this.attached) {\n this.measureHeightAndWidth()\n }\n }),\n\n atom.config.observe(\"minimap.adjustMinimapWidthOnlyIfSmaller\", (adjustOnlyIfSmaller) => {\n this.adjustOnlyIfSmaller = adjustOnlyIfSmaller\n\n if (this.attached) {\n this.measureHeightAndWidth()\n }\n }),\n\n atom.config.observe(\"minimap.useHardwareAcceleration\", (useHardwareAcceleration) => {\n this.useHardwareAcceleration = useHardwareAcceleration\n\n if (this.attached) {\n this.requestUpdate()\n }\n }),\n\n atom.config.observe(\"minimap.absoluteMode\", (absoluteMode) => {\n this.absoluteMode = absoluteMode\n\n this.classList.toggle(\"absolute\", this.absoluteMode)\n }),\n\n atom.config.observe(\"minimap.adjustAbsoluteModeHeight\", (adjustAbsoluteModeHeight) => {\n this.adjustAbsoluteModeHeight = adjustAbsoluteModeHeight\n\n this.classList.toggle(\"adjust-absolute-height\", this.adjustAbsoluteModeHeight)\n\n if (this.attached) {\n this.measureHeightAndWidth()\n }\n }),\n\n atom.config.observe(\"minimap.ignoreWhitespacesInTokens\", (ignoreWhitespacesInTokens) => {\n this.ignoreWhitespacesInTokens = ignoreWhitespacesInTokens\n\n if (this.attached) {\n this.requestForcedUpdate()\n }\n }),\n\n atom.config.observe(\"editor.preferredLineLength\", () => {\n if (this.attached) {\n this.measureHeightAndWidth()\n }\n }),\n\n atom.config.observe(\"editor.softWrap\", () => {\n if (this.attached) {\n this.requestUpdate()\n }\n }),\n\n atom.config.observe(\"editor.showInvisibles\", () => {\n if (this.attached) {\n this.requestUpdate()\n }\n }),\n\n atom.config.observe(\"editor.invisibles\", () => {\n if (this.attached) {\n this.requestUpdate()\n }\n }),\n\n atom.config.observe(\"editor.softWrapAtPreferredLineLength\", () => {\n if (this.attached) {\n this.requestUpdate()\n }\n })\n )\n }\n\n /**\n * DOM callback invoked when a new MinimapElement is attached to the DOM.\n *\n * @access private\n */\n connectedCallback() {\n if (typeof atom.views.pollDocument === \"function\") {\n this.subscriptions.add(\n atom.views.pollDocument(() => {\n this.pollDOM()\n })\n )\n } else {\n this.intersectionObserver = new IntersectionObserver((entries) => {\n const { intersectionRect } = entries[entries.length - 1]\n if (intersectionRect.width > 0 || intersectionRect.height > 0) {\n this.measureHeightAndWidth(true, true)\n }\n })\n\n this.intersectionObserver.observe(this)\n if (this.isVisible()) {\n this.measureHeightAndWidth(true, true)\n }\n\n const measureDimensions = () => {\n this.measureHeightAndWidth(false, false)\n }\n elementResizeDetector.listenTo(this, measureDimensions)\n window.addEventListener(\"resize\", measureDimensions, { passive: true })\n\n this.subscriptions.add(\n new Disposable(() => {\n elementResizeDetector.removeListener(this, measureDimensions)\n }),\n new Disposable(() => {\n window.removeEventListener(\"resize\", measureDimensions)\n })\n )\n }\n\n this.measureHeightAndWidth()\n this.updateMinimapFlexPosition()\n this.attached = true\n this.attachedToTextEditor = this.queryParentSelector(\"atom-text-editor\") === this.minimap.getTextEditorElement()\n\n if (this.attachedToTextEditor) {\n this.minimap.getTextEditorElement().setAttribute(\"with-minimap\", this.displayMinimapOnLeft ? \"left\" : \"right\")\n }\n\n this.subscriptions.add(this.subscribeToMediaQuery())\n }\n\n /**\n * DOM callback invoked when a new MinimapElement is detached from the DOM.\n *\n * @access private\n */\n disconnectedCallback() {\n this.minimap.getTextEditorElement().removeAttribute(\"with-minimap\")\n this.attached = false\n }\n\n // ### ######## ######## ### ###### ## ##\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## #########\n // ######### ## ## ######### ## ## ##\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ###### ## ##\n\n /**\n * Returns whether the MinimapElement is currently visible on screen or not.\n *\n * The visibility of the minimap is defined by testing the size of the offset width and height of the element.\n *\n * @returns {boolean} Whether the MinimapElement is currently visible or not\n */\n isVisible() {\n return this.offsetWidth > 0 || this.offsetHeight > 0\n }\n\n /**\n * Attaches the MinimapElement to the DOM.\n *\n * The position at which the element is attached is defined by the `displayMinimapOnLeft` setting.\n *\n * @param {HTMLElement} [parent] The DOM node where attaching the minimap element\n */\n attach(parent) {\n if (this.attached) {\n return\n }\n\n const container = parent || this.minimap.getTextEditorElement()\n const minimaps = container.querySelectorAll(TAG_NAME)\n if (minimaps.length) {\n Array.prototype.forEach.call(minimaps, (el) => {\n el.destroy()\n try {\n container.removeChild(el)\n } catch (e) {\n // TODO: ignore for now\n // https://github.com/atom-minimap/minimap/issues/766#issuecomment-762496374\n }\n })\n }\n container.appendChild(this)\n }\n\n /** Detaches the MinimapElement from the DOM. */\n detach() {\n if (!this.attached || this.parentNode == null) {\n return\n }\n this.parentNode.removeChild(this)\n }\n\n /**\n * Toggles the minimap left/right position based on the value of the `displayMinimapOnLeft` setting.\n *\n * @access private\n */\n updateMinimapFlexPosition() {\n this.classList.toggle(\"left\", this.displayMinimapOnLeft)\n if (this.attachedToTextEditor) {\n this.minimap.getTextEditorElement().setAttribute(\"with-minimap\", this.displayMinimapOnLeft ? \"left\" : \"right\")\n }\n }\n\n /** Destroys this MinimapElement */\n destroy() {\n this.DecorationManagement.destroy()\n if (this.quickSettingsElement) {\n this.quickSettingsElement.destroy()\n }\n this.subscriptions.dispose()\n this.detach()\n }\n\n // ###### ####### ## ## ######## ######## ## ## ########\n // ## ## ## ## ### ## ## ## ### ## ##\n // ## ## ## #### ## ## ## #### ## ##\n // ## ## ## ## ## ## ## ###### ## ## ## ##\n // ## ## ## ## #### ## ## ## #### ##\n // ## ## ## ## ## ### ## ## ## ### ##\n // ###### ####### ## ## ## ######## ## ## ##\n\n /**\n * Creates the content of the MinimapElement and attaches the mouse control event listeners.\n *\n * @access private\n */\n initializeContent() {\n this.initializeCanvas()\n\n this.attachCanvases(this)\n\n this.createVisibleArea()\n this.createControls()\n\n this.subscriptions.add(\n this.subscribeTo(\n this,\n {\n mousewheel: (e) => {\n if (!this.standAlone && this.minimap.onMouseWheel) {\n this.minimap.onMouseWheel(e)\n }\n },\n },\n { passive: true }\n ),\n\n this.subscribeTo(\n this.getFrontCanvas(),\n {\n mousedown: (e) => {\n this.canvasPressed(extractMouseEventData(e))\n },\n touchstart: (e) => {\n this.canvasPressed(extractTouchEventData(e))\n },\n },\n { passive: true }\n )\n )\n }\n\n /**\n * Initializes the visible area div.\n *\n * @access private\n */\n createVisibleArea() {\n if (this.visibleArea) {\n return\n }\n\n this.visibleArea = document.createElement(\"div\")\n this.visibleArea.classList.add(\"minimap-visible-area\")\n this.appendChild(this.visibleArea)\n this.visibleAreaSubscription = this.subscribeTo(\n this.visibleArea,\n {\n mousedown: (e) => {\n this.startDrag(extractMouseEventData(e))\n },\n touchstart: (e) => {\n this.startDrag(extractTouchEventData(e))\n },\n },\n { passive: true }\n )\n\n this.subscriptions.add(this.visibleAreaSubscription)\n }\n\n /**\n * Removes the visible area div.\n *\n * @access private\n */\n removeVisibleArea() {\n if (!this.visibleArea) {\n return\n }\n\n this.subscriptions.remove(this.visibleAreaSubscription)\n this.visibleAreaSubscription.dispose()\n this.removeChild(this.visibleArea)\n delete this.visibleArea\n }\n\n /**\n * Creates the controls container div.\n *\n * @access private\n */\n createControls() {\n if (this.controls || this.standAlone) {\n return\n }\n\n this.controls = document.createElement(\"div\")\n this.controls.classList.add(\"minimap-controls\")\n this.appendChild(this.controls)\n }\n\n /**\n * Removes the controls container div.\n *\n * @access private\n */\n removeControls() {\n if (!this.controls) {\n return\n }\n\n this.removeChild(this.controls)\n delete this.controls\n }\n\n /**\n * Initializes the scroll indicator div when the `minimapScrollIndicator` settings is enabled.\n *\n * @access private\n */\n initializeScrollIndicator() {\n if (this.scrollIndicator || this.standAlone) {\n return\n }\n\n this.scrollIndicator = document.createElement(\"div\")\n this.scrollIndicator.classList.add(\"minimap-scroll-indicator\")\n this.controls.appendChild(this.scrollIndicator)\n }\n\n /**\n * Disposes the scroll indicator div when the `minimapScrollIndicator` settings is disabled.\n *\n * @access private\n */\n disposeScrollIndicator() {\n if (!this.scrollIndicator) {\n return\n }\n\n this.controls.removeChild(this.scrollIndicator)\n delete this.scrollIndicator\n }\n\n /**\n * Initializes the quick settings openener div when the `displayPluginsControls` setting is enabled.\n *\n * @access private\n */\n initializeOpenQuickSettings() {\n if (this.openQuickSettings || this.standAlone) {\n return\n }\n\n this.openQuickSettings = document.createElement(\"div\")\n this.openQuickSettings.classList.add(\"open-minimap-quick-settings\")\n this.controls.appendChild(this.openQuickSettings)\n\n this.openQuickSettingSubscription = this.subscribeTo(this.openQuickSettings, {\n mousedown: (e) => {\n e.preventDefault()\n e.stopPropagation()\n\n if (this.quickSettingsElement != null) {\n this.quickSettingsElement.destroy()\n this.quickSettingsSubscription.dispose()\n } else {\n this.quickSettingsElement = createMinimapQuickSettingsElement()\n this.quickSettingsElement.setModel(this)\n this.quickSettingsSubscription = this.quickSettingsElement.onDidDestroy(() => {\n this.quickSettingsElement = null\n })\n\n const { top, left, right } = this.getFrontCanvas().getBoundingClientRect()\n this.quickSettingsElement.style.top = `${top}px`\n this.quickSettingsElement.attach()\n\n if (this.displayMinimapOnLeft) {\n this.quickSettingsElement.style.left = `${right}px`\n } else {\n this.quickSettingsElement.style.left = `${left - this.quickSettingsElement.clientWidth}px`\n }\n }\n },\n })\n }\n\n /**\n * Disposes the quick settings openener div when the `displayPluginsControls` setting is disabled.\n *\n * @access private\n */\n disposeOpenQuickSettings() {\n if (!this.openQuickSettings) {\n return\n }\n\n this.controls.removeChild(this.openQuickSettings)\n this.openQuickSettingSubscription.dispose()\n delete this.openQuickSettings\n }\n\n /**\n * Get the DecorationManagement API for minimapElement\n *\n * @returns {DecorationManagement}\n */\n getDecorationManagement() {\n return this.DecorationManagement\n }\n\n // ## ## ####### ######## ######## ##\n // ### ### ## ## ## ## ## ##\n // #### #### ## ## ## ## ## ##\n // ## ### ## ## ## ## ## ###### ##\n // ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## ##\n // ## ## ####### ######## ######## ########\n\n /**\n * Returns the Minimap for which this MinimapElement was created.\n *\n * @returns {Minimap} This element's Minimap\n */\n getModel() {\n return this.minimap\n }\n\n /**\n * Defines the Minimap model for this MinimapElement instance.\n *\n * @param {Minimap} minimap The Minimap model for this instance.\n * @returns {Minimap} This element's Minimap\n */\n setModel(minimap) {\n this.minimap = minimap\n\n // set minimapElement for Minimap\n this.minimap.minimapElement = this\n\n this.DecorationManagement.initializeDecorations(this.minimap)\n\n this.subscriptions.add(\n this.minimap.onDidChangeScrollTop(() => {\n this.requestUpdate()\n }),\n\n this.minimap.onDidChangeScrollLeft(() => {\n this.requestUpdate()\n }),\n\n this.minimap.onDidDestroy(() => {\n this.destroy()\n }),\n\n this.minimap.onDidChangeConfig(() => {\n if (this.attached) {\n return this.requestForcedUpdate()\n }\n }),\n\n this.minimap.onDidChangeStandAlone(() => {\n this.setStandAlone(this.minimap.isStandAlone())\n this.requestUpdate()\n }),\n\n this.minimap.onDidChange((change) => {\n this.pendingChanges.push(change)\n this.requestUpdate()\n }),\n\n this.DecorationManagement.onDidChangeDecorationRange((change) => {\n const { type } = change\n if (type === \"line\" || type === \"highlight-under\" || type === \"background-custom\") {\n this.pendingBackDecorationChanges.push(change)\n } else {\n this.pendingFrontDecorationChanges.push(change)\n }\n this.requestUpdate()\n }),\n\n Main.onDidChangePluginOrder(() => {\n this.requestForcedUpdate()\n })\n )\n\n this.setStandAlone(this.minimap.isStandAlone())\n\n if (this.width != null && this.height != null) {\n this.minimap.setScreenHeightAndWidth(this.height, this.width)\n }\n\n return this.minimap\n }\n\n /**\n * Sets the stand-alone mode for this MinimapElement.\n *\n * @param {boolean} standAlone The new mode for this MinimapElement\n */\n setStandAlone(standAlone) {\n this.standAlone = standAlone\n\n if (this.standAlone) {\n this.setAttribute(\"stand-alone\", true)\n this.disposeScrollIndicator()\n this.disposeOpenQuickSettings()\n this.removeControls()\n this.removeVisibleArea()\n } else {\n this.removeAttribute(\"stand-alone\")\n this.createVisibleArea()\n this.createControls()\n if (this.minimapScrollIndicator) {\n this.initializeScrollIndicator()\n }\n if (this.displayPluginsControls) {\n this.initializeOpenQuickSettings()\n }\n }\n }\n\n // ## ## ######## ######## ### ######## ########\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## ## ## ##\n // ## ## ######## ## ## ## ## ## ######\n // ## ## ## ## ## ######### ## ##\n // ## ## ## ## ## ## ## ## ##\n // ####### ## ######## ## ## ## ########\n\n /** Requests an update to be performed on the next frame. */\n requestUpdate() {\n if (this.frameRequested) {\n return\n }\n\n this.frameRequested = true\n requestAnimationFrame(() => {\n this.update()\n this.frameRequested = false\n })\n }\n\n /** Requests an update to be performed on the next frame that will completely redraw the minimap. */\n requestForcedUpdate() {\n this.offscreenFirstRow = null\n this.offscreenLastRow = null\n this.requestUpdate()\n }\n\n /**\n * Performs the actual MinimapElement update.\n *\n * @access private\n */\n update() {\n if (!(this.attached && this.isVisible() && this.minimap)) {\n return\n }\n const minimap = this.minimap\n minimap.enableCache()\n const canvas = this.getFrontCanvas()\n\n const devicePixelRatio = this.minimap.getDevicePixelRatio()\n const visibleAreaLeft = minimap.getTextEditorScaledScrollLeft()\n const visibleAreaTop = minimap.getTextEditorScaledScrollTop() - minimap.getScrollTop()\n const width = Math.min(canvas.width / devicePixelRatio, this.width)\n const visibleWidth = width + visibleAreaLeft\n\n if (this.adjustToSoftWrap && this.flexBasis) {\n this.style.flexBasis = `${this.flexBasis}px`\n this.style.width = `${this.flexBasis}px`\n } else {\n this.style.flexBasis = null\n this.style.width = null\n }\n\n if (SPEC_MODE) {\n applyStyles(this.visibleArea, {\n width: `${Math.round(visibleWidth)}px`,\n height: `${Math.round(minimap.getTextEditorScaledHeight())}px`,\n top: `${Math.round(visibleAreaTop)}px`,\n \"border-left-width\": `${Math.round(visibleAreaLeft)}px`,\n })\n } else {\n applyStyles(this.visibleArea, {\n width: `${Math.round(visibleWidth)}px`,\n height: `${Math.round(minimap.getTextEditorScaledHeight())}px`,\n transform: makeTranslate(0, visibleAreaTop, this.useHardwareAcceleration),\n \"border-left-width\": `${Math.round(visibleAreaLeft)}px`,\n })\n }\n\n applyStyles(this.controls, { width: `${Math.round(width)}px` })\n\n const canvasTop = minimap.getFirstVisibleScreenRow() * minimap.getLineHeight() - minimap.getScrollTop()\n\n if (this.smoothScrolling) {\n if (SPEC_MODE) {\n applyStyles(this.backLayer.canvas, { top: `${canvasTop}px` })\n applyStyles(this.tokensLayer.canvas, { top: `${canvasTop}px` })\n applyStyles(this.frontLayer.canvas, { top: `${canvasTop}px` })\n } else {\n let canvasTransform = makeTranslate(0, canvasTop, this.useHardwareAcceleration)\n if (devicePixelRatio !== 1) {\n const scale = 1 / devicePixelRatio\n canvasTransform += ` ${makeScale(scale, scale, this.useHardwareAcceleration)}`\n }\n applyStyles(this.backLayer.canvas, { transform: canvasTransform })\n applyStyles(this.tokensLayer.canvas, { transform: canvasTransform })\n applyStyles(this.frontLayer.canvas, { transform: canvasTransform })\n }\n } else {\n const scale = 1 / devicePixelRatio\n const canvasTransform = makeScale(scale, scale, this.useHardwareAcceleration)\n applyStyles(this.backLayer.canvas, { transform: canvasTransform })\n applyStyles(this.tokensLayer.canvas, { transform: canvasTransform })\n applyStyles(this.frontLayer.canvas, { transform: canvasTransform })\n }\n\n if (this.minimapScrollIndicator && !this.scrollIndicator && minimap.canScroll()) {\n this.initializeScrollIndicator()\n }\n\n if (this.scrollIndicator != null) {\n const minimapScreenHeight = minimap.getScreenHeight()\n const indicatorHeight = minimapScreenHeight * (minimapScreenHeight / minimap.getHeight())\n const indicatorScroll = (minimapScreenHeight - indicatorHeight) * minimap.getScrollRatio()\n\n if (SPEC_MODE) {\n applyStyles(this.scrollIndicator, {\n height: `${indicatorHeight}px`,\n top: `${indicatorScroll}px`,\n })\n } else {\n applyStyles(this.scrollIndicator, {\n height: `${indicatorHeight}px`,\n transform: makeTranslate(0, indicatorScroll, this.useHardwareAcceleration),\n })\n }\n\n if (!minimap.canScroll()) {\n this.disposeScrollIndicator()\n }\n }\n\n if (this.absoluteMode && this.adjustAbsoluteModeHeight) {\n this.updateCanvasesSize()\n }\n\n this.updateCanvas()\n minimap.clearCache()\n }\n\n /**\n * Defines whether to render the code highlights or not.\n *\n * @param {Boolean} displayCodeHighlights Whether to render the code highlights or not\n */\n setDisplayCodeHighlights(displayCodeHighlights) {\n this.displayCodeHighlights = displayCodeHighlights\n if (this.attached) {\n this.requestForcedUpdate()\n }\n }\n\n /**\n * Polling callback used to detect visibility and size changes.\n *\n * @access private\n */\n pollDOM() {\n const visibilityChanged = this.checkForVisibilityChange()\n if (this.isVisible()) {\n if (!this.wasVisible) {\n this.requestForcedUpdate()\n }\n\n this.measureHeightAndWidth(visibilityChanged, false)\n }\n }\n\n /**\n * A method that checks for visibility changes in the MinimapElement. The method returns `true` when the visibility\n * changed from visible to hidden or from hidden to visible.\n *\n * @returns {boolean} Whether the visibility changed or not since the last call\n * @access private\n */\n checkForVisibilityChange() {\n if (this.isVisible()) {\n if (this.wasVisible) {\n return false\n } else {\n this.wasVisible = true\n return this.wasVisible\n }\n } else {\n if (this.wasVisible) {\n this.wasVisible = false\n return true\n } else {\n this.wasVisible = false\n return this.wasVisible\n }\n }\n }\n\n /**\n * A method used to measure the size of the MinimapElement and update internal components based on the new size.\n *\n * @param {boolean} visibilityChanged Did the visibility changed since last measurement\n * @param {[type]} [forceUpdate=true] Forces the update even when no changes were detected. Default is `true`\n * @access private\n */\n measureHeightAndWidth(visibilityChanged, forceUpdate = true) {\n if (!this.minimap) {\n return\n }\n\n const safeFlexBasis = this.style.flexBasis\n this.style.flexBasis = \"\"\n\n const wasResized = this.width !== this.clientWidth || this.height !== this.clientHeight\n\n this.height = this.clientHeight\n this.width = this.clientWidth\n let canvasWidth = this.width\n\n if (this.minimap != null) {\n this.minimap.setScreenHeightAndWidth(this.height, this.width)\n }\n\n if (wasResized || visibilityChanged || forceUpdate) {\n this.requestForcedUpdate()\n }\n\n if (!this.isVisible()) {\n return\n }\n\n if (wasResized || forceUpdate) {\n if (this.adjustToSoftWrap) {\n const lineLength = atom.config.get(\"editor.preferredLineLength\")\n const softWrap = atom.config.get(\"editor.softWrap\")\n const softWrapAtPreferredLineLength = atom.config.get(\"editor.softWrapAtPreferredLineLength\")\n const width = lineLength * this.minimap.getCharWidth()\n\n if (\n softWrap &&\n softWrapAtPreferredLineLength &&\n lineLength &&\n (width <= this.width || !this.adjustOnlyIfSmaller)\n ) {\n this.flexBasis = width\n canvasWidth = width\n } else {\n delete this.flexBasis\n }\n } else {\n delete this.flexBasis\n }\n\n this.updateCanvasesSize(canvasWidth)\n } else {\n this.style.flexBasis = safeFlexBasis\n }\n }\n\n updateCanvasesSize(canvasWidth) {\n const devicePixelRatio = this.minimap.getDevicePixelRatio()\n const maxCanvasHeight = this.height + this.minimap.getLineHeight()\n const newHeight =\n this.absoluteMode && this.adjustAbsoluteModeHeight\n ? Math.min(this.minimap.getHeight(), maxCanvasHeight)\n : maxCanvasHeight\n const canvas = this.getFrontCanvas()\n\n if (canvasWidth == null) {\n canvasWidth = canvas.width / devicePixelRatio\n }\n\n if (canvasWidth !== canvas.width || newHeight !== canvas.height) {\n this.setCanvasesSize(canvasWidth * devicePixelRatio, newHeight * devicePixelRatio)\n if (this.absoluteMode && this.adjustAbsoluteModeHeight) {\n this.offscreenFirstRow = null\n this.offscreenLastRow = null\n }\n }\n }\n\n // ######## ## ## ######## ## ## ######## ######\n // ## ## ## ## ### ## ## ## ##\n // ## ## ## ## #### ## ## ##\n // ###### ## ## ###### ## ## ## ## ######\n // ## ## ## ## ## #### ## ##\n // ## ## ## ## ## ### ## ## ##\n // ######## ### ######## ## ## ## ######\n\n /**\n * Callback triggered when the mouse is pressed on the MinimapElement canvas.\n *\n * @param {number} y The vertical coordinate of the event\n * @param {boolean} isLeftMouse Was the left mouse button pressed?\n * @param {boolean} isMiddleMouse Was the middle mouse button pressed?\n * @access private\n */\n canvasPressed({ y, isLeftMouse, isMiddleMouse }) {\n if (this.minimap.isStandAlone()) {\n return\n }\n if (isLeftMouse) {\n this.canvasLeftMousePressed(y)\n } else if (isMiddleMouse) {\n this.canvasMiddleMousePressed(y)\n const { top, height } = this.visibleArea.getBoundingClientRect()\n this.startDrag({ y: top + height / 2, isLeftMouse: false, isMiddleMouse: true })\n }\n }\n\n /**\n * Callback triggered when the mouse left button is pressed on the MinimapElement canvas.\n *\n * @param {MouseEvent} e The mouse event object\n * @param {number} e.pageY The mouse y position in page\n * @param {HTMLElement} e.target The source of the event\n * @access private\n */\n canvasLeftMousePressed(y) {\n const deltaY = y - this.getBoundingClientRect().top\n const row = Math.floor(deltaY / this.minimap.getLineHeight()) + this.minimap.getFirstVisibleScreenRow()\n\n const textEditor = this.minimap.getTextEditor()\n const textEditorElement = this.minimap.getTextEditorElement()\n\n const scrollTop = row * textEditor.getLineHeightInPixels() - this.minimap.getTextEditorHeight() / 2\n const textEditorScrollTop =\n textEditorElement.pixelPositionForScreenPosition([row, 0]).top - this.minimap.getTextEditorHeight() / 2\n\n if (atom.config.get(\"minimap.moveCursorOnMinimapClick\")) {\n textEditor.setCursorScreenPosition([row, 0])\n }\n\n if (atom.config.get(\"minimap.scrollAnimation\")) {\n const duration = atom.config.get(\"minimap.scrollAnimationDuration\")\n const independentScroll = this.minimap.scrollIndependentlyOnMouseWheel()\n\n const from = this.minimap.getTextEditorScrollTop()\n const to = textEditorScrollTop\n let step\n\n if (independentScroll) {\n const minimapFrom = this.minimap.getScrollTop()\n const minimapTo =\n Math.min(1, scrollTop / (this.minimap.getTextEditorMaxScrollTop() || 1)) * this.minimap.getMaxScrollTop()\n\n step = (now, t) => {\n if (this.minimap === null) {\n return\n } // TODO why this happens in the tests?\n this.minimap.setTextEditorScrollTop(now, true)\n this.minimap.setScrollTop(minimapFrom + (minimapTo - minimapFrom) * t)\n }\n animate({ from, to, duration, step })\n } else {\n step = (now) => {\n if (this.minimap === null) {\n return\n } // TODO why this happens in the tests?\n this.minimap.setTextEditorScrollTop(now)\n }\n animate({ from, to, duration, step })\n }\n } else {\n this.minimap.setTextEditorScrollTop(textEditorScrollTop)\n }\n }\n\n /**\n * Callback triggered when the mouse middle button is pressed on the MinimapElement canvas.\n *\n * @param {MouseEvent} e The mouse event object\n * @param {number} e.pageY The mouse y position in page\n * @access private\n */\n canvasMiddleMousePressed(y) {\n const { top: offsetTop } = this.getBoundingClientRect()\n const deltaY = y - offsetTop - this.minimap.getTextEditorScaledHeight() / 2\n\n const ratio = deltaY / (this.minimap.getVisibleHeight() - this.minimap.getTextEditorScaledHeight())\n\n this.minimap.setTextEditorScrollTop(ratio * this.minimap.getTextEditorMaxScrollTop())\n }\n\n /**\n * Subscribes to a media query for device pixel ratio changes and forces a repaint when it occurs.\n *\n * @returns {Disposable} A disposable to remove the media query listener\n * @access private\n */\n subscribeToMediaQuery() {\n const mediaQuery = window.matchMedia(\"screen and (-webkit-min-device-pixel-ratio: 1.5)\")\n const mediaListener = () => {\n this.requestForcedUpdate()\n }\n mediaQuery.addEventListener(\"change\", mediaListener)\n\n return new Disposable(() => {\n mediaQuery.removeEventListener(\"change\", mediaListener)\n })\n }\n\n // ######## #### ########\n // ## ## ## ## ## ##\n // ## ## #### ## ##\n // ## ## #### ## ##\n // ## ## ## ## ## ## ##\n // ## ## ## ## ## ##\n // ######## #### ## ########\n\n /**\n * A method triggered when the mouse is pressed over the visible area that starts the dragging gesture.\n *\n * @param {number} y The vertical coordinate of the event\n * @param {boolean} isLeftMouse Was the left mouse button pressed?\n * @param {boolean} isMiddleMouse Was the middle mouse button pressed?\n * @access private\n */\n startDrag({ y, isLeftMouse, isMiddleMouse }) {\n if (!this.minimap) {\n return\n }\n if (!isLeftMouse && !isMiddleMouse) {\n return\n }\n\n const initial = {\n dragOffset: y - this.visibleArea.getBoundingClientRect().top,\n offsetTop: this.getBoundingClientRect().top,\n }\n\n // TODO can we avoid adding and removing the listeners every time?\n\n const mousemoveHandler = (e) => this.drag(extractMouseEventData(e), initial)\n const dragendHandler = () => this.endDrag()\n\n const touchmoveHandler = (e) => this.drag(extractTouchEventData(e), initial)\n\n document.body.addEventListener(\"mousemove\", mousemoveHandler, { passive: true })\n document.body.addEventListener(\"mouseup\", dragendHandler, { passive: true })\n document.body.addEventListener(\"mouseleave\", dragendHandler, { passive: true })\n\n document.body.addEventListener(\"touchmove\", touchmoveHandler, { passive: true })\n document.body.addEventListener(\"touchend\", dragendHandler, { passive: true })\n document.body.addEventListener(\"touchcancel\", dragendHandler, { passive: true })\n\n this.dragSubscription = new Disposable(function () {\n document.body.removeEventListener(\"mousemove\", mousemoveHandler)\n document.body.removeEventListener(\"mouseup\", dragendHandler)\n document.body.removeEventListener(\"mouseleave\", dragendHandler)\n\n document.body.removeEventListener(\"touchmove\", touchmoveHandler)\n document.body.removeEventListener(\"touchend\", dragendHandler)\n document.body.removeEventListener(\"touchcancel\", dragendHandler)\n })\n }\n\n /**\n * The method called during the drag gesture.\n *\n * @param {number} y The vertical coordinate of the event\n * @param {boolean} isLeftMouse Was the left mouse button pressed?\n * @param {boolean} isMiddleMouse Was the middle mouse button pressed?\n * @param {number} initial.dragOffset The mouse offset within the visible area\n * @param {number} initial.offsetTop The MinimapElement offset at the moment of the drag start\n * @access private\n */\n drag({ y, isLeftMouse, isMiddleMouse }, initial) {\n if (!this.minimap) {\n return\n }\n if (!isLeftMouse && !isMiddleMouse) {\n return\n }\n const deltaY = y - initial.offsetTop - initial.dragOffset\n\n const ratio = deltaY / (this.minimap.getVisibleHeight() - this.minimap.getTextEditorScaledHeight())\n\n this.minimap.setTextEditorScrollTop(ratio * this.minimap.getTextEditorMaxScrollTop())\n }\n\n /**\n * The method that ends the drag gesture.\n *\n * @access private\n */\n endDrag() {\n if (!this.minimap) {\n return\n }\n this.dragSubscription.dispose()\n }\n}\n\nMinimapElement.initClass()\n\nexport function createMinimapElement() {\n const element = document.createElement(TAG_NAME)\n element.createdCallback()\n return element\n}\n\n// ######## ## ## ######## ## ## ######## ######\n// ## ## ## ## ### ## ## ## ##\n// ## ## ## ## #### ## ## ##\n// ###### ## ## ###### ## ## ## ## ######\n// ## ## ## ## ## #### ## ##\n// ## ## ## ## ## ### ## ## ##\n// ######## ### ######## ## ## ## ######\n\n/**\n * A method that extracts data from a `MouseEvent` which can then be used to process clicks and drags of the minimap.\n *\n * Used together with `extractTouchEventData` to provide a unified interface for `MouseEvent`s and `TouchEvent`s.\n *\n * @param {MouseEvent} mouseEvent The mouse event object\n * @access private\n */\nfunction extractMouseEventData(mouseEvent) {\n return {\n x: mouseEvent.pageX,\n y: mouseEvent.pageY,\n isLeftMouse: mouseEvent.button === 0,\n isMiddleMouse: mouseEvent.button === 1,\n }\n}\n\n/**\n * A method that extracts data from a `TouchEvent` which can then be used to process clicks and drags of the minimap.\n *\n * Used together with `extractMouseEventData` to provide a unified interface for `MouseEvent`s and `TouchEvent`s.\n *\n * @param {TouchEvent} touchEvent The touch event object\n * @access private\n */\nfunction extractTouchEventData(touchEvent) {\n // Use the first touch on the target area. Other touches will be ignored in\n // case of multi-touch.\n const touch = touchEvent.changedTouches[0]\n\n return {\n x: touch.pageX,\n y: touch.pageY,\n isLeftMouse: true, // Touch is treated like a left mouse button click\n isMiddleMouse: false,\n }\n}\n\n// ###### ###### ######\n// ## ## ## ## ## ##\n// ## ## ##\n// ## ###### ######\n// ## ## ##\n// ## ## ## ## ## ##\n// ###### ###### ######\n\n/**\n * Applies the passed-in styles properties to the specified element\n *\n * @param {HTMLElement} element The element onto which apply the styles\n * @param {Object} styles The styles to apply\n * @access private\n */\nfunction applyStyles(element, styles) {\n if (!element) {\n return\n }\n\n let cssText = \"\"\n for (const property in styles) {\n cssText += `${property}: ${styles[property]}; `\n }\n\n element.style.cssText = cssText\n}\n\n/**\n * Returns a string with a CSS translation tranform value.\n *\n * @param {number} [x=0] The x offset of the translation. Default is `0`\n * @param {number} [y=0] The y offset of the translation. Default is `0`\n * @param {boolean} [useHardwareAcceleration=false] Use hardware acceleration. Default is `false`\n * @returns {string} The CSS translation string\n * @access private\n */\nfunction makeTranslate(x = 0, y = 0, useHardwareAcceleration = false) {\n if (useHardwareAcceleration) {\n return `translate3d(${x}px, ${y}px, 0)`\n } else {\n return `translate(${x}px, ${y}px)`\n }\n}\n\n/**\n * Returns a string with a CSS scaling tranform value.\n *\n * @param {number} [x=0] The x scaling factor. Default is `0`\n * @param {number} [y=0] The y scaling factor. Default is `0`\n * @param {boolean} [useHardwareAcceleration=false] Use hardware acceleration. Default is `false`\n * @returns {string} The CSS scaling string\n * @access private\n */\nfunction makeScale(x = 0, y = x, useHardwareAcceleration = false) {\n if (useHardwareAcceleration) {\n return `scale3d(${x}, ${y}, 1)`\n } else {\n return `scale(${x}, ${y})`\n }\n}\n\n/**\n * A method that mimic the jQuery `animate` method and used to animate the scroll when clicking on the MinimapElement canvas.\n *\n * @param {Object} param The animation data object\n * @param {[type]} param.from The start value\n * @param {[type]} param.to The end value\n * @param {[type]} param.duration The animation duration\n * @param {[type]} param.step The easing function for the animation\n * @access private\n */\nfunction animate({ from, to, duration, step }) {\n const start = getTime()\n let progress\n\n const update = () => {\n const passed = getTime() - start\n if (duration === 0) {\n progress = 1\n } else {\n progress = passed / duration\n }\n if (progress > 1) {\n progress = 1\n }\n const delta = swing(progress)\n const value = from + (to - from) * delta\n step(value, delta)\n\n if (progress < 1) {\n requestAnimationFrame(update)\n }\n }\n\n update()\n}\n\nfunction swing(progress) {\n return 0.5 - Math.cos(progress * Math.PI) / 2\n}\n\n/**\n * A method that return the current time as a Date.\n *\n * That method exist so that we can mock it in tests.\n *\n * @returns {Date} The current time as Date\n * @access private\n */\nfunction getTime() {\n return new Date()\n}\n","// Generated by CoffeeScript 2.5.1\n(function() {\n module.exports = {\n requirePackages: function(...packages) {\n return new Promise(function(resolve, reject) {\n var failures, remains, required, solved;\n required = [];\n failures = [];\n remains = packages.length;\n solved = function() {\n remains--;\n if (remains !== 0) {\n return;\n }\n if (failures.length > 0) {\n return reject(failures);\n }\n return resolve(required);\n };\n return packages.forEach(function(pkg, i) {\n var failHandler, promise;\n failHandler = function(reason) {\n failures[i] = reason;\n return solved();\n };\n promise = atom.packages.activatePackage(pkg).then(function(activatedPackage) {\n required[i] = activatedPackage.mainModule;\n return solved();\n });\n if (promise.fail != null) {\n return promise.fail(failHandler);\n } else if (promise.catch != null) {\n return promise.catch(failHandler);\n }\n });\n });\n },\n registerOrUpdateElement: require('./register-or-update-element'),\n Ancestors: require('./mixins/ancestors'),\n AncestorsMethods: require('./mixins/ancestors'),\n DisposableEvents: require('./mixins/disposable-events'),\n EventsDelegation: require('./mixins/events-delegation'),\n SpacePenDSL: require('./mixins/space-pen-dsl')\n };\n\n}).call(this);\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXRvbS11dGlscy5qcyIsInNvdXJjZVJvb3QiOiIuLiIsInNvdXJjZXMiOlsibGliL2F0b20tdXRpbHMuY29mZmVlIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFDQTtFQUFBLE1BQU0sQ0FBQyxPQUFQLEdBQ0U7SUFBQSxlQUFBLEVBQWlCLFFBQUEsQ0FBQSxHQUFDLFFBQUQsQ0FBQTthQUNmLElBQUksT0FBSixDQUFZLFFBQUEsQ0FBQyxPQUFELEVBQVUsTUFBVixDQUFBO0FBQ2hCLFlBQUEsUUFBQSxFQUFBLE9BQUEsRUFBQSxRQUFBLEVBQUE7UUFBTSxRQUFBLEdBQVc7UUFDWCxRQUFBLEdBQVc7UUFDWCxPQUFBLEdBQVUsUUFBUSxDQUFDO1FBRW5CLE1BQUEsR0FBUyxRQUFBLENBQUEsQ0FBQTtVQUNQLE9BQUE7VUFDQSxJQUFjLE9BQUEsS0FBVyxDQUF6QjtBQUFBLG1CQUFBOztVQUNBLElBQTJCLFFBQVEsQ0FBQyxNQUFULEdBQWtCLENBQTdDO0FBQUEsbUJBQU8sTUFBQSxDQUFPLFFBQVAsRUFBUDs7aUJBQ0EsT0FBQSxDQUFRLFFBQVI7UUFKTztlQU1ULFFBQVEsQ0FBQyxPQUFULENBQWlCLFFBQUEsQ0FBQyxHQUFELEVBQU0sQ0FBTixDQUFBO0FBQ3ZCLGNBQUEsV0FBQSxFQUFBO1VBQVEsV0FBQSxHQUFjLFFBQUEsQ0FBQyxNQUFELENBQUE7WUFDWixRQUFRLENBQUMsQ0FBRCxDQUFSLEdBQWM7bUJBQ2QsTUFBQSxDQUFBO1VBRlk7VUFJZCx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RzbCdcbiJdfQ==\n//# sourceURL=/home/runner/work/atom-utils-plus/atom-utils-plus/lib/atom-utils.coffee","\"use strict\";\n\nvar forEach = require(\"./collection-utils\").forEach;\nvar elementUtilsMaker = require(\"./element-utils\");\nvar listenerHandlerMaker = require(\"./listener-handler\");\nvar idGeneratorMaker = require(\"./id-generator\");\nvar idHandlerMaker = require(\"./id-handler\");\nvar reporterMaker = require(\"./reporter\");\nvar browserDetector = require(\"./browser-detector\");\nvar batchProcessorMaker = require(\"batch-processor\");\nvar stateHandler = require(\"./state-handler\");\n\n//Detection strategies.\nvar objectStrategyMaker = require(\"./detection-strategy/object.js\");\nvar scrollStrategyMaker = require(\"./detection-strategy/scroll.js\");\n\nfunction isCollection(obj) {\n return Array.isArray(obj) || obj.length !== undefined;\n}\n\nfunction toArray(collection) {\n if (!Array.isArray(collection)) {\n var array = [];\n forEach(collection, function (obj) {\n array.push(obj);\n });\n return array;\n } else {\n return collection;\n }\n}\n\nfunction isElement(obj) {\n return obj && obj.nodeType === 1;\n}\n\n/**\n * @typedef idHandler\n * @type {object}\n * @property {function} get Gets the resize detector id of the element.\n * @property {function} set Generate and sets the resize detector id of the element.\n */\n\n/**\n * @typedef Options\n * @type {object}\n * @property {boolean} callOnAdd Determines if listeners should be called when they are getting added.\n Default is true. If true, the listener is guaranteed to be called when it has been added.\n If false, the listener will not be guarenteed to be called when it has been added (does not prevent it from being called).\n * @property {idHandler} idHandler A custom id handler that is responsible for generating, setting and retrieving id's for elements.\n If not provided, a default id handler will be used.\n * @property {reporter} reporter A custom reporter that handles reporting logs, warnings and errors.\n If not provided, a default id handler will be used.\n If set to false, then nothing will be reported.\n * @property {boolean} debug If set to true, the the system will report debug messages as default for the listenTo method.\n */\n\n/**\n * Creates an element resize detector instance.\n * @public\n * @param {Options?} options Optional global options object that will decide how this instance will work.\n */\nmodule.exports = function(options) {\n options = options || {};\n\n //idHandler is currently not an option to the listenTo function, so it should not be added to globalOptions.\n var idHandler;\n\n if (options.idHandler) {\n // To maintain compatability with idHandler.get(element, readonly), make sure to wrap the given idHandler\n // so that readonly flag always is true when it's used here. This may be removed next major version bump.\n idHandler = {\n get: function (element) { return options.idHandler.get(element, true); },\n set: options.idHandler.set\n };\n } else {\n var idGenerator = idGeneratorMaker();\n var defaultIdHandler = idHandlerMaker({\n idGenerator: idGenerator,\n stateHandler: stateHandler\n });\n idHandler = defaultIdHandler;\n }\n\n //reporter is currently not an option to the listenTo function, so it should not be added to globalOptions.\n var reporter = options.reporter;\n\n if(!reporter) {\n //If options.reporter is false, then the reporter should be quiet.\n var quiet = reporter === false;\n reporter = reporterMaker(quiet);\n }\n\n //batchProcessor is currently not an option to the listenTo function, so it should not be added to globalOptions.\n var batchProcessor = getOption(options, \"batchProcessor\", batchProcessorMaker({ reporter: reporter }));\n\n //Options to be used as default for the listenTo function.\n var globalOptions = {};\n globalOptions.callOnAdd = !!getOption(options, \"callOnAdd\", true);\n globalOptions.debug = !!getOption(options, \"debug\", false);\n\n var eventListenerHandler = listenerHandlerMaker(idHandler);\n var elementUtils = elementUtilsMaker({\n stateHandler: stateHandler\n });\n\n //The detection strategy to be used.\n var detectionStrategy;\n var desiredStrategy = getOption(options, \"strategy\", \"object\");\n var importantCssRules = getOption(options, \"important\", false);\n var strategyOptions = {\n reporter: reporter,\n batchProcessor: batchProcessor,\n stateHandler: stateHandler,\n idHandler: idHandler,\n important: importantCssRules\n };\n\n if(desiredStrategy === \"scroll\") {\n if (browserDetector.isLegacyOpera()) {\n reporter.warn(\"Scroll strategy is not supported on legacy Opera. Changing to object strategy.\");\n desiredStrategy = \"object\";\n } else if (browserDetector.isIE(9)) {\n reporter.warn(\"Scroll strategy is not supported on IE9. Changing to object strategy.\");\n desiredStrategy = \"object\";\n }\n }\n\n if(desiredStrategy === \"scroll\") {\n detectionStrategy = scrollStrategyMaker(strategyOptions);\n } else if(desiredStrategy === \"object\") {\n detectionStrategy = objectStrategyMaker(strategyOptions);\n } else {\n throw new Error(\"Invalid strategy name: \" + desiredStrategy);\n }\n\n //Calls can be made to listenTo with elements that are still being installed.\n //Also, same elements can occur in the elements list in the listenTo function.\n //With this map, the ready callbacks can be synchronized between the calls\n //so that the ready callback can always be called when an element is ready - even if\n //it wasn't installed from the function itself.\n var onReadyCallbacks = {};\n\n /**\n * Makes the given elements resize-detectable and starts listening to resize events on the elements. Calls the event callback for each event for each element.\n * @public\n * @param {Options?} options Optional options object. These options will override the global options. Some options may not be overriden, such as idHandler.\n * @param {element[]|element} elements The given array of elements to detect resize events of. Single element is also valid.\n * @param {function} listener The callback to be executed for each resize event for each element.\n */\n function listenTo(options, elements, listener) {\n function onResizeCallback(element) {\n var listeners = eventListenerHandler.get(element);\n forEach(listeners, function callListenerProxy(listener) {\n listener(element);\n });\n }\n\n function addListener(callOnAdd, element, listener) {\n eventListenerHandler.add(element, listener);\n\n if(callOnAdd) {\n listener(element);\n }\n }\n\n //Options object may be omitted.\n if(!listener) {\n listener = elements;\n elements = options;\n options = {};\n }\n\n if(!elements) {\n throw new Error(\"At least one element required.\");\n }\n\n if(!listener) {\n throw new Error(\"Listener required.\");\n }\n\n if (isElement(elements)) {\n // A single element has been passed in.\n elements = [elements];\n } else if (isCollection(elements)) {\n // Convert collection to array for plugins.\n // TODO: May want to check so that all the elements in the collection are valid elements.\n elements = toArray(elements);\n } else {\n return reporter.error(\"Invalid arguments. Must be a DOM element or a collection of DOM elements.\");\n }\n\n var elementsReady = 0;\n\n var callOnAdd = getOption(options, \"callOnAdd\", globalOptions.callOnAdd);\n var onReadyCallback = getOption(options, \"onReady\", function noop() {});\n var debug = getOption(options, \"debug\", globalOptions.debug);\n\n forEach(elements, function attachListenerToElement(element) {\n if (!stateHandler.getState(element)) {\n stateHandler.initState(element);\n idHandler.set(element);\n }\n\n var id = idHandler.get(element);\n\n debug && reporter.log(\"Attaching listener to element\", id, element);\n\n if(!elementUtils.isDetectable(element)) {\n debug && reporter.log(id, \"Not detectable.\");\n if(elementUtils.isBusy(element)) {\n debug && reporter.log(id, \"System busy making it detectable\");\n\n //The element is being prepared to be detectable. Do not make it detectable.\n //Just add the listener, because the element will soon be detectable.\n addListener(callOnAdd, element, listener);\n onReadyCallbacks[id] = onReadyCallbacks[id] || [];\n onReadyCallbacks[id].push(function onReady() {\n elementsReady++;\n\n if(elementsReady === elements.length) {\n onReadyCallback();\n }\n });\n return;\n }\n\n debug && reporter.log(id, \"Making detectable...\");\n //The element is not prepared to be detectable, so do prepare it and add a listener to it.\n elementUtils.markBusy(element, true);\n return detectionStrategy.makeDetectable({ debug: debug, important: importantCssRules }, element, function onElementDetectable(element) {\n debug && reporter.log(id, \"onElementDetectable\");\n\n if (stateHandler.getState(element)) {\n elementUtils.markAsDetectable(element);\n elementUtils.markBusy(element, false);\n detectionStrategy.addListener(element, onResizeCallback);\n addListener(callOnAdd, element, listener);\n\n // Since the element size might have changed since the call to \"listenTo\", we need to check for this change,\n // so that a resize event may be emitted.\n // Having the startSize object is optional (since it does not make sense in some cases such as unrendered elements), so check for its existance before.\n // Also, check the state existance before since the element may have been uninstalled in the installation process.\n var state = stateHandler.getState(element);\n if (state && state.startSize) {\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n if (state.startSize.width !== width || state.startSize.height !== height) {\n onResizeCallback(element);\n }\n }\n\n if(onReadyCallbacks[id]) {\n forEach(onReadyCallbacks[id], function(callback) {\n callback();\n });\n }\n } else {\n // The element has been unisntalled before being detectable.\n debug && reporter.log(id, \"Element uninstalled before being detectable.\");\n }\n\n delete onReadyCallbacks[id];\n\n elementsReady++;\n if(elementsReady === elements.length) {\n onReadyCallback();\n }\n });\n }\n\n debug && reporter.log(id, \"Already detecable, adding listener.\");\n\n //The element has been prepared to be detectable and is ready to be listened to.\n addListener(callOnAdd, element, listener);\n elementsReady++;\n });\n\n if(elementsReady === elements.length) {\n onReadyCallback();\n }\n }\n\n function uninstall(elements) {\n if(!elements) {\n return reporter.error(\"At least one element is required.\");\n }\n\n if (isElement(elements)) {\n // A single element has been passed in.\n elements = [elements];\n } else if (isCollection(elements)) {\n // Convert collection to array for plugins.\n // TODO: May want to check so that all the elements in the collection are valid elements.\n elements = toArray(elements);\n } else {\n return reporter.error(\"Invalid arguments. Must be a DOM element or a collection of DOM elements.\");\n }\n\n forEach(elements, function (element) {\n eventListenerHandler.removeAllListeners(element);\n detectionStrategy.uninstall(element);\n stateHandler.cleanState(element);\n });\n }\n\n function initDocument(targetDocument) {\n detectionStrategy.initDocument && detectionStrategy.initDocument(targetDocument);\n }\n\n return {\n listenTo: listenTo,\n removeListener: eventListenerHandler.removeListener,\n removeAllListeners: eventListenerHandler.removeAllListeners,\n uninstall: uninstall,\n initDocument: initDocument\n };\n};\n\nfunction getOption(options, name, defaultValue) {\n var value = options[name];\n\n if((value === undefined || value === null) && defaultValue !== undefined) {\n return defaultValue;\n }\n\n return value;\n}\n","\"use strict\";\n\nvar utils = module.exports = {};\n\n/**\n * Loops through the collection and calls the callback for each element. if the callback returns truthy, the loop is broken and returns the same value.\n * @public\n * @param {*} collection The collection to loop through. Needs to have a length property set and have indices set from 0 to length - 1.\n * @param {function} callback The callback to be called for each element. The element will be given as a parameter to the callback. If this callback returns truthy, the loop is broken and the same value is returned.\n * @returns {*} The value that a callback has returned (if truthy). Otherwise nothing.\n */\nutils.forEach = function(collection, callback) {\n for(var i = 0; i < collection.length; i++) {\n var result = callback(collection[i]);\n if(result) {\n return result;\n }\n }\n};\n","\"use strict\";\n\nmodule.exports = function(options) {\n var getState = options.stateHandler.getState;\n\n /**\n * Tells if the element has been made detectable and ready to be listened for resize events.\n * @public\n * @param {element} The element to check.\n * @returns {boolean} True or false depending on if the element is detectable or not.\n */\n function isDetectable(element) {\n var state = getState(element);\n return state && !!state.isDetectable;\n }\n\n /**\n * Marks the element that it has been made detectable and ready to be listened for resize events.\n * @public\n * @param {element} The element to mark.\n */\n function markAsDetectable(element) {\n getState(element).isDetectable = true;\n }\n\n /**\n * Tells if the element is busy or not.\n * @public\n * @param {element} The element to check.\n * @returns {boolean} True or false depending on if the element is busy or not.\n */\n function isBusy(element) {\n return !!getState(element).busy;\n }\n\n /**\n * Marks the object is busy and should not be made detectable.\n * @public\n * @param {element} element The element to mark.\n * @param {boolean} busy If the element is busy or not.\n */\n function markBusy(element, busy) {\n getState(element).busy = !!busy;\n }\n\n return {\n isDetectable: isDetectable,\n markAsDetectable: markAsDetectable,\n isBusy: isBusy,\n markBusy: markBusy\n };\n};\n","\"use strict\";\n\nmodule.exports = function(idHandler) {\n var eventListeners = {};\n\n /**\n * Gets all listeners for the given element.\n * @public\n * @param {element} element The element to get all listeners for.\n * @returns All listeners for the given element.\n */\n function getListeners(element) {\n var id = idHandler.get(element);\n\n if (id === undefined) {\n return [];\n }\n\n return eventListeners[id] || [];\n }\n\n /**\n * Stores the given listener for the given element. Will not actually add the listener to the element.\n * @public\n * @param {element} element The element that should have the listener added.\n * @param {function} listener The callback that the element has added.\n */\n function addListener(element, listener) {\n var id = idHandler.get(element);\n\n if(!eventListeners[id]) {\n eventListeners[id] = [];\n }\n\n eventListeners[id].push(listener);\n }\n\n function removeListener(element, listener) {\n var listeners = getListeners(element);\n for (var i = 0, len = listeners.length; i < len; ++i) {\n if (listeners[i] === listener) {\n listeners.splice(i, 1);\n break;\n }\n }\n }\n\n function removeAllListeners(element) {\n var listeners = getListeners(element);\n if (!listeners) { return; }\n listeners.length = 0;\n }\n\n return {\n get: getListeners,\n add: addListener,\n removeListener: removeListener,\n removeAllListeners: removeAllListeners\n };\n};\n","\"use strict\";\n\nmodule.exports = function() {\n var idCount = 1;\n\n /**\n * Generates a new unique id in the context.\n * @public\n * @returns {number} A unique id in the context.\n */\n function generate() {\n return idCount++;\n }\n\n return {\n generate: generate\n };\n};\n","\"use strict\";\n\nmodule.exports = function(options) {\n var idGenerator = options.idGenerator;\n var getState = options.stateHandler.getState;\n\n /**\n * Gets the resize detector id of the element.\n * @public\n * @param {element} element The target element to get the id of.\n * @returns {string|number|null} The id of the element. Null if it has no id.\n */\n function getId(element) {\n var state = getState(element);\n\n if (state && state.id !== undefined) {\n return state.id;\n }\n\n return null;\n }\n\n /**\n * Sets the resize detector id of the element. Requires the element to have a resize detector state initialized.\n * @public\n * @param {element} element The target element to set the id of.\n * @returns {string|number|null} The id of the element.\n */\n function setId(element) {\n var state = getState(element);\n\n if (!state) {\n throw new Error(\"setId required the element to have a resize detection state.\");\n }\n\n var id = idGenerator.generate();\n\n state.id = id;\n\n return id;\n }\n\n return {\n get: getId,\n set: setId\n };\n};\n","\"use strict\";\n\n/* global console: false */\n\n/**\n * Reporter that handles the reporting of logs, warnings and errors.\n * @public\n * @param {boolean} quiet Tells if the reporter should be quiet or not.\n */\nmodule.exports = function(quiet) {\n function noop() {\n //Does nothing.\n }\n\n var reporter = {\n log: noop,\n warn: noop,\n error: noop\n };\n\n if(!quiet && window.console) {\n var attachFunction = function(reporter, name) {\n //The proxy is needed to be able to call the method with the console context,\n //since we cannot use bind.\n reporter[name] = function reporterProxy() {\n var f = console[name];\n if (f.apply) { //IE9 does not support console.log.apply :)\n f.apply(console, arguments);\n } else {\n for (var i = 0; i < arguments.length; i++) {\n f(arguments[i]);\n }\n }\n };\n };\n\n attachFunction(reporter, \"log\");\n attachFunction(reporter, \"warn\");\n attachFunction(reporter, \"error\");\n }\n\n return reporter;\n};","\"use strict\";\n\nvar detector = module.exports = {};\n\ndetector.isIE = function(version) {\n function isAnyIeVersion() {\n var agent = navigator.userAgent.toLowerCase();\n return agent.indexOf(\"msie\") !== -1 || agent.indexOf(\"trident\") !== -1 || agent.indexOf(\" edge/\") !== -1;\n }\n\n if(!isAnyIeVersion()) {\n return false;\n }\n\n if(!version) {\n return true;\n }\n\n //Shamelessly stolen from https://gist.github.com/padolsey/527683\n var ieVersion = (function(){\n var undef,\n v = 3,\n div = document.createElement(\"div\"),\n all = div.getElementsByTagName(\"i\");\n\n do {\n div.innerHTML = \"\";\n }\n while (all[0]);\n\n return v > 4 ? v : undef;\n }());\n\n return version === ieVersion;\n};\n\ndetector.isLegacyOpera = function() {\n return !!window.opera;\n};\n","\"use strict\";\n\nvar utils = require(\"./utils\");\n\nmodule.exports = function batchProcessorMaker(options) {\n options = options || {};\n var reporter = options.reporter;\n var asyncProcess = utils.getOption(options, \"async\", true);\n var autoProcess = utils.getOption(options, \"auto\", true);\n\n if(autoProcess && !asyncProcess) {\n reporter && reporter.warn(\"Invalid options combination. auto=true and async=false is invalid. Setting async=true.\");\n asyncProcess = true;\n }\n\n var batch = Batch();\n var asyncFrameHandler;\n var isProcessing = false;\n\n function addFunction(level, fn) {\n if(!isProcessing && autoProcess && asyncProcess && batch.size() === 0) {\n // Since this is async, it is guaranteed to be executed after that the fn is added to the batch.\n // This needs to be done before, since we're checking the size of the batch to be 0.\n processBatchAsync();\n }\n\n batch.add(level, fn);\n }\n\n function processBatch() {\n // Save the current batch, and create a new batch so that incoming functions are not added into the currently processing batch.\n // Continue processing until the top-level batch is empty (functions may be added to the new batch while processing, and so on).\n isProcessing = true;\n while (batch.size()) {\n var processingBatch = batch;\n batch = Batch();\n processingBatch.process();\n }\n isProcessing = false;\n }\n\n function forceProcessBatch(localAsyncProcess) {\n if (isProcessing) {\n return;\n }\n\n if(localAsyncProcess === undefined) {\n localAsyncProcess = asyncProcess;\n }\n\n if(asyncFrameHandler) {\n cancelFrame(asyncFrameHandler);\n asyncFrameHandler = null;\n }\n\n if(localAsyncProcess) {\n processBatchAsync();\n } else {\n processBatch();\n }\n }\n\n function processBatchAsync() {\n asyncFrameHandler = requestFrame(processBatch);\n }\n\n function clearBatch() {\n batch = {};\n batchSize = 0;\n topLevel = 0;\n bottomLevel = 0;\n }\n\n function cancelFrame(listener) {\n // var cancel = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.clearTimeout;\n var cancel = clearTimeout;\n return cancel(listener);\n }\n\n function requestFrame(callback) {\n // var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function(fn) { return window.setTimeout(fn, 20); };\n var raf = function(fn) { return setTimeout(fn, 0); };\n return raf(callback);\n }\n\n return {\n add: addFunction,\n force: forceProcessBatch\n };\n};\n\nfunction Batch() {\n var batch = {};\n var size = 0;\n var topLevel = 0;\n var bottomLevel = 0;\n\n function add(level, fn) {\n if(!fn) {\n fn = level;\n level = 0;\n }\n\n if(level > topLevel) {\n topLevel = level;\n } else if(level < bottomLevel) {\n bottomLevel = level;\n }\n\n if(!batch[level]) {\n batch[level] = [];\n }\n\n batch[level].push(fn);\n size++;\n }\n\n function process() {\n for(var level = bottomLevel; level <= topLevel; level++) {\n var fns = batch[level];\n\n for(var i = 0; i < fns.length; i++) {\n var fn = fns[i];\n fn();\n }\n }\n }\n\n function getSize() {\n return size;\n }\n\n return {\n add: add,\n process: process,\n size: getSize\n };\n}\n","\"use strict\";\n\nvar utils = module.exports = {};\n\nutils.getOption = getOption;\n\nfunction getOption(options, name, defaultValue) {\n var value = options[name];\n\n if((value === undefined || value === null) && defaultValue !== undefined) {\n return defaultValue;\n }\n\n return value;\n}\n","\"use strict\";\n\nvar prop = \"_erd\";\n\nfunction initState(element) {\n element[prop] = {};\n return getState(element);\n}\n\nfunction getState(element) {\n return element[prop];\n}\n\nfunction cleanState(element) {\n delete element[prop];\n}\n\nmodule.exports = {\n initState: initState,\n getState: getState,\n cleanState: cleanState\n};\n","/**\n * Resize detection strategy that injects objects to elements in order to detect resize events.\n * Heavily inspired by: http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/\n */\n\n\"use strict\";\n\nvar browserDetector = require(\"../browser-detector\");\n\nmodule.exports = function(options) {\n options = options || {};\n var reporter = options.reporter;\n var batchProcessor = options.batchProcessor;\n var getState = options.stateHandler.getState;\n\n if(!reporter) {\n throw new Error(\"Missing required dependency: reporter.\");\n }\n\n /**\n * Adds a resize event listener to the element.\n * @public\n * @param {element} element The element that should have the listener added.\n * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback.\n */\n function addListener(element, listener) {\n function listenerProxy() {\n listener(element);\n }\n\n if(browserDetector.isIE(8)) {\n //IE 8 does not support object, but supports the resize event directly on elements.\n getState(element).object = {\n proxy: listenerProxy\n };\n element.attachEvent(\"onresize\", listenerProxy);\n } else {\n var object = getObject(element);\n\n if(!object) {\n throw new Error(\"Element is not detectable by this strategy.\");\n }\n\n object.contentDocument.defaultView.addEventListener(\"resize\", listenerProxy);\n }\n }\n\n function buildCssTextString(rules) {\n var seperator = options.important ? \" !important; \" : \"; \";\n\n return (rules.join(seperator) + seperator).trim();\n }\n\n /**\n * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes.\n * @private\n * @param {object} options Optional options object.\n * @param {element} element The element to make detectable\n * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter.\n */\n function makeDetectable(options, element, callback) {\n if (!callback) {\n callback = element;\n element = options;\n options = null;\n }\n\n options = options || {};\n var debug = options.debug;\n\n function injectObject(element, callback) {\n var OBJECT_STYLE = buildCssTextString([\"display: block\", \"position: absolute\", \"top: 0\", \"left: 0\", \"width: 100%\", \"height: 100%\", \"border: none\", \"padding: 0\", \"margin: 0\", \"opacity: 0\", \"z-index: -1000\", \"pointer-events: none\"]);\n\n //The target element needs to be positioned (everything except static) so the absolute positioned object will be positioned relative to the target element.\n\n // Position altering may be performed directly or on object load, depending on if style resolution is possible directly or not.\n var positionCheckPerformed = false;\n\n // The element may not yet be attached to the DOM, and therefore the style object may be empty in some browsers.\n // Since the style object is a reference, it will be updated as soon as the element is attached to the DOM.\n var style = window.getComputedStyle(element);\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n getState(element).startSize = {\n width: width,\n height: height\n };\n\n function mutateDom() {\n function alterPositionStyles() {\n if(style.position === \"static\") {\n element.style.setProperty(\"position\", \"relative\", options.important ? \"important\" : \"\");\n\n var removeRelativeStyles = function(reporter, element, style, property) {\n function getNumericalValue(value) {\n return value.replace(/[^-\\d\\.]/g, \"\");\n }\n\n var value = style[property];\n\n if(value !== \"auto\" && getNumericalValue(value) !== \"0\") {\n reporter.warn(\"An element that is positioned static has style.\" + property + \"=\" + value + \" which is ignored due to the static positioning. The element will need to be positioned relative, so the style.\" + property + \" will be set to 0. Element: \", element);\n element.style.setProperty(property, \"0\", options.important ? \"important\" : \"\");\n }\n };\n\n //Check so that there are no accidental styles that will make the element styled differently now that is is relative.\n //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway).\n removeRelativeStyles(reporter, element, style, \"top\");\n removeRelativeStyles(reporter, element, style, \"right\");\n removeRelativeStyles(reporter, element, style, \"bottom\");\n removeRelativeStyles(reporter, element, style, \"left\");\n }\n }\n\n function onObjectLoad() {\n // The object has been loaded, which means that the element now is guaranteed to be attached to the DOM.\n if (!positionCheckPerformed) {\n alterPositionStyles();\n }\n\n /*jshint validthis: true */\n\n function getDocument(element, callback) {\n //Opera 12 seem to call the object.onload before the actual document has been created.\n //So if it is not present, poll it with an timeout until it is present.\n //TODO: Could maybe be handled better with object.onreadystatechange or similar.\n if(!element.contentDocument) {\n var state = getState(element);\n if (state.checkForObjectDocumentTimeoutId) {\n window.clearTimeout(state.checkForObjectDocumentTimeoutId);\n }\n state.checkForObjectDocumentTimeoutId = setTimeout(function checkForObjectDocument() {\n state.checkForObjectDocumentTimeoutId = 0;\n getDocument(element, callback);\n }, 100);\n\n return;\n }\n\n callback(element.contentDocument);\n }\n\n //Mutating the object element here seems to fire another load event.\n //Mutating the inner document of the object element is fine though.\n var objectElement = this;\n\n //Create the style element to be added to the object.\n getDocument(objectElement, function onObjectDocumentReady(objectDocument) {\n //Notify that the element is ready to be listened to.\n callback(element);\n });\n }\n\n // The element may be detached from the DOM, and some browsers does not support style resolving of detached elements.\n // The alterPositionStyles needs to be delayed until we know the element has been attached to the DOM (which we are sure of when the onObjectLoad has been fired), if style resolution is not possible.\n if (style.position !== \"\") {\n alterPositionStyles(style);\n positionCheckPerformed = true;\n }\n\n //Add an object element as a child to the target element that will be listened to for resize events.\n var object = document.createElement(\"object\");\n object.style.cssText = OBJECT_STYLE;\n object.tabIndex = -1;\n object.type = \"text/html\";\n object.setAttribute(\"aria-hidden\", \"true\");\n object.onload = onObjectLoad;\n\n //Safari: This must occur before adding the object to the DOM.\n //IE: Does not like that this happens before, even if it is also added after.\n if(!browserDetector.isIE()) {\n object.data = \"about:blank\";\n }\n\n if (!getState(element)) {\n // The element has been uninstalled before the actual loading happened.\n return;\n }\n\n element.appendChild(object);\n getState(element).object = object;\n\n //IE: This must occur after adding the object to the DOM.\n if(browserDetector.isIE()) {\n object.data = \"about:blank\";\n }\n }\n\n if(batchProcessor) {\n batchProcessor.add(mutateDom);\n } else {\n mutateDom();\n }\n }\n\n if(browserDetector.isIE(8)) {\n //IE 8 does not support objects properly. Luckily they do support the resize event.\n //So do not inject the object and notify that the element is already ready to be listened to.\n //The event handler for the resize event is attached in the utils.addListener instead.\n callback(element);\n } else {\n injectObject(element, callback);\n }\n }\n\n /**\n * Returns the child object of the target element.\n * @private\n * @param {element} element The target element.\n * @returns The object element of the target.\n */\n function getObject(element) {\n return getState(element).object;\n }\n\n function uninstall(element) {\n if (!getState(element)) {\n return;\n }\n\n var object = getObject(element);\n\n if (!object) {\n return;\n }\n\n if (browserDetector.isIE(8)) {\n element.detachEvent(\"onresize\", object.proxy);\n } else {\n element.removeChild(object);\n }\n\n if (getState(element).checkForObjectDocumentTimeoutId) {\n window.clearTimeout(getState(element).checkForObjectDocumentTimeoutId);\n }\n\n delete getState(element).object;\n }\n\n return {\n makeDetectable: makeDetectable,\n addListener: addListener,\n uninstall: uninstall\n };\n};\n","/**\n * Resize detection strategy that injects divs to elements in order to detect resize events on scroll events.\n * Heavily inspired by: https://github.com/marcj/css-element-queries/blob/master/src/ResizeSensor.js\n */\n\n\"use strict\";\n\nvar forEach = require(\"../collection-utils\").forEach;\n\nmodule.exports = function(options) {\n options = options || {};\n var reporter = options.reporter;\n var batchProcessor = options.batchProcessor;\n var getState = options.stateHandler.getState;\n var hasState = options.stateHandler.hasState;\n var idHandler = options.idHandler;\n\n if (!batchProcessor) {\n throw new Error(\"Missing required dependency: batchProcessor\");\n }\n\n if (!reporter) {\n throw new Error(\"Missing required dependency: reporter.\");\n }\n\n //TODO: Could this perhaps be done at installation time?\n var scrollbarSizes = getScrollbarSizes();\n\n var styleId = \"erd_scroll_detection_scrollbar_style\";\n var detectionContainerClass = \"erd_scroll_detection_container\";\n\n function initDocument(targetDocument) {\n // Inject the scrollbar styling that prevents them from appearing sometimes in Chrome.\n // The injected container needs to have a class, so that it may be styled with CSS (pseudo elements).\n injectScrollStyle(targetDocument, styleId, detectionContainerClass);\n }\n\n initDocument(window.document);\n\n function buildCssTextString(rules) {\n var seperator = options.important ? \" !important; \" : \"; \";\n\n return (rules.join(seperator) + seperator).trim();\n }\n\n function getScrollbarSizes() {\n var width = 500;\n var height = 500;\n\n var child = document.createElement(\"div\");\n child.style.cssText = buildCssTextString([\"position: absolute\", \"width: \" + width*2 + \"px\", \"height: \" + height*2 + \"px\", \"visibility: hidden\", \"margin: 0\", \"padding: 0\"]);\n\n var container = document.createElement(\"div\");\n container.style.cssText = buildCssTextString([\"position: absolute\", \"width: \" + width + \"px\", \"height: \" + height + \"px\", \"overflow: scroll\", \"visibility: none\", \"top: \" + -width*3 + \"px\", \"left: \" + -height*3 + \"px\", \"visibility: hidden\", \"margin: 0\", \"padding: 0\"]);\n\n container.appendChild(child);\n\n document.body.insertBefore(container, document.body.firstChild);\n\n var widthSize = width - container.clientWidth;\n var heightSize = height - container.clientHeight;\n\n document.body.removeChild(container);\n\n return {\n width: widthSize,\n height: heightSize\n };\n }\n\n function injectScrollStyle(targetDocument, styleId, containerClass) {\n function injectStyle(style, method) {\n method = method || function (element) {\n targetDocument.head.appendChild(element);\n };\n\n var styleElement = targetDocument.createElement(\"style\");\n styleElement.innerHTML = style;\n styleElement.id = styleId;\n method(styleElement);\n return styleElement;\n }\n\n if (!targetDocument.getElementById(styleId)) {\n var containerAnimationClass = containerClass + \"_animation\";\n var containerAnimationActiveClass = containerClass + \"_animation_active\";\n var style = \"/* Created by the element-resize-detector library. */\\n\";\n style += \".\" + containerClass + \" > div::-webkit-scrollbar { \" + buildCssTextString([\"display: none\"]) + \" }\\n\\n\";\n style += \".\" + containerAnimationActiveClass + \" { \" + buildCssTextString([\"-webkit-animation-duration: 0.1s\", \"animation-duration: 0.1s\", \"-webkit-animation-name: \" + containerAnimationClass, \"animation-name: \" + containerAnimationClass]) + \" }\\n\";\n style += \"@-webkit-keyframes \" + containerAnimationClass + \" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\\n\";\n style += \"@keyframes \" + containerAnimationClass + \" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\";\n injectStyle(style);\n }\n }\n\n function addAnimationClass(element) {\n element.className += \" \" + detectionContainerClass + \"_animation_active\";\n }\n\n function addEvent(el, name, cb) {\n if (el.addEventListener) {\n el.addEventListener(name, cb);\n } else if(el.attachEvent) {\n el.attachEvent(\"on\" + name, cb);\n } else {\n return reporter.error(\"[scroll] Don't know how to add event listeners.\");\n }\n }\n\n function removeEvent(el, name, cb) {\n if (el.removeEventListener) {\n el.removeEventListener(name, cb);\n } else if(el.detachEvent) {\n el.detachEvent(\"on\" + name, cb);\n } else {\n return reporter.error(\"[scroll] Don't know how to remove event listeners.\");\n }\n }\n\n function getExpandElement(element) {\n return getState(element).container.childNodes[0].childNodes[0].childNodes[0];\n }\n\n function getShrinkElement(element) {\n return getState(element).container.childNodes[0].childNodes[0].childNodes[1];\n }\n\n /**\n * Adds a resize event listener to the element.\n * @public\n * @param {element} element The element that should have the listener added.\n * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback.\n */\n function addListener(element, listener) {\n var listeners = getState(element).listeners;\n\n if (!listeners.push) {\n throw new Error(\"Cannot add listener to an element that is not detectable.\");\n }\n\n getState(element).listeners.push(listener);\n }\n\n /**\n * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes.\n * @private\n * @param {object} options Optional options object.\n * @param {element} element The element to make detectable\n * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter.\n */\n function makeDetectable(options, element, callback) {\n if (!callback) {\n callback = element;\n element = options;\n options = null;\n }\n\n options = options || {};\n\n function debug() {\n if (options.debug) {\n var args = Array.prototype.slice.call(arguments);\n args.unshift(idHandler.get(element), \"Scroll: \");\n if (reporter.log.apply) {\n reporter.log.apply(null, args);\n } else {\n for (var i = 0; i < args.length; i++) {\n reporter.log(args[i]);\n }\n }\n }\n }\n\n function isDetached(element) {\n function isInDocument(element) {\n var isInShadowRoot = element.getRootNode && element.getRootNode().contains(element);\n return element === element.ownerDocument.body || element.ownerDocument.body.contains(element) || isInShadowRoot;\n }\n\n if (!isInDocument(element)) {\n return true;\n }\n\n // FireFox returns null style in hidden iframes. See https://github.com/wnr/element-resize-detector/issues/68 and https://bugzilla.mozilla.org/show_bug.cgi?id=795520\n if (window.getComputedStyle(element) === null) {\n return true;\n }\n\n return false;\n }\n\n function isUnrendered(element) {\n // Check the absolute positioned container since the top level container is display: inline.\n var container = getState(element).container.childNodes[0];\n var style = window.getComputedStyle(container);\n return !style.width || style.width.indexOf(\"px\") === -1; //Can only compute pixel value when rendered.\n }\n\n function getStyle() {\n // Some browsers only force layouts when actually reading the style properties of the style object, so make sure that they are all read here,\n // so that the user of the function can be sure that it will perform the layout here, instead of later (important for batching).\n var elementStyle = window.getComputedStyle(element);\n var style = {};\n style.position = elementStyle.position;\n style.width = element.offsetWidth;\n style.height = element.offsetHeight;\n style.top = elementStyle.top;\n style.right = elementStyle.right;\n style.bottom = elementStyle.bottom;\n style.left = elementStyle.left;\n style.widthCSS = elementStyle.width;\n style.heightCSS = elementStyle.height;\n return style;\n }\n\n function storeStartSize() {\n var style = getStyle();\n getState(element).startSize = {\n width: style.width,\n height: style.height\n };\n debug(\"Element start size\", getState(element).startSize);\n }\n\n function initListeners() {\n getState(element).listeners = [];\n }\n\n function storeStyle() {\n debug(\"storeStyle invoked.\");\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n\n var style = getStyle();\n getState(element).style = style;\n }\n\n function storeCurrentSize(element, width, height) {\n getState(element).lastWidth = width;\n getState(element).lastHeight = height;\n }\n\n function getExpandChildElement(element) {\n return getExpandElement(element).childNodes[0];\n }\n\n function getWidthOffset() {\n return 2 * scrollbarSizes.width + 1;\n }\n\n function getHeightOffset() {\n return 2 * scrollbarSizes.height + 1;\n }\n\n function getExpandWidth(width) {\n return width + 10 + getWidthOffset();\n }\n\n function getExpandHeight(height) {\n return height + 10 + getHeightOffset();\n }\n\n function getShrinkWidth(width) {\n return width * 2 + getWidthOffset();\n }\n\n function getShrinkHeight(height) {\n return height * 2 + getHeightOffset();\n }\n\n function positionScrollbars(element, width, height) {\n var expand = getExpandElement(element);\n var shrink = getShrinkElement(element);\n var expandWidth = getExpandWidth(width);\n var expandHeight = getExpandHeight(height);\n var shrinkWidth = getShrinkWidth(width);\n var shrinkHeight = getShrinkHeight(height);\n expand.scrollLeft = expandWidth;\n expand.scrollTop = expandHeight;\n shrink.scrollLeft = shrinkWidth;\n shrink.scrollTop = shrinkHeight;\n }\n\n function injectContainerElement() {\n var container = getState(element).container;\n\n if (!container) {\n container = document.createElement(\"div\");\n container.className = detectionContainerClass;\n container.style.cssText = buildCssTextString([\"visibility: hidden\", \"display: inline\", \"width: 0px\", \"height: 0px\", \"z-index: -1\", \"overflow: hidden\", \"margin: 0\", \"padding: 0\"]);\n getState(element).container = container;\n addAnimationClass(container);\n element.appendChild(container);\n\n var onAnimationStart = function () {\n getState(element).onRendered && getState(element).onRendered();\n };\n\n addEvent(container, \"animationstart\", onAnimationStart);\n\n // Store the event handler here so that they may be removed when uninstall is called.\n // See uninstall function for an explanation why it is needed.\n getState(element).onAnimationStart = onAnimationStart;\n }\n\n return container;\n }\n\n function injectScrollElements() {\n function alterPositionStyles() {\n var style = getState(element).style;\n\n if(style.position === \"static\") {\n element.style.setProperty(\"position\", \"relative\",options.important ? \"important\" : \"\");\n\n var removeRelativeStyles = function(reporter, element, style, property) {\n function getNumericalValue(value) {\n return value.replace(/[^-\\d\\.]/g, \"\");\n }\n\n var value = style[property];\n\n if(value !== \"auto\" && getNumericalValue(value) !== \"0\") {\n reporter.warn(\"An element that is positioned static has style.\" + property + \"=\" + value + \" which is ignored due to the static positioning. The element will need to be positioned relative, so the style.\" + property + \" will be set to 0. Element: \", element);\n element.style[property] = 0;\n }\n };\n\n //Check so that there are no accidental styles that will make the element styled differently now that is is relative.\n //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway).\n removeRelativeStyles(reporter, element, style, \"top\");\n removeRelativeStyles(reporter, element, style, \"right\");\n removeRelativeStyles(reporter, element, style, \"bottom\");\n removeRelativeStyles(reporter, element, style, \"left\");\n }\n }\n\n function getLeftTopBottomRightCssText(left, top, bottom, right) {\n left = (!left ? \"0\" : (left + \"px\"));\n top = (!top ? \"0\" : (top + \"px\"));\n bottom = (!bottom ? \"0\" : (bottom + \"px\"));\n right = (!right ? \"0\" : (right + \"px\"));\n\n return [\"left: \" + left, \"top: \" + top, \"right: \" + right, \"bottom: \" + bottom];\n }\n\n debug(\"Injecting elements\");\n\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n\n alterPositionStyles();\n\n var rootContainer = getState(element).container;\n\n if (!rootContainer) {\n rootContainer = injectContainerElement();\n }\n\n // Due to this WebKit bug https://bugs.webkit.org/show_bug.cgi?id=80808 (currently fixed in Blink, but still present in WebKit browsers such as Safari),\n // we need to inject two containers, one that is width/height 100% and another that is left/top -1px so that the final container always is 1x1 pixels bigger than\n // the targeted element.\n // When the bug is resolved, \"containerContainer\" may be removed.\n\n // The outer container can occasionally be less wide than the targeted when inside inline elements element in WebKit (see https://bugs.webkit.org/show_bug.cgi?id=152980).\n // This should be no problem since the inner container either way makes sure the injected scroll elements are at least 1x1 px.\n\n var scrollbarWidth = scrollbarSizes.width;\n var scrollbarHeight = scrollbarSizes.height;\n var containerContainerStyle = buildCssTextString([\"position: absolute\", \"flex: none\", \"overflow: hidden\", \"z-index: -1\", \"visibility: hidden\", \"width: 100%\", \"height: 100%\", \"left: 0px\", \"top: 0px\"]);\n var containerStyle = buildCssTextString([\"position: absolute\", \"flex: none\", \"overflow: hidden\", \"z-index: -1\", \"visibility: hidden\"].concat(getLeftTopBottomRightCssText(-(1 + scrollbarWidth), -(1 + scrollbarHeight), -scrollbarHeight, -scrollbarWidth)));\n var expandStyle = buildCssTextString([\"position: absolute\", \"flex: none\", \"overflow: scroll\", \"z-index: -1\", \"visibility: hidden\", \"width: 100%\", \"height: 100%\"]);\n var shrinkStyle = buildCssTextString([\"position: absolute\", \"flex: none\", \"overflow: scroll\", \"z-index: -1\", \"visibility: hidden\", \"width: 100%\", \"height: 100%\"]);\n var expandChildStyle = buildCssTextString([\"position: absolute\", \"left: 0\", \"top: 0\"]);\n var shrinkChildStyle = buildCssTextString([\"position: absolute\", \"width: 200%\", \"height: 200%\"]);\n\n var containerContainer = document.createElement(\"div\");\n var container = document.createElement(\"div\");\n var expand = document.createElement(\"div\");\n var expandChild = document.createElement(\"div\");\n var shrink = document.createElement(\"div\");\n var shrinkChild = document.createElement(\"div\");\n\n // Some browsers choke on the resize system being rtl, so force it to ltr. https://github.com/wnr/element-resize-detector/issues/56\n // However, dir should not be set on the top level container as it alters the dimensions of the target element in some browsers.\n containerContainer.dir = \"ltr\";\n\n containerContainer.style.cssText = containerContainerStyle;\n containerContainer.className = detectionContainerClass;\n container.className = detectionContainerClass;\n container.style.cssText = containerStyle;\n expand.style.cssText = expandStyle;\n expandChild.style.cssText = expandChildStyle;\n shrink.style.cssText = shrinkStyle;\n shrinkChild.style.cssText = shrinkChildStyle;\n\n expand.appendChild(expandChild);\n shrink.appendChild(shrinkChild);\n container.appendChild(expand);\n container.appendChild(shrink);\n containerContainer.appendChild(container);\n rootContainer.appendChild(containerContainer);\n\n function onExpandScroll() {\n var state = getState(element);\n if (state && state.onExpand) {\n state.onExpand();\n } else {\n debug(\"Aborting expand scroll handler: element has been uninstalled\");\n }\n }\n\n function onShrinkScroll() {\n var state = getState(element);\n if (state && state.onShrink) {\n state.onShrink();\n } else {\n debug(\"Aborting shrink scroll handler: element has been uninstalled\");\n }\n }\n\n addEvent(expand, \"scroll\", onExpandScroll);\n addEvent(shrink, \"scroll\", onShrinkScroll);\n\n // Store the event handlers here so that they may be removed when uninstall is called.\n // See uninstall function for an explanation why it is needed.\n getState(element).onExpandScroll = onExpandScroll;\n getState(element).onShrinkScroll = onShrinkScroll;\n }\n\n function registerListenersAndPositionElements() {\n function updateChildSizes(element, width, height) {\n var expandChild = getExpandChildElement(element);\n var expandWidth = getExpandWidth(width);\n var expandHeight = getExpandHeight(height);\n expandChild.style.setProperty(\"width\", expandWidth + \"px\", options.important ? \"important\" : \"\");\n expandChild.style.setProperty(\"height\", expandHeight + \"px\", options.important ? \"important\" : \"\");\n }\n\n function updateDetectorElements(done) {\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n // Check whether the size has actually changed since last time the algorithm ran. If not, some steps may be skipped.\n var sizeChanged = width !== getState(element).lastWidth || height !== getState(element).lastHeight;\n\n debug(\"Storing current size\", width, height);\n\n // Store the size of the element sync here, so that multiple scroll events may be ignored in the event listeners.\n // Otherwise the if-check in handleScroll is useless.\n storeCurrentSize(element, width, height);\n\n // Since we delay the processing of the batch, there is a risk that uninstall has been called before the batch gets to execute.\n // Since there is no way to cancel the fn executions, we need to add an uninstall guard to all fns of the batch.\n\n batchProcessor.add(0, function performUpdateChildSizes() {\n if (!sizeChanged) {\n return;\n }\n\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n\n if (!areElementsInjected()) {\n debug(\"Aborting because element container has not been initialized\");\n return;\n }\n\n if (options.debug) {\n var w = element.offsetWidth;\n var h = element.offsetHeight;\n\n if (w !== width || h !== height) {\n reporter.warn(idHandler.get(element), \"Scroll: Size changed before updating detector elements.\");\n }\n }\n\n updateChildSizes(element, width, height);\n });\n\n batchProcessor.add(1, function updateScrollbars() {\n // This function needs to be invoked event though the size is unchanged. The element could have been resized very quickly and then\n // been restored to the original size, which will have changed the scrollbar positions.\n\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n\n if (!areElementsInjected()) {\n debug(\"Aborting because element container has not been initialized\");\n return;\n }\n\n positionScrollbars(element, width, height);\n });\n\n if (sizeChanged && done) {\n batchProcessor.add(2, function () {\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n\n if (!areElementsInjected()) {\n debug(\"Aborting because element container has not been initialized\");\n return;\n }\n\n done();\n });\n }\n }\n\n function areElementsInjected() {\n return !!getState(element).container;\n }\n\n function notifyListenersIfNeeded() {\n function isFirstNotify() {\n return getState(element).lastNotifiedWidth === undefined;\n }\n\n debug(\"notifyListenersIfNeeded invoked\");\n\n var state = getState(element);\n\n // Don't notify if the current size is the start size, and this is the first notification.\n if (isFirstNotify() && state.lastWidth === state.startSize.width && state.lastHeight === state.startSize.height) {\n return debug(\"Not notifying: Size is the same as the start size, and there has been no notification yet.\");\n }\n\n // Don't notify if the size already has been notified.\n if (state.lastWidth === state.lastNotifiedWidth && state.lastHeight === state.lastNotifiedHeight) {\n return debug(\"Not notifying: Size already notified\");\n }\n\n\n debug(\"Current size not notified, notifying...\");\n state.lastNotifiedWidth = state.lastWidth;\n state.lastNotifiedHeight = state.lastHeight;\n forEach(getState(element).listeners, function (listener) {\n listener(element);\n });\n }\n\n function handleRender() {\n debug(\"startanimation triggered.\");\n\n if (isUnrendered(element)) {\n debug(\"Ignoring since element is still unrendered...\");\n return;\n }\n\n debug(\"Element rendered.\");\n var expand = getExpandElement(element);\n var shrink = getShrinkElement(element);\n if (expand.scrollLeft === 0 || expand.scrollTop === 0 || shrink.scrollLeft === 0 || shrink.scrollTop === 0) {\n debug(\"Scrollbars out of sync. Updating detector elements...\");\n updateDetectorElements(notifyListenersIfNeeded);\n }\n }\n\n function handleScroll() {\n debug(\"Scroll detected.\");\n\n if (isUnrendered(element)) {\n // Element is still unrendered. Skip this scroll event.\n debug(\"Scroll event fired while unrendered. Ignoring...\");\n return;\n }\n\n updateDetectorElements(notifyListenersIfNeeded);\n }\n\n debug(\"registerListenersAndPositionElements invoked.\");\n\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n\n getState(element).onRendered = handleRender;\n getState(element).onExpand = handleScroll;\n getState(element).onShrink = handleScroll;\n\n var style = getState(element).style;\n updateChildSizes(element, style.width, style.height);\n }\n\n function finalizeDomMutation() {\n debug(\"finalizeDomMutation invoked.\");\n\n if (!getState(element)) {\n debug(\"Aborting because element has been uninstalled\");\n return;\n }\n\n var style = getState(element).style;\n storeCurrentSize(element, style.width, style.height);\n positionScrollbars(element, style.width, style.height);\n }\n\n function ready() {\n callback(element);\n }\n\n function install() {\n debug(\"Installing...\");\n initListeners();\n storeStartSize();\n\n batchProcessor.add(0, storeStyle);\n batchProcessor.add(1, injectScrollElements);\n batchProcessor.add(2, registerListenersAndPositionElements);\n batchProcessor.add(3, finalizeDomMutation);\n batchProcessor.add(4, ready);\n }\n\n debug(\"Making detectable...\");\n\n if (isDetached(element)) {\n debug(\"Element is detached\");\n\n injectContainerElement();\n\n debug(\"Waiting until element is attached...\");\n\n getState(element).onRendered = function () {\n debug(\"Element is now attached\");\n install();\n };\n } else {\n install();\n }\n }\n\n function uninstall(element) {\n var state = getState(element);\n\n if (!state) {\n // Uninstall has been called on a non-erd element.\n return;\n }\n\n // Uninstall may have been called in the following scenarios:\n // (1) Right between the sync code and async batch (here state.busy = true, but nothing have been registered or injected).\n // (2) In the ready callback of the last level of the batch by another element (here, state.busy = true, but all the stuff has been injected).\n // (3) After the installation process (here, state.busy = false and all the stuff has been injected).\n // So to be on the safe side, let's check for each thing before removing.\n\n // We need to remove the event listeners, because otherwise the event might fire on an uninstall element which results in an error when trying to get the state of the element.\n state.onExpandScroll && removeEvent(getExpandElement(element), \"scroll\", state.onExpandScroll);\n state.onShrinkScroll && removeEvent(getShrinkElement(element), \"scroll\", state.onShrinkScroll);\n state.onAnimationStart && removeEvent(state.container, \"animationstart\", state.onAnimationStart);\n\n state.container && element.removeChild(state.container);\n }\n\n return {\n makeDetectable: makeDetectable,\n addListener: addListener,\n uninstall: uninstall,\n initDocument: initDocument\n };\n};\n","\"use strict\"\n\nimport { Emitter } from \"atom\"\nimport { escapeRegExp } from \"./deps/underscore-plus\"\nimport path from \"path\"\nimport Decoration from \"./decoration\"\n\n/**\n * The mixin that provides the decorations API to the minimap editor view.\n *\n * This mixin is injected into the `Minimap` prototype, so every methods defined in this file will be available on any\n * `Minimap` instance.\n */\nexport default class DecorationManagement {\n /** Initializes the decorations related properties. */\n initializeDecorations(minimap) {\n this.minimap = minimap\n\n if (this.emitter == null) {\n /**\n * The minimap emitter, lazily created if not created yet.\n *\n * @type {Emitter}\n * @access private\n */\n this.emitter = new Emitter()\n } else {\n this.emitter = this.minimap.emitter\n }\n\n /**\n * A map with the decoration id as key and the decoration as value.\n *\n * @type {Object}\n * @access private\n */\n this.decorationsById = new Map()\n /**\n * The decorations stored in an array indexed with their marker id.\n *\n * @type {Object}\n * @access private\n */\n this.decorationsByMarkerId = new Map()\n /**\n * The subscriptions to the markers `did-change` event indexed using the marker id.\n *\n * @type {Object}\n * @access private\n */\n this.decorationMarkerChangedSubscriptions = new Map()\n /**\n * The subscriptions to the markers `did-destroy` event indexed using the marker id.\n *\n * @type {Object}\n * @access private\n */\n this.decorationMarkerDestroyedSubscriptions = new Map()\n /**\n * The subscriptions to the decorations `did-change-properties` event indexed using the decoration id.\n *\n * @type {Object}\n * @access private\n */\n this.decorationUpdatedSubscriptions = new Map()\n /**\n * The subscriptions to the decorations `did-destroy` event indexed using the decoration id.\n *\n * @type {Object}\n * @access private\n */\n this.decorationDestroyedSubscriptions = new Map()\n\n // is set to true when a minimapElement is destroyed\n this.destroyed = false\n }\n\n /**\n * Returns all the decorations registered in the current `Minimap`.\n *\n * @returns {Decoration[]} All the decorations in this `Minimap`\n */\n getDecorations() {\n return [...this.decorationsById.values()]\n }\n\n /**\n * Registers an event listener to the `did-add-decoration` event.\n *\n * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be\n * called with an event object with the following properties:\n *\n * - Marker: the marker object that was decorated\n * - Decoration: the decoration object that was created\n *\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidAddDecoration(callback) {\n return this.emitter.on(\"did-add-decoration\", callback)\n }\n\n /**\n * Registers an event listener to the `did-remove-decoration` event.\n *\n * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be\n * called with an event object with the following properties:\n *\n * - Marker: the marker object that was decorated\n * - Decoration: the decoration object that was created\n *\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidRemoveDecoration(callback) {\n return this.emitter.on(\"did-remove-decoration\", callback)\n }\n\n /**\n * Registers an event listener to the `did-change-decoration` event.\n *\n * This event is triggered when the marker targeted by the decoration was changed.\n *\n * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be\n * called with an event object with the following properties:\n *\n * - Marker: the marker object that was decorated\n * - Decoration: the decoration object that was created\n *\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChangeDecoration(callback) {\n return this.emitter.on(\"did-change-decoration\", callback)\n }\n\n /**\n * Registers an event listener to the `did-change-decoration-range` event.\n *\n * This event is triggered when the marker range targeted by the decoration was changed.\n *\n * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be\n * called with an event object with the following properties:\n *\n * - Marker: the marker object that was decorated\n * - Decoration: the decoration object that was created\n *\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChangeDecorationRange(callback) {\n return this.emitter.on(\"did-change-decoration-range\", callback)\n }\n\n /**\n * Registers an event listener to the `did-update-decoration` event.\n *\n * This event is triggered when the decoration itself is modified.\n *\n * @param {function(decoration:Decoration):void} callback A function to call when the event is triggered\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidUpdateDecoration(callback) {\n return this.emitter.on(\"did-update-decoration\", callback)\n }\n\n /**\n * Returns the decoration with the passed-in id.\n *\n * @param {number} id The decoration id\n * @returns {Decoration} The decoration with the given id\n */\n decorationForId(id) {\n return this.decorationsById.get(id)\n }\n\n /**\n * Returns all the decorations that intersect the passed-in row range.\n *\n * @param {number} startScreenRow The first row of the range\n * @param {number} endScreenRow The last row of the range\n * @returns {Record} The decorations that intersect the passed-in range\n */\n decorationsForScreenRowRange(startScreenRow, endScreenRow) {\n const decorationsByMarkerId = {}\n const markers = this.findMarkers({\n intersectsScreenRowRange: [startScreenRow, endScreenRow],\n })\n\n for (let i = 0, len = markers.length; i < len; i++) {\n const marker = markers[i]\n const decorations = this.decorationsByMarkerId.get(marker.id)\n\n if (decorations !== undefined) {\n decorationsByMarkerId[marker.id] = decorations\n }\n }\n\n return decorationsByMarkerId\n }\n\n /**\n * Returns the decorations that intersects the passed-in row range in a structured way.\n *\n * At the first level, the keys are the available decoration types. At the second level, the keys are the row index\n * for which there are decorations available. The value is an array containing the decorations that intersects with\n * the corresponding row.\n *\n * @property {Object} line All the line decorations by row\n * @property {Decoration[]} line[row] All the line decorations at a given row\n * @property {Object} highlight-under All the highlight-under decorations by row\n * @property {Decoration[]} highlight-under[row] All the highlight-under decorations at a given row\n * @property {Object} highlight-over All the highlight-over decorations by row\n * @property {Decoration[]} highlight-over[row] All the highlight-over decorations at a given row\n * @property {Object} highlight-outine All the highlight-outine decorations by row\n * @property {Decoration[]} highlight-outine[row] All the highlight-outine decorations at a given row\n * @returns {Object} The decorations grouped by type and then rows\n */\n decorationsByTypeThenRows() {\n if (this.decorationsByTypeThenRowsCache != null) {\n return this.decorationsByTypeThenRowsCache\n }\n\n const cache = {}\n\n const decorations = this.decorationsById.values()\n for (const decoration of decorations) {\n const range = decoration.marker.getScreenRange()\n const type = decoration.getProperties().type\n\n if (cache[type] == null) {\n cache[type] = {}\n }\n\n for (let row = range.start.row, len = range.end.row; row <= len; row++) {\n if (cache[type][row] == null) {\n cache[type][row] = []\n }\n\n cache[type][row].push(decoration)\n }\n }\n\n /**\n * The grouped decorations cache.\n *\n * @type {Object}\n * @access private\n */\n this.decorationsByTypeThenRowsCache = cache\n return cache\n }\n\n /** Invalidates the decoration by screen rows cache. */\n invalidateDecorationForScreenRowsCache() {\n this.decorationsByTypeThenRowsCache = null\n }\n\n /**\n * Adds a decoration that tracks a `Marker`. When the marker moves, is invalidated, or is destroyed, the decoration\n * will be updated to reflect the marker's state.\n *\n * @fires {did-add-decoration} when The decoration is created successfully\n * @fires {did-change} when The decoration is created successfully\n * @param {Marker} marker The marker you want this decoration to follow\n * @param {Object} decorationParams The decoration properties\n * @param {string} decorationParams.type The decoration type in the following list:\n *\n * - **line**: Fills the line background with the decoration color.\n * - **highlight**: Renders a colored rectangle on the minimap. The highlight is rendered above the line's text.\n * - **highlight-over**: Same as **highlight**.\n * - **highlight-under**: Renders a colored rectangle on the minimap. The highlight is rendered below the line's text.\n * - **highlight-outline**: Renders a colored outline on the minimap. The highlight box is rendered above the line's text.\n * - **foreground-custom**: A decoration type for which you have the control over the render routine. Note that your\n * routine should implement a render on a per-line basis to avoid any side-effect with the offset bitmap cache\n * mechanism. These decorations are rendred on the foreground decorations layer.\n * - **background-custom**: A decoration type for which you have the control over the render routine. Note that your\n * routine should implement a render on a per-line basis to avoid any side-effect with the offset bitmap cache\n * mechanism. These decorations are rendred on the background decorations layer.\n *\n * @param {string} [decorationParams.class] The CSS class to use to retrieve the background color of the decoration by\n * building a scop corresponding to `.minimap .editor `\n * @param {string} [decorationParams.scope] The scope to use to retrieve the decoration background. Note that if the\n * `scope` property is set, the `class` won't be used.\n * @param {string} [decorationParams.color] The CSS color to use to render the decoration. When set, neither `scope`\n * nor `class` are used.\n * @param {string} [decorationParams.plugin] The name of the plugin that created this decoration. It'll be used to\n * order the decorations on the same layer and that are overlapping. If the parameter is omitted the Minimap will\n * attempt to infer the plugin origin from the path of the caller function.\n * @param {function} [decorationParams.render] The render routine for custom decorations. The function receives the\n * decoration and the render data for the current render pass.\n * @returns {Decoration} The created decoration\n */\n decorateMarker(marker, decorationParams) {\n if (this.destroyed || this.minimap.destroyed || marker == null) {\n return\n }\n\n const { id } = marker\n\n if (decorationParams.type === \"highlight\") {\n decorationParams.type = \"highlight-over\"\n }\n\n const { type, plugin } = decorationParams\n\n if (plugin == null) {\n decorationParams.plugin = getOriginatorPackageName()\n }\n\n if (decorationParams.scope == null && decorationParams.class != null) {\n const cls = decorationParams.class.split(\" \").join(\".\")\n decorationParams.scope = `.minimap .${cls}`\n }\n\n if (!this.decorationMarkerDestroyedSubscriptions.has(id)) {\n this.decorationMarkerDestroyedSubscriptions.set(\n id,\n marker.onDidDestroy(() => {\n this.removeAllDecorationsForMarker(marker)\n })\n )\n }\n\n if (!this.decorationMarkerChangedSubscriptions.has(id)) {\n this.decorationMarkerChangedSubscriptions.set(\n id,\n marker.onDidChange((event) => {\n const decorations = this.decorationsByMarkerId.get(id)\n const screenRange = marker.getScreenRange()\n\n this.invalidateDecorationForScreenRowsCache()\n\n if (decorations !== undefined) {\n for (let i = 0, len = decorations.length; i < len; i++) {\n const decoration = decorations[i]\n this.emitter.emit(\"did-change-decoration\", {\n marker,\n decoration,\n event,\n })\n this.emitDecorationChanges(decoration.type, decoration)\n\n decoration.screenRange = screenRange\n }\n }\n let oldStart = event.oldTailScreenPosition\n let oldEnd = event.oldHeadScreenPosition\n let newStart = event.newTailScreenPosition\n let newEnd = event.newHeadScreenPosition\n\n if (oldStart.row > oldEnd.row) {\n ;[oldStart, oldEnd] = [oldEnd, oldStart]\n }\n if (newStart.row > newEnd.row) {\n ;[newStart, newEnd] = [newEnd, newStart]\n }\n\n const rangesDiffs = computeRangesDiffs(oldStart, oldEnd, newStart, newEnd)\n\n for (let i = 0, len = rangesDiffs.length; i < len; i++) {\n const [start, end] = rangesDiffs[i]\n this.emitRangeChanges(\n type,\n {\n start,\n end,\n },\n 0\n )\n }\n })\n )\n }\n\n const decoration = new Decoration(marker, this, decorationParams)\n\n if (!this.decorationsByMarkerId.has(id)) {\n this.decorationsByMarkerId.set(id, [])\n }\n\n this.decorationsByMarkerId.get(id).push(decoration)\n this.decorationsById.set(decoration.id, decoration)\n\n if (!this.decorationUpdatedSubscriptions.has(decoration.id)) {\n this.decorationUpdatedSubscriptions.set(\n decoration.id,\n decoration.onDidChangeProperties((event) => {\n this.emitDecorationChanges(type, decoration)\n })\n )\n }\n\n this.decorationDestroyedSubscriptions.set(\n decoration.id,\n decoration.onDidDestroy(() => {\n this.removeDecoration(decoration)\n })\n )\n\n this.emitDecorationChanges(type, decoration)\n this.emitter.emit(\"did-add-decoration\", {\n marker,\n decoration,\n })\n\n return decoration\n }\n\n /**\n * Emits a change in the `Minimap` corresponding to the passed-in decoration.\n *\n * @param {string} type The type of decoration that changed\n * @param {Decoration} decoration The decoration for which emitting an event\n * @access private\n */\n emitDecorationChanges(type, decoration) {\n if (this.destroyed || this.minimap.editorDestroyed()) {\n return\n }\n\n this.invalidateDecorationForScreenRowsCache()\n\n const range = decoration.screenRange\n if (!range.start || !range.end) {\n return\n }\n\n this.emitRangeChanges(type, range, 0)\n }\n\n /**\n * Emits a change for the specified range.\n *\n * @param {string} type The type of decoration that changed\n * @param {Object} range The range where changes occured\n * @param {number} [screenDelta] An optional screen delta for the change object\n * @access private\n */\n emitRangeChanges(type, range, screenDelta) {\n const startScreenRow = range.start.row\n const endScreenRow = range.end.row\n const lastRenderedScreenRow = this.minimap.getLastVisibleScreenRow()\n const firstRenderedScreenRow = this.minimap.getFirstVisibleScreenRow()\n\n if (screenDelta == null) {\n screenDelta = lastRenderedScreenRow - firstRenderedScreenRow - (endScreenRow - startScreenRow)\n }\n\n const changeEvent = {\n start: startScreenRow,\n end: endScreenRow,\n screenDelta,\n type,\n }\n\n this.emitter.emit(\"did-change-decoration-range\", changeEvent)\n }\n\n /**\n * Removes a `Decoration` from this minimap.\n *\n * @fires {did-change} when The decoration is removed\n * @fires {did-remove-decoration} when The decoration is removed\n * @param {Decoration} decoration The decoration to remove\n */\n removeDecoration(decoration) {\n if (decoration == null) {\n return\n }\n\n const marker = decoration.marker\n let subscription\n\n this.decorationsById.delete(decoration.id)\n\n subscription = this.decorationUpdatedSubscriptions.get(decoration.id)\n if (subscription !== undefined) {\n subscription.dispose()\n }\n\n subscription = this.decorationDestroyedSubscriptions.get(decoration.id)\n if (subscription !== undefined) {\n subscription.dispose()\n }\n\n this.decorationUpdatedSubscriptions.delete(decoration.id)\n this.decorationDestroyedSubscriptions.delete(decoration.id)\n\n const decorations = this.decorationsByMarkerId.get(marker.id)\n if (decorations === undefined) {\n return\n }\n\n this.emitDecorationChanges(decoration.getProperties().type, decoration)\n\n const index = decorations.indexOf(decoration)\n if (index > -1) {\n decorations.splice(index, 1)\n\n this.emitter.emit(\"did-remove-decoration\", {\n marker,\n decoration,\n })\n\n if (decorations.length === 0) {\n this.removedAllMarkerDecorations(marker)\n }\n }\n }\n\n /**\n * Removes all the decorations registered for the passed-in marker.\n *\n * @fires {did-change} when A decoration have been removed\n * @fires {did-remove-decoration} when A decoration have been removed\n * @param {Marker} marker The marker for which removing its decorations\n */\n removeAllDecorationsForMarker(marker) {\n if (marker == null) {\n return\n }\n\n const decorations = this.decorationsByMarkerId.get(marker.id)\n if (decorations === undefined) {\n return\n }\n\n for (let i = 0, len = decorations.length; i < len; i++) {\n const decoration = decorations[i]\n\n if (!this.destroyed && !this.minimap.editorDestroyed()) {\n this.emitDecorationChanges(decoration.getProperties().type, decoration)\n }\n this.emitter.emit(\"did-remove-decoration\", {\n marker,\n decoration,\n })\n }\n\n this.removedAllMarkerDecorations(marker)\n }\n\n /**\n * Performs the removal of a decoration for a given marker.\n *\n * @param {Marker} marker The marker for which removing decorations\n * @access private\n */\n removedAllMarkerDecorations(marker) {\n if (marker == null) {\n return\n }\n\n this.decorationMarkerChangedSubscriptions.get(marker.id).dispose()\n this.decorationMarkerDestroyedSubscriptions.get(marker.id).dispose()\n\n this.decorationsByMarkerId.delete(marker.id)\n this.decorationMarkerChangedSubscriptions.delete(marker.id)\n this.decorationMarkerDestroyedSubscriptions.delete(marker.id)\n }\n\n /** Removes all the decorations that was created in the current `Minimap`. */\n removeAllDecorations() {\n const decorationMarkerChangedSubscriptionsValues = this.decorationMarkerChangedSubscriptions.values()\n for (const decoration of decorationMarkerChangedSubscriptionsValues) {\n decoration.dispose()\n }\n\n const decorationMarkerDestroyedSubscriptionsValues = this.decorationMarkerDestroyedSubscriptions.values()\n for (const decoration of decorationMarkerDestroyedSubscriptionsValues) {\n decoration.dispose()\n }\n\n const decorationUpdatedSubscriptionsValues = this.decorationUpdatedSubscriptions.values()\n for (const decoration of decorationUpdatedSubscriptionsValues) {\n decoration.dispose()\n }\n\n const decorationDestroyedSubscriptionsValues = this.decorationDestroyedSubscriptions.values()\n for (const decoration of decorationDestroyedSubscriptionsValues) {\n decoration.dispose()\n }\n\n const decorationsByIdValues = this.decorationsById.values()\n for (const decoration of decorationsByIdValues) {\n decoration.destroy()\n }\n\n this.decorationsById.clear()\n this.decorationsByMarkerId.clear()\n this.decorationMarkerChangedSubscriptions.clear()\n this.decorationMarkerDestroyedSubscriptions.clear()\n this.decorationUpdatedSubscriptions.clear()\n this.decorationDestroyedSubscriptions.clear()\n }\n\n destroy() {\n this.removeAllDecorations()\n this.minimap = undefined\n this.emitter = undefined\n this.destroyed = true\n }\n}\n\nfunction getOriginatorPackageName() {\n const line = new Error().stack.split(\"\\n\")[3]\n const filePath = line.split(\"(\")[1].replace(\")\", \"\")\n const re = new RegExp(atom.packages.getPackageDirPaths().join(\"|\") + escapeRegExp(path.sep))\n const plugin = filePath\n .replace(re, \"\")\n .split(path.sep)[0]\n .replace(/minimap-|-minimap/, \"\")\n return plugin.indexOf(path.sep) < 0 ? plugin : undefined\n}\n\n/**\n * Given two ranges, it returns an array of ranges representing the differences between them.\n *\n * @param {number} oldStart The row index of the first range start\n * @param {number} oldEnd The row index of the first range end\n * @param {number} newStart The row index of the second range start\n * @param {number} newEnd The row index of the second range end\n * @returns {Object[]} The array of diff ranges\n * @access private\n */\nfunction computeRangesDiffs(oldStart, oldEnd, newStart, newEnd) {\n const diffs = []\n\n if (oldStart.isLessThan(newStart)) {\n diffs.push([oldStart, newStart])\n } else if (newStart.isLessThan(oldStart)) {\n diffs.push([newStart, oldStart])\n }\n\n if (oldEnd.isLessThan(newEnd)) {\n diffs.push([oldEnd, newEnd])\n } else if (newEnd.isLessThan(oldEnd)) {\n diffs.push([newEnd, oldEnd])\n }\n\n return diffs\n}\n","\"use strict\"\n\nimport { Emitter } from \"atom\"\n\nlet idCounter = 0\nconst nextId = function () {\n return idCounter++\n}\n\n/**\n * The `Decoration` class represents a decoration in the Minimap.\n *\n * It has the same API than the `Decoration` class of a text editor.\n */\nexport default class Decoration {\n /**\n * Returns `true` if the passed-in decoration properties matches the specified type.\n *\n * @param {Object} decorationProperties The decoration properties to match\n * @param {string} type The decoration type to match\n * @returns {boolean} Whether the decoration properties match the type\n */\n static isType(decorationProperties, type) {\n if (Array.isArray(decorationProperties.type)) {\n if (decorationProperties.type.indexOf(type) >= 0) {\n return true\n }\n return false\n } else {\n return type === decorationProperties.type\n }\n }\n\n /**\n * Creates a new decoration.\n *\n * @param {Marker} marker The target marker for the decoration\n * @param {Minimap} minimap The Minimap where the decoration will be displayed\n * @param {Object} properties The decoration's properties\n */\n constructor(marker, minimap, properties) {\n /** @access private */\n this.marker = marker\n /** @access private */\n this.minimap = minimap\n /** @access private */\n this.emitter = new Emitter()\n /** @access private */\n this.id = nextId()\n /** @access private */\n this.properties = null\n this.setProperties(properties)\n this.properties.id = this.id\n /** @access private */\n this.destroyed = false\n /** @access private */\n this.markerDestroyDisposable = this.marker.onDidDestroy(() => {\n this.destroy()\n })\n\n this.screenRange = marker.getScreenRange()\n }\n\n /**\n * Destroy this marker.\n *\n * If you own the marker, you should use `Marker#destroy` which will destroy this decoration.\n */\n destroy() {\n if (this.destroyed) {\n return\n }\n\n this.markerDestroyDisposable?.dispose?.()\n this.destroyed = true\n this.emitter.emit(\"did-destroy\")\n this.emitter.dispose()\n }\n\n /**\n * Returns whether this decoration is destroyed or not.\n *\n * @returns {boolean} Whether this decoration is destroyed or not\n */\n isDestroyed() {\n return this.destroyed\n }\n\n /**\n * Registers an event listener to the `did-change-properties` event.\n *\n * This event is triggered when the decoration update method is called.\n *\n * @param {function(change:Object):void} callback A function to call when the event is triggered\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChangeProperties(callback) {\n if (this.destroyed) {\n return\n }\n return this.emitter.on(\"did-change-properties\", callback)\n }\n\n /**\n * Registers an event listener to the `did-destroy` event.\n *\n * @param {function():void} callback A function to call when the event is triggered\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidDestroy(callback) {\n if (this.destroyed) {\n return\n }\n return this.emitter.on(\"did-destroy\", callback)\n }\n\n /**\n * An id unique across all Decoration objects.\n *\n * @returns {number} The decoration id\n */\n getId() {\n return this.id\n }\n\n /**\n * Returns the marker associated with this Decoration.\n *\n * @returns {Marker} The decoration's marker\n */\n getMarker() {\n return this.marker\n }\n\n /**\n * Check if this decoration is of type `type`.\n *\n * @param {string | Array} type A type like `'line-number'`, `'line'`, etc. `type` can also be an Array of Strings,\n * where it will return true if the decoration's type matches any in the array.\n * @returns {boolean} Whether this decoration match the passed-in type\n */\n isType(type) {\n return Decoration.isType(this.properties, type)\n }\n\n /**\n * Returns the Decoration's properties.\n *\n * @returns {Object} The decoration's properties\n */\n getProperties() {\n return this.properties\n }\n\n /**\n * Update the marker with new properties. Allows you to change the decoration's class.\n *\n * @param {Object} newProperties The new properties for the decoration\n */\n setProperties(newProperties) {\n if (this.destroyed) {\n return\n }\n\n const oldProperties = this.properties\n this.properties = newProperties\n this.properties.id = this.id\n\n this.emitter.emit(\"did-change-properties\", { oldProperties, newProperties })\n }\n}\n","\"use strict\"\n\nimport { escapeRegExp } from \"../deps/underscore-plus\"\nimport Mixin from \"mixto\"\n\nimport * as Main from \"../main\"\nimport { styleReader } from \"../main\"\nimport CanvasLayer from \"../canvas-layer\"\n\nconst SPEC_MODE = atom.inSpecMode()\n// an instance of MinimapElement used for testing and calling spies\nlet thisSpec\n\n/**\n * The `CanvasDrawer` mixin is responsible for the rendering of a `Minimap` in a `canvas` element.\n *\n * This mixin is injected in the `MinimapElement` prototype, so all these methods are available on any `MinimapElement` instance.\n */\nexport default class CanvasDrawer extends Mixin {\n /** Initializes the canvas elements needed to perform the `Minimap` rendering. */\n initializeCanvas() {\n if (SPEC_MODE) {\n // class methods only used for spying the calls\n this.drawLines = (firstLine, lastLine) => {\n console.log({ firstLine, lastLine })\n }\n this.drawLineDecoration = drawLineDecoration\n this.drawGutterDecoration = drawGutterDecoration\n this.drawHighlightDecoration = drawHighlightDecoration\n this.drawHighlightOutlineDecoration = drawHighlightOutlineDecoration\n this.drawCustomDecoration = drawCustomDecoration\n this.StyleReader = styleReader\n thisSpec = this\n }\n\n /**\n * The main canvas layer where lines are rendered.\n *\n * @type {CanvasLayer}\n */\n this.tokensLayer = new CanvasLayer()\n /**\n * The canvas layer for decorations below the text.\n *\n * @type {CanvasLayer}\n */\n this.backLayer = new CanvasLayer()\n /**\n * The canvas layer for decorations above the text.\n *\n * @type {CanvasLayer}\n */\n this.frontLayer = new CanvasLayer()\n\n if (!this.pendingChanges) {\n /**\n * Stores the changes from the text editor.\n *\n * @type {Object[]}\n * @access private\n */\n this.pendingChanges = []\n }\n\n if (!this.pendingBackDecorationChanges) {\n /**\n * Stores the changes from the minimap back decorations.\n *\n * @type {Object[]}\n * @access private\n */\n this.pendingBackDecorationChanges = []\n }\n\n if (!this.pendingFrontDecorationChanges) {\n /**\n * Stores the changes from the minimap front decorations.\n *\n * @type {Object[]}\n * @access private\n */\n this.pendingFrontDecorationChanges = []\n }\n\n // the maximum number of tokens to render in one line\n this.maxTokensInOneLine = atom.config.get(\"minimap.maxTokensInOneLine\")\n }\n\n /**\n * Returns the uppermost canvas in the MinimapElement.\n *\n * @returns {HTMLCanvasElement} The html canvas element\n */\n getFrontCanvas() {\n return this.frontLayer.canvas\n }\n\n /**\n * Attaches the canvases into the specified container.\n *\n * @param {HTMLElement} parent The canvases' container\n * @access private\n */\n attachCanvases(parent) {\n this.backLayer.attach(parent)\n this.tokensLayer.attach(parent)\n this.frontLayer.attach(parent)\n }\n\n /**\n * Changes the size of all the canvas layers at once.\n *\n * @param {number} width The new width for the three canvases\n * @param {number} height The new height for the three canvases\n * @access private\n */\n setCanvasesSize(width, height) {\n this.backLayer.setSize(width, height)\n this.tokensLayer.setSize(width, height)\n this.frontLayer.setSize(width, height)\n }\n\n /** Performs an update of the rendered `Minimap` based on the changes registered in the instance. */\n updateCanvas() {\n const firstRow = this.minimap.getFirstVisibleScreenRow()\n const lastRow = this.minimap.getLastVisibleScreenRow()\n\n const devicePixelRatio = this.minimap.getDevicePixelRatio()\n const lineHeight = this.minimap.getLineHeight() * devicePixelRatio\n const charHeight = this.minimap.getCharHeight() * devicePixelRatio\n const charWidth = this.minimap.getCharWidth() * devicePixelRatio\n const { width: canvasWidth, height: canvasHeight } = this.tokensLayer.getSize()\n const editor = this.minimap.getTextEditor()\n const editorElement = this.minimap.getTextEditorElement()\n\n // TODO avoid closure: https://stackoverflow.com/a/46256398/7910299\n const getTokenColorClosure = this.displayCodeHighlights\n ? (scopes) => getTokenColor(scopes, editorElement, this.textOpacity)\n : () => getDefaultColor(editorElement, this.textOpacity)\n\n updateTokensLayer(\n this.tokensLayer,\n firstRow,\n lastRow,\n this.offscreenFirstRow,\n this.offscreenLastRow,\n this.pendingChanges,\n lineHeight,\n charHeight,\n charWidth,\n canvasWidth,\n editor,\n editor.getScreenLineCount(),\n getInvisibleRegExp(editor),\n getTokenColorClosure,\n this.ignoreWhitespacesInTokens,\n this.maxTokensInOneLine\n )\n\n if (SPEC_MODE) {\n // call the spy for drawLines which is used inside updateTokensLayer\n this.drawLines(firstRow, lastRow)\n }\n\n const decorations = this.DecorationManagement.decorationsByTypeThenRows(firstRow, lastRow)\n\n const renderData = {\n context: this.backLayer.context,\n canvasWidth,\n canvasHeight,\n lineHeight,\n charWidth,\n charHeight,\n orders: Main.getPluginsOrder(),\n }\n\n const drawCustomDecorationLambda = (decoration, data, decorationColor) =>\n drawCustomDecoration(decoration, data, decorationColor, editorElement)\n backgroundDecorationDispatcher[\"background-custom\"] = drawCustomDecorationLambda\n frontDecorationDispatcher[\"foreground-custom\"] = drawCustomDecorationLambda\n\n updateBackDecorationsLayer(\n this.backLayer,\n firstRow,\n lastRow,\n this.offscreenFirstRow,\n this.offscreenLastRow,\n this.pendingBackDecorationChanges,\n renderData,\n lineHeight,\n editorElement,\n decorations\n )\n\n renderData.context = this.frontLayer.context\n\n updateFrontDecorationsLayer(\n this.frontLayer,\n firstRow,\n lastRow,\n this.offscreenFirstRow,\n this.offscreenLastRow,\n this.pendingFrontDecorationChanges,\n renderData,\n lineHeight,\n editorElement,\n decorations\n )\n\n this.pendingChanges = []\n this.pendingBackDecorationChanges = []\n this.pendingFrontDecorationChanges = []\n\n /**\n * The first row in the last render of the offscreen canvas.\n *\n * @type {number}\n * @access private\n */\n this.offscreenFirstRow = firstRow\n /**\n * The last row in the last render of the offscreen canvas.\n *\n * @type {number}\n * @access private\n */\n this.offscreenLastRow = lastRow\n }\n\n // ######## ######## ### ## ##\n // ## ## ## ## ## ## ## ## ##\n // ## ## ## ## ## ## ## ## ##\n // ## ## ######## ## ## ## ## ##\n // ## ## ## ## ######### ## ## ##\n // ## ## ## ## ## ## ## ## ##\n // ######## ## ## ## ## ### ###\n\n /**\n * Routine used to render changes in specific ranges for one layer.\n *\n * @param {CanvasLayer} layer The layer to redraw\n * @param {Object[]} intactRanges An array of the ranges to leave intact\n * @param {number} firstRow FirstRow the first row of the range to update\n * @param {number} lastRow LastRow the last row of the range to update\n * @param {Function} method The render method to use for the lines drawing\n * @access private Unused (inlined the code for performance reasons)\n */\n // redrawRangesOnLayer (layer, intactRanges, firstRow, lastRow, method) {\n // const devicePixelRatio = this.minimap.getDevicePixelRatio()\n // const lineHeight = this.minimap.getLineHeight() * devicePixelRatio\n //\n // layer.clearCanvas()\n //\n // if (intactRanges.length === 0) {\n // method.call(this, firstRow, lastRow, 0)\n // } else {\n // for (let j = 0, len = intactRanges.length; j < len; j++) {\n // const intact = intactRanges[j]\n //\n // layer.copyPartFromOffscreen(\n // intact.offscreenRow * lineHeight,\n // (intact.start - firstRow) * lineHeight,\n // (intact.end - intact.start) * lineHeight\n // )\n // }\n // drawLinesForRanges(method, intactRanges, firstRow, lastRow)\n // }\n //\n // layer.resetOffscreenSize()\n // layer.copyToOffscreen()\n // }\n\n /**\n * Renders the lines between the intact ranges when an update has pending changes.\n *\n * @param {Function} method The render method to use for the lines drawing\n * @param {Object[]} intactRanges The intact ranges in the minimap\n * @param {number} firstRow The first row of the rendered region\n * @param {number} lastRow The last row of the rendered region\n * @access private Unused (inlined the code for performance reasons)\n */\n // drawLinesForRanges (method, ranges, firstRow, lastRow) {\n // let currentRow = firstRow\n // for (let i = 0, len = ranges.length; i < len; i++) {\n // const range = ranges[i]\n //\n // method.call(this, currentRow, range.start, currentRow - firstRow)\n //\n // currentRow = range.end\n // }\n // if (currentRow <= lastRow) {\n // method.call(this, currentRow, lastRow, currentRow - firstRow)\n // }\n // }\n}\n\n// ######## ######## ### ## ##\n// ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ##\n// ## ## ######## ## ## ## ## ##\n// ## ## ## ## ######### ## ## ##\n// ## ## ## ## ## ## ## ## ##\n// ######## ## ## ## ## ### ###\n\n/**\n * Performs an update of the tokens layer using the pending changes array.\n *\n * @param {CanvasLayer} tokensLayer\n * @param {number} firstRow FirstRow the first row of the range to update\n * @param {number} lastRow LastRow the last row of the range to update\n * @param {number} offscreenFirstRow\n * @param {number} offscreenLastRow\n * @param {Array<>} pendingChanges\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {number} charHeight This.minimap.getCharHeight() * devicePixelRatio\n * @param {number} charWidth This.minimap.getCharWidth() * devicePixelRatio\n * @param {number} canvasWidth This.tokensLayer.getSize().width\n * @param {TextEditor} editor This.minimap.getTextEditor()\n * @param {(t: Token) => string} getTokenColorClosure\n * @param {boolean} ignoreWhitespacesInTokens This.ignoreWhitespacesInTokens\n * @param {number} maxTokensInOneLine This.maxTokensInOneLine\n * @access private\n */\nfunction updateTokensLayer(\n tokensLayer,\n firstRow,\n lastRow,\n offscreenFirstRow,\n offscreenLastRow,\n pendingChanges,\n lineHeight,\n charHeight,\n charWidth,\n canvasWidth,\n editor,\n editorScreenLineCount,\n invisibleRegExp,\n getTokenColorClosure,\n ignoreWhitespacesInTokens,\n maxTokensInOneLine\n) {\n // NOTE: this method is the hot function of Minimap. Do not refactor. The code is inlined delibarately.\n\n const intactRanges = computeIntactRanges(firstRow, lastRow, pendingChanges, offscreenFirstRow, offscreenLastRow)\n\n // redrawRangesOnLayer\n const context = tokensLayer.context\n\n tokensLayer.clearCanvas()\n\n if (intactRanges.length === 0) {\n drawLines(\n firstRow,\n lastRow,\n 0,\n lineHeight,\n charHeight,\n charWidth,\n canvasWidth,\n context,\n editor,\n editorScreenLineCount,\n invisibleRegExp,\n getTokenColorClosure,\n ignoreWhitespacesInTokens,\n maxTokensInOneLine\n )\n } else {\n for (let j = 0, len = intactRanges.length; j < len; j++) {\n const intact = intactRanges[j]\n\n tokensLayer.copyPartFromOffscreen(\n intact.offscreenRow * lineHeight,\n (intact.start - firstRow) * lineHeight,\n (intact.end - intact.start) * lineHeight\n )\n }\n // drawLinesForRanges\n let currentRow = firstRow\n for (let i = 0, len = intactRanges.length; i < len; i++) {\n const range = intactRanges[i]\n\n drawLines(\n currentRow,\n range.start,\n currentRow - firstRow,\n lineHeight,\n charHeight,\n charWidth,\n canvasWidth,\n context,\n editor,\n editorScreenLineCount,\n invisibleRegExp,\n getTokenColorClosure,\n ignoreWhitespacesInTokens,\n maxTokensInOneLine\n )\n\n currentRow = range.end\n }\n if (currentRow <= lastRow) {\n drawLines(\n currentRow,\n lastRow,\n currentRow - firstRow,\n lineHeight,\n charHeight,\n charWidth,\n canvasWidth,\n context,\n editor,\n editorScreenLineCount,\n invisibleRegExp,\n getTokenColorClosure,\n ignoreWhitespacesInTokens,\n maxTokensInOneLine\n )\n }\n }\n\n tokensLayer.resetOffscreenSize()\n tokensLayer.copyToOffscreen()\n}\n\n/**\n * Performs an update of the back decorations layer using the pending back decorations changes arrays.\n *\n * @param {CanvasLayer} backLayer\n * @param {number} firstRow FirstRow the first row of the range to update\n * @param {number} lastRow LastRow the last row of the range to update\n * @param {number} offscreenFirstRow\n * @param {number} offscreenLastRow\n * @param {Array<>} pendingBackDecorationChanges\n * @param {Object} renderData\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {TextEditorElement} editorElement This.minimap.getTextEditorElement()\n * @param {Decoration[]} decorations\n * @access private\n */\nfunction updateBackDecorationsLayer(\n backLayer,\n firstRow,\n lastRow,\n offscreenFirstRow,\n offscreenLastRow,\n pendingBackDecorationChanges,\n renderData,\n lineHeight,\n editorElement,\n decorations\n) {\n const intactRanges = computeIntactRanges(\n firstRow,\n lastRow,\n pendingBackDecorationChanges,\n offscreenFirstRow,\n offscreenLastRow\n )\n\n // NOTE: this method is the hot function of Minimap. Do not refactor. The code is inlined delibarately.\n\n // redrawRangesOnLayer\n\n backLayer.clearCanvas()\n\n if (intactRanges.length === 0) {\n drawBackDecorationsForLines(firstRow, lastRow, 0, renderData, lineHeight, editorElement, decorations)\n } else {\n for (let j = 0, len = intactRanges.length; j < len; j++) {\n const intact = intactRanges[j]\n\n backLayer.copyPartFromOffscreen(\n intact.offscreenRow * lineHeight,\n (intact.start - firstRow) * lineHeight,\n (intact.end - intact.start) * lineHeight\n )\n }\n // drawLinesForRanges\n let currentRow = firstRow\n for (let i = 0, len = intactRanges.length; i < len; i++) {\n const range = intactRanges[i]\n\n drawBackDecorationsForLines(\n currentRow,\n range.start,\n currentRow - firstRow,\n renderData,\n lineHeight,\n editorElement,\n decorations\n )\n\n currentRow = range.end\n }\n if (currentRow <= lastRow) {\n drawBackDecorationsForLines(\n currentRow,\n lastRow,\n currentRow - firstRow,\n renderData,\n lineHeight,\n editorElement,\n decorations\n )\n }\n }\n\n backLayer.resetOffscreenSize()\n backLayer.copyToOffscreen()\n}\n\n/**\n * Performs an update of the front decorations layer using the pending front decorations changes arrays.\n *\n * @param {CanvasLayer} frontLayer\n * @param {number} firstRow FirstRow the first row of the range to update\n * @param {number} lastRow LastRow the last row of the range to update\n * @param {number} offscreenFirstRow\n * @param {number} offscreenLastRow\n * @param {Array<>} pendingFrontDecorationChanges\n * @param {Object} renderData\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {TextEditorElement} editorElement This.minimap.getTextEditorElement()\n * @param {Decoration[]} decorations\n * @access private\n */\nfunction updateFrontDecorationsLayer(\n frontLayer,\n firstRow,\n lastRow,\n offscreenFirstRow,\n offscreenLastRow,\n pendingFrontDecorationChanges,\n renderData,\n lineHeight,\n editorElement,\n decorations\n) {\n const intactRanges = computeIntactRanges(\n firstRow,\n lastRow,\n pendingFrontDecorationChanges,\n offscreenFirstRow,\n offscreenLastRow\n )\n\n // NOTE: this method is the hot function of Minimap. Do not refactor. The code is inlined delibarately.\n\n // redrawRangesOnLayer\n\n frontLayer.clearCanvas()\n\n if (intactRanges.length === 0) {\n drawFrontDecorationsForLines(firstRow, lastRow, 0, renderData, lineHeight, editorElement, decorations)\n } else {\n for (let j = 0, len = intactRanges.length; j < len; j++) {\n const intact = intactRanges[j]\n\n frontLayer.copyPartFromOffscreen(\n intact.offscreenRow * lineHeight,\n (intact.start - firstRow) * lineHeight,\n (intact.end - intact.start) * lineHeight\n )\n }\n // drawLinesForRanges\n let currentRow = firstRow\n for (let i = 0, len = intactRanges.length; i < len; i++) {\n const range = intactRanges[i]\n\n drawFrontDecorationsForLines(\n currentRow,\n range.start,\n currentRow - firstRow,\n renderData,\n lineHeight,\n editorElement,\n decorations\n )\n\n currentRow = range.end\n }\n if (currentRow <= lastRow) {\n drawFrontDecorationsForLines(\n currentRow,\n lastRow,\n currentRow - firstRow,\n renderData,\n lineHeight,\n editorElement,\n decorations\n )\n }\n }\n\n frontLayer.resetOffscreenSize()\n frontLayer.copyToOffscreen()\n}\n\nconst whitespaceTokenRegex = /^\\s+$/\nconst oneOrMoreWhiteSpaceRegexp = /\\s+/\n\n/**\n * Draws a single token on the given context.\n *\n * @param {CanvasRenderingContext2D} context The target canvas context\n * @param {string} text The token's text content\n * @param {string} color The token's CSS color\n * @param {number} x The x position of the token in the line\n * @param {number} y The y position of the line in the minimap\n * @param {number} charWidth The width of a character in the minimap\n * @param {number} charHeight The height of a character in the minimap\n * @returns {number} The x position at the end of the token\n * @access private\n */\nfunction drawToken(context, text, color, x, y, charWidth, charHeight, ignoreWhitespacesInTokens) {\n context.fillStyle = color\n\n if (ignoreWhitespacesInTokens) {\n const length = text.length * charWidth\n context.fillRect(x, y, length, charHeight)\n\n return x + length\n } else {\n let chars = 0\n for (let j = 0, len = text.length; j < len; j++) {\n const char = text[j]\n if (char === \" \") {\n if (chars > 0) {\n context.fillRect(x - chars * charWidth, y, chars * charWidth, charHeight)\n }\n chars = 0\n } else {\n chars++\n }\n x += charWidth\n }\n if (chars > 0) {\n context.fillRect(x - chars * charWidth, y, chars * charWidth, charHeight)\n }\n return x\n }\n}\n\n/**\n * Draws lines on the corresponding layer.\n *\n * The lines range to draw is specified by the `firstRow` and `lastRow` parameters.\n *\n * @param {number} firstRow The first row to render\n * @param {number} lastRow The last row to render\n * @param {number} offsetRow The relative offset to apply to rows when rendering them\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {number} charHeight This.minimap.getCharHeight() * devicePixelRatio\n * @param {number} charWidth This.minimap.getCharWidth() * devicePixelRatio\n * @param {number} canvasWidth This.tokensLayer.getSize().width\n * @param {CanvasRenderingContext2D} context This.tokensLayer.context\n * @param {TextEditor} editor This.minimap.getTextEditor()\n * @param {number} editorScreenLineCount\n * @param {RegExp} invisibleRegExp\n * @param {(t: Token) => string} getTokenColorClosure\n * @param {boolean} ignoreWhitespacesInTokens This.ignoreWhitespacesInTokens\n * @param {number} maxTokensInOneLine This.maxTokensInOneLine\n * @access private\n */\nfunction drawLines(\n firstRow,\n lastRow,\n offsetRow,\n lineHeight,\n charHeight,\n charWidth,\n canvasWidth,\n context,\n editor,\n editorScreenLineCount,\n invisibleRegExp,\n getTokenColorClosure,\n ignoreWhitespacesInTokens,\n maxTokensInOneLine\n) {\n // NOTE: this method is the hot function of Minimap. Do not refactor. The code is inlined delibarately.\n\n if (firstRow > lastRow) {\n return\n }\n\n let lastLine, x\n let y = offsetRow * lineHeight - lineHeight\n\n // eachTokenForScreenRows\n lastRow = Math.min(lastRow, editorScreenLineCount)\n\n for (let line = firstRow; line < lastRow; line++) {\n const editorTokensForScreenRow = editor.tokensForScreenRow(line)\n const numToken = editorTokensForScreenRow.length\n const numTokenToRender = Math.min(numToken, maxTokensInOneLine)\n\n if (lastLine !== line) {\n x = 0\n y += lineHeight\n lastLine = line\n context.clearRect(x, y, canvasWidth, lineHeight)\n }\n\n for (let iToken = 0; iToken < numTokenToRender; iToken++) {\n const token = editorTokensForScreenRow[iToken]\n const tokenText = token.text.replace(invisibleRegExp, \" \")\n const tokenScopes = token.scopes\n\n if (x > canvasWidth) {\n continue\n }\n\n if (whitespaceTokenRegex.test(tokenText)) {\n x += tokenText.length * charWidth\n } else {\n x = drawToken(\n context,\n tokenText,\n getTokenColorClosure(tokenScopes),\n x,\n y,\n charWidth,\n charHeight,\n ignoreWhitespacesInTokens\n )\n }\n }\n }\n\n context.fill()\n}\n\n/**\n * Returns the regexp to replace invisibles substitution characters in editor lines.\n *\n * @param {TextEditor} editor\n * @returns {RegExp} The regular expression to match invisible characters\n * @access private\n */\nfunction getInvisibleRegExp(editor) {\n const invisibles = editor.getInvisibles()\n const regexp = []\n if (invisibles.cr != null) {\n regexp.push(invisibles.cr)\n }\n if (invisibles.eol != null) {\n regexp.push(invisibles.eol)\n }\n if (invisibles.space != null) {\n regexp.push(invisibles.space)\n }\n if (invisibles.tab != null) {\n regexp.push(invisibles.tab)\n }\n\n if (regexp.length !== 0) {\n return RegExp(\n regexp\n .filter((s) => {\n return typeof s === \"string\"\n })\n .map(escapeRegExp)\n .join(\"|\"),\n \"g\"\n )\n } else {\n return null\n }\n}\n\n/**\n * Dispatchers for decoration drawing (custom decoration drawer added dynamically)\n *\n * @param {Object} backgroundDecorationDispatcher An object with the type to render as key and the render method as value\n */\nconst backgroundDecorationDispatcher = {\n line: drawLineDecoration,\n \"highlight-under\": drawHighlightDecoration,\n}\n\n/**\n * Dispatchers for decoration drawing (custom decoration drawer added dynamically)\n *\n * @param {Object} frontDecorationDispatcher An object with the type to render as key and the render method as value\n */\nconst frontDecorationDispatcher = {\n gutter: drawGutterDecoration,\n \"highlight-over\": drawHighlightDecoration,\n \"highlight-outline\": drawHighlightOutlineDecoration,\n}\n\n/**\n * Draws a line decoration.\n *\n * @param {Decoration} decoration The decoration to render\n * @param {Object} data The data need to perform the render\n * @param {string} decorationColor Decoration color\n * @access private\n */\nfunction drawLineDecoration(decoration, data, decorationColor) {\n const { context, lineHeight, canvasWidth, yRow } = data\n\n context.fillStyle = decorationColor\n context.fillRect(0, yRow, canvasWidth, lineHeight)\n}\n\n/**\n * Draws a gutter decoration.\n *\n * @param {Decoration} decoration The decoration to render\n * @param {Object} data The data need to perform the render\n * @param {string} decorationColor Decoration color\n * @access private\n */\nfunction drawGutterDecoration(decoration, data, decorationColor) {\n const { context, lineHeight, yRow } = data\n\n context.fillStyle = decorationColor\n context.fillRect(0, yRow, 1, lineHeight)\n}\n\n/**\n * Draws a highlight decoration.\n *\n * It renders only the part of the highlight corresponding to the specified row.\n *\n * @param {Decoration} decoration The decoration to render\n * @param {Object} data The data need to perform the render\n * @param {string} decorationColor Decoration color\n * @access private\n */\nfunction drawHighlightDecoration(decoration, data, decorationColor) {\n const { context, lineHeight, charWidth, canvasWidth, screenRow, yRow } = data\n\n const range = decoration.getMarker().getScreenRange()\n const rowSpan = range.end.row - range.start.row\n\n context.fillStyle = decorationColor\n\n if (rowSpan === 0) {\n const colSpan = range.end.column - range.start.column\n context.fillRect(range.start.column * charWidth, yRow, colSpan * charWidth, lineHeight)\n } else if (screenRow === range.start.row) {\n const x = range.start.column * charWidth\n context.fillRect(x, yRow, canvasWidth - x, lineHeight)\n } else if (screenRow === range.end.row) {\n context.fillRect(0, yRow, range.end.column * charWidth, lineHeight)\n } else {\n context.fillRect(0, yRow, canvasWidth, lineHeight)\n }\n}\n\n/**\n * Draws a highlight outline decoration.\n *\n * It renders only the part of the highlight corresponding to the specified row.\n *\n * @param {Decoration} decoration The decoration to render\n * @param {Object} data The data need to perform the render\n * @param {string} decorationColor Decoration color\n * @access private\n */\nfunction drawHighlightOutlineDecoration(decoration, data, decorationColor) {\n const { context, lineHeight, charWidth, canvasWidth, screenRow, yRow } = data\n\n let bottomWidth, colSpan, width, xBottomStart, xEnd, xStart\n const range = decoration.getMarker().getScreenRange()\n const rowSpan = range.end.row - range.start.row\n const yStart = yRow\n const yEnd = yStart + lineHeight\n\n context.fillStyle = decorationColor\n\n if (rowSpan === 0) {\n colSpan = range.end.column - range.start.column\n width = colSpan * charWidth\n xStart = range.start.column * charWidth\n xEnd = xStart + width\n\n context.fillRect(xStart, yStart, width, 1)\n context.fillRect(xStart, yEnd - 1, width, 1)\n context.fillRect(xStart, yStart, 1, lineHeight)\n context.fillRect(xEnd, yStart, 1, lineHeight)\n } else if (rowSpan === 1) {\n xStart = range.start.column * charWidth\n xEnd = range.end.column * charWidth\n\n if (screenRow === range.start.row) {\n width = canvasWidth - xStart\n xBottomStart = Math.max(xStart, xEnd)\n bottomWidth = canvasWidth - xBottomStart\n\n context.fillRect(xStart, yStart, width, 1)\n context.fillRect(xBottomStart, yEnd - 1, bottomWidth, 1)\n context.fillRect(xStart, yStart, 1, lineHeight)\n context.fillRect(canvasWidth - 1, yStart, 1, lineHeight)\n } else {\n width = canvasWidth - xStart\n bottomWidth = canvasWidth - xEnd\n\n context.fillRect(0, yStart, xStart, 1)\n context.fillRect(0, yEnd - 1, xEnd, 1)\n context.fillRect(0, yStart, 1, lineHeight)\n context.fillRect(xEnd, yStart, 1, lineHeight)\n }\n } else {\n xStart = range.start.column * charWidth\n xEnd = range.end.column * charWidth\n if (screenRow === range.start.row) {\n width = canvasWidth - xStart\n\n context.fillRect(xStart, yStart, width, 1)\n context.fillRect(xStart, yStart, 1, lineHeight)\n context.fillRect(canvasWidth - 1, yStart, 1, lineHeight)\n } else if (screenRow === range.end.row) {\n width = canvasWidth - xStart\n\n context.fillRect(0, yEnd - 1, xEnd, 1)\n context.fillRect(0, yStart, 1, lineHeight)\n context.fillRect(xEnd, yStart, 1, lineHeight)\n } else {\n context.fillRect(0, yStart, 1, lineHeight)\n context.fillRect(canvasWidth - 1, yStart, 1, lineHeight)\n if (screenRow === range.start.row + 1) {\n context.fillRect(0, yStart, xStart, 1)\n }\n if (screenRow === range.end.row - 1) {\n context.fillRect(xEnd, yEnd - 1, canvasWidth - xEnd, 1)\n }\n }\n }\n}\n\n/**\n * Draws a custom decoration.\n *\n * It renders only the part of the highlight corresponding to the specified row.\n *\n * @param {Decoration} decoration The decoration to render\n * @param {Object} data The data need to perform the render\n * @param {string} decorationColor Decoration color\n * @param {TextEditorElement} editorElement\n * @access private\n */\nfunction drawCustomDecoration(decoration, data, decorationColor, editorElement) {\n const renderRoutine = decoration.getProperties().render\n\n if (renderRoutine) {\n data.color = decorationColor\n renderRoutine(decoration, data, editorElement)\n }\n}\n\n/**\n * Draws the specified decorations for the current `screenRow`.\n *\n * The `decorations` object contains all the decorations grouped by type and then rows.\n *\n * @param {number} screenRow The screen row index for which render decorations\n * @param {Object} decorations The object containing all the decorations\n * @param {Object} renderData The object containing the render data\n * @param {Object} types An object with the type to render as key and the render method as value\n * @param {TextEditorElement} editorElement\n * @access private\n */\nfunction drawDecorations(screenRow, decorations, renderData, types, editorElement) {\n let decorationsToRender = []\n\n renderData.context.clearRect(0, renderData.yRow, renderData.canvasWidth, renderData.lineHeight)\n\n for (const i in types) {\n decorationsToRender = decorationsToRender.concat(decorations[i] != null ? decorations[i][screenRow] || [] : [])\n }\n\n decorationsToRender.sort(\n (a, b) => (renderData.orders[a.properties.plugin] || 0) - (renderData.orders[b.properties.plugin] || 0)\n )\n\n if (decorationsToRender != null ? decorationsToRender.length : undefined) {\n for (let i = 0, len = decorationsToRender.length; i < len; i++) {\n const decoration = decorationsToRender[i]\n const decorationDrawer = types[decoration.properties.type]\n if (!SPEC_MODE) {\n decorationDrawer(decoration, renderData, /* decorationColor */ getDecorationColor(decoration, editorElement))\n } else {\n // get the real function name from the mangeld Parcel names\n const functionName = decorationDrawer.name.split(\"$\").pop().replace(\"Lambda\", \"\")\n // call the spy:\n thisSpec[functionName](\n decoration,\n renderData,\n /* decorationColor */ getDecorationColor(decoration, editorElement)\n )\n }\n }\n }\n}\n\n/**\n * Draws front decorations on the corresponding layer.\n *\n * The lines range to draw is specified by the `firstRow` and `lastRow` parameters.\n *\n * @param {number} firstRow The first row to render\n * @param {number} lastRow The last row to render\n * @param {number} offsetRow The relative offset to apply to rows when rendering them\n * @param {Object} renderData\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {TextEditorElement} editorElement This.minimap.getTextEditorElement()\n * @param {Decoration[]} decorations\n * @access private\n */\nfunction drawFrontDecorationsForLines(\n firstRow,\n lastRow,\n offsetRow,\n renderData,\n lineHeight,\n editorElement,\n decorations\n) {\n if (firstRow > lastRow) {\n return\n }\n\n for (let screenRow = firstRow; screenRow <= lastRow; screenRow++) {\n renderData.row = offsetRow + (screenRow - firstRow)\n renderData.yRow = renderData.row * lineHeight\n renderData.screenRow = screenRow\n\n drawDecorations(screenRow, decorations, renderData, frontDecorationDispatcher, editorElement)\n }\n\n renderData.context.fill()\n}\n\n/**\n * Draws back decorations on the corresponding layer.\n *\n * The lines range to draw is specified by the `firstRow` and `lastRow` parameters.\n *\n * @param {number} firstRow The first row to render\n * @param {number} lastRow The last row to render\n * @param {number} offsetRow The relative offset to apply to rows when rendering them\n * @param {Object} renderData\n * @param {number} lineHeight This.minimap.getLineHeight() * devicePixelRatio\n * @param {TextEditorElement} editorElement This.minimap.getTextEditorElement()\n * @param {Decoration[]} decorations\n * @access private\n */\nfunction drawBackDecorationsForLines(firstRow, lastRow, offsetRow, renderData, lineHeight, editorElement, decorations) {\n if (firstRow > lastRow) {\n return\n }\n\n for (let screenRow = firstRow; screenRow <= lastRow; screenRow++) {\n renderData.row = offsetRow + (screenRow - firstRow)\n renderData.yRow = renderData.row * lineHeight\n renderData.screenRow = screenRow\n\n drawDecorations(screenRow, decorations, renderData, backgroundDecorationDispatcher, editorElement)\n }\n\n renderData.context.fill()\n}\n\n// ###### ####### ## ####### ######## ######\n// ## ## ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ######## ######\n// ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ## ## ##\n// ###### ####### ######## ####### ## ## ######\n\n/**\n * Returns the opacity value to use when rendering the `Minimap` text.\n *\n * @returns {Number} The text opacity value Unused (inlined)\n */\n// getTextOpacity () { return this.textOpacity }\n\n/**\n * Returns the default text color for an editor content.\n *\n * The color value is directly read from the `TextEditorView` computed styles.\n *\n * @param {TextEditorElement} editorElement\n * @param {number} textOpacity\n * @returns {string} A CSS color\n */\nfunction getDefaultColor(editorElement, textOpacity) {\n const color = styleReader.retrieveStyleFromDom([\".editor\"], \"color\", editorElement, true)\n return transparentize(color, textOpacity)\n}\n\n/**\n * Returns the text color for the passed-in scopes\n *\n * The color value is read from the DOM by creating a node structure that match the token `scope` property.\n *\n * @param {string[]} scopes An array of scopes for a `TextEditor` token (token.scopeDescriptor || token.scopes)\n * @param {TextEditorElement} editorElement\n * @param {number} textOpacity\n * @returns {string} The CSS color for the provided token\n */\nfunction getTokenColor(scopes, editorElement, textOpacity) {\n const color = styleReader.retrieveStyleFromDom(scopes, \"color\", editorElement, true)\n\n return transparentize(color, textOpacity)\n}\n\n/**\n * Converts a `rgb(...)` color into a `rgba(...)` color with the specified opacity.\n *\n * @param {string} color The CSS RGB color to transparentize\n * @param {number} opacity The opacity amount\n * @returns {string} The transparentized CSS color\n * @access private\n */\nfunction transparentize(color, opacity) {\n // assumes that color is in form of `rgb(content)` with no spaces around the given value\n return `rgba(${color.slice(4, -1)}, ${opacity})`\n}\n\n/**\n * Returns the background color for the passed-in `decoration` object.\n *\n * The color value is read from the DOM by creating a node structure that match the decoration `scope` property unless\n * the decoration provides its own `color` property.\n *\n * @param {Decoration} decoration The decoration to get the color for\n * @param {TextEditorElement} editorElement\n * @returns {string} The CSS color for the provided decoration\n */\nfunction getDecorationColor(decoration, editorElement) {\n const properties = decoration.getProperties()\n if (properties.color) {\n return properties.color\n }\n\n if (properties.scope) {\n const scopeString = properties.scope.split(oneOrMoreWhiteSpaceRegexp)\n return styleReader.retrieveStyleFromDom(scopeString, \"background-color\", editorElement, true)\n } else {\n return getDefaultColor(editorElement)\n }\n}\n\n// ######## ### ## ## ###### ######## ######\n// ## ## ## ## ### ## ## ## ## ## ##\n// ## ## ## ## #### ## ## ## ##\n// ######## ## ## ## ## ## ## #### ###### ######\n// ## ## ######### ## #### ## ## ## ##\n// ## ## ## ## ## ### ## ## ## ## ##\n// ## ## ## ## ## ## ###### ######## ######\n\n/**\n * Computes the ranges that are not affected by the current pending changes.\n *\n * @param {number} firstRow The first row of the rendered region\n * @param {number} lastRow The last row of the rendered region\n * @param {number | null} offscreenFirstRow CanvasDrawer.offscreenLastRow\n * @param {number | null} offscreenLastRow CanvasDrawer.offscreenLastRow\n * @returns {Object[]} The intact ranges in the rendered region\n * @access private\n */\nfunction computeIntactRanges(firstRow, lastRow, changes, offscreenFirstRow, offscreenLastRow) {\n // TODO when do they get null?\n if (offscreenFirstRow == null && offscreenLastRow == null) {\n return []\n }\n\n // At first, the whole range is considered intact\n let intactRanges = [\n {\n start: offscreenFirstRow,\n end: offscreenLastRow,\n offscreenRow: 0,\n },\n ]\n\n for (let i = 0, len = changes.length; i < len; i++) {\n const change = changes[i]\n const newIntactRanges = []\n\n for (let j = 0, intactLen = intactRanges.length; j < intactLen; j++) {\n const range = intactRanges[j]\n\n if (change.end < range.start && change.screenDelta !== 0) {\n // The change is above of the range and lines are either\n // added or removed\n newIntactRanges.push({\n start: range.start + change.screenDelta,\n end: range.end + change.screenDelta,\n offscreenRow: range.offscreenRow,\n })\n } else if (change.end < range.start || change.start > range.end) {\n // The change is outside the range but didn't add\n // or remove lines\n newIntactRanges.push(range)\n } else {\n // The change is within the range, there's one intact range\n // from the range start to the change start\n if (change.start > range.start) {\n newIntactRanges.push({\n start: range.start,\n end: change.start - 1,\n offscreenRow: range.offscreenRow,\n })\n }\n if (change.end < range.end) {\n // The change ends within the range\n if (change.bufferDelta !== 0) {\n // Lines are added or removed, the intact range starts in the\n // next line after the change end plus the screen delta\n newIntactRanges.push({\n start: change.end + change.screenDelta + 1,\n end: range.end + change.screenDelta,\n offscreenRow: range.offscreenRow + change.end + 1 - range.start,\n })\n } else if (change.screenDelta !== 0) {\n // Lines are added or removed in the display buffer, the intact\n // range starts in the next line after the change end plus the\n // screen delta\n newIntactRanges.push({\n start: change.end + change.screenDelta + 1,\n end: range.end + change.screenDelta,\n offscreenRow: range.offscreenRow + change.end + 1 - range.start,\n })\n } else {\n // No lines are added, the intact range starts on the line after\n // the change end\n newIntactRanges.push({\n start: change.end + 1,\n end: range.end,\n offscreenRow: range.offscreenRow + change.end + 1 - range.start,\n })\n }\n }\n }\n }\n intactRanges = newIntactRanges\n }\n\n return truncateIntactRanges(intactRanges, firstRow, lastRow)\n}\n\n/**\n * Truncates the intact ranges so that they doesn't expand past the visible area of the minimap.\n *\n * @param {Object[]} intactRanges The initial array of ranges\n * @param {number} firstRow The first row of the rendered region\n * @param {number} lastRow The last row of the rendered region\n * @returns {Object[]} The array of truncated ranges\n * @access private\n */\nfunction truncateIntactRanges(intactRanges, firstRow, lastRow) {\n let i = 0\n while (i < intactRanges.length) {\n const range = intactRanges[i]\n\n if (range.start < firstRow) {\n range.offscreenRow += firstRow - range.start\n range.start = firstRow\n }\n\n if (range.end > lastRow) {\n range.end = lastRow\n }\n\n if (range.start >= range.end) {\n intactRanges.splice(i--, 1)\n }\n\n i++\n }\n\n return intactRanges.sort((a, b) => {\n return a.offscreenRow - b.offscreenRow\n })\n}\n","/** @babel */\n\"use strict\"\n\n/** @access private */\nexport default class CanvasLayer {\n constructor() {\n /**\n * The onscreen canvas.\n *\n * @type {HTMLCanvasElement}\n */\n this.canvas = document.createElement(\"canvas\")\n\n const desynchronized = false // TODO Electron 9 has color issues #786\n\n /**\n * The onscreen canvas context.\n *\n * @type {CanvasRenderingContext2D}\n */\n this.context = this.canvas.getContext(\"2d\", { desynchronized })\n this.canvas.webkitImageSmoothingEnabled = false\n this.context.imageSmoothingEnabled = false\n\n /**\n * The offscreen canvas.\n *\n * @type {HTMLCanvasElement}\n * @access private\n */\n this.offscreenCanvas = document.createElement(\"canvas\")\n /**\n * The offscreen canvas context.\n *\n * @type {CanvasRenderingContext2D}\n * @access private\n */\n this.offscreenContext = this.offscreenCanvas.getContext(\"2d\", { desynchronized })\n this.offscreenCanvas.webkitImageSmoothingEnabled = false\n this.offscreenContext.imageSmoothingEnabled = false\n }\n\n attach(parent) {\n if (this.canvas.parentNode) {\n return\n }\n\n parent.appendChild(this.canvas)\n }\n\n setSize(width = 0, height = 0) {\n this.canvas.width = width\n this.canvas.height = height\n this.context.imageSmoothingEnabled = false\n this.resetOffscreenSize()\n }\n\n getSize() {\n return {\n width: this.canvas.width,\n height: this.canvas.height,\n }\n }\n\n resetOffscreenSize() {\n this.offscreenCanvas.width = this.canvas.width\n this.offscreenCanvas.height = this.canvas.height\n this.offscreenContext.imageSmoothingEnabled = false\n }\n\n copyToOffscreen() {\n if (this.canvas.width > 0 && this.canvas.height > 0) {\n this.offscreenContext.drawImage(this.canvas, 0, 0)\n }\n }\n\n copyFromOffscreen() {\n if (this.offscreenCanvas.width > 0 && this.offscreenCanvas.height > 0) {\n this.context.drawImage(this.offscreenCanvas, 0, 0)\n }\n }\n\n copyPartFromOffscreen(srcY, destY, height) {\n if (this.offscreenCanvas.width > 0 && this.offscreenCanvas.height > 0) {\n this.context.drawImage(\n this.offscreenCanvas,\n 0,\n srcY,\n this.offscreenCanvas.width,\n height,\n 0,\n destY,\n this.offscreenCanvas.width,\n height\n )\n }\n }\n\n clearCanvas() {\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height)\n }\n}\n","\"use strict\"\n\n/**\n * Generates a decorator function to includes many `mixto` mixins into a class.\n *\n * @param {...Mixin} mixins The mixins to include in the class\n * @returns {function(cls:Function):Function} The decorator function that will include the specified mixins\n * @include(SomeMixin) export default class SomeClass {\n * // ...\n * }\n */\nexport default function include(cls, ...mixins) {\n mixins.forEach((mixin) => {\n includeMixin(cls, mixin)\n })\n}\n\nfunction includeMixin(target, source) {\n Object.getOwnPropertyNames(source).forEach((k) => {\n if ([\"length\", \"name\", \"arguments\", \"caller\", \"prototype\", \"includeInto\"].indexOf(k) >= 0) {\n return\n }\n\n const descriptor = Object.getOwnPropertyDescriptor(source, k)\n Object.defineProperty(target, k, descriptor)\n })\n\n Object.getOwnPropertyNames(source.prototype).forEach((k) => {\n if (k === \"constructor\") {\n return\n }\n\n const descriptor = Object.getOwnPropertyDescriptor(source.prototype, k)\n Object.defineProperty(target.prototype, k, descriptor)\n })\n}\n","\"use strict\"\n\nimport { CompositeDisposable, Emitter } from \"atom\"\nimport { EventsDelegation, SpacePenDSL } from \"atom-utils-plus\"\n\nimport * as Main from \"./main\"\nimport element from \"./decorators/element\"\nimport include from \"./decorators/include\"\n\nconst TAG_NAME = \"minimap-quick-settings\"\n\n/** @access private */\nclass MinimapQuickSettingsElement extends HTMLElement {\n static initClass() {\n include(this, EventsDelegation, SpacePenDSL.Babel)\n element(this, TAG_NAME)\n }\n\n static content() {\n this.div({ class: \"select-list popover-list minimap-quick-settings\" }, () => {\n this.input({ type: \"text\", class: \"hidden-input\", outlet: \"hiddenInput\" })\n this.ol({ class: \"list-group mark-active\", outlet: \"list\" }, () => {\n this.li({ class: \"separator\", outlet: \"separator\" })\n this.li({ class: \"code-highlights\", outlet: \"codeHighlights\" }, \"code-highlights\")\n this.li({ class: \"absolute-mode\", outlet: \"absoluteMode\" }, \"absolute-mode\")\n this.li(\n { class: \"adjust-absolute-mode-height\", outlet: \"adjustAbsoluteModeHeight\" },\n \"adjust-absolute-mode-height\"\n )\n })\n this.div({ class: \"btn-group\" }, () => {\n this.button({ class: \"btn btn-default\", outlet: \"onLeftButton\" }, \"On Left\")\n this.button({ class: \"btn btn-default\", outlet: \"onRightButton\" }, \"On Right\")\n })\n })\n }\n\n createdCallback() {\n this.buildContent()\n }\n\n setModel(minimap) {\n this.selectedItem = null\n this.minimap = minimap\n this.emitter = new Emitter()\n this.subscriptions = new CompositeDisposable()\n this.plugins = {}\n this.itemsActions = new WeakMap()\n\n this.codeHighlights.classList.toggle(\"active\", this.minimap.displayCodeHighlights)\n\n this.itemsActions.set(this.codeHighlights, () => {\n atom.config.set(\"minimap.displayCodeHighlights\", !this.minimap.displayCodeHighlights)\n })\n\n this.itemsActions.set(this.absoluteMode, () => {\n atom.config.set(\"minimap.absoluteMode\", !atom.config.get(\"minimap.absoluteMode\"))\n })\n\n this.itemsActions.set(this.adjustAbsoluteModeHeight, () => {\n atom.config.set(\"minimap.adjustAbsoluteModeHeight\", !atom.config.get(\"minimap.adjustAbsoluteModeHeight\"))\n })\n\n this.subscriptions.add(\n Main.onDidAddPlugin(({ name, plugin }) => {\n return this.addItemFor(name, plugin)\n }),\n Main.onDidRemovePlugin(({ name, plugin }) => {\n return this.removeItemFor(name, plugin)\n }),\n Main.onDidActivatePlugin(({ name, plugin }) => {\n return this.activateItem(name, plugin)\n }),\n Main.onDidDeactivatePlugin(({ name, plugin }) => {\n return this.deactivateItem(name, plugin)\n }),\n\n atom.commands.add(\"minimap-quick-settings\", {\n \"core:move-up\": () => {\n this.selectPreviousItem()\n },\n \"core:move-down\": () => {\n this.selectNextItem()\n },\n \"core:move-left\": () => {\n atom.config.set(\"minimap.displayMinimapOnLeft\", true)\n },\n \"core:move-right\": () => {\n atom.config.set(\"minimap.displayMinimapOnLeft\", false)\n },\n \"core:cancel\": () => {\n this.destroy()\n },\n \"core:confirm\": () => {\n this.toggleSelectedItem()\n },\n }),\n\n this.subscribeTo(this.codeHighlights, {\n mousedown: (e) => {\n e.preventDefault()\n atom.config.set(\"minimap.displayCodeHighlights\", !this.minimap.displayCodeHighlights)\n },\n }),\n\n this.subscribeTo(this.absoluteMode, {\n mousedown: (e) => {\n e.preventDefault()\n atom.config.set(\"minimap.absoluteMode\", !atom.config.get(\"minimap.absoluteMode\"))\n },\n }),\n\n this.subscribeTo(this.adjustAbsoluteModeHeight, {\n mousedown: (e) => {\n e.preventDefault()\n atom.config.set(\"minimap.adjustAbsoluteModeHeight\", !atom.config.get(\"minimap.adjustAbsoluteModeHeight\"))\n },\n }),\n\n this.subscribeTo(\n this.hiddenInput,\n {\n focusout: (e) => {\n this.destroy()\n },\n },\n { passive: true }\n ),\n\n this.subscribeTo(this.onLeftButton, {\n mousedown: (e) => {\n e.preventDefault()\n atom.config.set(\"minimap.displayMinimapOnLeft\", true)\n },\n }),\n\n this.subscribeTo(this.onRightButton, {\n mousedown: (e) => {\n e.preventDefault()\n atom.config.set(\"minimap.displayMinimapOnLeft\", false)\n },\n }),\n\n atom.config.observe(\"minimap.displayCodeHighlights\", (bool) => {\n this.codeHighlights.classList.toggle(\"active\", bool)\n }),\n\n atom.config.observe(\"minimap.absoluteMode\", (bool) => {\n this.absoluteMode.classList.toggle(\"active\", bool)\n }),\n\n atom.config.observe(\"minimap.adjustAbsoluteModeHeight\", (bool) => {\n this.adjustAbsoluteModeHeight.classList.toggle(\"active\", bool)\n }),\n\n atom.config.observe(\"minimap.displayMinimapOnLeft\", (bool) => {\n this.onLeftButton.classList.toggle(\"selected\", bool)\n this.onRightButton.classList.toggle(\"selected\", !bool)\n })\n )\n\n this.initList()\n }\n\n onDidDestroy(callback) {\n return this.emitter.on(\"did-destroy\", callback)\n }\n\n attach() {\n const workspaceElement = atom.views.getView(atom.workspace)\n workspaceElement.appendChild(this)\n this.hiddenInput.focus()\n }\n\n destroy() {\n this.emitter.emit(\"did-destroy\")\n this.subscriptions.dispose()\n this.parentNode.removeChild(this)\n }\n\n initList() {\n this.itemsDisposables = new WeakMap()\n for (const name in Main.plugins) {\n this.addItemFor(name, Main.plugins[name])\n }\n }\n\n toggleSelectedItem() {\n const fn = this.itemsActions.get(this.selectedItem)\n if (typeof fn === \"function\") {\n fn()\n }\n }\n\n selectNextItem() {\n this.selectedItem.classList.remove(\"selected\")\n if (this.selectedItem.nextSibling != null) {\n this.selectedItem = this.selectedItem.nextSibling\n if (this.selectedItem.matches(\".separator\")) {\n this.selectedItem = this.selectedItem.nextSibling\n }\n } else {\n this.selectedItem = this.list.firstChild\n }\n this.selectedItem.classList.add(\"selected\")\n }\n\n selectPreviousItem() {\n this.selectedItem.classList.remove(\"selected\")\n if (this.selectedItem.previousSibling != null) {\n this.selectedItem = this.selectedItem.previousSibling\n if (this.selectedItem.matches(\".separator\")) {\n this.selectedItem = this.selectedItem.previousSibling\n }\n } else {\n this.selectedItem = this.list.lastChild\n }\n this.selectedItem.classList.add(\"selected\")\n }\n\n addItemFor(name, plugin) {\n const item = document.createElement(\"li\")\n const action = () => {\n Main.togglePluginActivation(name)\n }\n\n if (plugin.isActive()) {\n item.classList.add(\"active\")\n }\n\n item.textContent = name\n\n this.itemsActions.set(item, action)\n this.itemsDisposables.set(\n item,\n this.addDisposableEventListener(item, \"mousedown\", (e) => {\n e.preventDefault()\n action()\n })\n )\n\n this.plugins[name] = item\n this.list.insertBefore(item, this.separator)\n\n if (!(this.selectedItem != null)) {\n this.selectedItem = item\n this.selectedItem.classList.add(\"selected\")\n }\n }\n\n removeItemFor(name, plugin) {\n try {\n this.list.removeChild(this.plugins[name])\n } catch (error) {}\n\n delete this.plugins[name]\n }\n\n activateItem(name, plugin) {\n this.plugins[name].classList.add(\"active\")\n }\n\n deactivateItem(name, plugin) {\n this.plugins[name].classList.remove(\"active\")\n }\n}\n\nMinimapQuickSettingsElement.initClass()\n\nexport function createMinimapQuickSettingsElement() {\n const element = document.createElement(TAG_NAME)\n element.createdCallback()\n return element\n}\n","\"use strict\"\n\nimport { Emitter, CompositeDisposable, Disposable } from \"atom\"\nimport Decoration from \"./decoration\"\nimport StableAdapter from \"./adapters/stable-adapter\"\nimport { editorsMinimaps } from \"./main\"\n\nlet nextModelId = 1\n\n// returned in the decorations API when minimap is destoryed\nconst disposedDisposable = new Disposable()\ndisposedDisposable.dispose()\nconst markerMock = {\n onDidDestroy: () => disposedDisposable,\n getScreenRange: () => new Range(),\n}\nconst dummyDecoration = new Decoration(markerMock, null, {})\n\n/**\n * The Minimap class is the underlying model of a . Most manipulations of the minimap is done through the model.\n *\n * Any Minimap instance is tied to a `TextEditor`. Their lifecycle follow the one of their target `TextEditor`, so they\n * are destroyed whenever their `TextEditor` is destroyed.\n */\nexport default class Minimap {\n /**\n * Creates a new Minimap instance for the given `TextEditor`.\n *\n * @param {Object} options An object with the new Minimap properties\n * @param {TextEditor} options.textEditor The target text editor for the minimap\n * @param {boolean} [options.standAlone] Whether this minimap is in stand-alone mode or not\n * @param {number} [options.width] The minimap width in pixels\n * @param {number} [options.height] The minimap height in pixels\n * @throws {Error} Cannot create a minimap without an editor\n */\n constructor(options = {}) {\n if (!options.textEditor) {\n throw new Error(\"Cannot create a minimap without an editor\")\n }\n\n /**\n * The Minimap's minimapElement.\n *\n * @type {MinimapElement}\n * @access private\n */\n this.minimapElement = undefined\n\n // local cache of this.minimapElement.DecorationManagement\n this.DecorationManagement = undefined\n\n /**\n * The Minimap's text editor.\n *\n * @type {TextEditor}\n * @access private\n */\n this.textEditor = options.textEditor\n\n /**\n * The Minimap's text editor element.\n *\n * @access private\n */\n this.editorElement = undefined\n\n /**\n * The stand-alone state of the current Minimap.\n *\n * @type {boolean}\n * @access private\n */\n this.standAlone = options.standAlone\n /**\n * The width of the current Minimap.\n *\n * @type {number}\n * @access private\n */\n this.width = options.width\n /**\n * The height of the current Minimap.\n *\n * @type {number}\n * @access private\n */\n this.height = options.height\n /**\n * The id of the current Minimap.\n *\n * @type {Number}\n * @access private\n */\n this.id = nextModelId++\n /**\n * The events emitter of the current Minimap.\n *\n * @type {Emitter}\n * @access private\n */\n this.emitter = new Emitter()\n /**\n * The Minimap's subscriptions.\n *\n * @type {CompositeDisposable}\n * @access private\n */\n this.subscriptions = new CompositeDisposable()\n /**\n * The adapter object leverage the access to several properties from the `TextEditor`/`TextEditorElement` to support\n * the different APIs between different version of Atom.\n *\n * @type {Object}\n * @access private\n */\n this.adapter = null\n /**\n * The char height of the current Minimap, will be `undefined` unless `setCharWidth` is called.\n *\n * @type {number}\n * @access private\n */\n this.charHeight = null\n /**\n * The char height from the package's configuration. Will be overriden by the instance value.\n *\n * @type {number}\n * @access private\n */\n this.configCharHeight = null\n /**\n * The char width of the current Minimap, will be `undefined` unless `setCharWidth` is called.\n *\n * @type {number}\n * @access private\n */\n this.charWidth = null\n /**\n * The char width from the package's configuration. Will be overriden by the instance value.\n *\n * @type {number}\n * @access private\n */\n this.configCharWidth = null\n /**\n * The interline of the current Minimap, will be `undefined` unless `setCharWidth` is called.\n *\n * @type {number}\n * @access private\n */\n this.interline = null\n /**\n * The interline from the package's configuration. Will be overriden by the instance value.\n *\n * @type {number}\n * @access private\n */\n this.configInterline = null\n /**\n * The devicePixelRatioRounding of the current Minimap, will be `undefined` unless `setDevicePixelRatioRounding` is called.\n *\n * @type {boolean}\n * @access private\n */\n this.devicePixelRatioRounding = null\n /**\n * The devicePixelRatioRounding from the package's configuration. Will be overriden by the instance value.\n *\n * @type {boolean}\n * @access private\n */\n this.configDevicePixelRatioRounding = null\n /**\n * A number of milliseconds which determines how often the minimap should redraw itself after detecting changes in\n * the text editor. A value of 0 will cause the minimap to redraw immediately.\n *\n * @type {number}\n * @access private\n */\n this.redrawDelay = 0\n /**\n * A boolean value to store whether this Minimap have been destroyed or not.\n *\n * @type {boolean}\n * @access private\n */\n this.destroyed = false\n /**\n * A boolean value to store whether the `scrollPastEnd` setting is enabled or not.\n *\n * @type {boolean}\n * @access private\n */\n this.scrollPastEnd = false\n\n /**\n * An array of changes registered with textEditor.onDidChange() which have not yet been handled\n *\n * @type {Array}\n * @access private\n */\n this.pendingChangeEvents = []\n\n /**\n * Timer reference which, once fired, will flush all the pending changes stored in this.pendingChangeEvents array.\n *\n * @type {Timer | null}\n * @access private\n */\n this.flushChangesTimer = null\n\n if (atom.views.getView(this.textEditor).getScrollTop != null) {\n this.adapter = new StableAdapter(this.textEditor)\n }\n\n /**\n * When in stand-alone or independent scrolling mode, this value can be used instead of the computed scroll.\n *\n * @type {number}\n * @access private\n */\n this.scrollTop = 0\n\n let configSubscription = this.subscribeToConfig()\n\n this.subscriptions.add(\n configSubscription,\n\n this.textEditor.onDidChangeGrammar(() => {\n this.subscriptions.remove(configSubscription)\n configSubscription.dispose()\n\n configSubscription = this.subscribeToConfig()\n this.subscriptions.add(configSubscription)\n }),\n\n this.adapter.onDidChangeScrollTop(() => {\n if (!this.standAlone && !this.ignoreTextEditorScroll && !this.inChangeScrollTop) {\n this.inChangeScrollTop = true\n this.updateScrollTop()\n this.emitter.emit(\"did-change-scroll-top\", this)\n this.inChangeScrollTop = false\n }\n\n if (this.ignoreTextEditorScroll) {\n this.ignoreTextEditorScroll = false\n }\n }),\n\n this.adapter.onDidChangeScrollLeft(() => {\n if (!this.standAlone) {\n this.emitter.emit(\"did-change-scroll-left\", this)\n }\n }),\n\n this.textEditor.onDidChange((changes) => {\n this.scheduleChanges(changes)\n }),\n\n this.textEditor.onDidDestroy(() => {\n if (editorsMinimaps) {\n editorsMinimaps.delete(this.textEditor)\n }\n this.destroy()\n }),\n\n /*\n FIXME Some changes occuring during the tokenization produces\n ranges that deceive the canvas rendering by making some\n lines at the end of the buffer intact while they are in fact not,\n resulting in extra lines appearing at the end of the minimap.\n Forcing a whole repaint to fix that bug is suboptimal but works.\n */\n this.textEditor.onDidTokenize(() => {\n this.emitter.emit(\"did-change-config\")\n })\n )\n }\n\n /** Destroys the model. */\n destroy() {\n if (this.destroyed) {\n return\n }\n\n clearTimeout(this.flushChangesTimer)\n this.pendingChangeEvents = []\n this.subscriptions.dispose()\n this.emitter.emit(\"did-destroy\")\n this.emitter.dispose()\n this.destroyed = true\n }\n\n /**\n * Returns `true` when this `Minimap` has benn destroyed.\n *\n * @returns {boolean} Whether this Minimap has been destroyed or not\n */\n isDestroyed() {\n return this.destroyed\n }\n\n /**\n * Schedule changes from textEditor.onDidChange() to be handled at a later time\n *\n * @param {Array} changes The changes to be scheduled\n * @returns Void\n * @access private\n */\n scheduleChanges(changes) {\n this.pendingChangeEvents = this.pendingChangeEvents.concat(changes)\n\n // Optimisation: If the redraw delay is set to 0, do not even schedule a timer\n if (!this.redrawDelay) {\n this.requestFlushChanges()\n }\n\n if (!this.flushChangesTimer) {\n // If any changes happened within the timeout's delay, a timeout will already have been\n // scheduled -> no need to schedule again\n this.flushChangesTimer = setTimeout(() => {\n this.requestFlushChanges()\n }, this.redrawDelay)\n }\n }\n\n /**\n * Flush all changes which have been scheduled for later processing by this.scheduleChanges()\n *\n * @returns Void\n * @access private\n */\n flushChanges() {\n clearTimeout(this.flushChangesTimer)\n this.flushChangesTimer = null\n this.emitChanges(this.pendingChangeEvents)\n this.pendingChangeEvents = []\n }\n\n /**\n * Requests flush changes if not already requested\n *\n * @returns Void\n * @access private\n */\n requestFlushChanges() {\n if (!this.requestedFlushChanges) {\n this.requestedFlushChanges = requestAnimationFrame(() => {\n this.flushChanges()\n if (this.requestedFlushChanges) {\n cancelAnimationFrame(this.requestedFlushChanges)\n this.requestedFlushChanges = null\n }\n })\n }\n }\n\n /**\n * Registers an event listener to the `did-change` event.\n *\n * @param {function(event:Object):void} callback A function to call when the event is triggered. the callback will be\n * called with an event object with the following properties:\n *\n * - Start: The change's start row number\n * - End: The change's end row number\n * - ScreenDelta: the delta in buffer rows between the versions before and after the change\n *\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChange(callback) {\n return this.emitter.on(\"did-change\", callback)\n }\n\n /**\n * Registers an event listener to the `did-change-config` event.\n *\n * @param {function():void} callback A function to call when the event is triggered.\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChangeConfig(callback) {\n return this.emitter.on(\"did-change-config\", callback)\n }\n\n /**\n * Registers an event listener to the `did-change-scroll-top` event.\n *\n * The event is dispatched when the text editor `scrollTop` value have been changed or when the minimap scroll top\n * have been changed in stand-alone mode.\n *\n * @param {function(minimap:Minimap):void} callback A function to call when the event is triggered. The current\n * Minimap is passed as argument to the callback.\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChangeScrollTop(callback) {\n return this.emitter.on(\"did-change-scroll-top\", callback)\n }\n\n /**\n * Registers an event listener to the `did-change-scroll-left` event.\n *\n * @param {function(minimap:Minimap):void} callback A function to call when the event is triggered. The current\n * Minimap is passed as argument to the callback.\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChangeScrollLeft(callback) {\n return this.emitter.on(\"did-change-scroll-left\", callback)\n }\n\n /**\n * Registers an event listener to the `did-change-stand-alone` event.\n *\n * This event is dispatched when the stand-alone of the current Minimap is either enabled or disabled.\n *\n * @param {function(minimap:Minimap):void} callback A function to call when the event is triggered. The current\n * Minimap is passed as argument to the callback.\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidChangeStandAlone(callback) {\n return this.emitter.on(\"did-change-stand-alone\", callback)\n }\n\n /**\n * Registers an event listener to the `did-destroy` event.\n *\n * This event is dispatched when this Minimap have been destroyed. It can occurs either because the {@link destroy}\n * method have been called on the Minimap or because the target text editor have been destroyed.\n *\n * @param {function():void} callback A function to call when the event is triggered.\n * @returns {Disposable} A disposable to stop listening to the event\n */\n onDidDestroy(callback) {\n return this.emitter.on(\"did-destroy\", callback)\n }\n\n /**\n * Registers to the config changes for the current editor scope.\n *\n * @returns {Disposable} The disposable to dispose all the registered events\n * @access private\n */\n subscribeToConfig() {\n const subs = new CompositeDisposable()\n const opts = { scope: this.textEditor.getRootScopeDescriptor() }\n\n subs.add(\n atom.config.observe(\"editor.scrollPastEnd\", opts, (scrollPastEnd) => {\n this.scrollPastEnd = scrollPastEnd\n this.adapter.scrollPastEnd = this.scrollPastEnd\n this.emitter.emit(\"did-change-config\")\n }),\n\n atom.config.observe(\"minimap.charHeight\", opts, (configCharHeight) => {\n this.configCharHeight = configCharHeight\n this.updateScrollTop()\n this.emitter.emit(\"did-change-config\")\n }),\n\n atom.config.observe(\"minimap.charWidth\", opts, (configCharWidth) => {\n this.configCharWidth = configCharWidth\n this.updateScrollTop()\n this.emitter.emit(\"did-change-config\")\n }),\n\n atom.config.observe(\"minimap.interline\", opts, (configInterline) => {\n this.configInterline = configInterline\n this.updateScrollTop()\n this.emitter.emit(\"did-change-config\")\n }),\n\n atom.config.observe(\"minimap.independentMinimapScroll\", opts, (independentMinimapScroll) => {\n this.independentMinimapScroll = independentMinimapScroll\n this.updateScrollTop()\n }),\n\n atom.config.observe(\"minimap.scrollSensitivity\", opts, (scrollSensitivity) => {\n this.scrollSensitivity = scrollSensitivity\n }),\n\n atom.config.observe(\"minimap.redrawDelay\", opts, (redrawDelay) => {\n this.redrawDelay = redrawDelay\n }),\n // cdprr is shorthand for configDevicePixelRatioRounding\n\n atom.config.observe(\"minimap.devicePixelRatioRounding\", opts, (cdprr) => {\n this.configDevicePixelRatioRounding = cdprr\n this.updateScrollTop()\n this.emitter.emit(\"did-change-config\")\n })\n )\n\n return subs\n }\n\n /**\n * Returns `true` when the current Minimap is a stand-alone minimap.\n *\n * @returns {boolean} Whether this Minimap is in stand-alone mode or not.\n */\n isStandAlone() {\n return this.standAlone\n }\n\n /**\n * Sets the stand-alone mode for this minimap.\n *\n * @fires {did-change-stand-alone} if The stand-alone mode have been toggled on or off by the call\n * @param {boolean} standAlone The new state of the stand-alone mode for this Minimap\n */\n setStandAlone(standAlone) {\n if (standAlone !== this.standAlone) {\n this.standAlone = standAlone\n this.emitter.emit(\"did-change-stand-alone\", this)\n }\n }\n\n /** @returns {MinimapElement} Returns the current minimapElement */\n getMinimapElement() {\n return this.minimapElement\n }\n\n /**\n * Returns the `TextEditor` that this minimap represents.\n *\n * @returns {TextEditor} This Minimap's text editor\n */\n getTextEditor() {\n return this.textEditor\n }\n\n /**\n * Returns the `TextEditorElement` for the Minimap's `TextEditor`.\n *\n * @returns {TextEditorElement} The minimap's text editor element\n */\n getTextEditorElement() {\n if (this.editorElement) {\n return this.editorElement\n }\n\n this.editorElement = atom.views.getView(this.getTextEditor())\n return this.editorElement\n }\n\n /**\n * Returns the height of the `TextEditor` at the Minimap scale.\n *\n * @returns {number} The scaled height of the text editor\n */\n getTextEditorScaledHeight() {\n return this.adapter.getHeight() * this.getVerticalScaleFactor()\n }\n\n /**\n * Returns the `TextEditor` scroll top value at the Minimap scale.\n *\n * @returns {number} The scaled scroll top of the text editor\n */\n getTextEditorScaledScrollTop() {\n return this.adapter.getScrollTop() * this.getVerticalScaleFactor()\n }\n\n /**\n * Returns the `TextEditor` scroll left value at the Minimap scale.\n *\n * @returns {number} The scaled scroll left of the text editor\n */\n getTextEditorScaledScrollLeft() {\n return this.adapter.getScrollLeft() * this.getHorizontalScaleFactor()\n }\n\n /**\n * Returns the `TextEditor` maximum scroll top value.\n *\n * When the `scrollPastEnd` setting is enabled, the method compensate the extra scroll by removing the same height as\n * added by the editor from the final value.\n *\n * @returns {number} The maximum scroll top of the text editor\n */\n getTextEditorMaxScrollTop() {\n return this.adapter.getMaxScrollTop()\n }\n\n /**\n * Returns the `TextEditor` scroll top value.\n *\n * @returns {number} The scroll top of the text editor\n */\n getTextEditorScrollTop() {\n return this.adapter.getScrollTop()\n }\n\n /**\n * Sets the scroll top of the `TextEditor`.\n *\n * @param {number} scrollTop The new scroll top value\n */\n setTextEditorScrollTop(scrollTop, ignoreTextEditorScroll = false) {\n this.ignoreTextEditorScroll = ignoreTextEditorScroll\n this.adapter.setScrollTop(scrollTop)\n }\n\n /**\n * Returns the `TextEditor` scroll left value.\n *\n * @returns {number} The scroll left of the text editor\n */\n getTextEditorScrollLeft() {\n return this.adapter.getScrollLeft()\n }\n\n /**\n * Returns the height of the `TextEditor`.\n *\n * @returns {number} The height of the text editor\n */\n getTextEditorHeight() {\n return this.adapter.getHeight()\n }\n\n /**\n * Returns the `TextEditor` scroll as a value normalized between `0` and `1`.\n *\n * When the `scrollPastEnd` setting is enabled the value may exceed `1` as the maximum scroll value used to compute\n * this ratio compensate for the extra height in the editor. **Use {@link getCapedTextEditorScrollRatio} when you need\n * a value that is strictly between `0` and `1`.**\n *\n * @returns {number} The scroll ratio of the text editor\n */\n getTextEditorScrollRatio() {\n return this.adapter.getScrollTop() / (this.getTextEditorMaxScrollTop() || 1)\n }\n\n /**\n * Returns the `TextEditor` scroll as a value normalized between `0` and `1`.\n *\n * The returned value will always be strictly between `0` and `1`.\n *\n * @returns {number} The scroll ratio of the text editor strictly between 0 and 1\n */\n getCapedTextEditorScrollRatio() {\n return Math.min(1, this.getTextEditorScrollRatio())\n }\n\n /**\n * Returns the height of the whole minimap in pixels based on the `minimap` settings.\n *\n * @returns {number} The height of the minimap\n */\n getHeight() {\n const additionalHeight = this.scrollPastEnd ? this.textEditor.getRowsPerPage() : 0\n return (this.textEditor.getScreenLineCount() + additionalHeight) * this.getLineHeight()\n }\n\n /**\n * Returns the width of the whole minimap in pixels based on the `minimap` settings.\n *\n * @returns {number} The width of the minimap\n */\n getWidth() {\n return this.textEditor.getMaxScreenLineLength() * this.getCharWidth()\n }\n\n /**\n * Returns the height the Minimap content will take on screen.\n *\n * When the Minimap height is greater than the `TextEditor` height, the `TextEditor` height is returned instead.\n *\n * @returns {number} The visible height of the Minimap\n */\n getVisibleHeight() {\n return Math.min(this.getScreenHeight(), this.getHeight())\n }\n\n /**\n * Returns the height the minimap should take once displayed, it's either the height of the `TextEditor` or the\n * provided `height` when in stand-alone mode.\n *\n * @returns {number} The total height of the Minimap\n */\n getScreenHeight() {\n if (this.isStandAlone()) {\n if (this.height != null) {\n return this.height\n } else {\n return this.getHeight()\n }\n } else {\n return this.adapter.getHeight()\n }\n }\n\n /**\n * Returns the width the whole Minimap will take on screen.\n *\n * @returns {number} The width of the Minimap when displayed\n */\n getVisibleWidth() {\n return Math.min(this.getScreenWidth(), this.getWidth())\n }\n\n /**\n * Returns the width the Minimap should take once displayed, it's either the width of the Minimap content or the\n * provided `width` when in standAlone mode.\n *\n * @returns {number} The Minimap screen width\n */\n getScreenWidth() {\n if (this.isStandAlone() && this.width != null) {\n return this.width\n } else {\n return this.getWidth()\n }\n }\n\n /**\n * Sets the preferred height and width when in stand-alone mode.\n *\n * This method is called by the for this Minimap so that the model is kept in sync with the view.\n *\n * @param {number} height The new height of the Minimap\n * @param {number} width The new width of the Minimap\n */\n setScreenHeightAndWidth(height, width) {\n if (this.width !== width || this.height !== height) {\n this.height = height\n this.width = width\n this.updateScrollTop()\n }\n }\n\n /**\n * Returns the vertical scaling factor when converting coordinates from the `TextEditor` to the Minimap.\n *\n * @returns {number} The Minimap vertical scaling factor\n */\n getVerticalScaleFactor() {\n return this.getLineHeight() / this.textEditor.getLineHeightInPixels()\n }\n\n /**\n * Returns the horizontal scaling factor when converting coordinates from the `TextEditor` to the Minimap.\n *\n * @returns {number} The Minimap horizontal scaling factor\n */\n getHorizontalScaleFactor() {\n return this.getCharWidth() / this.textEditor.getDefaultCharWidth()\n }\n\n /**\n * Returns the height of a line in the Minimap in pixels.\n *\n * @returns {number} A line's height in the Minimap\n */\n getLineHeight() {\n return this.getCharHeight() + this.getInterline()\n }\n\n /**\n * Returns the width of a character in the Minimap in pixels.\n *\n * @returns {number} A character's width in the Minimap\n */\n getCharWidth() {\n if (this.charWidth != null) {\n return this.charWidth\n } else {\n return this.configCharWidth\n }\n }\n\n /**\n * Sets the char width for this Minimap. This value will override the value from the config for this instance only. A\n * `did-change-config` event is dispatched.\n *\n * @fires {did-change-config} when The value is changed\n * @param {number} charWidth The new width of a char in the Minimap\n */\n setCharWidth(charWidth) {\n this.charWidth = Math.floor(charWidth)\n this.emitter.emit(\"did-change-config\")\n }\n\n /**\n * Returns the height of a character in the Minimap in pixels.\n *\n * @returns {number} A character's height in the Minimap\n */\n getCharHeight() {\n if (this.charHeight != null) {\n return this.charHeight\n } else {\n return this.configCharHeight\n }\n }\n\n /**\n * Sets the char height for this Minimap. This value will override the value from the config for this instance only. A\n * `did-change-config` event is dispatched.\n *\n * @fires {did-change-config} when The value is changed\n * @param {number} charHeight The new height of a char in the Minimap\n */\n setCharHeight(charHeight) {\n this.charHeight = Math.floor(charHeight)\n this.emitter.emit(\"did-change-config\")\n }\n\n /**\n * Returns the height of an interline in the Minimap in pixels.\n *\n * @returns {number} The interline's height in the Minimap\n */\n getInterline() {\n if (this.interline != null) {\n return this.interline\n } else {\n return this.configInterline\n }\n }\n\n /**\n * Sets the interline height for this Minimap. This value will override the value from the config for this instance\n * only. A `did-change-config` event is dispatched.\n *\n * @fires {did-change-config} when The value is changed\n * @param {number} interline The new height of an interline in the Minimap\n */\n setInterline(interline) {\n this.interline = Math.floor(interline)\n this.emitter.emit(\"did-change-config\")\n }\n\n /**\n * Returns the status of devicePixelRatioRounding in the Minimap.\n *\n * @returns {boolean} The devicePixelRatioRounding status in the Minimap\n */\n getDevicePixelRatioRounding() {\n if (this.devicePixelRatioRounding != null) {\n return this.devicePixelRatioRounding\n } else {\n return this.configDevicePixelRatioRounding\n }\n }\n\n /**\n * Sets the devicePixelRatioRounding status for this Minimap. This value will override the value from the config for\n * this instance only. A `did-change-config` event is dispatched.\n *\n * @fires {did-change-config} when The value is changed\n * @param {boolean} devicePixelRatioRounding The new status of devicePixelRatioRounding in the Minimap\n */\n setDevicePixelRatioRounding(devicePixelRatioRounding) {\n this.devicePixelRatioRounding = devicePixelRatioRounding\n this.emitter.emit(\"did-change-config\")\n }\n\n /**\n * Returns the devicePixelRatio in the Minimap in pixels.\n *\n * @returns {number} The devicePixelRatio in the Minimap\n */\n getDevicePixelRatio() {\n if (this.getDevicePixelRatioRounding()) {\n if (devicePixelRatio >= 1) {\n return Math.round(devicePixelRatio)\n } else {\n return Math.max(Math.round(devicePixelRatio * 10) / 10, 0.1)\n }\n }\n return devicePixelRatio\n }\n\n /**\n * Returns the index of the first visible row in the Minimap.\n *\n * @returns {number} The index of the first visible row\n */\n getFirstVisibleScreenRow() {\n return Math.floor(this.getScrollTop() / this.getLineHeight())\n }\n\n /**\n * Returns the index of the last visible row in the Minimap.\n *\n * @returns {number} The index of the last visible row\n */\n getLastVisibleScreenRow() {\n return Math.ceil((this.getScrollTop() + this.getScreenHeight()) / this.getLineHeight())\n }\n\n /**\n * Returns true when the `independentMinimapScroll` setting have been enabled.\n *\n * @returns {boolean} Whether the minimap can scroll independently\n */\n scrollIndependentlyOnMouseWheel() {\n return this.independentMinimapScroll\n }\n\n /**\n * Returns the current scroll of the Minimap.\n *\n * The Minimap can scroll only when its height is greater that the height of its `TextEditor`.\n *\n * @returns {number} The scroll top of the Minimap\n */\n getScrollTop() {\n return this.standAlone || this.independentMinimapScroll ? this.scrollTop : this.getScrollTopFromEditor()\n }\n\n /**\n * Sets the minimap scroll top value when in stand-alone mode.\n *\n * @fires {did-change-scroll-top} if The Minimap's stand-alone mode is enabled\n * @param {number} scrollTop The new scroll top for the Minimap\n */\n setScrollTop(scrollTop) {\n this.scrollTop = Math.max(0, Math.min(this.getMaxScrollTop(), scrollTop))\n\n if (this.standAlone || this.independentMinimapScroll) {\n this.emitter.emit(\"did-change-scroll-top\", this)\n }\n }\n\n /**\n * Returns the minimap scroll as a ration between 0 and 1.\n *\n * @returns {number} The minimap scroll ratio\n */\n getScrollRatio() {\n return this.getScrollTop() / this.getMaxScrollTop()\n }\n\n /**\n * Updates the scroll top value with the one computed from the text editor when the minimap is in the independent\n * scrolling mode.\n *\n * @access private\n */\n updateScrollTop() {\n if (this.independentMinimapScroll) {\n try {\n this.setScrollTop(this.getScrollTopFromEditor())\n } catch (err) {}\n this.emitter.emit(\"did-change-scroll-top\", this)\n }\n }\n\n /**\n * Returns the scroll top as computed from the text editor scroll top.\n *\n * @returns {number} The computed scroll top value\n */\n getScrollTopFromEditor() {\n return Math.abs(this.getCapedTextEditorScrollRatio() * this.getMaxScrollTop())\n }\n\n /**\n * Returns the maximum scroll value of the Minimap.\n *\n * @returns {number} The maximum scroll top for the Minimap\n */\n getMaxScrollTop() {\n return Math.max(0, this.getHeight() - this.getScreenHeight())\n }\n\n /**\n * Returns `true` when the Minimap can scroll.\n *\n * @returns {boolean} Whether this Minimap can scroll or not\n */\n canScroll() {\n return this.getMaxScrollTop() > 0\n }\n\n /**\n * Updates the minimap scroll top value using a mouse event when the independent scrolling mode is enabled\n *\n * @param {MouseEvent} event The mouse wheel event\n * @access private\n */\n onMouseWheel(event) {\n if (this.scrollIndependentlyOnMouseWheel()) {\n event.stopPropagation()\n\n if (!this.canScroll()) {\n return\n }\n\n const { wheelDeltaY } = event\n const previousScrollTop = this.getScrollTop()\n const updatedScrollTop = previousScrollTop - Math.round(wheelDeltaY * this.scrollSensitivity)\n\n this.setScrollTop(updatedScrollTop)\n }\n }\n\n /**\n * Delegates to `TextEditor#getMarker`.\n *\n * @access private\n */\n getMarker(id) {\n return this.textEditor.getMarker(id)\n }\n\n /**\n * Delegates to `TextEditor#findMarkers`.\n *\n * @access private\n */\n findMarkers(o) {\n try {\n return this.textEditor.findMarkers(o)\n } catch (error) {\n return []\n }\n }\n\n /**\n * Delegates to `TextEditor#markBufferRange`.\n *\n * @access private\n */\n markBufferRange(range) {\n return this.textEditor.markBufferRange(range)\n }\n\n /**\n * Emits a change events with the passed-in changes as data.\n *\n * @param {Object} changes A change to dispatch\n * @access private\n */\n emitChanges(changes) {\n this.emitter.emit(\"did-change\", changes)\n }\n\n /**\n * Enables the cache at the adapter level to avoid consecutive access to the text editor API during a render phase.\n *\n * @access private\n */\n enableCache() {\n this.adapter.enableCache()\n }\n\n /**\n * Disable the adapter cache.\n *\n * @access private\n */\n clearCache() {\n this.adapter.clearCache()\n }\n\n editorDestroyed() {\n this.adapter.editorDestroyed()\n }\n\n /**\n * Get the DecorationManagement API for the current minimapElement\n *\n * @returns {DecorationManagement | undefined}\n */\n getDecorationManagement() {\n if (!this.DecorationManagement) {\n if (this.minimapElement?.DecorationManagement) {\n this.DecorationManagement = this.minimapElement.DecorationManagement\n }\n }\n return this.DecorationManagement\n }\n\n // Decoration API duplicated for backward compatibility in the service\n getDecorations() {\n return this.getDecorationManagement()?.getDecorations() ?? []\n }\n onDidAddDecoration(...args) {\n return this.getDecorationManagement()?.onDidAddDecoration(...args) ?? disposedDisposable\n }\n onDidRemoveDecoration(...args) {\n return this.getDecorationManagement()?.onDidRemoveDecoration(...args) ?? disposedDisposable\n }\n onDidChangeDecorationRange(...args) {\n return this.getDecorationManagement()?.onDidChangeDecorationRange(...args) ?? disposedDisposable\n }\n onDidUpdateDecoration(...args) {\n return this.getDecorationManagement()?.onDidUpdateDecoration(...args) ?? disposedDisposable\n }\n decorationForId(...args) {\n return this.getDecorationManagement()?.decorationForId(...args) ?? dummyDecoration\n }\n decorationsForScreenRowRange(...args) {\n return this.getDecorationManagement()?.decorationsForScreenRowRange(...args) ?? dummyDecoration\n }\n decorationsByTypeThenRows() {\n return this.getDecorationManagement()?.decorationsByTypeThenRows() ?? dummyDecoration\n }\n decorateMarker(...args) {\n return this.getDecorationManagement()?.decorateMarker(...args) ?? dummyDecoration\n }\n removeDecoration(...args) {\n return this.getDecorationManagement()?.removeDecoration(...args)\n }\n removeAllDecorationsForMarker(...args) {\n return this.getDecorationManagement()?.removeAllDecorationsForMarker(...args)\n }\n removeAllDecorations() {\n return this.getDecorationManagement()?.removeAllDecorations()\n }\n}\n","\"use strict\"\n\n/** @access private */\nexport default class StableAdapter {\n constructor(textEditor) {\n this.textEditor = textEditor\n this.textEditorElement = atom.views.getView(this.textEditor)\n }\n\n enableCache() {\n this.useCache = true\n }\n\n clearCache() {\n this.useCache = false\n delete this.heightCache\n delete this.scrollTopCache\n delete this.scrollLeftCache\n delete this.maxScrollTopCache\n }\n\n onDidChangeScrollTop(callback) {\n return this.textEditorElement.onDidChangeScrollTop(callback)\n }\n\n onDidChangeScrollLeft(callback) {\n return this.textEditorElement.onDidChangeScrollLeft(callback)\n }\n\n getHeight() {\n if (this.editorDestroyed()) {\n return 0\n }\n\n if (this.useCache) {\n if (!this.heightCache) {\n this.heightCache = this.textEditorElement.getHeight()\n }\n return this.heightCache\n }\n return this.textEditorElement.getHeight()\n }\n\n getScrollTop() {\n if (this.editorDestroyed()) {\n return 0\n }\n\n if (this.useCache) {\n if (!this.scrollTopCache) {\n this.scrollTopCache = this.computeScrollTop()\n }\n return this.scrollTopCache\n }\n return this.computeScrollTop()\n }\n\n computeScrollTop() {\n if (this.editorDestroyed()) {\n return 0\n }\n\n const scrollTop = this.textEditorElement.getScrollTop()\n const lineHeight = this.textEditor.getLineHeightInPixels()\n let firstRow = this.textEditorElement.getFirstVisibleScreenRow()\n\n if (Number.isNaN(firstRow)) {\n // Guard against their being no visible screen row\n return 0\n }\n\n let lineTop = this.textEditorElement.pixelPositionForScreenPosition([firstRow, 0]).top\n\n if (lineTop > scrollTop) {\n firstRow -= 1\n lineTop = this.textEditorElement.pixelPositionForScreenPosition([firstRow, 0]).top\n }\n\n const lineY = firstRow * lineHeight\n const offset = Math.min(scrollTop - lineTop, lineHeight)\n return lineY + offset\n }\n\n setScrollTop(scrollTop) {\n if (this.editorDestroyed()) {\n return\n }\n\n this.textEditorElement.setScrollTop(scrollTop)\n }\n\n getScrollLeft() {\n if (this.editorDestroyed()) {\n return 0\n }\n\n if (this.useCache) {\n if (!this.scrollLeftCache) {\n this.scrollLeftCache = this.textEditorElement.getScrollLeft()\n }\n return this.scrollLeftCache\n }\n return this.textEditorElement.getScrollLeft()\n }\n\n getMaxScrollTop() {\n if (this.editorDestroyed()) {\n return 0\n }\n\n if (this.maxScrollTopCache != null && this.useCache) {\n return this.maxScrollTopCache\n }\n\n let maxScrollTop\n if (this.textEditorElement.getMaxScrollTop) {\n maxScrollTop = this.textEditorElement.getMaxScrollTop()\n\n if (parseFloat(atom.getVersion()) >= 1.13) {\n if (this.scrollPastEnd) {\n const lineHeight = this.textEditor.getLineHeightInPixels()\n maxScrollTop -= this.getHeight() - 3 * lineHeight\n }\n }\n } else {\n maxScrollTop = this.textEditorElement.getScrollHeight() - this.getHeight()\n\n if (this.scrollPastEnd) {\n const lineHeight = this.textEditor.getLineHeightInPixels()\n maxScrollTop -= this.getHeight() - 3 * lineHeight\n }\n }\n\n if (this.useCache) {\n this.maxScrollTopCache = maxScrollTop\n }\n\n return maxScrollTop\n }\n\n editorDestroyed() {\n return (\n !this.textEditor ||\n this.textEditor.isDestroyed() ||\n !this.textEditorElement.component ||\n !this.textEditorElement.getModel() ||\n !this.textEditorElement.parentNode\n )\n }\n}\n","{\n \"plugins\": {\n \"type\": \"object\",\n \"properties\": {}\n },\n \"autoToggle\": {\n \"title\": \"Show Minimap On Atom Start\",\n \"type\": \"boolean\",\n \"default\": true,\n \"order\": 1\n },\n \"displayMinimapOnLeft\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"order\": 2\n },\n \"displayCodeHighlights\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"description\": \"Toggles the render of the buffer tokens in the minimap.\",\n \"order\": 3\n },\n \"displayPluginsControls\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"description\": \"You need to restart Atom for this setting to be effective.\",\n \"order\": 4\n },\n \"minimapScrollIndicator\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"description\": \"Toggles the display of a side line showing which part of the buffer is currently displayed by the minimap. This side line will only appear if the minimap is taller than the editor view height.\",\n \"order\": 5\n },\n \"adjustMinimapWidthToSoftWrap\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"description\": \"If this option is enabled and Soft Wrap is checked then the Minimap max width is set to the Preferred Line Length value.\",\n \"order\": 6\n },\n \"adjustMinimapWidthOnlyIfSmaller\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"description\": \"If this option and `adjustMinimapWidthToSoftWrap` are enabled the minimap width will never go past the limit sets by CSS. On the other hand, when disabled the minimap will expand to honor the preferred line width.\",\n \"order\": 7\n },\n \"ignoreWhitespacesInTokens\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"When enabled, text editor tokens are rendered as plain blocks, with no regards to the whitespaces they contains.\",\n \"order\": 8\n },\n \"charWidth\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0.5,\n \"order\": 9\n },\n \"charHeight\": {\n \"type\": \"number\",\n \"default\": 2,\n \"minimum\": 0.5,\n \"order\": 10\n },\n \"interline\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 0,\n \"description\": \"The space between lines in the minimap in pixels.\",\n \"order\": 11\n },\n \"textOpacity\": {\n \"type\": \"number\",\n \"default\": 0.6,\n \"minimum\": 0,\n \"maximum\": 1,\n \"description\": \"The opacity used to render the line's text in the minimap.\",\n \"order\": 12\n },\n \"moveCursorOnMinimapClick\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"Moves the cursor to the beginning of the target line when clicking on the minimap\",\n \"order\": 13\n },\n \"independentMinimapScroll\": {\n \"type\": \"boolean\",\n \"title\": \"Independent Minimap Scroll On Mouse Wheel Events\",\n \"default\": false,\n \"description\": \"When enabled, using the mouse wheel over the Minimap will make it scroll independently of the text editor. The Minimap will still sync with the editor whenever the editor is scrolled, but it will no longer relay the mouse wheel events to the editor.\",\n \"order\": 14\n },\n \"scrollSensitivity\": {\n \"type\": \"number\",\n \"default\": 0.5,\n \"description\": \"The scrolling speed when the `Independent Minimap Scroll On Mouse Wheel Events` setting is enabled.\",\n \"order\": 15\n },\n \"smoothScrolling\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"Whether to offset the minimap canvas when scrolling to keep the scroll smooth. When `true` the minimap canvas will be offseted, resulting in a smoother scroll, but with the side-effect of a blurry minimap when the canvas is placed between pixels. When `false` the canvas will always stay at the same position, and will never look blurry, but the scroll will appear more jagged.\",\n \"order\": 16\n },\n \"createPluginInDevMode\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"order\": 17\n },\n \"absoluteMode\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"When enabled the text editor content will be able to flow below the minimap.\",\n \"order\": 18\n },\n \"adjustAbsoluteModeHeight\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"When enabled and `Absolute Mode` is also enabled, the minimap height will be adjusted to only take the space required by the text editor content, leaving the space below triggering mouse events on the text editor. **Be aware this can have some impact on performances as the minimap canvases will be resized every time a change in the editor make its height change.**\",\n \"order\": 19\n },\n \"redrawDelay\": {\n \"type\": \"number\",\n \"default\": 400,\n \"minimum\": 0,\n \"maximum\": 2000,\n \"description\": \"Controls how often (in ms) the minimap should redraw itself after changing the text editor's contents. Setting this to 100ms or higher could dramatically improve editor responsiveness when working with large files. A value of 0 will cause the minimap to redraw itself immediately on each change.\",\n \"order\": 20\n },\n \"devicePixelRatioRounding\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"description\": \"Toggles the rounding of the devicePixelRatio in the minimap.\",\n \"order\": 21\n },\n \"useHardwareAcceleration\": {\n \"type\": \"boolean\",\n \"default\": true,\n \"order\": 22\n },\n \"scrollAnimation\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"Enables animations when scrolling by clicking on the minimap.\",\n \"order\": 23\n },\n \"scrollAnimationDuration\": {\n \"type\": \"integer\",\n \"default\": 300,\n \"description\": \"The duration of scrolling animations when clicking on the minimap.\",\n \"order\": 24\n },\n \"maxTokensInOneLine\": {\n \"type\": \"integer\",\n \"default\": 160,\n \"description\": \"The maximum number of tokens that are rendered for each line.\",\n \"order\": 25\n }\n}\n","\"use strict\"\n\nimport { CompositeDisposable } from \"atom\"\nimport { emitter, getConfigSchema } from \"./main\"\n\n/**\n * Provides methods to manage minimap plugins. Minimap plugins are Atom packages that will augment the minimap. They\n * have a secondary activation cycle going on constrained by the minimap package activation. A minimap plugin life cycle\n * will generally look like this:\n *\n * 1. The plugin module is activated by Atom through the `activate` method\n * 2. The plugin then register itself as a minimap plugin using `registerPlugin`\n * 3. The plugin is activated/deactivated according to the minimap settings.\n * 4. On the plugin module deactivation, the plugin must unregisters itself from the minimap using the `unregisterPlugin`.\n *\n * @access public\n */\n\n// Initialize the properties for plugin management.\n\n/**\n * The registered Minimap plugins stored using their name as key.\n *\n * @type {Object}\n * @access private\n */\nexport const plugins = {}\n/**\n * The plugins' subscriptions stored using the plugin names as keys.\n *\n * @type {Object}\n * @access private\n */\nconst pluginsSubscriptions = {}\n\n/**\n * A map that stores the display order for each plugin\n *\n * @type {Object}\n * @access private\n */\nconst pluginsOrderMap = {}\n\n/**\n * Registers a minimap `plugin` with the given `name`.\n *\n * @fires {did-add-plugin} with The name and a reference to the added plugin.\n * @fires {did-activate-plugin} if The plugin was activated during the registration.\n * @param {string} name The identifying name of the plugin. It will be used as activation settings name as well as the\n * key to unregister the module.\n * @param {MinimapPlugin} plugin The plugin to register.\n */\nexport function registerPlugin(name, plugin) {\n plugins[name] = plugin\n pluginsSubscriptions[name] = new CompositeDisposable()\n\n const event = { name, plugin }\n emitter.emit(\"did-add-plugin\", event)\n\n if (atom.config.get(\"minimap.displayPluginsControls\")) {\n registerPluginControls(name, plugin)\n }\n\n updatesPluginActivationState(name)\n}\n\n/**\n * Unregisters a plugin from the minimap.\n *\n * @fires {did-remove-plugin} with The name and a reference to the added plugin.\n * @param {string} name The identifying name of the plugin to unregister.\n */\nexport function unregisterPlugin(name) {\n const plugin = plugins[name]\n\n if (atom.config.get(\"minimap.displayPluginsControls\")) {\n unregisterPluginControls(name)\n }\n\n delete plugins[name]\n\n const event = { name, plugin }\n emitter.emit(\"did-remove-plugin\", event)\n}\n\n/**\n * Toggles the specified plugin activation state.\n *\n * @fires {did-activate-plugin} if The plugin was activated by the call.\n * @fires {did-deactivate-plugin} if The plugin was deactivated by the call.\n * @param {string} name The name of the plugin.\n * @param {boolean} boolean An optional boolean to set the activation state of the plugin. If ommitted the new plugin\n * state will be the the inverse of its current state.\n */\nexport function togglePluginActivation(name, boolean) {\n const settingsKey = `minimap.plugins.${name}`\n\n if (boolean !== undefined && boolean !== null) {\n atom.config.set(settingsKey, boolean)\n } else {\n atom.config.set(settingsKey, !atom.config.get(settingsKey))\n }\n\n updatesPluginActivationState(name)\n}\n\n/**\n * Deactivates all the plugins registered in the minimap package so far.\n *\n * @fires {did-deactivate-plugin} for Each plugin deactivated by the call.\n */\nexport function deactivateAllPlugins() {\n for (const [name, plugin] of eachPlugin()) {\n plugin.deactivatePlugin()\n emitter.emit(\"did-deactivate-plugin\", { name, plugin })\n }\n}\n\n/**\n * A generator function to iterate over registered plugins.\n *\n * @returns An iterable that yield the name and reference to every plugin as an array in each iteration.\n */\nfunction* eachPlugin() {\n for (const name in plugins) {\n yield [name, plugins[name]]\n }\n}\n\n/**\n * Updates the plugin activation state according to the current config.\n *\n * @fires {did-activate-plugin} if The plugin was activated by the call.\n * @fires {did-deactivate-plugin} if The plugin was deactivated by the call.\n * @param {string} name The identifying name of the plugin to update.\n * @access private\n */\nfunction updatesPluginActivationState(name) {\n const plugin = plugins[name]\n const pluginActive = plugin.isActive()\n const settingActive = atom.config.get(`minimap.plugins.${name}`)\n\n if (atom.config.get(\"minimap.displayPluginsControls\")) {\n if (settingActive && !pluginActive) {\n activatePlugin(name, plugin)\n } else if (pluginActive && !settingActive) {\n deactivatePlugin(name, plugin)\n }\n } else {\n if (!pluginActive) {\n activatePlugin(name, plugin)\n } else if (pluginActive) {\n deactivatePlugin(name, plugin)\n }\n }\n}\n\nexport function activatePlugin(name, plugin) {\n const event = { name, plugin }\n\n plugin.activatePlugin()\n emitter.emit(\"did-activate-plugin\", event)\n}\n\nexport function deactivatePlugin(name, plugin) {\n const event = { name, plugin }\n\n plugin.deactivatePlugin()\n emitter.emit(\"did-deactivate-plugin\", event)\n}\n\n/**\n * When the `minimap.displayPluginsControls` setting is toggled, this function will register the commands and setting to\n * manage the plugin activation from the minimap settings.\n *\n * @param {string} name The identifying name of the plugin.\n * @param {MinimapPlugin} plugin The plugin instance to register controls for.\n * @listens {minimap.plugins.${name}} listen to the setting to update\n * the plugin state accordingly.\n * @listens {minimap:toggle-${name}} listen to the command on `atom-workspace`\n * to toggle the plugin state.\n * @access private\n */\nfunction registerPluginControls(name, plugin) {\n const settingsKey = `minimap.plugins.${name}`\n const orderSettingsKey = `minimap.plugins.${name}DecorationsZIndex`\n\n const config = getConfigSchema()\n\n config.plugins.properties[name] = {\n type: \"boolean\",\n title: name,\n description: `Whether the ${name} plugin is activated and displayed in the Minimap.`,\n default: true,\n }\n\n config.plugins.properties[`${name}DecorationsZIndex`] = {\n type: \"integer\",\n title: `${name} decorations order`,\n description: `The relative order of the ${name} plugin's decorations in the layer into which they are drawn. Note that this order only apply inside a layer, so highlight-over decorations will always be displayed above line decorations as they are rendered in different layers.`,\n default: 0,\n }\n\n if (atom.config.get(settingsKey) === undefined) {\n atom.config.set(settingsKey, true)\n }\n\n if (atom.config.get(orderSettingsKey) === undefined) {\n atom.config.set(orderSettingsKey, 0)\n }\n\n pluginsSubscriptions[name].add(\n atom.config.observe(settingsKey, () => {\n updatesPluginActivationState(name)\n })\n )\n\n pluginsSubscriptions[name].add(\n atom.config.observe(orderSettingsKey, (order) => {\n updatePluginsOrderMap(name)\n const event = { name, plugin, order }\n emitter.emit(\"did-change-plugin-order\", event)\n })\n )\n\n pluginsSubscriptions[name].add(\n atom.commands.add(\"atom-workspace\", {\n [`minimap:toggle-${name}`]: () => {\n togglePluginActivation(name)\n },\n })\n )\n\n updatePluginsOrderMap(name)\n}\n\n/**\n * Updates the display order in the map for the passed-in plugin name.\n *\n * @param {string} name The name of the plugin to update\n * @access private\n */\nfunction updatePluginsOrderMap(name) {\n const orderSettingsKey = `minimap.plugins.${name}DecorationsZIndex`\n\n pluginsOrderMap[name] = atom.config.get(orderSettingsKey)\n}\n\n/**\n * Returns the plugins display order mapped by name.\n *\n * @returns {Object} The plugins order by name\n */\nexport function getPluginsOrder() {\n return pluginsOrderMap\n}\n\n/**\n * When the `minimap.displayPluginsControls` setting is toggled, this function will unregister the commands and setting\n * that was created previously.\n *\n * @param {string} name The identifying name of the plugin.\n * @access private\n */\nfunction unregisterPluginControls(name) {\n pluginsSubscriptions[name].dispose()\n delete pluginsSubscriptions[name]\n delete getConfigSchema().plugins.properties[name]\n}\n","// Functions used to recommend the configurations required for the best performance of Minimap\n\nexport function treeSitterWarning() {\n return observeAndWarn(\n \"core.useTreeSitterParsers\",\n true,\n \"Tree-sitter is off (Low Performance Warning).\",\n `You should turn on Atom's tree-sitter parser to experience the best performance Minimap and Atom are designed for.\n Keeping tree-sitter parser off results in sluggish scrolling and lags in the text editor.`\n )\n}\n\n/* Utility function that observes a config and throws warnings once a day if it is not the recommended value */\nfunction observeAndWarn(configName, recommendedValue, warningTitle, warningDescription) {\n return atom.config.observe(configName, (value) => {\n if (value !== recommendedValue) {\n const storageName = `Minimap.${configName}`\n const today = new Date()\n const previousWarning = window.localStorage.getItem(storageName)\n let previousWarningDay = null\n if (previousWarning) {\n previousWarningDay = new Date(Date.parse(previousWarning)).getDay()\n }\n // throw the warning once a day\n if (!previousWarningDay || (typeof previousWarningDay === \"number\" && previousWarningDay - today.getDay() >= 1)) {\n window.localStorage.setItem(storageName, today)\n\n const notification = atom.notifications.addWarning(warningTitle, {\n description: warningDescription,\n dismissable: true,\n buttons: [\n {\n text: `Set to ${recommendedValue} and restart Atom`,\n onDidClick() {\n atom.config.set(configName, true)\n notification.dismiss()\n window.localStorage.removeItem(storageName)\n setTimeout(() => {\n atom.reload()\n }, 1500)\n },\n },\n ],\n })\n }\n }\n })\n}\n","\"use strict\";\n/**\n * This class is used to read the styles informations (e.g. color and background-color) from the DOM to use when\n * rendering canvas. This is used in Minimap and Terminal It attaches a dummyNode to the targetNode, renders them, and\n * finds the computed style back.\n */\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.StyleReader = void 0;\n\nclass StyleReader {\n constructor() {\n this.domStylesCache = new Map();\n this.dummyNode = void 0;\n this.targetNode = void 0;\n }\n\n /** Set to true once tokenized */\n // private hasTokenizedOnce = false\n\n /**\n * Returns the computed values for the given property and scope in the DOM.\n *\n * This function insert a dummy element in the DOM to compute its style, return the specified property, and clear the\n * content of the dummy element.\n *\n * @param scopes A list of classes reprensenting the scope to build\n * @param property The name of the style property to compute\n * @param targetNode\n * @param getFromCache Whether to cache the computed value or not\n * @returns The computed property's value used in CanvasDrawer\n */\n retrieveStyleFromDom(scopes, property, targetNode, getFromCache = true) {\n if (scopes.length === 0) {\n return \"\";\n } // no scopes\n\n\n const key = scopes.join(\" \");\n let cachedData = this.domStylesCache.get(key);\n\n if (cachedData !== undefined) {\n if (getFromCache) {\n // if should get the value from the cache\n const value = cachedData[property];\n\n if (value !== undefined) {\n // value exists\n return value;\n } // value not in the cache - get fresh value\n\n } // don't use cache - get fresh value\n\n } else {\n // key did not exist. create it\n cachedData = {};\n }\n\n this.ensureDummyNodeExistence(targetNode);\n const dummyNode = this.dummyNode;\n let parent = dummyNode;\n\n for (let i = 0, len = scopes.length; i < len; i++) {\n const scope = scopes[i];\n const node = document.createElement(\"span\");\n node.className = scope.replace(dotRegexp, \" \"); // TODO why replace is needed?\n\n parent.appendChild(node);\n parent = node;\n }\n\n const style = window.getComputedStyle(parent);\n let value = style.getPropertyValue(property); // rotate hue if webkit-filter available\n\n const filter = style.getPropertyValue(\"-webkit-filter\");\n\n if (filter.includes(\"hue-rotate\")) {\n value = rotateHue(value, filter);\n }\n\n if (value !== \"\") {\n cachedData[property] = value;\n this.domStylesCache.set(key, cachedData);\n }\n\n dummyNode.innerHTML = \"\";\n return value;\n }\n /**\n * Creates a DOM node container for all the operations that need to read styles properties from DOM.\n *\n * @param targetNode\n */\n\n\n ensureDummyNodeExistence(targetNode) {\n if (this.targetNode !== targetNode || this.dummyNode === undefined) {\n this.dummyNode = document.createElement(\"span\");\n this.dummyNode.style.visibility = \"hidden\"; // attach to the target node\n\n targetNode.appendChild(this.dummyNode);\n this.targetNode = targetNode;\n }\n }\n /** Invalidates the cache by emptying the cache object. used in MinimapElement */\n\n\n invalidateDOMStylesCache() {\n this.domStylesCache.clear();\n }\n /** Invalidates the cache only for the first tokenization event. */\n\n /*\n private invalidateIfFirstTokenization () {\n if (this.hasTokenizedOnce) {\n return\n }\n this.invalidateDOMStylesCache()\n this.hasTokenizedOnce = true\n }\n */\n\n\n} // ## ## ######## ## ######## ######## ######## ######\n// ## ## ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ## ##\n// ######### ###### ## ######## ###### ######## ######\n// ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ## ##\n// ## ## ######## ######## ## ######## ## ## ######\n\n\nexports.StyleReader = StyleReader;\nconst dotRegexp = /\\.+/g;\nconst rgbExtractRegexp = /rgb(a?)\\((\\d+), (\\d+), (\\d+)(, (\\d+(\\.\\d+)?))?\\)/;\nconst hueRegexp = /hue-rotate\\((-?\\d+)deg\\)/;\n/**\n * Computes the output color of `value` with a rotated hue defined in `filter`.\n *\n * @param value The CSS color to apply the rotation on\n * @param filter The CSS hue rotate filter declaration\n * @returns The rotated CSS color\n */\n\nfunction rotateHue(value, filter) {\n const match = value.match(rgbExtractRegexp);\n\n if (match === null) {\n return \"\";\n }\n\n const [,, rStr, gStr, bStr,, aStr] = match;\n const hueMatch = filter.match(hueRegexp);\n\n if (hueMatch === null) {\n return \"\";\n }\n\n const [, hueStr] = hueMatch;\n let [r, g, b, a, hue] = [rStr, gStr, bStr, aStr, hueStr].map(Number);\n [r, g, b] = rotate(r, g, b, hue);\n\n if (isNaN(a)) {\n return `rgb(${r}, ${g}, ${b})`;\n } else {\n return `rgba(${r}, ${g}, ${b}, ${a})`;\n }\n}\n/**\n * Computes the hue rotation on the provided `r`, `g` and `b` channels by the amount of `angle`.\n *\n * @param r The red channel of the color to rotate\n * @param g The green channel of the color to rotate\n * @param b The blue channel of the color to rotate\n * @param angle The angle to rotate the hue with\n * @returns The rotated color channels\n */\n\n\nfunction rotate(r, g, b, angle) {\n const matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n const lumR = 0.2126;\n const lumG = 0.7152;\n const lumB = 0.0722;\n const hueRotateR = 0.143;\n const hueRotateG = 0.14;\n const hueRotateB = 0.283;\n const cos = Math.cos(angle * Math.PI / 180);\n const sin = Math.sin(angle * Math.PI / 180);\n matrix[0] = lumR + (1 - lumR) * cos - lumR * sin;\n matrix[1] = lumG - lumG * cos - lumG * sin;\n matrix[2] = lumB - lumB * cos + (1 - lumB) * sin;\n matrix[3] = lumR - lumR * cos + hueRotateR * sin;\n matrix[4] = lumG + (1 - lumG) * cos + hueRotateG * sin;\n matrix[5] = lumB - lumB * cos - hueRotateB * sin;\n matrix[6] = lumR - lumR * cos - (1 - lumR) * sin;\n matrix[7] = lumG - lumG * cos + lumG * sin;\n matrix[8] = lumB + (1 - lumB) * cos + lumB * sin;\n return [clamp(matrix[0] * r + matrix[1] * g + matrix[2] * b), clamp(matrix[3] * r + matrix[4] * g + matrix[5] * b), clamp(matrix[6] * r + matrix[7] * g + matrix[8] * b)];\n}\n\nfunction clamp(num) {\n return Math.ceil(Math.max(0, Math.min(255, num)));\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy1jb21tb25zLXVpL2RvbS1zdHlsZS1yZWFkZXIudHMiXSwibmFtZXMiOlsiU3R5bGVSZWFkZXIiLCJkb21TdHlsZXNDYWNoZSIsIk1hcCIsImR1bW15Tm9kZSIsInRhcmdldE5vZGUiLCJyZXRyaWV2ZVN0eWxlRnJvbURvbSIsInNjb3BlcyIsInByb3BlcnR5IiwiZ2V0RnJvbUNhY2hlIiwibGVuZ3RoIiwia2V5Iiwiam9pbiIsImNhY2hlZERhdGEiLCJnZXQiLCJ1bmRlZmluZWQiLCJ2YWx1ZSIsImVuc3VyZUR1bW15T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9uY2UpIHtcbiAgICAgIHJldHVyblxuICAgIH1cbiAgICB0aGlzLmludmFsaWRhdGVET01TdHlsZXNDYWNoZSgpXG4gICAgdGhpcy5oYXNUb2tlbml6ZWRPbmNlID0gdHJ1ZVxuICB9XG4gICovXG59XG5cbi8vICAgICMjICAgICAjIyAjIyMjIyMjIyAjIyAgICAgICAjIyMjIyMjIyAgIyMjIyMjIyMgIyMjIyMjIyMgICAjIyMjIyNcbi8vICAgICMjICAgICAjIyAjIyAgICAgICAjIyAgICAgICAjIyAgICAgIyMgIyMgICAgICAgIyMgICAgICMjICMjICAgICMjXG4vLyAgICAjIyAgICAgIyMgIyMgICAgICAgIyMgICAgICAgIyMgICAgICMjICMjICAgICAgICMjICAgICAjIyAjI1xuLy8gICAgIyMjIyMjIyMjICMjIyMjIyAgICMjICAgICAgICMjIyMjIyMjICAjIyMjIyMgICAjIyMjIyMjIyAgICMjIyMjI1xuLy8gICAgIyMgICAgICMjICMjICAgICAgICMjICAgICAgICMjICAgICAgICAjIyAgICAgICAjIyAgICMjICAgICAgICAgIyNcbi8vICAgICMjICAgICAjIyAjIyAgICAgICAjIyAgICAgICAjIyAgICAgICAgIyMgICAgICAgIyMgICAgIyMgICMjICAgICMjXG4vLyAgICAjIyAgICAgIyMgIyMjIyMjIyMgIyMjIyMjIyMgIyMgICAgICAgICMjIyMjIyMjICMjICAgICAjIyAgIyMjIyMjXG5cbmNvbnN0IGRvdFJlZ2V4cCA9IC9cXC4rL2dcbmNvbnN0IHJnYkV4dHJhY3RSZWdleHAgPSAvcmdiKGE/KVxcKChcXGQrKSwgKFxcZCspLCAoXFxkKykoLCAoXFxkKyhcXC5cXGQrKT8pKT9cXCkvXG5jb25zdCBodWVSZWdleHAgPSAvaHVlLXJvdGF0ZVxcKCgtP1xcZCspZGVnXFwpL1xuXG4vKipcbiAqIENvbXB1dGVzIHRoZSBvdXRwdXQgY29sb3Igb2YgYHZhbHVlYCB3aXRoIGEgcm90YXRlZCBodWUgZGVmaW5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pblxuICBtYXRyaXhbM10gPSBsdW1SIC0gbHVtUiAqIGNvcyArIGh1ZVJvdGF0ZVIgKiBzaW5cbiAgbWF0cml4WzRdID0gbHVtRyArICgxIC0gbHVtRykgKiBjb3MgKyBodWVSb3RhdGVHICogc2luXG4gIG1hdHJpeFs1XSA9IGx1bUIgLSBsdW1CICogY29zIC0gaHVlUm90YXRlQiAqIHNpblxuICBtYXRyaXhbNl0gPSBsdW1SIC0gbHVtUiAqIGNvcyAtICgxIC0gbHVtUikgKiBzaW5cbiAgbWF0cml4WzddID0gbHVtRyAtIGx1bUcgKiBjb3MgKyBsdW1HICogc2luXG4gIG1hdHJpeFs4XSA9IGx1bUIgKyAoMSAtIGx1bUIpICogY29zICsgbHVtQiAqIHNpblxuXG4gIHJldHVybiBbXG4gICAgY2xhbXAobWF0cml4WzBdICogciArIG1hdHJpeFsxXSAqIGcgKyBtYXRyaXhbMl0gKiBiKSxcbiAgICBjbGFtcChtYXRyaXhbM10gKiByICsgbWF0cml4WzRdICogZyArIG1hdHJpeFs1XSAqIGIpLFxuICAgIGNsYW1wKG1hdHJpeFs2XSAqIHIgKyBtYXRyaXhbN10gKiBnICsgbWF0cml4WzhdICogYiksXG4gIF1cbn1cblxuZnVuY3Rpb24gY2xhbXAobnVtOiBudW1iZXIpIHtcbiAgcmV0dXJuIE1hdGguY2VpbChNYXRoLm1heCgwLCBNYXRoLm1pbigyNTUsIG51bSkpKVxufVxuIl19","\"use strict\"\n\n/**\n * This class is used to read the styles informations (e.g. color and background-color) from the DOM to use when\n * rendering canvas. This is used in Minimap and Terminal It attaches a dummyNode to the targetNode, renders them, and\n * finds the computed style back.\n */\nexport class StyleReader {\n /** The cache object */\n private domStylesCache = new Map>()\n\n private dummyNode?: HTMLElement\n\n /** Used to check if the dummyNode is on the current targetNode */\n private targetNode?: HTMLElement\n\n /** Set to true once tokenized */\n // private hasTokenizedOnce = false\n\n /**\n * Returns the computed values for the given property and scope in the DOM.\n *\n * This function insert a dummy element in the DOM to compute its style, return the specified property, and clear the\n * content of the dummy element.\n *\n * @param scopes A list of classes reprensenting the scope to build\n * @param property The name of the style property to compute\n * @param targetNode\n * @param getFromCache Whether to cache the computed value or not\n * @returns The computed property's value used in CanvasDrawer\n */\n retrieveStyleFromDom(\n scopes: string[],\n property: string,\n targetNode: HTMLElement,\n getFromCache: boolean = true\n ): string {\n if (scopes.length === 0) {\n return \"\"\n } // no scopes\n const key = scopes.join(\" \")\n let cachedData = this.domStylesCache.get(key)\n\n if (cachedData !== undefined) {\n if (getFromCache) {\n // if should get the value from the cache\n const value = cachedData[property]\n if (value !== undefined) {\n // value exists\n return value\n } // value not in the cache - get fresh value\n } // don't use cache - get fresh value\n } else {\n // key did not exist. create it\n cachedData = {}\n }\n\n this.ensureDummyNodeExistence(targetNode)\n const dummyNode = this.dummyNode as HTMLElement\n\n let parent = dummyNode\n for (let i = 0, len = scopes.length; i < len; i++) {\n const scope = scopes[i]\n const node = document.createElement(\"span\")\n node.className = scope.replace(dotRegexp, \" \") // TODO why replace is needed?\n parent.appendChild(node)\n parent = node\n }\n\n const style = window.getComputedStyle(parent)\n let value = style.getPropertyValue(property)\n\n // rotate hue if webkit-filter available\n const filter = style.getPropertyValue(\"-webkit-filter\")\n if (filter.includes(\"hue-rotate\")) {\n value = rotateHue(value, filter)\n }\n\n if (value !== \"\") {\n cachedData[property] = value\n this.domStylesCache.set(key, cachedData)\n }\n\n dummyNode.innerHTML = \"\"\n return value\n }\n\n /**\n * Creates a DOM node container for all the operations that need to read styles properties from DOM.\n *\n * @param targetNode\n */\n private ensureDummyNodeExistence(targetNode: HTMLElement) {\n if (this.targetNode !== targetNode || this.dummyNode === undefined) {\n this.dummyNode = document.createElement(\"span\")\n this.dummyNode.style.visibility = \"hidden\"\n\n // attach to the target node\n targetNode.appendChild(this.dummyNode)\n this.targetNode = targetNode\n }\n }\n\n /** Invalidates the cache by emptying the cache object. used in MinimapElement */\n invalidateDOMStylesCache() {\n this.domStylesCache.clear()\n }\n\n /** Invalidates the cache only for the first tokenization event. */\n /*\n private invalidateIfFirstTokenization () {\n if (this.hasTokenizedOnce) {\n return\n }\n this.invalidateDOMStylesCache()\n this.hasTokenizedOnce = true\n }\n */\n}\n\n// ## ## ######## ## ######## ######## ######## ######\n// ## ## ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ## ##\n// ######### ###### ## ######## ###### ######## ######\n// ## ## ## ## ## ## ## ## ##\n// ## ## ## ## ## ## ## ## ## ##\n// ## ## ######## ######## ## ######## ## ## ######\n\nconst dotRegexp = /\\.+/g\nconst rgbExtractRegexp = /rgb(a?)\\((\\d+), (\\d+), (\\d+)(, (\\d+(\\.\\d+)?))?\\)/\nconst hueRegexp = /hue-rotate\\((-?\\d+)deg\\)/\n\n/**\n * Computes the output color of `value` with a rotated hue defined in `filter`.\n *\n * @param value The CSS color to apply the rotation on\n * @param filter The CSS hue rotate filter declaration\n * @returns The rotated CSS color\n */\nfunction rotateHue(value: string, filter: string): string {\n const match = value.match(rgbExtractRegexp)\n if (match === null) {\n return \"\"\n }\n const [, , rStr, gStr, bStr, , aStr] = match\n\n const hueMatch = filter.match(hueRegexp)\n if (hueMatch === null) {\n return \"\"\n }\n\n const [, hueStr] = hueMatch\n\n let [r, g, b, a, hue] = [rStr, gStr, bStr, aStr, hueStr].map(Number)\n ;[r, g, b] = rotate(r, g, b, hue)\n\n if (isNaN(a)) {\n return `rgb(${r}, ${g}, ${b})`\n } else {\n return `rgba(${r}, ${g}, ${b}, ${a})`\n }\n}\n\n/**\n * Computes the hue rotation on the provided `r`, `g` and `b` channels by the amount of `angle`.\n *\n * @param r The red channel of the color to rotate\n * @param g The green channel of the color to rotate\n * @param b The blue channel of the color to rotate\n * @param angle The angle to rotate the hue with\n * @returns The rotated color channels\n */\nfunction rotate(r: number, g: number, b: number, angle: number): number[] {\n const matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1]\n const lumR = 0.2126\n const lumG = 0.7152\n const lumB = 0.0722\n const hueRotateR = 0.143\n const hueRotateG = 0.14\n const hueRotateB = 0.283\n const cos = Math.cos((angle * Math.PI) / 180)\n const sin = Math.sin((angle * Math.PI) / 180)\n\n matrix[0] = lumR + (1 - lumR) * cos - lumR * sin\n matrix[1] = lumG - lumG * cos - lumG * sin\n matrix[2] = lumB - lumB * cos + (1 - lumB) * sin\n matrix[3] = lumR - lumR * cos + hueRotateR * sin\n matrix[4] = lumG + (1 - lumG) * cos + hueRotateG * sin\n matrix[5] = lumB - lumB * cos - hueRotateB * sin\n matrix[6] = lumR - lumR * cos - (1 - lumR) * sin\n matrix[7] = lumG - lumG * cos + lumG * sin\n matrix[8] = lumB + (1 - lumB) * cos + lumB * sin\n\n return [\n clamp(matrix[0] * r + matrix[1] * g + matrix[2] * b),\n clamp(matrix[3] * r + matrix[4] * g + matrix[5] * b),\n clamp(matrix[6] * r + matrix[7] * g + matrix[8] * b),\n ]\n}\n\nfunction clamp(num: number) {\n return Math.ceil(Math.max(0, Math.min(255, num)))\n}\n"],"names":["$cfbc6087bb3b2166$var$thisSpec","dest","$2INr1$atom","require","$2INr1$path","$parcel$global","globalThis","$parcel$export","e","n","v","s","Object","defineProperty","get","set","enumerable","configurable","$parcel$interopDefault","a","__esModule","default","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","parcelRegister","callbackProperties","decorateElementClass","decorateElementPrototype","deprecate","__CUSTOM_HTML_ELEMENTS_CLASSES__","__ATOM_UTILS_CUSTOM_ELEMENT_CLASSES__","target","source","forEach","k","value","ref","apply","arguments","writable","getOwnPropertyNames","descriptor","getOwnPropertyDescriptor","indexOf","nodeName","options","elementClass","elementPrototype","klass","proto","class","prototype","create","HTMLElement","document","registerElement","Deprecation","Emitter","getRawStack","grim","__grim__","deprecations","emitter","includeDeprecatedAPIs","getDeprecations","deprecation","deprecationsByLineNumber","deprecationsByPackage","fileName","lineNumber","packageName","_ref","push","getDeprecationsLength","length","clearDeprecations","logDeprecations","_i","_len","sort","b","getCallCount","console","warn","getOriginName","getMessage","message","metadata","deprecationSite","error","originalStackTraceLimit","stack","_base","_base1","_base2","_ref1","stackTraceLimit","slice","getFileName","getLineNumber","addStack","emit","addSerializedDeprecation","serializedDeprecation","stacks","_ref2","deserialize","getStacks","on","eventName","callback","originalPrepareStackTrace","result","prepareStackTrace","captureStackTrace","callCount","stackCount","stackCallCounts","getFunctionNameFromCallsite","callsite","_arg","functionName","isToplevel","getFunctionName","isConstructor","getMethodName","getTypeName","getLocationFromCallsite","location","isNative","isEval","getEvalOrigin","getColumnNumber","getFileNameFromCallSite","originName","parsedStack","parsedStacks","parseStack","getStackCount","callerLocation","_this","map","serialize","$832aa9935fe47a17$export$4293555f241ae35a","$669eecca7e16861b$var$_defineProperties","props","i","key","$669eecca7e16861b$var$_createClass","Constructor","protoProps","staticProps","$dFpUX","$b22hF","$669eecca7e16861b$var$Emitter","$669eecca7e16861b$var$_classCallCheck","instance","TypeError","disposed","clear","exceptionHandler","exceptionHandlers","dispatch","exceptionHandlingDispatch","splice","simpleDispatch","handler","exception","subscriptions","dispose","handlersByEventName","unshift","_this2","cleanup","remove","off","add","disposable","handlerToRemove","handlers","handlerIndex","handlersCopy","constructor","_this3","Promise","all","then","resolve","keys","_arr","$9f33356e3055d3d4$var$_defineProperties","$9f33356e3055d3d4$var$_createClass","Disposable","disposalAction","$9f33356e3055d3d4$var$_classCallCheck","object","undefined","$8081a7265ead1389$var$Disposable","CompositeDisposable","$8081a7265ead1389$var$_classCallCheck","disposables","Set","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_step","_iterator","Symbol","iterator","next","done","return","_iteratorNormalCompletion2","_didIteratorError2","_iteratorError2","_step2","_iterator2","$8081a7265ead1389$var$assertDisposable","isDisposable","delete","$8081a7265ead1389$var$_defineProperties","Mixin","Ancestors","parents","node","selector","eachParent","parent","matches","block","results","parentNode","queryParentSelectorAll","queryParentSelector","ExcludedClassProperties","ExcludedPrototypeProperties","name","extended","includeInto","extend","hasOwnProperty","included","addDisposableEventListener","event","listener","addEventListener","removeEventListener","DisposableEvents","NO_SELECTOR","eachPair","EventsDelegation","subscribeTo","events","disposablesForObject","eventsForObject","eventsMap","WeakMap","disposablesMap","createEventListener","unsubscribeFrom","decorateEvent","eachSelectorFromTarget","isPropagationStopped","nodeAndItsAncestors","eachSelector","matched","targetMatch","isImmediatePropagationStopped","len","split","overriddenStop","overriddenStopImmediate","Event","stopPropagation","stopImmediatePropagation","BabelSpacePenDSL","Builder","SelfClosingTags","SpacePenDSL","Tags","Template","tag","buildContent","content","__content__","__create__","__createdCallback__","useShadowRoot","__useShadowRoot__","element","html","root","template","buildHtml","shadowRoot","createShadowRoot","innerHTML","wireOutlets","view","querySelectorAll","getAttribute","removeAttribute","Babel","currentBuilder","subview","text","string","tagName","args","raw","postProcessingSteps","join","extractOptions","openTag","attributes","closeTag","attributeName","attributePairs","attributesString","escapedString","replace","outletName","subviewId","idCounter","parentView","find","replaceWith","arg","toString","$2b2adba80112f001$export$7c57da42ce8e346f","$2b2adba80112f001$export$7e9152eee80b168f","$2b2adba80112f001$export$61fc7d43ac8f84b0","$2b2adba80112f001$var$regexEscape","$2b2adba80112f001$var$regexDaherize","toLowerCase","m","letter","wait","timeoutId","clearTimeout","setTimeout","$33ac66407e721072$export$2e2bcd8739ae039","cls","elementName","window","customElements","define","$23c406735d46bb37$export$3542142cf713a624","$23c406735d46bb37$export$bad24218ebd77223","$23c406735d46bb37$export$4d3d19fa8673fd3e","$23c406735d46bb37$export$234c45b355edd85b","$23c406735d46bb37$export$e03c1c3201ee8bb7","$23c406735d46bb37$export$e854d79fe60e1faa","$23c406735d46bb37$export$e96c1edfdaf2d1db","$23c406735d46bb37$export$9734216cda67175d","$23c406735d46bb37$export$b6f10fd94544e66c","$23c406735d46bb37$export$d206d0a3ab46ce53","$23c406735d46bb37$export$a720fe198b21c58c","$23c406735d46bb37$export$d40fb390be4bd0f","$23c406735d46bb37$export$9937b73c38ac51f0","$23c406735d46bb37$export$6f3aaf72a3cac830","$23c406735d46bb37$export$8df1420526313195","$23c406735d46bb37$export$4f0668f248b15f12","$23c406735d46bb37$export$e3a0d8dffed34b4f","$23c406735d46bb37$export$fbfbb3bd6dc38def","$23c406735d46bb37$export$58c03b6c0d094c","$23c406735d46bb37$export$bd03fcaa67c354fa","$23c406735d46bb37$export$6f8e50201d28743","$23c406735d46bb37$export$b0030062932c3d3d","$23c406735d46bb37$export$b956a56dda08a331","$186b450f929b5c94$exports","$148b4ac34d9435d4$export$2e2bcd8739ae039","$fcbed2d4b7084ed8$export$aa3fab546e9e7454","$51078990c74c1d06$exports","requirePackages","packages","reject","failures","remains","required","solved","pkg","failHandler","promise","reason","atom","activatePackage","activatedPackage","mainModule","fail","catch","registerOrUpdateElement","AncestorsMethods","$128a095f646fb776$exports","$56d3531c4a98a45b$exports","$56d3531c4a98a45b$var$utils","collection","$128a095f646fb776$require$forEach","$44963ebbe2541692$exports","getState","stateHandler","isDetectable","state","markAsDetectable","isBusy","busy","markBusy","$c9746ed2e67d03e3$exports","idHandler","eventListeners","getListeners","removeListener","listeners","removeAllListeners","$83778aa56f77c0e4$exports","idCount","generate","$92b86b0b760da170$exports","idGenerator","$9412d0a18aec0f5e$exports","quiet","noop","reporter","log","attachFunction","f","$462deb81cd9473bb$exports","$462deb81cd9473bb$var$detector","isIE","version","agent","navigator","userAgent","undef","div","createElement","getElementsByTagName","isLegacyOpera","opera","$bb2986b147359ff8$exports","$25da9962935de12f$exports","$bb2986b147359ff8$var$Batch","batch","size","topLevel1","bottomLevel1","level","fn","process","fns","$25da9962935de12f$var$utils","getOption","defaultValue","asyncFrameHandler","asyncProcess","autoProcess","isProcessing","processBatch","processingBatch","requestFrame","force","localAsyncProcess","cancel","$240efa097ecf7047$exports","$240efa097ecf7047$var$prop","initState","cleanState","$4405e31f3fc7d231$exports","batchProcessor","makeDetectable","debug","injectObject","rules","seperator","OBJECT_STYLE","important","trim","positionCheckPerformed","style","getComputedStyle","width","offsetWidth","height","offsetHeight","mutateDom","alterPositionStyles","position","setProperty","removeRelativeStyles","property","getNumericalValue","cssText","tabIndex","type","setAttribute","onload","getDocument","contentDocument","checkForObjectDocumentTimeoutId","objectDocument","data","appendChild","startSize","addListener","listenerProxy","proxy","attachEvent","defaultView","uninstall","detachEvent","removeChild","$7871830003078117$exports","$7871830003078117$require$forEach","$128a095f646fb776$var$isCollection","obj","Array","isArray","$128a095f646fb776$var$toArray","array","$128a095f646fb776$var$isElement","nodeType","$128a095f646fb776$var$getOption","child","container","widthSize","heightSize","hasState","scrollbarSizes","buildCssTextString","body","insertBefore","firstChild","clientWidth","clientHeight","detectionContainerClass","initDocument","targetDocument","injectScrollStyle","styleId","containerClass","getElementById","method","styleElement","containerAnimationClass","head","addEvent","el","cb","removeEvent","getExpandElement","childNodes","getShrinkElement","isInShadowRoot","isUnrendered","getStyle","elementStyle","top","right","bottom","left","widthCSS","heightCSS","storeStyle","storeCurrentSize","lastWidth","lastHeight","getWidthOffset","getHeightOffset","positionScrollbars","expand","shrink","expandWidth","expandHeight","shrinkWidth","shrinkHeight","scrollLeft","scrollTop","injectContainerElement","className","onAnimationStart","onRendered","injectScrollElements","rootContainer","scrollbarWidth","scrollbarHeight","containerContainerStyle","containerStyle","concat","expandStyle","shrinkStyle","expandChildStyle","shrinkChildStyle","containerContainer","expandChild","shrinkChild","onExpandScroll","onExpand","onShrinkScroll","onShrink","dir","registerListenersAndPositionElements","updateChildSizes","updateDetectorElements","sizeChanged","areElementsInjected","w","h","notifyListenersIfNeeded","isFirstNotify","lastNotifiedWidth","lastNotifiedHeight","handleScroll","finalizeDomMutation","ready","install","getRootNode","contains","ownerDocument","detectionStrategy","globalOptions","callOnAdd","eventListenerHandler","elementUtils","desiredStrategy","importantCssRules","strategyOptions","onReadyCallbacks","listenTo","elements","onResizeCallback","elementsReady","onReadyCallback","$3HMiZ","$9cc35ac360344988$var$idCounter","$9cc35ac360344988$export$2e2bcd8739ae039","isType","decorationProperties","marker","minimap","properties","setProperties","destroyed","markerDestroyDisposable","onDidDestroy","destroy","screenRange","getScreenRange","_this_markerDestroyDisposable_dispose","_this_markerDestroyDisposable","isDestroyed","onDidChangeProperties","getId","getMarker","getProperties","newProperties","oldProperties","$9af3f5cca724bf65$export$2e2bcd8739ae039","initializeDecorations","decorationsById","Map","decorationsByMarkerId","decorationMarkerChangedSubscriptions","decorationMarkerDestroyedSubscriptions","decorationUpdatedSubscriptions","decorationDestroyedSubscriptions","getDecorations","values","onDidAddDecoration","onDidRemoveDecoration","onDidChangeDecoration","onDidChangeDecorationRange","onDidUpdateDecoration","decorationForId","decorationsForScreenRowRange","startScreenRow","endScreenRow","markers","findMarkers","intersectsScreenRowRange","decorations","decorationsByTypeThenRows","decorationsByTypeThenRowsCache","cache","decoration","range","row","start","end","invalidateDecorationForScreenRowsCache","decorateMarker","decorationParams","plugin","$9af3f5cca724bf65$var$getOriginatorPackageName","filePath","line","re","RegExp","getPackageDirPaths","escapeRegExp","sep","scope","has","removeAllDecorationsForMarker","onDidChange","emitDecorationChanges","oldStart","oldTailScreenPosition","oldEnd","oldHeadScreenPosition","newStart","newTailScreenPosition","newEnd","newHeadScreenPosition","rangesDiffs","$9af3f5cca724bf65$var$computeRangesDiffs","diffs","isLessThan","emitRangeChanges","removeDecoration","editorDestroyed","screenDelta","lastRenderedScreenRow","getLastVisibleScreenRow","firstRenderedScreenRow","getFirstVisibleScreenRow","changeEvent","subscription","index","removedAllMarkerDecorations","removeAllDecorations","$jCvCU","$fad6c03909bb3604$export$2e2bcd8739ae039","canvas","context","getContext","desynchronized","webkitImageSmoothingEnabled","imageSmoothingEnabled","offscreenCanvas","offscreenContext","attach","setSize","resetOffscreenSize","getSize","copyToOffscreen","drawImage","copyFromOffscreen","copyPartFromOffscreen","srcY","destY","clearCanvas","clearRect","$cfbc6087bb3b2166$var$SPEC_MODE","inSpecMode","$cfbc6087bb3b2166$export$2e2bcd8739ae039","initializeCanvas","drawLines","firstLine","lastLine","drawLineDecoration","$cfbc6087bb3b2166$var$drawLineDecoration","drawGutterDecoration","$cfbc6087bb3b2166$var$drawGutterDecoration","drawHighlightDecoration","$cfbc6087bb3b2166$var$drawHighlightDecoration","drawHighlightOutlineDecoration","$cfbc6087bb3b2166$var$drawHighlightOutlineDecoration","drawCustomDecoration","$cfbc6087bb3b2166$var$drawCustomDecoration","StyleReader","tokensLayer","backLayer","frontLayer","pendingChanges","pendingBackDecorationChanges","pendingFrontDecorationChanges","maxTokensInOneLine","config","getFrontCanvas","attachCanvases","setCanvasesSize","updateCanvas","firstRow","lastRow","devicePixelRatio","getDevicePixelRatio","lineHeight","getLineHeight","charHeight","getCharHeight","charWidth","getCharWidth","canvasWidth","canvasHeight","editor","getTextEditor","editorElement","getTextEditorElement","getTokenColorClosure","displayCodeHighlights","scopes","textOpacity","$cfbc6087bb3b2166$var$transparentize","retrieveStyleFromDom","$cfbc6087bb3b2166$var$getDefaultColor","$cfbc6087bb3b2166$var$updateTokensLayer","offscreenFirstRow","offscreenLastRow","editorScreenLineCount","invisibleRegExp","ignoreWhitespacesInTokens","intactRanges","$cfbc6087bb3b2166$var$computeIntactRanges","$cfbc6087bb3b2166$var$drawLines","j","intact","offscreenRow","currentRow","getScreenLineCount","$cfbc6087bb3b2166$var$getInvisibleRegExp","invisibles","getInvisibles","regexp","cr","eol","space","tab","filter","DecorationManagement","renderData","orders","$43704eddd45f8975$var$pluginsOrderMap","drawCustomDecorationLambda","decorationColor","$cfbc6087bb3b2166$var$backgroundDecorationDispatcher","$cfbc6087bb3b2166$var$frontDecorationDispatcher","$cfbc6087bb3b2166$var$updateBackDecorationsLayer","$cfbc6087bb3b2166$var$drawBackDecorationsForLines","$cfbc6087bb3b2166$var$updateFrontDecorationsLayer","$cfbc6087bb3b2166$var$drawFrontDecorationsForLines","$cfbc6087bb3b2166$var$whitespaceTokenRegex","$cfbc6087bb3b2166$var$oneOrMoreWhiteSpaceRegexp","offsetRow","x","y","Math","min","editorTokensForScreenRow","tokensForScreenRow","numTokenToRender","iToken","token","tokenText","tokenScopes","test","$cfbc6087bb3b2166$var$drawToken","color","fillStyle","fillRect","chars","char","fill","gutter","yRow","screenRow","rowSpan","colSpan","column","bottomWidth","xBottomStart","xEnd","xStart","yEnd","yStart","max","renderRoutine","render","$cfbc6087bb3b2166$var$drawDecorations","types","decorationsToRender","decorationDrawer","pop","$cfbc6087bb3b2166$var$getDecorationColor","opacity","scopeString","changes","change","newIntactRanges","intactLen","bufferDelta","$cfbc6087bb3b2166$var$truncateIntactRanges","$b93c954f18e23f84$export$2e2bcd8739ae039","mixins","mixin","$4r3v7","$f4a489e3d34ef458$var$TAG_NAME","$f4a489e3d34ef458$var$MinimapQuickSettingsElement","initClass","input","outlet","ol","li","button","createdCallback","setModel","selectedItem","plugins","itemsActions","codeHighlights","classList","toggle","absoluteMode","adjustAbsoluteModeHeight","addItemFor","removeItemFor","activateItem","deactivateItem","commands","selectPreviousItem","selectNextItem","toggleSelectedItem","mousedown","preventDefault","hiddenInput","focusout","passive","onLeftButton","onRightButton","observe","bool","initList","workspaceElement","views","getView","workspace","focus","itemsDisposables","$43704eddd45f8975$export$8b3ca321c77fdea6","nextSibling","list","previousSibling","lastChild","item","action","$43704eddd45f8975$export$8cf5509a1f8ee810","isActive","textContent","separator","$fcbed2d4b7084ed8$var$elementResizeDetector","strategy","$fcbed2d4b7084ed8$var$SPEC_MODE","$fcbed2d4b7084ed8$var$TAG_NAME","$fcbed2d4b7084ed8$var$MinimapElement","visibleAreaSubscription","quickSettingsSubscription","dragSubscription","openQuickSettingSubscription","minimapScrollIndicator","displayMinimapOnLeft","displayPluginsControls","adjustToSoftWrap","useHardwareAcceleration","visibleArea","controls","scrollIndicator","openQuickSettings","quickSettingsElement","attached","attachedToTextEditor","standAlone","wasVisible","frameRequested","flexBasis","initializeContent","updateMinimapFlexPosition","measureHeightAndWidth","disposeScrollIndicator","initializeScrollIndicator","requestUpdate","disposeOpenQuickSettings","initializeOpenQuickSettings","requestForcedUpdate","smoothScrolling","adjustOnlyIfSmaller","connectedCallback","pollDocument","pollDOM","intersectionObserver","IntersectionObserver","entries","intersectionRect","isVisible","measureDimensions","subscribeToMediaQuery","disconnectedCallback","minimaps","detach","createVisibleArea","createControls","mousewheel","onMouseWheel","canvasPressed","$fcbed2d4b7084ed8$var$extractMouseEventData","touchstart","$fcbed2d4b7084ed8$var$extractTouchEventData","startDrag","removeVisibleArea","removeControls","getBoundingClientRect","getDecorationManagement","getModel","minimapElement","onDidChangeScrollTop","onDidChangeScrollLeft","onDidChangeConfig","onDidChangeStandAlone","setStandAlone","isStandAlone","setScreenHeightAndWidth","requestAnimationFrame","update","enableCache","visibleAreaLeft","getTextEditorScaledScrollLeft","visibleAreaTop","getTextEditorScaledScrollTop","getScrollTop","visibleWidth","$fcbed2d4b7084ed8$var$applyStyles","round","getTextEditorScaledHeight","transform","$fcbed2d4b7084ed8$var$makeTranslate","canvasTop","canvasTransform","scale","$fcbed2d4b7084ed8$var$makeScale","canScroll","minimapScreenHeight","getScreenHeight","indicatorHeight","getHeight","indicatorScroll","getScrollRatio","updateCanvasesSize","clearCache","setDisplayCodeHighlights","visibilityChanged","checkForVisibilityChange","forceUpdate","safeFlexBasis","wasResized","lineLength","softWrap","softWrapAtPreferredLineLength","maxCanvasHeight","newHeight","isLeftMouse","isMiddleMouse","canvasLeftMousePressed","canvasMiddleMousePressed","floor","deltaY","textEditor","textEditorElement","getLineHeightInPixels","getTextEditorHeight","textEditorScrollTop","pixelPositionForScreenPosition","setCursorScreenPosition","duration","independentScroll","scrollIndependentlyOnMouseWheel","from","getTextEditorScrollTop","minimapFrom","minimapTo","getTextEditorMaxScrollTop","getMaxScrollTop","$fcbed2d4b7084ed8$var$animate","to","step","now","t","setTextEditorScrollTop","setScrollTop","offsetTop","ratio","getVisibleHeight","mediaQuery","matchMedia","mediaListener","initial","dragOffset","mousemoveHandler","drag","dragendHandler","endDrag","touchmoveHandler","mouseEvent","pageX","pageY","touchEvent","touch","changedTouches","styles","progress","$fcbed2d4b7084ed8$var$getTime","passed","delta","cos","PI","Date","$82126bfc16059e0c$export$2e2bcd8739ae039","useCache","heightCache","scrollTopCache","scrollLeftCache","maxScrollTopCache","computeScrollTop","Number","isNaN","lineTop","lineY","getScrollLeft","maxScrollTop","parseFloat","getVersion","scrollPastEnd","getScrollHeight","component","$148b4ac34d9435d4$var$nextModelId","$148b4ac34d9435d4$var$disposedDisposable","$148b4ac34d9435d4$var$dummyDecoration","Range","adapter","configCharHeight","configCharWidth","interline","configInterline","devicePixelRatioRounding","configDevicePixelRatioRounding","redrawDelay","pendingChangeEvents","flushChangesTimer","configSubscription","subscribeToConfig","onDidChangeGrammar","ignoreTextEditorScroll","inChangeScrollTop","updateScrollTop","scheduleChanges","onDidTokenize","requestFlushChanges","flushChanges","emitChanges","requestedFlushChanges","cancelAnimationFrame","subs","opts","getRootScopeDescriptor","independentMinimapScroll","scrollSensitivity","cdprr","getMinimapElement","getVerticalScaleFactor","getHorizontalScaleFactor","getTextEditorScrollLeft","getTextEditorScrollRatio","getCapedTextEditorScrollRatio","additionalHeight","getRowsPerPage","getWidth","getMaxScreenLineLength","getVisibleWidth","getScreenWidth","getDefaultCharWidth","getInterline","setCharWidth","setCharHeight","setInterline","getDevicePixelRatioRounding","setDevicePixelRatioRounding","ceil","getScrollTopFromEditor","abs","wheelDeltaY","updatedScrollTop","previousScrollTop","o","markBufferRange","_this_minimapElement","_this_getDecorationManagement","_this_getDecorationManagement_getDecorations","_this_getDecorationManagement_onDidAddDecoration","_this_getDecorationManagement_onDidRemoveDecoration","_this_getDecorationManagement_onDidChangeDecorationRange","_this_getDecorationManagement_onDidUpdateDecoration","_this_getDecorationManagement_decorationForId","_this_getDecorationManagement_decorationsForScreenRowRange","_this_getDecorationManagement_decorationsByTypeThenRows","_this_getDecorationManagement_decorateMarker","JSON","parse","$43704eddd45f8975$exports","$43704eddd45f8975$export$7612db19fb8beb1e","$43704eddd45f8975$export$48d00697bf0841b0","$43704eddd45f8975$export$4751c4964dd9fdd5","$43704eddd45f8975$export$c20a82b9d4db0e25","$43704eddd45f8975$export$eca032c13825f076","$43704eddd45f8975$export$b9b9891832107981","$43704eddd45f8975$var$pluginsSubscriptions","$43704eddd45f8975$var$registerPluginControls","settingsKey","orderSettingsKey","title","description","$43704eddd45f8975$var$updatesPluginActivationState","order","$43704eddd45f8975$var$updatePluginsOrderMap","boolean","$43704eddd45f8975$var$eachPlugin","deactivatePlugin","pluginActive","settingActive","activatePlugin","$cfdfe6b80618a69d$exports","domStylesCache","dummyNode","targetNode","getFromCache","cachedData","ensureDummyNodeExistence","$cfdfe6b80618a69d$var$dotRegexp","getPropertyValue","includes","$cfdfe6b80618a69d$var$rotateHue","match","$cfdfe6b80618a69d$var$rgbExtractRegexp","rStr","gStr","bStr","aStr","hueMatch","$cfdfe6b80618a69d$var$hueRegexp","hueStr","r","g","hue","$cfdfe6b80618a69d$var$rotate","angle","matrix","sin","lumR","lumG","lumB","hueRotateR","hueRotateG","hueRotateB","$cfdfe6b80618a69d$var$clamp","visibility","invalidateDOMStylesCache","num","$23c406735d46bb37$var$active","$23c406735d46bb37$var$toggled","$23c406735d46bb37$var$subscriptions","$23c406735d46bb37$var$subscriptionsOfCommands","$23c406735d46bb37$var$generatePlugin","model","getLoadedPackage","configSchema","wasMaximized","isMaximized","maximize","$23c406735d46bb37$var$initSubscriptions","configName","warningTitle","warningDescription","debounceUpdateStyles","debounce","$23c406735d46bb37$var$updateStyles","observeTextEditors","getElement","themes","onDidChangeActiveThemes","onDidUpdateStyleElement","onDidAddStyleElement","onDidRemoveStyleElement","storageName","today","previousWarning","localStorage","getItem","previousWarningDay","getDay","setItem","notification","notifications","addWarning","dismissable","buttons","onDidClick","dismiss","removeItem","reload","createMinimapPluginGeneratorElement","editorSubscription","getActiveTextEditor","$23c406735d46bb37$var$MinimapServiceV1","minimapViewProvider","getConfigSchema","onDidActivate","onDidDeactivate","onDidCreateMinimap","onDidAddPlugin","onDidRemovePlugin","onDidActivatePlugin","onDidDeactivatePlugin","onDidChangePluginOrder","minimapClass","minimapForEditorElement","minimapForEditor","standAloneMinimapForEditor","getActiveMinimap","observeMinimaps","registerPlugin","unregisterPlugin","togglePluginActivation","deactivateAllPlugins","getPluginsOrder","dotRegexp","rotateHue","rgbExtractRegexp","hueRegexp","rotate","clamp"],"version":3,"file":"main.js.map"} \ No newline at end of file diff --git a/dist/minimap-plugin-generator-element.a1e4649c.js b/dist/minimap-plugin-generator-element.a1e4649c.js deleted file mode 100644 index e4048446..00000000 --- a/dist/minimap-plugin-generator-element.a1e4649c.js +++ /dev/null @@ -1,200 +0,0 @@ -var $5Xi1e$path = require("path"); -var $5Xi1e$fsplus = require("fs-plus"); -var $5Xi1e$atom = require("atom"); - - -function $parcel$interopDefault(a) { - return a && a.__esModule ? a.default : a; -} - -function $parcel$export(e, n, v, s) { - Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true}); -} - - var $parcel$global = globalThis; - var parcelRequire = $parcel$global["parcelRequire7d67"]; -var parcelRegister = parcelRequire.register; -parcelRegister("1Ozz1", function(module, exports) { - -$parcel$export(module.exports, "createMinimapPluginGeneratorElement", () => $15260c33b8bdf1f4$export$95d70a3925bf2f0c); - -var $bN1tE = parcelRequire("bN1tE"); - - - - -var $5yNMJ = parcelRequire("5yNMJ"); - -var $15260c33b8bdf1f4$var$$parcel$__dirname = $5Xi1e$path.resolve(__dirname, "../lib"); -"use strict"; -const $15260c33b8bdf1f4$var$TAG_NAME = "minimap-plugin-generator"; -/** @access private */ class $15260c33b8bdf1f4$var$MinimapPluginGeneratorElement extends HTMLElement { - static initClass() { - this.registerCommands(); - (0, $5yNMJ.default)(this, $15260c33b8bdf1f4$var$TAG_NAME); - } - static registerCommands() { - atom.commands.add("minimap-plugin-generator", { - "core:confirm" () { - this.confirm(); - }, - "core:cancel" () { - this.detach(); - } - }); - } - createdCallback() { - this.previouslyFocusedElement = null; - this.mode = null; - this.modal = document.createElement("atom-panel"); - this.modal.classList.add("minimap-plugin-generator"); - this.modal.classList.add("modal"); - this.modal.classList.add("overlay"); - this.modal.classList.add("from-top"); - this.editor = atom.workspace.buildTextEditor({ - mini: true - }); - this.editorElement = atom.views.getView(this.editor); - this.error = document.createElement("div"); - this.error.classList.add("error"); - this.message = document.createElement("div"); - this.message.classList.add("message"); - this.modal.appendChild(this.editorElement); - this.modal.appendChild(this.error); - this.modal.appendChild(this.message); - this.appendChild(this.modal); - } - connectedCallback() { - this.previouslyFocusedElement = document.activeElement; - this.message.textContent = "Enter plugin path"; - this.setPathText("my-minimap-plugin"); - this.editorElement.focus(); - } - attach() { - atom.views.getView(atom.workspace).appendChild(this); - } - setPathText(placeholderName, rangeToSelect) { - if (!rangeToSelect) rangeToSelect = [ - 0, - placeholderName.length - ]; - const packagesDirectory = $15260c33b8bdf1f4$var$getPackagesDirectory(); - this.editor.setText((0, ($parcel$interopDefault($5Xi1e$path))).join(packagesDirectory, placeholderName)); - const pathLength = this.editor.getText().length; - const endOfDirectoryIndex = pathLength - placeholderName.length; - this.editor.setSelectedBufferRange([ - [ - 0, - endOfDirectoryIndex + rangeToSelect[0] - ], - [ - 0, - endOfDirectoryIndex + rangeToSelect[1] - ] - ]); - } - detach() { - if (!this.parentNode) return; - if (this.previouslyFocusedElement) this.previouslyFocusedElement.focus(); - this.parentNode.removeChild(this); - } - confirm() { - if (this.validPackagePath()) { - this.removeChild(this.modal); - this.message.innerHTML = ` - - Generate plugin at ${this.getPackagePath()} - `; - this.createPackageFiles(()=>{ - const packagePath = this.getPackagePath(); - atom.open({ - pathsToOpen: [ - packagePath - ], - devMode: atom.config.get("minimap.createPluginInDevMode") - }); - this.message.innerHTML = 'Plugin successfully generated, opening it now...'; - setTimeout(()=>{ - this.detach(); - }, 2000); - }); - } - } - getPackagePath() { - const packagePath = this.editor.getText(); - const packageName = (0, $bN1tE.dasherize)((0, ($parcel$interopDefault($5Xi1e$path))).basename(packagePath)); - return (0, ($parcel$interopDefault($5Xi1e$path))).join((0, ($parcel$interopDefault($5Xi1e$path))).dirname(packagePath), packageName); - } - validPackagePath() { - if ((0, $5Xi1e$fsplus.existsSync)(this.getPackagePath())) { - this.error.textContent = `Path already exists at '${this.getPackagePath()}'`; - this.error.style.display = "block"; - return false; - } else return true; - } - initPackage(packagePath, callback) { - const templatePath = (0, ($parcel$interopDefault($5Xi1e$path))).resolve($15260c33b8bdf1f4$var$$parcel$__dirname, (0, ($parcel$interopDefault($5Xi1e$path))).join("..", "templates", `plugin-${this.template}`)); - $15260c33b8bdf1f4$var$runCommand(atom.packages.getApmPath(), [ - "init", - "-p", - `${packagePath}`, - "--template", - templatePath - ], callback); - } - createPackageFiles(callback) { - const packagePath = this.getPackagePath(); - if ($15260c33b8bdf1f4$var$isStoredInDotAtom(packagePath)) this.initPackage(packagePath, ()=>{ - $15260c33b8bdf1f4$var$installPackage(packagePath, callback); - }); - else this.initPackage(packagePath, ()=>{ - $15260c33b8bdf1f4$var$linkPackage(packagePath, ()=>{ - $15260c33b8bdf1f4$var$installPackage(packagePath, callback); - }); - }); - } -} -$15260c33b8bdf1f4$var$MinimapPluginGeneratorElement.initClass(); -function $15260c33b8bdf1f4$export$95d70a3925bf2f0c() { - const element = document.createElement($15260c33b8bdf1f4$var$TAG_NAME); - element.createdCallback(); - return element; -} -function $15260c33b8bdf1f4$var$linkPackage(packagePath, callback) { - const args = [ - "link" - ]; - if (atom.config.get("minimap.createPluginInDevMode")) args.push("--dev"); - args.push(packagePath.toString()); - $15260c33b8bdf1f4$var$runCommand(atom.packages.getApmPath(), args, callback); -} -function $15260c33b8bdf1f4$var$installPackage(packagePath, callback) { - const args = [ - "install" - ]; - $15260c33b8bdf1f4$var$runCommand(atom.packages.getApmPath(), args, callback, { - cwd: packagePath - }); -} -function $15260c33b8bdf1f4$var$getPackagesDirectory() { - return atom.config.get("core.projectHome") || process.env.ATOM_REPOS_HOME || (0, ($parcel$interopDefault($5Xi1e$path))).join((0, $5Xi1e$fsplus.getHomeDirectory)(), "github"); -} -function $15260c33b8bdf1f4$var$isStoredInDotAtom(packagePath) { - const packagesPath = (0, ($parcel$interopDefault($5Xi1e$path))).join(atom.getConfigDirPath(), "packages", (0, ($parcel$interopDefault($5Xi1e$path))).sep); - if (packagePath.indexOf(packagesPath) === 0) return true; - const devPackagesPath = (0, ($parcel$interopDefault($5Xi1e$path))).join(atom.getConfigDirPath(), "dev", "packages", (0, ($parcel$interopDefault($5Xi1e$path))).sep); - return packagePath.indexOf(devPackagesPath) === 0; -} -function $15260c33b8bdf1f4$var$runCommand(command, args, exit, options = {}) { - return new (0, $5Xi1e$atom.BufferedProcess)({ - command: command, - args: args, - exit: exit, - options: options - }); -} - -}); - - -//# sourceMappingURL=minimap-plugin-generator-element.a1e4649c.js.map diff --git a/dist/minimap-plugin-generator-element.a1e4649c.js.map b/dist/minimap-plugin-generator-element.a1e4649c.js.map deleted file mode 100644 index 5827eeb5..00000000 --- a/dist/minimap-plugin-generator-element.a1e4649c.js.map +++ /dev/null @@ -1 +0,0 @@ -{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAQA,MAAM,iCAAW;AAEjB,oBAAoB,GACpB,MAAM,4DAAsC;IAC1C,OAAO,YAAY;QACjB,IAAI,CAAC,gBAAgB;QACrB,CAAA,GAAA,cAAM,EAAE,IAAI,EAAE;IAChB;IAEA,OAAO,mBAAmB;QACxB,KAAK,QAAQ,CAAC,GAAG,CAAC,4BAA4B;YAC5C;gBACE,IAAI,CAAC,OAAO;YACd;YACA;gBACE,IAAI,CAAC,MAAM;YACb;QACF;IACF;IAEA,kBAAkB;QAChB,IAAI,CAAC,wBAAwB,GAAG;QAChC,IAAI,CAAC,IAAI,GAAG;QAEZ,IAAI,CAAC,KAAK,GAAG,SAAS,aAAa,CAAC;QAEpC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC;QACzB,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC;QACzB,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC;QACzB,IAAI,CAAC,KAAK,CAAC,SAAS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GAAA,qCAAG,EAAE,IAAI,CAAC,CAAA,GAAA,8BAAe,KAAK;AAC7G;AAEA,SAAS,wCAAkB,WAAW;IACpC,MAAM,eAAe,CAAA,GAAA,qCAAG,EAAE,IAAI,CAAC,KAAK,gBAAgB,IAAI,YAAY,CAAA,GAAA,qCAAG,EAAE,GAAG;IAC5E,IAAI,YAAY,OAAO,CAAC,kBAAkB,GACxC,OAAO;IAGT,MAAM,kBAAkB,CAAA,GAAA,qCAAG,EAAE,IAAI,CAAC,KAAK,gBAAgB,IAAI,OAAO,YAAY,CAAA,GAAA,qCAAG,EAAE,GAAG;IAEtF,OAAO,YAAY,OAAO,CAAC,qBAAqB;AAClD;AAEA,SAAS,iCAAW,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;IACnD,OAAO,IAAI,CAAA,GAAA,2BAAc,EAAE;iBAAE;cAAS;cAAM;iBAAM;IAAQ;AAC5D","sources":["lib/minimap-plugin-generator-element.js"],"sourcesContent":["\"use strict\"\n\nimport { dasherize } from \"./deps/underscore-plus\"\nimport { getHomeDirectory, existsSync } from \"fs-plus\"\nimport path from \"path\"\nimport { BufferedProcess } from \"atom\"\nimport element from \"./decorators/element\"\n\nconst TAG_NAME = \"minimap-plugin-generator\"\n\n/** @access private */\nclass MinimapPluginGeneratorElement extends HTMLElement {\n static initClass() {\n this.registerCommands()\n element(this, TAG_NAME)\n }\n\n static registerCommands() {\n atom.commands.add(\"minimap-plugin-generator\", {\n \"core:confirm\"() {\n this.confirm()\n },\n \"core:cancel\"() {\n this.detach()\n },\n })\n }\n\n createdCallback() {\n this.previouslyFocusedElement = null\n this.mode = null\n\n this.modal = document.createElement(\"atom-panel\")\n\n this.modal.classList.add(\"minimap-plugin-generator\")\n this.modal.classList.add(\"modal\")\n this.modal.classList.add(\"overlay\")\n this.modal.classList.add(\"from-top\")\n\n this.editor = atom.workspace.buildTextEditor({ mini: true })\n this.editorElement = atom.views.getView(this.editor)\n\n this.error = document.createElement(\"div\")\n this.error.classList.add(\"error\")\n\n this.message = document.createElement(\"div\")\n this.message.classList.add(\"message\")\n\n this.modal.appendChild(this.editorElement)\n this.modal.appendChild(this.error)\n this.modal.appendChild(this.message)\n\n this.appendChild(this.modal)\n }\n\n connectedCallback() {\n this.previouslyFocusedElement = document.activeElement\n this.message.textContent = \"Enter plugin path\"\n this.setPathText(\"my-minimap-plugin\")\n this.editorElement.focus()\n }\n\n attach() {\n atom.views.getView(atom.workspace).appendChild(this)\n }\n\n setPathText(placeholderName, rangeToSelect) {\n if (!rangeToSelect) {\n rangeToSelect = [0, placeholderName.length]\n }\n\n const packagesDirectory = getPackagesDirectory()\n\n this.editor.setText(path.join(packagesDirectory, placeholderName))\n\n const pathLength = this.editor.getText().length\n const endOfDirectoryIndex = pathLength - placeholderName.length\n\n this.editor.setSelectedBufferRange([\n [0, endOfDirectoryIndex + rangeToSelect[0]],\n [0, endOfDirectoryIndex + rangeToSelect[1]],\n ])\n }\n\n detach() {\n if (!this.parentNode) {\n return\n }\n\n if (this.previouslyFocusedElement) {\n this.previouslyFocusedElement.focus()\n }\n\n this.parentNode.removeChild(this)\n }\n\n confirm() {\n if (this.validPackagePath()) {\n this.removeChild(this.modal)\n this.message.innerHTML = `\n \n Generate plugin at ${this.getPackagePath()}\n `\n\n this.createPackageFiles(() => {\n const packagePath = this.getPackagePath()\n atom.open({ pathsToOpen: [packagePath], devMode: atom.config.get(\"minimap.createPluginInDevMode\") })\n\n this.message.innerHTML = 'Plugin successfully generated, opening it now...'\n\n setTimeout(() => {\n this.detach()\n }, 2000)\n })\n }\n }\n\n getPackagePath() {\n const packagePath = this.editor.getText()\n const packageName = dasherize(path.basename(packagePath))\n\n return path.join(path.dirname(packagePath), packageName)\n }\n\n validPackagePath() {\n if (existsSync(this.getPackagePath())) {\n this.error.textContent = `Path already exists at '${this.getPackagePath()}'`\n this.error.style.display = \"block\"\n return false\n } else {\n return true\n }\n }\n\n initPackage(packagePath, callback) {\n const templatePath = path.resolve(__dirname, path.join(\"..\", \"templates\", `plugin-${this.template}`))\n runCommand(atom.packages.getApmPath(), [\"init\", \"-p\", `${packagePath}`, \"--template\", templatePath], callback)\n }\n\n createPackageFiles(callback) {\n const packagePath = this.getPackagePath()\n\n if (isStoredInDotAtom(packagePath)) {\n this.initPackage(packagePath, () => {\n installPackage(packagePath, callback)\n })\n } else {\n this.initPackage(packagePath, () => {\n linkPackage(packagePath, () => {\n installPackage(packagePath, callback)\n })\n })\n }\n }\n}\n\nMinimapPluginGeneratorElement.initClass()\n\nexport function createMinimapPluginGeneratorElement() {\n const element = document.createElement(TAG_NAME)\n element.createdCallback()\n return element\n}\n\nfunction linkPackage(packagePath, callback) {\n const args = [\"link\"]\n if (atom.config.get(\"minimap.createPluginInDevMode\")) {\n args.push(\"--dev\")\n }\n args.push(packagePath.toString())\n\n runCommand(atom.packages.getApmPath(), args, callback)\n}\n\nfunction installPackage(packagePath, callback) {\n const args = [\"install\"]\n\n runCommand(atom.packages.getApmPath(), args, callback, { cwd: packagePath })\n}\n\nfunction getPackagesDirectory() {\n return atom.config.get(\"core.projectHome\") || process.env.ATOM_REPOS_HOME || path.join(getHomeDirectory(), \"github\")\n}\n\nfunction isStoredInDotAtom(packagePath) {\n const packagesPath = path.join(atom.getConfigDirPath(), \"packages\", path.sep)\n if (packagePath.indexOf(packagesPath) === 0) {\n return true\n }\n\n const devPackagesPath = path.join(atom.getConfigDirPath(), \"dev\", \"packages\", path.sep)\n\n return packagePath.indexOf(devPackagesPath) === 0\n}\n\nfunction runCommand(command, args, exit, options = {}) {\n return new BufferedProcess({ command, args, exit, options })\n}\n"],"names":[],"version":3,"file":"minimap-plugin-generator-element.a1e4649c.js.map"} \ No newline at end of file diff --git a/dist/minimap-plugin-generator-element.f5282bf9.js b/dist/minimap-plugin-generator-element.f5282bf9.js new file mode 100644 index 00000000..67a0fe4f --- /dev/null +++ b/dist/minimap-plugin-generator-element.f5282bf9.js @@ -0,0 +1,5 @@ +var e=require("path"),t=require("fs-plus"),i=require("atom");function a(e){return e&&e.__esModule?e.default:e}var s=globalThis.parcelRequire7d67;(0,s.register)("L6JvT",function(n,o){Object.defineProperty(n.exports,"createMinimapPluginGeneratorElement",{get:()=>h,set:void 0,enumerable:!0,configurable:!0});var r=s("3HMiZ"),l=s("4r3v7"),c=e.resolve(__dirname,"../lib");let d="minimap-plugin-generator";class m extends HTMLElement{static initClass(){this.registerCommands(),(0,l.default)(this,d)}static registerCommands(){atom.commands.add("minimap-plugin-generator",{"core:confirm"(){this.confirm()},"core:cancel"(){this.detach()}})}createdCallback(){this.previouslyFocusedElement=null,this.mode=null,this.modal=document.createElement("atom-panel"),this.modal.classList.add("minimap-plugin-generator"),this.modal.classList.add("modal"),this.modal.classList.add("overlay"),this.modal.classList.add("from-top"),this.editor=atom.workspace.buildTextEditor({mini:!0}),this.editorElement=atom.views.getView(this.editor),this.error=document.createElement("div"),this.error.classList.add("error"),this.message=document.createElement("div"),this.message.classList.add("message"),this.modal.appendChild(this.editorElement),this.modal.appendChild(this.error),this.modal.appendChild(this.message),this.appendChild(this.modal)}connectedCallback(){this.previouslyFocusedElement=document.activeElement,this.message.textContent="Enter plugin path",this.setPathText("my-minimap-plugin"),this.editorElement.focus()}attach(){atom.views.getView(atom.workspace).appendChild(this)}setPathText(i,s){s||(s=[0,i.length]);let n=atom.config.get("core.projectHome")||process.env.ATOM_REPOS_HOME||a(e).join((0,t.getHomeDirectory)(),"github");this.editor.setText(a(e).join(n,i));let o=this.editor.getText().length-i.length;this.editor.setSelectedBufferRange([[0,o+s[0]],[0,o+s[1]]])}detach(){this.parentNode&&(this.previouslyFocusedElement&&this.previouslyFocusedElement.focus(),this.parentNode.removeChild(this))}confirm(){this.validPackagePath()&&(this.removeChild(this.modal),this.message.innerHTML=` + + Generate plugin at ${this.getPackagePath()} + `,this.createPackageFiles(()=>{let e=this.getPackagePath();atom.open({pathsToOpen:[e],devMode:atom.config.get("minimap.createPluginInDevMode")}),this.message.innerHTML='Plugin successfully generated, opening it now...',setTimeout(()=>{this.detach()},2e3)}))}getPackagePath(){let t=this.editor.getText(),i=(0,r.dasherize)(a(e).basename(t));return a(e).join(a(e).dirname(t),i)}validPackagePath(){return!(0,t.existsSync)(this.getPackagePath())||(this.error.textContent=`Path already exists at '${this.getPackagePath()}'`,this.error.style.display="block",!1)}initPackage(t,i){let s=a(e).resolve(c,a(e).join("..","templates",`plugin-${this.template}`));p(atom.packages.getApmPath(),["init","-p",`${t}`,"--template",s],i)}createPackageFiles(t){let i=this.getPackagePath();!function(t){let i=a(e).join(atom.getConfigDirPath(),"packages",a(e).sep);if(0===t.indexOf(i))return!0;let s=a(e).join(atom.getConfigDirPath(),"dev","packages",a(e).sep);return 0===t.indexOf(s)}(i)?this.initPackage(i,()=>{!function(e,t){let i=["link"];atom.config.get("minimap.createPluginInDevMode")&&i.push("--dev"),i.push(e.toString()),p(atom.packages.getApmPath(),i,t)}(i,()=>{g(i,t)})}):this.initPackage(i,()=>{g(i,t)})}}function h(){let e=document.createElement(d);return e.createdCallback(),e}function g(e,t){p(atom.packages.getApmPath(),["install"],t,{cwd:e})}function p(e,t,a,s={}){return new i.BufferedProcess({command:e,args:t,exit:a,options:s})}m.initClass()}); +//# sourceMappingURL=minimap-plugin-generator-element.f5282bf9.js.map diff --git a/dist/minimap-plugin-generator-element.f5282bf9.js.map b/dist/minimap-plugin-generator-element.f5282bf9.js.map new file mode 100644 index 00000000..c1427ac3 --- /dev/null +++ b/dist/minimap-plugin-generator-element.f5282bf9.js.map @@ -0,0 +1 @@ +{"mappings":"A,I,E,Q,Q,E,Q,W,E,Q,Q,S,E,C,E,O,G,E,U,C,E,O,C,C,C,I,E,A,W,iB,C,A,C,E,E,Q,A,E,Q,S,C,C,C,E,O,c,C,E,O,C,sC,C,I,I,E,I,K,E,W,C,E,a,C,C,G,I,E,E,S,E,E,S,E,E,O,C,U,UCQA,IAAM,EAAW,0BAGjB,OAAM,UAAsC,YAC1C,OAAO,WAAY,CACjB,IAAI,CAAC,gBA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AsC,IAAtC,EAAY,OAAO,CAAC,GACtB,MAAO,CAAA,EAGT,IAAM,EAAkB,AAAA,AAAA,EAAA,GAAK,IAAI,CAAC,KAAK,gBAAgB,GAAI,MAAO,WAAY,AAAA,EAAA,GAAK,GAAG,EAEtF,OAAO,AAAyC,IAAzC,EAAY,OAAO,CAAC,EAC7B,EAnD0B,GAKpB,IAAI,CAAC,WAAW,CAAC,EAAa,MAC5B,AAgBR,SAAqB,CAAW,CAAE,CAAQ,EACxC,IAAM,EAAO,CAAC,OAAO,CACjB,KAAK,MAAM,CAAC,GAAG,CAAC,kCAClB,EAAK,IAAI,CAAC,SAEZ,EAAK,IAAI,CAAC,EAAY,QAAQ,IAE9B,EAAW,KAAK,QAAQ,CAAC,UAAU,GAAI,EAAM,EAC/C,EAxBoB,EAAa,KACvB,EAAe,EAAa,EAC9B,EACF,GARA,IAAI,CAAC,WAAW,CAAC,EAAa,KAC5B,EAAe,EAAa,EAC9B,EAQJ,CACF,CAIO,SAAS,IACd,IAAM,EAAU,SAAS,aAAa,CAAC,GAEvC,OADA,EAAQ,eAAe,GAChB,CACT,CAYA,SAAS,EAAe,CAAW,CAAE,CAAQ,EAG3C,EAAW,KAAK,QAAQ,CAAC,UAAU,GAFtB,CAAC,UAAU,CAEqB,EAAU,CAAE,IAAK,CAAY,EAC5E,CAiBA,SAAS,EAAW,CAAO,CAAE,CAAI,CAAE,CAAI,CAAE,EAAU,CAAC,CAAC,EACnD,OAAO,IAAI,EAAA,eAAc,CAAE,CAAE,QAAA,EAAS,KAAA,EAAM,KAAA,EAAM,QAAA,CAAQ,EAC5D,CAzCA,EAA8B,SAAS,E","sources":["","lib/minimap-plugin-generator-element.js"],"sourcesContent":["var $LtHpu$path = require(\"path\");\nvar $LtHpu$fsplus = require(\"fs-plus\");\nvar $LtHpu$atom = require(\"atom\");\n\n\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\n var $parcel$global = globalThis;\n var parcelRequire = $parcel$global[\"parcelRequire7d67\"];\nvar parcelRegister = parcelRequire.register;\nparcelRegister(\"L6JvT\", function(module, exports) {\n\n$parcel$export(module.exports, \"createMinimapPluginGeneratorElement\", () => $08d99cf3c095c2ab$export$95d70a3925bf2f0c);\n\nvar $3HMiZ = parcelRequire(\"3HMiZ\");\n\n\n\n\nvar $4r3v7 = parcelRequire(\"4r3v7\");\n\nvar $08d99cf3c095c2ab$var$$parcel$__dirname = $LtHpu$path.resolve(__dirname, \"../lib\");\n\"use strict\";\nconst $08d99cf3c095c2ab$var$TAG_NAME = \"minimap-plugin-generator\";\n/** @access private */ class $08d99cf3c095c2ab$var$MinimapPluginGeneratorElement extends HTMLElement {\n static initClass() {\n this.registerCommands();\n (0, $4r3v7.default)(this, $08d99cf3c095c2ab$var$TAG_NAME);\n }\n static registerCommands() {\n atom.commands.add(\"minimap-plugin-generator\", {\n \"core:confirm\" () {\n this.confirm();\n },\n \"core:cancel\" () {\n this.detach();\n }\n });\n }\n createdCallback() {\n this.previouslyFocusedElement = null;\n this.mode = null;\n this.modal = document.createElement(\"atom-panel\");\n this.modal.classList.add(\"minimap-plugin-generator\");\n this.modal.classList.add(\"modal\");\n this.modal.classList.add(\"overlay\");\n this.modal.classList.add(\"from-top\");\n this.editor = atom.workspace.buildTextEditor({\n mini: true\n });\n this.editorElement = atom.views.getView(this.editor);\n this.error = document.createElement(\"div\");\n this.error.classList.add(\"error\");\n this.message = document.createElement(\"div\");\n this.message.classList.add(\"message\");\n this.modal.appendChild(this.editorElement);\n this.modal.appendChild(this.error);\n this.modal.appendChild(this.message);\n this.appendChild(this.modal);\n }\n connectedCallback() {\n this.previouslyFocusedElement = document.activeElement;\n this.message.textContent = \"Enter plugin path\";\n this.setPathText(\"my-minimap-plugin\");\n this.editorElement.focus();\n }\n attach() {\n atom.views.getView(atom.workspace).appendChild(this);\n }\n setPathText(placeholderName, rangeToSelect) {\n if (!rangeToSelect) rangeToSelect = [\n 0,\n placeholderName.length\n ];\n const packagesDirectory = $08d99cf3c095c2ab$var$getPackagesDirectory();\n this.editor.setText((0, ($parcel$interopDefault($LtHpu$path))).join(packagesDirectory, placeholderName));\n const pathLength = this.editor.getText().length;\n const endOfDirectoryIndex = pathLength - placeholderName.length;\n this.editor.setSelectedBufferRange([\n [\n 0,\n endOfDirectoryIndex + rangeToSelect[0]\n ],\n [\n 0,\n endOfDirectoryIndex + rangeToSelect[1]\n ]\n ]);\n }\n detach() {\n if (!this.parentNode) return;\n if (this.previouslyFocusedElement) this.previouslyFocusedElement.focus();\n this.parentNode.removeChild(this);\n }\n confirm() {\n if (this.validPackagePath()) {\n this.removeChild(this.modal);\n this.message.innerHTML = `\n \n Generate plugin at ${this.getPackagePath()}\n `;\n this.createPackageFiles(()=>{\n const packagePath = this.getPackagePath();\n atom.open({\n pathsToOpen: [\n packagePath\n ],\n devMode: atom.config.get(\"minimap.createPluginInDevMode\")\n });\n this.message.innerHTML = 'Plugin successfully generated, opening it now...';\n setTimeout(()=>{\n this.detach();\n }, 2000);\n });\n }\n }\n getPackagePath() {\n const packagePath = this.editor.getText();\n const packageName = (0, $3HMiZ.dasherize)((0, ($parcel$interopDefault($LtHpu$path))).basename(packagePath));\n return (0, ($parcel$interopDefault($LtHpu$path))).join((0, ($parcel$interopDefault($LtHpu$path))).dirname(packagePath), packageName);\n }\n validPackagePath() {\n if ((0, $LtHpu$fsplus.existsSync)(this.getPackagePath())) {\n this.error.textContent = `Path already exists at '${this.getPackagePath()}'`;\n this.error.style.display = \"block\";\n return false;\n } else return true;\n }\n initPackage(packagePath, callback) {\n const templatePath = (0, ($parcel$interopDefault($LtHpu$path))).resolve($08d99cf3c095c2ab$var$$parcel$__dirname, (0, ($parcel$interopDefault($LtHpu$path))).join(\"..\", \"templates\", `plugin-${this.template}`));\n $08d99cf3c095c2ab$var$runCommand(atom.packages.getApmPath(), [\n \"init\",\n \"-p\",\n `${packagePath}`,\n \"--template\",\n templatePath\n ], callback);\n }\n createPackageFiles(callback) {\n const packagePath = this.getPackagePath();\n if ($08d99cf3c095c2ab$var$isStoredInDotAtom(packagePath)) this.initPackage(packagePath, ()=>{\n $08d99cf3c095c2ab$var$installPackage(packagePath, callback);\n });\n else this.initPackage(packagePath, ()=>{\n $08d99cf3c095c2ab$var$linkPackage(packagePath, ()=>{\n $08d99cf3c095c2ab$var$installPackage(packagePath, callback);\n });\n });\n }\n}\n$08d99cf3c095c2ab$var$MinimapPluginGeneratorElement.initClass();\nfunction $08d99cf3c095c2ab$export$95d70a3925bf2f0c() {\n const element = document.createElement($08d99cf3c095c2ab$var$TAG_NAME);\n element.createdCallback();\n return element;\n}\nfunction $08d99cf3c095c2ab$var$linkPackage(packagePath, callback) {\n const args = [\n \"link\"\n ];\n if (atom.config.get(\"minimap.createPluginInDevMode\")) args.push(\"--dev\");\n args.push(packagePath.toString());\n $08d99cf3c095c2ab$var$runCommand(atom.packages.getApmPath(), args, callback);\n}\nfunction $08d99cf3c095c2ab$var$installPackage(packagePath, callback) {\n const args = [\n \"install\"\n ];\n $08d99cf3c095c2ab$var$runCommand(atom.packages.getApmPath(), args, callback, {\n cwd: packagePath\n });\n}\nfunction $08d99cf3c095c2ab$var$getPackagesDirectory() {\n return atom.config.get(\"core.projectHome\") || process.env.ATOM_REPOS_HOME || (0, ($parcel$interopDefault($LtHpu$path))).join((0, $LtHpu$fsplus.getHomeDirectory)(), \"github\");\n}\nfunction $08d99cf3c095c2ab$var$isStoredInDotAtom(packagePath) {\n const packagesPath = (0, ($parcel$interopDefault($LtHpu$path))).join(atom.getConfigDirPath(), \"packages\", (0, ($parcel$interopDefault($LtHpu$path))).sep);\n if (packagePath.indexOf(packagesPath) === 0) return true;\n const devPackagesPath = (0, ($parcel$interopDefault($LtHpu$path))).join(atom.getConfigDirPath(), \"dev\", \"packages\", (0, ($parcel$interopDefault($LtHpu$path))).sep);\n return packagePath.indexOf(devPackagesPath) === 0;\n}\nfunction $08d99cf3c095c2ab$var$runCommand(command, args, exit, options = {}) {\n return new (0, $LtHpu$atom.BufferedProcess)({\n command: command,\n args: args,\n exit: exit,\n options: options\n });\n}\n\n});\n\n\n//# sourceMappingURL=minimap-plugin-generator-element.f5282bf9.js.map\n","\"use strict\"\n\nimport { dasherize } from \"./deps/underscore-plus\"\nimport { getHomeDirectory, existsSync } from \"fs-plus\"\nimport path from \"path\"\nimport { BufferedProcess } from \"atom\"\nimport element from \"./decorators/element\"\n\nconst TAG_NAME = \"minimap-plugin-generator\"\n\n/** @access private */\nclass MinimapPluginGeneratorElement extends HTMLElement {\n static initClass() {\n this.registerCommands()\n element(this, TAG_NAME)\n }\n\n static registerCommands() {\n atom.commands.add(\"minimap-plugin-generator\", {\n \"core:confirm\"() {\n this.confirm()\n },\n \"core:cancel\"() {\n this.detach()\n },\n })\n }\n\n createdCallback() {\n this.previouslyFocusedElement = null\n this.mode = null\n\n this.modal = document.createElement(\"atom-panel\")\n\n this.modal.classList.add(\"minimap-plugin-generator\")\n this.modal.classList.add(\"modal\")\n this.modal.classList.add(\"overlay\")\n this.modal.classList.add(\"from-top\")\n\n this.editor = atom.workspace.buildTextEditor({ mini: true })\n this.editorElement = atom.views.getView(this.editor)\n\n this.error = document.createElement(\"div\")\n this.error.classList.add(\"error\")\n\n this.message = document.createElement(\"div\")\n this.message.classList.add(\"message\")\n\n this.modal.appendChild(this.editorElement)\n this.modal.appendChild(this.error)\n this.modal.appendChild(this.message)\n\n this.appendChild(this.modal)\n }\n\n connectedCallback() {\n this.previouslyFocusedElement = document.activeElement\n this.message.textContent = \"Enter plugin path\"\n this.setPathText(\"my-minimap-plugin\")\n this.editorElement.focus()\n }\n\n attach() {\n atom.views.getView(atom.workspace).appendChild(this)\n }\n\n setPathText(placeholderName, rangeToSelect) {\n if (!rangeToSelect) {\n rangeToSelect = [0, placeholderName.length]\n }\n\n const packagesDirectory = getPackagesDirectory()\n\n this.editor.setText(path.join(packagesDirectory, placeholderName))\n\n const pathLength = this.editor.getText().length\n const endOfDirectoryIndex = pathLength - placeholderName.length\n\n this.editor.setSelectedBufferRange([\n [0, endOfDirectoryIndex + rangeToSelect[0]],\n [0, endOfDirectoryIndex + rangeToSelect[1]],\n ])\n }\n\n detach() {\n if (!this.parentNode) {\n return\n }\n\n if (this.previouslyFocusedElement) {\n this.previouslyFocusedElement.focus()\n }\n\n this.parentNode.removeChild(this)\n }\n\n confirm() {\n if (this.validPackagePath()) {\n this.removeChild(this.modal)\n this.message.innerHTML = `\n \n Generate plugin at ${this.getPackagePath()}\n `\n\n this.createPackageFiles(() => {\n const packagePath = this.getPackagePath()\n atom.open({ pathsToOpen: [packagePath], devMode: atom.config.get(\"minimap.createPluginInDevMode\") })\n\n this.message.innerHTML = 'Plugin successfully generated, opening it now...'\n\n setTimeout(() => {\n this.detach()\n }, 2000)\n })\n }\n }\n\n getPackagePath() {\n const packagePath = this.editor.getText()\n const packageName = dasherize(path.basename(packagePath))\n\n return path.join(path.dirname(packagePath), packageName)\n }\n\n validPackagePath() {\n if (existsSync(this.getPackagePath())) {\n this.error.textContent = `Path already exists at '${this.getPackagePath()}'`\n this.error.style.display = \"block\"\n return false\n } else {\n return true\n }\n }\n\n initPackage(packagePath, callback) {\n const templatePath = path.resolve(__dirname, path.join(\"..\", \"templates\", `plugin-${this.template}`))\n runCommand(atom.packages.getApmPath(), [\"init\", \"-p\", `${packagePath}`, \"--template\", templatePath], callback)\n }\n\n createPackageFiles(callback) {\n const packagePath = this.getPackagePath()\n\n if (isStoredInDotAtom(packagePath)) {\n this.initPackage(packagePath, () => {\n installPackage(packagePath, callback)\n })\n } else {\n this.initPackage(packagePath, () => {\n linkPackage(packagePath, () => {\n installPackage(packagePath, callback)\n })\n })\n }\n }\n}\n\nMinimapPluginGeneratorElement.initClass()\n\nexport function createMinimapPluginGeneratorElement() {\n const element = document.createElement(TAG_NAME)\n element.createdCallback()\n return element\n}\n\nfunction linkPackage(packagePath, callback) {\n const args = [\"link\"]\n if (atom.config.get(\"minimap.createPluginInDevMode\")) {\n args.push(\"--dev\")\n }\n args.push(packagePath.toString())\n\n runCommand(atom.packages.getApmPath(), args, callback)\n}\n\nfunction installPackage(packagePath, callback) {\n const args = [\"install\"]\n\n runCommand(atom.packages.getApmPath(), args, callback, { cwd: packagePath })\n}\n\nfunction getPackagesDirectory() {\n return atom.config.get(\"core.projectHome\") || process.env.ATOM_REPOS_HOME || path.join(getHomeDirectory(), \"github\")\n}\n\nfunction isStoredInDotAtom(packagePath) {\n const packagesPath = path.join(atom.getConfigDirPath(), \"packages\", path.sep)\n if (packagePath.indexOf(packagesPath) === 0) {\n return true\n }\n\n const devPackagesPath = path.join(atom.getConfigDirPath(), \"dev\", \"packages\", path.sep)\n\n return packagePath.indexOf(devPackagesPath) === 0\n}\n\nfunction runCommand(command, args, exit, options = {}) {\n return new BufferedProcess({ command, args, exit, options })\n}\n"],"names":["$LtHpu$path","require","$LtHpu$fsplus","$LtHpu$atom","$parcel$interopDefault","a","__esModule","default","parcelRequire","$parcel$global","globalThis","parcelRegister","register","module","exports","Object","defineProperty","get","$08d99cf3c095c2ab$export$95d70a3925bf2f0c","set","s","enumerable","configurable","$3HMiZ","$4r3v7","$08d99cf3c095c2ab$var$$parcel$__dirname","resolve","__dirname","$08d99cf3c095c2ab$var$TAG_NAME","$08d99cf3c095c2ab$var$MinimapPluginGeneratorElement","HTMLElement","initClass","registerCommands","atom","commands","add","confirm","detach","createdCallback","previouslyFocusedElement","mode","modal","document","createElement","classList","editor","workspace","buildTextEditor","mini","editorElement","views","getView","error","message","appendChild","connectedCallback","activeElement","textContent","setPathText","focus","attach","placeholderName","rangeToSelect","length","packagesDirectory","config","process","env","ATOM_REPOS_HOME","join","getHomeDirectory","setText","endOfDirectoryIndex","pathLength","getText","setSelectedBufferRange","parentNode","removeChild","validPackagePath","innerHTML","getPackagePath","createPackageFiles","packagePath","open","pathsToOpen","devMode","setTimeout","packageName","dasherize","basename","dirname","existsSync","style","display","initPackage","callback","templatePath","template","$08d99cf3c095c2ab$var$runCommand","packages","getApmPath","$08d99cf3c095c2ab$var$isStoredInDotAtom","packagesPath","getConfigDirPath","sep","indexOf","devPackagesPath","$08d99cf3c095c2ab$var$linkPackage","args","push","toString","$08d99cf3c095c2ab$var$installPackage","element","cwd","command","exit","options","BufferedProcess"],"version":3,"file":"minimap-plugin-generator-element.f5282bf9.js.map"} \ No newline at end of file diff --git a/package.json b/package.json index 887b1cfc..ff4e7ba2 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,8 @@ "fs-plus": false }, "outputFormat": "commonjs", - "isLibrary": true + "isLibrary": true, + "optimize": true } }, "viewProviders": [