diff --git a/dist/index.js b/dist/index.js index 3fa100a..cc62641 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,2 +1,2 @@ -var e,t=require("atom").Disposable,n=require("assert"),i=(e=require("disposable-event"))&&e.__esModule?e.default:e;function s(e,t,n,i){Object.defineProperty(e,t,{get:n,set:i,enumerable:!0,configurable:!0})}s(module.exports,"consumeHighlightIntentions",(()=>Re)),s(module.exports,"activate",(()=>je)),s(module.exports,"deactivate",(()=>Fe)),s(module.exports,"consumeListIntentions",(()=>Ve));var o={};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositeDisposable=o.Disposable=o.Emitter=void 0;var r={};Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var l=function(){function e(e,t){for(var n=0;n1?i-1:0),o=1;o{if(this.active&&"list"===this.active.type)return;const t=new o.CompositeDisposable;this.processListShow(t),e.originalEvent&&"keydown"===e.originalEvent.type&&setImmediate((()=>{let e=!0;t.add(atom.keymaps.onDidMatchBinding((function({binding:t}){e=e&&k.has(t.command)}))),t.add(i(document.body,"keyup",(()=>{e||(t.dispose(),this.processListHide())})))}))},"intentions:hide":()=>{this.processListHide()},"intentions:highlight":e=>{if(this.active&&"highlight"===this.active.type)return;e.abortKeyBinding();const t=new o.CompositeDisposable;if(this.processHighlightsShow(t),!e.originalEvent||"keydown"!==e.originalEvent.type)return;const{keyCode:n}=e.originalEvent;t.add(i(document.body,"keyup",(e=>{e.keyCode===n&&(t.dispose(),this.processHighlightsHide())})))}})),this.subscriptions.add(atom.commands.add("atom-text-editor.intentions-list:not([mini])",{"intentions:confirm":this.stoppingEvent((()=>{this.processListConfirm()})),"core:move-up":this.stoppingEvent((()=>{this.processListMove("up")})),"core:move-down":this.stoppingEvent((()=>{this.processListMove("down")})),"core:page-up":this.stoppingEvent((()=>{this.processListMove("page-up")})),"core:page-down":this.stoppingEvent((()=>{this.processListMove("page-down")})),"core:move-to-top":this.stoppingEvent((()=>{this.processListMove("move-to-top")})),"core:move-to-bottom":this.stoppingEvent((()=>{this.processListMove("move-to-bottom")}))}))}stoppingEvent(e){return t=>{t.stopImmediatePropagation(),e.call(this,t)}}async processListShow(e=null){if(this.active)switch(this.active.type){case"list":throw new Error("Already active");case"highlight":this.processHighlightsHide()}const t=atom.workspace.getActiveTextEditor();if(!t)return;const n=atom.views.getView(t),s=new o.CompositeDisposable;e&&s.add(e),await this.shouldListShow(t)&&(this.active={type:"list",subscriptions:s},s.add((()=>{this.active&&"list"===this.active.type&&this.active.subscriptions===s&&(this.processListHide(),this.active=null),n.classList.remove("intentions-list")})),s.add(i(document.body,"mouseup",(function(){setTimeout((function(){s.dispose()}),10)}))),n.classList.add("intentions-list"))}processListHide(){if(!this.active||"list"!==this.active.type)return;const{subscriptions:e}=this.active;this.active=null,e.dispose(),this.emitter.emit("list-hide")}processListMove(e){this.active&&"list"===this.active.type&&this.emitter.emit("list-move",e)}processListConfirm(){this.active&&"list"===this.active.type&&this.emitter.emit("list-confirm")}async processHighlightsShow(e=null){if(this.active)switch(this.active.type){case"highlight":throw new Error("Already active");case"list":this.processListHide()}const t=atom.workspace.getActiveTextEditor();if(!t)return;const n=atom.views.getView(t),i=new o.CompositeDisposable,s=await this.shouldHighlightsShow(t);e&&i.add(e),s&&(this.active={type:"highlight",subscriptions:i},i.add((()=>{this.active&&"highlight"===this.active.type&&this.active.subscriptions===i&&this.processHighlightsHide(),n.classList.remove("intentions-highlights")})),n.classList.add("intentions-highlights"))}processHighlightsHide(){if(!this.active||"highlight"!==this.active.type)return;const{subscriptions:e}=this.active;this.active=null,e.dispose(),this.emitter.emit("highlights-hide")}async shouldListShow(e){const t={show:!1,editor:e};return await this.emitter.emit("list-show",t),t.show}async shouldHighlightsShow(e){const t={show:!1,editor:e};return await this.emitter.emit("highlights-show",t),t.show}onListShow(e){return this.emitter.on("list-show",(function(t){return e(t.editor).then((function(e){t.show=Boolean(e)}))}))}onListHide(e){return this.emitter.on("list-hide",e)}onListMove(e){return this.emitter.on("list-move",e)}onListConfirm(e){return this.emitter.on("list-confirm",e)}onHighlightsShow(e){return this.emitter.on("highlights-show",(function(t){return e(t.editor).then((function(e){t.show=Boolean(e)}))}))}onHighlightsHide(e){return this.emitter.on("highlights-hide",e)}dispose(){this.subscriptions.dispose(),this.active&&this.active.subscriptions.dispose()}}const E={};function L(e){E.context=e}const A=(e,t)=>e===t;let H=null,M=re;const _={},D={owned:null,cleanups:null,context:null,owner:null},[I,B]=q(!1);var T=null,O=null;let $=null,N=null,j=null,F=null,V=0;function R(e,t){t&&(T=t);const n=O,i=T,s=0===e.length?D:{owned:null,cleanups:null,context:null,owner:i,attached:!!t};let o;T=s,O=null;try{oe((()=>o=e((()=>ce(s)))),!0)}finally{O=n,T=i}return o}function q(e,t=!0,n){const i={value:e,observers:null,observerSlots:null,pending:_,comparator:t?"function"==typeof t?t:A:void 0};return[Z.bind(i),ee.bind(i)]}function G(e,t){te(ie(e,t,!0))}function z(e,t){te(ie(e,t,!1))}function K(e,t,n=!0){const i=ie(e,t,!0);return i.pending=_,i.observers=null,i.observerSlots=null,i.state=0,i.comparator=n?"function"==typeof n?n:A:void 0,te(i),Z.bind(i)}function J(e){if($)return e();const t=$=[],n=e();return $=null,oe((()=>{for(let e=0;e{let o;if(s){o=[],i||(i=[]);for(let e=0;et(o,i,e)));return i=o,r}}function W(e){return null===T||(null===T.cleanups?T.cleanups=[e]:T.cleanups.push(e)),e}function X(e){const t=Symbol("context");return{id:t,Provider:pe(t),defaultValue:e}}function Y(e){const t=K(e);return K((()=>fe(t())))}function Z(){if(this.state&&this.sources){const e=N;N=null,1===this.state?te(this):le(this),N=e}if(O){const e=this.observers?this.observers.length:0;O.sources?(O.sources.push(this),O.sourceSlots.push(e)):(O.sources=[this],O.sourceSlots=[e]),this.observers?(this.observers.push(O),this.observerSlots.push(O.sources.length-1)):(this.observers=[O],this.observerSlots=[O.sources.length-1])}return F&&F.running&&F.sources.has(this)?this.tValue:this.value}function ee(e,t){if(this.comparator)if(F&&F.running&&F.sources.has(this)){if(this.comparator(this.tValue,e))return e}else if(this.comparator(this.value,e))return e;return $?(this.pending===_&&$.push(this),this.pending=e,e):(F?((F.running||!t&&F.sources.has(this))&&(F.sources.add(this),this.tValue=e),F.running||(this.value=e)):this.value=e,!this.observers||N&&!this.observers.length||oe((()=>{for(let e=0;e1e6)throw N=[],new Error("Potential Infinite Loop Detected.")}),!1),e)}function te(e){if(!e.fn)return;ce(e);const t=T,n=O,i=V;O=T=e,ne(e,e.value,i),F&&!F.running&&F.sources.has(e)&&(F.running=!0,ne(e,e.tValue,i),F.running=!1),O=n,T=t}function ne(e,t,n){let i;try{i=e.fn(t)}catch(e){de(e)}(!e.updatedAt||e.updatedAt<=n)&&(e.observers&&e.observers.length?ee.call(e,i,!0):F&&F.running&&e.pure?(F.sources.add(e),e.tValue=i):e.value=i,e.updatedAt=n)}function ie(e,t,n){const i={fn:e,state:1,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:T,context:null,pure:n};return null===T||T!==D&&(F&&F.running&&T.pure?T.tOwned?T.tOwned.push(i):T.tOwned=[i]:T.owned?T.owned.push(i):T.owned=[i]),i}function se(e){let t,n=1===e.state&&e;if(e.suspense&&Q(e.suspense.inFallback))return e.suspense.effects.push(e);const i=F&&F.running;for(;(e.fn||i&&e.attached)&&(e=e.owner);){if(i&&F.disposed.has(e))return;2===e.state?t=e:1===e.state&&(n=e,t=void 0)}if(t){const s=N;if(N=null,le(t),N=s,!n||1!==n.state)return;if(i)for(e=n;(e.fn||e.attached)&&(e=e.owner);)if(F.disposed.has(e))return}n&&te(n)}function oe(e,t){if(N)return e();let n=!1;t||(N=[]),j?n=!0:j=[],V++;try{e()}catch(e){de(e)}finally{!function(e){N&&(re(N),N=null);if(e)return;let t;if(F&&F.running){if(F.promises.size)return F.running=!1,F.effects.push.apply(F.effects,j),j=null,void B(!0);const e=F.sources;t=F.cb,F=null,J((()=>{e.forEach((e=>{if(e.value=e.tValue,e.owned)for(let t=0,n=e.owned.length;t{M(j),j=null})):j=null;t&&t.forEach((e=>e()))}(n)}}function re(e){for(let t=0;tt(e)))}function he(e,t){return e&&(e.context&&e.context[t]||e.owner&&he(e.owner,t))}function fe(e){if("function"==typeof e&&!e.length)return fe(e());if(Array.isArray(e)){const t=[];for(let n=0;n(T.context={[e]:t.value},Y((()=>t.children)))))}}Symbol("state-raw"),Symbol("state-node"),Symbol("state-proxy"),Symbol("state-name");const ve=Symbol("fallback");function ge(e,t){if(E.context){const n=E.context;L({...E.context,id:`${E.context.id}${E.context.count++}.`,count:0});const i=Q((()=>e(t)));return L(n),i}return Q((()=>e(t)))}function me(e){const t="fallback"in e&&{fallback:()=>e.fallback};return K(function(e,t,n={}){let i=[],s=[],o=[],r=0,l=t.length>1?[]:null,a=T;return W((()=>{for(let e=0,t=o.length;e{let c,u,d=e()||[];function h(e){if(o[u]=e,l){const[e,n]=q(u);return l[u]=n,t(d[u],e)}return t(d[u])}return Q((()=>{let e,t,f,p,v,g,m,y,b,w=d.length;if(0===w){if(0!==r){for(c=0;c(o[0]=e,n.fallback())),a),r=1)}else if(0===r){for(u=0;u=g&&y>=g&&i[m]===d[y];m--,y--)f[y]=s[m],p[y]=o[m],l&&(v[y]=l[m]);for(e=new Map,t=new Array(y+1),u=y;u>=g;u--)b=d[u],c=e.get(b),t[u]=void 0===c?-1:c,e.set(b,u);for(c=g;c<=m;c++)b=i[c],u=e.get(b),void 0!==u&&-1!==u?(f[u]=s[c],p[u]=o[c],l&&(v[u]=l[c]),u=t[u],e.set(b,u)):o[c]();for(u=g;ue.each),e.children,t||void 0),void 0,!1)}X();new Set(["className","indeterminate","value","allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","truespeed"]),new Set(["innerHTML","textContent","innerText","children"]),new Set(["beforeinput","click","dblclick","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]);function ye(e,t,n){let i=n.length,s=t.length,o=i,r=0,l=0,a=t[s-1].nextSibling,c=null;for(;ri-l){const s=t[r];for(;l{i=s,Pe(t,e(),t.firstChild?null:void 0,n)})),()=>{i(),t.textContent=""}}function Ce(e,t,n){const i=document.createElement("template");if(i.innerHTML=e,t&&i.innerHTML.split("<").length-1!==t)throw`Template html does not match input:\n${i.innerHTML}\n\n${e}`;let s=i.content.firstChild;return n&&(s=s.firstChild),s}function Se(e){const t=document[be]||(document[be]=new Set);for(let n=0,i=e.length;nxe(e,t(),i,n)),i)}function ke(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get:()=>n});null!==n;){const i=n[t];if(i){const s=n[`${t}Data`];if(void 0!==s?i(s,e):i(e),e.cancelBubble)return}n=n.host&&n.host!==n&&n.host instanceof Node?n.host:n.parentNode}}function xe(e,t,n,i,s){for(;"function"==typeof n;)n=n();if(t===n)return n;const o=typeof t,r=void 0!==i;if(e=r&&n[0]&&n[0].parentNode||e,"string"===o||"number"===o)if("number"===o&&(t=t.toString()),r){let s=n[0];s&&3===s.nodeType?s.data=t:s=document.createTextNode(t),n=Ae(e,n,i,s)}else n=""!==n&&"string"==typeof n?e.firstChild.data=t:e.textContent=t;else if(null==t||"boolean"===o){if(E.context)return n;n=Ae(e,n,i)}else{if("function"===o)return z((()=>{let s=t();for(;"function"==typeof s;)s=s();n=xe(e,s,n,i)})),()=>n;if(Array.isArray(t)){const o=[];if(Ee(o,t,s))return z((()=>n=xe(e,o,n,i,!0))),()=>n;if(E.context&&n.length)return n;if(0===o.length){if(n=Ae(e,n,i),r)return n}else Array.isArray(n)?0===n.length?Le(e,o,i):ye(e,n,o):null==n||""===n?Le(e,o):ye(e,r&&n||[e.firstChild],o);n=o}else if(t instanceof Node){if(Array.isArray(n)){if(r)return n=Ae(e,n,i,t);Ae(e,n,null,t)}else null!=n&&""!==n&&e.firstChild?e.replaceChild(t,e.firstChild):e.appendChild(t);n=t}else console.warn("Skipped inserting",t)}return n}function Ee(e,t,n){let i=!1;for(let s=0,o=t.length;s=0;o--){const r=t[o];if(s!==r){const t=r.parentNode===e;i||o?t&&e.removeChild(r):t?e.replaceChild(s,r):e.insertBefore(s,n)}else i=!0}}else e.insertBefore(s,n);return[s]}const He=Ce('
    ',4),Me=Ce("
  1. ",4);function _e(e){const[t,n]=q(-1),i=function(e,t=A){let n=new Map;const i=ie((i=>{const s=e();for(const e of n.keys())if(t(e,s)||void 0!==i&&t(e,i)){const t=n.get(e);for(const e of t.values())e.state=1,e.pure?N.push(e):j.push(e)}return s}),void 0,!0);return te(i),e=>{let s;if(s=O){let t;(t=n.get(e))?t.add(s):n.set(e,t=new Set([s])),W((()=>{t.size>1?t.delete(s):n.delete(e)}))}return t(e,i.value)}}(t),[s,o]=q("move-to-top"),[r,l]=q(!1);function a(t,i){e.selectCallback(t),n(i)}G(U(r,(()=>{if(r()){const n=t();a(e.suggestions[n],n)}}))),G(U(s,(function(){const i=e.suggestions.length,r=t();let l=r;const a=s();"up"===a?l--:"down"===a?l++:"move-to-top"===a?l=0:"move-to-bottom"===a&&(l=i),l%=i,l<0&&(l=i+l),l!==r&&n(l),o(void 0)})));let c="select-list popover-list";e.suggestions.length>7&&(c+=" intentions-scroll");return{component:(()=>{const t=He.cloneNode(!0),n=t.firstChild;return t.className=c,Pe(n,ge(me,{get each(){return e.suggestions},children:(e,t)=>{const n=t();return(()=>{const t=Me.cloneNode(!0),s=t.firstChild;return s.$$click=()=>{a(e,n)},Pe(s,(()=>e.title)),z((o=>{const r=i(n)?"selected":"",l=e.__$sb_intentions_class;return r!==o._v$&&(t.className=o._v$=r),l!==o._v$2&&(s.className=o._v$2=l),o}),{_v$:void 0,_v$2:void 0}),t})()}})),t})(),setMovement:o,setConfirmed:l}}Se(["click"]);class De{constructor(){this.element=document.createElement("div"),this.emitter=new o.Emitter,this.subscriptions=new o.CompositeDisposable,this.subscriptions.add(this.emitter)}activate(e,t){const{component:n,setMovement:i,setConfirmed:s}=_e({suggestions:t,selectCallback:e=>{this.emitter.emit("did-select",e),this.dispose()}});this.setMovement=i,this.setConfirmed=s,we((()=>n),this.element);const o=e.getCursorBufferPosition(),r=e.markBufferRange([o,o],{invalidate:"never"});e.decorateMarker(r,{type:"overlay",item:this.element}),this.subscriptions.add((function(){r.destroy()}))}move(e){this.setMovement?.(e)}select(){this.setConfirmed?.(!0)}onDidSelect(e){return this.emitter.on("did-select",e)}dispose(){this.subscriptions.dispose()}}function Ie(e){let t;if(e&&"object"==typeof e?Array.isArray(e.grammarScopes)?"function"!=typeof e.getIntentions&&(t="Invalid or no getIntentions found on provider"):t="Invalid or no grammarScopes found on provider":t="Invalid provider provided",t)throw console.log("[Intentions] Invalid provider",e),new Error(t)}class Be{constructor(){this.number=0,this.providers=new Set}addProvider(e){this.hasProvider(e)||(Ie(e),this.providers.add(e))}hasProvider(e){return this.providers.has(e)}deleteProvider(e){this.hasProvider(e)&&this.providers.delete(e)}async trigger(e){const t=e.getPath(),n=e.getCursorBufferPosition();if(!t)return[];const i=[...e.scopeDescriptorForBufferPosition(n).getScopesArray()];i.push("*");const s=[];this.providers.forEach((function(t){i.some((e=>t.grammarScopes.includes(e)))&&s.push(new Promise((function(i){i(t.getIntentions({textEditor:e,bufferPosition:n}))})).then((function(e){return atom.inDevMode()&&function(e){if(Array.isArray(e)){const t=e.length;for(let n=0;nt.grammarScopes.includes(e)))&&o.push(new Promise((function(n){n(t.getIntentions({textEditor:e,visibleRange:s}))})).then((function(e){return atom.inDevMode()&&function(e){if(Array.isArray(e)){const t=e.length;for(let n=0;n{const t=await this.providersList.trigger(e);if(!t.length)return!1;const n=new De,i=new o.CompositeDisposable;return n.activate(e,t),n.onDidSelect((function(e){e.selected(),i.dispose()})),i.add(n),i.add((()=>{this.active===i&&(this.active=null)})),i.add(this.commands.onListMove((function(e){n.move(e)}))),i.add(this.commands.onListConfirm((function(){n.select()}))),i.add(this.commands.onListHide((function(){i.dispose()}))),this.active=i,!0})),this.commands.onHighlightsShow((async e=>{const t=await this.providersHighlight.trigger(e);if(!t.length)return!1;const n=this.providersHighlight.paint(e,t),i=new o.CompositeDisposable;return i.add((()=>{this.active===i&&(this.active=null)})),i.add(this.commands.onHighlightsHide((function(){i.dispose()}))),i.add(n),this.active=i,!0}))}activate(){this.commands.activate()}consumeListProvider(e){this.providersList.addProvider(e)}deleteListProvider(e){this.providersList.deleteProvider(e)}consumeHighlightProvider(e){this.providersHighlight.addProvider(e)}deleteHighlightProvider(e){this.providersHighlight.deleteProvider(e)}dispose(){this.subscriptions.dispose(),this.active&&this.active.dispose()}}let Ne;function je(){Ne=new $e,Ne.activate()}function Fe(){Ne?.dispose()}function Ve(e){const n=Array.isArray(e)?e:[e];if(void 0!==Ne)return n.forEach((e=>{Ne.consumeListProvider(e)})),new t((()=>{n.forEach((e=>{Ne.deleteListProvider(e)}))}))}function Re(e){const n=Array.isArray(e)?e:[e];if(void 0!==Ne)return n.forEach((e=>{Ne.consumeHighlightProvider(e)})),new t((()=>{n.forEach((e=>{Ne.deleteHighlightProvider(e)}))}))} +var e,t=require("atom").Disposable,n=require("assert"),i=(e=require("disposable-event"))&&e.__esModule?e.default:e;function s(e,t,n,i){Object.defineProperty(e,t,{get:n,set:i,enumerable:!0,configurable:!0})}s(module.exports,"activate",(()=>je)),s(module.exports,"consumeListIntentions",(()=>Ve)),s(module.exports,"consumeHighlightIntentions",(()=>Re)),s(module.exports,"deactivate",(()=>Fe));var o={};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositeDisposable=o.Disposable=o.Emitter=void 0;var r={};Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var l=function(){function e(e,t){for(var n=0;n1?i-1:0),o=1;o{if(this.active&&"list"===this.active.type)return;const t=new o.CompositeDisposable;this.processListShow(t),e.originalEvent&&"keydown"===e.originalEvent.type&&setImmediate((()=>{let e=!0;t.add(atom.keymaps.onDidMatchBinding((function({binding:t}){e=e&&k.has(t.command)}))),t.add(i(document.body,"keyup",(()=>{e||(t.dispose(),this.processListHide())})))}))},"intentions:hide":()=>{this.processListHide()},"intentions:highlight":e=>{if(this.active&&"highlight"===this.active.type)return;e.abortKeyBinding();const t=new o.CompositeDisposable;if(this.processHighlightsShow(t),!e.originalEvent||"keydown"!==e.originalEvent.type)return;const{keyCode:n}=e.originalEvent;t.add(i(document.body,"keyup",(e=>{e.keyCode===n&&(t.dispose(),this.processHighlightsHide())})))}})),this.subscriptions.add(atom.commands.add("atom-text-editor.intentions-list:not([mini])",{"intentions:confirm":this.stoppingEvent((()=>{this.processListConfirm()})),"core:move-up":this.stoppingEvent((()=>{this.processListMove("up")})),"core:move-down":this.stoppingEvent((()=>{this.processListMove("down")})),"core:page-up":this.stoppingEvent((()=>{this.processListMove("page-up")})),"core:page-down":this.stoppingEvent((()=>{this.processListMove("page-down")})),"core:move-to-top":this.stoppingEvent((()=>{this.processListMove("move-to-top")})),"core:move-to-bottom":this.stoppingEvent((()=>{this.processListMove("move-to-bottom")}))}))}stoppingEvent(e){return t=>{t.stopImmediatePropagation(),e.call(this,t)}}async processListShow(e=null){if(this.active)switch(this.active.type){case"list":throw new Error("Already active");case"highlight":this.processHighlightsHide()}const t=atom.workspace.getActiveTextEditor();if(!t)return;const n=atom.views.getView(t),s=new o.CompositeDisposable;e&&s.add(e),await this.shouldListShow(t)&&(this.active={type:"list",subscriptions:s},s.add((()=>{this.active&&"list"===this.active.type&&this.active.subscriptions===s&&(this.processListHide(),this.active=null),n.classList.remove("intentions-list")})),s.add(i(document.body,"mouseup",(function(){setTimeout((function(){s.dispose()}),10)}))),n.classList.add("intentions-list"))}processListHide(){if(!this.active||"list"!==this.active.type)return;const{subscriptions:e}=this.active;this.active=null,e.dispose(),this.emitter.emit("list-hide")}processListMove(e){this.active&&"list"===this.active.type&&this.emitter.emit("list-move",e)}processListConfirm(){this.active&&"list"===this.active.type&&this.emitter.emit("list-confirm")}async processHighlightsShow(e=null){if(this.active)switch(this.active.type){case"highlight":throw new Error("Already active");case"list":this.processListHide()}const t=atom.workspace.getActiveTextEditor();if(!t)return;const n=atom.views.getView(t),i=new o.CompositeDisposable,s=await this.shouldHighlightsShow(t);e&&i.add(e),s&&(this.active={type:"highlight",subscriptions:i},i.add((()=>{this.active&&"highlight"===this.active.type&&this.active.subscriptions===i&&this.processHighlightsHide(),n.classList.remove("intentions-highlights")})),n.classList.add("intentions-highlights"))}processHighlightsHide(){if(!this.active||"highlight"!==this.active.type)return;const{subscriptions:e}=this.active;this.active=null,e.dispose(),this.emitter.emit("highlights-hide")}async shouldListShow(e){const t={show:!1,editor:e};return await this.emitter.emit("list-show",t),t.show}async shouldHighlightsShow(e){const t={show:!1,editor:e};return await this.emitter.emit("highlights-show",t),t.show}onListShow(e){return this.emitter.on("list-show",(function(t){return e(t.editor).then((function(e){t.show=Boolean(e)}))}))}onListHide(e){return this.emitter.on("list-hide",e)}onListMove(e){return this.emitter.on("list-move",e)}onListConfirm(e){return this.emitter.on("list-confirm",e)}onHighlightsShow(e){return this.emitter.on("highlights-show",(function(t){return e(t.editor).then((function(e){t.show=Boolean(e)}))}))}onHighlightsHide(e){return this.emitter.on("highlights-hide",e)}dispose(){this.subscriptions.dispose(),this.active&&this.active.subscriptions.dispose()}}const E={};function L(e){E.context=e}const A=(e,t)=>e===t;let H=null,M=re;const _={},D={owned:null,cleanups:null,context:null,owner:null},[I,B]=q(!1);var T=null,O=null;let $=null,N=null,j=null,F=null,V=0;function R(e,t){t&&(T=t);const n=O,i=T,s=0===e.length?D:{owned:null,cleanups:null,context:null,owner:i,attached:!!t};let o;T=s,O=null;try{oe((()=>o=e((()=>ce(s)))),!0)}finally{O=n,T=i}return o}function q(e,t=!0,n){const i={value:e,observers:null,observerSlots:null,pending:_,comparator:t?"function"==typeof t?t:A:void 0};return[Z.bind(i),ee.bind(i)]}function G(e,t){te(ie(e,t,!0))}function z(e,t){te(ie(e,t,!1))}function K(e,t,n=!0){const i=ie(e,t,!0);return i.pending=_,i.observers=null,i.observerSlots=null,i.state=0,i.comparator=n?"function"==typeof n?n:A:void 0,te(i),Z.bind(i)}function J(e){if($)return e();const t=$=[],n=e();return $=null,oe((()=>{for(let e=0;e{let o;if(s){o=[],i||(i=[]);for(let e=0;et(o,i,e)));return i=o,r}}function W(e){return null===T||(null===T.cleanups?T.cleanups=[e]:T.cleanups.push(e)),e}function X(e){const t=Symbol("context");return{id:t,Provider:pe(t),defaultValue:e}}function Y(e){const t=K(e);return K((()=>fe(t())))}function Z(){if(this.state&&this.sources){const e=N;N=null,1===this.state?te(this):le(this),N=e}if(O){const e=this.observers?this.observers.length:0;O.sources?(O.sources.push(this),O.sourceSlots.push(e)):(O.sources=[this],O.sourceSlots=[e]),this.observers?(this.observers.push(O),this.observerSlots.push(O.sources.length-1)):(this.observers=[O],this.observerSlots=[O.sources.length-1])}return F&&F.running&&F.sources.has(this)?this.tValue:this.value}function ee(e,t){if(this.comparator)if(F&&F.running&&F.sources.has(this)){if(this.comparator(this.tValue,e))return e}else if(this.comparator(this.value,e))return e;return $?(this.pending===_&&$.push(this),this.pending=e,e):(F?((F.running||!t&&F.sources.has(this))&&(F.sources.add(this),this.tValue=e),F.running||(this.value=e)):this.value=e,!this.observers||N&&!this.observers.length||oe((()=>{for(let e=0;e1e6)throw N=[],new Error("Potential Infinite Loop Detected.")}),!1),e)}function te(e){if(!e.fn)return;ce(e);const t=T,n=O,i=V;O=T=e,ne(e,e.value,i),F&&!F.running&&F.sources.has(e)&&(F.running=!0,ne(e,e.tValue,i),F.running=!1),O=n,T=t}function ne(e,t,n){let i;try{i=e.fn(t)}catch(e){de(e)}(!e.updatedAt||e.updatedAt<=n)&&(e.observers&&e.observers.length?ee.call(e,i,!0):F&&F.running&&e.pure?(F.sources.add(e),e.tValue=i):e.value=i,e.updatedAt=n)}function ie(e,t,n){const i={fn:e,state:1,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:T,context:null,pure:n};return null===T||T!==D&&(F&&F.running&&T.pure?T.tOwned?T.tOwned.push(i):T.tOwned=[i]:T.owned?T.owned.push(i):T.owned=[i]),i}function se(e){let t,n=1===e.state&&e;if(e.suspense&&Q(e.suspense.inFallback))return e.suspense.effects.push(e);const i=F&&F.running;for(;(e.fn||i&&e.attached)&&(e=e.owner);){if(i&&F.disposed.has(e))return;2===e.state?t=e:1===e.state&&(n=e,t=void 0)}if(t){const s=N;if(N=null,le(t),N=s,!n||1!==n.state)return;if(i)for(e=n;(e.fn||e.attached)&&(e=e.owner);)if(F.disposed.has(e))return}n&&te(n)}function oe(e,t){if(N)return e();let n=!1;t||(N=[]),j?n=!0:j=[],V++;try{e()}catch(e){de(e)}finally{!function(e){N&&(re(N),N=null);if(e)return;let t;if(F&&F.running){if(F.promises.size)return F.running=!1,F.effects.push.apply(F.effects,j),j=null,void B(!0);const e=F.sources;t=F.cb,F=null,J((()=>{e.forEach((e=>{if(e.value=e.tValue,e.owned)for(let t=0,n=e.owned.length;t{M(j),j=null})):j=null;t&&t.forEach((e=>e()))}(n)}}function re(e){for(let t=0;tt(e)))}function he(e,t){return e&&(e.context&&e.context[t]||e.owner&&he(e.owner,t))}function fe(e){if("function"==typeof e&&!e.length)return fe(e());if(Array.isArray(e)){const t=[];for(let n=0;n(T.context={[e]:t.value},Y((()=>t.children)))))}}Symbol("state-raw"),Symbol("state-node"),Symbol("state-proxy"),Symbol("state-name");const ve=Symbol("fallback");function ge(e,t){if(E.context){const n=E.context;L({...E.context,id:`${E.context.id}${E.context.count++}.`,count:0});const i=Q((()=>e(t)));return L(n),i}return Q((()=>e(t)))}function me(e){const t="fallback"in e&&{fallback:()=>e.fallback};return K(function(e,t,n={}){let i=[],s=[],o=[],r=0,l=t.length>1?[]:null,a=T;return W((()=>{for(let e=0,t=o.length;e{let c,u,d=e()||[];function h(e){if(o[u]=e,l){const[e,n]=q(u);return l[u]=n,t(d[u],e)}return t(d[u])}return Q((()=>{let e,t,f,p,v,g,m,y,b,w=d.length;if(0===w){if(0!==r){for(c=0;c(o[0]=e,n.fallback())),a),r=1)}else if(0===r){for(u=0;u=g&&y>=g&&i[m]===d[y];m--,y--)f[y]=s[m],p[y]=o[m],l&&(v[y]=l[m]);for(e=new Map,t=new Array(y+1),u=y;u>=g;u--)b=d[u],c=e.get(b),t[u]=void 0===c?-1:c,e.set(b,u);for(c=g;c<=m;c++)b=i[c],u=e.get(b),void 0!==u&&-1!==u?(f[u]=s[c],p[u]=o[c],l&&(v[u]=l[c]),u=t[u],e.set(b,u)):o[c]();for(u=g;ue.each),e.children,t||void 0),void 0,!1)}X();new Set(["className","indeterminate","value","allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","truespeed"]),new Set(["innerHTML","textContent","innerText","children"]),new Set(["beforeinput","click","dblclick","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]);function ye(e,t,n){let i=n.length,s=t.length,o=i,r=0,l=0,a=t[s-1].nextSibling,c=null;for(;ri-l){const s=t[r];for(;l{i=s,Pe(t,e(),t.firstChild?null:void 0,n)})),()=>{i(),t.textContent=""}}function Ce(e,t,n){const i=document.createElement("template");if(i.innerHTML=e,t&&i.innerHTML.split("<").length-1!==t)throw`Template html does not match input:\n${i.innerHTML}\n\n${e}`;let s=i.content.firstChild;return n&&(s=s.firstChild),s}function Se(e){const t=document[be]||(document[be]=new Set);for(let n=0,i=e.length;nxe(e,t(),i,n)),i)}function ke(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get:()=>n});null!==n;){const i=n[t];if(i){const s=n[`${t}Data`];if(void 0!==s?i(s,e):i(e),e.cancelBubble)return}n=n.host&&n.host!==n&&n.host instanceof Node?n.host:n.parentNode}}function xe(e,t,n,i,s){for(;"function"==typeof n;)n=n();if(t===n)return n;const o=typeof t,r=void 0!==i;if(e=r&&n[0]&&n[0].parentNode||e,"string"===o||"number"===o)if("number"===o&&(t=t.toString()),r){let s=n[0];s&&3===s.nodeType?s.data=t:s=document.createTextNode(t),n=Ae(e,n,i,s)}else n=""!==n&&"string"==typeof n?e.firstChild.data=t:e.textContent=t;else if(null==t||"boolean"===o){if(E.context)return n;n=Ae(e,n,i)}else{if("function"===o)return z((()=>{let s=t();for(;"function"==typeof s;)s=s();n=xe(e,s,n,i)})),()=>n;if(Array.isArray(t)){const o=[];if(Ee(o,t,s))return z((()=>n=xe(e,o,n,i,!0))),()=>n;if(E.context&&n.length)return n;if(0===o.length){if(n=Ae(e,n,i),r)return n}else Array.isArray(n)?0===n.length?Le(e,o,i):ye(e,n,o):null==n||""===n?Le(e,o):ye(e,r&&n||[e.firstChild],o);n=o}else if(t instanceof Node){if(Array.isArray(n)){if(r)return n=Ae(e,n,i,t);Ae(e,n,null,t)}else null!=n&&""!==n&&e.firstChild?e.replaceChild(t,e.firstChild):e.appendChild(t);n=t}else console.warn("Skipped inserting",t)}return n}function Ee(e,t,n){let i=!1;for(let s=0,o=t.length;s=0;o--){const r=t[o];if(s!==r){const t=r.parentNode===e;i||o?t&&e.removeChild(r):t?e.replaceChild(s,r):e.insertBefore(s,n)}else i=!0}}else e.insertBefore(s,n);return[s]}const He=Ce('
      ',4),Me=Ce("
    1. ",4);function _e(e){const[t,n]=q(-1),i=function(e,t=A){let n=new Map;const i=ie((i=>{const s=e();for(const e of n.keys())if(t(e,s)||void 0!==i&&t(e,i)){const t=n.get(e);for(const e of t.values())e.state=1,e.pure?N.push(e):j.push(e)}return s}),void 0,!0);return te(i),e=>{let s;if(s=O){let t;(t=n.get(e))?t.add(s):n.set(e,t=new Set([s])),W((()=>{t.size>1?t.delete(s):n.delete(e)}))}return t(e,i.value)}}(t),[s,o]=q("move-to-top"),[r,l]=q(!1);function a(t,i){e.selectCallback(t),n(i)}G(U(r,(()=>{if(r()){const n=t();a(e.suggestions[n],n)}}))),G(U(s,(function(){const i=e.suggestions.length,r=t();let l=r;const a=s();"up"===a?l--:"down"===a?l++:"move-to-top"===a?l=0:"move-to-bottom"===a&&(l=i),l%=i,l<0&&(l=i+l),l!==r&&n(l),o(void 0)})));let c="select-list popover-list";e.suggestions.length>7&&(c+=" intentions-scroll");return{component:(()=>{const t=He.cloneNode(!0),n=t.firstChild;return t.className=c,Pe(n,ge(me,{get each(){return e.suggestions},children:(e,t)=>{const n=t();return(()=>{const t=Me.cloneNode(!0),s=t.firstChild;return s.$$click=()=>{a(e,n)},Pe(s,(()=>e.title)),z((o=>{const r=i(n)?"selected":"",l=e.__$sb_intentions_class;return r!==o._v$&&(t.className=o._v$=r),l!==o._v$2&&(s.className=o._v$2=l),o}),{_v$:void 0,_v$2:void 0}),t})()}})),t})(),setMovement:o,setConfirmed:l}}Se(["click"]);class De{constructor(){this.element=document.createElement("div"),this.emitter=new o.Emitter,this.subscriptions=new o.CompositeDisposable,this.subscriptions.add(this.emitter)}activate(e,t){const{component:n,setMovement:i,setConfirmed:s}=_e({suggestions:t,selectCallback:e=>{this.emitter.emit("did-select",e),this.dispose()}});this.setMovement=i,this.setConfirmed=s,we((()=>n),this.element);const o=e.getCursorBufferPosition(),r=e.markBufferRange([o,o],{invalidate:"never"});e.decorateMarker(r,{type:"overlay",item:this.element}),this.subscriptions.add((function(){r.destroy()}))}move(e){var t,n=this.setMovement;null===(t=n)||void 0===t||t.call(n,e)}select(){var e,t=this.setConfirmed;null===(e=t)||void 0===e||e.call(t,!0)}onDidSelect(e){return this.emitter.on("did-select",e)}dispose(){this.subscriptions.dispose()}}function Ie(e){let t;if(e&&"object"==typeof e?Array.isArray(e.grammarScopes)?"function"!=typeof e.getIntentions&&(t="Invalid or no getIntentions found on provider"):t="Invalid or no grammarScopes found on provider":t="Invalid provider provided",t)throw console.log("[Intentions] Invalid provider",e),new Error(t)}class Be{constructor(){this.number=0,this.providers=new Set}addProvider(e){this.hasProvider(e)||(Ie(e),this.providers.add(e))}hasProvider(e){return this.providers.has(e)}deleteProvider(e){this.hasProvider(e)&&this.providers.delete(e)}async trigger(e){const t=e.getPath(),n=e.getCursorBufferPosition();if(!t)return[];const i=[...e.scopeDescriptorForBufferPosition(n).getScopesArray()];i.push("*");const s=[];this.providers.forEach((function(t){i.some((e=>t.grammarScopes.includes(e)))&&s.push(new Promise((function(i){i(t.getIntentions({textEditor:e,bufferPosition:n}))})).then((function(e){return atom.inDevMode()&&function(e){if(Array.isArray(e)){const t=e.length;for(let n=0;nt.grammarScopes.includes(e)))&&o.push(new Promise((function(n){n(t.getIntentions({textEditor:e,visibleRange:s}))})).then((function(e){return atom.inDevMode()&&function(e){if(Array.isArray(e)){const t=e.length;for(let n=0;n{const t=await this.providersList.trigger(e);if(!t.length)return!1;const n=new De,i=new o.CompositeDisposable;return n.activate(e,t),n.onDidSelect((function(e){e.selected(),i.dispose()})),i.add(n),i.add((()=>{this.active===i&&(this.active=null)})),i.add(this.commands.onListMove((function(e){n.move(e)}))),i.add(this.commands.onListConfirm((function(){n.select()}))),i.add(this.commands.onListHide((function(){i.dispose()}))),this.active=i,!0})),this.commands.onHighlightsShow((async e=>{const t=await this.providersHighlight.trigger(e);if(!t.length)return!1;const n=this.providersHighlight.paint(e,t),i=new o.CompositeDisposable;return i.add((()=>{this.active===i&&(this.active=null)})),i.add(this.commands.onHighlightsHide((function(){i.dispose()}))),i.add(n),this.active=i,!0}))}activate(){this.commands.activate()}consumeListProvider(e){this.providersList.addProvider(e)}deleteListProvider(e){this.providersList.deleteProvider(e)}consumeHighlightProvider(e){this.providersHighlight.addProvider(e)}deleteHighlightProvider(e){this.providersHighlight.deleteProvider(e)}dispose(){this.subscriptions.dispose(),this.active&&this.active.dispose()}}let Ne;function je(){Ne=new $e,Ne.activate()}function Fe(){null==Ne||Ne.dispose()}function Ve(e){const n=Array.isArray(e)?e:[e];if(void 0!==Ne)return n.forEach((e=>{Ne.consumeListProvider(e)})),new t((()=>{n.forEach((e=>{Ne.deleteListProvider(e)}))}))}function Re(e){const n=Array.isArray(e)?e:[e];if(void 0!==Ne)return n.forEach((e=>{Ne.consumeHighlightProvider(e)})),new t((()=>{n.forEach((e=>{Ne.deleteHighlightProvider(e)}))}))} //# sourceMappingURL=index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AAeZ,GAGpC0E,yBAAyB1E,QAClBmE,mBAAmB1D,YAAYT,GAGtC2E,wBAAwB3E,QACjBmE,mBAAmBvD,eAAeZ,GAGzCrV,eACO2B,cAAc3B,eAEVyB,QAAT/D,KACO+D,OAAOzB,eC5Gd4Y,YAEYhX,KACdgX,GAAU,IAAOU,GACjBV,GAAWhX,oBAGGqY,KACdrB,IAAY5Y,mBAGEka,GAAsB7E,SAC9BQ,EAAY3W,MAAM2J,QAAQwM,GAAYA,EAA1B,CAAsCA,WACrCxZ,IAAf+c,UAGJ/C,EAAUxK,SAASiK,IACfsD,GAA0BiB,oBAAoBvE,UAEvC3Z,GAAJ,KACLka,EAAUxK,SAASiK,IACfsD,GAA0BkB,mBAAmBxE,kBAKrC6E,GAA2B9E,SACnCQ,EAAY3W,MAAM2J,QAAQwM,GAAYA,EAA1B,CAAsCA,WACrCxZ,IAAf+c,UAGJ/C,EAAUxK,SAASiK,IACfsD,GAA0BmB,yBAAyBzE,UAE5C3Z,GAAJ,KACLka,EAAUxK,SAASiK,IACfsD,GAA0BoB,wBAAwB1E","sources":["node_modules/.pnpm/sb-event-kit@3.0.0/node_modules/sb-event-kit/lib/main.js","node_modules/.pnpm/sb-event-kit@3.0.0/node_modules/sb-event-kit/lib/emitter.js","node_modules/.pnpm/sb-event-kit@3.0.0/node_modules/sb-event-kit/lib/disposable.js","node_modules/.pnpm/sb-event-kit@3.0.0/node_modules/sb-event-kit/lib/composite-disposable.js","node_modules/.pnpm/sb-event-kit@3.0.0/node_modules/sb-event-kit/lib/helpers.js","lib/commands.ts","node_modules/.pnpm/solid-js@0.26.5/node_modules/solid-js/dist/solid.js","node_modules/.pnpm/solid-js@0.26.5/node_modules/solid-js/web/dist/web.js","lib/elements/list.tsx","lib/view-list.ts","lib/validate.ts","lib/providers-list.ts","lib/helpers.ts","lib/elements/highlight.ts","lib/providers-highlight.ts","lib/main.ts","lib/index.ts"],"sourcesContent":["'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CompositeDisposable = exports.Disposable = exports.Emitter = undefined;\n\nvar _emitter = require('./emitter');\n\nvar _emitter2 = _interopRequireDefault(_emitter);\n\nvar _disposable = require('./disposable');\n\nvar _disposable2 = _interopRequireDefault(_disposable);\n\nvar _compositeDisposable = require('./composite-disposable');\n\nvar _compositeDisposable2 = _interopRequireDefault(_compositeDisposable);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.Emitter = _emitter2.default;\nexports.Disposable = _disposable2.default;\nexports.CompositeDisposable = _compositeDisposable2.default;\nexports.default = {\n Emitter: _emitter2.default,\n Disposable: _disposable2.default,\n CompositeDisposable: _compositeDisposable2.default\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = undefined;\n\nvar _createClass = function () { function 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _disposable = require('./disposable');\n\nvar _disposable2 = _interopRequireDefault(_disposable);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Emitter = function () {\n function Emitter() {\n _classCallCheck(this, Emitter);\n\n this.disposed = false;\n this.handlers = {};\n }\n\n _createClass(Emitter, [{\n key: 'on',\n value: function on(eventName, handler) {\n var _this = this;\n\n if (this.disposed) {\n throw new Error('Emitter has been disposed');\n }\n if (typeof handler !== 'function') {\n throw new Error('Event handler must be a function');\n }\n var callbacks = this.handlers[eventName];\n if (typeof callbacks === 'undefined') {\n callbacks = this.handlers[eventName] = [handler];\n } else {\n callbacks.push(handler);\n }\n return new _disposable2.default(function () {\n _this.off(eventName, handler);\n });\n }\n }, {\n key: 'off',\n value: function off(eventName, handler) {\n if (this.disposed) {\n return;\n }\n if (!this.handlers[eventName]) {\n return;\n }\n var index = this.handlers[eventName].indexOf(handler);\n if (index !== -1) {\n this.handlers[eventName].splice(index, 1);\n }\n }\n }, {\n key: 'clear',\n value: function clear() {\n this.handlers = {};\n }\n }, {\n key: 'emit',\n value: function emit(eventName) {\n if (this.disposed) {\n return Promise.resolve([]);\n }\n if (!this.handlers[eventName]) {\n return Promise.resolve([]);\n }\n\n var promises = [];\n var callbacks = this.handlers[eventName];\n\n for (var _len = arguments.length, params = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n params[_key - 1] = arguments[_key];\n }\n\n for (var i = 0, length = callbacks.length; i < length; ++i) {\n promises.push(callbacks[i].apply(null, params));\n }\n return Promise.all(promises);\n }\n }, {\n key: 'dispose',\n value: function dispose() {\n this.disposed = true;\n this.clear();\n }\n }]);\n\n return Emitter;\n}();\n\nexports.default = Emitter;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = undefined;\n\nvar _createClass = function () { function 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _assert = require('assert');\n\nvar _assert2 = _interopRequireDefault(_assert);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Disposable = function () {\n function Disposable(callback) {\n _classCallCheck(this, Disposable);\n\n (0, _assert2.default)(typeof callback === 'function', 'callback should be a function');\n this.callback = callback;\n }\n\n _createClass(Disposable, [{\n key: 'dispose',\n value: function dispose() {\n if (this.callback) {\n this.callback();\n this.callback = null;\n }\n }\n }, {\n key: 'disposed',\n get: function get() {\n return this.callback === null;\n }\n }]);\n\n return Disposable;\n}();\n\nexports.default = Disposable;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = undefined;\n\nvar _createClass = function () { function 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _helpers = require('./helpers');\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar CompositeDisposable = function () {\n function CompositeDisposable() {\n _classCallCheck(this, CompositeDisposable);\n\n for (var _len = arguments.length, params = Array(_len), _key = 0; _key < _len; _key++) {\n params[_key] = arguments[_key];\n }\n\n (0, _helpers.validate)(params);\n\n this.disposed = false;\n this.disposables = new Set(params);\n }\n\n _createClass(CompositeDisposable, [{\n key: 'add',\n value: function add() {\n if (this.disposed) {\n return;\n }\n\n for (var _len2 = arguments.length, params = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n params[_key2] = arguments[_key2];\n }\n\n (0, _helpers.validate)(params);\n for (var i = 0, length = params.length; i < length; ++i) {\n this.disposables.add(params[i]);\n }\n }\n }, {\n key: 'delete',\n value: function _delete() {\n if (this.disposed) {\n return;\n }\n\n for (var _len3 = arguments.length, params = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n params[_key3] = arguments[_key3];\n }\n\n for (var i = 0, length = params.length; i < length; ++i) {\n this.disposables.delete(params[i]);\n }\n }\n }, {\n key: 'clear',\n value: function clear() {\n if (this.disposed) {\n return;\n }\n this.disposables.clear();\n }\n }, {\n key: 'dispose',\n value: function dispose() {\n if (this.disposed) {\n return;\n }\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = this.disposables[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var item = _step.value;\n\n if (typeof item.dispose === 'function') {\n item.dispose();\n } else if (typeof item === 'function') {\n item();\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n this.disposed = true;\n this.disposables.clear();\n }\n }]);\n\n return CompositeDisposable;\n}();\n\nexports.default = CompositeDisposable;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.validate = validate;\nfunction validate(params) {\n for (var i = 0, length = params.length; i < length; ++i) {\n var param = params[i];\n if (!param || typeof param.dispose !== 'function' && typeof param !== 'function') {\n throw new Error('Invalid disposable provided');\n }\n }\n}","import disposableEvent from \"disposable-event\";\nimport { CompositeDisposable, Disposable, Emitter } from \"sb-event-kit\";\nimport type { TextEditor } from \"atom\";\nimport type { ListMovement } from \"./types\";\nimport type { CommandEventExtended } from \"./types/atom\";\nimport { TargetWithAddEventListener } from \"disposable-event/src/target\"; // NOTE:\n// We don't *need* to add the intentions:hide command\n// But we're doing it anyway because it helps us keep the code clean\n// And can also be used by any other package to fully control this package\n// List of core commands we allow during the list, everything else closes it\n\nconst CORE_COMMANDS = new Set([\"core:move-up\", \"core:move-down\", \"core:page-up\", \"core:page-down\", \"core:move-to-top\", \"core:move-to-bottom\"]);\ntype ShowListEvent = {\n show: boolean;\n editor: TextEditor;\n};\nexport default class Commands {\n active: {\n type: \"list\" | \"highlight\";\n subscriptions: CompositeDisposable;\n } | null | undefined;\n emitter: Emitter;\n subscriptions: CompositeDisposable;\n\n constructor() {\n this.active = null;\n this.emitter = new Emitter();\n this.subscriptions = new CompositeDisposable();\n this.subscriptions.add(this.emitter);\n }\n\n activate() {\n this.subscriptions.add(atom.commands.add(\"atom-text-editor:not([mini])\", {\n \"intentions:show\": (e: CommandEventExtended) => {\n if (this.active && this.active.type === \"list\") {\n return;\n }\n\n const subscriptions = new CompositeDisposable();\n this.processListShow(subscriptions);\n\n if (!e.originalEvent || e.originalEvent.type !== \"keydown\") {\n return;\n }\n\n setImmediate(() => {\n let matched = true;\n subscriptions.add(atom.keymaps.onDidMatchBinding(function ({\n binding\n }) {\n matched = matched && CORE_COMMANDS.has(binding.command);\n }));\n subscriptions.add(disposableEvent(((document.body as unknown) as TargetWithAddEventListener), \"keyup\", () => {\n if (matched) {\n return;\n }\n\n subscriptions.dispose();\n this.processListHide();\n }));\n });\n },\n \"intentions:hide\": () => {\n this.processListHide();\n },\n \"intentions:highlight\": (e: CommandEventExtended) => {\n if (this.active && this.active.type === \"highlight\") {\n return;\n }\n\n e.abortKeyBinding();\n const subscriptions = new CompositeDisposable();\n this.processHighlightsShow(subscriptions);\n\n if (!e.originalEvent || e.originalEvent.type !== \"keydown\") {\n return;\n }\n\n const {\n keyCode\n } = e.originalEvent;\n subscriptions.add(disposableEvent(((document.body as unknown) as TargetWithAddEventListener), \"keyup\", (upE: KeyboardEvent) => {\n if (upE.keyCode !== keyCode) {\n return;\n }\n\n subscriptions.dispose();\n this.processHighlightsHide();\n }));\n }\n }));\n this.subscriptions.add(atom.commands.add(\"atom-text-editor.intentions-list:not([mini])\", {\n \"intentions:confirm\": this.stoppingEvent(() => {\n this.processListConfirm();\n }),\n \"core:move-up\": this.stoppingEvent(() => {\n this.processListMove(\"up\");\n }),\n \"core:move-down\": this.stoppingEvent(() => {\n this.processListMove(\"down\");\n }),\n \"core:page-up\": this.stoppingEvent(() => {\n this.processListMove(\"page-up\");\n }),\n \"core:page-down\": this.stoppingEvent(() => {\n this.processListMove(\"page-down\");\n }),\n \"core:move-to-top\": this.stoppingEvent(() => {\n this.processListMove(\"move-to-top\");\n }),\n \"core:move-to-bottom\": this.stoppingEvent(() => {\n this.processListMove(\"move-to-bottom\");\n })\n }));\n }\n\n stoppingEvent(callback: (event: Event) => any): (event: Event) => void {\n return (event: Event) => {\n event.stopImmediatePropagation();\n callback.call(this, event);\n };\n }\n\n async processListShow(subscription: (CompositeDisposable | Disposable) | null | undefined = null) {\n if (this.active) {\n switch (this.active.type) {\n case \"list\":\n throw new Error(\"Already active\");\n\n case \"highlight\":\n this.processHighlightsHide();\n break;\n\n default:\n }\n }\n\n const editor = atom.workspace.getActiveTextEditor();\n\n if (!editor) {\n return;\n }\n\n const editorElement = atom.views.getView(editor);\n const subscriptions = new CompositeDisposable();\n\n if (subscription) {\n subscriptions.add(subscription);\n }\n\n if (!(await this.shouldListShow(editor))) {\n return;\n }\n\n this.active = {\n type: \"list\",\n subscriptions\n };\n subscriptions.add(() => {\n if (this.active && this.active.type === \"list\" && this.active.subscriptions === subscriptions) {\n this.processListHide();\n this.active = null;\n }\n\n editorElement.classList.remove(\"intentions-list\");\n });\n subscriptions.add(disposableEvent(((document.body as unknown) as TargetWithAddEventListener), \"mouseup\", function () {\n setTimeout(function () {\n subscriptions.dispose();\n }, 10);\n }));\n editorElement.classList.add(\"intentions-list\");\n }\n\n processListHide() {\n if (!this.active || this.active.type !== \"list\") {\n return;\n }\n\n const {\n subscriptions\n } = this.active;\n this.active = null;\n subscriptions.dispose();\n this.emitter.emit(\"list-hide\");\n }\n\n processListMove(movement: ListMovement) {\n if (!this.active || this.active.type !== \"list\") {\n return;\n }\n\n this.emitter.emit(\"list-move\", movement);\n }\n\n processListConfirm() {\n if (!this.active || this.active.type !== \"list\") {\n return;\n }\n\n this.emitter.emit(\"list-confirm\");\n }\n\n async processHighlightsShow(subscription: (CompositeDisposable | Disposable) | null | undefined = null) {\n if (this.active) {\n switch (this.active.type) {\n case \"highlight\":\n throw new Error(\"Already active\");\n\n case \"list\":\n this.processListHide();\n break;\n\n default:\n }\n }\n\n const editor = atom.workspace.getActiveTextEditor();\n\n if (!editor) {\n return;\n }\n\n const editorElement = atom.views.getView(editor);\n const subscriptions = new CompositeDisposable();\n const shouldProcess = await this.shouldHighlightsShow(editor);\n\n if (subscription) {\n subscriptions.add(subscription);\n }\n\n if (!shouldProcess) {\n return;\n }\n\n this.active = {\n type: \"highlight\",\n subscriptions\n };\n subscriptions.add(() => {\n if (this.active && this.active.type === \"highlight\" && this.active.subscriptions === subscriptions) {\n this.processHighlightsHide();\n }\n\n editorElement.classList.remove(\"intentions-highlights\");\n });\n editorElement.classList.add(\"intentions-highlights\");\n }\n\n processHighlightsHide() {\n if (!this.active || this.active.type !== \"highlight\") {\n return;\n }\n\n const {\n subscriptions\n } = this.active;\n this.active = null;\n subscriptions.dispose();\n this.emitter.emit(\"highlights-hide\");\n }\n\n async shouldListShow(editor: TextEditor): Promise {\n const event: ShowListEvent = {\n show: false,\n editor\n };\n await this.emitter.emit(\"list-show\", event);\n return event.show;\n }\n\n async shouldHighlightsShow(editor: TextEditor): Promise {\n const event = {\n show: false,\n editor\n };\n await this.emitter.emit(\"highlights-show\", event);\n return event.show;\n }\n\n onListShow(callback: (editor: TextEditor) => Promise) {\n return this.emitter.on(\"list-show\", function (event: ShowListEvent) {\n return callback(event.editor).then(function (result) {\n event.show = Boolean(result);\n });\n });\n }\n\n onListHide(callback: () => any) {\n return this.emitter.on(\"list-hide\", callback);\n }\n\n onListMove(callback: (movement: ListMovement) => any) {\n return this.emitter.on(\"list-move\", callback);\n }\n\n onListConfirm(callback: () => any) {\n return this.emitter.on(\"list-confirm\", callback);\n }\n\n onHighlightsShow(callback: (editor: TextEditor) => Promise) {\n return this.emitter.on(\"highlights-show\", function (event: ShowListEvent) {\n return callback(event.editor).then(function (result) {\n event.show = Boolean(result);\n });\n });\n }\n\n onHighlightsHide(callback: () => any) {\n return this.emitter.on(\"highlights-hide\", callback);\n }\n\n dispose() {\n this.subscriptions.dispose();\n\n if (this.active) {\n this.active.subscriptions.dispose();\n }\n }\n\n}","let taskIdCounter = 1,\n isCallbackScheduled = false,\n isPerformingWork = false,\n taskQueue = [],\n currentTask = null,\n shouldYieldToHost = null,\n yieldInterval = 5,\n deadline = 0,\n maxYieldInterval = 300,\n scheduleCallback = null,\n scheduledCallback = null;\nconst maxSigned31BitInt = 1073741823;\nfunction setupScheduler() {\n const channel = new MessageChannel(),\n port = channel.port2;\n scheduleCallback = () => port.postMessage(null);\n channel.port1.onmessage = () => {\n if (scheduledCallback !== null) {\n const currentTime = performance.now();\n deadline = currentTime + yieldInterval;\n const hasTimeRemaining = true;\n try {\n const hasMoreWork = scheduledCallback(hasTimeRemaining, currentTime);\n if (!hasMoreWork) {\n scheduledCallback = null;\n } else port.postMessage(null);\n } catch (error) {\n port.postMessage(null);\n throw error;\n }\n }\n };\n if (navigator && navigator.scheduling && navigator.scheduling.isInputPending) {\n const scheduling = navigator.scheduling;\n shouldYieldToHost = () => {\n const currentTime = performance.now();\n if (currentTime >= deadline) {\n if (scheduling.isInputPending()) {\n return true;\n }\n return currentTime >= maxYieldInterval;\n } else {\n return false;\n }\n };\n } else {\n shouldYieldToHost = () => performance.now() >= deadline;\n }\n}\nfunction enqueue(taskQueue, task) {\n function findIndex() {\n let m = 0;\n let n = taskQueue.length - 1;\n while (m <= n) {\n let k = n + m >> 1;\n let cmp = task.expirationTime - taskQueue[k].expirationTime;\n if (cmp > 0) m = k + 1;else if (cmp < 0) n = k - 1;else return k;\n }\n return m;\n }\n taskQueue.splice(findIndex(), 0, task);\n}\nfunction requestCallback(fn, options) {\n if (!scheduleCallback) setupScheduler();\n let startTime = performance.now(),\n timeout = maxSigned31BitInt;\n if (options && options.timeout) timeout = options.timeout;\n const newTask = {\n id: taskIdCounter++,\n fn,\n startTime,\n expirationTime: startTime + timeout\n };\n enqueue(taskQueue, newTask);\n if (!isCallbackScheduled && !isPerformingWork) {\n isCallbackScheduled = true;\n scheduledCallback = flushWork;\n scheduleCallback();\n }\n return newTask;\n}\nfunction cancelCallback(task) {\n task.fn = null;\n}\nfunction flushWork(hasTimeRemaining, initialTime) {\n isCallbackScheduled = false;\n isPerformingWork = true;\n try {\n return workLoop(hasTimeRemaining, initialTime);\n } finally {\n currentTask = null;\n isPerformingWork = false;\n }\n}\nfunction workLoop(hasTimeRemaining, initialTime) {\n let currentTime = initialTime;\n currentTask = taskQueue[0] || null;\n while (currentTask !== null) {\n if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || shouldYieldToHost())) {\n break;\n }\n const callback = currentTask.fn;\n if (callback !== null) {\n currentTask.fn = null;\n const didUserCallbackTimeout = currentTask.expirationTime <= currentTime;\n callback(didUserCallbackTimeout);\n currentTime = performance.now();\n if (currentTask === taskQueue[0]) {\n taskQueue.shift();\n }\n } else taskQueue.shift();\n currentTask = taskQueue[0] || null;\n }\n return currentTask !== null;\n}\n\nconst sharedConfig = {};\nfunction setHydrateContext(context) {\n sharedConfig.context = context;\n}\nfunction nextHydrateContext() {\n return { ...sharedConfig.context,\n id: `${sharedConfig.context.id}${sharedConfig.context.count++}.`,\n count: 0\n };\n}\n\nconst equalFn = (a, b) => a === b;\nlet ERROR = null;\nlet runEffects = runQueue;\nconst NOTPENDING = {};\nconst STALE = 1;\nconst PENDING = 2;\nconst UNOWNED = {\n owned: null,\n cleanups: null,\n context: null,\n owner: null\n};\nconst [transPending, setTransPending] = createSignal(false);\nvar Owner = null;\nvar Listener = null;\nlet Pending = null;\nlet Updates = null;\nlet Effects = null;\nlet Transition = null;\nlet ExecCount = 0;\nfunction createRoot(fn, detachedOwner) {\n detachedOwner && (Owner = detachedOwner);\n const listener = Listener,\n owner = Owner,\n root = fn.length === 0 && !false ? UNOWNED : {\n owned: null,\n cleanups: null,\n context: null,\n owner,\n attached: !!detachedOwner\n };\n Owner = root;\n Listener = null;\n let result;\n try {\n runUpdates(() => result = fn(() => cleanNode(root)), true);\n } finally {\n Listener = listener;\n Owner = owner;\n }\n return result;\n}\nfunction createSignal(value, areEqual = true, options) {\n const s = {\n value,\n observers: null,\n observerSlots: null,\n pending: NOTPENDING,\n comparator: areEqual ? typeof areEqual === \"function\" ? areEqual : equalFn : undefined\n };\n return [readSignal.bind(s), writeSignal.bind(s)];\n}\nfunction createComputed(fn, value) {\n updateComputation(createComputation(fn, value, true));\n}\nfunction createRenderEffect(fn, value) {\n updateComputation(createComputation(fn, value, false));\n}\nfunction createEffect(fn, value) {\n runEffects = runUserEffects;\n const c = createComputation(fn, value, false),\n s = SuspenseContext && lookup(Owner, SuspenseContext.id);\n if (s) c.suspense = s;\n c.user = true;\n Effects && Effects.push(c);\n}\nfunction resumeEffects(e) {\n Transition && (Transition.running = true);\n Effects.push.apply(Effects, e);\n e.length = 0;\n}\nfunction createMemo(fn, value, areEqual = true) {\n const c = createComputation(fn, value, true);\n c.pending = NOTPENDING;\n c.observers = null;\n c.observerSlots = null;\n c.state = 0;\n c.comparator = areEqual ? typeof areEqual === \"function\" ? areEqual : equalFn : undefined;\n updateComputation(c);\n return readSignal.bind(c);\n}\nfunction createDeferred(source, options) {\n let t,\n timeout = options ? options.timeoutMs : undefined;\n const [deferred, setDeferred] = createSignal();\n const node = createComputation(() => {\n if (!t || !t.fn) t = requestCallback(() => setDeferred(node.value), timeout !== undefined ? {\n timeout\n } : undefined);\n return source();\n }, undefined, true);\n updateComputation(node);\n setDeferred(node.value);\n return deferred;\n}\nfunction createSelector(source, fn = equalFn) {\n let subs = new Map();\n const node = createComputation(p => {\n const v = source();\n for (const key of subs.keys()) if (fn(key, v) || p !== undefined && fn(key, p)) {\n const l = subs.get(key);\n for (const c of l.values()) {\n c.state = STALE;\n if (c.pure) Updates.push(c);else Effects.push(c);\n }\n }\n return v;\n }, undefined, true);\n updateComputation(node);\n return key => {\n let listener;\n if (listener = Listener) {\n let l;\n if (l = subs.get(key)) l.add(listener);else subs.set(key, l = new Set([listener]));\n onCleanup(() => {\n l.size > 1 ? l.delete(listener) : subs.delete(key);\n });\n }\n return fn(key, node.value);\n };\n}\nfunction batch(fn) {\n if (Pending) return fn();\n const q = Pending = [],\n result = fn();\n Pending = null;\n runUpdates(() => {\n for (let i = 0; i < q.length; i += 1) {\n const data = q[i];\n if (data.pending !== NOTPENDING) {\n const pending = data.pending;\n data.pending = NOTPENDING;\n writeSignal.call(data, pending);\n }\n }\n }, false);\n return result;\n}\nfunction useTransition() {\n return [transPending, (fn, cb) => {\n if (SuspenseContext) {\n Transition || (Transition = {\n sources: new Set(),\n effects: [],\n promises: new Set(),\n disposed: new Set(),\n running: true,\n cb: []\n });\n cb && Transition.cb.push(cb);\n Transition.running = true;\n }\n batch(fn);\n if (!SuspenseContext && cb) cb();\n }];\n}\nfunction untrack(fn) {\n let result,\n listener = Listener;\n Listener = null;\n result = fn();\n Listener = listener;\n return result;\n}\nfunction on(...args) {\n const fn = args.pop();\n let deps;\n let isArray = true;\n let prev;\n if (args.length < 2) {\n deps = args[0];\n isArray = false;\n } else deps = args;\n return prevResult => {\n let value;\n if (isArray) {\n value = [];\n if (!prev) prev = [];\n for (let i = 0; i < deps.length; i++) value.push(deps[i]());\n } else value = deps();\n const result = untrack(() => fn(value, prev, prevResult));\n prev = value;\n return result;\n };\n}\nfunction onMount(fn) {\n createEffect(() => untrack(fn));\n}\nfunction onCleanup(fn) {\n if (Owner === null) ;else if (Owner.cleanups === null) Owner.cleanups = [fn];else Owner.cleanups.push(fn);\n return fn;\n}\nfunction onError(fn) {\n ERROR || (ERROR = Symbol(\"error\"));\n if (Owner === null) ;else if (Owner.context === null) Owner.context = {\n [ERROR]: [fn]\n };else if (!Owner.context[ERROR]) Owner.context[ERROR] = [fn];else Owner.context[ERROR].push(fn);\n}\nfunction getListener() {\n return Listener;\n}\nfunction getOwner() {\n return Owner;\n}\nfunction runWithOwner(o, fn) {\n const prev = Owner;\n Owner = o;\n try {\n return fn();\n } finally {\n Owner = prev;\n }\n}\nfunction createContext(defaultValue) {\n const id = Symbol(\"context\");\n return {\n id,\n Provider: createProvider(id),\n defaultValue\n };\n}\nfunction useContext(context) {\n return lookup(Owner, context.id) || context.defaultValue;\n}\nfunction children(fn) {\n const children = createMemo(fn);\n return createMemo(() => resolveChildren(children()));\n}\nlet SuspenseContext;\nfunction getSuspenseContext() {\n return SuspenseContext || (SuspenseContext = createContext({}));\n}\nfunction createResource(fn, fetcher, options = {}) {\n if (arguments.length === 2) {\n if (typeof fetcher === \"object\") {\n options = fetcher;\n fetcher = fn;\n fn = true;\n }\n } else if (arguments.length === 1) {\n fetcher = fn;\n fn = true;\n }\n const contexts = new Set(),\n [s, set] = createSignal(options.initialValue),\n [track, trigger] = createSignal(undefined, false),\n [loading, setLoading] = createSignal(false),\n [error, setError] = createSignal();\n let err = undefined,\n pr = null,\n initP = null,\n id = null,\n loadedUnderTransition = false,\n dynamic = typeof fn === \"function\";\n if (sharedConfig.context) {\n id = `${sharedConfig.context.id}${sharedConfig.context.count++}`;\n if (sharedConfig.context.loadResource) {\n initP = sharedConfig.context.loadResource(id);\n } else if (sharedConfig.resources && id && id in sharedConfig.resources) {\n initP = sharedConfig.resources[id];\n delete sharedConfig.resources[id];\n }\n }\n function loadEnd(p, v, e) {\n if (pr === p) {\n setError(err = e);\n pr = null;\n if (Transition && p && loadedUnderTransition) {\n Transition.promises.delete(p);\n loadedUnderTransition = false;\n runUpdates(() => {\n Transition.running = true;\n if (!Transition.promises.size) {\n Effects.push.apply(Effects, Transition.effects);\n Transition.effects = [];\n }\n completeLoad(v);\n }, false);\n } else completeLoad(v);\n }\n return v;\n }\n function completeLoad(v) {\n batch(() => {\n set(v);\n setLoading(false);\n for (let c of contexts.keys()) c.decrement();\n contexts.clear();\n });\n }\n function read() {\n const c = SuspenseContext && lookup(Owner, SuspenseContext.id),\n v = s();\n if (err) throw err;\n if (Listener && !Listener.user && c) {\n createComputed(() => {\n track();\n if (pr) {\n if (c.resolved && Transition) Transition.promises.add(pr);else if (!contexts.has(c)) {\n c.increment();\n contexts.add(c);\n }\n }\n });\n }\n return v;\n }\n function load() {\n setError(err = undefined);\n let lookup = dynamic ? fn() : fn;\n loadedUnderTransition = Transition && Transition.running;\n if (lookup == null || lookup === false) {\n loadEnd(pr, untrack(s));\n return;\n }\n if (Transition && pr) Transition.promises.delete(pr);\n const p = initP || fetcher(lookup, s);\n initP = null;\n if (typeof p !== \"object\" || !(\"then\" in p)) {\n loadEnd(pr, p);\n return;\n }\n pr = p;\n batch(() => {\n setLoading(true);\n trigger();\n });\n p.then(v => loadEnd(p, v), e => loadEnd(p, e, e));\n }\n Object.defineProperties(read, {\n loading: {\n get() {\n return loading();\n }\n },\n error: {\n get() {\n return error();\n }\n }\n });\n if (dynamic) createComputed(load);else load();\n return [read, {\n refetch: load,\n mutate: set\n }];\n}\nfunction readSignal() {\n if (this.state && this.sources) {\n const updates = Updates;\n Updates = null;\n this.state === STALE ? updateComputation(this) : lookDownstream(this);\n Updates = updates;\n }\n if (Listener) {\n const sSlot = this.observers ? this.observers.length : 0;\n if (!Listener.sources) {\n Listener.sources = [this];\n Listener.sourceSlots = [sSlot];\n } else {\n Listener.sources.push(this);\n Listener.sourceSlots.push(sSlot);\n }\n if (!this.observers) {\n this.observers = [Listener];\n this.observerSlots = [Listener.sources.length - 1];\n } else {\n this.observers.push(Listener);\n this.observerSlots.push(Listener.sources.length - 1);\n }\n }\n if (Transition && Transition.running && Transition.sources.has(this)) return this.tValue;\n return this.value;\n}\nfunction writeSignal(value, isComp) {\n if (this.comparator) {\n if (Transition && Transition.running && Transition.sources.has(this)) {\n if (this.comparator(this.tValue, value)) return value;\n } else if (this.comparator(this.value, value)) return value;\n }\n if (Pending) {\n if (this.pending === NOTPENDING) Pending.push(this);\n this.pending = value;\n return value;\n }\n if (Transition) {\n if (Transition.running || !isComp && Transition.sources.has(this)) {\n Transition.sources.add(this);\n this.tValue = value;\n }\n if (!Transition.running) this.value = value;\n } else this.value = value;\n if (this.observers && (!Updates || this.observers.length)) {\n runUpdates(() => {\n for (let i = 0; i < this.observers.length; i += 1) {\n const o = this.observers[i];\n if (Transition && Transition.running && Transition.disposed.has(o)) continue;\n if (o.observers && o.state !== PENDING) markUpstream(o);\n o.state = STALE;\n if (o.pure) Updates.push(o);else Effects.push(o);\n }\n if (Updates.length > 10e5) {\n Updates = [];\n throw new Error(\"Potential Infinite Loop Detected.\");\n }\n }, false);\n }\n return value;\n}\nfunction updateComputation(node) {\n if (!node.fn) return;\n cleanNode(node);\n const owner = Owner,\n listener = Listener,\n time = ExecCount;\n Listener = Owner = node;\n runComputation(node, node.value, time);\n if (Transition && !Transition.running && Transition.sources.has(node)) {\n Transition.running = true;\n runComputation(node, node.tValue, time);\n Transition.running = false;\n }\n Listener = listener;\n Owner = owner;\n}\nfunction runComputation(node, value, time) {\n let nextValue;\n try {\n nextValue = node.fn(value);\n } catch (err) {\n handleError(err);\n }\n if (!node.updatedAt || node.updatedAt <= time) {\n if (node.observers && node.observers.length) {\n writeSignal.call(node, nextValue, true);\n } else if (Transition && Transition.running && node.pure) {\n Transition.sources.add(node);\n node.tValue = nextValue;\n } else node.value = nextValue;\n node.updatedAt = time;\n }\n}\nfunction createComputation(fn, init, pure) {\n const c = {\n fn,\n state: STALE,\n updatedAt: null,\n owned: null,\n sources: null,\n sourceSlots: null,\n cleanups: null,\n value: init,\n owner: Owner,\n context: null,\n pure\n };\n if (Owner === null) ;else if (Owner !== UNOWNED) {\n if (Transition && Transition.running && Owner.pure) {\n if (!Owner.tOwned) Owner.tOwned = [c];else Owner.tOwned.push(c);\n } else {\n if (!Owner.owned) Owner.owned = [c];else Owner.owned.push(c);\n }\n }\n return c;\n}\nfunction runTop(node) {\n let top = node.state === STALE && node,\n pending;\n if (node.suspense && untrack(node.suspense.inFallback)) return node.suspense.effects.push(node);\n const runningTransition = Transition && Transition.running;\n while ((node.fn || runningTransition && node.attached) && (node = node.owner)) {\n if (runningTransition && Transition.disposed.has(node)) return;\n if (node.state === PENDING) pending = node;else if (node.state === STALE) {\n top = node;\n pending = undefined;\n }\n }\n if (pending) {\n const updates = Updates;\n Updates = null;\n lookDownstream(pending);\n Updates = updates;\n if (!top || top.state !== STALE) return;\n if (runningTransition) {\n node = top;\n while ((node.fn || node.attached) && (node = node.owner)) {\n if (Transition.disposed.has(node)) return;\n }\n }\n }\n top && updateComputation(top);\n}\nfunction runUpdates(fn, init) {\n if (Updates) return fn();\n let wait = false;\n if (!init) Updates = [];\n if (Effects) wait = true;else Effects = [];\n ExecCount++;\n try {\n fn();\n } catch (err) {\n handleError(err);\n } finally {\n completeUpdates(wait);\n }\n}\nfunction completeUpdates(wait) {\n if (Updates) {\n runQueue(Updates);\n Updates = null;\n }\n if (wait) return;\n let cbs;\n if (Transition && Transition.running) {\n if (Transition.promises.size) {\n Transition.running = false;\n Transition.effects.push.apply(Transition.effects, Effects);\n Effects = null;\n setTransPending(true);\n return;\n }\n const sources = Transition.sources;\n cbs = Transition.cb;\n Transition = null;\n batch(() => {\n sources.forEach(v => {\n v.value = v.tValue;\n if (v.owned) {\n for (let i = 0, len = v.owned.length; i < len; i++) cleanNode(v.owned[i]);\n }\n if (v.tOwned) v.owned = v.tOwned;\n delete v.tValue;\n delete v.tOwned;\n });\n setTransPending(false);\n });\n }\n if (Effects.length) batch(() => {\n runEffects(Effects);\n Effects = null;\n });else {\n Effects = null;\n }\n if (cbs) cbs.forEach(cb => cb());\n}\nfunction runQueue(queue) {\n for (let i = 0; i < queue.length; i++) runTop(queue[i]);\n}\nfunction runUserEffects(queue) {\n let i,\n userLength = 0;\n for (i = 0; i < queue.length; i++) {\n const e = queue[i];\n if (!e.user) runTop(e);else queue[userLength++] = e;\n }\n const resume = queue.length;\n for (i = 0; i < userLength; i++) runTop(queue[i]);\n for (i = resume; i < queue.length; i++) runTop(queue[i]);\n}\nfunction lookDownstream(node) {\n node.state = 0;\n for (let i = 0; i < node.sources.length; i += 1) {\n const source = node.sources[i];\n if (source.sources) {\n if (source.state === STALE) runTop(source);else if (source.state === PENDING) lookDownstream(source);\n }\n }\n}\nfunction markUpstream(node) {\n for (let i = 0; i < node.observers.length; i += 1) {\n const o = node.observers[i];\n if (!o.state) {\n o.state = PENDING;\n o.observers && markUpstream(o);\n }\n }\n}\nfunction cleanNode(node) {\n let i;\n if (node.sources) {\n while (node.sources.length) {\n const source = node.sources.pop(),\n index = node.sourceSlots.pop(),\n obs = source.observers;\n if (obs && obs.length) {\n const n = obs.pop(),\n s = source.observerSlots.pop();\n if (index < obs.length) {\n n.sourceSlots[s] = index;\n obs[index] = n;\n source.observerSlots[index] = s;\n }\n }\n }\n }\n if (Transition && Transition.running && node.pure) {\n if (node.tOwned) {\n for (i = 0; i < node.tOwned.length; i++) cleanNode(node.tOwned[i]);\n delete node.tOwned;\n }\n reset(node, true);\n } else if (node.owned) {\n for (i = 0; i < node.owned.length; i++) cleanNode(node.owned[i]);\n node.owned = null;\n }\n if (node.cleanups) {\n for (i = 0; i < node.cleanups.length; i++) node.cleanups[i]();\n node.cleanups = null;\n }\n node.state = 0;\n node.context = null;\n}\nfunction reset(node, top) {\n if (!top) {\n node.state = 0;\n Transition.disposed.add(node);\n }\n if (node.owned) {\n for (let i = 0; i < node.owned.length; i++) reset(node.owned[i]);\n }\n}\nfunction handleError(err) {\n const fns = ERROR && lookup(Owner, ERROR);\n if (!fns) throw err;\n fns.forEach(f => f(err));\n}\nfunction lookup(owner, key) {\n return owner && (owner.context && owner.context[key] || owner.owner && lookup(owner.owner, key));\n}\nfunction resolveChildren(children) {\n if (typeof children === \"function\" && !children.length) return resolveChildren(children());\n if (Array.isArray(children)) {\n const results = [];\n for (let i = 0; i < children.length; i++) {\n let result = resolveChildren(children[i]);\n Array.isArray(result) ? results.push.apply(results, result) : results.push(result);\n }\n return results;\n }\n return children;\n}\nfunction createProvider(id) {\n return function provider(props) {\n return createMemo(() => {\n Owner.context = {\n [id]: props.value\n };\n return children(() => props.children);\n });\n };\n}\n\nconst $RAW = Symbol(\"state-raw\"),\n $NODE = Symbol(\"state-node\"),\n $PROXY = Symbol(\"state-proxy\"),\n $NAME = Symbol(\"state-name\");\nfunction wrap$1(value, name) {\n let p = value[$PROXY];\n if (!p) {\n Object.defineProperty(value, $PROXY, {\n value: p = new Proxy(value, proxyTraps$1)\n });\n let keys = Object.keys(value),\n desc = Object.getOwnPropertyDescriptors(value);\n for (let i = 0, l = keys.length; i < l; i++) {\n const prop = keys[i];\n if (desc[prop].get) {\n const get = desc[prop].get.bind(p);\n Object.defineProperty(value, prop, {\n get\n });\n }\n }\n }\n return p;\n}\nfunction isWrappable(obj) {\n return obj != null && typeof obj === \"object\" && (!obj.__proto__ || obj.__proto__ === Object.prototype || Array.isArray(obj));\n}\nfunction unwrap(item, set = new Set()) {\n let result, unwrapped, v, prop;\n if (result = item != null && item[$RAW]) return result;\n if (!isWrappable(item) || set.has(item)) return item;\n if (Array.isArray(item)) {\n if (Object.isFrozen(item)) item = item.slice(0);else set.add(item);\n for (let i = 0, l = item.length; i < l; i++) {\n v = item[i];\n if ((unwrapped = unwrap(v, set)) !== v) item[i] = unwrapped;\n }\n } else {\n if (Object.isFrozen(item)) item = Object.assign({}, item);else set.add(item);\n let keys = Object.keys(item),\n desc = Object.getOwnPropertyDescriptors(item);\n for (let i = 0, l = keys.length; i < l; i++) {\n prop = keys[i];\n if (desc[prop].get) continue;\n v = item[prop];\n if ((unwrapped = unwrap(v, set)) !== v) item[prop] = unwrapped;\n }\n }\n return item;\n}\nfunction getDataNodes(target) {\n let nodes = target[$NODE];\n if (!nodes) Object.defineProperty(target, $NODE, {\n value: nodes = {}\n });\n return nodes;\n}\nfunction proxyDescriptor(target, property) {\n const desc = Reflect.getOwnPropertyDescriptor(target, property);\n if (!desc || desc.get || property === $PROXY || property === $NODE || property === $NAME) return desc;\n delete desc.value;\n delete desc.writable;\n desc.get = () => target[$PROXY][property];\n return desc;\n}\nfunction createDataNode() {\n const [s, set] = createSignal(undefined, false);\n s.set = set;\n return s;\n}\nconst proxyTraps$1 = {\n get(target, property, receiver) {\n if (property === $RAW) return target;\n if (property === $PROXY) return receiver;\n const value = target[property];\n if (property === $NODE || property === \"__proto__\") return value;\n const wrappable = isWrappable(value);\n if (Listener && (typeof value !== \"function\" || target.hasOwnProperty(property))) {\n let nodes, node;\n if (wrappable && (nodes = getDataNodes(value))) {\n node = nodes._ || (nodes._ = createDataNode());\n node();\n }\n nodes = getDataNodes(target);\n node = nodes[property] || (nodes[property] = createDataNode());\n node();\n }\n return wrappable ? wrap$1(value) : value;\n },\n set() {\n return true;\n },\n deleteProperty() {\n return true;\n },\n getOwnPropertyDescriptor: proxyDescriptor\n};\nfunction setProperty(state, property, value) {\n if (state[property] === value) return;\n const array = Array.isArray(state);\n const len = state.length;\n const notify = array || !(property in state);\n if (value === undefined) {\n delete state[property];\n } else state[property] = value;\n let nodes = getDataNodes(state),\n node;\n (node = nodes[property]) && node.set();\n if (array && state.length !== len) (node = nodes.length) && node.set();\n notify && (node = nodes._) && node.set();\n}\nfunction mergeState(state, value) {\n const keys = Object.keys(value);\n for (let i = 0; i < keys.length; i += 1) {\n const key = keys[i];\n setProperty(state, key, value[key]);\n }\n}\nfunction updatePath(current, path, traversed = []) {\n let part,\n prev = current;\n if (path.length > 1) {\n part = path.shift();\n const partType = typeof part,\n isArray = Array.isArray(current);\n if (Array.isArray(part)) {\n for (let i = 0; i < part.length; i++) {\n updatePath(current, [part[i]].concat(path), [part[i]].concat(traversed));\n }\n return;\n } else if (isArray && partType === \"function\") {\n for (let i = 0; i < current.length; i++) {\n if (part(current[i], i)) updatePath(current, [i].concat(path), [i].concat(traversed));\n }\n return;\n } else if (isArray && partType === \"object\") {\n const {\n from = 0,\n to = current.length - 1,\n by = 1\n } = part;\n for (let i = from; i <= to; i += by) {\n updatePath(current, [i].concat(path), [i].concat(traversed));\n }\n return;\n } else if (path.length > 1) {\n updatePath(current[part], path, [part].concat(traversed));\n return;\n }\n prev = current[part];\n traversed = [part].concat(traversed);\n }\n let value = path[0];\n if (typeof value === \"function\") {\n value = value(prev, traversed);\n if (value === prev) return;\n }\n if (part === undefined && value == undefined) return;\n value = unwrap(value);\n if (part === undefined || isWrappable(prev) && isWrappable(value) && !Array.isArray(value)) {\n mergeState(prev, value);\n } else setProperty(current, part, value);\n}\nfunction createState(state, options) {\n const unwrappedState = unwrap(state || {});\n const wrappedState = wrap$1(unwrappedState);\n function setState(...args) {\n batch(() => updatePath(unwrappedState, args));\n }\n return [wrappedState, setState];\n}\n\nconst proxyTraps = {\n get(target, property, receiver) {\n if (property === $RAW) return target;\n if (property === $PROXY) return receiver;\n const value = target[property];\n if (property === $NODE || property === \"__proto__\") return value;\n const wrappable = isWrappable(value);\n if (Listener && (typeof value !== \"function\" || target.hasOwnProperty(property))) {\n let nodes, node;\n if (wrappable && (nodes = getDataNodes(value))) {\n node = nodes._ || (nodes._ = createDataNode());\n node();\n }\n nodes = getDataNodes(target);\n node = nodes[property] || (nodes[property] = createDataNode());\n node();\n }\n return wrappable ? wrap(value) : value;\n },\n set(target, property, value) {\n setProperty(target, property, unwrap(value));\n return true;\n },\n deleteProperty(target, property) {\n setProperty(target, property, undefined);\n return true;\n },\n getOwnPropertyDescriptor: proxyDescriptor\n};\nfunction wrap(value, name) {\n let p = value[$PROXY];\n if (!p) {\n Object.defineProperty(value, $PROXY, {\n value: p = new Proxy(value, proxyTraps)\n });\n let keys = Object.keys(value),\n desc = Object.getOwnPropertyDescriptors(value);\n for (let i = 0, l = keys.length; i < l; i++) {\n const prop = keys[i];\n if (desc[prop].get) {\n const get = desc[prop].get.bind(p);\n Object.defineProperty(value, prop, {\n get\n });\n }\n if (desc[prop].set) {\n const og = desc[prop].set,\n set = v => batch(() => og.call(p, v));\n Object.defineProperty(value, prop, {\n set\n });\n }\n }\n }\n return p;\n}\nfunction createMutable(state, options) {\n const unwrappedState = unwrap(state || {});\n const wrappedState = wrap(unwrappedState);\n return wrappedState;\n}\n\nfunction applyState(target, parent, property, merge, key) {\n let previous = parent[property];\n if (target === previous) return;\n if (!isWrappable(target) || !isWrappable(previous) || key && target[key] !== previous[key]) {\n target !== previous && setProperty(parent, property, target);\n return;\n }\n if (Array.isArray(target)) {\n if (target.length && previous.length && (!merge || key && target[0][key] != null)) {\n let i, j, start, end, newEnd, item, newIndicesNext, keyVal;\n for (start = 0, end = Math.min(previous.length, target.length); start < end && (previous[start] === target[start] || key && previous[start][key] === target[start][key]); start++) {\n applyState(target[start], previous, start, merge, key);\n }\n const temp = new Array(target.length),\n newIndices = new Map();\n for (end = previous.length - 1, newEnd = target.length - 1; end >= start && newEnd >= start && (previous[end] === target[newEnd] || key && previous[end][key] === target[newEnd][key]); end--, newEnd--) {\n temp[newEnd] = previous[end];\n }\n if (start > newEnd || start > end) {\n for (j = start; j <= newEnd; j++) setProperty(previous, j, target[j]);\n for (; j < target.length; j++) {\n setProperty(previous, j, temp[j]);\n applyState(target[j], previous, j, merge, key);\n }\n if (previous.length > target.length) setProperty(previous, \"length\", target.length);\n return;\n }\n newIndicesNext = new Array(newEnd + 1);\n for (j = newEnd; j >= start; j--) {\n item = target[j];\n keyVal = key ? item[key] : item;\n i = newIndices.get(keyVal);\n newIndicesNext[j] = i === undefined ? -1 : i;\n newIndices.set(keyVal, j);\n }\n for (i = start; i <= end; i++) {\n item = previous[i];\n keyVal = key ? item[key] : item;\n j = newIndices.get(keyVal);\n if (j !== undefined && j !== -1) {\n temp[j] = previous[i];\n j = newIndicesNext[j];\n newIndices.set(keyVal, j);\n }\n }\n for (j = start; j < target.length; j++) {\n if (j in temp) {\n setProperty(previous, j, temp[j]);\n applyState(target[j], previous, j, merge, key);\n } else setProperty(previous, j, target[j]);\n }\n } else {\n for (let i = 0, len = target.length; i < len; i++) {\n applyState(target[i], previous, i, merge, key);\n }\n }\n if (previous.length > target.length) setProperty(previous, \"length\", target.length);\n return;\n }\n const targetKeys = Object.keys(target);\n for (let i = 0, len = targetKeys.length; i < len; i++) {\n applyState(target[targetKeys[i]], previous, targetKeys[i], merge, key);\n }\n const previousKeys = Object.keys(previous);\n for (let i = 0, len = previousKeys.length; i < len; i++) {\n if (target[previousKeys[i]] === undefined) setProperty(previous, previousKeys[i], undefined);\n }\n}\nfunction reconcile(value, options = {}) {\n const {\n merge,\n key = \"id\"\n } = options,\n v = unwrap(value);\n return state => {\n if (!isWrappable(state) || !isWrappable(v)) return v;\n applyState(v, {\n state\n }, \"state\", merge, key);\n return state;\n };\n}\nconst setterTraps = {\n get(target, property) {\n if (property === $RAW) return target;\n const value = target[property];\n return isWrappable(value) ? new Proxy(value, setterTraps) : value;\n },\n set(target, property, value) {\n setProperty(target, property, unwrap(value));\n return true;\n },\n deleteProperty(target, property) {\n setProperty(target, property, undefined);\n return true;\n }\n};\nfunction produce(fn) {\n return state => {\n if (isWrappable(state)) fn(new Proxy(state, setterTraps));\n return state;\n };\n}\n\nconst FALLBACK = Symbol(\"fallback\");\nfunction mapArray(list, mapFn, options = {}) {\n let items = [],\n mapped = [],\n disposers = [],\n len = 0,\n indexes = mapFn.length > 1 ? [] : null,\n ctx = Owner;\n onCleanup(() => {\n for (let i = 0, length = disposers.length; i < length; i++) disposers[i]();\n });\n return () => {\n let newItems = list() || [],\n i,\n j;\n return untrack(() => {\n let newLen = newItems.length,\n newIndices,\n newIndicesNext,\n temp,\n tempdisposers,\n tempIndexes,\n start,\n end,\n newEnd,\n item;\n if (newLen === 0) {\n if (len !== 0) {\n for (i = 0; i < len; i++) disposers[i]();\n disposers = [];\n items = [];\n mapped = [];\n len = 0;\n indexes && (indexes = []);\n }\n if (options.fallback) {\n items = [FALLBACK];\n mapped[0] = createRoot(disposer => {\n disposers[0] = disposer;\n return options.fallback();\n }, ctx);\n len = 1;\n }\n }\n else if (len === 0) {\n for (j = 0; j < newLen; j++) {\n items[j] = newItems[j];\n mapped[j] = createRoot(mapper, ctx);\n }\n len = newLen;\n } else {\n temp = new Array(newLen);\n tempdisposers = new Array(newLen);\n indexes && (tempIndexes = new Array(newLen));\n for (start = 0, end = Math.min(len, newLen); start < end && items[start] === newItems[start]; start++);\n for (end = len - 1, newEnd = newLen - 1; end >= start && newEnd >= start && items[end] === newItems[newEnd]; end--, newEnd--) {\n temp[newEnd] = mapped[end];\n tempdisposers[newEnd] = disposers[end];\n indexes && (tempIndexes[newEnd] = indexes[end]);\n }\n newIndices = new Map();\n newIndicesNext = new Array(newEnd + 1);\n for (j = newEnd; j >= start; j--) {\n item = newItems[j];\n i = newIndices.get(item);\n newIndicesNext[j] = i === undefined ? -1 : i;\n newIndices.set(item, j);\n }\n for (i = start; i <= end; i++) {\n item = items[i];\n j = newIndices.get(item);\n if (j !== undefined && j !== -1) {\n temp[j] = mapped[i];\n tempdisposers[j] = disposers[i];\n indexes && (tempIndexes[j] = indexes[i]);\n j = newIndicesNext[j];\n newIndices.set(item, j);\n } else disposers[i]();\n }\n for (j = start; j < newLen; j++) {\n if (j in temp) {\n mapped[j] = temp[j];\n disposers[j] = tempdisposers[j];\n if (indexes) {\n indexes[j] = tempIndexes[j];\n indexes[j](j);\n }\n } else mapped[j] = createRoot(mapper, ctx);\n }\n len = mapped.length = newLen;\n items = newItems.slice(0);\n }\n return mapped;\n });\n function mapper(disposer) {\n disposers[j] = disposer;\n if (indexes) {\n const [s, set] = createSignal(j);\n indexes[j] = set;\n return mapFn(newItems[j], s);\n }\n return mapFn(newItems[j]);\n }\n };\n}\nfunction indexArray(list, mapFn, options = {}) {\n let items = [],\n mapped = [],\n disposers = [],\n signals = [],\n len = 0,\n i,\n ctx = Owner;\n onCleanup(() => {\n for (let i = 0, length = disposers.length; i < length; i++) disposers[i]();\n });\n return () => {\n const newItems = list() || [];\n return untrack(() => {\n if (newItems.length === 0) {\n if (len !== 0) {\n for (i = 0; i < len; i++) disposers[i]();\n disposers = [];\n items = [];\n mapped = [];\n len = 0;\n signals = [];\n }\n if (options.fallback) {\n items = [FALLBACK];\n mapped[0] = createRoot(disposer => {\n disposers[0] = disposer;\n return options.fallback();\n }, ctx);\n len = 1;\n }\n return mapped;\n }\n if (items[0] === FALLBACK) {\n disposers[0]();\n disposers = [];\n items = [];\n mapped = [];\n len = 0;\n }\n for (i = 0; i < newItems.length; i++) {\n if (i < items.length && items[i] !== newItems[i]) {\n signals[i](newItems[i]);\n } else if (i >= items.length) {\n mapped[i] = createRoot(mapper, ctx);\n }\n }\n for (; i < items.length; i++) {\n disposers[i]();\n }\n len = mapped.length = signals.length = disposers.length = newItems.length;\n items = newItems.slice(0);\n return mapped;\n });\n function mapper(disposer) {\n disposers[i] = disposer;\n const [s, set] = createSignal(newItems[i], false);\n signals[i] = set;\n return mapFn(s, i);\n }\n };\n}\n\nfunction createComponent(Comp, props) {\n if (sharedConfig.context) {\n const c = sharedConfig.context;\n setHydrateContext(nextHydrateContext());\n const r = untrack(() => Comp(props));\n setHydrateContext(c);\n return r;\n }\n return untrack(() => Comp(props));\n}\nfunction trueFn() {\n return true;\n}\nconst propTraps = {\n get(_, property, receiver) {\n if (property === $PROXY) return receiver;\n return _.get(property);\n },\n has(_, property) {\n return _.has(property);\n },\n set: trueFn,\n deleteProperty: trueFn,\n getOwnPropertyDescriptor(_, property) {\n return {\n configurable: true,\n enumerable: true,\n get() {\n return _.get(property);\n },\n set: trueFn,\n deleteProperty: trueFn\n };\n },\n ownKeys(_) {\n return _.keys();\n }\n};\nfunction mergeProps(...sources) {\n return new Proxy({\n get(property) {\n for (let i = sources.length - 1; i >= 0; i--) {\n const v = sources[i][property];\n if (v !== undefined) return v;\n }\n },\n has(property) {\n for (let i = sources.length - 1; i >= 0; i--) {\n if (property in sources[i]) return true;\n }\n return false;\n },\n keys() {\n const keys = [];\n for (let i = 0; i < sources.length; i++) keys.push(...Object.keys(sources[i]));\n return [...new Set(keys)];\n }\n }, propTraps);\n}\nfunction splitProps(props, ...keys) {\n const blocked = new Set(keys.flat());\n const descriptors = Object.getOwnPropertyDescriptors(props);\n const res = keys.map(k => {\n const clone = {};\n for (let i = 0; i < k.length; i++) {\n const key = k[i];\n if (descriptors[key]) Object.defineProperty(clone, key, descriptors[key]);\n }\n return clone;\n });\n res.push(new Proxy({\n get(property) {\n return blocked.has(property) ? undefined : props[property];\n },\n has(property) {\n return blocked.has(property) ? false : property in props;\n },\n keys() {\n return Object.keys(props).filter(k => !blocked.has(k));\n }\n }, propTraps));\n return res;\n}\nfunction lazy(fn) {\n let p;\n const wrap = props => {\n const ctx = sharedConfig.context;\n let comp;\n if (ctx && sharedConfig.resources) {\n ctx.count++;\n const [s, set] = createSignal();\n (p || (p = fn())).then(mod => {\n setHydrateContext(ctx);\n set(mod.default);\n setHydrateContext(undefined);\n });\n comp = s;\n } else {\n const [s] = createResource(() => (p || (p = fn())).then(mod => mod.default));\n comp = s;\n }\n let Comp;\n return createMemo(() => (Comp = comp()) && untrack(() => {\n if (!ctx) return Comp(props);\n const c = sharedConfig.context;\n setHydrateContext(ctx);\n const r = Comp(props);\n setHydrateContext(c);\n return r;\n }));\n };\n wrap.preload = () => (p || (p = fn())).then(mod => mod.default);\n return wrap;\n}\n\nfunction For(props) {\n const fallback = \"fallback\" in props && {\n fallback: () => props.fallback\n };\n return createMemo(mapArray(() => props.each, props.children, fallback ? fallback : undefined), undefined, false);\n}\nfunction Index(props) {\n const fallback = \"fallback\" in props && {\n fallback: () => props.fallback\n };\n return createMemo(indexArray(() => props.each, props.children, fallback ? fallback : undefined), undefined, false);\n}\nfunction Show(props) {\n let strictEqual = false;\n const condition = createMemo(() => props.when, undefined, (a, b) => strictEqual ? a === b : !a === !b);\n return createMemo(() => {\n const c = condition();\n if (c) {\n const child = props.children;\n return (strictEqual = typeof child === \"function\" && child.length > 0) ? untrack(() => child(c)) : child;\n }\n return props.fallback;\n });\n}\nfunction Switch(props) {\n let strictEqual = false;\n const conditions = children(() => props.children),\n evalConditions = createMemo(() => {\n let conds = conditions();\n if (!Array.isArray(conds)) conds = [conds];\n for (let i = 0; i < conds.length; i++) {\n const c = conds[i].when;\n if (c) return [i, c, conds[i]];\n }\n return [-1];\n }, undefined, (a, b) => a && a[0] === b[0] && (strictEqual ? a[1] === b[1] : !a[1] === !b[1]) && a[2] === b[2]);\n return createMemo(() => {\n const [index, when, cond] = evalConditions();\n if (index < 0) return props.fallback;\n const c = cond.children;\n return (strictEqual = typeof c === \"function\" && c.length > 0) ? untrack(() => c(when)) : c;\n });\n}\nfunction Match(props) {\n return props;\n}\nfunction ErrorBoundary(props) {\n const [errored, setErrored] = createSignal();\n onError(setErrored);\n let e;\n return createMemo(() => {\n if ((e = errored()) != null) {\n const f = props.fallback;\n return typeof f === \"function\" && f.length ? untrack(() => f(e, () => setErrored(null))) : f;\n }\n return props.children;\n });\n}\n\nconst SuspenseListContext = createContext();\nfunction SuspenseList(props) {\n let index = 0,\n suspenseSetter,\n showContent,\n showFallback;\n const listContext = useContext(SuspenseListContext);\n if (listContext) {\n const [inFallback, setFallback] = createSignal(false);\n suspenseSetter = setFallback;\n [showContent, showFallback] = listContext.register(inFallback);\n }\n const registry = [],\n comp = createComponent(SuspenseListContext.Provider, {\n value: {\n register: inFallback => {\n const [showingContent, showContent] = createSignal(false),\n [showingFallback, showFallback] = createSignal(false);\n registry[index++] = {\n inFallback,\n showContent,\n showFallback\n };\n return [showingContent, showingFallback];\n }\n },\n get children() {\n return props.children;\n }\n });\n createComputed(() => {\n const reveal = props.revealOrder,\n tail = props.tail,\n visibleContent = showContent ? showContent() : true,\n visibleFallback = showFallback ? showFallback() : true,\n reverse = reveal === \"backwards\";\n if (reveal === \"together\") {\n const all = registry.every(i => !i.inFallback());\n suspenseSetter && suspenseSetter(!all);\n registry.forEach(i => {\n i.showContent(all && visibleContent);\n i.showFallback(visibleFallback);\n });\n return;\n }\n let stop = false;\n for (let i = 0, len = registry.length; i < len; i++) {\n const n = reverse ? len - i - 1 : i,\n s = registry[n].inFallback();\n if (!stop && !s) {\n registry[n].showContent(visibleContent);\n registry[n].showFallback(visibleFallback);\n } else {\n const next = !stop;\n if (next && suspenseSetter) suspenseSetter(true);\n if (!tail || next && tail === \"collapsed\") {\n registry[n].showFallback(visibleFallback);\n } else registry[n].showFallback(false);\n stop = true;\n registry[n].showContent(next);\n }\n }\n if (!stop && suspenseSetter) suspenseSetter(false);\n });\n return comp;\n}\nfunction Suspense(props) {\n let counter = 0,\n showContent,\n showFallback;\n const [inFallback, setFallback] = createSignal(false),\n SuspenseContext = getSuspenseContext(),\n store = {\n increment: () => {\n if (++counter === 1) setFallback(true);\n },\n decrement: () => {\n if (--counter === 0) setFallback(false);\n },\n inFallback,\n effects: [],\n resolved: false\n };\n const listContext = useContext(SuspenseListContext);\n if (listContext) [showContent, showFallback] = listContext.register(store.inFallback);\n return createComponent(SuspenseContext.Provider, {\n value: store,\n get children() {\n const rendered = untrack(() => props.children);\n return createMemo(() => {\n const inFallback = store.inFallback(),\n visibleContent = showContent ? showContent() : true,\n visibleFallback = showFallback ? showFallback() : true;\n if (!inFallback && visibleContent) {\n store.resolved = true;\n resumeEffects(store.effects);\n return rendered;\n }\n if (!visibleFallback) return;\n return props.fallback;\n });\n }\n });\n}\n\nfunction awaitSuspense() {}\nlet DEV;\n\nexport { $RAW, DEV, ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, awaitSuspense, batch, cancelCallback, children, createComponent, createComputed, createContext, createDeferred, createEffect, createMemo, createMutable, createRenderEffect, createResource, createRoot, createSelector, createSignal, createState, equalFn, getListener, getOwner, indexArray, lazy, mapArray, mergeProps, on, onCleanup, onError, onMount, produce, reconcile, requestCallback, runWithOwner, sharedConfig, splitProps, untrack, unwrap, useContext, useTransition };\n","import { createMemo, createRoot, createRenderEffect, sharedConfig, createSignal, onCleanup, splitProps, untrack } from 'solid-js';\nexport { ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, createComponent, createRenderEffect as effect, getOwner, mergeProps } from 'solid-js';\n\nconst booleans = [\"allowfullscreen\", \"allowpaymentrequest\", \"async\", \"autofocus\", \"autoplay\", \"checked\", \"controls\", \"default\", \"disabled\", \"formnovalidate\", \"hidden\", \"ismap\", \"itemscope\", \"loop\", \"multiple\", \"muted\", \"nomodule\", \"novalidate\", \"open\", \"playsinline\", \"readonly\", \"required\", \"reversed\", \"seamless\", \"selected\", \"truespeed\"];\nconst Properties = new Set([\"className\", \"indeterminate\", \"value\", ...booleans]);\nconst ChildProperties = new Set([\"innerHTML\", \"textContent\", \"innerText\", \"children\"]);\nconst Aliases = {\n className: \"class\",\n htmlFor: \"for\"\n};\nconst DelegatedEvents = new Set([\"beforeinput\", \"click\", \"dblclick\", \"focusin\", \"focusout\", \"input\", \"keydown\", \"keyup\", \"mousedown\", \"mousemove\", \"mouseout\", \"mouseover\", \"mouseup\", \"pointerdown\", \"pointermove\", \"pointerout\", \"pointerover\", \"pointerup\", \"touchend\", \"touchmove\", \"touchstart\"]);\nconst SVGElements = new Set([\n\"altGlyph\", \"altGlyphDef\", \"altGlyphItem\", \"animate\", \"animateColor\", \"animateMotion\", \"animateTransform\", \"circle\", \"clipPath\", \"color-profile\", \"cursor\", \"defs\", \"desc\", \"ellipse\", \"feBlend\", \"feColorMatrix\", \"feComponentTransfer\", \"feComposite\", \"feConvolveMatrix\", \"feDiffuseLighting\", \"feDisplacementMap\", \"feDistantLight\", \"feFlood\", \"feFuncA\", \"feFuncB\", \"feFuncG\", \"feFuncR\", \"feGaussianBlur\", \"feImage\", \"feMerge\", \"feMergeNode\", \"feMorphology\", \"feOffset\", \"fePointLight\", \"feSpecularLighting\", \"feSpotLight\", \"feTile\", \"feTurbulence\", \"filter\", \"font\", \"font-face\", \"font-face-format\", \"font-face-name\", \"font-face-src\", \"font-face-uri\", \"foreignObject\", \"g\", \"glyph\", \"glyphRef\", \"hkern\", \"image\", \"line\", \"linearGradient\", \"marker\", \"mask\", \"metadata\", \"missing-glyph\", \"mpath\", \"path\", \"pattern\", \"polygon\", \"polyline\", \"radialGradient\", \"rect\",\n\"set\", \"stop\",\n\"svg\", \"switch\", \"symbol\", \"text\", \"textPath\",\n\"tref\", \"tspan\", \"use\", \"view\", \"vkern\"]);\nconst SVGNamespace = {\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\"\n};\n\nfunction memo(fn, equal) {\n return createMemo(fn, undefined, equal);\n}\n\nfunction reconcileArrays(parentNode, a, b) {\n let bLength = b.length,\n aEnd = a.length,\n bEnd = bLength,\n aStart = 0,\n bStart = 0,\n after = a[aEnd - 1].nextSibling,\n map = null;\n while (aStart < aEnd || bStart < bEnd) {\n if (aEnd === aStart) {\n const node = bEnd < bLength ? bStart ? b[bStart - 1].nextSibling : b[bEnd - bStart] : after;\n while (bStart < bEnd) parentNode.insertBefore(b[bStart++], node);\n } else if (bEnd === bStart) {\n while (aStart < aEnd) {\n if (!map || !map.has(a[aStart])) parentNode.removeChild(a[aStart]);\n aStart++;\n }\n } else if (a[aStart] === b[bStart]) {\n aStart++;\n bStart++;\n } else if (a[aEnd - 1] === b[bEnd - 1]) {\n aEnd--;\n bEnd--;\n } else if (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]) {\n const node = a[--aEnd].nextSibling;\n parentNode.insertBefore(b[bStart++], a[aStart++].nextSibling);\n parentNode.insertBefore(b[--bEnd], node);\n a[aEnd] = b[bEnd];\n } else {\n if (!map) {\n map = new Map();\n let i = bStart;\n while (i < bEnd) map.set(b[i], i++);\n }\n const index = map.get(a[aStart]);\n if (index != null) {\n if (bStart < index && index < bEnd) {\n let i = aStart,\n sequence = 1,\n t;\n while (++i < aEnd && i < bEnd) {\n if ((t = map.get(a[i])) == null || t !== index + sequence) break;\n sequence++;\n }\n if (sequence > index - bStart) {\n const node = a[aStart];\n while (bStart < index) parentNode.insertBefore(b[bStart++], node);\n } else parentNode.replaceChild(b[bStart++], a[aStart++]);\n } else aStart++;\n } else parentNode.removeChild(a[aStart++]);\n }\n }\n}\n\nconst $$EVENTS = Symbol(\"delegated-events\");\nfunction render(code, element, init) {\n let disposer;\n createRoot(dispose => {\n disposer = dispose;\n insert(element, code(), element.firstChild ? null : undefined, init);\n });\n return () => {\n disposer();\n element.textContent = \"\";\n };\n}\nfunction template(html, check, isSVG) {\n const t = document.createElement(\"template\");\n t.innerHTML = html;\n if (check && t.innerHTML.split(\"<\").length - 1 !== check) throw `Template html does not match input:\\n${t.innerHTML}\\n\\n${html}`;\n let node = t.content.firstChild;\n if (isSVG) node = node.firstChild;\n return node;\n}\nfunction delegateEvents(eventNames) {\n const e = document[$$EVENTS] || (document[$$EVENTS] = new Set());\n for (let i = 0, l = eventNames.length; i < l; i++) {\n const name = eventNames[i];\n if (!e.has(name)) {\n e.add(name);\n document.addEventListener(name, eventHandler);\n }\n }\n}\nfunction clearDelegatedEvents() {\n if (document[$$EVENTS]) {\n for (let name of document[$$EVENTS].keys()) document.removeEventListener(name, eventHandler);\n delete document[$$EVENTS];\n }\n}\nfunction setAttribute(node, name, value) {\n if (value == null) node.removeAttribute(name);else node.setAttribute(name, value);\n}\nfunction setAttributeNS(node, namespace, name, value) {\n if (value == null) node.removeAttributeNS(namespace, name);else node.setAttributeNS(namespace, name, value);\n}\nfunction addEventListener(node, name, handler, delegate) {\n if (delegate) {\n if (Array.isArray(handler)) {\n node[`$$${name}`] = handler[0];\n node[`$$${name}Data`] = handler[1];\n } else node[`$$${name}`] = handler;\n } else if (Array.isArray(handler)) {\n node.addEventListener(name, e => handler[0](handler[1], e));\n } else node.addEventListener(name, handler);\n}\nfunction classList(node, value, prev = {}) {\n const classKeys = Object.keys(value),\n prevKeys = Object.keys(prev);\n let i, len;\n for (i = 0, len = prevKeys.length; i < len; i++) {\n const key = prevKeys[i];\n if (!key || key === \"undefined\" || key in value) continue;\n toggleClassKey(node, key, false);\n delete prev[key];\n }\n for (i = 0, len = classKeys.length; i < len; i++) {\n const key = classKeys[i],\n classValue = !!value[key];\n if (!key || key === \"undefined\" || prev[key] === classValue) continue;\n toggleClassKey(node, key, classValue);\n prev[key] = classValue;\n }\n return value;\n}\nfunction style(node, value, prev = {}) {\n const nodeStyle = node.style;\n if (typeof value === \"string\") return nodeStyle.cssText = value;\n typeof prev === \"string\" && (prev = {});\n let v, s;\n for (s in prev) {\n value[s] == null && nodeStyle.removeProperty(s);\n delete prev[s];\n }\n for (s in value) {\n v = value[s];\n if (v !== prev[s]) {\n nodeStyle.setProperty(s, v);\n prev[s] = v;\n }\n }\n return prev;\n}\nfunction spread(node, accessor, isSVG, skipChildren) {\n if (typeof accessor === \"function\") {\n createRenderEffect(current => spreadExpression(node, accessor(), current, isSVG, skipChildren));\n } else spreadExpression(node, accessor, undefined, isSVG, skipChildren);\n}\nfunction dynamicProperty(props, key) {\n const src = props[key];\n Object.defineProperty(props, key, {\n get() {\n return src();\n },\n enumerable: true\n });\n return props;\n}\nfunction insert(parent, accessor, marker, initial) {\n if (marker !== undefined && !initial) initial = [];\n if (typeof accessor !== \"function\") return insertExpression(parent, accessor, initial, marker);\n createRenderEffect(current => insertExpression(parent, accessor(), current, marker), initial);\n}\nfunction assign(node, props, isSVG, skipChildren, prevProps = {}) {\n let isCE, isProp, isChildProp;\n for (const prop in props) {\n if (prop === \"children\") {\n if (!skipChildren) insertExpression(node, props.children);\n continue;\n }\n const value = props[prop];\n if (value === prevProps[prop]) continue;\n if (prop === \"style\") {\n style(node, value, prevProps[prop]);\n } else if (prop === \"class\" && !isSVG) {\n node.className = value;\n } else if (prop === \"classList\") {\n classList(node, value, prevProps[prop]);\n } else if (prop === \"ref\") {\n value(node);\n } else if (prop.slice(0, 3) === \"on:\") {\n node.addEventListener(prop.slice(3), value);\n } else if (prop.slice(0, 10) === \"oncapture:\") {\n node.addEventListener(prop.slice(10), value, true);\n } else if (prop.slice(0, 2) === \"on\") {\n const name = prop.slice(2).toLowerCase();\n const delegate = DelegatedEvents.has(name);\n addEventListener(node, name, value, delegate);\n delegate && delegateEvents([name]);\n } else if ((isChildProp = ChildProperties.has(prop)) || !isSVG && (isProp = Properties.has(prop)) || (isCE = node.nodeName.includes(\"-\"))) {\n if (isCE && !isProp && !isChildProp) node[toPropertyName(prop)] = value;else node[prop] = value;\n } else {\n const ns = isSVG && prop.indexOf(\":\") > -1 && SVGNamespace[prop.split(\":\")[0]];\n if (ns) setAttributeNS(node, ns, prop, value);else setAttribute(node, Aliases[prop] || prop, value);\n }\n prevProps[prop] = value;\n }\n}\nfunction hydrate(code, element) {\n sharedConfig.resources = globalThis._$HYDRATION.resources;\n sharedConfig.completed = globalThis._$HYDRATION.completed;\n sharedConfig.events = globalThis._$HYDRATION.events;\n sharedConfig.context = {\n id: \"\",\n count: 0,\n loadResource: globalThis._$HYDRATION.loadResource\n };\n sharedConfig.registry = new Map();\n gatherHydratable(element);\n const dispose = render(code, element, [...element.childNodes]);\n sharedConfig.context = null;\n return dispose;\n}\nfunction gatherHydratable(element) {\n const templates = element.querySelectorAll(`*[data-hk]`);\n for (let i = 0; i < templates.length; i++) {\n const node = templates[i];\n sharedConfig.registry.set(node.getAttribute(\"data-hk\"), node);\n }\n}\nfunction getNextElement(template) {\n let node, key;\n if (!sharedConfig.context || !(node = sharedConfig.registry.get(key = getHydrationKey()))) {\n return template.cloneNode(true);\n }\n if (sharedConfig.completed) sharedConfig.completed.add(node);\n sharedConfig.registry.delete(key);\n return node;\n}\nfunction getNextMarker(start) {\n let end = start,\n count = 0,\n current = [];\n if (sharedConfig.context) {\n while (end) {\n if (end.nodeType === 8) {\n const v = end.nodeValue;\n if (v === \"#\") count++;else if (v === \"/\") {\n if (count === 0) return [end, current];\n count--;\n }\n }\n current.push(end);\n end = end.nextSibling;\n }\n }\n return [end, current];\n}\nfunction runHydrationEvents() {\n if (sharedConfig.events && !sharedConfig.events.queued) {\n queueMicrotask(() => {\n const {\n completed,\n events\n } = sharedConfig;\n events.queued = false;\n while (events.length) {\n const [el, e] = events[0];\n if (!completed.has(el)) return;\n eventHandler(e);\n events.shift();\n }\n });\n sharedConfig.events.queued = true;\n }\n}\nfunction toPropertyName(name) {\n return name.toLowerCase().replace(/-([a-z])/g, (_, w) => w.toUpperCase());\n}\nfunction toggleClassKey(node, key, value) {\n const classNames = key.split(/\\s+/);\n for (let i = 0, nameLen = classNames.length; i < nameLen; i++) node.classList.toggle(classNames[i], value);\n}\nfunction eventHandler(e) {\n const key = `$$${e.type}`;\n let node = e.composedPath && e.composedPath()[0] || e.target;\n if (e.target !== node) {\n Object.defineProperty(e, \"target\", {\n configurable: true,\n value: node\n });\n }\n Object.defineProperty(e, \"currentTarget\", {\n configurable: true,\n get() {\n return node;\n }\n });\n while (node !== null) {\n const handler = node[key];\n if (handler) {\n const data = node[`${key}Data`];\n data !== undefined ? handler(data, e) : handler(e);\n if (e.cancelBubble) return;\n }\n node = node.host && node.host !== node && node.host instanceof Node ? node.host : node.parentNode;\n }\n}\nfunction spreadExpression(node, props, prevProps = {}, isSVG, skipChildren) {\n if (!skipChildren && \"children\" in props) {\n createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));\n }\n createRenderEffect(() => assign(node, props, isSVG, true, prevProps));\n return prevProps;\n}\nfunction insertExpression(parent, value, current, marker, unwrapArray) {\n while (typeof current === \"function\") current = current();\n if (value === current) return current;\n const t = typeof value,\n multi = marker !== undefined;\n parent = multi && current[0] && current[0].parentNode || parent;\n if (t === \"string\" || t === \"number\") {\n if (t === \"number\") value = value.toString();\n if (multi) {\n let node = current[0];\n if (node && node.nodeType === 3) {\n node.data = value;\n } else node = document.createTextNode(value);\n current = cleanChildren(parent, current, marker, node);\n } else {\n if (current !== \"\" && typeof current === \"string\") {\n current = parent.firstChild.data = value;\n } else current = parent.textContent = value;\n }\n } else if (value == null || t === \"boolean\") {\n if (sharedConfig.context) return current;\n current = cleanChildren(parent, current, marker);\n } else if (t === \"function\") {\n createRenderEffect(() => {\n let v = value();\n while (typeof v === \"function\") v = v();\n current = insertExpression(parent, v, current, marker);\n });\n return () => current;\n } else if (Array.isArray(value)) {\n const array = [];\n if (normalizeIncomingArray(array, value, unwrapArray)) {\n createRenderEffect(() => current = insertExpression(parent, array, current, marker, true));\n return () => current;\n }\n if (sharedConfig.context && current.length) return current;\n if (array.length === 0) {\n current = cleanChildren(parent, current, marker);\n if (multi) return current;\n } else {\n if (Array.isArray(current)) {\n if (current.length === 0) {\n appendNodes(parent, array, marker);\n } else reconcileArrays(parent, current, array);\n } else if (current == null || current === \"\") {\n appendNodes(parent, array);\n } else {\n reconcileArrays(parent, multi && current || [parent.firstChild], array);\n }\n }\n current = array;\n } else if (value instanceof Node) {\n if (Array.isArray(current)) {\n if (multi) return current = cleanChildren(parent, current, marker, value);\n cleanChildren(parent, current, null, value);\n } else if (current == null || current === \"\" || !parent.firstChild) {\n parent.appendChild(value);\n } else parent.replaceChild(value, parent.firstChild);\n current = value;\n } else console.warn(`Skipped inserting`, value);\n return current;\n}\nfunction normalizeIncomingArray(normalized, array, unwrap) {\n let dynamic = false;\n for (let i = 0, len = array.length; i < len; i++) {\n let item = array[i],\n t;\n if (item instanceof Node) {\n normalized.push(item);\n } else if (item == null || item === true || item === false) ; else if (Array.isArray(item)) {\n dynamic = normalizeIncomingArray(normalized, item) || dynamic;\n } else if ((t = typeof item) === \"string\") {\n normalized.push(document.createTextNode(item));\n } else if (t === \"function\") {\n if (unwrap) {\n while (typeof item === \"function\") item = item();\n dynamic = normalizeIncomingArray(normalized, Array.isArray(item) ? item : [item]) || dynamic;\n } else {\n normalized.push(item);\n dynamic = true;\n }\n } else normalized.push(document.createTextNode(item.toString()));\n }\n return dynamic;\n}\nfunction appendNodes(parent, array, marker) {\n for (let i = 0, len = array.length; i < len; i++) parent.insertBefore(array[i], marker);\n}\nfunction cleanChildren(parent, current, marker, replacement) {\n if (marker === undefined) return parent.textContent = \"\";\n const node = replacement || document.createTextNode(\"\");\n if (current.length) {\n let inserted = false;\n for (let i = current.length - 1; i >= 0; i--) {\n const el = current[i];\n if (node !== el) {\n const isParent = el.parentNode === parent;\n if (!inserted && !i) isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);else isParent && parent.removeChild(el);\n } else inserted = true;\n }\n } else parent.insertBefore(node, marker);\n return [node];\n}\nfunction getHydrationKey() {\n const hydrate = sharedConfig.context;\n return `${hydrate.id}${hydrate.count++}`;\n}\n\nfunction renderToString(fn, options) {}\nfunction renderToStringAsync(fn, options) {}\nfunction renderToNodeStream(fn, options) {}\nfunction renderToWebStream(fn, options) {}\nfunction ssr(template, ...nodes) {}\nfunction resolveSSRNode(node) {}\nfunction ssrClassList(value) {}\nfunction ssrStyle(value) {}\nfunction ssrSpread(accessor) {}\nfunction ssrBoolean(key, value) {}\nfunction escape(html) {}\n\nconst isServer = false;\nconst SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\nfunction createElement(tagName, isSVG = false) {\n return isSVG ? document.createElementNS(SVG_NAMESPACE, tagName) : document.createElement(tagName);\n}\nfunction Portal(props) {\n const {\n useShadow\n } = props,\n marker = document.createTextNode(\"\"),\n mount = props.mount || document.body;\n function renderPortal() {\n if (sharedConfig.context) {\n const [s, set] = createSignal(false);\n queueMicrotask(() => set(true));\n return () => s() && props.children;\n } else return () => props.children;\n }\n if (mount instanceof HTMLHeadElement) {\n const [clean, setClean] = createSignal(false);\n const cleanup = () => setClean(true);\n createRoot(dispose => insert(mount, () => !clean() ? renderPortal()() : dispose(), null));\n onCleanup(() => {\n if (sharedConfig.context) queueMicrotask(cleanup);else cleanup();\n });\n } else {\n const container = createElement(props.isSVG ? \"g\" : \"div\", props.isSVG),\n renderRoot = useShadow && container.attachShadow ? container.attachShadow({\n mode: \"open\"\n }) : container;\n Object.defineProperty(container, \"host\", {\n get() {\n return marker.parentNode;\n }\n });\n insert(renderRoot, renderPortal());\n mount.appendChild(container);\n props.ref && props.ref(container);\n onCleanup(() => mount.removeChild(container));\n }\n return marker;\n}\nfunction Dynamic(props) {\n const [p, others] = splitProps(props, [\"component\"]);\n return createMemo(() => {\n const component = p.component;\n switch (typeof component) {\n case \"function\":\n return untrack(() => component(others));\n case \"string\":\n const isSvg = SVGElements.has(component);\n const el = createElement(component, isSvg);\n spread(el, others, isSvg);\n return el;\n }\n });\n}\n\nexport { Aliases, ChildProperties, DelegatedEvents, Dynamic, Portal, Properties, SVGElements, SVGNamespace, addEventListener, assign, classList, clearDelegatedEvents, delegateEvents, dynamicProperty, escape, gatherHydratable, getHydrationKey, getNextElement, getNextMarker, hydrate, insert, isServer, memo, render, renderToNodeStream, renderToString, renderToStringAsync, renderToWebStream, resolveSSRNode, runHydrationEvents, setAttribute, setAttributeNS, spread, ssr, ssrBoolean, ssrClassList, ssrSpread, ssrStyle, style, template };\n","import { template as _$template } from \"solid-js/web\";\nimport { delegateEvents as _$delegateEvents } from \"solid-js/web\";\nimport { effect as _$effect } from \"solid-js/web\";\nimport { insert as _$insert } from \"solid-js/web\";\nimport { createComponent as _$createComponent } from \"solid-js/web\";\n\nconst _tmpl$ = _$template(`
        `, 4),\n _tmpl$2 = _$template(`
      1. `, 4);\n\nimport { createSignal, createSelector, For, createComputed, on } from \"solid-js\";\nimport { $class } from \"../helpers\";\nimport type { ListItem } from \"../types\";\nexport interface Props {\n suggestions: Array;\n selectCallback: (suggestion: ListItem) => void;\n}\nexport function ListElement(props: Props) {\n // current active index\n const [getActiveIndex, setActiveIndex] = createSignal(-1); // current active id\n\n const isSelected = createSelector(getActiveIndex); // movement state\n\n const [getMovement, setMovement] = createSignal(\"move-to-top\"); // selected state\n\n const [getConfirmed, setConfirmed] = createSignal(false);\n\n function handleSelection(suggestion: ListItem, index: number) {\n // call its associated callback\n props.selectCallback(suggestion); // store it in the signal\n\n setActiveIndex(index);\n }\n\n function handleMove() {\n const suggestionsCount = props.suggestions.length;\n const prevIndex = getActiveIndex();\n let index = prevIndex;\n const movement = getMovement();\n\n if (movement === \"up\") {\n index--;\n } else if (movement === \"down\") {\n index++;\n } else if (movement === \"move-to-top\") {\n index = 0;\n } else if (movement === \"move-to-bottom\") {\n index = suggestionsCount;\n } // TODO: Implement page up/down\n\n\n index %= suggestionsCount;\n\n if (index < 0) {\n index = suggestionsCount + index;\n }\n\n if (index !== prevIndex) {\n setActiveIndex(index);\n } // unset the movement to allow solid to check the next movement\n\n\n setMovement(undefined);\n }\n\n createComputed(on(getConfirmed, () => {\n if (getConfirmed()) {\n // Runs the selection callback when the user confirms the selection using keyboard\n // Updating prop.select in the parent result in running this function\n const index = getActiveIndex();\n handleSelection(props.suggestions[index], index);\n }\n }));\n createComputed(on(getMovement, handleMove));\n let className = \"select-list popover-list\"; // add scrolling if more than 7 itmes\n\n if (props.suggestions.length > 7) {\n className += \" intentions-scroll\";\n }\n\n const component = (() => {\n const _el$ = _tmpl$.cloneNode(true),\n _el$2 = _el$.firstChild;\n\n _el$.className = className;\n\n _$insert(_el$2, _$createComponent(For, {\n get each() {\n return props.suggestions;\n },\n\n children: (suggestion, getIndex) => {\n const index = getIndex();\n return (() => {\n const _el$3 = _tmpl$2.cloneNode(true),\n _el$4 = _el$3.firstChild;\n\n _el$4.$$click = () => {\n handleSelection(suggestion, index);\n };\n\n _$insert(_el$4, () => suggestion.title);\n\n _$effect(_p$ => {\n const _v$ = isSelected(index) ? \"selected\" : \"\",\n _v$2 = suggestion[$class];\n\n _v$ !== _p$._v$ && (_el$3.className = _p$._v$ = _v$);\n _v$2 !== _p$._v$2 && (_el$4.className = _p$._v$2 = _v$2);\n return _p$;\n }, {\n _v$: undefined,\n _v$2: undefined\n });\n\n return _el$3;\n })();\n }\n }));\n\n return _el$;\n })();\n\n return {\n component,\n setMovement,\n setConfirmed\n };\n}\n\n_$delegateEvents([\"click\"]);","import { render } from \"solid-js/web\";\nimport { CompositeDisposable, Emitter } from \"sb-event-kit\";\nimport type { Disposable } from \"sb-event-kit\";\nimport type { TextEditor } from \"atom\";\nimport { ListElement } from \"./elements/list\";\nimport type { ListItem, ListMovement } from \"./types\";\nexport default class ListView {\n emitter: Emitter; // root element\n\n element: HTMLElement;\n subscriptions: CompositeDisposable;\n setMovement?: (movement: ListMovement) => void;\n setConfirmed?: (confiremd: boolean) => void;\n\n constructor() {\n this.element = document.createElement(\"div\");\n this.emitter = new Emitter();\n this.subscriptions = new CompositeDisposable();\n this.subscriptions.add(this.emitter);\n }\n\n activate(editor: TextEditor, suggestions: Array) {\n const {\n component,\n setMovement,\n setConfirmed\n } = ListElement({\n suggestions,\n selectCallback: (selectedSuggestion: ListItem) => {\n this.emitter.emit(\"did-select\", selectedSuggestion);\n this.dispose();\n }\n }); // store setters\n\n this.setMovement = setMovement;\n this.setConfirmed = setConfirmed; // render the list element component\n\n render(() => component, this.element);\n const bufferPosition = editor.getCursorBufferPosition();\n const marker = editor.markBufferRange([bufferPosition, bufferPosition], {\n invalidate: \"never\"\n });\n editor.decorateMarker(marker, {\n type: \"overlay\",\n item: this.element\n });\n this.subscriptions.add(function () {\n marker.destroy();\n });\n }\n\n move(movement: ListMovement) {\n this.setMovement?.(movement);\n }\n\n select() {\n // runs only once\n this.setConfirmed?.(true);\n }\n\n onDidSelect(callback: (...args: Array) => any): Disposable {\n return this.emitter.on(\"did-select\", callback);\n }\n\n dispose() {\n this.subscriptions.dispose();\n }\n\n}","import type { ListProvider, ListItem, HighlightProvider, HighlightItem } from \"./types\";\nexport function provider(entry: ListProvider | HighlightProvider) {\n let message;\n\n if (!entry || typeof entry !== \"object\") {\n message = \"Invalid provider provided\";\n } else if (!Array.isArray(entry.grammarScopes)) {\n message = \"Invalid or no grammarScopes found on provider\";\n } else if (typeof entry.getIntentions !== \"function\") {\n message = \"Invalid or no getIntentions found on provider\";\n }\n\n if (message) {\n console.log(\"[Intentions] Invalid provider\", entry);\n throw new Error(message);\n }\n}\nexport function suggestionsList(suggestions: Array): Array {\n if (Array.isArray(suggestions)) {\n const suggestionsLength = suggestions.length;\n\n for (let i = 0; i < suggestionsLength; ++i) {\n const suggestion = suggestions[i];\n let message;\n\n if (typeof suggestion.title !== \"string\") {\n message = \"Invalid or no title found on intention\";\n } else if (typeof suggestion.selected !== \"function\") {\n message = \"Invalid or no selected found on intention\";\n }\n\n if (message) {\n console.log(\"[Intentions] Invalid suggestion of type list\", suggestion);\n throw new Error(message);\n }\n }\n }\n\n return suggestions;\n}\nexport function suggestionsShow(suggestions: Array): Array {\n if (Array.isArray(suggestions)) {\n const suggestionsLength = suggestions.length;\n\n for (let i = 0; i < suggestionsLength; ++i) {\n const suggestion = suggestions[i];\n let message;\n\n if (typeof suggestion.range !== \"object\" || !suggestion.range) {\n message = \"Invalid or no range found on intention\";\n } else if (suggestion.class && typeof suggestion.class !== \"string\") {\n message = \"Invalid class found on intention\";\n } else if (typeof suggestion.created !== \"function\") {\n message = \"Invalid or no created found on intention\";\n }\n\n if (message) {\n console.log(\"[Intentions] Invalid suggestion of type show\", suggestion);\n throw new Error(message);\n }\n }\n }\n\n return suggestions;\n}","import type { TextEditor } from \"atom\";\nimport { processListItems } from \"./helpers\";\nimport { provider as validateProvider, suggestionsList as validateSuggestions } from \"./validate\";\nimport type { ListProvider, ListItem } from \"./types\";\nexport default class ProvidersList {\n number: number;\n providers: Set;\n\n constructor() {\n this.number = 0;\n this.providers = new Set();\n }\n\n addProvider(provider: ListProvider) {\n if (!this.hasProvider(provider)) {\n validateProvider(provider);\n this.providers.add(provider);\n }\n }\n\n hasProvider(provider: ListProvider): boolean {\n return this.providers.has(provider);\n }\n\n deleteProvider(provider: ListProvider) {\n if (this.hasProvider(provider)) {\n this.providers.delete(provider);\n }\n }\n\n async trigger(textEditor: TextEditor): Promise> {\n const editorPath = textEditor.getPath();\n const bufferPosition = textEditor.getCursorBufferPosition();\n\n if (!editorPath) {\n return [];\n }\n\n const scopes = [...textEditor.scopeDescriptorForBufferPosition(bufferPosition).getScopesArray()];\n scopes.push(\"*\");\n const promises: Promise[] = [];\n this.providers.forEach(function (provider) {\n if (scopes.some(scope => provider.grammarScopes.includes(scope))) {\n promises.push(new Promise(function (resolve) {\n resolve(provider.getIntentions({\n textEditor,\n bufferPosition\n }));\n }).then(function (results) {\n if (atom.inDevMode()) {\n validateSuggestions(results);\n }\n\n return results;\n }));\n }\n });\n const number = ++this.number;\n const results = (await Promise.all(promises)).reduce(function (items, item) {\n if (Array.isArray(item)) {\n return items.concat(item);\n }\n\n return items;\n }, []);\n\n if (number !== this.number || !results.length) {\n // If has been executed one more time, ignore these results\n // Or we don't have any results\n return [];\n }\n\n return processListItems(results);\n }\n\n dispose() {\n this.providers.clear();\n }\n\n}","import type { ListItem } from \"./types\";\nexport const $class = \"__$sb_intentions_class\";\nexport function processListItems(suggestions: Array): Array {\n for (let i = 0, {\n length\n } = suggestions; i < length; ++i) {\n const suggestion = suggestions[i];\n const className: string[] = [];\n\n if (suggestion.class) {\n className.push(suggestion.class.trim());\n }\n\n if (suggestion.icon) {\n className.push(`icon icon-${suggestion.icon}`);\n }\n\n suggestion[$class] = className.join(\" \");\n }\n\n return suggestions.sort(function (a, b) {\n return b.priority - a.priority;\n });\n}\nexport function showError(message: Error | string, detail?: string) {\n if (message instanceof Error) {\n detail = message.stack;\n message = message.message;\n }\n\n atom.notifications.addError(`[Intentions] ${message}`, {\n detail,\n dismissable: true\n });\n}","export const PADDING_CHARACTER = \" \";\nexport function create(length: number): HTMLElement {\n let tries = 0;\n const element = document.createElement(\"div\");\n element.className = \"intentions-inline\";\n element.style.opacity = \"0\";\n element.textContent = PADDING_CHARACTER.repeat(length);\n\n function checkStyle() {\n if (++tries === 20) {\n return;\n }\n\n const styles = getComputedStyle(element);\n\n if (styles.lineHeight && styles.width !== \"auto\") {\n element.style.opacity = \"1\";\n element.style.top = `-${styles.lineHeight}`;\n } else {\n requestAnimationFrame(checkStyle);\n }\n }\n\n requestAnimationFrame(checkStyle);\n return element;\n}","import type { TextEditor, Range, DisplayMarker } from \"atom\";\nimport { provider as validateProvider, suggestionsShow as validateSuggestions } from \"./validate\";\nimport { create as createElement, PADDING_CHARACTER } from \"./elements/highlight\";\nimport type { HighlightProvider, HighlightItem } from \"./types\";\nexport default class ProvidersHighlight {\n number: number;\n providers: Set;\n\n constructor() {\n this.number = 0;\n this.providers = new Set();\n }\n\n addProvider(provider: HighlightProvider) {\n if (!this.hasProvider(provider)) {\n validateProvider(provider);\n this.providers.add(provider);\n }\n }\n\n hasProvider(provider: HighlightProvider): boolean {\n return this.providers.has(provider);\n }\n\n deleteProvider(provider: HighlightProvider) {\n if (this.hasProvider(provider)) {\n this.providers.delete(provider);\n }\n }\n\n async trigger(textEditor: TextEditor): Promise> {\n const editorPath = textEditor.getPath();\n const bufferPosition = textEditor.getCursorBufferPosition();\n\n if (!editorPath) {\n return [];\n }\n\n const scopes = [...textEditor.scopeDescriptorForBufferPosition(bufferPosition).getScopesArray()];\n scopes.push(\"*\");\n const visibleRange = ({ ...textEditor.getBuffer().getRange()\n } as Range); // Setting this to infinity on purpose, cause the buffer position just marks visible column\n // according to element width\n\n visibleRange.end.column = Infinity;\n const promises: Promise[] = [];\n this.providers.forEach(function (provider) {\n if (scopes.some(scope => provider.grammarScopes.includes(scope))) {\n promises.push(new Promise(function (resolve) {\n resolve(provider.getIntentions({\n textEditor,\n visibleRange\n }));\n }).then(function (results) {\n if (atom.inDevMode()) {\n validateSuggestions(results);\n }\n\n return results;\n }));\n }\n });\n const number = ++this.number;\n const results = (await Promise.all(promises)).reduce(function (items, item) {\n if (Array.isArray(item)) {\n return items.concat(item);\n }\n\n return items;\n }, []);\n\n if (number !== this.number || !results.length) {\n // If has been executed one more time, ignore these results\n // Or we just don't have any results\n return [];\n }\n\n return results;\n }\n\n paint(textEditor: TextEditor, intentions: Array): () => void {\n const markers: DisplayMarker[] = [];\n\n for (const intention of intentions) {\n const matchedText = textEditor.getTextInBufferRange(intention.range);\n const marker = textEditor.markBufferRange(intention.range);\n const element = createElement(matchedText.length);\n intention.created({\n textEditor,\n element,\n marker,\n matchedText\n });\n textEditor.decorateMarker(marker, {\n type: \"overlay\",\n position: \"tail\",\n item: element\n });\n marker.onDidChange(function ({\n newHeadBufferPosition: start,\n oldTailBufferPosition: end\n }) {\n element.textContent = PADDING_CHARACTER.repeat(textEditor.getTextInBufferRange([start, end]).length);\n });\n markers.push(marker);\n }\n\n return function () {\n markers.forEach(function (marker) {\n try {\n marker.destroy();\n } catch (_) {\n /* No Op */\n }\n });\n };\n }\n\n dispose() {\n this.providers.clear();\n }\n\n}","import { CompositeDisposable, Disposable } from \"sb-event-kit\";\nimport Commands from \"./commands\";\nimport ListView from \"./view-list\";\nimport ProvidersList from \"./providers-list\";\nimport ProvidersHighlight from \"./providers-highlight\";\nimport type { ListProvider, HighlightProvider } from \"./types\";\nexport default class Intentions {\n active: Disposable | null | undefined;\n commands: Commands;\n providersList: ProvidersList;\n providersHighlight: ProvidersHighlight;\n subscriptions: CompositeDisposable;\n\n constructor() {\n this.active = null;\n this.commands = new Commands();\n this.providersList = new ProvidersList();\n this.providersHighlight = new ProvidersHighlight();\n this.subscriptions = new CompositeDisposable();\n this.subscriptions.add(this.commands);\n this.subscriptions.add(this.providersList);\n this.subscriptions.add(this.providersHighlight); // eslint-disable-next-line arrow-parens\n\n this.commands.onListShow(async textEditor => {\n const results = await this.providersList.trigger(textEditor);\n\n if (!results.length) {\n return false;\n }\n\n const listView = new ListView();\n const subscriptions = new CompositeDisposable();\n listView.activate(textEditor, results);\n listView.onDidSelect(function (intention) {\n intention.selected();\n subscriptions.dispose();\n });\n subscriptions.add(listView);\n subscriptions.add(() => {\n if (this.active === subscriptions) {\n this.active = null;\n }\n });\n subscriptions.add(this.commands.onListMove(function (movement) {\n listView.move(movement);\n }));\n subscriptions.add(this.commands.onListConfirm(function () {\n listView.select();\n }));\n subscriptions.add(this.commands.onListHide(function () {\n subscriptions.dispose();\n }));\n this.active = subscriptions;\n return true;\n }); // eslint-disable-next-line arrow-parens\n\n this.commands.onHighlightsShow(async textEditor => {\n const results = await this.providersHighlight.trigger(textEditor);\n\n if (!results.length) {\n return false;\n }\n\n const painted = this.providersHighlight.paint(textEditor, results);\n const subscriptions = new CompositeDisposable();\n subscriptions.add(() => {\n if (this.active === subscriptions) {\n this.active = null;\n }\n });\n subscriptions.add(this.commands.onHighlightsHide(function () {\n subscriptions.dispose();\n }));\n subscriptions.add(painted);\n this.active = subscriptions;\n return true;\n });\n }\n\n activate() {\n this.commands.activate();\n }\n\n consumeListProvider(provider: ListProvider) {\n this.providersList.addProvider(provider);\n }\n\n deleteListProvider(provider: ListProvider) {\n this.providersList.deleteProvider(provider);\n }\n\n consumeHighlightProvider(provider: HighlightProvider) {\n this.providersHighlight.addProvider(provider);\n }\n\n deleteHighlightProvider(provider: HighlightProvider) {\n this.providersHighlight.deleteProvider(provider);\n }\n\n dispose() {\n this.subscriptions.dispose();\n\n if (this.active) {\n this.active.dispose();\n }\n }\n\n}","import { Disposable } from \"atom\";\nimport Intentions from \"./main\";\nimport type { ListProvider, HighlightProvider } from \"./types\";\nlet intentions: Intentions | undefined = undefined;\nexport function activate() {\n intentions = new Intentions();\n intentions.activate();\n}\nexport function deactivate() {\n intentions?.dispose();\n}\nexport function consumeListIntentions(provider: ListProvider | Array) {\n const providers = Array.isArray(provider) ? provider : [provider];\n\n if (intentions === undefined) {\n return;\n }\n\n providers.forEach(entry => {\n ;\n (intentions as Intentions).consumeListProvider(entry);\n });\n return new Disposable(() => {\n providers.forEach(entry => {\n ;\n (intentions as Intentions).deleteListProvider(entry);\n });\n });\n}\nexport function consumeHighlightIntentions(provider: HighlightProvider | Array) {\n const providers = Array.isArray(provider) ? provider : [provider];\n\n if (intentions === undefined) {\n return;\n }\n\n providers.forEach(entry => {\n ;\n (intentions as Intentions).consumeHighlightProvider(entry);\n });\n return new Disposable(() => {\n providers.forEach(entry => {\n ;\n (intentions as Intentions).deleteHighlightProvider(entry);\n });\n });\n}"],"names":["Object","defineProperty","$06c8c06daeaa30396de479bcebc0a935$exports","value","CompositeDisposable","Disposable","Emitter","undefined","$ae6d5a5964070a1e501f508d4568ff6c$exports","default","$ae6d5a5964070a1e501f508d4568ff6c$var$_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","key","Constructor","protoProps","staticProps","prototype","$df142a7618c956152dacc94d383a9d08$exports","obj","$df142a7618c956152dacc94d383a9d08$var$_createClass","$df142a7618c956152dacc94d383a9d08$var$_assert2","$2S6zl$assert","__esModule","$df142a7618c956152dacc94d383a9d08$var$Disposable","callback","instance","TypeError","$df142a7618c956152dacc94d383a9d08$var$_classCallCheck","this","get","$ae6d5a5964070a1e501f508d4568ff6c$var$_disposable2","$ae6d5a5964070a1e501f508d4568ff6c$var$_interopRequireDefault","$ae6d5a5964070a1e501f508d4568ff6c$var$Emitter","$ae6d5a5964070a1e501f508d4568ff6c$var$_classCallCheck","disposed","handlers","eventName","handler","_this","Error","callbacks","push","off","index","indexOf","splice","Promise","resolve","promises","_len","arguments","params","Array","_key","apply","all","clear","$06c8c06daeaa30396de479bcebc0a935$var$_emitter2","$06c8c06daeaa30396de479bcebc0a935$var$_interopRequireDefault","$06c8c06daeaa30396de479bcebc0a935$var$_disposable2","$f40235f177e46b18afc8c6988cc9b9b5$exports","$f40235f177e46b18afc8c6988cc9b9b5$var$_createClass","$f40235f177e46b18afc8c6988cc9b9b5$var$_classCallCheck","$c2a82fc4cb0308aee853c966f7a3fb95$exports","validate","param","dispose","$f40235f177e46b18afc8c6988cc9b9b5$var$CompositeDisposable","disposables","Set","_len2","_key2","add","_len3","_key3","delete","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_step","_iterator","Symbol","iterator","next","done","item","err","return","$06c8c06daeaa30396de479bcebc0a935$var$_compositeDisposable2","CORE_COMMANDS","Commands","active","emitter","subscriptions","activate","atom","commands","e","type","processListShow","originalEvent","setImmediate","matched","keymaps","onDidMatchBinding","binding","has","command","disposableEvent","document","body","processListHide","abortKeyBinding","processHighlightsShow","keyCode","upE","processHighlightsHide","stoppingEvent","processListConfirm","processListMove","event","stopImmediatePropagation","call","subscription","editor","workspace","getActiveTextEditor","editorElement","views","getView","shouldListShow","classList","remove","setTimeout","emit","movement","shouldProcess","shouldHighlightsShow","show","onListShow","on","then","result","Boolean","onListHide","onListMove","onListConfirm","onHighlightsShow","onHighlightsHide","$9ce55212e33e38f3da673e8d01679ab0$export$f07a6cef19e11b4c","$9ce55212e33e38f3da673e8d01679ab0$var$setHydrateContext","context","$9ce55212e33e38f3da673e8d01679ab0$export$5ca47aaad2fbf622","a","b","$9ce55212e33e38f3da673e8d01679ab0$var$ERROR","$9ce55212e33e38f3da673e8d01679ab0$var$runEffects","$9ce55212e33e38f3da673e8d01679ab0$var$runQueue","$9ce55212e33e38f3da673e8d01679ab0$var$NOTPENDING","$9ce55212e33e38f3da673e8d01679ab0$var$UNOWNED","owned","cleanups","owner","$9ce55212e33e38f3da673e8d01679ab0$var$transPending","$9ce55212e33e38f3da673e8d01679ab0$var$setTransPending","$9ce55212e33e38f3da673e8d01679ab0$export$248155459a28d1fc","$9ce55212e33e38f3da673e8d01679ab0$var$Owner","$9ce55212e33e38f3da673e8d01679ab0$var$Listener","$9ce55212e33e38f3da673e8d01679ab0$var$Pending","$9ce55212e33e38f3da673e8d01679ab0$var$Updates","$9ce55212e33e38f3da673e8d01679ab0$var$Effects","$9ce55212e33e38f3da673e8d01679ab0$var$Transition","$9ce55212e33e38f3da673e8d01679ab0$var$ExecCount","$9ce55212e33e38f3da673e8d01679ab0$export$ac5ee418fd4e0f60","fn","detachedOwner","listener","root","attached","$9ce55212e33e38f3da673e8d01679ab0$var$runUpdates","$9ce55212e33e38f3da673e8d01679ab0$var$cleanNode","areEqual","options","s","observers","observerSlots","pending","comparator","$9ce55212e33e38f3da673e8d01679ab0$var$readSignal","bind","$9ce55212e33e38f3da673e8d01679ab0$var$writeSignal","$9ce55212e33e38f3da673e8d01679ab0$export$9ddb7fb291b7e0c8","$9ce55212e33e38f3da673e8d01679ab0$var$updateComputation","$9ce55212e33e38f3da673e8d01679ab0$var$createComputation","$9ce55212e33e38f3da673e8d01679ab0$export$494c6b131fbef4be","$9ce55212e33e38f3da673e8d01679ab0$export$59ca756e7a8aea0e","c","state","$9ce55212e33e38f3da673e8d01679ab0$export$410f60d5e45e709","q","data","$9ce55212e33e38f3da673e8d01679ab0$export$e047e338db8faf8c","$9ce55212e33e38f3da673e8d01679ab0$export$b4cd8de5710bc55c","args","pop","deps","prev","isArray","prevResult","$9ce55212e33e38f3da673e8d01679ab0$export$8de110a73dc5605f","$9ce55212e33e38f3da673e8d01679ab0$export$a4ff86cea5c8127e","defaultValue","id","Provider","$9ce55212e33e38f3da673e8d01679ab0$var$createProvider","$9ce55212e33e38f3da673e8d01679ab0$export$1b2d774ea5907fac","children","$9ce55212e33e38f3da673e8d01679ab0$var$resolveChildren","sources","updates","$9ce55212e33e38f3da673e8d01679ab0$var$lookDownstream","sSlot","sourceSlots","running","tValue","isComp","o","$9ce55212e33e38f3da673e8d01679ab0$var$markUpstream","pure","node","time","$9ce55212e33e38f3da673e8d01679ab0$var$runComputation","nextValue","$9ce55212e33e38f3da673e8d01679ab0$var$handleError","updatedAt","init","tOwned","$9ce55212e33e38f3da673e8d01679ab0$var$runTop","top","suspense","inFallback","effects","runningTransition","wait","cbs","size","cb","forEach","v","len","$9ce55212e33e38f3da673e8d01679ab0$var$completeUpdates","queue","source","obs","n","$9ce55212e33e38f3da673e8d01679ab0$var$reset","fns","$9ce55212e33e38f3da673e8d01679ab0$var$lookup","f","results","$9ce55212e33e38f3da673e8d01679ab0$var$FALLBACK","$9ce55212e33e38f3da673e8d01679ab0$export$ff2d44480da105c7","Comp","count","r","$9ce55212e33e38f3da673e8d01679ab0$export$f5235b51f4f3e06","fallback","list","mapFn","items","mapped","disposers","indexes","ctx","j","newItems","mapper","disposer","set","newIndices","newIndicesNext","temp","tempdisposers","tempIndexes","start","end","newEnd","newLen","Math","min","Map","slice","$9ce55212e33e38f3da673e8d01679ab0$export$eaeb808a925192ab","each","$5a20b8ee488563d1a82c9700b3c2dcaf$var$reconcileArrays","parentNode","bLength","aEnd","bEnd","aStart","bStart","after","nextSibling","map","insertBefore","removeChild","t","sequence","replaceChild","$5a20b8ee488563d1a82c9700b3c2dcaf$var$$$EVENTS","$5a20b8ee488563d1a82c9700b3c2dcaf$export$792a797b69be0d58","code","element","$5a20b8ee488563d1a82c9700b3c2dcaf$export$ad79fd18084743b4","firstChild","textContent","$5a20b8ee488563d1a82c9700b3c2dcaf$export$c32ae21812be6bdb","html","check","isSVG","createElement","innerHTML","split","content","$5a20b8ee488563d1a82c9700b3c2dcaf$export$17a8087eb00e42f7","eventNames","l","name","addEventListener","$5a20b8ee488563d1a82c9700b3c2dcaf$var$eventHandler","parent","accessor","marker","initial","$5a20b8ee488563d1a82c9700b3c2dcaf$var$insertExpression","current","composedPath","cancelBubble","host","Node","unwrapArray","multi","toString","nodeType","createTextNode","$5a20b8ee488563d1a82c9700b3c2dcaf$var$cleanChildren","array","$5a20b8ee488563d1a82c9700b3c2dcaf$var$normalizeIncomingArray","$5a20b8ee488563d1a82c9700b3c2dcaf$var$appendNodes","appendChild","console","warn","normalized","unwrap","dynamic","replacement","inserted","el","isParent","ListElement","getActiveIndex","setActiveIndex","createSignal","isSelected","subs","p","keys","values","createSelector","getMovement","setMovement","getConfirmed","setConfirmed","handleSelection","suggestion","selectCallback","createComputed","suggestions","suggestionsCount","prevIndex","className","_el$","$09865aa27e63e37c3fc9b493dd64f266$var$_tmpl$","cloneNode","_el$2","getIndex","_el$3","$09865aa27e63e37c3fc9b493dd64f266$var$_tmpl$2","_el$4","$$click","title","_p$","_v$","_v$2","ListView","component","selectedSuggestion","render","bufferPosition","getCursorBufferPosition","markBufferRange","invalidate","decorateMarker","destroy","move","select","onDidSelect","provider","entry","message","grammarScopes","getIntentions","log","ProvidersList","number","providers","addProvider","hasProvider","validateProvider","deleteProvider","textEditor","editorPath","getPath","scopes","scopeDescriptorForBufferPosition","getScopesArray","some","scope","includes","inDevMode","suggestionsLength","selected","validateSuggestions","reduce","concat","class","trim","icon","join","sort","priority","processListItems","create","tries","style","opacity","repeat","requestAnimationFrame","checkStyle","styles","getComputedStyle","lineHeight","width","ProvidersHighlight","visibleRange","getBuffer","getRange","column","Infinity","range","created","paint","intentions","markers","intention","matchedText","getTextInBufferRange","position","onDidChange","newHeadBufferPosition","oldTailBufferPosition","_","Intentions","providersList","providersHighlight","async","trigger","listView","painted","consumeListProvider","deleteListProvider","consumeHighlightProvider","deleteHighlightProvider","deactivate","consumeListIntentions","consumeHighlightIntentions"],"version":3,"file":"index.js.map"} \ No newline at end of file +{"mappings":"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BxE,QACbkE,cAAczD,YAAYT,GAGjCyE,mBAAmBzE,QACZkE,cAActD,eAAeZ,GAGpC0E,yBAAyB1E,QAClBmE,mBAAmB1D,YAAYT,GAGtC2E,wBAAwB3E,QACjBmE,mBAAmBvD,eAAeZ,GAGzCvV,eACO2B,cAAc3B,eAEVyB,QAAT/D,KACO+D,OAAOzB,eC5Gd8Y,YAEYlX,KACdkX,GAAU,IAAOU,GACjBV,GAAWlX,oBAGGuY,KACdrB,MAAAA,IAAAA,GAAY9Y,mBAGEoa,GAAsB7E,SAC9BQ,EAAY7W,MAAM2J,QAAQ0M,GAAYA,EAA1B,CAAsCA,WACrC1Z,IAAfid,UAGJ/C,EAAU1K,SAASmK,IACfsD,GAA0BiB,oBAAoBvE,UAEvC7Z,GAAJ,KACLoa,EAAU1K,SAASmK,IACfsD,GAA0BkB,mBAAmBxE,kBAKrC6E,GAA2B9E,SACnCQ,EAAY7W,MAAM2J,QAAQ0M,GAAYA,EAA1B,CAAsCA,WACrC1Z,IAAfid,UAGJ/C,EAAU1K,SAASmK,IACfsD,GAA0BmB,yBAAyBzE,UAE5C7Z,GAAJ,KACLoa,EAAU1K,SAASmK,IACfsD,GAA0BoB,wBAAwB1E","sources":["node_modules/.pnpm/sb-event-kit@3.0.0/node_modules/sb-event-kit/lib/main.js","node_modules/.pnpm/sb-event-kit@3.0.0/node_modules/sb-event-kit/lib/emitter.js","node_modules/.pnpm/sb-event-kit@3.0.0/node_modules/sb-event-kit/lib/disposable.js","node_modules/.pnpm/sb-event-kit@3.0.0/node_modules/sb-event-kit/lib/composite-disposable.js","node_modules/.pnpm/sb-event-kit@3.0.0/node_modules/sb-event-kit/lib/helpers.js","lib/commands.ts","node_modules/.pnpm/solid-js@0.26.5/node_modules/solid-js/dist/solid.js","node_modules/.pnpm/solid-js@0.26.5/node_modules/solid-js/web/dist/web.js","lib/elements/list.tsx","lib/view-list.ts","lib/validate.ts","lib/providers-list.ts","lib/helpers.ts","lib/elements/highlight.ts","lib/providers-highlight.ts","lib/main.ts","lib/index.ts"],"sourcesContent":["'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CompositeDisposable = exports.Disposable = exports.Emitter = undefined;\n\nvar _emitter = require('./emitter');\n\nvar _emitter2 = _interopRequireDefault(_emitter);\n\nvar _disposable = require('./disposable');\n\nvar _disposable2 = _interopRequireDefault(_disposable);\n\nvar _compositeDisposable = require('./composite-disposable');\n\nvar _compositeDisposable2 = _interopRequireDefault(_compositeDisposable);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.Emitter = _emitter2.default;\nexports.Disposable = _disposable2.default;\nexports.CompositeDisposable = _compositeDisposable2.default;\nexports.default = {\n Emitter: _emitter2.default,\n Disposable: _disposable2.default,\n CompositeDisposable: _compositeDisposable2.default\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = undefined;\n\nvar _createClass = function () { function 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _disposable = require('./disposable');\n\nvar _disposable2 = _interopRequireDefault(_disposable);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Emitter = function () {\n function Emitter() {\n _classCallCheck(this, Emitter);\n\n this.disposed = false;\n this.handlers = {};\n }\n\n _createClass(Emitter, [{\n key: 'on',\n value: function on(eventName, handler) {\n var _this = this;\n\n if (this.disposed) {\n throw new Error('Emitter has been disposed');\n }\n if (typeof handler !== 'function') {\n throw new Error('Event handler must be a function');\n }\n var callbacks = this.handlers[eventName];\n if (typeof callbacks === 'undefined') {\n callbacks = this.handlers[eventName] = [handler];\n } else {\n callbacks.push(handler);\n }\n return new _disposable2.default(function () {\n _this.off(eventName, handler);\n });\n }\n }, {\n key: 'off',\n value: function off(eventName, handler) {\n if (this.disposed) {\n return;\n }\n if (!this.handlers[eventName]) {\n return;\n }\n var index = this.handlers[eventName].indexOf(handler);\n if (index !== -1) {\n this.handlers[eventName].splice(index, 1);\n }\n }\n }, {\n key: 'clear',\n value: function clear() {\n this.handlers = {};\n }\n }, {\n key: 'emit',\n value: function emit(eventName) {\n if (this.disposed) {\n return Promise.resolve([]);\n }\n if (!this.handlers[eventName]) {\n return Promise.resolve([]);\n }\n\n var promises = [];\n var callbacks = this.handlers[eventName];\n\n for (var _len = arguments.length, params = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n params[_key - 1] = arguments[_key];\n }\n\n for (var i = 0, length = callbacks.length; i < length; ++i) {\n promises.push(callbacks[i].apply(null, params));\n }\n return Promise.all(promises);\n }\n }, {\n key: 'dispose',\n value: function dispose() {\n this.disposed = true;\n this.clear();\n }\n }]);\n\n return Emitter;\n}();\n\nexports.default = Emitter;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = undefined;\n\nvar _createClass = function () { function 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _assert = require('assert');\n\nvar _assert2 = _interopRequireDefault(_assert);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Disposable = function () {\n function Disposable(callback) {\n _classCallCheck(this, Disposable);\n\n (0, _assert2.default)(typeof callback === 'function', 'callback should be a function');\n this.callback = callback;\n }\n\n _createClass(Disposable, [{\n key: 'dispose',\n value: function dispose() {\n if (this.callback) {\n this.callback();\n this.callback = null;\n }\n }\n }, {\n key: 'disposed',\n get: function get() {\n return this.callback === null;\n }\n }]);\n\n return Disposable;\n}();\n\nexports.default = Disposable;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = undefined;\n\nvar _createClass = function () { function 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _helpers = require('./helpers');\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar CompositeDisposable = function () {\n function CompositeDisposable() {\n _classCallCheck(this, CompositeDisposable);\n\n for (var _len = arguments.length, params = Array(_len), _key = 0; _key < _len; _key++) {\n params[_key] = arguments[_key];\n }\n\n (0, _helpers.validate)(params);\n\n this.disposed = false;\n this.disposables = new Set(params);\n }\n\n _createClass(CompositeDisposable, [{\n key: 'add',\n value: function add() {\n if (this.disposed) {\n return;\n }\n\n for (var _len2 = arguments.length, params = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n params[_key2] = arguments[_key2];\n }\n\n (0, _helpers.validate)(params);\n for (var i = 0, length = params.length; i < length; ++i) {\n this.disposables.add(params[i]);\n }\n }\n }, {\n key: 'delete',\n value: function _delete() {\n if (this.disposed) {\n return;\n }\n\n for (var _len3 = arguments.length, params = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n params[_key3] = arguments[_key3];\n }\n\n for (var i = 0, length = params.length; i < length; ++i) {\n this.disposables.delete(params[i]);\n }\n }\n }, {\n key: 'clear',\n value: function clear() {\n if (this.disposed) {\n return;\n }\n this.disposables.clear();\n }\n }, {\n key: 'dispose',\n value: function dispose() {\n if (this.disposed) {\n return;\n }\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = this.disposables[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var item = _step.value;\n\n if (typeof item.dispose === 'function') {\n item.dispose();\n } else if (typeof item === 'function') {\n item();\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n this.disposed = true;\n this.disposables.clear();\n }\n }]);\n\n return CompositeDisposable;\n}();\n\nexports.default = CompositeDisposable;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.validate = validate;\nfunction validate(params) {\n for (var i = 0, length = params.length; i < length; ++i) {\n var param = params[i];\n if (!param || typeof param.dispose !== 'function' && typeof param !== 'function') {\n throw new Error('Invalid disposable provided');\n }\n }\n}","import disposableEvent from \"disposable-event\";\nimport { CompositeDisposable, Disposable, Emitter } from \"sb-event-kit\";\nimport type { TextEditor } from \"atom\";\nimport type { ListMovement } from \"./types\";\nimport type { CommandEventExtended } from \"./types/atom\";\nimport { TargetWithAddEventListener } from \"disposable-event/src/target\"; // NOTE:\n// We don't *need* to add the intentions:hide command\n// But we're doing it anyway because it helps us keep the code clean\n// And can also be used by any other package to fully control this package\n// List of core commands we allow during the list, everything else closes it\n\nconst CORE_COMMANDS = new Set([\"core:move-up\", \"core:move-down\", \"core:page-up\", \"core:page-down\", \"core:move-to-top\", \"core:move-to-bottom\"]);\ntype ShowListEvent = {\n show: boolean;\n editor: TextEditor;\n};\nexport default class Commands {\n active: {\n type: \"list\" | \"highlight\";\n subscriptions: CompositeDisposable;\n } | null | undefined;\n emitter: Emitter;\n subscriptions: CompositeDisposable;\n\n constructor() {\n this.active = null;\n this.emitter = new Emitter();\n this.subscriptions = new CompositeDisposable();\n this.subscriptions.add(this.emitter);\n }\n\n activate() {\n this.subscriptions.add(atom.commands.add(\"atom-text-editor:not([mini])\", {\n \"intentions:show\": (e: CommandEventExtended) => {\n if (this.active && this.active.type === \"list\") {\n return;\n }\n\n const subscriptions = new CompositeDisposable();\n this.processListShow(subscriptions);\n\n if (!e.originalEvent || e.originalEvent.type !== \"keydown\") {\n return;\n }\n\n setImmediate(() => {\n let matched = true;\n subscriptions.add(atom.keymaps.onDidMatchBinding(function ({\n binding\n }) {\n matched = matched && CORE_COMMANDS.has(binding.command);\n }));\n subscriptions.add(disposableEvent(((document.body as unknown) as TargetWithAddEventListener), \"keyup\", () => {\n if (matched) {\n return;\n }\n\n subscriptions.dispose();\n this.processListHide();\n }));\n });\n },\n \"intentions:hide\": () => {\n this.processListHide();\n },\n \"intentions:highlight\": (e: CommandEventExtended) => {\n if (this.active && this.active.type === \"highlight\") {\n return;\n }\n\n e.abortKeyBinding();\n const subscriptions = new CompositeDisposable();\n this.processHighlightsShow(subscriptions);\n\n if (!e.originalEvent || e.originalEvent.type !== \"keydown\") {\n return;\n }\n\n const {\n keyCode\n } = e.originalEvent;\n subscriptions.add(disposableEvent(((document.body as unknown) as TargetWithAddEventListener), \"keyup\", (upE: KeyboardEvent) => {\n if (upE.keyCode !== keyCode) {\n return;\n }\n\n subscriptions.dispose();\n this.processHighlightsHide();\n }));\n }\n }));\n this.subscriptions.add(atom.commands.add(\"atom-text-editor.intentions-list:not([mini])\", {\n \"intentions:confirm\": this.stoppingEvent(() => {\n this.processListConfirm();\n }),\n \"core:move-up\": this.stoppingEvent(() => {\n this.processListMove(\"up\");\n }),\n \"core:move-down\": this.stoppingEvent(() => {\n this.processListMove(\"down\");\n }),\n \"core:page-up\": this.stoppingEvent(() => {\n this.processListMove(\"page-up\");\n }),\n \"core:page-down\": this.stoppingEvent(() => {\n this.processListMove(\"page-down\");\n }),\n \"core:move-to-top\": this.stoppingEvent(() => {\n this.processListMove(\"move-to-top\");\n }),\n \"core:move-to-bottom\": this.stoppingEvent(() => {\n this.processListMove(\"move-to-bottom\");\n })\n }));\n }\n\n stoppingEvent(callback: (event: Event) => any): (event: Event) => void {\n return (event: Event) => {\n event.stopImmediatePropagation();\n callback.call(this, event);\n };\n }\n\n async processListShow(subscription: (CompositeDisposable | Disposable) | null | undefined = null) {\n if (this.active) {\n switch (this.active.type) {\n case \"list\":\n throw new Error(\"Already active\");\n\n case \"highlight\":\n this.processHighlightsHide();\n break;\n\n default:\n }\n }\n\n const editor = atom.workspace.getActiveTextEditor();\n\n if (!editor) {\n return;\n }\n\n const editorElement = atom.views.getView(editor);\n const subscriptions = new CompositeDisposable();\n\n if (subscription) {\n subscriptions.add(subscription);\n }\n\n if (!(await this.shouldListShow(editor))) {\n return;\n }\n\n this.active = {\n type: \"list\",\n subscriptions\n };\n subscriptions.add(() => {\n if (this.active && this.active.type === \"list\" && this.active.subscriptions === subscriptions) {\n this.processListHide();\n this.active = null;\n }\n\n editorElement.classList.remove(\"intentions-list\");\n });\n subscriptions.add(disposableEvent(((document.body as unknown) as TargetWithAddEventListener), \"mouseup\", function () {\n setTimeout(function () {\n subscriptions.dispose();\n }, 10);\n }));\n editorElement.classList.add(\"intentions-list\");\n }\n\n processListHide() {\n if (!this.active || this.active.type !== \"list\") {\n return;\n }\n\n const {\n subscriptions\n } = this.active;\n this.active = null;\n subscriptions.dispose();\n this.emitter.emit(\"list-hide\");\n }\n\n processListMove(movement: ListMovement) {\n if (!this.active || this.active.type !== \"list\") {\n return;\n }\n\n this.emitter.emit(\"list-move\", movement);\n }\n\n processListConfirm() {\n if (!this.active || this.active.type !== \"list\") {\n return;\n }\n\n this.emitter.emit(\"list-confirm\");\n }\n\n async processHighlightsShow(subscription: (CompositeDisposable | Disposable) | null | undefined = null) {\n if (this.active) {\n switch (this.active.type) {\n case \"highlight\":\n throw new Error(\"Already active\");\n\n case \"list\":\n this.processListHide();\n break;\n\n default:\n }\n }\n\n const editor = atom.workspace.getActiveTextEditor();\n\n if (!editor) {\n return;\n }\n\n const editorElement = atom.views.getView(editor);\n const subscriptions = new CompositeDisposable();\n const shouldProcess = await this.shouldHighlightsShow(editor);\n\n if (subscription) {\n subscriptions.add(subscription);\n }\n\n if (!shouldProcess) {\n return;\n }\n\n this.active = {\n type: \"highlight\",\n subscriptions\n };\n subscriptions.add(() => {\n if (this.active && this.active.type === \"highlight\" && this.active.subscriptions === subscriptions) {\n this.processHighlightsHide();\n }\n\n editorElement.classList.remove(\"intentions-highlights\");\n });\n editorElement.classList.add(\"intentions-highlights\");\n }\n\n processHighlightsHide() {\n if (!this.active || this.active.type !== \"highlight\") {\n return;\n }\n\n const {\n subscriptions\n } = this.active;\n this.active = null;\n subscriptions.dispose();\n this.emitter.emit(\"highlights-hide\");\n }\n\n async shouldListShow(editor: TextEditor): Promise {\n const event: ShowListEvent = {\n show: false,\n editor\n };\n await this.emitter.emit(\"list-show\", event);\n return event.show;\n }\n\n async shouldHighlightsShow(editor: TextEditor): Promise {\n const event = {\n show: false,\n editor\n };\n await this.emitter.emit(\"highlights-show\", event);\n return event.show;\n }\n\n onListShow(callback: (editor: TextEditor) => Promise) {\n return this.emitter.on(\"list-show\", function (event: ShowListEvent) {\n return callback(event.editor).then(function (result) {\n event.show = Boolean(result);\n });\n });\n }\n\n onListHide(callback: () => any) {\n return this.emitter.on(\"list-hide\", callback);\n }\n\n onListMove(callback: (movement: ListMovement) => any) {\n return this.emitter.on(\"list-move\", callback);\n }\n\n onListConfirm(callback: () => any) {\n return this.emitter.on(\"list-confirm\", callback);\n }\n\n onHighlightsShow(callback: (editor: TextEditor) => Promise) {\n return this.emitter.on(\"highlights-show\", function (event: ShowListEvent) {\n return callback(event.editor).then(function (result) {\n event.show = Boolean(result);\n });\n });\n }\n\n onHighlightsHide(callback: () => any) {\n return this.emitter.on(\"highlights-hide\", callback);\n }\n\n dispose() {\n this.subscriptions.dispose();\n\n if (this.active) {\n this.active.subscriptions.dispose();\n }\n }\n\n}","let taskIdCounter = 1,\n isCallbackScheduled = false,\n isPerformingWork = false,\n taskQueue = [],\n currentTask = null,\n shouldYieldToHost = null,\n yieldInterval = 5,\n deadline = 0,\n maxYieldInterval = 300,\n scheduleCallback = null,\n scheduledCallback = null;\nconst maxSigned31BitInt = 1073741823;\nfunction setupScheduler() {\n const channel = new MessageChannel(),\n port = channel.port2;\n scheduleCallback = () => port.postMessage(null);\n channel.port1.onmessage = () => {\n if (scheduledCallback !== null) {\n const currentTime = performance.now();\n deadline = currentTime + yieldInterval;\n const hasTimeRemaining = true;\n try {\n const hasMoreWork = scheduledCallback(hasTimeRemaining, currentTime);\n if (!hasMoreWork) {\n scheduledCallback = null;\n } else port.postMessage(null);\n } catch (error) {\n port.postMessage(null);\n throw error;\n }\n }\n };\n if (navigator && navigator.scheduling && navigator.scheduling.isInputPending) {\n const scheduling = navigator.scheduling;\n shouldYieldToHost = () => {\n const currentTime = performance.now();\n if (currentTime >= deadline) {\n if (scheduling.isInputPending()) {\n return true;\n }\n return currentTime >= maxYieldInterval;\n } else {\n return false;\n }\n };\n } else {\n shouldYieldToHost = () => performance.now() >= deadline;\n }\n}\nfunction enqueue(taskQueue, task) {\n function findIndex() {\n let m = 0;\n let n = taskQueue.length - 1;\n while (m <= n) {\n let k = n + m >> 1;\n let cmp = task.expirationTime - taskQueue[k].expirationTime;\n if (cmp > 0) m = k + 1;else if (cmp < 0) n = k - 1;else return k;\n }\n return m;\n }\n taskQueue.splice(findIndex(), 0, task);\n}\nfunction requestCallback(fn, options) {\n if (!scheduleCallback) setupScheduler();\n let startTime = performance.now(),\n timeout = maxSigned31BitInt;\n if (options && options.timeout) timeout = options.timeout;\n const newTask = {\n id: taskIdCounter++,\n fn,\n startTime,\n expirationTime: startTime + timeout\n };\n enqueue(taskQueue, newTask);\n if (!isCallbackScheduled && !isPerformingWork) {\n isCallbackScheduled = true;\n scheduledCallback = flushWork;\n scheduleCallback();\n }\n return newTask;\n}\nfunction cancelCallback(task) {\n task.fn = null;\n}\nfunction flushWork(hasTimeRemaining, initialTime) {\n isCallbackScheduled = false;\n isPerformingWork = true;\n try {\n return workLoop(hasTimeRemaining, initialTime);\n } finally {\n currentTask = null;\n isPerformingWork = false;\n }\n}\nfunction workLoop(hasTimeRemaining, initialTime) {\n let currentTime = initialTime;\n currentTask = taskQueue[0] || null;\n while (currentTask !== null) {\n if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || shouldYieldToHost())) {\n break;\n }\n const callback = currentTask.fn;\n if (callback !== null) {\n currentTask.fn = null;\n const didUserCallbackTimeout = currentTask.expirationTime <= currentTime;\n callback(didUserCallbackTimeout);\n currentTime = performance.now();\n if (currentTask === taskQueue[0]) {\n taskQueue.shift();\n }\n } else taskQueue.shift();\n currentTask = taskQueue[0] || null;\n }\n return currentTask !== null;\n}\n\nconst sharedConfig = {};\nfunction setHydrateContext(context) {\n sharedConfig.context = context;\n}\nfunction nextHydrateContext() {\n return { ...sharedConfig.context,\n id: `${sharedConfig.context.id}${sharedConfig.context.count++}.`,\n count: 0\n };\n}\n\nconst equalFn = (a, b) => a === b;\nlet ERROR = null;\nlet runEffects = runQueue;\nconst NOTPENDING = {};\nconst STALE = 1;\nconst PENDING = 2;\nconst UNOWNED = {\n owned: null,\n cleanups: null,\n context: null,\n owner: null\n};\nconst [transPending, setTransPending] = createSignal(false);\nvar Owner = null;\nvar Listener = null;\nlet Pending = null;\nlet Updates = null;\nlet Effects = null;\nlet Transition = null;\nlet ExecCount = 0;\nfunction createRoot(fn, detachedOwner) {\n detachedOwner && (Owner = detachedOwner);\n const listener = Listener,\n owner = Owner,\n root = fn.length === 0 && !false ? UNOWNED : {\n owned: null,\n cleanups: null,\n context: null,\n owner,\n attached: !!detachedOwner\n };\n Owner = root;\n Listener = null;\n let result;\n try {\n runUpdates(() => result = fn(() => cleanNode(root)), true);\n } finally {\n Listener = listener;\n Owner = owner;\n }\n return result;\n}\nfunction createSignal(value, areEqual = true, options) {\n const s = {\n value,\n observers: null,\n observerSlots: null,\n pending: NOTPENDING,\n comparator: areEqual ? typeof areEqual === \"function\" ? areEqual : equalFn : undefined\n };\n return [readSignal.bind(s), writeSignal.bind(s)];\n}\nfunction createComputed(fn, value) {\n updateComputation(createComputation(fn, value, true));\n}\nfunction createRenderEffect(fn, value) {\n updateComputation(createComputation(fn, value, false));\n}\nfunction createEffect(fn, value) {\n runEffects = runUserEffects;\n const c = createComputation(fn, value, false),\n s = SuspenseContext && lookup(Owner, SuspenseContext.id);\n if (s) c.suspense = s;\n c.user = true;\n Effects && Effects.push(c);\n}\nfunction resumeEffects(e) {\n Transition && (Transition.running = true);\n Effects.push.apply(Effects, e);\n e.length = 0;\n}\nfunction createMemo(fn, value, areEqual = true) {\n const c = createComputation(fn, value, true);\n c.pending = NOTPENDING;\n c.observers = null;\n c.observerSlots = null;\n c.state = 0;\n c.comparator = areEqual ? typeof areEqual === \"function\" ? areEqual : equalFn : undefined;\n updateComputation(c);\n return readSignal.bind(c);\n}\nfunction createDeferred(source, options) {\n let t,\n timeout = options ? options.timeoutMs : undefined;\n const [deferred, setDeferred] = createSignal();\n const node = createComputation(() => {\n if (!t || !t.fn) t = requestCallback(() => setDeferred(node.value), timeout !== undefined ? {\n timeout\n } : undefined);\n return source();\n }, undefined, true);\n updateComputation(node);\n setDeferred(node.value);\n return deferred;\n}\nfunction createSelector(source, fn = equalFn) {\n let subs = new Map();\n const node = createComputation(p => {\n const v = source();\n for (const key of subs.keys()) if (fn(key, v) || p !== undefined && fn(key, p)) {\n const l = subs.get(key);\n for (const c of l.values()) {\n c.state = STALE;\n if (c.pure) Updates.push(c);else Effects.push(c);\n }\n }\n return v;\n }, undefined, true);\n updateComputation(node);\n return key => {\n let listener;\n if (listener = Listener) {\n let l;\n if (l = subs.get(key)) l.add(listener);else subs.set(key, l = new Set([listener]));\n onCleanup(() => {\n l.size > 1 ? l.delete(listener) : subs.delete(key);\n });\n }\n return fn(key, node.value);\n };\n}\nfunction batch(fn) {\n if (Pending) return fn();\n const q = Pending = [],\n result = fn();\n Pending = null;\n runUpdates(() => {\n for (let i = 0; i < q.length; i += 1) {\n const data = q[i];\n if (data.pending !== NOTPENDING) {\n const pending = data.pending;\n data.pending = NOTPENDING;\n writeSignal.call(data, pending);\n }\n }\n }, false);\n return result;\n}\nfunction useTransition() {\n return [transPending, (fn, cb) => {\n if (SuspenseContext) {\n Transition || (Transition = {\n sources: new Set(),\n effects: [],\n promises: new Set(),\n disposed: new Set(),\n running: true,\n cb: []\n });\n cb && Transition.cb.push(cb);\n Transition.running = true;\n }\n batch(fn);\n if (!SuspenseContext && cb) cb();\n }];\n}\nfunction untrack(fn) {\n let result,\n listener = Listener;\n Listener = null;\n result = fn();\n Listener = listener;\n return result;\n}\nfunction on(...args) {\n const fn = args.pop();\n let deps;\n let isArray = true;\n let prev;\n if (args.length < 2) {\n deps = args[0];\n isArray = false;\n } else deps = args;\n return prevResult => {\n let value;\n if (isArray) {\n value = [];\n if (!prev) prev = [];\n for (let i = 0; i < deps.length; i++) value.push(deps[i]());\n } else value = deps();\n const result = untrack(() => fn(value, prev, prevResult));\n prev = value;\n return result;\n };\n}\nfunction onMount(fn) {\n createEffect(() => untrack(fn));\n}\nfunction onCleanup(fn) {\n if (Owner === null) ;else if (Owner.cleanups === null) Owner.cleanups = [fn];else Owner.cleanups.push(fn);\n return fn;\n}\nfunction onError(fn) {\n ERROR || (ERROR = Symbol(\"error\"));\n if (Owner === null) ;else if (Owner.context === null) Owner.context = {\n [ERROR]: [fn]\n };else if (!Owner.context[ERROR]) Owner.context[ERROR] = [fn];else Owner.context[ERROR].push(fn);\n}\nfunction getListener() {\n return Listener;\n}\nfunction getOwner() {\n return Owner;\n}\nfunction runWithOwner(o, fn) {\n const prev = Owner;\n Owner = o;\n try {\n return fn();\n } finally {\n Owner = prev;\n }\n}\nfunction createContext(defaultValue) {\n const id = Symbol(\"context\");\n return {\n id,\n Provider: createProvider(id),\n defaultValue\n };\n}\nfunction useContext(context) {\n return lookup(Owner, context.id) || context.defaultValue;\n}\nfunction children(fn) {\n const children = createMemo(fn);\n return createMemo(() => resolveChildren(children()));\n}\nlet SuspenseContext;\nfunction getSuspenseContext() {\n return SuspenseContext || (SuspenseContext = createContext({}));\n}\nfunction createResource(fn, fetcher, options = {}) {\n if (arguments.length === 2) {\n if (typeof fetcher === \"object\") {\n options = fetcher;\n fetcher = fn;\n fn = true;\n }\n } else if (arguments.length === 1) {\n fetcher = fn;\n fn = true;\n }\n const contexts = new Set(),\n [s, set] = createSignal(options.initialValue),\n [track, trigger] = createSignal(undefined, false),\n [loading, setLoading] = createSignal(false),\n [error, setError] = createSignal();\n let err = undefined,\n pr = null,\n initP = null,\n id = null,\n loadedUnderTransition = false,\n dynamic = typeof fn === \"function\";\n if (sharedConfig.context) {\n id = `${sharedConfig.context.id}${sharedConfig.context.count++}`;\n if (sharedConfig.context.loadResource) {\n initP = sharedConfig.context.loadResource(id);\n } else if (sharedConfig.resources && id && id in sharedConfig.resources) {\n initP = sharedConfig.resources[id];\n delete sharedConfig.resources[id];\n }\n }\n function loadEnd(p, v, e) {\n if (pr === p) {\n setError(err = e);\n pr = null;\n if (Transition && p && loadedUnderTransition) {\n Transition.promises.delete(p);\n loadedUnderTransition = false;\n runUpdates(() => {\n Transition.running = true;\n if (!Transition.promises.size) {\n Effects.push.apply(Effects, Transition.effects);\n Transition.effects = [];\n }\n completeLoad(v);\n }, false);\n } else completeLoad(v);\n }\n return v;\n }\n function completeLoad(v) {\n batch(() => {\n set(v);\n setLoading(false);\n for (let c of contexts.keys()) c.decrement();\n contexts.clear();\n });\n }\n function read() {\n const c = SuspenseContext && lookup(Owner, SuspenseContext.id),\n v = s();\n if (err) throw err;\n if (Listener && !Listener.user && c) {\n createComputed(() => {\n track();\n if (pr) {\n if (c.resolved && Transition) Transition.promises.add(pr);else if (!contexts.has(c)) {\n c.increment();\n contexts.add(c);\n }\n }\n });\n }\n return v;\n }\n function load() {\n setError(err = undefined);\n let lookup = dynamic ? fn() : fn;\n loadedUnderTransition = Transition && Transition.running;\n if (lookup == null || lookup === false) {\n loadEnd(pr, untrack(s));\n return;\n }\n if (Transition && pr) Transition.promises.delete(pr);\n const p = initP || fetcher(lookup, s);\n initP = null;\n if (typeof p !== \"object\" || !(\"then\" in p)) {\n loadEnd(pr, p);\n return;\n }\n pr = p;\n batch(() => {\n setLoading(true);\n trigger();\n });\n p.then(v => loadEnd(p, v), e => loadEnd(p, e, e));\n }\n Object.defineProperties(read, {\n loading: {\n get() {\n return loading();\n }\n },\n error: {\n get() {\n return error();\n }\n }\n });\n if (dynamic) createComputed(load);else load();\n return [read, {\n refetch: load,\n mutate: set\n }];\n}\nfunction readSignal() {\n if (this.state && this.sources) {\n const updates = Updates;\n Updates = null;\n this.state === STALE ? updateComputation(this) : lookDownstream(this);\n Updates = updates;\n }\n if (Listener) {\n const sSlot = this.observers ? this.observers.length : 0;\n if (!Listener.sources) {\n Listener.sources = [this];\n Listener.sourceSlots = [sSlot];\n } else {\n Listener.sources.push(this);\n Listener.sourceSlots.push(sSlot);\n }\n if (!this.observers) {\n this.observers = [Listener];\n this.observerSlots = [Listener.sources.length - 1];\n } else {\n this.observers.push(Listener);\n this.observerSlots.push(Listener.sources.length - 1);\n }\n }\n if (Transition && Transition.running && Transition.sources.has(this)) return this.tValue;\n return this.value;\n}\nfunction writeSignal(value, isComp) {\n if (this.comparator) {\n if (Transition && Transition.running && Transition.sources.has(this)) {\n if (this.comparator(this.tValue, value)) return value;\n } else if (this.comparator(this.value, value)) return value;\n }\n if (Pending) {\n if (this.pending === NOTPENDING) Pending.push(this);\n this.pending = value;\n return value;\n }\n if (Transition) {\n if (Transition.running || !isComp && Transition.sources.has(this)) {\n Transition.sources.add(this);\n this.tValue = value;\n }\n if (!Transition.running) this.value = value;\n } else this.value = value;\n if (this.observers && (!Updates || this.observers.length)) {\n runUpdates(() => {\n for (let i = 0; i < this.observers.length; i += 1) {\n const o = this.observers[i];\n if (Transition && Transition.running && Transition.disposed.has(o)) continue;\n if (o.observers && o.state !== PENDING) markUpstream(o);\n o.state = STALE;\n if (o.pure) Updates.push(o);else Effects.push(o);\n }\n if (Updates.length > 10e5) {\n Updates = [];\n throw new Error(\"Potential Infinite Loop Detected.\");\n }\n }, false);\n }\n return value;\n}\nfunction updateComputation(node) {\n if (!node.fn) return;\n cleanNode(node);\n const owner = Owner,\n listener = Listener,\n time = ExecCount;\n Listener = Owner = node;\n runComputation(node, node.value, time);\n if (Transition && !Transition.running && Transition.sources.has(node)) {\n Transition.running = true;\n runComputation(node, node.tValue, time);\n Transition.running = false;\n }\n Listener = listener;\n Owner = owner;\n}\nfunction runComputation(node, value, time) {\n let nextValue;\n try {\n nextValue = node.fn(value);\n } catch (err) {\n handleError(err);\n }\n if (!node.updatedAt || node.updatedAt <= time) {\n if (node.observers && node.observers.length) {\n writeSignal.call(node, nextValue, true);\n } else if (Transition && Transition.running && node.pure) {\n Transition.sources.add(node);\n node.tValue = nextValue;\n } else node.value = nextValue;\n node.updatedAt = time;\n }\n}\nfunction createComputation(fn, init, pure) {\n const c = {\n fn,\n state: STALE,\n updatedAt: null,\n owned: null,\n sources: null,\n sourceSlots: null,\n cleanups: null,\n value: init,\n owner: Owner,\n context: null,\n pure\n };\n if (Owner === null) ;else if (Owner !== UNOWNED) {\n if (Transition && Transition.running && Owner.pure) {\n if (!Owner.tOwned) Owner.tOwned = [c];else Owner.tOwned.push(c);\n } else {\n if (!Owner.owned) Owner.owned = [c];else Owner.owned.push(c);\n }\n }\n return c;\n}\nfunction runTop(node) {\n let top = node.state === STALE && node,\n pending;\n if (node.suspense && untrack(node.suspense.inFallback)) return node.suspense.effects.push(node);\n const runningTransition = Transition && Transition.running;\n while ((node.fn || runningTransition && node.attached) && (node = node.owner)) {\n if (runningTransition && Transition.disposed.has(node)) return;\n if (node.state === PENDING) pending = node;else if (node.state === STALE) {\n top = node;\n pending = undefined;\n }\n }\n if (pending) {\n const updates = Updates;\n Updates = null;\n lookDownstream(pending);\n Updates = updates;\n if (!top || top.state !== STALE) return;\n if (runningTransition) {\n node = top;\n while ((node.fn || node.attached) && (node = node.owner)) {\n if (Transition.disposed.has(node)) return;\n }\n }\n }\n top && updateComputation(top);\n}\nfunction runUpdates(fn, init) {\n if (Updates) return fn();\n let wait = false;\n if (!init) Updates = [];\n if (Effects) wait = true;else Effects = [];\n ExecCount++;\n try {\n fn();\n } catch (err) {\n handleError(err);\n } finally {\n completeUpdates(wait);\n }\n}\nfunction completeUpdates(wait) {\n if (Updates) {\n runQueue(Updates);\n Updates = null;\n }\n if (wait) return;\n let cbs;\n if (Transition && Transition.running) {\n if (Transition.promises.size) {\n Transition.running = false;\n Transition.effects.push.apply(Transition.effects, Effects);\n Effects = null;\n setTransPending(true);\n return;\n }\n const sources = Transition.sources;\n cbs = Transition.cb;\n Transition = null;\n batch(() => {\n sources.forEach(v => {\n v.value = v.tValue;\n if (v.owned) {\n for (let i = 0, len = v.owned.length; i < len; i++) cleanNode(v.owned[i]);\n }\n if (v.tOwned) v.owned = v.tOwned;\n delete v.tValue;\n delete v.tOwned;\n });\n setTransPending(false);\n });\n }\n if (Effects.length) batch(() => {\n runEffects(Effects);\n Effects = null;\n });else {\n Effects = null;\n }\n if (cbs) cbs.forEach(cb => cb());\n}\nfunction runQueue(queue) {\n for (let i = 0; i < queue.length; i++) runTop(queue[i]);\n}\nfunction runUserEffects(queue) {\n let i,\n userLength = 0;\n for (i = 0; i < queue.length; i++) {\n const e = queue[i];\n if (!e.user) runTop(e);else queue[userLength++] = e;\n }\n const resume = queue.length;\n for (i = 0; i < userLength; i++) runTop(queue[i]);\n for (i = resume; i < queue.length; i++) runTop(queue[i]);\n}\nfunction lookDownstream(node) {\n node.state = 0;\n for (let i = 0; i < node.sources.length; i += 1) {\n const source = node.sources[i];\n if (source.sources) {\n if (source.state === STALE) runTop(source);else if (source.state === PENDING) lookDownstream(source);\n }\n }\n}\nfunction markUpstream(node) {\n for (let i = 0; i < node.observers.length; i += 1) {\n const o = node.observers[i];\n if (!o.state) {\n o.state = PENDING;\n o.observers && markUpstream(o);\n }\n }\n}\nfunction cleanNode(node) {\n let i;\n if (node.sources) {\n while (node.sources.length) {\n const source = node.sources.pop(),\n index = node.sourceSlots.pop(),\n obs = source.observers;\n if (obs && obs.length) {\n const n = obs.pop(),\n s = source.observerSlots.pop();\n if (index < obs.length) {\n n.sourceSlots[s] = index;\n obs[index] = n;\n source.observerSlots[index] = s;\n }\n }\n }\n }\n if (Transition && Transition.running && node.pure) {\n if (node.tOwned) {\n for (i = 0; i < node.tOwned.length; i++) cleanNode(node.tOwned[i]);\n delete node.tOwned;\n }\n reset(node, true);\n } else if (node.owned) {\n for (i = 0; i < node.owned.length; i++) cleanNode(node.owned[i]);\n node.owned = null;\n }\n if (node.cleanups) {\n for (i = 0; i < node.cleanups.length; i++) node.cleanups[i]();\n node.cleanups = null;\n }\n node.state = 0;\n node.context = null;\n}\nfunction reset(node, top) {\n if (!top) {\n node.state = 0;\n Transition.disposed.add(node);\n }\n if (node.owned) {\n for (let i = 0; i < node.owned.length; i++) reset(node.owned[i]);\n }\n}\nfunction handleError(err) {\n const fns = ERROR && lookup(Owner, ERROR);\n if (!fns) throw err;\n fns.forEach(f => f(err));\n}\nfunction lookup(owner, key) {\n return owner && (owner.context && owner.context[key] || owner.owner && lookup(owner.owner, key));\n}\nfunction resolveChildren(children) {\n if (typeof children === \"function\" && !children.length) return resolveChildren(children());\n if (Array.isArray(children)) {\n const results = [];\n for (let i = 0; i < children.length; i++) {\n let result = resolveChildren(children[i]);\n Array.isArray(result) ? results.push.apply(results, result) : results.push(result);\n }\n return results;\n }\n return children;\n}\nfunction createProvider(id) {\n return function provider(props) {\n return createMemo(() => {\n Owner.context = {\n [id]: props.value\n };\n return children(() => props.children);\n });\n };\n}\n\nconst $RAW = Symbol(\"state-raw\"),\n $NODE = Symbol(\"state-node\"),\n $PROXY = Symbol(\"state-proxy\"),\n $NAME = Symbol(\"state-name\");\nfunction wrap$1(value, name) {\n let p = value[$PROXY];\n if (!p) {\n Object.defineProperty(value, $PROXY, {\n value: p = new Proxy(value, proxyTraps$1)\n });\n let keys = Object.keys(value),\n desc = Object.getOwnPropertyDescriptors(value);\n for (let i = 0, l = keys.length; i < l; i++) {\n const prop = keys[i];\n if (desc[prop].get) {\n const get = desc[prop].get.bind(p);\n Object.defineProperty(value, prop, {\n get\n });\n }\n }\n }\n return p;\n}\nfunction isWrappable(obj) {\n return obj != null && typeof obj === \"object\" && (!obj.__proto__ || obj.__proto__ === Object.prototype || Array.isArray(obj));\n}\nfunction unwrap(item, set = new Set()) {\n let result, unwrapped, v, prop;\n if (result = item != null && item[$RAW]) return result;\n if (!isWrappable(item) || set.has(item)) return item;\n if (Array.isArray(item)) {\n if (Object.isFrozen(item)) item = item.slice(0);else set.add(item);\n for (let i = 0, l = item.length; i < l; i++) {\n v = item[i];\n if ((unwrapped = unwrap(v, set)) !== v) item[i] = unwrapped;\n }\n } else {\n if (Object.isFrozen(item)) item = Object.assign({}, item);else set.add(item);\n let keys = Object.keys(item),\n desc = Object.getOwnPropertyDescriptors(item);\n for (let i = 0, l = keys.length; i < l; i++) {\n prop = keys[i];\n if (desc[prop].get) continue;\n v = item[prop];\n if ((unwrapped = unwrap(v, set)) !== v) item[prop] = unwrapped;\n }\n }\n return item;\n}\nfunction getDataNodes(target) {\n let nodes = target[$NODE];\n if (!nodes) Object.defineProperty(target, $NODE, {\n value: nodes = {}\n });\n return nodes;\n}\nfunction proxyDescriptor(target, property) {\n const desc = Reflect.getOwnPropertyDescriptor(target, property);\n if (!desc || desc.get || property === $PROXY || property === $NODE || property === $NAME) return desc;\n delete desc.value;\n delete desc.writable;\n desc.get = () => target[$PROXY][property];\n return desc;\n}\nfunction createDataNode() {\n const [s, set] = createSignal(undefined, false);\n s.set = set;\n return s;\n}\nconst proxyTraps$1 = {\n get(target, property, receiver) {\n if (property === $RAW) return target;\n if (property === $PROXY) return receiver;\n const value = target[property];\n if (property === $NODE || property === \"__proto__\") return value;\n const wrappable = isWrappable(value);\n if (Listener && (typeof value !== \"function\" || target.hasOwnProperty(property))) {\n let nodes, node;\n if (wrappable && (nodes = getDataNodes(value))) {\n node = nodes._ || (nodes._ = createDataNode());\n node();\n }\n nodes = getDataNodes(target);\n node = nodes[property] || (nodes[property] = createDataNode());\n node();\n }\n return wrappable ? wrap$1(value) : value;\n },\n set() {\n return true;\n },\n deleteProperty() {\n return true;\n },\n getOwnPropertyDescriptor: proxyDescriptor\n};\nfunction setProperty(state, property, value) {\n if (state[property] === value) return;\n const array = Array.isArray(state);\n const len = state.length;\n const notify = array || !(property in state);\n if (value === undefined) {\n delete state[property];\n } else state[property] = value;\n let nodes = getDataNodes(state),\n node;\n (node = nodes[property]) && node.set();\n if (array && state.length !== len) (node = nodes.length) && node.set();\n notify && (node = nodes._) && node.set();\n}\nfunction mergeState(state, value) {\n const keys = Object.keys(value);\n for (let i = 0; i < keys.length; i += 1) {\n const key = keys[i];\n setProperty(state, key, value[key]);\n }\n}\nfunction updatePath(current, path, traversed = []) {\n let part,\n prev = current;\n if (path.length > 1) {\n part = path.shift();\n const partType = typeof part,\n isArray = Array.isArray(current);\n if (Array.isArray(part)) {\n for (let i = 0; i < part.length; i++) {\n updatePath(current, [part[i]].concat(path), [part[i]].concat(traversed));\n }\n return;\n } else if (isArray && partType === \"function\") {\n for (let i = 0; i < current.length; i++) {\n if (part(current[i], i)) updatePath(current, [i].concat(path), [i].concat(traversed));\n }\n return;\n } else if (isArray && partType === \"object\") {\n const {\n from = 0,\n to = current.length - 1,\n by = 1\n } = part;\n for (let i = from; i <= to; i += by) {\n updatePath(current, [i].concat(path), [i].concat(traversed));\n }\n return;\n } else if (path.length > 1) {\n updatePath(current[part], path, [part].concat(traversed));\n return;\n }\n prev = current[part];\n traversed = [part].concat(traversed);\n }\n let value = path[0];\n if (typeof value === \"function\") {\n value = value(prev, traversed);\n if (value === prev) return;\n }\n if (part === undefined && value == undefined) return;\n value = unwrap(value);\n if (part === undefined || isWrappable(prev) && isWrappable(value) && !Array.isArray(value)) {\n mergeState(prev, value);\n } else setProperty(current, part, value);\n}\nfunction createState(state, options) {\n const unwrappedState = unwrap(state || {});\n const wrappedState = wrap$1(unwrappedState);\n function setState(...args) {\n batch(() => updatePath(unwrappedState, args));\n }\n return [wrappedState, setState];\n}\n\nconst proxyTraps = {\n get(target, property, receiver) {\n if (property === $RAW) return target;\n if (property === $PROXY) return receiver;\n const value = target[property];\n if (property === $NODE || property === \"__proto__\") return value;\n const wrappable = isWrappable(value);\n if (Listener && (typeof value !== \"function\" || target.hasOwnProperty(property))) {\n let nodes, node;\n if (wrappable && (nodes = getDataNodes(value))) {\n node = nodes._ || (nodes._ = createDataNode());\n node();\n }\n nodes = getDataNodes(target);\n node = nodes[property] || (nodes[property] = createDataNode());\n node();\n }\n return wrappable ? wrap(value) : value;\n },\n set(target, property, value) {\n setProperty(target, property, unwrap(value));\n return true;\n },\n deleteProperty(target, property) {\n setProperty(target, property, undefined);\n return true;\n },\n getOwnPropertyDescriptor: proxyDescriptor\n};\nfunction wrap(value, name) {\n let p = value[$PROXY];\n if (!p) {\n Object.defineProperty(value, $PROXY, {\n value: p = new Proxy(value, proxyTraps)\n });\n let keys = Object.keys(value),\n desc = Object.getOwnPropertyDescriptors(value);\n for (let i = 0, l = keys.length; i < l; i++) {\n const prop = keys[i];\n if (desc[prop].get) {\n const get = desc[prop].get.bind(p);\n Object.defineProperty(value, prop, {\n get\n });\n }\n if (desc[prop].set) {\n const og = desc[prop].set,\n set = v => batch(() => og.call(p, v));\n Object.defineProperty(value, prop, {\n set\n });\n }\n }\n }\n return p;\n}\nfunction createMutable(state, options) {\n const unwrappedState = unwrap(state || {});\n const wrappedState = wrap(unwrappedState);\n return wrappedState;\n}\n\nfunction applyState(target, parent, property, merge, key) {\n let previous = parent[property];\n if (target === previous) return;\n if (!isWrappable(target) || !isWrappable(previous) || key && target[key] !== previous[key]) {\n target !== previous && setProperty(parent, property, target);\n return;\n }\n if (Array.isArray(target)) {\n if (target.length && previous.length && (!merge || key && target[0][key] != null)) {\n let i, j, start, end, newEnd, item, newIndicesNext, keyVal;\n for (start = 0, end = Math.min(previous.length, target.length); start < end && (previous[start] === target[start] || key && previous[start][key] === target[start][key]); start++) {\n applyState(target[start], previous, start, merge, key);\n }\n const temp = new Array(target.length),\n newIndices = new Map();\n for (end = previous.length - 1, newEnd = target.length - 1; end >= start && newEnd >= start && (previous[end] === target[newEnd] || key && previous[end][key] === target[newEnd][key]); end--, newEnd--) {\n temp[newEnd] = previous[end];\n }\n if (start > newEnd || start > end) {\n for (j = start; j <= newEnd; j++) setProperty(previous, j, target[j]);\n for (; j < target.length; j++) {\n setProperty(previous, j, temp[j]);\n applyState(target[j], previous, j, merge, key);\n }\n if (previous.length > target.length) setProperty(previous, \"length\", target.length);\n return;\n }\n newIndicesNext = new Array(newEnd + 1);\n for (j = newEnd; j >= start; j--) {\n item = target[j];\n keyVal = key ? item[key] : item;\n i = newIndices.get(keyVal);\n newIndicesNext[j] = i === undefined ? -1 : i;\n newIndices.set(keyVal, j);\n }\n for (i = start; i <= end; i++) {\n item = previous[i];\n keyVal = key ? item[key] : item;\n j = newIndices.get(keyVal);\n if (j !== undefined && j !== -1) {\n temp[j] = previous[i];\n j = newIndicesNext[j];\n newIndices.set(keyVal, j);\n }\n }\n for (j = start; j < target.length; j++) {\n if (j in temp) {\n setProperty(previous, j, temp[j]);\n applyState(target[j], previous, j, merge, key);\n } else setProperty(previous, j, target[j]);\n }\n } else {\n for (let i = 0, len = target.length; i < len; i++) {\n applyState(target[i], previous, i, merge, key);\n }\n }\n if (previous.length > target.length) setProperty(previous, \"length\", target.length);\n return;\n }\n const targetKeys = Object.keys(target);\n for (let i = 0, len = targetKeys.length; i < len; i++) {\n applyState(target[targetKeys[i]], previous, targetKeys[i], merge, key);\n }\n const previousKeys = Object.keys(previous);\n for (let i = 0, len = previousKeys.length; i < len; i++) {\n if (target[previousKeys[i]] === undefined) setProperty(previous, previousKeys[i], undefined);\n }\n}\nfunction reconcile(value, options = {}) {\n const {\n merge,\n key = \"id\"\n } = options,\n v = unwrap(value);\n return state => {\n if (!isWrappable(state) || !isWrappable(v)) return v;\n applyState(v, {\n state\n }, \"state\", merge, key);\n return state;\n };\n}\nconst setterTraps = {\n get(target, property) {\n if (property === $RAW) return target;\n const value = target[property];\n return isWrappable(value) ? new Proxy(value, setterTraps) : value;\n },\n set(target, property, value) {\n setProperty(target, property, unwrap(value));\n return true;\n },\n deleteProperty(target, property) {\n setProperty(target, property, undefined);\n return true;\n }\n};\nfunction produce(fn) {\n return state => {\n if (isWrappable(state)) fn(new Proxy(state, setterTraps));\n return state;\n };\n}\n\nconst FALLBACK = Symbol(\"fallback\");\nfunction mapArray(list, mapFn, options = {}) {\n let items = [],\n mapped = [],\n disposers = [],\n len = 0,\n indexes = mapFn.length > 1 ? [] : null,\n ctx = Owner;\n onCleanup(() => {\n for (let i = 0, length = disposers.length; i < length; i++) disposers[i]();\n });\n return () => {\n let newItems = list() || [],\n i,\n j;\n return untrack(() => {\n let newLen = newItems.length,\n newIndices,\n newIndicesNext,\n temp,\n tempdisposers,\n tempIndexes,\n start,\n end,\n newEnd,\n item;\n if (newLen === 0) {\n if (len !== 0) {\n for (i = 0; i < len; i++) disposers[i]();\n disposers = [];\n items = [];\n mapped = [];\n len = 0;\n indexes && (indexes = []);\n }\n if (options.fallback) {\n items = [FALLBACK];\n mapped[0] = createRoot(disposer => {\n disposers[0] = disposer;\n return options.fallback();\n }, ctx);\n len = 1;\n }\n }\n else if (len === 0) {\n for (j = 0; j < newLen; j++) {\n items[j] = newItems[j];\n mapped[j] = createRoot(mapper, ctx);\n }\n len = newLen;\n } else {\n temp = new Array(newLen);\n tempdisposers = new Array(newLen);\n indexes && (tempIndexes = new Array(newLen));\n for (start = 0, end = Math.min(len, newLen); start < end && items[start] === newItems[start]; start++);\n for (end = len - 1, newEnd = newLen - 1; end >= start && newEnd >= start && items[end] === newItems[newEnd]; end--, newEnd--) {\n temp[newEnd] = mapped[end];\n tempdisposers[newEnd] = disposers[end];\n indexes && (tempIndexes[newEnd] = indexes[end]);\n }\n newIndices = new Map();\n newIndicesNext = new Array(newEnd + 1);\n for (j = newEnd; j >= start; j--) {\n item = newItems[j];\n i = newIndices.get(item);\n newIndicesNext[j] = i === undefined ? -1 : i;\n newIndices.set(item, j);\n }\n for (i = start; i <= end; i++) {\n item = items[i];\n j = newIndices.get(item);\n if (j !== undefined && j !== -1) {\n temp[j] = mapped[i];\n tempdisposers[j] = disposers[i];\n indexes && (tempIndexes[j] = indexes[i]);\n j = newIndicesNext[j];\n newIndices.set(item, j);\n } else disposers[i]();\n }\n for (j = start; j < newLen; j++) {\n if (j in temp) {\n mapped[j] = temp[j];\n disposers[j] = tempdisposers[j];\n if (indexes) {\n indexes[j] = tempIndexes[j];\n indexes[j](j);\n }\n } else mapped[j] = createRoot(mapper, ctx);\n }\n len = mapped.length = newLen;\n items = newItems.slice(0);\n }\n return mapped;\n });\n function mapper(disposer) {\n disposers[j] = disposer;\n if (indexes) {\n const [s, set] = createSignal(j);\n indexes[j] = set;\n return mapFn(newItems[j], s);\n }\n return mapFn(newItems[j]);\n }\n };\n}\nfunction indexArray(list, mapFn, options = {}) {\n let items = [],\n mapped = [],\n disposers = [],\n signals = [],\n len = 0,\n i,\n ctx = Owner;\n onCleanup(() => {\n for (let i = 0, length = disposers.length; i < length; i++) disposers[i]();\n });\n return () => {\n const newItems = list() || [];\n return untrack(() => {\n if (newItems.length === 0) {\n if (len !== 0) {\n for (i = 0; i < len; i++) disposers[i]();\n disposers = [];\n items = [];\n mapped = [];\n len = 0;\n signals = [];\n }\n if (options.fallback) {\n items = [FALLBACK];\n mapped[0] = createRoot(disposer => {\n disposers[0] = disposer;\n return options.fallback();\n }, ctx);\n len = 1;\n }\n return mapped;\n }\n if (items[0] === FALLBACK) {\n disposers[0]();\n disposers = [];\n items = [];\n mapped = [];\n len = 0;\n }\n for (i = 0; i < newItems.length; i++) {\n if (i < items.length && items[i] !== newItems[i]) {\n signals[i](newItems[i]);\n } else if (i >= items.length) {\n mapped[i] = createRoot(mapper, ctx);\n }\n }\n for (; i < items.length; i++) {\n disposers[i]();\n }\n len = mapped.length = signals.length = disposers.length = newItems.length;\n items = newItems.slice(0);\n return mapped;\n });\n function mapper(disposer) {\n disposers[i] = disposer;\n const [s, set] = createSignal(newItems[i], false);\n signals[i] = set;\n return mapFn(s, i);\n }\n };\n}\n\nfunction createComponent(Comp, props) {\n if (sharedConfig.context) {\n const c = sharedConfig.context;\n setHydrateContext(nextHydrateContext());\n const r = untrack(() => Comp(props));\n setHydrateContext(c);\n return r;\n }\n return untrack(() => Comp(props));\n}\nfunction trueFn() {\n return true;\n}\nconst propTraps = {\n get(_, property, receiver) {\n if (property === $PROXY) return receiver;\n return _.get(property);\n },\n has(_, property) {\n return _.has(property);\n },\n set: trueFn,\n deleteProperty: trueFn,\n getOwnPropertyDescriptor(_, property) {\n return {\n configurable: true,\n enumerable: true,\n get() {\n return _.get(property);\n },\n set: trueFn,\n deleteProperty: trueFn\n };\n },\n ownKeys(_) {\n return _.keys();\n }\n};\nfunction mergeProps(...sources) {\n return new Proxy({\n get(property) {\n for (let i = sources.length - 1; i >= 0; i--) {\n const v = sources[i][property];\n if (v !== undefined) return v;\n }\n },\n has(property) {\n for (let i = sources.length - 1; i >= 0; i--) {\n if (property in sources[i]) return true;\n }\n return false;\n },\n keys() {\n const keys = [];\n for (let i = 0; i < sources.length; i++) keys.push(...Object.keys(sources[i]));\n return [...new Set(keys)];\n }\n }, propTraps);\n}\nfunction splitProps(props, ...keys) {\n const blocked = new Set(keys.flat());\n const descriptors = Object.getOwnPropertyDescriptors(props);\n const res = keys.map(k => {\n const clone = {};\n for (let i = 0; i < k.length; i++) {\n const key = k[i];\n if (descriptors[key]) Object.defineProperty(clone, key, descriptors[key]);\n }\n return clone;\n });\n res.push(new Proxy({\n get(property) {\n return blocked.has(property) ? undefined : props[property];\n },\n has(property) {\n return blocked.has(property) ? false : property in props;\n },\n keys() {\n return Object.keys(props).filter(k => !blocked.has(k));\n }\n }, propTraps));\n return res;\n}\nfunction lazy(fn) {\n let p;\n const wrap = props => {\n const ctx = sharedConfig.context;\n let comp;\n if (ctx && sharedConfig.resources) {\n ctx.count++;\n const [s, set] = createSignal();\n (p || (p = fn())).then(mod => {\n setHydrateContext(ctx);\n set(mod.default);\n setHydrateContext(undefined);\n });\n comp = s;\n } else {\n const [s] = createResource(() => (p || (p = fn())).then(mod => mod.default));\n comp = s;\n }\n let Comp;\n return createMemo(() => (Comp = comp()) && untrack(() => {\n if (!ctx) return Comp(props);\n const c = sharedConfig.context;\n setHydrateContext(ctx);\n const r = Comp(props);\n setHydrateContext(c);\n return r;\n }));\n };\n wrap.preload = () => (p || (p = fn())).then(mod => mod.default);\n return wrap;\n}\n\nfunction For(props) {\n const fallback = \"fallback\" in props && {\n fallback: () => props.fallback\n };\n return createMemo(mapArray(() => props.each, props.children, fallback ? fallback : undefined), undefined, false);\n}\nfunction Index(props) {\n const fallback = \"fallback\" in props && {\n fallback: () => props.fallback\n };\n return createMemo(indexArray(() => props.each, props.children, fallback ? fallback : undefined), undefined, false);\n}\nfunction Show(props) {\n let strictEqual = false;\n const condition = createMemo(() => props.when, undefined, (a, b) => strictEqual ? a === b : !a === !b);\n return createMemo(() => {\n const c = condition();\n if (c) {\n const child = props.children;\n return (strictEqual = typeof child === \"function\" && child.length > 0) ? untrack(() => child(c)) : child;\n }\n return props.fallback;\n });\n}\nfunction Switch(props) {\n let strictEqual = false;\n const conditions = children(() => props.children),\n evalConditions = createMemo(() => {\n let conds = conditions();\n if (!Array.isArray(conds)) conds = [conds];\n for (let i = 0; i < conds.length; i++) {\n const c = conds[i].when;\n if (c) return [i, c, conds[i]];\n }\n return [-1];\n }, undefined, (a, b) => a && a[0] === b[0] && (strictEqual ? a[1] === b[1] : !a[1] === !b[1]) && a[2] === b[2]);\n return createMemo(() => {\n const [index, when, cond] = evalConditions();\n if (index < 0) return props.fallback;\n const c = cond.children;\n return (strictEqual = typeof c === \"function\" && c.length > 0) ? untrack(() => c(when)) : c;\n });\n}\nfunction Match(props) {\n return props;\n}\nfunction ErrorBoundary(props) {\n const [errored, setErrored] = createSignal();\n onError(setErrored);\n let e;\n return createMemo(() => {\n if ((e = errored()) != null) {\n const f = props.fallback;\n return typeof f === \"function\" && f.length ? untrack(() => f(e, () => setErrored(null))) : f;\n }\n return props.children;\n });\n}\n\nconst SuspenseListContext = createContext();\nfunction SuspenseList(props) {\n let index = 0,\n suspenseSetter,\n showContent,\n showFallback;\n const listContext = useContext(SuspenseListContext);\n if (listContext) {\n const [inFallback, setFallback] = createSignal(false);\n suspenseSetter = setFallback;\n [showContent, showFallback] = listContext.register(inFallback);\n }\n const registry = [],\n comp = createComponent(SuspenseListContext.Provider, {\n value: {\n register: inFallback => {\n const [showingContent, showContent] = createSignal(false),\n [showingFallback, showFallback] = createSignal(false);\n registry[index++] = {\n inFallback,\n showContent,\n showFallback\n };\n return [showingContent, showingFallback];\n }\n },\n get children() {\n return props.children;\n }\n });\n createComputed(() => {\n const reveal = props.revealOrder,\n tail = props.tail,\n visibleContent = showContent ? showContent() : true,\n visibleFallback = showFallback ? showFallback() : true,\n reverse = reveal === \"backwards\";\n if (reveal === \"together\") {\n const all = registry.every(i => !i.inFallback());\n suspenseSetter && suspenseSetter(!all);\n registry.forEach(i => {\n i.showContent(all && visibleContent);\n i.showFallback(visibleFallback);\n });\n return;\n }\n let stop = false;\n for (let i = 0, len = registry.length; i < len; i++) {\n const n = reverse ? len - i - 1 : i,\n s = registry[n].inFallback();\n if (!stop && !s) {\n registry[n].showContent(visibleContent);\n registry[n].showFallback(visibleFallback);\n } else {\n const next = !stop;\n if (next && suspenseSetter) suspenseSetter(true);\n if (!tail || next && tail === \"collapsed\") {\n registry[n].showFallback(visibleFallback);\n } else registry[n].showFallback(false);\n stop = true;\n registry[n].showContent(next);\n }\n }\n if (!stop && suspenseSetter) suspenseSetter(false);\n });\n return comp;\n}\nfunction Suspense(props) {\n let counter = 0,\n showContent,\n showFallback;\n const [inFallback, setFallback] = createSignal(false),\n SuspenseContext = getSuspenseContext(),\n store = {\n increment: () => {\n if (++counter === 1) setFallback(true);\n },\n decrement: () => {\n if (--counter === 0) setFallback(false);\n },\n inFallback,\n effects: [],\n resolved: false\n };\n const listContext = useContext(SuspenseListContext);\n if (listContext) [showContent, showFallback] = listContext.register(store.inFallback);\n return createComponent(SuspenseContext.Provider, {\n value: store,\n get children() {\n const rendered = untrack(() => props.children);\n return createMemo(() => {\n const inFallback = store.inFallback(),\n visibleContent = showContent ? showContent() : true,\n visibleFallback = showFallback ? showFallback() : true;\n if (!inFallback && visibleContent) {\n store.resolved = true;\n resumeEffects(store.effects);\n return rendered;\n }\n if (!visibleFallback) return;\n return props.fallback;\n });\n }\n });\n}\n\nfunction awaitSuspense() {}\nlet DEV;\n\nexport { $RAW, DEV, ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, awaitSuspense, batch, cancelCallback, children, createComponent, createComputed, createContext, createDeferred, createEffect, createMemo, createMutable, createRenderEffect, createResource, createRoot, createSelector, createSignal, createState, equalFn, getListener, getOwner, indexArray, lazy, mapArray, mergeProps, on, onCleanup, onError, onMount, produce, reconcile, requestCallback, runWithOwner, sharedConfig, splitProps, untrack, unwrap, useContext, useTransition };\n","import { createMemo, createRoot, createRenderEffect, sharedConfig, createSignal, onCleanup, splitProps, untrack } from 'solid-js';\nexport { ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, createComponent, createRenderEffect as effect, getOwner, mergeProps } from 'solid-js';\n\nconst booleans = [\"allowfullscreen\", \"allowpaymentrequest\", \"async\", \"autofocus\", \"autoplay\", \"checked\", \"controls\", \"default\", \"disabled\", \"formnovalidate\", \"hidden\", \"ismap\", \"itemscope\", \"loop\", \"multiple\", \"muted\", \"nomodule\", \"novalidate\", \"open\", \"playsinline\", \"readonly\", \"required\", \"reversed\", \"seamless\", \"selected\", \"truespeed\"];\nconst Properties = new Set([\"className\", \"indeterminate\", \"value\", ...booleans]);\nconst ChildProperties = new Set([\"innerHTML\", \"textContent\", \"innerText\", \"children\"]);\nconst Aliases = {\n className: \"class\",\n htmlFor: \"for\"\n};\nconst DelegatedEvents = new Set([\"beforeinput\", \"click\", \"dblclick\", \"focusin\", \"focusout\", \"input\", \"keydown\", \"keyup\", \"mousedown\", \"mousemove\", \"mouseout\", \"mouseover\", \"mouseup\", \"pointerdown\", \"pointermove\", \"pointerout\", \"pointerover\", \"pointerup\", \"touchend\", \"touchmove\", \"touchstart\"]);\nconst SVGElements = new Set([\n\"altGlyph\", \"altGlyphDef\", \"altGlyphItem\", \"animate\", \"animateColor\", \"animateMotion\", \"animateTransform\", \"circle\", \"clipPath\", \"color-profile\", \"cursor\", \"defs\", \"desc\", \"ellipse\", \"feBlend\", \"feColorMatrix\", \"feComponentTransfer\", \"feComposite\", \"feConvolveMatrix\", \"feDiffuseLighting\", \"feDisplacementMap\", \"feDistantLight\", \"feFlood\", \"feFuncA\", \"feFuncB\", \"feFuncG\", \"feFuncR\", \"feGaussianBlur\", \"feImage\", \"feMerge\", \"feMergeNode\", \"feMorphology\", \"feOffset\", \"fePointLight\", \"feSpecularLighting\", \"feSpotLight\", \"feTile\", \"feTurbulence\", \"filter\", \"font\", \"font-face\", \"font-face-format\", \"font-face-name\", \"font-face-src\", \"font-face-uri\", \"foreignObject\", \"g\", \"glyph\", \"glyphRef\", \"hkern\", \"image\", \"line\", \"linearGradient\", \"marker\", \"mask\", \"metadata\", \"missing-glyph\", \"mpath\", \"path\", \"pattern\", \"polygon\", \"polyline\", \"radialGradient\", \"rect\",\n\"set\", \"stop\",\n\"svg\", \"switch\", \"symbol\", \"text\", \"textPath\",\n\"tref\", \"tspan\", \"use\", \"view\", \"vkern\"]);\nconst SVGNamespace = {\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\"\n};\n\nfunction memo(fn, equal) {\n return createMemo(fn, undefined, equal);\n}\n\nfunction reconcileArrays(parentNode, a, b) {\n let bLength = b.length,\n aEnd = a.length,\n bEnd = bLength,\n aStart = 0,\n bStart = 0,\n after = a[aEnd - 1].nextSibling,\n map = null;\n while (aStart < aEnd || bStart < bEnd) {\n if (aEnd === aStart) {\n const node = bEnd < bLength ? bStart ? b[bStart - 1].nextSibling : b[bEnd - bStart] : after;\n while (bStart < bEnd) parentNode.insertBefore(b[bStart++], node);\n } else if (bEnd === bStart) {\n while (aStart < aEnd) {\n if (!map || !map.has(a[aStart])) parentNode.removeChild(a[aStart]);\n aStart++;\n }\n } else if (a[aStart] === b[bStart]) {\n aStart++;\n bStart++;\n } else if (a[aEnd - 1] === b[bEnd - 1]) {\n aEnd--;\n bEnd--;\n } else if (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]) {\n const node = a[--aEnd].nextSibling;\n parentNode.insertBefore(b[bStart++], a[aStart++].nextSibling);\n parentNode.insertBefore(b[--bEnd], node);\n a[aEnd] = b[bEnd];\n } else {\n if (!map) {\n map = new Map();\n let i = bStart;\n while (i < bEnd) map.set(b[i], i++);\n }\n const index = map.get(a[aStart]);\n if (index != null) {\n if (bStart < index && index < bEnd) {\n let i = aStart,\n sequence = 1,\n t;\n while (++i < aEnd && i < bEnd) {\n if ((t = map.get(a[i])) == null || t !== index + sequence) break;\n sequence++;\n }\n if (sequence > index - bStart) {\n const node = a[aStart];\n while (bStart < index) parentNode.insertBefore(b[bStart++], node);\n } else parentNode.replaceChild(b[bStart++], a[aStart++]);\n } else aStart++;\n } else parentNode.removeChild(a[aStart++]);\n }\n }\n}\n\nconst $$EVENTS = Symbol(\"delegated-events\");\nfunction render(code, element, init) {\n let disposer;\n createRoot(dispose => {\n disposer = dispose;\n insert(element, code(), element.firstChild ? null : undefined, init);\n });\n return () => {\n disposer();\n element.textContent = \"\";\n };\n}\nfunction template(html, check, isSVG) {\n const t = document.createElement(\"template\");\n t.innerHTML = html;\n if (check && t.innerHTML.split(\"<\").length - 1 !== check) throw `Template html does not match input:\\n${t.innerHTML}\\n\\n${html}`;\n let node = t.content.firstChild;\n if (isSVG) node = node.firstChild;\n return node;\n}\nfunction delegateEvents(eventNames) {\n const e = document[$$EVENTS] || (document[$$EVENTS] = new Set());\n for (let i = 0, l = eventNames.length; i < l; i++) {\n const name = eventNames[i];\n if (!e.has(name)) {\n e.add(name);\n document.addEventListener(name, eventHandler);\n }\n }\n}\nfunction clearDelegatedEvents() {\n if (document[$$EVENTS]) {\n for (let name of document[$$EVENTS].keys()) document.removeEventListener(name, eventHandler);\n delete document[$$EVENTS];\n }\n}\nfunction setAttribute(node, name, value) {\n if (value == null) node.removeAttribute(name);else node.setAttribute(name, value);\n}\nfunction setAttributeNS(node, namespace, name, value) {\n if (value == null) node.removeAttributeNS(namespace, name);else node.setAttributeNS(namespace, name, value);\n}\nfunction addEventListener(node, name, handler, delegate) {\n if (delegate) {\n if (Array.isArray(handler)) {\n node[`$$${name}`] = handler[0];\n node[`$$${name}Data`] = handler[1];\n } else node[`$$${name}`] = handler;\n } else if (Array.isArray(handler)) {\n node.addEventListener(name, e => handler[0](handler[1], e));\n } else node.addEventListener(name, handler);\n}\nfunction classList(node, value, prev = {}) {\n const classKeys = Object.keys(value),\n prevKeys = Object.keys(prev);\n let i, len;\n for (i = 0, len = prevKeys.length; i < len; i++) {\n const key = prevKeys[i];\n if (!key || key === \"undefined\" || key in value) continue;\n toggleClassKey(node, key, false);\n delete prev[key];\n }\n for (i = 0, len = classKeys.length; i < len; i++) {\n const key = classKeys[i],\n classValue = !!value[key];\n if (!key || key === \"undefined\" || prev[key] === classValue) continue;\n toggleClassKey(node, key, classValue);\n prev[key] = classValue;\n }\n return value;\n}\nfunction style(node, value, prev = {}) {\n const nodeStyle = node.style;\n if (typeof value === \"string\") return nodeStyle.cssText = value;\n typeof prev === \"string\" && (prev = {});\n let v, s;\n for (s in prev) {\n value[s] == null && nodeStyle.removeProperty(s);\n delete prev[s];\n }\n for (s in value) {\n v = value[s];\n if (v !== prev[s]) {\n nodeStyle.setProperty(s, v);\n prev[s] = v;\n }\n }\n return prev;\n}\nfunction spread(node, accessor, isSVG, skipChildren) {\n if (typeof accessor === \"function\") {\n createRenderEffect(current => spreadExpression(node, accessor(), current, isSVG, skipChildren));\n } else spreadExpression(node, accessor, undefined, isSVG, skipChildren);\n}\nfunction dynamicProperty(props, key) {\n const src = props[key];\n Object.defineProperty(props, key, {\n get() {\n return src();\n },\n enumerable: true\n });\n return props;\n}\nfunction insert(parent, accessor, marker, initial) {\n if (marker !== undefined && !initial) initial = [];\n if (typeof accessor !== \"function\") return insertExpression(parent, accessor, initial, marker);\n createRenderEffect(current => insertExpression(parent, accessor(), current, marker), initial);\n}\nfunction assign(node, props, isSVG, skipChildren, prevProps = {}) {\n let isCE, isProp, isChildProp;\n for (const prop in props) {\n if (prop === \"children\") {\n if (!skipChildren) insertExpression(node, props.children);\n continue;\n }\n const value = props[prop];\n if (value === prevProps[prop]) continue;\n if (prop === \"style\") {\n style(node, value, prevProps[prop]);\n } else if (prop === \"class\" && !isSVG) {\n node.className = value;\n } else if (prop === \"classList\") {\n classList(node, value, prevProps[prop]);\n } else if (prop === \"ref\") {\n value(node);\n } else if (prop.slice(0, 3) === \"on:\") {\n node.addEventListener(prop.slice(3), value);\n } else if (prop.slice(0, 10) === \"oncapture:\") {\n node.addEventListener(prop.slice(10), value, true);\n } else if (prop.slice(0, 2) === \"on\") {\n const name = prop.slice(2).toLowerCase();\n const delegate = DelegatedEvents.has(name);\n addEventListener(node, name, value, delegate);\n delegate && delegateEvents([name]);\n } else if ((isChildProp = ChildProperties.has(prop)) || !isSVG && (isProp = Properties.has(prop)) || (isCE = node.nodeName.includes(\"-\"))) {\n if (isCE && !isProp && !isChildProp) node[toPropertyName(prop)] = value;else node[prop] = value;\n } else {\n const ns = isSVG && prop.indexOf(\":\") > -1 && SVGNamespace[prop.split(\":\")[0]];\n if (ns) setAttributeNS(node, ns, prop, value);else setAttribute(node, Aliases[prop] || prop, value);\n }\n prevProps[prop] = value;\n }\n}\nfunction hydrate(code, element) {\n sharedConfig.resources = globalThis._$HYDRATION.resources;\n sharedConfig.completed = globalThis._$HYDRATION.completed;\n sharedConfig.events = globalThis._$HYDRATION.events;\n sharedConfig.context = {\n id: \"\",\n count: 0,\n loadResource: globalThis._$HYDRATION.loadResource\n };\n sharedConfig.registry = new Map();\n gatherHydratable(element);\n const dispose = render(code, element, [...element.childNodes]);\n sharedConfig.context = null;\n return dispose;\n}\nfunction gatherHydratable(element) {\n const templates = element.querySelectorAll(`*[data-hk]`);\n for (let i = 0; i < templates.length; i++) {\n const node = templates[i];\n sharedConfig.registry.set(node.getAttribute(\"data-hk\"), node);\n }\n}\nfunction getNextElement(template) {\n let node, key;\n if (!sharedConfig.context || !(node = sharedConfig.registry.get(key = getHydrationKey()))) {\n return template.cloneNode(true);\n }\n if (sharedConfig.completed) sharedConfig.completed.add(node);\n sharedConfig.registry.delete(key);\n return node;\n}\nfunction getNextMarker(start) {\n let end = start,\n count = 0,\n current = [];\n if (sharedConfig.context) {\n while (end) {\n if (end.nodeType === 8) {\n const v = end.nodeValue;\n if (v === \"#\") count++;else if (v === \"/\") {\n if (count === 0) return [end, current];\n count--;\n }\n }\n current.push(end);\n end = end.nextSibling;\n }\n }\n return [end, current];\n}\nfunction runHydrationEvents() {\n if (sharedConfig.events && !sharedConfig.events.queued) {\n queueMicrotask(() => {\n const {\n completed,\n events\n } = sharedConfig;\n events.queued = false;\n while (events.length) {\n const [el, e] = events[0];\n if (!completed.has(el)) return;\n eventHandler(e);\n events.shift();\n }\n });\n sharedConfig.events.queued = true;\n }\n}\nfunction toPropertyName(name) {\n return name.toLowerCase().replace(/-([a-z])/g, (_, w) => w.toUpperCase());\n}\nfunction toggleClassKey(node, key, value) {\n const classNames = key.split(/\\s+/);\n for (let i = 0, nameLen = classNames.length; i < nameLen; i++) node.classList.toggle(classNames[i], value);\n}\nfunction eventHandler(e) {\n const key = `$$${e.type}`;\n let node = e.composedPath && e.composedPath()[0] || e.target;\n if (e.target !== node) {\n Object.defineProperty(e, \"target\", {\n configurable: true,\n value: node\n });\n }\n Object.defineProperty(e, \"currentTarget\", {\n configurable: true,\n get() {\n return node;\n }\n });\n while (node !== null) {\n const handler = node[key];\n if (handler) {\n const data = node[`${key}Data`];\n data !== undefined ? handler(data, e) : handler(e);\n if (e.cancelBubble) return;\n }\n node = node.host && node.host !== node && node.host instanceof Node ? node.host : node.parentNode;\n }\n}\nfunction spreadExpression(node, props, prevProps = {}, isSVG, skipChildren) {\n if (!skipChildren && \"children\" in props) {\n createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));\n }\n createRenderEffect(() => assign(node, props, isSVG, true, prevProps));\n return prevProps;\n}\nfunction insertExpression(parent, value, current, marker, unwrapArray) {\n while (typeof current === \"function\") current = current();\n if (value === current) return current;\n const t = typeof value,\n multi = marker !== undefined;\n parent = multi && current[0] && current[0].parentNode || parent;\n if (t === \"string\" || t === \"number\") {\n if (t === \"number\") value = value.toString();\n if (multi) {\n let node = current[0];\n if (node && node.nodeType === 3) {\n node.data = value;\n } else node = document.createTextNode(value);\n current = cleanChildren(parent, current, marker, node);\n } else {\n if (current !== \"\" && typeof current === \"string\") {\n current = parent.firstChild.data = value;\n } else current = parent.textContent = value;\n }\n } else if (value == null || t === \"boolean\") {\n if (sharedConfig.context) return current;\n current = cleanChildren(parent, current, marker);\n } else if (t === \"function\") {\n createRenderEffect(() => {\n let v = value();\n while (typeof v === \"function\") v = v();\n current = insertExpression(parent, v, current, marker);\n });\n return () => current;\n } else if (Array.isArray(value)) {\n const array = [];\n if (normalizeIncomingArray(array, value, unwrapArray)) {\n createRenderEffect(() => current = insertExpression(parent, array, current, marker, true));\n return () => current;\n }\n if (sharedConfig.context && current.length) return current;\n if (array.length === 0) {\n current = cleanChildren(parent, current, marker);\n if (multi) return current;\n } else {\n if (Array.isArray(current)) {\n if (current.length === 0) {\n appendNodes(parent, array, marker);\n } else reconcileArrays(parent, current, array);\n } else if (current == null || current === \"\") {\n appendNodes(parent, array);\n } else {\n reconcileArrays(parent, multi && current || [parent.firstChild], array);\n }\n }\n current = array;\n } else if (value instanceof Node) {\n if (Array.isArray(current)) {\n if (multi) return current = cleanChildren(parent, current, marker, value);\n cleanChildren(parent, current, null, value);\n } else if (current == null || current === \"\" || !parent.firstChild) {\n parent.appendChild(value);\n } else parent.replaceChild(value, parent.firstChild);\n current = value;\n } else console.warn(`Skipped inserting`, value);\n return current;\n}\nfunction normalizeIncomingArray(normalized, array, unwrap) {\n let dynamic = false;\n for (let i = 0, len = array.length; i < len; i++) {\n let item = array[i],\n t;\n if (item instanceof Node) {\n normalized.push(item);\n } else if (item == null || item === true || item === false) ; else if (Array.isArray(item)) {\n dynamic = normalizeIncomingArray(normalized, item) || dynamic;\n } else if ((t = typeof item) === \"string\") {\n normalized.push(document.createTextNode(item));\n } else if (t === \"function\") {\n if (unwrap) {\n while (typeof item === \"function\") item = item();\n dynamic = normalizeIncomingArray(normalized, Array.isArray(item) ? item : [item]) || dynamic;\n } else {\n normalized.push(item);\n dynamic = true;\n }\n } else normalized.push(document.createTextNode(item.toString()));\n }\n return dynamic;\n}\nfunction appendNodes(parent, array, marker) {\n for (let i = 0, len = array.length; i < len; i++) parent.insertBefore(array[i], marker);\n}\nfunction cleanChildren(parent, current, marker, replacement) {\n if (marker === undefined) return parent.textContent = \"\";\n const node = replacement || document.createTextNode(\"\");\n if (current.length) {\n let inserted = false;\n for (let i = current.length - 1; i >= 0; i--) {\n const el = current[i];\n if (node !== el) {\n const isParent = el.parentNode === parent;\n if (!inserted && !i) isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);else isParent && parent.removeChild(el);\n } else inserted = true;\n }\n } else parent.insertBefore(node, marker);\n return [node];\n}\nfunction getHydrationKey() {\n const hydrate = sharedConfig.context;\n return `${hydrate.id}${hydrate.count++}`;\n}\n\nfunction renderToString(fn, options) {}\nfunction renderToStringAsync(fn, options) {}\nfunction renderToNodeStream(fn, options) {}\nfunction renderToWebStream(fn, options) {}\nfunction ssr(template, ...nodes) {}\nfunction resolveSSRNode(node) {}\nfunction ssrClassList(value) {}\nfunction ssrStyle(value) {}\nfunction ssrSpread(accessor) {}\nfunction ssrBoolean(key, value) {}\nfunction escape(html) {}\n\nconst isServer = false;\nconst SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\nfunction createElement(tagName, isSVG = false) {\n return isSVG ? document.createElementNS(SVG_NAMESPACE, tagName) : document.createElement(tagName);\n}\nfunction Portal(props) {\n const {\n useShadow\n } = props,\n marker = document.createTextNode(\"\"),\n mount = props.mount || document.body;\n function renderPortal() {\n if (sharedConfig.context) {\n const [s, set] = createSignal(false);\n queueMicrotask(() => set(true));\n return () => s() && props.children;\n } else return () => props.children;\n }\n if (mount instanceof HTMLHeadElement) {\n const [clean, setClean] = createSignal(false);\n const cleanup = () => setClean(true);\n createRoot(dispose => insert(mount, () => !clean() ? renderPortal()() : dispose(), null));\n onCleanup(() => {\n if (sharedConfig.context) queueMicrotask(cleanup);else cleanup();\n });\n } else {\n const container = createElement(props.isSVG ? \"g\" : \"div\", props.isSVG),\n renderRoot = useShadow && container.attachShadow ? container.attachShadow({\n mode: \"open\"\n }) : container;\n Object.defineProperty(container, \"host\", {\n get() {\n return marker.parentNode;\n }\n });\n insert(renderRoot, renderPortal());\n mount.appendChild(container);\n props.ref && props.ref(container);\n onCleanup(() => mount.removeChild(container));\n }\n return marker;\n}\nfunction Dynamic(props) {\n const [p, others] = splitProps(props, [\"component\"]);\n return createMemo(() => {\n const component = p.component;\n switch (typeof component) {\n case \"function\":\n return untrack(() => component(others));\n case \"string\":\n const isSvg = SVGElements.has(component);\n const el = createElement(component, isSvg);\n spread(el, others, isSvg);\n return el;\n }\n });\n}\n\nexport { Aliases, ChildProperties, DelegatedEvents, Dynamic, Portal, Properties, SVGElements, SVGNamespace, addEventListener, assign, classList, clearDelegatedEvents, delegateEvents, dynamicProperty, escape, gatherHydratable, getHydrationKey, getNextElement, getNextMarker, hydrate, insert, isServer, memo, render, renderToNodeStream, renderToString, renderToStringAsync, renderToWebStream, resolveSSRNode, runHydrationEvents, setAttribute, setAttributeNS, spread, ssr, ssrBoolean, ssrClassList, ssrSpread, ssrStyle, style, template };\n","import { template as _$template } from \"solid-js/web\";\nimport { delegateEvents as _$delegateEvents } from \"solid-js/web\";\nimport { effect as _$effect } from \"solid-js/web\";\nimport { insert as _$insert } from \"solid-js/web\";\nimport { createComponent as _$createComponent } from \"solid-js/web\";\n\nconst _tmpl$ = _$template(`
          `, 4),\n _tmpl$2 = _$template(`
        1. `, 4);\n\nimport { createSignal, createSelector, For, createComputed, on } from \"solid-js\";\nimport { $class } from \"../helpers\";\nimport type { ListItem } from \"../types\";\nexport interface Props {\n suggestions: Array;\n selectCallback: (suggestion: ListItem) => void;\n}\nexport function ListElement(props: Props) {\n // current active index\n const [getActiveIndex, setActiveIndex] = createSignal(-1); // current active id\n\n const isSelected = createSelector(getActiveIndex); // movement state\n\n const [getMovement, setMovement] = createSignal(\"move-to-top\"); // selected state\n\n const [getConfirmed, setConfirmed] = createSignal(false);\n\n function handleSelection(suggestion: ListItem, index: number) {\n // call its associated callback\n props.selectCallback(suggestion); // store it in the signal\n\n setActiveIndex(index);\n }\n\n function handleMove() {\n const suggestionsCount = props.suggestions.length;\n const prevIndex = getActiveIndex();\n let index = prevIndex;\n const movement = getMovement();\n\n if (movement === \"up\") {\n index--;\n } else if (movement === \"down\") {\n index++;\n } else if (movement === \"move-to-top\") {\n index = 0;\n } else if (movement === \"move-to-bottom\") {\n index = suggestionsCount;\n } // TODO: Implement page up/down\n\n\n index %= suggestionsCount;\n\n if (index < 0) {\n index = suggestionsCount + index;\n }\n\n if (index !== prevIndex) {\n setActiveIndex(index);\n } // unset the movement to allow solid to check the next movement\n\n\n setMovement(undefined);\n }\n\n createComputed(on(getConfirmed, () => {\n if (getConfirmed()) {\n // Runs the selection callback when the user confirms the selection using keyboard\n // Updating prop.select in the parent result in running this function\n const index = getActiveIndex();\n handleSelection(props.suggestions[index], index);\n }\n }));\n createComputed(on(getMovement, handleMove));\n let className = \"select-list popover-list\"; // add scrolling if more than 7 itmes\n\n if (props.suggestions.length > 7) {\n className += \" intentions-scroll\";\n }\n\n const component = (() => {\n const _el$ = _tmpl$.cloneNode(true),\n _el$2 = _el$.firstChild;\n\n _el$.className = className;\n\n _$insert(_el$2, _$createComponent(For, {\n get each() {\n return props.suggestions;\n },\n\n children: (suggestion, getIndex) => {\n const index = getIndex();\n return (() => {\n const _el$3 = _tmpl$2.cloneNode(true),\n _el$4 = _el$3.firstChild;\n\n _el$4.$$click = () => {\n handleSelection(suggestion, index);\n };\n\n _$insert(_el$4, () => suggestion.title);\n\n _$effect(_p$ => {\n const _v$ = isSelected(index) ? \"selected\" : \"\",\n _v$2 = suggestion[$class];\n\n _v$ !== _p$._v$ && (_el$3.className = _p$._v$ = _v$);\n _v$2 !== _p$._v$2 && (_el$4.className = _p$._v$2 = _v$2);\n return _p$;\n }, {\n _v$: undefined,\n _v$2: undefined\n });\n\n return _el$3;\n })();\n }\n }));\n\n return _el$;\n })();\n\n return {\n component,\n setMovement,\n setConfirmed\n };\n}\n\n_$delegateEvents([\"click\"]);","import { render } from \"solid-js/web\";\nimport { CompositeDisposable, Emitter } from \"sb-event-kit\";\nimport type { Disposable } from \"sb-event-kit\";\nimport type { TextEditor } from \"atom\";\nimport { ListElement } from \"./elements/list\";\nimport type { ListItem, ListMovement } from \"./types\";\nexport default class ListView {\n emitter: Emitter; // root element\n\n element: HTMLElement;\n subscriptions: CompositeDisposable;\n setMovement?: (movement: ListMovement) => void;\n setConfirmed?: (confiremd: boolean) => void;\n\n constructor() {\n this.element = document.createElement(\"div\");\n this.emitter = new Emitter();\n this.subscriptions = new CompositeDisposable();\n this.subscriptions.add(this.emitter);\n }\n\n activate(editor: TextEditor, suggestions: Array) {\n const {\n component,\n setMovement,\n setConfirmed\n } = ListElement({\n suggestions,\n selectCallback: (selectedSuggestion: ListItem) => {\n this.emitter.emit(\"did-select\", selectedSuggestion);\n this.dispose();\n }\n }); // store setters\n\n this.setMovement = setMovement;\n this.setConfirmed = setConfirmed; // render the list element component\n\n render(() => component, this.element);\n const bufferPosition = editor.getCursorBufferPosition();\n const marker = editor.markBufferRange([bufferPosition, bufferPosition], {\n invalidate: \"never\"\n });\n editor.decorateMarker(marker, {\n type: \"overlay\",\n item: this.element\n });\n this.subscriptions.add(function () {\n marker.destroy();\n });\n }\n\n move(movement: ListMovement) {\n this.setMovement?.(movement);\n }\n\n select() {\n // runs only once\n this.setConfirmed?.(true);\n }\n\n onDidSelect(callback: (...args: Array) => any): Disposable {\n return this.emitter.on(\"did-select\", callback);\n }\n\n dispose() {\n this.subscriptions.dispose();\n }\n\n}","import type { ListProvider, ListItem, HighlightProvider, HighlightItem } from \"./types\";\nexport function provider(entry: ListProvider | HighlightProvider) {\n let message;\n\n if (!entry || typeof entry !== \"object\") {\n message = \"Invalid provider provided\";\n } else if (!Array.isArray(entry.grammarScopes)) {\n message = \"Invalid or no grammarScopes found on provider\";\n } else if (typeof entry.getIntentions !== \"function\") {\n message = \"Invalid or no getIntentions found on provider\";\n }\n\n if (message) {\n console.log(\"[Intentions] Invalid provider\", entry);\n throw new Error(message);\n }\n}\nexport function suggestionsList(suggestions: Array): Array {\n if (Array.isArray(suggestions)) {\n const suggestionsLength = suggestions.length;\n\n for (let i = 0; i < suggestionsLength; ++i) {\n const suggestion = suggestions[i];\n let message;\n\n if (typeof suggestion.title !== \"string\") {\n message = \"Invalid or no title found on intention\";\n } else if (typeof suggestion.selected !== \"function\") {\n message = \"Invalid or no selected found on intention\";\n }\n\n if (message) {\n console.log(\"[Intentions] Invalid suggestion of type list\", suggestion);\n throw new Error(message);\n }\n }\n }\n\n return suggestions;\n}\nexport function suggestionsShow(suggestions: Array): Array {\n if (Array.isArray(suggestions)) {\n const suggestionsLength = suggestions.length;\n\n for (let i = 0; i < suggestionsLength; ++i) {\n const suggestion = suggestions[i];\n let message;\n\n if (typeof suggestion.range !== \"object\" || !suggestion.range) {\n message = \"Invalid or no range found on intention\";\n } else if (suggestion.class && typeof suggestion.class !== \"string\") {\n message = \"Invalid class found on intention\";\n } else if (typeof suggestion.created !== \"function\") {\n message = \"Invalid or no created found on intention\";\n }\n\n if (message) {\n console.log(\"[Intentions] Invalid suggestion of type show\", suggestion);\n throw new Error(message);\n }\n }\n }\n\n return suggestions;\n}","import type { TextEditor } from \"atom\";\nimport { processListItems } from \"./helpers\";\nimport { provider as validateProvider, suggestionsList as validateSuggestions } from \"./validate\";\nimport type { ListProvider, ListItem } from \"./types\";\nexport default class ProvidersList {\n number: number;\n providers: Set;\n\n constructor() {\n this.number = 0;\n this.providers = new Set();\n }\n\n addProvider(provider: ListProvider) {\n if (!this.hasProvider(provider)) {\n validateProvider(provider);\n this.providers.add(provider);\n }\n }\n\n hasProvider(provider: ListProvider): boolean {\n return this.providers.has(provider);\n }\n\n deleteProvider(provider: ListProvider) {\n if (this.hasProvider(provider)) {\n this.providers.delete(provider);\n }\n }\n\n async trigger(textEditor: TextEditor): Promise> {\n const editorPath = textEditor.getPath();\n const bufferPosition = textEditor.getCursorBufferPosition();\n\n if (!editorPath) {\n return [];\n }\n\n const scopes = [...textEditor.scopeDescriptorForBufferPosition(bufferPosition).getScopesArray()];\n scopes.push(\"*\");\n const promises: Promise[] = [];\n this.providers.forEach(function (provider) {\n if (scopes.some(scope => provider.grammarScopes.includes(scope))) {\n promises.push(new Promise(function (resolve) {\n resolve(provider.getIntentions({\n textEditor,\n bufferPosition\n }));\n }).then(function (results) {\n if (atom.inDevMode()) {\n validateSuggestions(results);\n }\n\n return results;\n }));\n }\n });\n const number = ++this.number;\n const results = (await Promise.all(promises)).reduce(function (items, item) {\n if (Array.isArray(item)) {\n return items.concat(item);\n }\n\n return items;\n }, []);\n\n if (number !== this.number || !results.length) {\n // If has been executed one more time, ignore these results\n // Or we don't have any results\n return [];\n }\n\n return processListItems(results);\n }\n\n dispose() {\n this.providers.clear();\n }\n\n}","import type { ListItem } from \"./types\";\nexport const $class = \"__$sb_intentions_class\";\nexport function processListItems(suggestions: Array): Array {\n for (let i = 0, {\n length\n } = suggestions; i < length; ++i) {\n const suggestion = suggestions[i];\n const className: string[] = [];\n\n if (suggestion.class) {\n className.push(suggestion.class.trim());\n }\n\n if (suggestion.icon) {\n className.push(`icon icon-${suggestion.icon}`);\n }\n\n suggestion[$class] = className.join(\" \");\n }\n\n return suggestions.sort(function (a, b) {\n return b.priority - a.priority;\n });\n}\nexport function showError(message: Error | string, detail?: string) {\n if (message instanceof Error) {\n detail = message.stack;\n message = message.message;\n }\n\n atom.notifications.addError(`[Intentions] ${message}`, {\n detail,\n dismissable: true\n });\n}","export const PADDING_CHARACTER = \" \";\nexport function create(length: number): HTMLElement {\n let tries = 0;\n const element = document.createElement(\"div\");\n element.className = \"intentions-inline\";\n element.style.opacity = \"0\";\n element.textContent = PADDING_CHARACTER.repeat(length);\n\n function checkStyle() {\n if (++tries === 20) {\n return;\n }\n\n const styles = getComputedStyle(element);\n\n if (styles.lineHeight && styles.width !== \"auto\") {\n element.style.opacity = \"1\";\n element.style.top = `-${styles.lineHeight}`;\n } else {\n requestAnimationFrame(checkStyle);\n }\n }\n\n requestAnimationFrame(checkStyle);\n return element;\n}","import type { TextEditor, Range, DisplayMarker } from \"atom\";\nimport { provider as validateProvider, suggestionsShow as validateSuggestions } from \"./validate\";\nimport { create as createElement, PADDING_CHARACTER } from \"./elements/highlight\";\nimport type { HighlightProvider, HighlightItem } from \"./types\";\nexport default class ProvidersHighlight {\n number: number;\n providers: Set;\n\n constructor() {\n this.number = 0;\n this.providers = new Set();\n }\n\n addProvider(provider: HighlightProvider) {\n if (!this.hasProvider(provider)) {\n validateProvider(provider);\n this.providers.add(provider);\n }\n }\n\n hasProvider(provider: HighlightProvider): boolean {\n return this.providers.has(provider);\n }\n\n deleteProvider(provider: HighlightProvider) {\n if (this.hasProvider(provider)) {\n this.providers.delete(provider);\n }\n }\n\n async trigger(textEditor: TextEditor): Promise> {\n const editorPath = textEditor.getPath();\n const bufferPosition = textEditor.getCursorBufferPosition();\n\n if (!editorPath) {\n return [];\n }\n\n const scopes = [...textEditor.scopeDescriptorForBufferPosition(bufferPosition).getScopesArray()];\n scopes.push(\"*\");\n const visibleRange = ({ ...textEditor.getBuffer().getRange()\n } as Range); // Setting this to infinity on purpose, cause the buffer position just marks visible column\n // according to element width\n\n visibleRange.end.column = Infinity;\n const promises: Promise[] = [];\n this.providers.forEach(function (provider) {\n if (scopes.some(scope => provider.grammarScopes.includes(scope))) {\n promises.push(new Promise(function (resolve) {\n resolve(provider.getIntentions({\n textEditor,\n visibleRange\n }));\n }).then(function (results) {\n if (atom.inDevMode()) {\n validateSuggestions(results);\n }\n\n return results;\n }));\n }\n });\n const number = ++this.number;\n const results = (await Promise.all(promises)).reduce(function (items, item) {\n if (Array.isArray(item)) {\n return items.concat(item);\n }\n\n return items;\n }, []);\n\n if (number !== this.number || !results.length) {\n // If has been executed one more time, ignore these results\n // Or we just don't have any results\n return [];\n }\n\n return results;\n }\n\n paint(textEditor: TextEditor, intentions: Array): () => void {\n const markers: DisplayMarker[] = [];\n\n for (const intention of intentions) {\n const matchedText = textEditor.getTextInBufferRange(intention.range);\n const marker = textEditor.markBufferRange(intention.range);\n const element = createElement(matchedText.length);\n intention.created({\n textEditor,\n element,\n marker,\n matchedText\n });\n textEditor.decorateMarker(marker, {\n type: \"overlay\",\n position: \"tail\",\n item: element\n });\n marker.onDidChange(function ({\n newHeadBufferPosition: start,\n oldTailBufferPosition: end\n }) {\n element.textContent = PADDING_CHARACTER.repeat(textEditor.getTextInBufferRange([start, end]).length);\n });\n markers.push(marker);\n }\n\n return function () {\n markers.forEach(function (marker) {\n try {\n marker.destroy();\n } catch (_) {\n /* No Op */\n }\n });\n };\n }\n\n dispose() {\n this.providers.clear();\n }\n\n}","import { CompositeDisposable, Disposable } from \"sb-event-kit\";\nimport Commands from \"./commands\";\nimport ListView from \"./view-list\";\nimport ProvidersList from \"./providers-list\";\nimport ProvidersHighlight from \"./providers-highlight\";\nimport type { ListProvider, HighlightProvider } from \"./types\";\nexport default class Intentions {\n active: Disposable | null | undefined;\n commands: Commands;\n providersList: ProvidersList;\n providersHighlight: ProvidersHighlight;\n subscriptions: CompositeDisposable;\n\n constructor() {\n this.active = null;\n this.commands = new Commands();\n this.providersList = new ProvidersList();\n this.providersHighlight = new ProvidersHighlight();\n this.subscriptions = new CompositeDisposable();\n this.subscriptions.add(this.commands);\n this.subscriptions.add(this.providersList);\n this.subscriptions.add(this.providersHighlight); // eslint-disable-next-line arrow-parens\n\n this.commands.onListShow(async textEditor => {\n const results = await this.providersList.trigger(textEditor);\n\n if (!results.length) {\n return false;\n }\n\n const listView = new ListView();\n const subscriptions = new CompositeDisposable();\n listView.activate(textEditor, results);\n listView.onDidSelect(function (intention) {\n intention.selected();\n subscriptions.dispose();\n });\n subscriptions.add(listView);\n subscriptions.add(() => {\n if (this.active === subscriptions) {\n this.active = null;\n }\n });\n subscriptions.add(this.commands.onListMove(function (movement) {\n listView.move(movement);\n }));\n subscriptions.add(this.commands.onListConfirm(function () {\n listView.select();\n }));\n subscriptions.add(this.commands.onListHide(function () {\n subscriptions.dispose();\n }));\n this.active = subscriptions;\n return true;\n }); // eslint-disable-next-line arrow-parens\n\n this.commands.onHighlightsShow(async textEditor => {\n const results = await this.providersHighlight.trigger(textEditor);\n\n if (!results.length) {\n return false;\n }\n\n const painted = this.providersHighlight.paint(textEditor, results);\n const subscriptions = new CompositeDisposable();\n subscriptions.add(() => {\n if (this.active === subscriptions) {\n this.active = null;\n }\n });\n subscriptions.add(this.commands.onHighlightsHide(function () {\n subscriptions.dispose();\n }));\n subscriptions.add(painted);\n this.active = subscriptions;\n return true;\n });\n }\n\n activate() {\n this.commands.activate();\n }\n\n consumeListProvider(provider: ListProvider) {\n this.providersList.addProvider(provider);\n }\n\n deleteListProvider(provider: ListProvider) {\n this.providersList.deleteProvider(provider);\n }\n\n consumeHighlightProvider(provider: HighlightProvider) {\n this.providersHighlight.addProvider(provider);\n }\n\n deleteHighlightProvider(provider: HighlightProvider) {\n this.providersHighlight.deleteProvider(provider);\n }\n\n dispose() {\n this.subscriptions.dispose();\n\n if (this.active) {\n this.active.dispose();\n }\n }\n\n}","import { Disposable } from \"atom\";\nimport Intentions from \"./main\";\nimport type { ListProvider, HighlightProvider } from \"./types\";\nlet intentions: Intentions | undefined = undefined;\nexport function activate() {\n intentions = new Intentions();\n intentions.activate();\n}\nexport function deactivate() {\n intentions?.dispose();\n}\nexport function consumeListIntentions(provider: ListProvider | Array) {\n const providers = Array.isArray(provider) ? provider : [provider];\n\n if (intentions === undefined) {\n return;\n }\n\n providers.forEach(entry => {\n ;\n (intentions as Intentions).consumeListProvider(entry);\n });\n return new Disposable(() => {\n providers.forEach(entry => {\n ;\n (intentions as Intentions).deleteListProvider(entry);\n });\n });\n}\nexport function consumeHighlightIntentions(provider: HighlightProvider | Array) {\n const providers = Array.isArray(provider) ? provider : [provider];\n\n if (intentions === undefined) {\n return;\n }\n\n providers.forEach(entry => {\n ;\n (intentions as Intentions).consumeHighlightProvider(entry);\n });\n return new Disposable(() => {\n providers.forEach(entry => {\n ;\n (intentions as Intentions).deleteHighlightProvider(entry);\n });\n });\n}"],"names":["Object","defineProperty","$492b1629068959dcdd67ad565e1bfcb8$exports","value","CompositeDisposable","Disposable","Emitter","undefined","$e213d75aec7d43ecb049fdbee6ca8e03$exports","default","$e213d75aec7d43ecb049fdbee6ca8e03$var$_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","key","Constructor","protoProps","staticProps","prototype","$f897c456aee776a2c682457d53c5a26c$exports","obj","$f897c456aee776a2c682457d53c5a26c$var$_createClass","$f897c456aee776a2c682457d53c5a26c$var$_assert2","$6bbt2$assert","__esModule","$f897c456aee776a2c682457d53c5a26c$var$Disposable","callback","instance","TypeError","$f897c456aee776a2c682457d53c5a26c$var$_classCallCheck","this","get","$e213d75aec7d43ecb049fdbee6ca8e03$var$_disposable2","$e213d75aec7d43ecb049fdbee6ca8e03$var$_interopRequireDefault","$e213d75aec7d43ecb049fdbee6ca8e03$var$Emitter","$e213d75aec7d43ecb049fdbee6ca8e03$var$_classCallCheck","disposed","handlers","eventName","handler","_this","Error","callbacks","push","off","index","indexOf","splice","Promise","resolve","promises","_len","arguments","params","Array","_key","apply","all","clear","$492b1629068959dcdd67ad565e1bfcb8$var$_emitter2","$492b1629068959dcdd67ad565e1bfcb8$var$_interopRequireDefault","$492b1629068959dcdd67ad565e1bfcb8$var$_disposable2","$d2bfb5213a3a969b70988af9ca0ccd93$exports","$d2bfb5213a3a969b70988af9ca0ccd93$var$_createClass","$d2bfb5213a3a969b70988af9ca0ccd93$var$_classCallCheck","$090470fb33692176bc5cbeb80b5a085e$exports","validate","param","dispose","$d2bfb5213a3a969b70988af9ca0ccd93$var$CompositeDisposable","disposables","Set","_len2","_key2","add","_len3","_key3","delete","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_step","_iterator","Symbol","iterator","next","done","item","err","return","$492b1629068959dcdd67ad565e1bfcb8$var$_compositeDisposable2","CORE_COMMANDS","Commands","active","emitter","subscriptions","activate","atom","commands","e","type","processListShow","originalEvent","setImmediate","matched","keymaps","onDidMatchBinding","binding","has","command","disposableEvent","document","body","processListHide","abortKeyBinding","processHighlightsShow","keyCode","upE","processHighlightsHide","stoppingEvent","processListConfirm","processListMove","event","stopImmediatePropagation","call","subscription","editor","workspace","getActiveTextEditor","editorElement","views","getView","shouldListShow","classList","remove","setTimeout","emit","movement","shouldProcess","shouldHighlightsShow","show","onListShow","on","then","result","Boolean","onListHide","onListMove","onListConfirm","onHighlightsShow","onHighlightsHide","$0694d03fb099965a9d8510b56c0e3e40$export$f07a6cef19e11b4c","$0694d03fb099965a9d8510b56c0e3e40$var$setHydrateContext","context","$0694d03fb099965a9d8510b56c0e3e40$export$5ca47aaad2fbf622","a","b","$0694d03fb099965a9d8510b56c0e3e40$var$ERROR","$0694d03fb099965a9d8510b56c0e3e40$var$runEffects","$0694d03fb099965a9d8510b56c0e3e40$var$runQueue","$0694d03fb099965a9d8510b56c0e3e40$var$NOTPENDING","$0694d03fb099965a9d8510b56c0e3e40$var$UNOWNED","owned","cleanups","owner","$0694d03fb099965a9d8510b56c0e3e40$var$transPending","$0694d03fb099965a9d8510b56c0e3e40$var$setTransPending","$0694d03fb099965a9d8510b56c0e3e40$export$248155459a28d1fc","$0694d03fb099965a9d8510b56c0e3e40$var$Owner","$0694d03fb099965a9d8510b56c0e3e40$var$Listener","$0694d03fb099965a9d8510b56c0e3e40$var$Pending","$0694d03fb099965a9d8510b56c0e3e40$var$Updates","$0694d03fb099965a9d8510b56c0e3e40$var$Effects","$0694d03fb099965a9d8510b56c0e3e40$var$Transition","$0694d03fb099965a9d8510b56c0e3e40$var$ExecCount","$0694d03fb099965a9d8510b56c0e3e40$export$ac5ee418fd4e0f60","fn","detachedOwner","listener","root","attached","$0694d03fb099965a9d8510b56c0e3e40$var$runUpdates","$0694d03fb099965a9d8510b56c0e3e40$var$cleanNode","areEqual","options","s","observers","observerSlots","pending","comparator","$0694d03fb099965a9d8510b56c0e3e40$var$readSignal","bind","$0694d03fb099965a9d8510b56c0e3e40$var$writeSignal","$0694d03fb099965a9d8510b56c0e3e40$export$9ddb7fb291b7e0c8","$0694d03fb099965a9d8510b56c0e3e40$var$updateComputation","$0694d03fb099965a9d8510b56c0e3e40$var$createComputation","$0694d03fb099965a9d8510b56c0e3e40$export$494c6b131fbef4be","$0694d03fb099965a9d8510b56c0e3e40$export$59ca756e7a8aea0e","c","state","$0694d03fb099965a9d8510b56c0e3e40$export$410f60d5e45e709","q","data","$0694d03fb099965a9d8510b56c0e3e40$export$e047e338db8faf8c","$0694d03fb099965a9d8510b56c0e3e40$export$b4cd8de5710bc55c","args","pop","deps","prev","isArray","prevResult","$0694d03fb099965a9d8510b56c0e3e40$export$8de110a73dc5605f","$0694d03fb099965a9d8510b56c0e3e40$export$a4ff86cea5c8127e","defaultValue","id","Provider","$0694d03fb099965a9d8510b56c0e3e40$var$createProvider","$0694d03fb099965a9d8510b56c0e3e40$export$1b2d774ea5907fac","children","$0694d03fb099965a9d8510b56c0e3e40$var$resolveChildren","sources","updates","$0694d03fb099965a9d8510b56c0e3e40$var$lookDownstream","sSlot","sourceSlots","running","tValue","isComp","o","$0694d03fb099965a9d8510b56c0e3e40$var$markUpstream","pure","node","time","$0694d03fb099965a9d8510b56c0e3e40$var$runComputation","nextValue","$0694d03fb099965a9d8510b56c0e3e40$var$handleError","updatedAt","init","tOwned","$0694d03fb099965a9d8510b56c0e3e40$var$runTop","top","suspense","inFallback","effects","runningTransition","wait","cbs","size","cb","forEach","v","len","$0694d03fb099965a9d8510b56c0e3e40$var$completeUpdates","queue","source","obs","n","$0694d03fb099965a9d8510b56c0e3e40$var$reset","fns","$0694d03fb099965a9d8510b56c0e3e40$var$lookup","f","results","$0694d03fb099965a9d8510b56c0e3e40$var$FALLBACK","$0694d03fb099965a9d8510b56c0e3e40$export$ff2d44480da105c7","Comp","count","r","$0694d03fb099965a9d8510b56c0e3e40$export$f5235b51f4f3e06","fallback","list","mapFn","items","mapped","disposers","indexes","ctx","j","newItems","mapper","disposer","set","newIndices","newIndicesNext","temp","tempdisposers","tempIndexes","start","end","newEnd","newLen","Math","min","Map","slice","$0694d03fb099965a9d8510b56c0e3e40$export$eaeb808a925192ab","each","$939727bb0feed9726666a9e39a3bd77f$var$reconcileArrays","parentNode","bLength","aEnd","bEnd","aStart","bStart","after","nextSibling","map","insertBefore","removeChild","t","sequence","replaceChild","$939727bb0feed9726666a9e39a3bd77f$var$$$EVENTS","$939727bb0feed9726666a9e39a3bd77f$export$792a797b69be0d58","code","element","$939727bb0feed9726666a9e39a3bd77f$export$ad79fd18084743b4","firstChild","textContent","$939727bb0feed9726666a9e39a3bd77f$export$c32ae21812be6bdb","html","check","isSVG","createElement","innerHTML","split","content","$939727bb0feed9726666a9e39a3bd77f$export$17a8087eb00e42f7","eventNames","l","name","addEventListener","$939727bb0feed9726666a9e39a3bd77f$var$eventHandler","parent","accessor","marker","initial","$939727bb0feed9726666a9e39a3bd77f$var$insertExpression","current","composedPath","cancelBubble","host","Node","unwrapArray","multi","toString","nodeType","createTextNode","$939727bb0feed9726666a9e39a3bd77f$var$cleanChildren","array","$939727bb0feed9726666a9e39a3bd77f$var$normalizeIncomingArray","$939727bb0feed9726666a9e39a3bd77f$var$appendNodes","appendChild","console","warn","normalized","unwrap","dynamic","replacement","inserted","el","isParent","ListElement","getActiveIndex","setActiveIndex","createSignal","isSelected","subs","p","keys","values","createSelector","getMovement","setMovement","getConfirmed","setConfirmed","handleSelection","suggestion","selectCallback","createComputed","suggestions","suggestionsCount","prevIndex","className","_el$","$9e37df434341e0ba128ebb33a0274131$var$_tmpl$","cloneNode","_el$2","getIndex","_el$3","$9e37df434341e0ba128ebb33a0274131$var$_tmpl$2","_el$4","$$click","title","_p$","_v$","_v$2","ListView","component","selectedSuggestion","render","bufferPosition","getCursorBufferPosition","markBufferRange","invalidate","decorateMarker","destroy","move","ref","_obj","select","onDidSelect","provider","entry","message","grammarScopes","getIntentions","log","ProvidersList","number","providers","addProvider","hasProvider","validateProvider","deleteProvider","textEditor","editorPath","getPath","scopes","scopeDescriptorForBufferPosition","getScopesArray","some","scope","includes","inDevMode","suggestionsLength","selected","validateSuggestions","reduce","concat","class","trim","icon","join","sort","priority","processListItems","create","tries","style","opacity","repeat","requestAnimationFrame","checkStyle","styles","getComputedStyle","lineHeight","width","ProvidersHighlight","visibleRange","getBuffer","getRange","column","Infinity","range","created","paint","intentions","markers","intention","matchedText","getTextInBufferRange","position","onDidChange","newHeadBufferPosition","oldTailBufferPosition","_","Intentions","providersList","providersHighlight","async","trigger","listView","painted","consumeListProvider","deleteListProvider","consumeHighlightProvider","deleteHighlightProvider","deactivate","consumeListIntentions","consumeHighlightIntentions"],"version":3,"file":"index.js.map"} \ No newline at end of file