"use strict";(self.webpackChunk_cocalc_static=self.webpackChunk_cocalc_static||[]).push([[4975],{54975:(t,e,l)=>{l.r(e);var n=l(55529),o=l(3948);n.registerHelper("hint","lean",(function(t){return e=this,null,l=function*(){const e=t.getDoc().getCursor(),l=t.getTokenAt(e),s={},c=[];function i(t){for(const e of t)s[e]||(s[e]=!0,c.push({text:e,displayText:`◇ ${e}`}))}let r=n.hint.anyword(t);if(null!=r&&null!=r.list&&i(r.list),r=n.hint.fromList(t,{words:o.completions}),null!=r&&null!=r.list&&i(r.list),c.sort(),void 0!==t.cocalc_actions){const l=t.cocalc_actions,n=yield l.complete(e.line,e.ch);for(let t=0;t<n.length;t++){const{text:e,type:l}=n[t],o=`▣ ${e} : ${l}`;c.push({text:e,displayText:o})}}return{list:c,from:n.Pos(e.line,l.start),to:n.Pos(e.line,l.end)}},new Promise(((t,n)=>{var o=t=>{try{c(l.next(t))}catch(t){n(t)}},s=t=>{try{c(l.throw(t))}catch(t){n(t)}},c=e=>e.done?t(e.value):Promise.resolve(e.value).then(o,s);c((l=l.apply(e,null)).next())}));var e,l}))}}]);