import "./cljs_env.js";
goog.provide('nextjournal.clojure_mode.commands');
var module$node_modules$$codemirror$commands$dist$index_cjs=shadow.js.require("module$node_modules$$codemirror$commands$dist$index_cjs", {});
var module$node_modules$$codemirror$state$dist$index_cjs=shadow.js.require("module$node_modules$$codemirror$state$dist$index_cjs", {});
nextjournal.clojure_mode.commands.view_command = (function nextjournal$clojure_mode$commands$view_command(f){
return (function (p__58466){
var map__58467 = p__58466;
var map__58467__$1 = (((((!((map__58467 == null))))?(((((map__58467.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__58467.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,map__58467):map__58467);
var state = (function (){var obj58471 = map__58467__$1;
var k58472 = "state";
if((function (){var obj58473 = obj58471;
return (((!((obj58473 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58472,obj58473)));
})()){
return (obj58471[k58472]);
} else {
return undefined;
}
})();
var dispatch = (function (){var obj58475 = map__58467__$1;
var k58476 = "dispatch";
if((function (){var obj58477 = obj58475;
return (((!((obj58477 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58476,obj58477)));
})()){
return (obj58475[k58476]);
} else {
return undefined;
}
})();
var G__58490_58679 = (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(state) : f.call(null,state));
if((G__58490_58679 == null)){
} else {
(dispatch.cljs$core$IFn$_invoke$arity$1 ? dispatch.cljs$core$IFn$_invoke$arity$1(G__58490_58679) : dispatch.call(null,G__58490_58679));
}

return true;
});
});
nextjournal.clojure_mode.commands.unwrap_STAR_ = (function nextjournal$clojure_mode$commands$unwrap_STAR_(state){
return nextjournal.clojure_mode.util.update_ranges.cljs$core$IFn$_invoke$arity$2(state,(function (p__58507){
var map__58510 = p__58507;
var map__58510__$1 = (((((!((map__58510 == null))))?(((((map__58510.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__58510.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,map__58510):map__58510);
var range = map__58510__$1;
var from = (function (){var obj58516 = map__58510__$1;
var k58517 = "from";
if((function (){var obj58518 = obj58516;
return (((!((obj58518 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58517,obj58518)));
})()){
return (obj58516[k58517]);
} else {
return undefined;
}
})();
var to = (function (){var obj58520 = map__58510__$1;
var k58521 = "to";
if((function (){var obj58523 = obj58520;
return (((!((obj58523 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58521,obj58523)));
})()){
return (obj58520[k58521]);
} else {
return undefined;
}
})();
var empty = (function (){var obj58524 = map__58510__$1;
var k58525 = "empty";
if((function (){var obj58526 = obj58524;
return (((!((obj58526 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58525,obj58526)));
})()){
return (obj58524[k58525]);
} else {
return undefined;
}
})();
if(cljs.core.truth_(empty)){
var temp__5753__auto__ = (function (){var G__58528 = nextjournal.clojure_mode.node.tree.cljs$core$IFn$_invoke$arity$3(state,from,(-1));
var G__58528__$1 = (((G__58528 == null))?null:nextjournal.clojure_mode.node.closest(G__58528,nextjournal.clojure_mode.node.coll_QMARK_));
if((G__58528__$1 == null)){
return null;
} else {
return nextjournal.clojure_mode.util.guard(G__58528__$1,nextjournal.clojure_mode.node.balanced_QMARK_);
}
})();
if(cljs.core.truth_(temp__5753__auto__)){
var nearest_balanced_coll = temp__5753__auto__;
return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"cursor","cursor",1011937484),(from - (1)),new cljs.core.Keyword(null,"changes","changes",1492088),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [nextjournal.clojure_mode.node.from_to.cljs$core$IFn$_invoke$arity$1(nextjournal.clojure_mode.node.down(nearest_balanced_coll)),nextjournal.clojure_mode.node.from_to.cljs$core$IFn$_invoke$arity$1(nextjournal.clojure_mode.node.down_last(nearest_balanced_coll))], null)], null);
} else {
return null;
}
} else {
return null;
}
}));
});
nextjournal.clojure_mode.commands.copy_to_clipboard_BANG_ = (function nextjournal$clojure_mode$commands$copy_to_clipboard_BANG_(text){
var focus_el = (function (){var obj58531 = document;
var k58532 = "activeElement";
if((function (){var obj58533 = obj58531;
return (((!((obj58533 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58532,obj58533)));
})()){
return (obj58531[k58532]);
} else {
return undefined;
}
})();
var input_el = document.createElement("textarea");
input_el.setAttribute("class","clipboard-input");

var obj58535_58680 = input_el;
var obj58536_58681 = (((!((obj58535_58680 == null))))?obj58535_58680:({}));
(obj58536_58681["innerHTML"] = text);


document.body.appendChild(input_el);

input_el.focus();

input_el.select();

document.execCommand("copy");

focus_el.focus(({"preventScroll": true}));

return document.body.removeChild(input_el);
});
nextjournal.clojure_mode.commands.kill_STAR_ = (function nextjournal$clojure_mode$commands$kill_STAR_(state){
return nextjournal.clojure_mode.util.update_ranges.cljs$core$IFn$_invoke$arity$2(state,(function (p__58545){
var map__58546 = p__58545;
var map__58546__$1 = (((((!((map__58546 == null))))?(((((map__58546.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__58546.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,map__58546):map__58546);
var range = map__58546__$1;
var from = (function (){var obj58551 = map__58546__$1;
var k58552 = "from";
if((function (){var obj58553 = obj58551;
return (((!((obj58553 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58552,obj58553)));
})()){
return (obj58551[k58552]);
} else {
return undefined;
}
})();
var to = (function (){var obj58554 = map__58546__$1;
var k58555 = "to";
if((function (){var obj58556 = obj58554;
return (((!((obj58556 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58555,obj58556)));
})()){
return (obj58554[k58555]);
} else {
return undefined;
}
})();
var empty = (function (){var obj58557 = map__58546__$1;
var k58558 = "empty";
if((function (){var obj58559 = obj58557;
return (((!((obj58559 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58558,obj58559)));
})()){
return (obj58557[k58558]);
} else {
return undefined;
}
})();
if(cljs.core.truth_(empty)){
var node = nextjournal.clojure_mode.node.tree.cljs$core$IFn$_invoke$arity$2(state,from);
var parent = nextjournal.clojure_mode.node.closest(node,(function (p1__58539_SHARP_){
var or__4223__auto__ = nextjournal.clojure_mode.node.coll_QMARK_(p1__58539_SHARP_);
if(cljs.core.truth_(or__4223__auto__)){
return or__4223__auto__;
} else {
return ((nextjournal.clojure_mode.node.string_QMARK_(p1__58539_SHARP_)) || (nextjournal.clojure_mode.node.top_QMARK_(p1__58539_SHARP_)));
}
}));
var line_end = state.doc.lineAt(from).to;
var next_children = (cljs.core.truth_(parent)?nextjournal.clojure_mode.node.children.cljs$core$IFn$_invoke$arity$3(parent,from,(1)):null);
var last_child_on_line = (cljs.core.truth_(parent)?(function (){var G__58560 = next_children;
var G__58560__$1 = (((G__58560 == null))?null:cljs.core.take_while.cljs$core$IFn$_invoke$arity$2(cljs.core.every_pred.cljs$core$IFn$_invoke$arity$1((function (p1__58541_SHARP_){
return (nextjournal.clojure_mode.node.start(p1__58541_SHARP_) <= line_end);
})),G__58560));
if((G__58560__$1 == null)){
return null;
} else {
return cljs.core.last(G__58560__$1);
}
})():null);
var to__$1 = ((nextjournal.clojure_mode.node.string_QMARK_(parent))?(function (){var content = cljs.core.str.cljs$core$IFn$_invoke$arity$1(nextjournal.clojure_mode.node.string.cljs$core$IFn$_invoke$arity$2(state,parent));
var content_from = cljs.core.subs.cljs$core$IFn$_invoke$arity$2(content,(from - nextjournal.clojure_mode.node.start(parent)));
var next_newline = content_from.indexOf("\n");
if((next_newline < (0))){
return (nextjournal.clojure_mode.node.end(parent) - (1));
} else {
return ((from + next_newline) + (1));
}
})():(cljs.core.truth_(last_child_on_line)?((nextjournal.clojure_mode.node.end_edge_QMARK_(last_child_on_line))?nextjournal.clojure_mode.node.start(last_child_on_line):nextjournal.clojure_mode.node.end(last_child_on_line)):(cljs.core.truth_((function (){var G__58563 = cljs.core.first(next_children);
var G__58563__$1 = (((G__58563 == null))?null:nextjournal.clojure_mode.node.start(G__58563));
if((G__58563__$1 == null)){
return null;
} else {
return (G__58563__$1 > line_end);
}
})())?nextjournal.clojure_mode.node.start(cljs.core.first(next_children)):null)));
nextjournal.clojure_mode.commands.copy_to_clipboard_BANG_(nextjournal.clojure_mode.node.string.cljs$core$IFn$_invoke$arity$3(state,from,to__$1));

if(cljs.core.truth_(to__$1)){
return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"cursor","cursor",1011937484),from,new cljs.core.Keyword(null,"changes","changes",1492088),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"from","from",1815293044),from,new cljs.core.Keyword(null,"to","to",192099007),to__$1], null)], null);
} else {
return null;
}
} else {
nextjournal.clojure_mode.commands.copy_to_clipboard_BANG_(nextjournal.clojure_mode.node.string.cljs$core$IFn$_invoke$arity$3(state,from,to));

return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"cursor","cursor",1011937484),from,new cljs.core.Keyword(null,"changes","changes",1492088),nextjournal.clojure_mode.util.from_to(from,to)], null);
}
}));
});
nextjournal.clojure_mode.commands.enter_and_indent_STAR_ = (function nextjournal$clojure_mode$commands$enter_and_indent_STAR_(state){
var ctx = nextjournal.clojure_mode.extensions.formatting.make_indent_context(state);
return nextjournal.clojure_mode.util.update_ranges.cljs$core$IFn$_invoke$arity$2(state,(function (p__58565){
var map__58566 = p__58565;
var map__58566__$1 = (((((!((map__58566 == null))))?(((((map__58566.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__58566.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,map__58566):map__58566);
var range = map__58566__$1;
var from = (function (){var obj58568 = map__58566__$1;
var k58569 = "from";
if((function (){var obj58570 = obj58568;
return (((!((obj58570 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58569,obj58570)));
})()){
return (obj58568[k58569]);
} else {
return undefined;
}
})();
var to = (function (){var obj58571 = map__58566__$1;
var k58572 = "to";
if((function (){var obj58573 = obj58571;
return (((!((obj58573 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58572,obj58573)));
})()){
return (obj58571[k58572]);
} else {
return undefined;
}
})();
var empty = (function (){var obj58574 = map__58566__$1;
var k58575 = "empty";
if((function (){var obj58576 = obj58574;
return (((!((obj58576 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58575,obj58576)));
})()){
return (obj58574[k58575]);
} else {
return undefined;
}
})();
var indent_at = nextjournal.clojure_mode.node.start(nextjournal.clojure_mode.node.inner_span(nextjournal.clojure_mode.node.closest(nextjournal.clojure_mode.node.tree.cljs$core$IFn$_invoke$arity$2(state,from),cljs.core.some_fn.cljs$core$IFn$_invoke$arity$2(nextjournal.clojure_mode.node.coll_QMARK_,nextjournal.clojure_mode.node.top_QMARK_))));
var indent = nextjournal.clojure_mode.extensions.formatting.get_indentation(ctx,indent_at);
var insertion = ["\n",cljs.core.str.cljs$core$IFn$_invoke$arity$1(nextjournal.clojure_mode.extensions.formatting.spaces(state,indent))].join('');
return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"cursor","cursor",1011937484),(from + ((insertion).length)),new cljs.core.Keyword(null,"changes","changes",1492088),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"from","from",1815293044),from,new cljs.core.Keyword(null,"to","to",192099007),to,new cljs.core.Keyword(null,"insert","insert",1286475395),insertion], null)], null)], null);
}));
});
nextjournal.clojure_mode.commands.nav_position = (function nextjournal$clojure_mode$commands$nav_position(state,from,dir){
var or__4223__auto__ = (function (){var G__58578 = nextjournal.clojure_mode.node.closest(nextjournal.clojure_mode.node.tree.cljs$core$IFn$_invoke$arity$2(state,from),(function (p1__58577_SHARP_){
var or__4223__auto__ = nextjournal.clojure_mode.node.coll_QMARK_(p1__58577_SHARP_);
if(cljs.core.truth_(or__4223__auto__)){
return or__4223__auto__;
} else {
return ((nextjournal.clojure_mode.node.string_QMARK_(p1__58577_SHARP_)) || (nextjournal.clojure_mode.node.top_QMARK_(p1__58577_SHARP_)));
}
}));
var G__58578__$1 = (((G__58578 == null))?null:nextjournal.clojure_mode.node.children.cljs$core$IFn$_invoke$arity$3(G__58578,from,dir));
var G__58578__$2 = (((G__58578__$1 == null))?null:cljs.core.first(G__58578__$1));
if((G__58578__$2 == null)){
return null;
} else {
var obj58579 = G__58578__$2;
var k58580 = applied_science.js_interop.impl.wrap_key((function (){var G__58582 = dir;
switch (G__58582) {
case (-1):
return new cljs.core.Keyword(null,"from","from",1815293044);

break;
case (1):
return new cljs.core.Keyword(null,"to","to",192099007);

break;
default:
throw (new Error(["No matching clause: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(G__58582)].join('')));

}
})());
if((function (){var obj58583 = obj58579;
return (((!((obj58583 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58580,obj58583)));
})()){
return (obj58579[k58580]);
} else {
return undefined;
}
}
})();
if(cljs.core.truth_(or__4223__auto__)){
return or__4223__auto__;
} else {
return nextjournal.clojure_mode.selections.constrain(state,(from + dir));
}
});
nextjournal.clojure_mode.commands.nav = (function nextjournal$clojure_mode$commands$nav(dir){
return (function (state){
return nextjournal.clojure_mode.util.update_ranges.cljs$core$IFn$_invoke$arity$2(state,(function (p__58584){
var map__58585 = p__58584;
var map__58585__$1 = (((((!((map__58585 == null))))?(((((map__58585.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__58585.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,map__58585):map__58585);
var range = map__58585__$1;
var from = (function (){var obj58587 = map__58585__$1;
var k58588 = "from";
if((function (){var obj58589 = obj58587;
return (((!((obj58589 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58588,obj58589)));
})()){
return (obj58587[k58588]);
} else {
return undefined;
}
})();
var to = (function (){var obj58590 = map__58585__$1;
var k58591 = "to";
if((function (){var obj58592 = obj58590;
return (((!((obj58592 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58591,obj58592)));
})()){
return (obj58590[k58591]);
} else {
return undefined;
}
})();
var empty = (function (){var obj58593 = map__58585__$1;
var k58594 = "empty";
if((function (){var obj58595 = obj58593;
return (((!((obj58595 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58594,obj58595)));
})()){
return (obj58593[k58594]);
} else {
return undefined;
}
})();
if(cljs.core.truth_(empty)){
return new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"cursor","cursor",1011937484),nextjournal.clojure_mode.commands.nav_position(state,from,dir)], null);
} else {
return new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"cursor","cursor",1011937484),(function (){var obj58596 = nextjournal.clojure_mode.util.from_to(from,to);
var k58597 = applied_science.js_interop.impl.wrap_key((function (){var G__58599 = dir;
switch (G__58599) {
case (-1):
return new cljs.core.Keyword(null,"from","from",1815293044);

break;
case (1):
return new cljs.core.Keyword(null,"to","to",192099007);

break;
default:
throw (new Error(["No matching clause: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(G__58599)].join('')));

}
})());
if((function (){var obj58600 = obj58596;
return (((!((obj58600 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58597,obj58600)));
})()){
return (obj58596[k58597]);
} else {
return undefined;
}
})()], null);
}
}));
});
});
nextjournal.clojure_mode.commands.nav_select = (function nextjournal$clojure_mode$commands$nav_select(dir){
return (function (state){
return nextjournal.clojure_mode.util.update_ranges.cljs$core$IFn$_invoke$arity$2(state,(function (p__58602){
var map__58603 = p__58602;
var map__58603__$1 = (((((!((map__58603 == null))))?(((((map__58603.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__58603.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,map__58603):map__58603);
var range = map__58603__$1;
var from = (function (){var obj58605 = map__58603__$1;
var k58606 = "from";
if((function (){var obj58607 = obj58605;
return (((!((obj58607 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58606,obj58607)));
})()){
return (obj58605[k58606]);
} else {
return undefined;
}
})();
var to = (function (){var obj58608 = map__58603__$1;
var k58609 = "to";
if((function (){var obj58610 = obj58608;
return (((!((obj58610 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58609,obj58610)));
})()){
return (obj58608[k58609]);
} else {
return undefined;
}
})();
var empty = (function (){var obj58611 = map__58603__$1;
var k58612 = "empty";
if((function (){var obj58613 = obj58611;
return (((!((obj58613 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58612,obj58613)));
})()){
return (obj58611[k58612]);
} else {
return undefined;
}
})();
if(cljs.core.truth_(empty)){
return new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"range","range",1639692286),nextjournal.clojure_mode.node.balanced_range.cljs$core$IFn$_invoke$arity$3(state,from,nextjournal.clojure_mode.commands.nav_position(state,from,dir))], null);
} else {
return new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"range","range",1639692286),(function (){var map__58614 = nextjournal.clojure_mode.util.from_to(from,to);
var map__58614__$1 = (((((!((map__58614 == null))))?(((((map__58614.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__58614.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,map__58614):map__58614);
var from__$1 = (function (){var obj58616 = map__58614__$1;
var k58617 = "from";
if((function (){var obj58618 = obj58616;
return (((!((obj58618 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58617,obj58618)));
})()){
return (obj58616[k58617]);
} else {
return undefined;
}
})();
var to__$1 = (function (){var obj58619 = map__58614__$1;
var k58620 = "to";
if((function (){var obj58621 = obj58619;
return (((!((obj58621 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58620,obj58621)));
})()){
return (obj58619[k58620]);
} else {
return undefined;
}
})();
var G__58622 = dir;
switch (G__58622) {
case (1):
return nextjournal.clojure_mode.node.balanced_range.cljs$core$IFn$_invoke$arity$3(state,from__$1,nextjournal.clojure_mode.commands.nav_position(state,to__$1,dir));

break;
case (-1):
return nextjournal.clojure_mode.node.balanced_range.cljs$core$IFn$_invoke$arity$3(state,nextjournal.clojure_mode.commands.nav_position(state,from__$1,dir),to__$1);

break;
default:
throw (new Error(["No matching clause: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(G__58622)].join('')));

}
})()], null);
}
}));
});
});
nextjournal.clojure_mode.commands.balance_ranges = (function nextjournal$clojure_mode$commands$balance_ranges(state){
return nextjournal.clojure_mode.util.update_ranges.cljs$core$IFn$_invoke$arity$2(state,(function (p__58623){
var map__58624 = p__58623;
var map__58624__$1 = (((((!((map__58624 == null))))?(((((map__58624.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__58624.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,map__58624):map__58624);
var from = (function (){var obj58626 = map__58624__$1;
var k58627 = "from";
if((function (){var obj58628 = obj58626;
return (((!((obj58628 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58627,obj58628)));
})()){
return (obj58626[k58627]);
} else {
return undefined;
}
})();
var to = (function (){var obj58629 = map__58624__$1;
var k58630 = "to";
if((function (){var obj58631 = obj58629;
return (((!((obj58631 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58630,obj58631)));
})()){
return (obj58629[k58630]);
} else {
return undefined;
}
})();
var empty = (function (){var obj58632 = map__58624__$1;
var k58633 = "empty";
if((function (){var obj58634 = obj58632;
return (((!((obj58634 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58633,obj58634)));
})()){
return (obj58632[k58633]);
} else {
return undefined;
}
})();
if(cljs.core.truth_(empty)){
return null;
} else {
return new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"range","range",1639692286),nextjournal.clojure_mode.node.balanced_range.cljs$core$IFn$_invoke$arity$3(state,from,to)], null);
}
}));
});
nextjournal.clojure_mode.commands.log = console.log;
nextjournal.clojure_mode.commands.slurp = (function nextjournal$clojure_mode$commands$slurp(direction){
return (function (state){
return nextjournal.clojure_mode.util.update_ranges.cljs$core$IFn$_invoke$arity$2(state,(function (p__58636){
var map__58637 = p__58636;
var map__58637__$1 = (((((!((map__58637 == null))))?(((((map__58637.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__58637.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,map__58637):map__58637);
var range = map__58637__$1;
var from = (function (){var obj58639 = map__58637__$1;
var k58640 = "from";
if((function (){var obj58641 = obj58639;
return (((!((obj58641 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58640,obj58641)));
})()){
return (obj58639[k58640]);
} else {
return undefined;
}
})();
var to = (function (){var obj58642 = map__58637__$1;
var k58643 = "to";
if((function (){var obj58644 = obj58642;
return (((!((obj58644 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58643,obj58644)));
})()){
return (obj58642[k58643]);
} else {
return undefined;
}
})();
var empty = (function (){var obj58645 = map__58637__$1;
var k58646 = "empty";
if((function (){var obj58647 = obj58645;
return (((!((obj58647 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58646,obj58647)));
})()){
return (obj58645[k58646]);
} else {
return undefined;
}
})();
if(cljs.core.truth_(empty)){
var temp__5753__auto__ = nextjournal.clojure_mode.node.closest(nextjournal.clojure_mode.node.tree.cljs$core$IFn$_invoke$arity$2(state,from),cljs.core.every_pred.cljs$core$IFn$_invoke$arity$2(nextjournal.clojure_mode.node.coll_QMARK_,(function (p1__58635_SHARP_){
return cljs.core.not((function (){var G__58648 = direction;
switch (G__58648) {
case (1):
var G__58649 = p1__58635_SHARP_;
var G__58649__$1 = (((G__58649 == null))?null:nextjournal.clojure_mode.node.with_prefix(G__58649));
var G__58649__$2 = (((G__58649__$1 == null))?null:nextjournal.clojure_mode.node.right(G__58649__$1));
if((G__58649__$2 == null)){
return null;
} else {
return nextjournal.clojure_mode.node.end_edge_QMARK_(G__58649__$2);
}

break;
case (-1):
var G__58650 = p1__58635_SHARP_;
var G__58650__$1 = (((G__58650 == null))?null:nextjournal.clojure_mode.node.with_prefix(G__58650));
var G__58650__$2 = (((G__58650__$1 == null))?null:nextjournal.clojure_mode.node.left(G__58650__$1));
if((G__58650__$2 == null)){
return null;
} else {
return nextjournal.clojure_mode.node.start_edge_QMARK_(G__58650__$2);
}

break;
default:
throw (new Error(["No matching clause: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(G__58648)].join('')));

}
})());
})));
if(cljs.core.truth_(temp__5753__auto__)){
var parent = temp__5753__auto__;
var temp__5753__auto____$1 = (function (){var G__58651 = direction;
switch (G__58651) {
case (1):
return cljs.core.first(cljs.core.remove.cljs$core$IFn$_invoke$arity$2(nextjournal.clojure_mode.node.line_comment_QMARK_,nextjournal.clojure_mode.node.rights(nextjournal.clojure_mode.node.with_prefix(parent))));

break;
case (-1):
return cljs.core.first(cljs.core.remove.cljs$core$IFn$_invoke$arity$2(nextjournal.clojure_mode.node.line_comment_QMARK_,nextjournal.clojure_mode.node.lefts(nextjournal.clojure_mode.node.with_prefix(parent))));

break;
default:
throw (new Error(["No matching clause: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(G__58651)].join('')));

}
})();
if(cljs.core.truth_(temp__5753__auto____$1)){
var target = temp__5753__auto____$1;
return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword("cursor","mapped","cursor/mapped",1625530272),from,new cljs.core.Keyword(null,"changes","changes",1492088),(function (){var G__58652 = direction;
switch (G__58652) {
case (1):
var edge = nextjournal.clojure_mode.node.down_last(parent);
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"from","from",1815293044),nextjournal.clojure_mode.node.end(target),new cljs.core.Keyword(null,"insert","insert",1286475395),nextjournal.clojure_mode.node.name(edge)], null),(function (){var obj58653 = nextjournal.clojure_mode.node.from_to.cljs$core$IFn$_invoke$arity$1(edge);
var obj58654 = (((!((obj58653 == null))))?obj58653:({}));
(obj58654["insert"] = " ");

return obj58654;
})()], null);

break;
case (-1):
var edge = nextjournal.clojure_mode.node.left_edge_with_prefix(state,parent);
var start = nextjournal.clojure_mode.node.start(nextjournal.clojure_mode.node.with_prefix(parent));
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"from","from",1815293044),start,new cljs.core.Keyword(null,"to","to",192099007),(start + ((edge).length)),new cljs.core.Keyword(null,"insert","insert",1286475395)," "], null),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"from","from",1815293044),nextjournal.clojure_mode.node.start(target),new cljs.core.Keyword(null,"insert","insert",1286475395),edge], null)], null);

break;
default:
throw (new Error(["No matching clause: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(G__58652)].join('')));

}
})()], null);
} else {
return null;
}
} else {
return null;
}
} else {
return null;
}
}));
});
});
nextjournal.clojure_mode.commands.barf = (function nextjournal$clojure_mode$commands$barf(direction){
return (function (state){
return nextjournal.clojure_mode.util.update_ranges.cljs$core$IFn$_invoke$arity$2(state,(function (p__58657){
var map__58658 = p__58657;
var map__58658__$1 = (((((!((map__58658 == null))))?(((((map__58658.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__58658.cljs$core$ISeq$))))?true:false):false))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,map__58658):map__58658);
var range = map__58658__$1;
var from = (function (){var obj58660 = map__58658__$1;
var k58661 = "from";
if((function (){var obj58662 = obj58660;
return (((!((obj58662 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58661,obj58662)));
})()){
return (obj58660[k58661]);
} else {
return undefined;
}
})();
var to = (function (){var obj58663 = map__58658__$1;
var k58664 = "to";
if((function (){var obj58665 = obj58663;
return (((!((obj58665 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58664,obj58665)));
})()){
return (obj58663[k58664]);
} else {
return undefined;
}
})();
var empty = (function (){var obj58666 = map__58658__$1;
var k58667 = "empty";
if((function (){var obj58668 = obj58666;
return (((!((obj58668 == null)))) && (applied_science.js_interop.impl.in_QMARK__STAR_(k58667,obj58668)));
})()){
return (obj58666[k58667]);
} else {
return undefined;
}
})();
if(cljs.core.truth_(empty)){
var temp__5753__auto__ = nextjournal.clojure_mode.node.closest(nextjournal.clojure_mode.node.tree.cljs$core$IFn$_invoke$arity$2(state,from),nextjournal.clojure_mode.node.coll_QMARK_);
if(cljs.core.truth_(temp__5753__auto__)){
var parent = temp__5753__auto__;
var G__58669 = direction;
switch (G__58669) {
case (1):
var temp__5753__auto____$1 = (function (){var G__58670 = nextjournal.clojure_mode.node.down_last(parent);
var G__58670__$1 = (((G__58670 == null))?null:nextjournal.clojure_mode.node.lefts(G__58670));
var G__58670__$2 = (((G__58670__$1 == null))?null:cljs.core.remove.cljs$core$IFn$_invoke$arity$2(nextjournal.clojure_mode.node.line_comment_QMARK_,G__58670__$1));
var G__58670__$3 = (((G__58670__$2 == null))?null:cljs.core.drop.cljs$core$IFn$_invoke$arity$2((1),G__58670__$2));
if((G__58670__$3 == null)){
return null;
} else {
return cljs.core.first(G__58670__$3);
}
})();
if(cljs.core.truth_(temp__5753__auto____$1)){
var target = temp__5753__auto____$1;
return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"cursor","cursor",1011937484),(function (){var x__4309__auto__ = nextjournal.clojure_mode.node.end(target);
var y__4310__auto__ = from;
return ((x__4309__auto__ < y__4310__auto__) ? x__4309__auto__ : y__4310__auto__);
})(),new cljs.core.Keyword(null,"changes","changes",1492088),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"from","from",1815293044),nextjournal.clojure_mode.node.end(target),new cljs.core.Keyword(null,"insert","insert",1286475395),nextjournal.clojure_mode.node.name(nextjournal.clojure_mode.node.down_last(parent))], null),(function (){var obj58671 = nextjournal.clojure_mode.node.from_to.cljs$core$IFn$_invoke$arity$1(nextjournal.clojure_mode.node.down_last(parent));
var obj58672 = (((!((obj58671 == null))))?obj58671:({}));
(obj58672["insert"] = " ");

return obj58672;
})()], null)], null);
} else {
return null;
}

break;
case (-1):
var temp__5753__auto____$1 = (function (){var G__58675 = nextjournal.clojure_mode.node.down(parent);
var G__58675__$1 = (((G__58675 == null))?null:nextjournal.clojure_mode.node.rights(G__58675));
var G__58675__$2 = (((G__58675__$1 == null))?null:cljs.core.remove.cljs$core$IFn$_invoke$arity$2(nextjournal.clojure_mode.node.line_comment_QMARK_,G__58675__$1));
var G__58675__$3 = (((G__58675__$2 == null))?null:cljs.core.drop.cljs$core$IFn$_invoke$arity$2((1),G__58675__$2));
if((G__58675__$3 == null)){
return null;
} else {
return cljs.core.first(G__58675__$3);
}
})();
if(cljs.core.truth_(temp__5753__auto____$1)){
var next_first_child = temp__5753__auto____$1;
var left_edge = nextjournal.clojure_mode.node.left_edge_with_prefix(state,parent);
var left_start = nextjournal.clojure_mode.node.start(nextjournal.clojure_mode.node.with_prefix(parent));
return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"cursor","cursor",1011937484),(function (){var x__4306__auto__ = from;
var y__4307__auto__ = (nextjournal.clojure_mode.node.start(next_first_child) + (((left_edge).length) + (1)));
return ((x__4306__auto__ > y__4307__auto__) ? x__4306__auto__ : y__4307__auto__);
})(),new cljs.core.Keyword(null,"changes","changes",1492088),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"from","from",1815293044),nextjournal.clojure_mode.node.start(next_first_child),new cljs.core.Keyword(null,"insert","insert",1286475395),[" ",left_edge].join('')], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"from","from",1815293044),left_start,new cljs.core.Keyword(null,"to","to",192099007),(left_start + ((left_edge).length)),new cljs.core.Keyword(null,"insert","insert",1286475395),nextjournal.clojure_mode.extensions.formatting.spaces(state,((left_edge).length))], null)], null)], null);
} else {
return null;
}

break;
default:
throw (new Error(["No matching clause: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(G__58669)].join('')));

}
} else {
return null;
}
} else {
return null;
}
}));
});
});
/**
 * Subset of builtin commands that compliment paredit
 */
nextjournal.clojure_mode.commands.builtin_index = cljs.core.PersistentHashMap.fromArrays([new cljs.core.Keyword(null,"cursorLineStart","cursorLineStart",-1505072960),new cljs.core.Keyword(null,"cursorLineDown","cursorLineDown",180576864),new cljs.core.Keyword(null,"selectAll","selectAll",869127842),new cljs.core.Keyword(null,"selectLineUp","selectLineUp",-255594686),new cljs.core.Keyword(null,"cursorLineBoundaryForward","cursorLineBoundaryForward",-1283359997),new cljs.core.Keyword(null,"selectLineBoundaryBackward","selectLineBoundaryBackward",-1443564123),new cljs.core.Keyword(null,"deleteCharBackward","deleteCharBackward",-618312025),new cljs.core.Keyword(null,"insertNewlineAndIndent","insertNewlineAndIndent",-542382007),new cljs.core.Keyword(null,"cursorLineBoundaryBackward","cursorLineBoundaryBackward",1373049802),new cljs.core.Keyword(null,"selectCharRight","selectCharRight",1049825195),new cljs.core.Keyword(null,"selectPageUp","selectPageUp",152840428),new cljs.core.Keyword(null,"deleteCharForward","deleteCharForward",823474956),new cljs.core.Keyword(null,"cursorCharLeft","cursorCharLeft",-1572589780),new cljs.core.Keyword(null,"cursorGroupBackward","cursorGroupBackward",-1004717331),new cljs.core.Keyword(null,"selectDocStart","selectDocStart",-217268371),new cljs.core.Keyword(null,"selectGroupBackward","selectGroupBackward",1569543117),new cljs.core.Keyword(null,"cursorDocEnd","cursorDocEnd",-1298653903),new cljs.core.Keyword(null,"deleteGroupBackward","deleteGroupBackward",616768113),new cljs.core.Keyword(null,"selectLineStart","selectLineStart",1211557745),new cljs.core.Keyword(null,"deleteGroupForward","deleteGroupForward",596007091),new cljs.core.Keyword(null,"selectDocEnd","selectDocEnd",496449813),new cljs.core.Keyword(null,"selectPageDown","selectPageDown",226562613),new cljs.core.Keyword(null,"cursorPageDown","cursorPageDown",-1143253131),new cljs.core.Keyword(null,"cursorPageUp","cursorPageUp",-716828715),new cljs.core.Keyword(null,"selectLineBoundaryForward","selectLineBoundaryForward",904508598),new cljs.core.Keyword(null,"cursorLineEnd","cursorLineEnd",-234219178),new cljs.core.Keyword(null,"cursorGroupForward","cursorGroupForward",1231480632),new cljs.core.Keyword(null,"cursorCharRight","cursorCharRight",-739900583),new cljs.core.Keyword(null,"selectGroupForward","selectGroupForward",1344873433),new cljs.core.Keyword(null,"selectLineEnd","selectLineEnd",-1578526086),new cljs.core.Keyword(null,"selectCharLeft","selectCharLeft",1894248154),new cljs.core.Keyword(null,"splitLine","splitLine",-1338533189),new cljs.core.Keyword(null,"selectLineDown","selectLineDown",1741100604),new cljs.core.Keyword(null,"transposeChars","transposeChars",1566260285),new cljs.core.Keyword(null,"cursorLineUp","cursorLineUp",-1375841219),new cljs.core.Keyword(null,"cursorDocStart","cursorDocStart",2008312830)],[module$node_modules$$codemirror$commands$dist$index_cjs.cursorLineStart,module$node_modules$$codemirror$commands$dist$index_cjs.cursorLineDown,module$node_modules$$codemirror$commands$dist$index_cjs.selectAll,module$node_modules$$codemirror$commands$dist$index_cjs.selectLineUp,module$node_modules$$codemirror$commands$dist$index_cjs.cursorLineBoundaryForward,module$node_modules$$codemirror$commands$dist$index_cjs.selectLineBoundaryBackward,module$node_modules$$codemirror$commands$dist$index_cjs.deleteCharBackward,module$node_modules$$codemirror$commands$dist$index_cjs.insertNewlineAndIndent,module$node_modules$$codemirror$commands$dist$index_cjs.cursorLineBoundaryBackward,module$node_modules$$codemirror$commands$dist$index_cjs.selectCharRight,module$node_modules$$codemirror$commands$dist$index_cjs.selectPageUp,module$node_modules$$codemirror$commands$dist$index_cjs.deleteCharForward,module$node_modules$$codemirror$commands$dist$index_cjs.cursorCharLeft,module$node_modules$$codemirror$commands$dist$index_cjs.cursorGroupBackward,module$node_modules$$codemirror$commands$dist$index_cjs.selectDocStart,module$node_modules$$codemirror$commands$dist$index_cjs.selectGroupBackward,module$node_modules$$codemirror$commands$dist$index_cjs.cursorDocEnd,module$node_modules$$codemirror$commands$dist$index_cjs.deleteGroupBackward,module$node_modules$$codemirror$commands$dist$index_cjs.selectLineStart,module$node_modules$$codemirror$commands$dist$index_cjs.deleteGroupForward,module$node_modules$$codemirror$commands$dist$index_cjs.selectDocEnd,module$node_modules$$codemirror$commands$dist$index_cjs.selectPageDown,module$node_modules$$codemirror$commands$dist$index_cjs.cursorPageDown,module$node_modules$$codemirror$commands$dist$index_cjs.cursorPageUp,module$node_modules$$codemirror$commands$dist$index_cjs.selectLineBoundaryForward,module$node_modules$$codemirror$commands$dist$index_cjs.cursorLineEnd,module$node_modules$$codemirror$commands$dist$index_cjs.cursorGroupForward,module$node_modules$$codemirror$commands$dist$index_cjs.cursorCharRight,module$node_modules$$codemirror$commands$dist$index_cjs.selectGroupForward,module$node_modules$$codemirror$commands$dist$index_cjs.selectLineEnd,module$node_modules$$codemirror$commands$dist$index_cjs.selectCharLeft,module$node_modules$$codemirror$commands$dist$index_cjs.splitLine,module$node_modules$$codemirror$commands$dist$index_cjs.selectLineDown,module$node_modules$$codemirror$commands$dist$index_cjs.transposeChars,module$node_modules$$codemirror$commands$dist$index_cjs.cursorLineUp,module$node_modules$$codemirror$commands$dist$index_cjs.cursorDocStart]);
nextjournal.clojure_mode.commands.indent = nextjournal.clojure_mode.commands.view_command(nextjournal.clojure_mode.extensions.formatting.format);
nextjournal.clojure_mode.commands.unwrap = nextjournal.clojure_mode.commands.view_command(nextjournal.clojure_mode.commands.unwrap_STAR_);
nextjournal.clojure_mode.commands.kill = nextjournal.clojure_mode.commands.view_command(nextjournal.clojure_mode.commands.kill_STAR_);
nextjournal.clojure_mode.commands.nav_right = nextjournal.clojure_mode.commands.view_command(nextjournal.clojure_mode.commands.nav((1)));
nextjournal.clojure_mode.commands.nav_left = nextjournal.clojure_mode.commands.view_command(nextjournal.clojure_mode.commands.nav((-1)));
nextjournal.clojure_mode.commands.nav_select_right = nextjournal.clojure_mode.commands.view_command(nextjournal.clojure_mode.commands.nav_select((1)));
nextjournal.clojure_mode.commands.nav_select_left = nextjournal.clojure_mode.commands.view_command(nextjournal.clojure_mode.commands.nav_select((-1)));
nextjournal.clojure_mode.commands.slurp_forward = nextjournal.clojure_mode.commands.view_command(nextjournal.clojure_mode.commands.slurp((1)));
nextjournal.clojure_mode.commands.slurp_backward = nextjournal.clojure_mode.commands.view_command(nextjournal.clojure_mode.commands.slurp((-1)));
nextjournal.clojure_mode.commands.barf_forward = nextjournal.clojure_mode.commands.view_command(nextjournal.clojure_mode.commands.barf((1)));
nextjournal.clojure_mode.commands.barf_backward = nextjournal.clojure_mode.commands.view_command(nextjournal.clojure_mode.commands.barf((-1)));
nextjournal.clojure_mode.commands.selection_grow = nextjournal.clojure_mode.commands.view_command(nextjournal.clojure_mode.extensions.selection_history.selection_grow_STAR_);
nextjournal.clojure_mode.commands.selection_return = nextjournal.clojure_mode.commands.view_command(nextjournal.clojure_mode.extensions.selection_history.selection_return_STAR_);
nextjournal.clojure_mode.commands.enter_and_indent = nextjournal.clojure_mode.commands.view_command(nextjournal.clojure_mode.commands.enter_and_indent_STAR_);
nextjournal.clojure_mode.commands.paredit_index = cljs.core.PersistentHashMap.fromArrays([new cljs.core.Keyword(null,"indent","indent",-148200125),new cljs.core.Keyword(null,"nav-left","nav-left",845947876),new cljs.core.Keyword(null,"enter-and-indent","enter-and-indent",-1825406873),new cljs.core.Keyword(null,"selection-grow","selection-grow",1627169352),new cljs.core.Keyword(null,"kill","kill",-12335575),new cljs.core.Keyword(null,"slurp-forward","slurp-forward",-866284566),new cljs.core.Keyword(null,"nav-select-right","nav-select-right",-455278613),new cljs.core.Keyword(null,"nav-select-left","nav-select-left",-1033285138),new cljs.core.Keyword(null,"barf-forward","barf-forward",1278612337),new cljs.core.Keyword(null,"barf-backward","barf-backward",434854195),new cljs.core.Keyword(null,"nav-right","nav-right",591041267),new cljs.core.Keyword(null,"slurp-backward","slurp-backward",-1615745159),new cljs.core.Keyword(null,"unwrap","unwrap",-1399175462),new cljs.core.Keyword(null,"selection-return","selection-return",267226206)],[nextjournal.clojure_mode.commands.indent,nextjournal.clojure_mode.commands.nav_left,nextjournal.clojure_mode.commands.enter_and_indent,nextjournal.clojure_mode.commands.selection_grow,nextjournal.clojure_mode.commands.kill,nextjournal.clojure_mode.commands.slurp_forward,nextjournal.clojure_mode.commands.nav_select_right,nextjournal.clojure_mode.commands.nav_select_left,nextjournal.clojure_mode.commands.barf_forward,nextjournal.clojure_mode.commands.barf_backward,nextjournal.clojure_mode.commands.nav_right,nextjournal.clojure_mode.commands.slurp_backward,nextjournal.clojure_mode.commands.unwrap,nextjournal.clojure_mode.commands.selection_return]);
/**
 * Mapping of keyword-id to command functions
 */
nextjournal.clojure_mode.commands.index = cljs.core.merge.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([nextjournal.clojure_mode.commands.builtin_index,nextjournal.clojure_mode.commands.paredit_index], 0));
/**
 * Lookup keyword-id by function
 */
nextjournal.clojure_mode.commands.reverse_index = cljs.core.reduce_kv((function (p1__58676_SHARP_,p2__58678_SHARP_,p3__58677_SHARP_){
return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(p1__58676_SHARP_,p3__58677_SHARP_,p2__58678_SHARP_);
}),cljs.core.PersistentArrayMap.EMPTY,nextjournal.clojure_mode.commands.index);

//# sourceMappingURL=nextjournal.clojure_mode.commands.js.map
